query_id
string
corpus_id
string
query
string
code
string
label
int64
52507061ab29d4e379b878d25d7a7738
8a4a76a5fc13db4b1a36a78c91ea8731
canvas 绘制关闭按钮
class PopCase{ setclosebtn(){ this.obtn = document.createElement("button") this.obtn.style.position="absolute" this.obtn.style.width = 50+"px" this.obtn.style.height = 25+"px" this.obtn.innerHTML = "X" this.box.appendChild(this.obtn) this.obtn.style.left = this.box.offsetWidth-this.obtn.offsetWidth...
0
29921a6bf4ee228ef8af90542ca8ba23
528f2740ca8c1637d865e46b632e1472
Пересчитать доступные клетки карты
{ ResetRunData(); List<Label> allLabels = new List<Label>(Enum.GetValues(typeof(Label)).Cast<Label>()); { foreach (MapInfo map in Maps.MapList) { if (GetFlag(map.IsVisitedFlag)) { ...
0
e254a807b6d889e4b9ab15219d3f8e4f
f4ce4b4f88e5ec4200f22e3b8f264b48
This function is called by the TCP/IP stack when an IP packet should be sent. It calls the function called low_level_output() to do the actual transmission of the packet.
int ip_output(unsigned int dest, unsigned char prot, char *data, unsigned int length) { if ( length > 1480 ) return FALSE; unsigned short totallength = length + 4*5; ip_header *header = (ip_header*)(data + sizeof(linklayer_header)); header->ip_hlv = 0; header->ip_hlv = (4 << 4); hea...
0
d1015593d409449931ded51c9bfa5a5c
290c58281b3aae328ae854ff39a09128
Test setter / getter for term property
{ $subject = $this->createInstance(); $subject->this()->_setTerms(array( $this->mockTerm(5), $this->mockTerm(2), $this->mockTerm(9), )); $this->assertEquals($this->mockTerm(9), $subject->this()->_getTerm(2)); $subject->this()->_removeTerm(1...
1
5067e46408f3dbbdcc9a61e4d4da0ab1
9dc7e0bf48956a835d785859a4e3ced8
Восстанавливает транзакции из корзины. Проверяет права пользователя перед каждым востановлением.
class Sales function pre_restore() { $result = true; $parts = array(); $parts = $this->get_historized1(); $num = count($parts); for ($i = 0; $i < $num; $i++) { $part = $parts[$i]; $pid = $part['id']; $quantity = $part['quantity']; ...
0
6eae590ebea7e9e5a48c112de7adc216
1e834af4d08d0e3579f2b9a124cb8236
Toggles the specified flags in-place.
toggleFlag(index) { this.properties.flags ^= 1 << index; }
1
ebb7605ea14e607ead791c593da31b94
efc473f62f712ea2776ffdc23823f883
Metoda, która edytuje encje jacht.
class ShipsMapper static function updateShip(Ships $updateShip) { $sql = 'update Ships set name = :name, yearservice = :yearservice where id = :id;'; self::$db->query($sql); self::$db->bind(':id', $updateShip->getShipID()); self::$db->bind(':name', $updateShip->getShipNam...
1
100ee8359426d35f0e5098ceba24a3c8
ee86cbd8930f51868fef7eda1d86c48a
Returns the source sequence of the most recently processed event, or {@link BaseState#NIL_SEQUENCE NIL_SEQUENCE} if no event has been processed yet from the source associated with this event state. <p> Always available, also for {@link BaseState}.
Sequence getSource();
1
06ad3ed02b895b49a2f901398c124c67
5717e5b4449038a9d67b804110c0c724
Draws the sprites stats if it is an instance of a monster card
class Monster(object): def draw(self, surface): if self.health == self.mhealth or self.npc: monster_text_text = self.name monster_text = my_font.render(monster_text_text, 1, (255, 255, 0)) text_width = int((my_font.size(monster_text_text)[0] - 16) / 2) surface.blit(monster_text, [self.pos[0]-text_width, s...
1
fd4707d59fdb0555d6e8e9c702011007
14c0ddc8fd3f4fa10be4bf083243d3f9
Filter the query on the ip_address column Example usage: <code> $query->filterByIpAddress(1234); // WHERE ip_address = 1234 $query->filterByIpAddress(array(12, 34)); // WHERE ip_address IN (12, 34) $query->filterByIpAddress(array('min' => 12)); // WHERE ip_address > 12 </code> Use scalar values for equality. Use array ...
abstract class BaseIpQuery extends ModelCriteria public function filterByDepartement($departement = null, $comparison = null) { if (null === $comparison) { if (is_array($departement)) { $comparison = Criteria::IN; } elseif (preg_match('/[\%\*]/', $departement)) { ...
0
ebe193c8ce2d0c2a16ddf64f7f585c76
37574fcdc9c86b012786a39fd461d4fd
Returns a string indicating the status of the environment.
namespace Aspekt.AI.Internal string GetStatus();
1
04208df9a60b79fe44c7bbc1ee52af8e
634fdcd07f2e8d515575c5057131d839
Configures trace.
namespace PlugAndTrade.DieScheite.Client.Example.AspNetCore public class Startup public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app .UseTracingScope() .UseDieScheite(new DieScheiteAspNetCoreSettings { ...
1
6efee84866b2c7ac54d33a11d09dc5e5
cf7738852d2c614ea2af78759f297679
瞬间移动,清理当前的位移
{ if (newMoveCoroutine != null) { StopCoroutine(newMoveCoroutine); } moveTweener.Kill(false); inSingleMoving = false; if (!isIdle) { PlayRoleAnim(CommonData.roleIdleAnimName, 0, null); } ...
1
9af13cc9f51f7bb0eab38c0757ff24df
b3258d8b30489d6d917a91f81135adfc
Cette méthode retourne tous les noms de méridiens
public class FileManager public static List<String> getIslandNames() { return islandNames; }
0
18ee6d4cceae47690e5e45af913af74c
8f6454c0b009c40d55b41042e57d80d2
<p> 获取学生实习统计数据 </p>
@RequestMapping(value="/studentTiKuRecord", method = RequestMethod.POST) public Object studentTiKuRecord(StudentTiKuExcipseVo StudentTiKuExcipseVo){ StudentTiKuExcipseVo.setCompanyId(WebUtils.getCurrentCompanyId()); PageFinder<StudentTiKuExcipseVo> pagefinder = studentServiceImpl.queryStudentTikuExperise(StudentT...
1
0fe3a8a4d9082965a5ee46935a317e76
0b8f6a08f9cbbadef5c689efd79a4092
跳转到NFC设置界面(目前和更多链接方式跳转的是同一个界面)
public static void openNFCSettings() { final Intent intent = new Intent(Settings.ACTION_NFC_SETTINGS); SUtils.getApp().startActivity(intent); }
1
c0ed841d9639b1257b7f560a27285249
770d8bd9c3e2bd9e4a74bac10436fa2b
finds the next visible item after the one specified
namespace JaStDev.ControlFramework.Controls public class DockSplitter : Thumb private UIElement FindNextDockItem(DockPanel panel) { if (panel != null) { int iIndex = panel.Children.IndexOf(this); for (int i = iIndex + 1; i < pa...
1
e29c81a6793adcd34f10dfaae8cef1cb
0bc6745efb2abbe4a56684f28b01e7b6
Shifts text down. When text is added to the notifier all previous text must be shifted down
{ if (!strings.size()) return; float currentYOffset = mScrollSpeed * dt; if ( mY <= mMarginY ) { timer = 0; size_t nbLines = 1; vector<string> displayText = split( mText, '\n'); vector<string> newDisplayText; for ( size_t i = nbLines; i < disp...
0
75c96ac918cfa94a6b471474b8455cca
8167a9ce9b3b7c998f4195cbf3af6caa
Flip-flop between commit success/failure.
class JobQueue def commit_complete? [:success, :failure].include?(self.commit_status) end
0
20acab2173ea6279e51806ffae9e4e39
dbdf1c7644419787c39b8a1c34245973
Available (== allowed, ie not appearing in the same row, column or box) numbers at a particular (empty) square.
return set('123456789') -\ set(get_row(grid, pos)) -\ set(get_col(grid, pos)) -\ set(get_block(grid, pos))
1
58aaae383ded00cb99930d0a6635ba30
b6735c0b838977a6971fafd24c042443
온라인 주문 페이지 열기
var arr_browser = new Array ("Phone","Mini","iPod","iPad","Android","BlackBerry","Windows CE","lgtelecom","SAMSUNG","MOT","SonyEricsson","Nokia"); var userAgent = navigator.userAgent; var isMobile = false; for(var i=0;i<arr_browser.length;i++){ if(userAgent.indexOf(arr_browser[i]) > -1){ isMobile = true; }...
1
a033cbe5d833d30c12debe27a5cfebe3
d9e2feada6105bc256c39ec60b2616cc
Derive Project's expected base/default environment.
env.local_dotenv_path = os.path.join( os.path.dirname(__file__), 'etc/base_image/.env') dotenv.load_dotenv(env.local_dotenv_path) env.project_name = os.environ.get('PROJECT_NAME', '') env.project_dir = posixpath.join('/srv/images/', env.project_name) env.use_ssh_config = True env.hosts =...
1
54debb6d3620f83fcacb7906c3664844
9add65d3f42268db91eff52fc4822515
Check if any of the watched props have been updated when there is a state change, and emits an update to the server if one was found.
class State extends EventEmitter queryUpdated() { this.emit('core.state.queryUpdated', this) }
0
8b28395d3916ded207d9763867287af6
12630eef807f5f68f3506cde28303f4c
验证数据的正确性, 一旦数据上传到平板上面,那么校验他的正确性, 如果任何一项数据的值为0 ,那么 直接就不处理了.
{ boolean bReturn =false; if(text_mobile01.getText().length()==0) { text_mobile01.setFocusable(true); text_mobile01.setFocusableInTouchMode(true); text_mobile01.requestFocus(); return bReturn; } else if(text_mobile02.getText().l...
0
85a407a6b4fef534f6e7dce0f61742e1
67296a52ad863c4ad1102ecf1b3bb508
Tests handling webhook message of cases/test type. Controller should response with code 200.
res = self.client().post('/webhooks', json=self.TEST_DATA, content_type="application/json" ) data = json.loads(res.data) self.assertEqual(res.status_code, 200) self.assertEqual(data['succes...
1
4ae42aa2488cf5b4ed9554e2c4c5712c
d04bfae320dd0ffe346866d641c2a02f
The position in the res file as index number (starting from 0).
class MCPLParticle: def file_index(self): return self._b._offset + self._i
1
30fbc53d2b72df5b3634cb16d3d8e0ac
1512a6542b2b57a6963907e26eb8b858
Returns a shuffled sequence of given arguments
n = len(args) for i in range(n): v = args[i:i + 1] if n == 1: yield v else: _args = args[:i] + args[i + 1:] for p in permutation(_args): yield v + p
0
6294d7382d069a7b46a81517a34cfab0
61162dde8ba7d9247e88f3c2e09c2596
update the logo object's sprite based on its state
class Player(arcade.Sprite): def update(self): if self.change_x < 0: self.set_texture(settings.TEXTURE_LEFT) if self.change_x > 0: self.set_texture(settings.TEXTURE_RIGHT)
1
2414a2d628c9761c04e48a1e09fcaaa5
4154fe35d9cdaa68feff7dcf9664089c
添加房间动作,从客户端接收房间的具体信息
class RoomAction extends Controller public function addSubmit(HttpRequest $post) { $data = $post->getParameters(); $result = $this->roomService->addSubmit($data); $result->output(); }
1
9c17c240e1297e88304a42ee494d059a
19762de08b9c9ec17fdc97f1a04d3a99
Validate ports are forwarded
class ValveTestBases: class ValveTestBig(ValveTestNetwork): def test_move_port(self): self.rcv_packet( 2, 0x200, { "eth_src": self.P1_V100_MAC, "eth_dst": self.UNKNOWN_MAC, "vlan_vid": 0x200, ...
1
0a8c0eac6290ba769376f22d5cfe7750
ec3ba43d51ff24e3f93ea51e86995775
Called before the elements data is updated
function beforeUpdate() {}
1
a61f073d45af25caf13555cf89cae56a
3234b6a87685cdd1a6c5e9807215712e
adds new address to list of saved addresses new address is added to the top of the list
ADDNEWADDRESS (state, data) { if (data) { state.ADDRESSLIST.push(data); } }
0
c172705714f596f61cfae83c8a46d64a
7bc641dfd74ddf152e032a46379ed497
first run: pre-compute all correlations
{ register Shortword i; Shortword shift; Longword L_sum; v_equ(smoothedspect, lambdaD, ENH_VEC_LENF); v_scale(smoothedspect, ENH_INV_NOISE_BIAS, ENH_VEC_LENF); for (i = 0; i < NUM_MINWIN; i++){ v_equ(circb[i], smoothedspect, ENH_VEC_LENF); v_equ(circb_shift[i], lambdaD_shift, ENH_VEC_LENF); } v_equ(sm_shift...
0
2d9eec1cc2d8d53a7cf12aaa38aa2f76
7b51cc289467d2f7d5e92efa31362ca0
由一个LR1项目得到一个项目集闭包I0
LR_1_DFA::LR_1_DFA(set<LR_0_item> &items) { LR_1_item s = LR_1_item(*items.begin(),ESYMBOL); set<LR_1_item> I0 = epsilonClosure(items,set<LR_1_item>{s}); nodes.push_back(I0); edges.push_back(vector<edge>()); queue<int> q; q.push(id); node_id[I0] = id++; while(!q.empty()){ int cur...
1
2882b370f05c84b7ee62eb14c77467c1
4a46bc4995f566460e80b4b222fab745
Автоматическое определение возможности разбора парсером
abstract class ComponentAbstract abstract protected function canParseAndProcess();
1
14f839011089670e526fa23e8bbed427
d13c5fdfadac376d336530be70ac80d4
Posts an event described by a name
public class EventServiceImpl extends AbstractServiceImpl implements EventService{ @Override public void postEvent(String sessionId, String username, String eventName, String resource, String context, boolean modify) throws Exception { Call nc = getCall(); nc.setOperationName("postEvent"); ...
1
65bd8e5cd881844aa62d4d8008e6dde5
abcb7d5139d8efcf78aab504b8568f97
Returns the stellar continuum cube.
if lmax is None: lmax = self.Params.max_l_tensor lmax = self._lmax_setting(lmax, unlensed=True) res = np.empty((lmax + 1, 4)) opt = c_int(lmax) CAMB_SetTensorCls(byref(self), byref(opt), res) self._scale_cls(res, CMB_unit, raw_cl) return res
0
f0c8b1f40c140e4630a70f2f50d1c106
3ae5aa0fd0803963c11f851661e42bc2
findPostsAllの正常系.
{ $posts = PostModel::getAllList(); $this->assertCount(7, $posts); $this->assertEquals(1, $posts[0]->getId()); $this->assertEquals(2, $posts[1]->getId()); $this->assertEquals(3, $posts[2]->getId()); $input = array(); $input['ids'] = [1,2]; $header = $t...
0
5686009237ba1ad293135c4be53fc83f
46a4c1f8ec5d7c022f6677df53f6bc51
Validate current line characters for SAM file stream Input : SAM file Output : Current line characters validation
namespace MBF.TestAutomation.IO [TestClass] public class MBFStreamReaderBvtTestCases [TestMethod] [Priority(0)] public void ValidateLineCharsForFastAStream() { ValidateChars(Constants.SimpleFastAStreamReaderNode); }
0
03bf80a8716833c8cda82cbcb96038ce
c36029ee79dcedb8b4ed0f67b00e04e1
! \brief Finds the lowest unused index in the client list.
int getFreeIndex() { for (int i = 0; i < CLIENT_MAX_COUNT; i++) { if (clientList[i].socket<=0) { return i; } } return -1; }
1
167503d65b74e08315a90739459f6343
f3f9e6693cb021f0c640980e4c8247e9
[spec]: https://tc39.es/ecma262/#sec-number.prototype.tofixed
var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; }
0
05c49fac72ff04da2c9c93a12799fce5
03af38bb10e69bede69f687927ba1f5d
从彩票官网根据api获取最新开奖信息
{ List<Datum> list = new List<Datum>(); var url = "https://m.caikz99.com/v1/lottery/openResult?lotteryCode=1407&dataNum=10"; var http = HttpApi.RequestMethod("", url, "", GetSessionInfo(), "Get"); if (http.StatusCode == HttpStatusCode.OK) { ...
1
e8505a8116dd82b7e46578948fae9a9a
a8b5c51c0aa6d235eb664dcdd6811cb0
在新建计划下新建单元
self.execute_js(self.model) self.select_frame(self.find_element(self.model_frame)) self.click(self.add_button) self.wait_goframe(self.add_frame) time.sleep(1) self.type(self.model_name,name) self.click(self.choose_unit) self.wait_goframe(self.unit_frame) ...
1
7c257ef0ff2aed6c694687d5d14eb24b
2e62f842729ee141f0cc0b4deb0e2f82
Если у ячейки нет спрайта, то рисовать её не нужно
if (icon != null) { base.DrawIcon(ref cellRect); return; } icon = AssetDatabase.GetCachedIcon(model.fileRelativePath) as Texture2D; if (icon == null) return; var rectTex = new Rect(cellRect) {width = AseUIDef.IconSize, height = AseUIDef.IconSiz...
1
7e327c3a1aa7640fd05583b46f0e0b72
7defaf39e2bfcc96595ae800ce2304fd
Remove zero padding
class AESCipher: def __unpad(self, s): s = s.rstrip(b'\x00') return s
1
315788baf0a68a924056fb1927a3b6e2
5beb94e184722cd6c84d2bbe984c2f39
@brief 语音识别指令处理
{ jan_ind_data_type *indication = NULL; jan_cmd_data_type *command_data = NULL; int index = 0; int rc = JRD_NO_ERR; if (!command) { JRD_OEM_LOG_INFO(JRD_OEM_LOG_ERROR, "Error, Command pointer is invalid.\n"); return JRD_FAIL; } switch (command->cmd_hdr.type) { cas...
1
df5feb0dbebeeb64bbc08c0c4e3f0d41
c192f169dc335e2cf19f961347af70fa
Set question count.
class Topic extends Abstracts public function incQuestionCount($topicId, int $count = 1): void { $this ->where('topic_id', $topicId) ->inc('question_count', $count) ->update(); }
0
e18c5cf1a64b60f740b930f8c6b467a1
2a694d8aff4040a6a8d509fe96b3f8f8
Query the graph to find oldest top K actors
networkG = createNetworkGraphFromDB() musicG = createSongGraphFromDB() neighboursTillDepthFive = neighboursTillDepthK(networkG,source,5) clusterList = neighboursTillDepthFive musicPreferences = populateMusicPreferences(clusterList,musicG) songs = [] for song in musicPreferences.keys(): songs.append((musicPrefe...
0
f3e89f7b7231a4b724affb91ff2423ce
f5229b6e62dfce813123ca3cc9d1b17a
If config says don't email
class EmailBackend(SmtpEmailBackend): def __init__(self, fail_silently=False, use_ssl=None, timeout=None, ssl_keyfile=None, ssl_certfile=None, **kwargs): super().__init__(host=settings.EMAIL_BACKEND_MAILHOG_HOST, port=settings.EMAIL_BACKEND_MAILHOG_PORT, username='', password='', use...
0
8c71c6c32edeb57455cb0e6229334701
86a43d7ad97540dc49de2b84a8ffc00c
Parse CSV of accounts into an associative array
function parse_csv($content, $has_header = 1, $separator = ",") { $lines = explode("\n", $content); $result = array(); if ($has_header) { $headcount = 1; $header = array_shift($lines); foreach (explode($separator,$header) as $heading) { if (trim($heading) != "") { $headers[$h...
1
4b842aa1510f1402661c0ca9001dbfd4
b5ff553c73be2b1aa01631e972f19653
Calculates when is the next notification date.
var expDate = new Date(); expDate.setHours(expDate.getHours() + matchExpiration); var notifDate = new Date(expDate); if (notifDate.getHours() > hrsPastMidnight) notifDate.setDate(notifDate.getDate() + 1); notifDate.setHours( hrsPastMidnight ); notifDate.setMinutes(0); var hrsLeft = Math.floor( (notifDate - new...
1
5e1947ee63ea64bdb0a31bc90aab3089
0f4e9648e82fa3cf3856778812cdc4bc
Computes the shift between the start of two intervals.
if b is not None: return min(a.end, b.end) - max(a.start, b.start) else: return -1
0
952a8027ff765c5cf861a2df567ad63c
0a20ad1851429c93ee97dcbedb6bcf3e
Adds the data record to queue, and if records queue size greater than 10, removes older one
{ dataPointQueue.Add( pt ); if( dataPointQueue.Count > 100 ) WriteMemoryToDisk(); }
0
a6c4ca44d29c245a63d3b6ae8e92210b
b05b683ebb35b80b468dc9e5e0481221
set the selected attack on cooldown
{ if (attackCooldown > 0f) { if (Time.time > attackTimer) { attackTimer = Time.time + attackCooldown; Attack(); } } }
0
43ee0bdc5b8882ce2097428b64b4d520
1edf9271ba9fb19ab934b78913a90c01
Display the debugging information for the pathfinding.
class PathFinding: class Route: def DebugMessage(self) -> bool: return bool()
0
56519892d043a448cb08e939ae5fe21f
f745c0ff4ac536467f55126c516c86dd
\brief Add a dependency to the specified config file.
def add_dependency(id=None, name=None, dependency_id=None, dependency_name=None): if not id and not name: logging.error("Please provide the name or ID of the BuildConfiguration to add a dependency to.") return; add_to = get_config_id(id, name) if not add_to: return if not depende...
1
8b8c57e170e9863843b300a14261cd03
68ac7df6524c53735aef1f1b170efdee
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <pre> Method aboutJMenuItemActionPerformed Description displays the about form Date 02/20/2020 </pre> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
private void aboutJMenuItemActionPerformed(java.awt.event.ActionEvent evt) { AboutJDialog myAbout = new AboutJDialog(this, rootPaneCheckingEnabled); myAbout.setVisible(true); }
1
f490a6153a732c4f462a63f0adca3d6e
1360b47df4fa02310242ec6e238d551a
Cette fonction permet de lancer une partie en joueur contre IA
int play (SDL_Surface* screen) { fprintf(stdout, "play()\n"); ia_ptr ias[NB_PLAYER] = IAS; if (NB_PLAYER < 2) { fprintf(stderr, "Erreur : pas assez d'ia !\n"); exit(EXIT_FAILURE); } int i = 0, continuer = 1, j = 0, k= 0, points = 0, tours = 0, bonus = 0,b = 0; Mix_AllocateCha...
1
7191e7a1f925c7c84c9618b798b4ba9d
7f878d69965f449ec2efecc26222828c
Gets a validator instance for the specified country code.
namespace NumberValidators.BusinessRegistrationNos.Validators TResult Validate(string code, AreaValidLimit? validLimit = null);
0
e09740b6997c12e2f0c4367d55ba5f05
9f467b9337d978d8e588671c86954011
批量更改用户签约类型
@Component({ components: { 'foot-nav-two': FootNavTwo } }) class BindMobile extends RegisterProxy public changeResignType(type: number) { this.onChangeRegisterType(type); this.agreementChceked = false; }
0
604222a7428e774070c8d650989bf358
e3bbcac2160dd02ce3023946700d6cb3
Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing.
class TaskSetLoadBalancer(dict): def target_group_arn(self) -> Optional[str]: return pulumi.get(self, "target_group_arn")
0
dd663f8983a8b0d31bdef4a4a2230425
f41a6af0f38cb37d90e62514ba2f4349
Поиск групп, в которых состоит пользователь, но не состоят друзья
class VK: # начало программы def friends_group(self, friends_total, params_user): groups = [] for i in friends_total: group = person.get_list_group(i, params_user) for item in group: groups.append(item) return set(groups)
0
c09afd3eed050a241cf52c36679af6a4
3d8433456de8337e9ee32cb13066bd3e
Предназначен для получения ассоциативных массивов нужных файлов к главному документу по его id <b>null</b> в противном случае
final class total_cc static public function getIdMainDocumentById(int $id): int { $query = "SELECT `id_main_document` FROM `doc_total_cc` WHERE `id`=?"; return ParametrizedQuery::getSimpleArray($query, [$id])[0]; }
0
e888ade7378880d446e1018b30202b37
efca3f32fa65d20374feb5d6e5a96a64
Cumlative distribution function for the standard Gaussian law: quantile -> probability
if (x < 0.0){ return 1.0 + GammaP(0.5, pow(x,2)); }else{ return GammaQ(0.5, pow(x,2)); } }
0
76adcc42811a1dd7c8c784ab094bd040
283bd655a16cccf35aa32da3a7e754d1
Calculate the new ACB after the disposition.
idx = int(min(self.child_tot[fil], 3)) eitc_phaseout = self.eitc_po[idx] if fil == 2: eitc_phaseout += self.eitc_mfj[0] self.eitc[fil] = \ max(self.eitc_rate[idx] * min(self.earnings[fil], self.eitc_max[idx]) - self.eitc_porate[idx] * max(0, self...
0
04f1bddff68292ad5a7bab3c3865ec40
5808123eb6a1d50512d5098557305a17
Computes the Euclidean distance between two 2D points.
public class MainActivity extends com.google.mediapipe.apps.basic.MainActivity private static double getDistance(double x1, double y1, double x2, double y2) { return Math.hypot((y2 - y1), (x2 - x1)); }
1
30796d5da23c691fb6d652e0ef85d1fd
b6834e2501d4011393cf97e38dedf387
一键召印
$model = Model(); $clic_info = $model->table('clic')->where(array('clic_id'=>$_SESSION['clic_id']))->find(); if(empty($clic_info)){ showDialog(Language::get('clic_clicinfo_error'),'index.php?act=clic_printsetup','error'); } if(chksubmit()){ $obj_validate = new Validate(); $obj_validate->validateparam...
0
e7a1740a0162f61a038805e2abd5f790
1f287b863c0e140b7e1ae7d2ee2d584e
Test that the services have been compiled
class ConnectHollandLdapExtensionTest extends AbstractExtensionTestCase public function testLoad() { $this->load(); $this->assertContainerBuilderHasService('connect_holland_ldap.security.user.provider.ldap', 'ConnectHolland\\LdapBundle\\Security\\User\\LdapUserProvider'); $this->assertContai...
1
86f8c950503c2fe9296f0494c34b08a5
f903300035b725fa5ad88aad638c90b9
Returns the scriptCollectionArray with the FileAssets objects to be publish or managed by the AssetManager
{ $scripts = array_values($this->_headScriptFiles); $scripts = array_merge($scripts, array_values($this->_scriptFiles)); $scripts = array_unique($scripts); return $scripts; }
0
3dcf5c81b81a4647b902d303ac46ad6b
71af41c259c5126b9ca6070011325b47
获取所有uuid
String uuid[] = new String[n]; for(int i=0; i<n; i++){ uuid[i]=getUuid(); } return uuid; }
1
18862411815c050280ddbc100e9ef795
4657168dee03691d5fbf704ce61e97d8
The invocator for brush changed event.
namespace TinyCeleste._06_Plugins._01_PrefabTileMap._02_PrefabPaletteWindow public partial class PrefabPaletteWindow private void OnTileChanged() { currentBrush?.OnTileChanged(); }
1
a8f89aa1524014f0b8efaae50cc7d44d
f8ec66d1316a7260c8d5b4cf5417751f
perNodeHostBits defines the number of host bits to be configured per node. A subnet mask determines how much of the address is used for network bits and host bits. For
{ byte msbPosition = 0; UInt32 subnetAddressCount = addressCount; while (true) { subnetAddressCount >>= 1; if (subnetAddressCount == 0) { break; } msbPosition++; ...
1
59f11b95aab93b941b28c9f2c5f5a633
1e8c892756771d379d4bfb3099061bb1
Parse externed function prototypes (e.g. 'extern foo(bar)').
class Parser(object): def ParseExtern(self): self.Next() return self.ParsePrototype()
1
89ed6691bcbdacd258cafd173ef51e73
55879eacb2dcc4096aabc6ea5dbf5a41
根据公文编号 获取公文的序号
namespace Archives.DataAccess.Input_CJ class CJ_Doc public int getDocZDJH(int DocID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select 总登记号 from 城建文件"); strSql.Append(" where 文件ID = @文件ID"); SqlParameter[] parameter = { ne...
1
2e61eb6e1bc5798ffc95115e935d85bc
de148988f09b5f5800c3b7594abe919f
是否是PubMed来源code.
public static boolean isLPGsubject(int code) { FuelXmlCode[] fuelXmlCodes = FuelXmlCode.values(); for (FuelXmlCode fuelXmlCode : fuelXmlCodes) { if (fuelXmlCode.getCode() == code && fuelXmlCode.getFuelScope().equals(FuelScope.LPG_subject)) { return true; } } return false; }
0
43dd88fb6e10a7d1a55141041d8fe5d0
010d2dac085fa7cedf87fca326c751a2
Empty map tests.
public void getFromEmptyMapTest() { LongMap<String> testMap = new LongMapImpl<>(); long actualSize = testMap.size(); String actualValue = testMap.get(-1L); Assert.assertEquals(0, actualSize); Assert.assertNull(actualValue); }
1
771ee752c2731736815935cc4b08ea12
aef4e2f542b31cec4872fc3c77e11752
Setter for <code>NOTES_SERVICE.NOTES.ENTITY_ID</code>.
@XmlRootElement(name = "recordIdentifier") public class RecordIdentifierConverter public void setNotes(String value) { entity.setNotes(value); }
0
99b74d94f8ccfa3fe2114584abeb0a0e
81ecc869b65d3020538f821b9d423e7a
删除GET表单参数
$arrDeleteKeys = array('product_id', 'product_class_id', 'product_type_id', 'point_rate', 'product_code', 'product_name', 'classcategory_name1', 'classcategory_name2', 'quantity', 'price',...
0
7ea3c46f7dbaad805f77ea5f6caef3a0
9a0e9639d89c7bd52656059d6964accd
The extension method to configure all strategies
TypeSearcher typeSearcher = new TypeSearcher( type => type.IsClass && !type.IsAbstract && typeof(TOut).IsAssignableFrom(type) && type.GetCustomAttributes(typeof(RegisterStrategyAttribute), false).Length > 0 && type.GetConstructor(new Type[] { }) != n...
1
63cac969d11c0d9630aa81e51cf8b57a
84e19ead40da48cdcfe9ae072a9e4c07
given the middle and pre order , solve the post order
TreeNode* node = new TreeNode; node->elem = *(postorder+length-1); cout<<node->elem<<endl; int nRoot = 0; for(;nRoot<length;nRoot++){ if(inorder[nRoot]== *(postorder+length-1)){ break; } } InPost2Pre(inorder,postorder+1,nRoot); InPost2Pre(inorder+nRoot+1,posto...
0
06e03b90c031f1962dbbb1c7a1d3b98f
cf0dadf3a766a9daec708561231ebf90
Get vertical white edge distance of character image.
def get_w(img): for e in img[1]: return len(e) break
0
358380eaf38937a782e43c2dabf9e2a4
53fea18da09e88b55bdc6133a41c1433
Unregister the endpoint on termination.
class RegistrationLayer(Layer): ## Name announce interval. def __del__(self): self._name_repository.unregister_name( name=self._local_name, mac=self.lower_layer.address, ) self.lower_layer.unregister_protocol( protocol=packets.RegistrationPacket.ETHERTYPE...
1
94d8b6032ca323d226ee354ab1169da6
b956974f1936cdbfd6f884735dd220a8
Returns the number of regions available.
public class RUBiSProperties public int getNbOfRegions() { return nbOfRegions; }
1
1abafdef0d0499e3e23085c8bcd061f0
83d36d09d2eed3419ccec13134a198fb
Denne test sikrer at turen bliver registreret hvis man kører over Øresund på MC
CountyRegister countyRegister = new CountyRegister(0L, 9999L); try { countyRegister.addCountyWithName("Innlandet", 30L); countyRegister.addMunicipalityToCounty("Aurdal", 3051L); }catch (Exception exception){ } return countyRegister; }
0
e2ab726c8c485cc407af266541d2697b
beb63fc661c662aaeba3f0b5b51db6c9
taken from Django Source Code
try: from importlib import import_module except ImportError: from django.utils.importlib import import_module module_name, object_name = import_path.rsplit('.', 1) try: module = import_module(module_name) except: if callable(exception_handler): exctype...
1
96e155d30020646ba02b54c940dd88be
b52609e1619ef5107a915a6354c5fea7
Apply one auxiliary (omega) network for one real eigenvalue or a pair of complex conj. eigenvalues.
const Real * aS, const Real * aN, const Real * b, const Real * temp_black, Real * temp_red, Real * norm_L2, sycl::nd_item<3> item_ct1) { int row = 1 + (item_ct1.get_group(2) * item_ct1.get_local_range().get(2)) + item_ct1.get_local_id(2); int col = 1 + (item_ct1.get_group(1) * item_ct1...
0
79e9fe8bb485f4729fcf38e563164df7
d113a338e251ad0742e9e397fe3349c8
Metoda zajistí zakrytí programové lišty a korektně nastaví vzhled okna i po minimalizaci
namespace Lab02_KravetsMaksym public partial class Form1 : Form private void label_Hide_Click(object sender, EventArgs e) { this.WindowState = FormWindowState.Minimized; }
0
146fb374da4b60504c188f31ce669dce
6a78cc7546ff43ac673c35dfb923cac5
Ouvre la fenêtre pour sélectionner la façon dont les communes seront triées
void FenetrePrincipale::on_actionComparer_des_m_thodes_de_r_solutions_triggered() { ComparaisonSolution comparaisonSolution; if(comparaisonSolution.exec()==QDialog::Accepted) { comparaisonSolution.reject(); } }
0
68775b95a32f95d4d79a85eb8eacd842
ef7017d887071cf0eb142efb105f51d6
create a DocumentRecord from file so that it can be inserted into db
def create_document_from_file( path, type, user_id ): logger.debug('Creating document from file {}'.format(path)) try: with open(path, 'rb') as input_file: logger.debug('file {} opened'.format(path)) filename = os.path.basename(path) gcp.upload_file_to_bucket( input_f...
1
4fd032fa08664b41027a0a026211fb05
a33ff87aac135b3c34396f43e713ae5b
Tests that overlapping times are combined properly
{ $periods = CarbonAvailability::mergePeriods([ CarbonPeriod::create('2019-01-01 00:00:00', '2019-01-01 02:00:00'), CarbonPeriod::create('2019-01-01 00:45:00', '2019-01-01 01:15:00') ]); $this->assertCount(1, $periods); $this->assertEquals([ $perio...
1
ab396afe21de176231be3a63c8702c05
736f3921381508b149889d4551cdce13
Evaluates the logging entries.
{ var message = CreateMessage(pEntry); switch (pEntry.Type) { case LogEntryType.DEBUG: Log.Debug(message); break; case LogEntryType.INFO: Log.Info(message, typeof(SitecoreLogProcessor)...
1
74849030e841aaad670df1b2c03b38bc
c966c296ff5f483d408d3eac4d9c0131
Creates a volume measure property.
namespace Revit.IFC.Export.Exporter.PropertySet public class PropertySetEntry : Entry<PropertySetEntryMap> public static PropertySetEntry CreateVolume(string revitParameterName) { PropertySetEntry pse = new PropertySetEntry(revitParameterName); pse.PropertyType = PropertyType.Volume; ...
1
ecd0a545787a09e7450888a5abac249f
7067ca3ad03a288f2254cf9e85df2d08
Отсчет времени до следующего ивента
var timer = $("[name=ad-timer]"); if (timer.size()) { var countDown = parseInt(timer.text()); tx(timer, countDown, "", function() { nextEvent(); }); } Viewport(); SetDefaultBgColor(); }
1
ac6cc69f381ddd7052c446019de76e8b
8da2d7541df9b80697ce432db55b64b1
Function that recreates dictionary of hyperparameters from string
kvp_strs = hparam_str.split(',') flat_dict = {} for kvp_str in kvp_strs: k, sep, v = kvp_str.partition('=') if not sep: raise ValueError(f"Malformed hyperparameter value: '{kvp_str}'") flat_dict[k] = v self.override_from_str_dict(flat_d...
1
8dade027fe8781a81223a2330f942bbe
4ffb422822617a1248c758292f615db5
获取某主播在某家族的某月开播时长记录
{ $pdo = APF_DB_Factory::get_instance()->get_pdo("anjuke_slave"); $sql = "select proid,clicks_nb from ajk_proclicklog_monthly where period = ? and brokerid = ?"; $stmt = $pdo->prepare($sql); $stmt->execute(array($period, $brokerid)); $result = $stmt->fetchAll(); retur...
0
22d5fec3f5100bf3eec5cb7b8f3f6b84
7b97844e3b738c1148217d3dd436e47d
获取锅炉数(台)
public class ElectInfoCountSearchBean public String getKgcount() { return kgcount; }
0
c8bd317b3363ae30c0cee931dd9a6ec2
ff49a370a6cefcac97ea9036bfedd7f8
Rescans the server, and rebuilds the child nodes.
db.connect('person-add', self.person_rebuild) db.connect('person-update', self.person_rebuild) db.connect('person-delete', self.person_rebuild) db.connect('person-rebuild', self.person_rebuild_bm) db.connect('family-update', self.person_rebuild) db.connect('family-add', s...
1
b06bb8b7cadf159b8b799db427d49961
6b01d4dda6afcf7674126f1d466065ab
Obtain a copy of a given session (copy cookies and headers).
class Session: def copy(self): return Session(**self.extract_data())
1
89376c2625782d8848fa83f75950ff90
3cb0246c9b959b7cf0194b023730cedf
Ouvre un menu contenant les règles du jeu.
public class Home extends AppCompatActivity public void openRules(View view) { Intent intent = new Intent(this, DisplayGameRules.class); startActivity(intent); }
1
bd59297778bb260c5d2a4be694d90827
3b3d1d768dbb84c734e750b6e18ed3cd
List all recipes from a specified id chef
output = recipes_dict(recipe_id) if not output: raise Http404 return JsonResponse(output)
0