query_id
string
corpus_id
string
query
string
code
string
label
int64
0d4474adacdaf7933ffe087b06db251d
5d8fce8d78b96d960aa2c5b7ec174a62
Returns the meta object for the attribute '{@link org.eclipse.bpel.model.partnerlinktype.PartnerLinkType#getName <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getPartnerLinkType_Name();
1
20fc59b167ea75ce42bb48c1e6c5eefe
8d10cab4afab107d862ae0461da3bfeb
function that normalizes the grammar
ret = ['$'] for g in grammar: for x in grammar[g]: for t in x: if not(t in ret): ret.append(t) if not(g in ret): ret.append(g) return ret
1
983377dfab4e8651745dbc9339b98796
9287a551311d03815cc17e48ced50c76
发布工作流定义
@Controller public class WorkflowController @RequestMapping("deploy") public void deploy() { workflowServiceImpl.deploy(); }
1
e5b140c858ffdd95cf70025aa0749e29
65e3189683008b6dfea2de2c82316642
1. Cant be blank 2. Cant be too long 3. Cant contain forbidden characters 4. Cant be in the DB already
if ($this->wantsToEnter() && strlen($this->getName()) < 2) { $this->errorMsg .= "* The name is too short, must be at least 2 characters"; return false; } else if (strlen($this->getName()) > 32) { $this->errorMsg .= "* The name is too long, must be lower than 3...
0
fa5d8206880fec2830f1b366280f7c86
300a94bdba004fd544153db54bf2862a
Set Finish Date Scheduled. Last date of the schedule.
class GetScheduleResult: def end_date(self) -> Optional[str]: return pulumi.get(self, "end_date")
0
16c1e8d54321ab20b6094bf59db5680f
515fb37e766678f59b65834e798b56af
constructs restrictions based on rules of checkers and handles errors associated with it.
namespace RootBase public class GameEngine void CheckRules() { if (false) throw new Exception("Rules violation detected"); }
0
554d46ee0087ae510292663bd1e18c41
d0c8786bafd469e5e27cc5bf9fff5f11
Check the connectivity of links in the topology.
host,port = (controller,8080) if len(host.split(':')) > 1: host,port = host.split(':') try: host = socket.gethostbyname(host) except Exception: raise Exception('Could not resolve controller hostname') url = "http://%s:%s/wm/topology/links/json" % (host,port) try: ...
1
94abe2a9c5e6d934905cfcc80a3e4d4b
af3aa5b4713cca9e5b2e008cf06aa856
Returns instance(s) from the given url.
class Parser(object): def get(url): return []
0
3e00e11dfed562b015eddfd9610cc594
14c4c4d6afa0a463f676d19221567386
POST /leave_type
{ var leavetypes = _leavetyperepo.FindAll().ToList(); var model = _mapper.Map<List<LeaveType>, List<LeaveTypeVM>>(leavetypes); return View(model); }
0
aff42f316cb557cd9508903cbd87d32d
698c995fad42ab00b575795666b1ecea
Checks if request queue contains request similar to the given one.
@Slf4j public class RequestService public boolean requestExistsWithId(@NonNull String requestId, String requestType) { return requestRepository.getRequest(requestId).isPresent(); }
0
32aae87bd547e62c086f13759ae8ea27
0fd332cf43e8e56e6eb3e2da08be8015
月の総残業時間を計算し、時間をString型で返す(HH:mm:ss)
int totalIntTime = 0; for (WorkSituation workSituation : workSituationList) { int OvertimeInt = timeToInt(workSituation.getOvertime()); totalIntTime = timeAddition(totalIntTime, OvertimeInt); } return intToStringTime(totalIntTime); }
1
a93b5fe7a4d153cb7a88b707940eafb7
beb273dd5431677295f7477b4d9742f5
Provide a replacement or new Canvas component to the JFrame
@Nullable JComponent createComponent();
0
e0010d5ace6250890b5a537b93b5dd71
0633edff445f6f1cc6284825ea4c0377
Test que comprueba la conexión con la base de datos de LTI
namespace DATABASES.PL public partial class frmOracle : Form public bool TestConexion() { try { conexion.Open(); return true; } catch { return false; } }
0
3fc1582e4d11ae06fc9dc2c516207dd8
69813b3c10a68aceb5e77e5853876c84
初始化 NSGA-II 进化算法
def NSGA2(nIter, nChr, nPop, pc, pm, etaC, etaM, func, lb, rb): pops = initPops(nPop, nChr, lb, rb) fits = fitness(pops, func) iter = 1 while iter <= nIter: print("【进度】【{0:20s}】【正在进行{1}代...】【共{2}代】".\ format('▋'*int(iter/nIter*20), iter, nIter), end='\r') ranks = nonDomi...
1
941e3146f56db604cd8957c257aea0e2
38d0a679c94658e36abb3bcb829ed5d1
Sets the value(s) for <b>dateTime</b> (When the study was performed) <p> <b>Definition:</b> Date and Time the study took place </p>
@Fluent public final class MicrosoftGraphDateTimeZone public MicrosoftGraphDateTimeZone withDateTime(String dateTime) { this.dateTime = dateTime; return this; }
1
b8e94598873dfe9d73b34eb42fe312f7
286bdfca4dc18332e205065e9279aaad
cpuUsageThrottle is a middleware that rejects a variable number of requests (between 0% and 100%) based on a historical view of CPU utilization of a Node.js process. Essentially, this plugin allows you to define what constitutes a saturated Node.js process via CPU utilization and it will handle dropping a % of requests...
constructor(callback, threshold = 10) { this.callback = callback; this.threshold = threshold; this.interval = this.threshold * 10; if(typeof process !== 'undefined' && typeof process.hrtime === 'function') { this.time = () => { const hrtime = process.hrtime(); return hrtime[...
0
96301236bbf6f92251af76eea5b44fbe
a481a3c11ced4dd64402b5f7859a8e90
再生中の位置(サンプル数)を取得する
{ FloatWaveSampleFrameCursor cursor = buffer.CreateFrameCursor(CursorPosition.Begin); while (cursor.MoveNext() && cursor.IsSilence()) { } if (cursor.IsEnd()) { throw new ApplicationException("全て無音の BGM データです。"); } return cur...
0
0ced2d7e7bbf23866d8c843a62b831e6
7a174abc97673b5a58fee60e4bd35d7f
メンター選択時のテキストを表示する処理
namespace FGOtest public partial class Form1 : Form private void servantComboList_SelectedIndexChanged(object sender, System.EventArgs e) { Servant servant = memory.getServantWithComboText(((ComboBox)sender).SelectedItem.ToString()); int objectNo = getTNoFromName(((ComboBox)sender).N...
1
1735f85687c76b5146fb429d0f8693ae
9aa5f4fb162797cd9eff4dea613d5ba9
Setter for <code>information_schema.INNODB_CMP_RESET.uncompress_ops</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class InnodbCmpResetRecord extends TableRecordImpl<InnodbCmpResetRecord> implements Record6<Integer, Integer, Integer, Integer, Integer,...
0
4bccda97310b211e650ddcc05e377307
30dcd5f997072596705841895e17e0d0
функция шифрования пароля, меняем первый и последний элемент местами
class encryption static public function enc_password($password) { return md5(substr($password,0,3).substr($password,-2)); }
0
d772201fe260b2a436a5216546dc885c
e7dc1d36ce59a10e098d2db38c20d4d8
Modifies the hyperparameter section of a runspec before yaml.load() is called on it.
data_dict = get_default_specfile(project_name) with open(data_dict, "r") as f: spec = yaml.load(f, Loader=yaml.CLoader) del spec[dataset_name] with open(data_dict, "w") as f: yaml.dump(spec, f, Dumper=yaml.CDumper, default_flow_style=False)
0
f654c638258f12d9ef0915636de8802d
e53cade6a9c007b7872c194434601721
インデックスを登録
{ $index = new Kohana_Migration_Index($columns, $traits); $this->_indexes[$index->getName()] = $index; }
1
ffe6ef22c56ce770aef5aa067f328a2e
5ffde6f71c82273e71e13dda4548f73e
Método para fechar tela de chat com tecla ESC
function escape(event) { if (event.key === "Escape") { buttonClose(event); } }
1
2e6b0da627edbb07bbb35cd5366aa44c
73130b26020c86bab6b681f2a6b2ad0d
返回畫板是否爲空
namespace Sub_Marine_Client public partial class GridPanelBase : UserControl public bool isEmptyBoard() { bool rc = true; foreach(Tile tile in m_tilesList) { rc &= !tile.isInUse(); } return rc; }
1
6278425fd6e2bdd0c6ff5c06b72ad8be
656b475c35c8534b03f26764d58e4df9
用于从权值字段信息集合移除全部权值字段信息对象
public final class BurrowUtilsV3 @SuppressWarnings({ "rawtypes" }) private static Map clearSurplusField(Map originMap) { Map resultMap = new HashMap(); clearFieldHandler(originMap, resultMap); return resultMap; }
0
e975e00db024f22576f8359abed115b4
077d8c819a6dd97fbd3a1aeb4681498f
Tests the various scenarios where we will throw an exception.
def test_exceptions(): remove_output_dirs() runner = CliRunner() result = runner.invoke(report, []) assert result.exit_code == 1 remove_output_dirs() runner = CliRunner() result = runner.invoke(report, ["-c", user_config_failure, "-o", od]) assert result.exit_code == 1 remove_output_...
1
14ce131adc2a9ba38985e5f83582eb8e
8b86ec220aaecc4de558e431b4a07cdf
ランダム方向のベクトルを格納
bInitDir.x = Random.Range(-0.15f, 0.15f); bInitDir.z = Random.Range(-0.8f, -0.6f); bInitDir.y = Random.Range(-0.15f, -0.05f); bInitDir = bInitDir.normalized; }
1
bf69b5af850d06a71644643a522ce797
007c709cecbc1bbb9a2a8776b416ca0f
Gets lists of tuples of indices where the light was on
class gsh_datalist(object): #constructor def get_fullSpectrumLight(self): data_points = [] if self.sampleCount > 0: for point in self.samples: data_points.append(point.fullSpectrumLight) return data_points
0
3b2a165e7b4ea3d05be8013e173ace2d
fb5f2ed23a06186c689f2d1d8e0654b8
Initiliazes the GST Player to read the stream.
class GstDriver(SoundDriver): def __init__(self): import gst self.gst = gst self.player = gst.element_factory_make('playbin', 'samplitude') bus = self.player.get_bus() bus.add_signal_watch() bus.connect('message', self.on_message)
1
6cb08cb343796fe6edfb6a77f2bfbe7d
437c3a904bd4eed8d1ffce4cd678655c
根据身份证号获取所有订房信息
List<PrenatalReviewRecord> selectAllByidnumber(String idnumber);
0
f339db695857ada25c205fc55d8d161c
15e78bee2b447d2924bc2015d4b9725a
Gets the NMS function provider.
namespace ViennaNET.Orm.Factories ISessionFactoryProvider GetSessionFactoryProvider(string nick);
0
e9194c25ac9f898a0dfa189c34588f58
278e1a8245a784a3a8b32c47c1a62e23
gets quadratic variables in quadratic part
class ObjectiveInterface(BaseInterface): def get_num_quadratic_variables(self): return len(self._quadratic)
1
9bffc7547643532fef2f808f608bdafa
6c63d42d04d24d213eab68953b9f3ba9
Get the plaintext tally for the election by composing each Guardian's decrypted representation of each selection into a decrypted representation
class Tabulation(object): def _tabulate_irv(self): self._tabulate_setup() while self._process_an_irv_round(): if self.testing['stop_at_end'] == self.nbr_round: break return self.elected(), self.status, self.tallies
0
c658a1cab2e016f5d959d7903532b175
5a1de22c884137137dec13b0e64abe1f
Get the beginning index of the middleware registrations
public function getStartIndex(): int;
1
3c8dcf2e73c37623675f923cf5347a2f
55035ca8f18b9bca21972f746e3fdd79
Supprime de la liste les telechargements termines
$.ajax({ type: "POST", dataType:"json", url: Routing.generate('piltasker_deleteTList'), data: 'tListId=' + id, cache: false, success: function(data){ $('#tList-'+id).remove(); $( "#tab-"+data.stepId ).width((data.nbrOfLists+1)*260); } }); }
0
72c16af7f7e8a5cd7a3bc722117fa29e
dfa202b825dca9b17c99a521fd081d8d
Runs the "set LED color" command. Expected format for args: { led-index, color } Returns E_ARG_FORMAT if the LED index is out of range or the color code is invalid.
void cmd_set(char *buf) { worker_mode_t mode; char *p = buf; while(!isspace(*p)) ++p; while(isspace(*p)) ++p; mode = parse_mode(p); if (mode != wm_unknown) { int8_t param_idx = 0; uint16_t blink_seq[BLINK_SIZE]; char *param = strtok_P(p, PSTR(" \t")); while ((...
0
34ef58415d44006a95a63157e65b3bef
45bf580e6af8cf67fbe709003c232429
切换购物车指定商品的购买有效期
String customerUuid = ""; String customerType=""; String userType = LoginUserHelper.getLoginUserType(); if (!"".equals(userType) && "bcustomer".equals(userType)){ customerUuid = LoginUserHelper.getBcustomerLoginUserUuid(); customerType = ((PurchaseAccountModel)LoginUserHelper.getBcustomerLoginUserModel())...
0
2c21ef62b4ffba2dd416872dc2305a23
caaadb1fd77630a14a34f4f2684e946e
Performs the combination of the given values according to the current combination mode.
public abstract boolean combineValues(boolean first, boolean second);
1
7634c6ea967025376d86adb302f116d7
4867aa254b3067c9be871a8b353bf7cc
! @note Redundant function that dumps the objects contained in C in the ostream (or file, if specified)
ofst << "Container contains " << c.len << " elements." << endl; for (int i = 0; i < c.len; i++) { ofst << i << ": "; Out(*(c.cont[i]), ofst); } }
1
1fb51722bd65a9ea627e5b1623c49abb
438b4e6e1f89706c5357bb9777c8a77e
@brief Construct a new Counting Semaphore object.
MySemaphore::MySemaphore():semCount(0) { }
1
7fc4f8c6b45beb351bfa71c7d132c986
6872ea98a6443173da4041ae4b1af48d
Loop through the filters in the chain. As soon as a filter decides on ACCEPT or DENY, then that value is returned. If all of the filters return NEUTRAL, then NEUTRAL is returned.
{ Filter result = Filter.Empty; foreach (Filter f in filters) if (f != null && !f.IsEmpty) return f; return result; }
0
2256eee8841f1be7c985ec2f6b2a813c
0db281704031c54d6524f61cf0c9989f
题目的意思是求L=<X<=R的所有节点的和,所以先中序遍历得到有序集合,再求和即可。
class Solution int rangeSumBST(TreeNode* root, int L, int R) { if(NULL==root) return 0; int sum = 0; if(L>R) sum = 0; else if(L==R) sum = L; else{ queue<TreeNode *> Queue; Queue.push(root); whil...
0
9426322f54fd8dd1d79224f7d35e5576
66bb12744c2062b316880a1522f1605c
Creates a new OneSignal app Reference https://documentation.onesignal.com/reference/create-an-app
class AsyncClient(BaseClient): async def update_app(self, app_id: str, app_body: Dict[str, Any]) -> OneSignalResponse: return await async_basic_auth_request(**self._kwargs_update_app(app_id, app_body))
0
4f8490293b382b4f8039575780276ad9
c8eb181ec12fd546cc3ebffd7db0b650
函数:load_buyRecord 函数功能:读取购买记录链表 函数参数:链表头指针, 保存路径 返回值:成功返回1, 不成功返回-1
{ linklist_customer cus_link1 = create_customer_linklist(); m_customer *st1; FILE *fp = fopen(filename,"r"); int ret = 0; if(fp == NULL) { return cus_link1; } while(1) { st1 = malloc(sizeof(*st1)); ret = fread(st1,sizeof(*st1),1,fp); if(ret > 0) { insert_customer(cus_link1,st1); } else { ...
0
f9d4de70ec2f47ea79cea7eb8369e2f2
2b7ba801b3910796ba68781283adfccc
Convert the fit result to a dictionary. Returns: Dictionary representation of the fit result.
class Univariate(object): def to_dict(self): self.check_fit() params = self._get_params() if self.__class__ is Univariate: params['type'] = get_qualified_name(self._instance) else: params['type'] = get_qualified_name(self) return params
1
550b3e353d1badb9e0e8c7c6696403b3
73c3fb198bccecab19eceba92c5e8d36
Don't do actual request to Plex server and return dummy values.
ObjectContainer.title1 = NAME ObjectContainer.art = R(ART) DirectoryObject.thumb = R(MISSING) DirectoryObject.art = R(ART) EpisodeObject.thumb = R(MISSING) EpisodeObject.art = R(ART) VideoClipObject.thumb = R(MISSING) VideoClipObject.art = R(ART) HTTP.CacheTime = 300 HTTP.Headers...
0
a4e9c7b7f80acd266e03911ac6b33acd
f75db9c16067583241d645e0b5798a3d
<p> Deletes a specific version of an intent. To delete all versions of a intent, use the <a>DeleteIntent</a> operation. </p> <p> This operation requires permissions for the <code>lex:DeleteIntentVersion</code> action. </p> Asynchronous callback handler for events in the lifecycle of the request. Users can provide an im...
java.util.concurrent.Future<DeleteLayerVersionResult> deleteLayerVersionAsync(DeleteLayerVersionRequest deleteLayerVersionRequest);
0
306a1cbad37ce333d7f147baa08c2cb2
dd51c70611a9088291d58d186ff75bad
Maps the source observable sequence into inner observable sources and relays their items in order, one after the other until all sequences terminate.
[PublicAPI] public static class ObservableExtensions public static IObservable<TResult> ConcatMap<TSource, TResult>( this IObservable<TSource> source, Func<TSource, int, IObservable<TResult>> selector ) { return source .Map(selector) .Concat(); }
1
2cfd20121d83a683c9062276196dfc57
53082f806134b1356505dbd178201bc6
#------------------------------------------------# #----------显示两个文件夹中图片总数--------# #-------------------------------------------------#
i = 0 my_dirs = glob(os.path.join(my_dir0,'*')) print(my_dir0,'文件夹下共有'+str(len(my_dirs))+'个文件') for my_dir in my_dirs: my_dir1 = my_dir.split('\\') my_dir1 = my_dir1[-1] my_dir2 = my_dir1.split('_') my_dir2 = my_dir2[-1] page = int(my_dir2) if...
0
aaf300b1816eb1c3d85ee613ee349423
97575cec7f9e612f871da066ee366a88
Construct object and verify that the current score can be set.
name = 'test' play = player.Player(name) self.assertIsInstance(play, player.Player) self.assertEqual(play.score, 0) self.assertEqual(play.name, name)
0
1c1a03297c1daa3ba9d42af71c132787
eedf1afab6881ffdaa250c0b2212fb12
<br>[機 能] プロジェクト管理者設定を取得する <br>[解 説] <br>[備 考]
public class PrjPrjdataModel implements Serializable public int getPrjMyKbn() { return prjMyKbn__; }
0
b9035e64f26e4519c2dc660d73501e42
4878a6d4afc2e71bdb57887463a45ec8
https://gist.github.com/thorikawa/3398619
function permutations(iterable, r) { var pool = tools.toArray(tools.ensureIter(iterable)); var n = pool.length; r = r || n; if (r > n) { throw new Error( 'Parameter r cannot be greater than amount of elements in the iterable [' + n + ']' ); } var indices = tools.newAr...
1
272f6e79746ae46d8e0f74f6e540ba07
171c9781891cdf793d62916feaaf2174
Saves the state of the event processing engine to a store.
namespace MonkeyTyper.Core.Plugins void Store();
1
773b59f5050c8cc272fdaef5c175ef9e
053374b702ebb4e6717612d236c2aed3
Whether to automatically reload Camel upon secrets being updated in Azure.
public class WebhookResource extends AwsResource implements Copyable<Webhook> @Updatable public Boolean getRotateSecret() { return rotateSecret; }
0
113754aef63358c45e8ce3ef1f2f1616
eae3d59819d505412cc2007b25de45f7
不使用栈的非递归中序遍历,Morris方法
void morrisIn(tree_node *root) { if(root == NULL) { return; } tree_node *cur = root; tree_node *mostRight = NULL; while(cur != NULL) { mostRight = cur->left; if(mostRight != NULL) { while(mostRight->right != NULL && mostRight->right != cur) { most...
1
625f6cfe17cf0dda36e2f66fd9bc52bc
5c1471ca1d26c6fa4bea464575ad8d60
检查arg是方法还是函数
function isFunction (args) { return Object.prototype.toString.call(args) === '[object Function]' }
1
71fb4051ffe50fd09a078282e29d322a
d1756c753143e57236d0591ab2657632
Create a boolean property or gets one from cache.
@ServiceMethod(returns = ReturnType.SINGLE) public BooleanWrapper getBool() { return this.serviceClient.getBool(); }
0
e9807c227e65dbacfe2b224559f54b4a
574eedec19e47d2f256466c80747f032
Метод позволяет преобразовать матрицу в список чисел
def matrix2list(matrix): newList = [] for i in range(len(matrix)): for j in range(len(matrix[i])): newList.append(matrix[i][j]) return newList
1
24727f1f188cd2ed583a6ff1a2b793ef
f5e958b9b798fe34316d69836fa44b73
Parse X.509 certificate tbsCertificate
class X509(object): def parseBinary(self, cert_bytes): self.bytes = bytearray(cert_bytes) parser = ASN1Parser(self.bytes) signature_algorithm_identifier = parser.getChild(1) self.sigalg = bytes(signature_algorithm_identifier.getChildBytes(0)) if self.sigalg == RSA_PSS_OID: ...
1
9dd4f523b89aa897ec66764cf8230f3e
ca3756a38e8cf65a395f40536cc42790
功能描述:进入添加套餐页面
@Controller @RequestMapping("/discount") public class DiscountController extends BaseController{ @RequestMapping(value = "/addDiscount") public ModelAndView addDiscount(){ ModelAndView mv = new ModelAndView(); List<Combo> comboList=this.comboService.selectComboList(); mv.addObject("comboList", comboList); mv.s...
1
3b4e8aad3997abaedfd388619c591674
6327a1e3d692ed62db6a07441b354b46
Получает расстояние между двумя частотами Н-грам, с учетом нормальной по профилю
if len(n_gram) == 1: numer = model[0][n_gram] denom = sum(model[0].values()) - model[0][(START,)] else: numer = model[len(n_gram) - 1][n_gram] - KATZ_DISCOUNT denom = model[len(n_gram) - 2][n_gram[:-1]] return numer / denom
0
aa2c407c23358edceb02fd2c5016a6bf
167e348c2ba200d859c9302914efdfa2
Uruchamia animację zamiany miejscami dwóch sąsiednich kafelków
return setTimeout( function () { $('.process-value').css({'width' : (iter / numsArray.length) * 100 + '%'}); var elem1 = boxNumbers[index - 1]; var elem2 = boxNumbers[index]; if( comparison ) { var valEl1 = $(elem1).text(); var valEl2 = $(elem2).text(); $(elem1).css({'background-color' : '#0...
1
ab3525e9ac873ee1991c268d218da0bb
9f43a20767103f03d3ec44c10cc26c8e
wczytuje z pliku macierz zapisaną wierszami oraz wektor wyrazów wolnych
double * read_free_terms(char * free_term_filename, int unknowns_no){ std::ifstream free_tearm_file(free_term_filename); double * result = new double[unknowns_no]; for(int eq_id = 0; eq_id < unknowns_no; eq_id ++){ free_tearm_file >> result[eq_id]; if(result[eq_id] == 0)result[eq_id] = 1000....
0
2dff5fd9aed87a8e66a7a44fed618c5b
b0232bc0919a076a03d8639de58dd381
Loop through all post files and create array of slugs (to create links)
function reArrayFiles(&$file_post) { $file_ary = array(); $file_count = count($file_post['name']); $file_keys = array_keys($file_post); for ($i=0; $i<$file_count; $i++) { foreach ($file_keys as $key) { $file_ary[$i][$key] = $file_post[$key][$i]; } } return $file_ary; }
0
65ba37df83c5be9062eccbec0934c072
589878e167fa53fa1e631f92b20b2123
Gib zurück, ob ein Objekt in dem Array enthalten ist; verwendet `equals`
function contains(arr, obj) { var i = arr.length; while (i--) { if (arr[i] === obj) { return true; } } return false; }
0
0a82dc0576b9c801606b61790f1fbd04
3ca29d2f45985149ecd942d3c313871e
Returns the result of <see cref="Convert.ToInt16(UInt64)"/> as an option.
namespace FallDave.Trifles public static class ConvertOpt public static Opt<UInt32> ToUInt32Opt(Single value) { return Optify(() => Convert.ToUInt32(value)); }
0
faa7c658e6907ed569de8b8fc854903c
c15154f83c129e49afc256a2db8ff9ad
DOM to create top row of the table
trow = "<tr>" for field in self.dataFields: trow += "<td><b>" + field + "</b></td>" trow += "</tr>" return trow
1
114c7f27b6788311ca1ab9a199934d01
7b3846b60f8fe469d02cf08129dd8a0c
判定是否已经登陆成功
def is_login_sucess(self): try: text=self.driver.find_element_by_id("merchant").text return True except: return False
1
43d4d9b4874367c80c3d243d6d819c35
f07f830d02fbf9a26d308c9881da05eb
金額表現をintegerに変換する
class Item def target_price=(value) value.tr!('0-9', '0-9') if value.is_a?(String) super(value) end
0
38e6176d9cc62db6fee9179076831a2b
2da1a68e8422127b72dd8609b37fdb60
Gets the job debug data information specified by the job ID.
class UtilityInterface(CRUDInterface): def job_debug(self, job_id): self.aqhttp.get("krill/debug/{jid}".format(jid=job_id))
1
e548286c698349f32b14caa9fdaf7f57
b21760c53864ad9fa1a08be70b637a10
Setter for <code>bot.GPT_ADDITIONAL_SERVICE_CHILDREN_AGE.MODIFIED</code>.
@javax.annotation.Generated( value = { "http://www.jooq.org", "jOOQ version:3.5.0" }, comments = "This class is generated by jOOQ" ) @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class GptHotelChildGroupRecord extends org.jooq.impl.UpdatableRecordImpl<dshumsky.jooq.generated.tables.recor...
0
8a9e5ec49911f211839a19e095ee0fd1
b66ca95de5df304cc64a08e9304f8953
Sets data collection options field.
abstract class FieldType protected function _setOptions($label, $short_name, $value = '', $required = FALSE, $instruction = '', $validate = FALSE){ $this->_options[] = array( 'label' => $label, 'short_name' => $short_name, 'value' => $value, 'in...
1
afe7ac01e3e5a493184edcd3fc7317be
3ce02fc8b62ed1b2f088a6a861f2d08f
手牌が嵌張アガリかどうかを判定
def daisangen?(tehai, agari) return false unless tehai.koutsu_list.any?{|mentsu| mentsu.identical.haku? } return false unless tehai.koutsu_list.any?{|mentsu| mentsu.identical.chun? } return false unless tehai.koutsu_list.any?{|mentsu| mentsu.identical.hatsu? } return true end
1
adcb55259cf9605f8886077a6709a95e
cdbf055ab82879b365517dc1f198c485
Launch validation.
if (!checkSaveBeforeAction()) { return; } if (appBean.getId() != null) { SolaTask t = new SolaTask() { @Override public Boolean doTask() { setMessage(MessageUtility.getLocalizedMessageText(ClientMessage.PROGRESS_MSG_APP_...
1
1817d2152fa420c4af6d2e65a4d457ba
bf65e7922be6b4d17cdf10a69ae9ffc8
获取计算的路径
function calcPath(relaPath) { return path.resolve(__dirname, relaPath); }
1
edf33e299a5f014c4f9c1c0a3cc8193c
51377fb53502ad362cc9df8db86fd3d8
Return a Poisson random integer, whose distribution has a mean = nbar.
int poi_rnd(double lambda) { int k = 0; lambda = exp(lambda) * uni_rnd(); while (lambda > 1.0) { lambda *= uni_rnd(); k++; } return k; }
0
84d5d2793a0543a174a961469d3d966f
259eb466d68538318c19766d1d843a31
Gets the root dir of the dataset Check env variable first, if not set, use the {code_location}/data
root_path = os.path.dirname(os.path.abspath(__file__+'../../../')) PATH = root_path+'/data' if PATH.endswith('/data'): return PATH else: print 'Path to data source not found. Check documentation for correct structure. \n'
0
26fec94e6dea5029917738304d3561b4
df33abea157e99d41acbc36d187c0931
adiciona um registro de pokemon no DB
namespace SimuladorPET.MongoDAO class MongoDAOSimula public void AdicionarDadosPet(DadosPet pet) { collectionDadosPet.InsertOne(pet); }
0
29da02e11ca11cd1322d319ed891f6ad
7ba612ecb67006f154abf60c7bb1f796
Handles the `click` event for the `Carousel` arrows.
var controls = $$(".carousel-control"); var controlContainer = $(".carousel-controls"); var targetControl = event.target; for (var i = 0; i < controls.length; i++) { if (controls[i] === targetControl) { index = i + 1; } } move(); switchCarouselControl(index); }
1
87e4265f7da99ed0c640186a13afcf8d
7d692101d40d7b3ef429ec3656bbcbd7
Query whether segment tracing has been enabled.
def is_enabled() -> bool: return os.getenv(CHARM_TRACING_ENABLED, "1") == "1"
1
b9ba30a27b74babb599cf16ee0356684
c786f42640da88efd88f00eb9ada3c04
Try to parse the source code which is retrieved from the specified <c>TextReader</c>.
namespace ICSharpCode.NRefactory.Rava public class CSharpParser public SyntaxTree Parse(TextReader reader, string fileName = "") { return Parse(new StringTextSource(reader.ReadToEnd()), fileName); }
1
1d78d40e04b1f2c562d57c97d5092f1f
606810ab8d88ffc9e6b034b72a13f511
this function removes all odd numbers
function evenFinder(nums) { for(var i = nums.length - 1; i >= 0; i--) { if(nums[i] % 2) { nums.splice(i, 1); } } return nums; }
1
41bce035c1b76efec1874e250ea23741
261d424e4ca4e07767f4c13ef698fbd9
Movimenta os cantores entre as fases
{ switch(_cena) { case 0: if(currentTime < fadeOffDuration) { currentTime += Time.deltaTime; hubSource.volume = Mathf.Lerp(.5f, 0f, currentTime / fadeOffDuration); hubAmbient.volume = Mathf.Ler...
0
f3e2e7a39c60ddc9eeb57e324065b4ea
22c952e9a70ab1fb8174a86a0ea1ac44
Close the current panel by removing it from the parent's branch-array
class StoryItem(PanelBackend): def delete_self(self, event=None): self.parent.remove(self)
1
c12498d5222e703360f2cf12c2e14b22
c0ceeae112538cfdc8adc975ca899bf4
Simple distance formula. Takes two coordinates, returns number.
def get_distance(x, y): difference = x - y powered = np.power(difference, 2) summed = np.sum(powered) distance = np.sqrt(summed) return distance
1
c969871737bb2d265b5d26760315dad8
3e9e7f8020c8f120ba99cd002386326b
Verifies that the exons are properly extracted
public void extractionTest() { String compareString = "ATGCCTCAATAG"; String DNAString = "AATGCCAGTCAGCATAGCG"; Sequence compareSeq = new Sequence(compareString.toCharArray()); GenomicDNASequence mySeq = new GenomicDNASequence(DNAString.toCharArray()); int[] mySelcInts = new ...
1
a1c3a6a5fbd5796c8dd28a2d37fd5f00
134f786ed4939bf319ac59ebe7ea5e77
读取指定sheetNum的rowCount
public class ExcelOperate implements Closeable public int getRowCount(int sheetNum) { sheetNum--; if (wb == null) return 0; Sheet sheet = wb.getSheetAt(sheetNum); if (sheet == null) { return 0; } int rowCount = -1; rowCount = sheet.getLastRowNum() + 1; return rowCount; }
1
7aad9000f5280964c9f8205d481a7daa
7f61448ad6da3ef0f9cb03f40c5be655
No dropping, no expansion
cases like (1)
0
46c05b89a0935c5106106ec1769486b8
0bf57f4b2438c1c067f9726ffaee4e37
Функция выполняет подключение модуля обрабатывая переданный ей массив описания модуля
{ if(is_string($arModule) && IsTextIdent($arModule)) { if(array_key_exists($arModule,$this->arModules)) return; $arModule=$this->GetRecord(array('directory'=>$arModule)); } if(is_array($arModule)) { if(array_key_exists($arModule['directory'],$this->arModules)) return; if(file_exists(MODULES_DIR.'...
1
143635f58e95b039946feeb8a89e9025
82736dfa58d23d3802b031b221c154e7
アクセスログを出力する morgan の設定をします。
function logger() { return expressWinston.logger({ winstonInstance: server('request') }); }
0
ed50ff020b8e0faa2c420ba55dcb98d0
64567b57db21b15779d387760ef0f69c
Percentage of targets to receive a deployed configuration during each interval. Minimum value of 1.0, maximum value of 100.0.
class DeploymentCanarySetting(dict): def percent_traffic(self) -> Optional[float]: return pulumi.get(self, "percent_traffic")
1
b04ada04299cc357d1ab9be3ac654963
676516d15f1c6c6a3085bf5966c9c681
Creates database LOB parameter.
@Repository @Scope(value = BeanDefinition.SCOPE_PROTOTYPE) public class HibernateDAO extends BaseDAO public Clob createClob(String data) { return getSession().getLobHelper().createClob(data); }
1
9afb137b382757246447d331878a2088
99660e03af17d2708f202123800a33c6
Возвращает обязатнольно ли выбирать элемент.
abstract class FormControl extends /*Nette\*/Component implements IFormControl final public function isRequired() { return !empty($this->options['required']); }
1
ae89d622091625355832e4d3eb8f6689
7f555af70d537ec4a6614e7f5272dae9
@brief Функция возвращает размер экрана по горизонтали.
uint16_t get_res_x(){ return infoBlock->x_res; }
1
455b3d1812589802d2a3773422fb862c
d9804125d6d9c27679e3abb8c15b9bc7
r"""Apply the composite of logarithm and softmax to input. The **LogSoftmax** function is defined as: .. math:: \text{LogSoftmax}(x_{i}) = \log(\frac{\exp(x_{i})}{\sum \exp(x_{j})})
def log_softmax(x): xdev = x - x.max(axis=1)[:, None] lsm = xdev - T.log2(T.sum(T.exp(xdev), axis=1, keepdims=True)) return lsm
1
fce4f21f08e04be55b43214bf9e2ce25
6efdcea9eb508ba7b71be7b56953eaa4
Add score if player is alive.
public class GameController : MonoBehaviour public static void AddScore(int scoreToAdd) { if (!gameOver) { pointScore++; ScoreOnGui.setScoreOnGui (pointScore); } }
1
a3b7658a2093d6506e915fee568d2f02
b1c771b4720565c6b855ef9b08a26f76
读取头像并保存,同时更新数据库
$files = $this->getFiles(); foreach($files as $fileInfo){ $res=$this->uploadFile($fileInfo); $uploadFiles=$res['dest']; } $sql1 = "SELECT headPicture FROM ".$this->_table." WHERE userID=$userID"; $result= DB::findOne($sql1); $...
1
6cf5633bff2d7258889fd68f6d4e455e
8a758d84e2242bd023cddfaf7418ada7
Setup the path to plugin templates directory.
class ConfiguratorPlugin extends Plugin public function onTwigTemplatePaths() { $twig = $this->grav['twig']; $twig->twig_paths[] = __DIR__ . '/templates'; }
1
733fdb8dfe92fa56d1a4c9bffdd98864
9de33937fc59085b4601ac689e4e2153
Überprüft ob der String keine eine Zahl enthält
namespace fileStringOperations bool hasNumber(std::string str) { for (const char _c : str) { if (std::isdigit(_c) == 0) { return false; } } return true; }
0
2e184ea17722ee7e24aecd4ea0f5bac5
80351b11036d1593f10daee342d450cd
The observables ("axes with str")the space is defined in. Returns:
class ExperimentClient: def space(self): return self._experiment.space
0