query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ef4c20350ae18c227c386e024e548d90 | 09f3d22a423f57a18b94e473d7a6b726 | Функция должна эмулировать событие click для элемента target | function trigger (el, type) {
var e = document.createEvent('HTMLEvents')
e.initEvent(type, true, true)
el.dispatchEvent(e)
} | 1 |
964a773c3081ae03ba3902ab6aa5642d | 25f58bf85035b424089f068a88a72f3b | Funcion para validar si un producto esta presente en el carrito | {
global $pdo;
$sql = "SELECT nombre FROM productos WHERE nombre=$productos";
$result = $pdo->prepare($sql);
$result->execute();
if ($result->rowCount() > 0) {
return true;
}
return false;
} | 0 |
c4407cde7c29a81fc176e2a389d42425 | 1c7c6e3cb06f20f5e2aba5f0df52b513 | Set textview 'tv_question' to a question. | public class DetailQuestionFragment extends Fragment
public void setQuestionTest(String questionTest){
mQuestionEditText.setText(questionTest);
} | 0 |
37080771f7eedff4fb2b517dac224b5d | 531115eea5f4be5e764443d87ee6a732 | See https://github.com/webpack-contrib/terser-webpack-plugin#parallel | chunks = [].concat(chunks)
let bundledChunks = []
let bundleTasks = this.bundlers.map(({ regexp, bundler: Bundler }) => {
let bundleChunks: Chunk[] = []
chunks.forEach((chunk) => {
if (chunk.type !== SCATTER) {
if (Array.isArray(chunk.destination)) {
for (let i = ch... | 0 |
fdf295d11d75ae684ec2e2b48c5608ab | 714458756a98fd3e57cd3b1788dc381c | System.Collections.Generic.List`1/Enumerator<!0> System.Collections.Generic.List`1<UnityEngine.EventSystems.RaycastResult>::GetEnumerator() | RuntimeObject* U3CCreateCastIteratorU3Ec__Iterator0_1_System_Collections_Generic_IEnumerableU3CTResultU3E_GetEnumerator_m1348045531_gshared (U3CCreateCastIteratorU3Ec__Iterator0_1_t1585159177 * __this, const RuntimeMethod* method)
{
U3CCreateCastIteratorU3Ec__Iterator0_1_t1585159177 * V_0 = NULL;
{
int32_t* L_0 = (... | 0 |
2882dde2e92a4ed3778204f0923d4300 | a4238918b26168af8e6788c389251134 | Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
and contains a ELF build ID whose value is valid and is 20 bytes long. | class TestDumpACPITable(GRRChipsecTest):
def testDumpValidSingleACPITable(self):
args = rdf_chipsec_types.DumpACPITableRequest(table_signature="DSDT")
result = self.RunAction(self.grr_chipsec_module.DumpACPITable, args)[0]
self.assertLen(result.acpi_tables, 1)
self.assertEqual(result.acpi_tables[0].tabl... | 0 |
166039978cfbd1453acf41888602cd4a | a522e05b883a8a6c3e498e6a3511bce5 | Post semaphore when interrupt is thrown by the accelerometer | static void AccelSensor_clockHandler(UArg arg)
{
events |= arg;
Semaphore_post(sem);
} | 1 |
d2716846170f356a71405bbfab4dde2f | eca62a45f05fd9ca52e536f83a43f0ed | 根据传过来的urls集合,并行抓取url对应的内容,抓取方法由WebTaskReader子类实现 | try:
ret_data = kwargs.get('ret_data')
tasks = [
asyncio.ensure_future(spider(url, parser_method, **kwargs))
for url in urls
]
loop.run_until_complete(asyncio.wait(tasks))
except Exception as e:
raise e
return ret_data | 1 |
b92ff0bbb29aa68519a9be83d2a53c3f | 30ce9b5e59f9a80b5f2509d1cd67f5b3 | TestCrawlerTaskRequest will test a crawler task request in general so its getters and setters. | class ConfigmgrApiTest extends \PHPUnit_Framework_TestCase
public function testComDayCqRewriterLinkcheckerImplLinkCheckerTask()
{
} | 0 |
ec7b82f5f21400aa0219e8f8723df92f | a50bbf7bed75e9a6046245b4cf884959 | Saves Entries through the HashMap object in file in JSON format. | void saveInFile(String filename, HashMap<String, LinkedList<Long>> hashMap) throws IOException; | 0 |
6731c50f726a11b33c8bd1cfbd65fc2c | 897514d6244cc79e8b710289dc30a7b5 | Setting options, e.g. validation groups. | class DeviceSubscribeType extends AbstractType
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'validation_groups' => ['chang.messenger'],
]);
$resolver->setRequired('data_class');
} | 1 |
6e38f897bdc199cf68dceddb629590c9 | ad67762acbf80489b5e11d8855c79356 | Reads the odd lines from the given file. | class OddLines
public static void Main()
{
bool isLinux = false;
string filePath = "..\\..\\Files\\TextFile.txt";
if (isLinux)
{
filePath = filePath.Replace('\\', '/');
}
OddLinesReader(filePath);
} | 0 |
32f7ca483aca3ee3b4796cd44bd37c94 | 873b7909484d4f20d9331f9adb0c3ccc | 删除文件和数据库记录 | {
DB::beginTransaction();
$deleted = parent::delete();
if (!$deleted) {
throw new FileException('文件记录删除失败');
}
if (!$this->hasSameFile()) {
$storage = Storage::disk('uploads');
if ($storage->exists($this->path) && !$storage->delete($this->p... | 1 |
6d84bafd905eaac09a414b9cc9ef5499 | 5fb276ba521a482b10b45fb83f070fa7 | Counts the masked pixels. | {
int result = 0;
QList<int> values = maskCountMap.values();
QListIterator<int> valuesIt(values);
while (valuesIt.hasNext())
result += valuesIt.next();
return result;
} | 1 |
db1f3be032aa1a3f0e59f0cce48488c2 | 7adcbda3138d38680ab100f11e43b8ac | loads a named label pointer
(needed for mobile process initialisation) | labelInfo *locateLabelPointer(char *nameOfLabel)
{
int i=0;
if (nameOfLabel == '\0')
{
return NULL;
}
else
{
while(i<g_labelNum)
{
if (strcmp(nameOfLabel, g_labelArr[i].name) != 0)
{
i++;
}
else
{
return &g_labelArr[i];
... | 1 |
5836fa979bc5960c23617bee0c20a9e1 | 74db096c20cc7f2c0c246c1be1a79298 | Return the point of intersection of two lines as given.
Lines are pairs of (absolute) points.
If there is no intersection, return None. | def line_intersection_point(line1, line2):
pass | 1 |
e0e868659b2efec6840bc6bc5f1f0119 | 240b2098ad3b689fd48d1d2581dec767 | 管理者のみの項目に対する更新 | {
$str_column_name = "column_name_"."$request->column_id";
$str_column_type = "column_type_"."$request->column_id";
$str_required = "required_"."$request->column_id";
$validator = Validator::make($request->all(), [
$str_column_name => ['required'],
$str_column... | 0 |
b87108ded948e3ceccf517ca94a8c6e1 | f88c1d17ec8a0599bb6bd4c8e7d0bc34 | 获取从TdApi获取到的账户资金情况数据接口 | class BinanceDm(object):
def get_dapi_account(self):
request_path = "/dapi/v1/account"
params_dict = {
"timestamp": self.get_time()['serverTime'],
}
return self.api_key_get("https://dapi.binance.com", request_path, params_dict, self.access_key, self.secret_key) | 0 |
5e5833d8d7755b7945731194795bbf14 | 1802654f22ae0d3489de9d1d6df33ea0 | Returns a boolean indicating whether a datastream for a piddable object
exists in the Fedora repo | class FedoraConnector_Import
public function canImport($datastream) {
return ($this->getImporter($datastream) !== null);
} | 0 |
4be8417fa308209464b9bd21ce6b8295 | b54991473953bfac1a2ea3c050d6b009 | calculate the Pearson correlation and return ( 1 - Pearson correlation ) | def corr(x,y):
c=np.cov(x,y)
return c[0,1]/np.sqrt( c[0,0]*c[1,1] ) | 0 |
38690b00f3e48503376a589dccc79c2c | 134b300e2d592d685f44ba390300eebe | 根据字符串创建svg | $string = strtoupper(mb_substr($string, 0, 1, 'utf-8'));
$data = base64_encode('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="200" width="200"><rect fill="' . $this->color($string) . '" x="0" y="0" width="200" height="200"></rect><text x="100" y="100" font-size="80" fill="#ffffff" text-a... | 1 |
5d12f810123920a60fe5b4ea68276d97 | e3a029f4fb1b0d441faedc0bd2436016 | 己方子弹不会伤害己方坦克 | public class Tank
public void hitted(Bullet bullet) {
if(bullet.getType() == this.getType()) return;
if(bullet.getRec().intersects(this.getRec())) {
this.setLive(false);
bullet.setLive(false);
tc.explodes.add(new Explode(x, y));
}
} | 1 |
2ab12713732b5c6d7374eed914a6d346 | f9e98a60c198e48ce65cf23a68dca187 | does : frees all data associated with one triangulation | {
if ( t != NULL )
{
tsi_DeAllocMem( t->mem, t->extraXStrokeOrus_ptr );
tsi_DeAllocMem( t->mem, t->extraYStrokeOrus_ptr );
tsi_DeAllocMem( t->mem, t->extraXStrokeGlyphCount_ptr );
tsi_DeAllocMem( t->mem, t->extraYStrokeGlyphCount_ptr );
tsi_DeAllocMem( t->mem, t->extraXEdgeThresh_ptr );
tsi_DeAllocMem( t... | 1 |
1142fcff24509d84b0b4b28534b6c311 | badd58d532aa353f3c2eeba278e9db81 | 设置要加入的根布局对象。根据根布局获取键盘弹起、隐藏、键盘高度 | public class Keyboard implements ViewTreeObserver.OnGlobalLayoutListener
public Keyboard bindContainer(View containerView) {
mContainerView = containerView;
return this;
} | 1 |
e0838b0b4e2dfd2d9ddd3398fe062e32 | 6205d26e9197efe45967927f8e3b69b7 | プレイヤーの強制移動するためのドラッグアンドドロップイベントを設定する | class Sprite extends DisplayObjectContainer
set onDrag(func) {
this.on(Event.MouseEvent.DRAG, func);
} | 1 |
dbc2fa7bbe93f9159ff847816575d8af | f4159c9a24bc07e70d6f0b4d34ada092 | Updates the specified BAM activity milestone with the specified value. | namespace NHSD.BuyingCatalogue.Solutions.Contracts.Persistence
Task UpdateRoadmapAsync(IUpdateRoadmapRequest updateRoadmapRequest, CancellationToken cancellationToken); | 0 |
e2ca098842cec059a7ebdcc2caa72a00 | b8f8d085d970584e156ae65499a554c1 | 외부 저장소 앱 전용 디렉토리에 파일로 저장하는 함수 | String state = Environment.getExternalStorageState();
if(Environment.MEDIA_MOUNTED.equals(state)){
File file = new File(Path);
try(FileOutputStream fileOutputStream =
new FileOutputStream(file, true);
OutputStreamWriter outputStreamWriter =... | 0 |
d0a348ce9693dd304f138c0c8e5a124d | adf32e855a59401d2e7eb6f2472a1eee | Destruye los alimentos instanciados despues de cinco segundos | function cookAndDeliverFood(callback) {
setTimeout(callback, 5000);
} | 0 |
963bfdc3aa64f8fd1bd14ce055dd0fc5 | cd7af623efdddded82c76551600e34a2 | Adds the status and error attribute values from the {@link HttpStatus}
value. | public Map<String, Object> getErrorAttributes(WebRequest request,
boolean includeStackTrace) {
Map<String, Object> errorAttributes =
super.getErrorAttributes(request, includeStackTrace);
addErrorDetails(errorAttributes, request);
return errorAttributes;
} | 0 |
144c6be62b7a7a3e689fd4808dfc2b56 | a8bb727669aa6f35fc82d0b0a93e1d54 | 退出多屏 | void UIMultiviewExit()
{
UINT32 flgptn;
struct libpub_cmd cmd;
libpub_clear_message_queue();
flgptn = LIBPUB_FLG_MV_ACTIVE | LIBPUB_FLG_MV_EXIT;
if(get_mv(LIBPUB_FLG_MV_BUSY))
{
flgptn |= LIBPUB_FLG_MV_CANCEL;
}
set_mv(flgptn);
MEMSET(&cmd, 0, sizeof(struct libpub_cmd));
cmd.cmd_type = LIBPUB_CMD_MV_EXIT;
... | 1 |
b6c8e7827d0b11acb0d853d5babd9ffe | 75e37a849ed793debeb114351484b6f5 | Throw NotFoundException if expression is false (404) | {
if (!$this->_notFound)
{
$this->fail("Expected result to be notFound.");
}
} | 0 |
15590676b5287213a2981714dd43adac | f8b3e818e0c6d1bf215a6d986c52e1cd | Return twice the input value | def two_times(x): return x*2 | 1 |
6c2f2223e285e1be82d71cd9a54de418 | d039f1d85853b11a197d4a4a51169256 | #识别淘口令 | real_url = ""
if (re.search(r'¥.*¥', msg.text)) and (u'淘宝APP' in msg.text or u'天猫APP' in msg.text or u'手淘' in msg.text):
logger.debug(msg.text)
if u'打开👉天猫APP👈' in msg.text:
try:
url = re.search(r'http://.* \)', msg.text).group().replace(u' )', '')
except... | 1 |
6d960baf00211fc305b492fdfd535257 | 1693a682758d94fd94d92de4c34f0b53 | Get events by case id. | public abstract SLEXMMEventResultSet getEventsForCase(int caseId); | 1 |
9c064e2753f0fae4819235049e384179 | 303699d37e06fa87b56736fe754fa125 | #勝利者を決める関数 | function game(){
function judge(sumScore,enemy_score){
if(sumScore > enemy_score){
return '勝利';
}else if(sumScore < enemy_score){
return '敗北';
}else if(sumScore === enemy_score){
return '引き分け';
}
} | 1 |
adf62637c7a3428f90efc8354be4af5f | ea714825b47130b18d3dbe4d4c542934 | ログイン完了メッセージをプッシュ | public final class TCPMessageManager
public static void loginPush(@NonNull TCPInfo info) {
JSONObject json = (JSONObject) JSON.toJSON(info);
json.put(Key.ACTION.getName(), Action.TCP_LOGIN_PUSH.getName());
UDPPusher.push(json);
} | 1 |
678b94ff007ac55794d6171eb2dbe36d | 8d5854c068b3070be31b44f518412d03 | Clear the calibration quaternions for the IMUs | {
m_posSeq.Measurement.ClearValues();
m_posSeq.Estimate.ClearValues();
m_phaseA.Measurement.ClearValues();
m_phaseA.Estimate.ClearValues();
m_phaseB.Measurement.ClearValues();
m_phaseB.Estimate.ClearValues();
m_phaseC.Measuremen... | 0 |
903428d6be1ba99dec5e041206c24bf8 | 739941301410c1758482e979e07604cb | Method (LEGACY) to copy field values of duplicated (copied) fields | $product_fields = WPF_Field_Product_DS::instance()
->get_by_product_id( $product->get_id() );
foreach ( $product_fields as $fp_item ) {
$duplicated_fp = new WPF_Field_Product();
$duplicated_fp->set_field_id( $fp_item['field_id'] );
$duplicated_fp->set_product_id( $dupli... | 1 |
38baf58b52a6d5910dd81919b4261d75 | 5723ff8f8f69302d1652c58658481078 | Returns the image of the specified lock symbol for a level select button | public Image getTowerIconImage(int towerId) throws SlickException, ResourceNotFoundException; | 0 |
7be01a18ad76eb90a0cee316fd77a038 | 195323371c9d06612e4b5d289ed0c314 | Returns whether the value of the '{@link org.spiritconsortium.xml.schema.spirit._1685._2009.AddressBlockType#getUsage <em>Usage</em>}' attribute is set.
<!-- begin-user-doc -->
<!-- end-user-doc --> | boolean isSetUsage(); | 1 |
ca714fe82004911c63325bc0fe53453e | ad59b23151935248745535a87d7ffd7e | Construct serializable dict of spectrum metadata and fitted models
Input: `xspec.Spectrum` object
Output: dict of important spectrum information, including dicts of all
fitted models | fit_dict = {}
fit_dict['settings'] = settings
fit_dict['spectrum'] = {}
fit_dict['spectrum']['freq'], fit_dict['spectrum']['power'], fit_dict['spectrum']['model'] = f, p, {}
fit_dict['star'] = {}
fit_dict['star']['model'], fit_dict['star']['ID'] = {}, settings.star
fit_dict['fit'], fit_dict[... | 1 |
1868071108ac23dcd91838b75a873eff | c58c64c46752768683b12965ef7a0f0c | Converts a directory with dicom files to nifti files | def converttoNIFTI(work_dir, brain, prefix=None):
print ('Doing converttoNIFTI for %s -- ' % brain+time.ctime())
stdout_dir = os.path.join(work_dir, 'stdout_files')
if not os.path.exists(stdout_dir):
os.makedirs(stdout_dir)
f = open('%s/stdout_from_converttoNIFTI' % stdout_dir, 'w')
if prefi... | 0 |
855856ee217af92f849087ca70ad5ec3 | 10362fda732daf101f3b58ac8db06c7c | libretro callback; Retrieve the active region. | int setActiveRegion(hWindow *hw, int id, int x1, int y1, int x2, int y2, char margin, int knobxy1, int knobxy2)
{ hw->W[id].actx1=x1; hw->W[id].acty1=y1; hw->W[id].actx2=x2; hw->W[id].acty2=y2; hw->W[id].margin=margin; hw->W[id].knobx1=knobxy1; hw->W[id].knobx2=knobxy2; } | 0 |
2b0e0edebc3d6f0c14ef48e2be73c4b7 | bfd4498acbe2d0cc4f0879f0b5d9cc07 | Teacher结构体解码 | int TeacherDecode(unsigned char *indata, int inLen, Teacher **pStruct)
{
int ret = 0;
ANYBUF *pTmp = NULL, *pHead = NULL;
ANYBUF *pOutData = NULL;
ANYBUF *tmpAnyBuf = NULL;
Teacher *pStructT = NULL;
ret = DER_String_To_AnyBuf(&tmpAnyBuf, indata, inLen);
if (0 != ret){
printf("DER_String_To_AnyBuf Deco... | 1 |
af9cf70ca20632a230adf624b5e71a5a | 90b6517756245000a4702d5426de7802 | 获取url get参数 主要用于 index.html?a=100#/home这种 | const href = window.location.href
const args = href.split('?')
if (args[0] === href) {
return ''
}
const arr = args[1].split('&')
const obj = {}
for (const item of arr) {
const arg = item.split('=')
obj[arg[0]] = arg[1]
}
return obj
} | 1 |
98fc984f7cbdabd52428babcaec50936 | 3dbbe6ffa55a7013ef3f57b9656bee9d | 加载下级部门 过滤未选区域的部门 | if (saveExcutingFlag)
return;
saveExcutingFlag = true;
regionId = localStorage.getItem('area');
const { data, success } = yield call(areasService.queryChildren, { regionId });
let areaList = data.map(item => {
return {
label: item.regionNameChn,
value: i... | 0 |
1c74e8e18dc5c16dfdccf17f44ad53f6 | 9ef232e7d777be7565f54159ac81d092 | 获取游戏房卡配置 | export default class RoomMgr extends BaseMgr{
getFangKaCfg(){
return this.fangKaCfg;
} | 1 |
2a406a8b79142ae7db256812f49162a8 | d3b0968e8e47cb1dc044628531000ceb | Allow comparing dates with datetimes | newdate1 = isodate.Isodate("2008-02-28")
newdate2 = isodate.Isodate("2008-2-28")
self.assertEqual(newdate1, newdate2)
newdate2 = newdate1.add_days(3).add_days(-3)
self.assertEqual(newdate1, newdate2)
newdate2 = newdate1.add_days(10445).add_days(-10445)
self.assert... | 0 |
40c4fffd4e05601e872e9f0a49a4c7b6 | bf76969bd768da45b74d36012bd8da42 | ONLY MYSQL | function sqlQuery($qry) {
$link = dbConnect();
if($result = mysqli_query($link,$qry)) {
if (gettype($result) == "boolean") {
$link->close();
return $result;
} else if (mysqli_num_rows($result) == 1) {
$link->close();
return $result;
} el... | 1 |
ddca1678fbf774a3be1f72e4d22930a4 | 5dad8276d33d859f095931856daf522e | LSTM.recurrence(input_, prev_hidden, prev_cell) -> hidden, cell (batchsize x hidden_size)
Produces the new hidden and cell state, acting as a single computation step of an LSTM | function lstmp(input_size, x, prev_c, prev_h, rnn_size)
local i2h = nn.Linear(input_size, 4*rnn_size)(x)
local h2h = nn.LinearNoBias(rnn_size, 4*rnn_size)(prev_h)
local gates = nn.CAddTable()({i2h, h2h})
local reshaped_gates = nn.Reshape(4,rnn_size)(gates)
local sliced_gates = nn.SplitTable(2)(reshaped_gates... | 1 |
5443119a59c5ac781f6a8c08097167e7 | 19de1ab853ce1a76e4198eca843a06aa | Find the onset and offset of a thresholded prediction. | def findpt(x, f_osc, Fs=1000., w=3, boundary=0):
from util import firf
xn = firf(x, f_osc, Fs, w=w, rmvedge=False)
def fzerofall(data):
pos = data > 0
return (pos[:-1] & ~pos[1:]).nonzero()[0]
def fzerorise(data):
pos = data < 0
return (pos[:-1] & ~pos[1:]).nonzero()[0]
... | 1 |
80e5ad797d0cd87efabe303fe2ec5cb5 | cf3505706a8e134be65defeb19fcd619 | Get sales ledger invoicing details by customer name | namespace Microsoft.Dynamics.Retail.Pos.SalesInvoice
[Export(typeof(ISalesInvoice))]
public class SalesInvoice : ISalesInvoice
public void SalesInvoices(IPosTransaction posTransaction)
{
if (string.IsNullOrEmpty(((RetailTransaction)posTransaction).Customer.Name))
{
... | 0 |
fc329e0f95920875dd29276e72331863 | 04f5810d77373471609373370178d996 | Tries to get id from the request and returns if got it. | class RequestProtocolId
public static function isRequestId($pId){
$result=self::getRequestId($pId);
return isset($result);
} | 1 |
c295de88739f7861ca60ee12dfd10138 | e8dc62c721d12da0dcb7ad5fa6e57c41 | Given an action list, | fa_action_t fa_action_many(fa_list_t timeActions)
{
return fa_action_compound(_many, timeActions);
} | 1 |
a1dde47e4cd241900eed034e989ea0f5 | 1ca8dd8d18bf3cef11ce93c3bc1dd5a1 | 当文件保存在本机时, 由文件Id获取文件路径 | @Slf4j
@Service
public class FileInfServiceImpl implements IFileInfService
public String getFilePath(Integer fileInfId, String sessionId) {
if (fileInfId < 0) {
FileInfDto fileInfDto = tempFileCache.get(sessionId + fileInfId);
if (fileInfDto == null) {
return null;
... | 1 |
448159beb9a0f6e4647f6a3ba951a7d3 | 56df8c289416672585eaddb1fb1dfed2 | Gets the DateInterval difference between the start and end date.
A DateInterval object, or an empty string. | abstract class CalendarAbstract implements CalendarInterface
public function getDateTimeInterval()
{
return $this->startDate->diff($this->endDate);
} | 1 |
d1fff2d4f43f0ebfb35f66b4223e5730 | f875bba58a0a61168cf0cc67fc1e2ca0 | Fonction de première connexion avec le serveur et envoi des données entrées
Passage à l'écran principal si le serveur autorise l'accès | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((socket.gethostname(), 3002))
s.listen(1)
clientsocket, adress = s.accept()
start_transmisie = clientsocket.recv(1)
s.close() | 0 |
745978342e6c26653cb52c8ce917f9f2 | 0db6887286a79764a817e7f028fb1aa2 | Default method for getting all owner's possible hasMany relation models.
This can be overloaded and changed in owner's model class. | class BelongsToMany extends Relation
public function getResults()
{
} | 0 |
dea97c4bcc663c2cd0d9b4648e36a0a0 | 89ed47f366e2acb6596bba7ac6f3d124 | 1. lấy thông tin nhân viên, fill thông tin vào 2 tb mã và tên nv | namespace QuanLyNhanSu
public partial class frmNhanvien : RadForm
private void HienthiTTNhanVien(string ma)
{
cnhanvien.laydl(ma);
try
{
txtsymanv.Text = cnhanvien.ds.Tables["nhanvien"].Rows[0]["MaNV"].ToString();
txtsyhonv.Text = cnhanvie... | 1 |
db1c62eba026f8f4df91b5dc83e9ad23 | 47b7ca0308ba70e1ce7c8b697b1cd76a | Metodo para alterar orçamento no banco de dados | namespace Promig.Connection.Methods class Estimates
public void EditEstimate(Estimate estimate) {
try {
conn.Open();
string command = $"UPDATE {Refs.TABLE_ESTIMATES} SET " +
$"id_cliente = @id_cli, data_orcamento = @estimate_date, " +
... | 1 |
c00ce314a08674d7e7a6b6d9da6239df | 81171f5c2404582a82fad082ab39f2c0 | Sets button href | public class NotificationsLink
public NotificationsLink setHref(String href) {
this.href = href;
this.setFileName(href.split("=")[1]);
return this;
} | 1 |
278109085312486c7331eea9d6165f72 | ba63e8f06d16341e29b42d7e5896794c | test that reinsertions do not duplicate records. | id1 = self._db.insert_hash('1234', '123456')
self.expected_db[id1] = ('1234', '123456')
id2 = self._db.insert_hash('1234', '123456')
self.assertEqual(id1, id2) | 1 |
1cd6b05704fb96c3a72fa3f05bfc09f8 | c3cf9bffa87936ea07f4b66a825b3054 | Adds a member to an Azure Active Directory group | Group_AddMember_Request request, CallingSettings settings = null)
{
Contract.Requires(serviceClient != null);
return serviceClient.Call(_GetMethod("AddMember"), request, settings);
} | 1 |
f42f714a460ac6a9c27137a81bc93aba | 1bfcd670238c5dd1393bae9a9277d594 | (0xAF, XOR A) XOR A register against itself and store it (usually used to "zero" the register) | static void OpAAX0(void)
{
#ifndef SA1_OPCODES
CPU.Cycles += ONE_CYCLE;
#endif
ICPU.Registers.X.W = ICPU.Registers.A.W;
SetZN16(ICPU.Registers.X.W);
} | 0 |
99a1e0dd1f1ceb8da630cd6ef5901a39 | b380d2f3ce824b11621ae28165aa06b9 | show the current status of the application | class HomeController extends Controller
public function index()
{
$status = DB::table('status')->get();
return view('home')->with('status', $status);
} | 1 |
ad71641dcf3a5ee3e959a06c6dda6111 | 422230bba3e2c0dc2ff5202d8ca12eb6 | Get the value of dataVencimento | public function getDataVencimento(); | 1 |
a280cfec83bf83f7f3147b665c8800f8 | 8f764ff8aadc95375303c630bc2413cd | <p>
Returns the version of the DataTester framework.
</p> | public class MasterDataReportSCH
extends AbstractSCH
public static String getVersion()
{
return "";
} | 0 |
f2f7945720175018f9a143360c0948cb | 912c4ff58f6e259d0d1cc8623df5e001 | Obtain the date of aperture of the each company. | def get_detail_date(detail):
detail = detail.sort(columns='date')
dateList = []
dateNow = 0
detailDate = detail['date']
for date in detailDate:
if(dateNow != date):
dateList.append(date)
dateNow = date
return dateList | 0 |
d5800073d06cf27b7297155636fbac2e | 591cc748e622f8d7a546dfd509d3a0bc | Checks adding dinner to the planner is performed correctly | pantry = Pantry([ingredient.Ingredient("egg", 1, "piece")])
adviser = DishAdvisor()
advices = adviser.advise(pantry)
self.assertEqual(1, len(advices))
advice = advices[0]
expected_ingredients = {"egg", "onion", "garlic", "mushroom"}
advised_ingredients = set(map(l... | 0 |
9aa3fa765eb7f5c9dd8793917ab46cbb | 3873c0b12f6e9cdc0c26e01513b97158 | 通过日频的复权因子序列,填充成指定频率de复权因子序列 | sql = f"SELECT trade_date, code, adjfactor from ashareeodprices where trade_date>='{fromdate}' and trade_date<='{todate}'"
rawdf = pd.read_sql_query(sql, con=self.get_engine("ftresearch"))
df = pd.pivot_table(rawdf, values='adjfactor', index=['trade_date'], columns=['code'])
df.index = p... | 1 |
029209aafb9382d2076c14dbe938479f | d7fc300ff1223f494ef5be06673d397e | Refresh a token for the specified tenant. | {
var options = new InvokeOptions();
options.RequestMarshaller = RefreshTokenRequestMarshaller.Instance;
options.ResponseUnmarshaller = RefreshTokenResponseUnmarshaller.Instance;
return Invoke<RefreshTokenResponse>(request, options);
} | 1 |
a69bd3f00f805b3a095fe5d584a33cd6 | ce88af0a12bbbc5599074c1da8433606 | String to MAC Address | function getMAC( $in )
{
$in = getAlNumUC( $in );
if( strlen( $in ) != 12 ) return false;
return substr($in,0,2) .":". substr($in,2,2) .":". substr($in,4,2) .":". substr($in,6,2) .":". substr($in,8,2) .":". substr($in,10,2);
} | 1 |
b709b5cd54d6e93444f87f36804d0b73 | d5744bc56df131c6b4e8aeb1d659f0f3 | Returns the Vector with one of its values set to 0. | where
S: Zero + One,
{
Vector4::new(S::zero(), S::zero(), S::zero(), S::one())
} | 0 |
e1cc7f85fee1fa072231754014795583 | 62a8837b064e430b7a6be60615e9292b | DNSc_ReqIF_Sel()
@brief Select next interface for DNS process. | static void dhcp_selecting(dhcp_inf_t* pt_dhcpinf)
{
uint8_t* puc_opt = pt_dhcpinf->t_dhcp_pkt.uca312_options;
#ifdef PRINTDEBUG
printf("dhcp_selecting()\n");
printf("channel %d func E%04X,S%02d->", pt_dhcpinf->ul_channel, pt_dhcpinf->ul_event, pt_dhcpinf->ul_state);
#endif
dhcp_memset_local((&(pt_dh... | 0 |
5c640938c1636c32521be0643349dfe0 | ee8ef95bce2d9563012e3ca9cc71613b | Returns {@code True} if the reward based video ad has loaded. | class RewardedListenerInterface:
def on_rewarded_video_ad_loaded(self):
pass | 0 |
736d4a924c315915d2a38ae3d93c79ae | ecee5ede4d951977bf0d94059d366d60 | get accelerations from velocities | a = []
a_x = []
a_y = []
for v, t in zip(data['diff_v'], data['diff_t']):
v = np.array(v)
t = np.array(t)
a_t = (t[:-1] + t[1:])/2
a0 = v/a_t
a0 = list(map(lambda x: 0 if x==np.inf or x==-np.inf else x, a0))
if a0==[] :
a0=[0]
a.append(a0)
for v_x, t in zip(data['diff_v_x'], data['diff_t']):
... | 1 |
f60c319f83fd30adeb7f80478b6ab0ad | 0c6448af298c94c869de660beb30aae7 | From a list of user IDs, identify potential user groups. | public function groupList($user_ids); | 1 |
a2732f5908a7000ffed878e202ba8827 | aa96dc2300eef12e8af5a6dd422ad24a | 删除儿童健康体检医学指导信息 | namespace DrectSoft.SysTableEdit
public class SysTableManger
public bool DelDiagnosisOfChinese(DiagnosisOfChinese diag)
{
return DelDiagnosisOfChinese(diag.Id);
} | 0 |
531d797c655eb3c734d247b621dfe6d5 | 064421d78553061145810429042d23d1 | 获取所有好友的头像地址 | def headImg():
friends = itchat.get_friends(update=True)
for count, f in enumerate(friends):
img = itchat.get_head_img(userName=f["UserName"])
imgFile = open("img/" + str(count) + ".jpg", "wb")
imgFile.write(img)
imgFile.close() | 0 |
3283c757e2bb3b88bae98bddd90f9064 | 508593491a298958b93014a3c7733b10 | 如果链表为空,则不做任何操作,防止空指针异常 | public class DeleteNode
static void deleteNode(ListNode head,ListNode p){
if(p.next==null){
while(head.next!=p){
head = head.next;
}
head.next=null;
}
if(head == p){
head = null;
}else{
p.setData(p.getNext().getD... | 0 |
21717509fbb361fd4756dc3db0809bb1 | 0ce9bbde7e14bc0b48f3c9ee9ff3acac | Rotate servo to full left position. | void Sonar::lookLeft() {
setAngle(SERVO_MIN);
} | 1 |
74ce556d25385a50151802108f2766d5 | b55aceb9a3ac09b21eb5b54b74adeec1 | Keeps restarting updating bonds until bonds don't update any more | class PublicKeyCollector
continualUpdate() {
logger.info("Starting the continual update...")
this.updateMode = true;
this.web3.eth.subscribe('newBlockHeaders')
.on('data', (blockHeader) => {
logger.info(`Processing Block: ${blockHeader.number}`)
this.currentBlock = blockHeader.number;
... | 0 |
ec3d11a61cad2ef3c519bf2cd24bf3b9 | c44db229280351f0252a00b91fd2c2ac | Get the jockey associated with the specified runner | var runner ActionRunner
has, err := db.GetEngine(ctx).Where("id=?", id).Get(&runner)
if err != nil {
return nil, err
} else if !has {
return nil, fmt.Errorf("runner with id %d: %w", id, util.ErrNotExist)
}
return &runner, nil
} | 0 |
a7c815fc2306195e1f358bf31d0e7138 | d96e3a087536e7405c53e41ee30cfb48 | Test permutations of parameters to get_version() | regex = autoversion.VERSION_MATCHER
assert re.search(regex, "1.2.3") is not None
assert re.search(regex, "release_2_1.2.3") is not None
assert re.search(regex, "release_2_1.2.3.mender") is not None
assert re.search(regex, "release_2_1.2.3_mender") is not None
assert re.search(regex, "release.2_1... | 0 |
92cbc3f5d18bcde979b274d1d1d8f02d | 2b44499ecbb611569b89c60e82549d22 | 영업활동 리스트 조회 | @Repository
public class ActiveHistDAO
public List<Map> getActiveHistList(ActiveHistVO vo) {
return mybatis.selectList("ActiveHistDAO.getActiveHistList", vo);
} | 1 |
161d00aa059513172fc6f7274bfdb2d1 | 588256a5331f6ede7ea106cb566a16e6 | Возвращает колличество вершин многоугольника | namespace viva
class Polygon : public Node, public Drawable, public Colorable
uint GetVertexCount() const
{
return vertexCount;
} | 1 |
c1e223530b271fca11098fed968a77b4 | 4093699a138a2cf4b5927f9093e6de3d | Determines if the idtypeid has been modified. | public class TbMembershipBean
implements Serializable, GeneratedBean
public boolean isTbmtIdModified()
{
return tbmtIdIsModified;
} | 0 |
7e51efa6fd6c2f8e906c656929557e15 | fbd072ab9c1df06763a3b16de65922c2 | https://gist.github.com/mattdesl/e399418558b2b52b58f5edeafea3c16c | function colorToRgba(color: string): RgbaArray {
if (!canvas) {
canvas = document.createElement('canvas');
canvas.width = 1;
canvas.height = 1;
context = canvas.getContext('2d');
}
if (!context) {
throw new Error('Missing canvas 2D context');
}
context.fillSty... | 1 |
7e604ecab1e77fe42fca2f187f89f317 | 66a733cf53d701fc13f36eada4baba83 | 修改仿真资源 | @RestController
@RequestMapping("/api/public/course")
public class SimulationResourceAPI
@RequestMapping(value = "/clone_simulation_resource")
@AuthToken(role_name = "teacher")
public ResultResp cloneSimulationResource(@RequestBody SimulationResourceReq req, HttpServletRequest request) {
if (req == null... | 0 |
01d8304043a03eb1eaf82b055f8296a8 | c1a0f59d86f296b776413566c73e2a8a | Searches a SeqRecord for each oligo in the oligo list (and for its reverse complement). | def search(motif_list, seq):
loop_seqs = []
for motif in motif_list:
pos = motif[0]
if 48 <= pos < (len(seq)-52):
i = 48
while i > 3:
seq_chunk = seq[pos-i:pos+i+4]
if seq_chunk[0] == complement(seq_chunk[-1]):
ratio = c... | 0 |
d7b0e0247887becb159fac3ab7ef8607 | bcf5c61fbbd04e518e82c4536b7ea31c | Given an array, it returns all possible permutations of it in another array | let results = []
function permute(arr, memo) {
let cur = memo
for (let i = 0; i < arr.length; i++) {
cur = arr.splice(i, 1)
if (arr.length === 0) {
results.push(memo.concat(cur))
}
permute(arr.slice(), memo.concat(cur))
arr.splice(i, 0, cur[0])
}
return results
... | 1 |
27eb6b0f6ed3efc3f56ecb9cd89074f3 | 1b5d7a32d84c9a665eeb51cb10b6f09a | If current data exists, overwrite with new one | def overwrite(data, ref=head):
ref.set(data) | 1 |
a6b919bafb6e52e16fe72c986057b9ca | 6f60573853675fb29dc830bff2068ada | Create an instance of the Aliyun oss driver. | aliOssClient, err := oss.New(endpoint, accessKeyID, accessKeySecret)
if err != nil {
return
}
client = &Client{
aliOSSClient: aliOssClient,
}
return
} | 1 |
eb5ed2147cf5af2877a4e10875361a53 | 78a6218d93df8912b1272b0b29227914 | Update internal data after the batch simulation | {
move_solid_object( 0., 0., 1*dt);
uniform_grid.build(particles.x,particles.y,particles.z,particles.n_total_particles);
this->calculate_Densities();
this->calculate_Pressures();
this->calculate_Curvatures();
this->calculate_Forces();
float m = this->particles.mass;
for(int i = 0; i < t... | 1 |
91ec3d14d4227cd1c0a7a4eea68ff6cb | 5c99e20f7548afb7e350975edd8a4d7b | 既存のリファレンスドキュメントと最新のデータを比較して、概要とコメントを引き継ぎながら内容を更新します。 | {
List<string> currentReferences = GetCurrent(referenceType, referencesDirectory);
if (actualReferences.OrderBy(i => i)
.SequenceEqual(currentReferences.OrderBy(i => i)))
return;
RecreateEndPath(referenceType, referencesDirectory);
foreach (string actualReference in actualReferences)
{
Mark... | 0 |
f5354970b346245bfac3e63afd050e9f | 1770dbd5dcb5e217552a28c4ac35ddf1 | Returns a boolean describing whether to apply augmentation.
# Arguments | class MissingAugment():
def augment(self, img):
if np.random.rand() > self.skip_ratio:
img = self._do_augment(img)
return img | 0 |
7834a6553bbc5b7b15a2ac170f83da38 | 3df618405484637fe02b3f7fd12f4e5b | 用户领取优惠券接口 | class Api extends Http
userVoucher(data) {
return this.request('api/userVoucher/useUserVoucher', data, 'POST')
} | 0 |
bf304d8b8b956b4b0b9ace7025bafec6 | 3050d43c4936d14d45dfb989a229e04b | Deletes category name by language | class event_mainCategoryDb extends BaseDb
function getLangByCategoryId($id, &$rows)
{
$queryStr = 'SELECT ln_id, ln_name, ln_name_en FROM event_category LEFT JOIN _language ON ec_language_id = ln_id ';
$queryStr .= 'WHERE ec_deleted = false ';
$queryStr .= 'AND ec_id = ? ';
$queryStr .= 'ORDER BY ec_id, ... | 0 |
e88023c7a28a03a5aa959af95ae7a9f4 | 8e061efad1175dcd88dacf96512403e4 | Requests a list of the changes to quotas for a service. | {
var options = new InvokeOptions();
options.RequestMarshaller = ListServiceQuotaIncreaseRequestsInTemplateRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListServiceQuotaIncreaseRequestsInTemplateResponseUnmarshaller.Instance;
return BeginInvoke(reques... | 1 |
e4b28fc6022b7badc73ff98bfa5e3531 | cf78ea0405eb1f628e0c09b54e8a8b15 | Get time of last remind | class NotificationPage(publicpage.PublicPage):
# me_send_notification_detail_username_loc = (By.ID,constant.APPPACKAGE+"received_notice_username_textView")
#
# me_send_notification_detail_date_loc = (By.ID,constant.APPPACKAGE+"received_notice_date_textView")
#
# me_send_notification_detail_unread_... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.