query_id
string
corpus_id
string
query
string
code
string
label
int64
bda1bd2a760cf18fb5959ea507499084
87922c8a29b6eaf49faf13efabe8ed5d
获得当前页面客户端的IP地址,使用ServerVariables获取。
namespace Common.LogicObject public class PageCommon public string GetClientIP() { string result = Request.ServerVariables["REMOTE_ADDR"] ?? ""; if (null != Request.ServerVariables["HTTP_VIA"]) { string forwardIP = Request.ServerVariables["HTTP_X_FORWARDED...
1
012798a9a28983ce5a986b703eaf47b2
98c3a68d18607bb917b56c421acee998
设置主商品进项税额
@ApiModel(value="费用汇总") public class ImFeeFyhzReq extends PageQuery public void setSjjc(BigDecimal value) { this.sjjc = value; }
0
ecb425d8c10bccc7648a847d2df3edb2
e79bb24fe4aef2c043a083f91cb8550a
检查交叉引用 (检查 参考节点 是否在树模型中存在重复引用)
def cross_links(trace): click.echo(_validate.Validator.one_check(_validate.CrossLinks, trace))
1
bbbf155ab99355af21a5dbed7aff74a4
878e40e24f6ac04080742241867baccb
Determines whether this hand has no value (no pairs, three of a kind, etc. etc.
public class Hand public boolean isSoft() { return Blackjack.isSoft( _cards ); }
0
14e4dbb52c95d2a90b7ccf1c54e762fc
ed7b9afaf28ddb155101798c2f705a1c
Проверяет, есть ли зарегистрированные пользовательские модули
class StepsPreview extends CBitrixComponent protected function checkModules(): void { if (!Loader::includeModule('iblock')) { throw new Exception('Модуль "Инфоблоки" не установлен'); } }
0
1858d899c9348ff9ae1b3f21e5fffc1d
ec0fe1d3b959992c2bd2ead547fa38e2
Asserts that a mutex is locked by the calling thread.
void assertwaitok(void) { if (panicstr || db_active) return; splassert(IPL_NONE); SMR_ASSERT_NONCRITICAL(); #ifdef DIAGNOSTIC if (curcpu()->ci_mutex_level != 0) panic("assertwaitok: non-zero mutex count: %d", curcpu()->ci_mutex_level); #endif }
0
2473dc638eac3216707d89a1f91cc22e
8d1831b64cabcd396dbdce0c49c820b2
This function creates a single parameter and returns it
ParameterList * ybx_create_parameter(char *identifier) { ParameterList *p; p = ybx_malloc(sizeof(ParameterList)); p->name = identifier; p->next = NULL; return p; }
1
806605ef480f18907d2e4783da1ec2b7
4106f4034a23d97233c8091ea237ae03
自定义listview显示数据库条目
public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, OnPageChangeListener public void listadapter(final List<Data> data) { DataAdapter dataAdapter=new DataAdapter(MainActivity.this,R.layout.item_maintable,data); listView.setAdapter(dataA...
1
e4cb470ae6d3d2766b1072d7ee6d05d6
48daf7f2d32d64aaeb9f7f8d0a401cc6
Test the api can create a company.
class CompanyApiTestCase(APITestCase): def test_create_new_company(self): self.assertEqual(2, Company.objects.all().count()) data = {'name': 'company_3', 'description': 'test company_3'} url = reverse('companies-list') response = self.client_admin.post(url, data=data) self.assert...
1
cb93f33de75f17bdc32be6afccbc4566
bc99338e26953e57597eefaf83661cef
=============================业务接口start=============================================
pl = {"whiteMobile.oprCode": "01", "businessTypeName": "白名单业务", "whiteMobile.serviceCode": "10657109018606", "whiteMobile.serviceId": "QSH0010500", "whiteMobile.serviceType": "01", "whiteMobile.mobile": mobile} msg = self.__session.po...
1
f41573c5db2b349cbb5117feb2e62a86
cda88584a7b0da49d614ee72206c0130
将Map组装成Post请求参数
FormBody.Builder body=new FormBody.Builder(); if(map!=null || !map.isEmpty()){ for(Map.Entry<String,String> entry: map.entrySet()){ body.add(entry.getKey(),entry.getValue()); } } return body.build(); }
1
97dd24a7c6c871832f46dfa37072758b
e284912333064ffa96337f0d2e1a2259
เพิ่มคอร์สเรียน
namespace dlamp.Controllers [Authorize] public class HomeController : Controller [HttpPost, ActionName("postCourse")] public ActionResult PostCourse([Bind(Include = "ID,CR_URL,CR_SharedBy,CR_Category,CR_Type")] TBL_COURSES courseData) { if (ModelState.IsValid) { ...
1
1ec3b0465527dafb9a155f0e45be3d8f
ffb6f23b39b4e0ba65f52fa683c8656d
在消息页面点击互动按钮,跳到好友页面
namespace Wehelp public sealed partial class UserInfo : Page private void friendsClick(object sender, RoutedEventArgs e) { Frame.Navigate(typeof(Friends), currentUser); }
1
97d1769f94496e7b4829436f1055ef22
fab6f06c3b4830fc0a88e70fda46c240
A felhasználói felület kilépés gombjának eseménykezelő metódusa.
private void handleLogout(ActionEvent event) throws IOException { Scene scene = new Scene(FXMLLoader.load(getClass().getResource("/login/LoginView.fxml"))); Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow(); appStage.getIcons().add(new Image("https://avatars0.githubu...
1
8b877481329cfd5305c8aa693b4d4df7
56f0113934710736dc0f041ec7502f19
获取折扣开关
const configData = await super.controller.common.getSystemConfig('rechargeSwitch'); return parseInt(configData.rechargeSwitch) === 1 ? true : false; }
0
b4626f51edb54ab1669b065e104aaa8e
1ff9e5f27b325c2b34f36573dbd6bf9f
Add element of type Int32.
class LargeDataset extends \DrSlump\Protobuf\Message public function addInteger3( $value){ return $this->_add(3, $value); }
1
0e477248a99b218c21a6c027d1586352
a0a0aa63ea892680c5ae2279c19967aa
Method to add an action to the selected Incident.
public class MainController public void add_actions(int index, Actions actions) { _actions.add(index, actions); }
0
f5f42df38103061da900c1aa38c34ee8
fc42667fcb7c535b129ba964b2420d2a
Enter a `with` block. Collect coverage and outcome; classify as FAIL if the block raises an exception, and PASS if it does not.
self.check_coverage("""\ def f(): if False: # pragma: no cover pass # This line still reported as missing if False: # pragma: no cover x = 1 # Now it is skipped. f() """, [1,7], "...
0
284ac5d89a544078143377bdb5d4339f
3494a252cfccad88ca8d99a66a10d933
Get a color from hue, saturation, brightness and alpha values
namespace ImageMagick IMagickColor<TQuantumType> Create(TQuantumType red, TQuantumType green, TQuantumType blue, TQuantumType alpha);
0
34e11ddcc2dd3987009bbc76146e95d2
235906397b4bd221bd7baf6ed610a20f
添加标签并绑定到游戏
board[tag-1] = LayerColor::create(Color4B(0, 0, 0, 70), visibleSize.width / 3, visibleSize.height / 1.2); board[tag - 1]->setPosition(visibleSize.width / 3, visibleSize.height / 6); addChild(board[tag - 1]); list[tag - 1] = Sprite::create(listName); list[tag - 1]->setPosition(visibleSize.width / 2, visibleSize.hei...
1
b0e304d3a435a65eb86857f7bc4adfca
278133166a98292e850b9a2a58e4afdd
Description : This function enables CAN interrupt. Arguments : none Return Value : none
void CAN_Enable(void) { NVIC_EnableIRQ(CAN_IRQn); }
1
d36a5a3758a829059669bd6a75dcc52e
4e195aacd0d3dc46796a528c97cf1983
update particle's position after elapsed time dt
class Particle(object): def update_position(self, dt=1): self.position += np.array(self.velocity) * dt
1
f69e98e3b403c67fa3d60baf04fbb3d0
c13f0b5a196fb104f9f0335f8579f95a
Returns true if the entity has a muti-field key.
public boolean hasMassKey();
0
24379b35216bb8e20c2ebb21d13c4a13
ef08a6a63256f47721ea96e8568f098a
与中序遍历的迭代版1等价
public class BinarySearchTree<T extends Comparable<T>> public void iterativePostorder2(BSTNode<T> p) { Stack<BSTNode<T>> lstack = new Stack<>(); Stack<BSTNode<T>> rstack = new Stack<>(); BSTNode<T> node = p, right; do { while (node != null) { right = node.righ...
0
4a7bb17383b823e92a6c3c9d5b489118
8e33d791998020359d1afd6e55751dc4
弹出一个YesNoCancle的消息框(0否,1是,2取消或者直接关闭消息框)
namespace Zao.CrsPlat.DevExpressHelper.ZaoUtil public static class ZaoMsg public static DialogResult ShowYesNoAndTips(string message) { return XtraMessageBox.Show(message, "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Information); }
0
73d2cca68effbe6b300f959bc153fc8d
7206e8f33cb2fa7f27277073a1252c23
opens the mobile navigation
this.state.mobileNavOpen === true ? this.setState({ mobileNavOpen: false }) : this.setState({ mobileNavOpen: true }); }
1
b33bb2289e8669cd75e7b53d74863a9d
6df81673755eacd25f1f57863a759ef5
Returns the tel richiedente of this richieste.
@AutoEscape public String getDettaglio_richiedente();
0
24ec66bf7e97f2b32d7ab2472bc6a524
3abed9f7ee3158716d0197801c1a2017
This method is responsible for logging the agent into the CTI system and handling issues with login
def logInToHCC(): global TOKEN, SESSID, DATA, HEADERS global HCCUSERNAME, HCC_PASSWORD, HCC_URL global HCC_TOKEN, HCC_SESSID HCC_HOST_DOMAIN = 'hccstage.apixio.com' HCC_HOST_URL = 'https://%s' % HCC_HOST_DOMAIN response = requests.get(HCC_URL+'/') IncrementTestResultsTotals("log into hcc", response.status_code)...
0
db069e6a8131d7e7c26f0dca797dc5a0
253163cee847b4a3cab726ce9bcabcc1
This routine does a simple optimization on the Biot number of the Pressure Solution i.e. adjusting of the element wise paramaters accelerates convergence by reducing the system stiffness. If the cell-wise divergence goes up, it increases the stringency of BC's at that point otherwise it lets it loosen slightly. The de...
PetscErrorCode PressureEq::setUpBe(Domain &D) { PetscErrorCode ierr = 0; #if VERBOSE > 1 string funcName = "PressureEq::setUpBe"; ierr = PetscPrintf(PETSC_COMM_WORLD, "Starting %s in %s\n", funcName.c_str(), FILENAME); CHKERRQ(ierr); #endif Mat D2; _sbp->getA(D2); Mat H; _sbp->getH(H); Vec r...
0
06233ffb0a4b15fa8f8e5ce2e872a596
5ce3fd2cd7bd448c8b0355ae01cbcabb
An iterator that will stream data by only reading 'chunk_size' bytes and yielding them, when we can't buffer the whole datastream
class UnchunkStream (object): def __init__ (self): self.buf = '' self.bytes_remaining = None self.closed = False
0
088169c56bb0cba7221fe4c52578491e
2b9ab735f89cc774e62c8716cc7f2398
Prints the response to the specified output stream.
throws IOException { OutputStream out = null; try { out = new BufferedOutputStream(response.getOutputStream()); IOUtils.copy(in, out); } finally { IOUtils.closeQuietly(out); } }
1
e3994f7a603367fb8f58277a265cd1e1
8bcbe076028aef656285e3f61bb91bcc
Tries to invoke a null ctor. This should cause an exception.
namespace System.Reflection.Tests public class ConstructorInfoInvokeTests [Fact] public void NegTest3() { Type[] types = new Type[2]; types[0] = typeof(int); types[1] = typeof(String); ConstructorInfo ci = typeof(TestClass).GetConstructor(types); ...
0
51161ac4090f8482f6200fda6f835fb3
a9046cf492fc28086ce3403267700acd
ex1, compute product of two terms with only addition
{ if(y) return (x + multiply(x, y-1)); else return 0; }
1
651a025f1be1d16b3cbd46349591fa0f
f3e0fa212bb6f9354c5691e57e797338
Get Search Type by it's localised name
namespace Mpcr.Model.MasterData [BplIdentityScope("PoiTypes")] [TypeConverter(typeof(PoiTypeConverter))] public class PoiType : BplTaxonomy public static PoiType Get(string localId) { return Get<PoiType>(localId); }
0
28138d0966479c39229e3fbd769b2a12
2831460c5589f67a97705776d3baf6d5
영화별 선호도를 조사
os.system('cls') print('---------------배우로 영화 검색---------------') self.actor = input('\n배우 이름을 입력해주세요: ') self.start_time = time.time() self.sql = f'select m.primarytitle, r.averageRating from movie m, review r, person p, principal pp where m.tconst=pp.tconst and m.tconst=r.tcons...
0
f3d7d97e268c2142275f5aa213a617eb
b2ff4d86d7a150c8d222b19e36e43202
FUNCTION PURPOSE: Allocate a VirtualLink in the virtual link table.
a_status_t acfg_vlgrp_addvap(a_uint8_t *vlan_id, a_uint8_t *vap_name) { a_status_t status = A_STATUS_FAILED; acfg_vlangrp_info_t vlgrp_info; if (acfg_os_check_str(vap_name, ACFG_MAX_IFNAME)) return A_STATUS_ENOENT; strncpy(vlgrp_info.vlan_id, (char *) vlan_id, ACFG_MAX_VIDNAME); str...
0
df39d4b982f2dfbc0b64cbf1f5266609
a83e5bb60968d9c47e1fba81751f54b7
Starts and stops the pump. If the pump is running, it will stop it. If the pump is not running, it will be started.
class Braintree: def start_pump(self): self.ser.write(b"RUN\r")
0
2b878b0bd3db36f6bec086c705bc42e4
89224ebbd386ca31e424250841d41abe
根据传入的fragment返回和他相对应的tab值
class FragmentUtil private constructor(){ fun getFragment(tabId:Int): Fragment { when(tabId){ R.id.menu_home->return homeFragment R.id.menu_mv->return mvFragment } return homeFragment }
0
98e70fb9114994fc2158a5d6a28ed9aa
1913699a3267050a5a49d4c303610e0b
功能描述:按用户格式字符串距离当前时间分钟数
Calendar dateOne = Calendar.getInstance(), dateTwo = Calendar.getInstance(); dateOne.setTime(new Date()); dateTwo.setTime(parse(date)); long timeOne = dateOne.getTimeInMillis(); long timeTwo = dateTwo.getTimeInMillis(); long minute = (timeOne - timeTwo) / ...
1
88b446ab714a0c527da9f78032b8c1da
7ac5a78e2464209adb707ea837a63390
Toggle notifications
{ if ( this.notifications.length == 0 ) { this.getNotifications(false, false); } }
0
61e3b48e655c7291048cd108ec900276
baf384d87973a2d94e4c145df0ad5284
投稿記事表示
class PostController extends Controller public function show(int $id) { $data = Post::where('post_id', $id)->first(); if ($data == null || $data['post_status'] != 1) { return response()->json([ 'success' => false ], 404); } else { $data = P...
1
6c9f185495c5923d766cf615f7f299b7
5000e8f87ed7dc10c8c0e091060a00cf
Performs the actual configuration reading (from whatever source concrete impl represents) Returns: dict (json)
class PY9Unit: def read(self) -> Dict[str, Any]:
1
7ea0e000cf12075d754d37fe599d73d3
1f8be51a2a8cc712abc70979790801ab
https://proofwiki.org/wiki/Sum_of_Sequence_of_Squares
let mut max = 0; for (i, word) in words.iter().enumerate() { if let Some(map) = maybe_map(&word, &sq.1) { for w in words.iter().skip(i+1) { if map[w[0] as usize] == 0 { continue; } let n2 = w.iter().map(|c| map[*c as usize])...
0
c946460c996cacb2f262efc3ebd4b2aa
624e18103517100f7b78e947a43577d2
Sets the number of attendances.
public class AbnAttendanceStatusReport implements Serializable public void setCount(Integer count) { this.count = count; }
1
0c4aa25c76272e52dde8e548e3b28569
782123ea08ae4a6ea8507d0cf988600c
Clip bounding box coordinates between 0 and 1.
def clip_0_1(image): return tf.clip_by_value(image, clip_value_min=0.0, clip_value_max=1.0)
0
08cd035de965e971666844e0fd333521
031a109e4d6365f85f9be4c7801c637f
获取有空的技师
class GpTreatmentRecordModel extends GpBaseModel public function getTechnicanList() { $map['status']='0'; $list = M()->table('tfb_gp_technician')->where(array_merge($this->_map1,$map))->getField('id,name'); return $list; }
1
65231b64b03a6fbdc051c3f6c4422466
a589dd9a9c151ec9dafbe5e3985e61fe
取得所發票資料 BY 日期區間
{ string sqlWhere = ""; if (!ifRecord) { sqlWhere = " and d.voucher_id is null "; } sql = string.Format(@"select a.VOUCHER_ID,d.ESTIMATE_PAY_DATE,d.PAY_DATE,a.VOUCHER_NUM,a.APPLY_COMPANY,a.SHIP_OWNER,a.PAYEE, a.AMOUNT_LOW, ...
1
49060b01d60fb79bf64de5016b0c5184
e30b6089f2041c4b6446e0f9f4ba850c
Returns a random active customer.
class ShUsers extends Users function getRandom() { $u = $this->getOne(array('active'=>1, 'banned'=>0), 'id', 'rand()'); return $this->get($u['id']); }
1
36eca5438e0773977d542d0e5c67ded9
bfbec79a2e103356c71869da65090442
创建公会建筑
{ CreateCorpsReq req = new CreateCorpsReq(); req.name = name; NetMgr.instance.Send(MODULE.MODULE_CORPS, MODULE_CORPS.CMD_CREATE_CORPS, req); }
0
3acd7ce02c66e3538c0cfe3b8c6a612f
0a1981dc2ee3b419f749625d5950c766
Create object corresponding to the default user locale.
language_code, encoding = getlocale() if language_code is None or encoding is None: return icu.Locale() return icu.Locale(f"{language_code}.{encoding}")
1
a5087a66169dbda6fc8fa2fb37cf8ad6
0265288783034e9bdcc72f52f1cf6170
Returns copy of registration_requests with merged conditional datas.
class KeysightDCSupplyWorker(VISAWorker): # define the status masks def merge_registers(self, esr, qsr,cond): return_vals = self.convert_register(esr) qsr_status = f'{qsr:11b}'[::-1] return_vals['bit 0'] = cond == 1 return_vals['bit 1'] = cond == 2 return_vals['bit 6'] = boo...
0
48f3bbab9ec10a15c808828c0eea70c0
acf873b2db8e88f8ee8df6a54b52ff7e
对用户输入的值进行预处理,如文本转数字等
try: if value is None: return '' value = str(value) value = value.replace(' ','') if datatype == 'D': value = re.sub('.*至', '', value) value = re.sub('\D$','', value) value = re.sub(r'\D', r'/', value) elif datatype =='P': ...
1
117c8203bc698a39779689477e9e73b0
53deb3fc161e996683890401feb48e40
获取数表格状态
namespace Kingdee.YZJ.Linkerp.Demo.Service public class OpenApiService public DataSaveStatus GetReportTableInfoDataSaveStatus(string eid, string batchId, string accessToken) { string url = URLConstant.GETTABLEINFODATASAVESTATUS + string.Format("?accessToken={0}", accessToken); dynami...
1
9aca548461c449164bfdab0bd98ad0d0
9a59067117b04ee5bc378b52384ffc61
just prints out what was inputted!
void partOne(int num) { printf("You entered: %d\n", num); }
1
aa394ede1195eb40910051b44dedd0c8
717a5bfbb8e48c42f989d3f30444345e
회원email을 가져옵니다..
String sql = "select email from member_c where userid=?"; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; String result = null; try { conn = DBManager.getConnection(); pstmt = conn.prepareStatement(sql); pstmt.setString(1, userid); rs = pstmt.executeQuery(); while...
1
0f02cbb7bd7755bcfaff0d84b767d77d
c51c2c9a8258d0768aee0db55891390b
检查两边的括号是否对称,即产生的括号组合是否有效
if len(s)%2 != 0 { return false } var halfLen, p int = len(s)/2, 0 var stack []byte = make([]byte, halfLen) for i, le := 0, len(s); i < le; i++ { c := s[i] switch c { case '(', '[', '{': if p == halfLen { return false } ...
1
8f9ed0e662611ce88e03194e9d67c72f
dc8f45ab2517b44449d44ee1c0f54ffc
Reverts the data for this soundscape to the data in the db
let saveThis = Object.assign({}, this.data[alarmSound]); if (this.data[alarmSound].audio && this.data[alarmSound].audio.src.substr(0,4) === 'data') saveThis.obj = this.data[alarmSound].audio.src; delete saveThis.audio; MYDB.addToDB('panda', 'alarms', saveThis).then( () => {}, rejected => { MyPandaUI.ha...
0
f2d3c03dd510c2cd54c87a2b8f5c7867
5172a89a1bcc607e7ac4595386480748
print a nice-looking description of cookie
public class Cookie extends DessertItem{ public String toString() { String output = this.getNumber() + " @ $" + (this.pricePer12 * 0.01) + "\n" + this.getName() + this.findLength() + (this.getCost() * 0.01); return output; }
0
1b8a39db3fc14e32ce4fdb70d8bbb542
ffd41bee5d2a30183f5b9990e8893337
! Get CAD detect flag status
bool ADCClass::getZCDetectedFlag() { return ZCDetectedFlag; }
0
dda48cb3fd08428f9da8d1202788036e
cdcf4d2878d2a810f8457640ac33763b
GET: ResidentPortal
{ ViewBag.ResidentID = new SelectList(db.ResidentDataTable, "ResidentID", "ResidentName"); return View(); }
1
25c3c0318ba8128be8978c646b75eb96
4afb1e0059f6fddf444f4fe920c2e578
Keeps a copy of end-of-iteration tables for use in next iteration.
dv_vectors_A_previter = cloneObj(dv_vectors_A); dv_vectors_B_previter = cloneObj(dv_vectors_B); dv_vectors_C_previter = cloneObj(dv_vectors_C); dv_vectors_D_previter = cloneObj(dv_vectors_D); dv_vectors_E_previter = cloneObj(dv_vectors_E); dv_vectors_F_previter = cloneObj(dv_vectors_F); dv_vectors_G_previter = c...
1
9ed1888f4459a81b766757b35436e9ba
dd1d1699711f99fb281ed9a763adce55
calculate the binomial coefficient http://rosettacode.org/wiki/Evaluate_binomial_coefficients#JavaScript
auto result = 1.0l; auto iter = .0l; for (iter = 1.0l; iter <= possibilities - outcomes; iter++) { result *= outcomes + iter; result /= iter; } return result; }
0
9d96091cc3bac9385125c895ce24d8a0
d5b162bf5fd14409605984e2d646f20c
CheckKubernetesVersion return an error if the Kubernetes version in a cluster is lower than the specified minK8sVersion.
public function olderThan(string $kubernetesVersion): bool { $this->loadClusterVersion(); return Semver::lt( $this->kubernetesVersion, $kubernetesVersion ); }
0
a9266df7e39692ffb7756e31605ede64
771f32d9f0e458f773980e78b204d348
Get the number of cells along z for each local zone
class VM(object): def _get_z(self): return self.r1[2] + np.asarray(range(0, self.nz)) * self.dz
0
cc963116ea774a8231ca5f6b9e4a7d73
368d294e56efaeafd912545582c1137a
Re-indexes all local variables which are referenced by a sequence of XIL-S instructions
{ unsigned int i,j,done;IC *p;Var *v,*a[4],*vp; unsigned long heapsize=0; if(DEBUG&1024) printf("numerating variables loop1\n"); inr++; a[0]=vl0; a[1]=vl1; a[2]=vl2; a[3]=vl3; #if 1 for(j=0;j<4;j++){ v=a[j]; while(v){ v->index=-1; if(j==0&&v->f...
1
fa596a121277e42e1dea56ef49e01e29
b5ea9f2378df8ee74af971a40fefc2c9
Make `project` and `biosample_type` color mappings for downstream modules to use.
def pheno_to_color(pheno, palette): if isinstance(palette, str): palette = sns.color_palette(palette) values = list(set(pheno)) values.sort() palette = sns.color_palette(palette, n_colors=len(values)) study2color = dict(zip(values, palette)) sample_colors = [study2color[v] for v in pheno...
1
c2bbf3bff9aedb0edb3e0134d9d8093a
67d3ab41413230733030bed2dfc6198d
Returns the last data type in the ordered set where groupId = &#63; and status = &#63;.
public java.util.List<DataType> filterFindByG_S(long groupId, int status);
0
8b38039aed1c28dc8a55b7f65eb5c8da
4867a56dfc4d634380859a356f193eed
點擊類別的DataGridView,刪除或修改該項類別
namespace test public partial class Main : Form private async void member_list_grdaview_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex != -1) { if (this.member_list_grdaview.Columns[e.ColumnIndex].Name == "update") { ...
1
456a2470af77064563fa7715e9fb5410
2859eddfa7508a18eab53267c8d87f1f
Returns the theme handler service.
function theme(): SleepingOwl\Framework\Contracts\Themes\Theme { return app(SleepingOwl\Framework\Contracts\Themes\Theme::class); }
1
3ae3d743539ac313804d772e4e0b8afc
1378e59fdf7a07958de48d0570f32670
Get the idle background
m_idleBg = "arow_up_normal"; m_highlightBg = "arow_up_hover"; m_unavailableBg = "arow_up_disable"; }
1
09f41bd90e8f0d134af559e2ddd29a11
a3bc4270dd62f8eb0d10281f38393569
取得这周的最后一天的23:59:59【从周日--周一-...-周六】
{ DateTime ndt = dt.GetStartOfWeek().AddDays(6); return new DateTime(ndt.Year, ndt.Month, ndt.Day, 23, 59, 59, 999); }
1
9d775bf45132f691a9a337c255661ac9
be1d49fa5fc78c8d11ed96c7dc9b7f2b
- finalmente elimina los espacios sucesivos
char *rtrim(char *dato) { while(*(dato+strlen(dato)-1) == 32 || *(dato+strlen(dato)-1) == 9) { *(dato+strlen(dato)-1) = '\0'; if (!strlen(dato)) break; } return(dato); }
0
78e97a87ead227c6bd9d96c3928a2b81
74312e8c62f747a13683113ebe27e117
Ensure that header updates are done case-insensitively.
class HeadersTests(TestCase): def test_hasHeaderTrue(self): h = Headers() h.setRawHeaders(b"test", [b"lemur"]) self.assertTrue(h.hasHeader(b"test")) self.assertTrue(h.hasHeader(b"Test"))
1
d03e741ee1f46869ea913022dc3dc11d
5a6125f7b219cda35986b0f6427aa3eb
<p>Retrieves the key store id.</p>
public class ApnsHttp2Options public String getKeyId() { return keyId; }
0
c4fbe01fa6dc0a530aff335ab19d5648
6d7849bfc3e4ea08c1127a2c0e023f60
transform boolean into ✓ / ✗
if(!markdown){return '';} if(!checkbox){return markdown;} var id = checkbox.tabIndex; var checked = checkbox.checked; var i = -1; markdown = markdown.replace(/\[(\s|x|\*|✓|✔|☑|×|X|✕|☓|✖|✗|✘|#)\]/g,function(total,inside){ i++; if(i!==id){return total;} var sign = checked ? '✔' : ' '; return '['+s...
1
fc34c97ba218755d0212bfb1e13a7dc8
701ca96842e2b2d1c0c1e83951a150b8
Evaluate the zeros of a non square MIMO system.
Nx = 10000 eps = 1e-14 tvec = numpy.linspace(-3, 3, Nx) xvec = numpy.tanh(0.5 * numpy.pi * numpy.sinh(tvec)) zeros = [] for i in range(Nx - 1): if ulx(xvec[i]) * ulx(xvec[i + 1]) < 0: a = xvec[i + 1] b = xvec[i] u_a = ulx(a) u_b = ulx(b) ...
0
d135f3155459a24749f9ed96c8ef30b5
55f5074f7dc9cfa8670bdbb6c57dc9b8
Convert string kwarg name into a CLI argument.
def wopt(name: str) -> str: locals_ = stack()[2].frame.f_locals arg = name.replace('_', '-') val = locals_[name] if isinstance(val, bool): text = f'--{"" if val else "no-"}{arg}' else: if isinstance(val, str): val = [val, ] text = ' '.join(f'--{arg}={s}' for s in ...
1
c147a0efe50b0c71d0439730fc1e9b9e
f3c0d7ff15e04a7c8fb2d1b2468e3d67
retorna solo los leads de ese user
class LeadController extends Controller public function index() { $user = Auth::user(); $leads = $user->leads()->get(); return view('pages.leads', compact('leads')); }
1
76cf643836da3735f2bc02aed0805a60
c638bdf49a3b521088dd35dc703bc58a
将非数值的特征转换为数值
def make_numeric(df): columns = get_feature_list(df) df[columns] = df[columns].apply(pd.to_numeric, errors='coerce') return df
1
905ca5e2c3739f1382327106fa645e1e
da14c5e3f2d93e44bb2d6f44f11e6454
Symmetric kullback-leibler divergence
def symmetric_kl_divergence(p, q): return numpy.sum([stats.entropy(p, q), stats.entropy(q, p)])
1
14d61138b81230fe7d0fc49327902bf8
b2f9f745b35e8998ff82f631b15a9e90
以一个目标作为主体,取其十字上的目标,包括主体
public class FightMgr : MonoBehaviour public List<ActorBevBase> FindTargetWithCross(List<ActorBevBase> sourceList, byte top, byte bottom, byte left, byte right) { List<ActorBevBase> findList = this.GetFindList(sourceList[0].Type); if (findList == null || findList.Count == 0) { re...
1
31fcb9439b8f61ef7b205c8c447bdd59
a4dc499f3e0cde164301c9c9f33e3993
查询指定日期日记
@Select("select * from msle_log where log_date like '${log_date}'") List<MsleLogPo> getLog(@Param("log_date") String date);
1
d735a4469e63b75dd662af2673b554dc
df5efe428ac1a8bf2cedbdbcca4a5bf9
Single Byte Transmit (TX)
void SCITransmitByte(unsigned char data) { while((SciaRegs.SCIFFTX.all &0x1F00)>0x0300) ; SciaRegs.SCITXBUF=data; }
1
c12691e1440fd3087edd885dd5f4b8d5
e580ca658e7183af1a7f141584755ed8
校验myLocator元素是否存在
try{ Thread.sleep(500); driver.findElement(LocateWay.getLocateWay(elementLocateKey)); return true; }catch(NoSuchElementException e) { return false; } }
1
50daca98730072149d556ef7f783a839
fd098dc40e977f82cebeffc0bcca15d5
Input: A dictionary of having all people and their associated score, and team. The higher the score the better they match with the user. Output: A list sorted with score in descending order
def sort_by_score(l): l[:] = sorted(l, key=lambda d: d['score'], reverse=True)
1
72d0ddc9045fa8b484864fe9dbc367e2
1d5dcf17ebc80f32f5d376cd05652180
Whether this data type is an OTHER type. <p> The {@link SQLDataType#OTHER} type maps any unknown data types to a jOOQ {@link DataType}. This includes unknown vendor specific types as well as unknown user defined types which do not have any custom {@link Converter} or {@link Binding} attached. The type may still be usab...
public class FieldDefinition public static String typeOther() { return NLS.get("FieldDefinition.typeOther"); }
0
7ec9b1e8c94ddc8b165179cdcda06ef0
bd814b431429b6270978a5bae3c1783e
Adjusts scale and position to fit target in specified bounds.
var base = this.base; var current = this.current; var option = this.option; var width = this.width; var height = this.height; var minScale = option.bounceMinScale; var maxScale = option.bounceMaxScale; var fitDelta = {}; fitDelta.scale = TransformT...
1
d1f52431f255b52b6521e9f7a3150895
5e15b4b8c5952f3cd4559a3d9ab2ecdb
Clear all interrupt status bits
void DS3231::clearINTStatus() { uint8_t statusReg = readRegister(DS3231_STATUS_REG); statusReg &= 0b11111110; writeRegister(DS3231_STATUS_REG, statusReg); }
1
c0135a92599e4e9fb88981e8879c382a
53651bfc79780018d0534f806bdf13b0
Test for moreResults
class ResultTest extends TestCase public function testWithMore() : void { $bob = Record::fromName("bob"); $next = Response::nextRecordsUrl(1); $linda = Record::fromName("linda"); $map = [Example::TYPE => Example::class]; $result = Result::fromResponse( Response::fromQueriedRecords($next, $bob)...
1
099887ed7afb10a8d57de26cf4ff054d
f25b90db003805e98fbf180492fc1da0
Set the minimum interval between acquiring tokens.
if isinstance(seconds, datetime.timedelta): seconds = seconds.total_seconds() if seconds < 900: raise ValueError("interval must be greated than 900 seconds.") self._interval = seconds return self
1
c6256ffbbb34780cc5e067ead1a4a834
40aea316f85c6d188a1dddb137d8a2b6
获取是否自动改变测量距离单位
namespace ExactFramework.Component.Examples public class TimeOfFlight : DeviceComponent public bool GetMeasuring() { return measuringDistance; }
0
8624d2292b2d1df1caab891fdd17905d
4716914c2e645bc62472db09407194cf
проходя циклом по всем метеоритам считает расстояние между каждым из них и кораблем если расстояние меньше фиксированного, то происходит столкновение т.е параметр столкновения становится равен правде
function _Compare(arr1, arr2) { var arrX = arr1.sort(); var arrY = arr2.sort(); if (arrX.join("") == arrY.join("")) { return true; } else { return false; } } var trueX = false; for (le...
0
f32376d44fa85d3a277571efd528865d
9d615110b122ea0e9c20b8373d1c75c2
inodeブロックをstruct inodeにデシリアライズ
u8 buffer[SECTOR_SIZE]; u32 i; u32 err; u32 sect; u32 group_sect_base; u32 inodes_per_group; struct ext2_inode * ex_inode; struct ext2_base_information * ext2_BI; if (inode->i_ino == 0) return -EINVAL; group_sect_base = ext2_group_base_sect(inode); if...
1
4169fa8dc4c4433f43a1ff001a513c43
19b82cb217d431b6a3335c5e3ca76f4e
Sets the query fields and their boosts using the same format as that used in DisMaxQParserPlugin. These fields must also be added using {@link #addMoreLikeThisField(String)}.
public class GSearchQueryStringQuery extends StringQueryImpl implements Query, StringQuery public void setDisMax(boolean disMax) { _disMax = disMax; }
0
b242a12f9064e9d92e0ebaa33e60a6ff
6da65d184873f3312fada658c34fc0a6
获取倒数第N个节点的父节点
Node* getCertainChild(Node* node, int n) { Node* child = node->child; int restN = n - 1; while (child != NULL) { if (restN == 0) { return child; } else { child = child->nextSibling; restN -= 1; } } return NULL; }
0
9df2f4d87b6fcc5baf1faf372e4fd043
33fe51246517bf7b462a07ceaa6c6a66
Creates a interface-types field.
const string infoInterfaceTemplate = " 'interface' => array( 'showRecordFieldList' => '{0}' )"; string finalInterfaceFields = string.Empty; if( Configuration.Model.UsesTemplate( Keywords.DataModelTemplates.T3CommonFields ) ) { finalInterfaceFields += T3CommonFields.InterfaceInfoFields + ", ";...
1
04ee91bdf05d1440c5df9e843f1ddf72
f72e3ada82f9d4be4bebf2564e5f097b
Prints the most commons words in a histgram and their frequencies. hist: histogram (map from word to frequency) num: number of words to print
t = [] for key, value in hist.items(): t.append((value, key)) t.sort() t.reverse() return t
0
0f34555f60aff7bcca37ae7adc6f88e7
f1aea2d998bac88c7fc9c74c0ae129ca
刷新TB组,一个按下后其他的自动弹起(一组TB要放在同一个节点下)
{ for (int i = 0; i < pbList.Count; i++) { Transform[] panelArr = pbList[i].skin.GetComponentsInChildren<Transform>(true); for (int f = 0; f < panelArr.Length; f++) { panelArr[f].SetAsLastSibling(); } } }
0
719b4953ce20a5f0095d1abc4c0368a7
280e4d96a7843ec03d7de98103509ad5
向listView中添加问题标题,并启动getQuestion线程以获取具体问题
public class VM_ProblemBoxActivity extends AppCompatActivity public void addItem(String name, String date, Boolean live){ problem_item item = new problem_item(); item.setProblemName(name); item.setProblemDate(date); item.setProblemLive(live); mList.add(item); }
0
b6d191080bd96cce06a2a94188cc39c0
80de39e74a28c5228f68e23123ae7efc
Does not respond to itself
class Reaction(object): def _issue_comment( self, event, payload ): person = payload['comment']['user']['login'] if person == self.user: return say_something_if_mentioned( event, payload, self.logger, self.client, self.user)
1