query_id
string
corpus_id
string
query
string
code
string
label
int64
558282e369f9617732fd5f0a331c053e
97bb3a131f06d038144cf4b798a47c98
Get all received greeting cards of the user.
GreetingCard getGreetingCard(Long gcId);
0
80d871cfefbc632c6e2959e350f17498
e3f16736419abc781c4dd1a55a986b8e
Подсчет локальных градиентов для всех нейронов сети (при алгоритме обратного распространения)
{ for (int i = 0; i < 3; i++) { for (int j = 0; j < 2; j++) { if (i != 2) delta_w[i][j] += learning_rate * NET[i].error_value * Data[j]; else delta_w[i][j] += learning_rate * NET[i].error_value * NET[j].sigmoid_value; } d...
1
fb207d6e22a49f478065418ce1d4b935
0961ddb770792a2bcda5d4f2081bc21f
Method to find out if location name finder has finished.
public class VideoFile public boolean isLocationNameFinderStarted() { return locationNameFinderStarted; }
0
4e2ecd671d8222d8da4dfd90c41962f8
c5166bf2440f05e58f0ff1653d484488
Возвращает список сотрудников, оказывающих заданную услугу
$firm_id = intval($firm_id); $data = array(); $sql = "SELECT t.* FROM telks t LEFT JOIN workers w ON ( w.worker_id = t.worker_id ) WHERE t.firm_id = $firm_id AND w.is_active = 1 AND ( w.date_retired = '' OR julianday(w.date_retired) >= julianday('$date_from') ) AND ( w.date_curr_position_s...
1
b727809845711976b97636627fc6c9b1
272cf329661800d920b201c5f6b40a70
waits given max seconds or until no switches pressed
void wait_for_switch(void) { unsigned char temp = switch_pressed; while (temp == switch_pressed) asm("nop"); }
0
af89f1c75e2b068182d078f05560b4ac
35d552302691337e28273e8b587cbb2c
https://gist.github.com/amites/3718961
def progressbar(it, prefix="", size=60, file=sys.stdout): count = len(it) def show(j): x = int(size*j/count) file.write("%s[%s%s] %i/%i\r" % (prefix, "#"*x, "."*(size-x), j, count)) file.flush() show(0) for i, item in enumerate(it): yield item show(i+1) ...
1
c7cce9886a397e21ef06ca80403085c9
061b7cb05c15b956fe887822342b8276
## A function to calculate the standard error of the mean
my_sd_function <- function(x){ sqrt(sum((x-mean(x))^2/(length(x)-1))) }
0
429cf748565a79c33f56df6eecea3817
702312a91948c0c6829832786e0bb35d
Test of the PyTorch to Node on Glow.
num_nodes = 100 num_features = 3 num_classes = 3 X, A, _, _, edge_index, edge_weights = \ create_mock_data(num_nodes, num_features, num_classes) edge_index = edge_index.cpu() edge_weights = edge_weights.cpu() edge_index, edge_in, in_weight, edge_out, out_weight = directed_features_in...
0
1d1bf763e70e9ebe379cb9f79c33d5e1
8b993118980a7244e15318e4842bab64
Read a single bit from a 16-bit device register.
namespace Crown uint16 SDBitRead(uint16 bit, uint16 sdata) { CnAssert(bit < 16); uint16 k = 0x1 << (bit -1); return (k & sdata) > 0; }
1
1bc024f70edbbffcc799c81d32844afe
4999f64ef485913ab0fc331c2004ecf0
Updates a system announcement.
BigstarAnnouncementProduct announcement) { DynamicDataSourceHolder.setDataSourceType(gameServer); if (announcement != null) { if (announcement.getDateExpire() != null) { long dateTime = announcement.getDateExpire().getTime(); in...
1
9a7d585173cba28ab960914bc8939c70
7a6274c44d4f3dd5ced910ce0dd41484
The effective number of bits of entropy for the provided virtual address region (e.g. stack heap, or image).
interface Identifier fun entropy(): Int = asBytes().size * 8
0
f8fda9ebd5ab017cc66c7eb612e77971
b27b4f4a66f0b777307fd49e73be4246
将指定XML日期对象转换成日期对象
Calendar cal = Calendar.getInstance(); cal.setTime(date); DatatypeFactory dtf = null; try { dtf = DatatypeFactory.newInstance(); } catch (DatatypeConfigurationException e) { } XMLGregorianCalendar dateType = dtf.newXMLGregorianCalendar(); dateT...
0
bcf5e902923a856d10294e786319a02e
aaa7af5f98f6230556758242725b173f
对自己的消息进行装饰,设置消息默认的过期时间
created () { this.$Message.config({ duration : 3 }); }
1
337c21ae78a072b72aa703df8aebd0bc
7b4541e98cbafe0caa266bc64827cbf5
송장 정보 아이템을 삭제한다.
public int deleteItem(int itemNo);
1
b45e7c141c81f39c5d71990b98c5e291
7d1c4f8628ddcdb5eaac927a9b8e5d7a
Sample from a uniform distribution in a cube.
namespace kvs kvs::Vec3 PyramidalCell::randomSampling() const { const float p = BaseClass::randomNumber(); const float q = BaseClass::randomNumber(); const float r = BaseClass::randomNumber(); kvs::Vec3 local; if ( kvs::Math::Abs( p - 0.5f ) <= kvs::Math::Abs( q - 0.5f ) && kvs::Math::Abs( ...
0
f3f9ae23500ef4a8e8bbaf621fbea54d
c11299be3b26beae5e8bf91e70e45c50
_bcm_td2_qos_apply_ing_map_to_port Apply a fully created ingress map to a hardware port. This is the final step in the process, where the mapping becomes operational. unit - (IN) Unit being operated on ing_map - (IN) ID of the map to be applied local_port - (IN) Local port number to apply map to BCM_E_XX...
_bcm_td2_qos_apply_ing_map_to_port(int unit, int ing_map, bcm_port_t local_port) { int rv = BCM_E_PARAM; int id = ing_map & _BCM_QOS_MAP_TYPE_MASK; soc_mem_lock(unit, PORT_TABm); if ((ing_map >> _BCM_QOS_MAP_SHIFT) == _BCM_QOS_MAP_TYPE_ING_VFT_PRI_MAP) { rv = _bcm_tr2_port_tab_set(unit, loca...
1
2fcbdc31148bbb3baedc4979ff3bd74b
272e7db3db16350ac0a18e6c45065819
# Defina a funcao para definir o inverso. Isso e usado apenas por getinverse () quando # nao ha inverso em cache
m <- x$getinvers() if(!is.null(m)) { message("getting cached inverse") return(m) } matrix <- x$getmatrix() inverse <- solve(matrix) x$setinverse(inverse) inverse }
1
aba9032c0b64c48c58f437ddba976ea1
b75681a8d69f8dd1644b3f9f1f2bf3a0
Supported types for casting values
{ return array( self::TYPE_STRING, self::TYPE_BOOLEAN, self::TYPE_INTEGER, self::TYPE_FLOAT, self::TYPE_HTML ); }
1
a6ed4e4c01aba2bb1d1c086d63391834
f2dfdd0de5026d908fc5602df8a52f4a
Retrieve a list of passengers by flight
def flights_get(flight_fltr): flight_data = adsbx.flights_get(flight_fltr) return flight_data
0
effd35add4363b5cae4a27ac946f607b
70fe8fa268fc1a800d2e07e9e882a9d6
Проверка устройства на корректную инициализацию.
namespace RoboControl public class FlashlightHelper private void CheckCommunicationHelper() { if (this.communicationHelper == null) { throw new NullReferenceException("FlashlightHelper не инициализирован."); } }
1
10ef8395b80f7c5374b7ef9cdb0f3025
5a55c15c848d8f0386374f9bf968bfc4
Get a paginated press review list
class PressReleaseController extends Controller public function index() { $presses = Press::orderBy('id','desc')->paginate(15); return view('v1.press.index', compact('presses')); }
1
5bb4838d0b628b0d2b7e157970040a23
f9d692ccbb62ec6e079c8487fa1de376
Evaluates the left an right expression, pops both off the stack and performs the operation.
public class ArithPrefixEvaluator implements PrefixEvaluator<Integer> private void popPerformAndPush() { Operator<Integer> topOperator = operatorStack.top(); if (topOperator.getNumberOfArguments() == 2) { topOperator.setOperand(1, operandStack.pop()); topOperator.setOperand(0, op...
1
7d8f2e277b7b3fb770887545a81e3a37
816cf37f2139a45826fb8de0795cab54
GET /lightboards
class BoardsController def index @chalkboards = Wall.find_all_by_member(current_user) end
0
686f928bd6a117585ac1bdfaaa07a280
e75f2892c9060958f22c01412843ed53
Aggiunge l'Immobile alla lista degli immobili
{ alugados.add(i); String string= i.stringToSave(); System.out.println(string); try { escreveNoArquivo("Banco de Dados/Imoveis Alugados/Alugados.txt", string, true); } catch (IOException e) { e.printStackTrace(); } }
1
d2bb019d2ab91dce20b49d43c72fecf4
964ee9619f9a6a8b147cbf000cfc319c
stop the minigame; parent things to hidden, stop the music...
public class WordGameLevelSelectScript : MonoBehaviour public void exitMinigame() { system.exit(); }
0
5ec3eba2786cdf7211bfbd074799d737
34b93c493cac27c121558e1d5bd2059f
getter to check whether reward should show
public class RewardManager public boolean isEnabled() { return enabled; }
1
d26441fc5bed29477de0db5578c5ab02
f38973fd311558f35aa849a5e2f48389
function to error check and parse an optional traffic mapping file
{ char *p; if (strncmp(buff, COMMENTH, 1) && strncmp(buff, "+", 1)) return; if (strstr(buff, "GPST")) opt->times = TIMES_GPST; else if (strstr(buff, "UTC")) opt->times = TIMES_UTC; else if (strstr(buff, "JST")) opt->times = TIMES_JST; if ((p = strstr(buff, "x-ecef(m)"))) { opt->posf = SO...
0
013f44a4210eba3791747ab27d5a765b
81b149198ca397800641c706e4a57a7f
Convert latitude and longitude to WKT.
command = 'W' for p in lat: command += chr(p) for p in lon: command += chr(p) self._send_command_and_validate_response(command)
0
1681882220509bd34308c16211585da6
8ca07d53258c47fea0027263b2ed1ba7
直接获取原始的markdown字符串。
function toPlain(md = "") { return new Parser(md).toPlain(); }
0
cc2fbbce47923450ca8832ac9acb6dcd
fd9027a07ae5d70a25b3fb8ab1457d9c
Test running an event while passing in args.
mock_event_name = MagicMock(spec=str) mock_event = MagicMock(spec=HoudiniEvent) mock_events.return_value = {mock_event_name: mock_event} manager = ht.events.manager.HoudiniEventManager() manager.run_event(mock_event_name) scriptargs = { "_manager_": manager, ...
1
92e50c3fee46ad407eb37272c102074e
b817e1b2e4dcb6508c7f1c5028963659
`view.__index` metamethod.
function class_mt:__index (key) if rawget(self, "_base_") then return self._base_[key] end end
1
974fd0303446ec6724825b481444ceed
9ecd954ad199aa1f2290ab736916ebbb
Set the clock speed of the MPSSE engine. Can be any value from 450hz to 30mhz and will pick that speed or the closest speed below it.
issp_set_sck(struct issp_softc *sc, uint32_t target) { uint32_t newclk, found, reg; uint8_t div, rate, d, r; found = div = rate = 0; for (d = 2; d < 254; d++) { for (r = 0; r < 255; r++) { newclk = SSP_CLK / (d * (1 + r)); if (newclk == target) { found = newclk; div = d; rate = r; goto out; ...
1
ffc49218f3b478c0a3a5a6fde2596abb
fc0c6a8daa493edd0011d2a63c1e4373
Invokes ``func``, catches expected errors, prints the error message and exits sceptre with a non-zero exit code.
def expect_error(f, error, *args, **kwargs): with pytest.raises(error): f(*args, **kwargs)
0
d0eaafaad46dbf22ba48de9163bfc334
966fd4642bc3bc87e23b26f07d2ceb86
判断是否满足题目要求,参数n表示图中有几个字母结点
{ if (cnt++ == n) { for (int i = 0; i < cur; i++) { if (i % 64 == 0 && i > 0) printf("\n"); else if (i % 4 == 0 && i > 0) printf(" "); printf("%c", 'A' + S[i]); } printf("\n%d\n", cur); return 0; } ...
0
fc1cc6639cdb3af2b621edb89534060e
894e3e9899f94ac4dbd6304e4db8e3a9
Renvoie les sous-arborescences
class Noeud_ABRTB: def prefixe(self, tableau): tableau.append(self.m) if self.sag: self.sag.prefixe(tableau) if self.sad: self.sad.prefixe(tableau) return tableau
0
7e130ac1c0dd1d5b22cbd8f54e23b555
a26b766374513ac76c72b14dd76ab3f6
Test encode video frame with null codec.
reader = mpg.read_frames(encoded_video_path, pix_fmt="gray8", bits_per_pixel=8) meta = reader.__next__() obt_nframes = int(np.round(meta['duration'] * meta['fps'])) assert obt_nframes == len(expected_video) obt_frames = [] for frame in re...
0
d1871002e533ee290d33b050036f0341
c922326aac19380e06d7207aad6af3a5
Convert meters per second to kilometers per hour
fun Trip.convertDrivingSpeedToKmPerHour() = avgSpeed.avgSpeedFromMeterToKmPerHour()
1
a46d374255c05ea945801fcf96ba2f0d
4991ad1378a6d0ff983d44dc5a4abc85
対応するバーコードを返す
class RecurrentCard extends Data public function getBin() { return $this->bin; }
0
9c4adb9b007bf414208dcc25906ff8b7
9c2174d23ea6039272999d86207b3d17
輸入檔名data.txt、字串s1和字串s2。程式將檔案中的字串s1以s2取代之。
def replace_name(): getname = open("Read/text/name.txt", 'r') name = getname.read() textfile = open("Read/text/Sida12.txt", "r") searchname = textfile.read() text = searchname.replace('name',name) getname.close() textfile.close() return template("Read/FMDMK-12", text=text, name=name)
0
d9bd667190936e7e88105c1b77366f71
eb2c42e70691cca0994f9b9484eebf90
Test quitting with a quit reason
class MailroomFPTest(unittest.TestCase): def test_quit(self): with self.assertRaises(SystemExit): self.ui.quit_program()
0
51b5a30a07564a0cae76c51894219d1d
068371aaab546df4246ea55309dcf56b
Returns a random combination of characters. The length and the content is defined by the passed arguments.
public function build($length, $charset);
1
60805b9acf99025a95fe3e52e0aaca02
e67d70534a0cac9e880e51ff760e8070
Check to see if HealthCheckConfiguration property is set
namespace Amazon.Route53.Model public partial class CreateHealthCheckRequest : AmazonRoute53Request internal bool IsSetHealthCheckConfig() { return this._healthCheckConfig != null; }
1
f4816c982522e5ed1070c03ca13f6d01
2bd97ee5663f970f911cf1d1d4d21b02
insert code here... demonstrate postfix increment operator
cout << "n = " << n << endl; cout << "&n = " << &n << endl; n++; }
1
2eec508310f5ccbac63f2e44146bf655
47c3063c210b25fedf4e33f36dc94544
Get all records updated since a given timestamp.
List<T> findAllUpdatedAfter(Date datetime);
1
0df2721c6edde77464beee9d9ab41b07
ef6930120f53ae84bd368d27db661716
Request to create a new Site Label.
throwIfNotDefined(siteBodyCreate, 'siteBodyCreate'); return this.post({ path: '/gs-sites', queryParams: opts, bodyParam: siteBodyCreate, returnType: RMSiteEntry, }); }
0
24de9d5ebb408deb788bbc6ee89ee6db
51af43eb9b2af67fa923637fb8e08c8b
\brief Le 4 bytes do arquivo trocando ordem dos bytes
static char Swapped[16]; switch (Nb) { case 2: Swapped[0]=*((char*)Addr+1); Swapped[1]=*((char*)Addr ); break; case 4: Swapped[0]=*((char*)Addr+3); Swapped[1]=*((char*)Addr+2); Swapped[2]=*((char*)Addr+1); Swapped[3]=*((char*)Addr ); break; case 8: Swapped[0]=*((char*)Addr+7); Swap...
1
24cd231ab7bd7c9e2e47bfaec29539aa
8bc24269bab01514fefc79ec3d30c4ea
Determines if the tberEthnicRacesId has been modified.
public class ViewAssignedLoanBean implements Serializable, GeneratedBean public boolean isTbcCurrencyIdModified() { return tbcCurrencyIdIsModified; }
0
125b6db22a601a868df59f8a8cdef013
67295bf08e35459a63e1c8a3eee9453e
Returns a filepath to the demo data downloading the data if needed.
def download_demo_data(**kwargs): train_data_path = tf.keras.utils.get_file( fname='train-v1.1.json', origin='https://rajpurkar.github.io/SQuAD-explorer/dataset/train-v1.1.json', **kwargs) validation_data_path = tf.keras.utils.get_file( fname='dev-v1.1.json', origin='https://rajpurkar....
1
0e5b0693d9df87ccea248385ddd4efa1
3cbddb364fd5dabd4789ffa758b97a77
Enabled if the referer comes from our UI Root OR if the 'reports' param is set
class WebServices_SupportdataController extends SanSIS_Controller_Action public function checkReferer() { if ( ( !isset($_SERVER['HTTP_REFERER']) || !strstr($_SERVER['HTTP_REFERER'], 'http://'.$_SERVER['SERVER_NAME']) ) && APPLICATION_ENV != 'development' ) die('Busted! IP: '.$_SERVER['R...
0
6d595e38513fdf57f5441ed416dc283b
4dbec70a2d377e3d2a053cb8efd0b977
Returns the value at the specified key in the current collection.
namespace CosmosStack.Validation.Objects object GetValue(IDictionary<string, object> keyValueCollection, int memberIndex);
0
2b8b3a61483b9752ba9855f85117acee
7d5b184c9d1cb0e110ffbf076963f806
通过行星表明重力,给定一个物体的质量,可以计算出该物体在行星表面上的重量
{ return (force * Math.pow(distance, 2)) / (G * mass_one); }
0
47241cbcc7ad7d0cdc5d3e088d2d7803
60626778913700d9f60fb394bd959868
读取路径名到dir数组中,直到空格为止
int pathparse(char *pp){ char *pathstring = pp; int countsize, npath = 0; int i = 0; for (npath=0; npath<MAX_PATH; npath++){ char tmp[MAX_PATH_LENGHT]; bzero(tmp, MAX_PATH_LENGHT); countsize = 0; if (pathstring[i] == ':') i++; while(pathstring[i] != ':'){ ...
0
192ae1f9569fe5dac3912369c6f55277
c742036ce250b837304f021009bd8963
Get all info_jadwalpelayanantetap
class PenangananController extends Controller public function getAll() { $Penanganan = Penanganan::all(); return Response::json($Penanganan,200); }
0
c743fd8a1cbed0f015ab271c373ab26b
d9fc06864ea1418e9ea3d3ad564d4bf8
Loads in saved place field starting points [rad]
local input = io.open(filename..'.start_pos', 'r') if not input then skyfactory.log('generate start positions') local output = io.open(filename..'.start_pos', 'w') local pos for i,v in ripairs(spiralt(skyfactory.world_width)) do pos = {x=v.x*skyfactory.start_gap, y=math.random(skyfactory.start_heigh...
1
8624bec1c286b82c3d378c09d80832d1
342330b999f65acea3439c8ec077bb75
付款附件操作按钮
namespace Gome.Emp.SapProcesses.Form public partial class ReimbursementApplyForm_V4_zongbu : ViewBase<ReimbursementApplyState_V4_zongbu> void BndFaPiao() { }
0
77e05c1a3518907e9b3668cc3d996198
d40100a694327b76f762ef0e9a5e5d49
r"""Compute the bundle of rays passing through all pixels of an image (one ray per pixel).
def generate_rays(pixel_coords, pix2cam, cam2world): homog = np.ones_like(pixel_coords[Ellipsis, :1]) pixel_dirs = np.concatenate([pixel_coords + .5, homog], axis=-1)[Ellipsis, None] cam_dirs = np.matmul(pix2cam, pixel_dirs) ray_dirs = np.matmul(cam2world[Ellipsis, :3, :3], cam_dirs)[Ellipsis, 0] ray_origins ...
1
f79e09f61e8593c202b958233d640e40
81ed7c8072ba77fd66764fc23b1652b5
Like CString::new, but returns an io::Result for consistency with everything else.
fn cstr(path: &Path) -> io::Result<CString> { path.as_os_str().to_cstring().ok_or( io::Error::new(io::ErrorKind::InvalidInput, "path contained a null")) }
1
ab1043073f8ec3e7038f433abec7c667
8bb02a9c38a886264a675910b1925267
最多4个航次
function checkOneTrip(){ var cityBegin = $("#cityBegin_1").val(); var cityEnd = $("#cityEnd_1").val(); var leaveDate = $("#dateBegin_1").val(); if(cityBegin == null || cityBegin == ""){ Dialog.alert("出发城市不能为空!"); return false; } var beginCode = hasThisCity(cityBegin); if(beginCode == ""){ Dialo...
0
eb4bbf0b8adb45873760018257d48ced
bff3d7f0a5d0fcab53bcf5475468c072
Get the attributed sources used in inferring this answer. Generally, results will include SKSI sources, or terms used in meta-assertions using sourceOfTerm-NonTrivial or its specializations. Note that this method works by introspecting on the inference object, and will not work if the inference has already been destroy...
public Iterable<KiWiTriple> listInferredTriples();
0
2128fd6b59e24b784bc6fa55c7922228
b562bc059bbede71d112233e887365af
Check if the options include a client_id
client_creds = client_creds or self.client_creds if ( client_creds.get("client_id") and client_creds.get("client_secret") and client_creds.get("scopes") and isinstance(client_creds["scopes"], (list, tuple)) and client_creds.get("redirect_uri") ...
1
8cdfe431d49b9fb89ea260308807d4af
ae324c701303412b571f1da02f499b28
Changes modal window styles
function changeStyle() { modal.style.borderRadius = '20px'; modal.style.border = '5px solid red'; }
1
00961279c87a477a234c00307f9c3e54
ac163defa77bb66d517f51e92890dfa8
Gets the SAT Math score
public class University public double getSATMath() { return this.satMath; }
1
e4bcd30ad89fe5cfce3bc4626706d08c
aff03c8e1108fc78084e354f8ab012b4
初始化目标文件和临时文件(用于断点下载)
@Slf4j public class HttpDownloader private void init() throws FileNotFoundException { long fileLength = getFileLength(); tempFile = downloadInfo.getAbsFileName() + ".tmp"; rcdFile = downloadInfo.getAbsFileName() + ".rcd"; if(new File(tempFile).exists() && new File(rcdFile).exists()) { ...
1
c3ccb2ff6fc9098d3b4b417f2ea6a0e5
7227a7e36992bf5815a0f99b1e6eaec0
Whether the comment is in an active state
public function isActive(?bool $val = null) : bool;
1
43930cb0f6eeb97f4b4f6ea881411479
a246a1d3e47fcbe6b99c3af48609ecef
Build one-hot encodings of each sequence.
batch = [] for seq in seqs: seq = numpy.bincount(numpy.array(seq), minlength=vector_length) batch.append(seq) batch = numpy.array(batch) batch[:, 0] = 0 if binary_values: batch[batch > 0] = 1 return batch
1
090f31d78306d31cb4c72db522b28d11
55f6c396ffc0bfe26928fdf83f6091db
functie de inserare la inceput in lista generica
void Lista::addelem(int info) { nod *q=new nod(info,0); q->urm=prim; prim=q; }
1
da2e6edf075fd0ea607276d961e93ee4
eec8c6f91878015d45323ddcd8cc566e
Swaps a part with the part to its left.
int i = this.objs.IndexOf(sh); if (i > 0) Exchange(i, i - 1); }
1
3ab744532529a7c6ea78fe2d6560414c
ccfb417811440db3fffad39fa4c5aebc
Mark the block as allocated
static void blk_set_allocated (uint64_t blknum) { bitmap_set_blk (&bm, blknum, true); }
1
ca1635cc674d7756961c0054812a165e
ec42ae5def40b1f10e4c35a04a71dbb2
为多个分组,增加一个工序
public class ColHelper public static List<String> insertParellel(BPMProcess process, Long workitemId, FlowData flowData, BPMSeeyonPolicy policy, boolean isFormOperationReadonly) throws ColException { List<Party> people=flowData.getPeople(); User user = CurrentUser.get(); List<String> memAndPolicyName ...
1
1b00d134898cd8abf8aa9fe1aa762163
cb25e4dbd3851779102e125e7a7c4533
Returns the equivalent status for closed ticket
class PicklistField extends BaseField public function operatorRc() { return [$this->getColumnName() => \App\RecordStatus::getStates($this->getModuleName(), \App\RecordStatus::RECORD_STATE_CLOSED)]; }
1
ec4d8837d78839bb358c1694a45cb672
2defc1a4c52e33555243a9ebed8f02da
Test Color3fVectorData comparison function
class M44dVectorDataTest(BaseVectorDataTest, unittest.TestCase): def testComparison(self): pass
0
745b4f4417cf4fcbb946388e61fae93b
e646f464e480ca55ff1ec892fb6f06f7
Returns the reference day for calculating 1th, 2nd, 3th and 4th advent
Calendar calendar = Calendar.getInstance(); calendar.setTime(referenceDate); return getNDaysDate(referenceDate, -(calendar.get(Calendar.DAY_OF_WEEK) - 1)); }
0
b8942b9d31bc22204230653f36ffb690
c93f02b3bcfce5b8339943ee39498472
Returns the pitch needed to face another player.
local p = Minimap local m = ({p:GetChildren()})[9] return GetPlayerFacing() end
0
3df6dfd33e188cdf105c85d0eeca5c2e
93d6f5e5a6c433947f98055e8bedfcbd
this sets swing to use the native look and feel, much more aesthetically pleasing
public class MainOptimize extends JPanel implements ActionListener public void main() public void run() { UIManager.put("swing.boldMetal", Boolean.FALSE); createAndShowGUI(); }
0
bb39bbcea6e97f1c80668003fa21cc22
2ba0359dacdd091f7db27dcfc6f08c1e
Checks to make sure the SubArea struct is valid
void sub_area(float distance[11]) { impossibleData = false; if (closestBeacon[0] == 0) { if (closestBeacon[1] == 7 || closestBeacon[1] == 5 || closestBeacon[1] == 9) {secondClosest = closestBeacon[1];} else if (closestBeacon[2] == 7 || closestBeacon[2] == 5 || closestBeacon[2] == 9) {secondClosest = closestBeac...
0
a3bf659a75722fc8c9835fae017b8915
2390189a5f5637a986b05b02925bb974
Returns flag indicating if survey can be set as completed or not.
class ConfigPageResponse(Response): def complete(self, value: bool): self._complete = value
0
c861a9072150a352c8611e175f9e68a7
537200af2782e2edb26c83f02c19e6b5
输入原始数据,然后判断每一条回路
std::vector<std::string>::iterator output_node_name; std::vector<std::string>::iterator input_node_name; for (output_node_name = nodes_names_.begin(); output_node_name != nodes_names_.end(); output_node_name++) { std::vector<std::string>::iterator output_data; for (output_data = nodes_outputs_[*out...
1
61d37c0a4d85f86658e2a9b17badfc99
6263fbc406c99132f9c1ff99d300b4af
initializes the table of containers to be used in a project written in c
Local Void INITCONT() { PARAM *WITH; WITH = CONTABLE; WITH->LIMIT = 0.00; WITH->PROB[(long)A - (long)T] = 0.21; WITH->PROB[(long)C - (long)T] = 0.31; WITH->PROB[(long)G - (long)T] = 0.29; WITH->PROB[0] = 0.58; WITH = &CONTABLE[1]; WITH->LIMIT = 0.17; WITH->PROB[(long)A - (long)T] = 0.81; WITH->PRO...
1
821d80cb8adca6434cf23bc156bd9a56
6e8067f771ca1b508f4ce30cebe4cb40
Map the index / bucket to a frequency.
int[] buckets = new int[n]; int index = 0; for(String s : input) { index = hashMapIndex(hashMapHash(s), n); buckets[index] += 1; } return buckets; }
1
c898df9ff8dc78412b87aeb88c641dec
77fb0f191212e35f824fb57fc169b183
失敗したメッセージを返すテスト。
class ProductTest extends TestCase public function testFailedProduct() { $response = $this->getJson('/api/categories/1/products/2'); $response->assertStatus(200) ->assertJsonMissing([ 'product_name' => 'クロスシルバーピアス' ]); }
0
63558eedc7c67a761feffcb2bf6e33e0
d90519fb3557bd35f494996e11aebe5b
定时打印T,表示服务器运行正常,方便开发者判断. 如果没有这个,当客户端连接出现异常时,因为服务器没有任何动静因此无法判断异常出在哪里
if (t instanceof HttpServerStatusException) { LogUtils.e(TAG, ((HttpServerStatusException) t).getContent()); return true; } return false; }
0
9439965f7f6a138c918c15de8a46dd97
dfa4ac860f001863523abc620fb0854a
Verify the behaviour of adding a long-option only.
class ArgvInputTest extends TestCase public function test_addShortOption_with_array_option() { $this->callMethod(self::$input, 'addShortOption', 'f', 'file1'); $this->callMethod(self::$input, 'addShortOption', 'f', 'file2'); $this->assertEquals([ 'file' => [ 'file1', 'file2', ] ], $this->readAttr...
0
b746b8443fdbf069d8e05350096439f5
763d68dd16978aac422b829080943d58
Tests the vector of URLs generated from the stream.
for entry in self.feed.entries: media_content = entry['media_content'] self.assertEqual(len(media_content), 1) url = media_content[0]['url'] self.assertTrue(url.startswith(self.BASE_URL))
1
07e93c89e5bfc0308313530db9f81d40
5203499b38927618641f67953fef82d7
WithFlushWaitIfOngoing - if set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
namespace NHibernate.Shards.Session public class ShardedSharedSessionBuilder : BaseShardedSessionBuilder<ShardedSharedSessionBuilder, ISharedSessionBuilder>, ISharedSessionBuilder ISharedSessionBuilder ISharedSessionBuilder.FlushMode() { return FlushMode(); }
0
4c09bdd9d491fbf0e9e8a08169d9dc5d
7f054196877be97e06b5719b21d24ce4
the::system::threading::thread_pool::submit
void_t global::schedule( natus::concurrent::task_res_t t, natus::concurrent::schedule_type const st ) noexcept { if( st == natus::concurrent::schedule_type::pool ) { this_t::init()->tp.schedule( t ) ; } else if( st == natus::concurrent::schedule_type::loose ) { this_t::init()->lts.s...
0
ae8ab129308c543a5012983bf2559507
448c2e08ea1adfcd1b819c48949eabf4
# Flux from Inorganic Nitrogen (Plant Uptake)
{ unitval npp = npp_flux0.at( biome ); npp = npp * co2fert.at( biome ); return npp; }
0
1781b347fb8e7394195d2b0e80327d95
944f0d8f74c8f2976c5923edc6584298
Construct URL for the author's page.
{ $user = User::where('url', $url)->first(); return view('author', [ 'author' => $user, 'posts' => $user->posts()->where('draft', false)->orderBy('created_at', 'desc')->paginate(10) ]); }
0
72c514746e791fcf782d2cba9cfe70e9
503100bb32501ce4a68bc6230f392991
Método para guardar la información de los locales.
namespace Partyme public partial class MainPage : PhoneApplicationPage public async void localespincho(double latitude, double longitude) { Uri url = new Uri("url"); objetoslistas.getgeograficplacesinput paquete = new objetoslistas.getgeograficplacesinput(); paquete.latit...
0
63b8a064a6f348da0b422519c36be36b
bdeba3b283f27d18126843c947ac4c46
先判断有没有fd 有关闭文件 触发close事件
if (err) { this.emit('error', err) } if (this.autoClose) { if(typeof fs === 'number') { fs.close(this.fd, () => { this.emit('close') }) } } }
1
aa2b30307df5e000c10fc8f50caa9fca
7706c687f7f4af85fbed5a85547c608a
Display trackback links form fields.[trackback]normal core
$defaults = array( 'title' => '', 'bk_youtube_username' => '', 'bk_dribbble_username' => '', 'bk_twitter_id' => '', 'bk_facebook_username' => '', 'bk_rss_url' => '', 'bk_consumer_key' => 'XZYM8uHmu0lXtx8xVjCuxQ', 'bk_consumer_secret' => 'B8FsIfDysKsop5g3BKWKgLD4r7bU3XJIIUYtwd...
0
d4eb5d371df58427546e7d98dadc29ba
60055c41f5b6b118c0614dd3a71e80cc
Perform count vectorisation on all asts.
public class Utils public static int[] computeTreeVector(ASTNode root) { int[] treeVector = new int[92]; root.accept(new ASTVisitor() { public void preVisit(ASTNode node) { treeVector[node.getNodeType() - 1]++; } }); return treeVector; }
1
7bf7d94b77b72f0af44eb30294709e78
e2804f0839b4b0c63b8f7903424af070
Handler for opening the Tools menu, where dropdown items are en/disabled.
public class MapAdminController extends DisplayController public void handleToggleTools() { if(toggleTools.getSelectedToggle() == null) { changeState(State.NONE); } else { changeState((State) toggleTools.getSelectedToggle().getUserData()); } }
0
658538124aadb392c48329dd25775a65
5d6e74f779dfca62ad74906a57787859
Check if <subkey> has a value
public class Registry public static boolean valueExists(HKEY rootKey, String subKeyName, String name) { IntByReference pType, lpcbData; byte[] lpData = new byte[1]; HKEY handle; boolean ret = false; pType = new IntByReference(); lpcbData = new IntByReference(); ha...
1
fd509cdbbdf6ccbd05938ddf8a42e082
cb1ac22b428f6de5989ed4a0b52cdc7a
Метод для изменения релиза с возможностью изменить версию или сроки релиза
namespace Squirrel Task<string> ApplyReleases(UpdateInfo updateInfo, Action<int> progress = null);
0
d55fe3426c0694be99a83d36b4405b7f
04886cc6ee8fe6e62774bfaa70b32e8d
Wraps the Value. A childclass can extend this and wrap each value in a spac. For example a strikethrough for disabled entries.
class SpacedTextField(TextField): def __init__(self, name, formatData=None): super().__init__(name, formatData)
0
7eecb780cf242e51705135b00c636543
a1cdeff61ece903f98bcc68df3beb866
Stavlja maksimalnu vrednos pocetnog datuma da bude dan manje od odabrane vrednosti krajnjeg datuma
function setMinDate(){ let currentDate = new Date(); let day = currentDate.getDate(); let month = currentDate.getMonth() + 1; let year = currentDate.getFullYear(); day = (day < 10) ? ('0' + day) : day; month = (month < 10) ? ('0' + month) : month; let min = year +...
0
3330cc01e407058335320fd80d471210
d844421d613f9eee367d5d2043845649
metadata logs should be always be tail optimized
if self.log_buffer: return True if max([log_lev for log_lev, _log_str in self.log_buffer]) == logging_tools.LOG_LEVEL_OK else False else: return True
0
e27b5eb401600b2cab16dd70a13f9cf1
dd51782b2ca3d27f3bb1d641ffdb436f
战斗机火焰添加到精灵组中
public class BattleEnvironmentM public static void AddFireSoldierCompent() { if (m_MapStart == null) { return ; } GameObject g = m_MapStart.transform.parent.gameObject; if (g == null) { return ; } if (CmCarbon.GetCamp2Player(LifeMCamp.ATTACK) =...
0
e23f18ba789c92279d47539ca4f6f7bc
50725dec1d9e83720ad5b62b93bbef42
Extracts the single value of the given row as the passed type. Returns null if the row is null or empty. Throws an exception if the row has more than one value.
public class TypeClassInfoImpl<T> extends ClassInfoImpl<T> implements TypeClassInfo<T> @Override public T getObject(Row row, Map<String, Object> kkeys) { if (row == null) { return null; } final ColumnDefinitions cdefs = row.getColumnDefinitions(); for (final TableInfoImpl<T> table: getTables...
0
1270dc28d2c6de2fb33094cfcb205b87
bb04ea5a813c9e96905fadc15fa175ca
Add listeners to liList
public class HabitApp extends JPanel implements ActionListener private void addListener() { addList.addActionListener(this); removeList.addActionListener(this); markBtn.addActionListener(this); viewBtn.addActionListener(this); editBtn.addActionListener(this); monthBtn.add...
0