query_id
string
corpus_id
string
query
string
code
string
label
int64
380b7ffc581eb576aeffebf31a37b1fb
f1b19edaa00d7b9c16b5b836edd70032
Connects the alignment mapping index and the residue depth
def index_aligns(aligns): result = {} for i in aligns: k = (i.reference_name, i.reference_start) result[k] = i return result
0
8abaa3397d6c140de4383f4851098097
3fc9284d44c1fdf5d338af49fed0a4d3
Replaces all period-characters with underscore-characters.
def reformat(key): return(key.replace('.', '_'))
1
c8093967765a1c3fc449314858501864
9fbd9c732470b92bc11ee4fbbca5f975
Return dataset for data in object Returns: dd (list): list with a dataset for each trace
class TraceSet: # TraceSet initialiser. def GetData(self): return [x.udata for x in self.traces]
1
06f9aa2f0ee3053a74276f21f5742486
cc24cbfa231dad05a00456a22faea433
A generator for blocks contained in a block list. Yields tuples containing the block name, the depth that the block was found at, and finally a handle to the block itself.
def gen_block(f): name, old_name = None, None chunk = [] for line in f: line = line.decode() if line and line[0] != "!": _, name, _, _, term, _, ec, _, namespace, protein_name = line.split( "\t")[:10] if name != old_name and old_name: y...
0
70bc138b8b2e2558d6e946efa2962553
b35e7359149b41f8792237f8b9669030
设置starrivename (到达站点名称)
@MandatoryAuthentication public class ShortestPathAction extends BaseAction public void setArrivalStationId(String arrivalStationId) { this.arrivalStationId = arrivalStationId; }
0
b10a5997756049471bf6cda2aa7c8d29
5026adc12bd05627e421696f95e62fa3
Yorumlarda cevapla düğmesinin çalışması için eklenmelidir.
{ list($driver, $authorid) = Auth::get_user_id(); if ($authorid) { $comment = new Model_Comment(); $comment->post_id = Input::post('postId'); $comment->author_id = $authorid; $comment->content = Input::post('content'); $comment->status = 1;...
0
72803805d5adb99cfe32b714ebfabc52
c05d02b5bb01f90fc3c31d01d8ca9f12
drop duplicates in collection based on md5sum
poss_dupes.sort_by(|a, b| { a.key .len .cmp(&b.key.len) .then_with(|| a.key.digest_snapshot.cmp(&b.key.digest_snapshot)) }); }
0
70819835db3dd34ac55809b596f89dfb
29c185320ceb39b12c74c8d97ec7d615
Generate INSERT IGNORE query to the table from current select
public class Database public void prepareInsert(List<String> row) { StringBuilder insertStatement = new StringBuilder(); insertStatement.append("INSERT IGNORE INTO "); insertStatement.append(tableName); insertStatement.append(" ("); for (int i = 0; i < columnNames.size(); i++) { ...
1
59d60324807a78dca3a442a7ef38ccc6
748dd0eec0c7255fc2085b7ad56b806f
loop through all 16 channels and send the value
void ofApp::update(){ fft.update(); auto high = fft.getHighVal(); auto mid = fft.getMidVal(); auto low = fft.getLowVal(); ledVals[0] = ofMap(high, 0, 1, 0, 255, true); ledVals[1] = ofMap(mid, 0, 1, 0, 255, true); ledVals[2] = ofMap(low, 0, 1, 0, 255, true); std::string writeBuffer; writeBuffer += ofTo...
0
770da3da8002a8fed3792675c817f328
d37d3c18db8d683e445394c5ad0229fb
{ASCII}.lower_s
{ GTCX EIF_INTEGER_32 ti4_1; EIF_INTEGER_32 ti4_2; EIF_INTEGER_32 ti4_3; EIF_CHARACTER_8 tc1; EIF_CHARACTER_8 Result = ((EIF_CHARACTER_8) 0); RTLD; RTLI(1); RTLR(0,Current); RTGC; if (F689_5426(Current)) { tc1 = *(EIF_CHARACTER_8 *)(Current+ _CHROFF_0_0_); ti4_1 = (EIF_INTEGER_32) (tc1); ti4_2 = (EIF_I...
1
b306ae009d9159b11cb2014246cddd31
2d7cbc9eb7dd2a59bba036f74169b024
Fixes various ways of spelling male/female.
def fix_spelling(s): s = str(s).strip() return s.replace('RECIEVED', 'RECEIVED').replace('RECIEVE', 'RECEIVE').replace('RECIVED', 'RECEIVED')
0
16905fd5db6160c86d27b75a9b445a7b
6e03c6ec8fa5d2a7f24ee601f86c5f88
予算書アップロードのフォームロード
function initReload() { var get = getRequest(); if (get.length != 0) { if (get["start_ymd_ins"] != null) { $("startYmdInsText").setValue(decodeURI(get["start_ymd_ins"])); } if (get["end_ymd_ins"] != null) { $("endYmdInsText").setValue(decodeURI(get["end_ymd_ins"])); } if (get["kotei"] != null) { va...
0
93d4fcd7a48260195b544cd5fa717618
5390a01fdafe234959dce2a7aeb50de6
adds song to DB and returns promise
saveSong(data){ return instance.post('/api/addSong', data); }
1
86ddc843320284ee4834ccdda167c887
1edf2df9558db02698626b2a277312b7
Sets previous image (in the list) to the picturebox when left button is clicked
namespace C17_Ex01_Gal_203628763_Guy_308121383 public partial class FacebookMainForm : Form, ILoadSubject private void buttonPrevPhoto_Click(object sender, EventArgs e) { FacebookAlbum album = this.listBoxAlbums.Items[this.listBoxAlbums.SelectedIndex] as FacebookAlbum; this.pictureBo...
1
3c6dc69481158ae7fa9ecc6ff29f42fc
64eb2ff9e07d5d77c69b9bea2e2c76b2
Override of the OnInitalize from the Controller class.
namespace SpaceInvadersRemake.StateMachine public class VideoOptionsState : State protected override void ControllerInitialize() { Controller = new SpaceInvadersRemake.Controller.MenuController(this.Model); }
0
cb3eaab36cef5f2224f8b906aefd8ece
1ba7aee5439eb48db47ce4610dc4e21d
GET: api/servicing/individual/{customerIdentifier}
namespace MarketingServiceRequests.Controllers public class ServicedetailsController : Controller [HttpGet] public ActionResult servicedetail() { return View(); }
0
1e1544d7f8812ce396c6e73149edb9aa
65192623d66646d44974b62cd5e9d3c0
弹出视频时间点对应的节试题
{ var time = Math.floor(instance.currentTime()); var i = 0; while( i < time_id_list.length && time_id_list[i].time < time ) i++; if( i != time_id_list.length && time_id_list[i].time == time && time_id_list[i].asked == false) { time_id_list[i].asked = true; fetch_quiz(time_id_lis...
1
5261053a29c8a3d1ccbc0bd5d995c5ff
8f1fe401bf786db8243c69fe85d64748
Returns the most frequent n-grams that appear in textList
def most_frequent_bigrams(text): if text is None: return None tokens = normalize_corpus(text) output = list(nltk.ngrams(tokens, 2)) return nltk.FreqDist(output).most_common(25)
1
4577b94b6d6e885a11e1c711c413c484
7301565cd26a236491f20c10cc4293b5
LBL_PRINT_TELEMETRY
{ qcril_log_print_ril_message_payload("%stech = %d", header, ptr->tech); qcril_log_print_ril_message_payload("%sretry = %u", header, ptr->retry); qcril_log_print_ril_message_payload("%smessageRef = %d", header, ptr->messageRef); if ( (RADIO_TECH_3GPP2 == ptr->tech) && ptr->message.cdmaMessage) { qcril_log...
0
921d7cc06b6830a0e0e1f5c8bbaf2f84
50c87535b7ba330bd2c5f1610b189657
获取是否为主供应商(1-主供应商,0-非主供应商)
public class BuyVo extends RecursiveTreeObject<BuyVo> implements java.io.Serializable public Integer getSupplier() { return this.supplier; }
0
f7f5e49201cecbc962ee709a38d192bf
572b5cc9a6c59d8042a3792772885e5f
Brings statistics for the array of given users.
class StatisticResource extends JsonResource public function toArray($request) { $correctAnswersPercentage = round(($this->num_of_correct_answers / $this->sum_of_answers) * 100, 2); $finishedPercentage = round(($this->num_of_finished / $this->num_of_users) * 100, 2); return [ 'nu...
0
4802ef6fce02d0851a9d7ff65df0e1ea
3e59d9cfeb5d9ffc8e5e215d36046ffb
Liefert das Datum des Folgetages zum vorliegenden Tag. <P>
Date getGeburtstag();
0
dabd342e47ca33c2eba6e6983f6f70da
21dc3d796307322ec1cdb1b816e46034
Makes the port access, equivalent to >> switchport mode access
super().__init__(name=name) self.simple = rac_config.bypass_amf self.input_access_request = Port(AccessRequest, 'input_access_request') self.input_disconnect_request = Port(DisconnectRequest, 'input_disconnect_request') self.input_rrc = Port(RadioResourceControl, 'input_rr...
0
c3c582f218c6e344d95b2e739990e379
b1298c11338a713c376445274a8e4da7
根据工作定义ID或Key以及表单ID,使用缺省设置转交工作,
{ return ApiHandlerWapper.TryCommonApi(accessToken => { var url = string.Format(Config.ApiWorkHost + "/cgi-bin/crm/transfer_external_contact?access_token={0}", accessToken); var data = new { external_userid = ExternalUse...
0
ef2e99c806e888228c93fb1123cbebf2
2811980d98fb2cdfed43009879a665b4
Проверка возможности открыть документ на чтение.
{ if (TRCSDocument.IsNullOrEmpty(RCSDoc)) return false; return TDMActions.isDocumentRead(new TBOArchiveContainer(RCSDoc, RCSDoc.IdArchiveDB)); }
1
a6f19cda93b7b706feb30704d95682b4
338347e563f71e4fc89ac79b4787f0a9
如果B为空,返回A
if (A.length === 0 || B.length === 0) { return B; } let B_index = 0, A_index = 0; const newB: SectionArray = []; do { const B_element = B[B_index]; const A_element = A[A_index]; if (B_element[0] >= A_element[1]) { A_index++ continue; } if (B_element[1] <= A_element[0]) { ...
0
9c7508e702bb1ab1fd2f01b56ad94827
a6be7fe1951b16f5f1965e75f2d12697
Returns a comparator that compares tasks based on their done status. (undone tasks sorted first.)
public int compare(Task firstTask, Task secondTask) { boolean isBothComplete = firstTask.isComplete() && secondTask.isComplete(); boolean isBothIncomplete = !firstTask.isComplete() && !secondTask.isComplete(); if (isBothComplete || isBothIncomplete) { NameComparator nameComparato...
1
a6c41b2320d39860d592bcbece5d5173
316bc408bfd1abe7bf12c93b54635173
Passthrough length from wrapped.
class Asn1wr(Asn1Writer): def unwritten_len(self): result = self._lib_vscf_asn1wr.vscf_asn1wr_unwritten_len(self.ctx) return result
1
eb693f850b3e6002830ea6bf07049599
d497e4bda96ea872c3444a07bb4a1b7a
Gets the metadata about files and the student to whom the submission belongs to
class provider implements \core_privacy\local\metadata\provider, \mod_assign\privacy\assignsubmission_provider, \mod_assign\privacy\assignsubmission_user_provider public static function get_metadata(collection $collection) : collection { $collection->link_subsystem('core_files', 'privacy...
1
6f14b9567245169295329b921885fe26
79d04394f5f52ba32002a09ce4b98945
计算每行的单个图片宽度
public class PhotoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> private int getImgWidth() { if (imgWidth == 0) { imgWidth = (ScreenUtil.getScreenWidth(context) - (getColumnCount() + 1) * 10) / getColumnCount(); } return imgWidth; }
1
e82827294af3d7d3eef2f8175c240d4c
a8119a7fd8641b7b777e8ea9aa10924d
Helps to builds the previous article link for versioned projects
Contents contents = current_article(); return null != contents ? permalink(contents) : ""; }
0
09d19b759ce3aad90754114a5fb9281a
3671951601c779945cdbf9f1771cb5b1
获取砍价用户信息
{ List<BargainUser> bargainuserlist = BargainUserBLL.SingleModel.GetSuccessDataList(0, timelength); if (bargainuserlist != null && bargainuserlist.Count > 0) { string userids = string.Join(",", bargainuserlist.Select(s => s.UserId).Distinct()); ...
1
58cdd936bb57c7758db6f184c1bf4a5e
7725a136f863ebb1dd3dd1189edc0554
Build the real record for a fixed length put.
{ m_record.file_id = FILE_ID; m_record.key = REC_KEY; m_record.data.p_data = p_buff; m_record.data.length_words = BYTES_TO_WORDS(size); }
1
11ae99a3448e3c26dcb01d0364ac37d8
57f9b1bcbc7013da1f0df49a4a326898
File system storage client.
class LocalFSClient(base_client.BaseClient["LocalFSClient"]): def __init__(self, url: Union[urls.URL, str]) -> None: super().__init__(url) self.path = os.path.expanduser(self.url.path)
1
3dc783342633cf76d8c82723705303a1
81e1bc9d1c6275570bed3c6e1daa5224
函数调用的代理,如果调用时有异常,会自动重试$intMaxTry次,每次间隔$intTryInterval微妙,如果 重试指定次数后仍然异常,则抛出原异常
public class Func implements MethodInterceptor @SuppressWarnings("unchecked") public static <T2> T2 proxy(T2 obj, int retry, ICallback<Object> success, ICallback<Throwable> fail) { try { Func p = new Func(obj, success, fail, retry, false); return (T2) p.get(); } catch (Except...
0
a57e644c04b6574f7c3da8374378f5cf
a7d77cf89d3fe2dda69c08eda5e39589
Takes a single column h2o frame and converts it into a numpy array
def get_frame(frame_id): return H2OFrame.get_frame(frame_id)
0
bb37ca69b13e1f313d522fb8866d4cd7
2ae10e553ca3101851045efca959fe79
Bind 'Start' to action button
handleStart() { this.oStart.onclick = this.start.bind(this) }
1
1316b615aa8ea427664e8fd7b10b70c8
5114d9b2babe30b1bc0d3472575bc759
Retourne true si le jeu est en pause, au moins pour ce joueur, false sinon
namespace GameStateManagement public class InputState public bool IsPauseGame(PlayerIndex? controllingPlayer) { PlayerIndex playerIndex; return IsNewKeyPress(Keys.Escape, controllingPlayer, out playerIndex); }
1
b4ca8aaecf87218ce74b5a87a40e0598
1a2b8fc8086b294ad26901953495da92
функция вызывает действие для изменения состояния хранилища только после обновления состояния компонента.
let searchParams = SearchParamsStore.getState(); if (searchParams.changedParam === SearchConstants.REPOSITORIES_CHANGED || searchParams.changedParam === SearchConstants.UPDATE_ALL) { this.updateComponent(); } }
0
e7aace080b755aadf108ca9f92de81c7
2ad55002df797377c4224c33c36ce229
设置已有爱心捐助
public class PLChannelDonateServiceImpl extends PLAbstractService implements PLChannelDonateService public PLCommonResult setDonateGoods(PLDonateGoodsSetRequest request) { return getPLCommonResult(PolyvLiveConstants.GOOD_DONATE_SET_URL, null, request.getParams(), POST_METHOD, request.getRequestB...
1
dd49b99db375914b8a947c856f68a3c9
81a320fce97a063719967d1467985f99
Fix cases in which polynomials and higher taxa are all upper or lower case
if "{" in x: x = x[:x.find("{")-1] if "var." in x.lower(): p = x.lower().find("var.") return "<em class=\"species\">"+x[:p]+"</em> "+x[p:p+4]+" <em class=\"species\">"+x[p+4:]+"</em>" elif " var " in x.lower(): p = x.lower().find(" var ") return "<em class=\"species\"...
0
44189ddca0a3ade59ba3bc8adcbbd488
46d6b41a09026a08d1710ecacc1e5c6b
deconstructKey deconstructs the key to the original key and the lineno.
pathParts := strings.Split(in, ".") ext := pathParts[len(pathParts)-1] pathParts = pathParts[:len(pathParts)-1] path := strings.Join(pathParts, ".") pathParts = strings.Split(path, "/") slug := pathParts[len(pathParts)-1] pathParts = pathParts[:len(pathParts)-1] return &keyparts {strings.Join(pathParts,...
0
1c8f85c952ed40cb20a106877e68f8de
f52f2e89a5faf76dde8aca98ac562745
List the reflog within a specified reference.
base_url: str, ref: str, max_result_hint: Optional[int] = None, page_token: Optional[str] = None, ssl_verify: bool = True ) -> dict: params = {} if max_result_hint: params["max"] = str(max_result_hint) if page_token: params["pageToken"] = page_token return cast(dict, _get(base_url + ...
1
8d94c2c5bf09e6170006794413332bc8
868e610559e4da1cd9cf6be151237fa6
Ask for name, subjects and subcategories
self.name = raw_input("Enter your name :\n") self.rank = input("Enter your Rank :\n") self.category = raw_input("Enter your category :\n")
0
abfe6867fe7db370612592ca34de1356
5ce80d2b89f7c6744dda77d3262aa990
Test that registerpage is accessible without login
class SecurityControllerTest extends BaseWebTestCase public function testThatLoggedUserCanNotAccessRegisterPage() { list($client, $crawler) = $this->accessRoute(RoutesConfig::REGISTER, TestDataConfig::CLIENT_USER, TestDataConfig::CLIENT_PASSWORD); $this->assertTrue( $client->getResponse(...
0
9043430e608cb98c2519d43119dd0506
667136b00fad02cdccee73748a646e55
서버에서 받은 건물 리스트 구성
{ for (int iIndex = 0; iIndex < SelectView.transform.childCount; iIndex++) { int selectOrder = checkIfSelect(iIndex); allBuildingsInfo.Add(BuildingsInfo[iIndex]); if (selectOrder != -1) { ScoreList.Add(100 - selectOrder * 5); ...
0
63e5973376e3bf7e301932d8add0fd8a
dbfbd76ae4a237168b53ee6795f1baec
Получить документы, по которым уже отправлены уведомления.
{ Dogovor dog = GetDogovor(dg_code); string url_prefix = "http://online.clickandtravel.ru/click/extra.aspx?dogovor={0}&k={1}&h={2}"; SqlConnection con = new SqlConnection(Manager.ConnectionString); con.Open(); SqlCommand com = new SqlCommand(String.For...
0
451d7281ab38346a76581f84b8dbcd75
19e8b0bd01a38b4858e8760072f496a2
Sets the value of the '{@link IFC2X3.IfcDefinedSymbol#getTarget <em>Target</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@objid ("38161bee-5508-404a-ae1b-6a8932fbfa3f") void setTargetRef(BpmnBaseElement value);
0
a1827acecb3cd2fa9b2d1525dadcecba
51f124645eb254432ea1cf5b4853a7c9
获取当前菜单下一级别数量
class WeixinMenuModel extends BaseModel public function getLevelCount($fid = 0) { $map = array(); $map['fid'] = intval($fid); return $this->getWhereCount($map); }
1
a202397d9592b20e342532a59eba6274
19f428089c6d8d906e2e5738fd11e0f2
Permet de modifier le jour de début de l'affichage.
QDate nouvelleDate = ui->dateEdit->date(); for(unsigned int i = 1; i < 7; i++) { if(nouvelleDate.dayOfWeek() == 1) break; nouvelleDate = nouvelleDate.addDays(-1); } firstDay = nouvelleDate.dayOfWeek(); firstDate = nouvelleDate; for(unsigned int i = 0; i < 7; i++) { ui->tab...
1
5d8bfdc374c7ac8dc9473575af583aa4
5d4b8aee050c8be7b62d28abc84bb678
Helper to read our particular format of metrics files
class MetricsParser(): def __init__(self): pass
0
95c4f9be449002c6263283b24b1f329b
76c4f01c833d5cea8a20bde5feaab21c
check lowest common level of indentation
class TaskPaperItem def effective_level if !@parent and @type != TYPE_NULL return @extra_indent end parent_indent = -2 if @parent parent_indent = @parent.effective_level end return parent_indent + 1 + @extra_indent end
0
70d50b4382a0fd1074c60e5bf3efc2ed
9f331e860affc8289ffe74aedb0fcf8e
获取当前管道流量的大小
def get_network_flow(os): if os == "Windows": c = wmi.WMI() for interfacePerTcp in c.Win32_PerfRawData_Tcpip_TCPv4(): sentflow = float(interfacePerTcp.SegmentsSentPersec) receivedflow = float(interfacePerTcp.SegmentsReceivedPersec) present_flow = sentflow + receivedflow time.sleep(...
1
5b07b016c08399ad856ddf44dc9d2708
e7b1b0778d57af8241d525cee566a73c
Ensure can manually disregard {@link Governance} on {@link ManagedObject} bound to {@link ProcessState}.
public class OptionalThreadLocalManagedObjectTest extends AbstractOfficeConstructTestCase public void test_Process_NotAvailableWithTeam() throws Exception { this.doManagedObjectTest(ManagedObjectScope.PROCESS, false, true); }
0
062005f14be98cf9009da0c9fd8fcb45
062e74395f5863d46f22a80327d05581
Método para efetuar exclusão do produto ao clicar no botão de Excluir
if (id != null) { this.produtoService.excluir(id).subscribe(response => { this.toast.success(response.messages.SUCCESS[0]); this.produtos.splice(index, 1); }, error => { console.log('Console: ' + error); this.toast.error(error.mensagem); }); } else { this....
1
bf016cdf4c05acac8af0080c28b4ef60
e54e15fd0a1f43a2890f3f73d9d0e092
获取定时器启动到现在经过了多少(秒*100)
namespace POSH.sys.scheduled public class RealTimeTimer : TimerBase public override long Time(){ return CurrentTimeStamp() - _base; }
1
2c3db46a1c3317be48e949bc22933352
d530b240080cafe1e1622f1ccdc62fbd
Prints the receipt to standard output
public class OrderPane private void printReceipt() { System.out.println(customer.getCustomerInformation() + order.getOrderInformation()); }
1
40b2d1f98f94f27f69a3f3ca64df6e0f
97c752b2dce643077d4deafe572c7c55
Draws a frustum rect.
void drawFrustum() { glDisable(GL_LIGHTING); glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_GEN_S); glDisable(GL_TEXTURE_GEN_T); glPointSize(5.f); glLineWidth(3.f); glBegin(GL_LINES); glColor3f(1, 0, 0); glVertex3f( gViewPosition[0], gViewPosition[1], gViewPosition[2] ); glVertex3f( gViewPosition...
1
734cfa2a91084e51a5ff8fbc9adc764e
eac5e3a30daa15b3c9b39d70b2357658
Test get attribute from request
with client.application.test_request_context(): response = request( client.get, url_for('html_employee', person_id=1)) assert 'EMPLOYEE\'S IDENTITY' in response.data.decode('utf-8')
1
07ef2ce30b7817320f6f45edc4076e9b
d00b6fb754b3d7c3c8125fcbd4fa1016
Trying to get client`s id, that is stored in Yii2 users table.
class Client extends JsonClient implements iClient private function requestUserId() { $request = $this->getHttpClient()->get( 'user', $this->getDefaultHeaders(), $this->getMuteExceptionOption() ); $response = $this->getResponse($request); if (!isset($response['user_id'])) { throw new BadResp...
0
b860ff720e9786ea6d7643f51835a92b
a8c1e1db54f4d053d69965ec3ea503a7
读取限位的绝对位置
if (this.cwLimitAbsPosition === 0) { this.cwLimitAbsPosition = await this.driver.readImmediateAbsolutePosition() ipc.callRenderer(this.mainWindow, 'info', '限位绝对位置读取成功') } }
1
29403e7c3a557146bd0ce0476f93e53b
ca4f6df3f35ad9eb2ec736ca1453561a
@brief Enable or disable the lowpower mode for Accelerometer of LSM303DLHC
{ if (LSM303AGR_ACC_W_P2_ACT((void*)this, LSM303AGR_ACC_P2_ACT_DISABLED) == MEMS_ERROR) return LSM303AGR_ACC_STATUS_ERROR; return LSM303AGR_ACC_STATUS_OK; }
0
802cde40f695b1cd873ebea6b9560d64
1bf92432f79c985ac21ea8b49f630b3f
Internal cleaning process.
class AssModule(AssI18n): def clean(self): rmdir(self.apk_file+".smali", True) rmdir(self.apk_file+".java", True) rmdir(self.apk_file+".index", True) remove("classes-dex2jar.jar")
1
e1c4669d827b2f969ff644509c689c0c
d6e4da750b220dba6741b5f107e6262d
根据搜索关键字查询记录返回articlefound视图,每20条视图做一次分页
def search(): keywords = request.args.get("keywords") page = request.args.get('page', 1, type=int) pagination = Article.query.order_by(Article.time.desc()).filter(or_( Article.title.like("%" + keywords + "%")if keywords is not None else "", Article.content.like("%" + keywords + "%")if keywor...
0
2ae440ec4946f3b312eada09325b4b23
e6a8a85386632123c3b5cb037bc88d64
Gets the merged style sheet that applies to this document, resulting from the merge of the document's default style sheet, the document linked or embedded style sheets, and the non-important part of the user style sheet. Does not include overriden styles nor the 'important' part of the user-defined style sheet.
@Override CSSStyleSheetList<? extends CSSRule> getStyleSheets();
0
7435e513b11f12c19677870de233c63d
cd1a7bbf2cd90c0115410fc516badeea
调用系统播放器 播放视频
function playVideo() { var intent = { action: "android.intent.action.VIEW", uri: "http://www.szohr.cn/mp4/mdnd_360p.mp4", type: "video/*" }; clouda.device.activity.start({onsuccess:onsuccess,onfail:onfail,intent:intent}); }
1
191247faff1cb53eed21e18aa06146bc
e0af60cb8d1348640c6681e3e29d0d15
Prueba que no se elimine un producto del cual no seamos el vendedor
{ $this->demoAdminLoginIn(); $product = factory(Product::class)->create(); $this->call('POST', '/products', [ 'name' => $product->name, 'price' => $product->price, 'quantity' => $product->quantity, 'category' => $product->category, ...
0
c2bd8fa9c6e18bd405ecd641dc0c92d3
4e4cd8c078f602f46c893345571dfb30
créé les sprites du menu, et donne leur position
{ spriteBatch = new SpriteBatch(GraphicsDevice); ball.TextureObject = Content.Load<Texture2D>("ball"); ball.PositionObject = new Vector2((screenWidth - ball.Width) / 2, (((screenHeight - ball.Height) / 2))+(screenHeight/4)); ball.InitialisationRectangleDestination...
1
d360a6ee2aab1bd75c075d1c2c7dd657
618e7e8403785d1024887a9e9de1e9e8
Set method that (1) auto-saves if possible and (2) auto-creates sections.
$sect = $this->sections[$name]; if (NULL == $sect) { return FALSE; } return $sect->save($prop); }
0
f1ddeba03f5323876e9a17dfe878f857
98f2b56cbe23641523a42b0f8cb35fcc
Vraćanje zadnjeg izvršenog upita
class Model{ public function getLastQuery() { $lastQuery = $this->conn->last_query; return $lastQuery; }
1
63c0870ebcc3c51ab432e6c9a3ed732b
67ffc5f3c0e1a972dcb50cd65c4df635
Update the users in the store by mapping over them.
return findUsersBy(matcher) .then(function (entries) { return entries.map((user) => _.merge(user, data)) }) .then(function (entries) { return _.cloneDeep(entries) }) }
1
96aa8feae236aa17b21318e76369d698
0bd3e11449640aa86fb694df901269a8
Moves the caret to the specified location, staying in the current text view if possible. https://pytools.codeplex.com/workitem/1649
{ int num = 0; if (shift) { this.caretSelectPositionInternal = num; } else { this.caretPositionInternal = num; this.caretSelectPositionInternal = this.caretPositionInternal; } this.UpdateLabel(); }
0
8178f18638a241e29392af30f7cfc777
a04ed61cf4dbda01b2d04536dda874c1
Define query scope that will fetch only records that have been approved by management.
class Comment extends Model public function scopeApproved($query) { return $query->where('approved', 1); }
1
924b0c64e480d380143293cad2a0d89d
e9c1658ab34c7ff67a34f26693e7b796
移除模型阴影部分
{ mFadeColor.a = 1.0f; if(mFakeShadowRender != null) { mFakeShadowRender.sharedMaterial = null; mFakeShadowRender = null; } if (this.shadowDynMat) { ShadowManager.Instance.FreeDynShadowMat(thi...
1
3a76ab7f6dee2188b1aaa53a158754c9
b90781a533da9afb11b661cbc6a9c598
метод обработки исключений грида, когда пользователь вводит не целочисленые значения в столбец "количество часов"
namespace ИС_Книжный_магазин public partial class Catalog : Form private void dataGridViewOrderedBooks_DataError(object sender, DataGridViewDataErrorEventArgs e) { MessageBox.Show("Введены некорректные данные. Попробуйте ещё раз."); dataGridViewOrderedBooks.CurrentCell.Value = dataGr...
1
4d8a83351297f3369ee9e9536b961c1d
3a4c9fadd10159112a408c6c39c23c9b
Get list of 10 recent passwords. This returns a list of MD5-encoded password strings that the user used recently. The list does NOT include the current password. Use this to enforce that the user does not reuse a password multiple times. If there are have been no other passwords then the current, this returns an empty ...
class PyCSN(object): def GetRecentPicks(self): return list(self.phidget_sensor.recent_picks)
0
69e56be6aeaefce4e31c7a3dba65b3eb
0c1d539a1619b1745cc6e9f09dd78b9c
<p>The label for this input. If you’re using PaperInputBehavior to<br>implement your own paper-input-like element, bind this to<br><code>&lt;label&gt;</code>‘s content and <code>hidden</code> property, e.g.<br><code>&lt;label hidden$=&quot;[[!label]]&quot;&gt;[[label]]&lt;/label&gt;</code> in your <code>template</code>...
public class InputOption implements HasLabel, HasDisabled, HasName, HasSelected, HasValue, JsonSerializable @Override public String getLabel() { return this.label; }
1
5f97aeb592bcb53f1856b47cc67bfe42
0f92bf7267be142f7743993ce298112a
Virtual method for loading data asynchronously.
namespace VDesktope.Core.LoadForRepository [VkApiDataSourceType] [Inject(typeof(VkApiClient))] public abstract class LoadForRepositoryFromVkApi<TData, TParams> : ILoadForRepository<TData, TParams> protected abstract Task<TData> OnLoadAsync(TParams parameters);
1
5d4ba3445fdfa28217ee275d16b29f8a
65366c8e3a2b6a54e7c67e9a474764df
Test Vanguard Not Found Exception
mock_get.return_value.ok = False mock_get.return_value.text = '{0}{1}'.format( '{"errorCode":404,"errorId":"ap3int-sv2.2018070302.2773846",', '"errorMessage":"API handler not found"}') with self.assertRaises(exceptions.ApiError): response = fetch.fetch_entry('...
1
0e2d4d1a95c4845435baaa6f5366f80d
7c5ceb1ed5a9718aac85f47b8b6dcda4
删除二人的某条消息
class MessegeModule extends AppModule public function deleteMsg($mid){ $this->begin('messege'); $flag = true; $r = array(); $r['eq']['uid'] = UID; $r['eq']['mid'] = $mid; $rst = $this->import('messege_user')->remove($r); if($rst){ $r = array(); ...
1
5f7f014a7b0e1b73ca93a9d425402212
084b514c895f67e3cbacf5f32d48528c
Minimum change to get an non-isomorphic graph. Maintains degree profile. Does a two edge swap. This still may result in a isomorphic graph
G = copy.deepcopy(G0) n = 0 swapcount = 0 a = dict(G.degree()) keys, degrees = zip(*a.items()) cdf = nx.utils.cumulative_distribution(degrees) while swapcount < nswap: (ui, xi) = nx.utils.discrete_sequence(2, cdistribution=cdf) if ui == xi: continue ...
1
212e184d62b76657d78d11f15e5cca0b
224544429c5d6a7ca1d8191fbcc85423
A default method for marking an object as ready to be destroyed
def mark_for_destruction @marked_for_destruction = true end
1
c36037ffd9d5b460a6613945ae8dde1a
8530995c907b453db1ae0f0fa160760d
Tests certificates generation task submission api
issuer_name = request.param.get("issuer_name") cm_yaml = f"{TEST_DATA}/virtual-server-certmanager/certmanager.yaml" create_generic_from_yaml(cm_yaml, request) wait_before_test(120) create_issuer(issuer_name, request)
0
b87a93097c11dd452646ccf5bb41f010
3c57ac09e51f9cc8b3464468ba28225a
Grants permission to return information about the task logs for the specified task Access Level: Read Possible conditions: https://docs.aws.amazon.com/dms/latest/APIReference/API_DescribeReplicationInstanceTaskLogs.html
def describe_db_log_files(DBInstanceIdentifier=None, FilenameContains=None, FileLastWritten=None, FileSize=None, Filters=None, MaxRecords=None, Marker=None): pass
0
b39c12f68f3a969954d4e30516ad6400
5bdd3f4a25cfa12ac4579b925606487d
синхронный запрос к серверу для проверки наличия файла книги на сервере
var dfd = Q.defer(); if (book.view) { book.view += 1; } else { book.view = 1; } chrome.extension.sendMessage({ name: 'cache', key: book.id, value: book }, function(cache) { if (cache) { dfd.resolve([cache]); } else { ...
0
4f3703e37649d0bad47937c60897dc44
7d8cb1f1ee41d889f9bf249cb286e504
פונקציה המחזירה טבלה של מידות לפריט בצבע מסויים בסטוק
namespace pizzacımv1 public partial class systemSettings : Form void get(String columnName, String columnPrice, String table, ListView listView) { listView.Items.Clear(); form1.cmd.CommandText = "SELECT * FROM " + table; form1.cmd.Connection = form1.connectDb; ...
0
fccc4ede65f9580b03eb6cda039549f8
cf9ae81a2d121836ad1360fb63891937
Returns a dictionary containing information on all available runes.
class GetList(_routing.Controller): def exec(self) -> dict: r = {} for c in _api.get_all(): if c.startswith('_'): continue r[c] = { 'title': _api.get_title(c), 'symbol': _api.get_symbol(c), } return r
1
1d68fef5932f38a72f73f31e4801235f
c89f473c26a595cdcde78ef1fac33df1
前回の送信から10秒間隔が空いていればバッファーした直後に自動的に送信する
{ TimeSpan currentSpan = DateTime.Now.Subtract(check); if (currentSpan.Seconds > 8) { sendFlag = true; } if (sendFlag == false) return; if (SendList.Count > 0) { byte[] sendbytes = SendList.Dequeu...
0
193a5825f89c3c650b375e22a4c68086
973bc3a8ad6d5e4474a1266b9e720820
Returns combined hash from two hashes one - existing (combined) hash so far two - hash of new element one = join(one, two)
function combineHash(h1, h2) { return (((31 * h1) | 0) + h2) | 0; }
1
2be273952ceb725718c80b3e0f2c887b
515b81481b0b97d0387490407a55bf8f
This adds a property descriptor for the Mime Content Type feature. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add( createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DatatypeMap_toMDMI_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_DatatypeMap_toMDMI_feature", "_UI_DatatypeMap_ty...
0
b49cb673fee95d16ab7ed849acf90911
dd346d92c6faeb8ce25df447c36955fe
Change alert count in header for upcoming trip
function updateCounter() { document.getElementById("travelled").innerHTML = travelled + ' ft'; document.getElementById("increments").innerHTML = ' | Per Click: +' + mode.speed + ' Per Second +' + perSec; }
0
dff3fcc63a75ffb9c348f27b80d517fa
e3e89639c264d3b5dd0775cbd817f269
function to sort the money board
var rows, switching, i, x, y, shouldSwitch; rows = document.getElementsByTagName('tr'); switching = true; while (switching) { switching = false; for (i = 1; i < (rows.length - 1); i++) { shouldSwitch = false; x = rows[i].getElementsByTagName('td')[1]; ...
1
d2dda20620ca97fd436c632a710d399a
7745e3b1e18b29ca88b2c9d06f4e6888
Following method updates the contents of the Upload tab
{ CString str; CString str2; m_UploadList.SetStrings(); str.Format( "%s (%d)", m_ExtStr.LoadString( IDS_TAB_TITLE_ULOAD_TEXT_ENG + g_unStringLanguageIdOffset), m_UploadList.GetItemCount() ); GetDlgItem( IDC_UPLOADS_STATIC )->SetWindowText( str ); str = m_ExtStr.LoadString( IDS_ULOA...
1
255a7f21d04ab27be3ee19779003e5d5
0358c6f898148fcd5b35721d36aa8f2e
returns album name for a given track id
if 'album' not in id3info: album = 'unknown album' else: album = id3info['album'][0] return album
1
94373cfbe2ac695e608b25c27e1f33c3
d98d3bcb2d370d9044e1588cb293acc7
根据displayvalue 获取枚举
public static AnalyzePhase valueOfByStoreValue(String storeValue) { for (AnalyzePhase curEnum : AnalyzePhase.values()) { if(curEnum.storeValue().equals(storeValue)) { return curEnum; } } return null; }
0
9c4290fdba1faef0eb5f7b227dbe7177
c32235b4932a24f6d3ba677d8a8a9f75
Creates a new JWT builder for the provided identity account id.
return &SessionBuilder{ identityStore: identityStore, preKeyStore: preKeyStore, signedPreKeyStore: signedPreKeyStore, sessionStore: sessionStore, recipientID: recipientID, deviceID: deviceID, } }
0
a4d04d41dd7243dabfa91f9ccc8ada3a
6b811a97874b1ba5c2b8d2e6fb98d42a
Indicates whether the EntityManager's state should be flushed each time an aggregate is saved. Defaults to {@code true}. <p/> Flushing the EntityManager will force JPA to send state changes to the database. Any key violations and failing optimistic locks will be identified in an early stage.
expect class MutableDBOptionsBuilder fun avoidFlushDuringShutdown(): Boolean
0
15146bf303bd869e53005fd05d4202d7
ec965a1f3357292b61d074b35bcd0d89
正则:座机
class RegexTools static getPhoneRegex() { return new RegExp(/^[ \n\r\t]*(0|\+[1-9]{1,3})[0-9]{9,12}[ \n\r\t]*$/, 'g'); }
0
3b21031c7e53cc3a380071a49a06180d
cf69da945b5dfb5fd1a742b99eed3429
This method has been deprecated, please use method buildNotReadyAddresses instead.
@Deprecated void initRoute(Service service, Web3j web3j, ECPrivateKey ecPrivateKey, String address, List<String> topics);
1
c5479d514ea72e5508604326c5b110ff
98eaac4fb857c34f8571464b4d91fe0e
Devuelve los clientes que no esten activos (propiedad boolean bactivo = False) No recibe ningún parametro
public List<Cliente> findByBactivoTrue();
0