query_id
string
corpus_id
string
query
string
code
string
label
int64
cb1af9df05a23b2506d0bb28dd2aa236
36b48452a5ccdaa3efd375d7f05cbebd
把传过来的google搜索的结果进行处理, 然后json结构返回到调用方, 返回的json结构中含有原始网页中的linker都被base64编码过了
class BeianSpider(BaseSpider): def parseJson(self, json_ret): results = json_ret['data'] for result in results: self.resList.append(result)
0
03ae09a925526b51ede931d49db2ea4d
bf50fa7dfdd554dd1dc66b2aaa396cd8
流程处理页面,异步返回节点的用户和组织josn串 Description:<BR> Last Modified:
String formRecdiectUrl = getRequestParams().getParameter(JbpmUtil.FORM_RECDIECT_URL_NAME); try { defineFlowService.toDoFlowSystem(getRequestParams()); if(!Validation.isEmpty(formRecdiectUrl)) { getRequest().getRequestDispatcher(formRecdiectUrl).forward(getRequest(),getResponse()); } else { respo...
0
d4283fc4759f313c41da20edd3f5ea76
03a3b721d241620379e7e15ee7777a8c
Choose the splitting position (use only AS positions; the ligand is chosen not to be a splitting position); Choose the AS residue position with the smallest fraction of pruned rotamers (from MinBounds and simple MinDEE)
def choose_sp(qber, f, R_range, n): def get_sigma_pi(qber, f, R): pi = (f*h_b(qber)-1+R)/(f*h_b(qber)-1) sigma = 1-(1-R)/f/h_b(qber) return max(0,sigma), max(0,pi) delta_min = 1 R_min = None for R in R_range: sigma_c, pi_c = get_sigma_pi(qber, f, R) delta_c = max(sigma_c,pi_c) if delta_c < delta_min: ...
0
e86331a060e6c3bcadcb00dd6b7a3e62
2abef0379df81eb7e66f740cdbacf793
结束任务(同步)
class Vs_Service_Sync_Mark extends Vs_Service_Sync_Abstract public function close() { $this->_process($this->conf->sync->close); }
1
1f6e08f15e79afda63c9ef0ae54acab9
243332346c9721599f8cf3d23be337c3
Test for is_data_homogeneous.
def is_homogeneous(examples): return len(set([e[1] for e in examples])) == 1
1
a60f83f3367d9225ffb948511de8f595
86cf8a917e7eaf5fb48399dc7f2f7852
For read only page, disable onclick.
public abstract class AbstractHtmlPageAction extends ActionSupport implements SessionAware, RequestAware public boolean isReadonly() { return false; }
0
bb6c7c1552257b42a68f15d2944b5817
037d43c22031c6db10700f442fc4c7e4
Passdown the key-up event to runtime view.
class QtViewer(QSplitter): def on_key_release(self, event): layer = self.viewer._top if layer is not None: layer.on_key_release(event)
1
62a341f8f82af08d26c11fb87cd2b5c2
21fe783c9e599791c8567e73cf830955
Set Pin 1.1 to input
void setInput_P2(void) { LPC_GPIO2->FIODIR &= 0x00; }
0
4d60a99faab024f9651175da421413f9
c3c6c28865361fb394c1d7056af61ea2
根据一个经纬度及距离角度,算出另外一个经纬度
Vector2d nextLngLat; double R = 6378.137 * 1000.0; double rad_lng = startLng / 180.0 * M_PI; double rad_lat = startLat / 180.0 * M_PI; double heading_rad = heading / 180.0 * M_PI; double lat = asin(sin(rad_lat) * cos(distance / R) + cos(rad_lat) * sin(distance / R) * cos(heading_rad)); doubl...
1
be7b508d4c0e8aac653ed336a48f8f87
3f05d8bc4c4304fbc5b3e427fdb9bd99
Close the current file and back up the stack.
void FileStack_Pop( void ) { TRC(printf("FileStack: Pop.\n")); if ( fs->curfile < 0 ) { Error_Bug( "Attempt to pop too many files"); } fclose( fs->files[fs->curfile].fd ); if ( --fs->curfile >= 0 ) Lexer_FileEnds ( fs->files[fs->curfile].lex_data ); return ; }
1
6c513c2116cd90e17e85f2b28cf6068b
0301b60d564fff8a138a2254a0023fed
Add a stop as a favourite.
public class FavoriteStopsDAO public void createFavoriteStop(String stopName, String stopID) { ContentValues values = new ContentValues(); values.put(SQLiteHelper.COLUMN_NAME, stopName); values.put(SQLiteHelper.COLUMN_ID, stopID); database.insert(SQLiteHelper.TABLE_FAVORITES, null, values); }
1
a660a4d0c0214d2f406e6183921f1f65
70ee7aa423be797d09bf0b78857e59fe
@brief Get file ID in the file list
class LoclistFiles public static function getID (DbMysql $db, $filename) { $filename = (string)$filename; $files = self::getFilesDB($db); if (substr($filename, -9, 9) === '.list.php') { $filename = substr_replace($filename, '', -9, 9); } $id = array_search($filenam...
1
6d01750db3b76a7971532bae081a0947
6621392917d607a12ac55819604c3bb4
Auslesen der StandardListentry Objekte, welche mit dieser Party ID verbunden sind.
namespace motesbokaren.DAL public class ParticipantDAL public DataSet GetPartsNotInListDAL(int listId) { try { DataSet DSParts = new DataSet(); SqlConnection conn = new SqlConnection(GetConnectionString()); SqlCommand cmd = new SqlComma...
0
0c0e655ae41f25ef31caee0c31e69ed3
372ac61ab60ef1c5e7b36d88cd7fd92f
Creates or updates a metadata item by key for a specified image Method:PUT URI:/v2/{tenant_id}/images/{image_id}/metadata/{key}
namespace OpenStack.Compute.v2_1.Serialization public class ComputeApi public virtual Task CreateImageMetadataAsync(string imageId, string key, string value, CancellationToken cancellationToken = default(CancellationToken)) { return BuildCreateImageMetadataRequest(imageId, key, value, cancellati...
1
cf16cdf1f7d9f71e328df1dc21006c2c
c92c9c722752adf1cb1cc00177e5efde
Determines what armor type is already owned and where we need it next.
local ownedItems = {} ownedItems["marineVariant"] = {} for i = 1, #kMarineVariant do local key = kMarineVariant[i] local itemId = kMarineVariantData[kMarineVariant[key]].itemId if itemId == nil or GetHasVariant( kMarineVariantData, i, nil ) then table.insert(ownedItems["m...
0
ef8d586313a5f0e15a7ddcc0e60e42d6
c3bd7a974cddf803d495e64dd8d60914
This function retrieves all purchases from this user. The $start_ts and $end_ts set a time period to get records from. Parameter $include_all_recurring is a flag to include recurring purchases which fall outside the time period. This is useful because in many cases we want to get all transactions during a time period, ...
namespace Business [OperationContract] List<Common.Purchase> GetAllUserPurchases(string username);
0
a8e26507e912e61007d3e15f15a6ef2e
e1a9de7b077238cb312bc8467b46cc42
添加一个在指定时间循环执行某个函数的定时器
Timestamp when, double interval) { Timer *timer = new Timer(std::move(cb), when, interval); loop_->runInLoop( std::bind(&TimerQueue::addTimerInLoop, this, timer)); return TimerId(timer, timer->sequence()); }
1
c9d12c44c467883546bc72edf91f0cdf
d0a7441383a9b2b26d08f8f3cc51d635
统计全站的货值之和
function countAllMoney(){ var allmoney=0; var datacell1 = $id("grdCityEnsureTbody"); var dataset1 = datacell1.dataset; for(var i=0; i<dataset1.getLength(); i++){ var mm = dataset1.get(i).getProperty("money"); if(checkFloat(mm)){ mm=mm.replace(',','');...
1
44af07d211cbf95a1eeb4c8b977d1e6b
e52ba145c36999d98fd2cd516d63cd6a
mapping of the transitions to a specific compound reference
class Transition: def reassembleFromUnifyKey(key, label): return Transition(key[0], key[1], label)
0
b627fba7f1f6f6494de1fd6de6fd1be2
94c0fd6263d588a792f1d92eb182a43e
Recupera todos os CPFs cadastrados
List<Cpf> findAll();
1
27c88cc4a87c1c8a318f7cea824772db
a525884ee66a2ea244ec11fb15adca4f
normalizeURI normalizes the given URI as per OAuth spec @param uri @return normalized URI. URI normalized to scheme://authority:port/path @throws OAuthException
class HttpRequestVerifier implements IOauthSignable function getNormalizedUrl (){ $uri = $this->getUrl(); $url = $uri->getScheme() . '://' . $uri->getUser() . (($uri->getPassword() != '') ? ':' : '') . $uri->getPassword() . (($uri->getUser() != '') ? '@' : '') . $uri...
1
42d5fdd7f545b8e5051564844f49c01c
19e9453e99ed99a41d8e31fbd31485a7
Get timestamp info about all parts of a study that have been viewed by various users.
class BaseStorage(object, metaclass=abc.ABCMeta): def get_study_user_attrs(self, study_id: int) -> Dict[str, Any]: raise NotImplementedError
0
6d6f0bbceda2e14f06c394a7326f342e
75c3d03f4d3d853eeff2adfd7be8289f
子视图消费完滚动事件后,将剩余未消费的滚动距离交由嵌套层父布局处理 Dispatch one step of a nested scrolling operation to the current nested scrolling parent. <p>This is a delegate method. Call it from your {@link NestedScrollingChild2} interface method with the same signature to implement the standard policy.
int dxUnconsumed, int dyUnconsumed, @Nullable int[] offsetInWindow) { return dispatchNestedScrollInternal(dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, offsetInWindow, TYPE_TOUCH, null); }
1
e07693b14e99de418220eb00e51791e9
772d35ebc6fdf51771efd3e737e10608
Configures whether or not the grid will autogenerate columns when the data source is set.
public class DataGridView extends ScrollView2d public boolean getAutoGenerateColumns() { return __GridImplementation.getAutoGenerateColumns(); }
0
b0ab7beec3b253941dad3da095247f0d
c1fa4ff8eb3be1d74534f4afe92a7f88
Constructor for the Data structure.
class Data(object): def __init__(self): self.rows = None self.names = [] self.q_size = [] self.bases_mapped = [] self.fraction_mapped = [] self.label = ''
1
c1411f89424b820188dda26edd34f3a5
e6cd5622508db6783cf0c4548e751146
GET: Nationalites/Create
namespace HRMS.WebUI.Controllers [Authorize] public class NationalityController : Controller public ActionResult Index() { return View(); }
0
e5c90967c3aadd3b059d95f362e65f71
2fa26edc7318d84651f5e0293a94f910
Adds an agent to a specific container
void Game::addAgent(Agent * a) { agents.push_back(a); }
1
8705d6d0ade14755f99fbb23da5cfca1
cdd178e8ba23eb7a3ad1facc6a58d201
function to draw a custom room object based on user-defined parameters
self.max_dim = max(width, height) self.width = width self.height = height self.mode = mode self.canvas_width = 500 self.canvas_height = 600 self.font = ImageFont.truetype("fonts/OpenSans-Bold.ttf", 16) self.textcolor = 'rgb(0,0,0)' self.textpositio...
1
7caae5de370d9d252ea6f84887fe495d
a1005f6a85eb13afd5610c4ff9a1553b
Signal wrapper to stop tests
function TestResult_stop() { this.mStop = 1; }
1
3664f971863d5549d309234cd834c820
548c570b83e5440c178083fc86de4de1
{EV_MULTI_COLUMN_LIST_ACTION_SEQUENCES_I}.column_title_click_actions
{ GTCX char *l_feature_name = "set_column_title"; RTEX; #define arg1 arg1x.it_r #define arg2 arg2x.it_i4 EIF_TYPED_VALUE up1x = {{0}, SK_POINTER}; #define up1 up1x.it_p EIF_TYPED_VALUE ur1x = {{0}, SK_REF}; #define ur1 ur1x.it_r EIF_TYPED_VALUE ui4_1x = {{0}, SK_INT32}; #define ui4_1 ui4_1x.it_i4 EIF_REFERENCE t...
0
cb0b403c96de2612aff2e7f6c8f72602
ecf5e7af9f2c72fc9ecb97013fcadab8
Max page getter
class ParamsBag public function getPage() { return ($this->page < 1 ? 1 : $this->page); }
0
cc485332953bdf2819ee05d15c9faccc
92df685416c891fc7f7eb7e7f17f94d0
用于将 OnRsp 接口中返回的类型的对应属性值中bytes 值转换为str ,其他类型原样返回 目前该函数仅供 struct_2_json 函数使用
if value is None: return None if typ8 == 'I': if not isinstance(value, int): return None return 'I:' + str(value) if typ8 == 'B': if not isinstance(value, int): return None return 'B:' + str(value) ...
1
d5a68211e97c370a9af5db24266d83ab
c4a8da83e816232e3b8583e24609816d
Format and display a not found message
echo 'This page is NOT found!<hr />'; echo 'Controller: ' . CONTROLLER_NAME; }
1
402ab592b941585e301829ab854b2305
2775c6dceca0f62e9bbfe3354e8c593e
Метод, вызываемый при нажатии на кнопку "Обновить курс" Обновляет курс текущей валюты, а также обновляет список валют
for (WebElement element : currency) { if (element.getText().equals(cur)) { element.click(); } } }
0
0052126a9b85b1eca5e46a45dae5febd
91219d691ec5178687eeb51c87c1e660
Try to get a GUID, if the path exists;
namespace Syncless.Profiling internal static class ProfilingGUIDHelper internal static string GetGUID(string driveid) { FileInfo fileInfo = new FileInfo(driveid + ":\\" + ProfilingLayer.RELATIVE_GUID_SAVE_PATH); if (fileInfo.Exists) { return ReadGUID(fileI...
1
c5e7beb4baa54b861ab5df8f0f5d638f
29e07d03e909c250cadec194c212388d
Handler for CLI command get_unix_time
{ zend_long ts; ZEND_PARSE_PARAMETERS_START(0, 1) Z_PARAM_OPTIONAL Z_PARAM_LONG(ts) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); TIMECOP_CALL_FUNCTION("getdate", 0); }
0
b10395c1852b6dfdb9242e8a80908552
4ffe327fe74176f6cb92fcad3c996d98
Gets the length and sequences present in the next maximal gapless alignment block.
boolean nextAlign(struct parser *pr) { struct splignAlign *rec = loadNextRec(pr); if (rec == NULL) return FALSE; AllocVar(pr->psl); growPslBlocks(pr, 8); pr->psl->qName = cloneString(rec->query); pr->psl->qSize = alignSeqSizesMustGetQuery(pr->ass, rec->query); pr->psl->tName = cloneString(rec->target); pr->psl->tSi...
1
c5a54e870927ae817af3af932713feaf
87e1668f5aa8c7a3d9adbf65739a46e2
先判断自己的好友是否满了
export class AddView extends ui.friend.AddFriendUI private addfriend(playerId: string): void { if(FriendModel.getInstance().getFriendList().length >= tb.TB_game_set.getMaxfriendNum()){ showToast(LanMgr.getLan('', 10322)); return; } if(FriendModel.getInstance().isMyFriend(playerId)){ showToast(LanMg...
1
33b68ad22973239d743928483f0e8e23
8a7d25cfdf39e67c64a9e48cb403992a
Displaying the cost attribute of a component.
export class ConfiguratorOverviewBundleAttributeComponent implements OnInit displayPrice(): boolean { return ( this.attributeOverview.valuePrice?.value !== undefined && this.attributeOverview.valuePrice?.value > 0 ); }
1
6e005bd704f08c8953574afc73b8b596
162d1d4629d59b8e28085471e933de2c
Configure Pyglet attributes.
import pygame as __pygame import const as __const import material as __material __pygame.display.set_caption(__const.CAPTION) icon, _, _, _ = __material.block.get("demon") __pygame.display.set_icon(icon) __pygame.mouse.set_visible(False) Screen.__base = __...
0
66e810aa3913bd254219b979a47ece6e
e0e2fdccc8f6bff9ee8fa8a7d4eb9feb
取得生產缺點資訊
namespace RCOutput_Route public partial class fMain : Form private List<Defect> CreateDefectList() { string SQL = @" SELECT B.DEFECT_CODE ,B.DEFECT_DESC FROM SAJET.SYS_RC_PROCESS_DEFECT A ,SAJET.SYS_DEFECT B WHERE A.PROCESS_ID = :PROCESS_ID AND A.DEFECT_ID = B.DEFECT_ID AND A.ENABLED =...
1
6e3994317f8630b8cc1a6b374935ab40
339add7b1f2fcf9845b882adc2912133
得到所有绑定的人员ID和对应的名字
namespace Aisino.MES.Service.EnrolmentManager List<OwernerAndID> GetOwernerAndID();
1
0559ccee83208be2dd8e47c5bd6846a3
d2cce799f4e3027a2af03912ecf24f25
Sets the server timezone.
if (!ClickHouseChecker.isNullOrEmpty(tz)) { options.put(ClickHouseClientOption.SERVER_TIME_ZONE.getKey(), tz); } else { options.remove(ClickHouseClientOption.SERVER_TIME_ZONE.getKey()); } return this; }
1
b5504a824a6b1f17a29f99db01f6bd7d
d31e80e235218cbde583a37c2588640b
指定该方法是前置通知,并指定切入点
@Aspect @Order(1) public class MyAspect implements Ordered @Before("pointCut() && args(name)") public void before(String name) { System.out.println(name); System.out.println("前置通知"); }
1
0dc9fb646e31daca5b1cc852525fd3be
41636482e05cee99304a4b9c21ade075
Get companyGroup
{ $em = $this->getDoctrine()->getManager(); $user = $this->getUser(); if ($user == null) { return $this->redirectToRoute('fos_user_security_login'); } else { $userId = $user->getId(); $username = $user->getUsername(); if ($this->contain...
1
c5ea887de58f4392a6365fba827c7f7e
7663fd47374cb454285ffb36f4baf526
查询数据库,获取学生选择导师情况
List<SelectResults> findMySelectTutors(SelectResults entity);
1
1a1320db41be2e430e8ebd0b6c643855
319ce1297cfe0f378731c4436e334f83
是否技能暴击
{ var crit = A.GetFightCrit(); var uncrit = B.GetFightUncrit(); bool ifCrit = false; #region 绝对暴击判定 var aCritFinal = A.GetFightCritAssoluta() - B.GetFightUncritAssoluta(); var critFinal = Math.Max(5000, crit / (crit + uncrit * A.GetFightCri...
1
00bbfc85835443af32d86053e6656472
9877fafed0abbcaa3684ec1824a5c6b7
Determine whether two objects represent the same entity/database row, regardless of whether they are the same instance.
{ return x.SourceEntityKey == y.SourceEntityKey && x.TargetActKey == y.TargetActKey && (x.RelationshipTypeKey == y.RelationshipTypeKey || x.RelationshipType?.Mnemonic == y.RelationshipType?.Mnemonic); }
1
46977a546603b2302d73093f4e1e0bdd
6e9b0d5c08f82fbfc03991af9e994752
Test proper escape of quotes.
def test_escape_single_quotes(): assert test_engine.escape_single_quotes("1,2,3,'a'") == "1,2,3,\\'a\\'"
1
92366682d47129522220fb266aaedb58
58beccca902a539347b99d39a0b400b7
文字種判別「半角文字(半角カナ含む)」。
public static class JapaneseCharacters public static bool IsHarfWidthKatakana(char @char) => ('\uFF61' <= @char && @char <= '\uFF9F');
0
0eb16efc28e7e4b38863df0121fc7d4d
eea91e28dd56e46c1be726d4c53b4f08
重启到bootloader <p>需要root权限</p>
public final class DeviceUtils public static void reboot2Recovery() { ShellUtils.execCmd("reboot recovery", true); }
0
2a22bde48b6841c0b6026ecaf83e7c11
37779ae717d2be162d7e9f61f0b4beed
JSON resolver plugin that loads the schema endpoint. Injected into Invenio-Records JSON resolver.
try: return self._json['doi_resolver'] except KeyError: return None except AttributeError: return None
0
4c02bbec996b991492a184779fd28f5f
f23d6e4db6ce8fff5369c55452584ad7
Gets the metadata for the domain.
sdb_multi sdb_multi_domain_metadata(struct SDB* sdb, const char* name) { SDB_COMMAND_PREPARE(8); SDB_COMMAND_PARAM_MULTI("DomainName", name); SDB_COMMAND_EXECUTE_MULTI("DomainMetadata"); }
1
d001e8e0dcdc0b9e51d373c924da1e4d
da75df9c0bfeb4fbbbf436fae38c0d61
Check if a number in binary contains all ones
for (int i = 63; i>=0; i--) { if (!(n&((unsigned long int) 1<<i))) { return 0; } } return 1; }
1
4b04fc0ab96cdde7be044290adf2d1ac
708e6a7f025b3a4283a1fc229f0933da
Return ctypes type for an encoded Objective-C type.
class Similarity (VitalObject): def c_type(cls, ctype=DFLT_CTYPE): return cls.C_TYPE[ctype._type_]
0
e4023ff36f8a072187141b1e387c904e
fed665a5b7236725f34ac920eaa3a2a3
Converts the object to amperes.
return new Quantity<double, YoctoElectronvolt>( Convert.ToDouble(val.Value) * ((6.241509E+18) * (1E-9)) ); }
0
4cb62b7fbf7b26afefcfc9efc88da6ea
e2a3ac4e96171701677fa69ecc23fc66
根据用户名或手机号来查询user
User findUserByPhoneOrUserName(String phone,String userName);
1
cdb9a89009f8ffb68d39e2f0247efc4f
7adf408d16ed5d66dc7c557aa7e78b7e
为顺序表动态开辟一块连续的存储空间
{ L->list = (ElemType *)malloc(size * sizeof(ElemType)); L->current_length = 0; L->store_length = size; return L; }
1
e817cf49108eb1d5ed38a0eb9e46b374
71a37fdf6c1f0a4f55605c69d1197bf9
通过Ajax修改管理员信息
class IndexController extends Controller public function editAdmin(){ if (IS_AJAX){ $result = D('Admin')->editSuperInfo($_POST); echo json_encode($result); } }
1
4244049c5f797200fdc00379c1b694c7
e4d2fcea6942a7f447e17d18e56ac4fa
Determine which idl files need to be compiled.
public class AndroidIdlHelper private static Collection<Artifact> getIdlSrcs(RuleContext ruleContext) { if (!ruleContext.getRule().isAttrDefined("idl_srcs", BuildType.LABEL_LIST)) { return ImmutableList.of(); } checkIdlSrcsSamePackage(ruleContext); return ruleContext .getPrerequisiteArtifa...
1
6106d0abd247528462be34c7e1a36545
b6903b4aed1ee83cd23f217d5b87d294
Capitalize the content of the input after text is entered
this.onInput(); if (!this.contenteditableHtml) { setTimeout(() => { if (this.elRef.nativeElement.innerHTML !== this.elRef.nativeElement.innerText) { this.elRef.nativeElement.innerHTML = this.elRef.nativeElement.innerText; } }); ...
0
ec0cff0a4fcab5903dc07d773858f9e4
b3efe779bce8b10e2878d80bdad09823
MIXTURE MODEL
super().__init__(name=name) self.nmix = max(1, nmix) self.nz = nz self.nlayers = nlayers self.joint = joint self.base = [ tf.keras.layers.Dense(nz * nmix, activation=tf.nn.relu) for _ in range(nlayers) ] self.mus_layer = tf.keras.layers.Dense(nz * nmix) if self.joint:...
1
411095bde54db39e25c63f7291936b59
4d5b98a07deadc8f59284d7af2f24289
Build archives of the AutoInstall'd sources.
self.log_path = '/tmp/archive/var/log' self.etc_path = '/tmp/archive/etc' self.misc_path = '/tmp/archive/misc' build_archive_cmd = "; ".join("mkdir -p {0}".format(path) for path in (self.log_path, se...
0
c722a7227517e6e17a2fd6fad54d2672
ee0b70bfcf8b70b16f77f633eb82bbb6
Inform the <code>JobStore</code> that the scheduler is now firing the given <code>Trigger</code> (executing its associated <code>Job</code>), that it had previously acquired (reserved).
public void pauseTrigger(long taskId);
0
3f36611205dd45e85af65908aab2742d
df6df5ec1fcbe57794ea90476864c700
parses address input
def capAddy(): global addy addy = (entry.get()) return
0
e2379050626602c6da26a57b23e8b4a9
61881e5be123e250cee568d91d47b82b
Samples the config for a distribution over a matrix.
class SampleMatrixScipy: def __new__(cls, dist, size, seed=None): return cls._sample_scipy(dist, size, seed)
1
51eeba6f2193d680c41202f0889e7a78
2a056f420a88670875c65f417d9a03ee
用途:检查输入字符串是否只由、字母、数字组成 输入: value:字符串 返回: 如果通过验证返回true,否则返回false
function isNumAndChar(strValue){ return /^[A-Za-z0-9]*$/.test(strValue); }
1
66231e4d674068b8a6d33bbfa9e97fbd
745a00b219d98f3589bb1c368c3bd865
Returns tag list for selected instance of EFS
listTagResourceInstances(listTagResourceInstancesRequest?: ListTagResourceInstancesRequest) { const options = { method: "POST", url: "/v3/{project_id}/{resource_type}/resource-instances/action", contentType: "application/json", queryParams: {},...
0
55b4f66db4a2993810c1049098c8dda7
934f61d713e3b16c94379137602d8888
Draw a square at the given coordinates
x = round_nearest(x, self.steps_x) y = round_nearest(y, self.steps_y) x = clamp(x, 0, self.width - self.steps_x) y = clamp(y, 0, self.height - self.steps_y) self.pen.shape("square") try: self.pen.color(color) except turtle.TurtleGraphicsError: return self.pen.resizemode("user") size = (1 / self....
1
965102bd5d8091d877c455ce5d2f234b
cac2c11b868ae28c35c16b982f5f5975
Calls {@link #findById(Serializable, boolean)} with <code>lock == false </code>.
public class JdbcDomainEntityManager<T extends DomainEntity<ID>, ID extends Serializable> implements DomainEntityManager<T, ID> @Override public T findAndLockById(Class<T> entityClass, Object id) { Validate.notNull(entityClass, "EntityClass must not be null"); Validate.notN...
0
45c4ceae5e3e6ce21bf55e96994a4cba
7a60bb14f2e4b6587b57b95598220a6e
Prepare the arguments for Prodrg to build the ligand
self.pdb_name = pdb_name self.protein_name = protein_name self.species = species self.hi_resolution = hi_resolution self.Rwork = Rwork self.Rfree = Rfree self.space_group = space_group self.sequence = sequence
0
94f69ac337a44a8c8920c48aa7557501
9ebe6078c6dd1af57015e0ca920a6ab2
Testa se a API retorna um erro quando a palavra-chave está vazia.
func TestInvalidAPIKey(t *testing.T) { _, err := NewClient(Config{}) assert.NotNil(t, err) assert.Equal(t, errEmptyAPIKey, err.Error()) }
1
6e98b6a6ee2249c75d4346fb42eac0c4
3acd464f9a8d6fd4522c055975d1ed1a
Hardcode a version so we can test for it
function getVersion() { return 1.0; }
1
976e7d672babe9a40bd69571d809d6b3
5bfd735e0f771016f527e6539ee2aa79
Load a model from a 3ds file.
function rl.LoadModel(fileName) end
0
eebdcd262c8adb90c831345e4aa46016
8b7b0251cae6c8b724892023242dcdd8
返回所有的饭店信息
{ $Restaurant = new Restaurant(); $rd = DB::collection($Restaurant->getTable())->get(); return response($rd); }
1
fcdbb15c76d250cb711e8ef54f70c09c
bb923ddaac7ba3689d55087a2a38e04c
bool: True if the attached mobile device supports accelerometer data.
int XsDeviceCapabilities_hasAccelerometer(const struct XsDeviceCapabilities* thisPtr) { return (thisPtr->m_flags & XDC_Acc) > 0; }
1
2f0ffc7b02670d4a5b34152a3f3daa20
e17f1e42ace11eab1e3e6ef1e8430874
生成包含数字和字母的八位激活码
{ List<char> chars = new List<char>(62); for (int i = 0; i < 10; i++) chars.Add((char)('0' + i)); for (int i = 0; i < 26; i++) chars.Add((char)('A' + i)); for (int i = 0; i < 26; i++) chars.Add((char)('a' + i)); ...
1
48cafbd98865c2be4387fb25c601d544
d19fd589be18d77114f592153d8ba092
Returnerar fullständigt namn på mottagare
class Recipient get fullName() { return this.middle != "" ? this.first + " " + this.middle + " " + this.last : this.first + " " + this.last; }
1
916c5dfc4f73639f39a7cced28c4dc93
22d4e754b308479dfa89d7f7e2c6e7ce
Initiate gprs_buffer with default values.
static void mdsp_init_gsm_buffers (void) { mdsp_rx_buffer[0] = mdsp_buffer_addrs[MDSP_RX_BUFFER_1_I]; mdsp_rx_buffer[1] = mdsp_buffer_addrs[MDSP_RX_BUFFER_2_I]; #ifdef FEATURE_GSM_MDSP_DTM mdsp_rx_buffer[2] = mdsp_buffer_addrs[MDSP_RX_BUFFER_3_I]; mdsp_rx_buffer[3] ...
0
dde9b1392e98f99ca976f95e05c3865f
184fa1affc4fac4fc451c84945b590f0
Функция выбора строки в таблице и нажатие на неё
namespace NET_and_MySQL public partial class Form10 : Form private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { dataGridView1.CurrentCell = dataGridView1[e.ColumnIndex, e.RowIndex]; dataGridView1.CurrentRow.Selected = true; GetSelec...
1
4ded7b4d5fd41538dc4a3e682ade7514
d104c6a8facb670ea4a87721c76e8a59
预定订单及时支付尾款提醒
@Service @Transactional public class OrderManager public void orderPayRemindJob() throws ServiceException { orderService.orderPayRemindJob(); }
1
d52908cdb8652e8bbc17f08b47392b64
3676767f1723ff2979417def8cadd359
Visit a parse tree produced by the {@code partitionOptionComment} labeled alternative in {@link SQLStatementParser#partitionOption}.
class mysqlParserListener(ParseTreeListener): # Enter a parse tree produced by mysqlParser#root. def exitPartitionOptionTablespace(self, ctx:mysqlParser.PartitionOptionTablespaceContext): pass
0
e2934353c51c29943a1e192cb5230d38
c325fcdba6794ee1682d5ef01bfdb349
Gets the type (such as Guid or int) of the Id property on a type that implements <see cref="IIdentifiable" />.
public abstract class Identifiable<TId> : IIdentifiable<TId> protected virtual TId GetTypedId(string? value) { return value == null ? default! : (TId)RuntimeTypeConverter.ConvertType(value, typeof(TId))!; }
0
549be5cb6cb472b5fc15ffff2bdce6ed
88c855f56a97df6c5439e0c86a854eda
https://codereview.stackexchange.com/a/259470/230104
def progress(iterable, prefix='', suffix='', decimals=1, length=50, fill='█', printEnd='\r'): total = len(iterable) def print_progress(iteration): percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total))) filled = int(length * iteration // total) bar = fill * fil...
1
990419023de47bdcb341f55d7a59053e
763f54f01cf2be10595d63b4844d0611
GET api/Patient
namespace EyeDoctor.Patient.API public class PatientController : ApiController public IEnumerable<PatientModel> Get() { return _patientRepository.GetAll().Select(x => new PatientModel() { FirstName = x.FirstName, LastName =...
1
6b0db6775514ddcde0844b16ee58eb20
3f6e61fca5d0d68a413ca20353d69949
Should escape single quotes with backslash for proper sql insertion
public partial class DefaultScripts public string escapeSingleQuotes(string text) => text?.Replace("'", "\\'");
1
dd2962c5b65e7ca8f9052cc038d8b127
1c15a0843cb52cfd777a38e2573782c0
This method is called when it is time to save the designer values to the underlying buffer.
namespace Sphere.Core.Editor [ToolboxItem(false)] public class EditorObject : UserControl public virtual void SaveLayout() { }
1
9cd44d7d271e8f80bef1d816e70a90cf
2a5f6081838b1c250d7215248965c835
pintos를 종료시키는 시스템 콜
void endGPIO(){ pigpio_stop(pi); }
0
74611a022fdbcc0ef4058df944b504b1
41d4ca42b79775f48dba95b563c209b6
add days to date; use negative integers to subtract
public class CWK2Q8 public static Date addDays(int days, Calendar new_cal) { new_cal.add(Calendar.DATE, days); return new_cal.getTime(); }
1
93509fc504e00e09a637f65dc027046e
b503f13f1bd91865a1911a2943181783
Reads up to <code>len</code> decoded bytes of data from this input stream into an array of bytes. This method blocks until some input is available.
public int read(byte[] b, int off, int len) throws IOException { synchronized (readMonitor) { FileDescriptor myFd = fd; if (myFd == null) throw new IOException("socket closed"); if (off < 0 || len < 0 || (off + len) > b.length ) { t...
1
1c564fa4334972d770807dbf6fc4aa2e
4def3cb0bb961b9e1f363f9264c8c1d6
权限拦截器,该拦截器必须结合@Authority注解使用
public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes) throws AccessDeniedException, InsufficientAuthenticationException { if (((FilterInvocation) object).getRequestUrl().equals("/login")) return; if (authentication instanceof AnonymousAuthenti...
0
322d25495e4e94785edc7bc0fb2f7566
2152b892946c977234e53e8c3fca9c55
Set user theme before inflate
public class MultiTheme public static void assembleThemeBeforeInflate(AppCompatActivity activity) { checkInstance(); sThemeManager.assembleThemeBeforeInflate(activity); }
1
8e14b1b97b625f0a574b0809d2ea8b88
cf5d3441d288fec342d05fbcb683f466
Gets the value of the b333 property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the b333 property. <p> For example, to add a new ite...
@Generated(value = "com.ctriposs.dolphin.generator.DolphinDataTemplateGenerator", comments = "CTripOSS Data Template. Generated from D:\\DEV\\git\\rest4j\\generator-test\\src\\test\\dolphin\\com\\ctriposs\\dolphin\\generator\\test\\IncludeMultiple.xml.", date = "Wed Jul 16 12:56:19 CST 2014") public class IncludeMultip...
0
e163fae73c8b525d504ebd844203ba52
ff672a93855786bd43c86c862f9839b8
Valida qual operação será executada no banco de dados
public class HibernateOperation public int getOperacao() { return this.operation; }
0
a1d98894fa08ffd6bb42738f0ea477a3
84fdb3e6ae4f66d4689b4bd666d774bc
Called when the display name of a contact changes.
void onNameChanged();
1
b5a5ac3b9a2691912d0a017b3c8fde11
b9fe4b53fb751d7d1f6a0ad5ba34e3e9
Unpack the MyCommand object, and get some attribute that is useful from it
namespace Naovigate.Event.GoalToNao public sealed class PickupEvent : ReportBackEvent private void Unpack() { }
0
3a0746644e7f6501c81eddc9f56a3cad
7374255ff9bca4945fbe423c9307d238
This string length function uses pointers to find the string length
char* tmp = pc_str; while('\0' != (*tmp)){ ++tmp; } return (tmp - pc_str); }
1
a176ebef75baf638c97333939e34f301
480409d0c17e1ea58b81afc19f4d4924
Returns the character at the given position from the matched text. <p>It is equivalent to {@code yytext().charAt(pos)}, but faster.
CharacterExpression charAt(int pos);
1
1f3fd7e2ddf2d40e8166dddd1218d8c7
609228c098d36cf9af03df1dd01ea70d
获得旋转后的形状
export class Shape rotate() { let currentArr = {}; switch (this.type) { case 'T' : currentArr = Shape.Repository.T; break; case 'L' : currentArr = Shape.Repository.L; break; case 'Z' : currentArr = Shape.Repository.Z; break; case 'S' : currentArr = Shape.Repository.S; break; case '...
1
813e4a42660c07c442131e298cbf2d21
f1eaf7311a57f6b6d57f81de772771ec
Selects object data by parent uid
{ $qb = $this->createQueryBuilder('u') ->select('u') ->where('u.parant = :parant_id') ->setParameter('parant_id', $parent_id) ->getQuery(); $data = $qb->getArrayResult(); return $data; }
1