query_id
string
corpus_id
string
query
string
code
string
label
int64
1a37859a6b5a99d8d9fd53ecf703d5e1
7dda6ec8a1016d8b780c9117a67f68d6
微信登录--多商户列表展示
$openid = $_REQUEST['openid']; $user = $_REQUEST['user']; $uphone = $_REQUEST['uphone']; if($openid){ $this->assign(compact('openid','user','uphone')); $this->display(); }else { echo '<script language="javascript">location.href="http://www.qudaoplus.cn/merber_all_show/index.php/home/admin/merbe...
1
03bc0cee345eadeb0d29f73b319e87c3
b1e7a00e3942d2059095c43389cb0da4
normally the child process does this step. do it again here just in case the child process dies early; the boot process will wait on this file, and we don't want it to get jammed forever.
{ struct sigaction sa; struct boot_image *ip; int s,t; sa.sa_handler = SIG_MESS; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (sigaction(SIGCHLD,&sa,NULL)<0) panic("RS","sigaction failed", errno); if (sigaction(SIGTERM,&sa,NULL)<0) panic("RS","sigaction failed", errno); if ((s = sys_getimage(image)) ...
0
035ff700ff19ce98afb479271726956d
6e83eae23c2fdddadbe00998b1b9b3c0
根据personaId更新precise_give表数据
@Service @Import({ Gas_marketpcDataSourceConfig.class }) public class Gas_marketpcTestBase extends AutoTestBase{ public void updateGiveMoneyDetailByGid(String gid,GiveMoneyDetailDO giveMoneyDetailDO) { GiveMoneyDetailDOExample exam = new GiveMoneyDetailDOExample(); exam.createCriteria().andGidEqualTo(gid); ...
0
9d1e6267a7deae95d4a4aa6185f2aeff
ad4e01bd61c490569688976d6c547dd3
The sql used to represent the constraint. For example, not null constraint is NOT NULL, primary key is PRIMARY KEY
String getConstraintName();
0
471876a66cb8b18f0c318961f691fc04
79b677098bac216033bb3a58ba473c89
名 称:AD9850_Reset() 功 能:AD9850复位 入口参数:无 出口参数:无 说 明:每次执行此函数后AD9850内部寄存器复位
void AD7190_Reset(void) { unsigned char registerWord[7]; registerWord[0] = 0x01; registerWord[1] = 0xFF; registerWord[2] = 0xFF; registerWord[3] = 0xFF; registerWord[4] = 0xFF; registerWord[5] = 0xFF; registerWord[6] = 0xFF; SPI_Write(AD7190_SLAVE_ID, registerWord, 7); }
0
d8086ff36f8dcbca51147701c63df8a1
9ff1a7cac8e098d363c10ed0585d564a
Returns the results of all cantons.
namespace MeteoMVC.Controllers public class CantonsController : Controller public ActionResult Index() { AccessWebAPI access = new AccessWebAPI(); return View(access.GetCantons()); }
1
ad16155c23f8b2c21ae14ec47c13f4f9
d413bddbec7d2f45762ab805cefd1aeb
Tests the block cache check.
class MemberCountBlockTest extends KernelTestBase public function testMemberCountBlock() { $this->assertNotCached(0); $this->assertNotCached(1); $this->renderBlock(0); $this->assertCached(0); $this->assertNotCached(1); $this->renderBlock(1); $this->assertCached(1); $this->assertMemberCou...
1
7583f9f3ad03c0d8b979699b7fea1005
cbfb032d30498a032978f8741f990eb3
Get masa value.
public class Statistic public float getMass() { return (float) mass; }
1
e28a02f54bf0513cc07808a86b56adb3
4d9fb9da4aa53cf243d6e29ad7465699
api 校验参数长度限制
try: if not data["project_id"] or not data["schedule_id"] or not data["api_ids"]: return JsonResponse(code="999996", msg="参数有误!") if not isinstance(data["project_id"], int) or \ not isinstance(data["api_ids"], list) or not isinstance(data["schedule_id"...
0
8096e77154a659d8a8d89c46fcd5d800
81ccc1921f13d720e8480af60eb0308b
根据类型寻找对应的 convertor,先找默认匹配策略,再找自定义匹配策略
public class ConverterRegistry @SuppressWarnings("unchecked") public <T> T convert(Class<T> type, Object value, T defaultValue, boolean isCustomFirst) throws ConvertException{ if(null == type && null == defaultValue){ throw new NullPointerException("[type] and [defaultValue] are both null, we can not know what ty...
1
9d91cf249e86863aa5c2ae5876fa3456
f55a5728f7ccf2418a3b49d1928dd8d2
当两个并发线程访问同一个对象object中的synchronized(this)同步代码块时,一段时间内只能有一个线程被执行,另一个线程必须等待当前线程 执行完这个代码块以后才能执行该代码块。 2.2.2 synchronized同步代码块的使用
public class A0015SynClzAndInst private static synchronized void synClass(){ A0004SleepTool.second(1); System.out.println("synClass is going..."); A0004SleepTool.second(1); System.out.println(" synClass end " ); }
0
6c308413303f675608e18eeeaa29fabd
8539ccbc32797b2de66283dd71402caf
GET: PriceCategory
namespace Vy2.Controllers public class PricesController : Controller public ActionResult Index() { var AllPrices = _priceBLL.GetAllPrices(); return View(AllPrices); }
0
ac7f2030a4326299e89ab8296b0a1609
31f687e54f938f43ccf1b924d653d5b2
单目RGB静默活体检测(传入图片文件路径)
{ std::string strLabelPath = "../model/synset_words.txt"; std::vector<std::string> vecLabel; read_labels(strLabelPath, vecLabel); const float mean_vals[3] = { 0.f, 0.f, 0.f }; const float norm_vals[3] = { 0.0039, 0.0039, 0.0039 }; cv::Mat matImage = cv::imread(strImagePath); if (matImage.empty()) { printf("im...
0
cf878132531924bf93e27cc0243ff321
9193623c20687c804049b48b7bcafd34
get the path to the right controller file based on the controller name
class Basic extends Database protected function getControllerPath($name) { return self::$config['cdController'] . $name . '.php'; }
1
46db403805c1c4ed5f925bce9850ca47
ee1d2834fbbd4aa8aaba157e44e53bbd
Given a set of x and y positions, create a table with the different polynomial terms [x,y,x**2,x*y,y**2,...] as columns
def gen_vandermonde(x): V = np.ones((len(x), 2)) for i in range(len(x)): V[i, 1] = np.log(x[i]) return V
0
87bbfc93a0772c1569659e00a976020c
5e560814a1812c00bf92c0b4e512ae66
给定树的前序遍历和中序遍历,请构建原来的二叉树。假设不存在重复的元素。 提示: 前序遍历的特点是第一个元素一定是根节点; 中序遍历的根节点元素左边的元素一定都是左子树的节点,根节点元素右边的元素一定都是右子树的节点
func BuildTreeFromOrder(preorder, inorder []int) *TestTreeNode { if len(preorder) < 1 || len(inorder) < 1 || len(preorder) != len(inorder) { return nil } root := &TestTreeNode{} root.Value = preorder[0] for i, v := range inorder { if v == root.Value { root.Left = BuildTreeFromOrder(preorder[1:i+1], inorder[...
1
06382ef67d352093359479ea397fd106
a803af716fa729b19e05a410b6b66ad7
第一条短信是否需要身份证号
class Sign_model extends CI_model public function sendSmsByid($uid) { $info = $this->selectBy('sign', array('id'=>$uid)); if (empty($info)) return false; if ($info['0']['needaccom'] < 1 || $info['0']['is_pay'] == 1) return true; $sum = $info['0']['sum']; $re = true; l...
0
f4ae2e3760e8b6acdd19e0e3373cc747
f9adeac9c4110729d1327750c4e8cf26
Returns a list of tuples of each node's degree in decreasing order, with the highest degree node coming first
class digraph: def ordered_out_degree(self): return sorted([(v, self.digraph.out_degree(v)) for v in self.digraph], key=lambda x: x[1], reverse=True)
1
ed8edefc023ac4a53531983403127549
ab2a82dfff8d9a364c05ee5296284a8d
Returns the meta object for class '{@link intermediateWorkflow.IwAndJoin <em>Iw And Join</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getIwAndJoin();
1
e6717380a1414dec8433fd588f16359d
ed69f18dcb450a550343b094bdaaa172
Register tasks with a celery beat schedule.
db_alias = schema_editor.connection.alias CrontabSchedule = apps.get_model("django_celery_beat", "CrontabSchedule") crontab_schedule = CrontabSchedule.objects.using(db_alias).create( minute='30', hour='12' ) PeriodicTask = apps.get_model("django_celery_beat", "PeriodicTask") Peri...
1
f37642fcb54882b2a093a5c276a788a3
087377a3b92d87d9e758f478b431735d
設定相關資料一個月後清除
$date = date("Y-m-d", strtotime("-1 month")); log_message("debug", $date); $this->diff_model->delete($date); $this->log_model->delete($date); }
0
e6edf0aa92c166fd9080b92a6805e801
d11a7733983c9f75ec7e28e2fa46b71d
Gets the latest PWM reading. Returns: The PWM value as a percentage.
class AnalogInput(SensorBase): def pidGet(self): return self.getAverageVoltage()
0
74ab97db6d37f9ab0b9093bfd4b84ebd
0420978a13573d5c523b599af494ab44
Return the R^2 of predictions in R_pred, expected values in R, for the entries in M.
class bnmf_vb: def predict(self, M_pred): R_pred = numpy.dot(self.exp_U, self.exp_V.T) MSE = self.compute_MSE(M_pred, self.R, R_pred) R2 = self.compute_R2(M_pred, self.R, R_pred) Rp = self.compute_Rp(M_pred, self.R, R_pred) return {'MSE': MSE, 'R^2': R2, 'Rp': Rp}
1
bf4b356d44a2661fbf48f01470e2fb3d
64d2281c2701dabf2d76389627890302
Пересекает ли отрезок треугольник в плоскости
bool SegCrossTriEx(const Line& l,const Plane& s){ return same_side(l.a,l.b,s)==-1 &&same_side(s.a,s.b,Plane(l.a,l.b,s.c))==-1 &&same_side(s.b,s.c,Plane(l.a,l.b,s.a))==-1 &&same_side(s.c,s.a,Plane(l.a,l.b,s.b))==-1; }
1
bd6f75d35bf5781537c6c2c5ce273140
dfab3cdb89cba142ce0568976844f3db
入室処理
class Shitsu extends CI_Controller public function join() { $roomid = $this->input->post('roomid'); $userId = $this->ses['userId']; $this->room->join($roomid, $userId); $sessiondata = array('joinroom' => $roomid); $this->session->set_userdata($sessiondata); redirect('shitsu'); }
1
4327f2ecc7d100b0bd679bb1d0529df0
d45c9912f9c13e25cc6b4f3ac9ea7f48
4 channel 32-bit signed in place image mirror.
namespace ManagedCuda.NPP public class NPPImage_32sC4 : NPPImageBase public void MirrorA(NppiAxis flip) { status = NPPNativeMethods.NPPi.GeometricTransforms.nppiMirror_32s_AC4IR(_devPtrRoi, _pitch, _sizeRoi, flip); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMirror_32s_AC4IR", status));...
1
47e4a79694cde6ac63ae61e316c076ff
e2b4f52c21d388b7809b17c7990d7a3f
Controllo disponibilità email inserita
{ $this->validate(new Uniqueness( array( "field" => "email", "message" => "L'email è già presente" ) )); if ($this->validationHasFailed() == true) { return false; } }
1
b6f08e7075fc81e72a96dff0e5f1c5fb
ec48d0e0fcfb79afda25180c94c9f4bf
Returns long running task by id. Authorization policies are evaluated (if given).
namespace PnP.Core.Services ILongRunningOperation GetLongRunningOperation(string location);
0
3b50c17993c53ab9b70c576afe29e0fe
89f8191d167218c567ba4379e35df323
Gets the wyckoff_symbol value for this AtomCoords.
String getW();
0
f2be409c8453f6e5c8e0c5b4cbd5e8e7
d5f18a7b0827b2afe58036d2b461d9dd
Metoda obsługująca zmianę wyboru wiersza w tabeli zawierającej dane pacjentów w karcie "Rejestracja wizyty".
{ bool blnStore = GVars.App.UserInput; try { GVars.App.UserInput = false; if (patientId.Equals(_patientId) == true) { return; } ucGridView1.SelectRow("PATIENT_ID", patientId); ...
1
80d74295da02ae872953d6c3993d355a
9cccb31f35e3a9b1f11ab12bc7d03411
Creates a predictive distribution for each data point.
namespace Microsoft.ML.Probabilistic.Learners.BayesPointMachineClassifierInternal [Serializable] internal abstract class StandardDataFormatBayesPointMachineClassifier<TInstanceSource, TInstance, TLabelSource, TStandardLabel, TNativeLabel, TNativeLabelDistribution, TTrainingSettings, TPredictionSettings, TNative...
1
e08aabbc9c69cf775756a4c44abc332a
dc10e8471b326e10f0af7c20aca871ad
<p>[This documentation is preliminary and is subject to change.]</p><p><strong>Applies to: </strong>desktop apps | Metro style apps</p><p>Opens a media resource from a byte stream.</p>
IWMPMedia newMedia( BStr bstrURL) throws ComException;
0
2fbb31c71a547c2ca41a0d3b0535e3b1
8a1b5aaf58a4b13cb9c91ccbd7702f6c
获取modbustcp_sk_app中指定参数地址信息
param_id = int(request.GET.get('id', 0)) error_msg = '' db_servertype = 'DB_GCS' db_opentype = '1' if param_id > 0: try: param_template = Param_template.objects.get(pk=param_id) param_name = param_template.name param_data = json.loads(param_template.data) ...
0
79885593cd110acf85d0268dc52a7549
165292bcb2912f9dd6da195278dad644
Gets the app class for a given app. If app has only global actions or is not found, raises an UnknownApp exception.
class AppCache(object): def get_app_action(self, app_name, action_name): return self._get_function_type(app_name, action_name, WalkoffTag.action)
0
575b4e7427975ad8a93336c4cf9d3a51
5eaa42c3ac87f0edb2617147b88b2ff5
親子関係の木構造に基づいて、指定した頂点の子ノードリストを返却する。
class Tree public function getChildList($id) { $handler = function ($tree, $result, $found = false) use ($id, &$handler){ foreach($tree as $node){ if(($node[$this->_selfIndex] == $id) || $this->_root == $id || $found) $found = true; if($this->h...
1
a0de83788f2fd8269901587f6221966f
96baa7649b4b3ff39d3ce337fa4211fa
禁用date时间之前
@connect(({ analysis, loading }) => ({ analysis, loading: loading.effects[queryDataUrl], })) class Donut extends React.Component render() function disabledDate(current) { const condition1 = current && current > moment().add(-1, 'days').endOf('day'); const condition2 = current.format('d') != 1 && curre...
0
ecd9be396f07433756ff35b0887607ec
085eade68a0065c2a581d07f07b04d11
Gets the evaluation start time from the option model controller.
public class Experiment_Manager : MonoBehaviour public void StartEvaluationTry() { startTime = Time.time; startDateTime = System.DateTime.Now.ToString(); }
0
6d0f71f33d95565d6f9ab6ca8062a256
f3ec8daf1802799a648b5562798630d0
项目类型修改
int updateProjectType(ProjectTypeDO projectType);
1
d014b78e7a8c1e01a5e8ef3e07e1f892
b7ce188e3ef4bc95f9000d589a84622d
Decode a strip of pixels. We break it into rows to maintain synchrony with the encode algorithm, which is row by row.
{ const uint8_t *src_end = src + src_size; int x = 0, y = 0, i; while (src_end - src >= 5) { int opcode; opcode = *(int8_t *)src++; if (opcode >= 0) { int size = opcode + 1; for (i = 0; i < size; i++) { int length = FFMIN(size - i, width - x); ...
1
b650f7a2a63f1e6b2259a6ebfac7c4c7
cfa4ffeb667ec8c7f4186c5933a691cc
Input a list of constraint objects, each representing a constraint, then enforce GAC on them pruning values from the variables in the scope of these constraints. Return False if a DWO is detected. Otherwise, return True. The pruned values will be removed from the variable object cur_domain. enforce_gac modifies the var...
keep_going = True while keep_going: keep_going = False for constraint in constraints: if constraint.apply(self): keep_going = True
0
be77a6d9687c496a75423f758ad47a0a
24bd6d80790fef45c183ff13841d38a0
Read both QA(C) and FA files.
def read_fsx(): fsx_dict = pd.read_csv(DICTIONARY_51_FILE) fsx = pd.read_csv(DATA_51_FILE) return fsx, fsx_dict
0
5fdd05507ae451093a805965eef4c25f
f4d4c69b10976f6a66c4655af78cdb07
удалить значение параметра
{ if(is_array($key)) { foreach($key as $x=>$y) unset($this->param[$y]); } else { unset($this->param[$key]); } }
1
b92d55a457ba1ae8f5f9416145648b90
cb9daf0ec318443d1c765a8327fc70c4
set_packmanager() -> None Configure automatically your package manager.
def get_package_manager(): from .preferences import get_preferred_pms from .submodules import get_any_pm return get_any_pm(get_preferred_pms())
0
957d7804f6ba4ba352c19b401af49e94
a0739266853bf0a659d94317c572224a
开始发送命令给继电器控制上下电
class EnvAirActivity : BaseTouchActivity() private fun sendJDQControl(bean: EnvAirControlBean) { Thread.sleep(100) bean.isSend=true sendBean = bean when (currentJDQ.name) { JDQType.SCHIDERON -> { sendSerial(currentJDQ.SearchStatusCode) } ...
1
5d0519287dba5bdccf770da3f9ea827d
847c6ef7d51293730e5b2440ea5ab47f
查找表格内容, 仅支持2列内容
rowList = [] for row in table.xpath('.//tr'): colList = [] cells = row.xpath('.//th') + row.xpath('.//td') for cell in cells: content = cell.text_content().encode('utf-8') if content == "": content = missingCell colList.append(content) ...
0
b4044e1612f3e66d572bccecc1d8e57f
6a773470c8e197d562f792c8365e199f
功 能: 是否还可以滚动 参 数: isHorizontal - 是否水平滑动 isForward - 是否正向滑动(向右或向下为正向滑动,即x值递增或y值递增)
public class ViewUtil public static boolean canScrollHorizontally(View view, int direction) { Object[] result = new Object[1]; boolean ret = Utility.invokeHideMethod(view, "canScrollHorizontally", new Class<?>[] {int.class}, new Object[] {direction}, result); if (ret) { return (Boolean) result[0]; } ...
0
03da2e0ab94a3fd8c0f3aa131bf602ef
16583b595c6806848b5a776599f0c09d
Saves the newly uploaded database file to the file system.
public int saveResultFileToDatabase();
0
6caa5b1a7ff7d4e7d70022c6169ae4e6
52194ace7c8a4e059c9dcb084101b557
Construct a new Protobuf data format.
class DataFormatter public function __construct() { $this->formats = array(); }
0
4d5204e114d5ef686063d42137c02104
149f1e36278bf3c46608eba0848ecb01
Sumo dos complejos y retorno otro
public class NumComplejo public NumComplejo sumarComplejos (NumComplejo c1, NumComplejo c2){ NumComplejo result = new NumComplejo(); result.setpReal(c1.getpReal()+c2.getpReal()); result.setpImaginaria(c1.getpImaginaria()+c2.getpImaginaria()); return result; }
1
ff83cd58b28885d5c2b157f42dcfb41a
b18dad3d241b50cda746116acf40b0e2
This is a stub for billing the customer
const dist = customer.dist_travelled; customer.debt = dist * 2; return(console.log(customer.name + ' has been charged ' + customer.debt + ' pounds')); }
1
e3c560cf2a7c7d5fdea01fe184efe115
103ddeb6958e094b3cb2b42ea4ee28ca
Test case for find_scan_occurrences_by_analysis_occurrence_id_using_get Returns a list of completed URL scan occurrences for the specified Dynamic Analysis occurrence. # noqa: E501
class TestSettingsApi(unittest.TestCase): def test_api_v1_settings_scan_post(self): pass
0
98f1938135a2451b95c051e93ad77364
a93d358e5db095d6d758079be945da4d
Gets the property descriptors for a class including those in any MetadataClass(buddy class).
PropertyDescriptor[] pds = BeanUtils.getPropertyDescriptors(cls); List<PropertyDescriptor> c = new ArrayList<>(); for (PropertyDescriptor pd : pds) { if ("class".equals(pd.getName())) continue; c.add(pd); } pds = c.toArray(new PropertyDescriptor[c.size()]); PROPERTY_DESCRIPTORS_CACHE.put(cls, pds); ...
0
689e2136bd7e281a7507684bc700af0a
04e6ebafb8d8836143f583c8fbad134f
Serializes and encrypts an object, writing the resulting data to the file
namespace Hotel.Services.Helpers public static class SecurityCrypto public static string SerializeAndEncrypt(Object pObject, string pPass) { Stream stream = SerializeObject(pObject); return Encrypt(stream, pPass); }
0
51fccb6d375a9e77cd1bbd1b0dc11ffb
fc635fed70bb277207672e2bdd79b62f
LC 141 O(1) 判环
func HasCycle(l *ListNode) bool { return l.HasCycle1() }
0
087495ecede5380c7f96cb8aea5424e0
f8411c529004c7b515604a4a5337eaf1
Returns the ISO 3166 country code, two letters
class AbstractCountry(models.Model): def code(self): return self.iso_3166_1_a2
1
dbaf77d8bf777a973b2c2a2280b3531c
8e5c1385ed5ef4a5889e06a26fb913e7
获取高压报警值
void GasAlarmGet(S_Gas* lpGas) { my_gas_t lValue; lValue = lpGas->pTemp->Point.Value; if (lValue < lpGas->pSave->Alarm.Lower) { lpGas->pTemp->Alarm = GAS_ALARM_NORMAL; } else if (lValue < lpGas->pSave->Alarm.Upper) { lpGas->pTemp->Alarm = GAS_ALARM_LOWER; } else { lpGas->pTemp->Alarm = GAS_ALARM_UPPER; ...
0
0c66191c3a1ce6c2cd200fc13baacc18
7e4c2d9ec9b6a9793b13fe0a45b0de0a
将销售订单跟配送回执单关联
@Service public class ISO151415Logic extends BaseLogic @Transactional public SoDeliver dealSoDeliver(OrderShipInfo orderShipInfo, SoOrderShip soOrderShip) { SoDeliver soDeliver = new SoDeliver(); soDeliver.setDeliverId(commonLogic.maxId("so_deliver", "DELIVER_ID")); soDeliver.setOrderId(soOr...
1
20d67aaeaadd8d6dae4d03021e7f1ad4
d4f19afea0d6abf5ed4d46c66c4532df
Parses a GSA Message.
nmea_message_gsa_t* parse_gsa(char *msg, nmea_error_t *outErr) { return NULL; }
1
d321bae284cbefb5e34bac635ae78b3c
43e911bf23aadf912a553bfee7ee01a3
if a type from the components table was just set then fill in the component name unless it is already named
if self.components[t] then return end self.components[t] = {} table.insert(self.componentIDs, t) end
0
a3dd5c3b490cbcada0cdd1ef2f859cb1
9bebc266a1cbe98f1913e6e131af5d7f
删除对象的值为空的属性(不递归判断嵌套对象)
delEmptyAttr (obj, opt) { const option = { ...{ corresVal: ['', undefined] }, ...opt }; const keys = Object.keys(obj); const corresVal = option.corresVal; for (let k of keys) { for (let v of corresVal) { if (obj[k] === v) delete obj[k]; } }...
0
8acfbf929d5fce9d4b1407e938fe3a7b
27b90428000f4e1525a4cb191ac4de91
Getter for property {@link #inputMessageContent}.
abstract class InlineQueryResult extends Type public function getInputMessageContent() { return $this->inputMessageContent; }
1
ccf6625b5e1cb7db5224f0666c671af4
e01651b882ef9f1a88ccc33ecf59bc00
Builds n-grams with one lookahead token.
def build_n_grams (tokens, filename): build_unigrams (tokens, filename) build_bigrams (tokens, filename) build_trigrams (tokens, filename)
0
54d49f4f9fac9a042e517015ee35246d
da3ac83964b44cd582ea63c63885cafa
电话号码比较
int cmp(const void *a, const void *b) { int numa1 = *(int *)a, numb1 = *(int *)b; int c = getNum1(numa1), d = getNum1(numb1); return c == d ? numa1 - numb1 : c - d; }
0
d101fac1cb3efad0d1abb5cf252dff48
f3750ded53bc509b5726a9fdeeaeb706
Find start of week containing 4th Jan
fourth_jan = date(iso_year, 1, 4) delta = timedelta(fourth_jan.isoweekday()-1) return fourth_jan - delta
1
de8ef714457a91a408f1ded78fdd8d46
8ca5917fa157a402976d546353c87ff9
GetBrowsableFsRootPath - return the root path of the file system to browse
public class clsFolderBrowser public string BrowseForFolder() { stcBrowseInfo.pidlRoot = 0; stcBrowseInfo.ulFlags = BIF_RETURNONLYFSDIRS; return DoBrowse(""); }
0
49bf31c86734ffe90d55f1be5490d69b
0ed9c011d7b3c81bc3d3f8838a788e39
Returns the zoom stack.
public final class FractalPanel extends JPanel public ZoomStack getZoomStack() { return fZoomStack; }
1
191b8108ca9503707792cf23b55e2d0e
bdec4d0b37af02e1d5c287c90c771b5e
Set the selected column in the range (in the range 0..boardSize-1) An out of range value is ignored and the function just returns
public final class ServicePanelBuilder public void setCol(int col) { assert !myGrids.isEmpty() : "setCol called without calling startGrid"; myGrids.peek().setCurrCol(col); }
0
b5a97977e4aed685c6033b4d46b92a6f
c5b6fe486c3fd38f21e7c032c244a38e
Saves annotations back to original format
class Application(QMainWindow): def AnnotationSave(self): self.active_mode = 'default' self.reset_buttons() try: self.model.AnnotationSave() except Exception as ex: self.log_error(str(ex))
1
10198a46c3bb86da3db38dce03c4726f
3808f5e1a428c6388937a9e8253dd49a
문서 속성 레코드를 자동 설정한다.
export class TextDocumentWriter private setOfficeAttributes(textDocument: TextDocument, root: Element): void { root.setAttribute( OdfAttributeName.OfficeMimetype, textDocument.getMimeType() ); root.setAttribute( OdfAttributeName.OfficeVersion, textDocument.getOfficeVersion() ); ...
1
c9923a3c8a302d26e98a9f3e8368f663
be9cdb7b342238973053fa29bc1e6fc6
根据数据的字母 ,输出相应位置的应为数字
if letter == 'a': return 1 elif letter == 'b': return 2 elif letter == 'c': return 3 elif letter == 'd': return 4 elif letter == 'e': return 5 elif letter == 'f': return 6 elif letter == 'g': return 7 elif letter == 'h': ret...
1
02ebd41d056b5685c41f79a555f96c5e
06a0597ff7434ab2ac6c82a4773a9667
发射子弹打怪
console.log("--------------be shoot----------------"); if(this.tarType == Common.TargetType.SplitMove){ this.mapMgr.generateTarget(Common.TargetType.RandomMove,this.radius/2,this.speed,this.node.position); this.mapMgr.generateTarget(Common.TargetType.RandomMove,this.radius/2,this...
0
1f7ff37e62a7881cb5a8b2358c221e08
56eb474bce01a604a01d5fa63bb5eea6
## Robust vcov for panel models (pooling, random, within or ## fd -type plm obj.) ## ## This version: October 20th 2009; allows choosing the clustering dimension ## so as to have serial- or x-sectional-correlation robustness; ## indices redone to cope with unbalanced data. ## 'pcse' SEs à la Beck and Katz (1995) moved ...
do.pet=TRUE, ar.LjungB=list(lag=NULL, pval=0.025), arch.LjungB=list(lag=NULL, pval=0.025), normality.JarqueB=NULL, user.diagnostics=NULL, info.method=c("sc", "aic", "aicc", "hq"), gof.function=NULL, gof.method=NULL, keep=c(1), include.gum=FALSE, include.1cut=TRUE, include.empty=FALSE, max.paths=NULL, tol=...
0
4c63e955c40950c71e736b60dcd4b84b
43b51d640c2faa0631959aa829d89717
Method that gets all anchors attached to a given node.
func anchorNodes(n *html.Node) []*html.Node { if n.Type == html.ElementNode && n.Data == "a" { return []*html.Node{n} } var ret []*html.Node for c := n.FirstChild; c != nil; c = c.NextSibling { ret = append(ret, anchorNodes(c)...) } return ret }
1
e26dbb93bc7e3b52d24b3668006c543a
cbfc417e02340242bed7e28f2a2f895a
The maximum length per SMS message that the SMS provider can handle
String getMaxMessageLength();
1
e4795344af52fce91d7259ea796de600
ec94ccb34e81781f5aa821441b3a8d59
Returns true if the box demensions are less than the box it would be placed in
{ if (this->moveBox.getMinX() >= otherObject->moveBox.getMaxX() || otherObject->moveBox.getMinX() >= this->moveBox.getMaxX()) return false; else if (this->moveBox.getMinY() >= otherObject->moveBox.getMaxY() || otherObject->moveBox.getMinY() >= this->moveBox.getMaxY()) return false; else return true; }
0
bb38f06c2b35ecaa7efab612640e1826
59ed09d28536e95b9527c597a4080031
Computes the second message of the protocol.
{ using (MemoryPool.Default.Rent (96, out Memory<byte> otherY)) using (NetworkIO.BufferPool.Rent (otherY.Length, out Memory<byte> buffer)) { await ReceiveMessageAsync (buffer).ConfigureAwait (false); buffer.Span.CopyTo (otherY.Span); S = Mo...
1
d1c8893a1c9b1b01088c966ee684cdbe
f6c5752b44082716dd013ac25724dbbd
Set all unlocked sliders to the same value
public class Timer : MonoBehaviour void Start () { Start_slider.value = Start_slider.maxValue; Stop_slider.value = Stop_slider.minValue; }
0
6f21e74b212e1767f68aaef8bd27b5cf
d17676785ede79ffee47bd28bdab4375
Metodo que enfileira um elemento na fila, seguindo a politica FIFO.
void enfileirar(T valor);
1
20e5c160224cc1b413affe9d5a1bd924
3dc1830b3879bf7ee571b69c91c8f836
Lists all Visitor models.
class VisitorsController extends Controller public function index() { $visitors = Visitor::all(); return response()->json($visitors); }
1
27a3cb0d5826f3a8afd2f85462b1f780
4fc19bc8209fbe4823980f6689df39b5
Test admin addition through admin registration route.
get_response = self.client.get( reverse("auth_test_admin:improved_user_user_add") ) self.assertEqual(get_response.status_code, 200) post_response = self.client.post( reverse("auth_test_admin:improved_user_user_add"), { "email": "newuser...
1
5130cb67814900f95ba8f3643318e921
3741f998a5db47389f27f789e97b928c
@brief Enable VDDUSB supply.
int32_t GNSE_BSP_BM_Enable(void) { HAL_GPIO_WritePin(VBAT_READ_PORT, VBAT_READ_PIN, GPIO_PIN_SET); return GNSE_BSP_ERROR_NONE; }
0
ee82e9075a99551ded8f61e0c4dd2a69
d424395512d65264e8d2d8c1fc031862
Checks whether the credit card number is in the supported list
val = val.replace(/\s/g, '') return (/^4[0-9]{12}(?:[0-9]{3})?$/.test(val) && 'visa') || (/^5[1-5][0-9]{14}$/.test(val) && 'master') || '' }
1
b26d4180b46d29ae9b183cb7542a177c
c45f5240d64e3381835909430d31756c
创建ldap/ad属性文件
var tpl = require('./ldap/auth.tpl'); init.insertCenter(tpl); $.request({ url: '/ad/api/isLdapConnected', done: function(data) { if (data.stat == 'OK') { $('input[name=ldap_auth][value=' + data.connect + ']').attr('checked', 'checked');...
0
b8969e69d8e62202face376223d6037d
0864e5c2e7ef500c44f79efd69acffc8
Test case for audits_v1_ftp_log_list
class TestAuditsApi(unittest.TestCase): def test_api_v1_audits_runtime_log_inspection_download_get(self): pass
0
855fa8004929129b6f6e336a0a844d23
4e8f520a2a3691b422d7f77cd7a8b0a6
Get test loader
class QuantDataLoader(ABC): def get_test_loader(self) -> DataLoader: raise NotImplementedError
1
f3eac4b12b904d880b26625ac8f505c7
5d68a4bfde520820198b49315c4dc45c
Get a new command input from the player and verify that it contains only
if(GameState.instance().getHealth() == 0){ GameState.instance().returnToStart(); } System.out.print("> "); return commandLine.nextLine(); }
0
c819414eda8602e8542f85f05a806e11
6acd79c27cc9a2b5654e5da015fdbace
sequence with one item
def test_one_item_list(): array = [5] merge_sort(array) expected = [5] assert array == expected
1
5ab231448e1da2451d5a037055cd1e79
ebc37492dd9f0005fb1dc436e56348e4
笛卡儿积
res = 0 a.sort() b.sort() res= sum([a[i]*b[i] for i in range(n)]) return res
0
170dd103fda8fbf6eadb6679336e5a50
036aa1449c5618e8b60f175b5f3c1673
通过redis未授权访问写ssh公钥
def redis_unauthored(ip, port): res = '' payload = '\x2a\x31\x0d\x0a\x24\x34\x0d\x0a\x69\x6e\x66\x6f\x0d\x0a' try: socket.setdefaulttimeout(10) s = socket.socket() s.connect((ip, port)) s.sendall(payload.encode()) recv = s.recv(1024).decode() if 'redis_version...
0
a4268327f9876b9291059aa0eae11302
ccce51a0775315410581d355c6de8ad8
Hàm tạo file excel chứa danh sách phân công và hội đồng phản biện
{ string fileName = string.Format("DauDocDiDong.xlsx"); try { return await GlobalFunction.DownloadFileMau(fileName, this.appFolders.DauLocFileDownloadFolder, this.appFolders.TempFileDownloadFolder); } catch (Exception ex) { ...
0
66804f7f016e7350caf793417a285e89
4984a4ee18fd529d77232e059b0bff60
GET /marital-statuses/:id : get the "id" maritalStatus.
class MaritalStatusController extends Controller public function show($id) { return MaritalStatus::findOrFail($id) ->append('formatted_created_at', 'formatted_updated_at'); }
1
b39b8b5e7e25fb32a2ec0b9f6321f2d9
92ce707669eb8a142981a34737dca0fd
Write the current manifest out to the given file descriptor.
class ImageManifest(object): def _WriteToFile(self, file_obj): manifest_json = self._ToJson() file_obj.write(manifest_json)
1
dd7e8aa355eb62d0d53867574f30decd
18dc325076178b0bb9a444b192ef8217
! \brief Set the cursor to that nearest to a given viewport position
void CPegApp::CursorPosSet(const CPnt& pt) { CPnt4 ptView(pt, 1); ModelView_DoTransform(ptView); if (!Pnt4_IsInView(ptView)) { view::SetTarget(pt); view::SetEye(view::GetDirection()); ::InvalidateRect(m_hWndApp, 0, TRUE); ptView = pt; ModelView_DoTransform(ptView); } CPoint pntCurPos = viewport::DoProj...
1
144d0f8220d39eeae4bafa75a6b06dc4
6bb278e88229482e9668868d820dafc5
Validates fields before adding Exam
{ if (addAssignment(this.assignment) == true && addQuiz(this.quiz) == true && addExam(this.exam) == true) return true; return false; }
0
bd63ef4ce4b7446e40daf89a8d2c8833
9963486d67e5fb3217a307679eb4f96c
Возвращает множество символов, содержащихся хотя бы в одной строке
symbols = [] for i in range(0, len(text_a)): if text_a[i] not in text_b: symbols.append(text_a[i]) return symbols
0
f5f5066d882000b39e840d685ab167ee
7ce80609fe5e55fb0fcc0ee8abbaba69
フェード明け時に呼び出される
public class CSceneManager: CMonoSingleton<CSceneManager> protected virtual void OnFadeInScreen() { PaintAlphaTexture (0f); m_IsFadeOut = false; m_NeedDraw = true; }
1
d9222a3982b502bbad88f1dc05c7a9fc
f8e1e206f4fc97145c1b52ce4818c77e
add passengers randomly to the queue from waiting list
namespace FT4 class AdventurePool public void AddFromWQ() { Monitor.Enter(myLock); p1.Invoke(new Action(delegate () { p1.BackColor = Color.Green; })); while (customersInAP.Count >= maxNrOfPeople) { Monitor.Wait(myLock); p1.Invok...
1
030eafd8d815a3d8f7d00f330e8f9580
eee0bbe84a17c6816c346d2d8fc84a19
Test case for deleteRoutingRule Delete a single routing rule.
class InterfacesApiTest extends \PHPUnit_Framework_TestCase public function testDeleteDeviceSwitchRoutingInterface() { }
0
66e68d6ead41b254b84e7e2b1a139b76
802abfd3c974a229722fbc76b7f47065
得到类型集合的id和名字赋值下拉框
{ try { List<BasicCode> list = bllBasicCode.FindALLName("学生类型"); for (int i = 0; i < list.Count(); i++) { DropDownListType.Items.Add(list[i].CategoryContent.ToString(), list[i].CategoryContent.ToString()); ...
0
6874eb8f0a4ba5260d06277ab2e6cca4
7e0d3b668ed2623bc2f65621d7336a43
单例模式应用防止多次连接redis,提高性能
if not hasattr(RedisUtil, "_instance"): with RedisUtil._instance_lock: if not hasattr(RedisUtil,"_instance"): RedisUtil._instance=object.__new__(cls) return RedisUtil._instance
1