query_id
string
corpus_id
string
query
string
code
string
label
int64
4fbe68f395362702457f5ab48f574405
7f61448ad6da3ef0f9cb03f40c5be655
a thing that follows something else
cases like (1)
0
1cdbaffb7144ab1f8add18e0372d7d90
9b680bd46ebe00b3e346aaa018442af5
returns an array of all positions(integers) that are empty
let emptyPositions = []; for(let i = 0; i < matrix.length; i++) { for(let j = 0; j < matrix[i].length; j++) { if(matrix[i][j] === 0) { emptyPositions.push([i, j]); } } } return emptyPositions; }
1
768bb368ae161a7d037d87d76d188586
5bc906e6988cf2c82fad285333bf946e
Create a model with a given number of elements and time steps.
assert(maxLen>0); assert(dx>0); this->maxLen = maxLen; this->dim = dx; this->numElems = 0; time = new double[maxLen]; elems = new double[dx*maxLen]; }
1
9e81641324943ce1de7d2e322ae48b7e
740fbbe11571fc8c36a4b8169e3f5d35
extract and remove a line from the buffer
function Prompt:command_kill_line() self.buffer = self.buffer:utf8sub( 1, self.bufferOffset - 1 ) end
0
27670d8f023ae2608a98d27f0dcbf701
b8ad6509fcdc516f4c1b3624ac2157e1
对一批数据进行预测,返回混淆矩阵以及Accuracy
all_num = len(data) predict = [] for x, y in data: all_z, all_a = self.forward(x) a = all_a[-1] predict.append(y[np.argmax(a)][0]) correct_num = int(sum(predict)) accuracy = correct_num / all_num return correct_num, all_num, accurac...
0
f6cdb63b541d3ac7d7f52a7b44b6cfda
59a284ec915baaea3dfb61a12ffc50e4
Should have the same hash code than an equal record value.
public void testHashCode() { assertTrue(new LevelRowCol(4, 5, 6).hashCode() == new LevelRowCol(4, 5, 6).hashCode()); assertFalse(new LevelRowCol(4, 5, 6).hashCode() == new LevelRowCol(3, 5, 6).hashCode()); assertFalse(new LevelRowCol(4, 5, 6).hashCode() == new LevelRowCol(4, 4, 6).hashCo...
1
4f9fb784620db399e231d0c204734472
5ef5b60eb81ef624d99fe21a00fd2b13
Get list of chromosome ids and their lengths
internal fun Path.chromosomes(): List<Pair<String, Int>> { return bufferedReader().lineSequence().map { line -> val chunks = line.split('\t', limit = 3) chunks[0] to chunks[1].toInt() }.toList() }
1
8e23e249952f0cb4c974b90cdb552e5e
a8038e6b727de1c636f8548ff673622c
Tests if SO_OOBINLINE is enabled.
SCIP_NLHDLR* nlhdlr ) { assert(nlhdlr != NULL); return nlhdlr->sollinearize != NULL; }
0
7cfafeb2502f4d0558f0bf0ae3f2292e
36b47bb060af30de6bb992a77fd782af
Tests a call of the wait operation if no buffer has been set. We can only check that the method returns immediately.
public class TaskProcessorTest extends AbstractDartCoreTest public void test_empty() throws Exception { waitAndAssertIdle(1); }
0
472b4a59a74f27ddb0bc89943c89f344
cd327e95c67d49e1e06863ae028ef509
vrati aktualne vybrany index nastaveni delkovych jednotek
QString CInfoConfigWgt::GetPointTable() { return m_pComBoxDebiceType->currentText(); }
0
55648df929fdda48c196fba2f72140ed
e9edfc2850d1a14bec879c27f0e00a30
求交函数-圆
int cplc(int p0[2],int p1[2],int p2[2],int r,double s[2],double t[2]){ int x1=p1[0]-p0[0],y1=p1[1]-p0[1],x2=p2[0]-p0[0],y2=p2[1]-p0[1]; long long a=x1*x1+y1*y1,b=x1*x2+y1*y2,c=x2*x2+y2*y2-r*r; if(b*b<a*c)return 0; s[0]=p0[0]+x1*(b+sqrt(b*b-a*c))/a; s[1]=p0[1]+y1*(b+sqrt(b*b-a*c))/a; t[0]=p0[0]+x1*(b-sqrt(b*...
1
70055b8895374428ea9fe3d712fe5326
1f2ab1dc11d0b5753b67df1c1ab636cc
Setups both the top and side navigation for mobile / desktop
function setNavigation() { var windowWidth = $(window).width(); if(windowWidth <= 540 && $("#mobileContainer").hasClass("hideMe")) { $("#socialemedier").prependTo("#footer"); if($("#mobileContainer ul > *").length == 0) { $("#mainMenu ul > li").each(function() { var $cloned = $(this).clone()...
1
b799f2ce972aad04e6b7d6c1bc3ee060
c9406f94948d5822d800d4b59d61730a
getting notes from localStorage
var note = localStorage.getItem("notes"); noteArray = JSON.parse(note); if(!noteArray){ noteArray=[]; } return noteArray; }
1
0e37aff353ed05a117656bf77c37040b
a3c7f373c4c2a6a2ae2e88b14423602e
The following interface is not scriptable and MUST NEVER BE MADE scriptable. Native treeviews implement it, and we use this to check whether a treeview is native (and therefore suitable for use by untrusted content).
boolean isNative();
1
44472de518eb542b8a467b7a3edf6f9d
a7f2e36903e18f71a56778645477de6a
Trains the neural network to cluster the data.
class softmax_classifier(object): def train_neo(self, n_epochs):
0
e770c03dad6572e7a2f42131b509010e
4b718ba7cf68e5b62f0441a1d40f32c6
例如 import { resolve } from path; 将 resolve 变为 path.resolve
const absolutePathPattern = new RegExp(resolve(rootDir) + '/(.+)'); const directory = dirname(filePath); readFile(filePath, 'utf-8', (error, data) => { if (error) { console.error(error); return; } const result = data.replace(importStatementPattern, (match, p1, p2, p3) => { const abs...
0
7cc455fc0e73895edced4a9d4a45d5cb
34b71321be49b9085849a623062f0d32
获取单个商品在购物车中的总金额
Double getTotalPrice(Shopcart shopcart);
0
f5c9d641f38179c0ddd757ad727b913f
86aef371a711ff8a1946d5c4b880499b
Compute similarity between the augmenations and their original sentence. Returns: Pandas dataframe: Contains augmentations and their similarities with original.
similarity = list() log_data = pd.DataFrame(log_data) simulation_data = pd.DataFrame(simulation_data) log_timelapse = (log_data.end_time.max() - log_data.start_time.min()).total_seconds() sim_timelapse = (simulation_data.end_time.max() - ...
0
503327b599e9a9eadc3d914cac315c5e
922d082c9f754b030949c1af00a03a02
converts criteria custom objects to explicit json object for firestore save
{ if (criteria != null && criteria.Count > 0) return JsonConvert.SerializeObject(criteria); return ""; }
1
7c43e6a6da601e953a0fb1b04f54b26a
2606ad0708da11a228171b83de7c7e7a
insert a char to the TrieNode and return the inserted TrieNode
public class TireAlphaSearch public void insert(char[] text) { TireNode currentNode = root; for(int i = 0; i < text.length; i++) { int pos = text[i] - 'a'; if (currentNode.children[pos] == null) { TireNode newNode = new TireNode(text[i]); currentNo...
0
2b62610c0cc66db08dd31121432a3c67
1fec38bb8ec38c2a2d3a196c63dd5965
Set the elements which should be expanded.
class V1EphemeralKeysPostBody public function setExpand(?array $expand): self { $this->expand = $expand; return $this; }
1
597c202ecb4f2234a017490f1c453910
ccbfe58b846d5b7740dd6a441199db2f
selects random value between 0-999
int randomize() { return (rand() % 1000); }
1
b0449685297c4ec77523fff1613d27d9
336c91c371fc1330e091b79a319c9308
# fill in the table with random values from 1-5 to simulate employee evaluation
int i, j, col, row; int score; row = table->row; col = table->col; for(i=0; i<row; i++){ for(j=0; j<col; j++){ score = floor(normal_rv(ave, var)); if(score > 100){ score = 100; } if(score < 0){ score = 0; } table->element[i][j] = score; } } }
0
e1130dcf4b2f88fc95b6d7caff7e9ef2
c8445e73178223ef34939cb83278ddb4
Enable the given object as the currently interactable goal object
{ InteractableObject io = obj.GetComponent<InteractableObject>(); io.Reset(); obj.SetActive(false); obj.transform.position = transform.position; }
0
9812924d37794b2e70d399488fec5947
4907380e69b80e985a437a1c4a02eb56
函数将多维数组中所有的键平铺到一维数组中,新数组使用「.」符号表示层级包含关系
{ $result = []; $array = $this->flattenArray($array); foreach ($array as $key => $value) { $parts = explode('.', $key); $i = 0; $new_key = ''; foreach ($parts as $part) { if ($i !== 0) { $part = '[' . $part ....
0
004cf040b0468a30b9e3204c125bd225
37eac64c283251010596b5c74bd094ae
Convert from osu!api status.
return { authorized: stringToBool(statusDictionary.authorized), denied: stringToBool(statusDictionary.denied), restricted: stringToBool(statusDictionary.restricted), prepared: stringToBool(statusDictionary.prepared), scanning: stringToBool(statusDictio...
1
8fa11044e961f2d338542121c7d8fa38
95e7364d959cd79f2c58318252d4d19f
Returns a setting value. Tries the saved settings, then tries the default settings.
String result = null; try { result = settings.getChildText(getSettingName(item)); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } finally { if (result == null) { result = getDefaultValue(item); } ...
1
7de90ace42281ce164202738d61d6cd3
b7c826e7cd3d3928dcc4d6b36cc6c5cf
=========================================================================== DESCRIPTION This function starts the terminal response timer for the proactive command that is just sent to the client PARAMETERS DEPENDENCIES None RETURN VALUE None COMMENTS None SIDE EFFECTS None SEE ALSO None ================================...
const gstk_cmd_type * cmd_ptr ) { gstk_status_enum_type gstk_status = GSTK_SUCCESS; gstk_cmd_from_card_type terminal_profile_rsp; #ifdef FEATURE_GSTK_DUAL_SLOTS gstk_toolkit_cap_enum_type toolkit_cap = GSTK_UNKNOWN_TK_CAPABLE; #endif MSG_HIGH("GSTK_TP_RSP_WAIT", 0, 0, 0); if(cmd_pt...
0
39be824473928974d11a0e28c113683b
bd665cfec7f3db3abcbbf98aceb479e5
Static Constructor
class nat_static_builder nat_static_builder() {}
0
fc0484f69164aa92b9258b551b7691cd
0bee780b776aa90ba55520ab7c9da735
设置确认按钮点击事件
public class MyDialog extends Dialog public static class Builder{ public Builder setConfirmButton(String confirm,DialogInterface.OnClickListener confirmListener){ this.btn_confirm = confirm; this.confirmListener = confirmListener; return this; }
1
ccd7ae2783a28fc764634164d3d8d3b9
c2e90744b4d92b2c4c5a0089bdaa9179
Updates a Document as an asychronous operation in the Azure DocumentDB database service.
{ return Task.Factory.StartNew((object s) => { return ((IDataSyncOperations)s).BeginUpdateSyncMemberAsync(resourceGroupName, serverName, databaseName, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Def...
0
6f7f463ab872383f59c54896ec74e52b
22a09662efab66c4650cafca694058e2
Sets transactions_failed
class Payment extends PPModel implements IResource public function setTransactions($transactions) { $this->transactions = $transactions; return $this; }
0
9e4927d6c03c21c21b6e77f20506afd5
03e83f0bda13dfb2bb057ae4d66b582b
插入数据并更新日志
class Api_log_dao extends CI_Dao public function insert(array $params, $return_insert_id = false, $is_batch = false) { $this->load->rwdb($this->_db_write); $table = $this->get_log_table(); $this->create_log_table($this->rwdb, $table); if (true === $is_batch) { $result = $...
0
99c72b79f4eb57b379b17ef02b152707
20ac756b6119d33422083f78922a7fdc
Constructs the guard by taking ownership of the handle. # Safety Be sure the handle must be freed with [`RegCloseKey`](https://learn.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regclosekey) at the end of scope.
impl RegCloseKeyGuard pub const unsafe fn new(hkey: HKEY) -> Self { Self { hkey } }
1
5a82dfd770475815c9cf04d481e4e84e
360ec3a251f3ca39aec9c98d70d8addf
matches a given file for the expected file content
namespace GoreUpdater bool IsMatch(string filePath);
0
984f09079002f47d23f75961e923640c
1c10fe3e0f0829d24604de45f2d5472b
reset the given face component to default value
public class FaceBundle implements Serializable, Comparable public void clearFace() { cmpFace = null; computed = false; idx = Integer.MAX_VALUE; minD = Double.MAX_VALUE; }
1
c0684da5c8f432f95a84ae4aec6958fc
14ba0ebde60155127697ba3e1d2e3998
Printing out all of the data inside of a .obj file.
def write_obj(name,verts,faces,normals,values,affine=None,one=False): if (one) : faces=faces+1 thefile = open(name,'w') if affine is not None: for item in verts: transformed = f(item[0],item[1],item[2],affine) thefile.write("v {0} {1} {2}\n".format(transformed[0],transformed[1],transformed[2])) else : for...
1
2490549ec33cace92bd402ed2a229750
fe82e2aeae5b57ecec3fbd61b00f2d84
Return error if length is not definite
static inline uint32_t definite_length(uint32_t len) { if (len <= 127) return 1; if (len <= 255) return 2; return 3; }
0
b41b35969c9a51d0b0ddc6fc625d80b8
4752d73a59dced24a77d85a24044b55e
按收件人删除邮件
{ $mid = (int) $this->request->getQuery('id'); $uid = (int) $this->request->getQuery('uid'); $where = $this->db->quoteInto('mid = ? AND uid = ?', $mid, $uid); $this->db->delete('mail_list', $where); $num = $this->db->select()->from('mail_list', 'count(mid)')->where('mid = ?',...
1
4244daefee06258ccb04a5a6a75cdc85
1ce65ce44e3a67623b2c7331793d9f3d
导出子表
*getChildTable({ payload }, { select, put, call }) { const detailColumns = yield select(({ tableTemplate }) => tableTemplate.detailColumns); const DetailChildData = yield select(({ tableTemplate }) => tableTemplate.DetailChildData); const childAllData = []; detailColumns.child.map((value, index)...
0
faa4468c93edcda6164e0afcd4355059
399367f66bd0f625e9b1f103c0cd2cbf
Получить список операций по плановой дате и статусу
$params = array($workDate); $operations = $this->query(" SELECT l.name lName , l.id lId , CONCAT(h.start, ' - ', h.end) hour , CONCAT(u.name, ' ', u.last_name) user , h.id hId , o.production oP...
0
1c660b8f62e5a48cc2589162afa4162a
fe12fbb4c264fe5c73ab73d847815934
Creates a new Miles object if there isn't one already.
def add_miles(vehicle, new_miles): vehicle = (vehicle).upper() if not vehicle: raise MileageError('Provide a vehicle name') if not isinstance(new_miles, (int, float)) or new_miles < 0: raise MileageError('Provide a positive number for new miles') conn = sqlite3.connect(db_url) curso...
1
2cf42c58deb13f08d5b97d9d3393ca5d
4557869c5ce742004e85f8bbe89bc880
Returns a new object of class '<em>Contactable</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getContact();
0
c46bff779e21a6f7e09124230923cffa
42fcf6539c22269de8d5f66babfa78a4
Remove Yoast SEO box from header cpts.
class Yoast_WooCommerce_SEO public function footer_js() { ?> <script type="text/javascript"> jQuery( document ).ready( function( $ ) { // Show WooCommerce box before WP SEO metabox. if ( $( '#woocommerce-product-data' ).length > 0 && $( '#wpseo_meta' ).length > 0 ) { $( '#woocommerce-product-data' )...
0
a89c852e142576e2ebd7a13ca39e81b2
9f90fb06fe7bab5ffb28274c761651ac
@brief A utility function to free the ConnectionInfoItems. This function does not free up the item from the heap. It stores it in a queue for future use, so we dont waste time in allocation over heap and cause fragmentation by repeated alloc/free of memory on heap. Connection. The Connection Q is updated. for which a C...
void free_conn_info(ST_SockConnHandle *ptr) { if(NULL==ptr) return; memset(ptr, 0, sizeof(ST_SockConnHandle)); ptr->status=false; return; }
0
589fb4b5ab1054d7eab822c5aca97bc5
baafba599d2f2ce666ed672fbb96821f
根据采样得到的六维向量,计算出各臂的位置
{ Point3D_t pos; for (int i = 0; i < 21; i++) { pos = Point3D_t(x[i * 6], x[i * 6 + 1], x[i * 6 + 2]); q_v_qc(&faceRot, &pos, &pos); bonesSensorGlobalPos[i] = Point3D_t(pos.X, kalmRef->dZ - kalmRef->heelHeight - pos.Z, pos.Y) * 100.0; bonesSensorGlobalPos[i] += positionOffset; bonesSensorGl...
1
a6867a86a5e68f63fdcf36dbe8a9b8b6
eb02db05d5e02657378466311b12f5b3
c_get_win_bits
void get_window_colours (zword win, zbyte* fore, zbyte* back) { *fore = lo (wp[win].colour); *back = hi (wp[win].colour); }
0
c8f69874c43f062f81632b17e76c6391
ce5f5ac98b8b50da5428568f2987b5f7
Return plugin for given format type.
if (_plugin_map.count(plugin_type) < 1) { FATAL_LOG("create plugin[%s] failed.", plugin_type.c_str()); return NULL; } return _plugin_map[plugin_type](); }
1
7c1df8512df1e297c7d4f2f1b5c52cc0
4d4dbd7ed6850b09b1d43ecf69769ea2
Create a command for building a new station.
class PopulateStops extends Command public function __construct() { parent::__construct(); }
0
081683d6276d17c7a016ff9044176d07
6370cbc95fce6f88156e7126b6d16ebb
1- Funcion para modificar la puntacion.
function updateScore(puntuacion){ puntuacion= String(puntuacion); document.getElementById('score').textContent='Score:'+puntuacion; }
1
988fa75234a79da950d7e29da0130933
31e0acffa3faa2e6354ceb6fbf4701ad
Get number of requested books of the specified user
public function getBookCount($author_id);
0
8f66024edfaaae6854219ad0417824b8
a8c656c7f8816be776f09027abd62c66
retorna todas as confirmações do banco relacionadas ao perfil
class User extends Authenticatable public function emailConfirmations() { return $this->hasMany(EmailConfirmation::class); }
1
240d849910712f7d8e33d40a30913bdf
16c78cf5334e05c3a30ad7b990025ead
Should the application auto-discover the requested resources. Valid values are:
if (method_exists($this->decorated, 'autoDiscovery')) { return $this->decorated->autoDiscovery(); } return ResourceFieldBase::emptyDiscoveryInfo($this->getPublicName()); }
1
dc4c57052a8166f5246fd5fcd82f3df7
96a3587c337bf523e307ddaa7b30fa0e
IA VS IA
class FirstMessage: def AI_vs_H(self): self.y.destroy() self.y = tk.Tk() self.y.geometry('400x400') self.y.title('AI Menu') self.label_text = tk.Label(self.y, text='choose one of the options below:', font=('Helvetica', 20)) self.label_text.pack(side=tk.TOP) self.b...
0
1b742c5658ed16f350b9237c38beeead
b79286e6d0b6ade4a5891b7c5d01d411
Поиск человека по максимальному возрасту
public class Java8Exercise public Person getOldestPerson(List<Person> people) { return people.stream(). max((p1, p2) -> Integer.valueOf(p1.getAge()).compareTo(Integer.valueOf(p2.getAge()))).get(); }
1
70b718a6b080519332dc8869a2d5ccc6
deee5979e62c975d241451bde46f1b5b
Try to wake the specified machine
public function wakeAppliance($appId);
1
19b7d9b28f5d3b1880141eb5a9218583
5ac6916b60c4d670f96ab4a284bffbfe
Gets html_body
public function getBodyHtml();
1
525ef8ad4b2eaf696af98cead20b14ca
ececf305ee76e5071833a14391daf366
При клике на автора или тег, запускает поиск вопросов
public boolean onTagClick(View view, int position, FlowLayout parent) { search(historyLabels.get(position), ""); changeHistoryPosi(historyLabels.get(position)); return false; }
1
f74952a51447b60fcf2844cb4ec6a714
2bbbc3f7488fb6aca2dac778a17c484b
Формируем иерархичную структуру меню по данным из бд
abstract class CommonBaseController extends Zend_Controller_Action{ public function makeMenu($section='main_menu', $parentID=0, $level=1){ $pathIDs = array(); $menu = $this->AnotherPages->getTree($parentID); if(!empty($menu)){ foreach($menu as $view){ if(is_array($this->pathMenuIDs)...
1
59a6753fe75b9884858eae44b270fd46
e76475f2d061aab28dbc69ef3ca1e24a
以post方式提交markdown文档的字符串数据(小于1M),以字符串的形式返回结果。提交文档数据不建议用该方法
File file = new File("D:/markdown/upload/markdown/"+fileName+".md"); try { if(!file.exists()){ file.createNewFile(); } FileOutputStream fileOutputStream = null; fileOutputStream = new FileOutputStream(file); return uploadMarkDownByOutputStream(fileOutputStream, data); } catch (IOException e)...
0
46bbd8f8f18bd3070772bb8c85b0f55a
8bcd169a8d8a90c01e51a509f5a762a8
Issues ID to a Footballer.
def football_pos_to_ff_pos(position): if position == 'QB': return 'QB' elif position == 'RB': return 'RB' elif position == 'WR': return 'WR' elif position == 'TE': return 'TE' elif position == 'K': return 'K' elif position in ['DB', 'DE', 'DT', 'CB', 'LS',...
0
3223b3012417ecbe1b365aa4a6a9e876
58722b54ee51b16e7095fd0d8a9df042
Elimina il focus dagli elementi correnti, utile per ripristinare la visualizzazione del logo
function removeFocus() { for(var i = 0, input ; input = document.querySelectorAll('input')[i++] ;) { input.blur(); } }
1
a6473cf0da48fe9108a8b83be7fd18be
c935712ed073d412dc8e01bd2d9e538c
Disables steppers
void disable_stepper(void){ STEPPER_PORT(SOR) = DISABLE_BIT; }
1
ebf269928713c258f6b4e4d8b9fe0c53
1b6bdd4633217add066245fcfc6bd33f
Returns the File resource representing the rank image.
public String getImageFile();
0
8fd0898bee4541228cbd8a7d3d26117a
a0be94d9e3d2616aa6cc7a2786a9dd01
设置资源文件索引
{ if (empty($indexes) || !is_array($indexes)) { return false; } foreach ($indexes as $index) { $this->setIndex($index); } }
1
3bf7fa713e2613348e9c81b99280d019
9326d743e0aa73790dca6265df717cba
Register all product routes
{ $router->group(['namespace' => 'Botble\Product\Http\Controllers'], function (Router $router) { ProductRoute::register($router); }); }
1
d1f0292d1007a4a6fd9c3fc987e666c2
5a797f7fa1624f88fc1f737c2df80afb
下一頁加載之后事件
namespace 飞碟这样说.Views public sealed partial class MainPage : Page private void videoGridView_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args) { lock (o) { if (!IsLoading) { if (args.ItemIndex == ...
1
fe172f77bd381f09620dc76ec0f8d8d5
4a495d2ed85d587f9f54c609ea828ca3
返回一个被旋转的精灵图
int w = bufferedimage.getWidth(); int h = bufferedimage.getHeight(); int type = bufferedimage.getColorModel().getTransparency(); BufferedImage img; Graphics2D graphics2d; (graphics2d = (img = new BufferedImage(w, h, type)).createGraphics()) .setRenderingHi...
1
40b57e3483fc6c99ebf04346e92621d8
f8ad1b15722a56ea1d2e7713578ef3ab
Installs VMware Tools on the guest operating system. <ul><li>Installs VMware Tools on the guest operating system. If VMware Tools is already installed, this function upgrades VMware Tools to the version that matches the Vix library. <li>The virtual machine must be powered on to do this operation. </ul>
class TC6870(_TC6869): def installVM(self, host): self.guest = host.createGenericLinuxGuest()
0
81a840ed6407c5763c6ffda594a24221
31d32506be1f6c675690cc7ec958cc77
Consulta lineas del plan con metas sin avances
$this->user_has_access($user); $current = $user->currentUser(); $approvers = $this->pdo->get('project',['approvers[Object]'],['id' => $current['project']]); if(!in_array($current['id'], $approvers['approvers'])){ return false; } $result = $this->pdo->select(...
1
b9ba178b5a7ab2004d1b09a0bc8d1325
e182b08fa65d03b5d3ccef392d1ca1f7
retorna yyyymm
$a = date("Y")-1; $m = date("m"); $d = date("d"); $aa = "$a-$m-$d"; return $aa; }
0
6fe9cba6cf1fec6c4b75f0b2edfd2ad7
fc21da89a7e8838d056fdf978de3b9cf
Remove a Fluid Tag as a valid Coolant source
public void unCold(Long id);
0
8f29a3d5f74c29e3b89601137fac394f
f3da45b4076b86123c86bca8eeeedefe
computes poisson probability for the observation with given lambda
class Categorical: def pf(self, x): return self.__lambda[x]
0
6d476cbe3864a42c164c1a4d75343fce
bc00a190075f38f819c6ac0254d9590f
获得任务的负责人
public YongHu getAssignee();
1
0da0f4e506a3ff07d478cee8b1d27e89
2c9d8c736fc5d7ebae8ece89e137f661
predicting defectiveness of a file/tree : param tree: 2b-evaluated abstract sytax tree : returns: likelihood of defectiveness 0-1
def scorefunction(tree,dataset): dif=0 for data in dataset: v=tree.evaluate([data[0],data[1]]) dif+=abs(v-data[2]) return dif
0
a7620a1dd53d67af221672b4f8a9a16a
44b19cb3a6a76e1617b831dfa8519a6c
hdfsReScanForeignScan Restart the scan. Basically close the active resultset, and again execute the remote query.
static void cassandraEndForeignScan(ForeignScanState *node) { elog(DEBUG1,"entering function %s",__func__); }
0
f4c100f7f612604829d223d643c09071
541fedcd7ccb17f159a01597c3057ddb
Lấy ra một khách hàng khi biết số cmnd
namespace GaraDATA.DAL public class KhachHangDAL:SqlDataProvider public DataTable KhachHang_GetByBienSo(string BienSo) { using (var cmd = new SqlCommand("sp_KhachHang_GetByBienSo", GetConnection())) { cmd.CommandType = CommandType.StoredProcedure; cmd....
0
c39b00d08d3c473f4617f78fe780af64
7a02c507b95dcdeae14a6a00a2f4c99c
Returns a implemented culture based on desired "culture names" parameter.
{ string cultureName = null; if(System.IO.File.Exists(_forceCultureFileName)) { try { cultureName = System.IO.File.ReadAllText(_forceCultureFileName) .Trim() .Replace(" ", stri...
0
8f8389b30680e647fd5bb84b9a953032
580f31327dca271b3078325cf2053100
根据彩种获取开奖结果表名 @author ruizuo qiyongsheng
class Lottery extends ActiveRecord public function Win($d, $data = []) { if ($d == 112) { $db = new GfffcWin(); } elseif ($d == 60) { $db = new SsctxffcWin(); } elseif ($d == 117) { $db = new GfksWin(); } elseif ($d == 118) { $db = new ...
1
24b970537e182dcc927f45975fee49d3
935ec07fd8ae68e07fe3c5ea50c539d1
Asociar un repuesto a un Activo fijo
{ try { conexion.abrir(); using (cmd = new MySqlCommand("UPDATE sobres SET fk_idMoto = @IdVehiculo WHERE idSobre = @IdMercancia", conexion.retornarCN())) { cmd.Parameters.AddWithValue("@IdVehiculo", IdVehiculo); ...
0
91c3b9c13e0b8252ca699b6e4f50f22b
6b3e2395f769cc05cb4df165f9040f57
Regresa el apellido materno del nombre de la persona.
public class TraspasoDeValoresForm extends BaseOpicsForm{ public String getApellidoMaterno() { return apellidoMaterno; }
1
09dc8f4538ef59407557e5e7a537f70d
0a2d3ea786a1efed90eaf4e897eba878
6. CRF分词
CRFLexicalAnalyzer = JClass("com.hankcs.hanlp.model.crf.CRFLexicalAnalyzer") analyzer = CRFLexicalAnalyzer() for sentence in document: print(analyzer.analyze(sentence))
1
14227a2d10e9a2231e71e52e3a7a4e2a
c7f3797136ecdb99af994f322a954441
DataProvider of testInheritance()
testInheritance() { this._testInheritance(this.Class, jfJsonApiBase); }
0
5c0873ef9f0de8b397c60fbfacaaa8b8
ee8d138f18672ae6ec3784456b515bba
Gets the ticketInfo Ticket details linked to the role eligibility request including details of the ticket number and ticket system. Optional.
class UnifiedRoleEligibilityScheduleRequest def ticket_info return @ticket_info end
1
64c01e0da5ac68e86216e14977f6a7f9
95bba101a4912ad739e961b5c6b0dae4
Function that calculates the players new position and stores its old position. This function also implements the bounce back game rule
old_pos = self.get_pos() vel = self.get_velocity() new_pos = [old_pos[0] + (vel[0] * self.speed), old_pos[1] + (vel[1] * self.speed)] self.set_pos(new_pos) return new_pos
0
e087d9812d3acb79af68b8afd0985da6
6f72099c76f37c2eaa937a26dd9a1370
ignores the table header row
class PlayerSeasonBoxScoresTable: def rows_query(self): return '//tbody' \ '/tr[not(contains(@class, "thead"))]'
1
425b24ecf8bf0dc8ef2f563626ad6efb
c96ae308e54304da7fac46b2b0a27a76
保存されたキューにプロパティをセットする
class MqConfig public function setProperty($params) { if (empty($params)) { return; } foreach ($params as $key => $value) { if (!property_exists($this, $key)) { continue; } $this->$key = $value; } }
1
3035e2efb972372172f2cb0326b5fd9b
5cfded304ed0d8b8de9f7f4d504631a0
Dapper may pass a Enum instead of a string
class TestEnum: def test_set_enum_from_string(self, db_sync_session): obj = UselessThing(useless_enum="enval2") db_sync_session.add(obj) db_sync_session.flush()
0
e7400a9f4b1550598591419c93c5877d
aa7d92f00a07fbc1acf8bf52a2a4ee4c
Exit programming mode and reset the device.
void Programmer::leaveProgrammingMode() { bbSPI->end(); pinMode(rst, INPUT); digitalWrite(rst, HIGH); }
1
1fee3aeabb4256933346c776b373f5f7
8b20aa5e9e7ec708bc7b9b10ef60e185
描述:充值活动规则列表
$model = M('Recharge'); if ( IS_POST ) { if ( count($_POST['reach']) != count($_POST['give']) || count($_POST['reach']) != count($_POST['sort']) ) { $this->error('请完善规则'); } $i = 0; for ($i; $i < count($_POST['reach']); $i++) { ...
1
15a6db561d280cdc91ffeb6342428766
fb78168beefb36302d95d4cc6910e545
Compute the number of clock cycles required for a multiply operation based on one of the operands.
{ u64 product, unused; __asm__ ( "mulq %3" : "=d" (product), "=a" (unused) : "1" (delta), "rm" ((u64)mul_frac) ); return product; }
0
8fe3cac26892a8faad104720157aa44c
5b8d1b35a183f2635caa857be9901060
根据通知设置类型,查询通知设置分组信息
@Controller @RequestMapping("/teeNotifyController") public class TeeNotifyController @RequestMapping("/getNotifyByTypeId") @ResponseBody public TeeEasyuiDataGridJson getNotifyByTypeId(TeeDataGridModel dm,HttpServletRequest request) { TeePerson loginUser = (TeePerson) request.getSession().getAttribute(TeeConst.LOGIN...
1
53e13bc211dd35e9cce6e4a94c4a753f
a6537dce4e8bd4b138e4c821f8da4811
Set the spinbox range and value without sending signals
WidgetControllerManager &manager, QSpinBox *spin_, int initialValue, int minValue, int maxValue) : WidgetController(manager), spin(spin_) { spin->setMinimum(minValue); spin->setMaximum(maxValue); spin->setValue(initialValue); connect(spin, SIGNAL(valueChanged(int)), this, SLOT(EmitChange...
0
61e429fa690c006fa3481d0391f62f70
98c7fdfe97cd62d98b3c5e56148dd1ea
根据UaClient连接相应OPCUA服务并调用启动订阅的功能
function startSubscribe() { session.service("ALMemory").then(function (ALMemory) { console.log("service ALMemory"); ALMemory.subscriber("PepperQiMessaging/toTablet").then(function(subscriber) { console.log("Subscribed"); subscriber.signal.connect(toTabletHandler); }); }); }
0
a1ca44734f2b321f95850376c0338d45
d70b24708c79324bea153f737b6fc9da
Shows the settings for the attribute weights.
if (sectionAttributesList.isEmpty()) { sectionLabel.setVisible(false); sectionPanel.setVisible(false); return; } GridBagLayout gridBagLayout = new GridBagLayout(); GridBagConstraints constraints = new GridBagConstraints(); constraints.anchor = ...
0
5d157de75b8de9307a7254ff1dbed871
64cbd771aae007dbc5977e031aa1d3ad
Cria a primeira geração de indivíduos
new_individual_list = [] for individual in range(constants.INDIVIDUAL_AMOUNT): generated_individual = individual_factory() new_individual_list.append(generated_individual) print("Individuo " + str(individual + 1) + " geraldo") return new_individual_list
1
70b9d3857a0c3573052e0cd3038c98b1
67650f060a5ce3f87e22ae1b256ac2aa
Gets IDs for query filtering depending on the accession technology.
class XrefsExporter(FtpBase): def export_xrefs(self): def get_accession_source(): return { 'xref': ['ENA', 'HGNC'], 'optional_id': ['VEGA'], }
1
c381709c7e00aac33ff8884772aaaa50
bfafdd6197ef235ab3fc7ab648b44a49
Run `*args` in a subprocess, piping its output to stdout. Additional `**kwargs` are passed to `Popen` Subprocess errors are captured and raised as `CmdError`s
def _call(popenargs, logger, stdout_log_level=logging.DEBUG, stderr_log_level=logging.ERROR, **kwargs): child = subprocess.Popen(popenargs, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs) log_level = {child.stdout: stdout_log_level, child.stderr: stderr_log_level} def check...
0
21ea7dd8c3ed4df5137cbf81d989a1db
1727bf8bb9467f401f340e665c9ecd90
Method to make a single square
public class C extends javax.swing.JFrame public void makeSquare() { setSize(getHeight(), getHeight()); }
1
de7404bcc563c1648c8f939bd122b3cb
c51f4a787318eff6ee61f8b88c3e273a
Time in nanos which need to wait until bucket will be fully refilled to its maximum
long getBucketTransferTimeInMilliseconds();
0