query_id
string
corpus_id
string
query
string
code
string
label
int64
b666bb9227afe4b868c82c9c569dcf83
c673097438a5aed49a5c5ae309444dac
Sort the requirements in a ``RequirementSet``.
class Requirement: def uniq(cls, benchmarks): reqs = [cls(b.get_requirements()) for _, b in benchmarks.items()] reqs = uniq(reqs) for _, req in reqs.items(): req.pick(benchmarks) return reqs
0
56e77488790f486b3033d9c6fcb8e2af
3a3cc524b815cf85debf9b15907e7ac5
True if the app has more than one payment account.
settlements = trade.Settlements().AsArray() settlement_type = 'Stand Alone Payment' return any([settlement for settlement in settlements if settlement.Type() == settlement_type] )
0
9781992a69b655e860308c04c967c8c1
4407716d7e7bd423a3fa308b46bab4d9
休憩エリアと重複したチップの幅を取得する
Tcd010Model model, TcdAdmConfModel admMdl, ArrayList<TcdTimezoneModel> timeZoneList, Time normalFrTime, Time normalToTime, RequestModel reqMdl) { Timeca...
0
1a48042d9ea10ea0704fda80b62f0223
5f5c5a30a1183b71b420d9d57434ff44
| | Get Console label for backend |
{ if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) { return sprintf('%s version %s', $this->getName(), $this->getVersion()); } return 'Console Tool'; }
1
bf90bace88d497d6280cf0abae2d76e6
b7bbf0b3093f240d373f2485b49c4e5b
Creates a 'load_element' intrinsic, which indexes an array and loads the indexed array element.
{ HRESULT hr = S_OK; IfNullRetPointer(ppInstruction); CComPtr<CLoadArgInstruction> pInstruction; pInstruction.Attach(new CLoadArgInstruction(index)); if (pInstruction == NULL) { return E_OUTOFMEMORY; } *ppInstruction = (IInstruction*)(pInstruction.p); (*ppInstruction)->AddRef...
0
b5da46a70f9f6f6f1cc5aea24951425b
c85940ec884c6f8a5cacf2d0ca7a0dcd
Adds one or more directories to the catalog as DirectoryCatalog's.
namespace DataMapper void AddCatalog(Catalog catalog);
0
b2d275703f52b216f1c9745e7fc85fd0
bafe2efc5d9b16578eccfe163c9a45e1
List all the available templates for a given Account.
{ var callbackToken = RegisterCallback(callback) + "|" + isGeneric; _client.GetAccountTemplateDetailsAsync( accountTemplateId.ToString(), languageId, isGeneric, callbackToken); }
0
8bb1c18bffb7cc5107ab87cfd41c9c03
108e9f878dc02307167fb3fb8d12995b
Traite la réception d'un buzz
buzBtn['background'] = 'white' global bool_buz if not bool_buz: try: global control_byte control_byte &= 0x7F sock.send(control_byte.to_bytes(1, 'big')) bool_buz = True except (OSError, AttributeError): disconnect_handle()
0
929d0af8c0636ae825f8e1d8abed8f7b
3c20284cdcd73a8ddf89bd607378119a
Test Sparse sequence cloning.
namespace MBF.Tests [TestClass] public class CloneTests [TestMethod] [Priority(0)] public void SparseSequenceClone() { SparseSequence sparseSeq = new SparseSequence(Alphabets.DNA); sparseSeq.Count = 50; sparseSeq[0] = Alphabets.DNA.C; spars...
1
28c9af19c62c6e54d710699dbd83c462
60d736223d1be07e2ecb4328dd31c067
Set the code risque3.
class LignesMsaPenibilite public function setCodeRisque1($codeRisque1) { $this->codeRisque1 = $codeRisque1; return $this; }
0
aa75f1f28f61360c112907416aff149f
0f81293917fd7f921d23f73bfc920fc2
Asynchronously transmits a message to Raygun.io.
if (!backtraceClient) { throw new Error('Must call initialize method first'); } return backtraceClient.sendReport(data, callback); }
0
626e10e765714344e509e734f13b9bc6
aa10461ac4dd3d9eb61e2c7865b74bf0
Removes spaces from inside a string
class StringOps public string RemoveSpaces(string s) { string temp = ""; int i; Console.WriteLine("Removing spaces."); for(i=0; i < s.Length; i++) if(s[i] != ' ') temp += s[i]; return temp; }
1
9b65edfb3eea9861427f7253d5445126
1c0ca8c522be96ef962b27a7ca31951b
Show the selected mesh index
class MorphoViewer showMesh (name) { this._threeContext.showMesh(name) }
0
c9dda569bf68ff9a61644239beff1655
911e5c8eaecca9482f3408a69a5a6a15
取消一次異步發送操作。
public #else internal #endif class HttpHelper public void CancelAsync() { try { HttpWebRequest.Abort(); } catch (WebExceptionWrapper) { throw; } catch (WebException ex) { ...
1
74da573197fc7e6b425340ccecc0f030
1de39ea06451a04af1f0a3786cef7ca9
通过物料ID取得物料的计量单位列表
namespace PDW.PHB.Services public class MaterialApplyService private Dictionary<string, string> GetMaterialsUnitId(string[] materialIds) { Dictionary<string, string> dict = new Dictionary<string, string>(); if (materialIds.Length == 0) return dict; ParameterCollection pc ...
1
2296a39dcae48f34e9733e49ccfefce7
26e0f30626e771a3fe88d8fbfcc1e732
Takes an input and predicts the output by combining the output of the k nearest neighbours.
y_predit=np.zeros((x.shape[0],1),dtype=self.y_train.dtype) for i,x_test in enumerate(x): distances=self.dist_funct(self.x_train,x_test) nn_index=np.argsort(distances) nn_y=self.y_train[nn_index[:self.n_neighbors]].ravel() y_predit[i]=np.argmax(np.bincount(...
1
1e3df476ea8df24bcd87698a0147fcbb
789e617d0467c6930b9b2ae6714f14e4
Register a listener to be called with corresponding rgb and depth frames.
namespace Microsoft.MixedReality.WebRTC.Unity [AddComponentMenu("MixedReality-WebRTC/Video Receiver")] public class VideoReceiver : MediaReceiver, IVideoSource public void RegisterCallback(Argb32VideoFrameDelegate callback) { if (Track != null) { Track.Argb32Video...
0
da6b3d772780e225101c369f76287a89
7a56081f6186dd49fc94c0984ca31f68
Test to see if there's an existing file. If so, save to that without a form to select; otherwise allow the user to select where to save the spreadsheet.
namespace SpreadsheetGUI public partial class SpreadsheetForm : Form private void closeFileButton_Click(object sender, EventArgs e) { if(checkToSave()) { this.Close(); } }
0
7769feaaac9cc7408651f5443cbcd483
80fd52d65f6316689bc979014798d5fd
Return `True` if the provider requires a store. Subclasses might override this method. Default implementation returns `False`
class CanonicalStore(ICanonicalStorage): def is_available(self, retries: int = 0, read_timeout: int = 5, connect_timeout: int = 5) -> bool: raise NotImplementedError('Implement me!')
0
c450362892191a225f5d325b2c8ccdaf
424e60dbf44f100ee32b3fd64205b437
顧客のスケジュールの受講状態を判断して返す
foreach ($CustomerSchedules as $CustomerSchedule){ if($CustomerSchedule->status === 0){ $CustomerSchedule->status = "未受講" ; } if($CustomerSchedule->status === 1){ $CustomerSchedule->status = "受講済み" ; } } return $Cus...
1
0e3b24f9b409d5334d2ecab2df57a649
d2563e0ce10fec66aac3025913762aa3
查询手术包信息
async function getPackageOrders({pregnancyId}:{pregnancyId: string|number}) { return request(`/api/packageorders?pregnancyId.equals=${pregnancyId}`, { method:'GET', getResponse:true }) }
0
022950784f98c2482bf5cc0078b7a15d
9d5045540da6180952e64566590eb36a
四舍五入. 获取一个字符串类型的数据
if (null == value || "".equals(value.trim())) { return null; } return round(Double.parseDouble(value.replaceAll(",", "").trim()), scale); }
1
0e4c0acd48ba223ae497b70fd226f7cd
d1f59a9d0bf5ffa700e1b30cc3932883
The cache's max number of entries is set to maxNumEntries. Passing a value of 0 results in an unlimited cache size.
void setMaxCacheEntries(int maxEntries);
1
19251848e25f2fed57b7742895df97ba
6039ae3e57fad17df9e8d62a2aa64df0
Calculate the time between sending and claiming the postcard.
account.refresh() last_post_timedelta = addTzInfo(datetime.datetime.utcnow()) - account['last_post'] return max(0, cfg.STEEM_MIN_REPLY_INTERVAL - last_post_timedelta.total_seconds())
0
344ca21f51cabfa16fc80221423e6247
6f08e8f4c5c50020f1281d0d909152fb
更新缓存中的实时车源信息和实时货源信息
namespace MOweb.Models public static class OrdersMapper public static void updRealtimeCache2() { List<ordToUpdRealtime> ords = new List<ordToUpdRealtime>(); long OrderNo = 0; int Host = 0; long State = 0; string StateCode = ""; long id_...
1
336c3b0c91b84a9aecd45d47071fc0b9
cd92bb6403a4cbb643aab2826af342f6
Checks whether provided arguments are valid
class client(): def _validateArgs(self, args): if args[0] == "put": if len(args) < 2: self.Errors.append(constants.ERROR_ARG_PUT) return False elif not os.path.isfile(args[1]): self.Errors.append(constants.ERROR_ARG_FILE) re...
1
ce9455fb67210080b8eea037d2e24a01
da54a772dc849e6814d30a954d1d6cec
The time (in ms) after which no response from the remote side after calling {@link #checkConnection()} will be considered disconnected.<br> Any negative value means that no interval was set, and the connection will wait in the {@link NetworkConnectionState#CHECKING} state indefinitely if the partner does not respond. <...
public long getCheckInterval();
1
543410d67e838383c5053287cf7abd08
04073194ad67c2a8c5f9457760435f91
deletes account permanently
{ if ($this->auth->user()->id !== $id) { return Response::json(['error' => 'You do not have permission to delete this account.'], 403); } $user = $this->user->findOrFail($id); $user->forceDelete(); return Response::json(['success' => 'Your account has been deleted.']) }
1
2d4910fc769c6d622f846ed5dcc9ceeb
9a6ace5e80fdcb7c0df12958c000279a
获取门店设备列表
class Device extends AuthBase public function getDeviceList() { $param = input('param.'); $map = []; $map['d.status'] = config('code.status_enable'); $map['d.is_delete'] = config('code.not_delete'); if (isset($param['role_id']) && intval($param['role_id']) == 7) { } ...
1
4f65b31b91700d84babb21c71224beee
fbb4351a515aa0779730c4dab1eb4150
@brief Configure C-NoC transfer buffer.
void noc_configure(void) { unsigned row_size = NOC_TIMESLOTS > NOC_DMAS ? NOC_TIMESLOTS : NOC_DMAS; unsigned core_idx = get_cpuid() * NOC_TABLES * row_size; for (unsigned i = 0; i < NOC_TIMESLOTS; ++i) { *(noc_interface.st+i) = noc_init_array[core_idx + i]; } for (unsigned i = 0; i < NOC_DMAS; ++i) { ...
1
783d89687f1c369221c13a07752fc51d
fe9f58f2570ad6b4c0b72fa4b96aa587
根据url跳转到不同URL
class UserController extends Controller{ public function toGo(){ $url = $_GET['url']; if(isset($url)){ $this->redirect($url,array()); } }
1
2e8945fa427f27686954cc1e708aabc7
b472e039072021dd02d379cac1ec804a
Nombre de différences entre les deux états.
class Challenge04 private function compare_states($state_a, $state_b) { $cont = 0; $len = strlen($state_a); for($i=0; $i<$len; $i++) { if ($state_a[$i] == $state_b[$i]) $cont++; } return $cont; }
0
4bd0bbe4f3416b89397cd1adab2c7960
e0cf378026a8bb83965cbedcb339faca
Generate a point at the origin.
class Point extends Geometry public static function xyEmpty(int $srid = 0) : Point { return new Point(CoordinateSystem::xy($srid)); }
1
6801482588c83e91590af6f1a796980a
6c86f44821865ceece524ab4caa9c794
酒品分类列表
class Dishes extends BaseModel{ public function getclass_list($page=0,$url='',$kwords='') { $model = db('dishesclass'); $aka = 'class'; $where[] = [$aka . '.isdel', '=', 1]; if (!empty($kwords)) { if (is_array($kwords)) { if ($kwords['name']) { ...
1
eb4aba1b7556b3d5e727b5b71078659a
ad614afa515525061f694f78f1700d19
重置密码时的验证码
class User extends Eloquent implements UserInterface, RemindableInterface public function resetPassword() { $this->resetcode = rand(1000, 9999); $this->save(); return $this->resetcode; }
1
ecf1ea3864fd84578871d18106c0b286
7aa849d31315d0746d54a4148f67a35f
Remove pagination links so others can replace them
function ik_pagination($html) { $out = ''; $out = str_replace("<div","",$html); $out = str_replace("class='wp-pagenavi'>","",$out); $out = str_replace("<a","<li><a",$out); $out = str_replace("class='page'>","class='pager'",$out); $out = str_replace("</a>","</a></li>",$out); $out = str_replace("...
0
6c261989a5585da53395efddcd50b64b
73f119f8b3657f08bf56cf985abd921a
Simulates convection currents by using fluid buoyancy.
cv::Mat_<cv::Vec2d> &flowfield_p, cv::Mat_<cv::Vec2d> &flowfield_m, cv::Mat_<double> &phi, const std::unordered_map<std::string, parameter> &parameters){ double h = 1; updateU(flowfield_p, phi, t, parameters, h, 1.0); updateU(flow...
0
63cf1da20ab50a461c5f0872655ba0d9
b8d5b090af398ba145ae603993a34836
Return a Google Chart API URL showing duration distribution per ns.
class GraphiteValidation(Validation): def _build_url(self): return "{0}/render/?target={1}&format=raw&from=-{2}seconds"\ .format(self._context.get_graphite_host(), self.metric_name, self.time_range.total_seconds())
0
1c85943ec3b7b73e731b039d470553fb
ffbf6503926aa64d4ef07d8abcb001b7
Calcula a quantidade de cotas até dia determinado Parâmetros: Dia final Id da divisão Retorno: Quantidade de cotas {fundo_id: qtd}
class CalcularQuantidadesFIITestCase(TestCase): def test_verificar_qtd_apos_agrupamento_fii_1(self): self.assertEqual(calcular_qtd_fiis_ate_dia_por_ticker(self.investidor, datetime.date(2017, 6, 4), 'BAPO11'), 430)
1
84be757c4e1a459cc5409853123f8c02
2d17dac60407c9446004474068192592
Takes a screenshot of each available region and screen.
class ScrollableWidget(Widget): def capture_screenshots(self): self._top_button.capture_screenshots() self._bottom_button.capture_screenshots() self._left_button.capture_screenshots() self._right_button.capture_screenshots()
1
f8492a3a8fb8fff05672d1e6277dc7a6
cb7444549d2f4f93bfadb8d8c51ad36f
Sets the device heat & cool range temperatures.
class DemoClimate(ClimateDevice): def set_temperature(self, **kwargs): if kwargs.get(ATTR_TEMPERATURE) is not None: self._target_temperature = kwargs.get(ATTR_TEMPERATURE) if kwargs.get(ATTR_TARGET_TEMP_HIGH) is not None and \ kwargs.get(ATTR_TARGET_TEMP_LOW) is not None: ...
1
9d8cef4a11f8bf1d50c3b91edf84c3ca
cbc57dea19622b41905767fcdec7f449
Test that a task is removed.
public class BacklogItemTest extends ProductCommonTest public void testRemoveTask() { BacklogItem backlogItem = this.backlogItemForTest(this.productForTest()); assertFalse(backlogItem.anyTaskHoursRemaining()); Task task1 = this.taskForTest(backlogItem, 1); Task task2 = this.taskForTest(b...
1
8839f14230982ee8acb55c7965538d0c
91e152348e8f1cb0a58fc19e5a2eaaf6
Compute edit distance per mini-batch.
target_batch_dim = _calculate_target_batch_dim(p1.dim(), p2.dim()) mini_dists2 = [] for i, manifold in enumerate(self.manifolds): point = self.take_submanifold_value(p1, i) point1 = self.take_submanifold_value(p2, i) mini_dist2 = manifold.sqdist(point, point1,...
0
9a550802150d2249ea967aef4fba3d0a
51b86c2db220fd27e4230e6ce5562ed3
Convert the given input to a vector if possible, otherwise raise a `VectorCastError`. The following types can be converted to a vector: - `Vector` (in which case the input will be returned unchanged). - Iterable with exactly two elements. - Object with *x* and *y* attributes.
def a2(v): try: a = np.array([v[0], v[1]]) except TypeError: a = np.array([v.X, v.Y]) return a
0
a60d804540264b71734cde036b0cb32d
db1ec6f36cf980b2b795c5901f1c7bf9
根据优惠券折扣规则Id,商品的总价计算出优惠的金额
BigDecimal discountAmount(T couponInfo,BigDecimal skuPrice);
1
a00571a4adf0c89623d5adfb19bf8b75
810e9481885727cad5abf0c707ce784f
! Wiggles the fingers. @see sweep()
close_target = self.get_property(FINGER1, CT) self.set_property(FINGER1, DP, close_target) close_target = self.get_property(FINGER2, CT) self.set_property(FINGER2, DP, close_target) close_target = self.get_property(FINGER3, CT) self.set_property(FINGER3, DP, close_target) close_target = self.get_property(...
0
30e0ca451dec14ad607247a8e6728623
ba31afb1594a295934084ca49ea126f5
The method applies a sequence of moves to the given cars' layout on the parking and returns the resulting layout.
public abstract class GameLogic public final GameLogic play(MoveCommand command) throws InvalidParameterException { return play(game.getGameCache(), game.getBoard(), command, true, true); }
0
1098f83278759c27073413ade6745316
7ce3a26c8056f6b89fd2fc03be4ec736
Add filters to maxes EditText
filtGr = 0; filtBl = 0; filtPu = 0; if (chckbxAll.isSelected()) { filtGr = maxGr; filtBl = maxBl; filtPu = maxPu; } else { if (chckbxGreen.isSelected()) { filtGr = maxGr; } if (chckbxBlue.isSelected()) { filtBl = maxBl; } if (chckbxPurple.isSelected()) { filtPu = maxPu; ...
0
d538a0a2043e16ef54dc02a93ad6615c
982e6906d6ec28cbb0a1b0bfb03bcd70
:summary:结束事务
if isend == 1: self.end('commit') else: self.end('rollback') print('close') self._cursor.close() self._conn.close()
1
5ac6740b515715e5efa384e9cd6941b2
b2efbf6e59375b911aa1422ac5259ccf
combine segmented values to the recent rfm data frame. After concatenation; client frequency recency monetary recency_segment frequency_segment monetary_segment 6115 u_174194 0.0 1663 32.8500 2 2 3 10060 u_220840 1.0 342 22.4700 4 2 4
def join_rfm(x): return str(x['R']) + str(x['F']) + str(x['M'])
1
2d0e61673b8bbd881e22947174380f37
1c60ca5e7001ddc5e6082abab3500399
RegisterController의 생성자 입니다.
class Application public function __construct(Register $register) { $this->register = $register; $this->setControllerName(); }
0
af3abc6095a0cf167d259bb76f9ebfed
1ad89638e6bee4c32f3c2b98eb1f5608
键值对post发送
public class HttpUtilText @Test public void sendPost(){ String s=HttpUtil.sendGet("http://localhost:6144/Home/RequestString", "key=123&v=456"); System.out.println(s); }
0
5528bc77fd302ff3dfb4b7c11d9c384a
7e02d69dff7f7cc8cda97ffa2f404f93
Test exporting PCL files.
class PollingTests(unittest.TestCase): def test_export_command(self): return app = App() app.controller.polling = PollingType.INVENTORY app.controller.handle_input(app.model, (1920, 1080), []) self.assertTrue(os.path.isfile('list.txt'))
0
bae75aadc8e2e860578be185d0d730bd
c0756cd163bc2c3853a4924a370b8652
Removes old properties from FeedEntryRecord instances.
{ $ignoredAttributes = array( "id", "image_link", "content_language", "target_country", "expiration_date", "adult" ); $contentAttributes = $entry->getContentAttributes(); foreach ($contentAttributes as $contentAt...
1
b58ed4c4a2eafa995c601c4e1d9a0f5d
e2b89e92c1289f4832a52540f415969a
This method is executed to display a homework viewer that will be add to this container.
{ $section_list = DB::select("SELECT section FROM course_section WHERE course_id = ?",[$course_id]); $filetype_list = DB::select("SELECT id,extension FROM homework_types"); return view('teacherhomework.createhomework2',['course_id'=>$course_id,'section_list'=>$section_list,'filetype_list'=>$fil...
0
c4975794cf44ab85c8c121e6bcbc6627
aaf2e49fa80d6cafc3a1e2ff6d3935e0
input: get_correlation의 return (상관관계 dictionary) output: dictionary를 직관적으로 출력함
def cor(df): print(df.corr()) cor = df.corr() sns.heatmap(cor,annot=True)
0
83d47b2a7bf6e28fbd29e7e5598945c5
e6062ff61da83fbcbeebf38a3fc29eda
Умножение по модулю
ll mul(ll a, ll b, ll mod) { a %= mod; b %= mod; ll res = 0; while (b > 0) { if (b & 1) { res = (res + a); if (res >= mod) res -= mod; } a = (a + a); if (a >= mod) a -= mod; b >>= 1; } return res; }
1
698d0cff70fa21ec9a85b05a4bfaf6df
adabc42bf3bd05dd43177a0db5a4714c
四舍五入小数位 保留运行时位数(默认9位)
public class BigDecimalUtil public static String numericRetentionDecimals(double dble,int rdp) { NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(rdp); nf.setRoundingMode(RoundingMode.HALF_UP); return nf.format(dble); }
1
d45e745f7afb49d80a16caa21174a0a6
a918279909b72acc7e971ccf66479ad8
Converts number english to bangla
public final class ToBN private char numberConverter(final char enNumber) { switch (enNumber) { case '1': return '১'; case '2': return '২'; case '3': return '৩'; case '4': return '৪'; case...
1
b8482581726616a8dcff9118a554b406
6a39a0c5a5ff06954a4f299f7a3175af
最大アドレスの取得(インターフェイス)
uint8_t ads_hal_get_address(void) { return _address; }
0
203fa7cee65b7b3d27ba89bab6e84ea8
324c74e4a9be215411fd74c5677c2051
Sends a decline attending request notification to the user.
public class ClientInternalMgImpl extends UnicastRemoteObject implements ClientInternalMgInterface @Override public void notifyRejection(String username) throws RemoteException { Platform.runLater(() -> { controller.deleteSentRequest(username); }); }
0
f8fa3f23e76b244f749b64ffde425ccc
05c309cc21ead6f464921d52325bc304
Synchronizes product fields with its translations
{ if(empty($original_post_id)) return; $original_active_state = get_field('is_active', $original_post_id); if(empty($translated_post_id)) $translated_post_id = self::getEnglishDuplicate($original_post_id); if(empty($translated_post_id)) return; $translated_active_state = get_field('is_active',...
1
e2b72a8fbcaa73877c9665b970736819
f1c0428b1e0b6e5179ba552b5dc2f95e
"Disconnect" from the Redis server (i.e. free the Redis context)
public fun disconnectFromRoom()
0
deb80201bd49ea0bc21bfe374b4f236f
8cb3f96ade1f1b5d7b8294505f4ad612
Bottom-down merge sort
public class MergeSort private void bottomUpSort(int[] a) { int n = a.length; for(int size = 1; size < n; size *= 2) { for(int i = 0; i + size < n; i += size + size) { merge(a, i, i + size - 1, Math.min(i + size + size - 1, n - 1)); } } }
1
205f463fc4a8e7f633ad7e05eb2891f3
e78b8a5332559013fe252c791a75d1e1
Checks the repeat and shuffle button states to determine which track should be loads as a previous one.
{ var status = this.TrackSelector.GeneratePlayListStatus; if (status != lblStatus.Text && status != "") lblStatus.Text = this.TrackSelector.GeneratePlayListStatus; }
0
910a8ea6fe340c9d35bfd21b546cb307
88db492e0d7355e572f82ca4d0c1a0c4
Convert audio buffer with arbitrary number of channels to stereo.
if self._audio_fp is None: raise AudioError nc = self.get_nchannels() sw = self.get_sampwidth() self.seek(0) data = self.read_frames(self.get_nframes()) if nc == 0: raise AudioDataError for index in range(nc): frames = b"" ...
0
b0e16050cd86ca1bfec774dfa1bcfbb5
cccea9aa497e2bd3cd23e5bf4e5240b0
Removes our custom events from Dynamo.
{ for (int i = 0; i < eventCodes.Length; i++) { Remove(eventCodes[i], mono); } }
1
f8ecaf827f63528e1f7d8f7eeca7eab1
66fe358731e26ff4bb2ef1cbc578b729
通过询价单id获取其询价产品分页列表
namespace UI.Areas.InOut.Controllers public class QuotePriceController : Controller public ActionResult GetQuotePriceDetailByQPID(string id) { List<QuotePriceDetail> list = QuotePriceDetailBLL.GetAllPageBySDID(1,100,id); List<object> listed = new List<object>(); foreach (QuotePri...
1
16ce8894d9ca2a94c1bba0ea191f1f11
2b34dcef92624a1a7f1bfb68f6f31e91
生成以node为根节点,深度为depth的描述二叉树的字符串
if (Objects.isNull(node)) { sb.append(generateDepthString(depth) + "null\n"); return; } sb.append(generateDepthString(depth) + node.e + "\n"); generateBSTString(node.left, depth + 1, sb); generateBSTString(node.right, depth + 1, sb); }
1
3a184885d0f6e3db66d25334522d45b8
2d35008967f981f17e685ec024453695
Iterative function to return K'th node from the end in a linked list
LinkedListNode * kToLast_Recursive(LinkedListNode *head, int k, int &i) { if (head == nullptr) { i = 0; return nullptr; } LinkedListNode *n = kToLast_Recursive(head->next, k, i); ++i; if (i == k) { return head; } return n; }
0
536aa8df1503de363916a0dab097e86d
4bb28f88ff131d383b91bee0d6b9d7fa
Score function estimator with constant baseline.
theta: float = 3., baseline: float = 0.01): super().__init__() self.theta = torch.nn.Parameter(torch.tensor(theta)) self.register_buffer('baseline', torch.tensor(baseline))
1
acde304401f46562da58c7eae413cbc5
f15fccdfa3a3236019425588fa6458af
计算某年某月有好多天
public class TaoBaoWangDian public static int DaysYear(int year, int month, int day) { if (!suMonth(month)) day *= 2; while (-- month > 0) { switch(month) { case 1: case 8: case 10: case 12: da...
0
d86ea01584954d9e3bc760d9c8e66547
3d1474ba135814afb6a18771819ad7ea
Print the values of the caches that were stored during the process
void printCache();
1
781443f3304f7ed814d07698cde0459d
c949adc3db1718dda40c0860723a433a
Gets the sicd structure collection. Returns
class Structure(SiteCollection, MSONable): def sites(self): return self._sites
0
7472bbef686626f8a9c1eac9ac8f2f8b
e131503f5b1986c8cb18031de61b063b
Mark that a specific cluster is always rejected in the given endpoint
@Metadata(label = "eip,routing") @XmlRootElement(name = "toD") @XmlAccessorType(XmlAccessType.FIELD) public class ToDynamicDefinition extends NoOutputDefinition<ToDynamicDefinition> public ToDynamicDefinition ignoreInvalidEndpoint(String ignoreInvalidEndpoint) { setIgnoreInvalidEndpoint(ignoreInvalidEndpoint); ...
0
ef03e9912f2669752547a53bbcbd3a3d
ea10290263ae0c152fa265e7c6ccaed2
Set selected tasks.
const selectedTasks = this.state.selectedTasks; selectedTasks.push(task); this.setState({ selectedTasks: selectedTasks }); }
1
a472c0f4e8fe57ae335e834a32e5af28
97dcb3e66dcbaacf385d0c5badb1cc86
If a player is on a square that is not 0, display them
public class SudokuGrid : MonoBehaviour public static void TurnOnAssist() { for (int i = 0; i < gridSquares.Count; i++) { int row = i / 9; int col = i % 9; int thisNum = gridSquares[i].GetComponent<GridSquare>().num; if (thisNum != SudokuData.filledMat...
0
bcab6e3a2edae25bbdaefc436b71a117
8229183c33e01b123afbef08aea8b03e
Return the value associated with the column: PHOTOINSTR
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DoctorcertifyphotoRecord extends UpdatableRecordImpl<DoctorcertifyphotoRecord> implements Record4<Integer, Integer, String, String...
0
b28aee63c8903a6954b6cbd90857e73f
4c4a9277686f36755fa068cb5462323e
Generalization of Euclid GCD Algorithm for univariate polynomials en.wikipedia.org/wiki/Polynomial_greatest_common_divisor https://en.wikipedia.org/wiki/Euclidean_division_of_polynomials https://en.wikipedia.org/wiki/Polynomial_long_division
if not isinstance(f, Poly): f = Poly(f, *symbols) elif symbols: raise SymbolsError("Redundant symbols were given") f, g = f.unify_with(g) if f.is_multivariate: raise MultivariatePolyError(f) symbols, flags = f.symbols, f.flags n, m = f.degree, g.degree if n < m: ...
1
fed9f98e9e2d6a406d4ab343d583edb2
75c8c2a2aa05b63e88cc32df0e1a0a81
Rotate to face drill towards waypoint
{ Vector3 reletiveVector = transform.InverseTransformPoint(waypoints[currentWaypoint].position); float newSteer = (reletiveVector.x / reletiveVector.magnitude) * maxSteerAngle; FL.steerAngle = newSteer; FR.steerAngle = newSteer; }
1
61a1c2f90b17553098768a998c63bebc
147d5a7244898dfd648418d6c1202d7f
初始化发货日设置
function initSelectedDeliveryAndPickUpOrderDate(){ var date = $.cookie("orderSelectDate"); $("#orderTime-day").find("option").each(function(){ if($(this).val() == date){ $(this).attr("selected","selected"); getOrderDayTime(date,$("#orderType").val(),"orderTime-hourAndMinutes"); initSelectedDeliveryAn...
1
36ab6e2ae739494d14903b565ea0db1b
fbbab66d3913aa41328e23cdc3ec3258
initialise some state, and then recursively emit blocks until we come to a branch that we can't resolve statically
llvm::DenseMap<SILBasicBlock *, BBState> bbToStateMap; SmallVector<SILBasicBlock *, 16> worklist; auto *entryBB = fun.getEntryBlock(); bbToStateMap.try_emplace(entryBB, BBState::getInitialState()); worklist.push_back(entryBB); Optional<YieldError> returnBeforeYieldError = None; while (!workl...
1
60c29b2bfb2c5f0f8a468b07d45585b8
aadbba69d9662aec78a0cb80d7a5e0e1
méthode pour décrire la piscine de luxe
public class StrawberriesAndCreamFrappuccino extends Frappuccino @Override public String description() { return "Strawberries and Cream"; }
0
e9554a2a3c1248629524b481e69ef3f5
ccfb11d32446409f6f441add0fe3a049
设置创建房间的缓存
key := "ap" + roomCode value, err := json.Marshal(aps) if err != nil { util.Error("ERROR:%v", err.Error()) return err } _, err = conn.Do("SET", key, value) if err != nil { util.Error("ERROR:%v", err.Error()) return err } _, err = conn.Do("EXPIRE", key, config.GetConfig().RedisExp) if err != nil { uti...
1
50239b449f1892cc0f8b26c98a7731b8
4163fd51e648cfd77805db6e187357e0
Genera una copia de la lista de precios indicada
class Product extends CommonObject function clone_price($fromId, $toId) { $this->db->begin(); $sql = "INSERT ".MAIN_DB_PREFIX."product_price ("; $sql.= " fk_product, date_price, price, tva_tx, localtax1_tx, localtax2_tx, fk_user_author, tosell)"; $sql.= " SELECT ".$toId . ", date_price, price, tva_tx, localtax...
1
502bb949085c7ccb86ab2b276c2fb7c4
12dfc5df8c0935f524b75653266605be
Test attribute "token_endpoint_auth_methods_supported"
os.environ["JWT_KEY"] = test_private_key params = generate_token_endpoint_parameters("test_code") assert "client_assertion" in params assert "client_assertion_type" in params assert "code=test_code" in params assert "grant_type=authorization_code" in params
0
472b7d28fa6f7d04cf7042754950b14c
8af14ac4372b994b2b830f9800b0117f
Add an item to a combobox control
namespace WaywardGamers.KParser.Plugin public static class PluginExtensions public static void CBSelectItem(this ToolStripComboBox combo, string name) { if (combo.ComboBox.InvokeRequired) { Action<ToolStripComboBox, string> thisFunc = CBSelectItem; com...
0
66677568c4b0e482926fb2307bb202c9
1ee9ba2659c20854cfc12cf1d7ffdff5
Entityのx/yの設定とmodifiedを行う
{ Vector2 modifiedPosition = GetXY(obj) + modifier; SetPosition(obj, modifiedPosition); }
1
d25491af56d278e4483714afa86d9afc
90831d35605272ef1ff54e1aded149cb
Called when a (high-level) /ospf/area or /ospf/area/interface is modified
try : self._ospfarea = ospfarea except Exception as e: raise e
0
799c3a4816be8074a348863e586bd087
d5d1fd3f66a5ff0778879065a13036b4
Checks all possible sources of payments/free trials etc. (currently either Stripe or free-access), and sets the latest date as the subscription_paid_until date.
async function updatePremiumSubscription({userId, session}: { userId: string session: Stripe.Checkout.Session }) { const {stripeSubscriptionId} = await premiumDatalayer.getStripePremiumRow(userId) const stripeIntentId = getStripeId(session.setup_intent) const {card, stripePaymentMethodId} = await stripeLi...
0
760791cfc5acf137d17f92ec7be64ce7
f3bbe5dd06386934fb0a02bb036273ef
添加多个合同
{ bool info = false, file = false; using (Entities db = new Entities()) { yh_contracts yhmodel = new yh_contracts(); yhmodel.contractid = model.contractid; yhmodel.contractname = model.contractname; yhmodel.patro...
0
0f75c0b52da835c4621227d92a1fad82
1f9cd0048a9518dcc7ad9fe2de2d1df5
Checks if the game object is in the cameras' view Code adapted from https://xoppa.github.io/blog/3d-frustum-culling-with-libgdx
public class CameraComponent extends Component implements Camera @Override public boolean isInsideFrustum(@NotNull Vector3f aabbMin, @NotNull Vector3f aabbMax) { if (aabbMin == null || aabbMax == null) { throw new NullPointerException(); } if (Settings.isFrustumCulling() && getGa...
1
132c3be68906146d2849d3e6a79a9a7f
30dece168b1e30ef75293ba9639cb6fa
method that allows individuals ages to increase incrementally
{ foreach (var person in _People) { person.Age++; } return _People; }
1
e413cf64a29ca494e9fd7edba3502352
76b28e35f0aba0242474f0e228aa0ac6
Create a normal based on the given vertex position, assuming that it is a point in space, relative to the given point. This will create a normal that points directly along the vector from the given point to the coordinate.
int p, float[][] origin, int originOffset, float[][] normals, int offset) { float x = coords[p][0] - origin[originOffset][0]; ...
1
a9b0313557331969315fcbfa69fedbfd
3484f4ea7fc560e5940b99b51f34187a
Increment the value of an xattr (assuming it is an integer). BEWARE, this code *does* have a RACE CONDITION, since the read/update/write sequence is not atomic. Since the use-case for this function is collecting stats--not critical-- the benefits of simple, lock-free code out-weighs the possibility of an occasional hit...
{ locked_read_modify_write_operation_persistent_fence(); let result = self.fetch_or_(increment, SeqCst); locked_read_modify_write_operation_persistent_fence(); result }
1
33de133aa01ef6cee31c143fb3a2931b
0fb7ea95d4fbe0eb1cfbf59199e4e078
Returns the vector part of the quaternion.
{ float[] res = new float[] { q[0], -q[1], -q[2], -q[3] }; float m = QuatUtils.Magnitude(q); return new float[] { res[0] / m, res[1] / m, res[2] / m, res[3] / m }; }
0
ec6c48f755e6c0b2aef6cf8040d75a9d
b1d34b2f164b6936d85df16ab88d9c23
Initializes an interface to IpCam from a IpCam object
class ScreenipFunctions(object): def __init__(self): super(ScreenipFunctions, self).__init__()
0
c4872536f3fa31c1fc3c95f9653a4463
26e91b7add7ff0a5c6529a0f14885abd
Authorization requests that request access to non-existent Scopes should fail.
class ImplicitServerTest extends ServerTestCase public function testFailedTokenIssueDueInvalidScope() { $client = $this->createClient(); $client->setRedirectionUris([static::REDIRECT_URI_1]); $server = new SampleServer($this->createRepositoryMock($client)); $state = '123'; $...
1
7beec6f62ccf192943cf2fa616132770
2835ba5b2baac036047c0337e223ed9a
将数据流图导出为中间代码
function getFlowContent() { var codec = new mxCodec(); var node = codec.encode(mxEditor.graph.getModel()); var xml = mxUtils.getXml(node); xml = $.utils.parseXML(xml,'mxGraphModel root Start'); xml = $.utils.parseXML(xml,'mxGraphModel root Robot'); xml = $.utils.parseXML(xml,'mxGraphModel root End'); return xml;...
1
40b7cd8be42cce53453be014ae86b874
a9751df9324c4c696939687ba9fa02d8
设置遮罩的显示范围
export default class Sprite extends DisplayObjectContainer set maskRect(value) { if(value) { this._rect=new Rectangle(value.x,value.y,value.width,value.height); this.setSize(this._rect.width,this._rect.height); } else this._rect=value; }
1