query_id
string
corpus_id
string
query
string
code
string
label
int64
ab8940af7a756c4159153b38b5b30899
6f653de4234fc911e0e18533525002cc
Fetches the unpreprocessed data
class DataHandler(ABC): def fetch(self) -> pd.DataFrame: pass
1
07686f7cece12f37b1aa3bb1d041f1f3
e074ebb9a12ab5dab3efe9e86bda5fbf
Initialize the auth guard.
class AuthController extends Controller public function __construct(Guard $auth, Registrar $registrar) { $this->auth = $auth; $this->registrar = $registrar; $this->middleware('guest', ['except' => 'getLogout']); $this->redirectTo = "/"; }
1
fbb6c37616a3a005ed71648d813dc0bd
973f6317ca9ae311af6fbfbdb0380bae
Returns the meta object for class '{@link org.imt.arduino.nonreactive.arduino.Delay <em>Delay</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FileConsumerType_initialDelay_feature"), getString("_UI_PropertyDesc...
0
cec8093126206b45ee7d75078d8ee82a
71c11b7b98fe7dae683f5db7d53b26b3
Set an option by its number value.
public function setOption(string $option_name, $value): bool;
0
cbd2c2d05139f5680dbe23bb69a87baf
6c73f09cb6a19e1ed7a452d078c9e9c9
Insert new record from modify action
{ if ($request->getMode()) { $this->updateSynchronizer($request); return; } if ($request->isEmpty('record', true)) { $recordModel = Settings_Wapro_Record_Model::getCleanInstance(); } else { $recordModel = Settings_Wapro_Record_Model::getInstanceById($request->getInteger('record')); } $recordMod...
1
3aaa7661ab196e7a1b7e1ca5e0938618
41a27d85c3c172f08dfb422277d7d8eb
アニメーションの対象プロパティを設定します。
{ if (animationState == null) { return; } switch (targetProperty) { case AnimationStateProperty.Speed: animationState.speed = propertyValue; break; case AnimationStateProperty.NormalizedTime: animationState.normalize...
1
8a5987f6fbdef99935ebfce85f3c415e
f11760dd39ba865b9564ace85fa03252
Sets organism taxonomic ID.
void xsetOrganismTaxid(org.apache.xmlbeans.XmlInteger organismTaxid);
1
fc37f9305bf0878731d7676e851ede20
24dd81f57afba4988b7787be0993b64e
前往大唐国境
local function GoToShangGuZhiDi(index) ErDaLuInit() Tools.click(815,265) ClickSuit.CloseBtn() repeat mSleep(5000) local x,y = FindFont.findFont("231,82") until( x ~= -1 ) mSleep(5000) Tools.click(970,255) Tools.click(837,505) repeat mSleep(5000) loc...
0
072eb9615a5c37dd05fda1d07e12f6e0
01fa81e5d7df4971a6bc0d899f29a107
Set the protection factor of this armor to the given protection The protection to set | canHaveAsProtection(protection) | new.getProtection() == protection
Update withPurgeProtectionEnabled();
0
7d02c9f8d25b2ff5f92bad21b446db65
2008fd84402cf6a9519aa8d455aa664e
Return true if parameter contains just white spaces.
def iswhite(inputstring): return bool(re.compile("\s*$").match(str(inputstring)))
0
e523e378ff7d7e73e6da1c7be9f88fbd
57bb740606fd4974e561873fc1619721
Calculates request signature string using Signature Version 4. http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
class Ec2Signer(object): def _calc_signature_4(self, params, verb, server_string, path, headers, body_hash): def signature_key(datestamp, region_name, service_name): k_date = sign(self._get_utf8_value(b"AWS4" + self.secret_key), datestamp) ...
1
0abd2b352c3dacdb6f80ebf806b507d9
4fe9df128ab7288d7c17639f64714af4
Set pointers to the player and the inventory of that player
public class player2inventory : MonoBehaviour void Start () { }
0
9485d39a50150786e424bd3626029c7c
17150be8d884395bccabc48f3ff6d419
Создаст объект указанного класса. Создаст объект, даже если конструктор private или protected
public class CommonUtils public static <T> T newInstance(Class<T> klass) { try { return (T) klass.newInstance(); } catch (Exception e){ throw new IllegalArgumentException("instance class[" + klass.getName() + "] with ex:", e); } }
0
bd00e1fe29de80759b18fee6e9feaea4
d6315a04d8419b309d584240644bab97
load the wallet (from a {crypto provider name}.wal file in the application directory) or create a new one if none was found
export class CoreRpcService extends Rpc public async loadWallet(name: string): Promise<RpcWallet> { return await this.call('loadwallet', [name]); }
0
6a443ffbc76f23a0498628b61425f3ff
ca9ef198a013b7f03cea10b4b197dc6a
批量添加用户测试答案
@ResponseBody public DefaultJsonBean batchAnswer(String ids) throws Exception { DefaultJsonBean defaultJsonBean = new DefaultJsonBean( Constants.JSON_SUCCESS, Constants.JSON_SUCCESS_VALUE); String[] accountIds = ids.split(","); accountIds = ArrayUtil.shuffle(accountIds); for (int i = 0; i < accountIds.le...
1
144729785d3f8602e7b4dcc2fc4a5f69
ccb083fbb19d80525565850c0207c3e8
Returns crops cost of an upgrade.
public int getUpgCost();
1
d76c018b9719c72a369265fc657d0e5c
e9b24cb14ebbbbf5a6e408d61aa28998
Marks the attendance or the presentation of a student.
public class Student extends Person public void setAttendance(boolean attendance) { this.attendance = attendance; }
1
027573b646597076adcaaf58e5f35ebe
27aa7215e1a418c5c08ee662cff61fdc
Filter list of stocks by category and brand of the products in the stock list
public ArrayList<StockVO> filter(StockVO low, StockVO high);
0
8208f14d16dfa25293e15a3497aeea57
b67e92fe7beca383f0d793eb7b4b0799
链表成对调换 1 -> 2 -> 3 -> None 2 -> 1 -> 3 -> None
if not head: return head pre = ListNode(0) pre.next = head p = pre while p.next and p.next.next: node1 = p.next node2 = p.next.next p.next = node2 node1.next = node2.next node2.next = node1 p = node1 ...
1
1740e52f16656d18dac62b33e6a8e7c5
db827a185bc1baa5e7ebff6a9cc173f7
Retrieves the email address of the referring affiliate
abstract class AbstractUserInviteBonus extends AbstractUserBonus abstract protected function getReferrer();
0
6af30d1c0e4f439739dd9128c9eaf2d1
def9d3a8851958ab86a97bde5fdfad1d
显示对话框的View的parent,如果想自己写动画,可以获取这个实例来写动画
public abstract class BaseCardView<T,PV> extends FrameLayout public PV getParentView() { return mParentView; }
1
3d2d3335e438080de826952936c88076
d46a77d071e9642e769a3f5be42f574d
LVM_MOVEITEMTOGROUP
void PPDB2UDBTabTableOrganizeBy::OnMoveGroupTop() { m_xCOG_DimensionGroups.MoveSelectedItemTop(); }
0
c7b99df95c4cac3b45170d2c3ebf47c5
e9cb3170c8f724545326d93792615972
Procedure : Initialise a pickup given only regen slot Input : uint16 Slot Number Output : uint16 Pickup Index (-1 or -2 error)
{ ST_ErrorCode_t Error = ST_NO_ERROR; stptiHAL_Slot_t *Slot_p = stptiHAL_GetObjectSlot_p(SlotHandle); stptiHAL_vDevice_t *vDevice_p = stptiHAL_GetObjectvDevice_p(SlotHandle); if (Slot_p != NULL) { U16 OriginalPID = Slot_p->PID; if (stptiHAL_SECONDARY_TYPE_NONE != Slot_p->SecondarySlotType) { if (!stptiOBJMAN...
0
d3d00d5e70f5a8ecd06154b320cbe96e
8dabfcda03311b09b3fd06d3eb1ae3db
Realiza o saque, calculando o adicional com taxa de saque
if (this.saldo < valor) { System.out.println("Seu saldo é insuficiente!\n"); } else { this.saldo -= valor; } return this.saldo; }
0
62bff648458d457ac6d2cdca6bfcabe7
1545055226f0d42f941687bca3a904c6
無形資產比例
return self.total_assets - (c_ratio.cash + c_ratio.tra_sec + self.s_term_loans_receivable + self.investment_and_other)\ - self.const_in_pro_acc
0
234de44826f6674c8cc5e159f4c5edfa
af7635b86a7fb8297edb035cbc9e9f4a
根据已选商品集合与最新数据根据id取交集
List<OrdConfirmGoodsExt> validGoods = new ArrayList<OrdConfirmGoodsExt>(); for (int i = 0; i < goodsInfo.size(); i++) { boolean isGoodsInGoods = false; for (int j = 0; j < goodsList.size(); j++) { if (goodsList.get(j).getGoodsId().equals(goodsInfo.get(i).getGoodsI...
1
d50c06df2d9bcf2ac744630981bf0789
b584af051e440191069fb769f2898b12
Get all <see cref="ITrigger" /> s that are associated with the identified <see cref="IJobDetail" />.
namespace Quartz.Core public class QuartzScheduler : MarshalByRefObject, IRemotableQuartzScheduler public virtual IList<ITrigger> GetTriggersOfJob(JobKey jobKey) { ValidateState(); IList<IOperableTrigger> triggersForJob = resources.JobStore.GetTriggersForJob(jobKey); var ...
1
a60d798201b8e9ff9de74313b4ed0ecd
38ce9451539b85e3a717b30cd2b58dea
Verify that a failed implicit refresh will not prevent pkg list from working properly when appropriate.
self.image_create(self.rurl, prefix="test") self.pkg("set-publisher --no-refresh -O http://{0}1 test1".format( self.bogus_url), su_wrap=True, exit=1) self.pkg("set-publisher --no-refresh -O http://{0}1 foo".format( self.bogus_url)) ...
0
4b3487b2bdad460c831932e63948d6f4
634d1685292eef609f186be596f4b09f
测试插件包权限控制
$config = [ 'authorizeByPrefix' => ['Admin'], 'autoClearCache' => true, ]; $object = new TestTinyAuthorize($this->collection, $config); $this->request = $this->request->withParam('action', 'any_action'); $this->request = $this->request->withParam('controller', 'Tags') ->withParam('prefix', 'Admin'); ...
1
e8a44efe6e3a9895b46e9ecf48512bc1
688f6724098645c83e830a6594652a94
This is a function that is a wrapper for running the AdaBoost Algorithm.
adaboost_clf = AdaBoostClassifier() y_pred = adaboost_clf.fit(X_train, y_train).predict(X_train) check_cross_val_score(adaboost_clf, 'adaboost_clf', X_train, y_train) return y_pred
1
af9e92eec19ed0176794c03729c02030
3380395507ff5a0e2ed6b189691c8bbe
获取项目中已完成Todo的数量
finishedCount(state) { return state.todos.reduce((prev,next)=>prev+(next.finished?1:0),0) }
1
b24787c1706010507dbedf3c586c8b04
16959bf39eec7b9637c9a06d951dcb20
@brief Sends Configuration Bytes to codec via I2C
{ reg = reg & 0x7F; HAL_GPIO_WritePin(ICM2_CS_GPIO_Port, ICM2_CS_Pin, GPIO_PIN_RESET); HAL_SPI_Transmit(SPI_BUS, &reg, 1, 50); HAL_SPI_Transmit(SPI_BUS, pData, Size, 50); HAL_GPIO_WritePin(ICM2_CS_GPIO_Port, ICM2_CS_Pin, GPIO_PIN_SET); }
0
bd79800b12ee1eba917b050eda160460
704eba3b3435888e2182ab5d5b6df242
三角形数据转换为多边形数据
public sealed class EvacuateAreaTool:MonoBehaviour private List<Vector3> SplitPolygonToTriangles(List<Vector3> points) { List<Vector3> vertexes = new List<Vector3>(); List<Vector3> triangles = new List<Vector3>(); vertexes.AddRange(points); while(true) { if(vertexes.Count < 3) { break; } if(v...
0
6c53c8e436b106aa7737391db4b87bf5
a6fb23b3717763652e7dd7adca8926f1
Handles the zooming of any trace.
{ BaseTrace _trace = (BaseTrace)_item.RowObject; if (_trace == null) return; switch (_trace.ScanMode) { case ETraceScanMode.None: if (_trace.ScanParams == null) { if (MessageBox.Show(String.Format(Locale.no_scan_params, _trace.Name), Locale.question, MessageBoxButtons...
0
37a0cc26331b0a46ffcb1175e6fdb6a3
858e16a3af52b6dfa55929f9ac6fb67c
保存实时预览数据。
@Repository public class RealDao extends BaseDao<DataViewReal> public void save(DataViewReal dataViewReal) { realRepository.save(dataViewReal); }
1
37df990e71e5bfae3ba462acdb86e3e4
1aac05bd4daa610393e3633eb2c07044
当所有投出的票数等于应投票数时,表明选举结果已经决定
{ if (_collector.Count == mVoteSize) { _collector.Clear(); return _collector.All(x => x); } return null; }
1
a222fac4ec8c02c7f88413664891ffde
3e7ba3470e24589bf18b9a9e57fb9667
Dispatches the local available storage and updates the channels utilities
try { _loadStorage(); } catch (E) { _storage_available = false; return; } _handleTTL(); }
0
ca13bb17321c39778b1325eab55883b7
178239015596c480dfd103ecdb5eeda9
Creates a default stencil buffer.
{ m_HasStencil = hasStencil; m_UsesPosition = true; m_UsesNormal = true; m_UsesColor = true; m_UniformComplete = 0; m_UniformRadius = 0; m_UniformWidth = 0; m_UniformScreen = 0; m_UniformShade = 0; m_UniformAlpha = 0; m_UniformWorldViewProj = 0; }
0
04dd4f5cf95f5a21c5b77381f10be91c
7c1f48a9ed4697d12e9ec5ad67a0f36d
Show success animation.
class TinyDialog(QtWidgets.QFrame): def showSuccess_(self, msg): self.bgBrush = self.successBrush self.showMessage(msg)
0
d2875b00daa33589a50f5b2afe12617e
e93e5b7cadee4ce886af78294bf74288
Get the top tags applied to an album on Last.fm.
class Resource(API): def get_tags(self, *args, **kwargs): artist, album, mbid = _album_arguments('get_tags', args) resp = self._request( 'GET', 'album.getTags', params=dict( artist=artist, album=album, mbid=mbid, ...
1
5ff0e99cfa295e6e40fdcadbea7c3df3
8693753897c469d1622d66f54ffd85d3
Sets up a ball collision to the wall and checks if the ball's velocity is updated correctly
public void gravityThreeBallTest() { Ball ball = new Ball(new Vect(0.0, 0.0), new DoublePair(10.0, 5.0)); Ball ball2 = new Ball(new Vect(0.0, 1.0), new DoublePair(12.0, 5.0)); Ball ball3 = new Ball(new Vect(1.0, 0.0), new DoublePair(0.1, 0.1)); List<Ball> ballList = Arrays.asList(bal...
0
c09cb58a650ec1ad6a7c8e0b483552ff
854a5fb56d4325bd1ab355d70decc79c
Current source : Ixxxxx node1 node2 <<DC> value> <<AC> value> <<TRAN> func>
{ if (Ar_System_checkFlag(SysF_DeviceInitialized)) { const char *recv_lex = (char *)&pkt[MCUPKT_BEGIN_DATABLOCK+1]; if (Ar_Lexicon_isEqual(recv_lex, lexicon.source.out.EvtFalse)) { power_setFlag(PF_AC_Ok, FALSE); bAC_Ok = FALSE; } else if (Ar_Lexicon_isEqu...
0
a8bb3e81b10bb98bd558ecd7c2b567df
71f03f2fb42285ecf06e390120542060
Function to test whether the current DB user is a DIRBS power user.
ESXOracleSemanticFunctions::IsDatabaseLinkCurrentUser(const GDMObject & rxObject) { CFXValue xValue; Success_e eRet; bool bDatabaseLinkCurrentUser = false; eRet = rxObject.GetProperty(EMXTypes::pConnectionType, xValue); if ( eRet == kOk && !xValue.IsNull() && EMXTy...
0
3ef025951bd8d0f6a9947c2e7a8496a6
303bf03417b1ee84d9d549c52549c085
Make the bin width to unitary
for hist in self.hists: for ibin in self.hists[hist].bins(): if width is not False: ibin.value,ibin.error=self.hists[hist].integral(xbin1=ibin.idx, error=True) ibin.value/=(float(width)/self.hists[hist].xwidth(ibin.idx)) ibi...
1
6ba0b704bf3b41434a95c6d1ab73419a
0a65ba785aa5c5670cc450d0f9583b7b
Plays the looping space ambience track.
audioUrl = self.GetEventNameFromSlimItem(defaultSoundUrl) if audioUrl is None: return audentity = self._GetGeneralAudioEntity() if audentity is not None: spaceobjaudio.PlayAmbientAudio(audentity, audioUrl)
1
d375f753b36b1b453f41d5bdbd50f650
3a2c4ba2e6452c7139fa91e32c51e258
Get Litecoin Available in the account
context = GetContext() in_circulation = Get(context,in_circulation_key) available = total_supply - in_circulation return available
0
52fc0dbc3b3a9719ca576544be3fa642
802c03a806b8f2c9c921084342849001
Evicts token from cache
public function destroy($token);
1
5acf842e1127b2928232ac46c1a9ddb1
06282d1ce6bb3e51881c5484bc823b95
Called when any main menu button is pressed
{ if (ObjectManager.Player.IsDead) { return; } if (Variables.Menu.Item($"{Variables.MainMenuName}.defensives").GetValue<bool>()) { Defensives.Execute(args); } if (Variables.Menu.Item($"{Variables...
0
a56ca7cbd0714b246bfa5ad8a36356cb
b52ab55512ed7f033636074aae985b05
删除产品价格政策
{ $id = (int) Yii::$app->request->get('id', 0); $model = ProductPrice::findOne($id); if(!$model){ $this->exception(Yii::t('common', 'Illegal Operation')); } $product = Product::findOne(['id' => $model->product_id]); if(!$product){ $this->except...
1
722c481e1ae469d03f042b71775a8918
be0c53ea015cb063a4591dca11e19e45
Search a dictionary using keys provided by the search string. The search string is made up of keywords separated by a '.'
def search_dict(target_str): global dictionary_list return word_search(target_str, 0, len(dictionary_list) - 1)
0
f180295bfb9fe29e09357937de7ffb8d
d0148827e8d463f7427603566c960bd1
A RTO company has many company messages
class RtoCompany extends Model public function company_messages() { return $this->hasMany(CompanyMessage::class, COMPANY_ID); }
1
e1696e7eba48a2406c1d817cb5b06b3a
72f081324107d02ab1de789a9ffa632a
Float类型保留三位小数的方法
function returnFloat(value){ var value=Math.round(parseFloat(value)*100)/100; var xsd=value.toString().split("."); if(xsd.length==1){ value=value.toString()+".00"; return value; } if(xsd.length>1){ if(xsd[1].length<2){ value=value.toString()+"0"; } return value; } }
0
9ccb553185039f1a2fff676b5e6d68fd
7c9f3201e00feed86259b79d46fb6098
Convert double-precision floating point value to IEEE 754 binary format.
{ int shift; unsigned long sign, exp, hibits, hilong, lowlong; double fnorm, significand; int expbits = 11; int significandbits = 52; if(x == 0) { hilong = 0; lowlong = 0; goto writedata; } if(x > DBL_MAX) { hilong = 1024 + ((1<<(expbits-1)) - 1); hi...
1
06b3cb7419f47176b2bf23565b4eb61a
1e01f783952917bcf793ad42e4c06e98
Take screen controls from the form and store them in a standard format that the player will understand. https://github.com/concerto/concerto-hardware/ wiki/Player-API#screen-onoff-times
class Player def describe_screen_on_off rules = [] if self.screen_on_off.blank? rules << "On/off times not configured. The screen will always be on." elsif self.always_on rules << "Screen is always on. Click 'Edit Player' to configure "+ "power-saving screen controls."...
0
e7804fb19e5894f21fc98338d5a3f072
bd490ccc671030f745c4d65f99c8db27
Change type for areaid config.
this.areaConfig = { clear: !this.areaList.ids.length, handledCheckedFun: (event: AlarmSelectorInitialValueModel) => { this.areaList = event; } }; }
0
b971d89ffe07592881ae913ad92b6e5e
4a7b3ecf86e07214e50f92542fd0821f
Unrelates an asset from other assets by public IDs. resource_type/type/public_id. <a href=https://cloudinary.com/documentation/admin_api#delete_related_assets target="_blank"> Admin API</a> documentation.
{ return $this->keyValueStorage->delete( self::generateCacheKey($publicId, $type, $resourceType, $transformation, $format) ); }
0
d5b6401c28d66e79a64b5fa3a2ba62c1
09137fe1e868b70458240b45dedc0ed5
Détection automatique de la langue du navigateur
function detectDefaultLanguage() { global $supported_languages; if (isset($_GET['lang'])) { $key = array_search($_GET['lang'],$supported_languages); if ($key) { $_SESSION['lang'] = $supported_languages[$key]; } else { $_SESSION['lang'] = 'en'; } ...
1
cea9ff129eaa3d76b6b2e18373380ec6
88db4669f636301d5a90b9a55b8a7cf3
Builds the DOT source for the diagram. if you're only interested in the output image, use generate_diagram() instead.
public class StateSpaceDiagram extends DirectedGraph<StateSpaceNode> public CodeBuilder generateDot() { if (dot == null) { dot = new CodeBuilder(); dot.pr("digraph G {"); dot.indent(); if (this.loopNode != null) { dot.pr("layout=circo;"); } dot.pr("rankdir=LR;"); if...
1
ee9cc17486fdb52abe532e3d6d3e8010
49e7c35f468647e5ab72c5f6f97379a3
开始清场,npc以四倍速度加速逃离战场
{ auto eventDispatcher = Director::getInstance()->getEventDispatcher(); for (unsigned int i = 0; i < 3; i++) { eventDispatcher->removeEventListenersForTarget(m_npcSp[i]); } m_pStageScene->getRoundUINode()->stopReadEffect(); m_pStageScene->getRoundUINode()->endReadTopic(); ...
0
4831d63113ffb2992710253b771a4fcf
9ea52c32983f7287eb79c8f7d9b8ee74
adds all packages to the {@link WebArchive}. The packages added recursive, that means all sub-packages are also added.
void packageSources(OutputStream output) throws IOException;
0
1a1faa831c89e8ba40f1c3ce6d5c220f
b98f3c81445ef2b5b0962e7f1fcec72f
Add person to film (client input).
$this->form_validation->set_rules('name', 'Name', 'trim|required'); $this->form_validation->set_rules('country', 'Country', 'trim|required'); $this->form_validation->set_rules('age', 'Age', 'trim|required'); $this->form_validation->set_rules('picture', 'Picture', 'trim|re...
1
1f355b5b87b8defc4ac43c2729c171fd
c816c6b769ce286b23ed7c8ec5ad67f7
NewNotFound returns an error which wraps err that satisfies IsNotFound().
func IsErrorNotFound(err error) bool { var notFoundError *iamtypes.NoSuchEntityException return errors.As(err, &notFoundError) }
0
c69dc9a3d49bb3c6069b9cf2d71da6bf
58fb405fa9441a1f6a53419c0ca25673
检验代理的格式
if (empty($request->input('organization_name'))) { return self::res(0, response()->json(['data' => '请输入代理名称', 'status' => '0'])); } if (empty($request->input('realname'))) { return self::res(0, response()->json(['data' => '请输入负责人姓名', 'status' => '0'])); } ...
1
33e9ac46b606f4bc23c57593326c4967
876f86784cc779e716a139c481281ca7
Set value of DirectSubTaskRequestAssignedToMe
public class CsclApproverMappingWrapper extends BaseModelWrapper<CsclApproverMapping> implements CsclApproverMapping, ModelWrapper<CsclApproverMapping> @Override public void setAssignedTo(long assignedTo) { model.setAssignedTo(assignedTo); }
0
f5f425f1b17bf5569b17929b3fcc3a99
27209e94ff19ba51ec039e7be9cc7e6d
Gets the linear direction for this plugin options object. This option will be one of: "left", "right", "up", or "down".
String getDirection();
1
1a988641f1fac5637405d23992f42c41
e1d0d6b7ec83b8720ff059551c57318d
Allow this feature only in administration
{ if (!JFactory::getUser()->authorise('core.admin')) { throw new Exception(JText::_('JERROR_ALERTNOAUTHOR')); } parent::__construct($config); }
1
ed9d17591f1fbb10e7240c0a36038454
29c2a9f13ad0045ce8060ac21092b46d
Тест проверяющий visible таблицы с подсказками
{ var tooltipText = driver.FindElement(By.CssSelector("input[class='gLFyf gsfi'")).GetAttribute("title"); Assert.True(tooltipText.Equals(tooltipExpected, strCopm), $"Ожидаемая подсказка {tooltipExpected} не соответствует полученной {tooltipText}"); }
0
d2493405440404ceec48905ad54e3f80
57655938039d48be78aaac385159702d
第四步得到个人主页的HTML,解析出源码中的图片的链接地址,再次发送request请求,并将结果写入到本地文件
html = getHtml(url) getMainImg(html, savePath) print "----------------------------------------------------------" desurl = descUrl(html) desurl = "http:" + desurl[0] print "desurl = " + desurl desHtml = getHtml(desurl) output = open( savePath+"/url-desHtml.htm" , "w") output.write(de...
1
a0b7266e3422484264b9165e4d972929
abbd3c9376fe4a04373dec3a49f70759
Unit test case for :py:method:`AsyncReduce.__call__`.
items = [] f = ensure_future(consume_async_generator( _async_generator(), lambda: False, items.append)) get_event_loop().run_until_complete(f) assert items == [2, 11] assert f.result() is None
0
d4ce6b446b7689ee2600b83253df3a88
d49829f5ccf96876374b7044304d5f6a
# Если есть подраздел, возвращаем наименование подраздела
$alias = $this->aliasSets[$params[0]][$params[1]]; if ($alias !== null) return $alias; $s = $this->_common_obj->get_subgroups($params[0]); foreach ($s as $sub) { if ($sub["SubNameEng"] == $params[1]) return $sub["SubName"]; } }
1
88852b81d8e9f72eb39e8650a5d2d2e3
7ee789b2ad92867df5e8525647304b22
takes the forms input, validates it and starts a new session for a customer.
def process_signup(): username = bottle.request.forms.get("username") password = bottle.request.forms.get("password") verify = bottle.request.forms.get("verify") email = bottle.request.forms.get("email") errors = {'username': cgi.escape(username), 'email': cgi.escape(email)} if validate_signup(u...
1
0c6f47382962c88c161b1fda9728c8a5
21c1b8d16db95108091b5e7cccc26695
ukrycie wszystkich używanych paneli
namespace KrestikiNoliki static class Drawer public static void CleanAllMoves() { panel1.BackColor = System.Drawing.Color.Silver; panel2.BackColor = System.Drawing.Color.Silver; panel3.BackColor = System.Drawing.Color.Silver; panel4.BackColor = System.Drawing....
0
c2abedb63ea2bcff31f23ade9cb8fd30
f8d08fdcbfd44690af95b85909e733ac
Метод для привязки событий к контекстному меню кандидатов
document.addEventListener( "click", function(e) { var clickeElIsLink = clickInsideElement( e, contextMenuLinkClassName ); if ( clickeElIsLink ) { e.preventDefault(); menuItemListener( clickeElIsLink ); } else { var button = e.which || e.button; ...
1
f120e22d2f22f2e1e331e780f4c18d46
80356a155a4116de4569d654137a6d30
Simulates a mouse middle-click at the current mouse position.
{ var inputList = new InputBuilder() .AddMouseButtonDown(MouseButton.MiddleButton) .ToArray(); SendSimulatedInput(inputList); return this; }
1
df230e0d5c8abd3242bcabc8d1725ad2
3265f3ad459f164fd3fed9978dd50058
Tests sparsification of several vms at once.
class TestScale(BaseScaleTest): def test_scale_vns (self): self.n_tenants = 16 self.n_ipams = 1 self.n_vns = 1024 self.n_policies = 0 self.n_vms = 0 self.n_sgs = 0 self.scale_test_common()
0
170c5871c494ba0dd98ad5df087409e0
4b4de394d8c5e941fbe362c72439d0ef
Button to switch to Login panel from the New User Registration panel.
public class Launcher extends javax.swing.JFrame private void exitLoginMouseClicked(java.awt.event.MouseEvent evt) { signUpPanel.setVisible(false); signinUNamePanel.setVisible(true); passcodePanel.setVisible(false); passCodeField.setText(""); }
1
f6345963cd444725c95ba7f1ca81988c
e1631df5002ffaff02abd608aae011fd
Sets the ImageView position on screen. This ImageView is the one that creates the illusion of dragging the marker.
class PopupArrowBackgroundView : FrameLayout fun setArrowPosition(x: Int, y: Int) { arrowXOnScreen = x arrowYOnScreen = y arrowPath.reset() }
0
b662dc6ed87b61f683c023822e7e12c5
9cbbeee8ef11d39b4eecae685d5fabd7
深拷贝的构造函数,使用新的内存来存放对象other的成员变量name所指向内存的内容
{ this->_name = new char(*other._name); this->_salary = other._salary; this->_department = new char(*other._department); }
1
e5ce994e42682280ec73cf490ac6cb5e
ac0c6624cd18eebbe8c485c5f7049eb4
增加墨魂技能熟练度(单个)
function BT_ACT_NORMAL_INCREASE_SKILL(self, state, btree, prop) local num = GetExProp(self, "SKILL_ORDER_NORMAL"); if num == nil then num = 0; end SetExProp(self, "SKILL_ORDER_NORMAL", num + 1); return BT_SUCCESS; end
0
7d5678c76222779e7fc719ebf00205de
c254fe9b0e297adb0eb0c7ba1a9e9f46
Constructs a doubly linked list element with the specified values.
LinkedListNode::LinkedListNode(bool value, LinkedListNode* next, int index) : value(value), next(next), index(index) { }
0
30bb4673c2449b7a3865a0ff239f2188
4865891aa4f1debe9542bf5f174f4237
Adds a frame to the requested animation state
namespace Game namespace Animation public class BaseAnimationState : MonoBehaviour public void AddAnimation() { }
0
bc205f9dc5a42fe3fdfcd5e5b56dcbfb
bd826fe0f53fe254ad25578993b8f75a
获取打赏次数和打赏总金额
class AwardModel extends AdminbaseModel{ public function getAwardAmount($detailId,$user_id){ $pd_data = $this->planDetailModel->where(['apd_id'=>$detailId])->field(['fk_as_id'=>'as_id','fk_ap_id'=>'ap_id'])->find(); if (!$pd_data) return false; $iniResult['priceNumber'] = M('award_subject')->where(['as_i...
1
9cca3fe7acaafbb8d39a0ea3c940053d
90544b9fe0190a1e8134fa94e26c318e
Проверяет роль фрилансера
{ $types = [ MerchantUser::ROLE_SLAVE => 'Администратор', MerchantUser::ROLE_MANAGER => 'Менеджер', MerchantUser::ROLE_SELLER => 'Продавец', ]; if ($this->role == MerchantUser::ROLE_PRIMARY) { $this->role = MerchantUser::ROLE_SLAVE; ...
0
e72841de73dee4907a50a940da98f2bc
25bcfa5a6a2c0e7e1fa122240ea838e5
发送下订单的请求给服务器
String str="["; for (GoodsBean.Result result:aList){ str+="{\"commodityId\":"+result.getCommodityId()+",\"amount\":"+result.getCount()+"},"; } String substring = str.substring(0, str.length() - 1); substring+="]"; Map<String,String> map=new HashMap<>(); ...
1
c4e1831261de80e74fe2e690f44bda40
b2ec3f88bd4daf94ae549400bec691c8
Returns the meta object for the containment reference '{@link ca.queensu.cs.mase.urml.LessThanOrEqual#getLeft <em>Left</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getEquality_Left();
0
3424b6702efc3da54718971d5e0ca49a
2382df845035b7dd4b3896030bde861e
Commit this :class:`_asyncio.AsyncTransaction`.
class Transaction(object): def commit(self): while self._deps: self._deps.pop()._invalidate() if self._write or not self._cache_spare(): rc = _lib.mdb_txn_commit(self._txn) self._txn = _invalid if rc: raise _error("mdb_txn_commit", rc) ...
0
f2636c05280ae253f1a5d9a6b941a480
46713e66076752d6474952c8eea50af5
Creates an XMPPAddress local to this server.
func xmppUser(senderId string) string { return senderId + "@" + xmppHost }
1
b030423a6f0729453555dff474d8c998
0b2a34aecff328ac0d966ab12c1d0104
We only mask off bits that are RES0 both for AArch64 and AArch32. For bits that vary between AArch32/64, code needs to check the current execution mode before directly using the feature bit.
match ffi::_ND_EX_CLASS::ND_EXC_None { ffi::_ND_EX_CLASS::ND_EXC_None => {} ffi::_ND_EX_CLASS::ND_EXC_SSE_AVX => {} ffi::_ND_EX_CLASS::ND_EXC_EVEX => {} ffi::_ND_EX_CLASS::ND_EXC_OPMASK => {} ffi::_ND_EX_CLASS::ND_EXC_AMX => {} } }
0
10a9b64c360c755bd7a11fb9712590be
cb0e09a1d3073972021b099a41772f8f
INPUT: The fully featurized dataframe OUTPUT: A 'search dataframe' that will be used to find neighborhood-level price medians as well as nearest-neighbor medians for single, user-submitted listings.
all_df = pd.DataFrame(index = df.index) all_df["LotFrontage"] = df["LotFrontage"] for key, group in lot_frontage_by_neighborhood: idx = (df["Neighborhood"] == key) & (df["LotFrontage"].isnull()) all_df.loc[idx, "LotFrontage"] = group.median() all_df["BsmtFinSF1"] = df["BsmtFinSF1"] ...
0
a2bd3a227382c1d1e9da60decf1b4107
1985797fa31272825177b4730b3dfc94
更改用户订单
{ return self::where("order_id", $user_id[6]) ->update([ 'order_number' => $user_id[1], 'product_name' => $user_id[4], 'created_at' => strtotime($user_id[5]), 'updated_at' => strtotime($user_id[5]), ]); }
1
34d46531930b314c1cab0a4547a26a77
2da2028f7103af52ba5e0837653f002c
<https://djangosnippets.org/snippets/1228/>
def auto_render(func): def _dec(request, *args, **kwargs): t = None if kwargs.get('only_context', False): del(kwargs['only_context']) response = func(request, *args, **kwargs) if isinstance(response, HttpResponse) or isinstance(response, HttpResponseRedirect): ...
1
c34b55aaf9c38062e72e925609193407
7b3968098fbaf23b740bdfe9bb5d7f58
複数ブラウザ ウィンドウ時の画面間の受け渡しデータの取得
if(window.opener == null || window.opener.closed){ alert("呼び出し元画面が閉じられた為、値をセットできません。"); return false; } var _wod = window.opener.document; var objSelRet = getChildArr(getChildArr(objSelectedTr,"TD")[0],"INPUT")[0]; var arrReturnValue = objSelRet.value.split(sepStr); var arrRet...
1
ee1f9b19bc6e4fe258b8428577ec73c2
9fcd8c0ee99503040dfac1e2ebe8d9ce
Genera un hash SHA1 a partir del contenido de una imagen.
image_file = open(file_path, "rb") byte_stream = BytesIO(image_file.read()).getvalue() image_file.close() hashObject = sha1() hashObject.update(byte_stream) return hashObject.hexdigest()
1
f7e3274bb7683dd233a2538d7f1d2c06
0877200c43eba55898a9ca9fbe0aa1f5
根据关键字获取留言select2对象
UserMessageDTO selectByKey(int id);
0
26ecb9dfe7f483eed110c7163781bc6d
a9c28ece374d0f263b82609fa13da62c
导入工作组
{ $r = $this->httpClient->postJson('group_open_http_svc/import_group_member', [ 'GroupId' => $groupId, 'MemberList' => $members, ]); return $r['MemberList']; }
1
7166a0d96e6875450f56f84b45ee63f8
b7d232df73e0d718ac746c296b7101a7
Retorna a Descrição do Municipio
public String descricao();
1
88ebc54bd00882e17cbe614aad2cd7a6
b59a4ac8ea97c217f07edb38e13637b9
获取视角向量(由原点出发,直指向观察者的向量)
public class Camera3D public Vector3f getLookVector() { return new Vector3f(getEyePoint(), getLookPoint()); }
0
bc9872fb429218fb5f085992394fc86c
ee20ea5d1e67129b1a57b7a9029b351a
判斷輸入是否為日文
public class ProcMain : MonoBehaviour bool isAD(){ return inputGen.text == "西暦"; }
0
f2eaa57b9ea0c1f7a19d0cda537246ee
d2a8ccec895102c8b9e5386d4282ab94
Test for the robot's proximity sensor
if (Robot.isReal()) { return kMaxPressure <= m_pressureSensor.getVoltage(); } else { return true; } }
0
b590f84f9dcd4434d8debd0b515eb1be
a620c31a65fb1a2d0b4c38937037058d
Lists all CarnetAdresse entities.
class CNAController extends Controller public function indexAction(Request $request) { $em = $this->getDoctrine()->getManager(); $cNAs = $em->getRepository('AppBundle:CNA')->getAllCNA($request->query->get('filter')); $paginator = $this->get('knp_paginator'); $pagination = $paginator...
1