query_id
string
corpus_id
string
query
string
code
string
label
int64
e9eb23b1475709fe4ded605eee1dcde7
0d65552030e8aa9610166a6adcbf88f2
поиск индекс максимального элемента
IdxType i, idxMaks; ElType maks; idxMaks = GetFirstIdx(T); maks = Elmt(T,GetFirstIdx(T)); for(i = GetFirstIdx(T)+1;i<=GetLastIdx(T);i++){ if(maks < Elmt(T,i)){ maks = Elmt(T,i); idxMaks = i; } } return idxMaks; }
1
6bf98e3092e2c7745730738a50f1f5e1
23a6f536ba89329816b0f193f1c5d661
utility function for printing an arrow at the start of each line
int i; printf("\t\t%c", 201); for (i = 0; i < STRAM; i++){ printf("%c", 205); } printf("%c\n", 187); }
0
eec16901a8f39861e9d9aa1ad9706880
63d59096e33bc505b23de463c17c141c
Xử lí sự kiện xoay một hình.
{ Button button_temp = (Button)sender; button_temp.Location = new Point(button_temp.Location.X - 1, button_temp.Location.Y - 1); button_temp.Size = new Size(button_temp.Size.Width + 2, button_temp.Size.Height + 2); button_temp.Image = Properties.Resources.ButtonQu...
0
4d2cb643243afb8a3da80001027433a1
aebd56ccfb70308d2b57aaf05d4bf13c
calculate the angle between the hour and minute hand
int getAngle(int h, int m){ return int((30*h - 5.5*m))%360; }
1
bb88b8b206aa77c6cb3bdb3bcf1c98d6
17e67b42a72f7d50f750394455742d30
Returns the correction factor kappa
class KH(Optimizer): def Cr(self) -> float: return self._Cr
0
17396741a90088611db018a058da2dff
9fc97e11b06714466a6f6b2c8e210ae8
Splits each rank-N `tf.sparse.SparseTensor` in this dataset row-wise.
if isinstance(self._values, RaggedTensorValue): values_as_list = self._values.to_list() else: values_as_list = self._values.tolist() return [ values_as_list[self._row_splits[i]:self._row_splits[i + 1]] for i in range(self._row_splits.shape[0] - 1) ]
0
0bccbd54034e9cdacc4be5db3b26ab09
e5df671e00cad85d83c2f7c9f7db159a
修改职位信息,如该职位部门变更
@RestController @RequestMapping("/job") public class JobInfoController @RequestMapping(value = "/{jobCode}/editJob", produces = { "application/json;charset=UTF-8" }, method=RequestMethod.POST) public ResponseModel editJobInfo(HttpServletRequest request, @RequestBody @Valid RecruitJobInfo jobInfo, @PathV...
1
457db7419a3960fff2c904614915c837
35bea0bdb945f53576538264ee318b69
Method to encapsulate all collective calls
void i_collective(int sender, instance_p instance, po_opcode opcode, void **args) { int opid; precondition(instance!=NULL); precondition(opcode!=NULL); start_timing(i_collective_timer); lock(po_rts_lock); opid=operation_index(instance->po,(item_p)opcode); assert(opid>=0); if (instance->state->num_owned...
1
d4fc8c5eec86182267e8b29602af31b9
9563c685bb1c04cf1d9c19d61197ce89
returns customers who have rented specific products
rentals = [] revenue = 0 for i in range(len(customers)): if (len(tools) >= 3): rental = customers[i].rent(tools) rent = Rental() rentals = rent.create(r...
0
d153ece384efdb7e65de5d049984a6a7
c4f0afda98618d291c5e3b3fd9ad3f26
An implementation of a directed graph using an adjacency matrix
class AdjacencyMatrixGraph(Graph): def __init__(self, numVertices, directed=False): super().__init__(numVertices, directed) self.matrix = np.zeros((numVertices, numVertices))
1
4057f57847900af1a61b153c47f0f7bb
3e476659133526644d675872bc43d3dc
This finishes a change in the environment, meaning if a package was installed, this method persists the lupo.lock and lupo.json file
namespace LuaPackageOrganizer.Environments public void RollbackChanges();
0
5d8ce79d770755874695874fb0331e32
ed8fdb2bde32585e019a308c07a89b4f
Sample agents at the center of the grid.
class CPRGridActionSpace(spaces.Discrete): def sample(self): return AgentAction.random()
0
11f1717b063473e598974ec4ce8e94b0
5335baf371a1c3a0d88d91b70c5ce37a
Show String, Integer, Double, etc as simplified objects (default==false).
public final class XTM21Handler extends AbstractHamsterMapHandler<IRef> public void setPrettify(final boolean prettify) { _out.setPrettify(prettify); }
1
4301fa13c7d67d452dbedefbf59f5588
233bebe48d4fc137dc0e75582c492986
Synchronises the package.config file back to the package.&lt;Platform&gt;.config file if it's present.
{ var rootPath = this.m_DefinitionInfo.Path; if (File.Exists(Path.Combine(rootPath, "packages." + platform + ".config"))) { if (File.Exists(Path.Combine(rootPath, "packages.config"))) { File.Copy( Pat...
1
66aae0b114a351ed150a2ded2fee62cb
4163899dadf44f96c4fd2144b19fc300
Updating the system N times (N number of Cells)
global population_year for row in cells: for cell in row: cell.check_neighbours() for row in cells: for cell in row: cell.check_rules() main.after(YEAR_LENGTH, update_colony)
0
d6b8e1bbd3e2c292d5fa03aed0aa01ed
931907a575ef3cc7b36555d58019513f
Handler definition for key press event for light box closing
if (event.code === "Escape") { refs.lightboxImage.src = ""; refs.lightboxImage.alt = ""; refs.lightbox.classList.remove('is-open'); } }
1
1cc0de7954210ebbfcc31811e87fce8f
4838d713c99b7ee3d1e52dd5629493a7
onMessage - Business Message Reject Message Type = 'j'. Message sent by the exchange when it receives a supported message that is syntactically correct in an unsupported situation, and there is no specific rejection message. Fields: - (35) - MsgType = j - (58) - Text = (string) - (372) - RefMsgType = (string) - (380) -...
public class MessageCracker extends quickfix.fix44.MessageCracker public void onMessage(RequestForPositionsAck message, SessionID sessionID) throws FieldNotFound, UnsupportedMessageType, IncorrectTagValue { throw new UnsupportedMessageType(); }
0
679e15c2bf01937b52f37e0c9d14f387
213b626e925e5f4fed6ae7c90a26603e
AddOutputFlag adds a `output` flag to the given cobra command
cmd.AddCommand(&cobra.Command{ Use: "version", Short: "output the version's build information, if any", RunE: cmdVersion, Annotations: map[string]string{"type": "setup"}}) exe, err := os.Executable() if err == nil && cmd.Use == "" { cmd.Use = exe } pflag.CommandLine.AddGoFlagSet(flag...
0
81cc5109aaf1110694c7c828685c855c
1b85380bd84f16ebd9a574dfff7012ad
匹配文件类型的正则
regexList = [] for p in fileTypes.split(DEFAULT_DELIMITER): if not p: continue if caseSensitive: regexList.append(re.compile(fnmatch.translate(p))) else: regexList.append(re.compile(fnmatch.translate(p), re.IGNORECASE)) return regexList
1
af3d73a8b4f886316b524906257c24db
06b7f793e8d17c7ef18e1cfa8fbe7906
Add remove filter
class UserAdmin extends BaseAdmin protected function configureDatagridFilters(DatagridMapper $filterMapper) { parent::configureDatagridFilters($filterMapper); $filterMapper->remove('id'); }
1
8b30dbcb0bbd24d5e69f4ee73b1818ce
419186d99ade57de43dee7976cae3d81
Upload multiple images, each string represents an image encoded in base64.
def upload(links, upload_url=None, max_images=20): upload_url = urllib.parse.urlparse(upload_url) chunks = [] for i in range(0, len(links), max_images): chunks.append(links[i:i+max_images]) for chunk in chunks: params = {'tags': '', 'source': ''} for key,url in enumerate(chunk): params["url" ...
0
8493fdba01863eb00ecbdd63cbe75da5
40d2f76aa496705b113b717f12f9f946
This method must return True to enable customization via Preferences->Plugins
namespace MediaPortal.Plugins.IRSS.MPControlPlugin [PluginIcons("MediaPortal.Plugins.IRSS.MPControlPlugin.iconGreen.gif", "MediaPortal.Plugins.IRSS.MPControlPlugin.iconGray.gif")] public class MPControlPlugin : IPlugin, ISetupForm public bool CanEnable() { return true; }
1
95fd84b725989312a1390bdafc3609d9
11bb4d0b21ef71f62bc84bef216badfc
检测指定的出站邮件数据是否为垃圾邮件
public function isSpam(array $data);
1
31df6ee1b5b2388e76c1c74156a5265d
ba1e526be95d7d6504e394ae8bb3c5f0
프로필 삭제 처리하기
function delProfileImg({i_img, img}) { return new Promise(function(resolve) { fetch(`/user/profileImg?i_img=${i_img}&img=${img}`, { method: 'delete' }) .then(res => res.json()) .then(myJson => { resolve(myJson) }) }) }
0
90e91fb86c20aa1ad6fb5513a625c234
4b831d4ca26c15bff8936f65089da4e2
先判断english_name是否存在了
filter_dict = {"english": english.lower()} res = cls.find_one_plus(filter_dict=filter_dict, projection=['chinese']) return res
0
de91b099f12bde64fbe6e602fd5c72c3
106132552137f850e38c9f26634d713f
Créer une fonction pour les jauges de compétences (animation)
let option = { type: 'doughnut', data: { datasets: [ { backgroundColor: ['#FDA246', '#fff'], data: [100 - pourcentage, pourcentage], borderWidth: [10], scaleOverride: true } ...
0
aa07ab6cc59b7bbf5c210a3738ea511c
10faf162743beb358fcdc87abd246644
Handle adding implicit this as first arg to unbound function
static functionBinder(inFunc, thisObj) { if (inFunc.bind) { return inFunc.bind(thisObj); } return function() { const args = (arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)); return inFunc.apply(thisObj, args); } }
0
975572f8171d5b2e1f250054cbb448be
261cc405652f1048870e2f0dcc6b872f
Get cropX.
class Thumbnail public function GetCropX() { return $this->GetProperty('cropX'); }
1
61f8e3ab265ad73e9a5b00a684e8cd32
9a10d094f9b994ca6aa7c5d40982250b
是否有全民营销的权限
namespace EyouSoft.Security.Membership public sealed class UserProvider public static bool IsSysWeiHu(out string weiHuXiaoXi) { weiHuXiaoXi = string.Empty; bool b = false; string cacheName = EyouSoft.Cache.Tag.TagName.SysWeiHu; object _b = EyouSoft.Cache.Facad...
0
c4e4d75075f173181cfe4a05f4252fb7
59357e0bb7e57a8dd32c4e932f5f43d6
Clear <min_time_elapsed_since_last_modification> value
class Job extends \DrSlump\Protobuf\Message public function clearCreateTime(){ return $this->_clear(4); }
0
a2fe9fbf29a9cb4b0bfbbb2e665e58cb
8f2d8afcf5bb066c1b03235ce283b7ef
獲得最後一次登錄賬號
public class SettingManager public String getAccount() { return preference.getString("LastAccount", ""); }
1
5c648e7650f93d3ed760b68b05a41a28
e0670b220b8ab96a0b1ca0c2c02c370c
This adds a property descriptor for the Work Product feature. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Property_default_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Property_default_feature", "_UI_Property_type"),...
0
18f258d0b77c6357c3e07a79ab35f83e
accb39f892f959318de2123c12296976
Регистрация нового мастера
class WorkerController extends Controller public function registerAction(): ResponseInterface { $worker = $this->request->getPost(); $validator = $this->workerService->register(new Workers(), $worker); $errors = $validator->getMessages(); if (0 == $errors->count()) { $thi...
1
5dd506ff928290d88353da365e70a4e2
32b8eee17ee7184492167454e6672e07
국제전화번호에서 국내용으로 변경
num = num.replace("+82", "0"); if (num.startsWith("02")) { if (num.length() == 8) return num.substring(0, 2) + "-" + num.substring(2, 5) + "-" + num.substring(5, 8); else if (num.length() == 9) return num.substring(0, 2) + "-" + num.substring(2, 5)...
1
913554448c4d89b1ad3a40b0b94cce0d
584a2661cc579e48ed6c24dfe27e5b41
Method that read matrix, epsilon and system dimension from input file
ifstream inputFile("SystemSpecs.txt"); string line; getline( inputFile, line ); cout << line << endl; getline( inputFile, line ); cout << line << endl; getline( inputFile, line ); cout << line << endl; if ( inputFile.is_open() ) { getline( inputFile, line ); cout << line << " "; getline( inputFile, line ); ...
0
b55290a49aed1cf970ed6c36a48138e6
c91b66c5c99fa698b2b35604af3b883a
Removes access to deposit funds into the bank account.
public class Banque public boolean depose(String nom, double montant) { return false; }
0
f25c468266f4696c517da1f243ccac6b
4decc7e30c133aa991e86bf26567fdc6
name="ypg_ct_user_ctadmin_call_index") call index page(s) for a logged-in admin user
{ $data = []; $data['id'] = $_SESSION['display_id']; $this->load->model('service/User_backend'); $user_object = $this->User_backend->get_user($_SESSION['user_id']); if (is_null($user_object)) { redirect('backend/logout'); } $this->load->mod...
1
3413366f8c32acc2dd85d3083810b866
72212164e633fe342671ea2e73cfcf79
获取手机对象
class Factory: def product_phone(self, mobile_type): if mobile_type == 'apple': return Apple() else: return XiaoMi()
1
17b77fe8a91f052b8c0210ddd93ca8fa
5328413f1820b457b7640e639c7a94a7
Sets the cookie map.
?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httpOnly = null, ?bool $raw = null, ?string $sameSite = null ): CookieJarInterface;
0
9ba6008893bf48659caf03efc4bb4d20
2196f41050c35f3e77f016c5c13fb03c
Test if it is possible to pickle mention/candidate subclasses and their objects.
def test_pickle(Class): from pickle import loads, dumps a = Class(pos=[0, 1, 2], type="Au", m=6) b = loads(dumps(a)) assert b.__class__ is a.__class__ assert all(abs(b.pos - [0, 1, 2]) < 1e-12) and b.type == 'Au' \ and len(b.__dict__) == 1 and b.__dict__.get('m', 0) == 6 b = loads(dumps((a, a))) ...
1
20b67af3d34bc2410a6ef7e5619c4f64
4b31497a9061328e63098e53fff6f054
更新已经选择的菜的列表
if(menu!=null){ lunchMeal = menu.getLunch(); dinnerMeal = menu.getDinner(); group.clear(); List<List<CourseFood>> courseFood = new ArrayList<List<CourseFood>>(); List<CourseFood> selectedCourseFood = new ArrayList<CourseFood>(); if(lunchMeal!=null){ group.add(KEY1); Map<String, List<CourseFo...
1
d6ce0c7596345d53593caf149d016b19
12ec58856454d07a49cb8a0ed65221c7
获得一个一维数组中的最小值
var min = array[0] for (var i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i] } } return min }
1
af075248cb227dc83731e39c37f1a415
42e09f2fa3e715ea1c97b6e6a3081d73
Creates the book data manager mock.
return new ImmutableStockBook(TEST_ISBN, "Harry Potter and JUnit", "JK Unit", (float) 10, NUM_COPIES, 0, 0, 0, false); }
0
c8847b39a0047604f96fbcd442adf789
6ef6d2d2a1988bb6bd004f45a1792a4a
Programmatically updates the current working time.
class TimeModule(object): def UpdateTime(self): raise NotImplementedError("Should implement UpdateTime")
0
1a4950f4ac5d355778654c8accda739e
912ec065be7c3bf4eb2238f6be6e0ffa
以三点设定坐标系方向
namespace RepertoryManageSystem.Report public class ReportDrawing private void PointSet() { pointA.X = pointStart.X + pointZero.X; pointA.Y = pointStart.Y + pointZero.Y; pointB.X = rectLong + pointA.X; pointB.Y = pointA.Y; pointG.X = pointA.X; ...
0
d9449ff20bee064fff9ef268653c0640
71784e984a8a74fd175e3a2f73230c9b
JSF login failure method
public void init() { if (error != null) getCurrentInstance().addMessage(null, new FacesMessage(SEVERITY_ERROR, "Username or password invalid.", null)); }
1
f45a7b6662227733e82fe7595ad30b53
5ffd1858fecaf60db522cb48f6decc4f
Test retrieval of a string value for a given node.
text = Text.create_from('Dog') actual = text.get_string_value() self.assertIsInstance(actual, str) self.assertEqual('Dog', actual)
1
aac1bf4cbebe68e715a2489954e8967c
97452bb104da9769ec991063552a81e7
Method to fetch product details and update it in product interactions
liveCartData: LiveData<CartEntity>) { liveData.observe(viewLifecycleOwner, Observer<ProductEntity> { myProduct: ProductEntity? -> if (myProduct != null) { productEntity = myProduct detailsLayout!!.visibility = View.VISIBLE ...
1
95be0ebcf36cd2af62e8e75c43ece743
6692933e13f053704ef97c294648eff2
Sets up the text and button for the given event
public class TurnScene extends BaseScene public void setEventTexts(String firstOption, String secondOption, String thirdOption, String eventText) { chooseFirst.setText(firstOption); chooseSecond.setText(secondOption); chooseThird.setText(thirdOption); eventScreen.setText(even...
1
f2c0aec3f5e4f734b22c7f191452414f
68ca1355e6453bfb7981321ad1fd6397
Seçili kullanıcının bilgileri form alanlarına getiriliyor
userIndex = id; let { login, password, email }: any = BD[id]; getS('.login').value = login; getS('.password').value = password; getS('.email').value = email; getS('.addUser').classList.add('hidden'); getS('.editUser').classList.remove('hidden'); }
1
70d5d0b55c549c10a46ddba8497aedbf
0da37d29f8e07b03c726128ec2271f05
Tests a property that has no value.
namespace tut void TestReflectionObject::test<2>() { const LLMetaClass& meta_class = LLMetaClassT<TestReflectionData>::instance(); const LLMetaProperty* null = NULL; ensure_equals(meta_class.findProperty("foo"), null); }
1
6ef128ce0354ae79d74f7adb87a081cd
e12c87b33509d72e3da35726f1ee7e36
Return the attribute name that should be used to set the path to the resource for the HTML tag. Example: javascript uses the "script" tag with the "src" attribute, so this should return "src".
public class IronPages extends PolymerWidget public String getAttrForSelected() { return getPolymerElement().getAttrForSelected(); }
0
52edbdb064ae2cf6ccbeb493abae2172
4e44485ac4b6f48846de278f162798f7
determines if this node can handle the line (by checking the first word);
public boolean applicable(String inputLine);
1
c944e372262c1874cbaff2e64a799b4e
2e81635f390c5da90b322efbe025ce28
Saves entity and returns saved entity;
namespace Rikrop.Core.Data.Repositories.Contracts TEntity Save(TEntity entity);
1
ce005c63433daa1d53ac079e5c395035
12144c5473d1671e8ce377835a3676c3
Excluir (logicamente) Status de Anomalia
class StatusApiController extends Controller public function destroy($id) { $id = preg_replace ( '#[^0-9]#', '', $id ); if(!empty($id)) { $delete = $this->status->where('status_id', $id) ->update(['status' => 0]); if($delete ) { return response...
1
2af1e273a044e42a8caaf29fcb65d12a
58b18836b21cc941026071f7573a420f
The form should use the correct widgets
form = self.form(data={}) form.is_valid() for field in form.fields: if field in form._errors: if hasattr(form.fields[field], 'choices'): self.assertIn(constants.CSS_ERROR_CLASS, form.fields[field].widget.attrs['class']) self.a...
1
9397a817c432884ebded6b0bfe6301c8
0f1dba0e701744ff29489c154b080bd9
Fonction de création de carte produit sur page produit
class Display public function productCard(object $produit, $width = 21, $height = 55, $textlength = 200) { ?> <div class="col-sm d-flex justify-content-center mb-4 "> <div class="card text-decoration-none text-body" style="width: <?= $width ?>rem;" id="shadowproduct"> <img st...
1
ba61d81d46b0139ebcc069274ba9c38e
5bee1c0b21979ae1fa8f6513e582153f
some test data to work with
def example_data(): ann = User(email='ann@test.com', password='123', gender='Female', age=25, size='Small', pant_size=36, shoe_size=38) bo = User(email='bo@test.com', password='456', gender='Female', age=20, size='Medium', pant_size=28, shoe_size=37, pinterest_token='booboo') db.session.add_all([ann,bo]) ...
1
882279704c63ea68bc0abf1c158dfa36
1b9330086bfb29a96db42c1ceb24c551
Attempts to delete a game from an unauthorized account.
public void TestGameStatus1() { Response r = client.DoGetAsync("/games/badID").Result; Assert.AreEqual(Forbidden, r.Status); }
0
13cd968cd97e278c0514aade3ac55791
00852f12da3db8551d0d671271b3bc73
函数:获取战争开始时间
{ $curRound = $this->getCurRound(); $curStatus = $this->getCurStatus(); $curSubRound = $this->getCurSubRound(); $curSubStatus = $this->getCurSubStatus(); if ($curSubRound == 1 && $curSubStatus == WorldCarnivalProcedureSubStatus::FIGHTING && $curRound == WorldCarnivalRound::ROUND_1) { Logger::inf...
1
79253c25febd3eb6f8e2f1fab3db9e54
1c1bbcee0f21c41e0696edeccf5547ed
explicitly do nothing
public class InputMethodCount1 public void doNothing01() { }
1
fa0e5d1eec2ad9d3e771610ec107a890
5199a9790e6e6fc1692c18c721935f0a
расчет стартовой цены продажи в маге исходя из цены и кача местных магов
{ $qty = (float)str_replace(",", "", $params['QTY_SITE']); $volume = (float)str_replace(",", "", $params['VOLUME_SITE']); $price = (float)str_replace(",", "", $params['PRICE_SITE']); $result = $qty * ($volume / 100) * $price; return $result; }
0
dea4ff56d27b7500a165c980a5499045
9aa2f49bc35e8cb02f4e8c390daf225a
получилось ли разделить лист сырья на листы формата печатного оборудования
if (($this->penal['print'] > 0) && (($this->params['penal_CMYK'] + $this->params['penal_pantone']) > 0)) { if ($this->params['penal_lamination'] == 'lak') { if ($this->params['penal_CMYK'] > 3) { $this->setOperation('OperationPrintStoronaA2', array( 'copies_coef' => '1' , 'copies_number' => $this->p...
0
9abab1ef4fbfb621dd0fefc3a8ed0979
a97b750e58cafc81de715bfb06051f4f
编辑技术支持
def support_edit(request, incident_id, support_id=None): incident = get_object_or_404(Incident, pk=incident_id) if support_id: support = get_object_or_404(Support, pk=support_id) else: support = Support() if request.method == 'POST': form = SupportForm(request.POST, instance=supp...
1
63270dae17682d569eb48f2c4614742d
f5545931c075f727d7930cfda1fb6dfd
Calculates the integral part of a specified real number.
{ int32_t intValue = real_to_int(value); if ((value == (double)(intValue)) && ((uint32_t)intValue != 0x80000000)) return value; if (MathUtils::isNaN(value)) { return 0; } if (MathUtils::isInfinite(value) || value == 0) { return value; ...
1
9e2c031df1ce2124051f2c5a7e038a9f
550927a2e4cb4012b8940e5a283a5193
################### replacing Missing value with median ###########
def replace_missing(df, columnName): df.loc[:, columnName] = pd.to_numeric(df.loc[:, columnName], errors='coerce') HasNan = np.isnan(df.loc[:,columnName]) df.loc[HasNan, columnName] = np.nanmedian(df.loc[:,columnName])
1
6d6f80aa798f09e9e26ec1228b9ac2e2
09ac1966efafcb0c0fff4a9cec7dbe93
Update the size and position of the preview image. This is required because the script-able Maya UI doesn't provide enough control over layout.
if (!mImg || mImg->isNull()) return; QPoint lt; float rW = previewWidth / (float) mImg->width(); float rH = previewHeight / (float) mImg->height(); rMin = (rW < rH) ? rW : rH; if(rMin < 1) { if(rW < rH) lt = QPoint(0, qRound((float) mImg->height() * (rH - rMin) / 2.0f)); else { lt = QPoint(qRound((float...
1
bf72d8ead6e1a93db5c9f54aacc0c246
af8f6ddc2f8e5a8f7519206ce97dc28d
DevelopmentEnvironmentCommand constructor.
class AddEnv extends EasyEnvCommand public function __construct() { parent::__construct(); }
0
8aacdb011a4178b211faeb875ecd5b7e
47d603f04ce06ca27203fb54c5f3e8bc
Открытие страницы лобби
function this.OnClickEntryLobby() print("[Battle] @@@ battlecontroller ClickEnterLobby()") gamecontroller.GoScene(enum_scene.Lobby) end
1
f036ebf0797c84ac2176a986e9c6c591
9b1b4b376342718790b9cebf851f40ed
Returns a user-friendly name of the signer.
class MsgEcdsaSignature(SBP): def friendly_name(self): return "ECDSA SIGNATURE"
0
1650d3eca0032edc00df3d3f17709f7e
a90e7dd1b30d3ed79fa131673956d8c7
导出匹配详情mac
class ApiController extends Controller{ public function macscan(){ $gw_id = I('get.gw_id',''); unset($_GET['gw_id']); $arr = I('get.',''); $str = ''; foreach($arr as $k=>$v){ $str.=$k; $ins = array(); $data = explode(',',substr($k,1,-1)); ...
0
6e2b9f42202d92e0416433ed621ec064
a35f2b3c9f35342845586fa58e4a6988
Hide the tooltip div.
public class Controller implements ActionListener, WindowListener, MouseListener public void hideTooltip() { statusPane.enqueueMessage("", StatusPane.RIGHT); }
0
079712de19832742428820af61e2934c
f69f2416e09ba84e5421cf7d243359df
Remove graph nodes and edges
for node in self.nodesDict.values(): self.view.scene.removeItem(node) self.nodesDict.clear() for edge in self.edgesDict.values(): self.view.scene.removeItem(edge) self.edgesDict.clear()
1
08f1e5819f8a2c712977b250bb4421a6
ce783c685ec2e7899e66df4f5bfcae0e
Главная страница сайта с поисковым полем
class SiteController extends Controller public function actionIndex() { $model=new JobSearch(); if($model->load(Yii::$app->getRequest()->post())){ return $this->render('index',['model'=>$model,'result'=>$model->searchJobsIndex()]); } return $this->render('index',['model'=...
1
f3d6c9e932bb1e9330b7f74d427c01d9
7fb12346bac28fb013f28701ac6747d1
view and create different environment stages
def make_env(env_idx): dicts = [ {'game': 'SonicTheHedgehog2-Genesis', 'state': 'EmeraldHillZone.Act1'}, {'game': 'SonicTheHedgehog2-Genesis', 'state': 'ChemicalPlantZone.Act2'}, {'game': 'SonicTheHedgehog2-Genesis', 'state': 'ChemicalPlantZone.Act1'}, {'game': 'SonicTheHedgehog2-Gen...
1
c5ad8016ef6965f4fabda22c1f8bcd30
fd80283293a7565c99815fece714d99f
Name : HDD_PlayEvent Description : Starts waiting for video's event to read data from HDD. Parameters : None Assumptions : Limitations : Returns : FALSE if no error, else TRUE
{ BOOL bResult; kLock(&(gs_stFileSystemManager.stMutex)); bResult = gs_pfReadHDDInformation(TRUE,TRUE,pstInformation); kUnlock(&(gs_stFileSystemManager.stMutex)); return bResult; }
0
1f4d201189fb1fed796ace3222923c7e
f15e94c39a1cb8fa02c23b01bf5a8f9e
根据已知的三位点确定投影矩阵
def compute_K_from_vanishing_points(vanishing_points): temp=np.ones((3,1)) vanishing_points=np.concatenate((vanishing_points,temp),axis=1) x=vanishing_points[0,:] y=vanishing_points[1,:] a=x[0]*y[0]+x[1]*y[1] b=x[2]*y[0]+x[0]*y[2] c=x[2]*y[1]+x[1]*y[2] A1=np.array([[a,b,c,1]]) x=vani...
0
6dbe971183b08ef08e1ed2dbe5e76eac
e9cb040835a59fb859a761f44f776364
Creates the HTTP client from the message.
namespace Simple.HttpClientFactory HttpClient Build(SocketsHttpHandler defaultPrimaryMessageHandler);
1
ad6f8aded90879f3c0e573f1686a8936
4f2d3de583c17337404fd11009bb80f9
initialize the factorization machine.
self.cfg = cfg self.nodes = [] self.weights = [] self.edges = [] self.distances = [] self.factors = [] self.first_edge_label = None self.first_edge_label_bbox = ...
0
ee411a9d40e945acec9e1e5e6e1c7c1f
aeac83afd86eca74eb43a9385ce669f7
保存专家抽取条件信息
@QCAction public class HfzTeamManageAction public static RtnObject saveTeamCondition(WebParam param) { return HfzTeamService.getInstance().saveTeamCondition(param); }
1
08930f935e3c13e9e4f60b472543c686
2f7d25457ef032c33821aa7084836999
新增新年DIY贺卡信息
[HttpPost] public JsonResult AddBaoYangYearCardInfo(string yearCard, string shop, string detail, string promotion) { var mainYearCard = JsonConvert.DeserializeObject<YearCardParameter>(yearCard); var yearCardShop = JsonConvert.DeserializeObject<List<BaoYangYearCardShop>>(...
0
2008644a0485074f3839553a95f5ce42
0a45ada5a418b526e6e0462b4b44c227
유저의 favorite 호텔리스트 조회
namespace HOTOMOTO.APEX.Custom public class SPExec_Packages public static DataTable GetFavoriteHotels(int CustomerID, int UserID) { SqlConnection conn = APEX.DBHelper.getConnection(); SqlCommand cmd = APEX.DBHelper.getSprocCmd("cproc_GetFavoriteHotels", conn); SqlDataAdapter da; ...
1
1e390eaf9491d1901e37eaabe5b1157e
e004f4e824a3445e97ce3ce2a33b7b10
Called every frame during which the target's right click area is mouseover, except when a control is being reordered (then OnBeingReordered is called) or a prefix is being dragged (then OnPrefixDragged is called instead). This will be called after the main Draw method has been called for all drawers, and thus it can ov...
{ base.Draw(drawInfo); if (ContainerGraph.LodLevel <= ParentGraph.NodeLOD.LOD3) { if (!m_isEditing && ((!ContainerGraph.ParentWindow.MouseInteracted && drawInfo.CurrentEventType == EventType.MouseDown && m_titleClickArea.Contains(drawInfo.MousePosition)))) ...
0
be9ef5a66f84ad81c6aa3086079e179c
fecbf48fce97d65820333e9de01d1a40
如果有下载失败的,则触发下载失败事件
class DownloadService : Service() override fun onFailed() { outListener?.onFailed() downloadTask = null }
1
956d44e2875b0260a9b997dc8e7564a5
d7065bf720a3ca3d6a617f6d90de0d91
General command for disabling a tech.
function OnDisableTechAndCivicPopups() m_isDisabledByTutorial = true; end
0
581e26cac4da8b9abea46e02f97a7831
0c0f1bb2bf5f70785e1f8032331bcaa6
Requests an exemption for the given host.
host_id = exemption_models.Exemption.GetHostId(exm_key) logging.info('Escalating Exemption for Host %s', host_id) exm = exm_key.get() if not exm.CanChangeToState(_STATE.ESCALATED): raise InvalidStateChangeError('%s to %s' % (exm.state, _STATE.ESCALATED)) exemption_models.Exemption.ChangeState( exm_k...
0
47c6894286bd92bbcf9e436c37d6f1b2
b98ab261f425cfb0a7672c36c8c7e8fc
対象アドレスのロックを獲得する
namespace RV32_Register.MemoryHandler public class RV32_AtomicMemoryHandler : RV32_AbstractMemoryHandler public override void Acquire(UInt64 address, Int32 length) { for (uint i = 0; i < length; i++) { reservedAddress.Add(address + i); } }
1
e18039bc22d59da1042e10b85c298c79
b078c287f4d4838a256a57df938677f2
Controls whether or not child tweens/timelines are repositioned automatically (changing their startTime) in order to maintain smooth playback when properties are changed on-the-fly.
namespace iTweenFluent public class iTweenFadeUpdate public iTweenFadeUpdate IncludeChildren(bool includeChildren) { return AddArgument( "includechildren", includeChildren ); }
1
454b2da43f107f672ffe0f9595cd8369
15f8833a096a255de55c424a7d2e28bc
Monitor ZooKeeper.
zk = new ZooKeeper(connectString, sessionTimeout, new Watcher() { @Override public void process(WatchedEvent event) { try { getServerList(); } catch (Exception e) { System.err.println("failed to connect zookeeper clu...
1
2f3d88387d758c4a361cceae51e0c099
d3a864b899758d14bdb5227b89fae156
设置二维码容错度
namespace Wing.WeiXin.MP.SDK.Lib.StringManager public static class QRCodeHelper public static void SetErrorCorrectionLevel(ErrorCorrectionLevel level) { qrEncoder = new QrEncoder(level); }
1
b133f860f3886b567021a59687e30379
d4feb143766de51e68591cbcc7c8d189
解析得到当前手机绑定的用户列表
{ $mobileUserList = app($this->userSystemInfoRepository)->getMobileUserList(); if (!empty($mobileUserList)) { $mobileUserArray = array(); foreach ($mobileUserList as $value) { $mobileUserArray[] = $value['user_id']; } return $mobileUser...
1
473fd6a731fdd5cc3707ca1a1519f9d3
4324381b888735897c69b61667fb22f0
Ao clicar no botão redireciona para a página de Ver Lembretes
namespace CantinaCookBook.View public partial class Pagamento : System.Web.UI.Page protected void lnkTrocarCliente_Click(object sender, EventArgs e) { Response.Redirect("Pagamento.aspx"); }
0
d442d440e18b9b697d7e8b13e9c43992
de6f961f24433449570f978803e50736
Logs a message and an associated exception with severity Warning.
public class JavaLog public void logWarning(String message, Throwable ex) throws IOException { log(WARNING_LEVEL, message, ex); }
1
0b392400d683202861e3c1696e124629
93609c8f4c50da840178f5b047a1f379
SearchIndexCreate constructor.
{ parent::__construct( $name, $data, $dataName ); $this->setPassable(Index::class); $this->setRequest(RequestIndex::class); $this->setPipe(Search::class); }
1
f88769d97fc2caf3e5e6ddbd483cdef9
a4fcc0d6cf6f58b7fbcdc58a0ef34e40
录入药物页面
public String listdrugs(HttpServletRequest request) throws Exception { int page = Integer.parseInt(request.getParameter("page")); List<Drugs> list = null; try { list = DrugsDao.selectDrugsByPage(page); } catch (Exception e) { e.printStackTrace(); } System.out.println(list); request.setAttribute("li...
0
aa523060da00c64e682de4fff69e646c
1e5773f9bd2e006b8c0664aa492331ba
Função que tem a utilidade de retornar o argumento passado para testar o desafio.
def returner( argument ): return argument
1
37136cb2261282cae2ee71f21132d2ac
62fd9ee9b73c55bab39d59c9b74f1186
Runs a complete hydraulic simulation with results for all time periods written to the binary Hydraulics file.
self.constants() t = np.linspace(self.intOpts['ti'], self.intOpts['tf'] - self.intOpts['ts'], (self.intOpts['tf'] - self.intOpts['ti']) / self.intOpts['ts']) x = np.zeros((len(t), len(self.x))) u = np.zeros((len(t), len(self.u))) y ...
0
e661e612e63e7bb28acb9b0214e3556d
6f037eab0846c63c37d45ca5e907f414
Enable/disable closed-loop control.
namespace SEC.Nanoeye.NanoStage.MMCValues.MMCAPICollection sealed public class AxisConfig [DllImport("mmcwhp10.Dll", CharSet = CharSet.Ansi)] public static extern short fset_closed_loop(short axis, short loop);
1
860dc14448d7aa8cb931c2d813c00b50
8880bbcb0c75a4edc5a6d8c840d2352f
Make a mutable version of this type regardless of whether it was declared mutable for use as the constructor parameter.
public V toMutable();
1
226534b6dffe67b98668413283f7a78c
82b928367867976510d1b95092b4efbf
Выполняет проверку что данный элемент привязан к определённой услуге
class PercentsListAggregator: def __check_need_service_row(self): return not self._filter.Get('СписокИдО')
0