query_id
string
corpus_id
string
query
string
code
string
label
int64
6120a034e06f518fa65b784b8c915909
cfe6ec559d6b7c4728d0ecd2fde56810
get full dependency file path (dir + file name)
class Functionality_File public function get_full_path() { return $this->get_base_location() . $this->get_file(); }
1
9cf82ba02e6b58f470d553ad65d23bbb
d68725f581344a93272fd460c8482929
Returns true if a record exists in a linking table for the pair of records.
boolean contains(K1 primaryKey, K2 secondaryKey);
1
4e2ca9a310248e38fc958faaa71f59e4
98fc3f52458ab7cdb543cac7183ab580
@brief Metodó para detener la ejecución del lector de C!
void Inspector::detener() { this->stop(); this->interruptSleep(); }
1
de79bc1ee237ca33f4f7faf17fdd52d2
e55918c7c53cecd020f2f2988f038f17
往8个方向搜索
class Map public travel8Neighbours(x:number, y:number, f) { var breakLoop = false; for (var i = x - 1; i <= x + 1 && !breakLoop; i++) { for (var j = y - 1; j <= y + 1 && !breakLoop; j++) { if (i < 0 || i >= this.size.w || j < 0 || j >= this.size.h) continu...
1
83a14bf9b7ca8e64df74be4dc61e3fac
738edf419c3623c154c750a26b1c246c
Log |msg| and Toast about it.
public class diffSteaming extends Activity implements View.OnClickListener, Session.Callback, SurfaceHolder.Callback private void logError(final String msg) { final String error = (msg == null) ? "Error unknown" : msg; AlertDialog.Builder builder = new AlertDialog.Builder(diffSteaming.this); bui...
0
bc8fddd09561ef7d96b26f1cd6c41511
2cb7984716068f078ae7267394fc1c13
統計情報を(csv)ファイルに書き込むよ
namespace HSS2.ScanOcr public partial class frmCorrect : Form private void CsvWriteFooter(Entity.saveData SD, StreamWriter deb) { if (Properties.Settings.Default.DEBUG == 1) { deb.WriteLine("出勤日数," + SD.sJituKinmu1.ToString()); deb.WriteLine("昼食回数," + ...
1
e6c4b661ec573291b79ba54c3a6aa23f
ffda377606b074e5e31a4470409a861d
StringToBool returns `true` for a non-blank string and `false` for a blank string.
if IsNull(str) { return true } _, err := strconv.ParseBool(str) return err == nil }
0
5206264f2fa909beb440731ceddb0b5a
8f337ae6e6d8f0ba50c3add48751b3ae
show purchase資料表 on DataGridView
{ MySqlConnection conn = databaseConnection(); DataSet ds = new DataSet(); conn.Open(); MySqlCommand cmd; cmd = conn.CreateCommand(); cmd.CommandText = "SELECT menu,price,datetime,Username FROM saledata WHERE status = '" + "Yes paid" + "' a...
1
95af158611e3c67f1073b1bb81e36a0e
f0a6239e733ca8f55c18ad994a0a70f9
异步发送Http请求(返回Byte[]类型正文)。
using (var content = this.GetContent()) using (var hc = this.GetHttpClient(setup)) { hc.Timeout = TimeSpan.FromSeconds(setup.Timeout); var request = new HttpRequestMessage(this.HttpMethod, url); var handler = ContentHandlers[this.ContentType]; ...
1
f3b5e76d6eb6b8ea812aee6bf85a2d22
495e9b7ab86eae0a92887d8bff04d0c6
Get the drawerID value.
public class NavigationDrawerActivityConfiguration public int getLeftDrawerId() { return leftDrawerId; }
1
1c76d18e7f585162c2b0efd283eb4ea0
98f07468ed1b4b30f443a87977b6cc5f
Inline keyboard with hyperlink to the city web-page
keyboard = [ [ InlineKeyboardButton(TITLES[Piter.CALLBACK_BUTTON_METRO_CHERNISHEVSKAYA], callback_data=Piter.CALLBACK_BUTTON_METRO_CHERNISHEVSKAYA), ], [ InlineKeyboardButton(TITLES[Piter.CALLBACK_BUTTON_METRO_GOSTINIYDVOR], ...
0
e0a0a74289c98590e8349b59f43407b1
8b9ad306fd071f1591e87ffca5dee596
Add job to executor pool.
public function addJob($payload, Array $params);
1
e7a82fd5289cfeed8dba421b4ca41ce5
387f74d9b3a465aae5dc85d22c18ba5b
this static method is used to return a SingleLineofRecord, data come from single line of data file
class LINE int getSingleData(int _assign_pos){ return row_value[_assign_pos]; }
0
5638d83964879e77f566eff2fb9b919c
0491d621c5621077cc0a9f73fcc8a92a
STP timeout function
{ unsigned int i; do{ i = MAIN_Fosc / 13000; while(--i) ; }while(--ms); }
0
6163967b832df4e02ee43070b69ad163
1bb7c96770b3551074e4252e5706e47a
gère uniquement la descente gauche / droite OK
if(filsD == null && filsG != null) { Cle current = c; Cle cFilsG = filsG.getCle(); if(cFilsG.inf(current)) { Cle temp = current; c = cFilsG; filsG.setC(temp); } } if(filsD != null && filsG != null) { Cle current = c; Cle cFilsG = filsG.getCle(); Cle cFilsD = filsD.getCle(); if...
1
9d85b9e876936caedfa4d7057d67a4af
9f9b51e0b0ec5a1c0a8d187aa72511fa
Updates the document at `d_id` with a new document This method replaces the document at d_id with a new document, completely deleting the old document to replace it with the new version. This is not very efficient. See the documentation for :py:meth:`~.Table.insert` for a discussion on what actually counts as a docume...
public class EnhancedJSONTable implements DocumentStore @Override public void replace(@NonNullable Value _id, @NonNullable Document doc) throws StoreException { doNoReturn((DocumentStore t) -> t.replace(_id, doc), mediumDangerous); }
1
a24db356de2af37d029eea2cee19988b
0056153fada289c83b48d4abdc688b62
creates a quiz submissions and adds submitted answer to it
public int createTestQuestionSubmit(TestQuestionSubmit testQuestionSubmit);
1
0bcaee39a0b74dd9af4719a9b9d2929e
c0891fb58e4c1cd007d20a05909363f1
block an opponent's horizontal row of pieces. (A row of length x)
{ bool rowFound = false; int j_limit; switch (x) { case 2: j_limit = 6; break; case 3: j_limit = 5; break; default: j_limit = 7; break; } char theoreticalBoard[7][6]; for (int i = 0; i < 6; i++) { for (int j = 0; j < j_limit; j++) { rowFound = true; for (int k = 1; k < x; k++) { if (cpyPi...
1
339ea5211aa94f0c5192d57145a54fcd
52a08103caaf217d8ab0b61c388fb1b3
查询节点的详细数据
@DefaultProperties @RestController @RequestMapping("node") public class NodeAct @GetMapping("v1/detail/{tableId}/{node}") public Result detail(@PathVariable String tableId, @PathVariable String node) throws ActException { try { List<FieldBO> bos = nodeAPI.detail(tableId, node); retur...
1
063a4bd2541442cd4676e96f0a4dd7f4
17817b350a3ac294a6ab29b4c7f0734f
Check if set of proposed keywords is a good match to create content for a given audience.
if len(message) == 0: return False words_match = self.get_english_count(message) * 100 >= word_percentage num_letters = len(self.remove_non_letters(message)) message_letters_percentage = float(num_letters) / len(message) * 100 letters_match = message_letters_percentag...
0
7707feee3acc6e6cf183c6e5500fecdb
8de8993697a197b5a8a5b96ca2923c54
获取系统所剩空间最大盘符
TCHAR tchar[105] = {0}; GetLogicalDriveStrings(sizeof(tchar) / sizeof(TCHAR),tchar); cout << " USED FREE CAPACITY" << endl; for (LPTSTR lpDrive = tchar; *lpDrive != 0; lpDrive += 4) { char ch = *lpDrive; cout << ch << ":/ "; int t = Ge...
0
9cbf2c1f58426a0dd8aa398e186dca00
41327a978e1d880a5778574ed6470fd2
Returns whether the Square-one is completely solved or not. Does not like AUF.
public class Mathdoku public boolean readyToSolve() { return toSolve(); }
0
782c8063a48db8150a686bb4e810cb0d
f9359def2f3ee5eeb5ed203c4708a384
Gets the lyrics from the song's genius page. Lyrics is labeled by sections!
self.has_fragments = True lyrics_left = self.html_lyrics sections = [] section_artists = {} current_section = Section('Intro', self.artist) current_artist = self.artist current_fragment_tags = [] search_for_parens = False tag_search_str_base = '\[|...
1
3493ce5846ca16aa9f0f202a72ad748a
eba7a87ba8d011f3bb5bb33e111d14be
Gets the next character and shifts the position by one.
{ if (pos == nextPos) { if (end) { return -1; } if (count == buffer.Length) { var newBuffer = new char[ArrayUtil.Oversize(1 + count, RamUsageEstimator.NUM_BYTES_CHAR)];...
1
b0d8e4d46a81a2c8f8d14f2b7e2e5df7
3b96f6f5b8f21a13431ec532197fb6d7
recursively gets the total number of subordinates to this employee
public int dfs(Map<Integer, Employee> map, int eid) { Employee e = map.get(eid); int total = e.importance; for (int subordinate : e.subordinates) { total += dfs(map, subordinate); } return total; }
0
6baeb24f95178bf9e79aeef6f5dcbfc3
ae88efce5255cc03eb3e321d608a24a7
@brief Converts a dpp state into a string.
String DoorCtrl::decodeState(State state) { switch (state) { case State::opened: return "State::opened"; case State::closing: return "State::closing"; break; case State::closed: return "State::closed"; break; case State::ope...
1
3a1e530f4996f5b99a9193a6246009da
b88699336c14ac530ce160599d69683c
calculating exp. and gives an answer
void fun_exp(void) { fret = exp(getnumber(ep)); targ = T_NBR; }
1
200c240754482637429d3a2593980f3e
d8a9d8f16d18aa2b926baa5707a063bd
可以声明带泛型参数的**数组,但是不能初始化该数组
Super[] superArr = new Sub[10]; String[] strArray = new String[10]; Object[] objArray = strArray; objArray[0] = 10; }
0
905962de7622ea1326b83b055ce5d02d
777f680d60504a8137faaea6681bda18
开票页面发票撤销功能,将已开票发票改成待开票
public void doUpdateCanceledVoidInvoice(String fphm, Integer jgid) { int wpjfbz = Integer.parseInt(sysXtcsCacheSer.getCsz(jgid, "MZWPJFBZ")); int wzsfxmjg = Integer.parseInt(sysXtcsCacheSer.getCsz(jgid, "WZSFXMJG")); Map<String, Object> parameters = new HashMap<String, Object>(16); parameters.put("FPHM", fphm)...
1
73f8ec3bb3c951b52eec963edcaf7720
071381238d633187a0688bc081339f8a
Undo the last accept or reject action (pop off of the stack), and update state information
namespace CLIFileRW public class ILCursor public void PopState() { if (this.saved == null || this.saved.Count == 0) throw new Exception("States stack is empty!"); State s = (State)this.saved.Pop(); this.pos = s.pos; this.cur.Reset(); ...
1
e817497bbc5787cae8f22c9fffa7fba6
76ec532c94e8799be47a4a1d25371226
Ongoing destination builder.
class LastDestinations: # pylint: disable=too-many-public-methods def __init__(self, state): self._state = state
0
5352896ca86c8c4da906006c4b5cd4a0
23fcea10eef643350009ce873a7659c1
Calculates the 'disc id' of a CD for submission or retrieval from a CDDB database
int i; int n=0; int t=0; for (i=0;i<tot_trks;i++) { n+=cddb_sum((cdtoc[i].min*60)+cdtoc[i].sec); t+= ((cdtoc[i+1].min*60)+cdtoc[i+1].sec) - ((cdtoc[i].min*60)+cdtoc[i].sec); } return (((n%0xff) << 24) + (t << 8) + tot_trks); }
1
c93b4036bd45983a394befde3bf6500c
7e65a894b481bfb45759e3864b326287
功能:创建指定application的app_form Sections 说明:
class voa_server_sql extends dao_mysql public function create_application_table($db_module = '', $identifier = '', $shard_key = array()) { $sql_data = $this->_application_sql_file($identifier, 'structure', true); if (empty($sql_data)) { return ; } $query_list = $this->_parse_sql($sql_data); $this->_execute...
0
31753b83c63536cd174ef382d3c3acc9
a2d556ce1a0e36bb6281981f83bfbca5
Returns all service checks.
public function listChecks(string $filter = ''): array;
1
a1d3ab9a1588f616bf64d8a38e9d39fc
5a0d2a387b61842063bb32b1b6c8bab6
Returns whether the tile has all of the edged defined
{ if (the_edge.Equals_without_orientation(this._e1) == true || the_edge.Equals_without_orientation(this._e2) == true || the_edge.Equals_without_orientation(this._e3) == true) { return true; ...
0
e9ba9d6101954f76036ce9a43f334365
5de843b99a9fd6678e071f693809aec8
Fonction du thread T1 qui correspond au thread d'un client qui recoit un message et l'envoie a tout les autres client
cout<<"bonjour"<<endl; addClient(inClientSocket); const size_t BufferSize = 999999; char recvBuffer[BufferSize]; const int flag = fcntl(inClientSocket, F_GETFL, 0); fcntl(inClientSocket, F_SETFL, flag | O_NONBLOCK); while( true ){ fd_set readSet; ...
1
e53b780550bba874941db2b7522816a1
97a2439b79602c4a9626bc363bd48207
create model setting for 'convert row values'
class Form_edit extends admin_controller private function _conv_users_row($p_row) { $row = $p_row; $row['post_edit_data']['object_id'] = $this->config->item('object_id_users'); $row['edit_data']['object_id'] = $this->config->item('object_id_users'); $row['post_edit_data']['section_no...
1
60092a440754c24cc43812a3c691212b
685953b9a738f99aac5957d1af1bcf20
将String转换成Double,如果转换失败则使用默认值。
( [CanBeNull] this string text, double defaultValue ) { if (string.IsNullOrEmpty(text)) { return defaultValue; } if (!TryParseDouble(text, out double result)) { res...
1
5685ff4175836df72a656ba1a89d5c3c
57b0675809580e57c5112e0dd9b4a9bc
Добавляем ребро в список ребер
bool Network::add_link(const size_t& a , const size_t& b ) { if( a >= values.size() or b >= values.size() or a == b ) { return false; } for( auto item : links ) { if( ( item.first == a && item.second == b ) or ( item.first == b && item.second == a ) ) { return false; } } li...
1
6d6fbe2c4e976a410868effe6deb2171
0a091d60c68aabbc1b0d0edca920664c
fadd
func opF32Add(expr *CXExpression, fp int) { outV0 := ReadF32(fp, expr.Inputs[0]) + ReadF32(fp, expr.Inputs[1]) WriteF32(GetOffset_f32(fp, expr.Outputs[0]), outV0) }
1
76133ad57e6ec143acef9c236f6c5dea
a6a660bd4d4db8599b10362783cd2837
Handle GET requests - build the base admin page.
class Administration(webapp2.RequestHandler): def post(self): db.recreate_base_data() admin_data['status'] = db.retrieve_status() admin_data['flag'] = True self.response.write(self.template.render(admin_data))
0
81733399cb6bc0bf47a44c94adeffb70
1d879b3a023c40851e7c33d8e6975006
Scan name and allocate a shell principal with enough space in each field. If enterprise is true, use enterprise principal parsing rules. Return KRB5_PARSE_MALFORMED if name is malformed. Set *has_realm_out according to whether name contains a realm separator.
{ krb5_principal princ; krb5_error_code retval; krb5_ccache cc; krb5_data kbuf; int i; if (ccname) { if (retval = krb5_cc_resolve(ccname, &cc)) { free(ccname); ccname = NULL; } if (cc && !(retval = krb5_cc_get_principal(cc, &princ))) { if (XauKrb5Encode(princ, &kbuf)) r...
0
5d98360e46cc6565fa3ced2d85ad85a2
d238f1727c723bf86a4324896365fc7c
文字动画类名切换
var len = $("#music_nameSroll span").text().length + 1; if (len < 20) { $("#music_nameSroll").css({ "animation": "" }) } else if (20 < len && len <= 34) { $("#music_nameSroll").css({ "animation": "music_nameSroll_20 15s 5s linear infinite running" }); } else if (34 < len && len <= 51) { $...
1
96ecada039a64fa8f195f22dc5674850
bda740d5eb1a9b794193ab8903cd6c9a
Detect webshells patterns
def detect_web(path): list = [] i = 0 from google.cloud import vision client = vision.ImageAnnotatorClient() with io.open(path, 'rb') as image_file: content = image_file.read() image = vision.types.Image(content=content) response = client.web_detection(image=image) annotations = ...
0
b742985e4704e8b29c802221cc3b30de
b656be7a1ffeb30a3d3e5685ee50126a
Create a new instance of the ResumeUpload Choreo. A TembooSession object, containing a valid set of Temboo credentials, must be supplied.
class DownloadSession def initialize(config) super(config, SERVICE_INFO) end
0
b882a7aa68e7c1e63f28e7bf48a70517
2263cc640f96d23aa99ec294a4a1b9e2
Initializes connections to the AWS SDK
self.ec2 = boto3.client('ec2') self.sts = boto3.client('sts') self.iam = boto3.client('iam') self.autoscaling = boto3.client('autoscaling')
1
c8f975bfe4a896c2ab246efbfb22f4fb
ef7702616ea9eabb51f2f57153d98830
Method to generate json text for time entry of redmine
{ $err = ''; if (!empty($data['rm_issue_id'])) { $url = '/time_entries.json'; $entry_data = [ 'time_entry' => [ 'issue_id' => $data['rm_issue_id'], 'spent_on' => date('Y-m-d', strtotime($data['date'])), ...
1
9a7e5bc73e6f101f5e4ba58af58a1399
e02292841cbdecb7fa53fe99274d4743
Returns the depth-to-color mapping table.
public class DerivativeLayer extends Layer implements ColorMapListener public ColorMap getColorMap() { if (colorMapTexture == null) { initColormap(); } return (colorMap); }
1
e947f1aa08ece8671aad411867b9f0ff
f64d608e491a6ccf9c88826ae36556af
Load a vec3 uniform
public abstract class ShaderProgram protected void loadUniform(final String name, final float x, final float y, final float z) { GL20.glUniform3f(getUniformLocation(name), x, y, z); }
1
4555f5e491efcd9286c64e075ab7bdf1
8905787fd97f5599fd173a0ea5620910
获得结构表中的数据
public class DBManage public static List<TelnumberInfo> getTableData(int index) { List<TelnumberInfo> list2 = new ArrayList<TelnumberInfo>(); list2 = new ArrayList<TelnumberInfo>(); SQLiteDatabase sdb = SQLiteDatabase.openOrCreateDatabase( DBFileRead.fileName, null); String sql = "select * from table" + ind...
1
70b2e14d2fc15bc0836e7ba4ef524c54
bf62173ca39772548835e12022d2c5f8
Callback function for processing motor speeds
class MainScreen(QtGui.QMainWindow): def motor_2_callback(self): mc.value_2 = self.motor_2_spinner.value() if(self.motor_2_fwd_rev.isChecked()): mc.value_2 = - mc.value_2 self.mode_value_callbacks()
1
aedb0d736989980a7b2346f3bff576dd
48fd9dbd5e46648bdf15f7cd93496d78
Retorna verdadeiro se o Refis do Distrito Industrial esta ativo
public class ConfiguracaoCapitalVO extends BancoobVo public Boolean getBolAtivo() { return bolAtivo; }
0
44082f82f58376cf8a7a3e7ef3c2708e
5d559b50f74cc909504d892fbd27cd49
反射获取MethodInfo并缓存下来进行调用。
synchronized (cache) { J2WMethodInfo methodInfo = cache.get(method); if (methodInfo == null) { methodInfo = new J2WMethodInfo(method); cache.put(method, methodInfo); } return methodInfo; } }
1
a9b5ebf941eacb95482bb8731eaf5244
62936513ce66699f6826587d73736fb2
Returns a list of message handlers in the structure (message_handler,messager_filter) Returns
class Blueprint(): def get_message_handlers(self): return self.message_handlers
0
fece8e21503ca01e495f1679e2c742e6
e1fb008fbd90e5d82ac6626fd10247e3
Makes chosen button disable.
function markButton(buttonElement) { buttonElement.disabled = 'true'; buttonElement.classList.add('chosen'); game.handleInteraction(buttonElement); }
1
a61c93c088ab7a2f4712b9bb6c8e030b
466ac5ca6071c037af04a2c39e51062a
Checks that the correct error status is set when the end of the input stream is encountered prematurely.
{ final int count = 3; addChildStreams(count, true); read(); checkOutput(0, count * TEST_LEN); }
0
ad513db3021bb625d644cd10d8d609eb
7579fb9b240071a440625a2d49de4593
获取我方玩家信息
class Game extends egret.DisplayObjectContainer{ public get playerInfo(){ return this._playerRankInfo; }
1
7888ff8e4982810a39b08b6ff7ff2a82
2e5e76ebc592cbe7be68f28dcb5c5113
ローン申請を行う。
{ var result = _businessLoansService.SubmitApplicationFor(new CompanyDataRequest { CompanyFounded = companyData.Founded, CompanyNumber = companyData.Number, CompanyName = companyData.Name, DirectorName = companyData.Director...
1
1e9ee7284764766b1c592e98cfe5da8d
d8f10a9bd44a5e60062551b84bf08d43
获取QQ信息,并下载其所带所有歌单
namespace MP3Download.MusicSource public class Music_Source_QQ : Music_Source_Base public override MusicDownloadInfo GetDownloadInfo(MusicSourceInfo info) { string url = "http://ws.stream.qqmusic.qq.com/C100<songmid>.m4a?fromtag=0"; url = url.Replace("<songmid>", info.QQ_Songmid); ...
0
bbc7e4eec9ddb172c50a818850fb8104
96aaf73b9f2678dec3f735e4d2468248
先按极角排序
namespace PathEx_Analysis public class RoadModel private void sort() { double[] angle_temp = new double[n]; double temp = 0.0; int temp_int = 0; for (int i = 0; i < n; i++) { angle_temp[i] = angle[i]; index[i] = i; ...
1
57e387924f18f3a98981832c473bae9c
d2f4addf33d7a26706c18bc6d19ceef3
initialize the sample rate converter - called at power-up and whenever sample rate changes
void init_sample_timer(uint16_t freq) { uint16_t CCR0_count; if (get_dmm_flags() & dc_flag_set){ CCR0_count = 6000; }else{ CCR0_count = 6000000/(100*freq); } TIMER_A0->CTL = 0; if (freq >= 500){ TIMER_A0->CTL |= TIMER_A_CTL_ID_1; CCR0_count *= 2; }else{ ...
1
b56e392da944cb0f3279aa0bb0051834
4174c39e70323ff867948682a0dbd596
删除收件人信息
_delAddress(e) { let id = e.currentTarget.dataset.id; api._post('/receiver/deleteReceiver', { receiverId: id }).then(res => { this._getAddress(); }); }
1
58250c9cac1b0b72086beb92df2238c0
b0e0b7279faf2fcf374ad0529d2c19e7
# get baseline win rate for that character, not factoring in stage or mu
outcome_colname = NULL, pos_outcome = NULL) { outcome_colname <- check_outcome_column(dataset, outcome_colname) npos <- dataset %>% dplyr::filter(!!rlang::sym(outcome_colname) == pos_outcome) %>% nrow() ntot <- dataset %>% nrow() ba...
1
ae2b716eb917bb4f5e0ddbac2b315d2d
27ceb8e0df4478a0d93cbbf469f7b798
查出所有的员工和超级管理员
class Staff(View): def get(self, request): staffs = User.objects.filter(Q(is_superuser=True) | Q(is_staff=True)).all() return render(request, 'admin_staff/staff/staff.html', context={"staffs": staffs})
1
221ac9d02dd96d58eb045e61fe57b57f
2dcd039ca3bd9d54f29ae0a3fc083ec0
Check for short open tag.
$this->requireBody(); $this->rejectAttribs(); $checkVar = "\$c$this->level"; if ($this->type == Taglib::TAG_OPEN) echo "<?php $checkVar = 0; ?>\n"; else echo "<?php unset($checkVar); ?>\n"; }
0
472ae73581310bf3266ca92f414b70f3
b1ae03130e5a9ea54aca569469b20e06
Sets the value of the VisibilityTimeout property.
public class ReceiveMessageRequest extends AmazonWebServiceRequest implements Serializable public void setVisibilityTimeout(Integer visibilityTimeout) { this.visibilityTimeout = visibilityTimeout; }
1
d3a8cffa7a98df6acf21712a80417f42
8ecbc2afec75d4b635a0d6a5dc350e0d
Procesamos los datos de un fichero y los vamos insertando en la tabla batch.
$files = $this->load_files(); if(sizeof($files)>0){ rsort($files); foreach($files as $f){ if(($handle = fopen($f, 'r')) !== false){ $ff = explode('/', $f); switch($ff[1]){ case 'invoices.csv'...
0
1f3bf75b6a7af0e1860a49061017dfa2
9fcf7de28b530f60587ac0c1947ae4b9
Defines the player depends on the number of moves.
{ return (moveNumber % 2 == 0 ? Player.human : Player.computer); }
1
c3204f39834c831a3d8e109c49333fce
22f320e95938f8730c4bdf11f88be84d
Karatsuba multiplication. The product of |a| and |b| is stored in |r0| and |r1| Note there is no byte or bit reversal because we are evaluating POLYVAL.
uint64_t *r_hihi, uint64_t *r_hilo, uint64_t *r_lohi, uint64_t *r_lolo) { uint64_t hihi, hilo, lohi, lolo; uint64_t tmp1, tmp2; mul64(a_lo, b_lo, &lohi, &lolo); mul64(a_lo, b_hi, &hilo, &tmp2); add128(hilo, tmp2, 0x0ll, lohi, &hilo, &lohi); mul64(a_hi, b_hi, &hihi, &tmp1); add128(hihi, tmp1, 0x0ll, hilo, &hi...
0
0a08f874e5a3b5a5a7e5b224420e3cad
b6f209377407f06d4174c3a86b74d998
ToStringMapStringE casts an interface to a map[string]string type.
func NewKeyStringMap(value interface{}) MapValue { return MapValue{value: value} }
0
c354db6d999d111fcbe5553e47ac7914
32651d0c1b132dab4e573c6786ff0dd8
Removes the top-most card from the deck builder.
{ int topX, topY; GetTopCardPos(topX, topY); Card* card = RemoveTopCard(); if (card) { int x, y; card->Erase(dc, topX - xOffset, topY - yOffset); GetTopCardPos(x, y); if (m_topCard < 0) { Card::DrawNullCard(dc, x - xOffset, y - yOffset); } ...
1
63afc300e207a010db525f11e19047b4
a7cbde809cc7bb1faf754385afa4d5be
Get the underlying backlog tracker.
public abstract class AbstractDocument implements IDocument, IDocumentExtension, IDocumentExtension2, IDocumentExtension3, IDocumentExtension4, IRepairableDocument protected ILineTracker getTracker() { Assert.isNotNull(fTracker); return fTracker; }
0
35742eddca886878cfc6913bf0b3e67f
a6f441679736c3fba450f59997fa41ed
Indicate whether the concrete button supports the type "image".
class _SoftButtonReplaceOperation extends _Task _supportsDynamicSoftButtonImages () { return this._softButtonCapabilities !== null && this._isDynamicGraphicSupported && this._softButtonCapabilities.getImageSupported(); }
1
303bbaa79cdacbb8c8ea6200ecbe4da2
46fe00442882ca758986464f3c40a68a
View for hostel query in admin module.
class HostelController extends Controller public function index() { try{ $hostels=Hostel::all(); } catch(\Illuminate\Database\QueryException $ex) { \Session::flash('message','Query Exception Occurred. Call Developer!'); return \Redirect::back(); ...
1
25652d1c732608765d7922c5adf8764f
c11a2f9efd9fe57e0e593976209df095
Routine to write the coordinates out using FieldML hdf5 APIs
for iDim in range(3): self.coords[:, :, :, iDim].flatten("F").tofile(f, sep="\n", format="%20.15g") f.write("\n")
0
25cc385481b37843ccef98483c5b238e
a4ad2d7db8894dd263a37cc3b02dd631
Set the path to the private key to use.
public void setPrivateKeyFile(String path);
1
25d06ea90735b641d98f5f83f0656d3c
501591e8f65e1e9f882e8cc7368ada47
Start video capture mode on camera with given integer ID
void openCamera(int cameraId);
1
6b98fcef6525fac4a46376a39e58b1cd
e59c0c7930c170293b8b7cb2a65ced5a
加载文件完成时,解析粒子数据
print("Loaded AnimationData!") print("animationData:" .. animationData) local data = JSON.Parse(animationData) if not(data[1][0][3].Count == 0) then print("Have BoomAnimation!") haveBoom = true animationGroupBoom = data[1][0][3] for i = 0,animationGroupBoom.Count - 1 do ...
1
6faedd0f376f5390b0e0f779c739b4e5
cce64ba30ed8d45b46c122e8ac5cf1f9
Get the bitmap representing all live objects.
image = np.zeros(self.__view_size) for x in range(0, self.__board_size[0]): for y in range(0, self.__board_size[1]): if self.__game_board[x, y] == 0: continue image[x, y, self.__objects[self.__game_board[x, y]].get_channel() ] = 1 i...
1
d86727392708a3eaada8507f827432a6
5a3f0a0702485e693099beda47cacaa9
Insertion of the types of categories in database BDD_OFF (Snacks salés, Gâteaux, Sodas...)
public class CourseHelper extends SQLiteOpenHelper public void insertTypes(ArrayList<String> types) { SQLiteDatabase db = getWritableDatabase(); for (String type : types) { ContentValues values = new ContentValues(); values.put(COLUMN_TYPE_NAME, type); db.insert(TABLE...
1
43a57b404c671b33620351dc20d1ef31
a5d32df1b33efb9fbec432d54dd3ee03
为系统保存宿主包名 <p> 此功能5.0.11-bugfix加入。 系统要做一个强杀的功能,由于eebbk.push是免杀进程,如果多个app集成不同版本的推送库等原因,会造成多个eebbk.push进程, 此保存就是告诉系统真实宿主是谁,然后其他的app的eebbk.push和该app都可以杀 </p>
if (pkgName != null && pkgActivity != null) { setSystemProperty("persist.sys.bootPkgName", pkgName); setSystemProperty("persist.sys.bootPkgActivity", pkgActivity); } else { setSystemProperty("persist.sys.bootPkgName", "unknown"); setSystemProperty("persist...
1
146b2176805a034a985424719b8cb5b7
7763f75fbca346a49719152cdc523b0c
获得指定分钟之后的日期 为正时为指定分钟之后的日期,为负时为指定分钟之前的日期
public class DateUtil public static Date getDateBeforeOrAfterMinute(Date curDate, int min) { Calendar cal = Calendar.getInstance(); if (curDate != null) { cal.setTime(curDate); } cal.add(Calendar.MINUTE, min); return cal.getTime(); }
1
c845117b8122deca9c228c00389911e6
b8bfec03f3f7dec8b22ae33258e55dc8
仕入先名称を取得します。
public class Rcv0003s0205Entity implements BaseEntity public String getBuyOptionCustomerName() { return buyOptionCustomerName; }
1
90f95fb4f6282636e6c13dad0a2f33da
a8c5ecbc2ac3db96cc076cc6d2da7ae4
Mencari player terdekat setiap 3sec agar tidak terlalu memberatkan
{ target = GameObject.FindGameObjectsWithTag("Target"); player = GameObject.FindGameObjectWithTag("Player"); float distance; float min = 1000; number = 0; for (int i = 0; i < target.Length; i++) { distance = Vector3.Distance(target[i].transform.pos...
0
3b15233acdb8e7188e8eefbd7e546c26
7f61448ad6da3ef0f9cb03f40c5be655
List as arg
cases like (1)
0
96b0bfd5974eb06525cb145faaecebec
fc4281c7b85f08997af5c262a719f19d
Returns list of objects with a display_name property.
class OsidObjectSearchOrder: def order_by_display_name(self, style): pass
0
6df090dd9c48783c20ae9c17de0f7180
3d3e01ca0de1e298ed6155d00c86fb4f
Retrieves all the information for a reporter's byline
$defaults = array( 'post_type' => array( 'post' ), 'post_status' => 'publish', 'meta_key' => 'fm_bylines_' . sanitize_title_with_dashes( $type ) . '_' . $byline_id, 'suppress_filters' => false, ); $args = wp_parse_args( $params, $defaults ); return get_posts( $args );...
1
5a9ba6eba28be832d39f31746961fa9a
ef90a5bfd2b4070dc87880d649416a45
build the NavigationModel and configure the corresponding ModelService
namespace CMWSAddCDSDoc public sealed partial class App protected override void PrepareViewFirst(Frame rootFrame) { navigationService = container.RegisterNavigationService(rootFrame); Caliburn.Micro.Portable.WS.NavService.RegisterINavService(navigationService, container); }
0
568a157197c26e24964ca24318cfa8dc
503b7929752dbe17ba2f17b96c4d8c1e
获取某张地图中以某个地图格为中心的九宫格
{ int N = map.GetLength(0); int M = map.GetLength(1); string[,] mapPart = new string[3, 3]; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { mapPart[i, j] = map[n + i, m + j]; ...
1
566ee7969e8011e125abb8f6c9619491
baf6e81275b4071240093bddc1ef81bf
Returns an empty String. Placeholder.
class BaseService static public function getEmptyString () { return ""; }
1
280784127f7d71628025fcc0c93ea463
15ee8420ce9b9ecadaff9f3a79e2d84d
设置unloadReq
if id then if System.getPlatform() == kPlatformAndroid and id ~= -1 then dict_set_int(UpdateHttpFile.s_keys.IdDictName, UpdateHttpFile.s_keys.Id, id); dict_set_string(kLuaCallFuc, kLuaCallFuc, kHttpFileLoadCancelKey); call_native(kLuaCallNavite); end self....
0
18c1596452fb4b09e7e77cce13ea17c1
d96875fd5261e640a1a49e9e402b8342
Funcao para retornar o peso do jogador
public class PlayerProvider public int getWeight() { return weights.getAsInt(); }
1
2b1bdf232f61b468aa6d700481ad57fd
961f7f77b2a23954f6dc3b4f391aefb1
remap IO memory to kernel space
void uart_remap(void) { uart_base = (uint32_t)kmem_map_periph(uart_base, 0x1000); }
1
aa055f33f94b2b61a26d515733b84722
185f2391a17a1c0b74a8e30123d186cd
Switches the players team if possible
{ int tmprowb; int tmpcolb; int tmprowa; int tmpcola; Cell* tmp; tmp = _b; tmprowb = _b->getrow(); tmpcolb = _b->getcol(); tmprowa = _a->getrow(); tmpcola = _a->getcol(); _b = _a; _b->setrow(tmprowb); _b->setcol(tmpcolb); _a = tmp; _a->setrow(tmprowa); _a->setcol(tmpcola...
0
184ca08df1f8441243e432ee4130e1d3
c92f1acb31d9ec1bea15e0209f138158
获取具有最大序列的znode,名称
path := basePath + "/" + zkLockPrefix seq, err := getSequenceNumber(zkLockPath, path) if err != nil { return "", jerrors.Trace(err) } if seq == -1 { return "", jerrors.New("can not get legal numeric digit") } sort.Slice(siblings, func(i, j int) bool { seqI, _ := getSequenceNumber(siblings[i], prefix) seq...
0
de5da441af3ef17b1fcc471f2be7d851
d34cd05b50de1931ee706b9d3d650c37
去除字符串内的控制字符 原始字符串
{ try { if (string.IsNullOrEmpty(str)) { return str; } char[] arr = str.ToCharArray(); StringBuilder sb = new StringBuilder(1024); foreach (char item in arr) ...
1
77c4437528ef57de80868bcb5caa74d9
f32df29c807bb407011e0bd0a6b568db
获取门店的活动 返回store_id为key的二维数组
class ActivityService extends BaseService public static function getActivityList($storeId) { return static::getModel($storeId)->select(Constant::DB_TABLE_PRIMARY, Constant::DB_TABLE_NAME, Constant::DB_TABLE_ACT_TYPE)->orderBy(Constant::DB_TABLE_PRIMARY, 'desc')->get(); }
0
024190dac7343f9d02b144d1f10ac5ce
68b4372bd154ea7e667d15aac2b1a223
测试普通用户无法对普管禁止喊话
class TestHighAdminAddBlackApi(BlackUserAction): def test_high_admin_to_normal_admin_forbid_speak(self): test_data = {'add_super_visor': True,'type':'40', 'user_id': self.user_id, 'blacker_type': 'forbid_speak', 'is_guard':False,'guard_id':None,'is_noble':None,'noble_id':None,'user_is_ancho...
0
906be22002e60223a9b11caaa9804d59
46574127fbe15ad8552d062dba86e0bb
Deploy a new rover, add it to this squad
namespace MarsRover IRover AddRover(int Id, Bearing coordinate);
1
bb049f1ced329e9a34b809f2e7b0f050
1657b56939c63ebfba26b6793cc85662
create array of Vector3 positions for arc
{ if (accuracy < 3) accuracy = 3; float angle = 360f / accuracy; var result = new Vector3[accuracy]; result[0] = center + Vector3.forward * radius; for (int i = 1; i < accuracy; i++) { result[i] = Quaternion.AngleAxis(angle ...
1