query_id
string
corpus_id
string
query
string
code
string
label
int64
d2579d9d4148c40e73aa075115bc5607
3e476659133526644d675872bc43d3dc
Undo any global changes that the Agent may have made
namespace LuaPackageOrganizer.Environments public void RollbackChanges();
1
5147eb7d5f1d6703356bf3826b3c7aac
b68d85230517a39885e9be4690d48d70
Strip subwords of context and optionally the location indicator
def nokia_context_filter(data: str, re_flags: int = re.M) -> str: context_pattern = r"^\!?\*?(\((ex|gl|pr|ro)\))?\[.*\]" return re.sub(context_pattern, "", data, flags=re_flags)
1
06b1fc6494fc1bf660f7b5d80fefbe65
2eedfb1523d4fa89af2b3a105f10deb6
Called when the Celery worker thread is ready to do work. This is to avoid race conditions since everything is in one python process.
class Factory(object): def _initialize(self): if not self._initialized: self._initialize_celery() self._initialized = True
0
949a2960bbd34f1ce1bf937963030b97
7c48f2e46a345132107bad850c92b41a
根据获取的卡卷信息,显示卡卷图像
function sf_showInfo(cardsrc) { if (cardsrc != emptysrc) { element = document.getElementById('card-info'); element.src = cardsrc; } }
1
3418da413c506b876a08212813b686c5
d1ba1cfcc18bd68fd977c9f98355ccc9
Load the cached events.
{ if ($this->app->eventsAreCached()) { $cache = require $this->app->getCachedEventsPath(); return $cache[get_class($this)] ?? []; } else { return array_merge_recursive( $this->discoveredEvents(), $this->listens() ); ...
1
e51854dee7da4429c0d3fe134ca2255c
e6e40d31f5ea711da2c2bc2749373504
获取采购部人员信息
$list = Model()->table('auth_role')->field('id, company_id')->where("name like '%采购%'")->limit(false)->order('id asc')->select(); response_json(convert_dbdata($list, 'id,company_id')); }
0
7381c91c637c06a8ef38b38bc089c597
d16169440b800bbce2d6e2f3e2308592
Convenience method for a 0-parameter named query. Added to facilitate implementation of named queries in generated JPA controllers.
public List findByNamedQuery(final String namedQuery, final Object parameter) { return genericDao.findByNamedQuery(namedQuery, parameter); }
0
62925ca0acf52b82248ae8101fad8321
89da5776ea891665dc2b653277f91f34
The set:leading function returns the nodes in the node set passed as the first argument that precede, in document order, the first node in the node set passed as the second argument. If the first node in the second node set is not contained in the first node set, then an empty node set is returned. If the second node s...
LinkedList<R> result = new LinkedList<R>(); if (startOffset == endOffset) return result; @SuppressWarnings("unchecked") SortedSet<R> tail = getTailSet((R) newDocumentRegion(odd, 0, startOffset + 1)); for (R r: tail) { if (r.getStartOffset() >= endOffset) break; else result.add(r); } ...
0
b14e75aaa0db3415c19e3e14ea8b8542
89dc1e68936e30e327d67f18ed6aa044
get unsigned 16-bits integer (little-endian)
rx_uint16 Buffer::getLittleEndianU16() { rx_uint16 r = getU16(); r = CONVERT_FROM_LE_U16(r); return r; }
1
a0dcb1ad2b5899fe33ef18b4c59db236
b4d914404b2a41f612253a60ed15c9d2
设置车漆属性#####################
class NClothAttrValuesMainUI(sg.ScrolledWidget): def exeSetPaint(self): mayaFunc.nClothAttrValuesPaint( attribute = self.listComboBox.currentText(), windowFlag = self.setPaintCheckBox.isChecked(), )
0
9b74e790708971a323d85412c58707f9
3c0ecb5c28420937c684f17dfcba19fe
Peak-based frequency estimation with sub-grid accuracy maximizer -- peak frequency on grid P -- logarithmic periodogram, i.e power spectrum grid -- local frequency grid in the vicinity of the periodogram peak psi_hat -- frequency, i.e. sub-grid peak position
def fpsi(nx, ny, dx, dy, f): epsilon = 1.0e-6 aa = -2.0/(dx*dx) - 2.0/(dy*dy) bb = 2.0/(dx*dx) cc = 2.0/(dy*dy) hx = 2.0*np.pi/np.float64(nx) hy = 2.0*np.pi/np.float64(ny) kx = np.empty(nx) ky = np.empty(ny) kx[:] = hx*np.float64(np.arange(0, nx)) ky[:] = hy*np.float64(np.arange(...
0
f12dbf6a8c791ae1b15731c846baaf1c
cf20a648d554b317eb7d1722ebd0fa1d
Evaluates the need to wrap a method for overriding and returns the appropriate version. If `value` is null, returns the `baseValue`. If `value` doesn't call `this.base`, returns `value`. Otherwise, returns a wrapped method that calls `value`, and modifies its `valueOf()` and `toString()` methods to return the unwrapped...
class Grammar public function wrapSafe( $value ) { if( $value instanceof Expression ) { return $value->getValue(); } else { return $this->wasWrapped( $value ) ? $value : $this->wrap( $value ); } }
0
0513c81aec6423527c165983ec5fb46d
cf410d8f2f5776e665c0516d53953387
CDisplaySL::InvertRange(cp, cch) Invert a given range on screen (for selection) TRUE if success
{ if (!_canBeSelect) { CHARRANGE chr = { 0 }; _pObjHost->SendMessage(EM_EXGETSEL, 0, (LPARAM)&chr, NULL); if (chr.cpMax - chr.cpMin == 1 && chr.cpMin <= _contentChr.cpMin && _contentChr.cpMin < chr.cpMax) ...
0
6426de5555ff14969d184ef86f1b658a
79f7b8a6dd54a5a538908d776321d1ea
Create or update a SUMO cron deployment
jsonnewEntry = {} for key in deployment_request.keys(): if key != "_id": jsonnewEntry[key] = deployment_request[key] result = self.collection.update_one({"_id": ObjectId( deployment_request["_id"]["oid"])}, {"$set": jsonnewEntry}, upsert=False) ret...
1
67283c4702e37e670f6154709ff1f837
8a54b42124c4b21683716dc141e79928
Create a new instance from an array for a root filter.
abstract public static function fromArray(array $array);
1
58d50ffbef8fc2a051cb22fac3a2177c
7b7bdd3998dcc2ec68429277e7f0d257
Risolve un questo oggetto Campi. <p/> Dopo la risoluzione tutti gli elementi fanno riferimento a oggetti Campo e non piu' nomi di campo.<br> I Campi vengono recuperati dal modulo fornito.
public class CampoRicerca extends PannelloFlusso private CampoRicerca getQuesto() { return this; }
0
cc0ae6b72813f1bbeb4cde343aa16371
bf6bbb77a5ed421b11a4898542ec227f
@brief Get FEC Setting for forced Speeds. Will be rewritten in FEC_control
{ u_char fecAbility = 1; fecAbility = gCtcDB.dev_info.fec_ability; *pLength = 4; setU32(pValue, fecAbility); return SUCCESS; }
1
f02505055f58ca48ef15551978e5ea81
4f9df2bba1196757abbe2efdfbe9b6fa
五星通选显示界面
var fst_prize = $('#fst_prize'); fst_prize.show(); $('#fst_prize .btn').tap(function(e){ e.preventDefault(); winningShow(); fst_prize.hide(); }); $('#fst_prize .close').tap(function(e){ e.preventDefault(); fst_prize.hide(); }); }
0
75351479b028e5bc4e137a55d7e6fb26
8ad5f757ad9867b67499c3654c60d2d1
如果啟用了MonoBehaviour,則每幀調用Update。
public class MonoService : MonoBehaviour void Update () { }
1
b701e1567fe65fbdf31045d4dff8cbd2
379d4756e07c4ec48a299e80c5898ec3
attenuates signal aberrations in phase contrast image using FFT bandpass filters
(rows, cols) = filterf.shape highmask = np.ones((rows,cols), np.uint8) highmask[rows//2-40:rows//2+40,cols//2-40:cols//2+40] = 0 f1 = filterf*highmask ifs1 = np.fft.ifftshift(f1) highf = np.log(np.abs(np.fft.ifft2(ifs1))) lowmask = np.zeros((rows, cols), np.uint8) lowmask[rows//2-40:rows...
1
eb165d89e359b402bd727cfe366185f7
4001698cf83590ace26a51a1c783601e
Called when a member leaves the election.
fields = [ { "name": "Name", "value": f"{member}", "inline": True, }, { "name": "Profile", "value": f"{member.mention}", "inline": True, }, { ...
1
98dfe6a32f652271f1d87f533a965617
9d14d0433d9077571ce34d640a8e7f13
Calculate the distance between two EpPoints
public class TouchExampleView extends View private static double distBetweenPoints(Point a, Point b) { return Math.sqrt(Math.exp(a.x - b.x) + Math.exp(a.y - b.y)); }
0
964591ff430b0367210905b7bec0d1d4
134a874eac82d465e7ca462dd2ab01ea
Gets the alerts for a given route from the database
namespace GtfsConsumer IEnumerable<IAlert> GetAlerts();
0
66fbaf91f12e371b747b571a6c48dfbe
493ac3db6654ec6b91a300bc377c057e
Validation method for <see cref="GalleryImageVersionsUpdate" /> method. Call this like the actual call, but you will get validation events back.
namespace Microsoft.Azure.PowerShell.Cmdlets.Compute public partial class Compute internal async global::System.Threading.Tasks.Task GalleryApplicationVersionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string galleryName, string galleryApplicationName, string galleryApplicationVersionN...
0
979fb0e0e21c48bc0652881c91007029
3b307be809e1eb8fc1213ac9b68134b6
helper function to update the text of all color buttons
namespace FX long FXColorSelector::onUpdRGBText(FXObject*,FXSelector sel,void*){ FXint which=FXSELID(sel)-ID_RGB_RED_TEXT; rgbatext[which]->setText(FXStringVal(255.0f*rgba[which],1,FALSE)); return 1; }
0
94650ebe1ca8098d19beddf7e18ba34f
ee050c131b1e12edbf2060e7d63dddc3
update the text to show the equations
self.p1text.setText("{0:g}".format(self.parmVal[0])) if len(self.parmVal) > 1: self.p2text.setText("{0:g}".format(self.parmVal[1])) if len(self.parmVal) > 2: self.p3text.setText("{0:g}".format(self.parmVal[2])) if len(self.parmVal) > 3: self.p4text.set...
0
7c6126814d27bde6fbd6399cb89bc0e2
8edbd24499bdc19d195300e1dcc3e9fe
Record a registration.
public function insert(Registration $registration);
1
9661d324baeeeba4eefb00f9e170e8f7
66cdb1468bb7b0d5e5aad6563f8200a2
A megadott gameObjecthez tartozó képet adja vissza
namespace CoverShooter public class BulletShield : MonoBehaviour public static BulletShield Get(GameObject gameObject) { if (_map.ContainsKey(gameObject)) return _map[gameObject]; else return null; }
0
2cf722e0bb20c340b62c5928f3c9105f
f3d81218e70dbd23beb967c1c3194296
转换对象到Element对象
public class JsonUtil private static JsonElement toJsonElement(String json){ return jsonParser.parse(json); }
0
c59a9a43862003263e83a247430220c4
52e457bc154311d4a1141ce5ac6764eb
Visit a parse tree produced by MySqlParser#partitionOptionComment.
class mysqlParserListener(ParseTreeListener): # Enter a parse tree produced by mysqlParser#root. def enterPartitionOptionComment(self, ctx:mysqlParser.PartitionOptionCommentContext): pass
1
d315a3be249ed3960e9f0a7313229a93
f096577427c44fe771380992ba554f40
广播玩家退出
if type(player) ~= 'table' then return false end local index = nil for i = 1 ,#self._players do if self._players[i] == player then index = i break end end if index then if player:get_is_host() or self:get_is_start_game() then player:set_is_offline(true) else table.remove(self._players,inde...
0
c7587ebe39cd99cdf205a8e1db669f3b
d6a8518b6f4f20726089740e38995c93
Declares one more box as closed by computer.
void Game3Scene::closeBoxByUser() { ++m_boxesClosedByUser; m_score = m_score + 30; m_scoreDisplay->display(m_score); }
0
59d3f5be1ec293406e8dc690f98e238b
bdf0a832b42870f08f7bc02917d369a7
Check if mpmath is installed.
def _is_mpmath_installed(raise_error=False): try: import mpmath is_installed = True except IOError: is_installed = False if raise_error and not is_installed: raise IOError("mpmath needs to be installed. Please use `pip " "install mpmath`.") return is_installed
1
a01a5d1932e3919d6fad7eee70998189
c0de24cac305150bc9a988f5d156ec0d
Return the main tags associated with this class
class SourcePing extends TaskEntityHandler public static function getClassTags() { return array( self::generateClassKey("tag.ping"), self::generateClassKey("tag.source"), self::generateClassKey("tag.workflow"), self::generateClassKey("tag.task") ); ...
1
8c94f2c091011bac341f93278c255eb8
44904b92027535ac916e28e14b88cfd4
Find the distance between given lighthouse and user's chosen location. Haversine formula is used.
double user2Lng) { final int R = 6371; Double latDistance = Math.toRadians(user2Lat - user1Lat); Double lonDistance = Math.toRadians(user2Lng - user1Lng); Double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2) + Math.cos(Math...
1
59e42124737b1eb62655abeba18bca89
bf6aa9f396afe46081d566fa73294dfb
\brief Função que verifica se uma peça que foi posta no tabuleiro pode ou não estar lá de acordo com as restrições 0 e 1
{ int i1, i2; for (i1 = x, i2 = 0; i1 < x + QTD_BLOCOS_PECA; i1++, i2++) { int j1, j2; for (j1 = y, j2 = 0; j1 < y + QTD_BLOCOS_PECA; j1++, j2++) { if (i1 < 0 || i1 > LARGURA_GRADE - 1 || j1 > ALTURA_GRADE - 1) { if (TipoBloco(peca, rotacao, i2, j2) != 0) return FALSE; ...
1
762c58e261a98d6fc91fb0bb4d18cc41
f8d7ef34f2c5dd759f23f5592ab875a3
This method was generated by MyBatis Generator. This method returns the value of the database column tyc_company_bond.created_at
@Table(name = "sl_product_no_mail") public class SlProductNoMail implements Serializable public Date getCreatedAt() { return createdAt; }
0
2fb73902f7d13b45a3f6a25b25d761f7
b609c922199cff1ead358fcc139f76e3
Updates the joined members counting.
class THALEvents onMemberCountUpdated(data) { this.emitThalEvents('onMemberCountUpdated', data); }
0
8461264981aae348d7bbb9b0dc1a9edb
78ca13be89daf9ad8bb8cb1225d5c9cd
Validate that the Wave format is consistent.
{ byte[] wav = File.ReadAllBytes(filename); string riff = Encoding.ASCII.GetString(wav.SubArray(0, 4)); if (riff != "RIFF" || wav.Length < 8) return; int reportedLength = wav[4] + wav[5] * 256 + wav[6] * 65536 + wav[7] * 16777216; int ...
1
7f6f0ebc0f92b554b3d780855aec289e
337bef12897f3ad20898744baddbc98e
用有序数组中最中间的树生成搜索二叉树的根节点,然后用其左边的数生成左子树 用右边的数生成右子树,递归实现
public class _108ConvertSortedArrayToBinarySearchTree public static TreeNode sortedArrayToBST(int[] num) { return sortedArrayToBST(num, 0, num.length); }
1
83826a7aa715c7eb4df9b1383814b56e
e21fac1ffa9bd2ec056dcbfb7b1bd1c8
Валидация СНИЛС.
class DocumentValidator public static function isSnils(string $value, bool $easy = false): bool { if (!$easy) { if (strlen($value) !== 11 || !is_numeric($value)) { return false; } } $s = 9 * $value[0] + 8 * $value[1] + 7 * $valu...
1
51971c994d48ef72f50056040716a94a
900be1242b2ecd70a982c1d4b8153c09
Initial headers setup, creates headers, checks active sessions, and sets browser's active language
private initHeaders() { this._headers = new HttpHeaders(); this._headers = this._headers.append('X-API-VERSION', this.apiVersion); this.checkSession(); this.setLang(this.translate.currentLang); }
1
9f5e61331092d00f8d3bc8c135a25c58
e283e11a99629e80054f4cce23654938
Base request for issuing API api_requests to Tableau Server.
namespace NiFi.Swagger.Core.Api ApiResponse<Object> KnoxRequestWithHttpInfo ();
0
daacaac35e35e0f62763d64796af3ab5
ef7642cd6d8a16e88910ba1c69a7243e
テンプレートパスを変更
{ $this->templatePath = rtrim( $templatePath, '/\\' ) . '/'; }
1
cfb7fc8fdfe013c6c1106629136f1533
7591b4909c41ce9d90c03aa1089a63bd
Resets the Auto Tile Matrix assignments
self.r1_c1 = nil self.r1_c2 = nil self.r1_c3 = nil self.r2_c1 = nil self.r2_c2 = nil self.r2_c3 = nil self.r3_c1 = nil self.r3_c2 = nil self.r3_c3 = nil end
1
8755aec3c52b3bc7594fcee5f4efaa96
9b69acad1de2b6067fa33a99de364cc1
删除文章(逻辑删除,移动到回收站)
{ $this->validate([ 'articleId' => 'required|integer|min:1', ]); $articleId = $request->param('articleId'); $this->articleService->moveToTrash($articleId); return $this->success(); }
1
50136e511d848a4d8f60729792a14771
01896215687ab8712099700971d7e1e8
基类方法: 经济变量概述, 返回经济变量的均值统计
{ if (Economy > MAX_ECONOMY) { _economy = MAX_ECONOMY; } else { Economy = (int)(Population / 2000.0) * (numCommercialAndIndustrial / 5.0); } return Economy; }
0
875319055991b0c4f551fa9ee6940997
e6675612a43c64a0b2c7ec5e54ec6b4b
Checks if it intersects with the given circle
Vec2d unrotatedCirclePos = rotatePointAboutCenter(circle.getPos(), rect.getPos(), -rect.getRot()); Vec2d clampedPosition = clampPointToRect(unrotatedCirclePos, rect); return unrotatedCirclePos.sqrdDist(clampedPosition) < circle.getR() * circle.getR(); }
0
3a101711fe84fc991126626b9fb0af26
95100f61d14a687e560ffbf30f44e077
Create an instance of {@link CustomObjectSharingRules }
@XmlRegistry public class ObjectFactory public CurrentShare createCurrentShare() { return new CurrentShareImpl(); }
0
fa56113ecbcc30bb0b8b9158aaee073d
0144ef621e23541c963613c1f9c1aa99
get the root inode of the file system
public class Volume public Inode getRootDirectory() { Inode temp = getInode(2); return temp; }
1
da2a3e846fa85ae54ed8664005493316
122f584fa8da15ffdc0cad3b3eeb412b
Given a path or list of paths, recurses through directories appending to the MAYA_SCRIPT_PATH environment variable any found directories containing mel scripts The root directories, if given, are always added to the MAYA_SCRIPT_PATH, even if they don't contain any mel scripts.
import glob raw_paths = glob.glob(os.path.join(inPath, '*', '*'), recursive=True) print("processing: {0} of raw maya files".format(len(raw_paths))) dataDirectories = [] for raw_path in raw_paths: dataDirectories.extend(sx.listDataDirectories(raw_path)) return dataDirectories
0
19550609ae803179fbefc83bf9de3f1e
376d4e10c753cc2e93530a7c63d2b717
Gửi mail kích hoạt
{ $payload = \JWTFactory::sub(\JWTAuth::parseToken()->toUser()->uid) ->email($request->get('email')) ->setTTL(60 * 48) ->make(); $token = \JWTAuth::encode($payload); $date = [ 'uid' => \JWTAuth::parseToken()->toUser()->uid, 'usernam...
1
db4be01ba55d34a482ec60f1cded5f4a
7d484c6e94b8590adea7703e0423a447
用递归法将一个整数n转换成字符串。
{ LL i,j,k; if(n==0)return "0"; string str; for(i=n;i!=0;i/=10) { str=(char)(i%10+48)+str; } return str; }
0
1c0a448c831216ad7f1b6e9e58c02d51
1a310088ddc111912613551f56301487
read mapping of equipment measurement IDs to BLIS measurement IDs
class FilterParser static valueToIdMaps() { return { transmission: { manual: 1, automatic: 2 }, condition: { new: 1, used: 2 }, fuel: { petrol: 1, diesel: 2, gas: 3, electro: 4, hybrid: 5 } }; }
0
fc599c3406c5cd961783ab6c6864558b
52b12a2896c66f1e54c14c4feba43d29
Checks if this tangible object condition has the given cover.
{ if (tangibleObjectInstance != null && cover != null) { List<TangibleObjectInstance> covers; if (this.removedCovers.TryGetValue(tangibleObjectInstance, out covers)) covers.Add(cover); else { ...
0
835889ae7f6ec337d02920ef8c9eeb4b
6a87a0c4ca73a7dc494183ed67ae2372
Accessor for timeElapsed
public class PlayerData implements Serializable public long getElapsed() { return this._timeElapsed; }
1
f268199dec7b2dfcc7715af782d310ab
22f103b49c6922312d9c39ce70ce2df6
查找已加载的指定资源。
namespace danmaq.nineball.old.core.raw [Obsolete] public sealed class CResourceManager<_T> where _T : class public CResource<_T> search(string strAsset) { return search(strAsset, true); }
1
c4fe3e093fa3a75f8e7bc2eb9d7c46b6
de1c233c682b73ccd9c4498e70ee3dab
根据用户编号,角色编号获取用户班级信息实体
NetTeacherStudent getEntityInfoByOpt(Session sess,Integer userId,Integer stuId);
0
a9ef3538ce7d9dbab0e0f6bb8dbbcf1c
1a05a841dbdf9fb95a3c322236493a51
Returns a collection of {@link ObjectPrx proxies} for the specified peer, where the proxies returned are those specified by the given {@link Set} of private proxy identities. In this implementation, the <code>peerIdentifier</code> is the peer's user id and the <code>proxyIdentities</code> is a {@link Set} of private p...
public final class SessionControlPrxHelper extends Ice.ObjectPrxHelperBase implements SessionControlPrx public StringSetPrx adapterIds(java.util.Map<String, String> __ctx) { return adapterIds(__ctx, true); }
0
b462e959cd7e91db70c2503a4955c0dc
7c6afdef8ea51b23d89e7c35ed964f2a
Returns the centroid and zoom level for the locations in route.
const { turf } = this.exports; const featureCollection = this.getFeatureCollection(features); return featureCollection && featureCollection.features.length ? turf.centroid(featureCollection) : null; }
0
1d0bda329996b20adc90d62300bbcd23
b7046005ca331e6f4521d20e31ef940d
返回T_Storage(产品信息表)的所有信息
List<Storage> selectAll();
1
27cf44bc9680be61ed452921db3562cd
4a403493e2a1e2abe89d039130acc013
更新SQLite数据库
{ try { string path = System.Environment.CurrentDirectory; SQLiteConnection mycon = new SQLiteConnection("Data Source=" + path + "\\data58.db"); mycon.Open(); SQLiteCommand cmd = new SQLiteCommand(sql, mycon); ...
1
482934dec49aa53318889c3757f02da7
88b5a8e7144855f8da36ea1c4eccb12d
GET: api/SuggestionModels1
namespace BTI_A1.Controllers public class SuggestionsController : Controller public ActionResult Index() { return View(m.GetAllSuggestions()); }
0
3d2038d852068b171c0950f857f66827
4dafb72d75046ae28dce1acf88acc0d9
Build array of child progress bars
function buildProgressBar(){ $progressBar = $("<div>",{ id:"progressBar" }); $bar = $("<div>",{ id:"bar" }); $progressBar.append($bar).prependTo($elem); }
0
d693f3d51599184b427d3d712beaaa33
e5727c3561868e2d0dc4f6bb0f172c1f
Unipolarna funkcja aktywacji neuronu.
class Neuron(object): def activation(x): return (x > 0) * x
1
91f45505d9070d04316ab6e4f25ff040
81ba547f219619b7b698a98389308531
退出游戏的时候,需要先退出pygame和mixer播放器
class Game: def __quit(): pygame.font.quit() pygame.quit()
1
268e01d2df2d38fc86d6afeb84ecab45
836f6f59c2a73d9d43053d99e4579047
Checks the GPRS signal level received from device and change its icon.
double voltage = getVoltage(analogReadValue); voltage /=8; if(voltage >= 1.40) { topFragment.getBatteryButton().clearColorFilter(); topFragment.getBatteryButton().setImageResource(R.drawable.full_battery); criticalLevel = false; } else i...
0
dd39b9a4cce0e34051825204806db497
bc89a1cdcc9ecbf1d548396a01ae8794
Test function from the AES-CMAC Algorithm Network Working Group Spec (NIST) - June 2006
{ vccrypt_block_context_t context; vccrypt_buffer_t key; const uint8_t KEY[32] = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 ...
0
6671f850f298a23ed404ec28d45f8f3e
ea794f21f77d484aa2435f79fcfa2b47
Find rays which could intersect with this wall, eg.: orientation of their ending to wall starting vertex is clockwise and to ending vertex is counterclockwise.
public customIntersectionPlanes() { return this.model.floorplan.wallEdgePlanes(); }
0
2d5e11125418b203cd76d5b2e620abca
c163f7e95b9003367819c1e8333bcdde
stop movement when lifting a key for smooth mvment
public class WarehouseController implements KeyListener,ActionListener @Override public void keyReleased(KeyEvent e) { velx=0; vely=0; }
1
a671b12a4eeeaef72c5697c3b8f971af
3024cfe85273c550742caaa1b559ffbd
Checks for the selected number exist in other contacts
class Contact: def contact_exists(cls, number): for contact in cls.contact_list: if contact.phoneNumber == number: return True return False
1
addb5f29081e31a4e9a309a2388f3aa2
45e83d81a63bf8b91f0a744dd5ecbbac
Modifica la educacion del programador.
namespace ASPODES.WebAPI.Controllers [AspodesAuthorize] [ActionTrack] public class ProfileController : ApiController [Route("api/Profile/Education")] [Validation] public HttpResponseMessage Put(EducationDTO education) { try { return ResponseWra...
1
9f83116dd7764a5c9a0577e47bcd2f9f
3ad03d8f7321caaf62cef0dcbd2c3029
IsMetricViolationError checks if given error is MetricViolation type.
type bp interface { IsBadParameterError() bool } _, ok := e.(bp) return ok }
0
36a48794fbd071479b60a847fa002bdf
3d6fc5c96201fc35c4f2430cebb71bd5
Returns the meta object for the containment reference '{@link net.opengis.wcs10.DocumentRoot#getDescribeCoverage <em>Describe Coverage</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getDocumentRoot_Description();
0
d74913f4e0c7342131ef79eccd25de49
e19205a5a5d02517c3ea560be4fc69a2
backup entire library before making changes
class Library(object): def update(self): try: args = ["--update", "--lib=%s" % self.location] self.session._Session__call_console(args) except RuntimeError as e: print(e)
0
45ff8e6ff90a23aa076ac24b736a575c
a5bbcf2e02ad8195d96b55b6a5bc521c
提交用户的一周的工作计划安排
$request = $this->getRequest (); if ($request->isPost ()) { $postObject = $request->getPost (); $postData = get_object_vars ( $postObject ); $userInfo = $this->ReturnUserInfo (); $date = $this->getWeekdate (); $deadline = strtotime ( $date ['WeekEnd'] . '18:00:00' ); if ($deadline < time ()) { ...
1
5928f1409923822f8760898abedcf358
fbe92297b154d9de22a6fe7980656c63
Returns the nearest neighbour of each particle in this set. If the 'neighbours' particle set is supplied, the search is performed on the neighbours set, for each particle in the orignal set. Otherwise the nearest neighbour in the same set is searched. :argument neighbours: the particle set in which to search for the ne...
def nearest_neighbour(particles, neighbours=None, max_array_length=10000000): if neighbours is None: other_particles = particles else: other_particles = neighbours if len(particles) * len(other_particles) * 3 > max_array_length: neighbour_indices = [] particles_per_batch = ma...
1
67df87d4e1cd7a0a9d4c42e13aea6e86
20ca375513ac2dd6980ec615b10d2891
Returns the cross-correlation function with lag in [-width,width] and given bin size. T is the total duration (optional). The result is in Hz**2: CCF(T1,T2)=<T1(t)T2(t+s)> N.B.: units are discarded.
def CCF(T1,T2,width=0.02,bin=0.001,T=None): return correlogram(T1,T2,width,bin,T)/bin
1
a00a55a737e11af8903db2471677387c
de429f311de686b896ace72feac9c0a7
PopAllIM 即时消息告警读取
url = 'https://slack.com/api/im.history?count=1000&token=' + const.const.TOKEN +'&channel=' messages = None im_message_user = [] im_message_text = [] im_message_ts = [] id = [] select_sql = u"select id, im_id from imlist_im" conn = sqlite3.connect('db.sqli...
1
21efd14276b4e5577d0729bb80836410
b354098155006fd61094c2b775552079
Path compression by halving: Returns root value by having each link skip to the next node in the path up the tree
public class QuickUnion{ private int root(int i){ while (i!=id[i]){ id[i]=id[id[i]]; i=id[i]; } return i; }
1
562440353e4bddfa34f08f2b6d943b98
aa3422e98633bfa1ee2e4ed1ec920170
<p>If true, the ripple will remain in the “down” state until <code>holdDown</code><br>is set to false again.</p> JavaScript Info:
public class PaperRipple extends PolymerWidget public boolean getHoldDown() { return getPolymerElement().getHoldDown(); }
1
f4a6890e066ce09635da86d3cf51c8b7
168f525337e16d0b2cadb62e409d7ef8
Get all downtimes related to host
class Storage: def stats_get_all_downtimes(self, start_date, duration): for svc in self.stats_get_all_svc(): self.stats_get_svc_downtimes(svc, start_date, duration)
0
187b291a11f4c81306238691ddf178b3
1dad82a60143d50c1734b4c74277cc7e
The notebook that contains the page. Read-only.
class Onenote(Entity): def notebooks(self): return self.get_property('notebooks', NotebookCollection(self.context, ResourcePath("notebooks", self.resource_path)))
0
f616140fd261115ac9cadfc4ddcf24c0
d0644771e23d7be171a423e4ead583b3
查找指定类别和pid的表单集合
List<FormClassifyTreeDTO> listFormClassifyForCommon(Map<String, Object> params) throws BaseException;
1
29b80a178afacc8d25a68d4eba373952
17a827567c2c0344729cf022f0301b77
Tests state transitions by activate and passivate
{ TestState stateA; TestState stateB; StateMachine sm; TEST_ASSERT_NULL(sm.getState()); sm.setState(stateA); TEST_ASSERT_NULL(sm.getState()); TEST_ASSERT_EQUAL_UINT32(0u, stateA.getCallCntEntry()); TEST_ASSERT_EQUAL_UINT32(0u, stateA.getCallCntExit()); sm.process(); ...
1
d7877654eb01d7065cfc34e12c98aff8
c22d6069c8dd16389a2b7e65d8075065
根据用户DN查询用户
att_list = 'distinguishedName' self.conn.search(search_base=self.DC, search_filter='(sAMAccountname={})'.format(user), attributes=att_list) logger = Log() if len(self.conn.response) != 3: user_dn = self.conn.response[:-3][...
0
af47ae3a81111883f149cb1041ce60ca
d83236a29501b75557e1e8694c737567
SetDebugFlag initializes debug switches.
{ bool res = false; if (value) { bool has_debug_path = get_has_debug_path(); if (has_debug_path) { uopt.debug = 1; res = true; } } else { uopt.debug = 0; res = true; } return res; }
1
86785f058ad377462041f18094cdbc55
70655b64a4255130420cce996125df9c
Is Company Object in cache?
namespace actionengine.actions public class TestActionStep : ITestObject protected static bool CacheContainsObject(string objectName, int index) { string cacheKey = GetCacheKey(objectName, index); return map.ContainsKey(cacheKey); }
0
bc408702a4ebec3014ebf6f4a7f90f20
41f7f6ec06f17810a7ff5c4bee7aa0c5
checks for the current evolution stage and sets the proper alert response gif
if (Data.instance.stageNum < 4) { stageImage.sprite = stageSprite[0]; } else if (Data.instance.stageNum < 8) { stageImage.sprite = stageSprite[1]; } else { stageImage.sprite = stageSprite[2]; } ...
0
8b3b0de056188e790b4e863541c4eab6
219a1a09388338a3ad5221eb8cda628d
Map BOAA Revoke reason to IWS ReasonForDeactivation
class Kubao_Complain extends Base_Widget public function getRevokeReason() { $table_to_process = Base_Widget::getDbTable($this->table_revoke_reason); return $this->db->select($table_to_process,'*'); }
0
060d199d3bd6915a95317277143a4fa4
a03418585143d5b50cc884f1ab6aaa77
Create a new Field Interview Event.
InterviewEvent interviewEvent = new InterviewEvent() .isFixed(UPDATED_IS_FIXED) .title(UPDATED_TITLE) .description(UPDATED_DESCRIPTION); Event event; if (TestUtil.findAll(em, Event.class).isEmpty()) { event = EventResourceIT.createUpdatedEntity(em)...
1
d47bea24209b10f9f52a98c3a676a004
7f5549a1739d4d69b323bcaebb550d0f
只有老师才有权限创建课堂
$urole = session(C('USER_ROLE')); if($urole == null || $urole!=1) $this->error('请老师先登录!',__GROUP__); }
1
1805a04a527c219ca2734263780777c7
9e457d0308e8bec381f8a92fcc32b353
Получение городов по id страны
function RFGetCitysByCid($country, $attr = array()) { $objResponse = new xajaxResponse(); if (!$attr) { $attr = array('name' => 'pf_city', 'class' => 'b-select__select'); } $sAttr = ''; foreach ($attr as $key => $val) { $sAttr .= ' '.$key.'="'.$val.'"'; } if ($country) { ...
1
5ee59b3f5275b48bae34eb86acc86d7e
7114810d55a580718aaada161f8660f9
Description Get bdaddr from Android Property System Returns bdaddr
{ NxtProperties props = NxtRobot.getProperties(); final String btName = props.getStringValue("BluetoothName"); if (SwingUtilities.isEventDispatchThread()) value = askInternal(btName); else { try { EventQueue.invokeAndWait(new Runnable() { public void run...
0
e7185291ef2fa42e7641b514f8e3340f
b6557eff6df6e2139b7892e90aca173d
同步推荐人和被推荐人昵称
if (userId ==null ||userId < 1) { return ""; } String refereeCustomerName = proxyOrderService.getRefereeCustomerName(userId); String refereePublicName = proxyOrderService.getRefereePublicName(userId); return StringUtils.isEmpty(refereeCustomerName) ? refereePublicName...
0
f983c243fa3d6b808b13a5672feae26d
78c03ec959bf29ace87d8fa59895cc8e
Retrieves the evetn handler methods for this sbb component, mapped by event type id
Collection<EventHandler> getEventHandlers();
0
4709e1f7ef88a2734e9b9eac04991494
27e5d72059efad953929ee15fd2880a0
Go to the Next Visited Node
class StateMachine: def requested_next_visited(self): if self.visited_nodes_idx != None and self.visited_nodes_idx < len(self.visited_nodes_list) - 1: self.visited_nodes_idx += 1 return self.visited_nodes_list[self.visited_nodes_idx] else: return None
1
eab55796b41929156c182baf5af6ceb6
467b6e66ca0c8c31daf0ab383f586374
Return true if index is within bounds.
{ return index >= 0 && index <= size; }
1
7b23cc30daf077cdbe466abbe4060d53
714414c9d3feb57cc6170213e4c70b50
Evaluate the sparse hessian of the Lagrangian.
def evaluate_hessian(x): return self.Hx(inputs, x) + self.reg_coeff * x return evaluate_hessian
0
ae16e8c1587ba6f8b55ff316fc5c1373
c469870d42b4b160796baac65cc898f6
Kompatabilnost
default boolean isCompatable( Expression other ) { if( this.getClass() != other.getClass()) { System.out.println(" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! CLASS " + this.getClass() + " " +other.getClass()); return false ; } if( ! this.getTyp...
1