query_id
string
corpus_id
string
query
string
code
string
label
int64
02b47be80c56c66e4f344ac52a8ebd7a
b2d8689b8292275ad8a812a26cb0f326
Creates a new adapter for an object of class '{@link maturityModel.MaturityModel <em>Maturity Model</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
public class MaturityModelAdapterFactory extends AdapterFactoryImpl public Adapter createMaturityModelAdapter() { return null; }
1
aaf9ddf77b9746c7ee5cfb232f8bdb32
a60254571a6583c7f1c030d8b25d928d
Convert this object to an Agent. For Checkpoint-supplied Agents, this is an identity operation, but it allows consistent handling of the built-in types and application-supplied types that will either implement this interface or convert themselves to a built-in type. This removes the requirement to extend Checkpoint typ...
agent_type = data.pop('agent_type', None) native_id = data.pop('native_id', None) if agent_type is None and type(cls) is Agent: raise ValueError('agent_type not provided') return agent_factory(agent_type, native_id, **data)
1
a5974e4098fe3a49de4a2774d6ded131
95e94a748656735030ee032281017419
获得简单的 方便log函数使用的 数组异常信息
class ExceptionExt extends \Exception public function getArgsInfo($args) { $tmpArr = array(); foreach ($args as $value) { if (is_object($value)) { $tmpArr[] = "Object(" . get_class($value) . ")"; } elseif (is_array($value)) { $tmpArr[] = 'Array...
1
d254b32dada2c0d29b9c7157c271edbd
8338edf5a153a5d5fe863933781cf9a9
按时间段获取监控日志统计信息(1:本日;2:本月;3:本年;4:全部)
class StatisticsService extends CommonService function getPeriodStatistics($statistics_id,$equipment_id,$timeFlag) { switch ($timeFlag) { case "month": $result = $this->getPeriodMonth($statistics_id,$equipment_id); break; case "week": $resu...
0
60e3db2c52e3f3d766651062d61495bf
b2425d03fbf4ac84ee2e40bdba626be1
Converts this string into a 64 bit integer, or long.
{ long value = 0; if (string.ReferenceEquals(s, null)) { return value; } if (s.StartsWith("0x", StringComparison.Ordinal)) { value = Convert.ToInt64(s.Substring(2), 16); } else { value = long.Parse(s); } return value; }
1
fff99a57103aecffecaf2f0669774a7a
76850bd8ac0ab6b61bc3c46259aa1ef8
Count ranks and suits.
self.ranks = dict() for crd in self.cards: self.ranks[crd.rank] = self.ranks.get(crd.rank, 0) + 1
1
916b414213761aee21b2c7daae0583fa
a669e767e57d881308c58c0900714a50
Number of tasks in the queue, which are *not* marked as causing any kind of error.
class ExecQueue implements TaskQueue public synchronized int numOutstandingTasks() { return q.size() - numWaitingThreads; }
0
6d691cb0b6a03ff1f0847354aadc2263
05228a2ff5decc1fd941013c629fc1e5
Imposta i dati di intestazione della fattura
if ($this->show_element("header")) { if ($title != "") { $this->html .= "<div class='border-div'>"; $this->html .= " <h3 class='center-text'>" . $title . "</h3>"; $this->html .= "</div>"; $this->html .= "<div class='border-div'>"; ...
1
76bad558f1d1e848a7b8a1a22f5916fc
9c2feee20a3cdd2a5ab3a36f6641293f
MongoDB文件存储服务
client = pymongo.MongoClient(settings['MONGO_HOST'], settings['MONGO_PORT']) self.db = client[settings['MONGO_DB']] self.col = self.db[settings['MONGO_COLNAME']]
0
a5cc5969d7276a6e0ba956bf44f053c6
5c793765fbeba12bcab94b4ec55814c0
The amount of nanoErg fees for minting StableCoins. This includes protocol fees, tx fees, and implementor fees.
&self, amount_to_mint: u64, oracle_box: &ErgUsdOraclePoolBox, transaction_fee: u64, ) -> u64 { let feeless_amount = self.stablecoin_nominal_price(oracle_box) * amount_to_mint; let protocol_fee = feeless_amount * FEE_PERCENT / 100; let implementor_fee = (self.b...
1
5722414d6bb1d897301d1b5a5f48d7d2
61983fbf9353b5bdf2792d5a25f8a71d
Unit test: compute the SHA256 sum of the specified string and compare it to the expected result.
input := []byte("abcdefg") expected := [32]byte{0x7d, 0x1a, 0x54, 0x12, 0x7b, 0x22, 0x25, 0x02, 0xf5, 0xb7, 0x9b, 0x5f, 0xb0, 0x80, 0x30, 0x61, 0x15, 0x2a, 0x44, 0xf9, 0x2b, 0x37, 0xe2, 0x3c, 0x65, 0x27, 0xba, 0xf6, 0x65, 0xd4, 0xda, 0x9a} result := SHA256(input) if result != expected { t.Errorf...
1
6754e815b56e4ad9e0d7d42dbc129673
aab459b66133654d7fb73c7c174d3785
Indent a value by `n` `character`s
output_indent(size_t n_spaces) { if (output_tab_width) { while (n_spaces >= output_tab_width) { putwchar('\t'); n_spaces -= output_tab_width; } } while (n_spaces-- > 0) putwchar(' '); }
1
69c74beb501386e13cd4cb889c2c89c4
1234d82a32a3db6524ed1b0b3cefeb02
Compute the qth percentile of the data along the specified axis.
def quantile(x, q, axis=None, keepdim=False): return _compute_quantile(x, q, axis=axis, keepdim=keepdim, ignore_nan=False)
1
e6f23e7e94ab9f404958c7f8b6ff60f9
7ed67f48454eb0c8a767fc4f808daea7
newNetworkPolicyController creates a controller for Kubernetes Network Policies
name := managed.ControllerName(v1alpha1.NopResourceGroupKind) r := NewReconciler(mgr) return ctrl.NewControllerManagedBy(mgr). Named(name). For(&v1alpha1.NopResource{}). Complete(r) }
0
5849068ad5e4966af0d4101cba60a828
5b218ba2f2368d0d2a0a0706e0b07814
при наэатии на изображение music-block
function nachat() { status = "nachat"; udalenieStartBlock(); sozdanieAbricos(); sozdanieApple(); sozdanieOchkiBlock(); sozdanieOblakoBlock(); sozdanieVorotaBlock(); sozdanieKamenyBlock(); playMusik(); sozdanieTimerBlock(); timerIgra(); pokazatBomba(); }
0
eee5de8276b8ade5cc206dd240b5870a
2a8c0270d7e420339b1857eb5ccd359d
Initialize a dictionary that will contain the metadata.
class DCMetadata: def __init__(self): self.data = []
0
7e21d3904bab4680f04e2e1b6240ee08
3ed541fc111377684787cbe74c3eb1f3
根据棋盘坐标,返回棋子,若没有棋子,则返回null
public class Player public Piece getPieceAtCord(Position pos) { return null; }
1
d5871ab1c259fa92bef00a676d015982
761e4e86040c74a20ab5b0fc8ba21858
对key对应的value 加指定值 返回新值 如果key不存在 认为原来的value为0
public class RedisBaseService public Long incrementForValue(String key, Integer delta){ return redisCacheUtils.incrementForValue(key, delta); }
1
a1224eca242371f18ed343f3144df4ad
2465f2fb7934b2016162811b86366f06
Setup WebRTC events handlers
function seHandlers(_this) { _this.SE.on('SDP', sdp => { _this._setRemoteSDP(sdp); }); _this.SE.on('ICE', ice => { _this.pc.addIceCandidate(new RTCIceCandidate(ice)); }); _this.SE.on('ERROR', err => { console.log('ERROR: ', err); }); }
1
6a6047579fda5a7df03d40d57237042b
f350f3a87796d340918e7d47fdbdd4db
Вернуть поле на котором происходит передвижение объекта
public class Field public Element getElement() { return element; }
0
f406dd908f422844520b4fa35e59ba34
6d4e8dcb7a93f13af754928e6150502b
根据resourceId删除gas_merchant_resource表数据
@Service @Import({ ShellmerchantDataSourceConfig.class }) public class ShellmerchantTestBase public void cleanGasMerchantRoleResource() { GasMerchantRoleResourceDOExample exam = new GasMerchantRoleResourceDOExample(); exam.createCriteria(); gasMerchantRoleResourceDAO.deleteByExample(exam...
0
252358420ec83c9b41257facaeaa3f1e
ea16c8d0e6dd438a4f5354e6b14ed25a
Returns a list with all of the user's wantslists, their name, associated game, and item count
public List<WantVo> findAllwant(Integer userID) throws SQLException;
1
162515f6314b66b36861d1c707f528e7
11ad37ec31c6fb865cf2741be028dc12
Expect the dictionary to contain a given key.
def in_(k, dct): ok_((k in dct), NO_SUCH_KEY_ERROR_TEMPLATE % (k))
1
29ec23b97af4465a1d232dc92bc52805
f3b94ecc05a521547ab452db9f04d256
Talkerが作成したルームを取得
url = 'https://api.chatwork.com/v1/rooms' req = urllib2.Request(url, None, https_header) try: my_rooms = json.loads(urllib2.urlopen(req).read()) except ValueError: sys.stderr.write("JSON encode error.") sys.exit() except TypeError: sys.stderr.write("JSON encode error....
1
ea822bdb9a9948633b5ec885805931ce
3c4d872d441a40970db2839f333fd2cd
Clears the cache for all personas. <p> The {@link com.liferay.portal.kernel.dao.orm.EntityCache} and {@link com.liferay.portal.kernel.dao.orm.FinderCache} are both cleared by this method. </p>
public void clearCache() { if (_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE) { CacheRegistryUtil.clear(DmsUserImpl.class.getName()); } EntityCacheUtil.clearCache(DmsUserImpl.class.getName()); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_ENTITY); FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION...
1
9c7fbab24d044dcf49926118b2604e7e
97ae2e9ee20ecc075e9d9913782c5c30
Sets most suitable Virtual User index by current player index
for i in range(len(self._players_list)): if self._players_list[i].get_name() == "Você": self._main_player_index = i
0
46103933c45e15745954797f66e6615f
41310df9eb549bc82f193e9f2d7c5561
This function unpacks the QMI_CAT_SEND_TR response message to a user-provided response structure.
uint8 *buf, cxm_qmil_qmi_hdr_s *hdr ) { CXM_ASSERT( buf != NULL ); CXM_ASSERT( hdr != NULL ); memscpy(buf, 1, &hdr->msg_type, 1); memscpy(buf + 1, 2, &hdr->txn_id, 2); memscpy(buf + 3, 2, &hdr->msg_id, 2); memscpy(buf + 5, 2, &hdr->msg_len, 2); }
0
f8a5ed16862e3b6fff0843f2ab959cca
a0ee3b5e395ec4412068faf8499e8c6e
Marks a task as done and returns the done message.
public class Parser public String handleDone() throws DukeException, IOException { Task toMark = findTask(); storage.markTask(toMark); return ui.respondToDone(toMark); }
1
11762fb04cbe15457cb793a39d1043cb
caf0f5d56725a06a0011d57ec98311af
Triggers any collected failures.
if rep.longrepr not in self._failed_collection_errors: self._failed_collection_errors[rep.longrepr] = True self.config.hook.pytest_collectreport(report=rep) self._handlefailures(rep)
1
b9794aabdb2dcf9f4869ef80be3c5a5c
43b9ee0baa22789fe1e457010e47a37f
Get an array of log components (i.e. ['qrserver\\d+']) that should be checked, specified using regular expressions. Override this in component-specific test base classes
abstract class SimpleMatcher extends BasicMatcher abstract protected function getNames();
1
d4276a86bd366bdc11be8d76f5c8ac03
4ef3796fcb100a2453a1414ea9309b2b
Extend the canvas of an image. Mirror boundary conditions are applied.
rows = src.shape[0] cols = src.shape[1] dst = np.zeros((rows + 2*bordersize, cols + 2*bordersize), np.uint8) dst[bordersize:bordersize + rows, bordersize:bordersize + cols] = src return dst
0
318aed1162aefc5478b12d47f8bcceca
9a4725efeecd038cbf95b41468b2918d
Validates whether a particular device supports the parameter-shift differentiation method, and returns the correct tape.
if args.lc2f is not None: return "ItF" if args.f2lc and len(args.i) == 1: return "FtIBL" if args.f2lc and len(args.i) == 2: return "FtIBC" return "ex"
0
adaf64d81558a003329bff767794570c
866c6522705bee51ddaa6c70304f2163
donne l'index pour placer une vue entre deux element en fonction de la position du curseur
class Scene extends Model public function getPosition($activite_id, $curent_scene_id) { $position = DB::table('cut') ->select('POSITION_INDEX') ->where('ID_ACTIVITE', '=', $activite_id) ->where('ID_SCENE', '=', $curent_scene_id) ->limit(1) ->get(); return $position[0]->POSITION_INDEX; }
0
eea7643b20276ae82deadf536ee2ff97
13a6b0a4ba53f28275178f6957a730bf
Parses the formated value as float. Needed for values like: x xxx,- / xx,xx / xx'xxx,xx / -xx.xxx,xx
class Tools_Utility public static function floatValue($value) { return floatval(preg_replace('#^([-]*[0-9\.,\' ]+?)((\.|,){1}([0-9-]{1,2}))*$#e', "str_replace(array('.', ',', \"'\", ' '), '', '\\1') . '.\\4'", $value)); }
1
9bad854e7ec6cb8eac1b92959d652d38
c1bbef385df93ab40c739d582017f772
Return the item at location (x,y)
def get(xpos, ypos, display): try: return display[ypos][xpos] except IndexError: pass
1
297d2f4f273f1426dbe7fe0519e34738
edff1be224a222f762de232a6d794a0d
把VDOM 转换成 真实DOM
let {type,props}= vdom; let dom; if(type === REACT_TEXT){ dom = document.createTextNode(props.content); }else if(typeof type === 'function'){ if(type.isReactComponent){ return mountClassComponent(vdom) } return mountFunctionComponent(vdom); }else{ ...
1
dbe1f557032031ebe4725776b3131f2a
53afd1e1ed6f6ed21094daa1754c01e5
Base URL of the Jira instance that's integrated with SignalFx.
class DataSourceParametersJiraArgs: def site_base_url(self) -> pulumi.Input[str]: return pulumi.get(self, "site_base_url")
1
e0cc7d6b4335d1d838c73936d3f1b9a8
1748c33c94cf7ccbe5b1f65e147a2302
Replace fields in message (enclosed in single braces)
{ foreach($mailFields as $mailField) { if (empty($mailMessage->{$mailField->field_name})) continue; $value = $mailMessage->{$mailField->field_name}; if ($mailField->type === 'multi_check' && $mailField->use_field && $value && is_array($value)) { $value = i...
0
e4c5e287e2b66398e4265a0465390a36
5c6498d4a141cb804e5505697649016c
algorytm z wikipedii https://pl.wikipedia.org/wiki/Wielkanoc#Metoda_Meeusa.2FJonesa.2FButchera
def data_Wielkanocy(year): try: year = int(year) except: raise TypeError a = year % 19 b = floor(year/100) c = year % 100 d = floor(b / 4) e = b % 4 f = floor((b+8)/25) g = floor((b - f + 1)/3) h = (19 * a + b - d - g + 15) % 30 i = floor(c/4) k = c % 4 ...
1
e928d1d11505268faa42f70302cfe66b
25e00b043bd3af9597abd58fc531ba64
fbxから特定のAnimationClipの情報を取得する
export class GLTFAsset extends paper.Asset public getAnimationClip(name: string) { if ( !this.config.animations || this.config.animations.length === 0 ) { return null; } const animation = this.config.animations[0] as GLTFAn...
0
df7e6b6827142c19032d832efa929df6
f7afcea87fd4c0566898e87fccf1e850
Verify that a nesting of unordered list, block quote, block quote, with the maximum number of spaces (plus one for the first) allowed, works properly, with no block quote characters on the second line.
def test_nested_three_unordered_max_unordered_max_unordered_max_empty_with_li5(): source_markdown = """ + + + + + item""" expected_tokens = [ "[ulist(1,4):+::8: ]", "[ulist(1,9):+::13: ]", "[ulist(1,14):+::15: ]", "[BLANK(1,15):]", ...
0
4f34b626dd52c24100251ef674804f14
24547146172f25ce3d5ae0e71408ea56
从redis的优先级队列中取一个元素
class RedisQueue: def pop(self): if self.db.llen(REDIS_KEY): return loads(self.db.lpop(REDIS_KEY)) else: return False
0
2d93c07fd77003af540c9b7f2b7ff845
762ae5a31a303d6dac081e2788af3f5c
We're looking for attribute_name="foo". Specifically: Check that the next n chars == attribute_name=" and then, Capture chars in a string until a " appears.
public class CFContentAssist extends CFEContentAssist{ private DefaultAssistAttributeState prepareForValueAssist(IAssistTagState assistState) { String inputText = assistState.getDataSoFar(); int quotes = inputText.lastIndexOf("\""); String valueSoFar = ""; if(quotes != -1) { valueSoFar = inputText.substring(...
0
e2aa3db5c57e6ce2be9a523b4f39aff0
2f1256aa38c6e0379d5f2d66e2788b92
fl_set_object_lcol(ptr_flobject, colr) Defines the label color of a flobject.
_fl_set_object_lstyle = library.cfuncproto( library.load_so_libforms(), "fl_set_object_lstyle", \ None, [cty.POINTER(xfdata.FL_OBJECT), cty.c_int], \ """void fl_set_object_lstyle(FL_OBJECT * ob, int lstyle) """) library.check_if_flinitialized() library.verify_flobjectptr_type(ptr_flo...
0
461e62ac5d49a6f7b9ed885ae7519b42
74d69140cd9f27e59f40a1280aade13a
#694. Number of Distinct Islands
func NumIslands(grid [][]byte) (k int) { for i, row := range grid { for j, block := range row { if block == 1 { k++ dfs200(i, j, grid) } } } return }
0
2b926c2eca3cbf90a8cf48df6fa128b7
3198c588954a52becd522d1302c6768b
获取预约条数
namespace DAL public class ReserveInfoDal public int GetReserveCount() { string sql = @"select count(*) from ReserveInfo"; int r = (int)SqlHelper.ExecuteScalar(sql, CommandType.Text); return r; }
1
87d59b6d01d457704d9a06388f3edc5d
aab76eb91e59b2e0842daab51f5563e5
Inicializa a estrutura apontando para a primeira caixa. Requer o numero de bolas como parametro da primeira caixa.
Bagagem::Bagagem(int numero) { this->numero = numero; }
0
b43eb4c1a56750ffa96960f5b1d25600
a9975ae44ba55eb3006ae3c8ba89b840
Returns the meta object for the container reference '{@link reqtify.Section#getDocument <em>Document</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getDocumentRoot_Container();
0
ac35b78c531be6ecfda39a6d62dc33c7
75045c2eb19a976beb821a60037d6ffb
Reverse point.
class PolygonA extends RObject implements RapportDefaults public void Reverse() { int n = v.length; Pointd[] u = new Pointd[n]; System.arraycopy( v, 0, u, 0, nv ); for (int i = 0; i < nv; i++) v[i] = u[nv - i - 1]; }
1
776fba5cbe4f594fca89b5ca6f3fb5f8
28164f1766742b4560f568eec31af301
sends the series of startup commands found in startup_sequence to the display
static void tftBootUpSequence(void) { PINS_write(RSTPIN, 0); while (counter++ != 1000) { ; } counter = 0; PINS_write(RSTPIN, 1); writecommand(&swreset_cmd); while (counter++ != 1000) { ; } counter = 0; writecommand(&setc_cmd); writedata(setc_data, 3); wr...
1
d9cfc0b9375c1e876c5275429e7c0505
7c29049c2ecca413f2ad0b1d618e7701
read all pending responses from serial port
public class SerialCommunicator implements SerialPortEventListener{ @Override public void serialEvent(SerialPortEvent arg0) { if (arg0.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { String next; while ((next = CommUtils.readLineFromCommUntil...
1
6294e5b728a515ac6c8c64b3e6e5ff78
150829e9b396bf077609796dd2fc7ec0
Returns Wiki Pages from given project and space.
public class XWikiCachedConnection extends AbstractXWikiConnection implements Serializable public Collection<IXWikiPage> getPages(String spaceKey) throws XWikiConnectionException { assertNotDisposed(); Collection<IXWikiPage> result = new ArrayList<IXWikiPage>(); try { List<P...
1
d040309d4deb9f3bcee81ac08923c0c7
32b0c2833e6b10bd6cac6bd0dba28bd0
把T转换成R
R transform(T t);
1
adb4737c6a7e56efe9918f65e7f87089
42d2382ee08d3fcbea76f29074f00b66
将三个byte数组拼接成一个byte数组
namespace CoiniumServ.Utils.Helpers public static class ArrayHelpers public static byte[] Combine(byte[] first, byte[] second, byte[] third) { var ret = new byte[first.Length + second.Length + third.Length]; Buffer.BlockCopy(first, 0, ret, 0, first.Length); Buffer.BlockCo...
1
5b6f95e0a31aede941c6e2e27de4a239
ce72db1a7ad138285cc3e64505d6cb3d
Gets the languageId property value. The language culture string. Read-only.
namespace Innovator.Client.Model IProperty_Text LanguageCodeFilter();
0
faaee0e937a966cc6f45f37b640333cb
5fbf0d54988a636b5cafba109391f24a
使用File提供的函数获取当前路径
String path = ""; File f = new File(""); try { path = f.getCanonicalPath(); } catch (IOException e) { } return path; }
1
6d52be07a9df3e44a14d8d922444c706
af5b31ceaee167ade574e9dbb10596af
tkinter GUI: Prompts the User to choose one/some Files Returns a list of all file-paths
def choose_file(): import tkinter from tkinter import filedialog root_window = tkinter.Tk() root_window.withdraw() return filedialog.askopenfilename()
0
ab176506041fcd4c580afbeef47774f4
a0a99abc423331bd232606eb92332f64
Initializes the console, the pause overlay, and the soundbar.
function initialize() { updateTimerDisplay(); updateProgressBar(); clearInterval(time_update_interval); time_update_interval = setInterval(function () { updateTimerDisplay(); updateProgressBar(); }, 1000); $('#volume-input').val(Math.round(player.getVolume())); }
0
f7360edec68cf03fb714d719b7ae3b82
1bf7e54fdfdc5facaeb6a996afac7594
根据游戏类型id和平台id分页查询游戏
namespace Game.Facade public class PlatformFacade public PagerSet GetGameKindItemList( int pageIndex, int pageSize, string condition, string orderby ) { return aidePlatformData.GetGameKindItemList( pageIndex, pageSize, condition, orderby ); }
0
63d851f2e17a3b8d93fff8c28741c831
c77b069fca31f3a10f1e0157ee7d92fe
Streams batches of examples from tfds, with pure-python preprocessing.
class DatasetTFReader(DatasetReader): def readTFExamples(self, tfrecordsFile, shuffle=True): feature = {constants.DatasetFeatures.image: tf.FixedLenFeature([], tf.string), constants.DatasetFeatures.label: tf.FixedLenFeature([], tf.int64)} filenameQueue = tf.train.string_input_producer...
0
562374cbd7fa834ef9635eb210e881a2
ca7b9e4e801f0c0650ccc754f63098ff
员工登陆页面
public ActionResult EmployeeLogin(string returnUrl) { ViewBag.ReturnUrl = returnUrl; return View(); }
1
bba55d951cffca835ba20b3adf063193
00a583b9ec7beaa5054246adb3ac94c0
Perform RayTrace to check if the player is close to a socket.
{ Ray ray = new Ray(transform.position, transform.forward); RaycastHit hit; if (Physics.Raycast(ray, out hit, frameDistance, CollisionMask)) { hitDistance = hit.distance; return true; } hitDistance = 0; return false; }
1
645f81773031a86c523258acd19d25e8
f1db61bfc5fa35995686c122a1bae18d
展开设计视图
class Bargain extends BaseDiyView public function design() { return $this->fetch("bargain/design.html"); }
1
fd4936924aedad31652fe8d84efd243c
5a897f75e7155463bdb7136386851004
当前Android系统版本是否在( IceCreamSandwich) Android4.0或以上
public class AppUtils public static boolean isIceScreamSandwich() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH; }
1
d659c0614b0710964032526b3ea23fe8
5f64f9d95380f62eecb0a7c3ee82b1a5
Set wind speed in km/h
class WindSpeed implements ValueInterface public function setKilometerPerHour($kilometerPerHour) { return $this->set($kilometerPerHour); }
1
f9579d5d55a324f9a9d73f26df610e22
221ba64ec8f8143e96dc1e337aa628bf
Удаление пользователя по порядковому номеру из списка пользователя сессии
class GameRoomUser UserInfo &BanUser(int OrderNum) { Users.erase(OrderNum); }
1
6e70c1d2271a059ce20492305aa44eda
f68510522a8060732320f84ac0fc99a9
Inception block with 3d Convolutions, inspired by Fig6 of the original inception paper.
class FactorInceptionC(nn.Module): def __init__(self, dim_in, dim_1, dims_3, dims_5, dim_pool): super().__init__() self.redu1 = nn.Conv2d(dim_in, dim_1, kernel_size=1, stride=1) self.redu3 = nn.Conv2d(dim_in, dims_3[0], kernel_size=1, stride=1) self.conv1 = nn.Conv2d(dims_3[0], dims_3[1...
0
99ccebbb22230793328ae11776919634
b5d83f989ca631c3fa2e8a781e451ba2
Not implemented, do not use!
void MeshGeometry::getSurfacePoint(const RayIntersection &intersection, SurfacePoint &surface) const { assert(false); }
1
36045059b7bc9c3ee7101db6cd69cf55
a0974bda78c98a424c2fb29c5ab38ccf
<para> Starts the case execution identified by the given id manually. Performs the transition from state <code>ENABLED</code> to state <code>ACTIVE</code>. </para> <para> According to CMMN 1.0 specification, the state <code>ACTIVE</code> means that the <seealso cref="Stage" /> or <seealso cref="ITask" /> related to the...
namespace ESS.FW.Bpm.Engine void ManuallyStartCaseExecution(string caseExecutionId);
1
b093eed0c7348d2c679f3387fbfc21bc
1eca90591597f12850d10d66d6cc3abe
Create an Access Control List.
static struct access_list * access_list_new(void) { return (struct access_list *) XCALLOC(MTYPE_ACCESS_LIST, sizeof(struct access_list)); }
1
c06fa6c87f9c61b16925871c5d4de459
68b7fe3abcd77b93e75fe90d74a74efb
그리드 일자 문자열 가져오기
return when(Locale.getDefault().language) { Locale.KOREA.language, Locale.KOREAN.language -> { "$year${context.getString(R.string.dialog_add_plan_date_year)}" + " " + "$month${context.getString(R.string.dialog_add_plan_date_month)}" ...
0
f0d8cb0ca47838333fcb71e761ce44a6
a33c48d653d4a25ddf9b41c3b25a233e
Deactivates a Package so its plugins are not considered when searching for compatible plugins for a Host.
PluginManagerResponse deactivatePlugin( GAVCoordinate gav );
1
cdc52bbe782c3c0eedaa11f1a0e41031
1dde2544bbd2d017629b085aa73c97c1
Enable QA fields
namespace NewUI public partial class IDDAcquireCalibration : Form private void FieldFiller () { QCTestsCheckBox.Checked = ah.ap.qc_tests; PrintResultsCheckBox.Checked = ah.ap.print; CommentAtEndCheckBox.Checked = ah.ap.ending_comment; NumCyclesTextBox.Value = ...
0
220267a048853c3c1bbc456b8f51390d
1cb1fdd7525924d8586714466bdddd40
python port for '>>>'(right shift with padding)
def rshift(val, n): return val>>n if val >= 0 else (val+0x100000000)>>n
1
5fc33cc8b78caa814046a18e2f815c09
9b770d4add0879b671161b0383fd0618
是否可以撤消
namespace ABB.AC800PEC.DbConfigTool.DbAccess.Implementations public class UnitOfWork : IUnitOfWork public bool CanRevert() { return this.context.CanRevert(); }
1
b04bd8f615bfb35618e331422ba3b992
b39590c116d9c149446c8c6e36190f5a
Return a Cursor over the list of all wastes in the database
class SQLiteDatabase(FilePath): def __iter__(self): new_cursor = self.own_connection.cursor() new_cursor.execute('SELECT * from "%s";' % self.main_table) return new_cursor
1
9ba764029a02639b7639d89b591db647
1f9f57d4d54d470e81e92fd79bf3cddf
根据id取得商圈名称
String getArea(String id);
0
d17d2b074300d370d34e98024a8928ad
fa269d418be446870348fbc6931aeb58
根据name、namespace修改deployment的副本数 https://blog.csdn.net/dfBeautifulLive/article/details/103735048?spm=1001.2014.3001.5501
deployment.spec.template.spec.containers[0].image = IMAGE_NAME api_response = api_instance.patch_namespaced_deployment(name=DEPLOYMENT_NAME, namespace=NAMESPACE, body=deployment) print("Deployment updated. status='%s'" % str(api_response.status))
0
80e39ea938da8431bd26e909bee5b2cc
fe9af01a60a6f61e81b8879144c842bf
If no packages are supplied, no duplicates should be found.
def test_empty_tcp_wrappers(): w = TcpWrappersFacts(daemon_lists=[]) p = ["openssh", "systemd", "pam"] d = [("openssh", ["sshd"])] packages = config_affects_daemons(w, p, d) assert not packages
1
984bc341f4ab2ae039cd90a48f0bc0c3
309a108b76d9cf6695823f88c4bbc108
Devuelve el ancho de un Sprite
length_t SpriteGetWidth(gui_img_t idSprite) { return GetW(GetSpriteSheet(idSprite)); }
1
91bfcf2d335dd058ab6ee4d9e859a167
74aa479135be7b7a33edc47776778147
Pushes the presence change to the Discord RPC server.
@DiskordDsl public interface EventDispatcher<T> @DiskordDsl public fun onPresenceUpdate(handler: suspend (PresenceUpdate) -> T)
0
82f9bc9ab3684a07ef0b9ae5a0bf3281
6bd741ae397c06b1099a412e89a67905
Регистрирует тип цели для комментариев в базе
{ Dictionary<string, string> mappings = new Dictionary<string, string>() { { typeof( UserDirectories ).ToString(), "Справочник" }, { typeof( System.Double ).ToString(), "Число" }, { typeof( System.String ).ToString(), "Строка" }, ...
1
ca7597f547fce7d53fe90f0e58f19219
ec2788bc7571006fbc7756e5e5471042
State only allows 2 capital letters or it throws a StateError
{ if(locationState.length() >=2 && locationState.length()<=25 && Pattern.matches("[a-zA-Z0-9\\s]+",locationState)) this.locationState = locationState; }
0
4a7d7ddf555755cbf447f8463245d471
177a54b734bd03f3617fdb0d99faf815
Returns the cells which make up the column.
public class Board public SetOfCells getColumn(int columnNumber) { return columns[columnNumber]; }
1
36272307d561985696ea1f7d51077125
c3e03c948fdd0b257038e0e0b4d2368a
Sets the parameter with the given index to the value
namespace filewriter void Frame::set_parameter(const std::string& index, size_t parameter) { parameters_[index] = parameter; }
1
d0de2290d02c3ee205c75ab631212f68
1a90a703443f3da87692614c0f129fda
Se obtienen la lista de Banners, que serviran para el HEADER, de la base de datos. Se ordenan de manera aleatoria y se les da formato con HTML.
class Init extends Extras{ function getBanners($lang){ $extras = new Extras; $sentencia = " SELECT RAND() as aleatorio, t1.id,t1.nombre FROM images AS t1 WHERE (t1.proyecto='0' AND t1.idioma='".$lang."') AND t1.id < (SELECT ABS( FLOOR( MAX( t1.id ) / RAND( CAST( SECOND( NOW(...
1
4e528d3e2612cebed9b0c419d568b450
9b9733af15cd0d2934ee18db7fe20c44
根据奇偶数返回数字
if (!TextUtils.isEmpty(even) && isNumber(even)) { int i = Integer.parseInt(even); if (i % 2 == 0) { return 2; } else { return 1; } } else { return 0; } }
1
5a6ac0b5a3aaa1b8229505d3569587d3
88f676bc513a93fd9301adbcc0715bb4
Closes the console correctly
void process::closeConsole(void) { fclose((FILE*)stdin); fclose((FILE*)stdout); FreeConsole(); PostMessage(GetConsoleWindow(), WM_CLOSE, 0, 0); }
1
1415f58f4eeb9ec339559c3e92ae7280
d5952d028b34097d7420e7607b446497
处理网络通讯异常 处理策略:1、记录原始信息 2、替换原始异常为“网络故障”异常并抛出。
Object handleException(Exception e, HttpServletRequest request) { if (e instanceof NettyException) { log.error("url {}, nettymsg {}", request.getRequestURL(), e.getMessage()); } log.error("url {}, msg {}", request.getRequestURL(), e.getMessage()); return new Result(Status...
0
14d3762b87e5a883c8b070b405d4316d
7dd1967323e7afb3e445f1ade0e8dc8f
Specifies which storage device contains the image to be checked.
class StorageMediaFrontend(frontend.Frontend): def SourceIsStorageMediaImage(self): return self._scan_context.source_type in [ self._scan_context.SOURCE_TYPE_STORAGE_MEDIA_DEVICE, self._scan_context.SOURCE_TYPE_STORAGE_MEDIA_IMAGE]
0
0ed9dbcb0c82910ef7ec2f3b15427557
1e32837cd82d45fed912e848f6b4aba1
Interrupt Handler for TA1 (Queue ADC Timer)
void Timer0A_Handler(void){ TIMER0_ICR_R = TIMER_ICR_TATOCINT; Current_Time = TIMER1_TAILR_R; GPIO_PORTF2 = 0x04; ADCvalue = ADC0_InSeq3(); Elapsed_Time = Prev_Time - Current_Time; Prev_Time = Current_Time; GPIO_PORTF2 = 0x00; if(Buffer_Counter <= 1000){ if(Buffer_Counter == 1000){ ...
0
cc00e7975c5f7374e9a64fb40ba59036
ad24bbe8cfda37f3324b65adead0ccce
填充字节数组
{ for (int i = start; i < start + 8; i++) { b[i] = (byte)num; num >>= 8; } }
1
4a91f4a91e00d6e9523b95f0394b53d7
1831a77375bbcdde8760e6ac2a4024b8
@brief Initialization of the bleDrv module
{ SHCI_C2_Ble_Init_Cmd_Packet_t ble_init_cmd_packet = { {{0,0,0}}, {0, 0, CFG_BLE_NUM_GATT_ATTRIBUTES, CFG_BLE_NUM_GATT_SERVICES, CFG_BLE_ATT_VALUE_ARRAY_SIZE, CFG_BLE_NUM_LINK, CFG_BLE_DATA_...
1
2024888278c8d1efe3a661c2917491ec
a57b6dcd28b5d6af55928e1e1e4a82ec
Add naive sensor dropout to perceptual sensor, such as RGBD and LiDAR scan
skip_conn = tf.identity(inputs, name='identity') inputs = tf.layers.conv3d(inputs, filters=16, kernel_size=1, padding='same', activation=tf.nn.relu, name='sa_conv_layer1') inputs = tf.layers.conv3d(inputs, filters=1, kernel_size=1, padding='same', activation=tf.nn.sigmoid, ...
0
1ae3da7047aaac2560b8a4f5bd904f11
032c74fd6c4703825f3fba82c442e2b7
If possible on the current instance, tries to flush the stream and returns whether or not it was successful
bool ADTFile::flush() { if (!fs.is_open()) { return false; } return !fs.flush().fail(); }
1
b231ba934514c89716bc79719da108a3
36ca2fab1e658a6c34da4b1467439483
Returns selected columns.
abstract class ReadOnlyMapperAbstract implements HydratorInterface, DbAdapterAwareInterface, DbSchemaAwareInterface, ReadOnlyMapperInterface, ReadListMapperInterface protected function getSelectColumns( $columns = null ) { if ( null === $column...
1
10d17a1fd2a5fe298b1688c9c7dc1d4e
e5030dab6c594fee1ea0614d064e40a6
Method to fetch the token entity
@Service public class AuthServiceImpl implements AuthService private JwtTokenEntity findJwtTokenById(String tokenId) { return jwtTokenRepo.findById(tokenId).orElseThrow( () -> new TokenNotFoundException("tokenId : " + tokenId)); }
1
e1e911d34b94cae7a7638e38305bf651
d6c969d5e651466ba8e9ba8bdba4c791
Проверяет, был ли уже установлен плагин
function plugin_getstate ($pcn) { hook_trigger ('plugin_getstate_1'); $where = array ( 'pcn' => $pcn ); $ret = $GLOBALS['db']->has ('plugins', $where); return $ret; }
1
0619c054d9d978999352c2fdc5897521
49f14236fcc718860bdd883019cdf1ce
Get or set validation for the "iat" (Issued At) Claim
{ echo "\n**Now testing Tests\Unit\Blogbackend\JWTValidation\IatClaimTest**"; $time = time(); config::set('lasallesoftware-library.lasalle_jwt_iat_claim_valid_for_how_many_seconds', 120); $token = (new Builder()) ->issuedBy('https://lasallesoftware.ca') ...
1
d8989dfdb9723255e535e6b13da7cfe7
58d3eea46f6ea376c4c3460dc25b7e5e
根据公司id获取维修公司的维修管理员(客服)
class WXuserModel extends WeixinModel public function getManagerByCompid($compid){ $table = [ 'fx_weixin_user' => 'wu', 'fx_manager_wxuser_temp' => 'mwt', ]; $where = [ 'mwt.cm_id' => $compid, 'mwt.wu_id = wu.id', ]; $field = [ ...
1