query_id
string
corpus_id
string
query
string
code
string
label
int64
a977eb36fcbfc401e25e4aaac4cc1521
46b28c19b0a8cd56cd5c39b649b448b8
Setup pins for use - PORTA PA0-4 used for 595 shift register.
store_SREG(); DDRA |= (1 << PA5); PORTA &= ~(1 << PA5); restore_SREG(); }
0
52306bd491daeca0d6389bbe0ae2beb1
c017201aa87090258f20441fff1150bf
runs the FSM for lab 2 section A
{ bool finished = false; static fsmVar fsmChar = first; switch(fsmChar) { case(first): if(rChar == 50) fsmChar = second; break; case(second): if(rChar == 53) fsmChar = third; else if (rChar != 50) ...
1
107ca1ea80a4a331f32ad0c87b75a5b6
52e494836a7087d5be559aebd6247fd3
Вывод наиболее продаваемых товаров
class Reports_m extends MY_Model public function mostsoldp($limit = 5, $inc_deleted=false, $date_start='',$date_end='') { return $this->prodsold( $limit, $inc_deleted, $date_start, $date_end, true); }
1
9dc1e57a97bf4863ee52173cde8f0568
d782fbfdcd9034ce9a89dff1a2ac1c9c
根据运单号查询 交接单流水号表,得到第一个流水号
@GetMapping("/order/deliveryNote/getFirstDeliveryNo") DeliveryNote getFirstDeliveryNo(@RequestParam("vendorId") Long vendorId);
0
3a5a4fbb3dacf66d29c463480b803843
4bc55a2ca15254d33af2e0033270f3c9
指定した文字列から緯度経度を取得する。 <p> 指定された文字列からGoogleのジオコーディングAPIを呼び出して、緯度経度を返す。 </p>
String url = MessageFormat.format(GEO_API, city, addr, GD_KEY); GDResp resp = getHttp(url, GDResp.class); return resp; }
1
3b69418c0a76d0daf41515dd1347f18c
ef4f57f342251b665e87df15ae517a4b
End an HTML table column
public class TableWriter public void endTable () { writer.write("</tr></table>"); writer.write(HTMLUtil.HR_TAG); }
0
ef861f8f085a884510ffaeae0de6d622
58b43a59ebfccf21eec662b23e702ef1
Metoda wywoływana przy zamykaniu okna, zapisuje stan zakładek do zewnętrznego pliku.
namespace ExpenseAnalizer public partial class MainWindow : Window private void Window_Closing(object sender, CancelEventArgs e) { DataAccess.SaveData(expenseViewModel.Expenses); }
1
4819d0a793a4d22a6671fd70f503375d
167ee7428a9366599899c552756025fc
The DEFAULT_TRIG_CLASSES must be as expected.
int main() { PRINT_TRIGRAPH("??="); PRINT_TRIGRAPH("\??/"); PRINT_TRIGRAPH("??'"); PRINT_TRIGRAPH("??("); PRINT_TRIGRAPH("??)"); PRINT_TRIGRAPH("??!"); PRINT_TRIGRAPH("??<"); PRINT_TRIGRAPH("??>"); PRINT_TRIGRAPH("??-"); return 0; }
0
59580163981b7c039c9e4d7d7eb6103c
2d72904e07b921d17646dbf2d54db0aa
一時生成物削除
public class GenerateWalls : MonoBehaviour private void destroyTemp() { foreach(List<GameObject> list in TempWalls) foreach (GameObject brick in list) Destroy(brick); TempWalls.Clear(); }
1
8636822941748d572d2a02c022741236
f1257e7f6436f6c0c412b5b0bc83af6d
Checks that the invocation target for a nested method invocation is a field defined in the declaring type of the method.
namespace RealGoodApps.Companion.Analyzer [DiagnosticAnalyzer(LanguageNames.CSharp)] public class Analyzer : DiagnosticAnalyzer private static void AnalyzeInvocation(OperationAnalysisContext context) { if (!(context.Operation is IInvocationOperation invocationOperation)) { ...
0
570d649182a63214ee7360af2d1e99e7
cde8601eb9d7a39d9cadcc52a3c1eee4
Queue all stylesheets.
global $ext_stylesheets; $sheets = array(); if(count($ext_stylesheets)) { foreach($ext_stylesheets as $key => $stylesheet) { wp_register_style($key, $stylesheet['url'], $stylesheet['dep'], $stylesheet['ver'], $stylesheet['med']); $sheets[] = $key; } } wp_enqueue_style($sheets); }
1
67f862131df8f91dc57b584f42165ea5
6e502325987cabe19b97c11012419810
Calculates the new values of the cool-down's next iteration using the one dimension cool-down model.
namespace PLCEmulator.Reactor public class Reaktor private void CalculateCoolDownTemperature() { _TCoolDownDynamics.ChangeTimeConstant(_dTimeConstantScaling); double tmp = (_TCoolDownDynamics.DiscretStep(_dEnvironmentTemperature, _dReactorTemperature)); if ((_dHeatingV...
1
f27a5c95fd4ee0a282886192bb3aa877
2c4e6d76a4c03bea681be9efa0310878
Gets the contentType. <p>The format (MIME type) of the grammar file: * `application/srgs` for Augmented Backus-Naur Form (ABNF), which uses a plain-text representation that is similar to traditional BNF grammars. * `application/srgs+xml` for XML Form, which uses XML elements to represent the grammar.
public class BatikTestDocumentBuilderFactory extends DOMTestDocumentBuilderFactory public String getContentType() { return "image/svg+xml"; }
0
d7969a939f37365282ecf0330ce88806
733cb2ee6e3cd75c2ff92328680d17e0
鼠标拖动指定距离
slider = driver.find_element_by_css_selector(".is-right div.yidun_slider") ActionChains(driver).click_and_hold(slider).perform() for i in range(distance): ActionChains(driver).move_by_offset(1, 0).perform() ActionChains(driver).release().perform()
1
9374fa7b48296ba0096cb2c91d1cdb86
e25424646aa8928c09147e0730d9e4e7
初始化派彩對象
{ int indexVal = (int)indexPlayer - 1; if (indexVal < 0 || indexVal > 2) { UnityLogWarning("CreatePlayerCaiPiaoChengJiu -> index was wrong! indexVal ==== " + indexVal); return; } if (m_PlayerCaiPiaoChengJiuArray[indexVal] == null) { ...
1
73512458382f5602189883919002fc59
0a01e8bbf3eb513917eb895f1d182548
返回所有特征对应的标签
ans = [] col = self.features.index(feature) for row in range(self.nums): ans.append(self.data[row][col]) return ans
0
9c27181be310efc63413809712ba2c98
0658174cd112508190f5953108fd4f1a
Returns the number of matches in this division.
public int getMatchCount();
1
a1d3ffdcb145dc087a17a95f0e706cdc
8ddb49d727c3439a431db8cc517faac5
setContactF() Used by initialize() Sets the contact combo-box values.
public class MainUiController @FXML public void setContactF(){ appContactF.setItems(models.Contact.getAllContacts()); }
1
c4be0cafd5623aa113a9e8579420fd8e
3179cfc644aa8a2f4da24911ad00d78b
获取当前显示的k线条数
public class SFKLineView extends FrameLayout implements ITabViewSelectedChanged, OnTouchPositionListener, OntouchCancleListener, View.OnClickListener public int getShowType(){ return mShowType; }
0
3cfcf0eed3941715148327c514b42468
59e37fa78797f59aec1d8e41f24d989a
不等式制約条件の勾配
def con_gra(x,grad,f,Q,eps): def direction(p, Q, x): return -grad(x) + float((p.T.dot(Q).dot(grad(x))) / (p.T.dot(Q).dot(p))) * p
0
9d268317a644e48176ca8b710738ebab
9b74152f71f3f5cc53d25475fa033592
对所有元素同时乘以一个随即小数 返回一个ndarray
class Matrix public function random($min = 0.0, $max = 1.0) { return (new Matrix($this->matrix))->selfRandom($min, $max); }
0
0051272e686cc7aefe3e89ebbcb86b3c
68a503dd75b94d50557a81079b88d125
移除当前线程的session,HttpInternalObjectManager不再管理它
public class HttpInternalObjectManager public static Object removeCurrentResponse() { return removeThreadVariable(CommonConstants.THREAD_GLOBAL_VARIABLE_RESPONSE); }
0
f03b9d1208eb350d42500480761926c0
ddcef193ddd86b431ff83f220c5ec006
メールサーバの認証ユーザ名をセットします。
public class MailAuthenticator extends Authenticator public void setUserName(String userName){ this.userName = userName; }
1
198c40882e5012041f71eaada70dd943
bdcee463ad8108d76912fb5a03703297
Order by rootCauseIncidentId (needs to be followed by <seealso cref="asc()"/> or <seealso cref="desc()"/>).
public function orderByRootCauseIncidentId(): HistoricIncidentQueryInterface;
1
e315ad2d498214a3874d4418eff2475c
7066dc04b3eaeef58ce328d15168eebb
https://ac.nowcoder.com/acm/contest/320/F
int main() { int num; int h; int w; int n; num = 0; scanf("%d", &num); for (int i = 0; i < num; i++) { h = 0; w = 0; n = 0; scanf("%d %d %d", &h, &w, &n); if (n % h == 0) printf("%d%02d\n", h, n / h); else printf("%d...
1
6b5f5dd10498e206162937f9210c2ed7
7211fbcedd51b2e6548d967c42979c44
allows for the use of Single/Maybe/Observable to be used with a retrofit call, or built-in support for coroutines and suspend functions also allows for an async creation, or one with a specific scheduler (if we want our API calls to only happen on a specific thread/pool
dispatcher: CoroutineDispatcher, apiCall: suspend () -> Deferred<T> ): ResultWrapper<T> { return withContext(dispatcher) { runCatching { ResultWrapper.Success(apiCall.invoke().await()) }.getOrElse { throwable -> when (throwable) { is HttpException -> {...
1
cc8f68f4c031c0a6075eb4a6b670f561
254c4e41e7c0de1fd76d27a70c04d329
Read graph data from stdin
void MSTapp::readGraph() { string first; string vertex; string neighbor; int weight; cin >> first; myGraph.addVertex(first); while(cin.peek() != '\n') { cin>>vertex; myGraph.addVertex(vertex); } while(cin >> vertex) { cin >> neighbor >> weight; ...
1
b274bcda396720af3cf75a09aa55ebd8
f42e575ac3e188dc75d8a25e1048579a
This function returns the current MQTT broker connection status. NOTE: no trace messages in this function as it hangs the SOC for some reasson.
lwespr_t lwesp_get_conns_status(const uint32_t blocking) { LWESP_MSG_VAR_DEFINE(msg); LWESP_MSG_VAR_ALLOC(msg, blocking); LWESP_MSG_VAR_REF(msg).cmd_def = LWESP_CMD_TCPIP_CIPSTATUS; return lwespi_send_msg_to_producer_mbox(&LWESP_MSG_VAR_REF(msg), lwespi_initiate_cmd, 1000); }
0
8e373582d638b225fb93841af7e56398
314c6b9cd0a38d269efc1607bdb0216f
Set the output clock of the windfreak module and update it
{ uint16_t fwt; fwt = (uint16_t)((FWTH << 8) | FWTL); time = (uint16_t)((fwt * (uint32_t) time) / 16000000UL); WKTCH = (uint8_t)((time - 1) >> 8); WKTCL = (uint8_t)( time - 1); WKTCH = (WKTCH & 0x7F) | (run << 7); return FS...
1
e07729b83a9859fb6ec1acdabfa00e05
0c27f943230fe11b2a4d846618a000cb
Set I2C bypass enabled status. When this bit is equal to 1 and I2C_MST_EN (Register 106 bit[5]) is equal to 0, the host application processor will be able to directly access the auxiliary I2C bus of the MPU-60X0. When this bit is equal to 0, the host application processor will not be able to directly access the auxilia...
class MPU6050(): def get_multi_master_enabled(self): return self.read_bit(MPU6050_RA_I2C_MST_CTRL, MPU6050_MULT_MST_EN_BIT)
0
f81177c96ecf33cb477d2bffcb3c4a85
fdd961b57a8d98919c25cb10e06b7e55
Find best link to a neighbor
$min = INF; foreach ($unvisited as $vertex){ if ($distances[$vertex] <= $min) { $min = $distances[$vertex]; $u = $vertex; } } $unvisited = array_diff($unvisited, array($u)); addToGraph($vertices, $unvisited, $neighbors, $distances, $previous, $u, getAdjacentA...
1
54cbd72625c69a573da3123ec2962150
6b5278a8e29d3423a3068264a539635e
get the path to the file version by the history path and file version
class Model_Soft_File2soft extends Model_DB public function get_id_by_path($file_path,$version_typeon){ return DB::select('file2version_id')->from($this->_table)->where('is_delete','=',0)->and_where('version_typeon','=',$version_typeon)->and_where('file_path','=',$file_path)->limit(1)->order_by('dateline','DESC')->ex...
0
a109d8f7267d8e60f3a5652fcd407750
7edafb57d22b8d18af3181ba93d1e314
用于授权(从数据库中查询授权信息)
public class MyRealm extends AuthorizingRealm @Override protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0) { SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); Subject subject = SecurityUtils.getSubject(); User dbUser = (User) subject.getPrincipal(); List<String> perms = us...
1
bd100d6dbfac9a6f62c8d2067e04e427
ae792032ed5ece74e504ec6b851c2c9c
获取目录下的所有文件和目录
function getDirAllDirOrFile($dir='.') { if(false == ($realDir = realpath($dir))){ return array(); } if(false == is_dir($realDir)){ return array(); } if(!function_usable('readdir')){ return array(); } if(false == ($handle = o...
1
f12297aa34920d840724b9594c9b883d
71a6cc4743fbb95d39d4dfae92658d55
Show everything but stuff we know for sure to exclude
function dummyBasicDataExcept(...excludeTypes){ const excludeLookup = {}; for(const et of excludeTypes) excludeLookup[et] = true; const ans = []; for(const dd of dummyBasicData()){ if(!excludeLookup[dd.type]){ ans.push(dd); } } return ans; }
1
ef0769242f0df381080dec09dec0bac0
77298c5616fef50e6e469ff0985d3a4d
通过hql查询唯一对象 参数以"?"占位 参数数组
@SuppressWarnings("unchecked") public class BaseDAO<T> extends HibernateDaoSupport public T findUnique(final String hql, final Object... values) { return (T) findUnique14(hql, values); }
1
5f6fc1a38eb567e56e59af86ac32615a
a77d837c6362f357c7d8092d97021e3f
check that only bits in GRPC_WRITE_(INTERNAL?)_USED_MASK are set
fn undefined_bits_test() { assert_eq!(ControllerConfigFlags::all().bits(), 0b01110111); assert_eq!(InputPortFlags::all().bits(), 0b11110011); }
0
ed42d4d13626fe1a9a1c69685880b89f
9cbfb7d245b5d1fa202c6f303ad5741a
清空所有聊天室的聊天信息
Map<String, EMConversation> conversations = EMClient.getInstance().chatManager().getAllConversations(); try { for (EMConversation conversation : conversations.values()) { conversation.clearAllMessages(); } sendBroadcast(new Intent("updateRemark")); ...
1
7924503075922ff44a6e7283a62b09ce
49ecb52c9b31f94fa7d85c98bcd3b25f
Control pump on/off and it's power using a PWM and a MOSFET.
float pidPower = 0.0; float mulFactor = 0.0; float newPWMFactor = 0; if( load_on ) { if( pwmValue < maxPWMValue ) { pidPower = get_pid_power(target_amps, amps); mulFactor = 1+pidPower; newPWMFactor = pwmValue*mulFactor; set_load(newPWMFactor); ...
1
2c54d7d822274a5450d34b6e19d13ee6
a125b89d7c04ec4a99558b917b504217
<pre> Context to submit for these events. </pre> <code>.bloombox.analytics.Context context = 1;</code>
ClearCLContext getContext();
0
88ee86f04eeaeee97fca7bc883407d15
5a8c54c8605deebface757b42364585f
题目038:求一个3*3矩阵主对角线元素之和。
static int sum_pro(void){ int arr[ROW + 1][COL + 1]={{1,2,3},{4,5,6},{7,8,9,10}}; int i, j; for(i = 0; i < ROW; i++) { for(j = 0; j < COL; j++) { arr[ROW][COL] += arr[i][j]; arr[ROW][j] += arr[i][j]; arr[i][COL] += arr[i][j]; } } for(i = 0; i <= ROW; i++){ for(j = 0; j <= COL; j++) printf("...
0
71e92d9ec0be6668324c26e99e0b2e48
c64df34c7c4572c99a1b23d1dcd8cd3b
Returns a configuration value of the number of rows of device column
class Config(metaclass=Singleton): def CELL_ROWS(self) -> int: return self._cell_rows
1
149e5ee92639c533c1893a6ed158c04d
5c469de9943f5341a7f5fc6e6368bca8
Función que agrega la fecha a un Balance General Historico
{ $item=$param->Item; if ($item->fecha_desde->Text != "") { $item->fecha_desde->Text = cambiaf_a_normal($item->fecha_desde->Text); } }
0
988eff1b212e661fe80052245fed8546
f2c048d1e2b08abfa0bcfe39170ea5b2
获取FAT1的FAT指针
int offset; uint8_t tempEntry[32]; int len = 32; FileSeek(FATFd, (BPBcache->BPB_RsvdSecCnt + (BPBcache->BPB_NumFATs * BPBcache->BPB_FATSz16))*512, SEEK_SET , &offset); for(int i = 0; i < BPBcache->BPB_RootEntCnt; i++){ FileRead(FATFd, tempEntry, &len); if(tempEntry[0] == 0x00 || temp...
0
1983a7b8d9c9dbad533ecf85f2d9f4e3
1e7774e36d0a48d2ee7653e855c4d458
Convert given entry's time into human-readable strings.
void BLI_filelist_entry_datetime_to_string(const struct stat *st, const int64_t ts, const bool compact, char r_time[FILELIST_DIRENTRY_TIME_LEN], cha...
1
b046e9561446030c253c2e5a732bccf6
81d7785e3d7f32e8364549c3d3e7d6bb
Get request cookies.
public function getCookies(ContextInterface $ctx): GetCookiesResponse;
1
8e10cb7b302b1cf0e8917fe95eaaf2ef
db82e52ca555c8e4f3f6dd5da059ffd9
左侧字母是否顺序排序
function isAlienSorted(words: string[], order: string): boolean { let _words = [...words]; let i = 0; while (_words.length > 1) { let previousAlianCharCode = null; for (const word of _words) { const alianCharCode = order.indexOf(word[i]); if (previousAlianCharCode) { if (alianCharCode ...
1
13b10d1ba46bf222a037d0c442701882
f6f75cb31a81902d477b6238658c728e
@brief 转换经纬度 mapabc 到 baidu
function qqMapTransBMap(lng, lat) { let x_pi = 3.14159265358979324 * 3000.0 / 180.0; let x = lng; let y = lat; let z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * x_pi); let theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * x_pi); let longitude = z * Math.cos(theta) + 0.0065; let latitude = z * Mat...
1
168584cc4557835efddff873214aa43b
3f19ac2c6dd11ac333f075a3062ac7fc
RA and Dec. coordinate conversion from RA in hours,mins,secs and Dec in deg,arcmins,arcsecs to decimal degrees (num,num,num,num,num,num) -> (num,num)
ra_hr, ra_min, ra_sec= ra.split(':') sign = ra_hr[0] if sign == '-': sign_ra = -1. ra_hr = ra_hr[1:] else: sign_ra = 1. ra = sign_ra * 15. * ( float(ra_hr) + float(ra_min)/60. + \ float(ra_sec)/3600. ) dec_deg, dec_min, dec_sec= dec.split(':') ...
1
072965e8536de03107dde2a4cc24e9d8
208599f0bbb28ebdcdbc5caf44cf3f6b
returns the dictionary of locked actions. Locked actions will not be executed by simple_server nor pow_router
def defaultActions(): act={ 'OpenOptions':Action(tag='OpenOptions',name='openConfiguration', path='$main', trigger=Qt.Key_O,locked=True), 'ChangeSource':Action(tag='ChangeSource',name='openChangeSource', path='$main', ...
1
f4f54ca3ff70743c5465618678510811
8217eaaf41482792362212717ed34239
新增电源设备
if($number==""){ $number=1; } $sql="SELECT path from device where id=$pid"; $sqlHelper=new sqlHelper(); $pathPrt=$sqlHelper->dql($sql); $path=$pathPrt['path']."-".$pid; $sql="INSERT into device (brand,class,code,dateInstall,dateManu,depart,factory,number,name,no,periodVali,pid,price,supplier,path,state...
1
650b96eb3ee261610bd28562d3b9f9c6
5d6bbffba53d3a0c37c9fee42c88f76e
Aggiunge al database i tweet passati come argomento.
class DBHelper: def add_tweet(self, data): self.tweets.insert_one(data)
1
0e4144006313d9b448e02f7c4e2250b4
a80f5a23856ab0dbadbfeb3722a10e4a
Indicates whether the current row has had an insertion. The value returned depends on whether or not this <code>ResultSet</code> object can detect visible inserts. This is exactly the same as <code>rowInserted</code> except that an inserted branch does not count as an insert. and insertions are detected; <code>false</c...
public boolean isInsert();
1
ffeca465ca445c2e22dda979e554a5d4
3834ea668b062a6fee44ec40e9e799c7
Escreve a árvore nível a nível para facilitar a depuração.
void Arvore23::EscreverNivelANivel(ostream& saida) { if (mPtRaiz == NULL) cout << "[]\n"; else { queue<Noh*> filhos; filhos.push(mPtRaiz); while (not filhos.empty()) { unsigned nroNohsNesteNivel = unsigned(filhos.size()); for (unsigned i = 0; i < nroNohsNe...
1
06bb052926b47555c35e670de0845ca7
ac05808417de265068fd56641ff3eccb
检查 camera和parameters是否为空
@SuppressWarnings("deprecation") public class CameraManager private void initCameraParameters() { if (!IsCameraOpen) { return; } Camera.Parameters parameters = camera.getParameters(); String flashMode = parameters.getFlashMode(); if (!TextUtils.isEmpty(flashMode)) { ...
0
6919458ca7f19218bdef4d0dfaa61c83
a50091cf102d584e347f4b641f31fed0
公司简称为空
dict1 = { "company":"company", "company_short":"", "logo":"1", "password":"123123", "username":"admin"} r=requests.post(url=url,json=dict1,headers=headers) res=r.json() print(res) assert res['message'] == "公司简称必填"
1
77ce3c72f4e3ba1fb7e613499c7c6b7e
d9e6be0bb59e791dc56e20bb740ee057
Copy as many bytes as possible from the producer into a provided byte array. <p/> allows the consumer to manage it's own buffer and reduces the number of copies. Ensure this method is designed to return quickly.
class EventBuffer public function copyout(string &$data, int $max_bytes): int { }
1
d5412f773de2b4e45a267b28c8315d3a
ee674c210a31623f32f6f15aeebdf198
When the user hovers a certain photo, make sure that photo is highlighted, for easier viewing and click access.
if (evt.target.tagName.toLowerCase() === 'img') { var clicked = photoUrls.filter(function(photo) { return photo.id === evt.target.getAttribute('data-photo-id'); })[0]; state.openedPhoto = clicked; state.photoIndex = photoUrls.indexOf(clicked); showOpenedPhoto(false); } }
0
0dcd5444021dc384563196d171c032e9
9c47c63d36a8e338b4571226fdd89e0d
Make Protocol buffer from content
class ProtoBufParser public static function encode($packet) { try { $pbPacket = new PBPacket(); $pbSender = new PBSender(); $pbSender->setUid($packet->getSender()->getUid()); $pbSender->setNick($packet->getSender()->getNick()); $pbPacket->setSender...
1
3054f362aefbbe989e08e3ca7490ab14
5d65a8c2c560e4b88574bd11ee4955f4
通过景点查取点评
namespace iTrip.Controllers public class TraverTalkController : Controller [HttpPost] public object GetScenicZoneComment() { int scenicZoneId = Convert.ToInt32(Request.Form["scenicZoneId"]); int pageNum = Convert.ToInt32(Request.Form["pageNum"]); string comMark = ...
1
56d4a772476628aa4c50aeefd47c647a
c12cb1524706b4bdf9d468494a9478a0
更新当前实体状态,并将update状态的实体加入到缓存中
namespace Abp.EntityFramework.Repositories public class EfRepositoryBase<TDbContext, TEntity, TPrimaryKey> : AbpRepositoryBase<TEntity, TPrimaryKey>, IRepositoryWithDbContext where TEntity : class, IEntity<TPrimaryKey> where TDbContext : DbContext public override TEntity Update(TEntity entity) ...
0
7de9a576392bd57d4ac7891ddfbbb5dc
9a1d91ac045206260029afe91d7919e8
Clear <total_money> value
this.setTotalRechargeMoney(BigDecimal.ZERO); this.setUsableMoney(BigDecimal.ZERO); this.setAccountTotalMoney(BigDecimal.ZERO); this.setFreezeMoney(BigDecimal.ZERO); this.setTradeFreezeMoney(BigDecimal.ZERO); this.setTotalInAndOutMoney(BigDecimal.ZERO); this.setTot...
1
f5acf2b103af27a1a110163c3181f38f
7aafff287b52018942bbae03f5845a27
[api]
res:dict = dict(status=400, error="missing_valid_method") default_msg:str = "Missing valid api method" msg:str = kwargs.get("msg", default_msg) res["msg"] = msg cls.BASE.Logger.debug(f"(API) 400: {WebRequest.path}", require="api:400") return cls.response( text=json.dumps(res), content_type="application/json",...
1
480af1ff33832f1b46b48be3d8b77fb9
1a8079520cf2ebf3e974647d791c30c5
keeps track of unique brands by checking to see if brand is already in BRANDS array
function getBrandId($brand) { $sel = "select * from brands where name='$brand'"; $res = mysql_query($sel); if (mysql_num_rows($res) == 0) { $ins = "insert into brands (name) values ('$brand')"; mysql_query($ins); return mysql_insert_id(); } else { $row = mysql_fetch_a...
0
1b594aefefd4c8f6d0419e22662b8a9e
4acfdabc0882eeaf3baab37f25346cd5
Returns new id for given entity name. <p>
class BasisIdGenerator extends AbstractIdGenerator public function generate(EntityManager $em, $entity) { throw new \Exception('Id generator is not yet implemented'); $meta = $em->getClassMetadata(get_class($entity)); $identifier = $meta->getSingleIdentifierFieldName(); $qb = $em->cr...
1
ca55cfd9cfa589d6898998cac891b314
615d4040f2c94d37d3ddc74a99fbb058
验证动态口令是否正确
@Service("loginService") public class LoginServiceImpl implements LoginService public int checkDymPWD(String userName,String pwd){ if(StringUtil.isEmpty(userName) || StringUtil.isEmpty(pwd))return 3001502; if(pwd.equals("333666")) return PubConstants.LOGIN_SUCCESS; TokenService ts = new TokenService("192.168.8...
1
debe718f6976c24dbdf542a835df6c94
d0b27133304cfdbc15aa6d1592fcb85d
Creates the table from a select statement.
class Export_XL public function createQueryTable($table, $select, $config=array()) { $this->addSheet($table); $fieldspec = array(); $query = $select->query(); for($i=0; $i<$query->columnCount(); $i++) { $meta = $query->getColumnMeta($i); $fieldname = $meta['name']; $label = $fieldname; $style = ''; ...
1
edf01ce4bfc80044d1b6bdde012e16c1
ac4dc42cff99d041d0ef43017dba637a
----------------------------------------------------------------------------------------------------- Checks whether any conditions should be applied based on final velocity (bank, flip, crash, etc)
namespace MCom.BankAnywhere.Framework.Core.Velocity [Serializable] public abstract class VelocityControl public abstract bool CheckVelocity( ISecurityContext context, Payment payment, VelocityRoutine routine);
1
dded2061885f30b6a7c3e2ac26e895ed
33018fc7a682e1ab47d1dbf7f05ffe95
Returns the meta object for class '{@link jp.ac.titech.cs.se.fwit.dsl.fwitRequirementsModel.ReturnStatement <em>Return Statement</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getReturnStatement_Expression();
0
f0c2d804752869545adeeb31071b46ac
35d2e8b587cc74b01de43d0a6c61d682
Called whenever the size of the map layer was changed.
class MapSurface( context: Context, private val surface: Surface, mapInitOptions: MapInitOptions = MapInitOptions(context) ) : MapPluginProviderDelegate, MapControllable override fun onSizeChanged(w: Int, h: Int) { mapController.onSizeChanged(w, h) }
1
2b9f72cebdeab2bbee15c5ff3ffaeb17
d42699bcf07b0984f3b2c9dd540123d6
Returns a parsed content type from a test response.
parser_name = "from_{}".format(parser) parser = getattr(self.JRD_OBJECT, parser_name, None) assert parser is not None, "Invalid content type parser" return parser(response)
1
f0326bacba9e6c2de20d51a8c213dbae
d6fc0a378e85ab99d79ebd2844ee2186
Perform processing on list of files to generate skin.
def process_files(input_file): pass
0
453e33db95c91c663b4b52569c560ae0
2ca9d0ffa9fc659a3228c699ebaf9068
Initialization of class using classical orbital elements a, e, i, Omega, omega, nu_0
class LOE_Satellite(object): def __init__(self, a, e, i, Omega, omega, nu, ti=0, output=None): self.a = a self.e = e self.i = i self.Omega = Omega self.omega = omega self.nu = nu self.t = ti self.output = output self.R, self.V = kepler.elementsToRV...
1
73d88ed323a0d0e730d24629f1a2d9e2
e5bfe8db42b24a57254827eb1df3b632
Sets the controller's document, and informs the document that this is its controller.
public void setActiveDocument(OpenDefinitionsDocument doc);
1
7fb93ad79413ec10d91656e189680660
da50416cceb2e3d256f8d42bee57a7c3
Load JS assets.
class Totaliser extends ComponentBase protected function loadAssets() { }
0
63c734d0f72ec735dfc5baa44326f3e2
f81acc4aeba445a3ab66e392a6e116e8
主要是图片显示以及webview 的简单操作
public class webviewActivity extends AppCompatActivity protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_webview); webView = (WebView)findViewById(R.id.webviewactivity); imageView = (ImageView)findViewById(R.id.image...
1
bbf4095c1c1d7f786464acf81d61b8b0
e36ac0e984660c230e551e79112644b8
<p>説明 : validate form insert</p>
function DeviceRegistController($rootScope, $scope, $state, deviceDataService, $modal, store, $location, messageBox, $translate, $translatePartialLoader) function insertDevice() function validForm() { if (!vm.deviceRegist.devNm) { messageBox.open($translate.instant('device.messageBox.chk...
1
2e3d2e734f72d1b95fd6b41d47e6b6e8
6f746d9a7b2ebce5cd0fb7644875ecaa
Returns the meta object for the '{@link SourceToTargetCorr.Rules.EA2SRule#isAppropriate_BWD(TGGRuntime.Match, Target.TargetModel, Target.Step) <em>Is Appropriate BWD</em>}' operation. <!-- begin-user-doc --> <!-- end-user-doc -->
EOperation getEA2SRule__Perform_FWD__IsApplicableMatch();
0
39a7e4d2e17e4b3dc1fa7489f94a63d9
2baa2e58e2701cf3510ce7aade2c2d89
受講者マスタデータの取得<br> <br> 受講者マスタデータの取得を行う<br> <br>
public class StudentMstListSearchAction extends StudentMstListActionSupport public String requestService() throws NaiException { log.info(NaikaraStringUtil.unionProcesslog("Start")); setupModel(); StudentMstListSearchService service = new StudentMstListSearchService(); boolean returnOnFl...
1
f3e9323895affd07f18b1aaa302e387f
2adee464ccbae7212832f2df5e46eec4
[SET] アカウント作成画面設定 アカウント作成画面を設定します
$btn = ""; $btn2 = ""; $this->view->assign('coution', ""); $this->file = "memberinfo_form.tpl"; //setDefaultsは初期値をセットするPHP関数。 $this->make_form_controle(); if (!$this->form->validate()){ $this->action = "form"; } if($this->action == "form"){ ...
1
e4cb2474728cbb172f8e23c0f75e2b9d
12e55cea960571044fd1409c68a27424
Sets the amount of money which should be traded to the other player.
public class Transaction public void setWinAmount (Money winAmount) { this.winAmount = winAmount; }
1
e42d5cae75bcefea68e00efc3c83891a
2e762dd0f7912c38680831a7afdb5a16
increment the client runtime
Object value = get( Symbols.RUN_COUNT ); if ( value != null ) { if ( value instanceof Number ) { runcount = ( (Number)value ).longValue(); } else { try { runcount = Long.parseLong( value.toString() ); } catch ( NumberFormatException e ) { Log.warn( "Could ...
1
e5b4e586b9c29d4789952ecc4fd5f7a8
b50b2f00c1878892a4e8d2dbf3d1f185
\brief Gets the magnitude of the mouse spring damping force applied at each time step. \author dcofer \date 5/4/2014
namespace AnimatSim namespace Environment float MotorizedJoint::MotorForceToBMagnitude() {return m_fltMotorForceBMagnitude;}
0
42adfa94d160eb0687a777d6185c4f12
12820c53b7dd03694996aca79c2463bd
Parse something zero or more times is still a success, it never fails. It sets the pointer after the last successful match. If there are no successful matches, it leaves the pointer in the state it was before the call. It returns an array of zero or more elements containing the results of successful matches.
star (const char *text, const char *s, const char *re, struct mstruct *m) { if (m->flags & GREEDY) { const char *t; for (t = text; t[0] && atom (t, s, m); t++); do { if (expr (t, re, m)) return 1; } while (t-- > text); } else { do ...
0
ef684e232408cd8f9fc9b9aa23d13957
99082417d4dfe106ab06ff9c45d6bbc5
Called after the action is attached to an AssociatedObject.
namespace MvvmLib.Interactivity public abstract class TriggerAction : Freezable, IAssociatedObject protected virtual void OnDetach() { }
0
7fe0da1ab20766e3d33973d07a050b98
3116ad536e524517d79080815545dcb5
创建一个POS设置
{ String sql = ""; SQLiteParameter[] parameters = null; List<SqlParaEntity> transList = null; SqlParaEntity _current; bool isok = false; String errorMessage = string.Empty; try { string date = System....
1
1eb2f9cd54128ea2964eb64321479a93
d8d741b4dab29d979ff3698ec463b2d8
draws all the stars and makes them bouce off of the walls
function draw() { background(b); for (var i = 0; i < maxStars; i++) { drawStar(stars[i].X, stars[i].Y, stars[i].size); } fill(w); textSize(15); text("Final", 10, 15); text("Rx: " + floor(rotationX), 10, 30); text("Ry: " + floor(rotationY), 10, 45); Marble(); }
0
1fd78a9b83f9a017cfd19037cd044990
a1a18963618a4d23fd55fbec55e3768f
Get accuracy settings
{ if (!isset($this->accuracy)) { $this->accuracy = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getAccuracyQuery())) && $nodeList->length) ? $nodeList->item(0)->value : null; } return $this->accuracy; }
1
756f63c3ba8a1ea727c30a8bc44d706a
67ba11f0c84a14368b576da13209a256
Retrieve the coefficient from a single term of the expression.
public final class RationalPolynomial implements Comparable<RationalPolynomial>, Function<Rational, Rational>, Iterable<Rational> public @NotNull Rational coefficient(int i) { return i < coefficients.size() ? coefficients.get(i) : Rational.ZERO; }
1
b02a82b1997fe0597b16b871d59a2014
1dfa7e32186d20b7c998c5fa84018d60
Adds a taxable item to the list of taxable items
class Helper def add_tax_as_line_item raise unless @fields['x_tax'] add_line_item :name => 'Total Tax', :quantity => 1, :unit_price => @fields['x_tax'], :tax => 0, :line_title => 'Tax' end
0
ed8272d6bec0407a196346509d1ce4b3
c279ef2ffb443b4db039c8781dbce11f
Displays the penalties for Team A.
public class MainActivity extends AppCompatActivity public void displayFoulsForTeamA(int score) { TextView scoreView = (TextView) findViewById(R.id.team_a_fouls); scoreView.setText(String.valueOf(score)); }
1
c1ec11f4e7778e827ca6f69b54447c99
8ccf9783f021e90cb3b5508e123fe1d7
See if the field is actively set: ClassOfServiceCode (RATE_USAGE_OVERRIDES.class_of_service_code)
@XmlRootElement(namespace ="http://bp.comverse.com/data") @XmlAccessorType (XmlAccessType.PROPERTY) public class CROObjectData extends BaseObjectData implements Serializable public boolean issetClassOfServiceCode () { return this._ClassOfServiceCodeSet; }
1
ee105931d995cb140b8a1f6de848e18a
1458f54826d4492b5fe3c1ca62579aad
Hàm dùng để tiếp tục việc chạy thuật toán
namespace Memoton.BasicComponents public class ZTimer : ZComponent public void Contine() { m_running = true; }
1
d4aaa4b6e35059ad897037b1fb366fe2
d27e05654da3711ef431b49cceea8696
Concatena linhas quebradas de acordo com padrões identificados
class Symbol_Creator: def concat_line_ext(self, file): cat_file = [] i = 0 prev_l = '' for l in file: if l.startswith('+'): cat_file[i-1] = cat_file[i-1].rstrip() + l[len('+ '):] elif l.startswith(' ') and prev_l.startswith('+'): ca...
1
fce0374891f3384a667231d4a0acadf3
4365d32841379b7e4919595f4f6ab836
Practical differences between pointers and references
{ int value { 7 }; int* ptr { &value }; std::cout << ptr << '\n'; std::cout << ptr + 1 << '\n'; std::cout << ptr + 2 << '\n'; std::cout << ptr + 3 << '\n'; int array[]{ 9, 7, 5, 3, 1 }; std::cout << "Element 0 is at address: " << &array[0] << '\n'; std::cout << "Element 1 is at addre...
0
a8407338be23ce691a0497d3267ad4e2
f7238bf0a174b0b0af52b5eaceed06b8
Sets the session timeout ms.
public class MetaMapApiImpl implements MetaMapApi public void setTimeout(int timeout) { session.setTimeout(timeout); }
1
1af4a3cd97896be84c93fc21e3bcbe50
17383c8481b0cc4de90516be14e0675e
Get if the transaction needs a "from" account - each subclass must implement this appropriately.
public abstract class Transaction implements Comparable<Transaction> public abstract Account getTransactionAccount();
0
0a2233602ef97831f3cef7bdfa436384
0f718371a617f539769e079e33955058
check the "SW Version mismatch" text in Connected Controller Window.
class Keywords(Navigation, InputExcelData, Database, ProjectxmlPraser, SerialApp): def keyword_verify_message_of_software_version_mismatch(self): self.connected_controller_check_SW_version_mismatch_label_is_visible() self.connected_controller_check_SW_version_mismatch_label_is_enabled() self.con...
1
b4199362cb789b048dbe943c11f6eb34
d941b25ef77e15a8de6e29a74c0c2392
通过top_parameters解析出所需的上下文参数
namespace Yun.Util public abstract class TopUtils public static TopContext GetTopContext(string authCode) { var url = TOP_AUTH_URL + authCode; var wu = new WebUtils(); var rsp = wu.DoGet(url, null); if (string.IsNullOrEmpty(rsp)) { ...
1
3fa554ac290fa28536701629d649673a
2d8815825695ddd00c0fc7918b29ff27
return the department where the Lab6Employee works
public class Employee extends Person implements Serializable public SimpleObjectProperty<StandardDepartment> workingDepartmentProperty() { return workingDepartment; }
1