query_id
string
corpus_id
string
query
string
code
string
label
int64
3d2c4b344f14fc48d37d8ee1ee9728b4
31a9b5dfcdd937e9dbac54db0df097b3
@brief queries the colour sensor and sets the global colour variables
{ uint8_t sensorData[6]; readReg(0x16, sensorData, 6); red = sensorData[1]*256+sensorData[0]; green = sensorData[3]*256+sensorData[2]; blue = sensorData[5]*256+sensorData[4]; }
1
abc17aeb4cd5e66e8718d5b6d6a99c68
bfdf027d03b73bc2c12c3ae8e1f269c2
Switch to Login Activity and clear any other activities on top of it
class TransactionDetailsActivity : AppCompatActivity() private fun navigateToLoginActivity() { val intent = Intent(this, LoginActivity::class.java) intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) startActivity(intent) }
1
b95c98a83cd7f5d810ecdf4d0459c4a5
c10dda7382988fda4e8d04b368938f44
(as Rhino does not support class keyword)
class TypeCheckVisitor(MiniJavaVisitor): def visitTHIS(self, ctx:MiniJavaParser.THISContext): return self.nowClass
0
55375e444ca7d138e1599120547c438d
55e7a08f8cbdc1ce9ef2e333894cbb1e
タッチIDによって、その位置情報を取得を行う。
{ if ( (touchInput.dwMask & User32.TOUCHINPUTMASKF_CONTACTAREA) != 0) ContactSize = new Size(AdjustDpiX(touchInput.cyContact / 100), AdjustDpiY(touchInput.cyContact / 100)); Id = touchInput.dwID; Point p = _hWndWrapper.PointToClient(new Point(touchInput.x / 10...
1
11fab5415e06c486597a5f72702dbe87
75e7c526a694bbaaaedf8c6eb92f384f
Subscribes the given subscriber to notifications of the given type of message using the supplied callback only if the sender is the specified reference.
ReliableUdpMessageTypes messageType = ReliableUdpMessageTypes.Any, IPEndPoint ipEndPoint = null) { return m_tcb.SubscribeOnMessages(callback, messageType, ipEndPoint); }
0
f7a6c354e56d6a8746ab784593ba8b24
7d792f8fe2229a092fd740fdf719abe8
auxiliar function that will always ensure that the operation dict[index1][index2] += increase succeeds it also checks to ensure that the index that comes lexicographically first will be associated to the outermost level of the dict
class CrusherDict: def inc(self, key, val): print('crusherdict.py CrusherDict.inc()') try: dbkey=entryName(self.name,self.db.fetch(indexName(self.name,key))) v=self.db.fetch(dbkey) self.db.store(dbkey, (key,v[1]+1,val)) return dbkey except KeyError: try: n=self.db.fetch(countName(self.name)) ...
0
09a0acb1055483fa92116ab06ea04a51
b0e27df9735a8c9c116b5bc6965c3ba1
returns the sound the animal makes
public class RingTailedLemur extends Primate @Override public String makeNoise() { return "make soft screeching noises"; }
1
f33be7a1adcd3af44dbdcaf0b7d504a4
26e33f5d46125301e509e2a4751583c3
每次数据库请求前,检查session是否可用
protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception { OnlineSession onlineSession = (OnlineSession) request.getAttribute(ShiroConstants.ONLINE_SESSION.getValue()); if (null != onlineSession && onlineSession.getUserId() != null && onlineSession.getStopTimest...
0
a7a4217eae5fd469a71114abc3e08b91
6c4ea79c9c14750ef12b1a8bc3d2e922
根据要素类的名称或别名,查找工作空间中的数据要素类(找不到自动跳过)
{ List<object> LstFeatureClassName = new List<object>(); Exception exError = null; SysGisTable sysTable = new SysGisTable(m_Workspace); try { string condition = "数据库名称 Like '" + GetDescriptionOfWorkspace(m_Workspace) + strKeys + Ge...
0
c87395a0636334103df3f8e7d57cc495
843d117165bd8ab28e64b2a93214d325
All Elasticsearch, Wonderdog, and other support jars needed to connect Hadoop streaming with the ElasticSearchStreamingInputFormat and ElasticSearchStreamingOutputFormat provided by the Wonderdog Java code.
loadClass("org.apache.spark.Accumulator"); loadClass("org.apache.spark.AccumulatorParam"); loadClass("org.apache.spark.SparkConf"); loadClass("org.apache.spark.api.java.JavaPairRDD"); loadClass("org.apache.spark.api.java.JavaRDD"); loadClass("org.apache.spark.api.java.Jav...
0
74171d73e8c762145460c92d283a5324
01b9e5bb0b163847704643dff711f9d9
Display a listing of the Vaccine.
{ $input = $request->all(); $result = $this->vaccineRepository->search($input); $vaccines = $result[0]; $attributes = $result[1]; return view('vaccines.index') ->with('vaccines', $vaccines) ->with('attributes', $attributes);; }
1
0e6f25b7052c2a5ada9f1cae3c53b81d
34c338adc98368af92219fb2ae453f94
Free up memory by deleting all processes in process list.
{ struct uloop_process *p, *tmp; list_for_each_entry_safe(p, tmp, &processes, list) uloop_process_delete(p); }
1
89938899e0e0ec311085837aaa83e1df
f77fdefb5b692e1f6a5ce888b4af7b1b
Función del botón "Atrás" de la pantalla del nivel 1:
namespace Aprendo_con_Molly public partial class jUGADORES : Window private void Button_Click_2(object sender, RoutedEventArgs e) { delante(); }
0
84bc0188646d196a066332d548a76ecc
019e98d4b738fd66c57427004a11f457
设置登录回调函数
class OneAuth public function onLogin($cb) { $this->_onLoginCb = $cb; }
1
9fa626f4bc08310ff551701147668779
985ac30baed887565a1991e049aee29d
获取各种服务类型的发起次数和确认次数
async function getSubscriptionCountAndServiceNum() { return request(`${COPNETPATH}/order/view/getSubscriptionCountAndServiceNum`); }
0
3c50bc96021a9e5cd0f03720f3522dc1
6d241f106133400657b217c8e7842328
Search information by Nessus Plugin name
namespace Munin.WinNode static class PluginManager public static IPlugin PluginFromName(string name) { var plugin = _plugins .Where(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)) .FirstOrDefault(); return plugin; }
0
7ba2832c53c6bd4d3da8dc8621fe9f09
4ad8229a4883c06885f6aec316a8d49c
是否为服务终端的节点
{ if (activityType == ActivityTypeEnum.IntermediateNode || activityType == ActivityTypeEnum.ServiceNode) { return true; } else { return false; } }
0
0a4b16d1d25ae075085a16be552e5c1e
fdfd6a32edf064358f38ff0a691252ab
function to print the tic-tac-toe grid - the grid is a list of 9 items with a string of what to display (starts with each item being a space and then replaced with a O or X as appropriate)
def display_list(initial_list): print(initial_list[1]+'|'+initial_list[2]+'|'+initial_list[3]) print(initial_list[4]+'|'+initial_list[5]+'|'+initial_list[6]) print(initial_list[7]+'|'+initial_list[8]+'|'+initial_list[9])
1
973d269caf61aa89fac906edca7ff5ac
ca730edfcda2b849d9d13e54e6c957ba
Zera entradas titulares 1 a 8.
ui_xSetLabel(z10s2,""); ui_xSetLabel(z13s2,""); ui_xSetLabel(z14s2,""); ui_xSetLabel(z15s2,""); ui_xSetLabel(z16s2,""); ui_xSetLabel(z19s2,""); ui_xSetLabel(z20s2,""); ui_xSetLabel(z22s2,""); ui_xSetLabel(z23s2,""); ui_xSetLabel(z10s3,""); ui_xSetLabel(z13s3,""); ui_xSetL...
0
7851f53bd855d03801d1a2130d35e1fa
b316a1e79d55d9312aa0faae2e126cea
Method used to send all attributes related to an Infrastructure report to the database
stmt.setInt(2, newReport.getReferencedRequest().getRequestID()); stmt.setNString(3, newReport.getEstimator().getUserName()); stmt.setNString(4, newReport.getlocation()); stmt.setNString(5, newReport.getChangeDescription()); stmt.setNString(6, newReport.getResultingResult());...
1
d9b121a4a4f0ad6917c29ebe15f49c04
0d0b522492b13c2698201e71d3c85549
Игра окончена, когда все корабли уничтожены
class Minesweeper: def __check_end_game(self): for x in range(self.__shape[0]): for y in range(self.__shape[1]): if self.__field[y][x] == 0 and self.__player_view[y][x] in (" ", "F"): return False self.__end_game(win=True)
0
412f2c10fd73a75f13d5c02e0154836a
fd87f3821ffea246d5e27867472016d1
Decrement the counter by one. @return The final value of the counter after the operation.
class DistributedCounter(CRDT): def dec(self): return self - 1
1
227cbdcee6ce0be1d3d57a72cbcb7f4b
2addd0b8c81d6e314225f0a22ea88368
Find a team's name and abbreviation. Given the team's HTML name tag, determine their name, abbreviation, and whether or not they compete in Division-I.
def _get_team_name(bs4_element): s = str(bs4_element) start = s.find(">") + 1 end = s.find("</a>") team_name = s[start:end] return team_name
0
a3ffe9eafa820b9ef142d74b2caec325
f0576a2f7adedf748280748ae6296a5e
Parse the script language based on the shebang
static $patterns = array( '@^#!.*bin/env\s+(\S+)@', '@^#!.*bin/(\S+)@', '@^\s*<[?](php)@', '@^.*-[*]-.*mode\s*:\s*(\S+).*-[*]-.*$@m', '@(rainbow)@', ); foreach ($patterns as $pattern) { $matches = null; if (preg_match($pattern, $source, $matches)) { return $...
1
a63ec9225d383e28897f43bdae6a4082
119d193731068577be240b7060d8bf80
Returns [left speed; right speed] required to realize the given velocities. Pass in as: [linear velocity (along x); angular (about Z)]
wheel_1 = self.motor_to_extremity_wheels(motor_velocities[0]) wheel_2 = self.motor_to_central_wheels(motor_velocities[1]) wheel_3 = self.motor_to_extremity_wheels(motor_velocities[2]) wheel_4 = self.motor_to_extremity_wheels(motor_velocities[3]) wheel_5 = self.motor_to_central_wh...
0
13159a5ca48677c4fa42ca1bce628523
be7d5601de1923109833951b0a7f06fe
Returns the value of the '<em><b>Edge Radius</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Edge Radius</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
boolean isSetEdgeRadius();
0
b20b918e316105a5bf3100d64f2716c4
ee3ac11584c28dc32d60fd5f166e4f85
Sets the isotope pattern of this feature
public void setIPattern(int pLightSheetIndex, int pLaserIndex, StructuredIlluminationPatternInterface pPattern);
0
a837f2f9d29088bb30730b5450332ed0
4e3bee664df309b9babd2d8a8bfeaabc
Handle Tenant Name Change
function setTenantName(tenantName) { if (!tenantName || tenantName === 'common') { tenantName = ''; } else if (tenantName.endsWith('.onmicrosoft.com')) { tenantName = tenantName.split('.')[0] } $('#tenantNameTextBox').val(tenantName); }
1
72b2c14b75eff697466af8220494c1b6
acfc37940a99e29d2978d9347e8b4e11
Parses wave generation parameters
static bool ParseWavePreprocessingParameters(wchar_t* in_param) { wchar_t* token; wchar_t* buffer; int index; int value; token = wcstok( in_param, L",", &buffer ); index = 0; while( token != NULL && index < 3 ) { value = _wtoi(token); switch (index) { case 0: g_filter_type = (FilterTy...
1
9adc5e231606c9063f5ded882cdc494e
19365824acde526e54cdbc23d3536fa0
Début d'assignation de la pièce. Généré par le système.
public class PieceIdentite extends AffaireObjet implements Cloneable, Groupable public void setDateDebutAssignation(Date dateDebutAssignation) { this.dateDebutAssignation = dateDebutAssignation; }
1
345e8eb0af02a8f9ad4763cfef0bbc8d
5c8d9b6ee9990b6b271f51de03e64219
Load data from the ABF file and scale it by its scaleFactor.
def load_events(f): logging.debug('loading %s', f) d = np.load(f) d = np.array(d['mult'], dtype=[('mult', '<f8')]) d.sort(order='mult') return d self.scale_norm = scale_norm self.events = [load_events(f) for f in files]
0
4e9007e2e472e1c1bcb5e974c8baf01a
c8da191d81d51552f54c8f49f412d55a
儲存 Halcon 相關變數
W_hh, W_xh, W_hy = self.W_hh.get_value(), self.W_xh.get_value(), \ self.W_hy.get_value() np.savez(paramFile, W_hh=W_hh, W_xh=W_xh, W_hy=W_hy)
0
a293b934a9b2a85f0ee7678a3082fe90
9c3894c90ce5a2acb791527345b98420
add highscores via web services
{ string post_url = addScoreURL + "?name=" + WWW.EscapeURL (name) + "&score=" + score; WWW hs_post = new WWW (post_url); yield return hs_post; if (hs_post.error != null) { } }
1
becfd05cb53a754275eb4df1722f22b8
0965c3ae55cefe99e9f492b01ec9a3ae
Adiciona uma manpage no banco de dados Isso inclui sua indexacao primaria(pelo seu nome) e secundaria(por todas as palavras que ela contem)
conexao = pymysql.connect(host='localhost', user='root', passwd='laercio01', db='indice', autocommit = True, use_unicode = True, charset = 'utf8mb4') cursor = conexao.cursor() print('insert into urls (url) values (' + str(url)+')') cursor.execute('insert into urls (url) values (%s)', url.lower()) id...
0
f59eacb9fb4c41d14389eff753644d56
7b6cfe125dba3967deba1eedec547149
funzione che richiede al server la ricerca di una stringa inserita dall'utente
export class FrigoriferoComponent implements OnInit onKey(value:string){ this.search = value; this.listaProdottiFiltrati = this._filter(this.search); }
0
be60e4541537b94a4f3afe33f13ada4b
44832a23641b22709d3966c2e5283ffc
从字节数组复制一个 bool 值
namespace All.Class public static class Num public static byte[] Bool2Byte(bool[] buff) { return Bool2Byte(buff, 0, buff.Length); }
0
a1bc87156e41e8370d7f9a3ae848d1ce
a015172bd6bff0a2a1875732a7157cd0
1st layer weights, add one for bias unit
Layer::Layer(int number_of_neurons, int number_of_weights) { for (int i = 0; i < number_of_neurons; i++) neurons.push_back(Neuron(number_of_weights+1)); }
1
2abb9759e23d90f6dc28e99cf80ac202
8e1c3f7b00e0accaafb6f51dc58e8aac
展示最近三条未逻辑删除的广告图片
public class WelcomeActivity extends BaseActivity private void requestImage() { AVQuery<AVObject> avQuery = new AVQuery<>("AdvertisingItem"); avQuery.orderByDescending("createdAt"); avQuery.whereEqualTo("isShow", 1); avQuery.whereEqualTo("advType", 0); avQuery.limit(1); ...
0
101562da8dd6c68b27b74bff781b9318
734760de27974b3eb7074e86262013de
redirect the user depending on the status of the group
$grp = $this->member_model->P_get_group_details($this->session->userdata('P_uid')); $grp_res = $grp->result(); $idII = $grp->row()->groupid; $P_id = $this->session->userdata('P_uid'); if ((!isset($idII) || $id != $idII) || $grp_res[0]->accept == 0) { header('Location:...
1
6645afafa9ab1ba1f5869ba6f597106a
e463a0036c26a14381a51316c089877f
Verifica Colisão da Cobrinha
head = lista_cobra[-1] x = head[0] y = head[1] if x not in range(600) or y not in range(600): raise Exception
1
dcbb164898eaacfb4b03a40d59bc88ba
a4b35f5e58f6a7851c1ebd9e3bc6a82a
Basic processing of text dump from EasyWorship database - cleans all unnecessary formatting data
text = re.sub(r'\[\[\w{2,3}:.+\]\]', '', text) text = re.sub(r'\[\[(Category):.+\]\]', '', text) text = re.sub(r'\{\{(wikipedia|BE850|AWL|BNC1HW|BNC1000HW|BNC\d.*)(\|.*)?\}\}', '', text) text = re.sub(r'\*?\s*\{\{(audio\|.*?)\}\}', '', text) text = re.sub(r'\[\[(File|Image)\:.*?\]\]', '', text) text = re.su...
1
add45346491a62b69eb39e9446024d95
3fdd8d09954eb329f9b68980259218fc
Tests conversion from <see cref="LabColor" /> to <see cref="LChabColor" />.
namespace Honoo.Drawing public static class ColorCalculator public static double[] Lab2LCHab(double[] Lab) { if (Lab is null) { throw new ArgumentNullException(nameof(Lab)); } double L = Lab[0]; double a = Lab[1]; double...
1
b76478b28ec4c344752e6b2ab5508563
e76fa03338a28a1883a2053358a34c76
Creates a basic {@link Network} with 1 {@link Region} and 1 {@link Layer}. However this basic network contains all algorithmic components.
ITMLNetworkLayerGraph createITMLNetworkLayerGraph();
0
a08252f72de0f1054b4470821751d405
dedb08be5ff8fe19bd65f3f67fac31b5
Add processed data as new column in data reservoir.
class Controller extends BaseController public function addData(Request $request) { $handler = new RowHandler($request->input('data')); $handler->processing(); return response()->json(['responseCode' => $handler->getResponseCode()], $handler->getResponseCode()); }
0
f25c3e3b35c7c2750a07c3382cf25def
fc48047cdf1f17b2ba086e5c2088dd57
算出当年当月的天数
function getDays (year, month) { var newMonth = month + 1; newYear = year; judgeNum (newYear, newMonth); var date = new Date(newYear, newMonth, 0); return date.getDate(); }
1
84f40dd27b71608f78fa7e7d5d14da20
1f99cedd61f29fff228a250d0b56305a
Asserts that two variables are equal (ignoring case).
namespace Microsoft.VisualStudio.TestTools.UnitTesting public sealed class Assert public static void AreEqual(string expected, string actual, bool ignoreCase, string message) { AreEqual(expected, actual, ignoreCase, message, null); }
1
99bc99487029007f7a28f72c6f0f58c4
8dbd48de9ca65bca935850dc798920ee
导出文章信息列表
{ $search = $request->get('search'); $query = Role::query(); if(!empty($search)) { if(isset($search['title'])) { $query->where('posts.title','like','%'.$search['title'].'%'); } if(isset($search['category_id'])) { if(!empty($...
1
7a72b9c07502f770f297a4a598c9b460
88d5bba073c5378c8f41727e7f0b4137
更新病历 请求方法:Post
@RestController public class PatientMessageController @RequestMapping("/updatePatient") public ReturnMessage updatePatient(@RequestBody PatientMessage patientMessage){ return patientService.updatePatient(patientMessage); }
1
2b3b978de21aff4c092c288b8bbcf10c
63c5070e50173c24a1f9d5335d393d78
Quick and Dirty way to show the current token info and poll for update every 2000ms to show the new token info after silent refresh. Not bothering keeping it DRY
namespace DCAPI public class DCAPI public void Update() => token = AppToken.GetAsync(REST);
0
26ec64d18bf1ea83fc5cc27580a1220d
29cad3c1baa1a52b823321ed2ccb5eee
The maximum kore that can be in any cell.
public int getK();
0
515a8b4f2821f72b2b34cb802523e978
013bfbfc38db4d31654c839e2ee94987
Disposes this {@link FPSet}. It cannot be used afterwards anymore.
public final void dispose() { if (disposed) { return; } log.i("dispose"); synchronized (disposalLock) { if (!disposing) { disposing = true; try { dispose0(); } catch (Exception e) { ...
1
8e3024b71920d2dbc1845d6f1a001cb4
1e272932c0bd676b37fe52a3a4ba778b
添加坐骑技能
{ for (int i = 1; i <= 4; i++) { int[] skillConfig = GetPetSkillInfo((int) pet.petId, i); uint[] skill = Singleton<PetMode>.Instance.GetPetSkill(pet.id, (uint)i); if (skill != null) { AddSkillProperty(vo,...
1
dc73bcd577d1344cf48106223dd5442d
4c45dc205fedc89526de3d0df2fc1402
Get the 'PT_Group_Identifier' element value.
class FHIRRequestGroup extends FHIRDomainResource implements \JsonSerializable public function getGroupIdentifier() { return $this->groupIdentifier; }
1
b4f8e819a6506ea9d90c0dce7350e6c1
7a931200e4d745d6c3faa21e892d8651
判断公共棱是否为空
sqlcmd = ''' select count(*) from org_hwlane as a join org_road as r on r.meshcode = a.meshcode and r.linkno = a.eroadno and not (a.tnodeno = r.snodeno or a.tnodeno = r.enodeno) ''' return self.pg.getOnlyQueryResult(sqlcmd)==0
1
436adf2687a5104340ddbccd8da680ba
671f1fa7eddaa737c72b0aea15051604
Si viene id quiere decir que se esta modificando y se verifica si existe el nombre pero con la excepcion de ese registro. si no viene id la especialidad no existe y se fija si ya se usa el nombre en toda la tabla
def modify_specialization(id): active_user = session['user'] form = SpecializationForm(request.form) if request.method == 'POST': s = specialization.specialization() modified = s.modifySpecialization(id, form.name.data) if modified: return redirect(url_for('show_specializ...
0
79a56278c8842ee0e53d1f4eae3c7d4f
b3fe1e0f721cf4299f4d563ff6471ab8
Returns the object internally used to store routes.
class RouterMiddleware implements MiddlewareInterface public function getRouter() { return $this->route; }
1
c7418785d65e22dbc09d9f148fd338eb
5bd353e83e4508deb3c9897048cd2f82
Master clock (using master/slave terminology rather than parent/child, for this clock's time, when not modified "manually", is totally determined by its _master_ clock, and has no freedom as can be provided to a child by its parents).
Clock::Clock(Clock* parent) { m_parentClock = nullptr; m_startHPC = GetPerformanceCounter(); m_lastFrameHPC = m_startHPC; m_timeScale = 1.0; m_isPaused = false; if(parent != nullptr){ parent->AddChildClock(this); } }
0
a7d48e158f90fbb14a91a859eb556157
5048f17335d8fe985639d4b8b0bae74e
Source: https://github.com/davidsandberg/facenet/blob/master/src/facenet.py
def get_face_encodings(face_image, face_locations=None): face_image = face_image[:, :, ::-1] if face_locations: face_locations = [_css_to_rect(face_location) for face_location in face_locations] elif face_locations is None: face_locations = _raw_face_locations(face_image) landmarks = get...
1
2cc8ee3af7cc3aa2b474fdf39546c7cb
aa2a5d94479d7031423441328e27d989
installChaincode
cmd := subCommand + " " + networkScript + " " + "installChaincode" outAsBytes, err := exec.Command(command, commandArg, cmd).Output() if err != nil { fmt.Println("network-" + err.Error()) } out := string(outAsBytes) fmt.Println(string(out)) }
1
e28bafb8c97740447f1a2f78eb2dae8b
8cc4eefc6050361ad56e248720695e55
Initialize the harmony memory with random solutions and set the cost of each solution
void initiator(){ for(int i=0; i<harmonic_mem_size; i++){ for(j=0; j<no_obj; j++){ random_var = rand() % no_bin; HM[i][j] = random_var; } HM[i][j] = fitness(i); temp_weight[i] = penalty(i); } flag = 1; }
1
e06bb11c2dfefd5478d255c7d8b54b81
520399b6d2a4aac1e5ae40e505672885
转交采购经办人
$tName = 'pc_goods'; $dataPurchaseArr = array(); $dataPurchaseArr['purchaseId'] = $purchaseId; $where = "WHERE sku='$sku'"; OmAvailableModel::updateTNameRow2arr($tName, $dataPurchaseArr, $where); $purchaseName = getPersonNameById($purchaseId); $userName = getPerso...
1
d9606353c37ffc16fcb8373590286197
8b85c5167b70557db54cf1cbdbd720c4
根据角色Id分页获得未授权的页面资源 多条件查询
List<AuthResource> getUnauthResource(Integer roleId);
0
6790d193a5b6499c0ee4f3caf477a4ad
52e0b3bea60c06e1d69f2d5f6d669021
计划任务-自动转发 每次转发1条
List<AutoBilibili> autoBilibilis = bilibiliDao.selectAll(); for (AutoBilibili autoBilibili : autoBilibilis) { OldwuLog.clear(); Integer auto_id = autoBilibili.getId(); Integer userid = autoBilibili.getUserid(); BiliUser userb = biliUserDao.selectByAutoId(a...
0
6a0c40acfe3db6a9c1064f2ef553fc2a
dc7f6ec37e104fb17fbcd978cdf3ded6
获取公司员工认证后补填字段配置信息列表
function getCompanyCertiedList (data) { return request('admin/company/enterpriseList', data) }
0
748dab5ce3e39d455c085f32ec1d7b5c
98d356be8a7c1cc06245fd6e1a822949
Builds a list of the supplied number ({@code numberOfCategories}) of CategoryDraft objects (with a customized prefix string for the name, slug and description) that can be used for integration tests to mimic existing categories in a target CTP project for example. All the newly created category drafts will have {@code ...
public class CategoryMockFactory public static List<Tool> mockTools() { Tool tool1 = new Tool(); tool1.setName("first" + TOOL_NAME); tool1.setDescription("first" + TOOL_DESCRIPTION); tool1.setVersion(TOOL_VERSION); tool1.setFeatures(mockFeatures()); tool1.setLinks(mockLinks()); ...
0
722721b6c2daf95ec00bcb7419838e0e
bec04a85c00f933f4bb1eebf8303e988
returns week of month for a given date => 3
function weekOfMonth($date) { $time = strtotime($date); $firstOfMonth = strtotime(date("Y-m-01",$time)); return intval(date("W",$time)) - intval(date("W", $firstOfMonth)) + 1; }
1
15332ff01ea2851c45d5c9c142f59352
46fec6a7d55ab3e17ebe842219d65400
Retrieves a card from its name.
try { return pm.getObjectById(NameToCard.class, token); } catch (Exception e) { } return null; }
0
4aae2746a8b5c7ba9371b7a0d4d3cba5
d344aa774e04571dd7ea49f02668b967
returns a list of repeated words
words = st.split() repeat = 0 check = list() for i in range(0,len(words)-1): if words[i].lower() in check: pass else: check *=0 if words[i].lower() == words[i+1].lower(): repeat = repeat +1 check.append(words[i].lower()) return...
0
385f0416bc1036b65aee6dc739e87c92
776774f4cc51cb14b6896822705de857
Getter of primary key constraint
public class ConstraintsConfig extends AbstractLiquibaseSerializable public Boolean isPrimaryKey() { return primaryKey; }
1
afdb9783a2bbd7879dc93bd39ee42155
2fd6b7476874a66108fe0f9556b5bae0
增加积分等级
{ $do=M('member_score')->where('id='.$member_score_id)->find(); if($do){ $addscore=M('member')->where('id='.$userid)->setInc('member_integral',$do['add_score']); if ($addscore) { $dos['userID']=$userid; $dos['user_do']=$do['name']; $dos['add_int']=$do['add_score']; $dos['add_time']=time(); ...
0
7e7b6f684208cdaf2704cd7312a9ee88
4b2ddb70709987f185bbaedee8dfa206
ゴスパー曲線を描くための初期処理
class Trochoid01Drawable: MyDrawable() private fun init() { angle = 0f pointLst.clear() }
0
61c4fa78ccb9f357f537c4b704f205c9
0fffddbe309e716875e6c770ac5c04f1
Sets the row_amount to a certain value
abstract class Core_Game_Filler_Abstract extends Core_Game_Abstract public function setRowCount($count) { $this->_rowCount = $count; return $this; }
1
b8ed9dd953ceb3995049ca6a1bcb3766
06cb377d440442e266d891a06a70d96b
家庭电话
export class Test getFamilyPhone( parameters: { byuId: string phoneType: 'EMR' | 'PRM' lookupNumber: string } & CommonRequestOptions ): Promise< | ResponseWithBody<200, family_phone> | ResponseWithBody<400, error_response> | ResponseWithBody<401, error_response> | ResponseWit...
1
010643545e36dbe80e3125ab10dd2f59
3095e4311a9d720ce56b2b52af0efca8
Interface for calling functions in remote processes.
class DebuggerInterfaceNone(QObject): def remoteLoad(self, fn, argv, wd, traceInterpreter=False, autoContinue=True, autoFork=False, forkChild=False): return
1
77e478110b7a238b922d5d94e2030aee
90088f4b46ae7a61cb24f04a1dc3bb36
Rule 1: Try to fly towards the center of mass of neighbouring boids
class Boid(): #define Boid parameters at creation def cohere(self, others): centerPoint = others.pop(0).position for other in others: centerPoint = Point3d.Add( centerPoint, other.position ) centerPoint = Point3d.Divide( centerPoint, numBoids - 1 ) direction = Point3d.Subtract( centerPoint, self.position ...
1
dddef73a685a947b4d7bd8c26833347e
837f25da50000f78011ac5402d8adaf7
发送一个字节的数据,形参d即为待发送数据。
void USART_SendChar(unsigned char d) { while(!(USART_MODULE->SR&USART_SR_TC)); USART_MODULE->DR=d; }
1
3c036b404a38ae2f4c47c02db96c494b
02d5fe8a655203f0b7bab101a239d083
This method sets the setting of numberOfPixelsSpinBox.
{ double maxFactor = 1; if (currentOriginalImage->width() <= currentOriginalImage->height()) maxFactor = currentOriginalImage->width(); else maxFactor = currentOriginalImage->height(); factorSpinBox->setMaximum(maxFactor); }
0
690df47949b48422e29f1b2e1f1aa62c
d610c45c7ac7bcd197312d55b242ec02
Returns the static constructors (.cctor).
namespace com.habelitz.jsobjectizer.jsom.api List<StatementBlockScope> getStaticInitializers( List<StatementBlockScope> pList);
0
f6defd9551fa4f8d8da522ceaf532f98
119ba837c8ec53d1ec2776451ee27c4d
设置左车的实例
def setLeftSpeed(speed): pass
0
c6e6b278d8ae179ce46a0bb0231bf059
f87c2b7d18e1c173fa5b91bf6ae09904
Determine whether the provided method name is valid in Java.
if (voidMethodHashes != null && methodName != null) { return Arrays.binarySearch(voidMethodHashes, methodName.hashCode()) >= 0; } return false; }
0
d754fcba1cc24b8f244150737d57fc74
3c4ebea6c75f29fdc72c7bb9a2557003
获取关键词按地域细分的详细数据,目前地域只能细化到省级别,返回的结果中包括市,是为了方便以后扩展,目前结果中市的值等于省。
{ Dictionary<string, string> urlParam = new Dictionary<string, string>(); string urlPath = HttpUtils.AddUrlPath("/v2/{project_id}/stats/area/detail",urlParam); SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", listAreaDetailRequest); HttpR...
1
a1d4044dc6d73629fd8a9f5c8a0ac978
b85e30b5c1be2e76bc123ea7e2d86535
Get Employee password By email
@RestController @CrossOrigin(origins = "*") @Transactional @RequestMapping("/teacher") public class TeacherController @RequestMapping("/getPasswordByEmail") protected JSONObject getPasswordByEmail(@RequestBody JSONObject jsonObject) throws IOException{ if(jsonObject.isEmpty() || MjStringUtil.isEmpty(jsonObject.get...
1
b50f2d11ac56a272d035d93c86fae359
3f89dddde0cb70350c3c67e17512f966
Show the form for creating step 1 of a new group_survey with a members list.
{ $contacts = Auth::user() ->contacts() ->select(DB::raw("CONCAT(fname,' ', lname) AS fullname, id")) ->orderBy('fullname') ->lists('fullname', 'id'); return view('groups.create', compact('contacts')); }
1
0917a85b174638666c40775ea89e88a1
d29eef64a7feb7e352fe866d7cd4b969
将api转换为istio对应的规则
ApiManagementServiceResource apply();
0
5f897ae64c0782b8db9d1b46a7187576
115d4da9a6b2ad5a5c5d6bce2cfac24c
Calloc with an error message and an exit if unsuccessful. Also, the element count is an "int" rather than an "unsigned".
{ return (double *) err_malloc((char *) __PRETTY_FUNCTION__, elements, sizeof(double)); }
0
cc7bbb5cfc82cf97726025004c5ef040
587bb57433f10a2e2449448ac5ffe1f1
将智能指针设置为空,如果它是唯一的资源句柄,那么释放掉资源
class UniquePtr ~UniquePtr() { if (m_p) { m_deleter(m_p); m_p = nullptr; } }
1
af7708dcd8e45671f7212b0bf0424cfb
24a5078e8fa6bdf7564d24b71413d9b1
ISR that is called by the RTOS timer to post Semaphore for AcquireData
{ static signed portBASE_TYPE higher_prior_task_woken; higher_prior_task_woken = pdFALSE; xSemaphoreGiveFromISR( main_trans_semphr, &higher_prior_task_woken ); }
1
4641ae311e0cfc7579319f7e4ba9e5ae
eb00ac1997f2a337531dec779d6d0205
Takes the user input and a integer size digit as arguments and checks if the length of the user input is equal to the specified size. IF the size is equal then True, False if not equal. Returns a boolean.
if (strlen($variableToCheck)>= $desiredLength) { return true; } return false; }
0
b2f4250675d29e20a2ec08635b4177b9
5cc47a99585871fa0c6f7e0ce8d5fbca
Fetches single post data from the API.
class PostOne extends Component public function __construct(PostApi $postApi) { $this->postOne = $postApi->getPostOne(); }
1
4860205b2da9a4cb905f08bb5d52a545
c27567908f91b0f86334b0a27665cf41
接收范围(不接收消息(none)、仅接收自己操作的消息(mine)、接收全部消息(all))
public class DescribeAlarmNoticesRequest extends AbstractModel{ public void setReceiverType(String ReceiverType) { this.ReceiverType = ReceiverType; }
1
86b2e763e136c6dbd5aa07aab2a1c6f9
89fcc6b3f4912c07e917a1339645b77b
Lists all Tip record models.
class TipsController extends AppController public function actionIndex(array $params) { return $this->render('index', $params); }
0
6ae4923083f3565347d2e6844dd90ba0
badfef1a49bab1f9930d1169a6c3831d
往sets一次增加多个元素
@Component public class SetOperationsServiceImpl implements SetOperationsService @Override public Long add(Object key, Object[] values) { return redisTemplate.opsForSet().add(key,values); }
1
cb0fb5d6a72c24485e88678b77e963ca
6402922a629cc35cdf1fb269f11b97ba
Получить оставшееся количество дней до нового года
public class Praktika4_2_2 private static int calculateNewYear(int D, int M, int Y) { int [] countDays = {31,28,31,30,31,30,31,31,30,31,30,31}; if ((Y%4==0 && Y%100!=0) || (Y%400==0)) { countDays [1]++; } int days; int lastMonthsDays = 0; for (int i = 0; i<cou...
1
707427da4d7ee0566d6134fa647d4eb9
e5c666aedc2d62c70631bae67a2bf74f
创建中部面板
function createMiddleUI( ... ) local myScale = bgLayer:getContentSize().width/topBgSp:getContentSize().width/bgLayer:getElementScale() bottomBg = CCSprite:create("images/formation/bottombg.png") bottomBg:setAnchorPoint(ccp(0.5, 0)) _bottomBgOriginPosition = ccp(bgLayer:getContentSize().width/2, 0) bottomBg:setPos...
1
e31a279b4e7c835448e321d95e5cde6f
4f42d5e0d5bb8609355ec6198bb9f4b9
通过组名获取C3D参数组
{ C3DParameterDictionary dict = new C3DParameterDictionary(); if (groups == null || groups.Count <= 0) { return dict; } foreach (KeyValuePair<Int32, C3DParameterGroup> pair in groups) { C3DParameterGroup grou...
0
d7404354b5f11852610ce1fafb675934
454969e993aee49a663e446c58d3f261
Generates url for a service when running locally
export class WebsocketService public generateUrl(endpoint: string): string { return (this.window.location.origin.indexOf('localhost') !== -1 || this.host().indexOf('rhcloud') === -1) ? this.urlWithoutPort(endpoint) : this.urlWithPort(endpoint); }
1
5e6bd606451f96fc929bb845a4733fe6
f1d159cc141ec67e119e5464758bbf5c
启动 open_vpn
vpn = VPN(mainWindow) path = vpn.PathFromReg() if 'openvpn' in path.lower(): vpn.ConnectVPN() else: QMessageBox.warning(self, u"警告",u"尚未安裝OpenVPN,請參閱README.MD的說明")
1
e75f998d9de7b849f016abe820de4ed0
59f11db62c1d9c215fcd55203ae4d4d2
テーマリストをcsvから読み出す
if ( is_string( $data ) ) $data = explode( "\n", $data ); $data = array_slice( $data, 2 ); array_pop( $data ); $presets = $this->parse_csv( $data ); $output = array(); foreach( $presets as $theme ) { $theme->theme = $this->get_stylesheet( $theme->theme ); $output[ $theme->theme ] = $theme; } r...
1
006fe8da73b7a04d73d6c9c015716b83
dc0450adc25140d3cc23e573a173dc51
Gets selected user data from service call
const userId = +this.route.snapshot.paramMap.get('userId'); this.usersService.getUserDetailsForSelectedUser(userId).subscribe((userDetails: Object) => { this.userDetails = userDetails; this.isSuccessResponse=true; },error=>{ this.isSuccessResponse=false; }); }
1
d2aea34aaad10a156f26c07a48f47d5f
3b7a63c388a4bfee3eee45d53a958795
Returns the number of (unique) entities encountered in the whole dataset (= union of 'train', 'test' and 'valid' splits)
public function getCountOfEntitiesTotal();
1