query_id
string
corpus_id
string
query
string
code
string
label
int64
3d30dac73730d05b359f2a30bf8c238e
5ca4773bb447d2d763aea5630ed717eb
Funktionen tar reda på vad som ska göras, är användaren inloggad, har den kakor, ska den loggas in och utför dessa...
$time = $this->loadCookieTime(); $user = $this->loginrepository->getUserByUsername($clientUsername); if($clientPassword === $user[self::$password] and $time > time()){ $_SESSION[$this->sessionUserAgent] = $userAgent; $_SESSION[$this->sessionLoginData] = $clientUsername; return true; } else{ thro...
1
b7fa4cb4b0244a6ef518547dcd2577f1
b3c416ad80f0e57675798c41b24bda76
Checking whether the given customer is in the given room.
class DeleteRoomTestCase(unittest.HomeserverTestCase): def _is_member(self, room_id: str, user_id: str) -> None: users_in_room = self.get_success(self.store.get_users_in_room(room_id)) self.assertIn(user_id, users_in_room)
1
03f164a8c2535bb8eda7cb79be0d7832
62f86e0a910338d1e9b80d9ac66439e8
<p> Computes the Moore-Penrose pseudo-inverse </p>
public class SingularValueDecomposition implements Cloneable, Serializable public Matrix getPseudoInverse(double tol) { Matrix UT = U.transpose(); Matrix.diagMult(DenseVector.toDenseVec(getInverseSingularValues(tol)), UT); return V.multiply(UT); }
1
dba91382d44723ec7ba3ed295ff18d75
e5203d85731c7edf269b41b0fb7c7bb7
カードブランドをセットする
public class ShopBindSearchDomain public void setBumon(String bumon) { this.bumon = bumon; }
0
fd8453fab33337d6a713affccc5d2157
c03316734ef5a3763ca9abfafb7cb236
Unsets settled at field.
namespace Square.Models public class V1Tender public class Builder public void UnsetSettledAt() { this.shouldSerialize["settled_at"] = false; }
1
fce2d25dc86e15e197adf3eb91e5fe0e
8014d15dbdaed4ff96beb2384f0ac5da
检测用户名密码是否都不为空
class LoginWindow(QWidget): def nonEmpty(self): print('登录失败!',System.func_name()) System.dialog(self,'错误', "用户名 / 密码不能为空!")
1
5958868b4941ba1c8bc406b7d597e2b6
393c8289d9514ab0beccb431ff93f7fb
Returns a lvec2 from component-wise application of Min (Math.Min(lhs, rhs)).
namespace Utils.UnityImplementation public static UEIVector3 Min(UEIVector3 lhs, UEIVector3 rhs) { return new UEIVector3(Math.Min(lhs.X, rhs.X), Math.Min(lhs.Y, rhs.Y), Math.Min(lhs.Z, rhs.Z)); }
0
6f8913617ff8875e881932e8e9257869
62562f316f8d7fc490e27a40f49cfabf
NewCollector creates new Prometheus collector
exporter := &MongodbCollector{ Opts: opts, scrapesTotal: prometheus.NewCounter(prometheus.CounterOpts{ Namespace: namespace, Subsystem: "exporter", Name: "scrapes_total", Help: "Total number of times MongoDB was scraped for metrics.", }), scrapeErrorsTotal: prometheus.NewCounter(prometheu...
1
7a6922ffee952ea6f090287d2098622a
140e3c60723b37200c0aa10610ce50dd
Given a grid of 2-vectors and a grid of magnitudes, scale the vectors to have those magnitudes.
class Transformation(analysis.Analysis): def scale(self, headers, magnitudes): newDict = self.data.get_mappings() scale = self.scale_matrix(headers, magnitudes) newData = scale @ self.get_data_homogeneous().transpose() self.data = data.Data(headers = headers, data = newData.transpose()[:...
1
54f287e2f995755740c544dfcace4d95
d3ebe74e0f5ccc3f58a79f61ade57f65
根据查询条件sqlWhere获取分页后IC卡表信息列表
{ StringBuilder strSql = new StringBuilder(); strSql.Append("select id,wid,tName,beginDate,endDate,typeId,usedContent,usedTimes,userDegree,userType,consumeMoney,sId,dyMoney,createDate,sort_id "); strSql.Append(" FROM wx_ucard_ticket "); if (strWhere.Trim() != "") ...
0
dfce928788fe570665c7a1fca6a4484e
18fc1ba917407fbe0a511b951707e087
Tells to the pipeline if the standard error must be redirected in the output (true) or must go on stderr (false): default is false.
public class StreamingCommand implements Serializable, Cloneable public boolean getPersistStderr() { return persistStderr; }
1
5d0ae3c4af073c18ad1fd5665b991a0b
9ea59317ee41fde5697f4cf6cb853d5d
Get anchorOk
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) @WebResult(name = "getAnchorResponse", targetNamespace = "http://nhind.org/config", partName = "parameters") @WebMethod(operationName = "getAnchor", action = "urn:GetAnchor") GetAnchorResponse getAnchor( @WebParam(partName = "paramet...
0
07997c1c617cabda65d25f6202b7eaaa
daa8c6da13624d76db109357d275197f
递归(recurse)遍历所有操作一次,并将所有的操作 ID 以‘,’拼接
export class IDO toIDS(ido) { ido = ido || this.ido; let recursiveParse = (node) => { return node.idc + (node.dc).map( (subNode) => { if (typeof(subNode) == 'string') return subNode; else if (subNode.dc !== undefined) re...
0
9becab6846bb8fceb07ab489d0825581
8f24a6b1065382bd2b482cbf25f13537
Descriptor allocations are only valid for the serial they were created for and are re-allocated every submit. For this reason, we view any descriptors allocated prior to the pending submit as invalid. We must also verify the descriptor heap has not switched (because a larger descriptor heap was needed).
static_always_inline u32 memif_desc_is_invalid (memif_if_t * mif, memif_desc_t * d, u32 buffer_length) { u32 rv; u16 valid_flags = MEMIF_DESC_FLAG_NEXT; rv = d->flags & (~valid_flags); rv |= sat_sub (d->region + 1, vec_len (mif->regions)); rv |= sat_sub (d->length, buffer_length); rv |= sat_sub (d->offset +...
0
280a3ced76e2ba5c500d2700805c5065
c8f200d7782ed4c09f91c27c087b0665
get a RooAddPdf of a series of Legendres with these coefficients
class Bose: def Lzmake( self , order = 2. ): if order == 2: a = [ 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0 ] denom = 2. a /= denom elif order == 5: a = [ 0, 0, 0, 0, 1, -8, 0, 8, -1, 0, 0, 0, 0 ] denom = 12. a /= denom elif order == 7: a = [ 0, 0, ...
0
e33470f4f9963b9da5f92f2eabd565f2
eadefdfba6ff9059f8483ac69898538b
Функция находит описание в карточке записывает данные в корзину
event.target.disabled = true; let cartData = cart.getCartData() || {}; let parentBox = event.target.parentNode; let itemId = event.target.getAttribute("data-id"); let itemTitle = parentBox.querySelector(title).innerHTML; let itemPrice = parentBox.querySelector(price).inne...
1
9c7f4deafc835d8084b2d90a51646add
f9ec7ec1f4757c839abada01ef065096
Pend the subscriptions
void SubscribePersistThread::persist() { { OsLock mutex(mLock); mIsTimerRunning = false; } getSubscribeServerThread()->persist(); }
0
943d541892b8203db4bf48523b4fb72f
c721b6d651901b9e151af92d8c3e2982
Sets the value of strUser.
public class UserSelectDTO{ public void setUser(String user){ this.user = user; }
0
13b28e5e29cc2d676267ef2ce517b232
df042668777d33f9cada89703aede110
Return non-zero if the keyboard state has changed since the last call.
{ HRESULT hr; memcpy(m_chPrevKeyboardState, m_chKeyboardState, sizeof(m_chPrevKeyboardState)); hr = m_pKeyboard->GetDeviceState(sizeof(m_chKeyboardState), (LPVOID)&m_chKeyboardState); if(FAILED(hr)) { if((hr == DIERR_INPUTLOST) || (hr == DIERR_NOTACQUIRED)) m_pKeyboard->Acquire(); return false; } return t...
0
2a9c9f1f25bcae56c7bb107d34d0432d
4c45bb4b289dad333eea296681a050d8
Returns true if `Type` key is found and sets the value.
{ CheckKey(key); object p = _type; object o = _obj; if (p != null) { if (object.Equals(p, key)) { value = o; return true; } else if (object.Referenc...
1
8459aee1b8a6a6b0306617fb6e05a22e
0783fe10633b650f36a1827dfd2af86a
Logs the net-message with some additional text as prefix
namespace BlueEngine public class cNetConnector : cEntity public override void Log( params object[] values ) { cLog.Log( Thread.CurrentThread.ManagedThreadId.ToString("d05") + "|" + Name + " > " + new System.Diagnostics.StackTrace(true).GetFrame(1).GetMethod().Name + "(" + cObject.ValueToString(...
1
41962192997969bf6ddde37823a32162
427852e1bc2248615d769a90525badef
既にDynamoDBに同じコースのレコードが存在した場合は新たに保存しない
Map<String, AttributeValue> eav = new HashMap<String, AttributeValue>(); eav.put(":val2", new AttributeValue().withS(courseId)); DynamoDBScanExpression scanExpression = new DynamoDBScanExpression() .withFilterExpression("courseId = :val2").withExpressionAttributeValues(eav); List<Course> scanResult = mapper...
1
23b746240007f47689e5f8c55d210e27
7d1967cdb8ac57c6483190695c77e9b0
Handler for removing display errors
function dismissError(errorIndex) { delete STATE.errors[errorIndex]; renderErrors(STATE.errors); }
1
714f4a81f9c4f2a545a4adf74c25a89c
2590fc1847abef4ba76126d8bb431020
用于保存修改后的利率配置
* savePrice(params, {select, put, call}){ const store = yield select(state => state); const thisState = store.M01328025A030LP00301; let priceId = thisState.routeParams.priceId; let submitData = priceSetLogic.savePrice(_.cloneDeep(thisState)); let paramdata = { rateId: priceId, ...
1
a46c6efc394c8376dc5a0b24a940adb4
5b98df7db88a3591a543c0c22c9687f4
Control - Check permission event handler.
{ if (this.ActiveMdiChild == null) { return; } else { CheckPermission(ActiveMdiChild.Name); } }
1
210b6a7481dca07f8b3f9212d57cc430
7fd6dc7f453c0c0d201e7377d0aa8b13
Basic constructor takes list of ndQuery instances and a domain shape
self.shape_code = shape_code self.color = color self.name = name self.domain = domain self.dimension = dimension
0
312e8b90666860fb2864430fba8d9368
7afacd9d94f91fff0116abd2cf362d80
Gets rsa key 4 client.
{ var contentBytes = new List<byte>(); contentBytes.AddRange(Version); contentBytes.AddRange(TLVFormat(0x02, rsaParameters.Modulus)); contentBytes.AddRange(TLVFormat(0x02, rsaParameters.Exponent)); contentBytes.AddRange(TLVFormat(0x02, rsaParameters.D)...
1
852e9de2a15fe6f54900fa1ce81267bd
70f6351ec65cd84769b61738a7dc230e
Create folders supplied as a Path If folders already exist, do nothing
class Path: def createFolders(self): if not os.path.exists(self.imgFolder): os.makedirs(self.imgFolder) if not os.path.exists(self.xformFolder): os.makedirs(self.xformFolder) if not os.path.exists(self.txtFolder): os.makedirs(self.txtFolder) if not os....
1
040d8197710b7102455e6da076794201
ec3b630cb36e1d2f40958f9e64841db6
Check if the message should be escaped
public function isEscaping();
1
327fd1124563e6a664f4255087c0387f
ba0116a8f5a5317654b15efb321fa64d
Send command to move the vehicle to a specific global position. The latitude and longitude are given in degrees (WGS84 frame) and the altitude in meters AMSL (above mean sea level).
def mav_cmd_spatial_user_5(latitude, longitude, altitude): cmd = Command( 0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_SPATIAL_USER_5, 0, 0, 0, 0, 0, 0, latitude, longitude, altitude) return cmd
1
5fececca95294f06af4455bc43a62277
4686d49e406b0a108443be7606ca7f49
Loads endscreen if all waves are done or fighter is out of lives.
if (aliens.length == 0){ loadGameOver("YOU WON!"); } else if (craft.isDead){ loadGameOver("YOU LOSE!"); } }
1
0392db20633039f164b11187243d19de
486adf9c14b4a875a2f008aae1778fc8
code to display selected PSO. CHECKED
{ if (selected_psm == null) return; string AC = selected_psm.AC; ObservableCollection<PSM> psms_tmp = new ObservableCollection<PSM>(); for (int i = 0; i < this.psms.Count; ++i) { if (psms[i].AC.Contains(AC)) ...
0
819b00d06337d3b8e0af577bfd54a86e
0c2bcb3db6651c49d486e86fd1a2f81d
ListCommand lists all extensions
class ListCommand extends AbstractConfigCommand protected function configure() { $definition = $this->getDefinition(); $definition->setArguments(array()); $definition->setOptions(array()); $this ->setName('config:list') ->setDescription('Lists the registered e...
1
7907a6a13b403be6bce4b0c99a839e0d
399e5190ee5ae36b5d39bf4cdb03ad0b
使用padding方式填充原图为正方形,并resize到目标大小
def padding_resize(img, re_size): size = img.shape h, w = size[0], size[1] scale = max(w, h) / float(re_size) new_w, new_h = int(w/scale), int(h/scale) resize_img = cv2.resize(img, (new_w, new_h)) if new_w % 2 != 0 and new_h % 2 == 0: top, bottom, left, right = (re_size-new_h)/2, (re_siz...
1
b6a2fae95019e2a672ca713818bb7c2a
787296abab907b2cf634216bbd6b55f8
Set Frame capturing interval in seconds. Minimum value: 0.5 seconds.
class EigerDetector(object): def set_frame_time(self, t, timeout=2.0): set_value(self._host, self._port, self._api_v, "detector", "config", "frame_time", t, timeout=timeout)
1
49f5c0301a1849e9e5970523570f188f
1535d4be4e344e9f7a3136adf59fe863
Save a vtk polydata to a supported format file. Save formats can be VTK, VTP, FIB, PLY, STL and XML.
class ReaderBase(object): def saveToVtkFile(self, filename, binary=True): writer = vtk.vtkUnstructuredGridWriter() if binary: writer.SetFileTypeToBinary() writer.SetFileName(filename) writer.SetInputData(self.vtk['grid']) writer.Update()
1
0a692dda07bdb0cec8ff9644f4867a01
6ba114876eab39e8faf1aa0806107558
Visit a parse tree produced by {@link WebIDLParser#enumValueListComma}.
class ModelicaVisitor(ParseTreeVisitor): # Visit a parse tree produced by ModelicaParser#stored_definition. def visitEnum_list(self, ctx): return self.visitChildren(ctx)
0
0a8b3c0f421218ce473bd3cc80e08c8c
4c64c1bbe523e398fbe3c2c37b8f4c6e
Creates a word starting from the Node n and working up to the top. Node n is the last character in the string and the top most node will be the beginning.
CharNode aux = this; PilhaEncadeada pilha = new PilhaEncadeada(); String word = ""; while (!aux.equals(root)) { pilha.push(aux.character); aux = aux.father; } int quantPalavras = pilha.size(); ...
1
a3f9387871e55e9b59935fb4fee441e4
df17107f3c9674333f242915fc9e04d7
Converts QEMU virtual address to Vhost virtual address. This function is used to convert the ring addresses to our address space.
uint32_t pa2va( uint32_t pa ) { return (uint32_t) pa + 0xa0000000; }
0
2e9b23280bc534dc63c3a7ed3e4c9988
cbc7c612620574ec6edc69076e066ea6
Testa api ao tentar modificar uma categoria que não existe
def test_get_wrong_id_category(): assert get('http://localhost:8080/api/categories/9999', headers=apikey).json()[ 'message'] == 'Category 9999 not found'
0
a172e0eba163717ecad3ac011369ea2d
0ec82979a1ad7ec54093c4bdb39ef30f
=========================================================================== Determine if two packets are adjacent in sequence number space. Adjacent implies that the two packets could be combined, which does not work for certain combinations of RLP framing flags (EMPA packet stream). ===================================...
const struct in6_addr *a2) { return ((a1->s6_addr32[0] ^ a2->s6_addr32[0]) | (a1->s6_addr32[1] ^ a2->s6_addr32[1]) | (a1->s6_addr32[2] ^ a2->s6_addr32[2]) | (a1->s6_addr32[3] ^ a2->s6_addr32[3])) == 0; }
0
c0d695753302de15dfeb6be94bbbfc97
1034c3857b29e3927af3e4fe9cbd5d8f
判断dataset为Null或为空
namespace DatabaseLib public class Tools : BaseLib.BaseClass public static bool tableIsNull(System.Data.DataSet ds) { if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) { return false; } return true; }
1
8f84b897100113ff09bf064b12fe1701
1602761306da1d47e4b4d2cddb1842cc
gets the squared norm of weights
def _l2(weights): return 0.5*np.dot(weights, weights)
1
cdefa63a57d1cf0b5d4af3df7c8418d3
bbd938ede10ff039fe1433c1aec86556
Traitement de la réponse de la demande de connexion.
open class LoginActivity : AppCompatActivity() private fun handleResponseAfterSignIn(requestCode: Int, resultCode: Int, data: Intent) { val response = IdpResponse.fromResultIntent(data) if (requestCode == RC_SIGN_IN) { if (resultCode == RESULT_OK) { val loginIntent = Intent(...
1
56d7d5d8b47ad0febc018122f6e9a9a7
b8c5cc07ec6482f99bc5b543090d39ca
Tests case related functions. lowercase() uppercase()
public class StringSample private void caseCheck() { String text = "ABCDEFG"; System.out.println(text.toLowerCase()); String text2 = "abcdefg"; System.out.println(text2.toUpperCase()); }
1
c3a55e4b2719e011feda15bc422d8875
ebaf213bbd3945073a0a04d5a77345e0
Összeszoroz két számot
def sestej(a, b): return a + b
0
f263110a7037c2a27f4db1ac5607a366
b9595a6fe77706a775d2e930fe456237
Apply given Xml layout to the lists
class XMLHandler private function processLayoutInformation(&$node, &$document) { $pages = array(); $columns = array(); $lines = array(); $pagecount = 0; $colcount = 0; $linecount = 0; foreach ($node->page as $pagenode) { $page = array(); $p...
1
96134556e1ab5445655780733f8fe7fb
e45d4902ccbc209ff2f37fd4102bbc8c
Выбор пользователем типа адаптера в comboTypeNetAdap
class mywindow(QtWidgets.QMainWindow,Ui_MainWindow): def T1addtype(self): self.lstT1TypeList.addItem(self.cmbT1NetType_2.currentText())
0
11834e4f05f4818a7d12fa2d977415bd
f49bb64e49f0069ab68dffcbd5c359c5
Write default options to the database.
class CoreOptions public static function seedOptions() : void { global $wpdb; $table_name = $wpdb->prefix . self::$table_name; $queries = []; $query_string = "INSERT IGNORE INTO $table_name (name, value, label, description) VALUES (%s, %s, %s, %s);"; $quer...
1
335c71aae6c528dc607ccbdb2ea4aad1
5f107739d384add5013c4797f077f723
GRÁFICO DE BARRAS COM A QUANTIDADE DE ALUNOS POR SITUAÇÃO (SEM MATRICULADOS)
var gap = 1.5; var steps = [0]; var i = 1; while (steps.length <= alunos - 1) { steps = steps.concat(Array(6 * i).fill(6 * i)); i++; } steps.splice(alunos); var radius = []; var angle = []; for (var step in steps) { radius = radius.concat((gap * steps[step]) / 6); angle = angle.conc...
0
52fb31e49b85baf0395560f97b0a1ae7
764bd83ae01e8c34de4588d76b41334f
Returns the value of the '<em><b>Number Columns Spanned</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Number Columns Spanned</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc --> extendedMetaData="kind='attribute' name='number-columns-...
org.apache.xmlbeans.XmlInteger xgetNumColumns();
1
821d5e1a35ac148982f9719f11a0807c
1019bfd55b00bd39f4653b9b7b4eabf4
Create a new item in the cart.
@Injectable({ providedIn: 'root', }) class CartService extends __BaseService cartAddItemResponse(params: CartService.CartAddItemParams): __Observable<__StrictHttpResponse<Cart>> { let __params = this.newParams(); let __headers = new HttpHeaders(); let __body: any = null; __body = params.content; l...
1
d02b61e2240a883452851a18e7874a74
0b8a033e23d18aec3051da169cd7c63a
FUNCTION CPort_GetTxRoomLeft DESCRIPTION get the space available in ring buffer PARAMETERS IN port RETURNS kal_uint16 GLOBALS AFFECTED None
uint16 Hal_UART_RxBufLen( uint8 port ) { (void)port; return HalUARTRxAvailISR(); }
0
075262483f2447202086256a13fdda05
c74f274ef074258a21721502a728917c
Go through the results of a database execute() function and call 'f' on each row.
$fp, callable $lineCallback = null, callable $resultCallback = null, $fname = __METHOD__, callable $inputCallback = null );
0
129782908bec23d764726c596779a2f1
1bb346a58b3aff08fb19cea767b04b32
Radio button is checked by default, to use the default settings
void VideoQualityDialog::reset() { ui->radioButtonLow->setChecked(true); }
1
6deb812c31bdeb4712b56e28a39d3415
2b89fe9bd5c80027a2b1f4683d73d500
The arithmetic operation to use when comparing the specified statistic and threshold.
class GroupMetricRuleEscalationsInfo(dict): def comparison_operator(self) -> Optional[str]: return pulumi.get(self, "comparison_operator")
1
8b0e7c44434047d3bb61a8296ff98a82
d4b7011cd65e0c2bb4a81d3613c58e04
When the player comes into a certain range, the town blob should then say one of the generic dialogue options to the player.
print "You see some smoke in the distance. It looks like there was a fight." choice = None while choice not in ['see', 'move']: choice = raw_input("What would you like to do? 1) SEE what happened 2) MOVE on. ") choice == choice.lower() if choice == 'see': print 'It looks ...
0
ffcf95371d27dc51046a5420f27244c8
1bef9acc3104b0a85bc943c6a45f6f23
Gets a value indicating whether the specified capability name is a known capability name which has a type-safe option.
match unsafe { ncurses::tigetflag(str_to_cstring_as_slice!(capname)) } { -1 => Err(NCurseswError::InvalidCapability), 0 => Ok(false), _ => Ok(true) } }
1
e2083c7410387b0694edd1394015a4aa
5171553824d58a8289479fdb12964815
Generate a sequence from the language model, by running the RNN forward and selecting, at each timestep, a random word from the a word from the emitted probability distribution.
def sample(parameters, char_to_ix, start_char): Waa, Wax, Wya, by, b = parameters['Waa'], parameters['Wax'], parameters['Wya'], parameters['by'], parameters['b'] vocab_size = by.shape[0] n_a = Waa.shape[1] x = np.zeros((vocab_size, 1)) a_prev = np.zeros((n_a, 1)) indices = [] if(start_char !...
1
9b25c5e72d821713cb46c57d1eac21ad
0266f947d23332ea8cbab8d42b010dc5
Empty function - to be redefined in a descendant
class Game_Object: def _draw(self): pass
1
fb121808312814be2e2a99197a743ee4
9fa03dc76d5a978edb7259f0e123c113
予約時に使うメニューやスタッフの情報を取得して遷移するメソッド
if(!$request->schedule_id){ return redirect()->action("SchedulesController@index"); } $schedule = Schedule::findOrFail($request->schedule_id); $movie = $schedule->movie()->first(); $request->session()->put([ 'theater_id' => $request->theater_id, 'schedule' => $sch...
0
368544b25fb9c37434f3bc5461759f1c
138800dc7fb6fc6b66b398ff4cb79a4f
컨텍스트 상실이 발생 시, 컨텍스트를 복구하지 않는 기본 동작을 막아준 것.
function mouseContext(a) { return false; }
0
dceb71895a49781c4bc5a52a683714b4
7f61448ad6da3ef0f9cb03f40c5be655
Same as the constructor. But the more explicit name increases readability and reduces off-by-one errors.
cases like (1)
0
ffb0cdf52fcdd7ea90d75a4a954c07c5
61ee974d4485a05d76a622651bed233f
获取连接的刚体A。
export class MotorJoint extends Joint getAnchorA(): Vec2 { return this.m_bodyA.getPosition(); }
0
a43ceabfb6f984fe7c461067cf28e9d0
8eead8b78862d856c8a11c6bc0630704
suma a doua polinoame prin supraincarcarea lui +
if not len(self.values) == len(self2.values): if len(self.values) > len(self2.values): for i in range(len(self2.values), len(self.values)): self2.values.append(int(0)) else: for i in range(len(self.values), len(self2.values)): ...
1
8de79aac4a0b551ef568532642f8fefd
a16f0d4545a07d60d0f20cd90b14b458
POST: Jogos/Create
public async Task<ActionResult<JogoViewModel>> InserirJogo([FromBody] JogoInputModel jogoInputModel) { try { var jogo = await _jogoService.Inserir(jogoInputModel); return Ok(jogo); } catch (JogoJaCadastradoException ex) ...
1
84d646eb08000e757002b525c03dd072
a1e3d3f1ac9bdfac9d593a6b30967ae4
OS アカウント一覧を取得します。
public class DeviceUtils public static Account[] getAccount(Context context) { AccountManager manager = AccountManager.get(context); return manager.getAccounts(); }
1
1945135ceac451e36d4bfebdb3ef67a4
de4d2769c20b3d96d7517a34699efa73
Reads the contents of the current node, including the node itself.
[return: CastToFalse] public static object ReadContents(PhpResource handle, int maxLength) { return ReadContents(handle, maxLength, -1); }
0
619e9d25c1ae69d24a74492dfb8220db
55c6916f9d7a65151782ce2c2b782bb5
@brief Returns an array of the resonance integral batch averaged values for each tally bin.
namespace MonteCarlo{ Utility::ArrayView<const double> EntityEstimator::getTotalBinDataSecondMoments() const { return Utility::ArrayView<const double>( Utility::getCurrentScores<2>( d_estimator_total_bin_data ), d_estimator_total_bin_data.size() ); }
0
958cdde495a78d4d0cc4c6fcfc6ce197
34177b0f37ebd1927244d0caffc90a6d
recupera el cuestionario activo, si lo tuviere, para el candidato pasado como parametro
class BancoSangreSQL extends ConexionBD function ConsultarCuestionario($request) { $sql = "SELECT cuestionario_id, pregunta "; $sql .= "FROM cuestionario_donante "; $sql .= "WHERE sw_activo='1' AND "; $sql .= " (sexo_id='0' OR "; $sql .= " sexo_id='".$req...
1
d95178428b40eda365b0d6d33cc52075
adff6dce2764c5fcd9d76b54e7e813d9
Coordinates (x,y,z) of all nodes
def coordinates(g, nodes): c = [g.nodes[n]["coordinate"] for n in nodes] return c
1
65d0a932ea6ba3f94e7c379a667e5267
54880c1580bbd07657062d46a4c53603
修改所有代理产品
func UpdateAgentProUrl(urls []ProductAgentUrl) ( err error) { sql := ` UPDATE product_agent_url SET url = ? WHERE id = ? ;` prepare, err := orm.NewOrm().Raw(sql).Prepare() defer prepare.Close() if err != nil { return } for _, url := range urls { _, err := prepare.Exec(utils.OutPutURL + url.Url,url.Id) if er...
1
a1c8c0dc2d6b62243cbf11d728ff087f
c8ceac58122ce473d715cd32f35379a6
删除容器元数据
{ JsonResponseModel<DeleteCosMetaResourceResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DeleteCosMetaResource"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DeleteCosMetaResourceResponse>>(strResp); ...
1
93f43626b4563a10248e0f8b00e42ac2
97c11643f5fcd8139f8b20d9a49466dd
Check if handle event is fired too often
class CookieCutter_FSM: def _cc_fsm_force_event(self): if not hasattr(self, '_cc_force_event_handler'): self._cc_force_event_handler = TimerHandler(120, context=self.context, enabled=False) self._cc_force_event_handler.start()
0
4fdecbb24da7dbb16f85c94fc09543df
6a66478ee541ddfc4c1cd5c8ce7399a7
动态控制运行时部分变量
void f(double val,int val2){ int x=val; char ch=val2; char c3{24}; int buf[10]; for (int i = 0; i < 10; ++i) { cout<<buf[i]<<endl; } int a; int b; int c; int d; static int e; static int f; static int g; static int h; cout<<"a="<<a<<endl; cout<<"b="...
0
6a252ca152a00a427ce504a232bf6515
1ab132709184d12d6c3dfd21d0ed9105
Set the maximum JVM heap size (in MB) for the embedded Solr server.
public final class PutSolrContentStream public final PutSolrContentStream setSolrMaximumConnectionsPerHost( final String solrMaximumConnectionsPerHost) { properties.put(SOLR_MAXIMUM_CONNECTIONS_PER_HOST_PROPERTY, solrMaximumConnectionsPerHost); return this; }
0
436d0521515325e19ce3e4001cf2d5d9
53b49a6fa56debe357dd4ed17fd658d1
描述:进入目录 参数:目录名 返回:无
{ char newwd[MAXPATH]; struct stat st; if (convert(fs, dir, newwd) < 0 || stat(newwd, &st) < 0) { addreply(fs, 530, "无法切换目录到 %s: %s", dir, strerror(errno)); return; } if (!S_ISDIR(st.st_mode)) { addreply(fs, 530, "无此目录"); return; } strcpy(fs->wd, newwd); a...
1
524ee85d74472cfd1f41caa1852687f6
1bcd2a1cb2a31d7c51fda27aa03eb54f
Read only copy of color table
{ if (m_ColorTable.IsNull()) { m_ColorTable.Reset(new CRgbaGradColorTable()); } return m_ColorTable.GetPointer(); }
0
66ed4bdc1dc009721b50f89658173bea
1338494fa502e9f56583e5147c46a613
ソケットを使ってTCPでデータのやり取りをするサーバー
int main() { int sockfd, yes=1; struct sockaddr_in server_addr; if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); exit(1); } memset(&server_addr, 0, sizeof(server_addr)); server_addr.sin_family = AF_INET; server_addr.sin_addr.s_addr = INADDR_ANY; server_addr.sin_port = hton...
1
b260ca1bf0a778987d2db489b59c9a23
dbf805eb464d5910dbce3ab73dd5fb38
Disable/Enable other buttons related to interpreter prompts.
this.prompterIsPaused = !this.prompterIsPaused; if (this.prompterIsPaused) { this.pausePrompter(); } else { this.startPrompter(); } }
0
805c4a8488e6820eddf16b422907ff7f
c81d6d57a33d45080eac74a0f3c53d7c
Sends a _NET_WM_DESKTOP client message.
{ FvwmWindow *t; unsigned long data[1]; for (t = Scr.FvwmRoot.next; t != NULL; t = t->next) { data[0] = (unsigned long) t->Desk; XChangeProperty (dpy, t->w, _XA_WM_DESKTOP, _XA_WM_DESKTOP, 32, PropModeReplace, (unsigned char *) data, 1); } data[0] = (unsigned long) Scr.CurrentDe...
0
8901698047d6547bff1239f6512ebcae
d0e244a6bf81a9a27e3579411616478b
Shader update method to be called once per frame for the combine shader
public class CombineMeshes : MonoBehaviour void Update () { }
0
a4f9f64b738d4a9ef9d2a8450b0ed4e9
9610a36fc0288fcaf2e292fa4b010102
Helper function for calling the UniProt KB service.
if freebase: kwargs['ids'] = '/' + kwargs['ids'].replace('.', '/') service = build('kgsearch', 'v1', developerKey=api_key) return service.entities().search(**kwargs).execute()
0
1000abdba92231d44b2d4b628f1d8edc
65cb9c80cd726f05bd9ab24f14574abe
Serializes InventoryCollection's data storage into Array of Hashes
class ItemMap def to_h end
0
7600bb21c6c0dd1577c38804a792291d
a4bb7c5716e95b2f3445fcb98a43f730
Tests update of log q(f).
const auto select_rows_lqp = PredicateNode::make(greater_than_(a, 5), node_a); const auto lqp = ChangeMetaTableNode::make("dummy", MetaTableChangeType::Update, select_rows_lqp, ProjectionNode::make(expression_vector(a, add_(b, 1), c), select_rows_lqp)); const auto actual_lqp = apply_rule(rul...
1
9c13c6514ff8b8fbfdd3e9a62a094a1d
9402cd396e35268a7b902212473dda8c
11.盛最多的水容器
public class _11ContainerWithMostWater public int maxArea(int[] height) { if (null == height || height.length == 0) { return 0; } int maxVal = Arrays.stream(height).max().getAsInt(); int res = 0; for (; maxVal > 0; --maxVal) { int i = 0, j = height.length ...
1
8ad695e1d5aaf1038e731574b7ffcf66
cddaa9899dcd3c536347c51d224586b3
Wraps requests by setting the current viewing context and fetching the profile associated with that context.
context = super(PageListView, self).get_context_data(**kwargs) context["pages"] = self.get_queryset() context["profile_request"] = get_object_or_404(UserProfile, user=self.request.user)
1
78f46e8e17e7ee37c6ff6f642f3f520e
8a43cd213fe3810f1312f4a1d58f8471
This method returns list of guild objects from internal cache if it exists otherwise makes an API call to do so.
export class Client public fetchGuild(payload: GuildRequest): GuildResponse { return this.fetchAPI<GuildResponse>(this.guildUrl, payload); }
0
5ec0c7d8112c6bdae7aa8227aaca8358
63a5422cf4dee9936ba80ed09152d86a
获取【佣金退款申请】审核进程信息
{ if(empty($processCode)){ return ''; } $extUrlParams = ['reference_no' => $processCode]; $response = $this->request(__FUNCTION__,$extUrlParams); $flag = $response['success'] == 1; if(!$flag){ return ''; } $ret = $response['data...
1
22616de9b41c8f3f319c76f05e5cee11
7e3f23b2f61540c32a60d6804693248f
Update collection and children. The set of children can contain new items, existing items, and item removals. An item removal is recognized by Item.isActive==false.
namespace JLib.Collections.ObjectModel public class ConditionalReadOnlyObservableCollection<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, INotifyCollectionChanged, INotifyPropertyChanged public void Update() { this.Enabl...
1
5f90b110890b7be96875dabc57b9611e
47117980fac9ce8e85edd61f15c116f5
Call OpenWeather's Current Weather API query - a string containing the location to search for fail - the error handling callback function because for some reason jQuery's ajax has different error handling than a standard Promise what appears to be a Promise, but also bypasses Promise rejection unless otherwise specifie...
var httpReq = new XMLHttpRequest(); httpReq.onload = function () { if (httpReq.status == 200 && httpReq.readyState == 4) { console.log("Status OK"); data = JSON.parse(httpReq.responseText); parseCurrentData(); } else { alert("Please enter a...
0
4adac888eade2c0caee8d5bc6a2e078b
3e2e19b217daef9cf123e58afc3613bc
Output If Set Simply checks to see if the variable you pass it is set, if it is it returns you the value, if not, it returns an empty string
function echo_get($var) { if(isset($_GET[$var])) echo $_GET[$var]; else echo $var; }
0
f7307f9f1e7d832b6c4e4fb2d6b36456
a884e410dd4d54fb750a60807ffc9639
Handles a depth image by writing it to the designated folder with timestamp
js = json.loads(snapshot) if data_dir: depth_file_path = get_file_path(snapshot, 'depth', data_dir) else: depth_file_path = get_file_path(snapshot, 'depth') raw_file_path = pathlib.Path(js['depth_image']) data = np.fromfile(raw_file_path, dtype=np.float32) size =js['d_height'], js['d_width'] data_matrix =...
0
9cfc0a6d1ff756e1be74b5649b1e671e
fd9d87a3e52537edeaea85598e3ee2b9
a method to select the database in our case it is a json file in the application directory. If it is not found, the database is an empty hash, and you can create a new one via save()
class Adapter def initialize @db_path = File.join(File.dirname(__FILE__), "data", "italian-rails.db3") end
0
56066c4f01aceac6d7366df5cc340bc3
08d73167c736dfbdbc3c8f7dc38566c1
==================================== Show a unique comment =====================================
class ArticleCommentController extends \BaseController public function show($id) { $comment = ArticleComment::findOrFail($id); return View::make('subview/articleComments') ->with('comment', $comment); }
1
f31a6d2413a0b0b301ba369e5d14cb73
9943bd7cc395064390641e307d77ccbb
Guess the region of a service, based on its endpoint/hostname.
$endpoint = self::ENDPOINT; $regionName = "us-east-1"; if ($endpoint == "agcod-v2-eu.amazon.com" || $endpoint == "agcod-v2-eu-gamma.amazon.com") { $regionName = "eu-west-1"; } else if ($endpoint == "agcod-v2-fe.amazon.com" || $endpoint == "agcod-v2-fe-gamma.amazon.com") { $regionName = "us-west-2"; } ...
1
9cd50db15d3e622fb3181b717c1795c2
8fab1783b94cbe8f89b65ba43164fa34
Generate maze metadata.
class AnsibleRepo(object): def generate_metadata(self): self.roles = self._process_roles(self._layout) self.playbooks = self._process_playbooks(self._layout) self.inventories = self._process_inventory(self._layout)
0
b7cf1dd041ec1a967ec30356b540fe20
d2af6608a26981be9f2c6bca4a8b5b04
采用线程间隔一秒发送数据,防止界面卡死
def send_thread_interval(port,UDPServerSocket): global kill_thread if kill_thread: threading.Timer(interval=1.0,function=send_thread_interval,args=(port,UDPServerSocket)).start() sendBraodcast(port,UDPServerSocket)
1
384ca984fca2f7e27901510c28416164
1d04072bda2935fe66b8400c4642b85d
数组转成html,符合过滤条件的跳过该记录拼接
function Aarrfi($arr,$fg,$html = '') { global $_M; foreach ($arr as $k => $v) { if($html == ''){ $sj .= $v.$fg; } else { $b = str_replace(array("\r\n", "\r", "\n"," "), "", $v); $sj .= $b.$fg; } } $sj = rtrim($sj,$fg); return $sj; }
0
1d914a47b39c252955c44a19111cb785
570486204fe8e135f9ba3bcad8eaae1b
Checks if number constraints are satisfied
bool Sudoku::meetsConstraints(int location, const int num) { for (int i = 0; i < size; i++) { if (board[location / 10] [i] == num) { return false; } if (board[i] [location % 10] == num) { return false; } } int quad1 = 0; if (2 < location / 10 && location / 10 < 6) { quad1 = 3...
1