query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
551a0b15c69f2b3145ff5b4c635a0eb9 | 68eba23bdfc5ea5f2e84c9bce100054e | Send event when com-log screen opened. | function onOpen(evt) {
output.innerHTML = "";
writeToScreen("CONNECTED TO CS4");
var logweb = document.getElementById('websocketlog')
logweb.style.backgroundColor = '#ececec';
} | 0 |
f96227886a83fa2d8b39c4fd35ba6de4 | 1ba76804c58d02b29d04106078989a9f | perform administrator login based on magnetic swipe card | Connection connection = null;
boolean loggedIn = false;
PreparedStatement pst = null;
try {
connection = ConnectionUtil.getConnection();
String sql = "SELECT (mobilenumber,password) FROM admin_details WHERE mobilenumber=? AND password=?";
pst = connection.prepareStatement(sql);
pst.setLong(1, mobile... | 0 |
4f5f77d749b5541d8edd9a735c06db57 | b616b6e2e2553f5cac3e5839a858f274 | Ouput the last 50 links in RSS 2.0 format. | categories = self._get_categories_list()
display_name = self._get_display_name()
links = self._create_links_and_track(display_name, categories)
self.add_rst("\n" + links)
return [] | 0 |
40e1963cf8ba7edfdd09dfedd98311de | 1bcaf57a6eca7ca0cdfd4c771b14df3d | show/hide group internship custom controls | var count = 0;
for(var item in currentGroups) {
count++;
break;
}
if (count>0) {
jQuery("#accordion1").hide();
jQuery("#shippingRateSetting").hide();
jQuery("button#editGroupBtn").hide();
jQuery("button#addGroupBtn").hide();
jQuery("button#customBtn").show();
jQuery("#addCustomShippingGroupDiv").sho... | 1 |
fa526da148fe03419fc68fc97620ab89 | 3f9b1c040c3972eedf9ef65ebed94596 | Возвращает скрипт, который обслуживает кнопку выбора темы приложения. | {
if (empty(Auth::user())) {
$text = sprintf('%s' . PHP_EOL, 'Вы ещё не вошли в аккаунт');
$this->replyWithMessage(compact('text'));
return 'ok';
}
$this->replyWithMessage([
'text' => __('Select theme'),
'parse_mode' => 'Markdown',
... | 1 |
2eb8e4c74d1333fdbedb69939a01d45b | 072504ced40c58f876664fc9b323b222 | Injects CLR dialog CustomDialog between MSI dialogs LicenseAgreementDlg and InstallDirDlg.
Passes custom action ShowProductActivationDialog for instantiating and popping up the CLR dialog. | UINT __stdcall MyDeferredCustomAction(MSIHANDLE hInstall)
{
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, "MyDeferredCustomAction");
ExitOnFailure(hr, "Failed to initialize");
WcaLog(LOGMSG_STANDARD, "Initialized.");
LPWSTR customActionData = NULL;
hr = WcaGetProperty(L"CustomAc... | 0 |
57f8a01ceac65e90bf3c1e26aedf59be | 383d80d461dfd086f1e79f758282f580 | its not adding to the original, it is making a new local variable in the method | public class MethodsExample
void add(){
System.out.println(i);
System.out.println(j);
} | 0 |
b7e3ef28b38117051c49b041c0e19d8b | ce0f1e0da26acb0d73fab4ede0c8429c | Dispose the background Bitmaps | class Spriteset_Battle
def dispose_battleback_bitmap
@battleback_sprite.bitmap.dispose
end | 1 |
9929e74ee9dbec490ac8bdc32aec243f | eae9727299837c83ca4916d3e84ed372 | (INTERNAL) Yield all points in reverse order. | {
for (long i = this.end - 1; i >= this.start; i--)
{
yield return this.innerCollection[i];
}
} | 1 |
c8d7609935ed4eac743df2c4b826f2ad | 28c2e8d5a45f9b90f95c980ff09d1190 | Test that creating an AccessToken entity with a negative id fails. | class AccessTokenTest extends AbstractEntityTest
public function testCreatingAccessTokenWithNegativeIdFails(): void
{
$this->expectException(\InvalidArgumentException::class);
$attributes = [
'id' => -1,
'user_id' => $this->faker->numberBetween(),
'toke... | 1 |
e84a108f9dd60b66e3065f978a5b2770 | ad185356e23ca64f95a876beaf27b271 | Removes element after the one with the given value | void list_remove(struct node* ptr, int val)
{
struct node *tmp;
if (ptr == NULL) return;
while(ptr->next != NULL){
if (ptr->next->val == val){
tmp = ptr->next->next;
free(ptr->next);
ptr->next = tmp;
} else {
ptr = ptr->next;
}
}
... | 0 |
95b32934aa87aaebdd91187eaa85d295 | 3f0f42d1af520fcc3a1598da8c502da1 | Ensure the TaskFactory generate the correct visa task for trip2. | public void GetCurrentTask_2TurnWaiting_ContinueBypassAfterWaiting()
{
const int doudleIdleDuration = 2;
_factActorNode = _map.Nodes.OfType<HexNode>().SelectBy(1, 1);
_map.HoldNode(_factActorNode, _actor);
var expectedActorPositions = new IMapNode[] {
... | 0 |
04cddf23afd193cfd08b6a7ae05fd812 | 5313ddfda81672142b8373bd15ea6948 | Read in multiple blocks into a dynamically allocated array | static int usbmast_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, void *buf,
size_t size)
{
usbmast_fun_t *mfun = bd_srv_usbmast(bd);
if (size < cnt * mfun->block_size)
return EINVAL;
return usbmast_read(mfun, ba, cnt, buf);
} | 0 |
b333a003b6353e5a72aab3b266d7d4af | 12d7f842b14a25d6a0d632c74ab2dc58 | Add icons and context menus to the system"s notification area. | namespace OpenIDE.CodeEngine
class TrayForm : Form
private void setupTray()
{
trayMenu = new ContextMenu();
trayMenu.MenuItems.Add("Exit", OnExit);
trayIcon = new NotifyIcon();
trayIcon.Text = "MyTrayApp";
trayIcon.Icon = new Icon(SystemIcons.Application, 4... | 1 |
043ef0be64e1e1948d7cb3df43b47249 | eefd43c5973481730814f87be163581e | 监测接收图片数据线程状态 | global rawDataQueue
isBlink = 0
BlinkLength = len(self.blinkTrainData)
while True:
self.rawData.append(rawDataQueue.get())
if len(self.rawData) > BlinkLength:
self.rawData.pop(0)
if len(self.rawData) == BlinkLength:
... | 0 |
75a01c75cfaf9c6b90a0633d0def91c6 | 5e5fa66931f5dcf3b33a2c2bfa330bed | 计算硬件加速的限制 | public class WebActivity extends BaseActivity implements View.OnClickListener
private void initHardwareAccelerate() {
try {
if (Integer.parseInt(Build.VERSION.SDK) >= 11) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARD... | 0 |
97f5e1c303a9547cd9292d1d5d50aee7 | 80c3706e773ec842d37f3b702106ff86 | parser.on_end_element { |name| ... } => nil
Set the callback proc for an element end event. | handlers[{ regexp: opt_name, type: :option_name }] = block
handlers[{ regexp: opt_value, type: :option_value }] = block if opt_value
end | 0 |
b513c4a8fde24d4e847ca42b84562dad | 51ceed82c29937b649dedc9ba9d2f735 | Handles the Click event of the img_btn_addPlanes control. | namespace Rentix
public partial class Race : Form
private void toolStripButton1_Click(object sender, EventArgs e)
{
timer1.Enabled = false;
AddPilot form = new AddPilot(CurrentRace, parent.admin);
if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
... | 0 |
6e776ca38f4b1be4c1320696117bcc46 | fa2cd9b88f54c9573e9ccb4df646b8ff | 将彩色像素数组映射到深度图像中 | HRESULT SkeletonTrack::MapColorToDepth(BYTE* colorFrame, USHORT* depthFrame)
{
HRESULT hr;
hr = sensor->NuiImageGetColorPixelCoordinateFrameFromDepthPixelFrameAtResolution(
colorResolution,
depthResolution,
dwidth*dheight,
depthFrame,
(dwidth*dheight)*2,
colorCoordinates);
if(FAILED(hr)) return hr;
r... | 1 |
61e477c5c60951d8156bd9b2796be86f | 4a136606c93080c3778a3fe97c5be5a5 | This part requires looping through the input multiple times to find the first time
the current frequency repeats. This cannot be easily multi-threaded, so the
implementation is just left simple with a set. | namespace AdventOfCode
public static class Day01
public static int Puzzle2(string input)
{
var frequencyChanges = Common.ParseIntArray(input);
int currentFrequency = 0;
var previousFrequencies = new HashSet<int>();
while (true)
{
fo... | 1 |
db54d0953fde82fcb05e099e2484cb80 | 5d66e138b2c57efa633f008e82e24927 | Function that makes the request to the server to get an investment | dft.getBuyNowInfo(Constants.InvestInfo_URL + Encrypted_id,
Request.Method.GET, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject jsonObject) {
InvestmentDetails = (InvestmentDetails) dft
.GetResponseObject(jsonObject,
InvestmentDetails.class);
... | 1 |
007521ace3ac2bad6243cdaea3a6a2a3 | 3a8c40061a420e99ae0d6e2ded9a142b | Updates the adjacent rows in the Side objects "touching" the
Side object that was rotated. | for (var block of this.tinyBlocks.values()) {
if (block.isCenter
&& !block.isAttachment
&& (block.hasInterior || block.rounded)
&& (!this.isTinyBlock(block.position.minus(block.horizontal.times(3))) || !this.isTinyBlock(block.position.minus(block.vertical.times(3))))) {
for (var a = -1; a <= 1; a++... | 0 |
74201c9ae33e4280fe44418c8ab194db | c1ac1e85e89864c4aba44fad9fef5297 | Swaps <c>this</c> with a given <see cref="TreeNode"/> | {
node.LeftChild = new TreeNode<T>(value) { LeftChild = node.LeftChild };
} | 0 |
644bc9e506f4e35fdc6878efe9c1dc28 | 03bf0eaca853996487484251bf17f651 | decrement number of hits the shield can take | namespace Battleship.Classes
class InternalBoard
public void decrementHitsCounter()
{
maxHits--;
} | 1 |
d160398212458775a0bf59ab0e03de46 | 48e670741a1dba4be2cf52ba163ee132 | Return a String in dotted-decimal notation. | return ((addr & 0xFF) + "." +
((addr >>>= 8) & 0xFF) + "." +
((addr >>>= 8) & 0xFF) + "." +
((addr >>>= 8) & 0xFF));
} | 1 |
c2274fea0fff303f55892c8e5a2d99d0 | 01483d8cbc653994b3d911b3f2119838 | We assume values are in terms of seconds | class ProgressReporter
int64_t estimateRemainingTime(double progress) const
{
int64_t timeSinceStart = GetTimeMillis() - m_timeStart;
double timeRemaining = 3600000.0;
if (progress > 0.0 && timeSinceStart > 0) {
timeRemaining = (100.0 - progress) / progress * timeSinceStart;
... | 0 |
98d18ac12679bc8d76c1da56543ba00c | e7440c4d53ef993b889a616c8026e4ef | The Agent has answered the call using the Answer button on the UI. Queue
this request for processing. | void answerCall(); | 1 |
959f6a09d9aa9b0d0efeeef0de370859 | a04dda306297063ad5b1cf4767af406b | NewGroupPolicyPresentationText instantiates a new groupPolicyPresentationText and sets the default values. | func CreateGroupPolicyPresentationTextBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewGroupPolicyPresentationTextBox(), nil
} | 0 |
b42af19863111d69d5579ef061063765 | b741a3c9ff22c55133f875e7c86516b4 | Ask the service for a list of connected trackers
Response handled in HandleTrackerListReponse() | namespace Ogama.Modules.Recording.SMIInterface
public abstract class SMITracker : Tracker
public abstract override bool Connect(); | 0 |
36c9a2a599cfb7be2655d9fee3d0e8ee | 088df9f07752a690289418e6a3656257 | 返回肿块的Y坐标 | int index2y(int index) {
return 400 - 171 * (index / 3);
} | 1 |
99a55fc675052faf899617f66bdac0ba | 8777ab87a5f1ec286c40bdd93d653d81 | Calculate the upper quartile of a dataset | name = self.name
values = self.values
up_iqr = np.nanpercentile(values, 75)
return round(up_iqr,2) | 1 |
d9fb1f165205f81927580a89de0fb1fc | 86b1c56c6c2e8bb40eb3364b58e2dbaf | 获取展位设置--过滤已占用展位 | class StudioPlanController extends Controller
public function loadHaveSeatShopList($sessionId=''){
getSession($sessionId);
$res = M('layout') -> alias('lt')
-> field('sp.id,sp.name')
-> join('__SHOP__ sp ON sp.id=lt.shop_id')
-> join('__PARTITION__ pn ON pn.layout_id=lt.id')
-> j... | 0 |
4a2b9212e7ee5cad7de28e7102afa955 | 707addd3dba8033c15f6c158f05002e4 | Returns the total number of times that the thread with given id ran so far. | vec *vecOfThread = _getVectorOfThread(ID);
if (ID != _runningThread && vecOfThread == nullptr) {
if (ID != MAIN_THREAD_ID)
return _badIDChecker(ID);
}
return _threads[ID]->getQuantums();
} | 0 |
785dfa80d34aff059737d3e150ab747d | 342eec2cbb2ffe813ab5bad3d490c87c | List of domains that access will secure. Only present for self_hosted, vnc, and ssh applications. Always includes the value set as `domain`. | class GetPolicyGroupsGroupResult(dict):
def domain_list(self) -> str:
return pulumi.get(self, "domain_list") | 1 |
d5564aaed282866de7bd9a769bfb86dc | d3cdfee61deab172419a166cd93a6740 | activate or read status of PI-Loop (if active or not) | IntBuffer status = allocateInt();
boolean on = CompressorJNI.getClosedLoopControl(COMPRESSOR, status);
HALUtil.checkStatus(status);
return on;
} | 1 |
496589db825b8ecbfd366484957ec674 | 3464059c65b0e96e0fb1a2cb98930589 | Manage the bulk departments | print("\n\n\n\nAdding Departments")
for i in dept_list:
try:
url = 'https://api.samanage.com/departments.json?name=' + i
r = requests.get(url, headers={'X-Samanage-Authorization': 'Bearer ' + api_token})
if len(r.json()) == 0:
url2 = 'https://api.saman... | 1 |
564ea25ef1b65964682193223552da50 | da16cad764758865cf5186d6bcd9d6de | Handler to manage keyboard interaction to move sensor tilt angle, end execution and
pull data. | namespace KinectShooter
public partial class MainWindow : Window
private void MainWindow_KeyUp(object sender, KeyEventArgs e)
{
if (this.controller.FoundSensor())
{
if (e.Key == Key.Up || e.Key == Key.Down)
{
System.Threading.Thread... | 1 |
6a275e9d4261786a192c7a2f01411840 | 567498cb20b2c9fda6f02f1bae593fb1 | Returns whether the specified <paramref name="type"/> has one or more attributes of type <typeparamref name="T"/>. | namespace Swan.Reflection
public class AttributeCache
public Dictionary<PropertyInfo, IEnumerable<object>> RetrieveFromType<T, TAttribute>(bool inherit = false)
=> RetrieveFromType<T>(typeof(TAttribute), inherit); | 0 |
8bd76284cddcdf6279a91586f8081e25 | 33e9540da68c8b05f1309d0c0a188dff | Configures device's host name. | public final class ConfigurationMode implements IConfigurationMode
@Override
public void setHostname(String hostname) {
device.setHostname(hostname);
} | 1 |
6dd0c9f077100a8bcd7ff529ab5d7278 | aac33e469c841cfedca3b5bd16b3df8a | Gets the Database's current sequence number at the time the View was generated for the results. | public long getSequenceNumber(); | 1 |
a6e49d01386875e06964336078c84d9d | 17b68750425483ed7b21f81f4857c6d6 | Busca uma configuração ao funcionário | $configuracoes = self::fetch();
$configuracoes['curriculo'] = array( 'preco' => $preco );
self::save( $configuracoes );
return $configuracoes;
} | 0 |
bc837198d8e5fdb1e585a068aa320a76 | 906914c60c4d48fadd152b2b5cd00eb0 | Create descriptor set per swapchain image | void VulkanWindow::_CreateDescriptorSets()
{
std::vector<VkDescriptorSetLayout> layouts(_swapChainImages.size(), _descriptorSetLayout);
VkDescriptorSetAllocateInfo descriptor_alloc_info = {};
descriptor_alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
descriptor_alloc_info.descriptorPool = _descri... | 1 |
8bc4837960aa5f652a498ea9eae71f70 | ac67c9d53bb45f136760216011580204 | Check to see if CertificateUploadDate property is set | namespace Amazon.APIGateway.Model
public partial class GetClientCertificateResponse : AmazonWebServiceResponse
internal bool IsSetCreatedDate()
{
return this._createdDate.HasValue;
} | 0 |
c6f73288cbfae945569733176339b97f | fd51cf7e0f29744ec3fc9b42bc58767c | Get's the CAS REST URL, throws an exception if it's not properly set. | namespace CasUtility
public static class CasManager
public static string GetCasValidateUrl(string serviceUrl, string ticket)
=> String.Format("{0}?service={1}&ticket={2}",
AppConfigHelper.CasValidateUrl,
serviceUrl,
ticket); | 0 |
56ac844b3c32d3e1433db47dbc8b8f65 | fa5dcce066a05f7484dfb41870065f01 | Ensure font is actually destroyed. | class PapyrApp:
def assert_font_not_created(self):
self._font_mock.assert_not_called() | 0 |
13a768696a7daecf124ac58fc78d4c5b | 54a7a6720389866ca44fb6b0c58b644e | Returns the meta object for the containment reference list '{@link it.disim.univaq.demo.webapplication.Entity#getProperties <em>Properties</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getEntity_Properties(); | 1 |
7ac0d08f476600039112fc750b172b22 | 8968dca229ccb6d5e10a20540dea5179 | Returns the fixed number of "extra inhabitants" (that is, bit
patterns that don't represent valid values of the type) in the type
representation. | java.math.BigInteger getCapacityExtra(); | 1 |
9791bce1a55c1a10033efde9b6997655 | 5b430c4a73fdd0d1d25eec508a256053 | Получить курс валюты за предыдущую дату по отношению к USD | function getExchange(cy){
return new Promise((resolve, reject)=>{
var d = Date.now();
if( DATA.exchange && DATA.exchange.USD && DATA.exchange.USD.date > (d-3*60*60*1000) ){
resolve(DATA.exchange.USD.Value);
}else{
fetch('https://www.cbr.ru/scripts/XML_daily.asp')
.then(response => response.arrayBuffer(... | 0 |
41a3fb10ad5738ac58e73b40fe41f70e | 9bfb0982d9e3720959c848efc69485ec | Action that takes place when a sound is heard by the mutant | function Hornsy() {
mySound.setVolume(0.1);
mySound.play();
} | 0 |
ee223c5b188250b9cc25ada10b2f436b | a9e9f8295b731e3e62dbdc17362730a1 | 如果有给返回地址,就去返回地址,如果没有,就到默认的 | jumpaddress() {
if (!this.data.address) {
return this.getaddress()
}
this.$route('/pages/SC/pages/address/address')
} | 1 |
81edab913e22c377bfe8c538f9681d16 | b8edaa8c163fefd457e932b33bd471d8 | Retourne le jeton associe a "faits symboliques". | public class PortailFin extends Case{
public String getTextureMotCle() {
return "portail_fin";
} | 0 |
cf3ced4ef542c4209be3cfa55933713c | 1b2153b96f965a7dfbf80ce011572ed1 | This function gets called when a channel is removed from the channels hash table. | class ServerCallback(Ice.Object):
def channelRemoved(self, state, current=None):
pass | 1 |
d1ee2972d007f9a9fde51d833c7b73c5 | f7594f1dd126b3ae2c07ce2d0ba2f2dd | Parse expression with repeated mixed unary negation and addition. | eval_unary_expr (FoExprContext *context)
{
gboolean negate = FALSE;
fo_expr_context_skip_blanks (context);
while (fo_expr_context_cur (context) == '-')
{
negate = !negate;
fo_expr_context_next (context);
fo_expr_context_skip_blanks (context);
}
eval_primary_expr (context);
RETURN_IF_... | 0 |
9452452ef329a28828a179c3d9b4650d | d870aa7834ff3f1ab2629edc5445694f | 透過讀取目前房間為何,計算目前所在的樓層 | namespace KCBLevel
public partial class KCBFloorForm : Form
public int detectFloor()
{
int floorNum = -1;
bool kcbWIFI = false;
kcbWIFI=scanSorroundingFloor();
int greatestSignalStrength = rF[1].signalStrength;
for (int i = 1; i < 7; i++)
... | 1 |
4dffc3bf058a8ccc785d8fba8edc3abf | 0c3a8522395cfb866cb826eab1e84ad3 | Reboots device into fastboot mode.
If forced is True, then the device is rebooted even if already in fastboot mode.
Returns:
True when all commands succeed, false otherwise.
Caveat:
This method may return True before the device is in fastboot mode. | def FastbootCommand(args):
return RunCommand([_SDK_FASTBOOT_TOOL] + args) | 0 |
f9d9df329434447a8e03c01e5c1101fa | 2dd0d809a139bcb270ffa74702668241 | 可以通过Unity按需启动单元测试 | {
#if UNIT_TEST
TestMain pTestMain = new TestMain();
pTestMain.run();
#endif
} | 1 |
c185f72e84c2d7f6c20b7f8b7dc7ad70 | 58a9e6d42dc45b00283869baf541dd01 | ストリームを使って任意のリモートファイルをダウンロードする | namespace SharpAdbClient
void Pull(string remotePath, Stream stream, IProgress<int> progress, CancellationToken cancellationToken); | 1 |
12d991818d6e76a6b1f3b64930548172 | 065d68d8c121c112d0eb58b8b4e93c0f | prueba que se pueda crear el abb y que luego se pueda eliminar el abb. | initNode(&node30,&node20,&node50,1);
initNode(&node20,&node15,NULL,-1);
initNode(&node50,&node40,&node60,-1);
initNode(&node40,NULL,&node45,1);
initNode(&node60,NULL,NULL,0);
initNode(&node15,NULL,NULL,0);
initNode(&node45,NULL,NULL,0);
Node *root = &node30;
avlRemo... | 0 |
eb3ec9cb051bf8e3e3270f6af1a8aa37 | 536f6784f4cbd77327a41b13ddbe10be | The createQuizzesTable method creates a table to store records about quizzes. | $sql = <<<SQL
CREATE TABLE IF NOT EXISTS $this->tablename (
token char(32) NOT NULL,
memberid int(11) NOT NULL,
assigntag varchar(30) NOT NULL,
quiztag varchar(30) NOT NULL,
created datetime NOT NULL,
state char(1) NOT NULL,
question int(11) NOT NULL,
`session` mediumtext NO... | 0 |
e999b08b90d0913f60339370af6bec7b | 993f90634d06c98af6b28bc2d07b73ad | Shouldn't be able to change is_archive bit without permission. | class ArcUpdateTest(FictionOutlineViewTestCase):
def test_object_permissions(self):
for user in [self.user2, self.user3]:
with self.login(username=user.username):
self.get(
"fiction_outlines:arc_update", outline=self.o1.pk, arc=self.arc1.pk
)
... | 0 |
926d7b9d92a2ffa7558610e37ac2b27c | e4a3887278f6414e4362d63e8be96f07 | 初始化活动到Redis | {
$data = [];
if (isset($model->model['p'])) {
$data['p'] = serialize($model->model['p']);
}
if (isset($model->model['g'])) {
$data['g'] = serialize($model->model['g']);
}
return $this->redis_handle->hMSet($this->key_name, $data);
} | 1 |
be149e922febb606dbe76dd166f1fc58 | b907a271362d95651086cec60656835a | Gets the file output filename field. | public class InvitationDialogView extends javax.swing.JDialog
public JTextField getFileOutputField() {
return this.fileOutputField;
} | 1 |
51779e86c29b4fe2276eeb05aef0b54b | 61137f211ec577ed75927a80ad04505f | 驗證 提交表單中 已有帳號時失敗 | namespace RoleBase.Controllers.Tests
[TestClass()]
public class AccountControllerTests
[TestMethod()]
public void RegistAccountTest1()
{
#region arrange (欄位驗證失敗)
var httpContext = FakeHttpContextManager.CreateHttpContextBase();
httpContext.Response.StatusCode ... | 0 |
b6fad50108ea58232f6af1ac28b559f6 | 1b5efcc53e0338158634765a727d3d9e | 根据指定字符在指定字符串截取
示例 "java.lang.Object"
"." | public class StrUtil
public static String cutString(String str, int length, String dot){
int strBLen = strlen(str,"GBK");
if( strBLen <= length ){
return str;
}
int temp = 0;
StringBuffer sb = new StringBuffer(length);
char[] ch = str.toCharArray();
for ( char c : ch ) {
sb.append( c );
i... | 0 |
41e8948f9098c03c29b88b3284e81ac0 | bbc704c42a680c2501d5bf2633603407 | Request that all parameters store recent values | void cmd_s(void)
{
valve_params_store();
} | 1 |
30d080be36ebb8e010fea05d773e77d4 | d72c96806f2ce3440c79c62b010d864f | Returns a prettified date string from the raw date cell content | formatterDate(row, column, cellValue) {
return cellValue ? moment(cellValue).format("L") : null;
} | 1 |
4829b5ea104b52bf6d5931a0373760d5 | 0603dbe746dd5032ab35364285bbf98e | Dispatch for messages LinuxSerial::serial::serial_opened | void dispatch_LinuxSerial2_send_serial_serial_opened(struct LinuxSerial2_Instance *_instance){
if (_instance == &MainCPUCfg_serial1_var) {
Bridge_handle_serial_serial_opened(&MainCPUCfg_B_var);
}
} | 1 |
fd7c763dd0ad58493ada8cdf8371736f | 2470df32badfb576f2958d3f0dc7a4b1 | Whether tests can attempt network access | class ExtTest(unittest.TestCase):
def test_connection(self):
self.assertTrue(ExtRequests(":memory:")) | 0 |
09ff71c5d7076228c4bf663130ab7cff | 4b7dc84bf177a6b057d7040a0e014ca9 | Mark completion for aggregates. | static void
finalize_windowaggregate(WindowAggState *winstate,
WindowStatePerFunc perfuncstate,
WindowStatePerAgg peraggstate,
Datum *result, bool *isnull)
{
MemoryContext oldContext;
oldContext = MemoryContextSwitchTo(winstate->ss.ps.ps_ExprContext->ecxt_per_tuple_memory);
if (OidIsValid(peragg... | 1 |
a4e53988333482e25bc237bace1a8819 | ec35689c3c0e5d7d43051845901e713e | 运行多进程 | def main():
p_list = list()
p_list.append(Process(target=ValidRun, name='ValidRun'))
p_list.append(Process(target=RefreshRun, name='RefreshRun'))
for p in p_list:
p.start()
if not ProxiesReceiver.wait_proxies():
kill_all(p_list)
return
if conf.option != 2:
p_list.... | 1 |
d70778fb8f5cf2aefb64d7b22ae64caa | 8afbfff7d7b383409d3608439dc3a835 | 유효한 계좌인지 조회 | function isAccountValidForm()
{
var accountBank = $("#accountBank").val();
var accountNo = $("#accountNo").val();
if (accountBank.length < 1) {
alert('은행명을 입력하세요.');
return false;
} else {
if (accountBank.length > 15) {
alert('은행명은 15자이내로 입력하세요.');
return false;
}
}
if (accountNo.length < 1) {
... | 0 |
4eff1012859341ad106afbcf9ccccbea | 958a84f45a26ce21f46630fe0057f5ca | #plot cleaned data by month | f_one <- ""
f_two <- ""
if (identical(crime, "Aggravated Assault")) {
if (!identical(city, "Chicago")) {
f_one <- "agg"
}
f_two <- "as"
} else if (identical(crime, "Burglary")) {
f_two <- "burglary"
} else if (identical(crime, "Drug Related")) {
f_two <- "drug"
if (identical(city... | 1 |
ac65f31c1f1719fdddea108ad6c6f145 | 72a81804ff32992da7dff05c4bbf919d | Method to compute firing rate | def compute_trial_averaged_firing_rate(data,delta_t):
nr_of_bins=data.shape[1]/delta_t
bins=np.split(data,nr_of_bins,axis=1)
trial_averaged_firing_rate=[]
for time_bin in range(0,len(bins)):
count=np.count_nonzero(bins[time_bin])
normalized_count=(np.float(count)/data.shape[0])/delta_t
... | 1 |
4be665eaaca5758776ca329086481b8f | a3aafd6b99c50f42b20570f741313c44 | ソースコードかどうかを判別 | def isCode(name):
if (name in exclude):
return False
result = re.findall(r'\.\w+$', name)
if (result == []):
return False
else:
return (result[0] in code) | 1 |
459a7f80f38a5659cc7b9460d9f75a7e | 6bd7072a0f538c663913bdd4b4bcb10a | Method to find and edit the mass capacity property of transport pods | def fct_mass(x_in,aircraft):
ac = aircraft
ac.weights.mlw = x_in[0]
ac.weights.mzfw = x_in[1]
airframe.eval_cabin_mass(ac)
airframe.eval_fuselage_mass(ac)
airframe.eval_vtp_mass(ac)
airframe.eval_wing_mass(ac)
... | 0 |
db2709bdf7d20038789ad1c8170ea5dd | 1481c6cd94659353b7b9e2590a1ea522 | 根据部门id,菜单id获取数据规则 | public class AuthorityUtil implements Serializable
public String getDataFilter(String menuId, String componentVersionId, String tableId) {
return getAuthorityManager().getDataFilter(menuId, componentVersionId, tableId);
} | 0 |
fb4d7c7df25169f78e88f23cf48cd48b | 15c6efca987b180ef5ba360743f33ac7 | Method to deactivate the game object from the activatable game object list with the equal index number of the time. | [Serializable]
public class CountDownObjectActivationController : MonoBehaviour
public void ActivateIndexActivatableUnequalToTime()
{
int currentlyActivatableGameObjectIndex = 0;
foreach (GameObject currentlyActivatableGameObject in activatableGameObjectList)
{
if (currentlyActivatableGameObject != null && c... | 0 |
ccb7aa9e018d24f46aba125b031efeda | 016d6e643441ca3c9fb6d63ccbffc5e9 | Запускает функцию обмена командами в отдельном потоке, чтобы форма отвечала на действия пользователя | namespace Auto_RT
public partial class Main : Form
private async void ExecuteButton_Click(object sender, EventArgs e)
{
shouldSendCommands = true;
StopExecutingButton.Enabled = true;
await Task.Run(() => StartCmdQueue());
} | 1 |
c2b8c43b6c1e2aac297522b5433986de | 174197e53a1f77df34826d10295b7f4e | 动画类初始化 A -> A_animate_init | animateList[animateId] = this;
this.animateId = animateId;
animateId++;
this.sprite = sprite;
this.isSpriteAdd = false;
this.soundManager = soundManager;
this.bundles = [];
this.curBundle = 0;
this.lastBundle = -1;
this.spriteOrigin = null;... | 1 |
9aa5f43337801c4aad5770877e7f010b | e78c86e6dc86afe412862c50dc4105e0 | Uses JAXB API to write the MzProductResult instance to an XML
file | public final class MusicXMLParser
public static void outputXML(ScorePartwise spw, String outputFilename) throws JAXBException, IOException {
JAXBContext context = JAXBContext.newInstance(ScorePartwise.class);
Marshaller marshaller = context.createMarshaller();
context = null;
marshaller.setProperty(Marshaller.J... | 0 |
a2694e465c4b3da46557aa3b81a58f53 | b570785ba86fc04456a3a667fbd472de | \brief Update emit 2 mode in atpl230 device.
Update Emit mode register configuration. | esp_err_t ret;
uint8_t reg_value;
if((ret = lora_read_reg(E_LORA_REG_MODEM_CONFIG_2, ®_value)) != ESP_OK) {
return ret;
}
if((ret = lora_write_reg(E_LORA_REG_MODEM_CONFIG_2, (uint8_t)(reg_value & 0xfb))) != ESP_OK) {
return ret;
}
return ESP_OK;
} | 1 |
34a668d562a1eb7b22dd61dce4aa567d | ccbd647b5eb949bffd3a0218df1a9029 | Página para criar um novo pedido de fabricação | class PedidoControler extends Controller
public function create()
{
return view('qualidade.pedido.create');
} | 1 |
64c51f34110b61566df0dcdd14f82156 | f5111b9c7fcfd7d10b7f1eb3b65f15fe | 跳转舞蹈培训师详细页面 | jumpStaffDetail(e) {
const id = e.currentTarget.dataset.id
this.$route('/pages/SC/pages/hairdetails/hairdetails', {
hairId: id
})
} | 0 |
67437a3fd58b7f289529064ba3d21119 | ccbd0942d8637361a53036dea40b1a00 | Returns true if shown data has been filtered by query | public class QueryData implements Serializable
public boolean isShow() {
return show;
} | 0 |
4bf400631b319834ecd781c23c89eca5 | 3dccbfc2b3178f8dae3f584f7e7758fe | Find best split index based on minimum overlap between split regions | def bestSplit(D, criterion): | 0 |
4a4163163935f8871af5e07c77ec6b26 | 6e82bf32b44a9ac2220daba51977223f | @brief Enables the SD wide bus mode. | {
uint32_t dwSdcr = pRMci->HSMCI_SDCR & ~HSMCI_SDCR_SDCBUS_Msk;
switch(bBusWidth)
{
case 1:
pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_1;
break;
case 4:
pRMci->HSMCI_SDCR = dwSdcr | HSMCI_SDCR_SDCBUS_4;
break;
case 8:
pR... | 1 |
96cc3ce4116091efe2fb4ae6c2534e1a | 12835b31d310ce26392870071b333e75 | Возвращает список id клубов, на которые подписан | if (is_object($user)) $user_id = $user->id;
else $user_id = $user;
$select = $this->_dbTable
->select()
->from('companies', array('companies.id'))
->join('subscriptions', 'subscriptions.company_id = companies.id', null)
->where('sub... | 1 |
5b8f01b6ae6fe807e89a4133e7c39cdc | 8678d283668fd1927fec2938dbb68835 | Returns whether or not this is the root crate in the workspace. | def root?
self.class.roots.exists? self
end | 1 |
c2f18c62e90b66a4c32486fc58d775ad | 2f1775ae50d6463e424c49eac16b6b1e | 360权限申请 | private fun commonROMPermissionApply(context: Context) {
if (RomUtils.checkIsMeizuRom()) {
meizuROMPermissionApply(context)
} else {
if (Build.VERSION.SDK_INT >= 23) {
try {
val clazz = Settings::class.java
val field = clazz... | 0 |
329e5365afbcdc4c3c645f9d50afb442 | a1fd298f3bf22f231dc10a7d96118e21 | Sets the value of the '{@link ac.soton.xmark.marking.Student#getLastname <em>Lastname</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | void setLastName(String value); | 1 |
f4d7c781be614a46aa358170584ce270 | 9f7bbd28c62bb3c926a8b08674935679 | Lists all Preinscripcion models. | class InscripcionsController extends Controller
public function index(Request $request)
{
$inscripcions = Inscripcion::getAllData($request);
return view('inscripcions.index', compact('inscripcions'));
} | 0 |
d67af092c402a2a12a73ccb8e96a0ed2 | e183e8b7247c9bf67e374a358da0bb93 | 校验POST提交的数据 | class mobileapi_rpc_comment extends mobileapi_frontpage{
private function _check_post($_POST,$type){
$this->verify_member();
$_POST = $this->check_input($_POST);
if(!$_POST['goods_id']){
$this->app->rpcService->send_user_error('4003', app::get('b2c')->_('参数错误'));
}else{
... | 1 |
9188e98297eb7117387f10b92458eb50 | 4d07d89bce62f67bb875301f6485c6e6 | 功能说明:根据用户名模糊用户信息 | {
List<UserInfo> list=new List<UserInfo>();
DBConnection dbc = new DBConnection();
dbc.GetConnection();
string cmdText = "select * from younger_user_info where user_name like '%"+userName+"%'";
dbc.GetDataReader(cmdText);
while (dbc.dataRea... | 1 |
cf1af7b33a484684cf44a7035154bc8f | 40d24c3418ad6497bb0bf1efc6a9d731 | 添加需要排除的事件类型 | assert.arrayOfString(eventTypes, 'eventTypes')
const uniqueEventTypes = eventTypes.filter(
(e) => !this._sagaStarters.includes(e)
)
this._sagaStarters.push(...uniqueEventTypes)
} | 0 |
7dfe3710723aec7c742ec12346bcba20 | 116410114066e4a679e1ec73865da423 | Gradient for SegmentMax. | x, ret = self.saved_tensors
max_is_1s = x.binary_op(BinaryOps.CMPEQ, ret.movement_op(MovementOps.EXPAND, x.shape))
div = max_is_1s.reduce_op(ReduceOps.SUM, grad_output.shape).movement_op(MovementOps.EXPAND, x.shape)
max_is_amount = max_is_1s.binary_op(BinaryOps.DIV, div)
grad_output_expanded = grad_... | 1 |
69fbe49002d74d8893105d05470b541d | a0a83e268767935fba5bc152a2777515 | valida que el usuario pueda ser creado | {
$validate = $this->get('validate');
$val = array();
$val['nombre'] = $validate->validateTextOnly($data['nombre'], true);
$val['apellido'] = $validate->validateTextOnly($data['apellido'], true);
$val['celular'] = $validate->validateInteger($data['celular'], true);
$v... | 1 |
a168ae5d3690012cbd9a493eb16bdb54 | a4051d98fd7f96882d12ea2a504b771f | update the filters of all existing aggregate chests | for _, surface in pairs(game.surfaces) do
for _, entity in pairs(surface.find_entities_filtered({ name = constants.aggregate_chest_names })) do
aggregate_chest.set_filters(entity)
end
end
end | 1 |
1725310e264c80a1aa7ecd52d8bc476f | 2f63d0f2057a9f7b8eaed1403144bb67 | constroe as sugestoes para o usuario | class SugestaoController extends ConectarController
public function __construct()
{
parent::__construct();
$this->middleware('auth');
} | 0 |
584704908f5d36eb71c90e568c2e635f | d34771a9684d5a88c31543a42d7a7849 | Constructor.
Initializes the stack with an array or an iterable object. | class Stack implements StackInterface
public function __construct($items = [])
{
$this->items = (array) $items;
} | 1 |
80465f54b45b45a81afd7592468ae43e | a6ffa8c5d6e90911e9df8744006ad218 | Hides the slide-container. | function hideSlide(e) {
$('.navbar-side').css('right', '-268px');
$('#toc').empty();
setTimeout(function () {
$('.article-left').removeClass('has-side');
}, 200);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.