query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
e12660c185a8dd7adbdc66f5b0f28a61 | 24cb0c044083b2de21baaba885d6e684 | Updates a legal entity's ID Number | updateIdNo(state, payload: string) {
state.idNo = payload;
} | 1 |
3d85e307ae2a80a78a86f1522c1f65ad | 374b9a61780896ba9ab0fdea8d2f0ab3 | Возвращает путь к загруженному изображению пользователя | {
if ($this->userimage == null)
{
return '/img/default-user-image.png';
}
return '/uploads/' . $this->userimage;
} | 1 |
79270849152701eb15610df29c3c6e87 | 510ad119d20d56246030c75d1172d039 | Enables compression of css | function compressCss() {
return gulp.src(path.join(config.tmp.css, '/**/*.css'))
.pipe(cssnano())
.pipe(gulp.dest(config.tmp.css));
} | 1 |
6020199504e72659cb7c30adecbe85a6 | 12279a5f84f6667d7acbc07416ea9055 | @brief Reception des donnees du protocole.Fonction a mettre dans
la boucle principale. | {
#if __DEBUG__
printf("function %s called\n", __func__);
#endif
if(simptcp_get_flags(buf)==0 && sock->socket_type == nonlistening_server){
sock->simptcp_receive_count++;
lock_simptcp_socket(sock);
stop_timer(sock);
memcpy(sock->in_buffer,buf,len);
sock->in_len=len;
sock->socket_state_receiver=wait_packet... | 1 |
404e66228bbf1490b64b3f2c3f54b6f6 | 67318b061e1f1bc8153895ca6d720178 | Returns an array of format [user_id, movie_id, actual_rating, predicted_rating]. | class UserDataset(Dataset):
def __getitem__(self, idx):
user_id = self.users_list[idx]
items = [('1',)] * 10
ratings = [('0',)] * 10
j = 0
for i, rate in enumerate(self.users_dict[user_id]["rating"]):
if int(rate) > 3 and j < 10:
items[j] = self.users_... | 0 |
befecca2dfcb11f4e955508f868c901d | c017e830cc99fb126c1fe985b382b192 | Renders PayModal component | class SettingsStripePayment extends Component
render () {
renderLog('SettingsStripePayment');
const { classes } = this.props;
const {
donationWithStripeSubmitted, numberOfMonthsService, organizationWeVoteId, payByMonthCostPerMonth, payByYearCostPerYear, paymentError, pricingPlanChosen, stripeErrorMe... | 0 |
0a48494cac8939e48aa9b26113eaa819 | fe80c15ba332ee7aa8ba55a73d404ec2 | Return a string summarizing the command-line arguments. | class ArgumentHelper(dict):
def commandline(self) -> str:
return '{short_prespace}{short_flags}{long_flags}{params}'.format(
short_prespace=' -' if len([f for f in self.flags if len(f) == 1]) else '',
short_flags=''.join(flag for flag in self.flags if len(flag)==1),
long_flag... | 1 |
ee63c234810458f995ae075fde0d771b | 7f801a071769f5cb2557670317dcf415 | get last saved id of teachers | namespace ElectronicJournnal.Models
public class TeachersDB
public static int GetTeachersLastIndex()
{
int id = 0;
string connectionString = @"Data Source=DESKTOP-81JSABO\SQLEXPRESS;Initial Catalog=ElectronicJournal;Integrated Security=True";
string sqlExpression = "[sp_G... | 1 |
70f9375a71de288182f2a696279893b2 | 39d369f3fe7ca1bf9a4f1dd74c88227d | Rotacion inmediata del objeto | {
quat.rotateZ(this.rotationQuarternion, this.rotationQuarternion, (angle / 180) * Math.PI);
this.localChanged = true;
this.childs.forEach((element) => element.worldChanged = true);
} | 1 |
93456591ed7f91645e311ed555ee0846 | 216b16c95d01699f24b45fb9c0541af9 | Returns the meta object for the containment reference '{@link de.hub.emfcompress.ObjectDelta#getOriginalProxy <em>Original Proxy</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getContainedObjectsDelta_RevisedObjectContainments(); | 0 |
48bbc52ad239ced45e16e357813d99d3 | f0a7b314ac68602f0603a820f396f6d4 | 根据键值从数据库获取数据 | class GetParams:
def get_db_data(self,key,way='one'):
return self.db.select_data(self.common.get_sql(key),way) | 1 |
0b56646212b0828963f3e5426d131269 | b189f8c6fe2d611e218831da777f0f68 | 根据KEY获取服务器端Application作用域中的用户登录错误次数信息 | public class HttpSessionTool
public static Integer getLoginErrorNumber(HttpSession httpSession) {
return (Integer) httpSession.getAttribute(LOGINERROR_KEY);
} | 0 |
b6c9a0a097408dbf10ed8bf0109b1792 | 96174493708d165a0c04d6be76c87792 | Delete filter cookie when user presses clean filters button | function flushFilterData(grid_id) {
$.removeCookie(grid_id);
$.removeCookie(grid_id + '_pageSize');
window.location.reload();
return false;
} | 1 |
0ef1f962bd04fd947973b8eaf43113f5 | 8d264a2545956af0c558cff5e18d2ee2 | Returns all types of this game server. | public function types()
{
return $this->belongsToMany(Config::get('admin.type'), Config::get('admin.game_type_table'),
Config::get('admin.game_foreign_key'), Config::get('admin.type_foreign_key'));
} | 1 |
358eeeba8dda535af459b593ba8b9cc8 | 4528165c3ac0602863f19900440bee1b | apply current filter to target panel | {
if (FilterPanel.activeSelf == false)
{
CameraPanel.gameObject.SetActive(false);
LaserPanel.gameObject.SetActive(false);
LensePanel.gameObject.SetActive(false);
MirrorPanel.gameObject.SetActive(false);
ObjectivePanel.gameObject.SetActive(f... | 0 |
75789f315427f652acb6c09fcd694ae4 | 22420d887c88ecf77c240d4bd5d52d1f | decode的预处理:url安全的Base64编码,-替换成+,_替换成/,.替换成= | class Base64_UrlSafe{
public static function base64_urlSafeDecode($str){
$find = array('-', '_');
$replace = array('+', '/');
return base64_decode(str_replace($find, $replace, $str));
} | 1 |
ab9305f6b9f306c6317000d3ca58fc33 | 4b5205c3f6007097c9857f8c6b014f1b | ! @brief stops the FTM timers for inverter switches | void stop(void)
{
TCE0_CTRLA = 0x00;
TCF0_CTRLA = 0x00;
_delay_us(1);
TCE0_CTRLB = 0x00;
TCF0_CTRLB = 0x00;
TCE1_CTRLA = 0x00;
TCF1_CTRLA = 0x00;
_delay_us(1);
TCE1_CTRLB = 0x00;
TCF1_CTRLB = 0x00;
} | 1 |
2623d5f059e67a0b81ea8fa8504e3efa | 9f3884952d1eeef395c276933c063ca2 | Trapezoidal membership function generator. | fset = [1, 11, 14, 15]
values = [0, 1, 1, 0]
points = [0.5, 1, 5, 11, 12.3, 14, 14.07, 15, 22]
memberships = []
for p in points:
memberships.append(fuzzy.trapezoid_membership(p, 1, 11, 14, 15))
plt.plot(fset, values)
plt.plot(points, memberships, 'o')
... | 1 |
35972c9e53bf3415ca03efb1641c6b35 | fcbfa39d2bff1fcdcc3f5299e5c981c5 | Передвинуть выбранный слой на топ | QTreeWidgetItemWithLayer *selected_item = dynamic_cast<QTreeWidgetItemWithLayer *>(ui_->layerTree->currentItem());
if (selected_item == nullptr) return;
if (selected_item->layer_file->rank == (configuration_->layers.size() - 1)) return;
int nBumped = selected_item->layer_file->rank;
selected_item->l... | 0 |
668c666c717b4e55b09a733cc3a7b4ad | 5cb512f821bdf2b12157dcf35d15d4a2 | Lock the file to prevent access from another process. | class WindowsLockFile(SystemLockFile):
def _lock_file(self):
try:
msvcrt.locking(self.fp.fileno(), msvcrt.LK_NBLCK, 1)
except IOError:
raise LockError(self.fp.name) | 1 |
37335c230ad9e94345e460cdf17b4898 | 83bd1b113ac05e837d197b3716ca57df | 获取user对应的product | public List<Product> getProductByUserId(Integer userId) throws Exception {
return collectioninfoDao.getProductByUserId(userId);
} | 1 |
fb0736a24c63050537b31a2a98e2a413 | 2275118580f62357884538df3f9c4936 | Sends a string as download.
If you want to send a file, use {@see ControllerTrait::file()} instead. | {
Request::sendNoCacheHeaders();
header("Pragma: public");
header("Content-type: application/download");
header("Content-Disposition: attachment; filename={$fileName}");
echo $content;
exit();
} | 1 |
991c2186ca4c6acfaa3fefc32b5944f6 | 4eaa31efcab254e0dd8f5c6a78e1f8b7 | Damages the current entity by the input damage.
If the damage input is greater than the entites current health, the entity will die. | {
damaged = true;
currentHealth -= damage;
slider.value = currentHealth;
if (currentHealth <= 0 && !isDead)
Death();
} | 1 |
1b91d7874811360dbb4395a11cdfb9b5 | 96854959dd8162da9cee101cb10a19c2 | 获取用户创建的活动 | class activity extends CI_Controller
public function getfromMyAct(){
$name = $this->session->userdata('username');
$res['allAct'] =$this->activity_model->fromMyAct($name);
$this->load->view('activity/act_headbar');
$this->load->view('activity/activity_my',$res);
} | 1 |
d28ba167464901a3e56ba99c407af3cc | fa2dad832217158ca1e81639cb40a53f | Update scale factor for renormalization scale.
This invalidates cache of cross section before smearing. | bool Ostap::Math::BetaPrime::setScale ( const double value )
{
if ( s_equal ( value , m_scale ) ) { return false ; }
m_scale = value ;
return true ;
} | 1 |
f17e01ef7b7903ac6aba53206a409947 | 41c8c3e9304afda4f8022abcda281ee4 | 从字符串的指定位置开始截取到字符串结尾的了符串 | public class StringUtil extends org.springframework.util.StringUtils
public static String subSuf(CharSequence string, int fromIndex) {
if (isEmpty(string)) {
return null;
}
return sub(string, fromIndex, string.length());
} | 1 |
5d6284c377a3d58601571a7dde191c37 | 681ea411fa3f21d978c1d3b560ce12fc | The Pac Man machine uses OUT to port $0 to set the interrupt vector, so
we have to remember the value passed. | void irq0_handler(registers_t * regs) {
outportb(0x20, 0x20);
irqmaster_handler(0, regs);
} | 0 |
0e8f497df733e8d0fdf42fee0ea98d2a | 076a5d3e06000a0e002a443757d86082 | 按照员工姓名批量删除 | {
using (ERPEntities db = new ERPEntities())
{
var delEmpsQuery = db.emp.Where(u => Emp_IDs.Contains(u.emp_id));
db.emp.RemoveRange(delEmpsQuery);
if (db.SaveChanges() > 0)
{
return Json(new
... | 0 |
66d33243a609ec17cf8c31ada1a60c65 | 80a0ab34d6613e74c8a3a7a39ac04e00 | 根据姓名查找并修改学生年龄的方法 | public Object updateUser(String username, int age) {
UserEntity userByName = (UserEntity) this.findUserByName(username);
if (userByName != null) {
String sql = "update userentity SET age = ? WHERE username = ?";
Object[] args = {age, username};
int update = jdbcT... | 1 |
7b383454ec37f344c77fc680ceaa8f0b | 1bcf9f69df8e73a27e84b7cbb51bfb1a | ! Stop recording a demo. | namespace SKX
public partial class Level : World
private void UpdateDemo()
{
if (Recording != null)
{
RecordDemoTick();
}
if (Playback != null)
{
PlayDemoTick();
}
} | 0 |
2b4ea89714d96006a598508a6fcac830 | 8dbf06cbf954e310d6621a6b2f2feb93 | Sets whether to disable the predictive animation.
Useful when items are changed and take some time to reload the adapter.
Used only with srvInconsistencyWorkaround. Reduces (or removes) inconsistency exceptions. | class NPALinearLayoutManager : LinearLayoutManager
override fun supportsPredictiveItemAnimations(): Boolean = false | 1 |
cc440f063af934d83bc20f45ce0d9ca2 | cd5e6de249130fb2d7a669e2810f0d1a | Dump all keys | {
while (true) {
foreach (new Iterator\Keyspace($this->redis, "*") as $key) {
$this->outputIntoConsole($key);
}
}
} | 1 |
56f547c31aa4688ee46e0b8d898a6cae | 2978f84d4cc7fb6d1b6d4ac219e7b0f9 | 播放闲置动画 | function ShengXiaoRecycleView:PlayAni()
if self.effect_cd and self.effect_cd - Status.NowTime <= 0 then
local bundle_name, asset_name = ResPath.GetUiXEffect("UI_guihuo_lizi")
EffectManager.Instance:PlayAtTransformCenter(
bundle_name,
asset_name,
self.node_list["EffectObj"].transform,
2.0)
self.effect... | 1 |
8f7276fcc1cee2e1616aac55e0d8ca90 | 6ec4c4c015efa9025aeb87c6099320cf | Returns the meta object for class '{@link be.ac.vub.uml2cs.instantmessenger.DefaultJabberTransport <em>Default Jabber Transport</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getDefaultJabberTransport(); | 1 |
20993d3efaabcb35a53b3a6eb2869038 | 6262c3ff176dfe63c847ce73eeff7b13 | Method that returns page with information about available rooms. | class RoomController extends Controller
public function index(Request $request)
{
$room = Room::where('availability', '>', 0);
if ($request->has('name')) {
$room->where('name', 'LIKE', '%'.$request->name.'%');
}
if ($request->has('city')) {
$room->where('city'... | 1 |
618bf967429f1203ea5fd88527c22664 | d26546c6d4b160c15825ddd7d5f12a79 | [START datastore_update_entity] | global $datastore;
$key = $datastore->key($kind, $keyValue);
$entity = $datastore->entity($key, $newData);
$datastore->upsert($entity);
} | 1 |
26c04cf6f97ff88c1edab36d16b051b0 | 1ae7e1ff5c2e71a0712a9e0110c0ac1b | Flag to indicate that this is the mgmt interfaceto be used for VDU configuration | url="system?attributes=mgmt_intf%2Cmgmt_intf_status&depth=2"
response=getRESTcx(ip, secinfo, url, globalconf)
if response:
if "ip" in response['mgmt_intf_status']:
if response['mgmt_intf_status']['ip']==ip:
return "mgmt"
else:
return "default"
... | 1 |
76e58290c86a7362ea82401ca13225e5 | 345bb0d0d40c7f50529890237a2ac879 | Test we can use the reference syntax to get values | val instance = ReferenceTypeObject()
assert(instance.value == "A")
instance.value = "B"
assert(instance.value == "B")
} | 0 |
17242d3c2f3b5cb379577099df038454 | 04e654996c9055970648059fb0e495a7 | Function: create_literal | assert(literal != NULL);
if(size==0) size = strlen((char*) literal);
xstr* self = xstr_create();
self->data = (uchar*) literal;
self->size = size;
return self;
} | 1 |
1d8663bb40847cd3e1bedce90b828641 | bb190b7be4938bdf2284a9323acb4dde | Get amountTakenByBusiness | Optional<String> getTaken(); | 0 |
7a00d727cd28fa3d07fcf9449439811f | ffca750545de1569938ffd5b6c7df663 | With the help of firebase auth-ui we are loading the login screen. | function showFirebaseUI() {
document.getElementById('firebaseui-auth-container').style.display = 'inline';
document.getElementById('loader').style.display = 'none';
document.getElementById('signingin').style.display = 'none';
} | 1 |
fe847a99e402fa38ff7146eb72a0555a | 64f776abed6f915c8b07e9d8ee1ca694 | Class merge operation as specified in ABI. | SelectionDAG &DAG) const {
SDNode *N = Op.getNode();
MVT VT = N->getSimpleValueType(0);
if (!DAG.getTargetLoweringInfo().isTypeLegal(VT))
return SDValue();
SDValue LHS = N->getOperand(0);
SDValue RHS = N->getOperand(1);
SDValue Carry = Op.getOperand(2);
... | 0 |
32706cdebf3678a198123369ae2ffb3c | 3b10870f6b720d639bfffafe0ec3e4be | returns if the status bar is set to visible | boolean isStatusBarVisible(); | 1 |
b28e6e598b0f0af127d4ae62ec1afa9a | 0490740e64f413aa15f70624adf1ffbe | Group low value counts domain as otherss and same domain group together.
Create domain suffix feature | class Domaine:
def __init__(self):
self.domains_list = data_frame['Domaine'].values.tolist()
self.main_domains = [item for item, count in collections.Counter(self.domains_list).items() if count > 1]
self.main_domains.sort()
self.domaine = dict(enumerate(self.main_domains)) | 0 |
9fc6aab2f499fa7f19cd3016f0805a13 | 2e5463cc90645b5963d6653aaaf84161 | 批量删除客户跟进联系记录 | namespace CommonService.DAL
public partial class C_Customer_Follow
public bool DeleteList(string C_Customer_Follow_idlist)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("delete from C_Customer_Follow ");
strSql.Append(" where C_Customer_Follow_id in (" + C_C... | 1 |
f0671e70081b3866171f1f37a10eee87 | 236ed8104b00a34a7f50c06562e6e19b | 根据条件分页查询ApplyVehicle列表 | namespace RM.Busines.DAL.TrainApply
public class TrainApplyE_Dal
public static DataTable GetTrainApplyPage(StringBuilder SqlWhere, IList<SqlParam> IList_param, int pageIndex, int pageSize, ref int count)
{
StringBuilder strSql = new StringBuilder();
strSql.Append(@"SELECT * from Tra... | 0 |
dbf22fa9ab2a2de9ffaaf4f158351a9c | b8fd7fda9b353b80ae72d6f91d1db0fd | Get points within a rotated bounding box (3D version). | def compute_box_3d(width: float, height: float, length: float, location: Tuple[float, float, float], rotation_y: float,
P: np.ndarray) -> Tuple[Optional[np.ndarray], np.ndarray]:
R = roty(rotation_y)
x_corners = [length / 2, length / 2, -length / 2, -length / 2, length / 2, length / 2, -lengt... | 1 |
b4661bc853d8720aec833f167bd64fb8 | 941780c9813336d7babdb32a0a357077 | 保存数据,只要知道url即可,兼容增加和修改两种情况 | class DataAction extends BackendAction
public function save() {
$id = $_POST['id'];
$table = $_POST['table'] ? $_POST['table'] : $_GET['table'];
$model = D(ucfirst($table));
if($_POST['save']) {
$model->startTrans();
switch($table) {
case 'page' :
break;
case 'content':
break;
case '... | 1 |
e41184c8ab4e58affa54a26e0e657a4f | 4e627c70a9325c1d505e71f4b4df77e1 | Test classes | def test_class():
with pytest.raises(
TypeError, match="Can't instantiate abstract class BE1 with abstract methods"
):
BE1()
BE2() | 1 |
50b6a3f0c4d913aead8c4ed9745c2c76 | d99c5447990b53f4bfc3e0a1b88257ef | 设置当前时间并填充当前时间进度条颜色 | var $time = $('.time');
$('.current-color').text('当前颜色为:' + currentColorMap[currentColor])
$time.css('color', 'green');
$time.text('60s');
$time.data('seconds', 60)
} | 0 |
f448db8c3027d2c5fd179c08dd60a891 | 5e8d40c64bc45a0269eff987e12ce1fb | Отправляет пустое сообщение клиенту | class Server(threading.Thread):
def answer_client(self, addr):
self.broadcast_socket.sendto(str.encode(""), addr) | 1 |
4e2dd07976a10913eba51c0764e844e2 | 9954092f331d2294dce1e6a1fc517ed8 | 更新功能点状态 | {
if (this.CurrentCustomerID > 0 && this.CurrentFunctionID > 0)
{
CustomerFunctionConfigModel model = new CustomerFunctionConfigModel();
model.FMC_Customerid = this.CurrentCustomerID;
model.FMC_FM_ID = this.CurrentFunctionID;
... | 1 |
ebc31a5d1be781165c22f3790e8ec313 | ca033e7c1d14e10ec573b255b0595e86 | 获取时柱所在旬 | public class SolarLunarUtil static class LunarInfo
private static int getTianan(int cyclicalNumber) {
return cyclicalNumber % 10;
} | 0 |
89d92e823d5a3c86735822287628e76d | d9a43f142c8076e13645edb13da80828 | Returns false if we are in an inappropriate state to retrieve the
remote endpoint | {
const struct spair *remote = z_get_fd_obj(spair->remote,
(const struct fd_op_vtable *)&spair_fd_op_vtable, 0);
if (remote == NULL) {
return false;
}
return true;
} | 1 |
3779898241e703b0390e023e780a4d13 | c36cbab9cc3c18adecd8bb328cc0bdbd | @brief Method for cloning the sheet. | class PropertySheet(object):
def clone(self, safeCopy=True):
raise NotImplementedError("Not yet implemented...") | 1 |
e16430dffe5bd215fa097e08f6b4e54e | a3a83ed762925cb65792a3da6861803e | GET: DevXtraReport | namespace G_Accounting_System.Controllers
[SessionExpireFilterAttribute]
public class ReportsController : Controller
[PermissionsAuthorize]
public ActionResult Index()
{
return View();
} | 0 |
37d81e31abcadd83e951f3b01ae24cdc | 3021af1d9cb21518b7cb5d4b3fad2689 | 点击选择合约 | class HangQing(AppUI):
# ----------------------行情所有数据------------------------------------
def clickXinGuRiLi(self):
self.find_element(*self.xingurili).click() | 0 |
9512d5db58e6e83f46cd153c09d5c9ec | ab343a1da0a0af6cd8ae76f8febc1938 | 登录后转发到vip页面 | public class MainActivity extends Activity
public void toVip(View view){
Intent intent=new Intent(MainActivity.this,VipActivity.class);
startActivity(intent);
} | 0 |
c0f8a37df65b3b1614a5017ca3cec8d4 | e84a8a841b833f64079d18fc474e02d6 | @brief Widget::refreshMemoryTable
根据进程PCB信息刷新内存展示表格 | {
for( int i = 0; i < 512; i++ )
{
QStandardItem *dataValue = new QStandardItem( "0" );
dataMemory->setItem( i, 1, dataValue );
if( i < 16 )
{
QStandardItem *address = new QStandardItem( "0x00" + QString::number( i, 16 ).toUpper() );
dataMemory->setItem( i... | 0 |
cdcc9034722b30d5d096fce18bb62bc6 | 0875da92b6314be9f7301e3235a39657 | get all algorithms having a specific rank | {
for (RankList rankList : values())
{
if (rankList.getPermission() == permission) return rankList;
}
return EXPLORATEUR;
} | 0 |
6682951fdf594fa84d9eb0dff2a6fce1 | 67e0a34cd02ae83e30b5326bd75dac00 | [X_poly] = POLYFEATURES(X, p) takes a data matrix X (size m x 1) and
maps each example into its polynomial features where
X_poly(i, :) = [X(i) X(i).^2 X(i).^3 ... X(i).^p]; | X_poly = np.zeros((X.shape[0], p))
for j in range(p):
X_poly[:,j]=(X**(j+1)).T
return X_poly | 1 |
1667d2ab5b81b8e25a1a4b7aa947196b | 2deca3926a201379b8ee624971561c58 | perform one HMC trajectory (w/ accept/reject) | class BaseHMC:
def astep(self):
q0 = self._trace.samples[-1]
p0 = self._trace.metric.random(self._trace.random_state)
start = self.integrator.compute_state(q0, p0)
if not np.isfinite(start.energy):
self._trace.metric.raise_ok()
raise RuntimeError(
... | 1 |
f34c886a51375fe042fdb9181f04887b | a3a7a40953dfbaf9e2ac7dcb4aa39797 | Modify all URLs in the template to be relative to the application root,
to support applications hosted in subdirectories of the web root | class PrettyPageHandler extends Handler
public function setApplicationRootPath($applicationRootPath)
{
$this->templateHelper->setApplicationRootPath($applicationRootPath);
} | 1 |
0be1c731eac705276931a2c10c157643 | fe9ce1f992849c448c36db552ab7e0f8 | Tests an URL for blind SQL injection vulnerabilities. | class BlindSQL():
def __init__(self, target_url, target_exploit_fmt, table, row_id, sql_benchmark_iterations, threshold_ms, user_agent=None):
self.target_url = target_url
self.target_exploit_fmt = target_exploit_fmt
self.table = table
self.row_id = row_id
self.sql_benchmark_itera... | 1 |
7cb45f597e2eaa0fefab8c81684fa1f7 | fc17e4b45398115c52b7029e9ea77801 | Funkcja upraszczająca wyrażenie poprzez wyszukiwanie składowych alternatyw, które mogą zostać połączone | table_operands = filter(lambda op: operand_states[id(op)].suitable(), expr.operands())
if not table_operands:
return
table_vars, table_var_operands = {}, {}
for oper in table_operands:
table_var = operand_states[id(oper)].table_var
table_var_id = id(ta... | 1 |
4296c98b19632adb652ca65f61c26c1e | bb22ba6375079eede378cda4d8e346f3 | Updates an existing Channels model.
If update is successful, the browser will be redirected to the 'view' page. | {
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post())){
$model->updated_at = strtotime(date('Y-m-d H:i:s'));
if($model->save()){
return $this->redirect(['view', 'id' => $model->name]);
}
} else {
return ... | 1 |
1ff76093a6289bed786772900cdc109c | 91250cbe652211dbd118af062821ed13 | 根据视频code查找视频 | public String selectVideoCategory(String code); | 0 |
11d1f32b472c162211b0b65819095a63 | 22de19f75af408d531e94b9799b0eec6 | récupère le type de pouvoir (1 à 4) du joueur | {
Random rac = new Random();
int ptype = rac.Next(1, 10);
System.Threading.Thread.Sleep(50);
return ptype;
} | 0 |
f95af9ba89444cbb4caad12f1974bc8e | e352c35de6239c580452be4afa05e8d7 | @brief Thread which sends delayed messages for TCPCI partners | void send_thread (void) {
uint32_t i = 0;
while (true) {
i++;
message_t *message = mpool.alloc();
message->voltage = (i * 1) * 33;
message->current = (i * 1) * 11;
message->counter = i;
queue.put(message);
wait(0.01);
}
} | 1 |
878131df5e20e6a6d7c634390a751c7a | 24eb887cbf4dfd5d2a28d3c589590669 | 計算したNEPを保存する関数 | void save_rireki(int result_predict)
{
return;
} | 0 |
9a15f62e654293213dea4983e115e1b5 | 86a294e7a7b4f214557e28cd704eac0d | renvoie le coefficient de degré demandé du polynome courant | public class Polinom
public int getGrad()
{
return grad;
} | 0 |
8d8b75f7ce21dbb386f142cce0f9b3ee | 1eb60b3a000929d67a08deac7265cba0 | unlock the XMLGrammarPoolImpl object so that it accepts more grammars
from the validators. | public class SpringSphinxRecEngineFactory implements BeanFactoryAware public class GrammarFactory extends BasePoolableObjectFactory
public void passivateObject(Object obj) {
} | 0 |
e45eacb4aa687614afd68787aa8ee3e5 | 03d278f79989d2312d78d9c035afb09a | Removes indexed element from the collection | class Collection extends ImmutableCollection implements CollectionInterface
public function remove(int $index): void
{
$this->checkIndexExists($index);
unset($this->storage[$index]);
$this->storage = array_values($this->storage);
} | 1 |
5940c5c0084fffe35b917334df496dfe | f950201b79af334fbdb0377931dc7a04 | @brief Used to check the working of the function delete from beginning | TEST_F(ListTest, popFront){
string testString[] = {"A","B","C","D","E"};
for(int i = 0; i < 5; i++){
list.insert_back(testString[i]);
}
EXPECT_EQ(8, list.getCapacity());
for(int i=0; i<5; i++){
EXPECT_EQ(testString[i], list.pop_front());
}
EXPECT_EQ(4, list.getCapacity());
... | 1 |
dbb0e4917f5cafd3a370efaf9e2aeb23 | 83df4bca6a18f95cf53277176cb92161 | Soma a Quantidade Especificada ao Valor de Leitura do Hodometro | public class OdometerController : MonoBehaviour
public void SetValueBy( int increment_by )
{
_value += increment_by;
SetValue( _value );
} | 1 |
b9d7aa1286cfed235cae0cab144e4012 | 1b1fa91345b67acb47bc99f28f3879bd | POST: CheckEval/Create | namespace FaculdadeSI.Controllers
public class AvaliacaoController : Controller
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "IdAvaliacao,DescricaoAvaliacao,Expiracao,Titulo,IdUsuario,IdPerfil,AvaliacaoStatus")] Avaliacao avaliacao)
{
if (Model... | 1 |
a849ceadf1f416ac01e4e095efed6cc5 | 490edcc923a7bbc4d483471aa226eb59 | Gets the type of parameters in a single array. | {
CommonExceptions.CheckArgumentNull(method, nameof(method));
Contract.Ensures(Contract.Result<Type[]>() != null);
var parameters = method.GetParametersNoCopy();
if (parameters.Length == 0)
{
return Type.EmptyTypes;
}
var types = new Type[parameters.Length];
for (var i = 0; i < types.Lengt... | 1 |
3af872a83507540b9774dc612c3c0d4c | af647f0df736b98fda2847044bcf84fc | Check whether the dice specified in the attack are possibly valid | class BMAttackPass extends BMAttack
public function find_attack($game, $includeOptional = TRUE) {
return $this->validate_attack(
$game,
$this->validDice,
$game->defenderAttackDieArray
);
} | 1 |
b55b489e821d72f90a32ecc55eda5473 | 87795b8cf340106418cd9b10e6d0d86c | Writes the generator tag to the output. | {
if (tagVersion != ID3Version.ID3v1 && tagVersion != ID3Version.ID3v11)
{
throw new UnsupportedVersion();
}
_output = output;
WriteID();
WriteString(metadata.TrackTitle);
if (metadata.Artists.Count > 0)
... | 0 |
ee24b43140c7a41778af1a16e28856d8 | 00e7ee1bc3ba89b2f91b74213b96f880 | 初始化一个缩放进度条 | export default class Scale extends Component
protected async initialize(options: object): Promise<AMap.Scale>
{
return new Promise<AMap.Scale>((resolve, reject) =>
{
AMap.plugin(["AMap.Scale"], () =>
{
const scale = new AMap.Scale(options);
thi... | 1 |
c97e628d95ebad0a9ddeb8f3868b94b8 | 2f8bbb6edf99213de4b17df784a40aa1 | Compra um upgrade | $.get('/cartpurchase/unique/'+id,function(data){
data.obj.qtd++;
$('#text'+id).val(data.obj.qtd);
$.post('/cartpurchase/update',data).done(function(response){
if(response.data.ok == true){
console.log("cartpurchase updated");
}
});
});
} | 0 |
c0254bfe477666e578a6304fbfe272b8 | 39758b93afcafab51f843fe5d9918a02 | Convertit le MCU en NIVEAUX DE GRIS de RGB à YCbCr | void Image::RGBtoYCbCr(vector <float>& block, size_t _pos) {
size_t offset = _pos * 64 * channels;
vector<float> blockCurr;
blockCurr.insert(blockCurr.end(), block.begin() + offset, block.begin() + offset + 64 * channels);
for (size_t i = 0; i < 64 * channels; i += channels){
block[offset + i] = 0.f + 0.299f * bl... | 1 |
388dba49665ac72ad80d522998104e6b | 6979a021ce702d4f3fa38dc7dc4b6f1c | set up local files for transfer with CONDOR | with open('cleanAndFinalize.jtf', 'w') as submit:
submit.write( "Universe = local\n" )
submit.write( "Executable = /home/GLBRCORG/mplace/projects/condor/Condor-RNA-Seq-Pipeline/rnaSeqCleanUp.py\n" )
submit.write( "getenv = True\n")
subm... | 1 |
57d2052b78ed3d06036bf891e7500f8c | 97951cc18bdc39f10bc37187d0d887df | Test nucleotide contribution map generation. | class TestReport:
def test_codon_mapping(self):
dna_analyser = DNAAnalyser()
result = dna_analyser.get_amino_acids_report(
"AAACCCAATTTTTTACACAGCTGCTGGGCCCAGT"
)
assert result.get("Proline") == 1 | 0 |
e4987204f60a5f771a7983fca899bcac | 0b96ba2fbd1689bd5101f9ac76dba951 | Returns the uncertainty in the trimbit required to set the threshold to a given energy, based on the
energy fit results. | class FETSEval( TStepperEval ):
def get_eps1t_eng( self, sctx, u ):
eps_eng = self.get_eps_eng( sctx, u )
eps0_eng = self.get_eps0_eng( sctx, u )
if eps0_eng != None:
eps_eng -= eps0_eng
return eps_eng | 0 |
d02fa3c61ebd96aab6285e41b77ad817 | 4b2f9408f6bfd064852db77f3f03218a | 根据广告名称和广告分类编号查询广告信息 | List<AdVerTiListVO> findAdVerTiListVoListService(String adVerTiName, Integer advertisingTypeId); | 1 |
ff014bbf4ffe293a78a57bcf2b9569c4 | 573906f228fff2ee58961f86f0d4a5da | Get value at given x position and channel using the specified
interpolation. | float nn_interpolate(image im, float x, float y, int c)
{
int newX = (int)round(x);
int newY = (int)round(y);
return im.data[newX + newY * im.w + c * im.w * im.h];
} | 0 |
8af5dc353180ddfb4c8efd0ea55624ca | bc5753ff69c9e1526684525af42845f3 | Check if the current GUI can use the mouse click. | public class Zen
public boolean freeMouse() {
return s.isPaused() || s.getRandomManager().isSolving() || Instance.getInstance().isMouseInputEnabled();
} | 1 |
7ca1a24aaefa37120c44a49d7ba3a54c | b99fd5c2bb6d785c4a45a3218f4819d9 | 给OM发送请求 | if (!isNetConnect(mContext)) {
return;
}
if (TextUtils.isEmpty(sendRequest)) {
return;
}
String request = sendRequest;
ws.sendText(new Gson().toJson(request));
} | 1 |
e007168d1676037c96947c32f0af0463 | a59e8aae3619c6f2f6a19eb097737d0a | 現在の月(ただし、urlで指定された月を示すので、今月とは限らない.)を返す | class AppModel extends Model
function getCurrentNendo($strdate = null) {
if ($strdate == null) {
$year = intval(date('Y'));
$month = intval(date('m'));
} else {
$year = intval(date('Y', strtotime($strdate)));
$month = intval(date('m', strtotime($strdate)))... | 0 |
183413a3c5bdeafda3aa9972bc90e9fd | a6427c9e77143da23f9baf03be2cdae2 | This methods is used to establish the Used Table View list based on a list of Strings | listViewEn = dbViewFacade.findByName("viewPage", "trend");
if (currentLang.equals("EN")) {
listViewTr = new ArrayList<>();
listViewTr = listViewEn;
} else {
listViewTr = new ArrayList<>();
listViewTr = translateList(listViewEn, currentLang);
... | 0 |
33838465b80a4a78dc740ba8f932345a | 5637f6058331210256d6e6c3f1575db6 | 반려견 체중 리스트 조회 | List<DogAnatomyVO> findDogAnatomyList(HashMap<String, Object> map); | 0 |
073202c7abe877577b9bfb51e7333f48 | e20a63bc0ae168fb9df95ad3ccfb8f01 | Resets the Display text when cleared and resets the variables
Also makes sure it is back to FIRST OPERAND of the equation | {
_type = OperationType.Null;
CalculatorDisplay.Text = "0.";
TempDisplay.Text = string.Empty;
_firstValue = _secondValue = 0;
_theInputs = string.Empty;
_pressedEqual = false;
} | 1 |
46a0d0026bbd1080e155052486622871 | 1b5488a5a672415ad2939026e80d4437 | Muestra por pantalla la combinación secreta de la máquina que lo ejecute, es
implementada de su clase padre | public class DiscoMusica extends Audiovisuales{
public void showMe(){
System.out.println(getFicha());
} | 0 |
e859740fee7a6df9dfda98220476abd1 | 3629605f69f58c9f6a5682c930761999 | Locks a file | def lock_file( file_path ) :
os.chmod( file_path, S_IREAD | S_IRGRP | S_IROTH ) | 0 |
a0d5c8c5ee91ac822a1ad708170058e0 | 92e06916572b0baebfc3abd3704fab2f | Init DPOT SPI (SPI0) | void driver_spi_init(void)
{
SPI_InitTypeDef SPI_InitStructure;
SPI_StructInit(&SPI_InitStructure);
RCC_PeriphClockCmd(APBPeriph_SPI0, APBPeriph_SPI0_CLOCK, ENABLE);
SPI_InitStructure.SPI_Direction = SPI_Direction_FullDuplex;
SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
SPI_InitStruct... | 1 |
80104178ae5dbfea00e6358a9b8b3e81 | 51cc8db423a48b84ce5819b299b12e7d | 删除所有score数据 | HashMap<String,Float> map=getAllValue();
for (Map.Entry<String, Float> entry : map.entrySet()) {
String key=entry.getKey();
delete(key);
}
} | 1 |
e0b5cc8671bebad9a8b5cc33aa22bef1 | bc882321d09a3c58ac803c2f6cb384af | Initialize data holder for recording of error data | class Zhe800PintuanParse(Crawler):
def _data_error_init(self):
self.result_data = {}
return {} | 1 |
34a2d46a35a1db6795b329f5ce0e0aca | 49cea6a661386c3b3f5dde15cf86946d | Decrypts a cipher that has been encrypted via AES-CBC | cipher = OpenSSL::Cipher::Cipher.new('AES-128-CBC')
cipher.decrypt
cipher.key = key
cipher.iv = message[0 .. 15]
return cipher.update(message[16 .. -1]) << cipher.final
end | 1 |
308dc249d262a4925959509ed91380cf | a11eb66668278424226450d5470200a2 | loop voor het laten runnen van het spel | class Game():
def run(self):
self.playing = True
while self.playing:
self.events()
self.update()
self.draw()
self.clock.tick(settings.FPS) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.