query_id
string
corpus_id
string
query
string
code
string
label
int64
dbc7444761656cab42122177041530c9
6cc2137c659dd660dab4fa7122561a93
The database end time for a collection obtained through {@link org.openntf.domino.Database#getModifiedDocuments()} in Database. <p> This time should be specified as the "since" time in a subsequent call to {@link org.openntf.domino.Database#getModifiedDocuments()} where you want to get all modified documents since the ...
class IConfigPrx(_M_omero.api.ServiceInterfacePrx): def end_getDatabaseTime(self, _r): return _M_omero.api.IConfig._op_getDatabaseTime.end(self, _r)
0
8ed6c0310d1db3fac667bc801e1a6f44
ed928d0eb8bc5ede25436c80d913da64
Solution Given preorder and inorder traversal of a tree, construct the binary tree. You may assume that duplicates do not exist in the tree.
class Solution(object): def buildTree(self, preorder, inorder): if not preorder: return None return self.buildTreeFromPreIn(preorder,0,len(preorder)-1,inorder,0,len(inorder)-1)
1
9afdfca882c83adc425ac221177556d9
8c98bb9a3cfa01cc755a005db461d588
Test various Python types.
class TestTypes(unittest.TestCase): def test_types(self): assert types.type_class("str") == str assert types.is_builtin_type("str") assert types.is_collection_type("map") assert types.is_collection_type("seq") assert not types.is_collection_type("str") assert types.is_sca...
1
cab8fc7e155b773e9e75121d714a9c39
44e68e825ee30b955beb33baabe228fa
Escape a string for insertion into a `cmd.exe` command line
if not arg or re.search(r'(["\s])', arg): arg = '"' + arg.replace('"', r'\"') + '"' return escape_for_cmd_exe(arg)
1
0d8608fa7e5c7a7bcb92e2245288b00b
446b7976349f4412db10980cdf9faf17
check if the current file is a supported pdf extension
{ $myFile = strtolower(basename($path)); if (strpos($myFile,'.pdf')!==false) return true; if (strpos($myFile,'_pdf')!==false) return true; return false; }
1
7cb6f65c38f32a062c45d3b37749fa84
095b68abe18815a437594e730f1d2740
Action для додання товару до кошика за допомогою асинхронного запиту
namespace TabkeFiveWebApplication.Controllers public class CartController : Controller public ActionResult AddToCart(int? Id) { var currentCart = Operation.GetCurrentCart(); currentCart.AddProduct(Id); return PartialView("_CartPartial"); }
0
3b19d52afc66353bb6fc578c3d96a6a9
c0fe88867a9a9dae4a9cca9149e1ea6b
Determines whether the Range is to be Inclusive or Exclusive. If Inclusive, the range end points are part of the query values that can hit.
public class MaxValidator<T extends Comparable<T>> extends AbstractFieldValidator<T> public boolean isInclusive() { return inclusive; }
1
76951d4a5f241f90aee4438eb4b00f91
e6c09248f45e0c9d73790553f43bb0ae
Update an instance of the model from the database.
namespace ORMi.Interfaces Task UpdateInstanceAsync(object obj, string query);
1
6b0ae7e281cc18fad32320b11d76f4ff
206092bb2ca9cf993048f776fa3914fe
#Create all eight required dataframes.
{ for (rdatafile in rdataPaths) { print(paste(rdatafile, "is loading")) load(rdatafile) df <- list2Frame(dt, isViewFrame = isViewFrame) rm(dt) df <- splitLightningDate(df) framefile = sub(pattern=".RData", replacement = "_frm.RData", rdatafile) print(paste(framefile, "is saving...")) ...
0
a8488611a4c7212708ccf07a04af8842
d5572df28b42b5f2a8a6a7a3a09860a8
Helper function to find the StoragePoolCollection path
public abstract class AbstractProjectPaas extends ReadBasedMetric implements ReadBasedExpandable @Override public String getStorageCollectionName() { return getStorageCollectionName(MetricType.PROJECT_PAASES); }
0
6dbc7ebfa4059f6f21e7f825fea129bb
693573b4a02f066970ea93708b4565c8
主体责任清单统计
@Controller @RequestMapping(value = "${adminPath}/sjcx/czzSjcx") public class CzzSjcxController extends BaseController @RequiresPermissions("sjcx:czzSjcx:show") @RequestMapping(value = "countdata") public ModelAndView countaqjc(CzzSjcx czzSjcx,CzzAqkh czzAqkh,CzzAqsgbg czzAqsgbg,CzzWxygl czzWxygl,CzzYhpc czzYhpc,Cz...
1
f9d98009a31988894ffed8475b8be240
eeb06a1f4944ab0afe3e93cbe038c3ab
Get the number of points in the entire ECG. <br> <br>
int getNumPoints();
1
f0fd5957afae914517475447f504e4fd
7aab0839316767e066c44540b08ff62b
跳转编辑模型维度 第一步
public ModelAndView goEditModel() { ModelAndView mv = new ModelAndView(); List<String> ids = new ArrayList<>(); PageData pd = this.getPageData(); mv.setViewName("system/modelsManage/modelsEdit"); mv.addObject("msg", "editModel"); try { pd = elevatorManageS...
1
0d1f7b4f153d05fdd474b21346a0733f
b393890d1f2ff73fbfde4c3948840fcf
PATCH /producttypes
{ $res = ApiHandler::parseMultiple(new ProductType, array('name'))->getResult(); return Response::json($res, 200); }
0
aa49aae5940dd217324fa52553cda663
94cd0e874637c3f679be75e64489cb79
Helper function to read a fits table file and translate into a astropytable
def load_pandas_from_fit(fit_file_path): dat = Table.read(fit_file_path, format="fits") df = dat.to_pandas() return df
0
d8bd4d2914e97730da0007795286fb95
65fbb11b3c3f446abee1589d0f9f08c4
장애물과 자동차가 충돌했는지를 파악하는 함수
output = input.clone(); float descent_rad = heading + CV_PI/2; float heading_deg = heading * 180 / CV_PI; float carCenX = point_car.x; float carCenY = point_car.y; Point2f carCen(carCenX, carCenY), pts1[4]; Size2f carSize(car_height, car_width); cv::RotatedRect rotatedRectangle(carCen, c...
1
a76006a5fd456653bff6a5b426194621
18415cf111a3700be55af338bedb41ca
设置字段authorDetailInfo_id的值,该字段的<br> 字段名称 :作者详细信息表ID<br> 数据类型 :varchar(32)<br> 是否主键 :false<br> 是否必填 :false<br>
public void setCO_AUTHOR_ID(java.lang.Integer value);
0
8d7baa87a5ab49863dd0b050d879d44c
86cddee6033010140ec58b909c667d31
share버튼을 누른 후 kakao를 누를 시 카카오링크를 통해 일지를 전송할 수 있다.
public class AboutUs extends AppCompatActivity public void ClickShare(View view){ Homeact.redirectActivity(this,Share.class); }
0
9f60dbed7b5cb4785cc2ac19909ecff2
8ed0eba055fda74e0c884d08546bc299
获取回款中的优惠券出借项目详情
CouponTenderDetailCustomize selectCouponTenderDetailHjhCustomize(Map<String,Object> paramMap);
1
a83684f4924c4cfafa465656336f4056
6e96d19f17d2f7d0cd3d4432c5e2e764
Simple function to feed animal.
class RoadEast(object): def feed_cattle(self, inCattle): return inCattle
1
0d29e5a5bee74f4f604fc1b31c5a73e5
9dc3353c5ab583512759e6603582d700
test if the users list page is reachable
class PrivateDataTestCase(TestCase): def test_user_list(self): res = self.client.get(USERLIST_URL) self.assertEquals(res.status_code, status.HTTP_200_OK)
1
1410643f96865360b9f7230304c3fb15
060e2476de8bf5167877312c55a53530
Sets the number_of_pairs of this AggregatedCorrelation. number_of_pairs
public class Pair extends AbstractElement public Pair setToNumber(Integer To){ this.to = To; return this; }
0
69f6d299652f2a41564d08410b4cc35b
c64a30aa03a8cc8adfd98f2aa6bb588a
Checks if the inode given to it is valid
int valido = 0; if(name == "mbr" ||name == "disk"||name == "inode"){ valido = 1; }else if(name == "journaling"||name == "block"||name == "bm_inode"){ valido = 1; }else if(name == "bm_block"||name == "tree"||name == "sb"){ valido = 1; }else if(name == "file"||name == "ls"){ valido...
0
894c50c8816c9f5096b7fad8153906a9
34a607048ec8e182fff48338dfbe1ed0
empty because no properties needed.
public class WizardSummary extends WizardStep @Override public void collectProperties(Map<String, String> properties) { }
1
e1388ab7e59257a35b6dda791cfb74eb
8323c1144e628681f439ffc11d9c4d18
Exit a parse tree produced by {@link RegnaParser#mid}.
void exitR(GrammarParser.RContext ctx);
0
ba29443bd303f873083ea60f4ff79009
6153cb4c730700030ac1955b92b558e4
向V1签名的apk中添加渠道信息
class PackChannelApk: def modify_channel(self, channel): tempxml = '' f = open('%s\AndroidManifest.xml' % self.setupdir) for line in f: if line.find(channel_meta_data_name) > 0: find = re.search(r'android:value=".*"', line, re.M | re.I) if find: ...
1
effa3a4d8acd4d95c3c21cdd58255187
8126f846c920a4f3fa2b8aacef75e359
取队列数据入mysql库
class GetPageUrl(object): def dataToMysql(self, dataList): if dataList: for row in dataList: self.save(row[0], row[1], row[2])
1
c9552dba341e10462fd35e35da0e8361
bbc6f3aef7def42298ee438b91e88189
Decodes integers into string based on the decoding dict.
def int_to_char_decode(encoded): return "".join([index_map[i] for i in encoded])
1
4e1fbce81784b2ff3801be3fac089e94
a3da3cba26b69dee9edda35d3e31aecb
根据不同条件获取StockItem数据
namespace IDAL IList<StockInfo> GetStock(IEnumerable<SearchCondition> conditon, SqlConnection conn);
1
557617a2dd436850a474103840ccb97e
bbfaee2922770672d1ffd6da9cf3ee7f
<p> Creates a batch inference job. The operation can handle up to 50 million records and the input file must be in JSON format. For more information, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/creating-batch-inference-job.html">Creating a batch inference job</a>. </p> Provide a valid value for the f...
{ var options = new InvokeOptions(); options.RequestMarshaller = StartBatchJobRequestMarshaller.Instance; options.ResponseUnmarshaller = StartBatchJobResponseUnmarshaller.Instance; return InvokeAsync<StartBatchJobResponse>(request, options, cancellationToken); ...
1
6b463d8000765492c61529713b044094
dd2c364bb75675a959b5f6047f60f451
Private slot to switch the status monitor thread to On.
class ProgressPage(BasePage): def _on_thread_finished_main_thread(self): self.completeChanged.emit()
0
4e31d9b810eddce8c5ae8956c109d906
95f2b496a960c4e2124043dd3817fe15
converts hkl (U31,U32,U33) to colour in cubic stereographic triangle
{ var h = new CoordIjk(); decimal a1 = Math.Abs(v.X); decimal a2 = Math.Abs(v.Y); decimal x2 = a2 / Constants.H3.M_SIN60; decimal x1 = a1 + x2 / 2.0m; var m1 = (int)x1; var m2 = (int)x2; decimal r1 = x1 - m1; ...
0
db1f10b8ae6556d0b6c54135a25f5678
4b66b4d34ae0d1db18ef617f183d5361
停缴参保人详情
namespace App.Areas.Insurance.Controllers public class ReductionEmployeeController : BaseController public ActionResult Info(string id) { string cityname = ""; InsuranceEmployeeInfo EmpInfo = GetEmployeeInfo(id).FirstOrDefault(); ViewBag.EmployeeId = id; ViewB...
1
c4024cdb77dec11202af384ae5359bb7
9f8828afc056993247de26b12fb5ed97
Gets the node settings object.
public TwfBaseNodesetting getNodesetting(String nodeId);
1
13c7210f3be8d88934b77ee241e0e648
e05a653a8ce93aea5a5eb2ef1dbc79b2
Set the indicator hover foreground colour.
class VMenu public function setBGHoverCol($bghovercol) {$this->bghovercol = $bghovercol;}
0
1984bccdb3349556394e36681c2f2545
08cc70d7fc7a628c90bad4535de70daf
Returns whether the value of the '{@link org.switchyard.tools.models.switchyard1_0.spring.ThreadsDefinition#getMaxPoolSize <em>Max Pool Size</em>}' attribute is set. <!-- begin-user-doc --> <!-- end-user-doc -->
public void setMaxPoolSize(java.lang.String value);
0
1b0fc29c310909b818f3c71711974db4
08ce8643436fb2ef2685504537a9d3a1
Returns the meta object for class '{@link org.ifc4emf.metamodel.express.expressions.Selector <em>Selector</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getDecorator_Selector();
0
482ba58fdad8a7e4c05ea2fd12203717
89e7aa6b1c834484332cb5c9fd2d8da5
使用KV键值对的简写访问仓库信息
public PartialWarehouseEntity getByKey(@Param("key") String key);
1
cb212a8f72433a9a1f57fcd7f54d2dd3
861f12976d9c6d18b0959a8839fbce6e
Clears the com_modules and com_plugins cache. You need to call this whenever you alter the publish state or parameters of a module or plugin from your code.
class WP_Hummingbird_Module_Smush extends WP_Hummingbird_Module public function clear_cache() {}
0
cd00ecd5638488470386cae44de02b74
4e6e74739460ac00168e2fac2e6135fe
Generates a Replay version of the current module. Returns null if the module has no data.
namespace WotDossier.Applications.ViewModel.Replay public class PhisicalReplay : ReplayFile public override Domain.Replay.Replay ReplayData(bool readAdvancedData = false) { if (PhisicalFile != null) { return ReplayFileHelper.ParseReplay(PhisicalFile, ClientVersion, re...
1
81b5a33e4ad0c3d04434e286e462ddc5
66274ec3e48388ee4f41497df02c8087
go back up in crumbs
if(breadCrumbs.Count > 1){ Destroy(breadCrumbs[0]); breadCrumbs.Remove(breadCrumbs[0]); breadCrumbCounter -= 1; } }
1
3c60f85fcba714011ee89373cc13646a
5dea190e40413daab5062920e08eacb7
() -> None Clears the contents of the zip folder.
def clear(): return zwi.clear()
0
4ca62e02ed00dfe0dc9c02bfa22260a7
25a998886a5b8702d3c5b75e291fda66
D2H
static inline void ld_h_d(emu_state *restrict state, uint8_t data[] UNUSED) { REG_H(state) = REG_D(state); state->wait = 4; }
1
8f46a28b53d70ddfdc9194bb49bc086f
8f6a51587d955196958b75547144e8f4
Adds a configured test logger, based on Serilog, that collect logs.
{ if (builder is null) { throw new System.ArgumentNullException(nameof(builder)); } builder.Services.AddSingleton<ILoggerProvider, MicrosoftExtensionsLogProvider>(); return builder; }
0
2e6d481b865a598ada3915135b960db4
782afa6254fe714662e4a9f6b32a5f86
获取 权限所有者类型。 <p> 1:用户;<br /> 2:角色;
public class MUserInfo implements Serializable public Integer getPersonType() { return personType; }
1
db60ddf47db47a17ea0cab3b3d563450
dd5d8476401c2948d14de55af1c372ab
Given two postags, give the log transition probability of P(tag1|tag) Please refer the `foundation of statistial natural language processing`, Chapter 10
class HMM: ### Helper file I/O methods ### # Reads a labeled data inputFile, and returns a nested list of sentences, where each sentence is a list of TaggedWord objects def trans_prob(self, tag, prev_tag): return log( (self.tag_tagcounts[tag,prev_tag] + 1) / (self.tag_counts[prev_tag] + (len(self.tag_counts...
1
47bc0e133b9c7f07b9f56d23027fb32a
eb82074f40463e1c015618f25ec254da
Get translation in given language or in any of fallback languages
final class Translations public function get($key, $language = null) { if (is_null($language)) { $language = $this->default_language; } if (!in_array($language, $this->available_languages, true)) { throw new \InvalidArgumentException('Language not available.'); ...
0
521d1137591e98edd4ffdbcd461d7276
e0bca5dc2e3a9dc40415ce116e4209bf
Check to see if looker is looking at the targetPos Shamelessly stolen from: https://answers.unity.com/questions/503934/chow-to-check-if-an-object-is-facing-another.html
{ Vector3 lookDirection = target - origin; float angle = Mathf.Atan2(lookDirection.y, lookDirection.x) * Mathf.Rad2Deg - 90.0f; return direction * angle; }
0
02ed577fb6e5c46ee2e3f863bddfe6cd
829ddfedda527778615eb0c6898500ab
域名转换为ip
{ if (! $domain) { return 'Unknown'; } $ip = gethostbyname($domain); return $this->getIpFrom($ip); }
1
5a8f1c627a572c6dab91621040f179ea
d68dc88f37c108d96d7008b3414b9b3b
fonction utilisé pour convertir (0,1) du fichier texte en type boolean(true,false)
class graphicsGenerator(object): #Initialize booleans def str2bool(self, text): if text == "1": return True; elif text == "0": return False;
1
3a011a40a1ceaf34357afbfc88264e8b
5b7677e858ffb94e2a326c06e4f15596
Prompt the user to confirm deletion of location items(s)
public class Editor extends AppCompatActivity implements LoaderManager.LoaderCallbacks<Cursor> private void showDeleteConfirmationDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.delete_dialog_msg); builder.setPositiveButton(R.string.del...
1
c7f9876409514c9108a0ed5a2375340e
374a2e48c9b2c35bc87d6607d2d90b47
checks every shortest path to every coin on the map, and chooses the minimal path with the minimal steps to get there
void shortest_path(Graph *graph, Point start, Point goal) { Point invalid, current, open; SETINVALID(invalid); open = open_vertice(graph,invalid,start); while(VALID_PT(open)) { current = min_open_vertice(graph, open); if(pt_eq(current, goal)) { break; } else { open = close_vertice(...
0
7122058157e5351d8c47fe01ad5632b2
78a09eeb5e9f8fe7d7066a6ad8d3673f
This function get an index in form (a, b, c) then it returns equivalent position in 1d
def get_index(x): return x * 4 * 2
0
dfcd455cc826570cb3688cacfe76d07e
a8ca04a7c9c267da530a991bed0d2c4d
Invierte el signo de la fracción
MixedFraction res(sign * -1, intPart, numerator, denominator); return res; }
1
27724cced034b9d7ed590edeaa3f6d20
d9dcdbf47bd9ab874ada084cebc6eb07
into format accepted by model.fit
def format_data_for_training(data): training_input = [] training_output = [] for d in data: features, expected_output = d if len(expected_output.values()) == 0: continue features_matrix = [] for planet_id in range(PLANET_MAX_NUM): if str(planet_id) in ...
1
91dad93581cddd2b93dedb407db1b9f9
09b3bf21f73841116006bea1977c1ed0
Target CRF level. Must be between 10 and 36, where 10 is the highest quality and 36 is the most efficient compression. The default is 21.
class LevelH264 extends \BitmovinApiSdk\Common\Enum public static function L1_2() { return new LevelH264(self::L1_2); }
0
67de41bc0abcf55788517255f67ae4ac
f8696d9e24e7e5b07809387c24f998ca
将Java对象List转换为JSON字符串,使用Gson API
open class BaseListConvert<T> @TypeConverter fun converter(list: List<T>?): String { return Gson().toJson(list) }
1
5911b616691fdc59b5771d1e0b318259
80913c07f9c3e9d64fc2da285a9bc3ca
Check meas units Check which measured units are accessible from SQL database
MySqlCommand Query = programForm.Conn.CreateCommand(); Query.CommandText = "select * from measure_unit"; MySqlDataAdapter MeasureUnitAdapter = new MySqlDataAdapter(Query); DataSet DSet = new DataSet(); MeasureUnitAdapter.Fill(DSet); programForm.Conn.Close(); CbMeasureUnits.DataSource = DSet.Tables[...
1
f7f006eef1a5cf321a74dcb6a457f128
7dc3a3083f4186b4846dcca498730e60
Check rooms state on given <paramref name="currentTime"/>
namespace UKParliament.CodeTest.Services Task<ServiceResult> GetAvailableRoomsAsync(DateTime startDate, DateTime endDate);
0
272c17a67f081e5cb8091e7bb5bee445
7d165c2ab99b3549b8dc0e73cb4e248a
通过商品id获取商品图册
getComImg(param){ sql = "select * from picture where commodity_id="+param.id; return pool.execute(sql); }
1
50fc07b20b55175ccd2cef3041732cf4
80b3a47aebc811a16dd1c32b3e7b2b7f
Returns how many links a crosslink have x,y current crosslink coordinates
{ int toReturn = 0; int count = 0; AListNode *traverser = graph2D[x][y].head; while (traverser != NULL) { count++; traverser = traverser->next; } toReturn = count; return toReturn; }
1
642f621020acc37955052ea48804890f
d5475dc2318db7e506b5388657171071
computes idiosyncratic risk
improvement = ( self.portfolioReturn - self.benchmarkReturn ).fillna( 0 ) volatility = self.volatility ir = improvement / volatility ir.replace( [ np.inf, -np.inf ], np.nan, inplace=True ) return ir
0
80f23dd7e5dc4e4d0765f92d117cdb86
8de6f2f64c30e09a2f9599b3d4b8d8a2
处理数字确认键,仅处理ATV和DTV,如果有之前有数字键按下,立即切台。
{ if (talklogic_SessionExist() || dsskey_IsDsskey(iKeyCode) || iKeyCode == PHONE_KEY_VOLUME_DECREASE || iKeyCode == PHONE_KEY_VOLUME_INCREASE || iKeyCode == PHONE_KEY_INPUTMETHOD_CUSTOM_KEYBOARD || voice_IsChannelKey(iKeyCode) || ...
0
fc6ab407265849e5a5afe3b4486a9d25
120220d399b099fe084754949e234f42
获取当前h/m/s/mills及角度.
public class Odometer implements TimerListener{ public double[] getPosition() { synchronized (lock) { return new double[] { x, y, theta }; } }
0
f4b2066a70277e5cb5dcce83504b84ac
20c68579bcaf7d6f3374dc09bd71a474
Read inputs from Google Sheet
creds = None if os.path.exists('token.pickle'): with open('token.pickle', 'rb') as token: creds = pickle.load(token) if not creds or not creds.valid: if creds and creds.expired and creds.refresh_token: creds.refresh(Request()) else: flow = Installe...
1
8143421d2c9ef01ab00d759df1da4185
377028b596acbd6b64b9198e06995da7
将处理后的数据写入excel中,行列自适应
csv_path = cfg.excel_path try: csv_df = open_excel(csv_path) data_fmt = [str(item[0]) for item in data] csv_df["完成情况"] = data_fmt csv_df.to_excel(csv_path, index=False, encoding='utf-8') return True except Exception as e: logger.exception(e) return Fal...
0
fa15db7251042734b9b8da8f815debc7
ef726f38afc87cbc6fd9bf79767df83b
Calculate cumulative win/loss for each round.
for idxB, playerB in enumerate(self.players): for idxW, playerW in enumerate(self.players): if not self.diagonal and idxB==idxW: continue g = Game(playerB=playerB, playerW=playerW) for _ in range(self.n_games): ...
1
1bd30b14dc89bd6d1fc1059e3059b884
c2dbdb303e60451a15a2302c3a62dd51
Set if even one utm value in _GET will overwrite all utm values or not.
static VALUE request_allow_overrides(VALUE self) { request_data *data; data = get_request_data(self); return INT2NUM(ap_allow_overrides(data->request)); }
0
9bd6f0f4fecff96fa3c3b1b8ff5c4ab3
96d2f27f97552491167b64f9b1d46266
Update all active mons
class mon_implementation_base(object): def active(self, **kwargs): u = mdl_updater.model_updater(self.model) u.hostname_refresh() q = mdl_query.mdl_query(self.model) return q.mon_active()
0
ffc83c2a402c26f74f2289dbb8bd2fe9
683896581438754f35a438472e566c40
Returns the 16-bit sum of a range in a byte array.
{ nbrOfBytes = (UInt16)(nbrOfBytes > 0xFFFE ? 0xFFFE : nbrOfBytes); byte sum = seed; UInt16 iX = 0; for (; iX < nbrOfBytes; iX++) { sum += input[IndexOfStart + iX]; } return sum; }
1
6ac04fbae1fbec05755a96c53876701a
eceeeba345c06316374ee4504f99ca5a
Change existing user password (requires old password)
$userId = $_POST['UserId']; $password = $_POST['OldPassword']; $newPassword = $_POST['NewPassword']; if(strlen($password) == 0 || strlen($newPassword) == 0) { throw new RestException(400, "Wrong or missing parameters."); } $sql = "UPDATE User SET "; $sql .= " PasswordHash = '".$newPassword."' "; $sq...
1
a2f9db7325a0a547e020da6bb8d0b275
e06d6a11dbc59de0bb6cbd0b49e57aaa
Add excitation to subsystem.
if state is None: state = [0] * self.experiment['num_nodes'] return pyphi.Subsystem(self.network, state, range(self.experiment['num_nodes']))
0
b437aad633c12be93ec9dcd141c95674
50d1a06bc8e9c7054a18a8792cdde542
! Threadsafe setter of the progress message
public class EpicsCad public synchronized void setMess(String m) { this.m = m; }
1
c26d5e9d144e04c4371709220229c550
ee3fe12bd1ae378c4905ff8ea8303b09
Downloads the complete list of engagements from the portal
{ $post_string = '<?xml version="1.0" encoding="utf-8"?><EngineListingRequest session-id='.'"'.$this->getSessionId().'"'.'/>'; $data = $this->call($host, $post_string); return $data; }
0
55b02c44f324e94966664f8118431df4
72bdaf582ef28fde7ab78209505513e1
Choose connection type.
{ var comboBox = (ComboBox)sender; var selection = (string)comboBox.SelectedItem; switch (selection) { case "SSH": _connectionType = ConnectionType.Ssh; break; case "CTP": _connectionType = ConnectionType.Ctp; break; case "Auto Detect": _connectionType = ConnectionType...
1
c3dc236c24e36d12f2381a451c95ce9e
b291ab0516eb586b628510dfce56ca40
查看变电站基本信息
namespace NSC.GridPlan.PowerEquipment.UI public partial class SubStationAttribute : Form private void btnPreview_Click(object sender, EventArgs e) { EquipmentInfoShow lineShow = EquipmentInfoShow.Instance(); Dictionary<string, string> FieldName = SubStationTable.GetFieldName("交流"); ...
1
5c6e9742a1b026045f18f1ba2cebbb0a
ee7499c645ddd8b46426fe15cf1a417f
12要素タプルのシーケンスの各要素を展開して関数に渡すExistsです。
{ return self.Forall(tpl => f(tpl._1(), tpl._2(), tpl._3(), tpl._4(), tpl._5(), tpl._6(), tpl._7(), tpl._8(), tpl._9(), tpl._10(), tpl._11(), tpl._12())); }
0
e575e5857256a8c11b41a5518abe1953
3b7a86001955e8f9a7420065be6bdbfe
Set Cumulative Level. Level for cumulative calculations
class Bulletins public function setCumImpos(?float $cumImpos): Bulletins { $this->cumImpos = $cumImpos; return $this; }
1
975233f2f2ffdf110d2ee0ddc1152e3d
7fcbda54b50e0e48308a6af756d1964d
This event handler is called each time the memory plugin sends output packets.
{ switch (msg->msg_opcode) { case SP1_OUT_PKT_READY: Print_packet((rcv_packet_str*)msg->msg_data); break; default: break; } }
1
5762da30205ef49d1c6e5a82df9eb725
3bb540d40eaf33b7c518dd21c8d337a4
유니코드를 글자로 바꿔주는 함수
StringBuffer string = new StringBuffer(); String[] hex = unicode.split("\\\\u"); for (int i = 1; i < hex.length; i++) { int data = Integer.parseInt(hex[i], 16); string.append((char) data); } return string.toString(); }
1
db17c0f673de2f206643d53d09caafca
0db4cca2e92b01a0f7c85a21ddf72626
Sets the value of the negativeAmortizationLimitMonthsCount property. allowed object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BalanceSheetDtldNonCurrentLiabilitiesType", propOrder = { "debtsToGroupCompanies", "taxation", "mortgagesLoans", "hirePurchaseOverAYear", "minorityInterest", "otherLongTermLiabilities", "totalLongTermLiabilities", "pensionsSimilarObl...
0
6170d1bdc188fa0fe732ada58086361d
29728ce7d9ba1f4f18385f293b4644f1
A simple estimate (via Newton's Method) of scale for an algebraic map.
using namespace boost::math::tools; const int degree = ncoeffs-1; PolyDerivFunctor polyFunctor(a, degree); double max = pow(std::abs(a[0] / ( 2.0 * a[degree])), 1.0 / degree); for(int i = 1; i < degree; ++i) { max = std::max(max, pow(std::abs(a[i]/a[degree]), 1.0 / static_cast<double>(degree...
1
cdce6a46f13b6d97cebc1df25e071cfd
7882525d80b65f5c765a22a1b1cb06c7
Update predictor with newly trained model.
class ModelConnectionTask(MLBaseTask): def predict_update(self, data=None): y_pred = self.predict(data) offset = 0 for index, subtask in enumerate(self._subtasks): output_var_names = subtask.output_var_names data = self._squeeze(y_pred[index + offset], 2) if i...
0
3a52d7b6d6fb5225f768a7fac66a4c8f
749d9f80c2633877bd23d7e718d34be7
Returns active user list (excluding adminstrative user connection)
public class LdapUserService public List<ActiveDirectoryUserInfo> getActiveUsers() throws ServiceException { List<ActiveDirectoryUserInfo> result = this.getUsers(); if (!result.isEmpty()) { result = result.stream().filter(it -> !it.isBlocked()).collect(Collectors.toList()); } ...
0
80c86fa3df28c7d63ab2f3f9b79dc940
1e10960775b6e476823e98ae7ffe500a
<p> This operation creates a revision for a data set. </p> Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation. API Documentation</a>
java.util.concurrent.Future<CreateRevisionResult> createRevisionAsync(CreateRevisionRequest createRevisionRequest);
1
2f25c1a34b8296708c78c0f5807706fe
433ae77bb86764311da819909f802206
分页直接获取所有的试卷信息。
{ int row = int.Parse(context.Request["rows"].ToString()); int page = int.Parse(context.Request["page"].ToString()); string SQL = "SELECT [ID],[名称],[修改时间],[修改人],[启用]FROM [CNGTZ].[dbo].[TK_试卷] WHERE 启用=1 ORDER BY 排序 DESC"; string rows = "{\"total\":@总数@,\"rows\":@行...
1
e05e1d1713d001c8c6b25eec8d00cdf7
7999bab9e3b1469e5bc4dc916f377cc6
Delete the addition from the addition list
namespace VerticalBD public class Addition public void RemoveFromConstruction() { XDocument data = XDocument.Load(@"XML\Additions.xml"); var query = from xe in data.Root.Elements() where xe.Attribute("ID").Value == ID.ToString() select ...
1
c4d94c4567d91f3ec3f53738bb716bfe
00d9630e5c949069b2e931c305ad26d5
判断酒店是否存在,清除脏数据
namespace Taobao.Top2.Application.Implement public class HotelUpload : IHotelUpload private XHotel IsHotelExist(string outerid, string hid) { XhotelGetRequest req = new XhotelGetRequest(); req.OuterId = outerid; var res = TopConfig.Execute(req); if (!res.IsErr...
1
f2e0cca97cb6db52c0bcbf585ed7c017
e39f2f46aded11c2845cf86c6596c75f
!---------------------------------------------------------------------------------------------------------------------- @brief Disables and clears all NVIC interrupts and sets up interrupt priorities. Peripheral interrupt sources should be enabled outside of this function. As this should be the first interrupt-related ...
void NVIC_init( void ) { HAL_set_32bit_reg(NVIC_BASE_ADDR, CLRENA, DISABLE_INTERRUPTS ); HAL_set_32bit_reg(NVIC_BASE_ADDR, CLRPEND, CLEAR_INTERRUPTS ); }
1
d9acadf1eea130ddaa3681c1e0cf7af8
6c01fcb42c31f0b3d4bbd20129e685f5
平均精度を計算する
class MeanAveragePrecision(RankingMetric): def __call__(self, y_true: np.array, y_pred: np.array) -> float: result = 0. pos = 0 coupled_pair = sort_and_couple(y_true, y_pred) for idx, (label, score) in enumerate(coupled_pair): if label > self._threshold: pos +...
1
8bde61d7f3e1924520f4ecdc9f643684
e72fad18271a36e02a0f677137d0013f
对当前用户以及当前拿到的任务节点进行匹配,看是不是当前用户可以执行的任务
function matchTodo() { createObjectUsers(); if ($.isEmptyObject(flowNodeBean["flowNodeMiddleBeforeBeans"])) { return false; } let todoId = getParamForUrl("todoId"); if ( todoId !== null ) { tagId = todoId; } else { let tagIdElem = $("[name='" + flowNodeBean["flowNodeMiddl...
1
3e0e894a9eb225d0516731bdf607fdbd
c7b2266d4acf816eb623db396dcc5c4a
Exit a parse tree produced by the {@code registerType} labeled alternative in {@link SqlBaseParser#statement}.
public class assemblerBaseListener implements assemblerListener @Override public void exitRegister(assemblerParser.RegisterContext ctx) { }
0
744d042f8d0a6853baaccb16306c3fba
a22c59f0ed663d9aeab4a45952e0aca8
dummy read of ADCR (only the low byte) to clear the interrupt flag
void ADCConvert (void) { LPC_ADC->ADCR &= ~( 7 << 24); ADC_Done = 0; LPC_ADC->ADCR |= ( 1 << 24) | (1 << 2); }
0
e479e40ac738eae5462e0159602db51b
0cd03782c0ea5d3677c3298c1d890b1c
To be used after each timestep has been passed, appends a single 1 to represent the bias.
V_bias = np.ones(V.shape[:-1] + (1, )) V = np.concatenate((V_bias, V), axis=-1) return V
1
011956cb64400c09ce659e0ffc7d90d7
939140aa13606c1cdc4a0f81b2f27b01
DynamoDBからtodosの一覧を取得
dto = get_todo_list_dto Todo render json: dto, status: :ok end
0
75ec25da10da41c72c1d19c07279f3ff
8914f1c2119e879a6c859f844a277f46
加载一个常量
class ExtensionLoader public static function load($extraConstants = array()) { if(empty($extraConstants)){ return false; } foreach ($extraConstants as $key => $extension){ if(!defined($key) && !is_array($extension)){ define($key, $extension); ...
1
d6ab8a30d955b5bbfcdf40af1f680f78
0d460b6eb38d0af868cb0e70ddffd650
更新用户获得的总学分
public boolean updateUserTotalPoints(String openid,int points);
1
c9e2c4586e5553030db46ed8cd725535
95f2f720e7a4e96d5ffe3b9955cd6989
注册Controller对象
namespace Ccxc.Core.HttpServer public class Server public static void RegisterController(object controller) { RegisterController(controller.GetType()); }
1
0dec7417b0a1ac29c89a66ca10997144
df60859a289bf4c8d058cf371c0868e9
ミスナール体感温度Tmの計算
int32_t calcTemp(BME280_DATA* data,BME280_NVM* nvm){ int32_t v1,v2; v1 = ((((data->temp >> 3) - ((int32_t)nvm->dig_T1 << 1))) * ((int32_t)nvm->dig_T2)) >> 11; v2 = (((((data->temp >> 4) - ((int32_t)nvm->dig_T1)) * ((data->temp >> 4) - ((int32_t)nvm->dig_T1))) >> 12) * ((int32_t)nvm->dig_T3)) >> 14; nvm-...
0
86879ac019c13e2f502017252d520e85
aabce5e7747644a2d07726b87b9a8b1d
Variant of the naive multiplication algorithm, which uses the transpose of `b`, resuting in better memory locality performance characteristics. Still O(n^3). Panics if matrices `a` and `b` are of incompatbile dimensions.
raise NotImplementedError( f"Multiplication not implemented for " f'"{type(a).__name__}" and "{type(b).__name__}".' )
0