query_id
string
corpus_id
string
query
string
code
string
label
int64
b5031abde7a96f3a6fb58110f685dce2
d47d9d9586d664c12cd695d544110f16
Retrievies a Query object by its given name. Reads the sql string from file and parses it to create a Query object.
public SqlQueryEngine getQueryEngine(String name) { Object o = engines.get(name); if (o != null && o instanceof SqlQueryEngine) return (SqlQueryEngine) o; return null; }
0
70559ae8c28fe8839f64367f5faf9aef
175215333b93cbf98504f6959c67cbe7
Get mass point for T2tt components from filename
data = np.loadtxt(infile, unpack=True, skiprows=1) comp = (data[1] + data[3]) + 1j * (data[2] + data[4]) chi2 = TINIBASCALE * PM2TOM2 * comp[:MAXE] return chi2
0
3d27fa97654b814afe5cd9ce4d9d34d2
1d8c953fd5a8077b8b40c0d3ba619ca9
Photo Source URLを生成するメソッド
class PhotosViewModel : ViewModel() private fun makeUrlFromPE(pe: PhotoEntity) = "https://farm${pe.farm}.staticflickr.com/${pe.server}/${pe.id}_${pe.secret}.jpg"
1
82edb667e6c4672b4425ea1ddff03f25
3c6eba9c4eb38830cff038cae07d8473
Sets the month-panel's dimensions.
public void setMonth(final int mm) { month = mm; }
0
7e18d2824e59ede66b3e67b540132455
1227b7b8d20148db20ae1fbf5224121a
Nearest neighbour scalar quantizer
class FixedPointQuantizer_nearest(Quantizer_if): def __init__(self, fixed_size, fixed_prec): self.fixed_size=fixed_size self.fixed_prec=fixed_prec
1
bce47a22dd24b1bb6ba4db93d7d848fe
de89ffef7c6b61a2cf3c08cdb92a8439
Called after a SynchronizationMessage is dispatched.
namespace Fonlow.SyncML.OpenContacts void EndSync(string message);
1
701b2925866d5efc5aad7571a4590180
5d4a2f34c51adc46cff686f80010bb09
In-order traversal of the tree. Can visualize the tree.
if self.root is None: print('EMPTY TREE.') else: print('-----------------Visualize Tree----------------------') layer = deque([self.root]) layer_count = self.getDepth() while len(list(filter(lambda x: x is not None, layer))): ne...
0
0451aadf3633ca6d53b8c34d7e6c1226
6d061026cc63f4e4500cf647077c749e
Actually perform the join
query = "join" msg = self._msg_encode(query, self.id, known_peer) self.TCP_client(msg, known_peer+BASE_PORT)
1
b5d813cac2bfe943c258f8062b8333f7
bb68e480424698466d0ac026cdc31f48
循环某个范围的数,算出每个数的平方,根据第二个参数中数字,看该数字在得出结果出现几次
int amount = 0; double elements[10000]; for (double i = 2; i < 101; i ++) { for (double j = 2; j < 101; j ++) { elements[amount] = pow(i, j); amount = amount + 1; } } mergesort(elements, amount); int count = amount; for (int i = 1; i < amount; i ++) { if (elements[i] == elements[i-1]) count = count -...
0
ee3595d4a7dd4827b64ce3a9101c8933
655872c6ca0b53d766b4588a345414ad
Metod som överskuggar/döljer superklassens metod Anropar klassens metod - RitaLinjer - vid varje omritning
public class Ostrich extends Bird public void callOverridedMethod() { super.fly(); }
0
3422d3442edde4e0d8ad9daa6fa9976a
1df0af00abd7878de0fdf77cf0f663aa
生成number位大写验证码
namespace JCE.Utils.Randoms public class RandomBuilder public string GenerateNumber(int maxLength) { StringBuilder sb=new StringBuilder(); long ticks = DateTime.Now.Ticks + this.repeat; this.repeat++; Random random = new Random((int) ((ulong) ticks & 0xfffffff...
0
4e343f0ebe0ea7cdbd960e2dd4ebfdf5
f2d0e61cd0beadd793f3583bb1574fe8
generates a new temporary register and places the result of the operation in that register as well generates the AMI instructions associated with said operation
void regimm_op(uint32_t instruction){ uint32_t opcode, rs, rs_val, offset, offset_extended, target_addr, branch_addr, link_reg; opcode = (instruction >> 16) & 0x0000001F; rs = (instruction >> 21) & 0x0000001F; offset = instruction & 0x0000FFFF; rs_val = CURRENT_STATE.REGS[rs]; offset_extended = sign_extend(...
0
38e52449a6c36f3b3456ee7e4c8d14fd
6403c9339d7ab8f18f428ff55eb5e9a7
Sets the UIPanel component's rect.
this.$removeFlags(0x1000); var p = this.$UIComponent; if (this.$hasFlags(0x0001)) { this.$getContentBounds(); } parent = parent || this.parent; if (p[0] != null && p[1] == null && p [2] != null) { this.width = (p[2] - p[0]) * 2; this.x ...
1
2a8c0613bf19dd10e5f16dcc463553db
b6dff32167d4a7503929cb92aafdd4a7
返回下拉刷新包裹对象
IPullRefreshWrapper<P> getRefreshWrapper();
1
7833b2f5d3cffb8fc202f06508d50a08
6ed5e635defe8c3b8e007817635e8534
遷移アニメーションが終わったかどうか確認
class Performance EndReadyAnimation(): boolean { return this.readygo.AnimeEnd(); }
1
df477b6db6e11a663f84c3e6ddecb6b0
c2f1f048d89970ed7a0568fe71954d55
Sets a flag that indicates whether or not the data represents a time series.
class WCAOTimeseries(WCAOEstimate): def __init__(self,*args,**kwargs): super(WCAOTimeseries, self).__init__(*args, **kwargs) self.clip = False
0
e237d3d44aa4f926cff1bb16a4b4681e
9249d90c695aaa155d06771301313d0a
根據spec處理skip macroblock P - 搬運 forward frame資料, motion為0,0 B - 根據上一個macro type和motion vector決定如何搬運
void skipped_macorblocks_p(){ for(int i = 0; i < 6; i++){ if(i < 4){ int r = (mb_row<<4) + ((i>>1)<<3); int c = (mb_column<<4) + ((i&1)<<3); for(int m=0;m<8;m++) for(int n=0;n<8;n++) pic_buf[(pic_cnt+temporal_reference)%buf_size].ycbcr[0][r+m][c+n] = pic_buf[pel_past_for].ycbcr[0][r+m][c+n]; ...
1
45d94d3108c1d5915df2d489543fc806
4896595069eeddc787948a2b004feaa8
需要转义表格单元格中的内联代码中的管道符
for (var i = 0; i < grid.length; i++) { for (var j = 0; j < grid.length; j++) { switch (grid[i][j]) { case ' ': grid[i][j] = '&nbsp;' break; case '<': grid[i][j] = '&lt;' break; ...
0
974350558fba73003002a2ad1017d65e
e68dce9e111061551dfe5a2a6b49bebc
Sets the state to be used for style matching.
public class SmartScriptLexer public void setState(SmartLexerState state) { if(state.equals(null)) throw new NullPointerException(); currentState = state; }
1
e6831d66057590d4d5977dcd9beee014
0b7b486e8d3c88ea60272c09ece2ca94
直接发布草稿
$auth = Helper::auth([1]); if (!$auth[0]) return Helper::reJson($auth); $data = Helper::getPostJson(); $result = $this->validate($data, 'Task.republishs'); if ($result !== true) return Helper::reJson(Errors::Error($result)); $images = request()->file("images"); i...
0
92843b8d4e079629bade27954c1ebcc8
f61f193213377a10b53e091e81b4371d
Generate a list of armor that are attached to the player model. These will likely all be inactive.
{ foreach (Transform child in playerHeadArmorContainer.transform) { equipableArmor.Add(child.gameObject); } }
1
506929e363b1831e3a7ebebf3f1964ef
e915739146364b6684d166b62270e779
Funkce pro vykonani vsech kroku simulace vypoctu obvodu.
public class Main private void stepSimulate() { fluidSimulator.single(); }
0
9be86f3ed99a97e936e66becbff7bb5f
7791c6e228d1488bc1b92372ce654a77
Process the feed, subscribe the user to the list.
namespace Tweetinvi.Models Task<ITwitterList> SubscribeAsync();
1
dd2dc370a54610463955ef8399f1bb1e
8095f3f2c871b15d305c96acf43d756f
Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions.
public class SpscGrowableArrayQueue<E> extends SpscGrowableArrayQueueConsumerFields<E> implements QueueProgressIndicators @Override public final boolean offer(final E e) { if (null == e) { throw new NullPointerException(); } final E[] buffer = producerBuffer; final lo...
1
3be06c6363ad98a0eacf4ed4b9dc35be
36393a5db663cdd4333766d638e09dac
Creates an AND combinator for two {@link Filter}s on the same type.
infix fun <A> ((A) -> Boolean).and(other: (A) -> Boolean): (A) -> Boolean = { value -> this(value) && other(value) }
1
4c12e6bcd39e3f435dc63077e5382528
1fac4f670e4d0a4a5c6621e03fb219ba
calcule el puntaje basado en la posición relativa del círculo y el rectángulo.
public class MyCircle extends Circle implements CollisionObjects{ private int checkPoints(){ int points = 0; if(getRadius() <= 10) { points = 500; } else if(getRadius() <= 25 && getRadius() >= 10){ points = 300; } else if(getRadius() <= 50 && getRa...
0
1e1cd9a909968d285b4da0fea75bcdcd
b7b78b29b203816e0a89da6ff2ea9334
Attempts to run all the functions, which take callbacks. Runs the callback function when they all resolve or upon the first error.
for i, fn in ipairs(tasks) do if fn() then return end end end
0
96b89def6d3f29f2d00acd7c55502e9d
3730ed32261c58a49bfd04e112b02f5b
On détruit tous le contenu de la page, sauf le menu permettant de passer d'une section à une autre
try { document.getElementById("pagelet_bluebar").innerHTML=""; } catch(err) { } try { document.getElementById("content").innerHTML=""; } catch (err) { } try { document.getElementById("sidebar_navigation_top").innerHTML=""; } catch (err) { } try { document.getElementById("pageTitle").innerH...
0
96bef4d4d195f936cf343a6a008ca139
89ad0965c9bdb97c251347dac9057bb8
Ustawienie tła pod odpowiedzi - jeżeli błędne - czerwone - poprawne - zielone
public class Level extends NewFrame protected void badAnswer(int nr_level, int nr_task) { if(model.getValueAt(nr_level, nr_task) == "DOBRZE") { prize--; } model.setValueAt("ŹLE", nr_level, nr_task); meliResponse(false); }
0
3daba9517313727320eb8294b5c38226
3a274039d441406efd68347e62c4cce6
Function that will send all the locations of a given chunk
UDPServerSocket = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM) packets_ls = chunkstring(msg, 600) for i in range(len(packets_ls)): msgToSend = str((i,len(packets_ls),packets_ls[i])) bytesToSend = str.encode(msgToSend) UDPServerSocket.sendto(bytesToSend, dest...
0
f847891214e190bc087e3fd291ca74ce
37aaf0abc22ea0913fed8ae7135a7794
Убить окно
{ try { CloseClass.Hide(); } catch (Exception ex) { $"[Script]: error hide window({ex.Message})".Log(); } }
0
2b0306ace5d79e2f8873f5ff7195b979
5013d56467b03c2bd870c4083ba482a5
Expands the keys that are shared between both files
with open(output, 'w') as output_file: with open(existing, 'r') as existing_file: for each in existing_file: output_file.write(each);
0
8c21277761cba2be7a315599df65b88e
70be9d700621a0e44e5c009843494652
必要に応じて落下させる
function fall(timestamp){ let dx = tetrominoSpeed*speedLv; polyominoArray[0][1] = polyominoArray[0][1]+dx; polyominoArray[1][1] = polyominoArray[1][1]+dx; polyominoArray[2][1] = polyominoArray[2][1]+dx; polyominoArray[3][1] = polyominoArray[3][1]+dx; if((polyominoArray[0][1]>19) || (polyominoArr...
1
08cb35a19c048dfa5fe86f0d362ab2a5
41db6e6fb6e5a5223e1a1b5e6b4ccd50
hàm hoán vị 2 đối tượng nhân viên SỬA ỐNG NƯỚC
$staffCode = $staff["code"]; $oldName = $staff["name"]; $oldCodeName = $staff["name"]." (".$staff["code"].")"; $newName = $staffNew["name"]; $newCodeName = $staffNew["name"]." (".$staffNew["code"].")"; $suffix = Yii::app()->params['envSuffix']; if($oldName!=$newNa...
0
1bf88afaab48c085b93a823034b03a49
8bf6b5ea9b85afb463f878b8492c4bdf
Función principal del ejercicio 4
int main(void){ pid_t childpid[4]; double o1, o2, result; char buffer[MAX_TAM], respuesta[MAX_TAM], pid[MAX_TAM]; int i, status; int fdIda[4][2]; int fdVuelta[4][2]; printf("Introduce el primer operando: "); scanf("%lf", &o1); printf("\nIntr...
1
a8eebfaf4aa208d3e34c6c0602b739a6
ce906ede4f6cd1f7437873f1a83bb9b4
計算新地板的Y座標
{ if (step < 0) step = 0; else if (step > floorY.Length - 1) step = floorY.Length - 1; else this.transform.position = new Vector2(this.transform.position.x, floorY[step] + collHeightHalf); }
1
e7b98acaa0cdaa4a81a0b93cb346a3f1
7e43bde347e3a5619c423d82d74f2f6f
更新资源总配额
class ShopModel extends CommonModel public static function updateQuota($shopId, $allowTotal, $allowDailyLimit, $allowSingleLimit) { $model = Shop::findOne(['id' => $shopId]); $model->total_quota += $allowTotal; $model->available_quota += $allowTotal; $model->daily_limit_quota += $a...
1
eece15aa2d53f98c55dce175a6038b88
d85e246e751ae16f01715b8cceab3555
Changes the colors of every character in the current string to the specified set of console colors.
{ args ??= new object[] {null}; for (var i = 0; i < args.Length; i++) if (args[i] is not null && args[i] is string) args[i] = ParseColors(args[i].ToString()); var format = new StringBuilder(args.Length * 4); for (var i = 0; i < ...
0
80294044af39eacae2ce817348817d9b
a83489810a8c6e737d8cd2b44ba7f505
Requests the details for a specific order from the Warframe Market API.
function marketDetails(epic) { var req = new Request(); req.method = "GET"; req.url = urlRoot + "/markets/" + epic; req.headers = { "X-IG-API-KEY": apiKey, "X-SECURITY-TOKEN": account_token, "CST": client_token, "Content-Type": "application...
0
43cc4e3ee2046d1fb54560a3c0668f8c
b427dd771786500e4e06eaecb7c81263
Send to the Reins Script that the RIGHT Hand is free or not
global RightFWUnlocked if (RightFWUnlocked == False): if self.collide_point(pos): if (Player.tokens >= wheelCost): Model.RWtype = "RFwheel" Player.tokens = Player.tokens - wheelCost RightFWUnlocked = True ...
0
ec72f0cf772f81935b88767cf7c5bc07
48e4051dc58a70fb7c1d761cbb8c63ca
get list of files from reference directory
def list_ref_files(path): files = [] list_dir = os.walk(path) for maindir, subdir, all_file in list_dir: for filename in all_file: apath = os.path.join(maindir, filename) if apath.endswith('.reference_output'): files.append(apath) return files
1
6e1247cc4add1ec7839758b70b8edc07
7af8a371b0da5022464fb5306dd406d7
To get the widget based on widget type.
export class WidgetUtil public static getWidget(widetKey: string) { return WidgetUtil.getInstance().widgets[widetKey]; }
0
b6b517a0af1446293e89c56a89299254
85a104aaec823bcd273e76aff88dd288
Returns the statisticsEnabled field.
@Default default boolean statsEnabled() { return false; }
0
61f56afcec4ef358694ed2f7fe0c1a0c
11af11f2039f700a0921dcb03caed22c
Генерація pdf для Trl/Анулювання ліцензії
$doc_num = null; if($doc['id'] != $doc['first_doc_id'] && $doc['id'] != $doc['second_doc_id']) { $this->redate_act = date('d.m.Y', strtotime($doc['publ_time'])); } else { $doc_date = $this->sbr->getDoc($doc['first_doc_id'], true, true); $this->redate_act = dat...
0
9df6d3902a9f4a075417faed2b96b852
88e2c910e2d8d9862373e394f698b677
Finds the widest cell of the given column and returns its width. This is used internally to assess the character width that should be used to print a column.
namespace Learnheuristics.Services public class DynamicTable private int GetWidth(int column) { var length = Headers[column].Length; for (int row = 0; row < Table.Length; row++) if (Table[row][column].Length > length) length = Table[row][column].Length; ...
1
5ac6acb9d72a1806ba0827eba83428d1
f97364246973ba0dc7ad3a388ff08773
Saves @thumbnail to it's appropriate file. Note that @thumbnail must have it's URI, mtime, and size metadata set before this function is called. Any additional metadata can be saved using the %NULL-terminated variable-arguments list. If an error occurs while saving the thumbnail, a failure thumbnail will be automatical...
{ uint64_t t; size_t img_size; pixel_t *dst; const unsigned char *src; uint32_t r, g, b; int x, y; if (read_rfile(rf, &t, sizeof(t)) < sizeof(t)) return; save_time[index] = (time_t)t; if (gets_rfile(rf, tmp_str, sizeof(tmp_str)) == NULL) return; save_title[index] = strdup(tmp_str); if (save_title[index] ...
0
85b9334931f340fb472539724a8d7297
ee43d8d6a3ad5713c91699883d7ed1cb
Clears all chunks from the dirty list.
namespace WraithavenGames.Bones3 internal class WorldContainer internal void RemeshDirtyChunks() { for (int i = 0; i < m_DirtyChunks.Count; i++) RemeshChunkAt(m_DirtyChunks[i], false); m_DirtyChunks.Clear(); }
1
4978fb21ee57cf715ab9494291ea2ba2
dd9cdefd6856563b05380e3b337e9467
Calcula la circunferencia del círculo
function Circulo () { let largo; let radio; let perimetro; let alambre; radio = parseInt(document.getElementById("txtIdRadio").value); perimetro = 2 * radio * Math.PI; alambre = perimetro * 3 alert("Es necesario dar " + alambre); }
1
c3a7257e443e4783d84411eb3364f6fe
69977f8e11b8f358d910f0bd8e04811b
returns distance between two states
def invdist(state1, state2): try: return ((state1[0]-state2[0])**2 + (state1[1] - state2[1])**2)**(-0.5) except: return 0
0
1ded55e36a690f30383cc29a939e31e7
56e415eb6ffd37fc9896f9bb1385e0fc
Checks to see if this application is already running. <p>
boolean isApplicationRunning() throws ETComException;
1
7b0cd643fba1b57f04d593db60e002a6
01d465812e2a688c9a451d37ab0181e3
Test if logged user who already joined the group is redirected.
class DeleteGroupViewTests(TestCase): def test_not_logged_cannot_delete(self): utils.test_not_logged_cannot_access(self, self.url)
0
fdbea58f210fb69b64173cc1cc00dd53
6eaa52c9e31e81c7ae069769aa69e31d
rates the risk of stations based on their actual effect on the monthly maximum and on their daily maximum variance (actualy standard deviation)
static void calculateRisk(double game[][16]) { int x, y; double count = 0, helper = 0; if ((game[0][0] > 0) && (game[0][0] < 5)) { if (game[0][1] == 0) { count += 1; } if (game[1][0] == 0) { count += 1; } if (game[1][1] == 0) { count += 1; } if (count == game[0][0]) { helper = 1000; } els...
0
4e31d918181d74324f37f41e38f7e79d
67975ddedd0596893363ec79bc93e1c1
Get status since datetime
List<String> trace = getTrace(Rechnung.STATUS_CHANGED); int ret = getStatus(); TimeTool tt = new TimeTool(); for (String s : trace) { String[] stm = s.split("\\s*:\\s"); if (tt.set(stm[0])) { if (tt.isBefore(date)) { ret = Integer.parseInt(stm[1]); } } } return ret; }
1
da3b9abc361c8cfb91241a61afedb4be
e7527f9f422e9341ee1773300fddc985
Gets the value of the loyaltyPref property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the loyaltyPref property. <p> For example, to...
{ synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LOYALTYNBR$0, 0); if (target == null) { ...
0
c1acd261549fa662cd495a96855fb5ab
92fc09f30585ac0b31d1d7fa96d6961c
Get message timer.
class TimerMessage extends Message public function getTime() { return $this->time; }
1
c10ee58a26a034d2d67224d193b9ee63
4fe52838db10ea9fcb578fcbff4a026c
4) Conversión escala de 100 -> escala 5
int get_10BitTransformedTo50000mV(int adc10BitDigital) { voltage = adc10BitDigital * 48.83; return voltage; }
0
a834df77c8ada299ffe777eb0325cecf
e3d0fae9c959f0548190530e702f5d2d
<p> Returns whether the client has enabled fips mode for accessing S3 Control.
Builder fipsEnabled(Boolean fipsEnabled);
0
9aa72633768d807a588a18f4068fb489
8bc75bea9857418ef4c5128c67fe3550
Given a list of DukeDS user ids fetch user details.
def display_users(dls): return dls.details_list
0
7a3ce29b33769a027e31058954af2fb7
d05ab27a95192a9f9a6d772594bfd034
Setter for default chart X scale.
if (x_s == null && measures.x_scale == null) return; measures.x_scale = x_s; repaint(); }
1
3a044d4dd4ddb6f1a5397b651b2253f7
e8e6c1e6b294e48307700128fe647ea8
Test Assertion helper that will try the SELECT query a few times in case we need to wait for consistency
for i in range(self.pool_size * 2): self.db.getconn(callback=self.stop_callback) connection = self.wait_for_result() for j in range(10): connection.execute("SELECT %s", (j,), callback=self.stop_callback) cursor = self.wait_for_result() ...
1
83f3db609e0dcfc2c92a9e779f478425
b313de90d8b0d4db7f4b8409b49f9fc0
角色选择,返回角色对象
if len(mc.ls(sl=1))==0: mc.confirmDialog( title='WARNING', message=u'请选择一个角色控制器', button=['OK'], cancelButton='No') print u'脚本准备结束' sys.exit() else: if type==1: selectObj=(mc.ls(sl=1)[0]) else: selectObj=mc.ls(sl...
1
a90ddaeb8a44d65a4c6832cbabc5a631
0ffc2c376a9d08258ecc3b5c35847ce5
Get a list of NED tiles required to cover a spatial extent
class TiledProjectionSystem(object): def _search_sgrid_tiles(self, geom, sgrid_id, coverland): intersect_sr = osr.SpatialReference() intersect_sr.ImportFromEPSG(4326) subgrid = getattr(self, sgrid_id) grid_sr = subgrid.projection.osr_spref if not grid_sr.IsSame(intersect_sr): ...
1
87bf9f2f5a55729a86db9b42bbeab442
ee00569e38981038004b63462ac836c2
Simulate a long-running network connection
t0 = time.time() while time.time() - t0 < 0.5: pass
0
b48a0a11bc9e04dac927eb49f3cdc61d
2f2b1fb8348eeeeecb4b6cfbc50c02c5
GET: CourseModules
{ var courses = _context.Courses.Include(m => m.Department).ToList(); return View(courses); }
0
57c3300911ab2a4eb67e8f5de529276d
a247109b776c68a8e2299f250bac18ba
Loads the map assets like tileset and background music.
bool j1Scene::Start() { LOG("LOADING MAP"); current_map = maps.start->data; if (App->map->Load(current_map.GetString()) == true) { int w, h; uchar* data = NULL; if (App->map->CreateWalkabilityMap(w, h, &data)) { App->pathfinding->SetMap(w, h, data); LOG("%d %d %d 0000000000000000000000000000000000000000000000...
1
a7d9de3c4c07ea536e25ee45d81bb822
3d917d9bc82896b044bcb42e697728ae
Draws the texture-mapped earth and moon.
{ glPushMatrix(); glTranslated(0,-6388,0); glRotated(x_earth,1,0,0); glRotated(y_earth,0,1,0); glRotated(z_earth,0,0,1); glEnable(GL_TEXTURE_2D); if(Earth && y_loon<400) glBindTexture(GL_TEXTURE_2D,terraintexture); if(Earth && y_loon>400) glBindTexture(GL_TEXTURE_2D,terraintexture_Ea...
1
8a8adb08b7ce70279362ba13048378d8
3880a5be525475b994f4e4c44fcf9a13
вывод статистики посещений поисковых ботов
{ global $kernel; $action = $kernel->pub_httppost_get(); $html = ''; $IDPartner = isset($action["partners"])?(int)$action["partners"]:0; $date_start = isset($action["date_start"])?$action["date_start"]:""; $date_end = isset($action["date_end"])?$action["date_end"]:""; $_wh...
0
86e923580e05f05a3cd85c9246d16c01
9b35ab0e645f56d69df8cd6b7cffd26a
Message handler. Gets the Ids of the players in the round.
{ List<Player> players = (List<Player>)message; WhitePlayer = players[0]; DarkPlayer = players[1]; ActualPlayer = whitePlayer; BaseTimer = ActualPlayer.SecondsForMove; InitTimer(); }
0
aa83290136caea635fadae9a7df16705
37f7710a9369dbb2ec157dd37af9cba6
return a list of ALL positions ordered by date returns a list of tuples (id, timestamp, owner, title, location, company, description)
sql = ('SELECT p.file_date, s.indsec, SUM(p.mval) as mval, SUM(p.shares) as shares ' + 'FROM vPositions as p ' + 'JOIN securitiesex as s ON p.ticker = s.ticker ' + "WHERE indsec <> 'Nan' and '" + start_date + "' <= p.file_date and p.file_date <= '" + end_date + "' " + "GROUP BY p.file_date, s.indsec " + ...
0
e1d2d129c84237223e6d96f9703f7a81
33caff2a304a86f04366a23a1077d792
生成模板图片02
class Picture public static function setTemplate27($storeInfo, $goodsInfo, $goodsImage, $codeImg, $num, $length) { $backImg = imagecreatetruecolor(600, 1067); $grey = imagecolorallocate($backImg, 238, 238, 238); imagefill($backImg, 0, 0, $grey); $goodsImg = imagecreatefromstring(file_get_contents($goodsImage))...
0
d162cc00fd35377dbfc61fa9714e50d5
4f0600afa174e3675fcbf12369450465
Rechercher les jeux enregistrés pour le théme passé en paramètre.
def get_books_of_theme(tnom): res = db.get_books_of_theme(nom=tnom) if res==[]: return(Response(status=404)) else: return(jsonify(res), 200)
1
b7a5b9ea0980ade6eb7dd5d0251cffdb
6462f6485261aee85643166d3a9e2290
Get a random HTTP method.
$proArr = [ 'http', 'ftp', 'gopher', 'mailto', 'mid', 'cid', 'news', 'nntp', 'prospero', 'telnet', 'rlogin', 'tn3270', 'wais' ]; shuffle($pr...
0
dcde40edb248bfea13b082bb38830a5b
617c5ae558b77fb97eb83412ad2bc275
initialize pins as output
def initialize_pins(StepPins): for pin in StepPins: GPIO.setup(pin, GPIO.OUT)
1
b1a312629f76607a1ea82c2af6895b74
a79b39780b06bb4ce31d46504a6c9bde
devuelve las fichas de los jugadores
fichas = [["violin","viola","cello","contrabajo","oboe","corno ingles","flauta","flauta picolo","faggote","clarinete","trompeta","trombon"], ["tuba","bateria","redoblantes","congas","timpani","piano","organo","xilofono","marimba","guitarra","cuatro","bajo electrico"], ["acordeon","ukelele","mandolina","man...
0
4ce14bafaf7d64940c1cbcceedf466b8
23cc670890e15eca6f1773fa935319d8
Adds new partners to list of known partners.
public void addPartner(@RequestBody Partners partner) { if(partner==null) { throw new InternalException("Internal error happened!"); } partnerService.addNewPartner(partner); }
1
948a262b610b9413dbd89b0fd01840a6
c641eae874dee3e128f598e3c6eb677f
判断最小高度函数
def tree_height_min(root): def help(root): if root is None: return 0 if root.left is None and root.right is None: return 1 return min(help(root.left), help(root.right)) + 1
1
83c1ad14aba0ae899875b5853446b01f
d739dc87e5739348ae12e97598ba57e5
Prevent the realm instance from leaking
abstract class BasePresenter<DTO>(val view: BaseView<DTO>) fun closeRealmInstance() { realmInstance?.close() }
1
9d170715e29ff843807a10c60ce78e66
44bd8ae2b2d1979574fc7b50f77f577b
Register both the signal handler and the actual timer itself
static void InitializeSignalHandler() { struct sigaction t; t.sa_flags = SA_ONSTACK | SA_SIGINFO; t.sa_handler = SignalHandler; sigemptyset(&t.sa_mask); sigaction(TIMER_SIGNAL_NO,&t,NULL); }
0
36b3b84cebce45788d3c6ec401bd3e9f
62a609c6ddb8b794382af07897b966be
Convert coupling map list into dictionary.
class Coupling: def __init__(self, couplingdict=None): self.qubits = OrderedDict() self.index_to_qubit = {} self.node_counter = 0 self.G = nx.DiGraph() self.dist = None if couplingdict is not None: for v0, alist in couplingdict.items(): for v1 ...
0
0943438efa435f06d41e04c32d695f8e
0f927998f98a65984f1e90320cdcaedd
Direct Form I
double firI(int M, double *b, double *w, double x ) { double y=0; int j; w[0]=x; for (y=0, j=0; j<M ; j++) y+= b[j]* w[j]; for (j=M-1; j>=1; j--) w[j]=w[j-1]; return y; }
1
4242bd5ce5ae66c7c5361a94b87f4594
c6c3d7c43db14cfebfba6143c9f6cd30
построение схемы модулей на основе псевдоимен
namespace EdifToSystemC static class Convertation public static String GetSchemeInfo() { if (Modules.Count == 0) return ""; String info = "Modules count: " + Convert.ToString(Modules.Count) + ".\r\nModules:\r\n"; foreach (Module module in Modules) { ...
0
683fae311d54333016ec16b040684ed1
0a057baaa0c44b203bb59f93674271ed
PermissionRepository constructor.
RoleRepository $roleRepository, RoleHasPermissionsRepository $roleHasPermissionsRepository ) { $this->roleRepository = $roleRepository; $this->roleHasPermissionsRepository = $roleHasPermissionsRepository; }
0
1c85591d72596eb76e0048efd87cb044
8c10544ab82570b3553271fee3d250ac
判断两条记录是否同宿
if (r1==null || r2==null) return false; if (r1.getType().equals("FR") && r2.getType().equals("FR")) { if (r1.getUpDown()==r2.getUpDown() && r1.getFloor()==r2.getFloor()) return true; } else if (r1.getType().equals("ER") && r2.getType().equals("ER")) { if (r1.getFloor()==r...
1
d6132d8128bfa2b4cc8902845807a568
fa369ee13363a59b2d890ef78d63d5c1
大きさの変更確認
_log(1,'function','pictureChangeSize()'); try { var id = $(obj).attr('id'); var size = id.split('-'); var pixel = '1024×768(78万画素)'; if(size[2]==='minimum' || size[2]==='small' || size[2]==='medium' || size[2]==='large' || size[2]==='maximum'){ switch (size[2]) { case 'minimum' : ...
1
5585eff2b8ebf46b4a9c47b3e221abb4
be024e3629017895c9b6a441d5049012
Filters the queryset with the advanced search (everything is anded)
return queryset.filter( Q(first_name__contains=value) | Q(last_name__contains=value) | Q(description__contains=value) | Q(user__username__contains=value) | Q(user__email__contains=value))
0
4a420a9dc673fe2a040996b1c23e551b
fc43a578637088efb097ab4b1a58cbbd
Describes type of argument: in, out, in/out or return value of procedure. Particular values you can find in DatabaseMetadata;
public class PluginManifest public static class PathArg public String getArgtype() { return argtype; }
0
d27098d97df615476be346b4f2160e6b
7b7add6cd9d56602c1e4ad3bca11e649
The code that runs during plugin activation. This action is documented in includes/class-woocommerce-print-products-activator.php
class madang_commerce_Post_Type public function plugin_activation() { $this->commerce_init(); flush_rewrite_rules(); }
1
47e198b105d0e4bcd63f462ef5db714e
ac2cef3817c6089846d2203a8aa24ae0
Dequeue LDPC encode operations from ACC100 device.
static inline int enqueue_dec_one_op_cb(struct acc100_queue *q, struct rte_bbdev_dec_op *op, uint16_t total_enqueued_cbs) { union acc100_dma_desc *desc = NULL; int ret; uint32_t in_offset, h_out_offset, s_out_offset, s_out_length, h_out_length, mbuf_total_left, seg_total_left; struct rte_mbuf *input, *h_output_...
0
f079f7faa5b03d03944f2ff548b03a4a
693b03262bdd1ed3cbcf435f5ea5f22e
Helper for converting a color to rbg
def colorToRGB(c): c = int(c) r = c >> 16 c -= r * 65536 g = c / 256 c -= g * 256 b = c return [r, g, b]
1
dc63696a816603675aa9686ad4def62d
30ebf90bef23476f9b0d143c7ccadb40
format = kk:mm
function formatHours(field) { var nSep1, sHour, sMinute,nHour,nMinute; var checkstr = "0123456789"; var DataTemp = ""; var DataValue = ""; var value,i; DataValue = field.value; if (DataValue.length == 0) { field.value = ""; return false; } for (i = 0; i <DataValue.length; i++) { if (checkstr.indexOf(Da...
1
0f45c25642c43bfd1e066bdaf34a4788
f6ee3fe713dc54c28d5e91f7862a5544
Отображение основной страницы админа, с данными о сервере
{ $users = DB::table('users')->count(); $tables = DB::table('rest_tables_conts')->count(); $requests = DB::table('rest_requests')->count(); $adminSettings = DB::table('settings')->get(); return view('admin.index')->with([ 'settings' => $adminSettings, ...
1
a4325a1b8789a2c55fd56a3373541681
7e6fa73651239ba6e6938645a430e367
정수 N개로 이루어진 수열 A와 정수 X가 주어진다. 이때, A에서 X보다 작은 수를 모두 출력하는 프로그램을 작성하시오.
int main(int argc, const char * argv[]) { int n, x; cin >> n >> x; for(int i=0;i<n;i++) { int a; cin >> a; if(a<x) cout<<a<<" "; } cout << endl; }
1
c4177e8e2491e80a62259f5996b20154
c6219897c202cc4a02153cfbba2d5073
Generate randomArrays until the array is solvable
new_puzzle = pb() while not new_puzzle.is_solvable(): new_puzzle = pb() return new_puzzle
1
717d5638d37168dd7573f407a35a403d
1132dec9daaa7b41ad06a5db4dd9ae05
DInputを初期化
{ if (FAILED(DirectInput8Create(GetModuleHandle(NULL),DIRECTINPUT_VERSION, IID_IDirectInput8, (VOID**)&m_pDInput, NULL))) { MessageBox(0, "DirectInputオブジェクト生成に失敗しました。", NULL, MB_OK); return E_FAIL; } return S_OK; }
1
30f1f4b08d32e273828e0ebabbed6979
6d0e643ff8830e389447d79f278017ce
提取二进制a 中最右边的一个1的二进制数 加入传进来的数是10 则为 00000110 取最右一个1 则为00000010 = 2
public class BitMan public int addOne(int a) { int i = 1; int n = a; while((n & 1) != 0) { n = n >> 1; i = i << 1; } int mask = ~(i - 1); return (a & mask) | i; }
0
eaf42b24e8e7af9932c425664a37c525
748dfaf93abd9e0f556da012e097ff46
checks for valid select conditions before applying date select
if($filter['from']) { $fv = date('Y-m-d', strtotime($filter['from']['day'].'.'.$filter['from']['month'].'.'.$filter['from']['year'])); $where[] = "{$dcol} >= '{$fv}'::date"; } if($filter['to']) { $fv = date('Y-m-d', strtotime($filter['to']['day'].'.'.$filter['...
0
faa840fc0d24dda633e9d155c5d72f3a
aa98813f9199288d8840a1d96e327bed
Simple example which get the timestamp of the first measurement in the log file.
file = open(filepath, "r") for line in file: if line[:6] == ";TIME:": return int(line[6:])
1
b647141cf1e8873c39b19eaee0b90b3b
2df96579f7110723c2d0e1f90a73c129
把向量置空
public class Vector3 implements Serializable, Cloneable, Vector<Vector3> public void clear() { this.x = 0; this.y = 0; this.z = 0; }
1
ae0b1686763df3651561af02460990c1
687ac56a0d5515100bcc24b3518581cc
Converts to float. <locDE><para />Konvertiert zu Float.</locDE>
final class NInt extends NObject implements INumber, IComparable, IConvertible /* IFormattable */ public function toFloat() { return NFloat::get($this->value); }
1
d27c928041ac0783d95fd10aef99dcfb
6520b81d930b89b732ea10c59389fe91
Adds an entity for the specified list item.
namespace PnP.Core.Model.SharePoint public IListItem Add(Batch batch, Dictionary<string, object> values);
1