query_id
string
corpus_id
string
query
string
code
string
label
int64
e00b89cad1be56ffeb401367efedb6d2
856b843e6678808aeb52309632ba1e97
Create a throw object at the paper's current position.
{ GameObject thrown = Instantiate(ThrowObject, startPos, Quaternion.identity); thrown.GetComponent<ThrowableObject>().ZeroGravityThrow = GetComponent<BaseThrowable>().ZeroGravityThrow; thrown.GetComponent<ThrowableObject>().ThrowMultiplier = GetComponent<BaseThrowable>().Thro...
1
062da58227e436eba08548d9e6b0c397
a6ad16ebd091207a750475cbc83bdda0
\brief Constructor of the scene-manager.
SmSceneManager::SmSceneManager() { PRIVATE(this) = new SmSceneManagerP; PRIVATE(this)->master = this; PRIVATE(this)->rendermode = AS_IS; PRIVATE(this)->stereomode = MONO; PRIVATE(this)->stereooffset = 0.1f; PRIVATE(this)->texturesenabled = TRUE; PRIVATE(this)->camera = NULL; PRIVATE(this)->overlaycolor ...
1
150fd1fd6f2a2943c1ab9dfa1e43a3ce
a13ba007e79e9431b7b54de1e5cf982c
Создержит ли круг точку (взято с запасом)
{ if (false == InPolygon(PG, C.Center)) return false; Double D = PointAlgorithm.ClosestDistance(C.Center, PG); if (D > C.Radius || DoubleAlgorithm.Equals(D, C.Radius)) return true; return false; }
1
063dab1c85c3108bf12f5a920600e86b
4020d95df56e99bf65eead0033f8e68e
Clones the date. Optionally overrides with specified parameters.
this.year = parserOrFormatter.year; this.month = parserOrFormatter.month; this.day = parserOrFormatter.day; this.hours = parserOrFormatter.hours; this.minutes = parserOrFormatter.minutes; this.seconds = parserOrFormatter.seconds; this.offset = parserOrFormatter.of...
0
8b7a558f63c8fc138f461615a9abade4
b1f1191a9faa6f18a2ef06d434efc7db
Fonction d'aide pour créer des autorisations de champs spécifiques Permet d'indiquer que tels champs extras se limitent à telle ou telle rubrique et cela en créant à la volée les fonctions d'autorisations adéquates. ``` ``` Objet possédant les extras Nom des extras a restreindre Identifiant (des rubriques par defaut) s...
{ $this->actions[$name] = array_merge([ 'label' => 'Sans titre', 'patern' => '', 'icon' => '', 'permission' => true, 'bulk_action' => true, 'attributes' => array( 'class' => 'btn btn-default btn-xs' ), 'callable' => null ], $args); }
0
871e34a0f998a6b98727801203e7d458
960f7ae92870b23ce0489184e0650169
add the links to 'to_crawl' repo after varifying that it is not a link that has alredy been encountered.
class WebCrawler: # Declaring class variables so that they are visible to all web crawlers/spiders; common for all web crawlers # Class Variables, shared among all instances def add_links_to_queue(links): for url in links: if (url in WebCrawler.queue) or (url in WebCrawler.crawled): ...
1
7a90aa084db05c983303eb6150c9163b
f2f3c23fd37743dfa99ca0f6a6a4b54c
Handle state modifications coming from other controllers.
namespace Controllers public class Manager : MonoBehaviour public virtual void dispatch(InputEvent inputEvent) { stateController.handle(inputEvent); }
1
80b22023308873625eb5f905cb941867
2517534a740a7f8f4a6054c5114c2bfa
Set gpios according to current states...
function mqtt_update() if (gpio.read(relayPinA) == 0) then m:publish(mqttChannelA .. "/state","OFF",0,0) else m:publish(mqttChannelA .. "/state","ON",0,0) end if (gpio.read(relayPinB) == 0) then m:publish(mqttChannelB .. "/state","OFF",0,0) else m:publish(mqttChannelB...
0
3b2f013432b50b51c4130768dc9a2412
49d91ddfb3a506fe23ca07924fa1665a
MDX-20の接続確認
uint8_t send[5] = { 0x56, 0x00, 0x36, 0x01, 0x03 }; uint8_t recv[5]; if (!sendBytes(send, sizeof(send), 200 * 1000)) { return SendError; } if (!recvBytes(recv, sizeof(recv), 200 * 1000)) { return RecvError; } if ((recv[0] == 0x76) ...
1
519d3cec4d9cb170cee662c7b11850bc
1f6d335c6c52b3f7f485ae10cdd3fb78
Sprawdza, czy program wyłapuje błąd, gdy próbujemy ruszyć na pole zajmowane przez inną naszą jednostkę
public void WalkOnWater() { Assert.IsFalse(new MoveCommand(GameBuilder.CURRENTGAME.Players[0].Race.Units[1], (new Position(5, 5))).canDo()); new EndTurn().execute(); Assert.IsFalse(new MoveCommand(GameBuilder.CURRENTGAME.Players[1].Race.Units[1], (new Position(8, 6)))...
0
07c3fbdcecd692d8b5a7f75043093350
284a496ca040db6dd5971b25fad81247
Focus first focusable element.
return new Promise<boolean>(resolve => { this._executeOnStable(() => resolve(this.focusInitialElement())); }); }
1
60ef4c458e90e72f93133f61d9883e42
1946f587d62e02974d2226d8bb3c2f63
Get the db write collection instance.
if (pp_is_empty($this->_collectionName)) { throw new \Exception("Must specify a invalid collection name"); } $collections = o(":mongo.collections"); $hostId = null; $namespace = $this->_db->name() . "." . $this->_collectionName; if (isset($collections[$namespace]["writes"])) { $hostId = $collections[$...
1
0ef4baa14d34c977228ee10f6937c670
963f90d365a41ed1429777490c1ae763
Test express --help via direct subproccess call
status = 0 try: console_program(["--help"]) except SystemExit as ex: if ex.code is not None: status = ex.code self.assertEqual(status, 0) self.assertNotEqual(self.tmp_stdout.getvalue(), "")
1
d8a183529dd60a4d025fa1de1d91afe1
d8bb083acd2c8e89321f5ed1653a6379
创建二维码,可创建指定有效期的二维码和永久二维码 zhangxinhe 2015-12-25
{ $params = [ 'action_name' => $actionName, 'expire_seconds' => $expireSeconds, 'action_info' => [ $actionName == 'QR_LIMIT_STR_SCENE' ? 'scene_str' : 'scene_id' => $sceneVal, ], ]; return $this->getResponse($this->curl->post('/...
1
c4968f6dcc6b51782a1c71ed88397f0e
244fc73333b8b0488d6e3bd30ff95f72
Generate unicode strings containing SQL expressions to alter a schema from ``from_version`` to the latest version.
class Migrator(object): def up(self, to=None): current = self.versioner.get() if to: to = self.unique(to).hash else: to = self.all()[-1].hash migrations = self.migrations[current:to, 1] frm = migrations[0] if len(migrations) < 2: raise ...
0
d3ce15166bdcc6331eb02b503c44fe5a
333cc041a2598c9128992deb2d52e3cd
Update the feed object with its items based on the scraped data. Will create new items if it does not exist or update the existing ones.
final class AMVE public function update_feed( $feed_id, $new_data ) { if ( ! isset( $feed_id, $new_data ) ) { return false; } $saved_feeds = WPSCORE()->get_product_option( 'AMVE', 'feeds' ); if ( ! is_array( $saved_feeds ) ) { $saved_feeds = array(); } foreach ( (array) $new_data as $key => $v...
1
3532000eb2b7212340814d86313e047b
744cd0e250053c590fead07b23602f49
根据ID获取作品信息
List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("id", id)); return doSomething("Works/detailWorks", params, true); }
1
8e65fc4c1d316a25e3238c422a1e65cc
671a23b592e14bd6ae12ee8d98da0403
Description :理财税点信息保存操作
namespace LionVERP.UIServer.BaseSet.TaxManage public partial class Taxs : System.Web.UI.Page [WebMethod(true)] public static string SaveTax(string fcode, string fid, string fname,string fvalue) { string r = ""; Sys_Tax sd = new Sys_Tax(); Sys_TaxBll sdb = new Sys_...
1
5ff940b9c738443cae77b71ce2cafef0
32dcafd9a8bf0309e906aa7f933a233e
Set layout view script suffix
class View implements IView public function setSuffix($value) { $this->suffix = $value; }
1
cad412c20206a33bbcd6fe723ff689c1
a9623fe40c805793dd3ce13f0861146f
Compute the Wasserstein divergence barycenter between histograms.
def js_divergence(p_hist:dict, q_hist:dict, normalize:bool=False): p_cnt, q_cnt = _balance_distributions(p_hist, q_hist) m_cnt = {} for k,v in p_cnt.items(): m_cnt[k] = 0.5 * (v + q_cnt[k]) js = 0.5 * (kl_divergence(p_cnt, m_cnt) + kl_divergence(q_cnt, m_cnt)) if normalize: js = 1 / ...
0
dfcec5748eaa1265d4763f84f523827a
a5717a31f5fd46ef5eac963903f413a5
Obtém o valor textual de um determinado nó decendente de um elemento XML
{ XmlDocument xml = new XmlDocument(); xml.Load(xmlDoc); XmlNode node = xml.SelectSingleNode(xmlNode); return node.Value; }
1
5b47014384d9443f4116490b26bb8a2e
414fe8c13af71afd12e25572b781e165
error listener for http server 'error' event.
function onError(error) { if (error.syscall !== 'listen') { throw error; } switch (error.code) { case 'EACCES': console.error('Port requires elevated privileges'); process.exit(1); break; case 'EADDRINUSE': console.error('Port is already in use'); process.exit(1); b...
1
7f409a37fc9fc5594c93eb7ce2461e51
dbcd70592b37e108455152df11492f36
Verify whether unsatisfied pre-conditions indeed trigger failures
IPackageFragment pack1 = fSourceFolder.createPackageFragment("test", false, null); StringBuffer buf = new StringBuffer(); buf.append("package test;\n"); buf.append("public class E implements Comparable<E> {\n"); buf.append(" private int[] tokens;\n"); buf.append(" p...
1
afc53c7066668e40ae7ee91b004098de
b2fc59fbff3f663f521adac13578f099
Gets the entity form display.
$form['selected_entities'] = array( '#type' => 'value', '#value' => array_map(function(EntityInterface $item) {return $item->id();}, $this->getSelectedEntities()) ); $form['#browser_parts'] = array( 'widget_selector' => 'widget_selector', 'widget' => 'widget', 'selection_displa...
0
0a8056a32860e3aabef35717ebc59f76
98bb61ba988621582be6fceda935f082
5g的WPA/WPA2-PSK TKIP/AES参数校验(testlink_ID:334)
ssid = "test-ft" passphrase="12345678" params = ft_params1(ssid=ssid, passphrase=passphrase) hapd0 = hostapd.add_ap(apdev[0], params) bssid0 = hapd0.own_addr() _bssid0 = bssid0.replace(':', '') dev[0].connect(ssid, psk=passphrase, key_mgmt="FT-PSK", proto="WPA2", scan_freq...
0
5cc9cb6cbad5abf1d4068691f9992a1e
3fe81b3d0b761d6aee7620d022656609
用户充值,增加冻结金额
$data = array(); $data['user_id'] = $uid; $data['money'] = $money; $data['status'] = 1; $data['created_at'] = time(); if ($this->create($data)){ $order_id = $this->add(); unset($data); $data = array(); $data['number'] = "freze_" . $order_id; $this->where(array('id'=>$order_id))->save($data...
1
fe463424050fd22d6b96f0276d4fbeb6
bea6c99267ff6ccff50ab843c1fbb67c
Fully copy a format structure, including the extradata buffer.
gst_video_info_set_format (GstVideoInfo * info, GstVideoFormat format, guint width, guint height) { const GstVideoFormatInfo *finfo; g_return_if_fail (info != NULL); g_return_if_fail (format != GST_VIDEO_FORMAT_UNKNOWN); finfo = &formats[format].info; info->flags = 0; info->finfo = finfo; info->width ...
0
6d606fc632752325a41fa3038550d814
d980509b14e625373ef410dcdea7a742
@brief Multi-core version of fork syscall's response handler
void smp_syscall_fork(msg_t* msg) { if (create_pcb_vanish_wait_struct(msg->data.fork_data.new_tid) < 0) { msg->type = FORK_RESPONSE; msg->data.fork_response_data.result = -1; manager_send_msg(msg, msg->req_cpu); } manager_send_msg(msg, fork_next_core+1); fork_next_core = (fork...
1
e690728d16896fc9ac260897dbe05b40
f224e6a929ed1ca03ef33f60f708ed18
GOOD: The user-provided value is escaped before being written to the log.
if let Some(ref raw) = raw { write!(self, "{}", raw)?; } else { write!(self, "{}", value)?; } Ok(()) }
0
001e345f63028b198b2d90eea808f059
5fc73c1cd6fed11f2d7c88f6556c2c21
Returns the value of the '<em><b>Remarks</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> Comments on or information about this ellipsoid, including source information. <!-- end-model-doc --> extendedMetaData="kind='element' name='remarks' namespace='##targetNamesp...
boolean isSetRemarks();
0
838a3b15a5aa4284ad52bc7377d7751f
f56261af2f820b7f953db9ed7e73f10c
Delete backups older than const DELETE_BACKUPS_OLDER_THAN
def del_older_backup_version(path): files_list = [] for filename in os.listdir(path): if os.path.splitext(filename)[1] == ".nk": files_list.append(filename) if len(files_list) > config.number_of_backups: keep_list = files_list[-config.number_of_backups:] for filename in files_list: if filename not in kee...
0
5415e0311f69f766864d76c45e53634c
3ecf7ef1c89f039c6783a44aed9e0ce3
Estableix la vista per crear un grup.
class GruposController extends Controller public function create() { return view('catalogos.grupos.create'); }
1
1bc190bc01e177e8ff6d09f7e5929bc1
61d79b3d9c9412d8ad699c991633f93d
Writes the k-itemsets to file.
with open(filename, 'w') as f: for smi in combinations: f.write(smi + '\n')
1
afa421422434cb7e6949bfa9fa744a03
a94e6708fd86f826c152211b80115518
Генерация поля для вывода значения пароля без возможности ручного изменения
{ $len = strlen($this->getPassword()); $val = ''; for ($i = 0; $i < $len; $i++) { $val .= '●'; } return $val; }
1
867425fd5208e965315d200418269f4e
e545ec9bb7c4a8408df8a7abf5d34225
Erstellt eine neue GeoMap-Instanz, die eine Leaflet-Karte kapselt.
this.map = L.map(mapId, Object.assign({ center: CENTER, zoom: ZOOM.minZoom, layers: [L.tileLayer.tileServiceProvider('Google.Satellite.Map', ZOOM)], zoomControl: false, doubleClickZoom: false, renderer: L.canvas() }, options)); ...
1
b59d0348ee1eb1cec69faf72bba63e46
6f8026a6dd9831d4aaeee06e114c3363
Generates quadratic curves to approximate this arc
int sample_size = 100; control_.push_back(glm::vec2(50, 30)); control_.push_back(glm::vec2(100, 110)); control_.push_back(glm::vec2(167, 167)); control_.push_back(glm::vec2(200, 20)); control_.push_back(glm::vec2(330, 35)); control_.push_back(glm::vec2(400, 200)); control_.push_back(glm::vec2(350, 380)); contr...
0
83ed7e2cda46fd4fd339932a2affdac6
d0de3c617c888980ed5612f375e96067
Solarized dark color scheme. ## Examples
class ColorScheme: def __init__(self): self.bg = BLACK self.oc = DARK_GRAY self.ic = GRAY self.title = YELLOW self.text = WHITE self.on = RED self.off = DARK_RED self.light = YELLOW pass
0
b22917ce7452057e3b124fc42aed604e
cc8fbd27a32f5d45365186bc81061dd2
* function that uses a struct
PINVOKELIB_API void TestStructInStruct3(MYPERSON3 person3) { printf("\n\nperson passed by value:\n"); printf("first = %s last = %s age = %i\n\n", person3.person.first, person3.person.last, person3.age); }
1
d899fe661df4b46243265344ae0a4915
382a319643bc1219e2591f9688d16292
When passed phone number(s), returns a list of matching <user> objects. The method only returns matches of people with whom you are not already friends. You can pass a single number as a parameter, or you can pass multiple numbers separated by commas. HTTP Method(s): GET Requires Authentication: Yes
{ if (phones == null || phones.Count == 0) { throw new ArgumentNullException("phones"); } const string methodName = "friends.getByPhones"; var command = CreateUserCollectionRequestCommand(methodName); command.Parameters.Add(...
1
e25183da40c65ebe6203c0bced623409
00c9c34437e0214fdb6274bd810c9f7a
获得一个用户的信息 根据njustoj-id
UserInfoJpaEntity getUserInfoServiceByIdForJpa(Serializable id) throws Exception;
1
54c2414317169b22ee62e024a4539963
af3f1a0cc197c6770dfa5d84b3bf4456
Like `stdout_is_fixture`, but for stderr
def have_stdout *expectations StdoutMatcher.new(*expectations) end
0
f21f209ffc65a57fe89b0486bd918971
112f51084f1bcaaa88424900efbcae6b
Fetches all language entities
class LanguageMapper extends Mapper function& getAll() { $query = $this->newQueryObject(); $order = new Order($query, "isMain", Order::OrderTypeDesc()); return $this->mapAll($query->execute()); }
1
ec2a619d22f0761d8f914359aa69cabd
12ebbbbab5dc8416c6138483f8529a72
Elimina todos los inventarios.
void clearInventory();
1
8714a5039f0f5797fcfef774ad55c10a
3347f6ed0147b7d957c9f33db9f72a79
Get only administrators roles
{ List<string> roles = new List<string> { "0" }; return roles; }
0
5a10980701ca9371365bf99d38325a02
dd0b4a37166dc188059e0405c23f56c6
Возвращает рейтинг элемента по принадлежащим ему отзывам Рейтинг элемента - это рейтинг, взятый как среднее арифметическое из всех комментариев, принадлежащих этому элементу.
class ModuleComment_EntityComment extends Entity public function getRating() { return number_format(round($this->_getDataOne('comment_rating'), 2), 0, '.', ''); }
0
73d48657c69f50c1b3d7cda2de52862b
0df7f59762475f18db6a18a811396930
Performs morphological operations over the masks.
class MorphPostProcessing: def __init__(self, kernel_size=3, opening_it=1, erosion_it=1, dilation_it=1, contour_filter=None, box_filter=None): self.kernel = np.ones(kernel_size, np.uint8) self.opening_it = opening_it self.erosion_it = erosion_it self.dilation_it = dilation_it sel...
1
e4e660fbecb50fe50b3b4370b4f76c9e
b924875e7a2993a875ebb18782572ab1
Retourne le prix selon la classe et le temps de stationnement d'une voiture
double getPrice(char c, int duration) { double price, out; for(int i = 0; i < sizeof(packages[range-1])/sizeof(Package); i++) { if(packages[range-1][i].category == c) { price = packages[range-1][i].price; out = packages[range-1][i].out; } } int max = maxDuration[r...
1
930bf8f69c36f1de99714eb9c432e82d
18fdbe7f22b224ba89f054c318fdd1c3
Retrieve number of Pfam domains from last sequence search
with open(load_file, 'r') as f: h = "" for line in f: if line.startswith('HELIX'): l = line.split()[4:] if l[0] == chain: h += l[0] return (len(h))
0
8ea1bb8d223a16b7993ecd050eeea98b
e37324d3b6d0a2e90c48c93086a13d15
Test wildcard on map leaf should accepts single field.
json_mapper = JsonMapper({}) values = ['list', 'of', 'values'] result = json_mapper.map({ 'metadata': ['$array', values], 'empty': ['$array', []] }) self.assertEqual(values, result.get('metadata')) self.assertFalse('empty' in result.keys())
0
8975359ae744303552b4b3a669363a2c
8b2d7f99376fce5607186275a1139043
ラッパークラスの名前を返します。
public function getWrappedName();
1
8e72a9016f881a600d0bf41d8ac82ea8
0642770cc0253eb0d759508c9dcc93af
Calculates the inverse hyperbolic cotangent of the parameter
namespace Math3 T atanh();
0
67444c712024f1a3a03f127b73d4b1b6
b4ad355b80466edd1ee5e05a0987c582
<p>Whether this camera can currently take a photo.</p>
public class Camera2Wrapper public boolean takePicture(final ImageReader.OnImageAvailableListener listener) { if (mState != mPreviewState) { if (DEBUG) { Log.w(TAG, "It is invalid state to take a picture. state=" + mState); } return false; } mT...
1
fdb1a0aaf1fc9a781f18f7ce8aab3c0c
cf3f7526c8e91fd94f0a3c168da6aced
给视图提供classroom的数据
class ClassroomController extends Controller public function show(Classroom $classroom) { return view('backend.class.show', compact('classroom')); }
1
3cf13b1fb0549d82d704a317b93097a3
07b92cf99c1c69cc71d1cfb2dade0681
マスタータイマー種別を設定します。
void setTIMERTYPE(TIMERTYPEType value);
1
b3294600510bb5864644ac2a2217e9e4
a7c47f853f91bcc67793ca88cde5a5c1
Get issues of a specific version
{ $assemblyId = $this->params('id'); $issueId = $this->params('issue_id'); $issues = $this->voteService->fetchByIssue($assemblyId, $issueId); return (new CollectionModel($issues)) ->setStatus(206) ->setRange(0, count($issues), count($issues)); }
0
30decfc8e8590537d759147ea5b661bf
052f6d79da093c75f1db36a9c679f145
Converts each symbol in the operands array into their corresponding address if they are found in the SYMTAB
int operandValue; if (NumberConverter::isNumber(operand)) { operandValue = NumberConverter::getNumericValue(operand); } else { if (!SymbolTable::searchSymbol(operand)) { return {false, -1}; } operandValue = NumberConverter::convertHexToDec(SymbolTable::getAddress(...
1
24a5bc34c322951a750a79c9cf2e4677
989ef8974cce37bb36b0638928196097
Pass dynamic methods call onto Flysystem.
{ if (in_array($method, $this->passthru)) { $collection = $this->get(); return call_user_func_array([$collection, $method], $parameters); } return parent::__call($method, $parameters); }
1
702b5a18049d0a83ab7a97f4b0f52cee
751a79f438ed7a43559814c9b2980e6a
pass input to screen objects and debug
public class InputDebug : MonoBehaviour void Start () { }
0
fc4b4957abecf6e68f3eae885f8da596
716da7e93c59e3c73b7a364383ccd67d
Deze methode kijkt welke radiobutton is geselecteerd en geeft de juiste waarde mee
if(document.getElementById("button1").checked){ return ("a1"); } else if(document.getElementById("button2").checked){ return ("a2"); } else if(document.getElementById("button3").checked){ return ("a3"); } else if(document.getElementById("button4").checked){ return ("a4");...
1
540b522c0343ea71f3bb25ce9c86587d
b5360de702f131c0d6d279d2e1d40610
Get variable names for in/out for mapping it to/from lua
int i; XSQLVAR *var; cur_data *cur = getcursor(L,1); lua_newtable(L); for (i=1, var = cur->out_sqlda->sqlvar; i <= cur->out_sqlda->sqld; i++, var++) { lua_pushnumber(L, i); lua_pushlstring(L, var->aliasname, var->aliasname_length); lua_settable(L, -3); } return 1; }
1
4dac806019b405215dec0285dc03ffba
c336e83c466fb2f65845af2cff265898
вычисление функции методом секущих
namespace ПроектГПОКонсоль class Program static double F11(double[] x) { double sum = 0, mply = 1; int i, dim = x.Length; for (i = 0; i < dim; i++) { sum = sum + Math.Pow(x[i], 2); mply = mply * Math.Cos(x[i] / Math.Sqrt(i + 1)); ...
0
c384e59b48a0748a89ea78f9fc005982
cef5755a6c9c51e716f7c9c03616b1d2
The unique identifier for each ExecNode in the JSON plan.
class ExecutionPlanTagArgs: def value(self) -> pulumi.Input[str]: return pulumi.get(self, "value")
0
0f9e1cad5f67d27d130401892f300f98
70677c06f3d285f4331f8e635f4360fa
为4个按钮分别绑定事件处理处理程序
{ button1.Click += myEventHandler; button2.Click += myEventHandler; button3.Click += myEventHandler; button4.Click += myEventHandler; button5.Click += myEventHandler; button6.Click += myEventHandler; button7.Click += myEventHand...
0
59bf0f5f483bef3e12c98d06b6745e30
6af047a258df7be16e3c111f27f9cb10
Returns cached plan from plan cache.
{ var cache = HttpRuntime.Cache["C_Plans"]; if (cache != null) { return true; } else { return false; } }
0
55577ec13a5d4976a6eadc97178f4a43
b53fd68a49083b61999a53678477eb15
pass event (command) to UDP task
void udpstorm_timer_cb(){ scheduler_push_task(udpstorm_task_cb,TASKPRIO_COAP); }
1
526277b2919ba416a98ecd031bc8d780
72d0249bb57699648e70643a5807d364
Convert the encoded value into a Ruby value
base = read_attribute('value') return nil unless base converter = options['conversion_method'] || self.value_mappings[value_type] case value_type when 'object' return base.is_a?(String) ? Marshal.load(base) : base when 'array' base.is_a?(Array) ? base : base.to_s.s...
1
fe83a9736f0d442d8b407fbc893a5d7c
539cde872caef0e377526ca913144778
lắng nghe bảng xếp hạng
var is_ajax = false; var is_ajax_start = true; var err_ajax = true; console.log("load addPlayerRankScroll seccess") playRankScroll = new BScroll('#rankingTab', { preventDefault: false, scrollbars: true, mouseWheel: true, interactiveScrollbars: true, checkDOMChanges: true, fadeScrollbar...
1
47da10b9e7a36c781a53ee31c7c005b2
03235acda63c91d78ddd42f264eb2f4a
Retrieve RequestDetailTabChanged properties.
{ if (gdGrid.ActiveRow == null || gdGrid.ActiveRow.Index < 0) { InitializeDetailTabControls(); return false; } if (gdGrid.DisplayLayout.Bands[0].SortedColumns.Count > 0) { foreach (Infragistics.Win.UltraW...
0
d96c224ab503613964096bd0e2b99acb
4dd43b542cac6b4d4ba6075d8223f598
Encode a small integer op, returning an opcode
if i < 0x4c: return int_to_bytes(i) elif i < 0xff: return b'\x4c' + int_to_bytes(i) elif i < 0xffff: return b'\x4d' + int_to_bytes(i) else: return b'\x4e' + int_to_bytes(i)
1
ad73770db702847ad06db3a8f12c290a
a70500742b20a06d87e7540c52fd67ce
获取特定被操作实体的满足特定条件的操作人id集合
namespace Dscf.AuthCenter.Contract [OperationContract] OperaterInfoDto[] GetOperaterInfoList(int[] optIdList);
0
75d9df1477273b58746b357bc048adc2
826c7d8b30baa51d10da85f1a02f7f39
Given the port Group name get the port group instance name.
class InfiniBoxInquiryMixin(object): def get_target_port_group(self): return self.get_device_identification_page().get_target_port_group()
0
2f0c7cc2a51fa69e894342167a0b03ce
31082db565f6171904b0b726e67a18fc
修改Active Directory用户密码
{ try { DirectoryEntry uEntry = new DirectoryEntry("LDAP://" + userDn); uEntry.Invoke("ChangePassword", new object[] { oldPassword, newPassword }); uEntry.Properties["LockOutTime"].Value = 0; uEntry.CommitChanges(); ...
1
d509e5b851e4b73924aeeebc9f16ae46
a5601e99fedd2a5e40c01ae53d78e4b0
Разбить строку на строки определенной длины и добавить отступы.
{ $dest = mb_substr($string, 0, $mlen); $source = mb_substr($string, $mlen); while (mb_strlen($source)) { $dest .= "\n " . mb_substr($source, 0, $mlen); $source = mb_substr($source, $mlen); } return $dest . "\n"; }
1
3ea9ecb51e5fc67b26de70c55d39c6de
b77352000818038287f83b1a79fc6818
определение коэффициента альфа
class Logistic_Regressor(object): def alphA(self,x,y,theta,pk): c=float("inf") t=theta for k in range(1,200): a=k**2/50 theta = t + a * pk f= np.sum(self.c*np.dot(x.T,self.sigmoid(np.dot(x,theta))-y)+theta) if abs(f)>c: break ...
1
5c91375a256c588a1aa6d8729430c757
06facf9673d4d98efe66876c51f5b5ae
Средняя зарплата в зависимости от опыта
{ foreach ($all as $person) { if ($person['experience'] < 3) $sick_koef = 0.5; elseif ($person['experience'] > 3 && $person['experience'] < 5) $sick_koef = 0.6; elseif ($person['experience'] >= 5 && $person['experience'] < 8) ...
1
338e97ca32071a8fb42e96404f61ec7a
be060ed3bdbd3fa313c0d6ed947c6f8e
Returns a list of all matches to the url regex if present Not currently in use in this version of the code but may be relevant to future developers. Returns: (list): [A list of all matches to the url regex
class URLExtractorMultiRegexProcessor(URLExtractorProcessorBase): def extract(self, text): if text is None: return [] matches = [r.findall(text) for r in self.regex_list] return list(itertools.chain(*matches))
1
8bf53dd5394aa1921a215cc2daaf022b
c1c7fbe979ce67354d4729344b6057ea
store any changes we've made to the segments
class MySegmentsSynchronizer: def synchronize_segments(self): segment_names = self._api.fetch_segments(self._traffic_key) self._segment_storage.put(self._traffic_key, segment_names) return True
0
5663e2857ed5c8f5bcf72e6bb218f384
8ce7ba1bc670feea63067d1fc68bc0bf
返回该StartContext所包含的所有种子URL
if (seeds == null || seeds.isEmpty()) { seeds = new ArrayList<>(); } return seeds; }
0
95d0c029d7d45378a09c33c9a7df331a
fd31b018d827ea918e3eaa3c70287e9f
"protname.contactbench" --> "protname"
CString TruncName(CString AttName) { char *p = strstr(AttName, "."); assert(p); p++; return p; }
0
7cdf92cbc5012716b0f84dc8c418235b
924945a3e7deceb2aaf0397508c9fa3d
Get a value from a specific section, and data type.
namespace AnyConfig public partial class ConfigProvider public T GetFromSection<T>(string optionName, string sectionName) { GetWebConfigSetting<T>(out var value, optionName, sectionName, default, false); return value; }
1
adddbe6c8db0a5c148f360064acf408a
3f0558cc9f87ea1cd3532cb3cb280b7c
Инициализирует фигуру-стрелку
{ var figure = Instantiate(currentFigure.gameObject, transform).transform; while(figure.childCount > 0) DestroyImmediate(figure.GetChild(0).gameObject); figure.localPosition = new Vector3(0, figure.localPosition.y, figure.localPosition.z); while (currentFigure.chi...
0
467590e89f322ee7a4cf55b984fac877
0f8377b6a562e8502f22db2e3577f91a
Gets the pagination style
class Scraper public function getPaginationType() { return $this->paginationType; }
1
201422d1be13354d146c79166baf0f93
ef07a81723b30e9befb2bb2cf00bb67f
This function will set the period and the prescaler to the correct values.
void compare7_setPeriod(uint16_t period) { CCPR7H = make8(period,1); CCPR7L = make8(period,0); }
0
71cccbfa5bb9fef003995249b1d7c094
a965f2ae27232667773bc18e11041e55
Public method to determine, if a REPL can be started.
public abstract class FileEditor extends Composite public void startRepl(boolean alreadyRunning, boolean forChromebook, boolean forEmulator, boolean forUsb) { }
0
3d2a255950c3993ed39fc38bf04b0382
c6e3b12a90d023d7d7e02d2106824cc2
GET: api/PeriodoLocacoes
namespace WebApplication1.Controllers public class PeriodosController : Controller public ActionResult Index() { return View(); }
0
3dc634868aa79ac13d352c1ab28e878a
7b5061d39f09f4f0263b2b2be20f4e1b
ガンマ補正した色を計算.
gamma (float x) { x = pow (5.5555f * max (0.f, x), 0.4545f) * 84.66f; return (unsigned char) clamp (x, 0.f, 255.f); }
1
e0017bd02a624811238982c075cbf25a
f12f06632c3366dbb58567150858177b
Return the lesser term of this inequality.
Term getLeft();
0
b04e4ed6a7547d628fde77877cd5e651
77121f4e7097aeeadc1a5ba857f12dca
购物车页面应用规则
class GoodsCartModel extends \yii\db\ActiveRecord public function rules() { return [ [['u_id'], 'integer'], [['data', 'update_time'], 'safe'], ]; }
1
84c3cc5216ca3474df101e495e9da306
d32cc14e091a7067f4ba4e0504fc3e8a
Get instance of driver working with Edge browser
namespace SeleniumPrepare4Crawler [TestClass] public class HeadlessFirefoxTest private static IWebDriver CreateEdgeDriver() { var service = EdgeDriverService.CreateDefaultService(); return new EdgeDriver(service); }
1
96aaf469e12d38995564f16630cde49e
fcf61025d0b11b41bf51d32431bdedb6
初始化底分
function m:initData(top32,topOther) if top32 == nil or topOther == nil then return end self.top32_list = {} self.topOther_list = {} for k,v in pairs(top32) do local temp = {} temp.player1 = v[1] temp.player2 = v[2] temp.result = v[3] temp.index = k temp.d...
0
7f712eef9bc9cdcc26e108efc562aee4
14eaaa9ff233a2696571f3cc8d825487
魅族验证签名生成
class PUserIdentity extends CUserIdentity public static function genSign($param) { if ( isset($param['message']) && $param['message'] === '' && $param['app_client_id'] == 2 ) { $param['message'] = 'null'; } $param['private_key'] = '^5_yk=-y#@p6)feidfjol8@73g=s%!lvi8h=i7a4...
1
83fdabce196745ca9491fa3e87b989e3
63e6bb2869582fdd9666402d019b19ac
Crea una función a la que le pases un número y te
function newFunc(num) { return num + 1; }
1
ee914e6898f0058f68f3a65a07503605
9030820165c6ebd18b25c0212f62b3c3
It retrieves the value from underlying configMap checking for its presence and type. If the value for a given settingName does not have a value, it throws an {@code IllegalArgumentException}. If the type of the setting value does not match the expectedType, it throws {@code IllegalArgumentException}.
public <V1> V1 getValue(K name, Class<V1> clazz);
1
b512dcc7d52065b6ceb30e17b01d8d37
7709635e4814130d970cc022c8e908eb
The currently configured reel set in use.
{ if (cachedReelStripReplacementDataReadOnly == null) { cacheReelStripReplacementData(); } return cachedReelStripReplacementDataReadOnly; }
0
3efcde560533a9bea6b3b8412ccdc570
112ff55819cc924b2b25d4937c3c91ee
Regression test for #9610 - doesn't crash during traceback pruning.
test_result = TestResult(lambda:'wat', runner_id='foo!') test_result.start() root_tb = tb = mock.Mock() testify_frames = [True, True, False, True, False, True, True] for testify_frame in testify_frames: tb.tb_next = mock.Mock() tb = tb.tb_next ...
1
161c9ac1805271f1a370cc030a2516fc
1ee6216125098605dec1be36aa736393
Get the mode of the given presentation tag.
public class AvailableTag public String getMode() { return mode; }
1
76e2df413f7f5f56511af5a67cb1f568
31656f9b23f128b7194f23c5242fdc59
Tests that the details action returns 404 Not Found when host with given IP does not exist.
data = { 'name': 'example-api', 'hosts': ['172.10.0.13'], } self.client.login(username='john', password='john123john') response = self.client.post(self.url, data, format='json') self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) se...
0
e2594232afcf691e7209b18106c0a62c
cded4fc95f4dcef9d6117ffe948bbd3d
Get abandoned cart emails total from data extension e.g. [ 'sent' => 8635458, 'delivery_rate' => 99.95, 'open_rate' => 17.78, 'click_rate' => 1.91 ]
class AjaxClass{ public function getOverviewDetails(){ global $wpdb; $nonce = isset($_POST['nonce'])? filter_var($_POST['nonce'], FILTER_SANITIZE_STRING) : 0; if (!wp_verify_nonce( $nonce, 'agoraAbandonedCartNonce')){ die (); } $totalsOverview = $wpdb->get_results(" SELECT status, sum(`tota...
0
e90de698ffcbfa058c00f1fce9291254
49dd66ca6c20ccc6ffcd62f4b82ffdaa
Set the pitch field of a MIDI event structure.
{ jack_midi_data_t *buffer; buffer=jack_midi_event_reserve(buffer_out_midi, pos, 3); buffer[2]=velocity; buffer[1]=pitch; if(ison) { buffer[0]=(0x90 | channel); } else { buffer[0]=(0x80 | channel); } }
1
24ffe4f12fa480abcdc2f60f9c42f7c4
32a1165b2826bda85d766878421bec24
Draws <see cref="SerializedProperty"/>/ies in the default (native) way.
namespace JTRP.ShaderDrawer public class SubDrawer : MaterialPropertyDrawer public virtual void DrawProp(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor) { editor.DefaultShaderProperty(prop, label.text); }
1