query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0b8940f286e0f6332e6447aea434f3ff | ea07f51e625252cd44046937ebc9ff9f | Deletes a koalibee record from the database. This method can only be accessed
by a system administrator. Authorization is handled by the business logic. | @RestController
@RequestMapping("/a")
@PreAuthorize("hasRole('ADMIN')")
class AdminController
@DeleteMapping("/r/{id}")
fun deleteRecord(@PathVariable id: Long, principal: Principal): Msg<*> =
adminService.deleteRecord(User(username = principal.name), recordRepository.findOne(id)) | 1 |
7b0af2287138bf5515f9b5dad10d8565 | 959e30201de18cb9229774a10b2bcb4b | Returns the downloaded bytes per second averaged over the past few seconds. | public int getBytesReceivedPerSecond(); | 1 |
23b6244f19f7c70f1c8f0fd1e708989b | eac793799882e56cf411f9abc95b44de | 根据创建时间查询企业名录列表信息 | @Service
public class XlEnterpriseInfoServiceImpl implements IXlEnterpriseInfoService
@Override
public List<XlEnterpriseInfo> selectXlEnterpriseInfoList(XlEnterpriseInfo xlEnterpriseInfo)
{
return xlEnterpriseInfoMapper.selectXlEnterpriseInfoList(xlEnterpriseInfo);
} | 0 |
dada8c9ae3b497949d3ea935fe308467 | e6ae563c7054fec7b937b142c47a8490 | 获取异常对象
异常捕获模式下,在异常发生的情况时流程进入Error控制器的error动作时,获取当前发生的异常对象. | abstract class Ethna_Controller
public function getActionError()
{
return $this->class_factory->getObject('error');
} | 0 |
6d8f5c4086d8026fd64d671b91adcfa3 | 1d0d72cfb335e28c9ddac2d7f689303f | initListReservas() - Inicializa uma lista vazia | list->head = NULL;
list->tail = NULL;
list->current = NULL;
} | 1 |
f93a4e8d3082ce0e7c7cba74e1c40874 | 261941b344e1053954770d968c22867f | Internally sets data field keys and values based on the current Page button properties. | {
lblCurrentPage.Text = currentPage.ToString();
lblCurrentPage.Attributes.Add("style", "font-weight: bold ! important;");
currentPage--;
lbtnFirstPage.CommandArgument = "1*" + addHashQuery;
lbtnFirstPage.Href = Request.Url.AbsoluteUri.Split(new char[] { '?' })[0] + "?" + addHashQuery.Replace(";", "&").... | 0 |
d542bbee33b73c1efa03e354afad7ed8 | 58614ccb566e1e6386fbd9a2bf98423a | Goes through a result array and removes the numeric keys
from the hashes | decoration_data.each do |key, value|
source_hash[key] = value
source_hash.delete_if do |_, v|
v.nil?
end
end
source_hash
end | 0 |
b0faeccc49eb0e3fc27125b4508d69b1 | 06de0c8bc2d408db9589fe93984ef0d9 | 继续视频 | if (Global.getInstance().videoType == 1) {
try {
let pointUI = $('.w-point');
if (pointUI.length > 0) {
pointUI.remove();
}
for (let item of Global.getInstance().playData['point']) {
pointUI = $('<div/>',{
'class':'w-point',
'attr_time' : item['time'],
'attr_title' : ite... | 1 |
890ec25f978d821a623715b136b6273a | 68d7b25c2244586e7e9649755bd7549c | Finishes the asynchronous execution of the ModifyDBSubnetGroup operation. | namespace Amazon.ElastiCache
ModifyUserGroupResponse EndModifyUserGroup(IAsyncResult asyncResult); | 0 |
ce9ae1eadf3918a20a48075aae97079f | 03a348adee3e03cf69058db56a42df0a | muphic が既に起動されているかをチェックする。 | static void Main()
{
string mutexName = "mml2vgmIDE";
bool createdNew;
using (Mutex mutex = new Mutex(true, mutexName, out createdNew))
{
if (!createdNew)
{
if (Environment.GetCommandLineArgs().Length > 1... | 1 |
9194520af29ec4b0a70f51e089d020ab | 6da2d67886e9bf2f2be96199479e00bb | Return earliest departure time. | class Flight(object):
def departureTime(self, format=None):
if not self.departure_time:
return ""
if not format:
format= TIME_FORMAT
return self.departure_time.strftime(format) | 0 |
3700ff777ee185b0f82e668700e929c9 | 81fad09202f2ef1ceb077d68089199c5 | Play the Tic-Tac-Toe game randomly. | class Computer
def Play
_r = rand(1..3)
return Battle.getElement(_r)
end | 0 |
886e792e16665dff539ae3a69a1a6ee8 | 2c6192be2a4e36d40d5b3d33c2f765c0 | Returns the targets command line options as an array | {
if(!this.parseCalled)
{
throw new IllegalStateException("Method parse not invoked");
}
return this.nonOptions.toArray(new String[this.nonOptions.size()]);
} | 0 |
310791c1f1385e250cdd0a242b297ba2 | e763f0a39053ec8a39a090301dcad340 | @brief Control the depop of the headphone mute. | void Audio_AioMute_Headphone(BOOL para)
{
#ifndef CONFIG_ENABLE_AUDIO
para = para;
#else
analog_aio_master_hpout_lineout_RBUS HP_LINEOUT_MIX_REG;
HP_LINEOUT_MIX_REG.regValue = rtd_inl(ANALOG_AIO_MASTER_HPOUT_LINEOUT_0x3910);
HP_LINEOUT_MIX_REG.bitField.mute_left_amp = para;
HP_LINEOUT_MIX_REG.bitFie... | 1 |
fe83b8807853ffb4cca895531f131f6b | a7fd50394e0195563a35051ff0b7c442 | In the backward pass, we receive a Tensor we need to compute
the surrogate gradient of the loss with respect to the input.
Here we use the piecewise-linear surrogate gradient as was
done in Bellec et al. (2018). | input, = ctx.saved_tensors
grad_input = grad_output.clone()
grad_input[input<0] =0
return grad_input | 1 |
58f621cf5db5bacafd7e0bacb5659afa | fe131216f944a90960b66a1e6ad65796 | 合并矩阵 | {
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
{
MAP[i][j] = unionNum[MAP[i][j]];
}
}
} | 1 |
e0c1b8206257d2760d99aeb2939b3d7d | 56709ab246942e0fe57742befab37201 | converts the text in the textbox to an array of names | public class PlayerInitiation extends JFrame
public void setNames()
{
playerNames = new String[iterations];
for(int i= 0; i<iterations; i++)
{
playerNames[i] = name[i].getText();
System.out.println(playerNames[i]);
}
} | 1 |
cd2c6f2363fd3044d3ee84534f316bc7 | 5793a53bb33db30a2fa6e9a6d2f5818c | 减少管理员的金钱数目 | $visitor = & env('visitor');
$behalf_money_row = $this->my_money_mod->getRow("select * from " . DB_PREFIX . "my_money where user_id='$user_id'");
$sell_money = $behalf_money_row['money'];
$sell_money_dj = $behalf_money_row['money_dj'];
$new_money = $sell_money + $jd_money;
... | 0 |
e1f2d6425bf0be88306993424f18905f | 95e41a8ff5608972cc2fe4cb9ddff430 | Verificamos si un caracter contiene un salto de linea. De contenerlo, se lo quitamos | class zen_compactador
function _unificar_saltos_linea($cadena)
{
return preg_replace ("/\015\012|\015|\012/", $this->_opciones['salto_linea'], $cadena);
} | 0 |
ae4c4ffa7d5178c2afe2bd257335555f | 9b5738f38ed4b1722e76667697704b95 | 用cookie获取验证码,返回Image对象 | top, bottom, left, right = self.get_position()
print('验证码位置', top, bottom, left, right)
screenshot = self.get_screenshot()
captcha = screenshot.crop((left, top, right, bottom))
return captcha | 0 |
f89e3d2a0488c55867265d50251c6f45 | 6c92d6952803ceebb1e28b235f0fc24c | Validation method for XxhcmOvertimeDetailsAllEO. | {
bool status = false;
if (base.Validate())
{
if (this.ValidateDate(this.dateOfHire))
{
if (this.ValidateDate(this.dateOfTermination))
{
if (this.ValidateDouble(this.salary))
... | 0 |
c50fab21900309098a138ae8f697dad3 | 72bc269d2d28e2d9cff6c51590337efd | # Função para pegar o Triangulo superior da matriz de correlação: | get_upper_tri <- function(cormat){
cormat[lower.tri(cormat)]<- NA
return(cormat)
} | 1 |
c0f8a23527164350ddbb78af2f83da49 | c474f2780c1c1c47d5ad3287742e29d4 | 是否开启在未连接设备发送数据时自动打开默认搜索页面 | public class RobugControlActivity extends ControlActivityTemplate
@Override
public boolean autoConnect() {
return true;
} | 0 |
1bbbae955eaa76b99e8cc208d6f5480c | eaeaf56faf692fc48da085eebe9cb436 | free-running microsecond counter | #if F_CPU >= 20000000L
__asm__ __volatile__(
"nop" "\n\t"
"nop");
if (--us == 0)
return;
us = (us << 2) + us;
us -= 2;
#elif F_CPU >= 16000000L
if (--us == 0)
return;
us <<= 2;
us -= 2;
#else
if (--us == 0)
return;
if (--us == 0)
return;
us <<= 1;
us--;
#endif
__asm__ __volatile__(
"1: sbiw ... | 0 |
9e9ac1c3dacd14317fe6df25cf6c8785 | 07240672f50cd650886a13929fa721ee | special directive found in most Objective-J files | _cpp_handle_directive (cpp_reader *pfile, int indented)
{
const directive *dir = 0;
const cpp_token *dname;
bool was_parsing_args = pfile->state.parsing_args;
bool was_discarding_output = pfile->state.discarding_output;
int skip = 1;
if (was_discarding_output)
pfile->state.prevent_expansion = 0;
if (w... | 0 |
3160b43bc85cd3434e69433fcf78bc71 | 8d37f8acddc4e584b7cc12a980902e2a | 点击界面中的点以生成对应的标高 | var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene._imageryLayerCollection);
var positions = [];
var tempPoints = [];
var polygon = null;
var cartesian = null;
var floatingPoint;
handler.setInputAction(function (movement) {
let ray = viewer.camera.getPickRay(movement.endPo... | 1 |
a36ecbe33b9089abf87ed40d24e9e85e | 3d10bf35ea5686024534ccc7eae8ab2d | Gera saída de quantidades de agentes mosquitos visão dengue para lotes | {
if (!isset($size)) {
$size = 60;
$dadosSala1 = sala1::latest()->take($size)->get()->reverse();
$dadosTemp = laboratorio::latest()->take($size)->get()->reverse();
$dadosSala2 = sala2::latest()->take($size)->get()->reverse();
}
$sizePadrao = 60... | 0 |
6a10a71b4fae1642a454267e55319aab | 3ed3f4e30bc780caf662134caf2aee04 | 同一时间仅允许存在一个活动 | @ResponseBody
public Response saveActive(VoteActive active) {
try {
SimpleDateFormat format = new SimpleDateFormat(DATE);
if(format.parse(active.getEndTimeStr()).getTime()-format.parse(active.getStartTimeStr()).getTime()<=0)
return Response.getError(MessageExceptionEnum.TIMESETTINGISWRONG);
active.setS... | 0 |
ad0168de6e6d2f41c2dd960b11f06c83 | a8c8d8133d289f837e2483fd0e333d32 | 取带锁的库存信息 | var lockQuantity = "";
dwr.engine.setAsync(false);
if(productId == "") {
lockQuantity = 0;
} else if(stockId == 0) {
lockQuantity = 0;
} else {
lockStockService.findLockStock(companyId, productId, stockId, function(qry) {
if(qry != null) {
lockQuantity = qry;
} else {
lockQuantity = 0;
}
}... | 1 |
fea092846cb7a31549a065ba1d6a3795 | 9da9d852b723acb73be46afabd401d0f | Deserializes the JSON file to __objects
if the JSON file exists; otherwise, do nothing) | try:
with open(self.__file_path, encoding='UTF-8') as a_file:
objects = json.load(a_file)
for key, value in objects.items():
self.__objects[key] = models.classes[value["__class__"]](
**value)
except FileNotFoundError:
... | 1 |
126e394c2ff41b95e3ccf14b3ffa26f3 | 0805f2985ebdf8772b98deb31e865d87 | обработчик события при нажатии на чекбокс | namespace PriceCheck
public partial class Form4 : Form
private void checkBox1_Click(object sender, EventArgs e)
{
if (checkBox1.Checked == true)
MessageBox.Show(openFileDialog1.FileName,"Выбранный файл");
} | 1 |
f4557c920d78b8a3ec2759eb07c1e76b | 12f6664466b36cada3c2f3553575bf4a | 使用post修改车辆信息 | public String ModifyCar(Cars cars,MultipartFile img) throws IllegalStateException, IOException{
String path = "F:/JavaWorkspace/car/WebContent/carImg";
File dirFile = new File(path);
if (!dirFile.exists()) {
dirFile.mkdirs();
}
if (img.getSize() > 0 && ("image/jpeg".equals(img.getContentType()) || "image/... | 1 |
fa49d2485548afe4bc4e1e10d3477e27 | 7fb634d3c6c5934e7d34fc36e652c7b4 | Goes from options back to main menu | public class PauseMenu : MonoBehaviour
public void ReturnFromOptions()
{
optionsPanel.gameObject.SetActive(false);
} | 0 |
eb08be2da44fa8f5c826f8544c0805c7 | 7efeaf5514522207e479e4102513d9b3 | Gets the "EventFilter" attached property | namespace Amazon.AppIntegrationsService.Model
public partial class GetEventIntegrationResponse : AmazonWebServiceResponse
internal bool IsSetEventFilter()
{
return this._eventFilter != null;
} | 0 |
05abd5aa1bc400d2884b99a9696d7c6c | a935cc8fc1d04429de679feb7258a935 | 设置消息类型和消息ID的对应关系 | int MessageProcess::InitMessageIdMap()
{
REGIST_MESSAGE_PROCESS(CMT_LOGIN_RESP, "LoginResponse", ProcessLoginResponse);
REGIST_MESSAGE_PROCESS(CMT_PUSH_MSG, "SvrPushMessage", ProcessSvrPushMessage);
REGIST_MESSAGE_PROCESS(CMT_HEATBEAT, "HeartbeatMsg", ProcessHeartbeat);
return 0;
} | 1 |
7c5324834bec6b550ac646407074b60d | ef99c08d0b653b3706974cc9dff7640c | Returns the value of the '<em><b>Test Run Name</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Test Run Name</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public final class TestRunInfo
@CheckForNull
public String getSuiteName() {
return suiteName;
} | 0 |
6961befd2cd2d580b34ce22b6d9978bd | 42764274e260577a52a3b5105b57ee58 | Download a file from the input `remote_file_path` and save it to `local_path`. | remote_file_path: Path,
local_file_path: Path):
with open(local_file_path, "wb") as file:
self.retrbinary(f"RETR {remote_file_path}", file.write) | 1 |
71eec2f72ae714efa8646adc433f3107 | 2077b90540f05a1ac8a504ac482a6df2 | Obtains a level 2 patient group for given level 2 scores for a patient-
visit. | eligible_for_treatment, onset_to_needle):
p_good_eligable = (0.2359 + (2e-7 * (onset_to_needle ** 2)) -
(4e-4 * onset_to_needle))
p_good_eligable[onset_to_needle > 270] = 0.1328
p_good_ineligable = np.zeros(onset_to_needle.shape)
p_good_ineligable[:... | 0 |
3e4e1615a4eaef8d56fdcc8cf83d4d0e | 05032ebf23c98b89d1f75875e472e7a4 | Receives a notification of a mapped configuraton being passed to a service. | {
var configArgs = e as ConfigurationEventArgs;
if (configArgs != null)
ProcessConfigurationArgs(sender, configArgs);
} | 1 |
9b8313bf1da1055989c4b2af0957a04b | c2caf255b6774a4a4bbdd843fbeb84d6 | r"""Integer specifying the priority of the listen policy. A higher number specifies a lower priority. If a request matches the listen policies of more than one virtual server the virtual server whose listen policy has the highest priority (the lowest priority number) accepts the request.<br/>Default value: 101<br/>Maxi... | class InlineResponse2003(object):
def listen_port(self):
return self._listen_port | 0 |
1cfbf9187eafe7289c0e5e5db2e7f2cf | 9a0e3e57f1c576fb7d0f36ca5f12d1a5 | 根据id定位文本框并清除内容 | class Downloader_Selenium(Downloader_Abstract):
def clear(self , id):
return self.driver.find_element_by_xpath("//*[@id='"+id+"' and @rows='"+1+"']").clear() | 1 |
f4d0c8eb62325c479efd66bb137a3de3 | b98c6f6dad70990cb0aa90951d758610 | =============================================
Funcion para actualizar una fila en la tabla puertas_valores_preliminar
============================================== | $user=user();
$pass=pass();
$host=host();
$port=port();
$dbname=dbname2();
$sql="UPDATE ".$table." SET ";
for($x=0;$x<count($array);$x++){
if($x!=count($array)-1){
$sql.=$array[$x]." = ".$array1[$x].",";
}else{
$sql.=$array[$x]." = ".$array1[$x];
}
}
$sql.=" WHERE ".$pkt."=".$pk;
... | 1 |
3d08be049cb88e597508e372d068f72a | bd07626504b501aef9a5de1efa0abcaa | Creates a server remote from a declaration | return nf.LocalDecl( pos.markCompilerGenerated(),
nf.FlagsNode(pos, def.flags()),
nf.CanonicalTypeNode(pos, def.type()),
nf.Id(pos, def.name()),
init ).localDef(def);
} | 0 |
bbdef5a0919b77f7889550623f35a0cd | 186c5e7e38afc2ddff383fd0c61b6d50 | Set the value of [mileactualtotalcosts] column. | {
if (TotalAmt == null) throw new IllegalArgumentException ("TotalAmt is mandatory.");
set_Value ("TotalAmt", TotalAmt);
} | 0 |
127eb81999725fcb4fe872abcf96ad7b | c870d40eb39ca70978243ce1805edf8c | calculate total number of sectors on disk | {
uint8_t n;
uint8_t csd[16];
uint16_t csize;
uint32_t sectors = 0;
SDSPI_Object *object = handle->object;
SDSPI_HWAttrs const *hwAttrs = handle->hwAttrs;
SemaphoreP_pend(object->lockSem, SemaphoreP_WAIT_FOREVER);
assertCS(hwAttrs)... | 1 |
b470c0ebbac75cd1e0aae382dd4372a8 | 2f9602e0eb8fac6a2cca28dd55ec28fd | 최대 8개까지 출력 | for (var i = 0; i < data.length; i++) {
if (data[i].materials.length >= 8) {
console.log(
data[i].title + " " + data[i].materials.length + " " + data[i].materials
)
}
}
} | 0 |
341f1dae950f94ea45ecda143defc875 | 49ed8aa15728b223f4b6961dadd92980 | 2019.10.23 10:20 最后修改 :以字典形式返回精灵的状态 | res = {}
res["x"] = int(self.pos[0])+0
res["y"] = int(self.pos[1])+0
res["D"] = time.time()<self.__beingDamaged
res["A"] = self.alive
return res | 1 |
a76c344db4115503a8b0020d72b5ec6f | cc2b7321ba661bf5f55c4fa8abeaf8c5 | 返回合法日期date2与date1之间相隔的天数 | Calendar calendar1 = Calendar.getInstance();
calendar1.setTimeInMillis(date1);
Calendar calendar2 = Calendar.getInstance();
calendar2.setTimeInMillis(date2);
int y1 = calendar1.get(Calendar.YEAR);
int y2 = calendar2.get(Calendar.YEAR);
int d1 = calendar1.get(Calen... | 0 |
30a8414d4989d6676df6bda97b617595 | 75a0d0f01c868c88bca29b4004a13d4d | 定时移除验证码 | function _timing(el) {
let seconds = 60;
let timer = window.setInterval(() => {
if (seconds <= 0) {
seconds = 0;
getCodeFinish = true;
el.removeAttr('disabled');
el.html('获取验证码');
clearInterval(timer);
return;
}
el.html(`${seconds--}s`);
}, 1000);
} | 0 |
af98d1901b5ed95ac8c1fa18078fb92d | 6d2e3e107264d7ead1cc7c5d974ca633 | expr := factor expr'
expr' := '+' factor expr' |
:= '*' factor expr' |
:= factor | class LangParser(Parser):
def expr(self, p):
return ("sub", p.expr0, p.expr1) | 0 |
ea5ebbf71bfd704d776ae74dae27611c | 4b5e61b7c1cb9115bf9779f6e5f4f360 | check if an angle is in range of two other angles. | if (abs(angle2 - angle1) < ANGLETHRES) {
return true;
}
return false;
} | 0 |
c686a3ac75ccabe1f8af3f6786381a56 | 8067f4a9d045fd5d3a14d9d854a8d2a4 | Convert this vector to (geodetic) lat- and longitude. | final Phi p = new Phi(this.gentenB, this.x);
final double phi = p.getPhi();
final LatLong llcnv = new LatLong(this.y, phi, this.gentenL);
this.lat = new Dms(llcnv.getB());
this.lng = new Dms(llcnv.getL());
} | 1 |
edb1374b71e4d9deed8746208c6476b7 | 390b4e612a8dbf1d6fcf25203174ed69 | Clean up a string, remove double-spacing etc. Anything that might have been
mis-entered by a user. | def clean_string(text):
text = text.strip()
text = text.replace('\r\n', '\n')
text = text.replace('\r', '\n')
text = space_newline_fix(text)
text = newline_space_fix(text)
text = space_space_fix(text)
return text | 1 |
ca4ac44747dd75b39b51ade3b600f18b | 2db3a8c162670d1e3c680d71c4a9d76a | Prints the initial report of a PushGP run. | prog_comp_time = 0. * u.h
prog_part_alloc = 0. * u.h
prog_part_time = 0. * u.h
prog_notstart_time = 0. * u.h
num_prog_comp = 0
num_prog_started = 0
num_prog_notstart = 0
aprint = '{0:<20}{1:<15}{2:<15}'
lines = ['', '', '\t-- ' + description + ' --', '', aprint.format('... | 1 |
79b706daa419f1228ce99308ac3d9adb | e00f3736770b8f99934dbfdcead1b589 | processes selection made using a mouse drag selection box | public class GameShipManager : MonoBehaviour,
IPointerDownHandler,
IDragHandler,
IPointerUpHandler
public void OnDrag(PointerEventData eventData)
{
if(!Input.GetMouseButton(0)) { return; }
rectSize += eventData.delta;
selectionBox.position = rectPosition + new Vector2(rectSize.x / 2f, rectSize.y / 2f);... | 1 |
abcb61e27454cbff5cc9e5edd47a6aa9 | 1fb6f51ae0f8032322cf703546eb7eb1 | Método responsável pela busca de todos os usuários e suas respectivas permissões de acesso | class AuthController extends Controller{
public function allUsers()
{
if (Permission::current_user_can('manage_users') === false) {
return abort(404);
}
$passdata = [];
$passdata['user_table_comumns'] = $this->user_table_columns();
return view('auth::allUsers', $... | 0 |
025adf343db496892fbcef1f18639338 | 8d0647f1d563ecedfa86543ec4dbbbaf | project inmap to reference lattice, allocating outmap | static void link_map_to_sdf_cell (MAPTABLEPTR map)
{
IMPCELL **imp_p;
struct stat buf;
char *fp, *hn, *rem_path, hostname[100], filepath[512];
imp_p = NULL;
if (!Nelsis_open) return;
if (_dmExistCell (projectkey, map->cell, map->view) == 1)
{
map->library = this_sdf_lib;
if (map->view == ... | 0 |
80b911415a694824d09725aa1cccd0be | dc8ce10f2343a9820744658f66235121 | integer divide rounding towards zero | function ediv(x,y) {
return Math.sign(y) * Math.floor(x / Math.abs(y));
} | 0 |
8c6349c5fda49cfa8fa6d9d3bc723a75 | d60a5a25669c8b5d34afe4db871b87e1 | Find regular (not mode select) sram ports of a circuit model | namespace openfpga
void add_formal_verification_sram_ports_to_module_manager(ModuleManager& module_manager,
const ModuleId& module_id,
const CircuitLibrary& circuit_lib,
... | 0 |
0c9fe31ec6bc44b77451c13c0ca38540 | f178ecacc87418abfe6943eb80ff230c | Draw standard pin (pin connection point, pin number and pin name) | void SdPartImpPin::drawWithoutPad(SdContext *dc) const
{
mPin->drawImp( dc, mPinName, isConnected() );
} | 1 |
9133aa9e04b7a1d65a404f2743f4b8e7 | 92f66e279586797c9e0c8120dd422d13 | Handles the right mouse button event. Here the values of the materials are reset, depending on the state. | const SMaterial& material, const SMaterial& lastMaterial,
bool resetAllRenderstates, IMaterialRendererServices* services)
{
} | 0 |
45d3958b2573bd011df1802f1f372b79 | 8c7eeb2611abd2c376f79c5e8c192c60 | Measures the battery output current (Amps) as averaged over the
previous minute. Negative values indicate discharge while positive values
indicate charge. | double deltaTime;
if(lastTime < 0) {
deltaTime = 0;
} else {
deltaTime = Timer.getFPGATimestamp() - lastTime;
}
double fac = Initialization.pdp.getTotalCurrent() * deltaTime;
chargeAmpSeconds += fac;
chargeTotal += fac;
lastTime = Timer.getFPGATimestamp();
return chargeAmpSeconds / 3600;
} | 0 |
c7131622b0ace21cc84cf1372b1467d5 | a769dff5326dfb665df78d1a2b555a26 | Проверка цифровой подписи по сертификату и свёртки по ГОСТ. | public class SecureManager
public Boolean verifyCMSSignature(String sigantureToVerify, String signedData) {
verifyErrorMsg = "Ошибка не определена";
try {
CMSSignedData cms = createCMSSignedData(sigantureToVerify, signedData);
SignerInformationStore signers = cms.getSignerInfos()... | 1 |
1fadbfe3fec396c595e13a85bad50373 | df3af032d7c3306e4dcab1c56a81fb0e | unhides the guides | const elements = document.querySelectorAll(".wizard");
elements.forEach(el => {
if (!el.classList.contains("hide")){
el.classList.add("hide");
}
});
} | 0 |
95a96536d9a27612b3aa834ddd3d78cd | 66aa0a5b608342c6a7f0644654200279 | function that handles the logic of allocating people to rooms | indexed_people: List[Person] = []
for i in range(len(arrangement)):
if room_number == arrangement[i]:
indexed_people.append(self.get_people()[i])
return indexed_people | 0 |
0d6e1b569f2ce09ebfaf9384a6fc97d2 | 11ba3edaea568f9d15b6a18e9d9513dc | 设置工厂的地址 | set factory(value) {
this._factory = value;
this.factoryIsReady = true;
} | 0 |
de32d038d0afd9c1eb2ad1d282be3c5d | 3d865c9832c4a2aefd4fc8a26e0aa0d7 | \brief
Measures and returns the VDDA voltage.
\details
This function measures voltage on VDDA terminal of the chip and returns
the result, alternatively the result is stored in the
UL_testing_Tuning_VDDA_VOLTAGE_VALUE register of data structure.
The VDDA voltage in mV. | {
if(meas_ptr->meas_internal != NULL){
struct PAC1720_meas_internal * internal = meas_ptr->meas_internal;
return internal->v_sense_voltage_reg;
}
return (uint16_t) (PAC1720_UNSIGNED_ERROR << SHIFT_IN_BYTES_OFFSET) | PAC1720_UNSIGNED_ERROR;
} | 0 |
0d663d257d0efd0a7e8b84909afdf77e | cc30aeaabe1fd1254c1e3d5d9b413d6e | Test get_used_characters method with upper letters, numbers and special characters | void test_getCountSpecialChars() {
String test = "abcdefghijklmnopqrstuvw !";
TextStatisticsImpl text = new TextStatisticsImpl(test);
assertEquals(2, text.getCountSpecialChars());
test = "ABCDEFGHIJKLMNOPQRSTUVWXYZ !";
text = new TextStatisticsImpl(test);
assertEquals(2, text.getCountSpecialChars());
tes... | 0 |
5f362d4bf0c14b841fce69f721d27389 | 621cdc1790ec408b0d94efce14ccb155 | 加载更多是否总是展示
如果true,会一直展示在最后一个item
如果false,只有当数据超过一屏时,滑动到底部才展示
默认为false | public class LoadMoreRecyclerView extends RecyclerView
public void setShowAllLoadView(boolean showAllLoadView) {
if (showAllLoadView == this.showAllLoadView) {
return;
}
this.showAllLoadView = showAllLoadView;
Adapter adapter = getAdapter();
if (adapter == null || !(a... | 1 |
7dd8381ff4f5b28981c6d6ffa673283c | 33018fc7a682e1ab47d1dbf7f05ffe95 | Returns the meta object for the containment reference '{@link at.jku.weiner.c.parser.parser.ExpressionStatement#getExpression <em>Expression</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getReturnStatement_Expression(); | 0 |
af2c240c498d547ac9cad4863f0ee401 | fb2bd07a032ed7a2736c71619774f4d7 | Testcase 1:
Get block device operations while device is not yet registered | int testcase5() {
dm_init();
ASSERT(0==dm_get_char_dev_ops(10));
return 0;
} | 0 |
6d57bc37ae9ad2db33b2e65d7b374a5a | 540d93db566831fcbcc222501b206a3d | Creates a new instance of a Transmission Control Protocol (TCP) socket over Internet Protocol (IP) version 4 client. | impl SocketFileDescriptor<sockaddr_in6>
pub fn new_transmission_control_protocol_over_internet_protocol_version_6_client(socket_address: SocketAddrV6, send_buffer_size_in_bytes: usize, receive_buffer_size_in_bytes: usize, idles_before_keep_alive_seconds: u16, keep_alive_interval_seconds: u16, maximum_keep_alive_probes:... | 0 |
15e40f3d4358db7f8db3a8a93e5ebadf | 2f621d09d4f3e7d05b4a7dbcf0e8687e | 年度初めから現在の月数までの差 | $sum = 0;
$minMonth = date('Y',$min);
$maxMonth = date('Y',$max);
$sum = $maxMonth-$minMonth;
return $sum?$sum:1;
} | 0 |
aefdd90755db5cf0123c03941b35f220 | 7c9d148a6baf78bfcbc469c190fabbd2 | displaying the telemetry data on the GUI | local function printTelemetry()
if (telemVal == "-") then
lcd.drawText(145 - lcd.getTextWidth(FONT_MAXI,"-"),10,"-",FONT_MAXI)
lcd.drawText(145 - lcd.getTextWidth(FONT_MINI,"RC-Thoughts.com"),54,"RC-Thoughts.com",FONT_MINI)
lcd.drawImage(1,51, ":graph")
else
lcd.drawText(145 - lcd.getTextWidth(FONT_MAXI,stri... | 1 |
4e537caf9dd5cb831795ee17978ed625 | 288deb533809aad0ccffbdd1c3ee1a86 | Método que obtiene la lista de cursos sin estudiantes según el año escolar.
Rodrigo Uzcátegui - 09-04-15 | return db.query(`
SELECT
*
FROM
USER INNER JOIN rol_user ON rol_user.user_iduser = USER.iduser
WHERE
rol_user.state = 1
AND USER.idanio_... | 0 |
f8f0b423e83b23c48bcad9daebadc8f0 | 60d0c1400299cbf6b2463b9301782a9c | 通过get请求进行服务器的对接。 | public class GetPostTest
public static void main(String args[])
{
String s = GetPostTest.sendGet("http://localhost:8888/abc/a.jsp"
, null);
System.out.println(s);
String s1 = GetPostTest.sendPost("http://localhost:8888/abc/login.jsp"
, "name=crazyit.org&pass=leegang");
System.out.println(s1);
} | 1 |
9b9f5fa4f60cb0ab1db7ef4bff3cf603 | 01d1adc3373294f15e72e04889a93700 | 创建可缓存队列执行器。 | public class ThreadPoolIntroduction
public ThreadPoolExecutor buildCacheThreadPool() {
ExecutorService cachedThreadPool = Executors.newCachedThreadPool();
return new ThreadPoolExecutor(
0, Integer.MAX_VALUE,
60L, TimeUnit.SECONDS,
new SynchronousQueue<Runn... | 1 |
9c809a68d95c4ecec577bca8a8456a53 | 23993ab971e3af3c736bbd885a293b21 | the number of nodes left that could be queries for this
lookup. Many of these are likely to be part of the trail
while performing the lookup and would never end up actually
being queried. | inline int num_extra_nodes() const {
return param.num_nodes - param.num_roots - param.num_deleted;
} | 1 |
a468e2503b7619ea29172b7fee67d922 | b7451ffea5505acdeafc2f3eb05ab417 | Checks whether numeric input has a maximum value | function maxValidator(value: number, max: number) {
return value !== null && value <= max;
} | 1 |
868c501b01f7ada517f57ae1a87de16f | 3df6dcc351081395daaf35c72a4b1a21 | Match for left bracket '{' used to create expression capture groups.
#left_bracket = '{'; | class Lexer extends AbstractLexer
protected function getCatchablePatterns()
{
return [
'{',
'(?<={)[a-zA-Z][a-zA-Z0-9]+(?=})',
'}',
'(?<!{)[^{}]+(?!})',
];
} | 1 |
72d59cace6844703709af2d45580b75b | 689fd41188e656168f4b4ea1a7f3ae07 | run the async task to get a joke from the jokes library | var promise = $.get("https://api.chucknorris.io/jokes/random?category=dev");
promise.done(function(data) {
console.log(data);
callback(data.value);
})
} | 1 |
fbc23b18eb8cb8201ed5deddea8391ed | a5a8468ac6a53f98881268c10db7a52f | Enemy Seeks Player | public class FractionEnemy : Enemy
protected override void SeekPlayer ()
{
transform.Rotate(new Vector3(0, 0, rotateSpeed * Time.deltaTime));
base.SeekPlayer();
} | 1 |
b7bdac9735331003e68d44218df7f94b | 6e0f09699cf7077be931efcbee0067e0 | Horizontal scroll offset.
The initial value is 0, and the left edge of the text will touch the left
side of the layout bounds. A positive value causes the text to "scroll"
to the right. Values are automatically clipped into the range
``[0, content_width - width]`` | @SuppressWarnings("deprecation")
public class El
public int getScrollLeft() {
return DOM.getElementPropertyInt(dom, "scrollLeft");
} | 1 |
eddd36d4baa98d5de8b242c190367813 | deae978cda22224ea7855d2a97c4ff08 | called on click in listview
on double click adds the product selected to tableview as an order | public void onClick(View view) {
int clickedPosition = getAdapterPosition();
Order clickedItem = mOrders.get(clickedPosition);
listItemClickListener.onListItemClick(clickedItem);
} | 0 |
bbcf28dd22cc50901261f11039670fe8 | 795114b7d556d4ecb9b1af6cb1a486c2 | This method will get called when the plugins control gets invisible | class XfConPlugin(object):
def on_hide(self):
pass | 1 |
b7bda9a753032ff1aa225a9883028a3a | b76eddf636ffa34f003aa43c2d80bad0 | returns a rat's name from his id | function listino_nome($lis){
$sql = "SELECT * FROM `retegas_listini` WHERE (`retegas_listini`.`id_listini`= $lis)";
$ret = mysql_query($sql);
$row = mysql_fetch_row($ret);
return $row[1];
} | 0 |
ff434674bdec4ff6643ab19a2e23a2dd | fb3059062be463c8ea0c7ae910ae369c | The output snapshot time. | public final class GCDiagnosticsSnapshotDTOBuilder
public Date getTimestamp() {
return timestamp;
} | 1 |
ffa9b23316413b1b7d584912b6462ad8 | 3c0631a89fb05b1249a906ce3ab86557 | Test the proxy mode of the core container.
This is to ensure that the standalone container (AKA core) is
properly replaced when we needed. | public class ProxyRemoteKojiContentTest
@Ignore
@Test
public void proxyRemoteKojiArtifact()
throws Exception
{
final String path = "org/dashbuilder/dashbuilder-all/0.4.0.Final-redhat-10/dashbuilder-all-0.4.0.Final-redhat-10.pom";
Indy client = new Indy( "http://localhost:8080/api", n... | 0 |
dbbb9c2bf42bdd99e1e501cbb0d0ba49 | 07e5b0611126e8503265ea405d8186e3 | Now figure out the state of the "select all" checkbox | _updateSelectAllBox (grid = this.grid) {
let cb = grid.hostElement.querySelector('.select-all')
if (!grid.collectionView) return false
if (cb instanceof HTMLInputElement) {
let items = grid.collectionView.items
let last = null
let indeterminate = false
for (let i = 0; i... | 1 |
33b79e1f251eebe398029e7e676ac909 | 40076278f54f249583d8f1dca847c652 | Send kill signal to all osrm processes spawned under this module. This will
be executed upon script exit to ensure that there's no processes left behind | def kill_all(args, env):
env.kill_all() | 1 |
04a04bcc426debfd5432353b2eec1591 | a40d304cee4c734a2861643e2ea253fa | Lista de los Contactos existentes en el universo. | EList<Contacto> getContacto(); | 1 |
1218eaa92a0cb538fa392fac98fccff4 | 0a930233ff2b006c46c53a30a2688cfd | Handle shortcuts within an input dialog | if ( self.isDialogOpen ):
return
try:
self.isDialogOpen = True
w = event.widget
index = int(w.nearest(event.y))
value = w.get(index)
if(value.startswith(" ")):
index = index-1
value = w.get(index)
oldActive = self.uiModel.active
self.uiModel.active = False
d = ValuePromptDialog... | 0 |
048b7bfe7ba0f8f9143e503095759de4 | d7cb85cbcf05b06ee144318d0b17b9d8 | Decorator to check if an HTTP request is done with a valid api key | @wraps(view_function)
def wrapper(*args, **kwargs):
if request.headers.get('apiKey') and request.headers.get('apiKey') == current_app.config.get('API_KEY'):
return view_function(*args, **kwargs)
else:
abort(401)
return wrapper | 1 |
49e721667e3f75caa54a27bace3b29bd | aa3952c6b65e59a9b8f3dbe579526969 | Returns the host part of the DSN | {
if (($pos = strpos($this->connectionString, ':')) !== false)
return strtolower(substr($this->connectionString, 0, $pos));
} | 0 |
c5976445e016506d9a944d3c53154f34 | 34b5bee899f60c8644952124de99fe2b | Compute the gradient of the negative log-likelihood under a logistics regression model under L2 regularisation | def compute_stochastic_gradient_log_reg_l2(y, tx, w, mu, i):
return - y[i] * sigmoid(-y[i] * np.dot(tx[i], w)) * np.transpose(tx[i]) + mu * w | 1 |
fd27ee835b48350aacd1a99ae5cd4b6d | 473ea24e4d06b40fd8184f239118d9de | Handle a mouse hover select operation. | LRESULT CCustomCellSelectList::OnMouseMove ( UINT nMsg, WPARAM wParam,
LPARAM lParam, BOOL & bHandled )
{
bHandled = FALSE;
BOOL bOutside = FALSE;
INT iItem = ItemFromPoint(CPoint(lParam), bOutside);
INT iCurSel = GetCurSel();
if(iItem != iCurSel && !bOu... | 1 |
b015990d939f07780745981c2dd93af8 | 279e249d5a68783b45a235e1253197e2 | Test of atom-type assignment for opls 62, Xenon atom | correct = ["opls_206", "opls_205"] + 5 * ["opls_90"] + 5 * ["opls_91"]
configuration.from_smiles("Clc1ccccc1")
result = oplsaa_assigner.assign(configuration)
if result != correct:
print(f"Incorrect typing. Should be:\n {correct}\nnot\n {result}")
raise Assertion... | 0 |
d41604bf2f8562bafba3b8eb7d5eb6a9 | cc2108fcde1873639e204d856c4dec8c | 设定此地雷格子的状态为Normal | public class Number : MonoBehaviour
public void Init( MyGrid myGrid )
{
myGrid.SetNumber(this);
this.SetGrid(myGrid);
this.SetNumber(2);
status = NumberStatus.Normal;
PlaySpawnAnim();
} | 1 |
56f15a2e9ef36fec690dcb84c7470a57 | 1b4da5faf534b1b9db318cd65d4fe733 | 方法描述:求两个数据交集<br/>
用法:支持基本类(其它自定义类需要重写相关equals方法)<br/> | public Set intersection(Set set); | 1 |
9e35fc23b9cb84ab06a095958a08b62a | f7ea8c683fd8aa3f8848bd26c6f529e4 | Ouvre une liste d'animaux depuis un fichier XML | var xmlAnimList = earth.UserDocument.LoadXmlFile(xmlAnimListFile + '.xml');
var res = $.xml2json(xmlAnimList);
if(xmlAnimList==""){
var animXml = "<Xml><Visit NAME='visit' ID='1'></Visit></Xml>";
earth.UserDocument.saveXmlFile(xmlAnimListFile, animXml);
xmlAnimList=earth.UserDocumen... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.