query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
09c4cc4f1a3849bb94c07353a2aaec22 | 42470907734a57bded4e0a560820b5dd | Sets the master signed image of this temp general declaration. | public class TempGeneralDeclarationWrapper implements TempGeneralDeclaration,
ModelWrapper<TempGeneralDeclaration>
@Override
public int getMasterSigned() {
return _tempGeneralDeclaration.getMasterSigned();
} | 0 |
31f5093806a20ecd1a9e3db69bc4e716 | 891a681e1b9ead268291607f4cd234c8 | Trims a given String to the given length. if the given String's length is inferior to the given length, the string is returned unchanged. | function trim_length($text, $maxLength, $trimIndicator = '...')
{
if(strlen($text) > $maxLength) {
$shownLength = $maxLength - strlen($trimIndicator);
if ($shownLength < 1) {
throw new \InvalidArgumentException('Second argument for ' . __FUNCTION__ . '() ... | 1 |
394b3b1946f9887c62b54c7d9f58af6d | 1cc9faddb98a96cf9c717cc05e8e51dc | fastdelete (purgedata) is not a cacheable expression. | EventData() = delete; | 0 |
e32df499634e2ae800b651f70d4f2b70 | 3024139187fb7892ade035557fd90818 | Obtains a span over tuple items. | public static Span<T> AsSpan<T>(this ref (T, T, T, T, T, T) tuple)
=> TupleToSpan<T, (T, T, T, T, T, T)>(ref tuple); | 1 |
9d432f69932b4fbfab1c086b159f9e95 | 51deb33a6c3f7758109f8f744549a0d8 | Apply stylesheet to main QMenu | class AcrylicMenu(QMenu):
def setQss(self):
with open("app\\resource\\css\\menu.qss", encoding="utf-8") as f:
self.setStyleSheet(f.read()) | 1 |
715ff4b87ae827a037dffe530bcf0077 | 3fdcb7e7adbb3262d988ca5be093b62c | Handle a request for an unknown Scope by returning an HTTP 404 | let mut res = ws::Response::from_request(req)?;
res.set_status(404);
res.set_reason("Not Found");
Ok(res)
} | 1 |
321bc2ccca243366c991481f4d177199 | b43ed3c047eb6e0ea28d416894c90caa | Register a @component class in the container.
If the informed class isn't decorated with @component then nothing happens.
This method is designed to be called from within the @component as a self-register solution. It's
not intended for direct use. | final class ComponentDecoratorPass implements CompilerPassInterface
public function process(ContainerBuilder $container): void
{
$serviceId = 'netzmacht.contao_toolkit.listeners.register_component_decorators';
if (!$container->has($serviceId)) {
return;
}
$definition ... | 0 |
5fed8f0cc512157f076fe05035bd412b | 0d9cb3c5f976c7d1a89816b40fe359b5 | Function:根据切片号对图像进行切片和识别. | namespace RSMS
namespace VC4000C
public class TH_PlateID
[DllImport("TH_PLATEID.dll", EntryPoint = "TH_RecogImage")]
public static extern int TH_RecogImage(byte[] pbyBits, int nWidth, int nHeight,
IntPtr pBuff, ref int nResultNum, ref TH_RECT prcRange, ref TH_PlateIDCfg pPlateCon... | 0 |
5104997beeece10960a92ed35cd8d481 | ec160ce33a5ba441440e6acb2a0b1ef3 | 移除选中的样式active | function removeActive() {
const active = document.getElementsByClassName("autocomplete-active")[0];
if (active) {
active.classList.remove("autocomplete-active");
}
} | 1 |
a10fca00d121f46f9bdaac0a202e899a | ca4a5137cb7642d7398cb2ced628913b | This method returns the name of the Query AnotationValue
that is to be used for constructing a query to limit access to study
data. Override this method and replace the null value with the value
that will be used in the query criterion to authorize access
to subjects. | public abstract class DirectEpsgFactory extends DirectAuthorityFactory
implements CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory,
CoordinateOperationAuthorityFactory
public String getValidationQuery() {
return validationQuery;
} | 0 |
7113794ac5100fe73e7d70dfaf4489e8 | be08c50caadf25533faede4b05697e02 | Set the default logging level for log handlers added to registry. | formatterLevel := strings.ToLower(level)
switch formatterLevel {
case "debug":
logLevel = zapcore.DebugLevel
case "info":
logLevel = zapcore.InfoLevel
case "warn":
logLevel = zapcore.WarnLevel
case "error":
logLevel = zapcore.ErrorLevel
case "panic":
logLevel = zapcore.PanicLevel
case "fatal":
logLe... | 1 |
838c6e94db8c3234116c9f035819c18b | 2375a786d3921ccd4d6c3381d3866c58 | Set the write concern to use for the insert. | public final class InsertOptions
public InsertOptions writeConcern(@Nullable final WriteConcern writeConcern) {
this.writeConcern = writeConcern;
return this;
} | 1 |
f3b2414582c7d30e6d1283efffebaa6b | 2a18966e66d31b993b05b97c542ec6f2 | Moves the focus to the nearest node below this node. | class Plasma(Layout):
def cmd_next(self):
self.focus_node(self.focused_node.next_leaf) | 1 |
aedff1da4c083f4d6a877c4e72ac5903 | 0e04fd00efee88c21c2f4ee71b3641e1 | Edits a shared folder in the shared table | public class FilesharingConnector
public CompletableFuture<XMLAnswer> editShareAsync(int shareId, Map<ShareData, String> values) {
List<NameValuePair> queryParams = values.entrySet().stream()
.map(e -> new BasicNameValuePair(e.getKey().parameterName, e.getValue())).collect(Collectors.toList());
... | 1 |
0323534aa06bd3c641b299dc6827e5e6 | af29bc48061da5b37f0f05e4790fd87c | Selects a node to use during crossover or mutation. | int totalSize = inInd._program.ProgramSize();
int selectedNode = 0;
if (totalSize <= 1) {
selectedNode = 0;
} else {
if (_nodeSelectionMode.Equals("unbiased")) {
selectedNode = Rng.Next(totalSize);
} else {
if (_nodeSelectionMode.Equals("leaf-probability")) {
... | 1 |
a8e1eec08c77a03730fe7e0c59e83a4d | bd2e577c1147c40b9a2396192a96f029 | Changes the state determining if the command can execute | public abstract class BaseRelayCommand : ICommand
public virtual void SetCanExecute(bool value)
{
_canExecute = value;
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
} | 1 |
571d3e4a46d6f7de7ad6cfe5db95dbaf | 40358b40082d352ad21f689916c7e391 | Submits a delete by query task
See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html">
Delete By Query API on elastic.co</a> | self, index_id: UUIDLike, data: dict[str, t.Any]
) -> response.GlobusHTTPResponse:
log.info(f"SearchClient.delete_by_query({index_id}, ...)")
return self.post(f"/v1/index/{index_id}/delete_by_query", data=data) | 1 |
f67d6c5045a04128beca805b76040556 | 8b1605f2fd85e509a70a7129f3274075 | 导出多sheet页面excel文件 | public class JxlsUtil
public static void exportMultipleSheetsExcel(InputStream in,OutputStream out,List<String> sheetNames,List<Object> dataList){
try {
Workbook workbook = transformer.transformMultipleSheetsList(in, dataList, sheetNames, "datas", new HashMap(), 0);
workbook.write(out)... | 1 |
0ad08c8adadb67074534884c1df77f37 | b5d2b5364fea1a3225a90be94f62f302 | 批量修改方案状态 | return request(
{
url: `${basic_api_valuation}/scheme/batch-update`,
method: 'post',
data: data
}
)
} | 1 |
a95c722d1713ba2184fbabe036db3ca1 | 9c793a4579009150db8a68ec4f812264 | 重载右侧乘法运算符 | {
QInt temp = rhs;
int sign;
if (*this == QInt(0, 0) || QInt(0, 0) == rhs)
return QInt(0, 0);
else if (*this>QInt(0, 0) && temp>QInt(0, 0))
sign = 0;
else if (QInt(0, 0)>temp && QInt(0, 0) > *this)
sign = 0;
else
sign = 1;
long long bottom[4] = { rhs.arrBits[0] >> 32, rhs.arrBits[0] & 0xffffffff, rhs.arr... | 0 |
7acc5ccb20a354fee9965e6d7a17216c | 2c112ab560a8cbd758ac9326781c3818 | 判断t1树中是否有与t2树拓扑结构完全相同的子树 | if not T1:
return not T2
elif not T2:
return True
if self.isSame(T1,T2):
return True
return self.isSubtree(T1.left,T2) or self.isSubtree(T1.right,T2) | 1 |
8cb6301b3596207966d1de6e295e4ac6 | b1e36e7cf4cd7991e3a3860b3a91187d | Does the basic db connection set up | this.conn = sqlite3.connect(this.DB_FILE)
this.conn.row_factory = namedtuple_factory
this.c = this.conn.cursor()
this.checkDbSetup() | 1 |
743c160341f10b10231d765a8d8aaed3 | 4cc70efef5af3112fd5eb79f7d22bac1 | Обработка действий при движении мыши в рабочей области | if (e.Button != MouseButtons.Left)
return;
PointF mousePoint = new PointF(e.X, e.Y);
DoClickWork(mousePoint);
mouseDownPosition = Point.Empty;
prevMouseMovingPosition = Point.Empty;
} | 0 |
be42e4e948d54e48ef6582998da62cac | 9a490a6c6429df88b8e1a78c6c061e89 | Handle clients sending new- and acknowlegded moves. | void PlayerRemote::AcknowledgeMove(int x, int y) {
try {
client->SendMove(x, y);
if(x == 0 && y == 0) {
int *garbage = new int[1];
GetMove(garbage);
delete[] garbage;
}
} catch(const char *msg) {
cout << msg << endl;
exit(-1);
}
} | 1 |
a909c8a0a1fba7d011de566ee4b43452 | c4109dfe616bce7b5f96abd774d3d2f3 | Formats the dataset according to the Jira table syntax:
||heading 1||heading 2||heading 3||
|col A1|col A2|col A3|
|col B1|col B2|col B3| | export default class ApplicationInsightsQuery extends DataSourcePlugin<IQueryParams>
private formatApplicationInsightsQueryString(query: string, timespan: string, filter: string, table?: string) {
let str = query.replace(/(\|)((\s??\n\s??)(.+?))/gm, '\n| $4');
str = str.replace(/(\s?\|\s?)([^\|])/gim, '\n| $2'... | 0 |
32fc7c8d43aa0ab44fcad9a69dd1585f | 9b8ef5410018e7f450689421712d2ac7 | Retourne l'objet terrain. | public class Terrain
public Eau getEau() {
return eau;
} | 0 |
56d59db9eb30c53158251ff07b791bee | 5f9e5e4fb10e43ec7f1b8337fc5615bf | Eloquent relationship to Manufacturer. | {
return array(
'manufacturer' => array(self::BELONGS_TO, 'DiskManufacturers', 'manufacturerID'),
);
} | 1 |
25e44cd79d94fb296ecd397a32f47249 | b60dd71d2b02a1ca115740f3a7601951 | Hämtar all information om alla anställda i db | namespace TolkesentralenLH.Models
public class DbPerson
public List<Admin> ListeAlleAdmin()
{
var db = new DbNetcont();
List<Admin> alleAdmin = db.Personer.OfType<Admin>().ToList();
return alleAdmin;
} | 0 |
3c4a9952141a760788e6cacdbf3c9242 | e1c710a61dfca59858ee1f85e216d1df | Get default thumbnail geometry | getDefaultStyle(geometryTheme: LooseObject): LooseObject {
return get(geometryTheme, [this.defaultShapeType, 'default', 'style'], {});
} | 0 |
6dd736458d9ad61d69938d541d4c8393 | d5463494eeb7db1f266785cd1973297e | Returns the thumbnail image's metadata, or null if unavailable. | namespace VRPN2.VRM
public class VRMLoader
public Texture2D GetVRMThumbnail(byte[] file) {
var context = new VRMImporterContext();
var meta = context.ReadMeta(true);
return meta.Thumbnail;
} | 0 |
7ce9e89cc652e49307121ed47157191e | 0b707893d3ed31e2ea3ee0241343402e | function to smooth data by median (too slow... do not use) | void do_smooth_5(float *y, int np){
int m;
x = (float *)realloc(y,np*sizeof(float));
for(m=0;m < np ; m++)
x[m] = y[m];
for(m=0;m<2;m++){
y[m] = (x[m] + x[m+1] + x[m+2] )/3.0;
}
for(m=2; m<np -2 ;m++){
y[m] = (x[m-2] + x[m-1] + x[m] + x[m+1] + x[m+2])/5.0;
... | 0 |
2183e7bdaa0368d1651cb45283c45d88 | 51563d6215df36b3f48a030be23b6967 | Get section .text. | IMAGE_SECTION_HEADER* GetCodeSectionHeader()
{
return GetSectionHeader(".text");
} | 1 |
d45380c09c6f73a1a1a72043c2d180c1 | 7388d6c8223f3720d6443225faaeacbf | 验证字符串是否包含一个固定电话号码 | {
if (thisValue == null) return false;
return System.Text.RegularExpressions.Regex.IsMatch(thisValue.ToString(), @"^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{8}$");
} | 1 |
b165f437659c57f8be359ed6ca92af47 | 513022608d406683a1618002cc105f30 | Charge with already used nonce. | {
$subscription = Subscription::findByUid($subscription_id);
$service = $this->getPaymentService();
$service->updateCard($subscription->user, $request->nonce);
if ($request->charge_url) {
return redirect()->away($request->charge_url);
}
return redirect()->... | 1 |
692ec9cae0b690ca523d56d57737b08f | 0872f3c328e5ae83e2c5f9a49ede617c | Estimates the number of records that may need to be updated with a key change | public class DataStoreProxy extends DataStoreBuffer implements Runnable, Serializable, DataStoreInterface
public int estimateRowsRetrieved() throws DataStoreException {
String nullSt = null;
return estimateRowsRetrieved(nullSt);
} | 0 |
07270a3817567aa8378c3ffdbbf64797 | 4582295972d6c5bb79ca3594fe662ac0 | Provides a JSON object for Download Completed Event Args | {
DownloadUpdateEventArgs downloadUpdateEventArgs = ReferencePool.Acquire<DownloadUpdateEventArgs>();
downloadUpdateEventArgs.SerialId = e.SerialId;
downloadUpdateEventArgs.DownloadPath = e.DownloadPath;
downloadUpdateEventArgs.DownloadUri = e.DownloadUri;
... | 0 |
dae7d899a67dd3798f7dcfd2547c1ed1 | e4a481f35b033286f6d277e237eb1918 | 特定IDのリクエストの承認者を登録 | TrnFriendRelation trnFriendRelation = trnFriendRelationRepository.findById(tfrId);
if (trnFriendRelation == null) {
throw new IllegalArgumentException("対象データなし");
} else if (trnFriendRelation.getRequestUserId() != requestUserId) {
throw new IllegalArgumentException("リクエストユーザの不一致");
} else if... | 1 |
c994a0172f1fded9d07620fb0200cbde | e2a3bb44ff11249b190a5c14292fc155 | 获得子委托成交回报 | class ThostFtdcMdCallback : public CThostFtdcMdSpi
virtual void OnRspSubForQuoteRsp(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
std::cout << __FUNCTION__ << std::endl;
} | 0 |
0fc0c25f11a0ef42f6c260dc2208c893 | a124b194b75271f1beda5a71b7e7bf77 | Refresh the given reference if needed. Returns <c>null</c> if no refresh
was needed, otherwise a new refreshed reference. | public abstract void refreshReferenceObject(String referenceObjectName); | 0 |
1098646ebaf0ff856ca203544ba1b0d1 | 2a61eb182a875ae9a9d675f1fab4ebf4 | Find deleted Event CRFs from audit log | $model = $this->loadModel(AuditModel::ACTION_DELETE);
return $model !== null ? $model->created : null;
} | 0 |
94e4ebc5b3c14482486531169815f1e1 | b3928c08642689710c45ed97a9a9950f | Connects to database and returns the customer bill for a given bill id. | public CustomerBill findByCustomerBillId(Integer customerBillId); | 1 |
93526590259773bde654341906935bce | dbdfdde51b5b975e08b88330f3a74032 | Protocol of current reassembly object. | {
uint8_t byte = 0;
while ( fifo_used_count(p_obj->data_fifo) )
{
byte = fifo_s_get(p_obj->data_fifo);
look_usat_byte= byte;
switch(p_obj->unpack_step)
{
case STEP_HEADER_SOF:
{
if(byte == sof)
{
p_obj->unpack_step = STEP_LENGTH_LOW;
p_obj->protocol_... | 1 |
b950fdbd15f35e6f60f45532a17126cf | a0fff051beb477dd9be0ba442720c422 | finds the net graviational force on the projectile | double NetforceY = 0;
for(Planet p : all){
if(!equals(p)){
NetforceY += calcForceExertedByY(p);
}
}
return NetforceY;
} | 1 |
94d9332555543f29a867cf4f50707821 | 6ee26bcd6693955d1826a165f98bcb5f | 相互碰撞后立即转向, 防止扎堆 | class SnakeHeader extends SnakeBase
turnAround() {
const angleDistance = this.toAngle - this.angle;
const turnSpeed = 0.045;
if (Math.abs(angleDistance) <= turnSpeed) {
this.toAngle = this.angle = BASE_ANGLE + this.toAngle % (Math.PI * 2);
} else {
this.angle += Math.sign(angleDistance) * ... | 0 |
27a58037fd1798bb0295ea6a3af7386f | e6824a1bf8ad07ba4c021c3d96876f64 | Returns the GSM BAND to be used from the user specified parameters
or default value | key = "cell{}_1x_channel".format(cell_no)
ch = VzW_CDMA1x_CH if sim_card == VzW12349 else DEFAULT_CDMA1X_CH
return user_params.get(key, ch) | 0 |
2737c5112ed59f7f93ca3f80bf987af7 | 45dc74299ecbe39f89eb1d8a539ea46c | 读取注册表指定路径下的所有配置键名 | namespace MiniTools.Libs.Common
public static class RegistryHelper
public static string[] GetSubKeyNames(string path)
{
if( string.IsNullOrEmpty(path) )
throw new ArgumentNullException(nameof(path));
using( RegistryKey registKey = ClassesRoot.OpenSubKey(path) ) {
... | 1 |
599c72482dcf3d56a3b52f6ee85e8029 | 29e69c87a029ba2870a0ccf39fa76813 | Propagate events to all dispatchers that are registered to the storage and have a subscription to the key event | {
foreach (var subscription in Subscribers)
{
DispatchPolicy.Dispatch(() => { subscription.NotifyEvent(eventInstance); });
}
} | 1 |
c8f057434d769e87302f82fd1b32d825 | 37e8cd0f36bce418b7d685dde27c47e1 | Reprints the board to match updated size | class BoardLabel(QLabel):
def redrawBoard(self):
self.boardImage=np.zeros((480,480,3),dtype=np.uint8)
for i in range(8):
for j in range(8):
self._displayGrid(i,j)
self.sync=True | 0 |
ccca9f18d7a71f4e02fe59370e44003b | bc73c95e4b3fbfeb9e8c06d62798038a | A persistent DyNet parameter collection. | class ParameterServer(object):
def __init__(self):
self.params = None
self.update_step = 0 | 0 |
189d27b68095fdd08d04b03d0d399a79 | 97d107e0690043efa7443425a52ceec5 | # function to make a raster prediction from a maxnet object | if (is.null(newdata))
stop("spatial_predict requires raster inputs; use predict to calculate fitted values", call. = FALSE)
if (!class(newdata) %in% c("RasterStack", "RasterBrick"))
stop("newdata must be a RasterStack or RasterBrick object")
betas <- coef(object)$occupancy[, "Mean"]
if (raster::nlayers(... | 1 |
9acb7d110ee461b1d6393caa9ad22d19 | 4d5c6a148e166a31f9aa7d70cacb2e21 | 编辑缴费编号提交 | public class TfeeDataAction extends BaseStruts2Action implements Preparable, ModelDriven
public String edit() {
brhInfos = tbrhInfoManager.getBrhMapByMng("02");
feeIdMap= tdatDictManager.findFeeId();
return EDIT_JSP;
} | 0 |
33bc7cd346c0aca23cf5fba1ff659a08 | 4ef6c4d40ee0fdaa7c62339281c9b800 | Returns filtered recognitions | def recognizes(*args)
recognized.concat(args)
end | 0 |
57c7493f700ee69b9c45e6cfa9f4f3c4 | dff560a1a5eaae6ea1765cc4f92d17ef | create a canvas the size of the screen | function setup() {
p.createCanvas(window.innerWidth,window.innerHeight);
} | 1 |
ae250ff8e67599bff39658f009aabf89 | 7dbcb41bce3f2f6884088dee4f8d8dfe | Returns the approximate distance in meters between this
location and the given location. Distance is defined using
the WGS84 ellipsoid. | dlat = (loc2.lat - loc1.lat)
dlong = (loc2.lon - loc1.lon) / getLonScale(loc1.lat)
dalt = (loc2.alt - loc1.alt) / LATLON_TO_M
dist = math.sqrt((dlat * dlat) + (dlong * dlong) + (dalt * dalt)) * LATLON_TO_M
return dist | 0 |
79d08aaf6353ffc4c485e4ba6f1a758e | 94d194e20eca578e25e502329372b2e8 | Sets the value of the lockID property. | namespace Amazon.Glacier.Model
public partial class CompleteVaultLockRequest : AmazonGlacierRequest
internal bool IsSetLockId()
{
return this._lockId != null;
} | 0 |
6f80ca373d13f5ff3a58e0a80ebbf13e | b1bc9284178574b47fe35957878f276a | Prints out formatted verion of passed in variable. | function vd($var) {
echo '<pre style="white-space:pre; font-family: monospace; font-size:12px; border:3px double #BED8E0;" margin:8px;><code>';
var_dump($var);
echo '</code></pre>';
echo '<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/styles/default.min.css"/>... | 1 |
f436167a96509c963ea5f5d61f19b088 | 3f62ef496bf037db0aed98dcf21031b7 | logLine: creates a new line with all columns. | return &Line{
Style: DefaultLineStyle,
horizontal: false,
Value: v,
}
} | 0 |
9f4fd9a79892b13ac9d1b05d64386374 | 7f6142948f27b4a4e12ff9429f4fe06d | tests that requests with profiles longer than db model are rejected | def test_http_profile_setname_invalid_lname_long(url, initialisation):
benjamin = initialisation
r = requests.put(f'{url}/user/profile/setname',json={
'token' : benjamin['token'],
'name_first': 'Bens',
'name_last': 'L' * 51,
})
payload = r.json()
assert payload['code... | 1 |
55bc11314d002d54cb1dce5886cb316c | 7f61448ad6da3ef0f9cb03f40c5be655 | Just a normal function | cases like (1) | 0 |
e31af30a8004267faa1038e84c21fdb7 | c595b6d11bd2c72ef5b23de3448add98 | 设置返回结果的offset偏移量 | public function setOffset($resultOffset); | 1 |
e48081861a00ff1260bc8f9eb5adb08c | a4731afffea8136fa3477f447e7e8cfb | Record service metrics for a given published service and mapping info. | std::string service_id,
std::vector<boost::shared_ptr<recordStructure::Record> > & node_rec_records
)
{
GLUtils util_obj;
std::string service_name = util_obj.get_service_name(service_id);
int type = this->service_to_record_type_map_ptr->get_type_for_service(service_name);
boost::shared_ptr<recordStructure::Record... | 0 |
8c9c2f9e88d6d19ebbcb7f3cb7378499 | ba6ea466b149bbe18789d5378dc663e7 | 利用user_id搜索User | class UserDao(UserDto):
def find_by_id(cls, usr_id):
return session.query(UserDto).filter(UserDto.usr_id.like(f'{usr_id}')).one() | 1 |
047552b1918d1070f9e95c70d86dc3b2 | 73e2c211c4ce04aeef7e640e9e8f0fcf | 入库单借方科目 | namespace SkyCar.Coeus.UI.PIS
public partial class FrmPurchaseReturnManager : BaseFormCardListDetail<PurchaseReturnManagerUIModel, PurchaseReturnManagerQCModel, MDLPIS_StockOutBill>
private void txtWhere_SOB_SourceNo_EditorButtonClick(object sender, EditorButtonEventArgs e)
{
#region 查询入库单
... | 0 |
3ac7f59747e3969f6b61ae74069d47e1 | 177abb5d513f946fe2d7d5d00e4cccb4 | Test conversion from the native struct sets columnidcPage. | [Description("Setup the RetrieveColumnConversionTests test fixture")]
public void Setup()
{
this.managed = new JET_RETRIEVECOLUMN
{
cbData = 1,
columnid = new JET_COLUMNID { Value = 2 },
grbit = RetrieveColumnGrbit.RetrieveC... | 0 |
e3d4cae45619eccebeb3ac3455b7a77f | 7037ef77492281fc9e7559787cc24292 | 成对数据的检验 | def test_data(data_iter):
X, Y = get_XY(data_iter)
print(X.shape, Y.shape)
for i in range(4):
A, B = get_XY(data_iter)
assert(A.shape == X.shape)
assert(B.shape == Y.shape)
assert(np.sum(A != X) == 0)
assert(np.sum(B != Y) == 0) | 1 |
5108e90eb7460ad8d86b22de1695bee6 | 02f5013b3737762af4f3c7db64d6c6ef | Sets the vai tro persistence. | public abstract class TaiNguyen2VaiTroLocalServiceBaseImpl
implements TaiNguyen2VaiTroLocalService, IdentifiableBean
public void setVaiTroPersistence(VaiTroPersistence vaiTroPersistence) {
this.vaiTroPersistence = vaiTroPersistence;
} | 1 |
773d1255c6ef6f9e9119ddf05dc47a13 | d82e726927727a6bb9954fbc3a2d97c7 | 链接到内容页 | def link2content(link):
sleep(0.1)
headers = {
'User-Agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/56.0.2924.87 Safari/537.36 ',
'Referer':
link
}
proxy = get_proxy()
proxies = {"http": proxy}
coo... | 1 |
2755b89f22831cfeff1e1c5a9ef0a9a3 | 4c89c1664754dda9e2547174555762cc | Full extends the arm | {
m_ttLeftArmTimer.Reset();
m_bExtendedLeftArm = true;
m_rAnimator.SetBool( m_ParamHashIDs.ExtendedLeftArmParamID, true );
} | 1 |
68760babd79223e7e7a6a346eeacc418 | edc89dc6b86aa90edcf2f92721daf87f | 根据用户的职业类型将用户填写的工作单位保存工作经历表 | {
DateTime startdate;
int jobid=0,scale;
string type = nv["type"];
if (type == "update")
{
if (!int.TryParse(nv["jobid"], out jobid))
{
HttpContext.Current.Response.Write("参数错误");
... | 1 |
20d76c4c09d5052c5b1904b1010aecde | a8abf7393939a4b28668f6bdc7c50c89 | When an eyetracker disappears from the network we remove it from the listview | namespace Scanner
public sealed partial class MainPage : Page
private async void OnScannerRemoved(DeviceWatcher sender, DeviceInformationUpdate deviceInfoUpdate)
{
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
() =>
{
... | 1 |
8254b1e6714048bf24c9c4c8a41239b4 | a585b5db3e30225f9bd067afc12b8517 | GET: Administration/Tests | namespace KnowledgeTesting.Controllers
public class TestManagementController : Controller
public ActionResult Index()
{
return View();
} | 0 |
ef9bbe50552ca064f720c3e7efa40dad | 6429c1f3717ac75c84982f6eb8164302 | Parses timestamps like 12:34.56 and 2s into seconds | def parse_time (st):
h, m, s = st.split (":")
secs, subsecs = s.split (".")
return (long ((int (h) * 60**2 + int (m) * 60) * SECOND) +
long (secs) * SECOND + long (subsecs)) | 1 |
2f01a8a44ad0c6b7ed173da5ece45906 | 319b8d78b35e8d6d78c97e6a43e997b2 | Retrieves the nth to last index from the given array. | ListNode nthNodeFromLast = list.getHead(), temp = list.getHead();
for (int i = 1; i < n && !Objects.isNull(temp); i++)
temp = temp.getNext();
if (Objects.isNull(temp))
throw new IllegalArgumentException("List is smaller than requested length.");
while (!Objects.is... | 0 |
7eb009a81390639a905e227c2b5ee7e8 | 7a306da232cea9d8c0b67ef1f325c0c2 | Function that is used to debug the piezo speaker
if ever a song is not playing in order to make sure it
is still functioning properly | if 'p' in vars() or 'p' in globals():
global p
global song
global playing
p.stdin.write('q')
del p
if song == listlength - 1:
song = 0
else:
song = song + 1
playing = 0 | 0 |
665807f9b3fbb041e0ba29f47af36214 | 212e5a5eeaa93b19e54945096d5726f9 | Adds a new failure object to the list with key and text message | class ExceptionAggregator(Exception):
def add_row(self, failure: str):
self.failures.append(f"{failure}") | 0 |
7136fb48aff7bfe345ed0ec36fa77935 | a33e8ab9f94dcf7639dbfdf8b0b0d1ef | Set the body that this point is fixed to. | public void setParentBody(StdBody parentBody); | 1 |
039be055e015a40d72dfa0d3c4189055 | b919683e4dfb6156a9059449d3501891 | Returns a snapshot of the 'connections' section of the Keymaster data
store. | url = self._http_connection.url + '/connections'
response = requests.get(url, auth=self._http_connection.auth,
headers=self._prepare_request_headers(),
timeout=self._http_connection.timeout)
response.raise_for_status()
retur... | 1 |
c7c0d7280f92c824c68b822965c2ad2e | d90ef95889ab3a085710795861191f02 | Create the directories required to build the documentation. | def create_required_directories():
paths = [PATH, PATH_STYLE, PATH_CONTENT, PATH_GENERATED]
make_dirs(paths) | 1 |
e8580f364784e7ed4ae17249d7ffd512 | 6b3328afc1bd50ae25537de0c99a005b | 模糊手机号查找 | if($request->get("phone") === ""){
return response()->json([],200);
}
$a = DB::select("select * from personal_user where user_id != '0' and phone like '".$request->get("phone")."%';");
if(count($a)){
return $a;
}
else{
return response()... | 1 |
a5c7523d21c0b858c519aa39094bac93 | f676cc70816754ab8fbe378908fa77a3 | Calls :meth:`grpc.Future.result` on attr:`future`. | class RunnerFuture(Object):
def result(self) -> RunnerResult:
return _ffi_api.RunnerFutureResult(self) | 0 |
118be700151a618a8505026caad10d25 | 1e55313308c867790a08a9df8f1acf8a | 将字符串转换为in流,默认utf-8编码
<p>
<p> | public final class UtCoIOUtils
public static InputStream toInputStream(CharSequence input, String encoding) {
if (input == null) {
TTLog.error("IOUtils-toInputStream ERROR: CharSequence is null.", UtCoIOUtils.class);
return null;
}
try {
return org.apache.comm... | 1 |
73d5c204a5469466b0a8bb40674f3382 | b373cf62240753a2e9a66b9686e5bf7c | Renames currently selected role. | bot_commands.edit_name(new_name, current_name, discord_uuid=discord_uuid)
await self.bot.say('{}, **{}** has been rename to **{}**.'.format(ctx.message.author.mention, current_name,
new_name)) | 0 |
156927789f7cfacc8460d3e3b2cbeb7b | 91b5d827721581f50bc5c81a27802069 | function for checking promo code before checking out | $_promo = Input::get('promo', '');
$_promoID = DB::select(' SELECT id FROM promocodes WHERE pr_code = ? LIMIT 1', [ strip_tags(trim($_promo)) ] );
if( count($_promoID)>0 ){
$_status = $_promoID[0]->id;
}else{
$_status = 0;
}
print js... | 1 |
1a9bee2b89ebe04ace3f04b426202aba | 51dca508b823343f7ec47ee591e9c01d | Initialize the GATT Bearer functionality | void gatt_init(void)
{
ret_code_t err_code = nrf_ble_gatt_init(&m_gatt, gatt_evt_handler);
APP_ERROR_CHECK(err_code);
err_code = nrf_ble_gatt_att_mtu_periph_set(&m_gatt, 64);
APP_ERROR_CHECK(err_code);
} | 1 |
9a8e9330435e4958f52444ccf8840f89 | f5f64750f25b72d1fe48797b2c1b2af5 | Presently justs lists a few hardcoded IDs | def boarding_pass_ids() -> List[int]:
return [357, 567, 119, 820] | 1 |
f5b0ce01312e5ac321c273674507ab41 | 506bd2050cf2b0c240dbb7d5cd27f6c1 | 解析请求头,请求头字符串格式如下:<br> | public class Utils
public HttpHeader parseHeader(String request) {
HttpHeader header = new HttpHeader();
String[] strings = request.split("\r\n");
String[] firstLine = strings[0].split(" ");
String[] map;
header.setMethod(firstLine[0]);
if (firstLine.length > 1) {
header.setUrl(firstLine[1... | 1 |
fc82a673799c78e30da0b428812e529d | cae8c45edb7f3a2c0f859f519405ef0b | Set the mute state of the current audio client. | namespace Volumey.CoreAudioWrapper.CoreAudio.Interfaces
int SetMute([In][MarshalAs(UnmanagedType.Bool)] bool newState, [In][MarshalAs(UnmanagedType.LPStruct)] ref Guid eventContext); | 1 |
9b0957db25ec01d6419115be8bb8554a | d3e8888d49a348016d5e884cfbf6e3fb | detectBeat(self, audioSample)
Author: Dan Boehm
Description: Returns a boolean representing if the audioSample given
represents a beat. | uint16_t values[N_ITER];
static uint8_t beat=0;
static uint16_t indexBeat=0;
static uint16_t beatVal=50;
static uint16_t noBeatCount=0;
static uint16_t offset=0;
static uint16_t minVal=400;
PORTA |= (1 << RESET);
_delay_us(10);
PORTA &= ~(1 << RESET);
_delay_us(80);
for (uint8_t i=0;i<N_ITER;i++){
PORTA... | 1 |
1cd905e2bfb7d9bfddc82559feae45ac | da0107f7ac08c5055039324f79048a44 | List all of the members of the provided list by name. | class RedisStorageEngine extends BaseStorageEngine
async getListMembers(listId) {
return this.client.smembersAsync(listId);
} | 1 |
2f41de101cb222869712bf493ffb154c | 7e18f098dd95d786de8984b984ff2b9b | Updates the score value based on the number of rows removed this turn. | public class ClassicGameActivity extends BaseGoogleGamesActivity
private void updateScoreWhenClearLines(int linesCleared) {
int factor;
switch (linesCleared) {
case 1: factor = 40; break;
case 2: factor = 100; break;
case 3: factor = 300; break;
case 4: fa... | 1 |
be774328bbbd4df378dff90b3951f8d5 | 81225f27b46c96d0644e99edefdfd2b1 | 根据属性和要返回的记录数目获取对象实体列表 | namespace TinyFx.Demos.demo
public class S_logMO : MySqlTableMO<S_logEO>
public List<S_logEO> GetByProperties(string properties, int top_)
{
return GetByProperties(properties, top_, string.Empty, null);
} | 1 |
c09002bfe185ddd026344afb156cf4ba | 64a4780c9ea63b9cad31d61ab129a8cf | キャンペーンの開催状態をセット | if ($this->status == self::STATUS_DRAFT) {
return self::CAMPAIGN_STATUS_DRAFT;
} elseif ($this->status == self::STATUS_SCHEDULE) {
return self::CAMPAIGN_STATUS_SCHEDULE;
} elseif ($this->status == self::STATUS_DEMO) {
return self::CAMPAIGN_STATUS_DEMO;
... | 1 |
24667a9129dcc58dcd2f9cbd053c2e9b | 752d560d5ded309174bb39de986ecf17 | Initialize solver. Initialize all of the physics classes specified
as 'on' in the config object. | {
solverStatus = true;
spawnedObjects = 1;
initSolverFBOs();
time = std::chrono::high_resolution_clock::now();
lastSpawn = time;
lastRender = time;
return true;
} | 0 |
be0e88422341d2c769a760d600dfae12 | 8ff24975168cb7dc3ca540b0022edf9d | Creates a new NETCONF device based on the supplied information.
the connection. | try {
NetconfDeviceInfo deviceInfo = new NetconfDeviceInfo(
VOLT_DEVICE_USERNAME, VOLT_DEVICE_PASSWORD,
IpAddress.valueOf(VOLT_DEVICE_IP), VOLT_DEVICE_PORT);
NetconfDevice netconfDevice = connectDevice(deviceInfo.getDeviceId());
Fujitsu... | 1 |
2bfa4810420ee8cc20f846a1cb2408c2 | fa32e3a4c0b3d25e3fcd4478c5d26bb0 | Se actualiza la valoración de un contenido | {
if($this->id == 6) {
$currentNegativeValorations = $this->getNegativeValorations($idIncidence);
if($currentNegativeValorations==-1) {
$query="INSERT INTO valoraciones (valoracion_neg,usuario,incidencia)
VALUES (1, ".$this->id.", ".$idIncidence.");";
... | 1 |
882038add3243cc3f7322daf54cc514a | 17142008ba4d69d7efea79caea914cd3 | 微信扫码支付测试 | class WePayTest extends DurianTestCase
public function testQrcodePay()
{
$options = [
'number' => 'eslot17',
'orderId' => '201804090000010782',
'paymentVendorId' => '1090',
'amount' => '500',
'verify_url' => 'payment.https.open.goodluckchina.net',
... | 1 |
6d989615767ad46f243a5aad3cb0eb9c | 1949658a045f152ce80700e4e2231e63 | double getNominalVolt();
Donne le voltage nominal (Volt normal). | namespace rmf_battery namespace agv
double BatterySystem::nominal_voltage() const
{
return _pimpl->nominal_voltage;
} | 1 |
f672c5e13ac8f07df0218f81e6054cac | 2dc29df0a1c52bb823ab17f72e776b85 | Changes the wavelength range of the IFU data cube to the range within the given start and end values | ilo = self.closest_spectral_channel(lo)
ihi = self.closest_spectral_channel(hi)
if ilo > ihi:
ilo, ihi = ihi, ilo
ihi += 1
wcs_slab = self._wcs.deepcopy()
wcs_slab.wcs.crpix[2] -= ilo
if self._mask is None:
mask_slab = None
else:
... | 1 |
78025abfa92c4c134db602d81551bb22 | 68a8dc087a5868901d8b4f0bb3f91bf5 | EllipticCurve initialization, params: a, b, p | self.q = q
self.a = a
assert is_prim(self.q)
assert is_primitive_root_mod(self.a, self.q) | 0 |
859679291efeb315b2ebe8c34384e156 | 4e6404484733bc0d2addc31345b8510a | Tests if the accessflag has the varargs flag set. | public class MethodStaticContext extends AbstractStaticContext
public boolean isMethodVarArgs () {
return __methodAccessFlag (Opcodes.ACC_VARARGS);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.