query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
dca9c13091a78d77e70cfbffb8193847 | b5127a2b7d78529b7d2b0c65a9cb4163 | Registers a direct use of the Query Builder | {
$processor = $this->getPostProcessor();
$grammar = $this->getQueryGrammar();
return new QueryBuilder($this, $grammar, $processor);
} | 0 |
415b4c03baceec62c244e3c89f81484c | 724c1d8697e10656737f865cde6545ba | 根据店铺ID查询信息,并进行排序 | List<Commodity> commodityList = commodityMapper.selectSortCo(shopId, storId);
for (int i = 0; i < commodityList.size(); i++) {
Commodity commodity = commodityList.get(i);
List<Spec> specList = specService.getSpecList(commodity.getId());
commodity.setSpecList(specList)... | 1 |
2ec79a8267a1887fc66ac5e8b1e33134 | a75cf61b8c3f5bcd69cf34986361d999 | Test letter directory creation | class FileSystemTest extends PHPUnit_Framework_TestCase
public function testCreateDirectory()
{
$this->assertTrue( $this->fs->createDirectory( OUTPUT_DIR . $this->_testDir ) );
$this->assertTrue( file_exists( OUTPUT_DIR . $this->_testDir ) );
} | 1 |
780ea502bdc871c34ec7693a207015bf | e09665da13817b8f1dcb8db12d78fef0 | Ends the automatic cinematic camera. | {
aim = false;
yield return new WaitForSeconds(0.1f);
behaviourManager.GetCamScript.ResetTargetOffsets();
behaviourManager.GetCamScript.ResetMaxVerticalAngle();
yield return new WaitForSeconds(0.05f);
behaviourManager.RevokeOverridingBehaviour(this);
} | 1 |
73ce16782957bb643bd5fc8bd8a41fd2 | 9147eeda8fac4f7433ba4b8725bb12cd | Sends a message to the connected address, returns the number of bytes sent. | size_t TCPSocket::Send(const void* data)
{
std::string* message = (std::string*)data;
int result = ::send((SOCKET)m_socketHandle, message->c_str(), (int)GetStringSize(*message), 0);
int errorCode = WSAGetLastError();
UNUSED(errorCode);
if(result != SOCKET_ERROR)
return 1;
else
return 0;
} | 0 |
253fb0911fec228a86382d5af4e0b512 | 1cd238056699f03f95f31ee760293599 | 检查输入的氨基酸比例是否在0到1之间 | class MainWin(QMainWindow):
def modify_ratio_1(self):
temp = self.label_ratio_1.text()
if temp > "0" and temp <= "9":
try:
self.ratio[0] = float(self.label_ratio_1.text())
except ValueError:
warn_msg(self, "Invalid Input.")
else:
... | 0 |
3b0a92c1a695b6d926452c136bb30dc5 | 3eb619b1af99507da9a99bedc8f27ea4 | 社員マスタテーブル情報更新 | boolean result = false;
EmpInfoData data = form.getData();
EmpInfoGPersonal personal = new EmpInfoGPersonal();
personal.setId(data.getPersonal_id());
personal.setFamily_name(data.getFamily_name());
personal.setFirst_name(data.getFirst_name());
personal.setFamily_n... | 1 |
67e44244d40ac9c3d560f36366f25291 | ed32c8e176bf3247246a75c21b1864c5 | 根据标签和问题的id,列出本问题外的相关问题。这里的标签仅是第一个标签 | @Service
public class QuestionServiceImpl implements QuestionService
@Override
public List<QuestionDto> selectRelated(QuestionDto questionDto) {
if (StringUtils.isBlank(questionDto.getTag())) {
return new ArrayList<>();
}
Question question = new Question();
question.setId... | 1 |
d65d5ec416e8dcefaa8b00166fdf2cdd | b19d33a8f24e517fa6bfa00c9211f232 | Gets the appointment resource by contact. | TblResidentContact findAppointmentByCon(TblServicesCustomer tblServicesCustomer) throws ServiceRunException; | 1 |
952964dcfca133061c31edcc07c2385f | c4f0bacf5d3487870b6e792a19b7f408 | Test case for data_context_topology_context_topologyuuid_linklink_uuid_available_capacity_bandwidth_profile_committed_burst_size_get | class TestTapiTopologyController(BaseTestCase):
def test_data_context_topology_context_topologyuuid_nodenode_uuid_node_rule_groupnode_rule_group_uuid_available_capacity_bandwidth_profile_get(self):
response = self.client.open(
'/data/context/topology-context/topology={uuid}/node={node-uuid}/node-rul... | 0 |
27da7a7699d2c9b03941aa57433825a4 | c48550cd184317190f6aa4d5f90e938b | Check that the inner product is Hermitian. | def is_hermitian(a: np.array) -> bool:
return np.allclose(a, dagger(a)) | 1 |
c7be4e77e5d08f7cdbd99431b00cf040 | 5368c58f6738e14250605d941b064442 | 注册成功后是否通过Session获取ClientContext | public boolean execute(IInformation info) {
RegisterClientInfo regClient = (RegisterClientInfo) info;
return true;
} | 0 |
8044d80e5e34f0cbcc258e5341e05569 | ba2c51e0748bb99aadeac38c81cd1cd4 | Setter for the total number of accounts | public class DashboardDTO
public void setTotalAgent(String totalAgent) {
this.totalAgent = totalAgent;
} | 0 |
82ed6a58d20565ae55a852e4aab32668 | 8ef67d756d76450062ce5da4711727cb | Display selected item in main menu based on Menu_Index | namespace Mogre_Procedural.MogreBites
public class SelectMenu : Widget
protected void setDisplayIndex(uint index) {
index = (uint)System.Math.Min((int)index, (int)(mItems.Count - mItemElements.Count));
mDisplayIndex = (int)index;
Mogre.BorderPanelOverlayElement ie;
Mo... | 1 |
5ae7094c60dad38b414c52dd7aa703d9 | 6b904e953f8d9c66414ec9c1545253d9 | 根据filepath查找对应的资源 | public List<ResourceModel> idnexQueryResource(String filetype); | 0 |
1227cf1cd79f3ab10f456b695c59606c | 82cb29eea3fd4a3c5969a217c12b6202 | Gets list of upcoming travel plans | class LL_Voyages:
def get_upcomingFlight_list(self):
upcomingList = IO_API().get_upcomingFlights_from_file()
return upcomingList | 1 |
9b73fcf8150a6c0821b759575ca49024 | fd46b11eb1330d94220aad95821ced4a | Set the exp reward gained for slaying | public class Wall
public void setExp(int exp) {
this.exp = exp;
} | 1 |
a5e0e5fec3b781d8ee56488b28bd5114 | 4868641b165224fa95519aaf58985410 | Da appen starter herfra, chekkes der her hvis brugeren er logget ind. Hvis bruger ikke er logget ind starter login aktivitet. | public class MainActivity extends AppCompatActivity
@Override
public void onStart() {
super.onStart();
FirebaseUser currentUser = user.getCurrentUser();
if(currentUser==null){
startActivity(new Intent(MainActivity.this,StartActivity.class));
finish();
}
} | 1 |
830f88b44a8de72cbfaa5ddb75bb3341 | 3fb9aa7351f5caa54d4a78a192f010e2 | 此Token為何種(開頭) | public class JackTokenizer
public String tokenType() {
switch (this.currentToken) {
case StreamTokenizer.TT_NUMBER:
return JackTokenizer.TT_INT_COSNT;
case StreamTokenizer.TT_WORD:
if (keywords.contains(tokenizer.sval)) {
return JackTokenizer.TT_KEYWORD;
}
return JackTokenizer.TT_IDENTIFIER;
de... | 1 |
ef70fb1376863667a7eaa9a47496778c | fa0424b16c396b01b454f7d196fa63a7 | Returns the meta object for class '{@link ide.jadel.jadel.Ontology <em>Ontology</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getOntology_Ontology(); | 0 |
478a78f384296e1ec8ad6d6f4477eccc | dcc98ef160bfed9cc13c25656aaa9372 | Devolve true se o ano deste objeto é bissexto, false caso contrário. | final int limiteBisexto = 1;
if (anoBisexto < limiteBisexto) {
return -1;
}
return 1;
} | 0 |
1c905696cbf66c52c2d4c59368a28544 | 9d94931396723c0c151a292ce830b0ef | 设置区域渐变色 | public class ZzHorizontalProgressBar extends View
public void setGradientColor(int from, int to) {
this.mGradientFrom = from;
this.mGradientTo = to;
invalidate();
} | 1 |
7205099dc677fa05e560a74c5dc5ed44 | b7822255659a502a7dbb29ca398f2788 | report bad CSV data, return fixed row or None to skip this row | abstract class Processor
function addBadRecord($reason) {
if (!is_resource($this->bad_fp)) {
$this->bad_fp = fopen($this->bad_file_name,"w");
if (!is_resource($this->bad_fp)) {
I2CE::raiseMessage("Could not open $this->bad_file_name for writing.", E_USER_ERROR);
... | 0 |
c644a522b7ae78e220ab3edefc985119 | 0747f943ff4f65ebeef06ecf320bee58 | Permet d'isoler dans un tableau le nombre d'hommes et de femmes | List<CountPetitonerSexDTO> countPetitonerSex(); | 1 |
a8968853368b41a9c1c35621305d0614 | 594aba4be2349556831034c912b9cd5a | Redefine the scipy.ndimage.measurements.label function to work with a wider
range of data types. The default function is inconsistent about the data
types it accepts on different platforms. | def relabel(im, structure=None):
check_image(im)
return _label.relabel2(im, structure) | 0 |
443d3244a6b22417a402bff05037dfb3 | be3573991d55a243597262b069e3573b | Utility method to set the display flag for displaying internal
operations of the heap bubble and trickle operations
<p> | void setDisplay(boolean display); | 1 |
0b3bb289c4237b0c438a2b8ae977e2fb | 43dcd4976782484de4a99aca23be1da5 | Load, decode paths into images and cast them into float32 | async function loadImage(fileName) {
const data = fs.readFileSync(fileName);
const obj = tf.tidy(() => {
const buffer = tf.node.decodeImage(data);
const cast = buffer.cast('float32');
const expand = cast.expandDims(0);
return expand;
});
return obj;
} | 1 |
cad047b843bed2a0c4e61a7af75861c2 | 801033dbb876a6730fa46433fe345933 | Assign a user write access to a specific node. | void setAccessPermissionWriteInAdminMode(String zone, String absolutePath, String userName) throws JargonException; | 1 |
a8683b7a788cc0f1bd0807ba50dae95c | e52533852b4593d363a94dd1966c1d2e | Determines whether the specified instances are the same instance. | {
if (instance == null && comparing == null)
{
return true;
}
if ((instance != null && comparing == null) || (instance == null && comparing != null))
{
return false;
}
return instance.Equals(compa... | 0 |
1c0994546d48e35f9588856b3851fd70 | f5623785d08159e542bc82ad786668d9 | this method is used for selecting elite individuals from the population according to their fitness level. | j = -1
for i in range(self.size):
if self.elitist['fitness'] < self.fitness[i]:
j = i
self.elitist['fitness'] = self.fitness[i]
if (j >= 0):
self.elitist['chromosome'][0] = self.individuals[j][0]
self.elitist['chromosome'][1] = ... | 1 |
d9aa6470c1b8289de815d35aa34a7c27 | 3cb180fb3de85b08c3d24550a2b1d7a1 | Testa criação de transferencias em lote sem erros | class CreditPilotTest extends TestCase
public function testOne()
{
$transferId = time();
$creditPilotPayment = $this->creditPilotPayment;
$amount = round(rand(0, 10000) / 100, 2);
$result = $creditPilotPayment->doTransfer($transferId, '9055555555', CreditPilotPayment::CHANNEL_CREDIT_PILOT_BEELINE, $amount);
... | 0 |
aec7072e05b3d56154a5fff829b09450 | a9dd8c5414f7ec9d925d8f925ce42181 | Register a new cinema object and return if success | public BaseResponseVo add(@RequestBody CinemaSaveReqVO saveReqVO) throws CommonServiceException {
saveReqVO.checkParam();
cinemaService.save(saveReqVO);
return BaseResponseVo.success();
} | 1 |
0dd070afcf1a6444514bae30f8ddfa3b | 0a89095f2a912bf8309cddd2010631a8 | 查询有图的评价数量 | public Integer getCommentCountByMap(@RequestBody Map<String, Object> param) throws Exception {
return hotelScoreService.getCommentCountByMap(param);
} | 0 |
d182de380111f656d6ce4d91c7bc6cc1 | 931f182239af8654a594c71568be047d | 查询纳管数据库列表 | function queryDatabase(data,callback){
let url = `${serverUrl}policy/hive/database/list.do`;
BfdRequest.ajaxPostStrData(url,data,callback);
} | 1 |
b5a15eaf5ad2daf9e887b1e8009746d8 | 2dd4c0436f071b65f32195126f0fc2b7 | Force all existing browsers to close in case any haven't been deleted | def close_all_browsers():
drivers = browser.get_open_browsers()
for driver in drivers:
_close_remote_browser_session(driver, close_only=True)
driver.quit()
browser.clear_browser_cache()
BuiltIn().set_global_variable('${BROWSER_REUSE}', False)
CONFIG.set_value('Headless', False) | 1 |
49b028fd30dc58ae5fd63da943d62d3c | ae342a5720ce5585fb59e4877958b9a5 | Contrôle si l'extern_id est correct | if(strlen($ExtStnId) == 0) {
return true;
}
$retBool = true;
switch($MatlTypeId) {
case TD_B_CICD_MATERIAL_TYPE_NAME::C_MATL_TYPE_ROW_ID_LEGACY:
if($ExtStnId != TD_C_PATTERN_PER_ORCH::C_EXT_STM_ID_LEGACY) {
$retStrBody .= $objMTS->getSomeMessage("ITACICDFORIAC-ERR... | 1 |
fc6cb668be61da70daf59972f692a7b1 | 63df4114f856ffc70a897575af47a7de | диалог создания новой темы | {
return View(new Topic() { AuthorId = User.UserId, SubjectId = subjectId, ParentId = topicId });
} | 1 |
df6eba021acabd9306c9202ef53b48ab | adbf235735eeb1a2e93ef56a21cdfa29 | 保存技能数据 | {
$skillLevelModel = SkillLevelModel::findOne($skillData['skill_level_id']);
if (isset($skillData['point'])) {
$skillLevelModel->point = $skillData['point'];
}
if (isset($skillData['title']) && $skillData['title'] != '') {
$skillLevelModel->title = $skillData[... | 1 |
8d03fd34ae5b9da5f43b780f03fec3c0 | fd218cb4a1484c64469e59ba4c1bd964 | Get penalty_amount. | class TeamPointAdminInfo
public function getPenalty(): int
{
$hints = $this->teamPoint->getHintsUsed() * $this->point->getHintCost() * 60;
$skip = $this->point->getSkipCost() * 60;
if ($this->team->isFinished()) {
if ($this->isSkipped()) {
return $skip;
... | 1 |
65d10f5b44378edc4d7c3199768e6bf6 | fadf3b8122579e38b412549028cd3d61 | Returns path of all datasets (commonly used shared ones). | def get_dataset_paths(cohort: str) -> list:
expression_path: str = DATASET_PATH.format(cohort, EXPRESSION_KEY)
mri_path: str = DATASET_PATH.format(cohort, MRI_KEY)
phenotypes_path: str = RAW_PHENOTYPES_DATA_PATH
csv_paths: list = [phenotypes_path, expression_path]
if isfile(mri_path):
csv_pa... | 1 |
4cb99ffdfd3df01fccb47d3eb7a72aa3 | 29dfb23c4be9a3798518fdeb01b17881 | function to smooth the map with iterations | for (var x = 0; x < tblHeight ; x++) {
for (var y = 0; y < tblWidth; y++) {
var neighboursCount = getWallNeighbours(y,x);
if(neighboursCount > 4) {
map[x][y] = 0;
}else if(neighboursCount < 4){
map[x][y] = 1;
}
}
}
paint... | 1 |
94a5bc4333688015bf06c12b11bc7718 | ddf429460e349961d9e8a8b2ad2772d8 | Switches the hard ambient light conditions | public class GameManager : MonoBehaviour
private void ChangeAmbientLighting(float val) {
RenderSettings.ambientLight = new Color(val,val,val);
} | 1 |
b51cd96262f31d896b4d8b7e7220935d | 976e171bef6defaa7b49e0afbb6f9f45 | 根据年、月、日、时生成日期 | public final class TimeTools
public static Date createTime(int year, int month, int date, int hour, int minute, int second) {
Calendar calendar = getCalendar();
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month);
calendar.set(Calendar.DAY_OF_MONTH, date);
cale... | 1 |
2e5f9f863e2576717e117e60c3e27211 | fee303a3ace66d555231321bde2e5b62 | Generate a section for AVL | var item = "<li class='sitem' id='item" + num + "' ";
item += "onclick=\"LoadSection([" + inside + "," + num + "])\"><h4>";
if (section.InnerSections.length > 0)
item += "<span class='glyphicon glyphicon-triangle-right' id='caret' onclick=\"ExpandOrNestSection([" + inside + "," + num + "]);\"></span... | 0 |
836e60fbbf1888fb315345f6362e9a7f | 29a75a6f58c9fff8930e697042959580 | determines the Yahoo Finance ticker symbol based on currency pair | def ticker_symbol(company: str) -> str:
with open('listings.csv') as CSV_FILE2:
stock_data = csv.reader(CSV_FILE2)
next(stock_data)
for row in stock_data:
if str(row[1]) == company:
return str(row[0])
return ('Company not found') | 0 |
9a63eccacf94099f79f4cbc317d8cfdd | b490f286d324271b059f0a71b0e798fb | Resolves the foreign relation for a given table/field/uid pair and returns the table/uid pair. | {
$relatedUids = [];
$uid = $row['uid'];
$value = $row[$this->getLookupField()];
switch ((string)$this->columnConfiguration['type']) {
case 'inline':
case 'select':
if ($this->columnConfiguration['MM']) {
$dbGroup = GeneralU... | 1 |
84d77efcb9ed495562057204c4fd88d2 | 83c7ec49ab11ac9c40ecba57aae65159 | Same as for getAcute, but with stroke | export class Path
arcToAlt(rx: number, ry: number, rotation: number, fA: number, fS: number, x2: number, y2: number) {
if (!this.xy) return;
if (rx < 0) {
rx = -rx;
}
if (ry < 0) {
ry = -ry;
}
const x1 = this.xy[0];
const y1 = this.xy[1];
... | 0 |
fd6d28a1610f2876d1ca8c9ced6540b8 | dcde58048b34126e455eb67900c4b230 | 验证作品详情页里关注按钮功能是否有效 | class MyTest(unittest.TestCase):
def testCase05(self, id=27):
data_test = operate_excel.data(case_name=MyTest.name)[id]
expect_one = operate_excel.change(asserexpect=data_test['expect1'])
expect_two = operate_excel.change(asserexpect=data_test['expect2'])
Log().info('获取用例数据:%s' % data_te... | 1 |
fd895434257a1c8b26287b9dd0817955 | 40f80dda9eee55146517cc5d06276ef9 | 把LocalDate类型的日志转换成Date类型的日期 | try {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern).withResolverStyle(ResolverStyle.STRICT);
return LocalDate.parse(localDate, formatter);
} catch (Exception e) {
e.printStackTrace();
}
return null;
} | 0 |
c15d7c7aa39649e8232c8f47fc5aa027 | 554be346468cb07a24c29abe699f5a98 | Expand an IPv6 Address
This will take an IPv6 address written in short form and expand it to include all zeros. | {
ADDRESS_TRACE;
if (!valid())
return FALSE;
if (ip_version != version_ipv4)
return FALSE;
memcpy(&address_buffer[12], address_buffer, 4);
memset(address_buffer, 0, 10);
address_buffer[10] = 0xff;
address_buffer[11] = 0xff;
smival.value.string.len = IP6LEN_NO_SCOPE;
ip_version = version_ipv6;
... | 0 |
a227d070b03d8e62947c8fab26cff83a | 8caf3c3d933ef315afb1a45536dd44ed | 向klass_seminar表添加数据,在创建讨论课之后添加相应记录 | $kindergarten = $request -> session() -> get('kindergarten');
$classType = $request -> input('classType');
$className = $request -> input('className');
$tableObj = new SmallappClass();
$tableObj -> kindergarten = $kindergarten;
$tableObj -> classType = $classType;
... | 0 |
2090d52a73cefb328b4065fc8529f616 | 6fd57a7cc2863a238391743da983927d | Creates and returns a gateway for Page objects | public function createPageGateway(); | 1 |
6bf65ef81c0e1ddd29323763f98cf455 | 06f4b3f3ff595258bbccf1b058cc9732 | 初次登录,获取Cookie | URL url;
HttpURLConnection conn;
String session_value;
try {
url = new URL("http://jwc.wyu.edu.cn/student/");
conn = (HttpURLConnection) url.openConnection();
conn.setReadTimeout(10000);
conn.setConnectTimeout(10000);
conn.setRe... | 1 |
3eda4c2736b7b06a06d375ecb85094b8 | 68394f4e04cf200fbda324ab21808ffa | 动态SQL更新方式二 | public class JDBCTest2
public static void main3(String args[]) {
String DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
String URL = "jdbc:sqlserver://localhost:1433;DataBaseName=3070421090";
String[] zeh = {"主码"};
float[] money = {(float) 133445.9};
final String NAME =... | 1 |
0041442f8f83509e334b458d75551e4c | 71249f12eb53581efb8ead23e6994591 | Gerar os primeiros n elementos da sequência seq | def carregue_lista():
n = int(input("Digite n: "))
seq = [0] * n
i = 0
while i < n:
seq[i] = int(input("Digite um número da sequência: "))
i += 1
return seq | 0 |
571563202cdb02af4316abf166ed3273 | 79f1cf2f9ef4d4eeeee67fee3a34c9bb | Transforms a normal iterable type into an async iterable type. | def from_async_iterable(iter: AsyncIterable[TSource]) -> "AsyncObservable[TSource]":
from .create import of_async_iterable
return AsyncRx(of_async_iterable(iter)) | 0 |
e016add3c4c072512833c9eb9af56351 | a38a2e5cd43775ad6fd8e2c62327ef71 | 入力者CDをレコードに格納します。 | public class JuchuJuchuAddOnlyRecord extends KitRecord
public void setKuraCd(String kuraCd) {
put("KURA_CD", kuraCd);
} | 0 |
3ef7a4eade4e5fa9f05ca8b04ec57ef7 | c182dec329d6cf5c571dae69a0b08fa1 | Saves an employer to the database. | {
var persistedEmployer = _context.Employers.AsNoTracking().FirstOrDefault(e => e.ExternalId.Equals(employer.ExternalId));
if (persistedEmployer != null)
{
_context.Entry(employer).Property(v => v.Id).CurrentValue = persistedEmployer.Id;
_conte... | 1 |
b6ee5bc090a20581a57e01232d4c20cb | dd629ee49ffc60149eec1fd5faea6cfb | Show the payment request UI. | amount: Long,
currency: String,
skipTipping: Boolean,
extendedAuth: Boolean,
incrementalAuth: Boolean
) {
navigateTo(
EventFragment.TAG, EventFragment.requestPayment(amount, currency, skipTipping, extendedAuth, incrementalAuth)
)
} | 1 |
a7f411348d06282d4f1367a737cc5816 | dd569ffd67a0466342b30c96869f9632 | This method is used to create the lottery tickets | int[] numberArray = new int[size];
for (int index1 = 0; index1 < size; index1++) {
numberArray[index1] = (int) (Math.random() * 49);
for (int index2 = 0; index2 < index1; index2++) {
if (numberArray[inde... | 1 |
4fc357ad36d45157bcbd7e0885366ad1 | 7535e619dfef74fec78d050a896d861a | test the nuclei are correctly identified for this network | gd: GraphDocument = json_loader.load(str(ONT), target_class=GraphDocument)
g = gd.graphs[0]
lbls = [n.lbl for n in g.nodes]
self.assertIn("cytoplasm", lbls)
self.assertIn("cell periphery", lbls) | 0 |
a58ea32372ceb3efbe4f95f6318de03b | b2486562095b6acd320a270125c09768 | Create a color giving ints between 0-255 as the components
and convert to double to use in struct color | COLOR::COLOR(float fr,float fg,float fb,float fa)
{
r = fr;
g = fg;
b = fb;
a = fa;
} | 0 |
bde26b530ba6d346f6947b19fcce7782 | 48ade437015f54cb8afb9d2d991ae344 | DPI_AWARENESS_CONTEXT_UNAWARE | namespace Lsj.Util.Win32
public partial class User32
[DllImport("user32.dll", CharSet = CharSet.Unicode, EntryPoint = "GetWindowDpiAwarenessContext", ExactSpelling = true, SetLastError = true)]
public static extern DPI_AWARENESS_CONTEXT GetWindowDpiAwarenessContext([In] HWND hwnd); | 0 |
f6a2ea2779f098f77ea6e6ac46676775 | d22d58b5fb45a22ed19ccf456a0f3486 | 根据微信订单号判断操作方式 | class CommonController extends Controller
public function success()
{
$orderid = I('orderid');
if (substr($orderid,0,1) == 's') {
$this->sign = 1;
} else if (substr($orderid,0,1) == 'n') {
$this->sign = 2;
} else if (substr($orderid,0,1) == 'c' || substr($ord... | 1 |
e42b42e50169024d8b6b278855373eaf | b5b3c5d70773370a5019427542adb564 | Detiene la ejecucion del simulador | class Simulator:
def stop(self):
self._run = False | 1 |
b1ab2b4968a357d492f20474f935aa1c | 2faee2dc4e321a60761278ac35686403 | Vérifie si un sequencer pour le joueur existe déjà | {
return $this->buildQuery($personnage, $type)->andWhere('t = :task')->setParameter('task', $task)->getQuery()->getOneOrNullResult() !== null;
} | 1 |
c166f0f532e9ed90955eaef869c55c53 | eb6693e08fee2e26d60e81073af38298 | Plot calibration curve - given pass data with predictions produce plot to show how
well calibrated the model that made those predictions is | x_ax = ["Jan-15", "Feb-15", "Mar-15", "Apr-15", "May-15", "June-15", "July-15", "Aug-15", "Sep-15", "Oct-15",
"Nov-15", "Dec-15","Jan-16", "Feb-16", "Mar-16", "Apr-16", "May-16", "June-16", "July-16", "Aug-16",
"Sep-16", "Oct-16", "Nov-16", "Dec-16","Jan-17", "Feb-17", "Mar-17", "Apr-17", "M... | 0 |
023565204700ffeee6720ec7a8083e78 | 96c5b933547b4347b0ac72e65a5ce16f | This method is used for displaying the Package Code report. | System.out.printf("%-15s => %-32s => %-15s => %s%n",
packageInfo.getGroupId(), packageInfo.getName(), packageInfo.getVersion(),
packageInfo.getPath());
} | 1 |
23bc49f7b3b52053126814182146b0e9 | 81ddc17af4314c62ccd20844c5550632 | Get the Field Names/Labels and the FormStack Field ID | {
$labelsArray = array();
$valuesArray = $this->getFieldArray($personID,$formID,$isRepeatable);
$idx = 0;
reset($valuesArray);
foreach(array_keys($valuesArray) as $k)
{
$fieldValue = current($valuesArray);
$labelsArray['formLabel_'.$idx] = $fieldValue['fields_desc'];
$idx++... | 0 |
4e0f5389cf7f53d462ff28dc9d8f4be4 | e29c39768e8c3437e2c223906cc75cc8 | 定位第一个单选框 | if(tableId!=null&&tableId!="")
return $("#"+tableId+" tbody tr :first-child input:checked");
else
return $("table:first tbody tr :first-child input:checked");
} | 1 |
b48b68dc568a56fa2974d380272ee2f0 | af3a52a747fabd1e43fb62812314e319 | The classifier neural network. | dropout_rate=0.1, **classifier_kwargs):
super().__init__()
self.num_hidden = num_hidden
self.num_layers = num_layers
self.dropout_rate = dropout_rate
self.classifier_kwargs = classifier_kwargs
self.input_layer = tf.keras.layers.Dense(self.num_hidden, trainable=False)
self.dens... | 1 |
3277ac8ec7a5e2af7f85d197c1c553af | ab175b11b06da22dc0bbc49439ee5641 | 异步上传文件到ipfs | function AsyncUpload({name, path, count = 1, onSuccess = () => {}, onFail = () => {}}) {
return new Promise((resolve, reject)=>{
client.put(name, path).then((r1) => {
onSuccess();
resolve(r1);
}).catch((err) => {
const newtimes = count + 1;
if (count <... | 1 |
c92c45d34ce94223983c27eaafbc890b | e5f1740565ef60d94da4aa31f4ca694e | copy dict (a shallow copy) | local function cpy(t)
local c = {}
for k,v in pairs(t) do
c[k] = v
end
return c
end | 1 |
93492a8eb011cc53f133839da562c92f | 266924b5422f7fc2ad736be23114f191 | Starting method of program. | public class ExerciseOne
public static void main(String[] args) {
new ExerciseOne().start();
} | 1 |
8ad4316518894d722a93994bc935ea64 | c5fc5cb1ec8f01b052e22346c92bae12 | Removes a user from the lockout list | class Prosody
public function unlockUser($username)
{
$endpoint = '/lockouts/'.$username;
return $this->doRequest('delete', $endpoint);
} | 1 |
ba31ea0353505b0e36f58f3380ed7722 | 6972cc7c00dd8575c1931a83c86116e3 | 获取可选的素材类型列表 | class ArticleLogic extends Logic
public function getSelectType()
{
return [
[
'name' => '文章',
'value' => 'article'
],
[
'name' => '外链',
'value' => 'outer'
],
[
'name' =... | 1 |
5ab7884e6bc934469b511a5e972ad984 | 7656e00caea69c0ba9c405420ba19fec | This is overridden to set the inserted item's parent to this
collection. | class DefaultTreeContentProvider(TreeContentProvider):
def insert(self, parent, index, child):
parent.insert(index, child)
return child | 0 |
6bea982c71631823e7f51e66586de13f | 69d0b0eb19c07cc33fe950fe07e656e2 | action displayMainWorkSelector | class WorkController extends Controller
public function actionIndex($url_menu = null,$url_subject = null)
{
$searchModel = new SearchWork();
$query = $searchModel->searchMenu(Yii::$app->request->queryParams);
$countQuery = clone $query;
$count = $countQuery->count();
$pages =... | 0 |
f1e32e053c9608efb4ef55f8a5d7d274 | 778d8fec0c5ed0707adbdc7f0422577f | validates the submitted form | function validateForm()
{
var profileFormId;
$('#frmMain').addClass('submitted');
if($('#drpShape').val() == 'W WITH CAP CHANNEL' || $('drpShape').val() == 'S WITH CAP CHANNEL')
{
$('#frmprofile2ForShape').addClass('submitted');
$('#fr... | 1 |
5fa125886350dddad53093a9636a0821 | e3b74d807e773a5812c347319e80a66c | Sets the test xpath. | public class CryptoCoverageChecker extends AbstractSoapInterceptor
public final void setXPaths(List<XPathExpression> xpaths) {
this.xPaths.clear();
if (xpaths != null) {
this.xPaths.addAll(xpaths);
}
} | 1 |
86cc48dbd985e1792cd1a9feb3d44853 | 61b084d58bbfa6ab12be26d4316f7da3 | Обновление слайдера сроков | function update_sliders(slide) {
stop_events = true;
switch (slide) {
case("start_time") :
new_val = convert_slider($( "#start_time" ).val());
if (new_val==null || new_val > $("#stop_time_slider").slider('value'))
$("#start_time").val(edit_old_val);
else
$( "#s... | 1 |
e86b4e431d95374d80ce9da2195604f3 | 6e30b6537299d3bb88465dba4d35210f | Takes a capstone from the player. | namespace KellerGame.Buildings
int CollectCaps(); | 0 |
11f370e52a53faa5b4b12b53b11a9ba0 | c2b93de1ea885b033fad07e1ce033d6b | GetMonitorData接口的同步版本,获取云产品的监控数据。传入产品的命名空间、对象维度描述和监控指标即可获得相应的监控数据。
接口调用频率限制为:20次/秒,1200次/分钟。
若您需要调用的指标、对象较多,可能存在因限频出现拉取失败的情况,建议尽量将请求按时间维度均摊。 | namespace JDCloudSDK.Cdn.Client
public class CdnClient : JdcloudClient
public async Task<QueryMonitorResponse> QueryMonitor(QueryMonitorRequest request) {
return await new QueryMonitorExecutor().Client(this).Execute<QueryMonitorResponse, QueryMonitorResult, QueryMonitorRequest>(request).ConfigureAwait(f... | 0 |
50e7c189b697bf2784474597e10b87e9 | 6afaaf2dcd4fb5cb23f6331a519ac54e | 将单条数据尾插法插入链表中 | public class SingleLinkedList
public SingleNode insertLast(int data) {
SingleNode singleNode = new SingleNode(data);
if (isEmpty()) {
head = singleNode;
tail = singleNode;
} else {
tail.next = singleNode;
tail = singleNode;
}
length... | 1 |
27bda7d37d713c57398416dc309a1676 | 8d1324c7d90e4b09e11ed94e2edbf769 | Fetch most popular words from the RSS feed. | class RssFeedManager
public function fetchMostPopularWordsInFeed(int $limit = 10)
{
$feedWords = $this->fetchWordsFromFeedEntries($this->rssFeed['entry']);
$feedWords = $this->filterFeedWordsFromCommonWords($feedWords);
return $this->findMostPopularWordsInFeed($feedWords, $limit);
} | 1 |
0f0a358f3d67c9fec126bead948247bc | 238f8e9d22657997d0851d7066e9dc21 | Hide field from detail view | class UmkmAspekkeuanganGrid extends UmkmAspekkeuangan
protected function hideFieldsForAddEdit()
{
if ($this->isAddOrEdit()) {
$this->NIK->Visible = false;
}
} | 0 |
a6c9cad5fe3b048e5f7890070565d8ec | 0702b5eb3b0e49e7fdd5054a330ee387 | Test function which compresses an image using the naive RGB scheme, decompresses
it and emits the test results into a CSV file for further analysis. | void testMain()
{
int k = 1 ;
int resultNum = 20;
compressResult * resultArrayOG = (compressResult*) malloc(sizeof(compressResult) * resultNum);
compressResult * resultArrayBBEC = (compressResult*) malloc(sizeof(compressResult) * resultNum);
int arr_size = 1000;
int printRaw = 1;
int printBBC = 1;
int printBBEC... | 0 |
4f61e3e68e3d84e6e63e16a38c8f228e | 1e85cc17eea0d938e1520e17a4d19286 | Moves an item up one in the list box. | namespace DDM2_Splines
public class PointsController
private void MoveSelectedUp(object sender, EventArgs e)
{
int s = listbox.SelectedIndex;
if (s > 0)
{
listbox.Items.Switch(s, s - 1);
listbox.SelectedIndex--;
Changed();
... | 1 |
48de83d47af9a0d9d0387eb14e07b4f3 | b6bea7f82bafb4bd2ab73cd474e800af | 指定したコントローラに振動とバックライトの色を送る | public class Pvr_ControllerLink
public void VibateController(int hand, int strength)
{
#if ANDROID_DEVICE
Pvr_UnitySDKAPI.System.UPvr_CallStaticMethod(javaCVClass, "vibrateControllerStrength", hand,strength);
#endif
} | 0 |
2013309c1342a53a03a3430948ea92fd | 818c4e73fedc303bd7edec7dc04350b4 | Perform drive SW/HW init | void DriveInit()
{
pwmInit(LOOPINTCY/2, DDEADTIME, (8*LOOPINTCY)/20 );
ADCDoOffsetCalibration();
ADCConfigPWMandDMAMode();
SetupHWParameters();
SysStatus.b[0] = 0;
ZeroControlReferences();
ExternalFaultEnable();
} | 1 |
2a05b81a3aa68b9496996fee5fb1eb63 | 1efbd25727b406afb9941223e79bb5c9 | 更新srv_room_sup | if (!$this->isPost()) {
if (!$this->isPost()) {
$this->renderjson(1, '非法操作');
}
}
$itemid = $this->input->post('itemid');
if ($itemid === NULL) {
if (!$this->isPost()) {
$this->renderjson(1, '参数错误');
}
... | 1 |
db2ae419332e9b83422238dc924f4737 | 9e157450ac1073826f0549d30b1b2526 | Handles the SelectedIndexChanged event of the ngOptionNetComboBox control. | {
if (state)
{
lstNetworks.SetSelected(index, true);
}
else
{
lstNetworks.SetSelected(index, false);
}
} | 0 |
e9f7dde113afbc44ee8797dc42b2a69b | 81572f0ba68990ab4ba7a514783e92f2 | given two arrays/lists A and B return an array whether the element of A is in B or not
future work: make a C version of this function | if a==[]:
return 0
for i in a:
if i not in b:
return 0
return 1 | 0 |
54d4e58010b9cc803ecdc4e6755802f0 | bb1d2a8ee996c5cfc42232816149031c | Een check uitvoeren of een user een geblokkeerde status heeft | $don = $this->db->fetchArray($this->db->query("SELECT usr_fail_auth, usr_blocked FROM ts_user_usr WHERE usr_id = '%u';", Array($this->idUser)));
return $don['usr_blocked'];
} | 1 |
44463e42c68e30d4d1a798127e8f1847 | 7b97d596b29b19c6ddbd0e1a75793ceb | Function to get all the prediction in the database | public List<Prediction> findAll(); | 1 |
fe0ee5eefc72f1a34ae8a5f723b1c4cb | e1123444842618297f82d94eda61268d | Determines whether the batch is the default batch or not | bool IsDefault(); | 1 |
aa9d3dbb7a385e335f70719ce2ead3b6 | 361b347c7bd13a6f592452d3971af3ad | Удаляем файл с цепочкой вычислений | function deleteCalculateItem(ind, dataObj){
var itemId = dataObj.getAttribute("invoiceitemid");
var target = 'item';
if ((itemId == null) || (itemId == 'null') || (typeof itemId == "undefined")){
target = 'ind';
}
$.ajax({
url:"fl_delete_calculate_item_from_session_f.php",
global: false,
type: "PO... | 0 |
8099f5c184769e9548d2333774e84fed | 83f228deb7234a41ff516ee220487287 | Updates the coloring of the phantom.
The coloring is a maximal subset of the blocks V' such that for each v in V': |anticone(v, coloring)| <= k. | if not has_union(tree[v].block, [lcntm, rctop]):return
if is_included(tree[v].block, [lcntm, rctop]):
tree[v].color, tree[v].mark = color, True; return
if tree[v].mark:
for child in tree[v].childs:
tree[child].color, tree[child].mark = tree[v].color, True
tree[v].mark = F... | 0 |
e3447a47e29b2546b8970900706384b3 | 06a5fb2a1008d0af1d40ff14dea73cb3 | SO_REUSEPORT | {
int ret = -1;
int option = 1;
ret = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&option, sizeof(option));
TC_ASSERT_EQ("setsockopt", ret, 0);
TC_SUCCESS_RESULT();
} | 0 |
495e45d6eca9043418f64d6a55f83ce0 | a9f0d89a61a291676af6d2699d30ffcc | 根据获取的积分获取商品信息 | public class JifenFlFragment extends BaseFragment
public void getGoods(String id){
Map<String, String> map = new HashMap<>();
map.put("id", id);
HttpxUtils.Get(getActivity(),HttpPath.JIFEN_FULI_GOODS, map,
new Callback.CommonCallback<String>() {
@Override
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.