query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
eb26f6a5080658326e667214ec6d07ca | 19875b649026d08e933d6860074d84dd | Returns the meta object for the containment reference '{@link ExternalServiceLayerPSM.JavaOutputDataModel#getHasOutputRepresentation <em>Has Output Representation</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | AnnJavaResourceModel getIsExistentJavaModelPersistentOutput(); | 0 |
a51fbfaa606d86dbb9e3eb949e9d9c9b | db0440fe3c730818a9d2a46da59432b1 | 调用scrapy 提供的 json exporter 导出json文件 | self.file = open('meizi.json', 'wb')
self.exporter = JsonItemExporter(
self.file, encoding='utf-8', ensure_ascii=False)
self.exporter.start_exporting() | 1 |
be5dcfbbe69d8e2567e303655b7cea3c | 878dbca234051b829607661696f9bc38 | <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.WellArchitected
public partial class AmazonWellArchitectedClient : AmazonServiceClient, IAmazonWellArchitected
public virtual ListWorkloadSharesResponse ListWorkloadShares(ListWorkloadSharesRequest request)
{
var options = new InvokeOptions();
options.RequestMarshall... | 0 |
67249ab4c8f65bd45043238be4eab022 | 9e8068e67bae915b6d46a0181a8bf559 | 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 ForgedSoftware.Measurement.Interfaces
TValue Subtract(TValue subtract); | 0 |
c82fc1ad5f4ece0d48bd7f5efa048fce | 5a3c72c9283391c825526bb3238b5d35 | 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 :-/). | class Timeline(resource.BaseResource):
def __init__(self, timeline_id, sketch_id, api, name=None,
searchindex=None):
self.id = timeline_id
self._name = name
self._searchindex = searchindex
resource_uri = 'sketches/{0:d}/timelines/{1:d}/'.format(
sketch_id, se... | 0 |
3e8adf0a8d3c3bae25d3ed5ae6e58fcf | 33313c279ab9f1762a960e587e4cd39f | 加载全部分页角色 | [HttpGet]
public Message<S_ROLE_T> Load()
{
try
{
db.Configuration.LazyLoadingEnabled = false;
db.Configuration.ProxyCreationEnabled = false;
var data= db.S_ROLE_T.AsNoTracking().ToList();
Message<S_ROLE_T> ms=new Message<S_ROLE_... | 0 |
d397b3acceff26451588bf7b27710922 | 18a6b0713475185248e9cad10e5f7e73 | 异步添加关注 | public class WeekSuperuFragment extends BaseFragment
private void addFollowList(final String bg_userid, String g_userid) {
addSubscribe(apis.addlFollow(new AddFollowRequest(bg_userid, g_userid))
.compose(RxHttpUtil.<FutureHttpResponse<AddFollowRespone>>rxSchedulerHelper())
.compo... | 1 |
cf5757b3d278cac3215ae600a617046e | 5535bb0025de4157e07ccf54d247c1b8 | BOY QUESTIONS | def boystory():
print(
name,
", you are on a vacation with all your friends. You are alone right now because you wanted to take a midnight stroll. THUNK! Something hits you, on the head. Your eyes close and you slumps down. Head spinning and fighting the pain on the head, you manage to wake up. You ... | 1 |
dd3ca18f736e17a8023c685ab9f3c3c7 | a966aa43434b19f94e71071307d6e9cb | 通过最大最小经纬度得到全部经纬度 | area = []
for i in range(0,2):
if i ==1:
lat_min = lat_min+0.05
lon_min = lon_min+0.05
lat = lat_min
while lat <lat_max :
lon = lon_min
while lon <lon_max :
coordinate = (lon,lat)
area.append(coordinate)
... | 1 |
de122d08fe4d88bb77f8fb5b39ee964f | 113a544b140063c155e6ec1481eca001 | {REAL_64}.truncated_to_integer | EIF_TYPED_VALUE F286_6004 (EIF_REFERENCE Current)
{
GTCX
char *l_feature_name = "truncated_to_integer_64";
RTEX;
EIF_INTEGER_64 Result = ((EIF_INTEGER_64) 0);
RTSN;
RTDA;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLIU(1);
RTLU (SK_INT64, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 285, Current, 0, 0, 1... | 1 |
5e5fa84d7a65fd134157203271c31620 | 9e0e4c52f3a342466066050032154fe1 | Funció que selecciona 10 registres aleatòriament del dataset per utilitzar-les com a dades de demo. | idList = []
for i in range(len(dataSet)):
if dataSet['G0'][i] >100:
idList.append(dataSet['idRegistro'][i])
return idList | 0 |
4f6fd1ec9282441b1280fe5106c6e6a0 | 2537ea224e7f0a539d2bc13cab137605 | 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 --> | org.openxmlformats.schemas.presentationml.x2006.main.CTViewProperties getViewPr(); | 0 |
28963d68dbb14c831e04a0f2ac4e7cdd | 525fe6d09ecde1b69dedd0c0c78f25f1 | opens another mini window that asks for a confirmation on whether the user really wants to delete their account | export class ShopAccountProfileComponent implements OnInit
attemptToDeleteAccount() {
const modalRef = this.modalService.open(NgdbModalActionComponent);
modalRef.componentInstance.title = 'Warnung';
modalRef.componentInstance.body = 'Wollen Sie Ihr Konto unwiderruflich löschen?';
modalRef.componentInsta... | 1 |
c3669596596cf834c9184fbe2d12c241 | 691f6636e00212a745420bdeac9da063 | Метод возвращает интерефейс операции поиска нескольких экземпляра сущности "Приложение". | public class FileSearch extends Dispatch
public Object getApplication() {
return Dispatch.get(this, "Application");
} | 0 |
3491da5aa8af3715fd061552ec031282 | 70b0238500164918ac71a8c3d836a986 | 클래스를 대표하는 문자열을 name으로 설정하겠다. 매직 method | class Person2:
def __init__(self, name):
self.name = name | 0 |
6de9f51583931383cd2c892da839ad7b | 80ad4f6e98fb546d227c4020c033f7e7 | u"""前のビデオに切り替え. | class Manual(QMainWindow, Ui_Manual):
def prevideo(self):
global cur_vid
if cur_vid > 0:
cur_vid -= 1
path = QUrl(path_list[cur_vid])
self.player.setMedia(QMediaContent(path))
elif cur_vid == -1:
msgBox = QMessageBox(QMessageBox.NoIcon, '提示', '请先选择... | 1 |
19c2446baf6d3eea003aabbb0288557f | 8ccfcac232b3817ed7308ec0a9e18d8b | Вывод параметров полярной координаты в поток | {
if (!pol)
{
s << z.re;
if (sign(z.im) < 0)
{
s << " - " << fabs(z.im) << " i";
}
else if (sign(z.im) > 0)
{
s << " + " << fabs(z.im) << " i";
}
}
else
{
s << z.rh... | 1 |
c4a4a0af570925fcff59608e3a046781 | d3cf9b0842072ba1dab844149a3f1122 | TdVerifyOutputの文字列表現
<p>
現在の各パラメータを、パラメータ名=値&パラメータ名=値の形式で取得します。
</p> | @Override
public String toString()
{
return param;
} | 0 |
814a0bfa687f80e05a46f78a7761f582 | 2ca57f2d41e56ce83233ee5eaf6be4c3 | Retrieves the internal clock frequency. | namespace Spect.Net.SpectrumEmu.Providers
public class DefaultClockProvider : VmComponentProviderBase, IClockProvider
public long GetFrequency() => _frequency; | 1 |
c0ad2cc173c42d95fad290c73406d492 | 3775ab467fdc769f6fc615ccc63e69ef | Called before the step starts running. The default behavior is
to print out the step's name. | String stepName = stepExecution.getStepName();
log.info("Step:{} ---- START ----", stepName);
} | 1 |
6a5c873d6856e041cd9fa6f969437e87 | e3c3ac68b799e4fc637b2362ce2a6987 | Retrieve SortOrder for field: TransSubmitter (BMF.trans_submitter) | public class AxrtPaymentObjectFilter extends BaseFilter implements Serializable
public boolean getTransSubmitterFetch () {
return this.TransSubmitterFetch;
} | 0 |
98f1573b1b4645cafe2d82554522443b | 33e9f61c1435f6e6d01d0006d9203427 | This method sets the relative home/base locations for each Player in the game. | void setPlayersSpawnLocations(); | 1 |
f092c7da38c16e63f248c9d66a48abb8 | 7b6a3da44352048be533a8bd45fb4be8 | 利用正则将html中的标签去除 | public class RegexUtils
public static String deleteHtmlTag(String input){
Matcher matcher=getMatcher(getPattern("<[^>]+>"), input);
return matcher.replaceAll("");
} | 1 |
529d88f04af051b54a23901a9db34dc6 | 3e7c46e173d127fd137dc29b1a65784e | 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. | com.squareup.okhttp.Call call = addBillingCodeAuditValidateBeforeCall(billingCodeId, billingCodeAudit, null, null);
return apiClient.execute(call);
} | 0 |
fdf054ce41d0c9db9f9c5ae1f8ada29f | 9adc703ff76218b1a29ee4d78b1f1ccb | hakkında sayfası için içerik veritabanından çekilir. | namespace SinemaBiletOtomasyonu.Controllers
public class HaberController : Controller
public ActionResult Index(int page = 1)
{
var degerler = c.Habers.ToList().ToPagedList(page, 12);
return View(degerler);
} | 0 |
4a863e86d39383581c2a2dbbd25231c9 | b75f4efc470a1f5fac8f8a8498c8021e | 加载专门的动画界面面板 | function LoginView:enter()
local config = require("src.games.game_hall.modules.main.config.AnimationConfig")
Util:loadAnim(config, true)
end | 1 |
e578e9921ea18e1de89f61799b21ec58 | cecae8ccf5d6985d9fc5f7a9d7286229 | Устанавливает статус отладки для PHPMailer | if($status) {
error_reporting(E_ALL);
define('isDebug1', 1);
} else {
error_reporting(0);
}
self::$error = (bool)$status;
} | 0 |
76718500495da02487e79bba7be658d7 | 67d5e84eb60e11c16a321872c6f329dc | 最近一周完成的自测项目的所有数据 | today = timezone.now().date()
test_times = []
test_all = []
test_pass = []
test_fail = []
for i in range(6, -1, -1):
test_time = today - datetime.timedelta(days=i)
test_times.append(test_time.strftime('%m/%d'))
content_type = ContentType.objects.get_for_model(object)
... | 1 |
79f244115485172f353628aadbd963c1 | b752b6964a13d9b6433fa15e937f8ee4 | 如果已经按讚过了,就略过不再新增 | public class StoreOfferDetail extends Activity implements StandardMenus
public void addFavourite(View view) {
if (funDB.isFavouriteExist(product_id)) {
FuncardToast.showToast(FAVOURITE_ALREADY_ADDED, context);
} else {
funDB.inserFavourites(store_id, store_name, store_lat,... | 1 |
c96a350e738cbae374ba358d3a592ab2 | 550b6b557c143d101938ecffe27a01b2 | 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. | {
unsigned n;
# define N_LOCAL_ITERS 1
# ifdef MAK_ASSERTIONS
MAK_acquire_mark_lock();
MAK_release_mark_lock();
# endif
for (;;) {
for (n = 0; n < N_LOCAL_ITERS; ++n) {
local_top = MAK_mark_from(local_top, local_mark_stack,
local_mar... | 0 |
c8213076c654ad4ecfbc58a032c04b90 | d35239e0df2dfc34ae14dd2b65067e2f | If both URIs are hierarchical, their scheme and authority components are
identical, and the base path is a prefix of the child's path, then
return a relative URI that, when resolved against the base, yields the
child; otherwise, return the child. | public class URL implements Serializable
public String relativize(final URL url) {
if (this.isOpaque() || url.isOpaque()) {
return url.toString();
}
if (!this.scheme().equals(url.scheme())) {
return url.toString();
}
if (this.authority() == null ^ url.auth... | 1 |
156e8263dac11676306a350116a60170 | 4477a40e1c947d04befc5b3e28432a7a | 添加文件节点,更新父节点 | Utilities.ArgumentNotNull("parentNode", parentNode);
HierarchyNode child;
if (this.canFileNodesHaveChilds && (parentNode is FileNode || parentNode is DependentFileNode)) {
child = this.CreateDependentFileNode(fileName);
child.ItemNode.SetMetadata(Proje... | 1 |
8edd812600408951b89acfc46c55f712 | c3011a8bc2f94eb6bdf8d1f2238cf677 | 删除小于给定面积的连通区域 | namespace HCSAnalyzer.Classes.ImageAnalysis._3D_Engine.Detection
public class cRegionGrowing : List<cRegion>
private void RemoveSmallRegions(int MinVolume)
{
for (int RegionIdx = 0; RegionIdx < this.Count; RegionIdx++)
{
cRegion CurrentRegion = this[RegionIdx];
... | 1 |
f8b5e42539841a5d9a803dc201123818 | 6097346c8b92188f7d096ea4152dc6a6 | Add a link from A and B of given distance, and also add the inverse link if the graph is undirected | class Graph:
def connect(self, A, B, distance=1):
self.connect1(A, B, distance)
if not self.directed: self.connect1(B, A, distance) | 1 |
0ae64f7880598e01449212ab138629ea | 56dbb9ebab223eda9d796aa9ad82d68f | Returns a price for the given ticket id and number of unique ticket prices. | Integer getPrice(Integer slotId); | 0 |
38a6ecbf25f931c4fa588d5e72414fac | c5cf0e2826f2f8054235975fd0be6e3c | kiểm tra xem giá sản phẩm có >= 1000 vnđ không? | class OldgoodsScrapping(webdriver.Chrome):
def is_product_sold_out(self, product_price):
return True if product_price == '0' else False | 0 |
010ec1ac04a8766968b37ddb2f9993f2 | ea8c0130a77e9cef6f9a6559b64b3ee6 | 获得好友邀请服务实例 | if (!$this->IntegrationInvite) {
$this->IntegrationInvite = new IntegrationInvite($this->getUser());
}
return $this->IntegrationInvite;
} | 1 |
7cea55f5009df205dac9c8e627221f86 | 99532297b8042f5c7c72a250a6a33b05 | 回避オブジェクトを算出 | {
if (context.Count == 0)
{
return Vector2.zero;
}
Vector2 avoidanceMove = Vector2.zero;
int nAvoid = 0;
foreach (Transform item in context)
{
if (Vector2.SqrMagnitude(item.position - transform.position) < SquareAvoidanceRadius)
... | 1 |
93b6333ac01c7de6af0efb99fb38183e | 08e813e1bb3e6b9b4961bb72e17fd57a | 返回指定应用的所有用户组 | class Groups(BaseSDK):
def get_app_groups(self, start=0, count=100):
method = 'GET'
url = self._make_url(
conf.GET_APP_GROUPS,
start=start,
count=count
)
resp = self._common_process(method, url)
content = self._handle_content_response(resp)
... | 1 |
c2b9127cacd57bd23e986ffd1f5e04e1 | f585d46831242ed92086b19917d5f6b1 | Converts a list of targets to a list of Collective2 positions | ctrs, qrys, goals = [], [], []
for (ctr, qry), goal in lst:
ctrs.append(ctr)
qrys.append(qry)
goals.append(goal)
ctrs = torch.stack(ctrs)
qrys = torch.stack(qrys)
goals = torch.cat(goals)
return (ctrs, qrys), goals | 0 |
884f2e4aae34a7d926f38d0f19cef3f5 | fafe9f705cefaa33dfc0ee1ba440e58a | Waits until device node disappears. | def wait_for_device():
adb_full_cmd = [v.ADB_COMMAND_PREFIX, v.ADB_COMMAND_WAITFORDEVICE]
return _exec_command(adb_full_cmd) | 0 |
6babb64551acdc513e8ca8912c1c6679 | dac8edaf6d8d098a3679408474f2c3dc | 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. | check_keys = ['actions', 'observations', 'rewards', 'timeouts', 'terminals', 'infos/qpos', 'infos/qvel']
N = None
for k in check_keys:
values = dset[k]
if N is None:
N = values.shape[0]
else:
assert values.shape[0] == N | 0 |
5eb95235d76201c00bd3b2346d325227 | 1e707ebfc8eedfad8621a28e0df2cffb | Test CHAINID opcode. | int main(int argc, const char *argv[])
{
Chunk c;
initChunk(&c);
writeChunk(&c, OP_RETURN);
disassembleChunk(&c, "main");
freeChunk(&c);
return 0;
} | 0 |
45bdf24cfd3458d80f1fb3b619d5a816 | 1300085530c6eab6005cdaff752de9b2 | 设置供应商扩展信息 | public abstract class AbstractSpec implements DConnectSpec
public void setVendorExtensions(Map<String, Object> vendorExtensions) {
mVendorExtensions = vendorExtensions;
} | 1 |
2c10f3dc55034359f8985f1e65ad8b1e | 8443d64668d8e10499cd64594d72b950 | Один раз при загрузке страницы выполняем требуемый тип анимации | export class ManagementComponent implements OnInit, AfterViewInit
ngAfterViewInit(): void {
setTimeout(()=> {
this.text_ani_1 = true;
}, 200);
} | 1 |
4211ae719e04202d6d52ca3dc48e0a81 | a1faff130d425cd69666fbd6e175052f | Método para registrar la salida de una persona del parque | public class Manejador
public void addsalida(String texto)
{
salida.add(texto);
} | 0 |
97ad13b5fbc54736cd1c94f59563ce0d | 9f5ea2005c96182d1ac727886266c01f | 将机器添加到网络中,机器必须设置IP | Service service = new Service(serviceName);
Machine machine = new Machine(machineIP, service);
machine.register();
logger.info("服务成功注册:服务名称" + serviceName + "机器IP:" + machineIP);
} | 1 |
b9fd270354571581e01eccd822efc2e4 | ac13d68d5c3dd9f6ec60af6582104f86 | creates specific transformation for the next element in the list | public class FlameMakerGUI public void start()
public void actionPerformed(ActionEvent e) {
listModel.addTransformation();
jliTransformations.setSelectedIndex(listModel.getSize()-1);
assert(listModel.getSize()>=2);
jbuRemTrans.setEnabled(true);
} | 0 |
ce811d5f736ec2d5f3806be037eeecc5 | a7ae63ec261b83c266c52052d78913d5 | Retrieves Tempus server info. | {
var result = Async.GetServerInfo().ConfigureAwait(false).GetAwaiter().GetResult();
if (result.IsLeft)
{
throw result.Left;
}
return result.Right;
} | 1 |
e151ede339475e476b345d90f1c5097f | 9f129ec9e7b54f3fb7cd49c522dbf5b8 | Set the external field | tpe = E_field_settings['type']
n_row = E_field_settings['n_row']
n_column = E_field_settings['n_column']
n_height = E_field_settings['n_height']
magnitude = E_field_settings['magnitude']
external_field_tensor = np.ones((n_column, n_row, n_height)) * magnitude
return external_field_tensor | 1 |
2834f4fd865dcf1ae6955a7d3827a36a | 4934fa44813de594412f82b68ae3d4da | Returns the base filename (without extension) for BNG output files | class SourceBenningtonPath:
# Relative document path.
def filename(self):
return os.path.splitext(os.path.basename(self.path))[0] | 1 |
4a2d54319846738c73896477de44bf57 | cba4469a6d31fedef4621870a00106e7 | Returns the index of combobox selection for the LaF | class ArgItemComboBox(wx.Panel):
def getSelection(self):
return self.m_argWindow.GetStringSelection() | 0 |
165d43d33d79e5276842b46cd276e967 | fc6774cd945e1a89550d09d608da5494 | Figma File 조회 | {
$userFile = UserFile::select('*')
->where([
['user_id', '=', auth()->user()->id],
['key', '=', $key],
])
->first();
if($userFile) {
return new UserFileResource($userFile);
}
return response()->json([
'data' => ... | 0 |
8e06928acb13725aa0f28589ee3db92f | c0af47b79632a2a3530a54bc132d9ed4 | DMA done routine | {
kal_uint32 index;
kal_uint32 total_size;
#ifdef WEBCAM_TEST_DMA_DELAY
kal_bool bDelay = KAL_FALSE;
#endif
if(USB_DMA_Get_Run_Status(g_USBVideo.txpipe->byEP, USB_TX_EP_TYPE) == KAL_TRUE)
{
USB_DMA_Set_Run_Status(g_USBVideo.txpipe->byEP, USB_TX_EP_TYPE, KAL_FALSE);
if(g_USBVideo.video_control.dma_type == USB... | 1 |
b452c71320b68b9e8815a0100e8454cf | 029b44986933b86faa5062adf6831f39 | 获取关键词最大图片页数 | {
int[] pageNums = viewModel.GetPageNums(id_en, isLong);
int maxPageNum = 0;
if (pageNums != null && pageNums.Length > 0)
{
ArrayList lstPageNums = new ArrayList(pageNums);
lstPageNums.Sort();
maxPageNum = Convert.To... | 1 |
8331ae23b7cbc81d982bae8c02bc7058 | fe5647c25ec08d7abe13f4a306dee271 | segments the arm region based on depth | def divide_region(mask_data):
pixel_step = 20.0
skel = skeletonize(mask_data.copy())
skel[skel != 0] = 255
skel_points = np.argwhere(skel != 0)
keep = np.ones(len(skel_points[:,0]), 'bool')
diff = np.diff(skel_points[:,0])
keep[1:] = (diff != 0)
skel_points = skel_points[keep,:]
s = ... | 0 |
48fab9987192f7164cfc4c71282c102c | 80b6c597e4e9c19bfd2feec76c9fbf12 | gibt die akuelle Schreibposition des Servers zurueck (aktuell) | file_position generic_file::write_position()
{ return file_stream.tellp(); } | 1 |
e4f54ca9a8b675c1e25c33b4dfe22968 | d40d4b135208abf5d4633175d18cbbbc | Generates the checksum in hexadecimal form. | namespace Aaru.Checksums
public sealed class Crc64Context : IChecksum
public string End()
{
var crc64Output = new StringBuilder();
for(int i = 0; i < BigEndianBitConverter.GetBytes(_hashInt ^= _finalSeed).Length; i++)
crc64Output.Append(BigEndianBitConverter.GetBytes(... | 1 |
4b873295494a50650def4d94dcedbc19 | b0653ca4bfdd1e0f7f54ac20391155a3 | Функция старта змейки ее координат и скорости | let choice = 0
let point = 0
for (let i = 0; i < config.dots; i++){
let point = coordinates_dots[i]
choice = [-parseInt(random_x_y(0, 1)), parseInt(random_x_y(0, 1))]
point[2][0] += choice[parseInt(random_x_y(0, 2))]
point[2][1] += choice[parseInt(random_x_y(0, 2))]
p... | 0 |
321dddb8b62d8dacd033b8ca9b978c77 | 16c0f3784d39cc26c777fea798689c7c | 执行当前指令,开启超时定时器 | sys.timerStopAll(atimeout)
if currsp then
currsp(currcmd, result, respdata, interdata)
else
rsptable[cmdhead](currcmd, result, respdata, interdata, cmdRspParam)
end
if cmdhead == "+CIPSEND" and cipsendflag then
return
end
currcmd, currarg, currsp, curdelay, cmdhead, c... | 0 |
fdd2629fd99c693e60ef0f2d11164362 | 3dd3736596ea0e485697d828803fd060 | 有无 | {
return [
0 => $translator->translate('无'),
1 => $translator->translate('有')
];
} | 1 |
ef83f314e8d2a451652aedc3de51ac97 | f819b416423243e07af16a772457f74e | The temperature device has been closed. | class Device(object):
def is_closed(self) -> Optional[bool]:
return self._get_field_value(Device.PROP_IS_CLOSED) | 0 |
496c8d05ef4b160f1cd4c2578865540e | c2cb5713cfb0a87224a7a083d18f4aaf | Estimate the singleton & pairwise marginals using belief propagation | f_BP = 0
prod = n*np.exp(-h)
prod_u = np.zeros(q)
est_edges = np.zeros((q, q))
for u in adj_list.keys():
np.copyto(prod_u, prod)
for v in adj_list[u]:
muv = messages[edge_to_code[(u, v)]]
mvu = messages[edge_to_code[(v, u)]]
cmvu = np.dot(c, mvu)
prod_u *= cmvu
Zuv = np.dot(muv, cmvu)
est_edg... | 1 |
a6b6023d09dfd5c009de03cfa514bf9b | 134113a26d42fe6156ebd8c8250e1428 | Opens the text dialog sample. | namespace WPFDialogSample.Samples
public partial class SimpleDialogSample : Window
public static string ShowSampleDialog()
{
var instance = new SimpleDialogSample();
string result = null;
RoutedEventHandler clickAction = (sender, e) =>
{
result... | 1 |
d6ea2fc290a4a5423013f708c6549572 | bf534e0e7bc30d3afa178cb6e9b73132 | Counts the number of Unique integers in a sorted array. | {
if(!sortedArray.Any())
{
return 0;
}
int writeIndex = 1;
for(int i = 1; i < sortedArray.Count; i++)
{
if(!sortedArray[writeIndex-1].Equals(sortedArray[i]))
{
sortedArray[... | 1 |
7866bde99243d5bf62db8714cb3e4ea3 | 4679432e7aaa21b207090320a7853838 | Get the number of inputs to the graph
Returns | class NetLayoutBase(object):
def num_inputs(self):
return self.count_inputs("") | 1 |
107fe02e214d9a9c0656d5f52e494500 | 985d16b57f147714c71e3ae00207f7d9 | Opens a SSH connection to the mgmt LXC. | if not self.session:
raise ScrapliConnectionNotOpened
self.session_channel = self.session.open_session()
self.session_channel.pty()
self.session_channel.shell() | 0 |
31024a8c5748b84db1e6521ad7950d71 | 14a87db8b2be4d60df54dbeddc6030e7 | Sets whether the quality of sleep entry is tracked | void setIsQuiet(boolean quiet); | 0 |
0a28dfd1d62bce2a00bf327e97efe7c6 | 87ba22664076603c1b3acf3db4008040 | somamos a variação(0, 1 ou -1) na coluna, atualizando o valor de sua coordenada | var operador = Phaser.Math.Between(0, 1) == 0 ? -1 : 1;
var variation = Phaser.Math.FloatBetween(-gameOptions.variacaoRotacao, gameOptions.variacaoRotacao);
this.newVelocidadeRotacao = (this.atualVelocidadeRotacao + variation) * operador;
this.newVelocidadeRotacao = Phaser.Math.Clamp(thi... | 0 |
68f8acbad6af3129caaa0106a043dae9 | cbb1faf67e3d24a86c29b01762d3f93b | 若输入的是地址 | if (this.inputAddress != null) {
this.inputAddress = null;
}
var objThis = this;
if (!lnglat) {
return false;
}
if (this.geocoder == null) {
AMap.plugin('AMap.Geocoder', function () {
objThis.geocoder = new AMap.Geocoder... | 0 |
21a53084e389e9de9f6b0c1d725b6402 | 9a1230fc4669866b3746ca61644d1322 | バネの変化量(初期位置からのずれ)を取得する。 | {
if (!Initialize() || particleIndex < 0 || particleIndex >= positions.Length)
{
return float3.zero;
}
CompletePreviousSimulationFrame();
return (positions[particleIndex] - prevPositions[particleIndex]) / Time.fixedDeltaTime;
} | 0 |
4f6a783672d3f96540eeda7a3cdb40e3 | 74727697b07ec5b6494f7fe1f8191da8 | Display a listing of the EquipmentBrand. | {
if($request->isMethod('get') and isset($request->name))
{
$brands = Brand::name($request->name);
}
else
{
$brands = Brand::orderBy('name', 'asc')->paginate(25);
}
$department_id = Auth::user()->department_id;
$messages = Appli... | 1 |
6e9d764fd80e23dbd578a38bd20ecf21 | 4d6aeb69ebe4e055a8d6d7d6cccfa025 | Get transaction resource usage set. | class TransactionResource(object):
def details(self):
return self._details | 0 |
379c0c41c92bac4a77d3459c5aa2146f | f5c98a79927c09f4d3baf08bb99abee9 | Method to run the order waiter thread | public class WaitPerson implements Runnable
public void placeOrder(Customer customer, String food) {
try{
restaurant.orders.put(new Order(customer,this,food));
}catch(InterruptedException ex){
System.out.println("Intrrupted");
}
} | 0 |
057f81ffa9ac012534bb9f787793e616 | daa343f7010194978521f9483b3e057a | 将输入的范围wkt转为[xmin,ymin,xmax,ymax] | var point = [];
var cooItem = [];
var cooSet = [];
var plength = obj.boundaries.length;
if (plength === 1) {
var boundary = obj.boundaries[0];
for (var b = 0; b < boundary.length; b++) {
point[0] = boundary[b].lng;
point[1] = boundary[b].lat;
cooIt... | 0 |
9f7438281c21de5a6eab182f50d8c11a | efcdadb31d34c8ecd925f374ebe00771 | Замена запрещенных слов в текст | global $settings;
if ($settings['bad_words_enabled'] == "1" && $settings['bad_words'] != "" ) {
$word_list = explode("\r\n", $settings['bad_words']);
for ($i=0;$i < count($word_list);$i++) {
if ($word_list[$i] != "") $text = preg_replace("/".$word_list[$i]."/si", $settings['bad_word_replace'], $text);
}
}
... | 1 |
451f168a09918eecab22ba2136d43c6a | b82cd15555d18bcac1078be4cb834c54 | 删除Sys_PU_Config对象(即:一条记录 | namespace BLL
public partial class Bll_TPO_APS_CONFIG
public bool Delete(string C_ID)
{
return dal.Delete(C_ID);
} | 0 |
12a34463b117e2890191ced1248860e1 | 5622fb2e201d25a5067b18ce1c125ad5 | Deallocates C objects used to boost EBM. | EMfields::~EMfields() {
delete [] ex;
delete [] ey;
delete [] ez;
delete [] bx;
delete [] by;
delete [] bz;
} | 0 |
f47b9b88eada73a2d4411936c683a273 | 1f783cc20070d7ef028864c3a0401e1a | Function skips whitespace in a string | char *skip_nonws(char *str) {
while(*str && !(isspace(*str)))
str++;
return str;
} | 0 |
2d4599f49b3b2bbfe6c447624ba87740 | b32c3b5a2223a67f5f4d8154947bd1d5 | take average of X and Y acceleration as the zero G value | void computeYAcceleration() {
int sum = 0;
uint8_t i = 0;
for (i = 0; i < bufferDepth; i++){
sum += yAxisBuffer[i];
}
int averageYAcceleration = sum / bufferDepth;
setYValue(averageYAcceleration);
} | 0 |
a859b3eb76d7e51ba1cc0c91da0887ea | 1ed62cf61188560670830f055b7c397e | Função para mostrar o form da pessoa jurídica | {
$searchModel = new PessoaJuridicaModelSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$dataProvider->pagination->pageSize=20;
return [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
];
} | 0 |
30994874285ae521d6d5b64e0596151f | 236abbe6f1927f6bc82961c609a741ff | LTL formula of CLOSE action. | final Formula f0 = from.function(TransferDetails, Purse);
final Formula f1 = to.function(TransferDetails, Purse);
final Formula f2 = value.in(TransferDetails.product(Coin));
final Formula f3 = AbPurse.in(Purse);
final Formula f4 = abAuthPurse.in(AbWorld.product(AbPurse));
final Formula f5 = abBalance.in(AbP... | 0 |
d3448d4bfdd4b7988de4d8df60eb6f2f | 16b743f8066306c97293da40df42117b | 按FixedAssetsID排序,读取所有固定资产信息 | namespace Asset.BusinessLogicLayer
public class FixedAsset
public static DataView Query_V_FixedAssets(string userAccount)
{
string strSql = "";
strSql = "select * From Web_V_FixedAssets where UserAccount='"+ userAccount +"' order by FixedAssetsID desc";
Database db = new ... | 1 |
d3e2b9bb7013766832c179de8896790a | 78b35a0fd896edd31eb7750a46321170 | Setter for relation 'Substitution->SubstitutingClassifier'
Metamodel description:
<i>null</i> | public class CT_VectorG extends OFDElement
public ST_RefID getSubstitution() {
return ST_RefID.getInstance(this.getOFDElementText("Substitution"));
} | 0 |
6bc6be9c7c8379fd4487071665fa9c73 | 76001e1174a95cb454b0d030a6f24b91 | 返回不存在另一个PCollection中的元素,相当于做容器减法 | public class RedisContainer extends Container
public Long sDifference(String key, Collection otherKeys, String dKey) {
return null;
} | 1 |
d7ce04850eab84f26309ed763a1b6c1f | 32e544ccdb0b06ef9036d5bb3084cb75 | Listens for mDNS Service Announcements | def startListening():
serverPort = 2020
global serverSocket
serverSocket = socket(AF_INET, SOCK_DGRAM)
ip = serverSocket.getsockname()[0]
serverSocket.bind(('', serverPort))
s = socket(AF_INET, SOCK_DGRAM)
s.connect(('8.8.8.8',53))
myIp = s.getsockname()[0]
s.close()
print("[announceListener.startListening] ... | 1 |
b9d78513a4a44110b716087469d2d539 | edcea0ae133fa4980264431286185eda | Creates a encryptor session. | namespace MUnique.OpenMU.Network.PlugIns
[PlugIn("Network Encryption - Season 6 Episode 3, 1.04d, ENG", "A plugin which provides network encryptors and decryptors for english game clients of season 6 episode 3, version 1.04d")]
[Guid("AC79C81C-36A1-49A0-85AD-E4DAC7D5C5CE")]
public class Season6Episode3Netwo... | 1 |
52e6bf48c29f5bd6e3bb3d09815a8589 | 52819f2b9ba4ea31b41ffdd0ecb43df0 | Gets a very limited set of CSharp keywords. | {
using (DataTable dt = new DataTable("ReservedWords"))
{
dt.Columns.Add(new DataColumn(DbMetaDataColumnNames.ReservedWord, typeof(string)));
const string line = "ABSOLUTE, ACTION, ADD, ADD_MONTHS, AFTER, ALL, ALLOCATE, ALTER, AND, ANY, ARE, AS, "
... | 0 |
d577336d41436f4f68c2617b940752ac | 2bdc32bda6a5bddce88a1bb60bc3e454 | Edits the bill | @ResponseBody
public String modifyBill(@RequestBody BillModifyForm l){
User user;
Bill bill;
try{
user = userRepository.findOneByToken(l.token);
bill = user.getBillById(l.id);
}catch(Exception e) {
return sendMessage("error", "Cannot find bill");
}
switch(l.param) {
case "price": bill.setPrice... | 1 |
8fd5dc649495535364b57de39fc6e41b | 0a9c8118d26f051bfed5309dfed529ac | Checks if the player name and cave are available | {
if (!cave_isempty(c, y, x)) return FALSE;
if (cave_isvault(c, y, x)) return FALSE;
return TRUE;
} | 0 |
f6b4f1921d5c3b2202b14b1a6fffb30d | 387c9d441f881d1258c96559de65cd91 | Reset depth offset. | namespace kvs
void StochasticPolygonRenderer::Engine::draw(
kvs::ObjectBase* object, kvs::Camera* camera, kvs::Light* light )
{
if ( !kvs::Math::IsZero( m_depth_offset[0] ) )
{
kvs::OpenGL::SetPolygonOffset( m_depth_offset[0], m_depth_offset[1] );
kvs::OpenGL::Enable( GL_POLYGON_OFFSET_FILL ... | 0 |
34cf3c0fb4e337d81749cd03de79cd27 | 3277ff4b212841e1399d5a93ea8644e8 | 处理回报,对回报进行累计,并归一化 | reward_accum = 0
rt = np.zeros(x.shape)
for k, v in reversed(list(enumerate(x))):
reward_accum = v + discount_rate * reward_accum
rt[k] = reward_accum
return x | 0 |
9d78cb717686a65b764390b2c7758bcb | a8abb8fc1f2f6d8f79ef3c7c7a050b07 | Get a lazy collection for the given query. | public class QueryBuilder<T>
public LazyList<T> listLazyUncached() {
return build().listLazyUncached();
} | 1 |
63b38e2ac5423a244aa77776c4bda7c5 | 3d68dc3bcdc92716d253e41a7d246575 | Cleans orphaned published data before a given timestamp. | class StateManager:
def prune(self, timestamp):
self._persistor.prune(timestamp) | 1 |
9008be1e6e775bbac45c04c9bd0b26cd | ea1e35d5497fd2af5b1b5283b374ad47 | Get user input on which conversion they would like to perform | unit = int(input(message))
while True:
try:
int(unit)
except ValueError:
print(message)
continue
if int(unit) not in (1, 2):
unit = int(input('please select an option, 1 for metric 2 for imperial'))
... | 1 |
4e8d143dab1fc7d808e36f360ae7dead | dada5f96785d07ce3b90a65134130fe0 | Ensure we use an admin connection
Plugins can overwrite it to eg. construct a special admin user name | class outagedb_test extends \auth_outage\base_testcase
public function setUp(): void {
parent::setUp();
$this->setAdminUser();
} | 1 |
cef93e0b44b3e80860434f561839db5b | 5f86484d28affadfb7770e4dd724763e | Test the upload files ensuring they can be encrypted then decrypted. | $filePath = dirname(__DIR__) . "/tests";
$res = $this->_client->encryptFileDownload(2017756, $filePath);
return $res;
} | 0 |
9fe01a7924e9fe0066cae96a1427ae3c | 424c269c043f5f6f274e69f3df770005 | Method to invoke when the PopupUOMCommand command is executed. | namespace CPC.POS.ViewModel
public class PopupUOMViewModel : ViewModelBase
private bool OnOkCommandCanExecute()
{
return UOMModel.IsDirty || !UOMModel.HasError;
} | 0 |
7082c9780bfe95eb305713b9035ba283 | a4a191cabab639a1309f68fd8f991bbd | Gets the name of a file without the file extension. | namespace CommonIO
string GetFileNameWithoutExtension(string path); | 1 |
8ce3a64180cbfaefbdbfcfba84e21308 | e61fd5a942f18ddb4adfbebba8d21ac1 | 控制远程鼠标移动事件 | @Route(path = "/app/aty/remote_java")
public class RemoteJavaActivity extends BaseBindActivity<ActivityRemoteBinding>
@SuppressLint("ClickableViewAccessibility")
private void remoteControl(ImageView iv) {
iv.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onT... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.