query_id
string
corpus_id
string
query
string
code
string
label
int64
46df55905c9a139bb10dd9ec301353d9
0decb488736d280d0321fa5c21000178
Take player_choice in the form of a string, play a game of RPSLS, and print results to the console.
print "The player has chosen " + player_choice + " no take-backsies!" player_number = name_to_number(player_choice) computer_number = random.randrange(0,5) computer_choice = number_to_name(computer_number) print "The computer has chosen " + computer_choice value = (player_number - computer_numbe...
1
6ca50fcfdc6875acf86ebea3bc6238a6
81cd41a7d6b772f556054bb364474f2a
Checks if there are any enemies at this location
{ if (gameState.QuadTreeEnemies.GetObjects(e.Rect).Count > 0) { return false; } return true; }
1
8df7bea8a9698bf2feadf1a30d414c90
77eef17b77ae4dc2db538a1da7230bfa
Generates the XML for a member.
{ if (CurrentWriter == null) { throw new InvalidOperationException("Invoke 'CreateMember' first."); } if (text == null || string.IsNullOrEmpty(text.ToString())) { return; } CurrentWriter.Append($"...
1
f8e99856271bd6842b358b6a67786a6b
32cdd6a90ac9069c1cfc8127479ed368
Sometimes MagicHue api returns broken json text which ends with `.`
impl<R: BufRead> ReadData for R fn read_data(&mut self) -> Result<SensorData, AnyError> { let mut line = String::new(); self.read_line(&mut line)?; line.pop(); Ok(serde_json::from_str(&line)?) }
1
9fdf9c9d16ad1ca5f38569e896f90f05
cbfc2dc8a9459ac3376051e12c83760f
Generates the command to swipe up in the Espresso framework.
public class GestureCommandExecutor extends CommandExecutor @Action(param1 = "parentLocator", param2 = "locator") public void scrollUpTo(String parentLocator, String locator) { scrollUpTo(webDriver.getAppiumDriver(), parentLocator, locator); }
0
863f27466926c8cba9ebebb4f6925421
7f61448ad6da3ef0f9cb03f40c5be655
Not allowed from API
cases like (1)
0
376c0df6ba7efefaa02a692745700138
3fb60b392b26e21f3711bc04f9f26362
Méthode déclenchée à chaque tick du compteur de départ. Permet de lancer la partie à l'expiration du temps
namespace RepetiteurLivrets public partial class Questionnaire : Form private void tmrDecompte_Tick(object sender, EventArgs e) { int iTimer = Convert.ToInt32(lblStartTimer.Text); if (iTimer <= 1) { DebutPartie(); lblStartTimer.Visible = false; ...
1
e87818c3374a8f55d45086afcf53923d
93b497207a59a7a54119f99bc0efb2a5
处理百度返回的用户信息
namespace RenrenSDKLibrary internal class LoginBS: BusinessBase private void DecoderUserInfo(string result) { try { UserList userlist = new UserList(); userlist.User_List = (ObservableCollection<UserDetails>)JsonUtility.DeserializeObj( ...
0
d87b7edd96722dcc78b3281ef76282ac
c3f1c1c583c257c6aba6d7570fdcd4c6
Description This function handles an inbound connection indication from L2CAP. This is the case where we are acting as a server. Returns void
{ LOG_INFO("%{public}s enter", __FUNCTION__); AttReceiveConnectionRspContext *attRecevieRspConnectPtr = (AttReceiveConnectionRspContext *)context; AttConnectingInfo *connecting = NULL; L2capConfigInfo l2capConfigInfoPtr; AttGetConnectingIndexByCid(attRecevieRspConnectPtr->lcid, &connecting); if ...
1
1369e17f87dc96a084591d0fd6add96a
a00868ade7e43700e699ff2ae395e201
Not allowed for now
class SessionViewListAPI(ListAPIResource): def get(self, session): abort(501)
1
6b6dc6bc629a62f75e9e4c3ac6e23cae
46184ac6859f6cb821ff7a3f38f2273d
获取新增医院备案下拉列表
function getHospitalList() { $.ajax({ type: "post", url: address + "hospital/find.do", async: true, success: function(d) { var data = d.data; var htm = ""; for(var i = 0; i < data.length; i++) { htm += "<option value='" + data[i].hospitalid + "'>" + data[i].hospitalname + "</option>"; } $("....
1
473e793e156cf44ba65f093444ef1695
8215c1beff224fdb598a9bbe37698f3d
检测子公司是否存在子部门的情况
public boolean hasChildDepartment(Department department) throws BizfwServiceException;
1
90dd9f16c0307375096d34dfefcdfbe8
26514320ae202119896b124c080aa14e
根据语言类型查询基础价格
public BasicPrice queryByLanguage(String language);
1
c736683a1e507b226b0855c294e0470a
b4007e29dd3b2c2aa3286c7999ccbca9
Convert MB to Bytes
class nc_netshop_exchange_helper public static function mb_to_bytes($mb) { return $mb * 1024 * 1024; }
1
5c0866d60ddb07333f0a4adb5e8a0f13
3b50f43e3823f11311cca1b704143ecc
取得服藥頻率代碼
public class BatchVO public String getMedicinecode() { return medicinecode; }
0
7b65821895ee9abe000ad3fb9f01d5fc
0e0cb402b7075b5f7f1d996c1f24d264
Requests clients to resize the keyboard vertically for optimal fit.
const keyboardSpace = frames.endCoordinates.height; const {dispatch} = this.props; dispatch(changeKeyboardSpace(keyboardSpace)); }
1
65f218304f68e1ba413c0727d6b00340
9839fc2ff8349cfcb6bf1cc6ff5655a9
닉네임으로 유저 정보를 가져옴
Query query = new Query(); query.addCriteria(Criteria.where(NICK_NAME).is(nickName)); return mongoTemplate.findOne(query, User.class); }
1
64e74d42227b9174a415619e9e8fecb9
e339fe5f0a0ac93ce82e6595c076f136
通过社团获取社团系统管理员
class SocietyApi extends Api private function getSocietyManager($societyId){ $result= D('SocietyMember','society')->getManagBySocietyid($societyId); $managers = array(); foreach ($result as $key => $value) { if ($value['uid']!=0) { $managers[] = $value; } } $managerList = ''; foreach ($managers as...
1
bfa9022ed7ae490475aed5584a0d1783
303770689b22cd2c142a2a5be875affe
Gets the remaining clock tower boost time.
public class GamePlayer public int getAttackBoostTime() { return attackBoostTime; }
0
fc8f3b0864e6a3399b6d1a1f4ade6eca
1d1be43a343d131646ca47ec2a050e88
Returns the current value of the parameter given the time step 't' of the optimization procedure.
namespace Rb.Core.Maths float GetValue( float t );
1
7afef6f840427b98c217f66ffaec243a
860452325491c2ed1bc4d71fd9a1be04
# discrete K-L divergence
KLD <- function(x,y) sum(x *log(x/y))
1
282749115b413b13850f7ef07efa2bf3
44c971196255544bd36cb704fd088319
根据落子位置,翻转相应的对手方棋子
class Othello (Scene): def reverse(self,x,y,turn): global placing_piece enemy=0 if turn ==1: enemy = 2 else: enemy = 1 go_x=[-1,0,1] go_y=[-1,0,1] for i in go_x: for j in go_y: if i == j == 0: continue if x+i<0 or 8<= x+i or y+j<0 or 8<=y+j: continue if placing_piece[x+i...
1
02d7d631797e35fe7f6d67e66be00798
5a74424a1c44d4acdd047aa915533be0
64-bit permutation box
{ static unsigned char const sbox[256] = { 0xee, 0xed, 0xeb, 0xe0, 0xe2, 0xe1, 0xe4, 0xef, 0xe7, 0xea, 0xe8, 0xe5, 0xe9, 0xec, 0xe3, 0xe6, 0xde, 0xdd, 0xdb, 0xd0, 0xd2, 0xd1, 0xd4, 0xdf, 0xd7, 0xda, 0xd8, 0xd5, 0xd9, 0xdc, 0xd3, 0xd6, 0xbe, 0xbd, 0xbb, 0xb0, 0xb2, 0xb1, 0xb4, 0xbf, 0...
0
f356000ae90d171ea86c4332d507e2d3
99b0fed99f03850ed0884770e79e84b5
Get the http method used (GET, POST, etc)
class Phalcon_Request public function getMethod(){ }
1
b84ecaa51423d4cf8b90fd563286bef5
4b29b95b9bce6fc857f92710a8aa3fb8
获取宝箱规则
namespace MovieCollector public class C public MovieRule GetRule() { return (MovieRule)Voodoo.IO.XML.DeSerialize(typeof(MovieRule), Voodoo.IO.File.Read(CurrentFolder + "Config/Hanyan.xml")); }
0
069a16571df55d72ef04aeeb0887aef3
5ba5c18915b2c8c0c55bf29f588a3ba3
Save Mol file for this structure.
fd = None path = None if isinstance(f, io.TextIOBase): fd = f if filetype is None: raise Exception("If a File object is passed, a filetype must be passed with it") else: path = f if filetype is None: _, filet...
1
01acc2e514d532bb4e42fb2bf146f05e
4ae1ae56f1dfe63b804da3920b363663
Processes the clicking of buttons in the book tab.
public class Controller @FXML public void processButtonClickEvents(ActionEvent event){ if (event.getSource() == btnSchoolsRanking) { loadPage(SCHOOL_RANKING_FXML); } else if (event.getSource() == btnLeagues){ loadPage(LEAGUES_FXML); } else if (event.getSource() == btn...
0
319b6d18ce71e2208b5ecdf2d875d8d1
c6d9880ff2886ca68c5397419623e5e1
Verify converting a file adds in header template and correct text
test_string = self.read_test_file(self.processor_name, 'example_separate_blocks.md') converted_test_string = markdown.markdown(test_string, extensions=['markdown.extensions.fenced_code', self.verto_extension]) expected_string = self.read_test_file(self.processor_name, 'example_separate_blocks_ex...
0
96e9c4f867e7a20e7fe312b5cffa8138
a12d0fcf18fb0bec945d990a38961031
获取日志下载链接
{ return Task.Run(() => { var dir = new DirectoryInfo(Path.Combine(AppContext.BaseDirectory, "etc", "log")); if (dir.Exists) { StringBuilder sb = new StringBuilder(); foreach (var fl in dir.GetFiles()...
1
28cc8584bc4d56e0188711ea6314ecdd
02e70fbd7fde26cc4397f9d4c1ec1f22
Return the sample size.
public class BernoulliSamplingEfficient extends BernoulliSampling @Override public long getSampleSize() { return this.sampleSize; }
1
000ac373b784e44fb062a1c16302e25d
a97692e2594cd8a638a61de63cd43506
Получаем путь к исходным файлам которые надо перевести
source_path = fd.askdirectory(title='Выбрать исходную папку') if source_path: self.entry_source_folder.delete(0, "end") source_path = os.path.normpath(source_path) self.entry_source_folder.insert(0, source_path) self.label_source_folder_error['text'] =...
1
7f6eb7c79ed3f754b2fc37a2127bb8f9
0bdbfcf12f4a26dd996a2ae462c0565f
returns an AST (or at least a part of it) which has been computed from some query-string.
class OdhQLParser(DocMixin): def parse(self, query): return self.build_grammar().parseString(self.strip_comments(query))[0]
1
08600db21e4e76bda5eacd0a8d8feabf
bb2c73a8aa3cbacb1fa8ef1463db20f1
Updates the calibration plot object with data from last calibration.
fit2d_parameter = self.view.get_fit2d_parameter() self.calibration_data.geometry.setFit2D(directDist=fit2d_parameter['directDist'], centerX=fit2d_parameter['centerX'], centerY=fit2d_parameter['centerY'], ...
1
fffebc79864ac4b1dbcbcfab2726ba2b
e9f4bf1d1962a4ec501964479742f9cf
In our test setup, we have 3 shards, the last one in dequeueOnly mode. Check that the helper method does in fact return only the first two shards.
@Category(value = ExcludeFromGatedCheckin.class) public final void testSimpleSelect_CompleteResults() { testSimpleSelect(MultiShardExecutionPolicy.CompleteResults); }
0
b5df1f7ed3612d12b826b55be61db814
dab1d46793db45a8af1458dff27fa536
返回最旧的时间
public class DateUtil public static LocalDateTime earliest(LocalDateTime... dates) { return Arrays.stream(dates).max((d1, d2) -> compare(d1, d2)).get(); }
0
42d8eb10f7eefd65d758883ae4c83c31
ea7c0590f832ef1a820ac407e1676537
Toggles the "Do you want to exit" window (and pauses or unpauses the game).
namespace ProjectScopes public class GameManager : MonoBehaviour private void ShowExitGamePanel() { GameObject exitGamePanel = GameObject.Find("ExitGamePanel"); bool enabled = exitGamePanel.transform.GetComponent<Canvas>().enabled; exitGamePanel.transform.GetComponent<Can...
1
008d7a5e1c9ee5aeb0c6f41f9e2e37b2
87ec147698ee9a2ba04cff80cc48fdb9
Send file using Django dev static file server. .. warning:: Do not use in production. This is only to be used when developing and is provided for convenience only
def serve_static(filepath): return flask.send_from_directory(config.STATIC_ROOT, filepath)
0
e146574761f6052f802c11b632d4b93e
10e26830307f82d048b148ac98a2674e
Create an instance of {@link InterchangeSchedule }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "creationInfo", "formITR6", "partAGEN1", "partAGEN2For6", "partabsFor6FrmAY13", "partapl", "partaoi", "partaqd", "partBTI", "partBTTI", "verification", "scheduleBA", "scheduleHP", ...
0
d612a51a81a0170decc9fc2204dee4a5
1c6ae2cc1986bafde91865067dc90b65
Constructs an expression tree from a gene.
@gene_id = gene_id @go = go @library = library end
0
b0b5ca21058b8de87925fec18a594be8
f5aa2b6574bc8c7d91aea7153cbb548b
Rechercher tous les codes promotionnels d'un utilisateur
if( ($user_id = Mcore::base()->authenticate->getUserID()) == 0 ){ return NULL; } return $this->findAll( "uhp.id_user = {$user_id}", "t.*, pc.*", "RIGHT JOIN user_has_promocode uhp on t.id = uhp.id_promocode ...
1
d4b4b269c1014a25c6a8f89637e4c78e
ed86b75b27e4e23c1a86dfceaf689a26
Set this location's bearing.
namespace SnowplowTracker.Payloads.Contexts public class GeoLocationContext : AbstractContext<GeoLocationContext> public GeoLocationContext SetBearing(double bearing) { this.DoAdd (Constants.GEO_BEARING, bearing); return this; }
1
15585ec1dd5fffee08f45c4a75edeebf
7f710fd27d6ce2873bc4a992d29bf0fa
Resolve data from a list of datasources, these could be from various locations or the same.
if not isinstance(data_sources, list): data_sources = [data_sources] ids = [] for ds in data_sources: if isinstance(ds, (bytes, str)): ds = DataSource.lookup(_db, ds) ids.append(ds.id) return _db.query(CustomList).filter(CustomList.data...
1
6cf10a113a1798cec673cb06ff2c81d0
a27373f03ce1440c5fce8a095804e470
Adjusts the AnalogIn instrument buffer size.
def DPxSetAdcBuffSize(buffSize): return setAdcBuffSize(buffSize)
1
bcd7f19644471001eee5e0c6171e05dc
649cbf9d128c99fbdaba78ced95fdb31
安装mysql数据库
class setupController extends QP_Controller private function _installDb(){ $link = @mysql_connect($_POST['mysqlhost'].':'.$_POST['mysqlport'], $_POST['mysqluser'], $_POST['mysqlpass']); if(!$link){ $this->_out(-1,L('db_connect_fail')); } $bool = @mysql_select_db($_POST['mysqldb'], $link); if(! $bool){ $...
1
adf8479d23f3ffaeea6dd450232f7c1b
3838c60969f5fd06c642c98544eecfd5
Prepares the binary for code injection, creating sections/segments where needed. This should *always* be called before inject() is called, as it provides the initial values for next_injection_vaddr which may be required to do certain IP-relative computations.
{ FatalCheck(_ilBytes.Length > 0, VerifierError.CodeSizeZero); _modifiesThisPtr = false; _validTargetOffsets = new bool[_ilBytes.Length]; bool previousWasPrefix = false; _currentOffset = 0; while (_currentOffset < _ilBytes.Length) ...
0
8e67ccd2cd9d4352139d9606d2c3bd16
63edd22da8f4862e04d8e2353ac1d7a8
Creates an access token query string parameter.
{ if (account == null) { throw new ArgumentNullException ("account"); } if (!account.Properties.ContainsKey ("access_token")) { throw new ArgumentException ("OAuth2 account is missing required access_token property.", "account"); } return "Bearer " + account.Properties["access_token"]; }
0
2a584072e3e4dd52dc7a83365b5b50ae
0ed16e7c22a4ab1133aee4527149d8f9
Apart from helping in logging any unusual panics, also helps in reporting interface conversion errors
fn logging_handler_panicking() impl JackLoggingHandler for Special fn on_error(&mut self, s: &str) { self.0.store(true, Relaxed); panic!("JACK ERROR: {}", s); }
0
571a4e154164c50ea0a3f0cefefb039e
9c5bd55c5d1c4faa776e1a052492448b
This is a Method that returns the loaded h5 Dataset.
f = h5py.File(path, 'r') res = f[dataset_name][:] f.close() return res
1
5458f6627f34c8835624abac3359ed1c
0c18ac9f9a9ced2bd172f99a9038cd62
Метод расчета Дифференцированного платежа
function getPayment(sum, period, rate) { let i, koef, result; i = rate / 12 / 100; koef = i * Math.pow(1 + i, period) / (Math.pow(1 + i, period) - 1); result = sum * koef; return result.toFixed(); }
0
078b5312ffb72f0070bf1d48d7c2bce8
c999430941395aa52a225df5441ea272
Return processed HTML as a single string
export class SSRAssetsContainer toHtml(beautify = false) { return this.tags.join(beautify ? '\n' : ''); }
1
8ee4cc6fe023418303d3658a22360e07
d785568ecc1ea5a828c7f55a38965c6b
Establish whether head encoding checking is turned on.
var result = false; if (0 < (this.vscpHead & 0x0010)) { result = true; } return result; }
1
ff8d9d484edfed366c17f05606bc1bab
a036bf6bb0bc7e1daf50372b53093f81
Get the equivalent non multiprocessed BaseExperiment object.
EGUIExperiment getExperiment();
0
4c639a48de785a1dc63559908cd25d29
204f794d0e7d8dcaa0df8f36eb39c098
Queries component policy states for the subscription level policy assignment. In a given time range, 'latest' represents the latest component policy state(s).
policyStatesResource: PolicyStatesResource, subscriptionId: string, resourceGroupName: string, policyAssignmentName: string, options?: PolicyStatesListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams ): Promise< PolicyStatesListQueryResultsForResourceGroupLevelPolicyAssignmentRe...
0
3a5f7e85e8e7482d1acac02d3b2c4008
e1990a66784e3c1c86c289eda42a941e
Add padding to configuration string
class des(): def addPadding(self): pad_len = 8 - (len(self.text) % 8) self.text += pad_len * chr(pad_len)
1
ad9fe0598edad1b24ec750677da23296
a33e4d72ab2d5b83e70140c2a2acb370
FromContext retrieves the logr implementation from Context and uses it as underlying logger.
func LoggerFromContext(ctx context.Context) *Logger { if v, ok := ctx.Value(globalLoggerKeyType{}).(*Logger); ok && v != nil { return v } return nil }
1
e18e1e99cd0da514a459fb5691cf5abe
abd0a8a6a42847c17ae8f022a2ebb574
Computes the BM25 scores of document given a query strinng and the query field Returns dictionary of document ids and BM25 scores
class RankFunction : def BM25_score(inverted_index, doc_set =None, PARAM_K1=1.2, PARAM_B=0.75, EPSILON=0.25): def bm25_ranking(field_name, query_terms_as_string): docScore =defaultdict(float) tokenized_text = inverted_index.field_names[field_name](query_terms_as_string) for ...
1
1d3bdf862ea3b60a75c8ac401d5aa3bd
1e2e95e0718ff61767bc715fc56ddb10
数値の倍数宣言を取得します. <p> multipleOfが設定されている場合は、指定された値で割り切れるようになる必要があります。 </p>
class IdDto implements Sie4IInterface public function getMultiple() : int { return $this->multiple; }
0
a0808dd2c66375ab1fa42c680ae3d1f2
b925a4842857401a6282798f896113fc
clearHeader clears the header on the page
while(true) { var elem = body.firstElementChild; if (!elem || elem.tagName == 'HEADER') { break; } elem.remove(); } }
0
3db08d7bef9d05397a88424868290729
03db06bc8a12a06406d7914e885cb0ee
Calls the AutoCAD command zoom extents
namespace ECG public partial class MainWindow : Window private void Auto_View_Click(object sender, RoutedEventArgs e) { EMG_Chart.ZoomExtentsY(); }
0
78da733de056ab9b99e7751864442bf3
f437372ba67b3d4c8fd614fdf9aa61af
Internal Route matcher Matches a URL against a route, and returns a tuple of the match dict and the route object if a match is successfull, otherwise it returns empty. For internal use only.
class Mapper(SubMapperParent): def _match(self, url, environ): if not self._created_regs and self.controller_scan: self.create_regs() elif not self._created_regs: raise RoutesException("You must generate the regular expressions" " before matching...
1
f77882103b08cbb7f83ae1ae2cdea7ba
92bcb7ceed1ada1dcf8f85d7dcee2a79
根据id获取推特信息
{ oAuthSina _oauth = new oAuthSina(); if (oAuth(userid, passwd, _oauth)) { string url = "http://api.t.sina.com.cn/" + uid + "/statuses/" + id; return _oauth.oAuthWebRequest(oAuthSina.Method.GET, url, String.Empty); } els...
0
b664d37bd135a61dac24a12a792e4cfa
84df8f2445d957988cc524101de004f4
System.Threading.Tasks.TaskFactory System.Threading.Tasks.Task::get_Factory()
{ static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&CancellationToken_t51142D9C6D7C02D314DA34A6A7988C528992FFED_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Task_t751C4CC3ECD055BABA8A0B6A5DFBB4283DCA85...
1
69cdcb7f7286bbed4abc1a5bb05fb3ab
7c6c5726dc0fe3f561088b1a10b23b81
basic linked list prepenting
function LinkedList () { this.head = new Node( 'head' ); this.find = find; this.insert = insert; this.remove = remove; this.display = display; this.findPrev = findPrev }
0
82b89b69a87ea91b89cfeff79cec95e3
0e7408d354adaf87308a5ec24a3a13c1
解压成字符串(指定编码格式)
InputStream inputStream) throws IOException { FilterInputStream compressStream = null; InputStreamReader inputReader = null; StringWriter strWriter = null; try { switch (compressFormat) { case COMPRESS_FORMAT_GZIP: ...
1
6ce5439696107d67a6b0371336d5ead4
b5c799ff3c09e256a50bd08874e31f65
Get the final route result based on the input trip attributes
trip = get_object_or_404(Trip, pk=trip_id, user=request.user) if request.method == 'POST': if request.POST.has_key('trip_details'): try: json = simplejson.loads(request.POST['trip_details']) if trip.offer: route = json.get('route') ...
1
254645de0be01b05cfdc7da86b9231b2
9426c9e0eca9ce2f4eb437b429e17e7f
Salva a pontuação no banco de dados.
namespace IT4ClubCar.IT4ClubCar.ViewModels.Popups class PontuacoesPopupViewModel : BaseViewModel private async Task GuardarPontuacoes() { MediadorMensagensService.Instancia.Avisar(MediadorMensagensService.ViewModelMensagens.GuardarPontuacoes,null); MediadorMensagensService.Instancia....
0
92093e9d19e4b35e1186ccb1e5531139
fcf35ffb242d0e4b7ba46c4d2ac6e310
Parses a set of cards from one or more lines. The cards are sorted by the N (name) property value. There is no return value. If two cards have the same key, then the last card parsed is stored in the array.
const mapObject = {}; let params; let i; const mungedString = `,${mapString}`; params = mungedString.split(/,([^,]+?):/); params = params.splice(1); for (i = 0; i < params.length; i++) { mapObject[params[i].trim()] = params[i + 1].trim(); i...
0
ad07a632cf6be0c8ab75d56767b36844
7b26bf28d31b821012ae805cc851e0ae
zeroval函数有一个int类型参数,这个时候传递给函数的是变量的值
func main() { var a int64 = 32 fn(&a) fmt.Println(a) }
0
e443e7ab58a687e2bcc4000be11b6e86
32a2e9c7b8fccbdbb36bc75847518543
Initialisation des variables pour les lignes totals (Excel)
{ $activeSheet = $this->exportExcelManager->getActiveSheet(); $values[$line][] = $this->dictionaryManager->getParameter(RapRapport::HEADER_RAP_EXPORT_TOTAL); for ($cpt = 0; $cpt <= $nbColumns; $cpt++) { $values[$line][] = '=SUM(' . $activeSheet->getCellByColumnAnd...
1
59ed64b8ea4b8336883bd5efb5c8b246
f33c67808c216382cc1d4097ef9b45e4
Should return an iterable over the objects associated with the given parent that are kept in order.
class HBTreeFolder2Base (Persistent): def objectItems(self, base_id=_marker): return HBTreeObjectItems(self, base_id)
1
430071f7c885c69e1d3d0e9af7391601
bac7dfe6b3d8a73afd5147d76961fad4
根据id查询模板价格
public List<FreightTemplatePriceVO> findFreightTemplatePriceByFTID( String freightTemplateID);
1
d2d0bfe6b8fb48693e99f5e1a135d2e3
8e70b3562fc3c64ce2a2753e08847cda
The number of messages that were rejected by subscription filter policies because the messages have no attributes. Sum over 5 minutes
public long nonVerifiableMessages() { long totalMessages = 0; for (int i = 0; i < subscribers.length; i++) { totalMessages += subscribers[i].nonVerifiableMessagesReceived(); } return totalMessages; }
0
00833add4c37432153fc1722474df469
5980d24809a7df404b87c80887c15e6f
returns string, that was formed from arrray elements. All elemenets will be separated with appropriate char
function toString(arr){return arr.join("-")}
1
d23790b8fb903f34e34ad9dd0a4bbf57
90a3e5564bc2ebf9b5e709a5579174ab
根据attr_id查询attr_value
@Service public class ManageServiceImpl implements ManageService public List<BaseAttrValue> getAttrValueList(Long attrId) { return baseAttrValueMapper.selectList(new QueryWrapper<BaseAttrValue>().eq("attr_id", attrId)); }
1
b12b853d830140aa246e72f2a1f5dfd0
4fcfddcb9489051d5280408cd21757c3
https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/makeset-aggfunction
function setOf<$Value extends Field | Schema>( element: $Value, ): FieldSet<FieldExtract<$Value>> { return { [$kind]: FieldKind.Set, get: (set = new Set()) => { set.clear() return set }, element, } }
0
733fdd13bd02cc5263009106d2777588
2d2f4f6ac99493ef300ef61137eed4e2
Test the _handle_transaction_digest method of the ledger_api handler.
self.assertEqual(self._store._on_digests_ready.event.is_set(), False) self._store.update_root_digest("digest_apple") async def defer(): await self._store.on_digests_ready() self.loop.run_until_complete(defer()) self.assertEqual(self._store._on_digests_ready.event.is_s...
0
80e0a503bc02c849864af52d13e49d99
2d36870dff402d282bf6a9621300a78d
Загружаем архив с городами и распаковываем его.
class CitiesLoader: def __init__(self, file_name): self._file_name = file_name self.cities = self.load()
0
7a608449aad865b3e1a81eff9a4e6d4d
e47f79d4ba4bd9fc1365f4077adb8d96
A handler that intentionally raises an exception.
def PhaseWithError(): raise Exception('Intentional exception from test case.')
1
e873f2f8b339ec873e112ce3c65b8730
87439eb118791ee9a52588531a6d2c0f
上传身份证反面成功
set_time_limit ( 0 ); $idcardno = I ( 'idcardno' ); $user_id = $this->_USER ['user_id']; $card_type = I ( "card_type" ); $config = C ( 'UPLOAD_IDCARD_CONFIG' ); $config ['saveName'] = md5 ( time () . '_' . mt_rand () ); $app_file; foreach ( $_FILES as $key => $Ofile ) { $app_file = $Ofile; } $upl...
1
b0aff96bb703882ba4746f39b81a5f69
c6bb02702cd66aad3e12bdf2e2b87d1e
gets the correct quest number for the quest in the array
public class ConversationVM : MonoBehaviour public int get_quest(int unk, int QuestNo) { return QuestVariables[QuestNo]; }
0
c0854967bd6854bb12063ce0239eeaee
c7359597a36d6d4f68c051a7f17fe219
Returns language selector UI
const dispatch = useDispatch(); const onSelectingLanguage = (event) => { console.log('handler') const selectedLanguage = event.nativeEvent.target.childNodes[0].textContent; dispatch(selectingPageLanguage(selectedLanguage)); onVisibleComponent('LanguagesList')(); } return ...
1
c86c3ddb5e0f383e1837e1def071277d
aa4c597a23c8e71a7028c0df4b0defa7
Questo metodo serve a ricreare i provini di una o più foto.
class TiendaControllerManufacturers extends TiendaController function recreateThumbs(){ $per_step = 100; $from_id = $this->input->getInt('from_id', 0); $to = $from_id + $per_step; Tienda::load( 'TiendaHelperManufacturer', 'helpers.manufacturer' ); Tienda::load( 'TiendaImage', 'library.image' ); $width = Ti...
1
24ef8e672ed82bf7b13a9b5c6bf1d38c
db843b0d940b310c8ad58d5c911c6fa9
remove boxes that are all zeros (padding)
patch_list = [] patch_list_new = [] for i in range(len(img_patch)): patch_list.append(img_patch[i]) if patch_list[i].max() != 0: patch_list_new.append(img_patch[i]) return patch_list_new
1
fbcc67b2282b322d0503f5cb12ba2a92
f4b83a738ecbb0cea492832ef18c7b11
Creates and returns a resource pointer for the encryption method. This is required for e.g. retrieving an encryption key.
{ zval* zv; php_openssl_encdec_ctx* ctx, * ctx2; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zv) == FAILURE) { return; } PHP_ASSIGN_RESOURCE(ctx, php_openssl_encdec_ctx*, zv, PHP_OPENSSL_CTX_ENCRYPT_NAME, le_encrypt); if (!ctx) RETURN_FALSE; if (ctx->complete) { php_error_docref(NULL TSRMLS_CC...
1
c390c6c7b40f6aa1d576803e3729f8aa
9edbce53a5a32702df6a66d1d57c2502
parse input xml and set private chats
{ if(preg_match('!query xmlns\=\'jabber\:iq\:roster\'!', $content)) { if(preg_match_all('!<item.+?name=\'(.+?)\' jid=\'(.+?)\'><group>(.+?)</group></item>!s', $content, $res)) { foreach($res[1] as $key=>$name) { $this->contacts[$key]['name'] = $name; $this->contacts[$key]['id'] = $res[2][$k...
0
985f0b942ff3778ec1cb43f23e0675bc
1c3eac12fce6e40bcb5efb8194ada768
Checks if this cursor has been closed.
if (!started) { throw new IllegalStateException(); } return cursor != null; }
0
145833358534c3662dfc06e5d5ee9fd2
334fbc86a8047c6c4e520b59cacac8c5
遞迴依序尋找節點並列印出路徑
{ int[] path = new int[1000]; PrintPathsRecur(node, path, 0); }
1
0af05d31a517ba87ca57ee42c20ea691
c3ee3bc63fc3d2e2cd409a5b8a3b517e
从asset文件夹拷贝文件到目标文件(文件已存在则放弃拷贝)
public class FileUtils public static boolean copyAssetToSDK(Context ctx, String srcFilePath, String targetFilePath) { InputStream inStream = readFromAsset(srcFilePath, ctx); if (inStream == null) { Log.e("copyAssetToSDK", "inStream == null"); return false; } retur...
0
8001a07aecd9b7de5844217f922d1647
0615e9cf446809c68c396aeb7622987d
Returns the value of the '<em><b>Type Declarations</b></em>' containment reference. <!-- begin-user-doc --> <p> If the meaning of the '<em>Type Declarations</em>' containment reference isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
boolean isSetTypeDeclarations();
0
1498dbc95b99cbad6e6bbbc0463a773f
b9c769e28c00f52589bbea6e5ec7433c
NZCV cccc 0010 1001 nnnn dddd iiii iiii iiii ADDS add immediate - set status
{ UINT16 t,r; IDX2BYTE(t); r = A + t + (CC & 0x01); CLR_HNZC; SET_FLAGS8(A,t,r); SET_H(A,t,r); A = r; }
1
abeaa148b347c4c6380f3f9ecbbebadc
ede3b8217133c6fbefa67faced1f197f
更改数据库中任务的选中状态
@connect( state=>({}), RechargeAction ) class Recharge extends Component changeTodoState(index, isSelect, configid) { this.setState({ items: this.state.items.map((item, i)=> { if (index == i) { item.isSelect = isSelect; } else { ...
0
5433ed9703dd917c9f7ccc6c25e4555e
71158a54c99530b6baae540706b2c488
创建建造按钮
local buildLogBtn = ui.newButton({ normalImage = "tb_174.png", position = cc.p(570, 780), clickAction = function (sender) LayerManager.addLayer({ name = "guild.GuildBuildLogLayer", cleanUp = false, zOrder = Enums.ZOrderType.ePopLayer }) end }) se...
1
28dea9485615d8467b054ed2ac895381
47d0fb96cf756ec6c877868d3f676482
取得商品剩餘可銷售數量.
class SaleRulesThird extends AbstractSaleRules public function getCountsSaleProduct($order) { $sales_count = 0; foreach ($this->without_products as $without_product) { unset($order[$without_product]); } $count = 0; foreach ($order as $product) { if ($p...
0
00e0100a78108590d36fc5317bd95a9f
190f0a054ed3904ae59ca9ccf304712d
Find the center of a given cluster
x = 0 y = 0 total = 0 for i in distList: for d in i: if (d != 999): x += d[0] y += d[1] total += 1 if total == 0 : total = 1 center = ((x/total), (y/total)) return center
1
d4a8d6640413cf0a16f298cda9bd1e2f
ce2bfff3d1a5df69447d08aefca5fe74
transfers the personailty into the gameManger script holding the static variables used in all scenes.
public class VariousMethods : MonoBehaviour public void SaveSelf() { GetComponent<PlayMakerFSM>().FsmVariables.GetFsmGameObject("me").Value = gameObject; }
0
2a8eef8679616e138fb8cb746cc39d19
b03695e17d6201fd05982dcbfd29af86
Sets a new master device id for the object The new master device id to set
class Session(object): def master_volume_id(self, master_volume_id): self._master_volume_id = master_volume_id
1
a1360762458f9ec3b3dd4efeb1f62bce
d8a73138315a3e0be7bfe28703814b90
Gets the deportetoeje 112.
@Entity @NamedQuery(name="Pasot.findAll", query="SELECT p FROM Pasot p") public class Pasot extends AbstractEntity public BigDecimal getEjpa13() { return this.ejpa13; }
0
ca5750fdac6f037865de802dfd3a396b
e828bbf2f921e3d94aef4821440661d1
累积待收收益
class AgentInfo extends BaseModel public function cumulateProfit3($agent_id, $order_money) { $model = new User; $is_new = $model->where('user_id', $agent_id)->value('is_new'); $rate = agent_order_rate($is_new); $money = round($order_money * $rate,2); return $this->where('agen...
1
ad22572fc0add1b4ce9d7f1ff898b4a6
9c1620f63eda087759ddc82eb19712f4
Returns TwiML instructions to Twilio's POST requests
response = Twilio::TwiML::Response.new do |r| r.Message message end render text: response.text end
1
ea232762a74a3fca0690aca4557b7e3b
edaa267b0fee484542fbe9cbf62161c1
Get mail chimp unique id
class MailChimpListMember extends MailChimpEntity public function getMailChimpId(): ?string { return $this->mailChimpId; }
1