query_id
string
corpus_id
string
query
string
code
string
label
int64
ec6fc8245c04b7a9c2d75d7190eac2ac
7f61448ad6da3ef0f9cb03f40c5be655
If no value is set, an empty string should be used.
cases like (1)
0
db92b3b4e814771f52b9f4aa734abd17
f8d8364575f7a2de01e1074ddc386c23
Sets camera shaking variables
@shake_power = power @shake_speed = speed @shake_duration = duration end
1
dddcb18bcc0df5bc5a7296469f3751ef
9646d3b14f82fb612579ed47c30e6e88
公会附加atk值
{ if (eval(__MAGIC__)) return $___RET_VALUE; if($pa['is_colatk'] || $pd['is_colatk']) return; }
0
9d0a6c844b1dee33330a26854ca1c681
b36187c3c71d01e94c49c62bfe43486f
Shows order page.
class OrderContoller extends Controller public function index() { return view ('landing/order'); }
1
9bc4cb855a05fa784df31bc85877362a
e32d84ed396adca47c10794b97954e42
Computes the scale factor for the update to satisfy the norm constraint. Defined as min(1, sqrt(c / r^T F r)), where c is the norm constraint, F is the approximate Fisher matrix, and r is the update vector, i.e. -alpha * v, where alpha is the learning rate, and v is the preconditioned gradient. This is based on Section...
class MaxNorm(Regularizer): def norm_altmin(self, lfactors, rfactors): return self.inner_regularizer.norm_altmin(lfactors, rfactors)
0
58db5a779932b9af7d68c790df2a9421
33392992e7d6437f891e1077e2c50afc
获取当前路由是否验证签名
class Auth private function _is_sign_page(){ return preg_match('/^sign\//', uri_string()); }
0
f7450be942fa857156906156980e15da
1a43ca7f6189681cf835e3ee5569d253
装修公司详细信息
class DingdingRent extends \city\PublicClass{ public function house_detail($source_url) { $html = $this->getUrlContent($source_url); preg_match("/last-child\"><h1>\s*([\x{0000}-\x{ffff}]*?)<\/h1><\/li>/u", $html, $info); $info = trimall($info); preg_match("/(普通住宅|别墅|写字楼|公寓)/u", $info[1], $house_type...
0
2a524d3a1d3c9d75379f61c63f447d83
5027e765c13814a797e6ed4e420efcae
Function initiated for the main page after user logs in.
function loggedOutInit() { showLoggedOutMenuItems(); setMenuActive("home"); document.getElementsByTagName("BODY")[0].classList.remove("sb-sidenav-toggled"); document.getElementById("message").innerHTML = "Wonderful Website Monitoring Service"; }
0
898ae87423e7596825282e988a6740bb
0c7e27b1ee3d65703c5a67525964fe15
格式化XML字符串信息,以便输出页面,主要转换一些符号为HTML格式
var gt; var str = xmlData; gt = -1; while (str.indexOf("&", gt + 1) > -1) { var gt = str.indexOf("&", gt + 1); var newStr = str.substr(0, gt); newStr += "&"; newStr = newStr + str.substr(gt + 1, str.length); str = newStr; } gt = -1; while (str.indexOf(...
1
dd00c810510409639b1e3b842716d094
4155e8a6d373fb4f327181a4d7b67acb
Estimate fundamental matrix using least squares method.
def reestimate_a(w, e, s0, rot,camera_r=False,Lambda=False): if camera_r is False: return reestimate_a_old(w,e,s0,rot) basis = e.shape[0] frames = w.shape[0] points = w.shape[-1] mat_r = upgrade_r(rot.T).transpose(0,2,1) P= matrix_multiply(camera_r[np.newaxis,:2], mat_r) res=w-P.dot(...
0
a0a8e5409f91ad6f97096166fd98217d
6161201b7758b267a36dfb83ff571685
Returns a CategoryPager object or nil.
super category_id, { product_link: '.productsArea .productArea .productDetail a', next_page_link: '.productsArea .tsk-pageview .next a' } end
0
716590c042cb7b9f73547454e44879ae
294f763a6e9d2794ac7be9116b27076a
Unifica en un solo diccionario los dos pasados como parámetros Si hay claves duplicadas, se asigna el valor del segundo diccionario Entrada: diccionarios a fusionar Salida: el diccinario resultante
def merge_dictionaries(dicts): result={} for d in dicts: result.update(d) return result
1
af1777e8f0da1af2a0e98d22769cd245
0f8ac0e6d7392351e7c2340aca33a64c
returns the pythagorean distance between two strings in offset format ('16.0W 4.5N')
d1, o1, _ = self.parse_code(deg1) d2, o2, _ = self.parse_code(deg2) off1 = self.join_degree(d1, o1) off2 = self.join_degree(d2, o2) return off2 - off1
0
45592972deb5707661d9708401be91b9
674f2a5779ac46f0d549dcf3f3e04f4a
register widgetized area and update sidebar for WPEP course details page.
function bblm_register_widget_tccd() { register_widget( 'BBLM_Widget_TCcompdetails' ); }
0
f9a97ae41d769d1294eac2baa372c69b
17156325004ceab92114c52aa6b932eb
Trouve la position d'un passager selon son numero d'identification unique
namespace globaltec class Program static public int Pos(string id) { for(int i = 0; i < P.Length; i++) { if(P[i].GetId() == id) return i; } return -1; }
1
ed4ad70a4974f76b6780f6f2e5f09032
3b1e924e3b83d81e2814efea0a54f5d7
返回给定路径图片的字符表示,用户在此还可以指定输出字符画的宽度和高度
public class RandomGraphic protected String draw(String charValue, String graphicFormat, OutputStream out) throws IOException { int w = (charCount + 2) * wordWidth; int h = wordHeight * 3; BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_3BYTE_BGR); Graphics2D g = bi.createG...
0
84198a033220eaa2015bbb8f34f390b5
e0eceef8e3c9b5cfa8f112c3e83d8929
根据myid和cateid删除cate表里数据
cateDeleteById(id,callback){ var sql = 'delete from categories where id = ' + id connection.query(sql,(err,result,feilds) => { if(err){ callback(err) }else{ callback(null,result) } }) }
0
a05c263b3642b913ab1163229a1451e5
e397c4a07a15d312405d18b1ddf3f5e6
Second-phase construction
class CodeGen(object): def phase2(self, issue_tracker, verify): self.expand_components(issue_tracker, verify) self.collect_port_properties(issue_tracker) self.flatten(issue_tracker) self.coalesce_properties(issue_tracker) self.merge_properties(issue_tracker) self.check_pr...
1
3a8385e1115ba9f38e8d9c06ee87f7d2
2e6758d275569e38fafc3e367ff60e58
r""" Takes a thermal network and returns the result of the operational optimization.
data_init_start = time.time() all_nodes = set(graph.nodes()) costs = nx.get_edge_attributes(graph, config.EDGE_COST_KEY) heat_demand = nx.get_node_attributes(graph, config.BUILDING_CONSUMPTION_KEY) production = nx.get_node_attributes(graph, config.SUPPLY_POWER_CAPACITY_KEY) ...
1
bb7e46720fa343d5068cf1e0e13f37e4
dfa9c9daed302a387e86bdaecfee8440
Loads the patch listfile.
class BatchHarness: def load(self, path): if self.logLoads: self.output("Loading file %s" % path) self.e.sendEvent(play.engineEventLoadPatch, path)
1
870825b88e4425b5b0164afc4ed53195
5d726d6974de0ab76ecf72333098e2fd
打劫布阵按钮回调
namespace ScriptController public class FightAllianceFrameCtrler : IControllerBase private void OnDepotArrangeBtnClick() { NetManager.Instance.StartCoroutine(DepotArrange(m_BattleData.MyUnion.UnionID)); }
1
bc7e659c0f4bd445e0efd58ce71d914a
9ef2a16a0e99d03ab9021a1ece07b3d5
https://gist.github.com/swdunlop/9629168
function str_replace(search, replace, subject) { var f = search, r = replace, s = subject; var ra = r instanceof Array, sa = s instanceof Array, f = [].concat(f), r = [].concat(r), i = (s = [].concat(s)).length; while (j = 0, i--) { if(s[i]) { while (s[i] = s[i].split(f[j]).join(ra ? r[j] || "" : r[0]), ++j in ...
1
85f034c8e3b9bbad8f0b3bb9b5c21cde
5795c2e5ba7f5ac744e06cb78152acc1
Factory method for the main window.
public class SwingComponentFactory implements ComponentFactory<JComponent, Color, KeyStroke> public MainWindow<JComponent, KeyStroke> createMainWindow() { return new SwingMainWindow(this); }
1
91fdef92f86726df2519b1bcada4aaa2
0c05d71b867b877924b18b08281faa5b
Retrieve measurements performed by a specific appliance as a JSON object. fromDate and toDate can be specified to limit the response metrics
var query = ''; if (paging) { query += '?' + paging; } return restAuthGet(axios$$1, 'areas/' + areaToken + '/measurements' + query); }
0
09a21580f72bfd8836d3ccbab6ce6948
74f2a3b2dbd252cf4de1fb8228e1a5fd
Размер блока шифрования в байтах
class Aes256Gcm static get BLOCK_LEN() { return 16; }
1
fd9dcd607745538babe935d255a53c1e
beae22cdbe460850789e276c5f317d12
解析种子文件,将种子文件的内容读入到全局变量metafile_content所指向的缓冲区中以方便处理
{ long i; FILE *fp = fopen(metafile_name, "rb"); if (fp == NULL) { printf("%s:%d can not open file\n", __FILE__, __LINE__); return -1; } fseek(fp, 0, SEEK_END); filesize = ftell(fp); if (filesize == -1) { printf("%s:%d fseek failed\n", __FILE__, __LINE__); return -1; } metafile_content = (char *)malloc...
1
de4d8a385772cd9833c086c910cb9b80
67a756ee466e6ad37206c13c27bd1445
Calculate distance walked per day by livestock, following Freer et al. 2012 equation 44a.
valid_mask = (~numpy.isclose(livestock, livestock_nodata)) sfu = numpy.empty(livestock.shape, dtype=numpy.float64) sfu[:] = livestock_nodata sfu[valid_mask] = livestock[valid_mask] * conversion_rate return sfu
0
1bb26f3c6f7e1f41a70bf57a7b7cb8cb
761fd55076872abc4bd70b6231199b5a
This method returns the tube cross section outer radius. Returns
class Sprocket(BaseModel): def outer_radius(self): if self._flat_teeth: o_radius = self.pitch_radius + self.roller_diameter / 4 else: o_radius = sqrt( self.pitch_radius ** 2 - (self.chain_pitch / 2) ** 2 ) + sqrt( (self.chain_pitch - se...
1
cbde990cf57ffd186a768602fae2f2e9
aecb649cc25028c9ba92c8606e80bf4a
Removes dead players from the players in trigger list
FastMap<Integer, Character> map = getCharacterList(); for (FastMap.Entry<Integer, Character> e = map.head(), end = map.tail(); (e = e.getNext()) != end;) { if (e.getValue() != null && (GameObjectsStorage.getAllPlayers() == null || GameObjectsStorage.getPlayer(e.getKey()) == null || !GameObje...
1
b8a7871313995b979f2a83a98de29ac1
c7318fbfbf5a1b19c635b33b044b80d0
Sets the color for when the line is not selected
public class TableView extends FrameLayout implements ITableView public void setUnSelectedColor(@ColorInt int unSelectedColor) { this.mUnSelectedColor = unSelectedColor; }
1
9fcceeab0970662caf6d69a29f10af28
5dd1e040924f6148287aacdf234ea753
Metodi tallentaa uuden kohteen tietokantaan.
throws SQLException{ preparedStatement = connection.prepareStatement("INSERT INTO Osoitekirja (Nimi, Osoite, Puhelinnumero, Email) VALUES (?, ?, ?, ?)"); preparedStatement.setString(1, name); preparedStatement.setString(2, address); preparedStatement.setString(3, phone); preparedStatement.setString(4, emai...
1
b9348480e2f391b9659c1fb954ddcfc4
8ca31e9c869f4319aa15d63f6444df59
读取外部设备的多媒体资源
public class AudioListFragment extends BaseFragment @Override public void initData() { ContentResolver resolver = getActivity().getContentResolver(); AsyncQueryHandler asyncQueryHandler = new MobileAsyncQueryHandler(resolver); asyncQueryHandler.startQuery(1,mAdapter,Media.EXTERNAL_CONTENT_UR...
1
6cff1ca78f916f9c394419c17291503e
44b45ac3c8870abec81325725fe09e51
关闭砍价
@Service public class StoreBargainServiceImpl extends ServiceImpl<StoreBargainDao, StoreBargain> implements StoreBargainService @Override public Boolean start(BargainFrontRequest request) { StoreBargain storeBargain = dao.selectById(request.getBargainId()); if (ObjectUtil.isNull(storeBargain)) throw...
0
e758ebef8e7bb6094b8de5732981f4dc
fca4edda55d008b3200f44cff6e0059c
character count from the given file
def charcount(filename): with open(filename,'r') as f: if f.mode=='r': x=f.read() li=list(x) return len(li)
1
030e356b5d2bf1a35f378b9a7991cca4
e145c27596b857640803d3a685bc3701
禁用私教团队
public void forbidden(String teamId, String adminId){ teamService.forbidden(teamId); saveLog(teamId, adminId, OperationTypeEnum.DELETED.getStatus()); }
1
d488007b8dd2f60f5dc2dd01d7ffd694
0fa560875f33b6d3e28288010acc9ccb
认为文件名形如“??/???/MyLuaName.lua???“,本函数将返回MyLuaName
local res = "fileNameMock" local index = fullpath:match'^.*()/' if (index) then res = string.sub(fullpath, index+1) end return res end
1
ef6d68b5dbe5f05854ae114a809c6d8f
3662be288e5f1a1e42e8b5e4b206787f
MENU > METADATA
{ std::string def, use; std::string name, reference; CX3DImporter_NodeElement* ne( nullptr ); MACRO_ATTRREAD_LOOPBEG; MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use); MACRO_ATTRREAD_CHECK_RET("name", name, mReader->getAttributeValue); MACRO_ATTRREAD_CHECK_RET("reference", reference, mReader->getAttributeVal...
0
67fe6ba9b9834710651858e2bee5c3eb
b3eb21ee5b043e79204fd5415c696975
Get parent board
class Board implements BoardInterface public function getParents() { $parents = array(); $this->loadParent($this, $parents); return $parents; }
1
b96a493ff5d40356bd3ba0f9edac5480
9ef84a185b350f3eb6b1b24c42d499ff
Convert an EE JavaScript file to an EE Python file.
target = js_path[:-2] + 'py' with open(target, 'wb') as out: out.write(js2py(js_path))
1
6e1022f5f5cda1b165f979103e600c94
1c717c223d49992d2ff9d82ad40f6840
Attempt to fire the currently equipped weapon.
bool PrimaryFire(WeaponWielder firer, bool tryAuto);
1
3f0f4c7da11f22e19cf9410450c9493e
479c8ca3250165f0e0015dcae6942fee
获取指定的客户回访 Customer_Visit对象集合
@Service public class CustomerService public List<Visitlog> getVisitlogById(int customerId) { return customerMapper.getVisitlogById(customerId); }
1
2c568ab236d711a28c678956df79ee4e
e4d58c1f216281d83232377637f8ae08
Changes the order of groups for a user.
namespace CampusModel [OperationContract] [FaultContract(typeof(WcfServiceFault))] void ChangeUserGroup(string sessionId, long userId, long newGroupId);
0
970a6249a3f129d41200459c700a2285
0d17d444a681ae48a74df458733dce9f
Returns the loss spec associated with a given configuration.
if config.loss == 'cross_entropy': criterion = nn.CrossEntropyLoss() elif config.loss == 'label_smoothing': class LabelSmoothingLoss(nn.Module): def __init__(self, smoothing=0.0): super(LabelSmoothingLoss, self).__init__() self.smoothing = smoothing ...
1
b52bbb12b29e6b632df28b76f6d7e4f1
5cec405c2199370f54361e173771a317
When an item is changed from the combo box, it will change the corresponding colour/shape.
{ string choiceP1 = this.p1ColourCombo.GetItemText(this.p1ColourCombo.SelectedItem); string choiceP2 = this.p2ColourCombo.GetItemText(this.p2ColourCombo.SelectedItem); if ((choiceP1 == "White") && (choiceP2 == "White")) { p1ColourCombo.Selected...
0
b6f0dd7c38a6345f5ca80ce78855a9b1
208e6f0918e37f04f5ad6621884bacee
Возвращает запрос для получения связанной услуги.
class TblCounterService extends \yii\db\ActiveRecord public function getService() { return $this->hasOne(TblService::className(), ['service_id' => 'service_id']); }
1
4a8dc2ed3a6767bb095eceb826426ac8
5a77bce9ad4c6f53214cfadeebd288e4
Check if dump file exists and is not empty
if (!file_exists($outputFilePath)) { return false; } if (filesize($outputFilePath) == 0) { unlink($outputFilePath); return false; } return true; }
1
7e2e93ab5b2085045b8b2aeba0b81554
afca19124397f2313591f791406c5cec
Convert header flag to a byte.
def chb(x): return struct.pack("!B", x)
1
018cbb05dd16dfa87ab8ba7d969c4806
52428adb73f761be98a0ffa7075b76a6
Boolean representing if the tooltip will fit on screen to the right of the element
export default class Tooltip get canShowRight() {return this.node.getBoundingClientRect().left + this.node.offsetWidth + this.element.offsetWidth <= DOMManager.screenWidth;}
1
004ad2eb9146f585cca3d7f9dabd4e24
07a8842d5d70b802dbbd1b681ed75b1d
Example を更新する。
@Component public class ExampleBusiness public void update(ExampleEntity example) throws ValidationException, IllegalArgumentException, TransactionRequiredException, EntityExistsException { validationBusiness.validate(example); repository.merge(example); }
1
fc9dcdaa2c2b6ec68741db66fd3e5521
fbd5ff56108dd81508a43bc224a41bec
Une photo appartient à l'utilisateur qui l'a posté
class YumsController def mypecophoto?(yum) logged_in? && current_user == yum.user end
1
c4c1154f990d23f970dd5a0ff10f7859
796257968e3446a9b2c017e31993bcc8
Gets the unknownStateThreatAgentDeviceCount property value. Indicates number of devices with threat agent state as unknown
class DeviceCompliancePolicySettingStateSummary extends \Beta\Microsoft\Graph\Model\Entity public function getErrorDeviceCount() { if (array_key_exists("errorDeviceCount", $this->_propDict)) { return $this->_propDict["errorDeviceCount"]; } else { return null; } }
0
2b4acff2c199c8bce7eb445e92b1905c
6f5ef1353f9383ea037a81b010458ca1
Format a SLong tag (signed).
msl &= ~0xF000L; msl |= 0x4000; lsl &= 0x3fFFFFFFFFFFFFFFL; lsl |= 0x8000000000000000L; int charPos = offset + UUID_STRING_LEN; charPos = digits(lsl, 12, chars, charPos); chars[--charPos] = '-'; charPos = digits(lsl >> 48,...
0
38297a2f2435e3322a09134d75aaac9a
fa0bc93d0782fd73cb2fafcac16a7697
ISR of OVERFLOW timer2
ISR(TIMER2_OVF_vect) { timer2_overflow++; }
1
560d2d2d48a1de07a8b5a916572c09c2
0afb8fc52ff5f4d530a6e1526a8be0e2
Set up rules for disabling fields.
{ $fusionConnectorSettings = $this->config('fusion_connector.settings'); $disabledFieldsSettings = $fusionConnectorSettings->get('disabled_fields'); $enabledFields = $form_state->getValue('fusion_connector_fieldsaccess'); $disabledFieldsSettings[$form['id']['#value']] = []; if (count($enabledField...
1
c1f1586209c9da8b38931c1409bc92e3
80b0b5cfe8d3ae3f1ce2759ca70f3902
Decode an encoded url. Usage: url = 'http://www.example.com/this%20is%20my%20test%20%26%20%23%24' decoded_url = urldecode(url)
def urldecode(url): return urllib.parse.unquote(url)
1
aafcebfff737044ac4bad2cde68f2e00
1927d4926183459ecef5e5fbcc9eee05
初始化一个PDO对象
if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')){ throw new PDOException ('pdo or pdo_mysql is not extension!' ); } $this->link = null; $this->tran = false; $this->last_id = null; }
0
f83e9d779b88e8090db55eeb1799f978
a3083a96878d728cb80c9696ed5b24cc
Constructor left here so that it can be overriden.
class Brim_PageCache_Model_Container_Abstract protected function _construct($args) { }
1
19bf9f3ddccd0b2b91642827b0335fe5
e75a4dc87210eacb7d2aa0987bf153e1
设置触摸时的回调接口
public void setTouchDispatcher(CTTouchDispatcherI touchDispatcher);
1
b84e3d8db48f8b4a8b44743239431d80
d6653a693f3b936d66fcc483e1c0efed
判断窗体文本是否为空
{ #region string viewAttr = FormatString(lb.Text.Trim()); return MessageBox.Show(viewAttr + "不为空!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); #endregion }
0
3e5c983f56b3c18031e93d8c5673fff5
06f683ad43e305a0d7f159a725bb3cfe
Disposes the editors without placing their contents into the table.
public class DataTypeEditorManager implements EditorListener public void dispose() { dismissEditors(null); editorOptionMgr.dispose(); }
1
53e70aa5d09d9825623b13117954a9f2
e01b1e9493cb594171f48ba69366f527
DS1302 时钟是否在计时
unsigned char buf[14]; buf[0] = DS1307W; buf[1] = 0x00; local_USI_TWI_Start_Transceiver_With_Data(buf, 2); buf[0] = DS1307R; local_USI_TWI_Start_Transceiver_With_Data(buf, 13); if (buf[1] & _BV(7)) { buf[0] = DS1307W; buf[1] = 0x00; buf[2] = 0x00; buf[3] = 0x00; buf[4] = 0x00; buf[5] = 0x00; ...
0
75a9219f228ee60bcdb6a9aa9f12c99d
219b60e40d13a29fd24565bd9a0e7be4
=============================================================== 一个制造多级联动selecter的方法 ===============================================================
$seluuid = uniqid(); if(is_array($attrs)){ $attrs = YYUC_get_attrs_from_array($attrs); } $arr_len = count($name_arr); $addwherestr = ''; $pid = '0'; if(!empty($addwhere)){ $addwherestr = ' and '.$addwhere; } $alltags = ''; $autotextstr = ''; $nopid = false; foreach ($name_arr as $index=>$n...
1
1fe0ee15e076354df282a067cb2c088b
197f2cf46ca9d5dbd8454ae6d9136ff7
for now only head collisions
namespace Physics class AABB : Collider CollisionInfo GetEarliestCollision(AABB other, Vec2 velocity) { if (velocity.x==0) { if (other.position.x-other.halfWidth >= position.x+halfWidth-epsilon || other.position.x+other.halfWidth <= position.x-halfWidth+epsilon) return null; float sign = Mathf.Si...
0
e1175820a7afe4aed92da48996485cfb
a394afdf3c73cb761390d6b74a705455
Gets the vendor name of this service provider.
public String ProviderName() { if (providerName == null) { return "NO PROVIDER"; } else { return providerName; } }
1
7a9d01c1d858ddfbeebd701e66b0e58c
bccc7a20669fc881d21b1c768d3ed88c
Returns a new object of class '<em>Disjunction Attribute Set</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
public class ScelLightAdapterFactory extends AdapterFactoryImpl public Adapter createDisjunctionAdapter() { return null; }
0
9926cd7245e9e6fde99ce743cd616ed2
0cefd05842050ff53a79dfc947a15a40
POST /casos POST /casos.json
class casosController extends Controller public function create() { $clientes = cliente::orderBy('nombre', 'ASC')->get(); return view('administrador.casos.create')->with('clientes', $clientes); }
0
a7ed958d07af3f2460c4705f32b718bd
f6b13f4657faae06ce599cf9a0f4ead5
指定调节音乐的音频,降低音量,而且显示音量图形示意
abstract public class MyMediaTool public static void downVolumn() { am.adjustVolume(AudioManager.ADJUST_LOWER, 0); }
0
d59a72fa3f609755f417c9d505e5b6a2
9e06a3df23c49d318cc3063ad30a81a9
Sets the elevator to maintenance
ElevatorControl ec = new ElevatorControl(this); motorMoving = true; ec.motorMoveDown(); ec = null; }
0
fa21843b8c128ddf70bb23209239406e
5163630e0919a40bf526fa79197e88c1
Function that gets attachment thumbnail url from attachment url
global $wpdb; $attachment_id = false; if ( '' === $attachment_url ) { return; } $upload_dir_paths = wp_upload_dir(); if ( false !== strpos( $attachment_url, $upload_dir_paths['baseurl'] ) ) { $attachment_url = preg_replace( '/-\d+x\d+(?=\.(jpg|jpeg|png|gif)$)/i', '', $attachment_url ); $attachment_...
0
4aaadda4055201b62a3d3aa764735422
e6576a5bc46e03ee1dda412eac6ecf1f
网页授权:通过网页授权access_token获取用户基本信息(需授权作用域为snsapi_userinfo)
auth_data = access_token(code) pp '-----------------------' pp auth_data query = { access_token: auth_data['access_token'], openid: auth_data['openid'], lang: 'zh_CN' }.to_query url = "https://api.weixin.qq.com/sns/userinfo?#{query}" resp = RestClient.ge...
1
8af140de56c9342177bd5cb85adcbc4b
0131e4b8643af73d43ff03c033171fe6
Creates a strongly typed hub proxy with the specified hub name.
public static class IM public static IHubContext<THub> GetHub<THub>(IServiceProvider serviceProvider = default) where THub : Hub { return App.GetService<IHubContext<THub>>(serviceProvider); }
0
61c46277f262f91ece092384b3dec892
e02ec85c7b88bb619f25560942903abc
Retorna os dados fake da amostragem
public class Amostra public List<Ponto> indice(int i) { return amostra.get(i); }
0
c02722889f02d9b9b4e88a5846af1f31
8792e9bf2b61449a4d90f26b8de4da54
Main function which contains logic of person finding.
fps = 0.0 resList = [] frame_cnt = 0 tic = time.time() pv_detection = [] full_scrn = False capture = cv2.VideoCapture(VIDEOPATH) while True: if cv2.getWindowProperty(WINDOW_NAME, 0) < 0: break ret, frame = capture.read() if frame is None: b...
1
0192787270e93185950aac222c188e91
8c1a155a74c1016b5e3d49c9317f7528
Set 304 Not Modified header and exit
class Response implements IResponse public function setNotModified(): IResponse { if ($this->checkFlowControl()) { return $this; } $this->setStatusCode(304, self::$statusTexts[304]); return $this; }
1
eb923363c9681ecacb6f9cb21dbd515f
c6f223446dff85fd9ae57a0d1ba23c21
Calculate transactions amount summary Transactions filtered by time period and optionally by category
{ FireflyIII.Client.ApiResponse<TransactionArray> localVarResponse = await ListTransactionByCategoryAsyncWithHttpInfo(id, page, start, end, type); return localVarResponse.Data; }
0
6602c5c5b4aad3fff0c2d22fb86fcfc0
c0a47c2d7e4b581abdfcb517c8deef97
Récupération du dernier client inscrit
class Client extends ActiveRecord public function getClientLastArticle() { return Client::find()->select(['article'])->orderBy(['article' => SORT_DESC])->one(); }
0
5cadf4e4a4f15459938969f3af6986b3
944a9c6097d8f1402e80ec703b75fd40
Get schedulers and creates new task if it needed
public abstract class DispatcherImpl implements Runnable, Dispatcher protected void forceCheckJobStoreSchedulers() { List<SchedulerDO> schedulerDOs = getJobStore().getSchedulers(); for (SchedulerDO s : schedulerDOs) { createOrGetScheduler(s); } }
1
8bcb8a388cb23e93bfaf8a2b2480c58e
00e2c6f972677a1bbad19fc339b92378
グラフ作成(点数)
{ var x = data.KeysPoint.Select(_ => _.X).ToArray(); var y = data.KeysPoint.Select(_ => _.Y).ToArray(); clust.Series.Add("Series" + count.ToString()); clust.Series["Series" + count.ToString()].ChartArea = "ChartArea1"; clust.Series["Series" + count.ToS...
1
0e8f73066a164091096034476129df57
9e2546846104686db52c738d41f85837
获取指定类型返回操作码
namespace OmronFinsTCP.Net class FinsClass private static byte GetMemoryCode(PlcMemory mr, MemoryType mt) { if (mt == MemoryType.Bit) { switch (mr) { case PlcMemory.CIO: return 0x30; case ...
1
a460282358a84247178bfd1b8cafc071
1aeddc2771ff5f3d0714fac1d3f10157
删除Units,对应的Page中的actionunits清空
namespace SkyCar.Coeus.UI.BS public partial class FrmAutoPartsNameManager : BaseFormCardList<AutoPartsNameManagerUIModel, AutoPartsNameManagerQCModel, MDLBS_AutoPartsName> public override void ClearAction() { InitializeListTabControls(); }
0
a082097321b19a10db0a7dc5d0f8b92f
aef16fd180a6bb89fc0882e7a941ae45
Gets the door operation time
public class Agents extends IteratingInputSystem public static class PriorityDoorArrive extends Arrive<Vector2> implements MyPrioritySteering.PriorityOverride public float getPredictionTime () { return predictionTime; }
0
716a5ff13a16f93d93825f27d7e81544
999f0543d2bef3fde3f8c06dabf7ed7b
Called when the Google API client successfully connects.
public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE_RESOLUTION && resultCode == Activity.RESULT_OK) { googleApiClient.connect(); } }
0
abbcb9085c9300241ec9428f7037b26c
d7ea6a914e243ebc6ac0a56c1a8f82a5
Hide the grid, keeping element placement.
class EcgJsHandler public hideGrid(): void { this.relayout({ "xaxis.showgrid": false, "yaxis.showgrid": false }); }
1
e7e3c57a96a32fe5b88c8e7cee64f306
4e75e9ee4c7d0c5f5c745b91c21cbce1
Creates a Maven ArtifactRepository for targeting deployments.
Map<String, String> props = new HashMap<String, String>(); return CDOServerUtil.createRepository(ServerConstants.REPOSITORY_NAME, createStore(), props); }
0
365d8fcc58f5c4edce72590b22b996ab
9fe392d66c4281744e4755d23f749081
Get a record ttl: record.ttl(r)
static time_t get_rrset_ttl(struct ub_packed_rrset_key* k) { struct packed_rrset_data* d = (struct packed_rrset_data*) k->entry.data; return d->ttl; }
1
c6179de84e14f9f7e390c86b6417845c
3c29181e40ddbb39a0e6d19c2646501f
Fetches all of a client's appointments
public class Appointment extends DatabaseObject public static List<Appointment> fetchClientAppointments(int client_id){ Appointment appointment = new Appointment(); return appointment.fetchAppointments(client_id, "client_id"); }
1
c3c7f85e947f338f3cebd7c141349f39
6503ecaa08f200f7c3f8fc4d212ea615
使用file_get_contents执行请求,目前只支持GET和POST请求
{ $ch = $this->create(); if (false === $ch) { return false; } if (is_string($url) && strlen($url)) { curl_setopt($ch, CURLOPT_URL, $url); } else { return false; } curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt(...
0
eeddd9984b89661dd060f450804e85e2
e2e689a0a9760d5d1994b5ed1b976454
@brief set the User offset on Y axis for wake-up
int32_t iis2dlpc_usr_offset_y_set(stmdev_ctx_t *ctx, uint8_t *buff) { int32_t ret; ret = iis2dlpc_write_reg(ctx, IIS2DLPC_Y_OFS_USR, buff, 1); return ret; }
1
cb0621e29a6ea644171a6721d8c73624
2b2d1b80ccd4369695edfc93782a7357
FreeRTOS task containing ArtNet UDP server listener
thread taskTCP(TCP_SERVER); thread taskUDP(UDP_SERVER); taskTCP.detach(); taskUDP.detach(); while (1) { } }
0
119fef1bcc928526318dca4eb48c9a3d
0ac1525da11009ee25517063ffdfaa55
Returns all ship costs
{ return [ self::SHIP_METHOD_VALUE, self::SHIP_METHOD_STANDARD, self::SHIP_METHOD_THREE_DAY, self::SHIP_METHOD_TWO_DAY, self::SHIP_METHOD_FREIGHT, ]; }
0
aa5c74d2a42c39c85adabdac5e833dda
84b80c8f86d171fe7eaa902d03b8cb84
Compute allocation record for the cfg the allocation record contains the following -How much stack space to allocate for spilled temporaries -Which registers are mapped to which temporaries
namespace maplebe bool LSRALinearScanRegAllocator::AllocateRegisters() { cgFunc->SetIsAfterRegAlloc(); SetAllocMode(); #ifdef RA_PERF_ANALYSIS auto begin = std::chrono::system_clock::now(); #endif if (LSRA_DUMP) { const MIRModule &mirModule = cgFunc->GetMirModule(); DotGenerator::GenerateDot("RA", *cgFu...
1
31370f21dc86f32bf364f68f730967f7
182862a686c95b20cb0dcbfa9f35608b
you're only allowed to walk on open passage locations and portal pieces - assumption: technically there's 1 of the portal pieces you can't walk on, we're assuming the data is good and you should never get to it anyway
case @page.movement when 'boat'; $game_map.boat_passable?(x, y) when 'ship'; $game_map.ship_passable?(x, y) when 'flying'; true else super end end
0
f03ad5a6b75b97d81d23273a873ffd47
4a297724c13370306566c08efe915a43
Description: Input :- sorted vector (ascending) - Value to search Output :- Index of closest value
for i in range(len(r)): if v < r[i]: return i return len(r)
0
db927658d1a6acf46d8dac85212c6799
f8af2d873f03268e6f266c13eb08d178
创建扩展过滤条件委托
{ var interceptorType = interceptor.GetType(); var variable = Expression.Variable(targetType); var callexp = Expression.Call(typeof(DispatchProxy), nameof(DispatchProxy.Create), new[] { targetType, typeof(ProxyGenerator) }); var interceptorProperty = Expression.Pr...
0
8a641c923b3011bc04dd0f8ea3b53d57
31e21e40c5ca56dbf567163a9c63b79d
Сохраняет выбор группы
GLOBAL $MSGTEXT, $MYSQL_TABLE19; if (isset($this->post['name'])) { $name = addslashes($this->post['name']); $query = "UPDATE `$MYSQL_TABLE19` SET `name`='$name' WHERE `id`='{$this->post['group_id']}'"; $result = $this->mysql->executeSQL($query); $this->smarty->assign('groupSelected', $this->post['group_...
1
19dc01f26ea0101d3983229e83b99f50
027dd940ac34704a75b3210af582e43d
Model mapper hook, this returns a list of the methods to map properties for. To reindex the mapper, call the remap() member method.
class LocationList extends BaseModel public static function getters() { return [ 'locations' => 'getLocations' ]; }
1
4c96d79dab1739ee1bf1f7d795815be9
a064654c7126ca1861294d261707c326
点击访问查看所有家政公司
public partial class weixuiguanli : System.Web.UI.Page protected void LinkButton3_Click(object sender, EventArgs e) { Response.Redirect("weixuichaxun.aspx"); }
0
c8cbda5ee2d5d30e6ed353ac17bedda1
a7529d5d9a75556d2e916b2bbbf3a092
返回一个{@link ResourceHttpRequestHandler}实例。
class AuthServer public function resource() { return new ResourceHandler($this->origin_requests); }
0
4ddf904b387be8f2232915ad7dacb131
9b0b0ebceea5c8a706c314c0f79e9806
根据时间、是否异常、是否异常处理获取考勤统计列表
namespace XkSystem.Areas.Wechat.Controllers public class AttendanceController : Controller [HttpPost] [AllowAnonymous] public JsonResult GetAttendanceList(string TenantName,string UserCode, string FromDate, string ToDate,int PerPage,int CurrentPage) { if (FromDate == "开始时间") ...
0
6bfae15f0e82afc6ca8ccf1d1f5c4aef
89faaa068d4a20dae3321ff2228ae3e9
Stop currently playing music.
export class NavbarMenuComponent implements OnInit, OnDestroy public stopMusic(): void { this.musicIsPlaying = false; this.audio.pause(); this.audio.currentTime = 0; }
1