query_id
string
corpus_id
string
query
string
code
string
label
int64
043c417ee79b395e4833108da571f496
cc7ff8f92418b05efa010d6081a2c4a0
retourne couleur en fonction du nom de l'unite
switch ($theme) { case 'theme_de_base': $retour=array( 'bleu_clair','IndianRed','LightCoral','Salmon','Red','FireBrick','Maroon','DeepPink','MediumVioletRed','OrangeRed','BlueViolet','DarkOrchid','Purple','Indigo','SlateBlue','DarkSlateBlue','Lime','LimeGreen','SeaGreen','ForestGreen','Green','DarkGreen...
0
33e6615390d40ec356ff0da06f72414f
403a32b14630e78f72ea57fb86a842e1
依照公司代號取得活動行程資料
{ var list = base.List().Where(a => a.ParticularYearID == YearID&&a.CompanyID==CID).FirstOrDefault(); return list; }
1
f173ec8d124593fff36a4e01213c875b
d9599cd6bc4fcbbaefb46aebde53d968
Returns a list of the three largest elements input_list in order from largest to smallest. If input_list has fewer than three elements, return input_list element sorted largest to smallest/
def rearrange_digits(input_list): n = len(input_list) if n < 2: return [] for i in range(n, -1, -1): heapify(input_list, n, i) maximum_sums_list = [[], []] for i in range(n - 1, -1, -1): largest_element = input_list[0] input_list[i], input_list[0] = input_list[0], inp...
0
cbd39110ff4ac2e368fbdd104af05173
3e694780760b397c3a64c4f48bc60dba
SanitizeLineEndingsBytes converts all line endings to just '\n'
s = strings.Replace(s, "\r\n", " ", -1) s = strings.Replace(s, "\n\r", " ", -1) s = strings.Replace(s, "\n", " ", -1) return s }
0
b93ed9b53edb6e80c30cdec757773e00
52806830bc70025c64a832eff4ac42a7
Not allowed to edit the Document
public class PurchaseOrderAmendmentDocumentPresentationController extends PurchaseOrderDocumentPresentationController @Override public boolean canEdit(Document document) { PurchaseOrderDocument poDocument = (PurchaseOrderDocument) document; if (PurchaseOrderStatuses.APPDOC_CHANGE_IN_PROCESS.equals(p...
1
71767fe798a2520084d618e926a1e1fe
2079dca672a9b299c8c894ef5fc23206
文字列情報に一致する要素のうち先頭の物を削除する
RTStrSpaceRemove(PRTSTRSPACE pStrSpace, const char *pszString) { size_t cchString; KAVLKEY Key = sdbm(pszString, &cchString); PRTSTRSPACECORE pCur = KAVL_FN(Get)(pStrSpace, Key); if (!pCur) return NULL; PRTSTRSPACECORE pPrev = NULL; for (; pCur; pPrev = pCur, pCur = pCur->pList) ...
1
f083097ad8964bf905d43d8b8f20efae
5d23c1194bd56c61edcb412959417fec
GetUnmarshaler returns the appropriate Unmarshaler based on the given content type
typeName = fluxpkg.MustNotEmpty(typeName, "typeName is empty") typeName = strings.ToLower(typeName) if r, ok := mediaTypeValueResolvers[typeName]; ok { return r } else { return mediaTypeValueResolvers[DefaultMTValueResolverName] } }
1
c42c33b070db125a04113af7d14410f4
98c7a16629574cc63fe847590b9429c5
根据推荐类型获取餐品数量
class Dishes extends ActiveRecord public function dishesCount($select_type,$x_id){ switch ($select_type){ case 1: $where = "1=1"; break; case 2: $where = ['status' => 1]; break; case 3: $where = [...
1
874b8aaa313ab821cc3923c67370261e
01413e1ab227f4fe65ae36c633b5536e
Carga la lista de los Grupos Etareos
export class GrupoMaquinaListComponent implements OnInit loadGrupoMaquinas() { return this.grupoMaquinaService.GetGruposMaquina().subscribe((data: {}) => { this.GrupoMaquinaList = data; }) }
0
07819540293bdcbd4a4c5b76b638af10
c63d45a2c6de0eeba7efa6d3d4c1ad5e
根据分割完以后的后串词列表和词性列表获得上位词候选词
remove_list = set() for word in candidate_key_words: for word_2 in candidate_key_words: if word_2 != word and word_2.find(word) > -1: remove_list.add(word) left_words = set() for word in candidate_key_words: if word not in remov...
0
bd949f4a5f7872675df269332f7474b3
e85c76ebd76ca70b51befcebe1cd2495
Get value with VAT.
public function getTotalWithVat(): Money;
1
ffebd8ef6bfcd683e4ebd9a3ddb5614b
67eb7d862794ec32e457f5c985a6d093
最短编码即为霍夫曼编码,首先使用map记录每一个字符的个数,然后使用优先队列进行霍夫曼编码
priority_queue<TreeNode*, vector<TreeNode*>, FreqCompare> min_heap; for (const pair<char, double>& p : frequencies) { min_heap.emplace(new TreeNode{p.first, p.second, nullptr, nullptr}); } while (min_heap.size() > 1) { TreeNode *first = min_heap.top(); min_heap.pop(); TreeNode *second = min_heap.top(); min_he...
1
3fb2999886c4021944dcc4f8c316f254
63b67d49eb9507798d48bc0c409d743f
initialize market price as 0
McMarketBS::McMarketBS() : m_S0(0), m_sigma(0), m_r(0) { }
1
21129a2ccef2e2a03c149a95b6458448
b463105ec9a94838e57220ce83d6045d
Converting an array into object
function toObject(arr) { const res = {}; for (let i = 0; i < arr.length; i++) { if (arr[i]) { extend(res, arr[i]) }; }; return res; }
1
52aef0a0bd275c947dec81e26909a385
66a1f470a20beed4891d152451caa768
Computes the degree centrality of the nodes in the graph
public class Graph2 public void degreeCentrality() { }
1
d0c44cb31e2108313165c1445d11cd44
20c1d10132e4b5d086990b6ef3e60726
Function to convert pixel location to ground location
gt = list(gt) Xpx = int((Xgeo - gt[0]) / gt[1]) Ypx = int((Ygeo - gt[3]) / gt[5]) return (Xpx, Ypx)
0
f0cc2f42d4a620fe606ba4515022d08f
3056c7a91d4b915683a9bb88f20abe22
Get the selection in the view as a list of indexes.
class SensorMaps(EelFigure): def get_selection(self): if self._selection is None: return [] else: return np.where(self._selection)[0]
1
7f3a7ad1fd237866e08e33be166b8b83
e79ca1753b0e14c752fc87bdb1caa1d9
Retrieve the given key, marking it as recently used and moving it to the back of the LRU list.
class LRUCache: def make_recently(self, key: int): node = self.map.get(key) self.cache.remove(node) self.cache.append(node) return node
1
5e7f2390cd67c86bbad8d52ea2e6b0f3
15d51129a6738d9e0bde43ffaadc8452
出現アニメーションの終了を待機して歩行モーションに遷移
public class SuccubusController : BaseClass private IEnumerator WaitForLeaveAnimation() { float duration = succubusAnimation[ animationLeave.name ].length; while (duration > 0 ) { duration = duration - Time.deltaTime; yield return _sync(); } playAnimation( animationFly.name, WrapMode.Loop ); Vector3 ...
1
72f373732c4b972f2dcbe785cf49fd89
5928c7e377d4f247d5a62ef76ccb0fca
设置当前场景索引号
setCurrentScene(sceneId) { this.currentScene = sceneId; }
1
b5832f3da957afd77a750a30af4b23fa
d4c0ab17079e4ed5cdb30cd86890379b
takes a jQUery selector and checks if the element is present on the page
function elementExist(selector) { return $(selector).length > 0; }
1
d81b0d73bf1b1ddc8594f92945111021
b3dfe1fe1099c1b4c6e550a52f8045b7
:key: 利用数据文件初始化语料集数据。文件每一行的数据格式: id[tab]word1 word2 word3......
with open(input_path, 'r', encoding=encoding) as fin: for line in fin: words = line.split() main_word = words[0] words = words[1:] if main_word not in self._word2idx.keys(): main_id = len(self._union_fin...
1
613c625aa5cf4e81be14852d1e0cf97c
7166cd4c2fe9ab6263c03044e686077a
Fetches a JSON resource using this Access Token. <p/>
class BellaDatiServiceImpl implements BellaDatiService JsonNode loadJson(String uri) { return client.getJson(uri, tokenHolder); }
1
36fd977e3bb480c6c4cd231cc51b90bf
60a28ca43358b65693fd127a2696a402
Calculates the farthest left x value of the wall
class mapper(): def calcWidth(self, corners): self._width = -1 for i in range(len(corners)): if corners[i][0] > self._width: self._width = corners[i][0] self._width = self._width+1 return self._width
0
5999242180955a93497aa3ebbcc11525
9b350bc7a2b22d0e3212e1d43f0e93c2
初始化界面 首页加载时第一个豆豆为显示色
function SignInView:initByPb(pb) if not pb then return end local arr = pb.list_info local cur = pb.curindex if cur == 7 then cur = 6 end table.sort(arr, function(a, b) return a.index < b.index end) for i = 1, 6 do self["rewardLab" .. i]:setString(arr[i].reward_des) if self["valueLab" .. i] then self["va...
0
9bb9190297c33b415fb8c0c2a4955802
de15191734196d51761bbd8d99f0fcea
UmmDataEntryを追加する。
namespace MieTranslationLib.Data.FileList public class MieFileList public void AddEntry(MieFileEntry fileEntry) { if (this.Items.ContainsKey(fileEntry.FileCode)) { var msg = $"Duplicate fileCode({fileEntry.FileCode})"; logger.Fatal(msg); ...
0
bc7007615cb057a156cff172295c0b09
3610fc1ea10dff7231709091d8cc53f8
Delete value history using historic access. The endpoint must be activated and connected and the module client and server must trust each other.
namespace CloudAPI.Rest.Client public static partial class CloudClientExtensions public static HistoricData ApiHistoricdataByIdDelete(this ICloudClient operations, int id) { return System.Threading.Tasks.Task.Factory.StartNew(s => ((ICloudClient)s).ApiHistoricdataByIdDeleteAsync(id), ope...
1
9494e3c8d6bf07d511ab9d960b16e1cd
2b72d8c03cb78500f8001c9c4fb5185d
Display the profile menu for a customer
{ $name = Session::get('name'); $customer_id = $this->customer_profile->getCustomerIDbyName($name); return View::make('customer_profiles.create', compact( 'name', 'customer_id' ) ); }
0
b88ec214fcc695db423ff8eefc99559b
357e87eeafbc81f45e138d696893bc51
根据parsedFiles中的信息获取jsPath的css依赖项
class Statics{ static function js_sources($packages){ $jspath = []; foreach($packages as $package_name => $package) $jspath = self::inner_path($jspath,$package_name, $package); return $jspath; }
0
80f7e7057a8c134ffc268f71f37bf1e6
798773a257826cf1128f9e3100ebaca6
Create sample Customers table, in order to demonstrate the behavior of the DataTableReader.
customers = [['CID{:04d}'.format(i), 'last{}, first{}'.format(i, i), 'address{:04d}'.format(i), str(5553331111 + i), 'email{:04d}@xx.xx'.format(i)] for i in range(6, 10000)] return customers
1
ca24a717ed7a245c2677df82a32e69f8
8ef4b637efe397ca8dfb06a1c50bf9ee
작업자 정보 설정
public class SelectForNpcDialogView : DialogView, IBaseObserver public void SetDataForWork(NpcAIWorkerCpt npcAIWorker) { this.targetNpcAIForWorker = npcAIWorker; SetType(GameCommonInfo.GetUITextById(63)); objNpcStatus.SetActive(true); npcAIWorker.GetWorkerStatus(out string workerStat...
1
102bfaa21ac39e6c7cfd14f30096d3f2
afe4ec6d3d980fd213e50de74188e795
Sets the divisor to limit maxlongitudinal (forward/backward) speed.
namespace larcfm void Daidalus::setMaxVerticalSpeed(double val, const std::string& u) { parameters.setMaxVerticalSpeed(val,u); }
0
d2521e7d9084e36ae55a9c9e9c866587
6517ea151ff53345c71d708f948a1fb2
批量更新项目
Integer updateMoreProject(@Param("sign") String sign, @Param("list") List<String> list);
1
49be9d65341b1590af9e3ee19ed83bce
5ac91a5901dda479502504284ac0a180
Returns a new object of class '<em>Execution Trace Model</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getExecutionTraceModel_Choices();
0
53fb750292026aa57c2ade702bbd1292
9cac77d3f495c5a81870c7fa3c811313
Initialize the closed value
{ $this->initialized['isClosed'] = true; $this->isClosed = $isClosed; return $this; }
1
7a5a407bbe111c7ee90262aac7f5cde3
0bbf4b8e4e3921e86e489f6d96446cae
Shrinks the button and text slightly
class Button: def update(self): width = max(200, self.txt_surface.get_width()+10) self.rect.w = width
0
7c6c19f63a3be38a4d0d0791b818cfa3
d97fc1607e58a338b219f35d7ae73ff8
Unbind the job from server
function job_file_unload() send_command('unbind ^`') send_command('unbind !-') end
0
abdd13798e92688378bdc0e8383d3cba
bf85deab34fe80f4b364af2e779ff768
Show employee registration form.
class RegisterController extends Controller public function showRegistrationForm() { return view('recruitment19.register'); }
1
985856335cfdf3c37594bc8278ff4aeb
f809734227d567eea1a8ead2d9f5a4d9
评论举报相关视图
class IndexController extends BaseController public function Comment(){ return view('blog.comment'); }
0
828ba6ea10c7673043a840f13160860b
eccb6c3e4e2bb980697cc42204c2ab75
Saves the step associated to the specified form question response the form question response
public static function save( $question, $request );
1
c79072028df0bab473aed8bfd34ebf80
37572dc8b716d208c40957e9a1dabc67
通过宿舍号获取所有维修工单信息
public class VisitorDao public static List<VisitorBean> getVisitorByBuildId(int buildNumber) { List<VisitorBean> list=new ArrayList<>(); String sql="select * from VisitorTable where buildNumber=(?)"; try{ PreparedStatement statement=connection.prepareStatement(sql); state...
0
82cb073b04a15b5abfe48e2a03680a92
60e9ccee4c4c21ca4dc8e4cfb9614609
Get the characters that are allowed to be entered in the field.
export default class TextField extends Field getBlacklistChars () { return this._blacklistChars }
0
eab743e8be1b7e3ec055106733f1621b
a62d1cc3ed9e4aa30c06e83707ec2238
Sets all sensor flags to False
class player(object): # player attributes def nil(self): self.sf4 = False self.sf3 = False self.sf2 = False self.sf1 = False
1
f2324d5ff86097099792c5a1a125d0d0
74f44bfa4902f08ef204824ab1e33b4a
Tests the bond security present value from clean price.
@Test(groups = TestGroup.UNIT) public class BondSecurityDiscountingMethodTest @Test public void presentValueFixedMiddleCurrency() { final AnnuityPaymentFixed nominal = (AnnuityPaymentFixed) BOND_FIXED_SECURITY_DEFINITION_FULL_ENTITY.getNominal().toDerivative(REFERENCE_DATE_1); AnnuityCouponFixed coupon = BOND...
0
a5cf587acc4f4a2a00de92081bc30eb0
e9d5a19e37de21d1351b76aafd2dc0d9
The mail alias for the group, unique in the organisation. Required for mail-enabled groups. Changing this forces a new resource to be created.
class az_servicebus_georecovery_alias_show_command_builder extends CommandBuilder<az_servicebus_georecovery_alias_show_command_result> alias(value: string): az_servicebus_georecovery_alias_show_command_builder { this.setFlag("--alias", value); return this; }
0
c18399d5fce2a3cfbc023216d9e8f293
53a92c80076e4316ae44f9441ac2b692
Gère la div contenant le formulaire d'inscription
function divInscription() { if (popupInscription.style.display == "block") { popupInscription.style.display = "none"; } else { popupInscription.style.display = "block"; popupConnexion.style.display = "none"; } }
1
f0c66216557f90af06f44c0915bf9333
7b0d40fdbfb97019fde9ecba36c030f1
Unset our DB handle to that next attempt at usage establishes a new connection. Normally you would only use this after a potentially lengthy operation where the database connection might time out (yes, should be fixed in mysql configs).
class Structures_DataGrid_DataSource_PDO extends Structures_DataGrid_DataSource_SQLQuery function _disconnect() { $this->_handle = null; }
1
c61337cecb374306c58927031a680c2a
6a885f0720ac8a1bd5ef256cfc7f327c
排序用户数据
let dist = []; source.forEach(element => { console.log('dealAndSortData') console.log(element); let item = {}; item['name'] = element['nickname']; item['avatar'] = element['avatarUrl']; item['score'] = element['KVDataList'][0]['value']; dist.push(item); }); dist.sort((obj1, obj2) => ...
1
9eb5389f5b6474d9a767a884cddeab4f
76531d9c924af099d45158b2820bbb93
Layer id to name translation service
return [ 'id' => 'ID', 'shared_id' => 'Shared code', 'name' => 'Area', ]; }
0
d59cebfc32b82bcd697c066a21c22db9
59f37753ec6afce2399fa1bf282a8f76
生成树形结构的里程碑
{ List<MilepostView> list = new List<MilepostView>(); Result<List<MilepostView>> result = new Result<List<MilepostView>>(); try { var temp = DataOperateBusiness<Epm_Milepost>.Get().GetList(t => t.ParentId == 0).OrderBy(t => t.Sort).ToList(); ...
1
4dccab5aaee3dcc42fbe8631dadf853f
df2739c42c10de7616abd00ff2006086
保存接患者腕带扫描纪录
@Controller @RequestMapping("/api/app/enter") public class AppEnterWarehouseController extends BaseController @RequestMapping(value = "/scan_result_save_zcd", produces = {"application/json"}, method = {RequestMethod.GET, RequestMethod.POST}) @ResponseBody public BaseResp scanResultSaveZcd(HttpServletRequest request) ...
1
52e8f51202021beedc138f7113b127f6
49b17a7886c4c8e6434c47ed57df726b
8. Пользователь вводит целое положительное число, которое является кубом целого числа N. Найдите число N методом половинного деления.
namespace Build_a_pile_of_Cubes class Program public static long findNb(long m) { long n = 0; long sum = 0; while (sum<m) { n++; sum += n * n * n; } if (sum > m) { return -1; ...
0
888dd8f4d03e5ce90c3cb5e22a2edfda
a8e629ad28718e4809e5154849a790ae
Override the original save method to set the booking number if it hasn't been set already.
class Customer(models.Model): def save(self, *args, **kwargs): try: existing = Customer.objects.all().get(user=self.user) self.id = existing.id except Customer.DoesNotExist: pass models.Model.save(self, *args, **kwargs)
0
6f48d79f662f40031896177f39f732a3
d3e9bd8d5d613d295f02713f2b19ef9a
Unravel a given term and substitute subterms with values from the symbolic memory.
class ExpressionExpander(object): def expand(self, node, parent, itvars_occs, itvar_exp): if isinstance(node, Symbol): if not node.rank: return ([node], self.CONST) elif node.rank[-1] not in itvars_occs.keys(): return ([node], self.CONST) else:...
1
344d112f04c4b095f20c9fee74e3e303
8a30db2def5f748c92d6bb41e03d7aec
控制继电器
void Ctrl_RedLight(u8 v) { if(v == 1) { GPIO_SetBits(GPIO_CTRL_PORT_C,GPIO_KEY_RED_CON); } else { GPIO_ResetBits(GPIO_CTRL_PORT_C,GPIO_KEY_RED_CON); } }
0
c5b2f6787dd91d75e0f6b5f34f4177f3
8a7bd488f86d90c9509fc1a9d9a3a334
Initializes internal state of BaseFlLosses object.
class LossMetrics(): def __init__(self, bss=True): self.time = [] self.train_loss = [] self.val_loss = [] self.bss = bss if bss: self.sdrs = [] self.sirs = [] self.sars = [] self.stois = []
0
e5360def3ea19eecf29d98b8ef5de164
2c9525b718a388751dbcf6d9d87b16b6
Performs any one-time initialization necessary for the import. the {@link SubMonitor} instance to report progress on (may not be {@code null})
public void preImport(SubMonitor subMonitor);
1
cbffefd02c4fbc99679807307a4d26d7
0dba130b610f84c78688dc1c690d7da4
If the spectrum source file and source index were reported using the special format, this function returns the original spectrum's title without the added information. Otherwise, the whole title is returned.
public class Spectra implements PeakList public String getScanTitle() { return scanTitle; }
0
fdb8a51cd27342600cb460f6343bb094
a6463b7d06c4f4183b3429806f3b1e60
p_img1 may be like ../resources/neutral/arrowblueright.gif so need to get only the image name and compare to image current displayed
public partial class MapCharacter : MapSpeaker private void changeImage(string aName){ if (mCurrentGifName == aName) return; mCurrentGifName = aName; mGifAnimator.setSprites(mSprites[aName]); }
1
4f031d77118bb5495cc2e37f20a50f42
404d37a482e49bf6a461944939a1a404
Adds a new parameter with the specified name and value
namespace Infrastructure.Xml.Xsl public class ParameterCollection : IEnumerable<KeyValuePair<string, object>> public void Add(string name, double value) { this._parameters.Add(name, value); }
1
198bb2c323968a5a74b4ab27c5cf08f5
63986a8a287e7750457cb119d7f564a3
获取支持课程字典
class DataClient(metaclass=Singleton): def get_course_list(self, **kwargs) -> dict: return self._gk.get_course_list()
1
e4fe28566336b21deab72ee73dd103fc
fcf57ebd29743c146ac94a22a216e2c0
Tests if the Basic authentication process has been completed. <tt>false</tt> otherwise.
public class SSHClient extends Server{ public boolean isAuthenticationComplete() { return this.sshConn.isAuthenticationComplete(); }
1
2d4450c7278cfaf931f1416c71e677e2
6389fb790471a2b63af22832ddc77535
Append text to the QTextEdit.
class main_window(QMainWindow, Ui_MainWindow): def append_text(self, content: str): self.display.setText(content)
0
72f6db8e55e5cd8236b4c646b8f10fdd
080ac8238b763257598846d5cadd4b9b
Calculate average heat index
totalValue = 0 for value in HourlyTemperatures: totalValue += value return round((totalValue / len(HourlyTemperatures)), 1)
0
b63b2d9911b5308c20e9cd32034578c2
861628055e4ddcf66346562f1e56dff8
Preprocess data then tokenize, so it can be used in RecconEmotionEntailmentModel
class init_data: def preprocess(self): assert (self.raw_text is not None), "words must be detectable" self.text = word_tokenize(self.raw_text) try: self.tagged = pos_tag(self.text) except: self.tagged = None print("non-understandable text") ass...
1
104b0ef4d2a3d70cc0e4cd66b994edd9
f02fa5755555d1a6b3ecce1edee1b3db
Function to calculate STAC parameters using prior probabilities.
def get_prior(state): mu_prior = OrderedDict() prior_inv_cov = OrderedDict() prior_inv_cov['xlai'] = np.array([1.0]) prior_inv_cov['xhc'] = np.array([1.0]) prior_inv_cov['rpl'] = np.array([1.0]) prior_inv_cov['xkab'] = np.array([1.0]) prior_inv_cov['scen'] = np.ar...
0
5dd93e607a8f0ae71d9f6419a504fa8e
ff8a7e8ea3c7964a94ad8ba1cfd0abcb
获取模拟资产数据
def mock(request): port_code: str = request.GET.get('portCode') date: str = request.GET.get('date') holding = models.Holding.objects.filter( port_code=port_code, date=date ).values('secucode', 'holding_value', 'mkt_cap') holding = {x['secucode']: float(x['holding_value']) for x in holding} ...
1
b4882297701373558db6fb97ba6c6295
48aa4f04e10f9a4785dff00386d06366
ゾンビが歩く処理
class Inu def update( map ) if self.x % @c_size < @speed && self.y % @c_size < @speed && @status == WALK @direction = @senro.next_direction( map[ ( self.y / @c_size ).to_i ][ ( self.x / @c_size ).to_i ], @direction ) end if @status == WALK case @direction when TOP self.y -= @speed when BOTTOM ...
0
68585052aba1e20f9fd8ab29cb542381
a0f2ce08a0e6afc19cea71189c4e587f
Normalizes a rubric category
function normalizeCategory(category: string): string { return category.trim().replace(/\s+/g, ' ').toLowerCase(); }
1
01cbba806d3cd521082c9824fa5f5ec3
72d6fb58be3cf70449134e5a56f56d53
Finds and adds all Commands of the given Assembly
{ List<AbstractCommand> ret = new List<AbstractCommand>(); Type[] types = asm.GetTypes(); for (int i = 0; i < types.Length; i++) { if (typeof(AbstractCommand).IsAssignableFrom(types[i]) && types[i] != typeof(AbstractCommand)) { ...
1
689a2138a59b2a0d8e0a8f6bc9e1c2ae
93b59945db4fe8f6abb7d0d267a4ea78
Para mostrar o ocultar el menú en caso de que estemos en una pantalla de móvil
function show_menu_mobile(){ let header_navbar = document.querySelector(".header-navbar"); let body = document.getElementById('main-body'); if(header_navbar.classList.contains('active')){ header_navbar.classList.remove('active'); body.classList.remove('blocked'); }else{ header_navbar.classList.add('active'); ...
1
274112fbe9204db371586238c02dfce5
9e0c760d29c2420d050be2804470ce1a
如果此特效是一个射线特效, 设置射线的目标点 如果特效不是射线, 则不会有任何效果
{ if (m_VFXController == null) return; if (m_OpCache_SetBeamTarget) { VFXBeam beam = m_VFXController.GetComponent<VFXBeam>(); if (beam != null) { if (m_OpCache_BeamTargetTransform) { beam.SetBeamTarget(m_OpCache_BeamStartTransform, m_OpCache_BeamTargetTransform , m_OpCa...
1
3c2d87f204fd7f7bdfad59b93a5da701
fda38e4c3706da13733761dcc8a037b8
比对两个数组中是否存在同名的元素
function compare(a1, a2) { var exists = false; if (a1 instanceof Array && a2 instanceof Array) { for (var i = 0, iLen = a1.length; i < iLen; i++) { for (var j = 0, jLen = a2.length; j < jLen; j++) { if (a1[i] === a2[j]) { return true; } ...
1
f404a9425f9a015cf0d8724afa4bac35
27f7793bac1462b2ecc504234a31a17f
返回TF-Hub的spec模型
num_train_steps, num_warmup_steps, use_tpu): def model_fn(features, labels, mode, params): tf.logging.info("*** Features ***") for name in sorted(features.keys()): tf.logging.info(" name = %s, shape = %s" % (name, features[name].shape)) is_training = (mode == tf.estimator.Mod...
0
adc3d2b908f9953cd45508fab5a7470c
f0f125adb91ec59b6f5d1ef433a867f9
Sets the info field 1.
class SDIFD1Record extends SDIFDxRecord function setAdminInfo1($txt) { $this->_admin_info_1 = $txt ; }
1
839d6afb6c6f812843784def96340f3d
a7e0ef8f402653b5d9bd7af1da733f7d
Test property is not editable if condition on self is met with a string that is not null or empty.
public void EditableIfNotEmpty_ConditionOnSelfMetWithDifferentValue_Editable() { var model = new Model() { Value7 = "hello" }; Assert.IsTrue(model.IsConditionMet("Value7")); }
0
23c41081169024283cae8f961d9981ec
1998d5fdf343b7519ab783ab4cfa17f8
遍历keyset,取得每个键,在调用get方法去的每个键对应的value
Map<Integer, Man> maps = new HashMap<Integer, Man>(); Set<Entry<Integer, Man>> ss = maps.entrySet(); for (Iterator iterator = ss.iterator(); iterator.hasNext();) { Entry e = (Entry) iterator.next(); System.out.println(e.getKey()+"--"+e.getValue()); } }
0
7d66d202cbab1d2d5f7f7d58890a30c1
72b83a43c29c8d820e74f24db2d486f0
fills data for upper accesnts map.
parent::__construct(); $this->map[self::PERMISSION_MONITOR] = array( MaskBuilder::MASK_MONITOR, MaskBuilder::MASK_DEPOSIT, MaskBuilder::MASK_PLNADMIN, ); $this->map[self::PERMISSION_DEPOSIT] = array( MaskBuilder::MASK_DEPOSIT, M...
1
38d0e76bc8c9584af5cf42c678979110
3b50a2239459c628d5716cfb3b8fc86e
Easing equation for an exponential (2^t) ease-out, decelerating from zero velocity.
def ease_out_exp(t, b, c, d, s=0): t -= s return c * (-math.pow(2, -10 * t/d) + 1) + b
1
0910b447df5c8901866116455e63daff
84199543b05049b07ed54a6e96bb2aea
Start tracing to file.
namespace CDFM.Trace public class EtwTraceController public bool StartTrace(NativeMethods.EventTraceFileMode logFileMode = NativeMethods.EventTraceFileMode.RealTime, uint logFileMaxSize = 0, string logFileName = null) { Debug.Assert(_handle == 0, "_handle == 0"); NativeMe...
1
ecdf85da50deacbcf43666caf950ce3c
6a438daed6693382d28a5e94f5ca8ea4
returns true or false as to whether the container is oversize
export class GlobalDockedComposerContainer get displayOverflow(): boolean { return this.dockedComposer.composers.length + this.telephony.calls.length > this.dockedComposer.maxComposers ? true : false; }
1
96e0c718f53666366cc3a8a6d868654c
aa40545c18122eb843dc2b2b0ae9a71d
转置此矩阵,将结果存储在指定的单精度数组中。 结果与GLSL统一矩阵兼容,并且可以传递给函数glUniformMatrix4fv。
{ if (!this.array) { this.array = new Float32Array(9); } const array = out || this.array; if (transpose) { array[0] = this.a; array[1] = this.b; array[2] = 0; array[3] = this.c; array[4] = this.d;...
1
00e9aa738d467ce51af04449865b0f56
262e6245bd97657ae32f6a77604723a0
Function to export the database to json to stdout.
def export_json(path): export_db(path)
0
108b2238ae38c5f48b28c3bec14352c5
8d981da595509041eed26cfd1b88dac8
Zwraca DataModel ogloszen, ogranicza wykonanie zapytań do bazy danych
$params = \Yii::$app->request->queryParams; if ($this->deep_cache) { $cache_string = "deep_".$this->action->id.md5(json_encode($params).\Yii::$app->user->id); $cached = \Yii::$app->cache->get($cache_string); if ($cached) { \Yii::trace("SERVED FROM DEEP...
1
24882623e59b4101664ca396cdd434e8
2f07b85139fb96dc808c73303046f219
The total count of values aggregated to compute the total.
class AggregationResultItem public function setCount(int $count) : self { $this->initialized['count'] = true; $this->count = $count; return $this; }
1
529f4dc4f2e111f2fd6a0ba8e894f972
111a4bfc84687b0db0f472cb205a3b58
Activates the icon animation for tools that support this feature
QTreeViewer<Model> viewer = getViewer(model); if(viewer == null) return; if(!viewer.hasAnimation(model)) viewer.startAnimation(model, Animation.ICON_BOUNCE); }
1
566ca8646918ec14a8337b15aec18a1b
495a1ab36030a6f5a61a3fab20eacaaa
Plays two hands with smarter discards
def run_discard_model(status, rand): hands = status['hands'] dealer = status['dealer'] discards = [] for i, hand in enumerate(hands): isdeal = i == dealer if rand: discards.append(random.sample(hand, 2)) else: discards.append(find_best_hand_combination(han...
1
5558f787cb317e8cdb8de3f7c22b99ca
81357c7423d95efaeb056dc54a0d7da1
获得当前对局棋谱
QString ret = (nowColor ? "black\n" : "white\n") ; QList< Chessman> tmpList[COLORNUM][TYPENUM+1] ; for(int i=0;i<nowChessman.length();++i){ Chessman man = nowChessman.at(i) ; tmpList[man.color][man.type].append(man) ; } for(int i=1;i<=TYPENUM;++i){ QString tmp = chessman2str...
1
69ee046a7d833520e58d8e61bd4c92c6
b2ae85e651f06da7c18c9aaea7eaea6b
Setter for <code>bot.GPT_REQUEST_VERSION_SERVICE.TMP</code>.
@javax.annotation.Generated( value = { "http://www.jooq.org", "jOOQ version:3.5.0" }, comments = "This class is generated by jOOQ" ) @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class GptRequestVersionServiceRecord extends org.jooq.impl.UpdatableRecordImpl<dshumsky.jooq.generated.tables...
0
3eb4e426df6c9c0e9ad1f8bb2e88ba18
15edc0fc097778daf3a58303d95374b4
initialise les sockets des casques
{ if ( ((msg_serveur = msgget(IPC_PRIVATE, IPC_CREAT | 0600)) == -1) || ((msg_carrefour[0] = msgget(IPC_PRIVATE, IPC_CREAT | 0600)) == -1) || ((msg_carrefour[1] = msgget(IPC_PRIVATE, IPC_CREAT | 0600)) == -1) || ((msg_carrefour[2] = msgget(IPC_PRIVATE, IPC_CREAT | 0600)) == -1) || ((msg_carrefour[3] = m...
0
6a875467769fa08d44477d70d2216163
1f36861af29a6f49facb178a94992e8d
mark all members pending update
static void pgxc_ARMarkAllDeferred(void) { int rs_index; ARRowStore* rowstore = NULL; if (u_sess->tri_cxt.afterTriggers == NULL) return; for (rs_index = 0; rs_index < u_sess->tri_cxt.afterTriggers->xc_max_rowstores; rs_index++) { rowstore = u_sess->tri_cxt.afterTriggers->xc_rowstores[rs_...
1
d0e998f0f30ce9c8ff18bb4b64647a6a
201542e84e3365e52f3e9013dde55762
Obtain orientation in degrees.
class Orient(): def orientation(self, coord): x_len = coord.x.max() - coord.x.min() y_len = coord.y.max() - coord.y.min() orient = 0 if x_len > y_len else 90 return orient
1
052cae97291e5c1116dada56c79b253d
4273d37a1c7248f77b246ffceae40f58
Concatenates multiple audios into the first audio file of the array.
function mergeAudio(){ cmd = 'mkvmerge -o ./record/' + folderName + '/all-audio.ogg -w'; for(let i = 0; i < audioIndex ; i++){ if(i != 0) cmd += ' +'; cmd += ' ./record/' + folderName + '/audio-' + i + '.blob'; } console.log(cmd); ChildProcess.exec(cmd, (err, stdout, stderr) => { ...
0
2d486ad84609d5a9cc6b26149878f857
36539fe071cb5c91bd54d619e4a62564
Get codLinhaDestino
public String getLBR_Cod_OR();
0
6965bbb478334b7e728dd3948f8b8a18
fe5d137b6f115154a177dea7037ef1d6
更新项目回复数
void updateReplyCount(String id);
1
edecd9d41057b786a2fceb51805b9fbe
aaa9624fce136a73176f1dc870cafc09
Gets username from user input
public class LoginDialog extends JDialog implements ActionListener public String getUsername() { return usernameInputField.getText().trim(); }
1
4f1da45b5f983a2228877e484d05ce00
cdd4d39fdf29a12c54b58702cc1bc63f
Rebuild related fields
class CertificateRenewProduct extends AbstractCertificateProduct protected function ensureRelatedData() { $this->_certificate = Certificate::findOne(['id' => $this->model_id]); $this->_model = $this->_certificate->getCertificateType(); $this->name = $this->_model->name; $this->descri...
1
d60caa6d75476d810f18fd5c50772c83
b228f236e0afe828d0fa44000fc31577
Create the window object and initialize if needed
function createWindow() { var path = require("path"); var fs = require("fs"); var initPath = path.join(app.getAppPath(), "init.json"); var data; try { data = JSON.parse(fs.readFileSync(initPath, 'utf8')); } catch (e) { } if(!data) { mainWindow = new BrowserWindow({ width: 800, height...
1
ecd206d4f40d4ad44d09ffa5e36d2973
5d6cb7b6120013971783e815ef0eab42
Install callback to receive notifications from this object. Keyword argument: cb -- BuddyCallback instance.
class WaitableCallback: def __enter__(self) -> WaitableCallback: self._messenger.add_listener(self, self._filter) return self
0
a11d089f7f19832efad84f66d7191e59
863844cd16e65dad700b0e1f604a1cc4
Tests chemical element validation.
for chemical_symbol in ase.data.chemical_symbols[1:]: atomic_number = symbols_to_numbers([chemical_symbol]) true_atomic_number = ase.data.chemical_symbols.index(chemical_symbol) self.assertEqual(atomic_number, true_atomic_number)
1