query_id
string
corpus_id
string
query
string
code
string
label
int64
e37910b2e55d6b37978a205ada2c9c09
d60ed2638360ea1357f2f56dd1fc25a0
Check that initial value is zero.
class Test(unittest.TestCase): def test_is_zero(self): self.assertFalse(self.hawkes_kernel_exp.is_zero())
0
6e492e5479f4e2620f650c483083b44e
79532f7ee7f28b9c24d588bc6985c24f
Returns the value of field ap_height
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ZoneObject", propOrder = { "entry", "exit" }) public class ZoneObject public long getHeight() { return height; }
0
eea0c2edf0c16de8ddd4ed97a137e817
05731e8659378bfe04f5bee2af989d6c
Time must be in the format yyyymmddhhmmss. Returns the 'yyyymmdd'.
def extract_date(date_time_str): try: return ' '.join(date_time_str.split(' ')[0:4]) except: return date_time_str
0
4fb171cc110b3f7f1f9be68383453467
c931eb69ce33380d65491cd528c48932
Open window for altering of destination table
function destWin() { window.open('./DestOrder', 'selectDestination', 'width=1000, height=600'); }
1
fd6349186b257b083f124b2bbf87f47b
8bf86b7dd6437aac9841b9a74eccf551
Tests if posterior covmat approximates that from a RBF model.
def test_covariances_real_vs_sklearn(estimator, rndstate): n_matrices, n_channels, n_times = 1, 3, 100 x = rndstate.randn(n_matrices, n_channels, n_times) cov = covariances(x, estimator=estimator) if estimator == 'scm': assert_array_almost_equal(cov[0], empirical_covariance(x[0].T), 10)
0
1deff3447e3541656dcb5a67eb45eac9
9cfad6343af9fd125b87d56f99c5ca9a
Check if object has an iterator
abstract class AbstractWPQueryDataTable extends AbstractDataTable public function has_iterator() { return is_a( $this->iterator, 'EventManager\Utils\Iterators\WPQueryIterator' ); }
1
76e4150d69a13ccd57eeacd483248590
d7218de2cb603500def51952051de171
Base method to print an event.
System.out.println(eventObj.getSimpleName()); List<Method> fieldGetters = getEventObjectFields(eventObj); for (Method fieldGetter : fieldGetters) { printEventObjectField(fieldGetter); } }
1
027075c3b29e91fb3bb7f6c5b91b96bb
8f5de69c82f474981bf6c67e759a5cdc
Destroy an ISA DMA map.
EFIAPI IsaIoUnmap ( IN EFI_ISA_IO_PROTOCOL *This, IN VOID *Mapping ) { ISA_MAP_INFO *IsaMapInfo; if ((PcdGet8 (PcdIsaBusSupportedFeatures) & PCD_ISA_BUS_SUPPORT_DMA) == 0) { return EFI_UNSUPPORTED; } if (Mapping != NULL) { IsaMapInfo = (ISA_MAP_INFO *) Mapping; if (IsaMapInfo...
1
23055fea7e9f56cc944ad91b2ac5a0e9
c42e9175046f55aac2451f245f52a19c
交互式弹窗(获取棋盘规格和初始细胞数量)
let [size, num, factor] = [6, 4, 0.5]; return getInput(`请输入迷宫边长,默认为${size}:`, answer => { if (answer == '') { return [size, true]; } const value = parseInt(answer); if (Number.isNaN(value) || value < 3) { console.log('无效的输入,迷宫尺寸为整数,最小为3'); retu...
1
2ffe44c267a64e04fdb2dd3c8816edfa
c11a262957499016b24f1a8d592ac49b
過去30日の最高体重を返す
def max_value(user, range) max_weight = user.body_weights.where(day: range).maximum(:weight) max_weight.round + 1 if max_weight end
1
785e95deed738ffe8376c7c95edea2c3
241dd18eccb49ded436642a11415d539
Поворот джойстиком на андроиде:
class B2GADB(EidetickerB2GMixin, mozdevice.DeviceManagerADB): def rotation(self): return 90
0
2def26010eef65f2f7c8b17eadcf4a65
91ae627136c8c057e26c0ae51b6f3e22
Obtain a dictionary of full filepaths given the input IDs
patient_directory = os.path.join(os.path.abspath(os.path.join(os.getcwd(), 'openface')), patient_id) patient_openface_outputs = [] for root, dirs, files in os.walk(patient_directory): for f in files: if f.endswith('.txt'): patient_openface_outputs.append(os.path.join(pati...
0
85e254862011ac5043c6a9e156a79abb
8db3ec185086ae5119fb697ac4e5f929
liefert den Inhalt eines PDFDokumentes als String
def read_pdf_to_string(file_name): return parser.from_file(file_name)['content']
1
7ca0a5a67d354bf6419efef3861876f5
2aebc7bd0ebf763d38a2392703314682
Given a vector of same size and data type, fills DataMesh with vector. Useful to copy DataMesh.
{ m_d = NULL; m_Len = 0; SetSize(v.m_Len); for (long i=0; i<m_Len; i++) m_d[i] = v.m_d[i]; }
1
372d9ec733bd24a8eb6686322705637d
44e47e2a8b19a21e24f72ad62f4d7d81
Creates a new instance of the sol_Agencies class and populates it with data from the specified SqlDataReader.
namespace LimsProject.BusinessLayer.DataLayer partial class CSolution_interm_methodsSql : DataLayerBase internal List<CSolution_interm_methods> PopulateObjectsFromReader(IDataReader dataReader) { List<CSolution_interm_methods> list = new List<CSolution_interm_methods>(); while (dataRead...
0
197ff38bf7fc6d929c80109e2dd0a5db
71ae151d1994dd391be3904cd36409ec
Синхронизация подписчиков с мейлтанком
$mailer_id = intval($mailer_id); $mailer = $this->get($mailer_id); $message = intval($message); $user_id = intval($user_id); if (!$user_id) { global $AUTH_USER_ID; $user_id = intval($AUTH_USER_ID); } if (!$user_id) { if ($mailer...
0
c0eb2a6b06d4b1b9330a479175544133
446022f5dc70909baa5ed68b9824030e
This Checks the buffer for available data to avoid blocking calls
class client_socket(asyncore.dispatcher): def check_data_buffer(self): while True: with self.lock and self.read_lock: if self.buffer: data=self.buffer self.buffer=b'' self.master.send_data(self.key, base64...
1
f9f4cef8792c7ce6b21ec6ee10870af0
41b27d4c23ac45c38cd3b69545cf12f3
逐层上报并附加上每层在父级中的索引
true_header = payload['true_header'] network_id_list = payload['network_id_list'] Enterprise = payload['Enterprise'] level = payload['level'] HZ_Enterprisea_name = lazy_pinyin(Enterprise) queue_obj_name = "".join((str(i) for i in HZ_Enterprisea_name)) if not gener...
0
19afb5c056d1f000a788ad90ca5aba93
0bc2528ef7eb51ca4572d594f43bb2e1
Return the unique events described in this BeliefsDataFrame.
claims = [] for run in self.runs: for event in run: if isinstance(event,EventClaim): claims.append(event) return claims
0
87e20e65a0bb12a3edd3b4a7836044c5
37df051512cc2de5e9b126691551f3bb
function to randomly shuffle the student list
{ int counter , i , random_column ; for(i=0 ; i<= 99 ; i++) { counter = 0; while (counter < 5) { random_column = rand() % 30; if(student_table[i][random_column] == 0) {student_table[i][random_column] = 1; counter++; } } } ...
0
da0083973828a9388e28294142d40870
e875c9918c2e8955ae2c978acffc6a22
This function plots the time evolution of von Neuman entropy over a linear time axis.
plt.show() axes = plt.gca() axes.set_xlim(0, 4000) axes.set_ylim(200000, 500000) axes.set_xlabel('1/30 [s]') axes.set_ylabel('entropia *10^(23)') axes.set_title('Entropia') self.line, = axes.plot( [], [], 'r-')
0
96a8166d76be702f7b84f7cb33e0fa68
c4762650d3429fb3a813e1c79d2cdb28
Create an instance of {@link CustomException }
class CustomAuthorizationException extends RuntimeException public function __construct($message, $error_message = null) { parent::__construct($message); $this->error_message = $error_message; }
0
99edefdd940012f74ef77ad2bd09c28d
4fdca0ef6824b7209fa6e3c86269ec01
@brief Return the value of the parameter <tt>$dbms</tt> from config.php
function getDBMS() { return CONFIG['dbms'] ?? ''; }
1
5506494474ad6850fec4fa2cd960f484
73227fd9cb00ceada0c4d82313f93359
ICADにモデルが残っているときのクローズ処理のメッセージボックスを実行する
namespace FelicaCashingSystem static class Utility public static void CloseMessageBox() { new CloseMessageBoxImpl().Close(); }
0
01d6da3b4eb022e38e1cf44e87df480a
574bed977eb064daf0a19649c0cec102
@brief 计算crc校验值
{ quint32 crc32 = 0xffffffffL; for ( auto i = 0; i < len; ++i ) { crc32 = crc_32_tab[ ( crc32 ^ data.constData()[ i ]) & 0xff ] ^ ( crc32 >> 8 ); } return (crc32 ^ 0xffffffffL); }
1
087adbaca6937b6cd56aebf4742482c4
1215e93c9f28b5c575403321650facb5
跳转到变更历史列表
mini.open( { url : 'jsp/admin/rolelist/listhistory.jsp', title : "历史记录", width : 800, height : 500, onload : function() { }, ondestroy : function() { } }); }
1
2842474b878739c08ea2ade894cb2d31
595e7f0fbd76d4071337474aea7e5684
Generates the indexes of empty boxes.
function getOpenBoxes(tempBoard) { let openBoxes = []; for (let i = 0; i < board.length; i++) { if (board[i] == "") { openBoxes.push(i); } } return openBoxes; }
1
05a4b28c475895ecf92032289ee78720
483a87cdf16cfa99260505e2d9a95b5d
Test case for com_adobe_cq_screens_analytics_impl_screens_analytics_service_impl
class ConfigmgrApiTest extends \PHPUnit_Framework_TestCase public function testComAdobeCqScreensSegmentationImplSegmentationFeatureFlag() { }
0
c2b926ee4d67e3e381bfa062c5c94bf3
c44e31ffea8b8a022e7680a01f50ef57
Sets the coordinates of the ::IND_LINE primitive that will be drawn on screen.
{ this.x = x; this.y = y; currentLineSize = 0f; }
1
8b3534856b8f899bba2fcd15158bfff9
2fa9d15f0b861715c52397ac7b5e6f93
Pushes an integer value of given size on top of the stack and increases the stack pointer by the size of the pushed value [E_INVALID_STACK_OP]
void stack_push(int size) { stack_ptr += size; }
1
536dcb437ee74cd32f7fadc3a0a420f7
c23b3a05a6944bf71537d74709229542
Sets the distance of the eq search
if (distErr != null) this.distErr = distErr; return this; }
0
86088d8e90c9cbcf3072adc2bc001417
8fcba3334c835608a8d6022d9b268c8a
测试沿着L逆时针旋转90°
public void testRotateLine() throws Exception { Line line = new Line(1, -1, 1); Line l = LineUtil.rotate(line, p00, Math.PI / 2); assertTrue(LineUtil.onLine(p_10, l, NumberUtil.MIN_VALUE)); assertTrue(LineUtil.onLine(p0_1, l, NumberUtil.MIN_VALUE)); l = LineUtil.rotate(line...
1
ad46843d6274fb113d7ae9d2344963af
91930bf793112f64174a3d16723c2de3
检查美国玩家的太空竞赛是否领先
public TableResult glUserPioneerService(GameTask gameTask,TableSide tableSide);
0
8835c82762e7c75f52c29dfa750727a1
886e0070042596124a203adb3c44f51f
функция проверки все ли значения введены
function validate() { 'use strict'; let result = true; let elements = document.getElementById("input_form").querySelectorAll('div > input'); for (let item of elements) { if (item.value !== "") { continue; } alert('Поле ' + item.placeholder + ' должно быть заполнено!')...
1
2be1a7657ca48ad3e1bfa9f2243ea54b
6d7c9e1302d16863f41fa880888805eb
根据接口编码查找接口
@Service("apiConfigService") public class ApiConfigService extends BaseService<ApiConfig> public ApiConfig queryByCode(String code){ return getDao().queryByCode(code); }
1
1165c0ffb77aa6276239ef06c1b2570e
4ff5cd48a23e557eed5efaed07e6e8dd
Returns the last row in the result set
Class Results public function lastRow() { $result = $this->_getRow(); if (count($result) == 0) { return $result; } return $result[count($result) - 1]; }
1
70c33a764892c94a987645c382bf9744
d59fc0825ac9fc487b2ef7fc19f1ea30
航班时间转化为分钟
public class CmnUtDate extends java.util.Date public static int getFlyingMunites(String start, String end) { int iSt = Integer.valueOf(start).intValue(); int iEn = Integer.valueOf(end).intValue(); int rtn = 0; if (iEn <= iSt) { iEn += 2400; } int hour = iEn / 100 - 1 - iSt / 100; int mini = iEn % 100 +...
1
f24d199e0a0d076606f679a53bf8d88b
f65808bf65290c09ac5a408b0c6d2e7c
Checks all evaluation functions before a document change is applied
namespace PlanetaryDocs.Shared public class EditorBase : ComponentBase public bool ValidateAll(Document document) { var results = ValidationRules.ValidateDocument(document); var isValid = results.All(r => r.IsValid); if (isValid != IsValid) { V...
1
a82d5c8cd4db21b7cb785c4a14135ab2
acf4b4489296572f2a298ee3f87535c6
Calculates the light vector that starts from a given point, and points to the light source This function is not part of TKITraceable because they are the same for all objects
Vec3f PointLight::computeL(Vec3f intersectPoint_){ return Vec3f::normalize( pos - intersectPoint_ ); }
1
9c28ce16deb0fba6022d82de8eba05ee
5b0c6514315bf5632766b4e5d032506f
function to get filename as change_capture_weekoftheyear_yyyymmdd.csv
def get_dih_filename(year): return 'DaysInHospital_Y%d.csv' % year
0
6db463922635378bdac17a7e4b017f6d
3cc69380fffe623a113e5ce7ba144cf1
Gets the current settings from the settings box
function getCurrentSettings() { name = document.getElementById("namebox").value.trim(); let options = document.getElementById("selected_pronoun_list").options; pronouns = new Array(options.length); for (let i = 0; i < options.length; i++) { pronouns[i] = new Array(5); let prns = options[...
1
b55f4624fd78f997585cfa835f38e76d
798ea77efec90d9b7c750e3f77fc00a8
Write out a c-style (null-terminated) string.
void write_string(const char *psz) { while( *psz ) { write_char(*psz++); } return; }
1
7d2b3add6aeb7e725f4cc8aa78605ca4
669867e2b4d19953f078637b02971c42
실시간 공지 종료일시를 할당한다.
int $gameId, int $groupId, int $noticeId, string $startDateTime, string $endDateTime ) : bool { $data = array( 'ShowStartDateTime' => $startDateTime, 'ShowEndDateTime' => $endDateTime ); return $this->updateNotice($gameId, $grou...
1
4be9e4c506ce070a6fa7b33a921aedac
6f0782e78e59f11d60f6ea64b077a376
获取物体的当前大小,通过BoxCollider
namespace LuaFramework public class Util public static Vector3 GetObjectSize(GameObject go) { Vector3 realSize = Vector3.zero; Renderer render = go.GetComponent<Renderer>(); if (render == null) return realSize; Vector3 meshSize = render.bounds.size; ...
0
0076a229b79ddc5c0f4b4e4ca4f79dd8
381c304ad6dbfe77c3ba5b3e9a52c55a
Handles the AfterShown event of the modalPanelManager1 control.
{ try { this.basePanelScrolled = true; } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.Display, this.ParentForm); } }
0
072913600b0b0e6e8cbdb2bae53c10bc
8173428d8d12d356798d7cc722a31811
Defines the cycle phase, when in global mode. Defaults to zero.
class ReadoutPulse(Pulse): def global_phase(self): return 0
1
7d771e3242dad04c9c964dccbd5d5a5d
946cd8df4ba6487af999e537a7a623c2
Paso de relajacion
void pRelaxPelanti(double a1, double a2, double p1, double p2, double pinf1, double pinf2, double gama1, double gama2, double pI, double &pRelax, double &a1Relax) { double a(0.), b(0.), d(0.), C1(0.), C2(0.), delta(0.), r1(0.), r2(0.); C1 = 2.*gama1*pinf1 + (gama1-1.)*pI; C2 = 2.*gama2*pinf2 + (gama2-1.)*pI; a = 1....
1
7ee0824e5d6de44bfab1e356fb28dce5
e3bd4597fe1cb446ab1b8b50aab1f74d
根据genreId查询总和表
interface RetrofitInterface @GET("/evaluation/count/genre") fun getCountGenre(): Call<JsonObject>
0
815ba9a4ed6d72d83ff91fc614b637b6
69f3556b0ac5909782f183b8a87f1e0a
Get the number of documents that have been processed at least once.
class InfiniLoadClient extends InfiniLoadBase count () { const stats = this.stats; return (!stats) ? 0 : stats.loadedDocCount; }
1
493c131cff648c5e1bf3cd1f2522b2f8
5e87ab9bf3c587b29ad2f135aba8179a
Update network parameters using given batch of experience tuples (using DQN)
class DQN(OffPolicyRLAlgorithm): def update(self, batch): pidxs = batch['pidx'].squeeze() bidxs = torch.arange(self.qf_batch_size) q_curr = self.qf(batch['observation'])[bidxs, pidxs] q_next = self.qf(batch['next_observation'])[bidxs, pidxs] q_target_next = self.target_qf(batch[...
1
fd997e309288635cae75039aa2977da9
6f2d05e29b30e79c78619143ecce2d38
Set triangle coords in BufferGeometry arrays
function loadTriangles() { if (inputTriangles != String.null) { var whichSetVert; var whichSetTri; for (var whichSet = 0; whichSet < inputTriangles.length; whichSet++) { var coordArray = []; var indexArray = []; var vtxBufferSize = 0; var ...
1
16d7cd4fab0b24dccc416cda9774088f
15f4a17c215945dcaad00c7ff40c12cf
获取建筑类型id
class CommonController extends HomeBaseController public function BuildType(){ $BuildType = M('BuildType')->select(); ajax_success('获取成功',$BuildType); }
0
f1ea787df7266684c2f36580ab6e9a30
5fcd34ef6eb3f8bc989e7f9dea8185ee
Sets the indoor map ID to allow the point to test against routes indoors.
namespace Wrld.Space public class GeographicTransform: MonoBehaviour public void SetIndoorMap(string indoorMapId, int indoorMapFloorId) { m_positioner.SetIndoorMap(indoorMapId, indoorMapFloorId); }
1
dd119ec42e3e3dbe19d7468392df8725
68cbd092467348c669048c6ca8f3588f
계좌 목록 출력하기
public Map<Integer,List<String>> listAccInfo (String user_RRN) throws Exception { List<String> listAll = new ArrayList<String>(); Map<Integer,List<String>> mapListAll = new HashMap<Integer,List<String>>(); List<String> listHana = sqlSession_HANA.selectList("boardMapper.listAccInfo",user_RRN); List<String> list...
1
0ed01957312b1f1260188afb9ace5774
40a24ecb7aa52e1cd1652a6ed3eea22d
自分と敵との間に壁が存在しているか
{ if (charaViewingDirRaycast->GetHitModelInfo().empty()) { return false; } VECTOR selfToEnemyVec = enemy.position - characterBodyTrans.position; selfToEnemyVec = SafeNormlizeVector(selfToEnemyVec); charaViewingDirRaycast->direction = selfToEnemyVec; charaViewingDirRaycast->GetHitModelInfo().sort(); HitModelInfo n...
1
5b7dbbf07e589e4e4d49bfdbbae97ac6
15ac9903c96244a0a471f17f46f4ddf9
Zpracuje odstranění štítku dokumentu.
{ $document = $args->getObject(); if ($document instanceof DocumentInterface) { try { $this->validateDocument($document); $document->setRawDocument(null); $documentPath = $this->getDocumentPath($document); if ($this->documen...
0
a3a0137034748f37d8cd49a6a4741bf5
58457320e2d0e287f39eb42ae0f0c516
Function to merge grid values and to push values to the left
class SameGame(): def update_grid_left(self): for col in range(self.currN): allZero = True for i in range(self.currM): if self.grid[i][col] != 0: allZero = False if not allZero: break if allZero: ...
0
0122c9a9838113a932aafe62fee697c7
b398477fb9a3fabdb65c7910308c775e
Tests that the name of the endpoint is correct (logging purposes)
from flask_monitoringdashboard.database.endpoint import get_endpoints with session_scope() as db_session: result = get_endpoints(db_session) self.assertEqual(len(result), 1) self.assertEqual(result[0].name, NAME)
1
92224d15b7dda977eb744c7c496357c6
7f27a5a6fe567e9827ca56ad9bd32970
Check if the device is tablet in landscape mode
public class DeviceUtils public static boolean isTabletLarge(Context context) { return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE; }
0
3cd4831a4a979215105a885c2768e201
065c20c1b91df54be02d415563fc72ce
两数相除获取整数结果
public class XWHMathTool public static double divide(int v1, int v2) { return divide(Double.parseDouble(v1 + ""), Double.parseDouble(v2 + "")); }
0
c2640c22ea245bdb84d2556395f46204
c008ecfd65cb2db915e84af6fc4c5a57
Enable smartcommits on new repos.
class CommitCI(PlatformCI): def enable(self, slave, platform_ci_source): dispatcher = JobCommitDispatcher(self.component, slave, platform_ci_source) self._enable_job(dispatcher)
0
bd1f1ad9765805803ecc1ffc15884c1d
a47022665dc1f64709662c4b10a9e69b
Initialize Mgrt client
class RMClient(object): def __init__(self, config): if isinstance(config,dict): self._config = RMConfig(config) elif isinstance(config, RMConfig): self._config = config else: raise AssertionError('configuration is not a dict of RMConfig object') self.tracker = RMTrackingClient(self._co...
0
3817b8914de048db2985e63fc4abbb0f
faa5848c9d4332603b92f5c63669a592
Determines whether the trajectory segments are drawn as an emissive or diffuse color
namespace Solarus bool TransitionFade::is_colored() const { return colored; }
0
2edd7c89ad0ef8789f6235ef8ba7d1e4
24fec98bfd9f9098509795cfda5ca020
Resolve resourceName string as "js/jquery/flot/jquery.flot.js" or "png/logo.png" to JS or PNG value
export class Database public resolveAssetFilename(assetRef: string | undefined): string | null { if (!assetRef || !this._assetResolver) { return null; } return this._assetResolver(assetRef) ?? null; }
1
4266b6f9b6a1a3be88d25e99bbf848ca
d40fc1fbfd4443d30a17f84675c24af9
To switch between student and teacher form
export class TeacherOverviewComponent implements OnInit public onClickOpenForm(): void { this.openform = !this.openform; }
0
3573765247fe4e893998cbb27164487c
3e7dca2937533976acee0623ef2d2139
This method is used to get the value of a primitive double variable from the ParameterList
double Param_t::get_double_param(char *name) { Param_t *param_list = this; while( param_list != NULL ) { if(strcmp(param_list->name,name)==0) { param_list->numberOfAccesses++; return atof(param_list->line); } else { param_list = param_list->next; } } fprintf(stderr,"In get_double_param, can't ...
1
c9e7f210e27f7e35f6715c4ac0e489e1
ed93304280f19cf99f196928cb01d545
切换建筑物楼层
if (XunluUtil.isEmpty(buildName)) { switchBuild(mMapShowBuildName, poi.getBuildId(), poi.getFloor()); } else { switchBuild(buildName, poi.getBuildId(), poi.getFloor()); } mPoiLayer.destroyLayer(); mPoiLayer.addPoi(poi); PoiDetailFragment detailFragment = new PoiDetailFragment(poi); mMapView.setCente...
1
079a35c69f113ca8d544e35d18358190
b1cde367acf57a4281dcc1b10eec0993
Writes list of search results as JSON nested array.
global $wp_query; $result = array('results' => array()); $query = isset($_REQUEST['s']) ? $_REQUEST['s']:""; if (strlen($query) >= 3) { $wp_query->query_vars['posts_per_page'] = $this->config->get('search_results', 5); $wp_query->query_vars['post_status'] = 'publish'; $wp_query->query_vars['s'] = $que...
1
0a71a1e5bf66c52875962ea330ee0131
7f226fe9eedcf3cb3d158bcdbdc10193
{{{ proto bool ZipArchive::getExternalAttributesIndex(int index, int &opsys, int &attr [, int flags]) Get external attributes for file in zip, using its index
{ int r; if (shared_check_locked_index(idx)) return(SHARED_INVALID); r = shared_gt[idx].attr; return(r); }
0
32fcebf832eaedc3917341401bdc9b6c
bdd6de4ee877d12dd11d8c09b276ec8c
If the value exists, use rule to validate. If not exists, ignore this rule.
{ $handler = 'validate' . $this->getLabel($ruleKey); if (method_exists($this, $handler)) { call_user_func_array([$this, $handler], [$ruleValue, $inputKey, $inputValue]); } }
0
a71e8000f11fe3185c2cf392a00ef00a
63d068c8470241c92c48141b5dd44c0b
Offsets the region relative to the current region. Generally the region's size should be the entire size of the texture in
gdk_region_offset (OGdkRegion *region, int x, int y) { int nbox; OGdkRegionBox *pbox; pbox = region->rects; nbox = region->numRects; while(nbox--) { pbox->x1 += x; pbox->x2 += x; pbox->y1 += y; pbox->y2 += y; ...
1
8ed5f5c2b67deeb5756699f0ff20c014
e59d68d72e7d608750066e1ea2ec610c
构造函数,设置标签名称
class Tag implements Parameter public function __construct(string $name) { $this->tag = $name; }
1
31cbc647e3fa149f1fd79f7a5861e64f
0f1968cc7d7d25c788cbe7af05239a9f
获取链接文档内容并保存
String testUrl=lawsDetailUrl; Document document=null; String fileContentName=null; try { document= Jsoup.connect(testUrl).get(); Elements elements=document.getElementsByClass("article-content"); String basePath=Decode.getBaseUrl(); String f...
1
29cce314f67c147958167a04a7ef7506
9a26e29b96bcc9100b422f5513312d73
Returns cached plaid token.
class Report extends Base private function getTokenCached() { return Redis::get(self::TOKEN_CACHE_KEY); }
1
56f12a267778f631b6e7ab0723d04caa
d0143edaf2ff836c43664a8c3c733aa9
Get a ConvertDirectoryIterator
if (!is_dir($path)) { return false; } return new \DirectoryIterator(rtrim($path, self::DS) . self::DS); }
1
b06c3ca0a445fa01c9e351f9fda14681
347599feb79fc0c1fc21a231f19d007e
flip about the horizontal axis
fn flip_hv(self) -> Self { self.scale(-1.0, -1.0) }
0
1bf956aff24f820f66c5d58855eff3c2
2862280aa00f4577f0d2711bddcaab49
Get Location time/date, latitude, longitude, altitude, accuracy and provider as strings Will provide information in the following order: Date (UTC), Date (human-readable), provider, latitude (degrees), longitude (degrees), altitude (meters), accuracy (meters), description Items are separated using ITEM_SEP which has be...
class ObservingSite(object): def getLocationString(self): result = [] result.append(self._tupleToDmsString("lat")) result.append(self._tupleToDmsString("long")) return " ".join(result)
0
1a846dd3830888dcdc1dc62ce2ae45f0
478600396a47ae9e33be93861cbcf292
Check only hh:mm:ss
function wg_datetime_checktime($time) { $time = trim($time); $hh = $mm = $ss = 0; if( preg_match('/^(\d{1,2}):(\d{1,2}):(\d{1,2})/',$time,$m)) list(,$hh,$mm,$ss) = $m; else if(preg_match('/^(\d{1,2}):(\d{1,2})/',$time,$m)) list(,$hh,$mm) = $m; else return false; $hh = (int)$hh; $mm = (int)$mm; $ss = (int...
1
a8d22c2d99699afbdacc120a1dec630d
90a6ed95af3c01c45d958e6b949d8110
Returns a score from 0-10 based on the aspect ratio of the bounding box Optimally a bounding box would have a 1:2 aspect ratio
def aspect_ratio(cnt) -> float: x, y, w, h = cv2.boundingRect(cnt) return w / h
0
eabfb327f4e2937ea0cb85bf412890bb
fb15f16358d947f444091567f189e27b
Creates clones of the given network. The clones share all weights and gradWeights with the original network. Accumulating of the gradients sums the gradients properly. The clone also allows parameters for which gradients are never computed to be shared. Such parameters must be returns by the parametersNoGrad method, wh...
def clone(output, replace=None, strict=True, share_inputs=True): inps, outs, other_stuff = rebuild_collect_shared(output, [], replace, [], ...
1
e32aaa0b20cc458a7ff2b2657c3df976
e0c4fee7c7200423db6fc91a84832c3c
delete either message or folder, based on where we are
function MsgToggleMessagePane() { let currentTabInfo = document.getElementById("tabmail").currentTabInfo; if (currentTabInfo.mode.name != "folder") { return; } togglePaneSplitter("threadpane-splitter"); ChangeMessagePaneVisibility(IsMessagePaneCollapsed()); SetFocusThreadPaneIfNotOnMessagePane(); }
0
bdecf3c3120d44c5fc33b87e11453cf8
1044d81dce1c8f04631359d8072fde3b
The ZeroMQ context object.
class ZMQContext public function __construct ($io_threads = 1, $is_persistent = true) {}
1
95c21112f931a9683fcb528ab3d281e4
2c24d8ece3a827d552eae49f3ed247d4
商机转移
function TRANSFER_RES(Action, CompanyId, ExtNumber, Ret, state, AgentData, jsonMsg, dataJsonNode) { if (Ret == 0) { AgentData.HugeUpSuccessStatus(); jsonMsg = OcxCore.cti.CTIServerImpl.generateRefleshUserInfoJsonMsgData(state, "转移成功"); state.Send("RefleshUserInfoAndButton", jsonMsg); jsonMsg = OcxCore.cti...
1
9da6857e0a5f31febcdb5a316ea26743
c632ee22960105f9792ee27d7e9d2f6d
y=ax+b에 a와 b 값을 대입하여 결과를 출력하는 함수
function t2p1() { var num1=document.getElementById("a").value; var num2=document.getElementById("b").value; var num3=document.getElementById("c").value; if (isNaN(num1) || isNaN(num2) || isNaN(num3)) { alert("숫자만 입력하세요!"); return; } var a=Number(num1); var b=Number(num2); var c=Number(num3); var...
0
f29ab6b65b44cdd26468752e8f1857b1
cd8d8f889c6032154c04d0925cbc4696
Map hash type to salt prefix.
abstract class AbstractHasher abstract protected function buildSalt($prefix);
0
b22f0e2514f137f9ca47e2206ed27e1a
59407c80b1621007a827a381c952cd4f
a.k.a. Grouping
function groupControls() { insertGrouping.call(this, '.x-axis', 'X-axis Limits'); if (this.filters.length > 1) insertGrouping.call(this, '.subsetter:not(#measure)', 'Filters'); insertGrouping.call(this, '.bin', 'Bins'); }
1
aad44739370078fb2d04a710d2d1d7f8
e73fbfbb97b2fe96fcf932ec59aab3de
Gets an HTML string containing a nice representation of the rider's destination list.
{ StringBuilder html = new StringBuilder(5000); if (( !thisStreet.IsStartAddressNull() ) && ( thisStreet.StartAddress > 0 ) && ( !thisStreet.IsEndAddressNull() ) && ( thisStreet.EndAddress > 0 )) { html.Append( thisStreet.StartAddress + " - " + thisStreet.EndA...
0
cd380fb6c5cef924a27af62899885bf8
f455de0c20bc0b3922aa5a7b7842094a
centering absolutely positioned element horizontally
function centerAbsElemV(elem) { var elemH = elem.height(); elem.css('top', (winH-elemH)/2); }
0
d387da0acfb30a7f3ca0f17b53520b59
67f19915eca70b2358bd9e73ade8cce4
Compare function to sort in descending order by bandwidth.
int cmp2(const void*a, const void *b){ return ((Node*)b)->w - ((Node*)a)->w; }
1
aba627c68d56ff24239f2599ed196249
bc9602d9c86ee700d1ccda0d8a0b9eba
Sets +value+ as a revision property named +name+ for +uri+ at +rev+. Both URLs and paths are avaiable as +uri+.
if isinstance(attr_name, URIRef): attr_name = rdf2attr(attr_name, True) return setattr(self, attr_name, value)
0
15264ed1f791b09d3b0aa315f5527a4d
e21d3ade9cb223a3e055ab223368f8c3
生成baidu渠道配置参数信息
{ $config = $this->config["baidu.services.{$name}"] ?: []; if (!isset($config['access_id']) || empty ($config['access_id'])) { $config['access_id'] = $this->config["baidu.access_id"]; } if (!isset($config['access_key']) || empty ($config['access_key'])) { $con...
1
5eb063203a871b33803cd0ec5866f38d
728b4e78b1cc9bd26885437644958d73
Чтение регистра из стандартной области памяти приёмопередатчика
{ Logger::log("DEBUG", "--> ", false); Logger::log("DEBUG", __PRETTY_FUNCTION__); Logger::log("DEBUG", " pReg = ", false); Logger::log("DEBUG", pReg); int8_t value = i2cReadByteData (handle, pReg); Logger::log("DEBUG", " value = ", false); Logger::log("DEBUG", value); Logger::log("DEBUG", "<-- ", false); Lo...
1
b9759c3d385dbb85ca29fd761ff113f8
6e0ecbd81417b5e97954f94cf0534f97
Download and return parsed metadata
status('Loading metadata from ' + url); try { var metadataJson = await fetch(url); var metadata = await metadataJson.json(); status('Done loading metadata.', '100', true); return metadata; } catch (err) { console.error(err); status('Loading metadata failed.'); } }
1
832bb764cbd932eb428d8bdceac560b1
0cb8cf2e7a05a581dd946846e84a2158
Indicate if events are being pumped (by a call to runEventPump).
public class EventManager : MonoBehaviour public bool isExecutingEvents() { return m_isExecuting; }
1
0391ca46e6f78020b3eff191d14cbb90
2c9be148cec0760e1df1c381ee13878a
Subscribe to global Connectivity activation event. Every activation will invoke subscribed methods.
namespace ActivitiesExample public class OSActivitySensor : IActivitySensor public Task ActivateAsync() { _sensor.ReadingChanged += new TypedEventHandler<ActivitySensor, ActivitySensorReadingChangedEventArgs>(ActivitySensor_ReadingChanged); return Task.FromResult(false); }
0
9a3ca4d7be1ac12bd0a7ecffd50603f8
ba8be2891c669c4d5ca27cf328e2c14d
Главная страница доступна любому пользователю
class SiteController extends FrontController public function actionIndex() { \Yii::import('application.modules.cabinet.*'); if(\Yii::app()->user->isGuest) { \Yii::app()->setImport(['user.forms.*']); } $this->render('index'); }
1
d7cbe9eff0da4a24d1cccb3fa5cb6af8
757cc2163292ed6ef21b319597157ed6
It runs the search from node s to node t.
for node in G.values(): node.visited = False node.previous_node = None node.previous_edge = None path_exists = False s.visited = 1 queue = Queue(maxsize=math.inf) queue.put(s) while queue.qsize() > 0 and not path_exists: temp_city = queue.get() ...
1
db49985f3c80c3885de0297f2ff4b132
3a96ff573bd33909dc2db7c2ba7a3dad
Verifica si hay incapacidades
$em = $this->getEntityManager(); $dql = "SELECT i FROM BrasaRecursoHumanoBundle:RhuIncapacidad i " . "WHERE i.codigoEmpleadoFk = " . $strCodigoEmpleado . " " . "AND i.cantidadPendiente != 0 "; $query = $em->createQuery($dql); $arIncapacid...
1
0fd33c465f7f38a456454c5587dd365f
8818e7f9d01a6fe65e06249140b4bf9f
Prints on the screen the style for writing on this window, foreground colour, background colour, and font style.
{ Colour colour = (getColour() == null) ? Colour.white : getColour(); return (char) (colour.getCode() | getStyles()); }
0
69d7730b465574f0eb6653989b2a5e7f
d63be53d57cbd0c00f484a9c49af12c3
读取指定列的数据,并且以字典的形式存在列表中
colums_list = [] if key ==None: key = "A" colums_listt_data = self.get_sheet_data()[key] for i in colums_listt_data: colums_list.append(i.value) return colums_list
0