query_id
string
corpus_id
string
query
string
code
string
label
int64
e5b6cf730070fa3159b3ddfcc68f84fa
ea91d0a0f32fe84b8ef0c3014906ef66
Resolves the list of URIs into a list of {@link Endpoint} instances
Iterator<Map.Entry<String, List<String>>> it = endpointsPool.entrySet().iterator(); Map.Entry<String, List<String>> entry = null; List<String> endpoints = null; while(it.hasNext()){ entry = it.next(); if(uri.startsWith(entry.getKey())){ endpoints ...
0
20771648c6ba43a7e9011fedf13c6d06
e987443a5c321424136e2a0688931c86
チェイン数を1に初期化
for(int i=0;i<nch;i++){ zp[i] = 0; zn[i] = 0; } T = 0; delta = 0; LLI = 0; thickp = 0; thickn = 0; ep = 0; en = 0; ap = 0; an = 0; CS = 0; Dp = 0; Dn = 0; r = 0; delta_pl = 0; for(int i=0;i<ns;i++) sini[i] = 0; }
0
d8836c34ab45e95bb2f6a7ded8c7bbbe
3346e949274694b2abb930a5255e5f41
Decides which type of note hit function to call
public class CheckForPress : MonoBehaviour void Update() { float range = Mathf.Abs(this.transform.position.x - bullsEye); int noteType; if ((range <= hitRange) && Input.GetKeyDown(keyToPress)) { if (range <= hitRange / 4) { noteType = 2; } else...
1
8a3e4846a06a4eb00c06d2e24932e933
ac72999b9aeed9794099975ea6629979
Returns an evolved population from the current population.
public Population<G,P> iteration(Population<G,P> current);
1
bc0755eb6e9291eb838e514ad22ab89a
2f8185f5876c1d6f7b7e97d152b2c884
Convert geometry to XYZ-formatted string
namespace Zeiss.PiWeb.Formplot.FileFormat public sealed class PlaneGeometry : Geometry public override string ToString() { return string.Format( CultureInfo.InvariantCulture, "Length1={0}, Length2={1}, CoordinateSystem={{{2}}}", Length1, Length2, CoordinateSystem ); }
0
221fb98b7c4396628d777296de4e0cff
94790dee3ba645791bbfa7d83085604d
Отправка бит по SPI - параметры: кол-во бит, адрес байта, маска, число сравнения
{ uint8_t i; uint16_t SendAddr = 0; SendAddr = (~(Mask) & Addr); for (i=0; i<NumberBit; i++) { if (SendAddr == Compare) { SPI_PORT->PINSET = DATA_OUT; } else { SPI_...
1
860a2a49013b328b5641b31d6f9e1769
ab1c0ad6a3a2e7971b0383c9114c22fb
# статистика по работе модераторов
{ global $wpdb; $limit = 20; $stat_count = Diductio::gi()->settings['stat_table_count']; $start = (int)$_POST['start']; $end = $start + $limit; $table = Diductio::gi()->settings['stat_table']; $sql = "SELECT * FROM `{$table}` LIMIT $start, $end"; $re...
0
8a56cac2e5776668b73a69a3861982df
aeeca2b6340e28a69ef79a259d26f4d7
Locates the PEI Core entry point address.
{ var clrAddr = GetCLRAddress(); if (clrAddr == IntPtr.Zero) return null; return new PEInfo(clrAddr); }
0
3d05b46dac613d916d339a425a9f589b
5737ec735918aedffbaee006cfd18119
renderFile renders a file from a source path into the destination path given a rendering context
func ServeFile(w ResponseWriter, r *Request, name string)
0
9e46309a3077e2cad4add15ac93f6a24
7f28806469b347e193689860955e0309
Getter om films op te halen aan de hand van het IMDB tt-nummer
{ if (empty($this->thanxfilms)) { $this->filmograf($this->thanxfilms, "thanks"); } return $this->thanxfilms; }
0
08163b96307fa9057119dfc623de5bfe
ca64923f318a3f5d196305c036d81651
get platform special code
{ var platformCode = 0; switch (em) { case EnumPlatform.UniformSourcePool: platformCode = 1; break; case EnumPlatform.BerthBooking: platformCode = 2; break; ...
1
6ce8ce9f7c95f30f43380695e25117f9
85edbd55eaaf0adef6387c4079b05c7e
Calculates the feedrate in inches per minute
{ return getTicksPerUnit() / (wheelRadius * motorToWheelRatio * 2 * Math.PI); }
0
59a4e525e9333cc8a60fec0fc0abc286
e5de1da3e86e8e6879b447421a58ccae
Description This function check the specified service class(es) can be find in the received SDP database Returns BOOLEAN TRUE - found FALSE - not found
{ bt_sd_srv_rec_type* srvRecPtr; uint8 numRecs = 0; int i,j; bt_sd_srv_attr_rec_type* attr_ptr; bt_sd_srv_rec_iter.init( BT_SD_DB_TYPE_SRV_SRCH_RESULT_DB, BT_SD_ITER_ALL ); for ( srvRecPtr = (bt_sd_srv_rec_type*) bt_sd_srv_rec_iter.first(); srvRecPtr != NULL; ...
0
91dd6f26b157e85450d1f3e19f90ee77
8f4aa0e632063ec56ef4bdb3237af98f
取得後台用指定語系的網頁照片清單
class LanguageController extends Controller{ public function getLanImage(Request $request){ $input=$request->all(); $obj_list=$this->model->getLanImage($input); $response['results']=$obj_list; return response()->json($response); }
1
07007e4508e9af9d66d5a5a729be517c
83ad768a87e76301f0dd446770f3fe3f
Dimensionar Secciones
function activeSection() { secNum.forEach( section=>{ var Rect = section.getBoundingClientRect(); if (Rect.top>=-100 && Rect.top <= 500){ secNum.forEach( (del)=>{ if ...
0
a4a793944b68a0a6a9a1e8db31f2d70e
4ef3e548bc09cb814dc3a39e484a1427
Sanity check. Make sure that visitor classes use the right names.
public class OLGAVisitorSarefFullTest implements OWLObjectVisitor @Test public void testSize() { assertEquals(olgaVisitor.getMapIRI_to_Zclass().entrySet().size(), 116); }
0
048529d1278f68dca29aa769d40c66f7
7a3ea6f4b735b8c71aad6868e6a9fd57
Ignore unknown event payloads.
class PayloadUnknown(PayloadBase): def __init__( self, *, buffer: Optional[Buffer] = None, node_map: Optional[NodeMap] = None, logger: Optional[Logger] = None): assert buffer assert node_map self._logger = logger or get_logger(name=__name__) ...
0
4961df99c212b2df09db52fc2c2b8933
98e67a27cebaec6a77367e990a41fbf0
根据机场代码 返回 航班属于国内 还是国际线路
public partial class Order_LineOrderProcess : BasePage public List<Bd_Air_AirPort> GetCity(string IsDomestic) { return this.baseDataManage.CallMethod("Bd_Air_AirPort", "GetList", null, new object[] { "IsDomestic=" + IsDomestic }) as List<Bd_Air_AirPort>; }
0
4d2a142a87679a60d4b1a1f452382fcb
a45552b4043e272f4e114c94ce957226
Given a pointer to element e in the set, finds a SetElement in the set that has the next smaller key, and returns a pointer to it, or null if e is the minimum element.
{ int i; if (T[0] == Nil) return Nil; for (i = 1; i <= MAX_TREE_SIZE - 1; i++) if (T[i] == e && i % 2) { if (i + 1 >= MAX_TREE_SIZE) return Nil; else return T[i + 1]; } return Nil; }
0
7d0646b125e70503e428e2f38c628cd1
a64712b6e7241dedb80244880b6c8efa
Replaces the database at the given path with the contents of the given sql string
@Repository public class DBRepository @Transactional public void runSQL(Path sqlScript) { jdbc.execute("RUNSCRIPT FROM '" + sqlScript + "'"); }
0
9e670c456e049e2f01e00aa167ee2f83
05cceebdddf0bd6027211d23e38e4336
When generating samples from a larger MDP, if each sample is marked by the state from which it comes, the following function clusters the samples depending on states from which they were generated.
class DirichletMixture(gibbs.Component): def sample_cluster(self,datapoint_index): posterior_sampling_log_probs = self.get_posterior_log_probs(datapoint_index) sampled_cluster_index = utils.log_sampler(posterior_sampling_log_probs).single_sample() number_of_local_clusters = len(self.clusters) new_cluster_status...
0
9ba83271034e4b8ae014e41e907e1f6d
8ad8f8908b1ec0989a0510832e1e33c5
! 指定された番号の行へのポインタを返す
K_record& K_recordSet::operator[](int num) { return this->m_s[num]; }
0
ffd9d4ea70952f75a2640d1070f113f1
6331fc448f8f6331b47b29c86db0bbe2
Borra una calificacion de la base de datos recibiendo un Id por parametero correspondiente al elemento que se quiere eliminar
class Super_model extends CI_Model public function remove_contentCalification($iId){ $this->db->where('id', $iId); $this->db->delete('CalificacionContenido'); }
1
09a594699c9981cf70096dd5c310ea55
9355d2d092e94a1fcf607f533fcea693
Add the story to the list only if it's not already there And don't set the rank on the story itself, since the rank can change depending on the list it's being viewed in
{ bool found = false; if(listNode.getName() != node.getName()) { if(listNode.getType() == zodiac::NODE_NARRATIVE) { foreach (zodiac::NodeHandle node, connectedNarrativeNodes) { if(listNode.getName() == node.getNam...
1
7f2bf7d35245b49cb6827073c369bdff
420c549d74a5e2d8f17cf221219e6668
Lower clamping threshold that indicates the fluid speed where cells start to emit particles (lower values result in generally more particles)
export class FluidDomainSettings public get sndparticle_update_radius(): number { return PythonInterop.getInteger(this.interop, `${this.accessor}.sndparticle_update_radius`) }
0
acb54ef93f8adfdbdc3ba8902de8264c
6215ac447adcb0da8e701ae158c34e11
抽取出某个字符串之前的字符串
String data = null; if (str.contains(key)) data = str.substring(0, str.indexOf(key)); return data; }
1
668e07b1ac458ce150127829e7bec3f9
63dee970c9fcff27c92232cb935371fd
获取给定成员相关联的分数在一个有序集合。
class RedisUtil: def sortedsetZSCORE(self, member): return self.redishanndle.zscore(rediscommon.agent_redis_sortedset_key, member)
1
0297a1a5aaf4c9fe277e530ab2c41b26
511ee0d217b51bb2bff48627309bb7ab
Specifies the user-friendly name that should be used for this connection pool. This name may be used in debugging to help identify the purpose of this connection pool. It will also be assigned to all connections associated with this connection pool. this connection pool.
final class PoolManager extends SplObjectStorage public function setPoolName(string $name) { $this->name = $name; }
1
6607662733da7f557de90d92a8635311
e1ef2c2ebcd7a26cfe50225af3569bf5
Returns deep copy of Linked List
newLinkedList = LinkedList() current = self.head while current != None: newLinkedList.addLast(current.getData()) current = current.getNext() return newLinkedList
0
d47d7bdad0b375c121635227180d5c9c
fe268d854be0c58ccbd58bd3af64c950
Tests that function works correctly for missense variant in ENIGMA CI domain with de novo acceptor score, no de novo donor
getPriorProbIntronicDeNovoDonorSNS): boundaries = "enigma" self.variant["Gene_Symbol"] = "BRCA2" self.variant["Reference_Sequence"] = "NM_000059.3" self.variant["HGVS_cDNA"] = "c.-39-23c>T" self.variant["Pos"] = self.var...
0
3444b7301d9aa6a23f5fa430d6d62fdd
3d0e4fcef9936b1c40063baed7d19a6e
Handles the FormClosed event of the GameForm control.
namespace SlimFramework public class GameWindow : IDisposable public virtual void FormClosed(object o, FormClosedEventArgs e) { if (!m_IsDisposed) Dispose(); }
1
196bb9b896e0ef5591b9953b7cc034c1
51f900930a73ddc78064aedb38e9bb6f
"勤務種別"を選択します。
{ List<KeyValuePair<int, string>> workTypeList = _controller.GetWorkTypeList(); ShowWorkTypes(); return SelectWorkType(workTypeList, out keepRunning); }
1
e268e5ca2c1e63da7aec6994cd048c2b
9fb991110972980a78a762b28226e92e
Returns the nth hexagon number
def hexagonalNum(n): return n*(2*n-1)
1
d3af4728c273cd50166a6ab0ded8170f
b357ce155b4853678a7eee4c7ee7344d
Determine background music based on current phase
class gameSounds: def shiftPhaseMusic(self, phaseName): self.musicDictionary[phaseName]()
1
b34c729693ef57e93d354eb426eeb988
5235e81aa8953ab7104530cf849958b2
Redirige a la vista de agregar una nueva operacion
class OperacionController extends Controller public function create() { return view('operacion.create'); }
1
e8c43ce5a93ca364ab1f3aa047abd634
8c8aa4ba26daa67b3b3996604b40b9a6
处理一个数组,使其支持性array[-1]的访问
function createArray(...elements){ var handler={ get(target,propKey,receiver){ var index=Number(propKey); if(index<0){ propKey=String(target.length+index); } return Reflect.get(target,propKey,receiver); } }; var target=[]; t...
1
52b88d5fb504be1a3a932d8ed566c4fe
4f0564acf66eea97415f41d576330396
don't save on autosave
class Storage def no_autosave! @autosave = false end
1
c3325742986091401e847952f5d489b5
47a0bbed49a5fabf09ea052359903305
根据服务器ID删除关联的IP
namespace CNKI.TPI.Web.Admin.BLL public class UserMgmtService : BaseService, IUserMgmtService public bool DeleteUserIP(string sysidstr) { return userMDao.DeleteUserIP(sysidstr); }
1
615cf39e355fda928c50e8d360d73edc
48bbf1f99587377006578fae2f4bdbbc
方法3:建容量为k的小堆,遍历nums插入小堆中,如果小堆已满,则判断要入堆的元素和堆顶元素的大小关系。若待入堆元素的值大于堆顶元素,则出堆顶元素,入新值,否则,遍历下一个元素。
{ std::priority_queue<int, std::vector<int>, std::greater<int>> small_heap; for (int i = 0; i < num.size(); i++) { if (small_heap.size() < k) { small_heap.push(num[i]); } else if (small_heap.top() < num[i]) { small_heap.pop(); ...
1
e65d2d55175d1fe19c380a99b5463e09
8db1b50d1ab8ffb2c5d0a0d451479e4d
Construct the instance, and create the precompiled regular expression for the macro arguments.
$this->callback = $to; $this->callbackParams = array(); $this->argnames = array(); $this->optnames = array(); $parameters = array(); if(is_array($this->callback)) { $method = new \ReflectionMethod($this->callback[0], $this->callback[1]); $parameters = $method->getParameters(); } elseif(is_object($th...
0
9c66bdd3ac3838a2a1ebfc6bd80a27b3
d0eb198ea4175cd419690814ebe550e7
@brief deletes all subdirectories recursively
void delete_dir_util(char *currPath){ DIR *d = opendir(currPath); struct dirent *dir; if (d){ while ((dir = readdir(d)) != NULL){ if( (string(dir->d_name) != "..") && (string(dir->d_name) != ".") ){ string fullPath=string(currPath) + "/" +string(dir->d_name); char tempPath[fullPath.length() + 1]; ...
1
803f3a23bda64cccbb3a7ef609ac121a
8b3e21c8e12c045dedca7128b56ef244
Renders a break line in HTML.
class Markdown extends Parser protected function renderHr($block) { return $this->html5 ? '<hr>' : '<hr />'; }
0
75e0b9743c856fb39457d7d1f5afaf2e
3d95a6bc44e54b274bf7b2661ed2bef6
查找所有游戏区配置 (map格式 key<worldId>)
{ $ret = array( 'code' => ERRCODE_SUCCESS, 'msg' => "", 'data' => array() ); $areaList = array(); $confList = array(); $confSer = new DbLoadConfigService(); if (true === $confSer->load(C('G_USER.gameid'), 'GAME_DICT_DB', 0)) { ...
1
d260c8dd57699b2cda5e764d645a2958
ce733f48d5331eb2a66bd05c6dfdbeb4
Creates a new version comparator object, based on $version.
{ $comparator = $this->lessThan; $version = $this->versionParser->parse($tokenList); switch (true) { case 1 === count($tokenList): $version = new Version($version->getMajor() + 1, 0, 0); break; case 3 === count($tokenList): ...
1
fff3391f95e74f0fb87dafed8f8561c4
7dfa83755cbbb09b9fa32b83e65fc4cc
Gets the recent meetings most recent first.
$db_meet = Meet::orderBy('id', 'desc')->take(5)->get(); return response()->json([ 'data' => $db_meet ]); }
1
dadb5e108f7b00ee79473803ace1981f
6509f93656e45d759b5a7e697ff80eca
Determine if two scripts are compatible.
def compare_scripts(explain_output: str, script: str) -> None: explain_output = explain_output.strip("\n") script = script.strip("\n") if sys.version_info < (3, 9): assert pyp.unparse(ast.parse(explain_output)) == pyp.unparse(ast.parse(script)) else: assert explain_output == script
1
ae38b3865a7849c2d86159839680f3cd
3ef32ec011ea6ad81162eb31665d77d4
load the saved extra args for sparse VAE object
def load_args(path: str) -> Namespace: return torch.load(path, map_location=lambda storage, loc: storage)["args"]
1
d8842d53a347675a23b42ada86f04b3a
3d107aa37bd14dd7b7c451f584e68991
Keep-alive for the shorter of 20 seconds or what the server specifies.
public final class MulticastRMICacheManagerPeerProvider extends RMICacheManagerPeerProvider implements CacheManagerPeerProvider protected long getStaleTime() { return MulticastKeepaliveHeartbeatSender.getHeartBeatInterval() * 2 + SHORT_DELAY; }
0
2f6d640439acc1701ea9080f3244b427
f253503928eb7accdda716862638337d
Send a "Start the file transfer package" to the remote connection.
class STFP_Client(Machine): def preUpload(self, event): self.__sendmsg(pkg_type.FILE_UPLD, 5, {"token": f"{self.token}"}, recv=False)
1
b3973e21f3f79ad90f3b062c191525c2
f9772e28e998f74cbcc5ae522b149040
Редактирование рассылки
{ $postData = array(); if (isset($_POST['UMailSendingRole'])) { $postData['UMailSendingRole'] = $_POST['UMailSendingRole']; } $pk['u_person_id'] = $_GET['u_person_id']; $pk['u_mail_template_id'] = $_GET['u_mail_template_id']; $pk['u_mail_send_role_id'] = $...
1
34bb8abf58bb19aa5c1019ebd15d1243
840d4d29910ab4e721798a4f6bd8d40d
慢慢调小音量,可渐变
export default class AudioManager private static volumeFade(data: AudioData, duration: number, from: number, to: number, call?: () => void) { data.tween?.stop(); data.volume = from; cc.audioEngine.setVolume(data.id, data.volume * this.bgmVolume); data.tween = new Tween(data) ...
1
1a7dd507d5b8bf0bfbf2805a64a7b3f6
4b422b37b3d2e92a60eef34a49790ae7
取得公演場次資料
throws SQLException { String sql = String.format("select Concert.id as concertid, Player.name as playername, Concert.name as concertname, Concert.date, Concert.kaijou, Concert.kaien, Hall.id as hallid, Hall.name as hallname, Concert.ryoukin, createdate, (select count(*) from Listen where concertid=Concert.id) as l...
1
c00508f97e0c0446759d03eb2d004d95
c1d25f012739e355b82483e9d6dad08b
Runs on the plugins_loaded WordPress action, as long as the plugin is not (yet) going to abort all other operations (e.g. due to missing requirements)
function rsbp_init_plugin() { if ( !class_exists('acf') ) { add_action( 'admin_notices', 'rsbp_warn_no_acf' ); return; } include_once( RSBP_PATH . '/includes/bulk-price.php' ); include_once( RSBP_PATH . '/includes/products.php' ); include_once( RSBP_PATH . '/includes/enqueue.php' ); include_once( RSBP_PATH...
0
12441d8be80d46895a9686e18939826b
eb5a429ddbbca4d613c3f4e1fc0bb4cb
@brief Retorna int de um método.
jclass cls = (*env)->FindClass(env, clsName); if (!cls) { return NULL; } jmethodID mid = (*env)->GetMethodID(env, cls, methodName, methodParam); if (!mid) { return NULL; } va_list arg_ptr; va_start(arg_ptr, methodParam); jint result = (*env)->CallIntMethodV(env, clsOb...
1
5a625a5f193dbf9260a840ace30b9a5f
15d302578aa6cd4cd64d31bfc2e7f7f9
Sets the fraction settings.
{ $this->maxFractionDigits = \RandData\Checker::int( $maxFractionDigits, self::FRACTION_MIN, self::FRACTION_MAX, "maxFractionDigits" ); }
1
f6bb6b72c2dd89b5b9e5f5c600e30e09
02410c94b15126edf923ac7d32a6ce8e
execute commands to render all bspheres
namespace castor3d class LoadingScreen void BrdfPrefilter::render( QueueData const & queueData ) { m_commands.submit( *queueData.queue ); }
0
c1d5620755ea615639411e8f3d6d6920
8ab1953949e8b5672270b21e380573b8
解绑队列 该API用于在增强型跨源中解绑已绑定的队列。 Please refer to HUAWEI cloud API Explorer for details.
req: UnbindRsListRequest, cb?: (error: string, rep: UnbindRsListResponse) => void ): Promise<UnbindRsListResponse> { return this.request("UnbindRsList", req, cb) }
1
82be4c9e67d322fd41e32c36a6e99956
15e34f0bb34a6ca39587d1eeed8d34a1
metodo che setta la lista di contratti associati ad un dipendente
class User(ABC): def set_ongoing_contracts(self, contracts): self.ongoing_contracts = contracts
1
16bf8176592448a80c66e67d11044fbc
8de30b8cf53a42acd35cc4955bc04cb0
listenin başına yeni görev (node) ekleyen method
node_list *list_insert(list_t *l, struct pcb *elem) { node_list *node = malloc(sizeof(node_list)); node->data = elem; node->next = NULL; node->prev = NULL; if(l->length == 0) { l->tail = node; } else{ node->next = l->head; l->head->prev = node; } l->head = nod...
1
64316448db75bd3445090b4789d99a32
3934ac8a0caa6c3569529ebfeb692936
Disables unit.
{ if (Tile) { Tile.Unit = null; Tile = null; } }
0
ce5be78359ddc8613dd752e7fa4915ce
75e77ad042186083b4b0397f760b88c6
Check if given quality is supported
namespace YTDownloader.API.Domain.Entities public class AccountPermissionChecker : IAccountPermissionChecker public async Task<(bool isAllowed, string errorMessageIfNotAllowed)> CanDownloadInCertainQualityAsync(string quality, bool isAuthenticated, string username = null) { string[] splittedQual...
1
779b3fc0ffb2f56828d51c7e7f22b98f
5db125a50ab873b41cfed96581277bc6
Used for calling a stored procedure n MySQL
class DatabaseHelper: def callproc(self, proc_name, params=None): self._cursor.callproc(proc_name, args=params or ()) return self
1
453568f83b981ee01b04253a218b836b
1e7b329b8f093d8cdf7c9b74d2cfe55e
convert meters to pixels
public class GameConstants public static class PhysicalProperties{ public static float horizontalInPixel(float meters){ return (meters/PhysicalProperties.width)*ScreenProperties.width; }
1
c39c147cf593c755a70e027a5ccb6901
05f044a8059333343a83e9c922187c9d
Discover the option child value.
if( $this->childCallback ) { if( !is_null( $this->childCallback->tmpID ) ) return $data; } if( !preg_match( '/^pre_option_(.+)$/', self::$manager->currentFilter , $matches ) ) return $data; $name = $matches[1]; return $this->settings['widgetOptions'][$name]; }
1
a0763dc81f539813b1ef1e443e9469a0
56f5e298ff8eb633bbb87dae2f3d68a6
Calculate a semi-major axis for an orbit with the specified orbital period (in seconds)
namespace SpaceSimulator.Physics public static class OrbitFormulas public static double OrbitalPeriod(double standardGravitationalParameter, double semiMajorAxis) { return ((2 * Math.PI) / Math.Sqrt(standardGravitationalParameter)) * Math.Pow(semiMajorAxis, 3.0 / 2.0); }
0
ab37a205e650671017c077b5576a41ed
b4b02b8b8b2c5759e1d0fc2008edeaef
#获取图象最小的边长
cd_nedges <- sapply(cd.path, function(x) {x$nedge}) index <- which.min(abs(cd_nedges - n_edge)) if (index == 1) { if (length(cd.path) >=2) { index = 2 } } return(index) }
0
441d0249f419b5e329f651e8bf9d85bd
fb00e3d910ebdeb33311b7652b2c9c24
Collect a single dataset from a list of source files into a final output file.
def main(input_filepath='x', output_filepath='y'): logger = logging.getLogger(__name__) logger.info('making final data set from raw data')
0
bea9c9c37f8aaeef828230c2dec50df1
2a73eaa6fe6805c493130b6e3b577030
The target azure VM Name.
class AzureVMCreateData(object): def name(self): return self._name
1
2c9a4c14ee30968829fa5a3305fabbdc
4111549457e4e586de20f20deb9a1207
function to initialize WASAPI
int Initialize( [In] [MarshalAs(UnmanagedType.I4)] AUDCLNT_SHAREMODE shareMode, [In] [MarshalAs(UnmanagedType.U4)] UInt32 streamFlags, [In] [MarshalAs(UnmanagedType.U8)] UInt64 bufferDuration, [In] [MarshalAs(UnmanagedType.U8)] UInt64 devicePeriod, [In...
1
d9a3e705353d6965b6eae598ad4ce1ee
df2b46c3fbd4ca5feb97b3f4386ce0b3
<p>Enable swipe items.</p> You should attach {@link ItemTouchHelper} which construct with to the Recycler when you enable this.
public class ItemTouchHelperCallback extends ItemTouchHelper.Callback @Override public boolean isItemViewSwipeEnabled() { return true; }
1
67352c4f0bc40386c7e44b9b72b14f15
70d77932aa4de8522edfac3fb361c8e1
删除成品出入库
@Controller @RequestMapping("/zp") public class SalesZpAction @RequestMapping(value = "deletechuku", method = RequestMethod.POST) @ResponseBody public int deletechuku(String sowId) { return sBiz.deletechuku(sowId); }
1
9ac308dcbbcce1a40290615b17faad87
bb36338f962710193b119740c94a4d3a
Función para verificar si pelicula existe
{ $st = $pdo->prepare('SELECT * from peliculas WHERE genero_id = :id;'); $st->execute([':id' => $id]); return $st->fetch(); }
0
38ad1d6ebe5ccc7d912e8874be3d005b
4a8d21307174bacfccc5c08541faa57f
Test get and set quarantine effectiveness
self.players[1].location = "SYDNEY" self.players[1].role = "quarantineSpecialist" self.testGameBoard.cures["red"] = 1 self.testGameBoard.infectCity("SYDNEY", 2) self.assertEqual(self.cities["SYDNEY"].red, 0)
0
18d7783d9fc31e1932dbd76b44653d7c
2dc421d0f79196dea0f3189771a545a6
根据用户ID获取在借中的借阅清单 的数量
public class CommonService extends HibernateSimpleDao<ZfptClass> public Integer getUnReturn(Integer userId){ Criteria criteria = this.createCriteria(Borrow.class); criteria.add(Restrictions.eq("book_status", 1)); criteria.add(Restrictions.eq("borrowUser.userId", userId)); return (Integer) criteria.setProjection...
1
5aa675b33581a8530120f1d18c2f3530
017c379b333d33b54575eb20e3a3c308
This method resets the attack timer.
public class WizardAttack : MonoBehaviour void Start () { timer = 0; }
1
5fca1bbb2d4d5ff9af917e418a8b0064
98815d305a1a18bc7b8de543c434bf64
取消解散请求
function P.RequestCancelDissolveGuild() local nm = NW.msg("GUILD.CS.CANCEL_DISSOLUTION_GUILD") NW.send(nm) end
1
804ae4c8959ac35d426d68a139313c0f
1bfcaa53a30f1e7b59ba81e9679e4fd9
This is the total number of items that were changed in the sis import. There are a few caveats that can cause this number to not add up to the individual counts. There are some state changes that happen that have no impact to the object. An example would be changing a course from 'created' to 'claimed'. Both of these w...
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "resultType") @JsonTypeName("DatabaseLevelOutput") public class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel extends MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput public Long appliedChanges() { ret...
0
999d992a07d845fea4d714ddc36ca2fa
9c4df34468e7eb6446a6a635ac9a5301
Hook handler: sets company ID and storefront ID when creating a theme instance.
{ $customer = $this->context->create(CustomerData::class)->load($params[CustomerData::ID]); $store = $this->context->create(StoreData::class)->load($params[self::PARAM_STORE_ID]); $params[CustomerData::IDENTIFIER] = $customer; $params[StoreData::IDENTIFIER] = $store; return $...
0
d68dc178b9b9e2b8f6ea0a4d20297aa6
af3235e32c9b09f2602760cb68945b9a
Test that the endpoint returns 401 if the user is not authenticated
resp = client.get(RESULTS_URL, format='json') assert resp.status_code == status.HTTP_401_UNAUTHORIZED assert 'detail' in resp.data
1
6a443d9dcd2625f362104e28ce0b059e
2cbcefbec5b48d54de8c0f3b05f2acb0
returns a unique customer ID. *DOES NOT CREATE CUSTOMER
function createCustomerID() { $pdo = new PDO(DBCONNSTRING, DBUSER, DBPASS); $sql = "SELECT MAX(CustomerID) FROM Customers"; $sth = $pdo->prepare($sql); $sth->execute(); $result = $sth->fetch(); $pdo = null; return $result[0]+1; }
1
3e7b630f33406b1a1f9f708cb6faca67
06d27a569b1d4d32e8b870b42eab4e23
Tests that constructors enforce type.
if (IS_DEBUG) { auto wrapper = []() { make_shared_by_data_type<BaseSegment, ValueSegment>("weird_type"); }; EXPECT_THROW(wrapper(), std::logic_error); } }
1
efe891f739c546413df0a71f2ca7b1b4
4a9ffec0e1095dea78cc1abdae029f52
runs processes in the foreground and waits until completion to allow more input
void put_process_in_foreground(int pid){ int status; tcsetpgrp(0, pid); waitpid(pid, &status, WUNTRACED); tcsetpgrp(0, getpid()); }
0
b3e595d0a3da20b5d9a25f4cfe62e1b9
bcb7075ca61d4747b7a06f1a6af86004
Retrieve an email with a given ID.
Email getEntityById(Integer emailId) throws WEBException;
1
d1b0be589d36c02dc98294759d65e57d
b61aba5fe9c38e44183492b390e05f95
Generate subprocess invocation arguments for parallel run.
class Experiment(object): # private data members def getSubprocessArguments(self, env, port, subprocessName="RunJob"): jobargs = None tolog("Will set up subprocess arguments for type: %s" % (subprocessName)) if subprocessName == "RunJobEvent": jobargs = [env['pyexe'], "RunJobEve...
1
137a594e049595431efcf508ab3dcec1
4cf204d54f217320a38e5ac5e43dbd84
The YDirectReportUtils class is not meant to have any instances.
namespace DNSProfiler Utils::Utils() { }
0
dc02c0f0824cb20729e4c2d7ea3fadf8
6691df77c728efa287ee3e502cc11b48
Assert that this entity can be deserialized from a JSON object.
public class StateTest @Test public void shouldDeserialize() throws Exception { assertEquals(State.NEW_SOUTH_WALES, mapper.readValue("\"NSW\"", State.class)); assertEquals(State.NEW_SOUTH_WALES, mapper.readValue("\"New South Wales\"", State.class)); }
1
bcad2e3ea4195c2f33b6df9e35a371fa
fa0192077894b0c0607a1f6c36f80b2e
Returns the text decoration used for the box.
public function textDecoration($textDecoration) { return $this->setStyleProperty('text_decoration', $textDecoration, false, TextStyle::DEFAULT_TEXT_DECORATION); }
0
31b4ec6d974a7bf84e592706e684982b
cb0f778fa37bf2d7408961a6086999b5
Updates the Pokemon based on its state
if (gameManager != null) { base.Update(); if (inHome == false) { updateAlertness(); updateState(); if (grappled == false && hypnotised == false) { animator.SetBool("Grappled", false); Vector3 velocity...
1
fa5f2019feb660631f36125eac669b0d
b28f78ce7df28903f71a018c7f53a11b
Returns the formatted endpoint URI to use for interacting with the Messenger API.
@Slf4j class BandwidthMessageSender private String toUrl(BandWidthCredentials bandWidthCredentials) { return String.format(HTTPS_MESSAGING_BANDWIDTH_COM_API_V_2_USERS_S_MESSAGES, bandWidthCredentials.getDashboardAccountId()); }
1
2ed84a8639b65d0ddf7ed5860b75c7aa
2f5adfe13c7033e1c33126a6cf00630e
Get the longest contour.
def max_countour(countours): count_max = 0 max_idx = -1 for i, cnt in enumerate(countours): if cnt.shape[0] > count_max: count_max = cnt.shape[0] max_idx = i return countours[max_idx]
1
d823c8ae7607a6ba22604d821e3c6c6d
a0ab43382c26202bdf3f9f3b4f266186
Creates a Grid structure with specified size. Instantiates node objects and names them so tracking is easier.
bool canWalk; Vector3 downLeft = transform.position - (Vector3.right * size.x/2) - (Vector3.forward * size.y/2); grid = new Element[gridSizeX,gridSizeY]; for (int x = 0; x < gridSizeX; x ++) { for (int y = 0; y < gridSizeY; y ++) { Vector3 location = downLeft + Vector3.right * (x * nodeSize + nodeSide) +...
0
7d9cf9a62f36ea3e48d9645ad1ea2233
7b235e3e99c11b4c3e831353f578ea0f
Método que permite modificar el símbolo que representa a la unidad de la métrica
class indicator public function SetUnit($unit = null) { $this->unit = $unit; }
1
8cca27de208e2dd2b6460c6a17bc9508
2e0a578a8a51eaa3cb8a540c94b19628
获取一定距离远的平行线
{ BorderTree res = new BorderTree(bdr); BorderTree current = res; Border[] next = bdr.GetParallel(-lineDistance, false, 0.0, 0.0); for (int i = 0; i < next.Length; ++i) { res.next.Add(GenerateTree(next[i])); } ...
1
bef03d92a91f6b04946f809f4481a432
afebe38db57d5c1239306acead0798f5
generates random points uniformly distributed on the unit disc
def generate_points(size): x = random.random()*size y = random.random()*size return (x,y)
0
eca5fca3ec03e5d004ae94e6863738da
8aab1c3a6446de631aa09308c7c433d5
Create a string which describes a position in a source file.
public abstract class TextImageReader extends StreamImageReader protected String getPositionString(final String message) { final String file; final Object input = getInput(); if (input instanceof File) { file = ((File) input).getName(); } else if (input instanceof URL) { ...
1
ce65290a0eda3f20471b055e81c7ef03
fa8029ee4c02f1df011e17a161a56c30
# Prjections on ball
small <- 1e-9 drawray(1-small,theta=theta,...) M <- raytracer(1) p <- M[3,1:2] pp <- p pp[1] <- cos(theta)*p[1] - sin(theta)*p[2] pp[2] <- sin(theta)*p[1] + cos(theta)*p[2] p <- pp segments( p[1],p[2], p[1] + 10*p[2], p[2] - 10*p[1], ...) }
0
dbc7b5c419f6d0c0cb1af327ed15bb2f
322692fa55975b73fc3fdd2d89edb1f9
Retrieve all to-do item belong to specified account.
List<TradeItem> getTradesForAccount(long accountId);
0
94fc7462a9c35c95e39cd8351614104f
8c81d96322543a2c7ca732b2db21a3b2
挂载异常钩子
export default class AppBootHook configDidLoad(): void { this.app.config.coreMiddleware.unshift('errorHandlerMiddleware') }
1
32dee61d0abde037910d4e28a6951719
1f0acbea00d6df498661982db41991bd
Get the list of allowed values for the openclose field.
class Filter extends BaseModel public function getOpAllowableValues() { return [ self::OP_EQUALS, ]; }
0
f45713e0e544901b8d17fa1a4dc6a96e
3445f8432d6150ed06da25b5f325b5a3
获取运行时泛型的类型
Constructor<GenericTest> constructor = GenericTest.class.getConstructor(List.class); Class<?>[] parameterTypes = constructor.getParameterTypes(); for (int i = 0; i < parameterTypes.length; i++) { Class<?> parameterType = parameterTypes[i]; if (List.class.isAssignableFrom(...
1