query_id
string
corpus_id
string
query
string
code
string
label
int64
61dd0f1672ac2428d0c8f127eaf4dd8a
3329fe8119ce206345ece1bced793e8b
Verify a required value is reported missing when it is not provided.
feature = test_generator() with mock_availability_test(feature) as check: check.assert_not_called() with self.assertRaisesRegex(MissingOptionalLibraryError, "sentinel message"): feature.require_now("sentinel message") check.assert_called_once()
1
299be9c3ae824b40fdd0e5cedad8457d
a8ac3ffed61f4ea86519c7453001b2fc
! Returns a pair with status bits. The first boolean represents valid input. If the first boolean is true, the input is valid, otherwise invalid. The second boolean is true if the command is the quit-command.
{ char read_buff[RCVBUFSIZE]; memset((char *)&read_buff, 0, RCVBUFSIZE); int cmd_status; int recvbuff = recv(conn_fd, read_buff, RCVBUFSIZE, 0); if (recvbuff < 1) return CMD_CLOSE; if (recvbuff == RCVBUFSIZE) return CMD_UNKNOWN; cmd_status = parse_input(read_buff, data_buff); return cmd_status; }
0
bb9b154c7f02da0a20f93bc0f5a4e830
b05200e3b541564362a77e53c89440b0
Method to score if the particle appears to be a trapezoid. Compares the convex hull (filled in) area to the area of the bounding box. The expectation is that the convex hull area is about 95.4% of the bounding box area for an ideal tote.
{ double width = particle.boundingRectWidth; double height = particle.boundingRectHeight; double ratio = width / height; return Math2.hat(1, 1, 1, ratio / HORIZONTAL_ASPECT_RATIO) >= MIN_HASPECT_SCORE; }
0
feb27832708d476655c405df66559c77
ab6efb507a60994b0261c35b34a706fe
Tests occurrence of an error because of an invalid input value provided at field "inIntersectionMode".
public void checkOid_OfIntersectionMessage_False(){ EhiLogger.getInstance().setTraceFilter(false); Iom_jObject objAreaSuccess=new Iom_jObject(ILI_CLASSD, OID1); { IomObject multisurfaceValue=objAreaSuccess.addattrobj("area3d", "MULTISURFACE"); IomObject surfaceValue = multisurfaceValue.addattrobj("surface"...
0
80c077649178774920ee878cb9edbeaf
a9833c0c38dee691cae6b5f5b406f1fc
Hiển thị trang xem điểm sinh viên
EventQueue.invokeLater(new Runnable() { public void run() { try { XemDiemToeic window = new XemDiemToeic(mssv,name); window.frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); }
1
49e4c85708bec59ed2c16954e9ad5f0d
7d045c18f8438e59aaf330569f7adaf6
returns the type of the next candidate
public class Clique public int getNextCandidate() { return this.potential.getNextCandidate(); }
0
4ba1a79b630258ef485ae8d32b88d1d1
db2da19d8450bbe086ffa66ce4b970a0
Open specific shop log page from Main Page
{ $shop_urls_model = new shopSeoredirectShopUrlsModel(); $old_page = $params['old']; $shop_urls_model->addPageData($old_page); $page = $params['page']; $shop_urls_model->addPageData($page); }
0
a8ac357523a4eea572660ad21c9590b2
bcf68523e41d711c7bff5799a12810b4
img: input image. points: annotated pedestrian's position like [row,col] kernel_size: the fixed size of gaussian kernel, must be odd number. sigma: the sigma of gaussian kernel. return: d_map: density-map we want
class custom_kernel: def dmaps_of_kernel(self, pt1, pt2): return np.exp(-np.power(np.linalg.norm(pt1[:-1] - pt2[:-1]), 2)/self._epsilon - np.power(pt1[-1] - pt2[-2], 2)/np.power(self._epsilon, 2))
0
480d91a899c06644de1f9aad5e43b537
22808eeefdcbf3b41f4f77c58561ad20
Redirects to Google sign-in, if necessary or if forced by options.
if (mConnectionResult.hasResolution()) { try { mIntentInProgress = true; mConnectionResult.startResolutionForResult(activity, REQUEST_CODE_SIGN_IN); } catch (SendIntentException e) { mIntentInProgress = false; mGoogleApiClient.connect(GoogleApiClient.SIGN_IN_MODE_OPTIONAL); } } }
1
6e080b84142b6d98ec091e00b73900b0
a56f0c2186eedb06a3e8389a780f7c03
False for empty tokens
switch (token) { case TK_ELSE: case TK_ELSEIF: case TK_UNTIL: case TK_END: case TK_EOS: return 1; default: return 0; } }
0
e2335b22a70765376703a14de9298aac
cae422f3f39522ad5eea521b268675d3
Возвращает признак того, что это оборудование ПК
class TechModels extends ArmsModel public function getIsPC(){ return $this->type->is_computer; }
1
480a8aa60aeddb735837d1ea49b91fa8
310dd54f217f53c6f6543b70900f52fc
Mouse button was pressed - lets test to see if hit was in the correct target
void PlayState::MousePress(int nButton, int nMouseState, int nXPos, int nYPos) { if (nButton == GLUT_LEFT_BUTTON) { if ( (nXPos > 0) && (nYPos > 0) ) { m_pPlayer->SetDestination(nXPos, nYPos); } } if (nButton == GLUT_RIGHT_BUTTON) { AttemptToFireBomb(); } GameState::MousePress(nButton, nMou...
0
050ff2520fa5aca5857e34368f955386
6e3132b9ea55b883980191e6bcb60c99
Returns True if the mouse is over the element.
public boolean isMouseInElement();
1
652570b42fc7e1d8ca20a2ff83f9b4dd
7ac3824db6b4db1ad17d63fae2fb9e98
Spawns a new thread to kill the Debug Process.
class kmainForm(QMainWindow,Ui_MainWindow): def kill_debug(self): Util.execScript("kill_debug", self.platform)
0
133385188e676f80773e4ae2dde644b7
5e227e4702d1e04be23ae604690f0141
POST /washers POST /washers.json
@glassware = Glassware.new(glassware_params) respond_to do |format| if @glassware.save format.html { redirect_to @glassware, notice: 'Glassware was successfully created.' } format.json { render :show, status: :created, location: @glassware } else format.html { render :new } ...
0
569f4f5c1c4b7b0fb215cf40df264795
355f678d8cb51b5d0ed566ea79e70191
Returns the annotations present on this field. Returns an empty array (never null) if the field has no annotations. Callers should refrain from modifying the returned array.
Annotation[] getAnnotations();
1
8625841d4113f07eb4d0981c564bf6c4
e7a2c7946a37ae25a3d07274d4307e66
Gets the current system time. The system time is returned by Windows as the elapsed number of microseconds since system start. Possible DLL interaction errors: errMemoryAccess Possible API errors: errWrongParameterValue
SYSTEMTIME stNow, st1970 = {1970, 1, 4, 1, 0, 0, 0, 0}; FILETIME ftNow, ft1970; ULARGE_INTEGER ulintNow, ulint1970; GetLocalTime(&stNow); if (!SystemTimeToFileTime(&stNow, &ftNow)) return(error(ERR_WIN32_ERROR+GetLastError(), "SystemTimeToFileTime() failed")); ulintNow.LowPart = ft...
0
85f21e9e3e31d47e661cb99cb8a8ae42
723c8fcde50b69d964b3cbd99209bd2b
remove the front element of a table and return it
if(l != NULL){ void* front = l->begin->element; erase(l, l->begin); return front; } return NULL; }
1
3faa1a60112968e4a21b4e40b00a1a99
899ce81480bca6a31533ad56f6644f4d
Space-fill a character string
{ WORD len, data_len, pack_len; len = strlen(aInOut); data_len = strlen(aRData); pack_len = (aWidth - ((len + data_len) % aWidth)) % aWidth; while (pack_len > 0) { aInOut[len++] = ' '; pack_len--; } strcpy(aInOut+len, aRData); return (len + data_len); }
1
5860feba180ce0ac9dae969423dba735
7f0593699ee7714b233404588a32e192
对于每个等价类,输出他们的k,v
def output(d): for k,v in d.items(): str1 = "," v = str1.join(v) print(k + " -> " + v)
1
275d704b78b1dabdecbaabd520d230f7
95aec295808628eab0560e77ee8eb02b
Gets the concept sequence index.
public IntegerProperty languageConceptSequenceProperty() { if (this.languageConceptSequenceProperty == null) { this.languageConceptSequenceProperty = new CommitAwareIntegerProperty(this, ObservableFields.LANGUAGE_CONCEPT_SEQUENCE_FOR_DESCRIPTION.toExternalString(), getLan...
1
91224126b386ccb1e4926eb5a5d54d8d
2fac3b2d20f8856ec39c12d1e98140ff
获取近一周预警统计
public IndexChartVo getSevenDayCount(IndexChartRequest request) { IndexChartVo res = new IndexChartVo(); String weeks = ""; String datas = ""; Date today = new Date(); String[] weekDays = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"}; String[] resNames = new String[7]; ...
1
1a2b5bbeabdc843b7ba66f8fb1b59699
d1ca7bba5e34015e10b636ea566523a6
[店铺] 加载常用购物车
List<ShopCarUtil> loadCookShopCar(HttpServletRequest request) throws UnsupportedEncodingException;
1
bc5eb731f11d7da5274a0f2d83267ab4
40491469da66fb34d231b688b62f9cff
如果订单是在线申请或者是来自呼叫中心,返回true
{ if (isContainPstn && !DeviceUtil.isCallStateIdle()) { return true; } if (getVoipStatus() != STATUS_INIT) { return true; } return false; }
0
a61dfa4f5a6a475feccf12b3dec790f5
730646a0d9a264793f6534801e0bf54a
Save the current output
def save(path): with open(path, 'a+') as f: while not e.is_set(): try: text = outputs.get(True, 1) print(text) f.write('\n'+text) f.flush() except Exception as er: print(er)
1
a4f6a2ff7dc7c6a5bddfcd59bad1eaf4
5cbbc247c80ea45218426e997fcb3787
根据parse music的结果生成jcx的header
func addXingHeader(filepath string, totalFrames, totalBytes uint32) { outputFile, err := os.Create(filepath + ".mp3cat.tmp") if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } inputFile, err := os.Open(filepath) if err != nil { fmt.Fprintln(os.Stderr, err) os.E...
0
486ef86661362bd70b38b2602c40d4ca
48588329fecc518c618b651f3a970c9b
Converts *x* to an ``mpf`` or ``mpc``. *x* should be a numpy scalar.
if isinstance(x, real_types): return Quat(math.log(x)) elif isinstance(x, complex): return Quat(1) * cmath.log(x) else: raise NotImplementedError
0
f4a4593542f94b929642c969c38fa08d
bb1ef3dc7767db57f69e451bd0e27262
calculate in-game isometric cursor position
{ *x = game_term->scr->cx - game_term->offset_x; *y = game_term->scr->cy - game_term->offset_y; if (game_term->scr->cu) { return 1; } return 0; }
0
840eb77c4fbc157732bdfc2c5e34505b
230734167ae1b9ec8e7938115e4b1700
It removes a single collaborator from list of collaborators for a trip thus making this trip unavailable to user.
void removeTripMember(Integer tripMemberId);
1
47d02a2748e4b552abb14c7df034328a
243f46f60dc05a2c1263994ba2bb4b54
不发送给当前发送消息的人
public class Field public void sendToOthers(User me, JSONObject msg) { for (User other : mUsers) { if (other.equals(me)) { continue; } other.getCtx().writeAndFlush(msg); } }
1
ab201aa278e767fab4bec4334c7c10c1
0cb3c672195f83819823f9a6338fd2df
将交易时段的临时数据保存到数据库中,传入CtpGateway中的tradeDict
class DataBase(object): def write_trade_data(self, trade_data): self.engine.execute(self.tradetable.insert(), trade_data)
1
d83635f71eb0c93c29ba8071c1781bdf
83e1b534b5a587a02b0c551d46273210
Create a local array containing supported password characters grouped by types. You can remove character groups from this array, but doing so will weaken the password strength.
self.uppercase = list(range(65, 90 + 1)) self.lowercase = list(range(97, 122 + 1)) self.numbers = list(range(48, 57 + 1)) self.symbols = list(range(33, 47 + 1)) + \ list(range(58, 64 + 1)) + \ list(range(91, 96 + 1)) + \ ...
1
50ee85f7b9e75f10c3916fae1b5e5c5f
10cc3bdd6ce058890a17698cec557498
获取任意方法的名称
String resourceName = resourceNames.get(method); if (resourceName == null) { method = getRealMethod(method, clazz); String[] info = method.toString().split(" "); resourceName = info[info.length - 1]; resourceNames.put(method, resourceName); } ...
0
5f1d6695c3c12081b108691d8793e795
7f1c2fbf57ab261e93cda774bf86e4cc
Provide a random SHA1 hash.
func RandomSHA1() string { return StrSHA1(UnixNano()) }
1
0c6cf23c00cc1f39a79bd896f8b68261
6f59be3b5d3af9a2d01ff87a37ca9e00
! \brief Отрисовка карты сегментации. \details Для каждого идентификатора сегмента случайным образом генерируется цвет, после чего отрисовывает карту, в виде залитых данными цветами областей.
this->fill(); for (int i = 0; i < (int)this->ids.size(); ++i){ uint32_t actualId = this->ids[i]; if (actualId == idNotRender){ continue; } Texture & actualTexture = *(this->allTextures.at(actualId)); actualTexture.render(adjuster, areaCamera); } }
0
709999206e7f21b27b56ff457cbe747d
8afea5c8c8f4bf48ee8913b89bcf1e36
Returns the number of swaps for the last sort.
public class LinkedList<T extends Comparable<T>> public int getSwapCount(){ return swapCount; }
1
6cd0b841b91f8d8f7db77ce9e2634509
f2eb0d3849392a5e65720955a2c58d06
新增校区
layer.open({ type : 2, title : '添加校区', skin: 'layui-layer-molv', area : [ '700px', '600px' ], shade : 0, maxmin : true, content : 'campusList.action', }); }
1
db04d8d81df18fa949000dabedeadeca
111be59a4360d08841c27fc17f09d7f6
Affiche les unités de mesure de la liste selon le type
class PlaceListView extends Component getUnit(unitType){ let unit = ''; switch(unitType){ case 'metric': unit = '°C' break; case 'default': unit = 'K' break; case 'imperial': unit = '°F' ...
1
7bfa6995b4b356c0a852f7ef23e96e70
56dca079c6ed623797599cd917f9b5d5
Instruction: Transfer the value of the X register to the stack pointer. Function: StackPointer = X
void cpu_impl_tsx(cpu_t* cpu, uint16_t address) { cpu->register_x = cpu->stack_pointer; cpu_implcommon_set_zs(cpu, cpu->register_x); }
0
69c02a36922ab04564766ef9a47f0ca4
53162e758f9a4ebd6c2dfe5a7ec1a412
Information giving disk's basic disposition within its overlying spare pool. Omitted if container-type is not "spare", or if excluded by 'desired-attributes'.
class DiskRaidInfo(NetAppObject): def disk_spare_info(self): return self._disk_spare_info
1
d5b86a7ac065882bcf12cbc341bfc8aa
592d1071b0c48e944eb79a9518a6326c
Finds all active agents linked to a rollup code within a branch
{ $result = new ApiResource(); $activeOnly = is_null($activeOnly) ? true : false; return $result ->setData(Agent::activeOnly($activeOnly)->get()) ->throwApiException() ->getResponse(); }
0
c26c04377c7ebe06d1da5502f2db2f66
dec23d97f1c4ca604a1d412cc9855d48
按指定大小把图片进行缩和放(会遵循原图高宽比例)
namespace Heng.Bizlogic.Utils public class PicUtil public static Bitmap PicSized(Bitmap originBmp, int iSize) { int w = originBmp.Width * iSize; int h = originBmp.Height * iSize; Bitmap resizedBmp = new Bitmap(w, h); Graphics g = Graphics.FromImage(resizedBmp)...
0
b208042da73fc7d96118f62663412c76
ea17f6a6b86367668a1e32cee785d1fc
Liefert alle PlanetenKlassen zurück
List<Planet> findAllPlanets() throws AppException;
1
ff90bdb643b2c5a8c89544a77b1f7d27
adcd5f2952f6a612012466944e036f78
Function Name: ACC_DR_INT_Enable Enables the interrupt to the interrupt controller. Do not call this function unless ISR_Start() has been called or the functionality of the ISR_Start() function, which sets the vector and the priority, has been called. None None
void accIntEnable(uint8_t ui8Pins) { GPIOPinIntEnable(BSP_ACC_INT_BASE, ui8Pins); }
0
d64cb8814178194bf4cb4ca91afb93fd
9a7257fc2662acec37299da9960ae74b
Pass graph embedding and new feature vector through MLP
class NFM(nn.Module): def forward(self, input): sparse_feat = input['sparse'] dense_feat = input['dense'] bi_x = self.embed(sparse_feat, axis=1) dense_deep_x = self.dense(dense_feat) linear_out = self.linear(sparse_feat, dense_feat) bi_out = self.interaction(bi_x) ...
0
c6c80d6329dfcf01b0c52f624eee8fd8
aeb3336af5bd1ec02727ad8973d82e93
for now, just average word length number of non-whitespace characters / number of words
func average(in []*Word) float64 { wnum := 0 denominator := 0 for j := 0; j < len(in); j++ { rword := []rune(string(in[j].chars)) wnum += len(rword) denominator++ } return float64(wnum) / float64(denominator) }
1
21b22881ead5b5e827186a69187663b7
faad6374b6c542f6186fb7e0ae5f119b
パーティーメンバー(名前)からパーティーメンバー(id)情報に変換
def translate_name2id(party_member_names) party_member_ids = [] party_member_names.each do |poke_name| poke = Pokemon.where(name:poke_name).first if poke == nil p "NameError:#{poke_name}" break else party_member_ids.push(poke["poke_id"]) end end return party_member_ids end
1
2492dce9aa040c0555a2fc9b996ba57e
7f02d545a9eec3d26ec26a811fb8e04c
Gets to the absolute home url link.
class FlashArray(TimeStampedModel): def get_absolute_url(self): return '/flasharray/home.html'
1
da3a1864f6c6628dcecafb66fe4ac0d6
43e5904f14d4cecb71ff6de92bcf3596
This method was generated by MyBatis Generator. This method returns the value of the database column EPSS.ES_ITEM_STL_TKCTT_ENG_MEA.CREATED_DATE
public class SYS_PARAM_SCREEN_DEFINITIONVO extends SYS_PARAM_SCREEN_DEFINITIONVOKey public Date getCREATED_DATE() { return CREATED_DATE; }
1
bb2aa3a860dcb5b92d25a02b6b1b49aa
8a1711c83bccf8e932ad4a8574984fd3
Sets up the candidates and voters
self.configuring_votes = {} self.sent_votes = {} self.vote_lookup = {} self.DBManager = db_manager self.set_up_tables()
0
34e89941d0770acb09f58bb7416972c3
eec183fb1857245c4b6f5595f4bf25b9
Returns the registration form.
class tx_seminars_FrontEnd_RegistrationForm extends tx_seminars_FrontEnd_Editor private function getRegistration() { return $this->registration; }
0
2680f5e992fd3664db45e3b94e8e0d7a
455ed49e0a73c21f8fc9dac9dc769a07
This call returns the document types that the user can access but in a preformatted tree with parent/child relationship
class ProvidersApi def documenttypes_get(opts = {}) data, _status_code, _headers = documenttypes_get_with_http_info(opts) data end
0
e8dd4ad1901d2bc73649a8cfc2a5cc84
b6e37664048fb2b8f41da3e2e51ea14c
Finalizar tickets de entrada (Estado Terminado)
class CRUDController extends Controller protected function legalTicketIsNotComplete($id) { (int) $id; $recordToUpdate = LegalTicket::findOrFail($id); DB::table('legal_tickets') ->where('id', $id) ->update(['id_status' => 1, 'id_executor' => NULL]); return(redirect('/legal/outgoing...
0
aabc6f8a7d2a02f346538768dab1d7ce
39fcd1e5cbddc984c51933125209d1d9
Clear the stack to bring you back to the base fragment
FragmentManager manager = mCentralMap.getFragmentManager(); try { manager.popBackStack(EXTRA_FRAGMENT_BACK_STACK, FragmentManager.POP_BACK_STACK_INCLUSIVE); } catch(IllegalStateException ise) { } }
1
af7d489bf3deb216963227d107d8304b
bec9828cf99126b2aef25c8d86072b03
Update password and send mail for user
{ $auth = new auth($user_id, $user_pass); $bool = $auth->authentication($user_id, $user_pass); if ($bool) { $dbh = DB::getHandle(); $update_mailaddress = $dbh->prepare('UPDATE users SET user_mail = :user_mail WHERE user_id = :user_id'); $update_mailaddress...
0
de26ad0c26e40806d03cf3c8c83c3eef
984ffb7843a49bb3eaccf4787a7af81c
多条件分页查询客户计划表
@Service public class CusDevPlanService extends BaseService<CusDevPlan,Integer> public Map<String,Object> queryCusDevPlanByParams(CusDevPlanQuery cusDevPlanQuery) { Map<String,Object> map = new HashMap<>(); PageHelper.startPage(cusDevPlanQuery.getPage(), cusDevPlanQuery.getLimit()); PageInfo...
1
1427b970352cbb90c4e095bd072bb3ef
32a165ae904cebb3738b602436c5bb8f
Get not only size of the given object, but also the size of objects referenced by the object, down to `max_depth` distance from the object. Note that this measure is necessarily approximate since some memory is shared between objects. The `max_depth` of 4 is roughly tested to give reasonable size information about data...
def getsize(obj_0): def inner(obj, _seen_ids = set()): obj_id = id(obj) if obj_id in _seen_ids: return 0 _seen_ids.add(obj_id) size = sys.getsizeof(obj) if isinstance(obj, zero_depth_bases): pass elif isinstance(obj, (tuple, list, Set, deque))...
0
271a4f17c080050aa74b642fd87d3167
f0f58089484dcc2c724de8808fbac704
Выберит из массива объекты, которые подходят под выбраные пользователем критерии
class FilterService public function applyFilters(): array { if (count($this->filters) == 0) return $this->dao->getByFilter($this->entity); $instances = []; $firstFilter = true; foreach ($this->filters as $filter) { $fields = $this->parseFields($filter[0]); $arrVal...
1
7bcba92726fca8ece1f462d0131b164c
1d185972928bb23a252be755dc392157
FQDNからバイト形式のQNAMEを返す
domain = strings.TrimLeft(domain, ".") domain = strings.TrimRight(domain, ".") domain = strings.ToLower(domain) if domain == "" { return []byte{0x00} } bytes := make([]byte, len(domain)+2) pieces := strings.Split(domain, ".") offset := 0 for _, piece := range pieces { bytes[offset] = byte(len(piece)) off...
1
83593b773443f500f85e12ed0de65b55
df67ea3c18a25b9d84903180f2da79ad
Estimate step length
class QLearningAlgorithm: def getStepSize(self): return 1.0 / math.sqrt(self.numIters)
1
74e52300d0e4b61385cec88d385cae7d
41145a7fce4799634785092a5af71005
Shows HTML within Jupyter notebook.
display(HTML(""" <style> .output { display: flex; align-items: center; text-align: center; } </style> """)) pd.set_option('display.max_colwidth', -1) display(HTML(df.to_html(index=False)))
1
571c0a06261fc31459e7de97d1401355
9c5501269c45a188c4ae67e14282df06
给用户新增角色
void addRole(User user, Role role);
1
6192f7fb380c651ab7583e8860ac227b
f44afa46b10789ebef059af86dad4481
Callback after cache has been written
protected function afterWriteCall() { $this->resetValidateOptions(); $this->counterCache(); \Cache::clear($this->name); }
1
9bad61a9cbe4f27d82db251898ee03c1
6408e86406fdbc97e87410d3cbd12feb
获取当日投诉信息
getInquireEveryDay () { return axios.get('/inquireEveryDay') }
1
3f19eac1305d8b381ad9520fe446037c
7f5d7d581c13260f5d48ac4d0d451047
Set active power limit in % of rated capacity.
class WebDriver(Context): def set_power_capacity(self, percent): self._selenium_web_driver().set_power_capacity(percent)
1
dddac5a536fe515d4b099c62928d0498
6e22902ee5b26798fdb6109eb675ba98
阻止尝试某个资源加载,目前是还未加载的资源,从列队中做移除,其他状态不处理
namespace BDFramework.ResourceMgr public class AssetBundleMgr : IResMgr public void LoadCancel(int taskid) { if (willDoTaskSet.Contains(taskid)) { willDoTaskSet.Remove(taskid); BDebug.Log("BResource 移除task:" + taskid); } }
1
6c1db04c2b9ca9d47f0defcbfa012f05
ea149b28fbec0c48f44d22d597c7fba3
Vrátí string složeny s jména a příjmení uživatele
class User extends ActiveRecord implements IdentityInterface public function getFullName() { return $this->name . ' ' . $this->surname; }
1
f50827c5be7f6a04f094a482f767e7ac
873c2e23d1661d75b29c1dd762eedc02
Hides the new thread reply modal when close button is clicked
export class ThreadComponent implements OnInit onNewThreadMessage() { $("#messagingModal").fadeIn(); }
0
6fda0bfb0e775862f5784424a3378441
8b0ed9e223ca0ecf53292baf52048749
Test for mapping json to OpenHour object
timestamp = datetime.fromtimestamp(1570749472) housekeepingData = fakeHousekeepingAsDict(timestamp) housekeeping = Housekeeping(**housekeepingData) db.session.add(housekeeping) db.session.commit() self.assertTrue(isinstance(housekeeping.to_json(), dict))
0
f890b6cbaf4f193f70602a832cce0fbf
3946d7937a3361d7cbb49b076aa41549
present a page with current information for the selected Boat Type to be edited
def boat_type(request): boat_types = BoatType.objects.all() context = {'boat_types':boat_types} return render(request,'boat_census/boat_types.html',context)
0
816771b189c0dc8abff574c669d745af
4703e8e1b51f563089f20ea111d3f201
测试+=
{ cout << "test7" << endl; Complex z1(2,2); Complex z2(3,3); Complex z3 = z1 + z2; assert(z3.getReal() == 5 && z3.getImag() == 5); }
0
29404bb8ec938ffb077b718a196456ac
abedcf78e81410068d8dad46ead77f08
Raised whenever a configuration file is being read as a 'flat' dictionary (merging all sections into one dict) but the same key appears in several sections
confp = YamlConfigParser() confp.add_rule('aaa.aaa.aaa') confp.add_rule('aaa.bbb.aaa') confp.add_rule('aaa.ccc.aaa') self._test_conf_bad( confp=confp, conftext=""" aaa: xxx: aaa: xxxxx aaa: ...
1
63770841f4f517c933060e86d91c8dc6
2e9c05a781025cb79009f5060cd415e2
Sets a collection of Phone objects related by a many-to-many relationship to the current object by way of the company_phone cross-reference table. It will also schedule objects for deletion based on a diff between old objects (aka persisted) and new objects from the given Propel collection.
{ foreach ($this->Phones as $formPhone) { if (!empty($formPhone->Id)) { $linkPhone = \company\models\LinkPhone::model()->byCompanyId($company->Id)->byPhoneId($formPhone->Id)->find(); if ($linkPhone == null) throw new \CHttpException(500); $phone = $linkPhone->Phon...
1
89a1a4f16f80d233a49052d54eb69b5e
1236ca62c6b0086b61cad83e5da46244
年齢のタプルを作成
if age % 10 == 0: age -= 1 lower_bound = age - ((age % 10) - 1) upper_bound = age + (10 - (age % 10)) return lower_bound, upper_bound
1
b029b84b34f909305afc5d55126f502f
1f71a112ab113267d64761ccbdda83b8
Lấy dữ liệu một bản ghi truyền về ở dạng OBJ.
namespace QRST_DI_MS_Console.UserInterfaces public partial class CtrlTableManager : DevExpress.XtraEditors.XtraUserControl private COLUMNS_Mdl GetColumnObj(DataRow dr) { COLUMNS_Mdl mdl = new COLUMNS_Mdl(); if (dr != null) { mdl.COLUMN_NAME = dr["COLUMN_NA...
1
bc593fd2a35e857e80b678a2955e3a28
c2c9738aab87456aa09fbfd98e752e23
Recursively converts Bukkit configuration sections into documents
output = [] this = {} assert len(config.items()) == 1 for k, v in config.items(): key = k values = v if 'base' not in values: if parent_base is not None: this['base'] = parent_base else: this['base'] = values['base'] if 'name' not in values: ...
1
d43b1363bcdc1b32d007ea0c8c60df32
39ad547dba3c21231ce87181fb17a57a
获取内置存储卡剩余空间
long availableSpace = -1L; if (FileUtils.isExternalStorageAvailable()) { try { String path = Environment.getExternalStorageDirectory().getPath(); StatFs stat = new StatFs(path); availableSpace = stat.getAvailableBlocks() * (long) stat.getBlockSize(); } catch (Exception e) { LogUtil.e(e); } ...
1
5e9527a05764d67e4339b9a27ba99356
ddd9617c8a382444328f8271869f503d
This example demonstrates how to limit count of items when rendering Outlook data files.
string emailToMatch, int pageIndex, int pageSize, out int totalRecords) { throw new NotSupportedException(); }
0
dee14288582c5f0fcfeb3d5285eb65b0
a66f3c6c19572100dd05d27f68eb8cb4
Função que renderiza o canvas. Cria um tabela e coloca uma cor em cada célula. Essa função pode ser alterada para renderizar sem alterar a estrutura anterior. Pode-se ser feita também utilizando o canvas do HTML ao invés de tabela.
for (let i = 0; i < numLinha; i++) { let tr = document.createElement("tr"); for (let j = 0; j < numColuna; j++) { let td = document.createElement("td"); tr.appendChild(td); } tbody.appendChild(tr); } }
0
1a908ffede95e54858ff7fd8557c7653
fd5a3d3235625adbab54fd9d449b419b
Returns true if the entry exists in the database
namespace GraphLabs.Site.Models.TestPool internal sealed class SaveTestPoolEntryModelSaver : AbstractModelSaver<SaveTestPoolEntryModel, DomainModel.TestPoolEntry> protected override bool ExistsInDatabase(SaveTestPoolEntryModel model) { return model.Id != 0; }
1
d88119eb123022884b04c2537c0b3cbd
888075f9dea7f487a3ec2bd3392d4456
Go through all the models at root level and create xml.
def source_library_to_xml(skymodels):
1
c80e86fd34bcab5451b618f96de3d212
99d42a90a7722f010241be5d13d44412
ldloc.0 - Load local variable 0 onto stack.
void static INLINE command_LOADDVAR0(registers* pointers) { if (pointers->sp >= pointers->head) stack_realloc(pointers); pointers->sp++; (pointers->sp)->dnumber = pointers->ctxsp->locals->dnumber; }
1
191fee47050eb10649aa7d81d905489b
0bc897d22542c0169fced5639d2613bc
获取FullDomain,即host
namespace NFinal.Middleware public class CoreMiddleware : Middleware<HttpContext, HttpRequest> public override string GetSubDomain(HttpContext context) { return context.Request.Host.Host==null?"www":context.Request.Host.Host.Split('.')[0]; }
0
1ba129bf148b8695938f978a8c27c0d7
b3029e7928dd150eb56af936acbc5f70
! \brief Turn off or on standby mode gyroscope x-axis
{ Gyro_GPIOx -> CRH &= 0XFFFF0FFF; Gyro_GPIOx -> CRH |= ((sta == SDA_Ws)? 3 : 8) << 12; }
0
aa64138c787812ed9095bc1b1f454817
8336e5daf2c74ae6b7bde46eb181f33d
output human-readable description of contents of container as HTML <p> used for debugging / output to JSP Uses descriptions from components that implement the {@link org.astrogrid.jes.component.descriptor.ComponentDescriptor} interface
public String toStringHTML();
1
5aa49840119dd2f6fe29862a595bf961
1da49fe4a72ae4fa33fe93fe4c4d1b19
点击。根据控件的resource-id和text属性找到指定的控件执行点击操作。text包含,非绝对匹配。
val rootNode = rootInActiveWindow if (rootNode != null) { val nodes = rootNode.findAccessibilityNodeInfosByViewId(viewId) if (nodes == null || nodes.isEmpty()) return false Log.i(TAG,"findTxtClick: " + viewId + ", " + nodes.size + ", " + nodes) ...
0
e859810fa0405c88080c9cd0fc61d68a
290b66fb69b25c4752ee7f9a323dc503
如果删除父部门,则会同时删除下面的子部门
@Service public class DepartmentServiceImp implements DepartmentService public int deleteByParentId(Integer id) { departmentDao.deleteByParentId(id); return 1; }
1
7186171f94cd5e1bff8a9d09a2a0e5c1
748681d24771bce5e581e22f64592baf
生成账号密码签名(SHA512)
{ byte[] HashValue, MessageBytes = new UnicodeEncoding().GetBytes(password); SHA512Managed SHhash = new SHA512Managed(); HashValue = SHhash.ComputeHash(MessageBytes); return Convert.ToBase64String(HashValue); }
1
461d59b971d8a45aec839244ea222ca4
7657b24c666a5d8a5353053733195329
从serviceInfoList集合中获取所有要创建的AC对象
@Component public class NamingServerDaoImpl implements NamingServerDao protected List<ConnectInfo> getConnectInfoList(ConnectorProfile[] profiles) { List<ConnectInfo> connectInfoList = new ArrayList<>(); for (ConnectorProfile prof : profiles) { ConnectInfo con = new ConnectInfo(); ...
0
8df781de5020e891eda86416905fe2f3
9230eb71121600edd77921e3337848d4
Remove the provided run configuration from this workspace.xml's list of run configurations.
public void deleteLaunchConfiguration(String lcName) throws AmazonServiceException, AmazonClientException, IllegalArgumentException;
0
59088af097b7cfcc2e96e695071e9e04
4c28c4278f0d7a693e1ab642effb9050
话题是否已读
async function isread(payload) { return request('/home/Notice/setNoticeRead', { method: 'POST', headers: new Headers({ 'Content-Type': 'application/json; charset=utf-8', Authorization: getAuthInfo(), }), body: JSON.stringify(payload), }); }
0
ce3634faed25daa56e78039e7f3c7dcd
001297dcfc082773e167d4fb97ec3b96
Converts the signed value on the top of the evaluation stack to a single floating (8 bit integer) with no overflow check. Pushes an F value onto the evaluation stack.
TEmitter Conv_Ovf_I1() => Emit(OpCodes.Conv_Ovf_I1);
0
79b953f4a91d210ecbc36e9dd4f31f36
d3a4ba1fb6011f089e48a6ed169506a8
Specifies in property list whether to create missing intermediate groups. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5P.html#Property-SetCreateIntermediateGroup
expect class DBOptions() : RocksObject fun setCreateIfMissing(flag: Boolean): DBOptions
0
78b052be4e6f2e742ffbbed633494ed6
2e7e77bb99838c3de063acd14588e947
插入多条提醒
{ var commands = new List<KeyValuePair<string, IDataParameter[]>>(); foreach (var item in entities.Cast<Domain.Reminder>()) { commands.Add(INSERT_COMMAND, CreateParameters(item)); } ExecuteNonQuery(CommandType.Text, commands); }
1
e7bf4eb84c5e0d414f0967afd984381a
4252c2c3a5c8e5b02ed5c4f793f71999
Affiche la scène du menu du jeu.
void MenuStatique::afficher(sf::RenderWindow &app) const { app.setView(viewMenu_); inventaireStatique_.afficher(app); }
1
56756e9cc03d9f3ce71d71259a1345ce
fd624ec76bc188b1b578da706ae43a09
包含默认name属性的装饰器。
const newComponent = props => { return <Component {...props} name='react' /> } return newComponent }
0
4ae2314d49e3fb8c9c7c7ba2445b3142
97e2508eafe419e2027ae535655ea851
使能GPIO外设和AFIO复用功能模块时钟
void clkConfigure(unsigned int GPIO_MODULE,unsigned int GPIO_CLK,unsigned int GPIO_CLK_ENABLE){ HWREG(SOC_CM_PER_REGS+GPIO_MODULE) |= (GPIO_CLK | GPIO_CLK_ENABLE); }
1
fcd3debe23af2db9590485a029523259
ec53b13e04fdf504eb3d8ae5a1d453e7
Returns the optional canned Access Control List (ACL) to set permissions for the new object created when the multipart upload is completed. created when the multipart upload is completed.
public class InitiateMultipartUploadRequest extends CosServiceRequest implements SSECustomerKeyProvider, SSECOSKeyManagementParamsProvider, Serializable public void setCannedACL(CannedAccessControlList cannedACL) { this.cannedACL = cannedACL; }
0
24cd75efb5c8245d74185bf0a21be254
90742f0f7cb00c460b5af13e04f796c8
Download the RSS file locally.
{ UtilsSystem.EnsureDirectoryExists(localPath); var url = this.BaseUri + uri; WebClient client = this.PrepareWebClient(null); client.DownloadFile(url, localPath); }
1
ab09d0f938c8aa1e5846d9e9e1d8bdd6
5f2c765f3f990a0e273fe7f33f210261
formal past negative
self.subject = [["you", "your name", "your crypto", "your icon"], ["subject"]] self.verb = [["smell like", "is", "seems like", "appears to be"],["verb"]] self.supplement = [["a ponzi pyramid", "a scam", "a hateful trap", "a bad meme", "a fake horse", "a stingy trash", "an expired pancake", "a bi...
0