query_id
string
corpus_id
string
query
string
code
string
label
int64
72bb5276ab4af440a4a01709643f0372
8773f29d5a566086362d1cdba44b9177
This method is created to store criteria title as key and it's rating as value in dictionary
{ String searchField = "productName", searchParameter = ""; Map<String,List<Integer>> productMap = new HashMap<String,List<Integer>>(); Map<String,Double> productRating = new HashMap<String,Double>(); List<ProductReview> reviewList = new ArrayList<ProductReview>(); List<Integer> countReviews; DBCursor cur...
1
67052802a954ee93f6d0fbfdf1375f2d
715035eed3ac8861aa01f7e27a982570
Test shearing and stretching deformation calculation with a complicated field.
e = ExtractField( field_name='StressXY', n88_filename=os.path.join( self.test_dir, 'test25a_uniaxial_solved.n88model' ) ) g = e() npt.assert_array_equal(g.data.shape, [25, 25, 25]) npt.assert_array_almost_equal(g...
1
92de0d0f635809a66f2438f6f60f223f
20e53431682a50f8dccb6eac42cc1eab
set ipvs connection timeout values see ipvsadm manpage for details
class LVSManager(): def set_timeouts(self, tcp, tcpfin, udp): tcp = str(tcp) tcpfin = str(tcpfin) udp = str(udp) try: subprocess.check_call([IPVSADM, "--set", tcp, tcpfin, udp]) return True except: raise ValueError("could not set timeouts, " ...
1
2a096c7ec4d91a7ca2371b8004ef655c
8e930b379a34da0cbd37a7230f4c4fc1
加入购物车,计算按钮位置。
function addShoppingBtn(goodsId) { $(".shop a:nth-of-type(1)").click(function() { if(userId != undefined) { addShoppingCart(goodsId, userId); } else { window.location.href = "login.html"; } }); }
0
132d8789c81ea3eb1b6d292cf2f54edd
53eab88ca1ce56249bfc3c6e5145fe76
실명확인번호 Getter Method
public class Account String getNo() { return no; }
0
07e03fbfe8a66f31edc4ce191b123c2b
b411bb5a750d2555afd87368af3a32b3
JavasScript DataView.prototype.setInt16(), see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setInt16
if (littleEndian) { var uint8 = value & 0xff; dataView.setUint8(offset, uint8); var uint8 =(value & 0xff00) >> 8; dataView.setUint8(offset+1, uint8); var uint8 =(value & 0xff0000) >> 16; dataView.setUint8(offset+2, uint8); } else...
0
7e4140b9278532648d386f301e340b16
e1461da001b77031e50d2c8a72543b20
Prevent the user from going back to either the ResultsScreenActivity or to the previous location before the app.
public class ResultsActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == android.R.id.home) { Log.d("Back button", "FROM RESULTS"); fr...
0
093b969a183065727e9bd350f1024c79
25371c21ce8485cfbbb1db93e7dcae47
! 格林尼治平恒星时 从瞬时平春分点到格林尼治经线的角度
{ double JD = getJulianDay(cal); double TJD = JD - 2440000.5; double thetaG = (0.671262 + 1.0027379094 * TJD); return 360.0 * (thetaG - Math.Floor(thetaG)); }
1
01911ecdfa7a23805c1f91238305fbd4
c3e3fa8a571bc927c30b7ee5df66086b
Команда поиска индивида
if not access(msg): return user = Users.get(Users.id == msg.chat.id) hobbies = list(user.hobbies.split()) bot.send_message(msg.chat.id, text='Выполняю поиск...') for i in hobbies: for j in Users.select(): hobbies_friend = list(j.hobbies.split()) if i in hobbie...
1
39b3b728cb4aa8533d1c7f95adef8e4d
3804c9ca893b22495192652be36953ca
Retrieve the directory containing job logs for the specified repository
File getRepositoryDirectory();
0
09aa68f470ae7bb93c4fe24b07815834
9a99dc4db42d68d5dbc917980fe8b405
Called when the objective has been reached
namespace DemagoScript abstract class AbstractObjective public virtual void accomplish() { Tools.log( "Accomplish " + getName() ); var finalElapsedTime = elapsedTime; this.stop(); OnAccomplished?.Invoke(this, finalElapsedTime); }
1
b344248293631c9a8d6a3bdbea9f78f4
0c72d27214ff3f6362964ca9e6cdd0ea
lấy ma trận vị trí các tile từ file matrix đồng thời trả về vị trí file tiles
f = open(filename, "r") map = f.read() row = [] col = [] Rcount = 0 Ccount = 0 for i in map: if i == '\n': col.append(row) Ccount = 0 Rcount +=1 ...
1
d29fe55b9b3da13969f8c7f21f1604b6
74400d16425b5a4557b639066df71f38
Writes a list of dictionaries to a file
def writeList(filepath, list, type): file_object = open(filepath, type) try: file_object.writelines(list) finally: file_object.close()
0
cff51f8f5c3ddae24d9d57edebb97045
17a33e9927fba5807a9d2f020bc7df48
Sets mailbox_name
class dbs_templates_mailbox_maildata extends super public function set_mailid($value) { $this->setdata ( self::DBKey_mailid, strval($value) ); return $this; }
0
640321331e873ca6884ebc8c4f35666d
bdc870c162f0772752855eeae15dab54
Returns the base substitution type of the 2 state SNP
if ref_alt_dict['ref'][1] == 1 and ref_alt_dict['alt'][1] == 1: return 'SNV' if ref_alt_dict['ref'][1] == 1 and ref_alt_dict['alt'][1] > 1: return 'INDEL' if ref_alt_dict['ref'][1] > 1 and ref_alt_dict['alt'][1] == 1: return 'INDEL'
1
2a6d0d293fb44aa331665c2a43195ad6
fdd57c8fa0d6f39c1b9ed043f71caf15
Update an OAuth session Example SQL query: <code> UPDATE oauth_sessions SET auth_code = $authCode, access_token = $accessToken, stage = $stage, last_updated = UNIX_TIMESTAMP(NOW()) WHERE id = $sessionId </code>
class Connection(object): def update_session(self, session_id, values):
1
4e4b1bbbf4480ea4ea4662d8990978ec
15d43e27ca5aee4822c947309878512a
constroe as conversas do chat
class controller_painel extends CI_Controller public function ver_conversao(){ $ver_conversao['ver_conversao'] = $this->Model_painel->ver_conversao(); $this->load->view('header'); $this->load->view('ver_conversao',$ver_conversao); }
0
d8cbe0a230744e50e18a79d14c3c18a7
8694509806dad71d5f4af89750f30cce
````````````岛屿周长```````````````
public class QuestionSolution public int islandPerimeter(int[][] grid) { if (null == grid || grid.length == 0) return 0; int length = 0; int width = grid[0].length; int height = grid.length; for (int j = 0; j < height; j++) for (int i = 0; i < width; i++) ...
1
e1ceff46e726c41db01f152385c98424
092365414a761ddae4533af1966d2679
Wandelt die übergebene Versionsnummer in ein nummerisches Array
{ uint[] arrayVersion = new uint[4]; arrayVersion[0] = (version >> 24); arrayVersion[1] = ((version >> 16) << 24) >> 24; arrayVersion[2] = ((version >> 8) << 24) >> 24; arrayVersion[3] = (version << 24) >> 24; return arrayVersion; }
1
aa9aa3a75ff30f71b0a80e40b0f930f1
eec3ead94dd5a430fbed06c673e85e4c
Add rows to the conditional table
if not self.opened: raise PrologueError("Trying to append a line to an unopened conditional") elif self.closed: raise PrologueError("Trying to append a line to a closed conditional") if self.else_section : self.else_section[2].append(entry) elif len(sel...
1
34693cc9bd8aab9123d6b51028526dd1
82470cf5c14f8145b8ab25cc4dd92f61
餐饮商品列表
class WyFoodsController extends BaseController public function actionList(){ $service = new WyFoodsService(); $this->responseJson($service->search()); }
1
e1715363092cab91bd7b4ac737742ef7
e411f1138077575539d19dadeb769890
Returns the number of objects this instance is following.
class InstagramParser(HtmlParser): def following(self) -> int: return self._get_data(1)
1
f8bda5f6179758e7c7bc958d30e54962
7cac62ef06ecd7dacf51da3c40dff68d
Generates moves for all pieces that move like a queen in chess.
def queen_moves(board: list, queen_pos: int, white_turn: bool) -> list: moves = [] rook = rook_moves(board, queen_pos, white_turn) bishop = bishop_moves(board, queen_pos, white_turn) for number in rook: moves.append(number) for number in bishop: moves.append(number) return moves
1
22f1ba6b793765a0cba6124ee8f72532
6caba5e32e3d035f6f698753267dca4f
存储历史记录,要求每次查看疾病结果时都保存记录
public class ApiContract void saveHistory(String key, OnNormalOperatorListener listener);
1
29f003bec1db0ffd7d7a34f07b14ff84
e4aa634e7320dd8686e2d8107b1adcf2
Метод для удаления кластеров, у которых есть эквивалентные замены среди оставшихся кластеров.
{ BayesianClique node1; BayesianClique node2; BayesianClique node3; while (FindCicle(out node1, out node2, out node3)) { TreeCluster.RemoveEdge(node1, node2); node3.Nodes.AddRange(node1.Nodes.Intersect(node2.Nodes)); ...
0
6cf5c0bb2f4d0072ddde76ebc8ca3002
79543bb03589172116ed893b44312728
根据音源获取不同配置设置硬件声音大小
threadPool.execute(() -> { try { if (!AuthorityManager.isHadDeviceConfigAuthority(sn)) { if (callback != null && mainHandler != null) { DevSetMoreBaseBean baseResult = new DevSetMoreBaseBean(); baseResult.setResult(f...
1
6345ab54749ff1157a648c0ff17cdab4
0954003fbcbfaaef76289f45cc921ce1
Obtains the <code>Content-Encoding</code> of the resource. <code>null</code> if resource not yet encoded.
String getContentEncoding();
1
0b10dc147968cd66888cfbdc27e05107
ead65a67cc4c25218f715ce5e1b7891c
检查文件列表是否全部存在
def check_file(): if len(argus.file_list[0]) < 1: return False for vlog_file in argus.file_list[0]: if vlog_file is None or os.path.exists(vlog_file) is False: return False return True
1
b6b47aefa57ee951ce5bbbbfd592797a
39b435ec7475fd7987f9bf8aff49e6ea
Function to extract keywords from the headers and paragraphs of slides
def keyword_extractor(data: list) -> list: try: nlp = spacy.load("en_core_web_lg") except OSError: sys.exit() pos_tag = ["NOUN"] dep_tag = ["nsubj"] for slide in data: doc_header = nlp(slide["Header"].lower()) doc_paragraph = nlp(slide["Paragraph"].lower()) he...
1
4248e5886d8a59956ca0b15014f24514
25a7ddace33c2b4b22ed0d7fcb479fc1
Returns a new object of class '<em>Filter Connection</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getFilterConnection_Source();
0
03021d63aa62abbe138c821d4e2727e7
9bc5875159ae56727f3ff0ca66066621
Sets the view for the horizontal tab scroller. The horizontal tab scroller is optional
public class ConfigParameters public void setHorizontalView(boolean f) { horizontalView = f; }
1
b41105efe4df981eaef2b4a8eb3c8580
ef9237bcfbcada3d0ba47547c91d47e5
Returns the meta object for the attribute '{@link org.oasisopen.names.tc.opendocument.xmlns.chart.DocumentRoot#getName <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
public class EntitiesModelPackage extends ModelPackage public EAttribute getDocument_MetaName() { return (EAttribute) getDocumentEClass().getEAllStructuralFeatures().get(DOCUMENT_METANAME_FEATURE_ID); }
0
d618d019ddcf151b877c95de90b9bc70
6ac09331c57b3c8cf5624b10ee772aed
sends a string of dumped json to the client
class MY_String public function outputJSON($data) { echo json_encode($data); die(); }
1
9b358fac0f38f428b09d629a61cefde1
c5aedc40e746a6b91c0a0b6fe45c3c35
Is the Northbridge PState feature enabled?
F15KvIsNbPstateEnabled ( IN CPU_SPECIFIC_SERVICES *FamilySpecificServices, IN PLATFORM_CONFIGURATION *PlatformConfig, IN AMD_CONFIG_PARAMS *StdHeader ) { PCI_ADDR PciAddress; BOOLEAN NbPstatesSupported; BOOLEAN SkipHwCfg; NB_PSTATE_STS_REGISTER NbPstateSts; NB_PSTATE_CTRL_R...
1
95a66f1d7a3c350fc07b9cd6c1654554
d414c319cb3d27026478cc4cfee9c247
Returns an array of css options from Cheezcap based on the page template being used
$box_model = mk_maybe_json_decode( mk_cz_get_option( $setting ) ); $css = ''; if ( $box_model ) { foreach ( $box_model as $key => $value ) { if ( ! in_array( $key, $excludes, true ) ) { $css .= str_replace( '_', '-', $key ) . ':' . $value . 'px;'; } } } return $css; }
0
14a23765ac02319d379738c9dd341d2d
4244f2a65720d891c1776689b49e74f9
Get an answer draft by user
{ $id = new \MongoDB\BSON\ObjectID($tid); $filter = array( 'userId' => $this->userId, '_id' => $id ); $res = $this->draftsObj->find($this->tableName, $filter); return xss_clean_recursive($res[0]); }
1
8c1e74756da36780b0a3c3b044b0431f
b82804da0af84b59d1466cbd9b88e23f
Control camera birghtness. *****************************************************
try { Settings.System.putInt(activity.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL); } catch (Exception ex) { ex.printStackTrace(); } }
0
06787e14ec621a57c062df89023a6e6d
ffdb75bbad9cffff3a0735a55a51300a
处理请求,输出文件内容以及设置缓存响应头
public class ResponseHandler implements Runnable public void processResponse() throws IOException { Scanner scanner = new Scanner(header.toString()); String line = null; while ((line = scanner.next()) != null) { if (line.startsWith("GET")) { String filePath = scanner....
0
2e13b8e17dde6ef9c0153280894b4e9b
9b25e20d142cc5757502422dd732dc05
J'implémente un subset des commandes de Sam http://sam.cat-v.org
cmd = $("#cmd").val(); var tmp; var c; if (cmd.match(/^\//)) { c = cmd.split('/')[2]; } else { c = cmd[0]; } switch(c){ case "a": cmd = cmd.match(/\/(.*)\//)[1]; input.val(input.val() + cmd); break; case "c": tmp = cmd.match(/\/(.*)\/c\/(.*)\//)[1]; tmp = new RegExp(tmp); cmd = cmd.match(/\/(.*...
1
499236cb33a8307d29bc49b825d41404
ef4b43fae3704a3d938a1a246ce2dd5f
A flag indicating whether test devices can use the license.
class PlayReadyLicenseTemplate public function setAllowTestDevices($value) { $this->_allowTestDevices = $value; }
1
93bfcd70d1915db167d6bca39c6824d7
d1e5e5e3e126274f89d3389b5a85f574
Get Invoices Count
{ BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_NumberInvoiced); if (bd == null) return Env.ZERO; return bd; }
0
d02c2c6ace20ee37437f4aabc3967d94
27aa259823310254c0677dd15ad08748
## like scale_colour_brewer(), but allow arbitrary number colors via interpolation
local_scale_fill <- function(..., bias, space, alpha, reverse, interpolate) scale_fill_gradientn(colours = colours, ...)
1
c71f24bf98a757cf733e6675a9f13d85
601d261838cf48bc3b50ee31677b8407
Método que destruye la carta si el match ha sido correcto
public class SorpresaSalirCarcel extends Sorpresa{ void usada(){ getMazo().habilitarCartaEspecial(this); }
0
119beb7aa208690a66ce819305fde3da
6788c178d86d7d58479926a5a37ae29c
Get key code by the character.
public static KeyCode forChar(char cKey) { return KEYCHAR_MAP.get(Character.toUpperCase(cKey)); }
1
bf3513338f9dcfc0bbc6de5971050e8b
f1cb050fdcfed2fb441ebe436c81b3c2
n皇后(迭代版)
public class Alg34 public int totalNQueens(int n) { if(n <= 0){ return 0; } int[] arr = new int[n]; int initVal = Integer.MAX_VALUE; for (int i = 0; i < n; i++){ arr[i] = initVal; } int row = 0, col = 0; int count = 0; whil...
1
3eb86f98d1c4dc455b19789a5bcf9a1c
15208dabb13ea00cc0e9a38c31f347d0
when we add a product to shopping cart, check if there is already that product there, if so, we increase the quantity of that product, else, we add that product to shopping cart with quantity as 1
class ShoppingCart# def add_product(product) current_item = @items.find{|item| item.product == product} if current_item current_item.increment_quantity else @items << CartItem.new(product) end end
1
53e4e4a7317c1aa0cf1d0bf9c1f39636
72b581df3cd471185cbb346bfb18fea7
根据返利金额获取用户等级
class Model_GameOperator extends Model public function getVipLevel($vipPay,$money = 0) { $money = abs ( intval ( $money ) ); arsort ( $vipPay, SORT_NUMERIC ); foreach ( $vipPay as $key => $value ) { if ($money >= $value) return $key; } return 0; }
1
a919b8696adbee55ea890f1d9cb3a09f
31c014855898bcbba36a659c6fd31cac
ensures the floating point offset corresponds to less than half a tile
x += renderOffset.X; y += renderOffset.Y; x = (int)System.Math.Ceiling(x); y = (int)System.Math.Ceiling(y); }
0
9ddbad91b1461fbfb3bba5f1595163c6
74e2aeb80d15f5cdc1bc0df86e517e31
\brief Converts azimuth fractional degrees to angle integral degrees, arcminutes, arcseconds.
{ if (ra == NULL) return 0.0; double tmp_ra = (double)(ra->hours) + (ra->minutes)/60.0 + (ra->seconds)/3600.0 + (ra->milliseconds)/3600000.0; while (tmp_ra > 24.0) tmp_ra -= 24.0; while (tmp_ra < 0.0) tmp_ra += 24.0; return tmp_ra; }
0
0316f78a582cdc0e260f9786974f9e0c
fd763e99e01683ca05f3e877f62de626
获取sandbox中文本文件的内容
response = self.agent.execute(Command.QTA_SANDBOX_LIST, {'path':file_path}) if not isinstance(response, dict) or response['status'] == ErrorCode.QT4I_STUB_NOT_EXIST: file_list = DT().get_sandbox_path_files(self.udid, bundle_id, file_path) if not DT().is_simulator(self.udid): ...
0
0d682624a1e5f913f513184a83f0fc08
db4d0cfbcf00d899671dafaa022fddec
Consolidates tempTIMDs for the same team and match
class Season(): def get_fixtures(self): self.fixtures = {} for comp in self.competitions: for f in self.competitions[comp].fixtures.keys(): if f in self.fixtures.keys(): self.fixtures[f] = self.fixtures[f] + self.competitions[comp].fixtures[f] else: self.fixtures[f] = s...
0
c35ef3c654dca355992dd02008169f8d
38517b0755dddea7bc597147c9e93d74
Returns all types used by classes on given source path (source root).
{ IEnumerable<ITypeDefinition> interestingTypes; if (searchScope.TopLevelTypeDefinition != null) { switch (searchScope.Accessibility) { case Accessibility.None: case Accessibility.Private: interestingTypes = new [] { searchScope.TopLevelTypeDefinition.GetDefinition() }; break; cas...
0
ea30e2e04c4c4acfb19806fedec89b88
340f082221d9530378ea41ddab55d2b4
Will start a purchase flow for given sku name. ObfuscatedAccountId and obfuscatedProfileId are optional. Result will get back to [PurchasesUpdatedListener]
const postBody = { ...{ [APP_ID_FIELD_NAME]: this.appId }, ...body }; const uri = `${this.options.apiRoot}/${DEVICES_PATH}/${deviceId}/${DEVICES_ONPURCHASE}`; return basicAuthRequest(uri, 'POST', this.apiKey, postBody); }
0
ee5c2cef69d29994ef27197056478012
a22fc8fda7b437e3b1677febe1616b47
根据父功能编号查询功能列表
@org.springframework.stereotype.Controller @RequestMapping("function") public class FunctionController @RequestMapping(value = "{parentPid}/function/list", method = RequestMethod.GET) public ResponseEntity<List<InnerFunctionDefines>> queryForByPid(HttpServletRequest request,@PathVariable String parentPid) { ...
1
3b9249bb56556570ff23f636c0b5c8fc
b8a9c8c8c41bf610a90e90f2203867c8
Функция, разбивающая текст на блоки по 16 символов
def get_blocks(text, block_size): return [text[start:start+block_size] for start in xrange(0, len(text), block_size)]
1
052e4a0fa387b3a942f6879c51d524c1
f0e10d6b2a82dade70fdeae1f22ed003
Set the combo boxes and column indices given a list of column positions
void PlotDataDialog:: setColumnNames( QStringList nameList ) { xAxisComboBox->clear(); xAxisComboBox->insertStringList( nameList ); labelComboBox->clear(); labelComboBox->insertStringList( nameList ); }
0
858edace1e9776de673c135a9948c8ab
4d357387b71e664dc194d1bcee97363f
Gets the geometric stiffness matrix for a two noded, 2D bar element. The stiffness matrix has been analytically integrated so numerical integration is not necessary. The geometric stiffness matrix requires an axial force so the analysis_case from a static analysis must be provided.
class Bar3D_2N(FrameElement3D): def get_geometric_stiff_matrix(self, analysis_case): (_, _, l0, c) = self.get_geometric_properties() cx = c[0] cy = c[1] cz = c[2] f_int = self.get_fint(analysis_case) N = np.mean([-f_int[0], f_int[1]]) T = np.array([ [0...
1
7c7cdf1ee172e455cce3b953cd74ac26
3c78fa423c85ef8263c8bba2b96a8f76
订阅turtle1/cmd_vel话题的回调函数,用于显示速度以及角速度
class SpheroTFPub: def receive_cmd_vel(self, msg): time = rospy.Time.now() self.logvel.write(str(time.secs) + ";" + str(time.nsecs) + ";" + str(msg.linear.x) + ";" + str(msg.linear.y) + ";" + str(msg.linear.z) + ";" + str(msg.angular.x) + ";" + str(msg...
1
b481fa37265f365e58a65207e894ecc9
d0da2a64bbc06a1ff3268dd0e4bff8e3
Get the airport code for the location that this data was recorded at
public function getLocationCode();
1
d5891fc8ba97c1e73733f74e1a74b848
809fd3cfc0bb5b4a1f570b9b12f0178e
ParamsFromContext extracts params from context
func FromContext(ctx context.Context) Metadata { return FromContextKey(ctx, metadataKey) }
0
873ec3691b366a1b62e227cfb085448c
a108db52882c5de9a173c5d7bbef71bf
判断当前“时 : 分”是否在一天中某一区间内
public class DateUtil public static boolean isInSpanHHmm(String start, String end, String itself){ boolean flag = false; int sHm = Integer.valueOf(start.replace(":", "")).intValue(); int eHm = Integer.valueOf(end.replace(":", "")).intValue(); int iHm = Integer.valueOf(itself.replace(":", "")).intValue(); if(i...
1
dc29507ff06b6edf8a9dd4b30dd020ce
a9c06829fb9dc2bf3de52c85c5c9593f
Creates an error object associated with the method not found error
class DeviceController extends BaseController static get notFoundError() { return getErrorObject('DEVICE_NOT_FOUND', 404); }
1
b27b745914077637aa2b3926b4ce5736
62728e4b38f1b1cb017774b2cafa08d3
Encodes an <see cref="ECPoint"/> object to a byte array.
namespace Org.BouncyCastle.Crypto.Asymmetric public abstract class AsymmetricECKey: IAsymmetricKey public abstract byte[] GetEncoded();
0
ae06484c3036a35f44836681e7de70e8
417bf363daeadb5cd81d6e771f84118b
项目名称处理, 项目中的所有短横杠全部转换成下划线
class StringHelper extends BaseStringHelper public static function s_format_underline($name){ $temp_array = array(); for($i=0;$i<strlen($name);$i++){ $ascii_code = ord($name[$i]); if($ascii_code >= 65 && $ascii_code <= 90){ if($i == 0){ $temp_array[] = chr($ascii_code + 32); ...
0
dbc8603c5432dd1ea52e9a0e5d0c9cbe
f3392cb857450d6e22004da42b4d8763
处理微信的请求消息 提供翻译服务
@Service public class CoreServiceImpl implements CoreService public String processRequest(HttpServletRequest request) { String respMessage = null; try { String respContent = "您好,我们的联系方式:微信:--,手机:--!"; Map<String, String> requestMap = MessageUtil.parseXml(request); St...
0
825c278e7263e0584358a50f27bb6538
2b8d396812c37728abac5d817cf993a6
フォームに値が入力されていればセッションから同じ値を返す関数
if(isset($_POST['mode']) && ($_POST['mode']=='REINPUT' || $_POST['mode']=='UPDATE' || $_POST['mode']=='DELETE')){ if(isset($_SESSION[$name])){ return $_SESSION[$name]; } } }
0
f521b904f68998559217f472d4e49364
5de67c007fc86feabee59f29b5bfb9ab
Computes the ReLU activation
class ReLU(Module): def forward(self, x): self.x = x return self.x.clamp(min=0)
1
3beb1c664b1a1c0b2a7d819e5739a3d8
ddf1df959538445624fad89b95fcaf30
преобразует строковое значение цвета формата ХХХХХХХХ в цвет
{ char spliter = (char)0; RGBAColor c=new RGBAColor(0,0,0); foreach (var ch in s) if (!ch.IsDigit() && ch != ' ') { spliter = ch; break; } var vals = s.Split(spliter); ...
0
e175e8f2aa9956897118bea37d24ea35
284480a957b635e5b8a061f4ee0af769
Retrieves the focal plane of a give data point.
fx = self.config['camera_info']['focal_length_x'] fy = self.config['camera_info']['focal_length_y'] u = int(-(fx / point_in_camera.x) * point_in_camera.y) v = int(-(fy / point_in_camera.x) * point_in_camera.z) return (u, v)
0
c9edb51d8953ac24647f3ecb684e61b1
93cb1f4b54f638c8e90e9cf97e4238ff
método que recupera las calles de un área guardadas en base de datos
class TerrenoController extends Controller public function getCanales($idcalle) { return Canal::orderBy('nombrecanal', 'asc')->get(); }
0
d4e8a8bec6df790ff5103f7ebb579e7e
9f0106900b05b3e5ea5a4a6662018cf5
読み上げ時の待ち時間を計算します。
public class TtsHtmlHelper private static float calcQuestionDuration(TtsListeningPaper paper, TtsListeningQuestion question, Float questionPause) { float total = 0f; for (TtsListeningSubQuestion subQuestion : question.getSubQuestions()) { if (subQuestion.getSentences() == null || subQuestion...
1
f27a95a8e7cd3f04302c12ac8c629a14
7a496143a302a8fff96c2a07b09cd562
Exit a parse tree produced by {@link ASParser#primaryNoNewArray_lf_primary}.
void exitPrimaryNoNewArray_lfno_primaryClassSelf(Java8Parser.PrimaryNoNewArray_lfno_primaryClassSelfContext ctx);
0
936fdc94ab02d978a75fddc9027125d9
7f61448ad6da3ef0f9cb03f40c5be655
diac and variation selectors
cases like (1)
0
c0c26911a44174fe232acdf9b7b2bcd3
62ce0c7271a8c80cc7e9799ffc839ad0
loads a book of the given name into the given array.
public class storyLine public static void readFile(String file_name, String[] array) throws FileNotFoundException{ int story = 0; File file = new File(file_name); Scanner scan = new Scanner(file); while(scan.hasNextLine()) { array[story] = scan.nextLine(); story++; } }
1
6adb18785b64449238559a090f520908
c4f561a39ff2060882bcb116abbe4cfe
---------------------------------------------------------------------------- %%Function: DoColumnReorder %%Qualified: AzLog.AzLogWindow.DoColumnReorder %%Contact: rlittle Handle a drag of the column header (reordering the columns) ----------------------------------------------------------------------------
{ ASSERT(abs(nColumn) <= m_aColumnData.GetSize()); if (nColumn != m_iSortColumn) { bool bColumnChanged = abs(nColumn) != abs(m_iSortColumn); m_iSortColumn = nColumn; SetSortIcon(); if (bColumnChanged) if (m_visualStyle == Present) if (m_iSortColumn != 0) m_pListCtrl->SendMe...
0
4fd310caa0adfb39d35d432d932d71c7
9417ffaf41abe0167a10e7c48fb9a553
从SharedPreferences获取图片
public class MainActivity extends AppCompatActivity implements View.OnClickListener private Drawable loadDrawable() { String temp = sharedPreferences.getString("user_image", ""); ByteArrayInputStream bais = new ByteArrayInputStream(Base64.decode( temp.getBytes(), Base64.DEFAULT)); ...
1
2b83462a08e6511046d679c71e788790
3af874bc366d98d36e0cc71d329327b0
Returns the meta object for the attribute '{@link conceptualmodel.Entity#isAbstract <em>Abstract</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getClassifier_IsAbstract();
1
8c243b9437ae38e290b218a0b8cef504
a92c93f61457019c7a5c8cffd62ddfba
verify that the event falls into the relevant date parameters
$hasPermission = CRM_Core_Permission::event(CRM_Core_Permission::EDIT, $eventID, 'register for events' ); return $hasPermission && self::validRegistrationDate($values); }
1
ac6b1c667148c4a115d9760ab7f8cb69
0163396012ccd38556eaf6bbd3a5b216
获取相似橱窗
if request.method == "POST": image_url = request.POST.get("URL") category = request.POST.get("category", None) if similarPicCategoryDict.get(category): category_id = similarPicCategoryDict[category] else: category_id = similarPicCategoryDict["other"] i...
1
4a854756438ff8074062fcc409f53340
18e95561157eab47e25e1af3b02c5fcb
delegates the task of validating user names and passwords and successfully entering the system to the current UsersAccountService.
{ var loginAttempt = await accountService.LogAsync(Username, Password); if(loginAttempt) { await navigatioService.NavigateToAsync<DashboardViewModel>(); } else { } }
1
c622171aa368b6534dbbbe6a7bfe9bf3
10720ccdbeaae8079e3573cc7b1b1cf7
Draw a solid sphere and return the corresponding object Keyword arguments: name -- The name for the new sphere object r -- The radius segments -- The number of vertical segments (like beach-ball panels) rings -- The number of rings (horizontal slices) location -- The location of the center of the sph...
def template_sphere_shell(r_outer, r_inner=0): img = _template_sphere_disc(dim=3, outer_radius=r_outer, inner_radius=r_inner) return img
0
6eb99e09d5b9e8e20a89d15d9f3864a8
ee616aca5bd361728735afb11c44fbb3
Fakultät rekursiv
public class Prog_A static long fakt1(int n) { if (n<2) return 1; else return n*fakt1(n-1); }
1
adb55fce94450fcf34a01612d3c0c556
aa17cbba3aaa707e6a79c7c1080f74ef
Read an 64-bit value from the specified address. Corresponds to viPeek64 function of the VISA library.
class LocalKernelDebuggerBase(object): def read_qword_p(self, addr): sizeof_qword = sizeof(ULONG64) raw_data = self.read_physical_memory(addr, sizeof_qword) return struct.unpack("<Q", raw_data)[0]
1
23a3bd53af02fb052ffbaccac364f468
cdba00d90c292ff4c97d29f757483097
Returns the succeeding version where the corresponding search string matches.
public class SearchClient public final class SearchResult public SearchResult next() throws IOException { return search(nextParams); }
0
902a9a4e3450a8159944f43d4cbedeb8
ec52fbb6d2f812f3e1838319748cd439
Computation of the signal power in dB Notebook: C1/C1S3_Dynamics.ipynb
def calcPower(D): return np.median(20 * np.log10(np.sum(np.abs(D), axis=0)))
1
1d7dab7dc37a615a872ee3b7e10d7a2a
0a3b54675554f263a419f970d61b2324
This method is invoked whenever something is happening in notepad++ use eg. as if (notification.Header.Code == (uint)NppMsg.NPPN_xxx) { ... } or if (notification.Header.Code == (uint)SciMsg.SCNxxx) { ... }
namespace NppPlugin public abstract class EntryPoint [DllExport(CallingConvention = CallingConvention.Cdecl)] private static void beNotified(IntPtr notifyCode) { Notification nc = (Notification)Marshal.PtrToStructure(notifyCode, typeof(Notification)); if (EntryPoint.Notified ...
1
7d2e89997ebbd3d26bbe43ee55df102d
3158c51867ad2d489f7632038cfa0d32
konvertiert Wiki-Formatierung ('''...''', ''...'', <u>...</u>, <i>...</i>, <b>...</b>) nach LaTeX
for md_code in re.findall(r"\*.*?\*", md, re.M): tex_code = "\\textit{" + re.findall(r"\*(.*?)\*", md_code, re.M)[0] + "}" md = md.replace(md_code, tex_code) for md_code in re.findall(r"_.*?_", md, re.M): tex_code = "\\textit{" + re.findall(r"_(.*?)_", md_code, re.M)[0] + "}" md ...
0
d3ce1cf9116432764fa83a2a841bed32
3ac7fb1cb9ce6d696b7ee62080d7e97a
decode 4 '6-bit' characters into 3 8-bit binary bytes
static uint8_t m_bus_decode_3of6(uint8_t byte) { uint8_t out = 0xFF; fprintf(stderr,"Decode %0X\n", byte); switch(byte) { case 22: out = 0x0; break; case 13: out = 0x1; break; case 14: out = 0x2; break; case 11: out = 0x3; break; case 28: out =...
0
94b9b320a71fc22647c6ededbc33de05
09059152cbb16fabf62083ae79ed3a55
Pass an i2c device, and this fxn will purge all of its queued work. Presumably, this is because it is being detached from the bux, but it may also be because one of it's operations went bad.
{ ASSERT(_self->super.type = I2C); i2c_dev_t* self = (i2c_dev_t*)_self; free(self); }
0
b4ee6b9861d5099f72c58a00e3607a8d
edd81615b78aefb1dae45db495d39aef
Open central server url
class BaseOpenDirectory(OpenDirectoryABC): def server_url(self) -> str: return self.config.get('OPEN_DIRECTORY_SERVER', self._default_server)
1
907d51dfeee78accda6cb04693a1109a
0e8d02d23e7e71b444375800d2e2fe92
Merges the second object parameter into the first object, in-place.
function mergeObjects(obj1, obj2) { for (let attrname in obj2) { if (obj2.hasOwnProperty(attrname)) { obj1[attrname] = obj2[attrname]; } } }
1
9893973f8dde764e8d791d58fca6d8a9
1362cf8c331d051791a0d57cf4ff0964
Convert input image to JPG, JPEG format Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, ...
namespace Cloudmersive.APIClient.NET.ImageRecognition.Api System.Threading.Tasks.Task<ApiResponse<byte[]>> ConvertToTiffAsyncWithHttpInfo (System.IO.Stream imageFile);
0
df42b523a04f7c635b8e5fdd9aedbccd
a9a1b50b6473e793e9d2d999bad1950c
查询用户所属职位ID集合
@Service @AllArgsConstructor public class SysPostServiceImpl extends ServiceImpl<SysPostMapper,SysPost> implements SysPostService @Override public List<String> selectPostListByUserId(String userId) { return baseMapper.selectPostListByUserId(userId); }
1
0dbbcf2a1a927b63bec8a4e5bf1d6004
205a6180f0e9e0dddf8fab1eb2f75c49
保存直播回放并保存直播截图
class LiveController extends Controller public function savelive(Request $request) { $data=$request->all(); $param=json_decode($data['param'],true); try { $name = $data['guid'].time().'.mp4'; $format = 'mp4'; $start = $param['start_...
1
6ed191c6c16ff9d4a64e17d9647b0c56
202f54058c419eaea6b652f73ba9e4ae
Dispatches the PDF generation in the concrete PDF generator.
class GenerateInvoice implements ShouldQueue public function handle() { PDFGeneratorFacade::generatePDFFromJSONData($this->_data); }
1
da281823b25aa7a6f5e8da8014597725
9de6f8d2ad5d24819537964d42917c56
Loads the user entered batchlist file into a private variable for later use
public class BookDriver private void loadFile(File myFile) { ArrayList<String> inList = new ArrayList<>(); Scanner fileInputScanner; try { fileInputScanner = new Scanner(myFile); while(fileInputScanner.hasNextLine()) { Stri...
1
ee02b2c085e8a599159c36076d37b131
641450f121ff809fdc0daa7037b45879
Add `element` to the beginning of the Array variable `arr` and return `arr`
function addElementToBeginningOfArray(array, element) { return [element, ...array] }
1
6815e948cbc35673bafa4a6c8a857e96
fe249c940f8db36e3df171467b66acfd
通过委托获取临时访问密钥 该接口可以用于通过委托来获取临时访问密钥(临时AK/SK)和securitytoken。 临时AK/SK和securitytoken是系统颁发给IAM用户的临时访问令牌,有效期为15分钟至24小时,过期后需要重新获取。临时AK/SK和securitytoken遵循权限最小化原则。鉴权时,临时AK/SK和securitytoken必须同时使用,请求头中需要添加“x-security-token”字段,使用方法详情请参考:[API签名参考](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html) 。 该接口可以使用全局区域的En...
{ JsonResponseModel<GenerateTmpKeyResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "GenerateTmpKey"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<GenerateTmpKeyResponse>>(strResp); } ...
1
ae6cb94bc63ee4752f41e182934f5ce5
f5c6d3ef96364a6506e2e73cc0107f7b
доступ к пропертям NetObj по имени через поля класса ( AgentNetObj.angle=0 равноценно AgentNetObj["angle"] = 0 )
public class MyObject public void setField(String name, Object value) { try { Field field = this.object.getClass().getDeclaredField(name); boolean isSetAccessible = false; if (!field.isAccessible()) { field.setAccessible(true); isSetAccessible ...
1
7c3fe697b36a3e42a65239b50a6460e1
4db85a3af73ae1580d33f2f38aaef54c
Palauttaa aina luvun, joka osoittaa, kuinka monta km henkilö on juossut kuluvan vuoden aikana. Ei omista näytetään vain julkiset.
public class Hirvio extends Hahmo @Override public synchronized int getPuhtiNyt() { return 0; }
0