query_id
string
corpus_id
string
query
string
code
string
label
int64
7a3185f61bf1d3465b38fd264e212bb2
212b4053ba62f0fc384bf8b0cf4845e0
根据客户No删除
@Service public class CstCustomerServiceImpl implements CstCustomerService @Override public int delCstCustomerByNo(String no) { return cstCustomerMapper.deleteByPrimaryKey(no); }
1
69ff79c2b525919b7d70ca08eb03b1f2
9aa19aa349ff31216c5ec15de8b2fc7b
Returns a set of filename patterns corresponding to library names. For example, "advapi32" would be expanded to "advapi32.dll" by MsvcLinker and to "libadvapi32.a" and "libadvapi32.so" by GccLinker. array of library names
{ switch (InBinaryType) { case UEBuildBinaryType.DynamicLinkLibrary: case UEBuildBinaryType.Executable: return new string[] {".pdb"}; } return new string [] {}; }
0
8f596e544d661fdbab9cb7fd9ffc3ce1
44195953b206a14fb89e252b86499699
Returns the start pointer of a file.
public static partial class Storage public static long GetFilePointer(SafeFileHandle fileHandle) => SetFilePointer(fileHandle, 0, MoveMethod.Current);
1
83106bb06b2bb8944a5f491738ab3ff7
2422e6a26e8f44cf81a6daf2102ef897
Laedt die Daten einer einzelnen Forex-Handelsstunde und gibt sie zurueck.
class Data(object): def get_k_line(self, date_time): url = 'https://api.bittrex.com/v3/markets/{}/candles/{}/historical/{}'.format(self.symbol, self.interval, ...
0
9e6319ae153cbed0316dff7d428f5418
e5feaea3df7f57690a507d40a1b24a37
Enter a parse tree produced by MCParser#list_para.
class CListener(ParseTreeListener): # Enter a parse tree produced by CParser#translation_unit. # @param ctx Type: CParser.Translation_unitContext def exitParameter_list(self,ctx): pass
0
d643b572eefe9495d70716d4870d90b6
d40a263c7a457b4abecdc0480cce3c8f
检查伙伴所属海
local owner = ai_obj:getOwner() local battleData = getGameData():getBattleDataMt() local target_obj if target and target >= 0 then target_obj = battleData:getShipByGenID(target) if not target_obj then return false end end if ( not (math.abs(1024 - owner:getPositionX()) < 160) ) then return false end if ( no...
0
fffc2d2bd5da36975bd57c91f9be283d
6e2aea94d6d8677d4336eb95e57d5f6e
질환 관련 뷰를 숨김
function hideAll(){ $("#hs").hide(); $("#de").hide(); $("#cy").hide(); $("#nm").hide(); }
1
0d99eb535a4f58102ba124eee64195cd
da7d01977e5043e34a45a38456045a23
Bad character heuristic: how far to slide the pattern forward when a character does not match
def generateBadCharShift(term): skipList = {} for i in range(0, len(term)-1): skipList[term[i]] = len(term)-i-1 return skipList
1
2eea065565f81f77510212d3283e8a8b
d9a4fb9e5ea42ca303e31d8386fd6c08
callee側のreturn_varに対応するpa_objectを探し、 その指し先をcaller側の関数の左辺の式に追加する
def return_last_function_assignment(topconstruct): items = query([ is_layering([syntax.ASSIGNMENT]), at_indent_0_from_function_program, last_program_step ], TreeItem(topconstruct)) for item in items: if item.construct.args[0].construct == syntax.PY_TUPLE: ...
0
9b11a9ef1ac0f4e7ba88a7b8c7263690
0d7aac82fa6d475bbe84355c4ea5dbe2
当用户连接,维护connectionid字典
if self.factory.number_of_connections >= self.factory.max_connections: self.transport.write('Too many connections,try again later') self.transport.loseConnection() return self._buffer='' self.factory.number_of_connections += 1 print 'New Client,ID: ', ...
0
5e2ff326cacb27f7665b1090686e1535
a54b1e123b8dd2c1e570b3792abf493d
This is called to determine whether the node should be drawn. immediate base class assumes that this class represents scenery.
{ Drawable* drawable = node->getDrawable(); if (drawable) drawable->draw(_wireframe); return true; }
0
db5a6cc59c83333144cb26280c8533b2
db71b7ed8314497a5277abb981d4a270
Handle pole wraparound.
def wrap_index(x, length): while x < 0: x += length while x >= length: x -= length return x
1
d279966c2baba7e3c959fca08813ebb5
b9ca50ce76965e4876ffbcc315ab8a4f
MAIN - Populates this instance with setting values from config file. Called as soon as the options are needed (lazy loading).
{ m_PSPDir = m_settings.value(OPTIONS_PSPDIR, "").toString(); m_backupDir = m_settings.value(OPTIONS_BACKUPDIR, "").toString(); m_ffmpeg = m_settings.value(OPTIONS_FFMPEG, "").toString(); m_firmware = m_settings.value(OPTIONS_FIRMWARE, "0").toInt(); m_threads = m_settings.value(OPTIONS_THREADS, "1")...
1
5ea4048eb52bf748b34810168f7db155
251b8cccd12fa2a2e0009f70061e183b
Gets the csv table.
[OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] MemoryStream GET_TABLE(MemoryStream xml);
0
99b72a396cf1bc42dd710a5bacb2628c
512ad00791aeb941ad05d90f2bae39b2
Remove key-value pairs in an array by their keys.
public static function arrDelete(string $key, $keys): void;
1
dd0ad4e066a0bd07f5d0d96a5da6f2fd
420448d46cee029863a30b3eec4a1da6
esta función se encarga actualizar el listado registro de actividades del usuario seleccionado.
function activities_list(){ $q = $fm -> newFindCommand('Activity'); $layout_object = $fm->getLayout('Activity'); $field_objects = $layout_object->getFields(); $q -> addFindCriterion('userid', '=='.$_SESSION["id"]); $r = $q->execute(); $record_objects = $r->getRecords(); $arr=array(); foreach($reco...
0
444c500c58cfb9ee2f7c753ef8d2dd57
6737ab50473e6912444eefb9c5dde341
Get 执行时间。单位为:ms。表示筛选执行时间大于该值的审计日志。
public class AuditLog extends AbstractModel{ public Long getNsTime() { return this.NsTime; }
0
582fb215e703c2fc637092da693c1cd5
76402ab9de27b631f04f942ad09adc79
선생님의 퀴즈 목록을 가져온다
String sqlString=null; ResultSet rs=null; dbconn dbconnObject=new dbconn(); Connection dbconn=dbconnObject.getDBConn(); if(dbconn==null||teacher_id==0) return null; try{ sqlString="select* from teachlession where teacher_id=?"; PreparedStatement preSqlSelect=dbconn.prepareStatement(sqlString); preS...
1
b1a5e0a4d3773ad1d916e49348f15bee
f9acd129650a7ad13ef64555568bcb90
GET: BIC
{ BancoServicioClient psc = new BancoServicioClient(); ViewBag.listBancos = psc.findAll(); return View(); }
0
0664e7f86354ad1f1c84e571f39d66de
557155d2a8ceb362fb56b096fb87aaa1
Future Value of Annuity Due
namespace NumpyDotNet public static class npf public static ndarray pv(object rate, object nper, object pmt) { return _pv(rate, nper, pmt, 0, "end"); }
0
8a45a34e5923eed9c8e66911e38b1a84
0fa73af38e79212dac41838250093888
Initializes the top bar
void top_bar_init() { wattron(top_bar, COLOR_PAIR(C_BLACK_ON_WHITE)); for (int i = 0; i < COLS; ++i) { mvwprintw(top_bar, 0, i, " "); } wattroff(top_bar, COLOR_PAIR(C_BLACK_ON_WHITE)); wrefresh(top_bar); }
1
a29e9f1b143264ee2e0713b948b7b490
86f9512288c7fd17bd3e606bf1c51a05
获取未收货的订单,并更新状态
userid = request.session.get('userid') if not userid: return redirect(reverse('app:login')) else: orders = Order.objects.filter(user_id=userid,status=PAYED_UNRECEIVE) return render(request,'order/order_unreceive.html' ,{'orders':orders})
0
a0cd59a8976f128d42c1e192245bb1d8
4fe51bbe19f05c4e5c94610ad12c7e10
Sets the function of the source to voltage or current
class DS1000Z(vxi11.Instrument): def set_measurement_source(self, channel=1): channel = self._interpret_channel(channel) self.write(":MEAS:SOUR {0}".format(channel))
0
8945820eb2ae072950ce46e59c8f9343
5704d28a48ec6424ef1133f3184a4937
判断某账户是否属于某团队API
{ $request = Func_Input::filter(array( 'account_id' => 'int', 'group_id' => 'int', ), $args); if (empty($request['group_id']) || empty($request['account_id'])) { return Api::request('error', '', '缺少参数或者参数不正确,请检查参数合法性'); } $co...
1
201faf28323cbc6a09a325848bafa861
df841af206d7167394adf74b2edd3754
Specify whether to show the first traversed path (BLUE line). By default first path is not shown as it is not applicable for most of the AI algorithm, except for FloodFill
public class ConcreteGuiViewPanel extends JPanel public void setLineInit(boolean b) { lineInit = b; }
1
0ab635541c6b20af635c8ab52d7ae3fa
7a1d6fba15ba066b69913fc2a31dcaf6
<p>Escapa las entidades básicas de xml.</p> <p>Basada en la clase StringEscapeUtils de commons-lang pero sin cambiar los caracteres unicode.</p>
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "httpHeaders", "requestId", "arguments", "requestProcessingTime" }) @XmlRootElement(name = "OperationRequest") public class OperationRequest private String escapeXML(String string) { StringBuffer sb = new StringBuffe...
1
af10774c442855c073fd947a7396865c
f9d7f32a15dba748f3dc2dc4f2dce59b
Deletes Blob Container.
class AzureBlobDelete(BlobBase): def delete_container(self, timeout: int = 10) -> bool: self.container_client.delete_container(timeout=10) return True
1
0151e1fdbead4e339439a659260bf4e7
97f25a34b3ec4462a3680ce558ae47b8
Stops the UDP echo server thread
{ int ret; if (udp_sock > 0) { k_thread_abort(udp_thread_id); ret = close(udp_sock); if (ret < 0) { LOG_WRN("close() failed: %d", -errno); ret = -errno; } udp_sock = INVALID_SOCKET; } return 0; }
1
99602ea54a0c192499f32d288571a9fc
32d41086bc1c2288520a0f91551cac7d
Returns users who've reported the issues or their comments as spam. Returns a dictionary {issue_id: (issue_reporters, comment_reporters)} issue_reportes is a list of users who flagged the issue; comment_reporters element is a dictionary {comment_id: [user_ids]} where user_ids are the users who flagged that comment.
url = self.reddit_session.config['ignore_reports'] data = {'id': self.fullname} return self.reddit_session.request_json(url, data=data)
0
aecbd54c9bcce2ba3199472954bd8b6c
75ec78eeae0d332862b846720daecfa5
@brief SH1106 initialization
uint8_t sd1306_init(void) { if (sd1306_send_command(sd1306_ADDR, 0xae) < 0) { return 1; } sd1306_send_command(sd1306_ADDR, 0xd5); sd1306_send_command(sd1306_ADDR, 0x50); sd1306_send_command(sd1306_ADDR, 0xa8); sd1306_send_command(sd1306_ADDR, 0x3f); sd1306_send_command(sd1306_ADDR, 0xd3); sd1306_send_command...
0
187f20e5d5e5e5e8ed61f86e5e8f4aed
673694bb6892a8201f09b8157fe4800d
@brief Enables or disables the ADC peripheral.
void ADC_Cmd(ADC_TypeDef* ADCx, FunctionalState NewState) { assert_param(IS_ADC_ALL_PERIPH(ADCx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { ADCx->CR |= (uint32_t)ADC_CR_ADEN; } else { ADCx->CR |= (uint32_t)ADC_CR_ADDIS; } }
1
74cdd551bbbd046e964574f0565cf388
e91f1db625eda23082c006fff7ab2133
Get the first field that matches with fieldName.
ListNode *node = self->fields; while (node != NULL) { ObjectField *field = node->value; if (!strcmp(field->name, fieldName)) break; node = node->next; } ObjectField *field = node != NULL ? node->value : NULL; return field; }
1
556c9c4ba71699b579cce6f0f4186044
f1847f91f02ce938de79f89a5d6ebaac
Allows exporting to JSON directly as Unicode.
def jsondumps(*args, **kw): kw.setdefault('use_decimal', True) return simplejson.dumps(*args, **kw)
0
e982ca658ed3eeff748002574384bf09
e76e161921897f4157fad14019b3e064
Inform the children of the matrix change.
namespace Matrix public abstract class Matrix<T> protected virtual void OnMatrixChange(MatrixEventArgs e) { var temp = this.MatrixChange; temp?.Invoke(this, e); }
1
2939c0291f4d7513604e21c20919c960
7c10018e2f5920151d543c375d292be7
获取秒杀支付报文
{ Dictionary<string, string> biz_content_info = new Dictionary<string, string>(); biz_content_info.Add("timeout_express", "30m"); biz_content_info.Add("seller_id", ""); biz_content_info.Add("product_code", "QUICK_MSECURITY_PAY"); biz_content_info.Add("...
1
a7d7c011c4a1d1bfe164fa271b124a11
08edd3065e384eac38ca71b898015e59
this function applies DFS search and returns the order in which they are visited
visited_order = list() visited = set() q = list([start]) while q: vertex = q.pop(0) if vertex not in visited: print("visiting ", vertex) visited.add(vertex) visited_order.append(vertex) print ("---...
0
fddc2c7d07e9511175b3f217e08543ed
3216bd4c594e5988da1a26661d91628d
funcion para obtener los usuarios que coinciden con esa cadena
class Usuario public function busquedaAproximada($textoBusqueda, $seleccion) { $result = $this->db->consulta("SELECT * FROM user WHERE $seleccion LIKE '%$textoBusqueda%'"); return $result; }
1
2e461e06be424d5b9335c74da1b6a6b0
e238672048c0b6d1f74e18e99f3979b7
Adds a YoVariableRegistry to the robot. Will be added as a child registry to the robot's registry.
def add_toolregistry(trs_id): set_yaml(section='toolregistries', var2add=trs_id)
0
b248b09f065d0d494c16082b916fc34f
37f515b5223284712c227dd1395d1362
Returns coordinates for hinge location
namespace Tao.Ode public sealed class Ode [DllImport(ODE_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity] public extern static void dJointGetHingeAnchor(dJointID joint, ref dVector3 result);
1
2f72928ba5117426db21e6302d547516
fb18f5c179d727e78f09686eeb38708b
set data for the header of the schedule
public void onBindViewHolder(ViewHolder holder, final int position) { Schedule schedule = mScheduleList.get(position); holder.text1.setText(schedule.getDate()); String text2 = Double.toString(schedule.getMorningtime()); holder.text2.setText(text2); String text3 = Double.toStr...
0
2aa0e4f525b136a0dbf245b349974c40
cb3b7ba0b4fac0a9e213e669cb2dcd85
Возвращает ассоциативный массив с информацией об офисе оператора с предоставленным идентификатором записи в `mfc`. Если информацию об офисе невозможно найти, возвращает пустой ассоциативный массив. идентификатор записи оператора в `mfc` результирующий ассоциативный массив
employee = operator_employee(operator_id) office_id = employee[:office_id] os.offices[office_id] || {} end
1
b80526a1ba557c67fb55fabd4611f5ac
cb8fb597b8af63f286f0645fc85c3239
POST: ServiceProvider/Create
class ServiceProvidersController def create @service_provider = ServiceProvider.new(create_params) respond_to do |format| if @service_provider.save format.html {redirect_to @service_provider, notice: "Service provider was successfully created. Please save app_secret(ONLY SHOW ONCE). app_secret: #...
1
8fe4d28e995842951cb6c48fcf539994
0aae09a39880bd6191f6e376e614d1b9
Specify the number of threads to provide information for (default: 3)
public class SolrIndexRequest public void setNumberOfThreads(Integer numberOfThreads) { this.numberOfThreads = numberOfThreads; }
1
bc63dc324b0307eadc81f53cb83cd0ff
93983510e86aefa23b3f4b56e79eca88
Asettaa tunnusnumeron ja samalla varmistaa ett� seuraava numero on aina suurempi kuin t�h�n menness� suurin.
public class InvoiceNumber public static void useInvoiceNumber(int invoiceNumber) { int lastNumber = AppPrefs.getLastInvoiceNumber(); if(getLargerNumber(lastNumber, invoiceNumber) == invoiceNumber) { AppPrefs.setLastInvoiceNumber(invoiceNumber); } }
1
f00d7bc234206fc8a24338dd11a8bdd1
39a6cdb1a05d14dc7a0bc715305ed95b
Produce final output form from data returned from a controller method. See the expose() arguments for more info since they are the same.
$type, $func, array $templateParameters = [], $template = '' ) { $templateExtension = $this->determineExtension($type, $func); if (empty($template)) { $template = $this->getViewTemplate($type, $func); } $request = $this->requestStack->getCu...
1
fd9ce78db7d0b670cb17ae2b161cd641
a6af4e9783fc5422764e476109e9bce3
Function doc 统计 淘宝多店 商品价格抓取情况
{ $data = array(); $mom_record_count = 0; $mom_num_count = 0; $mom_all_record_count = 0; $mom_all_num_count = 0; $mom_fenxiao_num_count = 0; $fenxiao_num_count = 0; $fenxiao_record_count = 0; $khmc = ''; $mom_end_time = ''; $sql_main = " SELECT tt.shop_id,ti.outer_sku_id,S...
0
e3df770af3c078471695b381aabf04b8
d0d666607717335a82712c3d68a7b5fe
从传入的url中解析处文章的标题和正文,并保存在一个html文件中
def get_text(url): r = requests.get (url) r.encoding = 'UTF-8' selector = etree.HTML(r.text) title = selector.xpath('/html/head/title/text()') text = selector.xpath('//*【@id="content"】/text()') with open(path + title[0], 'w', encoding = 'UTF-8') as f: for i in text: f.write(i)
0
df894d3e290203e5c7aa69040e7e07fc
27fe77848e1d65bd973f592522b0f3b8
网名长度不能超过10
WordLen10(e, Message) { let value = e.target.value; if (value.length > 10) { e.target.value = value.slice(0, 10); Message.error('最多10个字'); } }
1
89144e5ea07c3df062ca5ea490e175d5
e1273e28891e29f8499697af91bdd663
Exits the secret menu screen and opens the main menu screen
public class StartMenuScript : MonoBehaviour public void OnExitPress() { quitMenu.enabled = true; startMenu.enabled = false; }
0
a07b888b181243f568a614f670ebb52e
cf1e9f557a8f38efe3df966a97ef7dc1
Opens the controller code file.
{ $codeFile = new GeneratorCodeFile( $this->getControllerFile(), $this->render('controller.php') ); $codeFile->operation = GeneratorCodeFile::OP_OVERWRITE; return $codeFile->save(); }
0
6242661437a99cc3fcafd7e0ededc0f4
5cb3f90f9f7644335f7d11db5540aaae
Perform packetwise weighted round robin
public class IPRouter implements IPConsumer{ private void wfq(){ FIFOQueue queue_to_serve = null; if(lastServicedQueue ==null){ double lowest = 10000.0; for(IPNIC ipnic: inputQueues.keySet()){ if(inputQueues.get(ipnic).peek()!=null){ if(lowest > inputQueues.get(ipnic).peek().getFinishTime()){ ...
0
a28642582fb2434a676692ef5e583c86
a3b0f2f91d8cd4b19121a539880b9d01
Parse basic LLDP parameters from an LLDP packet payload. Based on github code by GoozeyX (https://raw.githubusercontent.com/GoozeyX/python_lldp/master/ \ lldp_collector.py)
hostname: str = '' hwaddr: str = '' ipv4: str = '' product: str = '' fwversion: str = '' uptime: str = '' addresses: str = '' for t in packet.TLVs: cur_type: int = t.Type if cur_type == 0x0b: hostname = t.value_to_str() elif cur_type == 0x0c: ...
1
e05df174f05e28f38ee143da230ffd92
717416de0b8fe2f533bf406538cc1c25
导师服务回调
class UsersController extends Controller async tutorCB() { const sigcontent = this.ctx.headers["x-keepwork-sigcontent"]; const signature = this.ctx.headers["x-keepwork-signature"]; if (!sigcontent || !signature || sigcontent !== this.app.util.rsaDecrypt(this.app.config.self.rsa.publicKey, signature)) return this....
1
8f2984c44d76dc25f8ec8183dffdccc4
7567d2517bbd4c15bb5f890eddf37889
Adds the dependency (and the data node) to model the constant data required for the evaluation of the condition function.
final String dataString, final DataType dataType) { if (UtilsAfcl.isSrcString(dataString)) { return addConditionInDefault(graph, conditionFunction, dataString, dataType); } else { return addConditionInConstant(graph, conditionFunction, dataString, dataType); } }
1
61a1dfa6efcbf4c107d14ffbeeaf3938
460e3db9850bb455a58a7711b89d1968
Length of the vector in bits.
impl<T:Clone> BVec<T> pub fn len(&self) -> usize { self.v.len() }
0
a5f42c3102d038717afb4560fd7f102d
a0e8dc66a4a6fc505a2999bab9432af4
Wrap an estimator so that its transform function mirrors the predictor.
class H2OEstimatorTransformSupport(BaseSklearnEstimator, TransformerMixin): def inverse_transform(self, X): if hasattr(self._estimator, 'inverse_transform') and callable(self._estimator.inverse_transform): return self._estimator.inverse_transform(X) raise AttributeError("{} does not support ...
0
5a2328ac1a97613bb991b33741d9aa6b
464e78afcc0645d3008f1c5c86186741
Just to make sure the ByteCodeCastle is loaded
public class TestBCSimpleDigest @BeforeClass public static void loadBCProvider() { Security.addProvider(new BouncyCastleProvider()); }
1
12256466b8c08b61e9b635b0d67d8cf2
764145ddf9614c6ce36066a868984a89
Increment the counter for the number of executed instructions
void InsCount() { icount++; }
1
56a58ddd2224b9325bf63292a3d28dee
f91333ac177a3adfd20ee3db046821ff
Returns the electric vehicle connect filter.
FilterConnection createFilterConnection();
0
89bda75c079e1dbac7aee2b4b3e2d9c6
ad5a87b5e0f710a9363f850d904fe44f
Since we accept with or without / on end
function makeRouteRegex(route) { route = route.replace(/(:[^\/]+)/g, '([^/]+)'); if (route.slice(-1) == '/') route = route.slice(0,-1); return new RegExp('^'+route+'/?$', 'i'); }
1
310d2cca46ba27182a43038a2473d7da
5e3340d574991ae23206124fbccbee27
Load the business config for the given id
func BusinessConf() (map[string]interface{}, error) { return LoadConfig("conf/json/business.json") }
0
c13899776eeca9bfa224b2cfad0a3710
8509ce191c2def1b3244fd2d5e6d88d8
Compute the boolean union between two cross-sections, assigning the result to the first.
SuperBin::bor( const SuperBin &rhs) const { SuperBin const *operand = (this->size() > rhs.size() ? this : &rhs); SuperBin result = (operand == this ? rhs : *this).cast(operand->size()); for (unsigned int i = 0; i < result.size(); ++i) { result.m_number[i] |= operand->m_number[i]; } return result; }
0
233ba04ae6aac63ac5f1708d9ed50e24
13c187e04f70a6f1be9d32b1ba7cae1e
allume toutes les leds, en RGB par defaulte
def enableAll(lux = 4095): enableLED1(lux) enableLED2(lux) enableLED3(lux)
1
d30a605649a1f41a721ab208393f90ae
40833e246c94ab7ab602bde5876a18df
Calculates cylinder volume // Calcula o volume do cilindo
public class Main : MonoBehaviour public float CylinderV(float D, float h) { float r = D / 2; return Mathf.PI * Mathf.Pow(r, 2) * h; }
1
3ee46835b8fdc71a5080c6d7a5790c68
5f81ba00e07daa2affd2007e3dcbff84
Wait for TXIDLE flag to be asserted
am_util_stxetx_rx_wait4start(void) { uint8_t ui8Current = {0}; while (1) { AM_UTIL_STXETX_RX_RCV(&ui8Current); am_util_stdio_printf(" 0X%2.2x", ui8Current); if ( ui8Current == STXETX_STX ) { return true; } else if ( ui8Current == STXETX_DLE ) ...
0
82352ed2f9462d90ccf071941dab37e0
bf0455ce04ba7ee12acd14e2d3afdffb
Appends and returns a new empty "List" element
public static partial class list_package public static ptr<List> New() { return @new<List>().Init(); }
0
b657b3178bc2d1d90f42ccec58797e56
74e39da87b644d76cc6a8fdf97397091
全角整数文字列を半角整数文字列へ変換する. 与えられた文字列が全角整数文字列でない場合は、 元の文字列を返す.
if (str == null) { throw new IllegalArgumentException("Method argument 'string is null."); } StringBuffer stringBuffer = new StringBuffer(str); for (int i = 0; i < stringBuffer.length(); i++) { char character = stringBuffer.charAt(i); if (character >= ...
1
6f42c5500c0a7878f430c8dfae1c42a3
1a56f84d479c110694539c1f7123d32f
非圧縮性超弾性体 第2Piola-Kirchhoff応力, Greenひずみ
ExtendedTri tri, double ixx, double iyy, double ixy, double nu) { var f_psi = new double[6]; var f_phi = new double[6]; var gps = ShapeFunctionHelper.gauss_points(6); var d = new double[2]; var h = new double[2]; for (int i = 0;...
0
f2ea6d02e9b91da22f98a96aad4e64f8
a3699645ac618bbe251f115e30ffc09f
Will return the average result for the amount of rounds that have been played so far.
public class BoardRecord double getAverageScore() { return score / tryCount; }
1
21f7b99f860517c74ea5ba0b38d256f6
d63defa588637452be9833ed9ce4ef81
Add agent to given department Agent will be removed from current department
{ Department oldParent = this.Department; oldParent.Staff.Remove(this); newParent.Staff.Add(this); this.Department = newParent; }
1
2cb0e29cdcffc6b61c294e2243a5e671
ed05c614480e75d5cee55b0fcd0ef2ff
Test case for obtener_cantidad_en_pais_en_ciudades_en_anio Dado un pais origen y un año obtiene la cantidad de turistas salientes de ese pais durante ese año dividido por ciudades origen
def test_obtener_cantidad_entrantes_ciudad(self): query_string = [('CiudaDestino', 'Valencia'), ('Anio', 2009)] response = self.client.open('/server/Aena/VuelosSalientes/ObtenerCantidadEntrantesCiudad/{PaisOrigen}'.format(PaisOrigen='Belgium'), ...
0
55f40e34b448611987ef2b00c5545aa9
d7ec2ed0949d524c27a48c2155ad1a75
System init. We don't allocate the registry until first use. Make sure we do this before initializing JDWP.
{ if (!dvmBreakpointStartup()) return false; gDvm.dbgRegistry = dvmHashTableCreate(1000, NULL); return (gDvm.dbgRegistry != NULL); }
1
e907126e67ffbd7f44883c1c62d8b9e4
1019561012c71d65c676f7a00cd365db
Ensure gcloud CLI is installed
try: check_call(['gcertstatus', '-quiet', '-check_remaining=1h']) except subprocess.CalledProcessError: print('Run prodaccess before executing this script.') raise
0
c31d9a5e922c1d145391c2270ee40452
35fbc9216516cfabf60e36a2f9a9e99f
이미지 파일의 확장자 타입을 가지고 온다
class Image private function _getImageType($image) { return image_type_to_extension(exif_imagetype($image)); }
1
0852cec9ea6170bb1a3666a5864e8c0b
3c13639d9b94a290df3072c3e8f75490
manually execute "Given" and "Then"
class PhrasedmlTestCase(unittest.TestCase): def test_execute(self): inline_omex = '\n'.join([self.antimony, self.phrasedml]) te.executeInlineOmex(inline_omex)
0
10c2b6b2e35f496dfe3f091fe6603ac2
8d6f9dd4a9dc04cee387004a31d8f587
Ensures the splitter is at a minimum distance.
namespace AquaSift_V_00_01 public partial class AquaSift : Form private void spcSub1_SplitterMoved(object sender, SplitterEventArgs e) { if (spcSub1.SplitterDistance > tabControl1.Width + 5) { spcSub1.SplitterDistance = tabControl1.Width + 5; } ...
1
cbe2f97bbc6755025f925bd01fd42747
9545889ad409dae2bd0711551bf83267
● 停止時の更新
class Game_Event def update_stop super update_self_movement unless @move_route_forcing end
1
5aec257fc64027ef65140db208f3f213
0770a9b2b3bf40d05e8746eba606d67a
Put an integer into the buffer in big-endian byte order.
public class DCEBuffer public final void putInt(int ival) { if (m_buffer.length - m_pos < 4) { extendBuffer(); } DataPacker.putIntelInt(ival, m_buffer, m_pos); m_pos += 4; }
0
3692125c058edc6e95bd608254a19050
2fd4912fc5dab597fc675c6224426649
迭代法获得阈值
def get_iterative_threshold(im, filt=None): if filt is None: filt = np.zeros(im.shape, dtype=np.bool) filt[0, 0] = 1 filt[0, -1] = 1 filt[-1, 0] = 1 filt[-1, -1] = 1 oldT = -1 T = -2 while oldT != T: oldT = T O = im[filt] B = im[filt == Fal...
1
b68965b14d95f078602e028400b6a02d
e2428e764f9cf5765df8598c8aec4000
<p>Tax rates and subrates of states and countries. Each TaxRate in the array has a unique ID.</p>
class TCR extends AbstractStructBase public function getTaxes() { return $this->Taxes; }
0
6e6dd00d4e6cb53331ec4bef1866d937
1098c4fe10b67e9b11f7d323412ea1d6
Add site-specific Open Graph protocol customizations to the Facebook plugin
var loc = window.location; var title = nebula.dom.document.attr('title'); var encloc = encodeURI(loc); var enctitle = encodeURI(title); jQuery('.fbshare').attr('href', 'http://www.facebook.com/sharer.php?u=' + encloc + '&t=' + enctitle).attr('target', '_blank').on('click tap touch', function(){ ...
0
32c6e21034efde968fa3d650d7b7747e
8e1c57dc261ddfa469f1a992529a8256
返回字符串解析器
StringXMLEventParser getStringParser();
1
82e2e012705c32992ce253a86ff5d6e9
c9dd2789049ed84da859ffee7f00e521
Lock file descriptor.
static int swFileLock_free(swLock *lock) { return close(lock->object.filelock.fd); }
0
4c7ab024c08dc488bcbab4c820958cca
22f5973b52203dced466b559b7bdf7e7
DS_TTF_Init
{ LOGCONTEXT("CDrodFontManager::Init"); if ( TTF_Init() < 0 ) return MID_TTFInitFailed; atexit(TTF_Quit); if (!LoadFonts()) { return MID_TTFInitFailed; } return MID_Success; }
1
0f486a38874f365025a82835a186e8df
4387b37cc29306c427c1f23d3f3e146d
Add request to queue using mutex
class ImagerGUI(QMainWindow): def add_request_to_queue(self,request): self.signal_add_request_to_queue.emit(request)
0
2281a44b72ccf3859e913dbe9909fb35
be85b07fc1a6b111b656da174a4508ef
Called when the spatial awareness surface finding subsystem updates an existing planar surface.
namespace Microsoft.MixedReality.Toolkit.Core.Interfaces.SpatialAwarenessSystem void RaiseSurfaceUpdated(IMixedRealitySpatialAwarenessObserver observer, int surfaceId, GameObject surfaceObject);
1
7698d86fa2b54f3884011166d6401ad1
0dcabb60999b202e3a3c8b102ad1b765
该函数用于获取加速度传感器检测的x、y、z三轴合加速度值,单位,m/s2
class wp(): def getAcc(self, msg): self.accX=msg.linear_acceleration.x self.accY=msg.linear_acceleration.y self.accZ=msg.linear_acceleration.z
1
101e09f770e37302ac8d503f355291bb
ebb92ed7702ea69d45e641fda20521d8
Retrieve the user occupation from the database to get questions relevant to a particular user's occupation.
{ if (sqlAccessType == esSqlAccessType.DynamicSQL) return LoadByPrimaryKeyDynamic(occupID); else return LoadByPrimaryKeyStoredProcedure(occupID); }
1
610c8fe5518efae6339cfe027a327e35
3b4e84924ab4480cc72bc28b8f773dc0
adds cards to hand of cards at specified location
{ int angelOffset = -angel * (amountOfCards / 2); float curXOffset = xOffset * (amountOfCards / 2); GameObject[] currHand = new GameObject[amountOfCards]; for (int i = 0; i < amountOfCards; i++) { currHand[i] = GameObject.Instantiate(Prefabs.CardPrefab, parent); ...
1
316ff116d50e3d85878918d16e4cfb05
b4652e00d359acd4f52d23ded07f2a47
Set status of RTC peripheral driver as DISABLE
{ rtc_instance_ctrl_t * p_instance_ctrl = (rtc_instance_ctrl_t *) p_ctrl; #if RTC_CFG_PARAM_CHECKING_ENABLE FSP_ASSERT(NULL != p_instance_ctrl); FSP_ERROR_RETURN(RTC_OPEN == p_instance_ctrl->open, FSP_ERR_NOT_OPEN); #endif R_RTC->RCR1 = 0U; r_rtc_start_bit_update(0U); if (p_instance_ctrl->p_cfg-...
1
56cc7445af0045f7def9b0130de19bf2
d13f5a0933365f4720cc6cb80db6d197
Convert kebab case (hello-there) to sentence case (Hello there)
toSentenceCase(raw) { return raw.charAt(0).toUpperCase() + raw.slice(1).toLowerCase(); }
0
5f56fb20308fca072b5725fe024aa04f
406feb1bb5881597babbb40663b18795
# Optimal consumption quanity in the first peirod
numoffers_f1 <- function(Q01,Q02){ HistoricD <- c(105,95,75,70,70,110,105,90,65, 80,90,120,105,95,75) econGrowth <- rnorm(1,0,.05) Noise <- rnorm(15,0,0.1) D <- round(HistoricD*(1+econGrowth)*(1+Noise)) Accepted <- rep(0,15) Accepted[4] <- rbinom(1,Q01,0.7) Accepted[9] <- rbinom(1,Q02,0.7) nu...
0
1e75123ea5cb61cb71242bd080236644
8b81ab86368553cd24eec4443d5b326c
构造函数实例化ArticleService
class ArticleController extends AdminBaseController function __construct() { parent::__construct(); $this->model = new ArticleModel(); $this->service = new ArticleService(); }
1
55108b0fc6f5c5fd0fb946547b3af196
d0cdeb6870999aa758c3693a485ef1d1
Détruire l'objet même sur notre écran.
namespace Laby.Entity public class Arrow : MonoBehaviour public void Destroy() { Destroy( gameObject ); }
1
c36fe743c816e2551f62274542215f22
deb95ede9070d52a2a78bafafde18b47
[Documentation](https://wowpedia.fandom.com/wiki/API_SetEuropeanNumbers)
function GMEuropaTicketsEnabled() end
0
2d5db4a20c216d25c0878a700134a067
0e669d6df6b8dcad6df1fdb3d0dceefe
主数据用户--检查同步数据条数(轮训方式)
Connection connection = SessionFactoryUtils.getDataSource( getSessionFactory()).getConnection(); PreparedStatement prepareStatement = connection .prepareStatement(SqlBuilder.getSql( "select_UserSyncCheckDtsData", null)); return prepareStatement.executeQuery(); }
1
6549ca729fb251aceb1958e3e5cccdb5
63fa6364cd165fe8b7e6ed8a87cb0700
Returns the number of neighboring cells with non-zero values.
class RoutingTable(object): def nnz(self): return len(self.data[self.data['data'] != 0])
1
d05c3b79c4a17f255833160dc7cb2e48
5b44ce4d0edcfc11411f9e8b003c10bc
desc:编辑投放业务成功 1.调用创建投放业务接口,创建新投放业务 2.调用修改投放业务接口成功,修改新投放业务 3.验证返回的状态码为200和返回参数正确 4.调用删除投放业务接口,删除新投放业务
class SmokeTests(unittest.TestCase): def test_d_create_business_and_delete(self): self.create_business() self.go_back() self.praise_check() self.delete_scene()
0
cf8634c97aca6899a25a2cf318e79bf4
4a279e276002f9cd0e174b2427067de4
When enable one only, enable its ancestors too
class CardFunctionalTest extends WebTestCase public function testEnableButParentEnabled() { $em = $this->getContainer()->get('doctrine.orm.entity_manager'); $client = $this->createClient(); $card = $em->find('BB\DurianBundle\Entity\Card', 2); $card->enable(); $em->flush()...
0
39816c3246e7ca1c561bf1146ba3aa74
a693eb84c873ed5d09772ee88281f762
Permet de savoir si le vocabulaire des deux langues est existant
class Langue public static function IsLangueValid($langue) { $result = FALSE; if (self::GetLangueExist($langue) == 1) { $result = TRUE; } return $result; }
0