query_id
string
corpus_id
string
query
string
code
string
label
int64
b2a8990ebfece2e6b8eb9c8d42de4ab2
35bb7e3c20e7d3263f85d068cd3437fd
accountPathsToVerificationRegexes turns account paths in to regexes to allow verification.
s.Step(`^a signing account with address "([^"]*)" and mnemonic "([^"]*)"$`, aSigningAccountWithAddressAndMnemonic) s.Step(`^sign the transaction$`, signTheTransaction) s.Step(`^the base64 encoded signed transaction should equal "([^"]*)"$`, theBase64EncodedSignedTransactionShouldEqual) s.Step(`^the decoded transact...
0
3ad3d2bda379b224f87b5f025eb65de1
ee25067c50656256215a8221bb886fe1
获取全站搜索 消息队列 开启/关闭 状态 日志备注
class RabbitmqService public function rabbitmqQueueMonitor() { $httpInterface = MQParam::$mqHttpApi; $username = MQParam::$config['login']; $password = MQParam::$config['password']; printAndLog("请求接口:" . $httpInterface['queues']); $consumerList = json_decode(https_reque...
0
a917aa479c9b8de1d4789eecff33ec94
0b6de475b7aa8f4e2452427d2302962d
strip anything other then alphanumerics
def strip_non_alphanumerics(s): return ''.join(c for c in s if c.isalnum())
1
f3d3d5e3bc1e00d3c7ab7bc0f024fc48
cf1684253934124920fee2c97bd4a78b
通过配置ID获取导师行业基础薪资信息
public function getTeacherSalaryInfo($teacher_id);
0
e10a02bf70587f10398c16e469b6459f
7c8273bcd2b5e392e1d5a541791535e4
disconnect all clients from server, and close server if opened
{ foreach (KeyValuePair<Socket, ConnectedClient> P in Clients) { P.Key.Disconnect(false); P.Key.Close(); } ServerSocket.Close(); }
1
b671dcb80a8014540d30da29cbced6b8
a88585d132e1d232562cd95e9b738cef
Removes the height of the tab body wrapper.
namespace qx.ui.tabview [JsType(JsMode.Prototype, Name = "qx.ui.tabview.TabView", OmitOptionalParameters = true, Export = false)] public partial class TabView : qx.ui.core.Widget, qx.ui.core.ISingleSelection [JsMethod(Name = "resetContentPaddingBottom")] public void ResetContentPaddingBottom() { throw new NotImp...
0
13721e5ac4d16e779c08110fea43c793
8ab2f2affbb1f735e8592625918f2593
Exports a staircase to IfcStair.
const UINT wStartX, const UINT wStartY, const UINT wEndX, const UINT wEndY, const UINT wStairType, SDL_Surface& destSurface) { ASSERT(bIsStairs(wStairType)); const UINT wBaseY = wStairType == T_STAIRS ? wEndY : wStartY; const UINT wEntranceY = wStairType == T_STAIRS ? wStartY : wEndY; UINT wX, wY, wObjectN...
0
b57e662591024c286befaba343c7e3ee
5f21002bef1e69a39498afa7a98c4d98
The Address Full Endpoint returns all information available about a particular address, including an array of complete transactions instead of just transaction inputs and outputs. Unfortunately, because of the amount of data returned, it is the slowest of the address endpoints, but it returns the most detailed data rec...
namespace AtomicCore.BlockChain.BlockCypherAPI public class BlockCypherSrvAPI : IBlockCypherAPI public AddressEndpointResponse AddressFullEndpoint(BlockCypherNetwork network, string addressFull, BlockCypherCacheMode cacheMode = BlockCypherCacheMode.AbsoluteExpired, int cacheSeconds = 10) { if (c...
1
c5cd580d993708f4a277c1cef62aff07
f05b42bd758d5c46c3d517e0a8b48dc6
检查应用设置
var wgtVer = null; plus.runtime.getProperty(plus.runtime.appid, function(inf) { wgtVer = inf.version; console.log("当前应用版本:" + wgtVer); }); var checkUrl = ApiUrl + "/index.php?act=zx_setting&op=getversion"; $.getJSON(checkUrl, function(ret) { if(ret.code == 200) { var newApkVer = ret.datas.mobile_...
1
f2e18e81d1ea8badabfff41940b7ca31
334c8f9c356cd33b51ef1e354b67f06a
Gibt den Prozentwert der Zeit, die schon vergangen ist, an
{ if(!running) return -1; long time_gone_by; if (!running[speicher]) { time_gone_by = (long) (zeit[speicher] / TGetTicksPerSecond()); } else { time_gone_by = (long) ((TGetTime() - zeit[speicher]) / TGetTicksPerSecond()); } return time_gone_...
0
23d7d39d4f7fea3c592f655d62503745
3e90d03a728ecf77ed657b463e420daa
Suprapune coada sursa peste destinatie
{ int bi; int ei; for(unsigned int i=0;i<route.size();i++) { if(route[i].first->getName()==src) bi=i; if(route[i].first->getName()==dest) ei=i; } for(int j=bi;j<=ei;j++){ if(route[j].second<available_seats) return false; } return true; }
0
54564a3b94b74a78409aa429bf4dbf94
5b5a9dd2604d48b11c8afab75cfad2ef
Metoda nahraje na web přílohu článku.
{ try { $this->articleManager->saveArticle($values); $this->flashMessage('Článok bol úspešne uložený.'); $this->redirect(':Core:Article:', $values->url); } catch (UniqueConstraintViolationException $ex) { $this->flashMessage('Článok s touto URL...
0
83a3748d2796e7e4425b69566d01527a
0c0c669b0fbb3f8ffcef7240f190f2ee
监听第一帧数据的到来
{ char ckey; fd_set s_rd; struct timeval delay = {0L, delayInms*1000L}; int fd = d2cSock; FD_ZERO(&s_rd); FD_SET(fd, &s_rd); int n = select(fd+1, &s_rd, NULL, NULL, &delay); if(n < 0){ std::cerr << "error in select" << std::endl; return -...
1
548b58a681c828e55720049957b8b124
7f51e37142fef3d9be8952f9386c2856
Add gossip transaction to mempool if it not exist
if tx.status == 'YES': pass elif tx.status == 'NO': pass else: if tx not in self.mempool: self.last = self.last + 1 tx.status = "Open" self.mempool.append(tx)
1
1bd462f784f1a480027b13f11c710d65
4a25ac800344a52b62ad4a8725f76110
判断两指是否捏合
{ Vector3 indexFingerV3=new Vector3(); Vector3 thumbFingerV3 = new Vector3(); foreach (var f in h.Fingers) { if (f.Type() == Finger.FingerType.TYPE_INDEX) { indexFingerV3 = f.TipPosition.ToUnityScaled(false); } else if (...
1
dcb04a24994ab7459bdc4a3b900b44c4
92203a4c71c2d4bdd697ffff13b1e6a5
Returns Thread Pool Manager.
public class ConfigurationContext extends AbstractContext public ThreadFactory getThreadPool() { if (threadPool == null) { threadPool = new ThreadPool(); } return threadPool; }
1
5c6494643493a07224191e2f046c0bcd
012520f6d07cfd0c4842a3144bb77304
<p> Tests whether the activation of the next activity instance by activity instance oid works correctly. </p>
public class ActivityInstanceWorkflowTest @Test(expected = AccessForbiddenException.class) public void testCompleteFailActivityInstanceTerminated() { startProcess(PD_1_ID); final ActivityInstance ai = findFirstAliveActivityInstanceFor(PD_1_ID); userSf.getWorkflowService().activateAndComplete(ai....
0
5c472f3153ceb8d4c8652abe2ab14bdc
3b346d74329d35915ab405eafd0bdf67
List all roles assignments matching the given filter criteria.
self, user_role_assignment_filter_model: UserRoleAssignmentFilterModel ) -> Page[UserRoleAssignmentResponseModel]: return self._list_paginated_resources( route=USER_ROLE_ASSIGNMENTS, response_model=UserRoleAssignmentResponseModel, filter_model=user_role_assignment...
1
2debdfa3c70237cc31b15058254a85b8
6ea7c0372d7857c8411a8aba4e89d2a4
Commits changes to the local repository, prompting for a commit message if necessary Usage: fab commit Note that in most situations, calling fab push will suffice
with settings(warn_only=True): local('git status') prompt('Press <Enter> to continue or <Ctrl+C> to cancel.') local('git add .') local('git commit')
0
fdedacee4de94878636bd13831487d68
1ab227f2fbfa4de42206d2413fcb05e9
클럽 수정 페이지 이동.
public String circleModifyForm(int cNum, Model model) { model.addAttribute("circleView", cService.circleView(cNum)); return "circle/CircleModifyForm"; }
1
1c1b1701d017fd1bb68b9e2354eec712
12cc52b4773bcf199d40c7768e803e9c
Returns *True* when the "uncertainties" package is available on your system and *x* is a ``ufloat``.
class Duration: def defines_uncertainty(self): return
0
fb9c7fb6d500eed02794ed11eeea1306
bf15c9e50c188e4767b9ad4fc8431511
Возвращает количество израсходованного топлива за все время
public class Car public int getGasAmount() { return gasRefuel - ((fuelConsumption * drivingDistance) / 100); }
0
2a5ea3d9fdcfe0ce30c50ce01c9c3d81
a2fe8f7477d3bc32f785a8b2da090213
Runs the refiner.
throws LockedException { if (mRunning) { throw new LockedException(); } mRefineResult = refineResult; }
0
754890662de6084e96182cc4c6eb8031
4c4dbfe0b0ef021b0c26b9862c91b28b
если некорректные значения - использовать сортировку по-умолчанию
public class CalaAllSort implements MySort<CalaBro> @Override public List<CalaBro> sort(List<CalaBro> list, int mode) { List<CalaBro> newList = new ArrayList(); newList.addAll(list); if(mode == -1) Collections.sort(newList, (CalaBro cb1, CalaBro cb2) -> cb2.compareTo(cb1)); ...
0
5ca0b8579199422d80ec92848425fab9
fba88da68cb56faacb4bdec95676e5a4
Defines a mod object with the webpage link to retrieve data.
{ NMMod mod = new NMMod(url); mod.RequestInformation(); Mods[mod.ID] = mod; return mod; }
1
0e70b1ecde9ea4ce4e67614495701b95
f51740f597f279305ea60eaa2d918e5b
CARREGA TODOS OS CAMINHÕES
func main() { routes.CarregarRotas() http.ListenAndServe(":8000", nil) }
0
7f1ff42a470881b5dddb2d541bb56c27
978dea48a37fcc4308b11c06420660db
将图片切为九宫格的函数
def split_to_six(image): width = image.size[0] height = image.size[1] top_left_crop_image = (0, 0, width / 3, height/2) print(top_left_crop_image) top_left_image = image.crop(top_left_crop_image) top_left_image.save("cut4.jpg", quality=100) top_left_image.show() top_middle_crop_image = (...
1
ec3acafd72fa1dc4b75d60911a8960b1
d3d3a90787a64e9f6f941e26ae07c64f
#Fonction qui change les résultats en différence.
resultat <- vector(mode = "numeric", length = nrow(i.data)) resultat[recommendations_k[,1]] <- recommendations_k[,2] return(resultat) }
0
0504a48930ced0c6a7982995087b145f
66e22dcd645e7814b80b8121755dad12
Create 'users' table if not exists
async function up () { sequelize.query(` CREATE TABLE "apiAiUsers" ( "id" SERIAL UNIQUE PRIMARY KEY NOT NULL, "firstName" VARCHAR(30) NOT NULL, "lastName" VARCHAR(30) NOT NULL, "email" VARCHAR(100) UNIQUE NOT NULL, "accessToken" TEXT UNIQUE NOT NUL...
0
d4652e7e5da8265576ac99efb24850d8
ee6c7c6d43c0314ee8ffb3691c338318
Shuffle rows of dataframe
class DataFrameAnalyzer(DataElement): def shuffle_filtered_df(self): self.sort_by_col = NO_SORTING_ENTRY self.filtered_df = self.filtered_df.sample(frac=1)
1
9b7ec1303f5169e0e7ab591188a164f0
1da406b3aab2dc31acbc2c8fa000c560
First we stop the animation request made earlier then start another one
void startAnimation() { if ( ! animating ) { animating = 1; glutTimerFunc(30, timerFunction, 1); } }
0
48f6aa78e713c2872b12c1c4ceecf155
34715a25a8da9d3979585a9f4917aead
Returns the last date of the array (in chronological order).
{ if (!$this->getArrayDate()) { $this->save(); } $array = $this->getArrayDate(); $value = array_pop($array); return $value->date; }
1
d53500527349d26a4d7e019791ebe38e
38bcbe4afb038742473a7ba1e87efa24
处理掉语句中间多余的空格
r = re.sub(r"(?<=[(+~])\s*|\s*(?=[)+])", "", r) r = re.sub(r"\s+", " ", r) return r
1
35ce06af453b642a2d7efa260f081133
83c60a7d20e325aaa35755aa63ff285a
订单待提交列表
public List getPendingOrderList();
1
6fd8c0c7571d69949c09f612b204c82e
acfd9b134bbf2b2073ed775f9fb9dc3b
Called every time client disconnects from the application.
class DemoApplication extends Application public function onDisconnect(Connection $client): void { $id = $client->getClientId(); unset($this->clients[$id]); }
1
e178e6cd97c07964d25533cddfb2ee11
c29f4d3337b515b69a68eed043651967
指示器和跟踪器一起滚动
public class IndicatorGroupView extends FrameLayout public void scrollBottomTrackView(int position, float positionOffset) { int currentLeftMargin = mParams.leftMargin + mInitLeftMargin; int finalLeftMargin = ( int ) (position + positionOffset) * mItemWidth; int distance = finalLeftMargin - curre...
1
1bb152b93cf97bdc631f51dd58c59140
94ebee2d9b44ef2d0bc3315de3bd9841
Returns the portal informations managed by this WebspaceManger.
public class Board public List<Portal> getPortals() { List<Portal> portals = new ArrayList<Portal>(); for (Portal portal : listOfPortals) { portals.add(portal); } checkRep(); return portals; }
0
5285aa030c8cd62fe658750cac0a8e78
009837ec850879637b814349390fd9f2
The time period during which a failed scheduled task is retried.
@XmlRootElement @XmlType(propOrder = {"location", "startTime", "stopTime", "retries", "retryInterval"}) public class GetDiagnosticsRequest extends RequestWithId public Integer getRetryInterval() { return retryInterval; }
1
12bf7b0f30921d342040a4ffe1be6cbf
132ac5b2c4945678915c013526a6ed6c
Trivial json-decode of input; provided as an override hook for customization. Processes both 'layers' and 'overview' values from client.
result = {} if 'scrape_only' in req: result['layerEntries'] = [{'index': index} for index in req['scrape_only']] elif 'recursive' in req: query_service = requests.get(req['service_url'] + "?f=pjson", proxies=flask.g.proxies) service_json = query_service.json() result['service...
0
20233c85511e67cc675f9fc8e6a6c89c
4cc8f7e711bba032ba73fcd79fa972eb
Sets the ma xa of this yeu cau giai trinh.
public class Composition public void setPmajeur(long pmajeur) { this.pmajeur = pmajeur; }
0
22865f8902a0b61d45f8bc127a0cd518
500f7053c52d9b643e07da43c1fd1141
Selects the median of the first, middle and last elements of the slice.
int median_3(std::vector<int> & data, int left, int right) { std::vector<std::pair<int, int>> arr = {std::pair<int, int>(left, data[left]), std::pair<int, int>((right + left - 1) / 2, data[(right + left - 1) / 2]), std::pair<int...
1
7ac270f8706498b59f2e94ba0334674a
5bb8699c8ad2fc367cae1ec64f8c460d
Remove first line
class MsvcCompilerPrinter(CompilePrinter): def print(self, stdout='', stderr='', exit_code=0): stdout = stdout.split('\n') if len(stdout) >= 1: stdout = stdout[1:] stdout = '\n'.join(stdout) super().print(stdout=stdout, stderr=stderr, exit_code=exit_code...
1
d717be1e7de4a88db03e90f2cce773fa
ba6f66fc9daea480551618fd4c520e47
\brief Get CTL element numeric identifier for an entry of a CTL element identifiers list
tag = nds['tag'].upper() if (tag == 'XSD:ELEMENT'): ctl = 53 elif (tag == 'XSD:COMPLEXTYPE'): ctl = 58 elif (tag == 'XSD:SEQUENCE'): ctl = 60 elif (tag == 'XSD:CHOICE'): ctl = 62 else: ctl = 53 return(ctl)
1
40099e6522da7dcf4621450d37dd75b9
50a95ad5bec8444baef03993fd45c83a
S458 Create a new or update an existing EosCustomsExportShipment
{ if (shipments == null) throw new ApiException(400, "Missing required parameter 'shipments' when calling ShipmentsApi->ShipmentsCreateShipments"); var localVarPath = "/v1/shipments/type=multiple"; var localVarPathParams = new Dictionary<String, String>(); ...
0
026ceffea4e3da52a84739ef49f9ea74
d3d9d18c34b185d8b1b651d8c5469ec8
Add the potential of MM particles to SCF (HF and DFT) object and then generate the corresponding QM/MM gradients method for the QM system.
class Embedding: def get_mm_forces(self): f = self.pcpot.get_forces(self.qmatoms.calc) return self.mmatoms.calc.redistribute_forces(f)
0
647d34039514d3b7cf7e14e738d8da7a
a84621c3f1a2bd4e4305efb3c3191660
修改相册中图片名称
@Slf4j @Controller @RequestMapping("/portal/services/guideCenter") public class GuideCenterController extends AbstractPortalController @RequestMapping(value = "/renameAlbum", method = RequestMethod.POST) @ResponseBody public JsonResult renameAlbum(String albumId, String albumName, HttpServletRequest request, ...
0
e289f046e6d5bf61d7471aed0a16f559
346fda4415f6fdd81c75ef567f7f5251
Validate all GPX/KML/KMZ documents against the declared namespace
validation_ns = doc.documentElement.namespaceURI if hasattr(doc, "as_native_node"): _schema = Document_schema(doc.as_native_node(), validation_ns) else: _schema = Document_schemaFromString(doc.toString(), validation_ns) try: self.error_handler.reset() ...
1
d74a3fd82985f4d873ac28caee29f185
365338e4c2a2845386aa7502f45929bc
获取当天故障信息总行数
long result = 0; Record resultRecord = Db.findFirst("SELECT count(*) as errtimes FROM tbds_event_error WHERE event_date = curdate()"); if(resultRecord != null) { result = resultRecord.getLong("errtimes"); } return result; }
1
3401c95dd76abd38dd87ae8ad26b28c7
d7156171bbae8ef5299457a9b02880e5
Scrolls the content panel so that selected objects are visible.
{ if (contentComp != 0) { const int newVX = -contentComp->getX(); const int newVY = -contentComp->getY(); if (newVX == 0 && newVY == 0 && contentComp->getWidth() <= getWidth() && contentComp->getHeight() <= getHeight()) { horizontalScrollBar->s...
0
21c9a005a5a5192e3e133f90cae826c6
77fd48752ad19a875fb45d69bdc54f86
Метод ,який повертає введені користувачем дані,які є вихідними для здійснення пошуку.
namespace VideoLibrary public partial class SelectionDetailedView : Form private List<string> gatherSearchData() { List<string> req = new List<string>(); openSel.Tag = ""; if (isAvaliable.Checked) { openSel.Tag += "Наявність: Так; "; ...
1
76646da54938ff0b0c11899fd00afa0c
557c2e0c4990f763e03c3a3098979427
Tap/hold for resources are hardcoded to more-info for now (maybe configurable in the future)
namespace KolonyTools [KSPModule("USI Warehouse")] public class USI_ModuleResourceWarehouse : PartModule public override string GetInfo() { return "Stores shareable resources"; }
0
75f180e2971532964448b64181fa365c
4b003f1ee7a2e51d098a883db05e7f91
Not any excluded states for shiftActivity attribute in read access.
class ShifttransactionsController def shifttransaction_params params.require(:shifttransaction).permit(:shift_start_time, :shift_end_time, :actual_working_hours, :shift_no, :isactive, :deleted_at, :shift_start_time_dummy, :shift_end_time_dummy, :actual_working_hours_dummy, :actual_working_without_break, :shif...
0
7f7d013da7c83710a9e5d5ac3716b9d2
26ed2a965e0dccdd67e6434fa31e0090
Function to remove any non numeric characters from a string
new_str = '' for char in value: if can_be_numeric(char): new_str += char return new_str
1
e584b4f3e4c822223884a59fbbe68b5e
f28fdd2f330b32bba1d3ca53a2005b4e
Handle the Status Stage of a control write transfer \globalvars COM_transferState - set to TRANS_STATE_IDLE. COM_USBFS_ep0Mode - set to MODE_STALL_IN_OUT. \reentrant No.
{ shortPacketStatus = SHORT_PKT_NOT_USED; USBDeferStatusStagePacket = false; USBDeferINDataStagePackets = false; USBDeferOUTDataStagePackets = false; BothEP0OutUOWNsSet = false; controlTransferState = WAIT_SETUP; pBDTEntryIn[0]->STAT.Val &= ~(_USIE); pBDTEntryIn[0] = (volatile BDT_EN...
0
0b9829af9b4e71b6904588f193c3c493
ba4e934306fc440e4fcd18367cad28ef
Crtamo glavni deo glave.
class SE_PageStatic extends SE_PageMaster public function RenderContent(){ ?><!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8" /> <title><?php echo $this->PageData['title']; ?></title> <meta name="description" content="Ne každá voda se k vínu hodí." /> <meta name="author" content="Vina...
1
b57b5dd72fcdab0ea0c2b9569e36bced
aa19d6c123676c06c4199efd0e070353
Sets a delegate to control whether or not our built-in camera controls should respond to input. It is called once a frame for mouse interfaces, and once for every active touch when using touch controls. The pointer id associated with the input event is passed as a parameter. If a delegate is supplied here, it will ta...
namespace Wrld.MapCamera public class CameraApi public void SetShouldConsumeInputDelegate(Func<int, bool> function) { m_inputHandler.SetShouldConsumeInputDelegate(function); }
1
cae8afb1aecff03124ae32bb4eee97f0
629b858abd894df5db38195fe97fe751
Spawn snake of size 2. Head spawns on (px, py).
class ElementOfSnakesBody(ObjectOnField): def __init__(self, pos_x, pos_y): super().__init__(pos_x, pos_y, 'x')
0
4a0cc061fbfb5c6d8f185f22611176b1
4108d12e71a21fb81a02eb3572e8503e
Get a SakaiPerson image URL for a user. Checks UserMutableType record first, then goes for SystemMutableType if none. <p> Returns null if nothing found.
@Deprecated Link getUserAvatar(CMSServiceCtx cmsCtx, String username) throws CMSException;
0
f8c1f7c3662d57335754fb5c0a72c680
8cc108cc9b2e72252dfb1073176817f6
Gets an assessment taken search.
class AssessmentTakenSearchSession: def get_assessment_taken_search(self): return
1
dbf4f0a3812782c5ab8205b122241553
1f27e59aa84a629dda17a680e35de62d
Does this data source have any listeners attached to it?.
{ return this._listenerArns != null && this._listenerArns.Count > 0; }
1
3940b3b1e937c2a1fc62ccde80a2ec31
4d546bc2ef82c5b1fdacea73bb478940
Recherche rapide d'une livraison par son numero ou son nom
{ $pdo = myPDO::getInstance(); $query = $pdo->prepare('SELECT * FROM Magasin WHERE siret LIKE "%' .$search. '%" OR raison_sociale LIKE "%' .$search. '%"'); $query->execute(); return $query->fetchAll(); }
0
6fd257e6dea6c80d2bb4f0456978aca0
a831bf5680112f5c0d5d1f417815ce85
function to add the player's guessed code into the vector where all the previous guessed codes were
void Level::addToGuesses(string guess){ guesses[numGuesses] = guess; numGuesses++; }
1
56fa85627079479de3d5f407f354662f
6cea896d150ce3c1c19a3e392de23b2b
获取公众号关键字分页数据列表
namespace WebAPI.Controllers public class TemplateController : ApiController [HttpPost] public ResponseResult<KeywordResponse> GetKeywordList([FromBody]KeywordListRequest model) { try { string accessTokenStr = _redisHandler.GetAccessToken(); if (string.IsNullOrEmpty(accessTokenStr)) { acc...
0
b43b1a641e7e945f62a0190d30aeb4ce
4b951f063da2e59155f26ae09baf699a
get the index of the specified student in the list of registered students for the Cindex. If the student is not found -1 is returned
{ for (int index = 0; index < _size; index++) { if (string.Compare(_students[index].Name, value.Name) == 0 && _students[index].Num == value.Num) { return index; } } return -1; ...
1
c0ac8ee71f035499b4ad84bb82eec9e9
9491c035e7a701b9aee6711356b4738c
Nim游戏
def main() -> None: game: List[int] = [1, 3, 5, 7] print("\nGame of Nim") print( "===========") display_game(game) start = input("Do you want to start? (y/n) ") print() if start=="y" or start=="Y": print("Your turn") user_turn(game) display_game(game) while True:...
1
7ca814fc092f9e0d516425c4921b9ba8
e4ef2e4fb0cbb1c9f6cb2d0a5ec679cc
http://stackoverflow.com/a/1026087/1470607
var hash = 0x811C9DC5; for (i = 0; i < str.length; i++) { char = str.charCodeAt(i); hash ^= char; hash += (hash << 24) + (hash << 8) + (hash << 7) + (hash << 4) + (hash << 1); } return (hash >>> 0); }
1
b65d9a8afc2e76e9421c971ce4771bd3
54eebfb393b05adba11b74e91c9cf0de
获取全部口味信息
@Service public class CommCodeSvc public List<CommCodeDto> getFlavorList(){ return commCodeDao.getFlavorList(); }
1
d7f184ab95168a1c11ae9c1280a35857
bea1ac6b6e5f56c1bfe7a16c0b93c1a6
Receive a texture from a sender to a D3D12 texture resource.
namespace Veldrid.Graphics void GetTextureData(int mipLevel, IntPtr destination, int storageSizeInBytes);
0
0d64c16e4fd1570487740be963716b58
e08965248bad5aa78f19705962e7a913
Performs an INSERT on the database, given a SeObjectHasFile or Criteria object. rethrown wrapped into a PropelException.
abstract class BaseSeObjectHasFilePeer public static function doInsert($values, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(SeObjectHasFilePeer::DATABASE_NAME, Propel::CONNECTION_WRITE); } if ($values instanceof Criteria) { $criteria = c...
1
f9a57a9d91f132ff555600530c7f195c
4f32db8c2aeba7bcfaf510c3db35fc7b
accessor method for name of state
public class State implements Serializable{ public String getStateName() { return stateName; }
1
255f9a6ce89bbb2e48603dbcd5f2cd90
86a910b199041f4cf763efec3b0cf3cd
This method deletes all the notes having this note Type .
public boolean removeAll(Long userId) throws ServiceException { logger.debug("Executes RemoveAll By UserId :-"+userId); try{ notesRespository.deleteByUserId(userId); return true; } catch(DataAccessException e){ logger.error("Error in removeAll",e); throw new ServiceException(e); } }
0
2fb4ec196b28562767a65ce089bfd63b
0febbb7153dd5e9c12e91ff9294457bf
collect links to all profiles
class BellevueEduSpider(scrapy.Spider): def parse(self, response): sel = Selector(response) links = sel.xpath('//div[@class="col-750 shadow"]/section/ul/li/a/@href').extract() for link in links: p_link = 'http://www.bellevue.edu%s' % link request = Request(p_link, callbac...
1
de5b88db148e5b20b453d6b6a13966be
bea7a2de379c7224c8b6212039aed129
メールテンプレートの保存
$mt_dao = $this->mt->mail_template; $mt_dao->setValue("title",$this->f->getValue("title_inp")); if(is_array($rep_keys)){ $rep_data = ""; foreach($rep_keys as $key => $value){ if($rep_data != ""){ $rep_data .= ","; } $rep_data .= $value; } $mt_dao->setValue("rep_keys",$rep_data); }el...
1
be8984bcf0bbf406933af49af371403c
7229a91415252220287030c46b49cb83
Event handler for pin change events
namespace AngularSimulator.Comm class CommRS485 private void SerialPort_PinChanged(object sender, SerialPinChangedEventArgs e) { Console.WriteLine(e); }
1
85f1989659147f0709fddd5a30c2a669
7cf57f6793bd286196c601be902c1bab
Sum money in Brazilian real standards
{ return String.Format("{0:#,##0.00}", (especie + cheque + vale + cartao)); }
1
bd4b21df706b32dbcc5b1a89aaa80edd
3907188dd59f1f2b99a72e46c111cc50
@brief Standard SDL destruction.
void cleanUp() { SDL_Quit(); }
1
534d307491a49f760969566869837f2a
4a5e13db6bed5352ddfb00b94a7bc649
Provides an editor for annotations on the model itself.
class TupleEdit(Container[ValueWidget]): def annotation(self) -> Any: return self._annotation
0
e6d4470e1396ffe3ac9d1da639d76578
42a9a6c231edbb1692f0b2ab5e675ebc
Test that the optimal trajectory ends up on the boundry of the circle constraint (2 mm from circle at most)
theta = np.linspace(0,2*np.pi,self.fps) radius = 2.0 labld_data = { 'x' : radius*np.cos(theta), 'y' : radius*np.sin(theta), 'z' : np.tile(1,self.fps), 't' : np.linspace(0,1,self.fps), 'traj_num' : np.concatenate((np.tile(0,6),np.tile(1,6),np.tile(2,6), ...
1
6290b8500b484b104b621b4ae3866269
8270d4c8962f9f0fe38a01d0b6f537f6
This function get the max value that LPTIM can count
cdtime_t latency_counter_get_max(latency_counter_t *lc) { if (lc == NULL) return 0; return lc->max; }
0
c3a30e93d84aa6c662cb8f59539ee370
f2ca0ff9609221a2ffc456d806b18987
Validates the view when the shopping cart is empty.
class HomePageTest(unittest.TestCase): def test_shopping_cart_empty_message(self): self.assertTrue(self.is_element_present(By.CSS_SELECTOR, "div.shopping_cart")) shopping_cart_status = self.driver.\ find_element_by_css_selector("span.ajax_cart_quantity.unvisible") self.assertEqual("", shopping_cart_status.text...
1
a62084d21c079279804ab4106de1c112
7d3b25ea60080d6b39016ab64c1972e9
container for a list of overlapping Downtime objects. For example, to handle together all Downtimes from CE objects with overlapping TimeIntervals.
self.__rectangles = rectangles self.__overlaps = overlaps self.__origin = origin self.__logger = logger
0
ef717d00ad6ff2d9dab52c9490de66fe
df40b2ebbca5f1a276d17611e6161911
Removes all non-numeric characters from input string in the format NxN (x, y) (x, y) ...
def removeNonNumeric(xstr): rstr = "" for i in xstr: if ord(i) >= ord('0') and ord(i) <= ord('9'): rstr += i return rstr
1
27bea67e99bc30462c13cd05a3e1640f
f33e317e2077f7ccdb81337fa22ed7f2
Gets the set of standard test VMs. This is supposed to do something seriously clever, like searching the testrsrc tree for usable VMs, but for the moment it's all hard coded. :-)
return { 'android.app' : [ 'cts.ActivityManagerTest#testIsRunningInTestHarness',], 'android.dpi' : [ 'cts.DefaultManifestAttributesSdkTest#testPackageHasExpectedSdkVersion',], 'android.hardware' : [ 'cts.CameraTest#testVideoSnapshot', 'cts.CameraGLTest#testCam...
0
9f74eb5e02cf4d76376596dee9e23425
ab1737a9b2dc6cd46a5071c889829f28
Pack UUID to binary like SmartBots do
buffer = bytearray( len(value) + 6) buffer[0:2] = struct.pack('>H',id) buffer[4:6] = struct.pack('>H',len(value)) buffer[6:len(buffer)] = value return buffer
0
c3eb2fc854e6344373ff95a825f8ebb1
02d329a18e345c39c9f1e7421b9a4ca2
Renvoie recursivement la liste des mots disponibles a partir du mot de depart On recupere les voisins directs, et on appelle recursivement sur les autres voisins Le LinkedHashSet évite les doublons
class Grille : def _chercheLettreSuivante(self,motActuel,origine): cases_possibles=[c for c in self.listeVoisins[origine] if c not in self.caseVisitees] if cases_possibles==[] : pass else : for c in cases_possibles : se...
1
56df0e0fd10a6b0ca0ea3d0a3be55727
02f522bba7a66cc5e2ec2befb353146c
反序列化过滤器,去掉JAXB命名空间的前缀,或忽略名空间
for (Iterator<Map.Entry<String, JsonNode>> it = node.fields(); it.hasNext(); ) { Map.Entry<String, JsonNode> field = it.next(); if (field.getKey().equals(CodecUtils.CLASS_META_KEY)) it.remove(); } JsonParser parser = resetNode(node, jsonParser.getCodec());...
0
113bbfe671c023a0dc0179f7aad2010c
d6ce0b566014aae74eb48d346576755c
Define the selection options the filter will present. Returns: list. a tuple of tuples. each sub-tuple represents an option in the format (option code, diplayable name).
def _get_selection(self): return ([('bueno', 'Bueno'), ('regular', 'Regular'), ('malo', 'Malo')])
1
407ed1cf94361d24e7789369f592144e
c662167799d4c0dfc6d1c0fa08c0308b
Gets the employee by MRFID.
{ DbCommand command = Database.GetStoredProcCommand("GetByIDEmployees"); Database.AddInParameter(command,"EmployeeId",DbType.Int32,employeeId); IDataReader reader = Database.ExecuteReader(command,transaction); return reader; }
0
84c6421f25e44bcbc91a0d9e83263959
6a1c2bfee3521d2eef13bd7797666463
Cria um Nodo de Hipótese
public class MainScreen extends BorderPane @FXML public void createEvidNodeUI () { EvidNode evidNode = new EvidNode(); MouseControlUtil.makeDraggable(evidNode); evidNode.setMainControl(this); this.area_bayes.getChildren().add(evidNode); this.btnCreateHypN...
0
e0f4868ace57abf8c561b77b04a2bc80
c566c2e40bf180846ce0c9ed85f354ab
remove isolated peaks
end = 650000 for i in range(peak.shape[0] - 1, -1, -1): if peak[i] < 100 or end - peak[i] < 156 or \ (label[i] != 'N' and label[i] != 'L' and label[i] != 'R' and label[i] != 'A' \ and label[i] != 'V' and label[i] != '/' and label[i] != 'E' and label[i] != '!'): ...
1
d458cbb34a0f2b608a662b95846db334
ba31f585716adcfa63b869c5c328f8d4
Ensure that the `NgCompiler` has properly analyzed the program, and allow for the asynchronous loading of any resources during the process. This is used by the Angular CLI to allow for spawning (async) child compilations for things like SASS files used in `styleUrls`.
if (fakeAsyncTestModule) { return fakeAsyncTestModule.flushMicrotasks(); } throw new Error(fakeAsyncTestModuleNotLoadedErrorMessage); }
0
73d192ec88404dccf0f36a279f97a346
186c7ae3df8f798b64f658feb6141274
Aktiviert alle Knöpfe in der Sortier-Auswahl
public class MarketboardController extends ViewController implements HelperWindow{ public void activateButtons(){ for(Button b : positions){ b.setVisible(true); } }
1
0c39b5e3068b97cd634e419dfdbd44b1
af13e4eeb6330858317cb1c4822cae3f
Gets the total number of characters written to the log.
long getBytesWritten();
0
0c1f36675fe8bcb9d81ff90038ca1c55
55c4d93777eb57a6a4c0c806e29cb369
rotira propeler
{ for (int i = arp[2].Count -1; i>=0; i--) { if (r.Next(3)==2 && Acomodar(arp[2][i])) { arp[2].RemoveAt(i); } } }
0
092a5197ab16ed539692a003f1360977
24ffc33d4a60d4e833667306276cb8c0
将bad network view进行隐藏。
@SuppressLint("Registered") open class BaseActivity : AppCompatActivity(), RequestLifecycle protected fun hideBadNetworkView() { badNetworkView?.visibility = View.GONE }
1
26ab761a1edb22ebfdafe9f7072c8b53
830f6ddb0e71cf4a435effe9162325e5
Fetch filepath for release (variant-only) VCFs
release = release_tag.lstrip('r') if contig: return f'gs://gnomad-public/release/{release}/vcf/{data_type}/gnomad.{data_type}.{release_tag}.sites.{contig}.vcf.bgz' elif data_type == 'genomes' and coding_only: return f'gs://gnomad-public/release/{release}/vcf/{data_type}/gnomad.{data_type}.{r...
1
dea5a3fc36f6cf7920cded3c02dfa3cb
67f0ec3c0573c4639fe5e499628cd2f7
发起GET请求获取凭证
let that = this await axios({ url: baseUrl + "/authorize", method: 'GET', params: data, responseType: "json" }).then((res) => { if (res.data.error_msg) { that.$notify.error({ title: '错误', message: res.data.error_msg ...
1
157f17efcbd0b69a5fc53376f03532c3
57590b8358d4c42686489c08a9400fb1
RSS Items constructor.
class RSS function __construct($url = "", $options = array()) { $this->url = $url; if (isset($options["CACHE_FOLDER"])) { if (is_dir($options["CACHE_FOLDER"])) { $this->cache_folder = $options["CACHE_FOLDER"]; } elseif (mkdir($options["CACHE_FOLDER"]) == true) { ...
1
fccdd79a6b3e9192e9174c2d2ed980d3
c44f1d2776c151fdc0833f9cf6b1e872
Check for valid system clock
def check_hz(): try: _ = os.sysconf(os.sysconf_names['SC_CLK_TCK']) except Exception: import traceback logger.fatal('failed to read SC_CLK_TCK - will not be able to perform CPU consumption calculation') logger.warning(traceback.format_exc())
1
62c1c4990dd7eec33517b6c109d32d65
9b58ced2f837cb64df199f90e9a58b77
Check if the student has already submitted the quiz answer
String isSubmitted(int id, int user);
1