query_id
string
corpus_id
string
query
string
code
string
label
int64
55e483f6fc1956387897316d15f03030
d12555ca9a67f143592a01d1d96dbc0a
Gets all assignment submissions form an assignment posting
assignment_id: str = None, person_id: str = None): return get_anonymous( 'getStudentAssignmentSubmissions', assignment_id=assignment_id, person_id=person_id)
1
4790dac8281e0a14f5a43daf6a3152e5
e0503be6b068378137a42e256c5816ba
Bounds to label positions for column chart.
boundsToLabelPositionsForBarChart(seriesDataModel, boundsSet, theme) { const makePositionFunction = this._makePositionForBarChart.bind(this); return this.boundsToLabelPositions(seriesDataModel, boundsSet, theme, makePositionFunction); }
1
7d716f323f426ebf70fa6c0ae875d015
e36601abad8ff94a411c3b5343f99941
生成全0矩阵
retlist = [] for i in range(n): innerlist = [] for j in range(n): innerlist.append(0) retlist.append(innerlist) return retlist
1
72ba35c5c0055fe36c1b5ec3d2a0e762
e4ac8140c6ec003c47f934af1577013e
megvizsgálja, hogy tartalmaz-e tiltott karaktereket.
bool tisztaLehet(string stext, int text_size){ int benne=benneVan(stext,text_size); int atlagho=atlagHossz(stext,text_size); if ((atlagho>6) and (atlagho <9) and (benne>0)){ return true; } else return false; }
0
7df09fc0776b774db2432f913def289f
3d5a6e99b5986758502aeec41b566692
创建新窗口并返回Win
{ IOSWindow oSWindow = null; newOSWindow(ref oSWindow); return oSWindow; }
0
17f11d3ac6b8ec647c32c569dc2649ff
583175af6e1b38f5eaa44ad2224ed05d
Changes buttons interactability based on money
public class ObjectPanelController : MonoBehaviour void UpdateButtons(){ if (LevelController.instance.selectedObject == null || !LevelController.instance.IsPaused) { foreach (Button button in allButtons) { button.interactable = false; } } else { foreach (Button button in allButtons) { button.intera...
1
2e66baef2abe29a0e908fcebda3bbb3b
250b8a5cea25ee16671a29e90471b00a
The ignore behavior to use for ``exclude`` patterns. :default: IgnoreMode.GLOB
Builder<T> ignoreMode(IgnoreMode ignoreMode);
1
64288b52f64d5b8127fe7eb96c68e9e6
c76fe638b52a2d03249f8429a8762b3d
Turns an HTTP response object, with JSON in the body, into an array
class TestCase extends Laravel\Lumen\Testing\TestCase protected function convertJsonResponseToArray($request) { return json_decode($request->response->getContent(), true); }
1
ada08a1c52f7baf35b9c77c742557e2d
57eab9b59672e6fda6370b97ac531342
Create or update multiple marketing events
{ return $this->oModel->updateOrCreate( [ 'event_id' => $aEventsData['event_id'] ], $aEventsData ); }
0
4a35472499c11b1bcfb5a5254adf4fe6
4677da258b7812884ef411be60173455
Gets CategorisationObjects that match the parameters in the ref @object. If the ref @object is null or has no attributes set, then this will be interpreted as a search for all CodelistObjects
{ if(UseTransaction()) { GetByCategoryObjectID(this.transactionManager, CategoryObjectID, 0, int.MaxValue, ds, tableName); } else { GetByCategoryObjectID(this.connectionString, CategoryObjectID, 0, int.MaxValue, ds, tableName); } }
0
0f289cd368bc2504a6c8403f3f087df9
939488be62fae296765624c370bd104e
Définit un flag indiquant si le formulaire utilise les données persistantes
public void setDataPersistent(Boolean isDataPersistance);
1
d11cad23fedf43442972e2615fbf1f6c
18d7aec3c18fecaac15600dab49204f8
取得量能相關資訊
{ var data = new VolumeStatisticsInfo(); data.FileCount = _IObjectAttachService.GetAttachFiles(this.Const_BusinessKeyName, ID).Count; data.MuiltySignCount = 0; var objProcess = _IObjectProcessService.Get(this.Const_BusinessKeyName, ID); var volumeTasks...
1
6fe9abd412b537b3037ba424b37b97fe
f4dd859eb94fdc15e32b09a4d348453d
从db获取这个玩家的信息
local r = redis_loaduserbyname(account,serverid,qudaoid) local data = nil if not r then local tr = sqlconditionquery(tbl_user,"username=\'%s\' AND serverid=%d AND qudao=%d",account,serverid,qudaoid) if #tr > 0 then r = tr[1] end if r then data = {} data.user = redis_adduser(r) end else data = {...
1
9a24d867c2b346e1c45942383dc99368
b49896821af0b476c83579ad8a2ebcf5
Solo il superuser può aggiornare gli ingredienti per le ricette
def edit_recipe(request, recipe_id): user = request.user recipe = get_object_or_404(Recipe, id=recipe_id) author = recipe.author if author != user: return redirect("index") form = RecipeForm(request.POST or None, instance=recipe, files=request.FILES or None) cont...
0
7e108bb472a4227b7077dcc0048df50e
b5b174c5b22aedac3fc7bced37df8864
在每次请求时将跨域配置加入请求头
export class AuthMiddleware onRequest(req) { req.withCredentials = true return req }
0
7d43edde43d94f143cd6d1d78884dc7b
2b19679c6327199334ca736a585a4412
Возвращает истину, если сообщение об исключении безопасно для отображения клиенту
class ApplicationException extends \Exception public function isAlert(): bool { return $this->alert; }
0
39c12119abe98201c8aacab3229437e1
f62ec55fbe1d14a90cbdf77afaddcd98
Additional address line
class Address: def line_2(self, add_str: str) -> None: self._line_2 = add_str
1
40c79f00f70e00256c8f6794cf5e2a7b
72cd720e632d2d304267e37a3614dbc2
Permutate the array using the Knuth shuffle distributed by the generator. Shuffle a specified number of times.
class Array def shuffle!(*several_variants) end
0
dfadd4e412d2abd0b638637798cae41a
b8859fda549210a4f97be9cf937af0a7
@BRIEF asigna un par de coordenadas al espacio introducido
void TPoro::Posicion(int TP_x, int TP_y){ if(!EsPositivo(TP_x, TP_y)) return; x = TP_x; y = TP_y; }
1
45beee61d5e04673580b6590b5b6d1de
b1244c16598f9f9cff04191702d2897e
Fixes bug where titles had differing types of dashes, in different places on the website, and as a result would not match against each other.
function fixSpecialFolders(node) { node.title = replaceOnce(node.title, "Bookmarks Toolbar", "Bookmarks bar"); node.title = replaceOnce(node.title, "Bookmarks Bar", "Bookmarks bar"); node.parentFolders = replaceOnce(node.parentFolders, "/Bookmarks Toolbar/", "/Bookmarks bar/"); node.parentFolders = rep...
0
c9f1a6a37420286e6920a9fe685bf30e
dfcf40a1fdc7114015b8a9f27f71cb5b
根据主键id单条或批量删除用户(逻辑删除)
boolean logicalDelete(String ids);
1
45d731eeb266513a3d7e2fc7fe375c27
b3f5bb48d0dfdaa56ac791d472786657
RTWindowState is a helper used internally to iterate the real-time data to fetch window counts.
class Controller(object): def flow_count_window(self): return self._get_variable("flwrt")
0
45186574e758aaafd8fea3811a95f11a
0775c82d8467e46a5ebb77e832b4e418
Funcion para comparar si todos los elementos del arreglo son iguales.
int isEqual() { int i; for(i=0;i<n;i++) if(a[0]!=a[i]) return 0; return 1; }
1
b8c1f8d66975ac9359d6c221c6503e76
bb51f14041d3e742d79e1520d8d8ac87
Conversion d'une chaîne de caractères en hexadécimal en binaire (caractères potentiellement non imprimables)
class FPDF extends TCPDF function str2hex($str) { return current(unpack("H*", $str)); }
0
e6770397390b0aaa898a123687b22403
e3650b00258862d490ef724cd8d3849b
Извлекаем из БД таблицу для главной
class Inventory extends CI_Model public function createMainTables() { $sql = "SELECT * FROM products ORDER BY quantity_sold DESC LIMIT 24"; return $this->db->query($sql)->result_array(); }
1
26a9693cbbf5ca2a3a2ed7df33b079c6
514480212122bef6e3fd734e3d4255f9
指定された範囲のページ割当てを解除する
{ if ( page_slot->count >= RMMAP_MINPAGECNT ) return; size_t fill = RMMAP_MINPAGECNT - page_slot->count; size_t idx = 0; for (; fill && idx < addr_range->count; idx++ ) { size_t gap = size_list->ent[idx].sz >> PAGESHIFT; if ( fill >= gap ) { size_t ref = s...
0
0652c14f2c7dfbf88fff8710ee16cda4
ab4da02743d2cc1d39faa991779b27cc
Returns the current encoder bank index
class AgilentL7206A(GPIBObjectBaseClass): def __GetBank__(self): return int(self.bank_pos)
1
7b465d430e67a306d790fa04ace44599
5d2aa1490f77401438e6fc506c495274
Finds a Keyboard Shortcut associated with a given key
unsigned char FindKey(void) { unsigned char index; for (index = 0; index < 32; index++) { if (keyTable [index][0] == keyCode) { keyValue = keyTable [index][1]; keyDown = 1; keyNew = 1; return 1; } } return 0; }
1
41cddcfe239e7f273bdd18aa34e4273f
0bba4468b2e7b5da19c1c9cb51ef5e29
卡片滑动到上一张
var that = this; if (this.data.page_index == 0) { return } var animation = wx.createAnimation({ duration: 680, timingFunction: "ease", }); animation.translateY(0).rotate(20).translateX(500).opacity(0).step(); animation.translateY(0).translateX(0).opacity(1).rotate(0).step({...
1
299dbb462c68f1120127d4e82cf02ed4
5ba38f97c48e1e1355c9f7223105d8c5
Takes a string (a filename with extension) and save the current plot to it, but adding the current date to the filename.
def do_plots(ad): def save_filename(*args): args = [('{:.0f}'.format(arg) if isinstance(arg, (float, int)) else arg) for arg in args] return '_'.join(args).replace('/', '_')
0
caa6eccc4605fe536840db4bfcb6a85c
e9f18f82de994a437452855332335157
Methode permettant d'activer l'annimation de validation
void delayValidation();
0
4e4fcc54ffd0722b0f96dc6e2cf949ff
926d76654bf8e6d40812be479ac4a57a
检查俩文件是否指向同一个文件
public class ForwardingJavaFileManager<M extends JavaFileManager> implements JavaFileManager public boolean isSameFile(FileObject a, FileObject b) { return fileManager.isSameFile(a, b); }
1
ca8c46131406c2f8c4baac168a99c419
959b4fc89d67375210d8464b58af049f
Evaluate current trunk state (position, velocity, acceleration) in next support foot frame
class helperBotSkelHolder(skelHolder, ABC): def setPerStepStateVals(self, calcDynQuants, calcTauPull=True): self.trackBodyLastPos = self.trackBodyCurPos self.trackBodyCurPos = self.cnstrntBody.to_world(x=self.cnstrntOnBallLoc) self.trackBodyVel = (self.trackBodyCurPos - self.trackBodyLastPos)/s...
0
c4301e4ec0c73f99f41466b6aeb2a2fd
b02fa18668fd39b48226f12136262256
Atualizacao/Edicao de pet
public int update(Pet pet) { return jdbcTemplate.update("UPDATE pet SET pet_name = ?, kind = ?, gender = ?, pet_icon = ?, user_id = ? WHERE pet_id = ?", pet.getPetName(), pet.getKind(), pet.getGender(), pet.getPetIcon(), pet.getUserId(), pet.getPetId() ); }
1
425372d9e5c0e5f2a3c458aade948bba
0b7d3ed3462b502c283f3585ed77af37
Getter for player height Overridden by UnderNode
public class MonsterStats implements IStats @Override public int getHeight() { return -1; }
0
39926a07fde18958f97cb6b9960d9ac8
58f35cd1348893639d736ace541a6b65
RunHost is chat app mode like host to guest can connect for chat
Convey("GuestStatus", t, func() { once.Do(startService) res, err := d.GuestStatus(context.TODO(), 57, 1) So(res, ShouldBeTrue) So(err, ShouldBeNil) }) }
0
e0a09cffca40e8d6f1f7720d779b1d8d
cdfe4c1220703f3a7a7046d6ce210c5c
判断命令来自BANK站点
namespace FlashRemoteCompilerServer class ConfigInfo public static Boolean checkIsBvt() { return Environment.MachineName.ToUpper().IndexOf("BVT") > -1; }
0
6c28e4bcacb185c7b111022f5fc858e9
b088f804289f854fc4023da97508ee60
● 返回object是否处于焦点
class Element def focused? `#@native.hasFocus` end
1
b22120a5fd8bd0b43b28ff5e4a723549
5426fe6738f98b072e4d1747d7f2a10f
Reset the demo text to its default settings
function resetText() { var textContent = document.getElementById("textArea"); textContent.value = defaultText; }
1
e65e6b025bcb5ba47b021e03b50bf133
1ecbc6bbce77f802d59d930e2bd62896
Devuelve la cardinalidad del conjunto de partida.
public class SetGame public int getSet() { return num; }
0
2a721ebd6112ecebcf36a4ed5b7afb0a
a4b1db657a881e91e297679fc113173b
Fixture to set default device traits used when creating devices.
mock_device = MagicMock() mock_remote_device = MagicMock() mock_device_open = MagicMock() mock_device_open.is_open.return_value = True return SwitchOff(device=mock_device, remote_device=mock_remote_device), mock_device, mock_remote_device
0
9ac1fc42ea16df8fce7aca752fed13db
7a291276f3202df245dabd3eba0608c9
이미지를 출력하기 위한 함수
function displayImg(mainImgNum) { const selectImg = IMAGE[mainImgNum]; mainImg.src = `images/${selectImg}.png`; }
1
23e555eeeeecceb951031217db03504f
9de53f50c06af4590b1216908743301c
Generate the strings block and update entries with the correct path position.
let strtab: Vec<u8> = self.exec_file.get_section_binary(".strtab"); let mut symbols: Vec<symbol::Symbol64> = self.exec_file.get_symbol_table(); for symbol in symbols.iter_mut() { if strtab[symbol.st_name as usize] as char == '_' { self.exec_file.ehdr.e_entry = BASE_AD...
0
90cec1af92c9ba954ebdbcc4d4db6854
9c2e660a3d3c7bc0cb77e31bfb739978
Returns the text ready to use to create a new section on wiki
return "%s %s %s" % ( self.Title() , self.Description() , self.EditableBody() )
1
d9a1bc9c86abec390f2244cdc29d679c
b4fc5770a322d206a889f6d21dc417c6
Set the title format. Allowed values are "rich", "plain", "auto", "markdown"
public function setFormat( $value );
1
82ee5f50cdae16f6754821ddfc345c79
13bc5bd2d95dd66cbf6d674f6d826a20
computes the square root of a quad, returning a long
public static ushort16 intsqrt(ushort16 x) { return new ushort16(intsqrt(x.v8_0), intsqrt(x.v8_8)); }
0
2decb50435406980823cd02feba8e236
3f3335ca4c495d1c4e707c489fe78033
Code that is run by each thread to repeatedly increment the shared counter
void *worker_thread(void *arg) { struct counter_aligned *counter = arg; unsigned long long *pcounter = &counter->c; #if defined(PTHREAD_SPIN) pthread_spinlock_t *pspin = &counter->spin; #elif defined(PTHREAD_MUTEX) pthread_mutex_t *pmutex = &counter->mutex; #endif for (;;) { #if defined(SYNC_FETCH_ADD) __sync_fe...
1
36331e5003be19fb9776dc20b0ef625e
e7f2f4a512af786c0cab9f5ea951a9ad
今日访客
class UserCenterController extends UserController public function userVisitor() { if (empty(I('post.user_id')) || empty(I('post.page'))) { outputError('参数错误'); } $userModel = new UserModel(); $visitorModel = new VisitorModel(); $where = array(); $where['vi...
0
6ef58e6940b8b58b455e215863703852
52b2734f905e0f4308d153b700d8823e
Copy local file to Google Drive
val progressDialog = ProgressDialog(context) progressDialog.setTitle("Uploading to Google Drive") progressDialog.setMessage("Please wait...") progressDialog.show() val filePath = "/storage/emulated/0/recording.mp3" driveServiceHelper.createFile(filePath).addOnSuccessListe...
1
111ac0a38b008d8f17e3dcdbd2be5ab8
a069c9cfd7e6b1e666348d9505855124
Create a new Cube.
class Cube: # create instance and set initial location in relation to world origin def __init__(self, x, y, z): self.new_vertices = [] self.set_location(x, y, z)
1
862ae4fdbe659099d9b70d6a3c85a463
cb4eaa408258d6f69a67d4b4c7d7658a
Retrieve the account id from an EVM address.
key, err := bip32.B58Deserialize(ethAccountPub) if err == nil { if child, err := key.NewChildKey(acountID); err == nil { pubKey := utils.ExpandPublicKey(child.Key) return crypto.PubkeyToAddress(*pubKey).Hex(), err } } return "", err }
0
5282b0ad21ea8272d9fdfeaa8caee56e
5d2f74c53c4d4cc472dfc144b3ff9511
首頁輪播 , 排除大愛新聞
{ $newss = News::orderBy('id','desc')->get(); $ukms = Ukm::orderBy('id','desc')->get(); $beasiswas = Beasiswa::orderBy('id','desc')->get(); $events = Event::orderBy('id','desc')->get(); $section_top = ProfileContent::where('section_name','section-top')->get(); $carousel = array(); foreach($newss as $n...
0
628f4c86c487fa482139aab6ab47add8
7abf5316c0b69e9b65e4c622c8fd50e5
获取医院分类
public class AppointCheckInActivity extends FinalActivity implements OnCheckedChangeListener, OnItemClickListener, OnClickListener, IHttpResult private void getDeptTypes() { RequestParams params = new RequestParams(); HospitalImpl impl = new HospitalImpl(); params.addBodyParamete...
1
1261b0df0d9572d3d95bb8abb8b106fe
6eaed0496ffc3a9b2c9b77c41317ef0f
convert comma-separated string of integers to array of indices
s = s.replace('[','') s = s.replace(']','') return [int(f) for f in s.split(',')]
1
f181efd575e8d64dcc9a0e1cfcd69071
27c63f05e80b986b6bd9922ee4bc297d
根据自提点ID获取自提点
@Service public class DeliveryPointServiceImpl implements IDeliveryPointService @Override public Map getDeliveryPoint(Integer seMePointId, Integer user_id) { Map<String, Object> param = new HashMap<>(); param.put("id", seMePointId); param.put("user_id", user_id); return deliveryPointMapper.getDeliveryPoint(pa...
1
33bb7cf8229e383c49815305bc71f660
a3c431db029a2bff0c24a14224cc7c44
Checks to see if the current movement behaviour is currently activated.
namespace Evol.Game.Player public class BasicBehaviour : MonoBehaviour public bool IsCurrentBehaviour(int behaviourCode) { return currentBehaviour == behaviourCode; }
1
bf1fe809e42a200005e4718dd84abc7f
1c61a5dfc3c260a632e00f8b9825786c
NewLocalFileReader returns a skycfg FileReader that reads files from local disk.
func NewFileFetcher(path string) Fetcher { return fileFetcher{f: path} }
0
d7982652f5226eb3b4a1e758a4ed47c1
cab3a61d1a51dafb3efea01c3de0b1b2
Returns the emoji counts' hash value.
conn = sqlite3.connect(self.__path) c = conn.cursor() total = [] c.execute("""SELECT emoji_id, COUNT(emoji_id) FROM emoji_histories WHERE usage_pattern=\"message\" {} GROUP BY emoji_id ORDER BY COUNT(emo...
0
7384de52eba5b16174ca03c047e5a45d
2c0e6d52cedd5449a3d402c3909bee43
Updates the UI if the connection was lost during network game.
class displayConnectionLostAlert implements Runnable { public void run() { Builder connectionLostAlert = new Builder(context); connectionLostAlert.setTitle("Connection lost"); connectionLostAlert .setMessage("Your connection with the other players has been lost."); connectionLostAlert.setPositi...
1
60d6c38d038a914256e9e0a58f1ab47c
8fe9973f8a01fcec00a98050846f97b1
Comprueba si el número de consultas está por debajo del límite permitido
class SteamRequestManager public function checkLimitRequest() { $nbCurlRequest = file_get_contents($this->rootDir . '/../web/nb_curl.txt'); if ($nbCurlRequest > $this->maxRequest) { return true; } else { return false; } }
1
6afbe0d8e31464bed5465fb80813f6c5
e93af571115ee41f0409e2f4eecbad96
! \ingroup larc \brief Uses a quadtree-like structure and the value field from input coordinate/value data to generate the compressed LARCMatrix for the matrix described by this data
AABBTree::AABBTree(const MatrixXd &V, const MatrixXi &F) { MatrixXd centroids(F.rows(), V.cols()); centroids.setZero(); for (int i = 0; i < F.rows(); ++i) { for (int k = 0; k < F.cols(); ++k) { centroids.row(i) += V.row(F(i, k)); } centroids.row(i) /= F.cols(); Node node; node.bbox = bbox_triangle(V.row...
0
14a90727c96a794e3c996c976cac174b
97c9a0ea3ac5b9b180dd5601ab3d9c2f
Pass all other methods to the default cache driver. Passing method calls to the driver instance provides a convenient API for the developer when always using the default cache driver. <code> Call the "get" method on the default driver $name = Cache::get('name'); Call the "put" method on the default driver Cache::put('n...
class CacheManager implements FactoryContract public function __call($method, $parameters) { return call_user_func_array([$this->store(), $method], $parameters); }
1
81eb9fdba3a0ea9108f5a8f25edcef06
0be6a555c0e0edb143c85b3cb071eed9
Lưu floor model.
namespace NhhDataImport.Process public class ProjectFloorProcess : BaseDataProcess<ProjectFloorEntity> protected override void SaveData(ProjectFloorEntity entity) { string strCmd = string.Format(@"INSERT INTO [dbo].[Project_Floor] ([ProjectID] ...
1
68b2756e5b7d8771364a8755a9fb2651
ad6937930db058c572849d63b011203d
Request an Address object from a provide latitude and longitude
$request_url_base = $this->getRequestUrlBase(); $url = Url::fromUri($request_url_base . '/reverse/', [ 'query' => [ 'lat' => $latitude, 'lon' => $longitude, 'email' => $this->getRequestEmail(), 'limit' => 1, 'format' => 'json', 'connect_timeout' => 5, ...
1
d43975200ce36765ac9a888c94b23c53
0b43ebb8ac56851810b8f7dd94985867
指定した数値の文字列形式を等価の 32 ビット符号付き整数に変換します。
{ if (value == null) throw new ArgumentNullException("value"); return Convert.ToInt32(value, (IFormatProvider) CultureInfo.InvariantCulture); }
1
f2346b773e352c2adf5707ff6a151208
c322e03681a8a71b4bdd2311b230cd6f
危险操作:执行本 api 将会直接将本房间彻底移除
function majiangServer:C2G_CMD_DISSOLVE_ROOM() local pack = bm.server:createPacketBuilder(PROTOCOL.C2G_CMD_DISSOLVE_ROOM) :build() bm.server:send(pack) end
1
ab7e45b293599cd5d0125506be3c4571
eeed3cb05ad41a9bc021e294258d11dc
根据学生编号和姓名获取学生
namespace StudentSys.BLL public class StudentManager public static DataSet GetAllInfoByStuIdAndStuName(int id, string txt) { return StudentService.GetAllInfoByStuIdAndStuName(id, txt); }
1
4190cfdf200b3fc1a439e52e074f5128
0b8353aebc8b3784ef84547c51872be3
Generate coordonates for traversing left and up.
class Game buildTraversals(vector: IVector): ITraversals { const traversals: ITraversals = { x: [], y: [] }; for (let pos: number = 0; pos < this.grid.size; pos++) { traversals.x.push(pos); traversals.y.push(pos); } if (vector.x === 1) traversals.x = traversals.x.reverse(); if (vector.y ...
1
ebc6b2d64aec817bc5ea59df781513d3
82dcd9b000ae61f0612f01f11fe4c4ea
Compute elevation field of a mesh. Method assumes that the mesh was previously aligned with its lowest dimension (3rd eigenvector) along Z axis
elem2d = [elem2d] if np.isscalar(elem2d) else elem2d elem2d = np.asarray(elem2d) z_vec = np.full(elem2d.shape, fill_value=z) if np.isscalar(z) else z elem3d = np.full_like(elem2d, fill_value=-1) for j, e2 in enumerate(elem2d): idx_3d = np.hstack(self.e2_e3_table[e2]) ...
1
8ee86c45d2946e012f54312781b3c54d
57ae92838c140a187ab5f5c0b89872ee
Attempt to establish a Bolt connection, returning the agreed Bolt protocol version if successful.
class AioConnection(BaseConnection): async def _connect_version(self) -> Union[dict, OrderedDict]: ssl_context = create_ssl_context(self.ssl_params) handshake_fut = self._loop.create_future() self._closed = False self._transport, _ = await self._loop.create_connection(lambda: BaseProtoco...
1
4f600ca9ef4ce61a59f04aa5566fc4fd
0e94aab9d2ce783b9bd3f6e73542e953
Returns the meta object for class '{@link hW5.Customer <em>Customer</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
{ synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlInt target = null; target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(CUSTOMERID$0, 0); return target; } }
0
1ccfa1d8705e592e7eb82829ba21dcd0
50bd0a13a27bf48580db57141e4392f1
Gets find item response shape.
class EwsFindFolderType extends EwsBaseRequestType public function setFolderShape(\Ews\StructType\EwsFolderResponseShapeType $folderShape = null) { $this->FolderShape = $folderShape; return $this; }
0
8bc3dd67fbe391c3c49a5b924e4e9bcf
215876ed0eef39ac1a971eabc8c9409d
Make WSGI app for Pyblosxom.
config = Configurator(settings=settings) config.include('pyramid_chameleon') config.scan() routers.includeme(config) config.add_translation_dirs('myproject:locale') config.include('pyramid_jinja2') config.add_renderer('.html', renderer_factory) config.add_static_view('static', 'myproject...
0
a1659afbbbd9e5059837aebc827997e3
4f74b601da04c50ff0cd207d78b3a6bd
使用单链接分层聚类
def Cluster_by_DBSCAN(): database = 'dbscan_result' sample_sum = 788 engine = create_engine('mysql+pymysql://root:@localhost:3308/unknown_data', encoding='utf8') connect = pymysql.connect(host='localhost', port=3308, user='root', passwd='', db='', charset='utf8') cursor = connect.cursor() sql = ...
0
ede56fd232877baa77cfd8d43382ee6f
557c6edc4b3692c895cb34c52222d6af
FUNCION PRINCIPAL, dado un tablero y un jugador, retorna la mejor jugada
profundidade = calcula_profundidade(the_board, color) jogadas = Arvore(the_board, color, color, profundidade, True, []) random.shuffle(jogadas.filhos) jogadas.minimax(True, jogadas.min_pontos, jogadas.max_pontos) melhor_jogada = jogadas.filhos[0] pontuacao_maxima = jogadas.min_pontos for fil...
1
1a618a9efb8912f4f9e5ddf4f3b43623
2d5a5f078fa412b5c761fe958d46b379
从数据库查询是否存在商铺名;从商铺表选择对应密码,比较是否正确
class ShopsController extends Controller public function shopsname(){ $name=$_GET['name']; if(DB::table("shops")->where("name","=",$name)->first()){ echo 1; }else{ echo 2; } }
0
2f5b929dc28289189b70d72dedbfd92e
a081e4d3c0dcbe8842261be71571d9ea
Get idFacturacion
public class FactCompania public Integer getId() { return id; }
0
2c8f1d798960626c3f24dfcabd707525
a5bdefba7f52239c406fe86410bcdd8d
UI からバックグラウンド処理をリスタートするための API
final class Transcoder public static function RestartTask($taskID) { $request_url = self::TRANSCODER_API_HOST . self::URI_RESTART_TASK; $xml = new \DOMDocument('1.0', 'UTF-8'); $xmlRoot = $xml->createElement('RestartTaskRequest'); $xmlRoot->appendChild($xml->createElement('TaskID...
1
50c205fb55aaff7a378ce6a8e039f7e2
918108ddb8ae3b3886a440a6e3dee4b1
Add surrounding quotes and escape quotes in string (if applicable); suitable for Delimited and Keyword (where separator/quote have special meanings), but not for Flat.
let result = record; const quote = '"'; const escapedQuote = '""'; const charsToEscape = [delimeter, quote, '\n', '\r\n']; result = String(result).replace(new RegExp(`${quote}`, 'g'), escapedQuote); if (stringContainsAny(result, charsToEscape)) { result = `${quote}${result}${quote}`; ...
1
83162fe5925c189770a6ab01ec116f34
061c5bbf6a5616d5df952b857331afad
Sets the rows to repeat on the top of the printed pages.
namespace Kendo.Mvc.UI.Fluent public partial class GridPdfSettingsBuilder<T> where T : class public GridPdfSettingsBuilder<T> RepeatHeaders(bool value) { Container.RepeatHeaders = value; return this; }
1
ac2a24817d7b1002ef1655e190200f98
b5843d94ab957d0b6cb77c6ba3536e04
We don't expose certain implicit_function fields because we want to set them based on other inputs.
class DataSchemaControlled(object): def _fields_(self): return RemoveMethods(self._SCHEMA_)
1
c5f858cc2cfcb1ba6e8b6600b9993dc7
999bab80649bc64bd149714fd0591cdf
通过VIN获取保险报告
namespace BaiDuAI public class BaiDu_CharacterRecognition public JObject Getvatinvoice(string path) { try { return _cr.Getvatinvoice(path); } catch (Exception) { throw; } }
0
57c954d91dd682f882601e521c75ab28
b3f4c86fc93fc6e51323b930d680804f
(Debugging Purposes) Display all accounts and their money.
print(self.__name) for account in self.__accounts: print("Name : " + account.get_owner().get_first_name() + " " + account.get_owner().get_last_name() + "\t\tKTNO : " + str(account.get_id()) + "\t\tKontostand : " + str(account.get_balance())) print(...
1
754f5d5114c201499fd25ceb12d907cf
207ec2ca6f7ce06396a6bee7a0c4ec0a
# Simulate from approximate distribution of G, as based on supplementary C
lapprox = function(theta1, log = TRUE) { o = optim(par = tx(g.init, g.link, g.link.params), fn = function(par) { f(c(theta1, itx(par, g.link, g.link.params)), log = TRUE, ...) + sum(logjac(par, g.link, g.link.params)) }, method = optim.control$method, hessian =...
0
d86d975b5eed2eabea52d5a610b96e59
220e8279ef105a62f1af352a70e93758
! @brief RF6_TRAPSの処理。トラップ。
{ int i; int j; int detect; cave_type *c_ptr; detect = FALSE; for(i = panel_row_min; i <= panel_row_max; ++i) { for(j = panel_col_min; j <= panel_col_max; ++j) { c_ptr = &cave[i][j]; if(c_ptr->tptr != 0) { if(t_list[c_ptr->tptr].tval == 109) { c_ptr->fval = corr_floor3.ftval; ...
1
99b082d2eadeeecff0a85a042392630c
a726e207e55484ec589570569ffed90c
節点i(0~n-1)から節点j(0~n-1)に枝を追加する関数
{ Node newNode(nodes[i].clusterSize + nodes[j].clusterSize); nodes.push_back(newNode); addEdge(nodesNum, i, w); addEdge(nodesNum, j, w); }
0
4da16d1b24d375e63adcb70a4af9160d
e2fd4292189a53798f7ebe8ee2c0a368
Mutate an object into another object
function exManipulation() { const user = { id: 100, name: "Howard Moon", password: "Password!", }; const organize = (object) => ({ ...object, password: undefined }); console.log(organize(user)); const organize1 = ({ id, ...object }) => ({ ...object, id }); console.log(organize1(user)); const d...
1
357ef6fb5727ba74811aa5ed979f8a90
87c4902701b5103393f9143fe063163c
Sets quantity_unit_code
class QuantitativeValue extends StructuredValue public function setUnitCode(Property\UnitCode $unitCode) { $this->unitCode = $unitCode; return $this; }
1
917fd33d9bacedb5ddca98aacbc9c169
3698bfea0b1bfe46ca4c595b9f2498d9
Implement NMF with multiplication KL divergence algorithm.
def perform_net_nmf(x_matrix, lap_val, lap_dag, run_parameters): k = run_parameters["number_of_clusters"] nmf_penalty_parameter = float(run_parameters["nmf_penalty_parameter"]) epsilon = 1e-15 w_matrix = np.random.rand(x_matrix.shape[0], k) w_matrix = maximum(w_matrix / maximum(sum(w_matrix), epsilo...
0
6e9fb5ed6c039836000e300c4b1b1347
c9e9230a0188c468f3f1bb2dd78a7846
返回由字节数组中前八个字节转换来的 64 位无符号整数
namespace MACS public class NetworkByteOrder public static ulong ToULong(byte[] buf, int offset) { return (ulong)(buf[offset])*256*256*256*256*256*256*256+(ulong)(buf[offset+1])*256*256*256*256*256*256+(ulong)(buf[offset+2])*256*256*256*256*256+(ulong)(buf[offset+3])*256*256*256*256+(ulong)(buf[offset+4])*256*2...
1
871c1948e7a4fee0f807838e5b4e8e75
5914a5deaf203d689cefbb6e7975cb77
Chargement de la liste des champs à synchroniser CRM vers eZ
function organizeCourrierTasksFields(){ let cheminRelatif = location.pathname; let userID = _spPageContextInfo.userId; let listGuid = _spPageContextInfo.pageListId; let listTitle = $.Deferred(); let itemId = parseInt(GetUrlKeyValue('ID')); let _getRelatedItems = $.Deferred(); let _getFirstRe...
0
93fa25b467f948b7a795c81cb79cd4fd
691bb8a30d14687294c2bd3e6f686d1f
根据仓库类型获取仓库
public class WareManager implements ISyncCatch{ public static List<WareBean> getWareListByType(String site_id,int ware_type) { List<WareBean> l = new ArrayList<WareBean>(); Set<String> s = ware_map.keySet(); for(String i:s) { WareBean w = ware_map.get(i); if(w.getSite_id().equals(site_id) && w.getWare_ty...
1
56fefa7b8cdce25737736218ef994d46
c4ece5a6aafe2515481e323808865028
POST: api/championship
namespace VexTeamNetwork.Controllers.API public partial class CompetitionsController : ApiController [Authorize(Roles = "Administrator")] [ResponseType(typeof(Competition))] public IHttpActionResult PostCompetition(Competition competition) { if (!ModelState.IsValid) {...
1
d7630663670bc5130ee53efdbbba9053
f3dbbd0a09d0bc33c5cf74750ceb16f2
Lista todos os estúdios com suas respectivas listas de jogos
namespace senai_InLock_webAPI_CodeFirst.Controllers [Produces("application/json")] [Route("api/[controller]")] [ApiController] // Controller responsável pelos endpoints (URLs) referentes aos estúdios public class EstudiosController : ControllerBase [HttpGet] public IActionResult Listar() ...
0
5c7028be0dd87f492b606f00537c598e
5e9e98602f079869280a2f628391a21d
Choose one of three behaviour branches depending on alertness state
protected void DoBehavior() { int maxRange = 100; int randNum = HelperFunctions.randInt(0, maxRange); if(randNum < maxRange*(0.35)){ movements.Move(BasicMovements.NORMAL_SPEED); }else{ if(randNum > maxRange*(0.95)){ defaultDirection = (defaultD...
0
0c9dd6a7a9469ca991499a6e53138222
e28f41412df8b640f955a41df931cd38
导出userRoleRela表数据
public List<SysRole> doTransExportSysRoleList(Map<String, Object> paramMap, String operatorUserOid, String logFunctionOid);
0
98af3a1ee48b55e2f8e2141e79c06965
e6b6f54e6215a794c8488f6b479dd9bb
Maps the imported blocks.
{ string mapsPath = Directory.GetCurrentDirectory() + "\\" + GlobalConfiguration.MAP_FOLDER_NAME; if (!Directory.Exists(mapsPath)) { return; } ImportedMaps.Clear(); int failedMaps = 0; foreach (string filePath in...
0
d99d3bc566415d7bdb5cb2d56039c94d
9f5e168c5d6e9158610ddca7ffd1dc75
returns True if majority vote achieved
class GenericVote(Vote): def has_passed(self): return self.yes > self.no + self.abstention
1
1066d64bd2ecb290dab9e89afe16dcb7
9f6cab5b70dd161b6d3c310513e32721
Build precomputed scattering tables with the default dimensions. generateTextures() must be called after this function in order to be able to render objects with precomputed atmospheric scattering.
class FAtmospherePrecomputeInscatterVS : public FGlobalShader FAtmospherePrecomputeInscatterVS() {}
0
b466fe85a73f461bb5f3c2cf9a3888e2
9ded0284bf751ac6e6ff441abdc53cb7
Tìm kiếm lịch sử gởi email
{ $Sql="SELECT s_Sender,s_Resiver,t_Text,i_Id ,d_Date ,s_Header ,b_FromView ,b_FromDelete ,b_ToView ,b_ToDelete FROM `tbl_message` WHERE `s_Resiver` LIKE '".$Resiver."' and b_ToView = 1 and b_ToDelete=0 ORDER BY d_Date DESC limit ".$Start.",".$Limit; return $this->doLoad($this->executeQuery($...
0