query_id
string
corpus_id
string
query
string
code
string
label
int64
6374f437f1e35cab758e7d3060a9b406
4ed313be908a0782137d72cd6502ce5d
Not like constructor --- more useful for debugging
class Smart def to_s "#{self.class.name}: r=#{@r}, p=#{@p} y s=#{@s}" end
1
0c77a402d8d484c09385aff5c98604e5
3cc3ee572d2f6e63de326f2637889516
Update this object by making a PUT API call with the provided api_args
class AsaRestApi(object): def put(self, *args, **kwargs): return self.post(*args, method='put', **kwargs)
1
fc280213b0de4734e94683a90297ceb1
45fdf075c9edc4df1617cad197123e82
Exit a parse tree produced by {@link SqlBaseParser#complexColType}.
public class sparkJavaBaseListener implements sparkJavaListener @Override public void exitComplexColType(sparkJavaParser.ComplexColTypeContext ctx) { }
1
a6418fea89677cf5bb9e50fc5bda5ff2
afe22970f2fa17984800aec99a03fd6b
Create a dictionary with query names as keys and sequence as values {query_name: seq}
def sequences_to_dict(seq_gen): dict1 = {} for seq in seq_gen: try: dict1[seq.name] = seq except ValueError: pass return dict1
1
e64816d85649baacfbc0f55bcbf582a0
fc2f82e72341c7565e2ed93257800e5f
newton-raphson method MAFM
def LM (a, l, f, g, ds , x, y): grad = gradient(x,y,a) it = 0 while grad > 10**(-5) or it>100000: grad = gradient(x,y,a) hessienne = ds(x,a)*(1+l) d = -float(grad)/hessienne cout = f(x, y, a) if f(x, y, a+d)<cout: a = a+d l = l/10 else: l = l*10 it+=1 return(a)
0
85ab74f875a2840947618ff0c9b11b4e
cd93560c6f2f165033207b667bace416
判断两个sheet是否相同
{ try { var ad = GetSheetData(a); var bd = GetSheetData(b); if (ad.Length == bd.Length) { for (var i = 0; i < ad.Length; i++) { for (var j = 0; j < ad.Length; j++) { if (!ad[i][j].Equals(bd[i][j])) return false; } } return true; } } ...
1
c947fe484c1f71ddedf693359832b839
e5b253466948d028574feef2ba7ac318
请求:http://localhost:8081/spring_study_war_exploded/servlet/HttpServletRequestTest?name=jack 显示结果: HttpServletRequest接口常用方法及说明 public String getContextPath():返回请求的上下文路径,此路径以“/”开头/spring_study_war_exploded public Cookie[] getCookies():返回请求中发送的所有cookie对象,返回值为cookie数组[Ljavax.servlet.http.Cookie;@2a6b1bd6 public String getM...
@WebServlet( "/RequestDemo1") public class RequestDemo1 extends HttpServlet protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String method=request.getMethod(); System.out.println(method); String contextPaht=request.getContextPa...
1
9b6a0cd75b85602fc3ceb9be1537d568
8297ae65eebac21f2b7fbf7d7f330226
Initialize the neuron with model parameters.
self.time = time self.dt = dt self.rest = rest self.Cm = Cm self.gNa = gNa self.gK = gK self.gl = gl self.ENa = ENa self.EK = EK self.El = El
1
eb47f810d1880f69b60e4bddde8935af
4cde85f507bf702f409a3d26baee4e77
Replace < and > with HTML escape chars.
class wsgiHTTPRequestShim: def _quote_html(self, html): return html.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
1
ef1a8ed71e8db3089c2a0503acba3e88
9101ef20a68761b473895c3e79e759dc
二维数组平铺开
function array_tiled(array $array) { foreach ($array as $key => $value) { if (is_array($value)) { unset($array[$key]); $array = array_merge($array, $value); } } return $array; }
1
b6de1b794c7aac43bc4b67309c1574e2
fac2afcbe655a29525747b1ed799f9eb
IdeaUpdate constructor.
class IdeaUpdate extends Form public function __construct(IdeaService $ideaService, Idea $currentIdea = null) { parent::__construct(); $this->setAttribute('method', 'post'); $this->setAttribute('action', ''); $this->setAttribute('class', 'form-horizontal'); $this->add([ ...
1
32d53ec165786ff4c733db1fcf747d9b
cc0ea694e15965b2dd4709d175a09a61
Rechecks whether auras are still in use by the unit
namespace WCell.RealmServer.Entities public abstract partial class Unit : WorldObject, ILivingEntity, ISummoner protected virtual void OnAffinityChanged() { if (IsPlayerOwned) { m_auras.RemoveOthersAuras(); } }
0
8283a4ea9c378b7b4e0f3d0bdf6a6ae8
03d788de40fadd42a8d36c5ec45c57aa
Represents a field on the board
self.name = name self.hp = hp self.coordinates = x, y self.score = score
0
ed2162b7e6ba5936f5c7c83051d11656
ded516289018d285dbbdf9b1d37c4293
获取商户的商品二级分类
namespace GD.API.Controllers.Merchant public class MerchantController : MerchantBaseController [HttpGet, Produces(typeof(ResponseDto<List<GetServiceClassifysResponseDto>>))] public async Task<IActionResult> GetServiceTwoLevelClassifys(string classifyGuid) { var categoryBiz = new Merchant...
1
f9b3420e67cfaa38b9755ab186cc71ec
af7506c83b310d67431bd0203b4c2c6b
Returns the is active of this cscl status.
public java.util.List<CsclStatus> findByisActive( Boolean isActive, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<CsclStatus> orderByComparator);
0
be71d99f7427a5a1bc319a7ac88f3db0
05eac2176a9a1dd85bcb2b658c3199eb
POC接口-主动:修改临时群组
namespace JointOffice.Models Showapi_Res_Meaasge UpdateGroup(UpdateGroupPara para);
1
5b449ca777b877a2f4fee2b08ed1aaa5
e90369fb638d8a1803cf1b7bb5c2bedb
Query number of implemented IRQs. Refer to GICv2 Architecture Specification, Section 4.3.2.
uint32_t IntActiveIrqNumGet(void) { return (HW_RD_REG32(SOC_AINTC_REGS + INTC_SIR_IRQ) & INTC_SIR_IRQ_ACTIVEIRQ); }
0
c917c9b94f821c059fa2710bf3236895
58be96753a547e6379027a544f2da887
Returns name of class and items joined by ",".
{ var resultBuilder = new StringBuilder(); resultBuilder.Append(this.item1); resultBuilder.Append(", "); resultBuilder.Append(this.item2); return resultBuilder.ToString(); }
0
1d20cf22b678962319f5b0290412a94d
08c0a00c237c644362a7e5315ffe0421
判断某联赛球员交易市场状态
JSONObject json = null; try { String jsonStr = ChinaPnRInterface.queryTransStat(ordId, startTime, queryTrade); json = JSONObject.fromObject(jsonStr); } catch (Exception e) { e.printStackTrace(); } return json.getString("RespDesc"); }
0
61a88be3caf3c5b730dda167c8fa63ee
9d4dcab186a2779d7512b24e7519a7cb
Returns the meta object for the containment reference '{@link org.babu.xtext.training.smallfunc.smallFuncDsl.Attribute#getDatatype <em>Datatype</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EEnum getDatatype();
1
d9c4779103ed48814c229920d5075f52
de184aa6da89ee6adc97583e4b0e611b
由一个复杂的Object到Json的Demo
public class demo public void Test02(){ City city = new City(1, "xs", new String[]{"cxc"}); String s = JSONObject.fromObject(city).toString(); System.out.println(s); }
1
eb2f70e92a0cd35ed0be718feba445fa
36863c038b47ce546fb32f63de965396
Filter featured testimonials only
class Table_Transcript extends Omeka_Db_Table public function filterByFeatured($select, $isFeatured) { }
1
8ceb17ef064ce318727949d9897c7701
6b3c279243fc295fcda7f228dd6eedc8
从最后一个非叶子结点向前构建
std::queue<StructNode *> structNodeQueue; int index = 0; StructNode *structNode; this->structList[0]->index = 0; structNodeQueue.push(this->structList[0]); while (!structNodeQueue.empty()) { structNode = structNodeQueue.front(); structNodeQueue.pop(); if (structNode->stru...
0
04c72f2637bd6e5d647fb86eb2133d97
ad9ee8b1bbc6ce0393a6c35f33d38fc2
Cannot do type check against SRE_Pattern, so we use duck typing.
class RegexMatcher(RichAttributeErrorBaseType): def __eq__(self, other): if type(self) is not type(other): return NotImplemented if self.pattern == other.pattern: return True return False
0
6ed08cafff191fe8c50fa1b5d80dd53e
d17ccbc2544851f0fd83de1aec78e3c5
counts periods, question marks, and exclamation marks
int sentenceCount(string s) { int counter = 0; for (int i = 0, n = strlen(s); i < n; i++) { if (s[i] == '.' || s[i] == '!' || s[i] == '?') { counter++; } } return counter; }
1
0ea5ca2bfc07a5fdcf83add4a2b14944
2c8271639b909f2e5006d5c4f1e1ae54
Get all vouchers list for display page
class VoucherController extends Controller public function index() { $data['vouchers'] = Voucher::all(); return view('voucher.index')->with($data); }
1
cd6e1fdb0147fcc938c28dd32f5b37fe
69a948858994e05213bd5ff570ab6eb9
Canonicalizes the given well-formed BCP 47 language tag, including regularized case of subtags.
namespace FlutterSharp.UI public class Locale public string ToLanguageTag() => _toLanguageTag();
0
062672e7b892fd6b27eb78bff8224e12
598c7e92f446d24dc98f46127bb8393e
ダイアログ情報に基づきQUERYの送信処理を呼び出す。 送信するQUERYには連番を振る。この連番は受信時に確認される。
void sendQueryPanelInfo() { ShowProgressBar; NDTransData bao(_MSG_SYN_QUERY); bao << Byte(QUERY_SYN_PANEL_INFO); }
0
55c431d9393a506f0a87be57e304254e
68ae79655218e0ad3463ec6019d47a76
@brief Donne le nombre de connexion du compte.
public class User{ public int getNbSessions() { return this.nbSessions; }
1
63ccd8a81b1dde4820a08d9b8c33c6bb
b849d73baf5aca1b31efd1b43fb21fcf
This adds a property descriptor for the Unlockonerror feature. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString( "_UI_UserPoolClientPropsBuilder_cognito_preventUserExistenceErrors_java_lang_Boolean__feature"), getString("_UI_PropertyDescriptor_descript...
0
9e7f4a71bbf71644b6e773cb690777a9
40da96c78ebbee1420320910f24870ab
Create a Credentials object by reading information from a file. It returns an object of type GoogleCredentials.
def read_cred(path: Path) -> Credential: data = path.read_text().split("\n") return Credential(*data)
0
79e8ea415a63602b463f972429c362e8
9917e15349da2b1a771cbbe985e00a36
Compute the spectrogram and inflection points from loaded audio.
class Audio: def load_spectrogram(self, samples, fs=44100): S, freqs, times = mlab.specgram(samples, NFFT=4096, Fs=fs, window=mlab.window_hanning, noverlap=(4096 // 2)) return S, freqs
0
a6902f48733bbf1ab9da76f48f8f86c4
0225cdd4c354f99d81ab5209786c8ba7
プログラム終了操作コールバック関数
def gui_end_callback(db_logger): db_logger.db_logger_setup() db_logger.process_end() db_logger.db_logger_teardown()
1
ba1e41e6df35c1dde7ef2f8b19ae8288
1d3c9d97347f5a9ae874a7e1e925a500
设置周视图是否可滚动
public class Lib_Widget_ViewPager extends ViewPager public void _setScrollable(boolean isScrollable) { this.isScrollable = isScrollable; }
1
d7dadefa1439486192dce58c549c8415
964c272982bc2156cf461457f5029616
Unregisters an operation previously registered by the current thread.
class BackEnd implements Observer void cancelOp(byte cookie[]) { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "cancelOp({0})", ByteArrayWrapper.toUuid(cookie)); } if (entries.remove(cookie) == null) { final ByteArrayWrapper baw = new ByteArrayWrapper(cookie); if (registration...
1
d87e76ce9bb9bc16c1f7fd4f95af5720
72915ebe8c5b5619f451b79cf39efe05
查询教练的默认课程(休假课程)
String queryDefaultCourse(String coachId);
1
53d42dd4c788a047084e2d6300eb5c59
1190610ae19eaa38aeabe0081fcff2f5
stores behavior that was chose by the user in the options menu
public class MainAct extends AppCompatActivity @Override public boolean onOptionsItemSelected(MenuItem item) { SharedPreferences settings = getSharedPreferences("mypreferences", MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); Intent ourIntent; switch (item.getItemId...
1
eb730c076a0b385bd3afdf151aac0b61
ee50d26630b0c54dc49bd14c8986e112
方法7:断言字符串必须有值,去掉空格,然后判断字符串长度是否大于0,如果没值,则抛出自定义异常,异常消息为第2个参数默认消息
public class AssertUtil public static void hasText(String condition, String message){ if(!(condition.trim().length()>0)) { throw new Runtime(message); } }
1
fbafa3e1acc8afbd3b8b3da70cf3fb8a
a8b0d5ca6ae820c2f2e72f0ea7a55b3f
Returns uuid of the topology that is running.
class TopologySummary(object): def get_user(self): return str(self.data['user'])
0
c55268c8b33549553c3b071b385446c1
b92e643aa1997145face0b0b3f3c8462
Parse a GUANO metadata block containing Unicode data
class Translations(BaseTranslations): def _parse(self, fp): res = dict() key = u"" value = u"" escaped = False have_key = False skip_ws = True pending_ws = "" ignore_comment = False unicode_digits = 0 unicode_buffer = "" encoding = ...
1
4a507f2944f31a1157883b849097e1ca
b01458afe41a6a93f51d281e7125e9d2
Sets the image upload 1.
{ if(isset($this->image1)) { $targetDirectory = "uploads1/"; $targetFile = $targetDirectory . $this->image1; $fileType = pathinfo($targetFile, PATHINFO_EXTENSION); $uploadOk = 1; $check = getimagesize($_FILES["image1"]["tmp_name"]); ...
1
86b9d26725b7f763e218edfad8887c31
efacdc41416a3fb80b8d7f57d86165cd
Cancella la categoria spostando su di un livello le relative figlie
List<String> items = selectCategoryChildren(id, null); this.removeCategoryChildren(items); this.dropCategory(id); return true; }
0
9e39c494a12078ec97b662a4231d1d50
d7683bf4d46d50416fe64251f35f6a73
Get list of stripped timestamps
def getList(line): date_times_ln_fn = line.split(';') date_times_ln_fn[2] = date_times_ln_fn[2][1:len(date_times_ln_fn[2]) - 2].replace("'", "") date_times_ln_fn[3] = date_times_ln_fn[3][1:len(date_times_ln_fn[3]) - 2].replace("'", "") return date_times_ln_fn
1
06d1fb21da07518de38bea27e245e6da
3d6b569b17bd947f0c83d67b488a6090
Create and return a CursorLoader with the CONTENT_URI of a given book
public Loader<Cursor> onCreateLoader(int i, Bundle bundle) { String[] cookieProjection = { CookieEntry._ID, CookieEntry.COOKIE_NAME, CookieEntry.COOKIE_DESCRIPTION, CookieEntry.COOKIE_PRICE, CookieEntry.COOKIE_QUANTITY, ...
0
f3f9701eec826621ce707446b39fe4a5
40030bd7380591ee0ef4dc558c3bcac5
在指定链表上删除给定学号的节点。 特别注意:这里的头节点带数据,如果删除了头节点,必须要返回新的头节点地址,因此这个函数有返回值。
int link_delete(stu_link *p_link, int num){ p_link->p_cur = NULL; node *p_tmp = NULL; for(p_tmp = &(p_link->head);p_tmp != &(p_link->tail);p_tmp = p_tmp->p_next){ node *p_first = p_tmp; node *p_mid = p_first->p_next; node *p_last = p_mid->p_next; if(p_mid != &(p_link->tail) &...
0
464090af0630b65c612bbe610cdd084e
7bd3963ad0ebcb11b4f77f3649f1cd8b
Sets the start up project.
log_func() if self.dte is None: return try: self.properties.Item("StartupProject").Value = \ project_name except Exception, e: logging.exception(e) VimExt.exception(e, sys.exc_traceback) return
1
79a9385f1832c88d7c0e1deea9d500d2
191558f84cd3569c6d11e89afd8808fa
returns real tokens amount considering token decimals
{ return ($remainingReal = $this->getRemainingReal()) > 0 ? $remainingReal : 0; }
0
6e3122b1163da0b487fd34a3af7f47cc
71c9a20774080a84495f601b8aafdbc2
将输入字符串转换成Python代码
def str_to_python_code(_str1): try: if 'time.sleep' in _str1: return 'sleep方法暂不支持。' _str1 = 'str1=""' + re.sub('print\(', 'str1 += f"\\\\n" + str(', _str1) print(_str1) write = '\nwith open("str.txt", "w", encoding="utf-8"' + ') as f:\n f.write(str(str1))' exec(_s...
1
8869724f10f4596cd8e6862285da895b
431a2c1f6554826d370b33d8c6c93ee2
Returns the statement type (e.g. SELECT, CTAS, ANALYZE) from the query context.
DbStatementType statementType();
1
2da8c38a2a8e83494a13706011cf1659
f295076255d72ea0a17bb194da4a449d
Looks online and retrieves variable results from the codebook.
$what_pops = cc_transtria_get_all_pops_type_for_study( $study_id ); $pops_ids = array_flip( cc_transtria_get_multiple_dropdown_ids_populations() ); $pops_keys_only = array_keys( $pops_ids ); $lookup_codes = cc_transtria_get_codes_by_names( $pops_keys_only ); $results = cc_transtria_get_all_code_results_by_study_...
0
521e45aa057d70c4848215c1527d0cc1
a481b94557beba0b661005c5ee84e1f9
获取当前最大指令配置
{ var query = new WaveConfigQuery() { Skip = 0, Take = 1, OrderDirection = Core.Data.OrderDirection.Desc, OrderField = "SysNo" }; var max = (await _modelService.SelectAsync(query)).FirstOrDefault(); ...
1
61dd4a2903b33a2a6f1fc837777672d5
c6b6ebb50e199b98ba6bc7f4f7d6f650
Kill the BroRecord when the ruby object is garbage collected
check_pcaprub_loaded return if not @ipv6_icmp6_capture @ipv6_icmp6_capture = nil GC.start() end
0
def3dc6dc98e54f91840ab474fea2d9d
4e2e5a241486a6f96c0649c17e27a1a4
Find the latest training config file in folder
list_of_files = glob.glob(os.path.join(folder, "*")) if(not list_of_files): raise Exception latest_file = max(list_of_files, key=os.path.getctime) return latest_file
1
8a6f34860e29dfe11e6e5654ba426c50
20e103148865e6a3385bc3fdb1595b87
タップキャンセル
{ tapText.gameObject.SetActive(true); tapText.SetCallback(delegate(){ SceneNavigator.Instance.Change("GameScene", 1.0f); }); yield return null; }
0
83db74170876d40823f874b8582973d4
159a324c24defebf000a614bbe4f8cd1
设置手术及操作日期5
@ApiModel(value="手术申请单主表") public class SsSqdzbReq extends PageQuery{ public void setSssj(Timestamp value) { this.sssj = value; }
1
9e5541ae72fee6aa7a83fb9be531209b
d544e8ca3e0cd1a9551dda50c9e784bf
Gets the extracted test data from a temporary json file
with open(filename, 'r') as fp: test_data = json.load(fp) return test_data
1
91778664bc72f974d5c942de0b7e1f7e
7f56218e3532199ecd046f7352e9f890
方法描述 获取合同下的转让列表
@Service public class RelateManager public List<com.justonetech.biz.domain.ShareProTobuild> getShareProTobuildList(Long unitId) { return shareProTobuildService.findByQuery("from ShareProTobuild where bjbh in (select bjbh from ShareProContract where cbUnitId=" + unitId + ") order by bjbh asc"); }
1
0424a0524c8e40debff3618559d43979
b45db04c20d0250a462101a5a31ff71c
positionement de la fenetre lors du chargement
MyWindow::MyWindow(QWidget *parent) : QMainWindow(parent) { setGeometry(300, 200,1400,700); setFixedSize(1400,700); compt = 1; m_widget = new QWidget(this); m_box = new QBoxLayout(QBoxLayout::LeftToRight); m_widget -> setLayout(m_box); m_scrollArea = ne...
1
8b7ce7395ce606368c06823486e63839
2c342adbac971d1f5d59daffb311719a
fix for browsers who like to run JS before images are loaded
var iframe = window.frames[0]; if (iframe.attachEvent){ iframe.attachEvent("onload", function(){ loaded = 1; }); } else { iframe.onload = function(){ loaded = 1; }; } }
0
c103e48bb584f7be7ade33ece5669221
d4ff2b12aad169dbeb295007e26def8a
Remove the manual override and let the environment decide if it's ok to colorize
func AnsibleForceColor() { os.Setenv(AnsibleForceColorEnv, "true") }
0
eec60777658c39c350b81a55319bab56
6220c7314c6529d348cf9430a2c528ec
获取用户的交易情况
public ResponseObject userTransactionList(@PathVariable String page, @PathVariable String rows) { User user = ContextUtil.getUserFromRequest(); List<UserAssetDetail> userAssetDetailList = userAssetDetailService.getUserTransactionDetails(user.getId(), page, rows); List<UserAssetDetailVO> asse...
1
a725c960cb71afb37d3d9b04d5de53c4
978d25b9f830c0ff01d6598d30268968
删除有条件的记录
keys = list(condition.keys()) if not keys: log.error('error condition,empty:%s' % (str(condition),)) return sql_where = ' and '.join('`%s`=%%s' % (k,) for k in keys) param = [condition[k] for k in keys] rows = conn.execute('SELECT * FROM ' + table + ' WHERE ' + sql_where, param).fetc...
1
4060455cb1af0b0aa55c1427216cce54
53720b0fe88e2b53607061a7bb097001
Twist object by the UI Slider value
geometry_msgs::Twist obj_twist; try{ listener.lookupTwist("vicon/StainlessSteel/StainlessSteel", "map", ros::Time(0), ros::Duration(0.5), obj_twist); dq_slider << obj_twist.linear.x, obj_twist.linear.y, obj_twist.angular.z; return true; } catch (tf::TransformException ex){ } ...
0
3ccadd058436bbdfc6fd53cae8d764ee
c5a3153de20c4832323f2229796638bb
根据学号和学校编号获取用户信息
@Select("SELECT s1.no, s1.name, s2.name school, s1.gender, " + " s1.nation, s1.birth, s1.type, s1.grade, " + " s1.position, s1.applyDate, s1.beActivistDate, " + " s1.beDevelopDate, s1.power, p.identity, s1.batch, " + " sum(sc.acquireTime) time " + "FROM S...
0
a68c3f8e3844496544df014ef7b0677e
efdc07ecf9d49e064ad97c3ade8a681f
Checks whether the player has lost because he has no budget left.
boolean hasPlayerLost(Map<MapPoint,Unit> units, PlayerInformation playerInformation, int playerNumber);
0
c4f144e9c167abcf639d96bf0766e386
5ff5d1f49d7c474bce35b547450ee489
Adds a new summoner into the database, and fulfills initial stats
{ if (txtUser.Text != "") { Summoner _s = league.getSummoner(txtUser.Text); db.addSummonerInfo(_s); lstUsers.Items.Add(_s.name); cboReportUser.Items.Add(_s.name); db.addGameInfo(league.getRecentGames(_s.id), ...
1
47963af6fc33e6a57c9694f28889be91
76d34987283cc6b0e831f5b9972b84fa
创建解析错误的函数
def error(): print("分析出错")
1
80e7e2a8616a67ced2eaabe4436ad830
0852ab65bd25f9753c8a85b94d766403
Imports rocket data from file in local directory (name: rocketdatafile)
def importDataRatio(filename): pass
0
375907c94da237586f2ccbc7d230292b
5a3e5b93a84f4bfe42b0a1fde92944d8
A convenience function performing the log operation via the [kotlin.math] equivalent call.
fun <A, B> Function<A, B>.toKotlin(): (A) -> B = { this.apply(it) }
0
af298b39344bc0ad836c1c45a062cc05
36a1b87c34a3ca7e73964d0c51e39b2d
Récupère des certifications en fonction des paramètres passés
class CertificationRepository extends AbstractRepository public function getTvCertifications(array $parameters = []): array { return $this->getFactory()->createCollection($this->getResource()->getTvCertifications($parameters)); }
1
6677fd48b8e7bed915e739c09be83548
30bcb27cb4581c81d1e2d216f9e3e206
returns dictionary of sheet info for a specified sheet
class api_rd_wrt_excel(object): def excel_get_sheet(self,sht_name): return self.excel[sht_name]
0
c4eacaa205228b38fd82bd60924eeb6d
88827bd78edc1c5c4da43ea0f505571f
Updates all sizes when a new texture was applied or the text has been modified
void updateEnemyData() { size_t i; for(i = 0; i < ENEMY_NUM_TEXTURES; ++i) { gEnemyTextures[i].width = OBJECT_WIDTH_EQ(gTexture2Width[i]); gEnemyTextures[i].height = OBJECT_HEIGHT_EQ(gTexture2Height[i]); } }
1
00657de2b03767e48ab64bc94cce48d6
192ad98993dccb847503dd7d678f7d59
绑定一个类,类不会重复绑定,如果已经存在绑定信息,则仅仅返回原来的绑定信息
{ IBindingObject oldbindg = null; if (_allBindings.TryGetValue(binding.Name, out oldbindg)) { if (!oldbindg.IsSame(binding)) { throw new InvalidOperationException("当前声明的绑定对象和现有冲突,对象名称:" + oldbindg.Name); } ...
1
839364f76c58dcf8cf01ef33a25e5746
e4fe12a166dd5cec68127434a9c2ffec
Tells the input module the minimum threshold of the canny image
public class TiAPDS9960 implements ITiEventListener public void setProximityIntLowThreshold(int threshold) throws IOException { wireWriteDataByte(TiAPDS9960Register.APDS9960_PILT, threshold); }
0
b51f1d99dee9541080eeabcd7b108f1a
e394b1150e00eb699cd90f03304215a7
If this is a reply, this will be the value of the comment_id for the caption this a reply for.
export default class WallAttachment extends Attachment get replyOwnerId() { return this.payload.reply_owner_id || null; }
0
8a4df5f112820571b614b2e0f306a324
b6c072dd68e924efea094c8d7e816d26
设置"余次"属性
@Entity(tableName = "tb_user_student") public class UserStudent{ public void setYugufen(int yugufen) { this.yugufen = yugufen; }
0
cb52668d7963e6c8c0692f87f3e4456e
6516c728e4473f1a713d1edff72ee216
retrieve the vehicle type ID of the selected vehicle type
export class VehicleTypeService{ getVehicleTypeDetails(Id: number): any{ const ops = { headers: new HttpHeaders({ 'Authorization': 'Bearer ' + localStorage.getItem("jwtToken") }) }; return this.http.get<VehicleTypes>(this.baseURL + "VehicleTypeDetails...
0
473149bedd6d60ca4d12e04311eabd68
3977f34a23d8386d8cfd1f4f3f467920
Returns the number of related BasePost objects.
{ if ($criteria === null) { $criteria = new Criteria(PostPeer::DATABASE_NAME); } else { $criteria = clone $criteria; } if ($distinct) { $criteria->setDistinct(); } $count = null; if ($this->collPostVisitss === null) { if ($this->isNew()) { $count = 0; } else { $criteria->add(PostVi...
0
0bfaf9fcbeb0d56f9d03c7d37a3e6039
3cea9cf73ba2ef441e08df996fd8458b
フィルタの対象となるphp://memoryストリームを設定したストリームフィルタスペックエンティティを返します。
class StreamFilterSpecEntity public function resourceFile($file): StreamFilterSpecEntity { return $this->resource(FileResourceSpec::factory($file)); }
0
152b6fb34d43a017175e363315a23b0b
3e0fbabb5da16ff2bd4fe63ccd5ae4f0
Save Coordinates to json and images to output
void save_template(DoubleVector2D mesh_points, DoubleVector2D tri, Mat Template_image) { ofstream file_meshpoints ("./mesh_points.txt"); ofstream file_tri ("./tri.txt"); store_data(file_meshpoints, mesh_points); store_data(file_tri, tri); imwrite("./Template_image.jpg", Template_image); file_mes...
0
c70d2044bc305b3652f286ea1e4e8758
80d02e266e98bc8c380758ae19cd5956
Get the number of tables in a database
$getTables = $this->pdo->prepare( "SELECT COUNT(*) AS numberOfTables FROM information_schema.TABLES " . "WHERE table_schema = :dbName;" ); $getTables->bindParam(':dbName', $dbName); $getTables->execute(); $result = $getTables->fetchAll(); retur...
1
03e7ed2314260406c816a6157a35c669
ee847059fed1cf2aff888db25a961327
@brief 对映射表指定的目录索引号进行解锁操作(与 maptbl_lock_index() 实现对应操作)。
{ ZH_BOOL fOK; #ifdef ZH_NSX_DEBUG int i; for( i = 0; i < pIndex->iTags; i++ ) zh_nsxTagCheckBuffers( pIndex->lpTags[ i ] ); #endif if( pIndex->lockWrite <= 0 ) zh_errInternal( 9106, "zh_nsxIndexUnLockWrite: bad count of locks.", NULL, NULL ); if( pIndex->lockRead ) zh_errInternal( 9105...
1
4df5da5891e24de01973726471600f39
f9653a6549bba65aac5be07b4d8e4e7a
and move other controls to take up its space
{ SetSizingInfo( IDC_HTML_CONTROL, kTopLeft, kBottomRight ); SetSizingInfo( IDOK, kBottomRight, kBottomRight ); }
0
19e4918fa630564afa06a9696b3c039b
c137af18a02d94699612ac26c57259e1
SQL実行終了処理を実装する共通UOCメソッド(正常時)
namespace KakeiboWebApp.Service public class ServiceUpdateTblReceiptDetail : AbstractService protected override void processEnd() { }
0
77c45cc3df6d7a3d829297abc86a9a94
5e9dc11ddb5e0c60b20eb87ee4987fa4
2층에 올라갔을 때의 키입력 함수
def input_turnl(key): if key == 75: return 1 else: return 0
0
6e37dd729b2bfed001eb794d330d77e7
d52f4da51dafd7bc289989d41826855f
Model tests for DeleteImageSegmentRequestWrapper
export class DeleteImageCommand extends $Command< DeleteImageCommandInput, DeleteImageCommandOutput, ImagebuilderClientResolvedConfig > constructor(readonly input: DeleteImageCommandInput) { super(); }
0
3e0a30f20d4e333be3b8dc0e17770201
2f5dc044b2392d901907162b9d2f40c2
@brief 检查报警 显示颜色显示
{ if((Index !=19)|(AIndex <1)|(AIndex >6)) return; quint8 attr =0; if(IsAlarm) attr =5; emit sendSetColorToEdits(Index, AIndex-1, attr); }
1
2ac91536a71f13aa3484f5fbf37bf8ea
5c9875a384b4860a403e922c7500b7d2
Creates a configuration loader for setting up Kestrel.
namespace Microsoft.AspNetCore.Server.Kestrel public class KestrelConfigurationLoader public KestrelConfigurationLoader AnyIPEndpoint(int port) => AnyIPEndpoint(port, options => { });
1
727ecedd30425db2f6282102401e9d42
09ae9a7dac161e49ca5434fe4ba7105e
清退分销员
@Service("ifafirmManageService") //@Transactional public class IfafirmManageServiceImpl extends BaseService implements IfafirmManageService @Override public void delIfafirmDistributorid(String id) { String hql1 = " update IfafirmDistributor set isValid=0 where id =? "; List<Object> params1 = new ArrayList<Object...
1
e32180c72000dc93fec4a5f8817dd957
4d18ea27f2ba696a8a3ea5242ba71bb4
Sort elements as descending order of its text.
def sort_desc(strings): pass
1
7eeb869d72a83c956a64458ee1218f2e
f3f66a37f9543830f3e2cbccd7de19b3
Returns application settings manager class.
{ $connection = $this->getDatabaseConnection(); $table = $this->app['config']['laravel-settings::table']; return new Settings(new DatabaseSettingHandler($connection, $table)); }
1
771b7a7ca688bcf9f11d142d8dc8a316
4839ce92a1d2d10a189244ef107d76ce
Loop through all addrinfo results, binding to first valid one
int lwip_getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res) { return lwip_getaddrinfo_adpt(nodename, servname, hints, res); }
0
37369268365591bc134365a12bf6ce98
ddc8fcabb530a566c55c9ecd7db9b364
Brie’s Drawing teacher asks her class to open their books to a page number. Brie can either start turning pages from the front of the book or from the back of the book. She always turns pages one at a time. When she opens the book, page 1 is always on the right side: image When she flips page 1, she sees pages 2 and 3....
def pageCount(n, p): return min(p//2, n//2- p//2)
1
b3a5dffa29714bac6b845c011c5b14fc
8471138f7d2db85ef94be78a0eecb686
Find the error between target and current base position
class InverseK(object): def basic_error(self, target, torsion_angles): d = self.place_atoms(torsion_angles) return tf.sqrt(tf.reduce_sum(tf.pow(tf.subtract(target, d),2)))
1
eb47497cb9428bf6586f7d58cbd4bbb0
b7dab0d174d155d5fc597a0df6b77f9c
根据邮箱查询用户的所有信息,存在User里,返回User,要包含id
public User findAllUserInfoByEmail(String email);
1
3a1c1ed1e2ecc9912bfed74546f7fb13
1d18e0e88704a18198af6915f5c4752f
Unsubscribe timer from all events.
namespace Anycmd.Events void UnsubscribeAll<TEvent>() where TEvent : class, IEvent;
0
a089761bd790d8207025c27796bb19c0
e8a55f87d8cdb262a926eff4331de4ab
Do nothing if builder has not been created or no rows have been added yet.
class BuildRowsHandler public function handle(BuildRows $command) { $this->builder->build($command->getBuilder()); }
0
9aa8059dd4fe3894df2859464a56a6a7
914091d28dca9f6cbc617c4f0fa97a7a
Set feed view list.
public class FeedAsyncTask extends AsyncTask<Void, Void, Boolean> private void updateViewWithFeedData(String feedType){ ArrayList<FeedData> feedDataListForType = new ArrayList<>(); if(feedType.equals(context.getResources().getString(R.string.feed_All))){ feedDataListForType = Constan...
1
9058885e8333f9abd0bd86ea726e2c0c
9b4ae8e6c62d307726472bb05c8e3365
Gets device metadata as of a chosen UTC date. Fields are the same as for :func:`get_devices_full_history`.
class KATPortalClient(object): def sensor_history(self, sensor_name, start_time_sec, end_time_sec, include_value_ts=False, timeout_sec=0): if timeout_sec != 0: self._logger.warn( "timeout_sec is no longer supported. Default tornado timeout is used") par...
0
771285dc96d1dde51df19982300b41b0
52e6003c2189af5a0a834203216b5632
This creates a builder for the default configuration used by Checker Framework JUnit tests.
static Builder builder() { return DefaultClientResources.builder(); }
1