query_id
string
corpus_id
string
query
string
code
string
label
int64
628e9faf518ddd714344491454112be5
22ca8a3680623cbc422b94c56c49f1b4
This test case ensures required scopes decorator still works when no scopes are specified.
class TestAuthorizationCodeTokenView(BaseTest): def test_refresh_no_scopes(self): self.client.login(username="test_user", password="123456") authorization_code = self.get_auth() token_request_data = { 'grant_type': 'authorization_code', 'code': authorization_code, ...
0
a27c7f18dacb0e1d95602615533d14ed
d3ab45a3cb6823c8992531865caedb79
添加缓存中的短信验证码(重置登录密码)
public class SendCodeCache public static void setSMSCache(SendCodeBean sendCode){ JedisUtils.hset(SMS_CACHE_KEY, sendCode.getBizcode() + sendCode.getTel(), sendCode); }
1
8592a6b493f81bcdb078d4079d3fb397
3c9ece9c0d0087c93b7c77d7abfe60d3
Переключает раскладку написанного текста с русской на английскую.
namespace AM.Windows.Forms [PublicAPI] [MoonSharpUserData] public static class InputLanguageUtility public static void SwitchToRussian() { ChangeInputLanguage(RussianLanguage); }
0
cbd7429f7bf7dd19a7db3658ae6e467e
a7630654281c02370dc96443a3f5aaad
Selecciona con color una imagen elegida, y comprueba que no haya otra seleccionada, en ese caso, la despinta, y pinta la nueva
namespace Control_Pacientes_Clinica_Machado public partial class Odontograma : Form private void btnDiente32_2_Click(object sender, EventArgs e) { this.btnDiente32_2.BackColor = ColorTranslator.FromHtml(ColorSeleccionado); }
0
2d42f848d2de4df81b8396b374cb5c78
24367737ab2ad0bd16a8bb1cbeeda9b5
Returns the meta object for the attribute '{@link com.b2international.snowowl.snomed.snomedrefset.SnomedConcreteDataTypeRefSetMember#getDataType <em>Data Type</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getDataTypeType();
1
6799545cbb9236813e85149b97c6b2dd
53abfa68fa8e6728bfe0f8c59578677e
called when user change the country code
function App() function onDropdownChange(value) { if (value != null) { setCountry(value.value); } }
1
71c6b77763268a20c48b31cbbc0daf56
6839c5640a38c320d49669a4d32d662f
transform a density matrix to a row vector
ones_x = X[[0], :, :][:, :, [0]] * 0 + 1 q = torch.unsqueeze(q, 1) * ones_x q_conj = torch.cat([q[:, :, [0]], -1 * q[:, :, 1:4]], dim=-1) X = torch.cat([X[:, :, [0]] * 0, X], dim=-1) if inverse: X_rot = hamilton_product(q_conj, hamilton_product(X, q)) else: X_rot = hamilton_produ...
0
46a47ba601756ad73e15838baa0f9ae5
95d56bc500495e68ffb0d18bd0bf7eda
A simple table creation for our database using customer_schema.py
def create_schema(): print "COMMIT_TABLE_DDL ", COMMIT_TABLE_DDL dbutils.create_schema([COMMIT_TABLE_DDL], DATABASE_FILE)
0
365144ea905b7771361987655760bfab
17a46caa20f4682cf5586e21f8892a69
Returns whether or not the given key binding is fully satisfied, including modifiers
return( ((Boolean(modifiers & _Modifiers.ShiftDown) == Boolean(modifiers & _Modifiers.ShiftUp) ) || Boolean(modifiers & _Modifiers.ShiftDown) == this._shiftKey) && ((Boolean(modifiers & _Modifiers.CtrlDown) == Boolean(modifiers ...
1
a55547da9ce19e6e4f67559e4c9a331b
c3b73f87cbe9d94538b7ec9d2ef992b8
指定年月の月末日の取得
{ DateTime dtLDM = new DateTime(year, month, DateTime.DaysInMonth(year, month)); return dtLDM; }
1
5b088d8ae1bc1b43d8c53eca99a89ef7
93d22802e14b7f23d0f273a6ff3aec11
Récupère les commandes que l'utilisateur a déjà pu faire
class Model_Users public function commandeUsers($id_users) { $query = 'SELECT * FROM commandes WHERE id_users = "'.$id_users.'"'; $commandeUsers = $this->db->get($query); return $commandeUsers; }
1
8762a65f70fc970b3d3ff1587a5e2f24
1e25d207451d6c12bf9548b56d727bec
Creates the config parser. Maybe more to do here later with parameter.
class ConfigParser(object): def __init__(self): pass
1
44714a83786db97473d88302528f26e4
a920c526a5321686aa152247226d84f5
勤務時間用セッター
public class Ticket public void setWorkingTime(int workingTime) { _workingTime = workingTime; }
1
c66d068762efe70155c85d9b8a55d0f8
a8d7c2c1fd6e07cf331bb65f0e0022a3
Extracts target species from .pdf
first = filename.find("_") partial = filename[first+1:] first = partial.find("_") final = partial[:first] return final
0
ddfede90e06097f94c94b5a0f8cd7213
0d326e33eae872182137a36370a0b3cb
Set filter value default text input field.
class FilterSelect extends Filter public function setPlaceholder($placeholder) { $this->placeholder = $placeholder; return $this; }
1
cbfccba1b3c1670f016c900ad7608444
cbe1d5b891ac99d89a21728134467700
<br>[機 能] 選択したブックマークSID(複数)からブックマーク情報を取得 <br>[解 説] <br>[備 考]
@FormUrlEncoded @POST("select_bookmark.php") Call<BookAndMember> select_bookmark(@Field("loginId") String loginId);
0
332a343060ef2c872eb41066a7b0830c
6a77639568f8a0a42b4ab094b2091c98
noteのjsonからprety_midiのNoteのオブジェクトに変換するマッピング関数
{ LazyMatch lazy = new LazyMatch(query, @"\Av([0-9]+)L([0-9]+)(?:(?:_|\-)([0-9]+))?o([0-9])([a-g])(\+|\#|p|\-)?\Z", RegexOptions.IgnoreCase); Match match; if (lazy.Evaluate(out match)) { int vel = Convert.ToInt32(match.Groups[1].Captures[0].Value);...
0
b7b5300c41684f304ace80da49cf213f
0783be50ee83a4035b2ec94d78957221
: COMMON_ESCAPE | HEX_ESCAPE
func URLEscape(src string) string { hexCount := 0 for i := 0; i < len(src); i++ { if shouldEscapeTable[src[i]] { hexCount++ } } if hexCount == 0 { return src } dst := make([]byte, len(src)+2*hexCount) for i, j := 0, 0; i < len(src); i++ { switch c := src[i]; { case shouldEscapeTable[c]: dst[j] = ...
1
4a172d384208f0e132ea96a462e60c87
e2ae19ed29e89b7846b8cc19874b73bf
Closing an image means dilating then eroding the image. This sequence of operations "closes" the holes in the mask.
void DepthHoleFiller::performMorphologicalClose ( ofxCvGrayscaleImage &input){ input.dilate(); input.erode(); }
1
b4f8f602d18d2b78aa044a0af049f9ce
1f6443c9996ece685f299021e0d17ee2
Sets the initial history when solving.
if h0 is None: h0 = np.zeros_like(self.h) self.h = h0
1
5c40a15e6bab328d3507884929b0d65b
d61bcdbb2a1ddb012aa1d0727d3e0670
Add one bid for this item
public class Item public void acceptBid(Bid bid){ borrower = bid.getBidder(); bids.clear(); setBorrowed(); this.setRate(bid.getAmount()); ItemController.UpdateItem updateItem = new ItemController.UpdateItem(); updateItem.execute(this); }
0
b119adbf0a8630a4f4019814d39275c4
098a70f235aa8116df11ad1937fac9a0
Raise matrix to given power
matrix = self.copy() matrix.matrix[row_no] = [elem ** n for elem in matrix.matrix[row_no]] return matrix
0
a6ef8ea869bd19f8d144cdd9e3471942
8c9fd7aec3ca6ce5b8efff269aed4dd6
更新抽奖次数、用户积分
@Service public class TransactionDelegate public void transactionUpdateLotteryDetails(String token,LotteryConfigRedis userLotteryInfo,LotterySetRedis lotterySetRedis)throws Exception{ Gson gson = new Gson(); Token tokenIn = gson.fromJson( StringUtil.decode(token), Token.class); int uid = Integer.parseInt(token...
1
9c19a2370c051dae7269627b3ea1500d
604931ec5c5632a07b6cf7029ad4c8bd
Asserts that two Eif JSON structures are equal. Adapted from example code in https://github.com/lanthaler/JsonLD
abstract class Assert public static function assertJsonStringEqualsJsonString( string $expectedJson, string $actualJson, string $message = '' ): void { static::assertJson($expectedJson, $message); static::assertJson($actualJson, $message); static::assertThat($actualJs...
1
450e0e6b474ded6aecdabdf380c1c118
4f317591405e68c783cff419168874bc
Creates a SongFile based on the files metadata
{ $id3 = new \getID3(); $id3->option_md5_data = true; $id3->option_md5_data_source = true; $id3->encoding = 'UTF-8'; $file_info = $id3->analyze($file_path); if (!empty($file_info['error'])) { $media_warning = 'Warning for uploaded media file "'.pathinfo($m...
1
cbbedd56bd6c41a151c70d863b6da0ee
895fbf2e0195d4ed1cc4f20a3847318c
returns a list of all learner names that can be used for calls to create_learner
def all_learners(): return ['adagrad', 'sgd_momentum', 'mira']
1
c1159e5f65dbadd1400e9f41bcb26219
63cb8c24ddaa4af6167501c201396774
This function get a vector of sample and uses 'discriminant_function' function to calculates value of discriminant function for p(x|w2) when P(w1) = 0.4, mean = (16, 4) and Sigma = 4*I
global z2 global zeroCh1,zeroCh2,zeroCh3,zeroCh4 global sample sample = [] mean1 =z2[0].mean() mean2 =z2[1].mean() mean3 =z2[2].mean() mean4 =z2[3].mean() fea1 = (mean1-zeroCh1)/4100 fea2 = (mean2-zeroCh2)/4100 fea3 = (mean3-zeroCh3)/4100 fea4 = (mean4-zeroCh4)/4100 c...
0
6dc28abf6f45a7095a12f3a9e45f4e21
d13e983a439ca1fb08d6ee9b37f59e74
we set the debug level to Warning
func init() { log.SetLevel(log.DebugLevel) }
0
e7e79985b6b7296cc1877fd02c79e332
04547ebd62de90cf990d03abd7939f13
Retrieves a link between two neurons.
const int from_neuron_id, const int to_neuron_id) { return std::find_if(link_innovations.begin(), link_innovations.end(), [from_neuron_id, to_neuron_id]( const Link_innovation &link_innovation) { return link_innovation.from_neuron_id == from_neuron_id && link_innovati...
1
913522da92707a528710895fed9cbf5d
768363bf97510f2ee042623308699f53
右半部分
long start = currentTimeMillis(); sort(array, middle + 1, array.length - 1); partRightTime = currentTimeMillis() - start; }
1
83e56636c2471891bbd5448d65d7d067
6c9dae908833918d88e40d9ce0bebb64
Sets the horizontal length of the object.
class PHPSikuli public function setH($obj, $val) { $this->callFunc('setH', array($val), $obj); }
1
9cd883e9a81a688d34ddbd19d1450188
0073b9639f668c99d374ddd53469d889
Get the encrustor used to create the item material
public class EncrustedItems implements ToolMaterial public FabricItemSettings getSettings() { if(encrustor.getSettings() == null) { return new FabricItemSettings(); } else { return encrustor.getSettings(); } }
0
e62c04de4f2ff8698ac94998d9020dd4
017bdb0700cb2dfbbbb67ac5839267ad
planCallNotEqual generates a not equals (!=) Interpretable.
func opNot(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) { x := callContext.stack.peek() x.Not(x) return nil, nil }
0
6040b8e4876d2ef0f821f2f856dd9bcf
18d0f8ea565d89695d90236faace5338
Ensures that front side of the surface is facing the user.
public class MaterialBarcodeScannerFragment extends Fragment public void setFrontfacingCamera() { facing = CameraSource.CAMERA_FACING_FRONT; }
1
7741da81be164dd9d63d0209fa70edf8
d31cc6dbba7d9d884dba0f4e51bad9d6
FUNCTION*---------------------------------------------------------------- Function Name : scanAndBuildBBT Returned Value : SUCCESS or ERROR Comments : This function scans device and build Bad block table for used memory area END*--------------------------------------------------------------------
{ #ifdef FUNC_FREQ_POINT_SEARCH_EN static UCHAR8 fail_count = 0; static UCHAR8 switch_chk = 0; static UCHAR8 bcch_index = 0; UCHAR8 i; UINT16 tmp; if ( 0==fps_st.auto_scan_en ) { return; } WTD_CLR; switch ( fps_st.auto_state ) { case FPS_AUTO_ST_NEW_SCAN: FPS_ResetResultParam(); FPS_AutoStartBcc...
0
4c8429e3e3a24e4255c13b9ba8b093ff
b183243dc8b47d2cdb43620af941aa77
Combine source path or class path entries using the system separator, for example ':' in unix
if(isEmpty(paths)) return null ; StringBuilder builder = new StringBuilder(paths[0]) ; for(int i=1; i<paths.length; i++) { String path = emptyIfNull(paths[i]) ; path = path.startsWith(File.separator) ? path.substring(1) : path ; path = path.endsWith(File.separator) ? path.substring(0, path.length()-1) ...
0
76b3d56205649b25806d12e848586d64
582cda7a4bfc4a682dde3c188a91c049
不能修改大小
if(this._width == width && this._height == height) return false; let old = {width: this._width, height: this._height}; this.width = width; this.height = height; this._em.trigger('changeSize', {old: old, new: {width: this._width, height: this._height}}) }
0
55175ac3a6f401bda5371caaf74a91b2
5fe91c914992e5589d430e269a8a7314
Método para enviar los datos del formulario al servidor sobre crear el viaje desde el conductor
let inputs = document.getElementsByClassName("inpts"); let fecha = document.getElementsByClassName("fecha"); let aerolinea = document.getElementById("selectair"); let aux = aerolinea.selectedIndex; let aerolinea_definitiva = aerolinea.options[aux].text; let x1 = fecha[0].selectedIndex; let x...
1
b60f6c1a10a31048a441d4501aa1b8ed
d0103c49c498ee4cdb0c0535d6dd22c8
Takes one metric or a wildcard seriesList. For each datapoint from each metric passed in, pick the minimum value and graph it.
function processMetrics(metricResults) function collectMetric(metric, metricResults, withCount) { var val = null; var metricCount = 0; for (var n = 0; n < metricResults.results.length; n++) { var metRes = metricResults.results[n]; var metval = getMetri...
0
018201cfae8dded7de98d82e6964edf6
bedff767ddb754eae6e2e68bce8cde08
Данный метод находит вес одного слова.
text = None count = 0 if self.link == link and self.text is not None: text = self.text else: text = self.getText(link) if text is not None: count = text.count(word) value = count * weight return value
1
28bae79e24b992427aa9b42285ca4d75
9283474bf7ffec6cb6b7f2b69ceee2c3
根据个数创建变量名
if not _varnumber then _varnumber = 0 end _varnumber = _varnumber + 1 return "tolua_var_".._varnumber end
1
947c5c6ef68e2fc6286b83d0aaea6690
640e6b5239a9e395c716dad3d40093a0
查询指定时间段内连锁店相关营业数据指标增长率
{ List<Parameter> parameters = new List<Parameter>(3); parameters.Add(new Parameter() { Name = "BeginDate", Type = SqlDbType.DateTime, Value = beginDate }); parameters.Add(new Parameter() { Name = "Profession", Type = SqlDbType.Int, Value = profession }); paramete...
1
1443dd085512b9489bf300d6c0d608df
84dd2b75c52e74570bf72dd87a061ce6
采用tfidf进行摘要抽取
vectorizer = TfidfVectorizer(min_df=2) features = vectorizer.fit_transform(snippets) vocabulary = str(vectorizer.vocabulary_) with open('data/vocabulary_Tf_idf_mindf2_Full.txt', mode='w', encoding='utf-8') as a_file: a_file.write(vocabulary) return features
0
7050d5793843af4c5396b80ff36e2c09
fde883b5fa78a4d6a19e9eee94242672
Ensure that the segments property of the paragraph is consistent with its contents and consists of real database objects.
protected boolean validateSegment(LoopDescriptor descriptor, LoopStack loopStack, Tokenizer tokenizer) throws EDISyntaxException { LoopContext loopContext = loopStack.getTop(); SegmentUsageDescriptor segmentDescriptor; ...
0
06c5bbb4db5ff32993f478fa90dc59b5
a113fa22d9c1bc501bb7f0e568d22858
退学学员-->查看跟进记录
ordNo = getOrderNumber(self) result = helpReserve("001553305", ["https://images-qa.kanche.com/merchant/basic_inf/d6082bc38577c4b6a5b7acaaf8d61b5b.jpg"], "5", "", "安那般那呐喊给您寄了跟进记录" ...
0
7e2104bc9fc33598f6ee3de724862d51
ea055c1562dcf4add33f239311cd3da7
Set if the octave up/down effect is reversed.
namespace ES.Ascom.Alpaca.Devices void SetReversed(bool reversed);
1
0e2955aa3636d8fc5d218a01cfe355b3
dd14dd6b7466c9bf5d0ea62c94565024
Method which validates the coordinate generated by the computer, without print statements
list_of_possible_coordinates_str = ['a', 'A', 'b', 'B', 'c', 'C'] list_of_possible_coordinates_int = ['1', '2', '3'] coordinates_input_is_valid = False while coordinates_input_is_valid == False: print(('Player " ' + str(player_mark) + ' "' + ' turn\n').center(width)) print("Provide VALID...
0
3778fa9650b3da7991f1016ab78ea562
c24ba4384104a78da92a76a476ff4945
Sets the nillable property.
public abstract class Element extends AbstractElement implements AXIType public abstract void setNillable(boolean value);
1
9674627fc3a0e4655b07107a20a2105b
5185b4e478d94180502206b26ab5b842
string类型金额转换为分为单位
public class Bytes public static String fen2Yuan(String transAmount){ String amount=new BigDecimal(transAmount).divide(new BigDecimal(100)).setScale(2).toString(); return amount; }
0
e240ca26f31305daeea0d90dc0ec8633
f8939c666e4eca2b131e9be9fdaf59d1
Deletes the given record from Azure.
namespace Underscore.Bot.MessageRouting.DataStore.Azure public static class AzureStorageHelper public static async Task<bool> DeleteEntryAsync<T>( CloudTable cloudTable, string partitionKey, string rowKey) where T : ITableEntity { TableOperation retrieveOperation = TableOperation.Ret...
1
59e1129e224b3dabb6525a243c407b1e
ab8778a991cdd4d3c323ddd020589be7
获得选择的商品数据
selectGoods({ commit }, ids) { commit('SELECT_GOODS', ids) }
0
d4bbabfda36f6b9b479ab3199fb78647
f27adc4ca57f4a4c37bf5490a1286cc0
코멘트 양식을 리턴한다.
class BlogModel extends Model public function getCommentForm($row) { ob_start(); include(KRE_VIEW . '/Blog/include/comment_form.php'); $comment = ob_get_contents(); ob_end_clean(); return $comment; }
1
27bfd7662464ba4737409ea59a594e5b
a57986b6cd1026804105cb52c30cc378
Processes the rolling file.
{ SetProcessingTimerEnabled(false); try { foreach (WatchedFile file in GetCurrentWatchedFiles().Where(f => !f.IsBinaryFile)) { try { long len = FlushFile(file.FileName); ...
1
93f8772709ee1ffa8689d52e114fddcf
47ed027545c8209927f2b99f15b274ec
Determine whether the user can view any incomes.
class AuctionPolicy public function viewAny(User $user) { return $user->permissions()->whereSlug('can_view_auction')->exists(); }
0
7ad80789fbd46f58afd84e4e6fa22cf3
cf400be1825f4720b971f034c9ea8919
显示新生成的CD-KEY列表
{ if($this->session->userdata('auth') != '00') { echo '<script>top.window.location.href="/index/login"</script>'; } else { $data=$this->data; $data['keys']=$keys=$this->mod_admin->select_from_order('keys', 'key_id', 'asc'); foreach($keys as $key => $value) { $data['key_use'][$key]=($value[...
1
ef96f765205d1c78399ab012483d9b24
b32aa916bb8059440eecac7ee6420e66
Returns the intersection of sets in a 2D table. ``` use dypdl::prelude::*; let mut model = Model::default(); let capacity = 2; let object_type = model.add_object_type("object", capacity).unwrap(); let a = model.create_set(object_type, &[1]).unwrap(); let b = model.create_set(object_type, &[0]).unwrap(); let table = m...
def intersection(u, v): return _do_set_op(u, v, 'intersection')
0
e3ecfccc328180245997659b3d7d97e6
6359c6b71a7d1a53b9c2a6d9da66e44a
Gets the property name in the second selector.
{ Check.NotNull(keySelector, "keySelector"); var member = keySelector.Body as MemberExpression; if (member == null) throw new ArgumentException("keySelector Expression body is not MemberExpression type"); return member.Member.Name; }
1
41de44954bbc80ecfb287549cae9f756
d8f6bce6d6d37b6b7974852821377d8e
Bayesian distribution of predictions for a set of test data.
gaussians = self.predict_list_of_gaussians(x_test) unnormalized_gaussians = [] for prediction in gaussians: predictive_mean = prediction.mean() predictive_std = prediction.stddev() predictive_mean = (predictive_mean * scale) + mean predictive_std =...
1
36f0300b4fb00b8dd9270742de876fbc
fa8560c6509e87d5aab83f03935a6cc2
Renders the description using the appropriate markup language.
private void _renderDescription( UIXRenderingContext context, UINode node ) throws IOException { if (isInaccessibleMode(context)) return; Object label = node.getAttributeValue(context, DESCRIPTION_ATTR); if (label == null) return; if (!HiddenLabelUtils.supportsHidde...
1
a9c7780968ed75978d7b5f700f6c73df
e3b82938b031b6ba6107058877a489dc
Convert a YAML CSS dict tree into a set of CSS blocks.
{ $output = array(); foreach ($this->list as $ruleSet) { $selectors = $ruleSet->getSelectors(); foreach ($ruleSet->getTokens() as $token) { if (is_object($token) && get_class($token) === 'CssCommentToken') { continue; } ...
0
c34d0483e8e1700ced63b5724ccdf3aa
11ed764d184b7a702f03f89256130b62
Strips directory and file extension from the specified path, returning only the filename
if (path == null) { return null; } int extIndex = path.lastIndexOf(EXTENSION_SEPARATOR); if (extIndex == -1) { return null; } int folderIndex = path.lastIndexOf(FOLDER_SEPARATOR); if (folderIndex > extIndex) { return null; ...
0
2e9c7f9fe48d21cf496144a945e5b444
efe4e0b4b68e92e65b570564616ea918
[DOALOG_FORM_VISIBLE_TRUE 显示form弹窗]
{ gameObject.SetActive(true); if (CurrentUIType.uiFormType == UIFormType.PopUp) { UIManager.Instance.SetMask(gameObject); } }
1
7954bce6db9d796c40a638495062fe7b
2b2253be7c73c21c18faa32bb19f0b6d
分页查询废品订单表
List<Waste> list(String sql, Map<String, Object> paramMap, PagingParameter paging) throws DaoAccessException;
1
8f4a097775c1832a48ddc1775560fe68
70d44ce451dc9835d1a2b57d3b3dcca8
Gets the increasing quality data source.
if (ds__ == null) { __createDataSource(); } return ds__; }
0
d0976bb137d58418ae0cd11117ec59c4
51398d32f80a4cf84bb87b2f7f54be7a
https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html
intent_name = event['currentIntent']['name'] fn_name = os.environ.get(intent_name) print(f"Intent: {intent_name} -> Lambda: {fn_name}") if (fn_name): invoke_response = client.invoke(FunctionName=fn_name, Payload = json.dumps(event)) print(json.dumps(invoke_response)) payload = js...
1
f64d8fa26a7fa6ddd9a4537295301aab
5fe2dd06f0054e91a018735ec8bfdadf
将Django Settings DATABASES 数据库参数转化SQLAlchemy所需的连接url
def db_secret_to_url(secrets) -> str: password = secrets.get("password", "") dbname = secrets.get("dbname", "") engine = secrets.get("engine", "") port = secrets.get("port", "5432") host = secrets.get("host", "") username = secrets.get("username", "") return f"{engine}://{username}:{password...
1
25af862e12eb1e8df4c87d7e89cd4297
108e4528376441269e2bd01dc6764e36
商品相册ID的取得
class ItemService public function getItemId($item) { $i_picture = $item->getI_picture (); $sql = "select i_id from w_item where i_picture='$i_picture'"; $sqlHelper = new SqlHelper (); $res = $sqlHelper->execute_dql ( $sql ); $sqlHelper->close_connect (); $item->setI_id ( $res [0] [0] ); }
0
a495416299a9bc76ad793ab3899e3670
5338e1816cb881635be4aa77198c6b9d
Yhdistetään käyttäjän valinta tietokoneen valintaan
namespace Village_Newbies public partial class Varaukset : Form private void cmbVarausPalveluValinta_SelectionChangeCommitted(object sender, EventArgs e) { VarausPalveluTauluPaivitys(); }
0
dfefa2860dc9515c904ea249e269c531
78b5c295a258b7a558e238f97e9096d7
Computes the inverse of the distribution function.
namespace Euclid.Distributions.Discrete public abstract class DiscreteDistribution : IDistribution public abstract double InverseCumulativeDistribution(double p);
1
cce771c39173fa4db941b93172b6e5dd
71f80eb9d870b37b586e43a87620da88
Test storage creation (when table already exists).
async def test_ws_create_update( hass: HomeAssistant, hass_ws_client: WebSocketGenerator, storage_setup ) -> None: assert await storage_setup(config={DOMAIN: {}}) client = await hass_ws_client(hass) await client.send_json({"id": 7, "type": f"{DOMAIN}/create", "name": "new"}) resp = await client.rece...
0
5cedbec640dc2ce011c79035a070da13
57e82ac0552597934f1a2b82c39d7036
Whether this unit may move and attack as an action pair during its turn. This is, primarily, a distinction between direct and indirect units.
{ switch(_commandType) { case UnitAICommandType.Protect: case UnitAICommandType.SkillTo: case UnitAICommandType.AttackMoveTo: case UnitAICommandType.FollowAttack: return true; } return false; }
1
5c7b01d97227e1dfe4bcf717a5f7f462
924b1e09f54256fc3175f788bc5c149c
Whether the output should be the contents of the repository (which is the default), or a link that allows CodeBuild to clone the repository before building. **Note**: if this option is true, then only CodeBuild actions can use the resulting {@link output}. :default: false :see: https://docs.aws.amazon.com/codepipeline/...
class ServiceSourceConfigurationCodeRepositoryArgs: def code_configuration(self) -> Optional[pulumi.Input['ServiceSourceConfigurationCodeRepositoryCodeConfigurationArgs']]: return pulumi.get(self, "code_configuration")
0
321f56ef83121e774b96f90b10f38cc7
6d31806d6edef3c48994dca21481a29d
本行包括多于一个字符的代码。即总行数-空白行-注释行
{ int spaceline = 0; int codeline = 0; char c; int jnull = 1; FILE* fp; fp = fopen(filename, "r"); if (fp == NULL) { printf("文件打开失败或文件不存在"); return; } do { c = fgetc(fp); if (c == '\n') { if (jnull == 1) spaceline++; else codeline++; jnull = 1; } if (c != ' ' && c != '\n' && ...
0
90fcc6618818191f45ae0b7916e7ec04
d4321185912fbfecd5d7ccec9a77406a
Cross-iteration aware domination determination. Currently very conservative since predicate analysis is not cross-iteration aware. -ITI/JCG 8/99
SM_def_dominates_cross_iter_action (SM_Reg_Action * def_after, SM_Reg_Action * action) { SM_Oper *def_sm_op, *action_sm_op; L_Oper *def_lcode_op; def_sm_op = def_after->sm_op; action_sm_op = action->sm_op; if (!(def_after->flags & SM_DEF_ACTION)) { L_punt ("SM_def...
1
fd88accb59947058ce5e235c06ff80f9
0157afe67d902d15c8df7a98e748407f
Enable the combobox
class DBListbox(tk.Frame): def but_enable(self): self.modifybut.config(state=tk.NORMAL) self.deletebut.config(state=tk.NORMAL)
0
e284544edff2164b90d26b963e2993bf
b2d2706f94af0dea067028ba826f9bc2
Returns the ID of this temp ship security message.
public int getMessageId();
1
59fa7bd9378aa34d1ef417d6144694ad
9ec1de20dfccb47eb6f1aab107f8c6f0
@summary: Retourne la dernière coordonnée de la liste de coordonnées à explorer
def getTresorCourant(labyrinthe): return labyrinthe['player'][0][1][0]
0
3a7a1bc7db8bd175522c101862eac714
97434d89f4dbd41fa4c881039aab9d17
如果file 节点引用的贴图在当前工程不存在 就copy 过来,并返回新的贴图 全路径
def reconnectFileTexture(): _filePath = cmds.file(q=1,sceneName=1) _dir = os.path.dirname(_filePath) _file = os.path.basename(_filePath) _fileName = os.path.splitext(_file)[0] _ext = os.path.splitext(_file)[1][1:] _relativePath = _dir+'/'+_fileName ...
0
20d24f96a82e91ff820280af4506554c
ef88d178cc8783faec41abc16cd28df9
Saves the current subset configurations, their sums, and their difference in weights.
public class MainWindow extends javax.swing.JFrame implements ActiveDatasetObserver, ActiveNetworkObserver private void saveConfiguration() { String optionShowEdgeWeightsStr = this.menuItemShowEdgeWeights.isSelected() ? "1" : "0"; this.setConfiguration("MainWindow", "show_edge_weights", optionShowEdgeWe...
0
a3a3ddf43a05e75cda6fdb26e8a2420b
08bc500c54a113e65590c6ae4164f5b6
check for blackjack and print if was blackjack
def black_jack(a,b,c): if sum([a,b,c]) <= 21: return sum([a,b,c]) elif 11 in [a,b,c] and sum([a,b,c]) > 21: return sum([a,b,c])-10 else: return 'BURST!!'
0
9aa10fe958b4a9123f51f60ab0993e12
cd5fb44cfd82b3dda8646ddb47d3c6f7
Una funzione che fornisce l'ultimo id aggiunto, corrispondente a quello dell'ultimo utente nel file xml
db = getReadableDatabase(); String str=""; cursor = db.rawQuery("SELECT _id FROM " + TABLE_NAME + ";", null); cursor.moveToLast(); str += cursor.getInt(0); cursor.close(); return str; }
1
dd8771215f0635cc56f46a318291d2fa
20f346b06f2f2794ac0b20b80bc0b4c4
TC - O(n), SC - O(n)
function containsDuplicateV2(nums: number[]): boolean { return !(nums.length === [...new Set(nums)].length); }
1
854e30645200111642f97550bd9e2719
f727017bbd2e6eaf771b4394c8158e1e
Calculates the real order or degree of the polynomial.
[MethodImpl(MethodImplOptions.AggressiveInlining)] public PolynomialDegree RealOrder(double epsilon = Epsilon) { var pos = 1; if (Count > 1) { for (var i = Count - 1; i >= 1 ; i--) { if (Abs(coefficients[i]) ...
1
1a3a35460c0d928419fec4c529d3707f
b16e9bfd33ae705e48401a1bc00c8d81
Busca uma força nodal na estrutura por um nome especificado
AbaqusModel::NODE_SET* AbaqusModel::FindNodeSet(const char* sznset) { list<AbaqusModel::PART*>::iterator it; for (it = m_Part.begin(); it != m_Part.end(); ++it) { AbaqusModel::PART& part = *(*it); NODE_SET* ns = part.FindNodeSet(sznset); if (ns != nullptr) return ns; } return 0; }
0
8b5652964fe1539e06350f99d69b1197
3d173eb1c8d5de57d37c89f97492815a
Get the Minimum version of the product where this Event is present.
public VersionMatch getVersion();
0
29e872da08b978efad9c8f5cb2c5d2bc
51544ede3629fc4114220117af9d5f2a
Returns an integer from a float for degrees
{ float val = (rads*100)/51 * 100; return (int) val; }
0
949697efe4ab69bc63e9b92a82e4fc6f
fc29a577e89aaa128a911be99d406917
数据库,从ad_keyword中找出关键词对象列表,支持模糊查询
authori = auth.checkTokenEnabledByRequest(request, options) if authori == False: return response_forbidden(request) params = requester.getDbMargeParam(request , options) dbname = params.get("dbname") modelid = params.get("modelid") dbid = dber.getDataBaseId(dbname) res = dber.getKeyw...
0
01b11bf706b333c586c0e9ea9cef8011
7005c6f105dcd5883495aadc97695164
This method gets the instance variables of Object o.
public class Reflector public static Object[] getFieldValues(Object o) throws IllegalArgumentException { Field[] fields = o.getClass().getDeclaredFields(); Object[] values = new Object[fields.length]; int index = 0; for (Field field : fields) { field.setAccessible(true); try { values[index] = field.ge...
1
b910030a87169a9c696d8e5b4379e419
b02dcc3023d888b975e55f890a4ba090
Returns a single record of a fee
public Fee getFee(int feeId) throws Exception;
1
4810efdca885376cbd0bac5610821bde
7c4a7ddbdacc324663f27d00767db807
r"""dict: Keyword arguments for send comm.
return {'cpc': self.cpc, 'extprot': self.extprot, 'autosend': self.autosend, 'handshk': self.handshk, 'password': self.password, 'punchread': self.punchread}
1
e28baed8631ab55cb9f50a37cf21b038
10d8b96c342f689fab5addc4b76a4ba9
GetCurrentTerm returns a TermInfo struct for the current academic term.
func GetCurrentTerm() TermInfo { term, _ := GetTermByCode("FA22") return term }
1
10d5568c4b0c1b96f2061cb3e4278b2a
832828a599aea25cb0d48525756e1df9
Return true if there's an obstacle in front/back of the robot.
public class FSM private boolean haveObstacle() { return SonarPoints.obstacleInRange(sonars[g.BACK]) || SonarPoints.obstacleInRange(sonars[g.FRONT]); }
1
4a86a5632f2c7710f9bf7f9032c2efa9
ba240ccb22e23c01fc2c48d5a6a695ac
Return a vector with indexes to all empty tiles.
return_values = [] for x in range(len(self.state)): if self.state[x][0] == 0: return_values.append(x) return return_values
1
e79e60318c9dbd40327cc2faf5d6bda5
3ccd96453c5b429983f8ff15c415ea26
删除一个问题相关的图片在数据库中的记录
public class Manage extends Responsor public int deleteImageRecord(int id) { deleteImage(id); MapValue sqlParams = new MapValue(); sqlParams.put("id", id); MapValue countResult = dbSelectOne(Dim.DB_SOURCE_YIYUEN, SQL_NAMESPACE + "getImageCount", sqlParams); if (countResult != null && countResult.isNotEmpty())...
1
e7fb16d8548e80453e6a300d5d3181c0
c3c3a312b574e0ce1ade6de3d923aace
Returns the value of the '<em><b>PublishStartDate</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>PublishStartDate</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
boolean isSetPublish();
0
044e2874f03a83ac55d860fbec55c5fd
f985e8f5377243afa08513268f5067cc
Creates a new instance of the DataTable class.
class DatatablesScripts extends Component public function __construct() { }
0
0270964b71c5fe658417b191500bcd0d
c108d42abd888982229ee03c2777eddd
Surround expression with parentheses
private fun wrapInParenthesis(expression: OtpErlangObject): String = "(${toString(expression)})"
1
73df439547c405b823ce0ea2cbef1780
4928026b85fa6b357e5bf1f89d83610f
得到快递费用
{ $.ajax({ url:"/FrontOrder/cal_express_fee", type:"POST", dataType:"json", data:{ city_id: city_id, total_weight: total_weight, total_amount: total_amount, }, timeout:10000, success:function(d){ if(d) { if(d != 'failure') { $('#city').html(d.city); $('#express_fee').html(d....
1
fbd391e4375517703ba1680431521eb2
a04a1b6b559dc30b57e410ee8fc0585c
Converts a feature value into the external representation
public abstract class AbstractEntryProcessor<K, V, T> extends AbstractProcessor<K, V, T> protected Object toInternalValue(V externalValue) { return m_cache.getValueConverter().toInternal(externalValue); }
0
a48b9827869278865afe0bb3e9ebe1c2
a130716761d85cf8382b82c668ee0f0b
DoReckonCustomerTags 计算用户tags并返回
class CustPromotionActivityPublicModel extends BaseModel{ function cust_need_tag_or_retag($cust_id, $buyer_nick){ }
0