query_id
string
corpus_id
string
query
string
code
string
label
int64
3d9d073fe7a620084ef5cf5216d1da01
d0ae285005f9013e5325b70c6a34f1b0
<p> 根据消息模板以及内容,发送短信 默认一分钟,限流500次,可以根据实际情况进行限流 <p/>
@Service public class SmsPlatformService public MessageResInfo sendMessage(String phoneNo, String templateUname, Map<String, String> contentParams) { MessageResInfo resInfo = new MessageResInfo(); logger.info("sendMessage inParams:phoneNo={}, message={}", phoneNo, templateUname); if (StringUtil....
1
906250d5f949f36cc67c3d435c2ab1e9
df0fc5cc9ef15a3003ec8ffc1712322c
Gets the value of the type property. possible object is {@link TextType }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Message", propOrder = { "number", "date", "type", "parent", "theme", "text", "clientContact", "phone", "eMail", "result", "message" }) public class Message public String getType() { return type; ...
1
7c5c4ce3c205d56d0d772b4c2565d043
689258273ac9a0b639b107e4255c1833
Checks if a chunk is contained within this {@link VSChunkClaim}
class ISelection(object): def containsChunk(self, cx, cz):
0
9e3a84e2c1c76653331c9345f7d1e2c5
d80402d135df52930145e7be1ef0cbe9
<para>Toggles the (computed) value of the boolean property enabled.</para>
namespace qx.ui.core [JsType(JsMode.Prototype, Name = "qx.ui.core.Widget", OmitOptionalParameters = true, Export = false)] public partial class Widget : qx.ui.core.LayoutItem [JsMethod(Name = "resetEnabled")] public void ResetEnabled() { throw new NotImplementedException(); }
0
15b02ce9e9a15bd5d70651aa6337d726
cab0247fbd34b81f3d30f0637a6ba895
convert the timedelta object to a string representation in Hour, Minute, Second.
timestr = '%s h %s min %s sec' % (str(t.seconds/3600), str((t.seconds/60)%60), str(t.seconds % 60 + round(t.microseconds/1000000., 5))) return timestr
1
14506c5819d2c74009c87f12720fa40f
a28f1f29dc6451fad33d0f36020df7c2
设置是否进行正则匹配
public class PathRule extends AbstractModel{ public void setRegex(Boolean Regex) { this.Regex = Regex; }
1
b433a925dd44871a9833c00794cd9b70
d91600927f8fdd9b0450fee8334fc848
Add multi stream data to this BFM. Multi stream data should be a dictionary with each entry into the dict a list of lists as required by add_data. The dictionary keys should be of the form: (stream ID, stream dest)
if dataset.find('stream=')<0: dataset += ':stream=%s' % (','.join(map(str,newStreams),)) else: beforeStream, afterStream = dataset.split('stream=') afterParts = afterStream.split(':') afterParts[0] = ','.join(map(str,newStreams)) afterStream = ':'.join(afterParts) ...
0
1eae770f797fcd7f58ba8f0c9043b36f
eb22477f35826fec12b9e8c63649e49c
Responsible for rendering all the new level generation screen GUI elements.
class SettingsScreenInstance(screenDesign): def generateGeneralSettings(self): self.generalPanel = gui.elements.UIPanel( pygame.Rect(self.configBoxSize[0] // 20, self.configBoxSize[1] // 10 + 20, 1440, 700), manager=self.manager, container=self.configBox, starting...
0
4a3791e0deda00c01d1b076862c72bb7
dafbb33800f094e91ca6784a03136222
r"""Total packets filtered by QoS.
try : return self._nstdtottxpkts except Exception as e: raise e
0
d6d6c0949decf336ef0436136e46b1de
5844e5d77ed3626603babb200877ca92
依傳入的參數,查出「所得人資料」 <p> UC 10.8.4 所得人資料維護 </p> <ul> 查詢條件 <p> 「所得人資料.身份證字號」=傳入參數”身份證字號” 且「所得人資料.所得人類別」=”自然人”</li> <p> 「所得人資料. 姓名/廠商名稱」 like =傳入參數”姓名%”</li> <p> 「所得人資料. 身份證字號」=傳入參數” 廠商統編”且「所得人資料.所得人類別」=”法人”</li> <li>證號註記 <p> 「所得人資料.證號註記」=傳入參數” 證號註記”</li> </ul> 身份證字號 姓名 廠商統編 證號註記
throws GongmingConnectionException, GongmingApplicationException { return call(QUERY_USER_BY_IDENTITY_NUMBER, false, request, QueryUserByIdentityNumberResponse.class); }
1
b5f3435dbd9333a28a285e34bbd265c0
759e03095fdbd12239cbb4c4664084cd
Executes a statement that returns a single {@link String} result. as a <code>String</code>, or null if none. or invalid number of bind arguments.
public String queryForString(final String sql, final Collection<Object> args) throws DataAccessException;
1
9e0c7786ea5a71d4325d8bd84d2a035c
98249058aef57fff877be676815eae36
r"""ICMP Fragmentation Needed error messages received for packets that need to be fragmented but for which Don't Fragment is specified the header.
class l3param(base_resource) : def forwardicmpfragments(self) : try : return self._forwardicmpfragments except Exception as e: raise e
0
d7b08a8066bf9a598197b580192b4689
66788ed7ddcc2c9b2df71836847bc1ca
Returns the meta object for the containment reference '{@link tooldataform.formmodel.concreta.DataForm_Diagram#getTheInterface <em>The Interface</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getDataForm_Diagram_TheInterface();
1
79f8b1cfdadc0563b0948e7b6d12619a
60c4f1ad96651b0f3d098158d4e3c058
设置StaggeredGridLayoutManager的边距
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { if(mOrientation == LinearLayoutManager.VERTICAL){ outRect.set(0,0,0,mItemSize); }else { outRect.set(0,0,mItemSize,0); } }
0
f7d56ea192ccf22ed5311cf9d5c8ab57
95716c8b160b57eb8400983d71078c56
获得在与axis垂直平面上,向量v1到v2的角度。返回值范围:[0,360)
{ float cos = (v1.x * v2.x + v1.y * v2.y) / (Mathf.Sqrt(Mathf.Pow(v1.x, 2) + Mathf.Pow(v1.y, 2)) * Mathf.Sqrt(Mathf.Pow(v2.x, 2) + Mathf.Pow(v2.y, 2))); float angle = 180 * Mathf.Acos(cos) / Mathf.PI; if (v1.x * v2.y - v1.y * v2.x < 0) { angle = -angle; } ...
1
8674ed539b2eaceda2b9f0ee246be9c7
6c5a501e493c2630e154b51ef9d5bb4e
分页获取office_work_outline列表
public List<OfficeWorkMeetingMinutes> getOfficeWorkMeetingMinutesPage(Pagination page);
0
0d3163a139db6790b423c7fea6bcd59b
61767cb02970413676053975a51cd5d9
指定时间BOSS出现计划
local indx = self:GetFieldBossIndex(mapid, lineNo) local intStart = self:GetFieldBossIntStart(indx) local strStart = self:GetFieldBossStrStart(indx) self:SetUInt32(intStart + FIELD_BOSS_DATA_PROCESS_TYPE, FIELD_BOSS_PROCESS_START_COUNTDOWN) self:SetUInt32(intStart + FIELD_BOSS_DATA_NEXT_BORN_TIME, os.time() + tb_f...
1
aec9e184a083e16bb2712b862c34d59e
2544e1660e8108fb3e4541a1e4133284
调用接口,返回JSONObject(会验证返回结果的状态,为失败时,会抛异常)
JSONObject resultObject = null; URL url = new URL(urlAddress); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setDoOutput(true); urlConnection.setDoInput(true); urlConnection.setRequestMethod("GET"); urlConnection.setUseCaches(fa...
0
2e2012a5af9b5df5cc0c3c2efd3b7d17
a3ca106ab1fea608e9b9d72f626f10d2
Retrieve the <c>group_level</c> property of the item
namespace Nucleus.IO [Serializable] public class GWAContext : StringConversionContextBase public string ElementGroup() { return "1"; }
0
fb0753489d415e5fd19ffaa6f0adb227
69787cc613361ca9f36083012bafbf9c
日期转字符串 转换的格式yyyy-MM-dd
public class DateUtil public static String dateToString(Date date){ return dateToString(date,"yyyy-MM-dd"); }
1
502bc7c6973175e413f9647643a86e6c
499beb203693ce298098c78989929384
Test case for teamsRemoveUser .
self.mock_github.org_delete_team.side_effect = GithubAPIException("") self.team1.add_team_lead(self.lead_user.github_id) try: self.testapi.team_delete("lead", "gh1") except GithubAPIException: pass else: self.assertTrue(False)
0
3e1f7fff776253a1189c07ef28696b20
eb49993274d415a3b695e0c9bca9cbf7
Returns the class names (as strings) of the potential "next" life stage classes.
namespace iih.ci.rcm.contagion.d public class ContagionAggDO : BaseAggDO public override string[] getChildClassNames(){ return new string[]{"iih.ci.rcm.contagion.d.StdDO","iih.ci.rcm.contagion.d.HepatitisBDO","iih.ci.rcm.contagion.d.SyphilisDO","iih.ci.rcm.contagion.d.HFMDO","iih.ci.rcm.contagion.d.AidsDO...
1
0fcb81b5211c1f9c1cb813e3b26b0cd9
1d679cc51c8d32efe2681ac8de50b2eb
Returns whether the scheduler is done or not.
class Scheduler(object): def is_finished(self): return not (self._graph.roots or self._running)
1
985e142da206b9750da69933a2a2443b
340b18fcf3c8fd70843de98ae6117254
A foreign key, e.g. CategoryID, will have an association name of Category
class FuelCategory extends Model static associate(models) { FuelCategory.belongsTo(models.Service,{ foreignKey: 'service_id' }) FuelCategory.hasMany(models.serviceProviderService,{ foreignKey: "fuel_category_id" }) }
0
f68dc2e0b7e9a6edcdd9c092bd2fab8c
25aed1aeba15baeb0eac2c949c3631af
通过邮编获取经纬度
public class QyMap extends BaseActivity implements LocationSource , AMapLocationListener , GeocodeSearch.OnGeocodeSearchListener , OnMarkerClickListener , OnMapClickListener , InfoWindowAdapter public void getLatlon(final String name, String city) { GeocodeQuery q...
0
5743098327f5638043ca391c29bd8822
db19ea06ab67bd00959a7195313330f1
Compute a CI spectrum. See Pacholczyk 1970, and Turner 2017
if not np.iterable(r): r = [r] corr = np.zeros_like(r) minsteps = 8 mink = 1e-6 temp_min_k = 1.0 for i, rr in enumerate(r): min_k = (2 * np.ceil((temp_min_k * rr / np.pi - 1) / 2) + 0.5) * np.pi / rr maxk = max(501.5 * np.pi / rr, min_k) nk = np.ceil( ...
1
ec721f12780ecabe4bfee3f194306230
8c669a15b46ea70e719dd13feccd94a2
Получить вес (силу) луча
{ Matrix3 mat = DrawInfo.Matrix * Parent.DrawInfo.MatrixInverse; Vector2 size = DrawSize; return ((mat.M11 * mat.M11 + mat.M12 * mat.M12) * size.X * size.X + (mat.M21 * mat.M21 + mat.M22 * mat.M22) * size.Y * size.Y) * Mass / 12; }
0
4546fb2893956b16d791b790ea14cc7a
e27fcaea82d9e9c9934f852d75a01716
Check is the frame is too long
impl PacketBuilder pub fn is_full(&self) -> bool { self.limit < self.encoder.len() + Self::MINIMUM_FRAME_SIZE }
0
34bf82ec20bd257737d39adf92b7ce98
9fa2788a8f36e199d84770976eae05cc
@brief This function established the connection for the channel in passive (server) mode. This function waits for the request from the peer.
{ if (sock < 0 || sock > MAX_FILEID-1) return -1; if (port < 0 || port > MAX_PORT) return -1; SCB* lsocket = PortMap[port]; if (!lsocket) return -1; if(!(lsocket->type == LISTENER)){ return -1; } FCB* fcb = get_fcb(sock); if (!fcb) return -1; SCB* scb = (SCB*)fcb->streamobj; if (scb->type != UNBOUN...
1
f8036577fac1494c3837e665bfe6e6c7
3e39d96e8f83fc2cb8615e70ffdf52bd
查找车牌号分页数据
@Repository("AppAutomobileNumberDao") @Transactional public class AppAutomobileNumberDaoImpl implements AppAutomobileNumberDao public List<AppAutomobileNumber> findAllPage(final AppAutomobileNumberQuery query) throws DaoException { List<AppAutomobileNumber> list = this.sqlSessionTemplate.selectList("com.community.a...
1
4616dc553765467a0e2c754113cbca9d
27c2d44a106f0d2a978dc70e60bf6a23
シート内のデータを条件付きで取得する。出力されるデータのフォーマットは findAll と同じ。 条件にマッチする内容を全件取得する。
class CsvDb{ public function findSerach($serach = array(), $type = null){ $res = array(); $column_names = $this->_getColumnNames(); foreach ( $this->_splfileobj as $key => $line ) { if(count($line) === 1 && empty($line[0]))continue; mb_convert_variables("UTF-8", array("ASCII","JIS","UTF-8","EUC-...
1
a1cd941e1dede2dc4dad274ae8b1f579
95a4bf1f1f57b3085af63937e68845da
更改任务联系客户的联系情况
if apply.apply_type == '1': if apply.sign_contract_date != '' and apply.info_flag == '1' and apply.idtype_flag == '1' and apply.questionnaire_flag == '1' and apply.asset_flag == '1' and apply.contract_flag == '1' and apply.applytab_flag == '1': applyContact = ApplyContact.objects.filter(apply_id...
1
d6201dd2af8313c2fd3c88be0c03db1b
65c006bc0ae5cc3c557af3a47e397aac
Перевод курсора на край экран
void Controller::cursorEnd() { COORD Coord; Coord.X = SIZE_BORDER_X; Coord.Y = SIZE_BORDER_Y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), Coord); }
1
b2d1f48ca3f38e2b43d8d0c36ac7934e
0f08a5ac0300b10a20479b06e52e3bfe
Method returns the next invoice key to be created.
{ try { var last = db.Invoice.OrderByDescending(i => i.Id).FirstOrDefault(); if (last != null) return Convert.ToInt32(last.InvoiceNumber) + 1; else return 1; } catch ...
1
7577ae2273eaa3242910b312ef80b46e
3198abd458b5832f43c3708d11ed1f58
获取桶的标签配置。
cos.getBucketTagging({ Bucket: 'examplebucket-1250000000', Region: 'COS_REGION', }, function(err, data) { console.log(err || data); }); }
1
bc3e7a502e8bd5ab51081c39eed5d566
1c903b2febce213b318d325d08e294e5
跳转抽取浮动点页面
_onTargetSwitch(e) { App.saveFormId(e.detail.formId); wx.navigateTo({ url: '/pages/_select/extract_point/index?selected_id='+this.data.selectedShopId }); }
1
9f8446039e77bf9472be1d4da5372194
66aeae25693103e28b394369b98636d2
@brief GFXMMU MSP Initialization This function configures the hardware resources used in this example:
#ifdef STM32G0 SCB->VTOR = FLASH_BASE; LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG); LL_IOP_GRP1_EnableClock(LL_IOP_GRP1_PERIPH_GPIOA | LL_IOP_GRP1_PERIPH_GPIOB | LL_IOP_GRP1_PERIPH_GPIOC); LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_PWR); #elif defined(STM32L) ...
0
77a43ef1c550a814b7739911c3efc6e5
c676e5cb8a9af1e3ef032904e5e3b2fc
お気に入り投稿一覧表示
class FavoritesController extends Controller public function index() { $user_id = $_COOKIE['user_id']; $favorites = Favorite::whereUser_id($user_id)->get(); $posts = array(); foreach ($favorites as $favorite) { $posts[] = Post::find($favorite->post_id); } retu...
1
a94d525d3014169f9877b68749b8c48a
aa4185613a1513b884b3257b44735567
Get number_doors.
public class CarTransport<V extends Vehicle>{ public int getNrDoors(){ return truck.getNrDoors(); }
1
fd7ab04e7a65ef970b29d065e15e865b
8e8866bb1f11fdafcfb67e31d19b65e5
Evento que sucede al seleccionar cualquier elemento del ComboBox
namespace Proyecto_BDll public partial class frmVentas_Ingresar_Actualizar : Form private void cmbbxIDMueble_frmVentas_Ingresar_Actualizar_SelectedIndexChanged(object sender, EventArgs e) { }
1
a4eabec3869ab1fad85ccbe8d530b32f
bac350eca49fab05e1f1bbee07a5a260
计算在当前态势下,在所有攻击方和所有可见的防御方的数据下,攻击方和防御方怎么配对,以及防御方如果是编队,攻击力如何分配
public class BattleSkill implements java.io.Serializable public void processFitAttack(UserInfo userInfo, List<Byte> byAttackCoordinates, BattleObject attackObject, BattleObject[] byAttackObjects, FightModule fightModule, StringBuffer resultBuffer){ this.effectAmount = 0; StringBuffer effectBuffer = new StringBuffer...
0
c9e4da3b523ee2d60e6247de5dc48451
a77b82fe7615fbfabb8a9fd0a0dfaf42
Test delete all rentabilidade itenss.
res = {} if context is None: context = {} for inv_id in ids: res[inv_id] = self.test_retenida(cr, uid, [inv_id]) return res
0
8451c704e071ecca94d991fae61795e7
d9653391e9570e8b8d1281b664692b43
++++++++++++++++++聊天记录窗口++++++++++++++++++++++++++++
void see_record() { sqlite3 *database; int ret = sqlite3_open("person.db", &database); if (ret != SQLITE_OK) { printf("打开数据库失败\n"); return; } char *errmsg = NULL; char *sql = "create table if not exists person(time TEXT,fromname TEXT,toname TEXT,word TEXT)"; ret = sqlite3_exec(databa...
1
89279fe9b77f821d353fd9fae623129a
291c8963f8d3e42cecea09140ad7231e
Alerts the other players that we are leaving the game
class Game extends ConnectionHandler function Hungup() { self::LogoutMessage($this->player->Name()."has disappeared from the realm."); }
1
a889252d8817c797f8f844c87ccf37c4
5cf655a5e277dd1f75adb3bec1c70618
Set the publicGatewayIdentity.
public class SetSubnetPublicGatewayOptions extends GenericModel public static class Builder public Builder publicGatewayIdentity(PublicGatewayIdentity publicGatewayIdentity) { this.publicGatewayIdentity = publicGatewayIdentity; return this; }
1
0c3e37de6c08d5523bde07d7604b891a
700d0b54ff71b14a0e5048ade6a24e4a
获取日志信息体的名称,返回NULL表示没有初始化
wstring Stk_Body::GetName() { return m_strBodyName; }
0
39524cbb9e6c84143a5dd9e61ae80491
4c928aa726d7c3c3bcb0ffae1f5f4642
Gets the selected tree node of the possible trees in order to determine the initial setting of the selected tree
class Model TreeItem<String> getActiveTreeItem(){ return activeTreeItem; }
1
f85fcc5e5584dd6efdd72743931a7e23
58a42ba66826f9f57d5937f5f4f21e68
Recursviely travels through the tree checking each Node to see if it matches all selectors
function match (selector, element) { }
0
d4089d9b198110637874c49f103f6b7e
7d5eb4e918792d39bacff18b1da0250d
Connects the imageview to its corresponding view in layout, and sets the bitmap.
if(this.layout1 != null){ User tempUser = new User(); String pathFromUser = tempUser.getPicturePath(uname); File temp = new File(pathFromUser); boolean exists = temp.exists(); if("".equals(pathFromUser) || !exists){ Image image1 = new I...
1
60edb056b96db8b6ca81d5449914cf59
2491bf22803fc11ec5452ee229e41c65
处理input回车事件,如果btn有效,这回车事件转化为btn.click()事件
class CustomInput onKeyDown(model, event) { this.isVirgin(false); let btn = $('#api-exp-get-btn'); if (event.keyCode === 13 && btn.is(':enabled')) { btn.trigger('click'); } else { return true; } }
1
571a1be6871faf8063dfcd3a208ce27f
9f731a96ce138a4a19e23a39615ef231
Lists CloneJobs of a given migrating VM. <p>Sample code: <pre>{@code This snippet has been automatically generated and should be regarded as a code template only. It will require modifications to work: https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (VmMigrationClient vmMigration...
function getCloneJob(args: GetCloneJobArgs, opts?: pulumi.InvokeOptions): Promise<GetCloneJobResult> { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("google-native:vmmigration/v1alpha1:getCloneJob", { "cloneJobId": args.cloneJobId, "locati...
0
e2eac8cafe70084d5785c44350ed1105
3884248fbc6e039fac54a84bd25221ec
カテゴリをファイルから取得する
class Corpus_20NewsGroups function getFilePathList( $corpus_root , $category_dir ) { $dirPath = sprintf( '%s/%s' , $corpus_root , $category_dir ); $dh = @opendir( $dirPath ); if( is_resource( $dh ) ){ $filePathList = array(); while( ( $eachEntry = rea...
1
8b0f8d083083eeb38c24fef6ca37bb16
ca3585a81617c12335990ae94fccad71
Renders the tag cloud as an unordered list
function ae_tag_cloud_as_list($args) { $args['smallest'] = 1.4; $args['largest'] = 1.4; $args['unit'] = 'rem'; $args['format'] = 'list'; return $args; }
1
0add3fe629f6adade88dd9d5d91bf626
96c99d0b79f85663ef980e824c01acfa
Формула площади ромба по длинам его диагоналей
{ S_poln = 2 * ((a*b) + (a*c) + (b*c)); return S_poln; }
0
081dd87d8d0255d9165acd2f799ad76f
5eebf571fb98df539ed39d5d38b1ef35
Increments/Decrements year value then update year input field with the new value.
public class MainJFrame extends javax.swing.JFrame private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { Integer temp = Integer.parseInt(ftxtGradYear.getText()); temp--; ftxtGradYear.setText(temp.toString()); }
1
49916cb0acff7371bb16fe804cc3a1dd
00dd98c40249cb6b4363566db27e860b
Flag used to adjust the Time To Live value of produced messages. The option will be converted to a <code>long</code> type.
public class UnifiedMessage public static class ConfigBuilder public ConfigBuilder timeToLive(int seconds) { attributes.put(this.timeToLive, seconds); return this; }
1
4ddc6fd548ce2e2fd8dacafc65a382a4
6d17a765efa9ab61732e7b9d28fc8249
Получить форматированное название плейсхолдера
public function getReplaceName($name) { $replaceFix = $this->config('replace_fix', '$'); $fixs = explode(' ', $replaceFix); return $fixs[0].$name.($fixs[1] ?? ''); }
1
1ce25dfe837ca572d4836c83f89200aa
88f30c19cda5846e959dbde531100cb2
GLMUNPAK Separates weights vector into weight and bias matrices. Description NET = GLMUNPAK(NET, W) takes a glm network data structure NET and a weight vector W, and returns a network data structure identical to the input network, except that the first-layer weight matrix W1 and the first-layer bias vector B1 have bee...
assert len(Wp.shape) == 1 nWeightMatrices = len(layers) - 1 Wu = [None] * nWeightMatrices beg = 0 for i in range ( 0, nWeightMatrices ) : nLayerInputs = layers[i] + 1 nLayerOutputs = layers[i+1] end = beg + nLayerInputs * nLayerOutputs Wu[i] = numpy.reshape ( Wp[beg:end], (nLayerOutputs,nLay...
1
9b40f3efa6548abc0b9f8831e6d0951c
55cd5f13179ff2a4924b52965aefb261
Sets the repsonse ID. This value should always be equal to the incoming request ID.
@JsonIgnoreProperties(ignoreUnknown = true) public class AmlBatchRequestResponse public void setRequestId(String requestId) { this.requestId = requestId; }
1
d07dccaf4d7cc2c6c0c22b58f9c70c9e
946d29ac4f22030ad75abc2fb44c6065
Search for the triangular with 500+ divisors
size_t ans = 0; size_t i = 1; while(1) { ans += i; if(num_divisors(ans) >= 500) { break; } i++; } return ans; }
1
4950e774c66c655b9e8b5f9638ea2957
17df83cbb951af4243c825c38ed714de
爬取职位详情页的数据,参数url是职位详情页的链接
myresult = { "position_name":[], "position_company":[], "position_salary":[], "position_link":[], "position_exprience":[], "position_industry":[], "position_environment":[] } driver.get(url) i =0 ...
0
6ede8d1b334d118157acc09e6edb5cfc
53819a6b3f70e013772f5126dab5b7cb
异步根据分页查询菜单信息表(sys_app_menu)
public async Task<ResponseMessageWrap<IList<SysAppMenu>>> QueryByPageAsync([FromBody]QueryByPageRequest reqMsg) { var total = await _sysAppMenuRepository.GetRecordAsync(reqMsg); var list = await _sysAppMenuRepository.QueryByPageAsync(reqMsg); return new ResponseMessag...
1
ba48a00be7fd690228e7944d06924eb9
d0e38dd48bca5ef36f4b9415fb0830d3
Returns amino acid distribution.
def aa_hist(seq_dic={}): results = [] for i in range(len(seq_dic.values()[0])): AA_Nm = {'A':0,'C':0,'D':0,'E':0,'F':0,'G':0,'H':0,'I':0,'K':0,'L':0,'M':0,'N':0,'P':0,'Q':0,'R':0,'S':0,'T':0,'V':0,'Y':0,'W':0} for bug in seq_dic.keys(): if seq_dic[bug][i] != '-': AA_Nm[seq_dic[bug][i]] += 1 results.appen...
1
696898ea97ed65c9d6c449fe2f912716
68ad2d48e549da20b20c701b6c92b0d6
Setup 3D Secure 2.0 parameters
add(ParameterKeys.Amount, request.amount.centsString()) add(ParameterKeys.AmountType, ParameterValues.AmountTypeActual) add(ParameterKeys.Currency, "USD") add(ParameterKeys.UserReference, generateUserReference()) add(ParameterKeys.PaymentMethod, ParameterValue...
0
be2f9dafc25dafc5e83d4cd5f46e2db3
748e83b973e9ddb29717b1c9cf1b48d5
最近7天销量
@Service public class GlobalServiceImpl implements GlobalService @Override public List<TotalGlobal> total7Days() throws Exception { return sqlSession.getMapper(GlobalMapper.class).total7Days(); }
1
ea09bdace09989f9b8d33032fe9cc44b
b63074c909123bae363ecfef3b3a5e27
获取GMT格式的时间
def get_time_gmt(): return strftime("%Y-%m-%d %H:%M:%S", gmtime())
1
4bafd3a87172d6990b691ff23c1bf820
bd009e16165e4e0dd5c1199f80d3962a
parallel version of Fox algorithm
class FrankWolfe(Algorithm): def run(self, a, b, X, Y, Omega, k): maxmin_values = [] minmax_values = [] gap = self.threshold for t in range(self.max_iter): if gap < self.threshold: if self.verbose: print('Precision', gap, 'attained.') ...
0
cee76907830af487345f2303395990c4
b411bffad873e797a77f4d8e6d8b0e19
Возвращает размер отфильтрованого словаря.
class MyDictionary: def size(self): return self.used_slots
0
e9c5bfd628d326bf70a7f628b3a7bfab
c3e1bc4b8894b705cf28f6549238e975
Converts a date from english (e.g. mm/dd/yyyy) to db format (e.g yyyy-mm-dd)
function convertDateToDatabase(date){ if(date){ date = date.split("/"); return (parseInt(date[2]) - 0) + "-" + date[1] + "-" + date[0]; }else{ return ""; } }
0
89c878da0381ca3f9eb522351fa1ace1
45a7b9b418f54eda8f947b1455f0b573
Returns the coordinates associated with the PDE.
HexVector getCoords();
1
8916aead981f51450c2bf664aaba35d2
2069bbbe50d3b02f6c0a51deee702e07
Llena la grilla a partir del XML.
{ XmlDocument registroAgenda = new XmlDocument(); registroAgenda.Load(RUTA_XML); XmlNodeList personas = registroAgenda.GetElementsByTagName("agenda"); XmlNodeList lista = ((XmlElement)personas[0]).GetElementsByTagName("tarea"); foreach ...
1
04e1125a18dcec32cd7b1b020dfbf027
db9cf48401380ae838582e1bcc6188cd
Bind and set pointers to the sphere buffers
function setupBuffers() { setupTerrainBuffers(); setupSphereBuffers(); }
0
8848e3b1632135eec2597fcadb894ae5
6382fa76429d82868b90b6a5978e4024
Simulates playing games during metagame period. When we reach a terminal state, we look at the GDL statements and record it in the class variable goalCache. This is used in evalGoalProximity() as a heuristic.
with Timer("Played games"): while not self.games_over: new_directions, new_moves, new_heads = self.evaluate( best_generation_score) self.states.append(self.grid.copy()) self.moves.append(new_moves.copy()) self.heads....
0
1c19d814518d2cc96b34db7110b26a10
9ef41f583780d07d13b5545a94908396
广场聊天发送图片URL消息
{ $request = [ 'msgtype' => 'link', 'link' => [ 'title' => $title, 'text' => $text, 'picUrl' => $picUrl, 'messageUrl' => $messageUrl ], ]; return $this->send($request); }
0
0cb0fbadb64231f94e2c74995d14d5f0
72aa05fa5311fe9a47574261cd58cb24
! \brief Returns the number of seconds to do the sync on STANDBY node.
class ownership public function getOwnSyncSt() { return $this->own_sync_st; }
0
5c18bbe912243bd5cdbf7f994692771c
2dbce33cae7533f88bc1b7a61ce3e77d
Gibt alle Child-Nodes zurück, die einen bestimmten Namen haben
public class XmlNode public List<XmlNode> getChildNodes(String nodeName) { List<XmlNode> nodes = new ArrayList<>(); for (XmlNode childNode : this.childNodes) { if (StringUtils.equals(nodeName, childNode.getName())) { nodes.add(childNode); } } retur...
1
361c7a7a6f929d99c3620f605fe836fa
a42d20536aade269583d6b6dc6d2f8f4
搜索入库运单信息
throws CommonException { CarryInfoSearchKey key = new CarryInfoSearchKey(); Station[] stations = (Station[])searchStation(param); for (int i = 0; i < stations.length; i++) { String stationNo = stations[i].getStationNo(); if (1 == stations.length) ...
1
911dd58c76180178ceb1d363f6f71212
7e0e52d385a1939b68b3cc0c0a082104
When the agent opens a box, we raise an error and mark the task unsolvable. This is a tad conservative, because maybe the box is irrelevant to the mission.
completed = True failed = False status = Status() status.status_code = Status.IN_PROGRESS for object in req.state.objects: if object.name.lower() == 'apple': if not object.in_box: completed = False else: ...
0
6abc9273f1574941f5b0bc34bdaff23d
ef5b0a5848a84237fca3cc001d259a44
L2-regularized L2-loss support vector classification (dual).
rho_max): def _loss(W): M = X @ W if loss_type == 'l2': R = X - M loss = 0.5 / X.shape[0] * (R ** 2).sum() G_loss = - 1.0 / X.shape[0] * X.T @ R elif loss_type == 'logistic': loss = 1.0 / X...
0
7ba26de4c3ffefc7af9e2647d9d071d3
67e48a6149458df941ad5ce9380f50ba
Tests that the file io concept for the tests in this file work correctly. writes a small assembly program to disk, assembles it, runs it, and checks that it gives the correct result. The files (source/binary) are then removed.
static bool run_asm_test(const char *src_file, const char *ref_file) { char *cmd_prefix = "../crater --assemble " ASM_PREFIX; char *cmd = cr_malloc(sizeof(char) * (strlen(cmd_prefix) + strlen(ASM_OUTFILE) + strlen(src_file)) + 2); stpcpy(stpcpy(stpcpy(cmd, cmd_prefix), src_file), " " ASM_OUTFILE); ...
0
e7a7820788e2d57dee4b89ab1b724585
7ce3bca2c3c43ace9d6c28866c2dd349
Attempt to shut down the server process cleanly. This command is asynchronous!
[ApiController] [Route("")] public class ManageableServerController [HttpPost(nameof(IManageableServer.ShutdownAsync))] public async Task ShutdownAsync() { await this._manageableServer.ShutdownAsync().ConfigureAwait(false); }
1
0aaebc86a652f01879c15eb08dd2ea86
708bbda0eccdbcd03d2dbaf7eaf22d49
同步第三方商品扣点信息
public void syncTpStock();
0
704bc8ef8d849dfee64254b8564471d7
4cdb17ad38545ba124921327b35669dd
`client` - The Dashactyl client `user` - The Dashactyl user the manager is for `data` - The data to resolve resources from Creates a new manager for client resources.
class CustomResourceManager constructor ({ kubeClient, logger }) { this._kubeClient = kubeClient this._logger = logger }
0
117bf78e003ff6104a5d88098d8d75e8
45aec1f204cac6e80bd8a37295c91317
Delete a ship to preference record for the channel partner. Delete a ship to preference record for the channel partner.
namespace com.ultracart.admin.v2.Api public partial class ChannelPartnerApi : IChannelPartnerApi public ChannelPartnerShipToPreferenceResponse UpdateChannelPartnerShipToPreference (int? channelPartnerOid, int? channelPartnerShipToPreferenceOid, ChannelPartnerShipToPreference shipToPreference) { ...
0
b7d4a7d0a65b88702a7ae1bad5f42df5
7a000bdfd6905bd1ef29f72310a3561e
Builds a new matrix having all columns not specified by given indexes. containg a copy of the original data.
namespace Accord.Math public static partial class Matrix public static List<T> Submatrix<T>(this List<T> source, int[] indexes) { if (source == null) throw new ArgumentNullException("source"); if (indexes == null) throw new ArgumentNullException("index...
0
42ca43f68b6ccadc81a52a74ea6786d5
df4328edbbb4d7dcc25dceb6eaa4ae52
현재 세션의 IQueryable{T}를 제공합니다. NHibernate.Linq.NHibernateLinqMethods.Query{T} 를 사용하세요.
namespace Castle.Facilities.NHibernateIntegration [Serializable] public class SessionDelegate : MarshalByRefObject, ISession public IQueryOver<T, T> QueryOver<T>() where T : class { return this.InnerSession.QueryOver<T>(); }
0
3a4e81d29557a213106a7bc311f3fc13
52c6149f75b042cf378e81dbd97a899f
Metodo que muestra un contacto con el nombre dado
class ContactController extends Controller public function show($id) { $contact = Contact::findOrFail($id); $user = User::find($contact->idUser); if ($user != null){ $contact->user = $user->name; } return view('backend.contact.show',compact('contact')); }
1
384d7e9c31542a699ceb127fd642c8b9
f34535ffbaaf86f7c77bf1a3126e2f5e
Fetch EasyMOD Version
static $v; if (!isset($v)) { $v = trim(implode('', file(DIR_FS_CATALOG . 'includes/version.php'))); } return $v; }
0
a1cd2c64e5f778be51977ae6e655d4d6
495f40317923e3d52fda08cd13a97482
Stops all available components.
void iot_container_stop (iot_container_t * cont) { pthread_rwlock_rdlock (&cont->lock); for (int32_t i = cont->ccount - 1; i >= 0; i--) { iot_component_t * comp = cont->components[i]->component; (comp->stop_fn) (comp); } pthread_rwlock_unlock (&cont->lock); }
1
72807b8d7e1a3e76605e818d65629a16
d58d1f7e6642bd616aebb9321e956fe6
Sets the first_name of this UserEntity.
if first_name is None: raise ValueError("Invalid value for `first_name`, must not be `None`") self._first_name = first_name
1
170b4749061347acdbc203772865fef1
b3f614262b7f27c1b48ce5cda8728781
获取实习描述
handleChangeDescription(e) { this.setData({ 'jobInfo.description': e.detail.value }); }
0
5ad389e915348d95d3b843aada72921b
34b929d8f9e7660b934359b6ea84d53f
splits the year_month column to year and month and returns them in int format
List<Integer> list = Lists.newArrayList(); String[] time = yearAndMonthTime.split("-"); Integer year = Integer.valueOf(time[0]); String monthTime = time[1]; Integer month = null; if (monthTime.startsWith("0")) { month = Integer.valueOf(monthTime.substring(1)); } else { month = Integer.valueOf(monthT...
1
f4c056dbf166ef4d9c42d0d858482bfa
9a14e4f9c5955310c593bff9621d425c
是否有配置阿里云
{ if(empty($config)) { $alioss = \Yii::$app->get('alioss', false); } else { $alioss = new Alioss($config); } return $alioss; }
1
5e9b2d0c130922ff7ab3b0e7259eff42
3401e967af1be1d455186959ab025cec
Set up test users, images, and albums.
{ User::factory(5) ->has(Album::factory(2) ->has(Photo::factory()->count(3) ->state(new Sequence( ['active' => '1'], ['active' => '0'] )) ->has(Source::factory()->count(1))...
1
c7d8ad7bffff83629bb3863d10c043c0
c39cb309d64faef9c3443b1d278984a4
利用canvas跨域下载图片(图片服务器已设置跨域)
var img = new Image(); img.src = path; img.setAttribute("crossOrigin",'Anonymous'); img.onload = function () { var canvas = document.createElement("canvas"); ctx = canvas.getContext("2d"); var imgWidth = img.width; var imgHeight = img.height; canvas.width = imgWid...
1
3567b0655feec4e33d8c0e7457c56ab0
9ee2ea937ffaee4a1cca557286c71d11
Get pending packet count of MAC instance
u32 XGMAC_GetRXPacketCount(UINTPTR BaseAddress) { volatile u32 lVar; lVar=XGMAC_ReadReg(BaseAddress,XUL_RX_PACKET_COUNT_REG_OFFSET); return lVar; }
1
77d617551bb7cf379158bb9eab771fe5
04ac5577d5745e6a0df2566b9d3058d6
Override. Logic to be executed before the players are allowed to take a turn
public abstract class UserModel : MonoBehaviour public virtual void StartTurn () { }
1
65caab68ba131975127b0eacd93d0f47
6a9a7dfbfaa3e1607bf5a80b73f97996
@brief fstatに格納されたファイルデータを文字列にして返す
char stat_time[512] = {0}; struct tm *stat_tm = NULL; stat_tm = localtime(&(st->st_mtime)); strftime(stat_time, 512, "%Y-%m-%d %H:%M:%S", stat_tm); printf("%s", name); print_space(12-(strlen(name)%12)); #ifdef _WIN32 printf("%s.%I64u ", stat_time, (unsigned long long)st->st_mtime); ...
0
076b9a9fa6a1bac4c104227089caae0a
ec3105a04fce59fe8c3041749cc30eda
Loads a New Scene with a Blend Animation
TempFader tempFader = TempFader.CreateTempFader(fadeColor, duration, delay); if (tempFader != null) { StartCoroutine(tempFader.FadeToSceneCR(() => {SceneManager.LoadScene(sceneBuildIndex);})); } }
1
b128fbf5cddb72fea5251abb5d96a431
ed7b78d313ba979d491563146806e5ab
Create the WORKSPACE stanza needed for this rule set.
try: LOGGER.debug("Setting up study workspace in '%s'", self._out_path) create_parentdir(self._out_path) except Exception as e: LOGGER.error(e.args) return False
0