query_id
string
corpus_id
string
query
string
code
string
label
int64
d93441301476d7220aeaac561b6c93cf
4b8b0b3e14597d107f2d095169901e17
Pause execution for 2 seconds
class JobSchedulingTestCase(uTestCase): def test_2_wait(self): start_daemon() psleep(120)
0
32d6b75f29cb711b9ebcfa4f7cac2510
c25ce1a62de772a51b21d92bb3f986e2
计算cache的操作时延
{ T0_Count++; if(T0_Count >= 624) { T0_Count = 0; modTemp = bisecondCount % CACHE_SPACE; if(cache_ttl[modTemp] != 0) { if(cache_ttl[modTemp] >= 100)cache_ttl[modTemp] = cache_ttl[modTemp] - 100; else cache_ttl[modTemp] = 0; } ++bisecondCount; if (bisecondCount >= CACHE_SPACE)bisecondCount = 0; ++o...
0
fdedf3bea1f98292d512bc5e3acd66af
dac595dfd05cc94f0e4081125d0aa7e3
Computes the X position of another object
function PlotWidget_ObjPosX(obj) { var pix_x = 0; if (obj.offsetParent) { do { pix_x += obj.offsetLeft; } while (obj = obj.offsetParent); } else if (obj.x) { pix_x += obj.x; } return pix_x; }
1
1b919da7aa0b3f9ba68c13c4b117714c
5ad5807109c80a5bb3caf7b3d5de585e
Gets all calls in database for the given range
class AllCallsRepository(application: Application) fun getCallsEntities( localCallback: LocalCallback<List<AllCallsEntity>>, callType: String ) { GlobalScope.launch { val entities = if ("0" == callType) allCallsDao?.findAllCallsEntities() else allCallsDao?.findCal...
0
f32c7ec75587c4e5e3d0201a10036c72
c0da64c2340d7f51299124395845cbba
compute and return drawing coordinates from "pure" coordinates (-1.0-1.0)
var px = parseInt( x * this.HEIGHT/2 + this.WIDTH/2); var py = parseInt(-y * this.HEIGHT/2 + this.HEIGHT/2); return [px, py]; }
1
298eb932a51d9f622639431130c394d7
a0688883c03ac938d198ab792c1e8867
Удаляет роль из базы даных по названию.
namespace ScrumProj.Controllers public class RoleController : Controller public ActionResult DeleteRole(string RoleName) { var thisRole = ctx.Roles.Where(r => r.Name.Equals(RoleName, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault(); ctx.Roles.Remove(thisRole); ...
1
f712e2c2760ea4eb34a3388f92bd21dc
4c96ea1c26290f536c6104f05ce70c5b
Helper method to play emergency message
void declareEmergency();
0
5c549073bbaca536f5f0c6414b283306
0fd7e9917dc3fabbd1370f3b4285db4b
обработка ответа с сервера информации о слове
var meaning = document.getElementById("meaning"); if(this.status == 200){ meaning.innerHTML = this.responseText; }else{ document.getElementById("errors").innerHTML = this.responseText; } document.getElementById("loadingmeaning").style.display = "none"; document.getElementById("resultsarea").style.disp...
1
b88d15e651e4dddaea02a830ef3212a6
02eb11d2f572befbcf43bd042018e594
Read the helpers directory to make a helpers array
class CollectionsServiceProvider extends ServiceProvider private function setHelpers() { require __DIR__.'/helpers.php'; }
0
c12d14a1aa641c450af850c7b7002bc7
445dfffc826ce38763c1b5f2e10d5e49
object accessor for the {@code Name} <p>The {@code Name} field is a direct mapping of the {@code name} field in {@code card}.</p>
public class ConscriptCard public String getName() { return name; }
1
4eaff3f77c8d961b7dfe9b9e4ae8893c
372958275683e1456e5dc57a98164699
function to get SFX volume in sound options
{ _data.options.sfxVolume = target; if (_data.options.sfxVolume > 1f) _data.options.sfxVolume = 1f; else if (_data.options.sfxVolume < 0f) _data.options.sfxVolume = 0f; }
0
9153ecf6bf6f2fdd82fc621585b6a781
32d0ad1a93e65369548b0251f6538a5a
Returns a new ChildBackupSitesQuery object.
protected function newPositionQuery(): Builder { return $this->newQuery(); }
0
fda80d0c815af2def413a933cb1dad7d
ebfa87454be793589d9e6793ec8e7723
由Npc的角色ID计算出NPC的数据表Id
{ int iVirtualID; if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID)) return Py_BuildException(); CInstanceBase * pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID); if (!pInstance) return Py_BuildValue("i", -1); const CPythonNonPlayer::TMobTable * pMobTable = CPythonNonPlayer::Instance()....
1
e54a0fb00183975aac57b8f33bf52f1c
382984bbc047c2e2e044538d0f76ab85
Returns nutation corrections for ecliptical coordinates.
std::array<double,2> nutation(double t, int zq) { std::array<double,2> nutation; double t2 = t * t, t3 = t2 * t, t4 = t3 * t; double l = 485868.249036 + 1717915923.2178 * t + 31.8792 * t2 + 0.051635 * t3 - 0.00024470 * t4; double l1 = 1287104.79305 + 129596581.0481 * t - 0.5532 * t2 + 0.000136 * t3 - 0.00001149 * ...
1
78a3cf269d947b7d49ce35ace73f9c44
b98285705e56d2e1fa395ee4a9784b1c
打开首页导航条中的全国天气---15日天气
self.driver.find_element_by_android_uiautomator('new UiSelector().resourceId("com.xueqiu.android:id/title_text").text("热门")').click() self.driver.find_element_by_android_uiautomator('new UiScrollable(new UiSelector().' 'scrollable(true).instance(0)...
0
a5a9566bafdbe9a3e5ed1c3691ec2f39
0419a6ab3631d8ba9fc2bcc50bd432f1
getIranianDate: Returns a string version of Iranian date @return String
{ DateTime date = new DateTime(yy, mm, dd); System.Globalization.PersianCalendar pdate = new System.Globalization.PersianCalendar(); int py = Convert.ToInt32(pdate.GetYear(date)); int pm = Convert.ToInt32(pdate.GetMonth(date)); int pd = Convert.ToInt32...
1
5d406c50b7eeeac45b8180a1b6089d23
5dfc5ff48a3e1ebb97da9efcfa9ec8e4
获取右边表格列表
class ConfigDevice2 extends PureComponent{ RightTableList(){ var ReginId=sessionStorage.getItem('ReginId'); var data={}; console.log(ReginId); if(!ReginId||ReginId===""){ data={ category_id:sessionStorage.getItem('TwoId') } }else{ ...
1
0f4ad981a4524dd4075f8088b1714831
70bf7cd1426f9b06da45c743748b3f54
Saving Audio Manager between scenes.
public class BGMManager : MonoBehaviour void Awake () { if(instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } audioSource = gameObject.GetComponent<AudioSource>(); SceneManager....
1
d5adcd3fa36d239a463f80c13cd90bb3
aacf6ca58e61c608bce78ee588518838
拼接房源标题
class Publish extends Indexinit public function autoTitle($area1,$area2,$status,$num,$craftid){ $where = $title = ''; if($area1){ $where = " area_id = '$area1' "; if($area2){ $where .= " or area_id = '$area2' "; if($area3){ $where .= " or area_id = '$area3' "; } } $list=$this->selectRow...
1
b42903827dae5e6e0a836a78f3291d14
9e29d215c076e137819f1f3289184014
Sets Message Length
class DNSMessage extends FrameComponent public function setLength(int $length): void { if ($length < 0 || $length > USHORT_MAXVALUE) { throw new Exception("Invalid value for DNS length: " . $length); } $this->length = $length; }
1
83774dd0626826e34f989c7b7ff651f4
182b0168fd328e99d5cd4bda8a1e88b7
convert django context object to a normal python dict for ease of use / interop with the custom template library's renderer.
class ContextJsonView(UserCacheMixin, JsonView): def get_context_data(self, **kwargs): serializer = class_from_string(settings.JS_CONTEXT_PROCESSOR) return serializer(self.request).as_dict()
1
e6432089c15bac47b17bbb37ebcf3eb6
afecd74aab47e24a597edf30d67d4f4d
rotate matrix 90 clockwise in-place
print(len(org_mat)) org_mat = [[org_mat[j][i] for j in range(len(org_mat))] for i in range(len(org_mat[0]))] i = 0 print(org_mat) while(i < len(org_mat)): c = 0 j = len(org_mat)-1 while(c<=j): org_mat[i][c] , org_mat[i][j] = org_mat[i][j] , org_mat[i][c] c += 1 ...
0
3e0c6bfc580e8b348bb1008198d00ac9
ea1a72403c45a4f9b1790489d88ffe3f
\brief This function deinitializes the VerdictThread
TmEcode ReceiveWinDivertThreadDeinit(ThreadVars *tv, void *data) { SCEnter(); WinDivertThreadVars *wd_tv = (WinDivertThreadVars *)data; SCReturnCT(WinDivertCloseHelper(wd_tv), "TmEcode"); }
0
76a48450c1fd6e8144a7496017f40b40
f493515bed4bb22e8e36cb10522b0b47
Invalid expression - Syntax Error
def testSyntaxCheck5(): compileString(""" program p; begin writeln() """)
1
7091be29d4c193c913dfed526211d2d8
2c43f90c53bdcd4b9941a57b211bb186
Set the minimum height for pixels to eb considered trees in dominance search
public class PlugInDialogCenterDistance2 extends JDialogScriptableBase implements AlgorithmInterface public void setRedMin(int redMin) { this.redMin = redMin; }
0
f444ac45ee26caa4480351522e13462d
8ebaab7a59d5430089e7747e6bbf9e21
利用 n 个数字都在0~n-1范围 目标是遍历的过程中交换,使得每个数字m在m位上 若m位已经有一个数字m了,则当前的m为一个重复数字 66.71%
if numbers is None or len(numbers) <= 1: return False for i in range(len(numbers)): if numbers[i] < 0 or numbers[i] > len(numbers) - 1: return False for i in range(len(numbers)): while numbers[i] != i: if numbers[i] == numbers[numbers[i]]: dupl...
1
e74cc75f290976148f4044885b12b155
5df40d8dfbecd738de2f0de8a229874e
Validate IP Voice Sites.
{ $isProxy = IpAddress::find($request->ip())->proxy; if ($isProxy) { $messageBag = new MessageBag(); $messageBag->add('ip_address', __('VPS, VPN or Proxy detected! Please disable any type of service that may mask your IP to proceed.')); return back()->withErrors($...
0
ad8fa4a9fb9aa77fdb723cbb1ceb78e3
04e3ac62b6fb2a6639c3d800219f0f96
OneString try to return the first element, otherwise return zero value.
{ return ( value ? ONE_STRING : ZERO_STRING ); }
0
e1eb8c72f3ebcb5b221a7221c5d40e60
d7844e7a4689ab13cb372b2a47016b34
We don't want some files of eclipse in the zip
if (fileName.charAt(0) == '.' || fileName.charAt(fileName.length()-1) == '~') { return false; } return "aidl".equalsIgnoreCase(extension) == false && "rs".equalsIgnoreCase(extension) == false && "rsh".equalsIgnoreCase(extension) == false && ...
1
34f4d219373225a1759c24affc88e739
df508fe57c93d9857116fb21e82e4538
填充参赛者分类下拉列表
obj.ajax('/project/applicantTypes',{'activityId':activityId},function(data){ console.log(data); var html = ''; if(!data.dataList || data.dataList.length == 0){ $('#applicantTypes').parent().hide(); return; } for(var i=0;i<data.dataList.length;i++){ ...
1
7e12a889649263f86912745fa61856fc
be959a64fda8a590bb3c373784aedc5c
Hlavna metoda hry. Cyklicky opakuje kroky hry, kym hrac hru neukonci.
class Clovek(): def igraj(self): pass
0
b23d2d0231485f489ea89ab5bb976bf7
e1ff5dc7f03fac719ed307e3cc6ffbcf
Returns the value of the '<em><b>List Property</b></em>' containment reference. <!-- begin-user-doc --> <p> If the meaning of the '<em>List Property</em>' containment reference isn't clear, there really should be more of a description here... </p> <!-- end-user-doc --> extendedMetaData="kind='element' name='list-proper...
ListPropertyType getListProperty();
1
2f7cac4ed44e246eba301d6e270ec97d
3766a9b021e2e4ff5d2b1f33681775ef
This is intended to send an auth completed message to the system so that it knows there was a successful login
function callAuthStuff(message, token) { return API.post(config.apiGateway.API_NAME, "/doauthstuff ", { body: { 'message': message }, headers: { 'Content-Type' : 'application/json', 'Authorization': token.replace(/"/g,"") } }); }
1
b8d82ed0035bc99a8bac12e85da0fe4b
4d9f578257bcd10858f9f73c97c195e6
Method tests the POST endpoint user validation
def test_post_user(client): payload = json.dumps({ 'username': 'A Test', 'email': 'a.test@example.com' }) response = client.post( '/user', data=payload, content_type='application/json' ) body = json.loads(response.data.decode()) assert response.status == '201 Created' ...
1
f6935cb631d3ed851e1c8992d3b4709d
41ca43f19f7fae97bbd428e2e6558523
Set a handler to print to file.
def set_log_file(log_file_handle): global log_file log_file = log_file_handle from spark.lang.builtin import set_print_log_file set_print_log_file(log_file)
1
5b0cb218bf4ad46d858c2123b9079705
084df93f6db091046b74186c2f0ab19a
Testa a inicialização com um caixa negativo
class BilleteraElectronicaTest(unittest.TestCase): #Clase main para las pruebas de inicializacion def testPinNegativo(self): b1 = BilleteraElectronica("000","Carlos","Perez",24088217,"-1") assert b1 == None
1
9ff625bdd1050f98298e3bad5b28fd42
c6c4231c62ccda18cdfb7a74b752957d
after we create the objects, some cache may invalid because the relation are cached on both side. So, we updateCache if it is marked to be update from the markCreate state
if self.__deleting: self.deleted() if not self.__legacy__: self.store.objectCache.uncache(self.storeID, self) self.__store = None self.__justCreated = False
0
595b7b0a9aaf82e4cdbe3a9ff42501f5
84208f7590879f9060e03dc6be4844ba
melange la collection de cartes et affecte les tags des boutons restant avec le numero de la carte
ArrayList<Cartes> repas = new ArrayList<Cartes>(); ArrayList<Cartes> souvenirs = new ArrayList<Cartes>(); ArrayList<Cartes> rencontres = new ArrayList<Cartes>(); ArrayList<Cartes> sources = new ArrayList<Cartes>(); ArrayList<Cartes> acomplissements = new ArrayList<Cartes>(); ...
0
1d1ec5e33b1c913499bd41ddae58853f
4be2e96be4165673b505935c0b2f3fad
Function for extracting the name from resume
class ResumeParser: def getName(self, input_string): doc = self.nlp(input_string) for ent in doc.ents: if ent.label_ == "PERSON": return str(ent).strip()
1
b1bdd1a2a53f7cceb33db35a09e2b268
6b774cc0a12d5987bd15fbd281ab4d48
Gets inwDemand's information based on primary key. An ObjectRetrievalFailureException Runtime Exception is thrown if nothing is found.
public void removeInwDemandsort(final String id);
0
0efbe45fff61ecc368a674b11b1de4fb
2bf861cbd945f4270430dcc669749c83
Imshow for Tensor.
from torchvision.transforms import ToPILImage topil = ToPILImage() im = topil(tensor_im) im.show()
0
3c283f43b2a0d3a102ae65e8f7d83eb2
730d5e90c1fe1f3753eb7906c73ce08c
返回是否可以发起报账的标志
namespace XY.AfterCheckEngine.IService bool GetFlag();
1
00c8f2e29ae3c139d3236f5de78511ae
1ae6226c8a009f90aca9005c759af5cf
[Provider] for the absolute path of the Node binary that the Kotlin plugin (JS or Multiplatform) installs into the root project. The current operating system is taken into account.
interface CredentialsPathProvider fun getPluginPath(runner: BuildRunnerContext): String? = null
0
36d52b19313585e4ef2ef238c13e4b43
1523def758bdcf175ae0c450dd350f7e
Define piecewise-linear relationship (start_codes, offsets, slopes) between output and temperature for SOC/PMGR sensors
{ rPMGR_THERMAL0_PIECE0 = PMGR_THERMAL0_PIECE0(0x000, 0x1e5, 0x03b); rPMGR_THERMAL0_PIECE1 = PMGR_THERMAL0_PIECE1(0x140, 0x1f4, 0x02f); rPMGR_THERMAL0_PIECE2 = PMGR_THERMAL0_PIECE2(0x257, 0x009, 0x026); rPMGR_THERMAL1_PIECE0 = PMGR_THERMAL1_PIECE0(0x000, 0x1e5, 0x03b); rPMGR_THERMAL1_PIECE1 = PMGR_THERMAL1_PIECE1(...
1
24c8d47604131234bcff0d6a18ab7a25
4cb194cf535188cda022e8950ae2e828
Perform a deletion and output success or failure messages
abstract class Legroup_AbstractDeleteAction extends Legroup_AbstractEditAction protected function _doExecute() { if($this->mObjectHandler->delete($this->mObject)) { return LEGROUP_FRAME_VIEW_SUCCESS; } return LEGROUP_FRAME_VIEW_ERROR; }
1
d7fc6d3d8d03c650420f89f2a58b4ade
60b7bc4901dcfa0cc606db2f4c7e1182
解码NodeId
debugMsg(GENERAL, "encodeNodeId():\n"); uint32 value = 0; value |= hwaddr[2] << 24; value |= hwaddr[3] << 16; value |= hwaddr[4] << 8; value |= hwaddr[5]; return value; }
0
393fff2f183ca240fc51626cb44f8475
cb6b8c619889397c371f64ba5e79b1fb
Run customer resync
{ $ids = null; if($ids = $input->getOption('account')){ $key = 'account_id'; }elseif($ids = $input->getOption('customer')){ $key = 'customer_id'; } if($ids) { $ids = explode(',', $ids); $gm_client = $this->getContainer()->get('g...
1
c0753a95dbec4a53660dabc0c71a5696
11815e6797e0a1463c877eafb5fcd3b7
Save Eurotax Forecast Output to DB
async function save3EFdetails(docObj3ef, fullItemList, fp, taxperiod, gstindb, isImportJson) { logger.log("info","Entering anx13efDao.save3EFdetails : %s :: %s", new Date().getTime(), new Date().toString()); await db.saveRow(anx1Queries.table3ef.save, [ docObj3ef.docref, docObj3ef.ctin, docObj3ef.legaltradena...
0
699e8d8e90ce0436fd41ec002d71b11b
bac175ddd40f42752901b7dd35902554
ページフレームDBのエントリを初期化する
Frame::Frame(Page * pg, DB* use_db) { m_curPid = INVALID_PAGE; m_data = pg; m_pinCount = 0; m_dirty = FALSE; EXDB_DB = use_db; m_nInvalidFrames++; }
1
c5496be875af8e5a79699e94eadbc636
c4f9ba158010dc36ad210f62154264b4
Resize root panel.
function Resize() local topPanelSizeY:number = 10; x,y = UIManager:GetScreenSizeVal(); Controls.Main:SetSizeY( y - topPanelSizeY ); Controls.Main:SetOffsetY( topPanelSizeY * 0.5 ); end
1
460ef66dd6c749c98120a03a41a78412
9a6e5c40916e51b88d0ccb318224c433
Modifies the specified view's (search layout) to add extra margin, hide/show back button, and change [SearchView] padding, based on the supplied variables pane mode or not
public class NewTabPage implements NativePage, InvalidationAwareThumbnailProvider, TemplateUrlServiceObserver, BrowserControlsStateProvider.Observer, FeedSurfaceDelegate, VoiceRecognitionHandler.Observer private voi...
0
51a5eddb964e5d4ceb2725763c0a1201
29b3752ab359bdc8b871186c59b4e169
从元数据中获取协议号对应的请求类名
if(!protocolMap.containsKey(clz)) { LogUtil.error(clz.getSimpleName() + " not register"); throw new RuntimeException(clz.getSimpleName() + " not register"); } return protocolMap.get(clz); }
0
8e40c334373b6d276f433352b6c1845f
2efa4f4462833e146c5f45fb214b5be2
интерполяция полиномом Ньютона
public class Polynom public double invoke(double x){ double p = 0; double mon = 1; for (double v : coef) { p += mon * v; mon *= x; } return p; }
0
b144b4b00af91380e85f01b041782a61
72f68ef537f1f443f80529cc4cb21c9c
Test case for timestampUpdateTsa This call updates a given timestamp account.
class TimestampApiTest extends \PHPUnit_Framework_TestCase public function testTimestampGetTsaList() { }
0
0e02112a4f7fa7e4ba4bbf499d392240
9fb5783a554873aa2ed9e54830fb17ab
this function handles all inserts into Fields and Tags.
{ $insert_fields = array('object_id'=>$object['id'], 'lang'=>Core::$_lang); if (is_array($fields)) { foreach($class['fields'] as $field) { if (isset($fields[$field['name']]) || isset($fields[$field['id']])) { if (isset($fields[$field['name']])) $value = $fields[$field['name']]; else $valu...
1
91aee72c50ffa4f9c837b259ff394477
213620bd03ab95eb0b52499555eaa9fc
Refresh Group Policies
{ if($this->post->module == false or $this->post->actions == false or $this->post->groups == false) return false; foreach($this->post->actions as $action) { foreach($this->post->groups as $group) { $data = new stdclass(); $data-...
1
e249a414c3a43c104e962db7edd181bb
ba7e9bc26ca318a8696196912e9f3df5
This function checks the permissions on the passed in file to see if the user has read and write permission. If the file is not found, can_read is FALSE, and the write permission of the directory is checked. If the directory is not found, can_write is FALSE. Due to policy, the user is only allowed to write in a dire...
int assertCanWriteDir #ifdef __STDC__ (char *dir) #else (dir) char *dir; #endif { struct stat buf; int mode; char * test_file = concat(dir,"/write_test"); FILE * fd; mode = stat(dir, &buf); if (mode == 0 && S_ISDIR(buf.st_mode)) { if (NULL == (fd = fopen(test_file,"w"))) { return(0); ...
0
4129b940fd6155abf340f16ce99c0e27
771dcb15f6446c883099c5c6a8c4178c
Returns the wake free ratio per wind turbine of the last layout evaluated, ordered as in the layout vector provided in the evaluation method. A layout must have been evaluated before this method is called.
public abstract class WindFarmLayoutEvaluator public static int getNumberOfEvaluation() { return nEvals; }
0
42429d143dea5a67ff214d824fcfb6c9
0258ca49eff894b284438d8ab7fcb577
arithmetic right shift
WSLUA_METHOD UInt64_arshift(lua_State* L) { #define WSLUA_ARG_UInt64_arshift_NUMBITS 2 guint64 b = getUInt64(L,1); guint32 n = wslua_checkguint32(L,WSLUA_ARG_UInt64_arshift_NUMBITS); pushUInt64(L,(b >> n)); WSLUA_RETURN(1); }
1
b26249626fdaa5e520d3aca6eaf29edd
151e74f590f9208bb7b12b3729526c95
Convert relative paths to absolute paths.
def makeRelativePathsAbsolute(cmdargs): for i in range(len(cmdargs)): if relativePathRE.match(cmdargs[i]): cmdargs[i]=os.path.abspath(cmdargs[i])
1
20f8890c5d3d85c3485df8f2e3b5e47d
0fff53d4dbf8bce34c37c1e81471b882
Sets whether or not to use a scalar delta.
class Time disableFixedDelta() { this._useFixedDelta = false; return this; }
1
81a77265b1741ca0738e9442b62a556a
6fb994ce36165e47243eb8b955bca3ff
Reset the legend display status to hidden.
class BasePlot(PlotWidget, PyDMPrimitiveWidget): def resetShowLegend(self) -> None: self.setShowLegend(False)
1
c0b74ff8187af716c034d1be8f83ecf5
76e3b1f0e554084b211d0cb97c8cc9e3
Caso tenha titulo atualizado, retorna esse, senão retorna o original e único.
if (this.itemEdited != null) { return this.itemEdited; } return this.itemOriginal; }
1
807344c7ebdeb286d7dddab5e64154c9
d85754a7bab4df810afe29ffcce166bc
Return markup section; computing the first time.
void ReportSummary::TimeSection() { m_vstrSummary.push_back( "" ); StartTime(); StopTime(); TimeUsed(); }
0
0f5f70ff7f31a37476c112de60b53c6a
2efbe81025d5c64fe9f8f75ce65ffa93
设置字段pwd 密码的值.
@Table(name = "sys_user") public class SysUserEntity implements Serializable public void setLoginPwd(String loginPwd) { this.loginPwd = loginPwd; }
0
9547daf901e1cc800a107880086b7f1b
6518ddafe016604986d34e0b2d4c04db
Use token to create headers to download a report from VRB
class CustomReport(object): def startReportJob(self, reportId, reportURL, token): url = reportURL + reportId print('startReportJob() - url: ' + url); body = { 'fileType': 'CSV', 'includeHeaders': 'true', 'appendDate': 'true', 'delet...
0
ce87097cd8e997818acae83b492fcf11
4dbb5684221482d91b0ab1b9757bdac9
Contains the definitions of an optional additional transformation from the gradient coordinate system onto the target coordinate system
class BasicTransform: def add_targets(self, additional_targets): self._additional_targets = additional_targets
0
d4ed32c1f9f3edfbad399fda1f8f28b3
add7ae9641c87b08fe9c0526376a2121
统计整个文本中所有字母的个数
def get_letters(TEXT): count = 0 for c in TEXT: if c.isalpha(): count += 1 return count
1
450dd54ff8883d5d87cc2739c76b0122
6df3f79062909ca85a5f9da168d43da5
Gets the network speed. JavaScript.
namespace K.system public class SystemNetTool public static string GetSpeed(AddressFamily addressFamily = AddressFamily.InterNetwork) { var adapter = GetActiveAdapter(addressFamily); if (adapter == null) return null; return adapter.Speed.ToString(); }
0
bd1faf068983099ab8655fa35ab3da99
37a660f7783c4e1cf0fd1eaa425cdcb5
渲染前需要先把之前的图表结构清除
export class RenderNode public cleanBeforeRender(): void { this.drawData.length = 0; this.renderCount = 0; }
1
8e69a4276bb9ecb4d9128c81782ca70c
fb8df22c61a56b42dc016f8bd8c27d2f
Given the index of a voxel into the master grid, return its voxel indices
class LatticeObject(object): def get_3d_indicies(self, i): return i%self.S[1], i%self.S[2]//self.S[1], i%self.S[3]//self.S[2]
1
8f021eb44de02f0307def32b700392e1
7d9421aac4838c2efe9a72b805c7ca8c
Opens the login records window. No args taken. Usage:
class AlphaStartMode(AlphaMode): def login_window(self): self.client_states.mode = client_util.client_states_modes.alpha_login.AlphaLoginMode(self.current_size, self.client_states)
0
8799e1978967cb0587afc4ee98230dfa
7287f5a0863a7a44d44b222201197160
Set uploaded file origin name
class Upload extends \yii\base\Model public function getOriginName() { if ($this->isMultiple()) { return $this->_originName; } else { return current($this->_originName); } }
0
44f21efa0f8f6f8be5e4e0fc144f47fc
ddb007733cd4d3ed171fd4bfc17d7470
Check if the report has only one Group specified on query.
if self.__class__.query_id == '-1': return report_search_criteria = { 'queryId': self.__class__.query_id } self.assert_(isinstance(self.__class__.service.GetReportsByCriteria( report_search_criteria), tuple))
0
f2d0b29d29c679c58f907852cb76a96d
75ef285bcafd779ec98a5a09cef0854e
音源分離の結果を送信する
self.separate_flag = False self.sep_thread.result() self.sep_thread = None self.osc_thread.result() self.osc_thread = None self.ac.clear_buffer() self.ac.stop_stream()
0
146a4c2595713a5f62be19c7639e989a
eef8ac5bbbb0ef0f5208e07dcd3c4b51
向上移动字体,同时渐隐
namespace LearnChinese public class UIController : Singleton<UIController> void AnimateResult () { StartCoroutine (TweenFadingText (txtTapOver)); txtTitleOver.GetComponent<RectTransform> () .DOBlendableLocalMoveBy (Vector3.up * upDownDistance, upDownTime) .SetLoops (-1, LoopType.Yoyo) ...
1
86e36b66a0111c3cecaf4026410de43e
1559adcacf3e3bd8ce34b8b69d2e21f4
called when data search history is selected
const packageId = event.option.value; this.queryField.setValue(''); event.option.deselect(); if (this.packageInteractionService.searchType === SearchType.NuGetPackage) { await this.getNuGetPackageHistory(packageId, this.packageInteractionService.searchPeriod); } }
1
0a9060f5559b9cc2d06824ccf826bc58
af6f18c6cf317b9618551bc4482340bc
Convert factory that returns a list of field convert functions according to convert arguments string.
string = string.strip() if string: return [convert_fn(piece) for piece in string.split(':')] else: return []
1
e8106c5620f821e32ccef4f2a65f8fa6
2955491fb4830a8fa67d9850bb7153d3
This API is used to list all APIs that can use this plugin, no matter whether the API is bound with the plugin.
{ JsonResponseModel<DescribeAllPluginApisResponse> rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeAllPluginApis"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeAllPluginApisResponse>>(strResp); ...
1
22b4a33bc8b315904564d3e35f0362fd
586c3c867291f7883eec875d38aee19d
Creates a generator around a voting root key pair.
val sk = param.Zr.newRandomElement() val pk = param.g.duplicate().powZn(sk) return KeyPair(sk, pk) }
0
a87306be411ab38c20a1bc8ebcd577ff
aed48a8e46a38ab5a2a8427cfb55ab0e
Creates a new BotConfigurationBase instance.
constructor(bot: Bot) { this.bot = bot; }
0
ad85bb25499216096ac4c69c46817ec8
24f33b545c321ae41903617cbfc51d06
将obj转换为promise
let results = new obj.constructor(), promises = []; let keys = Object.keys(obj); for (let i = 0; i < keys.length; i++) { let key = keys[i]; let promise = promisify.call(this, obj[key]); if (promise && isPromise(promise)) defer(promise, key); else results[key] = obj[key]; } return Promise.all(p...
1
62d7ffe6928d68be7f28eb31c014aa6f
49288e00374bef65c06651c0e5e69a2a
暂停当前的音乐
pauseMusic(){ if(!this._musicId) return; cc.audioEngine.pause(this._musicId); }
1
0d29fb19e0a7ad2aeab7c2bed4740c0a
f46b0589b1b22efde99788d0d5b1d41a
Get the [bidspecid] column value.
abstract class BaseBidSpecImport extends BaseObject implements Persistent public function getbidspecItemName() { return $this->bidspecitemname; }
0
bc8299c6852ba5c2db7308d79565cdef
ca5a45492db0b27143061a1d861830b6
将运力达成x1转换为页面应用的数据
console.log("dataNum是个啥:", dataNum); return dataNum.map((item, index) => { return { key: index, id: item.id, serial: index + 1 , total: item.total ? item.total : 0, water:item["1"] ? item["1"] : 0, food:item["2"] ? item["2"] : 0, biology:item["3"]...
0
5bb3e3708037a0b356a1d94f8047df70
3db5e22870eae294a0d6a9af435d9d59
Estrae e restituisce un elemento dalla coda.
int queue_dequeue(QUEUE coda){ int key = 0; if(!queue_isEmpty(coda)) { key = *(coda[*(coda[0])]); coda[*(coda[0])] = queue_freeNode(coda[*(coda[0])]); *(coda[0]) = (*(coda[0]) % (MAX_array-1)) + 1; *(coda[MAX_array+1]) -= 1; if(queue_isEmpty(coda)) { ...
1
e954800ecf6beaabe1fc8c402afe0f07
000d06d36786686dcbc5097ed31994b8
同じ得意先の件数を取得する
function PresenCntGet(req) { return new Promise((resolve, reject) => { var sql = 'select d.t_shain_pk,d.shimei,d.shimei_kana,coalesce(c.presen_cnt,0) as presen_cnt from t_shain d ' + 'left join (select a.t_shain_pk,count(a.t_shain_pk) as presen_cnt from t_presenter a ' + 'inner join t_senkyo b o...
0
13599eac16884e61a417773270e0c36a
612ba34d85b6a7b99d3f059b8d9c9b00
Method to apply the Circular, Elliptical or Diamond-shaped vignette on an image.
function vignetteCanvas(image) { var innerR = 0.1; var outerR = 0.7; var centerX = image.width / 2; var centerY = image.height / 2; var innerDist = innerR * Math.sqrt(centerX*centerX + centerY*centerY); var outerDist = outerR * Math.sqrt(centerX*centerX + centerY*centerY); var deltaDist = outerDist - inn...
1
7215885c27a5ae34f650bbc9c6f234c4
24c9318eea4a5ada99a1c553fb51e07e
根据具体实现过滤报警邮件
class TMAvailableFilter extends TMFilter public function execute($filterChain) { $apcMgr = new TMAPCMgr(0, $this->availableConfigName); $array = $apcMgr->get("availableList"); if($array == false) { $array = TMYaml::load(ROOT_PATH."config/filter/available.yml"); ...
0
9fb93804e208b57f7e16ffadb2de2614
a1451f37f1a75bef4a7eca29b9008d39
! @brief 冒泡排序 从小到大的顺序
int bubble(int *p,int n){ int i=0; for(i=0;i<n;++i){ int j = 0; for(j=0;j<n-i-1;++j){ if( *(p+j) > *(p+j+1) ){ int tmp = *(p+j); *(p+j)=*(p+j+1); *(p+j+1) = tmp; } } } }
1
c8ad512564d0820c744c9b2da334c33b
f440617b94eedf6af58d30512b31a8ce
检测只允许特定号段手机号注册
{ bool temp = false; bool res = System.Text.RegularExpressions.Regex.IsMatch(str_handset, @"(^[0-9]{6,10}$)"); if (res == true) { temp = res; labelregistResult.Text = ""; } return temp; }
0
5df2b1d7a58295364ef05c7b2194c1dd
f3e57b3fbe96b669907527657614bfe3
获取文件的后缀名,返回大写
function getExtensionOfFilename(filename) { var _fileLen = filename.length; var _lastDot = filename.lastIndexOf('.'); var _fileExt = filename.substring(_lastDot+1, _fileLen).toUpperCase(); return _fileExt; }
1
9ebf3e3af6fc8501e5d7c701ce019539
34a0636c48849002abbd7d76f49fc94a
Scalar multiplication. This method wraps any distribution inside a weighted distribution.
Distribution Distribution::operator*(const Distribution& other) const { check_empty(); other.check_empty(); Distribution res; if (type == Type::lognorm && other.type == Type::lognorm) { double new_p_m = p_m * other.p_m; double new_p_s = sqrt(pow(p_s, 2) + pow(other.p_s, 2)); ...
0
f494fb6c9c2cf16390b2b6a47d1ccf0a
e6be7e01b65418db4d26849c47effef2
ラベル付き画像と、ラベル自身をランダムに取り出してバッチを作る
def batch_generator(labels_path, batch_size, istraining): labels_pahts = os.listdir(labels_path) while True: batch_img = [] batch_points = [] for i in range(batch_size): random_index = random.randint(0, len(labels_pahts) - 1) label = pickle.load(open(labels_path +...
1
eb570595533670cebb26fccd71fd5646
5dd110b5d344658f669e05dc76f90782
Sets the interceptor bindings associated with this assembly descriptor
IAssemblyName *pAssemblyName, ICLRPrivAssembly *pAssembly, ICLRPrivAssemblyInfo *pAssemblyInfo) { STANDARD_BIND_CONTRACT; return S_OK; }
0
31c073009cd8da3ddfd57bc07326c9f3
cfbac0169c7073e4426f8591be038e1a
funcion que valida que un numero sea potencia de 2
if n>0 and n&(n-1) == 0: return ( n.bit_length()-1 ) if valor else True if valor: raise ValueError("No es una potencia de 2") return False
1
6ee88059f85fa0080f816058f3f63339
de80ab4d3d23ac020406a57ea8149ce1
Checks if the mobile number is legal The legal ones are defined as: [country code][' '|'-'][number] Country code is either started by a '+' and followed by 1-3 digits or 4 digits Number is defined as 8 to 13 digits.
function isMobileNumber(value) { var format = "^[0-9]\{3\}-[0-9]\{3,4\}-[0-9]\{4\}$"; if (value.search(format) != -1) { return true; } return false; }
0
72f1c53a2ecd7745b367a2ce3dc3fd4f
a71df17251f3c6551a8e9a844a071877
Transfer a User's Playback
public class UserRecordingsApi public UserRecording putUserrecording(PutUserrecordingRequest request) throws IOException, ApiException { try { ApiResponse<UserRecording> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<UserRecording>() {}); return response.getBody(); } cat...
0
9573b47fbbe5c5be28db79122cc51006
d7647a0a953ee627f1b500ffe7e5e45c
returns the derived attribute value for Objects that have the attribute, or the null value for Objects that do not have the attribute.
throws SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { Object retval = null; Method m = getGetterMethod(com.getClass(), attrName); if (m != null) { retval = m.invoke(com, null); } return retval; }
0
7b12154431990f7d9f339c2f09998753
5522168874e77d5871f518b4df254023
get summary info by examining a single testresult doc
String testSummary = ""; if (eTest != null) testSummary = eTest.toSummaryString(); return testSummary; }
1