query_id
string
corpus_id
string
query
string
code
string
label
int64
69cedcda507814f9f2280c17950f3e41
66c5c98bd75e1f5c2fb3d6ec979f5a90
Get the real sparse field size. When using multi_sparse_combiner, field size will decrease.
frb_fis_size(VALUE self) { FieldInfos *fis = (FieldInfos *)DATA_PTR(self); return INT2FIX(fis->size); }
0
6359688b44bd6c18edbf1280f9a8676a
8c3b620a389781b9ef5d6b324be242d3
获取worker的名称
public String getWorketName();
1
fd6c481226a7da1dbed6829adea67cc5
132be93f95b621f3177174dd37d6b7b6
Get les factures from Facture suivant le code client et par periode
List<EntretienDeVente> getEntretienClientAvecCharte(String aIdPeridex, String aIdPourApporteurAffaire, String aIdChargeClientelle) throws AccueilClientDaoException;
0
c70fc2b0c090a9b4eacbbe03a0e28bdd
c7d81d499d0880c088985da62bf95778
Parse a CSV file into a list of PSP entries for the given class type. cls: type to construct (must have "remappings" and "required" attributes) csv_path: path to CSV file kwargs: keyword arguments for the class constructor
def pcls_from_file(fname): return vpd.open(fname)
0
fa8d76010c3a8ecaa07ecf89c110b14b
9ab8bd2306d800293847ea8c86789cf2
使用CompletionService来维护处理线程的返回结果时,主线程总是能够拿到最先完成的任务的返回值,而不管它们加入线程池的顺序。
public void testCallableWithCompletionService() { ExecutorService threadPool = Executors.newCachedThreadPool(); int threadNums = 5; try { Set<Callable<Integer>> callables = new HashSet<>(threadNums); for (int i = 0; i < threadNums; i++) { callables.add(new CallableAndFuture()); }...
1
ff12ee73cc2fcdb0146722c98a95f3b0
f1b6ed0ccbf457b1856173473270f9a7
Return a DomainName object that represents the parent domain.
class TaxonInterface(object): def get_domain(self): pass
0
d3056bd57bb587d59b89149d9eb5f7c6
4633de94a482553dae33766a4e0de8bc
Let the user browse for a sky-spectrum file
void SceneryView::on_browseButton_clicked() { QDir const root = QDir(QCoreApplication::applicationDirPath()); QString const filepath = QFileDialog::getOpenFileName( this, tr("openPASS / Import Scenery Configuration"), root.canonicalPath(), QStringLiteral("Scenery Configuration (*...
0
305ff7c55f6a75735284a8f47672da71
f9d3c4e8cc396c7b393f8707b9ce6310
you should implement this in an adapter, but the default is to not-validate login attempts.
class AnyPassDatabaseUserProvider extends DatabaseUserProvider public function validateCredentials( UserContract $user, array $credentials ) { return true; }
1
98887cfacb1e17a9f3f6a38dadae6018
2ce36dd8db472b9560313036108ce628
This is Bottom-Up merge sort
int step = 1; int *tmp = new int[n]; while (step < n) { int left = 0; while (left < n) { doMerge(arr, left, left+step, min(left+2*step, n), tmp); left += 2*step; } step *= 2; } }
1
2abd4336aa8d2a791f3f2e790a4e0c83
aae5aa448671cdd334568a6a5b15f60e
Returns an int indicating the position of the attachment within the body of the item (item: An item is the basic element that holds information in Outlook (similar to a file in other programs). Items include e-mail messages, appointments, contacts, tasks, journal entries, notes, posted items, and documents.). Read/writ...
public class Enq210Form extends Enq230Form public int getEnq210AttachPos() { return enq210AttachPos__; }
1
f72c725af03b032896f7dbf74ab6acf0
8f7a6edd5b33551719b6b464b0669fcb
Get the article description from the request
class GuanChaSpider(CrawlSpider): def _article_description(self, response, item): xpath_pattern = [ '//meta[@name="Description"]/@content', ] for pattern in xpath_pattern: xpath = response.xpath(f'{pattern}').extract_first() if xpath: item['des...
1
0989fff1a928c4569f8c353c252225d3
112683cd33754424db3b43781ae5c96b
Constructor accepting two points
Point(double _x, double _y) { x = _x; y = _y; }
0
eac42ffe984e608eda7d7acb9f893871
0f29655f3e55a92fd49346546ded5424
!MD #### IsWindowReady ```lua boolean Status = rl.core.IsWindowReady() ``` Check if window has been initialized successfully.
function addon:IsGUIReady() return guiready end
0
196cdd8c887050d735da468c6d9aa0b0
3c808513534a402461d2b23c74a36f51
根据多表名分表向数据库插入数据
class BaseModel extends CoreModel public final function inserMulti($data, $table = NULL) { is_null($table) || $this->table = $table; $ids = $this->_db->insertMulti($this->table, $data); $this->autoaddtime && debugMessage('未自动补充createtime和updatetime'); $this->_logSql(); if (!$ids) return FALSE;...
0
9af8679ac0c00f77e37ed558093cff1b
5c88753cb36d5672905079efc43aa912
Getter method for error, mapped from YANG variable /reports/error (string) YANG Description: Error, if existent, when obtaining the report.
public java.lang.String getInd_error();
1
e888777d13c91cc9764e238b32033abc
b7b98e8ef20f5d27de7d3c42d9724170
GET: PaquetesEnviados
{ var iNSUMO_PACKAGING = db.INSUMO_PACKAGING.Include(i => i.INSUMO).Include(i => i.PACKAGING).Include(i=>i.INSUMO.MEDIDA); return View(iNSUMO_PACKAGING.ToList()); }
0
03291fb60b5468b878bd6be1267acdd7
76db9f39eee734769ebeeb63eb534c7f
This console app can be run using default settings for the database or by providing an AppSettings key as a command line argument
namespace ArmTester.Console public class Program private static void Main(string[] args) { var settings = new SettingsService() .GetFromJson<Settings>("deployment"); Run(settings).GetAwaiter().GetResult(); }
0
a381d07664b16df35e862f81206624cf
c7c0d7ac9431846d8b90c6b9c8235417
Returns default subnet id for account
def get_network_subnet(network_id): networks = get_networks() for network in networks: if network['Id'] == network_id: return network['IPAM']['Config'][0]['Subnet'] raise NetworkNotFoundException( "Cannot find network (Id: {0}). Networks present: {1}".format(network_id, networks)...
0
bd040b0615601cda7f2e867a68091469
8b1e3934e6d601708c0b8619428a0e62
Obtiene el conversor inverso al actual
class PairConverter(object): def invert(self): return PairConverter( self._unitsB, self._unitsA, facAB=self._facBA, funcAB=self._convBA, funcBA=self._convAB )
1
0ab94587ecf2b97a53d752038790ee38
ef4ba7a1ea64731ea8af56e10aa180e6
Skip Scene Detect if the file already exist
namespace ShootingSharp.interfaces bool ExistNextScene();
0
4bac6fbba1f2b44839199676bd124f6f
11bffdad57860d40a866db53f3ae5c30
This method will recalculate the size and position of the Tmview control
{ if (_view == Control.View.Preview) { _vScroll.Visible = false; _hScroll.Visible = false; } else { _slider.Visible = false; } if (_itemHosts.Count == 0) { if (_view == Control.View.Details) { _clientArea = new Rectangle(1, _columnControl.Bottom + 1, this.Width - (_vScroll.Width + 2), this.Heig...
1
896865b6038ec509d8d43c4c62c09daf
dd8c18143cd64b54a51f05d4e084a901
Updates layout of the specified match.
$this->db->order_by('display_order', 'ASC'); $this->db->order_by('updated_at', 'DESC'); $this->db->where('match_id', $match_id); $query = $this->db->get($table); $data = $query->result_array(); $order = 1; foreach ($data as $item) { $this->db->set('dis...
1
5443b07d2830870e536db31c1ec1c3fa
15be593a74a4d627fb453fa2ae49073b
@brief Output %02X hex byte in ASCII format using debug transport function
#if (UART_EN != 0) static const char hex_symbols[16] = "0123456789abcdef"; PRINT_PUTC('0'); PRINT_PUTC('x'); int i; for (i=28; i>=0; i-=4) { PRINT_PUTC(hex_symbols[(num >> i) & 0xf]); } #endif }
0
17c7047166f93e73e6bde0a6b496fe5b
48682da80c400c0369ba1e7a4ca5e0b1
{} //an empty block, equivalent to a null statement ; //a null statment
void Parser::Empty_Statement() { ; }
1
ee29d57904ab17acdecd15ddf1b4477c
67af5ee323db8d4394a3bbbcaa633173
Gets the ethernet of this PacketAnalyzerFlowHeader. # noqa: E501
class BBEVarInterface: def rt_ethernet_handle(self): return self.__rt_ethernet_handle
0
888769e920b8403e4afc5f8bd6e4abdc
2b893a4110017ae80642b18bd2b9669a
Filters out none objects in a list
export class ReposListComponent implements OnInit filterList(list:[]){ let filteredList = list.map(element => { let obj: Object = Object.assign({}, ...Object .keys(element) .filter(k=> { let result = k == 'pushed_at' || k == 'html_url...
0
502bf4cc5e2e486ba961b7a26d9328af
5b0c83b618612beab3af44e609ebda1b
Devuelve una cadena que será el script para la inserción en la base de datos para el mensaje enviado
func emailScript() (script string) { return `From: {{.From}} To: {{.To}} Subject: {{.Subject}} MIME-version: 1.0 Content-Type: text/html; charset="UTF-8" {{.Message}}` }
0
37bfbf70161e112fb9e976a4b4f382ab
c628ca917e87bd970dd07db4f30c7618
配置显示复选框
$html = ''; $html .= '<div class="layui-form-item" pane>'; $html .= '<label class="layui-form-label">' . $title . '</label>'; $html .= '<div class="layui-input-block">'; if (is_array($checkbox) && $checkbox) { foreach ($checkbox as $v) { $html .= '<inp...
1
7e284383758018c28bfb4e91bd20b57f
fbb8ef331e4e87cf714a8285da569e03
create a dict with equations and salinities as keys from settingsfile reads equations, min salinity and max salinity from settingsfile
class ReferenceEquations(object): #========================================================================== def set_refval_dict_from_settingsref_obj(self): refval_col = self.settingsref_obj.settings.refvalue_column min_s = 2 for ix in self.settingsref_obj.settings.df.index: ...
1
b68c7961fb96e4ea7eb52563530873ed
f5c462b8b0c6ea9f7a00b9d2ec1281b2
Sets the unit points.
public class MarketIfTouchedOrder implements Order public MarketIfTouchedOrder setUnits(BigDecimal units) { this.units = new DecimalNumber(units); return this; }
1
17004915d14874da6bf5a2c3670adcd5
f613e52532e80991efaacfdb0940a73f
Reorder hosts in the decreasing order of free capacity.
namespace org.cloudbus.cloudsim.container.core public class ContainerHostList public static void sortByCpuUtilization(IList<ContainerHost> hostList) { var comparer = new ComparatorAnonymousInnerClass(); var sortedHostList = hostList.OrderBy(h => h, comparer).ToList(); hostList ...
0
154fa60a03a54ca7526c5347e270886a
7e0ed68b90518a193d628c10c7b444a0
砲台のセット通信
namespace GodaiQuestServer public class UserWorker private void ComSetDungeon() { addLog("Command : set dungeon " + this.mMail); int nVersion = this.mNetwork.receiveDWORD(); var set_dungeon = this.mNetwork.Deserialize<godaiquest.SetDungeon>(); int nUserID = se...
0
6dde2bf1869961e4c1a2102b1416dbfa
5ce14a0818578ce85746a7715d510f6d
Residualizes the given system.
class AbstractHyperSolver(tf.keras.Model, ABC): def residual_trajectory(self, t_span: tf.Tensor, base_traj: tf.Tensor): pass
1
04916343ea62ae42ade938d6d56d9514
e8e7e998279f24d70c97cead6c7bd90f
all the subsequent arguments must be removed from the array found in the first argument
public class StringMgmt public String[] remFirstArg(String[] arr) { return this.remArgs(arr, 1); }
0
6c90b1102a7743ae8bb257e88283fc8e
085167247729254ceab5bea46d97bd29
录入清算指令.
{ Guid payId; MasterData product; MasterData service; MasterData liquidated; using (var context = new WSEntities()) { payId = context.MasterData.Single(m => m.Alias == payType).ID; product = context.MasterDat...
1
27f3965b3d0fb5a6bd8f69de959976da
3d139ef72f667848fb2df17809fd0e1c
Interrupt service function for the transmittion of a new byte
{ DISICNT = 0x3FFF; IFS0bits.U1TXIF=0; while(U1STAbits.UTXBF){}; if (USART_transmit_ok==0) { U1TXREG = USART_transmit_buff[USART_transmit_index]; USART_transmit_index++; } if (USART_transmit_buff[USART_transmit_index-1]==13) { USART_transmit_ok=1; USART_tr...
0
622e6870282e658b45058e8ad2ee9a18
1b2d0a8d0b0f379299fb3a661432c2fe
Cette m�thode calcule et renvoie le prochain joueur qui doit jouer
{ $id = $this->mCurrentTurn->getPlayer()->getID(); if(!$this->checkWin()) { $id++; if($id >= $this->mPlayersAmount + $this->mCPUsAmount) { $id = 0; } } return $this->mPlayers[$id]; }
1
6b7f5cc1c47cea4af3f66d6a2a9ef3a3
4f002ae6b2208a4efa84bc115848d584
通过反射改变分割线颜色,
public class DriveImageView extends RelativeLayout public void setDivideColor(String divideColor) { driveLayout.setDivideColour(divideColor); }
0
b81697348471faf1c7de9ff2dd0b529a
1ab7bc5492f70a5288dcfdd7195f200f
Set alicuota
try { List<Alicuota> items = new ArrayList<Alicuota>(); for (Alicuota item : items) { getItemsBIC().addBean(item); } } catch (Exception e) { LogAndNotification.print(e); } }
0
83334bad69da358b77bdb4995dfdb452
35d1896ed7357ded121d8706a74751a4
回复鉴黄检测
class UgcService: def reply_baidu_rate(self, rate_ids, shop_id, reply): return self.__client.call("eleme.ugc.replyBaiduRate", {"rateIds": rate_ids, "shopId": shop_id, "reply": reply})
0
71ef5fe8fe6c7546780c6cd83a904b45
b53bbd4ed3fcdbe6c59efa28c6411a85
메뉴 추가 페이지에서 필요한 파라미터
var data = new Object(); data.menu = $('#edit-menu-menu').val(); data.name = $('#edit-menu-name').val(); data.old_name = $('#edit-menu-old-name').val(); data.val = $('#edit-menu-url').val(); return data; }
1
9c3be06ef0bba12f17e5ee2db54c676e
e9b6726883e8a9a8bd398059ea7debd4
Convert from 0-based array index to physical coords
def ind_to_pt(index, refIm): if isinstance(index[0], int): point = refIm.TransformIndexToPhysicalPoint(index) elif isinstance(index[0], float): point = refIm.TransformContinuousIndexToPhysicalPoint(index) else: msg = f"The data type of index is {type(index[0])}. It must be either"\ ...
1
76562d8a441801ac831abdd4e2859fa8
e36d0248fae3690d28693d45b2c907f5
Returns copy of the provided image
fn texture_from_image<T>(img: &T) -> &T { img }
0
b7a73af805f95f121ab49580160686f9
77915613ad85df49ff78e5f5859029fc
gridの指定の座標のtextを検査する
atGrid = self.atGrid(x, y) if not atGrid: return False return atGrid != '-'
1
b78f0a751a2899d38a84412eeeded047
1b79a4ff0c52eec18ba8082288b90218
デバッグ用ユーザーか否か
{ if (Utils.InArray(uid.ToString(), PrivateBTConfig.GetPrivateBTConfig().DebugUser)) return true; else return false; }
1
0f64f228520cc6076efb71fccc283a2f
dd147d53f79131bd63dd5216be2f771c
Get the ID of the MIDI message.
public class Message public int getMID() { return this.messageID; }
1
b719a5e7733d9cab72bb40eacce1bf13
8a6990bb562bc4784c25342b52594ebb
Devolve a lista de todas as avaliações deste registo
public List<Rating> getRatings();
1
0b560a3ad3751c73ab13cd4d9393083b
f1810a727e0e7bb355b6e34bf721ecb8
获取 GSE2.0 灰度列表
export class AppOverviewDetailComponent implements OnInit getGrayDataSetRX(instanceId): Observable<any> { return this.http.get(environment.apiApp + '/apiApp' + '/application-instances/' + instanceId + '/gray-updates'); }
1
c175961f006d3ab9fb3c642820d69ed6
35136365bbd438ab6db75d96204df61d
Extract contents of a cube into a Pandas `DataFrame`.
feature_variables = [cube.name() for cube in feature_cubes] feature_variables.sort() features_list = [] for feature in feature_variables: cube = feature_cubes.extract_cube(feature) features_list.append(cube.data.ravel()[:, np.newaxis]) features_arr = np.co...
0
b573e25e4c4098f3779988c229bf93a9
2c77abbe0e627ec10aad36a7a42ec6f1
ContentImport constructor.
\Firebear\ImportExport\Model\JobFactory $jobFactory, \Firebear\ImportExport\Model\ImportFactory $importFactory, \Magento\Framework\FilesystemFactory $filesystemFactory, \Magento\ImportExport\Model\HistoryFactory $historyFactory, DecoderInterface $jsonDecoder, \Magento\Fra...
1
b3862e96f2f8f962b9b4bab0879b1745
968df33d7f59e3d6532d765012c28d52
Send a RING signal to the SIP call leg
public class Execute public void ringReady() throws ExecuteException { sendExeMesg("ring_ready"); }
1
dc920931daee558719652f03fee924ee
f0fb3d7eda90c355ebd5c23615a6b32a
Verifica se o ponto é intero à figura
{ if(SimpleFigure::isOn(p)) return true; if(!fillPoints.empty()) { for(Point *pt:fillPoints) if(*pt==p) return true; } return false; }
1
d711d4770f3efaaf58e251696ae63e6a
c8b2640ad0a85c01aa77c4ba8d3c6b11
销货单据日期改变时 重新设置单据编号
var date = new Date($("input[name='date']").val()); var year = date.getFullYear(); var month = (date.getMonth()+1) < 10 ? "0"+(date.getMonth()+1) : (date.getMonth()+1); var date = date.getDate() < 10 ? "0"+date.getDate() : date.getDate(); var id = $("#id").val(); if(!id){ $("input[name='tScSlStockbillentryList[...
0
4d16b11237813308becdcc1b6f69bf8b
f85b6c71227626db8ffcc7987c5f7e38
Returns true if the given player is a Floodgate player, false otherwise.
namespace Space.Data public static class FactionsExtension public static bool IsPlayerNumber(this Factions factions) { return (NumberOfSetBits((int) factions) == 1) && factions >= Factions.Player1 && factions <= Factions.Player12; }
0
a9e0362435edc87c124c265423f1214e
4529c1b17cbaf87e3038a04b09ae5206
This class connects to the database and get all the columns stored in the database. With all the column information, it instantiate new BBCItem and add to the ArrayList.
protected String doInBackground(String... strings) { Log.d(ACTIVITY_NAME, "doInBackground : start"); try { URL url = new URL(strings[0]); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); InputStream response = url...
0
b30bf89a87279462dc68d3618d14f9b5
b60b9f506adb9eee46bbdc73975504dc
Creates folder metadata.
class S100Root(GeographicBoundingBox): def metadata_create(self): self.metadata = self.metadata_type()
0
8c5e6809c89ad222b6f3421c586aed74
705986e8aa7eb7351fe16a1f69017139
Generate a watcher for the GlobalMetricsProviders in the namespace.
c, err := controller.New("namespace-controller", mgr, controller.Options{Reconciler: r}) if err != nil { return err } err = c.Watch(&source.Kind{Type: &v1.Namespace{}}, &handler.EnqueueRequestForObject{}) if err != nil { return err } return nil }
0
cea79f6734a21747397e60adef3099cf
fda69196c1960a04138e7fc1826f5ee9
巡更线路-新增数据
$check = self::_checkDataDeal($data,$from); if($check['code'] != 1){ return $this->failed($check['msg']); } $mod = PsPatrolLine::find()->where(['id'=>$data['id']])->one(); if ($mod) { if ($mod->is_del != 1) { return $this->failed("此线路已被删除!"...
0
0716933aa16052f86a1ee0bfe0a4e744
e96b6ecbda76c7fee5bb4a86474f09d0
Retrieve the rotation matrix from the global to local coordinates
local_axis = MVector3D(1, 0, 0) global2local_qq = MQuaternion.rotationTo(global_x_axis, local_axis) local2global_qq = MQuaternion.rotationTo(local_axis, global_x_axis) mat_x1 = MMatrix4x4() mat_x1.setToIdentity() mat_x1.rotate(qq) mat_x1.translate(global_x_ax...
1
a1b5cc12b5a9d20ddbe89f965a4f1ac6
31922997d8a73a74aa12b8c715c47bba
Removes an argument
class HTTPd_DOMElement extends \DOMElement public function removeArgument($position) { $this->unshiftArguments($position); }
0
cbc401a4dc6dcdf35d83f7bc30c752d9
6171076845da8d4d5196558e88183129
Sets the Activator Transform values
{ base.Activation(p, r); transform.position = p; transform.rotation = r; health = MaxHealth; UpdateHealthDisplay(); }
1
a2bba19c185f82e0b36750f4439643cc
beb109e203f4c017b0e77505e491cd78
串口2 IO口初始化 PA2 PA3
void USART2_GPIO_Config(void) { GPIO_InitTypeDef GPIO_InitStruct; __USART2_CLK_ENABLE(); __GPIOA_CLK_ENABLE(); __HAL_UART_ENABLE_IT(&uart2_handle,UART_IT_TC); __HAL_UART_ENABLE_IT(&uart2_handle,UART_IT_RXNE); GPIO_InitStruct.Pin = GPIO_PIN_3 | GPIO_PIN_2; GPIO_InitStruct.Mode = GPIO_M...
1
62144cc29da9accf2170d4a8465fcca9
211d4ad57165935193935c31bbbae4a0
Returns c or an empty collection if c is null.
namespace Naos.Core.Common public static partial class Extensions public static ICollection<TSource> NullToEmpty<TSource>(this ICollection<TSource> source) { return source ?? new Collection<TSource>(); }
1
16cb2007360c59c0374a147080a2484a
fdbb3a9227e2c6e95b6ac9aaa228db6e
定稿 insert 一筆到ProjectInfo_Check
{ Model.Check_SupervisionNotice newSupervisionNotice = new Model.Check_SupervisionNotice { SupervisionNoticeId = SupervisionNotice.SupervisionNoticeId, ProjectId = SupervisionNotice.ProjectId, SupervisionNoticeCode = SupervisionNotice.Super...
0
2dee31dd9e0fbf0c4ac642c02cec5482
1260fa4c829a5f7110159605fabdf931
Checks URL to identify the supported Database.
public class SourceConfig implements ElementParser Databases getDataBaseSupport(String key) { key = StringUtils.toLowerCase(key); if (key.contains("mysql")) { return Databases.MYSQL; } else if (key.contains("oracle")) { return Databases.ORACLE; } else { return Databases.J...
1
9ebe65fecb40d69a1d4320a1e4298bf1
6da3af5e44d5ea7b2d66be97db1acfc2
Replace None with 0 for numeric fields.
def try_change_dataframe_zero_to_none(_df): df = _df.copy() for column in df.columns: try: df[column] = _df[column].apply(lambda x: None if x == 0 else x) except: continue return df
0
d278044c99aa0d599266f353369e6588
fbd212203da30e9493a2ac08ed34ddae
Sets the value of the '{@link CIM.IEC61970.Wires.FrequencyConverter#getFrequency <em>Frequency</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
void setFrequencyRange(double frequencyRange);
0
88eed125e7499a014f4291bc0d6b9433
638b95dad361677acc8bf449ee95b360
Enables the Google Sitemap Generator and registers the WordPress hooks
add_action( 'wpseo_do_sitemap_' . $name, $function ); if ( ! empty( $rewrite ) ) { add_rewrite_rule( $rewrite, 'index.php?sitemap=' . $name, 'top' ); } }
1
8716b48510f6c06e3adb477e56835097
de7f2e35c1bcdf140ac4a250c8e86cdf
退票订单保存
namespace PaiXie.Erp.Areas.Order.Controllers public class DetailsController : BaseController public ActionResult SaveRefund(OrdaccountsBill accountsBill) { BaseResult resultInfo = new BaseResult(); accountsBill.BillNo = PaiXie.Api.Bll.Sys.GetBillNo(BillType.TK.ToString()); accountsBill.BillType = (int)BillTyp...
1
f9a790625d091fe788f548a5829b1050
e793f65bc25bff5c6427c80f8ac647ed
目前只提供了 BinaryMetaSerializer
class ResourceSerializer(serializers.Serializer): def get_meta(self, _instance): return {}
0
4dab64031287ac4380567356b762d30c
5fb4ac2fb9faa556891eea84913246d4
渡した文字列の日付が含まれる週の最終日を返す
var weekEndDate = new Date(paraYear, paraMonth, paraDay + (7 - paraDayOfWeek)); return formatDate(weekEndDate); }
1
8d70d75f467ba231a7f8bb34cfd6501e
ddb9258b76393195eb363727220cc3c5
Returns an integer value for the small blind
public class PlayerNode public boolean getSmallBlind(){ return smallBlind; }
0
379ed0f471d247a15a0a137ab82a8e78
0696e77c1aadf4ad138ee6faf0956a76
BanNotification notifies user of ban event
_LOGGER.debug( _("Ban event fired - user %s was banned from channel"), event.user ) await self.send_message(f"/ban {event.user}")
0
aee8579069647392287392e94d0150b4
d740f5ab888d1a76672968891c15c1ef
根据 wkt string 得到 proj info
class Context def wkt_dialect(wkt) Api.proj_context_guess_wkt_dialect(self, wkt) end
1
d08851a0a9381faf2970c48833fe53d2
3ed4482cf9482fe4ff6c635e88e573cd
Test that we can create a simple CloudFormation stack that imports values from an existing CloudFormation stack
class TestCloudFormation(unittest.TestCase): def test_create_stack(self): class cf_conn(object): def __init__(self, *_): pass
0
4278669f7c33cc6683dd22634daa624d
79925983a155310f38368dd4faf0d5e8
#Muestra solo las tutorias que ha hecho el empleado, con el numero de maestro ingresado
$v = []; $tutor = session()->get('usu'); foreach ($tutor as $t) { $dni = $t['dni']; } $v = \DB::table('tutores') ->where('tutores.usuarios_dni', $dni) ->join('matriculados', 'matriculados.cursos_id_curso', '=', 'tutores.cursos_id_curso'...
0
bb050049862dc02890b8899817deb36d
8633d4ca5713616987bf521943dbda27
逆卷积层
w = tf.Variable(tf.random_normal([k, k, in_num, out_num]), name=name+'_w') x = tf.nn.conv2d(x, w, strides=[1, strides, strides, 1], padding='SAME') tf.add_to_collections('vars', w) if bias: b = tf.Variable(tf.random_normal([out_num]), name=name+'_b') tf.add_to_collections('vars...
0
21798e0b639c858ab3f1dee056bef473
6538cd1e24ffed4c8274c8a9b580fa97
Liste alle Bücher, die mehr als einen Autor haben
{ return $this->createQueryBuilder('b') ->select('distinct (b.author)') ->orderBy('b.author', 'ASC') ->where('b.author IS NOT NULL') ->andWhere("b.author != ''") ->getQuery() ->getResult(); }
0
669fed8010fdccfd324eff11ba6dc383
2496f736169c632683814cef25306703
Assesses the spectra's similarity using the normalized dot-product
try: sim = np.dot(s1, s2) / (np.linalg.norm(s1) * np.linalg.norm(s2)) except ValueError: sim=0 return sim
1
25b85b5f5ba7db45946f2e02d7f2fb6e
d0d1349c2889c05a91fc5745efed79a8
키워드 배열에 추가
class A4ATR(): def addKeywords(self, arrKeyword): if arrKeyword: self.m_keywords += arrKeyword return True
1
e252df96d9fd0851053480609bb086c8
379eb384478cf8712b296f204e06194d
Gets an array of day objects by trip id
class Backend(metaclass=abc.ABCMeta): def get_days(self, route_type, route):
0
a6a27492f5133cf5fcae268f5a8e761b
85368a79adf5c2a475bd9f653255ec13
设定是否打开所有字符串字段的模糊查询。
class ElasticSearch public function fuzzy($val = true) { $this->fuzzy = $val; return $this; }
1
5e1be54ca1daaf07c6bcabf6fe18c54c
659ae69de56da8a8692f645eceabaddf
Enable all registered modules in this controller.
{ if (true === $this->modulesAreLoaded) { return $this; } foreach ($this->getModules() as $moduleName => $namespace) { $this->loadModule($moduleName); } $this->modulesAreLoaded = true; }
1
478c41b5b5206d886f001da87432b3c8
2124e1fc968c9b89024f2cada22a11e4
Calculates exact time of flight in seconds without farfield assumption.
{ float flightTime = GetInterceptTime(relativePosition, relativeVelocity, shotSpeed); if (flightTime < 0) return Vector3.zero; if (flightTime.Equals(Mathf.Infinity)) return Vector3.one * Mathf.Infinity; return flightTime * relativeVelocity; }
1
328cdbfb93a598a6a4607f2863aabca4
656f2308ba1b8c1b2806d3edecfd33a0
Specify the name of the package of mappers we should be using
public class JarPackageFragmentRoot extends PackageFragmentRoot public void setSourceMapper(SourceMapper mapper) throws JavaModelException { ((JarPackageFragmentRootInfo) getElementInfo()).setSourceMapper(mapper); }
0
ef5bdd6942d85a84134c7911115dd646
3151854e4f448f8b7a4bb068a27b3957
Function that represents taking forks
void takeForks(int i) { sem_wait(&semaphore); state[i] = HUNGRY; checkForks(i); sem_post(&semaphore); sem_wait(&sem[i]); }
1
4340e5bbdbd8fd530842753c7cb0b316
a0279fe9d506901ef793e42ffce06add
вибір варіанту виведення результатів
{ $data = array( array(self::SHOW_RESULT_NEVER, $module->lang('vmview_never')), array(self::SHOW_RESULT_VOTED, $module->lang('vmview_voted')), array(self::SHOW_RESULT_ALWAYS, $module->lang('vmview_allways')), ); return GWF_Select::display($name, $data, $selected); }
1
d57d1db7b535a866d19c8748aa398c98
a237ccecbbb0ab7a816f9248a8bfa7bc
A function that removes an asteroid object from the game
void Game::destroySmallAsteroid(int index) { if (smallAsteroids[index].isVisible == true) { asteroidsLeft -= 1; score += 40; smallAsteroids[index].position.x = -500; smallAsteroids[index].position.y = -500; smallAsteroids[index].isVisible = false; } }
1
de0a885ae5382288884aa2da817b8dc3
1f921fc5f3adae1764c60f9ac452aca3
Returns whether the ant is currently carrying food
{ if (!ant.IsCarryingFood) { if (ant.IsFoodKnown) ant.IsMovingToFood = true; else ant.Wander(); } else { if (ant.IsNestKnown) ant.IsMovingToNest...
0
9f2bddfc17e6019460fa6c5f1aa28c0f
e98441a21bc455a325b9141f9268426a
Makes the finishing touches to the voltage-curves plot
class EasyPlot: def fix_cyclelife(self, fig, ax): handles, labels = ax.get_legend_handles_labels() if not self.kwargs["only_dischg"]: handles.append( Line2D( [0], [0], marker="o", color="black", ...
1
1310679e21a4bb27824241be1f3b28e1
7a6750a7f846d12d91ae55aea81039ac
Stop the stopwatch when the stop button is pressed
namespace WhackAMole public partial class Form2 : Form private void btn_stop_Click(object sender, EventArgs e) { watch.Stop(); btn_reset.Visible = true; }
1
46158239c65e6e850db75bdeeeaa2b5c
3eea8c7d1fa558ecbd84a73b93ce52b0
просмотр существующих заданий для определённого квеста
try: tasks = Quest.objects.values("id", "title", "date", "status") except: return HttpResponseServerError("Server error!") return render(HttpRequest, "firstApp/tasks.html", { "tasks": tasks })
0
ce78cabeb38c8e99795f2859a44986db
49adb8e416fe53636960f72f8f15bc8d
获取昨日发送数量
public class GuanggaozhuModel extends Model<GuanggaozhuModel> public List<Record> GetTotalYesterday(String pingtaiName) { Zuijinshijian z = new Zuijinshijian(); String startTime = z.StartOfYesterday(); String endTime = z.EndOfYesterDay(); List<Record> yesterdayCount = Db.find("select count(smtime) count from sm...
1
18b89e325429d68e532ccd23e8b2f0b1
af72ffe27a594e48fd7c054e15e7d863
Permite ao instrutor gerenciar os projetos do curso
while True: try: print(''' 1 - Listar todas as turmas 2 - Turmas por semestre 0 - Voltar ao menu anterior ''') choice = int(input("Escolha uma opção: ")) if choice == 1: todas_turmas_prof() elif choice == 2: turmas_semestre_pro...
0
636f9434acb14042ced969474a83a8a4
a86dace69beda7a542f15cdc2e397838
make a friend request
{ $exists = Friends::where('user_that_sent_request', self::getLoggedInUser()->id)->where('user_that_accepted_request', $friendUserID)->where('accepted', '<>', '2')->count(); $exists2 = Friends::where('user_that_accepted_request', self::getLoggedInUser()->id)->where('user_that_sent_request', $friendU...
1
9441b81710c8ef11ae497b3daedb2871
f5af4ca6fca7a3e6e87144139e7a2e78
创建Http驱动
class ServerFactory implements FactoryContract protected function createHttpDriver(array $config) { return new HttpServer($this->app, $this->getDefaultServerSocket($config), $config); }
1
a2cc59f02a1f76ce510226a9af2d4fb1
0c20fa7f49c9eb2ac8b270d66444fda6
如果是报价单位 或者是项目截止后 本竞价项目的上级单位 才可以显示报价
class ProjectService public static function checkProjectUpPartnerOnly($project, $base) { if(in_array($project->type, array( ConstantMap::PROJECT_TYPE_SELF_IMPORT, ConstantMap::PROJECT_TYPE_SELF_INTERNAL_TRADE) ) && $base->buy_sell_type == ConstantMap::FIRS...
0
bc82ae3afd0540c0b0844a7a9403ebfa
cabebf5e59fa5b39b04ab664b3659c2e
returns filename to xml log file.
class Event: def get_xml_filename(self): return self.__xml_filename
1
ccbbb45f4570f5cf6929076e82b6855c
42a24a81287303fb5eaca29048438b27
Retrieve all forms that belong to a user.
class User extends ActiveRecord implements \yii\web\IdentityInterface public function getForms() { return $this->hasMany(Form::className(), ['create_user_id' => 'id']); }
1
f69d480619ecc4910d44b2e2ef1efad7
1629d842f91c242735d682633befe17d
Attempt to register into the application. Will set invalid warnings accordingly if there are invalid inputs or register fails.
public class RegPresenter public void tryRegistration(String nickname, String password, String confPassword, String groupName) { if (!nickname.matches(validRegEx) || !password.matches(validRegEx) || !confPassword.matches(validRegEx)) { this.regView.showToastError(context.getString(R.string.invalid_d...
1