query_id
string
corpus_id
string
query
string
code
string
label
int64
3b53bdda085067437ede180f964a9566
04a2f40a535d9199477cae5c3f3d4bb5
* Remove query string from static files
function withoutQuery (path) { return path.replace(queryMatcher, '') }
1
95f5eadaf6b93086eac466a480b2132b
d470a4ed3d59697362557b400d822029
Rank features of top 4 levels played by most number of students.
def mainFunc(df): df['temp'] = 1 / df['overall'] + df['var'] return list((df.sort_values('temp', ascending=False)['RollNumber'])[0:5])
0
7e663df199d79f5f70901346aabf7815
88ae327dd643200535e83a893b7111c2
基于名称部分匹配的实体
{ List<LexiconEntityMatch> matches = new List<LexiconEntityMatch>(); if (!string.IsNullOrEmpty(entityName)) { foreach (LexiconEntityMatch entityMatch in EntityMatches) { if (string.Equals(entityMatch.Entity.EntityName, entit...
1
359b2ef1029436c90beb52d310a3bb89
c333670dc6c4fd38a37d74effeb3c293
callout function to destroy PIE lock, and free fq_pie flows and fq_pie si extra memory when number of active sub-queues reaches zero. 'x' is a fq_pie_flow to be destroyed
void fpq_release(flow_priority_queue_ref fpq) { free(fpq->flows); free(fpq); }
0
14aa975234a148a6fe60ba86626bf914
84eaf035ff458f22c38c27e8c842fa67
Generates the hypertext to be added to the Haptek animation file in order to animate AU22 from a starting intensity, to an ending intensity between start time and end time.
{ double nostrilL3txStart = convertIntensityToNumber( Constants.nostrilL3tx_MAX_AU11, startIntensity ); double nostrilL3txEnd = convertIntensityToNumber( Constants.nostrilL3tx_MAX_AU11, endIntensity ); double nostrilR3txStart = convertIntensityToNumber( Constants.nostrilR3tx_MAX_AU11, startIntensity ); do...
0
1261dd3ed8de159b5db5d9e0e7f7e4fa
96e8adc9aa8fee420d47116cbcce075e
convert bitcoin value to usd
bitcoin_value = dollar_amount / current_us_price bitcoin_value = round(bitcoin_value, 4) return bitcoin_value
0
876a03f48343f1671565d9dc24040a35
f81d46b49c2c7af607d44bbe1d4371b5
Computes quaternion conjugate
def qConjugate(q): q = normalize(q) w, x, y, z = q return numpy.array([w, -x, -y, -z])
1
998cce3bd4dc5f8269f3e98b916e5404
d769d2efec273e99ee3dd15adf9eb20b
Сдвинуть все звёзды Если звезда перестала попадать на экран, то заменяем её на новую
let len=mass.length; let mass_new=mass; let temp=[]; for(let i=0; i<len; i++ ){ let xy=convert(polar_to_decarte(mass_new[i], mass_new[++i])); if((xy[0]<=0) || (xy[0]>=X1) || (xy[1]<=0) || (xy[1]>=Y1)){ xy=create_stars(1); temp.push(xy[0]); temp.push(xy[1]...
1
ff6b57d112fd92dd09dfe85c2508b10e
26384bd7fe2c3d32d9a6df9c2d8ba297
Gets an instance of the file link settings for linking files hosted on GitHub fo a specific commit.
class BitbucketHgBuild extends HgBuild public function getFileLinkTemplate() { $bitbucket = new Bitbucket($this->configuration); return $bitbucket->getFileLinkTemplate($this); }
0
21eff1a319cfeb32098bd5e4cdda4245
4ef313efdad94aea8980997be8cf627d
r"""Returns the matrix :math:`\Omega_n = \begin{bmatrix}0 & I_n\\ -I_n & 0\end{bmatrix}`
I = zeros_matrix(n, n) for i in range(n): I[i][i] = Fraction(1) return I
0
8adb9be5289292cc85d1f22c815e7882
d93b10fef2186f230d91a9571b29bd69
Set a business by its id. This will automagically create a reference to a {@link Business} entity (that hopefully exists). So needlessly to say, this is a bit unsafe since there is no guarantee that the {@link Business} entity actually exists. This should only be used by system methods that might need to to a forward r...
public class VwEmployeeProjects extends OrmBean public void setBusinessId(int value) { this.businessId = value; }
1
f14021743dbdc06b4ba8e2f3e5dad8ee
60150415170ba1c53a600c1096b5fcc8
我加入的小组的数量
public int totalGroup(String mb_id);
1
3bcf9cd0dd3c587a0096674d832a84db
9d581f09d514865fe709d632ceee616d
对指定id模型的点赞数量字段自增1
$where = array( 'deleted' => 0, 'hidden' => 0, 'id' => $id, ); if (is_numeric($id)) { $Info = M($tbName); $Info->where($where)->setInc('likes'); } else { $this->error('非法操作!', U('/')); } }
1
37b68b332f37fee7c73164b21beb1600
d245728d9f82c31b0c326c82da7c6150
fill the form: form struct: ((NAME, VALUE), ...) NAME -- name of the input element VALUE -- if value is string, we will user send_keys, else VALUE is a bool value, and True indicate click element
def fill_input(element, value): if value: element().send_keys(value)
1
0cf37793e3af0ee527bc63105274efd8
702c2186bead455945158113f5460cac
Logs into the Factorio servers.
namespace MinecraftLibrary public class Minecraft public MinecraftSession Login(String username, String password) { SessionPayload payload = new SessionPayload(); Agent agent = new Agent(); agent.name = "Minecraft"; agent.version = 14; payload.agen...
0
4933a34561e706319cfb566ef7e83cf2
1e2cd0b069fcb1e00be7ffc715da9d6b
This function calculates the free-free optical depth from the density grid provided. The function assumes the observer is situated at x = -\inf.
double CRadiation::GetFreeFreeRad( double flog_10T, double fne, double fnH ) { if( fne > MAX_OPTICALLY_THIN_DENSITY ) { fne = MAX_OPTICALLY_THIN_DENSITY; if( fnH > fne ) fnH = fne; } return ( fne * fnH ) * (1.96e-27) * pow( 10.0, (0.5*flog_10T) ); }
1
5cb1d9aea5a5787527e7db9035027e3e
369f87a64852dc2b82f022dc709fce69
读取有8位有符号整数。
class BaseBuffer readSB8() { return this._readInteger(8, true, false); }
1
a81ea2f0e8de5dd59470b0e3ca0189e9
21845861706c739d6c164717fecab013
Remove several rows Parameters array $search Return integer
class l10n_Model_Core extends Model public function searchNum($q = null) { list($sql, $vars) = $this->searchQuery($q); return $this->Db->numRows($sql, $vars); }
0
96cd7c12863282d922ab9d46524dfba0
73527cb6ec0666fdbbf2037a6596101e
获取某个测定站的种猪信息
def get_pig_base_info(): try: request_data = request.args type = request_data.get('type', 'all') from_id = request_data.get('fromId', None) res = None ret = { 'list': [], 'lastId': 0, 'hasNextPage': False, } from_time = requ...
1
f1b9c96251d5a15786bf2c68dcfe7dd7
f28fc8c0bcf7b15746d05f96dcf5b840
Formats the weight into either string displaying either kilograms or grams.
{ isExact = true; if (weight == 0) return "0.0"; if (weight == 1) return "1.0"; isExact = false; if (weight >= -0.5f && weight < 0.05f) return "~0."; if (weight >= 0.95f && weight < 1.05f) ...
0
484faa54920dfe955e0ef326183a1ae1
ef6bfe99283855af9831799b5e27c14f
Function to print one alarm
void printOne ( employeeType one){ cout << fixed << showpoint << setprecision (2); cout << "ID Num: " << one.idNum << endl; cout << "Name: " <<one.firstName << " " << one.lastName<< endl; cout << "-Gender: " << one.gender <<"\n"; cout << "-Payrate $"<< one.payrate <<"\n"; cout << "-D...
0
41b36759f0d2b07f465e5407dfef7b23
ef9736120a9e1acb999763286fc6251c
Function that updates expression in the text entry box
function calculateExpression() { document.getElementById("hidden").value = document.getElementById("expression").innerHTML; }
0
def3751ce3d105e5521567a44f69830f
ac7eea2160b5e1c41c97d1bb563c6b35
SQL fetch all posts in database
export class FetchdataService getallposts(){ return this.http.get("http://localhost/Blog_Project/getallposts.php"); }
0
b681eb085c3540880c1fc4263b2b1f62
e19d0a14a68e483567b10d723751a12d
Show the streetview for the given coord on the screen
public void onShowInstallStreetView() { final Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(STREET_VIEW_APP_PACKAGE)); try { startActivity(intent); } catch(ActivityNotFoundException e) { Toast.makeText(this, R.string.streetviewdialog...
0
131abb341420f1eb352c5050e6c04075
49cfadc81e64d4ed93acf1104892ca7f
Loads players from file. Note that this overwrites any players previously stored in the league.
matchesInLeague.clear(); try { FileInputStream fileInputStream = new FileInputStream(fileName); ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream); for (; ; ) { try { Match<FootballClub> match = (Match<Foo...
0
987c7ea87ce22e1302e9af5cfb704abc
d9e01a50885329a1778d6d3a2f82a0ef
构建堆叠柱状图
void MainWindow::buildStackedBar() { QChart *chart = ui->chartViewStackedBar->chart(); chart->removeAllSeries(); chart->removeAxis(chart->axisX()); chart->removeAxis(chart->axisY()); QBarSet *setMath = new QBarSet(theModel->horizontalHeaderItem(colNoMath)->text()); QBarSet *setChinese = new QBar...
1
c07d15b0f43e221a656292d5d48de1eb
074960c9ea397185b927214204a45987
构建OLEDB.4.0连接和操作Access的帮助类
{ DECLARE_BUFFER(); DECLARE_OLEDB_INTERFACE(IDataInitialize); DECLARE_OLEDB_INTERFACE(IDBProperties); DECLARE_OLEDB_INTERFACE(IDBInitialize); CLSID clsid = {0}; HRESULT hRes = CoCreateInstance(CLSID_MSDAINITIALIZE, NULL, CLSCTX_INPROC_SERVER, IID_IDataInitialize, (void**)&pIDataInitialize); COM_CHECK_SUCCESS(hRe...
0
ba3d222b714f09b3a8a0f3776710408a
c71700fc3dadafe78b2762067f29d208
Create a new lazy open stream instance.
{ $this->spec = $spec; $this->pipe =& $pipe; stream_set_blocking($this->pipe, 0); }
0
f8c1e464a114020616bdb95c47e9eae6
37f4c1dc0301ac8694a2f6a9f48b0a10
Set effective UID, meaning we don't have any permissions anymore
int setuid(int __uid);
1
68746e5fc59063887cd49be1ed390711
68590f51328b6639ec567a520096cde6
反转startIndex 和 endIndex之间的字符
public class StringUtil public static String reverse(String str, int start, int end) { return TextUtils.getReverse(str, start, end).toString(); }
1
5b6648e50e0e8b5d0e75315d34cb0247
77b89d5b0f33c64a16684b4b1e3904b3
获取新增的小区数据
class Zhizi: def get_all_comm_name(self): r = requests.get( 'http://exp.zhizishuku.com/110100/secondhouse/search/list.do?code=110100&name=&region=%E5%85%A8%E9%83%A8&regionType=%E5%85%A8%E5%B8%82&format=%E4%BD%8F%E5%AE%85%2C%E5%88%AB%E5%A2%85%2C%E5%85%AC%E5%AF%93&ageStart=&ageEnd=', heade...
1
a7ab50872a9e78d7bd887aa96bd901fe
fa7235ffc18ad8009df3c115cedaba25
modify:
def name_and_age(name, age): if age > 0 : return name + " is " + str(age) + " years old." else: return "Error: Invalid age"
0
11f3a17af7552a26b7fb65b517beab2a
14f7667dba2c3270f7b6bd8700d9bf93
Returns the minimum latency in nanoseconds of the frames in the retrieved capture buffer. Call packetGroupStats get before.
public class SampledCache extends BaseEmitterBean implements SampledCacheMBean, PropertyChangeListener public long getMinGetTimeNanos() { return sampledCacheDelegate.getMinGetTimeNanos(); }
0
d29adaac6238a39e3b9b9d0d69f366b1
c05456c827e678b65e7b9b5feb07cad7
根据token删除 refresh的Token
Task RemoveRefreshTokenAsync(string token);
1
2a9304a4bf338e1ca6bd2aaf71468d71
68265383811559578162640d954771a1
用隐式意图启动系统的安装程序
fun Context.install(apkPath: String) { startActivity(IntentUtils.getInstallIntent(apkPath)) }
1
ec6e3052fd4d1ae05b64fd0909765dd5
7bacd6764aaa180266b4601af2489b43
获取黄金礼金消耗
function OpenSerVeGiftData:GetBuyNeedGold() return self:GetTeHuiGitfTypeAndLevelCfg().money.count end
1
76cf70d14adcb01c205cbd856b915298
c44810ba03e01aa4910eb91063f00f84
返回关联规则字典
{ if ( this->dictNumber == dict ) { return this; } for(auto it = this->nestrules.begin() ; it != this->nestrules.end() ; ++it) { auto p = (*it)->findDict(dict); if (p) { return p; } } if ( this->combineRule != NULL ) { return this->combineRule->findDict(dict); } return NULL; }
1
2883acdc4154d1c373f0092b6902be5c
f27c394db8aa09b303d774a41ed8c570
Updates the recipe on the database and redirects to the recipe page.
def update_recipe(recipe_id, username): recipes.update_one( {'_id': ObjectId(recipe_id)}, {'$set': { 'name':request.form.get('name'), 'description':request.form.get('description'), 'prep_time': request.form.get('prep_time'), 'cooking_time': request.form.get('c...
1
68fb3d59378b1d714bd9ca8e98957b62
cb9efb4feaa4f30d0d9f1a836a958119
snippet-start:[python.example_code.organizations.DeletePolicy]
[Delete("/organizations/{organizationId}/policyObjects/{policyObjectId}")] Task DeleteOrganizationPolicyObjectAsync( string organizationId, string policyObjectId, CancellationToken cancellationToken = default);
0
4437052f61a1f60231b1037a008a1a98
f3444df675391e51611f671abc0177d0
Получение списка всех состояний конкретного пациента
class PatientStateController extends Controller public function show($id) { $patientStates = PatientState::where('patient_id', $id)->get(); return $patientStates; }
1
fc81afdde35f2b0932332b39dd783e37
08600cf74b7064cc6e82a5a2d6873f74
give some space
{ for (int i = 0; i < count; i++) { EditorGUILayout.Space(); } }
1
37ee28055dc5ece8bdbf5a0b5e94e3b9
6b47713fdb96ef70a82a11f5f87e8833
杀死怪兽,更新经验值
{ if (killedEnemy != null) { int expmod = 50; float diffulcityMod = killedEnemy.statAverige / statAverige; expGained = (int)(diffulcityMod * expmod); } exp += expGained; while (exp >= RequiredExperience()...
1
052a3a1405b7e372819cfcb20b98f6aa
c9d620dd1aac1fb2348ef93b465d543a
Convert preg_match_all result into a valid timestamp
class DIS_Common public static function strtotime( $str ) { if ( preg_match_all( '/([0-9]{1,2}.*)\.([0-9]{1,2}.*)\.([0-9]{4}.*) ([0-9]{1,2}.*):([0-9]{1,2}.*)/', $str, $m ) ) { return gmmktime( $m[4][0], $m[5][0], 0, $m[2][0], $m[1][0], $m[3][0] ); } else if ( preg_match_all( '/([0-9]{1,2}.*)\.(...
1
5a3ab8a96a85c7375bb3a1430aa0a97e
f8977a9e827f2a02fe211c8c3f1251f4
Metodo que agrega una arista al grafo con el peso de esta, siempre y cuando esta no forme parte ya del grafo.
public abstract class TraductorGrafo public abstract void agregarArco(int verticeInicial, int verticeFinal);
0
a737646a356c5ce4e5fbb62f9b46daad
ddc96673fc47deb19844914790ea64ee
Fail test.
class Yoast_SEO_Dependency_Test extends TestCase public function testFail() { $testee = new Yoast_ACF_Analysis_Dependency_Yoast_SEO(); $this->assertFalse( $testee->is_met() ); }
1
e910421ad5ca03c45632b9d55b601dbc
7a08e1edb49764a2afe0dc8d0c6f4a6e
显示设置登陆类型对话框
public void selectLoginType() { final String[] loginTypes = LoginTypeHelper.instance().getLoginTypes(); if (loginTypes == null || loginTypes.length == 0) { return; } AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setItems(loginTypes, new Dial...
1
ffa0bd80914d257a184af769b75f9706
b862bcbec732c0720526e90295f3dc97
申请向量存储空间
void ATM::AllocMemory() { vec__.create(_warp.nPix(),1,CV_64F); vecx__.create(_warp.nPix(),1,CV_64F); vecy__.create(_warp.nPix(),1,CV_64F); vecw__.create(_warp.nPix(),1,CV_64F); crop__.create(_warp.Height(),_warp.Width(),CV_8U); cropx__.create(_warp.Height(),_warp.Width(),CV_32F); cropy__.create(_warp.Heig...
1
068877a1c9d1c29b3494aa68d0d1d5c7
533d9a680b7d8c75e80945ca56055c69
Obtém o número de bytes a pesquisar.
public int getBytes() { return bytes; }
1
3a350aed51476cfc3e859d532abbeb03
c3aade2f41f4a410d9b05102a953fcb6
Returns the leaf key entry at the given position. Throws exception if there is no such key to be found or if the an exception is caugth from a lower level. Position of 0 corresponds to the first key in the leaf.
{ foundInLeaf = null; foundKey = null; bool lookInParent = false; if (this.IsLeaf) { lookInParent = (atIndex >= this.Capacity) || (this._childKeys[atIndex] == null); } else { lookInParent = (atIndex > this.Capacity) || (atIndex > 0 && this._childKeys[a...
0
dbfa28c6c973fb7ee7f03ede42579ed2
cc0b02c42c8560fb2c94eb918cb053af
Method to open the dialog to set the authorization limits
class SyncHTP1Dialog(QDialog, Ui_syncHtp1Dialog): def show_limits(self): self.__magnitude_model.show_limits()
0
531617af774eaf636fcc1ec8843f4be1
019e6829fa3f69e6298aee3848004d9b
Get the key for an interface.
function findIntf(intf, osIntfs) { var keys = Object.keys(osIntfs); for (var i = 0, len = keys.length; i < len; i++) { var key = keys[i]; if (intf === key) { return osIntfs[key]; } } return null; }
0
7d22bc78dc18f72c26a91577d1c95ee2
cc0d2bfbcee1728c7ba1d24bba47c653
Rebuild internal container dict by looking at existing containers => True/False :: True if the container list has changed as a result of this event
class AbstractContainer(IBufferSerializeAble, ABC): def update_shift_container(self):
0
ed4f4b7d47d6b54925d4bf1fd1a5b138
b30f4773e12948e5034ed0ef56f665a4
Gets the underlying cue definition of a cue.
VTTCue* WebVttCueEvent::getCueData() const { return mCueData; }
1
826aadb233d355323e3bbd9a543a2736
adb9e0462c13754f98c4b9625f80b328
读取XLS文件到DataTable中,支持Excel 2003或以上
namespace Manage.Core.Aspose public class AsposeExcelUtil public static DataTable ReadExcel(String fullFilename) { return ReadExcel(fullFilename, new LoadOptions(LoadFormat.Xlsx)); }
0
ddf3f32d5681b0d5275a9e5a53894b8c
677839bce4bb80bdaf0eeadecacfb8af
Check whether the two players have some relationship between them.
long small = user_a <= user_b ? user_a : user_b; long big = user_a > user_b ? user_a : user_b; Query<Relationship> query = ds.createQuery(Relationship.class).field(Relationship.fd_user_a).equal(small) .field(Relationship.fd_user_b).equal(big).field(Relationship.fd_contact_a).equal(true) .field...
1
40c367e38c7068b46044ad32053ede93
622d75aa0a69aff1e9e8768eb93aa75c
Checks a 'v' command.
try: args = args.split() res = 'NOT valid' if self.lex.isValid(args[0]): res = 'valid' print '%s is %s'%(args[0],res) except: print 'Incorrect number of arguments:\n\tv <word>'
1
d6eb23da4233a684bfde4ee30f9160a4
6a0844c9cff0f892422e996584524dca
Returns only a submenu (tree), if any, for the current parent.
return $this->getItems()->filter(function ($item){ return $item->getParent() ? false : true; }); }
0
10f488c089e3309edfbac8cf604ae8cb
e41ca3dfd303bcffe36d59db34849b00
Проверяет, что переданная дата - вчерашний день
{ return 1 == checkDate.Year && 1 == checkDate.Month && 1 == checkDate.Day; }
0
a88c1880594a3dfe5b62326713f90aec
413c40e4671f3ad967b6e0bc96be9cf4
When the status is reported (SEND or RECIEVE), this message is passed along with those method calls to the UI itself. this message is passed to the UI along with status updates on SEND/RECIEVE this may be null.
interface IRequestHelper interface Listener fun onStatusChange(report: IRequestStatusReport)
1
e07927d81f69bc250d1b91eb4dcc69c4
221f3163e1de391275d7898025a1fe7b
Given a directory, returns all the unique qc files (excluding the forward and the reverse prefix)
def find_fastq_pass(root_dir): fq_pass = tuple() for root, dirs, _ in os.walk(root_dir + '/', topdown=True): dirs[:] = [d for d in dirs if os_walk_condition(root_dir, os.path.join(root, d))] for d in fnmatch.filter(dirs, 'fastq_pass'): fq_pass += (os.path.join(root, d),) return fq_pass
0
fe65c6794a0d95066f17fcc90548abd5
3c211a7d7133befde43a00780cfe662b
Timer callback routine used to implement volume/frequency/pan sweep effects, for those drivers that can't do them directly.
void seq_timer_task(void) { signed char stemp; unsigned char temp, temp2; temp = (panel_get_pot(PANEL_PATTERN_POT) >> 3); if(pattern_type_override > temp) { temp = pattern_type_override; } if(temp != pattern_type) { pattern_type = temp; seq_set_pattern(); } temp = panel_get_switch(PANEL_TONALITY_SW); if(...
0
68778a1b5f187d3b45440cd9a4b3129b
86ef82b0933da651a5819c9c6aa38f7d
添加驾驶证信息
@Service public class DrivingLicenseServiceImpl implements IDrivingLicenseService @Override public int insertDrivingLicense(DrivingLicense drivingLicense) { drivingLicense.setCreateTime(DateUtils.getNowDate()); return drivingLicenseMapper.insertDrivingLicense(drivingLicense); }
1
a8740593b4cc92f753b950fb7dc2fbcb
0e5ae8a5e563e1d4ca53b4c2f471cf86
Moves the highlighter up in the text pane.
class TextMixin(ComponentMixin): def _up_line(self,ev): self._move_line(-1) return 1
1
6b1fbdc56caf79f72d758246ae60229f
a8489ca0634b7a17d890ce30f6381d4f
Clear <wait_for> value
class Emulation(TBase): def __rmReqWait(self, dest, req): try: if req.tick >= dest.tick: del dest.wait[req.pid] self.debug.error("__rmReqWait: %s %s, wait %s" % ( self.procStates[dest.pid][PS_CONT], dest.tick, dest.wait)) except KeyError: pass except AttributeError: self.debug.warn("__rmReqWa...
1
373cff58d02518ae6c0798915c74cdd9
a6878633c58db91b82e487360ca08520
Adds additional application specific details to the Exception Details.
public class AzureWorkloadErrorInfo public String additionalDetails() { return this.additionalDetails; }
0
ef55ce999146a41f7ce4cb66a1c96ffa
61343e19db9a375fff86e4bba84afe9a
Calculates the flying consumption.
public class ASADModel private double calculateConsumptionEffect() { return CConstant + taxes * taxMultiplier; }
0
49955e73161f7c144ca92452a206ed77
7c914192f312924a5d13ad36d19769ae
ギアIDとndarrayの辞書形式で各ギア画像のヒストグラムを取得する
result_dict = dict( (img_id, {}) for img_id in img_ids ) paths = batch_image_location(img_ids) for model_name in models.keys(): if USE_MP: img_sample = pool.starmap(preprocess_image, zip(paths, repeat(means.get(model_name)), repeat(model_name), repeat(False))) else: i...
0
c3fddb85c0e6a422226879079d28a2a1
7df0c011044b630a32c044e78407c072
Destructor for Simulator class
Simulator::~Simulator() { freeResources(); }
1
ce7097c7e1ef2e40a9edbd45ef1a9767
bce7c9f7fa2a99ae14e479eda7ee9bb9
向量与标量乘积
public class R3Vector public double scalar(R3Vector a) { return this.x*a.x+this.y*a.y+this.z*a.z; }
0
7da75b62edd58b8f123d2ecd8c805ce6
fb0464f1f43bd4f31309b4ac9da15045
Действия, выполняемые перед созданием новой записи в БД Для запрета создания записи метод должен вернуть false
class ItemsDataTableEditor extends DataTablesEditor public function creating(Model $model, array $data) { return $data; }
0
7746ec590584d37a64e8b15307a2dde4
a2bb962a8ca8fed49d887784c3bb0897
根据咨询师id查询咨询师信息
public List<ConsultantVO> getConsultantByGid(Integer gid);
0
13940d306b9a87178dd994d29d9df19e
7e973e2dddc811ea0d8b2fe79a89fd76
Set the head to the default position
class Data(): def set_snake_head(self): self.xdirection = 0 self.ydirection = 0
0
d9c42016fa58caa5dc3541083419b4c9
7fe4ee18d09adaaf011ef423be9dd135
返回是否可以成功编辑某个单元格。 以下情况下,不能编辑: * 整个表格不能进行编辑。 * 该单元格所在的列不能进行编辑。 * 表格没有处于 CellEditing 模式下。 * 当前未选择唯一行(单选状态下可编辑)。
{ if (!EndCellEdit(DataGridEditAction.Cancel, true, this.ContainsFocus , raiseEvents)) { return false; } if (editingUnit == DataGridEditingUnit.Row) { return EndRowEdit(DataGridEditAction.Cancel, true, raiseEvents); ...
0
5c92c923fb9300f6abcaf6b07aced44c
d7a2923643f8ac45f4dd48b65ed3d537
Sends the next game frame.
void nextFrame();
1
70bd8add78971773959271f493e67b77
8edf0fbf805b830fcf29a6e113d2d2f5
Validates the timezoned date/time is greater than or equal to the supplied timezoned date/time
namespace LernsituationOOP.Utils.Validation public class DateValidation : IValidationBase public DateValidation IsGreaterThan(DateTime DateTime) { Statements.Add(Input.Date < DateTime.Date); return this; }
0
0adeea06116b5646210b9b7c716d20f1
a56a0b2429b1c4b3717a6524d87d7356
Return cost (a number) of an action in the bridge problem. An action is an (a, b, arrow) tuple; a and b are times; arrow is a string.
class ASARProblem(Problem): def path_cost(self, c, state1, action, state2): return c + (action[-1])
1
7318b30dcd09e812a024ad0fd5098576
71bdc142030e73e8bbced1e1b669640b
Writes a number of zeroes to the output stream stream
namespace binify void Binify::Blank( int64_t count ) { while( count-- ) byteOut(0); }
1
49f5d2317d1b56bb5a51c6d1da8e3eba
a87bb75547d33a457db282d3b1db6d4b
显示和隐藏rename按钮
function setRenameBtn(treeId, treeNode) { return !treeNode.isParent; }
1
4ea8c3106d16a3043d72c8f2296ffe7e
9782364e93c7782e79ff51f5ced98c4f
Handle messages raised by MessageRaiser objects
namespace RazorEnhanced public class Filters internal static void ProcessMessage(Assistant.Mobile m) { if (m.Serial == World.Player.Serial) return; if (Engine.MainWindow.FlagsHighlightCheckBox.Checked) { if (m.Poisoned) Mobiles.Message(m.Serial, 10, "[Poisoned]", false); if (m.IsGhost...
0
c3b14e1c49e0a029682299099223bedd
934e3238fec0fb96671b016b35d7918c
获取关联数据字典ORG_TYPE的KV
public final class DicDataProvider public static Dic getOrgTypeDic2() { Dic dic = getOrgTypeDic1(); dic.setName("单位"); dic.setDescription("单位机构"); return dic; }
0
1565ae71f0f995f060cec8c2050b1387
75a1246649d2ed422caf789dd13b4361
Plot a 2d histogram of the reconstructed positions of air showers
df_diags = pd.read_csv(job.fn("diags.txt"), header=0, index_col=0, comment="#") all_hist = np.loadtxt( job.fn("all_hist.txt"), dtype=np.float64, comments="#", ndmin=2 ) hist_edges = np.loadtxt( job.fn("hist_edges.txt"), dtype=np.float64, comments="#", ndmin=1 ) z_0 = df_diags.loc...
1
73f0a60dd436e5aabc8e190de96f4c9e
f1954f27b72ce9d0fa631a008a2b33d8
Returns true if mouse point is close to bounds point.
{ const auto tolerance = 1.0; const auto actualWidth = ActualWidth(); const auto actualHeight = ActualHeight(); return point.X < tolerance || point.X > actualWidth - tolerance || point.Y < tolerance || point.Y > actualHeight - tolerance; }
0
f6636977293430ea2832be9bd2822d91
e9bfcb706255bbe9f19eb9e319c977d3
! @brief Initialize a KS adapter object. KsDevice Pointer to the KSDEVICE structure representing the AVStream device. Returns STATUS_SUCCESS if successful. Otherwise, returns an appropriate error code.
{ AssertPtrReturn(pCAStream, VERR_INVALID_POINTER); AssertPtrReturn(pThis, VERR_INVALID_POINTER); AssertPtrReturn(pDev, VERR_INVALID_POINTER); Assert(pCAStream->Unit.pDevice == NULL); AssertPtr(pDev->pvData); Assert(pDev->cbData == sizeof(COREAUDIODEVICEDATA)); #ifdef DEBUG PCOREAU...
0
f964383920f09528021b4cb2d77e16c1
10bba2f0213ceb76ee09cc6706bcce0b
根据batch id和可销售日期范围查询配额,如果指定了工作日,则在查询结果中过滤不在指定工作日内的配额
public List<PayAmtAllocateDto> findPayAmtAllocateByBatchNo(PayAmtAllocateDto queryParam);
0
a0b76f16e308325ec13845fab103a569
5a3ee03f383e0f8e63ffc7995a62db01
使用hql删除对象
void remove(String hql, Object[] params);
1
cb98a38e98b808e96c907ac0a78c3014
63077e2c76a20c94e015f8985b0d51fb
Phase 1: Convert the encryption algorithm name to key size
{ LTC_ARGCHK(keysize != NULL); if (*keysize < 5) { return CRYPT_INVALID_KEYSIZE; } else if (*keysize > 16) { *keysize = 16; } return CRYPT_OK; }
0
e37d649cda3c043e9135ba91936bf9ef
88cf2defe2440ab048f5f410af9ee1e9
Test that a simple policy with checks on non-relationship attributes is correct.
def test_risky_behaviour_attributes(simple_model_risky_behaviour: simple_model_risky_behaviour): assert simple_model_risky_behaviour.network.node(1).propensity_risky_behaviour_lfa_testing
0
bebc31d9c6883687eced6a6c783bfe71
c5e21372a38f7485b1aa899bb312f655
设置指定用户的角色 先清空指定用户所有角色,后分配新角色
@Component public class UserService @Transactional public void userAssignRole(Integer userId, List<Integer> roleIds) { userRoleRepository.deleteByUserId(userId); UserEntity u = userRepository.findOne(userId); if(u == null) { throw new ServiceException("100003"); } for(Integer roleId : roleIds) { ...
1
d1f4eeb880575de485b2dadeba32d115
afc13a0d13c89a302b699b32599df227
Método para abortar uma ação que foi agendada.
{ if (currentAction != null) currentAction.Cancel(); currentAction = null; currentActionPriority = 0; currentActionType = ActionType.None; onFinishAction?.Invoke(); }
1
53732f665474a418672940bb708a956e
e66ebfa5e65a6dcc477e9b70171b3cc0
получить идентификатор текущего вопроса
class Signale public function getIdQuestion() { return $this->id_question; }
1
3de7c4c9434d6eff5912b45479c57497
4e77ff10f39e3d747699b7af2d31c10c
@brief TIM2中断函数 定时器TIM2的中断函数内完成多按键检测逻辑
void TIM2_IRQHandler(void) { if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET) { TIM_ClearITPendingBit(TIM2, TIM_IT_Update); keyHandle((keysTypedef_t *)&keys); } }
1
a1a3f702aebc3e78fd6e39cf1ab44a3e
83e9f85aa3baf2a8565848db8c19e675
Restituisce la lista degli utenti loggati
ArrayList<BeanUtente> listaUtenti = new ArrayList<BeanUtente>(); Connection conn = null; PreparedStatement ps = null; try { conn = ConnectionPool.getConnection(); ps = conn.prepareStatement("SELECT * FROM Utente"); ResultSet res = ps.executeQuery(); while(res.next()){ Integer idUtente = res.getI...
0
c4f870cd7939e9cd346049e2e62e6d39
67e23be6de641ec715d3bf3cbbb15706
<pre> Claim an existing, open purchase ticket. </pre>
Claim createClaim();
0
cac495ec78f4d2a766b566a90d3cbf36
2bd4703f237762a2cbca6744942d06c2
Whether reordering TreeViewItems is allowed.
class IFolder(Interface): def is_reorderable():
1
bc24da89388b782cf40a76832c5c3ac7
742e16c02da25ec6cefd4e7969366732
赋值%=
class Recursion(object): def assignment_statement(self): if (self.token_to_word() == '='): self.get_next_token() self.operation_expression() self.GEQ2Assignment("=") if (self.token_to_word() == ';'): self.get_next_token() return ...
0
66e12085a4b55967330b1816c716de74
14e456f45ab8a3324d43d5bec294df47
根据服务名称选择出对应服务地址列表
String selectServiceAddress(List<String> serviceAddress);
0
c42c33a36cf1eff056ec653c5a2d767f
26927a1dab8fc0ee1ef514bda7ed60ec
Gets the angular speed to orbit with so that the fleets speed is the same as linear
if (targetPosition != null && targetPosition != position && !((Vector3.Distance(targetPosition,position) < 10) && angularThrustEfficiency < .95)&& !((Vector3.Distance(targetPosition,position) < 20) && angularThrustEfficiency < .85)&& !((Vector3.Distance(targetPosition,position) < 30) && angularThrustEfficiency < .75)...
0
219c8b4138e27fdb2e41048e469b97c7
c8d5c6609eb6a5a5b09424b251b43c67
カード会員情報変更サービス。
ActionMapping map, Wml240Form form, HttpServletRequest req, HttpServletResponse res, Connection con) throws SQLException { saveToken(req); return __setKakuninDsp(map, form, req, con); }
0
676750caaf064f8e1cb91d15101a88d6
3d0ce138bd4a9ced1faa0201aa0ba121
下单的商品是否支持优惠券抵扣
class SystemBaseService public static function IsGoodsDiscount($params = [], $plugins = '') { $status = 1; if(MyC('is_close_goods_discount_overlap', 0) == 1 && !empty($params) && !empty($params['hook_name'])) { switch($params['hook_name']) { case 'plug...
0
04c259a8b9486e840761b8964953f5cf
df90fa3e557b615d98717d1e9d477cf0
Returns the XPath for the attribute
namespace DITechniques.Constructor.Accessors class ProductAccessor : IProductAccessor public string GetXPath(string productCode) { return @"//*[@id='actualPriceValue']"; }
1