query_id
string
corpus_id
string
query
string
code
string
label
int64
f3cf40a2168c2b8ecbde9b31ff0bd067
759321458e74c86766177888a1d4f143
Demonstrates a cycle of shared_ptrs will not get freed
int main() { UserDeletor tempDeletor; hhi::shared_ptr<int> smartptr_1(new int, tempDeletor); return 0; }
0
a670f62cc4f4b4b0cb2a4bba33e11e2a
87ea1e419ded7a1281103d3e3fc1c04f
处理Flash文件上传
public class AdvertisementAction extends ServiceBaseManageAction<Advertisement,Long> public String modify() throws IOException { if(upload!=null && !upload.isEmpty()) { String flashFile = SystemConfig.ROOT_PATH + File.separator + "ban.swf"; InputStream in = new FileInputStream(upload.get(0)); OutputStream ou...
1
1d8065d96bd4bdc2230a68ce3bd07e22
956e5f839a5ba887bb311a67b7fe9cda
Adds default sensor attributes before render.
attrs = super(Sensor, self).render_attributes() attrs.update({ 'link': self.link.name, 'sensor': self.sensor.name, 'part_id': self.part_id, 'id': '%s__%s' % (self.part_id, self.sensor.name), 'type': self.type }) return attrs
1
873203e11634ab321e46ef141d2b3488
e871d92895f66de1ee2ff1c72589ac10
Display final policy with correct/wrong actions.
np.testing.assert_array_equal( self.tabular_policy.action_probability_array, [[1 / 3, 1 / 3, 1 / 3], [1 / 3, 1 / 3, 1 / 3]])
0
7c14d378c3e08b82a974053af00643da
62c55a94f1cec31933d4a81aa00635fe
Return a boolean about whether the passed value is an array, or a scalar.
def isarray(x): return getBackend(x) in config.valid_backends
0
cd159e3a341dcd62cfe8a67f5985805e
c656c4fc922753290f7e169fabaa6fcc
构建物品-标签向量矩阵
tags_len = self.tags_list.__len__() playlist_feature_matrix = dict() for playlist_id in self.playlist_tags_dict.keys(): f_list = [0] * tags_len for tag in self.playlist_tags_dict[playlist_id]: index = self.tags_list.index(tag) f_list[index]...
1
8adc7ceae7f19bdcd682a52d884b15f2
93267197a7c7cedb0c31f74efc57ab4f
Determines if the itemLog has been modified.
{ SyncLog latestSyncLog; return (calendarEvent.TryGetLatestSyncLog(out latestSyncLog) && latestSyncLog.CalendarStart == calendarEventItem.Start && latestSyncLog.CalendarEnd == calendarEventItem.End); }
0
4d801c03666b4c2c74eeede10b6d4550
98fe83a4f38ecfb5351c2e8b07fab723
Erstellt mehrere Sterne an zufälligen Position und speichert sie in einer Liste ab
function createStars(screenWidth, screenHeight, numStars){ var space = document.getElementById("space"); for(var i=0; i<numStars;i++){ var star = document.createElement("div"); star.className = "star"; var top = Math.floor(Math.random() * screenHeight+1); var left = Math.floor(Math.random() * screenWidth+1);...
0
7dd9c38b33dd96cdc81e875276e9db5a
29b928c5c5b43aae3e43dd5ab4d52501
check whether it's daylight
def is_daytime(t): if 0 <= t.hour <= 7: return False if t.hour >= 22: return False return True
1
34d75bcbb49610997003a7d59010bc3e
bef4cbda81d9b6d164191257ff6d9b6d
Calculates final value of all integer variables and stores them in variableValueArrayList
{ for(String variable : problem.getVariables()) { double result = getSolutionValueOf(variable); if(result == -1) { result = 0; } res.addVariable(variable, result); } }
0
f42c673ef89ec63e13ad3b1baf6dbdf6
d6596b7fc17c97a534ca7aabe0abdeca
シリーズが設定されている場合はシリーズIDを返す。なければnull
{ if ($this->seriesId) return $this->seriesId; return $this->postSeriesRelation ? $this->postSeriesRelation->series_id : null; }
1
c893fb1fc97b4a3047676de2b862bcc4
6ad638a27c3fc6b1d1a6bdfa993e4187
! \brief Initialize ioctl device \sa tdts_shell_ioctl_exit
XStatus dsp_ioctl_init(dsp_ioctl_dev_t *dev, u32 baseaddr) { if (!dev || !baseaddr) return XST_FAILURE; dev->baseaddr = baseaddr; return XST_SUCCESS; }
1
3bf7f3a45e0246dd47d61f6ab89203e5
df5bba63c3382da12a3615d10f3c985d
根据上一个事件id生成下一个
local currentId = tonumber(RemoveFirstChar(self.id)) local nextid = 0 if currentId < 1000 and currentId%10 == 0 then nextid = currentId/10*1000 + 1 else nextid = currentId + 1 end return "c"..nextid end
1
5c2d14eb38b3f1b63f3910cd4c198c8b
a107c4b6ded564bf0d15158c3be113f6
Adds the specified amounts to the attached player's resource counts.
namespace sm_json_data_framework.Models.InGameStates public class ResourceCount public void ApplyAmount(RechargeableResourceEnum resource, int newAmount) { Amounts[resource] = newAmount; }
0
bab8d05ef051c7406e660587736dbff3
30135b5282f0a5c0bb30fbbf8ae5a59b
清除所有对象池的物体
namespace YouYouFramework public class PoolManager : ManagerBase, IDisposable public void ClearClassObjectPool() { ClassObjectPool.ClearPool(); }
1
ac198c69cd9dad84241c2a4dd7f1bdd2
e865d972bad3179259979265bbc2318a
code is equivalent to:
fn double(n: i32) -> i32 { n + n }
1
087e056a857435f7c4f30fad822f34bb
eee81caf107660dab9f249ed741661f1
Returns a two-tuple of all the leafs and their weights in this prefix tree.
(List[Tuple[Any, float]]): if self.is_empty(): return [] elif self.is_leaf(): return [(self.value, self.weight)] else: if limit is None: limit = len(self) leaves = [] for subtree in self.subtrees: ...
1
df62855b5b9a9a94be6ecbd4387fff56
e88a62d632f7d89dfa05587480609337
Returns a WAT Plan Name, based i the RAS base plan name and the simulation.
class Controller(object): def Create_WATPlanName(self, HECRASBasePlanName, SimulationName): rc = self._rc res = rc.Create_WATPlanName(HECRASBasePlanName, SimulationName) return res
1
745265dbd1ccd06c714835c6fa6e7f41
cf46c2363db5ffd8e844ec1575e06732
Method for populating the build windows
{ _buildItemCollection = new BuildItemCollection(); _buildItemCollection.Add(new BuildItem("CheckConfig", "Checking Configuration...", new List<string>())); _buildItemCollection.Add(new BuildItem("ReadRemote", "Read from Remote Path...", new List<string>())); _buildItemCollection.Add(new BuildItem("WriteL...
1
be7fc5d016da86c00f16f119ff53a722
d4de3f354408679352c4edd8f3beb012
Computes class weights as described in the ENet paper: w_class = 1 / (ln(c + p_class)), where c is usually 1.02 and p_class is the propensity score of that class: propensity_score = freq_class / total_pixels. References: https://arxiv.org/abs/1606.02147 Keyword arguments: - dataloader (``data.Dataloader``): A data load...
label_to_frequency_dict = {} for i in range(num_classes): label_to_frequency_dict[i] = [] for n in range(len(image_files)): image = imageio.imread(image_files[n]) for i in range(num_classes): class_mask = np.equal(image, i) class_mask = class_mask.astype(np.fl...
0
4819cee5886e7ad95104f3dcf0ece2b1
e7811ec1850241a2a82d21bc3c4db42e
Sets the vector via a fast way using the array.
class MlVector3 fun setValue(v: FloatArray): MlVector3 { mVector[0] = v[0] mVector[1] = v[1] mVector[2] = v[2] return this }
1
88aef36ad45162f8d319a1d82fe2168a
57df8be271384c70c1951c8ba64fb7e0
Set value depending on input value used in osd function "MOTION DET".
int32_t lsm6dsl_motion_sens_set(lsm6dsl_ctx_t *ctx, uint8_t val) { lsm6dsl_reg_t reg; int32_t ret; ret = lsm6dsl_read_reg(ctx, LSM6DSL_CTRL10_C, &reg.byte, 1); if(ret == 0){ reg.ctrl10_c.sign_motion_en = val; if (val != 0x00U) { reg.ctrl10_c.func_en = val; ret = lsm6dsl_write_reg(ctx, LSM6DS...
1
92836894abd862568ddd8843bff8e3b1
ebfa0a9562dd5fceaac0a3457199cfdd
This function returns the head of a list.
int list_head(int_list l){ if(l == NULL) abort(); return l -> head; }
1
236706ff7162c0912f6e9fe875c09c03
9730c394dbce6ae83078fba85a32e549
back up to previous variation branch
{ Abc_Ntk_t * pNtkCur, * pNtkBack, * pNtkBack2; int iStepCur, iStepBack; pNtkCur = p->pNtkCur; pNtkBack = Abc_NtkBackup( pNtkCur ); iStepCur = Abc_NtkStep ( pNtkCur ); if ( pNtkBack == NULL ) return; pNtkBack2 = Abc_NtkBackup( pNtkBack ); iStepBack = Abc_NtkStep ( pNtkBack ); ...
1
55ec01d45b3b9151dffc353f96e288c5
41b9d49f3aff6c17239ff467b5e03d40
Get default order (e.g. my_column_id|asc).
class Model public function getDefaultOrder() { return $this->defaultOrder; }
1
00a375ddca37c3a331575e51de20fff1
378486086982e15ad055235b355b5d4e
Updates a callers location and database pointers upon moving.
try: connect_to_db() except mysql.connector.Error as e: print("Error:", e) print("Please try again later") else: cursor.execute("SELECT place_id FROM parking_space where p_name = '%s' " % cur_location) update_id = cursor.fetchall()[0][0] cursor.execute("UPDATE...
1
bc80d6ebddf686c4a8c5cbcb305ea77c
caa12d53f9564a25db907fe3a09467e3
这是一个比较标准的Redis模板配置样例
def pmr_redis_config(): return RedisConfig()
0
a52d7c6bddbbd53b0e571418abfd388c
14522a61c170169611cce5d59f719526
更新对应的accessToken的失效时间
conn := config.RedisConnection() defer conn.Close() nowTime := time.Now() expTime := time.Unix(exp, 0) timeLeft := expTime.Sub(nowTime).Seconds() _, err := conn.Do("SET", accessToken, string(exp)) _, err = conn.Do("EXPIRE", accessToken, int64(timeLeft)) if err != nil { return err } return nil }
1
673e9dbc6cd4e1b457da011b49946e5e
1a93581cae9ae02370b97674249acb49
The agent will explore from state to state until it reaches the goal
while True: if len(self.action_queue) != 0: return if self.goalTest() == True: self.action_queue.append(Action(AI.Action.LEAVE)) return if len(self.action_queue) == 0: for w in self.board.window_iter(): ...
1
35ec6745c7532b3a6429f05241ffd004
10128af2c5a80bcc83b51661bb09cd50
PMC5 input buffer full interrupt.
{ unsigned long ulStatus; ulStatus = UARTIntStatus(SerialPort5, true); UARTIntClear(SerialPort5, ulStatus); circBufPush(&rawCircBuffer[Port5],UARTCharGet(SerialPort5)); }
0
1bc26de71eabcdf47d720938ad543cdd
9775b1e9c429724bcd606fb443cf73d8
用来判断两者是否为实现关系,Cat实现了Animal
public void testProperty() { try { PropertyDescriptor[] catPds = Introspector.getBeanInfo(Cat.class).getPropertyDescriptors(); PropertyDescriptor[] dogPds = Introspector.getBeanInfo(Dog.class).getPropertyDescriptors(); System.out.println(catPds[0].equals(dogPds)); } catch (IntrospectionException e) { e...
0
f9ebe1745ad4a63ab8fabf2fef25363f
409b2e02afde4c6b45091c2674ee3f3e
Reads number of new active alarms.
int getActiveAlarmCount(DeviceId deviceId);
1
d57a784daa643d94d2255a13052fcd6c
01b3df6dba53768bcaafd075c5daa838
Dynamic Recenter ROI: each time an object is detected the ROI draws itself around the object.
void ObjectFinder::recalculateROI() { _objROI.x = max(0 , _objPos.x - 2*_objPic->width); _objROI.y = max(0 , _objPos.y - 2*_objPic->height); _objROI.width = min(_maxWidth - _objROI.x , 4*_objPic->width); _objROI.height = min(_maxHeight - _objROI.y , 4*_objPic->height); }
1
4996d5556fb57acaf9a50662d9e84636
79a2e58d9f17516a9c338d7a1b97ffa8
Returns a single friend based on the ID
public function getFriendById($id) ;
1
f015c6d071e9451aa38a4e012f9a58f0
247fb5de7d3a3d99ff6aa677e2ff2a72
Турнирная селекция - случайное разбиение особей на группы и выбор в каждой группе наилучшей особи. Количество отбираемых особей - половина размера популяции, округленная до целого в меньшую сторону
Status Select_Tourn(vector<Knapsack> &origin, vector<Knapsack> &random_chosen) { ++random_disturb; std::default_random_engine e; e.seed((unsigned int)time(NULL) * abs(random_disturb)); std::uniform_real_distribution<double> u(0, population_size - 1); int chosen_cnt = 0; while (chosen_cnt < popul...
0
207f04418c55e38fdac8153aec9f9ef0
ff6e7ff0b95e44343e2e71c9b46df32b
Returns a new object of class '<em>Equation Section</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
@XmlRegistry public class ObjectFactory public Section createSection() { return new Section(); }
0
cd8361027f5eb426681521ff2c39d0e9
c2c9a3802694c59f04dfa3e74c5bbdf5
TRANG XEM LỚP HỌC PHẦN
{ ViewBag.AllNamHoc = db.DM_NamHoc.Where(p => p.MaTruong == MaTruong).ToList(); return View(); }
0
5cdc69d8f3c42ca809e489172bdfe3ba
fcb7c83a31932b6dd36bb1a4b5cb5b69
if player has ultimate ready, flashes the ultimate bar
function CombatInfo.OnCombatEvent(eventCode, result, isError, abilityName, abilityGraphic, abilityActionSlotType, sourceName, sourceType, targetName, targetType, hitValue, powerType, damageType, log, sourceUnitId, targetUnitId, abilityId) if CombatInfo.SV.UltimateGeneration and uiUltimate.NotFull and ( (res...
1
6d0b731dc754cae6321cd97745628444
7fb1190cd386293613d1a202a16d7b0a
获得某个球员在某个赛季的季后赛中参加的所有比赛<br/> ex:<br/> getPlayOffMatches(2014) <br/>
public MatchesPO[] getRegularTeamMatches(int season, String teamName)throws RemoteException;
0
67f7742a8e36a0ba2c8be5464341f8f7
111eeb20223c66a131daa6e4ad4f77c6
Establece el tamaño de la segunda capa de neuronas de SOM.
public class SOMMap public void setY(int y_dim) { this.y_dim = y_dim; }
1
d55bcf40e19c8aa73cfe863858b45ea6
cd476988ef055e1bc053c5549a8e516f
Main function for recursively matching regex.
def mult(regex, string): if single_char(regex[0], string[0]): if len(string) == 1: return match(regex[2:], string) else: if len(regex) >= 3 and regex[0] == "." and len(string) >= 2: if regex[2] == string[1]: return match(regex[2:], string[1...
1
2c62d74b21e22cbcfd67cd8158c0d590
32092837b878bf4e601a4f541e582919
Setter for <code>WETRN.V_OFFR_ALL_WITH_BEST_COST.DMS_LAST_UPDT_USER_ID</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VOffrAllWithBestCostRecord extends TableRecordImpl<VOffrAllWithBestCostRecord> public void setDmsLastUpdtUserId(String value) { ...
1
43170b777cf2e1f96e0b1b6782211c7b
90bfb7247a078af0a0e47bccd2a7b5a0
This program demonstrates how to use the pointers to functions and pointers to member functions, as defined above.
{ MyPointer<double> p0 = MyPointer<double>(new double(11.1)); MyPointer<double> p1; p1 = p0; cout << "assiging result of a call to helper function..." << endl; MyPointer<double> p2; p2 = HelperFunction(); return 0; }
0
e7514eaa8ab26b7f8c69d625c7dc3337
35246364d183e972c3fc45212075f6e9
Description : Interrupt TEI handler for channel 0. Types of interrupt requests transfer error or event generation. Arguments : None Return Value : None
void rsci10_tei_isr(void *cb_args) { rsci_tei_handler(&g_rsci_ch10_ctrl); }
0
9207e485c3e89e888fb21f0455df8260
f62122ce603631374e954704432bd2bd
Returns a priority-based counter.
container = [0] def counter(): container[0] += 1 return container[0] return counter
0
e35a7bc2ccb4fb6f82d303d5d6186780
8dfe7bbe85a567e3ede63171bf970ca5
initalize the page, and create the table to display details on the questions done
function resultPage(){ page.empty(); page.append($("<p>").text("Number Correct: " + numCorrect)); page.append($("<p>").text("Number Wrong: " + numWrong)); page.append($("<p>").text("Number Unanswered: " + numTimeLimit)); currentQuestion = 0; numWrong = 0; numCorre...
0
4461bd2ecf3355c2a653784d88748cfc
921f1ca663b0e4bc4b9dc639cf09f407
Propagate the Nosé-Hoover chain
class NoseHooverChainVelocityVerletIntegrator(ThermostatedIntegrator): def propagateNHC(self): self.addComputeGlobal("scale", "1.0") self.addComputeSum("KE2", "m*v^2") self.addComputeGlobal("G0", "(KE2 - ndf*kT)/Q0") for ncval in range(self.n_c): for nysval in range(self.n_ys...
1
7b97702eb614c4c8204b302dd4419599
dcea957b0438459d67415293fcf0e148
resolve location icon for geolocations
return { title: place.name, alt: place.name, icon: icon }; }
0
d4ffbeb69e4b954e0366f6fbd7b0dc2d
c2ee98d1111bc1166817831311db9f27
Returns the meta object for class '{@link patrones.direccion.FactoryDireccion <em>Factory Direccion</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getFactoryDireccionColombia_ListDireccionColombia();
0
b60151bf686ee876455cce8ff56f8035
79ce793fc05d11f672de7207f58478a1
Compare glyph names
static void sortGlyphsByName(txCtx h) { qsort(h->src.glyphs.array, h->src.glyphs.cnt, sizeof(h->src.glyphs.array[0]), cmpByName); }
1
e6424e6ac0b78fea7e3c67935c3b53f4
b1338976a58a62d9263e1aa67b7d4e29
@brief unicode转UTF8,C语言版本
{ unsigned char buf[4]; memset(buf,0,4); int i =0; int j = 0; while(pText[i]) { if( pText[i] >= 0 && pText[i]<128) { #ifdef WIN32 pOut[j++]=pText[i++]; pOut[j++]=0; #else pOut[j++]=0; pOut[j++]=pText[i++]; #endif } else { __UTF8ToUnicode((char *)buf,pText + i); ...
0
b9d44171819d62bc6bbf923f089b8cc5
f243a314ccc2dd289aa2a7b5dfa8d32a
单个设置时间时添加一个时间范围
var button=""+ "<tr id=\"tr"+timeId+"\"><td><input type='text' id=\"workrang"+timeId+"\" name=\"workrang\" class=\"input-time\"/>"+ "<input type='button' class=\"edit-button\" onclick='delInput(\"#tr"+timeId+"\");'/></td></tr>"; $("#listTimeRang").append(button); timeId++; timeRangNum=timeRangNum+1; $("#time...
1
fd6219c4fea89005d3d6f88bdcbc1670
2c8762c621394c9c34f9f89724db7989
Find all attached 1-wire slave devices
class Socket(Wemo): def find_wemos(): return super(Socket, Socket).find_wemos("SOCKET")
0
123b34a1ad3c447432c24674bf860bab
bcd4b3b00cd0855ba109510ab94b16b1
校验数据,若是一个多包数据,需要写成几个包,分别处理
int otherPackLength = len; while (true) { if (otherPackLength > pack.length) { length = otherPackLength; content = pack; break; } byte[] newByte = Arrays.copyOfRange(pack, 0, otherPackLength); try { ...
1
ab3fb1d363a8b508baeb4a7fc206c8d3
fb75d2b39b2903b801445d8004cb3418
Metodo que recebe uma instrucao em hexadecimal e filtra nela qual o tipo da instrucao a ser tratada, enviando a mesma ao metodo adequado.
if type(self.pro.pipeline.instr[4]) is Instrucao: if self.pro.pipeline.instr[4].opcode == 'add': self.add(self.pro.pipeline.instr[4]) elif self.pro.pipeline.instr[4].opcode == 'addi': self.addi(self.pro.pipeline.instr[4]) elif self.pro.pipeline...
0
ec1a4db602d732e94c6a2185a61baed1
eeb60190f9acd64570e49099665238fd
The function will make sure that the best players table holds 5 records only!
global i, playerList, finalScores for val in playerList: i += 1 if i >= len(playerList) + 1: playerList += [playerList.pop(0)] finalScores += [finalScores.pop(0)] break
0
04cb07824862c6b3d9ff52e4557eeffe
01138d987e37baae30b0f5d0f4dedef2
获取sd卡根目录
public class SDCardUtils public static String getRootDirectoryPath() { String path = Environment.getRootDirectory().getAbsolutePath(); return path; }
0
32287c95d793e996c1974416f77e70a9
203be19235e31c7ec4bbaee376babca3
главный контакт может быть только один
data = { 'user_name': 'Artem', 'contact': { 'name': 'Valera', 'messengers': { 'telegram': 'Val', 'whatsApp': '', 'viber': '', } } } result_in_db = { 'telegram': 'Val', 'whatsApp': '', ...
0
6f872da5b222e5f2cecd52cf7878ca39
89584f701f79450e2d7f1732287776c4
Tests for converting from base ten decimal to binary
class TestExtraMethods(unittest.TestCase): def test_convert_negative_decimal_to_bin(self): self.assertEqual("1010", extras.dec2bin(-10))
1
f9d0fcd6fc45cb64c035aaaf516e4880
6ebe9713b630fb368f587a28beab2497
获取产品在给定订单时购买可以获得的积分,同时返回消费积分和活动积分
{ $order['extension_code'] = ''; if ($order['extension_code'] == 'group_buy') { RC_Loader::load_app_func('admin_goods', 'goods'); $group_buy = group_buy_info(intval($order['extension_id'])); return array('custom_points' => $group_buy['gift_integral'], 'rank_points' => $order['goods_amoun...
1
58ad03d4a034301d242a637c8a1c8a8b
8c63e268098dac76368cbb8907f6c5c5
Document를 전달받아서 AnimalInfo List로 만들어준다.
public List<Article> listArticle(Document doc) throws Exception;
0
38b1bb182370616da397d59141801e16
673d3e2b2ad2456ab580393250c109a9
Getter for the am ranking list
public class CSVFile{ public String[] getListRank(){ return listRank; }
1
d8ca33e2cfee8dc02bcfc80fcc7c38f1
453bafcd73e2ce08692cfcb481d94f2e
Test the hydratation of the Entity and the relationship between entity.
class TestHydrate extends AppTestCase function test1_1() { $hq = $this->CI->hydrate->start("campaigns", Array("reklama" => Array("reklama_kur" => Array("object"))) ); $hq->where($hq->getFieldName($hq->hq->table, "id"), $this->campaign["id"]); $hq->order_by($hq->getFieldNa...
1
c633f7560d901fc909c4a88a80010daf
3b4500586ef8e49209a0f4229334a9d8
获取实时电影票房数据 数据来源:EBOT艺恩票房智库
public class ApiHelper public static Observable<List<BoxOfficeModel>> loadBoxOffice() { return getBoxOfficeApi() .dayBoxOfficeGet(APP_ID_YY) .map(new Func1<BoxOfficeResult, List<BoxOfficeModel>>() { @Override public List<BoxOfficeModel> cal...
1
f44df0c7ee9ff691aebd68ee0f4c3839
44b0d8f2c41b7f463490bd5a4a45e972
perform a simple crossfade (linear interpolation)
void Spr16_Crossfade(const SPRITE *spra, const SPRITE *sprb, int xloc, int yloc, uint alpha) { UCAST *ttmp,*btmp,*ctmp; int itemp; VD_SURFACE *vs = spra->vs; btmp = (UCAST *)spra->bitmap; ctmp = (UCAST *)sprb->bitmap; itemp = spra->ysize; ttmp = (UCAST *)MK_ScrnPtr(xloc*BYTESP...
1
d32ed7dcee695c6d9eaee57f44e0cf78
58886630b055d7634688c2325e29352f
Dados 3 puntos de un triángulo, calcula el área
double distancia1=0; double distancia2=0; double distancia3=0; double p=0; double area=0; distancia1=Math.sqrt(((punto1.getX()-punto2.getX())*(punto1.getX()-punto2.getX()))+ ((punto1.getY()-punto2.getY())*(punto1.getY()-punto2.getY()))); distanci...
1
21ca7b837d76b20cc079538e3e716b7d
fd6791a986a1b3b733065e08aca198ab
returns the instruction of given type, or None
if (self.pc not in self.instructions_used and self.pc < len(self.instructions)): return self.instructions[self.pc] else: return None
0
8b60ce0f141f784471ad0ca6c22b7203
08d9f404f36c0101cc6f2f57463977a8
Continues iterating.
namespace bdsg PackedSet::iterator& PackedSet::iterator::operator++() { do { ++i; } while (i < iteratee->table.size() && iteratee->table.get(i) == 0); return *this; }
1
71409a49c004f1bb00b787f578d4ac7a
3c98fe4715539eb1a5396b202744e1b5
Disable password text field if password check box is off
namespace OpenDental{ public partial class FormXchargeSetup : FormODBase private void textPassword_TextChanged(object sender,EventArgs e) { if(textPassword.Text.Trim().Length==0) { textPassword.UseSystemPasswordChar=false; } }
0
1c3c4b603ff4ce65e7a9172fb6baa382
4987357eb107222e920f70d0904d6051
将给定类型的所有属性注册到给定的PropertyEditor
void InitBinder(Object request, PropertyEditorRegistry binder);
1
5d4d3212416c272e708845d975ff0af5
b5c40d30884f73d1010829d8b5247087
initialise la table des declarations
void detruire_table_declarations (Table_declarations t) { free(t); }
0
5fdedd4ff3db3bd73e7fc9fc9ee7b557
b55ad17da59746300ffcdc6767ebbca1
Returns a descriptive reason of disconnect cause.
default boolean shouldDisconnect() { return getDisconnectReason() != null; }
0
0c3c704e64b45a13f62ad4b073cb6bbf
021bb50c36551875b1904298ca80fcdc
翻楼层道具
initPropContainer() { if (this.node_propContainer.children.length > 0) { this.recycleRankItem(this.node_propContainer, this.propPool, 'item_farm_prop'); } let propList = FarmData.propShopList; let len = propList.length; for (let i = 0; i < len; i++) { let ...
0
51bb04a1e9bdc6a46f1c5a100196c1a5
dcf3a55effaa11ba388b279d7a445247
본인 글은 제외
class Post(Base): def filter_others_post(queryset, auth_user): try: return queryset.filter(author=auth_user) except TypeError: return queryset
0
b87c674b7bdea6f2c92e041a70bf4f4d
3654b42a48ea7257df41a28a6fa37675
Gets side, either null for view and editor kinds, a side constant for sliding kind..
class FrameBufferCubemap : com.badlogic.gdx.graphics.glutils.GLFrameBuffer<com.badlogic.gdx.graphics.Cubemap?> fun getSide(): com.badlogic.gdx.graphics.Cubemap.CubemapSide? { return if (currentSide < 0) null else cubemapSides!![currentSide] }
1
92b68a077bae0a3c0edc1e8631e8cb41
5d3c002c0aff93a7fa454fbcd1a6dd49
Returns an array containing all pattern names contained in this pattern set
{ string s = ""; for (int pattNum = 0; pattNum < s_patternCount; pattNum++) { if (MatchesPattern((OptimizerPatternName)pattNum)) { if (s.Length != 0) s += ", "; s += ((OptimizerPat...
0
8fa6c62e1620adfc1dde40a8a6b18f9e
995ee3de764fe274b90d9a6fa41a9d65
Add Body classes
function biancaa_body_classes( $classes ) { if ( is_multi_author() ) { $classes[] = 'group-blog'; } if ( is_page_template( 'page-templates/about.php' ) ) { $classes[] = 'about'; } $text = get_theme_mod( 'biancaa_featured_text' ); if ( ! empty( $text ) && is_home() ) { $classes[] = 'has-featured-text'; } r...
1
b1a4e27fb1238cf479ca5ba447ae576e
a55074f5deb6b599206fcc3dade25ae4
getOrInsert gets the id of a row if it exists or creates the row and returns the new id
def get_id(entityName, text): tableName = entityName + 's' columnName = entityName cursor.execute('SELECT rowid FROM ' + tableName + ' WHERE ' + columnName + ' = ?', (text,)) row = cursor.fetchone() if row: return row[0] else: cursor.execute('INSERT INTO ' + tableName + ' (' + co...
1
797392b8116de30259355a1f02eec4ef
94363496c81f9b74ae33588b4a90e71b
将时间差格式化成字符串[分:秒]
public class DateUtil public static String formatLongToStr(long diff) { long nh = 60 * 60; long nm = 60; long hour = diff / nh; long min = diff % nh / nm; long s = diff % nh % nm; String str = ""; if (hour > 0) { str = str + hour + ":"; } if (min > 0) { str = str + min + ":"; } if (s > 0) { ...
0
e814c64ba11236bdff946168187838de
dc260f32e60d7e2dcfbabe1f83578317
Drops an endpoint from the list of connected peers
void removeEndpoint(int index);
1
4ef2373432765b459e74ac105aa68819
05c26a594bc97d330703af18e40c77f5
Checks if drop event is valid (i.e. contains a local URL to a FITS file), and returns list of filenames contained therein.
h: str, j: str, v: str, z: str ) -> Tuple[List[fits.HDUList], List[np.ndarray]]: Classifier._variables_not_none(["h", "j", "z", "v"], [h, j, z, v]) return helpers.FitsHelper.get_files([h, j, v, z])
0
e16f9eabebdd775ba37c05490a8eaecb
939aa04a7393c51d4ad2f90ee15f8dc7
Copy spike history data stored in device memory to host.
class MemoryPointer(object): def copy_to_host(self, mem, size): if size > 0: runtime.memcpy(mem, self.ptr, size, runtime.memcpyDeviceToHost)
1
113a7b2a61233a53d9880ffd29d833c6
fc983b551a59ed2633a5bae10aceb71c
Gets the logo box texture.
{ if (mg == null) return null; return mg.BoxLegend; }
0
d4c0d9e1078284063b4953baffb6b2c1
d91937753b127934d3c85ecd05ab5598
Filters access by the volume KMS key associated with the resource in the request. https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncomprehend.html#amazoncomprehend-policy-keys Applies to actions:
class StoredIscsiVolume(pulumi.CustomResource): def kms_key(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "kms_key")
0
e3dd2d99b8126d58fa62179370f3ef5b
c96a758de6d06ef0feaa500a385f18d3
If you have the left mouse button down, then update the selectedPoint value and force a repaint of the color wheel.
{ CRect m_rect; GetClientRect(&m_rect); if (m_rect.PtInRect(point)) { if (m_iSelected == 1) return; m_iSelected =1; Invalidate(); UpdateWindow(); SetTimer(1,10,NULL); } CButton::OnMouseMove(nFlags, point); }
0
748e945b3573bba550ac283404bab7f8
7cad6d1997e4724b2b4b0f88a1015457
GET: Orden_cliente
{ var query = from p in db.Paqueteria select p; List<Paqueteria> paqueterias = query.ToList(); ViewBag.ttlPaqueterias = paqueterias.Count; var query2 = from o in db.OrdenCliente where o.fecha_envio == null ...
1
3e92662141add5b4f1e653f1361b98d5
f792538263dc8554f53596a77cd0cd01
Ejecuta la visualizacion de los carruseles que contenga la pagina
$.mobile.loading('show'); $('.camera_wrap').empty(); URLS = servidor_l + urls; menur = menus_sis; jQuery.ajax({ url: URLS, async:false, dataType: 'json', success: function(data) { $(menur).empty(); for(var i=0; i<data.count; i++) { $(menur).append('<article><...
0
165091720d740dab7954ccf694795ece
502f61d3ed6164e42d2ddacdd74f5920
Selects all the appointments in the database and prints them to standard output.
public class MainScreenController implements Initializable @FXML void all_appointments(ActionEvent event) { this.all_app_radio.setSelected(true); this.month_app_radio.setSelected(false); this.week_app_radio.setSelected(false); this.appointmentsTable.setItems(Application.getAllAppoint...
0
af2cc263cf3f348b210d05f7e04a5998
6174f18a862d2b920b3af514b475bffc
Set all available user store attribute mappings.
public class UserStoreAttributeMappings public Map<String, UserStoreAttribute> getDefaultUserStoreAttributeMappings() { return Collections.unmodifiableMap(defaultUserStoreAttributeMappings); }
0
ece742b73d54aa7e420a30cc344778db
e32ddf8edf5e3fa145fd7efbc11054ff
对cpims中需要重设sequence的表导出重设sql.
String tableNameU=tableName.toUpperCase(); StringBuffer str=new StringBuffer(); synchronized(SYN_SEQ){ Sequence seq=tableNameMapSeq.get(tableNameU.trim().toString()); if(seq!=null){ str.append("old "+seq.toString()); } try { seq=loadOrCreateSequence(tableNameU,Sequen...
0
32537008ce63153db4bb9fa8806ae2ce
abad796c5c2e83b1b49223f31224b107
Subtracts two elements in Fp4.
class DiyFp void subtract(final DiyFp other) { assert (e_ == other.e_); assert Long.compareUnsigned(f_, other.f_) >= 0; f_ -= other.f_; }
0
ae7a39fd79d95902e6cfa32970ed011e
87e070a3bf7d578900584b2af4b8d87b
Get the value of an integer array attribute.
const EvolverData::parser::semantic_type& value, AttributeType::Enum type) const { RuntimeAssert ( type == AttributeType::INT_ARRAY, "Attribute declared with INTEGER_ARRAY type has value of type ", type); return new IntegerArrayAttribute (value.m_intList); }
1
0766c8741f9dfa1fb8af5db0869263ca
f28fe713632c6e926613cb54648cdd89
Continue the most recent search.
namespace SubSearch.Data void Continue();
1
62364117db78a977aec0869344c1847c
7b36ea844e6855e4e2f79344d5f8a280
修改CSP响应头
func Modify(sta Request, r config.Rule) Request { var s = strings.Split(r.ProxySetHeader, ":") a := make([]string, 0) a = append(a, s[1]) sta.Headers[s[0]] = a a = make([]string, 0) a = append(a, "close") sta.Headers["Connection"] = a sta.Url = r.Location return sta }
0
f9fe05dfd2113b3d477084db552a5386
71f084ddde025e61203701699d589bd9
Write the current NBT root data to a file.
default NBTTagCompound writeToNBT() { return null; }
0
dafc713437e615e9aa05ef4b99016454
d36ca81769479cefe547a9c0f1028102
Evaluates the curve binormal vectors at all parameters values in the list of parameter values.
class Curve(Abstract.Curve): def binormals(self, u_list=(), normalize=False): if not u_list or not isinstance(u_list, (tuple, list)): raise ValueError("Input u values must be a list/tuple of floats") ret_list = [] for u in u_list: temp = self.binormal(u=u, normalize=norma...
1
cfc93383449d0eb8eaf53d45f94e60d2
8b1f7492b0337315f8ead4a9ac3dc2e5
打开Excel文件,导入到报价明细表中
int start = excelFileContent.getData().indexOf("base64,") + "base64,".length(); String fileContent = excelFileContent.getData().substring(start); byte[] excelFileContents = Base64.getDecoder().decode(fileContent); List<MmQuoteDto> mmQuotes = new ArrayList<MmQuoteDto>(); String fi...
1
1e218bd88d3a570a8bb73e77ffe9e4f5
66efd564b373779f5cb803c3b6294631
获取确认密码元素信息
public class SysAdminView extends BaseView private WebElement getNewTwoPasswordInputFild(){ return getUserFirstLoginUpdatePasswordPage().findElement(By.cssSelector("input[type='password'][name='confirmPwd']")); }
1
1fdb14000b9ef0094f65658aa66304da
52449dc90b28ab166539dc7339b6e7eb
set the TX queue Address
{ len = ( len > 5 ) ? 5 : len; NRF_Read_Buf( TX_ADDR, pAddr, len ); }
0
ba249b73b474f37e95ae5882733fa424
c62b420476c0da6b78b5a9206224c5cb
If omitted, returned KMIP Key Server objects will not be filtered based on whether they're active. If true, returns only KMIP Key Server objects which are active (providing keys which are currently in use). If false, returns only KMIP Key Server objects which are inactive (not providing any keys and able to be deleted)...
public final class MetadataCategorySearchRequest public static final class Builder public final Builder activeOnly(Boolean value) { this.activeOnly = value; return this; }
1