query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ab6f2fe8c6c037270e82db2bc3fbc00c | 84b86eb8d3470504964a275b4de1a0cc | we need only one cache for all exports => no needed export ID for cache ID | class TestMetricsExportExtension(
extensionFeature: TestExtensionFeature
) : AbstractExtension(extensionFeature), MetricsExportExtension
override fun prepareReexport() {
} | 0 |
0e52d9f512bf3e720fa1d9fe40e15b9e | 35f3a0d23bd1d4ae49753de646e5b4c7 | Initializes the hbridges | void HalfBridge_Init(){
HalfBridgeISR_StartEx(HalfBridgeISR);
HalfBridgeTimer_Start();
} | 1 |
e4592b5bd77d7884324aaa1bb7f329a7 | 56ee5ed14aff2afc7e228c4d32947e5d | Provide shop maintain page. | namespace MPMS.Controllers
public class ShopController : Controller
public ActionResult ShopManage()
{
return View();
} | 1 |
63057e6a740b09946dc9138bf60e9dc0 | 2a0e927ead7a12c41a3e71edd5d49151 | Removes the specified bucket from the list. | namespace Couchbase.Management
IResult RemoveBucket(string name); | 1 |
69d2a584bc6e7224ce229bb680f04827 | 2ef601b4ed86696a4bfa0ec5452f26e4 | Load an Account ID for a certain user | $account_info = $this->get_account_info_by_user_id($user_id);
return empty($account_info->AccountId) ? false : $account_info->AccountId;
} | 1 |
e93910613c3cc05bce0ba66420919dad | 19b42c27e990a65414fefe905d9417a5 | Метод поиска людей по дате рождения. | {
Console.Clear();
Utilitys.LogoSearch();
try
{
var db = new SQLDatabase();
Console.Write("Enter year: ");
var year = Convert.ToInt32(Console.ReadLine());
var sql = "Where born = @born";
... | 1 |
7996c69bb81161fb0deadbe1f31745f6 | 414b8bb3a7a9c02393677772bcd6ae2d | refreshes the state of the build panel after switching back to it | namespace RealPop2
public class BuildingDetailsPanel : StandalonePanel
internal void Refresh()
{
_buildingSelection.Refresh();
UpdateSelectedBuilding(_currentSelection);
} | 1 |
7155effa30f786b872735407b0390248 | a9c1d58759458e11866029a59ed3a68c | Calculation of net total amount of profit/losses over the entire period | def profit (dataset):
profit = dataset['Profit/Losses'].sum()
return profit | 1 |
69be64299853df595dd45d3db7e6c102 | d0097f7e26ce00874ee08fe3345da24c | Actualiza el comentario de una orden de compra | function actualizarC(){
var _token = $('input[name="_token"]').val();
var coments = document.getElementById('comentarios').value;
console.log('coments');
$.ajax({
url:'/Bitacoras/Actualizar',
type:'post',
data:{_token:_token,coments:coments},
success:function(data){
swal(data.Titulo,data.Me... | 1 |
4ac78ad6b11505329fc8e3346f2a5de1 | 4a29d5fd378f48708ad06b42c9e5a501 | 查询用户搜索到科研成果的数量 | int getSearchCount(String name); | 1 |
6f54132c1099186c87116d42473cc96e | 40e353f68d1ed379c78714586e73e9fa | Is a particular output-name recorded as enabled? | public class RecordedOutputs
public int numberEnabled() {
return namesEnabled.size();
} | 0 |
8d0cae352a5922e90f9f6df472f3c164 | 50fd23f3dde44f15d128508587e8f56b | 현재 화면잠금 상태 불러오기( true: 잠김 / false: 풀림) | interface IViewController
fun isLocked(): Boolean | 1 |
b9c9597afba4c22937537911070d53ef | 7dc8d70bf5b290a952ced733bc1330bc | Occurs when the actor data is newly existing;
Usually when it first comes into range of the player. | namespace MonoMinion.StateMachine
void Enter(T actor); | 1 |
ec5df17f59d5b923323d8d22dd9c56fd | b05b815be602523bb061c3f25129b58b | Gets function name and param name to create the base model
# Arguments
name: Name of the primal model
# Returns:
The function name and param name mapped to the primal model | baseline_params = dict()
if hp_name:
hp_in = HEUR_DICT[hp_name]["in"]
hp_out = HEUR_DICT[hp_name]["out"]
baseline_params[hp_out] = fn(hps[hp_in])
else:
for hp_in, hp_out in zip(INPUT_HEUR, OUTPUT_HEUR):
baseline_params[hp_out] = fn(hps[hp_in])
return baseline_... | 0 |
070c496779298c6ac90d820f6011ddd0 | d52c95b5a55b9b4f0b6a4c4bfe25ee58 | Deletes a database instance | class RDSUtility(object):
def DeleteDBInstance(self):
response = self.client.delete_db_instance(
DBInstanceIdentifier=self.DBInstanceIdentifier,
SkipFinalSnapshot=True
)
return | 1 |
f3a0f60236714fe9e06a2fce80222383 | 258fc6e2b99eef5d65b6c14fc5bc6512 | method for loading all auteurs. It is using the crud service to getting data from the web API | export class AuthorDashboardComponent implements OnInit
getAllAuthor() {
this.authorService.getAuthorList().subscribe(data => {
this.authorData = data;
this.authorList = data;
this.totalLength = this.authorData.length;
})
} | 1 |
73c5bc7b0cff2862e6ebed5cac7e13c0 | c3835fc04c32dbfbe42711367a70f331 | them bai viet moi | class BaiVietController extends Controller
public function create()
{
$cates = DanhMuc::all();
return view('admin.bai-viet.create', ['cates' => $cates]);
} | 1 |
3b59977ca4d24d0779545f67d6281030 | ab543f13ce153f44860e6136e0d058ac | パネルが動けるかを判定し、更新 | if self.emergency.is_set:
self.panel.stop()
return False
else:
if self.cannot_go_up:
self.panel.stop()
return False
else:
if not self.panel.is_below_lower_bound():
self.cannot_go_down = Fa... | 1 |
a741e3fcf8d330f66eacc4c5914354f7 | 4518a920b0ff29b1c00b012ba97c221f | ADDITION MATRICIELLE | int i,j;
Matrix R;
#pragma omp parallel for private(j)
for(i=0; i<size; i++)
for(j=0; j<size; j++){
R.MX[i][j]=MX[i][j]+a.MX[i][j];
}
R.size=a.size;
return R;
} | 1 |
4e312020ef9cbfd6371cec496e566d6b | 98a60a2bc19b6222d4d34bdcf3f512a7 | Parses date from line by splitting on space (' ') and taking the first element | def read_date(line):
dts = " ".join(line.split(" ")[:3])
return datetime.strptime(dts, "%m %d %H:%M:%S") | 0 |
356c299d8f7b588716f20eb03c1f9d73 | 6c06f801fda73cb72cda4b7f73c2d8aa | Return a hash of the versioned columns with their values before the last save. | def get_version_attributes(version)
self.revert_to(version)
self.attributes
end | 1 |
f9f6a170e7b91a9a94b842d87db66fcc | 1b17aebb60884950dad31815d4d83ba9 | Select Sim Study Plan In Report. | {
logger.LogMethodEntry("RptSelectStudentsPage", "SelectStudentInProgramAdminReport"
, base.IsTakeScreenShotDuringEntryExit);
try
{
base.WaitForElement(By.XPath(RptSelectStudentsResource.
RptSelectStudents_Page_PgA_Expand_Im... | 0 |
3f4d89d7c354bbb9bbf9faecb0c1a4bf | e2c702a2b2103572f396c38fca8366e8 | Display the sanction creation view | class SanctiongnController extends Controller
public function show(Sanction $sanction)
{
} | 0 |
dc9fb70fce34c8c5b3dc9378fbbe5587 | c83b6f54df2d7b66766630463419df3b | Set a random start point for a new snake and return its coordinates | class Snake:
def restart_coord(self, matrix):
self.coordinates = [
[self.store.ground_dimensions[0]/2, self.store.ground_dimensions[1]/2]
] | 0 |
d2f8ca4d95749c4210a13fadd854d40f | 79e14626d3ee3153410e1bd63f5c832a | 获取引导完成情况 | {
if (m_currentTaskGuides.Count > m_guideIndex)
{
return m_currentTaskGuides[m_guideIndex];
}
else
{
TraceUtil.Log(SystemModel.Rocky, "想开始引导,但是当前引导列表为空");
return null;
}
} | 0 |
68facf58e18514b927863aea5ae6ccc5 | ee7000625677d74e25c05b695eaddacb | 检测是否为开房者 | return true, nil
key := buildRoomKey(serverId, roomId)
pool := getPool()
uids, err := pool.LRange(key, int64(playerNum), int64(playerNum*2)).Result()
if err != nil {
return false, nil
}
for _, u := range uids {
if u == uid {
return true, nil
}
}
return false, nil
} | 0 |
84d5cf54bc2439a1122ffb2616212230 | c58262802a41ee40147fadbe7e880736 | 判断是否已登录 如果登录了 自动跳转到后台首页面 | class LoginController extends CController{
public function beforeAction($action) {
parent::beforeAction($action);
if($this->is_Login()){
$this->redirect('/mobile/index/index');
}
return true;
} | 1 |
0532ce3187ee0cc39920059471fabea9 | db9dbb74e1dbce36a42c39e1800b68a1 | Filter the arguments used in an HTTP request, to make sure our user token has not been overwritten
by some other plugin. | if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check' ) ) {
return $args;
}
$themes = json_decode( $args['body']['themes'], true );
unset( $themes['themes']['peter-wilson-2017'] );
$args['body']['themes'] = wp_json_encode( $themes );
return $args;
} | 0 |
22c30d3abed12cc08d7800934718f406 | e520c67569a38677f70d71694dc5aca1 | en:Get Float type parameters, such as ExposureTime and Gain, for details please refer to MvCameraNode.xlsx file under SDK installation directory | global STEPS_LIB
vschvdc = self.__get_c_char_p_of_string(vschvdc)
model_type = self.__get_c_char_p_of_string(model_type)
parameters = []
n = STEPS_LIB.api_get_vsc_hvdc_related_model_float_parameter_count(vschvdc, model_type, self.toolkit_index)
for parameter_index in rang... | 1 |
23369269170deb67e30ce252b6498058 | f9674c1e63e9a2eceb6e98522659727d | 从redis里查询配送中的订单列表 | @Repository
public class DefaultFreightDao
public List<DefaultFreightDto> getDefaultFreightsFromRedis(){
return redisTemplate.opsForList().range("default",0,-1);
} | 0 |
ecdcc5c67f0a74c15a5a0bb97a56f57c | 5c40a0febc2f19b76fb5572553c6e0e6 | This method searches the path "data/" + env_name for the folder which
contains the model with the best results of the given environment. In this
case best means the highest average trajectory reward. | best_model = os.path.join(basedir, 'best')
if os.path.exists(best_model):
return best_model
else:
assert False, "No best models!" | 0 |
6877f9e36f4d6b95a0819db4759ef33c | fba407aaea3c87f8fbe715598f7f2e4e | Decorator for drawing functions | def update(func):
@wraps(func)
def wrapper(self, *args, **kwargs):
func(self, *args, **kwargs)
self.loop.draw_screen()
return wrapper | 1 |
044339213fc7737bf1c9d6f6e57c6fb6 | 1a81ffbc4fcb0f27582552eb662be85e | 根据entry的属性值Name,获取对应的dbus path | public String getPath(String name); | 1 |
e15a1dad0fea12cc6e8d9056d15df238 | bd5bcc2fa7eb021d37a07d42eb8b7758 | Returns a list of keys that will expire within the specified threshold. | class CachedPickledString(ndb.Model):
def GetExpiredKeys(cls):
current_time = datetime.datetime.now()
query = cls.query(cls.expire_time < current_time)
query = query.filter(cls.expire_time != None)
return query.fetch(keys_only=True) | 0 |
bbf033d96cc8b0ab4f51c684946e3f54 | fa03e8b7e4630c2c44d787ed3ac2030c | Set the distance away from mouse clicks to search for interacting items.
When clicking, the scene searches first for items that directly intersect the click position
followed by any other items that are within a rectangle that extends r pixels away from the
click position. | export class FieldSettings
public set distance_max(value: number) {
PythonInterop.setFloat(this.interop, `${this.accessor}.distance_max`, value)
} | 1 |
89aa1b7381c638ab954a8c2009be5244 | 9c0413d4da045528bc64126306535a74 | Candidates reject votes from candidates in previous terms. | class RaftServer:
# Miscellaneous constants.
def request_vote_RPC(term, candidate_id, last_log_index,
last_log_term):
if term < self.current_term:
return (self.current_term, False)
if self.voted_for == None or self.voted_for == candidate_id:
return... | 1 |
bdfa22a8ec86a14a08c57004f744bfd0 | fcbaf0c7dfa9618aea4ef2c0446e6fc3 | Hier wird genau dann "true" zurueckgegeben, wenn mindestens ein Bluemchen
in diesem Beet existiert ("lebt"). | public class Schaf
public int holeBlumen(){
return sheep.getFlowers();
} | 0 |
c02e6e9c3c2e52984181c7941fad337c | b76d586c0b52e740af2a271fc0214f3a | Generate stopwords from the current list of spanish stopwords, and copy
words with accents, but without them. | stop_words = stopwords.words('spanish')
special_stopwords = ['rt']
stop_words = stop_words + special_stopwords
tokensV2 = []
for i in range(0, len(tokens)) :
if not (tokens[i] in stop_words):
tokensV2.append(tokens[i])
tokensV2 = spr_OneLetter(tokensV2)
return tokensV2 | 0 |
f9ebe482b6bf2ce1452b22bb4eba6708 | 992470f1aca669cbdbc7017b51f409ef | 根据conditionid获取condition信息 | ConditionView getConditionById(String id); | 1 |
d7e3b30d0dc10df8449a132a0cd29c15 | b4b5f80313f3fb5120157e98651fd9f3 | Returns a list of suspected CLs. | suspects := []*model.Suspect{}
ha, err := GetHeuristicAnalysis(c, cfa)
if err != nil {
return nil, errors.Annotate(err, "getHeuristicAnalysis").Err()
}
if ha != nil {
haSuspects, err := fetchSuspectsForParentKey(c, datastore.KeyForObj(c, ha))
if err != nil {
return nil, errors.Annotate(err, "fetchSuspects... | 1 |
8c7c98365bde82a086f30c08ce350886 | b1d4509ef23a3c0002bad81f554b010c | For discrete distributions only | class ImproperUniform(ImproperUniformDistBase, PyDistributionBase):
#---+----|----+----|----+----|----+----|----+----|----+----|----+----|
def isDiscrete(self):
return ImproperUniformDistBase.isDiscrete(self) | 0 |
df7cc5bd263fb07e93534f8999405645 | d934e804cc1de29b6b9ca3a5b82dd42b | 通过实体名字和属性名字获取返回值 | Assert.hasText(name);
Map<String, Object> map = new HashMap<String, Object>();
try {
PropertyUtils.getProperty(entityClass.newInstance(), name);
map.put(name, value);
map.put("findUniqueBy", "True");
return (T) getSqlMapClient().queryForObject(entityClass.getName() + POSTFIX_SELECTMAP,
... | 1 |
906ae8166f31eb137a23f0fdcbb31626 | 63df4abbd972c5d7e12c68888e60acbc | 将jsp中的alert替换成app中的对话框 | public boolean onJsAlert(WebView view, String url, String message,
final JsResult result) {
Builder builder = new Builder(activity);
builder.setTitle(message);
builder.setPositiveButton(android.R.string.ok,
new AlertDialog.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,... | 1 |
ef8dc80d422fb7c8e0178a07dcc6eac7 | ddb99922f6f82a51f38b6c587332d2a5 | Called when clicking on the detector face. | open class MotionDetector(
var stableOffset : Float,
var gestureOffset : Float,
var rCondition : MotionDetector.(CrossDirection, List<Pair<dPoint, Long>>) -> (Boolean) = { _, _ -> false },
val yReverse : Boolean = true
){
open fun onClicked(point : dPoint){} | 1 |
19d01ef87cfca90a4bd5c989410999e6 | 51778c49431e4a0ddd51734eebd21a0b | Whether chat-launch form has been validly populated. | export class AuctionFormComponent implements OnInit, OnDestroy
public get isValid() {
return this.auction.valid && this.items.valid
} | 0 |
bf7febc893d726c1f98cd2f792ebef25 | 04d1093f8bef81bb969a76c098638fc2 | Build archive for a period | {
try
{
var forWrite = ArchiveProject.IntervalsForWrite;
forWrite.Clear();
var en = ThreadCalc.PeriodEnd;
var beg = ThreadCalc.PeriodBegin;
if (!ThreadCalc.IsPeriodic)
{
Si... | 1 |
0da3197524b49227316142c8ac74795e | 2d1d5ded2bd43649a4cabb12daf1aaa1 | Wait for a byte to be available from UART4 RX. | if self.uart_csr.r(utra::app_uart::RXEMPTY) != 0 {
return None;
}
let ret = self.uart_csr.r(utra::app_uart::RXTX) as u8;
self.uart_csr.wfo(utra::app_uart::EV_PENDING_RX, 1);
Some(ret)
} | 1 |
37c5ebcea341649797d3d98e563a2e56 | 9416f777a23e0f6915f56763ef61f43a | 获取短字符串,字符格式为:1字节(表示字符串长度)+内容字节 | var strLen uint16
buf = UnPacket(buf, &strLen)
if int(strLen) > len(buf) {
Log().Error("uPack size error")
return buf
}
*str = string(buf[:strLen])
buf = buf[strLen:]
return buf
} | 0 |
c8bb31a2ea066573bc81dae83f4efe9e | 7dc014c6bead3e5eb402221490dbcaf8 | Helper function to dump a form within a request object | request.write('''
<html><head><title>Posted Form Data</title>
</head>
<body>
<h1>Form Data</h1>
'''.encode())
for key, values in request.args.items():
request.write(('<h2>%s</h2>' % key.decode()).encode())
request.write('<ul>'.encode())
for value in values... | 1 |
dba2d38247436285c924e7f8fce3ec49 | 8a8da4722c4c9868a9c26220ba19b569 | 해당 영화 리뷰 조회 | reviews = Review.objects.all().filter(movie_id=movie_pk)
context = {
'reviews': reviews,
'movie_pk': movie_pk,
}
return render(request, 'articles/review_index.html', context) | 1 |
7cd5c353c325af53f937214413173409 | b00fefe57660c855f2cab6175853098b | Determine the set of pages that an array spans. | this.start = index * constants.numerics.pageLen;
this.end = this.start + constants.numerics.pageLen;
} | 0 |
14358d36c52a14c62bc3b05f6fbb27b1 | 9a5bcc3ae1017d0eeb44bdcd278228fc | Calculates apache specific md5 hash | data = data + api_key.strip()
md5 = hashlib.md5()
md5.update(data.encode(encoding='UTF-8'))
return md5.hexdigest() | 0 |
942d49752a89496af545b3e13651b2f1 | ce29073bb47cf4e42c8df1f4ae318d35 | Устанавливает изображение нормального состояния кнопки | interface IUltraIndicatorBuilder
fun setNormalIcon(bitmap: Bitmap): IUltraIndicatorBuilder | 1 |
90c56d7e9feadbd9059e5f8b1a870b1e | 0dc93cc27924cecf79c236d8c5dace6b | Format wraps global Gytes's Format function. | func Fmt() error {
return sh.RunV("go", "fmt", "./...")
} | 0 |
65e7b43497e3fd8d7f0aa47e2095bb25 | 14f5c36a839df56194b39dc00acb3259 | 判断一个字符串是否为有效的java语言表达的数字.
<p>
有效的数字包含16进制表示的经<code>0x</code>开头的或者指定某种类型的例如(123L).
<p>
<code>Null</code> and 空字符串会返回<code>false</code>. | if (StringUtil.isBlank(str)) {
return false;
}
char[] chars = str.toCharArray();
int sz = chars.length;
boolean hasExp = false;
boolean hasDecPoint = false;
boolean allowSigns = false;
boolean foundDigit = false;
int start = (chars[0] =... | 1 |
6c5bd44eb659b52f0b7909bfaa6a4647 | 0109753c968b6008ce0b004d44a0f373 | 合同回款计划列表 | *getRepayPlanList({ payload }, { call, put }) {
const { data } = yield call(repayacctService.getRepayPlanList, payload);
if (data) {
yield put({ type: 'save', payload: { list: data.repayPlanList, total: data.page.totalCnt, pageNo: data.page.pageNo,validPlanFlag:data.validPlanFlag... | 1 |
36be4fa5538d7aea939bb5c7180b5f04 | ba79541941b06b3e30dcbd83fb99e1ad | Perform the Lucas probable prime test | for known_prime in [
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47
]:
if candidate == known_prime:
return True
elif candidate % known_prime == 0:
return False
if not miller_rabin_base_2(candidate):
return False
if int(candidate**0.5 + ... | 1 |
56ff0a09129cf712a137a306c934ef22 | 006671402bf2da18c42d366b31705043 | Deep-copy the object pointed to by src into dst. It turns out we can't reuse
readStructPointer(), etc. because they do type checking whereas here we want to accept any
valid pointer. | func DeepCopy(dst, src interface{}) error {
var buf bytes.Buffer
if err := gob.NewEncoder(&buf).Encode(src); err != nil {
return err
}
return gob.NewDecoder(bytes.NewBuffer(buf.Bytes())).Decode(dst)
} | 1 |
0b041391eed860f1692b12a2021f6ffa | 4dfde20d05ab3a1a872c2bf8c3c9bb4e | impossible to implement against a Cursor. The child
list would have to be backed by the same Cursor, but
it would have no way of knowing when underlying data
had changed through some other process. | class LMDBNoLockDatabase(database.Database):
def cursor(self, index=None):
raise NotImplementedError() | 1 |
5dc1f8689334f36efbcebb31e51a32e4 | e62614138eca72bf15ec2582b2940c06 | 模拟扫描完成更新行状态(颜色等) | class OutItemInfo(object):
def onRowScanning(self, datas, key, value, row, dsrc):
return None | 0 |
ae04a54d96ac59343979f43c92b5e0b0 | d79779bd4c63250a499e9061c3c2e26c | This function implements the BubbleSort algorithm. | void *bubbleSort(void *ptr) {
struct Params *p;
p = (struct Params *) ptr;
int *a = p->first;
int size = p->size;
int i, j;
int x;
for (i = 0; i < size; i++) {
for (j = size - 1; j > i; j--) {
if (*(a + j - 1) > *(a + j)) {
x = *(a + j - 1);
*(a + j - 1) = *(a + j);
*(a + j) = x;
}
}
}
re... | 1 |
767a0f92af6e46e8a799970736bf6a91 | 4054fd4c2126efa99ace2c804ea601fc | Handle a change in the node or relationship domain selections, including regenerating the plot | const topologyOptions = state.get('topologyOptions');
const topologyIds = state.get('topologyUrlsById').keySeq();
getNodesForTopologies(state, dispatch, topologyIds, topologyOptions);
} | 0 |
4465b75c97533ecb91efc2a8a93dccf2 | 80f8110e7f225f056d05e5ce33f33889 | Creates an user report | const url = `/report/users/${userId}`
return api.post(url, { reason }, { validateStatus: s => s === 201 })
} | 1 |
0ef16f5efb2639aef988456ffc30366e | ef36ab6312a2b6fdb2b858972840bd3e | 将多个客户移到公客池 | class Customer extends Base
public function toReceive(){
$ids = input('id/a');
if(empty($ids)){
$this->error('请至少选中一条信息');
}
$result = CustomerModel::where('id','in', $ids)->update(['is_public'=> 0, 'userid'=> $this->user['id']]);
if($result > 0){
$str = i... | 0 |
f9571198c177c8b917ef66fc5cdc3f08 | cce961f1c60c89b64b7c10c37ba7ccaf | 不借助乘法运算符实现2*16 | public class Test_1
public static void main(String[] args) {
int i = 16;
System.out.println(i << 1);
} | 1 |
98171f888376ca05c385423928e17da4 | 8f1b9c40120e31f5fd02fa949719d488 | Get assessment questions | class tx_wecassessment_result extends tx_wecassessment_modelbase
function getQuestions($grouping='', $sorting='sorting', $randomize=0) {
if(!$this->_questions) {
$this->_questions = tx_wecassessment_question::findAll($this->getPID(), '', $grouping, $sorting, $randomize);
}
return $this->_questions;
} | 1 |
c981821d2d8751889226e89e02f20319 | 9a1bc53f1d6a6d744a468ce3549faa19 | Factory method that returns a unmodifiable attribute map with a single entry. | public final class TroveUtils
public static TDoubleLongMap singletonMap(double key, long value) {
TDoubleLongMap result = new TDoubleLongHashMap();
result.put(key, value);
return result;
} | 0 |
e319ee10d2b6524b808ea94ea8cb44e2 | 60191696650ea9398e52a53cc964a048 | 删除队列最后一个元素 | public class MyCircularDeque
public boolean deleteLast() {
if(isEmpty()) return false;
tail = (tail - 1 + queue.length) % queue.length;
--size;
return true;
} | 1 |
4b554e688b275c5217a6fdb784ec9b28 | c795929c458d4dc35e44bdd5e7c846bd | 变更实例规格
变更数据库实例的规格。
Please refer to HUAWEI cloud API Explorer for details. | const options = ParamCreater().updateInstance(updateInstanceRequest);
options['responseHeaders'] = [''];
return this.hcClient.sendRequest(options);
} | 1 |
8179f1c9274084adc96745714671395c | 3f77b4d388cfe3964c5418b418b31494 | Forwards the contact.html page for the website. | class ContactHandler(BaseHandler):
def get(self):
self.render('contact.html', page="Contact") | 1 |
2c0b91b8baf0b3a2efc61e45baf8a170 | 178435b795f1cbeeb8a25af8edd0c134 | Get the speed dial 100 settings for a user.
The response is either a UserSpeedDial100GetListResponse17sp1 or an ErrorResponse. | namespace BroadWorksConnector
public static class OCISchemaServiceTrunkGroupExtensions
public static async Task<SystemTrunkGroupUserCreationTaskGetListResponse14sp4> SystemTrunkGroupUserCreationTaskGetListRequest14sp4Async(this OcipClient client, SystemTrunkGroupUserCreationTaskGetListRequest14sp4 request, Cancella... | 0 |
2bca0ea6b331cd7fb709e33ac08bb6b0 | d8399a5e47bd27df4a9c861e01f72ffb | Get new filter block | final class Client extends Base
public function ethNewBlockFilter(): Promise
{
return $this->callEndpoint('eth_newBlockFilter', 73, \int::class);
} | 1 |
96d5d296626bb98d006ab8c4498def2f | 5a093651b2f0fef5ee7022a1f9da7bf4 | Returns a temporary hero with same stats as chosen hero for equip menu | local hero = clone(self.heroes[hid])
local conf = Config.getHeroConfig(hero.heroId)
hero.name = conf.name
hero.rank = conf.rank
hero.desp = conf.desp
hero.expMax = Config.levelExp[tostring(hero.level)].value2 * conf.exp
hero.price = self:getHeroPrice(hero.id)
return hero
end | 1 |
be73608affa5bce95c7f712113916423 | 591a0ee24d8585393b23a8f1df33ef0e | Yield sentences from raw ontonotes stream | sentences = stream.read().split(sep = '.')
sentences = filter(None, map(lambda s: s.replace("\n", " ").strip(), sentences))
for s in sentences:
yield "%s." % s | 1 |
a3cd22c6408aa2cdf5650da453655eba | 253062d7193541414c035a1cc7ce442f | Returns the number at the given position (0 being the rightmost) | class SubtractCalculationPresenter
public getDigitAtPosition(num: number, position: number): number
{
let str = num.toString();
return position >= str.length ? 0 : parseInt(str[str.length - position - 1], 10);
} | 1 |
0a28ddc41f96bd4dfa65d3c004798e73 | 111b4b848696c4810974dae12e58360d | Очистить поле поиска по классификатору | public class BasicElements
public void findByClassClear(String className) {
WebElement element = null;
waitForElement(By.className(className));
if (this.isElementExist(By.className(className))) {
element = driver.findElement(By.className(className));
element.clear();
}
} | 1 |
6f8bf8c8033314b4d1b1495d23e83197 | ce75714e10bbc3c6534c8c6ab868153b | Sets the ID of the first post of the topic | public void setFirstPostId(int topicId, int postId) ; | 1 |
2be3504942515c6114d6d03e560e5fe9 | 9064dba95cd47f5a2c22b9de3d039a50 | projects the columns of the oldRelation that are found inthe prms2prjt. Matches their order as well. | class Proj(Rel):
def __init__(self, attributes, rel):
super().__init__(rel)
self.rel = rel
if not isinstance(attributes, list):
raise ValueError(errorMessage(attributes, "attributes", "list"))
for attribute in attributes:
if not self.rel.table.isAttribute(attribut... | 1 |
bb926e65c6b33b05c6e4a4f06dfa2c3e | 67d648795e0988b189956a13350582c5 | Mark time entry as unfrozen | public function unfreezeTime(); | 1 |
57a5566f462369a3c3f3f50cfcca03f4 | 0c1bd8c6dfb7bf3861fdf3e4f29124c8 | 插入用户名和密码
(非 Javadoc) | public class DatabaseHelper extends SQLiteOpenHelper
public void InsertIDandPassword (String id , String password) {
ContentValues values = new ContentValues() ;
values.put(COL_2 , id) ;
values.put(COL_3 , password) ;
SQLiteDatabase database = getWritableDatabase() ;
database.ins... | 1 |
e44b7a6bf2db1a01a9f63525471130f4 | 0bca5bbc36923f6ca0211785905f580a | Sets the value of the 'dtmOfflineFrom' field. | public class RoInstanceInfo extends AbstractModel{
public void setOfflineTime(String OfflineTime) {
this.OfflineTime = OfflineTime;
} | 0 |
ac060cda1394f4f9899b01312c866dff | 86c4512b9aabeaf1607af2c4e1a25b85 | Loads the file specified and returns a pandas dataframe | class readFileClass():
def readFile(self):
df_in = pd.read_csv(self.filepath + self.filename)
return df_in | 1 |
52c0c75663b3bd56dbfdee14f8cf394a | 61f6123442295873b23057d4acf51cb3 | создает путь к копии файла, основываясь на изначальном пути файла(в одном каталоге) | namespace Task1
void Copy(string name, string pathTo); | 0 |
0ec4c4345ef665108ef998cbe4cb4c79 | d1962e4d9546e6c68e0a8b32249d9b42 | シーンをロードする(パラメータ付き) | public class PiarhythmUtility
public static void LoadScene(PiarhythmDatas.ScenenID scenenID)
{
SceneManager.LoadScene((int)scenenID);
} | 1 |
80b74910c1503d157127243479869631 | 032813400d98c65e5cabf2a12036449e | funcao de visao computacional simples para detecção de objetos cor verde, também pode-se alterar para a necessidade em especifico | class projeto:
def filtra_laranja(self, img_in):
global creeperLaranja
global centro_laranja
global viuCreeper
global maior_area_laranja
self.img = img_in.copy()
hsv = cv2.cvtColor(self.img, cv2.COLOR_BGR2HSV)
hvs1 = np.array([0, 50, 150],dtype=np.uint8)
h... | 0 |
775342701155567dc4d436e4ef4b8319 | c233c3642a5b9954e6c56e51c31fc762 | Converts all strings occurences in list or dict into unicode. | def unicodize_deep(x, enc=DEFAULT_ENCODING, relaxed=True):
return _convert_deep(x, enc, to_unicode, relaxed) | 1 |
ce810d158546041f517f59510c661cb2 | 8ed9fc0a6394db532dc09338a869df44 | synchronously update the displays and clients with the new client generation | class Client
updateDisplay() {
} | 0 |
15a6aa6de16fc60e7dccc1523ba60700 | b202c865604a94a25b2abd53a9efb6cb | 上传本地文件到文件服务器 | try:
self.fs.copy_to_local(src, dst)
except Exception as ex:
return False, ex.message
else:
return True, u"文件上传成功" | 0 |
f6916fe03b73de22a9ad5347819209a0 | 68b828e6e748777a4204cab45897241e | Get the location of the jQuery library | var path;
if (document.currentScript) {
path = document.currentScript.src.slice(0, -10);
} else {
var sel = document.querySelector('script[src$="toolbar.js"]');
if (sel) {
path = sel.src.slice(0, -10);
}
}
return path;
} | 0 |
1f1d950aad8a5f90135f93c006af6a0b | f41cdf12dc8a858c1a49343dd671b000 | Returns deal end time. | class GetFreeBusy extends Base
public function getEndTime()
{
return $this->getProperty('e');
} | 1 |
37cd0fd4f84bb8c586b2b3fc90913fa9 | 1cc7577185f5d30d0eb5f9afeb4b9883 | 保存默认地址事件 | $('.mrdzS').each(function (i) {
$(this).click(function () {
$('.mrdzS img').attr('src', '/images/front/choice-no.png')
$('.mrdzS').eq(i).children('img').attr('src', '/images/front/choice-on.png')
})
});
var userId = $("#userId").val();
var param = {id:add... | 1 |
a159aec2629eb460c368c447238d3756 | 4589d5e5641c566d259b0d6321532933 | Reset status attributes to default values. | class CrawlerStatus(object):
def reset(self, visited_urls, urls_to_crawl, urls_in_progress):
self.visited_urls = visited_urls
self.urls_to_crawl = urls_to_crawl
self.urls_in_progress = urls_in_progress | 0 |
24eb81c9fa40bd7776fbac974e8167e8 | 0888836bfb485c01348d938237e0b517 | Returns OptionalValue with its `value` set to the provided value. | func WithValue(value interface{}) Option {
return func(options Options) {
options[ValueKey] = value
}
} | 0 |
231222baa93c32588bf904276c9b9de5 | a390c2fc8e67245008ca4c33a74fc2ec | Fetches all the Policy Documents. | namespace Zuehlke.Hades.Interfaces
Task<List<Policy>> GetAllPoliciesAsync(); | 1 |
4c62dc64bf6b27b9d38ec3632d36d336 | c3d27c9aade9aa62cc2274a185f23650 | Clear filter value for given column. | class ListView(object):
def clear_col(self, col_num):
if col_num in range(1, self.cols_count + 1):
col_str = '#%d' % (col_num + 1)
items = self.tree.get_children()
for item in items:
self.tree.set(item, column=col_str, value='') | 1 |
c729f72547786653603b9988e9a7cb29 | feb1acefe329843758e46c69596b8be5 | 現在のレベルから次のレベルまでの経験値達成率 | public class LevelUtil
public static float calcNextExpDiffer (int exp,int max) {
if (exp >= 0 && exp < 50) {
return (float)exp/50 * max;
} else if (exp >= 50 && exp < 100) {
return (float)(exp - 50)/50 * max;
} else if (exp >= 100 && exp < 200) {
return (float... | 1 |
962f83c4445c99e86680fe35e5f21553 | 9b4622563d0d1f3697cd434ab1822779 | Sets the acct code. | public class BusinessTypeDto extends DTO
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
} | 1 |
4b598bc884154cc25ee6435f9e184493 | dc99b7622aabe1cfe8a55f18dce35a94 | Test POST with body | $uri = 'http://localhost/uw%20simulation/uw-simulation/api/app.php';
$client = new GuzzleHttp\Client();
$reqBody = array( "email" => "sovam.dev@gmail.com", "name" => "Second test application", "size" => "50mb", "version" => "2.1.2", "compatibility" => "Android 10+", "downloads" => "4000000... | 1 |
c6571f33bd43c6ad5dcdd971c18940bf | a7b715d74c189fbd696056ecdb31e801 | Description:
The given invalid last name returns false in this test case. | class TestUserValidation(unittest.TestCase):
def test_givenValidLastName_shouldReturnTrue(self):
self.assertTrue(Validation.validateLastName("Dinitha"))
self.assertTrue(Validation.validateLastName("Din")) | 0 |
49cbbd750c45f2b1ab1631ddd21767c6 | 6093f353191dc119373842a831e2fc65 | 移动摄像机,使得目标点位于摄像机视野范围内 | {
_targetPosition = _defaultPosition;
Vector3 direction = cameraTransform.position - cameraPivotTransform.position;
direction.Normalize();
if (Physics.SphereCast(cameraPivotTransform.position, cameraSphereRadius, direction, out var hit, Mathf.Abs(_targetPosition),... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.