query_id
string
corpus_id
string
query
string
code
string
label
int64
6f7a0a6e3b1b4e1a9b71c1a70a366e6b
e8d689383213eefe4c3ea438dfc30608
Returns Array of unique Date objects.
def get_unique_dates(entries): unique_dates = [] for entry in entries: date = entry.date.strftime(DATE_FORMAT) if date not in unique_dates: unique_dates.append(date) return unique_dates
0
12e70b5599c9f77e6aeb7e044cbbb652
46a11621b9c0e977ff5b1bcbf52b57dc
Gets all information about ship placement. Returns:
class Ship: def __str__(self): return f"Crew: {self.crew} members. Immersion: {self.immersion} units."
0
992f58cafbe6b75d817ee2a2192ad271
84a3f63b6628a6653bc2f9fc32007099
해당 블로그의 포틀릿 레이아웃 ID 에 해당 되는 값 삭제
public void updateLayoutId(SocialBlog socialBlog);
0
6854112e4d8a90b5361fdffb1f6ba969
f939785b9cbd52a64fd3fa3671e633b6
获取某Teacher Manager的信息
Teacher teacher = getTeacher(number); String result = JSONObject.fromObject(teacher).toString(); return result; }
0
1e9d2565aee7144ee74914dc77c556c5
ca9f9d336e10182de35c49b1b4853601
fn needs auth code to gen access token
public class DetailActivity extends AppCompatActivity implements CryptoListener, DatabaseListener, BoxListEncryptionListener, SpotifyBoxReadyListener @Override public void needsAccessToken() { AuthenticationRequest.Builder builder = new AuthenticationRequest.Builder(getString(R.string.spotify_client_id), Au...
1
d19b77f388da488bcc647c3f0064b2ee
b4a447b294703d8165b82c4677232bc5
Méthode retournant toutes les ADNs (configuration de trajet) des éléments
class Gvd extends TimedObject public function getJourneys() { return $this->journeys; }
0
aff1185c7d31efbcb3d30f07c123642d
2697ef6486ac1c1f21ec490bbfa259b0
Increases numeric text box value.
{ TCHAR szText[50]; TCHAR szNewText[50]; HWND hWndCtrl = pDX->PrepareEditCtrl(nID); ::GetWindowText(hWndCtrl, szText, sizeof(szText)/sizeof(TCHAR)-1); if (pDX->m_bSaveAndValidate) { size_t len = _tcsspn(szText, _T("0123456789")); if (len != _tcslen(szText)) { int j = 0; for (UINT i = 0; i < _tcslen(sz...
0
df04e38bd7f59b0efc59ff663641059e
3ad0d930d73deea83722ce1c5cfbf3e0
首先识别是否需要补充
{ let items = getSetting().Items; if (items && items.hasOwnProperty(type)) { let item: Item = items[type]; let has: number = dragon.getWhereValue(item.Where, 0); if (has >= need) { return true...
1
c4f31d15b21e86ecabd975cdd163224d
dfbfa83dcc70447377068b8288a3d3ad
Test whether it is possible to deploy an instance with a new network and assign an allocated public IP
class FiwareRegionWithNetworkTest(FiwareRegionsBaseTests): def test_deploy_instance_with_new_network_and_e2e_snat_connection(self): self.__e2e_snat_connection_test_helper__(use_shared_network=False)
1
5762bb9573221e6982d229f0849b3aee
ba312f9b4f8e83ffddc81078f57688d2
Encode a concrete primitive Rtl r sa z3 query. Returns a tuple (query, var_m) where: - query is a list of z3 expressions - var_m is a map from Vars v with non-BVType to their correspodning z3 bitvector variable.
class ProofGenerator: def encode_variable_axioms(self) -> List[mm.Statement]: assert set(self.encoder.metavariables.keys()).isdisjoint(self.generated_metavars.keys()) all_metavariables = { **self.encoder.metavariables, **self.generated_metavars, } stmts = [] ...
0
86589521fa12497f68f75f32b1017f8d
e0f1941c1ff1b88037d44303f0591fb9
获取周浏览量排行(9条)
$this_week = date('W'); $novel_week = NovelWeek::query()->where('category_id', $id) ->where('week', $this_week) ->orderby('click_count', 'desc') ->limit(20)->get(); $data = [ ...
0
6ba5a1a7c65faf91bfe175ba936bc98a
9d95716edc99b3b258208eaabe450a34
Compute the shape of a dense layer.
class DenseLayer(Layer): def get_output_shape(self): return [s if isinstance(s, int) and s >= 0 else -1 for s in self.incoming_shape[:-1]] + [self.n_units]
1
b4e3abf630e04764c3414aa15df1b844
182efb2c4502cf32365995e5d371f0d8
分离数据库模式和数据表的名字
{ $this->table = (strpos($table, $this->pref) === false)?$this->pref.$table:$table; $this->dbName($this->table); return $this; }
0
5dd0509952f885ee5bfd3d526781db24
064a579bfaa8c634c7ed748a9c45a558
yes we need to be near the flag to pick it up
public class CTF extends ZenGame public void grabFlag() { if (me.distanceTo(target) <= 40) { Zen.writeMy("hasflag", true); } }
1
ed22585ee278586b4f768a0bf15fefd9
c39f95ce00e09df2bce245fa2291aeee
Attempt to create a addressbook object with a conflicting UID should raise.
class FileStorageTests(CommonTests, unittest.TestCase): def test_addressbookObjectsWithDotFile(self): self.homeUnderTest()._path.child(".foo").createDirectory() yield self.test_addressbookObjects()
0
bbb3a580dc89e41ed291d902035eed4c
4098808617f696018d7aa6d6b5e93b6c
Gets node manager. Singleton.
public class NbTopManager extends TopManager public NodeOperation getNodeOperation () { if (nodeOperation == null) { nodeOperation = new NbNodeOperation (); } return nodeOperation; }
0
8b028be3135dec255be16245ff5b6138
a2f03724006a650915e4aa2c2520fc65
查找指定字符串的value值
namespace WindowFormWeixin.Util public class WeiXinTool public static string GetValue(string str, string s, string e) { int startindex = str.IndexOf(s)+10; int endindex = str.IndexOf(e); string strresult = str.Substring(startindex, endindex - startindex); ...
1
073c3e4c2fee63104bc625fb36d9ea3f
6a771766b971827f55b32384a9e33521
Get a file collection
public function getCollection(string $path);
1
bfb386e48da9c3fd59d564e5b26f6ad2
867ed07af18098b6bf289d8ef153a79a
This class is used by the HandlesRVItemView class. It extends TextInput, and it allows the user to enter a new name for their handle.
{ ExtraEditorGUI.AbovePrefixLabel(TileLang.ParticularText("Property", "Name:")); GUI.SetNextControlName(this.Context.PrimaryAssetNameControlName); string brushName = this.Context.GetSharedProperty(BrushCreatorSharedPropertyKeys.BrushName, ""); brushName = EditorGU...
0
4b2e432aefa34fd67668a1c9a13541d1
1583c0396fa6b0d9702c6227204dbcd6
Adds the multiboot header.
bios_regs_t regs; uint8_t count; if (multiboot_magic == MULTIBOOT_LOADER_MAGIC) { bios_boot_device = (multiboot_info.boot_device & 0xff000000) >> 24; dprintf( "bios: boot device ID is 0x%x, partition ID is 0x%x\n", bios_boot_device, (multiboot_info.boot_device & 0xff0...
0
0b9e27d84678bbb1c2beaeb98f9e3660
656e27109b51b3dc90cf394b13b99949
Use deep hash code on the 2d array- this creates a unique hashcode based on the contents of the array
public class Board @Override public int hashCode() { if (grid != null) { return Arrays.deepHashCode(grid); } return 0; }
1
532dba37d1e8b62980e5314ed61d8e4e
a67ff88e0930d1d967230ea0bfd708ac
Sets up button that will remove mind from a character
public class PlayerSetupBox extends HBox public Button getRemovePlayer() { return this.removePlayer; }
0
8c895a02ba1b3bf36cd7b3b3104e3a2c
4e118bb0143ba0a11c5de48ad0c098bf
Find user in current group.
{ F2FGroupPeer *candidate = f2fGroupFindGroupPeer( group, uidhi, uidlo ); if( candidate == NULL ) return NULL; return candidate->peer; }
1
ceeb71c6143867d40d00806566a8747f
a11a21ac3211c22653d9d191997abc1e
Tell it to collect bytes from the passed bank and fill the buffer.
def runBuffer(hcomm, buffno, label=None, wait=SYNCHRONOUS): if label is not None: label = label.encode() call_acsc(acs.acsc_RunBuffer, hcomm, int32(buffno), label, wait)
0
eb754d03b84d4f1117a1cad7facc651d
dbc966b4109323981189a584db0b9a44
Channel使用完毕之后,回收到阻塞队列arrayBlockingQueue
@Slf4j public class FtpClientPool implements ObjectPool<FTPClient> @Override public void invalidateObject(FTPClient ftpClient) throws Exception { blockingQueue.remove(ftpClient); }
0
55c27c84c2af33cecc1211aa6b352363
4c2d56f7d00dca838ae84ff86380a9f5
Get the first stroke added to the sketch
class OlSheaf public function get_first_straw() { return $this->straws[0]; }
0
f4bcd1c6dd2b13740dc5b98968078ccf
07436e7036e1095da154d8ebea8f9e91
奨学金の通常返済シミュレーション結果を作成するメソッド
interestRate: Double, repaymentPeriod: Int): List<LoanTran> { val fixedRepaymentAmount = LoanTran.calcFixedRepaymentAmount(borrowingAmount, interestRate, repaymentPeriod) val mutableLoanList: MutableList<LoanTran> = mutableListOf() val repaymentMouthCount = Loan...
1
ebdd0860cdab2fe698b001b13c22087d
6b7712ebce29ecf430cfb4bd9ad9da56
Gets the player number for the player who got hit by the lance
switch (this.playerAxe()){ case 6739: return 8; case 1359: return 7; case 1357: return 6; case 1355: return 5; case 1361: return 4; case 1353: return 4; case 1349: return 3; case 1351: return 1; } return 0; }
0
48433706ee7300d81202743b739a6ad4
eca504fe63d175ea7d603293cc7b4633
Sets the id of this SubsidyBase.
public void setId(java.lang.Long value);
1
51cdbb807932a589e84ec387667c11ee
e42644cd14c6c30f65cc8bfb48c94c78
Returns the uncalibrated raw gyroscope data readouts
Vector3<int16_t> gyroReadRaw() { uint8_t s[6]; gyroRead(0x1D, s, 6); Vector3<int16_t> omega_i; omega_i.x = (s[0] << 8) | s[1]; omega_i.y = (s[2] << 8) | s[3]; omega_i.z = (s[4] << 8) | s[5]; return omega_i; }
1
127665d3de287472f6d5ddd0fdd37519
c9d428152387292a15416de6505a6dff
Create a model with double gaussian with offset.
def make_gaussiandouble_model(self): return self.make_multiplegaussianoffset_model(no_of_functions=2)
1
2753f151cd980775c9c792f15b8149b4
15337592d9a1aff8d197b43e2894b2b0
会员卡消费撤销
void rollbackCardConsumption(@Param("userId") Integer userId, @Param("cardId") String cardId);
1
64714d2696635b89076b6f5c4df87dfc
66c5ca72c9876363112851d514480c36
设置剧情显示状态
{ if (!IsHavePlot()) return; if (id.IsInv()) return; var temp = TDLuaMgr.Get<TData>(id); if (temp == null) { CLog.Error("无法找到剧情:{0}", id); return; } else ...
0
c70ea5a1a6b2f0f6255c509400fb6987
f88d48bf88573633e032a0b87e41994e
Function to process integer to ip
ip_as_int = int(str(quadrant)) if 0 <= ip_as_int <= 255: return bin(ip_as_int)[2:].rjust(8, str(0))
0
094c2938f41a740f9b76dff343bafdfa
b3db6baca048c65f8899df61e9484fb1
Container som håller alla värden från roboten och uppkopplingen till den. Är också en kontroller i den mån att den skickar kommandon och förfrågningar till roboten över uppkopplingen.
class RobotController: def __init__(self, address): self.address = address self.socket = None self.EOB = 1 self.EOM = 1 self.error = False self.queue = False
1
a0dd2794948298cb3453c4eea00b34a9
a3c1d2194c635c75d790755bb4e153e5
测试add()方法
public void testAdd(){ Calculator c=new Calculator(); int result=c.add(10,5); System.out.println(result); Assert.assertEquals(15,result); }
1
c09e369402dea7b4d9f1dd5cb75fd7d2
8f0acdb3d344bf7a917bf5cbc9dc3d89
Busca uma lista de eventos pelo id do componente.
public ResponseEntity<List<Event>> findByAid(String aid) { if (Strings.isBlank(aid)) { return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } try { List<Event> result = eventRepository.findAllByAid(aid); return new ResponseEntity<>(result, HttpStatus.OK); ...
1
8874c138ebeaf4e459e215e37559e28e
4e24ec0ec88c11c751ec488ec1425378
Retrieve all notifiable identities.
var list = await _store.FindAllAsync( t => t.Type == ResourceType.Identity && t.Enabled ); return list.Select( ToEntity ).ToList(); }
1
3ea6b2a11f4c16bc107c2f05fca8f257
82f17d4fd35c135df829dae794dddccf
Returns the value of the '<em><b>Abstract declarator val</b></em>' containment reference. <!-- begin-user-doc --> <p> If the meaning of the '<em>Abstract declarator val</em>' containment reference isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
EReference getAbstractDeclaratorSuffix_GccDeclExt();
0
debac9199df77ef044bf892bdec61890
8d1d3f830af44cc6d74e9dc26a6f67d5
Unsets a previously set end marker.
bool SpellChecker::setEndMarker(char end) { end_marker = end; return true; }
0
6dec5c3cc1cbf4a0d5d9a285abf41efb
7f8c3d89d6c173d24873345588e51be0
Allocate space for the light data and light data uniform locations
{ Light::findUniformLocations(); m_RadiusLoc = glGetUniformLocation(m_ShaderId, "radius"); m_MinDistanceLoc = glGetUniformLocation(m_ShaderId, "MinDistance"); m_MaxDistanceLoc = glGetUniformLocation(m_ShaderId, "MaxDistance"); GLint PoissonSamplesLoc = glGetUniformLocation(m_ShaderId, "PoissonS...
0
014864f0d15e2501a7c71920e147f4f9
734282f4d510e2a7599e2cbb8a80b005
Считать формулы из базы конфигурации
namespace MathExpressions public static class SqliteDataAccess public static List<Formula> LoadFormulas() { using (IDbConnection cnn = new SQLiteConnection(LoadConnectionString())) { string sql = "SELECT * FROM formulas"; var formulas = cnn.Query<Formu...
1
0ca02a7ef2e161f944e65bc333703467
b90acc44c75cddaad9ec9aa9a466148a
Use this function to let the train know that it’s on board.
class Train def board(passengers) return if @station.nil? return if passengers.negative? @passengers += passengers @passengers = @size if @passengers > @size end
1
8ba57c7a8823c40560f5740e95591618
a04735a1adf89c5e896ab1bb1d411dce
Отрисовываем первый кадр, чтобы экран не был пустым на старте
class AnimationController renderFirst() { this.renderer(this.min); }
1
e721fb5554949521aefe3c7300947668
249c112233210ac6234735997690adaa
Gets input from the user. Listens for Ctrl-C (keyboard interrupt) and stops DiagMgr servers before exiting to prevent them from hanging.
def stdin_listener(): while True: selection = input('Press Q to quit\n') if selection == 'Q' or selection == 'q': print('Quitting...') killed = common.killViewers() if killed > 0: logging.info(str(killed)+" running viewer(s) already exist..") ...
0
64e10753cb6cf382e606d04922faa64a
5949adee00051a1256267fdafae2abb5
DAD rp (Add register pair to HL)
carry = self.__IsFlagSet(Flags.CARRY) value = self._mem.rb(self._HL.value) self._AF.high = self.__ADD8(self._AF.high,(value + carry)) self._m = 2
0
4763deb7f000f9f646f000fc32c494b2
bf87004a2190320f4540dd359b889b8c
Проверяет, является ли матрица вектором
bool FEMatrix::is_vector() const { return this->n == 1 || this->m == 1; }
1
be52d41e9bc0359cb20925dbdae8e631
554471a971ba5adde85a88e28e7141fd
把pdf文件的每一页分别装换成txt并储存在一个列表里面
pdfText = pdfText newpdfText = [] i = 1 for pt in pdfText: pt = re.split('\n', pt) for tt in pt: if len(tt) >= 2: newpdfText.append([i, tt]) i += 1 print(newpdfText) return newpdfText
0
1e7872b5411900ae066a026f4badef82
c76019d5aebebcb5826559f3438a0e29
performs K-means on a dataset: - X: numpy.ndarray of shape (n, d) containing the dataset - k: number of clusters Returns: C, clss - C: numpy.ndarray of shape (k, d) containing the centroid means for each cluster - clss: numpy.ndarray of shape (n,) containing the index of the cluster in C that each data point belongs to
def k_means(X, num_iters=10, num_clusters=3, dist='square'): centers = np.random.normal(size=[num_clusters, X.shape[-1]]) for i in range(num_iters): distances = get_distances(X, centers, dist=dist) assignments = np.argmin(distances, axis=1) centers = centers_from_assignments(X, assignmen...
1
145982bb6b2ad5a27f51641025d703b7
0aa17beb20eea29a30f5478bdcb3421b
Compute BLEU score from its sufficient statistics. Adds smoothing.
def compute_corpus_level_bleu_score(references: List[List[str]], hypotheses: List[Hypothesis]) -> float: if references[0][0] == '<s>': references = [ref[1:-1] for ref in references] bleu_score = corpus_bleu([[ref] for ref in references], [hyp for hyp in hypotheses]) retu...
0
77cc07183a465504e8476e36a6d9640f
4c335ac9286e57b4848f513b33e5f532
Start explosion coroutine.
public class ExplosionHandler : MonoBehaviour void Start () { }
0
162bb1638bf66ab5e0c003c08acea3f4
e404b5f94e20bf05b0388bdccb4ec64a
Getter for <code>bitnami_edx.wiki_revisionpluginrevision.user_message</code>.
public class ReportResult public String getUserMessage() { return userMessage; }
0
430f43df7b742db7c0b171ab05689fa2
c24f614fba9c646e145f16eb5c99a410
各領域にどれくらい使っているか三角グラフにより可視化 [toggl_visualize_util]
three_region_ls=["第一領域", "第二領域", "第三領域"], group="month", saveFlag=False): from source.date_conv import returnMidnightDatetime import matplotlib as mpl mpl.rc('axes', facecolor='none',edgecolor="none",titlesize=30,labelsize=15,grid=False) base_dt = None cli2num_dic = {"第一領域":0, "第二領域":1, "第三領域":2, "第四領域":3...
1
0632dba9f8d73a7fa875966f2a0ab0ac
68633ebce613a6630be49698e0e203d9
# estimate attribute importance(%)
{ T <- NROW(data) tmp1 <- data[-1]; tmp2 <- data[-T] ret <- c(NA, 100*(tmp1/tmp2 - 1) ) return(ret) }
0
c9a0c3556f6476c1bdc908827a74ae4e
9727987be6b8b81b80a92c55b99c36a1
Calculates values of a quadgram contingency table from marginal values.
class QuadgramAssocMeasures(NgramAssocMeasures): def _contingency(n_iiii, n_iiix_tuple, n_iixx_tuple, n_ixxx_tuple, n_xxxx): (n_iiix, n_iixi, n_ixii, n_xiii) = n_iiix_tuple (n_iixx, n_ixix, n_ixxi, n_xixi, n_xxii, n_xiix) = n_iixx_tuple (n_ixxx, n_xixx, n_xxix, n_xxxi) = n_ixxx_tuple n_o...
1
6eb94eb220a4c06b10c297f43ab93ca0
1a18e0a4030743e86e4fadc9e0d29eac
判断是否为托管状态 实体对象
class Token extends \Main\Model\User\Token implements \Doctrine\ORM\Proxy\Proxy public function isManaged() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'isManaged', []); return parent::isManaged(); }
1
1c0024fb7e26ae11a897babbeb3ede17
d982e7f73397214182501cfdb2f588d7
! \brief How many times a new array has been allocated
unsigned int chk_get_alloc_count(unsigned int UNUSED_PARAM(line), const char UNUSED_PARAM(soubor)[__CHECKER_MAXLENGTH_FILENAME__], const char UNUSED_PARAM(func)[__CHECKER_MAXLENGTH_FUNCNAME__]) { return L.count_alloc; }
1
3ea164690b79af2bfa462161e2ba30c3
bf37d9cbe377add855e4036113299a66
Is the session allowed to create UuidGen instances?
boolean allowDeleteId64Gen( CFSecurityAuthorization Authorization );
0
863cecb9fb7198e0e9a77ad26de9760a
139c7ffe0e0a51ff6661fe31feac8fe3
This function will clear login fails for an ip on user successful login
class Failed_logins extends MY_Model function clear_failed($id) { return $this->delete_by(array('user_id' => $id)); }
0
59ad55c00b07c0bb052629d98e550b7b
58906021dac330881ff562c39032aa01
Enables blur. Blurring simply draws a frame without totally erasing the previous frame.
{ float off = 1.0f; m_offsets[0].x = -off; m_offsets[0].y = -off; m_offsets[1].x = -off; m_offsets[1].y = off; m_offsets[2].x = off; m_offsets[2].y = off; m_offsets[3].x = off; m_offsets[3].y = -off; Graphic...
1
3dde4c51d3ae544777e8ff69db639c67
dc62ca7e112a271ea6abb09c42eb4a7b
Obtiene el valor de la propiedad dia5.
class Agenda extends \Usuario\Entity\Agenda implements \Doctrine\ORM\Proxy\Proxy public function getDia() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDia', array()); return parent::getDia(); }
0
a54a085042bd87190e6f19f98da4c3b9
66606224ae58bbbeb49ab5cb7ef9749b
判读俩个字符串左侧的length个字符串是否一样
namespace CodeBoxControl public partial class PopupControl : Popup private bool IsPre(string str1, string str2) { if (str1 == null || str2 == null) return false; if (str1.Length > str2.Length) return false; return str1 == str2.Substring(0, str1.Length); }
1
1c2b1782ed0bff5d97f488c5b938f892
5a4036b274c6fc7ee0a898f51e9fb4c2
Multiply the angle by the given amount
this.starAngle += angleRadians this.starCos = Math.cos(this.starAngle) this.starSin = Math.sin(this.starAngle) }
0
2211a673c240321826d7af3dae70477d
d7b04870b85a3fa00fff2bca4d8aec90
根据工作组找出等待上门call数
urlStr := gatewayURL v := url.Values{} v.Set("command", "cmd_GetServiceByID") v.Set("GetHandlingWPorWU", "1") v.Set("ServiceID", servid) v.Set("GetWaitingCountPerWPOrWU", "1") rb := *strings.NewReader(v.Encode()) client := &http.Client{} req, _ := http.NewRequest("POST", urlStr, &rb) req.Header.Add("Content-T...
1
07e8195fa649ff432aed5ca575d7c1d4
123dda1e8bb2aa0339201696bb8de7e4
ADD AN ITEM TO CART FOR A CUSTOMER IN THE SYSTEM
$custom_items = array(); if (!empty($cart_data)) { $custom_items = $cart_data; } if (isset($cart_item['bathroom'])) { $custom_items[] = array("name" => _e("Bathroom", "Avada"), "value" => $cart_item['bathroom']); } if (isset($cart_item['bedroom'])) { $custom_items[] = arr...
0
4bf4580b5f06c01f4de22d2352989791
8f1410fde132ab83d7d608206b0845bf
Get random galleries with count.
class GalleryAPIController extends Controller public function index(Request $request): JsonResponse { try { $this->galleryRepository->pushCriteria(new RequestCriteria($request)); $this->galleryRepository->pushCriteria(new LimitOffsetCriteria($request)); } catch (RepositoryExc...
0
6568109e443ee237af7a9838cc0d0e0d
6ef330de63ed95641264575de5a83def
Handles anchor elements with a hash fragment for non-HTML5 browsers
export class UrlMatch extends AbstractMatch public getAnchorHref(): string { let url = this.getUrl(); return url.replace(/&amp;/g, '&'); }
0
c4cd9414ad53a60539f96a7ead581cec
62d4e6665ef3b5f5b07a67a8978a8e25
该笔订单允许的最晚付款时间,逾期将关闭交易。 取值范围:1m~15d。m-分钟,h-小时,d-天,1c-当天(1c-当天的情况下,无论交易何时创建,都在0点关闭)。 该参数数值不接受小数点, 如 1.5h,可转换为 90m。
class WxPayUnifiedOrder(WxPayDataBase): def time_expire(self, val: str): self.values['time_expire'] = val
1
9b93d8f26a771556e9e17d87803a7270
ff7b866d28c7abd9ca83f4c16058aaae
Returns the public key as a buffer. The public key version is added as the 0th byte in the returned buffer
public class ECKey implements Serializable public byte[] getPubKey() { return pub.getEncoded(false); }
0
3f1c38772213aca9d4232c2ae129d1cd
d326072fb69cce6fbe08e7fda1b6b2ab
猫吃东西的方法
class Cat(object): def catch(self): print('我能捉老鼠')
0
9ce8b7b79186478b61343f05b00b4f3e
05ba890464d2c8e4481c3bfc9e08f2cb
Implements >> "see also"-tokens
void TSpecialToken::Print(void) const { sprintf(list.text, "\t%-18s %-s", ">> special:", string); list.PutLine(); }
0
02fd9ca7fc0fff674bfa1ec288389ae1
ab6f6f041127a44c3a19adb56436ff9b
将用户提交的vcf文件或tab文件进行注释并解析成最终的vcf_annotated.tsv文件。
dir = 'annotated-with-annovar/annotated-tables' try: os.mkdir(dir) except (OSError): pass avinput = outputs[0] rare_var_fun = inputs[0] rare_ex_var_fun = inputs[1] f_out = open(avinput,'w') f = open(rare_ex_var_fun) for l in f.xreadlines(): lspl...
1
d0ce2684273d9de5782587c751045931
5e66c77b7ca6b25bc055a43dd4a14338
Gets the score of this VulnerabilityCvssV3. # noqa: E501 The CVSS score, which ranges from 0-10. # noqa: E501
class VulnerabilityCvssV2(object): def score(self, score): self._score = score
0
b2e1b966e8a21a708a6d66cdf28ec0a8
f7c10e7f95785ea509ca3c0a9c4ff309
Delete the keys that we sent to the server when closing the application.
localStorage.removeItem('at'); localStorage.removeItem('name'); localStorage.removeItem('email'); localStorage.removeItem('phone'); localStorage.removeItem('messages'); localStorage.removeItem('expiry'); localStorage.removeItem('uid'); localStorage.removeItem('token'); localStorage.removeItem(CHAT_STATE_VARIAB...
1
6c6b8e6d51f81e0ab88a5202a0c6f084
11ed3abbf4da82ec742eeea38d377180
8.1.6 多支股票使用不同的因子进行择时
if stock_pickers is not None: for picker_class in stock_pickers: if picker_class is None: continue if 'class' not in picker_class: raise ValueError('picker_class class key must name class !!!') picker_class_cp = ...
1
3011fb423473f72e1772cdb93c30853c
625b390246c16955b37cf147c909c2aa
微信分享是否送抵扣券(多号串联不可领)
namespace EyouSoft.WAP.Member public partial class ZhiFu : HuiYuanWapPageBase int SheZhiTuiGuangYiFanLi(string dingDanId, EyouSoft.Model.OtherStructure.DingDanType dingDanLeiXing) { return new EyouSoft.BLL.OtherStructure.BTuiGuang().SheZhiTuiGuangYiFanLi(dingDanId, dingDanLeiXing); }
0
b0703fd752da2eeb7cb00cfd86010e20
650a6edc9768d30a6a6b03ee3f76f322
Metode per borrar una avi de la BD, implementat de IAviDAO
public class AveriaService protected AveriaDTO delete(String id) { return (AveriaDTO) averias.remove(id); }
0
01e391b06818b50f84bb5d9077e34311
6a57404c8140a8446683470613f5b1e1
Get the limited price of the given trans_id
setDataSource(getDataSource()); Transaction trans = GetTransactionForId(tranid); double price = (trans.getquantity()* trans.getrate())+ trans.getcommission(); double due=0.0; List<Payment> lp = getTransactionPayments(tranid); for (Payment Paym : lp) { du...
1
4debbd5daf1f442f1f58ec4ce755a3ff
1e1fba68060fa93dd0acb90a9c11d92e
Tests my_pet url
class apitest(unittest.TestCase): def test_main(self): url = "http://localhost:5000/" data_from_server = requests.get(url).text self.assertEqual(data_from_server,"meow meow")
0
3cb08cdfd49935a10abc13d6f488b6bf
711b30f334d0f748b455ed4c449af0c4
정보창 제거
function remove_info_internal(){ $('#lid').text(''); $('#lgroup').text(''); $('#liproduct_name').text(''); $('#lmanufacturer').text(''); $('#linput_date').text(''); $('#liprice').text(''); }
1
5a271a37b480f9221edcdcd7ee6ea221
9b941f2e46f5e3e153124886e660f929
子ウインドウを開いて、本ウインドウを閉じます。
namespace OnSii public partial class Form2 : Form public void ShowForm(Form1 form) { this.Show(); parentForm = form; parentForm.Hide(); }
0
0262472cb65e948b48c11a9d9080b98f
54095adcaaf26eaef7edb778449a547e
Sets waiting state.
namespace SCADAWinForms public class StatePeticion public void Set() { WaitResponse = true; }
1
2f6698388301a2a38c1e3839138b4e1d
94bd245d2faa641ec33111d5693467b0
Takes in a string (null-terminated) that represents a component of a pathname 1 if it matches a pattern that the rootkit wants to hide 0 otherwise
int c, c2; int invert; int seen; while( (c = (*(zGlob++)))!=0 ){ if( c=='*' ){ while( (c=(*(zGlob++))) == '*' || c=='?' ){ if( c=='?' && (*(z++))==0 ) return 0; } if( c==0 ){ return 1; }else if( c=='[' ){ while( *z && strnotglob(zGlob-1,z)==0 ){ z++;...
1
09cd7e16c9e7141fc29bdd313eb3ece2
4b26142476f19929f695185027f5b711
Returns End Clockin Time. If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format.
public function getEndTime(): ?\DateTimeInterface;
1
8728944aa298e77213655ba2e6b87ee2
b33d78a4e6dbb7c2672eaeb1ac498471
Reset the radio. Radio responds with "OK" then resets.
radif->reset_clear(); radif->slptr_clear(); radif->spi_stop(); radif->delay_us(TIME_P_ON_WAIT); radif->reset_set(); radif->delay_us(TIME_RST_PULSE_WIDTH); radif->reset_clear(); uint8_t i = 0; while ((at86rf212_reg_read(VERSION_NUM, radif) != AT86RF212_VER_NUM) || (at86rf212_reg_read(PART_NUM, radif)...
1
e3b77769caccdc28f74d6f675be4db09
58603f1a2e97371fb20b9115ffb84569
Checking syntax in object tree names.
class TimePatternTerm(models.Model): def check_syntax(cls, term): TP(term)
0
12dc3a165d7cc80899a0971a0d0f4936
00aef316eb5ea52a3c5afcd516817cdb
获取某天当前月第一天 时间戳
function getMonthFirstTimestamp(timestamp) { let inDate = new Date(timestamp); let year = inDate.getFullYear(); let month = inDate.getMonth(); return new Date(year, month, 1).getTime(); }
1
1424e7585163bfb30b4909c5f9932f67
6d882bc44257e21eee0bdb10343ea076
Computes the second derivatives matrix for a natural cubic spline from a given set of x and y data
N = len(points) - 2 main_diag = np.diag([4] * (N + 2)) main_diag[0, 0], main_diag[N + 1, N + 1] = 2, 2 lower_diag = np.diag([1] * (N + 1), -1) upper_diag = np.diag([1] * (N + 1), 1) A = lower_diag + main_diag + upper_diag interp_points = points_to_array(points) Y1 = np.empty(N + 2) Y...
1
11c105654dd8eab444a2010ea07686bf
a18aeea044a98550fa4c05c994d0f16a
indicateur si un dossier contient un depôt
class Watcher def processus_exists? folder_processus.exist? end
0
970868f8696c6d538ef3c4c9a7427211
abfd16e6a6274e99f6ba30a5163dfeee
Gets query for [[TournamentGroupTables]].
public mineplex.database.tables.ActiveTournaments as(java.lang.String alias) { return new mineplex.database.tables.ActiveTournaments(alias, this); }
0
72f1b7be403bff57b3e5f5ef032dc9cd
8f4d946f2d03ac835d2854b38c59ffc9
update the display of the addresses
class ZAddressInfo extends React.Component updateAddressesInfo() { Object.keys(this.props.publicAddresses).forEach(function(key) { if (key !== undefined){ this.updateAddressInfo(key) } }.bind(this)) }
1
145ee65269d625ae9100198c3a2748e6
bdade7e21802a0a839bb6081ebf3f39e
Deliver a physical item from the requested agent.
class AgentsManager: def deliver_virtual(self, token, kind, amount=1): return self.agents[token].remove_virtual_item(kind, amount)
0
6612c6df683ae9482849d78960ea7b72
2cfb1be6bfffd6f3148dd5494601f0eb
注册Flux服务
internal fun Context.registerJobCactus(cactusConfig: CactusConfig) { val intent = Intent(this, CactusJobService::class.java) intent.putExtra(Cactus.CACTUS_CONFIG, cactusConfig) startInternService(intent) }
0
37aeadbf148b2790d9366403a18c9635
4c1559e73b721d9b2fe551bf04da13dc
为客户端和服务端的构建配置进行手工的扩展处理。
{ var builder = buildContext.StartupConfiguration.ExternalBuilder; buildContext.Logger.LogInformation("ConfigureServicesExt started"); builder.AddServices(buildContext.ServiceCollection); var serviceProvider = builder.ConfigureServices(buildContext); b...
1
45f16b47cabc5db3bcd989dff8e4b0e9
1c6c774185d13f761ad4bb1c22de05f1
Abrir tela de cadastro de funcionario
namespace SA_III public partial class Form1 : Form private void abrirfuncionario(object obj) { Application.Run(new Form3_Tela_Funcionario()); }
1
49c683b059a6a5db712b7a6c42ebd165
9db8c9d99ee1eebbe81f5e0d0e76d113
Parse a single data value at the next lexer point. Recurses for objects and arrays. Returns 0 (WXJSONERR_NONE_OK) if successful, error code otherwise.
static int _lua_json_parse_value(jsontok_t * tok) { size_t i =0,r; char c; while(tok->pos < tok->size) { c = tok->jstr[tok->pos]; switch(c){ case '\'': case '"': tok->pos++; return _lua_json_parse_string(tok, c); break; case '\n': tok->pos++;JSONTOK_NEWLINE(tok); break; case '\r':case '\t...
1
d4b7360359b590035106ee9eeabe1b88
da8f1042d3ef777f5c8babf73fa60415
Checks if user given has access to the study given
var err = []; for (var validation in validations) { validations[validation](study, newStudy, err); } return err.length === 0 || err; }
0
369c7a9549ff940ab248012e9fb8ccd5
b784d3d8b124c91fa0067f61cfa90bc7
删除好友表中userid对friendid的记录
DB sql_conn; if (!sql_conn.connect()) { return false; } char sql[1024] = {0}; sprintf(sql, "delete from friends where userid = %d and friendid = %d;", userid, friendid); if (sql_conn.update(sql)) { return true; } else { return false; } }
1
f01af1eb1aea5b074a9f45b599528463
14bf9fde495c76f8318ac673c513d185
Sends packedstring as a telescope goto command where packed string is created in module members.control
static void send_write(char * str) { char * p; int len; len = strlen(str); p = ts_tmalloc(len+2); p[0] = '0'; p[1] = CONSDRV_CMD_WRITE; memcpy(&p[2], str, len); ts_send(MSGBOX_ID_CONSOUTPUT, len+2, p); }
0
fd9b10b800a49f9545e2c0937c01431a
b0a109519457c522e18606ffa7b73ab0
On récupere seulement les première occurence des catégories
return this.datamodel.getProducts() .map(t => t.category) .filter( (category, index,array) => array.indexOf(category) == index); }
1