query_id
string
corpus_id
string
query
string
code
string
label
int64
1be1e0507b3169e2d7ddf33a61b8f807
2a4e8e0ad254a80f6f6d22b1d6763461
It should allow a superuser to delete a user.
users = self.add_users_by_admin([dict(email=u.user1[0], password=u.user1[1], name=u.user1[2])]) r = self.fetch('/api/user/delete', body={'data': dict(_id=users[0]['_id'])}) self.assert_code(200, r)
1
1a87de178d73724d7c5452330d44ad9e
bb9ae95c3b04f891a2cb1feb432a8f28
Sets the value of the styleNextStyleName property.
public class SSTextCell<T> extends AbstractCell<String> implements HasHandlers public void setStyleName(String styleName) { this.styleName = styleName; }
0
d6236ddd16ff5d962f67e28d0d119ba7
27be22b6e5903487da21bd5d20907bca
Get the number of nodes stored under this root (including the root)))
public int getNumberOfNodes();
1
2890c9fe6d7746578f12e607fb647b30
d3ff196394982eb1ae404dec6453601f
그림판에 있는 모든 도형의 둘레의 합을 구한다
{ if(shapes != null) { var result = 0.0f; foreach(var shape in shapes) { result += shape.GetPerimiter(); } if(result < float.MaxValue) { return MathF.Ro...
1
260d12ec7bdf91f685eec75885db1b69
e4441db73528f46c032533952fa21bc9
eq(7)的计算函数,计算两个cluster在B下的 权值
lenA1 = len(A1) lenA2 = len(A2) Nij = parameter['Nij'] n_sum = lenA1*lenA2*Nij N = 0 for node1 in A1: for node2 in A2: if node1 > node2: key = 'T'+str(node2)+','+str(node1) else: key = 'T'+str(node1)+','+str(node2) Tij =...
1
19fa0058b3e0a2e6f9ab603afe5d71dc
5453487e3c6bed406581cd6781f0727e
Returns UI automation property values.
namespace Axe.Windows.Desktop.UIAutomation public static class A11yAutomation public static CUIAutomation GetUIAutomationObject() { return UIAutomation; }
0
eea788058d70b8f19ea78121e17b3623
7fe800e1cae4bcd4479b38b72d16acb6
Player chooses their action during combat
public class BattleSystem : MonoBehaviour void ActionSelection() { state = BattleState.ActionSelection; dialogBox.SetDialog("choose an action"); dialogBox.EnableActionSelector(true); }
1
6429e287d2858e39e3f8c44e8c624a41
b4a38a2e9a0f05fa84d6f0508d9b8c76
! Assigns a 2 component vector into the named element.
void Shader::setVec2(const char *name, glm::vec2 value) const { glUniform2f(glGetUniformLocation(id, name), value.x, value.y); }
1
549740d6ed95b9d15ecb3166c6433d80
046ec4e661b70f9fd53dafcabb42020b
Test when the path is an empty string.
class RequestTest extends \PHPUnit\Framework\TestCase public function testGettingPathWhenEmpty() { $_SERVER['REQUEST_URI'] = ''; $request = Request::createFromGlobals(); $this->assertEquals('/', $request->getPath()); }
1
73dea97dcd2d5fe073da0aaa06ee7e98
4aa7f952fb4d3d47349bec72bf4944a4
Select all menu implementation
class MenuDao function findAll() { $em = EntityManager::getInstance(); $menus = $em->findAll("menu"); return $menus; }
1
ae0500c06ad407a7782e2f0741cae5f7
c312b60243235741313eefdd62518ab9
enable I2C interface and setup ISR
void i2c_init(void) { buffer = cirbuf_new(BUF_SIZE); PINSEL1 &= ~(PIN_SDA0_bm | PIN_SCL0_bm); PINSEL1 |= (PIN_FUNC_ALT1 << PIN_SDA0_bp) | (PIN_FUNC_ALT1 << PIN_SCL0_bp); I20CONCLR = I2CON_ACK_bm | I2CON_SINT_bm | I2CON_START_bm | I2CON_STOP_bm | I2CON_ENABLE_bm; irq_install(I2C0_INT, (void *)i2c_interrupt_handler,...
1
f1e40658bbe0239a6440a24dba5c6ead
e164f3bd89dda637b8bc87a8068b6b74
Decrement reference count and see if the node can be safely freed.
namespace skip static void safeDecref(Revision& rev) { if (!decrefToNonZero(rev.m_refcount)) { lockManager().safeDecref(rev); } }
1
e287e17fab52b7f1d28d069d9bd13367
67ed2d5ef90589ae3f030c6b45a93473
Select features by KL-divergence.
self._fit_process(X) l = list(enumerate(self.scores_)) l = sorted(l, key=itemgetter(1), reverse=True) lsel = [l[i][0] for i in range(self._k)] return X[:, lsel]
0
19931276e0eab5cc5d0e8491b41f44af
68556322c2f1a574d8734a26886912ca
COPY A CHROMOSOME (WHEN THERE IS NO RECOMBINATION)
for(int k = 0; k < NBGENE/2; k++){ if(k < indice_cross){ serpent->gene[k] = couple[indice_parent_source].gene[k]; } else{ if(k == indice_cross) indice_parent_source = (indice_parent_source+1)%2; serpent->gene[k] = couple[indice_parent_source].gene[k]; } } }
0
b7fd8723ec61785fc4d3ab1eafeec6e0
16210058881056258731a95d5771ba1b
Test that the lines intersect at the correct point
class TestLineIntersect(unittest.TestCase): def test_intersection(self): argument = [[0, 0], [1, 3]] expected = [[0.75, 2.25]] actual = line_intersect(argument) self.assertEqual(expected, actual)
1
985a06c9e36031585aaf7670f5ece1aa
d8ac853db6c68c89f5baf94a46ab84b5
Starts the servers in the server group.
if (running) return; running = true; OnStarted(); foreach (IServer server in servers) server.Start(); }
1
1e20ae481b46eea5e5f0f366b51acf3a
13ca93f7263f8f8d418b338ff60433a7
List VM instances.
def list_instances(): client = get_client() return client.get_all_instances(custom_headers=get_custom_headers())
1
b2f5d245364b321ed50648f0295f31b7
ab20700b15caab667f3962cd460a031d
Это титульная страница, используемая для предоставления пользователю выбор между учеником и учителем
{ ViewBag.Page = "Classes"; string roleName = "Учитель"; var roleManager = new RoleManager<IdentityRole>(new RoleStore<IdentityRole>(db)); var role = roleManager.Roles.Single(r => r.Name == roleName); var users = UserManager.Users.Where(u => u.Roles.An...
0
03e6a7a8f463e8494f4c3d25e603723e
786a6623fdfe18267bd47793c9166850
Convert comoving distance to proper distance
double omegaM, double omegaLambda ) { return comovingDistanceT( z, H0, omegaM, omegaLambda ) / ( 1 + z ); }
1
0a2bfc9c37a32ef3cdc2d64d077e52f1
0a67fa2c8363d4baa1ec4f7d9e170c16
fills an array of books
{ for(int ctr = 0; ctr < size; ctr++) { books[ctr] = Book.enterBook(); } }
1
5c1d3de8167b311c5561cf46a61ee973
faa41b82bcada1f697ca9dcf62415da5
Read PDO assign structure
{ php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); if (return_value->type==IS_ARRAY) { return_value->type=IS_OBJECT; return_value->value.obj.properties = return_value->value.ht; return_value->value.obj.ce = &zend_standard_class_def; } }
0
413a58d48b6aaf5cf968488305f7162b
78d78e9141367371bfec326cf27f3f42
Creates an accessor method from the $property parameter. The $property will be returned with the prefix 'get' and the first letter of the property uppercased.
if(propName.charAt(0) <= 122 && propName.charAt(0) >= 97) { propName = (char)(propName.charAt(0) - 32) + propName.substring(1); } return "get" + propName; }
1
2ba43541d9e4a95447ae959617eb4cd1
2907ec4e0a11bda8d37d7c21b0d4c488
Warehouse city filter
{ if ($vgko_city_id != '') { $this->model = $this->model->where('vgko_city_id', $vgko_city_id); } }
1
949ffd7618a211dd63c845c9d8ccf93c
00010b17346c48e071a091729b660049
获取协助是否存活
public Boolean checkAssistanceNoExists(String assistanceNo,Long assistanceId);
0
eef36c0aa6da155fb5aabeb0d6c862ee
f05e8ff58a4303bc11a56cdb5d8217e4
Registers a plugin with the loader.
@Endpoint(id = "plugin") class PluginEndpoint( private val pluginManager: PluginManager ) @WriteOperation fun load(@Selector id: String): WebEndpointResponse<String> { return try { pluginManager.load(id) WebEndpointResponse("ok") } catch (ignored: Exception) { ...
0
2ba9880569a1ced21fe0199d6738b545
b0eb17747d6e0200fd12e2d4bb5060ee
sets the action of the new window button
public void setAction(String newAction);
1
cced2aada9d1b6b7b346ca80753ddcc3
ec590c3fb93f616911f51a9ed9ec9e21
Sets paths to exclude.
class NewLineConvertor public function setExclusionPaths(array $exclusionPaths): void { foreach ($exclusionPaths as $exclusionPath) { $this->exclusionPaths[$exclusionPath] = mb_strlen($exclusionPath); } }
1
0b61ce72b70735a1f25f04cd2f003b39
1f4ecebf351e754512d960acd6d492ca
Toggle specified interest from member data.
function reviewerInterestsToggle() { var is_checked = isReviewerSelected(); if (is_checked) { $('#reviewerInterests').removeClass('hidden'); } else { $('#reviewerInterests').addClass('hidden'); } }
0
bf22faff0fcac4b7562280407d1abaae
61708df04d4d48650892f3f17b3df60a
Generates tab completion strings. ## OPTIONS ## EXAMPLES # Generate tab completion strings. eval eval-file
{ int new_len = 0; char *new_line = NULL; int i = 0; metafy_line(); for (i = 0; zlemetaline[i] != '\0'; i++) { if (zlemetaline[i] == '|' || zlemetaline[i] == '>') { unmetafy_line(); execzlefunc(t_orig_tab_bind, zlenoargs, 0); return 0; } } new_line = rwcli_tab_complete(zlemetalin...
1
798d743b1b9651fa72e0b3cef665d879
3051d4c41948334d85a3db6a27fb83fd
Send a code to the user that they will use to validate.
class ILocalAuthenticationMethod(IAuthenticationMethod): def send_code():
1
af9d99b8f4585c5fea96b0e395fc6e14
267247ee06a9e24958dda7d09bee28d3
This method returns the likelihood of the plant's reproduction.
public class Mouse extends Prey public double getBreedingProb() { return BREEDING_PROBABILITY; }
0
2422a4dab9ebc57d93c498bb4dad9a04
3dc5c633bfaba3f1a969fc40d8fce52d
Gets all the different file system storage names such as ext3, ext4, NTFS, etc. NTFS, etc
{ switch (fileSystemName) { case "cddafs": case "cd9660": case "iso": case "isofs": case "iso9660": case "fuseiso": case "fuseiso9660": case "udf": ...
1
9ee777a23d371cf14263e5b7d1ecb5d6
ffac9450d4b779eb60578a8cfed6b3e2
The x-coordinate of the center of the 2D Sersic fit (`astropy.modeling.models.Sersic2D`), relative to the original image.
_ = self._sersic_model if self._sersic_chi2 == -99.0: return -99.0 return self._sersic_chi2 / self._sersic_num_dof
0
9391bcb5791f7c6d058b3dd79bb9fce4
56dc9eb02d693aa8814014a2eac2b3ef
根据序列号查询(绑定手机记录表)信息
CommonplaceResult selectOrderBySerialNumber(String serialNumber);
1
dd3cf9de6777519a85c226e1bb9bb27d
5cb4ae2638cef77594a7111ffa1c3a44
Pre-conditions : j adresse d'un joueur dont la flotte est instanciee Post-conditions : aucune Valeur retour : nombre de bateaux de la flotte
int CArmada::getEffectifTotal() { return m_listeBateaux.size(); }
1
cb17f41202add26c831b645158f87a3b
717d889868130d16ad0986d13fd70dd2
Prevent user from circumventing shortcut restrictions by using an additional keyboard. To this original keyboard (keyboard in use at start of application) is kept as only valid input.
{ ExitApplication.Primary = CreateKeyboardBinding(Key.F4, alt: true); NavigateUp.Primary = CreateKeyboardBinding(Key.Up); NavigateDown.Primary = CreateKeyboardBinding(Key.Down); NavigateLeft.Primary = CreateKeyboardBindin...
0
874785118ca79eb7f4e162cd9a04c63e
0aeb8fb14993b6ceb6b6fa344e1e48b4
在多对多关系中,当前Service的数据表为从表,返回不与指定主表主键Id存在对多对关系的列表。
{ using (var db = SqlSugarDB.MasterDB) { return db.Queryable<T>().InSingle(KeyId); } }
0
8bd88b92b0a8f85578228cb5931e0851
ae6a1f41dc819e096a5608e586681d86
Saves any changes to an existing FileImport service entry
Boolean updateServiceEntry( int serviceID, String ServiceType, String entryDate, String accidentDate, boolean customerNoObjection, boolean insuranceNoObjection, boolean claimForm ) ;
1
0765cb53305bc47a54eb608b09b90450
e60520362aa256da4da33c843a531584
恢复已经中止(取消)的流程
namespace MCS.Library.WF.Contracts.Operations [OperationContract] WfClientProcessInfo Resume(string processID, WfClientRuntimeContext runtimeContext);
1
9157958a66a22241297553b9dd238b32
fb0b495da2dabb4cc1c505e129a7e8f4
setup directories, if not existed to upload images, then call internal resize methods to resize images and save them.
class Model extends Dbase public function uploadAndResizeImage() { $imgPath = 'images/uploads/fulls'; $thumbImgPath = 'images/uploads/thumbnails'; $largeThumbImgPath = 'images/uploads/large-thumbs'; if (!$_FILES['portImg']['name']) { return false; } $fileT...
1
96be54f4f2bfe2d4b6f58fb72ad2831e
a2b5d8b8ea6f6f00c45d92cf60313f5b
The request to get the current country code from the server failed
function updateCountryFailure(error){ return actionCreator(UPDATE_COUNTRY_FAILURE, error) }
1
21fd4035d88797101e02c3777839600f
db478e7b1139c1f4281feffe8cc04cea
Devuelve 1 si el usuario ya esta en ese grupo
group = read() if user in group: return 1 return 0
1
705bece28da37e46d25fac9c6ecee560
c0644549eab1587258dd52bcd865c461
Buscar impresora conectada por Bluetooth desde que se abre la pagina para que este lista al imprimir
async function listaImpressoras() { $("#listaImpressorasEx").html('<a href="#" class="w3-bar-item w3-button w3-center"><i id="controleSpin" class="fas fa-circle-notch w3-spin"></i></a>'); const impressorasExistentes = await qz.printers.find().then(function (data) { return data; }).catch(function (e)...
0
28c9630b322db0d8bb2f5bb4c29dbbdf
268db6fc7f98fa1be313323a06dbd8ec
For the given user and rooms, return any new events for them. If there are no new events wait for up to `timeout` milliseconds for any new events to happen before returning.
this.ldClient = this.createClient({user, envClientKey, options}); return new Promise((resolve, reject) => { return this.handleEvents(timeout, this.ldClient, logUpdates, resolve, reject); }); }
1
da263e35d8e694a7e2b09def93b78300
7a1bac3d212a1423e0c9a5bf48828734
printInstruction, prints the formattedString to the file supplied by the argument writeFile
final BufferedWriter writer) throws IOException { final String string = InstructionComposer.composeString(instruction); writer.write(string); writer.write("\n"); }
1
fdc107a542460d10871f68acb649e80d
e48ebd2bffd6aa39955b14e67ab24658
------------------------------------------------ 根据建筑建立格子
{ Int2 Start = Canvans.GetMapSize(); List<List<int>> grid = new List<List<int>>(); int RoomWidth = Start.Unit ; for (int i = 0; i < Start.Layer; i++) { List<int> row = new List<int>(); for (int j = 0; j < RoomWidth ; j ++) { row.Add(0); ...
1
4e2ab4447760b8893e4d105d2f2719c6
ecac451271b57895138b3a9bee1ac1e3
重写父类的方法,开启账务管理对话框
ManageDialog::ManageDialog(QWidget *parent) : QDialog(parent), ui(new Ui::ManageDialog) { ui->setupUi(this); accountInfoShow(); QObject::connect(ui->returnButton,SIGNAL(clicked()),this,SLOT(returnButton_clicked())); QObject::connect(ui->deleteButton,SIGNAL(clicked()),this,SLOT(deleteButton_click...
0
1f240aeb276371f564c80fe49b7d751a
2c6ac6d44846a4ab53738a9d4dca95bd
Hàm cấu hình các textview trong item của spinner
ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_dropdown_item, strings); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); spinner.setOnItemSelectedListener(new AdapterView.OnItemSe...
0
8dff5aa20eb815617d785414f8804136
12ef6fac20f201154c0875d12cb6d078
Test case for delete_all_emails Delete all emails in all inboxes. # noqa: E501
class TestProjectApi(unittest.TestCase): def test_delete_all_parameters_0(self): pass
0
f61fd611934204509f45b870aac092c5
084b20f9060a080b95d005fe0561c745
IsScalarResourceName validates the resource for Extended, Hugepages, Native and AttachableVolume resources
func IsCustomResource(resourceName string) bool { return resourceName != ResourceNameCores && resourceName != ResourceNameMemory }
0
3c361e387f32344976086cfd4f3ec5d3
10b3ac54a86e167543b535d33e3ab6c9
Method to deposit money. It just adds the deposit amount to the current total.
namespace _160805021_BankingApp public class Account public double deposit(double amount) { balance += amount; Console.WriteLine("Depositing #" + amount); Console.WriteLine("Your account balance is " + balance); return balance; }
1
da83e2d499f170252702f441c03d398f
2e6d19d74d4fde9e3b15ba53ba29b179
Unqualified name of scope
class Node: def polymeric_scope_name(self): return self._polymeric_scope_name
0
b56e9825938ac157771dcc5f3e5eee9b
a1976006d92bae3768b62fed64d52451
Saves configuration to a TextWriter with optional link to XSL file
{ if (configFilePath == null) { throw new ArgumentNullException(nameof(configFilePath)); } XDocument xdoc = WriteConfigToXDocument(config); DirectoryInfoEx.CheckFilePathDirectory(configFilePath); xdoc.Save(configFilePath); ...
0
6c2a0eeb0209062e94727473913e56e5
cbf39f92d6f2f641c91433254ccf2b35
サブセット用のトランザクション内容に変換
$logData = array(); if ($resultType == RESULT_TYPE_SUCCESS) { $logData[RESULT_KEY_ANKEN_ID] = $oldDetail['anken_id']; $logData[RESULT_KEY_ACTION_ID] = $oldDetail['id_prefix'] . sprintf('%010d', $oldDetail['session_id']); $logData[RESULT_KEY_MEDIA_ID] = $oldDetail['media_id']; $logData[RESULT_KEY_MEDIA_NAME] =...
0
6c68ca133eb5cb82bb108bd5c24aa98c
5414bf3ac0ce3bf8eb351539f2294db8
设置MPU6050的数字低通滤波器
u8 MPU_Set_LPF(u16 lpf) { u8 data=0; if(lpf>=188)data=1; else if(lpf>=98)data=2; else if(lpf>=42)data=3; else if(lpf>=20)data=4; else if(lpf>=10)data=5; else data=6; return MPU_Write_Byte(MPU_CFG_REG,data); }
1
f25c08947e7be7e5aca69da2cfbd2ba4
7a1758307cf5864eaa6932ec7d1c242f
Count the number of days passed since beginning of the year
fun Int.dayCountOfYear(): Int = asDate(this + 1).minusMillis(1).dayOfYear
1
207d1c962e43fe51379de573b2953ebc
9ce5ecf74426fa75e5f5a435a9d3600a
뱀 생성
body.clear(); Size visiblesize = Director::getInstance()->getVisibleSize(); head = HangulSnakeHead::create(); head->setNode(Sprite::create("SnakeHead.png")); head->setPosition(Point(visiblesize.width / 2 - head->getNode()->getContentSize().width / 2, visiblesize.height / 2 - head->getNode()->getContentSize().heigh...
1
71a6ce6a56202233a0dc4574f208cf68
f492d116b0d394f6254799d88a1db431
list one or more example URLs showing the available upload/download protocols
class ilWikiUtil static function wfUrlProtocols() { $wgUrlProtocols = array( 'http://', 'https://', 'ftp://', 'irc://', 'gopher://', 'telnet://', 'nntp://', 'worldwind://', 'mailto:', 'news:' ); if ( is_array( $wgUrlProtocols ) ) { $protocols = array(); foreach ($wgUrlProtoc...
0
9ba4ab33ddcaf00e24653e9f5f8c0bbe
907de77b1a3f264e3709ba87f38c3657
Called from packagerConfig in forge.config.js Copies correct build Tools for architecture + dynamically loaded js/json files
return { copyOnly: true, target: name, source: [ { dir: "node_modules/{0}/".format(name) } ] }; }
0
dfcd0a94641b5cf6f1038ddc5dbb68db
b4aece796e419ca9abfe6a805b153936
Reverses the order of frames
{ BYTE* p = data(); unsigned int rowStepInBytes = getRowStepInBytes(); unsigned int imageStepInBytes = getImageStepInBytes(); for (int j = 0; j < m_height; j++) { memcpy(p + (m_height - 1 - j)*rowStepInBytes, m_frameBuf + j*rowStepInBytes, rowStepInBytes); } }
1
6971d4fff3179ca1ec5b467cb68b0de0
9719dce0a18c869cfc8d1cb97648760d
Gets an ability of a particular type
open class TSCard : Card() fun getAbility(abilityType: TSAbilityType) = this.abilityGroup?.abilities?.firstOrNull { it.abilityType == abilityType }
1
022b1074a05eef272b9102a6e144f8d8
3d60013b78bd2cf5ca75380f480508b5
Display a listing of the table_pricing.
class PricingController extends Controller public function index() { return view('pricing.index',['pricings' => Pricing::get()]); }
1
a76d57948a6f30162ecdbf6f63e0043d
614b3909bdd8a9ec8c8c3c27dc5efb2b
Returns min books information for range offset & limit
class Books extends Api implements BooksInterface public function getBooks($limit = null, $offset = null) { $books = $this->getFromCache($limit, $offset); if ($books) { return $books; } $request = new ApiRequest('GET', $this::ROUTE); $request->setOptions($this->pr...
1
054d885812f8a70720a0cafc4d694191
b525dcce310b0861433d73f5d2b08acf
Checks for pipes ("|"), returns number of pipes found (2+ will cause error)
int pipe_check(int argc, char** argv) { int i; for(i = 0; i < argc; ++i) { if( !strcmp(argv[i], "|") ) { if(!argv[i+1]) { fprintf(stderr, "argument error\n"); return -1; } return i; } } return 0; }
0
9effad60141644a843ef7e5d03b2f894
d145585c85040dec64e9e4ae8deb8a1e
Adds another property to the chain. When invoked, all further rule declaration will be applied to $prop and every other $prop defined since the last invoke to rule_for.
thisRef: Grammar<*>, property: KProperty<*> ): TripleOfParser<T, S, R> = also { it.name = property.name }
0
bcf0cb441192760a79f448355618135b
893d93fb7f59706e36422dd9c4c64fad
Запускает разузловку изделия
class Precast_panel(Precast_component, Precast_panel_validate, Precast_panel_finder, Precast_panel_analys_geometry, Precast_panel_json, Precast_panel_indastry): def disassemble(self): if self.assembly: ...
1
3aa3642dc75d358fd6127a1380001169
8fe64f978df37f35dd799dffb8e9f572
NewUint returns a pointer to the given uint value.
func NewUint(x uint) Uint { return Uint{Value: x, Valid: true} }
0
211a644b8d1790515531fa7751e9adcc
796e425ba17f78b37edc92b0c563ff6b
简单返回对象;一般有 NRVO
public class Gao11 void goo () { System.out.println("foo"); return; }
0
b07c2415a4b1910764e3da0b4432ea33
e9d15c7e1bf6ff9585bb8b44325ba0f2
Function returns the number of ingredients contained in a dish
class Table public int dishNum() {return dishNames.length;}
0
d21bdfdf1a19575b728d36916d5b3c23
dda95950043fe62f18b2a8794eaea2a0
Função que abre o chat privado com alguém
function privateChat(event) { let target = event.target; let user = target.innerHTML; if (target.className === 'user'){ input.value = `@${user}`; } }
0
a08f065d6157788c1905c237462d80c2
ac43c2af9f15fa4f8f7cd183fcd675df
This method should provide the number of unique products in a container.
class Animal(object): def countProducts(self): pass
0
b9549085b89297f03ab7198e7760ad69
2ecfdd1618590d9c339e1c4df0f86a3e
Returns boolean indicating if the user is required to complete a form in order to create a new record
{ $user = $this->getUser(); return ( $user->authorise('core.create', $this->config['option']) || count($user->getAuthorisedCategories($this->config['option'], 'core.create')) ); }
0
750acb9a277272990f5a026867251b19
315685d9600208e6b4ed1145055cf962
Goto the next annotation change
def go_to_next_annot(app, ui, widget_2d, widget_3d): errand = app.pat_dict[app.current_pat_id].errands[app.current_errand_id] annots = errand.annotations if not annots: return active_annot = app.visEngine.GetActiveAnnotation() if active_annot is None: next_annot_idx = 0 else: nex...
1
1aa8bb3a9ed8932eb70bfa8717441a4a
59365e44bf67346b524e5be386f59a7c
Helper function to find an existing buffer used to store a msg rcvd via frags
int *piblockindex) { int i, status, end_of_list; char *found; i = 0; end_of_list = 0; found = NULL; while (!end_of_list) { if (pfraglevelinfo->blocktable[i].mem_blocks == NULL) { end_of_list = 1; } else { status = pfraglevelinfo->blocktable[i].mem_status; if (!(status & 1)) { found = pf...
1
d005d6a6c348170d7d639fee522af723
f0abc44f881d33ecb0dd46c8ec0734d7
获取勾选的文件路径 返回数组
function getSelectCheckBoxInfo(){ var File_NAME=""; var arr = document.getElementById("addIframe").contentWindow.document.getElementsByName("productCheck"); for(i=0;i<arr.length;i++){ if(arr[i].checked){ if(File_NAME != ""){ File_NAME = File_NAME+","+arr[i].value; }else{ ...
0
3cd35af1617bfe59aafb1c4ff5234933
b54ead6cd8697bae9e9bceead8b7f472
Calc the sum of the bill including the taxes
function calculateBillTotal(preTaxAndTipAmount) { var tip = preTaxAndTipAmount * 0.15 var tax = preTaxAndTipAmount * 0.095 return tip+tax+preTaxAndTipAmount }
1
676d126761a6553961f07ef596666367
00179030cfbb6775195d2b0a9c17f5b5
Returns the position in app units of a given baseline (using an SVG dominant-baseline property value) for a given nsTextFrame.
if (ScriptSystem.getBaseline(system) == Font.HANGING_BASELINE) { return 0; } else { char ch = ScriptSystem.getMeasurementChar(system); GlyphVector gv = f.createGlyphVector(frc, new char[]{ch}); return gv.getVisualBounds().getBounds().height; } ...
0
e6ae42ae0069e7a62e0787421200c775
ef352555d207055c58cbcc750f13d82b
Build the Report file name, based on the start date and end date
{ QString strTemp; m_fileName_report = QString::number(ID); strTemp = QDateTime::fromMSecsSinceEpoch(dateTime).toString(QString("yy:MM:dd")); strTemp = strTemp + "_" + QDateTime::fromMSecsSinceEpoch(dateTime).toString(QString("hh:mm:ss")); strTemp.remove(QChar(':')); m_fileName_report = m_fileNa...
0
d253b8cecf7c50089c439d5f878726b3
49f84fa78643227c3884285b471a7ecc
mixes traits by swapping the traits of two individuals
class InterchangeMutator(Mutator): def mutate(self, individual: np.ndarray) -> np.ndarray: gene_size = individual.size ind = np.random.randint(0, gene_size, size=2) indiv_mut = swap(individual, ind[0], ind[1]) return indiv_mut
0
7a54704a558bf150a505331f3beacd91
d5aa9163a5eda39bc55b4f885a72ae80
根据券商id获取券商记录
StringBuffer sqlstr = new StringBuffer(); sqlstr.append("select * from bn_synagent where 1=1"); if(ids!=null&&ids.length>0){ String idstr = Arrays.toString(ids); idstr = idstr.substring(1,idstr.length()-1); sqlstr.append(" and id in (" +idstr +")"); } ...
1
5b56b3c3313caf8cba36a333b7dc9c0a
f7707013f86c00e30e13671e1ed45e3e
確認是否存在重複的服務參數
function checkTheSame() { var trs = jQuery(".item"); if (!trs) return false; if (trs.length < 2) return false; var s = ''; var cur = ''; for (var i = trs.length - 1; i >= 0; i--) { var inputs = trs[i].getElementsByTagName("input"); if (!inputs) continu...
1
cbbc17f7d965ae01f1f846a723e04781
99d13cc04ffc2903247788556ae5c4d8
删除所有计划数据
def ClearData(): for i in ses.query(PlanDtl).filter(PlanDtl.bUsable == True).all(): target = ses.query(PlanDtl).filter(PlanDtl.id == i.id).first() print('============') target.bUsable = False ses.commit() ses.commit() ses.close() return '123'
0
2f249d1a5e60f0c4a904eedb0172afaa
b8a43a701c63d01187d397a5cc770805
获取明细最大序号,保证同一个表的序号不重复
CFSJDal db = new CFSJDal(Common.strConnection); StringBuilder sqlMax = new StringBuilder(); string id = null; ; sqlMax.Append("select min(ID-1) from "); sqlMax.Append(table); sqlMax.Append(" where ID not in(select 1+id from "); ...
0
74bfb737abe667be1d2e9fcec8d599a7
68679cfda2d6d573e1d764f56fbedb56
Set callbacks, initialize timer and start ESP-TOUCH
struct device *gpio_dev = device_get_binding(TOUCH_INT_PORT); gpio_pin_configure(gpio_dev, TOUCH_INT_PIN, GPIO_DIR_IN | GPIO_INT); gpio_init_callback(&_touch_callback, _touch_pressed_cb, BIT(TOUCH_INT_PIN)); gpio_add_callback(gpio_dev, &_touch_callback); gpio_pin_enable_callback(gpio_dev, TOUCH_INT_...
0
8a2b1a01595b1f381f694d649bb6cf6a
ffd9000367fe6210f2a9d5d84ffd99f5
Wechselt den Zeichenmodus der verwalteten Geometrie.
namespace Rhino.Geometry [Serializable] public class MorphControl : GeometryBase public bool Morph(GeometryBase geometry) { if (null == geometry || !SpaceMorph.IsMorphable(geometry)) return false; IntPtr pConstThis = ConstPointer(); IntPtr pGeometry = geometry.NonConstPointer(); ...
0
67a7cc20e48fa411adf3457d55eefb0b
af137766907dbffd75d8e39a03e6796d
Báo cáo danh sách gift voucher
{ $orderBy = request()->query('orderBy', 'asc'); $field = request()->query('field', 'voucher_code'); $searchString = request()->query('string', null); $paginate = request()->query('paginate', 10); $voucherType = request()->query('voucher_type_id'); ...
1
e5098886c05d9d70e03d87a7e65f6d6e
8b195132089345f0d7423e4b4e919936
@brief 获取磁力线起始点
if self.start_point_c then return self.start_point_c end local point_str = self:getGuideBody().start_point local pos_type = self:getPositionType() self.start_point_c = self:convertPointByString(point_str, pos_type) return self.start_point_c end
1
774432c4a929d1745f9d57f7eb4191d4
84359eb04d7a2fb244bff40a770e649a
Metodo encargado de determinar si un periodo esta cerrado para un colaborador de acuerdo su regimen/modalidad
public class HRBaseAction extends JqGridBaseAction{ public boolean getLoginPeriodClosed(){ return modelStatusManager.isYearMothClosed("HR", getLoginPeriod()); }
1
7fe3e28d9259b3d0c8b5eda51f78ae46
18e4e3295a4722e68f6faff325845c36
States the last letter guessed by the user
class Character(str): def guess(self): self.was_guessed = True
0
773b8b51ec649efadcdedd7ba6b3a217
75db93c9e9326579d6282c4f7a7ec493
广度优先搜索,返回消费点出发,两层以内的网络节点,以此作为服务器的初始化位置
def breadth_first_search(maze): start = maze.sense_robot() root = SearchTree(loc=start) queue = [root] h, w, _ = maze.maze_data.shape is_visit_m = np.zeros((h, w), dtype=np.int) path = [] while True: current_node = queue[0] is_visit_m[current_node.loc] = 1 if ...
0
837430e89162bf732cc075dac7974967
cce1ce3afa49ebbb761a37746041dc21
Se inicializan los valores para cada llamada de escena.
namespace Zelda_AgusTemple public class Nivel6 : Escena public override void Initialize() { base.Initialize(); }
1
3d5e7af1bdaf602b3d87e560841c3648
4e09ef7ececc7a4f61c7f7b97caa28e0
test for area initialisation expected instance
int cols = 12; int rows = 15; area = new TextArea(rows, cols); assertEquals("", area.getText()); assertEquals(cols, area.getColumns()); assertEquals(rows, area.getRows()); }
1
82b6714af20d8d7bd44d6404a7956a20
e6f43dcb604fc13f7cddcb2cefdaad03
Filter activations so that they only contain specific neurons. .. note:: The returned value is a view, so modifying it will modify the original matrix.
assert params.get("activation_pattern") is not None assert params.get("importance_task_indices") is not None assert params.get("activation_pattern_corr_thresh") is not None assert inputs.get("logits") is not None logits = inputs["logits"] activation_pattern = params["activation_pattern"] cor...
1
5455efbcc8580feb5c67d66a23ccb156
b8f3563006eb64e83c37243b54c07818
Gets a node from the model by child ID.
namespace Assets.Scripts.Model IBlock GetChildByID(string child_id);
1
a781dd22ee6048eba51eb682f1feaff5
ea62c9fb2071f80f784287280bf696a7
merging two already sorted arrays
void sortedMerge(int a[], int b[], int res[],int n, int m) { int i = 0, j = 0, k = 0; while (i < n) { res[k] = a[i]; i += 1; k += 1; } while (j < m) { res[k] = b[j]; j += 1; k += 1; } sort(res, res + n + m); }
0
65f47125b5bef50e27ca5e4d9695d118
9554b3dda5a70d4005cf10a9be9da50b
Load exported images from tarfile.
found = set() for identity, data, tarinfo in self.extract_tar(location): found.add(identity) contents = expected[identity] if data is not None or contents is not None: assert data.decode("utf-8") == contents assert found == set(expected.keys())
0
07480e1440f381db8e7b17351bfa7a20
38899bf9a8fb7170e45df7d248263e67
清除可选状态的值,以便启用可选判断
{ for (int i = 0; i < Rows.Length && i < coupleWithIndexStatus.Rows.Length; i++) { for (int j = 0; j < Rows[i].Items.Length && i < coupleWithIndexStatus.Rows[i].Items.Length; j++) { SelectStatus[] selectStatuses = Rows[i].Items[j]; ...
0
4edecb77bc338c6ffcb053e89b7b5552
de6768d47a5498803ca579798370f9d0
* Execute queued movement
namespace _2DRPG.World.Objects [Serializable] class WorldObjectMovable : WorldObjectBase, IMovable public virtual void UpdatePosition() { if (movementQueueX != 0 || movementQueueY != 0) MoveRelative(movementQueueX, movementQueueY); movementQueueX = 0; movementQueueY = 0; }
1
abd347ad7a026a14a4ac8f574db98d08
2798d5d59f60fe3c5cf5d0710870cd20
断链,返回第二部分链表的头结点
{ while (head && head != head->next) { LNode *temp = head->next->next; head->next->next = head->next->next->next; delete temp; temp = nullptr; head = head->next->next; } return head->id; }
0
6eaa73298106676951133e7859aaff4f
eda03a057788082338327ba9e550f329
Visit a parse tree produced by {@link CarParser#sentence}.
public class C0BaseVisitor<T> extends AbstractParseTreeVisitor<T> implements C0Visitor<T> @Override public T visitSenlist(C0Parser.SenlistContext ctx) { return visitChildren(ctx); }
0