query_id
string
corpus_id
string
query
string
code
string
label
int64
6d45cce8d3dc0475a07004d6f4d5d0cd
e4bc120597b3c43633326c2b9f1c0577
Gets the session for assigning spatial coverage to an asset.
class RepositoryManager(abc_repository_managers.RepositoryManager, osid_managers.OsidManager, RepositoryProfile): def get_asset_spatial_assignment_session(self): if not self.supports_asset_spatial_assignment(): raise Unimplemented() try: from . import sessions except Impo...
1
05eec7a519b4f4a44240708ac1d3ace4
f1a7f3cc623603b9e3a5148161e46dfe
takes in an iterable and returns an array which contains all of its elements.
function toArray(iter) { var arr = []; while (true) { var val = iter.next(); if (val.done) { break; } arr.push(val.value); } return arr; }
1
eed14f4d5de9828a40069202d93da16e
12b6326af339d0783eada9330dd8711f
Releases all resources consumed by the current <see cref="ReadOnlyPinnedMemory{T}" />.
namespace CsDebugScript.Engine.Utility internal unsafe class DumpFileMemoryReader : IDisposable public void Dispose() { stream.SafeMemoryMappedViewHandle.ReleasePointer(); stream.Dispose(); memoryMappedFile.Dispose(); fileStream.Dispose(); }
0
42051b6d63cba850b2da2461e2b75b31
1b500e538114922b0e68ef044cbfd8d8
获取周长,精度算法
length = 0 estimate_frequency = 1000 for i in range(estimate_frequency): p0 = e.point(1 / estimate_frequency * i) x0, y0 = p0.real, p0.imag p1 = e.point(1 / estimate_frequency * (i + 1)) x1, y1 = p1.real, p1.imag length += math.sqrt((x1...
1
525df630a36aad318541b8f18ae85be5
5a0cf42b4f5b905182eeec3932b864cc
Tests a field against many kinds of validations
class BaseFieldCase(unittest.TestCase): def test_field_simple(self): f = Field(str) with self.assertRaises(TypeError): f.validated(1) with self.assertRaises(TypeError): f.validated(1.0) with self.assertRaises(TypeError): f.validated(None) self....
1
6209bba34c490a02c63e9734ce6346f7
b6a754d084768c28d14a8b128fc6511e
玩家听牌
{ joyLdsPlayer.pHnads = cards; Actor_JoyLds_Deal actorJoyLdsDeal = new Actor_JoyLds_Deal(); actorJoyLdsDeal.Cards.Add(joyLdsPlayer.pHnads.ToArray()); joyLdsPlayer.SendMessageUser(actorJoyLdsDeal); }
0
081c63c3a96df71a92d3a49ba1cdec08
6ada7201ce696a3fafecbb819ca53de7
Creates an instance of HubError.
export default class HubError extends OperationError constructor(operation: string, message?: string, rootCause?: Error) { message = message || "UNKNOWN_ERROR"; rootCause = getWithDefault(rootCause, "rootCause", rootCause); super(operation, message, rootCause); this.name = "HubError"; this.stack = g...
1
12c321a23f7207357d95f71cc2c7d1de
5c482a50ddc9d02a58e3646f1cf40b26
Initializes the tt array. This method is called when the required length of the array is known. I don't initialize it at construction time to avoid unneccessary memory allocation when compressing small files.
{ int[] ttShadow = this.tt; if ((ttShadow == null) || (ttShadow.Length < length)) { this.tt = ttShadow = new int[length]; } return ttShadow; }
1
b3e1e59d58cbc0015620cdbfab94e849
c03d12a89f481ca6bc2c8d08bdfef8a9
索引图转RGB图,生存VRT时需要读取瓦片地图RBG图层信息
int width = datas.GetLength (1); int height = datas.GetLength (0); WriteableBitmap re = new WriteableBitmap (width, height, 96, 96, System.Windows.Media.PixelFormats.Indexed8, atpalette); byte[] tmp = new byte[width]; for (int h = 0; h < height; h++) { for (int w = 0; w < width; w++) { tmp[w] = ...
0
2e5bc2193ce6ad64ffa0ca7871304dde
7708ad22f8804fd8839fc78b7289a749
递归查询两个节点中值不一样的XPATH
namespace Hawk.ETL.Crawlers public static class XPathAnalyzer private static bool GetDiff(HtmlNode node1, HtmlNode node2, List<string> paths, bool hasAttribute = false) { if (node2 == null && node1 != null && node1.XPath.Contains("#") == false) { return false; ...
1
1c7981de56b7ffc0e35a8fa65bf98886
3109560bfde1ecd931218fe045eef845
parses a bibtex string into a list of dictionaries
def parse_bibtex_single(text): doc = parse_bibtex(text) return doc.entries.values()[0]
0
e5cd2c57142ddd390caa7980cee6adef
49ddfea0cfe045f24f1240b616a158ae
Devuelve el siguiente sectario que hay en el mazo de sectarios y lo elimina de él. Si al iniciar el método el mazo estuviese vacío, pasa el mazo de decartes al mazo de monstruos y lo baraja.
public abstract class MeteSaca<T> public abstract T saca();
0
f7114f824486c40b3305c5f8368547f3
089c5cd2e440d51e0fb40ff5db301f2c
Converts the world coordinates into geographic coordinates.
namespace Geodesy public class UtmProjection : MercatorProjection public override EuclidianCoordinate ToEuclidian(GlobalCoordinates coordinates) { return ToUtmCoordinates(coordinates, out _, out _); }
0
d0aa315acfeeb95d1ef9080a30077e19
fb4fcf377a1fe3b4a529accbcce4f81b
Get the cached data for the given filename if the file has not been modified. If no record exists or file has been modified, return default. Modification is checked by comparing the cached and current file stamp.
class myUser extends sfBasicSecurityUser public function getAccountCachedData($file_name = 'null') { if (is_null($file_name)) return false; if (file_exists($this->getAttribute('HomePath')) && (is_dir($this->getAttribute('HomePath')))) { $fale_path = $this->getAttribute('HomePath') . '/' . $file_name; i...
0
121fb5f493fbd87493054c84368c8691
f68fd322ae2c1e73155b06e3e100c798
trigger the writing, but by default only on equal steps
Write_Substep(const std::string& title,const int substep,const int level) { if(level<=write_substeps_level){ frame_title=title; std::stringstream ss; ss<<"Writing substep ["<<frame_title<<"]: output_number="<<output_number+1<<", time="<<time<<", frame="<<current_frame<<", substep="<<substep<...
0
febe84e5cac91635ed8b01e3a8a62006
68d7194ef262d599e07b1406a949c8ef
Pull test port high for failure indication.
void loconet_hw_force_tx_high(void) { loconet_tx_port->OUTSET.reg |= loconet_tx_pin; }
1
82f4ff25c4e7e66cc5f6b1976be18073
03853f43a69857d6a71dc48bc5a2db30
function that prompts user for a string of characters (no more than 10) and scans the string into an array
char character = 'a'; int count = 0; while (character != '\n') { scanf("%c", &character); if (isdigit(character) == 1) { arr[count] = character - '0'; count += 1; } } }
0
79584a34c811446232bfa070a733c801
9564b332980f3da8db29cc6067f2da28
ResponseClassMap constructor.
class DomainSoapClientBuilder extends SoapClientBuilder protected function getClassMap() { return [ 'DomainCheckResult' => 'TransIP\Model\DomainCheckResult', 'Domain' => 'TransIP\Model\Domain', 'Nameserver' => 'TransIP\Model\Nameserver', 'Who...
0
32186c260eb48a0f5d8d43b3c9d948fc
08e8cb64b01812bc79545fdf24ef0be5
Test case 004a: variation on 004 with spaces instead of tabs
def test_whitespaces_paragraph_with_tabs_before_within_unordered_list_and_single_space(): source_markdown = """- abc \tdef""" expected_tokens = [ "[ulist(1,1):-::2:: ]", "[para(1,3):\n\t]", "[text(1,3):abc\ndef::\n]", "[end-para:::True]", "[end-ulist:::True]", ] ...
0
e7be372f4bb3265bdc182c91f2b1ad4c
28eb853652c8176f8b462eae05f8f660
Test the zwave lock clear_usercode service.
await setup_platform(opp, LOCK_DOMAIN) with patch("abodepy.AbodeLock.unlock") as mock_unlock: await opp.services.async_call( LOCK_DOMAIN, SERVICE_UNLOCK, {ATTR_ENTITY_ID: DEVICE_ID}, blocking=True ) await opp.async_block_till_done() mock_unlock.assert_called_once()
0
e7dd76488609613b3b4abed5775c9f99
9f362440b799815f8b3544a5d53e39b7
函数说明:生成叶结点
def make_leaf(oper, n): return Node(oper, value = n)
1
91c26dd6abc415a053c24685167834e8
c003b139d724bb7e3ada59d4407f4fca
Trigger discovery of devices which have already been seen.
public partial class AdministrationManageUsers : ApplicationBasePage private void DiscoveryDevices() { if (Application["APP_LAUNCH_COUNT"] != null) { int deviceCount = DataManager.Provider.Device.GetDeviceCount(); if (deviceCount == 0) { if (int.Pa...
0
18a56521d7a86fef4f921d3f1181fbad
c419561279374966a452546d142b4625
Mise à jour du booléen d'utilisation de la couleur par défaut
public class DataAttribute public Boolean SetUseDefault(Boolean state) { m_DefaultSetting = state; return true; }
1
d8ac922a32eba36024dba03af2e709ab
04ad4ea56b7bab998b0715061c5b0b1b
Calculates the bin width of one bin in y/ch2 direction.
full_tlist = self.get_full_tlist() if full_tlist is not None: return np.min(np.diff(full_tlist)) / 2 else: return 0.0
0
b7760ab137165c9be92aed0360ab899f
3f972aca96cb58a81c82daa79ff514ef
Log the attributes of a PlotProfile
class PlotOptions: def __init__(self, profileList, labelList, dashList, line_width, annotationList, title, xlabel, ylabel, legend_loc ): self.profileList = pro...
0
feb0fbe45cc46214085223ffbd662301
9071dac2a251bcfa89ed9795657d5575
Add the current user as a follower of other artists Requires** the [SpotifyScope.UserFollowModify] scope [Api Reference](https://developer.spotify.com/documentation/web-api/reference/follow/follow-artists-users/)
namespace CSharp_SpotifyAPI public class SpotifyAPI public dynamic FollowArtist(string id) { string endpointUrl = "me/following?type=artist&ids=" + id; HttpMethods.SendPutRequest(endpointUrl); return "Followed artist"; }
1
ce502e8b9806a226ad4253737d18ae26
5ac69a318904c88aabe86f294211d3b7
Add allowabled dates (defined by) $options from $range to $ranges
array $ranges, ValuesBag $valuesBag, ValueComparisonInterface $comparison, array $options, $exclude = false ) { foreach ($ranges as $i => $range) { if (!isset($ranges[$i])) { continue; } foreach ($ranges as $c => $va...
0
4fc1b88caebecc92da7bf158d2d71826
c153b342764fe95e1d09a6251a26727d
## the VIF value for the individual fixed effects.
glm.fit <- glm(FDiv ~ poly(nbsp, x), data = SES.FDPD) cv.glm(SES.FDPD, glm.fit)$delta[1] }
0
9ecc30c68692c31038459deb0cefe33c
b9b479f1e66ffba53d48f84d747a65b3
Creates and saves the distance graph.
graph = ox.graph_from_point((27.7864647,-82.673489), dist=500) ox.plot_graph(graph, show=False, save=True, filepath='test-clean.png', close=False) ox.save_graphml(graph,SAMPLE_GRAPH_PATH)
1
0d8f05a90ea884db7c260c1c7aa82cf6
ff7125e7b2cb85ab2c2d616c9322277d
{@inheritDoc} This implementation expects config to be an instance of {@link BdbjeCacheStoreConfig} <p /> note that the <code>m</code> is not currently used as SleepyCat has its own efficient solution.
@Test(groups = "functional") public class LocalCacheTest extends AbstractLocalQueryTest protected void enhanceConfig(Configuration c) { }
0
e37415bf0e97ccde6e507035e49af420
67ef2468ed9ee3ebede51f779a0457d8
Given a pacage name, return the value of __file__ attribute. In PyInstaller process we cannot import directly analyzed modules.
def get_package(): return os.path.basename(os.path.dirname(os.path.realpath(__file__)))
0
993a57b7e8c3a60a72431eef3c8ceea3
7de4e37ef548406ee186d84c89a5e5b9
Regression test for HADOOP-8423: seeking in a block-compressed stream would not properly reset the block decompressor state.
namespace Avro.Test.File [TestFixture] public class FileTests [TestCase("{\"type\":\"record\", \"name\":\"n\", \"fields\":[{\"name\":\"f1\", \"type\":[\"int\", \"long\"]}]}", new object[] { "f1", 100L }, Codec.Type.Null)] public void TestNonSeekableStream(string schemaStr, object[] value, Codec.Type cod...
1
c7aed8e9866262964716f805e09164b8
f256633945d296431bffc7b011d45534
This takes a list and sends each element to process(). The list may be a string or any iterable object.
void foreach(Processor<T> process, int mode);
0
784b37ed7d460a1f18954c9bdebf79a7
252cc3f08dac585b9e7928d2ab40f490
Switch to right tab.
if self.count() > 1: cur_index = self.currentIndex() if cur_index == self.count() - 1: cur_index = 0 else: cur_index = cur_index + 1 self._switch_tab(cur_index)
1
42162a881b1ef78742c5a6ff2b502020
9f47b13d243c439159abfa231307cf30
Enter first name.
public class registrationPage extends BasePage public void firstNameEnter(String text) { WaitTillElementIsClicable(txtFirstName); txtFirstName.clear(); txtFirstName.sendKeys(text); }
1
c32d3f0e99e03146d86e48bd61964b29
2371d8a51be25726e89a4dbfecde8056
在str中匹配ptr
{ register unsigned int i, sz; wchar_t ch; wchar_t *pstr = (wchar_t *)str; ch = *psub; sz = wcslen(psub); while( (pstr = (wchar_t *)wcschr( pstr, ch )) ) { for( i = 1; psub[i]; i++ ) { if( psub[i] != pstr[i] ) break; } if( i >= sz ) break; pstr++; } return (wchar_t *)pstr; }
1
5a6a778d15700da209ad64eebb6d44a8
1966b0c7731a2504de82cb564bfaa470
检查给定的迭代器是否包含给定元素.
public abstract class CollectionUtil public static boolean contains(Enumeration<?> enumeration, Object element) { if (enumeration != null) { while (enumeration.hasMoreElements()) { Object candidate = enumeration.nextElement(); if (ObjectUtil.nullSafeEquals(candidate, element)) { return true; } ...
1
720ad01122f4cf61298906913fa68d99
a99606f59081d0c9fc93a49d4cb9a18e
unaryServerInterceptor configures the context and sends it to the next handler
req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { start := time.Now() h, err := handler(ctx, req) duration := time.Since(start) log.Printf("request duration %s", duration) return h, err }
0
55f63461ed86adae55db9bbc8be88686
ea68001008d721ab0694b3e1190d5559
查询用户可兑换的物品(优惠卷和实体物品)列表
namespace HJDAPI.Controllers.Adapter public class CouponAdapter public static List<ExchangeCouponEntity> GetExchangeCouponListByUserIDSourceID(Int64 UserID, Int64 SourceID, int SKUID) { return couponSvc.GetExchangeCouponListByUserIDSourceID(UserID, SourceID).Where(_ => _.State == (int)ExchangeCo...
0
4f394c2c6ddc0c487ff1b6a82e55296f
01cd8a5ad4d20b39c7a158acf2a86231
寻找游戏id并集
{ QVector<int> monster_id_list; for(int i1=0;i1<15;++i1){ for(int i2=0;i2<15;++i2){ if((map[i1][i2]>=30&&map[i1][i2]<=49)||map[i1][i2]==80||map[i1][i2]==81){ int index; if(map[i1][i2]>=30&&map[i1][i2]<=49){ index=map...
1
9f7abab819a49cb718308a2a76581850
93ec091eb2e8c0fc73f4c952742eeb03
Create and annotate an image.
img: PIL.Image.Image = self.load_orig_image(i) if not self.mask_exists(i): anns = self.raw_anns(i) mask = self.annotations_to_mask(orig_img_size=img.size, annotations=anns) self.save_mask(i, mask) mask: PIL.Image.Ima...
0
320553c32b72662827511d1f78e1d2a3
7a68cd1fd2f216a4d02d3f9ccec33b31
Filter that receive a token list and returns a tokens list with lowercase words
def lower_token(tokens): return [w.lower() for w in tokens]
1
c5e63a3e131683209bf7bc5122951605
57d52f7f3950c0ba1b04fcc73ea58e5a
Create a new peer for replication.
static struct io_plan *connectd_new_peer(struct io_conn *conn, struct daemon *daemon, const u8 *msg) { struct peer *peer = tal(conn, struct peer); int fds[2]; int gossip_store_fd; struct gossip_state *gs; if (!fromwire_gossip_new_peer(msg, &peer->id, &peer->gossip_queries_feature, &...
1
0d683f1c4ed5e7d24fed1d7c9ca98e45
105833a4009792a85aa0e78a935c5fea
通过设备号修改设备在线状态
void modifyDeviceState(Long deviceId,Long statusId) throws Exception;
1
529d0f005787eb4df75613f7fb48a984
ec190e7293b4ef50d698f683387189fd
Just demonstrate how it gets printed.
func Howdy() { fmt.Println("\n************ Simple Hello World ***********") fmt.Println("\nHello World from Go!") }
1
0ca732efd5c1c2fa974cd86f43cb22dc
4f4205cc7c5f0f72a17899d56ea0b75e
Sets a subtype breakdown for a resource.
class FHIRContract extends FHIRDomainResource implements \JsonSerializable public function addSubType($subType) { $this->subType[] = $subType; return $this; }
1
d56275814249ac23e3673fee113b389a
01609ce83375cc8e3aa664306f05f982
Pull out data from slotted view elements to use in routing/lazy-loading.
class LazyLoader extends LitElement async loadLazy () { }
0
be4325ef7646bd44a31b6e2c720ad3bf
89d83f80ea5377429fc1ebf9766bc93e
Test for set embedded font from request
public class SVGGeneratorContext implements ErrorConstants public final void setEmbeddedFontsOn(boolean svgFont) { this.svgFont = svgFont; }
0
a4578adff3ca9d30863e75dedffd5ae6
b6728e753d325c091ebcffa262a285ac
Insert the documents using the insert command asynchronously.
namespace YeaJur.Data.MongoDb public class DbHandler<TDocument> public async Task InsertAsync(IEnumerable<TDocument> model) { await Collection.InsertManyAsync(model); }
1
b38da96e7f946f92726b3a990dbffbc1
2584628cdcc8381de08240255abcd5bd
When a shape radio button is changed, hide dimension's group box and it's content's or reveal them.
namespace PracticeTask public partial class Form1 : Form private void tableRadioButton_CheckedChanged(object sender, EventArgs e) { SwitchVisibility(); }
0
c66c12cc61b7db255b55fd46476cb1e1
982e791951514a52caa38109c09878ae
Deletes an existing Cuenta model. If deletion is successful, the browser will be redirected to the 'index' page.
{ $eliminada = Cuenta::findOrFail($cuenta->id); Cuenta::destroy($cuenta->id); session(['mensaje' => 'Cuenta bancaria eliminada con éxito.']); LogSistema::registrarAccion('Cuenta eliminada: '.convertirArrayAString($eliminada->toArray())); return redirect()->ro...
1
f7a0625e77ccc9c70773ba32e3291de5
cd49abc27a989ff92db95026e3e12974
遍历所有TextBox控件
namespace ABInbev.Web.Pages.Admin public partial class AdvnceBank : BasePages.BasePage public void EmptyTextBox(ControlCollection controls) { foreach (Control c in controls) { if (c.Controls.Count > 0) { this.EmptyTextBox(c.Controls...
1
055e3a921d72231b3a1ebd79d9e6eeca
09c3c44467f27720f7b2c81f5c45374f
拖拽选中单元格
{ if (e.Button == MouseButtons.Right && e.ColumnIndex >= 0 && e.RowIndex >= 0) { dataGridInfo.CurrentCell = dataGridInfo[e.ColumnIndex, e.RowIndex]; } }
0
408a0098023bb88e3d432fcd3985693e
18150a79cc2aad789dd055a400097dc3
おじさん(40歳以上)配列を返す
namespace PersonManagerSystem.Controllers.SAProject public class CountController : Controller public JsonResult Age45() { int IsResult = cm.Age45(); JsonResult json = new JsonResult(); json.JsonRequestBehavior = JsonRequestBehavior.AllowGet; json.Data = IsResu...
0
e658676f0c7200785edb06be079489af
0b81c668b720d7d057b0e195428fdd04
Adds new routine to the list.
namespace Threading public class Pool public void AddRoutine(WaitCallback workitem, Object parameter) { Monitor.Enter(witems); parameters.Add(parameter); witems.Add(workitem); Monitor.Pulse(witems); Monitor.Exit(witems); }
1
53001c050563dc4317254af9cf98e588
cf842ff18606960124f481c2f3ad4f39
[<i>idx1[,idx2]...</i>] Return value of the particular array element as CvScalar.
CX_IMPL CxScalar cxGetND( const CxArr* arr, int* idx ) { CxScalar scalar = {{ 0, 0, 0, 0 }}; __BEGIN__; int type = 0; uchar* ptr; if( !CX_IS_SPARSE_MAT( arr )) ptr = cxPtrND( arr, idx, &type ); else ptr = icxGetNodePtr( (CxSparseMat*)arr, idx, &type, 0, 0 ); cxRawDataToScala...
1
520a32ed979e2d66ffa5a3a0b897e4d4
0fe720bd6d5840fae386546ecd6ff239
Finds all four corners of the partition grid
bool rspfImageGeometry::getCornerGpts(rspfGpt& gul, rspfGpt& gur, rspfGpt& glr, rspfGpt& gll) const { rspfDpt iul (0,0); rspfDpt iur (m_imageSize.x-1, 0); rspfDpt ilr (m_imageSize.x-1, m_imageSize.y-1); rspfDpt ill (0, m_imageSize.y-1); bool status = true; statu...
1
a6f04731e1c851e1a9f44a90ff2b6751
51724497b5b832e5dcefd48d0446c16b
返回一个集合的全部成员,该集合是所有给定集合的交集。不存在的 key 被视为空集。当给定集合当中有一个空集时,结果也为空集(根据集合运算定律)。
public final class JedisSetsImpl extends JedisKeysImpl implements JedisSets @SuppressWarnings("unchecked") public Set<String> sunion(String... keys) { if (keys == null) { return Collections.EMPTY_SET; } return jedis.sinter(keys); }
0
686206e5b0806b5e112f36fa0f11ae83
23163fb40f5e8620b524ce4e3197b21f
获取当前线程的logger
if(UtilBoss.ObjUtil.isNull(SystemStatus.logger)) SystemStatus.logger = new CatLog(); else { String name = SystemStatus.logger.getClass().getName(); if(!ApplicationDatas.LOG_CAT.equals(UtilBoss.StrUtil.substring(name, name.lastIndexOf(".") + 1))) SystemStatus.logger = new CatLog(); } SystemStatus.logger.se...
0
d028f26107de9112f5979001c067981b
07664dcb4ec70bd378415f83c5119be8
Context manager opens the file on enter
class FilePath(autopaths.base_path.BasePath): def __enter__(self): return self.open()
1
105f7554f2b90d04300bdbdc3bd5f168
07eaac866ec356a747fdfc62cec3fa87
Verifica si existe un articulo en una determinada factura.
$factura_id = Filter::get($factura_id, 'int'); if (!$factura_id) { return NULL; } $colm = "factura_detalle.*, articulos.nombre, articulos.mpn, articulos.codigo, articulos.precio_venta, articulos.tipo_articulo "; $join = 'LEFT JOIN articulos ON articulos.id = factura_d...
1
3bd12f5ad0354a1d76017f36d78c3cd2
464d32931cf0dbec590923c09ce71792
集群节点的编辑(修改集群名称,id,修改时间,修改人)
var row; if(index!=undefined){ row = JsVar["busClusterGrid"].getRow(index); }else{ var rows = JsVar["busClusterGrid"].getSelecteds(); if (rows.length == 1) { row = rows[0]; } else { showWarnMessageTips("请选中一条记录!") ; return; } } showEditDialog("修改集群信息","98%", "98%",G...
1
e8239b15adca3c40d623e80cbab69eac
53d8892b6c743cb3af114bf389eafefa
创建延时调用
{ let tsk = new Task<T>(); tsk._delay = delayMillsec; tsk._finishCallback = this._finishCallback; this._next = tsk; return tsk; }
1
9923dec867d560d0e81c41a458c3de74
9546d13d25521bb0a867528f32dcdb6e
Returns an object of an error "Access Denied"
namespace elFinder.NetCore.Helpers public static class Error public static JsonResult AccessDenied() { return FormatSimpleError("errAccess"); }
1
1812ac223f060d0b56b1632b6cd0d66f
5d3b067acd88c1d6fc88bf74bdbd29c5
Method to numerically calculate the derivation of the fitness function for trait one
double numerator = exp(lambda * (1 + fitness) * (tend - t1)); double f = numerator / (numerator + exp(lambda * tend)); return f; }
0
4412b54415654a3c6ad3d2379691894e
f0a0e16bec38f612cf181cc0137837f9
设置机器人干扰任务条目
local function createTaskItem(index) local cellSize = cc.size(self.mGuajiListView:getContentSize().width, 55) local cellData = self.mGuajiTaskList[index] if not cellData then return end local taskItem = self.mGuajiListView:getItem(index-1) if not taskItem then taskItem = ccui.Layout:create() taskIt...
0
39be20832b652d237a5f1cd6b714d823
c1bb0c1d8713cfe3bcbe2c492958b57d
Extracts properties from given K8S object.
{ var name = default(string); var image = default(string); var imageRegistryCredential = default(ImageRegistryCredential); var entryPoint = default(string); var commands = default(IEnumerable<string>); var environmentVariables = default(IEn...
1
dd29c46888d2470ad8d35ede9eac3d04
944cd0ae30e7cd52f0977db75ec33b51
will invalidate a page table entry given a frame number
assert( page_offset_of(addr) == 0 ); pte_t *pte = vm_lookup_page_table_entry(addr_space, addr, false, NULL); if(pte != NULL) { clear_pte(pte); invalidate_mapping(addr_space, addr, false); } }
0
cb9366bf97be85284bba79e468ad6275
f86267d83a1856067104d4086e05d7dd
Permet de récupérer un frais forfait en fonction de la clé fournie
$query = "SELECT f.*, c.* " . "FROM frais f " . "LEFT JOIN classes c ON c.IDCLASSE = f.CLASSE AND c.ANNEEACADEMIQUE = :anneeacad"; return $this->query($query, ["anneeacad" => $anneeacad]); }
0
cb39034bfbcc3655a9bc6e655752267d
03439f1856df4a66de09e2b6d5520295
查詢單一會員 by Account
public Member selectForMemberByAccount(String account);
1
f9b8e67864c59f9ecafc5a2364a67bc1
6e8ac92bb8f8a12868e6e340f92af718
Adds a new the timeline event view to the timeline.
namespace Orion.UWP.Services.Interfaces Task AddAsync(TimelineBase timeline);
1
e2eecf973acae6c0fb7f8fb91be6e9c3
7913195a5c23d9bb550031427fd4a481
the upper number is exlcusive
namespace STL_LAMBDA class Compare bool operator()(int a) { return (a > _m) && (a < _n); }
1
d86a6d8f677d138ece4738a45c1d376e
ebefe452c0ac86b626f9514b991156c6
Get JS Conditional Config
{ $conditional = '<!--[if ' . $conditional . ']>' . $embed . '<![endif]-->'; return $conditional; }
0
c4227644ff1145c2aebd5d8373e5591f
e6fd37408f7097aa208c0d1a0725f8a2
Summation of alpha parameter.
def alpha(q,k,mu): return 1. + k*mu/q
0
a2d87eff17409030bfa6d218dc208caf
55de6e33006148e3440bc5cb89057332
The number of subscribers who may have been added outside of the double opt-in process, such as imports or API activity.
class GtmInstanceArgs: def sms_notification_count(self) -> pulumi.Input[int]: return pulumi.get(self, "sms_notification_count")
0
ce3c41f8d5ad9c4ec5aedf04cbbba0e2
1cb06041abdb67ed4130d5c1ad714cda
Tests the menu and tab option form.
$this->drupalGet('/multiselect_test/page'); $options = []; $this->assertOptions('.js-form-item-no-default #edit-no-default', $options); $options['banana'] = 'Banana'; $this->assertOptions('.js-form-item-single-default #edit-single-default', $options); $options['cherry'] = 'Cherry'; $this->as...
0
ac348de681408e96f8057f1bc619fc1f
2d14bc4404ae054cbd16f85aae1db18a
Retrieves an array of local databases
class MWConfigCacheGenerator private function &getLocalDatabases() { return $this->wikis; }
1
b8f2e9ca2e8e34a4ab30e2a51ed95fb1
fb0b36ad2c7e938e590cbf2512210fe3
set_yaw - send condition_yaw mavlink command to vehicle so it points at specified heading (in degrees)
void set_key_yaw(char value) { if(value == 1) { drone.key_yaw += KEYBOARD_STEP; if(drone.key_yaw > MAX_TRIM_YAW) drone.key_yaw = MAX_TRIM_YAW; send_packet_ack(ACK_SUCCESS); } else if(value == 0) { drone.key_yaw -= KEYBOARD_STEP; if(drone.key_yaw < MIN_TRIM_YAW) drone.key_yaw = MIN_TRIM_YAW; send_...
0
857f3385615d1cf04abcb0b5d3d67f6b
29670e505bc2d515954fcacad7720bbb
Creates an entity list view. Each view provides display context levels (site, tenant, catalog, master catalog) and settings for the list of entities.
class CmsController extends Controller public function listEntities($categoryName, $entityName) { if (!sizeof(Input::all()) && Session::get("listViewInput_{$categoryName}_{$entityName}")) { $input = Session::get("listViewInput_{$categoryName}_{$entityName}"); return redirect()->route...
1
bf3a167fc6d9612e4fabd4ea132ca243
3da9055afbbd56dea94c2952cbc31efe
コイン数が変化した時に加算、減算を行なう
if(type == 'add'){ this.diceCount ++; } else if(type == 'sub'){ this.diceCount --; } if( this.diceCount >= 6){ this.diceCount = 6; this.addBtn.opacity = 76; } else if( this.diceCount <= 1){ this.diceCount...
1
1d4b5b7e40032d94e57a4d251988083b
f9d662315cc3a4e0ea8a450a64961b48
Push new fixture to the list
class Core_Migration_Fixture public function addFixture($fixtureName) { $this->_fixtures[] = $fixtureName; return $this; }
1
5fde04eabbfde53ba626500b0ff8576a
d443442107d760bd943f708fac917e18
Normalizes line endings to only be unix based ]
{ $text = str_replace( array( "\r\n", "\r", "\n", ), "\n", $text ); $text = str_replace("\n", $this->eol, $text); return $text; }
1
fff3589c978f8a0f73b452c366f61c4a
9f03dd10a4f1de5b77bdff754c26de58
The stats (pledges, voters, voting intentions) for a given constituency
namespace PKW.Contracts [OperationContract] VotingSummary GetVotingSummary(int? constituencyId);
1
748127d84f8f8d78a09f34cb8599f9cd
b98b612c252528dcf8adfb2f88355c6f
Valida si el usuario registrado es COORDINADOR
class AppUser function isCoordinator(){ return $this->is(COD_TIPO_COORDINADOR); }
1
6ad7087dcb799f27bed3d91defa49c83
1aaef5f9a89bf4e15f2ca15dc64620fc
Loesche eine Raumreferenz aus einem Array.
{ int i = 0; pthread_mutex_lock(&mutx); for (i = 0; i<sizeRoom; i++) { if (arrRoom[i].id == roomId) { while (i++<sizeRoom - 1) arrRoom[i] = arrRoom[i + 1]; break; } } sizeRoom--; pthread_mutex_unlock(&mutx); }
1
9b1b0c529a647b7049b9509330dd9bbf
2231e9f73f0ee10f7d7e2303391bdeaf
Метод добавления элемента snilsInput, для ввода значения СНИЛСа в текстовое поле. Выполнен на базе [\yii\widgets\MaskedInput](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinput) Дополнительные опции: Ключ массива | Тип значения | Описание `wkkeep` | bool | Сохранять состояние элемента при обно...
$options = array_merge($options, ["mask" => "999.9999.999-9"]); return $this->renderInputText($name, $options, $attributes); }
1
b47c0efa0bd601a9cc10df15dd8367f9
4a41435687c9ab2718924ae815713aec
Test encoding function to convert DNA sequence to binary output
np.testing.assert_array_equal(self.a.seq, np.array(['A', 'T', 'C', 'G', 'T', 'C', 'G', 'C', 'G', 'G', 'A', 'T', 'C', 'G']))
0
b3b79190362695b16c377951bf703dfd
b4bc3860763812b9f9a052911cf53794
populates the textView with content from the wordlist
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String[] words = this.getResources().getStringArray(R.array.words); ListAdapter adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R...
0
19fb44d64e2641763e82c1347740fd4f
fde6bda08cddda588fb37b0eae28730b
Returns the jobID that this task attempt belongs to
public final class JobResultChunk<T> implements Serializable public long getJobid() { return jobid; }
1
8ca05471a96ec2a44c15a812de661ca1
ddd2ff7375449c77048beb2f6bc8dea8
Build the pairs of fighters with the given lists of FightingUnit
{ List<DamageRequest> damageRequestList = new List<DamageRequest>(); for (int i = 0; i < Attacker.priority.Count; i++) { damageRequestList.Add(new DamageRequest(Attacker, AttackedUnit, Attacker.priority[i])); } for (int i = 0; i < AttackedUnit.priority.Count; i++)...
0
1be9301ad8db9a0e06b8fc77729e94f7
c9b262ef224c4be8789f0813473799dd
Returns member's got requests profiles with their info.
class Groups public function getRequests(): GetRequests { return new GetRequests($this->_provider); }
0
f2f711fe9d56d216df75102a8d955d25
aa4778803a0bb4534e87ed42c5cd1872
Add customer to end of movie wait list
{ Customer cust = new Customer { FirstName = firstName, LastName = lastName, Time = DateTime.Now }; QueueBLL bll = new QueueBLL(); bll.InsertNewCustomer(cust); return WaitingList(); }
1
00eba9047b0d0cdcea555de3c30f0591
05cb09ab7f913b7cbe72416e3fc0980f
Sets rotational offset that will be applied to each mobile pose. Use radians.
public EntityBuilder setRotation(float rx, float ry, float rz);
1
54a6c67eb91f1af533c1b5bb88893740
294435d42253f937816d9066cad4c6ba
Return a resource argument for parsing a target http proxy.
def get_proxy_string(proxy_host_port): if proxy_host_port is not None: return '-o ProxyCommand="nc -x %s %%h %%p" ' % (proxy_host_port,) else: return ''
1
331e10f0ac07de466c187f42c1ba8ff5
008688c0e8293e83c1311e181f00b163
generic function creating a list of objects from a config specification objects are: analyses, robots, worlds, tasks, losses, ...
elements = [] names = expand_hostlist(namespec) for name in names: if kind == "server": element = FabricServer(name=name, kind=kind) elif kind == "service": element = FabricService(name=name, kind=kind) log.info("creating {0...
0
be2f677ce1df4621c9593be92411de2f
871361c12f68bde67a7cffcf5d7da0de
Проверяем общедоступные страницы
class UrlTest(TestCase): def test_urls_allowed_guests(self): urls = [ '', '/about/author/', '/about/tech/', f'/{self.user_1}/{self.test_post.id}/', f'/group/{self.test_group.slug}/', f'/{self.user_1}/', ] for url in urls: ...
1
8b5ffd484d5c15544eee2713f43411aa
34bdfc7624f63bd8c7e91c8f9fdc13b4
驾驶人信息驳回
$(obj).attr("disabled", true); $.prompt({ title : "驳回预约单", text : '请输入理由', input : '', empty : false, onOK : function(input) { Utils.ajax({ url : 'learnDrivingBack/reject.action', data : { "id" : backId, "reason" : input, "userAccount" : backAccount }, success : function(d...
1
880272ca2771f460323b49b54674a8af
318d6139ebf182a15be6bd42c0aafea5
Gets the length_in_minutes of this CoachingNotification. The duration of the appointment on this notification
String stringPeriodInMinutes = Prefs.getString( R.string.PKEY_notification_period); int periodInMinutes = Integer.parseInt(stringPeriodInMinutes); return periodInMinutes * 60 * 1000; }
0
91978eedf1014968e7686fdb0ce393fc
f3920b5d4d3023955b99b877308e96bf
这个函数是针对DataFrame类数据,以通用型方式向某数据表中插入,即有重复的,则更新columns里对应的数据
if table is None: table = fallback_table if isinstance(table, list): table = table[0] if column is None: column = fallback_column dfw = orca.get_table(table) if column not in dfw.columns: dfw.update_col(column, data) else: dfw.update_col_from_series(colu...
1
5bd052fafecbfd86bba06406ff59ffd6
0e367ff6a7f8fbf523115f69f93b96b7
Обработчик события таймаута. Вызывается из мененджера событий Устанавливает ошибку таймаута и запрещает прерывание
def handler(signum, frame): raise Timeout()
1