query_id
string
corpus_id
string
query
string
code
string
label
int64
8c0daf2eb429a7a9bf1ea2e92715a6c6
5cca566eb300e2c10da922232712e903
Convert a string to an array of letters.
final class Strings public static function toArray(string $string, ?string $encoding = null): array { return mb_str_split($string, 1, $encoding); }
1
45d43afcd1d709db56e0c6554d452a1b
667788b42369401b96b5f6fc42ee874c
This function will return an array of usernames, ids who are eligible for "owning" a team profile.
function getBracketOwners(element) { "use strict"; var allBrackets, bracketOwners, i; allBrackets = document.getElementById("bracketdata").getElementsByClassName("bracketEncoded"); bracketOwners = []; for (i = 0; i < allBrackets.length; i = i + 1) { bracketOwners.push(allBrackets[i].getAttri...
1
a616109cfa3f1ccf0a43d687566b2856
aa1612ea1876e36a8f75fd9604433efa
Returns a new object of class '<em>Write Register Action</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);
0
27427c19ba1ab17902aeaee4d20dafed
33c1f1872c9a29fb3f2e6a65075b16d5
the receiving task has died or destroyed the port; we got a notification, and this routine was called to clean up. This is a definite kill operation; we should not recreate th port under any circumstances.
static int port_kill_so_mapfun(key, receiver_host_addr, rebooted_host) char *key; IPhost receiver_host_addr; IPhost *rebooted_host; { mach_port_t port = (mach_port_t) key; xTrace1(portmaintp, TR_FULL_TRACE, "portmaintp: port_kill_so_mapfun called for port %x", port); if (IPEQUAL(receiver_host_ad...
1
f29ab426deef31495515e206eed60205
4097b2f21eba25346f3b61bd5dbc0708
format a disk
{ if(undefined == diskspace) { return "UNKOWN"; } else if(diskspace == "no_suitable_partition") { return LocalString.no_suitable_partition; } else { return isNaN(parseInt(diskspace)) ? diskspace : (diskspace / 1024).toFixed(2) + "GB"; } }
0
6697d910125ffc750e7759df77aa10e8
c0bbe4d5674018a5354848ee7e637e7d
Resolves an attack between two units. Returns true if the defender has died.
if (attacker.currentAmmo <= 0) { return false; } switch (attacker.unitType) { case Unit.INFANTRY: return false; case Unit.MECH: switch (Unit.getUnitClass(defender.unitType)) { case Unit.VEH_CLASS: ...
0
3b70319ff207395aa7ac437cd563a6ff
310d402c60f2cbabbbebe79c2d00d32e
Takes bits array of positive number and make this number negative. First invert input bit array, then adds 1. That makes positive number negative.
impl<E, T> Neg for BitVec<E, T> where E: crate::Endian, T: crate::Bits fn neg(mut self) -> Self::Output { if self.is_empty() || self.not_any() { return self; } self = !self; self += BitVec::<E, T>::from(&[true] as &[bool]); self }
1
84fd72836f037ae856fef15910ef3bb6
d8b14a9800028fb9d525360bd428c16f
Method that checks when it's time to stop the search.
public abstract class SearchAlgorithm protected void stopSearch(){ searchTime = (System.currentTimeMillis()-searchTime)/1000; }
0
7bf5119a07af7fc4d7673a32861e36f3
ca2a2422215cc2dffce9f75299dab55f
Callback registered for AT_BLE_NOTIFICATION_CONFIRMED event from stack
rsi_bt_event_user_confirmation_request_t *user_confirmation_request) { UNUSED_PARAMETER(resp_status); rsi_bt_app_set_event(RSI_APP_EVENT_CONFIRM_REQUEST); LOG_PRINT("\r\n"); LOG_PRINT("data: %s", user_confirmation_request->confirmation_value); }
0
4a01d028831a316487215b38538166ed
6b25b3f997c2773985e7dbfb8c76ad50
gets the number of direct children a object has
class SpaceObj(): # todo ugly class variable. find a better way to do this. def count_direct_children(self): return len(self.children)
1
76a75339552a7b56c564f010d7432655
37e1ba3f6569e08cd92d06a00796035e
Create a JAX-WS Service according to the parameters of this factory.
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.getInInterceptors().add(new LoggingInInterceptor()); factory.getOutInterceptors().add(new LoggingOutInterceptor()); factory.setServiceClass(serviceClass); factory.setAddress(address); return factory.create(); }
1
b04653e9a282cb29ae4a87467f84acf8
222ab872c856edf1c6ddc3bb56d13cec
用pygraphviz画红黑树
class RedBlackTree: def draw_img(self, img_name='Red_Black_Tree.png'): if self.tree is None: return tree = pgv.AGraph(directed=True, strict=True) queue = deque([self.tree]) num = 0 while queue: e = queue.popleft() if e != self.black_leaf: ...
1
2d42b0721391999dea554a52e917fac8
6a6b432b593eba450a5e89a11403cacb
Distribute pitch classes across melodic lines.
for i in range(len(melody)): offset_melody = (i * offset_interval * '0') + melody yield offset_melody
0
b9dfcf4cf17ca287d3d4c8d674bcd853
de1f31bb8c10310b54afd9bf7e9062a4
查询单个公网Zone 查询单个公网Zone Please refer to HUAWEI cloud API Explorer for details.
public class DnsAsyncClient public AsyncInvoker<ShowPrivateZoneRequest, ShowPrivateZoneResponse> showPrivateZoneAsyncInvoker(ShowPrivateZoneRequest request) { return new AsyncInvoker<ShowPrivateZoneRequest, ShowPrivateZoneResponse>(request, DnsMeta.showPrivateZone, hcClient); }
0
285ff039a2634079bedbf7a271a45408
bfca867324b3c30f24cb7ee316cb2a64
Gets member profile only with specific fields. Example:id,firstname etc. (See also: https://developer.linkedin.com/docs/ref/v2/profile - Basic or Full Profile Fields)
public function getProfile($uuid, $fields = []);
1
26220f68b2b92e5181d12387b6d7558e
418d9ddec1dd2fa616fb6001963f39d4
このループはCPUの脳内で局面を進めて、先読みをしている 実際の局面に反映されないようにUndoとcheckをして元に戻している
namespace Sayuri void ChessEngine::SearchRootParallel(Job& job, UCIShell& shell) { Cache& cache = shared_st_ptr_->cache_; Side side = basic_st_.to_move_; Side enemy_side = Util::GetOppositeSide(side); int move_number = 0; int lmr_move_number = cache.lmr_invalid_moves_[job.num_all_moves_]; for (M...
1
d188885fce44472f6755e23ceda84a80
4da90b42707f9df4bbc3ef814b3e30fa
THIS ONLY RUNS ON THE FIRST BOOT OF A JUST INSTALLED APP (OR AFTER RESET TO DEFAULT SETTINGS)
class RebootNotifications : BroadcastReceiver() override fun onReceive(context: Context?, intent: Intent?) { if (intent != null) { if(intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)){ } } }
0
ce27008e7d5dd199b0a0d3150843f94a
ca9c84ea9fe3a651e9d39992547c7b87
Exception for when the given user can not perform the requested action
{ show_error('The action you have requested is not allowed. You either do not have access, or your login session has expired and you need to sign in again.'); }
1
d98bbd5456814c3cdede728f19b5ab9a
cfd90967755db110ffda62519cf8dcba
Recursively walks over the project item tree and looks for *.dacpac linked files
{ foreach (ProjectItem item in projectItems) { if (item.ProjectItems?.Count > 0) { LinkedFilesSearch(item.ProjectItems, files); } if (item.Kind == VSConstants.ItemTypeGuid.PhysicalFile_string) { try { ...
1
774efe137ca1c9483000dd0c1887daa2
1ac7c57d38584237d42238be9c2402f4
Get a secure random number, the best this PHP version can do.
{ $bytes = PHP_INT_SIZE; do { $output = secure_binary_seed_rng($bytes); if ($bytes == 4) { $elements = unpack('i', $output); $output = abs($elements[1]); } else { $elements = unpack('N2', $output); $output = abs(...
1
ff78c1108ab16cff2122c3a87b26f9e3
72e5bfddc0a5ba160c5a4feef205807e
[Documentation](https://wowpedia.fandom.com/wiki/API_GetAchievementCriteriaInfo)
function GetComparisonStatistic( achievementID ) return Achievements[achievementID].value end
0
a75f1b5b79e09581b154b98f78d271b9
c875833ced873db702559a7bf224d9bb
Total time simulated
class Simulator(): def time(self): return self._time
0
0986e7d50e4d4d00a6d945ede28970f3
e349c5b3c5c492f5aab60d1b85d3e57c
获取前天公司数据
@Service public class MingYuanService @Transactional public List<MingYuanReport> fetchYesterdayData(Date date){ MingYuanReport report = new MingYuanReport(); report.setCreatetime(DateTimeUtil.getYesterday(date)); return mingYuanDao.getCoopDataByDate(report); }
0
b8da1eab26140e9166f79417c17a4ca5
82633bf51ddf6f43a470896a3b4b15e8
чтение сообщений от определённого пользователя
{ if (typeCurrentUser_ == NOT_CONNECTED || typeCurrentUser_ == ADMIN) { std::cout << READ_MESSAGE_FAIL; return; } userConnected_->ReadMessegeListHelper(messageNum); }
0
096e13f0f1e0fb0ffff7a53b333c3237
b7d71a008cd2457673217c34606a0cee
设置底部导航按钮图片布局等。。。
ImageView img_title = (ImageView) navigationView.getHeaderView(0). findViewById(R.id.nav_title_img); ImageView img_back = (ImageView) navigationView.getHeaderView(0). findViewById(R.id.nav_back); Glide.with(this).load(R.drawable.my_img) .transform(...
0
32f5bbe4852b358acf65dc3367aeadb0
4e9128dfd044e182bc692a63a775a7fc
find root identifiers in source code
class Solver: def rootGenerator(self): rootList = [t.root for t in self.activeIds.values()] rootList += self.litMap.values() return rootList
1
d2495e4a753a848e1411a9b106307e03
1f55c944301c1014806172f5d908b07a
creates a winners bracket
function createTournamentBrackets($tournamentID, $numWinnerBracketFighters){ if(USER_TYPE < USER_ADMIN){return;} if($tournamentID == NULL){$tournamentID = $_SESSION['tournamentID'];} if($tournamentID == NULL){return;} if($numWinnerBracketFighters == NULL){$numWinnerBracketFighters = (int)$_POST['numWinnerBracketFig...
1
742d5779c5bf58d73487ad6f90f0f687
b1ad41434d94157f62aea0cd1baff31c
集成整体刚度矩阵
self._check() self.K = zeros((self.freedom * self.size, self.freedom * self.size)) self.load = zeros(self.freedom * self.size) if not is_static: self.M = zeros((self.freedom * self.size, self.freedom * self.size)) self.C = zeros((self.freedom * self.size, self.fre...
1
847617453edd47289008dab61c915fc2
7d3cf638897ba7ccc2a88d5ecc340f52
Retrieves email messages from a specified Inbox.
class Mailtrapper public function getMails($inbox_id) { $path = 'inboxes/'.$inbox_id.'/messages'; $url = $this->buildUrl($path); return $this->process($url); }
1
f973ca4ca15f5f232933c4256ce928be
716c7791f37b7981e49b7cc400815fcb
Returns the blacklisted domains table.
def blacklisted_domains(connection): PiholeCLI(connection).get_blacklisted_domains()
1
f24442c49b499eeac69dd12c098fba58
e7ac2691da9785fa99fe141ee9575f4c
Incrementally iterate hash fields and associated values.
class OCI8 class Cursor def fetch_hash if iterator? while ret = fetch_a_hash_row() yield(ret) end else fetch_a_hash_row end end
1
329ddbf4a910acb2cfcf36b101ca736e
6f60317de65b4bae663e027541850d98
Player2コンボボックスをクリックした場合のイベントハンドラーです。
isComboChain = true; comboCount++; comboLimitTimer = 0; uiManager.CreateComboDetail(comboCount); Debug.Log("コンボ中 : " + comboCount + " Hit!"); }
0
1609aa4ec0cb29cc662dda99dda12d5c
a2c3667552494eb05109c3b9627ec88a
将Long类型的时间戳转换成String类型的时间格式
public class TimeUtils public static String long2String(long time) { return sdf1.format(new Date(time)); }
1
535915c9238b1d672b470b1b4f1cd6ae
0888faa91ceb4418f80260002227b31c
カレンダーページに渡すハッシュの配列を作成
schedules_hash = Hash.new for schedule in schedules key = Date.new(schedule.start_at.year, schedule.start_at.month, schedule.start_at.day) key_end = Date.new(schedule.end_at.year, schedule.end_at.month, schedule.end_at.day) while key <= key_end schedules_hash[key] = Array.new if schedu...
1
3934fc729d735462b6d51b06187fa22c
f2a3aa004c59e9bcd61e27e202129ab4
Makes the field accept only char values
class CharParam(Parameter): def __init__(self, *args): Parameter.__init__(self, *args) assert self.type == 'char'
1
cae2b20704914a620c663a1b12903200
361a08561a9c42d8de1ee2fc46222e25
Обновление статуса регистрации и получение контактов по заявке на регистрацию
{ $response = []; try { $params = $this->getRequest()->getParams(); if (!empty($params)) { $request = []; $storeId = filter_var($this->getRequest()->getParam('store_id'), FILTER_SANITIZE_SPECIAL_CHARS); $request['oauth'] = $this...
0
fc43e6114b832d8e8cc8baccac51ddc1
4a4594c8a4fb9919143b08215ac9e4b5
如果客户端因为等待key被push阻塞,那么将key放进 server.ready_keys 列表里面
RedisModuleString *RM_GetBlockedClientReadyKey(RedisModuleCtx *ctx) { return ctx->blocked_ready_key; }
0
428e7640cb7fa4c85bcab0f79a1980e0
a8a34559c30471916b64cfcfc2ad984f
改变发送验证码按钮的状态
function changeGetCode(){ if($(".phone-input").val()!="" && $(".graphics-input").val()!="" && $(".phone-error").html()=="" && $(".graphics-error").html()==""){ $(".code-btn").css("background","#5944C3"); $(".code-btn").removeAttr("disabled"); } }
1
da27d57391bb8b897fa0b01c16be9294
6886b53d303db4ba31231af2eb5a407f
Should be UI entity deletion function be available.
class TestEntitiesApi(unittest.TestCase): def test_remove_entity(self): pass
0
155cb24f1b9f77d45ec9f246d04811e7
2d04a1a0a49347f1b9fe1ce02ba040b4
测试多层复杂结构XML
class Test extends CI_Controller public function xmltest() { $xmlstring = '<xml> <sign><![CDATA[E1EE61A91C8E90F299DE6AE075D60A2D]]></sign> <mch_billno><![CDATA[0010010404201411170000046545]]></mch_billno> <mch_id><![CDATA[888]]></mch_id> <wxappid><![CDATA[wxcb...
1
ab04797ec19f513e2dfb3dadad454c53
b61423f9fc226ccb2b05457ba636a6c6
Implementation for calling interactor method for retrieving the list of similar products on the basis of product code.
void onReceivedSimilarProducts(SimilarProducts similarProducts);
0
525d3c11db91c337d614ef2f8a22fe14
53d1468a6ffceee8f00657bf904cb4d4
Print function: prints the matrix with divions between them
i = 0 matrix.each do |number| print number.to_s + " " i+= 1 if i == matrix.shape[0] print "\n" i = 0 end end end
0
a39b4d5ab13b6014c3b9d4f285a25591
07bd0e868bf8d8398220a93651020e76
Regex based text strip for a sentence
def regex_strip(input_string, char_to_strip=None): if char_to_strip: main_regex = re.compile(rf'{char_to_strip}') else: main_regex = re.compile(r'^\s|\s$') return main_regex.sub('', input_string)
1
96ddae9086413e1137d2a3a0d52eff6a
f8839d7c69b02239c4e35a5555ad027f
This is the business delegate method to set or create SLA details of an application
class SWIFT_SLA extends SWIFT_Rules public function SetSLAProperties(array $_slaProperties) { if (!$this->GetIsClassLoaded()) { throw new SWIFT_Exception(SWIFT_CLASSNOTLOADED); return false; } $this->_slaProperties = $_slaProperties; return true; }
1
bc40fb9def3d3c35b1af97bd6f095e3c
f01d2d061131f501fc35d8f47d000a61
转化成Bool类型
public static class StringSwitch public static bool SwitchToBool(string _str) { return _str.Equals("True") ? true : false; }
1
57ad00e53e3ed8b48d9ea595502891da
661cd143834a05c717ceaacbd60373d6
Enable a module previously disabled on mobile.
class ModuleManager implements AddonManagerInterface public function disableMobile($name) { if (!$this->adminModuleProvider->isAllowedAccess(__FUNCTION__, $name)) { throw new Exception( $this->translator->trans( 'You are not allowed to disable the module %modu...
0
64031ad5b75fbd91b0459331e4ef0069
9d4d0afd5bdb91e99b41c06f0082f6f9
根据Eid查询用户图像
{ using (employeeDAL dal = new employeeDAL()) { return dal.getPhoto(eid); } }
1
40c586e5f71516b2150e1f7ffac72713
f118dee9abe6059fa7b6c74d8badd1c4
Get the first instance of :obj:`cls` that has the property-values pairs described by kwargs, or create an instance of :obj:`cls` if there is no instance with the property-values pairs described by kwargs
instance = cls(local) {setattr(instance, key, value) for key, value in kwargs.items()} return instance
0
f60e2491a806dc423e033201abef9345
e6004683bf9780175b1780675d8f7779
判断浏览器是否有缓存???即此前是否传入数据 如果有传入,需要拿到旧数据进行判断是否过期,若数据过期则重新发送数据渲染页面,否则将旧数据重置再渲染页面 没有数据则重新发送请求渲染数据
if( this._cache.list.length == 0 ) { ajax((apidata)=>{ this.cache_list=apidata; action() }) } }
0
13e75209c1bc8b051d1d99e83837203e
e7d956afea02c1549ee4a7c18c8f31d5
INPUT: Transitions Takes the transitions and calculates q values for the respective states. Trains the model to correctly predict an actions q value
self.speed = math.floor(obs[0]/5) if self.speed > 16: self.speed = 16 self.dist = math.floor(obs[1]/5) if self.dist > 10: self.dist = 10 self.rev = obs[2] self.col = obs[3] if self.col > 1: self.col = 1 self.azi = math.f...
1
6a9ba609134ec91d8d0b5c5077af31f0
b331fb8711fca9c6ff0ba8f52b39a6a6
postが存在しない場合に空のリストが返されることを確認
class PostListTests(TestCase): def test_post_list_with_no_posts(self): response = self.client.get(reverse('blog:list')) self.assertEqual(response.status_code, 200) self.assertQuerysetEqual(response.context['latest_post_list'], []) self.assertContains(response, "No posts are available.")
1
e14ab7b0db68cb9309be945239a72691
9e74ea361b3687406e39cde66d8c3ac2
Remove the currently selected spectra from the global list and this interface.
{ if(index < 0 || index >= zv_spectrumList.count()) { return false; } emit zg_spectrumOperation(OT_REMOVE_SPECTRA, index, index); delete zv_spectrumList.at(index); zv_spectrumList.removeAt(index); emit zg_spectrumOperation(OT_END_REMOVE_SPECTRA, index, index); zh_recalcArrayMaxPa...
1
ceee18f67a1325937b4ac83d5d69f3c2
a4aea0cb1a97188647df7a1ff08b71fc
This moves a file, creating the destination directory if necessary.
{ FilePreconditions.Check(src, FileConstraints.EXISTING); FilePreconditions.Check(dest, FileConstraints.NOT_EXISTING); FilePreconditions.Check(dest.Directory, FileConstraints.EXISTING, FileConstraints.WRITABLE, FileConstraints.N...
0
a2729ca8a28ab9158156bf69c9d85bc5
fc92ac23e0cb108f1962211a99b942fd
Get the tweets with texts only containing vocabulary characters replaced by their unique indices as well as the language-tags replaced by their unique indices.
database = mongoController.mongoController() tweets = database.tweets.get_all_tweets() documents = [] ids = [] for tweet in tweets: for ind_tweet in tweet['tweets']: new_string = ' '.join([w for w in ind_tweet['text'].split() if len(w)>3]) ...
0
708ac7c01eb24a9c0bfde6d5cba10b56
5c25d1124708b7d34b3b0739617498f7
Reads input from the input stream and prepares the geocode queue.
for line in iter(self._fd.readline, ''): if line == b'': return self._queue.put(_sanitizeBytes(line))
1
9c97ce9f8210b434220dd7e7cf36ebd1
aae347ed2f4bdaac675ee08c5b3a09e9
bean拷贝 null无效 即如果s的属性值为null 则不会覆盖t的属性值 以t为标准,解析t的所有属性,从s中取对应的属性值进行拷贝
public class ObjectUtils public static <T, R> void copy(final T t, final R r) { if (t != null && r != null) { Field[] rfields = r.getClass().getDeclaredFields(); Field[] tfields = t.getClass().getDeclaredFields(); L: for (Field rfield : rfields) { rfield.setAccessible(true); for (Field tfield : tfiel...
0
821c28378f6c9d51aacce1165f1a12ad
62922c3cd3a0926a04c0232992227d9b
Returns an <see cref="OnlineEftposCredentials"/> instance containing the credentials required to obtain tokens from the Online Eftpos API.
namespace Toute.Core Task<LoginCredentialsDataModel> GetLoginCredentialsAsync();
0
6ad4c41f3241e9f9619d8168c8342c2c
380faee9cba0854e1bedef12ad881907
Given a non-empty array of ints, return a new array containing the elements from the original array that come after the last 4 in the original array. The original array will contain at least one 4. Note that it is valid in java to create an array of length 0.
def findElemsAfterFirstMaximum(arr) maxIndex = arr.index(arr.max) return arr[maxIndex+1..arr.length-1] end
0
7f3ebb197ac46156477b2c002e2a9c1e
35a1b4e45ea224c4ecec2db2bee1d167
template has no link handles
namespace realm void Obj::traverse_path(Visitor v, PathSizer ps, size_t path_length) const void on_set_of_typedlink(Set<ObjLink>&) final { REALM_UNREACHABLE(); }
0
ade495b318d461b9ad2abed9c15a5d52
407fea000ab25119273e5c797e1f1bb0
Recursive DFS to collect SMILES information
vector<string>& webpages_explored, string curr_weblink) { if(!inVec(webpages_explored, curr_weblink)) { if(checkValidFile(curr_weblink)) { vector<string> mdlink_vec; tokenize(curr_weblink, mdlink_vec); webpages_explored.push_back(curr_weblink); vector<string>::iterator vec_itr; for(vec_itr = mdlink...
0
66007b4c227df1d83f2845256c0a1eaf
60ea510b39c9a5a9fff5d34712080e17
判断一个链表是否有环 设置两个指针,分别以1和2的步长遍历链表,若相交则链表有环 leetcode 141
public class TwoPointer public boolean hasCycle(ListNode head) { if (head == null || head.next == null || head.next.next == null) { return false; } ListNode step1 = head; ListNode step2 = head.next.next; while (step1 != null && step2 != null) { if (step1 =...
1
a6618a2b96f59869480d20edf4472c05
1b7ad39888865e24fe40d5d17cc5cbf5
Returns the label that is used for the script name input field.
abstract class What3Words_What3Words_Block_Abstract extends Mage_Core_Block_Template public function getInputLabel() { return 'what3words'; }
1
7efd5abae2c61853a604dc8f5c1a0af4
e72aca4b748446939a7419b0b86aa7e5
Check user gets redirected if not sign in
client = Client() url = reverse('stories:edit', args=(self.story1.id,)) response = client.get(url) self.assertEqual(302, response.status_code) self.assertEqual('/accounts/signin/?next=%s' % url, response.url)
1
ababc663feeb9120bb6eb6a2edee1e0c
09bdfa6f7c1a166add83d66dba6be8f8
根据身份证号查询学籍信息
StuBaseInfo selectStuBaseInfoByIdCard(@Param("idCard")String idCard);
1
fdd60d6d26fb8950776f62e2df4349d0
070c236f49b16e7283a9230faa36d177
生成缩略图 等比例 两边留白
{ $this->prefix = $prefix; $imageInfo = $this->getImageInfo(); $src_im = $this->createBackgroundIm($imageInfo); $scale_x = $imageInfo['width'] / $width; $scale_y = $imageInfo['height'] / $height; $scale = $scale_x > $scale_y ? $scale_x:$scale_y; $dst_x = ($sc...
1
c5367396cb61e4047451c772d040fb71
a38ab7d8db4898d152e590362bb3c05a
Meghatarozza a legbaloldalibb pontot.
public class alakzat public void atHelyez_x(float x) { if (mozgo_alakzat) { pozicio_ment(); ss.setPosition(x, ss.getY()); } else { ss.setPosition(x, ss.getY()); pozicio_ment(); } }
0
beed577a53f0428f30e933a3112b3057
0a0f1438357d8ba7b3e13b1a2f0e6d46
Returns the time the ping was created for the given pong. Checks to make sure the stored slot corresponds to the sequence.
public class ProtocolPing extends ProtocolHead public long getPingTime() { return pingTime; }
0
bc127583e059d81cd2a948239e5c4899
de17879d1c997a2cf428d61766485171
Read, compute and store a reading from wind direction sensor
void Pos_sensor::read_sensor() { m_val = analogRead(m_pin); if (m_val != m_last_val) { if (m_val > m_last_val - 50 && m_val < m_last_val + 50) { if (m_val > m_last_val) { m_pos += ((m_val - m_last_val) / m_val_inc_per_deg) / SADM_functions::m_ratio; } else { m_pos -= ((m_last_val - m_val) ...
0
44e5cdaae4eb179532b915855e9c424b
dfaaeb83613ed9b2bee1b4bf3047c35d
同步更新队伍血条值
function Class_Hero:updateXinFaProp() g_Hero:refreshTeamMemberAddProps() end
0
0ded38cb01bbbc650e2981aa04e566ff
e6151e4dee2ef15861bfc6eb45bf0112
Se presenter
public function presentation() { echo 'Je m\'appelle '.$this->nom.' j\'ai '.$this->sante.' points de vie, '.$this->force.' points de force et '.$this->xp.' points d\'XP.<br/><br/>'; }
1
6d1d33fbe8dc4dd6a6a8786d72d1bd8e
10cba7c6bdc74ed4a986c947549659a6
удаление из предложения стоп-слов, знаков препинания
if punctuation != '': lib = punctuation else: lib = self.punctuation lib = lib.split() print('Delete items:', self.punctuation) clear_sent = [w for w in ori_sent if w not in lib] return clear_sent
1
4c15fa3f24df77f217fa37f9e8e14f8f
680288a80517c2422cec1e97ba78946f
设置上架时间排序规则
class BrandController extends HomeController public function setTime($id=0,$time=null){ $id = $_GET['id']; $time =$_GET['time']; if($id&&$time){ M('Purcate')->where('id='.$id)->setField('time',$time); exit(); } }
0
2ca071e0dbb3b507cba0d9f734abc5a6
0e98e31d2743b4bcc98a58b8a8d882de
Check to see if ConnectorProvisioningType property is set
namespace Amazon.KafkaConnect.Model public partial class CreateConnectorRequest : AmazonKafkaConnectRequest internal bool IsSetConnectorConfiguration() { return this._connectorConfiguration != null && this._connectorConfiguration.Count > 0; }
0
c6419bda13f8e92fa09d0d28e378b9a7
4f77e960186017c69a0dcf6f47d7ba12
https://oeis.org/A001542
q, r, t, k, n, l = 1, 0, 1, 1, 3, 3 while True: if 4 * q + r - t < n * t: yield n nr = 10 * (r - n * t) n = ((10 * (3 * q + r)) // t) - 10 * n q *= 10 r = nr else: nr = (2 * q + r) * l nn = (q * (7 * k) + 2 + (r ...
1
8de1ab0050e76bc0f0ac3cf12c4fe6d7
6920a52ec012eb3176dc105dc094a92c
Only match permissions, do not require an exact match.
def _permission_match?(name) !!(name.to_s =~ PERMISSIBLE_PERMISSION_METHOD_REGEX) end
1
285a23b6d4f15888f668cd3bcb5b5c65
1722b3efce57958d8f1eb6e67d641104
图层管理中是否隐私的ajax方法
let url = `/cms-busconcla-hds/layer`; return ctx .$get(ctx.baseUrl + ctx.serverPortUrl.issBas + url, params) .then(res => { return res; }); }
0
ef85994fbfe00328ca669496869e9379
20dacf05fd983cbadfb275c63203c199
Returns the sample relative mean difference.
numerator = mean_sample - mean_pop denomenator = sample_std / sample_size**0.5 return numerator / denomenator
0
d176a4c48e03cf266e714a39aa22625e
bc0c8f222117c6eca7fbefec84ed3466
기술동향 세부를 조회한다.
@Repository("serverDAO") public class ServerDAO extends EgovComAbstractDAO public List<ServerEqpmnVO> selectServerEqpmnRelateDetail(ServerVO serverVO) throws Exception { return selectList("serverDAO.selectServerEqpmnRelateDetail", serverVO); }
0
a2c03e355379c5a533d266e96e950218
ca8d86cf3134e8771797b287fe56fb65
현재 날짜에서 초를 가지고 온다.
int i = calendar.get(Calendar.SECOND); String s = ""; s = s.valueOf(i); if(s.length() == 1){ s = "0"+1; } return s; }
1
a307895bb264bc1d7f7fb6bfdb66ee46
b65b08a3407ceb077f618037d9f54cdc
Extract the first post from each thread URL
class NahverkehrsplanUlmSpider(scrapy.Spider): def parse(self, response): for thread_url in response.css("a.fa-comment::attr('href')").extract(): yield response.follow(thread_url, parse_forum)
0
44a40e4ea7810c0da211636d1de2cb70
e4dc6f626e3acfd946c2cb670c0501e4
determines if the ball has collided with the top or bottom then handles it appropriately
void Ball::bounceOffTopOrBottom() { xVel = -xVel; }
0
0ea91f09250a821971ad57acb5526191
6141930035bb2feafdc5450a38eefb1f
Set The QUIC configuration.
{ int ch; memset(quic_arg, 0, sizeof(*quic_arg)); sa->ss_family = AF_INET; while ((ch = getopt(argc, argv, "C:c:k:p:E:e:L:t:hVR6")) != -1) { switch (ch) { case 'C': quic_arg->cid_key = optarg; break; case 'c': quic_arg->cert_file = optarg; ...
1
6ac39eb59a3ad08a65170cd99e335f39
bc861c89e9efbe8defa36979d02d9109
Returns the userfield model.
class GroupAdminController extends \GO\Base\Controller\AbstractMultiSelectModelController public function linkModelField() { return 'user_id'; }
0
9a478cb28f164ef8ab0a394b29dfb79b
9787b4869fdb0258f0b0fea150032a35
retorna a nota maxima que pode ser tirada nessa avaliacao, percorrendo os filtros e somando os limites de notas maximas
getHighestGrade() { if (this.grades.length != 0) { let highestGrade = this.grades[0].grade let studentName = this.getStudentNameById(this.grades[0].student) let disciplineName = this.getDisciplineNameById(this.grades[0].discipline) this.grades....
0
1c473df7525c2c61f5e1b1724c23d48b
362701f1fd6c75ad2897b361af37e5c3
Get the Marvel characters.
{ $comics = $this->MarvelController->doRequest('comics'); return view('comics.index', ['comics' => $comics['data']['results']]); }
0
836e093ed89db3d23acba4ac5af6a172
d3133620bd893b918cbe18e54840f782
Returns the operating system with the given ID.
transport: &T, request: &GetOSDs, ) -> Result<GetOSDsResponse, transport::Error> { transport::request(transport, request).await }
0
aa1ead74699154f0040bd8dcf788e94e
b5763d8c9007421422006867c0891a60
Get count of images from multipage tiff
int TiffImage::getDirectoryCount() { if (directoryCount > 0) { return directoryCount; } directoryCount = 0; do { directoryCount++; } while (TIFFReadDirectory(image)); TIFFSetDirectory(image, 0); return directoryCount; }
1
e8a2ce4a53672cc518b7b2e8fb897d02
5e9a685561bf7b958f8e4d8cca91bc16
根据统一平台班级ID 同步下属学生信息
String czId = ctx.getParam("czId"); String ids = ctx.getParam("ids"); String[] idArr = ids.split(","); List<CustInfoVo> custList = new ArrayList<>(); List<String> idList = new ArrayList<>(); for(String id : idArr) { if(StringUtils.isBlank(id)) continue; CustInfoVo cust = baseInfoDao.queryCustInfo(...
1
c15407d3cb59e7daf4773adba801daeb
b937246b8206685d8b9bfd764f6b0315
AES256加密
fun encryptAES(content: String): String { return EncryptUtils.encryptAES2HexString( content.toByteArray(), secretKeyAes32.toByteArray(), "AES", null ) }
0
1a3c7be7cf64201949fc80c5b433ae65
aa610c496f921714dedc684ce599771b
取得各注區的賠付額
all_money = 0 if self.game.success not in ["unstart", "playing"]: if self.extra_goal: extra_goal_list = self.extra_goal.split(",") if len(extra_goal_list) == 2: money = float(self.money) / 2 for extra_goal in extra_goal_...
1
56013781b8da62191750507487967c97
ec668d191b7da09bae5ca7961d7625e6
Test that waypoint detection works when close enough in terms of X coordinate but too far away in terms of Y cooordinate
{ auto defending_side = DefendingSideProto(); defending_side.set_defending_side( DefendingSideProto::FieldSide::DefendingSideProto_FieldSide_POS_X); simulator->setYellowTeamDefendingSide(defending_side); RobotState robot_state1(Point(0, 0), Vector(0, 0), Angle::zero(), ...
0
928ecd114829f2e056b1f43df332ff7c
c17cdf962aea73626001717877b4ae1a
Opens the evidences folder. A MessageBox is displayed if to occur an error. Occurs when the mnuOpenEvidencesFolder is clicked or selected using a shortcut key or access key defined for it.
namespace ALUMA_Beta_Form public partial class MainForm : Form private void msOpenRecordsFolder(object sender, EventArgs e) { System.Diagnostics.Process.Start(recordsDirectory); }
0
27ae50f40dcdf5bce523b37f11562241
63678a816d23325921c0765d9b5cdb97
event handler for RightDownEvent
{ EventHandler<Efl.Ui.IClickableClickedRightEvt_Args> evt; lock (eventLock) { evt = (EventHandler<Efl.Ui.IClickableClickedRightEvt_Args>)eventHandlers[ClickedRightEvtKey]; } evt?.Invoke(this, e); }
0
4b6a13071f7b4421f514c51015aac662
1fd3ab1e9f30c9a6a68298b1570beea5
根据卖家名获取商铺
public List<Shop> findByShopNameLikeAndSellerId(String keyword, int sellerId) { return shopDao.findByShopNameLikeAndSellerId("%"+keyword+"%",sellerId); }
0
0361959e8d39f702d7d097a61db74f46
4c8761960209cc5e9554668c23799e7b
Clone repo
if(file_exists($cloneRepoDir)) { $output = NULL; $cmd = "sudo rm -rf -- '" . $cloneRepoDir . "' 2>&1"; exec($cmd, $output, $return_var); } }
0
24990548597a3d3374b7052a62cf55ce
67320968c9b73cad6ff4d45d9edca6fc
Returns all rows from the MARITAL_STATUS table that match the criteria 'MARITAL_STATUS_ID = :maritalStatusId'.
class MaritalStatusController extends Controller public function destroy($id) { return MaritalStatus::find($id); }
0
9a5f76c33b3c3c4e761e16d557bed580
47a25d2b53be054928b8edbdd41b5aa8
家长权限管理
if (!session('?admin')) redirect(U('Login/login')); $filter['parent_name']=getParameter('name','str',false); $filter['parent_tel']=getParameter('telephone','str',false); $filter['privilege_type']=getParameter('privilege_type','str',false); $filter['student_name']=getParameter('st...
1
62747c46a912c0b77499aad883bd4bfe
f2466788e51f4521422de2c8dbe381ea
Disable saving of configuration changes
public class BitLimitTweaks extends JavaPlugin @Override public void onDisable() { this.getConfig().options().copyDefaults(true); this.saveConfig(); }
0
b904aec18fecd64f1ef62ba02b159ccc
61c0e966ff4fb9a4271a73b170150ca8
Method sets all winners for each grid.
class regModule public function setWinner() { $query = 'select CONCAT(`leftValueId`, "", `rightValueId`) as `id` from `quarterWinners`'; $stmt = $this->mDb->prepare($query); $stmt->execute(); return $stmt->fetchAll(PDO::FETCH_ASSOC); }
0
6578789d144d1138a8fcf1d1174c47d0
b89dae57b500af93ee5748a1687b0270
Generate the code for the storage expression.
if initial_storage: storage = self.program.storage.from_python_object(initial_storage) else: storage = self.program.storage.dummy(self.context) return { 'code': self.program.as_micheline_expr(), 'storage': storage.to_micheline_value(mode=mode or se...
1