query_id
string
corpus_id
string
query
string
code
string
label
int64
2731fa2a0bdc2ee8415955deec3007f2
95450c83d6d32891e17d863f2d21b173
Sends the Update Lock command to the registrar for the domain
class NamecheapDomains public function getRegistrarLock(array $vars) { return $this->api->submit("namecheap.domains.getRegistrarLock", $vars); }
0
6cd848c781fc05777d08dfeb1d6290b4
298e094762af980478d24f4c2813b998
正常时间格式yyyy-MM-dd HH-mm-ss时间字符串转换成Epoch格式,转换成的格式为13位
public class DateUtils public static long getUnixTimestampFromLocalTimeDate(String dateStr) throws ParseException{ long epoch = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(dateStr).getTime(); return epoch/1000; }
0
169f245c37a102389833c7b4f3611b79
f2475f1c8119507c7136004a23e47374
Tests the FindNextMatch method when starting from a node that occurs after a couple matches.
namespace Bio.TestAutomation.Algorithms.Alignment [TestClass] public class NUCmerP1TestCases [TestMethod] [Priority(1)] [TestCategory("Priority1")] public void SuffixTreeFindMatchesContinousRepeatingSequences() { ValidateFindMatchSuffixGeneralTestCases(Constants.OneL...
0
06dbe33484c61a914f64a8b6eac16368
236d10297e2992b92fec667130c786ec
获取装置cpu使用率阈值
String info; try { info = parseFileLine(ctx.getResources().getString(R.string.CPUMAXFREQ_FILE), 1); return Long.parseLong(info) / 1000; } catch (IOException e) { Log.e(UserLoggerManager.LOGNAME, e.getMessage(), e); } return -1; }
0
95c56329b2b63d97d61a935d8c4e92a2
037e03f12d2d2b4c3b6c4328d440aecd
Visit a parse tree produced by VisualFoxpro9Parser#skipRecord.
class GuardedVisitor(ParseTreeVisitor): # Visit a parse tree produced by GuardedParser#Impl. def visitSkipOperator(self, ctx:GuardedParser.SkipOperatorContext): return self.visitChildren(ctx)
0
ab2f6cb27380bc61a40e98084fe1a6a2
a0edfb2d8dc8aebbb9a8c768b5e0a98a
driver method for class. Takes a request object, and based on its attributes queries the pokedex for the requested data.
def get_pokemon(): pokemon_id = request.args.get('id') sql = text(""" SELECT name, description, image_url, title FROM pokemon INNER JOIN typelookup ON typelookup.id = pokemon.type_id WHERE pokemon.id = :id """).bindparams( id=pokemon_id ) result = db....
1
1259699db7a6edf295707bc75a8848eb
e4abe8dd757619cc9c3e7aef464a9cfc
指定加密算法(MD5、SHA-1、SHA-128)、盐值、加密循环的次数对password进行加密
class Md5Crypt extends Crypt @Override protected String doCrypt(Password password, Salt salt) throws NoSuchAlgorithmException, UnsupportedEncodingException { byte[] encrypted = doCrypt(password.getBytes(CHARACTER_ENCODING), salt.getBytes(MAX_SALT_LENGTH, CHARACTER_ENCODING)); return passwordToS...
0
90a54fada82735ef59c391f45d3eee7a
cf023990aea210860b33262727e5a9af
从hash环上移除服务器
if server_id not in self.server_id_2_index: return index_to_delete = self.server_id_2_index[server_id] self.server_id_2_index[self.server_ids[-1]] = index_to_delete self.server_ids[index_to_delete], self.server_ids[-1] = self.server_ids[-1], self.server_ids[index_to_delete] ...
1
46de88e6301d05aa352e157f4f270da8
cc77db10a52bad619e7b82ce9403b186
returns true if there is a player on first, false otherwise
namespace ump namespace mj bool Player::isFirst() const { return flag_.test(FLAG_FIRST); }
1
49e3384829654daa800d7d347dc9e0e3
113f7878331046ca0c262108b2f04cc1
Determines the best alignment for an Item field on a table, depending on its type
case type when "int" { value: value, align: ALIGN_RIGHT } when "string" { value: value.tr(" ", "\n"), align: ALIGN_LEFT } when "money" formatted_value = format("%<float>.2f", float: value.to_f.ceil(2)) .tr(".", ",") .rev...
1
fece7318c9b2bbbfd76fa488fb260d90
1b84aa78a789a8c42011c7d2164ae9d7
设置深拷贝
local target={} for k,v in pairs(obj) do if (type(v)=="table") then target[k] = DeepCopy(v) else target[k] = v end end return target end
1
8c6c52daf8bb0314493294539cb1fb1c
48bc29295040dcb9f9163d18c3007f90
Create Resource Group
namespace AuthorAdmin.Command.API.Controllers [Route("api/[controller]")] [ApiController] public class ResourceGroupController : BaseController [HttpPost] [Route("createResourceGroup")] [ProducesResponseType(typeof(string), 201)] [ProducesResponseType(typeof(string), 400)] pu...
1
9b197279e5633eef9350d8a5aac36193
7e6348c1ee50cd4de112da59abab53e7
Takes an iterable and makes an iterable of tuples with it
def tuple(iterable=None):
0
a07f329efc7fd27064172c21fae86b9e
1f16bcf3d434b8886f93f4cdb9d6d808
{@inheritDoc}<br> 石を置ける場所の中で、評価値が最も高くなる場所に石を置きます.
@Controller @EnableAutoConfiguration public class HomeController private Cell calcNextStone(List<Cell> cells) { if (cells == null || cells.size() <= 0) { return null; } int min = 99; Cell minCell = null; List<Cell> dengerCelsl = new ArrayList<Cell>(); for (Cell cell : cells) { switch...
0
d3e5bf3bf541407375ac024201f34780
97f6c5aefaae32a6d2ea924f66819021
percorre lista principal e busca processo para alocar
bool inserirProcesso(struct Node* node, int espacoUsado, int nprocesso){ int lowestEncontrado = 0, iniciolowestEncontrado = 0; bool encontrado = false; struct Node* pointer = NULL; while (node != NULL){ if (node->espaco >= espacoUsado && node->nprocesso == 0){ if(encontrado==false){ lowestEncontrado = node...
1
6a9c9a65ce25c6f0883122313f85e603
499a271d9a952311fb415afb14821a44
Returns <code>true</code> if the graph is <b>dynamical</b>. That means its structure is changing over time, elements have a life period.
boolean isDynamic();
1
9b7bf8cdc82c3317a2a9bdd1392c1126
33be739aeb68307cd10af46a6d62f68d
BUSCA PROCESSO NO PROJUDI
global prc_numero flag_inico = True self.user = user self.password = password tempo_busca = time.time() tentativas = 0 numero_itecao = 0 i_n = 0 numero_de_processo = len(row_database) while numero_itecao < numero_de_processo: ...
1
17a41585ca664da277947b3411a60082
4f1f3ec07a57531e8eee3ece8b7c48e4
攻撃範囲の調整
local ability = keys.ability local caster = keys.caster local target = keys.target if keys.Target and keys.Target == "CASTER" then target = keys.caster end AddLuaModifier(caster,target,"td_multiple_modifier_attack_range",{},ability) end
1
10934e4c6f24aa61466c3f00a18acb47
ce33c4d61627e358a1ec08936b37c898
设置加载异常样式的图标是否显示
namespace LWDicer.Control void EnableSaveErrorImage(bool bFlag = false);
0
468a284ff149fbd806377f0e72aaeef5
59bec630cbd7102767751b5b11490e03
创建一个空的XML文件.只包含一个根结点.
def create_empty_xml_file(file_path, root): root_obj = Element(root) tree = ElementTree(root_obj) tree.write(file_path, encoding='utf-8', xml_declaration=True)
1
8343d5df770eb514bf9218d96b90f6d1
15e1873acc90a2626443a225652988e0
设置部位器官描述
class Patho function setDesc($desc) { $this->desc = $desc; }
1
d38e1583b788f6a04aa7b48fcdc06c73
02c7e1348028ee08e91e1289ffc8cf99
Getter for 'hourly_vibration'
HOURLY_VIBRATIONValue enamel_get_hourly_vibration(){ Tuple* tuple = dict_find(&s_dict, 1181685256); return tuple ? atoi(tuple->value->cstring) : 0; }
1
ea050a64136008d42085000e13ed1d9a
9648ad5abd2026fa673df2155886bc63
Mise en forme des différents champs du tableau de logfile
$libelle = str_replace('/', '', $formArray['libelle']); $time = time(); $fic_img = 'img_csv/'.$libelle.'_'.$time.'.png'; $fic_csv = 'img_csv/'.$libelle.'_'.$time.'.csv'; $arrayContent = array(); $arrayContent['fic_img'] = $fic_img; $arrayContent['fic_csv'] = $fic_csv; foreach($formArray ...
1
9436606a7e5aedbebe0bff1a6c87143e
ef3abc32e9400fab07fcf949fdeb02b0
Updates the base URL in Fuel client according to configuration parameters
{ $output = parent::init(); if ($this->config->has('component-baseurl')) { $this->baseUrl = $this->config->get('component-baseurl'); } return $output; }
1
b66181d376549f21dbff6f3c046a8b14
f6a30392b7e6af0ad9f3393986b5ab4e
Get the recording id for a given counter id.
{ IDirectBuffer buffer = counters.MetaDataBuffer; if (counters.GetCounterState(counterId) == CountersReader.RECORD_ALLOCATED) { int recordOffset = CountersReader.MetaDataOffset(counterId); if (buffer.GetInt(recordOffset + CountersReader.TYPE_ID...
1
9500c810768a03f2e330071d301eb8dc
a0a59731ca7c92f5c7e836de8af362a2
Sets the relative location (to the to shape absolute location).
public void setRelCoords(int[] relCoords);
1
2eb52a060b58688bda073cd73f5f419b
14b8279ddb5a9fe7a6cb6ddf3b2c171c
Read a wikipedia page title list input file. Yields tuples (page title, sanitized page title)
site: pywikibot.site.BaseSite ) -> Iterable['pywikibot.page.Page']: linkmatch = None for linkmatch in pywikibot.link_regex.finditer(f.read()): yield pywikibot.Page(pywikibot.Link(linkmatch['title'], site)) if linkmatch is not None: return f.seek(0) ...
0
6c042c4489cb4643681f3f414b2cfe78
a5bf05f7ce294796c824f98313884510
revisa si ya subio todos los examenes que debe
atLeastOneCompleted():boolean{ return this.tosdos.filter(elemento=> elemento.completed ).length>0; }
0
e0001fb89ae8a0271e3c864bff10574f
ecf81a3e7752934041a0c4b79f9cc54d
获取活動名稱及日期區間
try{ $service=new ActivitySelectService(); $res= $service->selectOne($input); $res['begin_date']=date("Y-m-d",$res['begin_date']); $res['end_date']=date("Y-m-d",$res['end_date']); return $res; }catch (\Exception $e){ throw $e; ...
1
0e7c949f3f4cb1cd66bf0704a602e706
9935da786f48d67a10829dd659f4f9fb
Заполнить значения свойств класса с шагом нумерации 1.
class dictionary extends common public function __construct() { parent::__construct(); $this->numeral_value_type = range(0, 1000); $this->flip_properties(); }
0
045f0da9a32d230ae42f7761b0b54c09
06a3fd5a3cf4ae4d5880d01b37e94884
adds s2 to the end of s1 and returns a pointer to s1
{ register int i; register char *os1; os1 = s1; for (i = 0; i < n; i++) { if (((*s1++) = (*s2++)) == '\0') { while (++i < n) { *s1++ = '\0'; } return os1; } } return os1; }
0
ea487258280726ba1b6d74976fb32bcf
e469479a101257be14d449a04dd4a8d1
Abre o arquivo do dataset e normaliza as colunas
f = open(fileName) lista = [] classes = [] for line in f: if line != '\n': numbers = [float(x) for x in line.split(",")[0:11]] characteristics = mcol(numpy.array(numbers)) lista.append(characteristics) classNumber = line.split(",")[11] ...
0
bc396003f54685a0375d58b920cc1df8
a13e97489de85c6f688a32b0274ba9ef
Extracts the value from [packed] from the bits found in [startBit] to [endBit].
if (start + UINT24_LENGTH > end) { throw new BufferUnderflowException(); } return ((source.get(start) & BITMASK) << TWO_BYTES) + ((source.get(start + 1) & BITMASK) << ONE_BYTE) + (source.get(start + 2) & BITMASK); }
0
d6298cdfec21d0e7886c548f0865d540
76b27d14e01754b5ca1dbcf8a3870823
按店铺sid查找物品
public Map<String,Object> listBySid(long sid) throws Exception ;
1
9a055ec61b1e75adf3dc670739f2ee14
00b21e148c8218550c330366c866f439
Write Data to DW UART
{ for(uint16_t i = 0; i < length; i++) { wifi_uart.Instance->DR = buff[i]; while(__HAL_UART_GET_FLAG(&wifi_uart, UART_FLAG_TXE) == RESET); } }
1
4c9aa28debe4fb10e0b42412cbdfb68a
948bd97819b0ae899a5c1ae17eabce84
Build cache of trap groups
{ auto BpList = m_BpList; if (m_TrapBp != nullptr) { BpList.push_back(*m_TrapBp); } return BpList; }
0
b54781d4c3dedeca2f19f07a1329fd54
e331c9a8b94b03c52cdba63272435066
Get unvalidDate 结束日期.
public class JctEmpHireVO implements Serializable public Date getUnvalidDate(){ return unvalidDate; }
1
b3b3a924d079558b77740184cbe067e5
1a46b23c39924b958a72d6a89d90e8ee
Acquire's the swap lock so that there isn't concurrent writing to swap
void acquire_cm_lock(void){ spinlock_acquire(&coremap_lock); }
0
283e36a6ee301b111202902c344fc2c3
37858e288cb58348df0292b70dd90137
Deletes the ``Objective`` identified by the given ``Id``.
class ObjectiveBank(osid_objects.OsidCatalog, osid_sessions.OsidSession): def remove_child_objective(self, objective_id, child_id): pass
0
998f246b37555c0815492bd7b8555ec6
392ce8f578c952c50f2c0e81b1395265
Include the active camera’s lens in image metadata
pose = document.descriptor['pose'] iPosition = self.store.metadata['camera_eye'][-1] iFocalPoint = self.store.metadata['camera_at'][-1] iViewUp = self.store.metadata['camera_up'][-1] newp, newf, newv = convert_pose_to_camera( iPosition, iFocalPoint, iViewUp, pose, sel...
0
68c0c609362c5d4ca596a766e44280bc
28d58f885d06f1a2fa4934e0d3ec0a7a
在管理器中删除一列
void ATSysDatabaseControl::manageremove(qlonglong manageid) { _db->exec(QString("DELETE FROM %1 WHERE manageid = %2") .arg(_manageTableName).arg(manageid)); }
0
637b9ec17ad9e526922201b82c6f2175
513320c937560e97ecd1f72fadf64954
************************************************************************************************** ** ~PruDriver() **************************************************************************************************
__fastcall TDLPortIOX::TDLPortIOX(TComponent *Owner) : TCustomControl(Owner) { OSVERSIONINFO os; memset(&os, NULL, sizeof(OSVERSIONINFO)); os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&os); FRunningWinNT=(os.dwPlatformId==VER_PLATFORM_WIN32_NT); char Buffer[MAX_PATH]; GetSystemDirec...
0
964595b9cef7a213c77f74415e9dcee8
7e48a90a4f6ab0d9abd3df3476f0c481
返回此场景已经授权了的第三方百蝠应用的APPKEY的列表
public class ApplicationStateRequest extends PafRequest public final List<String> getAppIds() { return appIds; }
0
9e4016af2cc20d89237144c631c3254d
87afcf4e6e70386a94c21d8f0282e823
Update posters in movie documents.
for term, postings in index.iteritems(): collection.update_one( {"term": term}, { "$push": {"postings": {"$each": postings}}, }, upsert=True )
0
85f72064fbc879e83dbc9b5c465c7497
4670c4923bd00e34c7c02a3bee25fde8
Valor del Precio de un item (Required)
public class Producto implements Serializable public String getPrecio() { return precio; }
1
b756985bfd37d3c7bc8ec109fadc3e94
9ef814a63fb557df189fb803c30b7b32
Add a new transport service
export class TransportService addTransport(transport:Transport){ var headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' }); var options = new RequestOptions({ headers: headers }); var body = 'title='+transport.title +'&status='+transport.status +'&departureDate='+transport.departureDa...
1
e5db227c3c44351665b794a3dedd3f70
06a09a8a6e501f5dc54659e4ddf8320a
根据当前会话不同的状态来显示不同的长按菜单
showEditorMenu(e) { console.log('长按了') let message = e.currentTarget.dataset.message if (message.type === 'tip') { return } let paraObj = { time: message.time, chatTo: this.data.chatTo } let self = this if (message.sendOrReceive === 'send') { wx.showActionSheet({...
1
a2a6c57b2035fbc164c104c81cd08ee9
0ee6d1b59f058c589b55936739dc2c14
給予治癒
{ return HIC+get_name()+"\n Kỹ năng của Bảo thú, tăng 10 % sát thương Ngoại Công hiện tại.\n"; }
0
dc9cf754b1e507de3d7f77b50e18e3b1
535cc93e3ef6d626d76c249a551b2597
This method indicates when the adapter needs to start listening for Firestore
public class MyBooksFragment extends Fragment @Override public void onStart() { super.onStart(); myBooksRecyclerAdapter.startListening(); }
1
60d00c319484e65e9ca7ce9952de3298
29974f529e685867f6e7f76a52c3ea17
Packing the lower triangular part of input symmetric matrix into packed matrix. The strictly upper triangular parts of the input and output are left unused and untouched respectiely.
public static extern int umfpack_di_triplet_to_col ( int n_row, int n_col, int nz, int[] Ti, int[] Tj, double[] Tx, int[] Ap, int[] Ai, double[] Ax, int[] Map );
0
da4db331205db14cdacf0b6020507bb8
88f22c1d64650ce9c1f62626876f57bf
根据建筑id添加设备和模型
class DynamicController extends Controller{ public function addBuildInfo(){ $build['communityId'] = Input::get('id'); $build['type1'] = Input::get('pagetype1'); $build['type2'] = Input::get('pagetype2'); $build['num'] = Input::get('buildName'); $build['unitTotal'] = Input::get('unitNum'); $id = $this->Dynam...
0
d51acbd4f057343a1665e63fb5879c27
28a0f2a0a2e6ddfe4e3f829803f46282
primary_expression : FCONST
if len(p) == 2: p[0] = p[1] elif len(p) == 3: p[0] = node.Node(p[1]) p[0].add_child(p[2]) elif len(p) == 4: p[0] = node.Node('fCall') p[0].add_child(p[1]) elif len(p) == 5: p[0] = node.Node('fCall') p[0].add_child(p[1]) for c in p[3].chi...
0
b83b3c22585817b453a6430c54df920d
c151a366262c5880103669ca6bce6da1
This method is called at the beginning of each frame, i.e., before scene drawing starts.
class MyApp : public Application void HandleBeginFrame(StringHash eventType, VariantMap &eventData) { }
1
7b7c217677bedd1615811afc61a590cd
c12c3962fe3aa2e83aba973a725e834b
Устанавливает тип чека в онлайн-кассе
class eZOnline function setOnlineTypeID( $value ) { if( is_numeric( $value ) ) { $this->OnlineTypeID= $value; } if( is_a( $value, "eZOnlineType" ) ) { $this->OnlineTypeID = $value->id(); } }
0
d0e023a5f6b11f79292f257c2a25a286
7293ae4bd490cbfe521234bccfd0a19a
Lưu một hóa đơn lên server Người tạo: ntxuan 17/5/2019)
class PurchaseFormDialog pushListInvoiceDetailToServer(invoicesDetails) { common.callAjaxToServer("Post", "/purchase/SaveListInvoiceDetail", invoicesDetails, function (result) { if (result.Success) { purchase.getDataFromServer(); } else { purchase.showDial...
1
d3c04390e0bb8a255c74abb39686a7c2
c354af05bbb5443ca66ad57f12d125b8
从数据库中删除登录失败的用户名
@RestController @RequestMapping(path = "/user") public class Login public void cleanFailNum(HttpSession session, String username) { session.getServletContext().removeAttribute(username); }
0
a4ce93fd5e797e3a70edf85812334db7
9cd061e58e96319f0d15cdce1ef421fe
Make unique list and preserve items order
def unique_list(seq): seen = set() return [x for x in seq if x not in seen and not seen.add(x)]
1
d6fc15c3b901f4307326510d6285d01e
4f54ee958e7a80d0d4cc3a8d070cfb13
切换frps运行状态
workDir, _ := filepath.Abs("") utils.Log.Infof("frp download start into %s\n", workDir) frpName, frpUrl := ValidUrlOnOs() frpDownloadPath := filepath.Join(workDir, frpName) utils.Log.Infof("frp download path : %s", frpDownloadPath) utils.DownloadProcess(frpUrl, frpDownloadPath, fb) utils.Log.Info("frp download e...
0
ca6225b7ca2ce9d8a84902cf48c0897d
55feba99980504cd9e2762b795149722
添加新备件信息
{ Model.Base_Euipment newEuipment = new Model.Base_Euipment { InstallationId = euipment.InstallationId, WorkAreaId = euipment.WorkAreaId, EuipmentId = euipment.EuipmentId, EuipmentCode = euipment.EuipmentCode, ...
1
8cb91fb78c7dff05bcf186edf92f72d8
ae5790c9c819b7e88e77c2d9968bcbe5
Populates the {@link ExpandableViewState} for a single child. {@link StackScrollAlgorithmState#visibleChildren}.
if (visible && isParentInvisible()) { return; } if (mCurrentVisibleState == visible) { return; } mCurrentVisibleState = visible; if (visible) { if (!isAdded()) { return; } if (mIsFirstVisible) { ...
0
68dbac1a92bc4001d212fb6ab9d0235c
4f44d78df33f2890659d965b49890194
Checksum should not affect equality of addresses
bool Addr_eq(Addr a1, Addr a2) { return (a1.type == a1.type && a1.num == a1.num); }
0
e0fafa8ad0f422110b0d2fdfc725f5d5
e280a42839d05906cb389f0a18425da2
Sets the maximum page size for the {@code EventStore} reads. <p>Must be a positive value.
void setPageSize(PageSize pageSize);
1
546a9f6887a6369648aa84da05593ec8
bff872e9c343c5e83cbf0429886189f2
消込処理ロジックを設定する 消込処理ロジック
try { this.clearMessages(); addWithhold = new WithholdDto(); } catch(Exception e) { log.error(e); return ERROR; } return SUCCESS; }
0
a40b951e1f271a363ebd0b8e0933953a
86558477e261a55d9d4471e4fcb19fca
从指定的xml配置文件中,读取Ioc依赖配置(如果未指定配置文件,那么从App.config/Web.config中读取)
{ using (var xml = File.OpenRead(DEFAULT_WEB_CONFIG)) return ConfigureWeb(xml, configure); }
1
4b34b11e05526fb28543615aee98973e
2c2ebc93412cad10f2b811ad713b8e72
调用基础数据服务获取配置详细内容失败返回错误
public abstract class BaseController public BaseResult<Object> getBaseResultFail(Object content, String code, String message){ return getBaseResult(content, code, false, message); }
1
f2f1b6203597c13e1a401afe371762b4
d2bbc0627c063615c4e6672717a6fd08
修改选择的商品ID
var goodsinfoID = $("#hidSelectGoods").val(); var str = ""; if (goodsinfoID.toString() != "") str += goodsinfoID; var infoid = str.split(","); $("table.goods tbody tr").each(function (item) { var chkInfo = $(this).find(".chkbox").val(); if ($(this).find(".chkbox").is(':checke...
1
2a3d00f89377b190b22b0cb7250f0cbd
1b01bc6e9b70b8a03223e1286f7ce061
Получаем рандомную строку из файла для ответа
public class Questions public String resRand(byte kol, Context context) { InputStream is = context.getResources().openRawResource(R.raw.resstr); BufferedReader br = new BufferedReader(new InputStreamReader(is)); if (kol == 0) { for(int i = 0; i < new Random().nextInt(2) + 1; i++) { ...
1
964a7850f5a7c4af7611a88842890227
09af78ba80752a9af8bb0ec2d01af75c
添加一条TcrmProblem记录
namespace NF.BLL public partial class Bll_TMC_TECH_CONSULT public bool Add(Mod_TMC_TECH_CONSULT model) { return dal.Add(model); }
0
88658e12b161710718673cb071322b38
49a7e15983f36a8239b73159916d86ac
Show port warehouse load on the form.
class Warehouse extends CI_Controller public function index() { if (IS_AJAX) { try { exit($this->warehouse_model->get_warehouse($this->input->get(), FALSE)); } catch (Exception $e) { send_json(FALSE, $e->getMessage()); } } else { ...
0
3c5d899c9133664e5a8ba269c19686df
c146afb540a90300496d31dd173e4d2e
绑定网格中的结点标志下拉框
{ var dataSouce = DataConversion.ListTypeForEnum(typeof(NodeType)); rbtnStatus.DataSource = dataSouce; rbtnStatus.DataTextField = "text"; rbtnStatus.DataValueField = "value"; rbtnStatus.DataBind(); rbtnStatus.SelectedIndex = 1; }
1
5cd1c5c92d1f54a780a1b8d6d5deaacc
56c6f0abfef5f5495b4edeea6a28c197
获取智联招聘信息
class ZlSpider(scrapy.Spider): def parse_job_info(self, response): zl_table_list = response.xpath("//div[@id='newlist_list_content_table']/table[@class='newlist']") for zl_table in zl_table_list[1:]: td1 = zl_table.xpath("tr/td[@class='zwmc']/div/a//text()").extract() td1 = map(s...
1
d46adb8fe22934c5825cb565670d2fbd
66c6873aacf005805f87346724546d69
返回获得利润的最大值。
class StrategyTest(): def MaxSingleEarn(self): return self.df["profit"].max()
1
6f758f42a46f7b88174186435e23901c
0b2a9339629d41720ea677febdd7052e
returns true when procedure is completed
namespace mixr namespace models bool Action::isCompleted() { return completed; }
1
d326bc3834bd0b565aa07c136f2fc6bf
1d39ffe5d2b474a0a0bbdc2e43496c09
打包源代码
{ $user = $this->start(); $path = Param::get('p'); $code_pack = CodePack::get($user, $path); $code_pack->copyTo($user); $this->redirect('code/index'); }
0
b81f3081ebe59498079d8cca99217eaa
76c259b57899427a6cc9ba1eefbd16ba
删除PROJECT_ALERTING_INFO信息
var httpOptions = { method : 'post', url : common.format(url_creditInfo+"/projectAnomaly/delete"), data : vm.id }; var httpSuccess = function (response){ common.requestSuccess({ vm : vm, response : response, fn : function(){ common.alert({ vm : vm, msg : "操...
0
b14742a7bcf4e13c64fa2bf18ba5b3fd
f3b55b3396a582d374e645f927a40ed8
从购物车减去商品
def sub_product(request): data = { 'status': 1, 'msg': 'ok' } if request.method == 'GET': id = request.GET.get('cart_id') cart = Cart.objects.get(id=id) if cart.num > 1: cart.num -= 1 cart.save() else: cart.delete() ...
1
1f52fafa75c79d85c83babd956e77748
281827890fbcdd7f0e3356fb4d1110cb
队列的初始化, 切记: 链表实现
PUBLIC void init_queue() { printf("init_queue, queue implement by list\n"); return; }
1
bffa4bfb2c327ae7d35921d8314dd7c5
1ad3ac860f1c6b2b13c99f2a6183e84a
Converts edge dict into edge list
e = [] for u in d_g: for v in d_g[u]: e.append((u, v, d_g[u][v])) return e
1
59bbbb13a40f373a84d9f3b0b2d15010
875f28af62d37e0cb43d49d7284e5dcc
判断字符串是否以 $ 或 _ 开头
if (cn.indexOf('$') >= 0) { return true; } for (final String in : ignore) { if (cn.startsWith(in)) { return true; } } return false; }
0
6192987d36fb7a324264ec91f802a751
571c476a590c63d0786ee887bd79f791
Dummy method that is used to preserve compatability with other devices in Labjack Python
class LabJackBIC: def __init__(self): self.jack = u6.U6()
0
d183c9056c94d02d5d6ffbf5f2b0ca67
dcfb08c2f986bb77d6e9f8c3af33ab26
Syncronize a single user immediately with a specified directory.
namespace EasyShop.Services.Controllers public class UserController : BaseController [HttpPost] public bool SyncUserFromActiveDirectory([FromBody]int userId) { return _userService.SyncUserFromActiveDirectory(userId); }
1
7be2e5fd6937b95669116a77c1c55700
0950f37f0672db67d6f70211170a9cd6
Returns TRUE if Doctrine is enabled.
{ try { Yii::$container->get(ORMInterface::class); } catch (InvalidConfigException $exception) { return false; } return parent::isEnabled(); }
0
05bdc99d5cc289c7e3a774fc7214ce12
45cd7dc3627edead8ab32973471753b5
Ordinal encoder of categorical features
ordinal_encoders = {} for col in ordinal_cols: ordinal_encoder = OrdinalEncoder(categories = "auto", dtype = int) df[col + "_ordinal"] = pd.DataFrame(ordinal_encoder.fit_transform(df[[col]]), index = df.index) df.drop(col, axis = 1, inplace = True) ordinal_encoders[col] = ordinal...
1
2f80963014c1485f0bae9de100bfd050
05f612287019622cbb17a24d88ee4788
Returns ordinate M of the specified coordinate if available.
namespace NetTopologySuite.Geometries.Implementation [Serializable] public class PackedFloatCoordinateSequence : PackedCoordinateSequence public override double GetOrdinate(int index, int ordinateIndex) { return _coords[index * Dimension + ordinateIndex]; }
0
056d5210e8b4067c4abcccb44b7a77cf
517eb950411bb6d8214e5968e868b5ab
Returns a tokens list for given time period.
namespace PowerBIDotNet Tokens GetTokens(Client client);
0
d0fe8f81a486ef3db7102ea10d428611
2b8f0b72e3cb9edeb2896988c6f57c8b
카테코리를 반환하는 메서드. 만약 DB에 없는 카테고리를 사용하려는 경우, DB에 저장 후 카테고리를 반환한다.
public CategoryDTO takeCategory(String scode) throws SQLException { CategoryDTO cdto = mainDAO.takeCategory(scode); return cdto; }
0
780e6dbe2c8430e6c3be19e96824fd89
2a41a51298f4599392853fce8e405447
explore the world to make sure it is valid (there is a path to the gold) uses BFS with graph-search
namespace Gridworld_Heuristics class Naiive public bool hSearch() { worldNode currentNode; setup(); while (fringe.Any()) { currentNode = fringe.Dequeue(); if (currentNode == worldNodes[endx, endy]) { ...
1
4b99a92374ae171e2e75bd0b8daf6c84
367f781483a7ef057e0ea24138df5d35
Getter for the matrix of Destination Demand Adjustment Factors.
public class AlgorithmRegOAR25D2 extends AlgorithmBase public float[][] getTrans() { return trans; }
1
5b1e8148245cf6eadfc9fbdf4d65ba32
43a42eba1ff5814179b85852d4fe7b64
Получение списка диагнозов
class DiagnoseTreatController def get_diagnoses @diagnoses = MedicalDiagnose.select(:id, :title).where(:diagnose_type_id => params[:type_id]) diagnoses = {} @diagnoses.each do |di| diagnoses[di.title] = di.title end render :json => {:medical_diagnoses => diagnoses.as_json} end
1
c18fff964035274b5829985cf407c02a
921046fbb259907cd6170b2cb4cdd12c
Flips video for upside-down camera
def gen_flipped(frame): return cv.flip(frame, 1)
0
9d1821e6fbb235f2de3952f5f78adead
3d6b8a7617795065cec4ffe02056c1ab
Notifies that a debugger has connected to the websocket
{ mDebuggerConnected = connected; if (connected) ++mDebuggerSessionNumber; mDebuggerActionForceBreak = false; mDebuggerActionStep = false; mDebuggerActionStepOver = false; mDebuggerActionStepOut = false; mDebuggerActionRun = true; mDebuggerBreakLoopGuard = false; mDebuggerBreakFuncCallStack...
1
2e00687b46c651eabccc0c6204025f78
1a88f285298b7aa06f0e40a0a710a103
Converts a string to an integer. Assumes s is something like "-231" and produces -231
def convert2(s): try: return int(s) except (ValueError, TypeError) as e: print("Conversion error: {}".format(str(e)), file=sys.stderr) return -1
1
4b3d2f63b8d8b5890e6b64d4045babb9
ac8213e7bdd89a70ef9ab2ac82b98164
Transform the given location info (i.e. Latitude and Longitude ) to the Location link data. The User will be able to see the given location on Map upon scanning the QR Code.
function transformLocationInfo(body) { if (body.meta) { transformLocationLabel(body); const { meta } = body; delete meta.parent_location_key; let parentFields = ['client_continent', 'client_country', 'client_region']; const { type } = meta; if (type === 'region') { parentFields = parentF...
0
9a6571b6fdb9387907045ee21bb82f19
9b812937d6ca156f269fd9e156a11d95
Updates the number of current commands.
public class ByeCommandResponse public void setNumberOfCommands(int numberOfCommands) { this.numberOfCommands = numberOfCommands; }
1
8083ff8632aec025a8988e9ebda965ab
b10cbac585234eb6f3535023004664cf
根据禁忌id,查询禁忌食物id
public List searchOrderByFoodId(String foodId);
0
0306d9919ae3424b8f99a35e1717eaa8
173f0afe8b6a5ab736777ea24232f71a
鼠标放到物品上时,加载详情界面
public class BagItem : MonoBehaviour,IPointerEnterHandler,IPointerClickHandler,IPointerExitHandler public void OnPointerEnter(PointerEventData eventData) { if (bagControll != null) bagControll.ShowItemDes(ItemDesStr); }
1
e167a95367f8153650b40082e04e92ba
2f05842d179315cde3d1fb2dc6c9384b
根据关键字解析数据放入es中
public void loadDatatoEs() { String key = null; boolean saleable = true; int page = 1; int rows = 100; long totalPage = 0L; do { PageResult<Spu> spuPageResult = goodsClient.querySpuByPage(key, saleable, page, rows); totalPage = spuPageResult....
1
2f8652f4f4e699dcb75c0a8e0646ad9f
ad96213fdf727dd6379470cae9b8ff52
cuts a hint from question hint list and stores it to ordering clipboard
class qtype_order extends question_type protected function make_hint($hint) { return question_hint_with_parts::load_from_record($hint); }
0
74d7e6f2b0c0629f85684f10de26f3c0
51ad1cd8fc1c4216991b79cd681ee008
Estimator that takes a column of strings, and converts them into a column of integers, representing the word count of each string
class SpecificWordCounter(BaseEstimator, TransformerMixin): def __init__(self, word): self.word = word.lower()
0
edee3e4c4f9a563ca0a7a25f72e2fba9
62ce9ca299498e0d00c0832624670e06
Añade una fila vacía al final de la tabla.
var $tab_en_edic = $("#" + tabId); var $filas = $tab_en_edic.find('tbody tr'); if ($filas.length == 0) { var $row = $tab_en_edic.find('thead tr'); var $cols = $row.find('th'); var htmlDat = ''; $cols.each(function () { if ($(this).attr('name') == 'buttons') { ...
1