query_id
string
corpus_id
string
query
string
code
string
label
int64
aca8914d002d2ed86dbf6ba01254c3f8
7632cd6b4ee1b00c436b5a781c0c127e
restituisce il dato corrispondente al metadato cercato, se quest'ultimo esiste
public class LuceneSearcher implements RepositorySearcher public Metadatum getMetadatumByDocID(String name, String docID) throws RepositoryAccessException { Metadatum md = null; String [] fields = {name}; MapFieldSelector fsel = new MapFieldSelector(fields); IndexReader lreader = null; TermDocs td =...
1
8c718137901504b5f6a01cb962392b37
4ebad0874e3acffaa1850444a7421065
returns the url of the banner image
class GeocachingResourceOwner implements ResourceOwnerInterface public function getBannerUrl() { return $this->getValueByKey($this->response, 'bannerUrl'); }
1
2e8b29b32aa0cc553c08d941d585d06f
870fe7f0ff8f4d5f953ba1c0b967b98b
Entry가 NIL 이면 true를 반환한다.
{ return ((Right(P) == Nil) && (Left(P) != Nil)); }
0
35eaab3bd1061be4e94e8de2b830aa4d
78a8063fe2be97f5afe12911852f7bdf
Create a TwitterRequest for getting an authentication token.
$method = 'POST'; $endpoint = self::TWITTER_API_DOMAIN . 'oauth/request_token'; $authorizationParams = array( 'oauth_callback' => $callbackUrl, 'oauth_consumer_key' => $this->_consumerKey, 'oauth_nonce' => md5( microtime() . mt_rand() ), 'oauth_signature_method' => 'HMAC-SHA1', 'oauth...
1
dcdc40084c3cc348e865a13a5daf47e9
00d53576a6d5917ebf476f7584f72ef2
Checks whether the already marked this product in this store by this tag.
class CProductInfo function isTagExists($tag) { if ($this->_fProductIDIsIncorrect == true) { return ($this->debugmode ? 'Product ID is incorrect' : false); } if ($this->_fProductAttributesInfo == null) { $this->_loadProductAttributesInfo(); } if...
1
566de058d3eadbae0aa0821c50f1d9e4
2226fb97058ca3cb5c4c6ecde35bd929
Whether to ignore the order of attributes on an element. <p>The order of attributes has never been relevant for XML documents, still XMLUnit can consider two pieces of XML not-identical (but similar) if they differ in order of attributes. Set this option to true to compare the order.</p> <p>The default value is true</...
@jdk.Exported public abstract class MessageInfo public abstract MessageInfo unordered(boolean unordered);
1
02f598e2dd9f0e26742fcd8e1e8d70de
af0f51284b180880629b899f3af0cf88
串口引脚配置
{ GPIO_InitTypeDef GPIO_InitStructure; USART_InitTypeDef USART_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART4, ENABLE); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE); RCC_AHB1PeriphClockCmd(RCC_AHB1Pe...
1
2694da3c20cc3d73dac729a91e3cfc44
2a15b8a60b005e6a44ed3099848314dd
Returns the number of components being defined Returns: int: number of components
class Domain1D: def nComponents(self): return _cantera.domain_nComponents(self._hndl)
1
caddc88456ed03861d69f8a6b5576ce7
11f603c1939b14c0f1832c556eee4a1c
Cancels issued maintenance
{ try { $client = new Client(); $client->request('PUT', env('API_TEST') . 'maintenances/' . $id, [ 'form_params' => [ 'randomkey' => Session::get('randomKey'), 'status' => 1, ] ]); } catch (\G...
0
cb7010f74d7d96ab7b7a913a15b607a8
bb690935945165f071729a3dcabc22d2
Adds a new element of type Microsoft.SharePoint.Client.Search.Query.Sort to the collection and returns a reference to the added Microsoft.SharePoint.Client.Search.Query.Sort.
namespace SD.LLBLGen.Pro.ORMSupportClasses int Add(ISortClause sortClauseToAdd);
0
e2b1f47e4a924f0df8e35b6477d4420b
74db91b2d76483b8a19bf72c14a4fb89
WHEN: /v1/index supports only GET requests WHEN: /v1/index is called with a POST request
class MyTestCase(unittest.TestCase): def test_fail_on_post(self): result = self.app.post('/') self.assertEqual(result.status_code, 405)
1
9fc4f598619effe46c3e07a2e9ca90b2
69f9bd76f2c92067df6490d28b041953
Update the acceleration of the Particle
class particle: def update(self, dt): self.velocity_x += (self.force_x / self.mass) * dt self.velocity_y += (self.force_y / self.mass) * dt
0
2c0eb83102a04796eebba6b713dcd6b0
6e85736e26f6ca3e65d3dc6ec6b6a284
Allows to add victory score in database.
class User(): def add_victory(self, points: int) -> None: self.points += points self.victories[points] += 1
0
7f9e7aa56c9ebc1aaeba6354d47994dc
a54473ffff74456df96e370053268e99
Returns true if recipient was resolved by the address book
public class AbstractAgent implements Comparable<AbstractAgent> public boolean checkAgentAddress(final AgentAddress agentAddress){ return getMadkitKernel().resolveAddress(agentAddress) != null; }
1
c33b4a298d7f72da28954116c1b4d70d
ff4723906be4f4f7916e5724d9751f75
Returns the component for desktop icon hover (internal frame preview) functionality. functionality.
public class PaintSpace public ImageIcon getComponent () { return imIcon; }
0
1cf50d22831cc27edb849a7ef61825a2
1b793e452ca2085eed43e9f206236471
生成账号被禁用响应
class RootUserController extends RootController public function getDisabled($userId = NULL) { if (is_null($user = User::find($userId))) { return Redirect::to('root/user')->with('error', '用户不存在'); } $user->disabled = 'true'; if ($user->save()) { ...
1
a6fd8f05dab6d94e58302fa72d5ff019
0909d7d4eebd90aa1974d7beb2a8807a
Figure out what sort of package this is. Returns a string, one of:
class update(generic.update, builddb.builddb): def getPackageType(self, releaseRequestID): packageName = self.getPackageName() result = self._db.Command("SELECT name,type FROM ReleaseAutomation.release_request WHERE id=%s" % releaseRequestID) if len(result) > 1: raise Exception, "testing debug stuff, this can...
1
fe04a25f5a9399062a4edaeceffa9dd8
159bb93330654fda1cd09aa3295eb04a
获取格式化的m3u文件路径
urls = [] with open(m3u8_path, "r") as file: lines = file.readlines() for line in lines: if line[0] == "h": urls.append(line.strip("\n")) return urls
0
63c29fd500cede159b69f429c9600a4c
71bbca5c17c1f69cd9553e4b86dc65e9
Test validation of travel expences management.
webDriver.findElement(By.id(sRPF.userClaims_Xpath.get("TravelExpense_TravelTransportationHeader"))).click(); commonMethods.selectGivenDateFromCalendar(sRPF.userClaims_Xpath.get("DateCalendarImgID"), sRPF.userClaims_Data.get("TravelExpense_DepartureDate")); selenium = new WebDriverBackedSelenium(webDriver, sRPF.us...
1
fe18cbd49132144521dcd988c86438dc
896b4330b0fa99a1e978f8ff275abfeb
Set the maximum number of allowed Newton iterations for the solution of nonlinear system
namespace chrono public abstract class ChSystem : ChAssembly, ChIntegrableIIorder public void SetMaxiter(int m_maxiter) { maxiter = m_maxiter; }
1
e9bab6ff7da8fe0106351a618c945648
5eba3f05ca0429e40509be3fb73578dd
get file names for input FASTA and motifs
for name in nameList: tempFile = open(name+"CARTFASTA.txt","w") for num in range(len(file)): if name in file[num]: tempFile.write(file[num].split(",")[0]+"\n") tempFile.write(file[num+1]) tempFile.close()
0
675350b3273057b62b0aa98e568c093d
26f16a52df17de9bb1ed04b077db96f6
checks the number of intersections between both circles
x_distance = ((circle1.position.x-circle2.position.x)**2) y_distance = ((circle1.position.y-circle2.position.y)**2) radii_distance = ((circle1.radius+circle2.radius)**2) return (x_distance+y_distance) <= radii_distance
0
6036abdbc703f302ef9a18dc31a324f2
65dc1a5a4a987362cc113698a1748890
Set replication configuration information
public class SetBucketReplicationConfigurationRequest extends AmazonWebServiceRequest implements Serializable, ExpectedBucketOwnerRequest public void setReplicationConfiguration( BucketReplicationConfiguration replicationConfiguration) { this.replicationConfiguration = replicationConfigurati...
1
ce8487439bea8967451cf4ddc95e312f
83724b06a12fdb4ad179c56393590596
grupowanie kolorów z nieposortowanej listy
var i; var n = 0; var colorArray = []; for(i = 0; i < data.length; i++){ if(i % 4 == 0) { colorArray[n] = data[i] + ',' + data[i+1] + ',' + data[i+2] + ',' + data[i+3]; n++; } } uniqueItems = []; $.each(colo...
1
d8375da87d20b3519e2a887135681bba
5b11361c70c35f975be5d252321705b9
Set the CommandArguments objects of the command
commandArgs.setCheckOutComment("Checkout comment"); commandArgs.setFullWorkfileName("Full workfile name"); commandArgs.setLabel("Label dude"); commandArgs.setOutputFileName("Output filename"); commandArgs.setRevisionString("1.1"); commandArgs.setShortWorkfileName("Short w...
1
ad6ef3cc2fcb8114efd9108d3d63eb03
06eec18993f0cf9910449db7af351052
普通4位ip转换为32位二进制ip ex: 192.168.1.1 11000000101010000000000100000001
temp = ip.split('.') result = '' for i in range(len(temp)): temp[i] = str(bin(int(temp[i]))[2:]) if len(temp[i]) < 8: temp[i] = '0' * (8 - len(temp[i])) + temp[i] result += temp[i] return result
1
8a6e2b06880bcfb5ee88eb3748641c9f
5ece188886fd1908efabe5fb924e6045
Merges image tensors to single tensor.
max_shape = np.array([im.shape for im in ims]).max(axis=0) num_images = len(ims) blob = np.zeros((num_images, max_shape[0], max_shape[1], max_shape[2]), dtype=ims[0].dtype) for i in range(num_images): im = ims[i] blob[i, 0:im.shape[0], 0:im.shape[1], :] = im retur...
1
c01205bb3f29eba961e7a47d1de0c91f
d31802f24eaacbc527291d1a5c668299
Raises the DeviceNotification event.
NativeMethods.RegisterDeviceNotification(hRecipient, new DEV_BROADCAST_DEVICEINTERFACE { dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE, dbcc_reserved = 0, dbcc_classguid = InterfaceClassGuid, dbcc_size = (uint)Marshal.SizeOf<DEV_BR...
0
c0e70cf5c9512e6a9dacc474a9e7e2d8
be8e38c703b8699ec92c61e161f42866
Returns TRUE when property changes are complete, according to recursion counts
public function is_recursion($subexpression = 0);
0
ae82b9bb90865d751310733017853ba2
d8f699503d246afde8c1b8c928716ce8
根据考核评价工作组ID和评分完成情况查询领导班子评价评分表
namespace Lib.Bll.SupplierPerformaceBLL public class SPR_SPCompareBLL public DataTable getMaterialEvaluatedScore(SPCompareConditionValue sPCompareConditionValue) { return sPR_SPCompareIDAL.getMaterialEvaluatedScore(sPCompareConditionValue); }
0
0af1fee5f6a535201f4f795bf68ea92f
48651e5f1dd499b0e12bf72cb7dfd3d5
#Taken from https://stat.ethz.ch/pipermail/r-help/2006-March/101023.html
ecd.rational <- function(x) { if (length(x) != 1 | !is.finite(x)) { stop("Input must be length-one finite numeric!") } cycles = 10 max.denominator = 100 a0 <- rep(0, length(x)) b0 <- rep(1, length(x)) A <- matrix(b0) B <- matrix(floor(x)) r <- as.vector(x) - drop(B) len <...
1
282575cfe90548aee7983d8e1623d2ab
2c6ea3bd17eefcbc8c5c778a475bc1ea
Interpret warning/error option from command line
void CCommandLineInterpreter::InterpretCommandOption(char * string) { if (*string <= ' ') { err.submit(1001); return; } switch(string[0]) { case 'f': case 'F': if (string[1] == 'd') { InterpretDumpOption(string+2); break; } InterpretOutputTypeOption(st...
1
81b111634f9dd8a1c1f47878075f478c
0dde6eb94c9c8adefa4b44f593a7d3b1
Tests_SRS_DATA_MARSHALLER_99_034:[All argument checks shall be performed before calling any other modules.]
int proc_enter_SMC_996000(int arg_0, int arg_1, int arg_2, int arg_3, int monitor_api_number) { return 0; }
0
89be7dfb3ee6564e61c2a790eeccaf8e
9f7b549109936a97e1be80e154a5c846
Handles the SizeChanged event of the MainForm control.
{ if (this.initialized && this.ReadOnlyLabel) { this.label.Size = this.Size; } base.OnSizeChanged(e); }
1
dd8d69eec8a135763ff16184f3b7de29
31a1c2f6a35c5e5022ac8e06f664163e
발신번호 리스트 새로고침
public String sendList(HttpServletRequest request, HttpServletResponse response, Model model) { Menu menu = menuService.selectByAlias("send"); model.addAttribute("defaultPageSize", SEND_DEFAULT_PAGE_SIZE); model.addAttribute("recordPageSize", RECORD_DEFAULT_PAGE_SIZE); model.addAttribute("menuName", menu.getNa...
0
7667e009351879e39a06670948210526
416b91e671efff4aabc836fe4a32be88
This method was generated by MyBatis Generator. This method returns the value of the database column x$schema_table_lock_waits.object_name
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.3" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class SchemaTableLockWaitsRecord extends TableRecordImpl<SchemaTableLockWaitsRecord> implements Record18<String, String, ULong, ULong, S...
0
e54c88656c7a04895eb55679417ffe4e
5e2c4495504163b3c5b639db3b371c27
Visit a parse tree produced by PyLogic3Parser#import_from.
export class PrintVisitor extends DelvenVisitor visitImportFrom(ctx: RuleContext) { this.log(ctx, Trace.frame()); return this.visitChildren(ctx); }
1
3f6ee24dd9b58fd3e178955087ef90d1
d3f0c49a73bb4cf3ef186cabf1b16c03
Return a list containing the first `num` values in `iter` (or fewer, if the iterable ends early).
def take(n, iterable): return list(it.islice(iterable, n))
1
9d4904d32f6380546642079bfd9bcee2
ee17c840a9b73fc90d3049014e8b2edf
rfc1123, rfc850, asctime 형식 타임스탬프를 파싱해서 UTC 에포크 시간 반환.
def parse_datetime(s): return rfc3339.parse_datetime(s)
0
18000c25ae3e449f45be85678e28a861
4babd75e7a58f0d6a182f2394422f142
添加红酒信息
$rpp = Input::getVar($_REQUEST['rpp']); if($this->isPost()) { $_POST['aname'] = str_replace(';',';',Input::getVar($_POST['aname'])); $_POST['g_map'] = A('Common')->GrabImage($_POST['g_map_url'],'Winery/map/','png'); $winery_id = $this->_insert(D('Winery')); if($winery_id){ foreach($_POST['join...
1
3c674bbae7b566f8b8562931dd94ac56
45968d1ca6de3d9e72c9337b54a37740
Initialize node at index i for thread. Filename is retrived by calling the client api. File is created with the name and creation time is stored in the node.
public class Peer public synchronized void initFile(String filename, SharedFileDetails info) { shared_files.put(filename, info); sendCreateTracker(info); }
0
34f08bd575fb7c3c2936188c248bcd45
1a5048d0cb39af7ca521afc20e256ebf
操作结果:返回e的右兄弟,若e是T的右孩子或无右兄弟,则返回空
TElemType RightChild(SqBiTree T, TElemType e) { int i; if(T[0] == Nil) { return ERROR; } for(i=0; i<=MAX_TREE_SIZE-1; i++) { if(T[i] == e) { return T[i*2+2]; } } return Nil; }
0
be48f04bb0132c456775b7ed3ad58f77
b2b21c851a24f9832865851f0a5111b2
Replace the missing values in the given column using machine learning predictions
class Imputer: def knn(self, X, column, k=10, is_categorical=False): X, column = self._check_X_y(X, column) clf = self._fit(X, column, k, is_categorical) if clf is None: return X else: X_imputed = self._transform(X, column, clf, is_categorical) return ...
1
ca04cf0cdae4b8f992c6c385467a4bdc
9342f7507d4bea8accdd08c7a6381131
For ignoring events that are too close together
def minimum_event_onset_diff(eventOnsetTimes, minEventOnsetDiff): evdiff = np.r_[1.0, np.diff(eventOnsetTimes)] eventOnsetTimes = eventOnsetTimes[evdiff>minEventOnsetDiff] return eventOnsetTimes
1
0d8a8be8310930ea153a283f1e70193b
03d37d17dde7f08ce3b5f7c7c3dd4c56
If there is just one comment for item, register the itemid
def _commentFilterFn(tag): if not tag.has_attr('href') or not tag.attrs['href'].startswith('item?id='): return False text = tag.get_text().strip() return text.endswith(' comments') or text.endswith(' comment') or text == 'discuss'
0
69f42c89483c174d5516dc441697dc24
d251a50ca6c3c3c2db8dc9285f693363
Test that album has an owner after assignment.
$PhotoList = $this->User->getPhotoList(); $AlbumList = $this->User->getAlbumList(); $Photo = $PhotoList->getPhoto(1); $oldAlbumId = $Photo->getAlbumId(); $OldAlbum = $AlbumList->getAlbum($oldAlbumId); $this->assertTrue($OldAlbum->hasPhoto($Photo->getId())); $Photo...
0
80835cb6926d28cdace2a55df01e1753
bacab5cff0e4ec5cc0b695ecb8ac7d34
Проверяет свободность места заданного размера и направления от клетки левее и правее корабля.
public class BattleArea implements Serializable public boolean canShipBePlaced(BasicShip shipToPlace, int rowToPlace, int colToPlace) { return isShipInBattleArea(shipToPlace, rowToPlace, colToPlace) && isShipPositionAvailable(shipToPlace, rowToPlace, colToPlace); }
0
1e34187f22ced1610128527b64d835c9
cb33f0ff5cc1f84f7cf98848541d979b
Tell if token is control flow element.
{ if (targetToken.GetAncestor<ConditionalDirectiveTriviaSyntax>() == null) { return false; } if (targetToken.Kind() == SyntaxKind.IfKeyword || targetToken.Kind() == SyntaxKind.ElifKeyword) { return true; } ...
1
534d6d04bc17c819ecc73802c3bf0807
dbdc27a21450238e5e489c88bd2e2391
Trouve l'ID max dans la table Users
class CorUserDao public function selectMax() { $sql = "SELECT Max(user_id) FROM cor_user;"; $connectionManager = new ConnectionManager(); $stmt = $connectionManager->getDB()->prepare($sql); $result = $stmt->execute(); $arr = $result->fetchArray(); return $arr[0]; }
1
92e782d7f6fd3d49cd3490a7b1b6d851
592f953eae854e811aa2ce32ee598f17
这是一个“callback”函数,被添加到Deferred,Deferred会把页面内容作为参数调用它
function cb(val) { alert("内容已经更新成:" + val); }
1
7337812b5599ecc69e01e1db1423d41c
8e4d9cd8cfeb75302b6b4aff0ef4c550
Create a <li> element as an item in the list box.
var li = document.createElement("li"); var a = document.createElement("a"); a.setAttribute("href", "#"); a.addEventListener("click", chooseListItem); var text = document.createTextNode(title); a.appendChild(text); li.appendChild(a); return li; }
1
3019d2f8060cb97880ea0d64699c1aa4
b1a080f8bb7fb2fbdc96ac8a3b0ccace
Test empty radix sort.
lst = [100] expected = [100] actual = radix_sort(lst) assert actual == expected
0
cf0bc37d3104d0d2957d97e488615c29
7e3f127d684495feb3530cbdb30c3cd7
Only allowed alphabetic letters and spaces
function onlyLettersAndSpaces(){ const regex = new RegExp("^[a-zA-Z]+$"); const key = String.fromCharCode(!event.charCode ? event.which : event.charCode); if (!regex.test(key)) { event.preventDefault(); return false; } }
0
2b7a636c0a5c7be3fe167ae8ea91dd43
7d2d0789f201ae516f636a47cc200a35
calculate the average throughput, given the global CSI, noise power and beamformer of each BS
{ float meValue = 0.0; float ftjValue = 0.0; cimg_forXY(_averageEnvelope, x, y) { meValue += _averageEnvelope(x, y) * _averageEnvelope(x, y); ftjValue += _bimf(x, y) * _bimf(x, y); } return meValue / ftjValue; }
0
480027a5e182a17393326975c34615e5
162df618d6f0e163c210ebe65462c06a
Adjust configuration of the VM hosting OMS
string token, AzureEnvironment azureEnvironment, string tenantId, string subscriptionId, string resourceGroup, string hostGroupName, string requiredVmSize);
0
bbf0e40072187a83da1fd93924b55224
59a887f0148c95d17656c0dc0d0cebde
啟動/停止email驗證
namespace IKEA_WebSite_WebAPI.Controllers public class RegisterController : ApiController [HttpPost] [Route("api/mailActivation")] public AJAXResponse mailActivation(string id) { try { User user = this.user_service.GetBy("UserID", id)[0]; ...
1
0a35157764826cefad6a8c9fabd6b3b2
42f8091a13078065e729b86d52299c50
Get the closest node that is walkable
{ if (moveController != null) { return moveController.GetNearestWalkableNode (point); } return mTransform.position; }
1
7113ecf08bae814bb061fb41ef6ca399
54a2f359d8f42759a47679e3c589e9a7
Atribui o valor do grau da rede.
void Polinom::setGrad(int grd) { this->grad = grd; }
1
00c89be22e1fab18ceb1a7c66b51b020
6e1ca9cfd4846651ed32cbca8e3b819c
Reads the language groups of all the UI languages installed on this machine.
namespace VscAppz Action<Action<string[]>> GetLanguages();
0
7be0540a016b1be1f01ff1cc6bff1292
655c4f4a9006e41ad96f975a10faa47b
Auxillary Function for the relate function.
{ int count; int right_symbol, left_symbol; count = 1; right_symbol = left_symbol = pcur->i_ID; switch(right_symbol) { case TOKEN_RPAREN: left_symbol = TOKEN_LPAREN; break; case TOKEN_RBRACE: left_symbol = TOKEN_LBRACE; break; case TOKEN_GREAT: left_symbol = TOKEN_LESS; break; default: left_symb...
1
a7687c096e092c976feeba1426109d60
b1b6fe53a3b9bf0599a129540aed55f8
Balises pour des onglets en squelette
shlHome = new Shell(); shlHome.setSize(503, 273); shlHome.setText("Home"); tagsbutton = new Button(shlHome, SWT.NONE); tagsbutton.setBounds(178, 53, 159, 57); tagsbutton.setText("Gestion des Tags"); GenererButton = new Button(shlHome, SWT.NONE); GenererButton.setBounds(178, 152, 159, 57); GenererButto...
0
1dd42ca73c99ffeb6c1b78fdfb6d510a
dfb4d91a9c7c87720f6a6aadc5816b41
当用户用鼠标点击此标签时,将调用系统命令,打开网页
namespace HostManager public partial class FrmMain : Form private void lbtnUrl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (!String.IsNullOrEmpty(Url)) { Process.Start(Url); } }
1
2da0d795c76efe73c2edb0ca78ea60d7
022388daa07f7de4c8aa53d556e9c82c
geifPhyLinkInit Initialize and setup the PHY link.
{ struct lan91cxx_priv_data *cpd = ifp->if_softc; uint16_t intr; uint16_t phy_ctl; int delay; DEBUG_FUNCTION(); HAL_DELAY_US(100000); phy_ctl = lan91cxx_read_phy(cpd, 0, LAN91CXX_PHY_CTRL); phy_ctl &= ~LAN91CXX_PHY_CTRL_MII_DIS; lan91cxx_write_phy(cpd, 0, LAN91CXX_PHY_CTRL, phy_ctl); put_reg(cpd, LAN91CXX_RPC...
1
407ba6d7c9289bb534982da1d2a25361
3e2d25a903ea49dda601d1df52f2348f
Field is required if not saving project as draft
{ if (get_field('listing_price', 'option')) { $field['required'] = 1; } else { $field['required'] = 0; } return $field; }
0
0ca9f5ca45c60c2cddb5b9c21ad1ef8d
4d8a8c6828c0fe0e05a9cf9d19e239b4
Visit a BasicBlock in the CFG
if (str(ctx.children[0]) == "if"): self.crude_cfg = self.crude_cfg + "[ if_" self.visit(ctx.children[2]) self.crude_cfg = self.crude_cfg + "[ " self.visit(ctx.children[4]) self.crude_cfg = self.crude_cfg + " ] " self.crude_cfg = self.crude_...
0
96217e10f41a2f3d1d1e69ae29aa8741
67b9a31282a2c01ab012ec165a5c8dee
Restore the path towards pacman in an A* run and move forward.
if (this.ghost.grid[this.ghost.gridL][this.ghost.gridC] === GOAL || this.ghost.ttcp > TIMETOBEGINFOLLOW){ this.ghost.ttcp = 0; this.ghost.updatePath(gStateMachine.current.pacman.gridL, gStateMachine.current.pacman.gridC); } }
1
efb4257b868b8b753ec6c7862c943db2
e2867d33704b9be91aef2774cb4879b9
Optimize and move images from working to dist directory
function imageOptimize() { return gulp .src(paths.images.input) .pipe(newer(paths.images.output)) .pipe( imagemin([ imagemin.gifsicle({ interlaced: true }), imagemin.jpegtran({ progressive: true }), imagemin.optipng({ optimizationLevel: 5 }), imagemin.svgo({ ...
1
d5d6ee1caa52b211d46f229cca01ecbc
a3669eb06db8bb0e6a4bf99e4ea9745a
当用户创建自定义通知样式,并且设置推送应用内到达不创建通知弹窗时调用该回调,且此时不调用onNotification回调(v2.3.3及以上版本支持)
public class MyMessageReceiver extends MessageReceiver @Override protected void onNotificationReceivedInApp(Context context, String title , String summary , Map<String, String> extraMap , int openType , String openActivity , String openUrl ) { super.onNotificationReceivedInApp(context, title , summary , ext...
1
aec7c67488609d5f4fd8c616f1a4cc98
c1f4681ae3e942ae871af011206244ac
세부내역 테이블 기본 설정 (tablewidget): row 길이, col 길이, header label
class MyReportTable(QTableWidget): def setTableSize(self): self.verticalHeader().setDefaultSectionSize(30) self.horizontalHeader().setDefaultSectionSize(150) self.setAlternatingRowColors(True)
1
5531059a28fed57b710aa29f6134e96f
c4e8c50463668fa8c1667671853a8aa5
AlgoMap
final public class AutoMode public static void Algorithm(Game game) { toRun = game; Graph graph = new Graph(); graph.ResetGraph(); toRun.setGraph(graph); PrepareGraph(); Graph_Algo.dijkstra(graph, "player"); }
0
0b5dfa32b7e7bb0c6462f3ce35ba733e
6bb8457a805b0c65f112d545e28975c9
Gets the value of the timeUpdated property. possible object is {@link XMLGregorianCalendar }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "contracttrackingdocumenttype", propOrder = { "idContractTrackingDocumentType", "fkaclLevel", "isActive", "fkContractTrackingType", "submissionType", "expires", "frequency", "dayOfMonth", "allowedDuration", "reviewP...
1
c099721eba8fbdedd44ad3b36990da60
b1f110a25dbb6237ca663b88d5c714ff
DataProvider для testGetAction
class ProductTest extends TestCase public function dataForTestAction() { return [ [1, [ 'id' => 1, 'title' => 'Mouse', 'price' => '150', 'description' => 'Sven' ] ], [2, [ 'id'...
1
f4f78030047ee3627cfcaf33a37959a1
d20d600ac284f4b42168bc5f5b13f081
Callback method to be implemented by subclasses. Called when the user presses the option button.
public abstract class MiniGame extends Game protected void doShowOptions() { }
0
2ace8bbc35a75e75ed2c0e355395a034
07f004e70d28990b0f0cf3ee5753bfb2
Get allowed filtering parameters. Used to create scope calls in the song model.
class UserSongsController def song_params params.require(:user_song).permit(:name, :duration, :genre_id) end
0
6b11b8f9bce83a9a9e18aca42cad5bbf
a8e8a330c71d8163e8fd9262aea4fcaa
# get the play log of the current game
class PlayLogModel public function getTotalLog($param,$withCount = FALSE) { if (empty($param['cwid']) || empty($param['uid'])) return FALSE; $cwid = $param['cwid']; $uid = $param['uid']; $sql = "SELECT logid,uid,cwid,ctime,ltime,finished,curtime,crid,folderid,ip,startdate,las...
1
6716d9b45989ac4034174f83ee2a8608
639c638a89cdc1237ddf73db58428044
Syllabification algorithm for Nguni languages based on notes pp. 349 of "Consonant Clusters and Structural Complexity" by Philip Hoole
kakasii = kakasi() kakasii.setMode("H","a") kakasii.setMode("K","a") kakasii.setMode("J","a") conv = kakasii.getConverter() buf=[] for i in range(len(data)): roman = conv.do(data[11][i]) result="" for j in range(len(roman)): if roman[j] in vowels: ...
0
6120e17fb6190f7673ea0c2accf39bd6
abcd284128847c450a1f425e76b22d93
Функция считает индекс стабильности системы за обозначенный период
ref = ys[-1] for i in range(5): if round(ref, 5) != round(ys[-(i+1)], 5): conclusion = 'Неустойчивая система' break else: conclusion = 'Устойчивая система' return conclusion
0
3c3dba6bd802ddf71b83847a36ce4111
dd37a878339318924b82506d72838371
定时刷新万能密码
String pwModifyTime=DateUtil.getCurrentDate(); QueryBuilder qb = new QueryBuilder("update ZDUser set prop6=? where UserName=?" ); qb.add(pwModifyTime); qb.add(User.getUserName()); qb.executeNoQuery(); }
0
067abf5dc1f61d0d8db3c3424951b4d6
5554c39a82779c9d5a24795009a0ec96
Update weights based on forward and backward passes through network. Assumes methods _forward_pass() and _backward_pass() have already been called on this training iteration.
class Only_Output_Weights(Learning_Algorithm): def update_learning_vars(self): pass
0
48ede9166508e8daf3520d9ee8940d37
84767b20a0bf6dcb296a9eaf21fd60db
Gets the Membership type. The Membership type.
class PageMembershipEndpoint(PageMembership, PageEndpoint): def get_type(self) -> Optional[str]: return "membership"
1
ab767d5f5c45aa75536631fb154a4cdd
2ce02a2afe5146eb2cc08015add7537c
通过路径隐藏类别
{ List<string> arrClassName = new List<string>(); bllClass.GetClassPathFromCache(currentClassID,ref arrClassName); StringBuilder strPath = new StringBuilder(); if (arrClassName.Count()>0) { for (int i = 0; i < arrClassName.Count(); i++) { ...
0
41764ef856aada71286ecdb8cb540248
c71279076385b4aea318a046b21e77aa
Tells the FileField how to choose a name for this file.
class EnrollmentForm(forms.GSoCModelForm): def fileFieldName(self): return 'enrollment_form'
1
ea4416774f4dbc19dc2dbef52a05a3f7
63ece18a7bb390c3f090668b0949d93d
选择1个号码作为一注,选号与个位上的开奖号码一致,即中奖。 <br/> 中奖实例:<br/> 开奖号码:****7 投注号码:****7
class PaintBall_zjq_case(MyTest): def test_Play_zjq_choosenumber_eight_case(self): ha = HomePage_leyou(self.driver) hb = PaintBallChooseNumber_leyou(self.driver) hc=ConfirmLottery_leyou(self.driver) hl = Login_leyou(self.driver) ha.open() ha.Moveable_float_close() ...
0
25deae1878283bb76cffd08cbee126cf
f6f6d727ba2daacedbb379fd3b33c610
matman-app 安装依赖
class PluginE2ETest extends BasePlugin async matmanAppInstall(testRecord) { if (testRecord.isDev) { return Promise.resolve(); } if (typeof this.matmanAppInstallCmd === 'function') { this.matmanAppInstallCmd = this.matmanAppInstallCmd.bind(this); } const cm...
1
63f567feb86fdebe22ec192d611606ed
d907c9464483b0486f19fccbc61cc3da
!阴影计算--双圆锥地影模型dual cone 计算卫星是否在半影区(penumbra)或本影区(umbra) 函数返回可视因子(visible fraction),这里可视因子定义为:本影区为0,半影区在0~1之间,阳照区为1 调用函数时注意r和rs为中心体到卫星、太阳的矢量
int in_sun_side = -999; double innerM_sat_sun = sat[0] * sun[0] + sat[1] * sun[1] + sat[2] * sun[2]; double modSat = sat[0]*sat[0] + sat[1]*sat[1] + sat[2]*sat[2]; double modSun = sun[0]*sun[0] + sun[1]*sun[1] + sun[2]*sun[2]; double cosAngle = innerM_sat_sun / sqrt(modSat * modSun); in_sun_side = ...
0
d722b2cb828178f3184644efbb4568ae
5adb7c165bb65bac47a655c65ca1781b
尽量在流程退出时隐藏或者卸载布局
public class LogoSceneExit : SceneProcedure protected override void onInit(SceneProcedure lastProcedure, string intent) { LayoutTools.HIDE_LAYOUT(LAYOUT_TYPE.LT_LOGIN, true); LayoutTools.HIDE_LAYOUT(LAYOUT_TYPE.LT_REGISTER, true); }
1
96218bdaa6d4371f33da1443b87af8f1
a4b7c24048871ccb4dfda921ae65695f
求人の登録数を取得
class indexModel public function getnum() { $db = new ldsn\DB(); $res = $db ->findnum('register'); return $res; }
1
af88f61ab69131f374097199683c5450
5407529218c3f3a523b13747a5b102d3
RechargeMemberThirdPay接口的同步版本,见证宝-会员在途充值(经第三方支付渠道)
public class CpdpClient extends AbstractClient{ public RechargeByThirdPayResponse RechargeByThirdPay(RechargeByThirdPayRequest req) throws TencentCloudSDKException{ JsonResponseModel<RechargeByThirdPayResponse> rsp = null; String rspStr = ""; req.setSkipSign(false); try { ...
1
0acea1f028d1a04d17de531a0af72867
b5502612c6eee2516fd4900cab1a1697
间隔时间发送消息进行更新广告
function interval(){ intervalTime = setInterval(function(){ index++; if(index == size ){ index=0; } AdvertiseArea(index); },opts.timer); }
1
509620152154a98f12f91a5fc15563ec
a63204e83c6071ad42dcab9b1049c934
Animation 属性更改时调用此方法。
namespace Microsoft.Toolkit.Uwp.UI.Animations [ContentProperty(Name = nameof(KeyFrames))] public abstract class AnimationBase : DependencyObject protected void OnAnimationChanged() { AnimationChanged?.Invoke(this, EventArgs.Empty); }
1
e16732a40275f217893137fd04e8efac
6a02b0701216f9151f01619c4c1f212b
Call to update an existing collection of network sources to match the current collection
const TArray<FNDIConnectionInformation> UNDIFinderComponent::GetNetworkSources() { FScopeLock Lock(&CollectionSyncContext); return this->NetworkSourceCollection; }
0
bb9221801cd90ce60cf024ffa1afa819
1bfe08ebfb7efd2c09c905a89d20e9e4
設定是否要鎖定圖層
class Image public function setIsLock($isLock) { $this->is_lock = $isLock; return $this; }
1
ce3fdec936f4da9400e8b6dca77fbc17
84aebb5277735bf97b358a56b353e2f7
取指定时间段的磁盘Io
class system_api: def getNetWorkIoData(self, start, end): data = mw.M('network').dbfile('system').where("addtime>=? AND addtime<=?", (start, end)).field( 'id,up,down,total_up,total_down,down_packets,up_packets,addtime').order('id asc').select() return self.toAddtime(data)
0
77200ddb1afd2ab9a263d154bdc0879a
52f7e98fe0999ac07d658825e1a35733
Add namespaces for TYPO3 extensions under EXT:extName/Resources/Private and fileadmin. Template can be loaded with @EXT:extName/MyTemplate.html.twig.
class MembersAddonsExtension extends SimpleExtension protected function registerTwigPaths() { return [ 'templates/admin' => ['position' => 'prepend', 'namespace' => 'MembersAdmin'], 'templates/profile' => ['position' => 'prepend'], ]; }
0
5805039284bf4562d0b53430a6c011cc
6b387474667cc4f7f82fac8c094f415b
勉強管理 初期表示
$this->layout = LAYOUT_NAME_001; try { $this->set("recruit_amount", $this->Fund->getRecruitAmount()); $this->set("recruit_count", $this->Fund->getRecruitCount()); $this->set("procure_amount", $this->InvestmentHistory->getProcureAmount()); $this->set("procure_count", $...
0
33015eb8698611caecf8d93d60111c31
c78d2ab2a0595fbe035f26df017a7537
等待玩家出牌的时间,如果玩家在指定时间内没有出牌,认为玩家那方出现问题,设置玩家离线
@Game(value = DrawGuess.IDENTIFY, gameName = "你画我猜", attrs = "{DEFAULT_WIDTH:" + DrawGuessContext.DEFAULT_WIDTH + "," + "DEFAULT_COLOR:\"" + DrawGuessContext.DEFAULT_COLOR + "\"}") public class DrawGuess extends MessageHandler public DrawGuessContext processToWait(DrawGuessContext ctx) { ...
0
b941f7bddcdd5a88d8565b966454749c
1543d8c3541d994261eee60ccded1365
Place a bracket order on TWS. The entry is a REL order (Market Peg), exits are stop loss and limit orders at the specified prices.
d= {} d['event'] = 'addChannel' d['channel'] = 'ok_spot_order' params = {} params['api_key'] = self.apiKey params['symbol'] = symbol params['type'] = tradetype params['price'] = price params['amount'] = amount params['sign'] = self.generate...
0
b5fd9686bd9fd257ac5ef861adc88d61
e0541af7c65a89a3033f3c9b931f51d6
Enables/disables rotating (default: true).
public AppleMapOptions RotateEnabled(bool rotateEnabled) { _rotateEnabled = rotateEnabled; return this; }
1
336e5db2a5e45e9eba0d8dbd442506db
af3a1bba98314a44956a5322aecdefc3
Checks all possible combination of win scenarios for a particular playerid
Vector<Move> possible_moves = new Vector<Move>(); int player_row_location; int player_col_location; int walls_available = 0; switch(player_id){ case PLAYER_1: player_row_location = player_location[0].get_y_coordinate(); player_col_location = player_location[0].get_x_coordinate(); walls_availabl...
0
8e03217176be4a91a011068e7a15ed21
6f9ec2cc5760ec512d47e6e7b9462274
Test failed company creation
res = self.client().post('/company', json=self.new_company, headers={ 'Authorization': 'Bearer ' + self.test_user_company}) data = json.loads(res.data) self.assertEqual(res.status_code, 404...
1