query_id
string
corpus_id
string
query
string
code
string
label
int64
1ae3550c8696b2a5bea4721e5998ca7b
5a72748e8d998b7bd525c6f4cccd8b46
格子坐标转换成Unity坐标
{ IPoint point = new IPoint(); float x = (pos.x - (-Length * 0.5f + m_offsetInWorldSapce.x)) / m_cellWidth; float y = (pos.z - (-Height * 0.5f + m_offsetInWorldSapce.z)) / m_cellHeight; point.X = (int)x; point.Y = (int)y; return point; ...
0
d674398db6fcd96095cc1b28dc7e7ea0
5cf9a8a7350fd8562095f8d11bd416ce
An empty square only equals other empty squares.
function squareMatchesAvailable() { let square for (let x = 0; x < size; x++) { for (let y = 0; y < size; y++) { square = grid.cellContent({ x, y }) if (square) { for (let direction = 0; direction < 4; direction++) { let vector = getVector(dire...
0
23b9cebd6adc9e03e8226f76dee8ba86
238e4e0d1a60a7172442c44769cf59e5
将整个数组空间初始化为一个静态链表
int i; for (i=0; i<MAXSIZE_FOR_STATICLINKLIST-1; i++) { space[i].cur = i+1; space[i].data = 0; } space[MAXSIZE_FOR_STATICLINKLIST-1].cur=0; return OK; }
1
a526b8ba425fdd3a921f6abdfaa1ceae
5ccbc5641ee78e0698b008edf0168e5b
オンゲキ のプレイ回数を取得
class DiscordApi public function getPlayingMemberCount() { if (!isset($this->gonetoneBotApiNoMembersListData->contents->member_count->status->activitie->playing)) { return "Unknown"; } return $this->gonetoneBotApiNoMembersListData->contents->member_count->status->activitie->playing; ...
0
64f879eb61ce7e6dce356f2eadbfa43a
8aae637342140173afcee7c8e4e6b55d
Überprüft, ob zum testen die Datenbank im Speichert angelegt wird.
{ string dbDir = Cmb(Config.TestDataDirectory, problemId, DIR_DB); lock (GetDataLock(problemId)) { if (Directory.Exists(dbDir) && Directory.GetDirectories(dbDir).Length > 0) return true; return false; } }
1
e90016cd43c25858a096bb1e2ec20d0e
a9ac9ab812bae615f0cbb79cc79a60e6
Gets the "NumberConfiguration" element
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PartWhereUsedDataSetType", namespace = "http://epicor.com/schemas", propOrder = { "partWhereUsedDataSet" }) public class PartWhereUsedDataSetType @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "partRefDesWhereUsedOrPartW...
0
a94020c1ee4dfe72a1e4257b57fc9610
f5fee0da46f31a42ea9eb9891991ea63
聯誼類型儲存
{ Schema::create('setup_kind',function(Blueprint $table){ $table->increments('id')->index(); $table->integer('idCate')->index(); $table->integer('list'); $table->string('title'); $table->string('detail'); $table->string('slug')->index()...
0
42feb0a7a6a22ba0857b8a5ac61d7bbe
af9ac63cba3c3fef06fe6b45501a242b
Called when a mode takes control as the active mode.
class BcpInterface(MpfController): def _mode_start(self, config, priority, mode, **kwargs): del config del kwargs self.machine.bcp.transport.send_to_clients_with_handler( handler="_modes", bcp_command="mode_start", name=mode.name, priority=priority...
1
d0431feb4ef4dfbc128c9dbbfc425c0a
ab006c1554cdf6a08aa5c603b68a84b4
Obtiene un manejador del Servidor FTP
if (is_object($this->ftp)) return $this->ftp; if (function_exists('ftp_connect')) { Free::loadClass('FreeFtp',PC_PATH . 'libs/ftp',0); $this->ftp = new FreeFtp($this->config); return $this->ftp; } Free::loadClass('FreeSocketFtp',PC_PATH . 'libs/ftp',0); $this->ftp = new FreeSocketFtp($this->config); ...
1
73afea41cc1844ba5478c46f796afbb0
e6e3d2a5c8713765dd4376df68265e10
Get attribute 19
public class CustMnjOntBomHeaderViewRowImpl extends ViewRowImpl public String getAttribute19() { return (String) getAttributeInternal(ATTRIBUTE19); }
1
afb8c9df7dbdb8f04001ead5689b0dfd
ba5271886d69120ed4e6347913540f00
Implementation of ":cscope" and ":lcscope"
def openfile(run=False, switch_to=True): name, b = current.line.strip(), current.buffer ln = lnum() headpath = expand("%:h") if name and (name[0] in '~'+sep or name.endswith(sep)): if name[0] not in '~'+sep: name = pjoin(headpath, name) nextwin() if int(exist_eval...
0
7a55ad04b52c520b5313d0e915d28b74
0a3ee6f879766a5e86940c94fb7ae8b0
Gets the number_of_active_runners of this MarketDefinition.
{ if (array_key_exists("runs", $this->_propDict)) { return $this->_propDict["runs"]; } else { return null; } }
0
4c0c7a8db49c3280ea1264ff9170fb36
8094fd49a03053d71651f51faafd956f
este método define as fronteiras válidas entre os territórios, implementados dentro de cada território por meio de uma lista
public class Territory implements Serializable public ArrayList<Territory> getBorderTerritories() { return borderingTerritories; }
1
c85459dfd5a38371c5e3b8293f74a19f
5bc1de5901384dfd030a41bb4fbbfc71
fails before any allocations happen
let mut mem = MemoryInstance::with_pages(1); let mut heap = FreeingBumpHeapAllocator::new(19); for _ in 1..10 { let ptr = heap.allocate(&mut mem, 42).unwrap(); heap.deallocate(&mut mem, ptr).unwrap(); } assert_eq!(heap.stats.bytes_allocated, 0); }
0
c5e876970f9ab37b1668b5badb1d7f37
d610e09732eba6a22afd8f54de977903
METODO POST PARA GUARDAR Y MODIFICAR UN USUARIO
$GLOBALS['mensaje'] = ""; $result = array(); $m = new modelo_usuario(Config::$mvc_bd_nombre, Config::$mvc_bd_usuario, Config::$mvc_bd_clave, Config::$mvc_bd_hostname); if($_SERVER['REQUEST_METHOD'] == 'POST'){ $info = json_decode($_POST['jObject'], true); ...
1
923fd81e122240f294a93913b3e014bc
0884de9410e73ae55f5a7c52bc229f12
Getter for <code>appcenter_mall_data.t_mall_managers.UserName</code>. 用户名称
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CreateOwsCustomerRequest", propOrder = { "userName", "mobilephone", "telephone", "linkmanName", "provinceCode", "cityCode", "areaCode", "provinceName", "cityName", "areaName", "detailAddress", "email", "mobilephon...
0
070a8ce93b248f134e1b74f92ba4c382
c84d3c03ae4f77af08b71cdccc82d20c
近傍のエージェントに修復を行います.
public abstract class Agent public abstract void repairNeighborAgent();
1
a98803218cb1df625829360e99663afd
76e441d7dcce3b24a6d8f5f8af9f635f
moves the given queen down until it finds a safe space; if no safe space can be found, the queen is left in the last row and the method returns false
bool queen_solver::place_queen_in_row(int row) { if (row >= N) return true; for (int col = 0; col < N; col++) { if (is_safe(row, col)) { board[row][col] = true; if (place_queen_in_row(row + 1)) { return true; } else { ...
0
af2b2b9b7c0bf789eba2fbe1a413c091
ca5e55c3c91582c36a2997e5b85a9768
@brief 编辑步骤编号使用的功能键F5回调函数
static void step_no_exist_f4_cb(KEY_MESSAGE *key_msg) { }
0
51f40ff20c59a38962ef086b7af6c387
cf9ed9d44c24806b2ed723039251f9cb
Return a list of image tracks that can be switched to. If the player has not loaded content, this will return an empty list.
handles = [] if self.static and not self.dynamic: return handles previous_id = self.handles.get('previous_id', None) current_id = id(self.current_frame.data) if self.current_frame else None for handle in self._update_handles: if (handle == 'source' and sel...
0
48c0db0770e2f1c2eedd8177ba21153c
98775aaba2ac81388a061f59f42a6021
Gets or sets the callback telephone number
class Boorgeon_Plivo_Response_CallbackUrlRequestParameters extends Boorgeon_Plivo_Object public function setDialBLegTo($DialBLegTo) { $this->DialBLegTo = $DialBLegTo; return $this; }
0
a0f04d912ac4f4ca0bc9d69a1d4bdd17
4cdfb2619bd4d81321ee08d4fedb6893
Actualizar los datos de un tipo de equipo.
{ try { FactorySic.GetPrEquipodatRepository().Update(entity); } catch (Exception ex) { Logger.Error(Constantes.LogError, ex); throw new Exception(ex.Message, ex); } }
1
2e03f61d535a6e0cd523cb398bf127ac
499caf40be8d0c48f9f0e8169c007976
通过出版社 查询isbn信息
public class BookServlet extends BaseServlet public String findByPress(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int pagecurrent = getPagecurrent(request); String url = getUrl(request); String press = url; int index = press.lastIndexOf("press=")...
0
912262b773bf136f147889787afc0b6f
87c1449d13d75466226893a811d3e9a6
Периметр треугольника по длинам трёх его сторон
ppr = (a+b+c) / 2 pl = pow(ppr * (ppr-a) * (ppr-b) * (ppr-c), 0.5) return pl
0
0c5d6da994de73d03df99be8ece21151
46d009687b15978f870deb7dc93417cf
tests whether this is a "countable" (non-UTF-8-interior character)
fn is_noncharacter(c: char) -> bool { matches!( c, '\u{FDD0}' ..='\u{FDEF}' | '\u{FFFE}' | '\u{FFFF}' | '\u{1FFFE}' | '\u{1FFFF}' | '\u{2FFFE}' | '\u{2FFFF}' | '\u{3FFFE}' ...
1
36fbe290d490ce124b03d8e7757150de
d1512b864a66808974369c58a5ec346e
Method for reading data in text fields then constructing a course object from the data properties
Profile profile1 = new Profile(); Scene scene = this.getScene(); TextField Txuname = (TextField) scene.lookup("#uname"); TextField Txcid = (TextField) scene.lookup("#cid"); TextField Txprefix = (TextField) scene.lookup("#prefix"); TextField Txcnum = (TextField) scene.look...
0
7043f42fd5f8ca14a085f19c1ac935f2
a2d9a2c1203338159fbb75c3d6d971df
This function returns the sum of all the leaf nodes in the binary tree which are the left child of their parent node.
public class TreeAlgo public int sumOfLeftLeaves(TreeNode root) { if (root == null) { return 0; } return sumOfLeftLeaves(root.left, true) + sumOfLeftLeaves(root.right, false); }
1
45fdd4ce451fb79b475fffd5d8fbde2c
4d676d1381f8d72ff43ae6f805785b89
Parse out the dict from a visit {content, metaData, links} and add to db. We'll try to add dates to successfully-addded content).
def parse(url): d = {url[0]: []} resp = requests.get(url[1]) soup = BeautifulSoup(resp.content, 'xml') items = soup.find_all('item') for item in items: i = {} i['title'] = item.title.text i['link'] = item.link.text if item.description is not None: i['descr...
0
6bc6e2802f22faed6bfa0440e5d33fd2
5617c31d502eda09339c4c39fdc47bc2
Test that a v2 notebook converted to current passes validation
set_validator(validator_name) with TestsBase.fopen(u'test4.ipynb', u'r') as f: nb = read(f, as_version=4) validate(nb) assert isvalid(nb) == True
0
326564db2bcfa60d5b3ef8c2d5e3194e
a25c408d4ba26ebb571a5201141e6167
Method to get linked list for the hash value
int i = 0; phtrec p; phtrec pNew; HTLINKEDLIST htlResult = NULL; for (p = ht[i]; i < HASHSIZE ; p = ht[++i]) { if (p != NULL) { for ( ; p != NULL ; p = p->prNext) { pNew = (phtrec) malloc(sizeof(*pNew)); if (pNew == NULL) return NULL; pNew->prNext = (phtrec) htlResult; pNew->pcKey...
1
aa937283872d8e7ccff6a522b86b58f7
b1d8d35bdac37123c14e5efb7bd7e2e8
References check
function footnote_ref(state, silent) { var label, pos, footnoteId, footnoteSubId, token, max = state.posMax, start = state.pos; if (start + 3 > max) { return false; } if (!state.env.footno...
1
8a5bc8dfad3c6a681d4ebe31ed6fe09b
366ba1ccf9c4f9153b896679484e16b2
create several streams in a team
let mut server = create_server(); CreateTeam::trigger(&mut server, TEAM_ID).fire().unwrap(); CreateCreature::trigger(&mut server, CREATURE_ID, TEAM_ID, Square { x: 0, y: 0 }) .fire() .unwrap(); server }
0
a8e110b0747899c7b3d61ad1a60c6d84
391ad5fa8b36392f95cdb1c764f29e13
Power settings management for Ondemand CPU frequency scaling mode
soc_power_ctrl_set(uint32_t mask) { #ifndef SOC_MV_ORION if (mask != CPU_PM_CTRL_NONE) write_cpu_ctrl(CPU_PM_CTRL, mask); #endif }
0
58b50b588cfd74a8facb4247f694ddec
17027239f860e512c38a8481eaedae9a
See if the field is actively set: ChgDate (PAYMENT_TRANS.chg_date)
public class AccountBalancesObjectFilter extends BaseFilter implements Serializable public boolean getChgDtFetch () { return this.ChgDtFetch; }
0
6be525c316c876436554fd5b62e3bad6
29bd054f758f2fbfde9457d020baca72
按照id查询商品上下架状态
public String getStatusById(int goodsorderid);
1
b55655e0715389e28f53d633218679b2
b067f8beefcc897b0e31ed67d3ca7b5c
returns current image based off direction
Image result = sfactory.getMove(direction)[stepCounter / 25]; if(state == SpriteState.STAND){ result = sfactory.getMove(direction)[0]; }else if(isInjury()){ Magic magic = ((Injury) state).getMagic(); if(magic != null && !magic.isOver()){ JavafxImageWriter iwriter = new JavafxImageW...
1
f8556c9c5521debc8949812fc4c5e7e9
e023d025da8ede6c6e2de6c3d6f897dc
Returns all country calling codes the library has metadata for, covering both non-geographical entities (global network calling codes) and those used for geographical entities. This could be used to populate a drop-down box of country calling codes for a phone-number widget, for instance.
namespace PhoneNumbers public class CountryCodeToRegionCodeMap public static Dictionary<int, List<String>> GetCountryCodeToRegionCodeMap() { return BuildMetadataFromXml.GetCountryCodeToRegionCodeMap( PhoneNumberUtil.META_DATA_FILE_PREFIX); }
0
a3ddad0d34d7f50ef84e209b0d1be000
24e2032592d0a3e20b809b1e82189bb4
判断字符串是否是日期 例:20110101,2011-01-01,2011/01/01
@SuppressWarnings({ "rawtypes", "unchecked" }) public class StringHelper public static boolean isDate(String str) { boolean bValid = true; boolean bl = false; if (str != null) { try { if (str.length() == 10) { for (int i = 0; i < 10; i++) { String sTem = Integer.toString(i); if (str.endsWi...
0
3ac8ed584325d4dfebc8f656e6d463f1
abc13843f9f4043af1ceeaada5569ef6
<p> Retrieves information about all the message templates that are associated with your Amazon Pinpoint account. </p> Documentation</a>
public getMessageTemplates(filterTagset?: string, filterTagIntersection?: string, filterTagExclusion?: string, size?: number, page?: number, order?: string, extraHttpRequestParams?: any): Observable<PageResourceMessageTemplateResource> { return this.getMessageTemplatesWithHttpInfo(filterTagset, filterTagInterse...
1
0e647a30c008e560f1d247c011b8edbb
6d54d160d7f2efd8236c68d6a53df24a
Получить имя метода в выражении
{ var body = expression.Body as MemberExpression; if (body == null) { body = ((UnaryExpression)expression.Body).Operand as MemberExpression; } return body.Member.Name; }
0
351018c6fb353a663b4cc63dddcc5914
f4f15d84be92663117d3f93ad5f6bae5
Increases the number of external repetions by one
counted_node_ptr new_counter; do { new_counter = old_counter; ++new_counter.external_count; } while (!head.compare_exchange_strong(old_counter, new_counter)); old_counter.external_count = new_counter.external_count; }
1
0e258d467972115b5e8f7f176d5a29d5
4b92fbb7bdda55a7b3eac890b1672570
Returns the amount of time spanning from the first click (in the queue) to the last.
namespace Iot.Device.SparkfunQwiicButton public class SparkfunQwiicButton : IDisposable public uint TimeSinceNewestClick() { return Read32(Register.CLICKED_QUEUE_FRONT); }
1
ed3f30a68caf929d2f565e52f60fcc41
f17f05a761e75189dbde7460aa3cb25e
测试Automapper的extension
public void testAutoMapping() throws IOException { InputStream input = Resources.getResourceAsStream("mybatis-only-config/SqlSessionConfig.xml"); SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(input); SqlSession sqlSession = sessionFactory.openSession(); Stud...
0
a23b0a85052f723609edcffde86750b1
9a64b9b2efed71dcd63c5d86ed687662
Creates a timer to perform scheduled updates for the specified profile.
class ProfileService public function updateSchedule(string $profileID, Schedule $schedule): array { $payload = array('schedules' => array()); $payload['schedules'][] = array( 'days' => $schedule->getDays(), 'times' => $schedule->getTimes(), ); return $this->c...
0
2cc2f46843f7d53cf468bf9a2fc12639
ef0e3862ccdf9873a49ca52bbce97d9e
останавливает сервис синхронизации мультибуфера
{ lock (_syncLocker) { if (!_serviceClient.IsValueCreated) return; _conProxy.Dispose(); } }
0
59047970f95fbb4f14d28a876d4a8f97
4201ca7c559aa2d01df9a21b1187f6fe
加载停用词信息
namespace boobooks class CommFun public static void LoadStopLib(string file) { foreach (string word in File.ReadAllLines(file, Encoding.Default)) { if (word.Length > 15) continue; stopDic.Add(word); } }
1
decada109802bf75c9861e57335a59ac
50f922b66c8082a64b5c70c3d5210c7a
A userlist_collection should support the userlist type.
$cut = \context_system::instance(); $uut = new userlist_collection($cut); $this->assertSame($cut, $uut->get_context()); }
0
d910df1bbf03c4bb845d9082a25a89d4
f9b8e9b0d85702b84955e5753f47327f
Returns confidence (score) of the current tracker output Returns: float: Score between 0 and 1 (where 1 is more confident)
class Tracker(object): def blurred(self): return self._tracker.blurred
0
542208d7cbdc0cb25bf0ff7960c3d4bb
1b4a52d7781677e9bbb0b90b556d9dc7
Handling the fetching of an animal as per animal id
namespace PetShopProject.Controllers public class AnimalController : Controller public async Task<IActionResult> Index(int id) { try { return View(await repository.GetAnimalDetailsAsync(id)); } catch (Exception e) { ...
1
7940d6c4ba40dc0b33fb372fa8f92088
752542d7067c22f6b288d96702089eab
Gets the <see cref="ILog"/> implementation for this factory.
namespace Enyim.Caching public static class Logger public static ILoggerFactory GetLoggerFactory() => Logger.LoggerFactory ?? new NullLoggerFactory();
0
8258e70ee2fd2f407b684a0fe6d16bd8
613ec977ee79f5faf71993447ad66a99
Función que devuelve la matriz adjunta de la matriz que la mande a llamar.
def getTMatrix_GS (aMatrix, decimales): matrizInversaResta = getMatrixForMatmul(aMatrix,decimales) matrizTriSup = np.negative(np.triu(aMatrix,1)) return np.around(np.matmul(matrizInversaResta,matrizTriSup), decimals = decimales)
0
50280e7d7ced025f1a361c0749f02455
e368c440ca28348501c55ea926ebc41d
Returns a new object of class '<em>CONTEXTRESTRICTIONCONSTRAINT Type</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
DOMAINCONSTRAINTSType createDOMAINCONSTRAINTSType();
0
9d9dd824a6067c7784a6c7e84360f12c
3defee81bdf10ecb2cff4a1a4a75dbeb
Convenience function to join two road segments together, end to end.
namespace OsmSharp.Routing public static class RouteExtensions public static Route Concatenate(this Route route1, Route route2) { return route1.Concatenate(route2, true); }
1
d83377302b3d6689009a84a3f065bedb
ae76dc9013065a251791d60171ebadba
Returns the next power of two greater than or equal to the given value.
{ if (value < 3) throw new IllegalArgumentException("value must be greater or equals 3!"); int power = Integer.highestOneBit(value - 1); return 2 * power; }
0
4500476f6c49a5bc48f6e9cc61db54b2
847dc86406372f0f5d2118b01d36ca0d
explicitly disallow extreme values for start and end
class ExponentialSmoothing(TimeSeriesModel): def _enforce_bounds(self, p, sel, lb, ub): initial_p = p[sel] loc = initial_p <= lb upper = ub[loc].copy() upper[~np.isfinite(upper)] = 100.0 eps = 1e-4 initial_p[loc] = lb[loc] + eps * (upper - lb[loc]) loc = initial_p...
1
4472078031bea4f6d0d7d01c815577b3
193fbf7ad261fe221f6aa0ab1d9bc0c4
Adicionando CSS e JS no plugin GDPR Compliance
if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', '//code.jquery.com/jquery-3.1.1.min.js', false, '3.1.1'); wp_enqueue_script('jquery'); } wp_enqueue_style( 'oirtemsops_semantic-css', get_template_directory_uri() . '/assets/semantic/semantic.min.css' ); wp_enqueue_style( 'oirtems...
0
f2bda53bd81e4b7c1e8c40127a1e2f9f
f0a4e01c54154678023c5fec595c7059
Keeps track of an SMS that has been sent to the RIL, until it has successfully been sent, or we're done trying.
d = self.get_sms() def process_all_sms(smslist): if not smslist: return [] return [sms.get_index() for sms in smslist] def errback(failure): failure.trap(ex.CMEErrorNotFound, ex.ATError) return [] d.addCallback(process_all_s...
0
10fe2b71d5eebc8e6dbbd1722ed38df7
56c77186e0532cec77a3de1216051218
Request a new Safeguard API access token with the underlying credentials used to initial create the connection.
export class Auth extends Rpc newToken(options: AuthNewTokenOptions) { return this.fetch({ endpoint: "ext/auth", method: "auth.newToken", params: options }); }
1
c02008c0954806cb375a388b5e1cc1c2
b787b2027d72ca6d31bdd801f9209d42
対象デポの最新の承認日を取得
class EstimateTrn extends AppModel function getInvoiceIssuedDateByCustomer($customer_id){ $data = $this->find('all',array('fields'=>array('invoice_issued_dt'),'conditions'=>array('customer_id'=>$customer_id,'adopt_flg'=>ESTIMATE_ADOPTED))); if(count($data)==0){ return null;} return $data[0]['EstimateTrn']['inv...
0
b5337f7b25d7909191246d8613c1cd64
765a2a344468ec62a03167c1b1a1b474
Gets the http connection read timeout in milliseconds.
public abstract class AbstractHttpConnection implements IHttpConnection, IDestroyable public final long getConnectionTimeoutMillis() { return tcpConnection.getConnectionTimeoutMillis(); }
0
43d17fcd173dd6e129e7bc126cf9a5f4
92dc012b7e70eb3f4a932b4a3257cbc3
Translates the model used to translate CAST to AIR into the final AIR structure.
translation = list(self.universe) universe = list(range(len(translation))) operations = {} for op in self.operations: operations[op] = self.operations[op].rename(translation) relations = {} for rel in self.relations: relations[rel] = self.relations...
1
61eedf725444ef4d77e5351ff6d59d22
03aac4fa5607d39d3816ba98a56e8991
Изменение статусов у нескольких подписчиков
{ int result = 0; string[] userArray = userIDs.Split(','); foreach (var userID in userArray) { UnitWork.Update<User>(u => u.Id == userID, u => new User { Status = status }); result...
1
6fd8b076d1876508c22233e967a57138
d25d6db4e854614092e9f9a3e9207e4f
Performs common validation for Maintenance Document saves.
{ base.ValidateProperties(modifiedValues); if (this.EntityState != Core.Data.BusinessObjects.Entity.EntityStateEnumeration.Deleted) { foreach (ModifiedProperty modifiedPropertyInformation in modifiedValues) { ValidationResult result = null; Core.Data.BusinessObjects.Entity.ValidatePropertyE...
0
c3bae0db4f93fbce287760114a89900f
360a76bf569c7aee723105db15024f67
查询自定义报表配置列表
{ if (CheckSession(false) == false) { return Json(ResultModelBase.CreateTimeoutModel(), JsonRequestBehavior.AllowGet); } if (CheckSessionID() == false) { return Json(ResultModelBase.CreateLogoutModel(), JsonRequestBehavi...
1
e447d8848259b0ed4b3e1ba590176053
8cb74a7764bc742813b4b4904b22fc05
Returns the number of RANSAC inliers.
class BaseRansacSolver(ABC): def get_inliers(self) -> np.ndarray: raise NotImplementedError
0
153d8b2429218cd47ac7e1c658d815d1
5542ddbd5b15fca8916c346ddea9e65c
Find X recently added products.
(new Count())->goCheck(); $products = ProductModel::getMostRecent($count); if(!$products){ throw new ProductException(); } $collection = collection($products); $products = $collection->hidden(['summary']); return API($products); }
1
c0316fadc5f26b651fc10431d6738e91
8daf3a08a99f1cc8c09e2e6e1e57e255
Verifica se planilha está aberta
public class EtcWorkbookManager public boolean isOpened() { return (_excelbook != null); }
1
079af49c8d4d1406259ce64a7d9b4624
b647c59493d6cc7e97934f43bf1238b8
Do some work to make time pass.
public class MySelectionAdapter extends SelectionAdapter private void doLongThing() { for (int i = 0; i < 10; i++) { try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("Doing something"); } }
1
214dc655356dccd7612244b83becf450
c559df105cd9c9d562d31e7f68a3cd32
============================================================================== getMethod() ==============================================================================
class ZendExt_Service_Bets_Bet365 extends ZendExt_Service_Bets_Abstract private function _getMethod() { return 'POST'; }
1
4f3ea6d81009b5d1bbaf2ce907440ad1
6c1aa3cef66249ccc7fec79441c56a50
szukamy, czy istnieją 2 liczby pierwsze X,Y takie, że dowolna liczba naturalna N idzie być zapisana jako N = X + Y
int main() { int k = 1024; #pragma omp parallel for for (int S = 0; S < INT_MAX; S++) for (int X = 0; X <= S; X++) { if (S == k && (k *= 2)) std::cout << "S : " << S << "\n"; std::bitset<32> bit_S(S); std::bitset<32> bit_X(X); if (solve...
0
76cfbeef9eea4740f67e64b7d4a5df9e
104c9fa16c904c15b35912f267293315
Loads the report builders.
{ AggregateCatalog aggregateCatalog = new AggregateCatalog(); foreach (var file in new FileInfo(typeof(MefReportBuilderFactory).Assembly.Location).Directory.EnumerateFiles("*.dll")) { try { FileUnblocker.Unblock(file.FullNam...
1
698851235c208c4d675e5e58fff7c2cc
8879890dec1c81376f2332526f940ebc
Endpoint to return the current exchange_rate.
public async Task<ActionResult> Index([FromQuery]GetExchangeRateRequestDto exchangeRateRequest) { var result = await exchangeRatesProvider.GetConversionRate( exchangeRateRequest.SourceCurrency, exchangeRateRequest.DestinationCurrency, exchange...
1
1ff577589fb2499ccb9d23ed4500c79d
ff5bf096449125a5259354134418b56e
用于子类接收登录成功广播通知
public class CarDetailActivity extends Activity public void registerLoginSuccessBcastReceiver(){ IntentFilter myIntentFilter = new IntentFilter(); myIntentFilter.addAction("LoginSuccess"); registerReceiver(mLoginSuccessBroadcastReceiver, myIntentFilter); }
1
193757c0f275986bb0cb8ea1b23d9d09
de5e1655f0b62aa0b722930e3f44a8c9
Constructor function that defines needed data structures
class Twitter Twitter() { connections = unordered_map<int,set<int>> (); tweets = vector<pair<int,int>>(); }
1
d54e9a87670b0404953ea53cdeb92a5f
a8c99576ddfb030777d7423ecef069ca
通过点击设置网格类型
public class Map : MonoBehaviour private void SetGridType(GridType selectType) { GridUnit clicked = SelectGrid(); if (clicked&&last!=clicked) { clicked.gridUnitData.gridType = selectType; if (selectType == GridType.From) { if(from!=null) ...
1
9f50115f7bf9ba329c728b967e9d2b90
5d73c89b3d810927859f58d8918cd751
Check whether 'func' has a '__call' metafield. If so, put it in the stack, below original 'func', so that 'luaD_precall' can call it. Raise an error if there is no '__call' metafield.
void luaD_tryfuncTM (lua_State *L, StkId func) { const TValue *tm = luaT_gettmbyobj(L, s2v(func), TM_CALL); StkId p; if (l_unlikely(ttisnil(tm))) luaG_callerror(L, s2v(func)); for (p = L->top; p > func; p--) setobjs2s(L, p, p-1); L->top++; setobj2s(L, func, tm); }
1
a5cb69e659b8f78429b4d7535e850519
d7c71a7e9cc8d169230112dba424e720
Raise an Exception with message 'area() is not implemented
r = Rectangle(2, 10, 1, 1, 1) with self.assertRaises(TypeError): r.area(1)
0
1e390a46e14791c25e003083674a7308
d0df9abe6ae4ba88c1123ad1fac9fd48
Перезапускает таймер обновления
{ if (!NotUpdating || (AppSettings.UpdateSessionMinute == 0 || ListBases.Count == 0)) { _timer.Stop(); BorderUpdateSessionMinute.Background = new SolidColorBrush(); } else { _timer.Interval = AppSettings....
1
78af5fb3214e07016539b5f4c126748b
677a5c3582b5f806b2b4b6f7b6e74618
Prevent Saturday and Sunday from being selected.
function scheduleAppointment($rootScope, $timeout, $http, $scope) function disabled(date, mode) { return (mode === 'day' && (date.getDay() === 0 || date.getDay() === 6)); }
1
ddf01861faa47701b90f2e0cfe7c23ed
b8f2a6969f6e28307bddf7ffe034e13c
Filtra los formatos según los permisos del usuario ingresado.
export class PermissionsHelper static formatPermissions(items: any[], target?: string): {[key: string]: string[]} | string[] { const formattedPermissions = { 'menus_manager': filter(items, (item: string): RegExpMatchArray => item.match(REGEX.MENU)), 'page_editor': reject(items, (item: string...
1
c43dd898ce6b8a49a1083aa181450671
080d913ead7e60c5e6133965fdace14a
Symfony controller action for editing a CampaignChain Activity in a pop-up window.
{ $activityData = Doctrine::getTable('ActivityData')->find($request['id']); if (!$this->isActivityPostable($activityData)) { return sfView::NONE; } $this->targetMemberName = $activityData->Member->name; $this->postActivityData($activityData); return sfView::NONE; }
0
e765113dc35b1b1e6139b36628977cb7
c12206784009a0ece29b3ceb19c95ce4
use to get athlete Id from Strava API
function parseId() { var str = $($("#user-profile-details").find("p")[1]).text(); return $.trim(str.substring(str.indexOf(":") + 1)); }
0
0a371ada9f86caa39c2df1edc9a64e2c
9605232c4c36f5de9d36270a321354cd
指定された期間の文言を返却する
def get_context_date(context_size, date, txt, idxs_date=None): txt = np.array(txt) if idxs_date is None: idxs_date = np.argwhere(txt == date).ravel() left_context = [] right_context = [] for idx in idxs_date: left_bound = max(idx - context_size, 0) right_bound = min(idx + con...
0
3ae96041ce599fc4635e51270c25a854
3176d96ff98b5f4ea261218dac6454ae
Validate difference between attributes.
class Changed extends Condition protected function attributeHasChanged($attribute) { return $this->before->attribute($attribute)->jsonSerialize() != $this->after->attribute($attribute)->jsonSerialize(); }
1
a13c0fbd13b821faccbd4bc01482128a
c25246db8e5498cd2d966f2e37b5e6fa
Adds boolean signal to relevant maps
database.getReference("Users_data/" + userID + "/schedulesId/" + schedule).setValue(true); database.getReference("Users_data/" + userID + "/directionsID/" + direction).setValue(true); }
1
04b0ac8f6727c9366c73feded9943ee4
4fc16f802e2b12d6173a7786e9e74dc5
Inicializa lo necesario para el 'MessagesViewer'
{ NM_FUNCTION; mListModel = new NmHsWidgetListModel(); connect(mListView, SIGNAL(activated(const QModelIndex&)), this, SLOT(openMessage(const QModelIndex&))); connect(mListModel, SIGNAL( messagesAddedToModel() ), this, SLOT( handleMessagesAddedToModel() )); connect(mListModel, SIGNAL( ...
1
cd396e475234cfda73cb5c1971f8e96a
13f023772ad3996aec673f5684b76d7d
根据订单号返回用户vip卡可退金额
namespace Hyt.DataAccess.RMA public abstract class IRcReturnDao:DaoBase<IRcReturnDao> public abstract decimal GetReturnCoin(int orderSysNo);
1
29d91b95285468fbb409b192fcd39929
b1dd245882745ac966fb09a17ce8f913
Método que permite obtener todos los registros de forma de enseñanza a fin de cargarlos en el formulario
{ using (InlockContext ctx = new InlockContext()) { return ctx.Estudios.ToList(); } }
1
52ba2b64c1256421769294f5e07f01b3
abc658cfbef3604ee84e87bb2f719ce1
获取指定账户与所有角色的关系 说明: 1.返回的是账户与数据库中所有角色的关系(包括不存在的) 2.如果存在的关系则有详细的信息(如id,createTime);反之则没有
try{ return accountRoleMapper.findAccountRole(accountRole); }catch(Exception e){ log.error(e); throw new CRUDException(e); } }
0
7411beecc8ccad2027ac7efe34edcd02
2488e56d33d03f77a5a26c33576211b5
Remove any visible call notification
public class IncomingCallObserver implements BBMEIncomingCallObserver static void stopNotification(Context context) { NotificationManager mgr = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE); mgr.cancel(INCOMING_CALL_NOTIFICATION_ID); }
1
05561c6085cc0a99b96d5db4804f953c
86bba670f05f30b3ba09c1f702519ccf
UART Receive ISR
{ EA = 0; if (RI == 1) { RI = 0; #if UART_USE_DATAFRAMED_RECEIVER == 0 _UART_InterruptHandler(SBUF, 0, 0); #else switch (_UART_State) { case 0: _UART_State = 1; _UART_ReceivedType = SBUF; _UART_TimerCount = UART_TIMEOUT_PER_BYTE...
1
c219960ec907f1ff9c257e4889881a3c
34daa900aa4bbee046eab3dea19fd9ca
文件名fileNameStr加后缀suffix
def add_suffix_to_file_name(file_name,suff): filename_split = file_name.split('.') return '.'.join(filename_split[:-1]) + suff + '.' + filename_split[-1]
1
747ac597b45bbbade11b0056e92b12c6
52afeee51e95165631aa6f10cda590f9
strips whitespace from form entries, converting them to null entries if pure whitespace. pure whitespace entries are then flagged by the @NotNull annotation
namespace Synnduit.Preprocessing [Export(typeof(IPreprocessorOperation<>))] internal sealed class WhiteSpaceNullifier<TEntity> : IPreprocessorOperation<TEntity> where TEntity : class public void Preprocess(IPreprocessorEntity<TEntity> entity) { foreach(EntityProperty property in ...
1
a228cb0f5986352859ac96eb29f9b27f
d96fe6eaf73c15b3c58d377eb5a3b973
租赁平台:箱子进出仓库
def enter_leave_site(data): try: site_id = str(data['site_id']) boxes = data['boxes'] ts = str(time.time())[0:10] box_type_set = set() with transaction.atomic(): for box in boxes: box_id = str(box['box_id']) type = str(box['ty...
1
03e1ff843b9287bf1d04f0048ed660ed
8a523fd66b57a87028365748c2693331
Draw a point as a sphere
{ glPushMatrix(); glTranslatef (x, y, z); glutSolidSphere(0.5, 16, 16); glPopMatrix(); }
1
357af0e843754ed05985c9da841f76f8
70709997560052cff70a5bea3583c51c
# RELATORIO ASSINATURAS REALIZADAS
class ColetaController extends Controller public function relatoriodiario(Email $email, PDF $pdf) { $lotecoleta = $this->coleta->where('data_coleta', $this->dtatual)->distinct()->get(['lote_id']); $numcoleta = function($loteid) { return $this->coleta->where('lote_id', $loteid)->where('data_c...
0
9700ed1f2ed1ef8bae168b3111238c96
e02701d4903fa96b0168657c6d8573c6
如果按键符合规定好的快捷键要求 返回对应的其内容
def pressed(key): return __actual_keyboard[key]
0
81130c6b04341805cf8cdf2ffae5b915
7b600e791044d54dbf84b1cfcc32341b
To proper case and trim.
class ConvNameInfo(AbstractConv): def simplify(self, s): s = unidecode.unidecode(s).lower().replace('-', ' ') return s
0
5876bc2c2161803815535a0ed09e6cc2
aa8c78cfc1d5458fc2eabe0f893a9f70
<p> Creates a policy with the specified attributes for the specified load balancer. </p> <p> Policies are settings that are saved for your load balancer and that can be applied to the front-end listener or the back-end application server, depending on the policy type. </p> CreateLoadBalancerPolicy operation returned by...
public abstract class LoadBalancerFactory public abstract LoadBalancer Create(LoadBalancerOptions options);
0
b10c4794c6707c8fae1a4e61324bb4a4
fb9cb1fc61348a105afe4b6fecc41453
Get a listing of all filesystems in this pool.
try: return self.connection.listStoragePools() except libvirt.libvirtError as error: log.error(error) return []
0