query_id
string
corpus_id
string
query
string
code
string
label
int64
3b4becf7ad6534f0564e19853653bdfd
2b256c7ad4c95ebe7d8c90e8e50cae8e
功能:打印在线信息 入参:无 返回值:无 其他:无
print("online_conn.__len__()=" + str(online_conn.__len__())) print("conn2user.__len__()=" + str(conn2user.__len__())) for con in online_conn: send_string_with_length(con, "#!onlinelist#!") send_number(con, online_conn.__len__()) for c in online_conn: send_string_with_leng...
1
c687d55794dff6c2eab4c0620260cd47
21b195ac4a136f67e2172d4971240b9e
创建用户,跳转用户列表
@Controller public class SystemUserContruller @RequestMapping("/user/new") public String createNewList(Long id) { return "systemuser/create"; }
0
aa4e84512f9cf0afaf44807e5f27e305
222970d2bceff2e12964a8fdcccc6c60
Clears the crates.
{ base.Clear(); m_playerBody = null; m_footSensorFixture = null; m_allPickups.Clear(); }
0
0b13fcc00ca37cd3b3e62c5d0fe9e00a
133f31cbf59fdbb364bdb83726a3f1a1
Find a UserAuthorization by user and client.
public function findOrCreateForUser($clientId, $userId);
1
feddcd23eaa06383eccbb083a3838ce8
d2aae1aba1c93c762404e753ad5c55e2
insert a line at the current position
int asc_addline(nargs) int nargs; { loc_t *textvar; char *str; int l, r, s; popint(&l); str=fgw_popquote(); poplocator(&textvar); if (fgw_testtext(textvar) || str==NULL) { status=-717; free(str); return 0; } s=strlen(str); *(str+s)='\n'; s++; *(str+s)=0; if (fg...
1
b890066a9c7ca11778564532629d6bcd
7355256e60132bd177ee840523cb2984
Makes a trans peptidic bond betwean the aminoacid in chain at resNumber with the next residue only works for properly formated aminoacids
class ProteinClass: #list of settings to be copied from proteinclass to another def ChainRange(self, ResNum): i = self.ResChain(ResNum) return [self.ChainResNums[i:i+2], self.ChainAtomNums[i:i+2]]
0
7c9f0b887826ec0924117622c15f1102
c18a6be59086cb2d04b91c9dafadefe2
acc and gyr can self test. electrostatic force applied to the elements to artifically displace & register a reading we can then measure the value when the self test is enabled vs disabled & compare the outputs datasheet specifies a range of outputs to expect in self test, so we verify this
static int32_t perform_accel_self_test(BMX160_Object_t *pObj) { int32_t rslt; bmx160_sensor_data accel_pos, accel_neg; rslt = enable_accel_self_test(pObj); if (rslt == BMX160_OK) { rslt = accel_self_test_positive_excitation(pObj, &accel_pos); if (rslt == BMX160_OK) { ...
1
3488262af010c36c95407697dfceddd2
e3f87e905d7ec5c71da51745310494a1
Gets user id from current item
class DefaultRenderer extends \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn implements FooterInterface public function getItemId() { return $this->getItem()->getId(); }
0
fe70a2f7e8d74ec1665a80016954e3c7
19b92a63611de7ce40e0502e80b65b8e
Sprawdza czy meteoda zwraca false dla pustego linku potwierdzającego.
{ $request = new Request('', 'url'); $result = $this->requestChecker->check($request); $this->assertFalse($result); }
1
84fccc3413df1b3bc764e061db423e9a
864ab4fe730dc2a972ba41bbd260d805
Metodo responsável por gerar uma arvore geradora minima.
namespace Trabalho_final_Grafos.Models public class Grafo public Grafo getAGMKruskal(int vertice) { List<int[]> ListaArestas = new List<int[]>(); List<int[]> AGM = new List<int[]>(); int nincluidos = 0; int cont = 0; int pos_menorPeso = 0; ...
1
ea2f427272eb5550bb8f8bbc306aef62
a3d50c188fb794d981d33b8ab6e375bc
提高随机数不重复概率的种子生成方法
function random($seed) { $init = $seed; return function($method = null) use (&$seed, $init) { $a = 45; $c = 21; $m = 67; switch ($method) { case 'reset': $seed = $init; break; default: $seed = ($a * $seed + $c) % $m; } return $seed; }; }
0
50836ff328c15aabf36288feae2cfffc
eaea011211670bd3e0505b1025f72778
Rotates the node to point to the target location, by converting the target location to the local coordinate system, treating the referenceUpDirection as a local direction, and rotating in the local coordinate system.
{ if (Facade.MoveToTargetValue && driveSpeed.ApproxEquals(0f)) { GetDriveTransform().localRotation = Quaternion.Euler(-AxisDirection * ActualTargetAngle); } }
0
e54307dab2642d11c8e548aa7cd2283c
200294110b3f2abe6d52275b204cdb76
delete homework from database by unique id
public void deleteHomeworkUpload(int uploadId) throws Exception;
1
e3119943e3cffd3f8bc949538d86febc
5ae3a49ee49320933a837dafa84e4b22
Halaman untuk mengunggah proposal final
{ $email =Auth::user()->email; $cek = Mahasiswa::where('email_mhs', '=', $email)->get('npm'); $items = Proposal::where('npm','=', $cek[0]->npm) ->orderBy('id_proposal','desc')->get(); $proposal = Proposal::where('npm','=',$cek[0]->npm) ...
0
ec9c17fb0d698f503236f20d02f59762
5e8c74d1fa5ab0fbe0679ea89429436a
Estimate the number of bins from Sturges' formula
def nBinsFD(inArr): nBins = np.ptp(inArr) / (2* (np.percentile(gs,75)-np.percentile(gs,25)) * len(inArr)**(-1/3.0) ) return int(np.ceil(nBins))
0
8fbf2334bbaa35c2be2834092bf440cb
de590f0b24d70e0d283fdd887517f0dd
The top menu is created: its callback function is registered and menu entries, including a submenu, added.
{ GtkWidget *main_menu; GtkWidget *menu_others; GtkWidget *item_others; GtkWidget *item_radio1; GtkWidget *item_radio2; GtkWidget *item_check; GtkWidget *item_close; GtkWidget *item_separator; main_menu = gtk_menu_new(); menu_others = gtk_menu_new(); item_others = gtk_menu_it...
1
284924a2f061935e112799eefc060ab5
01f444017adf7f2015dbb2838972cfa8
Returns the value of the '<em><b>App Jar</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>App Jar</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
public class SparkAppJob extends AbstractModuleFixture<SparkAppJob> public SparkAppJob sparkAppJar(String sparkAppJar){ Assert.hasText(sparkAppJar, "sparkAppJar must not be null or empty"); this.sparkAppJar = sparkAppJar; return this; }
0
c8752cd1d642d45715a931fdb46d82a3
2f31d5ae27c48cb9f3ab425008d5ec95
Registers the attendees to the PoP-Party stored on the linked conode, this finalizes the party.
{ float actualAmount; int count = 0; if (amount > 0) actualAmount = Math.Min(amount, 100 - _RegData.Parties[partieID].Popularity); else actualAmount = Math.Max(amount, -_RegData.Parties[partieID].Popularity); _RegData.Pa...
0
80fe4e3a64882fb2a0ee2c84712450e7
4ac4be33d012c767a28f2d28c1c9c0f1
.pip
def update_pip(): pypi_repo_opt = "{0}pypi/".format(ARTIFACTORY_PYPI_URL) cert_pip_opt = "--cert={0}".format(SSL_CERTIFICATE) env = os.environ.copy() reset_proxy(env) if not PIP: logger.warning("pip not installed, install it with easy_install") certs_dir = "/etc/pki/tls/certs/" ...
1
5cb200b4cc13209d5c6a3bbe6f3f3a28
a143c3cef18fbfd499f2a179d8f1dfa8
Check if a user already have an email/account with pasteur privilege
{ if(is_null($value)) return false; $sql = "SELECT * FROM ".$this->db->dbprefix('user')." c WHERE c.`deleted` = 0 AND c.`email` LIKE ? AND c.`id_user` NOT IN (".(!empty($id_exclude)? $id_exclude : '0').") AND c.`id_domain` = ...
0
47a84f585cea8ce2c47e18ee68672c04
2e6618abea730c844c3a4aecd661d750
Sets the current projection option.
public class MQOViewer : Scene public void SetProjection() { MatrixMode mode = glp.CurrentMatrixMode; gl.MatrixMode(MatrixMode.Projection); gl.LoadIdentity(); gl.Viewport(0, 0, this.RenderingControl.ClientRectangle.Width, this.RenderingControl.ClientRectangle.Height); cam.Set...
1
61719850f8560e515a1f84989001b7c4
a9d83bc02471e75e14ed96edc82c0bb8
Конвертируем рубли в доллар
public class Converter public int dollarToDoRuble(int value) { return value * DOLLAR; }
0
437761d8f4775ae5192e6e0478e7e53b
7307c80d8cda846bef27f94f259aaedb
在此处生成私钥与公钥并置于session中
@Controller public class UserController @RequestMapping(value = "beforeRegister.action", method = RequestMethod.GET) public String beforeRegister(HttpServletRequest request, Model model) { try { Map<String, Key> keyMap = RSACoder.initKey(); String publicKey = RSACoder.getPublicKey(keyM...
1
911c7b9bf24fdd7b77c9737b279d39af
aa607b1b79d5089c47ef94e1823634fe
Method provides getting required page title from config file
class Title extends Template public function getPageTitle() { if (!empty($this->pageTitle)) { return $this->pageTitle; } return __($this->pageConfig->getTitle()->getShort()); }
1
d848296d244e240d53af2ece1fbaa2dd
6719758ac6941bb12f9cb6f66d994b19
将资源过滤器,根据 resource_cls 的定义,转换为 scopes 属性范围
instance_resources = [] for resource_scope in resource_scopes: if resource_scope.type == constant.INSTANCE: try: action_id = Convert.to_local_action(iam_action_id) for key, value in action_maps.items(): if iam_ac...
0
8d17e7e7e441ecba59dc62d1b32e1da9
81af96348f9e82018b52136688ca70ff
Ensure that the system fingerprint generator returns a string of the right length, and does so consistently on the same system.
txt = 'a' * 64 r = f(txt) return r[16:32] == r[32:48]
0
29d44e07c66697e990ddfb58412cb837
f57c946bc3ce41b1d7a688026b3d1052
Value informing whether the patterns starts with white or red color - so if it needs to be rotated by additional 180 degrees. If it starts with white, it doesn't need additional rotation (false) If it starts with red, it starts with additional +180 degree rotation (true)
public abstract boolean isBlackWhite();
0
ad8022f8ce17c0534708b46834ce68bd
04fc3702901f9aa5b4a7e09477e85825
Save nexus template from xml format to json format.
{ string filename = newTemplate.Display + ".xml"; bool success = false; TemplateInstance existingTemplate = GetTemplateByShowName(newTemplate.Display, newTemplate.Category); if (existingTemplate != null) { if (existingTemplate.ReadOnly)...
0
607a2fe993a211cadce4186881e5df8c
c802a3fbf5fa1191723eb2d363d865c6
根据pathfile文件中的图片路径显示图片和标注框,要求以voc标准格式存放
class SignLabel: def show_image(self, image_file): label_file = image_file.replace('.jpg', '.txt').replace('.jpeg', '.txt').replace('.png', '.txt') print(image_file) print(label_file) image = cv2.imread(image_file) h, w, c = image.shape print('(h, w, c): (%d, %d, %d)' % (...
1
9eb29fb2f1fce7ea7b8efe54c4398eb8
46fa8cf6f81ab76f6829178bb941eac6
Create styles for the Header Cells.
var rowHeaderStyle = { border: { top: { style: 'medium' }, left: { style: 'medium' }, bottom: { style: 'medium' }, right: { style: 'medium' } } }; rowHeaderStyle.font = { name: 'Calibri', size: '8', bold: false }; rowHeaderStyle.alignment = { horizontal: 'center', wrapText: true }; return rowHeaderStyle; }
1
6f5d114d68a254a94151d6046ca9e142
f42bf33cea613a47a4b2426d166832eb
This method is responsible for drawing a tire of a motercycle.
context.save(); degrees += rotationSpeed; var radians = degrees * (Math.PI / 180); context.beginPath(); context.translate(x + centerOfBackWheelX, centerOfWheelY); context.rotate(radians); context.arc(0, 0, wheelRadius, 2 * Math.PI, 0); ...
1
f85abad5e43613b4d5a712a28bd0417e
08101cc897b8aabb0a93c8581678bdea
Creates parameters for Inserting or Updating Logon failure records
{ var spParameters = new List<SqlParameter> { new SqlParameter("ContactPayorID", (object) contactBenefit.ContactPayorID ?? DBNull.Value), new SqlParameter("ContactID", (object) contactBenefit.ContactID ?? DBNull.Value), new SqlParameter("Po...
0
4ff13ecfead866ffc2446e8cbb17a111
5855121e0fa75883615f522a35666287
Creates and adds persistent children for the <code>createdNode</code> if necessary.
public class MultiValueChildrenNodeTransformer extends BasicTransformer<PropertysetItem> protected JcrNodeAdapter getOrCreateChildNode(String childNodeName, String childNodeType) throws RepositoryException { JcrNodeAdapter child = null; if (relatedFormItem instanceof NullItem) { return null;...
1
458c970f791570b1d0ce2224603ef6b6
3b68958c0cde3ad3dfd22c96950773fa
Creates a record in the mapped data table [dbo].[StorageFile]
namespace Gihan.Storage.Core void Create();
0
11062b56ef3f197077f29331b3a15373
5a7450075ed51dce6dc59a1fcf86627f
Simple helper extension method to marshall to correct thread if its required.
{ if (action == null) throw new ArgumentNullException(nameof(action)); using (new SynchronizationContextSwitcher(null)) { return action(); } }
0
e2e216d9e9b0f8be04598f3f30adee9b
9062835430b20fcafc71cee1b2f7ee7d
[ADMIN] 各ブログ別のオプショナル設定データを作成する ・オプショナル設定データがないブログ用のデータのみ作成する
class PetitBlogCustomFieldConfigsController extends PetitBlogCustomFieldAppController function admin_first() { if($this->data) { $count = 0; if($this->blogContentDatas) { foreach ($this->blogContentDatas as $key => $blog) { $configData = $this->PetitBlogCustomFieldConfig->findByBlogContentId($key); ...
1
af6e8f6415c59cd2da46db65f4305163
9bf654846a57b7d59e34fa14e1824c08
Creates an instance of a <see cref="SgcFile"/> from a file.
namespace Mx.Xml.Busdox.Smp public static class ClassFactory public static LiquidTechnologies.Runtime.Standard20.XmlObjectBase FromXmlFile(String FileName) { return FromXmlFile(FileName, LiquidTechnologies.Runtime.Standard20.SerializationContext.Default); }
0
164f1e9094d590ab850a4c8468147296
f9257bac517b1f495296af08c9bed04d
calculates the iverse fourier transform and shifts the data to be linearly changing converts the wavenumber data points to distance
def get_real_data(filename): real_data = np.loadtxt(filename, usecols=(0, 1)) q = real_data[:, 0] real_data[:, 0] = np.arcsin(WAVELENGTH * q /(4.0*np.pi)) real_data[:, 1] /= real_data[0, 1] return real_data
0
68f4a689343b56385b88deb323630276
5dd81a72e075140a361339ec15e215a7
获取专辑内视频数量
int getCollectionCountForVideo(Integer uid, Integer vid);
0
9c51a35f20eed8c2b6b37229f702e72f
dca4237ce06d6660369439efb9835050
Registers our email tags
self::$av_tags_arr = array(); self::$av_tags_subj_arr = array(); foreach ( self::$form_options['fields'] as $key => $field ) { switch ($field['standard']) { case ESCF_NAME_FIELD : if ($field['disable'] == 'false') { switch (self::$form_options['name_format']) { case 'name': ...
1
b1298564c450e77948c0ce39be683fd4
719abbb89e680d2996700d21b08c2a12
Log messages to standard output.
def log(msg): print('ttnmapper: {}'.format(msg))
1
8d6fb87204447980ddb3e3d55393ad48
dd6ac1ef85d68db1a9e5137cb72d3353
Applies lookup table to <code>image</code> in a specific Region of Interest.
public class UniformNoise extends SimpleOperator protected Image apply(GrayImage image) { return apply(image, new ROI(0, 0, image.X() - 1, image.Y() - 1)); }
0
4d31e67751e4b1e267158b081d420831
64d30a997f9a08f3294899f644afd777
+/- 2 is to account for the elipse in the middle
namespace ltv_priv class NodeImpl : public ltv::Node, public T double NodeImpl<QGraphicsEllipseItem>::y() const { return QGraphicsEllipseItem::y() - QGraphicsEllipseItem::rect().height() / 2.0 + .5; }
0
e42a05f5e85f6a40b8e588de28ac9f8c
bfa22116e7feab43a5ffda635eab005d
账户变动记录删除
class SystemAction extends CommonAction public function account_del(){ $id=$_POST['id']; $data['status']='-1'; $at=M("Account"); $result=$at->where("uid={$id}")->data($data)->save(); if($result){ $this->ajaxReturn(array("status"=>1,"msg"=>"删除成功")); }else{ ...
0
e01eb8560422faffe996652984e593c6
33618dccd5797f1d37d0c2683f15eefb
Average Number of guesses until a password is cracked.
def avgnumberoftosses(pattern, tries = 10000): n = 0.0 for t in range(tries): n += numberoftosses(pattern) n /= tries return n
0
0f6de411f28f76be9c6183341a5675d2
7f6e0f12a8615d0bfaf3666e04134521
Add polyline click event.
public void onPolylineClick(Polyline polyline) { if ((polyline.getPattern() == null) || (!polyline.getPattern().contains(DOT))) { polyline.setPattern(PATTERN_POLYLINE_DOTTED); } else { polyline.setPattern(null); } Toast.makeText(this, "Route type " + polyline....
1
c239da1ea1aa098c596d59814816499d
63c420793ec0fb1d17b11245f834c514
后台任务附件编辑
{ var url = 'taskFile/updateTaskFile.do'; var params={}; params.tf_id=tf_id; params.file_name= $(obj).parent().parent().find("input:first").val(); params.remark=$(obj).parent().parent().find("input:eq(1)").val(); if(params.remark.length<200){ var fn=function(result){ $(obj).css("display","none"); $(obj).prev...
1
31b3c9b43f3217393bc6f00855c8e8b3
38ad724722df2447f6e8125f54d53c41
Creates a test student and test teacher. I believe these are automatically deleted because Django will put these in a temporary test database.
cls.first_teacher = create_teacher() cls.first_teacher.user.last_name = 'A_first' cls.first_teacher.user.save() mixer.blend(WorkingHours, teacher=cls.first_teacher, weekday=0, start='13:00', end='15:30') mixer.blend(WorkingHours, teacher=cls.first_teacher, weekday=1, start='1...
0
cd30f96a8f7820249d0f3a05d3ecf5fb
e54e5f0ba5f9c28f9eb5fe5247f9171b
@brief Init a controller
{ I2C_HwAttrs const *hwAttrs = NULL; I2C_v1_Object *object = NULL; int32_t status = I2C_STATUS_SUCCESS; if(handle == NULL) { status = I2C_STATUS_ERROR; } if(I2C_STATUS_SUCCESS == status) { object = (I2C_v1_Object*)handle->object; hwAttrs = (I2C_HwAttrs const *)...
1
966e75ccac150fd1a5f76e6d3813747f
0c43a7d09f1a0e6dee8065cb79e22e9c
已知用户id,更新agent_id
class UserRepository public function bindAgent($user_id, $agent_id) { $this->user->where('user_id', $user_id)->update(['agent_id' => $agent_id]); }
1
370ec1a59e44c9dba238a0547274d770
63fb043ebcfb7482ae5103b3adbc7b6d
Perform a prestige in game.
if self.configuration.enable_auto_prestige: if self.should_prestige() or force: self.logger.info("{begin_force} prestige process in game now.".format(begin_force="beginning" if not force else "forcing")) self.leave_boss() sleep(5) if se...
1
76f6791d1bbbe12aaf38dad500a869c5
f70751f777e34bc0636d75526e64a044
Create mentorship application
{ if (Auth::check()) { $id = Auth::id(); $user = User::findOrFail($id); return View::make('mentees.create', compact('user')); }else { return Redirect::to('users/create'); } }
0
c2607b39913ac651eead0b451d5c73e9
50882762d41fa5583bf5df5a570dca04
Unsets the value of the '{@link org.eeml.xsd._0._5.LocationType#getDomain <em>Domain</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
void setDomain(ClassDefinition value);
0
72cbe360c6ad420d06a9a7ae2050a9cf
740c7ac50617b0161c0bd9af1dd3d47f
#最近回答/评论#
$sql = 'SELECT a.aid,a.qid,q.uid,u.username as qr,us.username as wr FROM ebh_askanswers a ' .'left join ebh_askquestions q on (a.qid = q.qid) ' .'left join ebh_users u on (q.uid = u.uid) ' .'left join ebh_users us on (us.uid = a.uid) where u.username is not null order by a.dateline desc LIMIT 0,5'; retu...
1
ba0ffb8d114bd42ea21c4729376306b6
3a75a845dd0187c3ea695a7c818a26d2
月を入力する
for (let i = 1; i <= monthHasDayes[birthMonth - 1]; i++) { const option = document.createElement("option"); option.innerHTML = i; option.value = i; dayInput.appendChild(option); } }
0
b4940e82b183557259d72acd195ebc9e
5870b2b671a566a66cc0fbf938468227
Returns the seconds since midnight as a decimal value.
{ long microseconds = date.Ticks / TicksPerMicrosecond; long microsecondsSinceEpoch = microseconds - _unixEpochMicroseconds; return (decimal)microsecondsSinceEpoch / MicrosecondPerSecond; }
0
eb001f9d736333c6958f421d895fc767
e5179e402fafc39f5bfc8e80b83fc748
Initializes this POMCP agent.
class TabularAgent(BaseAgent): def __init__(self):
0
3785f34f23cdb3a682e3abdb46cecc1b
7a19429d9d592160f1bed673bd315d53
墨の飛沫が紙に触れたら、その位置にピクセルを書き込み。
{ if (Tick % 65 == 0) sp.Parent.Add(GameEngine.EntityRegister.CreateEntity("Bubble", new PointF((int) sp.Location.X + sp.Size.Width / 2 - 4, (int) sp.Location.Y + sp.Size.Height / 2 - 4), sp.Mpts, sp.Map, sp.Parent)); Tick = (Tick + 1) % 3600; }
0
9ec8c84b2580152568579e65892ba4d9
9983a48fca6792f2d6eeb376e2f227ea
@brief gets regen command from jetson
ISP_Chroma_Enhance_CfgCmdType *pcmd) { reg += (ISP_CC40_OFF/4); memcpy((void *)pcmd, (void *)reg, sizeof(ISP_Chroma_Enhance_CfgCmdType)); }
0
c5ff1cf254e25566119b2af8ab73cd6c
e29d25b65fb82c3682b70ddaddaa3b08
https://math.stackexchange.com/questions/5877/efficiently-finding-two-squares-which-sum-to-a-prime
if n <= 2 { return n+1; } let mut found = 2; let mut i = 5; loop { if is_prime(i) { found += 1; if found == n { return i; } } if is_prime(i + 2) { found += 1; if found == n { return i + 2; } } i += 6; } }
0
7b5a77c79a7ba63e7c3fe05615e16684
c5345d305ba5e61107f62558dcaffdfe
Called before return to pool, useful for set active object(it is default behavior).
namespace BeatThat.Pools.UnityObjects void OnPoolReturn();
1
3d352d6258483c624281d6b60c7c9f1b
ceaa55a561aa1cf5e5abbd98dfb0338d
Get the content wrapper for the current page
if (! isset($this->__curPageContainer)) { $page = $this->findCurrentPage(); if ($page) { $this->__curPageContainer = $this->findPageContainer($page['Page']['id']); } } return $this->__curPageContainer; }
1
8993040cd621d33b935852c6d617ffbc
35b74fe734a2f212264da5150229a8a0
Fills an order's sub_order array
$_order = $this->jsonRequest; $orderTotal = 0; $orderSubtotal = 0; $orderDiscount = 0; $orderTax = 0; $itemBasetotal = 0; $orderPostage = 0; $this->items = array(); $this->suborderItems = array(); $this->set('userId', $this->app->user['id']...
1
68d5777416a34e19c736642542097e84
b24b32b903f87e61de0de75543da8fd1
*** Initialization function for lri
{ int i; int j; mIsValid = false; mModelCorrectProb = 0.0; mRoadOffset = LR_DEFAULTOFFSET; mRoadHeading = LR_DEFAULTHEADING; mRoadCurvature = LR_DEFAULTCURVATURE; for (i = 0; i < LR_NUMSTATES; i++) { for (j = 0; j < LR_NUMSTATES; j++) { mRoadCovariance[midx(i, j, LR_NUMSTATES)] = 0.0; } } mRoadCovar...
1
8b67a908e40cb8e6bcf286e54e81a7da
3cf955b32fdfb9a9d30aad455ee46aa5
Annotated version
fn sample1() { fn function (i: i32) -> i32 { i + 1 } let closure_annotated = |i: i32| -> i32 { i + 1 }; let closure_inferred = |i | i + 1 ; let i = 1; println!("function: {}", function(i)); println!("closure_annotated: {}", closure_annotated(i)); println!("closure_...
1
cae99ca5fd96f99cbda2e8d85bab477e
68b907f794b590bd5210cbe4d48229e5
Handles the eye movement from button to button when they are selected.
{ if (this.face1.contains(e.getX(), e.getY())) { this.face1.move(10.0, 10.0); } if (this.oddface.contains(e.getX(), e.getY())) { this.oddface.move(10.0, 10.0); } else if (this.face2.contains(e.getX(), e.getY())) { this.face2.move(-10.0, -10.0); } else { ...
0
141791651b3c3b99adcc19bbaebd213d
7b41362d533a82d29ac775cb4397e7cf
修改Thread信息
if (updateDb) { ContentValues values = new ContentValues(); values.put(Provider.MsgThreadColumns.MODIFY_DATE, msgThread.getModifyDate()); values.put(Provider.MsgThreadColumns.UNREAD_COUNT, msgThread.getUnReadCount()); values.put(Provider.MsgThreadColumns.SNIPPET_CONTENT, msgThread.getSnippetContent()); ...
1
309742dbeff49448ff173ff1b191a17c
c7065fb00aa3080d4080fa40cf2ff2aa
注册账号变化监听
public class OrderMessageActivity extends BaseMessageActivity private void registerUserInfoObserver() { if (uinfoObserver == null) { uinfoObserver = new UserInfoObservable.UserInfoObserver() { @Override public void onUserInfoChanged(List<String> accounts) { ...
1
a527c1ba1b04438e7d5df261887aeacc
a2c41d9e36feff35df17e5e851688396
获取指定target的enabled属性
if (target) { return (string) "true"; } return (string) "false"; }
0
73cc316b9f3514d7ee2c48817aa0910c
5f9f4e19c54b58d050c77b55f1b92df1
A function which creates a new ready queue.
RPQ_queue* RPQ_create() { RPQ_queue* newQ = NULL; newQ = (RPQ_queue*)malloc(sizeof(RPQ_queue)); if(newQ != NULL) { newQ->P0 = PCB_queue_create(); newQ->P1 = PCB_queue_create(); newQ->P2 = PCB_queue_create(); newQ->P3 = PCB_queue_create(); newQ->NP = PID_to_PCB(NULL_PROCESS); if(newQ->P0 == NULL || newQ-...
1
b77f8f0bcad64a1e080ba2a0014c9754
582c34a1f26c465e72590b3706a88ff9
The user Entry Point for Application. Publish the Incompatible Pci Device protocol.
EFI_STATUS EFIAPI SaInitEntryPointDxe ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; VOID *Registration; DEBUG ((DEBUG_INFO, "SaInitDxe Start\n")); Status = SaAcpiInit (ImageHandle); EfiCreateProtocolNotifyEvent ( &g...
0
b891afc8e9503cbf29a78793188db68e
e672b23a24205dc5aeb14d8e5548ba79
this sends and shows the sent message
void PalWindow::msgSent() { if (this->msgOutbox->text().isEmpty()) return; QString you("You : "); you += this->msgOutbox->text(); this->chatHistory->append(you); int cli_sock; char msg[200]; struct sockaddr_in server; ::memset ( &server, 0, sizeof(server) ); server.sin_fami...
1
7dd8a06371f4aaef53dd40b981fe4f07
6076a5b5d864c7c3689400f5ad2c7796
构建返回结果,code默认值为0
Result<T> result = new Result<T>(); result.setCode(code); result.setMsg(message); return result; }
0
476ed7e9a5730e0d3ef01ee46ae7fb33
d0dd2632eb9993ea4472c7a9d35f08ff
List sub-objects for PROPFIND requests. (method is without docstring to disable publishing)
class CalDAVClient public function principal_property_search($xml_text, $url) { $result = array(); $this->DoXMLRequest('REPORT', $xml_text, $url); if ($this->httpResultCode == '207') { $errmsg = $this->httpResultCode; if (isset($this->xmltags['DAV::response'])) { ...
0
402a25ef970ba1a30b13902be9b6e313
9d7336de2b5af0bcbf3560413310390b
Analyzes a parsed CSS string and returns an array of information
{ $css = preg_replace("/\/\*.+\*\//Usi","",$css); $selectors = explode("}",$css); foreach($selectors as $selector) { if(trim($selector)) { list($keystr,$codestr) = explode("{",$selector); if (trim($keystr)) { $codes = explode(";",trim($codestr)); foreach ($codes as $code) { ...
1
4c543f2bc8e4f2f1b14fab4f1302cd36
a24634eef02abfb00661febe956414dd
returns next tag: tuple or str with incremented major version
def get_next_version(version: str) -> str: v = version.split(".") last_number = str(int(v.pop()) + 1) v.append(last_number) return ".".join(v)
0
e921052cb519d352b6b5e512474ed284
d80736cf1547640ea4c3bf3f202db2a2
taken from ../test_runner.py
from click.testing import CliRunner class _CliRunner(CliRunner): def invoke(self, *args, **kwargs): result = super().invoke(*args, **kwargs) if result.exception: print('--- stderr from CliRunner.invoke ---') print(result.exception) ...
1
1aaa9434149eb19ed7a22bdb1a8df71e
75d9dfdd9d5c2392278b89826f4ea3c5
Prepare vendor products data for view.
class BrainDataAdapter public function prepareVendorProductStocksData(stdClass $productDataRu) { return $this->stocksDataAdapter->prepareVendorProductStocksData($productDataRu); }
1
fa53476e293bd3e780a118adad106bb5
ab4e5b436cb6afd97a1536665e2469ea
获取ARP表并以关联数组形式返回
def MAC_ARP(IP_Addr): pass
0
46da6b25eac1d6220321fe53c55c5dac
f4e0502bdb639348c9f744ff5ed067f4
Get direction of first step toward target position
{ var toTargetVector:Vector3 = nextWayPoint.transform.position - this.transform.position; toTargetVector.y = 0; if(toTargetVector.sqrMagnitude < 1) { nextWayPoint = nextWayPoint.GetNextWayPoint(); } return toTargetVector.normalized; }
1
f754dbade51628cbaa730874b93bcfaf
170ee31d94d384acd761b3ed3cce155e
이벤트 이메일 테스트
class IndexController extends Controller public function testEvent(){ $success = Event::fire(new TestEvent('event data')); var_dump($success); }
0
00dd15a0e10ac46e45087c3c528ae6e8
c012aef5147285b22b59745f56ff5704
Compute Gevens rotation matrix parameters.
def flat_correct(flat, radio): nonzero = np.where(radio != 0) result = np.zeros_like(radio) result[nonzero] = flat[nonzero] / radio[nonzero] result[result <= 0] = 1 return np.log(result) first = read_image(get_filenames(params.projections)[0]).astype(np.float) last_in...
0
b9f05893f15cd9497826d934b45401e3
8abe707aebb36e89db2c1455e7eace01
this will remove all char except (0-9 and +) then return the sanitized version
namespace Comparison_shopping_engine_frontend_android public class ItemPriceView : EditText public String GetNormalizedText() { return Text.RemoveNonDigits(); }
0
7e3d58939c2f3ffb0e57166dae64733c
0dafd0756b636f129d0ddcc8585b6fb3
Retrieves the next innovation number for this instance
namespace Cic.OpenOne.Common.BO public abstract class AbstractNkBuilder : INkBuilder abstract public String getNextNumber();
1
ea2b091cc5170253b6f39ff2ae9d6424
f5222f50524231fc8a99adeb29092aa3
SIZE-OF-SYMBOL
static size_t rb_elf32sym_size(const void *ptr) { return sizeof(Elf32_Sym); }
1
a375756669b678777fa9ecc4a77e1a6a
4acc6b879d597d650e4df96717b0507d
[設定]ダイアログのオーナードロー。
public class RequiredBFDialog extends javax.swing.JDialog implements ActionListener public void setOwnerDialog(boolean owner) { this.ownerDialog = owner; this.panelVariable.setVisible(this.ownerDialog); }
1
4a8da05857856414755c57cc056d2bc2
7f0ef0548ce47e9f2ea8c274968b0ed4
Retourne le numéro de la place occupée par le véhicule dont l'immatriculation est donnée.
public class Parking public Place getFirstFreePlace(Vehicule vehicule) throws PlusAucunePlaceException { Place place; if (vehicule instanceof Camion) { place = getFirstFreePlaceTransporteur(); } else { place = getFirstFreePlaceParticulier(); } return place; }
0
9735ae0cfe36335be74c589acb286546
a3ef7bae45f93e7e2e62abbc86d6d0a8
Get a cursor in the translation unit.
class CursorKind(BaseEnumeration, table=enumerations.CURSOR_KINDS): def is_translation_unit(self) -> bool: return conf.lib.clang_isTranslationUnit(self)
0
f16ebf79922462e880af470285cfbd70
4437fced047e006df788f29dda66ae84
returns true if something changed, false if
int CPatientData::setAge(int _age) { int dirty = age != _age ? TRUE : FALSE; age = _age; return dirty; }
1
3d39b5bda9e7e277ca88775b6d0674f7
d5317399ceb0db478a06d39b554c6bb3
获取客商版本集合,用于导入时,判断客商版本是否处在
public class UpdateManager implements ISubSystemCallBack{ private ArrayList<Object> getLocalList(){ ArrayList<Object> localList=new ArrayList<Object>(); ConfigManager configManager=ConfigManager.getInstance(); configManager.read("version"); return localList; }
0
f00c3cd599a7ed69c00c52abbd077c6f
b6fadecfede612d0ca46adf62a063b27
Construct full path from shortened path
public class Repository private static String getFullId(String shortenedId) { List<String> allCommitIds = plainFilenamesIn(COMMIT_DIR); String actualId = shortenedId; int shortendIdLength = shortenedId.length(); if (shortendIdLength == 40) { return actualId; } ...
0
b4e46c472f082344c4772c6d079e2541
0d2f8625ae187e03d96e73f0c6b72c59
Returns the look direction in the camera coordinate system.
namespace Opsive.UltimateCharacterController.Camera.ViewTypes public abstract class ViewType : StateObject public abstract Vector3 LookDirection(Vector3 lookPosition, bool characterLookDirection, int layerMask, bool useRecoil);
1
d37954f66dffd6ae95fb084c14e1cb51
391f287d1bef84411dcc04b657d601f0
Establecemos que, todos los parrafos hijos, se alinien al centro del párrafo padre
var form = document.getElementById("myTable"); var alCentr = form.getElementsByTagName("TR") for (var i = 0; i < alCentr.length; i++){ alCentr[i].setAttribute("align", "center" ); } }
0
413f865841efe147c1f61a5801cb7eef
329358679ac23760f0513e4ecbe7406f
Normalize an ISSN identifier.
class ISSNManager(IdentifierManager): def normalise(self, id_string, include_prefix=False): try: issn_string = sub("[^X0-9]", "", id_string.upper()) return "%s%s-%s" % ( self._p if include_prefix else "", issn_string[:4], issn_string[4:8], ...
1
24853d1ff2a9c3af7745b43671c6583a
ab90a33b38bc4b9b374868b43106f453
get all places that have sowings in a specific year
connection = psycopg2.connect(database="redmine", user="redmine") cursor = connection.cursor() cursor.execute("SELECT date, reason FROM closings WHERE EXTRACT(YEAR FROM date) = '%s';" % year) dates = cursor.fetchall() date_list = [] for day in dates: holiday = {} holiday['date'] ...
0
be4d7dc653d4d46df7abc99173abd74a
551a4e7e5166b1f2f72a8d46aab1d21a
interrupt handler for TIMER0A it switches between PF_2 and PF_3 enabling the first and second displays and sets PORTF output for corresponding display
void timerISR(){ PORTF ^= 0b01111111; }
0
f13f1fd79d67411c016eb55daa8aad8a
3a58ffa7c5ea8b0c80d11b3c3e16def2
确定自身与目标之间的距离是否小于某个值
{ Vector3 dir = targetPos - t.position; return dir.IsMagnitudeLessThan(distanceLimit); }
1
1f3fd5ce0c58d850657c1ec18539121f
1cb07259bd506c6cf28a6c512f96217c
Връща всички не-инсталирани пакети
namespace VersionChecker.Interface IList<NugetInstalledPackage> GetInstalledPackages();
0
bae0907eca7ad9e6a88a82abdf4cc0c3
22a4b69741029af8a9911cd80fb20c6c
按照查询条件查询所有综合成绩记录
public ArrayList<FinalScore> queryFinalScore(@Param("where") String where,@Param("startIndex") int startIndex,@Param("pageSize") int pageSize) throws Exception;
1
02fa1993645904268fd2fe0659d8d14c
178e8bf232374d4bb3cce5067c147745
Load a template and attach it to the specified element in the doc
export class Component extends HTMLElement #loadTemplate(config, childComponent) { this.attachShadow({ mode: 'open' }) this.#appendStyles(config.cssFile) fetch(config.htmlFile) .then((response) => response.text()) .then((html) => { const template = document.createElement('template') ...
1