query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
867495dc715c6c7c19a1defe0cf429ba | 1889c6359a4e41d2d510c501e53c4ce6 | Returns an appropriate HTTP_Message given an HTTP_Message HEAD request.
A HEAD request is the same as a GET request except it will not include any HTTP message body. | class DAVRequestHandler(AuthServer.AuthRequestHandler, LockManager):
def do_HEAD(self):
return self._HEAD_GET(with_body=False) | 1 |
a2958cad6c75f72fe6268ec2be813f42 | 17b5f15c6e423339880bb8211dde6003 | 根据面板id返回入参列表 | @Component("menuInputParamService")
public class MenuInputParamService extends ConfigDefineDaoService<MenuInputParam, MenuInputParamDao>
public List<Object[]> getInputParamList(String menuId) {
return getDao().getInputParamList(menuId);
} | 1 |
e90dc1353b4ac63b658f6c5daf06fbd2 | ae3a861c889e8b6ce9757ab4ff91f47f | 如果选中,那该条渠道仓库绑定也一并选中 | var val=$(thisSelect).val();
jQuery("select[name='customsChannel']").each(function(){
var value = this.value;
if( value != "" && value == val && this != thisSelect){
alertMsg("通关渠道不能重复");
$(thisSelect).val("");
return;
}
});
jQuery("#recordation_customsChannelName_"+index).val(jQuery(thisSelect).find... | 0 |
816eea507f16e5c380af9e4bb9b3d18d | 4bf63b231ba89aa80c6ebe23c346fbce | Type of EBS volumes attached to data nodes. | class EbsOptions:
def volume_type(self) -> typing.Optional[_EbsDeviceVolumeType_6792555b]:
result = self._values.get("volume_type")
return typing.cast(typing.Optional[_EbsDeviceVolumeType_6792555b], result) | 1 |
7d49d5c5f3b9d1033056439279cc37f3 | 6600d9c53d670554d1ebed51623a9b80 | Get the default photon grid distance tolerance | namespace DataGen{
double AdjointElectronPhotonRelaxationDataGenerator::getDefaultElectronGridDistanceTolerance() const
{
return d_default_electron_grid_generator->getDistanceTolerance();
} | 0 |
8e820652b8f7c186764fd6eee7790fd8 | d0659f415515ab8111b5588ffeae9283 | Changer le nom du serveur de la connexion courante selon le nom reçu en paramètre. | public class Client
public void changeUsername(String newUsername) {
this.sendDataToServer("/!rn/%s/!e/".formatted(newUsername));
} | 0 |
c20e93daf4b567d0807979f53ac0a355 | 152976cc35913573e49bc8d9c5d9b026 | Returns control parameters as XML. | class Grid
public function getParamsXML(){
$previous_page = ($this->mReturnedPage == 1) ? '' : $this->mReturnedPage-1;
$next_page = ($this->mTotalPages == $this->mReturnedPage) ? '' : $this->mReturnedPage + 1;
return '<params>' .
'<returned_page>' . $this->mReturnedPage . '</returned_page>'.
'<tot... | 1 |
1ccac89ed24ea8855cbb26ea89a05b10 | bd57e6d05e5a4ca648617806c2023b23 | Send an email message to the REST-based interface. | class Communication(Document):
def send(self, print_html=None, print_format=None,
attachments=None):
self.notify(self.get_email(print_html, print_format, attachments)) | 0 |
df4bf51f9849c7e92c5cefc612eac0e2 | 07280c0b844eda4539006c2964404fd8 | returns list of agents and actors on left side of river | class SmartGrid(Model):
def listAgents(self):
return self.list_agents | 0 |
08a53928f612b7884f06d127fbe5dc81 | 095ad7fd05a3b4b6e61bdf7a0c54d1b5 | Sortiert die actors-Liste nach dem lastName, ist diese absteigend sortiert und die Methode
wird aufgerufen so wird die Liste aufsteigend sortiert | public class StudentListe
public Student[] sortName() {
return sort(new NameComparator());
} | 0 |
5bbe89ddc4482a09bc4ccd042b73577a | 81f396e407f9abd323f33d472044c153 | Prevent the layout from being redrawn. | class HistoryWindow(context: Context,
windowCoordinator: WindowCoordinator) : Window(context, windowCoordinator, R.layout.window_history)
override fun reInit(options: Window.ReinitOptions)
{
options.reinitViewLayout = false
super.reInit(options)
} | 1 |
9a8436f08903d4815d9e279eef1e1b92 | 49ed475871a0e097b3b585d7c4d6ef1f | Add a Finishing Bonus for a particular Team. | {
if (isServer)
{
BlueTeamScore++;
Ref.PlayGoal();
Ref.PlayBlueTeam();
BR.resetToClosestPoint(true);
if (GT.InOvertime())
{
GT.ServerEndTheGame();
}
else
{
BT.S... | 0 |
adfa6de5bfd2f57b3e44188e0fd81745 | cef018da7104bd6657b1667885546aa1 | Test of decontamination of a RunComponent. | throws Exception
{
try
{
SCOMapTests.checkRemove(pmf,
Map1.class,
ContainerItem.class);
}
finally
{
clean(Map1.class);
clean(ContainerItem.class);
}
} | 0 |
d267c9d2683604c5789bbf4cd2389db3 | 8de483d74175f219d5db97701bf7f6bf | # Num 4: Perform DEA (Differential expression analysis) to identify differentially expressed genes (DEGs) | ddsHETSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory, design = ~genotype*age)
dds <- normalizeData(ddsHETSeq)
dds <- DESeq(dds, betaPrior = F)
calculateMainEffectGenotype(dds, fileName1)
calculateMainEffectAge(dds, fileName2, dataType)
calculateInteractionEffect(dds, file... | 1 |
26019fce32f9490018dc829b52e0a298 | 1e76298fb318fab2761f010957203a61 | Gets the number of satellites that are actively on in the constellation
matrix | uint8_t NMEA::getSatellites() {
return _satellites;
} | 1 |
5e1949cc9595e085e1e51b92a4f9038d | 55c5bc289877cd73600aaf69e6d698ef | Returns the unique values for name.
If 'withLengths' is true, returns a sequence of tuples of
(value, length) | suc = self.getNameCount()
if suc:
suc = self.getNames()
return suc | 0 |
5a5628645ab9ddf38e68335166fe1401 | fbef6f574dd7dd74b01db374d3b359fc | Get capacity for given resource. | namespace ReGoap.Unity.FSMExample.OtherScripts
public class Resource : MonoBehaviour, IResource
public virtual float GetCapacity()
{
return Capacity;
} | 1 |
b10e1df6240e11a91650006d84cd43ad | 689b7d42acf7bcf51199ec9b99afef58 | Function-constructor which creates only one instance of object
which used for saving triggering and listening of custom events | function TriggersFactory_() {} | 0 |
fe3732f8dac619f34b05b448c23d9b64 | 89e56cdec7203e5097efc16d40ea7307 | Метод создает участника чата. | creator = current_user.id
if members == "none":
members = str(creator)
else:
members += f";{creator}"
session = create_session()
chat_id = add_chat(name, members, creator, session=session)
first_message = write_first_chat_message(chat_id, current_user.id, session=session)
cha... | 0 |
5407f1866da6d3cd9098d7b84a8a99fb | 09da99b15442ad67d340dba478c1cb7a | Returns the map between lattices with restricted action | action_id=0
action_map=np.zeros((10*2*3*6,4), dtype=int)
map_action=np.zeros((10,2,3,6), dtype=int)
for i in range(10):
for j in range(2):
for k in range(3):
for l in range(6):
map_act... | 1 |
fa0bc0cbb0e323e53f24ec9684260f29 | c94b5837fa227741806725a8c63e9040 | Sets the pageDownCommand. | namespace Microsoft.Windows.Controls.Logic
void PageDown(bool select); | 0 |
30760a84af1fc343c4bcbe38ac3e1da8 | 2e47ab77dc6605f0b269236183679baa | 获取用于读的数据库连接 | {
if (dp != null)
{
var conn = new SqlConnection(dp.Reader.ConnectionString);
conn.Open();
return conn;
}
throw new Exception("数据库读连接创建失败");
} | 1 |
7da09512c0217846c654a5a90b8db712 | da7ac84cba017b1455b3d646624afad7 | Remove all spaces (" ") from the postal code to remove potential spaces before or after postal code (e.g. " M5J0A8 " -> "M5J0A8") | def remove_postalcode(text):
return re.sub(r'[A-Za-z]{1}[0-9]{1}[A-Za-z]{1}(\s*|-)[0-9]{1}[A-Za-z]{1}[0-9]{1}|[A-Za-z]{1} [0-9]{1} [A-Za-z]{1} [0-9]{1} [A-Za-z]{1} [0-9]{1}',"",text) | 0 |
5f60c0d99d72d5ff606ef451b51ae6c9 | d5a08f6147f71d47eabfa5c4aa524475 | database view objects do not do full updates
due to multiple tables being involved | function diffFunction(doc) {
doc.views = doc.views || {};
var fullViewName = viewName;
if (fullViewName.indexOf('/') === -1) {
fullViewName = viewName + '/' + viewName;
}
var depDbs = doc.views[fullViewName] = doc.views[fullViewName] || {};
if (depDbs[depDbName]) {
re... | 0 |
2e22943dff2894a7ef670235d805befb | 3fbc86142f24cec8705edd9a11a7cf3a | Sets a column to be the inet representation for the table. | void mmDbaseTable::SetColumn(int colNo, int val)
{
mRow[colNo]->mCType = SQL_C_SLONG;
mRow[colNo]->mType = DB_DATA_TYPE_INTEGER;
if(mRow[colNo]->mData)
*((int*)mRow[colNo]->mData) = val;
} | 0 |
ee992726996443ddd20a37e53452a743 | 7f67abc88dda694233cd64401ad71d9a | 通过流程定义ID查询 | HistoryActivityInstanceQuery processDefinitionId(String processDefinitionId); | 1 |
ccf080bd53dbce0f99f5a61dae99d1d1 | aa2220bd0f6ea7b93da1fa8c0f19f19d | Carica il modello da disco | fullpath = os.path.join(self._model_path, filename)
with open(fullpath, 'r') as model:
self._model = cPickle.load(model) | 1 |
c44a798d418a66c1ed85d3fbf8f10dad | b5830f4a6d05620196c68a9ab107642e | 人物不能攻击,石像化 | public class EntityStoneCrack extends Entity{
@Override
protected boolean canTriggerWalking()
{
return false;
} | 0 |
df58f5f193ec8269cd81614df36b5a28 | 9563cc54448337664b0a805d01b24bee | This function scans the text looking for hotlinks and special
formatting sequences. | class SimpleTextParser extends AbstractTextParser
protected function format($string)
{
$pattern = '{\b(?:'.join('|', $this->linkPatterns).')}i';
$string = preg_replace_callback($pattern, function ($matches) {
return $this->linkFormatter->format($matches[0]);
}, $string);
... | 1 |
c321457abc2190877ae62ee422b27fd4 | 3f8bb2308178b0d15610b54fce5263f1 | Get the Instagram OAuth URI | {
return 'https://api.instagram.com/oauth/authorize?' . http_build_query([
'client_id' => $this->appId,
'redirect_uri' => $this->redirectUri,
'scope' => 'user_profile,user_media',
'response_type' => 'code',
'state' => $state,
]);
} | 1 |
4250ec2c797b64117cf3ec5195fa5e55 | 1d55190dba53445a4f7ecb12147b3604 | Check if current resource can see the owner of requirement (has permission). | public boolean isCheckCurrentResource(); | 0 |
2c01b869f4d6c82adb6fb6e418870e6f | 5c26dc978dcea408acbe1d5439d86c04 | Description : OVRCR, ATTCH, DTCH, BCHG interrupt disable
Arguments : none
Return value : none | {
uint8_t tIBCR;
ASSERT(Ch <= I2C_Ch_MAX);
tIBCR = pMFS_I2C_REG[Ch]->IBCR;
tIBCR = tIBCR & (~I2C_IBCR_INTE);
pMFS_I2C_REG[Ch]->IBCR = tIBCR;
return;
} | 0 |
c225c29f3be9bb621754a0d3a268860c | 4f088e6d85c95a02abdf3954a233b7b9 | Caminha pela árvore em pré-ordem, analisando a sequência. | void PreOrdem (FILE *saida, pilha *P, arvore T)
{
if (T!=NULL)
{
push (P, T->letra);
if (T->cont!=0)
{
P->S[sizePilha(*P)] = '\0';
fprintf (saida, "%d %s\n", T->cont, P->S);
}
for (int i=0; i<26; i++)
PreOrdem (saida, P, T->filhos[i]);
pop (P)... | 1 |
7675ec6b97d85d5927b44f36e7140350 | 53e1851337f9fb195349df6a6d4f97a5 | Revoke any outstanding password reset links. If an attacker compromises
an account, changes the email address, and sends themselves a password
reset link, it could otherwise remain live for a short period of time
and allow them to compromise the account again later. | return UserResetPassword.MODEL.destroy({
where: {
[CONSTANTS.FIELDS.ACCESS_EXPIRY]: {
$lt: new Date()
}
}
});
} | 1 |
6757998af5112e7cee16e66392ae57ed | cde79e826a4ca126dd4a58d1a1e2566f | Puts 1s in the odd positions of the array and 0s in the even positions. | for(int i = 0; i < size; i++){
if(i % 2 == 0){
a[i] = 0;
}
else{
a[i] = 1;
}
}
} | 1 |
148afdf35cf48d51a9fc5bdf5668b2ce | 288269d1896a3c4caabb0e3ad996fdd0 | Plays a chest opening animation. | opened = true;
_audio.PlaySound();
externalParticles.Stop();
anim.SetBool( "Open", true );
yield return new WaitForSeconds( .6f );
innerLight.SetActive( true );
yield return new WaitForSeconds( 1.65f );
foreach ( ParticleSystem particles in openinigParticl... | 1 |
33894dbb305fe99ff758f506c3fc20f1 | 87bc460a6f14db23e1356b234db37791 | FUNCTION
DESCRIPTION
this funciton is used to check all downloaded widgets
PARAMETERS
void
RETURNS
void | {
if(widgetsinfo[index_resolution]==1)
{
ui->resolution1->setChecked(true);
}
else if(widgetsinfo[index_resolution]==2)
{
ui->resolution2->setChecked(true);
}
ui->check_magatama30->setChecked(widgetsinfo[index_magatama30]);
ui->check_strength30->setChecked(widgetsinfo[ind... | 0 |
f5cd4027324ec4af4a1d3ccd15afac2c | 28b04251d26cc3b4511b7262bc53343e | 0 width | namespace fawkes
size_t
VisualDisplay2DInterface::AddCartRectMessage::maxlenof_width() const
{
return 1;
} | 0 |
b0345aa94787d31f57c414d8f82be68d | 20a8df6d74a3cbebdf73a34b3c870375 | 获取邮件发件箱信息 | namespace ShineKJ.DAL.OA
public class EmailDAL
public DataSet Email_GetSendBox(string strAccount)
{
SqlParameter[] paras =
{
new SqlParameter("@accountName",SqlDbType.NVarChar,20)
};
paras[0].Value = strAccount;
try
... | 1 |
80bccce13ddce678394eac2a1adb993b | 6af68ee39e2a36ebaa2fada91a69c982 | Subtract scalar | class NamedTuplesFundasTest(unittest.TestCase):
def test_subtract_scalar(self):
self.assertEqual(self.OneType(1, 2, 3) - 2, self.OneType(-1, 0, 1))
self.assertEqual(5 - self.OneType(1, 2, 0), self.OneType(4, 3, 5)) | 1 |
20ece7ad90d951d954934d7152de9c10 | 99ae6889da2ef8646d8b8afc9b8e818d | Dynamically calculate the 512-byte-aligned location for Descriptor | {
AssertCompile(sizeof(E1KRXDESC) == sizeof(E1KTXDESC));
return ((uint64_t)baseHigh << 32) + baseLow + idxDesc * sizeof(E1KRXDESC);
} | 0 |
af669977e895ec7a45e34f8a9dd7b1d6 | 375c008f11c3835c500aa4e04ed24281 | when player enter the rooms
find the correct levelnumber and then the correct roomnumber
then plays its background music
keep it looping | {
dbSyncOff();
int wait = 600;
switch(currentLevel)
{
case 1:
dbLoadImage("SpaceCoords.bmp", SPACE_COORDS_NUM);
dbSprite(SPACE_COORDS_NUM, 0, 0, SPACE_COORDS_NUM);
dbWait(wait);
dbDeleteSprite(SPACE_COORDS_NUM);
dbDeleteImage(SPACE_COORDS_NUM);
dbLoadImage("Space.bmp", SPACE_NUM);
dbLoadMusic("1-Mute... | 1 |
7a823624c5a08e2441e0cdb9d8e6ceac | 35af912dfe5f4cb00ba5f9c39599562d | limpa o campo cnh | function limpa_formulário_cep() {
document.getElementById('rua').value=("");
} | 0 |
ed4d49cbfab65660314d8e93b9de5556 | 344674db6687ebe4550274551f512709 | 获取角色主武器 | {
switch (school) {
case zhiye.yunxiao:
if( sex == RoleSex.MAN ) return "weapon_dao";
else if( sex == RoleSex.WOMAN) return "weapon_jian"
case zhiye.dahuang:
if( sex == RoleSex.MAN ) return "weapon_qian";
else if( sex == RoleSex.WOMAN) return "weapon_qin"
case zhiye.cangyu:
if(... | 1 |
8cb150bd6e5c18bf5bef09773d91be96 | 99670840bb3ca0f7fa2c91f9b3aa7e7b | @brief 获取微秒数 | uint32 suli_micros()
{
return micros();
} | 1 |
32d11ea31ed99a4cdbce5de52d60eced | 186ed63eb2717ec9b2b18afbd017514d | Description : Enable IIC Slave Transfer Processing.
Enable the slave address match interrupt. Sets the internal status.
Arguments : riic_info_t * p_riic_info ; IIC Information
Return Value : RIIC_SUCCESS ; Successful operation, idle state on enable slave transfer | {
p_ctrl->p_reg->ICIER = (uint8_t) ((uint8_t) IIC_RXI_EN_BIT | (uint8_t) IIC_TXI_EN_BIT);
p_ctrl->notify_request = false;
p_ctrl->do_dummy_read = false;
p_ctrl->p_reg->ICFER_b.TMOE = 0;
if (p_ctrl->transaction_completed)
{
p_ctrl->p_reg->ICSR2 = 0x00;
}
else
{
p_ctrl... | 1 |
94487c05c6808254f87c1243ba4c6585 | 90c556d48848dc3c6ccc06def99cecd5 | Hard set the association to either nil (belongs to) or an empty array (has many). | def blank_association(*args)
set_option_array_values(:blank, *args)
end | 1 |
f595c37441a471302b9c662211e14428 | 88d8642df6168fc19b88dfc04d0728b0 | test method that verifies the correct functioning of the Take Resources From Market action | Depot testDepot1= new Depot(4);
try {
testDepot1.addResources(Resource.SHIELD, 2);
} catch (Exception e) {
fail();
}
Depot testDepot2= new Depot(4);
try {
testDepot2.addResources(Resource.COIN, 3);
} catch (Exception e) {
... | 0 |
b63e21fde4ec1b0273334a995446f7eb | d9d1437411084ad96ec6db001544092e | 修改总箱数 | class ProduceProjectOrderModel extends Model
public function updateBoxNumber($id){
if(empty($id)){
return array('success'=>0,'message'=>'参数为空');
}
$redis=redises();
$redis=$redis->redis();
$box_redis_value=$redis->Get('produce_produceController_updateBoxNumber_'.$id);... | 1 |
6344be57db0e38d7c042e49014096cf1 | 978b406021bfeeea5d7e3a37cbdc6578 | Removes a segment from the given wavelet. | void removeSegment(String segmentName); | 1 |
af1b434b841cb64f9e1c429fa20192d8 | 765cf789e464a8f967e798828fb1618f | Рисует рамку выделения | namespace DualViewsDrawingWindowsUniversalApplication.Views.Utilities
public class DrawingPageGraphicsAdapter : IGraphics
public void DrawSelectionBorder(DualViewsDrawingModel.Shapes.Line line)
{
Windows.UI.Xaml.Shapes.Line drawingPageCanvasLine = new Windows.UI.Xaml.Shapes.Line();
d... | 1 |
4b887394c31c12932f07b67c5a3cc0a7 | 12ec6955bc3e4d5c29797132ed814898 | バイト数の数値をバイト単位で整形して返します。 | $byte = str_ireplace('b', '', $byte);
$unit = $withUnit ? 'K' : '';
$deno = 1024;
return round_pad_zero($byte / $deno, $length) . $unit;
} | 0 |
05f64289aa03cdbe88b2a0bfd96471dc | 55baf6eddcee4cc2124dbdbac718aba9 | Naively computes and returns the greatest common divisor of 2 or more
integers by taking each integer in turn and calculating the GCD of that
integer and the previously calculated GCD (where the first GCD is simply
taken as the first number). | function gcd(...xs: number[]): number {
var a = xs[0] || 1;
for(var i=1, I=xs.length; i<I; i++)
a = gcdPair(a, xs[i]);
return a;
} | 1 |
261508b0c39cda48b2f77e4cd86436cf | 2bb8ee0ce53b48a2eebd4f338517583a | 保存并启用输入的Sensor ID序列 | class sensor_page(BasePage):
def input_sensorMeasuringPointSequence(self, sensorMeasuringPointSequence):
self.find_element(*self.sensorMeasuringPointSequenceInput_loc).send_keys(str(sensorMeasuringPointSequence)) | 0 |
71c5c6e0900beb46ea1f224b39dbfae8 | 44f781b9843821a2ede72a7a8078b1a4 | !
Deinitializes a subject. | void Ssub_Ctor(CSingleSubject *self, void *ucs_user_ptr)
{
self->observer_ptr = NULL;
self->ucs_user_ptr = ucs_user_ptr;
self->user_mask = 0U;
} | 0 |
a3bd12c844860e406207bc8b991e9a1b | 7fd12df0fe40d7e056109d595a20e7b9 | 选项值的更改是否是用户操作的结果。 | public isSelective (): boolean {
return this.selective
} | 0 |
1a0fb4489726e8320e69acb38ceb20d4 | 9235765de810861deca42a087574b798 | Parses an object transformation and returns a pointer to the
newly allocated transformation | Transform *parse_transform (char *string)
{
Transform *t;
char *token;
int token_no;
t = (Transform *)malloc (sizeof(*t));
if (t == NULL)
abortmsg ("Out of memory allocating transform", 1);
mat_identity (t->matrix);
token = parse_string (string);
token_no = 0;
while (strl... | 1 |
057ec3d1773c8a529e643545275d6527 | 2d5df102022a01ebd951e70c195472a9 | @brief This function is used to receive data in polling mode. | {
int32_t ret = BSP_ERROR_UNKNOWN_FAILURE;
if(HAL_UART_Receive(&huart4, pData, Length, BUS_UART4_POLL_TIMEOUT) == HAL_OK)
{
ret = BSP_ERROR_NONE;
}
return ret;
} | 1 |
cc1ec6a6d7432c1e88c24b70059511e1 | 49d1640f72a9e2449943531f76567a8c | Getting a list of room_levels based on the roomID. | @Query("select r.room from RoomAndRoomLevel r where r.roomLevel.id=?1")
public List<Room> findRoomByRoomLevel(int id); | 0 |
633fed854c09eacbcd950cfe592a7dcb | 16af30c24c1547c862b9750179f93177 | フラッグ情報を追加(存在するなら上書き) | class IncPopupDatabase
static public function set_flag( $key, $value ) {
$data = get_user_meta( get_current_user_id(), 'po_data', true );
if ( is_object( $data ) ) { $data = (array) $data; }
if ( ! is_array( $data ) ) { $data = array(); }
$data[$key] = $value;
update_user_meta( get_current_user_id(), 'po_data... | 1 |
2d92ebec7a88379b3186949a81adc806 | 6d7d29d22b10272820ad54768facb182 | Returns the name of the last executed command | class Request
function getLastCommand() {
return $this->lastCommand;
} | 1 |
831ba2cff88d79ecffc2b6b65fe685f3 | 7793e7b18c090467e192f4425b452259 | * Window_Selectable with contents aligned to center | if ( IsValid( self.m_Image ) ) then
self.m_Image:SetPos( (self:GetWide() - self.m_Image:GetWide()) * 0.5, (self:GetTall() - self.m_Image:GetTall()) * 0.5 )
self:SetTextInset( self.m_Image:GetWide() + 16, 0 )
end
DLabel.PerformLayout( self )
end | 1 |
7f12f45da13f7d144123d4cc09dee967 | 97a872d116f4ca4c577b6be585aa19b9 | 如果远程用户未关闭通话,则向对方发送同意接收通话指令 | public class App
private void agreeTo(String remoteAddress, int port) {
this.sendStringTo(AGREE_STRING, remoteAddress, port);
} | 1 |
e7a8eb057d8765d1a0b0243ada62151d | 64c1155345f5930339768ff655cabd4a | 选择菜单中的new,则添加一个新的MDI,主窗口内部会增加MDI的数量 | void MainWindow::on_action_New_triggered()
{
QTextEdit *edit=new QTextEdit(this);
QMdiSubWindow *child=ui->mdiArea->addSubWindow(edit);
child->setWindowTitle(tr("多文档编辑器子窗口"));
child->show();
} | 1 |
98d33f316ad0c784d523411030bd49a3 | cc264012f5d06fedc0ad5dab2b579005 | DAO method to authenticate PG service Merchant users | FCResponse<String> merchantLogin(MerchantLoginRequest merchantLoginRequest, HttpServletRequest request, HttpServletResponse response); | 0 |
933142d1b540aad5e248426a09b3d3b8 | b35855ffdf50489d7f896ad00f7898d6 | Test for 5 neighbors - the surrounded cell MUST die | public void LessThanTwoNeighboursDie()
{
Library.Board board = new Library.Board();
board.SetAlive(1, 0);
board.SetAlive(1, 1);
board.SetAlive(13, 13);
board.NextState();
Assert.AreEqual(false, board.IsAlive(1, 0));
Asse... | 0 |
20bf3aa51de999036bc2a382d1d481f6 | 21c0bae18f28bbc199172b999120bdbf | <p>返回一个在0-最大的long型数据</p> | public class RedGenerateUtil
private static long bigRand() {
long bigrand = (long) (Math.random() * Integer.MAX_VALUE) + Integer.MAX_VALUE;
return bigrand;
} | 0 |
fddf6610a492c78fa8e76a5d63507eaf | 4d0265fcaa3c0145fe11126465b18203 | 計算結果の可視化グラフをファイルに保存 | class ModelMgr():
def draw_history_graph(self, file_path='saves/result.png'):
print('\nvisualize results : \"{}\"'.format(file_path))
draw_result(self.history.history, file_path=file_path) | 1 |
ca92af259119806af2ebcd8a8c908ecf | 6dee59636022ce84f505f5e410fb5eab | * get_CHs: function to extract the CHs, which are the values of the outputs
in correspondence of the peaks. Input parameters:
- output: predictions or labels.
- peaks_pos: pixel positions of the column's peaks. | def get_ch_pos(inst):
info = get_info(inst)
chan_pos = [info['chs'][i]['loc'][:3] for i in range(len(info['chs']))]
return np.array(chan_pos) | 0 |
856c4014cfe1b9b8a64efd867ccfad81 | 0833abd94b4fbe7313c09fe0b4fa1dd1 | Returns whether (partial) expressions shall always be copied or only if needed. | {
if (_copyArray != null)
return _copyArray.toBoolean();
else
return _constArray.toBoolean();
} | 0 |
887ae240ece333037e5255c3af37afbf | e519accde033ae27c8cf5c073ee9de41 | void function / method tanpa return dan tanpa argumen | function perkalian($k1, $k2) {
echo "hasil perkalian $k1 x $k2 = " .($k1*$k2);
} | 0 |
41b83bd214335dac01a3e1fdae32efa9 | 9ab06499f6fe463c62156874569618e6 | Função que determina o tipo de rota entre o nó origin e o nó dest | if link == "":
return "file"
elif name == "":
return "link"
else:
return "both" | 0 |
3b663a38505f005778caedd2639f7b94 | 35188b6424dc41c4514894111818c76f | Получение контактов из bitrix24 | {
$CUser = new \CUser;
$contactIDs = $this->checkArrayNonEmpty($contactIDs);
if (count($contactIDs) > 0) {
$arGroups = Array();
$by = 'ID';
$order = 'ASC';
$filter = Array("ID" => implode(' | ', $this->userGroupsToSync));
$dbRes = \... | 1 |
b6f93d71d0874f3cd61c3170debe7b6e | f16d2dd5fac9c8e68d2d69b6b637e8d3 | Gets a single productivity report from the collection associated
with the name of the workstation. | ServiceCall getReportsAsync(String collectionName, String workspaceId, final ServiceCallback<ODataResponseListReport> serviceCallback) throws IllegalArgumentException; | 0 |
c62539bad2f5a42b6c9ff88c5c171f4b | 8775985685bfb36270ae7e0f70edb04c | Get Ad format ids corresponding to a creative type in the ad group. | @Getter
public class ChannelSegmentEntity implements IdentifiableEntity<String>
private List<Integer> getAdFormatIdList(final ADCreativeType creativeType) {
List<Integer> adFormatIdList = new ArrayList<>(2);
if (null == creativeType) {
adFormatIdList.add(-1);
return adFormatIdLis... | 1 |
3e935bd7c254d470bc00e80223331fdd | 77b77cd9471337855a1cf262c3da39c5 | Deserializes the entries. | {
if (reader == null || reader.IsEmptyElement)
{ return; }
XElement rootXElem = XElement.Load(reader);
if (rootXElem.HasElements)
{
XElement itemsXElem = rootXElem.Element(XName.Get("Items"));
if (itemsXElem != null && i... | 1 |
ba608b529aed7d91c1fbcc4c189a715e | c6ac1c8fdf12feda8f912f8dfad0774f | Get a list of bare metal machines in the provided subscription. | class VultrBaremetal
public function listBaremetal($params = [])
{
return $this->api->apiRequest('/bare-metals', $params);
} | 1 |
87d70b06c2f17ee8bf6e2477a7c5b73f | baa05383ba3a61b3d72a27a4fde3ec08 | 修改作文多文件上传 | {
$fileModel = new TworkUploadForm();
$work = $this->findModel($tworkid);
if(Yii::$app->request->isPost){
$fileModel->mutiFiles = UploadedFile::getInstances($fileModel, 'mutiFiles');
if($fileModel->upload($tworkid)){
Yii::$app->session->setFlash('succe... | 1 |
c63abfddb5434850ff09dc31d2c83c7f | 5a696197950327a11ef92bab2e3939e9 | Returns the length of the content for a file and set buffer with the file
content. Note that malloc is used to allocate memory for the buffer.
In case of an error -1 is returned and buffer will be set to NULL. | {
long size = 0;
FILE *f = fopen(filename, "rb");
if (f == NULL)
{
*result = NULL;
return -1;
}
fseek(f, 0, SEEK_END);
size = ftell(f);
fseek(f, 0, SEEK_SET);
*result = (char *)malloc(size+1);
if (size != fread(*result, sizeof(char), size, f))
{
free(*result);
return -2;
}
fclose(f);
(*result)[s... | 1 |
f82fbd9e63f8fb739fb5f3f05a3495e0 | b02b7a2a049c24962f094a0f0ce248ea | Returns start offset for the current position, or -1
if offsets were not indexed. | public abstract int getOffset(); | 1 |
80b28d181cd7b85cb523a452ec78b727 | 00f5d0c7aa8545e4be4cfdc2c4bffcb9 | ADRC参数初始化 | {
init_param->adxrs290_init.spi_init.chip_select = 0xFF;
init_param->adxrs290_init.spi_init.extra = NULL;
init_param->adxrs290_init.spi_init.id = SPI_PMOD;
init_param->adxrs290_init.spi_init.max_speed_hz = 900000;
init_param->adxrs290_init.spi_init.mode = SPI_MODE_3;
init_param->adxrs290_init.spi_init.type = ADIC... | 0 |
661ce1421cab219cf422b41ae97638a5 | be434de8cb54a53887098df5f6086482 | 範囲内にPlayerが入ったら物理運動を止める. | public class Enemy : MonoBehaviour
private void OnCollisionStay2D(Collision2D collision)
{
if(collision.gameObject.tag == "Player")
{
moveSeed = 0f;
anim.SetInteger("Run", 0);
canMove = false;
gameoverCanvas.SetActive(true);
}
} | 1 |
16c951d199d2bdc9feffc4442449d739 | a3a0eebdb6dab387aca6d6c9ff0df7a2 | Instructs the {@link Expect4j} state machine to continue to seek
additional matches after this one <i>and</i> to reset the timeout
timer. This is equivalent to Expect's <code>exp_continue</code>. | public boolean nextMatch(); | 1 |
94729881718749a86206389eed31b5d3 | 617f26c6d07228a200e2bf8bb79ca10a | Returns whether the zwave integration is configured. | public boolean isConfigured(); | 1 |
9f970b688658364b540c62b265bfd367 | 17bc4c310535d2bb76bbfe8f7ae22204 | Returns the repeat count for the special text element. | public class BlinkIdScanner extends CordovaPlugin private static class TranslationSettings
public String getRepeatText() {
return mRepeatText;
} | 0 |
fbd7dff4b808a2d19aa4ebb4ff5dfe2f | dd278527532d95d3203f573362fb7938 | NewCommonRemote creates a new common interface that operates on a remote server | lis, err := net.Listen("tcp", fmt.Sprintf(":%d", testServerPort))
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
s := grpc.NewServer()
cni.RegisterRemoteCNIServer(s, &testCNIServer{})
go func() {
if err := s.Serve(lis); err != nil {
log.Fatalf("failed to serve: %v", err)
}
}()
return s
} | 0 |
22fd2675e3b4a770c2b1b25e83a9d74b | 4cab2ae0062a023f742cb6a923b2d7d2 | log the cropping box positions in the original (un-zoomed) image | font = cv2.FONT_HERSHEY_SIMPLEX
if zoomed:
radius = 0
scale = 0.25
else:
radius = 3
scale = 1
offset = 175
if x < self.shape[1] - offset:
position = (x, y)
else:
position = (x - of... | 0 |
24bbff125e69ae3498aa0a239ce23bc5 | e417fcaa1180a955ee52b62d1f95ca67 | 分片,浅拷贝一个数组对象 | {
var newObj = {};
for(var key in obj)
{
var element = obj[key];
var type = typeof element;
if(element.constructor === Array) newObj[key] = utility.copyArray(element);
else if(type === 'string' ||type === 'number'||type == 'boolean')newObj[key] = element;
else{
... | 0 |
b41a64f0119ba69e41c11335de642c06 | cfd04207cb0ae4c8890c1fdcdde28176 | Orders the authors in descending order of the number of rentals their books have | def sortByAuthor(books):
pass | 0 |
24659e3fd9d003c5eb950680fb3965e2 | dbcab90f3243d16c9fc9a1789e75a0cd | Builds Elasticsearch API request parameters | params = {
:key => @api_key,
:format => @format,
}
if options
options.each { |key, value|
case key
when 'limit'
params['api_max_responses'] = value
when 'embed'
params['api_embed_codes'] = value
el... | 0 |
375ec03a35c63df9b6016da081f588e7 | 3e3a8a83ec9e0ed1b77bfa8371936426 | Gets the username of this OnappCredentials. | public class OwnCloudAnonymousCredentials implements OwnCloudCredentials
@Override
public String getUsername() {
return null;
} | 0 |
80183abab4f978a6a5b12938e3afd3d9 | a3bc0ce2ca0bbfe40cfc3f556717ff71 | Funcao que le o nome do jogador a partir de um arquivo texto | char ch;
int i;
int contador = 0;
for(i = 0; contador < 2 && i < TAM_NOME - 2; i++) {
scanf("%c", &ch);
if(ch != '"') {
str[i] = ch;
} else {
i--;
contador++;
}
}
str[i] = '\0';
} | 0 |
4aa92553f81039aa9facb7728f84d7c2 | 4dd1915699052e1e85ce1f0ee3502822 | 检查用户token,是否过期,设备号是否一致 | class TokenModel extends Model
public function auth($token){
$where = array();
$where['token'] = $token;
$token_info = $this->field(true)->where($where)->find();
if(empty($token_info)){
$this->error = '该token不存在';
return false;
}
$where = array();
... | 1 |
e7184eeaf56bef27af06d6aca7f0b925 | 48a0b79ab91a73c0e25afd4bca3886f3 | 判断是否属于线下充值类型.
优先从Redis中取数据,当Redis中的数据为空时,从数据表中读取数据 | public class CommonUtil
public static int isPlatformPayFee(Long payeeUId){
return BooleanUtils.toInteger(isPlatform(payeeUId));
} | 0 |
5816924152a82f910ecd90ec627dc630 | 0efb32e743d8149116b38cb5392c5ca6 | получение в порядке наибольшего like новостей | class GetPosts{
function getPostsOrderByPopularity($from,$to,$after,$amount)
{
$postsOrderByPopularity = [];
$likes = Like::where('created_at', '>=', $from)
->where('created_at', '<=', $to)
->get();
if (empty($likes)) {
return $po... | 1 |
7f46e6b314123c3a7fa2cc9768c243f6 | 5344e00088b99b2c96903c26a4656caa | dispatch a HID Set Report Response event. | uint8_t* const ReportID,
const uint8_t ReportType,
void* ReportData,
uint16_t* const ReportSize)
{
memcpy(ReportData, HIDReportBuffer, HIDReportState.length);
*ReportID = HIDReportState.ID;
*ReportSize = HIDReportState.length;
HIDReportState.ID = 0;
HIDReportState.recvlength = 0;
return true;
} | 0 |
660e0c78377601ef7a48644eb22da2bb | ad1fae4a699ad5d0547549481c853b45 | creates file with the questions on the client's machine | def client(host, port, file_name):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
add = socket.getaddrinfo(host,port)
addr = add[0][4]
except socket.gaierror:
print("error")
sys.exit()
file_name2 = "test.txt"
sock.sendto(file_name2.encode('a... | 0 |
c05ac967bc27ab0b2868920954304eac | d2d0c41113ffaf0c901f8644e44976e9 | Multiply the specific frame by the RBG color intensity. Animation is referenced
by name. | namespace ChromaSDK
public class ChromaAnimationAPI
public static void CopyKeyColorAllFrames(int sourceAnimationId, int targetAnimationId, int rzkey)
{
PluginCopyKeyColorAllFrames(sourceAnimationId, targetAnimationId, rzkey);
} | 0 |
caf7a3765f9d34350c44ac61ab9f66de | c25b611d5ee09c83ea10561ce3923cd5 | Get the difference in microseconds. | public class Times
public static long getMicrosSince(Time time, long previousMicros) {
return time.getMicroseconds() - previousMicros;
} | 1 |
0648a5a9f5d1dcd2503142b0aab048ec | f4b8cee216c5384d280383ee93c7de50 | Fixes #11 - some city data have odd extra words that we will strip out | city_alt = []
city = _clean_nonalpha(city)
state = _clean_nonalpha(state)
country = _clean_nonalpha(country)
if country:
try:
country = country_to_iso(country)
except ValueError:
_LOGGER.warning("invalid ISO2 country code: %r" % country)
country = ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.