query_id
string
corpus_id
string
query
string
code
string
label
int64
3aaa8133228c8aa9150b6bd7a97da233
653a7a5927c84bfea5de94fc965d6776
Plots MACD object
def ax_draw_macd2(axes, ref, kdata, n1=12, n2=26, n3=9): macd = MACD(CLOSE(kdata), n1, n2, n3) bmacd, fmacd, smacd = macd.get_result(0), macd.get_result(1), macd.get_result(2) text = 'MACD(%s,%s,%s) DIF:%.2f, DEA:%.2f, BAR:%.2f' % ( n1, n2, n3, fmacd[-1], smacd[-1], bmacd[-1] ) axes.text( ...
1
b01c0a2654b6befca5902fa3da346ba8
3c12eccc18c7e6b14c32af8e9358b4ba
Starts the pipe server on a particular name.
namespace ClientServerUsingNamedPipes.Server internal class InternalPipeServer : ICommunicationServer public void Start() { try { _pipeServer.BeginWaitForConnection(WaitForConnectionCallBack, null); } catch (Exception ex) { ...
0
d283c15d68004ffd75b236e141673583
aba5875b123d1314e468ee646f87200d
任意选一个文件,返回文件全目录
namespace WpfTestSunTai.Services.Helpers public class FileHelper public static IEnumerable<String> DialogSelectDirGetFiles() { IEnumerable<string> result = new List<string>(); FolderBrowserDialog fb = new FolderBrowserDialog(); var re = fb.ShowDialog(); if (re...
0
15d117adb68405abe681b950f4e77e4b
45b257060fe19e4373b799db12389786
Revert the CodeIgniter Patch
$current_version = get_option( 'laterpay_version' ); if ( version_compare( $current_version, '0.9.11', '<' ) ) { return; } $old_to_new_option_pair_array = array( 'laterpay_api_sandbox_url' => 'laterpay_sandbox_backend_api_url', 'laterpay_api_sandb...
0
609dedfa4ba2ddb6cf1807638e54a15f
6eb98de8874b87fbd3d422b92a02e1dd
增加当前行的缩进
public class Tiler1 implements Serializable protected void pushIndent() { sIndent += " "; }
1
ba636ff8ee14ab7337eabd4a9171df23
b6aa4d6263a0421d7478a0be49fc5de6
if there is enough scores for next difficulty then we increase it
{ if (mDifficulty >= HARD) { mDifficulty = EASY; } else { mDifficulty++; } }
0
f26b593d400c0c2763c978cd61f4bb3a
c7b247396169b326faf460bf6d054faf
UART1 byte received interrupt handler
UART1IntHandler(void) { uint32_t ui32Status; uint32_t ui32Mode; ui32Status = ROM_UARTIntStatus(UART1_BASE, 1); ROM_UARTIntClear(UART1_BASE, ui32Status); ui32Mode = ROM_uDMAChannelModeGet(UDMA_CHANNEL_UART1RX | UDMA_PRI_SELECT); if(ui32Mode == UDMA_MODE_STOP) { g_ui32RxBufACount++; ...
1
44c09771548494e45179724f60391f66
58a20354e17697563072cdf916891e81
Converts a jOOQ POJO announcement into the announcement class defined in the API package.
AnnounceVO vo = new AnnounceVO(); vo.setAnnoId(notice.getNoticeId()); vo.setTitle(notice.getNoticeTitle()); vo.setContent(notice.getNoticeContent()); vo.setTime(notice.getCreateTime()); return vo; }
1
cd487d3313ddb86a6d2a3dc597ddd0c9
0b2d2c7c4586a2ed9d8698f7afca674e
The network on which to allocate the Loadbalancer's address. A tenant can only create Loadbalancers on networks authorized by policy (e.g. networks that belong to them or networks that are shared). Changing this creates a new loadbalancer. It is available only for Octavia.
class GetOrganizationResult: def authorized_network(self) -> str: return pulumi.get(self, "authorized_network")
1
5e3be1ff4b1ec0cb1af91438f9cfec28
1052b02a751d0a9059d7638dbd0af089
获取波浪垂直振幅比率
public class GeoSceneManager extends com.earthview.world.graphic.OctreeSceneManager public double getWaveScale() { double returnValue = getWaveScale_void(this.nativeObject.pointer); return returnValue; }
1
d48fda9a4f4a8931ea91fe8baa6adbcb
9a1503207835ed07a00f2050c4460707
set whether or not in back stack ,often called by framework
public boolean backStack();
0
c9e08a80d1eb14adc1e181c351448a9a
a5f96982322d05211f63fcfb4e3a09e4
获取一条有效地且在时间范围内的记录
@Dao interface AppHistoryDao @Query("SELECT * FROM AppHistoryRaw WHERE appId == (:appId) AND timestamp BETWEEN (:startTime) AND (:endTime) ORDER BY rowId DESC LIMIT 1") fun getLatestRecordBetween(appId: Int, startTime: Long, endTime: Long): AppHistoryRaw
1
fd647f37a007dcde705d01039ddf31ac
be3a9a45d81ca1ec5cbf594c90d0bfe9
从jks密钥库容器中的密钥对中读取证书公钥
public class RsaUtil public static PublicKey getPublicKeyFromPkcs12(InputStream inputStream, String password) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException { return getCertificateFromPkcs12(inputStream, password).getPublicKey(); }
0
60dab59a2ee7f7673b0b0d9a254e6a87
6270b1f171dd25e2e45538ef95909f7e
Uploads the specified Attachment for the specified Requirement Specification
@Produces(MediaType.TEXT_PLAIN) @Consumes(MediaType.TEXT_PLAIN) public Response uploadSpecFile( String fileContents, @PathParam("specId") String specId) { System.out.println("SpecID is " + specId); LOG.info("Received Content: " + fileContents); String uploaded...
1
d8b238bbdf3f55ec9f9eb0d7f52446ba
36b2088710ab4f43f39b782980d14817
Get the [guar_first_name] column value.
class Payslip implements ModelInterface, ArrayAccess, JsonSerializable public function getFirstName() { return $this->get('firstName'); }
0
8502364ce9f982b0382932ef1412e73c
506ab13819bef5e2094c36486563c0fa
Constructs a 3-component natural dimension
__vector__::__vector__( double x, double y, double z ) { coords.push_back(x); coords.push_back(y); coords.push_back(z); dim = 3; }
1
1a5eaa347b0887937ad848fc5317f00d
b767f61be931f0a7af91d3552a5e4992
上报服务器设备列表
void onSearchDeviceList(Context context,Map<String, String> params, HttpResponseListener callBack);
0
5481696aa8cb7f15744dba2756037c01
2e77da5e02073b63321990f1beee54c8
The Schematic Layers resource represents all the schematic layers under a schematic service published by ArcGIS Server. It is returned as an array of Schematic Layer resources by the REST API.
{ $this->initialized['contentOrLayerSchemaIds'] = true; $this->contentOrLayerSchemaIds = $contentOrLayerSchemaIds; return $this; }
0
8b577aba51323c3b7423cc8a0524f2b1
a4386684ac1b250efbe3c2a965fbae75
Return a list of posts.
def get_posts(): return '%s' % posts
0
1e5dc294fc31a1d4ad2f922348eec41e
34c4cf58e86e6ad7adb57fad3105d2a3
Get the PGOffline agent payment data
class BraintreePaymentCheckoutComponent extends OnsitePaymentCheckoutComponent public function getData(Order $order) { $this->getGateway($order); if (!$this->isBraintree) { return parent::getData($order); } else { return []; } }
0
27ed4426c9d68ab2964fcb5d210ea1b1
ba64af3453b34322dd85ab1aef4b30ea
Wrapper that handles well-known errors.
err: CibouletteError, ) -> (hyper::StatusCode, CibouletteErrorObj<'a>) { match err { CibouletteError::SerdeJson(err) => super::ill_requests::handle_bad_json(err), CibouletteError::UuidError(err) => super::ill_requests::handle_bad_uuid(err), CibouletteError::ParseIntError(err) => super::i...
1
b0e97f86c9696239fd05703c021eff6f
57211ac98306dddead8a172ec067e5e6
Tests implemented algorithms against the brute force algorithm to ensure correct implementation.
List<Edge[]> arrays, Edge[] expectedOutput ) { CollectionAssert.AreEquivalent( expectedOutput, MultipleArrays.BruteForce( arrays ), "Test failed when using BruteForce" ); CollectionAssert.AreEquivalent( expectedOutput, MultipleArrays.CombineAndSort( arrays ), "...
1
3afb3dbc486ba394558770fbf2e0495e
ac51f52346fff548d5f076c955e3fb4f
Edit the author with the Id passed
namespace TP_Bibliotheque.Controllers public class AuthorController : Controller public ActionResult Edit(int id) { AuthorDAL authorDAL = new AuthorDAL((List<Author>)Session["Authors"]); Author author = authorDAL.Read(id); var model = new EditAuthorModelView(); ...
1
6f734e5ca31a3582eefc8a656063f056
ee90d8a012ab0d9ec99975b1f1cada21
Compute the internet checksum of the segment given as argument. Consult lecture 3 for details. Our bTCP implementation always has an even number of bytes in a segment. Remember that, when computing the checksum value before *sending* the segment, the checksum field in the header should be set to 0x0000, and then the re...
class TCPSegment{ static short calculateChecksum(int source, int dest, int length, byte[] pck){ int calcCs = 0; byte c1 = pck[CHECKSUM_OFFSET]; byte c2 = pck[CHECKSUM_OFFSET + 1]; pck[CHECKSUM_OFFSET] = 0; pck[CHECKSUM_OFFSET + 1] = 0; int srcLE = ntohl(source); calcCs += (srcLE>>16) & 0xffff; calcCs += (...
1
1f4ad3c4f3b93506ff56b09a613f290b
9dde646cb23fdb1f566c646c23a3d7db
返回微秒级日期 如2017/03/01 14:00:16 345541
func TestDateFormat(t *testing.T) { t.Log(DateFormat(1511765558806649344, time.Nanosecond, "yyyy/MM/dd HH:mm:ss")) }
0
e4e198d8a3b8cc1f19802120abfd7758
389bb22730d2819845e7833e7ca96ed3
Get last block from Minter Node API
return this.apiService.get('last_blocks', { num: 1 }).pipe(map(blocks => { return { seq: blocks.blocks[0].header.seq, timestamp: blocks.blocks[0].header.timestamp, hash: blocks.blocks[0].header.block_hash, }; })); }
1
36a77a6f9cd6fab1fa375b801ae5defe
ebaa947cc21a3536cbca90199257eaad
构造函数,接收udi和pagination两参数
class Pagitor public function __construct($nowPage, $totalNumber) { $this->setNowPage($page); $this->setTotalNumber($totalNumber); $this->setParams($_GET); $this->setUrl(); }
0
56d5cc95ad9a18793ed600639ddeb1db
324409f29756bc8372399bbbc6144144
Replace an existing container label.
lease = kwargs.pop('lease', None) try: kwargs['source_lease_id'] = lease.id except AttributeError: kwargs['source_lease_id'] = lease try: renamed_container = ContainerClient( f"{self.scheme}://{self.primary_hostname}", container_name=ne...
0
f36fbd2a3678e1c3390be7ca0ba2bb07
25425c56646b6085c86d03852f8d2e4c
Get the chromosome sizes for a fasta file
def loadChrSizes(arg, converter=None): filename = '' if type(arg)==str: filename = arg else: filename = arg.chrSizes iFile = open(filename) chrSizes = {} for line in iFile: line = line.replace('\t', ' ') chrom,size = line.strip().split() if converter: ...
0
eb26f6a5080658326e667214ec6d07ca
31fdf94dc3cbc415751e86dda8482274
Returns the meta object for the containment reference '{@link ExternalServiceLayerPSM.JavaOutputDataModel#getHasOutputRepresentation <em>Has Output Representation</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getRESTfulServicePSM_HasJavaRModel();
0
a51fbfaa606d86dbb9e3eb949e9d9c9b
3a294a3a8610713ae3c2dbf93985e1da
调用scrapy 提供的 json exporter 导出json文件
class JsonExporterPipeline(object): # 调用scrapy提供的json exporter导出json文件 def process_item(self, item, spider): self.exporter.export_item(item) return item
1
be5dcfbbe69d8e2567e303655b7cea3c
4c54aed5e2236d90d5a0ecc0173d3cee
<p> Create a workload share. </p> <p> The owner of a workload can share it with other Amazon Web Services accounts and users in the same Amazon Web Services Region. Shared access to a workload is not removed until the workload invitation is deleted. </p> <p> If you share a workload with an organization or OU, all accou...
namespace Amazon.Omics public partial class AmazonOmicsClient : AmazonServiceClient, IAmazonOmics public virtual GetShareResponse GetShare(GetShareRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetShareRequestMarshaller.Instance; options...
0
67249ab4c8f65bd45043238be4eab022
f44f968093651998239f83a9e9d4995b
Offsets a metric or wildcard seriesList by subtracting the minimum value in the series from each datapoint.<para/> Useful to compare different series where the values in each series may be higher or lower on average but you’re only interested in the relative difference.
namespace NinjaTrader.MarketAnalyzer public partial class Column : ColumnBase [WizardCondition("Indicator")] public MIN MIN(int period) { return _indicator.MIN(Input, period); }
0
c82fc1ad5f4ece0d48bd7f5efa048fce
a020c0c0529cc1d486b1572e5af95b2e
TimelineTrack is a single track in a Timeline. It consists of a list of TimedEvents and a name. Length is automatically the location of the last TimedEvent. To extend the Timeline past that, add an EmptyTimedEvent (which doesn't exist :-/).
function TATimeline(name) { this.name = name; this.steps = []; this.curPos = 0; this.debug = false; this.setDebug = function(dbg) { this.debug = dbg; }; this.getDescriber = function() { return new TATimelineDescriber(); }; t...
0
3e8adf0a8d3c3bae25d3ed5ae6e58fcf
589d8e36193112b3f7369d516c6e4eff
加载全部分页角色
function loadAllRoles(id) { $.ajax({ type: "get", url: baseUrl + "/group/queryGroupByRoleId/" + id, data: null, dataType: "json", async: true, cache: false, success: function (data) { if (data != null && data != '') { var html = '';...
0
d397b3acceff26451588bf7b27710922
5cfe20ec3543c0e434f648472b049cae
异步添加关注
await ctx.config.mysql(user.followUser(ctx.request.body)).then((res) => { if(res.affectedRows == 1) { ctx.body = { code: 0, msg: '关注成功' } } else { ctx.body = { code: 1, msg: '系统异常,稍后重试' } } }).catch((err)=> { console...
1
138cf6940d515e85c9e09dedd76180f4
6734488bc2b316a18773435730514cf9
Data provider of paths matching existing asset
{ return [ ['file.json', 'file.json'], ['.json', '.json'], ['', ''] ]; }
0
dd3ca18f736e17a8023c685ab9f3c3c7
6121e41ed6e3b7391b46a62da6097d64
通过最大最小经纬度得到全部经纬度
class GaodeDiv(object): def lng_all(self): lng_nw = float(self.loc_all.split(',')[0]) lng_se = float(self.loc_all.split(',')[2]) lng_list = [lng_nw] for i in range(1, int((lng_se - lng_nw + 0.0001)/self.bias)): lng_list.append(lng_nw + self.bias*i) lng_list.append(lng...
1
de122d08fe4d88bb77f8fb5b39ee964f
4eaaa6fca91d2f009d2bcb84351a5501
{REAL_64}.truncated_to_integer
EIF_INTEGER_32 F1495_5834 (EIF_REFERENCE Current) { GTCX EIF_REAL_64 tr8_1; EIF_INTEGER_32 Result = ((EIF_INTEGER_32) 0); RTLD; RTLI(1); RTLR(0,Current); RTLIU(1); RTGC; tr8_1 = (FUNCTION_CAST(EIF_REAL_64, (EIF_REFERENCE)) R4264[Dtype(Current)-1494])(Current); Result = (EIF_INTEGER_32) tr8_1; RTLE; return R...
1
5e5fa84d7a65fd134157203271c31620
b03021df82d757700edcfc07576d7e4d
Funció que selecciona 10 registres aleatòriament del dataset per utilitzar-les com a dades de demo.
import random total = User.objects.count() start = random.randrange(total - 30) end = start + 30 return User.objects.all()[start:end]
0
4f6fd1ec9282441b1280fe5106c6e6a0
ca7d21d019df1c7e783477cd9b199b64
Returns the meta object for the containment reference '{@link edu.ustb.sei.mde.bxcore.dsl.bXCore.XmuCoreGraphReplace#getView <em>View</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getRemoveView();
0
28963d68dbb14c831e04a0f2ac4e7cdd
1105faa11e1554edb586de02e1b68b07
opens another mini window that asks for a confirmation on whether the user really wants to delete their account
DialogInterface.OnClickListener dialogClickListener = (dialogInterface, i) -> { if (i == DialogInterface.BUTTON_POSITIVE) { UserViewModel userViewModel = ViewModelProviders.of(this).get(UserViewModel.class); userViewModel.delete(user); activity.finish(...
1
c3669596596cf834c9184fbe2d12c241
5bca1bfd984f99ba4d3cd59bd0f7885e
Метод возвращает интерефейс операции поиска нескольких экземпляра сущности "Приложение".
class AppSearch extends App public function search($params) { $query = App::find(); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [ 'pageSize' => 10, ], ]); $this->load($params, null); if (!$thi...
1
3491da5aa8af3715fd061552ec031282
976c5ed13cf81602bfeb9591806a5c88
클래스를 대표하는 문자열을 name으로 설정하겠다. 매직 method
def __init__(self, name): self.name = name
0
6de9f51583931383cd2c892da839ad7b
d99a225008f3303216d05d2286cd6ca4
u"""前のビデオに切り替え.
class Playback: def Previous(self): pass
1
19c2446baf6d3eea003aabbb0288557f
e36b6e12bfc2d0e28d017381771aa378
Вывод параметров полярной координаты в поток
switch (s.k) { case number::key::COMPLEX: Out((complex*)s.obj, ofst); break; case number::key::SIMPLE: Out((simple*)s.obj, ofst); break; case number::key::POLAR: Out((polar*)s.obj, ofst); break; default: ofst << "Incorrect number!" << endl; } ofst << "Measure = " << s.measure << endl;...
1
c4a4a0af570925fcff59608e3a046781
cb4bf69d3075adfc4707f62897efa407
TdVerifyOutputの文字列表現 <p> 現在の各パラメータを、パラメータ名=値&パラメータ名=値の形式で取得します。 </p>
StringBuilder sb = new StringBuilder(); for (Map.Entry entry : values.entrySet()) { sb.append(entry.getKey().toString()); sb.append("="); sb.append(entry.getValue().toString()); sb.append("&"); } sb.deleteCharAt(sb.length() - 1); return sb.toString(); }
1
814a0bfa687f80e05a46f78a7761f582
2051f402b73daf8963b4bf427a31d2b2
Retrieves the internal clock frequency.
namespace ee uint64_t TimerFrequency() { static uint64_t uiFreq = 0; if ( !uiFreq ) { #ifdef _WIN32 ::QueryPerformanceFrequency( reinterpret_cast<LARGE_INTEGER *>(&uiFreq) ); #else #error "No implementation for TimerFrequency()." #endif } return uiFreq; }
1
c0ad2cc173c42d95fad290c73406d492
d9d7032dfe1d1884fd0f5b0da3385312
Called before the step starts running. The default behavior is to print out the step's name.
public class AbstractCorfuTest protected void starting(Description description) { System.out.print(String.format("%-60s", description .getMethodName())); System.out.flush(); }
1
6a5c873d6856e041cd9fa6f969437e87
0cb00603767efe3d47de181df00e07fd
Retrieve SortOrder for field: TransSubmitter (BMF.trans_submitter)
public class PaymentDistributionObjectFilter extends BaseFilter implements Serializable public Integer getBmfTrackingIdSortOrder () { if (this.Key == null) return null; return this.Key.BmfTrackingIdSort; }
0
98f1573b1b4645cafe2d82554522443b
24de45b42d027903a5feffc2097ba9f9
This method sets the relative home/base locations for each Player in the game.
int i = 200 + 2 + gridX*24; int j = 2 + gridY * 24; int k = 0; for(Character c : allPlayers()){ c.setTrueX(i); c.setTrueY(j); k++; if(k == 1) i += 24; if(k == 2){ i-= 24; j+= 24; } if(k== 3){ i += 24; } } }
1
f092c7da38c16e63f248c9d66a48abb8
b73838b66f0ec4520869b1e1b9d44dff
利用正则将html中的标签去除
Pattern pattern = Pattern.compile(regxpForHtml); Matcher matcher = pattern.matcher(str); StringBuffer sb = new StringBuffer(); boolean result1 = matcher.find(); while (result1) { matcher.appendReplacement(sb, ""); result1 = matcher.find(); } ...
1
529d88f04af051b54a23901a9db34dc6
67d9b1ba790b9485b60c19d84ffe5040
Add new audit for an overrideReturnAddress Adds an audit to an existing overrideReturnAddress. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
class OverrideReturnAddressApi public function getDuplicateOverrideReturnAddressByIdAsyncWithHttpInfo($override_return_address_id) { $returnType = '\Infoplus\Infoplus\Model\OverrideReturnAddress'; $request = $this->getDuplicateOverrideReturnAddressByIdRequest($override_return_address_id); re...
0
fdf054ce41d0c9db9f9c5ae1f8ada29f
7753956401f15d80ae3402020004b855
hakkında sayfası için içerik veritabanından çekilir.
class HaberController extends Controller public function index() { $haber = Haber::all(); return view('admin.haber.index',compact('haber')); }
0
39f645e883ab625706f18b1a4a1d7a4b
16b219281e719de5cacd71d8f0e3e0e0
Exception type to be used when a step other than the original compile fails.
class LegacyAnnotationTestApi(recipe_test_api.RecipeTestApi): def failure_step(self): ret = self.m.step.sub_build(build_pb2.Build(status=common_pb2.FAILURE)) ret.retcode = 1 return ret
0
e578e9921ea18e1de89f61799b21ec58
5fd5bc3651e66a855ffdca9844738009
Устанавливает статус отладки для PHPMailer
class CErrorHandler public function setDebug($debug = true) { self::$debug = $debug; }
0
76718500495da02487e79bba7be658d7
a4e284431e1acbc418ceeb1d0ecdd9ed
最近一周完成的自测项目的所有数据
@Service public class HwxDoctorService @Transactional public List<HwxInfo> weekProj(){return doctorMapper.weekProj();}
1
79f244115485172f353628aadbd963c1
af755f9fd7238e578e96b43b53b317b1
如果已经按讚过了,就略过不再新增
const me = await User.findById(ctx.state.user._id).select('+likingComments') if (!me.likingComments.map(e => e.toString()).includes(ctx.params.id)) { me.likingComments.push(ctx.params.id) me.save() await Answer.findByIdAndUpdate(ctx.params.id, { $inc: { voteCount: 1 } }) } ctx.status =...
1
c96a350e738cbae374ba358d3a592ab2
a788cc59df076fbdab870af5fdd3a6d4
See comments on CHECK_C_STACK_OVERFLOW. This routine is deliberately separate and simple so that it allocates no objects or locals...and doesn't run any code that itself might wind up calling CHECK_C_STACK_OVERFLOW.
static void overflowStack(int callNum) { char a[100000]; printf("Call %4d - top of stack near %10p\n", callNum ,&a[0]); overflowStack(callNum+1); }
1
b6aa110349558e3a1d79fe9765851bca
a58a718119fc4582c5ac83c247f308af
Metodo que descarga los mensajes de la cuenta de correos electronico que cumplen con el criterio de busqueda para los almacenarlos en el medio de persistencia por medio del objeto de tipo MySQLStorage
public void downloadMessages() throws SocketException, IOException, UnderflowException, FTPConectionRefusedException;
0
8851b6dc0a6a0ee5f34851559b5c9fa5
7488d9d7538b87c102c34217e8ff3842
Call the correct connection settings based on the site name
function databaseConnection($databaseName) { $whitelist = array('127.0.0.1', '::1'); if (in_array($_SERVER['REMOTE_ADDR'], $whitelist)) { define('DBF_SERVER', '107.180.46.186'); define('DBF_NAME', 'damascus_way'); define('DBF_USER', 'damascus_way_mob'); define('DBF_PASSWORD', 'b^l}+mS_T0FH'); } else { de...
0
690707f3e792c2a0cc546cdaa4513d37
d11938f590e72a533607af5ddcee214d
将目前在推的pid压入redis
global $config, $server, $redis; $map = array (); $key = CONFIG_PROCESS . $pid; if ($redis->exists($key)) { $parent = $redis->hget($key, "parent"); if ($parent == $sid) { try { $jsonObject = json_decode($json, true); unset ($jsonObject["id"]); unset ($jsonObject["parent"]); $redis->hmset($key...
0
f8b5e42539841a5d9a803dc201123818
1b22e216bd9ef3f2b0035316fd992b09
Add a link from A and B of given distance, and also add the inverse link if the graph is undirected
Node nodeA = this.getNodeByName(nodeNameA); Node nodeB = this.getNodeByName(nodeNameB); nodeA.addEdgeTo(nodeB, distance); nodeB.addEdgeTo(nodeA, distance); }
1
0ae64f7880598e01449212ab138629ea
3d0b30eea4b238769595db783f271ecf
Returns a price for the given ticket id and number of unique ticket prices.
{ if(ticketType == 'C' || ticketType == 'c') { return COACH_PRICE; } else { return SLEEPER_PRICE; } }
0
38a6ecbf25f931c4fa588d5e72414fac
77595ac5cbf0b06d8622287e64762aae
kiểm tra xem giá sản phẩm có >= 1000 vnđ không?
class Product def is_discounted? @price = price if @price < 10 return true else return false end end
0
010ec1ac04a8766968b37ddb2f9993f2
2bee3a4e3cfe064f8f7fcb6dbc7ad2a2
获得好友邀请服务实例
{ if (!is_object(Friend_Model::$instances)) { Friend_Model::$instances = new Friend_Model(); } return Friend_Model::$instances; }
1
7cea55f5009df205dac9c8e627221f86
0b527cf00968e14d617fc5ee84c88245
回避オブジェクトを算出
{ retourer record = requester.GetComponent<retourer>(); float diameter = requester.transform.localScale.x; sencer sencer = obstacle.transform.Find("area").GetComponent<sencer>(); Vector3 Tangent1; Vector3 Tangent2; GameObject lastobstacle = record.obstacle; Ve...
1
93b6333ac01c7de6af0efb99fb38183e
a0cda5a5c24e41647233375827f26738
返回指定应用的所有用户组
class App extends Base public function listGroups($aid) { $request = $this->request->get('apps/' . $aid . '/groups'); return $request->send(); }
1
c2b9127cacd57bd23e986ffd1f5e04e1
b2d963e41f479731df8adfce7a3f461d
Converts a list of targets to a list of Collective2 positions
var positions=[]; var map=new Array(xItems.length); for(var k=0; k<map.length; k++){ map[k]=new Array(yItems.length); } for (var id=0;id<types.length;id++){ x1=xItems.indexOf(types[id][3]); y1=yItems.indexOf(types[id][2]); positions[id] = [{ x: x1, y: y1, ...
1
884f2e4aae34a7d926f38d0f19cef3f5
cb65028ea340c245239f24c1483fc9c6
Waits until device node disappears.
impl TestHarness for HostDriverHarness fn terminate(env: Self::Env) -> BoxFuture<'static, Result<(), Error>> { let (path, mut emulator) = env; async move { let mut watcher = DeviceWatcher::new_in_namespace(HOST_DEVICE_DIR, timeout_duration()).await?; emulator.dest...
1
6babb64551acdc513e8ca8912c1c6679
a3a275b20ef2b1d7e34a8b678d7413c5
Check if the incoming dictionary of batch data is a valid dictionary of data. Checks: 1. All batches in the dictionary have the same number of columns. 2. All columns are numeric. 3. If `no_nan` is True, also checks that there are no NaNs.
class ModelInfo(ABC): def is_valid_model_data(model_data: dict) -> bool:
0
5eb95235d76201c00bd3b2346d325227
8f2d03e434d7610edc5089bdf9d7c925
Test CHAINID opcode.
c = Contract('6020603081910201') c.parse() self.assertIn(0x30, map(lambda l: l.value, c.line_blocks[0].lines[-2].args)) self.assertIn(0x20, map(lambda l: l.value, c.line_blocks[0].lines[-2].args)) self.assertIn(0x20, map(lambda l: l.value, c.line_blocks[0].lines[-1].args))
0
ff20d9d5e3fd95f348d839ebfb62c829
7e51e25c6453304400e986fdf633fa1f
Determines the name of the tag (if any) that is currently checked out in the specified repository
o, _, s = exec(%q{symbolic-ref --short HEAD}) s.success? ? o.strip : nil end
0
2c10f3dc55034359f8985f1e65ad8b1e
f3efa9a7254971e4ebca96cb4a38a124
Один раз при загрузке страницы выполняем требуемый тип анимации
var BlocksRegistration = { FirstBlock: '', SecondBlock: '', ThirdBlock: '', FourthBlock: '', FifthBlock: '' } BlocksRegistration.FirstBlock = document.getElementsByClassName("form__enter-content")[0]; BlocksRegistration.SecondBlock = document.getElementById("form-...
1
4211ae719e04202d6d52ca3dc48e0a81
66431b69f0794f2685460a613985f321
Método para registrar la salida de una persona del parque
RestResponse permitirSalida(JSONObject vehiculoJson);
0
97ad13b5fbc54736cd1c94f59563ce0d
a8ab7907844bf7c41186dc018becd373
将机器添加到网络中,机器必须设置IP
{ *ip_ = *ip; *mask_ = *mask; int r = 0; #ifdef _WIN32 string namecmd = "\"" + name_ + "\""; r=ExecCmd({"netsh", "interface", "ip", "set", "address", namecmd, "static", ip_->ToString(), mask_->ToString()}); #else string namecmd = "ip addr add " + ip_->ToString() + "/" + mytrans<int, string>(mask...
1
b9fd270354571581e01eccd822efc2e4
71885297c2431094672335e7dc4dfd02
creates specific transformation for the next element in the list
var newList = { value: elemt, rest: lst }; return newList; }
0
ce811d5f736ec2d5f3806be037eeecc5
62741761aacdf77c71d020efd330dfc2
Retrieves Tempus server info.
LOG.debug("Getting server info") server_info = res_client.get("/const/", is_uri_absolute=True) if keys_to_get: server_info = {k: server_info.get(k, {}) for k in keys_to_get} return server_info
1
e151ede339475e476b345d90f1c5097f
96b465984f74b8a34b5f4440faeca824
Set the external field
class MSD_PYUBLAS(object): def set_external_forces(self, T_S, D_S, kind): self.plant.set_external_forces(np.array(T_S), np.array(D_S), kind)
1
2834f4fd865dcf1ae6955a7d3827a36a
86c3de4c787147423881986072623526
Returns the base filename (without extension) for BNG output files
filename = os.path.basename(infilename) filebase = filename.split(".") basename = filebase[0] return basename
1
4a2d54319846738c73896477de44bf57
c2872100a8b38704023df5c6baa88ad7
Returns the index of combobox selection for the LaF
namespace RLToolkit.Extensions public static class GtkWidgetExtension public static int FindIndex(this Gtk.ComboBox input, string textToFind) { if (input == null) { return -1; } if (input.Model == null) { return -1; ...
0
165d43d33d79e5276842b46cd276e967
63bf29ccda04f4cf0e2b58d822a5db56
Figma File 조회
async function getFigmaFile(fileId) { const response = await client.get(`/v1/files/${fileId}`); return response.data; }
1
8e06928acb13725aa0f28589ee3db92f
734f0f66511da6e78981028356cc30c4
DMA done routine
void SAMDDAC::dmaTransferComplete(DmaCode c) { if (dataReady == 0) { active = false; return; } pull(); }
1
b452c71320b68b9e8815a0100e8454cf
0461a85e856c75c1f564763f0c217289
获取关键词最大图片页数
$param = array('type' => 1, 'key' => $this->keyword, 'page' => 1); self::unitQuery($param); $pageReg = array( 'pageContent' => array('.pages .btnFirst', 'href') ); $pageContent = $this->handle->setQuery($pageReg)->getData(); if($pageContent) { preg_match_all('/\d+/', trim($pageContent[1]['pageContent...
1
8331ae23b7cbc81d982bae8c02bc7058
7df530bb20c5f5bff7a7856b044664c7
segments the arm region based on depth
{ PUTONSURFACE( mRootL); PUTONSURFACE( mRootR); if (LEFT_TURN(sw, ne, eyeP)) { eyeSplit( mRootL, sw, ne, nw); rodSplit( mRootR); } else { eyeSplit( mRootR, ne, sw, se); rodSplit( mRootL); } }
0
48fab9987192f7164cfc4c71282c102c
702061ca9f2278f07e6ae1440bbd2095
gibt die akuelle Schreibposition des Servers zurueck (aktuell)
Number getCurrentPosition() throws IOException;
1
e4f54ca9a8b675c1e25c33b4dfe22968
7f41da0dd7e4289329a1d471fd8470bb
Generates the checksum in hexadecimal form.
{ ushort finalSum = (ushort)((_sum2 << 8) | _sum1); var fletcherOutput = new StringBuilder(); for(int i = 0; i < BigEndianBitConverter.GetBytes(finalSum).Length; i++) fletcherOutput.Append(BigEndianBitConverter.GetBytes(finalSum)[i].ToString("x2")); ...
1
4b873295494a50650def4d94dcedbc19
304e8cf32c7e9f7b7da53d1ac80dbadb
Функция старта змейки ее координат и скорости
global segment, id global X_START, Y_START, X_OFFSET, Y_OFFSET global x_food, y_food canv.delete(segment) segment = canv.create_rectangle(X_START, Y_START + Y_OFFSET, X_START + X_OFFSET, Y_START + Y_OFFSET + 40, fill="Black") x_center = X_START + X_OFFSET / 2 y_center = Y_START + Y_OFFSET + ...
0
321dddb8b62d8dacd033b8ca9b978c77
30ad68a3b558f2723a71dfb5ac96aeb1
执行当前指令,开启超时定时器
def DoTimeout(): try: os.system('true > %s'%(gDailTestCmdFile)) with open(gDailTestCmdFile,'a+') as Fd: for sKey in dPara['cmd']: Fd.write(dPara['cmd'][sKey][4] + '\n') except BaseException,e: Log(gDailTestLogFile,'ALARM',str(e))
0
fdd2629fd99c693e60ef0f2d11164362
5e6e31d19605f2942de55974345e3765
有无
class BaseModel extends RelationModel public static function isHaveNagetive() { return [ 1 => '有', 0 => '无', ]; }
1
ef83f314e8d2a451652aedc3de51ac97
4075e8d8d3f5df700f79638f762eb8b6
The temperature device has been closed.
void CuptorCuptorBase_onOpenTemperature( CuptorCuptorBase _this, XObject sender ) { EW_UNUSED_ARG( _this ); EW_UNUSED_ARG( sender ); }
0
2f0bd2cb6bd463df8a07d59e55c63b21
b6aec444de140b1498f454e86ec6c1b4
Tukša lauka validācija
let valittu = document.getElementById("kilpailu"); if (valittu.value === "Ei kilpailua") { document.getElementById("kilpailu").setCustomValidity("Valitse kilpailu!"); return false; ...
0
a6b6023d09dfd5c009de03cfa514bf9b
ed9723bbf50a77cb9ba393b3bb8abe80
Opens the text dialog sample.
{ if (this.richTextBox.Visible) { this.EnterFreeTextButton.PerformClick(); } TextFileOpenFileDialog.Filter = "Text Files (*.txt)|*.txt"; if (TextFileOpenFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { ...
1
d6ea2fc290a4a5423013f708c6549572
e781f6af31ab18023c9f41ec5c70a7f6
Counts the number of Unique integers in a sorted array.
int l = 1; int u = 0; while (l< nums.length){ if (nums[l] != nums[u]){ u++; nums[u] = nums[l]; } l++; } return (u+1); }
1
7866bde99243d5bf62db8714cb3e4ea3
f065b5b82e2b666f7984f46eca70f4dd
Get the number of inputs to the graph Returns
class NeatGenome(ne.base_genome.BaseGenome): def input_shape(self) -> int: return len(self.input_nodes)
1
107fe02e214d9a9c0656d5f52e494500
27d8a9626ad7947c7b2ec4cbd7140866
Opens a SSH connection to the mgmt LXC.
def ssh_new(): pass
0
31024a8c5748b84db1e6521ad7950d71
c15b7dfa5deaad3ddb972a830b229a10
Sets whether the quality of sleep entry is tracked
public class PreferencesObject public boolean isTrackQualityofSleep() { return trackQualityofSleep; }
0
0a28dfd1d62bce2a00bf327e97efe7c6
7b8fe0a1967f86b622e2ec8e30590366
somamos a variação(0, 1 ou -1) na coluna, atualizando o valor de sua coordenada
int aux; for(int i = linha + 1, j = coluna + 1, aux = cor; i < LINHAS && j < COLUNAS; i++, j++){ if(c[i][j] == VAZIO && aux != cor){ c[i][j] = JOGADA; break; } else if(c[i][j] == cor || c[i][j] == VAZIO || c[i][j] == JOGADA){ break; } e...
0
68f8acbad6af3129caaa0106a043dae9
b83ebfd4ab9bee2a5c8e102b684792f0
若输入的是地址
public class CreamsAPPMyChannelPage extends ParentPage public void inputAddress(String address) { this.driver.waitAndClick(INP_address, 1); this.driver.elementClearSendText(INP_address, address); }
1
21a53084e389e9de9f6b0c1d725b6402
66d3764a9561ae23833a66f1606b68fe
バネの変化量(初期位置からのずれ)を取得する。
{ boolean isInit = m_initialized; double rval = getCurrentValue() - getInitialValue(); return isInit? rval : 0; }
1