query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
bcea0a15bb7d241c8fb05908532b5116 | 19ee8f0a91498431a255217ff3696865 | 系统支持查询所有被屏蔽的电话黑名单数据 | SQLiteDatabase db = helper.getWritableDatabase();
List<BlackNumberInfo> blackNumberInfoList = new ArrayList<BlackNumberInfo>();
Cursor cursor = db.query(TABLENAME, new String[]{"number", "mode"}, null, null, null, null, null);
while (cursor.moveToNext()) {
BlackNumberInfo bla... | 1 |
7f364b777e516cc5d8abadf007975e27 | d32a38659792bd28f4b2e92c542ecd50 | Verifies if Repo details screen opens when item inside recycler view is clicked | fun clickMovie_opensMovieDetailScreen() {
onView(withId(R.id.rv_trending_movies)).check(matches(isDisplayed()))
onView(withId(R.id.rv_trending_movies)).perform(
scrollToPosition<RecyclerView.ViewHolder>(0))
onView(withId(R.id.rv_trending_movies)).perform(
actionOnItem... | 1 |
0f8fdae82c7474f0fb674d906d9337b1 | 14ecf4bc4ee33932746600cb62997cc1 | Start slice rebalancing on the cluster | class SFCluster(object):
def StartSliceRebalancing(self):
self.api.CallWithRetry("RebalanceSlices", {}) | 1 |
e9a2831f8a1561f7b558676f27d00cdd | e759d1272dfb17528aafb69c8dbd3e25 | Enable/disable go up button | int selectedRow = selectedTransmit.getSelectionIndex();
if (selectedRow != -1) {
buttonUpCA.setEnabled(selectedRow > 0);
buttonDownCA.setEnabled(selectedRow < (view.tbTransmitRecords.getRowCount() - 1));
}
else {
buttonUpCA.setEnabled(false);
buttonDownCA.setEnabled(false);
}
} | 1 |
22766d70edeba9e5b1373ab89b041197 | e998c27a44426ab668aa069bce4121c0 | Saves taxonomy item and all associated asset types | {
$tax_ids = $this->getSelectableTaxonomies();
if(is_array($tax_ids))
{
include_once("./Services/Taxonomy/classes/class.ilTaxNodeAssignment.php");
foreach($tax_ids as $tax_id)
{
$ta = $this->initTaxNodeAssignment($tax_id);
$ta->deleteAssignmentsOfItem($this->md_obj_id);
if(is_array($_PO... | 0 |
467c86ed62226c84330ee864098e2ce2 | 95d8c404f47e8a9829a1fb8e6cb4e61d | <para>指定されたプロパティパスが抽象的なプロパティパス (リスト要素がある場合、インデックスなし) であるかどうか判定します。</para> | {
try
{
GetPropertyValue(propertyPath);
}
catch (Exception)
{
return false;
}
return true;
} | 0 |
a32822412a4943abc1a091123c94f556 | df01ea7a3fdd6a4c64f4ddf94170512f | 返回当前年月日 (中国东部时间)
yyyyMMdd格式 | @Slf4j
public class DateUtil public static class Get
public String getDBNowYMD() {
return toString(TemplateEnum.FORMAT_YEAR_MONTH_DAY.zh());
} | 1 |
8b488831f4cb64d8358d0546bd2cbac2 | 96a9e901de9e48e099893c7a83d4a27f | 求给定双精度集合中值的四分位数 | {
if (a == null) throw new ArgumentNullException(nameof(a));
if (a.Length == 0) throw new IndexOutOfRangeException(nameof(a));
Contract.EndContractBlock();
if (a.Length == 1)
{
return a[0];
}
Array.Sort(a);
... | 0 |
55a1f3c60f05ea6087a86a9611212ff0 | 733ed0d5fd2373b76863959c100be571 | Create a grid of latents with chained-analogy layout | x, y = spacing * np.mgrid[:rows, :cols]
x -= np.mean(x)
y -= np.mean(y)
return "crazyflies:\n" + "\n".join([
"""- channel: 100
id: {}
initialPosition: [{}, {}, 0.0]""".format(i, x, y)
for i, (x, y) in enumerate(zip(x.flat, y.flat))
]) | 0 |
8e1bf634e317fbbcf2ba940f27601d78 | c321d521d39f72cac788ac54e7d69a61 | 批量删除触发器信息 | @Component
public class TriggerClientImpl extends BaseApiClient implements TriggerClient
@Override
public void deleteTrigger(TriggerDelDto epsTriggerDelDto) throws CommonException {
post("/api/trigger/deleteTrigger", epsTriggerDelDto);
} | 0 |
731f054f97fea825035000146199b659 | 52c35db67f28ca736417c165c3c0f228 | lägger till eller tar bort en tag ("togglar")
dvs. finns taggen redan tas den bort
finns den inte läggs den till | bool ok = true;
foreach(Tag* tag, this->ListTags){
if(tag->getName()==name||tag->getName()==name+"'\n"){
ok = false;
}
}
if(ok){
if(write){
QFile file("Configs/Config.txt");
if (file.open(QIODevice::Append | QIODevice::Text))
{
... | 0 |
73b49ce8d5ac8bdbe5bacf2a9349e9df | 8577009fda28d2737cc3d6ef002d218a | Repel joiners who attempt to join the lobby by tell them that the
lobby is full. | public void errorInLobby(); | 0 |
51eb1bc6ad3df15eaf49642092430a91 | b890f3d997b0beb62de4437345a36930 | 攻撃エフェクト画像名を、各enumと対応付けます | switch (argShotType) {
case 1:
argImg.sprite = sp1;
break;
case 2:
argImg.sprite = sp2;
break;
case 3:
argImg.sprite = sp3;
break;
case 4:
argImg.sprite = sp4;
break;
default:
break;
}
} | 1 |
5d8735225f1f9389aea8b0a08b0f9301 | 04aeac45a2a67a62a673d1b76a09c798 | https://edabit.com/challenge/CCAEMfHcmrvSwA4KR | function bouncingBall(h, bounce, window) {
if (h > 0 && bounce > 0 && bounce < 1 && window < h) {
let height = h;
let bounces = 1;
while (window < height) {
height = height * bounce;
if (height <= window) break;
bounces += 2;
}
return bounces;
}
return -1;
} | 1 |
65b772e6a3fdf5a596bc747132707319 | af297698944ca30dd71346a63a1b19ec | Executes before Load | class Router
protected static function before(){
config::get('macro');
config::load('onload', true);
} | 1 |
2b69ad6f95d49679dd3e8ecabca437a3 | 1e25f9d76885da001238860135836a27 | 对horseColic数据进行训练和测试,返回其测试的误差率 | def multiTest():
numTests=6;errorSum=0.0
for k in range(numTests):
errorSum+=colicTest()
print("after %d iteration the average error rate is:%f" % (numTests,errorSum/float(numTests))) | 0 |
91f07b31738ebed8fadfa2b17d4398dc | fd2649009d7edab265489ced339eebce | Выполнить запрос синхронно, передав в теле потока сериализованный объект и получить десериализованный результат | namespace Qiwi.BillPayments.Client
[ComVisible(true)]
public class RequestMappingIntercessor
[ComVisible(true)]
public async Task<T> RequestAsync<T>(
string method,
string url,
Dictionary<string, string> headers,
object entityOpt = null
)
{... | 0 |
3239c4269636b35f660ee39471cc4fe5 | e0f7f3e8a71d2a6d26a6ae9fdf137356 | Restore default temperature on exit | def _OnExit():
try:
bass.dirs['temp'].remove()
except Exception as e:
pass | 0 |
1a2a9756df7c17cea1f25dd65c288eaf | d7b3a1ff9dd21543538ece963371f12c | Generate an APR report for an individual company | $startDate,
$endDate,
$offset,
$limit
)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, config("app.asaas_url")."creditBureauReport?startDate=$startDate&endDate=$endDate&offset=$offset&limit=$limit");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
... | 0 |
f496d99e51cda4e4151ae5a3253204ba | 24573248ec2f4a9066841bd090795573 | 构造工作学习界面 | @Controller
@RequestMapping("/workController")
public class WorkController
@RequestMapping(value="/toWork.do",method = {RequestMethod.GET,RequestMethod.POST})
public ModelAndView toWork(String series,HttpSession session) {
List<Integer> seriesList= Tools.seriesStr(series);
JSONArray zyListJ=JSONArray.fromObject(... | 1 |
6faac984e5c82c4ad5e4f3a0c8847e25 | 63d7c9a0ceb11a707fdf815609d3c33a | Gets the JSON representation of this query designer object definition.
Use {@see \Oro\Bundle\QueryDesignerBundle\QueryDesigner\QueryDefinitionUtil::decodeDefinition}
to convert the JSON representation to an array. | class JsonDefinitionField implements DefinitionElementInterface
public function getDefAsArray()
{
return [
'length' => $this->definition->getLength(),
'title' => $this->definition->getTitle(),
'valuePattern' => $this->definition->ge... | 1 |
48c3ef146ffc6d40173db74f6de0e122 | 4c00ab6551dc7fb1395f1f21c5b80cfe | Colours rows after filtering. | function filterResults() {
setTimeout(() => {
const filterNameString = $("#name-filter").val().toLowerCase().trim();
const filterDepString = $("#department-filter").val();
const filterLocString = $("#location-filter").val();
$(".person-card").each(function() {
const $card = $(this);
const ... | 1 |
6dcb43e23396c693f04f52660f747623 | 780914996fde0f3435859e14a72e8113 | Validates Date format of date of birth | def birth_date_validator(birth_date):
try:
birth_date = datetime.strptime(birth_date, "%Y-%m-%d")
if birth_date.strftime("%Y-%m-%d") > date.today().strftime("%Y-%m-%d"):
raise ValueError
return ''
except ValueError:
return 'INVALID_BIRTH_DATE ' | 1 |
ac1857faee3612665bc36164212aa613 | 4f7bfe53cc07ce012edd47d6a49a3034 | Allocates host and device buffer for TRT engine inference.
This function is similair to the one in ../../common.py, but
converts network outputs (which are np.float32) appropriately
before writing them to Python buffer. This is needed, since
uff plugins doesn't support output type description, and
in our particular cas... | if int8_mode:
trt_fn = partial(torch2trt, int8_mode=True, int8_calib_dataset=calibration_dataset, strict_type_constraints=True, max_batch_size=batch_size)
else:
trt_fn = partial(torch2trt, fp16_mode=True, strict_type_constraints=True, max_batch_size=batch_size)
for idx, p... | 0 |
a020acfbb5e88dd22438899f6f3e0dee | b012f923acfcb64ea2ac948339dbdf17 | Constructs a new synchronous policy iteration player. | QLearningPlayer::QLearningPlayer(Maze *m, double gamma, int T, double alpha, double epsilon) :
TimeDifferencePlayer(m, gamma, T, alpha, epsilon) {
this->updatePolicyUsingStateActionValues();
} | 0 |
fab577d6436cebe02b4be8b8c129eef1 | 2c168c44d77f5bfa6c42b9e2398efd7d | Runs the show, used only as a quick way to test the methods. | def run():
show(uuid4()) | 1 |
fa478067fdbe1e5a22a308a1667c0129 | 4510a4cb66c2f8feed5a6a3dbed3b0d6 | Monta o placar. | pygame.font.init()
font = pygame.font.Font('freesansbold.ttf', 32)
score = font.render("Score : " + str(pontos), True, (255, 255, 255))
janela.blit(score, (250, 20)) | 1 |
81991e359e0207fa4b79aff085af0ac6 | 96f3dfdeded36a5b0e1e8567cb3a2030 | COPIED FROM epublib HTMLDocumentFactory
Quick and dirty stripper of all <?...> and <!...> tags as
these confuse the html viewer. | try (final PooledStringBuffer buf = StringBufferPool.get()) {
final StringBuffer sb = buf.getStringBuffer();
boolean replaced = false;
final Matcher m = buf.getMatcher(HTML_SPEC_CHAR_PATTERN, src);
while (m.find()) {
replaced = true;
switch (m.group().charAt(0)) {
case '&':
m.appendReplac... | 0 |
2cc8e07dba2ba03ddaca808b3cd9a065 | a64378ce3bb88da6994cfceecab67a60 | sets the number of inputs and the number of outputs for the truth table | public class BackpropagationMLP
public static void setNumOutputs(int value){
numOutputs = value;
bias2 = new double[getNumOutputs()];
olddeltabs2 = new double[getNumOutputs()];
deltabs2 = new double[getNumOutputs()];
} | 0 |
6a8f26f2dc7bed6c12f36dcf14902420 | a4e46cbe805b3b0f61295810fec50b43 | 间隔1分钟,执行工单上传任务 | @Component
public class TaskSchedule
@Scheduled(fixedDelay = TimeConstant.MILLISECONDS_ONE_MINUTE, initialDelay = TimeConstant.MILLISECONDS_ONE_SECOND * 30)
void executeMinuteTask() {
executeTask(1, false);
} | 1 |
1a7927e61ef8db3eaa6fc7609a9ba144 | 8cb58b9cd6590917e7b896e642662f84 | Always leave one active setting so the website doesn't break. | public class SetMenu : MonoBehaviour
public void initSettings(){
activeSettings = 0;
enablePanel (activeSettings);
} | 0 |
d696a0ca9ab5f0542e7fd525db5e6434 | 3d81f890165e820b60a42e275a88f596 | Ends the training session | namespace Microsoft.ML.OnnxTraining
public class TrainingSession : IDisposable
public void EndTraining()
{
NativeApiStatus.VerifySuccess(NativeMethodsTraining.OrtEndTraining(m_param.DangerousGetHandle()));
} | 1 |
7b5b17d24d1c1de48895b4ec9f22db4f | 14d943a48b794d0deb474d878e6252dd | Replace all normals with ones smoothing adjacient faces. | {
for(int i=0;i<vertexCount;i++)
{
float3* normal = (float3*)(pVertex + (i * vertexWidth + normalOffset));
normal->setxyz(0, 0, 0);
}
Triangle* face16 = (Triangle*)faces;
for(int i=0;i<faceCount;i++)
{
int i1 = face16[i].v1;
int i2 = face16[i].v2;
int i3 = face16[i].v3;
float3& v1 = *(flo... | 1 |
d27cb4a0a184762f9508701e46f23b48 | f96b86f6c85f41e9b62b770b42a56694 | A list of property names that the top level builder A should pass as java system properties to every dependency
builder B using {@code -DmyProperty=myValue} style command line arguments. Further, in case a child builder B
spawns its own new child builder C, B must pass all these properties to C in the very same manner ... | default Set<String> getProperties(String component) {
return ImmutableSet.of();
} | 0 |
f41d003a2188360118705bdd0a21c247 | 16cdbbc3ea58ed6c05dbbe741e8bc62b | Updates lead ID (e.g. after a lead merge). | global $wpdb;
$lead_meta_table_name = RGFormsModel::get_lead_meta_table_name();
$lead_table_name = RGFormsModel::get_lead_table_name();
$sql = "UPDATE $lead_meta_table_name lm,$lead_table_name l SET lm.form_id = l.form_id
WHERE lm.form_id=0 AND lm.lead_id = l.id;
";
$wpdb->get_results( $sql );
} | 0 |
41ec4630a4295d595e4af6c58c5229f7 | 984eda41acdc84e0da8e53f8689cc1e2 | Gets the value of the countryID property.
possible object is
{@link Integer } | {
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COUNTRYCODEID$10, 0);
if (target == null) return false;
return target.isNil();... | 0 |
d497ea3f0635e7528f35e2ef4aa3a755 | 03c3f810032da7a5d00da3c5a983789e | 连表查询出员工名、仓库名以及仓库记录表的基本数据 | [Route("api/GetmwarehouseIdAndName")]
public IHttpActionResult GetmwarehouseIdAndName()
{
var listWar = from w in db.mwarehouse
let p1 = new
{
value = w.WHID,
label = w.WHN... | 0 |
6ff7fb3bd7f991881554612ad578c695 | ee0257915b11587a1a90fa723105b805 | 产生二次分散的工作密钥,用于EWP向前置获取交易的PIK | public class CertifyDataUtil
public static byte[] getTransKey() {
byte[] transKey_bytes = strToHexByte(transKey);
byte[] keyTotal = Des3Utils.TrippleDesCbcEncode(
strToHexByte(Contacts.Const.ROOTKEY),
Des3Utils.iv_bytes, transKey_bytes,
transKey_bytes.leng... | 1 |
e2fe19408c5dd89134dd6c29a45b8b76 | 4a5800613ec5753ea0e3b9f2e4e71ed5 | 删除远程教育缴费表信息 | String[] recordIds = TypeConvert.StringToStringArrayByComma(recordIdString);
boolean result = researchRecordInfoService.deleteResearchInfo(recordIds, "EducationalReformRecord",
"EducationalRecordAward", "EducationalReformData", "record",
"educationalReformRecord", this.obtainFileBasePath());
HttpServletR... | 0 |
21ea9253a34f01a1192bacdc022ffd54 | e91dd46bdde534e1abbb25c4411a9091 | This is the coroutine that controls what happens
when retry button is pressed | public class RetryManager : MonoBehaviour
public void OnClickRetryButton()
{
PhotonNetwork.LoadLevel("GameScene");
} | 0 |
cfe51cdf950a01de11bd83ae0803844b | cd94c299784561b69d3ce7c743dc51c6 | OSS 资金授信账户风控主要信息的查询 | url_b202015 = config.base_url + config.url_b202015
print url_b202015
_header = header("B202015")
data_b202015 = {
"header": _header,
"body": {
"amt": 1,
"bankAcctNo": "1476932093",
"excomCustNo": "0000000002",
}}
resp = requests.post(url_b2... | 0 |
c7e0329b27f10daf3c62eed6c347519f | 8d3b909054b8ec2fa88c06bfc609aebd | Updates the description of the place in the database. | namespace test2
public class SQL_Connection
public void UpdateRoomDescription(string replacementRoomDescription, int listing_id)
{
using (var command = new SqlCommand())
{
try
{
command.Connection = connection;
c... | 1 |
468d0805b626a7d1aa7509214c6043bb | 6aa714186b3cc0e8db41496b3a90cb7f | Transition to Code Flash P/E mode. | ssp_err_t HW_FLASH_LP_codeflash_enter_read_mode (flash_lp_instance_ctrl_t * const p_ctrl)
{
ssp_err_t err = SSP_SUCCESS;
R_FACI_Type * p_faci_reg = (R_FACI_Type *) p_ctrl->p_reg;
volatile uint32_t wait_cnt = FLASH_FRDY_CMD_TIMEOUT;
HW_FLASH_LP_codeflash_write_fpmcr(p_ctrl, DISCHARGE_2);
HW_F... | 0 |
97beaa228d58d6cdda3626e29e38ee83 | 28eacfcaf15055a6e6b6e00914cccf4e | Clearing the sentence and semantics fields. | class Db
private function ResetSemantics() {
$this->_semantics = new \stdClass();
$this->_table = null;
} | 1 |
567e32516a778e39ba595f4b24d85525 | a97db01f5b7bac1e45c7e7bd9bef8453 | Give back the current process's Analyzer | public class LexicalAnalyzerPipeline extends Pipeline<String, List<IWord>, List<IWord>> implements LexicalAnalyzer
public LexicalAnalyzer getAnalyzer()
{
for (Pipe<List<IWord>, List<IWord>> pipe : this)
{
if (pipe instanceof LexicalAnalyzerPipe)
{
return ((Lex... | 1 |
baba4c111eae736de27e657c933ccf59 | 57f469ea34291260eef0070479ff0c2a | Function generates our desired kinematic quantities using the
implementation written by Marcos López de Prado and Riccardo Rebonato | C1 = (P1*P2*np.sin(Theta1-Theta2))/(l1*l2*(m1+m2*np.sin(Theta1-Theta2)**2))
C2 = (np.sin(2*(Theta1-Theta2))) * (l2**2*m2*P1**2+l1**2*(m1+m2)*P2**2- \
l1*l2*m2*P1*P2*np.cos(Theta1-Theta2)) \
/ (2*l1**2*l2**2*(m1+m2*np.sin(Theta1-Theta2)**2)**2)
dTheta1dt = (l2*P1-l1*P2*np.cos(Theta1-The... | 1 |
0e69cd4740bde51cb74168e210f8905e | d8aea3ed77f34a34d18b4043b6d82805 | Borrow an element from a coproduct by type.
# Example
```
# fn main() {
use frunk_core::Coprod;
type I32F32 = Coprod!(i32, f32);
You can let type inference find the desired type:
let co1 = I32F32::inject(42f32);
let co1_as_i32: Option<&i32> = co1.get();
let co1_as_f32: Option<&f32> = co1.get();
assert_eq!(co1_as_i3... | ArcBorrow {
ptr: ptr::NonNull::new_unchecked(ptr as *mut T),
phantom: PhantomData,
}
} | 0 |
cf87cd8f25db65fda00afc6dba2a9ce2 | 504fcf688fc6c80e4f68b5570abae5af | Inhibit idle.
Compositors should call this function when the idle state is disabled, e.g.
because a visible client is using the idle-inhibit protocol. | namespace
void SetIdleState (bool state)
{
} | 1 |
c79dd23341121f090d55b1ad27c31702 | d7f3fbc241137343c61f1870d7b65285 | Old Method left for reference, getting id through query params | let url = new URL(window.location.href);
let searchParams = new URLSearchParams(url.search);
if (searchParams.has("id")) {
let id = searchParams.get("id");
return id;
} else {
console.log("Error, no Id found in the URL");
}
} | 1 |
a6bdbbec2c7e51e5f1fff47af518b91e | 3b6c88615e5cd39dff6afdc1f1747a19 | Add a memory area to the malloc free pool. | lv_mem_pool_t lv_mem_add_pool(void * mem, size_t bytes)
{
LV_UNUSED(mem);
LV_UNUSED(bytes);
return NULL;
} | 0 |
c1dc884a0eaebc38444cacd1701ca996 | caf37ff383ca058e96d29b2341251278 | Enables Manager textboxes and highlights the Manager groupbox | {
if (getUser == "Manager") { label1.Text = "Manager"; textBox1.Text = "1"; textBox1.Enabled=false;}
} | 0 |
e4ad77205f5c039cb5f918fc0368135a | 4898b7cdfdb2accf2818dd1c71e9082b | Função para cadastrar contatos no banco de dados | if (contactNameInput.value === '' || contactPhoneInput.value === '' || contactAddressInput.value === '') {
alert('Certifique-se de preencher todos os campos')
return;
}
let name = contactNameInput.value;
let phone = contactPhoneInput.value;
let address = contactAddressInput.value;
... | 0 |
f9ba6ced63ce451b395eebfb9aa57ab9 | 370e8346c5245320f98c2e171d960e37 | !
This routine puts the port table entries as per user (via IAL) mentioned
port order & firmware settings. | (
GT_VOID
)
{
GT_STATUS rc;
GT_PORT_NUM eSendPortArr[3];
CPSS_INTERFACE_INFO_STC interfaceInfo;
PRV_TGF_PCL_LOOKUP_CFG_STC lookupCfg;
cpssOsMemSet(&interfaceInfo, 0, sizeof(interfaceInfo));
cpssOsMemSet(&lookupCfg, 0, sizeof(lookupCfg));
PRV_TGF_SEN... | 0 |
57ffd8b33f8d358f8064d0abe2618716 | fe83d87262851b49311907c44680059f | convert all occurences of the
character (toEsc) within the
string (source) to its %xx
representation, and returns
the converted string (dest) | {
if (!isValidString(src) || strlen(src) > dlen - 1)
return FALSE;
memset(dest, '\0', dlen);
size_t o = 0;
for (size_t i = 0; i < strlen(src); ++i)
{
switch(src[i])
{
case '"':
if ( o + 6 > dlen )
return FALSE;
dest[o++] = '&';
dest[o++] = 'q';
dest[o++] = 'u';
dest[o++] = 'o';
dest[o... | 0 |
f28d9905b71138c2c9594578f44060dd | eeaf1c006944bb2ab1aa2de41793d3c7 | Get the people the target market are following and rank by the most connected | batch = neo4j.WriteBatch(DB)
queryString = """
MATCH (e:FourSqrVenues_explore), (t:FourSqrVenues_trending) where e.place_id = t.place_id
MATCH (e)<--(u:FourSqrUsers)
MERGE (u)-[:CHECKD_IN]->(t) return u, t, e limit 100
"""
batch.append_cypher(queryString)
results = batch.submit() | 0 |
d9ded2ea6be779fb687639d81e3d525b | 4be5e2fbf954a16d7665dea4d2b11f12 | Używając BufferedReadera do obróbki pliku, stwórz listę słów bez duplikatów,
skonwertowanych do małych znaków, posortowanych alfabetycznie.
Wypisz tą listę. | List<String> words = FileUtils.readAllWordsFromTheFile(FILE_NAME);
Set<String>[] groups = new Set[MAX_WORD_LENGTH];
for (int i = 0; i < MAX_WORD_LENGTH; i++) {
groups[i] = new HashSet<>();
}
for (String word: words) {
if (!COMMON_SET.contains(word))
... | 0 |
7a3a98285293d29d847fd2aa5f6d941c | 6205671810b1c8318e6ca1f0b40f969d | 动态设置TextView(EditText, Button)的drawable图标, 可设置图标大小 | Drawable drawable = getResources().getDrawable(drawableId);
drawable.setBounds(0, 0, DisplayUtil.dp2px(this, width), DisplayUtil.dp2px(this, height));
textView.setCompoundDrawables(null, drawable, null, null);
} | 1 |
c69221127d5e595b1723f35744a1b706 | ba7aacecc543fc1cf29e2d38f5b04a9f | Creates a UI Manager to handle transitioning of toolbars. | class WorkbenchActionManagerBuilder(AbstractActionManagerBuilder):
def _create_menu_bar_manager(self):
return MenuBarManager(window=self.window) | 0 |
3c19ec9c92fa830098e843db8171cdb1 | 8fd7e258dbc6a9fea0a5345d2956d7ad | Test to make sure that no two celements have the same short name | {
lifemaker::Element element1(1, "a", "b", "c", true);
lifemaker::Element element2(1, "a", "b", "c", true);
lifemaker::Element element3(2, "a", "b", "c", true);
lifemaker::Element element4(1, "d", "b", "c", true);
BOOST_CHECK(element1 == element2);
BOOST_CHECK(element2 != element3);
BOOST_CH... | 0 |
76b1e2e58ccb0d0908029c23f0fc19b5 | 1cdec33f4097160443ca5eee3bde2bc1 | Dispatch the channel topic | class MainWindow:
def on_Topic_activate(self, widget, data=None):
self.factory.client.topic(self.factory.channels[0], widget.get_text()) | 1 |
a0f352d003175e0af9bc78e1960d2d05 | 07582fd78704f4a8084c72bf84221bd6 | Stores the master key encrypted in the current user profile | interface MasterKeyRepository
fun save(masterKey: String) | 0 |
6506ef9e31360292a0041f2a71c8b6e2 | d05d0c8e990e51b71c3552a708fbfadb | Encode a 2-byte integer | func encodeInt(data int) (string, error) {
return strings.Join([]string{"i", "e"}, strconv.Itoa(data)), nil
} | 0 |
77a811f531102d54171b975db56fc74e | 0fbec29299ad1209c32676aeafa0f701 | Monte Carlo algorithm returning state-vector or expectation values
at times tlist for a single trajectory. | self.fcn = fcn
self.times = times
self.states = states
self.__data = None | 0 |
673491e41652b009384fe7d49408ad1b | 24de58fbbffcb23c85a17396c33426e6 | Delete the warehouse file | class WarehouseController extends Member
public function destroy($id)
{
} | 0 |
4e938e46ee7ce50afc99b15652a8ec00 | df52d8ff7b28da7a4dac374d69b31603 | Asserts that the command box shows the error style. | public abstract class BrainTrainSystemTest
protected void assertCommandBoxShowsDefaultStyle() {
assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());
} | 0 |
1184701c1b682b466c43f89f488bfb30 | 7cf133b75659b61e77cff540e6228416 | Gets the wbs id. | public final class AssembliesGetBillOfMaterialsResponseBomTableItemsItemSource extends AbstractResponseObject implements ResponseWithDocument
public final String getWvmId() {
return this.wvmId;
} | 0 |
ce22ee2494ab70f7c445646ee1013277 | 1754f4398233781a996a6865395830db | reset the faction type drop down menu options depending on the map | {
if (Game.Type == GameType.ArsenalOfDemocracy)
{
DivisionTypes = DivisionTypesAoD;
BrigadeTypes = BrigadeTypesAoD;
}
else if (Game.Type == GameType.DarkestHour && Game.Version >= 103)
{
DivisionTypes = D... | 0 |
f776ebcd32ef8ae94f87d5d79c6df0f0 | c852d60c1a5ad056743cce67a271591a | No errors are reported if everything has a valid docstring. | class Foo:
def __init__(self):
self.no_docstring = 42
self.with_docstring = 43 | 0 |
0360fd692cf0e02329205b001102fdd9 | 0040caf55544960bf620aa85bd5c49d7 | 求数组中相反数的对数 | int cun = 0;
int N = a.length;
Arrays.sort(a);
for (int i = 0; i < N; i++) {
if (BinarySearch.indexOf(a, -a[i]) > i) {
cun++;
}
}
return cun;
} | 1 |
b5a960fe6f1af53a5f4c4e9b0c1375ac | 36067a5468afae5bd3306d6648786ae6 | Método para cerrar la sesion del médico,
prácticamente lo que hace es eliminar las variables de sesión | {
$user = User::where('cedula', $id);
$medico = MedicoGeneral::where('cedula', $id);
DB::table('role_user')->where('user_id', $id)->delete();
$user->delete();
$medico->delete();
session()->flash('eliminado', 'El médico general se ha eliminado correctamente');
... | 0 |
b05d3505fd4ebdf63f43999739b42699 | c3d1191ad9a073988ff10e9b53ecb4e3 | Publishes project to Production and returns production project status when publish is complete | return this.selectProject()
.then((project: IReactNativeProject) => {
return this.executeCommandInContext("publishToExpHost", project.workspaceFolder, () => {
return this.executePublishToExpHost(project).then((didPublish) => {
if (!didPubli... | 0 |
6da7794b0129e739608a8896eb9a526d | acff89b1fe70893eee8d49a62428d748 | Function Name: `$INSTANCE_NAME`_wGetEPCount
Returns the transfer count for the requested endpoint. The value from
the count registers includes 2 counts for the two byte checksum of the
packet. This function subtracts the two counts. | u32 USBD_EPTGetTransferCount(USBD_EPTn_Enum EPTn, USBD_TCR_Enum type)
{
return (((_USBD_GetEPTnAddr(EPTn)->TCR) >> type) & TCR_MASK);
} | 0 |
45508f7767111f628846455b514ad345 | 81447f283a88ce912277b389c3b06a54 | <summary>
Получить индекс ручки, приносящей предположительно максимальный выигрыш
</summary>
<returns></returns> | namespace PracticeProblem
public class Frame
protected virtual int GetMaxThrowIndex()
{
return 1;
} | 0 |
38b8de435714f21990b932e5cd3b7c3e | 2fa60ae8a62fee181984865ee8431a60 | Função responsável por realizar o treinamento da rede. | export class AppComponent implements OnInit
async train(): Promise<any> {
this.linearModel = tf.sequential();
this.linearModel.add(tf.layers.dense({units: 1, inputShape: [1]}));
this.linearModel.compile({loss: 'meanSquaredError', optimizer: tf.train.sgd(this.learningRate)});
await this.linearModel.fit(t... | 1 |
7d95386f0acdb4550021a013621f8b33 | 6f88afe8e4271a3e7d8bb732b2397d2e | Get the constrained variable. | class ADMMTwoBlockCnstrnt(ADMM):
def getmin(self):
if self.opt['ReturnVar'] == 'X':
return self.var_x()
elif self.opt['ReturnVar'] == 'Y0':
return self.var_y0()
elif self.opt['ReturnVar'] == 'Y1':
return self.var_y1()
else:
raise ValueError... | 1 |
d5d2add8bd2401367e2337c9864f76de | 306c93e7996bfba484d2eda32043a042 | Updates data grid based on invoice number selection. | namespace InvoiceSystem.Search
public partial class wndSearch : Window
private void FillInvoiceDataGrid()
{
try
{
dgInvoice.ItemsSource = new ObservableCollection<Invoice>(clsSearchLogic.GetDGInvoices());
}
catch (Exception ex)
{
... | 0 |
0f69a9796c995f24f5645b918fd6ffcf | 0d686e2e1e3d799b47b445633db3199f | Function that populates the list with names of the functions that will be used | for (size_t i = 0; i < Functions.Count(); i++) {
store.Add(Functions.GetValue(i));
}
for (size_t i = 0; i < Libraries.Count(); i++) {
GetLibraryByIndex(i)->ListAllFunctions(store);
}
} | 1 |
11338f7fce8228549aa861bf6a29cc0a | ac2565667abe96b7b0f9a8402b452191 | Add an edge describing a traversable path. | Transition transition_start = this.transitions.get(transition_start_id);
Place place_end = this.places.get(place_end_id);
this.edges.add(new TPEdge(transition_start,place_end));
} | 1 |
749fadba7871ec542171088138399cd1 | a342881c1d10c3984486257fd7cbd998 | ajax新增班级信息 | class ClassController extends HomeController
public function addClass(){
if (IS_AJAX){
$class=D("Class");
$id=$class->addClass();
$this->ajaxReturn($id);
}
} | 1 |
3fa7afca9cff2c83cef4ebcf7f1e6e14 | f9da80ae22acd49864a7510bd8972da7 | # Timeseries plot of south-west mean growing season temperature | {
varnames <- c("date", "ret1", "retyear", "retac12")
vars <- c("date", "ret1", "retyear", "retac12")
newdata <- tail(data[, vars], ndates); colnames(newdata) <- varnames
newdata <- melt( newdata, id="date" )
tmp <- date2month( newdata$date )
ggplot(newdata, aes( x = date, y = value, fill=variable) ) +
th... | 0 |
211a5aabdb6fc4d3926470ce0ee4c860 | ed535a907da78eb4f5eefbe0796bc948 | Check if the table exists in the schema
If no exists, throw an exception. | static function checkTable (string $tablename) : string; | 0 |
1e3f3ce7fb3cf2bf74142ea368110f52 | 2ac9ef4f2946e054bc610b0545c6c210 | Shows current artist as background image. | var artistImageURL = clickedElement.parentNode.dataset.artistFullImage;
artistImage.innerHTML = '<img src="' + artistImageURL + '">';
} | 0 |
05737a9058c761b256f7460a0242538c | 89a93fdc9aba933152c75659a294ed66 | Walks a complex dictionary object. Applies a function to each element in the tree.
- obj: the object to walk.
- fn(path, val, root) - return a non-None to replace the value and skip walking children | obj = d
key_list = path.split(".")
for k in key_list[:-1]:
obj = obj[k]
if isinstance(obj[key_list[-1]], type_):
obj[key_list[-1]] = fun(obj[key_list[-1]]) | 0 |
5394d65996c8b9ed59de8b57b17c0b3b | a55eb8d3217e4d6d2b4d0bc4e2e66bfe | <PROGRAM> -> <VARS> <BLOCK> | class Parser(object):
def program(self):
if self.current_token.type != PROGRAM_START:
self.error("Program not defined")
self.eat(PROGRAM_START)
self.eat(VAR)
self.eat(SEMI)
root = self.block()
self.eat(DOT)
return root | 1 |
902015de21615fbf3a003b369d01bb79 | 65f1ca400ca5843c3f288ffa9f54be8a | Set the Source File status label to the specified value using
a thread safe method. | public class StringButtonStatusDialogField extends StringButtonDialogField
public void setStatus(String status) {
if (isOkToUse(fStatusLabelControl)) {
fStatusLabelControl.setText(status);
}
fStatus = status;
} | 0 |
2de22f71aaa4b433776ef7ea869535dc | f035b6887a24f55cf271d51bbeef7e31 | Calculate Dispersion correlation. | m = self.m
n = self.n
T = self.t_size
P = self.p_size
delta_t = self.delta_t
viscosity = self.viscosity
exp_occ = self.expected_occupancy
layout = self.layout
D = 1.0 - min((viscosity*P*exp_occ)/T, 1.0)
center_x, center_y = n/2.0, m/2.0
... | 1 |
ff37008d4e8b1eb3658e55dddd61e637 | 73b4c29787c2e721f1c35855996ea934 | 推荐卡点击量 | class AjaxController extends Controller
public function actionRecommendClick($id) {
Recommend::updateAllCounters(['click_num' => 1], ['id' => $id]);
return true;
} | 1 |
a79817891c1109a6763d8878f7d17ce5 | 84ae46859a91a37351c1ae4528ed1e7a | Terminate all jobs associated with this target and free resources. | for target in self._queued:
for item in [item for item in self._queued[target]]:
self._cancel_item(item)
for target in self._running:
for item in [item for item in self._running[target]]:
self._kill_item(item) | 1 |
9b51c4e5ab8cd48e405408c5487cdd85 | 9ebdcad3e43d55b0c99ea1f292627876 | 產品類別dgvCategory上按一下執行 | namespace ShopManagement.Presentation.Form_Buy_Order
public partial class FormBuyOrder : Form
private void Articles_Category_lb_Click(object sender, EventArgs e)
{
Articles_dgv.DataSource = null;
Articles_dgv.DataSource = new ArticlesBLO(db).SearchByCateory((ArticleCategory)Articles_... | 1 |
902ccb77441e440f276115506485273c | 4810f4a8c91814023fc42b4512a65eb4 | Add a new instance to the existing Archival Object to link the new digital
object to it. | public class FedoraDigitalObjectManager extends DigitalObjectManagerBase implements DigitalObjectManager{
public URI storeAsNew( URI pdURI, DigitalObject digitalObject) throws DigitalObjectNotStoredException {
return this.storeAsNew(digitalObject);
} | 0 |
e6d4ae2516cbce9b957a07e1e6eab0a3 | 4e5f0c55f84051673e2bfafd6e53a4d2 | Determines whether a candidate Matching represents a solution to the
Stable Marriage problem. Study the description of a Matching in the
project documentation to help you with this. | int tmpA = findPerson(names, FINCH);
int tmpB = findPerson(colors, WHITE);
if (tmpA != tmpB) {
return false;
}
tmpA = findPerson(names, MARCOLLA);
if (tmpA != 0) {
return false;
}
tmpA = findPerson(colors, GREEN);
if (tmpA != 1) {
return false;
}
tmpA = findPerson(colors, BLUE);
tmpB = ... | 0 |
e00d558321dc0249a40ed57c31feeca0 | 7e962a45da977fe8e69feb75c960e015 | Atualiza a lista de sistemas que um usuário tem acesso | class SystemsController extends Controller
public function index()
{
$aSystems = User::with('systems')->where('users.id',Auth::user()->id)->get();
return SystemResource::collection($aSystems[0]->systems);
} | 0 |
0c0c6e5908380e99730efdd8ae5220fe | 73aed68cf39f9fa4ae0d430d602aacc9 | Remove the specified c39sitio from storage. | class SitiosInteresController extends Controller
public function destroy($id)
{
$si = SitioInteres::find($id);
$si->delete();
return back()->with('message_success', 'Sitio de Interes Eliminado Correctamente');
} | 1 |
2cc454e587953a20a4ee9097656c3dae | ef0a3e701ca1e764548b757bbc780021 | 根据当前的tab编号,返回显示出来的奖励列表数据 | if type(showArea) ~= "number" and showArea > AchievementData.MAX_TYPE then
return {}
end
if self._dataIsDirty then
self._achiListData[showArea] = self:_getAchievementData(showArea)
self._dataIsDirty = false
end
local list = {}
for k, v in pairs(self._achiListData[showAr... | 1 |
84fff488727b1d32b0ea737ba3a00bee | 97ff1c37ac4ae243ed80fc520458fba1 | Esta thread processa os frames capturados e busca
os objetos na imagem. | ret, self.frame = self.cam.read()
largura = self.frame.shape[1]
altura = self.frame.shape[0]
scale = 0.00392
blob = cv2.dnn.blobFromImage(self.frame, scale, (416, 416), (0, 0, 0), True, crop=False)
self.net.setInput(blob)
outs = self.net.forward(_get_output_layers... | 1 |
7e8ae2fb77119fe53d4640619fdf3af8 | 82b116cde9a2183d594ccbcba76a4ef6 | 批量删除二维码比较日志 | $ret_mi = load_model('dbgl/qdyctzd_model')->multi_delete($request['arr']);
$response = $ret_mi;
$app['fmt'] = 'json';
} | 1 |
af02cd09b375ca62251a1cfa681737a8 | 38e3ac49647031228fc59c28b752530d | 响应请求设置一键开门 | $.ajax({
url: "/open_post",
type: "post",
contentType: "application/x-www-form-urlencoded;",
data: null,
dataType: "text",
success: function(result){
alert("已经开门!");
},
fail: function(err, status){
console.log(err);
}
});
} | 1 |
2902e42a709d2b1635cd6b19ea37df7b | 35955eef4cd7fdb4593881d6524d6298 | Determines if the current task is erroneous | class TaskBase:
def errored(self):
return self._errored | 1 |
d667dab0f974b15cc47c27ebf577a05d | 0daa7fe525b1714ea088e1a97b121b98 | Obtention du nombre total de vente pour un joueur dans la journée | {
$total = DB::table('ventes')->select('jour' ,DB::raw('SUM(montant) as total'))
->groupBy('jour')->where('reglement', '=', 1)->orderby('jour','desc')->get();
return view('total.index')->with('total', $total);
} | 0 |
7f371391784be69fb7bc70128586edac | a9319f83e8d4fd6b0cdfd79a235d40c2 | Returns a resource on the classpath as a Reader object | public final class LogConfigUtils
public final static InputStream openClasspathResourceUrl(final String pName)
throws IOException
{ return loadResourceUrlFromClasspath(pName).openStream(); } | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.