query_id
string
corpus_id
string
query
string
code
string
label
int64
1001719776200c65f27c1261b048a9e9
9171c4b7cfc35e19e11bc9c5b5280520
Resets parameters that limit usage of movement skills in air
FORCEINLINE void ABaseDotaCharacter::ReInitializeChar() { UCharacterMovementComponent* movementComponent = GetCharacterMovement(); if (movementComponent) { movementComponent->MaxWalkSpeed = attributes.statsData.moveSpeed; movementComponent->MaxWalkSpeedCrouched = attributes.statsData.moveSpeed / 2.f; movementC...
0
e63f31cab16507861d55d421cb2249c8
b313047e349a82f84ed4f56232728ac8
Gets an array of argument files to lint.
class PHPUnit implements RunnerInterface public function getArgv(Locator $locator, DirectoriesInterface $directories): array { if (!$directories->getTests()) { throw new RunException('PHPUnit requires tests directory to run.'); } try { $config = "--configuration={$loc...
0
6ef59fe4973290171dc44b313329b831
b7a8fbbf59873ee5e9d7cbd6b3df1e85
Gets the qualityUpdatesPauseStartDate property value. The Quality Updates Pause start date. This value is the time when the admin paused or extended the pause for the ring. Returned by default. Query parameters are not supported. This property is read-only.
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ReviewPointType", propOrder = { "purchaseReviewPoint", "premiumReviewPoint", "afterUseTextReviewPoint", "afterUsePhotoVideoReviewPoint", "regularCustomerPoint", "startDate", "endDate" }) public class ReviewPointType public String getStar...
0
ae679d28fb5f990406fbaeb4ed9b8841
98f2392631a9913a6bd1d7a0d1b9c0d9
Function for confirming what types of characters the user wants
function returnCharCreate() { document.getElementById("header").style.display = "block"; document.getElementById("main").style.display = "block"; document.getElementById("footer").style.display = "block"; document.getElementById("characterConfirm").style.display = "none"; }
0
5d0c67bb609127df1f0b4eba9334f969
d32b27a26fd46225a6d53e69a57ef29c
由右向左滑动屏幕,滑动屏幕上方1/4处,如需滑动其他位置,需重新封装
public class HandleWelcomePage public void swipWindow(AndroidDriver driver) { width = driver.manage().window().getSize().width; height = driver.manage().window().getSize().height; try { driver.swipe(width * 3 / 4, height / 2, width / 4, height / 2, 200); swipe_count++; ...
0
e556f6803f04837d0f1fd405e22bf88b
0b76f867eebed99dd55db8b9cd3001c5
Fired when ports on a switch change (any change to the collection of OFPhysicalPorts and/or to a particular port). Does nothing.
public class L3Routing implements IFloodlightModule, IOFSwitchListener, ILinkDiscoveryListener, IDeviceListener @Override public void deviceVlanChanged(IDevice device) { }
0
8ff19f344f5de5fe823ae294db4d555b
fbfbfac21a6323245f668b5ab73711c3
NAME DESCRIPTION Set the tone associated with a given event. We update the stored configuration, not the running device.
host_dev_config_t* dev_cfg, uint8_t evt_channel_num) { _dev_cfg = dev_cfg; _evt_chn_num = evt_channel_num; return; }
0
05b8d3ae74df2b467d1e9f8fadca42bc
0d7ea937542dd936cafb2df1d4f783fa
Ensure we can't create a person with a bad permission.
user_3 = AuthUtils.create_user("Peter Parker") user_3 = AuthUtils.add_permission_to_user_by_name( "memberaudit.view_everything", user_3 ) self.assertFalse(self.character_1001.user_has_access(user_3))
0
d8a561912fef5a940c4e3b12ca7349a7
efd8c0bf863f65eafdec14996fc2501c
根据产品ID和显示终端类型查询产品库包装信息
@Repository @SuppressWarnings("unchecked") public class SampleMainDao extends BaseHibernateDao public List<SampleProductwdInfo> getSampleProductwdInfoList(String pid,String code) { String hql = "from SampleProductwdInfo t where 1=1 and t.productId='"+pid+"' and t.code ='" + code + "'"; List<SampleProductwdInfo> lis...
1
4d6b8156be8a436b69e183f9627dc43c
27058933d220b4a495dacf9527e32bcc
Add Zend Framework file validators. Emulates the way Zend Framework adds validators.
class Mage_XmlConnect_Model_Simplexml_Form_Abstract extends Varien_Object protected function _addValidator(Mage_XmlConnect_Model_Simplexml_Element $xmlObj) { return $this; }
0
705ba5be789ca88d5789071754e68213
7963e1ac846738b004120a459ee906f8
只更新错题和收藏集合,用于错题练习
public void updateWrongSet(String userId,String subjectId, int type) { Map<String, Object> map = new HashMap<String, Object>(); map.put("userid", userId); map.put("sid", subjectId); if(type==1){ List <SubjectExamLog> logList = subjectExamLogDao.getByParam(map); if(logList.size()>0){ SubjectExamLog su...
1
637cb3178f45184084d44afcd4dbd16b
4a6265ca1d04e9511662f2d50b9209af
Set the filename and the path to that file.
class Extrapolate(object): def set_path(self, file_name_): self._file_path = file_name_
1
b49569aa79785b22f0640a04563033d7
cea7935d7ab8d57ecfbb4e51161e8b19
Returns pandas DataFrame of last year passthrough gifts
countries = load_data('countries.csv') income = load_data('indicator gapminder gdp_per_capita_ppp.csv') income = trans_data(income) income_year = income.ix[year] income_year_df = pd.DataFrame(income_year) income_year_df = income_year_df.reset_index() merged_df = pd.merge(countries, income_ye...
0
c1d7a60cbfc4a29be29b6864368eb131
5abf805aad55e87200d730207d4d3329
Frees allocated Ocllips and all OpenCL structures associated to it.
im_ul_op_free (im_ul_op_ctx_type ul_op_ctx) { uint32_t node_count; uint32_t node_idx; im_ul_ol_intf_info_type *ol_intf = NULL; assert(ul_op_ctx->rd == NULL); FOR_ALL_PFI_OPEN_HASH_ELEMS_COND(&ul_op_ctx->constructive_ol_intf_table, ...
0
864d56c268e942af63a1449407a5d3f8
282c55fd1ca37e6ee2d379d91ab1bb8a
get pages from sockets. It first tries to recv the header of the response, and check whether the response is 200 or is chunked. Then recv the remaining response.
class PAServer(): def _get_full_response(self, sock): result = "" rcv_buffer = sock.recv(self._buffer_size) result += rcv_buffer.decode('utf-8') while len(rcv_buffer) == self._buffer_size: rcv_buffer = sock.recv(self._buffer_size) result += rcv_buffer.decode('utf-...
0
9513a413432b073b11f18c4a51ce2b11
dd1c1afd1d86f2ccbede18514d2bd053
se limita la posibilidad de escribir a 16 caracteres
def limitador(nameEntry): if len(nameEntry.get()) > 0: nameEntry.set(nameEntry.get()[:8])
0
9658458162ef0069a1fb1902d6761885
9a73636c722cca16a10f8f142387de1c
Count the number of relationships in the database.
namespace org.apache.metamodel.schema int getRelationshipCount();
1
65e69c5046fc3aece6281bcabbee3161
77c8b9a4e557e80ad0e619c35a085ab7
Getters for the max dimensions of the walking area.
public class Board public Coordinates getMaxSize() {return maxSize;}
1
8ace77cdf9084ad8ff029f8b83f49e0e
08cefc98dee4f41bb6ab755ebda7216e
and output the correct C++ type/typedef decleration.
public class GLFunction implements JavaPrinter, Comparable public String asCTypedef(boolean isEGL, boolean addVar, String mangle){ StringBuilder sb = new StringBuilder(); sb.append("typedef "); if (proto != null) { sb.append(proto); sb.append(" "); } if (...
1
41673586e40be96a5f1ffd43b6b78de9
aa53b22a20e3f6ab270bf844a071298a
Checks if an image is a single slice image.
{ const FLinearColor* SrcColors = InImage.AsRGBA32F(); const FLinearColor* LastColor = SrcColors + (InImage.SizeX * InImage.SizeY * InImage.NumSlices); while (SrcColors < LastColor) { if (SrcColors->A < (1.0f - SMALL_NUMBER)) { return true; } ++SrcColors; } return false; }
0
c0338bbfbe3dfa03cd5787ee400437e1
ac423105669a5ff5d860e0644903b228
Function used to handle the data stream. Send the initiate command, waits for data to become available and then compiles the stream into correct data packets. Continues while 'stream_open' is true, throws a a disconnect event if no data read for two seconds.
while not self.terminate: if not self.is_open() and not self.open_port(): time.sleep(1) else: try: for byte in self.serial.read(): if not self.protocol_enabled: self.__handle_ascii_dat...
0
e3d43e4f300493b07943beb1f1108a3d
7e31bb2d2a9abcdbacfd049271599b9e
Carga las obras del archivo. Por cada obra se indica al modelo que debe adicionarla al catalogo.
def loadArtworks(catalog): artworksfile = cf.data_dir + 'MoMA/Artworks-utf8-10pct.csv' input_file = csv.DictReader(open(artworksfile, encoding='utf-8')) for artwork in input_file: model.addArtwork(catalog, artwork)
1
3a99681f300e575fc6ea669cfe6aa4e3
9ab31dbcd5dff5bbc8bdccf13252ca85
Tests RequestInterface::getRequestTarget.
{ $target = '/test/' . mt_rand(0, 1); $newTarget = '/test_new/' . mt_rand(0, 1); $bxRequest = $this->createRequestMock(['getRequestUri' => $target]); $server = $this->createServerMock(); $request = new ServerRequest($bxRequest, $server); $newRequest = $request->withRe...
1
f0fbf709fa685eb84679bbe3d038096e
b5e7a77f65a61feb345d9f1f23ad658d
Apply the device pixel ratio.
class DevicePixelRatio _correct() { let ratio = window.devicePixelRatio if (ratio > 1) { ratio -= 0.25 } document.getElementsByTagName('body')[0].style.zoom = 1 / ratio }
1
a9d28611d332a82164553c45567c3292
f0f5b3de8d10cb904549f0d0878b8471
(Boolean) Display all faces as shades in the 3D view and UV editor
export class SpaceUVEditor public get show_faces(): boolean { return PythonInterop.getBoolean(this.interop, `${this.accessor}.show_faces`) }
1
b8b194f5eb78a66360f36708343f1a0f
15b571c27dc33c9df358441e677af42c
测试链上的出块间隔
class TestBuildBlockChain: def test_blocknumber(self): for w3 in self.w3_list: start_block = w3.eth.blockNumber time.sleep(20) end_block = w3.eth.blockNumber assert 15 <= (end_block-start_block) <= 25, '区块增长不在允许的范围内'
1
17bdad8f0125c6210e8a0896432c5269
4f55bbafe3b41cc6f3efc7d96312c04f
جستجوی یک متن در آرشیوهای یک کلاس خاص
namespace DTCM_Automation.project void CrmSearchInFindField(string searchText);
0
fc6a0244f390231de2405b1ecf42b04c
86b89bb4fd7e2d9d741c97f6314411dd
Get Rocket Loader setting (permission needed: #zone_settings:read)
class ModuleLoader(object): def loaderConfig(self): return config.config.get('apptools.project.output.template_loader')
0
b031203c3580363afe73a843b855b663
6972cda52d7b7fa0420c1673d56945c6
Clip the edge with a face
{ rf_.remove(e); if (e->hedge(0)->next() != NULL) { Face *f = e->hedge(0)->face(); Vertex *v = e->hedge(0)->next()->dst(); if (!v->is_weld(f)) sf_.remove(v); } if (e->hedge(1)->next() != NULL) { Face *f = e->hedge(1)->face(); Vertex *v = e->hedge(1)->next()->dst(); if (!v->is_weld...
0
ecbe1a854fbc0aa01c87390214cdb02b
3956255f4202270dc3dc34c9bd7ba768
If jObj[fieldName] is an array, return it. Else put it in an array and return that. Helper function for different style JSON-LD. Some versions of Virtuoso return single values of @type as-is, and other versions return an array of types, even if there's just one.
if (!Array.isArray(value)) { return [value]; } else { return value; } }
1
908e0fe6eba93bec2fcd9a73854bdc1b
4044d4f947e68335776c99b1432b077b
post请求:上传多文件(图片),场景1:使用MultiPartBody 一个file对应一个请求体,构建者添加全部请求体并构建MultiPartBody
@Multipart @POST() Observable<ResponseBody> postMulti(@Url String url, @QueryMap Map<String, String> urlMaps, @Part() List<MultipartBody.Part> parts);
1
b7698b928c60c1e633ec0626c82be063
a4164d1eefa6090496ca0124bf70ce6b
初始化计划下拉框
function renderScheduleInit() { var $div_autoSchedule = $('#div_autoSchedule'); var scheduleInfo = CALCATCH.scheduleInfo; for (var key in scheduleInfo) { var optionsHtml = ''; var sk = scheduleInfo[key]; for (var i = 0; i < sk.length; i++) { optionsHtml += '<option value="'+ sk[i] +'">'+ CALCATCH.members[sk...
1
77d5431f96652f36c6e686276626922d
831fc3a87df2310eb04b53753258cf04
Filters out deprecation information.
return [ x for x in lines if not x.startswith(("Exception ignored in:", "ResourceWarning")) ]
0
dfdce97839d6204c153dfdd3a61de673
c810fda8784465edd23770659a7fa225
Setup bresenham's algorithm.
void bresenham(int x1, int y1, int x2, int y2) { int diffX, diffY; int sX, sY; diffX = x2 - x1; diffY = y2 - y1; if (!(diffY >= 0)) { diffY = -1 * diffY; sY = -1; } else { sY = 1; } if (!(diffX >= 0)) { diffX = -1 * diffX; sX = -1;...
1
96d8f26ac31e900988047bc7d666177b
8b897880545af62c37b84138a0ef652f
Метод добавляет победу игроку-серверу, и обновляет статистику
namespace Tablut class DB_Connect public void Add_Victory(string m_Profile_Name, Player_Role m_Role) { if (connection != null && connection.State == System.Data.ConnectionState.Closed) { this.connection.Open(); } MySqlCommand cmd = this.connect...
1
f799f2ce6498810eb1ca0f21642d6a6f
f4e9d96f21de90a9670f317894aa1e99
Get additional items (deserts, waters, dides) to show in checkout.
class Futurenext_Zakeke_Block_CheckoutItemRenderer extends Mage_Checkout_Block_Cart_Item_Renderer public function getZakekePreviews() { try { $additionalOptions = $this->getItem()->getOptionByCode('additional_options'); if (!$additionalOptions) { return false; ...
0
c324d7acde5fd1c19b41cc9bad41a8a2
5c6b660bc5f4d2982c2718f2fe0abf51
get the name of the tunnel packet type
tunnel_type_byte = ord(clientRandom[-1:]) sentinel_label_byte = ord( binascii.unhexlify(self.crypto.sentinelLabel[-2:])) decode_byte = tunnel_type_byte ^ sentinel_label_byte if (decode_byte & 1) != 0: tunnel_type_bit = 1 else: tunnel_type_b...
1
1ccac6ce234a6c28112146e31790686b
178eb880d411daf4b6b485986d37da9e
Returns all devices that are accsessible via the connected bridge. Returns a dict.
def devices_get(): try: res = requests.get(settings.CNAAS_HOST + '/device') devices = res.json()['data']['devices'] except Exception: devices = {} return devices
1
48c741ed330fbb10c1ae2c87c6c5cf1e
71ff982cbeed131dd9a597901287a7fd
Getter for the number of rows in the texture atlas.
class image_atlas(object): def __len__(self): return self.__length
0
216dc93a29a0ed0b07d2c2b7bf59dbd2
ed34e3f0b2242c92b33b441783ac2ffa
Compiles a Jvs code source. <div>The jdk <tt>tool.jar</tt> must be in the path.</div>
String javaName, String source, DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset){ StandardJavaFileManager fileManager = null; boolean ok = false; try{ JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); fileManager = compiler.getStandar...
1
637aecec18c1089c61669bdb85058b97
c4624e71b09f11b7d80f31a4a9554977
获取usecase目录下所有以xls结尾的excel表格;
if (StringUtils.isBlank(path)) { path = "."; } File dir = new File(path); if (!dir.isDirectory()) { throw new RuntimeException("输入路径非法"); } File[] files = dir.listFiles((pathname -> pathname.getName().endsWith(".xlsx"))); if (ArrayUtils.isEmpty(files)) { return Lists.newArrayList(); } else { ...
0
b85de52fb6a794bcb1e5c40b13aef5b5
7fe919d1d5b82172f3e4c0b9d9ba6465
The name of the client machine.
class AgentDetails(object): def MachineName(self): return self._details['MachineName']
1
46944496ed5445101099b2a4254e9ecc
d33714245388b9ea89d5e39768a63e08
the first dimension: number of examples
class NNData: def get_input_dim(self): with open(self.paths[0], 'rb') as file: x = load(file) x = np.array(x) return len(x[0]) - 1
0
c30ee9e962d8cf9a14905f337ca3a809
a357c08c4546a6f34ed19e643a2925a1
既存のバトルオーダーをコンテナに詰めていく(データ登録の時の要領で)
public class BattleReqManager : SingletonComponent<BattleReqManager> public bool BattleRequestAdd( PacketStructQuest2Build quest_param, PacketStructQuest2BuildBattle battle_param, bool boss, bool chain, int turn_offset) { if ((m_BattleRequestInput - m_BattleRequestAccess - 1) > m_BattleRequest.Leng...
1
dcd21b3d70f6bb7a5778780ac50244cc
c3357c3d728707d328f5ed8c2e77c82f
useful for quoting unqualified identifiers for use outside of datasets.
class Donuts(Dataset): def get_identifier(self): return 'DonutsDataset'
0
89fb976af62e6a63465d27c2e4e876a3
70e20368cbe277ea2224dec032b909a9
Pour mettre à jour les magasins lorsqu'on supprime un objet.
{ $req_maj = "UPDATE wan_boutiques SET boutique_quantite=boutique_quantite-".$this->quantite." WHERE boutique_village=".$this->_ninja->ninja['stats_village']." AND boutique_objet=".$this->objet['commerce_id']." LIMIT 1"; $res_maj = ktPDO::get()->exec($req...
1
0d9121969925a994512ab500905b8892
5c454bab57efcc3f84c505637a82d2dd
Defaults to an "AND" over time - data only where all dates have data. Override for "OR" functionality.
return if(start_date.blank? && end_date.blank?) if(start_date.blank?) add_date(predicate, start_date, true, fmt) elsif(end_date.blank?) add_date(predicate, end_date, true, fmt) else add(predicate, "#{to_iso8601(parse_date(start_date, fmt))}/#{t...
0
84233495291c26ca3f168a12c715af19
056bc8e716c725082c21a4edee26fa74
Creates a self-signed certificate using the established subject, key, and optional extensions.
{ List<string> oids = new List<string>(); oids.Add("1.3.6.1.5.5.7.3.4"); oids.Add("1.3.6.1.4.1.6449.1.3.5.2"); return CreateCertificateSigningRequest(subjectName, keyLength, durationYears, oids); }
0
2bd518225b27c285cdc8d6f75f3a5aea
e6424278a0765f2da1e2b1038fd8bc56
Processes identity request body.
class SaleOrderAjaxComponent extends CBitrixComponent protected function processIdentity() { $data = array( 'ACTION' => $this->request->getPost('action'), 'SHOW_OLD_FORM' => true, 'SHOW_NEW_FORM' => true, 'STORE_PASSWORD' => true, 'SPAM_REQUEST' => true, ); if ($data['ACTION'] && check_bitrix_sess...
1
3a24ba4f09d17a1338834c5e4d7a958b
3a85f21fe8ceb2b4c847544ed76974bf
Writes a collection property.
{ if (property.isArray) { writer.Write(property.arraySize); for (int i = 0; i < property.arraySize; i++) { WriteProperty(property.GetArrayElementAtIndex(i),writer); } } else { int countChild = property.Copy().CountInProperty(); writer.Write(countChild); var child = prop...
1
3397dea9c4ff93abec589a87530bd1fe
ef7fe5bb74c6d0237c18729cd30bef1d
An array of children UUIDs assigned to the segment (ordered).
public class ListsSegmentsRequest public String[] getStaticSegment() { return staticSegment; }
0
f18be95fd32c46607a05967bcc3df3eb
d501f0905bd3d4b933bbebc904ab4007
【杂项】检测系统中是否安装了指定输入法
Class<?> IMEClass) { final ComponentName imeComponentName = new ComponentName(context, IMEClass); final String enabledIMEIds = Settings.Secure.getString( context.getContentResolver(), Settings.Secure.ENABLED_INPUT_METHODS); if (enabledIMEIds == nul...
1
49bd04b2fd5171c81a72d0c78af4ff57
6bcf4dfada73e377a9c21a84f2d8a0d4
Returns Zipato thermostat data.
class NAThermApiClient extends NAApiClient public function getData($device_id = NULL) { $params = array(); if(!is_null($device_id)) $params['device_id'] = $device_id; return $this->api('getthermostatsdata', 'GET', $params); }
1
0b1b23102d38075e8b05856f034eedc8
a925f9fba68e1e0e1d22efa390717b6c
Data associated to an edge in a Growing Neural Gas graph.
self.x = x self.y = y self.c = c self.m = m self.neighbours = {}
0
f1b2e17b273ac870bfcaf86c2b975a93
753a4de39fb12ef59c2fa28ed485101d
Associates the annotation object with this request. May add more than one. Passed through to a {@link RequestFinishedInfo.Listener}, see {@link RequestFinishedInfo#getAnnotations}. {@link RequestFinishedInfo}.
void annotationsAdded();
0
4262e227a1d8c3248894b02eddef7047
0a3823d883f78a7af88ec4df520e73fd
Steering force for EVADE behaviour. Similar to FLEE, but try to get away from the predicted future position of the predator. Predators far away are ignored, EVADE_PANIC_SQ is used to control the panic distance passed to FLEE.
local prediction = vehicle.velocity * 0.5 local point = vehicle.position + prediction local range = vehicle.max_speed local align = vehicle.heading local potentials = {} self.goal = Vector2() for _, pursuer in pairs(self.pursuers) do local source = pursuer:source(point) local...
1
26a329e482fca6042a872664cb2c6181
c70482b490c41b36e0e0ecefa08b8c24
Юзер дал один из нужных ответов в одном из нужных опросов в массиве $targetings 'targeting_topface_leaders' => array( 'votedCorrectAny' => array(15 => array(1,2), 24 => array(0,3)) //в опросе с id 15 (на проде) пользователь выбрал 1-й или 2-й вариант в опросе 24 - выбрал 3-й вариант или закрыл опрос ),
{ $result = $this->getExistingData($voteId, $controlId); $count = []; $checked = ''; foreach ($result as $key => $value) { $checked .= $checked ? (',' . $value) : ('' . $value); } $newResult = explode(',', $checked); return array_count_values(arr...
0
2267eda8ad63ee42765e16e038d735e6
c857520b53600ab0e01fcf03d91d0e92
Set the error message should be shown to user if there is error accessing VM services.
public class OperatorExecutor public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; }
1
dbabc1ead614c4049bb564b140b3c8d1
db4db5f46484ddccdc57cc9beb51ca59
根据SpuId查找评论
getListBySpuId(spuId) { return request({ url: `${api_name}/findBySpuId/${spuId}`, method: "GET" }); }
1
c4cc25191f45a0f152c425c5a700ccbd
2c41cb36a0dde06b5e49512fc25c40bf
Return the hash code. The returned value will be cached until <see cref="OnChanged"/> is called.
namespace SourceCode.Clay.Json.Pointers public override int GetHashCode()
1
985534eb550ff45b82db995e522347da
e69c0d8382acfeacb25cef8be91a35a2
Initialize the shutter in the camera.
class SeekCamera(object): def shutter_trigger(self): status = _clib.cseekcamera_shutter_trigger(self._camera) if is_error(status): raise error_from_status(status)
0
9bab120924209821f2ef3f59f9a4b08d
f7d6827bc582ae415cd5334888e7a05e
Shows the dataset labels.
line = "Dataset:" prefix = "Classification" if not dataset.is_classification: prefix = "Regression" print(prefix, line, dataset.display_name)
0
a13b8896b58fa2323894b874d603442e
27e1fd9319409b391417891da7e9e0ee
Test that messages created as drafts have the UNREAD, and DRAFT statuses and no others.
class IncomingStatusChangeMethodTests(_WorkflowMixin, TestCase): def test_archiveDeferUndefer(self): self.message.classifyClean() self.message.focus() self.message.archive() self.message.deferFor(timedelta(days=1)) self.message.undefer() stats = set(self.message.iterStatu...
0
d7ea0d3e9c4c00f2d92f4f678c9359c7
245bb5dbdfee23a5b8a8b102f2d309fe
Find the sum of the only eleven primes that are both truncatable from left to right and right to left.
def main(): trunk_prime_list = [] count = 10 res_count = 0 while True: r_list=right_list(count) l_list=left_list(count) if check_all_prime(r_list) and check_all_prime(l_list): trunk_prime_list.append(count) res_count += 1 count +=1 if res_count == 11: ...
1
39ee3ed39e2324f02e9b275017960928
9f53afc983fcd6ae4e4f93fb09f515f0
Calculates the amount of interest that is owed per month.
{ double rate, months, amount; double monthlyPayment; rate = (1 + interestRate / 1200); months = remainingMonths; amount = Math.Pow(rate, months); amount = 1 / amount; amount = 1 - amount; monthlyPayment = (paymentAm...
0
451cfe59f60d6a03ba830bcfdfba9608
6e63b9d45024b6ed586b60ab5472c0d3
Menginisialisasi tabel kasus harian pada database
$this->createTable('{{%jadwal_kerja_hari}}', [ 'id' => $this->primaryKey(), 'nama' => $this->string()->notNull(), 'asli' => "ENUM('Ya', 'Tidak')", 'default_libur' => "ENUM('Ya', 'Tidak')", ]); $this->batchInsert('{{%jadwal_kerja_hari}}', ['nama', '...
1
30a519159555375fed37b20db30473d9
d88a600d46ac5228a07b53d3fcd601cf
对字符串进行DES加密,返回BASE64编码的加密字符串
{ BASE64Encoder base64Encoder = new BASE64Encoder(); try { byte[] strBytes = str.getBytes("UTF8"); Cipher cipher = Cipher.getInstance("DES"); cipher.init(Cipher.ENCRYPT_MODE, key); byte[] encryptStrBytes = cipher.doFinal(strBytes); return b...
1
5c0aa9b6e96e36c5d8766ce4d601bdd9
106964c21bf8c736360ef8064d823ed0
Show/hide tabs depending on the TCPWM Mode
var camlink = 'camlink' + terminalid.toString(); var camlayer = 'camlayer' + terminalid.toString(); var waittimelink = 'waittimelink' + terminalid.toString(); var waittimelayer = 'waittimelayer' + terminalid.toString(); if ((dojo.byId(camlink) != null) && (dojo.byId(camlayer) != null) && (dojo.byId(...
0
021e6e0ebb277d73e7ae61302a0ec6db
714dca0845ba1b9c002cfd4ce9297970
! Switches to selection by edges.
def edgeLoop(*args): cmds.SelectEdgeLoop()
1
b5992221af030003e089f935048b47d7
66eed44bb4f28c2f627af5b25337b4ff
异步解禁网易云通信用户帐号。
String url = baseUrl + "udp/sy/disabledusers"; return SyncDataJavaUtil.arrayOp(userNames, url, apikey, secretkey); }
0
41fd98635c6dc663c870c11aa0198a5a
179d0df2b3124807991f893e57373a2e
Set the type for the identity provider.
class SetRealName extends ResponseSignedValue public function setIdentityType(int $identityType): SetRealName { $this->identityType = $identityType; return $this; }
1
f3709c2eac64fc48bc02790dd66a7eea
75f19fb8ab8c084f76f6645eeedec426
trả về có lập được lịch hay không
class MEETING public function is_valiable($date, $time) { $connect = new CONNECT(); $connect = $connect -> connecttodb(); $action = $connect -> prepare("SELECT * FROM `apply_meeting_room` WHERE `date` = ? AND `time` = ? AND status = 1"); $action -> execute(array($date, $time)); $result = $action -> fetchAll(...
1
332fe1f917ac16fe760326af578e908e
871c9f1af6652ca19d5b4b1badc59d87
Function to get accuracy and cost of the model by genre, evaluated on a chosen dataset. It returns a dictionary of accuracies by genre and cost for the full evaluation dataset. classifier: the model's classfier, it should return genres, logit values, and cost for a given minibatch of the evaluation dataset eval_set: th...
global dataset, api structure = config2structure(config) arch_index = api.query_index_by_arch(structure) if budget is not None: budget = int(budget) xoinfo = api.get_more_info(arch_index, 'cifar10-valid', None, True) xocost = api.get_cost_info(arch_index, 'cifar10-valid', False) info...
0
c1d8472568c7ebde7dd81b85be0ad1db
175d08b978ccad388b6e53e4cb7d0bd3
Função que retorna o estado de uma sala de aula num determinado momento
global $conexao; $SQL = "SELECT v.vestagendado FROM vestibulares v WHERE vestcodigo = '$vestcodigo'"; $rstDados=sql_query($SQL, $conexao); if (!ValidaRst($rstDados, $SQL)) exit(); list($vestagendado) = sql_fetch_row($rstDados); return $vestagendado; }
0
01a9cdd519ecfed69ff3503998582285
45e550221ff2337542c3df82c9927d26
konwertowanie tablicy charow na tablice intow
int[] a = new int[c.length]; int k = 0; for (char temp : c) { a[k++] = Integer.parseInt(String.valueOf(temp)); } return a; }
1
0321937d78c132e4805e1d6e58af2de4
cc144586105d9490b6444d8c0b308756
------------------------------- gameOverCheck() ------------------------------- Checks to see if all the players in the game are dead, if so then it will move on to the game over scene. Use this function whenever a player is reduced to 0 life and they die. -------------------------------
export default class Scene_Map extends Scene_Base checkGameover() { if ($.gameParty.isAllDead()) { SceneManager.goto(Scene_Gameover); } }
1
129c82607237a8010aace9c66d10df46
d015e92197a85cd3496649ace9cc64ea
Check if any assessment is selected Return true if there is one selected
public function hasSelections(): bool;
1
e48f4e0872fa3e5fc7d805f97f0aaa65
705d3b2ab3e5fd970025abe939c66ac5
Trigger validating event of an element.
{ if( !this.IsTriggeringValidation ) { this.IsTriggeringValidation = true; foreach( var invalid in this.ValidationService.GetInvalidProperties() ) { this.OnPropertyChanged( invalid ); } this.IsTriggeringValidation = false; } }
1
c49c8007000e84afdd7bc1677e62e6ff
2ba027d9dd29812b983c73ca51c4cc31
Test whether a Range larger than the file returns 416 Range Not Satisfiable
class CS531A4(HTTPTester): def test_large_range_not_satisfiable(self, report): self.check_status_is(report, 416) self.check_payload_empty(report)
1
0f4447e448cbf2f9f87c2895d50e19bd
051353ade6f8c50d509f9e2e1972762f
Tokenizes the textual input and prepares sequences by applying padding
def tokenize_and_pad(tokenizer, data_df, max_length): sequences = tokenizer.texts_to_sequences(data_df) padded_sequences = pad_sequences(sequences, maxlen=max_length) return padded_sequences
1
781f3e1ec2dcee8430103eda1453bc66
99fdfe92888fddff48778e1fe9c49625
得到本节点的下个节点的处理人员 格式为 马志骋(协同),董亚杰(协同),谭敏锋(审批)
String operators=""; RecordSet rs=new RecordSet(); rs.execute("select t2.id,t2.lastname,t1.nodeid from workflow_currentoperator t1 ,hrmresource t2 where t1.userid=t2.id and t1.workflowid='"+workflowid+"' and t1.requestid='"+requestid+"' and t1.nodeid='"+nodeid+"'"); while(rs.next()){ operators+=rs.getSt...
0
11bb4cbdfbc3473fc83ff02001eafc99
63e5ff5f02e5c21c38be38a00d48cf63
Changes from How To Play Menu to Controller Layout Menu
namespace PuzzlePathDimension class MainMenuScreen : GameScreen void howToPlayMenuEntrySelected() { ScreenList.AddScreen(new HowToPlayScreenContentList(TopLevel)); }
0
f134a73726bbc1e6f8a15e8fba13ccd4
8590a2974fe7cc3a8abe695dfa617bce
wanted output
int main() { std::cout << "----------\n| Waylon |\n----------" << std::endl; return 0; }
1
d412e9eed73b77d329df0174b70702f8
9b974edf1e946ae446269e6633a20c15
Tests get_assessments
class TestAssessmentProxyManager(object): def test_get_assessment_session(self): if self.svc_mgr.supports_assessment(): self.svc_mgr.get_assessment_session(PROXY) with pytest.raises(errors.NullArgument): self.svc_mgr.get_assessment_session()
0
d9dce089d2100efd935eaab845932526
4b613d8a1245cdd129c6c0357c083199
将x插入到下标为k的点的后面
if (k<1) exit(1); LinkList *p = list; int i = 0; while(p && i<k-1) { p = p->next; i++; } if(!p) exit(1); LinkList *s = (LinkList*)malloc(sizeof(LinkList)); s->data = x; s->next = p->next; p->next = s; }
0
363e2307f6a628796da05c5b77995467
ef4e4cfa82e7a1d29370bf53dc1fe8bf
如果参数context中的某变量在本上下文中也有定义,则将该变量的值覆盖到本上下文中
if (context[name] === undefined || context[name] === null) { return options.inverse(context); } this[propName] = context[name]; context[propName] = context[name]; return options.fn(context); }
1
b96c9e7319203c74adbe131390d15554
ea34d6d88063cb1d3213360ddd6fb9bb
通过拖拽的元素的x,y坐标和宽高来定位到目标元素。
class Driver: def move_element_by_offset(self, xpath, x, y): element = self.find_element_by_xpath(xpath) ac = ActionChains(self.browser).drag_and_drop_by_offset(element, x, y) ac.perform()
0
1985097c851ea2e8b1900baa5339df45
8f7471a72e569b261a0eacce54098550
签署结果异步通知接口
JSONObject reqObject = getRequestJson(request); JSONObject respJson = new JSONObject(); String sign = reqObject.getString("sign"); String sign_time = reqObject.getString("sign_time"); String partner_order_id = reqObject.getString("partner_order_id"); log.info("sign:" + sign); ...
1
8624d718384dbb5ceb413545828c41f3
4323ba4d6d2893115d92e7184c230a27
查询指定日期的交易卖出成交单
{ List<Trade> list = new List<Trade>(); TradesSoldGetRequest tradesSoldGetReq = null; TradesSoldGetResponse response = null; long pageNo = 1L; do { if (tradesSoldGetReq == null) { tradesSo...
1
1bed26a03704f638105a0c6838be00d1
2f251795bfa0e939e484bcee9aca171c
获取客户扩展字段14表列元数据
Attr attrDesc=new Attr("Def14", getDef14CDesc(tblDesc), this); attrDesc.setJavaType(FType.String); attrDesc.setLabel("客户扩展字段14"); attrDesc.setNullable(true); attrDesc.setPersistence(true); attrDesc.setSerializable(true); attrDesc.setStatic(false); attrDesc.setRefType(false); return attrDesc; }
1
fe641b98c0faa828a8386e9f820510d5
3d5a0d8d9bb227e163cc44dd6f68063c
Cálculo de la duración del desplazamiento del disparo
disparos.push({ x: nave.x + 20, y: nave.y - 10, width: 10, height: 30 }); }
0
3ea0a717de0c7feffeefd2121a793609
f0d0bad7ac2eaa187adb152d348fd8fa
Cette méthode montre comment obtenir une page de la liste des documents en cours.
{ int pageIndex = 3; int itemsPerPage = 4; DomaineDocument domaine = DomaineDocument.Achat; DocumentService service = new DocumentService(_webServiceUrl); IList<Document> documentList = service.GetListDocumentEnCoursByDomaine(domaine, pageNumber: pageI...
1
ca85b6c2b334d6c3d0738bfd12dc83b8
048b80179a373134672f4e41af63bc8b
Returns the columns whose names are given in the input array
def filter_columns(data,column_names): selected_columns = data[column_names] return selected_columns
1
f191b35f5e6861954fdb520ed1e4cd48
cfab281d1b8966cca6403ac77b03db52
Возвращает префикс страницы в зависимости от языка.
public function getPageLanguage($page, $languages) { $page_language = null; $page_paths = explode('/', $page['permanent_link']); if ($page_paths && is_array($page_paths) && array_key_exists(1, $page_paths)) { foreach ($languages as $language) { if (trim($language-...
1
85754232dcf3d822e7535b0d43527f91
233cd35efed4d7611624db19a84d5e83
显示健康码信息
if (unregisterHealthCodeDialog == null) { unregisterHealthCodeDialog = UnRegsiterHealthCodeDialog.Builder() .onDownLoadListener(object : UnRegsiterHealthCodeDialog.OnDownLoadListener { override fun onDownLoadImage(url: String) { try { ...
0
29633e6ded09300fcc3b2e37325bde3f
28f39d4b9ac6c0b1efd32acf0071a06b
Пересчет показателей реализации при отмене проводки накладной реализации
void correction(CorrectionCheckType correctionCheckType, CorrectionType correctionType, String docNum, String docName, Date docDate, String cashierName, String cashierVatIn, TaxVariant taxVariant, double cash, double card, double advance, double credit, double provision, double sumVatNo, double sumVat0, double sumVat10...
1
cf959755be25ca27a23a0c6a2cf4d37b
5571e983f74cdd0cd6bc9f2dbe0352e5
Fonction permettant de débloquer le dialogue ou l'explication suivante (sécurité pour ne pas spammer)
$info4.innerHTML = "Et comme si voler ton trésor n'était pas suffisant,j'ai aussi fait prisonnier tout tes amis !.Si tu veux me rattraper il va falloir cliquer..."; $info6.innerHTML = "Facile ? sauf que cette banane de codeur n'à pas fait attention et m'à laissé 2000 clic d'avance. MUAH AH AH !!!"; clicautogob(); c...
0
9e1ff4935e651c9b4c8ac706cf3d92df
a6c18405d5323eb697854258d53e996c
At xor-assign expression node.
public abstract class NodeOperatorVisitor<T extends LexicalContext> extends NodeVisitor<T> public Node leaveASSIGN_BIT_XOR(final BinaryNode binaryNode) { return leaveDefault(binaryNode); }
1
617e4320b0e62150fa5aa8069c26e3c1
e94b844b8a08124693570da509c7de58
Updates Avada's custom fields from specified array.
ntdc_custom_fields_values_handler( $meta_values ); foreach ( $meta_values as $meta_key => $meta_value) { $post_args['meta_input'][ $meta_key ] = $meta_value; } }
1
2dcee02bdeba51e2548cd6d3aebb3e03
aa9af1c79f6b06ef59f5c642932fd346
Increase the time count every second.
const that = this; int = setInterval(() => { that.addSeconds(); }, 1000); }
1