query_id
string
corpus_id
string
query
string
code
string
label
int64
5687cbb1fa3e5af8c3bc5f9258c14eaa
8696cbd95d713386e0176e8acbb01874
Gibt den Text der Notiz eines Schülers zurück. Wenn keine Notiz vorhanden ist, dann wird ein leerer String zurückgegeben
if (textOfNote != null){ return textOfNote; }else{ return "Error"; } }
0
7c015ae45874502581744b07b0971be4
16af1ba4ff6d242d539017d93cf914e3
返回评论类列表,存储结构list_comments[评论对象]
res = [] conn = connect() c = conn.cursor() sql = "SELECT ID,NAME,COMMENT,TIME FROM COMMENTS ORDER BY ID DESC;" result = c.execute(sql).fetchall() for c in result: res.append({'name':c[1],'comment':c[2], 'time':c[3]}) return res
1
1d89c1443a3132f43baf64c4d538c892
17cf192065bdfd6cfbd1427789b48d9f
Sets the default parameters for the shield.
{ Damage = 100; Lifetime = 2000.0f; AttackDirection = direction; }
0
e38ac62866afd78cc4e6945dc1f5656a
de8af247fb0078f9d9162487a9a5aff8
Counts the number of pipes being used.
int numberofpred = 0; Pipes pipes; for (int i = 0; i < size(); i++) { pipes = (Pipes) elementAt(i); if (nodes.nodes.equalsIgnoreCase(pipes.nodes_end)) { numberofpred++; } } return numberofpred; }
0
e9c1c027fd2045fef70b42cd35050ee2
9375771897c2920824365036745d233b
Gets information about football matches, returns list with: date, home team, away team and score
class Score: def get_match_list(self): url = "http://crm.wherrelz.com/api/cricket/" link_file = self.url_opener(url) data = json.loads(link_file.read()) return data['data']
0
c8b84e816a91cda9a80192b891495af6
fe09397c2f170c63504aef466151cfe7
Hàm đổi số thành chữ
{ string chuoi = ""; Int64 chuc = Convert.ToInt64(Math.Floor((double)(so / 10))); Int64 donvi = (Int64)so % 10; if (chuc > 1) { chuoi = " " + mNumText[chuc] + " mươi"; if (donvi == 1) { ...
1
078a93cc5f8183ec019516b44cc8037f
8db201f09915c01f1497d5bd6b58a8be
Valida la longitud de caracteres
function validarLongitudMax(cadena, longitud) { var value = $("#" + cadena).val(); if (value.trim().length > parseInt(longitud)) { $("#" + cadena).offset().top; $("#" + cadena).focus(); $("#" + cadena).css({'border-color': 'red'}); return true; } else { $("#" + cadena...
1
b4466bc686c7d869a4d107d05a4df416
b7ffc8aaabe4a9f0177460777d66945d
TestSimpleAccountClose verifies that the accounting state is set correctly for an account being closed.
state := GetAccounting() state.AddTransaction(test.CloseMainToBC) senderBalance, _ := getSenderAmounts(test.CloseMainToBCStxn) assertUpdates(t, state.AlgoUpdates[test.AccountA], true, senderBalance, 0) closeBalance, closeRewards := getCloseAmounts(test.CloseMainToBCStxn) assertUpdates(t, state.AlgoUpdates[test.Cl...
1
9f3512b22a6d87973c741e0f97001d6e
02e43c3443263d03c9adc86063b97358
Cette méthode permet d'effectuer les paiements disponibles sur une facture
$res = self::$monPdo->prepare('exec SP_FICHE_FRAIS :idVisiteur, :mois, :montantValide'); $res->bindParam(':idVisiteur', $idVisiteur, PDO::PARAM_STR); $res->bindParam(':mois', $mois, PDO::PARAM_STR); $res->bindParam(':montantValide', $montantValide, PDO::PARAM_INT); $res->execute(...
0
30c3d78997af0fff3b9ba2315fd2f3e1
a0fce1a1f6c08cf8c17baa8ea84309e3
打开指定UI 并关闭其它UI
namespace UIFramework public class UIManager : Singleton<UIManager> public void PopAllThenOpen(string uiName, params object[] args) { PopAllThenOpen(UIType.Normal, uiName, args); }
1
e4796295814a070fcef444cb228b2709
a2f60cd97c8a4c2c2af3cb2c395b3dd8
Find the parent of the specified node address. This will be the node addressed by all but the final index in the full node address.
def get_parent(addrx): addri = to_internal_repr(addrx) addri = _get_parent(addri) return to_external_addr(addri)
1
401e83bc6f554529db81237c2a195d83
84a5b640c77de1dceb61f331c1e5a1c1
додавання нової стрічки з консолі і перевірка чи продовжувати вводити дані чи ні
class Assistant: def new_matrix_get_rows(self): self.prompt = _("Add matrix line") % self.total_nb_cols while True: done = False command = self.user_input() if row := re.findall(re_fract, command): done = self.new_matrix_add_row(row) if...
1
9a807fd161b20c9c7be3c0ddd156978b
ff0825a84819d49ea99d8399e26a27ca
Wird gerufen, wenn es eine Änderung beim aktiven PivotItem gibt. Wird hier genutzt um die Anzeige der AppBarButtons zu steuern.
{ if (e.AddedItems[0].Equals(ExplorePivotItem)) { ApplicationBar.IsVisible = false; Task.Run(() => ViewModelLocator.ExploreViewModel.LoadData()); } else if (e.AddedItems[0].Equals(GoalsPivotItem)) { Appli...
1
8928d7dcc9b4809b0cd2bc99580825be
76ec40977b379bb1bc7b47be3962faea
Converts a number spelled out in English into an integer number : a spelled out number (e.g. forty two, one hundred,etc.) returns : numeric representation of the written number
def stringtonum(string): s= string.lower() n= ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty", "twenty-one", "twenty-two", "twenty-three...
0
37cfbf81e388647b82fb11ccb7cba1ef
9b143e33e8fb7cb288ddea5b4b05e796
返回text对应的label_id以及label_name
def get_imgPath_label(txt_path): if os.path.exists(txt_path): print("Txt file exists, creating img and label list ...") with open(txt_path) as f: img_path_list = [] label_list = [] for line in f.readlines(): img_path = line.split("|||")[0] ...
0
c0625c85b9c868763948390f5258d0ef
004abf7d16812941b363010747100c3b
Reset the stuck-checker.
void CCSBot::ResetStuckMonitor( void ) { if (m_isStuck) { if (IsLocalPlayerWatchingMe() && cv_bot_debug.GetBool() && UTIL_GetListenServerHost()) { } } m_isStuck = false; m_stuckTimestamp = 0.0f; m_stuckJumpTimer.Invalidate(); m_avgVelIndex = 0; m_avgVelCount = 0; m_areaEnteredTimestamp = gpGlobals->time;...
1
07772e97a2056f38897d25c82cc247bc
9a122ce1bf6853a470e7b5c321d4a758
Returns a decrypted message using the GGH encryption algorithm.
def decrypt_message(encrypted_message): return config.chat_key.decrypt(encrypted_message)
0
b9451e64c5bfaabfa5dba4e39dc1fbc0
8470aed7045199782ac9b367d4dd1bc4
同步商机专线信息到专线表
public int updateLineToNewBusiness(String lineBaseId, String businessId) { super.finit("line_base_info"); sql = " UPDATE line_base_info SET businessId = '" + businessId + "' WHERE lineBaseId = '" + lineBaseId + "'"; return tableDao.executeSQL(sql); }
0
ece768f80abb8d118f0d57b4d37cbebe
b6ef78cfc2bca622c60ca321f8cb7076
Builds and pushes Docker image to AWS ECR.
namespace Antling.Common Task<string> Build(DockerImageSpecification spec, string tag);
0
99215a379e7d5c44f94ad1d98b4148a0
e05c993b82c01b6009c1e39cd11cc886
Prints the node as well as information about the balance factor.
void BSTree::print_node(node *n, string label) { if (label != "") { cout << "[" << label << "]"; } cout << "[[" << n << "][" << n->data << "]]\n"; if (n->left) { cout << "\t|-->[L][[" << n->left << "][" << n->left->data << "]]\n"; } else { cout << "\t\\-->[L][null]\n"; } if (n->right) { cout << "\t\...
0
65eb955cadcaa7a5bdc5ab00f52cf32c
278fde3926e400797450623713d4d2bd
判断是否有障碍物--横向
for(var i=0;i<4;i++){ for(var j=1; j<4; j++){ if(board[i][j]!=0){ if(board[i][j-1]==0||board[i][j-1]==board[i][j]){ return true; } } } } return false; }
0
9749fe562738959ef33b142c330959d3
bb03484f044dadea6203f8bfa3e2aec1
Fetch the network object from specified network name
network = self.get_obj(vimtype=vim.Network, name=network_name) if not network: raise NotFoundError return network
1
384fab4a730dd9819dfe3d998a0a1879
023463361217ad5e8d42e538416fc0bb
英語の単語の日本語読みを取得する
if(lang % 2 == 1) return jpn; else return eng; }
0
43958a202a3790b5761158538a686457
b4912025c8e129633d9ef1fcf5ef80ca
drawing up to six cards for both players
{ srand(time(NULL)); int deck_drawn[6] = {0, 0, 0, 0, 0, 0}; int cards[6] = {0, 0, 0, 0, 0, 0}; for (int i = 0; i < 6; i++) { deck_drawn[i] = draw_card(deck_drawn); cards[i] = (deck_drawn[i] % 13) + 1; } int player_score = 0; player_score = tally_score(player_score, score...
1
ae8f4710241f29c04eed4946eeb248e7
1405db9a0e8afc2194040d93833af2e8
Converts a feature set to a data view.
{ DataView dataView = new DataView(); try { dataView.Session = this.Session; dataView.Expression = expression; dataView.IsReadOnly = isReadOnly; dataView.MasterSource = DataSource; dataView.MasterKeyNames = masterKeyNames; dataView.DetailKeyNames = detailKeyNames; dataView.Open(in...
1
b90ac175874f15460f6cb23296d15646
f770fb289a1d3320d62aca0cb04160ef
Return a function computing the twiddle factors.
omegas, ts, c0 = params twosite_ops = [ts[i] * ( np.kron(bs[i], b_daggers[i + 1]) + np.kron(b_daggers[i], bs[i + 1])) for i in range(len(bs) - 1)] twosite_ops = [c0 * np.kron(a, bs[0] + b_daggers[0])] + twosite_ops return twosite_ops
0
76b3015ba741dee39d703592c5db8aaf
7ef234336ccb61c265654a86272840eb
Request entity and it's children be deleted from the FMEA.
void deleteEntites(String givenQuery, Map<String, String> queryParameters);
1
f9179059358c53676433e940163b1eb2
95d3ef2b84c6b66db604b28926bef371
Initialize UI resources and application specific data. The application's permanent data and context can be obtained from the appRegistry. If this method is successful, return true; otherwise, return false. If this method returns false, the application will be terminated.
namespace BassClefStudio.AppModel.Lifecycle bool Initialize();
1
6a6e3dbccdc68230279acdcd54dd518b
8395e673d0940bcc84647919323587a7
Function to extract version information from URI
const regexMatchType = URI.match( /(.*?)([a-z0-9._-]+)\/(\d[^/]*)\/([a-z0-9._-]+)$/, ) const protocol = URI.match(/.*?[a-z0-9._-]+\/\d[^/]*/) console.log(regexMatchType, protocol) if (regexMatchType && protocol) { const matchedType = { docURI: regexMatchType[1], protocolN...
1
89d72cd5d827da0cae779a830efa5c52
fc2215f83844d5fb4c45965a7fc54cbb
This function updates the LFR registers with the incoming normal parameters.
inline void send_fg_param(int slot, int fg_base, unsigned short cntrl_reg, signed int* setvalue) { struct param_set pset; int fg_num; unsigned short cntrl_reg_wr; int status; short blk_data[6]; fg_num = (cntrl_reg & 0x3f0) >> 4; if (cbRead(&fg_buffer[0], &fg_regs[0], fg_num, &pset)) { cntrl_reg_wr = ...
1
37661d0294f4a6710f3f019b411007d2
b61b9bad52695e31cfbd60a60de1cd8b
Listar todas as presenças do BD
namespace gufi.webAPI.Interfaces List<Presenca> ListarMinhas(int id);
0
e5cb62370b14fd1f13b298b01e768ce4
50d8c3c2d25b1759725ef6c91516f66f
Update BlockVote Year information
$dbt = $updater->getDB()->getType(); $file = __DIR__ . "/vote.$dbt"; if ( file_exists( $file ) ) { $updater->addExtensionUpdate( array( 'addTable', 'Vote', $file, true ) ); } else { throw new MWException( "VoteNY does not support $dbt." ); } return true; }
0
592d32d587851b13547fcf8f2c0c74d3
3586b954b9436002537cabb110164b95
Get the current TypeC state.
CompletableFuture<CurrentHeatingCoolingStateEnum> getCurrentState();
0
f52f3abff82a19f53e074026f014b1df
8c5bc1ec301a41d1321ee7f507580799
Phuong thuc in ra danh sach khach hang
namespace BUS public class BUS_KhachHang public DataTable layDanhSachKhachHang() { return DAL_KhachHang.layDanhSachKhachHang(); }
0
4129898a13a896b22496dfe1bf9f59e1
066158238efe8cf2d81c44d50b39112f
Wybiera nieprzeczytane elementy z listy kanałów.
class MainView(QMainWindow): def remove_channels(self): try: self._ui.excluded_listWidget.addItem(self._ui.included_listWidget.currentItem().text()) self._ui.included_listWidget.takeItem(self._ui.included_listWidget.currentRow()) except Exception: print('Select a Chan...
0
0a21e12a0cbc54eec2e3d605d7fc677b
b58506a49e2013b9dd86760b88a75ff1
Display the dialog at the specified location.
public class JAPDialog implements Accessible, WindowConstants, RootPaneContainer, MenuContainer, ImageObserver, IDialogOptions public final void setLocation(int x, int y) { m_bLocationSetManually = true; m_internalDialog.setLocation(x, y); }
1
bd00c2a1ad1a25be68917c50fe05b79f
f0f4635177eb4f30c70d1d2a6eebf597
Generates a <a href="http://mathworld.wolfram.com/BullGraph.html">Bull Graph</a>. The bull graph is a simple graph on 5 nodes and 5 edges whose name derives from its resemblance to a schematic illustration of a bull or ram the result will be a disconnected graph since generated elements will not be connected to existin...
Graph graph = new Graph(); Graph.Vertex v0 = graph.new Vertex("v0"); Graph.Vertex v1 = graph.new Vertex("v1"); Graph.Vertex v2 = graph.new Vertex("v2"); Graph.Vertex v3 = graph.new Vertex("v3"); Graph.Vertex v4 = graph.new Vertex("v4"); Graph.Vertex v5 = graph.new...
0
a55a1d9354effa04b88dcba5f1fad8b9
48028050a3e750877ac9e7ba6ba36f74
Removes all users from the room and nullifies all objects.
{ _userRoom = null; UsersByUserName.Clear(); UsersByUserName = null; UsersByUserId.Clear(); UsersByUserId = null; OnUserEnter = null; _pets.Clear(); _bots.Clear(); _pets = null; _bots = null; ...
1
88cd4145d918b7b726229dc927ae95b7
f7b06fb811a0b1256309c0a961f38230
Funkce pro vypis chyboveho hlaseni.
void osetri_chybu_nekriticka(const char *popis_chyby, int hodnota_porovnaj, int chybova_hodnota) { if (hodnota_porovnaj == chybova_hodnota) { printf(CHYBA_NEKRITICKA_FIALOVA); perror(popis_chyby); printf(KONIEC_FORMATOVANIA); } }
1
d89557ec4e45796b87c7b319cbe59863
134e01ad7f900cc94784f82b34f06d14
updates all students' teacher id when teachers are no longer in database
public void delMore(String ids) { Query query = getSession().createQuery("FROM Video " + "WHERE teacher_id IN (" + ids + ")"); List<Video> videoList = query.getResultList(); for (Video video : videoList) { video.setTeacherId(null); video.setTeacher(nul...
0
c65168db6de256a4893af393e653135c
224b8b557779a744259fa0c0e3636f7f
Should transformations be applied in the predict method? predict() method, false otherwise
st = opinf.pre.SnapshotTransformer() st.center = False st.scaling = None assert st._is_trained() is False st.n = 100 assert st._is_trained() is True st.center = True assert st._is_trained() is False st.mean_ = np.array([1, 2, 3]) assert st....
0
8094659828e91d01457cdfe14f857c02
8a5d245a0465411a6bc61f3c52de61a1
Return the contents of the literal, in Python3 form.
class Literal(PyccelAstNode): def python_value(self):
1
c320d00402de5a5db76e3a22dd2a1110
3a4d3bfbb3518f2024b763de90a2219d
Expecting a 2D vector with constant 1
TEST_F(ParticleGridInterp_Test, grid2x2_test1) { vector<vec2> positions = { vec2(0.5f,0.5f) }; vector<float32> attributes = { 1.0f }; interpParticlesToGrid( grid2x2, weights2x2, positions, attributes, linear, kCellLength ); EXPECT_NEAR(grid2x2(0,0), 1.0f, epsilon); EXPECT_NEAR(grid2x2(1,0), 1.0f, epsilon); EX...
1
c73001185a5ea94fd09d8d03de5d3003
069807287dc05f3e12a6e78191bae3ed
Edit contact with double click from any cell
namespace Assignment_2 public partial class Form1 : Form private void listBoxContent_MouseDoubleClick(object sender, MouseEventArgs e) { getDetailsFromALine(); txtBxRowsCurrent.Text = Convert.ToString(listBoxContent.SelectedIndex + 1); if (listItems.Count > 0 ) ...
1
fece52d448f9e096095b228fc81ded8c
4857a58b1b2d2c658cb0703f14add855
Imposta e salva nelle preferences se le eccezioni vanno salvate nel log
class ReportLog private static function saveException() { if (Connection::useDB()) { self::saveInDB(); } else { self::saveInFile(); } }
0
764dd89ebb220536c2fe02210ce65975
2dc9ca4ff8aaa7927b0158b416197548
Test the logger error handling exception hook
{ $exception = new LoggableException('test'); Registry::exception_handler(new BaseException('test2')); $exceptions = Registry::get_exception_log(); $this->assertTrue(count($exceptions) === 3, '$exceptions count must equal 3'); $this->assertTrue($exception === $exceptions[0],...
1
7dc24ef85327f864c6a02483cc351847
e49b1de6d7120ec9d2309be0f84864b2
@brief 微秒级延时
static void stm32_udelay(rt_uint32_t us) { rt_uint32_t ticks; rt_uint32_t told, tnow, tcnt = 0; rt_uint32_t reload = SysTick->LOAD; ticks = us * reload / (1000000 / RT_TICK_PER_SECOND); told = SysTick->VAL; while (1) { tnow = SysTick->VAL; if (tnow != told) { ...
1
9b5379ff7a87e8f13d83ebc9ef243d2c
9ed95733fecd9940a6e605e9ded6be14
对词语str增加左侧信息词left
public class PoiWordParagraphTool public static void setLeftInd(XWPFParagraph paragraph, double leftChars) { setInd(paragraph, leftChars, -1, -1, -1); }
0
e9369ba25c4f0aa0ae357d0f9ffd9a27
e9ea6cba2c1752d824a22aea2a54f1ef
Robot init function Runs after all OS setup. Sets up global variables for all the mechanisms, then spawns all the worker threads.
wb_robot_init(); emitter = wb_robot_get_device("emitter"); if (emitter == 0) printf("missing emitter\n"); char rob[7] = "epuck0"; for (int i=0; i<FLOCK_SIZE; i++) { sprintf(rob,"epuck%d",i+offset); robs[i] = wb_supervisor_node_get_from_def(rob); robs_trans[i] = wb_supervisor_...
0
e15cdd4bb340af1cdee78fc9f4dcc4c2
0e85dff70ef9d32938d18c60eeac728c
提出问题表单显示
{ $courses = Courses::lists('course_name','id'); $tags = Tags::lists('name','name')->toArray(); return view('Question.ask',compact(['courses','tags'])); }
1
3860834edc8ecd0f66b00f5044ea8dee
7fc89fafc6c7eb2b59170062d72e6815
绘制 y 轴
protected void drawAxisY(Canvas canvas, Paint paint) { canvas.drawLine(originX, originY, originX, originY - height, paint); }
1
eb78da497897066886c8f9270461cb48
00f375206ceebbb8e5d6f18252466e1d
选中THDH复选框时运行的操作
{ gvItemDaan.ClearSelection(); if (gvItemHospital.SelectedRows.Count <= 0) return; VDAListests _listtest = gvItemHospital.SelectedRows[0].DataBoundItem as VDAListests; if (!_listtest.IsSelect) { return; } List<DADicttestitem> _list = dicttestitemBll.Se...
0
24ecf8bdb54b89f4344f899ff9dd431e
cfb595bda76982ca9216b73c1b9982c7
Returns size of a primitive type in bits.
switch (format) { case boolean: case char1b: return 1; case uint2b: case sint2b: return 2; case uint4b: case sint4b: case float4b: return 4; case sint8b: case float8b: return 8; } return 0...
1
ea6d1bae8fa1c60963ac8af9ba5cb10d
4a4e3dc5197afcc88c30b74120a91528
Demo insertion sort.
func insertionSort(sortObj []int) { if len(sortObj) < 1 { return } for n := 1; n < len(sortObj); n = n + 1 { value := sortObj[n] m := n - 1 insertPlace := 0 for ; m >= 0; m-- { if value < sortObj[m] { sortObj[m+1] = sortObj[m] } else { insertPlace = m + 1 break } } sortObj[insertPl...
1
41b599ada1cd7d2992fd075242826912
f4d18645ae224cf8ad71882fde9b5ab6
This method will adjust the duty cycle for the given GPIO pin.
class Output(object): def set(self, desired_cycle): desired_cycle = min(self.max_value, max(desired_cycle, self.min_value)) self.pwm_pin.ChangeDutyCycle(desired_cycle)
1
2547e891287f49ffcdc1a3b14f94176c
197872b313fc548a0a75ffd53642c704
Returns the meta object for class '{@link wcore.UnaryExpression <em>Unary Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getUnaryIntegerExpression();
0
fc364ca5f0c400d521ec32675f808e0f
0183d8fe96fcf2f50314600ef8cf3a12
Fetches a story given a profile ID, a topic ID and story ID.
public class StoryDAO extends HttpTrackerDAO public Story getStory(int projectId, int storyId) throws TrackerException { HttpRequest request = new HttpGetDataRequest(getUserToken(), createURI(PROJECTS_PATH, projectId, STORIES_PATH, storyId)); return (Story) getTrackerEntity(request); ...
0
46a48da277e8e0dda887d6bdff7e2af1
9c8c8aa15b06165b72a634a2e01c5b72
Metodo que almacena la informacion contenida en una lista enlazada en una archivo XML
public class ManejoXML public void guardarJugadasComplejas(ArrayList<JugadaCompleja> jugadasComplejas) { try { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); Element rootElemen...
1
4457e7e8f20afeca634a4dde10e7004a
2b0f0ae148a74ce219db15b4ed1aa323
Изменяет имя файла второго изображения товара в базе данных
$url = $_REQUEST['url']; $validator = Validator::make(array('url' => $url, 'id'=>$id), ['url'=>'alpha_num_rus', 'id'=>'integer']); if ($validator->fails()) { return response()->json(array('success' => false, 'message' => $validator->messages()),400); } $obj = Object::...
0
f6f7ed81e9b8c49152a5776d5562987e
49d3cc7a6820decda53be8cd5d7aaaad
获取指定Properties文件中key的int值,获取失败则返回默认值
int value = defaultValue; if (props.containsKey(key)){ value = CastUtil.castInt(props.getProperty(key)); } return value; }
1
b3fe1f3b7d5553f8f4e566f8b5215724
60be77a500db3b6153ac3ba91c79455b
Builds a ripple-down manner rule learner.
class RulesStar(_RuleLearner): def __init__(self, preprocessors=None, base_rules=None, m=2, evc=True, max_rule_length=5, min_covered_examples=1, width=100, default_alpha=1.0, parent_alpha=1.0, add_sub_rules=False, target_class=None, target_instances=None, classifier=CN...
1
3b9f06afc3ede91144a8a4c5428aba64
9c40dde6f227eea4874244090445a1ad
Arme le timer avec un délai d'une seconde
void Fenetre::start_timer() { timer_carte->setInterval(1000); timer_carte->setSingleShot(false); timer_carte->start(); connect(timer_carte, SIGNAL(timeout()), this, SLOT(poll_card())); }
1
91ec5cc7523d0e4fcb6164d0f7e62a6a
f24cbe3e722f15b5793c9a5590e95a31
Delete multiple leave requests.
class LeaverequestController extends Controller public function destroy($id) { }
0
73994e844252ac8424884dc4fd7aca6d
b19d6ec84d309be01927c33b2cf2dcb8
Create ID to ID mapping from OCR (key) to PMC (value) In the result, OCR ids (as keys) will always be single IDs, but PMC ids (as values) can be lists (Case 2)
id_dict = defaultdict(list) with open(output, encoding="utf-8") as f: for line in f: tab = line.strip().split("\t") key = tab.pop(0) for elem in tab: id_dict[key].append(elem) return id_dict
1
7ce64e384dcf30338f77dedcd7e1fef4
58907c04a1072e297ec2ae4ee615e783
If the browser is not supported, the default message will be replaced with this text. Defaults to "Your browser does not support drag'n'drop file uploads."
class ImageUploader extends BaseControl{ function getMessageServerNotFoundText() { return $this->_messageServerNotFoundText; }
0
b42cf0c3613182e20c22c0cabf731964
e6b7f0017aef370aaa5f3060982c1521
Converts a string to a callable object. Courtesy: http://stackoverflow.com/questions/452969/does-python-have-an-equivalent-to-java-class-forname/452981#452981
class_data = full_class_string.split(".") module_str = class_data[0] class_str = class_data[-1] submodules_list = [] if len(class_data) > 2: submodules_list = class_data[1:-1] f, filename, description = imp.find_module(module_str) module = imp.load_module(module_str, f, filename, des...
1
4fd4cac63eea917273c5fdd44faeaf54
d6657be198ca6a2db6a694ca040a31af
Perform the Reference not unique and incorrect balance validation on the provided statement records
public void validateStatement(ConstantAction constantAction) throws StandardException;
0
859e9021a3e0375f81c42d4053c652e9
02300011c70dd133f76592b2081cafa0
Returns generator and critic of WGAN-GP.
optimizer_gen = torch.optim.Adam(self.generator.parameters(), lr=self.lr, betas=(0.5, 0.999)) optimizer_disc = torch.optim.Adam(self.discriminator.parameters(), lr=self.lr, betas=(0.5, 0.999)) return [optimizer_gen, optimizer_disc], []
0
48457f3d1a7e07402ceba219a96e862e
8ad785c21a118a3d76a08611829e8c0a
Return a 3D NumPy array (nband x nimage x ncol) of one row's data
class Spectrometer: def get_spectra(self, row): width = self.image.size[0] red = [0]*width green = [0]*width blue = [0]*width average = [0]*width pixels = self.image.load() for j in range(width): red[j] = pixels[j,row][0] green[j] = pixels[j,row][1] blue[j]= pixels[j,row][2] average[j] = (re...
0
71757aa55e2180fe4f06d1d46899a9de
5e6fd42e5bbefa229506751793540778
This is to test whether number prefix is already there as part of a previous run of the same script
namespace GraphicsTestFramework public class Global_Controller : MonoBehaviour public void SetPrefixData(string input) { currentPrefix = input; }
0
21a603849fd02caf819506fb0e794e2b
eab85f8c86a5fa00ad930b04038d11c8
Get maximum user download rate in bytes/sec. Zero or less means no limit.
EXPORT_C TInt CMmsSettings::MaxDownloadSize( ) const { return iMaxDownloadSize; }
0
0dfb4889b64ac4eb1005af70ce10bcd7
f638d718cd4827458f3f50d0f9e70d81
Return the matching blueprint for a utility building
{ return new Models.Blueprint { Id = context.Mapper.Map<BlueprintId, string>(source?.IBlueprintLibraryCAbsoluteBlueprintId ?.BlueprintId), BlueprintSet = context.Mapper.Map<BlueprintSetId, BlueprintSet>(source?.IBlue...
0
57597ca74f02b7f0cfa8f7419e552d78
00f13addb1c1a02850e70c6f50f7d41c
通过课程号得到课程的助教
namespace RetechWing.BusinessCommon.CourseInterface List<SysUser> GetCourseTeacherByCourseId(int courseId);
0
45c6b8ac7ad5cde20828db9620f90b0f
0b8101260b0b2429e84d1ea280eaae89
Transmit a notification via SNS
_sns_topic = SNS_CLIENT.create_topic(Name=topic) _arn = _sns_topic['TopicArn'] return SNS_CLIENT.publish( TopicArn=_arn, Message=json.dumps(message))
1
68300b599b5d3340d44e427e5614b9b2
49aaf641ff2cc993686b2150adbb3530
添加游记回复
$data = $_POST; $data['u_id']=$this->userId; $data['time'] = $this->time; $d_id = $data['d_id']; $diary = M('diary'); $result = $diary->where("id=$d_id")->find(); $p_id = $result['u_id']; $model = M('d_replay'); if($model->add($data)){ ...
1
c449060ed77216b07cb94e61947237d8
1c0df3bf8a42a3c2837c15ab63dbccc5
Gets all custom data items for the library.
let path = UrlJoin("qlibs", libraryId, "q"); let queryParams = { filter: [] }; if(filterOptions.cacheId) { queryParams.cache_id = filterOptions.cacheId; } if(filterOptions.start) { queryParams.start = filterOptions.start; } if(filterOptions.limit) { queryParams.li...
1
96dfb4ccd2b225ad2eab060972fe1637
7dbf7e2d5494e5fcc2122c5611c5306b
Does a good file pass the check?
const good_items = this._meta.itemTypes; return fileData.items.every(item => good_items.indexOf(item) > -1); }
1
16620dcf58a389a96b5d3e672d913b89
fe86b842a1bf3d90539282285094e9ab
根据键值对字典查询完全符合条件的唯一mProAtt对象
public List<AloneDictionaryEntity> findEntityByKey(String key, String exId);
0
9149ad5249e73fd5ebee6eec63077efa
9b46ab363fa409d3d99c378752c426cf
Initiates a drawing panel of proper size.
drawPanel = new DrawPanel(); add(drawPanel, BorderLayout.CENTER); drawPanel.setSize(640, 640); drawPanel.setVisible(false); }
1
4fdd5e319901a2fc96a60138a94d384e
94488be7857228893da939764a508174
获得周K图的方法 会返回2014年到2016年这三年内的周K数据
class KLineWeekEngine: ## 存放股票基本数据的字典 def __getKLineWeekDatas( self, stockCode, startDate, endDate ): return KLineWeekAPI().getKLineWeekDatas( stockCode, startDate, endDate )
1
c1f7efb25a99f687a212155cd6b1dfca
9e4a97bab93fb1db41ac345d7b5437dc
Returns the random damage done from this round
function GetDamage(a){ return(Math.floor(a*(1+Math.random()))); }
1
0815af3292f16d75f95569c9b91f0416
a5610489b5fc5ce0a625575330b355c9
Test for when there are no albums in the database to return
tested, mockedSongCollection, mockedCache = song_service data, count = tested.getList(10, 20) assert [] == data assert 0 == count
1
a8996278a658bcc65874519958d57604
f79f6d73088c8bde5c8ecd961922f5a3
生成查询结果列表
int startPos, int maxResult, List<? extends Object> paramlist) { if (startPos < 0) { startPos = 0; } QueryTimer timer = new QueryTimer(classType); SQLQuery query = sessionFactory.getCurrentSession().createSQLQuery(sql); ...
1
c4a56543255e7db91fd3ab1b7d3eff77
8869792a6bf0d624cf1df30f731d800f
購入タイミングが訪れた商品を購入する
{ $xyz = $this->getProvider()->getCoordinate($tapBlock); $data = $this->getProvider()->getShopData($xyz); if ($data == false) { $player->sendMessage("§cデータがありません"); return; } $price = $data["PRICE"]; if ($this->hasEnoughMoney($player, $price)) ...
1
5b639523e83f38a01068d4f382f67624
45298c973256fb9572d947c8d9fce119
Function for submitting an company opportunity to be edited in the backend.
class opportunitiesIdGet(AuditableMixin,mixins.RetrieveModelMixin, mixins.UpdateModelMixin, generics.GenericAPIView): def put(self, request, *args, **kwargs): return self.update(request, *args, **kwargs)
1
5434379531d716c82424726055c8d3f6
2b38bf38b958ae30d8217c7124cc3dbc
Gets the value of the frameNumber property. possible object is {@link Long }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "senderName", "mailPiece", "numberOfMailPieces" }) @XmlRootElement(name = "Root") public class Root public Short getSequenceNumber() { return sequenceNumber; }
0
9bf8fd14a4eb1449f866074f2df14f53
67ded63e12f42e2474492a6c9dfa744b
Test de l'agalité de deux arcs
namespace Sudoku_Graphic public class GraphArc public bool IsDuplicata(GraphArc arc2) { return IsCellIn(arc2.node1.Cell) && IsCellIn(arc2.node2.Cell); }
1
9585993e799119423fb54f1cc857167b
7407d314fdc26cc3e8ae65be28861996
Metoda za instanciranje elemenata alatne trake
namespace EngineDesigner.Machine [TypeConverter(typeof(CrankThrowConverter))] [DataContract] [Serializable] //mora bit, ker uporabljam binary serializer za copy object public class CrankThrow : IPart public static CrankThrow FromParameters(double _crankRotationRadius_mm, double _balancerMass_g, doubl...
0
f5eef65fb395d481c872ec54b6a13d1b
6175fc29b11b9811a51546a063323071
Returns virtual memory usage.
function memory_get_usage() { return 0; }
0
270d3a31d160957b537289d380a2c384
30e4681c61a8b8b98325be916ec82c26
Sets the ngay tao of this dan toc.
public void setNgayduahoso(Date ngayduahoso);
0
ef21ba040e0d2d5148f01452285aa753
0fe9ca184b412733ce5025e8677189af
Performs a single sonar reading, returning a measure of the distance to the nearest object in centimeters. The function will wait after the reading has been performed for long enough that it is safe to immediately start another reading.
function ultrasonic(unit: SonarUnit, maxCmDistance = 500): number { pins.setPull(DigitalPin.P8, PinPullMode.PullNone); pins.digitalWritePin(DigitalPin.P8, 0); control.waitMicros(2); pins.digitalWritePin(DigitalPin.P8, 1); control.waitMicros(10); pins.digitalWritePin(Digit...
1
35bfcc743de1db0b5c84688300f0f037
a416a8ff9799cb7758eddb2f7bf95424
Retrieve a new bag containing items in both the bag receiving the call to the method and the bag that is the method’s argument
public BagInterface<T> union(BagInterface<T> bag2);
1
b72e4d868436fef7bd0672050547a9f1
393b95432936a0d7124f8b3205f1018a
# Evaluates key detection accuracy with user adaptation.
{ noc <- ncol(xtest) predic <- matrix(0, nrow(xtest), noc) for (j in 1:noc) { xvalues <- xlearn model <- rpart(ylearn ~ ., data = data.frame(xvalues)) xvalues <- xtest predic[,j] <- predict(model, newdata = data.frame(xvalues)) } final <- row...
0
0cb985b4b26cb41a350e6130a5cf1c52
3fed9ffa99f2bd4ba4a761de22593ef2
Retorna as propriedades da classe que deverão ser consultadas de acordo com o filtro passado como parâmetro
class ResourceDecorator getFilterProperties() { if (this.options.filterProperties && this.options.filterProperties.length) { return this.options.filterProperties.map(key => this.properties[key]) } return Object.keys(this.properties) .filter(key => this.properties[key].isVisible('filter')) ...
1
a8d81743a00d669b82422139adc4e905
362d82bdbb007d9f758228993f38fa80
Runs the update query and fetches the generated keys
public Object executeUpdateGeneratedKey(String sql, Object... params);
1
1b0335d4daa01723bf86dca6a43164b7
5e4834e8c786d2a8a41af7e5e349715a
Sets the `REUSEPORT` option.
result_t pal_sock_set_reuseport (pal_sock_handle_t sock, s_int32_t state) { #ifdef SO_REUSEPORT return setsockopt (sock, SOL_SOCKET, SO_REUSEPORT, &state, sizeof (state)); #else errno = EINVAL; return PAL_SOCK_ERROR; #endif }
1
48e6aa3d9e65247640cfb72bb199456e
0e7244a6854fde07a0f37b686f9532a9
Starts the actor model.
class Actor: def __init__(self, model): self.model = model
0
17e6e4f523e7c46be3fca37bc5e42225
f7bf2da540b3571b38a9bd35b7b47e5d
읽기 작업을 큐에 대기 시킵니다.
void ReaderWriterMutex::readRequest() { std::lock_guard<std::mutex> guard(_mRequest); while (!_qWriters.empty()); ++_nReaders; }
0
c49923caffe77aeb4f17116b9f8b6653
cfc990dee8add9262e161fb2157b41c9
leaving only those without significant inconsistency in reporting
class ConcatenateMiso(object): def __init__(self, directory='./', miso_subdirectory="miso", downsampled=False): def remove_inconsistent(x, thresh=0.8): size = x.groupby('iteration').size() return x.groupby('iteration').filter( lambda y: len(y) > (thresh * size.mea...
1
68ee0fcaaced1fb83d31595143744cf2
435e0a5a16bfe86182a4afa76069c689
Load the script required for video player.
var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); }
1