query_id
string
corpus_id
string
query
string
code
string
label
int64
e20d53d6d576560914ea7637056633d8
a5a18673e3578e1916d7baeae54fc2f5
根据MAC地址取得缓存的活跃封杀策略 MAC地址
Mac queryByMac(String macName);
1
e320995e97e64de61ec2236f88aad5be
4dd660cb1bfc7eb5aa7f27669272449d
@brief cURL模拟post请求获取目标地址返回值
{ CURL *curl; struct MemoryStruct msChunk; std::string sRet; int iError; curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); if (!curl) { Log(LOG_ERROR, "Failed to initiate curl. The request will not be completed.\n"); throw Exception(EXCEPTION_URL, "failed to initiate curl"); } msChunk.memory = (...
1
ef67cd07858aee666c32d41ea3df5e00
ac61bbddeb186f8780e74651ed5009c6
Returns the length of the longest query variable as an integer.
def getMaxLength(url): parsed = urlparse.urlparse(urllib.parse.unquote(url)) urlQuery = urlparse.parse_qs(parsed.query,True) urlFistArgLength = 0 if len(urlQuery) == 0: urlFistArgLength = 0 elif len(urlQuery) == 1: urlFistArgLength = len(urlQuery[list(urlQuery.keys())[0]][0]) els...
1
539aedbc8cdc3966b5eb3a349e6e9807
15ec5fde744b74e61df5ece3360d1e0d
Handles the pointer entering the control and highlights it.
namespace OpenTracker.ViewModels.Maps.MapLocations public class EntranceMapLocationVM : MapLocationVMBase, IClickHandler, IConnectLocation, IDoubleClickHandler, IPointerOver public void OnPointerEnter() { Highlighted = true; }
1
f243df150abd7e2f5682b8e176cae8ae
204e8a651011d92a75dc30ae897b27ac
Specififes command types for listening by current bounded context.
@AutoService(Processor::class) class BindingProcessor: AbstractProcessor() override fun getSupportedAnnotationTypes(): Set<String>? { val types: MutableSet<String> = LinkedHashSet() types.add(OnClick::class.java.canonicalName) return types }
0
912d9fb662c9c0789232ef97d16d1ba0
986a2da65e251deee072879a59062ab0
Firefox Browser Setup
class MyTest def setup Selenium::WebDriver::Firefox.driver_path = 'src/geckodriver' @web_driver = Selenium::WebDriver.for :firefox, marionette: true @web_driver.manage.window.maximize @web_driver.manage.timeouts.implicit_wait = 10 end
1
48a2c94a70ccc2cb221621bbbffbfb6b
6726ce5087ae28b1190f39ef79feb884
Inserts a record into the Wall_By_Location table.
{ Database db = DatabaseFactory.CreateDatabase(); DbCommand dbCommand = db.GetStoredProcCommand("Wall_By_Location_AttachmentUpdate"); db.AddInParameter(dbCommand, "PK_Wall_By_Location_Attachment", DbType.Decimal, this._PK_Wall_By_Location_Attachment); db.AddInParameter(dbCommand, "FK_Wall_By_Location", Db...
0
952cb2e5f67ef1616bbc2753695c31c0
b11d7e3f5d267c1a186c007f6304694e
Emit a cursor move indication, with or without its own screen update wrapper.
bool entered ) { TCursorEventData event_data; event_data._view_size = _window_size; event_data._kind = entered ? TCursorEventKind::enter : TCursorEventKind::leave; event_data._position = _handle->CursorPosition(); PerformCursorEvents( event_data ); }
0
b91e2abccd4af9f9e68039a8d7a84845
6afc51c0cc05ce922959571d6ba7ccf2
Test case for replace_namespaced_replicaset_status replace status of the specified ReplicaSet
class TestApisExtensionsV1beta1(unittest.TestCase): def test_replace_namespaced_daemonset_status(self): pass
0
bad84f4189ba888c592d7e3bd57466d9
4830875029881fa6fb3507bed4677502
设置key的过期时间,单位为millseconds
void setKeyTimeout(String key, String value, int seconds);
0
9ee78f4bae8ccd7876ac4b1a0794079f
0780a7bdb4aeffb64634f3126ad4ac5e
Filtro Passa-Altas
class ED: def filtro(self): for i in range((self._execucoes)-1): for j in range(i+1,self._execucoes): if ((fabs(self._vet_raizes[i][0]-self._vet_raizes[j][0])<self._tolerancia) and (fabs(self._vet_raizes[i][1]- self._vet_raizes[j][1])<self._tolerancia)): if (self....
0
68c4a645b63175412e59d7db8685c746
b881858a023883eb7b9aab19151a7bfd
Sets the enter time for the lot
public class PigModel extends BaseDataModel implements Serializable public void setEnterDate(Date value) { set(D_EnterDate, value); }
1
4d1184c3c752bbe6bd52074919a23edd
215da2587ccb1cd3dc382801d38b7db2
並べ替え問題の初期化を行います。
{ cleared = false; if (i == -1) { this.richTextBox1.Text = "問題をランダムに出力しますか?(Y/N)"; this.textBox1.Text = "y"; } else { this.richTextBox1.Text = questionFormat(quest[i]); } }
0
67e1bcc946027f801be69dd2c660f7a3
cb5a0ff30407ad750c518fd31492276b
Test precomputed basepoint mult
let mut minus_basepoint_bytes = constants::BASE_CMPRSSD.as_bytes().clone(); minus_basepoint_bytes[31] |= 1 << 7; let minus_basepoint = CompressedEdwardsY(minus_basepoint_bytes) .decompress().unwrap(); assert_eq!(minus_basepoint.X, -(&constants::ED25519_BASEP...
0
b492162cc0ceeb6b84b6248bd5c7147b
ff0d1ebb228ef78a08145909167a6427
Get minquantity
{ BigDecimal bd = (BigDecimal)get_Value("Qty"); if (bd == null) return Env.ZERO; return bd; }
0
f88de1011d70fa0debb48134a461dc72
56292bed30e9425f87c0db5e8ebb8d3d
设置右边按钮图片资源2
abstract class ToolbarViewModel<M : BaseModel> : BaseViewModel<M> fun setRightIcon2Src(src: Int){ rightIcon2SrcObservable.set(src) }
1
6badb4299604406bb601ea3f5be8e205
22006a50098904dec107ca448c1dcb59
A method of interpolating between start and end values with a spring transition.
{ if (clampAmt) Clamp(ref amt); return (1 - amt) * start + amt * end; }
0
0e830621fdb3307d0849ca499964db08
30da478359bfdcc601b1a8096e663f0d
Removes the ability of the Group to make an unique serialization of parameters..
namespace KonVertObjs public class KonVersionGroupDynamic : KonObj public bool ShouldSerializeGroup() { return false; }
1
57606c478b0ee029cccdb924a414e315
3e50dd73ef00d122a6afcdc8cb4330cd
Если не включен режим аякса, отрисовываем страницу с помощью Смарти
{ getHeaderXML(); if ($mode) { $this->mode = $mode; } if ($withoutLayout) { echo $this->renderXsl($template, null, true); } else { $this->renderText($this->renderXsl($template, null, true)); } \Yii::app()->onEndRequest(new \CEvent(null)); }
0
722f17f9beb474b7aa1047b2733335de
d6782cd01f5c641738a33b2dbc62cd6a
是否能够映射成长连接
namespace Assets.Code.Bon.Graph [Serializable] public class Graph : ISerializationCallbackReceiver public bool CanBeLinked(Socket socket01, Socket socket02) { return socket02 != null && socket01 != null && socket01.Type == socket02.Type && socket01 != socket02; }
0
f74c093d760804e07f338035fccc2e04
393469839ec530d45de83ea179ca8427
Tests the removal of an auto-increment column.
{ if (!getPlatformInfo().isNonPrimaryKeyIdentityColumnsSupported()) { return; } boolean isSybase = SybasePlatform.DATABASENAME.equals(getPlatform().getName()); final String model1Xml; final String model2Xml = "<?xml version='1.0' encodin...
0
f9891eb4dfd82ad77c5208e507a1c039
689e0cf21958b1d70972f9b0ae141dc6
@brief <i>VIC</i>: emit code to check for collision This function can be used to issue code aimed at verifying if a sprite has had a collision with a tile. The result (0 = no collision, 1 = collision occurred) is returned in the output variable.
static u8 CheckForHit (void) { volatile u8 Local_u8Hit_Flag = 0; if( CheckHitItself() ) { Local_u8Hit_Flag = 1; } else if( CheckHitBorder() ) { Local_u8Hit_Flag = 1; } return (Local_u8Hit_Flag); }
1
abc2699c50984d5c09739b98b2511d52
9b2ee5f34c8b54679e20e29b27a2d299
bpyステップスクリプトを実行する.
self.reverse_exec([ 'process plugin packet send bc', 'process plugin packet send bs', 'stepi'])
0
a685816daa5740ac017818c812f3fe78
999378129f74a3bdf1ec76c0296045db
Sets the dimensions of the loading screen and positions it so that it is either centered vertically. Horizontal centering is achieved using css.
{ setBounds((800 - SCREEN_W - 12) / 2, (600 - SCREEN_H - 28) / 2, SCREEN_W + 12, SCREEN_H + 28); setTitle(filename); }
1
a037cf8345f18462bed2fc580daa5b52
ba078090b5705ad8cad2b273eaea5423
Haystack ends with needle
{ $length = strlen($needle); if ($length == 0) { return true; } return (substr($haystack, -$length) === $needle); }
1
b9bbb0333ce48ba6f5f6999955739554
4167dc3971c9dd826f87aa4fe0a5f795
Adds X and y to the known training data and retrains the predictor with the augmented dataset.
class ThoughtfulMachine: def fit_new(self, X, y):
1
baaf6026b4c1fd0151f754d3af5872ae
34b6b46d18e8d55c1bf5e6814cb4dcf0
Put a file in the host's home directory
class LocalClient(object): def put_file(self, src, dst): shutil.copyfile(src, dst)
0
09ad92e23130ec8255e4f308da7b7f67
7e5eb092b7c732daa5ac08256b93074a
Outputs table formatted information about selected source to the console.
class ShowSource def execute method_obj = build_method_object print_source(method_obj) end
0
326344d07e63fc76e097a0706d063515
91022b6d28c6d47639ea64dbc048dbb9
Посылаем Абоненту запрос о его состоянии
$__args_types = Array('array','string','boolean'); $__args__ = Func_Get_Args(); Eval(FUNCTION_INIT); $packet = new Tag('packet',Array('version'=>'1.4.2.0')); $set = new Tag('set',new Tag('filter',new Tag('login',$Login)),new Tag('values',new Tag('gen_info',new Tag('status','0')))); $packet->AddChild(new Tag('...
1
f4bd2d368d6f79148534d65e9b52d0ee
92aa143c604b97d851bebd219d628024
Funksioni qe kontrollon a ka votuar studenti njeher ne ate semester
{ Pass pass = new Pass(); foreach (var entry in journal.GetEntriesForStudent(studId, weekNumber).Where(x => x.DaySchedules.Subject == subject)) { if (entry.Absent > 0) if (entry.Valid) { pass.Vali...
0
69d025df0bc4c2206b3e9d74fb7f5603
38ab6f5fafbf6ef3d96b21f1be2320a4
Disparado quando a aplicação volta a ser executada
db.serializa() print('Obrigado!') global janela if janela is not None: del janela return True
0
1e188dbcf46f4fb55fe45b9b6a3459c0
d839fd80f9e670df2599b7a0367795c7
Interpret the UID response data received from the tag.
public function interpretData($rawData);
1
a32aa0b907ab61c7db7fe54304ffa8d9
f1069dc1854a9deaf2b0b8aa5d919e79
Returns the true binary length of the given number
namespace Emzi0767 public static class Extensions [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int CalculateLength(this sbyte num) => num == 0 ? 1 : (int)Math.Floor(Math.Log10(Math.Abs(num == sbyte.MinValue ? num + 1 : num))) + (num < 0 ? 2 : 1);
0
459bba3c6f0c431faffd149cd975e902
e12c2fccf723fcf452fc786e1aa48d91
Get Participant Subscriptions Get a participant&#39;s subscriptions.
public function getSubscriptions($subscriber_id = null);
1
8b4938321670d3b15f6d1cafda610e65
046f8e7c8781d1d86dac228833da77dc
根据用户id查询节点信息
PageBean getNodeByUserId(int userid, int currPage);
1
e65289b7ebac42846a364c32dec58819
9c1b783a9ebc1d6aea08176540c2b18d
Loads main template image and calculates zoom koefficient
class PoissonMain(QtWidgets.QMainWindow, Ui_MainWindow): def load_kontrast_image(self): path = self.get_image_path() self.kontrast_image_path = path self.inputImageKontrast.setPixmap(QtGui.QPixmap(path))
0
61b387e99c3eeeefebfb9a23a5121ea9
4d5aa1027b14e1fd169a5fb6f8090a37
>>Done<< Function creates and returns a new request with two values.
class Test(JSONRPC): def jsonrpc_pair(self, string, num): return [string, num]
1
6ea16560584413222e940fc5dab625e2
0e512bd22cfa690a9702110c96039a4e
表存在判断函数
def table_exists(con,table_name): sql = "show tables;" mycursor = con.cursor() mycursor.execute(sql) tables = [mycursor.fetchall()] table_list = re.findall('(\'.*?\')',str(tables)) table_list = [re.sub("'",'',each) for each in table_list] if table_name in table_list: return 1...
1
588c78bac671954836e2de7895bb3105
769b79f62818cab7ecad481716976af4
BooleanConverter constructor.
abstract class SmilesConverter protected function __construct($db, $fallback) { $this->db = $db; $this->fallback = $fallback; }
0
2691fe793636ca0456ef84604c122832
626813e1d11442f9ae09c2d59fe8e4a6
Clears the existing generic buttons
namespace GensQt4 void GensCtrlCfgWidget::on_btnClearAll_clicked(void) { Q_D(GensCtrlCfgWidget); d->clearAllButtons(); }
1
5ba55d64172c051e2a697016179002bb
74fa79ce7e7d90bef8e17c867a55cc06
因为某一键名的值不能重复,删除重复项
{ int count = combobox.Items.Count; for (int i = 0; i < count; i++) { string str = combobox.Items[i].ToString(); for (int j = i + 1; j < count; j++) { string str1 = combobox.Items[j].ToString(); ...
1
fc9817360db47048e54cc8b09a53dec3
7edd7031750967c3f11b8cd6cb7473c9
Interaction logic for the AddRegConfirm button. Gathers and prepares the data for database insertion.
{ entryNum = Convert.ToInt32(EntryNum.Value); pageNum = Convert.ToInt32(PageNum.Value); confirmationDate = Convert.ToDateTime(ConfirmationDate.Text).ToString("yyyy-MM-dd"); age = Convert.ToInt32(Age.Value); fullName = ValidateInp(FullName.Text); parish = ValidateInp(Parish.Text); province = Valid...
1
e2afb58be9ac24531d82827f1f8ce134
9089212bf8aed189933fc82105293b07
This endpoint is just to check whether the server saved the uploaded data on file/ or not!
@MultipartConfig(fileSizeThreshold=1024*1024*10, maxFileSize=1024*1024*50,maxRequestSize=1024*1024*200) public class submit extends HttpServlet @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.getWriter().wri...
0
4ff8acc400683485f92ba2bb9db567ca
d489e3a87d87e1a72a652acfe186c585
ドラッグを開始したときに呼び出される<br /> ドラッグ中の項目を表示する
class TodolistAdapter() : RecyclerView.Adapter<TodolistAdapter.TodolistHolder>() , ItemTouchHelperAdapter interface OnStartDragListener fun onStartDrag(viewHolder: RecyclerView.ViewHolder?)
1
abaa802f0c864be69bf1c6728b6a222b
e043f8b353e98d616a00ddfec3c92f4f
Zeigt einem neuen Spieler sein Geheimnis und merkt es sich zusammen mit seiner Farbe.
this.playerNr = playerNr; switch (playerNr) { case 0: playerLabels[0].setForeground(Color.RED); playerLabels[1].setForeground(DARK_GREEN); break; case 1: playerLabels[0].setForeground(DARK_GREEN); playerLabels[1].setForeground(Color.RED); break; default: playerLabels[0].setForegr...
0
48e36cc9b9f920fd0bb1b766687312d6
53970a84bb01f3a87295955c89515699
Method to rotate the dance floor object
public class Day_Night_Controller : MonoBehaviour void Update () { transform.Rotate(Vector3.up * rotatingSpeed * Time.deltaTime, Space.Self); }
1
b6599d989f01bf986c0a923ff273cb44
94ef137e4ec6b07cb39a45b67a017dfc
플레이어의 Experience값을 표시한다
public class MainUIManager : MonoBehaviour void Experience() { experience.text = "Pt:" + ExperienceManager.Instance.experience.ToString(); }
1
c7323cc95c2b701b4dac68d36260799e
b4832725c17adee9c957ce459f2d178d
Kth bit set or not
{ return (x & (1 << (k-1)))==1? true: false; }
1
8d45d26e99d23d7fe2f97a10fdfe35f2
8a4a97720da46d2f85ba73ffc0d2b7f8
Asynchronously poll the current state of a DNS job.
try: if wait_for_statechange: response = self._session.get( self.url, stream=True, timeout=timeout, params={ "WAIT": "-1" } ) else: response = self._session.get(self.url, strea...
0
cb893e5ca5a0c46de69a0c8638745408
0fa1e1cc5fd992d52fcc18c04a457f32
Turn off the busy LED.
static inline void njsc32_led_off(struct njsc32_softc *sc) { njsc32_ireg_write_1(sc, NJSC32_IREG_EXT_PORT, NJSC32_EXTPORT_LED_OFF); }
1
0ae7137931c11a19be1477156be4a7df
4556dea410ab9590b8cfcf0078cd6b16
导出学生信息
public File doExportStudentInfo(String classTeacherId)throws Exception;
1
e17559b4fd25be4df304e5385745b24c
41da0f6a0b66e8e8032324c444783e1e
查找连续的非小写字母
public class Test public static long test07(String str) { long count = str.chars().filter(Character::isLowerCase).count(); return count; }
0
4fed6551372093b29bc00bf266d19960
fdeaee7438a6ab7cab87878777f58ab0
Convert julian day number to struct datetime.
min_julian = 2299160 max_julian = 1827933925 julian = np.atleast_1d(np.array(julian, dtype=float)) if np.min(julian) < min_julian or np.max(julian) > max_julian: raise ValueError("Value of Julian date is out of allowed range.") jn = (np.round(julian + 0.0000001)).astype(np.int32) jalpha ...
1
60c95270f4198d3311d9f5fabd7ca741
050afaeb48bb1740aa29f042eefedb43
获取单个Deal分组
@Service("dealService") public class DealServiceImpl implements DealService @Override public Deal getById(Long id) { return dealRepository.findById(id).get(); }
0
4c35c9e4d7c83f4412439adf85318909
9919673aac229c697f1e8e24606a9e0d
Halo bias as a function of mass.
class Profile(Component): def halo_radius_to_mass(self, r, at_z=False): dens = self.mean_dens if at_z else self.mean_density0 return 4 * np.pi * r ** 3 * self.delta_halo * dens / 3
0
30aae9d9adfc0c6dd7f711633614b245
b3999bc44993d4e1c992b0dc8e21072c
Send a signal to all Peers.
{ for (var key in this.peers) { this.sendToPeer(key,msg); } }
1
91fd76d5034d346238be8e63afcdbcef
a859984c27b586a16ee02aed89fb6b4e
Ordina una lista in modo <i>crescente</i> secondo una relazione d'ordine definita dall'utente e passata come parametro. La relazione deve essere implementata come una funzione che prende in ingresso il contenuto di due nodi, e li confronta restituendo:
{ t_list *curr; t_list *tmp; curr = *begin_list; while (curr != NULL) { tmp = *begin_list; while (tmp->next != NULL) { if ((*cmp)(tmp->data, tmp->next->data) > 0) ft_list_swap(tmp); tmp = tmp->next; } curr = curr->next; } }
1
7b5ab45506d796c98f7cca67f0148ec5
88b704c2c253ca55973fb68da5ffa673
Get user's or group's name. This is the id. PAS doesn't do prefixes and such like GRUF.
class U2uLibrary function _getName($id) { $id = intval($id); $objUser = \FWUser::getFWUserObject()->objUser->getUser($id); return array('username' => $objUser->getUsername()); }
1
06f044238b2ce63e19682ec65ed6b6f5
27e5476c389df9222f6f741b270f6007
Cleanup non tagged fields
$lists = $this->getAllList(); if (!is_array($lists)) { return; } elseif (count($lists)==0) { return; } foreach ($lists as $key => $value) { $lists[$key] = "MAX(`$value[Field]`) AS `$value[Field]`"; } $lists = implode(', ', $lists); $sqlStm = "SELECT $lists FRO...
1
78276d40afcc0db0db920e59d25cf47a
723f295809f354b66059c455db55e59c
Given a list of primary keys, remove all files with those primary keys from the table.
public function deleteByPrimaryKeys(stubObject $entity);
0
402c8413e85cb8b934bda40a36154a91
ee822e49283cdf520bb382bf0c0ef7b4
Возвращает True, если число четное
def check(number): return number % 2 == 0
1
25aeb4b458dd0998ff301fa5a4b22ce4
2af099ed7639b1e83ed04b4c06851ecd
Sets up booleans that affect Juwico's behavior
{ addScore = false; destroyCoin = false; banditCol = false; }
1
e8972384fe9b58a5e27327ca5bb11979
e1bd01cfddba0dcbe95b5312298d32b0
Gets the request builder for ReportRootGetOffice365ServicesUserCounts.
string period) { return new ReportRootGetOffice365GroupsActivityFileCountsRequestBuilder( this.AppendSegmentToRequestUrl("microsoft.graph.getOffice365GroupsActivityFileCounts"), this.Client, period); }
0
3009c3d231ef8bdfd387ac06debf9434
b2cc1ae5455869e23ba1483c92f5a688
Insert item in msglist so that it remain sorted after insertation
def insert(n): global msglist i= 0 for i in range(len(msglist)): if msglist[i] > n: index = i break else: i = -1 if i!= -1: msglist = msglist[:i] + [n] + msglist[i:] else: msglist.append(n)
1
cfcc2fa58e3a1c8f0caf0a6727756d4e
0043b13df307b4a811d3e08e1023ad13
プロジェクト内に存在するすべてのオーディオファイルをAudioDataに変換して取得する
let promiseArrs = []; for (let key in soundList) { let bufferPromise = promise().then(() => { return decodeAudioData(audioContext, soundList[key].link) }).then((buffer) => { bufferList[key] = buffer; return promise(); }); promiseArrs.push(bufferPromise); } Promise.all(promiseArrs).then((values) => ...
1
9aa12e94b562a8baab81cedc16648ed5
189909864bb23d198d246958255f27e4
Get details for the selected page
function pagedetails($filename, $connect_db, $db) { $resultInfo = 'SELECT * FROM ' . $db . '.pages WHERE page_name="' . $filename . '"'; $result = $connect_db -> query($resultInfo); $row_cnt = $result->num_rows; if ($row_cnt == 0) { define('PAGE_NAME', ''); define('PAGE_TITLE', ''); define('PSEUDO', ''...
1
d6a00808afe3885419f4521ba0bdf792
2b0f0ae148a74ce219db15b4ed1aa323
Устанавливает постер к статье (главную тумбу)
$url = $_REQUEST['url']; $validator = Validator::make(array('url' => $url, 'id'=>$id), ['url'=>'alpha_num_rus', 'id'=>'integer']); if ($validator->fails()) { return response()->json(array('success' => false, 'message' => $validator->messages()),400); } $obj = Object::...
1
5f0f56ae8a9f5b4e81ec720828c51479
1b93b5522a66ca27dfc88fae7d67fc39
Setups the world with placeholder tileset using a top-down approach. Anchor is upper-left.
Vector3 worldStart = Camera.main.ScreenToWorldPoint (new Vector3 (0,130,-5 )); for (int y = 0; y < 3; y++) { for (int x = 0; x < 11; x++) { placeTile (x, y, worldStart); } } }
1
e18aa21d768cec6a131c29c0fbc9370e
29f7551b9aba87bdee6af6a1bd4bc16e
Accesseur à un objet précis de la liste de dessins
public class Panneau extends JPanel public void setA ( ArrayList < Dessin > a ) { this.a = a; }
0
c29d2723a45692b87fd452c87d30983e
b1bb491d424bb5f0ad0e16621dfd9deb
物理计划:连接实现:使用嵌套循环算法
public class Test8 public Node connect(Node root) { if (root == null) { return root; } Node ret = root, cur; while (root.left != null) { cur = root; while (cur != null) { cur.left.next = cur.right; if (cur.next != null) { cur.right.next = cur.next.left; } cur = cur.next; } ro...
1
64f6f891b9b3e8913cc10049b7fe75f9
bfd57efdc3b3e7ed9cba8d58f813cc46
類似 T-SQL 中的 EXISTS 有下訂單的客戶
fun Shop.hasCustomerFrom(city: City): Boolean = customers.any { it.city == city }
0
bb197b3a764ea46733ca8ae887ace575
c9291c0bbd898e73e69c3a7cac0d368e
Returns the maximum angle covered by the sonar.
public abstract class PwmMotor public abstract double getMaxAngle();
0
4b5497afa78b82f1f0d4bc80c3ed19c2
7f282cf02592f60f2d160abd400f2c95
Calculates the sum of the square of deviations.
def calculate_SS(input_table, input_col, input_average): SS = 0 for field in input_table: SS += (input_average - float(field[input_col])) ** 2 return SS
1
84e604f14f8e916209ad2a52bb52b3bc
c2c8b6d99aee1e726d0f9e7df8bf3edd
返回下一个参数的类型。
namespace System public RuntimeTypeHandle GetNextArgType() { if (this.num_args == this.next_arg) { throw new InvalidOperationException(Locale.GetText("Invalid iterator position.")); } return new RuntimeTypeHandle(this.IntGetNextArgType()); }
1
6e6f4a5569d0eaac7633a4913d14a36c
35e785e2629f8c1f21bcd1b528258402
Raises the phase exit event.
{ if (triggerEvent == TriggerEvent.EventPhaseChanging && data is PhaseChangeStruct change && change.From == PlayerPhase.Finish && player.ContainsTag(Name) && !player.HasFlag(Name)) player.RemoveTag(Name); }
0
daa48e759efca553978c00b2d7069433
c96f5429c5f3baf73420bd31f04411b1
Get the t1 radius to use when canopy clustering is being used as start points and/or to reduce the number of distance calcs
namespace Autodesk.DesignScript.Interfaces double GetStartRadius();
1
d9931051fb883b6104558a860e59c99a
afa970f2252e1fdda1d46d0e2f62b422
Получение информации о месте проката по идентификатору
@Slf4j @Service public class PlaceServiceImpl implements PlaceService @Override public Place findById(Long id) { log.info(LogMessage.IN_FIND_BY_ID, id); return placeRepo .findById(id) .orElseThrow(() -> new NotFoundException(ErrorMessage.PLACE_NOT_FOUND_BY_ID + id)); }
1
19d5614c665da417438e09ef3f614795
7dd69cb80bf4953720ee8100ac9889ec
Test Inkbird parser for Inkbird iBBQ with 1 probe.
data_string = "043e2102010000d7652e9aec28150201060302f0ff0dff0000000028ec9a2e65d7f000b5" data = bytes(bytearray.fromhex(data_string)) ble_parser = BleParser() sensor_msg, tracker_msg = ble_parser.parse_raw_data(data) assert sensor_msg["firmware"] == "Inkbird" assert senso...
1
76406d9eb032f991fe1cde4eeecc736a
5e87d766c221a071162cd7035dd1df15
Deletes a resource group. When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
{ using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) { return _result.Headers; } }
0
b780f9d6f7dfc4b44060fa83835390cc
74da272cb45ac15defda544db3104359
DATE CREATED: 22/8/2010 Applies Bandwidth Expansion (BW) to a vector of LSPs. Prevents any two LSPs getting too close together after quantisation. We know from experiment that LSP quantisation errors < 12.5Hz (25Hz step size) are inaudible so we use that as the minimum LSP separation.
SilkEncoderControl thisCtrl, int[] xfw_Q3, int condCoding ) { int[] TempGains_Q16 = new int[ this.nb_subfr]; SideInfoIndices psIndices_LBRR = this.indices...
0
9ce232c5facd1c119ad9264ccd3146c1
cd1b0db603d69eb0c8906c706130b46d
ストック休暇データを取得する。<br>
HolidayDataDtoInterface findForKey(String personalId, Date activateDate, String holidayCode, int holidayType) throws MospException;
1
3895a50d183cf2d0f653089c8478dce3
d1f7a17bacc4a7bc1f429a4b7a725493
创建一维数组
JNIEXPORT jobjectArray JNICALL Java_com_xfhy_allinone_jni_JNIMainActivity_init2DArray(JNIEnv *env, jobject thiz, jint size) { jclass classIntArray = env->FindClass("[I"); if (classIntArray == NULL) { return NULL; } jobjectArray result = env->NewObjectArray(size, classIntArray, NULL); if (res...
0
3626a1ae470ce26b118ccb5c5850ee10
07b5269d227f2f00059ee27d6c72fec5
Returns the {@code MeSH} record key for this chemical.
String keyId();
0
2ba8c8aa9a30ebc957a7e743d0dce40c
a96efb54a1de86718288693b08cf9647
Replacing symbolic related nodes and initializers in the original onnx model with new nodes and initializers that can be deployed to the specific backend.
param_data): node_names = copy.deepcopy(param_names) for i in range(len(param_shapes)): node_names[i] = layer.name + param_names[i] p_tvi = helper.make_tensor_value_info(node_names[i], param_types[i], ...
1
370ce1fadd32e48521c0f876f3f4ecf0
4695952e67642ce712f835901412e4b3
Reads which hacks are enabled.
void CServerInfo::ReadHackInfo(char* section,char* path) { char GameServerInfo[100] = {0}; this->m_CheckSpeedHack = GetPrivateProfileInt(section,"CheckSpeedHack",0,path); this->m_CheckSpeedHackTolerance = GetPrivateProfileInt(section,"CheckSpeedHackTolerance",0,path); this->m_CheckLatencyHack = GetPrivateProfileIn...
1
72ebf7353272f6e7ecc8cf3ec7a4d7c6
ba07c0961f91d39429aeb04c42d69f4f
Coloca como activos los horarios que hayan caído en el feriado dado, es la operación opuesta a la realizada por eliminarHorariosEnFeriados().
{ if($gestion>0&&$fechaIni!=""&&$fechaFin!=""){ $sql = "SELECT * FROM f_feriados_por_gestion($gestion)"; $sql .= " WHERE '".$fechaIni."' BETWEEN fecha_ini AND fecha_fin"; $sql .= " OR '".$fechaFin."' BETWEEN fecha_ini AND fecha_fin"; $sql .= " OR fecha_ini BETWEEN '".$fechaIni."' A...
0
a8d271f235ca3436b19946ad11060e19
110a6d9c9b74af5bc0b4ba51dc6a04f7
Reloads the current DPI-Settings of the system.
{ _pixelsPerDip = VisualTreeHelper.GetDpi(this).PixelsPerDip; foreach (System.Windows.Media.FontFamily fontFamily in Fonts.SystemFontFamilies) { fontFamilyCB.Items.Add(fontFamily.Source); } fontFamilyCB.SelectedIndex = 7; fo...
1
8bfe68c7b4be5f9f027726be91863bae
154dfc7cbbfb7993cbbdb74f6c6bf411
Mark the PTO as sent to Calendar
{ $db = Zend_Registry::get('db'); $appointment_id = $this->_getParam('id', null); $force = $this->_getParam('force', null); $appointment = Default_Model_Appointment::find($appointment_id); if($appointment) { $appointment->markPdiAsFinished($force); } die(json_encode(array("status" => "s...
0
7ec61866b0772cb027bccf38ca4f993d
1de9ce9a22fc392c1034297145c816a0
Encodes state (s) sparse sdrs and action int to joined decodable state-action sparse sdr representation s_a: s, action --> s_a It's a shortcut method, which combines following (but could be implemented faster): action --> a s, a --> s_a
class ActionAngleNetwork(nn.Module): def encode_decode(self, positions, momentums): actions, current_angles = self.encoder(positions, momentums) return self.decoder(actions, current_angles)
0
d8a0659ef60cad667de0b9f95ec8f2f3
68b8e6818572e5a93425d4cf6ee53156
An @abstractmethod member fn decorator. (put this in some library somewhere for reuse).
class ABCEMeta(ABCMeta): def __abs_method(): pass
0
7f0b62e45ab77af626c13d505a40433a
5c5724d7a518ffc96d47fa0e7c0b3789
beware, this migration will fail if migrated data currently exists w/ invalid refs
pub fn post_migrate<T: Config>() -> Result<(), &'static str> { generate_storage_alias!(Crowdloan, NextTrieIndex => Value<FundIndex>); ensure!(NextTrieIndex::get().is_none(), "NextTrieIndex still has a value."); generate_storage_alias!( Slots, Leases<T: Config> => Map<(Twox64Concat, ParaId), Vec<Option<(T::A...
1
211c2ed0d323275c40b206e1a90f595c
d05b8d7801db31d86e9e9f5715c7e1a5
Удалим папку с пользовательскими распределениями при загрузке главной страницы. Если ее не было то создадим.
String uploadFolder = userFolder.substring(0, userFolder.lastIndexOf("/")); CmsResource uploadResource; try { uploadResource = getCmsObject().readFolder(uploadFolder); } catch (CmsException e) { uploadResource = getCmsObject().createResource(uploadFolder, CmsResou...
0
4b1d07ac8987239371cffcd13782da99
df187584584640a3c75b2557a45c5bca
Re-parameterize the truncnorm function from scipy.stats; return random value from normal probability curve given mean, standard deviation, and lower and upper bounds
mu, sigma, lb, ub = np.broadcast_arrays(mu, sigma, lb, ub) shp = mu.shape if np.allclose(sigma, 0.0): return mu cdflb = normal_cdf(lb, mu, sigma) cdfub = normal_cdf(ub, mu, sigma) cdfsamples = cdflb + np.random.rand(*shp)*(cdfub-cdflb) cdfsamples = np.clip(cdfsamples, 1e-15, 1-1e-15)...
1
92e309f6630a694b8b4ccdbea7ba8410
77392addeaa3e8523b17a962f84ffd69
Returns the localized description of this manifestation in the language, optionally using the default language if no localization exists for the requested language.
public String getDescription(String languageId, boolean useDefault) { return model.getDescription(languageId, useDefault); }
1
98a7f286d12aaf4757484dd0bedb1f72
2d408c46ae28ba3eaad181dd053a7226
返回当前控制器类中不需要鉴权的Action方法名称列表
class SelfController extends BaseController protected function noAuth() { return ['loginByQrToken']; }
1
754b9f0c972868eeb6a569481635a38c
7f61448ad6da3ef0f9cb03f40c5be655
Always returns an empty object.
cases like (1)
0
c9f3b4e5bfbd1bf3b072f336c9fb5558
0b2896f9dacd79f9aafe3ed1e1de42d1
Compute the radius of gyration of an individual given their TrajDataFrame
def compute_rgy_single(x,y,lx,ly): nbeads = len(x) x = np.array(x) y = np.array(y) rgy = np.zeros((3)) for i in range(1,nbeads): dx = x[i] - x[i-1] dy = y[i] - y[i-1] x[i] = x[i-1] + neigh_min(dx,lx) y[i] = y[i-1] + neigh_min(dy,ly) comx = np.average(x) comy =...
1
3fe69bf283f1480d1ee4ea65462eb9bb
0517c767133f100eee59e12a446b601c
Clear method to clear the currency comparisons
{ landAcquisitionCost.Clear(); AcquisitionLeasing.Clear(); Syndication.Clear(); LandTransfer.Clear(); LegalPurchaseLease.Clear(); Environmental.Clear(); Contigency.Clear(); Mortgage.Clear(); Construction....
0
eb6947605b901ff34f95cdc3d12688a5
9d70a7198bb4e737668a1f838e8f676c
Determines whether the specified <paramref name="value"/> is a prime number.
namespace Open.Numeric.Primes namespace Extensions public static class PrimeExtensions public static bool IsPrime(this decimal value) => Number.IsPrime(in value);
1
e11bc2af6f41137244b18de8660515dc
2bea2a1351a9a741f2b0b505234b8af9
Check collision between sprite and group
class PhysicsSprite(pygame.sprite.Sprite): def collides_with(self, sprite): return self.hitbox.colliderect(sprite.hitbox)
0