query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
546cda1463eaa7dc57b84e025e980edd | 761bcd6853fe34f398bf146d02103dd9 | Returns the number of persons that arrived. | abstract class CalcBase implements CalcMovimenti
private int getNumArrivi(boolean bambino){
int quanti=0;
int quantiPeri=0;
int quantiPres=0;
Filtro filtro;
try {
filtro = this.getFiltroArriviPeri();
if (filtro!=null) {
quantiPeri = this.c... | 1 |
9ba3b137fe70f69cca21f79695722caa | 1306017add55836f30f3aac2b001f4ec | Weighted version of the closeness centrality | int i, current_value;
double cc = 0, ccn;
pam_result* temp_pair = malloc(sizeof(pam_result));
if(n==NULL || g==NULL){
printf("closenessCentrality: Invalid input.\n");
return -1;
}
if(g->num_of_nodes<=1){
return 0;
}
pam_resultSet* my_resultSet = pam_reachNodesN(g, n->id);
if(my_resultSet==NULL){
prin... | 0 |
6ae934b9153e67e19cd8d8a8ec3bd2a9 | f5ece06f8987a4a7cc5403e832b82db0 | list of tuples (mode, proportion)
reward will be a weighted sum of the mode rewards | class GreedyProtocol(Protocol):
def __init__(self, config, num_iterations=1):
super(GreedyProtocol, self).__init__(config)
self.unlimited_reward = True
self.num_iterations = num_iterations | 0 |
45bc1dc9f2b767235a8286605a2c95df | e7e56db4c2c94cdf748aeb3ea485a5c1 | 判断candidate是否为合法的微信号码 | public class FormatUtil
public static boolean isWeChat(String weChat) {
String reg = "^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$";
if (TextUtils.isEmpty(weChat))
return false;
else
return weChat.matches(reg);
} | 1 |
6acb012edd7f438602a5c79efe914d6c | 131daa130c6df201b82e32ac50261cd7 | 获取文档的最后修改人信息 | file_time = ''
if collection_name in cursor and 'last_modify_date_time' in cursor[collection_name]:
file_time = cursor[collection_name]['last_modify_date_time']
if not file_time.strip():
file_time = '无文书时间'
return file_time | 0 |
1c70c567f47b5fae56e72f5f8501d874 | df9daa0048edad59ca3a2b9b4a00f9ba | fills the lens selection qcombobox with options. | self.comboSelect.clear()
items = []
result = self.getItem()
for item in result:
items.append(item[0])
self.comboSelect.addItems(items) | 1 |
c3946cbf7c9f08cbd348463a5a2941f1 | c8631882c3787d3d2f42486c563a8e59 | Create a theorem with the given list of hypotheses and
proposition. | public class Logic
public void setTheorem(String theorem) throws TheoremParseException {
theoremString = theorem;
model.setTheorem(parse(theorem));
} | 0 |
f51c7ab0542df2c770af73086ec77fd6 | 0b9d1e989bde5fc9f3488bcd83243f26 | 计算搜索到的有效用户数 | if ($date['search']) {
$search = addslashes($date['search']);
$user = M('user as u')->join('left join gdstandard_group as g on u.gds_groupid = g.gds_groupid')->where("u.gds_username like '%$search%'")->select();
} else {
$user = M('user as u')->join('left join gdstandard_group as g on u.gds_groupid =... | 1 |
8030e87d883f33b5ab022bc5cf79df43 | 2cafb9972b1e7b82ce213d41cce22687 | Se déclenche quand la bille entre dans le collider du GameObject sortie | public class PlayWire : MonoBehaviour
void OnCollisionEnter(Collision collisionInfo)
{
Debug.Log("collide");
activateCollision = true;
} | 1 |
9a909a9761b9e0e7a57768683c0322b3 | 090e2d0e1c27cb83e557b3ea5a5f7f00 | Loads a config.json file and run a validation process. If the configurations
seem valid, returns a list with Configuration objects.
In the case of invalid config.json file, returns None. | def load_config_file(config_file): | 0 |
d13dccd77a21237701165b0d1fcb91d3 | 7729e572e128869bfced9a219c78794e | Gets query for [[Routes0]]. | {
return '
SELECT m.target, s.id as section_id, s.parent_id, st.locale, st.slug, a.id as app_id, a.prefix as app_prefix, a.name as app_name, a.slug as app_slug, (
SELECT COUNT(t.id) FROM text t
INNER JOIN text_translation tt ON tt.translatable_id = t.id
... | 1 |
19cc77d0c5e7e12eed6f1005c9a4074c | 4f7d04431b13af2355bdad62dfa4ab34 | Load the Eventtype with the specified name from the database. | {
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name");
EventType ev;
AvailableEvent.TryGetValue(name, out ev);
if (ev != null) return ev;
ev = new EventType(name);
AvailableEvent.Add(name, ev);
return ev;
... | 0 |
e5f5f6c2e4c4e5bee8285cdd9400158b | 5b8e88946228dfb5306384f5944e2a1d | Maps a function over the Err value of this instance, if present, asynchronously. | export class AsyncResult<T>
mapError(fn: (arg: unknown) => T): AsyncResult<T> {
return AsyncResult.wrap(this.get().then(Result.mapError(fn)));
} | 1 |
3280142a0f9b5dfdd1bbd0bfa0b34c87 | 768de4fb9fcd58bce98c9622aa1bc5c0 | Установка значения ячейки в зависимости от типа данных | namespace daan.ui.exportExcel
public partial class FrmExport : Form
private static void SetCellType(ICell cell, DataRow row, DataColumn column)
{
switch (column.DataType.ToString())
{
case "System.String":
cell.SetCellValue(row[column].ToString() ?... | 1 |
e6d14a66ecacde5f2f62dbdc2d735c6c | d789a041100c475b64a269a76abb04d3 | Set whether to update when trail emiiter are not visible. | class Thing:
#defines the allowed types of collisions
def setTrail(self, makeTrail):
self.trail.visible = makeTrail | 0 |
a3a2e3c790a9509e444e3114ff22250d | 0e338b57656ba8e9c3dbcf2d628f0727 | Se envía el resultado al cliente. | class Rpc_Server_1
protected function sendResult(Rpc_Result_1 $res)
{
$data = Rpc_1::encode($res);
header('Content-Type: octet/stream');
header('Content-Transfer-Encoding: binary');
header('Content-Length: '.strlen($data));
echo $data;
exit (0);
} | 1 |
7f626218fa52098d29366098cacaf352 | 185b8b1133fddd9ef75c46ec34c3a836 | ! Generalize the WKB-geometry using the BBOX of the original geometry | class BoundingBox(object):
def extend_by_esri_geometry(self, geometry):
if geometry:
new_box = self.extend_by_coordinates(
xmin=geometry.extent.XMin,
xmax=geometry.extent.XMax,
ymin=geometry.extent.YMin,
ymax=geometry.extent.YMax,
... | 0 |
3ae6d9984072017e855256a99c3197df | fd77f3d7b74a887d19928c7c15f2e3d0 | 二次電子放出に関する境界積分マトリクスを構築します。 | stirRatioOne = new double[StirNum.maxM()][StirNum.maxN()];
Matrix.fill(stirRatioOne, Double.NaN);
stirRatioTwo = new double[StirNum.maxM()][StirNum.maxN()];
Matrix.fill(stirRatioTwo, Double.NaN);
stirRatioOne[0][0] = Math.exp(StirNum.logSN(1, 1) - StirNum.logSN(0, 0));
f... | 0 |
7ef202b9e89adc9b874d147c5348877a | 587d49b13ad9c6a80c317a01da8dc962 | Sets the memory cache size based on a percentage of the max available VM memory. | namespace FFImageLoading.Cache
public class ImageCache<TValue> : IImageCache<TValue> where TValue: Java.Lang.Object, ISelfDisposingBitmapDrawable
private static int GetCacheSizeInPercent(float percent)
{
if (percent < 0.01f || percent > 0.8f)
throw new Exception("GetCacheSizeInPercent - percent must be bet... | 1 |
414658f89c70338a381865af3449b5ca | 761cd9351459deffb64daf6b2899ab44 | Выбор японского языка | time.sleep(1)
language_choose = self.driver.find_element(*Locators.LANGUAGE_CHOSER)
lang_hide = self.driver.find_element(*Locators.LANGUAGE_HIDE)
lang_hide.click()
lang = language_choose.find_elements(*Locators.LANGUAGE)[1]
lang.click()
lang = language_choose.find... | 0 |
734193620f46a13a9cf2a61d43527a24 | 661bc788bf8772c8f79c8ba1fb63173d | Initializes Doctrine. Called by getEntityManager. | class DataBase implements ImporterConnectorInterface
private function _initEntityManager()
{
$config = new Configuration();
$driverImpl = $config->newDefaultAnnotationDriver();
$config->setMetadataDriverImpl($driverImpl);
$proxiesPath = $this->_application->getCacheDir().DIRECTORY_SE... | 1 |
4ba7a740a6ea2757fd9e7a3051890d58 | a268e775a8ebd476fd63923ec2efe426 | Send a message, do not expect a response. | self.incr_logical_clock()
if (self.__fails('send')):
self._log.info("Dropped outgoing message due to lottery: %r", message)
return False
flags = None
if channel is not None:
flags = self.__get_channel_flags(channel)
impersonate = rest.get('impe... | 1 |
7332a952a52d7789d481147ced7049a4 | 601ecad38c01b13173f3bfcddfac092c | 前景、背景を合成したイメージを作成する | var bitmap_d = null;
var bitmap_s = null;
if (condition.dname.match(/^::composed/)) {
var sprite = getSpritePicture(condition.did);
if (sprite && sprite._pictureName === condition.dname && sprite[_].condition) {
bitmap_d = sprite.bitmap;
} else... | 1 |
825314a9bbc9ffd4b052630ce8727a63 | 47145f2a64d1d44ca1caec880658dbbb | 空白スライドを追加し画像を挿入 | export class ContantComponent implements OnInit
newSlideAdd() {
this.dataSet.push({ title: '', text: '' });
this.currentIndex = this.dataSet.length - 1
this.currentData = this.dataSet[this.currentIndex]
setTimeout(() => {
this.createImage()
}, 0);
} | 1 |
28c9f426a7b4388dadf580e3be924837 | 9cff1be1415b8c6a8d7b99b974bb7a6d | 取消注册默认的流接口实现类 | public void unRegister(Class<?> contractInterface); | 1 |
73684cb50e3319f08c084036f728b05b | cc5544c765b884e1df61857790bd76d3 | 返回时间的毫秒值 | public class TimeUtils
public long date2Milliseconds(Date time) {
return time.getTime();
} | 1 |
6e53de255b4660dce88301c334d33566 | f6f4d2079c3b67ae1e04ac328bc17efa | Sets the point values of all upgrades. | class access_points
function set_point_values() {
$this->point_levels = [
1 => 0,
2 => 10,
3 => 20,
4 => 50,
5 => 100,
6 => 200,
7 => 300,
8 => 500,
9 => 1000,
10 => 2000,
11 => 3000,
12 => 4000,
13 => 5000,
14 => 7500,
15 => 10000,
16 => 15000,
17 => 20000,... | 1 |
7689872ed8c686a6262860fe968752bd | 01e6b3260fc5ac3ff0008f072a4a619b | Функция возвращает список актуальных цен | $__args_types = Array('array');
$__args__ = Func_Get_Args(); Eval(FUNCTION_INIT);
$HTTP = RegRu_Build_HTTP($Settings);
$Query = Array('username'=>$Settings['Login'],'password'=>$Settings['Password'],'show_renew_data'=>1);
$Settings['PrefixAPI'] = SprintF("https://api.reg.ru/api/regru2/%s","domain/get_prices");
$R... | 1 |
14a993226c698137aba1fb00ce4e2ef7 | d5a823166963fcc8a7afa9fa8c8eb578 | Returns the number of rows in the *current page | namespace com.magicsoftware.unipaas.gui.low
internal abstract class GuiInteractiveBase
internal void onGetRowsInPage()
{
Control control = (Control)ControlsMap.getInstance().object2Widget(_obj2);
if (control != null)
{
ItemsManager itemsManager = GuiUtils.getItemsManager(... | 1 |
538103cae3c91d0b1fb694ce90ffa36f | 0f2d34c631a8d99da7ed23e984f19436 | 根据相关推荐获取还未爬取的url | def get_allurl(generate_allurl):
send_headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36",
"Connection":"keep-alive",
"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image... | 1 |
6592f8845bbdc0e9ddb0f06d7dbd1814 | f8ec0539defd35dba0a836a6489e1c01 | Kollar om användaren valt ett värde i editeringsdropdownen, returnera värdet annars falskt. | {
if (isset($_POST[$wert]))
{
return ValidateInput($_POST[$wert]);
}
else if (isset($_GET[$wert]))
{
return ValidateInput($_GET[$wert]);
}
else return $default;
} | 0 |
cf94e5488f197c5c4f0fa3f7daa13901 | f782a87d04ceffd1c272f5fe203345f8 | Returns an opaque id and the timestamp encoded. | func Id(topic []byte, index Index) ([]byte, error) {
indexBytes, err := index.MarshalBinary()
if err != nil {
return nil, err
}
i := &id{topic, indexBytes}
return i.MarshalBinary()
} | 0 |
7a29410eeca0c8839c7d7b90362e6945 | 359d9ac7efa46a64709252ba8db64c9c | tests a software update proposal can be marshaled and unmarshaled | func TestScrapeResponse(t *testing.T) {
log.Println("TestScrapeResponse()")
scrape := ScrapeResponse{
Action: 2,
TransID: 1,
FileStats: []ScrapeStats{ScrapeStats{1, 1, 0}, ScrapeStats{2, 2, 1}},
}
out, err := scrape.MarshalBinary()
if err != nil {
t.Fatalf("Failed to marshal ScrapeResponse to binary: ... | 0 |
3a20007fbd037f88119837a71b61a316 | b16e8ff2724ae6715f804cab174ed4d1 | Gets the first item from the queue. | {
T result = default(T);
lock (((ICollection)this._DataQueue).SyncRoot)
{
bool flag = this._DataQueue.TryPeek(out result);
}
return result;
} | 0 |
942da4c0312401047ad9e1bf0c9c386d | 10b68a46eeba28a54d4d1ef119659c04 | Donchian Channel Percentage Band (DC)
https://www.investopedia.com/terms/d/donchianchannels.asp | {
var mdm = new double[prices.Length];
mdm[0] = 0d;
for (var i = 1; i < prices.Length; ++i)
{
var plusDm = candles[i].High - candles[i - 1].High;
var minusDm = candles[i - 1].Low - candles[i].Low;
if (plusDm < 0)
... | 0 |
53e3c5a6b860712831f1e8406cdcd498 | f319044a95b38eb01360b1f68b831c54 | @brief API Handle the master BTF(data byte trasmission finish) interrupt. this intterrupt occure when data and shift
registers are empty. | void __asm TBEIntHandler( register __a1 TBEDATA *TD)
{
TransmitByte(TD);
TD->td_SyncData->sd_Custom->intreq = INTF_TBE;
} | 1 |
732000d8e8f5357e988cd455dd49b7dc | 2fd2cbda8de53b5dafd8afcfb06c6086 | 打开极速 | handleQuick() {
wx.redirectTo({
url: '/pages/login/loginQuick/loginQuick',
})
} | 1 |
213d3bfc5b25b9093c17782f67859cdb | 1cd3990a7e0bb118814fe4a44ff2144f | Initialize the files to save calibration data | MODE_PRESENCE = config.device_calibration_config['presence_mode']
MODE_REACH = config.device_calibration_config['reach_mode']
VERSION = config.device_calibration_config['version']
calibration_data = test_data.state['cal_data']
if mode != 'reliability':
prese... | 0 |
6bb3a9287b28940c87fe984b2f3d1bfc | 5672ddac166080e9e902e58dc7ddd1e7 | Create an OCD BallotMeasureContest object derived from a ScrapedProposition.
Return a BallotMeasureContest object. | class Parser(object):
def _parse_choice(self, contest_el, contest):
try:
party = contest_el.attrib['party']
except KeyError:
party = None
choice = Choice(
contest=contest,
key=contest_el.attrib['key'],
text=contest_el.attrib['text'],
... | 0 |
30367ad5c6ef80673d9a9641012f6610 | c09e74faaba651441740aafe46ffef67 | Resets the plot parameters to matplotlib default values
Adapted from:
https://stackoverflow.com/questions/26413185/how-to-recover-matplotlib-defaults-after-setting-stylesheet | font = {"family": "sans-serif", "weight": "bold", "size": 10}
plt.rc("font", **font)
plt.rcParams["xtick.major.pad"] = 5
plt.rcParams["ytick.major.pad"] = 5
plt.rcParams["axes.linewidth"] = 2
plt.rcParams["xtick.major.size"] = 7
plt.rcParams["xtick.major.width"] = 2
plt.rcParams["ytick.m... | 0 |
1c89b9315c4a0af0fa232485461547f5 | fe56218e22265f6beda2ea88c5bf4090 | 企业信息 tips是否主动弹出过 | public class SharePreferencesUtils
public static boolean isAlreadyShowedFreeFlowTip(Context context) {
if(true){
return false;
}
SharedPreferences preferences = PreferenceManager
.getDefaultSharedPreferences(context);
return preferences.getBoolean("isShowedFreeFlowTip", false);
} | 0 |
1564aff02ebc72c535a984739bd8d557 | 214ee81249439f71940230838c2fb343 | 내판매정보 가져오기 | class ProductCommonDAO extends CommonDAO
function selectJCOrderInfo($conn, $param) {
if ($this->connectionCheck($conn) === false) {
return false;
}
$param = $this->parameterEscape($conn, $param);
$query = "\n SELECT sell_site";
$query .= "\n ,repre_name";
... | 1 |
ecc50196887af17768e0ac6ef2d310b8 | ac5fe9fa63d80eee7d4b3254538359a4 | 获取所有的卖家及旗下的全部商品列表 | $list = Seller::orderBy('seller.id', 'DESC')
->where('seller.type', 3);
switch ($proxy->level) {
case '2':
$list->where('seller.first_level', $proxy->pid)
->where('seller.second_level', $proxy->id);
break;
case '3':
... | 0 |
e81d39d756f20ac8765bea66b070fdc6 | 0cc27f24c7f3b79be2e8000ce7ebb454 | Tests reading and deserialization of content from a JSON string. | public class JsonSerializerTests
@Test
public void testDeserializeFromString() throws IOException {
InputStream stream = JsonSerializerTests.class.getClassLoader().getResourceAsStream("result_detail.json");
Assert.assertNotNull(stream);
JsonSerializer serializer = new JsonSerializer();
... | 1 |
30a8d935a3d113290c3dfbd7ebc62015 | 4845e4fb7dc8bcd031214146e98af0cf | Coordinates the drawing of a number of water tanks | set_tower()
for tx in [-TowerSpace, 0, TowerSpace]:
t3 = turtle.Turtle('tower')
t3.penup()
t3.goto(tx, HORIZON) | 0 |
0df9d53ad127275672ac1053ccb4f35a | 36916e40da4bdb3500fae8c67033cf77 | Hides the part the user selected of the Ontology. This function is called as a slot. | {
setType(type);
switch (type) {
case CLASS_NAME:
ui->TypeWidget->hide();
ui->exampleWidget->hide();
break;
case ICO:
ui->TypeWidget->hide();
ui->exampleWidget->hide();
break;
case PROPERTIES:
ui->TypeWidget->hide();
break;
case PSE... | 1 |
e5b2b5faf7b9a850ca6f9e7cb14f4d7b | 04f0d74373dabfd87b93d910b3727e7f | Read all settings from non-volatile memory. | class OL756(Server32):
def read_ol756_flash_settings(self):
ret = self.lib.ReadOL756FlashSettings()
self._check(ret, (_Error.SYSTEM_BUSY, _Error.SYSTEM_NOT_CONNECTED, _Error.FLASH_READ_ERROR)) | 1 |
2d787788c1a3ec09dbebc6937e5959db | a94a7f74c2d79b76a289d62c521790eb | ワーニングメッセージの設定 | class ResponseHandler extends Handler
private function sendWarnging(){
if($this->warning != null && count($this->warning) > 0){
$this->setVar(ResponseHandler::KEY_WARNING, $this->warning);
}
} | 1 |
fee80c94cb09fcfbb4b7a0d24b82439a | bcd26c1aad66f2dae0a3a9bd01238030 | Helper method that balances LL imbalance. | class UnrolledLinkedList(object):
def balance(self, prev, cur):
while cur is not None:
next_node = cur.next
if next_node is None and len(cur) == 0:
if self.length == 0:
self._head = None
else:
prev.next = None
... | 1 |
5a16df1b2970037b35f4647da5894da1 | 97d7db2622f3880e99ee947bd0318f05 | Add submenu to Tools menu | add_submenu_page( 'options-general.php', 'Google Integration Toolkit',
'Google Integration Toolkit', 'manage_options', __FILE__, array( $this, 'options_panel' ) );
} | 0 |
c8d2ca6a3f2765eb95ed8918eb7a99c7 | f343797d9260d2e8b2cbba0e13ab11ab | Generate a random base64 string from urandom. | def generate_secret_key(length=35):
return b2a_base64(os.urandom(length)).strip() | 1 |
ab3dd9ee4d88a7ac2c16f61e8fd369af | 9e53ba901fc276f070f1dfc3b33f2bfa | Hide main window | class WRecorder(object):
def hideMainApplication(self):
self.parent.minimizeWindow() | 1 |
693d7f6b3fbd40076d4d06f4b65b09b6 | f62a1e22df00b4d9e148ce7ba3599d8c | 根据实训发布id和账号查询有效的权限 | String queryByAuthId(HttpServletRequest request); | 0 |
8aa5e742d73871086ba42342b6a52668 | 7b3f99483464788f063287354fa3f0b0 | 根据发票ID 查询相关的订单 | @Service
public class LogisticsInvoicesServiceImpl implements LogisticsInvoicesService
public List<Invoices> getByOrderProductId(Integer opId){
return invoicesDao.getByOrderProductId(opId);
} | 0 |
4bd7f93ea037e774b9bfda42d8ff92f0 | 135d4978996bc3eb462b6706a103a52e | Removes the lookup results that were persisted under this selected object IDs | public class HarmonySearchManager extends AbstractManager<HarmonySearchListener> implements MappingListener
public void mappingRemoved(Integer mappingID)
{ runQuery(HarmonyConsts.LEFT, leftQuery); runQuery(HarmonyConsts.RIGHT, rightQuery); } | 0 |
0d9ab6d752bba8e846a89da1ce69e5da | 4f3f8b3f13ae69bf88b0680ed9fdd76b | Toggles bounding boxes on the currently focused image | export class SaveImageComponent implements OnInit
toggleCheck(): void {
this.checked = !this.checked;
} | 0 |
46f4f5f1bf98913b86f7f453c5d90420 | 76dce65d519abb6686a308846ebbceee | 移除指定索引index处的数据 | if(index < 0 || index > size()){
throw new IndexOutOfBoundsException("remove index out of zhe data length");
}
return true;
} | 0 |
5eb07099c028f6e7cea13a51dcc1ba47 | 1b16889b538e2ec8ad39fb0742ae2890 | Process the query string and exclude querystring named "p" | namespace Portal.Areas.Admin.Controllers
[Authorize]
public class BeCoreController : Controller
protected string UrlQueryExclude(string queryStr, string exclude)
{
if (string.IsNullOrEmpty(queryStr))
return "";
var qparams = HttpUtility.ParseQueryString(queryStr);... | 1 |
c8deb1e158f0ce1f793d44688bc76e90 | 5a858038df8df71dab17c766c3711744 | Asynchronously request save (update) of meta data
EVENT GENERATED: OperationSuccessfulEvent | namespace Microsoft.WindowsAzure.MediaServices.Client
Task<IOperation> SendUpdateOperationAsync(); | 1 |
dfb12b9d752d621748d146a6ed03de8a | 6f92ff3f85a270d3b3407a2e4f776f2f | 演示枚举类型的遍历 | {
Console.WriteLine("Information about {0}",e.GetType().Name);
Console.WriteLine("Underlying storage type: {0}",Enum.GetUnderlyingType(e.GetType()));
Array enumData = Enum.GetValues(e.GetType());
Console.WriteLine("Thisenum has {0} members.",enumData.Length);
... | 1 |
1cd054589f8b886a875c97afe94ca4f6 | 26604e3051f25b8e14c499c9a0a35815 | Sets the default event queue size that will be used for creating {@link EventStream}. | void setDefaultSendEventQueueParameters(ILLBEventQueueParameters params); | 1 |
a768f7744ae3e62c21b2f4991197bd63 | c7d738197aa4d38ce732ed5c5ec55575 | Performs on the fly swap for custom head links in structure files | ni = 0
for i in sl:
if i.is_data==0:
if ord(i.bytes[0]) == 0xe2:
shell_insert_bytes(sl, ni, '\x49', i.label)
shell_replace_bytes(sl, ni+1, '\x75\x00', -1, i.jmp_label)
fix_jmp(sl, ni+1)
if ord(i.bytes[0]) == 0xe3:
shell_insert_bytes(sl, ni, '\x85\xc9', i.label)
shell_replace_bytes(sl,... | 0 |
1447e7956980c1b510472f668b272846 | cf655f16dba45b26f401a62514c14718 | Performs necessary clean up and destroys root window. | static void deinit() {
window_destroy(mainWindow);
} | 1 |
903e6520b6c2b8f6b3448ee49ab8f118 | 99717e6eb0acfca9404dc56ec010d85b | Whether the stone at the position is imreversible | try {
getStoneAt(coordinate);
}catch(RuntimeException e) {
return true;
}
return false;
} | 0 |
43f904d3fd845be3ce865d71d48028cd | 0a3fd8590db4c9df9288b748bbbc92e6 | 버튼을 누르면 비디오촬영 화면 Camera 앱 실행 | public class MainActivity extends AppCompatActivity
@OnClick(R.id.btn_video)
public void video() {
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
startActivityForResu... | 1 |
f704e74802c387060edf9552b655fb9f | 3464dcaa2f469b17a0794cc42980cec8 | 新增抄表记录 | SqlSession session = DBTools.getSession();
MeterMapper mapper = session.getMapper(MeterMapper.class);
try {
mapper.insertMeter(params);
session.commit();
} catch (Exception e) {
e.printStackTrace();
session.rollback();
return 40... | 1 |
9008228e4b1f726887c9ec60da83ed97 | c4dee7162a77a89c1b5e3482edfbcf4d | 라디오 박스 설정 함수 | function changeRadio(radio_display,buttonId,paraId,nameId,imgId){
var radio = radio_display;
for (let num = 0; num < 7; num++){
if(radioArticleId[num] != radio){
document.getElementById(radioArticleId[num]).style.display = "none";
document.getElementById(radioArticleId[num]).style.transiti... | 1 |
e8d0f904bd70f64fde62cb19844dd6b3 | e0b4f99a583df847ad8b7208b3c1b3f9 | 判断用户是否为学生 | def isStudent(user):
if not isinstance(user, User):
return None
return user.role == 'student' | 1 |
084f917274fc24dcaaab036613b9d049 | 8b6dee18ae0bcf1f38cb6e7ce240e7a8 | Wrapper for line chart used to build all-calls chart on overview page and all charts on public page | function buildLineChart (element) {
var url = $(element).attr('data-url');
if (url !== undefined) {
var baseOptions = {
bindto: element,
size: { height: 300 },
legend: { show: false },
data: {
mimeType: 'json',
},
co... | 1 |
dc81076ebc68bf776528b17475c7b7b5 | c4ec6030ab065943b16ba68819c1c19e | 使能或失能USART的DMA接口 | void USART_DMAEnable(USART_t* USART)
{
USART->CR3 |= DMAR_MASK;
USART->CR3 |= DMAT_MASK;
USART->SR &= (~TC_MASK);
USART_voidTCIntStatus(USART,TC_INT_ENABLE);
} | 1 |
4168523a952c46bf4b36a48327fddf5f | 73a09796012ec90523f16f88d5460a06 | 检查作业单下箱的终止状态, 如果全部箱均为终止状态, 则不从仓码同步数据至本地 | boolean isAllContainerTerminated = true;
List<DcsContainerInfoEntity> contInfoEntityList = null;
if(logisticsOrderEntity.getContainerInfos() != null && logisticsOrderEntity.getContainerInfos().size() > 0) {
contInfoEntityList = logisticsOrderEntity.getContainerInfos();
} else {
contInfoEntityList = dcsCon... | 1 |
bb41c278324c853c2e2021c6794b3c2b | 8fced2a6033d4ffc7c9e608a6632406f | 获取途径编码组ID的设定 | {
MRoute routeModel =
EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(
Utils.GetQueryStringValue("routeid").Length > 0
? Utils.GetQueryStringValue("routeid")
: Utils.GetFormValue("routeid"));
... | 0 |
bc971d3b44184e28812bdc2a67a9d879 | de0a901f5743d1e2d0270cf29fb2b9df | Ask the BTMetaInfo object, get the name from the bencoded data in the .torrent file | try {
libtorrent::torrent_handle h = FindTorrentHandle(id);
has_metadata = h.has_metadata();
} catch (std::exception &e) {
log(widenPtoC(e.what()));
} catch (...) {
log(L"exception");
}
} | 0 |
cc015fcfec323d2b9b4501a4f159e330 | b69098c4031b7f33bf0386e71213789f | ueberprueft, ob die uebergebene Artikelnummer schon in einer Orderline
existiert, damit ein Artikel nicht mehrfach einzeln bestellt wird. | {
for (int i=0;i<lines.size();i++)
{
if ( lines.get(i).get(OrderLines.GOODS_ID).equals(id) )
{
return i;
}
}
return -1;
} | 1 |
73fcc95621d67c5e4952b41681a7f7a6 | 4621e7bd862862489d75fd31f120486c | calculate the threshold to show lane lines based on the histogram | CImg<int> image = blurImg;
CImg<int> hist = image.histogram(256, 0, 255);
int size = blurImg.size();
cimg_forX(hist, i) {
threshold += i*hist(i);
}
threshold /= size;
int threshold_new;
while (true) {
int t1 = 0, t2 = 0;
int num1 = 0, num2 = 0;
cimg_forX(hist, i) {
if (i <= threshold) {
t1 += i *... | 1 |
1cdfde9775cf79b7f699206b62854418 | 1e4b2f0766937cb9399e9a5d1f69ecfe | Formats a string containing the fully-qualified path to represent a zone
resource. | export class CertificateAuthorityServiceClient
certificatePath(
project: string,
location: string,
certificateAuthority: string,
certificate: string
) {
return this.pathTemplates.certificatePathTemplate.render({
project: project,
location: location,
certificate_authority: certifi... | 0 |
37494fbd289f987aa8802301ea556856 | 5b8e189b5cdc91dbb2fb3a6994e7a988 | Generates the magic packet data with 6x 0xFF and 16x the MAC address | byte[] bytes = new byte[6 + 16 * macBytes.length];
for (int i = 0; i < 6; i++) {
bytes[i] = (byte) 0xff;
}
for (int i = 6; i < bytes.length; i += macBytes.length) {
System.arraycopy(macBytes, 0, bytes, i, macBytes.length);
}
return bytes;
} | 1 |
efe64cdec4bfe46fdb491574fb5f9fd6 | 9e6b95a69137a768ca38c5671c231fc1 | Start following a friend | namespace Yupi.Emulator.Messages.Handlers
internal partial class MessageHandler
internal void FollowBuddy()
{
uint userId = Request.GetUInteger();
GameClient clientByUserId = Yupi.GetGame().GetClientManager().GetClientByUserId(userId);
if (clientByUserId == null || client... | 1 |
a55afeb9e220bcec397f618718ab50d5 | 8ae26e0b39b0571423351e3d7e1616cc | Tests serialization for generic record. | if (Utils.isAvro14()) {
Assert.assertEquals(serialize(record1, COMPLICATE_SCHEMA), serialize(record2, COMPLICATE_SCHEMA));
} else {
Assert.assertEquals(record1, record2);
}
} | 1 |
0f84388e0c71b74ebe40e45eb6322f98 | d2262219971b542ec34d7d668831dba8 | Retourne un nouveau Polynome où les termes adjacents de degrés identiques sont combinés | @Entity
public class Polynomial
private void combineLike() {
for(int i = 0; i < termList.size(); i++) {
Term temp = termList.get(i);
for(int j = 0; j < termList.size(); j++) {
Term nuevo = termList.get(j);
if(temp.getEx() == nuevo.getEx() && i != j) {
temp.setCo(temp.getCo() + nuevo.getCo());
... | 0 |
cb8e488dbd3af54c5eea954a0361af5b | c11b54795a9bc9f9533c76bbe632c705 | 显示销售机会来源修改页面 | @Controller
@RequestMapping("sale_chance")
public class SaleChanceController extends BaseController
@RequestMapping("addOrUpdateSaleChancePage")
public String addOrUpdateSaleChancePage(Integer id, Model model){
if (null != id){
SaleChance saleChance = saleChanceService.selectByPrimaryKey(id);
... | 1 |
20ce3f7649cf8c7ff8bc3959ef0ea1c1 | aa4a5274eb41afd37c7768122bc9188a | Prepares the image display for the click and hover event.
Removes the bloat of roi button and menu button that pyqtgraph
can display. Creates pen colors for click events. | class GWViewImageROI(GWViewImage):
def set_roi_color(self, roi=None, color=QCOLOR_DEF):
o = self.roi_active if roi is None else roi
if o is not None:
pen = o.scitem.pen() if hasattr(o.scitem, 'pen') else QPEN_DEF
pen.setColor(color)
pen.setCosmetic(True)
o... | 0 |
4e92274432eaa72aa84b55780efd7979 | e604c4ac8e4567d5396fab7596a44704 | Swaps out deleted enemy data with top enemy data and decrements enemy count | {
if (enemies.Count > 0)
{
enemies.RemoveAt(enemies.Count - 1);
}
} | 0 |
a15b99f02aa7843d144ad74d6e6b1706 | c2a5e9b2d1f6e7c9695b1c33a97c61ac | 在获得焦点时,保存旧的值到标签的自定义属性oldValue中 | class TagField extends Component
componentWillMount () {
const { value } = this.props.input
if (value) {
this.setState({ value })
}
} | 0 |
3d2256a9c321081244922e765b8478be | da5c6b94b7ca9b42f5fe8df5151f7bf1 | 获取玩家职业 | namespace GAME
public class GPlayerBase
public int GetOccupation()
{
return GetOccupation(nativePtr);
} | 1 |
ef40105e36b84314d6b4446ac4c0a596 | 2996eb4cc1dced3d48e29de7865f059b | parse string to get source and destination id | void parse_line_routes(char *buffer,int *source_id,int *dest_id)
{
sscanf( buffer, "%*[^;];%*d;%*[^;];%d;%*[^;];%d;%*[^;];%*d;%*s", source_id, dest_id );
} | 1 |
070dfcea2931f825ec2da505a18f5dd1 | 14ff5a11059a3a5245089107e7b1e6d7 | 获取摄像头名称接口 | public class NetworkApi
public static void getInstallDatCameraCamNameList(Activity activity, String projectId, String jobId, String jobCodeName, NetCall netCall) {
HashMap<String, String> params = new HashMap<>();
params.put("projId", projectId + "");
params.put("jobId", jobId);
params.p... | 1 |
8e62dc1737ea29849ba9672dac3d5898 | 2f90cb189ffc8f0684e3c7bb896a547c | https://developer.mozilla.org/en-US/docs/Web/CSS/:empty | if (node == null)
return undefined;
if (node.nodeType == Node.TEXT_NODE)
return (node.textContent.match(/\S/) == null);
if (node.nodeType == Node.ELEMENT_NODE) {
if (options.excludeTags != null) {
if (options.excludeTags.includes(node.tagName.toUpperCase()))
return false;
} else {
if ( [... | 1 |
3106eb56e1c11de8d63ff3ac14e20d51 | 280147f7623b8710fa2182d952933b0a | Remove productCompany | class AddProductCompanyAdminController extends BaseController
public function destroy($id)
{
} | 1 |
0078b6be9c8fdb5dc67eaae7968606c7 | 4337a0220eeba49424cea13cadf403e5 | 显示 北向资金板 -- 块历史资金流数据 | def display_nbfbk_data(bk_code):
bk_code_no = bk_code[-3:]
df = ts.get_nbfbk_hist_capital_flow(bk_code_no)
st.dataframe(df) | 1 |
283ffac1cd3dc641b69fc1fb49007c41 | 1bd7efbbc066f070f7a9634712df868a | The Rails built-in test parallelization doesn't make it easy to find the worker number.
So here we're using the number suffixed to the Postgres database name, because that is unique for each worker. | Sidekiq::Testing.disable! do
Sidekiq.configure_client do |config|
parallel_test_runner_number = ActiveRecord::Base.connection.current_database.split("-").last.to_i
config.redis = { db: parallel_test_runner_number }
end
Sidekiq::ScheduledSet.new.clear
yield
end
end | 1 |
0cfe63a990ffdf6ce76120651715d45c | dd5a381e9a5b88c1df857c7a1db05daa | 泛型和Instanceof用法Demo | public void testInstanceOf() {
int a = 20;
System.out.println(Double.valueOf("0.215d"));
System.out.println(Float.valueOf("0.22f"));
System.out.println(Double.valueOf("0.215"));
System.out.println(Float.valueOf("0.22"));
System.out.println(Double.valueOf("233"));
System.out.println(Float.valueOf("124"));... | 0 |
ac73355143ed6cac78200fae636f7898 | 1fc4da4a1f8151cf591f1ed2616af55e | Populate Services table with dummy data. | class DatabaseSeeder extends Seeder
public function run()
{
$services = [
array(
"name" => "Gown",
"washing_price" =>1000,
"ironing_price" => 1000,
"cleaning_price" =>2000,
"exp_washing_price" => 1200,
... | 1 |
22670f8cde0e8cb617cbb7fa67702643 | b2d13cc9d725ea760782878caf2da516 | @brief 设置QQ平台id | public class SharedPreferencesUtil extends BaseSharedPreferencesUtil
public void setQQUserId(String id)
{
userEditor.putString(Constants.QQUSERID, id);
userEditor.commit();
} | 1 |
1e4f215f3092bd25f0a47a0d2bd3fda9 | 19a95f0cf84b1a091ace6ef8ccfb954b | Make an enumerable of type enumerableType and fill it with items. | {
Debug.Assert(source != null, "source != null");
Debug.Assert(targetType != null, "targetType != null");
Type enumeratedType = source.Type.GetGenericArguments()[0];
Type listElementType = targetType.GetGenericArguments()[0];
Expression result = CallMa... | 0 |
c92163b8257555cc1ee95631e2a07f3a | 06b2ce846cbf45a88fe67c02135d3ae7 | check to make sure button is low after bouncing | if(P5->IFG & BIT1){
for(uint32_t i = 0; i < 10000; i++);
if(!(P5->IN & BIT1)){
button_flag = 1;
}
P5->IFG &= ~BIT1;
}
} | 1 |
e5afa78dc426a4707da2a596e6eff5ab | bdaf3779eeae4b07a29188e9745a274b | Tests finding all records | public void testFindAll()
{
Brand bean = new Brand(UUID.randomUUID().toString(), "Garmin",
"Innovative GPS technology across diverse markets, including aviation, marine, fitness, outdoor recreation, tracking and mobile apps.");
this.repository.save(bean);
bean = new Brand... | 1 |
599a4c6a89d7a6e023b60986d14bd028 | 237f570fe719fcf041ce426c49658705 | Get specific column in a jagged array | function _getColumn( arr, shape, j ) {
var result = [];
for ( i = 0; i < shape[0]; i++ ) {
result.push( _getItem( arr, i, j ) );
}
return result;
} | 1 |
d174373a3ed292c16f5d19f04c4cf5c8 | 5b1003332a1ba8ae9d6ab45d2b0fc880 | method to add cast to movie | List<Cast> addCastsToFilm(int filmId, int[] actorIds); | 1 |
c401842a35943c7f7c88de93cae6cd51 | 0bc1a46e4ca9cccbfcc1bc1a2fa6430a | Check if the Instance has any defined dependencies | {
return this._dependsOn != null && this._dependsOn.Count > 0;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.