query_id
string
corpus_id
string
query
string
code
string
label
int64
c5675d1e0b6e0f51c272a47d7a54ae5d
f51f9183c98597ac80cd996a49f61e39
A change server password call should fail. Will call change password expecting a "Unauthorized" exception to be raised because the call is being executed without an auth token header. The following assertions occur: - Expecting a Unauthorized exception to be raised.
provider = opp.auth.auth_providers[0] await provider.async_initialize() await opp.async_add_executor_job(provider.data.add_auth, "test-user", "test-pass") credentials = await provider.async_get_or_create_credentials( {"username": "test-user"} ) refresh_token = await opp.auth.async_valida...
0
63479fc4b3eb548fd26ae6991e8a8490
770a55b5889ac4e15164d0e3adffb233
70 % chance create a dumb zombie, 30% chance a smart zombie
protected Bot newObject() { if (Math.random() < 0.1) { return new Bot(game, botTexture, Bot.FireStrategy.AIMING_FIRE); } else { return new Bot(game, botTexture, Bot.FireStrategy.SIMPLE); } }
0
3c267d2a995ce8ee16f2a47365665a0d
047701fa324fc8c6b6c9f97dd6083c83
把添加好友请求的信息放到消息列表中
if (addFriendVerifyFilter(message)) { SystemMessage del = null; for (SystemMessage m : items) { if (m.getFromAccount().equals(message.getFromAccount()) && m.getType() == SystemMessageType.AddFriend) { AddFriendNotify attachData = (AddFriendNotify) m.ge...
0
77921475f9cb45903d91664bf506c657
ab77499a38fbcdc1b293af4cbed4bf11
carica Position.txt in memoria
ifstream datos; string s; pair<double,double> position; int n,act; datos.open(fichero.c_str()); if(datos.is_open()) { datos >> s; datos >> n; int i=0; while(i<n){ datos >> act >> position.first >> position.second; mapa[act] = position; i++; } datos.close(); } el...
1
cfe9b4057c55f6ce63811f473a094f70
bcf363ffe768fb5dd4b3926c9aff917f
Asynchronously clone a sensor or group to another device or group.
self, transport_type, device_id, module_id, hostname, symmetric_key, *, custom_headers=None, raw=False, **operation_config): url = self.create_from_symmetric_key.metadata['url'] path_format_arguments = { 'transportType': self._serialize.url("transport_type", transport_type, 'str'...
0
0fa8d02025c59e753f816928cec737fe
7642394536adc5366d5ff36e0c6d2826
根据赠送方式组装数据
function setListData(data){ var pageIndex = data.pageIndex; var giftRecord = data.list; var html = ""; if (giftRecord != null && giftRecord.length > 0){ for (var i = 0; i < giftRecord.length; i++) { var receiveName = giftRecord[i].receiveName; ...
0
cafbcee8b97b1cd446b96b0d36c92084
7388be937302d9ea725b4b4c2606d011
contient des champs de formulaire
class SiteType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('voie')->add('cp')->add('ville')->add('responsable')->add('degustation')->add('achat') ; }
1
a9f48ecf17bb334149707ac99b31e118
b9810872dc5afa93c687523581bc7891
产品类,由不同的部件组成
class AbstractProductA(object): def __init__(self, name): self.name = name
0
c72815063a9b08f4b22499ff9fba7dd6
929b8f3b1095d5a365e604e669cfcc2b
Takes in a shape and removes said shape from the model's current list of shapes. If no such shape exists in the list then this method does nothing.
public class ModelAdapter implements Animation2DModel @Override public void deleteShape(String shape) { this.in.removeShape(shape); }
1
d6505f19a848089b670dd461ef9ae7f8
7d1c750e927aac28b68b8443a2aa855f
Determines the receivers and amounts to distribute. The sender is excluded from the result set.
path = "customers/me/domains/%s/ex/distributionlists/%s/senders" % (self.domain, common_name) data = self._call(self.host, path, kwargs) return data
0
267e3ea6e7da29b5de7c6732ea5a6cf4
98888f69c13dde808e6f829f980e61b2
返回所有子孙用户组
class User extends Authenticatable implements JWTSubject, Auditable public function subUsers() { return $this->hasMany(User::class, 'parent_id', 'id')->where("is_agent", false); }
0
974f419d68e3ef34cb52b2406da43148
d96d5d40e26ba000f32806ad69e672e1
Updates all macros
{ this.macrosListView.Items.Clear(); foreach (XBuildMacroCollection.MacroNameValuePair pair in buildMacros) { ListViewItem item = new ListViewItem(new string[] { pair.MacroName, pair.Value }, 0); this.macrosListView.Items.Add(item); ...
1
15f9eee87e6ad33ae3d3308c1144ea75
c897d074ff09ca9101ca346861fee527
Fill an array with ints, with a chance of skipping
public class RND implements Serializable public static void fillInt(int[] array, int min, int max) { int base = max - min + 1; for (int i = 0; i < array.length; i++) { array[i] = seed.nextInt(base) + min; } }
0
ea0fc9e8350d93200ed6f69e7fce8b88
c65e72708f814325d35f0877e742b30f
删除审核不通过的信息
db.delete(TbZczbYh.class, WhereBuilder.b("yhInfoId", "==", infoId) .and("checkUserId", "==", App.getUser().getId()) .and("bgdId", "==", bgdId)); }
1
7840f67a4b839219037e479b843ac1c8
23eeb035d6137455f2654e13442a476d
翻译字幕文件
class VideoEditAction extends Action{ public function subtitlesCommand() { $ffmpeg_url = $this->getFfmpegInfo(); $sourceVideo = I('post.svideo', ''); $subtitle = I('post.subtitle', ''); $savename = I('post.savename', ''); $sourceVideo = urldecode($sourceVideo); $subt...
0
760e027ef42811833825948ddcc969c0
fa825fea0ed84f429d5e3ec6a4faf580
Determines if the file should be deleted when the file is replaced by an other one.
export class File get overwrite() { return overwrite; }
0
c6478845c9e319f5f66522747c5b9705
1790f6c5f604321fb43a90b7e5d1f858
@brief Get regular report payload
{ return [ 'amount' => UserReportFactory::fetchReportPrice() * 100, 'productname' => UserReportConstant::REPORT_MEMBER_NAME . ' - ' . UserReportConstant::REPORT_ORDER_PRODUCT_NAME, 'productdesc' => UserReportConstant::ORDER_DESC, 'url_params' => UserReport...
1
fac7842566baa29a9cf1497b2a000c44
a88c2a7bb26ff4100ae68a8c69803a76
Get the tags for an orderSourceStockStatus.
namespace Infoplus.Api System.Threading.Tasks.Task GetOrderSourceTagsAsync (int? orderSourceId);
0
7d20b3bdcdc68825ae9b11e423cd15be
593bbf683b9d96d7292a80041b16a532
If submit button is clicked, check input
namespace KBS2 public partial class LoginView : Form public void Submit_Click(object sender, EventArgs e) { checkInput(); }
1
451b7f1a5ad25a7b91e19f6ccb023f2e
30a50ea672130c8e7983b4b25960dd3e
Takes care of all 0x8000 opcodes.
if self.op_code == 0x00E0: self.gfx = [0] * 2048 self.draw_flag = True self.reg['PC'] += 2 elif self.op_code == 0x00EE: self.sp -= 1 self.reg['PC'] = self.stack[self.sp] + 2 else: self.reg['PC'] = self.op_code & 0x0FFF
0
b52dc98408ab41d7e5ab9b4016a404a2
073192ceab2bbae56b1e7d8361a73b4a
! Permet de recuperer un entier depuis le fichier.
char c; int i; Skip(f); i = 0; c = getc(f); while ((c != ',') && (c != EOF) && (c != '\n') && (i < taille_max - 1)) { s[i] = c; c = getc(f); i++; } s[i] = '\0'; ungetc(c, f); return (i); }
0
372c64c76caf482a572c56bf98ffc7ad
0b2fa778ae7870eb69abda9a6e1ffb40
マイページにクレジットカード情報を入力していない場合、入力を促す
$tracer.trace("GameStopMobileDSL : #{__method__}, Line : #{__LINE__}") chkout_credit_card_selector.value = credit_card_type chkout_credit_card_number_field.value = credit_card_number chkout_credit_card_month_selector.value = exp_month chkout_credit_card_year_selector.value = exp_year chkout_secu...
0
17c085893351da85445ca039d75aa0d3
2c702c6cd782f92d7e9781f2ca8ee896
抢庄动画结束
[RequireComponent(typeof(Animator))] public class AnimControl : MonoBehaviour public void OnDaZhaoxuanyaoEnd() { animator.SetBool(hashDazhaoxuanyao, false); }
1
ddc6f0a3fec6cb7da7a66a9309bfc55e
e2f98737144adf05501e12f84e99f482
xử lí khi có người chiến thắng
function win(player) { $('#info').append(`${player1.name} chose ${player1.choice}. `); $('#info').append(`${player2.name} chose ${player2.choice}. `); player.wins++; Player1.set(player1); Player2.set(player2); $('#info').append(`<h1>${player.name} wins</h1>`); $('#info').append(`${player1.na...
1
9046cb77aa3f8fe6868f6fa88756a808
3370bbc5c3c7278cb62088853b65c577
constructor requires push and pull actuator pin #'s, set to private
Actuators::Actuators(const byte *pins, const float* parameters=NULL) { pin_IN1 = pins[0]; pin_IN2 = pins[1]; pin_EN12 = pins[2]; pinMode(pin_EN12, OUTPUT); pinMode(pin_IN1, OUTPUT); pinMode(pin_IN2, OUTPUT); pin_IN3 = pins[3]; pin_IN4 = pins[4]; pin_EN34 = pins[5]; pinMode(pin_...
1
6a64a5b923974e6d231c64ca52ebcffb
00e278b6981e93975f78776d64f506bf
ISR to update LwIP stack
{ #ifdef RT_USING_LWIP extern void luminaryif_isr(void); rt_interrupt_enter(); luminaryif_isr(); rt_interrupt_leave(); #endif }
1
af8bc7b8f42c9279d2dfb82f6e0c005a
b1806641a9bdc16ff5187221559133d5
Checks bean for error report.
if (is_object ($resp) && strtolower (get_class ($resp)) == 'php_bean_error') { return true; } return false; }
1
dc03a4992921be5a7dbc76634a9c1a69
91491df4e5529a6bf9a9952e1c168512
Generate simulated GPS string latitudes with the given resolution
class \ RandomDataGenerator: def generatelongitude() -> GenerateLongitude: return GenerateLongitude()
0
e8e08ac4cc1002994f9d6147224d6213
2507a09abf9a190ec1acbd76d296f21f
根據不同的溫溼度給予相對的回應建議
public class MapTemperature extends MapScreenStandard{ @Override int calculateColorByClimate(double height, double rainfall, double temperature) { double h = 0; double s = 0; double v = 0; double temp_eigth = 0; if(temperature < 1d/8d ){ temp_eigth = temperature*8d; h = 305d - 10d * temp_eigth; s = ...
0
8215b4ba7bcb67531e1e5370e3e10add
f3f67bc7ba8054244d4fae1acfcc169e
API Version Uses the selected API backend to determine the API version.
{ $uri = $request->getUri(); $path = $uri->getPath(); $pattern = '/^\/(legacy|latest|dev|v[\d]+?)\//'; if (preg_match($pattern, $path, $matches)) { $apiVersion = $matches[1]; $newPath = substr($path, strlen($matches[0]) - 1); return $request ...
1
1b3a0c0e88ac8156af4e2e541c3f0eb3
d04711646903e40ac6d389c770051242
cut CamelCase words into multiple words only annotation <str>, not <prefix>, not <title> inp: self.__sentence <list(str)> | tokenized text self.__annotate <list(str)> | annotations upd: self.__text <str> | text without CamelCase out: None
cnt = ''.join(segment.file_content) index = cnt.find('\\annotate') if index < 0: return while index >= 0: cnt, new_ind = parse_annotation(cnt, index) index = cnt.find('\\annotate', new_ind) f = codecs.open(segment.filename, 'w', 'utf-8') f.write(cnt) f.close() inf...
0
842b84cde1b81ba4066f605f54aaa497
0fd92347a72ee70385d9c6fafcac3bdb
新增行中确定按钮点击事件
function addRowDbclick(index){ $("#spmc_"+index+",#ggxh_"+index+",#dw_"+index).dblclick(selectFyxm); }
0
131728752ab7cee351b2b80b3b8e4cca
225612c2ef8d9b3e01079fc6e085798e
Order Guards to patrol
if (Input.GetKeyDown(KeyCode.G) && _PlayerAttached.SelectedUnits.Count > 0) { for (int i = 0; i < _PlayerAttached.SelectedUnits.Count; i++) { Unit unit = _PlayerAttached.SelectedUnits[i]; unit.SetGuard(!unit.GetGuardState()); } } }
0
6edb64fdd57758a9ec156a08550ab614
a8782b1cb9d4c81076233b6b4a570bcf
Se comprueba un posible error de PHP.
global $db; $debug=debug(); if(isset($db)){ $db->error('PHP',$message,$file,$line,$severity,$debug); }else{ restore_error_handler(); print_pre($debug); } return true; }
1
5992075e7092bc5fb7ae99f5b238a2bd
55259470a72ac9870adc5c74faf174c9
Handle key press and release events while menu is popped up. Our action is to get rid of the menu.
class MenuState(object): def handle_event(self, event): if event.type == KEYDOWN: if event.key == K_ESCAPE: self.stack.clear_states() else: self.stack.pop_state() self.stack.push_state(States.Play) return True
1
8c327e508214316dd8448bf58840fc46
43d298ef1e189269a6e010daf507615f
职位列表 - 未使用
class EnterpriseController extends Controller public function actionWaitposition(){ $query = My_jobs::find(); $pages = new Pagination([ 'defaultPageSize' => 2, 'totalCount' => $query->where(['company_audit'=>0])->count(), ]); $countries = $query ->off...
1
532534c608c0973ac59ce13e7f988ff6
6134dc7e8aa2760755848ead866c64c8
Paint the panel with the picture selected and RESIZE it to fit 100% in the panel !
class ImagePanel extends JPanel{ protected void paintComponent(Graphics g){ super.paintComponent(g); if(image!=null) g.drawImage(image,0,0,getWidth(),getHeight(),this); }
1
2c328a3556f2e18687d09e13ed889960
6ef9130c6e784bf92151ccba262297a5
Creates request builder for Insider Transactions Returns trading information performed by insiders.
{ try { $response = $this->httpClient->post($this->endpoint, [ RequestOptions::JSON => [ 'inn' => $inn, 'requestDate' => $requestDate->format(self::REQUEST_DATE_FORMAT) ] ]); return Success::f...
0
1222fba61af14d822d69fbb538c3ff50
abcc73ebba1f515c228963e73897e1e9
Liefert die Strukturtiefe dieses Elements.
class GeneralizableElement(ModelElement): def hierarchyLevel(self): res = 0 for gen in self.generalization: tmp = gen.parent[0].hierarchyLevel() if tmp > res: res = tmp return res+1
1
22f57b6c641bd49999f048b2fb7b2d7b
21617a1e6e8509c2e2db1b5b00489155
Get Product ID from Production Line ID
{ return s_nProductAliasPID != 0 ? s_nProductAliasPID : 0; }
0
2d6eefb521e57fe22e8a689175db42a8
2eaa299033172faf3184d14b77fb650e
constructor de la clase tema foro
class TemaController extends Controller public function create(Request $req) { $foro_id = $req->foro_id; return view('tema.create', compact('foro_id')); }
0
c1839e1aaf2a557004d4b9a751416354
9a67a062f8b8cd8f3c76b489f0585950
Get the storage path for finished jobs.
def get_submit_dir(): return os.path.join(app.config[JOB_PATH_KEY], dao.SUBMITTED_STATUS)
0
cdf60a66190bbdd87a9f5f3ddbfb2a40
0eda90257f77e7cd6b316cfef26df400
通过中文名获取用户
self.readZhCSV() for ZhUser in self.ZhUsers: if ZhUser['ZhName'] == ZhName: return ZhUser['EngName']
1
f9e7fafd986b0030ec94039d7de12794
41665d0ce92eedac5395e51131895690
Sends data gathered by a device to carriots through API
class py_api: def writeParams_API(self, ID_Device, str_Params): dict_Data = self.parseJSON(ID_Device, str_Params) aimURL = self.target_host+"/sense" response = requests.post(url = aimURL, data = dict_Data) response = response.content
1
2e6691c8572551c403910a0f030a2360
5122752ac2294201059fc7e240f91b19
重写ToString方法来显示一个更友好的信息.
namespace ChemicalStructureSearchingDemo.Core public class ChemicalStructureSearchResult public override string ToString() { return this.ScoreString + ": " + this.ChemicalStructure.Name; }
1
c210d5d057d7db3f2965d41b07749e8e
072eddf0ce86d13da3cd0bc7f598c8ad
Дублирует заказ и назначает статус "Новый"
{ $options = array('conditions' => array('Order.' . $this->primaryKey => $id)); $order = $this->find('first', $options); $orderToCreate['Order']['id'] = null; $orderToCreate['Order']['archive'] = 0; $orderToCreate['Order']['payment'] = $order['Order']['payment']; $ord...
1
821df868ece05f46b1e45cf0d9b4da35
84c4a251dcf2968b35304994d017f1c3
Returns the result of interpreting the object as an instance of '<em>TManual Task</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
public class RoverDSLSwitch<T> extends Switch<T> @Override public T defaultCase(EObject object) { return null; }
1
cddd8061b4a62ff594aa7585e8a0e928
fe822c1b27231341205af829f84e53e0
Find a group using the source and source_id (e.g. an LDAP dn)
class GroupMembershipMigrator(BaseMigrator): def get_destination_group(self): dd = self.destination_directory sg = self.source_group_membership.group while True: try: matches = dd.groups.search({'name': sg.name}) return matches[0] if len(matches) > 0 e...
0
e6305d4e60096e343e44cf4c24e544e0
144b7bffa2691b72ccc23b65a36f90ca
mostra o X na célula selecionada se o jogador da vez for o X
namespace JogoDaVelha public partial class Form1 : Form private void Placarxo() { if (VezX) { placao += 1; } else if (!VezX) { placax += 1; } }
0
f7a060a99532a939246b41c71aaba3fc
5e34c18a533fa0bd8b8f4bec28a39d4e
check whether the rocket is still inside the window
if (rocket.x < ship.x + ship.width && rocket.x + rocket.width > ship.x && rocket.y < ship.y + ship.height && rocket.height + rocket.y > ship.y) { return true; } else { return false; } }
0
8636e1376bb71ec2246a2a72e3ca6989
5719e7b274d1408659b136a2866917b8
保存设备操作日志
public class LogDaoImpl extends BaseDao implements LogDao @Override public int saveDevice(DeviceDay device) { String sql = "INSERT INTO t_device(uuid, cid, model, ios, version, create_time, update_time, type) VALUES (?, ?, ?, ?, ?, NOW(), NOW(), ?)"; return this.saveRetKey( statsJdbc, sql, new Object[]...
0
c3150dd0d41b87b47f9593df13ef446e
dd25bff57b2efcb5e988f508daff2220
Get 'egg_incubator' value
public function getIncval();
0
1b9a82e73fa3fe32d87815a8db593238
77eee37bdd23ef9232e04a18ca94a5ba
Get the database escape callable
public function extractSql(): callable;
0
0b1c70a75ba4b3e20eba7fc886c7d57f
3c1fea256193236eb10656e0cb2642da
image of 0 width or height can't be considered ok - at least because it causes crashes in ConvertToBitmap() if we don't catch it in time
{ return rect.Width == 0 || rect.Height == 0; }
1
7da3e85ffc5777a063e06350e97d227c
528df57e125cd5d675810b83937467d7
Display Callback One: Rendering over OBJ1_PATT_NAME marker one virtual cube
void svt_container_cartoon_static::drawOBJ() { vector< svt_face > aFaces; vector< svt_vector4<Real32> > aVecs; vector< svt_vector4<Real32> > aNorms; svt_face oFace; svt_vector4<Real32> oVec; svt_vector4<Real32> oNorm; svt_color oCurrCol; unsigned int iStart, iEnd; for( i=0; i<m_aVert...
0
43d1c325122a87e1ffa2fa4de605dd44
689b0e3efeb5a7db4ec082a6bc1bb440
tests if set changes the list correctly after two previous calls and a next call (endIterator)
public void whenCheckHasNextForSimpleArrayThenIteratorNotIters() { SimpleArray<Integer> integers = new SimpleArray<>(); for (int count = 0; count < 5; count++) { integers.add(count); } Iterator<Integer> iterator = integers.iterator(); Assert.assertTrue(iterator.ha...
0
5e96f3db3333b99bac427a9ee26e26b7
7fc0b2c6b8374d9b72cf86a7764cc70b
this function prints the read text file
def printfile(filename): f = open(filename, 'r') buffer = f.read() print buffer
1
3c2ae3a4e97e36de7f410644fd2cf4b4
cfd2f3f860b43e66f9e7bf319ca686e5
Method that sets the pacman's position from 2 coordinates.
if(i <= 1){ position1 = pos; } else { position2 = pos; } refresh(); }
0
1cf790b3cf3fef6be5d567a12a091387
96901e4d0b7ad3879cffd3787132188c
Clean all custom filters.
public function clearFilters() { $this->_filters = []; return $this; }
1
979f097b9238621c1e06af8d45028da4
8754be634a416878dd6b0d4a977fa753
Select a column at random until a valid play is found.
@valid_inputs = [] 0.upto(NUM_COLS - 1) do |col| if @board_arr[col].none? { |cell| cell == "_" } next else @valid_inputs << col end end @valid_inputs.sample end
1
36085b80f7767212b0768b43f64ac1a0
c9047f9909162627f1acbd96096e09c3
Finds a peak in a list of unsorted integers.
def find_peak(list_of_integers):
1
edee24243ffcf6e0a1c8d896bc0a78f5
e1f985816d08a8cadfd59c0375938b24
动态根据指定的条件来更新符合条件的数据库记录,t_payorder_batch_record
List<payorderBatchRecord> selectByExample(payorderBatchRecordExample example);
0
534b4918176b1f156d73d98e5103b327
6cf24abd1f826d6946adfccaa2d35086
执行多语句查询的方法
function execute_multi($link, $query){ if (mysqli_multi_query($link, $query)) { do { if ($result = mysqli_store_result($link)) { while ($row = mysqli_fetch_row($result)) { printf("%s\n", $row[0]); } mysqli_free_result($result); ...
1
4b9edd0771d5117bdf3d0d5dcfaccf59
3545195e2083e5da736d3be3ea0a241c
PartnerShipRequest constructor.
class KontaktSendToPartner extends Mailable public function __construct($request) { $this->request = $request; }
0
31d2c4f86ffce8fb5ae0478bce23b61e
0ba9997e64b1b11ade923857ac2410a8
Events which are visible for participants
{ return array( array('allow', 'actions' => array('eventChanges', 'attendeeChanges'), 'users' => array('*'), ), array('deny', 'users' => array('*'), ), ); }
0
4254491acba0eedd0ddac0547595e5af
415f2a23517b0966114de472d93856a0
Pause all playback channels.
GLboolean DSPAudio::PauseChannels() const { return m_pauseChannels; }
0
0dbeb76615e19229ef3a9c763095dcf9
44d512614fbddb540c7e58664a502cca
模糊查询 条件为项目编号、项目名称、公司名称,获取project列表集合总数
public int countProject(String year,boolean checkState,String company_username);
0
1bd31adf9d7e9570d1a29bfc19c76993
f77b43ae3b07e75339264342915c2f8d
Allow users to select multiple emails at once (to perform a bulk action, for example).
public class EmailFragment<T extends MailBox> extends Fragment public void enableMultSelect() { mEnableMultSelect = true; }
1
5f490fc82dc35f2bc7657c54d65b9b70
a99a369e75b2d7165b4259fe4434dabb
Given a revisiion id, reads raw revision quality data from the database.
class ClientBackendArticlehistoryModel extends ClientArticlehistoryModel public function getRevision($revisionId) { $query = 'SELECT userId, articleId, type, oldValue, newValue, date FROM articleHistory WHERE id='.(int)$revisionId; $this->_db->setQuery($query); return $this->_db->loadAssoc(); }
1
c7ffb8fd65785f969d0de742bbd6e687
4fa0623fc48542642405f1e43ff9ea35
update the visual range so we can limit queries appropriately
class ChartLineWidget(pg.PlotWidget): def _update_y_range(self) -> None: view = self._first_plot.getViewBox() view_range = view.viewRange() min_ix = max(0, int(view_range[0][0])) max_ix = min(len(self._manager)-1, int(view_range[0][1])) min_value = min( self._manager[...
1
4773d1e209c71f2156dccb4af3d527f3
0588f71a041388b28663d91e38449e47
function as decorator
def register(active=True): # This is a decorator factory def decorate(func): print(f'running register(active={active})->decorate({func})') if active: registry.add(func) else: registry.discard(func) return func
1
51c581a7dd1e6b467687cd74ffcf0e2d
8042d233379cca823cea317ba416f97a
Map strings to unsigned integers.
public class ClosureCommandLineCompiler extends DefaultCommandLineCompiler @VisibleForTesting static class Flags private Map<String, Integer> parseCompileConstants( Map<String, String> compileConstants) { Map<String, Integer> parsedConstants = new HashMap<>(compileConstants.size()); for (Map.Ent...
0
eaadc9567598454c82b955d7acccc1c5
47c2e60d8b531f6f7c2d26e4c680b638
One pole recursive filter Class. Filter runs in fixedpoint but keeps track of calculation residuals.
class RecursiveLeastSquaresFilter(StatefulTransformer, HasInitialStateMean, HasInitialStateMeanCol, _HasForgettingFactor, _HasRegularizationMatrix, _HasRegularizationMatrixCol, HasLabelCol, HasFeaturesCol, HasInitialStateDistributionCol, ...
0
f84ecd27e53a7f7312b1307da6566796
4e97781370206cf4d2955c184671389e
Converts a security identifier (SID) to a string format suitable for display, storage, or transmission. ConvertSidToStringSidA() is used to convert. https://docs.microsoft.com/en-us/windows/win32/api/sddl/nf-sddl-convertsidtos
CString SecurityUtils::GetSidRawString(PSID pSID) { CString strRawSIDString; { LPTSTR pstrName = NULL; if (ConvertSidToStringSid(pSID, &pstrName)) { strRawSIDString = pstrName; } LocalFree(pstrName); } return strRawSIDString; }
1
9ba5b90f022a6ab83673cef9df3bff7f
157a25a8a08799e86de18a16805d60a6
Dodanie użytkownika do danego zadania po jego loginie
{ $this->mustBe(User::ROLE_MOD); $aUsers = \Model\Users\UserFactory::getInstance()->getList(); if($this->_request->isPost()) { $oFilter = $this->getFilter($aUsers); if($oFilter->isValid()) { $aValues = $oFilter->getEscaped(); $oTask = $this->oTaskF->create( $this->oCurrentUser->getId(), ...
0
4756a3ac46cbd2a3fd4268bfd3ff304f
dd950ac1be073f2bfbe7a11be12ec2fd
检验是否管理员或者创建者
$user_id = $this->getAttribute('user_id'); if($user_id==$uid){ return true; } if($uid=="" && $user_id != ""){ return false; } return true; }
0
b9905fc62d735bd4c3dac6767d2ea7d3
bd3bc34bb6e7082e414715c539bb4bb3
Returns the value of the '<em><b>Step Id</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Step Id</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
boolean isSetStepid();
0
dc95bdd339c4d1076b3dd71bd488e417
6e31d9f521a8d5cd3ed06be44bb2a7cc
Getppid returns the process id of the caller's parent.
long sys_getppid(uintptr_t *regs) { return getppid(); }
1
b114e35da5f09316716f20177d642a65
8c1895ac99120b5f304ff3726739b3e0
Runs simulations and make histograms for problem 6. Runs multiple simulations to show the relationship between administration of multiple drugs and patient outcome. Histograms of final total virus populations are displayed for lag times of 150, 75, 0 timesteps between adding drugs (followed by an additional 150 timeste...
int[] desiredNumVaccsPerLoc = {10,100,1000,10000}; int[][] numInfected = new int[desiredNumVaccsPerLoc.length][numberOfVaccinesSpread.length]; for (int j = 0; j < desiredNumVaccsPerLoc.length; j++){ int desiredNumVaccinesPerLocation = desiredNumVaccsPerLoc[j]; for (int i = 0; i < numberOfVaccinesSpread.leng...
0
bee4c80aa0b8c66cbbd77f1c18777889
c37440fcabff7d2e55174250c929cdd8
Description A class which aims at calculating neighborhood models of items using standard knn and extends NeighborhoodCF.
self._input_data = input_data self._n_samples = input_data.shape[0] self._nn_graph = NearestNeighbors(n_samples=self._n_samples, n_neighbors=self._n_neighbors) self._nn_graph.fit(input_data, similarity_fn=self.similarity_fn)
1
17664c033fb858c382ce593fcc564883
f328267888bde444a4148cb0394a45bf
Logs user interaction to the Unity Console.
public class MainActivity extends AppCompatActivity public void LogInMyConsole(String s) { Log.i(" Message ", " " + s); }
0
158ff46f0016aaf309c9e55e1d344917
d3462dab5c2de9be1e28b819b48d8c54
Rotation matrix around the third axis
def Rot_z3(theta): R = Matrix([ [ cos(theta) , -sin(theta) , 0], [ sin(theta) , cos(theta) , 0], [ 0 , 0 , 1]]) return R
1
c587d70221ddf67da8a78dbbfddd9fa2
9b3a5620b48c72ffe7f73597b47bbd3f
保存任务执行时间
namespace FlowEngine.TimerManage public class CTimerTimeout : CTimerMission public override void Save(Timer_Jobs job = null) { Timer_Jobs self_Job = new Timer_Jobs(); self_Job.workflow_ID = m_wfentityID; self_Job.Job_Type = TIMER_JOB_TYPE.TIME_OUT; self_Job.ST...
0
6f0aa2105a3beb2f10ef6927a0fffe33
5a7c741d4dab87eb6f42292eb28cd04b
在字典树中查找单词s
int search_word(const string &s) { int cur_node = 0,Len = s.size(); for (int i = 0; i < Len; ++i) { int id = get_ID(s[i]); if (tree[cur_node].child[id] == -1) { return 0; } cur_node = tree[cur_node].child[id]; } return tree[...
1
fec09037a3fb8b37349a2280fbcbcf8b
ac5d1b8104d8d3d1c5dfed0fa1ae1f3b
Zählt alle Karten im Spiel
class Player implements Countable public function count() { return count($this->cards); }
0
53821a2f54e3733fa9582a86361217df
35b8bf60141d245e9d64cdcff6ecf15a
Tests that when <see cref="Dependency.operator !="/> is called with different values, it returns the expected value in each case.
public void Test_NotEquals() { TestOperation("5!=5", new JSValue(false)); TestOperation("5!=\"5\"", new JSValue(false)); TestOperation("\"hi\" != \"hi\"", new JSValue(false)); TestOperation("true!=true", new JSValue(false)); TestOperation("\"tr...
1
5fcfc886fea908e353478aa4a91616a0
379e9098bf42e8522b38d7707c317063
Returnează termenul fuzzy al unei proprietăţi.
public Query getFuzzyQuery(String field, String termText, float minimumSimilarity) throws ParseException;
1
f7a867efa9f2337bece53750402ef687
6c04c7f40f6219a3c73d81fbecb7bce0
直播课程添加考试课程
class Course extends AdminBase public function liveaddExam(){ if ($this->request->isPost()) { $param=$this->request->param(); $param['addtime']=date('Y-m-d h:i:s',time()); $param['ischapter']=0; if ($this->insert('liveSection',$param) === true) { i...
1
9f4e56ad2b248caa848130fd24fd5b00
52f068976a625f7fd4ec5cc873ba5d9f
Parse the reviews on a single page of a restaurant
class WayfairReviewsCrawler(webdriver_amazon): # Open and navigate to product page. def parse_single_review(self, result): selectors = { 'author': 'ProductReviewHeader-name', 'date': 'ProductReviewBody-date', 'verified_buy': 'ProductReviewerComplianceBadge', '...
0
5940991b66811b373b7cdc12e61b5c1a
526bd28092824f75c7feb00e4c1b2eb6
Creates a new {@link ZCoordinate} based on the offset of x, y, and z given in parameters added to the current coordinate.
@Value public class ZCoordinate public ZCoordinate resolve(int x, int y, int z) { return new ZCoordinate(this.x + x, this.y + y, this.z + z); }
1
ff3892ae18f58fca4b18bdf720dae4cb
ffd920e4763384211da96c395bc8b258
Extend a sphere around this tile to find all adjacent tiles within the spheres radius
public class MapManager : MonoBehaviour public TileInfo[] GetTilesInCircle(int p_row, int p_col, float p_radius) { List<TileInfo> tiles = new List<TileInfo>(); int max = Mathf.CeilToInt(p_radius); float dx = tileArray[GetIndex(p_row, p_col)].Position.x; float dz = tileArray[GetIndex(...
1
5a4065a6f21aceba94d23e5fceba48d4
147c6fa3eb07cf83d147e419d9d668dc
根据删选条件查询量表
@Repository("PapersQuestionMapper") public class PapersQuestionMapperImpl extends BasicSqlSupport implements PapersQuestionMapper public int deletePapersQuestionBySearch(Map<String, Object> map){ return this.delete("com.sjq.question.dao.PapersQuestionMapper.deletePapersQuestionBySearch",map); }
0
0693974d51c5ff09bbb1ac5453df0308
d9be3db1bf01c60672ba978d12f8516d
Calculate the correct imageScale value.
function getScale(containerWidth, containerHeight, imageWidth, imageHeight) { if (imageWidth > imageHeight) { if (imageHeight * containerWidth / imageWidth > containerHeight) return containerHeight/imageHeight; else return containerWidth/imageWidth; } else { if (imageWidth * containerHeight / ima...
1
f2091f2325dd367ba6a1bd3a92f63e3b
63f30a562d448b226f5cf67d3a67af87
马科维茨有效前沿
logS = np.log(S) y = logS[: , 1:] - logS[: , 0 : logS.shape[1] - 1] dt = 1 sigma = np.std(y, axis = 1) / np.sqrt(dt) delta = np.zeros(y.shape) for i in range(y.shape[0]): for j in range(y.shape[1]): d1 = (logS[i, j] - np.log(K) + (r + sigma[i] ** 2 / 2) * (T - j)) / (si...
0
5ead347bebd216cdece6e964ab203413
d3e864a873d4a5f82efaa36eca921471
Display the players healthbar composing of current health and maximum health for the player's character.
using namespace FuGlobals; SDL_Renderer* renderer{ mSDL.lock()->getRenderer() }; SDL_Rect playerHealthOutline{ 10, 10, PLAYER_HEALTH_WIDTH, PLAYER_HEALTH_HEIGHT }; mSDL.lock()->setDrawColor(255, 0, 0, PLAYER_HEALTH_ALPHA); mSDL.lock()->drawRect(playerHealthOutline); int scaleFactor{ PLAYER_HEALT...
1
457e0b8d5b472f3c0c96b69b448412ca
dfc1241f26244020ae9b08abe57e202e
<p> Process a collection of security token requests. </p>
SOAPMessage secMsg; Document doc = null; secMsg = null; try { doc = SAAJUtil.getDocumentFromSOAPEnvelope(msgContext.getEnvelope()); LOGGER.debug(Language.getFormatResIntegra(ILogConstantKeys.TCH_LOG001, new Object[ ] { this.securityOption })); if (this.securityOption.equals(USERNAME_OPTION)) { secM...
1
c5a22d2e16f4d9323df7bb9cbecf090f
e00e44eaaff5e31c77f87c596824bc0e
Procedimiento el cual procesa la consulta del webServer y retorna una respuesta utilizando el protocolo HTTP Mensaje siguiendo el formato HTTP
@MultipartConfig @WebServlet(name = "servicioController", urlPatterns = {"/servicioController"}) public class servicioController extends HttpServlet protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(...
1
19c53b8859e4509bb7dc18e83a722194
7c26e4b7006cce1e9c5fa92319f88ab2
Sets the info approver.
public class CreateFlowSignUrlRequest extends AbstractModel{ public void setFlowApproverInfos(FlowCreateApprover [] FlowApproverInfos) { this.FlowApproverInfos = FlowApproverInfos; }
1
b80dc44287e13b8a84f7d381601905b3
d5623070433e8eea119ed53ebe817155
Method untuk mendapatkan seluruh data staff klinik
class Staff extends Authenticatable implements JWTSubject public function staffAll() { $staffAll = static::all(); return $staffAll; }
1
3b0c7ac12f3c8e38426ba45f4b2e31f4
f6f177b227cf12c5cd397e015560beb5
Determina la humedad absoluta kg/kg
class Etiqueta def hidratosIRporcion ((hidratosIR.to_f*25)/100).round(2) end
0