query_id
string
corpus_id
string
query
string
code
string
label
int64
fead27e98d975f7ef894839ecf79b7da
80b60f5de74007d349282c5d2b11ed90
分割UDP数据包
{ var data = this.Udp.Receive(ref remote); var segment = Segment.Parse(data, 0, data.Length); Console.WriteLine("Recieve Segment [{0}]", segment.ToString()); return segment; }
1
1c83ebebdcc0a152da12ac18792292bd
f0bd6c6060810a37535e24b79f2c0238
Reads initial state from the API, processes existing resources, and kicks off threads to watch the Kubernetes API for changes.
var kubeClient kubernetes.Interface if _, err := rest.InClusterConfig(); err != nil { kubeClient = utils.GetClientOutOfCluster() } else { kubeClient = utils.GetClient() } informer := cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { r...
1
c9fb01f51282dd8b0f59bf1c9eb27e53
7dc420c239650723f9e7ff6d3c1ec828
id=1である書籍情報を取得
def idSearch(id): db.connect() try: item = Book.get(Book.id == int(id)) db.close() return([item.id, item.category, item.name, item.author, item.status, item.local, item.chapterNumber, item.description, item.lastChapterId, item.lastChapterName, item.lastChapterTime]) e...
1
b44e847064ffeb8851c4630577369969
bab2a8247bf76f2e0265395c7f7c5bff
Gets (as xml) the "ClickDate" element
public class ProvinceClick implements Serializable public String getClickDay() { return clickDay; }
0
52d4f1cadcae5375976f9c71c93d7f61
95aaf016d2547dc0c4920ef5649feed1
Put inventory on hold.
url = self._build_url(f'/v1/games/{game_id}/hold') print(url) headers = {AUTHORIZATION_HEADER_KEY: f'Bearer {access_token}'} return self._session.post(url=url, headers=headers)
1
c6c86a69053e5e52f9811a0b01971823
a0946a70ac1a9dc840d8b2c7efde9302
获取已访问link队列
public class LinkQueue public static Queue getUnVisitedUrl(){ return unVisitedUrl; }
0
5ea3aec7acee77f582ae4cf30d1fd98d
baf3de823a19545b9fbde0b6f972ca5f
! \private \fn static void APP_AppModeHandleKeyboard(uint32_t keyEvent) \brief This is a handler for KBD module events. Device is in application mode.
PRIVATE void APP_vHandleKeyRelease(teUserKeyCodes eKeyCode) { switch(eShiftLevel) { case E_SHIFT_0: switch(eKeyCode) { case KEY_1: vAppLevelStop(); break; case KEY_2: #ifdef CLD_COLOUR_CONTRO...
0
bdc5ca8b8d8c005a669fbd9a1bc48a80
68027d10c22d93833df7a47ce9c2d608
Draws the epithelium stored by this widgets parent. Draws the epithelium to a pre-selected GL context.
class EpitheliumDisplayPanel(wx.Panel): def epithelium(self, value: Epithelium) -> None: self._epithelium = value self.draw()
0
b102a5a5b8ac1f09a43599d016f260a6
fa66f5af87ad27adfd4970507706fe6a
verifies if the given node does even contain a bulkId
nodes = self.getNodes("all", "all") if (nodes == None or nodes == -1): return False for specificNodeDictionary in nodes.values(): if specificNodeDictionary.has_key(nodeID) : return True return False
0
58ab50612a97e9c74b315a1b5f1128a1
5a7b0e02220c350c7bcf45464524e881
Returns a new object of class '<em>Sequence Flow</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
public class App protected static SequenceFlow createSequenceFlow(String from, String to) { SequenceFlow flow = new SequenceFlow(); flow.setSourceRef(from); flow.setTargetRef(to); return flow; }
1
24c81a4454e80d23d3cd5178041b9008
1cf9995e6baf2da008c1cd2f5a2dcb1f
Find the setting with maximum utility Calls :code:`utility()` for an estimate of the benfit/cost ratio for all allowed settings (i.e. start, stop combinations), and returns the settings corresponding to the maximum utility. Returns: A settings tuple.
index = np.argmax(self.sweep_utility()) index_pair = self.start_stop_indices[index] self.last_setting_index = index return index_pair
1
c0aef764a5401ba7cdeee89729003d08
a6708206bcbd524d3978acf4e228099f
Generates numpy elements from the given `tfds.Split`. This generator can be useful for non-TensorFlow programs.
class InobusPetV4(tfds.core.GeneratorBasedBuilder): def _split_generators(self, dl_manager: tfds.download.DownloadManager): path = Path(_PATH) return { 'train': self._generate_examples(path / 'train'), 'test': self._generate_examples(path / 'test') }
0
e9804aedbea4ac16cf4dc9353c571243
30aed1e2651f9e99347690e5f4f8ba52
Processes a good item hit. Called from processItemHit.
{ if (mHits < 5) { mHits += 1; } else { CItem::setRemove(); } mHit = true; }
1
7acd35cdaa90a4ad8e5c431aeeff6c91
d01ff121fc78ccc7171b889c0e0e81c8
找到可消除行和列
ai_settings.zerolist = [] for i in range(4): rowlist = list(ai_settings.matrix[i]) current_num = 0 while current_num < 4: if rowlist[current_num] == 0: ai_settings.zerolist.append((i, current_num)) current_num += 1 return ai_settings.zerolist
0
e75a8e08eeec08d1e23e83924aaf43f7
00003cce1cb030da1b74d3a66f32a0d0
Gets the color for the tab separator.
{ if (!CanDrawImage ()) { return CBCGPVisualManager2003::GetTabTextColor (pTabWnd, iTab, bIsActive); } ASSERT_VALID (pTabWnd); if (pTabWnd->GetTabTextColor(iTab) != (COLORREF)-1) { return pTabWnd->GetTabTextColor(iTab); } if (pTabWnd->IsOneNoteStyle () && globalData.m_nBitsPerPixel > 8 && !globalData.IsHi...
0
e236462e1bffa111775db7c359bec01e
628932e154c6bfc705033a3602f0e938
Funzione per spawnare la parete cilindrica interna della dimensione corretta nel contouring
mylivella->mypiston1->alt_2 = new_param; mylivella->mypiston1->pos_y2 = mylivella->mypiston1->pos_y1 - mylivella->mypiston1->alt_2; mylivella->mypiston1->pos_cy = mylivella->mypiston1->pos_y1 - mylivella->mypiston1->alt_2; mylivella->myplate->pos_cyS = mylivella->mypiston1->pos_y1 - mylivella->mypiston1...
0
a6033f92de642c02bc33a5067157aee8
a4926dd6451e0f490491c5468dbf1cf6
Armstrong
class Solution: def armstrongNumber (ob, n): sum = 0 for i in str(n): sum += int(i)**3 if n == sum: return "Yes" else: return "No"
1
c25f8272cd1eb4d5f48a0b52c4f9da38
3ee378c9caa3a651664393e458f17741
Append urls to the done file
path = "/users/aoeiuv/desktop/catalogue.txt" with open(path,'a') as f: for href in urllist: f.write(repr(href)+"\n") f.close()
1
3c5408c0cd4918a71c12a415f9b303aa
fbf896d782b779af8cf7546065a8d41b
Function Name : rrcTagCheckHoTrigger Inputs : data_p - pointer to tag data in TLV API message buffer size - tag size Outputs : None. Returns : PDCP_SUCCESS or Error code Description : It checks PDCP_HO_TRIGGERED RRC tag and converts mandatory tag fields to Host byte order.
( l1_dl_tb_hdr_decode_struct_type *hdrptr ) { uint8 i, j, num_tb_set, tb_id, num_tb; uint8 tsn_to_queue_map_idx = 0; bch_config_info_type *int_bch_ptr; pch_config_info_type *int_pch_ptr; fach_config_info_type *int_fach_ptr; dl_dch_config_info_type *int_dch_ptr; dsch_config_info_type ...
0
cb2f7bb3f94fe5119959ee0e4e27ad5d
e53176b7d3ddccd495246cc0118f1b44
Elimina el filtro que se está aplicando en este momento, caso de haberlo.
namespace Aysa.PPEMobile.iOS.ViewControllers.Events public partial class EventsViewController : UIViewController, FilterEventsViewControllerDelegate public void ClearAppliedFilter() { this.FilterApplied = null; }
1
504734554d085891fc41d7ca4474630a
f6c00fe6d95a28ff834f425b8418b565
Runs the neural network, plots the training history and plots the results.
def run_mnist(num_epochs, num_neurons, batch_size, num_workers): neural_net = FashionMNISTNeuralNet(num_epochs, num_neurons, batch_size, num_workers) neural_net.train() neural_net.test()
0
b1da97fad19ef536d214c9c7bed2b85f
6ff5467cb358d6792412d61620b34e5a
Parse unique ID for job
{ $jobs = []; foreach ($array as $key => $value) { $stmt = $this->dbh->prepare('SELECT id FROM t_job WHERE id = :id'); $stmt->bindValue(':id', $value, PDO::PARAM_INT); $stmt->execute(); $jobs[] = $stmt->fetchAll(PDO::FETCH_ASSOC); } $jo...
1
1eaed99386855fc999ef530b2629e285
a8124cd6c3f7a9eff8d9390032bdbb21
外勤打卡——坐标微调
class UserCheckAPI(Home, http.Controller): def api_user_location_check_field_in(self, **kw): params_data = request.params.copy() if not api_tool.check_api_access(params_data.get('appid')): return json.dumps({'state': False, 'msg': '拒绝访问'}) openid = params_data.get('openid') e...
0
476f490f2977ad637525cf1463407f68
11c4f19e1725d85f321e93d22c7dedc6
adjusts font size based on the size of the window
function adjustFontSize (winWidth, winHeight) { return Math.min(winWidth, (winHeight - 100)) / winWidth * 2 + 'vw'; }
1
150d756813fb1fdf7722f8f20c52f01a
496f1b05aeba5c664b4cfdb271b36c68
Este método devuelve la hora a la que se producen mas accesos al servidor.
def hora_mas_popular(df): s=df['Hour'].mode()[0] return s
1
fa949a42697911ce1aa5464bd69a20fb
ada4a0df8808afcefc83e0a222fb4b42
Test relinking of nodes to history.
{ $node1 = $this->graph->getNode('http://example.com/node/1'); $node2 = $this->graph->getNode('http://example.com/node/2'); $node3 = $this->graph->getNode('http://example.com/node/3'); $node1_1 = $this->graph->getNode('_:b0'); $node2_1 = $this->graph->getNode('_:b1'); ...
0
41b7464c699fa169cc9045e92af35d7e
465340196bcebef9f9582de246d8e174
Modify the customizer (remove css editor)
function JMA_GBS_remove_genesis_customizer_controls($wp_customize) { return $wp_customize; }
0
9b74d5153528b92a1e707426c537de23
fe39a13ff784c22af73fc23a429076a4
Remove a page from the btree. Caller is responsible for having relocated any keys from this page that are still wanted. The page is placed on the recycled list.
{ DBJ_TRACE_ENTRY(); if (pageIndex >= DBJ_BM_NUM_PAGES) { DBJ_SET_ERROR(DBJ_PARAMETER_FAIL); goto cleanup; } #if !defined(DBJ_OPTIMIZE) for (Uint16 entry = hashArray[EMPTY_LIST_HEAD].next; entry != EMPTY_LIST_HEAD; entry = hashArray[entry].next) { if (entry == pageIndex || (entry >= FIRST_BUCKET ...
1
c8301ea6e93dcab3c2d6c7d04e7668c7
550baf58377c786bd81c24a1ca19efe3
Проверка, что при создании пользователя с существующим именем приложение реагирует корректно
class TestRegisterPage(BaseUICase): def test_register_form__existing_username(self): user = self.users_builder.generate_user() password = self.fake.get_password() email = self.fake.get_email() self.do_register_existing_user(username=user.username, password=password, email=email) ...
1
e0ee9af405853832b01103f64fa6dea7
b3c268e0d9ce3140482949e46d653d84
保存兑换每一个金额时需要的最小的硬币数量
class Test5_coin @Test fun test1() fun minCoins(money: Int): Int { if (money == 1 || money == 3 || money == 5) { return 1 } val state = Array(money) { Array(money + 1) { false } } state[0][1] = true s...
0
510198338831ec9e731a7714165e9a0f
aaed98bcb20d9b7480f0aae6ced11cf7
Evaluiraj podstablo i vrati skup stranica koje sadrže reč.
{ string naj_niz = ""; double naj = 0; int imenovalec; double stevec; double kolicnik; string[] a; foreach(string niz in tabela) { if (niz.Contains("/")) { a = niz....
0
86693be6c09da4f44dc428ca9a5b28cb
00a0970cfa34c32097b4876ff7ec233a
Moves the given email from a given user's account to the trash
{ try { AddPendingOp(); if (await LoginWaitAsync()) { await MoveMessageAsync(item, YMST.c_trash); } } finally { RemovePendingOp(); } ...
1
099cc504125f153e3242d3b55e4b0620
c1428117d0a5fff9c95a031f3c2a1b36
Get a single WRONG testing value for the specific type
{ switch (typeName.ToUpper()) { case "WEEKNOTBEREPEATEDFILL": return new CheckWeekValidator(); default: return null; } }
0
d26bc7441430fb8ab576272eae6827c4
e0bdf44ad0de4341127fb5d82091eedf
InputStreamとして取得したレスポンス情報を文字列用バッファに格納します。
public class ImsHttpClient extends ImsClient protected StringBuffer readCharacters(InputStream strm) throws IOException { StringBuffer sb = new StringBuffer(); BufferedReader br = null; InputStreamReader ir = null; try { char cbuf[] = new char[2048]; int n = 0; ...
1
fac90246701c86316a2e5769a9fab5aa
4f90726398d5634b9a8ded1b8635c44c
Provides an {@code Iterable} collection of the entries in this {@code Map}.
Iterable<Entry> getEntries();
1
46787d51e7838d563934f7e4aa9f203b
f8b4eb8c1c32bb1a17751acee6924396
Capitalizes the first letter of each word and removes any spaces between words to form a single, Pascal cased word.
function toPascalCase() { return this.toCamelCase().capitaliseFirstLetter(); }
0
c070053411cc67938f155b26a2373f13
758f01d90423bb39df6cb46ed6583d49
Handle a double tap on the side of the device
void onDoubleTapEvent();
1
e20d94e37053ae686bf6adc27532eb43
3baf8eabfd2d5a64ba410adbaab7e26a
makes the setup for the Yamaha YMZ294 component
void setup() { ymz.begin(); }
1
3aa56edfd4ecc8f047f2e9adc47e03af
af1e196c264624698935e269f97d972c
Executa a rotação RL na árvore.
AvlTree RL(AvlTree root) { root->right = LL(root->right); return RR(root); }
1
d21c012b2b0521c1c3eb876efe5892dc
f45712c9b14e43f43e02c69b84424d39
Gain references to particle system
public class PlayerParticleSystemManager : MonoBehaviour void Start () { }
0
e4c59d3be424e7b8e9b7b1599c7609a9
b0fa872b2f6afb5d75c69aca4beb5923
Shows the attach panel and selects whether or not to animate.
for (int i = 0; i < weaponsPanel.childCount; i++) { animations [i].SetActive (false); } animations [index].SetActive (true); }
0
43a05dddee8492fe11da15135bf6eff7
acd518ceb147fc63fa665153155ac241
Рисует машины
background.onInit(graphics); graphics.setColor(Color.BLACK); graphics.drawLine( wheels.getFIRST_CENTER_X() + wheels.getRADIUS() - 20, wheels.getFIRST_CENTER_Y() - wheels.getRADIUS() - 20, wheels.getSECOND_CENTER_X() - wheels.getRADIUS(), ...
1
67911821a58318c59a27b6da3bde7803
d6eb9284a095457f8117a42c6f0b6af6
按控制器组封装控制器
class Importer public static function loadController($controllerName, $groupName = '@', $moduleName = '@') { $controllerFileSuffer = C('controllerFileSuffer'); if ('@' == $groupName) { $groupName = Request::getGroup();; } if ('@' == $moduleName) { $moduleName ...
1
297e2c3dfc7e98a8a9b1699971646e71
eaf2774f690e67504794653fb3ad8fda
Free the space allocated for storing the process list
static void FreeProcess(struct Proc *proc) { sProcAllocListHead--; *sProcAllocListHead = proc; }
0
100346ef368b86b5eb222d496347a5be
92ca76c85c7e361e9904ddf157017885
Test method for {@link com.sessionnotes.model.domain.Address#validate()}
@javax.annotation.Generated( value = "by gRPC proto compiler (version 1.56.1)", comments = "Source: gincoinc/adamant/teller/v1/adamanttellerv1/teller_api.proto") @io.grpc.stub.annotations.GrpcGenerated public final class TellerAPIGrpc default void validateAddress(adamant.global.v1.ValidateAddressRequest request...
0
10afcc64b0648bdb50cb5edf7ec28fb6
c650f86f58008b26d14f0f146b4dd43e
加载类路径下的属性文件
public class PropertiesUtils{ public static Properties loadClassPathProperties(String propertiesName) throws IOException{ ClassLoader classLoader = PropertiesUtils.class.getClassLoader(); Properties properties = PropertiesLoaderUtils.loadAllProperties(propertiesName, classLoader); return properties; }
1
4037a1824680fd65852e928383955d66
270cd9581bf2ba119eff02c5b3a34585
get_hist | | Takes an image, a channel specifier, a position in the | image, and a neighborhood size. Calculates the histogram for the | neighborhood centered around the given image position, for the | given channel. Returns the calculated histogram. | | Authors: Scott Carda
MatND hist; hranges[0] = 0.0; hranges[1] = 255.0; channels[0] = 0; channels[1] = 1; channels[2] = 2; calcHist(&image, 1, channels, Mat(), hist, 3, histSize, ranges ); return hist; }
0
637990324c1a9e5b50fa14cf9773c779
373c6dc625401f2097cc10108978f8f8
Returns whether Onboard has been rendered or not
SharedPreferences get_data = getApplicationContext().getSharedPreferences(SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); boolean onboarded = get_data.getBoolean("onboarded", false); return onboarded; }
1
fd4c91b984616b589de19202a6e5e193
a4cd447b303d6a308f526249b4c04cec
结束的判断,当矩阵恢复到顺序排列时结束
def fin(temp): for i in range(3): for j in range(3): if temp[i][j] != end[i][j]: return 0 return 1
1
5404c7f40b57e3b668229f836caa44de
f31d04303f57b7073281888a8c53d3fb
根据委托编号查询【港股持仓冻结表】明细
StockInfoDto stockInfoDto = null; List<StockInfoDto> stockInfoList = new ArrayList<StockInfoDto>(); BigDecimal JRZD = BigDecimal.ZERO; if (!StringsUtils.isEmpty(customerNo)) { Map<String, String> inputs304101 = new HashMap<String, String>(); inputs304101.put("FID_...
0
a5c59d2a4bd2dc968efc9833c12aab56
d7ea581e864064a8dad37e1039f45788
Handles the left mouse button coming up when the tool is in the 'panning' state. Stops panning if the left mouse button is the drag button.
public class ExtendedPan extends ExtendedTool @Override public void onMousePressed(MapMouseEvent ev) { panePos = ev.getPoint(); panning = true; }
0
f58a0d0287fcf8fcf4c33c7757a54943
0a536ed18c4618e151f7742648e4cf99
获得已经审核通过的放映计划
class PlanModel extends Model public function getPlanFilms(){ $map['startTime']= array('egt',strtotime(date('Ymd',time()))); return M('CinemaPlan')->field('filmNo,filmName,count(filmName),copyType')->where($map)->group('filmNo')->select(); }
0
ee38ba46b35e74783c7a02da50e9a618
3ce4a639af5a63338abdb04cddd48f26
Test covered deals conforming to contract with chunk files and memory optimization feature enabled.
def test_merge(): t_now = 1592791800 market_horizon = config['lem']['horizon_clearing'] interval_clearing = config['lem']['interval_clearing'] n_clearings = int(market_horizon / interval_clearing) print("n_clearings: " + str(n_clearings)) t_clearing_first = t_now - (t_now % config['lem']['interv...
0
e640314cc74697a073e5e79d6de6923d
7d62595010843654960aa75df7578b62
ajax 获取当前等待处理的在线订单的列表
$.ajax({ url: '/include/ajax.php?service=business&action=paiduiGetMyorder&store='+shopid, type: 'post', dataType: 'json', success: function(data){ if(data && data.state == 100){ var list = data.info, html = []; for(var i = 0; i < list.length; i++){ html.push('<div class="wait fn-clear"...
1
e289d2719c7fff6cc523b1e59c4b3ea3
5f4b08e52179d280e0ad00b6cb952008
Get the panel for one entry in the legend which consists of an image and a description of the image
final MarkStyle style = createMarkStyle( shape, size ); final Icon baseIcon = style.getLegendIcon(); final int width = baseIcon.getIconWidth(); final int height = baseIcon.getIconHeight(); return new Icon() { public int getIconWidth() { return width; ...
0
976006bdc8d1e6041fa8beaecafb0ef2
8c78c9ca18c24282658a6d56a6811696
字符串的左旋转操作是把字符串前面的若干个字符转移到字符串的尾部。 思路:以n为界,两部分内部翻转,再全局翻转可达到左旋效果
class Solution: def LeftRotateString(self, s, n): if len(s) == 0: return "" char_list = list(s) for i in range(n): char_list.append(char_list.pop(0)) return "".join(char_list)
0
181ef708b8e4c484891a7572b3012008
cb60c9e3764cfd9e1825e040763beee7
We want all blinking element to blink in sync
for color in self.allColor: if (inp_color == color): self.set_blink(color) else: self.clr_blink(color)
0
2991b84027280011719d840d3bfaec62
18167b1705a33cad0a2d6b46ef1f6518
GET: CTVMonAn
namespace QL_CANBODOANHOI.Controllers [UserAuthorization] public class ChuyenMonController : Controller [HasCredential(GroupUser = "Thường Trực Cơ Sở")] public ActionResult Index() { ChuyenMonService service = new ChuyenMonService(); List<ChuyenMonEntity> chuyenmons= new ...
0
8ec01062bf46b2038d976cbd7d5c3356
01efdd8bcb7a59de6b83a8d56fbb4881
Calcula la formula acumulativo de cada valor de resultado
this.resultados = {}; this.resultados["corte_de_pavimento"] = this.form.value.longitud_tuberia_excabar * 2; this.resultados["demolicion_del_pavimento"] = this.form.value.longitud_tuberia_excabar * this.form.value.espesor_pavimento * this.form.value.anchobrecha; this.resultados["e...
0
457f3cb1117eafa80915cbd5e799afec
aa0733921df99beb6faa9608947d2fa2
Проверка ОГРН
$RF = checkPasswd($PF,$INN,$INP); if( FALSE==$RF ){ $RV=$NG; }else{ $RV=$OK; } return $RV; }
0
c49124d2c6fb3bd8f134a58be47d5ac2
0a88b26db60e71a74420143fcd8fb8be
Use the RGB LED as an indicator of WiFi status
def RefreshIndicator(indicator, device): if device != False: setIndicator(indicator, 'rgb(0, 170, 0)') else: setIndicator(indicator, 'rgb(161, 0, 0)')
1
f1416a89c5ff16b39b959d8821dd8a8e
b9d80176f402969ce244b404016af263
Method to be called whenever there is an update about the sync progress
public void onStatusChanged(final int which) { getActivity().runOnUiThread(new Runnable() { @Override public void run() { Account account = VentsellAccountAuthenticator.GetAccount(); boolean syncActive = ContentResolver.isSyncAc...
1
62ef8d856b61515d887f2b820527fec5
0ac1f5cbbf1d3b58fd4744631aa1812b
Updates subset of records with specified values.
namespace Amazon.CognitoSync Task<UpdateRecordsResponse> UpdateRecordsAsync(UpdateRecordsRequest request, CancellationToken cancellationToken = default(CancellationToken));
1
16f7cb225b770677f62fa463581e7c89
8788749e269244947f7f91101be235d2
服务器接收到客户端发送来要一对一传送的消息,判断要转发的另一个客户端是否存在, 如果存在则将原消息转发,如果不存在则传回消息给发送消息的客户端,告知目标客户端 不存在。
namespace ChatServerLib.cmds public class ONE2ONE : CommandBase<ChatSession, StringRequestInfo> public override void ExecuteCommand(ChatSession session, StringRequestInfo requestInfo) { var result = new MsgInfo(MsgType.SEND_RESULT); session.Logger.DebugFormat("{0} {1} {2}", session.U...
1
bc21333c16937de5786b1de97f90931c
a7062d017102e68f2a54ebd776ead3a6
Функция освобождает память занятую структурой HyScanDBInfoMonitor.
closeScan (RM_ScanHandle *scan){ RM_ScanMgmt *scanMgmt = (RM_ScanMgmt *)scan->mgmtData; free(scanMgmt->record); free(scanMgmt); scanMgmt = NULL; return RC_OK; }
0
880e75d4aac123f85f765d26b0bf74da
c7bd044200fc6d622ebf6a38119ba6f0
Sets the value of isPost.
boolean isPost();
0
26a377731a6034ae0af00e2b749c0d51
8bf26c9a14cae5e09c4c53dc83e126e9
Opens the settings window, with an optional specific tab
internal static class Core public static async Task<bool> OpenSettings(bool startup = false, bool cleanStart = false) { (bool accepted, ConfigData outConfig) = ViewEnv.ShowSettingsWindow(startup ? null : View, Config, startup, cleanStart); #region Save window state Config.Set...
1
acb0756e5c09ec8b5d15b9d0168571c2
f8856eae2d3219a7305174bfb7b1dd18
Initialization of consumptions
JsonNode newConsumersNode = update.get(Constants.NEW_CONSUMERS); if (!newConsumersNode.isNull()) { for (JsonNode crtCons : newConsumersNode) { int id = crtCons.get(Constants.CONSUMER_ID).asInt(); int initBudget = crtCons.get(Constants.INITIAL_BUDGET).asInt(); ...
1
f66efda09f9717a9482a7fc37119d6d9
2e7699d8f4f38dbc13dbead4f3b8a3ae
エクセルを閉じたときに呼ばれる
{ this.eWorkbook.Save(); this.eSheet = null; this.eWorkbook = null; this.eApplication.Quit(); this.eApplication = null; }
1
2337d9149af4f28e6ed0fecd2849ffef
2290e2a4186e7fecf9f4945ee838b03e
View of individual payroll company
{ $company = Company::with('main')->findOrFail($id); if ($company->has_sub_company) { $subCompany = Company::where('company_parent_id', $id)->get(); return view($this->_config['view'], compact('company', 'subCompany')); } else { $subCompany = ''; ...
1
a15850e98bb267c07720734556e959d1
c2662878600e95f801148ce334ea466a
constroe a barra de tarefas
public class GandalfTasks : MonoBehaviour void OnGUI(){ if(startedTask){ if(GUI.Button(new Rect(Screen.width/2 - 75, (Screen.height/2) + 26, 150, 50), "Limpar!")){ barProgress += 50; myTaskBar.SetBar(barProgress); if(barProgress == myTaskBar.slider.max...
0
f8e16002a6ab8c40fca5a9544b46d158
bbc0f1d0ebb4eb5acc69531d92e0ac99
Test deleting an attribute value.
m = DefaultModel() m._document['a'] = 1 with self.assertRaises(AttributeError): del m.b del m.a self.assertFalse(hasattr(m, 'a')) self.assertNotIn('a', m._document) with self.assertRaises(AttributeError): del m.attribute
1
2685134a1433fa7c5b613852a97b7538
b126e76b48b2603ec990f1fd23c08f79
Action for configuration of user login methods
{ if ($this->request->isPost()) { return $this->loginAction(); } else { return $this->formAction(); } }
0
1a9a19d8a1e785981ab25e9db3ebcfae
a956ccf353dc82ccf78f6b9a4c46350b
Test get medication entry.
print '('+self.test_add_medicament.__name__+')', self.test_add_medicament.__doc__ resp = self.client.post(self.url, data=json.dumps(self.new_medicament), headers={"Content-Type":"application/json", 'Authorization':'Admin'}) self.ass...
1
343b1fae9e5023a6d5d079c1372a3c54
f15b96c2b20179ac35b049227033486d
Set inter-compartmental flows (whether time-variant or constant).
class SimpleTideModel(NestedModel): def set_ic(self, T, S): self.ic.set_constant_stratification(T, S)
0
d6804759979a059eb367a48864ee2700
b606eb51e6d96da190c191c0f0dc9c02
Recursively get all linked children of an element
{ foreach (var child in elem.ChildNodes.OfType<XmlElement>()) foreach (var subChild in child.DescendantElementsAndSelf()) yield return subChild; yield return elem; }
1
e639ac7482e11ce3ccc1766d00b9df91
640e1495bf3ed54f795b2e119c7de26b
loads initial page. Without filters and at zero page.
export default class SinglePage extends React.Component componentDidMount() { this.setLoading(true); getDataByFilter(null, this.onDataReceived.bind(this), this.onDataError.bind(this)); }
1
38f0afaa911ca85d4e4e7674c470309b
27b2072d064ee2b097b06b01700b7f3e
增加到工作流的尾部,moveTask用于控制当已经存在key的时候,是否将它移动到尾部
@Service("processService") public class ProcessServiceImpl implements IProcessService @Override public void moveTo(String currentTaskId, String targetTaskDefinitionKey) throws ProcessServiceException { TaskEntity taskEntity = (TaskEntity) this.taskService.createTaskQuery().taskId(currentTaskId).singleResult(); ...
0
ffc9cec24bc46460599d819c7b4ad5fd
4ea70ea480623284ccd87efce7a2cdb9
Overwrite a timestamp with the adjusted value.
class StatsClient _normalizeTimestamp(d) { const s = d.getSeconds(); return d.setSeconds(s - s % this._interval, 0); }
1
62e553278262f8c52bcb53d701da6c99
1aa44505f8376dab4dbd9a6efc880e1f
функция отправки сообщения пользователю аргементы чат айди и текст со значением по умолчанию
$q = http_build_query([ 'chat_id' => $chat_id, 'text' => $text ]); file_get_contents('https://api.telegram.org/bot'.TOKEN.'/sendMessage?'.$q); }
0
a2245ed218e8497a04ae71b55eb68d0f
c38eeb3a2e0aecb357c9bd2df216275d
Returns the destination port transformation step for the specified server.
namespace Microsoft.Data.SqlClient.SNI internal sealed class SSRP internal static int GetPortByInstanceName(string browserHostName, string instanceName, TimeoutTimer timeout, bool allIPsInParallel, SqlConnectionIPAddressPreference ipPreference) { Debug.Assert(!string.IsNullOrWhiteSpace(browserHo...
1
d843992ea5a7284dedfce5239bb74f1c
4622b14013a6235ae9afd9edd33ae4ef
Returns an Adadelta (Zeiler 2012) trainer using self._rho and self._eps params.
super().__init__() self.eps = eps self.gamma = gamma self.alpha = alpha
0
0c86d17a495a9a7995a2a3de8d7526e8
fe286573eceeb1a83dd4c1080af85d5a
Metode som returnerer antall rader
public class CSVLoader public int rows(){ return this.rows; }
1
46dfb6b63809b87ca046311a8828b46e
349d5402a75990cddabb36d93624d469
按最新的时间排序回答,返回合集Collection
func GetAnswersByTime(questionID uint, limit int, offset int) ([]Answer, error) { var answers []Answer result := DB.Where("question_id = ?", questionID).Order("created_at desc").Limit(limit).Offset(offset).Find(&answers) return answers, result.Error }
1
916a2c837cfe7caec41181f39e47905f
502fe9ac3fc736800afdc936e8eb6218
Move Console function
HWND hWnd=GetConsoleWindow(); MoveWindow(hWnd,400,50,500,700,TRUE); Main RunFA; RunFA.readPath(); RunFA.welcomeMessage(); RunFA.readPath(); RunFA.loadScheduledEntries(); RunFA.loadFloatingEntries(); RunFA.operateFastAdd(); system("pause"); return 0; }
1
74dc654af6eaa4b450f9aedda99ce7b6
472bfda1e5e0b51bafbef486f4379dd2
Return true if this conditional row should render at the given index, either before it or after it.
match &self.frame_bound { WindowFrameBound::Preceding(v) | WindowFrameBound::Following(v) => Ok(v.is_null()), WindowFrameBound::CurrentRow => Ok(false), } }
0
a974405ae876d781c617feef36bde7bc
ebd76e35890ade9a0212c0eb47294152
https://matrix.org/jira/ => matrix.org/jira
url, err := url.Parse(u) if err != nil { return "", fmt.Errorf("failed to parse url %q: %w", u, err) } return strings.ReplaceAll(url.Hostname(), ".", "_"), nil }
0
35f8c33cb99a5dd43dec75d487afb9c3
5cd6760f51882ef4d6454310d76c3ee3
アニメーションランダム再生
public class ShootingStarAnimator : MonoBehaviour public void AnimationRandomShootingStar() { if (animationObjectList.Count <= 0) { return; } int randomNum = Random.Range(0, animationObjectList.Count); int i; for (i = 0; i < animationObjectList.Count; ++i) { if (!animationObjectList[randomNum].IsAnimation...
1
b20c96f14072d1e22880b33db115ab5a
91f1ab8caca3a7287d51727339fcf06e
回归树构建的核心函数,找到数据的最佳二元切分方法
tolS = ops[0] tolN = ops[1] if len(set(dataSet[:, -1].T.tolist()[0])) == 1: None, leafType(dataSet) m,n = np.shape(dataSet) S = errType(dataSet) bestS = np.inf bestIndex = 0 bestValue = 0 for featIndex in range(n -1): for splitVal in set(dataSet[:, featIndex].T.tolist...
1
e738c17ec70db6a8e20f8bcb999fc208
88657b6fc9a5e5e0bd321aca3c3500af
删除广义表L的第一元素,并用e返回其值
{ GList p; *e = (*L)->a.ptr.hp; p = *L; *L = (*L)->a.ptr.tp; free(p); return 1; }
1
73a3d3ae3459def81e707a82d5a06aec
ef84501ec792774d5a2b4603199bc715
Retrieves the map of term weights for each document.
class TermFrequencyMapper(object): def get_tf(self, documents): return _create_tf_matrix(documents, self.vocabulary)
1
2cb782356552e166b8a44a02c87473e7
348d396ce8defc3d2c8cbd03a9063f38
chooses the first attacker at random
public class EliteEnemyBehaviour : MonoBehaviour void Attack() { int rng = Random.Range(1, 4); if (rng == 1) { m_shooters[0].SetActive(true); StartCoroutine(WaveTime(m_shooters[0])); } else if (rng == 2) { m_shooters[1].SetActive(tr...
1
d796e6745ae99d30407f91d7b66fa27e
01a4a4b4762894c0fa3537d2ba179c68
Swaps the order of the two specified layers.
{ Transform leftTs = layers[leftIndex - 1]; Transform rightTs = layers[rightIndex - 1]; float z = leftTs.position.z; Vector3 lpos = leftTs.position; lpos.z = rightTs.position.z; leftTs.position = lpos; Vector3 rpos = rightTs.position; rpos.z = z; ...
1
c17f7f3350e83a69585153f35ab0c301
4250192fea3fc9651aedd15cdbb0ca77
将Java对象序列化成为JSON格式
public class JsonStringUtils public static String javaBeanToJsonString(Object object) { return JSONObject.fromObject(object).toString(); }
1
ea4ccc9e2328422bd4886524ea4d5646
385d9838a25ee07444d1ddea319e70fe
calcolo messaggi effettivamente inviati, mex_non inviati e pacchetti persi
op_t result=OP_FAIL; int fd_receiver; stringlist* users; message_t* notify; if (msg.hdr.op==TXT_MESSAGE && msg.data.hdr.len>configurazione->MaxMsgSize) result=OP_MSG_TOOLONG; else if(msg.hdr.op==FILE_MESSAGE && msg.data.hdr.len>configurazione->MaxFileSize) result= OP_MSG_TOOLONG; else if(!...
1
e97afd0377b5ca1e0a49ab00ad011f42
18c60a8de1605e534224af4c7c4acaa4
Ensure titles are required.
class Uploadcare_UploadcareElementType extends BaseElementType public function hasTitles() { return true; }
0
836ac3ab20e9b8d8d283a757825a4f0b
c38a2d407b447ec272b22261d892d075
returns the normalised cross product of two vectors
function cross3 (v1, v2) { return [(v1[1] * v2[2] - v1[2] * v2[1]), (v1[2]* v2[0] - v1[0] * v2[2]), (v1[0] * v2[1] - v1[1] * v2[0])]; }
0
d389781d5aaee0c71683911331b4a7ce
e052bfb323862b1b3e17364306fd3f23
Toma los registros NO SINCRONIZADOS en SQLite y los guarda en WebService
class ArticlesController extends Controller public function index() { $webservice = new Soap(new SoapWrapper); $data = collect($webservice->consume()); Articulo::where('id_articulo','>','0')->update(['id_utilidad' => 0]); Section::where('id_seccion','>',0)->update(['status' => 0]); ...
0
2d7eac6560d032f7efadc2e4eb6659ba
1c331f41415885ddee307811cbac8ddb
Loads the PHONEMES table with file-data.
with open(fname_parsed) as file_parsed: morphs = [] for line in file_parsed: if line == 'EOS\n': yield morphs morphs = [] else: if line[0] == '*': continue cols = line.split('\t') ...
0
35cf7516bbf0a552529b252bd4206576
1cd470584ae7e6aa5a6433389bbc3173
Tests successful sync
{ $this->getConnection()->executeQuery('RESET MASTER'); $this->importData('DataImportTest/updateProducts.sql'); $this->importData('DataImportTest/updateCategories.sql'); $this->importData('DataImportTest/updateContent.sql'); $managerMysql = $this ->getServiceConta...
1