query_id
string
corpus_id
string
query
string
code
string
label
int64
6575ddbe1b1d9f93945bc3537f08b4c9
b503051f05fcecf941af9aa363c04e7b
Returns true if every entry in the database has been added.
class BatchRead def complete? unprocessed_keys.none? end
1
2493f1431cdfe2da922c95dccbe7348d
ab2292c70393c404d4ea0fe3138f691c
[firebase] 친구 정보를 저장하는 메소드
firebase.database().ref('users/' + userId).set({ username: name, email: email, profile_picture : imageUrl }) }
0
27b51b0dc0732cc24dc53203d3022da0
25cc099921d407039f95528ef9004298
Async (event driven) wait for given time period (in seconds)
class AX18A: # AX-12A constants def wait(s): start_time = time.perf_counter() target_time = start_time+s current_time = time.perf_counter() while(current_time < target_time): current_time = time.perf_counter()
0
6c51a3c71c8220875ed285968b5a9b2f
525f33065c73d6c417edec0280786c7d
Выбирает сокет, доступный для чтения/записи и вызывет функции, выполняющие необзодимые действия
printf('Запущено соединение с сервером') self.connected.clear() while not self.connected.is_set(): self.server_addr = determine_address() self.server_port = determine_port() self.server_sock = socket.socket(socket.AF_INET, ...
0
4c03c025f3e593cae62c70c3c8ffcd64
2d2d6d30683b5069701ee50735455b91
Learns a linear value function with TD lambda.
class SARSALambdaContinuous(TD): def __init__(self, mdp_info, policy, approximator, learning_rate, lambda_coeff, features, approximator_params=None): approximator_params = dict() if approximator_params is None else \ approximator_params Q = Regressor(approximator, **approxim...
1
66582a2948a6793b2c563e1264c00920
e021e197da06a11501218d8e34941eb0
Returns the meta object for the reference '{@link org.example.domainmodel.domainmodel.Feature#getType <em>Type</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getFeature_Type();
1
3e8190b3921fbe62f65bd95f1148535e
78f0dad6f5e18099bd84f29e394f3c1a
Draws the eye, either closed or open with the iris in the current position.
g.setColor(eyeColor); g.fillRect(xPosition+size/2,yPosition-size/10,size/7,size/5); g.fillOval(xPosition+size/2,yPosition-size/10,size/4,size/3); g.fillRect(xPosition+size/20*19,yPosition-size/10,size/7,size/5); g.fillOval(xPosition+size/20*17,yPosition-size/10,siz...
1
ac4edbd22e6b33f25aa8b4caa58f36ae
1403e8c59f884cc10d92c86abe8825cc
Function to compare two strings (combined logic of strcmp and strncmp).
int i, flag = 0; for(i = 0; (s1[i] == s2[i]) && s1[i] != '\0' && s2[i] != '\0'; i++); if (s1[i] < s2[i]) flag = -1; else if (s1[i] > s2[i]) flag = 1; return flag; }
1
22e8331d70d3c2d44e62d1fbc665b7d4
db93bd5499f07088bbb7667149151600
Returns true if the command's current result is an array of values.
public static function getResponseIsArray();
1
79bedc5f9eb9445c0c0f024fc1a3dd84
1547bdf5e28d1f9803975134efb1f255
自定义DSL查询(支持多服务关联查询)
@Slf4j public class PersonRepositoryTest extends SpringBootEsApplicationTests @Test public void customAdvanceSelect() { NativeSearchQueryBuilder queryBuilder = new NativeSearchQueryBuilder(); queryBuilder.withQuery(QueryBuilders.matchQuery("remark", "东汉")); queryBuilder.withSort(SortBuilders.fieldSort("age").ord...
0
972da019afc16254db66ea3eccf7f7c4
33a5a61a101bf97bcbd5c1227154e588
This simply redirects users to the site root
class SiteController extends Controller public function actionIndex() { return $this->redirect('index/'); }
1
ab0de8a85cdf81693502259251a63862
6b555174b64faa79ff98ded47149c70b
Configure the Ethernet interrupt.
void eth_int (void) { #ifdef DEBUG2 DEBUG_PRINTF("eth_int: Ethernet interrupt occurs\n"); #endif }
0
72087ecd6db37d7fa6e9210f7e1cd862
ab2663110f58e95bc645a4ce88fea326
获取 记录抵扣的上限
public class PaymentPlanDO extends BaseDO{ public java.lang.Long getPaymentLimit() { return this.paymentLimit; }
1
f9388a7e13d3f4dba651367fefad1da5
f11256b7b1f7b69a12555b8274197146
in-place normalize maximum value to be 1.
public static void Normalize(this ref __vtype__ v) { var s = v.Length; if (s == 0) return; s = 1 / s; v.__f__ *= s; }
0
3b0b088d4856e56d600bd47caed0b926
dbdc63ffe791c5d36f921fcd2a91d537
保存记录时更新编辑信息
namespace D24550 [SmartPart] public partial class F29550 : BaseSmartPart private void SetEditRecord(object sender, EventArgs e) { this.EditRecord(); }
0
83904c605661bbe18934dfd46ab0a550
b7d790107c0c2efeaa8ca326c6df0654
поиск замены удаляемому элементу
{ if ((currentEl.Element == end.Element && currentEl.Next == end.Next) || currentEl.Element == element) { if (currentEl.Element == element) return currentEl; else return new Point(0); } else { Point sear...
0
dfbea743de3761982ae4759c3ecbd355
e7ae0ac41655b7bd6c7d473a5f931d55
Returns an array of <code>String</code>s recognized as names by this property source that begin with the supplied prefix. If no property names match, <code>null</code> will be returned. The comparison is done in a case-independent manner. <p> The default implementation calls <code>getPropertyNames()</code> and searches...
final String[] propertyNames = getPropertyNames(); final String prefix = inPrefix.toLowerCase(); final List<String> names = new ArrayList<>(); for (final String propertyName : propertyNames) { if (propertyName.startsWith(prefix)) { names.add(propertyName); ...
1
12efc1daad152157e79391dc89c1ae5f
8474a132003b153d8414f2cacf2d4f40
Accion que cumple la funcion de Proxy entre servidor de mapas configurado (WMS) y OpenLayers.
{ var cleanurl = url; if(typeof layer == 'undefined') {layer="so2";} SpaceMapUtils.addWMSLayer(cleanurl,layer); }
0
7999d6b04c454a86429d9a0ea370908f
4e5aea287173af040f7e9bbf1199e204
根据条件更新UserHandleInfo中指定记录<br/>
try { return userextractDao.updateByExampleSelective(record,example); } catch (Exception e) { String msg = ExceptionUtil.getInstance().getExceptionMsg(e); logger.error(msg, e); throw new Exception(msg, e); } }
1
1158f85c894bc2cd816d265c3bccd3a8
a357b6778ac33985fe4c5327c5a12241
Checks if product is valid in database
@Component public class ProductMicroserviceMock implements IProductMicroserviceMock @Override public boolean verifyProduct(ProductDto productDto) { return Boolean.TRUE; }
0
da9061cb5f815557cff8486a563e4027
5647751c9b2931f44945b3523d7ced95
Only create new document if one does not yet exist
async function findOrCreateDocument(id) { if (id == null) return; const document = await Document.findById(id); if (document) return document; return await Document.create({ _id: id, data: "" }); }
1
714184e8357c29edb9e0b588bf3fabe8
1d940a406aae0a194ae0e813426132e0
Função que retorna o peso do operador em uma expressão no formato infixa
int resolvePrefixo(char *exp) { Pilha *pilha = criarPilha(strlen(exp)); if (!pilha) return 0; char res; for (int i = strlen(exp) - 1; i >= 0; i--) { if (exp[i] == ' ') continue; else if (verificaOperando(exp[i])) { inserirElemento(pilha, exp[i]...
0
49931b5b49c2f612c7b95086553e238a
13d201c15d4c326c8c2f741b1badc8e9
Returns an enumeration of the event receivers.
{ yield return AreEnabled; yield return Filter; yield return Email; }
0
969053f2080167804f72f5a2d56078d4
0e4de0d855a212ef43296f441c4f0382
返回消息,如果无消息,最多等待 10秒
public class HttpGetService public int WaitMessage(int requestId, long waitTime, RefObject<String> ref) { int isContain = 0; try { while (waitTime > 10) { synchronized (m_httpsGetResponseData) { if (m_httpsGetRespons...
1
ba577dbdee802b99bf7937472d9b4b60
5f7675a044efb5803186071eded19a9c
获取localStorage中的用户信息
getUserInfo () { return JSON.parse(window.localStorage["userInfo"] || `{}`) }
1
07c7e884a00c7b65d893041bac9a622a
2264b3684d3d73e2f26a9803dfe8deeb
Retrieves a goal information using a specified ID. Provides the goal information of the goal whose ID matches the one specified.
namespace Nucleus.Api public partial class GoalApi : IGoalApi public async System.Threading.Tasks.Task<GoalTrack> GetGoalTrackUsingGetAsync (Guid? goalTrackId) { ApiResponse<GoalTrack> localVarResponse = await GetGoalTrackUsingGetAsyncWithHttpInfo(goalTrackId); return localVarRespo...
1
c192a22f19a1c59c887f253c5b75b819
1d16c7320703db08916c87a8b5713db3
获取超级管理员角色名称
namespace SexyColor.BusinessComponents public class RoleNames public string SuperAdministrator() { return "SuperAdministrator"; }
1
1b7b9e9bd8cf24f61f56bccb1c96bd7e
ce76bb51876b549004751823bff1c4d7
將Json檔轉成assetbundle
{ string importerPath = "Assets" + assetPath.Substring(Application.dataPath.Length); AssetImporter assetImporter = AssetImporter.GetAtPath(importerPath); string tempName = assetPath.Substring(assetPath.LastIndexOf(@"\") + 1); string assetName = tempName.Remove(tempName.LastIndexO...
0
11a8930d2cac1c37f74d500396fe1cde
50be307a3bf9f1ac3f6171560db8bbd4
mdファイルのcontentHtmlに<h2>,<h3>があれば、Table of contents用のidを追加して返す。
if (is_single()) { $elements = search_index($content); if (count($elements) >= 1) { $toc = ''; $i = 0; $currentlevel = 0; $id = 'chapter-'; foreach ($elements as $element) { $id .= $i + 1; $replace_title = preg_replace('/<(h[1-6])>(.+?)<\/(h[1-6])>/s', '<$1 id="' . $id . '" class="js-index-h...
1
10e802b304895a47868126450d8aed64
c10a4b45d7956558cc2212ce7fd61990
Invoke PKG_F_AUTHOR_EXISTS
if( length( grep( package, search() ) ) > 0 ) return( TRUE ); return( FALSE ); }
0
a9c48283c75e4a8a27db4f645db18bc6
3cdc3ceb6a29abd8444c0a28efd0f4a8
Get ProductCondition value An additional test has been added (isset) before returning the property value as this property may have been unset before, due to the fact that this property is removable from the request (nillable=true+minOccurs=0)
{ if ($this->non_product_condition_values === null) { $this->non_product_condition_values = $this->get_condition_values(false); } return $this->non_product_condition_values; }
0
03f7971881e4ae403d50521ecee046b5
62fd136aecd2b23b5d35a7e5e9feaea4
Convert from at. % to wt. %
def calc_w_from_wsat_rh(wsat,rh): return rh/100*wsat
0
20e52a4e4584800f0fcc40039df509b5
94d60c12b31eb27cc776e90912185dbd
Se redefine el valor de envío añadiendo la tarifa a la función de la clase base
var envio = 0; var entregaFecha = $("#pedido_fechaEntrega").val(); var entregaHora = parseInt($("#pedido_horaEntrega").val()); var todayReal = new Date(); var todayHour = todayReal.getHours(); var today = new Date( todayReal.getMonth()+1+'/'+ todayReal.getDate()+'/'+ tod...
0
9c05bb954d94e7dfa16a3fa14061bbc1
267a7767d1882b4ade7d04b0acacaf5d
=================== Mã thông báo tự tăng ===============================
{ $currentYear = date('y'); $this->db->select('*'); $this->db->from('tbl_huynhtruong'); $query = $this->db->get(); if ($query->num_rows() > 0) { $tmp = strval($query->num_rows() + 1); while (strlen($tmp) < 4) { $tmp = '0' . $tmp; ...
1
393c6a3176df1f8572e229a4ceafccc2
fa4bcd55c16386f9a216917386e7474f
Set the header pointer and the new head bit according to the access category
static uint32_t set_ad_bits(void *guest_p, void *walk_p, int set_dirty) { guest_intpte_t old, new; old = *(guest_intpte_t *)walk_p; new = old | _PAGE_ACCESSED | (set_dirty ? _PAGE_DIRTY : 0); if ( old != new ) { *(guest_intpte_t *)walk_p = new; if ( cmpxchg(((guest_intpte_t *)guest_...
0
9027e3642a3267472e2ab81c415710d3
a77abb746d70c675af2355cfeae5d731
@brief Extracts the CoAP version from the given message.
coap_version coap_get_version(coap_pdu *pdu) { return (coap_version)(pdu->buf[0] >> 6); }
1
ccf600a30ddb8e2d9315a459ce8300d1
8b202af0ce3133933eaa86b5ed897675
Retorna a lista de todos os setores exceto aquele pertencente ao funcionário.
class Company extends ClassModel{ public function getSectors(string $idLocal = ""): array{ $dao = new DB(); $result = $dao->exec("SELECT * FROM tb_sectors WHERE id_local = :id_local;",[ ":id_local"=>$idLocal ]); return $result; }
0
348b44d170f63da3ab2c8905a23957fc
0fc646fb7d2b3f0d0381e1a4c5f0bacf
创建音乐播放器界面
self.right_process_bar = QtWidgets.QProgressBar() self.right_process_bar.setValue(49) self.right_process_bar.setFixedHeight(3) self.right_process_bar.setTextVisible(False) self.right_playconsole_widget = QtWidgets.QWidget() self.right_playconsole_layout = QtWidget...
1
0a96e5de3bd1dfa368adb5671b6ca91c
855900e3ddf0b205fd49fd56fcc12860
あるスキルがこのキャラにとってクラス技能かどうかをチェックする。 習得しているクラスの中でひとつでも該当技能がクラス技能であればクラス技能になる
public boolean classOnly(String classID, String abilityID);
1
02958d32fcad9ece8a520c77baf5850f
7136d5ff7a900c2ed88fa1b2cc18e0f2
Returns tuition information for colleges and universities.
class DeptOfEducation_CollegesAndUniversities_EducationalOfferings extends Temboo_Choreography public function __construct(Temboo_Session $session) { parent::__construct($session, '/Library/DeptOfEducation/CollegesAndUniversities/EducationalOfferings/'); }
0
24574ca812c98a92645537ede08fbd0e
abd4a9dc7fa80127a4e6039781808000
Ensures that version in env is written to the docker config
class Image(object): def set_version_env_key(self, env_key): self._version_env_key = env_key
0
a2e39fb3ecdfe55bbc10e29b8f9a43c8
b12c5c1d155e180cfea7c2bcd9f8a204
A helper for method depthSum to calculate current level weight sum.
class PlanningGraph: def h_levelsum(self): raise NotImplementedError
0
f09a165a9d23c1b7418da8494e9c8280
6ac655b118fb9d456a81a8d0c2001569
<p> Accuracy test for <code>config(XMIReader, String)</code>. </p>
public class MessagePoolDetectorTest extends TestCase protected void setUp() throws Exception { AccuracyTestHelper.loadConfigs(); }
0
83389b28975c356157ec8b4435f21b33
1938967b2bb5b5960dfc9a5b3a36bbbc
Add the default parameters such as result and errorMsg to the stored procedures parameters list.
namespace BrainWhizzDatabaseFramework public class FirebirdDBProvider : IDBProvider public void Add(DBCommandTypes commandTypeToAddTo, string storedProcedureParameterName, object paramValue) { if (this.dataAdapter != null) { if ((commandTypeToAddTo & DBCommandTypes.Se...
0
5e0405123347ea030de464389eca3afd
69a66d1cd07e67966b763b5178241b3e
r'''Calculate the viscosity of an aqueous mixture using the form proposed by [1]_. Parameters are loaded by the function as needed. Units are Kelvin and Pa*s. .. math:: \mu_m = \mu_w^{w_w} \Pi\mu_i^{w_i}
if self.isfluid: T_stp = 273.15 + (60.0 - 32.0) * 5.0 / 9.0 mu = self.mu_0 * np.exp(self.C_t * (1. / T - 1. / T_stp)) else: mu = np.inf return mu
0
4fa4f0a55b14500ff40a61aa4c13b921
ea2219ca67b6b8c75a560a7c7216efb0
Returns the result of interpreting the object as an instance of '<em>Object Type</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public class RepositorySwitch<T> extends Switch<T> public T caseDatatypesType(DatatypesType object) { return null; }
1
35cc334087a24c0105484b6a5df35152
e585c4d431775b72bde3132d5ffb295e
OnCommand
OnCommand(WPARAM wparam, LPARAM lparam) { UNREFERENCED_PARAMETER(lparam); UINT nID = LOWORD(wparam); if(IDW_FILE_MRU_FILE1 <= nID && nID < IDW_FILE_MRU_FILE1 + m_maxMRU) nID = IDW_FILE_MRU_FILE1; switch(nID) { case IDM_COLOR_CHOICE: On...
1
f628305e8a16673b806942ccc2a1d30a
9f041044a9b10813f977b72d19101c4c
Function to upload additional material by customer on particular task
namespace PPTS.WebAPI.Customers.Controllers [ApiPassportAuthentication] public class StudentsController : ApiController [HttpPost] public MaterialModelCollection UploadMaterial(HttpRequestMessage request) { return request.ProcessMaterialUpload(); }
1
f39986dbd7d6e6479b5c000939a47681
3f5a1b4ea46ff4e7602cd5b437950191
Saves records that are referencing current record and are linked to it in-memory
array $relationsToSave = [], bool $deleteNotListedRelatedRecords = false ): void { if (!$this->existsInDb()) { throw new \BadMethodCallException( 'It is impossible to save related objects of a record that does not exist in DB' ); } $rel...
1
7dce678afec4b650673dc473aa8705a3
8f59d82c983184b87acd93ae93a960b8
Enforce waiting to consume the rest of the time slice but ensure that there is no overflow.
time_end_ = std::chrono::high_resolution_clock::now(); while (acked_ < tpos_) { std::this_thread::sleep_for(std::chrono::milliseconds(10)); handle_timeslice_completions(); } assert(timeslice_buffer_.get_num_work_items() == 0); assert(timeslice_buffer_.get_num_completions() == 0); timeslice_buffer_.s...
1
1ca62b8a5dbc64edf904d4b0599de082
05c42a0ccf7ba928d2c965a77bd92229
获取下次保养时间
{ if (PauseWork) return "暂停"; if (Setting.ForceDeal == 0 && Setting.AutoDeal == 0) return "手工"; DateTime nextDealTime = DateTime.Now.AddDays(1); if (Setting.ForceDeal > 0) { nextDealTime = lastDealTime.AddMinutes(Setting...
1
92e01b7d4bebd99e33c265a3866e42e4
bb12a4fada1ab3d3145f4b051cb340ce
Get all script known variable names.
public class UserData public Set<String> getScriptNamesForJavaArguments() { return hmJavaArguments.keySet(); }
0
e1ef64614896c8fff62a8bfa5db03e24
d96a284a07bcbfe97feef14a16a838cc
验证最新列表作品信息与作品详情页信息一致
class getProductList(unittest.TestCase): def assertProduct(self, getProductInfo=None): productNum=len(getProductInfo.model['productionList']) for i in range(productNum): if getProductInfo.model['productionList'][i]['productId']==self.Merch1.productId: self.assertEqual(getProd...
1
d29f99f639ede16b2d2e8785899379ff
75bb15aa4303115f4a378f3b56c4b31c
rotate an object around its local x axis
ry = np.array([[ np.cos(-theta), 0, np.sin(-theta), 0], [ 0 , 1, 0 , 0], [-np.sin(-theta), 0, np.cos(-theta), 0], [ 0 , 0, 0 , 1]]) return np.dot(ry, obj)
0
ef18895bcacacb884296126afec13ecd
06526ec937a08792050b9e6129d47615
Gives a default drawing style to the module which is used by each method, if no concrete parameters are passed to it.
public class Graphs extends WebVMPage public static GraphStyle newDefaultStyle() { final GraphStyle gs = new GraphStyle(); gs.height = GRAPH_HEIGHT_PX; gs.width = GRAPH_WIDTH_PX; gs.border = GRAPH_BORDER; gs.yLegend = true; return gs; }
1
1984ba913b52895655124af3267e0b04
dd9a368abd40930ee688907ec55e15c3
Handles when a user chooses a parameter 1 option for Chart 1.
export class TimeSeriesComponent implements OnInit, OnDestroy, AfterViewChecked onChart1CharacteristicTypeChange() { this.chart1SelectedImageType = undefined; this.chart1SelectedImageCharacteristicId = undefined; this.chart1SelectedImageCharacteristicName = undefined; this.selectedChart1Sensor = undefin...
0
12f2202bf2fce5920e51ef628e377313
d2f529de2aa9b614b5f66f33bd3ca766
通过公司id和表单名字删除表单(所有历史版本),表单控件属性
@Service("formAttributeService") @Transactional public class FormAttributeImpl extends BaseServiceImpl<FormAttribute> implements IFormAttribute{ public Integer deleteByFormNameCompanyId(int companyId,String formName,int formId){ int isUse = 0; List<ProcessAttribute> processAttributeList = processAttributeDao.findBy...
1
fbfd5bb4b6fdfadf0954862706aa2561
3d3fd578fa5f4abff57d1f20f598661a
Draws edges at the sides and the top of the level. No arguments required.
{ Vector2D topLeftCorner = (LevelArray[0, 0].Position + OFFSET) + Vector2D.Left + Vector2D.Up; Vector2D topRightCorner = (LevelArray[LevelArray.GetLength(0) - 1, 0].Position + OFFSET) + Vector2D.Right + Vector2D.Up; Vector2D bottomLeftCorner = (LevelArray[0, LevelArray.GetLen...
1
5041f006a4eeb97bdc327afd045434a1
7ad1d6cc8736e30e0d318aadfc38bb0b
METODO QUE TRAE UN LABORATORIO ESPECIFICO DEPENDIENDO EL ID-LABORATORIO
@RestController @RequestMapping("/api") public class LaboratorioResource @GetMapping("/laboratorios/{id}") public ResponseEntity<LaboratorioDTO> getLaboratorio(@PathVariable Long id) { log.debug("REST request to get Laboratorio : {}", id); LaboratorioDTO laboratorioDTO = laboratorioService.findOne(i...
1
e298a885fefd5670329a898baf5987e3
e652beda9a7160fb50e6141852365f38
根据组织(组织及下级组织下分组下的监控对象)进行分页获取
{ if (string.IsNullOrWhiteSpace(jxbm)) { return new List<AssessmentObjectModel>(); } List<DbParameter> parameter = new List<DbParameter>(); StringBuilder strSql = new StringBuilder(); strSql.Append(@"SELECT S.[XH] ...
0
3fe60bcf152967c8dfd1a6b40427e34f
961324e0556971117412d530ee3daeeb
Returns a model that is extremely simple (one layer).
def def_model_simple_ff(): model = Sequential() model.add(Dense(784, activation='relu')) model.add(Dense(64, activation='relu')) model.add(Dense(784, activation='sigmoid')) return model
0
e5282527a1572c09869af89c07139499
c029c416971291630b1ef349d00e04f4
For supplemental FHIR versions, we only care about resources and types, but for normal packages, we care about everything.
switch (resourceType) { case CLUSTER: return (Map) clusters().versionedResources(); case ENDPOINT: return (Map) endpoints().versionedResources(); case LISTENER: return (Map) listeners().versionedResources(); case ROUTE: return (Map) routes().versionedResources...
0
a73f326dd07777e2e87e698286737fe2
78c2952b76d90e7bfde0e2babe0de9b0
Inserts a record into the MockupNotes table.
namespace AppData [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public class VendorNoteDataProvider : SqlDataProvider void Insert(Domain.VendorNote item) { ExecuteScalar(INSERT_COMMAND, CommandType.Text, CreateParameters(item)); }
0
21798f08f77158a6c92ef89cab8f844e
7cfa3a2b9a50d82f00148bede30b86c6
GET: api/TaskTypes
namespace PDM_Services_Interface [OperationContract] List<TaskTypebo> getAllTaskTypes();
1
0229f05a33d9e7a6f1010e7bb3baf43e
8011d9b102eebb67f40fe33abeeb0b1b
Get all the features in a review document and put them together in a dictionary.
class Document(object): def features(self): return [self.data]
0
e33d54397a4f5486f95a464a478bfdea
bd0f119c1e927cacdc7f42348f911698
An object that stores a string, as well as the pixel coordinates of that string.
function TextObject(_position, _size, _text, _game_scene) local self = { object = GameObject(_position, _size, _game_scene or "default"), text = tostring(_text or ""), fit_text = false, tab_size = 2, fg_colour = characters.DEFAULT_FOREGR...
1
f6923959fa6d264401d70d00b443cfb8
00b8898d1f81f5d36ac17c6e53af3b99
Finds the camera numbers and ports that correspond to real cameras Note: (devices may be repeated)
class CameraAccess: def detect_cameras(self): return []
0
6fb6819945b17aabb23e9efef7240bf6
a880a5cdfc09d0193517eb10952aa04a
如果当前用户查看没有菜单的权限,就从集合中移除掉 解决方案给菜单domain添加权限 如果菜单有关联权限,需要进行权限验证,如果没有关联,所有人都可以看
@Service public class SysMenuServiceImpl implements ISysMenuService private void menuAuthorityFilter(List<SysMenu> sysMenus) { List<Long> menuIds = sysMenuMapper.selectRoleMenu(SecurityUtils.getLoginUserRole()); Set<Long> authority = new HashSet<Long>(menuIds); Iterator<SysMenu> iterator = sysMenus.iter...
1
9b15d168be1e60348b8476f6cfa507ae
4cac2d9a90af87dc82d3400fd9eafe54
function to perform bytewise xor operation
class aescbc: def xor(a,b): if len(a)!=len(b): return "" temp="" for i in range(len(a)): temp+=chr(ord(a[i])^ord(b[i])) return temp
1
b1108fe908053513b7abc7622cc508db
0d7ae4387aded3c57106fc1fb0628b9e
Returns the Fibonacci Sequence up to and including number specified by the user
function fibonacci(numberF, iterationF){ let fibonacciArray = new Array(0) fibonacciArray.push(numberF) let addThisNumber = 0 let addThisNumbera = 0 let addThisNumberb = 0 for (let i = 0; i <= iterationF; i++){ if(fibonacciArray.length == 1){ addThisNumber = fibonacciArray[0...
0
41779ae100ed00ca49ddb70ead90cedd
f5be629023c73083649c7b71f6b067a4
分页获得订单列表
class Order extends BaseModel public static function getOrdersPaginate($params){ $query = []; $field = ['order_no', ['name', 'snap_address->name']]; $query = self::equalQuery($field, $params); if(array_key_exists('start',$params) && array_key_exists('end',$params)){ $query[] ...
1
4320c88eec50a96e1f7e9ef12f665a6d
6a9e2e64f735858fce8c794de48fa5dc
Handles the AjaxRequest event of the ajaxPanel control.
int oldCurrentESpaceId = heContext.CurrentESpaceId; try { heContext.CurrentESpaceId = ssCaseConferencing.Global.eSpaceId; if (CommandOnClick(heContext )) { doAJAXRefreshScreen(heContext); } } finally { heContext.CurrentESpaceId = oldCurrentESpaceId; } }
0
fcbf0796e7bfc5b41854dbac396dba7e
d66f9095711b92703c8171532f5e4aab
Fonction de création d'un tableau de mot
namespace pendu class Program public static string[] InitialiserTabMots(string NomDico) { string[] tabMots =System.IO.File.ReadAllLines(NomDico); return tabMots; }
1
db4a5193e75e630e90bd09f870b1d36f
1c32a3393b64b757723f2b432f57b075
Цикл по папкам в поданной директории. Идет по всем папкам. Игнорирует ярлыки (.lnk), т.к. они будут обработаны ниже как файл Так же игнорирует папки с . и .. перед именем (отдельно тестировал цикл, без этого флага папок на 2 больше, но в интернете внятной информации что это за папки не нашел)
{ if (dir != null) { foreach (var subDir in dir.GetDirectories()) { foreach (var file in subDir.GetAllFiles()) { yield return file; } } foreach (var file in dir.Files) { ...
0
1466e8587d9d0e88b6275f28e2617af6
9166f521f95c4ab2a220f0065864706f
WithNodeID set the customized nodeID.
void donkeyid_set_node_id(int node_id) { spin_lock(&(lock->lock),pid); lock->donkeyid_context.node_id = node_id & NODE_ID_MASK; spin_unlock(&(lock->lock),pid); }
1
c6e84e1a3703f01d6181d81d152e6387
8ce2d1b132349c64046cf20e75499621
计算e的值
double calE(double* M, double* e) { double E0 = *M; double E; E = *M + (*e)*sin(E0); while( fabs(E0 - E) >1e-12) { E0 = E; E = *M + (*e)*sin(E0); } return E; }
0
0f56399774308a6a504ea8840318cb97
1d30e438d592de3881043bdbcfcde3be
Tính điểm tf-isf trung bình trên cả câu.
sentences = [ find_matches(sent.string.strip(), EQUALITY_DISCOURSE_MARKERS) for sent in text.sents ] return sum(sentences) / len(sentences)
0
ce14517889ceb5b82c3ed141f6e7e919
579b85ac966901cd4616050c73300f20
Returns true if there is a previous record to select
public class FTPListParseEngine public boolean hasPrevious() { return internalIterator.hasPrevious(); }
1
dd588c14188650c6a747f64ea01ee080
5b826bc34622f88ca0db134afc24bd48
获取应用包名称
try { return application.packageName } catch (e: NameNotFoundException) { e.printStackTrace() } return "" }
1
769dc9a7a51b735837d6a592a032b82e
e4f66dc27afd2f8840dd503c6aed2cb5
Updated balance when user clicks on the balance
public class AddToCardFragment extends DialogFragment implements View.OnClickListener private void updateCardBalanceUI() { exactAmount.setText(decimalFormat.format(cardBalance)); }
0
042987f4d947949cc81c01ee58aebbd1
e9fa6f2d1272e17a81663e114ff0e383
when game is running, player cannot chang board size.
{ if (BoardManager.Instance.running) { foreach (GameObject gobj in BoardManager.Instance.clones) { if (BoardManager.Instance.running && gobj != null && gobj.tag == "Button" && !BoardManager.Instance.finished) { gobj.gameObje...
0
17803066a3531347d2d0c88489370993
8e49730cf9112d23935640016014313b
Find the number of pixels that overlap between two rectangles.
area1 := (ax2 - ax1) * (ay2 - ay1) area2 := (bx2 - bx1) * (by2 - by1) overlapWidth := min(ax2, bx2) - max(ax1, bx1) overlapHeight := min(ay2, by2) - max(ay1, by1) overlapArea := max(overlapWidth, 0) * max(overlapHeight, 0) return area1 + area2 - overlapArea }
0
2dbb9a03a6de402f34a7f5113d9f22f9
c818eeea9318cc929a8a407cc61730a0
首页应该显示所有工具的名字
@Controller @RequestMapping("tools") @Log4j2 public class ToolsController extends BaseController @RequestMapping(value = "name", method = RequestMethod.GET) public String name() { return getPathRoot() + "/name"; }
0
238f88fcfc21c65fa3c538b6420f93e2
7add0d434481562a5773dd99d9f163d9
order Items by count
def sort_by_count(d): d = collections.OrderedDict(sorted(d.items(), key=lambda t: -t[1])) return d
1
ff0385ab95fbf0e0b5ffe05caa1fc425
ae4e212a2e1ddcff331b8b12e67f28c2
Function that hides all of the trivia questions and the timer upon submission of answers. This function also displays the number of correct and incorrect answers.
clearInterval(timerDisplay); var endQuizEl = document.getElementById("finDisplay"); endQuizEl.removeAttribute("class"); document.getElementById("finScore").textContent = time; questionEl.setAttribute("class", "hidden"); }
0
500343a6a4432c74df13d677aaf0dceb
d07b1a447430ce058c4d70f4cb66053b
определяет права пользователя, если нет прав доступа-посылает на указанный редирект или на error_Perm, если неуказан редирект
function checkRights (&$required,&$rights,$mode="OR") { global $GPC,$vwarmod; $required = trim($required); if (strtolower($GPC["PURE_PHP_SELF"]) != "index.php") return FALSE; $ok = FALSE; $tmp = split(";", $required); foreach ($tmp as $req) { if ($mode == "OR" && (int)$rights[$req] == 1) { $ok = TRUE; ...
0
32ce7589f47eec29893f1af5ff11f6b3
4afcdc78e8d49cfa2838a7f2ff0d0346
Displays meta info of dicom and segmentation in the info box on slicer
def dicom_metainfo(dicm_path, tag): reader = sitk.ImageFileReader() reader.LoadPrivateTagsOn() reader.SetFileName(dicm_path) reader.ReadImageInformation() return reader.GetMetaData(tag)
0
808d65ccac789e5ff625efe492cb8127
2c4e65a701236103868097ec983db38d
Sets the collection parameters for the collection for 'ServiceLocationCollectionViaServiceLocationEmployeeAssignment_____'. These settings will be taken into account when the property ServiceLocationCollectionViaServiceLocationEmployeeAssignment_____ is requested or GetMultiServiceLocationCollectionViaServiceLocationEm...
namespace Reliant.RenuOil.DAL.EntityClasses [Serializable] public partial class ServiceLocationEntity : CommonEntityBase, ISerializable // __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces // __LLBLGENPRO_USER_CODE_REGION_END public virtual void SetCollectionParametersWorkOrderCollectionViaWorkOrderService...
0
d97d7254aa7ecf9a80f408d306d8bb99
68e75b4ff50dbaa564b3759a6c931c14
Return the number of available pages of physical memory in the system. There is currently (as of version 2.0.21) no system call to determine the number. It is planned for the 2.1.x series to add this, though. One possibility to implement it for systems using Linux 2.0 is to examine the pseudo file /proc/cpuinfo. Her...
size_t zmalloc_get_memory_size() { return (size_t)sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE); }
0
f96ea8d2dc0e05d1557efce06c6bf58a
362b642a6f51ddea4fad50cd1ce05f6f
Constructor method for GetOfferListPaginatedResponse
class CdiscountGetOfferListPaginatedResponse extends AbstractStructBase public function __construct(?\SengentoBV\CdiscountMarketplaceSdk\Structs\CdiscountOfferListPaginatedMessage $getOfferListPaginatedResult = null) { $this ->setGetOfferListPaginatedResult($getOfferListPaginatedResult); }
1
73b3abff493d3edcb701aad988662781
3f80f36b5b1c3572d2db50b42343781e
Routine di comunicazione col DAC. La routine spedisce al DAC di indirizzo specificato i due byte che definiscono i valori delle sue due uscite analogiche.
void output_dac(unsigned short level) { uint32_t data = 0; data = 0x3000 | (level & 0x0FFF); DAC_CTRL->OUT &= ~BIT7; EUSCI_B0->TXBUF = (unsigned char)(data >> 8); while(!(EUSCI_B0->IFG & EUSCI_B_IFG_TXIFG)); EUSCI_B0->TXBUF = (unsigned char)(data & 0x00FF); while (!(EUSCI_B0->IFG & EUSCI_B_IFG_TXIFG)); ...
1
dc6d18bfa5fe6e6afbc154d612378b16
a75515f07afa6fbbb824f63ef50574a4
Gets the remote party associated with a specified Party ID.
{ lock(m_parties) { return m_parties.TryGetValue( party_id, out party ); } }
1
488df90be03b3eb0c6f299aca2e2a7a4
4a6d4b5d19ec9167e77934a8dd16c20a
The well known ID for the projection.
final class ProductProjectionBuilder implements Builder public function getKey() { return $this->key; }
1
fb22b511e330d57ac3ac4ac2d7418ad5
ad7d2fb7f80a50ab803bd32168593dc8
Colocamos el muñeco de pie
void pagar3() { glPushMatrix(); glRotatef(90,0,1,0); glTranslatef(39.5,-3.0,7); glScalef(160.3,4.5,1.0); glutSolidCube(1); glPopMatrix(); }
0
8c94f3d36cd91eae0b5eeafa13f4228f
70eb153d4d649f0cf04e1388a65f11fd
Set up the addons index mapping.
for index, mapping in _MAPPINGS.items(): global_mappings = {} if mapping.get('global_mappings'): for g_map in mapping['global_mappings']: global_mappings.update(_GLOBAL_MAPPINGS[g_map]) _init_index(index, {**mapping['properties'], **global_mappings})
1
9c53eef86121ce6f661254e6fd4b76ee
43f54d298bfd716f42fd9c1f44062fb7
初始化全局唯一的静态资源文件对象
namespace Cyjb.Compilers internal sealed class ExceptionResources private static ExceptionResources GetLoader() { if (resLoader == null) { lock (SyncObject) { if (resLoader == null) { resLoader = new ExceptionResources(); } } } return resLoader; }
1
fac6d585cd42a090c1563613c4741cfb
6d9d227cac782e579b4e3416b1e3ac59
根据卫星ID和时间范围查询遥控指令
public SrvResponse<List<RealDmyjd>> queryRealDmyjd(String timeDate, Date specialTime, String lineId) throws SrvException;
0
448d9e0cccaf27ed6ebf03924cf297e2
2c72d49d742462f65d8473c9fc2c8ee0
顯示時間選擇
class Datetime_test extends CI_Controller public function date_test() { $dt_tools = new Dt_tools; $date_test = $dt_tools->get_show_date() ; $content = []; $val_str = '<table border="1">'; foreach($date_test as $key=>$val ) { $val_str .= '<tr>'; ...
0
4cb85ef7f99b3949ce99cceee7210416
a77335a7486b77e2a010a6b24018c301
Returns ``True`` if player is in a time-trial session.
dt = datetime.fromtimestamp(ts) wd_name = WEEKDAYS[dt.weekday()] if getattr(self, 'active_%s' % wd_name): minutes = dt.hour * 60 + dt.minute start = getattr(self, 'active_%s_start' % wd_name) end = getattr(self, 'active_%s_end' % wd_name) return st...
1
79fa7c26c7e9c61801eb743517edd0ae
f96b73ef72edbf9fe60c70fd4fad58d2
This method send a snmp.Get request with a specific OID number and returns "Mono" if printer has only one color, otherwise "Color".
namespace PrinterAgentLibrary public class PrinterSnmpData : IPrinterSnmpData private async Task<string> Color(string ipAddress, string snmpCommunity) { string secondColorOID = "1.3.6.1.2.1.43.11.1.1.6.1.2"; string color = ""; string[] oidArray = new string[] ...
1