query_id
string
corpus_id
string
query
string
code
string
label
int64
073218d2e5c84e8ffaf16a600c2087c1
f574a2c4e0dfbb8f2c8b1496a3e41ace
El metodo se encarga de reasignar todos los valores a los datos de todos los objetos Como hay un constante aumento de la dificultad, constantemente se estará reasignando tales valores, para que despues se vean reflejados en los propio objetos
Method [] metodosMolde = molde.getClass().getDeclaredMethods(); for (int i = 0; i < objectos.length; i++) { Method [] metodosTemp = objectos[i].getClass().getDeclaredMethods(); for (int k = 0; k < metodosMolde.length; k++) { if(metodosMolde[k].getName().substring(...
1
9cf8f1901a608455ee6554af37a2a390
08b562b2ccfcff1b07634eb6bc45c00a
Returns whether the implementation of the data interface supports schema 2 format manifests.
class SplitModel(object): def supports_schema2(self, namespace_name): return namespace_name in self.v22_namespace_whitelist
1
5db04070954206fcc7e801745341602d
bf6e7c660c7a36093b44628d2e946a02
获取收藏卡片列表
def get_collection(rk_user,params): return 0,{'collection':UserCollection.get_instance(rk_user.uid).get_collected_cards()}
1
bcc150418cf18a587409017258e55d8e
5826a198e972f836944f447d19b1fe5b
Does all of the formatting necessary for a call to a static method.
{ return [ sprintf( static::$propertyDeclarationFormats[ CodeFormatter::mapFlags( $this->isStatic(), (0 < strlen($this->value)) ) ], str_repeat(self::TAB, 1), ...
0
78e21b1b161792dd95a0b777a8cc85fd
693cc66ad1d12086ddca7bde41b630c4
Вернет все команды, заявленные на турнир
return DB::getAll(DB::T(DB::ROUND_GROUP), new DBCondIn('id', DB::prepGetAll(DB::T(DB::ROUND), new DBCond('regatta', $this->id), array('round_group')))); }
0
85c59e33da9cebcc42d6368b4b4d5768
92c366263f29215353f0c1f164523c7f
Relative humidity and wet bulb temperature as entered properties of the moist air.
class MoistAir(object): def DR(self): return self.dew_point_temperature, self.relative_humidity
0
a94f0709faf2457f5a15e06aa9458a00
f346b0997cc47a7abb650f7f021f3435
GIVEN crops with unequal chances of being planted WHEN I check whether their chances are equal THEN I find that they are not
class BoardTest extends PHPUnit_Framework_TestCase public function testDistinctGridsNotBoring() { $board = new \Life\Board(); $board->setGrid( array( array(1, 0, 0), array(0, 1, 0), array(0, 0, 0) ) ); $board->se...
0
a6461c9aed9e893afe565d8ee552a22a
139b62c3570b926e720f018c354fa656
Gets query for [[GroupMembers]].
if (!isset($this->configuration['entity_type'])) { throw new BadPluginDefinitionException('migration_group_d7_og_membership', 'entity_type'); } if (!isset($this->configuration['group_type'])) { throw new BadPluginDefinitionException('migration_group_d7_og_membership', 'group_type'); } $e...
1
5203c1df4f3816b84a06cf1077026bb9
fc1902c0b9eb55f1203f93dfd38460f8
instance. The host passes the plugin descriptor, sample rate, and bundle path for plugins that need to load additional resources (e.g. waveforms). The features parameter contains host-provided features defined in LV2 extensions, but this simple plugin does not use any. This function is in the ``instantiation'' threadi...
instantiate(const LV2_Descriptor* descriptor, double sample_rate, const char* bundle_path, const LV2_Feature* const* features) { Slide* plugin = (Slide*)calloc(1, sizeof(Slide)); plugin->srate = (float)sample_rate; return (LV2_Handle)plugin; }
1
1b515f1fc2c89a0c495c1e5bf2a1cf54
650aba9652b17e21c2e6cc4ed468e93a
Notifica os sysadmins de uma nova oferta cadastrada
public void novaProposta(Oferta oferta, Interesse interesse) throws RemoteException { System.out.printf("=======Nova Proposta========\n"); System.out.printf("==> Oferta de motorista %d para cliente %d\n",oferta.id,interesse.id); oferta.print(); int id_cli = interesse.id; int ...
0
5ec47ea578bebe000aaa88dac48653f4
6936b4620a1aeb4a9b8c0ca1f292d4d4
组件加载完后就让文字动
@EActivity(R.layout.activity_second) public class SecondActivity extends AppCompatActivity @AfterViews void onLoad() { tvText.setText(msg); }
0
058d24510d5f444e18132a3205ea8d17
852b0987a513bdbc41b86ec8db57f1e3
Calculates the mean value of a set of data in a specifiend interval
input_list.sort() length_list = len(input_list) if length_list == 0: return 0.0 lower_ind = int(lower * length_list) upper_ind = int(upper * length_list) if lower_ind == upper_ind: return float(input_list[lower_ind]) else: return np.mean(input_list[lower_ind:upper_ind...
1
5ce75a1805952a3730f267f6869da989
87e164905573587a808753a09ad9cf7b
Test launching a single post job that doesn't exist
class TestSshCommand(AuroraClientCommandTest): def test_ssh_job_not_found(self): (mock_api, mock_scheduler_proxy) = self.create_mock_api() mock_scheduler_proxy.getTasksStatus.return_value = self.create_nojob_status_response() with contextlib.nested( patch('apache.aurora.client.api.SchedulerProxy', r...
1
831339d9b75c70926bd154af0dce033b
6357b3d97f71941f6f62dfd840b3c636
设置ERP的自定义API地址
func SetAPIDomain(url string) { BaseUrl = url return }
1
7120ed91a52dc2039bd5092c60bf3389
0f4c28fd285853d295910e8f9c926033
Acquires the Windows audio input device name for a given GUID
read_access = wr.KEY_READ | wr.KEY_WOW64_64KEY if is_os_64bit() else wr.KEY_READ audio_path = r'SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render' audio_key = wr.OpenKeyEx(wr.HKEY_LOCAL_MACHINE, audio_path, 0, read_access) num_devices = wr.QueryInfoKey(audio_key)[0] active_last_used, ...
0
c2054436298c5ef41ebd1981728e7786
0888661a7787aa1d9d68228ef6d015f6
Test if a user cannot create a participant.
self._make_participant(external_id="MyTestParticipant1") response = self.client.get(url_for(PARTICIPANT_LIST_URL), headers=self._api_headers()) status_code = response.status_code response = json.loads(response.data.decode("utf-8")) content = res...
0
f0b7caa1b77477d0122f181e42c26575
be336defafe390b7a6ca4909b9427389
Загружает паачку картинок на сервер, попутно ресайзя их, если надо.
$res = ['original' => $url]; if ($sizes = static::getSizes()) { foreach ($sizes as $size) { $urlThumb = self::addPrefix($url, $size[0]); $res[$size[0]] = $urlThumb; \yii\imagine\Image::getImagine()->open($url)->thumbnail(new Box($size[1], $size...
1
7159cbdd9a963294a4ff4ca85ccd9743
920af10dd9436173ba349773750aaf3d
将单体对象转换成目标对象
{ Target target = default(Target); try { target = TinyMapper.Map<Target>(source); } catch (Exception) { } return target; }
1
166f38edd2b05e430e2b7868e04bffa4
5c1c0ef42801a533469171def2e23523
查询订单信息(分页) 将主表信息取出:(同时包含总记录数) 搜索字段:编号、销售人员、客户姓名 筛选字段:订单状态 通过查找Admin获得销售人真实姓名
int p = Preconditions.checkNotNull(pageNumber.getPage()); int r = Preconditions.checkNotNull(pageNumber.getRows()); PageHelper.startPage(p, r); return new PageInfo<>(this.mapper.GetByAdmin(orderNo, Status, name)); }
1
6679928ac1eac9fa873c70a20b02fc63
5432d48dbeda78b78a37bb939eb14948
打开ust文件,返回Ustfile对象
func lOpenFile(L *lua.LState) int { filePath := L.CheckString(1) file, err := os.Open(filePath) if err != nil { L.ArgError(1, err.Error()) return 0 } ud := L.NewUserData() ud.Value = file L.SetMetatable(ud, L.GetTypeMetatable(luaFileTypeName)) L.Push(ud) return 1 }
0
cfc39238cdaf76e7086560140206e929
62ee2ea1561445ec4bf008d1ec68f889
将大端字节序列转换为32位的正整数
public class NumberUtil public static int bytesToIntBig(byte[] src, int offset) { int value; value = (int) (((src[offset] & 0xFF) << 24) | ((src[offset + 1] & 0xFF) << 16) | ((src[offset + 2] & 0xFF) << 8) | (src[offset + 3] & 0xFF)); return value;...
1
3822687b19e5ff7cae19046e843bcab7
bbfa6ccca341ece9c4bb9fe6688b3f1e
Removes uninteresting keys from data
if data.has_key('contributors'): del data['contributors'] if data.has_key('truncated'): del data['truncated'] if data.has_key('in_reply_to_status_id'): del data['in_reply_to_status_id'] if data.has_key('source'): del data['source'] if data.has_key('timestamp_ms'): ...
1
c718ceb1fb77c23c446b059442f58a83
a88992b32296daa7cfc0dd8a98296171
Converts board into T/F table to simulate board
class QPlayer(Player): def to_state(self, board): return tuple([tuple([(x[0] != 0, x[1] != 0) for x in a]) for a in board.state])
1
52e7114ec99257a84021f50a158f3238
4ee611033f8da1a3891b7d7b2b791e32
Table Header ausgeben
$this->AdaptFont(10,'B'); $this->SetX($this->TableX); $fill = !empty($this->HeaderColor); if($fill) $this->SetFillColor($this->HeaderColor[0],$this->HeaderColor[1],$this->HeaderColor[2]); foreach($this->aCols as $col) $this->Cell($col['w'],6,utf8_decode(html_entity_decode($col['c'])),1,0,'C',$fill); ...
1
7648e6b0838e29e5145d24ce45046d57
ea80309eedda8140139b4fa55387235c
Reproduce kde2d function behavior from MASS package in R. Two-dimensional kernel density estimation with an axis-aligned bivariate normal kernel, evaluated on a square grid.
x_label, y_label, plot_kwargs, grid_points, save_plot=False, save_dir=None): if len(data.shape) != 2: raise ValueError("The dimensionality of data should be 2.") if data.shape[1] != 2: raise ValueError("The number of columns of data should be 2, but got {ll}.".format(ll=data.shape[1])) n_obs = data.shape[0]...
1
721fb8b93536a24a7bb59f0a1a29afa8
c9a6fad3ef7a0aff45fe50fa8c6f99b6
r""" Returns a string with all characters not legal in a css name replaced with hyphens (-). INPUT: - ``string`` -- the string to be escaped.
def to_name(value): def usually_hyphen(match): m = match.group() return m if m in (' ', "'", "ʼ") else '-'
0
55abfb8bb84734033f5b118d8a91876d
b6f91e0f3554a73461ff7639ab50d766
Automatically set the pipette offset.
self, location: OnDeckLabwareLocation ) -> LabwareMovementOffsetData: if isinstance(location, DeckSlotLocation): offsets = self._labware.get_deck_default_gripper_offsets() elif isinstance(location, ModuleLocation): offsets = self._modules.get_default_gripper_offsets(l...
1
dbbb7774ac8d9586cd3a6f5b8134e71c
3e547763a05965282cd65516acf71c45
function to rotate image 90 degree right
size = image.shape iLR = copy.deepcopy(image) h = size[0] w = size[1] for i in range(h): for j in range(w): iLR[i, w - 1 - j] = image[i, j] return iLR
0
90a42042168793b7b288146b8008097d
c40691f0be9ef01628776633afc381ab
Returns the value of the '<em><b>Crs Urn</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Crs Urn</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
public class CoordinateSystem extends IdentifiedObject public String getCrsUrn() { return crsUrn; }
1
5a2e983b3ee4f0e18ceeb3157026fc06
c68c97c8096b7ae882e98839fd587aea
Retrieves default action context from the controller.
namespace ComLib.Entities public class EntityRegistration public static IActionContext GetContext<T>() { return new ActionContext<T>(); }
0
ab0dc437c08f0b70b928a25d6b8d3a55
23a246ea490d467ee3b810ae53e8dd82
input: list_of_emojis_in_spans = [['💙️', '🙏'], ['💙️', '🙏','🔴'], ['💙️'], ['😀']] code: list_of_vals_in_common = get_list_of_vals_that_are_in_other_lists(list_of_emojis_in_spans) output: [("'💙️'", 3), ("'💙️', '🙏'", 2)]
list_1 = [5, 2, 1] list_2 = [6, 8, 2] new_list = [] for i in range(len(list_1)): pair_list =[] pair_list.append(list_1[i]) pair_list.append(list_2[i]) if pair_list not in new_list: new_list.append(pair_list) print(new_list)
0
716bc45c085312a1e797f496e8a6c4cc
6f2d265569ef1bd3110c3b8750fd2db5
if locals and locals.date exists, set the article date (overriding any date already set)
def get_article_date(article): if article['display_date']: return article['display_date'] return article['published_date']
0
cf7ca5799678e6e023f4b039b22f68b9
7bff73c7403da47913ff91539dc3e480
Checks if ProductDescription property is set
namespace Amazon.CodeGuruReviewer.Model public partial class RecommendationSummary internal bool IsSetDescription() { return this._description != null; }
0
1913217dd2314dc9460796d7f4d4ef7d
446671caadc907a2874d9dc6408f7ffd
更新订单商品数量(在原来的数量上加一)
OrderItem orderItem = new OrderItem(); orderItem.setOrderNumber(orderNumber); orderItem.setCommodityId(commodityId); orderItem.setCount(count); orderItem.setTotal(totalPrice); superMarketDao.updateOrderCount(orderItem); }
0
f4541e8dccd222389d394d49485e84d7
d439b27b0fa9154bdcb7238ae131a954
删除原文和敏感词的换行
with open(text) as f: alist = f.readlines() text_str = ''.join(alist) pattern = r'(\w*)-\n\n' text_str = re.sub(pattern,r'\1',text_str) return alist,text_str
0
332568984b323cb7ea71e83fc201675f
be4ff730d0f179fbc6763b68198fa766
Create an instance of {@link SendModeOneTaskByUserCodeWithRspRspCType }
uint8_t SendRlcUeCreateRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp) { uint8_t ret = ROK; RlcCb *gCb; RlcUeCreateRsp *ueRsp = NULLP; gCb = RLC_GET_RLCCB(pst->srcInst); RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCreateRsp)); if(!ueRsp) { DU_LOG("\nERROR --> RLC: Memory al...
0
490b470398964e100ee688d8d84678d0
89570fc062070844c7233df20e91edc0
To set the data of the prize related to the choice, when clicking on the prize in the previous activity
Intent intent = getIntent(); Bundle extras = intent.getExtras(); this.id = extras.getString("id"); this.importo = extras.getString("importo"); this.ente = extras.getString("ente"); this.modalita = extras.getString("modalita"); item.setGiorno(extras.getInt("giorno"...
1
90be245598fc35553f571c08be9fb138
fef008285a7fc487e4b7143d53600443
This function fills the whole unequal-parameter mu-tables up to the size of the current schubert context, after having activated the context if necessary.
int x, y, pos, lGamma; int nx = gptContext->nx, ny = gptContext->ny; double gamma; pos = 0; for (y = 0 ; y < ny ; ++y) { for (x = 0 ; x < nx ; ++x) { gptContext->gDist[pos] = x * x + y * y; ++pos; } } for (lGamma = 0 ; lGamma < gptContext->nGamma ; ++lGamma) { gamma = gptContext->gammaList[lGamma]; ...
0
23aa1b00482032e915d4704c59e3ae39
8552c51be185730637f936991daf973b
Update a sweep
bool CQLearningController::Update(void) { uint cDead = std::count_if(m_vecSweepers.begin(), m_vecSweepers.end(), [](CDiscMinesweeper * s)->bool{ return s->isDead(); }); if (cDead == CParams::iNumSweepers){ printf("All dead ... skipping to next iteration\n"); m_iTicks = CPa...
1
221d6e3557673f988c679d1b3d4b62a5
859cfb69891185ebb914f4b8a7d89cc2
Calculate the cost and gradient for logistic regression using regularization (helps with preventing overfitting with many features)
def regCostFunction(theta, X, y, _lambda = 0.1): m = len(y) h = sigmoid(X.dot(theta)) reg = (_lambda/(2 * m)) * np.sum(theta**2) return (1 / m) * (-y.T.dot(np.log(h)) - (1 - y).T.dot(np.log(1 - h))) + reg
1
e502b051a6c0574ba63adeadcc999f64
273fa48556a3b61dd7cba52af42bd0a8
设置屏幕旋转度数
export default class Map extends DocumentItem async setRotateAngle(angle: Dot): Promise<void> { let methodName = "setRotateAngle" let paramsTypeStr = [this.DOUBLE]; let paramsStr = [angle]; await this.invokeByParam(methodName, paramsTypeStr, paramsStr, this.VOID); }
1
3712972d84adf48acbd6ad24b4d75ad0
60e9808313855a5c51c22cc385294288
列表
struct List(Vec<i32>); impl fmt::Display for List { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let vec = &self.0; write!(f, "[")?; for (count, v) in vec.iter().enumerate() { if count != 0 { write!(f, ", ")?; ...
1
6e1ab8415c6b5dc4119b700ac19d9a87
6af967b943c1ccc1eadd4be133e858b8
Initializes the map between the event's id and the relative method
@@__map_events__ ||= {} if @@__map_events__[:map_id] != $game_map.map_id index_events end return @@__map_events__[event_name.downcase.strip] end
0
c0483be67e226cdffee405766b2cc917
d2835952a3b159f51175efb7af597741
Generate instructions to assign top stack value to the specified variable <p> Stack before: ... value <p> Stack after: ... variable
try { Entry e = table.lookup(sexp.getVariable()); int ll = e.getLL(); int on = e.getOrderNumber(); ScopeEntry se = table.getMajorScope(); if (se.getType() != MajorScope.PROGRAM) on += 2; generateCode(80); Machine...
0
243c5a7947c6013679dd0b2194073879
eac49ac70b24fda25c3e9121cfbc5d68
Determines the number of saves expected and maintained for the current profile by the save manager. PopulatesSaveMetas when called.
int getSavesPerInterval();
0
360e174cca0b925a47a9e99e88492aeb
ad44912dd47a9acbeffc70b77c4d2b98
CreatePatternBrush
void CBCGVisualManagerXP::CreateGripperBrush () { ASSERT (m_brGripperHorz.GetSafeHandle () == NULL); ASSERT (m_brGripperVert.GetSafeHandle () == NULL); WORD horzHatchBits [8] = { 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00 }; CBitmap bmpGripperHorz; bmpGripperHorz.CreateBitmap (8, 8, 1, 1, horzHatchBits); m_br...
1
05e6492c4648afaf3839b9bce6bb0735
08daefc98add7c8e59ac0d1d2c82fbf5
Eliminar usuario de listado de administradores
{ User::destroy($id); return redirect('/admin/collaborator')->with('status', 'El administrador fue eliminado con éxito'); }
1
c583f3eeb33732634123c7371dd00ecc
a410d44ffa372049332d2133994c25ea
@brief 録画が止まっていたら再度録画を開始する 実際には録画コマンドを30秒/回で送っているだけ
{ RECORD_CHECK(rec_info); if(rec_info->ucRecStatus == RCT_CLOSE) return rec_info->rec_stop_ret; while(rec_info->ucRecNext) { REC_DBG("wait next cmd finish\n"); vTaskDelay(100 / portTICK_RATE_MS ); } rec_info->ucRecStop = REC_NO_CHECK_FRAME; rec_info->ucIsRecording = 0; add_rec_cmd(rec_info, REC_ACT_S...
0
c7dc62cf902b609afdd19f2ca628b936
1f3ed86acd08756027f187ee1a90e43f
吧policy的json格式化成tree
if (data.response && data.response.length !== 0) { for (let j = 0; j < data.response.length; j++) { if (!data.response[j].value) { data.response[j].value = typeCheck(data.response[j].type); } data.response[j].mockName = data.response[j].rule ? `${data.response[j].name}|${data.res...
1
0019254aabc9dfceb191ed37b7442149
fd812580ddc04d9e9a54a7bfa6bb8073
Gets the name of the snitch used for the cluster.
String describeSnitch() throws ConnectionException;
1
b5618adde9c5174bcb1816058bff6bed
d36d1a66a2386feed78a6fc8408128b3
Provides key used for signing from extended metadata. Uses default key when key is not specified.
if kms == "" { return jose.ReadKey(name, opts...) } signer, err := newKMSSigner(kms, name) if err != nil { return nil, err } jwk := &jose.JSONWebKey{ Key: jose.NewOpaqueSigner(signer), Use: "sig", } switch pub := signer.Public().(type) { case *ecdsa.PublicKey: switch pub.Curve { case elliptic.P256(...
1
fc730ef6554ed9b7fff61877dec5153a
d0bb4248f4545701553980972d197241
Handle new notifications delivered by FCM. If notification has been sent by Chat Engine it will be serialized and sent to JS counterpart with 'CENReceivedRemoteNotification' event.
let data = JSON.parse(message.data); switch(data.channel) { case 'NOTIFICATION': switch(data.action) { case 'AUTH': Store.dispatch(UIActions.authenticated(true)); break; default: } break; default: } }
0
e49ccdc0481108c7aa32d970af1aa900
0e1bee6befbd71e4a9d6ad8f074b5ef3
Implements #GObjectGetPropertyFunc for FoText
void fo_external_graphic_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { FoFo *fo_fo; fo_fo = FO_FO (object); switch (prop_id) { case PROP_BASE_URI: g_...
0
2e1131265262cab9c6e9821493db1e8f
cbbb3eed5af5dff01273b2fbc8eed834
Рассчет текущего условия в корзине
function counting() { let currentAmount = 0; basket.forEach(function(item, i, arr) { currentAmount += (+item.count * +item.price); }); if (mainForm.elements.deliveryMethod[0].checked) currentAmount += 0; else if (mainForm.elements.deliveryMetho...
1
eb6b2f9443221a1d0a89909d3bf8357b
e546b50648fd883a40f37983bf11a8a2
拖动更新选中的地块模型的位置
public class OperateModelForm : BaseUIForm void Update() { if (!canApart || UIManager.GetInstance().IsVisible(ProConst.PRO_DETAIL_UIFORM)) return; if (Input.GetMouseButtonDown(0)) { ray = GlobalObj.mainCamera.ScreenPointToRay(Input.mousePosition); var layer = LayerMas...
1
e3077eda01176d565777d566aecd4087
452c329ddcd1ab32c9347e4f5267eaa1
A helper function to find whether a word can be found in the matrix
if (matrix == NULL) return 0; char matrixValue = (*matrix)[line][column]; return (line >= 0 && column >= 0 && (query == matrixValue)); }
0
6db2b78d53ea633ffa8a85a9f48ea209
962feddff64794487e00d1a486cdd56c
internal helper to check that 2 quaternions are almost equals ( modulo threshold )
external class Quaternion fun AreClose(quat0: Quaternion, quat1: Quaternion): Boolean
1
97e775fee1d5e9b43b0e6a030808b897
4ad1d3b04060f3e74d2f54c6648d43b3
通过id设置block的当前行
{ if($id) { $data = yf_set_update($info); $sql = "UPDATE ".$this->table('block')." SET ".$data." WHERE id='".$id."'"; return $res = $this->query($sql); } else { return false; } }
1
848b710e612c2497a00c60a0ee0f95ab
ae7d8729df5500b32c9ab204dd37eda1
性別名称リストを設定します。
public class Apl0004s05ParamDto extends ParamBaseDto public void setCustomerSexCodeName(String customerSexCodeName) { this.customerSexCodeName = customerSexCodeName; }
1
c1374d378aa795f3c3cfa198c4d777a8
982f1bdba4af589e665a52002d4d1f8a
@brief retirerCoupon to remove a coupon from coupons_
{ if( entry()->itemCode().asString() == PromotionServiceCoupon_ITEMCODE ) { str = NullString; return ; } str = entry()->itemCodeAsString(); const UInt strLen(str.length()); if (strLen > 6) { str = ISString( &str.data()[strLen-6] ); ISASSERT(str.length() > 0); } }
0
ca34c2c7828bd53bad9ff2ff87991bda
6f1718e0a878dcd7628a630677ac76a3
Sets the selected event group.
@Entity @Table(name = "evententity") public class EventEntity extends PersistentObject public void setEventGroup(EventGroup eventGroup) { this.eventGroup = eventGroup; store(); }
1
b8659608df6e54611eac68a15e54f39e
5cee191a00a5e04336c49b5ddf450f16
隐藏视频广告
void hideBannerAd();
0
bfd4dc28c47f6546a214ef9c655b7ade
b8053299fd0b586228d2c662c3719f05
Ensure stream create fails when it should
iERR status = read_value_stream(initial_stream, input_type, filename, catalog); EXPECT_NE(IERR_OK, status) << test_name << " FAILED" << std::endl; }
1
f280bc7750ee46d32b1f15b999dc43dd
f880b8c9ce654dcae53ca72625c45922
Pobiera wartość pola plikowego.
class FileField extends PhormField public function prepare_value($value) { if ( $this->file_was_uploaded() ) return $this->get_file(); else return false; }
1
77190bdab1e295a1fb389d4898816fb9
1dc9767b1127324aaee01c331f2e9a62
Nothing to do, since it's cyclic
void HaltIfOnWrongSide::End() { }
1
991b08ffa4abab5302e647ee7b45acf8
a25c0cb9938f6446f8f3c043c8b0ce09
left parenthesis expected
let x = &[ InfixToken::RightParen, InfixToken::LeftParen, InfixToken::Operand(3), InfixToken::Operator(Operator::Add), InfixToken::Operand(4)]; let y = None; assert_eq!(y, infix_to_postfix(x)); }
0
79502b08943c7025186d8587d6c74e7d
40bc850b04129cea64c306f0d9bf29cc
Test that course code search returns correct results for contains comparison
namespace CourseRegistrationManagementSystem.Tests public class ClassDaysTests [Fact] public void searchCoursesByThursdayTest() { controller = new Controllers.HomeController(); List<string> emptyList = new List<string>(); controller.CourseResults(emptyList, emptyL...
0
d08a15dc6350a5b7813216d4832d5231
59740c21144a092995f1f50f2f73616d
创建右击的菜单,设定每个命令的回调函数
function bindRightClickMenu(){ _this.rightClickMenu($(id).find('a'),[ {name:'添加同级菜单',fn:addItem}, {name:'添加子级菜单',fn:addSubItem}, {className:'line'}, {name:'编辑菜单',fn:editItem}, {name:'删除菜单',fn:delItem} ]); }
1
85ea7ea275db6c64c82fdb3cfbc6d3d3
512bf707a4e24d657cf7a52ac5508c8e
获取当前题目在题库中的位置及题目总数量 cy
locator = csslocator + ">tbody>tr" table_tr_list = self.driver.find_elements(By.CSS_SELECTOR, locator)[1:] table_text_list = [] for tr in table_tr_list: table_td_list = tr.find_elements(By.TAG_NAME, "td") row_text_list = [] for td in table_td_list: ...
0
9d3565191dac85894ee8645b1ebaae39
7952bcf43b960dff0b358a0ca89cd9b0
Creates a server for ADTP transfer protocol.
SCODE InitServerSocket(TAdecInfo *ptAdecInfo) { struct sockaddr_un sunx; int fd; unlink(ptAdecInfo->szSocketPath); memset(&sunx, 0, sizeof(sunx)); sunx.sun_family = AF_UNIX; strncpy(sunx.sun_path, ptAdecInfo->szSocketPath, strlen(ptAdecInfo->szSocketPath)); fd = socket(AF_UNIX, SOCK_DGRAM, 0...
1
b497517276b0d5f1aecf9232cd5e1dda
b5021880923482788ce13191b9bcd9fc
考场号输入格式验证
class Application extends \yii\db\ActiveRecord public function validateClassroom($attribute, $params) { if (!$this->hasErrors()) { if ($this->type == self::TYPE_SUSPEND) { return; } $secSelected = str_replace(',', '|', $this->adjust_sec); $cour...
0
4d1ce2ac14461d5fc9a77efa75c4e9aa
dd0652be3ea34ad91c169ea6d57c9e79
Статусы обменных товарных позиций, в котором должна находится хотя бы одна товарная позиция обмена, необходимые для смены статуса обмена
class ProductReturnState extends Model public function needOrderDetailStates() { return $this->belongsToMany( OrderDetailState::class, 'need_order_detail_state_product_return_state', 'product_return_state_id', 'order_detail_state_id' )->withTimesta...
1
523903e8f3f91adbce9b1c2ef8ed92f3
204e3218b2f32ba3be6cf681b638583a
Removes all data structure models and controllers.
class Framework: def Dismantle(self): self.logger.Info('Dismantle PyMVCS') self.serviceCenter.Dismantle() self.modelCenter.Dismantle() self.controllerCenter.Dismantle() self.viewCenter.Dismantle()
1
464cf14e9b9aa296bd345c13e28aaac2
b507b666f6e6a7bb59e06274eaac3209
this is the method that is called when the "new" keyword is used
class User: def __new__(cls, *args, **kwargs): print('in new') return super().__new__(cls)
1
d7a60ba4bc450dbd1158bcea6ded153c
84ed01bad5190276692283cbd88c9d39
Set timer intervals and the switch count.
nr_switches_active = new int[7]; for (int i = 0; i < valid_days.length; i++) { nr_switches_active[i] = 5; String day = valid_days[i]; this.data.put(day, new ArrayList<Switch>()); this.data.get(day).add(new Switch("night", false, "00:00")); this...
1
f3a9a7bde4adc070ef7d5306af06fed0
3ad503ca5db9b0a477208a4d312f9522
Generates predictions and attentions for a batch.
text_tensor, lengths, labels = batch text_tensor = text_tensor.to(self.device) lengths = lengths.to(self.device) labels = labels.to(self.device) if self.fix_emb: with torch.no_grad(): tok_embs = self.embedder(text_tensor) ...
1
2d8641f8fad0d7e96f4b15ff3596b8cd
c30036ebc5a30d5e882366426ee04a6e
Decode the kv encoding type from the schema info.
public int getEncodedType() { return encodedType; }
0
3affbb15bb22ef1417cf8bb9ac0cde79
a82bd5d218c6bed3b6733d834531a7be
Sets a style property of the content element to the passed value.
public class DocumentStyleImpl public void setStyleProperty(Element e, String prop, String val) { if (e == null || prop == null) { return; } prop = fixPropertyName(prop); if (prop.matches("^[A-Z]+$")) { prop = prop.toLowerCase(); } prop = JsUtils.camelize(prop); if (val == null |...
1
ca8dfe0a141e18688caaf36a0b4f1517
71ebd995334297829f47915dbab0edf4
获取当月第一天 unix时间戳
let now = new Date(); let nowMonth = now.getMonth(); let nowYear = now.getFullYear(); let monthStartDate = new Date(nowYear, nowMonth, 1); return this.getFormattertDateTimeStamp(this.formatDate(monthStartDate) + ' ' + '00:00:00') / 1000; }
1
d9f2ac9d100d1f6d9bf3b3601e23a98b
49f99470057bb4f8a6ac7c6ade95f5da
自动为业务数据中的人员创建账号
public class CourseController extends BaseController public void BatchBuildBusinessAppAccount() { int page = getParaToInt("page", 1); Long courseId = getParaToLong("courseId",0L); String courseName = getPara("courseName"); StringBuffer result = new StringBuffer(); List<Record> list1 = Db.query("select id from...
1
4241f8ea5c04afb313c5aaf48c07de16
d2d44ddd04658930024a420381fdfdbe
根据配置获取一个连接池<br> 如果只有一个server,则使用简单实现<br> 如果存在多个server,则使用分片实现
IRedisCacheClient master = new ShardRedisCacheClientImpl(masterServers, password, defaultExpire, opTimeout, transcode, newJedisPoolConfig()); if (slaveServers != null && slaveServers.length() > 0) { return new ShardRedisCacheMSClientImpl(master, new ShardRedisCacheClientImpl(...
1
3861504500d48d0ecbac8b1cab31274e
d4101fa35448e530b09a2b7a87593138
Set the tools to the correct values.
class DisplayCtrl( wx.Window ): def __set_tools(self): s = self.GetSize() try: mintime = self._prefsIO.GetValue('D_TIME_MIN') except Exception: mintime = 0.0 try: maxtime = self._prefsIO.GetValue('D_TIME_MAX') except Exception: maxt...
1
970ee7c977b3ec46f89570a6e79da4af
5698344b9118793c7255cc7249300ca7
Inverts the specified matrix. The return value indicates whether the operation succeeded.
namespace OpenTK.Mathematics [Pure] public static Matrix4d Invert(in Matrix4d mat) { Matrix4d result; Invert(mat, out result); return result; }
0
9d5b5d98d1158887ec475ef6c01d6dcc
98038a95e9d3231d1e50548c0ccf0b76
Установка длительности цикла ШИМ.
public class AssemblyHedge implements Strategy public AssemblyHedge setCycle(Long cycle) { this.cycle = cycle; return this; }
1
d07ef34373a0dd37e61b8819721a3f7b
0298abb6032a66fa1f59a0486ce54df7
根据所属房间查找灯
{ var result = _entities; result = result.Where(a => a.machine_room_id == room); return result; }
1
2752eaa531b5dd58570e5a95509931cb
e63237ee34e746f0101f4fe76f2295a1
○ アクターウィンドウ作成
@help_window = Window_Help.new @skill_window = Window_Skill.new(0, 56, 544, 232, @active_battler) @skill_window.help_window = @help_window @actor_command_window.active = false end
0
decfbe420d10440ba9013f0365fa2ab5
cb3beebf738d8e09c3397f3b593c6502
获取确定键内容
class GetData: def get_depend_key(self, row): column = int(data_config.get_data_depend()) depend_key = self.use_excel.get_cell_value(row, column) if depend_key == "": return None else: return depend_key
1
7e098a30f8c1f55d9927acd22bfab606
4d4da1915778f2c2523e2a84feb20949
implements abstract circle interface: used to setup the initial information so that the agent has basic knowledge about the level
namespace GeometryFriendsAgents public class CircleAgent : AbstractCircleAgent public override void Setup(CountInformation nI, RectangleRepresentation rI, CircleRepresentation cI, ObstacleRepresentation[] oI, ObstacleRepresentation[] rPI, ObstacleRepresentation[] cPI, CollectibleRepresentation[] colI, Rectangle are...
1
f9e435f19245b4e2192c5e56bf778830
e43b554aae21c3caa76cc9e7a6775ab2
1 channel 16-bit signed image remap.
namespace CSCuda.NPP public partial class Nppi [DllImport(gDll, SetLastError = true)] public static extern NppStatus nppiRemap_32f_C3R( IntPtr pSrc, NppiSize oSrcSize, int nSrcStep, NppiRect oSrcROI, IntPtr pXMap, int nXMapStep, ...
0
e484b5201bfca8d5a61ca6f2e750e4e6
9d388e176515b4b5462fd394097c4108
Test to make sure that songs come back ordered by track number
{ $song = $this->Songs->get(2); $this->Songs->delete($song); $result = $this->Songs->find('list', ['valueField' => 'play_order'])->toArray(); $expected = [ 1 => 1, 3 => 2, ]; $this->assertEquals($expected, $result); $result = $this->Son...
1
767f9ab7719379c4f94932371a19ef39
f4ec15b085491291c722e9e3d8dc04bc
商品购买热度在一天内的分布
people_orders = self.df[['account', 'ordered_at', 'order_money', 'quantity']] group_people_orders = people_orders.groupby('account')['order_money'].agg(len) group_people_orders = group_people_orders.sort_values(ascending=True) buy_times = Counter(group_people_orders.values) for k...
0
755cc0727c6199c4d245c997c472f4e8
597572625bf184f5f6774b6c9819b57b
Opens the search box, hiding the replacement components
export class SearchInstance implements IDisposable showReplace(): void { this._displayState.replaceEntryShown = true; }
0
b5b60e9983fb620ddc3733a3cd6706a7
6c9664ab5a03e7a9985622bd974fe7d8
Opens window with input field.
public class FileChooserWindow extends JFrame implements EnterPressedListener public void showWindow() { setVisible(true); fileChooser.getTextField().requestFocus(); }
1
909255f201a7128ea6e7d5e697f42a66
b7f310c4c972e80d2f2cb37aedb0d6b0
Mark a column occupied at a given depth in the row range
function ENTMAP:InsertColumn(x) table.insert(self[-1], x, 0) table.insert(self[0], x, 0) for i=1,self.H do table.insert(self[i], x, NULL) end self.W = self.W + 1 for i=x+1,self.W do for j=1,self.H do local p = self:Get(i,j) if p:IsValid() and self[p] then self[p].x = self[p].x + 1 end end end ...
0
dd9c73cde1eb8de19d9a7500a2e0b401
8fef4e0d01f7271fefdec22731154f89
彪出伤害数字
function PopupDamageBlock(target, amount) PopupNumbers(target, "block", Vector(255, 255, 255), 1.0, amount, POPUP_SYMBOL_PRE_MINUS, nil) end
1
d45556ba6f34d8af840735efda1f3d01
3a963ffea897ac29538bd4678666dea8
Execute the compilation of all files
class WrightLessCompiler public function start() { jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); $document = JFactory::getDocument(); $version = explode('.', JVERSION); $joomlaVersion = $version[0] . $version[1]; $wright = Wright::getInstance(); $style = $wright->getSelectedStyl...
1
e6e16c54ae36ba9ae5b058b60c165ecb
862897ee0d31a3bb1b986d37f2bf6a53
Returns the input table which has been selected by this parameter.
class MultiCompare(WidgetWithControlPanel): def get_inputs(self): return ['tables']
0
3e7a50d4473436a2b084a46eb01c9364
eb1f68829a0c189321c175cc7fddd00f
将流中数据收集到集合中
public class FileListCount static void readIntoCollection(Scanner s, Collection<String> c) { while (s.hasNext()) { c.add(s.next()); } }
1
855df0926859309e7cabad61cef102c2
e07436f40b7e13e30e0fdd947069f254
使用模型读取EXCEL数据
try: model = MASTER_MODEL query_mark = MASTER_NAME file = request.FILES.get('file_upload') fields_import = import_fields[MASTER_MODEL.__name__] joins = join_fields[MASTER_MODEL.__name__] result = importer.read_excel(request, model, query_mark, file, fiel...
1
c2577a5625043c0063522007422294d4
f383fae8def594ec7952866f47add615
Funcion que llama la consulta que inserta un instrumento en la base de datos
namespace Clima_dao.dao_Entities class instrumentos public bool InsertInstrumento() { return _insertInstrumento(); }
1