query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
9376ee6a174aeab559dd47c28578f3c6 | 817fcfe77cd06780b7bb804b6825d450 | Unload audio samples from memory | namespace lunge.Library.Audio.Studio
public class EventDescription
public void UnloadSampleData() =>
Native.unloadSampleData(); | 1 |
8f9d35814167f0dd751864216026ed7c | 111237db07da4d9d1ef4d58c0bd193d5 | Extract and track features for a new incomming frame
frame : the new frame
Returns the number of features tracked | {
vector<uchar> status;
vector<float> err;
vector<float> err1;
TermCriteria termcrit(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS, 20, tracking_quality);
Size subPixWinSize(10,10), winSize(7,7);
const int MAX_COUNT = 10;
int discontinued = 0;
if(cameraPoses.size()>1 && points.size()!= 0)
{
vector<Point2f> p1(points);
... | 1 |
15478e6c77797142bc50c47c4069ad02 | f1503b60882464f72bcf63df7386d119 | 同じ集合に属するかどうかをチェック | bool SameSet(int x, int y){
return FindSet(x) == FindSet(y);
} | 1 |
7537b2204eef4a2e115f8507a33ae2cd | f45962a08ad09d90d7daa9aac86ebec2 | 快扫描:读取PEB上元数据,构造扫描信息
成功:0
失败:负数 | {
static bool s_bScanDone = false;
if (!s_bScanDone)
{
this->ScanPhysicalMemoryInfor(m_physicalMemoryInfor);
s_bScanDone = true;
}
return m_physicalMemoryInfor;
} | 0 |
21128284781504665de9e55d1f225775 | 9e5f06c503bb98e176616c8eede1752a | Gets information about the restaurant with the specified microsite name. See Consumer API -> Restaurant -> Get Restaurant | class PromotionService
public async getRestaurant(restaurantId: string): Promise<Place> {
return GooglePlacesService.getRestaurantDetails(restaurantId);
} | 0 |
3521bec4facbf0ee6af0dff862bc08e2 | a24522b29b5694573e55fe1e18c300eb | Sets the minimum number of connections to start with. | @SuppressWarnings( {"PackageVisibleField", "WeakerAccess"} )
public class AgroalConnectionPoolConfigurationSupplier implements Supplier<AgroalConnectionPoolConfiguration>
public AgroalConnectionPoolConfigurationSupplier minSize(int size) {
checkLock();
minSize = size;
return this;
} | 1 |
81364f7f8afc828710d59f0c75a3d038 | 53051e63564991eec8b325bb70fc9255 | Determine the name of the aggregator. | class AbstractAggregator(object):
def getName(self):
pass | 1 |
b3178269750d7ad2581a3a1662c55af1 | 70a4bfa5d95629cc2a1a7775cb386bfa | function to map lines to key value pair (rating,1) to allow for ratings count | namespace IMDBDatabase
class DataReader
private void AddRatingTodictionary(string rawLine)
{
string[] words = rawLine.Split('\t');
if (!words[0].StartsWith("tt")) return;
int id = default;
int votes = default;
float average = default;
for (byte i =... | 0 |
afebddd10244ceadca2c77e827259b03 | cb836b437ebf3a81b76cf2d6db518268 | Look up the path of Timeseries by uuid | def ts_path(path):
return "/api/db_<string:db>/v4/<string:ts>/" + path | 0 |
2319cdea91005261e57251991d46fb0d | b6b0300a5babf953b7227595c651ac6a | Supprime toutes les informations d'enseignant choisi | { $user = User::find($enseignant->id);
$user->delete();
$enseignant->delete();
return redirect()->route('enseignant.index')->with('success','L\'Enseignant est supprimé avec succéss');
} | 1 |
8adb8c8efaf82f8d3b05d7095c9b2831 | b5e83a9cca306067aa4b782a222827aa | Get an instance of this singleton which holds a reference to important
top-level models. | if( instance == null ) {
instance = new DataModel();
}
return instance;
} | 1 |
99be93bfd69ab129593f67fefc3fd316 | 6f4aa03576d29db0b5129aca3f507c21 | returns true if the specified object is within the specified volume. | bool PVolume::isInside
( const Gaudi::XYZPoint& PointInMother ) const
{
if( !m_lvolume ) { m_lvolume = findLogical() ; }
return m_lvolume->isInside( toLocal( PointInMother ) ) ;
} | 1 |
7223bfd634c7d94276da52a0e7f280d7 | e6620b5802c5e4a0eafd5f71ca18ac0a | Bag of money object. Player needs to collide with these to collect it | function BagItem(x, y, name, img) {
this.x = x;
this.y = y;
this.name = name;
this.canBeConsumed = true;
this.consumed = true;
this.img = img;
this.draw = function() {
if (!this.consumed) {
image(this.img, this.x, this.y);
}
}
this.consume = function() {
... | 0 |
0f5d5c08151be0837e51682a626f5865 | 5fcd53978d12f87cd37fdf6b55af4ce6 | Test the SLURM/Lisa backend with different methods/settings. | class SparkTests(unittest.TestCase):
def _do_test_spark_run(self, args=(), kwargs={}, num_proc=1, extra_mpi_args=None,
env={}, use_mpi=None, use_gloo=None,
stdout=None, stderr=None, verbose=2,
cores=2, expected_np=1, expected_env=''):
... | 0 |
cc1758ec31ede82768b57defda6fd24e | 844443a47d46bfd9bdf6f33c23c66ffc | Adds the children of the given parent to the database recursively | public class XmlViewTab extends Composite
private void addChildren(TreeItem parent) {
Element element = (Element) parent.getData();
for (Iterator itr = element.getChildren().iterator(); itr.hasNext();) {
Element child = (Element) itr.next();
TreeItem item = new TreeItem(parent, S... | 0 |
873e547ee28ab96bd8abd31549637e45 | b25d55e196b8c215f55b4d7440d46bdb | Configuraciones de relación entre las interfaces y la implementación deseada | {
List<String> allowedValues = new LinkedList<String>();
iPropertyInterFace = new PropertyString(new ParameterString("InterFace", allowedValues));
addProperty(iPropertyInterFace);
} | 0 |
430583891d2e6282baa3ab320a18139a | 1417fffa10ac5024294e5d03f46fae69 | @brief Вывод всех элементов из основной таблицы | {
std::cout << std::endl;
if (tables.size() > 0) std::cout << "All tables:\n";
for (size_t i = 0; i < tables.size(); ++i)
{
std::cout << tables[i]->getName() << std::endl;
}
if (tables.size() == 0) std::cout << "There are no tables.\n";
std::cout << "Successfully executed command!\n";
} | 0 |
55615862b83e79eb5d357a7e9be286d8 | a13aecdc22b3430d5c0f200ac82d68a6 | Activates the updates available button. Also "clicks" on it. | public class Setting
public void clickUpdateBtn()
{
updateBtn.click();
} | 1 |
f93eb530332d849aaa700b5463ce2237 | 3b08eae7a9a94edcf998ebedd9324e27 | 设置三张卡模式 | namespace CardRuleNS
public class CardsTypeEvaluation
public void SetLaizi(CardFace[] _laizi = null)
{
if (_laizi == null)
{
laizi = new CardFace[] { CardFace.BlackJoker, CardFace.RedJoker };
return;
}
laizi = _laizi;
... | 0 |
7ae1c73ff9fb344f654ef3cf6f9346b3 | 25811748da577190afd1b9fe324e5105 | remove minimal key from the AVL tree | if (root == null) {
return null;
}
AAXNode<Key, Value> retVal = removeMinHelp(root);
try {
delete(retVal.key);
} catch (Exception e) {
throw new RuntimeException(e);
}
return retVal.value;
} | 1 |
1f59586d4de46e23f99a6a58db21e71c | 4f411a2791c5f325856cb2fe13afee70 | Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.inventory.DCAEServiceType#getTypeId <em>Type Id</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getDCAEServiceType_TypeId(); | 1 |
ea745b7976f0ee804e5b643c576ae599 | 5b39c0bc515217e576165b25059fcd45 | Retorna el recurso siguiente | class Citas_model extends CI_Model
public function get_siguiente($id_recurso, $id_cita_anterior) {
if ($id_cita_anterior == NULL) {
$this->db->limit(1);
$this->db->select('*')
->from('citas')
->order_by('id_cita', "asc")
->where... | 1 |
5270d3238a7fe9316e99c9b7cf9721ba | 6a24e4964b26f18cfb73ad3750ad270e | Get the maximum element of each column in the matrix | vector<double> matrix_column_max(boost::numeric::ublas::matrix<double> x)
{
vector<double> res;
for (int j = 0; j < x.size2(); ++ j)
{
res.push_back(x(0,j));
for (int i = 1; i < x.size1(); ++ i)
{
if(x(i,j) > res[j]) res[j] = x(i,j);
}
}
return res;
} | 1 |
accb4d293758d1f374e3087ba526ae77 | ad022363e27440e1f34c81bb1e89f7ee | sportMoment取消点赞 | @POST(ConstValues.PORT_21 + "api/v1/circle/moment/like/cancel")
Observable<Result> postLikeCancelCircle(@Query("circleId") String circleId,@Query("momentId") String momentId,
@Query("momentPublisherId") String momentPublisherId); | 1 |
65cbc4c503e2fcb8994a8f40d51f7da4 | fa6d513fc3476fa0f5134a21e352f3b2 | Setter for the indicator ADX series. | public class MACD extends JsObject
public MACD setSignalSeries(StockSeriesType type4) {
if (jsBase == null) {
this.type = null;
this.type1 = null;
this.type2 = null;
this.type3 = null;
this.type4 = null;
this.type5 = null;
this.... | 0 |
ec0cea5727ba0c220e0d4f0673559d86 | 2c1c322bf5a1b716e84083bd89e8d4fe | 绑定手机时发送验证码 | _common(){
let that = this;
let data ={
mobile : that.data.phone,
event : 'bindingmobile'
}
request({
url : '/api/sms/send',
data : data
}).then(res =>{
if(res.code == 200){
wx.showToast({
title:res.msg,
duration:1000,
icon:'none'
})
} else {
Function... | 1 |
bd6042752ce2da04ee48e4044bd7471d | 98aae03697c9a1badacd04da50a6f341 | 得到总分单双 | public class NumUtil
public static String compareSD(int num) {
return num % 2 == 0 ? "双" : "单";
} | 1 |
12ab8a44935a68792ec40a7b1c16201f | 6c668aa6ebe1f79a5cb26945be448b9f | Increases scale of object to simulate life | {
float m_scale = Random.Range(0f, 2f);
transform.localScale += new Vector3(m_scale * 1.5f, m_scale, m_scale);
} | 1 |
e3981681daf41d0963993b98dc95322c | 3c8e42aaad65655757e3f269f88d6c1a | To get the total sleep hours that you actually slept | public class SleepStats
public double getHoursSlept() {
return this.hoursSlept;
} | 1 |
b38ea47d54407b5c1f00c797397a885e | c90abf9a28e37ce63ca9744d035261bf | 读取所有类别的训练样本到字典中,每个文档是一个list | cateDict={}
dir_list=os.listdir(dir)
for i in range(len(dir_list)):
path=os.path.join(dir,dir_list[i])
cate=dir_list[i].replace('.txt','')
cate_keyword_list=readFile(path)
cateDict[cate]=cate_keyword_list
return cateDict | 1 |
2ff7d3e44cacc3a6955d496f99ee212a | 820096d1468fde87b5d88059f2a5f54d | Write a method that takes an Array of numbers, and returns an Array with the same number of elements, and each element has the running total from the original Array. | new_array = []
array.inject(0) do |memo, value|
memo += value
new_array << memo
memo
end
new_array
end | 1 |
6566df241e4b1cf94f61427840f53dcb | 90a0f53820e1aa677555f7cef27a62d1 | Perform post-destruction operations. | class MultiSizer(Sizer):
def __del__(self):
self._stop_workers() | 1 |
4e4cda456f7709d624dcc817c44a66cc | 27e439098decc2463e646bb131010e2a | 毕业答辩分组 | graduation_center = []
graduation_class = []
graduation_center.append(sort_center_coord[0:divide[0]])
graduation_class.append(sort_category[0:divide[0]])
left_i = 0
for i in range(1,len(divide)):
graduation_center.append(sort_center_coord[divide[left_i]:divide[i]])
graduation_cla... | 1 |
d0183fd0c39f0077bc0d6fb02e91b7cb | 904486e92b46c4111dae8d6e97f4e592 | 定义序列化Actor类的方案 | type Skill struct {
Name string `json:"name,omitempty"`
Level int `json:"level"`
}
type Actor struct {
Name string
Age int
Skills []Skill
}
a := Actor{
Name: "cow boy",
Age: 37,
Skills: []Skill{
{Name: "", Level: 1},
{Name: "hello"},
{Name: "world", Level: 3},
},
}
res, err ... | 1 |
65c2cf73106c7bcd2c3c857f41939eec | af8c4180fb6b30bcc75da43c30151244 | Build a minimal graph for running transfer using generator F
Like, this runs the map from the unlabeled domain to the
labeled domain. | self.xfer_input = tf.placeholder(
tf.float32, (1, *inference_input_shape, 1), 'xfer_input'
)
with tf.variable_scope('generator_G') as scope:
generated_labeled_big = self.gen(self.xfer_input)
G_vars = scope.global_variables()
G_init_op, G_init_fd = tf.c... | 1 |
50527cf285062bd6cd48da2798222017 | 636d539a861f167902ccfe6e31350429 | Processes set data and calculates similarity percentage | {
foreach ($data as &$row) {
$this->setTotal($row);
}
$minimum = $this->getMinimum($data);
foreach ($data as &$row) {
$this->setPercentage($row, $minimum);
}
} | 0 |
61db6c4f29be657aa1ca6890a5ae3387 | fbf41e89ee055153d414d5eec87e48fd | quicksort関数で使う比較関数 | int cmpfunc (const void * a, const void * b)
{
return ( (int)a - (int)b );
} | 0 |
bdd7df6d52efa49de192469a60c23093 | f1f92f940ada8f3265017223653bde09 | Baut Verbindung zur Datenbank-Klasse auf und holt sich die
drei neuesten Locations aus der Datenbank, codiert sie via json
und gibt sie zurück. | protected Void doInBackground(String... params) {
RestTemplate restTemplate = new RestTemplate(true);
LocationInfo[] jsonObject;
try {
Log.i("Print", "testing RetrieveLocationJsonTask1");
jsonObject = restTemplate.getForObject(params[0], LocationInfo[].class);
... | 0 |
76478667528a4585ab40f3974a34bda5 | cfdf73bcb37f8b3292e45bd3ffdcf40d | Length of the file data in the directory file. Comes after the directory tree. | public class UDF_ECMA119DirectoryRecord extends UDF_Element
public UDF_uint8 getLenOfDirectoryRecord(){return lenOfDirectoryRecord;} | 0 |
91a911408816ed167a3ba88d4ee2bf31 | 185f8846c37a59db108b7b2950648e6f | Internal function to update device meta data based on current configuration. | if hasattr(val, 'name') and val.name:
self.set("name", val.name)
if hasattr(val, 'extraConfig'):
extraConfigs = _merge_extraconfig(
self.get("config.extraConfig").OptionValue,
val.extraConfig)
sel... | 1 |
018ce03d7c0c345f38069b7244bf62eb | d0ac0a122c2fd8b54f49c6d63b723531 | This really is the only way to reset the FM chips.
Just write zeros everywhere. | for (uint8_t i = 0; i < reg_count; i++) {
mark_it_zero(i);
}
} | 1 |
86a853e32dbda3928c01674917e75caf | 39a46a0e0b4f2107b218252c631875ba | Override method, prevents Errors from being recorded for missing plugin hooks. | def hook_failed_error(msg)
e = super
e.set_backtrace([])
e
end | 1 |
f9719124598984feee8d49a964fddf48 | 8e87595faddfa63c318a3cf70803e679 | Describes an event, that fires, when a process ends | fun end(cmd: FinishProcessInstanceCommand) {
AggregateLifecycle.apply(ProcessInstanceEndedEvent(
processInstanceId = cmd.processInstanceId,
sourceReference = cmd.sourceReference,
businessKey = cmd.businessKey,
endActivityId = cmd.endActivityId,
superInstanceId = cmd.superInstanceId
... | 1 |
406d5a04b68da6d9edaf8fb2fc67ee7f | 4823c810b3365979c9f42cbf27cd111f | Find all solutions using permutations. | def find_all_solutions(original_assignment):
solutions = list()
solver = pycryptosat.Solver()
for i in range(0, len(original_assignment)):
solver.add_clause(original_assignment[i])
while True:
solver_solution = solver.solve()
if not solver_solution[0]:
break
s... | 0 |
aee657562ba25b56fff8500fb2190a83 | 929a93dd774f4fafad0f910ab6aba2ef | Gets status of atomic sequence. | public class GridCacheDataStructuresImpl<K, V> implements GridCacheDataStructures
@Override public GridCacheAtomicSequence atomicSequence(String name, long initVal, boolean create)
throws GridException {
return dsMgr.sequence(name, initVal, create);
} | 0 |
70b22dfad9b0b6b13bd7ec37154e31d6 | 35b05531d31cff51a63c22c0b716ad11 | input is *NOT* sorted | struct node* intersectionByMergesort(struct node* a,struct node* b)
{
mergeSort(&a);
mergeSort(&b);
struct node* t1=a;
struct node* t2=b;
struct node* c=NULL;
return sortedIntersection(t1,t2);
} | 1 |
150b366fd9076d76699e1acf60061a26 | 701128e77f362d05db0244a20d83b62f | Answers if the counter has `brand` type. | class Counter
public function isBrand()
{
return $this->_type === self::TYPE_BRAND;
} | 1 |
594da641ed0ce8c3c0e33f4ddf19bc9d | af161edab9724b343b80d6c9f6dd09f2 | Gets the portrayal of the square at the given position. The portrayal determines how it's rendered. | function getCell(square_pos, square_map) {
return square_map[square_pos[0]][square_pos[1]];
} | 1 |
8065e0a3ce3f490fcbc7a8f3db6d43ef | 24d376a782db49aa7b76854170eec1d5 | Register Jws implementation, will override existing one if any | public function registerImplementation($tokenName, $className); | 1 |
e898f124264918ec0a462e211ca49143 | 32751f975e8725bb0efa77abac14f6bf | move the camera to the target position, match the target zoom | export default class SceneBrowsingController extends Component{
focusCamera(){
this._m_TargetLocation.setTo(this._m_Target).add(this._m_LookAtOffset);
this._m_Distance = this._m_TargetDistance;
this.computePosition();
this._m_Cam.lookAt(this._m_Pos, this._m_TargetLocation, this._m_Initia... | 1 |
a8274ba13f58c19abe687faf3c2da38b | 038be1af130f2ccd9f7c981252901731 | Can successfully return a set of values found in both trees | {
if (tree1.Root == null || tree2.Root == null)
{
return null;
}
Hashtable ht = new Hashtable(1024);
List<string> listOfSharedValues = new List<string>();
void PostOrder1(Node<string> root)
{
if (root.LeftChild != null)
{
PostOrder1(root.LeftChild);
}
if (root.RightChild ... | 1 |
6581de2850c2ed738879e9e3a840eb9f | df66974cb452dd324552210adb2fdb4e | Tests the not numeric validator. | public static function assertIsNotNumeric($actual, string $message = ''): void
{
TestCase::assertThat(
$actual,
new LogicalNot(new IsType(IsType::TYPE_NUMERIC)),
$message
);
} | 1 |
a96444d994467f8f6f98f07b1ee9bd30 | a07909c0648c4402e52c178e88260416 | 関数quicksortで使う身長を比較する関数 | int compare(const void *l, const void *r){
int a = absolute(threshold - ((*(person*)l).BMI));
int b = absolute(threshold - ((*(person*)r).BMI));
if ( a < b ) return 1;
if ( a > b ) return -1;
return 0;
} | 0 |
7a0a5ad7991f5e857ac9d728923e1e95 | b1f0cad38d573dd99128ccea3ec4ab3e | Draws all specified slices. Uses the
:func:`.glvolume_funcs.drawAll` function. | fig, axes = plt.subplots(1, len(slices))
for i, slice in enumerate(slices):
axes[i].imshow(slice.T, cmap="gray", origin="lower") | 0 |
cac2a7e2ef1be6c0324eead34ab4b3d8 | d4b0867967523433a237428dfd8e5386 | 開啟圖片對話視窗 | function showModalImages(option){
$('#myModal'+option).modal({
keyboard: false,
backdrop: true,
show: true
});
} | 1 |
c3d226793f55db83d7fa0b7226425a5d | b98b0eaae3ac95562048875809aaea84 | 先检查是否顶级目录 | export class DirectoryComponent implements OnInit, AfterViewChecked
onlyDir(tree: Tree) {
if((tree.node as FileTree).type == 1){
tree.children.forEach(
(tree,index) => { this.onlyDir(tree) }
)
}else {
tree.removeItselfFromParent();
}
} | 0 |
e25d450ef43be4d2f7d7351a135d3de5 | fa0cde65af75b9ac6725f693d96c020c | 从内存或者磁盘中读出全部元数据 | public class MetadataFactory
public void readMetaFiles(File dir) {
for (File f : dir.listFiles()) {
MetaObject mo = null;
if (f.isDirectory()) {
readMetaFiles(f);
} else if (isMeta(f)) {
try {
mo = parseMetaFile(f);
... | 1 |
578d66ceb9e911c60b477472efcdeaea | 52771dfb0b56aea1779c95675eea571e | 批量测试连接
批量测试连接。
Please refer to HUAWEI cloud API Explorer for details. | const options = ParamCreater().createTags(createTagsRequest);
options['responseHeaders'] = [''];
return this.hcClient.sendRequest(options);
} | 0 |
6c67008ab41b290226200111713b45cb | 18fd72a1b080228fb79d197939952f33 | sets the phrase which should be contained in the message body | class NewReportFilterInfo
public function SetPhrases($value) {
$this->Phrase = $value;
} | 1 |
5484268730900379383193c5d1f12e6e | 063320c21f44eae4aa3f3b223ba96a0f | Sorts keypoints in descending order of response (strength) | let newKeys = [];
for (let i = 0; i < keypoints.length; i++) {
newKeys.push(keypoints[i]);
}
newKeys.sort(function(a, b) {
var x = a.part.toLowerCase();
var y = b.part.toLowerCase();
return x < y ? -1 : x > y ? 1 : 0;
});
return newKeys;
} | 0 |
dff0adbde130717f70307dedf7aea7c8 | 1b3c7435f85be5d70c8ef316f2dca0b2 | Disables play, previous track and next track button. | void disablePlaybackControls(); | 1 |
f61009289ac7284eb61e03f7ccee3aa3 | 4117ccc767f69db62b7ce3ddfdc8999e | Gets the score of player O. | return player.getScores().stream()
.filter(score -> score != null ? score.getScore() == 1 : false)
.count();
} | 0 |
f229e7a6c7681b61067cd52f725ab313 | 9e2b2ae7bd20feb34337161226bbf03b | 如果使用了nginx代理 | class ProxyMiddleware(object):
# 实现process_request方法
def process_request(self, request, spider):
if isinstance(spider,GsxtSpider):
return None
else:
protocol = request.url.split('://')[0]
proxy_url = 'http://localhost:16888/random?protocol={}'.format(protocol)
... | 0 |
5e411abfd95edf26eea1c16ec1f02e34 | 1f7c1ee5c796539fe530c29da9d15b90 | 应用效果器到乐器的声道buffer | class Bitcrusher
onaudioprocess_(event) {
for (let i = 0; i < event.inputBuffer.numberOfChannels; i++) {
this.processBuffer_(
event.inputBuffer.getChannelData(i),
event.outputBuffer.getChannelData(i), i);
}
} | 1 |
c561afde11fd8db9346360c067f7b93e | 35ceae24956e88bb3f378e690ff5c11b | Queries the server and returns the currently active window number. | function _window_active() {
return namespace.windows.getCurrent();
} | 0 |
c47e5131cd709e7739bc6ef6b7e5f949 | fc5760a0f4c19f5dee8e765381ac7323 | Fetch package from crates.io and untar it into a subdirectory. | class fetch_packages(object):
def __init__(self, dest_dir, log, pkg_dirs=None, no_download=False,
copy_files=False):
self.dest_dir = dest_dir
self.log = log
self.pkg_dirs = pkg_dirs
self.no_download = no_download
self.copy_files = copy_files
self.toolbox = Toolbox() | 0 |
e1cf1026fff8babb10c9586d9d7873b5 | 8914f8175d0fb27f103d0abd42b9ce79 | ======== ti_sysbios_knl_Task_getPrivileged_SVC ======== | {
proxyid ^= OSAL_PROXY_ID_FLAG;
if (proxyid >= OSAL_MAX_NUM_PROXY_TASKS)
{
ICall_abort();
}
return (ICall_EntityID) osal_proxy_tasks[proxyid];
} | 0 |
a0b7ab03ed1ecfedc17cbc2e94b8891b | a5fa6273b333252ff7465368465280a5 | unlocks the register | void DS1302_unlock()
{
DS1302_writeybyte( DS1302_CONTROL + DS1302_WRITE, 0x00 );
} | 1 |
c694931bc75cad5036dd6dee9734edf7 | f462a0b057c6d3c7b3a55b0bec5bfc99 | Convert the YUV420 format to RBG pixels (not complete RBT format) | v4l_yuv420p2rgb (unsigned char *rgb_out, unsigned char *yuv_in,
int width, int height, int bits)
{
const int numpix = width * height;
const unsigned int bytes = bits >> 3;
int h, w, y00, y01, y10, y11, u, v;
unsigned char *pY = yuv_in;
unsigned char *pU = pY + numpix;
unsigned char *pV = pU + numpix / 4;
unsig... | 1 |
58f0645e7bfdd44bc59ac800856b5e66 | f770c723e6ceabe7ea3bbb5cc5789c12 | gets total of all transactions for all accounts | class transactions():
def total(self):
return -sum(self.buying)+sum(self.selling) | 0 |
e841b8fc89b8485ff370d5e4d9ff2909 | 69a780768ee6bdeae83bde93574f3c5a | given self._filelist, load a given index and update
self._current | class LolitaPlayer(QMediaPlayer):
def play(self, i):
if hasattr(self, "playList"):
self.playList.setCurrentIndex(i)
super(LolitaPlayer, self).play() | 0 |
9d5ab21c206a9bdc02d87af9ab04ef30 | 7de603c077f1668f3903d61f546f4b63 | Tests whether enumerating the dictionary, but not changing anything,
returns the original dictionary. | cls = createAttributeObjectType({'field': DictAttribute(TestEnum, list)})
obj1 = cls(self.match)
self.assertDictEqual(obj1.field, {})
obj2 = cls(self.match)
self.assertIsNot(obj1, obj2) | 0 |
0405ae337d95c92538422d58d6b38f67 | 0e83b8e1f64466a99e24d3a7f01dfee9 | Returns the authors and their page views in descending order
according to the page views | def answer2():
db = psycopg2.connect(database=DBNAME)
c = db.cursor()
c.execute("select authors.name, count(*) as num \
from articleLog join authors on articleLog.author = authors.id \
group by authors.name \
order by num desc")
result = c.fetchall()
db.close()
for item in result:
... | 1 |
fbb23aa74a822e0827e3d2818676e49d | 2851ed2dc25cc4fa63ca72b7641cae53 | Deletes a supply request entity. | {
$deleted = $this->getRepository()->delete($id);
if (request()->wantsJson()) {
return response()->json([
'message' => 'Supply apagada.',
'deleted' => $deleted,
]);
}
return redirect()->route('supply.index')->with('message', 'Su... | 1 |
1897376ad793bf026ed337198e865a77 | 09f15990d50220c5b5cb999fcc7320af | Returns relative filepath from image root folder. | class UnitSprite(pygame.sprite.Sprite, metaclass=ABCMeta):
def imageRelativePath(self) -> str:
pass | 1 |
078d8ce864935f2b5ffdfdc01d9c6e15 | d170921c1edfe8995a1b560303ea8fd4 | 查询用户今天是否有打卡记录,传入参数为(员工编号,当前日期) | @Repository("checkDao")
public class CheckDao
public Check queryCheckByEmpNo(String empNo,String date) {
String sql = "SELECT * FROM checktable WHERE emp_no=? AND date LIKE ?";
Check check = jdbcTemplate.queryForObject(sql, new CheckRowMapper(), empNo,date);
return check;
} | 1 |
b1911aefb8d1d7a466a135824e61fab4 | 7f395bf440b06fe3cc2f6e1d2a4f073f | 根据名称或者拼音查询所有的组织id | List<Industry> findByIdOrName(String condition); | 0 |
98cb804fb7f4c64e95ecff7e000565ed | 40cf4716acab43c5dace711f9e2ad901 | 获取特征维不同属性值的基尼指数
continuous 标记连续还是离散 | total=dataset.shape[0]
groups=dataset.groupby(attribute)
IG=entropy(dataset)
for key in groups.groups.keys():
group=groups.get_group(key)
count=group.shape[0]
IG=IG-count/total*entropy(group)
return IG | 0 |
85f2d477c4bd57ab0f55ec11e5fac927 | 11a4d47e8fd36530ed60bd226b384dbe | Sets the user statistics. | CompletableFuture<Void> updateUserStatistics(
String userId, int score, int successes, int attempts); | 1 |
74887989d0a55fcebcff6e87ead9ee41 | d45a1d012223aed26d62d6eb06133f94 | 获取抽奖设置详情 | class Remark
public static function getRemarkLottorySettings(){
return DB::select("RemarkLuckyItem",['*'],["status"=>1]);
} | 1 |
b632db863380a3edd7484427166d6ae2 | 3dcba7fa8f10e2c2b1ea7784f2e3b6c8 | Vaciar catalogo de la home | function clearCatalog() {
$("#cont-for-cards").html("")
} | 1 |
e3dce4c2673a9b99c38edf74541850f8 | 4cddbf88c053dce70c0c98c5ae933495 | Devuelve el listado de todas las respuestas asociadas a un cartel | public ArrayList<String> getRespuestas(); | 1 |
3e4a977737d0ed0eb8aefd6c06ec6c96 | 1ef3819c772249c2a0f5214582eee782 | Check that going out of bounds with a `backward` operation yields
IndexError. | grid = Grid(shape=(6, 6, 6))
u = TimeFunction(name='u', grid=grid, dtype=np.int32)
u.data[:] = 0.
dat = np.array([1, 2, 3, 4, 5, 6])
u.data[0, :, 0, 0] = dat
assert (np.array(u.data[0, 3::-1, 0, 0]) == dat[3::-1]).all()
assert (np.array(u.data[0, 5:1:-1, 0, 0]) ==... | 0 |
7e5dfc89ff2d05b29617c52a4d156ddb | 818f41356ef12557cad599b79b368015 | Returns conditions to WHERE clause that will be joined by OR operator. | namespace MonQ.Data.SqlClient.SqlStatements
IQuerySelectWhere WHERE_OR(params string[] conditions); | 1 |
e0070b24eaf60d62992d1ea0d4a5fd9f | 5744a9dd2b87916bb8b3e76781d21c84 | functie ce returneaza numarul de angajati din cadrul companiei curente | namespace Task_3
public class Company
public int GetNumberOfEmployees()
{
return employees.Count;
} | 1 |
ac205600020cf534211d3946a35b2c84 | 97a22668518226c5949cc2e38a2ace0f | Returns the row index for this Tuple's backing Table, if it exists.
or if this Tuple has been invalidated (i.e., the Tuple's row was
deleted from the backing table). | long getRow(); | 1 |
3deb36548ef782442765464f22fd2ab7 | bef1a4b365a71662248773cc9b30b9f0 | 将目录文件信息发送给客户端 | public class FileServiceImply implements FileService
public static void sendListing(ChannelHandlerContext ctx, File dir) {
FullHttpResponse response = new DefaultFullHttpResponse(
HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
response.headers().set("Content-Type", "text/html;charset=UTF-... | 1 |
87f250566e1ed6d666a60b0dadd3c274 | 1f4c4ee7b4a87712036f15458a5c4ecb | Perform additional checks after the member has been
added to the member list of the containing type. | namespace SD.Tools.Algorithmia.GeneralDataStructures
public class CommandifiedMember<TValue, TChangeType>
protected virtual void OnAfterMemberValueSet()
{
if(_loggedErrors != null)
{
_loggedErrors.SetPropertyError(_memberName, string.Empty);
}
BindToElementChanged();
BindToElementRemoved();
} | 0 |
71e88b1707015581adca222d51b5818b | 0e4d3571cc3bcd1a1213eddc9aff7e81 | 最近追加された楽曲の抽出 | namespace ProjectMato.iOS.Server
public class MusicInfoServer
public List<MusicInfo> GetQueueEntry()
{
var queueEntrys = DatabaseManager.Current.FetchQueueEntryTables();
var musicInfos
= GetMusicInfos();
var result =
from musicInfo in music... | 0 |
5bcc5a93deec071d5d63be8a9c9314e2 | 659d7cddfff1f88735d72765ddac6eb9 | Gets the allowed algorithms for signature verification | @ApplicationScoped
public class ClientService implements Serializable
public SignatureAlgorithm[] getSignatureAlgorithms() {
return SignatureAlgorithm.values();
} | 1 |
11b36d6413472445775ddc0e9bbbff09 | d35827fadc8867fb5b8a8796f7e204e0 | 測試取得租卡商家設定但商家不存在 | {
$this->setExpectedException(
'RuntimeException',
'No Merchant found',
670001
);
$em = $this->getMockBuilder('\Doctrine\ORM\EntityManager')
->disableOriginalConstructor()
->getMock();
$operation = $this->getMockBuilder('\BB... | 1 |
d122a8daf08a192f6b784486c97578f8 | 9066eb77a8ba6081ef9821e4724c65dc | metoda za postavljanje nekretnina u tabelu | namespace UserTable
void Table::setIntValue(int value, int xPosition, int yPosition){
data[xPosition][yPosition].type = v_int;
data[xPosition][yPosition].number = value;
} | 0 |
5cccd27ea0c85f56db42b0ef82280193 | 05c5b9622f6b0b932078a178acb426ab | 父类中method方法为private,因此子类没法覆写 | @ReverseImpl(interfaceName = "SuperInterface")
@ReverseExtend(superName = "SuperClass")
public class ReverseSuper extends SuperClass implements SuperInterface, Runnable
private void privateMethod() {
} | 0 |
75773db27709535b685fd094edcdd02b | 98a9a406588cdec81bdcfaf916f9e511 | Display a message in the render zone. | class AppController extends Controller
public function renderMessage($type, $text){
$this->Session->write('global.message', ['type'=>$type, 'text' => $text]);
} | 0 |
31d53011c4ddfbc986965ddf1944368b | 583043fccf4c8940fbf9be523631775a | This callback send a beacon signal of this robot to the system manager. | msg = SoMessage()
msg.header.frame_id = self.frame
msg.parent_frame = self._buffer.id
now = rospy.Time.now()
msg.header.stamp = now
msg.ev_stamp = now
current_pose = self._buffer.get_own_pose()
msg.p = current_pose.p
msg.q = current_pose.q
... | 1 |
8db29007480ea45cfa794760cf8b51ae | 51c06ef45b2fc3fbaccd1b27ea91b178 | Method to make assets unchecked. | public function unChecked(){
$this->is_checked = 0;
$this->save();
} | 1 |
e680f1660627b01aff5c6f3a5ca4d79e | af81c8e64b6fff5f7a1c19610611cfe6 | DO-STORM | if player.sub_job ~= 'SCH' then
add_to_chat(122, "You can not cast storm spells")
return
end
if not pet.isvalid then
add_to_chat(122, "You do not have an active avatar.")
return
end
local element = pet.element
if element == 'Thunder' then
element = 'Lightn... | 1 |
2a327c715d8d0f745575516bf3b02cf4 | 5da8886d700f06ddbe83a5d04a3769c8 | Converts the {KSUID::Prefixed} into a {KSUID::Type} by dropping the prefix
ksuid = KSUID.prefixed('evt_') | typename = get_v4_typename(identifier)
if typename[:7] == "sbp_v4_":
return "sbp_" + typename[7:]
assert typename[:4] == "sbp_"
return typename[4:] | 0 |
65d28e4b8eddd487979c5fb34f6b43b1 | 3be6fda0b7a59a88229644a4a4295ba6 | https://graphql.github.io/graphql-spec/draft/#example-a6b78
query inlineFragmentTyping {
profiles(handles: ["zuck", "cocacola"]) {
handle
... on User {
friends {
count
}
}
... on Page {
likers {
count
}
}
}
} | const model = getSimpleModel(connection);
const BarType = new GraphQLObjectType({
name: 'BarType',
interfaces: () => [FooBaseType],
fields: () => ({
...simpleFields,
baz: {
type: GraphQLString
}
})
});
const FooBaseType = new GraphQLInterfaceType({
name: 'FooBaseTyp... | 1 |
9389756c0fe9980306080a8fa2850b8c | 0348f94bc2fc356ecf4b40acf4413330 | Returns <tt>true</tt> if user specified strings are converted to the
case of the autocompletion term they match; <tt>false</tt> otherwise. | final class Options
boolean maintainCase() {
return maintainCase;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.