query_id
string
corpus_id
string
query
string
code
string
label
int64
088bf750b46183c4d26572b55016939c
bdf2cf5d1f67dad48aab678aabf75bab
Test case for edit_embedded_resource
class TestAuthorisationsApi(unittest.TestCase): def test_update_embedded_account_request(self): pass
0
d08397962bc8639009236f698de29504
69ff721f55db27de9de1596ac9276e03
Asynchronous response for operation 'odbcas_ASSvc_StopAS'
odbcas_ASSvc_StatusAS_pst_( const CEE_handle_def *ph_ , CEE_tag_def tag_ , odbcas_ASSvc_StatusAS_cct_ rtn_ ) { static IDL_long osy_ = 470889124; const void *pv_[1]; pv_[0] = &osy_; return CEE_OBJECT_CALL_POST( ph_ , 9 , pv_ , odbcas_ASSvc_StatusAS_ccw_ , *((CEE_tag_def *) &rtn_) , tag_);...
0
2bec09b19440aa165ceeffb365056095
98155e0e9cee8df4285d5abf6f306a60
WTIMER1A FALLING EDGE CAPTURE TIMER INTERRUPT HANDLER
void TA1_0_IRQHandler(void) { if(counter1Prev != counter1){ datat[ii] = i; datac[ii] = counter1; counter1Prev = counter1; ii++; } i++; Timer_A_clearCaptureCompareInterrupt(TIMER_A1_BASE,TIMER_A_CAPTURECOMPARE_REGISTER_0); }
0
9540d3c462a4159ca3dc2c19cb5be963
51ed815db1a91b12b55c58671aaa2b77
Convierte Modelo en Entidad
namespace WebTiempos.Service.BO public class UserBONew : ContextBO<WEB_RECURSO, RecursoDTO> protected override RecursoDTO EntityToDto(WEB_RECURSO src) { RecursoDTO result = new RecursoDTO(); result.Fill(src); return result; }
0
f6b4e280df73a09f91aae1ebc858498f
14386dc3dd26c9b9728d1d5c8e1f0858
Case where the module names are listed with irregular spacing
extracted_modules = xym.xym('test-file.txt', './', './', True, False, 0) self.assertTrue(len(extracted_modules)==3) module_check = ['ex-no-error.yang', 'example-error.yang', 'test-valid.yang'] for y in module_check: self.assertTrue(y in extracted_modules)
0
983b3a4b66f42f5ed167505296b6e2a9
872ff6e8b436e6a7e48495ae4512e7d9
Resets syncpoint and waitbase values to sw shadows
{ { nprocs = 0; et.restart(); nc->presync(et.nsecsElapsed()); syncpause.lock(); nc->resume(); syncpause.unlock(); wc.wakeAll(); } }
0
919fa85a788e125679b54b14770c1c24
889d078c71829886b486596207880149
sql注入特征库-查看
class SqlInject_base(unittest.TestCase): def test_sqlinject_sel_superhigh(self): SqlInject_Case.sqlinject_select(byparam=self.param['riskLevel'][0], param=self.param['riskLevel'][4]) LOG.info('sql注入特征库查询-极高风险--成功')
1
f1f06ef5860dfbe4da1c07c83bff029a
6352eba60ae1e0c30123c147aea13988
是否支持压缩数据库
namespace Adaptive.Arp.Api public class Database public virtual bool IsCompress() { return compress; }
1
7d7095f2464bef699d5f829fc37465bb
fdb398ed4d324bcc44660703928cad5d
Notify that stylus writing icon is removed and not shown.
private void notifyHoverActionStylusWritable(boolean stylusWritable) { if (stylusWritable && didHandleStylusWritingCursorUpdate()) { mCursorOverridden = true; return; } if (mCursorOverridden && !stylusWritable) { getContainerViewGroup().setPointerIcon(mPoi...
1
2a8c69b2af79fc98e16cf6ab52627db8
b66c23d618f651b6e7b36c9f4507116e
读取指定文档内容(除去标点符号)
doc = open(file_name, encoding="utf-8") result = list() for word in doc: word = word.strip() result.append(word) return result
0
8c950e18e8350c81fc484880299f5362
479a083e97a4ccc979495841b3163852
Iterate through the new class' __dict__ and update all recognised NamedDescriptor member names
class Utils: def update(self, config_dict: dict): for attr in config_dict: if attr.startswith('_'): continue if hasattr(self.__class__, attr) and callable(getattr(self.__class__, attr)): continue self.__setattr__(attr.lower(), config_dict[att...
0
603c8abd3b3d6c5fbdb584b8b67ac2fb
f2a0b0a4b653184637cc68bd12652b32
무작위 생산
public class Lotto private int[] make() { int[] arr= new int[6]; int idx=0; while(idx<6) { int insert = (int)(Math.random()*45)+1; if(!isSame(arr,insert)) { arr[idx]=insert; idx++; } } return arr; }
1
27a7e9a62b092f7db9da19c7a53d5784
0c9264bb725b2002a9cd59e927820399
!\internal Returns the KDE palette
class QGuiApplication(__PyQt5_QtCore.QCoreApplication): def palette(self): return QPalette
0
8a7f8b9fb60aa6c34a65cdc071383f3b
68b7ca16e3c7040c4879f3e5cddb5f83
#Dropping the lowest value from a vector
if(mode(vect) != 'numeric') stop("non-numeric argument") if(na.rm == TRUE){ new <- remove_missing(vect) } sort(vect)[1] }
0
09f27c99ceca88fbc8b59c8bf7e0e5c3
6f875d45af059048e261bb6a0961d940
validate every glossary object (useful for a developer or admin)
this.objname = "glossaryset"; this.par = p; this.setkey = sk; this.setlabel = sl; this.terms = new Array(); }
0
b23201ac63a7e234632955c279bd7cad
407e9cdbd0a0f09ad3c6f94a3527d8cb
This function prevents to have duplicate vulnerabilties
keys = set() output = [] for item in input_list_with_repetition: key = item["cve_product"] + item["cve_product_version"] + item["cve_id"] if key not in keys: keys.add(key) output.append(item) return output
1
b7edfc47e25871da731758f14da36293
ec6e257e249054e5fbceb7ccecfd569b
Designs the final screen after the game is over and writes data into file.
protected void finalScreen(){ highScoreList.log(name + "\t" + this.score); highScoreList.sortFile(); display.removeKeyListener(this); display.showScores(); }
1
3f61bb5ee61c43107f3f7a95d98b4ffb
cba19e8db3ad7ebe9aac2eb01812c3f3
Contruye la implementación del repositorio.
class AppRepository extends BaseRepository implements UserRepositoryInterface public function __construct(App $model) { parent::__construct($model); }
1
ee4330e11b2664feca3ce7a978902057
14c4cf1d7f839b8b3c3ceca0d42b5a78
Finds the n child of a parent view.
public class CategoryTagsContract int getChildViewIndex(View view);
0
18e78fecae8de5da675099b7dba8657d
35a66d50f95274bcf73619052d0213d1
给定棋盘fake_Board,判定此棋盘下role一方的得分
score = 0 for chess in board.getScore(True): score += 5 ** chess for chess in board.getScore(False): score -= 5 ** chess for r in range(4): for c in range(8): pos = (r,c) if self.isDangerous(True, board, pos): ...
1
96fce9702813bd735c752b9654b0ebfe
e67e8936d0056e9a2a6147b8786568b4
The bot will add an admin role to the user and he will have full access and if the role is not created it will create it and give him the role" !admin <@member>
class Permisisons{ async IsAdmin(guildMember){ if(typeof guildMember !== "object") throw new Error("Not an object, so this is likely not a guildMember.") if(!guildMember) return false if(guildMember.user.bot === true) return false let role = guildMember.guild.roles.cache.find(role => rol...
0
c7f6602d75efd426b5e4f5ddb41a554f
eada917c4d1427ba674915ecf9fdc293
Dynamically set the max inter-broker partition movements per cluster. per cluster.
class DataXceiverServer implements Runnable public boolean updateBalancerMaxConcurrentMovers(final int movers) { return balanceThrottler.setMaxConcurrentMovers(movers, this.maxReconfigureWaitTime); }
1
592b0ca905e8d2abcfbae5ed7a091801
40c40fde254dbe55f8aea6195cff5ed5
Fonction : sousMenuSupprimerArete Description : Permet de demander la suppression d'une arête du graphe
Agence agence = choixAgence(); int choice = 0; System.out.println("Etes-vous sur de supprimer l'agence ?"); System.out.println("1 - OUI"); System.out.println("autre que 1 -- NON "); System.out.print("Votre choix :"); while(!sc.hasNextInt()) { ...
0
15341b271441c581bd87c27ef1808f08
555e61d65bae7c83de19c9f01a5baaa9
Инициализировать канал связи Tcp.
{ try { TcpClient = new TcpClient(CommunicationServerInfo.CommunicationServerAddress.Host, CommunicationServerInfo.CommunicationServerPort); TcpClient.ReceiveBufferSize = BufferSize; TcpClient.SendBufferSize = BufferSize...
1
6b9638ce06705d767013a946991fab8e
fc800040b3931e5b5cda9f0f72d8ecda
Commands are messages that begin with !!
if (message.content.startsWith('! ')) message.content = message.content.replace(/^! /,'!'); const keyword = message.content.match(botCommandRegex).groups.keyword; switch (keyword) { case 'omni help': message.author.send(helpMessage) .then(function() { ...
0
f1cc3d496c8aaa6d09b0fd9286ed76a0
86f042bc79faaa37eee193c1519556fb
Retrieves the unique IDs for all audits that were recorded on or between two dates. searched. searched.
page = 1 earliest_date = datetime.today() filtered_entries = [] while earliest_date >= from_date: audit_page = self._get_audit_log_page(username, page=page, query=query) entries = self._parse_audit_log_entries(audit_page) for dt, title in entries: ...
0
cae8ccf0824fed51d8ee54b76536e9b6
c94c54e55ac849a8efded2169430e2c6
Check if given BO is a Bookmark in given folder
{ TBOID bRCS = GetBookmark(RCSFolder); return (bRCS != null && bRCS.Equals(boId)); }
1
d07561978112b4c186f9625149414f57
b957dc10701b622fce5fd1f04f296f81
<p> 根据订单id关联查出 租赁公司信息 </p>
@ResponseBody public LeLeasescompany getOrdernoByLeasescompany(@PathVariable String id) { return myOrderService.getOrdernoByLeasescompany(id); }
0
c4f6b4ad2e1bc590b7b49bd8d6460627
7e72d4b453e3614011ae512522cf7024
Should Fire Missile Will determine if the missile is in firing range.
{ if (Time.time > NextFire && AllowShoot == true) { GameObject missile = Instantiate (Missile, transform.position, Quaternion.identity); missile.transform.LookAt (PlayerPos, Vector3.forward); FireRate = Random.Range (FireRateRange.x, FireRateRange.y); NextFire = Time.time + FireRate; } }
0
d6689fbfe475d8a5273ab5e1f53e4cee
8349bf9e0270b493d9ec7edbda1493da
All scenes have been loaded. Build the tabs for SelectSceneActivity.
ActionBar actionBar = getSupportActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setDisplayShowTitleEnabled(false); ActionBar.Tab tab = actionBar.newTab() .setText("Build") .setTabListener(new TabListener( ...
1
a60f682dc7077784420676a0d1b3245e
cd2843a5f81a78632faa249f558b9ef1
GET: ChecklistReport
{ ViewData["ReportStatusId"] = new SelectList(_context.ReportStatus, "Id", "ReportStatusName"); ViewData["WeeklyTimeReportId"] = new SelectList(_context.WeeklyTimeReport, "Id", "WTRName"); ViewData["WeeklyTimeReportId1"] = new SelectList(_context.WeeklyTimeReport, "Id", "WTRN...
1
437f018509ae2bc6d00932711e7c6cb5
fb8cfe13e63a0cf8d1d926226f1e98aa
Fetches all character stats from database. Calculates results based on the stat settings.
{ nbsSTR = parseFloat(document.yourStats.yourStr.value); nbsDEX = parseFloat(document.yourStats.yourDex.value); nbsCON = parseFloat(document.yourStats.yourCon.value); nbsHP = parseFloat(document.yourStats.yourHP.value); nbsAC = parseFloat(document.yourStats.yourAC.value); nbsBAB = parseFloat(document.yourSt...
0
c352155352b87345b47e69b00d6ee11e
741f27b1ec2892ca39a6b9d9c9342eb7
プロパティを登録する
var o = this; var c = RClass.find(o.constructor); var as = c.annotations(EAnnotation.Property); for(var n in as){ var a = as[n]; if(a.constructor != Function){ a.save(o, p); } } }
1
fe16f5316c63175dd14c0d0316a22318
fd22e9e7c29d33b3c8f260260e552e86
See if the field is actively set: OrigTrackingId (PAYMENT_TRANS.orig_tracking_id)
{ if (this.Key == null) return true; return this.Key.TrackingIdServFetch; }
0
e6f8d3c91b637d9b26a2136340d68206
6267062e8814a35ed844141d9c35c091
@brief process keyboard code to char
{ switch(code) { #ifdef _WIN32 case VK_UP: return KC_UP; break; case VK_DOWN: return KC_DOWN; break; case VK_LEFT: return KC_LEFT; break; case VK_RIGHT: return KC_RIGHT; break; #endif default: return (const char)code; } }
1
dd9bea1d8a4f725becc8d8dfa128c104
81a7e993a7774eec83bdc339df44db83
Обновление данных по датам, прогноз у которых обновился.
void updateForecasts();
1
c9830155d846873218b5099e7c9e44ab
d90172580254099357f631fb1be16c70
This function returns the position, where a char array (symbolic name) exists in a cache (data type). If not, returns -1.
int index_symbol(char symbol, char from[][3]) { for (int i = 0; i < 66; ++i) { if (symbol == from[i][0]) { return i; } } return -1; }
1
750abec66e36134dc67e42b3e7082616
9461d6ca916e42bf35e0da80155d28de
WARNING THIS FUNCTION MODIFIES THE CONTENTS OF THE PASSED IN STRING
var legalChars = `ABCDEFGHIJKLMNOPQRSTUVWXYZ234567` stripped := "" s = strings.ToUpper(s) for _, orig := range s { for _, leg := range legalChars{ if orig == leg { stripped = stripped + string(orig) } } } if s == stripped { fmt.Println("Original string contained no illegal c...
0
7cd6a5bbb58dca640f1d72e828d6de1d
5f4e1cdd8da709319d56bacaf496aa3f
This method takes a soup (A parsed html page into a python object) and extracts the reason code information from the page and returns it in a dictionary
return_record = {} report_details = page_soup.find_all("code") report_message_wrapper = report_details[0] detailed_report_wrapper = report_details[1] report_tables = page_soup.find_all("table") report_table_2 = report_tables[0] report_table_1 = report_tables[1] report_table_3 = report_ta...
1
de60b79dbcbc53bae98439e7dcc7e312
aaff32facfc06013b478fe260216cc1c
Get pollutant results from a Subcatchment.
HashMap<String, PollutantsEntity> getPollutants(String pollutantType);
0
b98901ec5bcd39b34a4c8ab0c7fda77c
dcdddabaec581b1a3750aeaff5df2b5a
消息初始化,is_read参数表示是否只是获取未读消息,若为true则只显示未读消息
let body = { message_id: item['message_id'] } this.rp.restPost('sys-msg/read', '', body, res => { this.rp.restGet('sys-msg', '&receiver=' + this.uid + '&_size=100000', res => { this.unreadMessagesList = res.json().collection ? res.json().collection : []; if (this.unreadMessagesLi...
0
dc9dcfac749cfa66a68e49d2df613c1d
e05d7e61c772680067f8a092b7d94b41
Note: **ONLY available in the static graph mode.** Shows whether the automatic differentiation mechanism based on automatic differential basic operators is ON. Defaults to OFF. Returns: flag(bool): Whether the automatic differentiation mechanism based on automatic differential basic operators is ON.
def is_grad_enabled(): return oneflow._oneflow_internal.autograd.is_grad_enabled()
1
8231f3ab573bf193bfcdaef7753e838a
169dfe43a3196328cb9cfa65cc95001d
Gets the current media item of the {@link SessionPlayer} associated with the connected {@link MediaSession}. This can be currently playing or would be played with later {@link #play}. This value may be updated when {@link ControllerCallback#onCurrentMediaItemChanged(MediaController, MediaItem)} or {@link ControllerCall...
IMusicPlayer getCurrentPlayer();
0
7b480e2b2f0450c865a32f719d9de70d
3d88eac97eb76b6ff384d9d5f1ff37ac
factory method to create a deep copy of OrderSetCustomerEmailAction
public FDataFinancialCustomerActionUnit clone(){ FDataFinancialCustomerActionUnit unit = RClass.newInstance(FDataFinancialCustomerActionUnit.class); copy(unit); return unit; }
0
f9f578d69e44d9367f4d103e651f915d
5e8cfba7ffbdaa5dcaaf55377e269d9e
Commande des rotacteurs de volume
{ if (event->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent *>(event); if (ke->key() == Qt::Key_Up) { setUp(true); update(); sendRobotData(ID_ROUES,ID_ROUES_UP); return true; } else if (ke->key() == Qt::...
0
ccd35c6860ee7f1b65eac5dd0ab7a35e
26a39d4531f52a7e01d676ba6e17d89e
Initial width, updated through resize pubsub
impl Widget pub fn set_min_width(&mut self, value: f32) -> &mut Self { self.min_size.x = value; self }
0
9938a5412f698586374c128e94e8035b
20ace0af5cd0794ea54c5e693fb5b0c8
编辑图片集模型文档
[ApiAuthorize(RoleType = SysRolesType.后台)] public BaseResponse<DocPic> EditDocPic(DocPicEditReqeust info) { UserManager user = UserManager.getUserById(User.Identity.Name); if (string.IsNullOrEmpty(info.Id)) { var result = DocPic.CreateDocPic(in...
1
7a43ce4d6320076513ae0407b0191d83
2d1577bb001b80da042b50eb020d5aad
list claims on hold
this._ping.claims() .pipe( take(1), map((result: Array<any>) => `You have ${result.length} claims`) ) .toPromise() .then((result) => this.serverResultToast(result)); }
0
caff982672763be517eba8d98d2e31be
7f44c3842dc2b89008bd96dd0b3318a4
存储输入流,如果资源已经存在,则覆盖已存在的资源<br/>
public class FileUtil public static void saveStream(InputStream inputStream, File file) throws IOException { FileOutputStream os = new FileOutputStream(file); try { IOUtils.copy(inputStream, os); } finally { IOUtils.closeQuietly(inputStream); IOUtils.closeQuie...
1
5389239b59458c4e698541870e847597
d647d242048b67d0729efdca6c024ee5
绘制销量和成交折线图
var myChart1 = echarts.init(document.getElementById('lineChartContainer1')); var option1={ backgroundColor:'#ffffff', tooltip : { trigger: 'axis', axisPointer: { type: 'line', label: { backgroundColor: '#6a7985' }, ...
1
f53a62e5d6d6417f49a60d19ccc3f369
7e61e4ba9ae7a5a2eac13d73cb123fd6
Find suitable air source rule for the search
List<Strategy> ans = new ArrayList<>(); ans.add(Strategy.Local); if(GroundMap.hasCloudlet(state.getZ())) ans.add(Strategy.Cloudlet); if(state.getV()!=0) ans.add(Strategy.AdHoc); return ans; }
0
09f0373a3da4d37784774d5d84ab25ab
ef6b25a4eb14c5edc156878237afe707
Shorten urls to reasonable length
{ if(strlen($url) > 30) { $first = substr($url, 0, 10); $last = substr($url, strlen($url)-17, 17); $text = "$first...$last"; } else { $text = $url; } return $text; }
1
073d8c32a6573409136795bac58618a6
7f61448ad6da3ef0f9cb03f40c5be655
https://gist.github.com/julienr/6b9b9a03bd8224db7b4f
cases like (1)
0
e3907ef35753093ea3418d42df6acce0
2cf3136d08483ea579e1543c1375f95b
Adds a new alignment to the alignment list
class HMMHit(rje.RJE_Object): def _addAln(self): newaln = rje_blast.PWAln(log=self.log) self.aln.append(newaln) return newaln
1
cd384d52c679cbc91d225757dff52075
fb80f88da1269bb1042690fe3d721fb5
Handles the PDFExportClick event of the ExportData1 control.
{ try { DataExportFormatEnum format = (DataExportFormatEnum)Enum.Parse(typeof(DataExportFormatEnum), drpExportTo.SelectedItem.Value); ExportData(format, 100); } catch (Exception ex) { AddAlert(GetString("general.erroroccurred") + " " + ex.M...
0
a5b64789cc1e94819b21c4a8493ca8a6
11efb141d72f03b0851ba3a5a6cab3cb
This method has been deprecated, please use method buildExec instead.
@Deprecated int execve(Pointer __path, PointerByReference __argv, PointerByReference __envp);
1
d8866ac51779c4105a3d8fa21f59d38c
5762458dd88ce387432e87cd888569d4
infinitely loops calling ball objects move method & repaints
while (true) { ballX += ballSpeedX; ballY += ballSpeedY; if (ballX - ballRadius < 0) { ballSpeedX = -ballSpeedX; ballX = ballRadius; collide(); } else if (ballX + ballRadius > BOX_WIDTH) { ballSpeedX = -ballSpeedX; ballX = BOX_WIDTH - ballRadius; collide(); } if (ballY - b...
1
7f159e0e48cdf1297c992b74d5216f53
222bd7655124bb6246496a76d6330692
Test deletion of an existing contact.
class AutopilotApiTest extends \PHPUnit_Framework_TestCase public function testDeleteContact() { }
1
de95e610c46dbb0bdae52313129d1679
f215d5140db97fcb3136b98de0385bb3
Se activa cada vez que haya un cambio de texto en la búsqueda
class tbFactura( QTabWidget ,Ui_tbFactura ): def on_txtSearch_textChanged( self, text ): self.filtermodel.setFilterRegExp( text )
1
b4e6d5a3ca188f1e2f787a13fa3b07e5
4de00c1b6fcd5c8bdd0a680cee84684a
Returns the supported image MIME types
class ImageUploadTypes public function getImageMimeTypes() { return $this->imageMimeTypes; }
1
31c4c97b1fce9020668f3e8e483b6c41
43abb5e8f08f81a05342fb95e0e9c710
Given data that will be fed to Dismod-ODE, select subsets that will be used to make predictions from the fit, in dismod-predict. The two datasets modify the random effects and sex covariate values.
def sim_data(): X_df = pd.DataFrame( np.random.lognormal(3, 1, size=(20, 5)) ) y_df = pd.DataFrame({ 'status': np.random.binomial(1, 0.5, X_df.shape[0]), 'DISEASE': np.random.choice( ['A', 'B', 'C'], size=X_df.shape[0] ) }) gene_features = np.concatenate( ...
0
e42110ab312cdd53c758cbfd87cf134b
a15db768923b37048caf4d06d053d777
Return a queryset of talks that will be held on the morning
class EventListView(ListView): def get_queryset(self): return Event.objects.filter(start__gt=timezone.now(), is_published=True)
0
ff10d6fbfeaa6dd649d19065363ed1ff
f21c9962959bcca238a804bcbf29d58f
@brief EFM single program with read back(Word).
{ en_result_t enRet = Ok; uint16_t u16tmp = 0u; DDL_ASSERT(IS_VALID_EFM_ADDR(u32Addr)); EFM_ClearFlag(EFM_FLAG_CLR_PEWERRCLR | EFM_FLAG_CLR_PEPRTERRCLR | EFM_FLAG_CLR_PGMISMTCHCLR | EFM_FLAG_CLR_OPTENDCLR | EFM_FLAG_CLR_COLERRCLR); SET_REG32_BIT(M0P_EFM->FWMC...
1
a43d58c1ddefc8c82ef88e790e1fb92e
0beddfeaded511eb3318e2299b928743
GET v1/gerencias
$response = new JsonResponse(); $dataGerencia = array(); $em = $this->getDoctrine()->getManager(); $securityContext = $this->container->get('security.context'); $user = $securityContext->getToken()->getUser(); if ($securityContext->isGranted(array('ROLE_DIRECTIVE', 'ROLE_...
1
a123cca34d5cb2253252257c8947c9c2
82ea43d2cf184c7e4ef881f6512662d8
@brief Function creates array of query objects using DSA-style method.
get_query_dict(char *qs) { Dict *d; d = (Dict *) malloc(sizeof(Dict)); if(d == NULL) return NULL; d->head = NULL; if(qs == NULL) return d; qs = parse_pair(qs, d); while(qs != NULL && *qs != '\0') qs = parse_pair(qs + 1, d); return d; }
0
9ff1fde56f8d73e514d4ec8da9244c7e
1f5cba37712f9d38c1887aeffb7f825a
生成 年统计 数据
@RequestMapping("/test") @RestController public class TestController @GetMapping("/timeYear2021") public void timeBaseYear() throws IOException { for (int i=1;i<=12;i++) { int monthInt = i; String Str; if (monthInt <= 9) { Str = "2021-0" + monthInt + "-01"...
0
ffddc0ccc31476da391bedc2571043e5
4ca38be298ab9a6d9b4d0d4d0fe19575
Purge the messages in the spool.
class AIS_IMAP_Mailbox extends AIS_Debugable public function expunge() { return imap_expunge($this->imap_stream); }
1
db0c358fd6bb486ae19e2eb2618bd718
fc3ea5480898bd8cbc4e28dcf88d200b
Print out stsInfoMouseNew. Separate fields with sep. Follow last field with lastSep.
statustext_mouse(char *str, Geo area, InfoBar *infobar) { StatusMouse *sm = NULL; int i = 0, button = 1, n; char cmd[256] = { 0 }; char func[64] = { 0 }; for(; i < (int)strlen(str); ++i, sm = NULL) if((n = sscanf(&str[i], "(%d;%64[^;];%256[^)])", &button, func, cmd) >= 2) && n < 4) ...
0
80df0c5b0ddad9254d6ccfbab88d6d35
20683ebfc1c2db7d47ce43aa13f76311
通过sourceid获取当前的数据 包括分页信息 搜索表单
@Controller @RequestMapping("/sourceData") public class SourceDataController @RequestMapping("/getSourceDataById") public String getSourceDataById(HttpServletRequest request, HttpSession httpSession, String cs_id, String sourceDataId, String type) { User user = (User) request.getAttribute("user"); Source source...
0
e454c6ca312d13150d2b45187ae17740
9610323870737cfaf0dc963c6a5b4b55
Adds tbe user to the list of invited people if the user is NULL or already invited, returns FALSE else adds the user and returns TRUE
function InsertUserInviteToken($InviteToken, $UserId){ mysql_query("UPDATE ".UserInv." Set user_id = '$UserId', invite_accepted = '1', last_visited = NOW() WHERE invite_token = '$InviteToken'"); }
0
237dcbe085fcf3311a864b04a3a0c1dd
4a1b945cf75d22b67b9945c69e4d784e
Reads the next car from the stantart input
Cab *cab; int id, type; char brand, color, dummy; cin >> id >> dummy >> type >> dummy >> brand >> dummy >> color; if (type == 1) cab = new StandardCab(id, type, brand, color); else cab = new LuxuryCab(id, type, brand, color); return cab; }
1
5ead2a494fdd49018afef21e40c8db41
00d619834f6414191e39bd393464e0b9
Poll player status information. Some MPRIS players do not notify about all status changes, so that status must be polled. Subclasses may call this method for that purpose.
class MediaController(BaseMediaPlayer): def update_status(self, callback_function_param=False): self.send_message( {MESSAGE_TYPE: TYPE_GET_STATUS}, callback_function=callback_function_param )
1
d96fc1d19c48ec7b5dbd0869048d4bef
b1e6913158b05c643dbb1388d16c428a
远程阻塞执行一条SHELL命令(非交互式).
RemoteShellExecResult execute(RemoteShellCommand remoteShellCommand,TimeUnit timeUnit,long timeout);
1
caa6413b212b9662f76aa921effd9373
76bf4805e1e5409db9d24bf9ebfe0ae0
Create an instance of {@link RankByCountryType }
@XmlRegistry public class ObjectFactory public CountryDto createCountryDto() { return new CountryDto(); }
0
c4d35044e8e983e55206eb2059713094
7f25320521947db96fb4d5c945908a10
查询数据(单条) -> 主库
{ if(!checkParams(4,script,order))return false; AKVar *out=order->getParam(0); out->setType(AKVar::typeHandle); MYSQL *mysql=(MYSQL *)order->getParam(1)->toHandle(); if(!checkMysql(mysql)) { onRunError(order,"无效mysql句柄"); return false; ...
1
8970de7c28fc23b68f7c419f862cfcbf
ef35b145ac6379910b9e2859b9486b58
用于判断对谁公开咨讯
{ $id = (int)$id; if ($id) { $model = self::find($id); if ($model) { if ($model->type == $type) { if ($model->uid) { return $model->uid == $uid; } else { return $model->is_open == 1; } } } } return ...
1
e10cb57ac1b51ddfe359ef0d6d15cac4
00da24871e3928fe3dda3cea7626a2c0
使用 UTF8 字符集并以行列表的形式读取文件内容
{ using (FileStream fs = File.OpenRead(fileName)) { byte[] b = new byte[1024]; UTF8Encoding temp = new UTF8Encoding(true); while (fs.Read(b, 0, b.Length) > 0) Console.WriteLine(temp.GetString(b)); } ...
0
6cf91b408deab792feaf80e386dab7b4
6bc3ca54da3d83d2f0dc3a7c83a5c502
Sets the parent of a `Tree`. If we already had a parent, unlinks `self` from its previous parent before linking it to the new one. NB: It is _highly unlikely_ that you will need to set this property yourself. Setting this property, unless overridden in some parent class, does not register `self` as a child of `value`, ...
class XNodeLayer(object): def setParent( self, other ): if ( self._parent == other ): return False if ( self._parent and self in self._parent._children ): self._parent._children.remove(self) self._parent = other if ( self._parent and not self in self._children ): ...
1
12adc65d237ae35a0627006f09f53e92
c281f1efca14c6774036abb5f0611e50
删除一条运动记录
return request({ url: '/mp/werun-registry/' + postId, method: 'delete' }) }
1
be5d9d920cbc1684781aec351c2f05b9
077a1eb57faf5c965a0e4095afc98337
Animación respuesta incorrecta.
var elemento = document.getElementById("respuesta"); elemento.classList.remove("fondo"); elemento.classList.remove("reprobado"); elemento.classList.remove("border-primary"); elemento.classList.remove("border-danger"); elemento.classList.add("border-success"); elemento.classList.add("aprobado...
0
a19cdbc8fc13f2971fe5bcccf00d9e35
bb88eab32c8e930a483f50845aa8a2a1
print info about a gpio pin
int mj = major(devno); int mi = minor(devno); printf("%5d, %5d", mj, mi); }
0
f94f548381fb743d196dab5791a2afcf
c4e809188e3f15df0834339bedacb55d
Sets the priority held in feed-forward augment. In a closed loop system, the feed-forward predicts the outcome of the next output from the motor controllers for better error correcting accuracy.
public abstract class AbstractSwerveModule public abstract void setPivotPidFF(double gain);
1
f5d162d903c1f6379d80f0ef722209d1
0e909c62e7070dec298bb1179a7fb682
转换vnode为fiber
if (!fiber.dom) { fiber.dom = createDom(fiber); } if (fiber.return) { fiber.return.dom.appendChild(fiber.dom); } const elements = fiber.children; let prevSibling = null; if (elements && elements.length) { for (let i = 0; i < elements.length; i++) { const element = elements[i]; con...
1
0d69e1ef4bca1e7502c2a0dc69975210
5b6f5d38a0e1ccd260290a1fe498407a
Batch delete XMScalpingApplication by ScalpingId
namespace HozestERP.BusinessLogic.ManageCustomerService void BatchDeleteXMInstallationList(List<int> ids);
0
f375277b57d9d37e0ee141b7b837c7b1
d44a88b340bfdc8fbcea9cf22de3c806
设置列表的大背景
void CMTSWAcdListBox::SetMessageBoxBackground(const QString & strPic) { QPalette pal = this->palette(); QPixmap pix(THEME_GET_BMP(strPic.toUtf8().data())); pix.scaled(this->size()); pal.setBrush(QPalette::Window, QBrush(pix)); this->setPalette(pal); this->setMask((THEME_GET_BMP(strPic.toUtf8().d...
1
39a06f15860f3c11b7bc965c55a96c1a
51f80f3f87456a1ec43461badd48ea85
Count of rows.
function rowCount() : int;
1
719403d07f8408b5b981c63e01d9ccee
c34e33c8ff291888176087002cf0a3ff
Tests the generation of a rectangle width declaration with no parameters
public void testRetWidth() { assertEquals(3, rectangle.retWidth(), 0); assertEquals(1, oval.retWidth(), 0); assertEquals(2, oval2.retWidth(), 0); assertEquals(5, oval3.retWidth(), 0); assertEquals(6, rectangle2.retWidth(), 0); }
0
d8bd05bbfbc2b8596792815fb6e21654
217fde92b2edb7ab07e2d66377234c58
Funkce slouzi k zaslani testovaci posloupnosti na USB port.
void testovaci() { char c; if(Serial.available() or SerialBT.available() ) { if(Serial.available()) c = Serial.read(); else c = SerialBT.read(); switch(c) { case 'q': if (position_servo3 >= 5) position_servo3 = position_servo3 - krok_serva; ...
0
f589dccc25655e090fcde7e638e2d5d0
c95ed330f38074c55e8bb59f1da8cb64
Return number of students updated.
{ int result=0; if(stuinfos!=null) { if(stuinfos.length>0) { for(int i=0;i<stuinfos.length;i++) { if(updateStudent(stuinfos[i])) { result++; } } } } return result; }
1
f5f403b76e28aa5f3788c2fc8ee1558d
ec66ff47ad9f0191f6e48c347c30990f
Get all elements of <exchange_items>
class ProfessionData extends \DrSlump\Protobuf\Message public function getExchangeItemsList(){ return $this->_get(23); }
1
9ec38e3fe1454bd001b4478ed5c9a674
343c0b2a4362316ffe0a174a4060bf18
@brief 获取单价设置是否成功
( void ) { const slim_ProviderConfDataT *pz_ConfData = &z_ProviderConfData; return pz_ConfData->e_Setting; }
0
fce5374633fc1469c746982b48a7fe06
8302be86858646ef90a239441a27174c
返回驼峰命名
String[] split = str.split("_"); StringBuilder builder = new StringBuilder(); builder.append(split[0]); if (split.length > 1) { for (int i = 1; i < split.length; i++) { String string = split[i]; String substring = string.substring(0, 1); ...
1
9c6f61971abfd4bf91e727b625aa1960
def9aa7ff0bfdd02566190ca15903c7f
Unmaps the memory tables. Assumes all the memory tables are mapped.
void release_memory() { close(info.fd); free(info.p_tab); while(--mmap_list->idx){ Pair* it = mmap_list->list + mmap_list->idx; DEBUG("Freeing ptr: %p, len: %#lx...", it->ptr, it->len); Munmap(it->ptr, it->len); DEBUG(" done!\n"); } }
1
86cff6155745aa1e68140ae6d1e50868
8190548a18f0a8009f610b333a608371
Add soldier popup window
local frame = vgui.Create("HitmanMenu") frame:SetHitman(hitman) frame:AddPlayerRows() frame:SetVisible(true) frame:MakePopup() frame:ParentToHUD() end
1
2a3d8e39c1c0135999d82ac6df8b4d7e
59a1cb8c17fab1d8741210806c6c14fd
随机生成md5加密字符串
m = hashlib.md5() strr = str(randint(1, 10)) m.update(bytes(strr, encoding='utf-8')) return m.hexdigest()
1
4f6567502f16ad3e964c6302284ed25a
0e142631714e7506c6505cf1f1278ecf
查看指定星星格子是否为空,是的话则往上搜索非空格子,并用来填补当前格
{ for (int i = 1; i < 10; i++) { if (psb_Nums[cellPos][i]) { int count = 0; for (int x = 1; x < 10; x++) { if (psb_Nums[new Vector3Int(x, cellPos.y, 0)][i] && x != cellPos.x) count++; ...
0
d1def3ea6dfb15868d1dd906524ea1d9
3edb3235a62ce3036a97a997fbfac9d7
Validate if given value is numeric or not (using PHP's is_numeric()), so it allows decimals
public function numericValidate($value);
1
2cd0eee8e3b96995db53789504d49aff
2780628d1bdd839ba8ee5b22be606b20
Save previous value and swap it with the new.
compare_and_swap(atomic_int_p aint, int old_value, int new_value) { int value_save; precondition(initialized); precondition(aint!=NULL); lock(aint->vlock); value_save=aint->value; if (aint->value==old_value) aint->value=new_value; unlock(aint->vlock); return value_save; }
1
45fcc1ddcfff0576a48176a43bef8ae8
c4fb168e8da2ce1f67e4f3b346d2214c
Function to count the number of directories in a given directory
int getNumDirs(char dirname[]) { DIR *dirCtr; struct dirent *direntCtr; int numDirs = 0; if( (dirCtr = opendir(dirname)) == NULL ) { fprintf(stderr, "Cannot open %s\n", dirname); exit(1); } else { while( (direntCtr = readdir(dirCtr)) != NULL ) if(direntCtr->d_type == DT_DIR) numDirs++; if( (close...
1
f1b6d898ad861d7d01c1bb3a15d72bc2
471f2e64bcdb259eb2f8f65508207aac
Hacky, but means we don't need to install tensorflow to check for tf.keras.layer subclassing.
explicit_build, use_model): with trax.fastmath.use_backend("tensorflow-numpy"): make_trax_layer, input_shapes_no_batch, dtype, allow_none_batch = ( _LAYERS[layer_id]) trax_layer = make_trax_layer() if not allow_none_batch and batch_size is None: self.skipTest("Thi...
0