query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f4c5336cdb4d08e1ba3ea3455b0e3c7e | a858b1a9de3cb41f934e19f946ee48d0 | 1017 求数的位数 | def func(x):
if x == 0: return 1
ret = 0
while x:
x //= 10
ret += 1
return ret | 1 |
f695e16f744011d021bcbeaaec6d91e7 | ef42b779680083e56c196b9dee39c1c0 | 在线程中创建主窗体,防止登入界面卡顿 | {
CHomeWnd* pHomeWnd = new CHomeWnd(user);
pHomeWnd->Create(NULL, _T("MainWnd"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE,100,100,800,600);
pHomeWnd->ShowWindow();
::ShowWindow(*this, SW_HIDE);
int nScreenWidth = GetSystemMetrics(SM_CXFULLSCREEN);
int nScreenHeight = GetSystemMetrics(SM_CYFULLSCREEN);
RECT rc;
::Get... | 0 |
2b72d23089ecf7070d1ed2ddf3d2d406 | 03630b600a6d3c47d6d75ca6f3ccf75b | 巡检管理 | public ActionResult CheckinManagement(int page = 1, int pagesize = 6, string search = "", string sortbykey = "CreateTime", bool ascend = false)
{
return View();
} | 0 |
3b56580e8e643f6d8a01d975f80d2cb9 | 15bbd40784902249f77b6055c4c40b86 | Option to instruct the Excel export to create empty cells. By default if a cell contains null or empty data, it will not be created in the exported spreadsheet. | namespace NPOI.SS.Util
public class SheetBuilder
public bool GetCreateEmptyCells()
{
return shouldCreateEmptyCells;
} | 1 |
3a212dabeba2e7e6db5830c9bb88badf | cc1ac76be92b79549d37c1570b5680c9 | Raised whenever an HTTP request does not return 200 | class ExampleHTTPClientRequest extends Generic
public function run() {
echo 'Something went wrong.';
} | 0 |
cc998d14ed2ed058220caa52a8a88e9f | 6de20c043198061dfb3945d52ebe387b | 反转集合中所有项的排列顺序 | namespace Algorithms
public static class Permutations
public static void Reverse<T>(this IList<T> seq)
{
seq.Reverse(0, seq.Count);
} | 1 |
e8bc13c9a2028c321c0984be30188e1d | 34c0b48675da91a1fe737f4f33737d4c | Creates the formatted instance name for a performance counter, providing the Application
Domain friendly name for the prefix for the instance. | namespace JeremyAnsel.DirectX.D3D11.ComInterfaces
[PreserveSig]
void GetInstanceName(
[Out, MarshalAs(UnmanagedType.LPStr)] StringBuilder instanceName,
[In, Out] ref UIntPtr bufferLength); | 0 |
659321f0f62105b1edde350626c4690c | 7af40352cce6d75abd14c7db19bc9528 | 获取列表数据(使用redis缓存),支持任意格式,如果缓存中没有可以从自定义的数据源中查找,并放入缓存中 | @Service("jedisService")
public class RedisService
public <T> List<T> getListFromCache(String key, Class<T> clazz) {
List<T> data = new ArrayList<T>();
String result = this.get(key);
if (StringUtils.isBlank(result)) {
return data;
}
data = getListByJsonStr(result, cla... | 0 |
78075279b1203174ce8b6ab7f3dbf54d | 858c2ce7bb3ffbf0b86fd2cc8f15f6f2 | ****************************************************************
заполнение списков (категории и элементы) из массива + их сортировка | function fPlugin_Maker_Get_Elem_List()
{
if (!isset($_GET['pm_id']))
return;
$pm_id = intval($_GET['pm_id']);
$res = sql_query('SELECT pm_title, pm_settings, pm_elems_settings FROM sb_plugins_maker WHERE pm_id="'.$pm_id.'"');
if (!$res)
return;
list($pm_title, $pm_settings, $pm_elems_settings... | 1 |
6520660c28519a0a63faddd8a92bf3e2 | f3b36fb78bf86d02e6d261030549f2e2 | Calculates average heading. | {
double totalwindX = Last10MinWindList.Sum(o => o.gustX);
double totalwindY = Last10MinWindList.Sum(o => o.gustY);
if (totalwindX == 0)
{
return 0;
}
int avgbear = calcavgbear(totalwindX, totalwindY);
if (avgbear == 0)
{
avgbear = 360;
}
return avgbear;
} | 1 |
cf2762ff5e86c6c744bca9144b2312a5 | b8a138cb6deda56833dfd4e3ca3c0c1e | Test if trying to reach above total page number | class PageDataTest extends TestCase
public function testPageNumberTooHigh()
{
$pageData = new PageData(15, 5, 10);
$this->assertSame(2, $pageData->getPageNumber());
} | 0 |
5cfcad23cc70f4c0797fd4445c57c423 | 5475be0966fd69e533b18a63e759e978 | Рекурсивный метод, позволяет из словаря с вложеной структурой создать
дикт в котором каждая вложеная структура - отдельный датакласс.
Приводит имена полей в snake_case. | out = {}
for k, v in asdict(d).iteritems():
k = k.replace('.', '')
k = k[0].lower() + k[1:]
if hasattr(v, '__keylist__'):
out[k] = self.recursive_asdict(v)
elif isinstance(v, list):
out[k] = []
for item in v:... | 1 |
70fd23fdec70cc02cd3fac0877bcde31 | 7d85db7f35432d9e40892be81b8a8b9d | Только для тестов: получает содержимое хэша флагов отправки юзеров на запись централа в бэкап | {
global $USER;
$resultDraft = [];
$hl = HL\Base::initByCode($this->arParams['HL_CODE']);
$rsDraft = $hl::getList([
'select' => ['ID', 'UF_DATA'],
'filter' => [
'UF_USER_ID' => $USER->GetID(),
'ID' => $draftID
]
... | 0 |
7849f7f00f57c649b95d2f742d87e55e | 01fb5a3c7a8a8a8b4b535e4035426cf5 | When Delete is clicked, the marked recipe is deleted from the recipe lists of the GUI and recipe manager, respectively. | class EditRecipeScreen(Screen):
def delete_recipe(self):
if self.recipe_id == self.NEW_ID:
self.manager.last = "home"
self.manager.current = "home"
else:
self.controller.delete_recipe(self.recipe_id)
self.app.home.rv.update_rec()
self.manager.l... | 1 |
fa63b97fd6074c3c560982e5919bbcad | c01eaccd0853c79a00ea4df30c645478 | Set a new random diagonal direction | public class MovingSprite extends FixedSprite
public void randomDirection ()
{
mAngle = cRandom.nextDouble () * ANGLE;
mDx = (int) (mSpeed * Math.sin (mAngle));
mDy = (int) (mSpeed * Math.cos (mAngle));
} | 1 |
3bb6a364121e5ae6c11f8965423ebd89 | 1fe72213af4712b531eca9b64768de42 | Inserta un nuevo registro en la tabla que asocia tickets con tecnicos de HW o SW | {
bool registrado = false;
foreach (Ticket ticket in listatickets)
{
string consulta = "insert into ticket(fecha,precio_final,fk_id_costo,fk_id_funcion_sala,fk_id_detalle,fk_id_promocion,fk_nro_butaca)" +
" values('" + DateTime.Now.ToString("yyyy-... | 0 |
230b53895e40d156bb71458cdfe4c368 | 6c4bfd8c64db9245a133bf46b1ed294e | 获取orbitW属性的值。 | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"commonInfo",
"controlInfo",
"orbit",
"sideAbility",
"orbitAbility",
"sensorList"
})
@XmlRootElement(name = "satellite")
public class Satellite implements java.io.Serializable{ @XmlAccessorType(XmlAccessType.FIELD)
@X... | 1 |
a9fa786c19f59138e33c9dbf97116857 | 56447f93e8d6704ed8bca4f62d2c6c3e | Sets the users setting for Forge Logging Level | public class appfwsettings extends base_resource
public void set_ceflogging(String ceflogging) throws Exception{
this.ceflogging = ceflogging;
} | 0 |
0d4d5f95ff4882f1aa90a5344e179966 | 5dcca70e8f0b5dc833c11a0c0aed99e0 | 根据物品等级。初始化装备的基础属性。 | public class CObject_Item_Equip : CObject_Item
void AsEquipBase(_DBC_ITEM_EQUIP_BASE pDefine, EQUIP_QUALITY quality)
{
m_Quality = quality;
m_theBaseDef = pDefine;
m_nParticularID = ( ( ( ( ( m_theBaseDef.nClass * 100 ) + m_theBaseDef.nQuality ) * 100 ) + m_theBaseDef.nType ) * 1000 ) + m_theBaseD... | 1 |
c612c9133a177d44698a2057f42193b1 | 2317b01dd015193a82f97cf40e43a99d | If you are handling an IPC and you don't trust the caller you need to validate whether the
attribution source is one for the calling app to prevent the caller to pass you a source from
another app without including themselves in the attribution chain. | if SkillValidation.is_skill_claim(claims) and self.allowed_callers:
app_id = JwtTokenValidation.get_app_id_from_claims(claims)
if app_id not in self.allowed_callers:
raise ValueError(
f'Received a request from an application with an appID of "{ app_id ... | 1 |
46e6db5aea1adf3ac33e1bc9a5c0ba54 | a3f4f79fddad4e80360919e8fc7f6f8d | 跳转到节点选择界面 | void MainWindow::on_btn_NodeContrller_clicked()
{
nodeCotroller.show();
} | 1 |
babf4120c597eacc329f709c3e78397a | c21898d1887539c319c3cbe58a31f1f3 | #Get all approved photos | {
$query = self::find()->with(['botRatings'])->where(['status' => self::STATUS_APPROVED, 'published' => self::PUBLISHED]);
return $query->all();
} | 1 |
85221adca345c4cac50b36305932b017 | e0fcd1feb46f1afd3aacb19b5494162c | Update the statistics counting collisions. | self.collisions += collisions
self.total_items += 1
self.avg_probe_length = self.collisions/self.total_items
self.load = self.count/self.table_size | 1 |
897e586689c3682c629ecc7feeffeb96 | 7e7620ef55d3e44a9e8c946a1a569454 | 将十进制整数转为32位二进制整数 | {
string strBit = string.Empty;
strBit = Convert.ToString(val, 2);
if (val >= 0)
{
strBit = Convert.ToString(val, 2);
int len = strBit.Length;
len = 32 - len;
for (int i = 0; i < len; ++i)
... | 1 |
4cd6273c13eff28bc3d51ed07d4e2ca6 | efcb006c1b669f60b06095ea35fee62e | Recherche les contacts dont le nom commence par la lettre passée en paramètres. | public ModelAndView searchByFirstName(@RequestParam(value = "firstName") String firstName) {
if (firstName == null || firstName.equals(""))
return new ModelAndView("redirect:/");
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
com.dao.ent... | 1 |
6ed6052a3d19d7eb9d55eb7fade8aa50 | 3e9bdfb23c43c61a0dac381d4fe4e2f1 | Looks up the field and gets its Lua type. The field's value is discarded without performing any Lua to CLR translation. | {
if (!fieldType.IsValueType)
{
Debug.Assert(!fieldType.IsByRef);
if (fieldType.IsPointer || fieldType.IsFunctionPointer)
return TypeBuilder.GCLayout.None;
else
return TypeBuilder.GCLayout.SingleRefer... | 0 |
348e5516b80c52ee1c2fc37ffeab18d9 | 7caecbd3cfbdc66ce8e961a69570c44b | Instigates updates to the color display on progressbar changes | {
QString colorCode = QString("background-color: %1;").arg(bar_color);
ui->search_progress_bar->setStyleSheet("QProgressBar::chunk {" +
colorCode +
"border: 1px red;"
"border-radius: ... | 1 |
20903bf37ae4899300883fd289763e74 | f8fb2ae41f2e459003b4fb7e9a96f095 | Calculates and returns magnitude of complex number. | public class MyComplex
public double magnitude() {
return Math.sqrt(Math.pow(real, 2) + Math.pow(imag, 2));
} | 1 |
6d5b9b40260854aed68932c2080af644 | f9147f157e76db51752c5473922f8298 | 一个简单的发起请求时loading,完成时清除loading的函数,且返回一个promise | async function getWithLoading(url,params,timeout,tag,option){
let state = 0;
let loadingMsg = option.loadingMsg?option.loadingMsg: '加载中...';
let errMsg = option.errMsg?option.errMsg: '请求失败,请重试。';
let overTimeMsg = option.overTimeMsg?option.overTimeMsg: '请求超时,请重试。';
this.timer = setTimeout(()=>{
... | 1 |
64cf8d3a42990906e4de474111e96e5f | 75587689f5e8a2b2c0dd83ab4f7cc152 | 工数を追加する | def addWorker(workerId):
workerList.append(Worker(workerId)) | 0 |
b41cb448db6df2aae07fe73085d8e4bb | 89bb92f5288c58cf29fc9c9dadb792ff | Creates frontend components of SR_Recognizer. | this.ctx = ctx;
PackageManager packManager = ctx.getPackageManager();
setTTS();
List<ResolveInfo> intActivities = packManager.queryIntentActivities(
new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
if (intActivities.size() != 0 || "generic".equals(Build.B... | 0 |
f23247f8fa1bcb6ef44e12d3cbd413df | d1f6631bf945fd0c51a6f0c9b39544e2 | 2.锁定工单 | class EmpService implements IEmpService
public function lock()
{
$get = Yii::$app->request->get();
try {
$res = $this->model->findOneById($get['id']);
if (!$res) {
return WeHelper::jsonReturn($res, BackendErrorCode::ERR_OBJECT_NON);
}
$... | 1 |
9a87d66dc599ff2a1c6497ef9a723daf | 7f775ed6eace258ff001de856d4a5f57 | multiplies the point by a scalar value | {
X *= scalar;
Y *= scalar;
return this;
} | 1 |
b1d05323854436570761c756bb46500c | 21e3fd1009fe2d0e8f078b03df82fa17 | Perform an HTTP GET request to a URL using an HTTP Authorization header | params = parse_qsl(urlparse(url).query)
consumer = oauth.OAuthConsumer(key=key, secret=secret)
request = oauth.OAuthRequest.from_consumer_and_token(consumer, http_method='GET', http_url=url, parameters=params)
request.sign_request(oauth.OAuthSignatureMethod_HMAC_SHA1(), consumer, None)
return urllib... | 1 |
88460f8e7e11029a2ca37ede10732dc8 | fbe2e506c61ee69493118766918cf740 | Funkcja pobiera kursy o statusie "Anulowany" | kursvaluta := make([]Kurs, 0)
if url == "" {
return kursvaluta
}
body := gethtmlpage(url)
shtml := string(body)
stable, _ := pick.PickText(&pick.Option{
&shtml,
"table",
&pick.Attr{
"class",
"step4_cours",
},
})
stable = delspace(stable)
kursvaluta = append(kursvaluta, Kurs{Namebank: "BINBANK",... | 0 |
4631068aeec27c7b0f80dedf50457dfa | 0368dd46ede23099534140ebe5a20be1 | 有弹窗广告时,阻止滑动屏幕事件 | public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
if (rl_ad.getVisibility() == View.VISIBLE) {
return true;
}
}
return super.dispatchKeyEvent(event);
} | 0 |
bb2431f31ee649f59d1cdfd019f067b0 | ef554f7b2653aa8a3d34023547915aec | Enforces the need of a separator when more than one element | return (
<>
{Children.toArray(children)
.filter(isRenderable)
.map((child, i, arr) => (
<Fragment key={child.key || `sep${i}`}>
{i > 0 && (i === arr.length - 1 ? lastSeparator : separator)}
{child}
</Fragment>
))}
</>
);
} | 1 |
e1c9817fb3232c317290e2dc31cb5b54 | 9bf0817422de7713bb2c80041226cfdf | Immediately update and block until we get the result. | class BlockShellyLight(ShellyBlockEntity, LightEntity):
def _update_callback(self) -> None:
self.control_result = None
super()._update_callback() | 0 |
a26c7dfdc847b6775a76c0d6ff434c53 | 0e5d276fda580ba8f2fc429373302f49 | Deletes associated lambda resources created by Synthetics if set to True. Default is False | param: AWSLogsIntegrationApiDeleteAWSLambdaARNRequest,
options?: Configuration
): Promise<any> {
const requestContextPromise = this.requestFactory.deleteAWSLambdaARN(
param.body,
options
);
return requestContextPromise.then((requestContext) => {
return this.configuration.httpApi
... | 0 |
f2617a98709feaac01285a91d332f421 | d9c932d29cb775187beebc364d140c50 | 判断LOTNO是否存在 | namespace ServiceCenter.MES.Service.WIP
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class LotCreateService : ILotCreateContract, ILotCreateCheck, ILotCreate, ILotNumberGenerate
MethodReturnResult ILotCreateCheck.Check(CreateParameter p)
{
... | 0 |
37ad914f3f4e0f38477923f5faa7e308 | ca5a625e46b67d7e66b1d3c84a48dd62 | Calculate WP (winning percentage) with exclusion | def calculate_rate(rate, win, win_probability):
win_count = 1 if win else 0
return rate + K * (win_count - win_probability) | 0 |
0a597432fa88a8fbf2dd24400f4d557a | 739fde2cdd760dc176294963e7c4851b | A function that returns the dataframe for the stock and
the one for the dividends | def GetData():
df_300 = pd.read_csv("df_300_hist.csv")
df_nas = pd.read_csv("df_nas_hist.csv")
length1 = len(df_300)
length2 = len(df_nas)
df_300 = df_300.loc[0:length1, ["date", "close"]]
df_nas = df_nas.loc[0:length2, ["date", "close"]]
df_300.columns = ["Date", "300etf"]
df_300["Date"... | 0 |
d0d6db0a455e63975ed01123584c0152 | c24cac53d80e999ad69592dc683cbd51 | Method to be overriden in the sub classes | class BaseReport():
def handle(self):
pass | 1 |
e16a4487fb0d91d10c21046aadbbfcc4 | afa3c605f1858edfbf7304fa161c94ee | \*\name LEDInit.
\*\fun Configures LED GPIO.
\*\param Pin
\*\return none | GPIO_IF_LedConfigure(unsigned char ucPins)
{
if(ucPins & LED1)
{
GPIO_IF_GetPortNPin(GPIO_LED1,
&g_uiLED1Port,
&g_ucLED1Pin);
}
if(ucPins & LED2)
{
GPIO_IF_GetPortNPin(GPIO_LED2,
&g_uiLED2Port,
&g_ucLED2Pin);
}
if(... | 1 |
8df163e9e8fc2f81e9c393808f7a3256 | ac6f2c51f754fe91cd4c806b9962068f | Gets key prefix to byte[]. | {
byte[] key = OpCrypt.Key;
byte[] prefix = BitConverter.GetBytes(user);
for(int i = 0; i < 8; i++)
key[i] ^= prefix[i];
return key;
} | 0 |
eef9caaf25aa6675c371fbe90401b74a | 3374cb32c7297d5ca8c00944cd66b73d | 计算所有信号m个bar内的涨跌幅 | def cal_ma_all(codes, tb_head, nMa):
for code in codes:
tb_name = tb_head + code
df = get_dataframe(tb_name)
dic = cal_ma(df, nMa)
if df is None or len(df)<5 or dic is None:
print(code + ' is none')
continue
try:
con = db.connect(db_host, d... | 0 |
f2b329979434f5874c47843a8f2f31ce | 3d3d455370a66daf541f438bb6858e32 | #####################################################################################################
Show the output for the current panel mode in the lower line | void ShowMode(uint8_t key, uint8_t i) {
if (i == 0xff) {
ssd1306_SetCursor(88, 23);
switch (key) {
case STABLE:
ssd1306_WriteString("STABLE", Font_6x8, White);
break;
case MOVE:
ssd1306_WriteString("MOVE ", Font_6x8, White);
break;
case ROUND:
ssd1306_WriteString("ROUND ", Font_6x8, White);
... | 1 |
121a3adb8c2a0ed377e66bc3d57ffa37 | 70802f42feff5d24fd1987097f0c7186 | 根据id保存数据 | Integer save(Data data); | 0 |
15b1cbeddcd47bfe21744287e8814b60 | 6ee8bef8a4fc5b270c88cf2fa8b83712 | Get the number of seconds since last login. | public function getLastLogin(): int; | 0 |
1fe1a3a14484025f643473a325cab1cc | c031f8980351f0f2c8f675a9ca4cca58 | Simple Indepdennt noise model (i.i.d)
the only parameter is the noise variance | class IndependentNoise(NoiseModel):
def __init__(self):
NoiseModel.__init__(self)
self.n_param = 1
theta0 = 0 | 1 |
3d9e5751f871d569d4b064d644bfbdb5 | 5122dac2cec8d0d7300602bf306093b0 | 通过条件查询纪录的第一条数据
1. 获取默认第一条纪录
$model::findFirst();
2. 获取主键为 123 的纪录
$model::findFirst(123);
3. 按传入的条件查询
$model::findFirst("age > 20 and email == ''");
4. 按传入的条件查询, 并过滤传入的查询条件
$binds = [':created_at' => '2015-10-27 07:16:16'];
$model::findFirst("created_at < :created_at", $binds); | class X2Basic extends BaseModel
public static function findFirst($parameters = null)
{
return parent::findFirst($parameters);
} | 1 |
bc59657bf7e976ccbb59e11b6a55e5a3 | 048c3bffcfa6a4b9355589f535f90a3e | Decodes additional information about the authorization status of a request from an encoded message returned in response to an AWS request.
For example, if a user is not authorized to perform an action that he or she has requested, the request returns a Client.UnauthorizedOperation response (an HTTP 403 response). Some ... | {
options = options == null?new AsyncOptions():options;
var invokeOptions = new InvokeOptions();
invokeOptions.RequestMarshaller = DecodeAuthorizationMessageRequestMarshaller.Instance;
invokeOptions.ResponseUnmarshaller = DecodeAuthorizationMessageResponseUnmarsha... | 1 |
2988f4cb2208c34fe543aa7f9e991fef | 98bb0f77e3615e104d6494fd494f6424 | Checks Leaf Status (Anything in the second half) | class SortedStacklessBST
bool IsLeafBalance()
{
int lvl = 0, leaflvl = 0;
return IsLeafBalance(root, lvl, leaflvl);
} | 0 |
847e9470429e8e684665502899cf45f8 | 47d4f414003583953400739608e7e099 | 根据tsId查询分支事务集合 | public List<S1> getS1ListBySsiId(String ssiId); | 0 |
fe83934ca17911335e0f8f01c913f263 | 047261be804565dde356697fbe8cdac4 | Check to see if AvailabilityZoneFilter property is set | namespace Amazon.EC2.Model
public partial class FleetCapacityReservation
internal bool IsSetAvailabilityZone()
{
return this._availabilityZone != null;
} | 0 |
c391354a1d1a1c5b4d0ca1bd8196a71f | 5dd6bf5031c543293fdd2c7fecced02f | Return True if vertices of the edges match, False otherwise. | class Edge:
def __eq__(self, other):
return self.startVertex == other.startVertex and self.endVertex == other.endVertex | 1 |
3d1820251b31ab2f5cacff5b46745d88 | 47ab1dfadd133bba79e39d53803fae13 | Sets the additional fault information. | public class DSResponse extends DSEnvelope
public void setFault(DSFault fault) {
XmlHelper header = new XmlHelper(getHeader());
header.getAsHelper("DSFault").removeAll();
if (fault == null) {
setStatus(DSStatus.Successful());
return;
}
XmlHelper dsfaultNode = header.getAsHelper("DSFault");
DSFault nex... | 1 |
502ebe7eb4a9d33472241c696f56a74e | d50d356e26fa5bfc4248034e9f8d81ac | 5.根据qq号获取stu_id | @Service
public class StudentService
public List<Student> queryStudentByQq(String qq) {
return studentDao.queryStudentByQq(qq);
} | 1 |
2dcf3b944d033972abb5412dfa7e8c46 | 2035d1c6d18f2f05b284fe91d060ab61 | Sets the shipping phone of this shopping order. | public class GuestUserDataBean extends UltaBean{
public void setStrphoneShipping(String strphoneShipping) {
this.strphoneShipping = strphoneShipping;
} | 1 |
61b0806b9040952135a52c3e3ca86dec | 138f109926e4b3f63fe80d2cdbdcb2e8 | 根据收文ID删除收文信息 | @Service
public class CtBuReceiptInfoServiceImpl implements ICtBuReceiptInfoService
@Override
public int deleteCtBuReceiptInfoById(String id)
{
return ctBuReceiptInfoMapper.deleteCtBuReceiptInfoById(id);
} | 1 |
94aab66bda48398c5606460882be6d58 | da4584485080c5a05e3d1ad0ee3f21b5 | 종목별 전체 경로 리턴 (리스트) | class KiwoomAPI(QObject):
def GetGlobalOptionCodelist(self, *args):
return self.ocx.dynamicCall("GetGlobalFutureCodelist(str)", *args) | 0 |
5b962a26a611f7c73405a88521d437fa | 0da8fe7da01792d5623bd19588be92ca | 验证码校验控制器 | public virtual IActionResult CheckCode(PasswordModel model)
{
if (model == null)
return RedirectToAction("Index");
var dto = GetPasswordApplicationService()
.CheckCode(model.Name, model.ValidateValue, (CodeType) model.ValidateType);
if ... | 1 |
4d466e5ff16b3939ccbcf9b4396b95fd | 95ef74bf4de897a0e76f5baaf043bd52 | Returns a value indicating if the existing project can be unloaded. | {
if (BeforeUnloadProject != null)
{
var e = new LoadProjectEventArgs(SolutionEventType.BeforeUnloadProject)
{
Hierarchy = pRealHierarchy,
PlaceHolder = pStubHierarchy
};
BeforeUnloadProject(thi... | 0 |
2d0a7ed2360654105796e76bfdc12ea6 | f9f3b88522bdb2a8b05b33fab245062b | Varies a webpack configuration for each component | return {
template: `./src/html/${name}.html`,
filename: `html/${name}.html`,
inject: true,
hash: false,
chunks: [name]
}
} | 1 |
b04fadd4d471d40c7708a43d8d08c9a6 | bf9fde820e02385106f565d69cb83bdb | GET: Gred | {
if (TempData["gagalHapus"] != null)
{
ViewBag.gagalHapus = TempData["gagalHapus"].ToString();
}
if (TempData["berhasilHapus"] != null)
{
ViewBag.berhasilHapus = TempData["berhasilHapus"].ToString();
}
... | 1 |
acd3c0cb4c0b56a9964ea9006206208b | 2bb275d28f6e76d0a11c2db73ab80021 | 出错返回False,与ScrollLines (1)相同,返回True是否滚动窗口,False如果窗口已经在底部,则什么也不做 | self.currentPosX += self.currentWidth - padding
self.currentPosY += 0
if self.currentPosX + padding >= self.m_nSamples:
self.currentPosX = 0
self.currentPosY += self.currentHeight - padding
if self.currentPosY + padding >= self.m_nLines:
self.currentPo... | 1 |
11025fa25e85c0a9ea1e8f7fb4a73738 | 7f9b0559f8db574be3480328689b8a50 | 获得一个要素的levelId | public class VersionDateInfo implements java.io.Serializable
public long getLevelId() {
return this.levelId;
} | 1 |
9127531b9bbcd7b1044276b2daa4c82a | 87a75ddf2f68fb0da047cfcce50f4ba1 | Tries to jump to the page with number 1. <p>
Has <b> OK </b> status if the method returns
<code>true</code> value. | public void goFirst() throws ContainerEmpty280Exception; | 0 |
3c7d488d91c9fecc564bf1d849aa1213 | c847203b217ba83d6563cf2b54caf0d2 | 初始化AdapterManager | public class DataProvider
private void initDBAdapter() {
localCacheManager.setDBAdapter(dbHelper);
syncManager.setDBAdapter(dbHelper);
hanlerManager.setDBAdapter(dbHelper);
} | 0 |
bb9d5fe57133525541e7d0bac457b98b | 950d3c42cd926f37d8c705bf593cf81d | ProductTest constructor. | {
$this->product = $product;
$this->rating = $rating;
$this->uniq = $uniq;
} | 0 |
cadab2bf689dc64ae43a4b495c534ab4 | 1129b1f25ce86b411360dd6043273a7a | a method that will create the shape and add it to a random location within the assigned html area | function addShape() {
var addOne = document.createElement('div');
addOne.className = 't1';
addOne.id = 't'+ countShape++;
shapeList.push(addOne.id);
document.getElementsByTagName('body')[0].appendChild(addOne);
} | 0 |
945a0a0f6528b5643ecde8a12e5e6554 | fe5b6312a5a9177fbf78c8838ddb9abb | Add listerners to dynamically inserted products | var buttons = document.getElementsByClassName("addtocart");
for (let i=0; i < buttons.length;i++){
buttons[i].addEventListener("Click",addToCart());
}
} | 0 |
ca13827418eb951bcc667813d3429da3 | d2ba1866e98a5f495e25e35c885683f7 | Creates a token from a full SHA256 hash. | def _generate_random_token():
return hashlib.sha256(os.urandom(1024)).hexdigest() | 1 |
8fc4a911dea4ec2a9ca42b916adf1437 | 36563475c2dc563243ac817c00cde9d6 | Disable comment counts in "Right Now" Dashboard widget as it can take a while to query the data. | function edit_at_a_glance(){ ?>
<style>
#dashboard_right_now li.comment-count { display: none; }
#dashboard_right_now li.panels-count { display: none; }
#dashboard_right_now li.ads-count { display: none; }
</style>
<?php } | 1 |
705d68b3a23ab3021c4234c0032d916f | 6359144cb6aa7359333bc2b7a9d7b649 | Specialized add method for sorted linked bag | namespace MetaNix.nars.memory public abstract class Bag<E, K> : IEnumerable<E> where E : Item<K>
protected abstract E addItem(E newItem); | 0 |
9367aaf883f1421072fa87d02897a10f | 2e7772e8b57b31f30cf230762ea844ba | Notifies that the challenge was successful | void notifySuccess(); | 1 |
c3171ef6f656f7fc92d97031d2707854 | 1ec8172d3412b34c949a462b120663f3 | Palauttaa suunta-parametrin mukaisen näkymän | switch (suunta) {
case YLOS:
y--;
break;
case ALAS:
y++;
break;
case OIKEA:
x++;
break;
case VASEN:
x--;
break;
}
} | 0 |
f20d29197ca750992a7f3882c4d1da38 | 377f46467e2e322138b6ed3da55c3e53 | Tests that shortened and expanded url is the same as original | url = "http://www.example.com/"
l = Link(url=url)
short_url = Link.shorten(l)
self.assertLess(len(short_url), len(url)) | 0 |
9785a9add4f605d7e573fd09db93cd66 | adef19969ae1dccda04dd2b1791b7326 | function to save and populate the dragged and changed supervisees | global name, address, date_of_birth, country, linkedIn, email, phone_number, skillsChecked, education, experience, boolList
name = self.nameTextEdit.text()
address = self.addressTextEdit.text()
date_of_birth = self.dateOfBirthDateEdit.date()
country = self.countryTextEdit.text()
... | 0 |
37bc0ac3ed437bbad96408e4421c6142 | 766517e69ff44c4bfe413bcddbc23672 | Puts the meter into local state - clears front-panel lockout. | class IT8500():
def control_set_local(self) -> None:
return self.instrument.send_integer_cmd(0x20, 0, 1) | 1 |
679161464e1f9eea3b72bd8e60a9352b | 144d7757610169bff40f2416629546ec | Check a meta registry has target prop assigned. | class PropertiesRegistry(object):
def get_target_prop(self, target_type, name):
if not self._initialized:
self._init_props()
if name in self.all_targets:
return self.all_targets[name]
else:
return self.target_types[target_type].get(name, None) | 1 |
17ca060ac311f3ac9f92881ad8f62b56 | 9eef535b4da21e8f72189d8ff64073c2 | Returns {@code true} if {@link IndexWriter} should pool readers even if {@link
DirectoryReader#open(IndexWriter)} has not been called. | public class MultiReader extends IndexReader implements Cloneable
@Deprecated
@Override
public boolean isOptimized() {
ensureOpen();
return false;
} | 0 |
9e5beb9acc7bbe09570309d6895e7fd1 | a27c1083009cd1a62c683f71945e4a32 | Tests that vocabulary displays are ignored appropriately.
Vocabulary displays should be ignored when they belong to node types which
were not migrated. | Vocabulary::create(['vid' => 'tags', 'name' => 'tags'])->save();
$taxonomy_term_field_name = $this->createEntityReferenceField('taxonomy_term', ['tags']);
$user_field_name = $this->createEntityReferenceField('user');
$node_field_name = $this->createEntityReferenceField('node', [$this->type]);
$date_... | 0 |
ac252d985c914720e47b30d098faf9f6 | 14190f91b38baa2b0cb3bb9b5fdbaf6a | Update a fax document. | class FaxApi
def put_fax_document(document_id, body, opts = {})
data, _status_code, _headers = put_fax_document_with_http_info(document_id, body, opts)
return data
end | 1 |
3c47b16d929b7c193e244e92fc47ed69 | f46806cb511c802f8a4d148936b22539 | Создает папку Screenshots, если не существует | class Crawler
def make_screenshot_dir(dir)
Dir.exist? dir or FileUtils.mkdir_p dir
end | 1 |
5910bf17f30fc8ec59749f3216b9c871 | 61e6a82d0b2b572911ebeb37415f2a90 | Add an AIPlayerController on the spawned player if he's an AI | void C_Viewport::AddAI(int i_iPlayerIndex, char *i_szPlayerName)
{
delete m_pclAIPlayer[i_iPlayerIndex];
POINT stStart;
m_pclMap->GetPlayerStartingPos(i_iPlayerIndex, &stStart);
m_pclAIPlayer[i_iPlayerIndex] = new C_Player(m_pclMap, m_pclBulletList, i_szPlayerName, i_iPlayerIndex, stStart.x, stStart.y, m_pclNetMsg,... | 1 |
eb8d7bc39ddf408f055a4e04d9fc756d | 8179f6b7b357f70f2eb63c3529e25d02 | ## https://github.com/rstudio/rstudio/issues/6692#issuecomment-880647623 | bbt_insert <- function(text) {
text <- paste(text, collapse = "\n")
if(rstudioapi::isAvailable()) {
rstudioapi::insertText(text = text)
} else {
cat(text)
}
invisible(text)
} | 1 |
aa024ca3f7210e9d96d67e7bc389455c | 634216f978bc27d8e45648093da3a0c5 | 余额不足操作 | $dataInfo = M('twx_bonus_account_info')->where("node_id='{$nodeId}'")->lock(true)->find();
if(!$dataInfo){
$this->error = '未找到有效数据';
return false;
}
if(($amt-$dataInfo['remain_amt']) > 0 ){
$this->error = '余额不足';
return false;
}
... | 1 |
2ce6eff0c6e8c85a95486611e1f74f47 | ce8472b5bfb30bfeff6c06398242128f | find the first item that is selected | var opt;
for ( var i = 0, len = sel.options.length; i < len; i++ ) {
opt = sel.options[i];
if ( opt.selected === true ) {
break;
}
}
return opt;
} | 1 |
b00b371688e6970fbc67b4d3ad4b5ff8 | 0472b9d6fd857be4562c923af0bcd6b0 | DTO -> Command | void convert() {
UnitOfMeasure measure = new UnitOfMeasure();
measure.setId(UOM_ID);
Ingredient ingredient = new Ingredient();
ingredient.setId(ID_VALUE);
ingredient.setRecipe(RECIPE);
ingredient.setDescription(DESCRIPTION);
ingredient.setAmount(AMOUNT);
... | 1 |
1a03d8de083ef243bcf920b63b501038 | 2ca373460681d2e6530282b17f7462e3 | Calculate forces and moments on each particle from the forces and moments in each bond and bond to particle connections | class mode_hpmc(_integrator):
def update_forces(self):
self.check_initialization();
ntypes = hoomd.context.current.system_definition.getParticleData().getNTypes();
type_names = [];
for i in range(0,ntypes):
type_names.append(hoomd.context.current.system_definition.getParticle... | 0 |
296f6a24970008be08a6890e0b8eaed2 | 1761b08933e59d6efd80c7b35308c629 | 清除登陆成功标识信息. | boolean clearLogin(HttpServletRequest request, HttpServletResponse response); | 1 |
50a7ccd10a0dec3c5a2c81e724dd2576 | 036614eee29e5b8cd94be02d4f1bb5dc | @brief Given a filename, get its directory.
Convert /foo/bar/baz to /foo/bar, and foo to "." | char *xdirname(const char *path) {
size_t i = xbaseoff(path);
while (i > 0 && path[i - 1] == '/') {
--i;
}
if (i > 0) {
return strndup(path, i);
} else if (path[i] == '/') {
return strdup("/");
} else {
return strdup(".");
}
} | 1 |
cb09c960047bc17fb389271d36681416 | a1f7d3e0c0dd8ce1ba710ec8e4cb8033 | variables needed for running the tests. | class UnitTest(unittest.TestCase):
def setUp(self):
self.host_list = ["host1", "host2"]
self.repo = "reponame"
self.repo2 = "reponame2"
self.repo3 = "reponame3"
self.els = Elasticsearch(self.host_list)
self.repo_dir = "/dir/path/dump2"
self.nodes_data = {"serverid... | 1 |
ba06b6252c0cc3b0078cff5c185d72c3 | 29b54ff0b94151be41cd16cbefec266c | ProductJsonParser constructor. | {
$parser = new Parser;
$this->request = $parser->parse( file_get_contents( 'requests/basic.json' ) );
} | 0 |
784b0249a6c7804ebee35674406bf59e | 16c463992acaa0a1ecb62b6bb56a2379 | Add a new buffer descriptor to update for the set. | if (this._rootBufferDirty && this._rootBuffer) {
this._rootBuffer.update(this._rootBlock!);
this._rootBufferDirty = false;
}
this._descriptorSet.update();
} | 0 |
3ab4863d2f6bd8ac6d56e89c5e158a56 | ef1ebb65d1504985537e8b61b25c2583 | 检索第一个匹配VGridControl | {
GridControl gridControl = null;
foreach (System.Windows.Forms.Control control in tabPage.Controls)
{
gridControl = control as GridControl;
if (gridControl != null)
{
break;
}
}
... | 0 |
80dd5b2b7c015083746ef86560f7e24d | 0d8f7b273d41b7c3f4418b3211cb27dd | 设置点击当前角色时响应函数 | local function roleButtonCallBack(sender, eventType)
if eventType == ccui.TouchEventType.ended then
self._kCRCurCareer = sender:getTag()
self:showCRCareerInfoByIndex(self._kCRCurCareer)
elseif eventType == ccui.TouchEventType.began then
AudioManager:getInstance()... | 1 |
0ea1f77debf80724e5f41fcf2ccc1013 | d1218f99eeb2fad4a726cea30f3a8d89 | iterate the whole to find out the pokemon which has been found
and record the sum. | int checkPits(int * pits, int size) {
int allpits = 0;
for (int i = 0; i < size; i++) {
allpits += pits[i];
}
return allpits;
} | 0 |
438d11b92a89a6e49df46d1b3f1704ce | aae5ebfbff1df8bbe299f3fd2e29011d | Returns the report data source name. | public class ReportDataSource
public String getUid() {
return uid;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.