query_id
string
corpus_id
string
query
string
code
string
label
int64
2170f2ccd914dac79f1b205232c175b1
339dc0305cb9e551c82b24209b8579ab
调用打码接口获取图片角度
int degree = 0; try { ExifInterface exif = new ExifInterface(path); int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90: ...
0
136907ed0f594097a616ff4f9869cf65
390bc69ba5ab63273660ee51b6eeaa90
# Compute payer swaption price
pricefutures.default <- function(ttm = 1, s0 = 50, delta0 = 0, sigmaS = 0.3, kappa = 1, alpha = 0, sigmaE = 0.5, rho = 0.75, r = 0.03, lambda = 0, alphaT = NULL) { if((missing(lambda) | missing(alpha)) & missing(alphaT)...
0
535741046972c90d427e9c6bc7723017
4aed8fff0aed148977146dfb9020e654
Returns the value of the '<em><b>Agent Stack Size</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Agent Stack Size</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc --> extendedMetaData="kind='attribute' name='AgentStackSize'"
public int getStackSize();
1
c214c846ccfe559bcc3d14cc7fa8e103
f80c3404d7c5214d3867f7d2093df988
Remove the archives directory if it exists
public class DwcaArchiveBuilder private void cleanupFS() throws DownloadException { LOG.info("Cleaning up archive directory {}", archiveDir.getPath()); if (archiveDir.exists()) { FileUtils.deleteDirectoryRecursively(archiveDir); } }
1
1458fa2bd20a062a83af2db9863c32c8
148f41be04c57bd8e0a25d169772e14f
Get information about a given List of summoners.
class LeagueRepository implements RepositoryInterface public function getSummonerInfoById($id) { }
0
145c01bd7cd744459cf4989c7a94df61
e1934ec4b709fcf28d0c92012baeb55f
解析出search请求中的 数据库名列表
namespace DigitalPlatform.CirculationClient public class TargetItemCollection : List<TargetItem> public int GetDbNameList(out List<string> dbnames, out string strError) { strError = ""; dbnames = new List<string>(); foreach (TargetItem item in this) ...
1
ef4150cf19ae5b01ae504045e7365fee
5ad6ad31a36350021aab6cd90bce3cb8
Get certificate file extensions.
class CertFile extends \Mygento\Base\Model\Config\Backend\File protected function getAllowedExtensions() { return ['pem', 'crt', 'key', 'cer', 'der', 'p7b', 'p7c']; }
1
06ee0a31d46b1b2ea186ba2fd2f6296a
cc91b2a037353cd76e36ccdbbdeec34c
AdImageUploadV2 上传图片v2接口
namespace demo1.AliyunAcs public class AliyunServers public CreateUploadImageResponse CreateUploadImage(CreateUploadImageRequest request) { CreateUploadImageResponse response = new CreateUploadImageResponse(); try { response = acsClient.GetAcsResponse(requ...
0
7b0be8921c6cb9bd1fcd895c73e32abc
c3d051f13ee30c92b7c67f85c4272b54
True iff no value has ever been added to the stream.
class IntSet(Object): def is_nothing(self): return _ffi_api.IntSetIsNothing(self)
1
acc4a00275d5fde4e2bb2caadd5203fd
1a373a2867f6a1fdd9fda50d42c3cec3
Returns true if the Crashlytics singleton has been initialised and can be used.
function isSentryInitialized(): boolean { return sentryInitialized; }
0
5a3c6aa9dc7961b908e58634710b9a6f
fc9a190cb80ae219fd17e37789537fda
。这段代码的意思就是读取一个128位的随机数,然后转换为Java的byte数组
public class ShiroUtil @Test public void randomNumber() { SecureRandomNumberGenerator randomNumberGenerator = new SecureRandomNumberGenerator(); randomNumberGenerator.setSeed("123".getBytes()); String hex = randomNumberGenerator.nextBytes().toHex(); System.out.println(hex); }
0
80282ab8e591c0df3f9ae7a5b1c701ac
de34c5f4e145d5f79a737f9f2d9a324d
Returns the meta object for the containment reference list '{@link kieker.tools.slastic.metamodel.typeRepository.ComponentType#getOperations <em>Operations</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getService_Operations();
0
ac22f5b4db2684c137161200a2fe7523
3143705a1b7e7e2ff77d6a72fe8366b4
指定したTokensを使用して、AccessTokenを作成し、追加します。
{ $accessTokenId = $this->accessTokenIdGenerator->create( $authorization->getUserAccount()->getPublicId(), $authorization->getClient()->getPublicId(), DataBag::create($authorization->getTokenType()->getAdditionalInformation()), DataBag::create(['redirect_uri' ...
1
303c3e4224c9ff6b62c9c2300c905079
79a887262baf8f46d12a680bc471adbf
Load dependencies from requirements file
def _get_dependencies(requirements_file: Path) -> list[str]: lines = requirements_file.read_text().strip().split('\n') return [line for line in lines if not line.startswith('#')]
1
44730de20d9c815d1ee964766305d04b
9311291a1d0207e08efe388a565e6211
Initialize and allocate memory for reporter.
def _InitReporterModule(): global g_oReporter, g_sReporterName g_sReporterName = os.getenv("TESTBOX_REPORTER", "local"); if g_sReporterName == "local": g_oReporter = LocalReporter(); elif g_sReporterName == "remote": g_oReporter = RemoteReporter(); else: print >> sys.stderr,...
1
74440dfa4bea33eee15de0043daff88e
7c27bd03389ffdcd71980b3c8dfe183a
Event listener called just before entity copy.
abstract class FOFModelBehavior extends FOFUtilsObservableEvent public function onBeforeCopy(&$model) { }
1
fe488e60d7330987783f893a783638ca
25f984c95ecb706f4b47a3366978399d
returns the sum of both images
void Mergeimages(){ for (int i = 0; i < SIZE; i++) { for (int j = 0; j< SIZE; j++) { image[i][j]= ((image[i][j]+image2[i][j])/2 ); } } }
0
8674f2f284fd40b047500aa1759e409f
b734b2f5fd34593267209fd3c519d55b
Aktualisiert alle geänderten oder neuen Angebote des angegebenen Kunden.
{ var table = this.GetOfferDetailDataTable(customerPK); if (table != null && table.GetChanges() != null) { return this.myOfferDetailAdapter.Update(table); } return 0; }
1
e1751e6a6835c5469e8dd95baa9aa941
1f515f813b618217ed8840e445802980
Set the max level of logs to be printed in standard-output. Only log-operations with level less-than or equal to the echo-level will be printed to standard-output. This method affects all logging operations afterwards, and does not affect any logging performed before-hand. Default level is INFORMATION.
class Logger public function setSaveLevel($echoLevel) { }
1
7ef86aa0f645b079d37ea673111fec51
0116f70af44b8d84f0430bc350d7894a
Initializes the chrome engine.
class ChromeRunner(object): def __init__(self, chrome_path, headless_path, url): self.chrome_path = chrome_path self.headless_path = headless_path self.url = url self.thread = threading.Timer(1, self._Run) self.user_data_dir = None self.chrome_process = None
1
12a7fac7d096dac2ceacaca7baf29ed6
8306d1979950e4ba41becaa6693fbda7
choose the best set of positions by their free energies
{ fixed_id.clear(); double x = 100000; for (int i = 0; i < positions.size(); i++) { if (positions[i][0] < x) { x = positions[i][0]; } } for (int i = 0; i < positions.size(); i++) { if (abs(positions[i][0] - x) < 1e-5) { fixed_id.push_back(i); } } Init(); }
0
c1ebcc6acd3f76bb578135f0d1040ecc
b1a9140e2510e8fc39fce92661b8bebb
Constraint to ensure the capacities are kept constant across all the subproblems.
IloIntVar[][] yir) throws IloException { for(int i=0; i<problem.getDimension(); i++){ int numSegments = problem.getSupplier(i+1).getNumSegments(); IloLinearNumExpr summation = cplex.linearNumExpr(); for(int r=0; r<=numSegments; r++){ summation.addTerm(1, yir[i][r]); ...
0
7accaa8ff4386f697e2b774495b6cd3d
b3cbea9ed6cf2400f9ff585beb9b2832
Get the Singleton instance of the WindowManager. The WindowManager is created if it does not yet exist.
public class UIServiceImpl implements UIService, ShutdownService, ServiceListener, PropertyChangeListener, UINotificationListener public SingleWindowContainer getSingleWindowContainer() { return singleWindowContainer; }
0
243c27024ec3af9a4c2fbbdbcb21d4d3
7f8c964e0484bb405ad2cfafb0069fb2
Saves a new product's stock record
{ global $gEnvManager; $now = date("Y/m/d H:i:s"); $userId = $gEnvManager->getCurrentUserId(); $keys = array_keys($updateParam); if (in_array('pe_serial', $keys)) return false; $queryStr = 'SELECT * FROM product_record '; $queryStr .= 'WHERE pe_product_id = ? '; $queryStr .= 'AND pe_language_id =...
1
434ff23aa39422512b296d556dd99732
2f298b964af443617f6b72187f4baf34
Sets the top score of the specified game level for the user account.
this.l1RecentScore = l1RecentScore; gameDB.execSQL( "UPDATE users SET l1RecentScore= '" + l1RecentScore + "' WHERE username = '" + this.getUsername() + "'"); }
1
1d0060d1dd129217d8fbfc01c0df4e96
f6cc261e1ab757b9f23fb7664a37adeb
Obtém todos os acessos para o perfil informado.
public List<PermissionGrant> getPermissionGrants(Profile profile, int offset, int length) throws SocialSiteException { log.debug("profile="+profile); Query query = strategy.getNamedQuery("PermissionGrant.getByProfileId"); query.setParameter(1, profile.getId()); if (offset != 0) query...
1
73d701ba16a3bb1bec9b15d0b294e1cd
8eed3bf41df11cc061ea75730f99d323
Make sure that the buttons are refreshed when something in the listbox has been clicked
void OnBnClickedButtonRefresh(HWND hMainDialog) { SetExcludedList(GetDlgItem(hMainDialog, IDC_LIST_EXCLUDED)); SetProcessList( GetDlgItem(hMainDialog,IDC_LIST_PROCESSES), GetDlgItem(hMainDialog,IDC_LIST_EXCLUDED), bDoNotShowExcludedProcesses ); }
0
d3fce110add8ba683dafddd9528894a2
ca6d787ea528068df3e5cb775096cb4b
获得机器人软件Joint最大限位
{ if (!isActiveAndEnabled) { return new FloatRange(); } SoftJointLimit softJointLimit = new SoftJointLimit(); float motionLimit = Mathf.Abs(newLimit * 0.5f); softJointLimit.limit = motionLimit; joint.linearLimit ...
1
2c31cf18ea2e7fba032fb1053d6ba7b7
80c547dfea4f42fc2ced0c06c4a0ddba
Send verification email to user on request
{ $user = $request->user(); if ($user->hasVerifiedEmail()) { return response('Already verified', Response::HTTP_NOT_MODIFIED); } $user->sendEmailVerificationNotification(); return response('Resent', Response::HTTP_OK); }
1
6c1b8be976cad8c3f35367f7c49f94e6
3bf4d2d9d4f3ea6cc3e0f227380350e6
A class to connect to the broker and stream prices
super(BitfinexWSClient, self).__init__() self._thread = None self._ws = None self._connected = False self._subscriptions = {} self._data = {} self.authenticated = False self._key = None self._secret = None ...
1
90a4adb31ea12ac70d73626fa891a126
3df72764b0aaa3f1a543f9d3df735953
Called when an ambient color definition (Ka) has been read and it specifies an RGB model of the color. <p> The specification allows for the MTL resource to specify only Red component in which case the others should be considered the same. Depending on the implementation of this interface, it is possible that it will al...
float[] lab = this.getLab(); lab[1] = a; ColorimetricColor c = new ColorimetricColor(lab[0], lab[1], lab[2]); this.redRGB = c.getRedRGB(); this.greenRGB = c.getGreenRGB(); this.blueRGB = c.getBlueRGB(); }
0
095df89f8658d7a717c5e4e0a7d18ba0
234f8b37b06845c52d15f28eba28495c
投资金额-query
class TestController public function queryinvestsAction() { $req = new Touzhijia_Platform_Entity_QueryInvestsReq(); $req->reset(); $st = date('Y-m-d H:i:s', strtotime('1 days ago')); $et = date('Y-m-d H:i:s'); $req->setTimeRange($st, $et); $this->doRequest($req); $req->reset(); $req->setIndex('bid', ar...
0
aad32a23ef6b689776e0da1914de1798
d1123f808771ed6b0a07d6257bd7ba37
Play pick up sound, stop the particle effect, and then destroy gameobject when the sound is done playing
{ GetComponent<AudioSource>().Stop (); foreach(GameObject up in UPLevelParticle) GameObject.Instantiate(up, transform.position + new Vector3(0, 0.1f, 0), Quaternion.identity); GetComponent<AudioSource>().PlayOneShot (UPLevelSound); }
0
7e94f5c61d62d745384e9aedd316e311
d11027b30d9a06cf383dea468ad34107
加载图片控件
{ rngPic.ColumnWidth = rngColWidth; rngPic.RowHeight = rngRowHeight; ToolExcel.Worksheet wrk = Globals.Factory.GetVstoObject(shtPic); ExcelControls.PictureBox picBox = new ExcelControls.PictureBox(); if (!wrk.Controls.Contains(picName)) { ...
1
bc4e47a78608ff1a8efb27927193c290
ff9e6c71f7e8d1f02ff2709e3fb1911a
绑定线索和市场活动
int contactClueAndActivity(ClueActivityRelation car);
1
206ec36668cce9301a4e1f577778b2a4
4f15de6474282865f33c923b0ebfef5c
失去焦点时,应把内容还回去
namespace NativeSoftSystem.Control public partial class ucAutoDropDown : UserControl private void ctrl_LostFocus(object sender, EventArgs e) { this.Visible = false; this.DispostEvent(); }
0
7fdd42be9f9c7fa0e5d8d4ee0a23cb1f
879a641021af7aa2b5c4933cbd64f96f
Display edit wallet page
{ $response = $this->getApiServer($request->cookie('bearerToken'),[],$this->API_URL_WALLET.'/'.$id,'get'); if($response->code===10000){ $card = $response->data; }else{ $card = null; } return view('wallet.show',compact('card')); }
0
53924e8c623886c695d868a10d3d0c86
332810a51cc1e89398813017ac15ca63
Lists all item entities.
class ItemController extends ModelController public function index(array $args){ $this->listItems($args); }
1
2fd4529e38a2ae33b0381bf8090f2c95
5656184fa5a89fcbfdad03b02c3cb645
Apply the results of the given HistoryEvent _in reverse_. That is, remove what's added, and add what's removed.
namespace Hyperstore.Modeling.Events public class RemovePropertyEvent : AbstractDomainEvent, IUndoableEvent public IEvent GetReverseEvent(int correlationId) { return new ChangePropertyValueEvent(Domain, ExtensionName, Id, SchemaId, PropertyName, OldValue, null, correlationId, Version); }
1
d98361264abda747ba3edf31af15ed46
afb2f89f41809a175777fb3f60d57ca8
Compute norm of the gradient of numpy array in argument.
def _compute_norm(x, axis=[0], keepdims=False, epsilon=1e-12): x_norm_squared = tf.math.reduce_sum(x*x, axis=axis, keepdims=keepdims) return tf.math.sqrt(x_norm_squared + epsilon)
0
fec96e4db706c82fdcd1da72c046a8bb
5ce93cb065501ec067be8815c7595c1b
#### ==== Indicate position of labels in pie chart ==== ####
labelLocation_ggplot2 <- function(x, propLoc, locCode){ xLimit <- ggplot_build(x)$layout$panel_ranges[[1]]$x.range yLimit <- ggplot_build(x)$layout$panel_ranges[[1]]$y.range xRange <- xLimit[2] - xLimit[1] yRange <- yLimit[2] - yLimit[1] switch(locCode, topLeft = { xLoc <- xLimit[1] + ((...
1
6e9023a5c024f24575b1477adce91800
7dac0a4394328b9baba68747a31c6cdf
The number of profiles with complete payoff information
return self._data.loc[ (self._data['Position'] != self._data['Position'].shift(1)) & (self._data['Position'].shift(1) == 0), 'Strategy'].count()
0
4d4f0f60ef40d37141331295ffe07dd2
c3b5f7358bdef30f9f5cc49a40de009e
Retrieve visibility and bounds information of the status and navigation bars. Android only. Returns: A dictionary whose keys are - statusBar - visible - x - y - width - height - navigationBar - visible - x - y - width - height
class BasicBar(object): def show_bar(self): return {}
0
939e37cb309df3d6e933e87b3da0ac79
b9e7360cecc9244b33306f1e0a61aff2
根据章节编号更新章节排序
{ $this->validate($request, [ 'sort' => 'required|numeric|max:2147483647', ]); $section->section_number = $request->input('sort', 0); if ($section->save()) { return responseSuccess(); } else { return responseFailed('操作失败,请检查', 500); ...
1
393640a2cc98582f0f7a4d03ba57a664
cdbb6a5cede2bb76b5c1b51adc77ad6e
withdraws the funds from the fromAccount and adds it to the ToAccount.
void Account::withdrawLinkedAccount(int firstFundID, int secondFundID, int amount) { int owedAmount = funds[firstFundID].getBalance(); funds[firstFundID].withdraw(owedAmount); Transaction succeedTrans('W', getAccountID(), firstFundID, owedAmount); funds[firstFundID].transDone(succeedTrans); amount -= owedAmou...
0
11672d0dcf5a39acc6d4991b97e6cbae
4faddc57820b7888a1d405c1e5a76445
Must be executed when downloading of a directory item is canceled. Calling this API makes the camera cancel file transmission. It also releases resources. This operation need not be executed when using EdsDownloadThumbnail.
{ CheckState(); if (Info == null) throw new ArgumentNullException(nameof(Info)); MainThread.Invoke(() => { ErrorHandler.CheckError(this, CanonSDK.EdsDownloadCancel(Info.Reference)); ErrorHandler.CheckError(this, CanonSDK.EdsRelease(...
1
d4ce0bfd2236f5a58504fcf9083da4cd
18668fb5bdd894fa685459b945e64f65
Resets all axes to zero.
public class Flitchio_Input : MonoBehaviour public static void ResetInputAxes () { foreach (string axisName in mAxes.Keys) { mAxes [axisName] = 0.0f; } UnityEngine.Input.ResetInputAxes (); }
1
21f633dbac889ef611ce459a82a7869b
38a61742df70eec2de642e7262524b59
Returns information about the carbon footprint of passenger bus travel.
bus_co2_dict = self.bus_co2_dict_from_json() g_co2_km = bus_co2_dict["coach"] gr_co2_person = dist_km * g_co2_km if trip_type == "round-trip": gr_co2_person = gr_co2_person*2 return int(gr_co2_person)
1
a10cd3722e419488a8b09b5600a262a8
f3f7aca6a7c5b32013b2a346905339aa
ASTRING-CHAR = ATOM-CHAR / resp-specials resp-specials = "]"
class EmailAddressValidator::RFC2822Parser def _atom _save = self.pos while true _save1 = self.pos _tmp = apply(:_CFWS) unless _tmp _tmp = true self.pos = _save1 end unless _tmp self.pos = _save break end _save2 = self.pos _tmp = a...
0
c2ef6ad70329058c30ca81fc79a1ef15
0fa0f042a36ec8fed4e5f96003d0263b
空操作直接跳转到退出页面
class DiyAction extends Action public function _empty(){ redirect(session('url')); }
0
a41f556a624f0326bc7651adb9628297
defc0bedc530f87c46d2063063a4132f
Returns the location of the PID file, if any. Returns: (Union[str,None]): The configured path, or None
class PPXConfig: def path(self): return self._path
0
418aab931940c7391893ada857a706ad
da09c339e920170c405f8dcc1a99fbfe
同理于orderAsc/orderDesc
Expression<Func<TEntity, bool>> where, Expression<Func<TEntity, TOrderBy>> orderby, Expression<Func<TEntity, TResult>> selector, bool isAsc) { return Query(query,new List<Expression<Func<TEntity, bool>>>{where}, p => isAsc ? p.OrderBy(orderby) : p.Orde...
1
2969018f17cfb4933c9053aada275045
afbb7fd9f70e0d255add3c8e07e237a6
更新实体时设置审核状态
{ using (IGenericTransaction tx = this.m_UnitOfWork.BeginTransaction()) { try { TEntity entity = null; Type type = null; foreach (object id in ids) { en...
1
82a3ce3165fff44caeb2b102dcba41bc
e2dedd02da133abfd0ff671b1d6e95b7
This function will clear FIFO flag on Arducam
{ int i2cStatus; Wire.beginTransmission(_i2cAddress); Wire.write(byte(G_FIFO_C_REG)); Wire.write(byte(0x00)); i2cStatus = Wire.endTransmission(); if(i2cStatus != 0) { return -1; } Wire.beginTransmission(_i2cAddress); Wire.write(byte(G_FIFO_C_REG)); Wire.write(byte(0x30)); ...
1
501fb1d1ed41d4e342693c588ed28300
7f41dd4fdcd7b5fa5cc63c6016a3055e
Handler for map button being pressed on the segment control (control used for public journeys) When pressed, load the map with the journey details for the selected leg only.
namespace TDP.UserPortal.TDPWeb.Pages public partial class Map2 : TDPPage private void SetupControls() { JourneyHelper journeyHelper = new JourneyHelper(); string journeyRequestHash = string.Empty; Journey journeyOutward = null; Journey journeyReturn = null; ...
0
e1f07cddc152a0bb9845bf702909fc3e
6c52f76509940c21cbf89446793e170e
Gets the smallest rectangle containing all graph nodes and optionally the graph links.
{ float minX = nodeList[0].CenterPointF.X; float maxX = nodeList[0].CenterPointF.X; float minY = nodeList[0].CenterPointF.Y; float maxY = nodeList[0].CenterPointF.Y; foreach (EcellObject node in nodeList) { if (node.CenterPo...
1
c8b693877067d3ecffc3a9a10ae8919d
1b25d41bd58aa16fabfd6369c92375f2
Returns the path of the file to use to replay GPS data from
public class LocalTrack public String getFilePath() { return filePath; }
1
831a202758c7f340eab2c3fdb71a91b9
e1a767225429958a3cff7637dd5f5b38
have not set the option before, set it's default value
class Option def initialized case when type then type.new else default end end
1
2094bc6746b073294edc3593fb9bc537
0b31a2022158095d4fa95533697aa454
Validate Error message on select All items and SUBMIT
{ var strErrorMessage = "The maximum number of items per selection criteria is 999.You have exceeded this for \"%\". Please amend your criteria and try again."; var arrSelectedItemCount = new Array(); var intBasinSelectedItems = GetSelectedItemCount('lstBasin'); var intCountrySelectedItems = GetSelected...
1
11178b2c28eb939e61f4643d1aec22cc
9b00cb20d6f895ce511b5544d306f285
设置入组数量
public class GroupPurchaseOrderListModel implements Serializable public void setGroupPeopleNum(int groupPeopleNum) { this.groupPeopleNum = groupPeopleNum; }
1
6b12652a4d3cb7b34e0a7b0aeb6a6dad
b236629999ca77e4c7f6e69a1573541f
生成婚否
d = ['已婚', '未婚', '离异'] s = str(random.choice(d)) return s
1
eb5a41f11c6739c3dd6a46fc621137d3
119582facbafdd1e296b40d737bf6cb3
Renders the needles above columns for the left building
public class Cranks extends BaseComponent public void renderLeft(Graphics2D g2) { BasicStroke ns = new BasicStroke(20, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER); Stroke s = g2.getStroke(); g2.setStroke(ns); g2.draw(_geomCrankLeft); g2.setStroke(s); }
0
8c1877ae395dec88e3f989b8cb7ac09b
718ec2ee5e50bda1d64a6c7704cc45ea
网络加载每节课的时间
class ClassRoomRepository fun getTimeStap():List<Int> { var timeList = mutableListOf<Int>() classRMdata.showHomeWork.map { timeList.add(it.key.toInt()) } return timeList }
0
f8aeab762dbca2186c077cb37730885d
7194f329b625526f47c83e893d7924c8
Opens the links with given ids.
function showLinks(idList) { Array.from(document.getElementsByClassName('navItem')).forEach(navEle=>{ if (idList.includes(navEle.id)) { navEle.style.display = "flex"; } else { navEle.style.display = "none"; } }); }
1
c4453bd1e649d7945b7ad06cd0207935
04cb06947e830b04dd4194877bb79271
GET: OutpatientManagement
{ ViewBag.DoctorDetailsId = new SelectList(db.DoctorDetails, "Id", "Name"); ViewBag.PatientDetailsId = new SelectList(db.PatientDetails, "Id", "Name"); return View(); }
1
5a783f28b3ccf9c2ce0ffcbe1126a825
d22cc582f223f9912341dcf532df5398
Gets the "AddressIDType" attribute
public class X_I_OrderMasive extends PO implements I_I_OrderMasive, I_Persistent public String getAddressTypeL () { return (String)get_Value(COLUMNNAME_AddressTypeL); }
0
ea434174f37896a1697a49f8abb072a1
bc51542ee701fa1c1cf9453b232dd50d
数据保存后 更新异常报告单的处理状态和异常结束时间
{ try { var sb = new StringBuilder(); sb.Append(" UPDATE Z40_CRN_FORK_ERR_LOG"); sb.Append(" SET ERR_END_TIME = GETDATE(),"); sb.Append(" ERR_SECONDS = DATEDIFF(SECOND,ERR_BEGIN_TIME,GETDATE())"); sb.Append("...
1
b105972f582532abad1b958a22eb021c
0e6f75d90ceb9a6ac96d736ae44885e7
calculates Euclidian distance within an n-dimensional coordinate system
{ double sum = 0; int k; for (k = 0; k < dim; k++) { sum += (coords[k][i] - coords[k][j]) * (coords[k][i] - coords[k][j]); } return sqrt(sum); }
1
cedc747d39b0ed3eeae6588d0b1e3330
84eb0e553291ece6b462132ec0331a8d
点光源
function F_PointLight() { var _ = FagalRE.instance.space; var shaderParams:ShaderParams = FagalRE.instance.context3DCache.shaderParams; var commonShaderParams:CommonShaderParams = shaderParams.getOrCreateComponentByClass(CommonShaderParams); var lightShaderParams:LightShaderParams = shaderParams.getOrCreateCom...
1
560ebf6f931d383ec64a3cbef5a0f63e
6e1dd3b1bae8094a845958dd6602d795
@brief Constructor for the Pulse encoder.
encoder_pulse_per_rotation_(encoder_pulse_per_rotation), control_freqency_(control_freqency), channel_(channel) { encoder_pulse1 = 0; encoder_pulse2 = 0; encoder_pulse_position1 = 0; encoder_pulse_position2 = 0; acceleration_value = 40; p_gain_position_ = 0.01; p_gain_speed_ = 0.5; p...
1
67d9efece0d2cf088e78d5e24787fb16
6afe3b8b9b6df0ec3145b1a5434b1ca7
历史战绩查询
class HjbService{ HJBhistory(data){ return xhr({ method:"get", url:`${this.url}/hjb/history`, data:{ ...data } }) }
1
65a3e4b366ba643e19cfe726550ed1d2
b2d5c962ac1ff7287397e622fa91a529
go up and find the closest parent with class .productItemBlock
function validatorFunc() function closestParent(child, className) { if (!child || child == document) { return null; } if (child.classList.contains(className)) { return child; } else { return closestParent(child.parentNode, className); } }
1
93cc8a57e8694bfc0b853eedd2a8e71c
5b01548f14c2c7eab86062acd741f784
设置字段PHOTO为空值。
namespace hyApp.Entity [System.Diagnostics.DebuggerStepThrough()] public class RowYWAPP_DEPART_INTRODUCTION : DataRow public void SetPHOTONull() { this[this.tableYWAPP_DEPART_INTRODUCTION.ColumnPHOTO] = System.Convert.DBNull; }
1
c5ac78e817c294fb957d7781cbce6079
41307b6424c3c7cd5c5186f410dbd050
Test fixing seed is locally scoped.
rs_state = self.random_state.get_state()[1] rng_state = self.random_generator.bit_generator.state["state"]["state"] rng_list_states = [ rng.bit_generator.state["state"]["state"] for rng in self.random_generator_list ] _ = randomutils.derive_random_seed(sel...
1
368ed23d8229f5db7f572f1a2fa6dfe3
32ea7f747dce048856a4168a55c0850c
作废数据的查询
class yeepayClass extends Component public function refundQueryClearData($startdate, $enddate) { $query = array( 'merchantaccount' => $this->getMerchartAccount(), 'startdate' => trim($startdate), 'enddate' => trim($enddate) ); $url = $this->getUrl($this->getRe...
1
e105622d920462d31a5cb92a7fe18021
417bbb03f21ae3a5cad064570a7512dd
GET: Cargo_Lider
namespace AdminNG.Controllers.Cargos public class CargoComedoresController : Controller public async Task<ActionResult> Index() { var cargoComedores = db.CargoComedores.Include(c => c.Familia).Include(c => c.MovimientoCuentaTipo); return View(await cargoComedores.ToListAsync()); ...
0
9a900ad859213d8425b473c2aaa76c8c
c6409b161b7d86842e5a0e56aea0ceda
Needs to update the dangling reference on projects that contain this hierarchy as project reference.
{ Guard.NotNull(projectReference, nameof(projectReference)); var projectId = projectReference.Id; for (;;) { var nesting = NestedProjects.FirstOrDefault(n => n.ParentProjectId == projectId || n.ChildProjectId == projectId); ...
0
28d7645409cfb6dc218bb30c7872e8e2
fbb4d5ef702b0f778cd00da1d7032a5b
Provides lastname and firstname of employee fixtures.
{ return [ [[ 'id' => '1', 'firstName' => 'daniel', 'lastName' => 'smith', 'email' => 'daniel.smith@magic42.co.uk', ]], [[ 'id' => '2', 'firstName' => 'bob', 'l...
1
46a38837e4fe45a44a513294d7824e87
68c6332f1ae7f96f03546e3a6d294f33
同步联盟数据到客服端(只同步最重要的几个数据)
if dic and dic["league"] and dic["league"]["name"] then unionData.detail = dic["league"] unionData.members = dic["league"]["members"] if dic["leagueMessages"] then unionData.informations = dic["leagueMessages"] end if dic["contribution"] then unionData.contribution = dic["contribution"] ...
1
ac4957d654c930031a92fed568d6d36e
28769853a8e1fb5b3494d3643eb13921
禁止页面所有点击事件
local function forbiddenUIClick() if nil == mRootView then return end local normalOpen = tolua.cast(mRootView:getChildByName("ImageView_normalOpen"), "UIImageView") normalOpen:setTouchEnabled(false) local normalLeft = tolua.cast(mRootView:getChildByName("ImageView_normalLeft"), "UIImageView") normalLeft:setTouc...
1
8efd3e52d716abe16c987ea518ad07f6
9b266178c03f3a6bd2b09bb595aaf574
check that two block indications match in terms of their price
double priceA = MarketInfo(group[0], MODE_ASK); double priceB = MarketInfo(group[1], MODE_ASK); double priceC = MarketInfo(group[2], MODE_BID); if ((priceC - priceA * priceB) * digitsNumb - 0.5 * spreadCost >= pips) { return true; } return false; }
0
0b10741605935cb348c48ab35b46b2c0
00219c67527cc2bef0815bbc25047523
Runs an Append Only File rewrite process. Starts only if there is no a background process doing persistence. <p> If fails no data gets lost
public abstract void run(boolean recheck) throws IOException;
0
3bbc792b0a571340ab0c83664a7934a5
a875395b769ace00843630cbd883e7ee
Ценрт монитора с учётом скрола по X
{ CRect cont_rect = MonitorRect(rect); CRect small_rect(rect); small_rect.DeflateRect(rect.Width()/4, rect.Height()/4); CRect tmp; if (!tmp.IntersectRect(cont_rect, small_rect)) { #if _MSC_VER >= 1300 if (rect.right > cont_rect.right) rect.MoveToX(rect.left - (rect.right - cont_rect.right)); if (rect.botto...
0
d425d934d7d0fbf11cd028f481f35c80
bccc403ff1cba1769901f0f6f6841eff
the following example is from https://www.programiz.com/python-programming/closure#:~:text=A%20function%20defined%20inside%20another,in%20order%20to%20modify%20them.
def make_adder_inc(a): def adder(x): nonlocal a b = x + a a += 1 return b
1
faa12cdd355257d2ec0930367ae2a9dd
958f218670fc33c820ae741ecdedca7a
maxEnvironmentalSuitability and minDistanceFromDiseaseExtent thresholds are used when selecting the "new" occurrences in getDistinctLocationsCount query, so we must ensure they are defined before continuing
if ( snpPadding < 0 ) throw new UserException.BadArgumentValue("paddingAroundSNPs","" + snpPadding + "< 0"); if ( indelPadding < 0 ) throw new UserException.BadArgumentValue("paddingAroundIndels","" + indelPadding + "< 0"); if ( discoverExtension < 0) throw new UserException.BadArgumentValue("ma...
0
a2e72904c4e63773d5d4e8fc7dc9eddc
1ef0124208d862c6231d4c11715f3577
3. Найти сумму только положительных из трех чисел
public class AndroidHomeWork public static int sumNumber( int a, int b, int c) { int sum; int posOne = 0; int posTwo = 0; int posThree = 0; if (a > 0){ posOne = a; } if (b > 0){ posTwo = b; } if (c > 0){ posThree...
1
4cc52b8f4ff3dc75bfd4e00f5c2913e4
0db0a33b03809122bef6f111c6af50ab
Gets the time of midnight tomorrow based on a given time
Date tomorrow = getNextDay(date); Calendar calendar = Calendar.getInstance(); calendar.setTime(tomorrow); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); retu...
1
9de85507824a656afc4b20277930ccc3
af9495ebeee351ff0c92c493a836bbca
检查$cfg的合法性,对部分属性进行设置默认值
{ int fd, n; unsigned char *buf = (unsigned char *)&cfgdata; char *path = CFGPATH; memset(&cfgdata, 0x0, sizeof(struct CFGDATA)); fd = open(path, O_RDWR); if (fd) { n = read(fd, buf, sizeof(struct CFGDATA)); if (n > 0) { } close(fd); } if ((cf...
1
055c1e92c28580760ea17d9b40399217
92031e34c2a88e07c0f3a866b918d776
Sets the IP protocol number of the message. Most subclasses override this method to do nothing because the protocol number is defined by the message subclass.
class IPHeader def ip_proto; self[:ip_proto].to_i; end
0
1682f78a2431b5f9606b36fae62e6fb5
25401cd99d98b05315e142deff75199b
可以通过指定的时间来生成流水号。
public class UniqueId public long getNumber(Long timeMills){ return generateId(timeMills); }
1
a4a364eae939e0ec5cc4499137e5a28c
3a79669354b61b2e029d0e09f5f7035b
Retrieve theme's image directory.
function imgDIR() { return themeDIR().'/images'; }
1
ea523725028cffb25978c066d01a4bb1
517877957ca06c3d522dcfc24e696e4b
Checks for overlap of ranges in Non Standard Cost Definitions
void extr_overlap (int sr_pos) { struct sr_field *c_sr; c_sr = h_sr; do { if (c_sr -> lay_status[0] == CHG_TO_PRESENT) { if (c_sr -> chk_type[0] != 0) { c_sr = c_sr -> next; continue; } if (c_sr -> lay_status[1] != PRESENT) { error_meas ("overlap", sr_pos, c_sr -> yb, sr_pos, c_sr -> y...
1
a45ce058c82fcbd3eecfb6492085e05b
92e682bc498c4cb9ba4e727e5b6f40b9
获取菜品列表 不分页
export default class DishDao extends BaseDao async getDishAll(query) { return await this.execSql(DishSql.getDishAll, [query.merchantId, query.merchantId, "%" + query.name + "%", query.type === "", query.type, query.status, query.status === Dish.STATUS.ALL]); }
1
d822d49bfb917587aa771eb2d2162a52
04a7f39b47de3f4c73a793b7bd636674
Process contribution, issue tokens to user
{ $issue_contexts = array_filter( $model->getContexts(), function ($context) { return $context instanceof Issue; } ); $issue = array_pop($issue_contexts); if ($this->request->getMethod() === 'GET') { $tos = $model->getTo...
0
67efacd7f172798687446eebd4239b61
be207b48100754b9668595f6b3e620d5
funkce pro nalezeni Bezoutovy rovnosti pomocí rozsireneho euklidova algoritmu
namespace Zlomky public partial class Form1 : Form static long NsdEuklid(long u, long w) { long ab = u * w; long r = w; while(w > 0) { r = u % w; u = w; w = r; } return u; }
0
fa76b1f8ef438aeae830588b6bd61def
0a23106d546dae7a1ec24485060cb61c
update the TLB according to the current state of the dirty bits
void tlbHandler() { moveState(&(currentProc->p_s), (state_PTR) TLBOLD); int asid = (currentProc->p_s.s_asid >> 6) & 0x00003F; moveState(&(procMeta[asid-1].uold_trap[TLBTYPE]), &(currentProc->p_s)); passUpOrDieHelper(currentProc->sysCallFlag[0], isTLBFlag, currentProc->sysCallFlag[3]); }
0
e6a753e62f9c32335e192770f212993c
30853937a55ba01ef7b123a149f57f2b
Each grayish pixel replaced with a grayscale pixel computed by averaging the three color channels, and setting all three channels in the new pixel to this value.
RasterImage gray(RasterImage img){ float sum = 0; float average = 0; unsigned char* rasterIn = (unsigned char*)img.raster; RasterImage grayImg = newImage(img.width, img.height, img.type, 0); unsigned char* rasterOut = (unsigned char*) calloc(img.bytesPerRow * img.height, 1); for (unsigned short ...
1
6819ad32944786af8e203e4bc57bd79c
e28c03423067708d9d782ea96ef793d0
node payload has finished sending, setup events and calc indexes
g_NodeCollection:RegisterEvents() g_NodeCollection:RecalculateIndexes() local waypoints = g_NodeCollection:Get() self.player = PlayerManager:GetLocalPlayer() local staleNodes = 0 print('ClientNodeEditor:_onInit -> Nodes received: '..tostring(#waypoints)) for i=1, #waypoints do local waypoint = waypoints[i] i...
1
f1408abd8558e8c81ae268164a7ab2d9
76c21499db369c2a54e029e36b9deae3
Sets the recipient or the recipients for the message. If more than one Recipients are passed, the mail will be generated multiple times for each recipient.
{ $this->recipients = []; foreach ($recipients as $recipient) { $this->addRecipient($recipient); } return $this; }
1
41b6ec95c7c1b242ae1dd8d98cb80c03
93e4fe2b4ef169dbfe62833905397207
Perform a combined I²C write/read operation.
uint8_t bcm2835_i2c_write_read_rs(char* cmds, uint32_t cmds_len, char* buf, uint32_t buf_len) { #ifdef I2C_V1 volatile uint32_t* dlen = bcm2835_bsc0 + BCM2835_BSC_DLEN/4; volatile uint32_t* fifo = bcm2835_bsc0 + BCM2835_BSC_FIFO/4; volatile uint32_t* status = bcm2835_bsc0 + BCM2835_BSC_S/4; vo...
1