query_id
string
corpus_id
string
query
string
code
string
label
int64
13d1e34722e7919f6b8f3f149719ddea
00b2b93ed31089381b5987b599b155d5
Disable service mode when finishing
int fini_service(int isparent) { if (!isparent) { destroy_timer(); } return 0; }
0
fa97b8179d9f4b5a64be2460e861157d
02a0e06935f49d884482286695df209c
moves the enemy away from the player
public class enemy : MonoBehaviour, IDamagable void Update() { transform.Translate((ShootyGame.Instance.playerInstance.transform.position - transform.position).normalized * Time.deltaTime * ENEMY_SPEED); }
0
01e8a9cd1f94df0a197ccd4563da6a5a
cb92dc272dd0e51019d7b5de0fff02f2
Get all currently bound spells
namespace RSBot.Core.Objects public class Spawns public List<SpawnedSpellArea> GetSpellAreas() { lock (_lock) return SpellAreas.ToList(); }
0
2d1241dac33678162e24302e90d0a2ad
5cfedb176eb6ea528b2368bbbeb3d35f
<p> Gets summarized results for the <code>StartLendingAnalysis</code> operation, which analyzes text in a lending document. The returned summary consists of information about documents grouped together by a common document type. Information like detected signatures, page numbers, and split documents is returned with re...
TResult getSummary() throws IOException;
1
b4a740525f83eedc80beff17dd56c0fa
45a713f2e9925648eb02e0d4fd42775c
Execute a Closure within with a given error bag set as the default bag.
public function catch(Closure $failure): PromiseInterface;
0
b742a7e5e46f1d47d9333c19d5bf2995
925771f418216520d44df275ce2dd1c3
如果一个在线的账号被一个客户端登陆并且onLogOnAttempt返回允许 那么会踢掉之前的客户端连接
@Service @Slf4j public class OnlineUserService public void checkLoginOnUser(String userName, String igoreToken){ List<OnlineUser> onlineUsers = getAll(userName); if(onlineUsers ==null || onlineUsers.isEmpty()){ return; } for(OnlineUser onlineUser:onlineUsers){ if(...
1
1bc54d081474924e26566607814edb38
f164eaba2ab425746e705fc7279ff27d
Insert a specific song into a specific playlist. Takes the two parameters and makes an INSERT query to the PlaylistSong table in the database. song. playlist.
{ query.prepare("INSERT INTO asso_song_pl (sg,pl) VALUES (?,?)"); query.bindValue("1", sg); query.bindValue("2", pl); query.exec(); }
1
cdf53914b470686ef2ae3020996ecba9
ed4c70caf0f9a3d12b546205a99c135e
Sets the value of the TraceabilityId field.
namespace Amazon.Pinpoint.Model public partial class SendUsersMessageRequest internal bool IsSetTraceId() { return this._traceId != null; }
0
3296653842d35dc035b8d796edb1e7e9
88fb040cd23e5d7c540279260e75d38d
Verifies that a certain cell in a table contains `expected`. Row and Column number start from 1. This keyword passes if the specified cell contains the given content. If you want to test that the cell content matches exactly, or that it e.g. starts with some text, use `Get Table Cell` keyword in combination with built-...
[CallerMemberName] string testMethodName = null, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string sourceCodePath = null) { if (Value != expected) { var context = Context.GetCallerContext(testMethodName, expected, sourceCodePath, lineNumber); ...
0
77684817439bd0d8d7de8db4be750af8
a547255328eea206c45c21e19b318a36
Get all virtual interface records.
class VirtualMachine(object): def get_interfaces(self): interfaces = self.xml.find('devices').iter('interface') iobjs = [] for interface in interfaces: _type = interface.attrib['type'] mac = interface.find('mac').attrib['address'] source = interface.find('sour...
1
4b0d66f078afb005296fa6fe76b0e66a
7b89c8febf6eda4ae99706b156d755bf
r""" Flag that controls the Gaussian pyramid of the testing image based on the pyramid used during building. If True, the feature space is computed once at the highest scale and the Gaussian pyramid is applied on the feature images. If False, the Gaussian pyramid is applied on the original images (intensities) and then...
namespace ZTSupermap public static class ztSuperMap public static Boolean TFPyramid(soDataset objDt) { if (objDt.Type == seDatasetType.scdImage) { soDatasetRaster objDtRaster = (soDatasetRaster)objDt; soDatasetInfo objDtInfo = objDtRaster.GetDatasetIn...
1
22c1d86692ad07f1199f0ac07e5b7b73
b01aea99fff6d53cc829b07fd5aca712
Finds and displays a user payments in the Group entity.
{ $group_id = Auth::user()->master_user_group_id; if($group_id == Config::get('simplifya.MasterAdmin')){ $companies = $this->company->findAllActiveCompanies(Auth::user()->company_id); $entities = $this->masterEntity->findWhere(array('status' => 1)); return view('p...
0
b5e9d1ef702e6b42ed39607e8d508c32
1e2377e877904cb6e19556ab9ca39df2
添加到缓存(如果存在则放弃添加)
namespace YoeJoyHelper public class CacheHelper public void Add() { if (IsAlive(Key)) { return; } else { System.Web.HttpRuntime.Cache.Insert(Key, Value, null, DateTime.Now.AddSeconds(Duration), System.Web.Caching.Cac...
1
b3999e023bb1c106a76bea4c60d15c0a
1fc9008b5efe062e8ff82e259d199a2c
function to add this object to the stack, map, and subProgram list if parent is the top item on the stack
void Initializer::pushObj(IdentifierBase * obj){ objList.push_back(obj); }
0
5582e4dd45340630466f63b90831a840
99402d7b05b6033bb3d514b91a1f9b8b
Test the unmute method.
class TestDeviceEntity: async def test_unmute(api): device = DeviceEntity(api, device_id=DEVICE_ID) device.status.mute = True result = await device.unmute() assert result assert device.status.mute
1
1d0a2ced8e42b0ac85fc9fc38e3c726e
d066d8de0f485b2be0ad440d5949ec10
Vytvoří prostor se zadaným názvem a stručným popisem napojený zpočátku na zadané sousedy a obsahující zadané h-objekty.
public World createWorld(double width, double height) throws ModelException;
0
f6c35789a504629b408e9864e724a11b
1d673c253e3fa2a030fafc5a4b498f83
Sets whether the color spectrum is scaled logarithmically. <tt>true</tt> to scale the color spectrum logarithmically, <tt>false</tt> otherwise.
Boolean isLogScale();
0
ad9aca49d349b3605cb2562933514e6a
69b11a35c2f61f4d790f2d69bc491104
<p>Property accessor for the <code>cardinality</code> property of a restriction. This denotes the combination of minCardinality and maxCardinality to the same value.</p>
EAttribute getRestriction_Cardinality();
1
713b6c008062bf1d8f847be58c316862
a8f6588f6c4f278e43cc3fca454b2db4
获取该停车场所有岗亭
List<ParkingLot> getParkingLotByUnitId(@Param("unitId")String unitId);
0
67da01ad22f2f3945bbf33792a2b48fe
f9c6e3ac3252dfd946aa32fdc2f2e689
Takes a file name and removes the handle at the end. When a period is found before the extension, the file name becomes a substring with all values before that period. ^
public class MainActivity extends AppCompatActivity public String removeFileExtension(String fileName) { int lastDotPos = fileName.lastIndexOf('.'); if(lastDotPos == -1) { return fileName; }else if(lastDotPos == 0) { return fileName; }else { return fil...
1
34ebe82c5ec31f449a292607b8a64532
1ccbab6633ad846928513926a45dd286
Return a blobs content for a given SHA
class Gittle(object): def blob_data(self, sha): return self[sha].data
1
adbfa792b094ac6b1bf075b5945a7d87
4777658b09339570364cfea894f62f7e
由磁盘加载图片
public class ImageLoader public static void load(Context context, String url, ImageView iv) { Glide.with(context) .load(url) .diskCacheStrategy(DiskCacheStrategy.ALL) .crossFade() .into(iv); }
1
f4d871f0e302cfb856d575c22d95ffd3
06b988011afb7b8b1e4ef4912e8ed843
Uri格式: 1)跳转 caoliao://jump?type=xxx&content=xxx 2)事件 caoliao://action?type=action_name&content=xxx 根据Uri启动Activity或者发送EventBus事件
if (!TextUtils.isEmpty(type3) && !TextUtils.isEmpty(target)) { if ("WEB_PAGE".equals(type3)) { BaseProxyImpl.getBaseProxy().startIntent("page-public-web", (BaseTopActivity) mActivity, target); } else if ("NATIVE".equals(type3)) { Ba...
0
f18fde8996c9d48e7d0644051bc478ab
edcbe65a26fbf50c3fb354e44f64ae5b
复核结论更新
public partial class _Default : PageBase public void update_audit_comment(int docid) { string comment = TextBox1.Text; BLL.Recheck.Recheck_update_audit_comment(docid, comment); }
1
2eac37270701d2094ed753283c935811
0841173233a076f7b28e2d50bb5c9f14
If a client joins, grant them some basic rights
public class HungerCraftPermissions extends JavaPlugin implements Listener @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { giveGroupPermissions(event.getPlayer()); }
1
9fefbb84db75d99163b1cdd692d19070
10cda152b31922301d6562628504e810
Получить группу полей по ее id
class professions function GetGroup($id, &$error){ return $GLOBALS['DB']->row("SELECT * FROM prof_group WHERE id = ?", $id); }
1
e5d8e00343b94ea9ad3043a2f01b24bc
dd1083c9951194e341bb0835135d9512
振幅小于筛选
def getV1(m, r, eps, w, maxV1): V1 = np.min(m,2) V1 = guidedfilter(V1, zmMinFilterGray(V1,7), r, eps) bins = 2000 ht = np.histogram(V1, bins) d = np.cumsum(ht[0])/float(V1.size) for lmax in range(bins-1, 0, -1): ...
0
1e1ea4b5627ca9f9a0b670bacca81f13
141e819e5d27941790dfd0cee79723a5
根据HQL语句获取前N条实体对象列表
int startIndex, int recordNum) { return currentSession().createQuery(hql) .setFirstResult(startIndex) .setMaxResults(recordNum).list(); }
1
267d678bf7e197a3b548afa16a2393b9
6c3d39cdd7d072d8eb93805fb12635bb
Log a generic warning message asking for a sample. This function is intended to be used internally by FFmpeg (libavcodec, libavformat, etc.) only, and would normally not be used by applications.
av_log (NULL, AV_LOG_INFO, "play\n"); av_log (NULL, AV_LOG_INFO, "usage: %s [options] input_file\n", program_name); }
0
385bc5436c4bcee0ee25e519030ff03d
76d7fc312e34f79a5a6266a15297b977
Getter for the airplane's flight of a given date.
public class TripFlight extends Data public LocalDate getTakeoffDate() { return takeoffDate; }
0
36d2e81a9b1565787f3e3e79be69b0eb
89a0365b83090e4e9c3177665d91a44a
指定したHTML文章にデバッグバーを埋め込む
string strHtml) { HtmlDocument doc = webBrowser.Document; if (doc == null) { Navigate(webBrowser, "about:blank"); doc = webBrowser.Document; #if NO webBrowser.DocumentText = "<h1>hello</h1>"; doc = webBrows...
0
2e14b1127928c4c57a9f34a6c69bb119
461b3653dc29cc7f2a0057cc69cac3e1
初始化UI位置与大小
let width = Laya.Browser.width; let height = Laya.Browser.height; this.width = width; this.height = height; this.Background.width = width; this.Background.height = height; this.Title.pos(width/2,height/4); this.LoginBtn.pos(width/2,height/3 + 100); ...
1
78bd0cd64e9980836e7057639eaaf333
2bb58f4b21ef2cd5e28b09b1c685fb5d
二值图反转
public class ImageUtils private Bitmap doReverse(Bitmap graymap) { int width = graymap.getWidth(); int height = graymap.getHeight(); Bitmap binarymap = null; binarymap = graymap.copy(Bitmap.Config.ARGB_8888, true); for (int i = 0; i < width; i++) { for (int j = 0; j <...
1
06f6e359febe2eafe0a2536cccf5d627
14713f22009c2cdcdfc8eb944658e995
Return count of game round. Returns: num (int): count of game round
class Game: def get_round(self): return self._round
1
6040cbcc84ca1ff6c004a05d0eb47bf3
e16cc01bdf7a2f0445e925c906dde635
Supprime le joueur du noeud
Serveur serveur = ConnexionManager.getInstance().getServeur(); String nomJoueurSupprime = joueurSupprime.getNomUtilisateur(); if (!serveur.getGestionnairePartie().getPartie().isPartieCommence()) { serveur.getGestionnairePartie().getPartie().affecterNullJoueur(joueurSupprime); serveur.supprimerJoueur(joueurS...
1
c9a3623bcc08fa930ade22a0005ad008
7483f2ca522f9254471be795aa20e4be
重载不等号运算符
class myString{ bool operator !=(const myString &other){ return !(this->operator==(other)); }
1
ae473db18bff830cefe335fc921c7174
077215bee76118b86af26f93e7e51821
Returns the average interval between the stored values
class CachedCounters(ICounters, IReconfigurable, ICounterTimingCallback): def get_interval(self) -> float: return self._interval
0
6e27d06748a4af9b5bbc60d7f1ce856f
c998d70ad9777f6d44b4a495e73bfa57
根据联系人号码从通讯录中获取联系人信息,包括名称和头像uri
public class GetPhoneNumberUtil private void getPhoneContacts() { ContentResolver resolver = mContext.getContentResolver(); Cursor phoneCursor = resolver.query(Phone.CONTENT_URI, PHONES_PROJECTION, null, null, null); if (phoneCursor != null) { while (phoneCursor.moveToNext()) { String phoneNumber = phoneCu...
1
4ca58a5f98a8ed75266535ec21a9abbb
a1e91049c635e9cbcde101a84f1d8e3c
Set the website of a speaker
class Person implements PersonInterface public function setWebsite($website) { $this->website = $website; return $this; }
1
8df79837efc9c8b471ff64899a1b4ae0
0c01efe76e5ce93f9afb8ac6bb0b68e8
Gets all application type name resources created or in the process of being created in the Service Fabric cluster resource.
resourceGroupName: string, clusterName: string, options?: ApplicationTypesListOptionalParams ): Promise<ApplicationTypesListResponse> { return this.client.sendOperationRequest( { resourceGroupName, clusterName, options }, listOperationSpec ); }
1
e1778cdedaf7f1351a5a093afb83b2ed
2a9250486347513375f4e0e2c052d708
we must use malloc because arduino doesn't support new[]
int newButtons( int n ) { if(n>MAX_BUTTONS) n=MAX_BUTTONS; for(int i=0; i<n; i++) buttons[i] = new Adafruit_GFX_Button; return n; }
0
b9970cd2e73c400b81ba82f42a51d352
ea63bd96a6d761a918ccdf1137425bd6
GET: api/Acessos
class AcessoController extends Controller public function index(Request $request){ $pessoas = Acesso::all(); if($request->csv == 'TRUE'){ $ac = array_values((array)$pessoas)[0]; $path = public_path() . '/tes.csv'; $writer = Writer::createFromPath($path, 'w+'); ...
1
62fbf23690fe14dc9a1fa32bfd083e5d
e12d6893be8af95854447ae18712587d
--------------------------------------------------------------------- updates the climate forecast record in the database ---------------------------------------------------------------------
def _update_forecast(date, day_in_advance, source, max_temp, min_temp): _qualify_fields(date, day_in_advance, source, max_temp, min_temp) try: fcst = models.DayRecord.objects.get( date_reference=date, day_in_advance=day_in_advance, source=source ) except m...
1
7942e984829b44edcd7bf91a021ddd31
69f5c9b8ae7611d1f2154b6c4253d42f
Sets the trade_state of this FixedPriceOrderTransaction. The state that the trade resulting from the Fixed Price Order should be set to. # noqa: E501
class FixedPriceOrder(object): def trade_reduced_id(self, trade_reduced_id): self._trade_reduced_id = trade_reduced_id
0
c167249eb81e902bfc25b08ccc5ed3d7
1cc44a8beed3a55d2b4b0b906f43e721
라디오 선택시 배경색 변경
namespace PTN3460I_Configurator public partial class Form_MainForm : Form private void Checked_changed_RB(object sender, EventArgs e) { Update_RB_BackColor(); }
1
6251ef779cd9bc311bb20cb97eab0cb6
731f15bfe9eb7f6716334a7ebe95a8ef
根据BBS发布时间获取BBSItem
class BBS110Spider(Spider): def parse(self, response): try: while True: for each in response.xpath('//tbody[starts-with(@id,"normalthread_")]'): push_time_str = each.xpath('.//td[@class="lastpost"]/em/a/text()').extract_first() push_time_date =...
1
b8c1bbb4e5e34b1dd5af14cd01942b10
c6c04d7020901babbf5e966b67a308ed
Retention criterion that bases on "similar descriptions have similar solutions".
MsPacManDescription _query = (MsPacManDescription)description; MsPacManDescription _case = (MsPacManDescription)description2; if(_query.getLevel() != _case.getLevel()) return 0.0; double simil = 0; if(1 - (Math.abs(_query.getDist2nearestNotEdibleGhost() - _case.getDist2nearestNotEdibleGhost())/100) > 0) { ...
1
fe02cab60c084904248c50dcd07e7d30
c4e40cc6a6f5cfbd1e36c5fc35803083
Fait se deplacer un fourmie dans le graph
{ cpt = cpt + 1; if (this.orientation == NORD) { planfourmi[x][y - 1].celluleOccupee = (!planfourmi[x][y - 1].celluleOccupee); if (planfourmi[x][y - 1].celluleOccupee == true) { orientation = 2; } else { orientation = 4; } ; y = y - 1; } else if (this.orientation == WEST) { planfourm...
1
cd30401ec050459c830282e18465897b
0c032be42bc70b03fa588271d9e01b45
Get timestep for stability in atmospheric model
double CellKernel::tstep(double stimt) { t=t+dt; if((dVdt>=dvcut)||((t>stimt-2.0)&&(t<stimt+10.0))||(apTime<5.0)) { dt=dtmin; } else if(apTime<40) { dt=dtmed; } else { dt=dtmax; } return t; }
0
31a416024df26ee1352944efd9abe7b0
6f5f03242df1663325cde042efdace74
convert vector from NWU to ENU
Vector3d E2NED(Vector3d p_E, Vector3d pRef_D) { Vector3d p_NED = TransE2NED(pRef_D) * p_E; return p_NED; }
0
729b51c55e263948a356515ec5424186
f0a4b384f479bde758afdedeb2c4dec0
Returns true if the right alt key is currently depressed.
function IsRightAltKeyDown() end
1
e16702da97dd5084da9a4ea315616797
372c221c5a1d4e0080c529adf2b6a342
功能描述:更新设备号
@Service public class ClerkServiceImpl implements ClerkService @Override public ResultDO updateDeviceId(Long clerkId, String deviceId) { ResultDO resultDO = new ResultDO(); if (ValidateHelper.isEmpty(clerkId) || ValidateHelper.isEmpty(deviceId)){ resultDO.setSuccess(false); r...
1
8a2503e62fac309d3137a5bcde617bae
4e429b4c117caab3e41acd44ae10eaa4
Butonların aktifliğini kontrol eden fonksiyonumuz.
{ btn1.Enabled = bl1; btn2.Enabled = bl2; btn3.Enabled = bl3; btn4.Enabled = bl4; btn5.Enabled = bl5; }
1
4894d9e7b4f983ecb881f64e7671bae3
5db53e4b775ee5d3e0ef9aac566cc060
Get the web platform debug URL from shared preferences or empty, if not available.
return if (CSPManager.isDebug()) { BuildConfig.baseDebugUrl } else { BuildConfig.baseReleaseUrl } }
0
2519a3965311c0c71e85c689cb874e8b
eb47fa3c231b6baaaf01a457e16d391a
convert polygon masks to bitmap masks.
mask = np.zeros([height, width], dtype=np.uint8) for i, p in enumerate(polygons): rr, cc = skimage.draw.polygon(p['all_points_y'], p['all_points_x']) mask[rr, cc] = 1 return mask, np.ones([mask.shape[-1]], dtype=np.int32)
1
ffae7e97ceeae33b8a81e5fab996721a
9ed3e0aeddbcb1192b1d2d04c8860452
Desenha o tabuleiro xadrez
void desenha_tabuleiro(ESTADO *e){ printf (" A B C D E F G H \n"); printf (" _ _ _ _ _ _ _ _ \n"); for(int l = 7; l >= 0; l--){ printf("%d| ", l+1 ); for(int c = 0; c < 8; c++) { if (e_branca(e , l ,c)) printf("* "); else if (c == 0 && l == 0) printf("1 "); ...
1
bd5cd12fa1b3de48c8523715b6e2aa84
0b5083fd8f0415aa293210efa1874f50
Enable the selected I2C PEC calculation
void I2C_ConfigPecLocation(I2C_Module* I2Cx, uint16_t I2C_PECPosition) { assert_param(IS_I2C_PERIPH(I2Cx)); assert_param(IS_I2C_PEC_POS(I2C_PECPosition)); if (I2C_PECPosition == I2C_PEC_POS_NEXT) { I2Cx->CTRL1 |= I2C_PEC_POS_NEXT; } else { I2Cx->CTRL1 &= I2C_PEC_POS_CURRENT; ...
0
b19b7aea419e76df5c14e1499c21bc5f
6b0dc71adc2d56c4d9a905d228c14963
店铺的精确查询方法
$SellerShop = D('SellerShop'); $input = I('input'); if (!$input){ $this->ajaxReturn(array('result'=>'false','sellerShop'=>'Unable to get your input parameters'),'JSON'); }else { $where['barcode | name | original_price | present_price | shop_one_type | shop_two_typ...
0
65e94dc3c30fab4589697b1553f27e5d
6ca1ae2bb70c98b6b25050a3dd273765
点击“删除二维码”按钮
onClickEditQrcode() { this.data.qrcodes.forEach((item) => { item.checked = false }) this.setData({ opQrcode: true, qrcodes: this.data.qrcodes }) }
0
c071a33b1e001c645840bcf292afd8aa
45f52aba592c061518f83a2f146a8d6c
成交接口 加载成交侧委托,需要恢复日内委托关系链 需要找到成交侧委托的父委托,父委托有可能是路由委托也有可能是直接帐户委托 这里需要判断然后从清算中心或路由中心获得对应的委托对象
parent = None try: if trade.Oid() == trade.TrxTrade().ConnectedTrdnbr(): parent = trade.TrxTrade() elif (trade.Oid() == trade.TrxTrade().ConnectedTrade().MirrorTrade().Oid()): parent = trade.TrxTrade().MirrorTrade() except AttributeError: paren...
1
563140a889c9852f191308d8fb18d126
95a4804b6eb086a8e27c949e33503c80
Set up comb filters with staggered delay times.
void filter_delay_create(void *pUnknown) { FilterDelayData_t *pData = (FilterDelayData_t *)pUnknown; pData->nDelay = 5000; pData->flDelayMixPerc = 0.5; }
0
91c96ef0fe48ed48a0b685071d8cc51f
34c08dbcff83386c38d67d2e422f797f
Creates OK Response of <see cref="IResponse"/> with a list of messages and with an OK status <see cref="ResponseStatus.Ok"/>
IList GetResponses ();
0
64cfdd2394c3f7b717f8332be3fbfcb8
c7ff88777bbd52a032c156e221884016
ADD##
{ debug_write_log(DEBUG_TRACE, '[group_membership_add]'); debug_write_log(DEBUG_DUMP, '[group_membership_add] $gid = ' . $gid); debug_write_log(DEBUG_DUMP, '[group_membership_add] $aid = ' . $aid); dal_query('groups/mremove.sql', $gid, $aid); dal_query('groups/madd.sql', $gid, $aid); return...
1
5ae99b16c24b0d85ad10f8827dd9b2e0
6a11d689ab521bdfe1ba37ea62ae852f
Gets all text files at the specified path
file_list = [] p = Path(path) for i in list(p.glob("**/*.txt")): file_list.append(i) return file_list
1
38bf33fa69a5e7b2fe62cde7b6ab508d
a11aaf6998c1ad5f8c51ae2efc8bbbbe
Helper class for drawing items on a canvas
{ Object2D.call(this); this.text = ""; this.font = "16px Arial"; this.strokeStyle = null; this.lineWidth = 1; this.fillStyle = "#000000"; this.textAlign = "center"; }
1
c4974391cfd29eb59b8e9e7a7edb6a3c
3a79ad6a1e2aecd03337f0da5d5dd158
初始化邻接链表表示的图,初始化后为没有边相连的孤立节点图
{ this.head=new int[this.nodeNum+2]; this.subPath=new int[this.nodeNum+2]; this.Dis=new int[this.nodeNum+2]; for(int i=0;i<head.length;i++) { head[i]=-1; subPath[i]=-1; } for(int j=0;j<this.nodeNum;j++) { ArrayList<Integer> aa=new ArrayList<Integer>(); ...
1
f67606507c5671b4efe476f9042b1924
c879013a097c106911f9dc780686a9b8
#複製檔案OR資料夾(包含底下資料)到指定路徑底下
{ $msg_frompath = self::iconv($msg_frompath); $msg_name = self::iconv($msg_name); $msg_todir = self::iconv($msg_todir); $arr_return = array("code" => 0 , "msg" => ""); $str_topath=""; $str_frompath = $msg_frompath; $str_todir = $msg_todir; if( !is_dir($str_todir) ) self::dir_create($str_todir); if( ...
0
7a1afa1be82a3ac53cdb9a454d6d77b0
2f1086a9cf9edc963bc295112d97fff7
Determine whether or not to serialize the dropdown font property value
namespace Core2D.Style public class TextStyle : ObservableObject, ICopyable public virtual bool ShouldSerializeFontName() => !String.IsNullOrWhiteSpace(_fontName);
1
4a7a15eb2d47df28dfd09e21284dcff0
555bb9e283714daccac3d400d43ea1d7
The number of x samples.
impl CoVariance pub fn len(&self) -> u64 { self.avg_x.len() }
1
ce6e3963a19e2ccce582862539411ef5
19178e03346f3986c844a4cfe098810b
Prüft ob die erste und letzte Position des Buchstaben übereinstimmen.
{ return preg_match('/' . $this->_consonant . '{2}$/', $str, $matches) && $matches[0][0] == $matches[0][1]; }
0
9e57ca99284b7a0f6fe60a65b5f3311a
cbd45c9dbbeb7c1fb64f9b74405d3236
Send a response to the host. Appends a CR-LF pair to the end of the output string.
class ProcessPerConnection def respond(message) @client.write(message) @client.write(CRLF) end
1
7ccfab55a00acec8b885e9a69b4712a8
08f5d4d43bf6cf642a22ac7fd4b9080b
if the data have not been inserted into the database, wait until it is done.
class MainWin( wx.Frame ): def waitForDB( self ): self.dbWriterQ.put( ('flush',) ) self.dbWriterQ.join()
1
c8d6bb4f08d777e03224bcc59b3bdae9
f0063fdbed778cdf75d08991b6446db1
Returns string for active material based on electrode type
if (type == ell.neural.ActivationType.relu): return 'ReLU' elif (type == ell.neural.ActivationType.sigmoid): return 'Sigmoid' elif (type == ell.neural.ActivationType.leaky): return 'LeakyReLU' return ""
0
2fbb4f7ecb82acd14819b0568512f0f1
78547fff81ad59972bc509e4fb982737
font_size_idが存在すればfont_size_idを、存在しなければ6を返すメソッド
class FontSize(IntEnum): def get_font_size(cls, font_size: "FontSize"): if font_size == FontSize.SMALL: return 10 if font_size == FontSize.MEDIUM: return 12 if font_size == FontSize.LARGE: return 15 return SYSTEM_DEFAULT_FONT_SIZE
0
daef07e1669df0368d2a8e1742f499fc
af68568993c384e3689cefe3f5f1b571
Adds an IS EMPTY condition to the WHERE clause, ANDing it with any existing conditions if necessary.
{ return new SQLCriterion( new SqlString( sql ), ArrayHelper.EmptyObjectArray, ArrayHelper.EmptyTypeArray ); }
0
3ddeab1cc45b3c95aeabf618ac87b2b0
ed191b895918423fae79f2ebd95854a4
保存上传的图片缩略图
class MediaReturnAction extends Action public function save_img() { if (!empty($_FILES)) { import("@.ORG.UploadFile"); $config=array( 'allowExts'=>array('jpg','gif','png'), 'savePath'=>'./Public/Uploads/media_img/', ); $upload = new Uplo...
1
b7e2166f87895eb3e646f8652722fca0
7495f18dfaac50c830d9edd20a8a93f2
Update multiple documents on MongoDB
return new Promise((resolve, reject) => { connect((dbo, db) => { dbo.collection(collection).updateMany(selector, {$set: set}, (err, res) => { if (err) { console.log('Error:'+ err); reject(err); ...
1
1a3b98b48f99b610817d53b5e90b48e8
ae4cc0d72fbd7714c13cc3de2ff9199d
Gets the dimension of the Hilbert space of the left block
class System(object): def get_left_dim(self): return self.left_block.dim * self.left_site.dim
1
5db84ad2e4aa61ba92a1d0784064892e
a5fb38a400a2cdf1d3dcfdd5f5f1da25
Move the Event Slider to the next event.
if (this.state.currentEventIdx+1 < this.state.events.length) { this.setState({ currentEventIdx: this.state.currentEventIdx + 1}) } }
1
8b226ba68c76ad7f7cb2bede2743fcac
74b3940f669f717658f99967589de13e
解析表达式,并将元素放到中缀队列
{ std::vector<Token> queue; std::vector<Token> stack; auto len = mTokens.size(); queue.reserve(len); stack.reserve(len); for (size_t i = 0; i < len; i++) { const auto & token = mTokens[i]; switch (token.type()) { case Token::Type::Data: queue.push_back(token); break; case Token::Type::Function:...
1
f9efcb8f62525deedf06cfc4bedcdbc8
e5c76042f9a5997b815231c8733c6248
@brief Tells the PULP-SDK to initialize or reset performance counters
perf_reset(perf_counter_t handle) { if (handle == NULL) { return; } switch (handle->type) { case PC_COUNT: ((struct perf_ctr_count *)handle)->event_count = 0; break; case PC_ELAPSED: { struct perf_ctr_elapsed *pce = (struct perf_ctr_elapsed *)handle; pce->event_count = 0; pce->time_start = 0; pce...
1
d840c6f6d75c702b79a79e175a2fcb04
4e92d2ce44512878093507b57489fba8
A reference to a domain or server that manages policies under which the document is accessed and/or made available.
class Communication extends DomainResource get context () { return this._context; }
0
8ac5f9dba619ed5ff6d1a302969b74a5
716d6534532b868df3a446c29e4350ff
删除微信昵称里的Emoji图片
if (TextUtils.isEmpty(text)) { return ""; } Pattern emoji = Pattern.compile( "[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]", Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE); Matcher matcher = emoji.matcher(text); ...
1
ee2d6611c6556da6083c9465002978c7
daefa08e73a7e948c84ae6fb312f3cf0
initializes this RestLogicNode with a json hash
@node = nil @safe_name = nil @validation_token = nil @registration = nil @json_attribs = nil @node_name = nil @node_exists = true Ohai::Log.logger = Chef::Log.logger @ohai = Ohai::System.new @rest = Chef::REST.new(Chef::Config[:registration_url]) end
0
9577b0532d1810027c881cb220536b28
6c9a684262cdb7b246e12aa46429f60f
Gets the aimed step duration text field.
public class StartPanel extends JPanel public JTextField getStopTimeField() { return stopTimeTextField; }
0
b8a9bf26cbffd3d373e05f02731f1e23
354cdbfd41d0042bdfb7cbd515d886fb
合并重复的顶点、纹理坐标、法线
mergeVertices(positions, normals, uv, indices) { const positionsMap = {}; const indicesLookup = []; const uniquePositions = []; const uniqueNormals = normals ? [] : null; const uniqueUV = uv ? [] : null; const indices2 = []; let vx; let vy; let vz...
1
6d5574f360a1869441f609d09245ef9f
c75f057e5a9411827153b3710125853b
GET: api/OrderReviews
{ ViewBag.User = User.Identity.GetUserName(); if (User.IsInRole(RoleName.CanManangeRestaurant)) { ViewBag.displayMenu = "YES"; } else { ViewBag.displayMenu = "NO"; } return View(db.Rev...
0
2410a116b165e2561a0415412f639e37
eeb17918cd9431b8c49201e79e75b0a8
Handles the RowDataBound event of the gridPendingBills control.
{ int _billID; int index; try { if (e.CommandName == "Expand") { index = Int32.Parse(e.CommandArgument.ToString()); gridPendingBills.SelectedIndex = index; _billID = int.Pa...
0
c27ab6b1cf2a33c4c6a29e81c5310328
a190a449c21910f101036d1965e0188e
发起post请求,并返回字节
public class HttpUtils public static byte[] POST_BYTES(String url, byte[] params) throws Exception { return bytesPostInvoke(url, params); }
1
c817cc50ced9ce233db052e6a4edc602
443bc795a3846f73d19ad7785fc31500
Return true if there's no exception when running func with args
def test_wrap_db_errors(): @sql.wrap_db_errors def no_exception(): return True response = no_exception() assert response
1
c741630e851bd05a80b29a74ebe05416
ad81afdae0b263825d2935edc2b20847
Кэширование данных аутентификации
{ $cacheKey = "login:$user_type" . $user_id; $cacheValue = (object)array(); if ( Cache::has($cacheKey) ) { $cacheValue = Cache::get($cacheKey); } foreach ($data as $key=>$value){ if( isset($cacheValue->$key) ){ $cacheValue->$key = $value; } } Cache::put($c...
1
8b2985eb5b3f8a46749624c74bdb3d31
f1177f604d3019007d60d8dbc9d7e979
Compares cells based on number of live neighbours for sorting purposes
c=0 one=np.sum(cells==1) two=np.sum(cells==2) if one>two: c=1 elif one<two: c=2 return c
0
2e5dc5052f312ab64ab42344f1ca9495
f18740e19a13098c141b37524e38b91e
Display a listing of the user for specified center.
class CenterTeamController extends Controller public function index() { }
0
b7ffa1a02e9d823d3688e5708776ac89
c34ee23e5469c7af5449418267754769
Extra seed configuration objects to add to those given on the command line. Configuration objects (typically dictionaries) not database objects.
ret = [] for arg in input_args: if "--fuzzMongodConfigs" not in arg and "--fuzzConfigSeed" not in arg: ret.append(arg) return ret
0
971064d8306ab7d9ad653fbb7be08f71
70d5733351456862d22fd0c9e7373246
Iterate over all specified options objects and add all properties to the new options object
function mergeOptions(high, low){ var ret = {}; high = high || {}; low = low || {}; ret.duration = high.duration || low.duration; ret.loop = high.loop || low.loop; ret.delay = high.delay || low.delay; ret.easing = high.easing || low.easing; ret.callback = high.callback || low.callback; return ret; }
0
24e4cc818a6accdf432bc944886013d1
22d14490e43fe71ebaf0fbddd3c86677
original cartpole's calculation for acceleration of theta. For validation.
state = self.state x, x_dot, theta, theta_dot = state force = self.force_mag if action == 1 else -self.force_mag costheta = iv.cos(theta) sintheta = iv.sin(theta) temp = (force + self.polemass_length * theta_dot * theta_dot * sintheta) / self.total_mass thetaacc =...
1
e83c2fc733fd254e72b643bf88325532
f0dcf6a0f4c447b10c271c8a3545f06b
Gets the details of a specific batch job execution for a specific application.
namespace Microsoft.Azure.Management.Batch Task<GetApplicationResponse> GetApplicationAsync(string resourceGroupName, string accountName, string applicationId, CancellationToken cancellationToken);
0
dd4386ad7c8adff03cda93ce69782eb6
f44a667d959afb11cfc5901b1139669e
销售额排名报表-合同金额
class Market extends IController implements adminAuthorization public function amount_report() { $start = IFilter::act(IReq::get('start')); $end = IFilter::act(IReq::get('end')); $reportObj = new report('amount'); $reportObj->setTitle(array("订单生成日期","订单数量","商品销售额","商品成本","商品毛利")); $orderDB = new IModel('...
0
5b045259f40adde5673eb5f945f4ad07
af8d3751cf851aa271e5ffd7136815b7
Tests that deleting a node creates the correct api request.
with self.mock_delete() as m: node = NodeBalancerNode(self.client, 54321, (65432, 123456)) node.delete() self.assertEqual(m.call_url, '/nodebalancers/123456/configs/65432/nodes/54321')
1
09cafd37be51471aac7383ae57d48a75
0caa04c28dad5cfab30355b101c92eb9
Regression test for enthought/traits#1622.
class TestTVTK(unittest.TestCase): def test_help_trait(self): n = tvtk.PolyDataNormals() t = n.traits() test = t['splitting'].help != t['non_manifold_traversal'].help self.assertEqual(test, True)
1