query_id
string
corpus_id
string
query
string
code
string
label
int64
523f3ee650bc7d397d51a97e2f88d5ac
93149213874b6382436b1ca4a16ac06c
局部更新规则
buf = np.zeros(self.cells.shape) cells = self.cells for i in range(1, cells.shape[0] - 1): for j in range(1, cells.shape[0] - 1): neighbor = cells[i-1:i+2, j-1:j+2].reshape((-1, )) neighbor = np.delete(neighbor, 4, axis=0) if(self.timer>self.k): if(cells[i, j]==0): ...
1
d60103a54d872ca0346c6110c3e4bc11
990e4ea03de3f6c00b218408adaf2297
获取事件处理的结果数据。如果事件没有完成,就阻塞到事件完成为止或者超时退出 如果超时时间到达还没有完成,抛出异常
public T getInterruptibly() throws IOException, InterruptedException, CancellationException { switch (awaitInterruptibly()) { case DONE: return getState().getResult(); case FAILED: throw getState().getException(); case CANCELLED: throw futureMsg.opCancelled(); ...
0
f41e415785c1157c391ea4c73c021f22
144574f60711aa809e1087dbb4dc29de
查询指定角色的接口(以分类分组)
List<ApiEntity> getApiByRoleId(PrivilegeRoleDTO privilegeRoleDTO);
1
7c58f605e43c622beff2c2d1a8a81e2a
08483fc165ad951eb5c3485801453434
@brief Send several segments
void segments_Set(u8 start_Seg, u8 stop_Seg, u8 data[]){ u8 i=0; CS_L; spi_Send(ADDR_FIXED); CS_H; for(;start_Seg < stop_Seg;start_Seg++,i++){ CS_L; spi_Send(STARTSEGADDR+start_Seg*2); spi_Send(data[i]); CS_H; } }
1
10f9eddda768887cad04c72eceb8174d
85e0fd5f0a01fd141357d952662ac55f
constructor that loads a video given by foldername into the memory
class VideoDataUnfolder(object): def __init__(self, data_path): self.__raw_df = pd.read_csv(open(data_path))
0
79d97c12f8ebf99f8d06be2a604e2a49
7bf0df6fe9673ffdc9e08f21e0bc4a84
入力パラメータ(郵便番号または住所の一部)に合致する住所検索をする。もし空文字ないしは未指定であれば検索せず終了する。パラメータ値の半角スペースはトリムする。
public class AFABTE601SelectProcessParameter implements IBatchProcessParameter public void set住所条件(RString 住所条件) { this.住所条件 = 住所条件; }
0
c78fdd9e4e1b7b147c7265a7f7ef97f1
238fdcc94eb8545cd8cd6c888a0d412a
Search for a photo by location using flickr search api.
const url = `${this.APIURLSEARCH}&api_key=${this.apiKey}&per_page=${queryLimit}&lat=${query.lat()}&lon=${query.lng()}&format=json&max_upload_date=${this.pastDate.getTime()}&nojsoncallback=1&accuracy=11`; return this.http.get(url) .pipe(map ( (val: any) => { if (val.stat === '...
1
5f2022cd28298f7bfa1b9018beb1f34d
075613b757bf0c35fbf08592d634b50f
比较slice是否相等
if a == nil && b == nil { return true } if a == nil || b == nil { return false } if len(a) != len(b) { return false } for i := range a { if *a[i] != *b[i] { return false } } return true }
1
56a0dd9e381183f3303e9e90627ff55a
01c099fad6751d8116f4468fc51d135c
将节点h左旋转
AVLlink rotL(AVLlink h) { int height_left, height_right; AVLlink x = h->r; h->r = x->l; x->l = h; height_left = height(h->l); height_right = height(h->r); h->height = height_left > height_right ? height_left + 1 : height_right + 1; height_left = height(x->l); height_right = height(x->r); x->height = height_l...
1
f117619b3eb19fcd069bd5348d2515e1
cf7c67cf8023d29d9351bd27615500c7
@brief GSM send GPRS location message.
void runCmdLoc(char * cmdPnt) { boolean isValid; char gsmLocResp[GprsGSMLOCLength]; memset(gsmLocResp, 0, GprsGSMLOCLength); char sndTo[MemMaxNumLen]; memset(sndTo, 0, MemMaxNumLen); isValid = parsePhoneNum(cmdPnt, sndTo, GprsMaxNumLength); if(isValid) { ...
1
064d38675c032f46c84bc14045ade2f8
9d5c7f9ecfba5c67f5d538fab6266e23
设置目标View(AbsListView、ScrollView或RecrclerView)跟随手势移动而移动
public class SlidingUpPanelLayout extends ViewGroup public void setScrollableView(View scrollableView) { mScrollableView = scrollableView; }
1
db30b1164724b2a79b347d4076988d06
d5d840b305742c4fbf3466e7b4913d89
대화상태 초기화
void CDlgDialingBase::Init() { CDlgNormalTalkBase::Init(); m_eTalkState = TS_UNKNOW; #if IF_FEATURE_DIAL_ON_HOLD m_bAllowTran = false; #endif m_bSearchTransfer = false; m_strTitleInfo = ""; m_iCurrentAccountId = -1; m_eDialUIType = DIAL_UI_UNKNOWN; m_bFirstTextChange = true; ...
1
a1a8870ff53c131174d50b463ea6b73f
996a715e83fcdc05633bf94b471bbb3d
Date that the coupon was applied.
@Entity public class Coupon extends BaseEntity @Column(name = "used_time") @Temporal(TemporalType.TIMESTAMP) public Date getUsedTime() { return usedTime; }
1
f2f5053e8b53b3e1b419463ac8387439
579bcd800928fdedebe41b32ea35e7c0
Check if {@code Discretestepsize_deprecated_} has at least one value set. [Generated from RDFReactor template rule #get0has-static]
boolean hasDeprecatedHadithNo();
0
ce5ce77e91177426e3d96915273bca59
25264e570d456699b9dfeda21651bef9
<return>The authorization rules for the event hub disaster recovery pairing.</return>
{ if (resourceGroupName == null) { throw new ArgumentNullException("resourceGroupName"); } if (namespaceName == null) { throw new ArgumentNullException("namespaceName"); } if (notificationHubName ...
0
d4d2b8aa6882eb8d19d41853e0c3440e
cedc34918225aebde8bc6306d2a5e3b3
function to solve proximal mapping optimization problem.
tau, sigma, theta, x0, y0, log=stdout): x = x0 y = y0 z = x0 Kt = K.T for n in range(0,iter): log.write("cp it. %d\n" % (n+1)) y = prox_Fstar(y + sigma*K*z, sigma) xold = x x = prox_G(xold - tau*Kt*y, tau) z = x + theta*(x-xold) return x,y
1
b534670ff9dac4fc4c3585f8fc50179f
42fabe205211c746a979ef6d0546d34b
游标读取excel,分段插入数据库
{ try { string ConnStr; ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + FileName + "\";Extended Properties=\"Excel 8.0;HDR=YES\""; OleDbConnection conn_excel = new OleDbConnection(); conn_excel.ConnectionString = ConnStr; OleD...
0
9b127264615ddfb4a2b6124166e16566
b1243dbd22e6ec6cd557e167c9913f7c
the layout of the destination image subresources for the copy.
&self, info: &vk::DeviceImageSubresourceInfoKHR, layout: &mut vk::SubresourceLayout2KHR, ) { (self.fp.get_device_image_subresource_layout_khr)(self.handle, info, layout) }
1
65cbe7223a0367108ec49a711e4d50e4
31a9970b7ff386bd9076d50393182269
Initialises the translation probabilities uniformly.
init_prob = 1.0 / float(len(self.config['texture_map'])) / float(len(self.config['texture_map'][0])) starting_beliefs = [[init_prob for row in range(len(self.config['texture_map'][0]))] for col in range(len(self.config['texture_map']))] self.probability_matrix = start...
1
ebec66cf36efec119e2c3a447282a08d
8d465ee4537c542a2dabadca2c34da17
A callback that is fired when a new connection is added to the database
class DatabaseConnection(UDPConnection, Thread): def add_database_callback(self, database_callback_function): self._database_callback_functions.append(database_callback_function)
0
ed4c9a08a1416a421793675baacc5267
0eafa977148faa9297a69399e7be8845
不带事务执行api
{ if (this._isTran) { return ExecuteTranNoneQuery(CommandText, Parameters, CommType); } else { return ExecuteNoTranNoneQuery(CommandText, Parameters, CommType); } }
1
824044dad75e4c31540f2fee7022725d
0405a2d089d5ac39642babf20879d89d
checks pressed keys to change song
public void keyPressed(KeyEvent e) { int code = e.getKeyCode(); int codej = e.getKeyCode(); if (code == KeyEvent.VK_Q) { System.exit(0); } if (codej == KeyEvent.VK_SPACE && !(sonic.getCheckDead())) { Vec2 v = sonic.getLinearVelocity(); ...
0
81da5d44d949a689c34125621112d14b
c70e7d33ac4b9e29ac56d51f9c1c9733
Move to a position with obstacle avoidance
class Navigation(Motion, TfTransformer): def goToPosition(self, x, y): self._target_turn_delta = self._getDestData(x, y) if self._handleObstacle(): return False return self._goToPos(self._target_turn_delta)
1
6bc768d58043e6fbdb0680acd3d0c790
1497d804fb6268898ffce8659fcb36d2
Test getToken with empty alphabet.
class TestGetTokenTestCase(unittest.TestCase): def test_get_token_no_tokens(self) -> None: lexer: Lexer = Lexer() token_match = lexer.tokens.get_token("aaa") self.assertIsNone(token_match)
0
772adbd181f07010d129e4f6036b7cd7
d2a7bebf91beda89f8b3340154b57192
进入任务列表页
void TAAppLogic::on_TAviewTaskListButton_clicked(){ viewTATaskPage(); }
1
0b20cfbc70a34a7c6612f0631cc5eb5e
876c6eb0b697c581e4ac5d79d4c8d6c2
MakeUpdateEndpoint returns an endpoint that invokes Update on the service.
func NewUpdateService( auth account.AuthorizeService, repo Repository, saved pubsub.Topic[User], ) UpdateService { return updateService{ auth: auth, repo: repo, saved: saved, } }
0
a28e72405cd73ebeadcb29fd9de606a4
2942ad91f8ec281bd06277134371ebaa
cleanup the previewcode so it will not be saved
export class EventFormPage deletePreview() { if (this.file!=null) this.previewRef.delete(this.file); }
1
d1e00ff22a6c633f240896fee5890af3
670e1af63b74ca7461805444fff3a203
Instantiates a new controller.
class Controller extends \lithium\core\ObjectDeprecated public function __construct(array $config = []) { $defaults = [ 'request' => null, 'response' => [], 'render' => [], 'classes' => [] ]; parent::__construct($config + $defaults); }
1
b5a0dd2781a20977b80c42cea53c8a77
49703bf35f6352db8dc36d8477b85b69
Returns a reference to nil. this method are guaranteed to return the exact same object.
inline Object* _VM_Evaluate_Nil(unsigned int offset, Environment* env) { return OBJ_Nil; }
1
ff6898d3cfa0f61ac6d3071a53ed88c1
18da0e229e18296cf15ac010957eeade
Cleans brackets from a phrase.
public class Tools public static String deleteBrackets(String src) { src = src.replace("�?", "("); src = src.replace("�?", ")"); src = src.replace("(", ""); src = src.replace(")", ""); return src; }
1
176573a45c54e582da8aa76266334488
49ad1807bd73ed865c0a789302645e53
获取应用程序的web.config中配置的路径
namespace FJW.Foundation.Extensions public static class Strings public static string WebsiteAppPath() { return HttpContext.Current.Request.PhysicalApplicationPath; }
0
e9a686621fc3117d7c14572861547376
023e5238156134346b5d04c5abd9d913
#################################################################################### Calculte the GearyAuto Autocorrelation descriptors based on AvFlexibility. Usage: result=CalculateGearyAutoAvFlexibility(protein) Input: protein is a pure protein sequence. Output: result is a dict form containing 30 Geary Autocorrelat...
if "k" in kwargs: k = kwargs["k"] else: k = 3 if "lag" in kwargs: lag = kwargs["lag"] else: lag = 2 if "phyche_index" in kwargs: phyche_index = kwargs["phyche_index"] else: phyche_index = None if "all_property" in kwargs: all_property =...
0
559b2637767bb854a3d9b3ad273dfe3e
092a4bbaebe5adc4526c8597fb02672f
<para>This function sets all limits.</para> <para></para> <para>Remote-control command(s):</para> <para>CALCulate&lt;n&gt;:LIMit&lt;m&gt;:BURSt:ALL</para>
namespace FaceRored [CallbackBehavior(UseSynchronizationContext = false)] public partial class Form1 : Form, ServiceReferenceRobert.I_WCF_ContractCallback private void button4_Click(object sender, EventArgs e) { Limits.ShowDialog(); }
0
b75ef3d9543a9e02ba7a6e0dc3fd29fc
f8d25610a3103d0aec2931a3270bd437
Create the spreadsheet based on the start and end dates given
new_sheet_title = date_utils.get_curr_date_minus_days(0) if does_sheet_exist(new_sheet_title): print("SHEET titled {} already exists!".format(new_sheet_title)) return copy_sheet_request = { 'destination_spreadsheet_id': SPREADSHEET_ID } copy_sheet_result = service.spreadshe...
0
5c143bc8d79e625ffc8637564a8c195a
6b209d5abd784ec636de3b44b07d0730
环比分析,给一个开始时间一个结束时间,一个POS商户总ID,分析在指定时间指定商户的交易额
@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("userMerchantId")Integer userMerchantId, @Param("userMerchantType")String userMerchantType);
1
16b86e85b26290654bbc0af39240b134
86351fea9df59e24386735300ab6fc62
returns the profit the system provides in a year
return (int) (distributor.getInitialInfrastructureCost() + distributor.getProductionCost() + PROFIT * distributor.getProductionCost()); }
0
40c623de46c7fad1592e267ef0fd81a8
f0d5e36ed55761968314e02002ab4508
Returns an preorder-traversed array
order = %w[left right root] action = proc { |node, returnable| returnable << node.value } root.nil? ? [] : traverse(@root, order, [], action) end
1
6e8338159b96ab3f0cb568044ec45ee3
300d1fb81e37f496f932a756d7ef1d26
Gets the unix timestamp.
namespace RivieraStudio.Magic.Titan.Util public static class LogicTimeUtil public static int GetTimestamp() { return (int) DateTime.UtcNow.Subtract(LogicTimeUtil.Unix).TotalSeconds; }
0
232193eff26c45021c2a01cd9131f40b
6419e96014300b7a6857e39b1c5b9d07
Set ifname.
public function setName( $name );
0
03b9328001accd0dcc3d5ecba9fcda46
c56bb2b4ef3b466aa4600569dda278b7
get the api object from the factory
fun getApi() = create(ApiService::class.java)
1
e50237eb7af6bad9113a1bbd0c9adc5d
3a9d78d1ab9202675ed226bfc66fcf0e
This function will determine the angle of refraction for a given point on an object. unitin - unit vector incoming unitnorm - the normal of hitpoint unitout - the output n1 - outside refraction quality n2 - inside refraction quatlity
refReflect = nOut ** 2 * np.cos(theta) - nIn * csqrt(nOut ** 2 - nIn ** 2 * np.sin(theta) ** 2) refReflect /= nOut ** 2 * np.cos(theta) + nIn * csqrt(nOut ** 2 - nIn ** 2 * np.sin(theta) ** 2) return refReflect
0
94d269f5b893563d2f55639184c58050
e7484a3252c9d30583264ea0a35ae529
フォームが閉じられた場合、アプリケーションを終了する。
namespace DataQuality public partial class MainFrm : Form private void MainFrm_FormClosed(object sender, FormClosedEventArgs e) { Application.Exit(); }
1
d3701cfde80905ad7a7ddc8eaa01b7dc
e8fe7d12cd6c190c674937ecaccc6b15
Abstracts getting a kind flowset. This is to deal with possible differences in getting it for scripts and functions.
public class HandlePropagationAnalysis extends ForwardAnalysis< HandleFlowset > protected Map<String, VFDatum> getKindSet(){ return kindAnalysis.getFlowSets().get(currentStmt); }
1
aadebadb7e4394d2459f2c53922c19c5
4bc0def04f6802d061556a833149402d
this thread handles reception of ACK's
global ackCount while True: data, addr = sock.recvfrom(1024) if data: ackCount += 1
1
523e4916ae8fa6a38a50f23acc8ccbff
ae4399c70e17cc77d3a6af48c0f07c03
checks to see if project followed then changes button accordingly
{ if(FollowersContainer.SelectedItem == null) { FollowFollower.IsEnabled = false; } else { FollowFollower.IsEnabled = true; } }
0
ed366e2d565eb3929b7e8417cfd28538
65df1f2711a25dd823f941011957e4a1
function to retrive names associated with highscores from text file
ArrayList<String> strScoresList = new ArrayList<String>(); try { FileReader fr = new FileReader("WinTotals.txt"); BufferedReader br = new BufferedReader(fr); String strFileLine = br.readLine(); while(strFileLine != null){ strScoresList.add(st...
0
ae2f13ea7771411475f9d4cda5d82d89
f348e27848f3ab27be9c17af997a231d
获取 RPC_Client 单例
static $client; if ($this->clientRpcHosts) { if (! $client || ! $client->wasLoaded($tag)) { $client = IdgClientRpc::getClient($tag); } } else if (! $client) { $client = $this->newClient($tag); } return $client; }
1
ece199fac1969b0ae13d770eb577eb5f
394137b7c2b492dde10c9409eb6ede83
进入真题试卷页面
{ $userinfo = $this->user->getuserinfo(); $knowsid = $this->ev->get('knowsid'); $stid = $this->ev->get('stid'); if($knowsid){ if($userinfo['userid']){ $agrinTiku = $this->exam->getuserarginTiku($knowsid,$userinfo['userid']); if(empty($agrin...
1
f389f3c52c1c6ad173b76522c0f98e65
311d46bdc19a8f2e88be4c2916ace04d
Determine the relative hydrophone locations normalized by wavelength
if isinstance(wav, u.Quantity) and wav.unit.is_equivalent(u.m): return (-0.4 * np.interp(wav.to(self.wav.unit), self.wav, self.chi, left=0., right=0.) / np.interp(([0.55] * u.micron).to(self.wav.unit), self.wav, self.chi)) else: raise TypeError("wav should be ...
0
2450613912b940bf83ca0b5b19548afa
6db9236a489880f899dced1775e2671f
eg: user_name -> userName
name.replace("-", "_") namelist = name.split("_") newList = [] for s in namelist: s = s.capitalize() newList.append(s) camelString = "".join(newList) return camelString
1
39f52e8f476dc100c07e66875ab0ec9c
bc8f77c7188ccfc12ff6c19d1d9c20d7
Passe le booleen à vrai pour indique que le coup actuellement jouer est un double coup, false pour signaler que on sort du double coup Double coup designe un coup à 2 (ou plus) prises
public class BlackJackManager extends GameManager implements Serializable void douBle() { if (checkDouble()) { blackJackGame.playerDrawCard(); blackJackGame.inGameBet(2); endGame(); } }
0
251842507c2bdf1e4431ac0d391510a6
2502cbe1a0aaa8535e64e11a70389931
如果出现了循环引用,Excel应该提示。
try { OPCPackage pkg = OPCPackage.open(new FileInputStream("/Users/gang/Documents/表/Customers.xlsx")); XSSFWorkbook wb = new XSSFWorkbook(pkg); } catch (InvalidFormatException | IOException e) { e.printStackTrace(); } }
0
f1a6ed16ca520ecc1fe0b049e8ae4b24
83514b8f77065f22cee933301e925b73
Returns an array of all available config values
{ $contents = File::get(__DIR__.'/../../resources/views/config.blade.php'); $pattern = sprintf('/(@)?%s\s*(.+?)\s*%s(\r?\n)?/s', self::$rawTags[0], self::$rawTags[1]); preg_match_all($pattern, $contents, $matches); array_pop($matches[2]); return array_map(function ($match) { ...
1
be38c81eccbd56c026653fe1252f1975
07c3477fc2a319a77308183238d23a20
Returns the appropriate scope for validating a particular clause of a SELECT statement. <p>Consider <blockquote><pre><code>SELECT FROM foo WHERE EXISTS ( SELECT deptno AS x FROM emp JOIN dept ON emp.deptno = dept.deptno WHERE emp.deptno = 5 GROUP BY deptno ORDER BY x)</code></pre></blockquote> <p>What objects can be se...
public final class IteratorTag extends AbstractIteratorTag protected final String getScope() { return scope; }
0
44cf4b0e2e3a0ad2f9fba00222ee9608
cf12f577e49b1c9066b9957f1a30b641
Sucht jedes Attribut jedes Eintrags nach Äquivalenzen mit dem eingegebenen Suchwort ab
public class ArtikelVerwaltung public List<Artikel> sucheArtikel(String name) { List<Artikel> suchErg = new Vector<Artikel>(); Iterator<Artikel> iter = artikelBestand.iterator(); while (iter.hasNext()) { Artikel a = iter.next(); if (a.getName().equals(name)) suchErg.add(a); } return suchErg; }
0
71d50ca4c28f172cd9272d477f1c360a
d466ffe78b2ab880f5daf49fe9cb4f9f
Заполняет лист причин расходов
def show_plus(master, data): def listbox_cash_fill(): for q in range(len(cash_reasons)): del(cash_reasons[0]) listbox_cash.delete(0, END) for cash in queries.full_cash_out_reasons(): cash_reasons.append(cash) listbox_cash.insert(END, ' ' + cash.text) ...
1
a92c39282c3d4a2241a0e7cc809cb20e
0f5d35365de4380f49f87d09130bd135
Returns all {@link Project}s that are customly created by the given {@link User}.
namespace core.persistence IEnumerable<CustomizedProduct> findUserCreatedCustomizedProducts(string userAuthToken);
0
0316db332b211d8f16e448a472e6720e
0989042451170fd3a103b95f4503b585
Check for updates immediately, without waiting for the automatic update timer.
public class UpdateManager public void checkForNewVersion(){ checkForNewVersion(true); }
1
39f58f6075f4710a4ce7d1c908ffb786
ce2b077fcc85fd8a857d778a9088fe4f
Gets quality score of estimated camera. The larger the value, the better the quality. This is used for robust estimators such as PROSAC or PROMedS. This value is typically obtained from algorithms determining point correspondences.
public class Context extends Debug public double getQuality() { return quality; }
1
a368655ec3313f24a68893825ba6a09f
797d04fe2723c1ad693d5f804cb6c3c7
Publish JMS message.
return call(sj -> { return sj.getShard(JEDIS_MQ_OPS_BYTES).publish(channel, message); }, null, channel, message); }
0
691f22ce41c76da070e820a8385c8ef8
382ea21e7f7db9885385d8917c6792f7
Sets the title of this LolStatsChampion.
public void setTitel(String titel);
1
b2025940eab6277407863c90990b11b4
b6aa150b059eea767fc60a07dd9b2b9c
Funktion zum aufsplitten der uebernommenen Datumsangaben in Tag/Monat/Jahr
$return = array("year" => null, "month" => null, "day" => null, "time" => null); $date = str_replace(" ", "-" , $date); $dateArray = explode("-", $date); if (isset($dateArray[0])) { $return["year"] = $dateArray[0]; } if (isset($dateArray[1])) { $return["month"] = $dateArray[1]; } if (isset($dateArray[2]))...
1
c27432b7d028bb8236605d1698b89b92
1569248b3ac57cd3e26f6eebecfb48e4
Определяет существует ли модуль
class Upgrade20180226000000Task extends Shell private function moduleExists(string $value): bool { return file_exists($this->path . DS . $value); }
1
79e8b206b998ff35ad6332789e2bb89d
f154f0d1abd57d84df6cec6849b5206a
Put all slaves into sleep mode.
class Control def command__SLEEP_(options, inner_options) unless options[:_ARGUMENT_] @sleep_mode = true eval_commands([[:_END_FRAME_, {}, {}]]) return end @root_control.find_control(options[:_ARGUMENT_]).each do |control| control.sleep_mode(true) end end
1
a8dac39b64a904a2b07cd3bce7a997c3
918e274f2aafaf05116d2bd0e3e08e0e
При вводе незарегистрированного эмэйла возвращается HTTP 403
class InviteController extends Controller public function show($email) { if (Auth::user() && Auth::user()->email!=$email){ Auth::logout(); } return View('auth.register', ['registered_email'=>$email]); }
0
0d68bce2605f1fdfd2cf5326cd77fe84
8b22ea41d853949c1a13bd94c300dba2
遍历子组件,得到所有的pane组件
{ T tt= panelTransform.GetComponent<T>(); if (tt != null) { list.Add(tt); } foreach (Transform transform in panelTransform) { FindComponents(transform, list); } }
1
7d2a234a587152309a49888485777e27
0aa6f40a396a31be53ad85c230e05533
<p>Set the withCredentials flag on the request.</p> JavaScript Info:
@JSProperty void setWithCredentials(boolean withCredentials);
1
d5ad2f606fdba5c5f60449af4f18bb19
3506f1c37a83a8a31ee54d641d0faab0
wikibedia日本語版からランダムでページに飛び、その単語を取得する
with urlopen("http://b.hatena.ne.jp/hotentry") as res: html = res.read().decode("UTF-8") soup = BeautifulSoup(html, "html.parser") titles = soup.select(".entry-link") print(titles) shuffle(titles) title = titles[0] content = title.string link = title["href"] return json.dumps...
0
cd5325f3c44a40d8f03e7935fc02a91b
673700b569c628f69ae97d66d8ad2913
Sets the jar path from where it can be downloaded.
public abstract void setJarFile(String _jarFile);
1
79b496b997a47da544093f971f581659
7f61448ad6da3ef0f9cb03f40c5be655
function without parameter and return value
cases like (1)
0
cbe21c70935f6d4db5f3822b944f98db
68dc15d38af0e8c7b8b633490de9e645
设置Music的静态数据GameActivity
public class MusicPlayService extends Service private void initData() { musicList = mApplication.getMusicList(); musicInfoMap = mApplication.getMusicInfoMap(); favoriteMusicList = MusicManagerUtil.getFavMusicList(musicList); musicState = SharePreferenceUtil.getMusicState(mApplication); for (MusicBean musicBea...
0
60766242adc8d0a84012c7c65738c5d6
33ac835f9e9718922cafe7ec102aa022
Add pipelines to queue and run the queue
{ $pipeline = $this->container->get( $input->getArgument('pipeline-id') ); $amqp = $this->container->get(AmqpConnectionFactory::class); $sender = new PipelineProducer( $amqp, $this->logger ); $sender->startPipeline($pipeline, $this-...
1
79f0f37bf256365ee8d60e0e6caf879f
3d33c74f8128158665d0b6fd0edbea84
Poweroffs a running droplet. The droplet will remain in your account.
{ try { $response = $this->getClient()->get('droplets/'.$dropletId.'/power_on')->send()->json(); } catch (BadResponseException $e) { throw new \Exception("Error Processing Request"); } if('ERROR' === $response['status']) { throw new \Exception("The api returned status ERROR: " . $response['description...
0
8d74025ba34b08ca5a0521dfce0309aa
3f1491a778bbec7feb7e56819b5bfab5
Retrieves location of a text file that contains known values for this field
String audience, String language, String fieldPath ) { return (String)filenameOfFieldPath.get( format + "/" + version + "/" + audience + "/" + language + "/" + fieldPath ); }
1
32184984d5b540c16d2cd5b8eedb5242
3f7230fecb9a46e62280e6c73f0abb3e
获取平均心率
import statistics as s user = models.User.objects.raw({"_id": email}).first() hrList = user.heart_rate print(s.mean(hrList)) return s.mean(hrList)
1
03ddd7de1c7d04bf92ca8c075d7784e1
7a127019912cc9ebe3e45f6787ced3f5
promote to longlong
PY_LONG_LONG sip_api_long_as_long_long(PyObject *o) { return long_as_long_long(o, LLONG_MIN, LLONG_MAX); }
1
b3afd75a11f98345738259955c47a9b4
5df52b18ffee4da82266ef7698c7ec1a
r""" 用户消息通知页面
def notifications(request): container=loginPerson(request) container['dep'] = department.objects.all() p=Paginator(NotificationTable.objects.all(),1) page = request.GET.get('page') test = p.get_page(page) container['notifications'] = p.get_page(page) return render(request,'notifications.html...
1
effba4052ea2f1ac85375df08a6ec1ab
01365a076cf9f76c1935cd929f0621fb
세션 초기화
class MeetUp(object): def init_session(self): session['id'] = None session['member_id'] = None
1
2cd026048ee4ed51311f01d6ccfc0d78
7caae2ec74ec3fd765f87db216e8c5a6
Increments attempt counts and returns whether the policy has been exceeded.
class RateLimitingDirective: def _rate_limit_check_and_bump( self, name: str, max_attempts: int, duration: int ) -> bool: rule = self._rate_limit_rules[name] if int(time.time()) > (rule["start_time"] + rule["duration"]): self._set_new_rate_limit_rule( name, max_at...
1
91293bddd51297d31ac880d4b2add3d4
87e0d7d11c6d685c60358636f84a4ddd
J + iN
class BasicDNN(nn.Module): def rotate(self, j, R): jPhi = j[:,2:3,:] jPhi = (jPhi + 1 + R)%2 - 1 j = torch.cat( (j[:,:2],jPhi,j[:,3:]), dim=1) return j
0
95134f025808ba038eae9cbec696917b
ebbf74b64c1f5e7c53060cff50f66517
通过货品ID获取当前货品信息
namespace Bleum.Net.EL.LM.Biz public class VenderBizManager : BaseBizManager, IVenderBizManager public ProductItem GetMasterInfoById(Guid productId) { return Manager.GetMasterInfoById(productId); }
1
e66c696516d841c199d7d0a0b2d03adf
8ca84c2ce840e7665b310ebfe7ddf5ed
@brief Update Gas Gouge characteristic value
{ tBleStatus ret; uint32_t voltage, soc; uint8_t buff[2+2+2+2+1]; STORE_LE_16(buff ,(HAL_GetTick()>>3)); STORE_LE_16(buff+2,soc*10); STORE_LE_16(buff+4,voltage); STORE_LE_16(buff+6,-1); if(soc<15) { buff[8] = 0x00; } else { static uint32_t PreVoltage = 0; static uint32_t Status = 0x04; if(PreVoltag...
1
37ce40266497a49fc6c482b81306c053
58cf678c39b5e833b22a3a0b7bcde5ca
Clear <entryId> value
class PbCrossOccupyInfo extends \DrSlump\Protobuf\Message public function clearEntryId(){ return $this->_clear(1); }
1
8b690216c1f3126a83e47cb6e04f8e3d
3048d8df48c79a721b8714b53b3aa821
将数字以千分位显示(加逗号)
export class Str static formatNumbericThousand(n: number, rate: number = 1): string { var v: string = Math.floor(n / rate).toString(); var ret: string = ""; for (var i: number = 0; i < v.length; i++) { var c: string = v.substr(v.length - 1 - i, 1); if (i >= 3 && (i % 3) === 0) { ret = ","...
1
86913e2c54055d73853c5045e88e7048
b8d922397945cea1678afa03c1d66cc8
读取路网文件,并设置dijkstra法基础矩阵
{ ifstream ifs; string str; int lewp = 0; ifs.open(file.c_str()); while (getline(ifs, str)) { if (!str.empty() && str.at(0) != '#') { stringstream ss(str.c_str()); int i, j, v; ss >> i; ss >> j; ss >> v; i...
1
4e14ba873909e961ecba979fe6985783
cca31e8ed3ae95d83d317af2b13aa360
トラックボール処理の初期化
namespace kai public class Player : MonoBehaviour public void Initialize() { mIsPlayingStage = true; mTapCount = 0; transform.GetChild(0).GetComponent<TrailRenderer>().time = 0.75f; }
0
67321ab2a266966d14982197295d9ca6
7057a9194c9fcdbb23597e6ad0658465
アドネットワークをランダムで取得
namespace ToyBlockChain.App public partial class Program private static Address GetRandomAddress() { if (_routingTable.Table.Count <= 1) { throw new MethodAccessException( "invalid access; routing table size too small: " + $"{_r...
1
3a35d3d473be8a9ed4a314cbeca795b1
74b371fad5e9b6a01306567b81eb5acb
물고기의 움직임을 나타내는 함수.
function moveFish2() { let change = random(); if (change < 0.05) { fish2.vx = random(-fish2.speed, fish2.speed); fish2.vy = random(-fish2.speed, fish2.speed); } fish2.x += fish2.vx; fish2.y += fish2.vy; fill(0); noStroke(); ellipse(fish2.x, fish2.y, fish2.size); }
1
d6a0a8a987b2af5f08aeeb06e097344d
aa8910ad2a4ba7c390726dc09f0e6a50
获取表单元素所在的form对象,dom对象
var parentNode = $(obj).parent(); if($(parentNode).prop("nodeName") == 'HTML' || parentNode == undefined){ return 'undefined' ; }else if($(parentNode).prop("nodeName") == 'FORM'){ return parentNode ; }else{ return getFrom(parentNode); } ...
1
0ca49b70562d130bd399f135efa27458
77702c597b9e737ed3fb7aedb3865737
Walk a directory hierarchy and call a function for each file whose name matches a given pattern.
static void Process(p, level) REGISTER char *p; REGISTER int level; { REGISTER char *q; DIR *Dp; DIRENTRY *E; char buff[BUFSIZ]; #if 0 #ifdef MSDOS for (q = p; *q; q++) if (CTYPE(*q) && isupper(*q)) *q = tolower(*q); #endif #endif if (!GetStat(p)) Fprintf(stderr, "Can't walk...
0
d2c0d8261e5973305212d4815fe43804
e473832810524f53c140fbe01fa06231
Gets a dictionary and prints the keys and values of the dictionary as two beautiful columns.
def display_dict(dict_to_display: dict): print(*(': '.join(map(str, x)) for x in dict_to_display.items()), sep='\n\n')
0
7ecd1e79c63bcf8a47386fa9abb2150d
f98eb829cc99d93e73fbfbb93ac705fb
Given a store id you should return all the categories ids in the inventory.
func getCategoryPricesForStore(w http.ResponseWriter, r *http.Request) { }
0
0b6ebf555215d7fa623f627f6256dc2c
982fe818114c42a9b0731a8953df96b1
教师和班级关联
@Controller @RequestMapping("/gm_teacher") public class GmTeacherController @RequestMapping("/bind/class") @ResponseBody public Result bindClass(@RequestParam String teacherIds, String classIds) { String[] tids = teacherIds.split(","); for (String teacherId : tids) { gmClassHasGmTeacherService.deleteB...
1
587b23ca52e5554522e9f28a3f427ba5
3cff4e99e73586375bae29776afef20a
Stop filter requests
class UserController extends Controller public function filterRequests($route, $request) { if (!in_array(Auth::user()->email, Config::get('quizmaster.user::superadmin'))) { return Redirect::route('dashboard'); } }
0
abc20b45b51e4ae66b7317f98623d96b
356550956543ffb6391e7af2e40389ea
@brief Mixed radix-2/4 FFT (real to complex) of float(32-bit) data. The function implements a mixed radix-2/4 FFT (real to complex). The length of 2^N(N is 3, 4, 5, 6 ....etc) is supported. Otherwise, we alloc a temp buffer(the size is same as input buffer) for storing intermedia. For the usage of this function, please...
{ ne10_fft_r2c_cfg_float32_t st = NULL; ne10_int32_t ncfft = nfft >> 1; ne10_uint32_t memneeded = sizeof (ne10_fft_r2c_state_float32_t) + sizeof (ne10_int32_t) * (NE10_MAXFACTORS * 2) + sizeof (ne10_fft_cpx_float32_t) * ncfft ...
1
f1865b162bcd3cd6c5313f05e0bfc9ec
be18a050b3e0573af5b0fa262036415c
Returns a new object of class '<em>Database Input From Security Port</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
PortIn createPortIn();
0
985fca38ab1a49d613bbfb029ed1cc45
930650beb969d55a9d593735bc95a43a
根据模板ID,物料编号取得已设置铁箱类别的铁箱数(在YT_S_OrderMBTX表中)
namespace YTBZGL.BusinessLogic public class OrderMBXX_TXBLL : ICBST public int GetTXCount(string mbid) { return dal.GetTXCount (mbid); }
1
986e9cd61675d6fbde0fc4bc2b784683
78f9fd682efcaf9433d25966183f9a1a
выбор пункта меню
namespace penny_in_the_slot_machine class Automat protected void CheckMenu(int id) { if (id < 0 || id > 2) Console.WriteLine("<ничего не произошло>"); else { select[id].amount++; Console.WriteLine("- выбран " + menu[id].name...
1
1a6c7a6726331b31cee2d45959ff3283
1ba08e047246a5c0d68c825ff257cb8b
Função geradora do gráfico da Quantitativa Discreta //
var threshold = 0; for (var i = 0; i < barras; i++) { if (histo[i] > 1 && threshold == 0) { threshold = i; } } var S = [], Ns = []; for (var i = threshold; i < barras; i++) { S.push(i / barras); Ns.push(histo[i] / maxHist); } var numsTrace ...
1
8c025c9fa99b58a277249981ad0aad85
efccb7acced780becdea758af049b7ef
check point value and introduce increased difficulty
public class BrickBehaviour : MonoBehaviour private void StablishePointValue() { pointValue = initialLevel * pointValueMultiplier; }
0