query_id
string
corpus_id
string
query
string
code
string
label
int64
108999b92ccd696392e7179e67361c42
d91743261bd4949fedf9939cdd56504e
Load image at path and square crop with optional augmentation.
def load_image(path, preprocess=True): x = Image.load_img(path, target_size=(240, 320)) if preprocess: x = Image.img_to_array(x) x = x/255.0 x = np.expand_dims(x, axis=0) return x[:,:,:,0][...,None]
0
2e700befeb0a2c2882b6e9b50ee7ceb0
e418e3f4ca8dd4dee2d42f9d763603ec
是否可创建考勤
LocalDate ld = LocalDate.now(); LocalDateTime nowZero = ld.atStartOfDay(); LocalDateTime exam = examTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); if(exam.isBefore(nowZero)){ return false; }else{ BizSignList byId = this.bizSignListService.getById(signId); if(byId!=null){ if("1...
1
dd166719c921bcd3956690a1d61a9315
16f85241fd4d2e05630728197b2e400c
Convert a Buckingham unit to its predefiend human readable counterpart. :warning: Not all valid Buckingham units have a predefined human readable counterpart. :warning: Some Buckingham units correspond to multiple predefined human readable counterpart, some of which may be wrong in the given application. :deprecated: U...
def simplify_unit(old_unit_str, msginfo=''): if old_unit_str is None: return None found_unit = _find_unit(old_unit_str) if found_unit is None: _msginfo = f'{msginfo}: ' if msginfo else '' raise ValueError(f"{_msginfo}The units '{old_unit_str}' are invalid.") new_str = found_unit....
1
184de700e11492e7bfd1c5c628a0ba5a
32904233bb4921f6be4edcb8a2328102
Creates a grid of <see cref="PGISlot"/>s and sets up all events and references used by the view and model.
Grid grid = new Grid(); grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(4, GridUnitType.Star) }); grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }); plotter.Viewport.Visible = new Rect(0, 0, 1000, 1000); plotter.Viewport.Margin = ne...
0
5348d6af26063348405f2b2afac690c9
28ce61c8ec35b12a18897759c14f1a71
Permet de savoir le nombre d'heures affichés dans ce calendrier.
public function getHours(): int;
1
d062f4f0b5bc99d0aa462691124a945c
0febd0745bffae89c6185af3dee510c8
Gets the KeyEvent code for the mnemonic.
public class Messages public static Integer getMnemonic(String key) { try { return Integer.valueOf(appResourceBundle.getString(key+"_MNEMONIC").codePointAt(0)); } catch (MissingResourceException e) { return Integer.valueOf(key.codePointAt(0)); } }
1
057fc1e33a1deda506c88181a5488ed5
691694384671e9dc5200806716b32e61
Tempering function used by the Mersenne Twister.
uint64_t x = *seed; x ^= x >> 12; x ^= x << 25; x ^= x >> 27; *seed = x; return x * 0x2545F4914F6CDD1DUL; }
1
5828aecd0d320415136921490f35e617
3e62b76b47d24ebbdfe483f761e731c5
Program to swap value of two vars.
int i=3, j=5, temp; System.out.println("Before Swapping i = " + i + " j = " + j); temp=i; i=j; j=temp; System.out.println("After Swapping i = " + i + " j = " + j); }
1
271d2f65ce5aa58dd7a9e9d7cc5c0ad8
86c439398a02edc8a20c4a56a8e584f3
Метод для получения списка товаров, которые выбрал конкретный покупатель
class ProductModel extends Model public function getByClient($client) { $records = Db::selectAll(' select product.* from product inner join catalogue on product.product_catalogue = catalogue.catalogue_id inner join clie...
1
4ca616d1a9a53a1aedb963f84aa706d8
3c5ee9f1958f73b398e159ac8cc0e73f
Gets the unique identifier pay U.
class ParkingPass public function getUuId() { return ($this->uuId); }
1
c0bd90401e4a32e1daf8d49e4b4769b5
5a086e19fce8f2d2598f09483fd3fbd7
Builds the vmdk detach config spec.
args = [] if avd_spec.gpu: args.extend(("-gpu", avd_spec.gpu)) if not avd_spec.autoconnect: args.append("-no-window") if avd_spec.local_system_image: mixed_image_dir = os.path.join(instance_dir, "mixed_images") if os.path.exists(mixed_image...
0
a110e517847c8587cdfbe95c8f81d134
de6fa2eaaecf9b6a683684415cbaa823
Pastes the text from the system clipboard to the text input area.
def text_paste(): pass
0
875ab049e900b4bdeb2f4254c8c6cbfa
26aa9fc6e37b9e2659a0bb2bdc2aff7f
Đồng bộ CSDL lên Server
{ HssUtility.SQLserver.DB_update upd = this.Get_DBupdate(); if (upd == null) return false; int count = upd.SaveToDB(Utility.Get_DRWIN_hDB()); bool flag = count > 0; if (flag) this.SyncWithDB(); return flag; }
1
b4450480438ce5fb2ace42d3ca85c0f4
3506607c658f862a3097bc454fba6bf9
Used to sort the questions by difficulty
function SectionListQA (props) function sortQuestions() { props.dispatch({ type: 'SORT_ALL' }); }
0
6e508b937b53d81d95d8d8c49255cee4
2b74a99c437aab7724b9d0ec90b70a53
Return True if the keyed message exists, False otherwise.
class TAR(object): def has_key(self, key): if self.cached: return self.__keycache.get(key, 0) != 0 return key in self.keys()
1
015aacf41ff320b7e44bd7360a67a18d
4a50565fa956e2e4849abc9ef3e90bc1
获取去哪儿酒店数据
hotelsList() { var data = { url: config.hotelsList, params: { startTime: this.data.startTime + ' ' + '00' + ':' + '00' + ':' + '00', endTime: this.data.endTime + ' ' + '00' + ':' + '00' + ':' + '00' } } app.nGet(data).then(data => { if (data.data) { this.setDa...
1
5cd9282d8e14f2995f7aa20263af71a2
1877dbdaced5a92168467405bb980226
Session을 이용한 언어설정 변경
function FuncMap.SetLanguage(Language) SetSession("Language", Language) end
1
899cf9e641a00a128ef5b5e403dd912b
3b3410829e6d17dc068a2edbdef229e6
执行当前线程的interrupt中断
Thread t1 = new Thread(() -> { sort(array); log.info("当前中断状态为:{}", Thread.currentThread().isInterrupted()); log.info("第一次中断:{}", Thread.currentThread().interrupted()); log.info("第二次中断:{}", Thread.currentThread().interrupted()); }); t1.start(); ...
1
d18c2c07874d5935b18e3dd33f495819
c7a4da5211ebec59258d814791b3ea4c
システムを異常終了させる
class CommonAction public function systemError(&$e) { foreach (debug_backtrace() as $key=>$trace) { if ($trace['function'] == 'systemError') { $file = $trace['file']; $line = $trace['line']; } } $log = '' . ' ERROR F...
1
863d44a266b8a2611672e39527406c57
1f06d5e6d84e0485f177b08f0b21425b
打地基
void groundBuild();
1
7eca550fbac31ef4e03bdaf6b29f29bb
8f275ac7c4b6045fb93c54365fdcf800
Converts an <paramref name="image"/> to 2D integer array.
{ Rectangle rect = new Rectangle(0, 0, image.Width, image.Height); return image.GetBytes(rect); }
0
b687f3db566789d614610f6eabd81975
1bf59f95712eae2a533a137826d64a23
! Renders the \a list as a JSON array.
{ QDomDocument doc; QDomElement root = doc.createElement("list"); doc.appendChild(root); for (auto &str : list) { QDomElement tag = doc.createElement("string"); root.appendChild(tag); QDomText text = doc.createTextNode(str); tag.appendChild(text); } return renderX...
0
ac9febff26c442efbb4a26669cbb16cc
b972ff302ca664c7c3b853f118d13ba9
Calls before creating the thread.
if (ENABLED) { System.out.println("Thread ID: " + String.valueOf(ThreadStatisticsSetup.threadId.get()) + " :: before lock :: " + LocalDateTime.now()); } }
0
be0c0ab3af66ec4d58584401fa947125
8058d5f9416b17f87a4adca3784cf11c
Get compilation cflags. Returns: str[]: List of compiler flags.
if config.compiler_type == 'ghc': return ['-fforce-recomp', '-dcore-lint'] elif config.compiler_type == 'nhc': return ['-an-nhc-specific-flag'] else: return []
1
0e680194760e25c19847c05c8db13127
79a049e449a07bbd5b37b77b14fe85f4
Este método es para desplegar los proyectos sin grupo
class Proyecto{ public function listaProyectos(){ $query = "SELECT * FROM alm_proyecto WHERE ISNULL(alm_proy_usr_baja) ORDER BY alm_proy_estado"; return $this->mysql->query($query); }
0
ed06105320768a85cdab1cddbc4c1c55
beff65a59d68d823074a01c795544014
Emits a 'xor' instruction.
void emit_xor8c(dynarec_arm_t* dyn, int ninst, int s1, int32_t c, int s3, int s4) { MOV32w(s3, c&0xff); IFX(X_PEND) { SET_DF(s4, d_xor8); } else IFX(X_ALL) { SET_DFNONE(s4); } EORw_REG(s1, s1, s3); IFX(X_PEND) { STRB_U12(s1, xEmu, offsetof(x64emu_t, res)); } IFX(X...
1
de58edba64546057b755a533112d13db
218df0cd914df80b5a546f00753e1441
calcul de l’écart type effectué à l’aide de la distance entre chaque point et la valeur prédite par une régression linéaire
float eType = 0 ; list<Mesure>::const_iterator i; for(i=mesuresList.begin() ; i != mesuresList.end(); ++i) { eType += (i->GetValeur() - moyenne) * (i->GetValeur() - moyenne ); } eType=sqrt((eType)/(float)mesuresList.size()); return eType; }
0
5076dca7ea5a2a1f62c15a362a720ce5
8ac2b2515b0ac4345d848838c08c9de8
Check that enable is false when a layout and an empty format are selected.
class TestLayout(QpyCircuitTestCase): def test_empty_layout(self): qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) qc.measure_all() qc._layout = TranspileLayout(None, None, None) self.assert_roundtrip_equal(qc)
0
c9176eb8e4902bee76e7da01beee99e1
e4d107a29cbd9b4d6ebc7aabe0c9bace
获取生产单对应的EXCEL数据
{ $data = Yii::$app->cache->get('insert-getinfo-source-data'); var_dump($data);exit; $result = (new Query)->select('model_sn')->from('meet_product p') ->where(['model_sn' => $data]) ->groupBy('model_sn') ->all(); foreach ($result as $key => $item) ...
1
0e426bc32158a05e750bf11971d5a5fa
1629df8e65e455baf6144bd61f0b9cdb
Busca asignaciones por organismo de transito y servicio.
namespace GEXVOC.UI public partial class FindTratParcela : GEXVOC.UI.GenericFind protected override void Buscar() { AsignarOrigenDatos<TratParcela>(TratParcela.Buscar(Generic.ControlAIntNullable(cmbParcela), Generic.ControlAIntNulla...
0
be890c2e5f7e2c379a3c93f7766f99de
51d51d8f67a0bf04264424999066074b
Here we set the desired capabilities and pass the app's package and activity to Appium
class Android_Softphone(unittest.TestCase): def setUp(self): desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '6.0' desired_caps['deviceName'] = 'AVD_for_Galaxy_Nexus_by_Google' desired_caps['appPackage'] = 'com.orange.softphone.es' ...
1
1869498867e69df144aa7c61c7942c3c
7d4c471660041ef07113bd9876f6ddf7
@brief Effettua il dump del database
public class XML public void dumpDB() throws SQLException, IOException{ try{ dumpAbuse(); dumpActivation(); dumpBlackList(); dumpChat(); dumpConversation(); dumpFile(); dumpFriend(); dumpUser(); dumpPerson...
1
a687abfb242426568194e778674fa726
855b5dce95a0268c09b11f0ffa2451ff
Returns the graphics window instance variable.
class GuiWidget(QtGui.QMainWindow): def getGView(self): return self.ui.graphicsView
1
5177738025bf6aa21b24ab7f4a2272c2
9cde678c886cd4051f2d9597eac2af2e
Returns raw orientation data from the Oculus Rift. For future interns: This is implemented for conventions sake and should almost never be used outside of testing. Before using this consider using CorrectedAcceleration() or RawEulerAngles(). Quaternion representing a rotation matrix.
class Interface: def getOrientationState(self): return osvrGetOrientationState(self.interface)
1
1dfc4ff7076e0c781889bd67189586df
0f613c289bc991d258a05a1b38cd6409
Setter for <code>authorize_net_transactions.kb_payment_method_id</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class AuthorizeNetRequestsRecord extends UpdatableRecordImpl<AuthorizeNetRequestsRecord> implements Record15<ULong, String, String, Stri...
0
6e28bf8d28009de3b65241ebbdc1c095
2d0535bd0b72416b7e590ac66d002eca
executes a command via the command processor, , show (and log) an error message when needed
public class CLI private static void executeAndPrint(final String cmd) { long start = 0; long end = 0; if (!isConnected()) { System.out.println("No database connection exists"); return; } ResultSet rs = null; try { start = System.currentTimeMillis(); stmt.execute(cmd); rs = stmt.getResul...
1
b36a00ac769d71cb32efe17db1382f83
2f397aeaca05919952f849e7a2b424b6
generate the absorption part of the Kromer plot
double kx=2*M_PI/periodicity[0]; double ky=2*M_PI/periodicity[1]; int numN=nMax*2+1; VecF< VecF<double> > real(numN),imag(numN),skk(numN); for(int nx=-nMax,i=0; nx<=nMax; ++nx,++i){ real[i]=VecF<double>(numN); imag[i]=VecF<double>(numN); skk[i]=VecF<double>(numN); } f...
0
0e6b181c07b49e5d7b39544e02bacae3
1a3b43fd077c2b78b462ad06d847148a
@brief Configure feedback resistor value.
{ unsigned long ulMWRAllow; ulMWRAllow = HWREG(SYSCTL_MWRALLOW); HWREG(SYSCTL_MWRALLOW) = 0xA5A5A5A5; HWREG(SYSCTL_CRESCNF) &= ~((ulResetConf & SYSCTL_RES_CNF_MASK) << SYSCTL_RES_CNF_SHIFT); SysCtlDelay(10); HWREG(SYSCTL_CRESCNF) |= ((ulResetConf & SYSCTL_RES_CNF_MASK) << SY...
0
9e09e15fa999c9592a77dbe73029fa00
4055ecd9cff2682cdd72f7e175074c50
Removes a row from the appointment table and returns a boolean result All delete buttons call this method. No new appointments or rows are created anywhere
{ lennoxdbDataContext objApp = new lennoxdbDataContext(); using (objApp) { var objDelApp = objApp.appointments.Single(x => x.at_id == _id); objApp.appointments.DeleteOnSubmit(objDelApp); objApp.SubmitChanges(); return true; } }
1
71bd519dbe05ebb917781e256f1cf816
680f2a72f7e3b9f600b533d1fff94624
Update critical world information, such as background position, etc.
namespace CyberLife void Update(Simple2DWorld.Simple2DWorld world);
1
70450fe252c6aff98eba3fe36d637207
c43cb4334468f033faa718970d19a476
After all questions are asked, display trivia data output, and have restart/reset button.
function displayEnd() { clearQ(); $("#content").append('<h3>' + "correct: " + correct + '</h3><br><h3>' + "incorrect : " + incorrect + '</h3><br><h3>' + "skipped: " + skipped + '</h3><br><br><a href="#" class="btn btn-primary btn-lg" id="restart-button">' + "play again" + '</a>'); $("#restart-bu...
1
1e7b3ed44b5d98fec1d93cc3d9e3ada5
b443f7438eb77f1873a6e4308f4aea96
Updateview should return valid json and 400 response if AJAX POST invalid.
class ViewCommentData(APIView): def post(self, request, *args, **kwargs): return JsonResponse({'message':'Invalid request type'}, status=405)
0
c4bc5b24f36e941bcdff58466d443f76
5c1ecb3aa33def832e0fc56c4a486046
初始化MediaProjectionManager
{ if (IsInit) return; volatileDispose = new VolatileDispose(); _intent = data; Context = context; _mediaProjectionManager = AppApplication.GetSystemService<MediaProjectionManager>(Context.MediaProjectionService); _orientatio...
1
b363eb6a713f81a47f7785e4946dcae4
c0fa4837c340c6fed45de1e28393351a
Check if there are bytes in the buffer. If so, we return the first one. If there are no bytes left, we return -1.
{ if (pBuff->empty) { return (uint32_t)pBuff->data; } else { return ((uint32_t)pBuff->data) + (pBuff->last % pBuff->size); } }
0
35b6492fe0c1e31dda2db2865a8b1115
870836acc77f89d1c5de6fd7b31a61e5
Rectangular window
def rect(wsize, hop=None, nchan=None): wind = np.ones(wsize) if hop is not None: tnorm(wind, hop) elif nchan is not None: fnorm(wind, nchan) return wind
1
dfb6c4a0b9c7147b97c8589214b6bc5b
ec6862640615b6312d7381c804dd546f
call after step function of Noisy Adam or Noisy KFAC. update bayesian parameters by given params.
class CdlLdaModel(basemodel.BaseTopicModel): def update_param(self): self.phi_c *= self.update_count self.phi_s *= self.update_count self.theta_c *= self.update_count self.theta_s *= self.update_count self.sigma *= self.update_count self.pi *= self.update_count se...
0
1a400bd59945517ea9002b05ffa3f3b5
b9fa66085518c49089d39d0a27e7ffcb
跳转到章一览画面
namespace GOLDSOFT.QDJJ.UI public class CActionFunction : IDisposable public void ToChapter(object sender, object e) { Container form1 = sender as Container; SubSegmentForm obj = form1.GetWorkAreas as SubSegmentForm; obj.subSegmentListData1.DataBind(EListType.Chapter); ...
1
dfac96141c83c51a35c421b50abd34c0
49a6bbadd6ea169ce1783c4d4f1db0a6
GET: TPuntajes
namespace UTPPrototipo.Controllers [VerificarSesion, LogPortal] public class UTPController : Controller public ActionResult Index() { TicketUTP ticketUtp = (TicketUTP)Session["TicketUtp"]; ViewBag.Rol = ticketUtp.Rol; return View(); }
0
299156efb6a20ccb8dbb6acb85cf2fde
b544629137a3b357f479ac199d321b46
获取消息类别列表带分页
export class MessageClassificationService getListTemplate(page: Page) { return this.http.get(`api/MessageTemplate/page?${page.formatToParams()}`); }
1
bea419377aa66b3c844fdfdd4e94181e
60c2244aba65f953c2587e17a6caad9a
Swap color channels inplace
w, h = img.shape ret = np.empty((w, h, 3), dtype=np.uint8) ret[:, :, 0] = ret[:, :, 1] = ret[:, :, 2] = img return ret
0
d2472e47d825ef754c0f24f73954cf93
235918f99fa4ff2bf1d3bbd2fbc1161e
Gets the list of invaders
public class AttackerManager public List<AttackerSandbox> GetAttackers(){ return attackers; }
1
7b84f5734de2487ae21cccfa37099ff0
74b41a051af409ee089d4ffbd28d0a6a
票据派发通知
@RequestMapping(value = "/api/ticket/notify",method=RequestMethod.POST) public String ticketNotify(HttpServletRequest request) { HgLogger.getInstance().info("tandeng","SlfxApiController->ticketNotify->开始执行"); String orderNo = request.getParameter("OrderNo"); String ticketNos = request.getParameter("TicketNos");...
1
b3f5367e16ff28208e97022f1b0cddf2
f6c96e988a17dae9b211acefe97f7cc8
Returns a sorted collection of Appointments in this AppointmentBook
public class Attendee extends User implements Serializable, AttendAble public ArrayList<String> getItinerary(){ itinerary.sort(String::compareToIgnoreCase); return itinerary; }
0
8eff74cb652065bb029c9472cec48330
d108f8e32b4e5497895b6c4c68925694
Setter for chart grid by index.
public class CSGData implements AppDataComponent public void setGridProperty(ArrayList<ArrayList<StringProperty>> grid,int column, int row, StringProperty prop) { grid.get(row).set(column, prop); }
1
b83a859d8bb2ffe9b99b3210f6347429
49e209d6827de95dbb0362ed483e60cc
Hàm chuyển đổi sang đối tượng để đẩy lên database khi update 1 đối tượng
{ Chuong_DTO c = new Chuong_DTO(); c.MaChuong = tbxIdChapter.Text; c.TenChuong = tbxChapter.Text; c.MaMH_Chuong = cbxSubject.EditValue.ToString(); c.QuanTrong = (cbxImportant.Text == "Đúng") ? 1 : 0; return c; }
1
ab183f4fd4987065c153c7354b06e736
e7cf39e64f8be3b014a7b636b888e096
Get the current transform string.
class Fixed(RotationTransformBase): def get(self, **kwargs): return self.get_rotation_transform(self.dim, self.current_angles)
0
ad7f37365498c960f44f12d790531d15
9af267f9121a32fdf4244eb2f9448932
Returns the list of share types.
{ return [ self::TYPE_SHARES => "Shares", self::TYPE_PROPERTY => "Property", ]; }
1
cf9175948d73512c4cde6f940b7aa951
537591e0ff06f0be741bad12d5ce34e6
Walk directory tree to find files of a type
matchedFiles = [] f_tree = os.walk(nPath) for dirNa, sub, files in f_tree: for f in files: ext = f.split('.')[-1] if ext in fTypes: matchedFiles.append(dirNa+'/'+f) return matchedFiles
1
f443d9f4c0c49731a4744d23bca8ca10
b57a2619ab08786a6785f67e6cc762f6
[Documentation](https://wowpedia.fandom.com/wiki/API_GetVersatilityBonus)
function GetSetBonusesForSpecializationByItemID(specID, itemID) end
0
75ae395b94627b83eb2d66a3fd87885f
4addfd83b3a9ee611c8afbeadd6c3b84
Loads spikes from multiple file formats
def loadall(file):
0
61f92fc06a4f4c2943de44df479875c1
bf36ca4f40dd96e9c90334aaef7b644f
Função que pega e retorna todo o conteúdo do comando que está entre as aspas duplas ou simples Pega caracter por caracter e salva em uma string resultante
if ($str=='') { $retorno = $this->getValue(); } else { $retorno = $str; } return str_ireplace("'","''", $retorno);; }
0
14c08e497d2ed5ae3de62f0149c32be9
c4dd92e363e199e9491179d85223efb5
Gets case_sensitive
class App_Validate_StringNotContains extends Zend_Validate_Abstract public function getCaseSensitive() { return $this->_caseSensitive; }
1
f3f851c674b5c0781aa4b2ae208c9748
eb16b16be7e937b12aa2fd0cd82497fe
处理方法上的注解
if (handler instanceof HandlerMethod) { final HandlerMethod handlerMethod = (HandlerMethod) handler; final Method method = handlerMethod.getMethod(); final Annotation[] declaredAnnotations = method.getDeclaredAnnotations(); return declaredAnnotations; } else { return null; } ...
1
ba943240b52925769c123b293538ae8a
142de05f6c62fd77c3c94ffa0b05080f
将用户刚刚浏览过的广告的索引记录进cookie中
if ($member_id <= 0) { return array('state' => false, 'msg' => '参数错误'); } $cookie_list = $this->getViewedGoodsList(); $cookie_list = array_reverse($cookie_list, true); if (empty($cookie_list)) { return array('state' => true); } $cookie_goo...
0
ae21d26ebd306faf17187f8915a6c3ca
c6e9da284922d65d4aad8fc871f29b18
hàm lấy toàn bộ thông tin tồn kho
namespace Lib.Bll.MDBll.General public class GeneralBLL public DataTable GetAllStockInformation() { return idal.GetAllStockInformation(); }
1
d08fe996522d096de753a4c46a7eda5e
6e04c183dfde0c977d4139436f5e473a
<p> Failure test of ImageExporter#exportComponent(List,Rectangle,List,String). </p> <p> components is null. </p> to JUnit
try { imageExporter.exportComponent(null, viewport, outputStreams, format); fail("IllegalArgumentException expected."); } catch (IllegalArgumentException e) { } }
1
e878610c87b21b2673be8674a9964019
8cbb8137fbec40e228e3f957003ddc3c
轮询处理access.log的内容
{ $write_num = file_get_contents($this->logFile); $read = $write_num==1 ? $this->readFile : $this->writeFile; $handle = fopen ($read, "r+"); if(!$handle){ echo "file error\r\n"; return false; } $flog = true; while (!feof ($handle)){ ...
1
191d8ae072c842063a4196a68b176c3c
aae92ce0337b26249793fd1a135658c5
Now that the enumerator is seperated from the data object, we have to make sure the format list is still the same. The cheap way is just to check that the two ends of the list are still the same, otherwise we decide to restart
{ if (myEnumeratorValid) { if (myEnumerator.MoveNext()) { return true; } myEnumeratorValid = false; } checked { if (myForward) { while (myIndex + 1 < myArray.Count) { myIndex++; GoLayer goLayer = myArray[myIndex]; myEnumerator = goLayer.GetEnumer...
0
0c2ca44a19eebb38d53a433e9ba958ea
d9c82d3d11352692a12fe0d54ce8d3f0
7日新增会员(会员)统计(每日)
$time=array(); $stime=date('Y-m-d 00:00:00',strtotime('-7 days')); for ($i=0 ; $i <=6; $i++) { $time[]=date('Y-m-d',strtotime('-'.$i.' days')); } $tpdata=M()->query("SELECT Rtime,COUNT(Rtime) as COUNT FROM (SELECT CONVERT(varchar(10),RegisterDate,120) as Rtime FROM RS_Member WHERE RegisterDate>'{$stime}' ...
1
ff03ac7fbd4ed3e28c19352bb38614f5
e24564289b4c47bfceee2e59cd997ddd
Drives the robot in a straight line by changing the actual speed smoothly.
public class AutoCommands public void straightDrive(double setpoint, double speedENCO, double speedGYRO, double range, double rangeTimeMs, double timeoutMs){ this.kP = RobotMap.P_DRIVETRAIN; this.kI = RobotMap.I_DRIVETRAIN; this.kD = RobotMap.D_DRIVETRAIN; this.kP2 = RobotMap.P_NAVX; ...
1
8e6b59f1e497fbaa57cd801e8dbe4db2
4a42563978ed9b2efe5dded7c9b00b00
Get allowedIframePanelUrls
{ NSArray allowedSites = null; if (SdkProfile != null && SdkProfile.AuthenticationPayload != null) { allowedSites = SdkProfile.AuthenticationPayload.AllowedSites; } return allowedSites; }
0
64cd6ca94a0f3b8e7698f626f761ddc7
94468a4ab433538d1a76f39267c5a070
Estimation of space-charge limited current density
T_inf = pybamm.FunctionParameter("T_inf", {"x": self.x}) h = pybamm.Parameter("h") eps0 = pybamm.Parameter("eps0") return ( 1e-4 * (1.0 + 5.0 * pybamm.sin(3 * np.pi * T / 200.0) + pybamm.exp(0.02 * T)) / eps0 ...
1
9441272f6a709ef3c228994a88505e8c
1f17ad6ea6767b26845f328e26cbcee3
The key that triggers code completion (Default is **Space**: Ctrl + Space).
public class AutoCompletion public static KeyStroke getDefaultTriggerKey() { final int mask = InputEvent.CTRL_MASK; return KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, mask); }
1
c28c8056b7f35b761f7fc567efc127dc
8ebe9703c128e940c33033677ab69937
Creates a memory reference for registers saved/restored to memory.
class FrameId(object): def __init__(self, sp, pc): self.sp = sp self.pc = pc
0
c5ba3705a665ef840a7658c8ec14cf71
30d5ded813fa73584d2833555981e899
Gets extended attribute or null if attribute or file not found.
Objects.requireNonNull(key, "Key must not be null"); if (extensionAttributes == null) { return null; } return (String)extensionAttributes.get(key); }
1
f5cb15bdcd7ae6e03644a81ec334e1d7
5de29a8d3165d7ceee184917056ad2d1
檢查是否為閏年
{ if((y%4==0 && y%100 !=0) || (y % 400 == 0)) { s1="此為閏年"; } else { s1="不是拉"; } }
1
18935e5aca3ff20ecc2e0518f585cb1b
447f5a897930be007c90b13ecec969df
各店舗予定の表示
class UserController extends AppController{ public function select(){ $this->viewBuilder()->setLayout('userLayout'); $this->set("headline", "<h4>店舗一覧</h4>"); $this->Shoplists = TableRegistry::get('lunchshops'); $data=$this->Shoplists->find('all'); $this->set('result', $data); ...
0
7cfcebabaf10d802cf7899dcf5465699
443d42cba8c69eaf64ccf435373906a0
根据商铺ID查询交易信息
$where[] = array('name' => $this->_shopId, 'oper' => '=', 'value' => $sid); return $this->getList($where,0,0); }
1
fa93b433aa91a00f3e19021a9651ea9f
8f4f168293463bd9f5c2fedbb82e0032
modelインスタンスのpropNameプロパティの値を取得する
public String getPropName() { return propName; }
1
d5060636111baf0442927fe645b972b2
fa2f70817cd80399423a3c3ef4922ee1
获取百度音乐排行榜音乐
{ $url = "https://music.youtube.com/youtubei/v1/browse"; $param = [ 'alt' => 'json', 'key' => 'AIzaSyC9XL3ZjWddXya6X74dJoCTL-WEYFDNX30', ]; $url .= '?' . http_build_query($param); $json = '{ "context": { "client": { ...
0
0572f87b60658da1ae1206b277566772
96f098755f83c1ce0cb6d39339a1f571
DES 加密(指定加盐字符串)
class RSAUtil public static string DESEncrypt(string encryptStr, string key = "DAZZLE21", string IV = "DAZZLE@!") { key += "12345678"; IV += "12345678"; key = key.Substring(0, 8); IV = IV.Substring(0, 8); SymmetricAlgorithm sa; ICryptoTransform ict; MemoryStre...
1
8fce337dfaa1aa314c6123ca8e4f154a
20d5548f51ba620905c8fae7c9983bcd
Telefono dell'utente nel formato internazionale con il prefisso +39.
if (telephone.length()> 0 && telephone.substring(0, 3).compareTo("+94") == 0) { return telephone; } else { return "+94" + telephone; } }
0
c6e2c23e4823cfbcb0f383ecca2f7280
dff95117e833dd5d9a7a7c17a91314f5
Clips the project area to the boundary of the habitat.
def clip_scene(wd, imgfn, shpfn): os.chdir(wd) r = rio.open(imgfn) meta = r.meta.copy() r_descr = list(r.descriptions) shp = gpd.read_file(shpfn) rc, rc_trans = mask.mask(r, shp[['geometry']].values.flatten(), nodata = meta['nodata'], crop = True) meta.update({...
1
6aec477d6792676534d056358191b343
5a064cf7a34afb44e87d3e9b53ddb04a
Generate and plot successive golden rectangles
r = 0.0 increment = 0.001 eps = 0.01 r_list = [] x_list = [] dec_key = get_dec_key(ext_key) x = get_x0(dec_key) while r < 4.0: for i in range(1, 200): x = r * x * (1.0 - x) for i in range(1, 700): x = r * x * (1.0 - x) r_list.append(r) ...
0
74fe22b0eff6968299cab8e81ebd930d
b81f50f42c388e28b56033e7b54bbaee
保存订单取消明细
{ Comm::setHeader(); $this->model->setId(); if($this->model->checkToken()) { if(Validate::get('orderid') && Validate::get('detailno')) { $this->model->deleteOrderDetailDiff(); echo json_encode('ok'); return ; } } echo json_encode('no'); }
0
83a7a046edf2f1e292bcc1026f5c42fb
f29e409caf8aabd24256f1e25705b6f0
Test case for deleteVersionedCourseZip Deletes the exported zip for the specified course version.
try { String resource = getResourcePath(context, id); URL u = buildUrl(resource, "versions"); HttpURLConnection con = (HttpURLConnection) u.openConnection(); Map<String, String> headers = new HashMap<String, String>(); headers.put("x-emc-uid", uid); ...
1
7252002ac2f2725832872f7961ded257
fea32bee5d5e4bebd22792243b6579e1
判断是否连续7点落在中心线的同一侧
int currentNum = distanceArray.size(); int distanceJudgeSize = 7; int ascendCount = 0; for(int i = currentNum - 1 ;i > currentNum - distanceJudgeSize;i--){ double temp1 = distanceArray.get(i); double temp2 = distanceArray.get(i-1); if((temp1 - temp2 >=...
0
8a73045273031ecb1a612e3d9ba5d30d
06e81ab73550097492257cd8170e2690
跳转到首页面,并关闭当前页面
class PageLike(Base): # 关闭青少年弹框 def page_close_window_to_home(self): self.driver.close() self.base_switch_to_window(page.search_home_title)
1
6b5cb55ed59dc2062ba81cf1a8c1372b
4504535007f4822e7be5a39083211e01
Check button presses connected to the shift register
{ b3_state = (b3_state<<1) | (PIND & (1<<PD6)) >> 6 | 0xf800; b2_state = (b2_state<<1) | (PIND & (1<<PD5)) >> 5 | 0xf800; b1_state = (b1_state<<1) | (PIND & (1<<PD7)) >> 7 | 0xf800; b3_hold_state = (b3_state<<1) | (PIND & (1<<PD6)) >> 6 | 0xfc00; b2_hold_state = (b2_state<<1) | (PIND & (1<<PD5)) >> 5 | 0xfc00; b1...
1
f872ed7a608f84635f7bcb1fc03bd22c
9f24451c5a6bb713d404254faef0746c
Displays the forum author URL.
function mb_get_topic_author_profile_url( $topic_id = 0 ) { return apply_filters( 'mb_get_topic_author_profile_url', mb_get_post_author_profile_url( $topic_id ), $topic_id ); }
1
f1d75db1f2195edbb331a986c113acf4
7b1821f4513c9f56f4ef4fdfef95ce82
of the file that is being executed
int main(void) { printf("%s\n", __FILE__); return (0); }
1
45a432a752a073c63e0623ddb85afbef
3692fbb62032afabeb7c3bd7e20c7052
Trigger installation of an asset
{ return Task.Factory.StartNew(() => { string error; var result = _adapter.TriggerInstallApplicationProxy(out error); return new SutResult(result, error); }); }
1
7d00aafc61ddb884adc8cbc2659779c3
952dd308af6ea30cbfddad476832e630
iot_i2c_drv_callback_timeout
void i2c_timeout_config(uint8_t i2c, uint8_t timeout_en, uint32_t timeout_val) { uint32_t wdata; wdata=((((timeout_en)?1:0)<<I2C1_F_TE_R) | (timeout_val<<I2C1_F_TOUT_R)); CPU_WRITE_SINGLE(((i2c==I2C0)?I2C0_R_BSCTOUT_MEMADDR:I2C1_R_BSCTOUT_MEMADDR),wdata,AHB_BIT32); }
0
5f31560f9c17f62dc158d798458c222e
1de1454de68f2956500554e4f502e65a
Display function used when the player is killed by a ghost. Draws pacman at the current position and redisplays with a static scale variable to shrink pacman off the screen. When this function is done drawing the death sequence, it resets the player positions (pacman & ghosts) and registers the next display function (...
class Game: def draw_pacman_death(self, coord): self.__maze.draw_pacmandeathani(coord)
1
818afa034b5cd60953a4d7d1e77a49a7
a302cd4e1dcb7bcce96262a09143d8e0
Determine the ID of the currently logged in user from the security context.
SecurityUser securityUser = currentUser(); if (securityUser == null) { return null; } return securityUser.getId(); }
1
98a5deb7fc66e27eefe9217cd65782ab
f8e7bd3e9d9fe52c04e9c9f7f3925c09
根据账户id查询账户状态
@POST("account/status") RemoteCall<AccountStatusQryResp> queryAccountStatus(@Body AccountStatusQryReq accountStatusQryReq);
1
2f42944e931ffb1599b064dc31739378
301fb67a2feead39c3b3ee2da5bd6810
Check to see if LastFailureMessage property is set
namespace Amazon.IoTDeviceAdvisor.Model public partial class TestCaseRun internal bool IsSetFailure() { return this._failure != null; }
0
ab58ea9ea8d8d9d1677e3db4f5991f30
aebd7d87b46dc523fd0b0e53700223a2
Create an instance of {@link GetServiceConsentsResponse }
@XmlRegistry public class ObjectFactory public GetServicesList createGetServicesList() { return new GetServicesList(); }
0
7925bbd9938b5f4dc5b1d6efc242f61f
701111b30eedb54f290b4943d5b981be
显示(时间是短暂的)吐司消息居中
public class ToastUtil public static void showLongToastCenter(Context context,String msg){ if(context != null) { if (toast == null) { toast = Toast.makeText(context, msg, Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); } else { ...
0
90a76e21aee420ec2b78ba7146ef1d1f
6100dfc0d9685c2978905ffdab26b8e2
Add an elevation data set to the manager
class SpotElevationContainer(_Base): def extend(self, spotElevations): for se in spotElevations: isSpotElevation(se) self.points.extend(spotElevations) for se in spotElevations: self.fast_lookup[se.id] = se
1