query_id
string
corpus_id
string
query
string
code
string
label
int64
a5f3f18235bd7c1cb0fa398f5a79be35
ea1d309078745343c7585a7834b3acaa
Gets technical analysis features from market data JSONs
let bias1 let bias2 let bias3 let closes1 = 0 let closes2 = 0 let closes3 = 0 let totalTurnover = 0 let totalVolume = 0 for (let i = 0; i < data.length; i++) { let turnover = data[i].turnover totalVolume += data[i].volume totalTurnover += turnover if (totalVolume !== 0) { data[i]...
1
80a72765b5abdc7f97666acbea67187f
21cc1999a2739583b98ef3b93592f3ac
Raises the enable event. Registers responses to Unit events.
[Serializable] public class UnitManager public void EnableControl () { }
0
e465a31ab5cd68847555bd0b56b94a56
91f88c1a7c24db7e8da3dd2fc03e2861
Called when the screen size codes have been changed. Note: This will not remove or cleanup old registrations.
void onDisplayChanged(ScreenDisplay screenDisplay);
1
d8dbde80a2de547dbf10806ae28bc293
20338b2c95ce7bf21d0dc6763ea1c5f8
Auto remove any occurrence of '>'
void clearInput(std::string &input){ int position = input.find('>'); input.erase(input.begin()+position, input.begin()+position+1); }
0
88f066d8e8e5461a96591939724fff94
c9879eb78ab7f4ba8cb114945f59d44d
Execute an operation using request level credentials.
string bindingName, string operation, TRequest data, IReadOnlyDictionary<string, string> metadata = default, CancellationToken cancellationToken = default);
0
18f3f20c7c849a2b2fb3a7a0b68f7d99
ffaa2c5c409d2728277c2924e4a26f09
@brief Read PHY port SMI register
( IN GT_U8 devNum, IN GT_PHYSICAL_PORT_NUM portNum, IN GT_U8 phyReg, IN GT_U16 data ) { CPSS_MACDRV_OBJ_STC * portMacObjPtr; GT_BOOL doPpMacConfig = GT_TRUE; GT_STATUS rc; GT_U32 portMacNum; PRV_CPSS_DXCH_DEV_CHECK_MAC(devNum); PRV_CPSS_DX...
0
93838d4a30caab9055339838a14a3bf7
cdbd5db4f32da6dea367e61ace4a4b61
Raise referenced window
void GrRaiseWindow(GR_WINDOW_ID wid) { nxRaiseWindowReq *req; LOCK(&nxGlobalLock); req = AllocReq(RaiseWindow); req->windowid = wid; UNLOCK(&nxGlobalLock); }
1
c548577a5f264389a5ee0df7764a3891
79cab8c5f433428f27be82016940ddb6
Write back enable; true for write back, false for write through
public class CacheMetricsImpl implements CacheMetrics @Override public boolean isWriteThrough() { CacheConfiguration ccfg = cctx.config(); return ccfg != null && ccfg.isWriteThrough(); }
0
f6863cc136995f56c729520b57509693
e3444c32dbefa36e0cd7d80826c2131c
Append a timestamp string to the comment. Useful for building the comment overtime from interaction with the GUI.
class main(GaiaTestCase): def logComment(self, p_str): self._commentArray.append(p_str)
0
dd4e5fe31d948729636b0a26592e6dd8
e93a5ce76768dcfa099a7802dec44cba
Callback method called upon audio port list update.
public class MainActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) @Override public void onAudioDeviceChanged( AppRTCAudioManager.AudioDevice audioDevice, Set<AppRTCAudioManager.AudioDevice> availableAudioDevices) { on...
1
c263b50a864852e53940769a2cc46c41
1e0657860a5d60321498943507f93bc9
查询纸纤包装各单价基础信息
@Service("pfackdservice") public class PfackdService public PageData findprice(PageData pd) throws Exception{ return (PageData) dao.findForObject("pfackdMapper.findprice", pd); }
1
946da3da2d1064bfcb626f4a8b955437
de8bef59a0ed6aacad96c583161fc38d
返回 某列 的所有 索引
public Collection<Integer> getColumnIndexes(String columnName);
1
31ba64eec4a6c628fc5211a3d5f37a46
10e24d67757ddc44ade8d68dd2011fa2
Parse locals (`a` or `a:b`).
class iqParamDotUse(iqLocalsDotUseProto): def __init__(self, default_locals=None): iqLocalsDotUseProto.__init__(self, default_locals)
0
72f011ad6a02333a2b055899c3df1af3
6b0503bdc8156836dbfd16509aaa92d8
根据组名和学校id获取组信息
class Home_model extends CI_Model public function getgroupinfobyname($name){ $dir = $this->data_url.$this->group_id."/group/".$name; $groupinfo['groupname']=$name; $file_path = $this->data_url.$this->group_id."/group/".$name.'/'.$name.'.conf'; if(file_exists($file_path)){ $qian=array(" "," ","\t","",...
1
933ed0d69a2031113c40bcb794b0e9f0
b01bb06182050818b56ae98e92f1ae02
根据角色id查询目录
public List queryDir(String dirId);
0
cfb726c45f9e847c7a22744164b1aca2
68ff1890a71ea3428eac5f42faf2d10c
分析电影的观看人数,太热门的电影的用户其实不一定有很多共同点,找到一个阈值,观看人数大于该阈值的电影就不用来计算相似用户了
ratings_file = os.path.join('../../data/ml-latest-small', 'ratings.csv') df = pd.read_csv(ratings_file) df = df[df["rating"] > df["rating"].mean()].copy() df_group = df.groupby(['userId'])['movieId'].apply(lambda x: ' '.join([str(m) for m in x])).reset_index() uid_movieids_file = os.path.join('./dat...
0
1174014e7c16d11a7eb81a766ee05114
c900fbb6b9acdeb319b9efe4355fbf78
显示交易信息列表
function showTransactions() { var datadata = { "jsonrpc": "1.0", "method": "listtransactions", "params": [] }; $.ajax({ type: "post", contentType: "application/json", url: ChangeEnv.path, username: ChangeEnv.username, password: ChangeEnv.password, dataType: "json", crossDomain: true, jsonpCallb...
1
57295ebbe1b2d673688e53baaf635c4f
2a953735af38fd3402d4f9decf18d179
Описание здания
namespace Building class Building public string kindOfBilding() { if (lodgers == 0) { if (floor == 1) { return "Storage"; } else { return "Office"; ...
1
8f5ce269954b29a7ae17298804c97af0
b088d2d41dde10331d67c8d3dc8e09b2
Ruf diese Methode auf wenn der lokale Benutzer das Spiel wieder verlassen hat
public void onLeave(PlayerQuitEvent event){ Player player = event.getPlayer(); this._controller.leaveGame(player); }
1
1af7c249d20737ccf95630f136c024d8
bbc571eb032036816b250c941e6a4d33
The unique identifier for a studio resource. In Nimble Studio , all other resources are contained in a studio resource. :link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-nimblestudio-streamingimage.html#cfn-nimblestudio-streamingimage-studioid
namespace Amazon.NimbleStudio.Model public partial class StreamingImage internal bool IsSetStreamingImageId() { return this._streamingImageId != null; }
0
7c5501124a1d0b8cae07230f5905e64e
80a91a0b1e01fca4f63573e5bd23fb02
расстановка событий на элементах
{ for (var fi = 0; fi < document.forms.length; fi++) { var form = document.forms[fi]; for(var j = 0; j < form.elements.length; j++) { var element = form.elements[j]; var name = element.name; if (name === undefined || name.length == 0) name = element.id; switch(name) {...
1
818992a3998298ab414e184ad5340a46
35711d7e7e3117e6405a0a8fca2e371b
初始化并生成使用服务端分页的流程任务列表
function init() { CustomTable.init({ elem: "#table", url: '/hzml/api/Manage/waittaskList', where: $('.search-form').serializeForm(), cols: [[ { checkbox: true }, { field: 'id', title: 'id', hide: true, ...
1
03c37d381afc75002071c99e5f6dcead
2ff62585d9c3a7ea49b6800a1df46552
通过id,startTime和endTime抽取在startTime~endTime之间的ListContent
List<Reply> getReplyListByTime(Long startTime, Long endTime);
0
894a344d92d303d8376e17e8f450c5b6
ca9943d288d710148ded1fc6f37506e5
单应性 hamography: 对比两幅图像,其中一副出现投影扭曲时,仍可以匹配
for p1 in h2ps[h1]: for p2 in h2ps[h2]: i1 = pil_image.open(expand_path(p1)) i2 = pil_image.open(expand_path(p2)) if i1.mode != i2.mode or i1.size != i2.size: return False a1 = np.array(i1) a1 = a1 - a1.mean() a1 = a1/sqrt((a1**2).mea...
0
37f26a70d9aafa604f05470b84508edf
b3d20a966ab2a21281015a5c832006cd
Funkcja znajdująca b-skojarzenie według algorytmu.
{ int i,j, k; int *nrs; double dsum, x1, x2; nrs = ivector(0,natom+1); for (i=0; i <= natom; i++) nrs[i] = 0; for (i=1; i <= natom; i++) { for (j=1; j <= natom; j++) { if (fabs(atom.atomwt[i]-atom.atomwt[j]) <= TOLER) { if (nrs[i...
1
11d2b1af75b95a8656bb2d1afb5d8f99
5f06b0ac8a604b02095754a259d4e538
Tests a switch statement over IVML types.
{ int x = 0; switch(x) { case T z: break; } }
0
d5ae1f0aa84a9bc49d7085a629a33e9c
847a4cb18037e18898c301f31894fa02
判断字段$lc_qx对应的权限
var zlbsdlDm = $w("nsrxxMap").getValue("zlbsdlDm").code; return _gIsQhjt == "N" && zlbsdlDm == "ZL1001"; }
0
c32758e46d9b85ff72fbd3214d830f27
f17ca8f2009e900258f23456faed543f
获取默认项目
String channel = getDefaultPres(context).getString(KEY.PROJECT_NAME, null); if (TextUtils.isEmpty(channel)) { channel = getStringMetaData(context, KEY.PROJECT_NAME); } return channel; }
1
601beb15c4e491bdb60c5a9678be2486
355800dea7927f1da93b751b4da64932
Set the invite message
{ $this->person = $person; $this->invite = $invite; $this->subject = $subject; }
0
9aea9552f9c116ca0689d4dbeabecd80
8e6c09a395f6156f360df261a39f6726
로그인한 회원 로그기록 인서트해주는 메소드
public class JoinDAO public int updateLog(String Lid){ int result=0; Connection conn=null; PreparedStatement pstmt=null; try { conn = sungwon.DB.DB.comCon(); String sql="update member set log=sysdate,ip=? where id=?"; pstmt = conn.prepareStatement(sql); InetAddress local = InetAddress.getLocalHost(...
0
6b9ecee2fe4e99e5fc54e8ff6183d30d
566d2b7c5b531fbbfa423c0db2d6b287
根据用户ID和圈子集合查看 用户收藏的圈子
class Model_Logic_User extends Model public function getUserCirclesByUid($uid, $onlyCid=false, $sortType=NULL) { $arrReturn = array(); $objModelCircleUser = new Model_Data_CircleUser(); $query = array("user_id"=>intval( $uid )); $sort = array('order' => 1); if($sortType) { $sort = array("...
1
74e977691d502410bc8bac15933e2aeb
26d5f004e53e2a5fe13a744626ec96b9
since we're recalculating the values, we should also recalculate the budget start end dates.
{ var priceListsWithoutCalculatedRevaluation = accountingPriceListRepository.GetAccountingPriceListsWithoutCalculatedRevaluation(currentDateTime); var accountingPriceListOnStart = priceListsWithoutCalculatedRevaluation.Where(x => !x.IsRevaluationOnStartCalculated); var accoun...
0
704c3fce2dc5d0d94108456f76d3792a
49ad8c99335c2ed0cf9b782b82d287eb
旅程转顺序编码
table = {} trip = [None] * length for ticket in tickets: table[ticket.source] = ticket.destination next = table["NONE"] for i in range(length): trip[i] = next next = table[next] return trip
1
cb43d802f693aed4a94f49aab8541761
49c5fb0450191ed60dcdd3f4777dcaaa
转换为最大的字符串长度,超出长度将截取以省略号代替
public class StringFormatUtil public static String hideOverride(String str, int maxLength){ return hideOverride(str, maxLength, "..."); }
1
70ae393acfb639b1df799016f2cc9408
fc55ab6fb89d95b1be22cb10ca043667
立即切换到刷新状态
function refreshstart (that) { that.state = 2; }
1
eb21b3dcd7614a5d1b5090d8c4767099
60e5e84ae9fd0a80c7c7f080e4e0e7db
@brief This function gets the Gain of the baseband frequency recovery loop, RX Parameter Number 2
CTR_6002DR2_API int LMLL_RxFEGetCBE_LNA_RXFE() { return getMainModule()->getRxFe()->getCBE_LNA_RXFE(); }
0
e8dee991378393d5eaeec4c8b966c857
7325c6d103e261be752368f3f019e8a6
用户等级变动列表
$levelup_model = M('Levelup'); $count = $levelup_model->count(); import('@.ORG.Util.Page'); $p = new Page($count,20); $levelup_list = $levelup_model->order('member_id asc,create_time desc')->limit($p->firstRow.','.$p->listRows)->select(); $mid_list = $levelup_model->order('member_id asc,create_time desc')->...
1
dffa277352d545577f84bc480bfdc51c
b033b2c8a5f36b249cd97651fe6b55f5
그룹넘버에 따른 그룹원 정보 목록 가져오기
public List getMem(int gNo) ;
1
4627967911b8e605b1fa091ce559d04f
dd3126632e6c8c80edc4596619b05b32
Load assetName from abName and instantiate it under parent.
public class AssetBundleManager public AssetBundle LoadAssetBundle(string abName) { LoadAllDependencies(abName); AssetBundle ab = null; if (!abDic.TryGetValue(abName, out ab)) { ab = AssetBundle.LoadFromFile(abPath + abName); abDic[abName] = ab; } ...
0
27054bd82dfeef143b18464255e4c8e3
18d6b4d84daf7875476f5a9c09c8ef0a
Get the data source filename
class Filename(object): def _get_data_source_type(self): return self._data_source_type
0
a12027a4e7f81fa7e0d2992ab0df4e19
d6a4d15ba28873e8b7e2ddfdc12d7e61
If stdin is a attached to the TTY (rather than being piped in), use a terminal password prompt, which will hide the input
class CommandLineTool: def input_password(self, prompt): return self.pass_from_pipe() or getpass.getpass(prompt)
1
0dff574f1c4dddac924f57f4a277052d
417d2c862d687be000ec38500e67c4d3
Test the option to not shrink the smaller objects
void testShrink() { CTShrink shrink; Mat srcMat = imread("doc/10.png"); shrink.startEdgeShrink(srcMat); }
0
2822382245258352a19db55d1df48635
3c5917f6bd7f7aaa33d38dd9f7696f85
findStudentPosInEnrolled() is a function that is primarily used to check if a student exists in the enrolled list. It is used to find the position of the enrolled student in the arrayList, in case the student needs to be removed from the list.
int position = -1, index = 0; bool found = false; while (index < size && !found) { if (array[index] == studentID) { position = index; found = true; } index++; } return position; }
1
fd179516396a59641f884065fda9a220
00ddf915f9774328e01537da6dcee389
Update the event's trigger time from input field.
var text = this._element.val(), hourMinite, currentValue, tempDate; if (this._lastText === text) { return; } this._lastText = text; currentValue = this._value; this._value = undefined; hourMinite = getHourMinutes(text); if (!hourMin...
1
424f187f6187a28a26cde4d0c863f637
851abb3732955759eab59dd892e721a4
Selects the status filter UI element corresponding to the given status.
public class EventsBase extends TestSuiteBase public static void clickOnStatusFilterButton() throws Exception { By byButton = By.id(EVENTS_STATUS_COLUMN_FILTER_BUTTON); commonActions.clickOnElement(byButton, TIMEOUT_5_SECONDS); }
0
fe0a1d1d05c688399642ff5a54bde3f1
4900fe29c73b2b4daa65ceb043a14fc9
获取"被运维主机"上面的账户信息
class Host(models.Model): # 虚拟机、物理机 等设备 def get_hostuser(self, user, protocol='ssh'): return Perm.get_host_hostuser(user, self, protocol)
1
67574fa64364913ad5d88e341f3a5d5e
aad63bb7f88b60eeccaa40618cd8bc5c
读取人脸数据库中所有id
class Faces(LoginAuth): def get_face_ids(self, data_json): login_id = self.check_auth(data_json) face_id_list = [] face_info_data = FaceInfoDao().select(user_id=login_id) for row in face_info_data: face_info_dto = FaceInfoDto(row.face_id, row.face_name) face_id_li...
1
13a097d4dc39952b3c8a24b527b2709b
9ee90e0dae5e113efbd400e56f4bff60
Get the filename suffix used for filtering
class PageFileMask: def getSuffix(self): return self.result.groups()[2]
1
a8933a64016b1e9bf30d6d56e6023e74
2ffb8052b783df3483425c5e8d1135da
气象站得到更新的观察数据,通知观察者
class WeatherData(object): def notify_observer(self): for observer in self.observer_list: observer.update(self.temperature, self.humidity, self.pressure)
1
dcba03feba8c0ce6f85b606e5a77e6dc
9247c6d98a51da8dd550a044f36ed18d
terminate when there is bingo or no possible next state
for (int i = 0; i < _cState.size(); i++) { if (_cState[i] == 0) return false; } if (combinePossible(universal)) return false; return true; }
0
55b510a3760870112d73035a5e8ed1ae
8aca27757d76d228028b37b413097820
Filter the query on the HasPhotos column Accepts an associative array('min' => $minValue, 'max' => $maxValue)
$cmp = $equal_cmp ? '=' : ''; $hit = false; if(strlen($min)){ $min = addslashes($min); $this->query->where($field, ">$cmp", $min); $hit = true; } if(strlen($max)){ $max = addslashes($max); $this->query->where($field, "<$cmp", $max); $hit = true; } if($hit){ $this->query->where("`$fiel...
1
423819101b00d52adb06e46d31e84e9d
a5797ca6d42180307bb58777e21b6afa
生成zip返回流头部信息
header = "HTTP/1.1 200 OK\r\n" header += "date:{}\r\n".format(datetime.utcnow().strftime(GMT_FORMAT)) header += "Content-Encoding: gzip\r\n" if type == 'html': header += "Content-Length:{}\r\n".format(len(outputdata)) header += "Content-Type: text/html\r\n\r\n" ...
0
092dcee48e2d49deec6628f17df31dbb
004399462a0314f1c55f8a7377ab7241
Gets the resolution value for this VideoSettings.
public class RoomController extends CatalogAccessController<RoomType> public int getResolution() { return Room.getResolution(); }
0
90ec8a769893543cad65b23a9a680b6a
c312c3c197fdd9bc02d3c46726d6e319
Validation rule Valid if a student_id field is set (via autocomplete field)
class Student extends \yii\db\ActiveRecord public function rules() { return [ [['NAME', 'TITLE', 'CLASS', 'SECTION', 'ROLLID'], 'required'], [['ROLLID'], 'number'], [['NAME'], 'string', 'max' => 30], [['TITLE'], 'string', 'max' => 25], [['CLASS'], ...
0
1109df1d318de93f37399b6402b24665
5bb6b830082b0992296bf5a319b2d6c8
获取min分钟前的时间
public class DateUtil public static String getPreviousTime(long minutes) { long currentTime = System.currentTimeMillis(); currentTime -= (minutes * 60 * 1000); return dateFormatDefault.format(new Date(currentTime)); }
1
a1f88463cd9f59001c796e1d13348396
291f229470b017da8484ec17602d27a3
URL to which to redirect for invalid credentials
class CustomUserCallback(OAuthCallback): def get_error_redirect(self, provider, reason): return reverse('auth-failure', kwargs={'provider': provider.name})
1
0888c3b1fe0b1aa17bebb0c750eaa962
05007a6185311259e66a565d45128aec
Wrapper function for the stu_course_detail_s stored procedure
instructor = Instructor('98763','Newton, I','SYEN') instructor.add_coursestudent('SYS 660') self.assertEqual(instructor.one_instructordetails(), ['98763', 'Newton, I', 'SYEN', 'SYS 660', 1])
0
8be445e0f89ac322b631c282c41ecc28
1fafd7dfc9cd00d225d157f4c61d1605
Updates the values of the maximum and minimum vertex heights generated.
public class TerrainHeightMap public void recalculateExtremes() { maxheight = 0; minheight = Float.MAX_VALUE; float value; for(int x = 0; x < size.x; x++) for(int y = 0; y < size.y; y++) { value = getPoint(x, y); if (value > maxheight) maxheigh...
1
954bedd7e0642f7c2ecc14bd048fed8c
7d480a2b9097e7e0794491ccb9e90f58
========================================================================= Funcao Total de alunos de uma turma =========================================================================
namespace LevelLearn.Domain.Repositories.Pessoas Task<int> TotalAlunosPorCurso(Guid cursoId, FiltroPaginacao filtro);
1
a5afd08ec3ab94d36f56c3908d896e7c
d45722ff15bf95671807fb5ad40253cc
CLI facing function to check which radio stations are online from the file.
class Radio(): def Stations(self): return self.urlJson
0
2b01b6453957bf0a2151bdb327606c17
fd73961863541ab57cf6d70574127388
当前真实的任务总数
{ int32 taskNum = 0; for (RoleTaskList::iterator it = m_tasks.begin(); it != m_tasks.end(); ++it) { RoleTask* pTask = *it; if(pTask->GetType() == TASK_TYPE_DAILY) { ++taskNum; } } return taskNum; }
0
69919c0079bf94722d9c8619edabd600
3405ad4497d04d0ffb0846143f0a3550
Get the average intensity of the image
class Image2D extends PixpipeContainer{ getAvg(){ if(!this.hasMetadata("avg")){ this.computeSimpleStat(); } return this.getMetadata("avg"); }
1
90ec95a98273d63402e7872bda725ee1
1c90e196be4e1748c3429330e289d0d5
获取某个社团当前届的所有学生
class ConstitutionModel extends CModel{ public function getStudentDateBycid($cid,$crid,$keywords = ''){ if(empty($cid) || empty($crid)){ return false; } $sql = 'SELECT c.studentname,count(c.studentname) as count,c.uid,c.sex,u.face,u.username from `ebh_constitution` c left join `ebh_users` u on(c.uid = u.uid) w...
1
7a5a558991f0419a5eb373d6e95bff0d
eb73c7755e42ac093ed69a3a6fc9d9fd
计算直线P1-P2与直线Q1-Q2的交点位置,注意这必须建立在两直线不平行的条件下
{ double A1 = P12.Y - P11.Y; double B1 = P11.X - P12.X; double C1 = -A1 * P11.X - B1 * P11.Y; double A2 = P22.Y - P21.Y; double B2 = P21.X - P22.X; double C2 = -A2 * P21.X - B2 * P21.Y; double dlt = A1 * B2 - A2 * B1; ...
0
e41620c2815748a7d605ebc938f8c4ff
fc590e23a449192d3f966363bf1fceba
Logs the angle calculated by the master and feeds it to the base motor.
{ int16_t checkMasterClockwise,checkMasterAntiClockwise; int8_t turningAngle = 25; int angleDifference; char steerCommand; uint8_t xMHiByte = 0, xMLoByte = 0, yMHiByte =0, yMLoByte=0,zMHiByte=0, zMLoByte=0; int16_t xMagData =0, yMagData =0, zMagData=0; ...
0
96d9b3c46062902290a2016d147fe1ef
eaf8168b27139bfe7890b062c5bcc58d
Returns the global unique ID of this physical vertex.
public class Vertex public int getId() { return id_; }
1
8e141909b27a8d9f957a4bf768cccf83
788953359c5dd5f0c2b17af7de18c9ea
重发调度
$sql_check = "SELECT count(id) as num FROM `dl_task_queue` "; $checkRes = $this->db_tasklog->fetchAll($sql_check); $resendCount = $checkRes[0]->num; if ($resendCount==0){ return false; } $sql_getall = "SELECT * FROM `dl_task_queue` where f_retry_now=0 or (f_retry_time+3600<".time()." ) LIMIT 0,$r...
1
16a066996d9de3a00716cf908f55b354
231c463e9e4f53ba8c3bbdf99b2fa152
@brief Startup sequence of FPGA
SetOut(PIN_PWR_12V, OUT_HIGH); vTaskDelay(TASK_DELAY_MS(10)); SetOut(PIN_PWR_MOTOR1, OUT_HIGH); vTaskDelay(TASK_DELAY_MS(10)); SetOut(PIN_PWR_MOTOR2, OUT_HIGH); vTaskDelay(TASK_DELAY_MS(10)); unsigned long tick = xTaskGetTickCount(); FPGA::Write(FPGA::OMSP_TICKH, &tick, 2); vTaskDelay(TASK_DELAY_MS(10...
1
9e4d2e4247d25ce07c6e09d634c96bb0
46c2c066975a6f1bf6a4621e7967d693
nothing required for now, as the functionality exposed in the other methods seems enough
public class EventServiceNullImpl extends EventServiceBaseImpl public void setupEventService() { }
1
00bbded16ab4760dfb4cf5bf380f93ff
7bbe81ee331424afeca294d778b5bec1
\brief Destroys the item while it is being thrown.
namespace GVR.Throwing public class Throwable : MonoBehaviour public void CompleteThrow() { Destroy(gameObject); }
1
51dd3cf6025a30973cbc5df570c42841
b4cdc06b1cafdcc4f2949b61f2475fd7
1. It asks the user to enter a positive integer value, x.
{ int x; do { printf("Enter a positive integer please: "); x = GetInt(); } while (x < 1); return x; }
1
348e4bd1b088131adee2c4bdc79d8381
997d700bf9983910ec3d680897b1608b
根据giftCode查询关联活动
public class ProductGiftServiceImplTest extends SpringTestCase @Test public void findProductGift() throws TsfaServiceException { ProductGiftDto findProductGift = new ProductGiftDto(); findProductGift.setCode("111"); productGiftService.findProductGift(findProductGift); }
1
2bb35de5f1e0a607f98c6739feee49fc
7370637b23574676caf21a75d88ddcaf
<p>sessionUsrSid を取得します。
public class Anp020Action extends AbstractAnpiAction private int __getAccessUsrSid(Anp020Form form, HttpServletRequest req) throws Exception { if (canNoSessionAccess(req, form)) { return Integer.valueOf(form.getUserSid()); } else { HttpSession session = req.getSession...
1
bdd0767dbd9c82d098dcb923cd12058a
f85a4c1d53c422f94f7b448601bb6e58
アドレスバーを更新します。
{ EditText address_view = (EditText)g_activity.findViewById( R.id.searchAddressEditText ); address_view.setText( address ); }
1
acbedc58710f059191a6252c29a71cfc
5351de2afbadb7b5e3e923e7f7bbf680
Get RDS connection
{ LambdaLogger.Log("GettingRDSString"); string dbname = "postgres"; var rdsEndpoint = Environment.GetEnvironmentVariable("RDS_ENDPOINT"); var password = Environment.GetEnvironmentVariable("RDS_PASSWORD"); return "Host=" + rdsEndpoint + ";Username=postg...
1
02293dc99375a029ccf2f09fea6063fa
16c2df5f892f564eec7c27a577ab587b
고객 탈퇴 창 보여주기
class Customer deleteClose() { $(".customer-delete").css("display", "none"); }
0
635a861b8b11ab931d428a70340fa5ea
94fc386016058e1b2034a9134265ee46
Calculates the current front vector
function calculateForward( viewerConfig: PointCloudViewerConfigType ): THREE.Vector3 { let forwardX = viewerConfig.target.x - viewerConfig.position.x let forwardY = viewerConfig.target.y - viewerConfig.position.y const forwardDist = Math.sqrt(forwardX * forwardX + forwardY * forwardY) forwardX *= CameraMoveme...
1
a276a60be94da97b2fd09dc74d746175
ff726013df9009c6bec52ff79d3e678a
Process raw_type definition to create "type" record.
static int record_type(compile_t *c, ast_t **r) { assert(c); assert(r); ast_t *a = ast_new(c, r, RECORD_TYPE, 1); if (expect(c, LBRC) < 0) return -1; if (field(c, &a->as[0]) < 0) return -1; for (size_t i = 1; accept(c, SEMI); i++) { ast_grow(a); if (field(c, &a->as[i]) < 0) return -1; } if (expect(c...
1
7946ff805878a88da16cd088f3f09691
bd100a8cc52dbcc124e41b86b174f2dc
Test update announcement as guest
self.assertTrue(self.client.login(username=self.nerv, password='password')) r = self.client.post('/announcements/1/delete/', {}) self.assertRedirects(r, '/announcements/') self.assertEqual(Announcement.objects.count(), 0) self.assertTrue('messages' in r.cookies, "No messages are ...
0
935992eaa3ca5f74d50b6ef26da4352e
1d6705030114c532a3b543eccecff1ca
获取参数列表,这个方法不是很严格,会把嵌套函数调用的参数一起包含进来。但最后可以进行去重。
params = [] export_params = [] for node in nodes: if isinstance(node.node, php.FunctionCall): params = get_all_params(node.node.params) else: if isinstance(node.node, php.Variable): params.append(node.node.name) if isinstance(node.node,...
1
7677d76cba7f0b1dd360282abda3eb22
a58e700c5d101f7acefa532e8f590f68
返回暴雨点序列的坐标
def get_coords(): return models.Coordinate.get_coords_without_weather()
0
4523efaa7723e86ea5764640d11fc875
9c9f2e7af6b79a069c35fc92301a9c13
This makes decisions about what to include in the UDP packet sent to the Raspberry Pi that controls the servos.
void processing(alt_u32 a,alt_u32 b, alt_u32 c, alt_u32 d, alt_u32 e, alt_u32 f, alt_u32 g ){ sDATA.ulServoPWM_O = sDATA.ulServoPWM_C; if (a <= b && a <= c && a <= d && a <= e && a <= f && a <= g){ sDATA.ulServoPWM_C = 2703; sDATA.ulThrottlePWM_C = 2531; } if (b <= a && b <= c && b <= d && b <= e && b <= f &&...
0
b11b412e7cce717370115a2f984cec52
523cbb36428ef08dc17529c3ac51811c
Set flashbag success message if we come from the order payment page.
class PageOrderCreate(Page): def create_order_success(self): self.driver.element_is_not_visible('class->loading-bar-background') return self.driver.get_text('xpath->//*[@id="myModal"]/div/div/div[2]')
0
98786c6c57c260f043fffe2638f618a1
63dc16a14f00bb65e1efe469a14520f2
Clicks 'Archive' button.
namespace NotecardFront public partial class CardControl : UserControl private void btnArchive_Click(object sender, RoutedEventArgs e) { ((Panel)this.Parent).Children.Remove(this); Archived?.Invoke(this, EventArgs.Empty); }
1
88d9f99ff7b969fd99ceb219d0c7b008
442c86e33f3e867d8cc292ff9cac5694
Check if right player has moved
if self.emptyPos[1] == 3: isAtRight = True else: isAtRight = False return isAtRight
0
fc944d336b0160f0fabb82b9b2056939
3a2aa110f1db457ff3b41a12c2e08fdc
Get Field Amt 18
public class X_LBR_CNAB extends PO implements I_LBR_CNAB, I_Persistent public String getlbr_CNABField18 () { return (String)get_Value(COLUMNNAME_lbr_CNABField18); }
1
d5bdf345f5fba9619bbc710ec8755cc5
56cdac7ae5200f1f7b6b81c30765e88f
filters based on if person according to spaCy named entity recognition package
def is_not_person(tag): if tag.get('reg', tag.text).lower() in stopwords: return True else: return False
0
7e5ed5e0e9590e7efef7e5dc63ce4bd1
7a22e90777fbb4220f66cd568febdc5e
Returns the class of one declared object for rule slide.
class Jeops_RuleBase_LessonSelectionKB extends jeops.AbstractRuleBase public String getDeclaredClassName(int ruleIndex, int declIndex) { switch (ruleIndex) { case 0: return getDeclaredClassName_LSR1(declIndex); case 1: return getDeclaredClassName_LSR2(declIndex); case 2: retu...
1
7bbd3ec867de1c0d7ef39a99fb6b99a0
1eaac293b2d9439290fb2bb007339a60
checks existence of database file & creates index files in necessary
def initialize(): if not isfile(DATABASE): with closing(connect(DATABASE)) as conn: print(f"Creating database: {DATABASE}") print("Creating table: indices") conn.execute("""CREATE TABLE indices ( salt TEXT PRIMARY KEY NOT NULL, ...
1
88a8424b8c088907a83504d04c21665b
25b12f311b8efae8f775533bc01a377a
a list of common concatenations
def getsyns (): syns = {} syns[ (0,AM) ] = ["Adend3mGLUR","Adend2mGLUR","Adend1mGLUR"] syns[ (0,AM2) ] = ["Adend3AMPA","Adend2AMPA","Adend1AMPA","BdendAMPA"] syns[ (1,AM2) ] = "somaAMPA" syns[ (0,NM2) ] = ["Adend3NMDA","Adend2NMDA","Adend1NMDA","BdendNMDA"] syns[ (1,NM2) ] = "somaNMDA" syns[ (0,GB2) ] = ...
0
5e542437bc1b026cbbf20e11bca2a84b
c96cc1769b1b86dcc30f0c7158161412
减少 theta
public class CTMController : MonoBehaviour private void UpdateTheta() { foreach (CellController cellController in l_cellController) { try { cellController.theta = Mathf.Clamp(Convert.ToSingle(ThetaText.text), 0, 1); ThetaText.text = cellControl...
0
245f50e7d6bb0dfc641f48256731ec52
a25a25d160e1ceff49d4bde410d1416d
Shortcut method to map two numbers to their position in the data buffers.
class _LED_Data(object): def map_pixel(self, x, y): pos = (x * self.height) - 1 if pos < 0: pos = 0 if x % 2: pos += self.height - y elif x == 0: pos += y else: pos += y + 1 if pos < 0: pos = 0 return pos
1
aa228fac4d0e556a080876b15eae96be
9c18d5230106f88db1aea3d326dc035a
\brief MCP230xx set output values on all GPIO port bits
unsigned char mcp23017_SetOutput(unsigned char gpxn, unsigned char state) { unsigned char rv = MCP23017_OK; unsigned char io = (1 << (gpxn & 0x07)); if ( (gpxn & 0x10) == 0x00 ) { if ( state == MCP23017_GPXN_ON ) { portA |= io; } else { portA &= ~io; } i2c_Buffer[0] = (MCP23017_I2C_ADDRESS << 1)...
0
82aebb0b006bb8cbf8a11a902a2eda36
4820abe3f346291bb6f1c80e6b67df66
Destructor; frees memory on gradient stack.
GrapheneLUT3DPotential::~GrapheneLUT3DPotential() { V3d.free(); gradV3d_x.free(); gradV3d_y.free(); gradV3d_z.free(); grad2V3d.free(); LUTinfo.free(); }
1
5573fc09be1830615133af7f9cc33584
7007aa62755895c19ceab085632a65ca
Test discussion_created event.
$course = $this->getDataGenerator()->create_course(); $digestforum = $this->getDataGenerator()->create_module('digestforum', array('course' => $course->id, 'type' => 'single')); $user = $this->getDataGenerator()->create_user(); $record = array(); $record['course'] = $course->id; ...
0
1435eb739c8d4d963ba87bd8f01cf4ad
442a713e081d60ace14df3b46113aa87
读取赛事系统邮件
class gm_process extends user_base public function do_system_mail($arg) { $__get_arg = (object)array(); $check_res = $this->check_system_mail($arg, $__get_arg); if ($check_res->error_code != 0) return $check_res; $err_res = new api_result(-1, false); $err_res->msg = ""; $web_task = (object)array(); $we...
0
a4a960e87e6143f788dd20d2de327a83
6301bc771d67698423a4a8fe489063c0
Validates the login token used for DeepLens login
return new Promise((resolve, reject) => { connection.query('SELECT * FROM `login_log` WHERE token = ?', [token], (err, result) => { if (err) throw err; if (result[0] && result[0].valid) { resolve({ truth: true, userID: result[0]...
1
24d51543263390110a59af4e793a2c1b
2d83e09a4d6358c8fe80b88e55bd61a1
Set wheter the XML declaration should be written. The default is false.
class Output public function setRemoveXmlDeclaration($removeXmlDeclaration) { $this->removeXmlDeclaration = $removeXmlDeclaration; }
1
781867e8668a36397684d9184b85334a
0712582e867e49397587f7350f19931e
Retrieves the GUID(s) associated with the specified class name. This list is built based on the classes currently installed on the system.
namespace Lombiq.Vsix.Orchard.Services.DependencyInjector IEnumerable<DependencyName> GetDependencyNames(string className = "");
0
dce8d157393911e42a1b107a76b555ea
5276f00cc01e21daa278e107b623b338
设置最低充值金额 单位元
class PaymentWithdrawFee public function setMobileWithdrawMin($mobileWithdrawMin) { $this->mobileWithdrawMin = $mobileWithdrawMin; return $this; }
0