query_id
string
corpus_id
string
query
string
code
string
label
int64
7110924124fb189ec5bfd2cf8a637e4d
9e2587ee146b72528bac7ee48481f16e
鼠标移到元素上悬停,通过JavaScript
class WebDriverBase: def js_mouse_hover(self, element): self.driver.execute_async_script(self.driver, "doFireEvent", element, "mouseover")
1
4519b982aec808a1d5e5d06435109466
9f9749f86075e7a0bd8c806a668022b0
Cadastra um BluRay de show
public class Facade public void cadastrarBluRayShow(String nome, String telefone, String nomeItem, double preco, int duracao, int numeroFaixas, String artista, String classificacao) throws IllegalArgumentException, ItemCadastradoException, StringInvalidaException { sistema.cadastrarBluRayShow(nome, telefone, nomeItem...
1
bc03956f8c832cf9116a9b35555b6f76
a3a789fdbe2c59f51dcd86a74977caa7
Gets the user's work items
namespace Romontinka.Server.Core IEnumerable<WorkItemDTO> GetWorkItems(SecurityToken token, Guid? repairOrderID, string name, int page, int pageSize, out int count);
1
4bfd59e3cbc070610e7add81982147c9
c1b1ddc4fc176389572dd8e5f47d5ed1
获取上牌省列表
url = mk_url('superbrain', 'api/src/getProvinces') r = requests.post(url, cookies=cookies_bidding) return r.json()
1
05bf79e03d09df23beba5aa96dcada1c
b958cdbb8779142d6818e55708d7efff
Initializes velocities as i.i.d gaussians
{ do { vel[0] = ((double) rand() * (velSize/sqrt(3))) / RAND_MAX; vel[1] = ((double) rand() * (velSize/sqrt(3))) / RAND_MAX; vel[2] = ((double) rand() * (velSize/sqrt(3))) / RAND_MAX; } while ( ! isfinite( vel[0] + vel[1] + vel[2] )); }
0
46e5f73993d299eaab070f1ec2c2052e
2dd55758a99e67428e9cf391972c9e68
Sets the mailingAddress attribute value.
public class Member public void setMailAddress(String mailAddress) { this.mailAddress = mailAddress; }
0
71d71a7cc2346b6561ac842b27fb3212
8641d7ecaa2b430e4ec1a599ed23a993
When client starts, check if an anchor needs to be imported
{ if (anchorTransmitter == null) { anchorTransmitter = new GenericNetworkTransmitter(); anchorTransmitter.RequestDataCompleted += RequestAnchorDataCompleted; } }
0
65cc9491cd6683cf53cc38dc7905bb79
0fb498fe887e678d8c069d87883a0f77
Asserts that the DataBatcher returns the correct output 2 data after an epoch roll over.
class TestTransformer(object): def test_next_epoch(self): self.transformer.next_epoch() assert self.data_stream.next_epoch_called
0
651b5a798a9e9488404d50eba5a055ff
ddd69c684a8d4b2e0f08826c32101183
Get basic information on observed field. obs date, total integration time, fields (name, ra, dec), # of antennas, total bandwidth
return {'filename': ['hsi_obssumm_20031101_157.fit', 'hsi_obssumm_20031102_161.fit', 'hsi_obssumm_20031103_165.fit', 'hsi_obssumm_20031104_168.fit', 'hsi_obssumm_20031105_156.fit'], 'orb_st': [65536, 6553...
0
134eb02c69cbcbf1691c64a1f77a4fcf
58c3f5b8ef57b29e23382f1f4dfca600
加载左侧QListView的线路数据
{ _DataList.clear(); SqlHandler::instance()->loadData(_DataList); int iRow,i = 0; QString name,phone; std::list<std::string> ListStr; DataList::iterator it; iRow = _DataList.size(); _itemModel->setRowCount(iRow); for(it = _DataList.begin();it != _DataList.end();it++) { st...
0
386b3da30e94fb4ad459e638f850fce5
6a518bd52180ba612e8f9c4da9460c95
Get the number of running tasks
abstract class Mediator implements ITask public function running_count() { return count($this->running_calls); }
1
10a6b98a249a4c9ed7fd254186067d05
f330e618b30b07103fbe275b1038cf7e
Destructure a qualified name.
namespace AddyScript.Ast.Expressions public class QualifiedName : IComparable, IComparable<QualifiedName>, IEquatable<QualifiedName> public static QualifiedName Parse(string value) { return Parse(value, "::"); }
0
c1bd1c3e508aa34ce0362fbf49671568
094fd0e4dd4183c0f3067cdb07582ce0
通过 session id 获取 session 存在 redis 的 key 值
class Redis implements SaveHandlerInterface protected function getSessionKey($sessionId) { return 'session_' . $sessionId; }
1
ba4ce6ee73e0ccb70d8e513021b1551c
656415e37fd504b10f8c41d72b44728a
Gets the liferay user id.
public void setLiferayUserId(long liferayUserId);
0
02305d02bec3b0168663ab6974967052
6e228d6bfb4c9f680aedb5fb62538716
Generate an RSA keypair with an exponent of 65537 in PEM format
def generate_pem OpenSSL::PKey::RSA.generate(2048) end
0
18f9b5729c87cbb2269c19313f096e3b
fc5438f865515dd48f1b12b7a74506f1
X -> S
class CPU(val mem: Memory) private inline fun opTXS() { rS = rX }
1
31779b9a25e9c4a35ea851800ee02d4d
076bc991b499aa003cb9aa44da713b5a
Set the value of fkdistributivocursoasignaturaid
public abstract class Valor_variableBean implements javax.ejb.EntityBean public abstract void setFk_valcampo_campo_cv_id( java.lang.Short newFk_valcampo_campo_cv_id);
0
676b568f64e9ae1e8b86a1e65467a41d
ede83a5707a80af6718f6dc98bba8f70
Retourne l'ID de l'utilisateur s'in est connecté
class Authentication public static function getID() { if (!self::hasID()) return -1; return $_SESSION[self::$_VAR]['USER_ID']; }
1
de0ee9db9fb785b8521fda89f93dc3fd
73598530b661f406fdaaa4e363a79fc0
回复动态消息
boolean ReplyDynamicComment(ReplyCommentReq replyCommentReq,String userId);
1
887894a24a96114225a42ba7221da468
fd2a6423dffe870df3bc885f2f84834e
Restores a specific package version for a user.
namespace Octokit.Reactive IObservable<Unit> RestoreForOrg(string org, PackageType packageType, string packageName);
0
f677d15e2e9a6f1437936cb4010069c9
2e9a1715e617d1a78d7584b40e2d9059
make short term predictions until interrupted.
void pred_main(algo_data_t *wd) { while (!(wd->finished)) { #pragma omp critical (CGP_ARCHIVE__PRED_POP) { ga_next_generation(wd->pred_population); } if (wd->baldwin_state.new_predictor_length) { #pragma omp critical (BALDWIN) { int...
0
69ffb70b218472347a9921eb9c8470c4
f2ea5dec8b03b8f1354088d13a554659
Should return the unique suffix part of the class name i.e. the class name without the prefix which is common for all implementations.
public class GenerateTestCommand extends AbstractCommand public String getTestClassNameSuffix() { return testClassNameSuffix; }
1
5e286d0abee9e00806e8cd49e75bab13
a5c5b3b89f9bddd9e222c8eb44093336
Adjusts prediction of reward of the picked option.
class Strategy: def outcome_shift(self, num_outcomes: list, l_rate: float, g_rate: float): if self.strategy == "Greedy": if l_rate <= g_rate: raise ValueError("Invalid rates. l_rate > g_rate for strategy = 'Greedy'.") if self.strategy == "Neutral": value = (0,0) ...
1
247074b78dbc14e88c8c44e755d55d5a
1368a36ab6697c3171bd64382a438534
Increment the reported spammers count.
function spam_counter() { $s_hits = get_option('spamjirut_spam_hits'); update_option('spamjirut_spam_hits', $s_hits+1); }
1
65c462b59bda3df51643776d01d37159
ce8b042f080eeb94daa65b980121762a
アセットを取得する(同期版) ※呼び出し非推奨
if (isAsync) { LoadABAssetAsync(abName, assetName, callBack); } else { if (callBack != null) { callBack(LoadABAsset<T>(abName, assetName)); } } }
1
64a14cddf0a4e201f384a8349ec17ffa
989fc77307410df3b6769fa0b6b405f1
判断字符串是否为整数。整数的范围包括正负整数,无数值上限或下限。 待判断字符串
public class StringUtil public static boolean isIntegerEx(String str) { str = str.trim(); try { Integer.parseInt(str); return true; } catch (NumberFormatException ex) { log.error(ex.getMessage(), ex); if (str.startsWith("+")) { retu...
1
048af5491b0635ed08df6ed525100f7f
a79120abe86ea58467e78dcbdfd9d546
Returns the length of time before commit logs should be deleted from the database.
class SystemParameter extends AbstractRepository public function getDataRetentionDeleteLimit() { return (int) $this->fetchValue(Entity::DR_DELETE_LIMIT); }
1
7bdc61dea6c3075009c12b48a747a792
d4380119f5841d4fea0715748d266202
This function populates the the Table in corrective action reassign page
{ String TSNumber = GridViewCorrectiveTS.SelectedRow.Cells[1].Text; HttpContext.Current.Response.Redirect("./ViewTS.aspx?TSNumber=" + TSNumber ); }
0
643ea8f1678c49cedd69b160dd7fb3f7
35030b81eab24c64c17234eddf1b28a6
Formats date-time accordig to format string and the culture of the format provider. If format is null or empty the short date pattern is assumed
namespace System [__DynamicallyInvokable] public string ToString(string format, IFormatProvider provider) { return DateTimeFormat.Format(this, format, DateTimeFormatInfo.GetInstance(provider)); }
1
8915decc3af81534d626a081eed74451
f180577588c8db8e76a242ef7b5f0bd2
Converts this period in weeks to a duration in milliweeks assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute. <p> This method allows you to convert from a period to a duration. However to achieve this it makes the assumption that all weeks are 7 days long, all days are 24 hours long, all hours are ...
if (duration != null) { return duration.getHours() * 60 * 60 + duration.getMinutes() * 60 + (int) (duration.getSeconds()); } return 0; }
0
6a29da4ed45e1c1d19f810891731530f
049c01f0e539a4986e7920b87f2097d9
checks whether Player B played a valid card when the talon is closed
if (game->curr_player_played_card == 0) { if (game->curr_player_draws == 0) { return FALSE; } if (game->active_draws > game->curr_player_draws) { return FALSE; } } return TRUE; }
0
fb36e32008cb7edfef69c7ea531d11a3
01ff311b2e63e1086150a5f5c4ef123c
将target的图片复制给original对象
function copyImg(sourceCav: CanvasRenderingContext2D, targetCav: CanvasRenderingContext2D) { let imgDatas = sourceCav.getImageData(0, 0, 500, 500); targetCav.putImageData(imgDatas, 0, 0); }
0
de04bd8876341c4f2c6aaa0cea0d7607
461ddaa128f6386283058281b69167e8
Select the top-k models to be part of the ensemble. A model can appear only once in the ensemble for this strategy. :meta private:
if not isinstance(models, list): self.models = [models] else: self.models = models self.n_models = len(self.models)
0
587216f1b37df89bca30688ce7c8be3c
05a2362a0bca3da3e2b656e56b9758f8
<para>Writes commands and queries to the instrument to modify parameters and query</para> <para>device settings.</para> <para>Identifier = RSPWRMETER_FUNC_WRITE_TO_INSTRUMENT</para>
{ var result = new OpResult(); var encoder = new FinsWriteCommand() { Length = 1 }; var decoder = new FinsWriteResponseCommand(); encoder.SetData(value); Write(address, result, encoder, decoder, (r, en, de) => { }); ...
1
3bba19f123045c6153372df93a8ce3c2
d0e64b045fca1fd2796dc90741c4f6ad
Test a False is returned if the code doesn't have a matching Redis entry
class SaleTest extends AbstractWebPageTestCase public function testRedisNotWorking() { $data = $this->Sale->getSale(SaleModel::SALE_OBJECT_VIP, $this->User, true); $this->assertEquals($this->data, $data); $config = Config::get('redis'); $config->servers[Sale::REDIS_NAME]['port'] = 80; ...
1
af21149f8d4a30c9421ab07e4c3d4cdc
40acd60f7b483deed594a29760c812ad
Validate that the value is float
export default class ValidationChain public isFloat(options?: validator.IsFloatOptions): ValidationChain { return this.addValidation({ type: "validation", validation: "isFloat", options, }); }
1
56d7d128d1432a4c39673a41b807c4ae
93c7f8520ee23852a8a87f15c27333a5
画像がアプリにドラッグドロップされたとき、画像を保存する
class MyFileDropTarget(wx.FileDropTarget): def OnDropFiles(self, x, y, filenames): dd_input_image_path = filenames[0] self.window.load_image(dd_input_image_path) return True
0
e233bd6ac21d12ac3e1f36f3104a2ee1
5a77955bfadc5501225f3681e7a27175
Given a list of lists, the list of XOR sums of the cartesian product are returned
def list_xor(ListList): if len(ListList) <= 1: return ListList[0] if len(ListList) else [] d = len(ListList) >>1 l1, l2 = ListXor(ListList[:d]), ListXor(ListList[d:]) return [x ^ y for x in l1 for y in l2]
1
3045035f780a42da394d8e383531b9c0
7fc4cafd0b3f71efa6bc04abafef1a62
利用数组的join(),将数组变成以加号连接的字符串,利用eval方法实现数组求和
function sum3(ary) { return eval(ary.join("+")) }
1
0bfa7675a53edc78584bdd849de70acb
3357fa65ca1f6c596b13039d5c7139b5
@Brief : 送信メールにPOSTデータをセットする関数
class SMS private function setPostData(array $parameters) { $this->postdata = array_merge(CONF['sms']['data'], $parameters); }
0
470ae5a557046c02ffa4e0329c4c58c5
30d96ee8eb4d4ec38bbe2aa0e01a66f1
width and height can not be less than 1
if (width <= 0) { throw new IllegalArgumentException("width must be > 0"); } if (height <= 0) { throw new IllegalArgumentException("height must be > 0"); } }
1
7d6b6a9f2fb969aef386159fba3eb3dc
acfb0dcd6c2499d45458d58d6c820e0b
Locator for options at top menu.
function Options() { this.m_name = "Options"; this.m_itemTitle = "[Options]="; this.m_saveEnabled = false; this.m_saveCurrentWindowOnly = false; this.m_closeSavedTabs = false; this.m_logging = false; }
0
d3281aea64e0d252f73ad96a8735e169
2b2f0d65f06410b537608f470445d722
# 版本提交方法
{ $session=Session::get('youxiduo_admin'); if(empty($datainfo['Id'])){ $datainfo['createuser']=$session['id']; $datainfo['createdatetime']= date('Y-m-d G:i:s'); return Version::insert($datainfo); } $datainfo['modifyuser']=$session['id']; $datainfo['...
1
7ca01b618db4084b67043f86ffaaa067
b67524776c9356735d28f0f944c31692
Returns the triangles of the Delaunay's triangulation
class GOC: def delaunay(self): self.intersection_point = self.crt_intersection() tri = Delaunay(self.intersection_point) self.tri = tri.simplices.copy()
1
2a4c45f18755f62ae67fd77903dd5857
6808c0c97f12b315ca7749f2370fb81b
the Order to the view. The function requires a customer to be logged in. The Order must have been placed by the currently logged in customer.
{ bool isValid = storeDB.Orders.Any( o => o.OrderID == id && o.Username == User.Identity.Name); if (isValid) { return View(id); } else { return View("Error"); } ...
1
13f66f9fbd9f1e8eed576e5849340970
2b39ec059e8e22480730a3a9bfd31be0
This function plots the validation curves of several networks, based on the results of validate_training(). It takes as input a list of validation folders (one for each network), each containing subfolders with dice scores for the corresponding validated epoch.
length = 10000, lowerlim = 0.0, upperlim = None, colors1 = ["lightgreen", "thistle"], colors2 = ["green", "blueviolet"], labels = ["fixed", "uniform"], legend = True, CI = True): fig, ax = plt.subplot...
0
7f2a521e4b4175bae8eab20d2f08b02e
b8a15f62de5f4fa8a5ad5592019f4548
================================================================================================== checkArticle(Connection, long) : (자유게시판) 게시물 삭제전 딸린 글이 있는지 확인 ==================================================================================================
public class ArticlesService public String checkArticle(String url) throws SQLException{ return articlesDao.checkArticle(url); }
0
eafc679cd7c6f829d8a562e8385d43ce
1d0559343eba3876ee93f6c739136710
# propensity score by lasso logistic regression
{ ridge0_cv <- cv.glmnet(x = z, y = tsurv, family = "cox", nfolds = 10, alpha = 0) ridge0_l1se <- ridge0_cv$lambda.1se ridge0_fit <- glmnet:::glmnet(x = z, y = tsurv, family = "cox", lambda = ridge0_l1se, alpha = 0) ridge0_beta <- as.matrix(ridge0_fit$beta, ncol = p, nrow = 1) penalty <- 1/abs(ridge0_beta) ...
0
2aa3baed8fd3a6a2952dbfe67825264d
74b16f039fed27e50b05fe0a68cf3909
附件上传提交页面.
@Slf4j @Controller @RequestMapping("/admin/attach") public class AttachController @Login @GetMapping(value = "") public String index(Model model, @RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "12") int limit) { Attach attach = new Attach(); List...
0
56833d8f6a9e61c888c154da2fd6e502
e93c3644cef043a4b3a091a1efbbd594
decreases by 1 the actual representation degree
public class Sommet{ public void decrementerDegre(){ this.degre-- ; }
1
10387d3c3cf30508f0c0c6b0685bcc39
afa9257fbc1e08a59df92f6a94118ee1
Funcio que canvia l'estat dels camps a editables o no editables
namespace UberFrba.Abm_Chofer public partial class Form3 : Form private void habDes(bool stat) { txtNomM.Enabled = stat; txtApeM.Enabled = stat; txtDniM.Enabled = stat; txtMailM.Enabled = stat; txtTelM.Enabled = stat; txtDirM.Enabled = ...
1
14e66c27ca7cede17e57d33b1a861255
42c26c09df80a150571d0be0f882bda7
窗口滑动滤波
{ int i; for(i = 3; i >0; i-- ) { smoothWin[0][i] = smoothWin[0][i-1]; smoothWin[1][i] = smoothWin[1][i-1]; smoothWin[2][i] = smoothWin[2][i-1]; } smoothWin[0][0] = acc_x << 4; smoothWin[1][0] = acc_y << 4; smoothWin[2][0] = acc_z << 4; Band->Sa[0] = (smoothWin[0][0] + smoothWin[0][1] +smoothWin[0][...
1
ccb5ed529de016c6a25d386c91fdbc1d
41080382aaa1debcdf7084d4f8ed312f
Allows trader array indexing
$this->id = (array_key_exists('id', $trader) ? $trader['id'] : false); $this->username = (array_key_exists('username', $trader) ? $trader['username'] : false); $this->avatarUrl = (array_key_exists('avatar', $trader) ? urldecode($trader['avatar']) : false); }
0
edb7d755b15c8fa51a434dc4a5d93a5d
63ac1bfb051eae3734d0f23b86f4be0e
Add a <see cref="CustomPieceTable"/> to the game.<br /> Checks if the custom piece table is valid and unique and adds it to the list of custom piece tables.
namespace Kosson.Interfaces void AddTable(Type type);
0
6495e7f637ced4209a54a1d1a601f10e
e9ba2b08ad9d47960a076c4364d49287
Return ``True`` if the passed type is a timedelta type.
def array_is_timedelta_or_date_offset(x) -> bool: return all([is_timedelta_or_date_offset(value) for value in x])
0
67cff563381e5999b4c694b8309d6e87
b51d030f21815ad5292f56bd962407a7
FUNCTION DESCRIPTION According to the control which pen long tap on, do the related action PARAMETERS pos [IN] The position of the pen long tap event RETURNS void
gui_icon_bar_struct *icon_bar, mmi_pen_event_type_enum pen_event, S16 x, S16 y) { MMI_BOOL ret = MMI_FALSE; MMI_DBG_ASSERT(icon_bar != NULL); if (icon_bar->flags & GUI_ICON_BAR_FLAG_DISABLE_DISPLAY) { return MMI_FALSE; } switch (pen_event) { ...
0
a9ca731915cb953e3c163e585c1ab4ed
e420523edb32716b99a8ce39c64c5f75
根据文件名,返回i节点序号
for(int i =0; i < entrySize; i++) { if( dEntry[i].getName() == _filename) return dEntry[i].getInodeNum(); } }
1
193024eb5a44cd29080a800f0298327b
e5f029792390d864eeb06fc3b599afcb
THIS FUNCTION INTERPRETS THE XML FILE AND CREATES THE REQUIRED OBJECTS ACCORDINGLY
{ $dom = new DOMDocument(); $dom->load($this->xmlPath); $xpath = new DOMXPath($dom); $query = "//data/event"; $dt = $xpath->query($query); for($i=0; $i<$dt->length; $i++) { $event=$dt->item($i); $e=new Event(); $e->id=$event->getAttribute("id"); $e->cls=$this->getValue($event,"c...
1
e95af567ae68c0c7072ee3da2099c4af
37860ece00b81b02d4dde31ae3b5c3ba
Thread-safe way to get a new request id
{ lock (_api) { _requestID += 1; return _requestID; } }
1
5a7dd6b4f8a7ed5da9cbdf7e21778986
0a7f6ee54f4dae10342e5cd2b7dc9f08
Increase the minutes and kcal for Booty Barre.
{ this.restless = restless - 6; this.boredom = boredom - 4; this.thirst = thirst + 2; this.tired = tired + 2; this.health = health + 2; }
0
d554646f139776a1fc446cbd4e4ef701
ea7267569f4ea9e7d8b40106997b551f
Check if the request header is a bypass header.
namespace AppDynamics.IoT public class WebProxy : System.Net.IWebProxy public bool IsBypassed(Uri host) { return false; }
0
42e10c5bd62ed1a33e3bdf39b3486bf7
1469af0417e54e64d30d2c364f41764a
Inputs : Pointer to the SMIF global context Pointer to the msg of API received by SMIF Outputs : None Returns : None Description : This is the handler function for RACH OPT SMIF_INIT_IND msg
static void son_mif_sonmlb_init_ind_handler ( son_mif_gb_context_t *p_smif_gb_context, void *p_msg ) { SON_UT_TRACE_ENTER(); LTE_GCC_UNUSED_PARAM(p_msg); p_smif_gb_context->init_ind |= SMIF_SONMLB_INIT_RECD; son_mif_check_for_smif_init_state(p_smif_gb_context); SON_UT_TR...
1
f9c8a082cb3cd738977706cc2eae5e99
5fe42b14f90bbcf442a311a93e1b545c
Parse a latitude written as two digits for the degrees, two digits for the minutes, the letter N or S for the orientation and optionally two digits for the seconds that may be followed by a decimal part.
function ParseCoordinate(coordinate) { if (coordinate == null) { return ''; } coordinate = coordinate.toString(); coordinate = coordinate.replace(/([0-9][0-9][0-9]?)([0-9][0-9])\.([0-9]+)/,'$1 $2'); coordinate = coordinate.replace(/[^NESW0-9\.\- ]/gi,' '); var neg = 0; if (coordinate.match(/(^\s*-|[WS])/i)) { ne...
1
591e5521eaa9911d7c2e2137a22db44b
9b221be5afc63b6e53a381c7de7eac52
On définit les paramètres du menu du Dashboard d'Easy Admin
{ $resolver->setDefaults( array( 'url' => false, 'title' => 'dashboard.menu', 'label_catalogue' => 'PUGXCmfPageBundle', 'template' => 'PUGXCmfPageBundle:Block:menu.html.twig', 'tree_id' => 'menu_admin', )...
1
67344e73ee54ca120ea9919d054d6682
cf6e8c4a9794d780ab4a50a7675fd36a
マウス左ボタンのドラッグ中に呼ばれる
class PerpendicularTool(Tool): def left_drag(self, event): if self.p: self.p.set_coord(event.x, event.y)
1
097a7908287a6a48a3f6204797ed4a1c
c5632f09c412972b4b79c550b23614a3
下拉列表选项的数据获取(接收人)
def Get_Org_UserList(request ): log = public.logger body=public.req_body form_id = body.get('form_id') form_var = body.get('form_var') select_key = body.get('select_key') if not select_key: log.info("选中机构不存在!", extra={'ptlsh': public.req_seq}) public.exc_type, public.exc_value, p...
1
e040ba5aa1d62772871e8b55e7979558
fc5f2a8db2c7236654f93007d162b27a
指定された名前の変数を新しいスコープから順に探し,値を代入します.
{ std::smatch matches; while (std::regex_search(s, matches, reIsVar)) { const size_t index = s.find(matches[1]); const std::string deepestName = mem.getDeepestName(matches[1], scopeName); const Object var = mem.getVar(deepestName); if (type == -1) type = var.type; std::string val; #define TO_STRING(type...
1
86d20ac0e0fa556b9ab05224859a0ddb
93541101753bc1174090f90d05a6b61d
用户扣除积分并添加课程
class DuiBa(object): def __deduct_credit(self, uid, reduced_credit): user_csu = UserCSU.query.filter(UserCSU.uid == uid).first() left_score = user_csu.score - reduced_credit if left_score >= 0: user_csu.score = left_score return True, left_score else: ...
0
b90b2e9b8e353cd6df60cb1329c682cb
69447397f3feebfa4b6bca1fddb0b228
Returns html code for url preview edit form
global $authorid; $previewForm = " <form name=\"preview\" action=\"job.php?action=activity&job=preview\" method=\"post\" target=\"preview_page\"> <input type=\"hidden\" name=\"actmid\" value=\"$actmid\" /> <input type=\"hidden\" name=\"tid\" value=\"$tid\" /> <input type=\"hidden\" name=\"authorid\" value=\...
1
db449ad9043f9b5f1f9b2a05f59c71d0
8d00227a9677b4365c240555d8857398
Create a server pool Creates a pool for a particular service and version.
public class PoolsInner public ServiceFuture<PoolInner> createAsync(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch, final ServiceCallback<PoolInner> serviceCallback) { return ServiceFuture.fromHeaderResponse(createWithServiceResponseAsync(...
1
9f983e92008df58df75779cf1b509fe7
5c5448a1ce5d9d2b3de0dec559d2ed77
agrees with compute_Zbar
Z_Amb Z1, Z_Amb Z2) { if ( Z1.size() != Z2.size()) return false; for( auto& [key,coef] : Z1) { if ( Z2.find(key) == Z2.end() ) return false; if ( Z2[key] != coef ) return false; } return true; }
0
f0d7048c010dbb358736552d80021110
10dc2725558dfd98c90e756d522eec24
takes one argument - a string of hex values returns one value - char representation of the string
def hexs2ascii(hexs): return chr(int(hexs, 16))
1
26cef489f7fd3287657453a09a7f770f
853d6ac67371582fae895d5a8d7b5060
returns the direction of the scroll.<br> SCROLL_HORIZONTAL or SCROLL_VERTICAL
public class Control public ScrollTo getScrollDirection() { return scrollDirection; }
1
a2a681189ce220bbbf795bb6ad9c6219
6be02004ed6c83485c9991050b7cf5a5
read mouse events and generate history tables
DWORD WINAPI IN_SMouseProc (void* lpParameter) { DWORD ret; int value; while (1) { if (!use_m_smooth) ExitThread(1); if ((ret = WaitForSingleObject(m_event, 500)) == WAIT_OBJECT_0) { int mx = 0, my = 0; DIDEVICEOBJECTDATA od; HRESULT hr; double time; if (!ActiveApp || Minimized || !mouseactive...
1
c4a761cf8af98db8e40aee24d2f3bd3e
e9d903899b43d0e793d94dace4b66991
แสดงหน้าคะแนนทุกคน และคะแนนรวม
class PTSScoreController extends Controller public function index() { $types = "PTS"; $user = Auth::user(); $score = Scores::query() ->join('users','users.id','=','scores.user_id') ->join('ekskul','ekskul.id','=','scores.ekskul_id') ->select( 'users.name a...
0
8c1f955b15b2309d25ac631843d9aa56
0d2e90378a85af7a577c79f16c41d169
Recover file extension from file name.
if string.isEmpty(filename) then return filename end local ex = string.match(filename, ".+%.(%w+)$") if ex then return string.format(".%s", ex) end return "" end
1
d68073c74be7d9d60a61b6e698b14694
ee834d189a1350c9ca5b9aed24144665
Gets an overview of the email clients used to open your emails. This is only recorded when open tracking is enabled for that email.
class TransactionalEmailsApi def get_aggregated_smtp_report(opts = {}) data, _status_code, _headers = get_aggregated_smtp_report_with_http_info(opts) data end
0
a3ad807169dcec383ac5dc5de60e50dd
a0f0ee5f6b1fb24f2fd6bde256fde427
{{{ lua completion
function M.cmd_lua(rhs) return string.format("[[%s]]", M.cmd(rhs)) end
0
e98c4f213a194cceda078e0e240036dc
11c3a92fe915c6cc3f2c0e2f320dea74
対象にダメージ等の情報をコピーし、爆発の状態にする
{ anim.SetBool("bomb", true); isAppearing = true; canFight.AttackArea(coll, damage, AttackInterruptType.NONE, ElementAbilityManager.Element.Fire); }
1
003b5c1029dce6c0f086f5637f3353ce
d8620ddeae547501b94c62a7b3bc40de
テクスチャが更新されたことを通知します。
namespace TudoMario.Rendering public void OnTextureChanged();
1
60955375e10584656ec512a2f7cdfa03
d9c2c5728b116594a3567cd1451229ee
binaryComparison() need to be called, if both operand are either null or not null
SYMBOL* checkComparableBinary(SYMBOL* lhs, SYMBOL*rhs, int lineno){ if (lhs->kind == rhs->kind && strcmp(lhs->name, rhs->name) == 0) { if (lhs->kind == structSymKind) { lhs = lhs->val.structFields; rhs = rhs->val.structFields; while (lhs != NULL) { checkCo...
0
5b00a95dc3989f12f9f415225e069fac
206795685fd88d25c1b169e514fdcb36
获取该博客最终的、有层次的评论
public List<Comment> getCommentByBlogId(Long blogId) { List<Comment> comments = commentDao.findByBlogId(blogId); Map<Comment, Long> m = new HashMap<>(); Map<Long, Comment> mForComment = new HashMap<>(); Map<Long, List<Comment>> mForId = new HashMap<>(); List<Commen...
1
54adbcd265d2e70635f34150d12e6709
382a1c0db0349024b3dcd18b378d3e54
Compute the transfer function of a stimulus and response signal.
class Processor: def tc_to_sf(self, tc, fs): if tc <= 0.0: return 0.0 return np.exp(-1.0 / (tc * fs))
0
2e08f91d8ae58777afc8d903759cdb14
3aac03c45e936b0cfffbc776dfad5c92
Retrieves a list of the Forums moderated by a particular user.
ArrayList unfilteredForums = Moderate.GetForumsToModerate(); ArrayList forums = new ArrayList(); foreach (Spinit.Wpc.Forum.Components.Forum f in unfilteredForums) { if (f.ForumGroupID == forumGroupID) if (f.PostsToModerate > 0) ...
0
f578d2bb03ec723800c7d0204dd0cb67
7be314eaa2f228415378608fe720fe9d
设置品牌删除时间
if (this.brandDelTime != null) { return new Date(this.brandDelTime.getTime()); } return null; }
0
4e6441d00b20f730644baf06c0b3650b
e4594b13cc981d43a5ff5bdb7a9f12c9
检查当前登录用户是否具有扔鲜花鸡蛋的权限?
Object[] objects = new Object[]{ "uid",uid }; Response response = service.getWebservice(Api.FirstEgg,objects,Constants.RequestType); Message msg = new Message(); if(response.isSuccess("200")){ msg.what = 12; msg.obj = Boolean.valueOf(respon...
1
993b1eab963cc0871ce3c21ff0a2a054
1b7fced04aedc9a951c695a7875c5ec8
获取指定寄存器的指定位的值
namespace HNC.API public class CNC public bool Get(int index, out int value, HncRegType type = HncRegType.REG_TYPE_X) { return HNC_RegGetValue(type, index, out value); }
0
3f50354461cb2456afa2f59915017bdb
d5b49f82c01fed068df08b5b7971d9da
Tests the active page with default settings.
class SimulationPage(wx.Panel): def OnActivePage(self): self.sbi.restore()
0
ddd983d383d239fd00c55e651ea82093
190a3631bc6e7393ab678d9505434f31
获取Materiel集合
namespace FanHai.Hemera.Share.Interface DataSet GetMaterials();
1
e177cad1eb014a3fae0186a8ea5d6799
26196e6234f84e2592a279b2aa41e85c
Reads an image into an RGB array
def read_image(path): img = cv2.imread(path, 1) img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) return img
1
4f8ee72b88259ba2db9e195c3be7efa8
83682582c6b35e0da9d927a89ed33e87
Seçili anketi siler.
class QuestionController extends Controller public function destroy($slug, $id) { Question::find($id)->delete(); return redirect()->route('questions.index', $slug)->withSuccess('Soru Başarıyla Silindi'); }
0
d939bb3b676795705ba6ca18a1f7635a
05b8670b167862669edbd6e1d401604a
Questo metodo restituisce l'id del locker.
abstract class BaseLock implements ILockHandler public function getId(): string { return $this->id; }
1
4ef83cca0d70468babdeb1057037dd66
95c72a6842ff8b343e31d1ac2b56233d
Create an instance of {@link GetComplaintDetailsResponseMessage }
@XmlRegistry public class ObjectFactory public GetResultMessageData createGetResultMessageData() { return new GetResultMessageData(); }
0
4f968cb81ff315c9cf9ad7463459bc93
4af3f797f7dae2d67b604ecd011a02e0
Returns the type of page this physical address is contained in.
{ if(aPtr < RamStart || aPtr > HeapEnd) { return PageType.Empty; } return (PageType)mRAT[GetFirstRATIndex(aPtr)]; }
1
07185f3afa97c84c62d2cc8561b2e768
9b8a4f4569f296201d2c5a725df1bc85
Prepare chunks for upload of a file of given size. It raises a ``ValueError`` when ``chunk_size`` or ``file_size`` is negative.
lib.ZSTD_CCtx_reset(self._cctx, lib.ZSTD_reset_session_only) if size < 0: size = lib.ZSTD_CONTENTSIZE_UNKNOWN zresult = lib.ZSTD_CCtx_setPledgedSrcSize(self._cctx, size) if lib.ZSTD_isError(zresult): raise ZstdError( "error setting source size: %s"...
0
02ac82486fd83294d4ae16f241d18e22
830e6e02135a0694f93c2220faf6ceed
GET: Aplikasis
class ApplsController extends Controller public function index() { if ( !c_action_allowed('appl','read') ){ return redirect('/noac') ->withSuccess('No Access'); } $appls = Appl::select('appls.*', DB::raw('ELT(appls.menu,"Menu","Hidden") as appl_menu'), ...
1
f6319e74948147e7fa3a852a4d6013d2
c3f98f36be40c4e1969e9b8f18868ee1
Puts mouse back to base position
class Host extends ScreenNode{ revertMousePos(){ this.controller.moveMouse( this.basePos.x, this.basePos.y ); }
1
6127881a676b7987d50d53423c41ba0b
4b71d354103aa34012f0d6107588a721
上传创建液货船中舱的复核照片
interface MainRetrofit @Multipart @POST("auth/shipper/idCard/back") fun uploadBackImage( @Part partList: MutableList<MultipartBody.Part> ): Observable<BaseEntity<IDImageAuthenInfo>>
0
ae7f6b8f66d7a3db045b8f5e7877f124
2b134d3e05bea31c686b45d49fdbc653
This function is used to track if user cancels the App Rating view.
fun onReviewPromptDismissed(context: Context) = BRSharedPrefs.putBoolean(context, BRSharedPrefs.APP_RATE_PROMPT_HAS_DISMISSED, true)
1
c220b8553921169bb4c879da19185d67
dfb3cb65cf7a145946be047a8e4e2375
格式化变量名称 <br/> 将形如 person_name/PERSON_NAME 格式化为 personName
public class NameUtils public static String formatName(String name) { return fixName(name.replace(" ", "_")); }
0