query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f2793c72cfaadbf6f6e94a8db32002e2 | d882d4c52a1f9f1b3a07cd4e39e6029c | Sorts entries by score from smallest to largest | self.current_scores = self.main.read_high_scores(HIGH_SCORE_FILES[self.current_score_page])
self.current_scores.sort()
self.current_scores.reverse()
for i in range(len(self.current_scores) - 1):
if (self.current_scores[i][ENTRY_SCORE] == self.current_scores[i + 1][ENTRY_SCORE... | 0 |
88e6b55f909d9bb5a752c2f7b6f0c05e | aad5e630a70db9dbc1e35f8e5590f8a7 | | Reference: http://www.un4seen.com/doc/bass/BASS_Update.html
|
| Updates the playback buffers.
| Returns True or raises an exception | namespace Silk.NET.OpenAL.Extensions.Soft
[NativeSymbol("ProcessUpdatesSOFT")]
void ProcessUpdates(); | 0 |
9d7f8e0da90e3733e0d0166847f2d8d6 | cddd24febef8757f3ca3ca35ae5e9fa6 | Determines card type based of starting numbers | return [1, 3].includes(cardNumber)
? colorCodes[0]
: [2, 4, 8].includes(cardNumber)
? colorCodes[3]
: [5, 6].includes(cardNumber)
? colorCodes[2]
: colorCodes[1];
} | 1 |
db2c93c7645789d4520c3f627260323c | 3c933078b22ac77e63e1feb9ed54e62d | 获取试题的答题结果。 | @IocBean
public class ForcedQuizService
public List<NormResultBean> getAnswerResult(long userId, long quizId){
List<NormResultBean> result = new ArrayList<>();
List<QuizResult> list = quizResultService.getQuizResult(userId, quizId);
if(list == null || list.size() < 1) return result;
QuizResult _quizResult = li... | 1 |
8b880e10ecf88edba4a38c9db2c0678c | d049e887e8b45132511fc1faf9ea46d7 | Gets a highschool at random. | function getCurrentSchool(): School {
if (Math.random() < 0.5) {
throw new Error("The school isn't in this context.");
}
return {
id: "704728e7-d3fb-4628-992e-3b92ab3b62cf",
language: "en-US",
};
} | 0 |
2ec713586d94915a8d813fada1f17e6a | 2787d297022a1c00f1863c761b333e1d | Convert a Point3D from world space into a Point2D in plane space.
Note: make no guarantees that this is a good idea. In particular,
be careful not to call this with things that should not be projected
on to the plane. | namespace com.spacepuppy.Geom
[System.Serializable()]
public class XYPlanarSurface : IPlanarSurface
public Vector2 ProjectPosition2D(Vector3 v)
{
return new Vector2(v.x, v.y);
} | 1 |
b7f3d252e9862ac50bf99d0e0643fa14 | 07605424c876a467a4243a4c4b7a2747 | 某一个UserInfo在相关项目中重复的次数 | public long getcount( UserInfo info ); | 1 |
96771beb39e8a4d0536b89c06d019c30 | 123747754b4526192c9e84bf320974ef | @brief SPI Nand block erase. | {
QSPI_CommandTypeDef s_command;
s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE;
s_command.AddressMode = QSPI_ADDRESS_1_LINE;
s_command.AddressSize = QSPI_ADDRESS_24_BITS;
s_command.Address = BlockAddress;
s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;
s_command... | 1 |
a1ab2035955834931d55e5e7ef1911b8 | 9e9fa01ae8813cbe4348638f8ccf83e9 | 获取从根节点到node的路径 | if node.parent == None:
return [node.state]
path = self.get_path(node.parent)
path += [node.state]
return path | 1 |
d38417a5cc5c0e5f5d3acb2ba71d6221 | 1179e836197d92ce62dbd235a3055051 | se não existir, redireciona o usuário pra página de login | def permissao(request):
if get_session(request.user) == None:
return render(request, 'auth/permissao.html')
return HttpResponseRedirect(reverse('photos:index')) | 0 |
13a021bb2887015807c7bcd006b143fd | 4fa1423c6a60559cc0afbcab279a5077 | prints the subscribed courses of the given student | public void printAllCoursesOfAStudent( String studentId ) throws UniversityDatabaseException; | 1 |
ef45f73a73e77d9acd8f65ce3a63aabd | 413d89d55f51bdd60041f5ab56f7ab83 | 创建超级关注订阅 | class UserFollowService
public function createUserFollow($userId)
{
$selfUserId = \Auth::user()->user_id;
$userInfo = UserInfoModel::whereUserId($userId)->first();
$selfUserInfo = UserInfoModel::whereUserId($selfUserId)->first();
\DB::beginTransaction();
try {
$us... | 0 |
2dadbe60a889738c1835b69a430ba20e | 7d9b38f112d7c12b9e431f0e0698331f | Provides details about multiple Amazon API Gateway Version 2 APIs.
## Example Usage
```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.apigatewayv2.getApis({
});
``` | function getApisOutput(args?: GetApisOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetApisResult> {
return pulumi.output(args).apply((a: any) => getApis(a, opts))
} | 1 |
62eff329392d17a13ca85a1084a7b155 | 72be6507faca6a01c0b44c0137475fec | 重置背景同时释放bitmap | public class ClearImageUtils
public static void recycleBackground(View view) {
if (view != null) {
view.setBackground(null);
BitmapDrawable drawable = (BitmapDrawable) view.getBackground();
recycleImageDrawable(drawable);
}
} | 1 |
c47d560622d64e0171e413a4e5dce8ef | cabae31c2cdd885d359e0d9f3f124baa | Iterate over the open list to find the open state with the smallest
k value. | def min_stack(open_list):
current_node = open_list[0]
current_index = 0
for index, item in enumerate(open_list):
if item.f < current_node.f:
current_node = item
current_index = index
return current_node, current_index, open_list | 1 |
2bcbdeda7ccc2c3cbdce113087795426 | 82111ebfdc3425578cf4a8272cd3c690 | Configure the dataset for performance | gpu_options = tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.70)
config = tf.compat.v1.ConfigProto(gpu_options=gpu_options)
config.gpu_options.allow_growth = True
K.set_session(tf.compat.v1.Session(config=config)) | 0 |
71313d6e6360fa3dde95a94134f5fd0c | 019ce7d0613eefbb6641d6ceb4edd842 | START PART 2 -------------------- | def part2(r,c,am,dm):
######################### PART 2, QUESTION 1.2 ############################
############## SUB PART 1.2 Search Algorithms ###########################
######### (1.2 START)<RUN PROGRAM FROM HERE> ###################
class BattleGroundProblem(Problem):
def result(self, state, action... | 1 |
e7d29ab965f50d387158104e3f0efc6e | 0c1a523e640b83105742c371cd8d20b9 | removes the current selection on this panel (if any) | public class DTablePanel extends JPanel implements Observer
public void clearSelection() {
table.clearSelection();
} | 1 |
a209aa9f362586c3d5ed5a968c70aa2b | 756da3bccb88e5fb02b04d9051adf550 | Adjusts the unit's attack delay to the current attack delay multiplied by the provided
multiplier. | public class Unit implements ITurnBased, IMapItem, IPlayerItem
public void boostAttackBy(int amount)
{
assert amount >= 0;
_attack += amount;
} | 0 |
1f44cd7bfc5af8815e1c6fd7afe54bb6 | ec546dfce635f2dcb2e9c26ef2a5a464 | 根据对象返回一个类名(不包含命名空间) | public class StringUtil
public static String getObjectClassName(Object o) {
return o.getClass().getName().trim();
} | 0 |
38760e116e97a2f0038ac01dbba6dfb4 | 5752508789cd5dc9b3010f581b9581b3 | Since we don't care to verify certs, disable warnings accordingly. | class Cortex(AppBase):
def __init__(self, redis, logger, console_logger=None):
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
super().__init__(redis, logger, console_logger) | 1 |
cdccbf83eb8c2fc404d37cc3b91c19b6 | e3c39ce22df3196251ff0d06f73af6d7 | 绘制透明按扭的背景色 | public class TransparentToolBarView extends RelativeLayout
private void init() {
setBackgroundColor(Color.parseColor(TRANS_COLOR));
} | 0 |
337f680d64bea5d24aec0c45f38d40fe | 8ebb9357eeebab4c540daa270b37c54b | Create dictionary, that translates currency names
from rus to eng. | class CurrencyConverter:
def __init__(self, url):
self.data = requests.get(url).json()
self.currencies = self.data['rates'] | 0 |
ea17055749a45c02e00498ea29f0e0a6 | 735547762a6dc0b749d886b6453bfcb0 | 插入的数据列数超过了文件可容纳的列容量,需要对数据文件重新设置,然后将数据插入到文件中,
保持数据顺序等属性与原数据库中的数据一致 | try {
writer.commit();
writer.forceMerge(3);
} catch (CorruptIndexException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} | 0 |
a9a6a0f73078aeb5d05b3643996648d9 | d56fecdf5dc1068fb3b7981f713959cb | 推送给组用户消息 | {
if (intval(push_award_im)) {
log_file("push_award_im_start", "award_push_award_im");
}
$video_id = $data['video_id'];
$user_id = $data['user_id'];
$nick_name = $data['nick_name'];
$icon = $data['icon'];
$desc = $data['desc'];
$desc2 = $data['desc2'];
$prop_name = $data['pro... | 1 |
eb4b43855502133abc893e73ea3fa21c | f0e145e06e3e26cc4acaf7e8518d4b13 | The Azure Stack Edge devices where the packet core is deployed. If the packet core is deployed across multiple devices, all devices will appear in this list. | class ConditionalAccessPolicyConditionsArgs:
def devices(self) -> Optional[pulumi.Input['ConditionalAccessPolicyConditionsDevicesArgs']]:
return pulumi.get(self, "devices") | 0 |
d846870d016a2d2051f8a9e7b1fbc83a | 0b2a0a59aa9eb62200b53f6588f3c70a | Sets up additional arrays to mirror projectile array | PROJECTILE* setupProj(PLAYER* player) {
player->myProjectile->x = (player->direction>0)?player->x+characters[player->characterIndex].w:player->x-8;
player->myProjectile->y = player->y+4;
player->myProjectile->dir = player->direction;
player->myProjectile->e = 0;
player->myProjectile->exploding = FALSE;
player->m... | 0 |
b111304e3888d31cd5232428f80fecf7 | a800bf4e66b42ed22e825dfda57bf81e | Devuelve la lista de efectividades del tipo contra el resto | $sql = "SELECT EFE_IdEfectividad, EFE_CustomerKey, EFE_Nombre, EFE_UserKey, EFE_TipoRiesgoKey, DateStamp
FROM ". $this->db_table ." ORDER BY EFE_Nombre ";
$stmt = $this->conn->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));
$stmt->execute();
return $stmt;
} | 0 |
bbfb8968529e6c8f490a9a5179ed676c | e9c5f4f643f54439898434602902b8a7 | Fetch unique tasks required for this feed | class CGExec
private function getFeeds($conn,$interval,$num_feeds=10) {
$feeds = new SQLExecutor($conn);
$results = $feeds->sql("SELECT fid FROM feed WHERE status = 'active'" .
" AND fetch_date < DATE_SUB(NOW(), INTERVAL " . $interval . ")" .
" ORDER BY fetch... | 0 |
de76f96259cea0e361176f24e2f5f1de | b67d98d98c789b345e7a2929df011135 | Get the last N number of previous fights. | {
$id = JFactory::getApplication()->input->getInt('id', null);
$db = $this::getDbo();
$db->getQuery(true);
$query = "
SELECT `fighter_id_1`,
`inf_hits_1`,
`warnings_1`,
`rating_1`,
`rating_change_1`,
`fighter_id_2`,
`inf_hits_2`,
`warnings_2`,
`rating_2`,
`rating_change_2... | 0 |
f1648d8b90913b3d78ed3c1129c68a1b | 632c7328e3f1c7d099e03df59540345f | Show the full registry path in the status bar, for lack of anything better to do with it. | namespace ZoxterGameInstaller
public partial class MainWindow : Form
void DisplayInstallPath() { lbl_installPath.Text = "Install path: " + GetRootPath(); } | 0 |
d47ddf5e1b21d223339904cfe945aa22 | 15bacae3ff01f09bfc50e41efbef6871 | Get maximum length of value_type value.
maximum number of characters for a string | class ValueNodeProtocol(Protocol):
def get_value_string_len(self) -> int: | 0 |
ab1c6bac7d633af3465071137abee363 | d4de1c4281a925f523440058c6721852 | 获取IDA*算法的搜索器 | def IDS(init_state):
depth = 0
while(True):
node , met = DFS(init_state , depth)
if node is not None :
print("goal found with cost : " , node.cost)
return node , len(met)
print(f"search with depth {depth} unsuccessfull")
depth += 1 | 0 |
4d3aafdcf003619c8e2dfccc5f65d25a | d6f1ed38c082bdce81c9511f5f9b99a6 | Sets the reason ID of this app reason. | public long getReason_id(); | 0 |
d3ff07514136dd9b491e18476848f60b | 92ce09658c8db945dc97a8ce583eb4bb | returns versioncatalogId. | default long getVersionId() {
return 0;
} | 0 |
9561b42334d883b5c275927585c41d06 | 22aa40fda7ee51a3c9d1f9811db1e64e | Retorna la lista de oposiciones hechas por Cliente | class Cliente extends \yii\db\ActiveRecord
public function getTakeaways()
{
return $this->hasMany(Takeaway::className(), ['id_cliente' => 'id_cliente']);
} | 0 |
84872759addb933292d3bd32997a692d | 90cd78078e25b3287cd3b1d61b11ce83 | 丢压缩包,需要考虑关键帧不能丢 | long startTimeUs, long endTimeUs) {
long presentationTimeUs = 0L;
long audioPts = 0L;
audioExtractor.seekTo(firstSampleTime + startTimeUs, SEEK_TO_PREVIOUS_SYNC);
mReadBuf.rewind();
boolean isRunning = true;
while (isRunning && !beSto... | 0 |
ba4b3173372c37a62072d01619bbcd4d | 088709271597245c947757f04653cd25 | Generates an in-line VIV response model. This returns an interpolation
function to provide the stress amplitude given a reduced velocity. This
function should be re-used for each calculation on a given span without
having to create a new response model each time. | def V_sq(xi_n):
if xi_n >= 0:
V = 1. + (xi_n)**2
return V
a = (1.-xi_n)**2
b = (1-2*xi_n)*(6*((xi_n)**2)-xi_n+1)
c = (1.-3*xi_n)*(1-4*xi_n)
V = a*b/c
return V
def V_bar_sq(xi_n):
if xi_n >= 0:
V = 0.25*(1+(xi_n)**2)
... | 0 |
a3a2c40240aed18b88a2b97f040f7b6f | 368436ffdcb9fddfe2704528e8d07159 | 长度等于指定值 | public class LCQuery<T extends LCObject> implements Cloneable
public LCQuery<T> whereSizeEqual(String key, int size) {
conditions.whereSizeEqual(key, size);
return this;
} | 1 |
a89d9f3e56acf32cf430e9724eb73c3f | 80fd31503a4321c6c3ff545c4bc7d82b | 测试DateTime转长时间戳 | public void UnixTimeTest()
{
long timeStamp = 1358061152;
var result = EntityHelper.BaseTime.AddTicks((timeStamp + 8 * 60 * 60) * 10000000);
var expect = new DateTime(2013, 1, 13, 15, 12, 32);
Assert.AreEqual(expect, result);
} | 0 |
775aca6ea5b7f4253c00a759b9ecf3d6 | 508a4190fd4ac6b7d33efeee27b4edb0 | 通过用户问题ID获取问题答案 | namespace Spacebuilder.Ask
AskAnswer GetUserAnswerByQuestionId(long userId, long questionId); | 1 |
09fbe7c167c101e97d1fbef3f35aed4b | d12910406dabb1fd6ede5e8e18ce9235 | 重置所有指针 | void Clock::resetClockPointer()
{
this->oneSP.setAngle(0);
this->oneMP.setAngle(0);
this->oneHP.setAngle(0);
} | 1 |
bdb7a4746feb8f5217b47f09658127c0 | e82e24b99bf9c91274e16773d8eda135 | Test case for v1_computer_prestages_id_delete
Delete a Computer Prestage with the supplied id # noqa: E501 | class TestComputerPrestagesApi(unittest.TestCase):
def test_v2_computer_prestages_id_scope_delete_multiple_post(self):
pass | 0 |
a26565d466d0daa7c39c0308d9b976a1 | 2668b0e7cf47c55cd4dd37afe9b21eee | クォータニオンの値を更新する | {
this.W = q.W;
this.X = q.X;
this.Y = q.Y;
this.Z = q.Z;
} | 1 |
bd3b37c055bf5f8742d518f09c23fa2b | 9ec5c15eb8bfe3110ad60d0a746bfdca | Metodo para definir o número de faixas | class CD : public ProdutoLoja{
CD(string nome, float preco, int num_faixas) : ProdutoLoja(nome, preco){
this->num_faixas = num_faixas;
} | 1 |
533b293cd25bfaebb6301d651f1b8f6d | 01d0f26a5fd3b9eea5617a22f0d5aa1c | This method searches for the destination node referenced in the packet's dst. If the destination node is not
among the neighbours, it returns a random link for the node to forward the packet to | int link = -1;
if (dtg.src == nodeinfo.address) {
link = get_next_link_for_dest(dtg.dest);
if (link != -1) {
dtg.req_id = get_request_id_for_dest(dtg.dest);
} else {
link = find_reverse_route_no_id(dtg.dest,dtg.src);
dtg.req_id = get_request_id_reverse... | 0 |
a513dc653ded811964085050bce3fe23 | e6ae293e9cb9e8cbcb2632e7f2deba82 | Hämtar vikt. | int Human::GetWeight() const
{
return weight;
} | 1 |
149be4ab055331b124ba4fb23e2a90d8 | d712ae696fc922dd624d4afb9ea22675 | Common argument defaulting logic for windowed statistics. | domain = 'www.example.com'
now = datetime.datetime.now()
stat = NoiseStatistic(domain, deltas=1, window_start=now)
assert stat.deltas == 1 | 0 |
298d1d701fe912f1a3feac75c6488596 | 2e6270b51e48e807a58d4378a0f74c20 | Method for ending an active workout | public void onStopWorkoutEvent(); | 1 |
a9cbfc677b42913f187d3d4a5472302e | bfa6f4524762076380788de3d82a9cd0 | Get matches function to compare the two arrays of names and find the ones that are in both | {
List<FileName> sames = new List<FileName>();
int count = Math.Min(namesA.Count, namesB.Count);
for (int i = 0; i < count; i++)
{
if(namesB[i].Equals(namesA[i])) sames.Add(namesA[i]);
else break;
}
return sa... | 0 |
3ac02f4cf1205a2ac974b352377b3aec | 6558697df84e2153482e4628c13e9824 | Empty all EAV values, because they might be wrong cached values | {
$this->values[self::id] = null;
$this->values[self::name] = null;
$this->values[self::min_price] = null;
$this->values[self::image] = null;
$this->values[self::spec_id] = null;
$this->values[self::new_price] = null;
} | 1 |
bb8ae2a10bf1af97107da10d7bb989fa | d22b17a05f2a7fa602402565f383e21f | Creates attributes such that each equals its ordinal position in a list. | class Tags(object):
def __init__(self, *nameList):
self._nameList = nameList
for i, name in enumerate(nameList, 1):
setattr(self, name, i) | 1 |
451c345af4c753b32e646a49ed1bd68b | e0604ad5004fa8df3a23592f9dec0a5c | Return number of connected gamepads | {
int total = 0;
for (int i = 0; i < gamepads.Count; ++i)
{
if (gamepads[i].IsConnected)
total++;
}
return total;
} | 1 |
37435457e35ccce4ab13afabbcd11aa2 | ba5306db70c5ae1d85264cbef794e032 | SEを読み込みます。wavファイルのみ対応しています。 | public class SeManager : MonoBehaviour
public void Play (string seName)
{
Play (seName, Volume, 1.0f);
} | 0 |
03548f45e3cb3b26495509c3364e6923 | 6ff0ce178ff187339633a72c44ee7269 | Clear base directory environment variable. | class BaseTestSysCheckout(unittest.TestCase):
def tearDown(self):
del os.environ[MANIC_TEST_BARE_REPO_ROOT]
os.chdir(self._return_dir) | 1 |
e46fe131ad1d1de5b86ed35d234c5755 | 14ed9b6b20a3b9330daf3f92c51e367c | 获取饼图数据列表 | class Legend extends Base
public function getList($title, $filter, $time) {
if(!isset($title['table'])) {
return '';
}
$data = Db($title['table'])->field('create_time')->select();
$seart = $filter['start_time'];
$end = $filter['end_time'];
$xAxis = [];
... | 0 |
bade2ee30fd7f3ed31e9c296d95edcda | d1f0c3932af5cf1fc9c013c3f4c65109 | レビュー平均点の共通関数 | class Review extends Model
public function getReviewsAvg(Item $item){
$avg = $item->reviews()->select(DB::raw("round(avg(score), 1) as item_avg"))->first();
return $avg;
} | 1 |
2414ee448d1ea30dc45c9a65ec37a1a4 | 1c9130cd01a27e036b1098dfb728c48c | 切换招募兵种 | if not _C.IsOpen then
return
end
UIManager.showTip( { content = Localization.RecruitSuccess, result = true })
view.TrainSlider.value = 0
view.TrainSlider.max = militaryData.NewSoldier
view.TrainAmount.text = false
UpdateConditionInfo()
RefreshUI()
view.Train_T:Play()
view... | 0 |
6af5839d787cb716e6ee56770effbcb9 | 8cd1ee78018eb965dc7c7b724aea2bf1 | Visiting operation for negation specifications. | auto negations = ctx->op_not();
if (negations.size() % 2 == 0) {
return std::move(visit(ctx->exp_chain()));
} else {
auto n = std::make_shared<AST::UnaryExprNode>();
n->literalText = ctx->getText();
n->op = AST::UNA_OPERATORS::LNOT;
n->operand = std::move(visit(ctx->e... | 1 |
91ce6532776308ef8c0cd8a6168c7769 | 0dbe0540837a80d55ab11c7bfdc56843 | Test method for {@link edu.ncsu.csc216.wolf_library.lending_system.LibraryLendingSystem#reserveMoveAheadOne(int)}. | public void testCheckValidInput1() {
this.fm1.move(PileType.OPEN, 2, 1, PileType.OPEN, 1);
} | 0 |
6b2fd6be4e7d14856a0269721a340b47 | 83025add8346be159986681a46e5330b | Removes a meme from the database. | {
try
{
$this->repository->deleteMemeReports($meme_id);
Session::flash('alert-success', 'success');
}
catch (Exception $exception)
{
echo 'Error while trying to delete meme reports: ', $exception->getMessage(), "\n";
}
} | 0 |
46a7c2498e300da7c562997a5a7d838e | 37633472f61ffe6689a54bc81e82917b | 图像分析按钮,点击后对当前图像进行分析 | void MainWindow::on_pushButton_4_clicked()
{
if(flag3)
w.show();
else
QMessageBox::information(this,tr("分析过程"),"输入错误",QMessageBox::Yes);
} | 0 |
48359b22f6619191e48c35b9e388541a | 14e65c2f066bea47d6cb3d78bb3b0ff5 | 根据查询条件获取分页后车位信息列表 | @Component
public class MemberParkingLotModel
public List<MemberParkingLot> getMemberParkingList(Map<String, String> queryMap, Integer start,
Integer size) {
return memberParkingLotReadDao.getMemberParkingList(queryMap, start, size);
} | 1 |
16d4a89b854b40ff69ed7f54d603254b | dd0ee916c9a121e637a4c6469230f5ba | 根据项目id与秘钥进行验证秘钥合法性 | String url ="https://api.sciener.cn/v3/key/authorize";
HashMap params = new HashMap();
params.put("clientId", Config.CLIENT_ID);
params.put("accessToken", SharedUtils.getString("access_token"));
params.put("keyId", String.valueOf(keyId));
params.put("lockId", String.value... | 0 |
6981d7b88a91624c5067e00ed07b7e4b | 36ecdfca3f8bd7e8245ab40d8223ce00 | Force all wheel speeds to return to zero | {
int wheelFirstIndex = mNDOF->getDof("JLWheel")->getIndexInSkeleton();
for (std::size_t i = wheelFirstIndex; i < mNDOF->getNumDofs(); ++i)
{
mKp(i, i) = 0.0;
mKd(i, i) = 0.0;
}
int index1 = mNDOF->getDof("JLWheel")->getIndexInSkeleton();
int index2 = mNDOF->getDof("JRWheel")->getI... | 0 |
91cb0ae6de715facf3137505d061df35 | 5335e3cc78465b54435dbc515e37a455 | Checks if someone is borrowing the item | class BookPanel extends JPanel
public boolean isBorrowable() {
return yes.isSelected();
} | 0 |
d28dd30dbe3705e9f2b37af01eb06195 | 78be4af248052580065b57ac61ecd3e9 | Set any camera-relevant render globals that haven't been overridden on the camera | render_params = {}
render_params['voxel_filter_sigma'] = args.voxel_filter_sigma
render_params['num_samples_per_voxel'] = args.num_samples_per_voxel
render_params['voxel_resolution'] = args.voxel_resolution
culling_params = {}
culling_params['block_size'] = args.culling_block_size
culling_params['alpha_th... | 0 |
f3ed140ccc79772527506a5f2c75040e | 8110a68dc74a8dae1f7611de0c44867f | Make a new unique plot filename for a given test | testname = os.path.split(cmd[1])[1]
expname = cmd[0][3:]
if expname in ['mpi', 'mpit']:
mpi_imp = str(os.path.split(cmd[1])[1]).split('-')[2]
return testname + '-' + expname + '-' + mpi_imp + '.openss'
return testname + '-' + expname + '.openss' | 1 |
dfde1285ca5e395401acf4f5def28059 | d25596880e7f5ce8fff236537a36b93b | @brief This function displays a number in binary | {
uint8_t firstdigit = (number / 10) * 4;
uint8_t seconddigit = (number % 10) * 4;
uint8_t bn1[] = {5, 2, 2, 1, 32, 5, 31, 32, 5, 2, 2, 1, 2, 2, 2, 1, 31, 32, 32, 31, 31, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 31, 5, 2, 2, 1, 5, 2, 2, 1};
uint8_t bn2[] = {31, 32, 32, 31, 32, 32, 31, 32, 0, 3, 3, 7, 32, 3, 3, 31, 4, 3, 3... | 0 |
2a37cb2761fec555f6bc615049058683 | 862a3d05a60d366f055ce03a411df995 | Gets the boundary of a polygon as a polyline | var results = [];
var coords = getCoords(poly);
coords.slice(1, coords.length).forEach(function (coord) {
results.push(lineString(coord));
});
return featureCollection(results);
} | 1 |
adba5def19b2083f948aa98d46f457ac | 2ed52057c54ec1a1b5e0e177a231bd2d | Constructs a Patch from a provided unified format diff. | public class PatchUtils
private static String makePatch(final String diffHeader,
final String hunkHeader,
final List<String> hunkLines,
final Range range,
final Range appliedRa... | 1 |
2c87e81ed411fd5b852a1dc86461bacb | 2b6f04f6c02bb1521a0b6fea7476928e | Actualiza el estado de los botones de
reprocción/stop cuando se para el vídeo | function listenerBotrState(obj) {
if (obj.newstate == 'PLAYING') {
tdc.Grd.Video.pauseAll(obj.id);
}
} | 0 |
d87324c046860b664f98ec4427de7fdd | 35f34ee46f36e37dd9a028db37795f63 | Flattens out a row infos tree into an array.
Items that are not expanded do not have their children added.
the keys that should not be added. These keys and any of their children
are not added. | getExpandedKeyPaths(record) {
const rowKey = this.getRowKey(record)
const paths = (this.flattenedPathMap || {})[rowKey]
return isValidArray(paths)
? paths
: genExpandedKeyPaths(record, this.getRowKey, this.childrenColumnName)
} | 0 |
2aa4ef30fc5c6c19f6e9280933883448 | 3b1a267bd895934671a4e56aef9ed312 | 初始化文件,并写入调用 UTF-8 代码页的命令 | {
char *pOldBuffer = m_pBuffer;
std::wstring text = Encoding::UTF8.Transcode(m_pBuffer+3);
if (!CharEndianTranscode(text))
{
return false;
}
size_t nTextSize = text.length() * sizeof(wchar_t);
m_nFileSize = nTextSize + 2;
... | 0 |
dfed0076282542b86e04cd38180cc34f | 95a264659f089581a896a8b4e7a8f1ff | 设置券商类型状态:删除、禁用、启用 | class BrokerController extends BaseController
public function editStatus() {
$brokerBiz = new \Admin\Biz\BrokerBiz();
$this->ajaxReturn($brokerBiz->doEditStatus());
} | 1 |
cf8bf426e8bc76adaff690278742c90f | 178219b0bbbaae27f6f1a82fc9eba65f | Given: Input data is negative.
When : Converts negative value into hex string.
Then : Gets return value correctly. | public void StringToIntTest16()
{
ConvertResult actual = StringHelper.StrToInt("-");
Assert.AreEqual(actual.State, ConvertState.InValid);
Assert.AreEqual(actual.Number, 0);
} | 0 |
18c0ca101be204af87cade8ffb16a285 | 86371c2851de247a40ea8b683b2edf11 | 指定受付番号のレコードを削除する | class AssenScheduleRepository implements AssenScheduleRepositoryInterface
public function deleteFirstRecordByPK($touban)
{
return $this->AssenSchedule
->where('登録番号', $touban)
->delete();
} | 1 |
0e2cb810cc38b6b5ad11f87d645c42fd | 436c4c5da20b73587833c2f55e012a5b | popAdd adds top-of-stack to primary register. | function popAdd() {
emitLn('ADD (SP)+,D0');
} | 1 |
f87ce0d4f3caa884ee832cfd3330445d | 81a58d49c03b9410a855ab480d38be23 | Add a queue instance | function add_queue(\App\System\Vo\AmqpQueueVo $amqpQueueVo): bool
{
return container()
->get(QueueLogServiceInterface::class)
->addQueue($amqpQueueVo);
} | 1 |
6b3872cea9837ad09470fd31b49a5e65 | a805c408fcedfc05ba4c20a6112daf43 | Setter for integrationCollection. | public void setCollection(
@SuppressWarnings("rawtypes") Collection collection) {
this.collection = collection;
} | 0 |
a8a24bb17c4af41b4037da545a829226 | 8f78280f26538a942e51c6148cce3fc6 | Gets the rule ``Id`` query terms. | class CompositionQueryInspector:
def get_asset_id_terms(self):
return | 0 |
7e934e17ef48e2e05ee61fed6ec16393 | d296adbc27595ed4af75770d01221451 | 用户查询(不带分页) | public R querySysUsersNotPage(SysUser sysUser) throws Exception; | 1 |
0b5227954aad423855a050de9af67b51 | 839f745452b468a658f148eb03e79dcd | 宝石消除运算过程 | public class GameController : MonoBehaviour
void JewelProcess(List<JewelObj> list1, List<JewelObj> list2, GameObject obj1, GameObject obj2)
{
int c1 = list1.Count;
int c2 = list2.Count;
if (c1 > 2)
{
ListProcess(list1, obj2, obj1, obj1.GetComponent<JewelObj>().jewel.Jewel... | 1 |
35e532590c73aa1cdd00510c1fb4ae79 | 2805aa806c3ec9f1fd695a8cdfffe573 | Checks if "Include all child packages" check button is checked. | public boolean isAnyCheck() {
return isAnyCheck;
} | 0 |
17190cd701d8f76f3d75eb2a8c3e5ad4 | df73a96c5e476f972f4155d0dacc1241 | キャンセルボタン選択時処理 | public final class RemainTimeSelectDialog extends CustomDialog
void onCancel(); | 1 |
f92dff469369f26384aee802f139d5a5 | 1b860c7f23c60df46725beca0e146210 | The workload classifier start time for classification. | class ExportClusterLogsFiltersParser(ClusterLogsFiltersParser):
def start_time(self):
return self.time_parser.start_time | 0 |
8577ec539097d87484626302b1277cc2 | 7ae97dd09127bfa6795a227d1741f27a | Crée un nouveau projectile dans la stratégie et l'ajoute dans la frame courante. | namespace TP3
public class GW
public void AddProjectile(Projectile e)
{
projectiles.Add(e);
} | 0 |
87cf47b3b4a4defc5082b6eba84158ed | 3511ba9f512fd2b8cff7bf0284f0b7cf | <PRE>
看護師が医師から受け取った診察時間を取得します。
</PRE> | public class ERPatientAgent extends Agent
public double lfGetGeneralWardStayTime()
{
return lfGeneralWardStayTime;
} | 0 |
aacd58d78f0554b2fd5c276d1bf5f184 | e8065425317f8453b58d54fc05500d7c | BPMN specific detach event behavior | function RemoveParticipantBehavior(injector, canvas) {
injector.invoke(CommandInterceptor, this);
this.executed('shape.delete', function(event) {
let context = event.context;
let shape = context.shape;
if (is(shape, 'bpmn:Participant')) {
context.oldDiBand = shape.diBand;
let choreo = canvas... | 1 |
d6f0a56eb745d4a3de0b74666a244e9c | d9680079bca0570460ba786ffe2c6070 | Right after doing something that could have changed page content,
we'll inject some JavaScript to process the new content.
Do this whenever content might have changed. | public abstract class AbstractPage extends Composite
@PostConstruct
private final void _onPostConstruct() {
ArtificerJS.onPageLoad();
} | 1 |
6b177cd44b866c350ec38ac02da5ec8e | bb84f8c86124ad93216735c2fc3e8692 | init with identity | void GLImageInputFilter::initIdentityMatrix() {
setIdentityM(mvpMatrix);
} | 1 |
cc15e5fe99bb1de99a07385365749107 | 5ea3546f0c04ff75c73a776213f36f12 | 使用上传分数功能时需要登录 | received_token = request.cookies.get(TOKEN_NAME);
check_token_validate_result = tryGetUserInfoWithToken(received_token)
if check_token_validate_result['success'] is False:
return redirect(url_for('userLoginPage'))
return render_template('goods_upload.html') | 1 |
d3a41bbb09f5d425bfd7621cffe11911 | fb8dd8b8d21b3c7b8f6f976a568242cd | Marks the document to be automatically saved at the end of the session | public function SetAutoSave($AutoSave); | 1 |
d961055cb4b12ca127fbe289810a1387 | dfd2aaf86188ce8f99912471667547f7 | 获取队列集合中队列的个数 | class RedisQueue extends BaseService implements QueueInterface
public static function countQueues(bool $readCache = true, $redis = null): int {
$arr = self::getQueues($readCache, $redis);
return $arr ? count($arr) : 0;
} | 1 |
3e3be4a44f90a99fe6bfd7c77bbab652 | 6220b9d2b269fcc5601809378615cf30 | to format it as yellow text. | static void
yellowout(char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
color_out(fmt, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY,
ap);
va_end(ap);
} | 0 |
1c35fe5f7a73146044db0e752a6712a3 | c07806f57d763238303cbcd80e3f0f8e | {@see initWidget}后调用,可以调用{@see com.tcxz.frame.base.mvp.helper.EventHelper.click}
等方法为控件设置点击事件,一般推荐使用{@see com.tcxz.frame.base.mvp.helper.EventHelper.click(IPresenter presenter, View ...views)}
方法并且让你的Presenter实现相应接口。 | public abstract class BaseActivity<T extends BaseContract.BasePresenter> extends RxAppCompatActivity
implements BaseContract.BaseView{
protected void initWidget() {} | 1 |
6b08a118775c0432aef28253af6f905e | 2ff8a3b2a9b55b36470d1f4bdbe76338 | Возвращает наиболее подходящий контейнер, который может быть получен из указанного обработчика. | {
foreach ($this->handlers as $handler) {
if ($handler->accept($for)) {
return $handler;
}
}
Logger::get()->logWarning("No handler found for " . get_class($for));
return null;
} | 0 |
1ad5bf338d20891f64e95af4015eb4fe | 44bcfc5e7594d5649278417cbd97bb18 | 메모 상세보기에서 수정할 때 데이터값을 불러옴 | function updateData(divDetail) {
const title = divDetail.find('#detail-title').val();
const contents = divDetail.find('#detail-contents').val().replace(/(?:\r\n|\r|\n)/g, '<br />');
const memoId = Number(divDetail.find('#etc_id').text());
const tagCd = Number(divDetail.find('#etc_tag').text());
$.aj... | 0 |
0b7c32f763180f0889e2585b316a78b8 | 8e15df6c46b969cb5e6ad2b17e5840d8 | Get engines by type. | function getEngines() {
return async (dispatch, getState, api) => {
dispatch({
type: GET_ENGINES_REQUEST
});
api.getEngines()
.then(response => {
dispatch({
type: GET_ENGINES_SUCCESS,
payload: response.data
... | 0 |
0098b547cb6a513724729567ba6cade1 | 12d09fe6cdda33e16597a9f23b3e0e84 | Called when the user ends pulling | public class Pull : AbilityTemplate
public override void EndCall()
{
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.