query_id
string
corpus_id
string
query
string
code
string
label
int64
563323bd2b98aa60daaefd07a98aacb4
833ef3baa42160b8a259e612cda9fdb6
returns the category for the given index
public final class DataUtils public static String defaultCategory(int index) { return Integer.toString(index); }
1
c7d8dafd2a201e51457f1a15040f0c44
dd260a1276d2589f1a448a75dc3a42ad
adds comma's to big numbers for easy readability for the player
function addCommaNumber(number) { number = '' + number; if (number.length > 3) { var mod = number.length % 3; var output = (mod > 0 ? (number.substring(0,mod)) : ''); for (var i=0 ; i < Math.floor(number.length / 3); i++) { if ((mod == 0) && (i == 0)) output += number.substring(mod+ 3 * i, mod + 3 * i + 3); ...
1
441eb4090f294c51026e0ab6e1cfc935
e341f1dd28e20d0d18a43455e928923b
Creates exception message suitable for sending to client.
String reason) { return String.format(messageFormat, (formatId == null ? "<unknown>" : formatId), (schemaUrl == null ? "<unknown>" : schemaUrl), (schemaSource == null ? "<unknown>" : schemaSource), reason); }
1
9c4bac9b0834c692b699ec235fe19223
047c08ede447df950d4af036e020b249
Set up the physics for the entity -Pass in a default CollisionTraverser, but normally one will be passed in
global physicsCollisionHandler global eventCollisionHandler app.cTrav = CollisionTraverser() app.cTrav.setRespectPrevTransform(True) physicsCollisionHandler = PhysicsCollisionHandler() eventCollisionHandler = CollisionHandlerEvent() eventCollisionHandler.addInPattern("%fn-into-%in") even...
1
3d1e5202d5b97d02dcfa35a6c06550db
d50435f098814e86f13853e4ff10ab04
torna la posicio sobre el terreny que indica el mouse o null
{ Vector3 mousePos = new Vector2(camaraPrincipal.ScreenToWorldPoint(Input.mousePosition).x, camaraPrincipal.ScreenToWorldPoint(Input.mousePosition).y); return mousePos; }
0
177222ffac2ec5f990e38f9ec01b28c2
1acd6325677aa72b7927ace4a3455094
Update the given season with the given details
class Control_model extends CI_Model function updateseason($currentID = null, $season_name = null, $dstart = null, $mstart = null, $dend = null, $mend = null) { $data = array( 'season_name' => $season_name, 'start_day' => $dstart, 'start_month' => $mstart, 'stop_d...
1
7c765fc3fca684d15dee1953e6308e6d
79471f2d9eb69c847e4395cb803efd59
Adds a class to the button
$vars['element']['#attributes']['class'][] = 'btn pretty medium rounded'; if (isset($vars['element']['#value'])) { if ($class = _gumby_colorize_button($vars['element']['#value'])) { $vars['element']['#attributes']['class'][] = $class; } } }
1
b2a115119bb247500dc3f57df32ce365
bd6af34682b5709deb49624881d9b449
inserts a char(char) into string(s) at position(pos)
if pos < 0 or pos > len(s_init)-1: return s_init return s_init[:pos] + s_to_inser + s_init[pos:]
1
995e5bc4f793c18f001bdf75477dcfaf
ebf181be1a7f0747d77cde26820c2563
获取总字符串中的尾字符串,不包含起始字符串
getLastSubstring(sourceStr = '', splitStr = '') { return sourceStr.substring( sourceStr.lastIndexOf(splitStr) + splitStr.length, sourceStr.length, ); }
1
2a44ec0303c4699285b31855f791919b
8d79bb46a2b51fda20f3ab94cb47f96a
GET: MessageTemplates
{ return MAIN_EntitySql(context => { var temp = context.MessageTemplates.Where(i => messageTypeId == 0 || i.MessageTypeId == messageTypeId); return temp.ToDictionary(i => i.Name, i => i.MessageTypeId); }); }
1
1177c111e863950c1bdb11c915f55061
229a99a55eee4f6a62e6e7e88e660cb5
Creates a table if it doesn't exist already with <code>name</code> as name and with the fields of <code>storageType</code> as columns Call this in your plugin/module initialisation
public void createTable() throws DataStoreManagerException;
0
4b826f367013655ad132adc56158ca8a
0452bf3792cdb654462bb3716d5453de
collect taxes from all households each month
{ foreach (City city in MapManager.instance.cities) { city.CollectTaxes(); } }
0
b5f69e5e32fc7b5937d51ad46a0c010b
1c7faa1831c54165d279ac7175deb2ff
Adds the divide character to the text at the currently selected position
if(this.selectionStart != undefined && this.selectionEnd != undefined && this.selectionEnd > this.selectionStart) { this.value = this.value.splice(this.selectionEnd, 0, "[/" + tag + "]"); this.value = this.value.splice(this.selectionStart, 0, "[" + tag + "]"); this.setSelectionRange(this.selection...
0
bf2e1feebecc08619987e3c3b4e8f48b
da72d52d7895d4e32428a748f9ede905
Validate combinations of attributes
bav = ba.value pav = pa.value bav == pav ? nil : AttributeConflict.new(ba.name, bav, pav, compliant?(bav, pav)) end
1
1c4c51c4e258c342cbc486946d44f713
9a9dd876fbe1d41d41382f02316c1607
Checks the provided options object for deprecated option names, corrects old names to the new ones if necessary and emits deprecation warnings. Removes unknown options and emits unknown option warnings.
let promises = []; for (let option of unusedOptions) { promises.push(devalidateOption(option)); } await Promise.all(promises); }
0
ecd29ef3533782a592746c8f6a35a1ef
0438d860bfb0da85b119367efc6eb72c
平衡分布関数の計算
public class StatisticFunctionCalculateBO public static double fai(double x) { if (x < -3.9) { return 0; } else if (x > 3.9) { return 1; } double f = 0; double pc = -5; double step = 0.00001; for (double i = pc; i < x; i += step) f += fx(i) * step; return f; }
1
aa8fa9352dc0d42be324e60a894879da
832ed6ce70f2396c85f3beabb56840d1
フィールド情報を受け取るための通信
public class ClientCommunicator public GetFields_Result getFields(GetFields_Input params) throws ClientException { return (GetFields_Result)doPost("/GetFields", params); }
1
7cdbb873b77e0d765638f206bca80250
f3c7d4643f04b735b492f5e9975632fc
Convert Visio document Convert a Visio document to PDF or XPS.
namespace Muhimbi.PDF.Online.Client.Api public partial class ConvertApi : IConvertApi public async System.Threading.Tasks.Task<Muhimbi.PDF.Online.Client.Client.ApiResponse<OperationResponse>> ConvertVisioWithHttpInfoAsync(ConvertVisioData inputVisioData, int operationIndex = 0, System.Threading.CancellationToken ca...
1
a0ff3328b2b97738e743edcb5bce14e1
35283dcb709d2fc7eb4b8aa17a595725
Load the function (analysis) to be used for acting on the dataset Initialize the privacy params that need to be used by the function for calculating differentially private noise
root_dir='.', attack_call_kwargs={}, attack_kwargs={}): self.root_dir = root_dir self.name = name self.ds = ds self.device = device self.model = model self.model.model_ft = self.model.model_ft.double() self.mean = np.array(self.ds.data_transform.t...
0
15bcf5a9658304a05a117af8553161ea
10de2cc4a2372f620e2b8afefb2d6e48
put each character in the chain into a stack
struct char_stack *cs; { int i; printf ("<bos>\n"); while (cs) { for (i = cs->stack_posit - 1; i >= 0; i--) printf("%c",cs->chars[i].ch); cs = cs->next; } printf ("<eos>\n"); }
0
f259b465d768408959974b7279c9d802
b58fbb637548f69e0001858f02b276e4
The `ListDomains` operation lists all domains associated with the Access Key ID. It returns domain names up to the limit set by [MaxNumberOfDomains](#MaxNumberOfDomains). A [NextToken](#NextToken) is returned if there are more than `MaxNumberOfDomains` domains. Calling `ListDomains` successive times with the `NextToken...
{ var options = new InvokeOptions(); options.RequestMarshaller = DescribeDomainsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeDomainsResponseUnmarshaller.Instance; return InvokeAsync<DescribeDomainsResponse>(request, options, cancellationToken...
0
65d0dc4300f4ef3e6931ea4833a33305
60fb148e3069fed3b422ecd496c4ea34
обновление имени игрока
mod = (mod + 1) % 2; if (mod == 1) label1.Text = PlayerName; else if (mod == 0 && PlayerName.Length < maxLength) label1.Text = PlayerName + "_"; }
1
4a18d39ec32be3b60ee3525b7705efcd
faac56392548833b6d45b9eaa64ba605
A method being raised after the actual minimum operation execution.
void gotMinKey(String name);
1
370f42220ce00d609f9943a5fd6da4e7
3513196e619dcf29d56468a23f79deab
设备ID转内部ID
public class ServiceTagIdUtil public static int convertToInnerId(long serviceTagId) { if (ObjectUtil.isEmpty(serviceTagId)) { throw new UnCaughtException("服务号ID不能为空!"); } if (serviceTagId <= ServiceTagConstants.SERVICETAG_MATRIX_BASE_ID) { throw new UnCaughtException("服务号ID不正确!" + serviceTagId); } int i...
1
2f3f37bb91c141638d7abc09b449b8df
4c785b907feec8e32eaa3dfb41db0829
根据事件名称返回事件所有属性
return new HashMap(){ @Override public Object get(Object key) { try { return CsEvent.class.getMethod("get$"+$.forMat(key.toString())).invoke(CsEvent.this); } catch (Exception e) { e.printStackTrace(); } return null; } }; }
1
2b769a054f09d087127d1ed4a9caa54e
473df660877bb9b913d68237bc672fd1
Creates an op for calculating the F1 score.
num_thresholds = 200 kepsilon = 1e-7 thresholds = [ (i + 1) * 1.0 / (num_thresholds - 1) for i in range(num_thresholds - 2) ] thresholds = [0.0 - kepsilon] + thresholds + [1.0 + kepsilon] f1_scores = [] precision_update_ops = [] recall_update_ops = [] for threshold in thresholds: pred = (pre...
1
31e4344a8d312821c74dfa1f1b9ea67f
8f74fd489f5795a4b8d8bf65977b8d3f
Creates a Sqlite3 Database and wraps it in a Promise.
function initDatabase(callback) { var db = new sqlite3.Database("data.sqlite"); db.serialize(function() { db.run("CREATE TABLE IF NOT EXISTS data (name TEXT)"); callback(db); }); }
0
382ec4f28a245520c4a22d69d2a2bbf3
10d2c7ad9953759f05986ca116c40bfe
returns the number of variables in the cnf of sat state
c2dSize sat_var_count(const SatState* sat_state) { return sat_state->varnum; }
1
db2d7d5040300f26d1d51ab0e4e210e0
8b45fc7ea6b79adf8812398bb52cd95d
判断ucVal中前导1的个数
int ValBytCntr(float val){ int Len = 1; for(int i = 0; i < 8; i++){ if(val < power(2.0, 8 *(i + 1))){ break; } Len++; } return Len; }
0
e036b47c75938ac987d7cbac0157b538
468d859e12f00138766ee211942abbc7
Builds a specific target framework.
switch(platform){ case RuntimePlatform.LinuxPlayer: return BuildTarget.StandaloneLinux64; case RuntimePlatform.WindowsPlayer: case RuntimePlatform.WindowsEditor: return BuildTarget.StandaloneWindows64; case RuntimePlatform.Android: return BuildTarget.Android; case RuntimePlatform.IPhonePlayer: r...
1
93d938dfb913c78515afffa4f629e368
a0128cdc7cafde819c895f61844cc395
不存在的Bucket上传
bucket = "if-pbl" key = "jemy_smile.png" filePath = "/Users/jemy/Documents/jemy_smile.png" auth = qiniu.Auth(accessKey, secretKey) upToken = auth.upload_token(bucket, key=key) retData, respInfo = qiniu.put_file(upToken, key, filePath, progress_handler=progress) parseRet(retData, respInfo) ...
0
74aa5e9386991f938b32795d8fa61bb6
fa69c7d7b9a20573eef52f75f6c8eb50
Returns whether the plugin tree is a superset of the given plugin tree.
rel_os, rel_fuel = rel_version.split('-') plugin_os, plugin_rel = plugin_rel_version.split('-') return rel_os.startswith(plugin_os) and rel_fuel.startswith(plugin_rel)
0
83b6f9deb83e60f026e827306cb7e5de
bd1ab7364542fec92af04988d1101173
Redirecciono a la pagina alta-cliente para registrar el cliente
namespace PracticaWebRazor.Controllers public class ClienteController : Controller public ActionResult Alta() { return View(); }
1
6e2ca7e469e4189afed7350357a86b1f
a1e2042f6bc9c92d781893105c917fe6
指定されたウィンドウの表示状態を調べます。 https://msdn.microsoft.com/ja-jp/library/Cc364819.aspx
namespace Win32.User32 public sealed class User32API [DllImport("user32.dll")] public static extern bool IsWindowVisible(IntPtr hWnd);
1
2158186f8caa99fb65ae2a2d0b56ccd9
e1aabaf120c5622881b8ebba0a6a602b
Checks if the current number of steps has not reach the maximum number.
namespace Microsoft.PSharp.TestingServices.SchedulingStrategies public class DPORStrategy : ISchedulingStrategy public bool HasReachedMaxSchedulingSteps() { return StepLimit > 0 && Stack.GetNumSteps() >= StepLimit; }
0
6f541f451321379da1e9ddddbda0f213
65eaa26cdf2b28e89dc81b46cb9402d1
加载数据,并给X添加1列,返回矩阵
def loadDataSet(datasrc): dataMat = np.mat(datasrc) y = dataMat[:, dataMat.shape[1] - 1] b = np.ones(y.shape) X = np.column_stack((b, dataMat[:, 0:dataMat.shape[1] - 1])) X = np.mat(X) labeltype = np.unique(y.tolist()) eyes = np.eye(len(labeltype)) Y = np.zeros((X.shape[0], len...
1
ee5fb392c414dd64ace80497abd7f422
e34d7acd59a034f3a46cf616aac759d8
시리얼 포트의 패리티 설정 값을 얻는다.
public abstract class ClientTransfer extends XlsysTransfer public byte getSeriMode() { return seriMode; }
0
4f37155fcceea581a58bf9174b4de491
fb35de82068620b01455f33a104d0e77
Verifies id token on backend, sets PHP session vars with account info
$result = true; $keys = socialink_twitter_available(); if (empty($keys)) { return $result; } if (isset($_SESSION["socialink_twitter"])) { $keys["oauth_token"] = $_SESSION["socialink_twitter"]["oauth_token"]; $keys["oauth_secret"] = $_SESSION["socialink_twitter"]["oauth_token_secret"]; unset($_SESSION["soci...
0
097a28f91428d6ff0aa38eb8cbdcd8c7
00a546b6dc55436f14776d6eac4bda6c
导出dll文件到外部路径
{ var extensionOutput = Path.Combine(ExtensionPath, fileName + ".dll"); using (var fileStream = new FileStream(extensionOutput, FileMode.Create)) { using (var writer = new BinaryWriter(fileStream)) { writer.Write(fileData); ...
1
08ce70ddd913a34a88178c25c4eb5fd5
f27ae0c3f7d9d8b69488a8f305d743f2
Checks to see if a row with the same properties already exists in the database.
class leandroutechnologyforward_database_table_class: def row_exists(self, access_key): filter_dict = self.smart_locate_expression(access_key) query = self.make_query(filter_dict) if not query: return False query_rows = query.count() if query_rows >= 1: re...
1
2f1c4f2867bfda013c2c910958de67fc
1e1d335e7dc1b531fb1b26cdf0ece41f
Combines the hashes of the specified instances.
namespace FutureState public static class HashCode public static int Compound(params int[] hashes) { if (hashes == null || hashes.Length == 0) return 0; return hashes.Aggregate(Accumulate); }
1
20a38cf15749b449dcf832b3c8a9eb29
648c256de8e03d5f8e6db31394421046
主赛区心跳回调
function this.HeartBeatReq(session) local pkgBuffer = majong_request_protocol.HeartBeat(messagedefine.chessPath, session); Trace("pkgBuffer==================================="..tostring(pkgBuffer)); network_mgr.sendPkgNoWaitForRsp(network_mgr.CMD_LOGIN_HALL, pkgBuffer) end
0
ad8855cc441e0111feee03d2c4f2cb7a
17feee515921a4702649a34a23e449e7
the number of CONSTRAINTS in the PROBLEM
SCIP_NLPIORACLE* oracle ) { assert(oracle != NULL); return oracle->nconss; }
1
638fa493e8d5fbb156738a73889d9ee0
56398d959fd3270b9ea3fc6211e2ce93
Remove small nodes from dataset.
if isinstance(taxonomy, (defaultdict, dict)): taxonomy_keys = [x for x in list(taxonomy.keys()) if x != "data"] for i in taxonomy_keys: print(i, len(taxonomy[i]['data'])) if len(taxonomy[i]['data']) < threshold_size: taxonomy.pop(i) else: ...
1
e5a5c459e2b5912a693f126b3c286e70
7fbdfb1d21b66af67fdab32721013651
Enter a parse tree produced by JavaParser#formalParameterList.
public class JavaBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements JavaVisitor<T> @Override public T visitFormalParameters(@NotNull JavaParser.FormalParametersContext ctx) { return visitChildren(ctx); }
0
1d49a5a0b1c0a7af2f0ae0afc71518b0
7eeca4a319463f476db3737b451a7f05
Setting for whether delayed branching will be applied during MIPS program execution. If enabled, the statement following a successful branch will be executed and then the branch is taken! This simulates pipelining and all MIPS processors do it. However it is confusing to assembly language students so is disabled by ...
{ int return_value; int func; PlTerm arg[9]; PlBool res; func = Pl_Find_Atom("regbranch_cil_lr_1"); Pl_Query_Begin(PL_FALSE); arg[0] = Pl_Mk_Integer(__cil_pp_flags); arg[1] = Pl_Mk_Integer(__cil_fp_flags); arg[2] = Pl_Mk_Integer(__cil_ap_cp); arg[3] = ...
0
9073cc848dd97fd909da9646fc1058e1
109ace41cfdfdbf2301b13293c6f0c2c
Writes tornado reports to CSV file. This is considered a "processed file," as opposed to a "raw file" (one taken directly from the Storm Events database). Raw files with tornado reports are handled by storm_events_io.py.
tb_event_directories = glob(args.tb_event_directory) for tb_event_directory in tb_event_directories: if os.path.exists( os.path.join( tb_event_directory, "%s.csv" % os.path.basename(tb_event_directory))) and not args.force: continue ...
1
7f61835086d7d02e92fcc9ecac80ff84
1f8be70a8ce8faad38813b17a41c350b
If other zones are active, deactivate them.
class RegionSelector(QMainWindow): def decommission_rois(self): if self.current_z in self.roi_dict: for r in self.roi_dict[self.current_z]: self.stack_vbox.removeItem(r)
0
ff147bfe578c30355443946b8464f6e6
cf5ad7b2e94d87f4001cad4c4a3fcffb
抓球函数
def Catch_ball(frame0,frame1): global rush_ball_flag frame, findball_flag, center = Auv_ball_detect(frame0) thresh0, thresh1 = Frame_Preprocess(frame0, frame1) cv2.imshow('frame0',frame0) cv2.imshow('frame1',frame1) if findball_flag: cX = center[0] cY = center[1] if cente...
1
ce293783bfd7cf8c52a96f18bdee3d23
e073cdf8d6661f10bdacf70943d63a22
Creates the widgets for the extra information (description, prerequisites, or additional instructor)
void ExerciseTableRow::initializeWidgets() { untilLabel = Gtk::manage(new Gtk::Label(toDoUntil)); reachedPointsSpin = Gtk::manage(new Gtk::SpinButton); totalPointsSpin = Gtk::manage(new Gtk::SpinButton); openFolderButton = Gtk::manage(new Gtk::Button); openFolderButtonImage = Gtk::manage(new Gtk::Image(OPENDIR_ICO...
0
410ece1641007a594a0daf60aae0e184
12e785f1fb6c93038141e103350719fa
Sets the res builder resume.
protected Resume(data?: any): void { }
0
5d54c9afc81cca6ec5b4bc79e28a13aa
25a3d614ad78a2574d40cc2c98a0e599
LIFO Stack implementation using a Python list as underlying storage.”””
class MyStack2(object): def __init__(self): self.l = []
1
a06c1f73d36723ff8feddee47bb6e637
a52b0498d3bfd992adae2fb045b11451
是否可以开始指引
function M:isEnableGuide() return this.mBeginnerGuideSys:isEnableGuide(); end
1
e2a19821594ba3a01e3805e74913025a
72c9cb7ded6b86cbea3ff5e963e5d82e
This adds a property descriptor for the Margin Bottom feature. <!-- begin-user-doc --> <!-- end-user-doc -->
public class IfcRightCircularConeItemProvider extends IfcCsgPrimitive3DItemProvider protected void addBottomRadiusPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), g...
0
237669af271589efd3c70cbeee430491
2309ec4696b511cef25e4206ee68b7fa
Instantiate a character conversion reader for a given character set.
if (DEBUG_ENCODINGS) { System.out.println("$$$ creating Latin1Reader"); } if (fTempByteBuffer == null) { fTempByteBuffer = fSmallByteBufferPool.getBuffer(); } return new Latin1Reader(stream, fTempByteBuffer); }
1
09a1940c3e281e3b923a50937bb8e591
58d59094cadb54274b5e53708f10e2ad
采集通讯录信息发送到服务端
public class HomepagePresenter extends HHBasePresenter implements Presenter<HomepageView> public void uploadContacts(ArrayList<Contact> contacts) { if (contacts == null || contacts.size() < 1) return; BookAddress bookAddress = new BookAddress(); bookAddress.device_id = HahaCache.deviceId; ...
1
c00fcb9030bd61e6a6d32ac530b4bc11
97c4c9bf987e5f68cd94414001536d97
Returns the value of the '<em><b>Questions</b></em>' containment reference list. The list contents are of type {@link com.anfelisa.anfelisa.MultipleChoiceQuestion}. <!-- begin-user-doc --> <p> If the meaning of the '<em>Questions</em>' containment reference list isn't clear, there really should be more of a description...
List<Question> getQuestions();
1
ad10e53a11b8620e6ef7be1079c188da
ba3a0adb4cf770e5135df49baee8e2b1
通过WWWW下载文件,且写入本地指定路径
public class UpdateResFromServer: MonoBehaviour IEnumerator DownLoadFileByWWW(string wwwURL,string localFileAddress) { WWW www = new WWW(wwwURL); yield return www; if(www.error != null && (!string.IsNullOrEmpty(www.error))) { Debug.LogError("下载出错: " + www.error + " 路径:" ...
1
2c1493586a7ed59d287a1c93a5e2d22d
bc584a7d7ab5906ec2ac7ce58e463a69
审核品牌认证数据. 用于管理员审核认证信息.
newBrandAuth(data) { return post("/admin/sponsor/brand_auth/v1/create", data); }
0
a98c5dc37d12cb2c6fa8bd8fdd6c3558
09ab1d8e7412106be09c09024ce79a47
实时确定当前Player在哪个房间
{ int roomId = -1; if (!playerRoomDict.TryGetValue(playerId, out roomId)) return null; SelectRoom room = null; if (!idRoomDict.TryGetValue(roomId, out room)) return null; room.Enter(playerId, client); return ...
1
4f876eaf3b1c40368d9e92fbb10d7f16
7fa2c552f9ff62ee13ddf06c5d73ce30
Send Shipment email to customer
class Logicbroker_Dropship360_Model_Observer public function salesOrderShipmentSaveAfter(Varien_Event_Observer $observer) { if(!Mage::getStoreConfig(self::XML_PATH_LOGICBROKER_EMAIL_SHIPMENT)){ return $this; } if (Mage::registry('salesOrderShipmentSaveAfterTriggered')) { return $this; ...
1
2bad4ae7ffa91ddb8333af33e3ba58cb
54730eecdbc112f2c189999a52e09f52
Customer Date Filter
{ var url =document.getElementById("ctl00_ContentPlaceHolder1_hfWebServicesHomeURL").value; if (document.getElementById("ctl00_ContentPlaceHolder1_ddlExamDate").value != "custom") { url+="SetDateFilter.asmx/SetFilter"; var data="SelectedValue="+document.getElementById("ctl00_ContentPlaceHo...
1
6289ad2c9db278660b6c76da0cb63782
8da27b6a80fc4193d0d0ac0959d2e0a8
HttpSocketRequestHandler constructor.
class Request protected function __construct($hostGroup = 'default') { $this->conn = new Connection(new HttpPool($hostGroup)); }
0
ca023d411f111065350be32051375829
cadb1d3c114b424184e0270d78ee58bb
Constructs TodoList from dict (which was loaded from a JSON file).
class Todolist public function __construct($row) { foreach($row as $col => $value) { if(substr($col, 0, strlen(self::$_prefix) + 1) == self::$_prefix . "_") { $field = substr($col, strlen(self::$_prefix) + 1); $this->$field = $value; } } }
1
c0faf467b086d9beb3256921aa2cc7ab
da76784c4c812496308c4fea93bc0254
分销给上级返钱
$level_bonus = $this->level_bonus($data['level']); $money = $this->money*$level_bonus['ratio']/100; $user_bonus = $this->user_bonus($money,$data['user_id']); if($user_bonus){ $account_log_arr = [ 'money'=>$money, 'desc'=>"用户【'".$this->user_id."...
1
d45f673ec54eeee69c4e27a1cd0df9bb
d10ca00d6d4ceb4789821363a11f164f
gibt die Positionen zurueck, auf denen das Schiff plaziert ist.
public List<Integer> getPosition();
1
9364139381003e4cdb71c3be9b94f1f8
c463a9bcff02d6a5cbc1f89b5e77f3e8
#AUTO-FIT DENSITY ESTIMATE
getFit <- function(x, q=0.95) { require(fExtremes) f <- gpdFit(x, u=quantile(x, q)) k <- f@fit$par.ests['xi'] a <- f@fit$par.ests['beta'] x0 <- f@parameter$u return(list(f=f, k=k, a=a, x0=x0)) }
0
61aa3122270a4322912de4e5633c91f5
2aa6bc3b4f49b0f3fde700ca9885b44b
Gets the value corresponding to the option-set's label using its logical name, the value within, and the language code.
namespace LinkDev.OHDREM.Entities [ExcludeFromCodeCoverage] [DebuggerNonUserCode] [DataContract, EntityLogicalName("new_project")] public partial class Project : GeneratedEntity<Project.RelationName> public static class Enums public static string GetLabel(string logicalName, int constant, int languageCode = 1033)...
1
ff950de1d62e25ef31f75b30bb55b8ab
b3c80a334f905b3e518bfde4bfbb897c
绑定纹理Buffer
const pos = this.bindVertexBuffer(shader); const uv = this.bindUVBuffer(shader); let tang, bitang; tang = this.bindTangBuffer(shader); bitang = this.bindBitangBuffer(shader); this.gl.activeTexture(this.gl.TEXTURE0); this.gl.bindTexture(this.gl.TEXTURE_2D, this.texDiffuse); shader.getUniformInt("tex_diff...
1
caac1af6347247f0498fbe6f59386c18
75233ce20d72f3184159fbfcc25aee78
Change Meshes for Testing Purposes
public class changeMesh : MonoBehaviour void Start () { }
0
79b22cee802fb45b3f4b176a6fff5a0f
3739394671c9bd0d92ee32800579d42f
GET /member_reports GET /member_reports.xml
class ReportsController def index render json: StoreIndexService.perform!, serializer: StoreIndexSerializer end
0
92d3730ce53ce59fa78d42e7acb5aa83
38f9be9d789b3e461bc2d0d8a22d723e
사용자 프로필 이미지 없으면 디폴트 대체
function setProfileImg(img) { if (img === "" || img === null){ profile_img.src = "../../res/img/prof.png"; return; } profile_img.src = img; if (profile_img.complete){ remove_add_classlist(loader_img, ["show"] , "hide"); remove_add_classlist(profile_img, ["hide"] , "show")...
1
4f20ea6e744bbd8439aca2878d965486
3c7cc261dd7689f3689c233477f9d947
5.4 停车费支付(账单同步)接口
namespace com.hzins.openapi.client CommonResult<CarPrePayResp> carPrePay(ref CarPrePayReq req);
0
726458ef97823b4aa70595c0059b105c
ece37678ccfe1b9acb0e4ed902ffcbbb
Return a list with all planners loaded in the self._planners_store
public List<String> findAllPlanners() { return (List<String>) CollectionUtils.collect( userService.getPlanners( getPlan().getUri() ), TransformerUtils.invokerTransformer( "getUsername" ) ); }
0
5168ca8b20e1f77eff7bc548903b4b97
c94c9c86fa0e640850d29f3e5ea7c906
<p>Returns the ant tasks description.</p>
function getDescription() { return '<%= pluginHandle %><%= taskName[index] %> Tasks'; }
1
1f3b39d80157c13320bcfb333a005818
876e91a20ac9224b482e5f98c850a4e7
SpaceのルームIDを取得
var short = getShortParam(); var roomid = $.getParam(short).roomid; if (!roomid) { return; } return roomid; }
1
89a824076ffe24ac72e4abdb7a684640
af6164ece9f80da63c491e368cb65603
Sends a "no data" report
static inline adlb_code send_no_work(int worker) { DEBUG("send_no_work() to: %i ...", worker); struct packed_get_response g; g.code = ADLB_NOTHING; g.answer_rank = -1; g.length = 0; g.payload_source = mpi_rank; g.type = -1; SEND(&g, sizeof(g), MPI_BYTE, worker, ADLB_TAG_RESPONSE_GET); return ADLB_SUCC...
1
1b254bfa25073683cb60dcd3f2120174
5272dba126a5c8bc53c32a3a1c056512
Creates an instance of the simulation type and populates it with initialized simulated bodies
class SimulationInterface(object): def instantiate(self): raise NotImplementedError
0
2ec25ef17055f43a044b8be9ed1c1a72
6697d2d4dca318c2c2b1da6d198b06eb
Get an array of all the summoner names of the players on a team
public class RiotApi public Map<String, String> getSummonerNames(Region region, long... summonerIds) throws RiotApiException { return SummonerMethod.getSummonerNames(region.getEndpoint(), region.getName(), getKey(), summonerIds); }
0
2f13c227b169995ad9fa89ae2d36b12a
2fe1d2cbc896beef41d139d88edb21ca
Restores user's input data after server-side errors output & page reload
$(':input', '#mainForm') .not(':button,:submit,:reset,:hidden') .val('') .removeAttr('checked'); $.ajax({ type: 'POST', data: "", dataType: "json", url: ajaxUrl + "user/getUser", success: function (data) { $("#id").val(data.id); ...
0
31989fd1699648f614f82a9bcf6d525f
c9752eeddbad481da4c17727bc3149df
描述:批量修改账户状态
public Integer updateState_batch(Userstb form);
0
9fc53d136706451b618120cac11ebc47
175760da174f15dedd6920d5c7d3f21d
deactivate selected entities
{ global $rbacsystem, $ilUser; if (!$rbacsystem->checkAccess('write',$this->object->getRefId())) { $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->WARNING); } foreach ($_POST["id"] as $id) { $obj =& $this->ilias->obj_factory->getInstanceByObjId($id); $obj->se...
1
53c7f7d49b9b12a00af23fe98da6e45d
771114ed854957dfc551e5fd318a0d24
Update Patient Profile
class PhysioPatient(Resource): def put(self,id): patientInput = request.get_json(force=True) pat_name=patientInput['pat_name'] pat_date=patientInput['pat_date'] pat_address = patientInput['pat_address'] pat_ph_no = patientInput['pat_ph_no'] pat_amount = patientInput['pat_...
1
36af5153991eb2cb0b06721f8a5a8a6e
733186f37baa08a9dc3a748831f2e74c
Simple neural network with softmax action selection
self.state_in = tf.placeholder(shape=[None,s_size],dtype=tf.float32) hidden = slim.fully_connected(self.state_in,h_size,biases_initializer=None,activation_fn=tf.nn.relu) self.output = slim.fully_connected(hidden,a_size,activation_fn=tf.nn.softmax,biases_initializer=None) self.chosen_acti...
1
38d4bb5d6dc0349bd542cb9035b6d8e9
aafdc9b0fc9d6588413dad49bab4ec1d
根据id取面料信息
log.info(String.format( "findFabricinformationModelById with params 'id' in class: %s", getClass())); try { Fabricinformation fabricinformation = dao.findById(fabricNo); FabricinformationModel fabricinformationModel = new FabricinformationModel(); fabricinformationModel .setCustomer(fabricinfo...
1
c56749caad47dfe3f1932310a7fddf27
8fc0f4e80a67b35e95522335bbb89a4b
Evaluate a polynomial at ``x_0 = a`` in ``K[X]`` using the Horner scheme. **Examples**
def polyeval_Horner(x, poly_coeffs): ncoeffs = np.alen(poly_coeffs) p = np.zeros(np.alen(x)) for n in np.arange(ncoeffs-1,-1,-1): p = poly_coeffs[n] + (x * p) return(p)
1
b619f459d44062014878e2c7245f5379
bd77922fb20081e1aab01dcee5c15219
! Traces \a numberOfRays rays. Creates photons for the selected surfaces. Photons for the rays origin will not be created.
{ const VulkanRayTracingPipelineData *const RESTRICT pipeline_data{ static_cast<const VulkanRayTracingPipelineData *const RESTRICT>(pipeline->GetData()) }; reinterpret_cast<VulkanCommandBuffer *const RESTRICT>(_CommandBufferData)->CommandTraceRays(pipeline_data->_ShaderBindingTableBuffer->Get(), ...
0
5e3a653e3ff1d8c1edf6a35e8e23f909
e9bbee4f2996f746bafe12bf0dfc0a27
Restores the values of existing environment variables.
def restore_env original_env.each do |key, value| if value ENV[key] = value else ENV.delete key end end end
1
9330ece1ab680c82515a83922ac335fc
693574feac5d1ca17283fb9a992712ff
Returns an HRESULT that indicates whether launching a new process or attaching to the specified existing process is possible within the context of the current machine and runtime configuration.
_Out_ PNTSTATUS StatusCode) { ULONG_PTR Address = 0; PBYTE Pattern = NULL, ScanBase = NULL; DWORD PatternSize = 0, ScanSize = 0; IMAGE_NT_HEADERS* NtHeaders; LPWSTR ScanModule = NULL; RTL_OSVERSIONINFOW g_ctx; RtlSecureZeroMemory(&g_ctx, sizeof(g_ctx)); g_ctx.dwOSVersionInfoSize = sizeof(g_ctx); RtlGetVersion...
0
3dd105860497f450a8f3020aa7526839
385887e8c9636527f4c6d11a7398e066
Checks to see if a string only contains whitespace.
Contract.checkArgument(string != null, "String must not be null"); for (int offset = 0, length = string.length(); offset < length; ) { int currentCodePoint = string.codePointAt(offset); if (!Character.isWhitespace(currentCodePoint)) { return false; } offset += Character.charCount(currentCodePoint); ...
1
d5356a15c06daaabb842fc9c8917fcd7
b3cb678d272157c18d4555dab4036ef4
DELETE /shop-devices/:id : delete the "id" shopDevice.
class V1::ShopsController def destroy @shop = Shop.where(id: params[:id]).first if @shop.destroy head(:ok) else head(:unprocessable_entity) end end
0
c88ec1f0a193bc345a0d13d2449af63f
8efbb6e89f62436df411d17d8db7a42e
Add annotations the the object being created.
def deriveAnnotation(obj): props = {} props = initObjectProperties(obj, includeannotations=False) return props
0
de3131ac5194cb749b685a6999e0a4b7
325c131e09e3ac6a21a2c4c3abb790fa
获取快递公司信息(基于阿里云Api-全国快递物流查询接口-杭州网尚科技有限公司)
class OrdersController extends Controller public function getExpressCompany(Request $request) { $logisticCode = $request->LogisticCode; $requestData = "{'LogisticCode':'$logisticCode'}"; $datas = array( 'EBusinessID' => static::EBusinessID, 'RequestType' => '2002', ...
1
e2a751190be5ba2ab66e43377df2852d
72d385a397b116d8cdf768fd87987c07
Pruning: Self-join으로 만들어진 K+1-candidate와 이전 k-frequentset이랑 비교하여 downward closure property로 가지치기 -> 그 후, min Support로 가지치기
prunedH = [] for conseq in H: conf = supportData[ freqSet ] / supportData[ freqSet - conseq ] if conf >= minConf: print (freqSet - conseq, '-->', conseq, 'conf:', conf) brl.append( ( freqSet - conseq, conseq, conf ) ) prunedH.append( conseq ) return pruned...
0
0e402fcee5b19de6041f1a9bdc294cd8
2363ab431835ae7b2181590e7bbed6bf
Méthode qui permet de récupérer les mails de toutes les entreprises
def get_all_mails TMail.all_mails end
0
40e14976387f460d1d99fbeecd377b87
8691cedb202442054c3cf239aaeaa292
重设缓冲区大小
{ rbuf_t *p = (rbuf_t*)_this->buf; if( (p == NULL) || (size!=sizeof(_this->buf))){ p=NULL; size = sizeof(_this->buf); } _this->head = 0; _this->tail = 0; }
0
2ba9df8bcd1f9dd66f7b22c5ad3bc7a1
c1169d10777bdc6efb2c063207b923ef
Determine whether this pack has already been partially expanded into a sequence of (prior) function parameters / template arguments.
boolean isPartial();
1
1b01fe68800ad603768efb04f5c1ff06
0ac201aaec7f636f0e6ae50eeabbafbf
判断类型四题目数量是否足够
public class StringTools public static boolean isObjectiveQues(int quesTypeId) { return (quesTypeId == 2 || quesTypeId == 3 || quesTypeId == 4 || quesTypeId == 5 || quesTypeId == 6 || quesTypeId == 7); }
0
4303e39c798531a1ae23b8ad98d65b2e
b62d355d6a9da8f742660dc9e25d6f55
Creates a floating point value from its representation as a byte array in big endian. # Examples ```rust # use half::prelude::*; let value = bf16::from_be_bytes([0x41, 0x48]); assert_eq!(value, bf16::from_f32(12.5)); ```
impl PositiveInteger fn from_be_bytes(input: untrusted::Input) -> Result<PositiveInteger, error::Unspecified> { if input.len() == 0 { return Err(error::Unspecified); } if untrusted::Reader::new(input).peek(0) { return Err(error::Unspecified); ...
0
a03107da9fb0d3e5e25547143dee747a
973a646c418150172f6aa37d0618dfdf
Returns the value of the '<em><b>Workability</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Workability</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
public String getWorkStatus();
0