query_id
string
corpus_id
string
query
string
code
string
label
int64
a613fe8625f986794cd79e8ed098fcf8
9f0f1ad72711333c16777183455d1f39
Add batch for route units.
public final class BatchPreparedStatementExecutor extends AbstractStatementExecutor public void addBatchForRouteUnits(final SQLRouteResult routeResult) { setSqlType(routeResult.getSqlStatement().getType()); handleOldRouteUnits(createBatchRouteUnits(routeResult.getRouteUnits())); handleNewRouteUn...
1
45e2c24feca38f24fdb62599d97a16fe
577e1677e6871f192054560d6b6890d2
unquote removes quotes from quoted strings and char literals.
s1 := "`Hello 世界!`" s2 := `"Hello\t\u4e16\u754c\uff01"` fmt.Println(strconv.Unquote(s1)) fmt.Println(strconv.Unquote(s2)) fmt.Println() fmt.Println(strconv.UnquoteChar(`\u4e16\u754c\uff01`, 0)) fmt.Println(strconv.UnquoteChar(`\"abc\"`, '"')) }
1
1d225300409fc537fb4f94072d01cd11
78d0567727faf5bdead7b15747041f56
Update a QoS Minimum Packet Rate rule.
class MinimumPacketRateRule(generic.View): def patch(self, req, policy_id, rule_id): return api.neutron.minimum_packet_rate_rule_update( req, policy_id, rule_id, **req.DATA)
1
4f385d9039b4763b4d8de752d9b6947f
de5a084ea4c809861b33027431ba781f
Tests if this user can perform ``Item`` lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a ``PermissionDenied``. This is intended as a hint to an application that may opt not to offer lookup operations.
class LogLookupSession(abc_logging_sessions.LogLookupSession, osid_sessions.OsidSession): def can_lookup_logs(self): if self._catalog_session is not None: return self._catalog_session.can_lookup_catalogs() return True
0
c94e79ddc8c3027781fe9a53082425bb
3312430133f841effa8f2eb14494f037
Stops the download of a specific video
public final class DownloadModel public static void stopDownload(String vId) { if (downloadList.containsKey(vId)) { downloadList.get(vId).stopDownload(); } }
1
b79c3ba77a6bf14f55967f55e69dd172
84f58236d75028ea97b493d190050862
Creates a SAMIE training activity specialty as a Moodle course
$courseid, $shortname) { global $DB, $CFG; if (!self::check_basics($courseid)) { return; } $activities = optional_param('activities', false, PARAM_BOOL); if (!$activities) { return; } if (empty($userid)) { return; ...
0
99d3c1f8943e9eba95b65ec7c40b38ce
7a470dd0dc19594563141be04a6714a4
Slackのリクエストが再送された場合、キャンセルする
if Plugin::StreamCommand.rate_limits.has_key?(slug) rate_limit = Plugin::StreamCommand.rate_limits[slug] limit = find_limit(msg.user.idname, slug, rate_limit) if limit.count > limit.limit Plugin::StreamCommand.put_log 'RateLimit', slug, msg.user.idname, "#{limit.count}/#{limit.limit}", lim...
0
63fe39b6f5b6421eb660b72f803f3818
776cfc0e83d4185339f46727bbdd6129
Returns the algorithms' descriptions.
Algorithm[] alg = model.getAlgorithms(); for (int i = 0; i < alg.length; i++) { sysOut.println((i + 1) + ". " + alg[i].getName()); } sysOut.println(); sysOut.println(bundle.getString("algorithm_info_cmd")); }
0
9ca9559ce3f51e09d65879f20e322e42
6271760f0403cde7e841ed2a8399dcc9
Invoked when the VerticalOffset attached property changes
namespace Syncfusion.Windows.Diagram public partial class DiagramView : ContentControl, IView private static void OnGridVOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DiagramView view = (DiagramView)d; }
1
6163d252cec2281dc3c69937da8a774e
a9161183b433dad0d14eb2595af591f2
项目历史保存 create by sqb 20190117
function updateProDetail(data){ return request({ url:'/manager/projectInfo/saveOrUpdateHistory.json', data, method:'post' }) }
1
4674f95341a83f99a4e9ec61912a0d6d
efd46f672155f1767204bb0b67e920e9
Resolves the type of the exception, and visits the body, making sure the exception variable is in scope.
class ScopeFinder(visitors.InPlaceVisitor): def visitClassDef(self, n, *args): self.dispatch(n.body, *args)
0
1c9dea658c4600bda3d87473200ad03e
a15e35814d8cfb8a0b6c1c812c6c0061
Returns the mass of the object. If the mass of the object is infinite ({@link #getInvMass()} is zero) then this value is Infinity.
public final class ExtraShapeData public int getMass() { return s.getMass(); }
0
467883449eaf433c36e057bdb588e77a
771c9beaae577d8174c03acb71be83d0
删除指定下标元素 return bool 成功失败结果
public class Array public boolean delete(int index){ if (index<0 || index>=count) return false; for (int i = index+1; i<count; ++i) { data[i-1] = data[i]; } --count; return true; }
1
0bfbda4b05e3b889cce300c0e80a7cf2
c12d9320245df06b890337fa870aee4b
NewVPC creates a new VPC component resource.
payload, err := json.Marshal(vpcInput) if err != nil { log.Fatal(err) } url := VPC_api_endpoint + "/vpcs" + QueryParams req, err := http.NewRequest("POST", url, strings.NewReader(string(payload))) if err != nil { log.Fatal(err) } req.Header.Add("Content-Type", "application/json") req.Header.Add("Accept", "...
1
b0cf8de6db6502c91fa2715a4f3aa354
17f8270b307e52c0d9151e5892e826c4
# run line sample and return results as a list column
nrsaLegacyTreeTest.testResults <- function() { bob <- textConnection( "SITE METRIC VALUE 'EPA01-0124' 'ltfracl' '1' 'EPA01-0124' 'ltfracm' '1' 'EPA01-0124' 'ltfracs' '1' 'EPA01-0124' 'ltfracx' '0' 'EPA01-0124' 'ltmddist' '1' 'EPA01-0124' 'ltmddom' 'Firs/Hemlock' 'EPA01-0124' 'ltmddomn' '11' 'EPA01-0124' 'ltmxcnt' '10' ...
0
bbd3e4512206fea0633357e2cc406e7c
403865c79906121e55e354768e92fdd7
Returns an array containing the pins found within the bounding box.
{ SyncGetIdArrayAvOpenhomeOrgPins1 sync = new SyncGetIdArrayAvOpenhomeOrgPins1(this); beginGetIdArray(sync.getListener()); sync.waitToComplete(); sync.reportError(); return sync.getIdArray(); }
0
3fe349a89f2a3dcf44bc3835a05a186b
0da7bf066e134b3ee4c80685d06cf733
厨师设置菜品状态
QByteArray msg; msg.append(TOKEN_COOK_SETDISHSTATE); msg.append((unsigned char)(index/256)); msg.append((unsigned char)(index%256)); msg.append((unsigned char)state); tcpSocket->write(msg,msg.length()); set_feedback=true; set_index=index; set_state=state; }
1
2498518f8126c9c59d333f3c28385226
8467362cbe270463100d156974a86dc4
根据数据库名称和表名查找类型
{ lock (Obj) { if (Dict.TryGetValue(dbName, out var result)) { return result; } } throw new ArgumentNullException(dbName, "该类型数据库未注册"); }
0
80b054d66a87525e13a5ae142b6f2052
91fc6d9ceec32db46dbbb007c7185a4e
Given: - response mock. When: - running NetwitnessSAGetEvents script. Then: - Ensure that the results were built correctly.
actual_payload_str = self.payload_builder.generate_single_payload( 'event', self.event_test_data) result = all([re.search(t, actual_payload_str) for t in self.event_payload_list]) self.assertTrue(result)
1
cf5638f867b00c736f86ba1ace65e49b
112bc6ec8f141855c656cb7a5a721941
Shows the state of things to the LCD display. Top line is the setting (and buttons to adjust) Second line is the value.
char firstLine[16]; char secondLine[16]; char cpProbingMode = '?'; char cpState; if(probingMode == 0) cpProbingMode = 'A'; else if(probingMode == 1) cpProbingMode = 'D'; if(state == OFF) cpState = '0'; else if(state == WAITING_FOR_TRIG) cpState = 'W'; else if(state == WORKING) cpState = '1'; else if...
1
fbade4b1ceaba24533b92f760933c82f
173a26f9d2042c89ba0384a86e2ab538
Ориентация импоста Возвращает true, если импост является горизонтальным, иначе false
class AspectRatio public function isVertical(): bool { return !$this->isHorizontal(); }
0
e6ae6925580e72d10368b98e54c276b6
00bb9375cff14b83f50cefaf0f7342d2
These tests require a pre-trained, static resource, which is currently only available in the public cloud.
class TestDefaultApi(unittest.TestCase): def test_get_cloud_resources(self): pass
0
db9321a1274e278dac9aee4224129201
ff30cd0462a3f6ffe2087a0c1b011696
Tests that validatePassword returns true if passwords are valid.
{ $helper = new \app\ncmscore\core\Helpers(); $this->assertEmpty($helper->generatePasswordHash('')); $password = '123'; $this->assertTrue(Yii::$app->getSecurity()->validatePassword($password, '$2y$13$P/gl10LS4aJaMqOOYCKX5uEuDRXUYRLrj1GjebX3Q5VkJKX9QhIpm')); }
1
9b44a62fcfbe7d61786863fa37ccf6dc
53122f0c91e890e07b8915931d031e77
默认公式模板
export class RulesService getTplRule(): Observable<see.ICommonResponse<any>> { return wrapCatchError(this.http.post(`/dapi/ao/rule/default`, {})); }
1
c310e8df78ef454bcb91f97ded786b8a
befd4a918857e430d6a8ab2760550992
! @brief WDOG module interrupt service routine
void INTWDTA0_IsrHandle(void) { Mcu_FeedDog(); }
1
6d6884c2cfa4b881467a2971f06f762b
d2f1e4b10c66163325cb63f322f3cc79
定时扫描并将已经成功邀请好友的信息通知用户 每10分钟执行/处理量100个
if System.getPlatform() == kPlatformAndroid or System.getPlatform() == kPlatformIOS then local date = nk.DictModule:getString("DALIY_REPORT_INVITABLE") nk.FacebookNativeEvent:getInvitableFriends(function(status, friendData) if status then if date ~= os.date("%Y%m%...
0
76204d1897bc6d53fe4c9de3285ed7cd
d22c9cb0898655c005e96b4d9410e703
该节点不会保存到场景文件.fire或预制体文件.prefab中
class Grid extends bg.scene.Drawable get shouldSerialize() { return false; }
1
181e6538f6f3523d911a694d4b4a29e2
261f9e77262937966b31738cf6cc0999
flatten servers by region into list
local function FetchAreaList(servers) local area_ids_record = {} local area_ids = {} local area_servers = {} local count = 1 for _,v in pairs(servers) do if area_ids_record[v.area_name] == nil then area_ids_record[v.area_name] = count count = count+1 table.insert(area_ids, v.area_name) end local key...
1
5c03241cbd514026c2da98fa330b04f7
1fd700cd5290eba28e4aeb7af9624088
Returns the meta object for class '{@link smalluml.ElementNomme <em>Element Nomme</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getElementNomme_Nom();
0
2a62589f7018372dfc6749c308b7cb5f
10d6335d85926a87369176ae6bec6e69
Block to wait for messages about utility bill guids and process them by creating new BEUtilBill.
{ String strXml = null; MessageProcessor messageProcessor = null; boolean bIsMessageAvailable = true; int iMessageCount = 0; String strErrorConstant = null; messageProcessor = new MessageProcessor(Constants.getIF225ProductCompatibility()); messageProcessor.openSession(); while (bIsMessageAvailable) ...
0
7a7b81a73ed916cadc179179f3b44072
2250a5839b6aad193bf9e83d5de8e491
Get the count of how much resource has been used by the job.
long getUsage();
1
af5d3dcef11545bbe960ff88e2d16cd9
1d07ba8ac175aa92bb88a5554992bceb
Nos valida si se han seteado valores en todas las posiciones de la cadena del comando
{ if (cbxCOMPort.Text.Trim() == "") return false; if (cbxBandBate.Text.Trim() == "") return false; if (cbxDataBit.Text.Trim() == "") return false; if (cbxStopBit.Text.Trim() == "") return false; if (cbxParity.Text.Trim() == "") return false; ...
1
312a028d2abaacb3f96adc0677aec38c
306d1c5dc891fcad55b5760ef2acef88
make all drawables not active and clears all sets
{ foreach (Toggle toggle in toggleList) { toggle.isOn = false; Graphic g = toggle.targetGraphic; Text t = g.gameObject.GetComponentInChildren<Text>(); g.color = new Color(0f, 0f, 0f, 0.7333f); t.color = Color.white; } ClearA...
1
65e9fd592a5ca6c271292e2f6aec2982
0ae9c18d90e95ab0293c56c03e97fa77
Creates a translucent surface. Useful when drawn under message windows, etc.
namespace XSharp.Cairo public static class XIntegration [DllImport("cairo.so")] private static extern IntPtr cairo_xlib_surface_create (XDisplay dpy, XWindow drawable, IntPtr visual, int width, int height);
0
1fd413e6831b29f85b4b9d140bd3eac2
f1fc519c25ea9df55fccd2001836538f
Send a command to the device (LBA48 addressing).
{ while(inb(REG_STATUS) & STATUS_BSY); outb(REG_DEV_CTRL, 0); outb(REG_FEATURES, cmd->features); outb(REG_NSECTOR, cmd->count); outb(REG_LBA_LOW, cmd->lba_low); outb(REG_LBA_MID, cmd->lba_mid); outb(REG_LBA_HIGH, cmd->lba_high); outb(REG_DEVICE, cmd->device); outb(REG_CMD, cmd->command); }
1
0880422b1baf458b005cc36c6794a3ec
d66a46eba7075df3ea552596cbaa13b6
返回随机字符串(包含小写、大写字母)
public class RandomUtil public static String randomString(int length){ return randomString(length, NUMBER_LOWER_UPPER_CHAR); }
1
606ce511b9cf11fccc82284d37af0a22
f381dc3afcd7365b0b12503ed3471174
sets the reference to the enemy cache
public class EnemyCache public void Add(EnemyBase enemy) { cacheList.Add(enemy); enemy.OnEnemyDead += Remove; }
0
bb4da877540c7c21c0345f08b3b49ad0
b01e62920a87bfcb02536bddefb0440a
标签为tagname的歌曲
if self.need_recreate_index: self.create_index() rslt_musics = self.musics.find({"tags": i for i in tags}) return_list = [] for i in rslt_musics: tmp = dict() tmp['name'] = i['name'] tmp['tags'] = i['tags'] tmp['ssid'] = i['ssid...
1
291d439db4d80c4de6dc18a0ddb5e5fc
800524e6caf388f0a23465f04765c8ae
Convert the values on the numpad to that of the index on the board.
class GameBoard(object): # Global constants def convert_row(row): row_number = { 'A': 2, 'B': 3, 'C': 4, 'D': 5, 'E': 6, 'F': 7, 'G': 8, 'H': 9, 'I': 10, 'J': 11 } return ...
0
27f3b97ef6a34dba1e7ee833c85a21bd
8b017012505583fc1861116a5f3faed8
<summary>Converts datatype to a script object group</summary> <param name="type">Datatype</param> <returns></returns> <exception cref="Logic::ArgumentException">Unsupported datatype</exception>
if(type.equals("Numeric")) { return Numeric; }else if(type.equals("Bool")) { return Bool; }else if(type.equals("String")) { return String; }else if(type.equals("List<Numeric>")) { return List_Numeric; }else if(type.equals("List<Bool...
1
349bbc902c364b4412d6af6b76a72de9
ae0fc8b68de083255499e3ae1717710c
Prepares HTML with totals in case there are some SUM rows
class Flash_Report extends Report_Parent protected function Get_Grand_Total_HTML($grand_totals) { $output = " <tr><th class=\"report_foot\" colspan=\"{$this->num_columns}\" "; $output .= "style=\"border-top: thin solid black;\">Grand Totals</th></tr>\n"; foreach( $this->grand_totals as $period => $count ) ...
1
ffca344dbe5899129bc3b127622e062c
7fc1b50f6b127b5ed95a4b09ba3d0558
! Acquires LOCK, sleeping until it becomes available if necessary. The lock must not already be held by the current thread. This function may sleep, so it must not be called within an interrupt handler. This function may be called with interrupts disabled, but interrupts will be turned back on if we need to sleep.
void mfs_lock() { sys_arch_sem_wait(mfs_mutexp, 0); }
1
722edd8dcccaac10f3aba146dc4d1c50
8f6e8cc396a3d347cb83c7716bca7f47
查询指定实例 通过实例ID查询实例的详细信息。 Please refer to HUAWEI cloud API Explorer for details.
const options = ParamCreater().listInstances(listInstancesRequest); options['responseHeaders'] = ['']; return this.hcClient.sendRequest(options); }
0
de1be8ec8f8948ab1666563443b43a36
82a8f484db48b79f51f2ec4da02fadf2
========================== | Search for quote number. | ==========================
namespace Tsi.Web.Api System.Threading.Tasks.Task<TsiWebSearchQuotesResponse> QuotesSearchByQuoteNumberAsync (string criteria, int? pageRequestPageSize = null, int? pageRequestStartRow = null);
1
ba34dff00c3b7bcf65bf24a5782325c8
6c3942fd62a9f2d61f66c774af72f510
翌日の日本日付をyyyy-mm-ddの形式の文字列で取得する
function getNowDateString(): string { return getDateString(getJstDate()); }
0
e06cc42b7429c5f3fea432b4580b668c
5292d3658dea9bb9afb43dfa10d6d4a2
Clear the left table
function clearListOne(){ var tableRef = document.getElementById("algoOne"); tableRef.innerHTML = ""; }
1
570c567c6f1eedb784177de433cea112
642e6d8543c8f6a9801fb2b22b467cc0
Pick high, low, or 7 in a dice rolling game. Acceptable choices are high, hi, low, lo, 7, or seven.
def choice_maker(player): low_list = [] high_list = [] for i in range(7): if player[i] == str(1): high_list = high_list+[i] else: low_list = low_list+[i] r = random.randrange(1,101) if len(high_list) == 0: r = 24 if len(low_list) == 0: r = ...
0
39b3bc85c8d0b79a74fac008528ffada
b285cc5d1713bb983c4091faff717ce4
Gets the edit flat rate per order.
namespace Kooboo.Commerce.Shipping ShippingRateProviderEditor GetEditor(ShippingMethod shippingMethod);
0
4bc44ebb93e4e8f024182c1d3a177509
7f74af569cbcfa0ccdabcdb6cabcd30a
Gets the resource at the given url, using the original request `orig_req` as the basis for constructing the subrequest. Returns a `webob.Response` object. If `url.startswith(orig_req.application_url + '/')`, then Deliverance will try to fetch the resource by making a subrequest to the app that is being wrapped by Deliv...
parsed_url = urlparse(request.get_full_url()) resource_file = os.path.normpath("tests/resources%s" % parsed_url.path) try: return open(resource_file, mode="rb") except IOError: raise HTTPError(request.get_full_url, 404, "HTTP Error 404: Not Found", {}, None)
0
16bcf26a718855f4679ef02e21ac3127
b8b3547f0b058e7d6ec13f3910635284
Function that computes the average of the last humidity samples received
{ double avgHi = 0; for (int i = 0; i < sds_list.Count; i++) { avgHi += sds_list[i].heat_index; } return (avgHi / sds_list.Count); }
0
38ef390cae2e32bfe8820f50f6d842fd
9ae182ebc83f8bfa949157d9b8fdbed5
@brief 设置游戏结束数据函数(保存后端发过来的结束数据31006协议)
function BattleModel:setFinishData(data) self.finish_data = {} if data then self.finish_data = data end end
1
c74833c9f6c849d9fb98efcb6d85a8c3
dbbaaaf9fa145a8f18c06c013f47a8a6
Проверка на наличие цифр
{ for (int i = 0; i < str.Length; i++) { if (char.IsDigit(str[i])) return true; } return false; }
1
fb788897edbe47a3b659d8d514397c73
9864fee6601de427644bdba6c5cf9b96
returns the list of ingredients saved by a user
public class Recipe implements Comparable<Recipe>{ public ArrayList<String> getIngredients(){ return myIngredients; }
1
143bdf9c6f0899252b3c941a0b3819d7
1565d7afe0db974915a8d850bdf83110
Function Synopsis [Sets the number of registers in the AIG manager.] Description [This procedure should be called after the manager is fully constructed.] SideEffects [] SeeAlso []
public class DAsm void setRegsSize(int v) throws DasmError { if (PARSER_DEBUG) System.out.println("setRegsSize(" + v + ")"); regs_count = v; }
1
0f5e78fe91b01e67d88ca9f96d7eb712
cc7f67450397ba424e4409a8d839ad89
Accessor method for getting the file toolbar pane
public class WebFileChooserPanel extends WebPanel public WebFileTree getFileTree () { return fileTree; }
0
e780d3f81d923821e76204a43fdda4d4
5beec6a281552727ba18d3bd9b7a79a3
查询某个审批人 流程步骤为 【领单】操作的数据量
Long countApprovalRequestForMdrcCardmake(QueryObject queryObject);
0
96a4b3a2bb89b4ba9f4ee6f770329605
323dbed675231ebe7bc7f312eaaf54ba
Method testing for the longest run in a string
int main(int argc, const char * argv[]) { printf("Hello, World!\n"); char* test1 = longest("aretheyhere", "yestheyarehere"); char* test2 = longest("loopingisfunbutdangerous", "lessdangerousthancoding"); char* test3 = longest("inmanylanguages", "theresapairoffunctions"); char* test4 = longest("lordso...
0
18125f78e3d699ca4b18da903b40a524
bb798877e3bf73668065ccdd434566ff
This API endpoint returns the info on a single isolated margin account of the current user.
{ email.ValidateNotNull(nameof(email)); var timestampResult = await _baseClient.CheckAutoTimestamp(ct).ConfigureAwait(false); if (!timestampResult) return new WebCallResult<BinanceSubAccountMarginDetails>(timestampResult.ResponseStatusCode, timestampResult.Res...
1
bc9dc98b746cb6fc85c587f8026bb029
19d807f9b15d735bfff6e60529a71003
Constructs new MapViews.
class ViewMap: def __init__(self): pass
0
a7dced5bfb8b98952c99aafb282cdef2
dc7be2759e73e71e878ad845b1fe6e6e
Sets the time in ms to wait before starting logcat capture for a online device.
public void setMonitorWaitTime(int monitorWaitTime);
1
1be0d02f06399a4baf5893c45b196bc3
f503806252684e4c4f4cdc5be753e0a1
计算射线与球的第一个交点,通过intersectPt返回,函数返回值确定是否有交点
bool intersect(const ray& ray_here,double &t ,int &id1,int &id2) { t=1e20; int i=0; double t_now; for(i=0;i<num_obj;i++) { t_now=myobj[i].intersect(ray_here,id2); if(t_now>0&&t_now<t) { t=t_now; id1=i; } } if(fabs(t-1e20)<1e-4) { return 0; } else { retur...
0
50e7fe662afc7b76069a5c3982e10a35
65960e9248dda0e5b1b49c6927243d8c
**Constructor**: creates a new 4x4 identify matrix
mat4::mat4() { e[0] = 1; e[5] = 1; e[10] = 1; e[15] = 1; }
1
56e35a6257e7d773e33a6c82c50efa1e
9dd0b03400df8cafa1db69989ae72aeb
Evaluate a policy pair with joint policy correlation. Therefore the policy is playing against it`s training partner to measure if there is correlation in results.
class TypedAgent(Goals,Agent): def evaluate_policy(self, pf_coll): ach_goal = self.check_goal(self.type, pf_coll) return ((ach_goal*self.reward - self.effort_expended)/self.reward)
0
a506830d7833810007463679ee577b6e
988fdfa51dec99f63830532f5b2cbf86
Specifies that boot diagnostics needs to be disabled in the virtual machine.
class VirtualMachineArgs: def vvtd_enabled(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "vvtd_enabled")
0
2eeeee2389b8f3b2c3ccfda945c7cb27
aa49c144552f85076ff00e2ed77ac955
动态增加URL模式
class Module extends \yii\base\Module public function init () { parent::init(); $module = $this->uniqueId; Yii::$app->urlManager->addRules([ "$module" => "$module/default/database", ]); }
1
71c4bd7f87933a95ebd924d12737c6c5
6a4ad77b8c1e0908c3349b50be8868e4
constructor with arguments. pixels are allocated and initialized with zeros.
BitMap::BitMap(int inWidth, int inHeight) : mWidth(inWidth), mHeight(inHeight), mPixels(inWidth*inHeight * 3, 0) { }
1
b833a3a054f4f6b9fba42c146ca2f0c4
1a3c42d8ee6dd3ee2829318a84d5eee6
顶点对应的NodeLocal是非Inner即可,也就是说只要有一个是Inner说明该面不是边界面
{ if (faceType == FaceType.IsInfinite) return true; if (Edge != null && Normal != null) return true; return false; }
0
b1a596ed00d416a1aa9db842b18e9a1d
e34873568d5583fe481c09f632c51b17
Returns a new literal with novel variables.
Variable[] newVars, SourceInfo info) { if (newVars == null) { return null; } int length = newVars.length; if (length == 0) { return null; } ...
0
b2dfbe23781840e6aaacf61128ffb2c7
cba0e942b8bd7e79813d7fe01c38d3dc
Surcharge en cas d'export csv pour transformer les listes en retour à la ligne
sepchamps = ';' seplignes = '\n' for i, ligne in enumerate(ll_contenu): ll_contenu[i] = sepchamps.join(ligne) return seplignes.join(ll_contenu)
1
4e930a14cd81d9876bdf2f26e2031a2c
a116bc1bc81ef1c811877dc0dd114626
返回真则time1比time2早
if time1>time2: return 1 elif time1==time2: return 0 else: return -1
0
bb64bc092ed81da13df2184d73df3e74
9176158bbab0191d8ce2f01fe997722a
Creates the specified control policy.
namespace VOI.SISAC.Dal.Repository.Process long CreatePolicyParams(NationalJetFuelPolicyControl policyCtrl);
1
dc7a8213792cc29d864dcb1f50218955
6217d77ac6e595ab2bb33ebfaf8964be
Word转换为图片
save_path = os.path.abspath('...') + '\\' + 'images' if not os.path.exists(save_path): os.mkdir(save_path) text = text.replace('<i>', '').replace('</i>', '') img = Image.new('RGB', (300, 30), (255, 255, 255)) font = ImageFont.truetype('simsun.ttc', 15) draw = ImageDraw.Draw(img) draw...
1
fc960fe86912cf305671e3499f15d4e0
bb844c22d16f3e9f12f6c2310e055a10
Method updates the application logic 60 times per second.
function gameLoop() { requestAnimationFrame(gameLoop) currentTime = Date.now() if ((currentTime - lastUpdate) > 1000/logicFPS) { updateGame(); lastUpdate = currentTime } updateDisplay() }
1
d9956df510ea0b473f08c4fecad9bb56
ccc1a7b4fcec7c3ed95e79d968493384
This method receives the a name of an input, and sets its value to a new, given one
void Transactions::setReceiverName(string newRName) { receiver = newRName; }
1
646a85e8ce9f8c7c643198e802fd55bb
2861c2e8e6f7f8039f2008c3709245e1
Replaces all instances of the first parameter in a list with the second parameter
namespace Funccy INonemptyList<T> Replace(T oldValue, T newValue, IEqualityComparer<T> equalityComparer);
1
5b87a56fb6256c1b09be293c54f73f12
75e3d979d0a751a83d1144ab67fad0ed
按名次查询排名前 N 名的玩家
{ var linq = base.QueryByCondition(s => s.Rank == rank).OrderBy(s => s.Rank).OrderBy(s => s.LoginDate).OrderByDescending(s => s.LoginTime); return linq.ToList(); }
0
3beb1e430b1232de4420efa1a874d888
873d9ce1b3498d58db8dbf8c6cfe4247
============================================================ <T>加载浮点颜色。</T> ============================================================
{ StringBuilder sbColor = new StringBuilder(20); sbColor.Append("{"); sbColor.Append("A"); sbColor.Append(Color.A.ToString()); sbColor.Append(";R"); sbColor.Append(Color.R.ToString()); sbColor.Append(";G"); sbColor...
0
babf1383f72a70cf1fb885ab03ccf633
ce703e2bbaae17cb5ce01b6919eb9fe6
initialize default selected values for fiat and timeframe
if Quote.GetCustomField("BO_CF_PAY_CURRENCY").Content == "": Quote.CustomFields.SelectValueByValueCode("BO_CF_PAY_CURRENCY", Quote.SelectedMarket.CurrencyCode) Quote.CustomFields.AssignValue("BO_CF_CURR_SIGN", Quote.SelectedMarket.CurrencySign) if Quote.GetCustomField("BO_CF_UNIT").Content == "": Quote.CustomFi...
0
d4166951a650f776a78b5ba0d0e8f839
ab5eab40aa94bbd480f81b1a669c8b34
设置RecyclerView Item 点击事件监听
abstract class BaseDataAdapter<T> : RecyclerView.Adapter<RecyclerView.ViewHolder> fun setOnItemClickLitener(mOnItemClickLitener: OnItemClickLitener?) { this.mOnItemClickLitener = mOnItemClickLitener }
1
ba4136f9e3f7c642e806e3c4614cb6d5
a42d6d0eeebc4702edc634e0248783f3
插入在线帮助图片
namespace Gemstar.BSPMS.Common.Services JsonResultData AddHelpFileImage(string name, string url, int? helpId);
1
1084e3e33e19e36d82f7f350bc2986f6
a459359930da17dad2aba54ed935e849
This is run inside .all, after all of the records have been loaded via .each, but before any block passed to all is called. It is called with a single argument, an array of all returned records.
class Option def finish(_result) end
0
d9a4173c51de4783b41523d61f08de07
733dd70d94189ba7ddce7c074f87c333
Initiates the asynchronous execution of the DeleteServiceSpecificCredential operation.
return beginDeleteWithServiceResponseAsync(resourceGroupName, profileName, secretName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
1
48f1918dbc9999bcde5e4cbc151def56
88ab78bb03d16926cfb759eb66459032
Set codigoSupervisorPk.
public abstract class Compromiso_peticionBean implements javax.ejb.EntityBean public abstract void setCodigo_pcom(java.lang.String newCodigo_pcom);
0
865cdf3d52702641050525e33bb75342
90d69e39e560f9251aaed7f48eb45be8
Called by FileStripView. Returns false if it cannot jump to the specified index at this time.
namespace DotnetPark.NLucene.Index bool SkipTo(int target);
1
cef27482af70ced8f096ed5526eb6b19
c9bda62a0d125fcf9693da8f9dfc4997
Updates the cell that is clicked by the user.
{ m_RefreshQueue.Clear(); position = transform.InverseTransformPoint(position); HexCoordinates coordinates = HexCoordinates.FromPosition(position); int index = coordinates.X + coordinates.Z * m_CellCountX + coordinates.Z / 2; if (index == m_PrevClickCell && color == m_PrevSel...
1
1d6c9ee701dcc5975cf58037fdfc4aaf
8fec43717957f400be6369cde8b4864b
Returns a specific product from list; returns item price and name
"use strict"; var selection; var name; var price; name = ''; selection = document.getElementsByTagName('h1'); if (selection.length > 0) { name = selection[0].firstChild.textContent.trim(); } else { selection = document.getElementsByClassName('item_name'); if (sele...
1
9f49f7eac0a3ac631c8db13accdeca07
c9e4a194c54e7a023305caed275338c3
Returns the nodes of the Network --> ([node_ids])
class NodeSet(object): def give_node_ids(self): return self.ids
1
3a935b2bf9b5ec4a38d76e199996bc7c
eb1416fa1818181bb1d94aec273a5b01
Validate Merchant URL field.
class WC_Gateway_SDM extends WC_Payment_Gateway public function validate_merch_name_field( $key, $value ) { return $this->validate_field( $key, $value, 1, 50 ); }
0
389731a45b99a22d61e246edcb51d7a5
392bc8de3aa356196540a650f117caff
두 정수를 입력 받아 입력받은 두 정수의 산술 연산 결과를 출력하는 예제
num1 = int(input('좌변값을 하나 입력하세요')) num2 = int(input('우변값을 하나 입력하세요')) fmt = ' %d + %d = %d \n %d - %d = %d \n %d * %d = %d \n %d / %d = %.2f \n %d ** %d = %d' print(fmt % ( num1, num2, num1+num2, \ num1, num2, num1-num2, \ num1, num2, num1*num2, \ num1, num2, num1/num...
1
2b7d7e7ce3ca4a40e4eeae41156af0a6
5c274747892087db31b3bee5764c7004
$unzipPath : unzipPath of ipa return value : path of app dir in unzipPath
def unEgg(module_name,egg_path,top): import os, sys, zipfile from vyperlogix.misc import _utils _dirname = '' if (os.path.exists(egg_path)): dirname = top _dirname = _utils.safely_mkdir(fpath=dirname,dirname=module_name) z = zipfile.ZipFile(egg_path,'r') _files = z.fileli...
0
15ce8ce68831a1fab60ea131411a3664
b199d4f7d9a4b49a5d981fd5e443a5e5
Shows a visual representation of the HPE results.
check_rendering_requirements() import matplotlib.pyplot as plt import numpy as np arr = np.asarray(self.content, dtype=np.uint8) img = self._renderResultOnImage(self.raw_result, arr) ig, ax = plt.subplots(figsize=(15, 20)) ax.imshow(img) plt.show()
1
20fa79998166ee792c9b327c7d3a825b
a3b1c11797e52ab31cb0fc0a2c8df90f
fonction permettant de modifier un médicament dans la pharmacie IPR
void MainWindow::on_pushButton_UpdateMed_clicked() { if(( ui->lineEdit_update_id->text()=="") || (ui->lineEdit_update_nom->text()=="") || (ui->lineEdit_update_datef->text()=="") || (ui->lineEdit_update_dateexp->text()=="" )|| (ui->lineEdit_update_type->text()=="") || (ui->lineEdit_update_dosage->text()=="") ||(ui->...
1
8fb760d488b533b0cd7fb16b2fb92c87
ddba4e14f0a707bea712c9aa9e6aadc7
Retorna o campo outros acréscimos do boleto
if ($valor === false) { return $this->acrescimo; } else { $this->acrescimo = $valor; } }
0
23c03d2193dc4e2fca3c8659490b78fe
dad61d5664ff914104aa81fa5ed094ce
验证一个字段是一个活跃的URL通过验证DNS记录
class dF_Validator public function urlActive($fields) : self { return $this->rule('urlActive', $fields); }
0
1e4e29f2bae145a70cac1a5f5c39e1e6
257e8ab50c93db1fc28305660b26e937
wypełnia formularz danymi pobranymi z modelu
public function fillForm($model);
1
81e5d2e025889a5132c325e35637f813
258d881bda6354f0d5dd3df57bbea331
Verify that the testing backend behaves as it should. That means, instead of redirecting to an external confirmation/login page, it redirects back to the URL where the auth process continues, assuming that the confirmation succeeded. Then the process is supposed to continue by redirecting to a login page.
strategy = load_strategy() uri = reverse('social:complete', kwargs={'backend': backend_name}) backend = load_backend(strategy, backend_name, uri) assert backend.get_redirect_uri() == expected_url
1
d0603acf862a6dcdb31ffcd9357fdba4
d1ebf3ab0917dbf26fbd41d6ab715747
Returns the 'GPA by Risk' section, correctly formatted for the final report.
def format_risk(input) relevant = Array.new() irrelevant = Array.new() input.each {|current| case current[$Risk] when "Critical" current[$Risk] = "D-Critical" relevant << current when "High" current[$Risk] = "C-High" relevant << current when "Medium" current[$Risk] = "B-Medium" relevant << current ...
0
1f4e9aafbf123571e4fc5f27b9719c9e
b4ca2fd46de1b50f5bd790c5fb8046a0
获取最新的一条未删除的系统消息内容
class Xmsubject extends Common private function getXmnotice() { $m_notice = new \app\common\model\Xmsubjectnotice(); $xm_notice = $m_notice->getOne(['is_deleted' => config('code.status_normal')], 'create_at desc'); return $xm_notice; }
1
a3ab79e76df4ff483fb35be2359ed629
de2c923255958d11aa897e7902f2566b
Adds a fingerprint to the database.
for (int i = 0; i < 3; i++) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 4; Bitmap bitmap = BitmapFactory.decodeResource(getResources(), pictures[i],options); String imgFingerprint = getImgInfo(bitmap); if(bitma...
1
94e2b0de4739425adb69ad621cfa3b48
ed1970a564adad1bd98fe940297495ed
Handles the IRC RPL_WELCOME command.
{ Command* whowas_command = ServerInstance->Parser->GetHandler("WHOWAS"); if (whowas_command) { std::deque<classbase*> params; params.push_back(this); whowas_command->HandleInternal(WHOWAS_ADD, params); } }
0