query_id
string
corpus_id
string
query
string
code
string
label
int64
a16ee10361a34333e01c3f31e7dc779b
a68ff828542a371ad8c8a7147ed98a72
删除各资源可以删除的图片
public class ClearImgJob public void clearImg(){ Set<String> set = jedisPool.getResource().sdiff(RedisConstant.SETMEAL_PIC_RESOURCES, RedisConstant.SETMEAL_PIC_DB_RESOURCES); if (set != null && set.size() > 0) { for (String picName : set) { jedisPool.getResource().srem(RedisC...
1
ae336d1ef73ff3fe7bf5fef54a787091
e96896fae503c5b1a57ca441af4f2efc
<p> 查询待处理FAL报表信息笔数 </p>
public int alarmStatusCount(String fsuId)throws Exception;
0
ef29c5263c720de51ea97033392dae10
dd68dea54cbf8542c04bc626ab838110
Поиск самого популярного слова в тексте
data = spam_data['text'] vect = CountVectorizer().fit(data) sortedWords = sorted(vect.get_feature_names(), key=len) return sortedWords[-1]
0
beee520c75aea0bee2e7e14116af8da8
0eb7743a1b4eb4460292a5e55a77f725
@brief Before initiating a connection or accepting a L2CAP connection, the GAP interface is called to perform a security check.
int RfcommCheckChannelSecurity(RfcommChannelInfo *channel, bool isServer) { LOG_INFO("%{public}s isServer:%{public}d", __func__, isServer); GapRequestSecurityParam param; (void)memset_s(&param, sizeof(GapRequestSecurityParam), 0x00, sizeof(GapRequestSecurityParam)); param.callback = RfcommRecvChannelSec...
1
db3006f43db266f26db13e64043f3d00
ef5dfba628e1b3213d75bd1121324698
Thêm 1 project mới của người dùng api public từ tệp zip
set_time_limit(0); if( !empty($_POST) ){ try { $tempDownloadPrivew = 'temp_download/'.date('Y/m/d'); $name = 'Preview_Room_'.date('YmdHis'); $fReturn = '/temp_download/'.date('Y/m/d/').$name; ...
0
6805a50f48f0db077ba7f61ec7aa23fe
4213855e7751a06a9b66f4dbff112abf
! @brief 任务标识数据的反序列化
task = json.loads(self.task_descriptor.decode('utf-8')) self.dirName = task['dirname'] self.startPage = task['siteurl'] self.taskType = task['type'] self.taskNum = task['taskid'] self.rank = int(task['rank']) if self.rank == 0: self.rank = 0x7fffffff self.TaskNumberList.append(self.taskNum)
1
b3130a26313f12a450e9710fdff858e6
f4ce091c3f9e5c04a5f0852f7f8be5ab
アイコンファミリウィンドウでのundo処理
{ if (!undo.empty()){ Figure *figure = undo.top(); figs.Add(figure); undo.pop(); InvalidateRect(&r); } }
1
84da0fa2e4befb2e749807978e281611
b3defebccd342c658f94a89fe08443f9
Utility method for transforming an optional {@link SslConfiguration} into an optional {@link SSLSocketFactory}.
@NotThreadSafe public final class ApacheHttpClientConfig public ApacheHttpClientConfig withSslSocketFactory( ConnectionSocketFactory sslSocketFactory) { this.sslSocketFactory = sslSocketFactory; return this; }
0
f2fbd32c687b329ebe25d1bbd84d54ac
3d3f9bcbc855257d5cf006571b6d853f
Gets the card with the max height and takes it out of list.
public class Card : MonoBehaviour public int deal(){ return list.Pop(); }
0
daba1ada03713646884a83da1b8a3f75
79bdc911df57276d6fdcf1c9f9eee9c5
执行查询,并以DataView返回指定记录的结果集
{ Command.Connection = Connection; Command.CommandText = SqlText; Command.CommandType = CommandType.Text; strError = string.Empty; DataSet ds = new DataSet(); if (Connection.State != ConnectionState.Open) { Connection.Open(); } Adap...
1
b7959f78b5a6c4d77e3d5d20e30246b3
91d7d5ceda3bb04242d55affa5789dfd
Print values that an administrator is to see from a selected line in the table.
function LoadRowValues(&$rs) { global $admin; $admin->AdMiN->setDbValue($rs->fields('AdMiN')); $admin->PaSs->setDbValue($rs->fields('PaSs')); $admin->email->setDbValue($rs->fields('email')); }
0
9b4c004241e845d2078e89bffb608ae0
0a803c63b41fd376ed322b09f6db4f6c
获取用户已购商品中未激活和已激活未过期的商品
{ $goods = array(); $now = time(); $this->load->model('teaching_center/leave_model'); $isSuspending = $this->leave_model->isSuspending($uid); $this->load->model('public/member_model'); $hasValidOrder = $this->member_model->hasValidOrder($uid); $learnInfo = $th...
1
08d82b193c99aabe231c71a4e225e582
397cac4105f96d9703d95b299bcb4f44
Returns the most specific entry that matches the package given.
if (this.CanonicName == canonicName) { return this; } else { foreach(MetaPackage metaPackage in this.Packages) { MetaPackage subPackage = metaPackage.GetPackageByName(canonicName); if (subPackage != null) return subPackage; } }...
1
45ff76a85198da9d5d0e650ef0f948f7
447a9837e45beff4c3010c7256f26caf
Unit tests for functionality that is specific to trigger tasks. Note that trigger tasks are tightly coupled to the :py:class:`TriggerManager` implementation, but the actual code under test lives in the trigger task classes, not the trigger manager.
class SystemTaskServiceBase(object): def __init__(self): self._triggers = []
0
d16f3ce4bd091f5874c3c14f0f562145
0a188a564a95d5472637cf7e469a47b1
A zero or empty field value. For string values it will be the empty string. For numeric values it will be zero. Other fields will have an appropriate primal value.
output := bytes.NewBuffer([]byte{}) ps := molecule.NewProtoStream(output) require.NoError(t, ps.Double(fieldDouble, 0.0)) require.NoError(t, ps.Float(fieldFloat, 0.0)) require.NoError(t, ps.Int32(fieldInt32, int32(0))) require.NoError(t, ps.Int64(fieldInt64, int64(0))) require.NoError(t, ps.Uint32(fieldUint32, u...
1
a0132e14377ae5d48ca2e9d2400532c1
d8d96ff7a4a08966fd20ad16edaf2f96
Get 本地盘的数量 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
public class DataDisk extends AbstractModel{ public Long getDiskSize() { return this.DiskSize; }
0
cdba7bd5e0fa7e64d4b09ee0684c021a
6f6491ba818828aa7cf5195bb61204a7
识别事件来源是否为lexicalAnalysis按钮,若是且source(TextArea对象)非空,进行语法分析操作,否则无操作。
class Grammar constructor(lexical) { this.lexical = lexical; this.wordList = lexical.wordList; if (this.wordList.length) this.analyse(); }
0
3fc0076a4bcbf40d327deb6d2cabc13a
4a60c2811a945c4f6a311f8852014f9a
Retourne les bulletins liés à un établissement ou à une entreprise entière sur une période
List<Bulletin> findByEtablissementAndPeriodeBulletin(Etablissement etablissement, LocalDate dateDebut, LocalDate dateFin);
1
b0544a921ef713546d3837c9583ce9c9
25f46c2c355ae0f393ff6ddf7e628947
Returns a list with the IDs of the objects for which the SED data have not been set
def processed_ids(): return list()
0
b883f3a55746e92ddc580031923ffb58
f6feb4749e454641db317ac30c62bca4
基于单层决策树的ada训练
def adaboost_train_ds(datas, labels, num_it=40): weak_class_arr = [] m = np.shape(datas)[0] D = np.ones(m) / m agg_class_est = np.zeros(m) for i in range(num_it): best_stump, error, class_est = build_stump(datas, labels, D) alpha = 0.5 * np.log((1.0 - error) / max(error, 1e-16)) ...
1
7a285e5b459144c1cd9239525ccf574f
47e4a4047d7d8ed601b646700790e481
Returns the Server write Iv
Long calc = 4*(curT - lastT) + bytesToLong(lastC); byte[] iv = longToBytes(calc); return iv; }
1
1a33fe6341483c9d0f3cda841874a84f
5bb0def938ed2d639a1c10d98681b804
Gets the target_type_id of this XmlNs0ChangeRelationTypeRequest. # noqa: E501 The <code>id</code> of the new source type for the relation type # noqa: E501
public function getTargetTypeId(): ?string;
1
7c2a057443036eb4c5c5a655005f6f92
51a05f42a3ff48524411a79e054f9056
perform main peak finding tasks
void find_peak( int32_t *pn_locs, int32_t *n_npks, int32_t *pn_x, int32_t n_size, int32_t n_min_height, int32_t n_min_distance, int32_t n_max_num ) { find_peak_above( pn_locs, n_npks, pn_x, n_size, n_min_height ); remove_close_peaks( pn_locs, n_npks, pn_x, n_min_distance ); *n_npks = min( *n_npks, n_max_n...
1
8bd135f3eeb80cd71a0813b4cebd1398
4b3ae5f677dd8178b08b8dfbe842b51a
method to scan the network by creating an ARP broadcast to see all the available connections on the network
{ int port = 8421; String msg = "broadcast_search"; char flag = '1'; String code_id = "ZXF2L"; String finals = ""; try { DatagramSocket ds = new DatagramSocket(port); ds.setBroadcast(true); byte[] sendData = (flag + ";" + c...
0
0609f60833917022e3be8f8c2678b85a
ce6cf35327f1f3c640ab08e053e1ac87
Makes nothing ignored. Use this if you don't want to ignore dotfiles and underscore files.
class CommitTests(unittest.TestCase): def test_ignore_dot_parent(self): self.assertTrue(ignore('user/documents/.hidden/foo/bar'))
0
0b42f9164e775d48c1eca832f3915827
63cc9e9a5f73a93f9018af0e3aaf8ee1
Tests that attribute 'state_id' is type(str)
class TestBaseClass(unittest.TestCase): def testId_ToStr(self): self.assertEqual(type(self.new_instance_1.id), str)
0
a884e7950878ab6abe432715ce35035a
97869cb63643f066686cbfa397e07e43
第三部分(三、各科目基础题知识领域分布及平均分汇总)表格通用生成方法
{ var list = List; var all = GetObjectForCPA(List, 0, IsLast); var sum = GetObjectForCPA(sumList, 1, IsLast); var feng = GetObjectForCPA(fengList, 2, IsLast); DataTable outTable = new DataTable(); outTable.Columns.Add("序号", typeof(string));...
0
0b0081517643e46bd79b32b28e1423e8
2ef4d3145f57318b58f93ecf9d1dd460
나이가 5의 배수인 나무의 수를 리턴
def five_decive_fish(): fish = 1 while True: total = fish enough = True for _ in range(5): if (total-1) % 5 == 0: total = (total-1) // 5 *4 else: enough = False break if enough: print(fish) break fish += 1 return fish
0
12b7cf9eb247247676147e0633215131
09bd8dc50558d692644c25ffa5264511
Description for Gets all legal agreements that user needs to accept before purchasing a domain.
namespace GoddadyApiImplementation.Service.ServicesBase Task<List<LegalAgreementResponse>> RetrieveDomainAgreements(DomainAgreements request, string XMarketId);
1
9e65e2c6654295c3b66c8bf8a9d88a29
12e506261fc43ea16b7cd3d0aaa53b37
Sets the user block status.
namespace YAF.Core.Model public static class UserRepositoryExtensions public static void UpdateBlockFlags(this IRepository<User> repository, [NotNull] int userId, [NotNull] int flags) { CodeContracts.VerifyNotNull(repository); repository.UpdateOnly(() => new User { BlockFlags = flags...
1
9689fd5f5a79435d34183cda9097bf7c
e86d91e9eec3e30b6cd8d4d7cc0185b1
If this triggering engine needs disabling due to changes in local abilities, this method can be called.
void disableTrigger();
1
15b04b362240854e8516f2785a35c863
381c423f2e4c183bf54c37f6de41cbd1
For adding a triangle face. Line and triangle faces should not be mixed in the same mesh!
void Mesh2::AddFace( glm::vec3 P1, glm::vec3 P2, glm::vec3 P3, glm::vec3 Colour1, glm::vec3 Colour2, glm::vec3 Colour3, glm::vec3 N1, glm::vec3 N2, glm::vec3 N3) { int i_P1 = AddVertex(P1,Colour1,N1); int i_P2 = AddVertex(P2,Colour2,N2); int i_P3 = AddVertex(P3,Colour3,N3); faces.push_back(i_P1); faces.push_b...
1
fcd53506cd8cae348cdbce5ddd73c936
1930301c93bbaf174a42231f8a00cf74
Executes a function on a list of inputs in parallel by dividing the work among multiple threads.
class ParallerRunner: def run(nworkers, func, args): if nworkers < 1: raise ValueError(f"Invalid number of workers: {nworkers}") qin = Queue() for arg in args: qin.put(arg) qout = Queue() processes = [] for _ in range(nworkers): p = Pro...
0
63f0522dcea2d13e6ee09ffd93161478
bb5f6e417eb748453a037ea499f59376
Imprime o código HTML correspondente a combo box. Chamado quando é inserida a tag no JSP.
StringBuffer controlHtml = new StringBuffer("\n\t\t<td align=\"right\">" + property.getAttrName() + ":</td><td><select name=\"" + property.getAttrCode() + "\">"); for(String option : property.getOptionalValue().split("\\|")){ controlHtml.append("<option value=\"" + option + "\">" + option + "</option>"); } c...
1
9a610d89ea6accb4059a58e70a788a7e
c83db75977dcf6adbb3e0d925b0a6cfe
Загрузить данные подключений
class DB public static function load_connections () { $list = conf ('Database'); self::$prefix = isset ($list['prefix']) ? $list['prefix'] : ''; unset ($list['prefix']); foreach ($list as $key => $conf) { if ($key == 'master') { $conf['master'] = true; } if (! self::open ($conf)) { if ($conf['m...
1
9966eb05f2e591b2220310d50121292e
12a6e7ff3cdb50886ab49fd8ca819c9d
오류안나게 종목코드 6자리 맞춰줌
class CrawlingAlpha(): def standard_code(self, code): code = "{0:0>6}".format(code) return code
1
120d95377f45c931c07dc30be3c0982e
658c920a065747ee94ab9ea976c91916
Strategy to generate to similar but different dictionaries.
class TbrStreamingConformance(StreamingAlgorithm): def build_dictionaries(self, parameters): dict_variant = exec_utils.get_param_value(Parameters.DICT_VARIANT, parameters, generator.Variants.CLASSIC) case_dict_id = exec_utils.get_param_value(Parameters.CASE_DICT_ID, parameters, 0) missing_dict_i...
1
f2639bd2d526df4835a329037eed03fd
1a7715933f32ea5d612e27a61176fbe7
Combines the two paths and resolves '..' and '.' relative traversals.
namespace GameRes string CombinePath(string path1, string path2);
0
9b48516007a476573833314cd8bf53a7
ed665df52e2d4fd92ef1b6c27f9f9a8e
读取gz文件标签数据,并转化为numpy array类型
df = pandas.read_csv(stfilename, header = 4, usecols=[5,6,7]) dfnp = df.to_numpy() return dfnp
0
d5fd13c1264a629cdb24e60f87b9d820
3ced3139f2952c6b695ca76edfabfee9
获取该房间类型的房间数目
function getRoomCount(){ return M("room")->where(array("room_type"=>1,"is_show"=>1))->count(); }
1
61881f72d4f325e4e174ddd04a2492d5
3227b942b210b65154d8db05d16e664c
Sends a list of users' names that are currently chatting.
users_list = ["{"+i+"}" for i in self.users.iterkeys() if i != username and self.users[i].current_chat is None] output = " ".join(users_list) if output == "": self.users[username].connection_socket.sendall("No users") else: self.users[username].connection_socket.s...
0
bb8aad65e0d4054adbe0ba2e562bc196
dc8267b8cdf683327a9484b16b845160
Sets VerionNum to the passed value
namespace LGP.Components.Factory.Interfaces.Database void SetVersion( string val );
1
498e2cd3bd0b321b8cf2c6cf881909ae
c0156bb5b9c191fb384d8bf4c3991064
Palauttaa tiedoston nimen, jota kaytetaan tallennukseen
public class Hahmot implements Iterable<Hahmo> public String getTiedostonNimi() { return getTiedostonPerusNimi() + ".dat"; }
1
2315b5686748e2e7e49ee6652a25da3a
17ed3e02475c9b7dcd2291bf22bef65c
根据ID从小到大排序,若ID相同则price从大到小排序
public List<GoodsDTO> selectAllDtoBySortOrderByPrice(Integer sortId) { List<GoodsDTO> goodsDtos = goodsMapper.selectAllDtoBySortOrderByPrice(sortId); if (goodsDtos != null && !goodsDtos.isEmpty()) { ComparatorGoodsSuitByPrice comparatorGoodsSuitByPrice = new ComparatorGoodsSuitByPrice();...
0
086f56901124bd337c1873370e284972
2a83872b7054bd76e568ffa0b640b649
Check to see if NumItemsEvaluated property is set
namespace Amazon.DynamoDBv2.Model public partial class DeleteItemResponse : AmazonWebServiceResponse internal bool IsSetItemCollectionMetrics() { return this._itemCollectionMetrics != null; }
0
a9edd7a6c4903dfc964575bcb2d552e2
b9c47ae7f58a7ea7d4eadada7f61153f
库存报表画面查询
class storesRequisitionReportmxMod extends userExpireMod{ public function index(){ $userId=$_SESSION['userinfo']['id']; $findstock = $_GET['findstock']; $_SESSION['detailsReport']['stockid']=$findstock; $findcategory = $_GET['findcategory']; $_SESSION['detailsReport']['categoryid']=$findcategory; $checkTime...
1
16f4e287edf2acd742b4248a43ea2b5d
d936fcaf88ff0e58c0152eeb3c9b445d
Fires the OnBufferChanged event.
{ if (FlushChanges != null) { FlushChanges(this, e); } }
0
1af5156dbe5f301c40b002ec0d3fb04b
d626bbe04e5aa008cd07224fb1be6066
Retrieves an LDIF representation of this entry, with each attribute value on a separate line. Long lines will not be wrapped.
{ StringBuilder sb = new StringBuilder(); sb.append("dn: "+getDisplayedDN()); for (int i=0; i<tableModel.getRowCount(); i++) { String attrName = (String)tableModel.getValueAt(i, 0); if (!schemaReadOnlyAttributesLowerCase.contains(attrName.toLowerCase())) { Object value = tabl...
1
f3c6d5ff199764924c2a29f91d680d66
a80ced7d7ceebe9839946a08878abcaf
Generates malicious clicks based on the intersection of train_ranking and attacker_ranking. Intersection is guided by start and end hyper-parameters.
class MaliciousClickModel(object): def naive_intersection_attack(self, train_ranking, attacker_ranking, start, end): clicks = [] for i in range(0, len(train_ranking)): if (len(attacker_ranking) >= end and train_ranking[i] in attacker_ranking[start:end]): clicks.append(True) else: cli...
1
21d5f2770598264e4b301d8de8c14105
71cc19c989ff6411714f7848c44beaec
删除模板信息,如果模板关联到文章,吧文章的模板置为默认模板
$id = input('param.id'); $seller_id = session('seller_id'); $info = tplModel::where(['seller_id'=>$seller_id,'id'=>$id])->find(); if(!$info){ $this->error('未找到模板'); } $result = tplModel::where(['id'=>$id])->delete(); if($result){ $this->suc...
0
fe103af164657b58678c06e2d01f1053
e32129e69dd008ba08972017dc91d40a
Retrieves all API MO keywords.
export class KeyManagementApi public listAPIKeys( param: KeyManagementApiListAPIKeysRequest = {}, options?: Configuration ): Promise<APIKeysResponse> { const requestContextPromise = this.requestFactory.listAPIKeys( param.pageSize, param.pageNumber, param.sort, param.filter, p...
0
b5d4267481ab83206378539b1596ce8f
714f2059c2ed9f7f043288de4a72dd7b
\brief tests the case where there is no blank line at the end of the file
{ stringstream in(" "); auto filt = make_shared<WhitespaceFilter>(in); EXPECT_EQ('\n', filt->get()); EXPECT_EQ(2, filt->lineNumber()); EXPECT_EQ(0, filt->columnNumber()); EXPECT_EQ(EOF, filt->get()); EXPECT_EQ(2, filt->lineNumber()); EXPECT_EQ(0, filt->columnNumber()); }
0
1211933a20193e089e15bb64fef9b6a5
b0e65fe765b836f9b0aeda9a63634225
Query whether or not the passed input argument is valid.
public boolean isValid(INPUT input);
1
00005bf68003ecb45e67d76a5fbd94e3
334db2a6bb21efb8d424700bee02a5b1
检验程序,判断解决方案中的流量是否满足要求
size_t Green::check_path( double flow,const vector<vector<int>> &paths_in, vector<vector<int>> & path_passed) { for (std::size_t i = 0; i < paths_in.size(); i++) { bool flag = true; size_t pos = 0; for(std::size_t j = 0; j < paths_in[i].size() - 1; j++) { int src = paths_in[i][j]...
1
3ddb12b71b2ecdb48c3c85d71f729cfe
0564ca89d1466f681e6ed01725949d89
Determines an article specified by the given article id is published.
class Article public function isPublished(): bool { return $this->isPublished; }
0
d7ee2730fac64fbfe4acde87a30cd301
87f150be2fa39481a9a65d937f85c51e
Set ups repository using provided manifests.
{ $installedRepository = $composer->getRepositoryManager()->getLocalRepository(); $this->composer = $composer; $this->io = $io; $this->packageFilter = new VcsPackageFilter($composer->getPackage(), $composer->getInstallationManager(), $installedRepository); $extra = $composer-...
1
43c69398e4fbe17f93ad7cb5257fc6ac
0270b37475beedbd2eca174e01b96f79
Makes the drone go back for a specified length in time.
void Drive::driveForward (int t) { driveForward(); delay(t); stopDrive(); }
0
0021e716bbb6a64e67164a1f7706da8f
ea77a390fb78fae2de459016afe539cd
<p> Test method for the hereby targeted method-under-test {@link org.omg.CORBA.Any#insert_wstring(String) public abstract void org.omg.CORBA.Any.insert_wstring(java.lang.String) throws org.omg.CORBA.MARSHAL}. Up to now, there is no real implementation of this test method. But with your help at <a href="http://www.j8uni...
public class AnyTest extends CORBATestCase public void testAny() throws org.omg.CORBA.UserException { org.omg.CORBA.Any any2 = m_orb.create_any(); m_any.insert_any( any2 ); assertEquals( "Values should be equal!", any2, m_any.extract_any() ); m_any.insert_char( 'c' ); ass...
1
da4a308017007886c8a22c6f1e1b2f8e
a5c4f03c5f474663f14bbb6d0ed8da39
LCV: choose values that cause the least amount of conflicts
new_values = values.copy() for unit in UNITLIST: only_choices = get_only_choices_for_unit(new_values, unit) assign_values(new_values, only_choices) return new_values
0
d597c638d49ea66449e952026aa4aa32
3ff4517f7440106a75a89225df11666d
Gets the JSON result array.
class SolariumResult extends Result implements ResultInterface public function data() { return json_decode($this->getResponse()->getBody()); }
1
defd10154e9b5dbe2ede4a45372931ca
cce5dd5c9f12745b7e4bdb668f5eae2b
Add a new oscillation band definition.
period = self._validate_period(**kwargs) name = period[configuration.NAME] if self._get_period(name) is not None: raise ValueError(ERR_CREATE_PERIOD_EXISTS.format(name)) self._table.put_item_with_retries(Item=period) return {"period": ConfigAdmin._for_output(period)}
1
85b593aa482fef8a795c8d678caa31d1
86c5a3cab9cc1fcba513047144c5ec86
获取主题评论数量
class Topic extends AppModel public function getCommentCount($topicId = null) { $options = array( 'conditions' => array('id' => $topicId), 'fields' => 'Topic.comment_count', 'recursive' => -1 ); $result = $this->find('first', $options); return (int)$result['Topic']['comment_coun...
1
849b76717b1bb197f46f0745b6f0f9da
25228f5433fcc6106a687f1e5244ee35
右侧输入框是否为空并给出提示
class MainWindow(object): # 默认初始化构造 def focusout_input(self, event): if len(self.input_view.get()) == 0: self.input_view.insert(0, '输入部分姓名或证件号码按回车查询')
1
5893df7149aa03a19de96fe0e1ba700f
0e23928864408397d96cc7940077950c
Update Estonian whois data
table_whois = self.get_table_name(args['domain'].split('.')[0]) sql = """DELETE FROM {table_whois} WHERE domain = '{domain}'""".format( table_whois = table_whois, domain = args['domain'] ) self.__execute__(sql)
0
603414984da26cc130aa215231680153
f70ac5fc22622f7e31bc8855f951ba2a
Method counts the number of days before user's next birthday
let now = new Date() now.setHours(0, 0, 0, 0) let birth_date = await userModel.getBirthDate(user_id) birth_date = new Date(birth_date) birth_date.setFullYear(now.getFullYear()) if (birth_date.getTime() < now.getTime()) { birth_date.setFullYear(now.getFullYear() + 1) } let n_days ...
1
d8c04afeeb2fd2fe43d975e2ff434670
ae7136192a5b54ec11a2b6ee5173ed1a
Checks if delete-customer command can execute.
namespace EclipsePOS.WPF.SystemManager.PosSetup.Views.CurrencyRate public class CurrencyViewPresenter public bool OnDeleteCommandCanExecute(object obj) { return true; }
0
c222be603ff6c06c465bd4c612e35894
c437e4edf6d22f256558148ad707f77d
Informa a quantidade total de visualizações.
class plxStats function TotalViews() { echo $this->aStats['views_total']; }
1
3bb8c9c5a4d478fc26d46bf09232b6c5
392137f98f407ea0c4f9b1c44058875c
Determining whether every index is equal between two lists.
def equalListLength(list_of_lists): it = iter(list_of_lists) the_len = len(next(it)) if not all(len(l) == the_len for l in it): return False else: return True
0
c6a2e46ac3971ecae9848980d1b3f776
71fe6e9610edbf1be178e3e19f917430
Function for Creating any MxN Size Gaussian Kernal based on Gaussian Formula
void GetGaussianKernel(double **gaus, const int size,const double sigma) { const double PI=4.0*atan(1.0); int center=size/2; double sum=0; for(int i=0;i<size;i++) { for(int j=0;j<size;j++) { gaus[i][j]=(1/(2*PI*sigma*sigma))*exp(-((i-center)*(i-center)+(j-center)*(j-center))/(2*sigma*sigma)); sum+=gaus[...
1
6005fa1bec419e05ff14228345384bbb
9627176b74d2c4fcc01d42fb2b6f2348
There's no time to close connections nicely, so we send a RST to all open connections
struct mg_connection *nc; for (nc = mg_next(mgr, NULL); nc != NULL; nc = mg_next(mgr, nc)) { if (nc->sock == INVALID_SOCKET) continue; if (nc->flags & MG_F_LISTENING) { DBG(("restarting %p %s:%d", nc, inet_ntoa(nc->sa.sin.sin_addr), ntohs(nc->sa.sin.sin_port))); int res = (nc->flags ...
0
47f4536db7980215024ec60b03b680f4
0d6038e4fc40dddf08f44fb2f2fd165f
Make the ioctl syscall that sets the termios struct.
static int soft_uart_tiocmset(struct tty_struct* tty, unsigned int set, unsigned int clear) { return 0; }
0
68a9748cd8e9b26cdbd5c79d8651b1c2
80afbe12c569bca6e182a8c16bce7c65
Build and return a rgoap.Goal list the planner should accomplish
namespace ReGoap.Core List<IReGoapGoal<T, W>> GetGoalsSet();
1
f7f27866f685222c76226f2b55c6f8a0
39f3efe8026a724c78d196745bbf0f37
求出素数表
{ cnt=1; memset(isprime,1,sizeof(isprime)); isprime[0]=isprime[1]=0; for(long long i=2;i<=MAX;i++) { if(isprime[i]) su[cnt++]=i; for(long long j=1;j<cnt&&su[j]*i<MAX;j++) { isprime[su[j]*i]=0; } } }
1
2e1fce0cb75beab9ebe11e1286832a95
7149471e79b6e9836842a9dae1102b6b
Authenticated users view their inbox
class MessagesController extends Controller public function index() { if(!Auth::check()) { return Redirect::to('/login'); } $messages = Message::where('receiver_id',Auth::user()->id)->orderBy('created_at', 'desc')->get(); return view('inbox', ['messages' => $messages]); }
1
613f21f9cd6352d82d2dccbf40d4047b
1529e282fb3c81e2a933f49a2c4f1a97
返回添加basic认证的httpclient
{ $this->http = BasicHttpClient::init($this->baseUrl); $this->http->setConnectionTimeout(0); $this->http->setReadTimeout(0); return $this->http->setBasicAuth($clientId, $clientPass); }
1
59005bbc75402a22ba27236c3c18ddfa
a1470f947d826108401bbfd85567d154
Este metodo trata de obtener un Date de un String realizando "parse" varias veces, con cada formato definido. Los formatos estaran definidos por el parametro inputFormat, por los formatos comunes definidos en la variable local possiblePatterns. Por ultimo se utiliza el formato que se obtiene del Locale, obtenido de Lan...
String dateFormatMatched=""; String[] formatsToCheckWith = { "E, MMM dd, yyyy", "yyyy-MM-dd'T'HH:mm:ss", "E MMM dd HH:mm:ss Z yyyy", "yyyy-MM-dd", "d/M/y HH:mm", "yyyy-MM-dd", "d/M/yyyy", "M/d/yyyy", "dd/M/yyyy", "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'...
1
fb2e4875b75c23eef9cbd4500806455b
cfec5f2926562252f10dd9882e624433
根据id值查找医嘱检查申请单AggDO数据
namespace iih.ci.ord.cior.i public class ICiorappconsultCrudServiceImpl : ICiorappconsultCrudService public CiorappconsultAggDO findById(String id) { #region "缓存处理" if (ch.IsCached("findById")) { return ch.findById(id); } #endregion ...
1
f7a06f57776ef0433db388b248e28fd6
63e65d23198942087e9bdff6675e2cde
Set the bitmap of the given egress bitmap group to the given bitmap. The bitmap is of TM ports (and not of local ports).
uint32 qax_eg_mcdb_bitmap_set( int unit, uint32 entry_offset, uint32* vlan_table_tbl_data ) { int i; int rep_exist = FALSE; uint32 data[QAX_MC_ENTRY_SIZE]; qax_mcds_t *mcds = dpp_get_mcds(unit); uint32 bitmap_offset = mcds->egress_bitmap_start + S...
1
af10f79640a8a1896750962f1faef056
b72d83bcfb29b7896ac8166b459f961a
Set the tracking configuration of the website which contains the profiles that you want to track
class GetContactProfileResult: def auto_tracking_configuration(self) -> Optional[str]: return pulumi.get(self, "auto_tracking_configuration")
0
a3616a95aa11690af2f3295e9cb92180
4e0ff7d52af7d006f38afdeaf1e422f2
################### #函数:get_WGS84_af(self) #WGS84椭球参数获得 #返回长半轴a 扁率f ###################
temp = [] temp.append(self.getAp1()) temp.append(self.getLenp1()) temp.append(self.getAp2()) temp.append(self.getLenp2()) temp.append(self.getAp3()) temp.append(self.getLenp3()) return temp
0
65c7342c8482f1e8bd4986bb1d0639b3
f46d7a767b9fe0ec70cd8e7e6949a624
Returns the average number of pulses across both encoders since last reset. Unit is encoder pulses; intended for straight driving only.
float PID::getAvgEncoders() { return (_encoder1->getPosition() + _encoder2->getPosition())/2; }
1
b144c5e22e00316ec51adad31d904164
de7b5259e18330b25d2bb0075e023921
获得几何程序可以输出的顶点的数量
public class RenderSystemCapabilities extends com.earthview.world.core.AllocatedObject public int getGeometryProgramConstantIntCount() { int returnValue = getGeometryProgramConstantIntCount_void(this.nativeObject.pointer); return returnValue; }
0
603af614b13c5474642eb6cba6a9827b
b077810098072bc999ef6031303de099
Turn left from given position.
public int left(int steps);
1
166197afc44f8c46ad327b5e49e6f5c9
c3ce201b6b9c01ccece8f69485f60ff1
Takes in the path to a .fil file, returns a dictionary of its parameters.
ns = {} exec(open(filepath, 'r').read(), ns) params = ns['params'] params = ParametersDict(params) if 'name' in params['model'] and params['model']['name'] is not None: name = params['model']['name'] else: name = os.path.splitext(os.path.split(filepath)[-1])[0] params.model['...
1
407de1ce44a4f6541ceed010b1e91e1c
c117c764c520afb7eb867b5e6202aef3
保存新增线路信息
@RequestMapping(value = "save") public String save(FreightrateLine freightrateLine, Model model, RedirectAttributes redirectAttributes) { if (!beanValidator(model, freightrateLine)){ return form(freightrateLine, model); } if(Tools.IsNullOrWhiteSpace(freightrateLine.getFrlineId())){ freightrateLine.setFrli...
1
0a2c7110529def37a3d103a9ba245772
0f2480c229750f9a478a36c913a6421c
生成39条形码
int width = 140; int height = 42; char[] codeSequence = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; Map<String, Object> result = new...
0
01ee884a9bc4efae934e824e276a904c
78802a4e008c2b2bdde0b1b40d314f28
Remove an entire preference domain
global $conn; $domainID = getPathDomainID($path); $query = "UPDATE Domain SET PrivacyID='1' WHERE DomainID='".$conn->real_escape_string($domainID)."';"; $conn->query($query); removeUserGroup($path); }
0
bf8615fa5aa7f6f74aefc57512477def
be344cc3e9dac64871c1f1bdb8508cc9
Renvoie le chemin du fichier ZIP
$protocol = 'http'; if ( isset( $_SERVER['HTTPS'] ) ) { if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) { $protocol = 'https'; } if ( '1' == $_SERVER['HTTPS'] ) { $protocol = 'https'; } } elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { $protocol = 'https...
1
4bf824429256558336b3d5980c356d2e
72f858ed79f8b491ffd5242770d5fb3f
Inserts three names and high scores in reverse order and checks state of linked list at each step
int main(void) { Node* head = NULL; push(&head,'r'); push(&head,'e'); push(&head,'d'); push(&head,'r'); push(&head,'u'); push(&head,'m'); printLinkedList(head); reverseLinkedList(&head); printLinkedList(head); return 0; }
0
17603daa24e4eec1daef45da54fb7f42
a6ffb49d5f1a35ed455d182d56293873
根据多个型号id查询产品信息和对应的主物料主图信息
@GetMapping("product/rpc/productInfo/qryProductByIds") RespVO<QryProductByIdsRespVO> qryProductByIds(@SpringQueryMap @Valid @NotNull QryProductByIdsReqVO reqVO);
1
0e885640e197cbe7f9b8297944326ac7
76a59eb43db6653f2793d0fe5e9995a5
Writes a timestamped message to the log associated with this test run
GregorianCalendar gc = new GregorianCalendar(); String dateTime = Tools.timeStamp2DateTime(gc, true); ArrayList<String> strings = new ArrayList<String>(); strings.add(gc.getTimeInMillis() + " " + dateTime + " " + msg); appendTXTFile(strings, ConfigTest.logFile); }
1
f76b033a44194258c6df1ec0385800c9
70c8500c2ce98854038f2b946d736385
serial sum running on one process - generic version using a function pointer
double SumVecSerial (double *A, int length) { double sum = 0; for (int i = 0; i < length; i++) { sum = sum + A[i]; } return sum; }
0
97d7d3fd3b861b7c71a97168e498091f
78c6d9c2fd22bd719d25a9c991101224
Edit shop product count
{ $validation = $request->validate([ 'product_quantity' => 'required', ]); $product = Product::find($id); $product->product_quantity = $request->product_quantity; $product->save(); return "done"; }
1
8db574996fa33989ab7af3c41c450403
7bc754138651365d1ebd4c9bff027f1d
Solicita al servidor la activación de una licencia
abstract class AbstractLicenceManager protected function activateLicense( string $license, string $plugin_slug, int $item_id ): bool { if ( empty( $license ) ) { return false; } $api_params = [ 'edd_action' => self::ACTIVATE_LICENCE, 'license' => $license, ...
1
68b6dd1305f1fafdd53872917e38462c
d8883b6f71e4d8c16c069430b69777c1
É executado quando a validação de um modelo falha, retornando 400(Bad Request) e uma mensagem de erro
{ $response = response() ->json([ 'errors' => $validator->errors() ], 400); throw (new RedirectException)->setResponse($response); }
1
35923df4fadab2f87a458ba5d8882aa1
1952966ee6737fafe84be58c45d35f95
과정 일괄 수정 작업 (일일 최대학습량, 수강신청종료일시, 학습시작일시, 학습종료일시)
public ModelAndView updatelist(HttpServletRequest req, HttpServletResponse res, UIUnivCourseHomeworkVO homework) throws Exception { ModelAndView mav = new ModelAndView(); requiredSession(req, homework); homework.copyShortcut(); List<UnivCourseHomeworkVO> attendList = new ArrayList<UnivCourseHomeworkVO>(); fo...
0
9e1a97ed32ca7d9d77562180251a9211
72c0d30e3b1cf2f3a075377833e8c9e0
The emoticon parsing mode for chat messages. This must be set before connecting to the channel to set the preference until disconnecting. If a texture atlas is selected this will trigger a download of emoticon images to create the atlas.
namespace Gecko [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] ushort GetImageAnimationModeAttribute();
0
06ef3a229c01ff61892ed7e33d1d7dfb
7f0f93b7990dd8c5cf25b305e63c3588
Gets the packaged medicine quantity.
namespace DataAccessLayer.DataObjects public class InventoryPackageItem : DataObject public int getQuantity() { return getInt(Fields.Quantity.ToString()); }
1
04f653de4f46f85825a85b40d1d7c1c7
a3ebc4892055bf0557d31439688b2c04
Cancels all pending input and output (I/O) operations for the specified file.
namespace ArchonLightingSystem.UsbApplication public class UsbSystemDefinitions [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] internal static extern uint CancelIo( SafeFileHandle hFile );
1
7221d3e7264c941295149204d86db869
0d93edb3326d4e046c2ff369d2e2294a
返回指定 <see cref="T:System.DateTime" /> 中的日期是该月的几号。
namespace Tiandao.Common public static class DateTimeUtility public static int GetDaysOfMonth(DateTime dateTime) { return GetDaysOfMonth(dateTime.Year, dateTime.Month); }
0