query_id
string
corpus_id
string
query
string
code
string
label
int64
cdaafcd49f41aca1e8d9b380d2af7cfa
dd912e67ff4ab934a0e01497af6fb954
Ensure to_dict returns a dictionary representation of the Message.
from furious.batcher import Message task_args = {'other': 'zzz', 'nested': 1} options = {'task_args': task_args} message = Message(**options.copy()) self.assertEqual(options, message.to_dict())
1
a83eed46419563af9801617a16f2e22c
bf70948453d06ed1ac71ba5dfbe9614f
Test that we can count quick search results.
public function testBasic(): void { $searches = $this->getSearches(false); $this->assertEquals(28, $searches); $searches = $this->getSearches(true); $this->assertCount(1, $searches); $this->assertEquals(28, \reset($searches)); }
1
e7f9a58c89e57d75d02c05b14633abf3
233dbccf224babc28cb24c1ec6dc212c
angular distance between two points in azimuth,zenith format
def user_distance_to_az(u_lat, u_lon, az_lat, az_lon): u_lat_rad = math.radians(u_lat) u_lon_rad = math.radians(u_lon) az_lat_rad = math.radians(az_lat) az_lon_rad = math.radians(az_lon) dist = 2*math.asin(math.sqrt((math.sin((u_lat_rad-az_lat_rad)/2))**2+ math.cos(...
0
b6b5c70b386e1e5dc3a80af6f198ddb1
432069173493dec451445656770f8ed7
Converts an opcode name into a valid python identifier. SLICE+0 => slice_0
if name in names: return names[name] original_name = name mapping = {'+': 'Plus', '-': 'Minus', '=': 'Equal'} for key, value in mapping.iteritems(): name.replace(key, value) name = re.sub('[^0-9a-zA-Z_]', '', name) name = re.sub('(?!^)(?<=[a-z])([A-Z...
1
8ca36748d2aaa5c510b4a2b9b99a832d
4706322544633ec21dc1801da5f1a3cc
Returns the word of a number under one hundred.
def numToWord(n): if n == 1: return "one" elif n == 2: return "two" elif n == 3: return "three" elif n == 4: return "four" elif n == 5: return "five" elif n == 6: return "six" elif n == 7: return "seven" elif n == 8: return ...
0
fab86b06ab46f808537bcd29c16db47e
37ad2cd4fe71500c579021a073dfbc54
Turn a given mm value into a cm value.
def from_cm(number): return number/100
0
8f47e94c25aeb672c1eff9c4dbff708e
41e5ec3bd8d1cccc3b5f0270bfabbe93
check to make sure the exit node is connected.
class TunnelClient(HiddenServicesClient): def is_exit_node(self): return self.scenario_runner._peernumber == 2
0
954ef8176eeb9a4637b7003ee89f6dad
615271dfad4e546b9af366e6846a012b
获得车牌归属地
ret, data = self.quote_ctx.get_owner_plate(code_list) if ret == RET_OK: return data else: print('error:', data)
1
53eba03a852fe2c4eafbdd8a368ae9d5
4052818d0d4b526f59e5d98aa21f8bc8
clearCart Given a client id, clears that client's cart
const webRequest0 = new load.WebRequest({ url: `${this.$.getSchema()}://${this.$.getHost()}/order/api/v1/carts/${userId}`, method: "DELETE", headers: { "Authorization": `${Authorization}`, "accept": "*/*" }, }) return webRequest0; }
1
4f8b13c78d6c91027653e43d7dbd3d65
719c8bf3efe5debf5adfd422e312aacd
Determines which market category an item should be placed in. If category cannot be determined, MarketCategoryType.Miscellaneous will be returned.
namespace Ticketmaster.Discovery.V2 Task<SearchClassificationsResponse> SearchClassificationsAsync(IApiRequest request);
0
3139fa83456262e7c1231d428fbe134a
b6e14c64da9e05f3d8c48400c5d83149
Invoked when the user has selected a new location in the listing. When this happens we need to update the tag list to show what tags are assigned at the current location.
public abstract class WeatherService extends Observable{ public abstract void updateLocationList();
0
789b6a729f2b15452c8b4abc5e31dba0
498048cb78dcad94d82d65540a0b1cb3
Тестирование на корректность формата части координаты - минут или секунд.
{ return array( array('efg', FALSE), array('01:01', TRUE), array('0101', FALSE), array('13:01', TRUE), array(123, FALSE), array('24:00', FALSE), array('00:60', FALSE), ); }
0
63c35adf878b00dc81d85f8600fa1be8
01e66996867988b00bb1f551b08927cb
Updates the cells when the set content button is clicked.
void changeCell(String contents);
1
3336ed22137945419cff86568e1088ca
23852eb530de4e90046f6195164d8810
Given a list of TRs, make a table of the the cells at each location.
class _RowCells(object): def __init__(self, tr): super(_RowCells, self).__init__() self._tr = tr
0
d7d996a88403d26f5ee5e51713c9186a
6202535997f8ed03114ad6feb96a86e1
对每个方格进行重重新计算它的点击区域
for row in range(self.shape): for column in range(self.shape): x = left_screen_size + margin * (column + 1) + column * cell_size x1 = x + cell_size click_x = tuple(range(x,x1)) self.click_dict['x'][click_x] = column y = ...
1
9b81c1753e1bfe54468f12b038c2c9cd
1d90e7880ea06d43197763058bd6f392
Kiểm tra mã hàng hóa có tồn tại
var table = document.getElementById("bangsanphamid"); var tr = table.getElementsByTagName("tr"); var valueMaSp = document.getElementById("ma-don-hang").value; for(var i = 0;i<tr.length;i++){ var td = tr[i].getElementsByTagName("td")[1]; if(td){ var txtvalue = td.textContent ...
1
dd70614a541372c61e8e8920dd6cb4cb
ba6ca5b7b7d94e76a4c01bd6fd602d33
Apply a simplification procedure for the given formula.
if isinstance(expr, Lambda): if isinstance(expr.body, App) and isinstance(expr.body.predicate, Constant) and \ len(expr.body.args) == 1 and expr.body.args[0] == expr.var: return expr.body.predicate else: return Lambda(var=expr.var, body=simplify_expr(expr.body...
1
21b57586d0fa2ccd31f54e9075450c8b
7cfd99dc941b73cda9c86b54011bca71
根据币种进行金额汇总
query_sql = '''SELECT sum(size)as v,currency,side FROM account_okex_spot_fill where instrument_id ='{}' and fee = '0' and currency = '{}' group by currency,side;'''.format(instrument_id, instrument_id.split("-")[1]) df = pd.read_sql(sql=query_sql, con=engin...
1
8e704cfc158e357c48002343f2eb5d86
b7bb0d945619e355a822da6eb3e4f2da
Get the cached position of the right side of the drive.
public class DriveState public double getRightDistance() { return rightDistance; }
1
2e1378c89ffac43cf5d5e720465b14c9
a6259c1d176774fadb455b7284cd0b75
Llama a vista que muestra gráfico dinámico.
class android_client: def show_graficos_sesion(self, request, context): return render(request, 'index/components/sesion_graficos_app.html', context)
1
78fa8b2085277e709b9e220688c47e2a
3d42d2df08b21e84757a9d19eb667f0a
Open profanity stopwords and returns a set for faster checking
stopwords = open(filename).readlines() stopwords = map(lambda l: l.strip(), stopwords) return stopwords
0
83fcc6756687b32c48c9c1dbc41d0569
67d88fe82517a529b38b45dc13dba4e1
Construct a network by stacking cells. input:
class ReservoirLayer(torch.nn.Module): def __init__(self, input_size, units, input_scaling=1., spectral_radius=0.99, leaky=1, connectivity_input=10, connectivity_recurrent=10): super().__init__() self.net = ReservoirCell(input_size, units, input_scaling, ...
0
6a7066b66fc2f176e1f7a537e371ff9e
c15c05877e3118484b05e4c09bb00ec1
Returns a friendly HTTP greeting.
@Path("/hello") @Produces("application/vnd.hello.v1+json") public class HelloWorldResource @GET @PerformanceMetric("hello-with-name") public HelloResponse hello(@QueryParam("name") String name) { return new HelloResponse( String.format(config.getString(HelloWorldRestConfig.GREETING_CONFIG), ...
1
fc1bb39df6850be99e7329fa6ae16311
b20ac9bd94e1b66cd3165db1e4ec6278
Conta quantos registros um determinado funcionário realizou
$qb = $this->getEntityManager()->createQueryBuilder(); $qb->select($qb->expr()->count('v.CodAgenda')) ->from('Basico\Entity\ViewAgendaPessoal', 'v') ->andwhere('v.CodUsuario = :CodUser') ->setParameter('CodUser', $CodUsuario); $qb->andwhere('v.Status <> :Status'); $qb->setParameter('S...
1
c9fffea6f758745734a784493bb022cc
6e179e77160fa9afd077ec21c7d0e153
Calculates the shutter speed value from the APEX value of the {@link EXIFTags#EXIF_SHUTTER_SPEED_VALUE} metadata value. of the {@link EXIFTags#EXIF_SHUTTER_SPEED_VALUE} metadata tag.
class Photo def shutter_speed ss = image_exif["ExposureTime"] return nil if ss.blank? ss end
0
307d2b6b6ae363c322d37b907db8aa84
ae549c5d53b2c65f91aeab4e055f4e15
Manager generation and verification on SHA512 without pepper
let hmac_256 = Hmac { secret_key: decode("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").unwrap(), message: decode("dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\ dddddddddddddddddddddddddddddddddddd").unwrap(), sha2: 256 }; le...
0
a0e878020ca7d02aadd06d8c00ddadf3
71928364c585c20bdae41b77a7756e9f
Draws the scene and returns 'true' if the scene should yet be rendered next time. If function returns 'false', this means that the process should exit
namespace RacingGame.GameScreens bool Render();
1
7cb73fe4bc0fccef1b52136e09a8b8a9
dec7ba24619030f93cf4558c1eef556b
r"""Rate (/s) counter for lsntotdsliteicmprxpkts.
try : return self._lsntotdsliteicmptxpkts except Exception as e: raise e
0
200a56bde9992291e0885c92436f0852
8fba35217fd2c466e3b0cbf17a814453
Returns the account for the requested user feed. bits is a list of URL path elements. The first element of this list should be the user's nickname. A 404 is raised if the list is empty or has more than one element or if the a user with that nickname doesn't exist.
function getAccountFeed(callback) { showLoading(dataControls); var myFeedUri = 'https://www.google.com/analytics/feeds/accounts/default?max-results=' + maxAccounts; myService.getAccountFeed(myFeedUri, callback, getErrorHandler(dataControls)); }
0
59462a39feb274a41527931dbe980a59
9ec2a6fb3dd24cb3b870f41ddf8a6a59
integer hex coordinates to pixel at hex center.
int[] converted = new int[2]; double h = Math.sin(Math.PI/3) * (Hexagon.RADIUS-1); int yShift = 15; converted[0] = (Hexagon.RADIUS - 1) + (int)(1.5 * hexCoord[0] * (Hexagon.RADIUS - 1)); converted[1] = yShift + (int)(h + 2 * hexCoord[1] * h); if(hexCoord[0] % 2 == 1) ...
1
5a908f1048aad6129ed732f108a04413
acdad0f74dd94438cf66ed102f81ad2e
e.g. IE4
function getInternetExplorerVersion() { var rv = -1; if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; }
1
1e625dff9a8050b8ad3389ff6901fd61
0d6faceee97263fa25636fd395186a2d
获取关怀方式格式化(toString)
if(typeof type==='string'){ type = parseInt(type); } switch (type){ case 0: return '网站'; case 1: return '微信'; case 2: return '12345便民热线'; default: return '其他'; } }
1
e3f284bb938fb699032840bf795f244e
acb9509e88581cf507d77b0e7682a9e0
生成[0,n)区间的整数,包括0,不包括n
func GetElements(n int) []int { var elements []int for i := n; i > 0; i-- { elements = append(elements, i) } return elements }
0
ee8081a6f577a59885adbbe1907c156b
f5293234d4e4da080ba8fb74d57eebdf
Определение направления градиента в заданной точке
inline Direction calcDirection(const SubMap &gradMap, int x, int y, double sensivity) { double dH[3][3]; for (int dy = -1; dy <= 1; dy++) for (int dx = -1; dx <= 1; dx++) { if (x + dx > -1 && x + dx < gradMap.width() && y + dy > -1 && y + dy < gradMap.height()) ...
1
253a9c12573c5b2621be0061c757168b
5c091c53de3d1f18a5c997c3eda7be59
Unlocks a repository that was locked for migration.
$migration_status = $this->get_migration_status( $name ); $migration_status['lock'] = \strtotime( 'now' ); return $this->set_migration_status( $name, $migration_status ); }
0
dd6b20fcd256d352af317c6542da6e6b
42683264d0f35c19baca5913aed59821
调用ReturnOrderItemService实现根据主键删除
@Service public class IOrderItemServiceImpl implements IOrderItemService @Override public int deleteById(int id) { return iOrderItemDao.deleteById(id); }
1
a32468888c6aa21376f3f9df03b19e75
749b4cfc0f9f66bcb91018f9195fe546
添加L1人力资源数据
int insertL2ModelData(HumanResourcesL2 l2);
0
cc1d24df3507d6497326e0b0a3e5e549
32baf5dc4875d1149f8fb5b64a12559c
编辑时加载习题详细信息列表
this.listLoadComplete = false; this.courseInterface.getExerciseList({ lessonId: this.lessonId, lessonStage: this.selectTabset, date: this.lessonDate, designStatus: this.designStatus, typeCode: this.exerciseType }).subscribe((data) => { this.listLoadComplete = true; this.list = data; }); }
1
030b955344882caa683853dcf46c42f4
c6ac8de5b8d771066a3dd0fd1d9574a2
Get the version value of the target windows platform (reserved, never used).
namespace HadesMem DWORD NtHeaders::GetWin32VersionValue() const { return m_Memory.Read<DWORD>(m_pBase + FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader.Win32VersionValue)); }
1
6b91cbdda5dc7f58b9759b65d028ef56
f54075aca0685e9ee46b2b64b76d3529
查询一级分类下的商品总数
Integer searchTotalCountByCatId(Map<String, Object> map);
1
8b5d2df8c4c6bc241600657557b660e9
d029108bf3ea13128519169d39ef9177
Checa se um Square está congelado
bool ce_valid_square(const int32_t sq) { return tbl_files_board[sq] == OFFBOARD ? false : true; }
0
2c1a132ee6d7aa1ace500c6c32c77ad1
6a46b118a354efa1287e0dc59256b739
用户操作完后,将当前报警信息清除,并将当前用户操作的报警信息增加到历史报警记录里面
id = session.get('id') user = Admin_people.query.filter(Admin_people.id == id).first() if user.role_id==3: alarm = User_log.query.filter(User_log.id == aid).first() try: db.session.delete(alarm) alarm.user.status = '正常' db.session.commit() retu...
0
2d412485a62dc822705e536d43a4fb60
eb4f378c9d8ae85685d52de73831638b
フレームの削除ボタン
class ChannelView(): BorderPane() private fun buildFrameButton(analyseKeyFrame: AnalyseKeyFrame): Button { val frameButton = KeyFrameButton() frameButton.name = analyseKeyFrame.name frameButton.resourceName = analyseKeyFrame.resourceName frameButton.index = channelFrameListCache[channelT...
1
bfc629fb6546844fe8f8b014ac752cf4
0cbcdfa85f99aff7bd5d435bff2e4e44
Процедура запуска анимации вентилятора, фильтров и стрелок
{ #region DeathAnimation if (startDeathAnim == true) { FrameDimension dimension = new FrameDimension(deathAnim.FrameDimensionsList[0]); int frames = deathAnim.GetFrameCount(dimension); if (currentFrame >= frames) ...
0
fa49d5aa5b2eb68a06afa9da75f2c7e1
515f2b94b0cdb7631c6ffaa9211840eb
加入問題或考卷到testComponentList
var list = { page: page, title: 'P ' + (page + 1) + ' ,' + name } Exam.ErrorList.push(list); }
0
d8a902b84701db5852a0b0c24939f277
5de74f0669eaa66888a199f1c8550636
Add summary data to current object
self.run += summary_obj.run self.passed += summary_obj.passed self.warned += summary_obj.warned self.failed += summary_obj.failed self.skipped += summary_obj.skipped
1
38871aaaea67ca8ca3908c05a83eede3
e2fc58cfd87a9937fc3c4546d904987d
Given a numpy array (motifs) of TFBS matches from FIMO and an expression dataframe (expr) containing only deletion strains for the TFs detected by FIMO, returns a boolean dataframe that determines whether the transcripts (rows) have a TFBS in their promoters to that TF (based on the FIMO data).
df = df.copy() dft = df.reset_index() mask = np.zeros((dft.shape[0],), dtype=bool) idx = ['Proteins','Protein names','Gene names'] for i in idx: if i in dft.columns: mask = mask | np.array([match in str(l) for l in dft[i].values]) return df.iloc[mask]
0
6c30839d749093d8fbaea43b62c78613
d38d1d3738443149752fd517c4fa515a
验证是否为百分比, 且不能大于100
{ if (string.IsNullOrEmpty(strString)) { return false; } else { if (new System.Text.RegularExpressions.Regex(@"^([0-9]([\d]{0,2}))(\.[\d]{0,2})?$").IsMatch(strString.Trim())) { decimal...
1
592b443a624c13946ebb1e3c5eebf8a5
5dd376502c010650dbdf572bffa73597
'Correct' format: http[s]//[...]github.com/(owner)/(repo)/pull/(pr-no)[/...]
function transformGithubCloneURL(path: string): string | undefined { if (path.startsWith('github.com/')) { return path.split('/').slice(0, 3).join('/') } return undefined }
0
12e52b841bb84b8a98349d4207e713cd
350f2d039f1e8022c0ff26cdc9b9015c
returns a matrix storing jaccard distances so we don't have to do the jaccard calculation again and again
nums = self.clustering_objects.__len__() similarity_matrix = [[0 for col in range(nums)] for row in range(nums)] for i in range(0, nums, 1): object_i = self.clustering_objects[i] for j in range(0, nums, 1): object_j = self.clustering_objects[j] ...
0
6495177bafca1ace18606e61d1b7c8e6
fbc70a2558fae560bf602b1e8e955cc5
remove empty spaces and convert html characters
class Cleaner public static function cleanup($data) { $data = html_entity_decode(strip_tags($data)); $data = preg_replace('/[^A-Za-z0-9\@\.\:]/', ' ', $data); $data = preg_replace('/ +/', ' ', $data); return trim($data); }
1
bc291ac3e303aefad5565970652f571e
2a55c23c91de1d63774889465690abae
Gets the returned body of a request to a specific job from the Critical CSS generator API
{ $token = $this->oauth->getToken(); $parameters = array( 'oauth_token' => $token['key'] ); $base = '/v1/jobs/' . $id; $data['format'] = 'json'; if ($fields) { $base .= ':' . $fields; } $path = $this->getOption('api.url') . $base; $response = $this->oauth->oauthRequest($path, 'GET', $paramete...
1
9c229b1f4ec30729a06844286e625283
5d203b923608813792d6f610d8192b56
Sets the selected file types filter in the dialog. This is a base 1 index.
switch(who) { case DialogOption.DIRECTORIES_ONLY: setAcceptAllFileFilterUsed(true); fileSelectionMode = who; return true; case DialogOption.FILES_ONLY: case DialogOption.FILES_AND_DIRECTORIES: fileSelectionMode = who; return true; default: throw new IllegalArgumentException("illegal value " ...
0
7c4cfa1f3d605cf5fc35437ff5a8c50e
afad5dd5f711e856c1683c6de6e6051e
根据主机的哈希值寻找主机名信息
class RedisHash{ private function getRedisHost($key) { $redisKey = $this->hash($key); foreach ($this->_circleHash as $k=>$v) { if($k > $redisKey) { return $v; } } $hostInfo = array_values(array_slice($this->_circleHash,0,1)); return $hostInfo[0]; }
1
ef0335b2018edb3864053f86aca1a978
099d71d7654c21a8905d46562bfce959
通过会员Id和会员卡ID查询
UnionCard getByRootAndMemberId(UnionCardRoot root, Integer memberId, Boolean isValidity) throws Exception;
0
29db5456e7d0647dab33204202003ff5
c321fc3322da3afbc8dfbd038079a52a
Функция открытия формы редактирования номера для проживания
class display extends CI_Controller public function editRoom() { $this->load->view('admin/housing/editRoom'); }
1
56526c8fdaac033ea9296c5dee9e3b38
c692ebf6dac5dd0c1a9bc9c93034689a
使用word2vec生成句向量
def word2vector(): from gensim.models import Word2Vec, TfidfModel X_train, X_test, y_train, y_test = text_filter() word2vec = Word2Vec(sentences=X_train, size=size, window=window, min_count=min_count) word2vec.save('W2V_Model.model') word2index = {w: i for i, w in enumerate(word2vec.wv.index2word)...
1
2d82be7a6745aef91cc82ce1685e85cc
3cda28a343c41263b2c2cb932e4d6ff6
Simple constructor to set the key variables.
abstract class Base public function __construct($key, $secret, $endpoint) { $this->api_key_id = $key; $this->api_key_secret = $secret; $this->endpoint = $endpoint; $this->datetime = gmdate(\DateTime::ISO8601); $this->setHTTPClient(); }
1
55043fe618f300fc1c5bc78b7bc56dd9
af70462fe162eae11ada6faff5e457db
레시피 번호에 해당하는 모든 사진의 path를 받아온다
String defaultImg = "src/main/resources/images/preview.png"; List<String> imgList = getAllImagesForRecipe(rec.getRecipeName(), rec.getCreator()); String imgPath = null; if (imgList == null || imgList.isEmpty()) { return defaultImg; } else { imgPath = imgList.get(0); } if (imgPath == null) { ...
0
924ab89ee0442dbf454d6a0e6664a77b
c77932f551649266b589b16be7eba5a8
Read in mean field from observations file period: String period for which observations are required Options are 1y, djf, mam, jja, son, jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec Returns a numpy array of dimensions (z, x).
def read_observed_flow(file_name): date = np.loadtxt(file_name, dtype=np.int, usecols=(0, 1, 2, 3, 4)) dates = [dt.datetime(yr, mon, dy, hr, mn) for yr, mon, dy, hr, mn in date] Q = np.loadtxt(file_name, usecols=(5,)) return dates, Q
0
748ab2f3fd9c7ae728429307cdfd67a6
ab8be8542fc617d37d7c5063ed0e4cf5
Gets is_vat_inclusive
public function getIncludingVatPrice() { return $this->includingVatPrice; }
0
d68bad92fb7dc239276ab10dcaae0b86
519a5c6b4b002704072f00a0453fa1bd
将Unicode编码的字符串转换成中文 需确保ascii为Unicode编码
public class StringUtilsExtends extends StringUtils public static String unicodeToChinese(String unicode) { StringBuilder out = new StringBuilder(); if (!isEmpty(unicode)) { for (int i = 0; i < unicode.length(); i++) { out.append(unicode.charAt(i)); } } return out.toString(); }
0
836a1bb2949d47199c734e0fe8f03767
5d125940b114efa7daf37b1dd6d59d6a
Check whether provided hints fit in a row of the grid.
{ LayoutEngineResultRow workRow = this._WorkRow; if (workRow == null) return false; if (workRow.ItemCount == 0) return true; if (item.ItemSize.Height != workRow.Size.Height) return false; if (_ItemHasHint(item, LayoutHint.ThisItemSkipToNextRow)) return...
1
41509eebd94d505c73ee7a781947212b
e9c9c39a3451b3a910a8ca3941509dea
Get or create a requests session for TCGPlayer.
if not hasattr(self, '_session') or not self._session: self._session = requests.session() retries = Retry(total=3, backoff_factor=1, status_forcelist=[502, 503, 504]) self._session.mount('http://', HTTPAdapter(max_retries=retries)) self...
1
34ae3bce4ddac4d923018c9a8a6aece4
42cdff7283682a2ffc64db370dc9258c
<p>グループ情報CSVを出力する。
final ArrayList<String> grp_data = makeStandardData(group); extendmakeCSVData(group, grp_data); return grp_data; }
1
f671255cf430492bc5e06c54c33b6e98
f1e5cb7d939f8c6c4a2046de15802c0f
Get Product TPNC Number
class Matiere extends \App\Entity\Matiere implements \Doctrine\ORM\Proxy\Proxy public function getNhTP(): ?int { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getNhTP', []); return parent::getNhTP(); }
0
bc4a3caa1264a10b4d3fdf0e9f697760
56f90117b08daec1ac357bc02b7f62a3
根据配置文件创建mysql的连接池和kafka的消费者 从kafka中读取数据,反序列化protobuf,通过orm写入mysql数据中
func main() { var config = new(common.Config) err := ini.MapTo(config, "./conf/config.ini") if err != nil { logrus.Errorf("[main] Load config failed, err: %v", err) return } logrus.Info("[main] Load config success") err = etcd.Init(strings.Split(config.EtcdConfig.Address, ",")) if err != nil { logrus.Error...
0
ad5ea571ae23889dfc0b2799e1a10c76
05ae1bdff96bc27fe18b17c6ff7ba636
Return the full 64 bits of the register value.
impl RegVal pub fn get(&self) -> u64 { self.val }
1
3afaea6b5503c0dea7fcef24f8c71ccb
775e7b6426a772752cd0aada21e7664a
遍历质量评查内容,生成提交数据
String currentNode, List<String> nextNodeList,String pdid,String testCaseName, String bizId,String PIds,String WIds,String TIds,String opinion) { ArrayList<BasicNameValuePair> pairs = new ArrayList<BasicNameValuePair>(); FileReader reader; try { reader = new FileReader(postFilePath); BufferedR...
1
828b11e10d8f0d71be07076c234daf5b
4aea090d39ae6a18b2f8217dfcd8c4e0
Initialize a new ticker tracker
super().__init__(None, loop=loop, allterminated=allterminated, **kw) self._hidden['queue'] = asyncio.Queue(loop=self._inf['event_loop']) if tickers is None: tickers = [] for t in tickers: self.add_ticker(t)
1
1615e14a15bf9459baebc42026c4bff6
b9170d940cac4e6b0bdbf3db788f673f
makes sure that 'Nd' and other numerical unicode characters that are not [0-9] fail to parse
class TestIPIBaseNumberException(unittest.TestCase): def test_only_numbers(self): code = '9-999999999-9' self.assertRaises(ParseException, self.ipi.parseString, code)
0
0c66b2ffcf07efe18813f398df32040f
29571b9c4ab6f0a5a14983e382fe9a4d
检测有效串口,去掉重复串口
port_list=[] if devices_list != '请检查手机是否连接成功,目前没有检测到哦T_T!': while len(port_list)!=len(devices_list): if self.port_is_use(start_port)!=True: port_list.append(start_port) start_port+=1 return port_list else: re...
0
052d3c56632ea0f7dd61fce63e781e62
bc6aadbe49ba47964c0436c4f3d72660
\brief Použítí klíče Pokud hráč vlastní klíč vrací odpověď je kladná a dojde ke snížení počtu vlastněných klíčů.
class Queries function TakeKey($userID, $keyID) { $statement = $this->connection->prepare("CALL TakeKey(?, ?)"); $statement->bind_param("ii", $userID, $keyID); $statement->execute(); $statement->close(); }
1
d0d7af4008cd308dc59f98e937349c85
76d715b00e7bc1297d23c4d11865b314
TaskProcClosing event handler of IpcConfService.
{ ClientBase<ConsumerSearchIHIPortType> searchClient; if (searchIhiClient is ClientBase<ConsumerSearchIHIPortType>) { searchClient = (ClientBase<ConsumerSearchIHIPortType>)searchIhiClient; if (searchClient.State != CommunicationState.Closed) ...
0
7e63a8e87e3a8b1ed969bc68fd4ba552
9c6bbfd05a2aae287ae0535b1f8d3edd
Nastavi stanje igre na konec igre.
public class Engine public void setEndOfGame(boolean endOfGame) { this.endOfGame = endOfGame; }
1
04318d7268e072dbe3e21febd61001bc
47cbe0edfb6ffcac1b2f189b70a22c45
Substitui o caractere "+" por " "
namespace WebScrapper class ScrapperEstadao : Scrapper private string prepareKeyword(string vKeyword) { return vKeyword.Replace(' ', '+'); }
0
c25de4ce07c0fe6eb217442bfdf1c7ad
5f480836ddc48c67fe5a4156c7d474e7
temporary func for testing/cleaning purposes
local function dummy() end
1
f0f578e701be74ad376d572e80af85b1
9fdc1471a8d600829eaa44376404be1d
Check to see if StudioComponentName property is set
namespace Amazon.NimbleStudio.Model public partial class LaunchProfileInitializationScript internal bool IsSetStudioComponentId() { return this._studioComponentId != null; }
0
64e7bab45179194232f81749e34c9c6e
1098736a733e99bc7afbe2ad3065eeb6
Tests for the HtmlBuilder class.
class HtmlTestCase(BaseHtmlTestObject): def __init__(self, *args, **kwargs): super(self.__class__, self).__init__(*args, **kwargs)
0
d5af0ed187bbe4cb2961afad7eeafe97
cca2c8049c8cc3dd7a891fecc50f6f6a
商品コードと注文数を紐づけた表を作成
namespace MiniERP.View.BusinessManagement public partial class Frm_OrderList : Form private DataTable DataTaleMaker(List<VO.Ordered> ordered) { DataTable dt = new DataTable(); DataColumn[] dataColumns = new DataColumn[3]{ new DataColumn("주문번호"), new Da...
0
2a5095379bc320f77ae45fa96059436f
71793172974c50dc14584b8ff1bdc158
removes any declarations matching the scope and removes the symbol altogether if no more declarations remain.
symbolTable_t * cSymbolTable::DecreaseScope() { m_symbolTable.pop_back(); return m_symbolTable.back();; }
0
690a63371026f028f8358dd8145c1adc
c2e1bb8e8baf0a6cfbb8d84648e1b13b
根据用户id获取sessionId列表
{ if (userIds == null || userIds.Count <= 0) return null; List<string> sessions = new List<string>(); RedisUtils.DefaultInstance.Exec(AppConfigManager.USER_SESSION_DB, db => { RedisValue[] values = db.StringGet(userIds.ConvertAll(u => (RedisKey)u...
1
eec58cc36bbb15b9da2dbab3a10e4fd4
9905505a6294408f379773e38dd110a1
<pre> Simple client-to-server streaming RPC. </pre>
@javax.annotation.Generated( value = "by gRPC proto compiler (version 1.23.1)", comments = "Source: hello_world.proto") public final class HelloServiceGrpc public static abstract class HelloServiceImplBase implements io.grpc.BindableService public void helloWorldServerStream(HelloRequest request, ...
0
71627bac26be6fcf1012baafe546e243
438c0f631b9860340f8e6c39fdd3040e
Check if this actor class can have a required message queue type.
class DDebugMailServer extends DMailServer public static function isRequired() {}
0
29104b1f9f7706d2acd2d2d50ab1f06f
1d5f2e28f91d1acc7a6a7a9eae9fee61
Unlocks callback processing for a module.
namespace Vanara.PInvoke [SuppressUnmanagedCodeSecurity] public static partial class Shell32 [DllImport(Lib.Shell32, SetLastError = false, ExactSpelling = true)] [PInvokeData("shlobj_core.h", MSDNShortId = "967ede1f-ee9c-46ee-a371-dcfc3a57d824")] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool...
1
b28c5e5935daac759c0b575f6202c97f
b19e0d7251ead78cd0e42a72af772f0e
Initialize NIL, nil key exchange always fails, for lack of implementation.
func Get(key string) ([]byte, *nerr.E) { return []byte{}, nil }
0
74dcce826d708e047d5301da89fbc26f
e6b54517b932e0558f2a1720374d4793
Test that clients configured max metadata lengths are respected
{ $jsonKey = json_decode( file_get_contents(getenv(CredentialsLoader::ENV_VAR)), true); $result = performLargeUnary($stub, $fillUsername = true, $fillOauthScope = true, 'updateAuthMetadataCallback'); hardAssert($result->getUsern...
0
74cfecb028a86f890bef3f3f6cb08639
f2f67d921390318aec071b5989f917d2
Returns the meta object for class '{@link robot.dSL.Behaviors <em>Behaviors</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getControlUnit_BehaviorsControlUnit();
0
b002b246fcc332650969eef66cd032d6
806781163cf9c26122f20a3849355943
Input: score: a list or an array of scores percentile: list indicating percentile position; e.g: [0.025,.5,.975] precision: floating point Output: String: median(lower bound, upper bound);
def percentileClipping(data, percentile=95.): lower_percentile = (100 - percentile) / 2.0 upper_percentile = 100 - lower_percentile min_value = np.percentile(data, lower_percentile) max_value = np.percentile(data, upper_percentile) return min_value, max_value
0
eb08d41aab0fe4eef3463676745d5b2a
8f9573d413cf6441a968f90cffef265e
Sets the specified value to the {@code bindingUnit} field.
public abstract class OptionalBinder<T> public abstract LinkedBindingBuilder<T> setBinding();
0
bae70bf3bd449796c44f61cbebcb6712
8b39c1cae87010749fe8e61ce0989662
Stores current request to session.
class Petolio_Service_Util public static function saveRequest() { $url = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri(); $session = new Zend_Session_Namespace('Petolio_Redirect'); $session->redirect = $url; }
1
c694fa071c379b26ba224a64eb67ef31
1c1fc4311d86e602da51ee75347b799b
Convert Bytes to Mac Address
def get_mac_address(bytes_address): bytes_string = map('{:02x}'.format, bytes_address) return ":".join(bytes_string).upper()
1
b5058646c44e1dd18b202138e05d6974
62b947ebd387cebb2ca2954f1d5de1d2
converts 4-bit nibble to ascii hex
{ byte hb = (bb&0xF0)>>4; byte lb = bb&0x0F; string out = "00"; if (hb>0x09){ out[0] = 'A' + (hb-0x0A); } else{ out[0] = '0' + hb; } if (lb>0x09){ out[1] = 'A' + (lb-0x0A); } else{ out[1] = '0' + lb; } return out; }
1
00ad3764164af9a9b1aac98be7c12c7a
9491c812813e3b82682fedc825653cf2
Get a specific room progress.
UnityAction<AsyncResult<EzGetProgressResult>> callback, GameSession session, string namespaceName ) { yield return _profile.Run( callback, session, cb => _client.GetProgress( new GetProgressRequest() ...
1
ee3460ce76fe91c44b60e903b391ba01
9d06da313a5a6e9ac63041f9646fe6fd
Releases all resources used by this Vision.Registers.Signatures.Signature
{ if ( disposed ) { return; } if ( disposing ) { } signatureBytes = new byte[0]; signatureBytes = null; disposed = true; base.Dispose(disposing); }
1
d811ce310b83ff70866c26e5c9fad817
8c8c14bf21debf74c25777b1dc9d65f6
转换为长整数 转换失败返回默认值
namespace Sgms.Frame.Utils public static class TypeUtil public static long ToLong(string value, long defaultValue = 0) { long result = defaultValue; try { result = long.Parse(value); } catch { } r...
1
8435141199acc556259004dd9fbb62bc
2d8ae5b3f43c3d4c86f66613ef74c17c
Set transformation parameters to arrays of zeros.
class UnscentedTransform(object): def _set_arrays(self, x): if not isinstance(x, np.ndarray): x = np.array(x) parts = x.shape[1:] if self._model.hidden_ndim > 1 else x.shape self._mean = np.zeros((self._ndim, *parts)) self._cov = np.zeros((self._ndim, self._ndim, *parts)) ...
1
49ccf6dd986fd002fa64104f9260b967
1ebdfe59c0a9acc4ee2c7ab03d1cf966
我的钱包地址
export class LoadAndLoginMediator extends puremvc.Mediator implements puremvc.IMediator public getMyAddress(): void { let data = '{"uid": \"' + this.wallet.uid + '\"}'; HttpAPI.HttpTX("getMyAddress", data, this.onGetMyAddressComplete, this); }
1
46164b0e0928d524e8a5b621cb80211a
d702df1435f9f5ccafbbb15d3c04b064
删除user_bank_card表所有数据
int deleteUserBankcardByid(Integer id);
0
ec2c4e562b9686b58b9843e85c032b51
4a0ebdbff72ba1326734471c6b3431ab
寻找能够达到的,距离最近的目标
class EricAgent(Agent): def select_target(self,own_plane,enemy_list)->{}: min_distance = 450000 close_enemy = {} for enemy in enemy_list: distance = TSVector3.distance(own_plane,enemy) if distance < min_distance: min_distance = distance c...
1