query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
52cab6061ca9595ab1d0ac1e1f635c6f | af0f58022c97291b0d6c38dcb8ea4d74 | Gets the value of the customerID property.
possible object is
{@link CustomerID } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MPUser", propOrder = {
"isActive",
"isDisclaimerAccepted",
"userName",
"roleName",
"locationID",
"locationName",
"locationAppID",
"companyID",
"companyName",
"orgID",
"orgName",
"customerID",
"userID... | 1 |
c4fbb2e46acbe08958602ec5777f4636 | 9def751f14034b0fe6e53b6fd047fd17 | @brief Send a protobuf message
@param message Message to send out. | static uint16_t sent_messages = 0;
static uint16_t timeouts = 0;
try {
m_dpaHandler->SendDpaMessage(message);
}
catch (std::logic_error& le) {
std::cout << "Send error occured: " << le.what() << std::endl;
return;
}
++sent_messages;
while (m_dpaHandler->IsDpaMessageInProgress()) {
std::t... | 1 |
af174f9cf02d44171f8652829e95ac4e | 1f7b78bf702ea73f0ec3d569d0edaec0 | Méthode qui ajoute une cellule à la liste chainée | {
Cell<T_LinkedList> newCellule = new Cell<>(elem, null);
if (firstCell == null)
{
firstCell = newCellule;
size++;
}
else
{
Cell<T_LinkedList> a = firstCell;
while (a.next != null)
{
a = a.next;
}
a.next = newCellule;
size++;
}
} | 1 |
31c407a4bb649bca07e162f0e1e3a009 | edf2a43959b370094a593ff9fc00f4d1 | Counts, for each binding of the variable the number of instantiations of the projection triple | public Map<Variable, VarBucket> getVarBuckets(final TriplePattern tp,
final Class<? extends Bindings> classBindings,
final Collection<Variable> joinPartners,
final Map<Variable, Literal> minima,
final Map<Variable, Literal> maxima) {
if (Indices.usedDatastructure != Indices.DATA_STRUCT.DBBPTREE
|| (L... | 0 |
fc3d805ef5687a732386fb5dc102d7f9 | ca9998204c769031df9b88c358ca50db | Assert that the specified element cannot be edited. | namespace iDAutomatedTests.FrontEnd.Apps.OldLayoutManager.TestEngine
public class LayoutManager:FrontEndCommnUtilities
public void VerifyReadOnlyCannotViewEditOption()
{
Assert.IsTrue(Selenium.IsElementNotPresent(OldCollectionsLayoutManagerElements.EditLayout));
Assert.IsTrue(Seleniu... | 1 |
b57d73cb2e63d5bdf4f4f25181ecc622 | 9e3147f4659d66e4204eaf6a2cfa47e2 | Method that takes latitude and longitude of a city to call the API and store any relevant data in the provided WeatherData Object. | public class ApiManager
public static Call<WeatherData> getWeatherData(String format, String city) {
Call<WeatherData> call = apiManager.getWeatherData(format, city, "8ce7c2ac685f5e0f9743d305a68aaf5a");
return call;
} | 0 |
14fa229c3ca070bc315d6c5deb678682 | 1a5a9fb0bc79f7b8e7c1571e411e6069 | 给定一个offset,通过SEEK_SET宏定位。 | void fio_FileSeek( void* hFile, DWORD Offset )
{
SetFilePointer( hFile, Offset, NULL, FILE_BEGIN );
} | 1 |
dd58474e845603a6722743e6702ea2ed | 84aa9a00b8ad04d8e0d1c480fdab4bf9 | Asserts that the element is visible or is not visible, depending on the passed parameter. | public function assertVisible($selector)
{
$this->actionCollector->collect(__FUNCTION__, func_get_args(), $this);
return parent::assertVisible($selector);
} | 0 |
907b255bc7b221741f4d9184b9b796b3 | 002505b93fccb144c3375abec2bb5178 | Count the number of 1 bits in a number | def count1(n):
sum=0
while n!=0:
sum+=n&1
n=n>>1
return sum | 1 |
e5fa4a29ee2ee27ea6c73f18bce36bda | 35d864247775e47e6b51ff5bef56badc | Create the command, execute it at the client level and parse the result. | public abstract class AbstractNiFiRegistryCommand<R extends Result> extends AbstractPropertyCommand<R>
public abstract R doExecute(final NiFiRegistryClient client, final Properties properties)
throws IOException, NiFiRegistryException, ParseException, CommandException; | 1 |
34cbf7cc878a62c4fdf4cd370035518d | 4d6ab6b4caf08ae95c75086b890437c3 | Set a valid range for extracting patches. | class Inpainter():
def _get_patch_range(self, point):
half_patch_size = (self.patch_size-1)//2
patch_range = [
[
max(0, point[0]-half_patch_size),
min(point[0]+half_patch_size+1, self.height)
],
[
max(0, point[1]-half_pa... | 1 |
bc4a2a09195beff0a58e46a11b6e5079 | 8cb9b50d7bac42650ba184a9a441c447 | Redirects to the custom password reset page, or the page
if there are errors. | class PasswordBrokerController extends AdminController implements PasswordResetLink, PasswordReset
public function resetLinkFailedValidation($errors)
{
return $this->redirectWithErrors(\handles('orchestra::forgot'), $errors);
} | 1 |
4472a87131cac947366828ed84eb9661 | 19f7b72098234ea75ce340f5c2cf0e18 | Saves documents and hashes | def save_documents(uploaded_files, project_uuid):
if project_uuid:
project = Project.objects.get(id=project_uuid)
else:
project = None
for uploaded_file in uploaded_files:
instance = Document(original_filename=uploaded_file.name,
md5=md5(uploaded_file),
... | 1 |
33986a01b5310454baefcb5ea83ce256 | 52c6c8b3cacb26e1144e4b652aba1165 | 注销Id号为100的热键设定 | namespace 翻译神器
public partial class FrmMain : Form
private void UnRegHotKey()
{
for (int i = 0; i < HOT_KEY_NUM; i++)
Api.UnregisterHotKey(this.Handle, 1000 + i);
putOnTheHook = false;
} | 0 |
97ab93b0d87bf4793cd9daa03a605086 | d023ad46e73d796f11da076a7997d537 | SystemClockのモックオブジェクトを返す | public class EHMIProxyImpl implements EHMIProxySpec
public SystemClock getSystemClock() {
return systemClock;
} | 0 |
d3bdec615ad8f064b79fe58c313df92e | 57e184cd17d9cf5bab1b0ab9cada8bf5 | Process site branding changes. | public class AdminControl extends TeamingPopupPanel
implements
// Event handlers implemented by this class.
AdministrationActionEvent.Handler,
EditDesktopSiteBrandingEvent.Handler,
EditMobileSiteBrandingEvent.Handler,
EditSiteBrandingEvent.Handler,
InvokeConfigureAdhocFoldersDlgEvent.Handler,
InvokeConf... | 1 |
184b030106019d41e6a52dd6dc1b65ae | c04b7ce6ae848f6a1d3c3442a60644b1 | Gets the value of the county property.
possible object is
{@link String } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContactCustomFields", propOrder = {
"conContactType",
"conGender",
"conPAN",
"conPhone1",
"conPhone2",
"conPhone3",
"conPhone4",
"conPhone5",
"conAddressLine1",
"conAddressLine2",
"conLocality",
"conLandmark",
"co... | 0 |
9a1af45ef6719553ee6222ba9eeaa4fc | dd66a2f3e02240378fd8f9496a128580 | Helper function. Reads information from cards using resistor network to code ID and version. | public class DebugPort
public long readIdCode() throws TimeoutException, Error {
this.dpidr = this.readRegNow(DP_REG.IDCODE.getValue());
this.dpVersion = ((this.dpidr & DPIDR_VERSION_MASK) >> DPIDR_VERSION_SHIFT);
this.isMindp = (this.dpidr & DPIDR_MIN_MASK) != 0;
return this.dpidr;
} | 1 |
75debd1ba61d33671451d9cada194f30 | 6f40849e1cf9fbfaaad07bcafff8bff5 | Executes a given policy.
Returns:
True - if executed correctly
False - if there was an error | class Policy(object):
def check(self):
return False | 0 |
cd82dd20e3f1375dac429efcbe18470d | 3d421f098f74fa3e3a814bb910c22df6 | 过滤参数,过滤空字符串 | abstract class AbstractList implements Listable
protected function hook_filter_params($params)
{
return array_filter($params, function($val) { return !(is_null($val) || is_string($val) && trim($val) == '');});
} | 1 |
dbd9e36ebefa0298e5c3aae68d3e35d5 | bbc7c8a951d4e2b3988eb31f5630d8b4 | Convert software triggers enabled to string | def convert_bool_to_enabled(value):
if type(value) != str:
value = str(value)
value = get_name_from_desc(value)
if compare(value, 'True', 'eq'):
value = ENABLED
else:
value = DISABLED
return value | 0 |
ccf2ec6edcbfc2347689b783100729f1 | a9969e1a4e09bf472708ad0d67354778 | Fixture that parametrises tests for each clean-up command configuration. | self._tests_config: tuple = tests_config
self._runner_config = runner_config
self._log = log | 0 |
89bfe27125eb5115e4e51259a8a20dc4 | 4dee3b4f6f68b50e3a24d336656fa5e5 | Creates a big primary key column.
This parameter will be ignored if not supported by the DBMS. | public class TableSpecification<T> extends TableOptionsSpecification<TableSpecification<T>> implements TableDescriptor
public T primaryKeyColumn(String name, DataType type) {
return primaryKeyColumn(name, type, ASCENDING);
} | 0 |
a3dfb8b41c61751916552c6685dddce4 | bb8ab710f57787f5e9df102144941ec5 | Test case for getFulfillmentProcessLogByFilter
Search fulfillmentProcessLogs by filter. | class ReceivingProcessApiTest extends \PHPUnit_Framework_TestCase
public function testGetReceivingProcessByFilter()
{
} | 0 |
ea631eed58be80abc027134d042ed922 | 12f3e9c6a489557bfcffb146ce15dd4f | This function returns arraylist of direct reachable nodes from given
node. | Vector<Integer> res = null;
res = this.adjList.get(nodeID);
if(res==null)
return new Vector<Integer>();
return res;
} | 1 |
7eca745758855c4c7bd25b1a87d427dd | 00e030a19fffe00a2794a4acf60e042b | 判断开始按钮是否禁用 | protected StartBtnDisabled(disabled:boolean):void{
this.ui.start.disabled = disabled;
this.ui.start.gray = false;
} | 0 |
68cd551fa0fa14010a88ff2536b81218 | 4f7d8a85e3d8ba996f47255667e0ae56 | 检测购买数量有没有超过限购 | class FlashSale extends Validate
protected function checkLimit($value, $rule ,$data)
{
if($value > $data['goods_num']){
return '限购数量不能超过抢购数量';
}
$goods = Db::name("goods")->where(['goods_id'=>$data['goods_id']])->find();
if($goods['is_virtual'] == 1 && $value > $goods['vi... | 1 |
68b772f7180f4309f661500e555c3e06 | 043aae072a35807e4af0236f1545bc06 | 编辑系统参数存入数据库 | @Service
public class Equipmenthandler
public static void editCodeSysParam(String code, int coin_min, int card_min, double coin_elec, double card_elec, double cst,
int power_max_1, int power_max_2, int power_max_3, int power_max_4, int power_2_tim,
int power_3_tim, int power_4_tim, int sp_rec_mon, int sp_full_emp... | 1 |
558a4e5d4fb9278660cc1deec25e62de | f1f63c2d9f187178783d1ede6d24f90b | Fetch the kpis supported by the given partial or the monitoring items which use the kpi. | public class EquityDerivativesCubeConfig
protected static IKpiDescription[] kpisUsingActiveMonitor() {
return new IKpiDescription[]{
kpiPnlMonitoringWithLookup(),
kpiTunnelCountMonitoring(),
kpiPnlSensitivity(),
kpiDataContribution()
};
} | 1 |
d8de927a7f525dabc4433324c01edd8c | 9670bea1b990fe691bd4e47e8a811295 | 员工薪资统计 | EmployeeSalaryVO getEmployeeSalaryStat(Integer employeeId); | 1 |
70f0a19bbbf0d6ecd37bc76394f0c6e7 | 6aef8e1e3d7dfd1b693666d058f442f5 | 修改指导老师 | {
$param=input();
$where['id']=$param['id'];
$data['name']=$param['name'];
if(isset($param['editor'])){
if(strlen(strip_tags($param['editor'])) > 245) {
$data['false_cont']=substr(strip_tags($param['editor']),0,245);
$data['content']=strip... | 1 |
6e549d2d1cb5bf841069653b6de16bb5 | 22a16f737cad51e1afcc17f03311a765 | any time a page is saved or updated, or the permalink structure changes, then we have to clear
the spelling cache because the results may have changed. | {
$this->hookPermalinkSet(array(
'name' => 'olz-flushpermalink',
'value' => '1',
));
} | 1 |
1ed9a75664aae3bee244d9cd0234bdc0 | 951e302a459346a165b31154eb8fcd5c | Class to check support (applications runnings) on current machine. It only needs to be instantiate once, and be reused. | logging.info("Runtime.__init__: enter function")
self.util = Utils()
self.support = {}
self.support["lxsession_file"] = ["LXSession (keyfile)", "lxsession", False, None, None]
self.support["lxsession_dbus"] = ["LXSession (dbus)", "lxsession", False, None, None]
self.supp... | 1 |
6dec114441c20b9b8a68fb9dc632dc06 | 4a49f87777669edb2569de263787730b | 差值时间戳换算成时分秒(基于毫秒) | var s,m,h;
h = parseInt(milliSecond / 1000 / 60 / 60 );
m = parseInt(milliSecond / 1000 / 60 % 60 );
s = parseInt(milliSecond / 1000 % 60 );
return {
hour: timeFormate(h),
minute: timeFormate(m),
second: timeFormate(s)
}
} | 1 |
bd8af3901e4d89019895a5cf72cb9f67 | e0426a62ee0cef696056941265815ea1 | Shift filling pattern in 2d space | N = grid.shape[0]
for i1 in range(0, pattern.shape[0]):
for j1 in range(0, pattern.shape[1]):
grid[(i + i1) % N, (j + j1) % N] = pattern[i1, j1] | 1 |
5aa2756686706ef629bd95b402132eba | 262804d10dd4b0202684e502d706a7b9 | Diese Methode ermittelt den Wert eines Zielfelds basierend auf
den Werten einer Entität. | {
$baseValueIdentifier = strtolower($identifier);
$statusValueIdentifier = strtoupper($identifier);
$level = $this->getLevel();
$wesen = $this->getWesen();
$wesenFactor = 1;
switch ($statusValueIdentifier) {
case 'ATK':
switch ($wesen) {
case 'Frech':
case 'Hart':
case 'Mutig':
... | 1 |
6ee9df6f8e3cfa3b49c0b56bfa22bbb9 | 27dac4faa8c4ac369dd11450f0c5d82d | The webdriver is needed to use Selenium.
Users may need to modify the path to their local webdriver.
Dino automatically looks for the webdriver in its default download location (determined by local OS and selenium)
url: the url for the input page of the site to be scraped
path_to_webdriver: specify the location of the ... | class DashboardScraper():
def connect(self, url='http://184.73.28.182/'):
try:
self.driver.get(url)
except Exception as e:
print(e) | 0 |
5a56cc00cfabbbde32b51a87aba5f45f | 7b2cf9fb04fec65a0c61b1cb2fbdacdf | c = a mod n | void bignum_mod(struct bn* a, struct bn* b, struct bn* c)
{
require(a, "a is null");
require(b, "b is null");
require(c, "c is null");
struct bn tmp;
bignum_divmod(a,b,&tmp,c);
} | 1 |
9333f84301186044be1a33c58f20bfad | afda4a5a0aa8c63e15a80fd41aae5a7a | Ищет A и возвращает True, если такой есть, и False, если такой нет | if len(self.body) == 0:
return False
for elements in self.body:
if elements == item:
return True
return False | 1 |
b15fc19c6f7758148d4ad08de8dc0388 | 36d65091f0b030a0a4b60019a612931d | MOVE THE CURSOR TO THE END | class Interpreter:
def cursor_to_end(self, *args):
sel = window.getSelection()
last_child = self.zone.lastChild.firstChild
if last_child is None:
last_child = self.zone.lastChild
pos = len(last_child.text)
sel.setBaseAndExtent(last_child, pos, last_child, pos)
... | 1 |
f3535651ea971b2439bce85a0bcae552 | 18727d0de1377d7c1fc3313499902639 | Generates the strings array for the header of validated Override input file and Output Override file | namespace TASMOps.Util
public class IOLoadUtil
public static String[] UnloadVMSpecsHeader(bool isOutputMemoryInGB, string currency)
{
string[] outputVMSpecsStr = new string[NumberOfTotalColumnsVMResult];
try
{
int column = 0;
outputVMSpecsS... | 1 |
d9438ecdfe754605dc14fbc462c3f1d7 | add957f7d8d30b196f7b198b1d782bae | return the loweset index of dead nobin. return -1 if all the nobins are alive | {
for (int i = 0; i < MAX_POP; i++) {
if (!bunnyPop[i])
return i;
}
return NULL;
} | 0 |
97e0fe43e73da4de97f3daaa59267a7d | ac691b03e286817d0005424de6998c64 | Get a set of all connected remote slave clusters. | def get_master_slaves(server, options=None):
if options is None:
options = {}
options["columns"] = True
options["raw"] = False
return server.exec_stmt("SHOW SLAVE HOSTS", options) | 1 |
cc3e83390f93b986f28331cb74ef18b7 | 9ea9b320cec59217b6b17baf6ca85c7c | {@code GET /plannings/:id} : get the "id" planning. | class PlanningController extends Controller
public function show($id)
{
} | 1 |
1bcaef98d7ac8684a71d9725f852860d | 82074d548ef3bcffe9fb8c3f13d0f305 | writer(q, host, cdir)
safely writes simulation outputs to a text file when using multiprocessing | def write_local_run(fname,version,H,D,rho,tol,ctme):
writer = open(direc+'local_runs.sh','a')
if writer.tell() == 0:
print >> writer, '#!/bin/bash'
print >> writer, ''
print >> writer, 'echo %s' % (fname)
if version == 'nat':
print... | 0 |
575a77822d812ff2b3850624674f66a5 | b4c0d51c2be29d240bff531291a2e618 | Save Employee Type | {
using (var TypeSvc = new EmployeeTypeService())
{
await TypeSvc.CreateAsync(new EmployeeType()
{
Name = name
});
}
} | 1 |
4876d95a68fe51afda8fffe073d004d1 | 16e1853a505792514164e5ef0600ba0d | deleteAssociatedPart() deletes the selected part from the associated parts array in the current product object.
<p>
An alert appears to receive user confirmation first before deleting the associated part.
<p>
If no part is selected or the user declines confirmation, nothing happens and method is exited.
<p>
Deleting as... | public class ModifyProductFXMLController implements Initializable
@FXML
private void addAssociatedPart(ActionEvent event){
Part selectedPart = this.partsModifyTable.getSelectionModel().getSelectedItem();
if(selectedPart != null){
this.associatedParts.add(selectedPart);
this.p... | 0 |
d964ef8a7b27a6b74ee7e6736d8623bc | 52613c0dd7b365e3d6957763d9dacab8 | 分配一个AID | {
int atid = -1;
spin_lock_bh(&t->atid_lock);
if (t->afree) {
union aopen_entry *p = t->afree;
atid = p - t->atid_tab;
t->afree = p->next;
p->data = data;
t->atids_in_use++;
}
spin_unlock_bh(&t->atid_lock);
return atid;
} | 1 |
26cbb8c02afcdce7297ca8cf34041f26 | cc0c26b610d198e7b1679ccd176eed96 | 2.4.42 CF, page 228
The CF record specifies a conditional formatting rule. | {
var cfrs = new List<NPOI.SS.UserModel.IConditionalFormattingRule>();
var scf = cell.Sheet.SheetConditionalFormatting;
for (var i = 0; i < scf.NumConditionalFormattings; i++)
{
var cf = scf.GetConditionalFormattingAt(i);
if (cell.ExistConditionalFormatting(cf... | 1 |
365ea16293151d02dfbcdf4de3778f07 | 44907674b93e8298a14df83a59f7990a | cast ray through terrain map and determine the intersection point on any occluding trianglular surface | namespace Prometheus.Core.Render
public class EnhancedMesh
public bool RayBSPIntersectLight(Vector3 Origin, Vector3 Direction, bool Cull, out Vector3 point,
out float[] UV, out float t)
{
if(this.m_BspVerts == null)
{
point = new Vector3(-1,-1,-1);
UV = new float[2]{-1,-1};
t = -1;
return f... | 1 |
3eff1e3c71facfbbc0de021effc4b95c | bf85b7badb574ab6960c50fbe10b651d | Bring the player back to the main menu when returning to the Skillz UI. | {
if (!GVM.multi)
{
GVM.backToMainMenu = 2;
if (PlayerPrefs.getSingularity().lastLevelPlayerId[0] == 0)
GVM.backToMainMenu = 1;
}
else
{
GVM.backToMainMenu = 3;
}
} | 1 |
d795fea58ad9114c4d09809bfca0f058 | a788d6eceed24aab9a208cca8a27fa0a | Get the service URL from Kubernetes | with open(self.settings['kubernetes']['service']['webserver'],
'r') as fd:
try:
service_spec = yaml.safe_load(fd.read())
except yaml.YAMLError as e:
logging.error(
'Invalid webserver spec: %s\n%s',
... | 1 |
295b130c30a02984998f754303ab3656 | 2ee103ada56286e3a79f11634b7a3ed7 | 查询连线:from_state_id为连线左端点,为空则返回左右连线 | public class QueryTrffLn
public String QueryLnOnSta(String id)
{
String resultStr = "";
DataTable ptable = dbOperation.ExecuteQuery("select * from BUSLINE");
try
{
int nameIndex = ptable.Columns.IndexOf("name");
int idIndex = ptable... | 0 |
a34dd72e11bd9ac73bbd552870899d85 | fc98ad3a4d054bef208df184a127e228 | Sends a **Card Reader - Enable** command to SPOT.
+---------------+----------------+
| Command class | Command type |
+===============+================+
| 0x20 | 0x01 |
+---------------+----------------+ | tx_array = []
tx_array.extend(self.uart_split_byte(0x01))
tx_array.extend(self.uart_split_byte(0x0A))
tx_array.extend(self.uart_split_byte(0x00))
tx_array.extend(self.uart_split_byte(0x03))
tx_array.extend(self.uart_split_byte(0x04))
tx_array.extend(self.uart_split_byte(0x10))
tx_array.extend(self.uart_... | 0 |
dde3c6cb19f5c093302f710eb47b67bd | 127750aa9d84f23667eb75de5c22b545 | finds the first unique list/tuple item | if alist is not None:
temp = [alist[0]]
for elem in alist:
if elem not in temp:
temp.append(elem)
return temp
return None | 0 |
059af3c35d27854c7af2201dcc5ca2bb | f5d272d40f382ea78d310c04c66af4cd | checa se a linguagem é suportada pelo usuário/browser | function verificaFlash() {
$listaFlash = 'windows,macintosh,x11,mac_powerpc,';
$arrayFlash = explode(",", $listaFlash);
$teste = 0;
for ($i = 0; $i < count($arrayFlash); $i++) {
$teste = $teste + strpos(strtolower($_SERVER['HTTP_USER_AGENT']), $arrayFlash[$i]);
}
if ($teste > 0) {
... | 0 |
a27b4607b6f6274719bc19d5cfd2e4fe | 19ad80e692353224467cbbded2fe463e | save JPEG image | {
IMGS_ENCODING_PARAMS_T encParam;
IMGS_ERR_T err;
MCI_TRACE(MCI_CAM_TRC_LVL, 0, "MCI_CamSavePhoto");
encParam.format = IMGS_IMG_FORMAT_JPG;
encParam.jpg.quality = g_mciCameraInfo.imageQuality;
err = imgs_EncodeImageFile(&g_mciCameraCaptureFbw,filename,&encParam, NULL);
if (IMGS_ERR_NO == er... | 1 |
5419ffa4158cfeeedee136aeee16a8f4 | d5767b7554d3b6520ad7a1515943deec | Clear out the nearestNeighbors so that it gets recalculated | class Centron:
# holds information about a centron for kmeans clustering
def clear_neighbors(self):
self.neighbors = [] | 1 |
4815c65e39b8a183b19167082fd01c71 | 0cfe1333aabf0d0964580a6ffbcf4269 | Fix to make sure errors are displayed in debug mode. | class FunctionalTestsBootstrap
protected function enableDisplayErrors() {
@ini_set('display_errors', 1);
return $this;
} | 1 |
fc8c2fc361e5d87ac44f9a63bcea047b | 9b5523d6fc893ddbdea21cb2facd7f2d | 获取我的下级员工id集合 | {
List<int> retDepartmentUsers = new List<int>();
List<DepartmentUser> departmentUsers = DepartmentUsers.Where(d => d.UserId == userId).ToList();
departmentUsers.ForEach(d =>
{
if (!retDepartmentUsers.Any(s => s == d.UserId))
{
... | 1 |
b104ec52b280a31bc2e44ceaefe16e35 | b45ab8dbb88c5501606b8e677bf59445 | 查询公募基金列表 | export default class FundConfiguretionService
public fundList(fundConfigureQueryVO: FundConfigureQueryVO) {
return AxiosFun.post(
AxiosFun.valuationManageServiceName + "/fund/configure/list",
fundConfigureQueryVO
);
} | 1 |
779c4d9d448646a36e081cea6c2b3df9 | f8698a2819a779a2b9210d46a899b1d4 | Updates a post from a markdown file and saves it in the database. | user = authenticate(username, password)
post = Post.objects.get(id=post_id)
if entry.get('dateCreated'):
creation_date = datetime.strptime(entry['dateCreated'].value[:18], '%Y-%m-%dT%H:%M:%S')
if settings.USE_TZ:
creation_date = timezone.make_aware(creation_date, timezone.utc)
... | 1 |
4bcf90e0bdd06fee32c410ebf7bac0c7 | e9d39c677eae7fc154ac35aa445f32c5 | Removes last part of the directory (goes one up) | static int parentdir(char *path)
{
char *last = strrchr(path, '/');
if (last == path && path[1] == '\0')
{
return 0;
}
if (last == path)
{
path[1] = '\0';
}
else
{
*last = '\0';
}
return 1;
} | 1 |
e1231f5c9b7b1b49a1c57eb1ce23e320 | 0f0608189286e0eb7b5447fcdba1de87 | 计算函数,函数运算前已检查参数个数 | void calculate(int num_1, int num_2, int(*p_function)())
{
int result;
result = (*p_function)(num_1, num_2);
printf("%d\n", result);
} | 0 |
f650737d9a081cb507b05a13a18a7f68 | 23e426ac12c5aafd861c0bf245a21911 | Returns whether all points have been collected | public class Coins
public boolean areCoinsCollected()
{
return coinsCollected;
} | 0 |
36a9de844e4ebaa65f7a19323fd96fd4 | 5df25aafdcb682ff5519b0e64d373574 | Makes the previous component in the history visible, replacing (and
essentially forgetting) the component that was previously visible. | public class Utils
public static void showPrevious(JFrame previous, JFrame current) {
current.setVisible(false);
previous.setVisible(true);
} | 1 |
6d965b062834b423b9f95650d6c4b3a3 | 643abdc8dcc615e3b4f1e7d5f4b9261c | 将日期转化为 MM.DD格式 | function dateMMdd(time) {
var tmp_date = new Date(time);
var td_mm = tmp_date.getMonth()+1;
var td_dd = tmp_date.getDate();
return td_mm+"-"+td_dd;
} | 1 |
b5129394c3994fdda6d2b8933c381463 | dec3e62a3295958773e73a3ae59c1320 | Si occupa di aggiungere o sottrarre melassa ad uno dei serbatoi e di non farla andare oltre il suo massimo | void IceAge::Staty::setSila(short novaSila) {
this->m_sila=novaSila;
} | 0 |
6de8d70550f0baa4eadb413f3784db4a | 9abba324d5475bf1067d55771fe7804d | Test the term hierarchy. | $append = False;
$post_id = $this->factory->post->create();
$test_toplevel_term = CATG_AUTHORS;
$test_author_names = array('A Author', 'B Author');
$test_replace_author_names = array('C Author', 'D Author');
$toplevel_term = create_terms($test_toplevel_term, WC_CATEGORY_TAXN);
$child_terms = create_term... | 1 |
208390c3b7261624581832252efb0ae1 | 2a82b4d540547c5c672b852d12e11483 | First second of the day | function time.get_second_of_day()
return (ev.time + TIMEZONE)%ONE_DAY
end | 0 |
309bcd1af967cca1360e565dd1a251a0 | 76a54b6580d019f252ac070d600c05e9 | 关闭打开的Excel 文件,默认情况不保存文件 | namespace WLib.WinCtrls.FileCtrl.Office
public class ExcelBase : IOfficeBase
public void Close()
{
try
{
if (_excelAppClass != null)
{
_excelAppClass.EnableEvents = false;
System.Collections.IEnumerator wks = _ex... | 0 |
3f2e0a0ba16c40e6cb5c7122de9d6e31 | a63c7986a463eb3d52a0abd4b1bf10f4 | Recursively iterates over the enumerated data dictionary and generates every permutation of data possible. | params = []
for key in ordered_keys:
params.append(dic[key])
params = list(itertools.product(*params))
params = [list(p) for p in params]
return params | 0 |
e3f4ed1e95069e4d6f04eff1e9ad4fa6 | 993bb44390631b44ed1f9e355211a23b | 下载并返回歌词字符串 | var st;
$.ajax({
type: "post",
url: "./getlrc.php",
data: {
musicname: str
},
async:false,
dataType: "text",
success: function(con) {
if(con){
st=con;
}
else{
alert("发生错误!")
... | 1 |
f677633263332d917641663a1bf43787 | 8c5900cb2f2285e5ee4e64c9cbc06197 | 新規登録画面にに必要なデータを取得する | class NetworkService extends Service
public function getDataForNew($params) {
return $this->run('getDataForNew', array($params));
} | 1 |
33d467d47ae77cadc18811bacae0ca24 | ddb15c4e292a425e639277a0241801bf | Take raw data and turn it into a DTO | class CommentDataFactory
public function createDto($request): CommentDataDto
{
return new CommentDataDto(
body: $request->get('body'),
comment_id: $request->get('comment_id')
);
} | 1 |
18cfc0e7ee36f15452a650e1c1d62abe | d31e1e1d5930195847dc44dc514284df | @brief This function handles External lines 2 to 3 interrupt request. | void EXTI2_3_IRQHandler(void) {
} | 1 |
79da91ef555bb88633c3dd232205c5d3 | b9c4a15dffe6684db24d5169bc0169d7 | 根据templateId和template类获取指定的template object。 | String createObjectFromTemplate(String templatePID, String comment) throws ServerOperationFailed; | 0 |
ab8fc7b468f355837b9f5ebd4a257e63 | 3252887c5bca50715ac9454d263c647a | Test for Prepare call with no toppings | class Solar_Markdown_Extra_DefListTest extends Solar_Markdown_PluginTestCase
public function testPrepare()
{
$source = "foo bar baz";
$expect = $source;
$actual = $this->_plugin->prepare($source);
$this->assertSame($expect, $actual);
} | 1 |
55311bfd2ce133d08a082685890c9b51 | ec5470c3c2d283d926f81498b2d5ff76 | calcul de l'impôt | {
$pensionAlimentaire = $this->clients->getSituations()->getPension() * 12;
$proprietaire_creditAnnuel = $this->clients->getPatrimoines()->getProprioCredit() * 12;
$locataire_loyerAnnuel = $this->clients->getPatrimoines()->getLocaLoyer() * 12 ;
$chargesAnnuels =
$pensionA... | 0 |
0a41f520c5d49b6c52e5d2da827c2063 | 184053e4b7829dd5b5522c268f167e69 | Sets a new shipToTradeParty | class HeaderTradeSettlementType
public function setPayeeTradeParty(\horstoeko\zugferd\entities\extended\ram\TradePartyType $payeeTradeParty)
{
$this->payeeTradeParty = $payeeTradeParty;
return $this;
} | 0 |
a01e4e8dd71b4e52f7d795572a010306 | 988d787955e38c5b7b44993518e6953b | A version of Confuse's LazyConfig that also merges in data from
YAML files specified in an `include` setting. | scope = kwargs.pop('scope', inspect.stack()[1][0].f_globals)
scope.setdefault('__included_files__', [])
included_files = scope.get('__included_files__')
including_file = scope.get(
'__included_file__',
scope['__file__'].rstrip('c'),
)
conf_path = os.path.dirname(including_file)
... | 1 |
e2cd9385c50e18561535cde20090f0b3 | 46533705bed92ea72b98921f53ee5977 | Retrieve the ItopapiEnclosure related to this instance | class HasEnclosure(object):
def find_enclosure(self):
if self.enclosure_id is not None:
return ItopapiPrototype.get_itop_class('Enclosure').find(self.enclosure_id)
return None | 1 |
5d57816356227a8ed7c940d1ec3a96ec | 58db330f7ab972e07dd576dd1273f2bb | A migration with a FK between two models of the same app does
not have a dependency to itself. | schema = r'''
type Foo {
property name -> str;
annotation my_anno := 'Foo';
}
abstract annotation my_anno;
'''
self._assert_migration_consistency(schema) | 0 |
6b8308db9f3f77ba0d3716dcadab50b5 | ea304ff66332505a648f4cf6e0c38037 | Tests reasonable counting behaviour with loops | class InterfaceTester(TestCase):
def test_loop_with_let_count(self):
text = "let n 10; loop n { foo }"
exp_result = [Loop(10, SequentialGateBlock([Gate("foo", [])]))]
let_dict = {}
self.run_test(text, let_dict, exp_result) | 1 |
2dd26818b352a37aa1af3b80b16a8514 | cac5b7def68429174b44ea981bad79fb | Remove all registered item classes. | void clearClasses(); | 1 |
9ce4f12386706cf921c6ae6b326352a0 | 26be37bdbef706dc805b25dcb8313344 | 获取病人的亲属姓名 | {
PatientInfo zyP = BindEntity<PatientInfo>.CreateInstanceDAL(oleDb).GetModel(patID);
if (zyP != null)
{
return zyP.PatName;
}
return "";
} | 0 |
17e0cad5d7e715fc2a3238e880cebf2b | 6bdf73bcaa3727fa2f966f912e928046 | Do nothing in the default implementation. | public class DefaultDragAdapter<C extends AbstractController<?, ?>> extends AbstractDefaultAdapter<C> implements DragAdapter
@Override
public void drag(final DragEvent dragEvent) {
} | 1 |
6d60d92f1048cb7dea359f2f18bc58f4 | 53d7ce8f7523ddd544f0a6595920e016 | Reads base URI and port | const info = parseUrl(url);
const defaultPort = isHttpsProtocol(info.protocol) ? 443 : 80;
return { host: info.hostname || "", port: Number(info.port || defaultPort) };
} | 1 |
9a4b5b6e9ee567dde6db1c142bb1a286 | 0de0d679e86c57b8a44e1d4409b21b1a | 更新连接服务 | Intent in = new Intent(MainActivity.this, UpdateService.class);
bindService(in, myServiceConn, BIND_AUTO_CREATE);
} | 1 |
456d5853d70079e6f91354555f949d88 | 0bf69d2291a4a75de38e1dac3a353de0 | テナント管理者が選択可能な登録済みのGitエンドポイント一覧を取得 | export class ZapProvider
async getEndpoints(): Promise<string[]> {
return await this.zapRegistry.getProviderEndpoints(this.providerOwner);
} | 0 |
ede910690f486acf9e32b5c2136a1cfe | 7c40a3380e30793e4295feadecaa744e | 当前时间离明天还有多少秒 | func GetSecOnToday() int64 {
return time.Now().Unix() - GetToday()
} | 0 |
8281ec665457dc5c2e28ce3c135374d9 | 3536e59353d94add4393a309e6d5753f | Obtain the player types and the number of each type to play | int numbOfPlayers;
cout << "How many players will be playing?\n";
cin >> numbOfPlayers;
bool correct = checkNumber(numbOfPlayers);
while (!correct){
cout << "Please choose a valid number of players. How many players will be playing?\n";
cin >> numbOfPlayers;
correct = checkNumber(numbOfPlayers); }
while ... | 0 |
e17de23384f7aeaa9af44bb2ab045785 | d4c8eaac244f0159a1d56b5a799dc622 | 利用训练好的模型标记每个字 | class ModelLoader(object):
def predict(self, sentence, word2id, id2tag, batch_size=128):
if sentence:
not_cuts = re.compile(u'([0-9\da-zA-Z]+)|[。,、?!.\.\?,!]')
result = []
sen_part_words = []
sen_part_ids = []
... | 1 |
088ea9e798d0732ee06bf4e17b6a056c | 9f7a4efa89cddcc2f9a6f6d69a54b488 | 快速开始房间筛选,身上金币数/2进入能进入的最高场次 | local this = self
if gameRoom.maxCoinsQty <= 0 then
return true
end
if coins <= gameRoom.maxCoinsQty then
return true
end
local params = {
msg = string.format('您的金币已超过准入上限%d, 请移步到更高级别的房间. 谢谢!', gameRoom.maxCoinsQty)
, grayBackground = true
, closeOnClickOutside = false
, buttonType =... | 0 |
6d2a88dabe7229e0bcc2b4732d7258d5 | ee931ded2c7ba5a9f8acf1005e55b6af | Get bar offset. | class NIRCam(object):
def bar_offset(self):
return self._bar_offset | 1 |
96567d447e0a8839e25e3b04307458d6 | 681b602c3b2526072b59925e71094153 | Initialize a 2D pooling descriptor.
This function initializes a previously created pooling descriptor object. | public class Pooling2dParameter extends com.intel.daal.algorithms.neural_networks.layers.Parameter
public void setIndices(Pooling2dIndices sd) {
long[] size = sd.getSize();
cSetSD(cObject, size[0], size[1]);
} | 0 |
2f37c20ae697f0f11980c422d7b1a688 | f8dcab56e886eed31a33cfa5f5e831bb | Describes a class by creating a new instance of {@link ClassDescriptor}
that examines all accessible methods and fields. | ClassBuilder newClass(String className); | 0 |
642526816cf1a3d77b9d928b658124be | 99155ba43db9354c9107b9716f1024c8 | GET /type-contact-facility-types : get all the typeContactFacilityTypes. | class ContactTypeController extends Controller
public function index()
{
} | 0 |
d3cfd8f9f101e4f5483d2d2913447d86 | 331ed74eb5b5bd076ce3067a7a95666c | GET: api/AdminStudents/5 | namespace School.Controllers
public class HomeController : Controller
public ActionResult Admin()
{
var student = storeDb.Student_Information.ToList();
return View(student);
} | 0 |
0248ab759965b96d67b6d7694deb9721 | cb032c0da628737dbd91bd53b1cba3d5 | 将heart的原始数据进行预处理,例如转换类别标签,处理Nominal属性 | def preprocessing(data):
feature = data.loc[:, ["feature1", "feature2", "feature3", "feature4"]]
label = data.loc[:, ["class"]]
feature['feature2'] = (feature['feature2'] - feature['feature2'].min()) / (
feature['feature2'].max() - feature['feature2'].min())
feature['feature4'] = (featur... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.