query_id
string
corpus_id
string
query
string
code
string
label
int64
d1fde1d45bff615c8298bba4f546b0a5
fe46d48010984773e86479659324d062
View to display a job
def JobListView(): return 'JobList'
0
23b1a5ba0139ebba0dd73bc60c4cf5fc
d9bb986df4fb390ce5809017c309c46c
Checks if a user has permission to be assigned to an issue in this repository.
class IssueVoter extends AbstractVoter public function checkAttribute(UserInterface $user, $issue, $attribute) { switch ($attribute) { case self::ASSIGN: case self::DELETE: case self::EDIT: $participant = $issue->getProject()->getUserRole($user); ...
1
3470ee67155cfe718439a3818d81c1fe
c747f7de8aa7989097642899ee7544d4
Make the camera follow the given object
public class FollowCamera : MonoBehaviour public void SetTarget(GameObject target) { _target = target; transform.position = _target.transform.position + _offset; }
1
a27aadb36f03aaf723c632c0d575bd34
d0a4af06cc34be332a6d318234048568
根据指定的占位符参数格式化异常消息。
default String format(final String format, final Object arg) { return arrayFormat(format, new Object[] {arg}, null).getMessage(); }
1
01c9acaa4568f4948958404b6c01db52
c017f1f7425fa30629b1e673774fc211
Given the permission ID return the appropriate Icon
{ switch (icon) { case MainMenuIcon.Aaabattery: return "\U0000f413"; case MainMenuIcon.Abacus: return "\U0000f261"; case MainMenuIcon.Accountfilter: return "\U0000f05e"; case MainMenuIcon.Acsource: ...
0
d978484c2078bedc26eca722f99c4628
4bf414f4c1ff2b7eecc7d0b60eeebec6
Делает ход (перемещает фигуру)
public class MoveHandler private void moveFigure(int x, int y) { figure.setBounds((x * 100), (y * 100), figure.getWidth(), figure.getHeight()); ChessBoardLogic.figuresArray[figure.getPositionInArrayY()][figure.getPositionInArrayX()] = null; ChessBoardLogic.figuresArray[y][x] = null; Ches...
1
c39175dc9bfdae7fa4e746e7f1958e90
0353b15d31a9bd3e42e777eaa2a2292a
根据ID获取某一行的值
class Publicmidmethods extends Publicaction{ function obtainonecolumnbyid($model,$column,$id){ $list = model($model)->where('id',$id)->field($column)->find(); $value = $list[$column]; return $value; }
1
a56046ad03033c5d91378a490528cb67
cc964d9cba64fbcd9f72e2faa5fd4efa
set the location of the course
class NewCoursePage(BasePage): def fill_course_location(self, value): self.fill_in_text_field_by_css(ncl.LOCATION_BUTTON, value)
1
9c4b426f80b36785422dce390f7ccbc6
486e6560c48908581297e811fa045b65
Sets the edition_id of this CatalogueMatchInputDTO.
public class TdSecCxlc implements Domain, Serializable public void setIdEdo(java.lang.Integer idEdo) { this.idEdo = idEdo; }
0
2f48257fa550699edc8e39437251ae16
9fbeb95292b7e0445edbc35843d108fb
always answer yes
namespace Merlin.Core.Survey.Services internal class DefaultReadHandler : SurveyReadHandler protected override bool CanHandle(SurveyAnswerReadContext context) { return true; }
1
33754651c1aba46a113e80391633d0e9
9590dcdba87a2bea006964d6815683ee
Retrieves all of the customers who are currently making a call
public Customer[] activeCustomers();
0
dc581b77f797384e2589253982ae50ae
435ac496007a92c056eae9e17aba92d5
Create a message digest for a phrase using any supported digest method.
public Future<Hash> digestAsync(final byte[] message, final DigestType digestType) { final Message wrappedMessage = new Message(message, digestType); try { digestQueue.put(Collections.singletonList(wrappedMessage)); return new WrappingLambdaFuture<>( () ->...
1
f033604e4e638ab430e8f0f22864fe2a
1acd04e0f18f9b71eaaca22a5408c726
Register components to the supplied application object. Returns that object to allow the chaining/builder pattern.
class TestHttpServerFactory extends TestFactory setApplicationComponents(applicationComponents) { _applicationComponents.set(this, applicationComponents); }
0
e29f9c28ce00e42d69df92cc76d90c77
b2e806f0eeeb5dcd9343ed96c810978f
Catch WM_SYSCOMMAND, SC_MINIMIZE
{ if(m_wndList.GetSelCount()==1) { int index; if(m_wndList.GetSelItems(1,&index)==1) { DWORD_PTR dw = m_wndList.GetItemData(index); if(dw!=(DWORD_PTR) LB_ERR) { WINDOWPLACEMENT wndpl; wndpl.length = sizeof(WINDOWPLACEMENT); ::GetWindowPlacement((HWND) dw,&wndpl); if(wndpl.showC...
0
48bf4ae06a7b49876107b50510e41df8
3b4ae0b83ce273a5b8da6c8f0f273e37
测试发布会列表接口
headers = {"Content-Type": "application/json"} data = {"id":"1", "name":"测试发布会", "limit":"10", "status":"1", "address":"深圳", "start_time":"2019-02-17 12:00:00"} r = requests.post(self.url, json=data, headers=headers) result = r.json() self.assertEqual(r.status_cod...
0
4a9c0cc877748bf61bad9b6f101baf23
24d6ccef9d7d1f68771adca8f6eba975
'短信验证码'输入框
smsInput(e) { this.setData({ 'smsInput': e.detail.value }) }
1
3604b95ff23225c92e4d162879c68fac
aab3d8d28a6d805f2bfede78a1ac1593
根据商品类型和商品id取得该商品下允许的优惠
if(empty($discountIds)){ return null; } $this->database->slave->from('eb_discount_range'); $this->database->slave->where('discount_range_status',1); $this->database->slave->where_in('discount_id',$discountIds); $this->database->slave->where('(product_id='.$productId.' or category_id in ('.implode(',', $c...
1
e489ae346bf89baf68d086938e043a12
95000c7719658fcd5e1df84d45b4809c
白い背景を用意する
function whiteBg() { ctx.fillStyle = "white"; ctx.fillRect(0, 0, 1000, 500); }
1
1e8f824697fa5c4fda4dbb6694856982
09650cd2b88b6be08466748ac62cd4c2
ホワイト連携情報登録API呼出関数
[RequireComponent(typeof(Browser))] //Browserをアタッチすること前提 public class SkywayDataConnect : MonoBehaviour private void dataSend() { try { _browser.CallFunction("DataSend", string.Join(",", SendData)).Done(); } catch (Exception e) { Debug.LogWarning(e.Message); } ...
0
52ace523b43000c53193f20a44f3d175
b1bf0a3d12911ece5c0f7a80a119d84c
求K次最大收益(不重复)
int n = prices.size(); if (k >= n / 2) { int sum = 0; for (int i = 1; i < n; ++i) { int diff = prices[i] - prices[i - 1]; sum += (diff >= 0) ? diff : 0; } return sum; } vector<vector<int>> dp(1 + k, vector<in...
1
42a49593ea4650e9695b77592439abbe
d69785a724574510ca12d51ab893be4c
调整“滚动到顶点”按钮的位置
{ deleteButton.Top = resultListBox.Top + (resultListBox.Height - deleteButton.Height) / 2; }
0
b974d20771c975947d8590c61b70921f
d425846243492c376996c8d6ef048ec4
保存活动记录信息list的方法
public int savePl(@Param("list") List<ActYwGstatus> list);
1
a165402bc9c8e20b24f5be0c439c3c29
49a1aee0f1a71b3c1e11ba6467f7f351
Free all the memory allocated for a gif
gfmRV rv; int i; unsigned char pBuf[10]; ASSERT(pCtx, GFMRV_ARGUMENTS_BAD); ASSERT(pCtx->pOut, GFMRV_GIF_NOT_INITIALIZED); pBuf[0] = 0x2c; pBuf[1] = 0; pBuf[2] = 0; pBuf[3] = 0; pBuf[4] = 0; pBuf[5] = pCtx->width & 0xff; pBuf[6] = (pCtx->width >>...
0
9152e10fb08d1a64ae84a7dbf8ff4b53
98fac0c1fd04a4470d6430a92d8bf313
GET: CentroAdministrativo
{ clsCenCosVM oCenCosVM = new clsCenCosVM(); try { this.GetDefaultData(); oCenCosVM.EstadoId = ConstEstado.Activo; return View(oCenCosVM); } catch (Exception exp) { return Redi...
1
969729917f6c3bed1c1f7f3c9d05546a
c2878518081ed5110ff84adca034e9de
删除该标签下的指定用户Id
@Repository("labelDaoImpl") public class LabelDaoImpl extends BaseDaoImpl implements LabelDao @Override public void deleteLabel(String label, int user_id) { JdbcTemplate.update(SqlMappers.LabelSqlMapper.get("deleteLabel"),user_id,label); }
1
c206aabb6c77484f54d0984bbc279f2f
b0a7133739b3a93c5489ff86cef8255b
获得stateFile的名字
class StateManager(object): def getStateFileName (self): return self._stateFile
1
636f2c2338dabed1b07d0cc63605851f
531d2f350ad69cd91508f4cb613b5576
Method to manage the music. Depending on s, we can stop the music, changed the music or create it.
if (!this.enabled && !this.enableSound) return false; if (!data.file || data.file.length === 0) { if (data.off && data.url && data.url.length > 0) this.defaultMusicURL = data.url; else if (data.off) this.MusicState.stop(); return; ...
1
dd55dc4ed6e982e4344623a93ba887c7
4c6c64bab9f95c093328a112fb75dc54
Get vacancies for CV.
{ $query = VacancyUser::query(); if ($search) { $query->where(function ($q) use($search) { $q->where('name', "like", "%{$search}%"); }); } $result = $query->paginate($perPage); if ($search) { $result->appends(['search' => $s...
0
25bea31dd90f053e11c590794483747d
99ec9d082420ff7ce0f96782fa2b18a1
Show logo control interface.
int xOffset = 8; int yOffset = 0; int xSize = 38; int ySize = 45; logoImageView.setVisible(true); logoImageView.setViewport(new Rectangle2D(xOffset, yOffset, xSize, ySize)); }
1
b31a8e9b63d75a4ddadaab73efc591fb
122f24a7a7da6bd6423af0ccb4a8b07a
When this method is called, the mode of this node is fixed and cannot be changed by subsequent setMode(...) calls.
public void setMode(GSSMode mode);
0
0ea54ce14a8899871d576d089e5266e1
ac91063bfbf52245abc1753ca831409c
Get all attachments of a ticket post
{ myDAL.ClearParams(); myDAL.AddParam("@TicketID", ParamID.ToString()); DataSet ds = myDAL.ExecuteProcedure("spGetAttachments"); return ds; }
1
9a500645e7679a0c4f01e3ca7754e66d
d842fa3c17f5d8319e476b3b8405ea40
返回是否超过指定长度
if (nullToEmpty(str).length() > length) { return true; } return false; }
1
2ccc053ed2f4b180a00a6e5e9a0139cc
32948603148c5a3dc83f1623642b3602
获取所有服务站及其服务区域(超级管理员查询)
def _getAllSrv(): datas = db.querySQL2map( "SELECT SERVICEID,TYPE,SERVICENAME,URL,ENABLED,CACHETYPE,SECRET,MSGLOG FROM USERVICE_DATA WHERE type<>1 and type<>2 and type<>8") result = [] for data in datas: result.append(_getServiceFromDB(data)) return result
0
411abd97623910938d08907c5612633b
18e13190fc6dd6069082e3aadae92a03
MediaWiki ArticleDelete hook. Runs every time mediawiki gets a delete request. Prevents users from deleting manuscripts they have not uploaded
class extension_restricted_sections extends Extension public function authorPreDelete(array $context) { }
0
369172640aa90ac1905dce4a3c0244d1
a6e1c85de24499e5d95e9bf46f2911c4
Obtiene el tema de un plan de ejecución
class technote{ public function getPlan(){ $this->getTechnote(); return $this->technote["infos"][0]->stageplan; }
0
1560aa6341f65155938566570fa10fd9
e01029582f11da351251cd71df95283b
绑定Excel个数
class GroupBusiness extends BaseBusiness function getExcelringNum() { $this->sql ="SELECT ID FROM t_user WHERE STATUS = 1 AND excelringflg = 1"; $data = $this->db->exceuteQuery($this->sql); return count($data); }
1
530aadb6493cabf440ac5b403f170d98
8a5b15805bb662a0a2b7023352d0e20d
Get the value array which will be merged with the text
class tx_caretaker_ResultMessage public function getValues() { return $this->values; }
1
e71a6df40bae2132daa1a483cacf8159
d603fa15ec4fa2ad9d77a3b19cb49989
Нужно ли выводить на экран ответ на запрос
{ switch (res) { case (int)Errors.ERRAI: Console.Clear(); Console.WriteLine("Нет опроса\\блока\\вопроса под таким номером."); Console.WriteLine(); return false; case (int)Erro...
1
00b38dc5086f13fc3cfc47f12930d67f
79e0316ba8e44930956998539a24275c
获取部门下的文件
List<ResourceRecord> records = new ArrayList<ResourceRecord>(); try { conn = DatabaseConnectionFactory.getDatabaseConnection().getConn(); String sql = "select * from resourceRecord where relatedDeptId = ? order by publishDate desc"; pstmt = conn.prepareStatement(sql);...
1
97f362ebefaa43c6c99959f4fec320a2
d9eca0c925cda7b821b81761fed0e638
Creates and then returns the url to the profiles.
class Stupeflix extends StupeflixBase private function createProfilesUrl($user, $resource) { return "/$user/$resource/"; }
1
9fe180eb53a2644e9fbf8f9ca7ec1bea
6f608d4a5f923a009cc87ec03685473d
Single Linear Interpolation
static inline float UTIL_LINTERP( float amount, float a, float b ) { return (1-amount)*a + amount*b; }
1
8aa132d31c03fbf0ee3ba4cff089c74b
3269921d429296e0fa3de28867c0f4ed
根据登录类型获取对应的处理器
@Component public class LoginHandlerFactory implements InitializingBean, ApplicationContextAware public LoginHandler<Serializable> getHandler(LoginType loginType){ return LOGIN_HANDLER_MAP.get(loginType); }
1
d43e354189bdc12aaf67167959d9bbe4
33eefa971b0caaca6061cad865b966f9
Lấy Danh Sách tên loại hàng theo nhà cung cấp cho treeview
{ List<String> list = new List<string>(); string strCon = "Data Source=" + dataSource(2) + ";" + "Initial Catalog=SimpleQuanLyKhachSan;" + "User id=sa;" + "Password=04010409tete;"; using (SqlC...
0
a305c4aedcf01b0e03f12260b5bd9994
b65f910e8ff0396ad4e061020f61f4b5
设置座位号.
abstract class Card public function setSeatNo($seatNo) { $this->seatNo = $seatNo; }
1
bc60917b4407162c5a88b2e99cc70475
175840e80149f05b4e82242d5393981d
Realiza la busqueda de un mecanismo de titulacion por id
public TitularesResponse fetchTitularesById(TitularesRequest titularesRequest);
1
d343d1dad820e0adebb93a65e4fff334
80e897adb93872f933073ee948f22fce
Return the average for the entire class.
if (students.size() == 0) { throw new ArithmeticException("No student in the class, average calculation aborted!"); } double average = 0.0; for (Student actual: students) { average += actual.calculateAverage(); } if (average == 0.0) { t...
1
ce3aed3e166b46c6d97887e18b385f62
339faddcc5e94097c9df57fd95be91be
Fonction permettant de se connecter au wiki admin (stockant les fichiers privés)
headers = { 'X-Requested-With': 'XMLHttpRequest' } data = { 'callback': 'getChallenge', 'action': 'challenge'} response = session.post(URL + 'login', headers=headers, data=data) if response.status_code != 200: sys.exit("login(): Impossible de récuperer le challenge") d = pq( response.cont...
1
e854fe3736c40649737bb004290cfc95
ecb56699fe1b12e5e63bff0f3e7b01ed
Se elige un numero entre 0,1,2 aleatoriamente
function marcoAleatorio($fila){ if ($fila > 3){ $sw = 0; } else { $sw = mt_rand(0,1); } return $sw; }
0
d23c6fad00f2853524a4b50bd0373890
d82f1fd1c760e196d16794394de5389b
不同意退货退款, 订单状态回滚到之前的状态
const orderid = this.post('orderid') const orderinfo = await this.model('order').where({id:orderid}).find() const refundorderinfo = await this.model('order_refund').where({order_sn:orderinfo.order_sn}).find() await this.model('order').where({id:orderid}).update({ order_status: refundorderinfo.back...
1
31bd1cddf281d80dde5fed7f6870d2de
0a8dc86eda9cf37036b97ea3767e56fc
Redirect to a specific page on successful sign out
class ApplicationController def after_sign_out_path_for(resource_or_scope) Rails.application.config.app_domain + '#navbar' end
1
916c403a4671199781a78853eb3247ce
dda912aca1bb6b564d309739be1f8c37
This function handles both detect and response to collision.
void CModel::detectCollision() { reset = false; sound = 0; float vY = vDir.fGetY(); float vZ = vDir.fGetZ(); CObject* sphere = at(0); CVector3 vSphere; sphere->getPosition(&vSphere); float y = vSphere.fGetY(); float z = vSphere.fGetZ(); if (y >= 15.5) { vY = -fabs(vY)...
1
a09b1dc8f54b2388e0e0830aa5a796d7
7f61448ad6da3ef0f9cb03f40c5be655
Default separator is '.'
cases like (1)
0
a1e5245dc57ac492ed716cf1a6a5931a
7610ef79a7945a4dd6e068546ff84c79
Attempts to re-synchronize this bag's data across all players in multiplayer, by sending the current client's data to all other clients
void synchToPlayer(EntityPlayer player);
0
7ceeb7ade670f14a5daf79bcf63290a7
7b3f3b1c63403b5f885cfd8cdd91923f
解析結果として月を設定したか を返します。
public class VRDateParserStatementParseOption public boolean isUseMonth() { return useMonth; }
1
8e152c1acaa502ec785539a16f82ac4b
a68be9a087493dd254f6cca4a4052b56
Change or remove segment classes. It only changes the segment data but doesn't allow the segment key to be changed.
record = self._db_client.get_one_or_none(SegmentModel, SegmentModel.name == segment_name) if record is not None: record.change_number = new_change_number self._db_client.merge_and_commit(record)
1
ff993b0a812cf995bf8ec19eb4e0ff4b
4be393043fa99007b2aaf4c13fa017e4
Returns a new object of class '<em>Remote Location Type</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
@XmlRegistry public class ObjectFactory public RemoteAuthorizationType createRemoteAuthorizationType() { return new RemoteAuthorizationType(); }
0
6d4bbf1a5f223940b729cfabf3329af6
8d64081f150b7e5ddff49a173bfad67f
Method used to add constraint that imposes the lower bound on y
public class Constraint public Constraint withMin(Integer min) { this.min = min; return this; }
1
6aafe91cd1a04d4e11bd820ac698de04
5b12803617fc4c9bc1319cad40cd4e06
No titles
class TestDocStart(TestDocument): def test_107190_page_1(self): file_name = 'tests/samples/107190.pdf' self._run_test(file_name, [0]) self.assertEqual(0, len(self.device.titles)) self.assertEqual(0, len(self.device.result))
1
65b30552de804cbde1dd5383e255636e
fad55b0021bdae8ceca7e7ba7920aa80
记录当前正在购买的photopass的图片信息
try { photoGraphVo = new PhotoGraphVo(); yyUser = new YyUser(); yyUser.setUserCode(userCode); photoGraphVo.setPayState(inKey); photoGraphVo.setStoreId(storeId); photoGraphVo.setYyUser(yyUser); photoGraphVo = photoGraphService.initMyOrder(photoGraphVo); yyPgMyOrders = photoGraphVo.getYyPgMyOrde...
0
92293434f27f39e01681442259041542
4ac9ac4c4e19010d5061d7ef849028c6
Asynchronously reads the delta (deleted) link target.
public function getDeltaLink() : ?string;
0
92159ff20ccfa13c2007065317019e63
3de502bec7f7937013f2294e7ebe14ff
Verifie l'egalite entre deux haplotypes
xbar, ybar = a1 x, y = a2 if not (Dna.pi(xbar) == x.seq and Dna.pi(ybar) == y.seq and len(xbar.seq) == len(ybar.seq)): return False for i in range(len(xbar.seq)): if xbar.seq[i] == ybar.seq[i] == "_": return False return True
1
332329b6830d0ca88b8d766ed45e6ede
866dbe8ea853461c3be5cb4cb23879df
Test the generated json for a single VM against known output
@MiskTest(startService = false) class JvmMetadataActionTest @Test fun golden() { val rawResponse = jvmMetadataAction.getRuntime(); val response = moshi.adapter<JvmRuntimeResponse>().fromJson(rawResponse)!! assertThat(response.vm_name).isEqualTo("FakeRuntimeMxBean - VM Name") assertThat(response).isEqual...
1
aeaa496c8371d8ccbdae647573a063a6
6de1c13e3958489f5895dc0803114d91
Меню отображается на телефоне или планшете в портретной ориентации
class MainActivity : AppCompatActivity() override fun onCreateOptionsMenu(menu: Menu?): Boolean { val orientation = resources.configuration.orientation return if (orientation == Configuration.ORIENTATION_PORTRAIT) { menuInflater.inflate(R.menu.menu_main, menu) true } else...
1
86196053122b27ea948caa30ad045408
c86cabbd65c922c5dbe4f931fd97f1b8
Get Kernel Release Version
result = self.run_and_check('vmware -v') rel = result.message if rel.startswith('RELEASE'): rel = rel.split('\r\n')[1].strip() return rel
0
ad1aaa08ea0676262452dbbaef90cd9f
d34e51592d8f166a5297b1c362b05ec0
計算モードのラベル表示
data&=0x2F if data in BasePlugin.__MODE_LABELS: return BasePlugin.__MODE_LABELS[data] else: return str(data)
1
660438050cb4abb763f04f8325b8e430
d7ea7ec44df20c76617dc04afa17e2a8
Gets the value of the prefix property. possible object is {@link Prefix }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PedidosCompra", propOrder = { "key", "no", "buyFromVendorNo", "buyFromContactNo", "buyFromVendorName", "buyFromAddress", "buyFromAddress2", "buyFromPostCode", "buyFromCity", "buyFromCounty", "buyFromContact", ...
0
1ba19199ab3da434fcfe84b110ecc527
79949b3e517d46229ae2555642085819
修改库存盘点明细数据(异步)
class api extends view function asyncStock() { $id = $this->post('id'); if (is_array($id) && !empty($id)) { $product = $this->model('product')->where('store=? and status=? and isdelete=?',[27,1,0])->where('id in (?)',$id)->select('id,barcode,store'); } else { $product = $this->model('product')->where...
1
c961afaa10e0ea8059ee3c8f4f4113e9
6075ebde3864f20c883bb0dd91ec6df0
As we have finished with it now, destroy the list of exported colours
GeometryExporter::~GeometryExporter() { CLEAR_POINTER_VECTOR(exportedMaterials); }
1
3f9d16d0d7478452fd7873cd288d741f
34616f18c8427d6f024455194bfd8666
() -> str Returns a string with the properties of the Paddle.
string = "[" + str(self.__class__.__name__) + "] " string += str(self.__width) + "/" + str(self.__height) return string
1
8fd4246ac1a3e17bb02910f6f7634192
828b4daab1afaaa0fe3e82eaba906376
Setter for <code>WETRN.V_OFFR_SLS_MS_GIFT.OFF4_DMS_PREV_UNIT_QTY</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VOffrSlsMsGiftRecord extends TableRecordImpl<VOffrSlsMsGiftRecord> public void setOff1DmsUnitQty(BigDecimal value) { setValue(36...
0
ff4451f7c07ecc708d0de2c7f3f6e8de
f4dd6197971e289c1ded83df4a084810
Write a u32 into a vector, which must be 4 bytes long. The value is written in little-endian
assert!(dst.len() == 4); input = input.to_be(); unsafe { let tmp = &input as *const _ as *const u8; ptr::copy_nonoverlapping(tmp, dst.get_unchecked_mut(0), 4); } }
0
61dd0f1672ac2428d0c8f127eaf4dd8a
e3581f331c6e7c62f1acd5cf16bbfeda
Verify a required value is reported missing when it is not provided.
class VerifyHoneypotValue(HoneypotTestCase): def test_field_missing(self): request = _get_POST_request() resp = verify_honeypot_value(request, None) self.assertEquals(resp.__class__, HttpResponseBadRequest)
1
299be9c3ae824b40fdd0e5cedad8457d
94ec0f1665cbdc17b7b10137aca2e824
! Returns a pair with status bits. The first boolean represents valid input. If the first boolean is true, the input is valid, otherwise invalid. The second boolean is true if the command is the quit-command.
{ static int c; get_char(c); if (get_int(n)) return true; get_char(c); return false; }
0
bb9b154c7f02da0a20f93bc0f5a4e830
bb849f0234983f93afa21fde5b1e8085
Method to score if the particle appears to be a trapezoid. Compares the convex hull (filled in) area to the area of the bounding box. The expectation is that the convex hull area is about 95.4% of the bounding box area for an ideal tote.
class VisionRetro2015Sample : public SampleRobot double AspectScore(ParticleReport report) { return ratioToScore(((report.BoundingRectRight-report.BoundingRectLeft)/(report.BoundingRectBottom-report.BoundingRectTop))); }
0
feb27832708d476655c405df66559c77
f39fa9c7bb8b106c4eb8f168f33e1b9d
Tests occurrence of an error because of an invalid input value provided at field "inIntersectionMode".
input_dict = TestInputValidation.get_default_inputs() for key in ["conflicts", "sync_starts", "offsets", "greenyellow_leads"]: if key == "conflicts": input_dict[key][0].id1 = "unknown" else: input_dict[key][0].from_id = "unknown" with s...
0
80c077649178774920ee878cb9edbeaf
ebcdd3964137f601e78718556444afea
Hiển thị trang xem điểm sinh viên
{ $keyword = $request->keyword; $diem = new Diem; if(!empty($keyword)){ $diem = $diem->where("student_id", $keyword); } $diems = $diem->paginate($this->per_page); $data = [ "title" => "Danh sách điểm sinh viên", 'diems' => $diems...
1
49e4c85708bec59ed2c16954e9ad5f0d
1405077220414095c193a917940e3176
returns the type of the next candidate
class ProximityNode(QueryNode): def next_candidate(self):
0
4ba1a79b630258ef485ae8d32b88d1d1
b9a387d92c5c9477e70f9eff7928cabe
Open specific shop log page from Main Page
{ $data['shop'] = DB::table("shops") ->where("id", $id) ->first(); $shop_category = $data['shop']->shop_category; $shop_owner = $data['shop']->shop_owner; $data['shop_owner'] = DB::table("shop_owners") ->where('active',1) ->where('id', ...
0
a8ac357523a4eea572660ad21c9590b2
056a83551482a9b32390caf80078f3e3
img: input image. points: annotated pedestrian's position like [row,col] kernel_size: the fixed size of gaussian kernel, must be odd number. sigma: the sigma of gaussian kernel. return: d_map: density-map we want
im = sktr.resize(im, self.im_shape, preserve_range=True) smpl_loc, smpl_pos, smpl_locx, smpl_locy = self.sample_locs(im) accum = numpy.zeros(self.im_shape) im = self.ex2.add_all_channels_on_fly(im) for tree in self.trees: channels = numpy.sort(numpy.asarray(tree.chann...
0
480d91a899c06644de1f9aad5e43b537
5ae2b571c0be79cdaff17758f4d7d348
Redirects to Google sign-in, if necessary or if forced by options.
export class App extends LitElement async signIn () { try { await auth.signInWithGoogle(); } catch (err) { const {openDialog} = await import("./web_modules/web-dialog.js"); const {$dialog} = openDialog({ center: true, $content: document.createTextNode(err.message) }); $dialog.style.setPropert...
0
82f3218a53c81df9eec26c37f7b99d7c
8391f5e60b2209c8c3b053d0202da869
Setter for the Visible Columns in the grid
public class FormAdapter extends RecyclerAdapter<Row> public void setVisibleColumnNum(int visibleColumnNum) { this.visibleColumnNum = visibleColumnNum; }
1
e2335b22a70765376703a14de9298aac
a10b25e37ddaa49c0a777df93acb901e
Возвращает признак того, что это оборудование ПК
class Functions function is_pc() { $ua = $_SERVER['HTTP_USER_AGENT']; $not_pc_devices = [ 'Android', 'Mobile', 'iPhone', 'Windows Phone', 'iPad', 'DoCoMo', 'KDDI', 'SoftBank', 'Vodafone', 'J-PHONE' ]; $GLOBALS['cs_device_pc'] = true; foreach ( $not_pc_devices as $not_pc_...
1
c2a48e09506ffc8323d6f7d1ac5d81da
25753ecdd10d9b47aadfda813eca9f3c
Przydziela pamięć pod 2-wymiarową tablicę pomocniczą służącą do obliczenia ilości kodeli w bloku koloru. Metoda wywoływana tylko raz, w konstruktorze. Tablica ta, używana wielokrotnie, jest czyszczona, nie tworzy się jej od nowa przy każdym użyciu.
threads = 4; Pixels = new int *[1000]; Pixels[0] = new int[1000]; for (int i = 1; i < 1000; ++i) Pixels[i] = Pixels[i-1] + Result.cols; for (int i = 0; i < 1000; ++i) for (int j = 0; j < 1000; ++j) Pixels[i][j] = 0; }
1
050ff2520fa5aca5857e34368f955386
87e8985b69a07fce1af4df001fa26db9
Returns True if the mouse is over the element.
class Button: def is_mouse_over(self,mouse_position): is_mouse_inside_x = self._x < mouse_position[0] < self._x + self._width is_mouse_inside_y = self._y < mouse_position[1] < self._y + self._height return is_mouse_inside_x and is_mouse_inside_y
1
652570b42fc7e1d8ca20a2ff83f9b4dd
16caf2cce8e77d9344d54620f768f386
Spawns a new thread to kill the Debug Process.
{ Thread worker = new Thread (this); worker.start (); }
0
133385188e676f80773e4ae2dde644b7
45a344683398cc595ec5343a540ee334
POST /washers POST /washers.json
class WaxonshipsController def create @waxonship = Waxonship.new(waxonship_params) respond_to do |format| if @waxonship.save format.html { redirect_to @waxonship, notice: 'Waxonship was successfully created.' } format.json { render action: 'show', status: :created, location: @waxonship } ...
0
569f4f5c1c4b7b0fb215cf40df264795
2f158c1bcbe08e2f885ac3439bbe302a
Returns the annotations present on this field. Returns an empty array (never null) if the field has no annotations. Callers should refrain from modifying the returned array.
public Annotation[] getAnnotations();
1
d46b4c17ad40556f18883edba79c16c6
8b09e8babbc84934c30398032884a22e
Test the TimeSeries comparison methods.
seriesM_10 = time_series(N.arange(10), date_array( start_date=Date(freq='m', year=2005, month=1), length=10) ) seriesD_10 = time_series(N.arange(10), ...
1
85f21e9e3e31d47e661cb99cb8a8ae42
d13f9ecbfa40423afeef2c42869c1bdf
remove the front element of a table and return it
if self.size == 0 then return nil end local element = self.internalElementTable[1] self:DeleteIndex(1) return element end
1
3faa1a60112968e4a21b4e40b00a1a99
1433120097a2a40b37654f6d6bc305b4
Space-fill a character string
int HDpackFstring(char *src, char *dest, int len) { int sofar; for (sofar = 0; (sofar < len) && (*src != '\0'); sofar++) *dest++ = *src++; while (sofar++ < len) *dest++ = ' '; return 0; }
1
5860feba180ce0ac9dae969423dba735
ece82c3470bca92ac171b6e8c23c6b33
对于每个等价类,输出他们的k,v
function print_pairs(t) for k,v in pairs(t) do print(k, " => ", v) end end
1
275d704b78b1dabdecbaabd520d230f7
d5f13a6acb00520c4ab73c0f6994c8a8
Gets the concept sequence index.
public class TaxonomyRecordPrimitive implements WaitFreeComparable public int getConceptSequence(int index) { return this.taxonomyData[index] & SEQUENCE_BIT_MASK; }
1
91224126b386ccb1e4926eb5a5d54d8d
271b54ab8857889f38efcc854ba5e8ca
获取近一周预警统计
@Controller @RequestMapping("/index") public class IndexController extends BaseContoroller @RequestMapping("/getWarnAndTotalTrend") @ResponseBody public String getWarnAndTotalTrend() { Map<String, List<String>> map = dlpCheckRecordService.getWarnAndTotalTrend(getLastWeekList()); return JSON.toJSONString(map); }
1
1a2b5bbeabdc843b7ba66f8fb1b59699
20611737163dc7628994e2416aed3aa3
[店铺] 加载常用购物车
$.ajax({ url:ApiUrl+"/index.php?act=member_cart&op=cart_list", type:"post", dataType:"json", data:{key:key}, success:function (result){ if(checklogin(result.login)){ if(!result.datas....
1
bc5eb731f11d7da5274a0f2d83267ab4
079488b5615000b7a888a0f0d2415c98
如果订单是在线申请或者是来自呼叫中心,返回true
public class Order extends BaseEntity<Long> implements Serializable @JSONField(serialize = false) public boolean isApplyReturn() { if (this.getPaymentMethodType() == Type.BEFORE_PAYED && this.getOrderStatus() == OrderStatus.confirmed && (this.getShippingStatus() == ShippingStatus.shipped || this.getShippin...
0
a61dfa4f5a6a475feccf12b3dec790f5
8dcfb839875aa5c8d298e6d06e272707
Save the current output
def save_output():
1
6edaaba01fa2f5efd191e70dd0f22c8f
a28bdb4436e4e862f8d8e1b9aa44fbc2
Print memory use to the console.
void i_memory(int *stats) { if (fputs("\nMemory: ", stdout) == EOF) exit(1); lastline++; summary_format(memory_buffer, sizeof(memory_buffer), stats, memory_names); if (fputs(memory_buffer, stdout) == EOF) exit(1); }
1
486ef86661362bd70b38b2602c40d4ca
82508beb860e6d20fbb66c2725f3cdf2
Converts *x* to an ``mpf`` or ``mpc``. *x* should be a numpy scalar.
def DownCast(x): if cfg["downcasting"] == False: return x if x == inf or x == -inf: return x elif isinstance(x, Rational): if x.d == 1: return x.n elif isinstance(x, m.mpf): if int(x) == x: return int(x) elif isinstance(x, m.mpc): if x....
0
f4a4593542f94b929642c969c38fa08d
5a31845ecb42c334753802b5af1819cb
calculate in-game isometric cursor position
{ POINT pCursorPosition; GetCursorPos(&pCursorPosition); ScreenToClient(pApp->GetMainWindow(), &pCursorPosition); float w = static_cast<float>(pApp->GetPresentParameters().BackBufferWidth); float h = static_cast<float>(pApp->GetPresentParameters().BackBufferHeight); D3DXMATRIX ProjMatrix = camera->GetProjMatrix()...
0
840eb77c4fbc157732bdfc2c5e34505b
fe66cc7db60e59f976f668d409163430
It removes a single collaborator from list of collaborators for a trip thus making this trip unavailable to user.
hideViewDateDialogBox(); var removeId = [gOwnerId]; var postData = gadgets.io.encodeValues({ 'action': Operation.SHARE_TRIP, 'id': gCurrentTripsData.currentTripId, 'ldap': gOwnerId, 'remove': gadgets.json.stringify(removeId) }); var params = {}; params[gadgets.io.RequestParameters.POST_DATA]...
1