query_id
string
corpus_id
string
query
string
code
string
label
int64
09108fd25f232a8d65369a6f6b4b992e
b1c82b99e0bea8ae7048cd5666c22495
Gets an array of projected amounts. May contain nulls if there has been a fixing as of the valuation date.
namespace Highlander.CurveEngine.V5r3.Assets.Inflation.Swaps public abstract class PriceableInflationSwapAsset : PriceableInflationAssetController public abstract decimal[] GetYearFractions();
0
4911966d604afea024e1eefd3f4c3ba1
4774392eeb1856043f9f995e7bf9c94c
Returns the last occurrence of the specified week day in the month using the specified date.
namespace AgileUtils.DateTimeExtensions public static class DateTimeUtils public static DateTime GetPreviousOccurrenceOf(this DayOfWeek dw) { return GetPreviousOccurrenceOf(dw, DateTime.Today); }
0
4901f26e372d7af4745700786bf39bbc
222020e89065cf4257ded8d7d6fc225e
从DS1302中读出一个字节
unsigned char DS1302ByteRead(){ unsigned char mask; unsigned char dat = 0; for (mask=0x01; mask!=0; mask<<=1){ if (DS1302_IO != 0) { dat |= mask; } DS1302_CK = 1; DS1302_CK = 0; } return dat; }
1
defc2b5f9bb0e932d8499458ec0eaf19
7670a6bba267019ee25b7d644fc6a987
单个部门显示员工
function getEmploys(deptCode) { $("#emploee_arrangement").datagrid({ url:prefix+'/unSelectPersonByDeptID?dept_id='+deptCode, fitColumns:true, singleSelect:true, columns:[[ {field:'p_number',title:'工号',width:80}, {field:'p_name',title:'姓名',width:100} ]], onClickRow:function(ro...
1
3ad7d39893d6866ec16be57f8500933b
a672133e8312332a6878954ec897eb58
Adds a location and returns the instance
class Factory implements FactoryContract public function addLocation($location) { $this->finder->addLocation($location); }
0
dd930c7fa0b383d487220b2535b8c451
793aefebc5c6f9ac013eee3e4654daa9
修改工作区标签页的标题
function changeTitle(title){ Ext.getCmp('centertab').setTitle(title); }
1
76df75d7db2a62440ed1f2b5d62f0cbd
5a6cc5e9796aaf70b232735b57acff18
CSVデータからDBへのインポート処理を行う 職員番号で更新処理を行う
public int importCsv(InputStream requestedFile) throws MospException { List<String[]> dataList = OrangeSignalUtility.parse(requestedFile, new OrangeSignalParams()); for (String[] data : dataList) { int idx = 0; PostalCodeDtoInterface dto = new PfmPostalCodeDto(); dto.setPostalCode(data[++idx].trim()); ...
0
caf779e264edff9f98dd9449d40eb68e
851672b137aac4a2fb2f23a83d135fae
Calls utility method to create a reminder notification.
public class ActorMethodContext static ActorMethodContext createForReminder(String methodName) { return new ActorMethodContext(methodName, ActorCallType.REMINDER_METHOD); }
0
5c0dd66232469df39264e004a9e72f85
20f9994ccf47596d3ea1279e06db32cf
分解闲置伙伴可返还大量战魂和养成资源
function M:RespWarGodDecompose(msg) if self:CheckErr(msg.err_code) then self:UpdateAllRedPoint() self.eRefresh() self.eUpdateRedPoint() end end
0
6045ec9eb216bad1badd332e7a34da5d
ba3b07315bf3c6e539a28333942d734a
校验是否是银行卡号
var regex = /^\d{16}|\d{19}$/; if (regex.test(banknum)) { return true; } return false; }
1
88d92b6255f85019589715f4751adbc6
30c70a3d24a764457fb9a5fcc39a6ee1
Returns value of 'channel' property
class Playbill extends \Program\Entity\Playbill implements \Doctrine\ORM\Proxy\Proxy public function getChannel() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getChannel', array()); return parent::getChannel(); }
1
62ce46893df7de23725adc83bbd30b43
70a4732664f90c3823f3d0cb91a31d6e
We're supposed to be able to detect running in LXC by checking for dev/lxd existency, but this doesn't work under Travis for some reason, so just rely on having the environment variable defined for the corresponding builds in our .travis.yml.
try: cgroups = open('/proc/1/cgroup').read().splitlines() lxc = not '/' == [a.split(':')[-1] for a in cgroups if ':cpu:' in a][-1] except Exception: lxc = False return lxc
0
25d2873ff3715cadea4be58cae852155
117ce14b968b9827dbe31be01939ac08
Asynchronously sets the backlight brightness.
value = int(infrared_brightness * 65535 / 100) if rapid: self._fire_and_forget( msgtypes.LightSetInfrared, {"infrared_brightness": value}, num_repeats=1) else: await self._req_with_ack( msgtypes.LightSetInfrared, {"infrared_brightness": val...
1
c0251449a0834986cee220e306733cba
c1d4ad71067715b9d702633bf9839cf7
Registers the field types.
{ \System\Web\FormModelBase::registerFieldType('address', '\CommonControls\AddressInput'); \System\Web\FormModelBase::registerFieldType('unitnumber', '\CommonControls\UnitNumberInput'); \System\Web\FormModelBase::registerFieldType('buildingnumber', '\CommonControls\BuildingNumberInput'); \System\Web\FormModelB...
1
3e3f209c6ad8c20653548de85895db11
c9fe0924ff63ce5ff0a74c9b9bfb8c54
Helper function used to find the mapping that applies to a given file. Gets the mapping for a given file path, based on the specified direction ('source' or 'fiddle'). It will return the first mapping where the file path starts with the mapped path. If no such mapping is found, it returns `undefined`.
export class FileProvider extends EventEmitter findGameFile(filePath: string): GameFile { return this.files.get(this.fixPath(filePath)) }
0
3e58b32285e36fec7825c4984fd2015e
e7c0aacc513c320909d5eb8e988e7550
Delete a furniture from the database for the given furniture_id
try: del self._data[floot_id] self._write_data_to_file() except: raise KeyError(f"No floot with id {floot_id} in database")
0
bb35e906ec38f5cc09a197c8acfd5f04
61bd9729aea866a43d0080cfec13318e
Gets a single-ended ADC reading from AIN1 to GND
command = self.GetReadAinCommand(ain) self.communicator.Write(command, 0x1) data = self.communicator.ReadBlock(command, 2) return data[0] + (data[1] << 8)
1
27f14f99990bd3e86e080d9b29ae1aba
930722b01c6a3ca46056ce81d95f386e
Handler for 'customer_logout' event.
class SessionController extends Controller public function destroy($id) { auth()->guard('customer')->logout(); Event::dispatch('customer.after.logout', $id); return redirect()->route($this->_config['redirect']); }
0
2f79e2c534e05a4bc4e60e48359ba7a2
9e1b042f23be35795ba1e8004b868f24
Visit a parse tree produced by {@link javalessParser#block}.
public class ForaBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements ForaVisitor<T> @Override public T visitBlock(ForaParser.BlockContext ctx) { return visitChildren(ctx); }
1
3a46e57f1e0c97f9cfa7022fe96af3d1
8e1794474c16ffff59f1d254ada680b4
删除i位置处的节点信息
void delete_node(int i) { struct pt *ptprev, *pt; for(pt = pthead; pt != NULL; ptprev = pt, pt = pt->ptnext) { if(pt->ia == i){ ptprev->ptnext = pt->ptnext; free(pt); break; } } }
0
71a9cbc7e4244dcbae5e1224ea39cf8f
6cddb05d09ea2952420f6a6e66ba173e
展示新添缓存页面
class _FrontCache extends Controller public function create() { }
0
ea973b763a975cee63f06a5dd8592f4d
ee89bbbf064f95fa97848090c0489306
Подставляет пустую строчку в значение поля если поле == None
class Tests(): def is_none(obj): if obj is None: return '' return obj
1
3202d092f9738decc1dbfa97ccb405f8
f564c13688c70ba3ca8afd043a555142
根据姓名查询动态
@RestController @CrossOrigin @RequestMapping("/dynamic") public class DynamicController private Pdynamic getDynamic(String pdtitle){ PdynamicExample pdynamicExample=new PdynamicExample(); PdynamicExample.Criteria criteria=pdynamicExample.createCriteria(); criteria.andPdtitleEqualTo(pdtitle); ...
0
caa3f5663143ec19b9ca57419a0afed7
933b957939bb01dc8c5908fb36e8b930
Adds a star to the issue.
namespace Backlog4net.Api Task AddStarToIssueAsync(long issueId, CancellationToken? token = null);
1
5a4fc7ba3d36db44d7e537a6c6398794
55f672a3b7890cccd0eba9d77ea3ef68
Sólo aceptar números y el caracter .
namespace OFC public partial class frmDespachar : Form private void cbxFiltroNroDeOrden_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == '.') e.Handled = true; else { if (Char.IsControl(e.KeyChar)) e.Handl...
0
601681a47a52a107e00120b74c38698a
a7754b87689282243a30427c806822bd
Информация об успешной смене пароля.
class Main extends EventHandler public static function onAfterUserUpdate(&$arFields) { if ($arFields['PASSWORD'] && $arFields['CONFIRM_PASSWORD']) { \CUser::SendUserInfo( $arFields['ID'], SITE_ID, Loc::getMessage('USER_PASSWORD_CHANGED_SUCCESSFULLY'), false, 'USER_PASS_CHANGED' ); } }
1
fbbf2721ab16cd592e7abddcc7fb203e
bb95f33428b133202a21e72f3cee8e72
Anonymize user Data. Use this API during the SDK Initialization to explicitly anonymize a user's installs, events and sessions. Default is false.
public class UserType implements Serializable public Boolean getUserAnonymized() { return this.userAnonymized; }
0
3d403739c979e697629edff8457f4742
cbde11f57515f990dc2b00559058f27a
Gets the value of the calledNumber property. possible object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LPhone", propOrder = { "name", "description", "product", "model", "clazz", "protocol", "protocolSide", "callingSearchSpaceName", "devicePoolName", "commonDeviceConfigName", "commonPhoneConfigName", "networkLocation", ...
0
0296bcbf40bc8332977b67859902ca63
303f23a69c4cb307ff15c49412ae3490
<PRE> 患者の緊急度を取得します。 </PRE>
public class ERPatientAgent extends Agent public int iGetStartEmergencyLevel() { return iStartEmergencyLevel; }
1
4cad4b7d9046ba2819df00207007f29c
7be997e553678743d74b87f5376ead11
将html字符串解析为ast
if (!html.trim()) { blockStack = []; if (html.length) { return " "; } return ""; } const startMatchs = html.match(STARTTAG) || {}; const isBlock = startMatchs[0] === "{%"; const startIndex = startMatchs.index; if (startIndex !== 0) { ...
1
1a8d8053ba454c831e9520e86893410e
3100eaa90821d8da6b48801ed6400717
Tells the AppController which applications to run, which we assume have already been uploaded to that machine.
self.apps_to_mount = self.apps_to_mount || [] self.apps_to_mount << {:url_string => url_string, :rack_app => rack_app} end
1
7cb92fe095a57963ea991b13785a540e
b68ccd437e22ceb49a740fd9fa1dd360
Check whether given input is an iterator.
def _is_iterable(items): return isinstance(items, (list, tuple, set, np.ndarray))
0
58033b6659cad8570c12eb6f960199fb
7f61448ad6da3ef0f9cb03f40c5be655
i.e. mirror image of itself
cases like (1)
0
234e825f8594825e31e238d1cdf291d9
59f15c14bfb1e005e12a250dfeb5901b
Check the result structure returned after initializing an offload service. IN - The result structure returned from the offload service when it was initialized.
const uint8_t *rsp, int rsp_length) { if (req[0] != rsp[0] || req[1] != rsp[1]) return -1; if (rsp[2] != 0x0 && rsp[3] != 0x0) return -1; return 0; }
1
f656b14123a116859c598ac38e1e2ae0
a2acbf073fbb10843e9cb314313d321e
将目标Mat的数据信息放到对应大小的float数组
inline void intArray_to_Mat(jint& b_array, int _rows, int _cols, cv::Mat& mat) { mat = cv::Mat(_rows, _cols, CV_32FC1, (void*) &b_array); }
0
ec6f9eb5f69619c0fa9af67a543302ae
ea8e2999961b23acb1ffa34a6cbf7a93
将对id的卡标记为失效
"set deletion_state_code = 1 " + "where id = #{id} and deletion_state_code = 0") void deleteCard(@Param("id") Long id);
1
58ad366e354e6ccebaa7430ef0a26726
4bfcea8fe704b88f0b6f92a63ebed0c7
Validate birth year
invalid = 0 byStartIndex = by.find("byr:") if (byStartIndex == -1): invalid = 1 else: byEndIndex = by.find(" ", byStartIndex, len(by)) if (byEndIndex == -1): test = by[byStartIndex+4: len(by)] else: test = by[byStartIndex+4:byEndIndex] if (...
1
a190c31137a185d1b08a10ff65491330
f5e528329f2abf49574e8cdf4a4d146d
Behave exactly same as date.toordinal()
def get_ordinal(df, col): df[col] = pd.to_datetime(df[col],errors='coerce') df[col] = np.where(df[col].isna, pd.to_datetime('1/1/1'), df[col]) df[col] = [pd.Timestamp(date) for date in df[col]] df[col] = [tstamp.toordinal() for tstamp in df[col]] return df
1
0809eb856156c2835f19679eea0cf480
b68d648bb33835dde80580a90d3088b1
Method used for setting an option type discount id in the session.
{ SessionCache.IsFirstDiscountCode = true; return ErrisJson(new { data = "" }); }
0
fabc0757ebecac5d4e5184e114910104
397683a6216902598aa3313004c11116
对模型数组求id列表, 可以选第二参数为模型的字段名
{ if (! $items || ! $fields) { return $items; } $fieldsArr = []; if (! is_array($fields)) { $arr = explode(',', $fields); foreach ($arr as $k => $v) { $fieldsArr[$v] = ['field' => $v]; } } else { fore...
1
5e8d057af1439ca60485dd4717a60943
f76e79bb68c6b413d3f69da16033e701
Releases the AWG memory for reuse.
int fpga_awg_exit(void) { return __awg_cleanup_mem(); }
1
9c9bd7299aa9a5c62e85b2ac11f95318
a877ae08ec6f1659e401519a35c16162
河流垂线监测项目的复制逻辑
function copyHx(){ if( !checkStatus() ) return; copyModel({ tagNum:"1", unfill:"lineItemDescription,totalAmount,isUploadAttac" , editYes:"parentCostTypeId,costTypeId,yearMonth,actName", checked:false }) }
0
6ea25003fb3edad8b6c03091fd1e8dc7
95f38c26856fc98d60e2a17eed1f67dd
期货品种默认保证金率配置,选择品种
class TestSettingFundst(unittest.TestCase): def test_pinzhongmargin_a3_succeed(self): data = self.accountopening.variety_earnest_newly().ChargeType3().variety_select().number_earnest().amount_margin_rate() \ .variety_configuration_queding().get_Hand_mor2e() self.accountopening.click_quanxuan...
1
963b8fc84585f5a8a495b8ac2112acfb
8044b849e391d9b9c43c9a644b829157
Get the Drest Manager
public class JobManager public DataManager getDm() { return dm; }
0
79ca17a6cb9a53cfdd3ee91cf411c44f
b948ab23950c4f09c248ab0fa416d405
コンストラクタ。商品名と商品価格を設定する。
class Menu: def __init__(self,item_name, price): self.item_name = item_name self.price = price
1
1e62a43883e8f5fe68532bd69a53f866
ec21384c3ebef2a524095e543d0abf10
Sets the text of the label next to the file name edit box.
class PropertyView(gtk.Frame): def set_file_name(self, file_name): self.file_name_entry.set_text(file_name)
0
4e9d454312b894e05d20622da6052a2c
8cf557a171e34b0967e1c69f77d3b40b
Converts a float24 (in integer format) to a real float.
int float_f2i(unsigned uf) { unsigned exp_mask = ((1 << 8) - 1) << 23; unsigned frac_mask = (1 << 23) - 1; unsigned sign = (1 << 31) & uf; int exp = exp_mask & uf; unsigned frac = frac_mask & uf; int bias = 127; int exponent = (exp >> 23) - bias; int res; if(!(exp ^ exp_mask)) return 0x80000000u; if...
0
812e5d2504be06fd01453e28a79bf5ec
57b6f9989373fa6045e4b49e7f562386
获得删除tag属性值
@Table(name = "article_desc") public class ArticleDesc public String getDelFlag() { return delFlag; }
1
a61054cfbb3e664ce8a73168f2dc2e81
a63941c9af90662f56928ded106c3052
Creates the progress entity.
public ProgressRecord create() { String id = Long.toHexString(counter.incrementAndGet()).toLowerCase(); ProgressRecord record = new ProgressRecord(); record.id(id); progressCache.put(id, record); return record; }
1
c5281164d4f07c7169c0af92bbab1df8
e992b803f9b947b26c5fbbf6ec813b23
Test method for {@link org.talend.dataquality.record.linkage.ui.composite.utils.MatchRuleAnlaysisUtils#sortDataByColumn(org.talend.dataquality.record.linkage.ui.composite.table.SortState, java.util.List, java.util.List)} .
sortState.getNextSortDirection(); String[] array = { "1.33" }; String[] array2 = { "5.22" }; String[] array4 = { "2.77" }; String[] array3 = { "3.66" }; sortData.add(array); sortData.add(array2); sortData.add(array4); sortData.add(array3); ...
1
4658eeb412eef921520ccea69d7757de
6a1891b6ecbb84260470fd83c35fb297
Deletes all frame objects and clears the vector.
class FrameProvider void clear() { mFrames.clear(); System.gc(); }
1
e9b405347fd5e6028e3695e0a4d05634
b0dd2fc91cc585939785f2caaf9556c9
True if the given user is a Doctor.
def isNurse (p): return Nurse.objects.filter(person = p).exists()
0
496d8fcb77355a1f5d4c5ddb11e436f8
6f78712fda615cecc51f2884972cadb5
Клонирование бота - присвоение значений параметров Джанго-бота клону
class General(object): # С более сложными вещами такой способ не покатит, там могут помешать всякие дескрипторы. def clone(self): return deepcopy(self)
0
b253b36a367067f7b9ce114f4c84d891
8d3aa85d71624b6456ce2d00ced4bac5
The number of edges defines the length of all data lists associated with edge attributes.
{ constexpr std::size_t ESTIMATED_EDGE_COUNT = 4; m_edge_based_node_weights.reserve(ESTIMATED_EDGE_COUNT * m_node_based_graph.GetNumberOfNodes()); m_edge_based_node_durations.reserve(ESTIMATED_EDGE_COUNT * m_node_based_graph.GetNumberOfNodes()); m_edge_based_node_...
1
04032f776b86a068345dceb50c85661f
405224f4375be61e0dc96747bcb49626
Function to process the symbols to be exported. This function is empty since there are no exports in case of EXE Target. However, this dummy implementation is included since this is a virtual function in ElfFileSuplied Class.
int DSOHandler::GetElfExportSymbolList(SymbolList& aList){ return (iElfConsumer->GetElfSymbolList(aList)); }
0
1a2d7503baaf77f38f94fd4086d58e0e
060e77312def03ff3b8bf611b6f67959
make sure the structure is useless, it should no longer be used.
func DestroyStructure() { if (GetStructure()) { GetStructure()->RemoveObject(); } return this; }
1
8de6ed6d927c437534bf6ac5c8ec5a2d
99d3f674f41ac999abd1b8939016c3de
Wait for Angular to be initialized
class Protractor extends SeleniumWebdriver amInsideAngularApp() { this.browser.ignoreSynchronization = false; return Promise.resolve(this.insideAngular = true); }
0
10e0720abd8862f94041159d9399deac
8e02d7017d7ae4f2e432deb937e09158
断言-执行给定代码块不会抛出异常 <p>若不是期望的结果,执行代码块时出现错误,将抛出ResultException</p>
try { lambdaRun.run(); } catch (Exception e) { throw new ResultException(throwMsg); } }
1
fcaa8eb5e12c9e918b16d39934609301
e2ef71007af4fd366f342e536764c998
查询能购买的抽奖机会
global $_W; $sql='SELECT id,prize_possibility FROM '.tablename('kim_sign_prizes').' WHERE `issued_number`<`number` AND uniacid=:uniacid AND `group_id`=:group_id AND prize_validity > :now AND id NOT IN(SELECT prize_id FROM '.tablename('kim_sign_prizes_record').' WHERE uid=:uid) ORDER BY `prize_possibilit...
1
ba354d689d1573f1b0b1978d50902795
6badfd60e6f5db08727696cfde753e6a
Admin not accepts an Event (Vacation / Illness)
class EventController extends Controller function notAcceptEvent(Request $request) { CalendarEvent::where('calendar_event.id', $request['eventId']) ->update(array( 'accepted' => false, )); return redirect($request['thisUrl']); }
1
184e403ceaf5e9dce7d38ec4c54edba4
cb226b9180d1eaaf25d112b50dca50ff
This method should be called when an associated statement is executed successfully.
public function onSuccessful($transactionData);
1
55384ca58768dfb41035f0ee818b1527
9cc9eae66b8988650cb43b0cb30756ac
Set 计算环境绑定的标签列表。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
public class MediaBasicInfo extends AbstractModel{ public void setTagSet(String [] TagSet) { this.TagSet = TagSet; }
1
b17fa87e0e8e8e6fa913188943ec6c67
b3668d24ec1ad9706fb47c1dbfd4f3d0
[This function one hot encodes the four categorical features into dummy variables]
features_cata_df = pd.DataFrame(features_cata) features_cata_one_hot_df = pd.get_dummies(features_cata_df) features_cata_one_hot = features_cata_one_hot_df.values features_cata_one_hot = features_cata_one_hot.tolist() return features_cata_one_hot
1
ce8e301ca709ff276e4153770dc1ffe7
0b4e1a939ee85a2d09e5eeaf42af36b9
用户名输入框监听器,当用户名改变时,密码框内密码清空
namespace Zest.Net.Front.Pages public partial class Register private void OnKeydownUsername() { UsernameError = UsernameError = ""; }
0
c1e27ebea1917e054cacaf85b55fbdf2
59977d5af7dd325ee3f2eff9fdcb83f0
The CSV content type headers to capture.
class ProfileHttpCompressArgs: def content_type_includes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "content_type_includes")
0
cc6ef53e91260226bea81f77e4af261c
dd7ca3f111c4e451885741834d61c909
! \reimp Returns the number of decrypted bytes that are immediately available for reading.
std::streamsize AESDecryptionStream::Length(void) { return is->Length(); }
0
bc05f102d224128f4f2a9f5fe051e469
fc1f296264cc25e3d8affb9cee569f72
Algoritmul stabileste una din cele mai lungi secvente de numere in progresie aritmeticfa din lista
secv_max=[] for i in range(len(l)): for j in range(i,len(l)): if toateelemacnrdiv(l[i:j+1]) and len(l[i:j+1])>=len(secv_max): secv_max=l[i:j+1] return secv_max
0
deed7f28d40da91e1dd6dcb662cd3186
56932030709b4455a00f937654def101
将高斯平面坐标转化为大地坐标
{ double BB = zBL.y; double LL = zBL.x-centureL; double pi = Math.PI; double BBr = BB * pi/ 180; double LLr = LL * pi / 180; double sinB = Math.Sin(BBr); double cosB = Math.Cos(BBr); double t = Math.Tan(BBr); ...
0
1cc556a6a2993350c3b8c9020258e453
a4596c7f5a06fe2cf3f4244846f9e9ab
Obtains a list of all proxies to actors using the specified protocol
if (a.Length > 0) Console.WriteLine(w.network.getProxyExceptionList(a[0])); else Console.Error.WriteLine("err: GetProxyExceptionList(<proto>) was not provided with <proto>."); }
0
1b5d3c35ddfe454f8d1d32004467d9bb
7a6390d214b6b30058c76102c5223878
各区域企业注册资金分布
$data['company_distribution'] = Db::name('company') ->alias('y') ->join('mx_cn_city c','c.id = y.city_id','left') ->join('mx_cn_prov p','p.code = c.pcode','left') ->field('p.name as p_name,count(p.id) as c_count') ->group('y.city_id') ->sel...
0
d30e5ad11c7ce7166f2c9a3257868d1b
aa0277506b7646aaac6196efdabd2624
下载文件到本地,返回本地路径
class Http: def download_file(self, url, file_save_path): if not os.path.isfile(file_save_path): try: result = self.request.get(url=url, headers=self.header) if result.status_code is 200: with open(file_save_path, 'wb') as file: ...
1
9ed99d121f6a94121fb9ed322336e604
3d0151298f13a635f66313077aef5763
Delete an external organization
namespace PureCloudPlatform.Client.V2.Api public partial class ExternalContactsApi : IExternalContactsApi public async System.Threading.Tasks.Task DeleteExternalcontactsOrganizationAsync (string externalOrganizationId) { await DeleteExternalcontactsOrganizationAsyncWithHttpInfo(externalOrganiza...
1
88c987ad214affb166681acc7ce6c2c0
3cf8856d65957c3dc6576afb9c99c1e2
是否是动态报表
public class Chapter02 public boolean isDynamic(Map<String,String> params){ return params.containsKey("_"); }
1
8820224b614eeb2b7316fac2b443a9a3
beca12003b82300acfa0c27a1d76ac6c
Counts user pages.
class UserController extends ApiController public function index() { $users = $this->userManager->incrementUsersInPage(); return $this->setStatusCode(200) ->respond($users); }
0
abc645c54c23316d2220d54285c0a3fb
f2c860375099b79de59a5a963d771fcd
Update advertising or scanning state.
{ switch (newState) { case UGAP_BCAST_STATE_INITIALIZED: uebBcastActive = FALSE; { uint16 param16; param16 = DEFAULT_ADVERTISING_INTERVAL; uble_setParameter(UBLE_PARAM_ADVINTERVAL, sizeof(uint16), &param16); } break; case UGAP_BCAST_STATE_IDLE: uebBcastActive = FALSE; ...
1
e157324510c5fbfb16dc80153c1d83fc
7a8b547caa595091a2ca03053d597a53
Método getter que devuelve los alimentos almacenados
public class Plate<Food> public List<Food> getFoodList(){ return this.foodList ; }
1
1c0e07bb0fd8c1660c8a7ce7ae739a33
67a6403801adbd99639a0a5eb3b1d388
Create an instance of {@link HotelRoomRateInformationType188211C }
@XmlRegistry public class ObjectFactory public HotelRoomRateInformationType188211C createHotelRoomRateInformationType188211C() { return new HotelRoomRateInformationType188211C(); }
1
93d14c37e87a238b77cd5e1d0b428fab
50aaf4f1c8291c1fc9edbcf53eccf367
删除excel记录
namespace SYWeb.web.DataCollect public partial class patenValidSingleMaintain : System.Web.UI.Page protected void delete_Click(object sender, EventArgs e) { LinkButton lb = (LinkButton)sender; DataControlFieldCell dcf = (DataControlFieldCell)lb.Parent; GridViewRow gvr = (...
0
d09a8b91f8369b22c8260c8ea7349a35
18e2dcdf88e1da9ffd87b9a7c289c62f
Initiates the asynchronous execution of the GetOutcomes operation.
namespace Amazon.SSMIncidents IAsyncResult BeginGetResponsePlan(GetResponsePlanRequest request, AsyncCallback callback, object state);
0
8af6ed2356c0e206ed40c0b25851e997
e51cc1521e662ecf55c42e08d8493504
We need not bind to it at all.
wxFFileInputStream* LunaTraits< wxFFileInputStream >::_bind_ctor(lua_State *L) { return NULL; }
1
d5cca75511d7771298387cbd8e26850b
811ce7fbb804a7efd579d1e98796928b
Обработка события добавления права в права объекта
{ if(!$_REQUEST["_form_INF_BLOCK_ID"]){ $_REQUEST["_form_INF_BLOCK_ID"]=$_REQUEST["_f_INF_BLOCK_ID"]; } if ( metadata::$objects[$this->obj]['only_one'] && $_REQUEST['_form_INF_BLOCK_ID'] ) if ( $this -> full_object -> get_index_counter( array( '_f_INF_BLOCK_ID' => $_REQUEST['_form_INF_BLOCK_ID'] ), 'index'...
0
1470ee5260280a61f4ea991833be5ac0
cf4766cd39d1f00cd5de2d1c4dc8fa60
Prepare the pool for this thread, ideally using an existing one from the specified group.
return new WarmPool(this, 'WarmPool', { autoScalingGroup: this, ...options, }); }
0
8dc3c1b28d3b2ae394bfa7eb1c629008
7bc34fbd635cab0f877f47af1e3a41b8
Image로부터 Rect영역을 Read/Write 할 수 있는 Memory Pointer를 가져옵니다.
public class ProcessMemory public int Pointer ( bool AddToImageAddress , int pOffset ) { if ( AddToImageAddress ) return ReadInt( ImageAddress( pOffset ) ); else return ReadInt( pOffset ); }
0
791256afe61e346f286f9718e85541f7
aeb366e00801001011b3cdb3ce72aae5
Elasticache snapshots list function. List names of all elasticache snapshots with a timestamp lower than time_delete.
query = filter_string.lower() return [snapshot for snapshot in snapshots if query in snapshot.name.lower()]
0
051dafb2de370f065dbfcc68dc5b3aa1
3a50473aa31dc4e7d9f0e4e5c3ddd7e1
pre condiciones: funcion que recibe un registro de vision inicializadao y un puntero a un registro de aprendiz inicializado post condiciones: la funcion devuelve true si la vision recibida por parametro esta en el vector de visiones del aprendiz
{ bool re = false; double disttance = DistanceBetweenTwoSensors(i, j); if (disttance <= (i.VisualizedRadius)) { re = true; } return re; }
0
ee2e68400ff68a49968a8c5a1adf057a
93b58d0a5ce8cac20ab5ef652bc46f0e
True if we are currently playing a song
public boolean isSongPlaying();
1
7175639c9bd43903afa97f887c5f78be
66b8a06ab792b71f71c0317fe648c855
Generate post-fix expression from a mid-fix expression (symbols)
int gen_postfix_exp(lac_queue_t *pquePostfixExp, lac_queue_t *pqueSymbols) { enum calculator_stat CalcStat; lac_stack_t stkOp; stack_init(&stkOp); exp_btnode_t SymbolTmp; exp_btnode_t OpTmp; while (!queue_is_empty(pqueSymbols)) { queue_pop_front(pqueSymbols, (void *) &SymbolTmp); ...
1
84ad4d4c852ef8e34e2467514cc3199b
44097073320ab2449dc3864b7211fb21
Apply frequency masking to the spectrogram. Convetions from the SpecAugment paper
def freq_mask(input, param, name=None): input = tf.convert_to_tensor(input) freq_max = tf.shape(input)[1] f = tf.random.uniform(shape=(), minval=0, maxval=param, dtype=tf.dtypes.int32) f0 = tf.random.uniform( shape=(), minval=0, maxval=freq_max - f, dtype=tf.dtypes.int32 ) indices = tf.r...
1
6f7b85c2f08e1aee53e76f8f021d99c2
8c039df045aeea96a7af71d533feb32f
The maximum number of documents a single app is allowed to index. <p>Enforced at indexing time. <p>This limit has two purposes: <ol> <li>Protect icing lib's docid space from being overwhelmed by a single app. The overall docid limit is currently 2^20 (~1 million) <li>Prevent apps from using a very large amount of data ...
public class Indexer public void setMaxNumberOfDocsToIndex(int n) { this.maxNumberOfDocsToIndex = n; }
1
2796ea16664c9d7d5ed7e8123456d272
104bf14104acb80e63f4d4d7fcfafdf8
修改每个咨询按钮状态
String consultId = StringUtil.convertNull(request.getParameter("iConsultId")); String status = StringUtil.convertNull(request.getParameter("status")); DbOperation db = null; DbOperation dbOp = null; ConsultServiceImpl service = null; try { db = new DbOperation(DbOperation.DB_FORUM); dbOp = new DbOpera...
1
e975a01281af65fb07e4b2cb8961995e
ad354edcfec9ee06b9836919811d66ee
Outputs the correct headers for a cached request.
$headers = headers_list(); $h = array(); foreach($headers as $header){ if( stripos($header, "Content-Type:") === 0 ){ $h[] = "header(\"{$header}\");"; } } if( $CMSPageController->getPageType() == Page::PAGE_TYPE_ERROR || $CMSPageController->getPageType() == Page::PAGE_TYPE_BLOG && $CMSP...
1
1a1e7c5b5b4a0ba1e724163334ee4f42
896aadc1a9a40663c7de60bca3058d4d
Add action to selected actions or sort actions.
void CActionListView::OnCopyaddAction() { auto spAction = TOOL->GetSelAct(); if( !spAction ) return; TOOL->CopyAct( spAction ); }
0
f8640853d56443f9f807f7c0031f4a6c
ae80afe4a56296a8977f38e4ed0abe75
Get summarized report about the sent messages within a specific time interval
public function reportDetailByPeriod( string $dateFrom = null, string $dateTo = null, int $limit = 100, int $rrdid = 0 );
1
45b527a7ae907c6e8bdf7748bdeb0ce6
20cc4173075f39b942fb9873d53a7158
Remove tag from the selected servers
namespace gm public partial class Gm : AGmPage protected void removeServerButton_Click(object sender, EventArgs e) { int[] selectSet = this.selectListBox.GetSelectedIndices(); if (selectSet == null || selectSet.Length == 0) { return; } for (int i = selectSet.Length - 1; i...
0
f11d2565f0c4f7340efe44235bfe6e37
d8a7011d8d33280d69770d3ca95fe4ab
Make the obj the root node of the ParseTree. If children is given, initialize as the child list of the root node.
if isinstance( arg1, list ): assert len(args) >= 2 self.children = arg1 elif isinstance( arg1, Expr): assert len(args) >= 1 self.children = [arg1] + list(args) else: raise ValueError(f"arg1: {type(arg1)}")
1
6a7b1ae0381781bfcc637b512a759b53
fdea84ce67b84f1c87c17576130b60d0
Activates Optimize on route changes.
function onOptimizeClick(e) { let Http = new XMLHttpRequest(); Http.onload = (e) => { if (Http.status === 204) { removeAllPlacemarks(); loadStations() } }; Http.open('GET', `/optimizeCheckpoint`); Http.send(''); }
1
b616d53d253d85f538788a924af01f91
94dc99c05ec2e7bb8fddbacdb66d023d
学校题库关联页面 create by ck 20160622 modify by ck 20160913 结构更改 modify by ck 20160924 结构更改 modify by ck 20170410 去除应用选择页面,使用下拉框
$testdb_id = I("testdb_id",""); $lession_id = M('testdatabase')->where(array('id'=>$testdb_id))->getField('lession_id'); $knowledge = D('knowledge')->getKonwlegeByLession($lession_id); $this->assign('knowledge',$knowledge); $this->assign('testdb_id',$testdb_id); $this->display(); }
1
3b3d8d2bd975035b4a50bb3b1ccb34e1
ff6a9e15aaeb6b8a2b09cc3b64ecd2c6
設定分數函式實作
public class GameManager : MonoBehaviour private void SetHeightScore() { if (score > scoreHeight) { scoreHeight = score; PlayerPrefs.SetInt("最高分數", scoreHeight); } textHeight.text = scoreHeight.ToString(); }
1
350188f6224e7cbc70448d2e8d4d348f
a1abc66960104aed504a0980a09ef511
Updates when a customer is checking out and no longer in the store - Performance O(1)
namespace AI_PROG_SP21.Scenes public sealed class Chapter4Base_Bootstrapper : MonoBehaviour private void OnCustomerExitedMap(CustomerActor customer) { currentCustomerCount--; seatTaken[assignedSeats[customer]] = false; assignedSeats.Remove(customer); }
1
a7a6d9461c9957b02e3524deba5d6472
7f7cb42f1a1290bf7f3a335b3922cfac
Get the component to use to display a course format.
abstract class CourseTypeManagerCourseTypeFormActionComponent extends CourseTypeManager abstract public function get_course_type();
0