query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
9f7056d6c111af4cda937e234990c2c1 | 723d06ff3d4fb5fc7966e60051f8101d | shallow copy | Shallow::Shallow(const Shallow &source)
: data(source.data)
{
std::cout << "Copy constructor - Shallow Copy" << std::endl;
} | 1 |
b805ae851bcba80a5e06e78b956fcaf0 | 4ccfe59c3c066dc4cc9c4dc153e6e0f8 | 功能:删除团队成员信息 | class teamInfoMgr:
def delTeamMember(self, uid):
if None == self.getTeamMemberByUid(uid):
return False
self.allTeamMember.pop(uid)
return True | 1 |
e6ac409b8ab57eb6ea3ad8a6950d1593 | cb2bc84f53a57510771b98e6b41f94f3 | Get pointer to next Tx descriptor to be processed (send) by HW | struct mvneta_tx_queue *txq)
{
int sent_desc;
sent_desc = mvneta_txq_sent_desc_num_get(pp, txq);
if (sent_desc)
mvneta_txq_sent_desc_dec(pp, txq, sent_desc);
return sent_desc;
} | 0 |
b7746a8ccaf87d29a7b624d7dcd8f47c | 8efbbfa1a7d696c46626ebde49251d58 | against Regions List | class RegionsController extends Controller
public function index(Request $request)
{
if ($request->seachname != null) {
$regions = regions::where('isdelete', 0)->where('name', 'like',
'%' . $request->seachname . '%')->orWhere('id', 'like',
'%' . $request->seachnam... | 1 |
50c888546c392993ad76b1377887dc5a | 9c6d869cf887c363465f280590a4cfc8 | parse an individual 72 byte entry from swap.state | var id uint64
id, err = strconv.ParseUint(packed, 10, 32)
if err != nil {
return
}
buf := make([]byte, 4)
binary.LittleEndian.PutUint32(buf, uint32(id))
split[0] = binary.LittleEndian.Uint16(buf[:2])
split[1] = binary.LittleEndian.Uint16(buf[2:])
return
} | 0 |
29471c2497757ab825027e84cb3c0960 | 32621257f1c263f5c1c24df33d3ea038 | this subprogram disables the purchase, sell, and end turn buttons | public class SH_Control : MonoBehaviour
public void EndTurn()
{
DeckButton.SetActive(false);
ActionButton.SetActive(false);
EndTurnButton.SetActive(false);
StartCoroutine(WaitFunction(1.0f, true));
} | 1 |
0bc3267e04d157b27d6d94f800124fbf | dd856d9c541750c738d23bb568e9777a | r"""
Set parameter name of layers which would not be pruned as sparse weights. | class AutomatedGradualPruner(AutomatedGradualPrunerBase):
def __init__(self, name, initial_sparsity, final_sparsity, weights):
super().__init__(name, initial_sparsity, final_sparsity)
self.params_names = weights
assert self.params_names | 1 |
793e2b9a591a7c88b83784892a3ed472 | 88a29b7c0d11d5170b9b939316db616b | u"""
对文本文件内容进行简单的文本替换(目前不支持正则表达式) | def main():
tf_list = read_file(infile_path)
new_tf_list = []
for tf_line in tf_list:
new_tf_line = re.sub(old_str, new_str, tf_line)
new_tf_list.append(new_tf_line)
write_file(new_tf_list) | 0 |
21942a5860409c784be6970acd347de7 | 1807a5f747b2dd13e1ae0da742e9d003 | Method to save excluded attributes on a csw policy | policy.status = this.consentEnabled.value;
policy.excludedAttributes = this.excluded.value;
policy.includeOnlyAttributes = this.includeOnly.value;
} | 1 |
adfa8adf6f74b72bab175cb984cbee00 | 6b7157ecfa946a40d79634b8383a7b07 | set parser variable as dictionary items | class Section(MetaSection):
def set_pars(self, **kwargs):
for key in kwargs:
self.pars[key] = kwargs[key] | 1 |
da5c92402fcf9a9a01d3f2fc25e7fc25 | 09dfb00042b4979e8f14a99ae10034b9 | エキスパートのみ取り出す。ログインユーザーの排除 | {
if (empty($request->is_own) || $request->is_own == 'false') {
return;
}
$user_id = Auth::id();
$search_query->where(function($query) use($user_id){
$query->where('create_user_id', $user_id);
});
} | 0 |
59505a55f250c465c7ff7fb98458f112 | 60cc461f561c9317fd28a125c0ba721a | Add handlers for Post previews | if ( ! is_singular( self::POSTTYPE ) ) {
return;
}
$event_id = get_the_ID();
$event_status = get_post_status( $event_id );
$is_event_preview = is_preview() && ( 'auto-draft' === $event_status );
if ( ! $is_event_preview ) {
return;
}
$this->add_preview_venues( $event_id );
$this->... | 1 |
ba38b8b0c488120d5ca59540835ac5d0 | b91640a9f96c6d07bbaff0c6e579d440 | функция добавления еще одного поля контакта к списку | class MainForm(QtWidgets.QMainWindow, Ui_MainForm.Ui_MainWindow):
def newContact(self):
self.tbwContacts.setRowCount(self.tbwContacts.rowCount() + 1) | 1 |
0f5abd4c18b152ddbd225cb21cf45c46 | 2fd1a5d1a90e9bf52b4b7aa8c7f89b6b | Adds the child process event handlers | namespace TrackOpenFile
public class PluginMain : IPlugin
public void AddEventHandlers()
{
EventManager.AddEventHandler(this, EventType.FileSwitch);
_settings.OnSettingsChanged += _settings_OnSettingsChanged;
} | 0 |
62dfd6ca98f7beb09d328cc6f247925f | c27730df074dac4655b67c14f4e57554 | GPRMC message store function | {
RMC rmc;
unsigned char times = 0;
char *p;
char *s = strdup(rmc_data);
p = strsplit(&s, ",");
while (p)
{
switch (times)
{
case 1:
strcpy(rmc.utc, p);
break;
case 2:
rmc.pos_status = p[0];
... | 1 |
6652fe704d2dd12fa17d057415dfa4f0 | d36c4a0fd2d3f49fb60fb428ded3f023 | Runs the linting program and returns the command output | class DockerfileLintWorker(BaseWorker):
def lint(self):
command = ("docker",
"run",
"--rm",
"-v",
"/tmp/scan:/root/scan:Z",
"registry.centos.org/pipeline-images/dockerfile-lint")
try:
out, err = ru... | 1 |
1e29cfb1200d7751a7abb94bf4c24b4d | 892b0df9442db5faa0838d01625367ca | Return (x * y) mod 1000000007. | def multiply(x: int, y: int) -> int:
if x < 10 and y < 10:
return x * y
else:
m = (int(math.log10(max(x, y))) + 1) // 2
x1, x0 = split(x, int(m))
y1, y0 = split(y, int(m))
z0 = multiply(x0, y0)
z2 = multiply(x1, y1)
z1 = multiply(x0 + x1, y0 + y1) - z0 - z... | 0 |
ba412548f3e3f59722ce77f6a9e270f3 | 47825e0899de4886029a063459c39470 | 获取uniform索引(也就是着色器程序中uniform类型的id) | let blocks = program.UniformBlock;
for(let key in blocks){
if(blocks[key] == slotindex) return key;
}
} | 0 |
7c417efadfd9913e10d9930418d8e04b | 5cb107f047e6648278b31e0215dbc335 | 根据餐厅获取窗口列表的List | namespace OPUPMS.Domain.Restaurant.Repository
List<R_Table> GetTables( int orderId); | 0 |
8b5de65d2710d38053ca809f67f24652 | e5245a696abbe108c834feec815cf573 | Submit results from a battle to the population so fitness can be determined | float distSum = calcBlobSepDistance();
float varSum = calcVariance();
myPopulation.myPopulation[index%popSize]->setFitness(finder.nBlobs, distSum, varSum);
} | 1 |
8d8c4060027dafc27e8e9bbe4f222911 | 6b9740da41f83267bf08c26f626b965f | 创建Jest配置 | const p = path.resolve('./', 'node_modules', 'react-scripts', 'scripts', 'utils', 'createJestConfig.js')
const old = fs.readFileSync(p).toString()
const arr = old.split(/\n/)
const need = arr.every(v => !v.match('@/(.*)'))
if (need) {
const i = arr.findIndex(v => v.match('moduleNameMapper'))
arr.splice(i + 1, ... | 1 |
d925c273252616beb6a1444fb7ca0db0 | 272f8da066c6f6bd18b3fc84b7261868 | Lists all CostName models. | class CostController extends \BaseController
public function index() {
$items = Cost::orderBy('name', 'ASC')->paginate(10);
return View::make('cost.view_cost', compact('items'));
} | 1 |
83e24b431b24b62553468e26ddba6fd9 | 75c6f7408d3e48c113adabd6b4fc21e4 | 对节点及子节点包含的空间对象做快速包含检定 | {
SortedList<Tuple<float, float>, object> nodes = new SortedList<Tuple<float, float>, object>();
foreach (var ca in obj.ComponentAssemblyInstances)
{
var allAspect = ca.Impl.Aspects.Where(a => a.Name.Equals("All")).FirstOrDefault();
float x = (... | 0 |
ae91f43f9ec252285db28974a740113b | f4e1666600e847a37a4de53ade660553 | Given any not null list of MenuItems, it returns its price.
This is only used as a utility that avoids humanly asserting
the sum of the prices of the items, since it isn't feasible and secure
in the long run (different developers may add items to the list returned
by getItemsOrdered(), thus forcing a manual check of th... | long res = 0;
for (Item item : items) {
res += item.price;
}
return res;
} | 1 |
d5ff0945d62d2293ed798b5c7c36b628 | 81946be9164c63c02f04566420e5509d | 根据id审核题目 | boolean audit(Long id); | 1 |
19a7fdfad1227095ce8a7576d21938b3 | 9ef2bc7e05ba15744f16f12eab042db5 | Executed once before all tests | class Test
public static function init() {
self::requireAll();
Database::reset();
self::loadTest('RegisterLogin');
self::loadTest('Leagues');
Database::reset();
} | 1 |
cdd34d11fd69d03c74d7d769f486c4cd | a2a31465178b853ce2bef96359c02d78 | 获取订单的加密信息 | {
$tradeInfo = $this->encryptDataByAES($this->TradeData, $this->HashKey, $this->HashIV);
return [
'MerchantID_' => $this->MerchantID,
'PostData_' => $tradeInfo,
];
} | 1 |
0ff3cdc7e3cd5de74772e3a02f0bb3b6 | 1db007da292c1e7250382b59291af4b6 | Publishes message of type wheel_velocity_message to topic 'wheel_vel' | class CursesControl(object):
def publish_values(self):
self.pub.publish(self.vehicle_id, self.velocity, self.angle, self.gear_command) | 0 |
69917846fd3fcc5de1fa798a813f5afb | 7850b71e9dcc0f18e5eca65bdcec8cbe | перевод в обратную польскую запись | string intopre(string in)
{
stack<char> symbols;
stack<string> quantity;
for (int h = 0; h < in.length(); h++) {
if (in[h] == '(') {
symbols.push(in[h]);
}
else if (in[h] == ')') {
while (!symbols.empty() && symbols.top() != '(') {
strin... | 0 |
361ceefbba16e6527fd882d9552a64d9 | 90c9d7696b38eb0379ccefb30c2a47f7 | 设置任务之后, 通知run方法, 开始执行这个任务 | void start(Task task); | 1 |
d236de1b4c97d0a595f1b77e1e891b7f | d395dad411af549adb76b8a5aea8f416 | Class to hold ice optical property data. | self.name = name
self.formula = formula
self.number = number
self.MW = MW
self.temps = []
self.Kow = {}
self.density = {}
self.Ref = {}
self.Dw = {}
self.Koc = {}
self.Kd... | 0 |
5946c89b07db7db41cf58d55d712c3a8 | 41149071a0dc890d4e61a9503d6e1ae9 | Builds an augmented data object to be passed when a template calls another,
and needs to pass both original data and additional params. The returned
object will contain both the original data and the additional params. If the
same key appears in both, then the value from the additional params will be
visible, while the... | result = original.copy()
if not override:
return result
for k, v in override.items():
if v is None:
if k in result:
del result[k]
else:
result[str(k)] = str(v) % original
return result | 1 |
190eac561776d945976174e816e287b1 | 363767d7b6896015e6e641775cecff54 | Allocation of an interval which value is [-oo,+oo] | start = allocate_and_fill(n, value);
finish = start + n;
end_of_storage = finish;
} | 0 |
d3a71317b4d4b9ed181cca63b0a20228 | 469958a5e95cca6f02a69caaa89bf8e7 | Sets the tags of all queried game objects. | System.Runtime.InteropServices.In] rec_tag[] ptags,
int ntags, System.IntPtr lparam)
{
int i;
for (i = 0; i < ntags; i++)
{
_objs.Add(ptags[i]);
}
return true;
} | 0 |
46c7853b3974ff61d5aa8a9cce774ac7 | 29c97ce75f6b450c44b6390f45bcaca8 | convert number represented in base to decimal | uint64 convertToDecimalBase(uint64 origBase, uint64 numToConvert)
{
int j;
uint64 result = 0, currentDigit;
for(j = 0; numToConvert > 0; j++)
{
currentDigit = (numToConvert % 10);
if(currentDigit < origBase)
{
result += currentDigit * power(origBase, j);
... | 1 |
7b6890b055777b6eb7a356ddb911c0dd | c02f3c0aae5a0ada443a61d082166bce | 从类型的全名中获取类型名称(不包括命名空间) | export class ModelProvider
static getTypeName(fullTypeName: string) {
if(ModelProvider.isFullTypeName(fullTypeName)) {
return fullTypeName.split("#")[1];
}
return fullTypeName;
} | 1 |
b9cb79fe45c8917817515510e53501a1 | 35bb22a4f96d53fd64e541643a6071d2 | Removes any leading whitespace on a string | if(str[0] == 0) return 0;
int lStart = 0;
int lEnd = GString()->Size(str) - 1;
while(isspace(str[lStart]) != 0 && lStart < lEnd) lStart++;
while(isspace(str[lEnd]) != 0 && lEnd > lStart) lEnd--;
if(lStart == lEnd) {if(isspace(str[lStart]) != 0) {return 0;}}
lEnd += 1;
int lLength = lEnd ... | 1 |
c382ed4f568378452c94205d28618c98 | 72baf00a6cc1aed50b23a0ec7673b3f8 | Get all specified methods from the given object, using the specified binding constraints. <br />
从对象中获取所有指定可访问性的方法信息 | namespace Mstm.Common.Reflection
public class ReflectionUtil
public static MethodInfo[] GetMethods(Type type, BindingFlags bindingAttr)
{
return type.GetMethods(bindingAttr);
} | 1 |
88d0b13e2dc39be447f61cd033a7f094 | 6d4a0220f9850b47c2e764ee53e468a6 | Given a player's name, find the position of the player in the PlayerList (there is only one PlayerList). | {
for (int i = 1; i < players.Length; i++)
{
if (players[i] != null)
if (players[i].Name == name) return i;
}
return -1;
} | 1 |
fa5e8d20cfcb9fae57737aab9957b3cd | 366964b83cfbae236dfee9b0742316a0 | 保存关卡(第一种方法: 字符串写入文本) | x = x or '1'
o = o or '0'
if GameMgr.scene and GameMgr.scene.map then
local layer = GameMgr.scene.map[layerName]
if not layer then return end
local layerSize = layer:getLayerSize()
local all = {}
for j = 0, layerSize.height - 1 do
local col = {}
... | 1 |
e9f338422e6cb7ac1ecd6827b627eb00 | a5feb83d6665589c6d7f9a7571e06411 | 修改申请表单的担保公司,修改申请表单的状态为'总行审核通过' | class member extends userBase
public function setok(){
$member_id = $this->session->userdata('member_id');
$form_id = $this->session->userdata('form_id');
if($this->input->post('dopost')){
$this->load->model('message_model');
$this->load->model('sms_model');
$post = $this->security->xss_clean($this->inpu... | 1 |
eba9d4ec18c817663d57ccd2ce98c60a | 4b3b40e3bdfbe2f4fec533bf13bb308a | Prune backupsets to only those in the specified range. | VPackBuilder State::slices(index_t start, index_t end) const {
VPackBuilder slices;
slices.openArray();
std::unique_lock mutexLocker{_logLock};
if (!_log.empty()) {
if (start < _log.front().index) {
start = _log.front().index;
}
if (start > _log.back().index) {
slices.close();
... | 1 |
fd8e1c4f7f3a047d3aab4d9cfc9b2cd5 | 3dcd6952bc52f0cba79dce918998c857 | Set the rendered width and height of this text.
Inspired by https: //stackoverflow.com/questions/33777577/javascript-get-actual-rendered-font-height | if(this.__size) return this.__size;
this.style.font = this.style.fontSize + 'px ' + this.style.fontFamily;
this.context.save();
this.setStyle();
this.__size = this.context.measureText?
this.context.measureText(this.text):
{width:15};
this.context.restore();
this.__size.height = this.style.fo... | 1 |
fb8df2a443395e1915058ff5c3337111 | 99a025b0e9bfc9ca973cb11a262b8815 | 如果假设传入的值为True,那么就会执行后面测试,否则直接停止执行 | class TestLoginCase(object): #测试类用test开头,并且不能带有init方法
# def __init__(self): 不能定义Init方法
def test02(self):
print('test02d')
assert 1 == 1 | 0 |
a2e62bf4324616fd0263858db9a62157 | ff08a0d9fb794617768ae707e7e942dc | Direct user to ORCID registration prompt before submitting MS | uc = appContext.create_user_context(
result_uri=request.url,
host=app.config['LMS_HOST'],
encrypt_requests=app.config['ENCRYPT_REQUESTS'])
session['userContext'] = uc.get_context_properties()
userData = get_user_data(uc)
session['firstName'] = userData['FirstName']
session['... | 0 |
345b1aaf1e71a423828dbc7144245626 | 5a01a931fc86d591aabe7da5f6f1647f | Initializes new instance of UpdateSignaturesRequest. | {
$this
->setContextIdentifier($contextIdentifier)
->setId($id)
->setAuthToken($authToken)
->setResendLastEmail($resendLastEmail)
->setResendLastSms($resendLastSms)
->setUpdatedSignatoryInfo($updatedSignatoryInfo)
->setSigna... | 0 |
21eb9e10001cc3297e03a7fc138d51ab | 3243b7fa6cfb6191d7640cb235a72c7a | Returns the seller name of this buy sell products. | @JsonIgnoreProperties(ignoreUnknown = true)
public class Products
public String getSoldBy() {
return soldBy;
} | 1 |
39f460e66011e3154dcf0f2f7da99177 | 3305f4154815baeffccb02107b778078 | Initializes the SNI client. | connection::enable_sni()
{
if (connection_mode::client == m_mode)
throw snf::ssl::exception("handling SNI requests can only be enabled in server mode");
std::lock_guard<std::mutex> guard(m_lock);
for (auto &c : m_contexts)
c.ctx.set_sni_callback(reinterpret_cast<void (*)(void)>(sni_cb), reinterpret_cast<void *>(... | 0 |
5c299644d0d914dbfc8fc21302f79939 | d0df2cfd0933983d58ea0c0ec33cc9cf | Test if code == 0 for successful API call. | class FapiKeywords(object):
def fapi_status_should_be_succeed(self):
dataObj = self.toObj.json_to_object(self.fapiResponse.content)
assert self.status.status_code(dataObj) == 0 | 1 |
cfaf0d92d4df701015ac24dcab81f365 | 87d97f1782bcae16c2d754fb49c41534 | Sets the viseme to morph target. | namespace Omochaya
public class VisemeCommand : MonoBehaviour
public void InitWords()
{
SetWords(null);
} | 0 |
ddc4c90d80399bc41945c25e8f7eb117 | 3406ce58d4285fca0e54b74fab8ae3ae | <p>
Gets information about a workflow run task.
</p>
Asynchronous callback handler for events in the lifecycle of the request. Users can provide an
implementation of the callback methods in this interface to receive notification of successful or
unsuccessful completion of the operation.
Documentation</a> | java.util.concurrent.Future<GetWorkflowResult> getWorkflowAsync(GetWorkflowRequest getWorkflowRequest,
com.amazonaws.handlers.AsyncHandler<GetWorkflowRequest, GetWorkflowResult> asyncHandler); | 1 |
19ca7f46b769fd6409a44949e7016d97 | d52f876ab2163e4286ac92580f7a4d69 | Load QR Code asynchronously and with a fade in animation | {
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;)";
request.AllowAutoRedirect = true;
string ret;
Bitmap bmp = null;
using (HttpWebRespo... | 0 |
da00e9be6bba1f8b591912f3b925ce19 | 798972a1f1bd5f16bbd4f829f30411d7 | 获取所属教室ID | class WindidSchoolDm extends WindidBaseDm
public function getSchoolid() {
return $this->schoolid;
} | 0 |
c23e6cd3de7b34ec9efe16a642e451bb | d13aed7179d24ce1d6c99920a4c7d3aa | Gets the confirmation details for the specified subscription.
Transactions Per Minute (TPM) per-tenancy limit for this operation: 60. | export class API
txConfirmationSubscribe(opts: any): Promise<any> {
const url = '/v1/txconfirmations/';
return this._doPostRequest(url, opts);
} | 0 |
873cee8d4f4ac990ca747cd359c7d4a0 | 0af9434095dc3e7c2e64da255845aa8d | textがモニターの外に出ていく動き | function touchStatEvent(e) {
e.preventDefault();
moai.style.position = "absolute";
document.getElementById("text").innerHTML = "え、";
moai.addEventListener(EVENTNAME_TOUCHMOVE, touchMoveEvent);
} | 0 |
a40d5d1a529537cf9880f7dee5f5a77c | 0dee473e0149bc6e53499c51653bc15c | Convert Bytes to MiB | def bytes_to_mb(val: int) -> float:
return val * 0.000001 | 0 |
19bab5c01e873ab0db80529e3fcadf56 | 4deafaa33b0c8e1c111c1c4edecf7df8 | zipファイルをアップロードする | class Manager_RecapController extends ManagerBaseController
public function zipuploadAction() {
$this->view->subtitle = "アイテム一括登録";
$form = $this->view->form;
if ($this->getRequest()->isPost()) {
if ($this->getRequest()->getParam('upload') ){
if (empty($_POST) || $_FI... | 1 |
b365e97669acd7e4a1a52831594dc6e4 | d8047c500a1a6192398f002d262abdb1 | This is a do nothing routine.
The routine that used to be here did not work for Swift. | void ___junk_function_ui_swp_p_pp_api(void){
} | 1 |
82558b218b785a058dc1e9e87c70a639 | ebd52151d386198888b5fecd4196c443 | バイナリからVector2読み込み | float x = BitConverter.ToSingle(bytes, start);
float y = BitConverter.ToSingle(bytes, start + 4);
return new Vector2(x, y);
} | 1 |
1e1f8fad35cba18c08b78f703b32382b | 9e22f08186e7a58ee3f2f2a341f8babd | Signed less than | namespace Lens.Compiler
internal static class EmitterExtensions
public static void EmitCompareLess(this ILGenerator gen, bool signed = true)
{
gen.Emit(signed ? OpCodes.Clt : OpCodes.Clt_Un);
} | 1 |
e9185f1482f9aa148536c4d4ce9c67ca | f2eac806abc7acf3d553e125f87b70c2 | Unloads texture without fully disposing. It may be able to be restored by calling ReloadIfPossible | {
if (_Texture != null) {
_Texture.DecRef();
_Texture = null;
}
} | 1 |
6be45100648a218e5d13346546f33c7e | 540c34cd740444e0e6b28ea45c6bfe22 | Allocates a block of memory from the slice allocator.
The block adress handed out can be expected to be aligned
to at least 1 * sizeof (void*),
though in general slices are 2 * sizeof (void*) bytes aligned,
if a malloc() fallback implementation is used instead,
the alignment may be reduced in a libc dependent fashion.
... | public class JEmalloc
public static void je_sdallocx(@NativeType("void *") PointerBuffer ptr, int flags) {
nje_sdallocx(memAddress(ptr), Integer.toUnsignedLong(ptr.remaining()) << POINTER_SHIFT, flags);
} | 0 |
cff94aac4fe3afa44fcf8d929cf1cb6d | 837cdb5b56d7edb6d28b4544396bc7ec | *******************************************************************************
NOMBRE DE LA FUNCIÓN: Cmb_Requerido_Validating
DESCRIPCIÓN : Valida que el combo box sea seleccionado un elemento
PARAMENTROS :
CREO : Luis Alberto Salas Garcia
FECHA_CREO : 01/Mar/2013
MODIFICO :
FECHA_MODIFICO:
CAUSA_MODIF... | namespace MyCTS.Presentation.Reservations.Availability.InterJet.Handlers
public class InterJetPassangerDateOfBirthUserControlHandler : InterJetUserControlHandler
private void ValidateSelection(ComboBox theComboToValidate, string theField)
{
if (theComboToValidate.SelectedItem == null)
... | 1 |
9e7e5e6be018d2392435ae1fba047abd | fe152af8ad997c84b20fc1de11da5b3f | Gets the currently configured {@link TypeConverter} for the given context - if any. | public final class BeanContext<T>
public ValueConverter getValueConverter() {
return this.valueConverter;
} | 0 |
bc9d0bb298088723328616ce36500c56 | d9fc77808900174732e6ff2f411fff8f | Creates an edge object for each unique pair of vertices in this model that share a triangle | mesh_01_iter = om.MItMeshPolygon( mesh_01 )
mesh_01_triangles = list()
mesh_01_triangle_bboxes = list()
numTriangles_mesh_01 = 0
while not mesh_01_iter.isDone():
if mesh_01_iter.hasValidTriangulation():
numTrianglesUtil = om.MScriptUtil()
numTriangles = numTriangl... | 1 |
00ec17084bea68ab98f8a379bfa6bb5b | 35a46182ec9812674bba2162f20c7820 | Get the IF frequency of the SSB
Input:
None
Output:
IFfreq [GHz] | tmbslTDA10024GetIF
(
tmUnitSelect_t tUnit,
UInt32 *puIF
)
{
ptmTDA10024Object_t pObj = Null;
tmErrorCode_t err = TDA10024_ERR_NOT_INITIALIZED;
err = TDA10024GetInstance(tUnit, &pObj);
tmDBGPRINTEx(DEBUGLVL_VERBOSE, "tmbslTDA10024GetIF(0x%08X)", tUnit);
if (err == TM_OK)
... | 0 |
53526e204c60bf1af869db048d617e46 | 3ff1fb2eeb5c18e59e806095d87c18f5 | Create a count cache table with dbDelta functionality. | {
if (qa_should_update_counts()) {
qa_db_query_sub(
"INSERT INTO ^options (title, content) " .
"SELECT 'cache_qcount', COUNT(*) FROM ^posts " .
"WHERE type = 'Q' " .
"ON DUPLICATE KEY UPDATE content = VALUES(content)"
);
}
} | 0 |
eb4a88d4fc8d734c795f06816fc7dea3 | f197628e9f5eaed6cf479c381e45937e | Returns a circle's area given by radius | if radius <= 0:
return 0
area = ((2 * radius ** 2) ** 2) ** 0.5
return area | 0 |
1a7462dac34311b5676210ce0d59b58c | f2d212b6520b3d669059e79eeff3e5af | Populates all ministries. | class MinistryController extends Controller
public function create()
{
$data['ministries'] = Ministry::all();
return view('admin.ministry.create-ministry', $data);
} | 1 |
4ecb137c1b1a75cb337c546e62ae750c | 588728deec94a115c29617fcca90e1f9 | 对一个概览页完成遍历处理之后的事件.可告知当前采集计划的进度总量信息(对于组合遍历时可大致告知总体进度) | long current = copiedEvents + copiedEventTombstones;
if (null != progress) {
progress.setContextProgress(current, totalEventsToCopy);
}
long currentTimeMillis = System.currentTimeMillis();
if (0 < lastLogTime && currentTimeMillis - lastLogTime > TimeUnit.SECONDS.toMil... | 1 |
7866497af68a4c3b926c49d66d68a72a | 29a416bf0c5a87f5ea3fb9e8f9c7a55b | Кватернионное умножение | quaternion multiply(quaternion multiplier)
{
quaternion result;
result.w = w * multiplier.w - x * multiplier.x - y * multiplier.y - z * multiplier.z;
result.x = w * multiplier.x + x * multiplier.w + y * multiplier.z - z * multiplier.y;
result.y = w * multiplier.y - x * multiplier.z ... | 1 |
b350ffe95c73ae4c2000d24cae81ec1c | ba1d2cdc7a24696ef22b2c1292bae228 | Create a bitmask from multiple flags. | impl Options
pub fn bitflags(self) -> Int {
self.into()
} | 0 |
45e34e82cb1c8efef1245e8631a59719 | 152f085025857a94f0b10c823472f530 | 获取进程的内存块区域 | namespace hibProcesses
public class RegionsMgr : hibClass
public IntPtr AllocateMemory()
{
return AllocateMemory((UIntPtr)0x1000);
} | 0 |
f8e6caa4f2f6ef89637837fab125a911 | 496064796880ce5cf6cc8ea79bc77cd9 | Removes all but the selected PDFs from the list. | function bibrefbrowser_removeReference(widget_id)
{
list=document.getElementById(widget_id)
for (var x=list.length-1; x >= 0; x--) {
if (list[x].selected) {
list[x]=null;
}
}
for (var x=0; x < list.length; x++) {
list[x].selected='selected';
}
} | 0 |
09c5aa9153340294132a78a6fc299007 | b4300d152b26c9a83db1e5f852dff94a | 清除数据,释放指针 | void RawData::clear() {
if( NULL != m_byData) {
delete[] m_byData;
m_byData = 0;
}
m_nSize = 0;
m_nPos = 0;
m_hSock = NULL;
} | 1 |
2cd9eb5a46b6e64958d6b7d8b172a664 | 5bfcc206c283e4767493b65e7642d09f | Checks whether the session has changed. | public abstract class AMQSession<C extends BasicMessageConsumer, P extends BasicMessageProducer> extends Closeable implements Session, QueueSession, TopicSession
public boolean isDirty()
{
return _dirty;
} | 1 |
428b62594cd6dfc27e0549ee3bc39832 | 7cd73947c41a8aed4a4078d58532e39e | 最近七日支付订单 | List<QtOrders> getGtSevenDayOrders(); | 1 |
9670ea5c9690c8326cb2c5daf3ea6a82 | 96b3c1edd534d6d25f89d49cbc5873ee | Вычисление углов по матрице поворота | {
if(-1 + 0.000001f <= m_Matrix[2][1] && m_Matrix[2][1] <= 1 - 0.000001f)
{
xDegrees = radiansToDegrees(asinf(-m_Matrix[2][1]));
yDegrees = radiansToDegrees(atan2f(m_Matrix[2][0], m_Matrix[2][2]));
zDegrees = radiansToDegrees(atan2f(m_Matrix[0][1], m_Matrix[1][1]));
}
else if(1 -... | 1 |
ce150beddcbdba8e49b59e8af411c9a6 | 107a049e88ea5aded2d800631af14bf8 | 기존에 값이 없는 것만 넣는다. | @Service
public class MaintenanceInfo
public List<InfoDto> createForInsert(List<InfoDto> beforeDto, List<InfoDto> revDto) {
List<InfoDto> insrtList = new ArrayList<InfoDto>();
for(InfoDto dto : revDto) {
int insertCount = indexOfGrupCode(dto.getVGRUPCODE(), beforeDto);
if(insert... | 1 |
2e7c6f2f928fcc7eb01bf7a27ea700a7 | 371f521ea3947f5b5ae3f90f4fb9fbad | The number of local songs in the list. | public class LocalActivity extends Activity
private int getSonglistCount() {
return LocalMusicManager.getInstence().countSongList();
} | 1 |
076568d6ee5d1af2316185cd9024b032 | aa236d41ed4599d759823b63b70e0425 | 设置刻度短步长 | class QTrackBar(QWidget):
def setShortStep(self, step):
if self.shortStep != step:
self.shortStep = step
self.update() | 1 |
fc0daed86ea84fd1f0033b1e79034da7 | f7a6f3ba67ce3d0578b449481ab2dc9b | Increases or decreases the recording menu value | {
isRecording = recording;
setFilePathButton.Enabled = !recording;
recordTextBox.Enabled = !recording;
plusButton.Enabled = !recording;
minusButton.Enabled = !recording;
} | 0 |
e2fa4eb0278e4178782150620ce4ad20 | 427d95f33e5bfe58319d7a338abc5076 | Set the absolute location of the Actor on the Map. | public void setLocation( int x, int y ); | 1 |
493da23c1608e30b34edd048914a9418 | 1c161bd0574cc646738eb49c44d4d285 | 蚂蚁金服笔试题:通过反射调用对象某个方法,包括私有方法 | Class<?> clazz = MethodCallee.class;
Method method = clazz.getDeclaredMethod("packagePrivateMethod", String.class);
method.setAccessible(true);
Object result = method.invoke(clazz.newInstance(), "Invoke");
System.out.println(result);
} | 1 |
1566d09aa1df4c90f783b364f7be894a | 14a9d83eb33ce55c9243dc6e0e269a8e | This function sends the shopping list to the user.
Right now, it only shows a message box, but could be improved with an email or other. | export class RecipeDetailComponent implements OnInit, AfterViewInit
onSendToShoppingList() {
this.cloudFirestoreService.customAddElementsCheckingIfExists(
this.recipe.ingredients,
this.cloudFirestoreShoppinglistPath,
'ingredientName',
States.Recipes,
a... | 0 |
1e6c8694c746046c0ff36e36937d11b7 | ac617690d87c7a87d7bb2abac2bffe67 | Toggles the current state of a GPIO. | {
uint32_t newValue;
int port = pinNumber >> 4, bit = 1 << (pinNumber & 0x0F);
if (pinStateStore[port] & bit)
{
pinStateStore[port] &= ~bit;
newValue = 0;
}
else
{
pinStateStore[port] |= bit;
newValue = 1;
}
gpio_set_level((gpio_num_t)pinNumber, newVal... | 1 |
8bd2423ef75d8ac21c1d8e01e497787e | c4648616f00763dc71894933a5c50291 | Test adding and retracting an item. | class LabelStoreTest(unittest.TestCase):
def test_add(self):
store = LabelStore()
store.add('laBel1')
self.assertItemsEqual(['laBel1'], store)
self.assertItemsEqual(['laBel1'], store.added)
self.assertItemsEqual([], store.removed)
store.add('label2')
self.assertItemsEqual(['laBel1', 'label2'... | 0 |
da9eda9f3a5a004d924489f1e4ff1a9b | 9b6d5e70f7ab8e32f0c8fa607001c899 | update the next object to be picked | namespace SonicRealms.UI
[ExecuteInEditMode]
public class LinearItemPicker : MonoBehaviour
public void UpdateSelectedObject()
{
GameObject newSelectedObject;
if (Items.Count == 0)
newSelectedObject = null;
else if (ScrollTarget != null)
... | 1 |
1e6719540a5a0a4704663a39e0545ec2 | 121cdc472126c27f6c2870369cb139d5 | 当前step追加log | logger.debug("format_stepinfo :: (#{tests[id][:desc]}) (#{test_str})")
tests[id][:log_desc] = tests[id][:desc] if tests[id][:log_desc].nil?
tests[id][:log_desc] + sprintf(' :: %-12s', test_str)
end | 1 |
d6700e3ce50669b47c39a04123f47904 | f7112e224f592a1de7a8e84409a1030b | New - returns initialized server | func New() *Server {
return &Server{
router: chi.NewRouter(),
}
} | 1 |
1e3cf1b4bffdaffe14a5954ef3c700ac | d7727beee2435f85abef97232e627ed8 | Cut path into two pieces by point in between nodes | void BoostSplit::splitPolygon(
const cline& ln,
U4 pos1, U4 pos2,
const line_2d& sp,
cline* tmp,
vector<cline>* v1,
vector<cline>* v2,
bool clock
){
for ( U4 iPos = pos1 ; iPos < pos2 ; iPos++ ){
line_2d line2;
line2.push_back( ln[iPos-1] );
line2.push_back( ln[iPos] );
vector<point_2d> vPt;
... | 1 |
8fedbb878f4454e4096b20646c068556 | 7ec58f1257f85367d92d03c3e781d9e0 | returns the count of digits of n | int num_of_digits(int n) {
} | 1 |
e243193484a7d54844d2a4bf3724fa3d | b08ee07c786817eecab340399bf0c323 | 根据物资编号查询调拨/领用信息 | @ResponseBody
public GongxiaoResult selectItemByAllocateNo(String projectId, String allocateNo, HttpServletRequest request){
String traceId = null;
GongxiaoResult gongxiaoResult = new GongxiaoResult();
try {
traceId = YhPortalTraceIdGenerator.genTraceId(portalUserInfo.getUser... | 1 |
866024efbe1a71a063607b6eef7665bd | f0f6ebfdc23b05cb202074a720be9662 | Returns names of the 'category_bits' bits. | if category is None:
return []
labelList = []
labelNum = 0
while category > 0:
if category % 2 == 1:
labelList.append(self.saved_categories[labelNum])
labelNum += 1
category = category >> 1
return labelList | 1 |
4f2f81089fda933c6f053ef26dec82d7 | 24ad1125e2f8c817683d90d536c47c53 | 1、获取所有学校,让学生选择 | @Controller
public class IndexController
@RequestMapping("/join")
public String join(Model model){
List<School> list = schoolService.schoolList();
model.addAttribute("schoolList",list);
return "join";
} | 1 |
c048989d1853e3b1b65f7b68876444c9 | dc561d937c8b6d68c3a1f419d152e0f3 | When called the <img> will become a picture of a dog | class AdoptPage extends React.Component
adoptDog(){
var dogObj = this.state.dog;
dogObj.adopted = true;
this.setState({dog:dogObj});
} | 0 |
ddbfe657845932d02b8b81fec6d3f0a4 | 2a73ec266593e63f6c7cd566e426ca0b | Retorna o array de pedidos e clientes. | class Api_Customers_Controller extends Base_Controller
public function post_get_customer(){
return Response::json(Customers::get_info_and_orders());
} | 1 |
072a1d9c6276e8a2c985ddd96aeb7d9c | c4a25531d5c23eabe6f2ce30d931f56e | Adds a line to the fragment shader code which modifies the color by
the specified color filter. | {
output.WriteLine("color.rgb = dot(color.rgb, float3({0}, {1}, {2}));",
_redRatio.FullName,
_greenRatio.FullName,
_blueRatio.FullName);
} | 1 |
7a32c171fb8ceab806d97688f4eeeb6d | 04f21d161fec00687310738d9dc700f0 | Gets the validator with the specified node identifier. | class ValidatorImpl extends IdentifiableDescriptionGroupImpl implements
FacesValidator
public String getValidatorId() {
String validatorId = getChildElementText(JSFConfigQNames.VALIDATOR_ID.getQName(getNamespaceURI()));
return ElementTypeHelper.pickString(validatorId);
} | 0 |
78c6887ff3811834e99e6aae5b8bcd5f | 4b607e680630364d0d3e30f3d57aa236 | Convert forward propagating detection vector into a backward propagating (time-reversed) source vector. | class RealNVP(nn.Module):
def backward_p(self, x):
log_det_jacob, z = x.new_zeros(x.shape[0]), x
for i in reversed(range(len(self.t))):
z_ = self.mask[i] * z
s = self.s[i](z_) * (1 - self.mask[i])
t = self.t[i](z_) * (1 - self.mask[i])
z = (1 - self.ma... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.