query_id
string
corpus_id
string
query
string
code
string
label
int64
0c416545b05874acb7b44bfd53179efa
9dd93b9d3fedfa1dc9f8f155d3cc4bb0
Get the mandatoryMessage
public class ValidationLogger public String getEmptyMessage(String name, String field) { return getPrefix(name, field) + uiKeys.getString("Validation.mandatory.mayNotBeEmpty"); }
1
4e7e0369c7676ea8e07bc52844e6cffe
52e2c15abcb3c865d492cf197169db90
Load the predefined lists and add choices and values to the questions.
namespace TriviaNow public partial class MainWindow : Form private void MainMenu_Load(object sender, EventArgs e) { listOfQuestions = new BindingList<Question>(); questionsListBox.DataSource = listOfQuestions; }
0
28b82b4e3f7be26f8cee296ce5bd7a32
fff36a187190d4b5c68e377b325053ba
取得用户及下属体现金额的总和
{ #region CommandText StringBuilder commandText = new StringBuilder(); commandText.Append(@" SELECT SUM(Amount) AS 'TotalAmount', COUNT(0) AS TotalCount, ...
0
e504dcf6016c6a51ee462ec84d584cb2
aba14f28556ae88723df3749d10d859c
获取取消推荐的结果
interface ApiService @FormUrlEncoded @POST("bbs/user/action/cancel") fun getCancelpraisePost(@FieldMap parmer: Map<String, String>): Observable<BaseResponse<String>>
1
987fa2b062f61caf9f1bdccdf27a73d5
92e093ad32132681bc1713586cba0c1d
areSame determines if two arrays contain the same values in the same order
var containsSame = true; if (array1.length == array2.length) { array1.forEach(function(item) { if (array2.indexOf(item) < 0) { containsSame = false; return false; } }); } else { containsSame = false; } return containsSame; }
0
6c260e7d41824a7f938f978794721d2d
75a28d084a9bdd34c39b31ff5cd4fea4
Получить список всех пользователей, подавших заявку на проект
$sql = mysqli_query($connect, "SELECT user_id FROM users_in_projects WHERE project_id=$project_id"); $users_in_project = array(); while($result = mysqli_fetch_assoc($sql)){ array_push($users_in_project, $result); } mysqli_free_result($sql); $query = "SELECT * FROM users WHERE "; fo...
0
134bc2df03106692681884daca077b46
b27245f7c2562042e8cdf9bb46c96488
Returns the description of the bundle. The bundle description.
@Nonnull public String getDescription() { return _description; }
1
f7122d1cf13c03541488a8a3f4e61384
2760c5026feab99a469ea34dfeddde44
When a user follows a Bub, it adds it to an array for that particular user for easier access than parsing every single event.
usersDatabase.ref("/users").on("child_added", function(snap) { var len = snap.numChildren(); var key = snap.key; var name = snap.val().name; var interestList = snap.val().interests; if (interestList.indexOf(currentInterest) !== -1) { n...
0
75b752f894117cdb97e8236db5d62e2a
e4c112c736830c81c9f0e53d7035d748
This function is called by the competition switch, and will call all of the control functions that are used during the driver control period.
public void teleopPeriodic() { updateInputs(); handleState(); driveSpeed(); launchBall(); spinControlPanel(); }
1
bc9924bfd905e0a11042ee6e0e50e4fc
f0eb00a1a01e0357c63f4868b856f138
prints all strings representations of all instances or not based on a class. Format: all <class>(optional)
def allInstances(classe): if isinstance(classe,basestring): return allInstances(getMClass(classe)) else: return theSession().findByClass(classe)
0
23d30d3767031f344b83b0b2d6a22f75
7ffe02cb17c23c505074af9dfd0a9f98
从ChannelBuffer中读取一个VarInt. 如果大于32bit, 更高位的bit将会被抛弃
@SuppressWarnings({"WeakerAccess", "unused"}) public class CompactMinecraftClient public static int readVarInt(DataInputStream inputStream) throws IOException { return readVarIntWithLength(inputStream)[0]; }
0
75b91e37729168710cceb7a2534287a3
30ecb296a19fffc4f216b23d26927071
Добавляются пустые(принудительные) переходы. Конечные состояния не дублируются
State trash = null; if (this.isEmpty()) { trash = addState(); for (int i = 0; i < alphabet.length(); i++) addLoop(trash, new CharTransitionLabel( alphabet.charAt(i))); return; } for (State state : new ArrayList<S...
1
dcbe7a923f41487bcd9e4240f02ee1cf
5eb63fcd5b10a5765a6ede647cfb9141
Lista todas as arestas da lista de arestas deste vértice.
public class ConcreteVertex implements Vertex, Visitable @Override public LinkedList<Vertex> getVizinhos() { return listVertex; }
0
d64b1dbf4bb5d3fda74cfa424f833898
73a43bf7514538554f4dfcf683ba5e12
Registers the base modules. These modules are used as template.
class Foundation extends Container private function registerBase() { $this['request'] = function () { return Request::createFromGlobals(); }; $this['http'] = function () { return new Http($this); }; if ($cache = $this->getConfig()['cache'] ?? null and ...
1
e9b08dd9206fac4e49951ec9efd0e2fc
a65075571877c2c7c0e303dc87113d27
パスから読み込み済みのテキストアセット(現在のシーンで読み込んだ、またはグローバルなアセット)を取得し、その内容をJSONとしてパースした値を返す。 パスはgame.jsonのあるディレクトリをルート (`/`) とする、 `/` 区切りの絶対パスでなければならない。 当該のテキストアセットが読み込まれていない場合、エラー。
var path = AAUtils.GetAssetsPathByAssetsRootFolder(assetPath); var textAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(path); return textAsset == null ? null : textAsset.text; }
0
64cc827f75b1effa6c035e3558175c2d
02ee247edb5b9750981211ab62b51be9
Lots o' sub tests, many of which were created to improve code coverage.
test_event_service_subscription(sut) test_push_style_eventing(sut) test_event_error_on_bad_request(sut) test_event_error_on_mutually_excl_props(sut) test_subscriptions_persistent_across_restart(sut) test_events_push_only_on_subscription(sut) test_event_payload_size_limit(sut) test_event_...
1
0ebb224077c0e0ec7d5a44d15f871ea0
8abeb19beb9bfe6bd4629a1f73269e42
Takes in a state and predicts the reward for being in that state
if self.state == self.all_states[0]: return 1.0 elif self.state == self.all_states[1]: return 1.25 elif self.state == self.all_states[2]: return 0.75 else: return 1.5
1
ab75d72432cf329e4606e06086ed6577
058cd927ddb2a6797110aae490f47fe2
Get a list of Auto Attendant Submenus. The response is either GroupAutoAttendantSubmenuGetListResponse or ErrorResponse. This request is only valid for Standard auto attendants.
class HssClient extends Client public function listAutoLaunchs($request) { return $this->listAutoLaunchsWithHttpInfo($request); }
0
35263de93197f9adf920966c79ad7cb0
45313c85ffd720911c3cd7f13f88cb5b
The main function of ROSFrom Triples, this creates the arrays of concepts and relationships and then the links array It ensures concept nodes are not repeated an only used once If there are unknown subjects or objects these are taken into account
void ROSFromTriples::makelinks(void){ struct anode temp; unsigned int unknown = 0; for (std::vector<struct triplesent>::iterator it = triples->begin(); it != triples->end(); ++it){ unsigned int rnumb = (unsigned int)relations.size(); temp.word = (*it).vb; temp.sentid = (*it).sentid; relations.emplace_back(te...
1
fa503e0a2ea6dc9c2d479e7743847c1d
fcb2ef1083f7aa6b00f07888e35f48ce
初始化系统中的所有流程定义,仅供Listener调用
@Component public class ActivitiInitConfig protected void initProcessDefinitions() { String deploymentName = "workorder processes"; List<Deployment> deploymentList = repositoryService.createDeploymentQuery().deploymentName(deploymentName).list(); if (deploymentList == null || deploymentList.isEm...
1
7a990a62a21b5f855b7acd0fdacea2e0
83ab8336088e904d6f73e93477557acc
Forward kinematics of the front right leg with respect to the base
class dino(): def fkine(self, pos="Full"): th = np.array([0., 0., self.th_fem[0], self.th_kne[0], self.th_ank[0], self.th_toe[0], 0.], dtype = float) for i in range(0,th.size): th[i] = th[i] *np.pi/180 c2 = np.cos(th[2]) s2 = np.sin(th[2]) c4 = np.cos(th[4]) ...
1
eb2797a16242ccafe30f6f30939491e4
55f20594b09b3395e1666bb054dc0aa6
插入一条记录到表StaticClassesFound,如果表中存在自增字段,则返回值为新记录的自增字段值,否则返回0
namespace SonyCMS_Model int AddIIClassStatus(II_Class_Status entity);
0
ce5b0d8d13e4d1377ce6e9bfc09f195a
ab7ea5423f548c7a30f04881e5ec90d4
将卡牌队列直接显示到对应坐标
class View extends BaseView{ showCard(viewSeatId:number, cardsNum:number){ if(!this.dict_cards[viewSeatId]) this.dict_cards[viewSeatId] = []; let i, cardNode; for(i = 0; i < this.model.maxHandlerCardNum; i ++){ cardNode = this.dict_cards[viewSeatId][i]; if(!c...
0
72f11db040dd9c3e8acb680d149c0ad7
c96c1d6879f9a8c5127a4b469082076a
Check if the given bibliography is correctly formatted.
def validate_library_structure(library_dir):
0
140f166ea6d6cc2b528f15e9a23867f4
7ebc048c2127e474cf39c11e3d0c197c
释放SkipList
{ tSkipLink *n = NULL; tSkipLink *pos = list->head[0].next; SKIP_LIST_DYN_SCAN(pos, n, &(list->head[0])) { tSkipNode *node = SKIP_LIST_NODE_GET(pos, tSkipNode, link[0]); free(node); } free(list); }
1
79a2ace9bc6380e15ce16d765469b000
44e9332bc7451a41546d857cf2ba20bd
检测串口是否有数据到来
{ if (0 != (UARTx->USR & ((uint32_t)0x0008))) { return 1; } return 0; }
1
0a2678630a49dfe3c6055c81bbc1fd91
ac727609fb3728a505f4ffd25b7ab473
Keeps the object on the floorspace by steering it towards the center
Vector3 desired = (transform.position - target).normalized * maxSpeed; return Steer (desired); }
0
b4b8b7832497ad339953b0b786b4200e
06f1f6a837b1098aaeb9929cbce9edea
Getter for tc meta schema.
class InvariomGenerator(object): def get_tsm(self): return self.tsm
0
fac8433d6347a6196a45ba5814e90a4c
e590382c547d0aed553d67794c827448
在Rethrow之前,先將相關的print字串都清除掉
public class ErrorMsgException extends AbstractException{ public String print(){ try(StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw)){ printStackTrace(pw); return sw.toString(); } catch (IOException e) { e.printStackTrace(); retu...
0
1e11bccde0435252901acd78b55a4ecf
e09a0cce6a2b9f054f2073225a183935
显示隐藏退单原因弹窗
openReason(){ this.setData({showReason:true}); }
1
2345b84db612a32723204e68ad7f5750
96a0e6c0073f3981f53ed3848bde458e
Further customizes the properties provided by the {@link #credentialsClientFactoryConfig()} method. <p> This method does nothing by default. Subclasses may override this method to set additional properties programmatically.
void setCredentialsConfig(CredentialsBean credentialsBean);
1
489952e699c783204208861cbce05662
3f1e6aab482f9fce2842f521940fbb33
车队日充电量(瓦)= 充电总量/会员总数
{ var result = 100 * (C / L); if (IsNaN(result)) return 0; return result; }
0
068dfed3d48f7d4ea9e1db88d9c6bf81
de38e7052c2644bfb6865c86889fcad5
Is every selected range empty?
const length = this._ranges.length; if ( length === 1 ) { return this._ranges[ 0 ].isCollapsed; } else { return false; } }
0
2d92281de58b3d5df6b39a12ed9a83b7
1155c65a6773c993b15b4040ecc3d53c
Make us a daemon and open the syslog.
def become_daemon(keep_fds=None): _fork_then_exit_parent() os.setsid() _fork_then_exit_parent() if keep_fds != True: close_all_fds(keep_fds) os.chdir('/')
0
a0f5a725cef8191e1cac88fc042b7bee
50871ff7641df713f2c3d4a9371561cc
Set the montant somme isol brut3.
class EmpDadsuRectif public function setMontantSommeIsolBrut4($montantSommeIsolBrut4) { $this->montantSommeIsolBrut4 = $montantSommeIsolBrut4; return $this; }
0
f026f712f6a489f7c6108b2453c65a78
19ffc6d06c65322c0d710f9eec93c957
This method was generated by MyBatis Generator. This method returns the value of the database column ds_member_money_log.trans_type
public class TFS_REJECT_REASON_HSTVO extends BaseVO public BigDecimal getTRX_TYPE() { return TRX_TYPE; }
0
64623865c707564e8e3f82cd4bed89d8
b88ae4b5be4d31687bfa8411eee760c8
Getter for <code>appcenter_mall_data.t_scm_cust_user.status</code>. 状态
class TrOrder extends Model public function getMallStatusUserId() { return (int) $this->attributes[self::MALL_STATUS_USER_ID]; }
0
fd8ff555c186bf67c3769ccbf5dd2f26
c65f580c3d31bac736ec763449e0ac39
A test for RevertToSelf
{ if (!PInvoke.Win32.Advapi32.RevertToSelf()) { Console.Error.WriteLine("RevertToSelf() Error: " + new Win32Exception(Marshal.GetLastWin32Error()).Message); return false; } return true; }
1
2100eca3ec23154780bd25bc72dea219
5272636d4c280118482152e43f91409b
Install rsync
local_path = settings.get('local', None) remote_path = settings.get('remote', None) exclude = settings.get('exclude', None) include = settings.get('include', None) args = settings.get('args', None) base_rsync.do_rsync(config, servers, verbose=verbose, local_path=local_pat...
0
d792aa26b289fbb3a7fc8310953bf38d
a7c74dfdd31bb03995e4292fcec749cd
GET : /api/Lecture/GetAllLecturesForStudent
{ using (var conn = CreateConnection()) { try { var lectures = new List<Lecture>(100); var cmd = new SqlCommand("appSchema.usp_GetAllLectures", conn); cmd.CommandType = CommandType.StoredProcedure...
1
606514d75f052a21864e028d6003d1c8
3ef88003337b5aa2c127ee22434517e8
Add Pokemon Popup
public class Pet_Sys : MonoBehaviour public void ClickPetImage() { select_Pet_Popup.SetActive(true); }
0
a1c4fe3474b9c67043630974e6e5bed5
fd238b5792ee85052712f5b61c556fb9
Checks whether or not the model should stop training because it has started to over-fit the data.
if len(d) <= 1: return False elif len(d) > 1: comparisons = [] for epoch in range(1, len(d) + 1): if epoch > 1: comparisons.append(d[f"epoch{epoch}"] >= d[f"epoch{epoch-1}"]) if False not in comparisons[-patience:] and len(comparisons) > patience: ...
0
368d77ff7d5a6b8142b567770df4ffd2
428cbd6d341222cef37df3608e99623b
Get the job SLA from this event.
public String getJob();
0
0e7bc765793a0592ec069a4703cfd15c
0644f13a5a137ffc5d364338008b8bb5
设置cell的内容为字符文本形式; 设置cell的字符集编码为双字节,支持中文
public class XwpfTest public void setRowCellText(XWPFTableCell cell, String text, int width, boolean isShd, int shdValue, String shdColor, STVerticalJc.Enum jc, STJc.Enum stJc) { CTTc cttc = cell.getCTTc(); CTTcPr ctPr = cttc.isSetTcPr() ? cttc.getTcPr() : cttc.addNewTcPr...
0
b202a4a2f0f596ee2e04f63cbf83ded7
5040de04bfc1283b4e446131c6200192
Adds endpoints for controller actions to the <see cref="IEndpointRouteBuilder"/> and adds the default route <c>{controller=Home}/{action=Index}/{id?}</c>.
{ if (app == null) throw new ArgumentNullException(nameof(app)); app.Validate(); app.Map(ApiEndpoint.Path, b => b.UseMiddleware<ApiEndpoint>()); return app; }
0
cd8eb283d0114c05c67d512b98a51e7e
7279bdb3ef522001c47e462b743455d1
To reduce unnecessary database trips, url schemes are cached in memory. This will invalidate that cache.
if cache_installed(): for host in ALLOWED_HOSTS: obj_request = HttpRequest() the_path = the_url obj_request.path = urllib.request.unquote(the_path).decode("utf-8") obj_request.META['HTTP_USER_AGENT'] = 'Mozilla/5.0' obj_request.META['HTTP_HOST'] = ...
1
fc9987b2ff647e95da4343637f20556a
07f389b0bd3f48221becbbbf545e077c
Checks all Rigidbody2D contacts for validity and sets contacts accordingly.
{ float[] masses = new float[2]; Matrix3[] inertias = new Matrix3[2]; State[] state = new State[2]; state[0] = contact.gameObject[0].GetComponent<ObjectController>().nextState; masses[0] = state[0].inverseMass; inertias[0] = state[0].invers...
0
23be34b0acf9ef5c609a8b9ed5b7b802
79942b310f4a05f4a1427350be5e08ef
根据类型随机获取分享
if (isset ( $config [$type] [0] )) { return $config [$type] [array_rand ( $config [$type] )]; } return $config [$type]; }
1
afa4a471f1bd66ce3d6fd16fb24f0499
c88f2ff94ba73472ad493f7f5b9c453d
Get the value from the storage tuple of the current iteration. Returns: StackItem: with the storage value.
class StampedStore(base.BaseResource): def _do_get(self, event): if self.items: event.succeed(heappop(self.items)[2])
0
ffa1e91dcbc1eb265445a217a6a3b95a
5ff3c4854ae6a21d1e63dede0e5e8ec9
选中调试器窗口。
namespace Petri.Editor.GUI public class Document : DocumentBase, Petri.Editor.Debugger.Debuggable public void SwitchToDebug() { CurrentController = DebugController; Window.Gui = Window.DebugGui; }
1
ff9abfa347cf5c27be97e23953dcf57b
9da9c6cb409faceb66a9b8ec9d15bc77
获取所有待审核未处理操作
def get_user_actions(): sql_com = "select * from user_action where is_processed=0" result = sql_appbk.mysql_com(sql_com) sql_com = "UPDATE user_action set is_processed = 1 WHERE is_processed=0" sql_appbk.mysql_com(sql_com) return result
1
1e6e73c70c41258047fef35e783b2b84
4401e2f909b6ada15ea88ebb8d6a81f9
Recursively iterates through a directory and its subdirectories to list the info all the images found in it. Returns a list of dictionary where each dictionary contains `image_path` and `image_label`.
class LifFile: def _recursive_image_find(self, tree, return_list=None, path=''): if return_list is None: return_list = [] children = tree.findall('./Children/Element') if len(children) < 1: children = tree.findall('./Element') for item in children: fol...
1
740fae77d0cfd131f759ff4fc917dd55
40b6c021d313bbab27d63d5c59481717
Method to perform update and insert operation on product db #
operationType = request.POST.get('oType', None) productType = request.POST.get('pType', None) pid = request.POST.get('id', None) quantity = request.POST.get('quantity', None) print(request.POST) if operationType == "add": if productType == "plywood": Plywood.objects.filter(id...
1
43d407f5a6fd7662c0df77b4cf3934ac
901a3823dbdcfa646523fcd3dd0aae6b
Handle incoming slack chat messages
cmd_name = text.split()[0].lower() cmd = Command.get[cmd_name] if cmd: response = cmd.execute(text) else: response = "Sorry, I have not been trained to do that yet." slack_client.api_call("chat.postMessage", channel=channel, text=response, as_user=True)
1
16ef54fb7aa2f8ac8df45306c9fbb993
8e3a8445ff435a23cb55a9e34d00edb4
Método que se utiliza para validar cuando se va a agregar a una persona como remitente.
$persona_existente = Input::get('persona_existente', false); if ($persona_existente) { if (!$this->verificarInputsPersonaAsignada()) { return false; } } else { if (!$this->verificarInputsPersonaNueva()) { return false; ...
1
5a8f888824610356c30ee11e7221c555
d5026a059eb39e1dd39d4070ae731918
Metodo que ingresa los gastos en la base de datos
{ if(name!=null && amount != 0) { try { return db.ExecuteQuery("insert into expenses values(Null,'" + name + "','" + amount + "','" + description + "','"+date+"')"); } catch(Exception ex) ...
1
4ec9c8a91179889dc18694ba7a6129b3
928fb2305a929e1bcb6971f97b4d5873
Check to see if AssessmentRunArn property is set
namespace Amazon.DatabaseMigrationService.Model public partial class ReplicationTaskAssessmentResult internal bool IsSetReplicationTaskArn() { return this._replicationTaskArn != null; }
0
189e1361cb5dc6f228d320ce961fff73
45f9e8955b152197dd2f0e988b2b18c3
时间转成字符串 默认转换格式yyyy-MM-dd
public class TimeUtls public static String date2StrByDefault(Date date){ return new SimpleDateFormat(DEFAULT_PATTERN).format(date); }
1
033357c422601196ee4248e113cfa2bd
1d346fc64acdc17f75a8bddc91cc94d0
Zero Page Addressing with Y Offset The value following the OPCode is considered as an offset the content of the Y Register is added to that offset this offset is used to index the 0th page Example : Passed value : 0x12 Y Register : 0xD Effective address : 0x00E2
export class Opcode public static 0x96(): number { RAM.write(Convert.toUint8(RAM.get(++Register.PC) + Register.Y), Register.X); return 4; }
1
bf67e9d5a15c797ba6b14d3504750016
f29b3f628130b24878efdaf50388e02e
Gets kmsKey
namespace Pulumi.Aws.Kms public static partial class Invokes public static Task<GetKeyResult> GetKey(GetKeyArgs args, InvokeOptions? options = null) => Pulumi.Deployment.Instance.InvokeAsync<GetKeyResult>("aws:kms/getKey:getKey", args ?? ResourceArgs.Empty, options.WithVersion());
1
c0ba7dfc3a7a535506ff0683fbfe91aa
77bef8902dcf2e45a98dd5845311a894
Test for coface attributes
class NumerrinMeshTestCase(unittest.TestCase): def test_iter_faces(self): num_mesh = NumerrinMesh('test_mesh', self.mesh, self.pool) for face_f in num_mesh.iter(item_type=CUBA.FACE): face = self.mesh.get(face_f.uid) self.assertEqual(face.points, face_f.points)
0
b6bd8aa3d5e6b861a220ae4caee8034c
7d258dc3cac9a165394334220bc80c36
# Solve trigamma(y) = x for y
double u; if (GMT_is_dnan(x) || x <= -1.0) return (GMT_d_NaN); u = 1.0 + x; if (u == 1.0) return (x); else return ( log(u) * (x/(u - 1.0) ) ); }
0
5cdc911852ff475d8a45b2ea8614ba1f
b359ebc293c44fbcaf36a01e23045d3b
filter the plugin list according to searched text
{ if (ui->listWidget_2->count() == 0) return; ui->listWidget->clear(); if (ui->lineEdit->text().isEmpty()) ui->listWidget->addItems(extensions); else { for (qint32 i = 0; i < extensions.length(); ++i) { QString item = extensions.at(i); if (item...
1
f22103ed3cb72229f3a52563e67931f4
7e7dab0cd63722cbcfcce74d9c876754
Count total number of available vehicles.
int VehicleRegistry::Count() const { return numvehicles; }
1
c9f5dce02a24231f6eff8e6bb401b371
8a4820e1a227cb5ab6c742b16a2060eb
Function called before the destruction of the object (to make sure the file is closed in the end).
class GlobalFile: def __del__(self): pass
0
ca03a2b6e47394febe4c91ec8af2bf2c
7a81dc9f2fd2311a98cac008bdfc8233
获得未选的表格行代码数组
namespace DotNet.Business public partial class WebUtil public static string[] GetUnSelecteIds(Repeater repeater) { return GetSelecteIds(repeater, false); }
1
171285e9cd2a73df3784c71f30de5d2f
199c32ee7dc7633356e2040f975305b0
Create an auth service instance using the specified auth provider class name.
if(is_null($provider)){ $provider = Anole_Config::get('auth.default'); } self::debug("Auth provider: $provider", __METHOD__); if(!isset(self::$_instance[$provider])){ $options = Anole_Config::get('auth.'.$provider); $instance = new $provider($options); if(!$instance instanceof Anole_Auth_Authenticat...
1
767fd1978cd7bc99aad886be4ac6d49e
4568e1923509cc3b91f1001c8547e956
Метод для проверки наличия польователя с такой почтой
Long Id = null; try { Id = (Long) new PoliticianAsync(db, "getIdByLogin", login).execute().get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } if (Id == null) ...
0
3c25412139f4b2c7e553dcd501e6b5a3
18f6942e096f27497689bbb02da27401
Tar reda på om det finns fler kort i kortleken.
boolean hasNextCard();
1
89ba3692dd719415fb66564a2c2a3389
efb935984b5a24ec3747059fb975d7c9
Sets the current output_encoding or Returns the current output_encoding as a string.
public class CommandLine public CommandLine OutputEncoding( Encoding encoding ) { _outputEncoding = encoding; return this; }
0
5485570c8f754c51a1d66190ae35dfdd
de8eda44f6f9ad2c043d637dc142b37c
여러 개의 이미지를 겹쳐서 표시하는 라벨. 이미지는 왼쪽 위를 기준으로 정렬되고, 크기가 세로 크기보다 크면 줄인다.
def vis_row(*imgs, titles: List[str] = None, **kwargs): vis_fill(*imgs, rows=1, cols=len(imgs), titles=titles, **kwargs)
0
84a83fd487c59a8b9b85a4523a40a5d0
e974c8515a3abcc08a928c58a7ab739e
上报休庭心跳
{ ListenableFuture<MasterServerProtos.HeartBeatResponse> future = heartBeatStub .reportHeartBeat(buildHeartBeatRequest()); LOG.info("Sent heartbeat to master, wait for response..."); try { MasterServerProtos.HeartBeatResponse heartBeatResponse = future.ge...
1
399886c66858e887844f2dadc0384eb0
fe72fa422e835a3b06f1335d498d681a
wrap methods to allow for chaining on demand
{ if (in_array($name, $this->allowedMethods)) { if (empty($arguments)) { return $this; } if (count($arguments) > 1) { return $this->$name($arguments[0], $arguments[1]); } else { return $this->$name($arguments[0])...
1
a0a0c61afb8cab7e4eeba95eac7f428a
241bc2f03b5585906ae4716a11c34a68
获取该职位对应的role_id
@Select("select role_id from role where role_name=#{role_name}") public int getRoleId(String role_name);
1
3318ea960b63eb91a1531c75f0ebae25
ad74a82bbd19b695ba743c7eb2fe31d1
打开文件:参数(文件名,打开模式),返回文件句柄或nil
file, err := CaviarOpen(name) if err != nil { return os.Open(name) } return file, nil }
0
8c9650d26aa03c554adfeadb9fcbca06
0b09f0069a0d9dcd066240373680a97b
Extracts data from .mat.
if fpath[-4:] == '.mat': data = scipy.io.loadmat(fpath) elif fpath[-4:] == '.npy': data = np.load(fpath) else: raise ValueError('Invalid file type: {}'.format(fpath)) return data
1
50ad5f96dfda8e76642494d9720b990d
56a97746a1b24bfd5e654ddb4f6952e9
シグナル受信待ち
{ using var _ = Fetch(); if (!_signaling) return; Monitor.Wait(this); }
1
cf38371ee4a0820f4a78dbe9733efefd
f12b1b1592563b5366aa675ef1e1977c
Write the bindings to the $OUT_DIR/bindings.rs file. The compiled C++ will also go here.
pub fn compile_services_servers(filename: &str) { let schema = FlatbufferSchema::from_file(filename).unwrap(); let generated_rust_services = generate_from_bytes(&schema.bytes, generate_service).unwrap(); let out_file = format!( "{}/{}_services_servers.rs", std::env::var("OUT_DIR").unwrap(), ...
0
defb6a261d34a3e55eeca385318d864a
cb332e665b492e43a83c613d77779d7c
列出wine的所有項目
class WineController extends Controller public function index() { $wines = Wine::all()->sortByDesc("id"); $categorys = WineCategory::all(); return view('wines.index',compact('wines','categorys')); }
1
509224f99037ecab36b80afdfd5a0d15
e852d93f3afb22f9564d31922e0e94f1
Checks if the given String is hashed to the same hash together with the salt extracted from the given hashedAndSaltedCorrectPassword Must not be null Must not be null
boolean checkUserCredentialsWithPasswordHash(String username, String passwordHash);
0
0857525117215cd277258a49549d7fcd
357148275087c71892c335d55e70202a
Loops through all rooms and time periods and removes all lectures
async function clearStaleRoom() { const roomsToBeDeleted = await retrieveStaleRooms(dayjs().add(-1, "hour")); if (roomsToBeDeleted) { roomsToBeDeleted.forEach(async (room) => { await deleteSongs(room._id); await deleteRoom(room._id); }); } }
0
8a2839d4641ee8a22e5637b6582a15ef
c695d40092b4598300884e216221fe46
获取用户所有声明
void getAllClaims();
1
3095bcb3f968774fda5b900a15611f97
0c00193bf0520f6ffe439004fec28592
This method will expand the incoming Range<V> to 1 or more V. Then for each of these values up the Values from m_map and adds them to a final returnable SortedSet<Value> <p/>
public class AbstractNamespaceMap<K, V extends BsjElement> implements NamespaceMap<K, V> private <T> Collection<T> extractValues(K key, Function<Entry<V>, Set<T>> entryFunction, MapValueExtractor<K, V, T> deferenceExtractor) { populate(key); if (this.backingMap.containsKey(key)) ...
0
89745adeb23f037962fcc31593e1599d
536e8325b8d633104d4edbdb4ed01e78
採点可能かどうか。
log_message('DEBUG', __METHOD__.' start'); $ret_val = FALSE; $this->load->model('common/dao_events'); $event_data_id = $this->dao_events->get_item_no_to_data_id($p_tenant_id, $p_object_item_id, $p_item_no); $this->load->model('master/dao_trn_item_control'); $query = $this...
1
b78a92808ca8d652258bd4f257273351
5b7c4e8586e1bd02f11722f25e5d7eee
hàm lấy giá TQ của sản phẩm dựa vào số lượng mua
int quantityTemp = 1; double result = 0; if(quantity!=null&&quantity.intValue()>0) quantityTemp = quantity.intValue(); if(productprice!=null) result = productprice.doubleValue()*quantityTemp; return new Double(result); }
1
80e0d16395473ccc31cfb9c2852d8f7f
b9ba1ca95d29c5c5d0fb56b0bbfb678c
Get an array of all facet handlers in the database
try{ FacetHandler[] fha=entigrator.getAllFacetHandlers(); if(fha!=null) return fha; ArrayList<FacetHandler>fl=new ArrayList<FacetHandler>(); if(debug) System.out.println("BaseHandler:listAllHandlers:BEGIN"); FieldsHandler fh=new FieldsHandler(); fl.add(fh); entigrator.putHandlerAtType(fh.getType(),fh); ...
1
a82e39012fa55e6c6d212e9e65ee8c5a
e7ca2364a97657dc4979e7b0c94ab128
ajax 异步请求处理定时脚本
if (user == null || user == "") { return; } ajaxReq(); intervalId = setInterval(ajaxReq,600000); }
1
6d3c3cd03cad0833b4c5e7e9fa5cd9b3
7e4d9ed88b9ba0f19b9a283b17abe697
@brief Returns the ADC2 Status Register value. series MDR1986VE9x.
char adc2_status(void) { char status_adc; adc2_select; adc_bus1_transmit(ADC_COMM_RD | ADC_STATUS); status_adc=adc_bus1_exchange(0x00); adc2_deselect; return(status_adc); }
1
ce2a9bf22667ee48eaca2e44ba6d73c6
6a2ee3d7a93150e1873c177ac7771ce3
店铺创建售后地址接口.
StoreCreateRequest request = new StoreCreateRequest(); request.add(store); ResponseContainer container = call(config, sourceId, request); DaDaResponse<DaDaStore> response = new DaDaResponse<>(container); if (response.isSuccessful()) { JSONArray results = JSONObject.pa...
0
686fa905ed8a32d76bd6a1738eeb089b
79d3db6d487f23e7efe860c699a1ac79
# Attach labels and subjects to the main set of observations
mjs_labs <- function(mjs, x_label=NULL, y_label=NULL) { mjs$x$x_label <- x_label mjs$x$y_label <- y_label mjs }
0
01b738dda0ab9445a09169fe47cc87b1
a72ab5980e2bb793da0f7da7e241da17
Parses a {@link Color} given as {@link String} from GWT/browser.
String[] split_pos = color_str.substring(1, color_str.length() - 1) .split(","); int red = Integer.valueOf(split_pos[0]); int green = Integer.valueOf(split_pos[1]); int blue = Integer.valueOf(split_pos[2]); int alpha = Integer.valueOf(split_pos[3]); if (r...
1
a19fc3484e7a89f4ce3e5cdbcebb6137
171c30953cbc7d183ced0255d2750b6d
Validates access token,if valid then returns a response with its expiry otherwise error
public class RestOAuth2AccessTokenValidator implements OAuth2AccessTokenValidator @Override public Promise<AccessTokenValidationResponse, OAuth2Exception> validate(final String accessToken) { Request request = new Request() .setMethod("GET") .setUri(URI.create(tokenInfoEndpoi...
1
a7e485c69c0f93bd8a66369561764edd
3bc1d2f4b73de003544a08326093114f
Validates the configuration. If any of the settings are invalid, these are set to null.
ValidateConfigurationResponse validateConfiguration(Context context);
1
d73a7ada45bf5a52d67a4c55ad766dac
d9bf4708d8b4f8fbdd613e929df118cd
compte le nombre de fournisseurs pour un bijoutier
class Progdech public function getNbrBacsPointCollecte($pointcollecte){ $bacs = $pointcollecte->getBacs(); return count($bacs); }
0
99403149e518b534345658e356d76093
b9e81e455a2e46ccca1292e1991adebb
# 用原始名字中的国家省份信息,赋值给新整理但数据缺失的、标准名字中的国家和省份
$tmp_area = explode("/",$area); $ini_first_name = trim($tmp_area[0]); $ini_second_name = trim($tmp_area[1]); $ini_third_name = trim($tmp_area[2]); $first_name = $ini_first_name; $tmp_first_name = $this->area_format($first_name); if ($tmp_first_name) $first_name = ...
1
14aa0922f358c877c222da33cb5dc512
eea699cf4f98fb71475c33828d09129e
Method translates this length into number of steps (from the motor).
def get_steps(val): return (int(val) * multiplier) / 4
1
6a75d52d2bc3320b2b10f893380d8563
667a2cd5b9dd938dee33668dc5479b38
Show the configuration UI for the selected tool item
final IToolConfiguration _temp = toolConfigFactory.createToolConfiguration(); _temp.setConfigName("tool_configuration_" + compositeConfiguration.configurations.size()); compositeConfiguration.addToolConfiguration(_temp); configCombo.add(_temp.getConfigName()); configCombo.select(compositeConfiguration.configu...
0
69f8cca999a90020cdd10b6895dae6e7
07efa2bd79aa6fae36a2168d82b9eee5
Dump amlogic control block into boot image file
{ int offset; int pbase; int i; int curr_sec = 1; int fill_req = WP_GROUP_SIZE; offset = phy_partition * 8192; memset(&xbrbin_buf, 0, sizeof(xbrbin_buf)); xbrbin_buf[0x1fe] = 0x55; xbrbin_buf[0x1ff] = 0xaa; for(i=0;i<4;i++) { pbase = 0x1be + i * 16; xbrbin_buf[pbase] = g_min...
1
9dc81f9b9601dd107ec1724562fec407
b9ac60ff37f38437f21b8e5646a3d710
Destroys the given storage pool.
class StorageConfigOsSolaris(StorageConfigOs): def destroyVolume(self, oExec, sPool, sVol): fRc = oExec.execBinaryNoStdOut('zfs', ('destroy', sPool + '/' + sVol)); return fRc;
0
817e6ee13f5da72eb2bc81d3279ed3e6
7b2e55080dfab07338c49d2ee2ecbd48
rescales Polygon
if(this->poly.size()>0){ for(int i = 0; i<this->poly.size();i++){ cv::Point* p1 = poly[i]; double x = p1->x*factor+cp->x*(1-factor); double y = p1->y*factor+cp->y*(1-factor); p1->x = x; p1->y = y; } cv::Point* left = this->leftPoint...
1