query_id
string
corpus_id
string
query
string
code
string
label
int64
8f48e533f61b529beb25500484f01aa1
8ed470924809146053cb2ba8bf933263
Gets the average value of the jitter reported in RTCP packets, in RTP timestamp units.
public class SnmpPeer implements Serializable public long getAvgRtt() { return _avgrtt; }
0
af98337850b1cc73bd0786b8eda74b32
d07f76ceb6ba3d281fc15cfc21433a4d
Set averaging time in ms.
{ lps25hb_reg_t reg; int32_t mm_error; mm_error = lps25hb_read_reg(ctx, LPS25HB_RES_CONF, &reg.byte, 1); reg.res_conf.avgt = val; mm_error = lps25hb_write_reg(ctx, LPS25HB_RES_CONF, &reg.byte, 1); return mm_error; }
1
d891e7e338f5ed78e516e78cbe852f72
53731f44c24f6d9588ae010df30af884
Returns the database the event occurred on.
public abstract class EventMessage public abstract String getDB();
1
6226012fe738c258dd745461ee5b45af
e3302034a42146ad40359697888274d8
Set the (32/64) bitness we are going to use.
void asm_config_set_endian(int mode) { config_update_key(CONFIG_ASM_ENDIAN_FLAG,(void *) mode); }
0
5fac85382c08fd288f523e9aeb679372
39d896ef2f7959a1060c1ba743c58a1e
Hàm lấy danh sách loại tin Active
namespace IFSOFT.Dal public class clsNews public DataTable GetNewsList() { SqlCommand command = new SqlCommand("Select * from NewsDetail where Active='true' order by vCreateDate desc"); command.CommandType = CommandType.Text; return SQLDB.SQLDB.GetData(command); ...
1
6344e5af586a4c3fc197d7434a4c2bb9
0c6edad0f8360070c9a057ec006df6ad
A Talkbox Talk 'may' have been completed by multiple users - return list separated by comma return string
def participant_name(conversation) conversation.receipts.reject { |p| p.receiver == current_user }.collect {|p| p.receiver.display_name }.uniq.join(", ") end
1
e2ac8b70e4b8fa89cdb39a3f28ebcfb7
5ef88e9fe04a8477c142af0060adbce4
Creates a new Raw element with the specified value.
namespace RightCrowd.CompareTool.Tests.SetupHelpers.Factories internal class DataModelFactory internal IField CreateRawField(string fieldname, string value) { return new RawField(fieldname, value); }
1
65216c74f6f81b012c9144e46097f0e9
09ac5055818430cff983b33a2e7b87cc
Returns square id by a lat/lon location
function squarePoint( $lng, $lat, $distance = 0.5 ){}
0
cd115c8927a8181a35f853fabf41811f
4808e089c4c514527fc7f4549a585fbc
{@code PUT /yegan-codes} : Updates an existing yeganCode. or with status {@code 400 (Bad Request)} if the yeganCode is not valid, or with status {@code 500 (Internal Server Error)} if the yeganCode couldn't be updated.
public ResponseEntity<?> putMethod(@PathVariable("id") int id, @RequestBody String body) { return ResponseEntity.status(HttpStatus.CREATED).build(); }
0
e948ada769fb0dc008d0a1fe9a6cef7f
55315e7616580e1651d47600a484f2b4
Generates a random number to determine whether Animal is rested or not
{ return var1.nextInt(20) == 0 ? 1 : 0; }
1
1b01b3d586b3c756e6d32b3e9e741c1f
f0c13bc1bcad9e323b724272e4473430
NewAlibabaScbpProductListRequest 初始化AlibabaScbpProductListAPIRequest对象
func NewAlibabaScbpProductStatusUpdateRequest() *AlibabaScbpProductStatusUpdateAPIRequest { return &AlibabaScbpProductStatusUpdateAPIRequest{ Params: model.NewParams(), } }
0
e1a729909d5bafbff667496069d4a677
0e31c11f2b0936e38dbce01a0ae7efca
Осветляет цвет фона цветного символа в буфере.Если фоновый цвет уже светлый или нет светлой версии, он остается неизменным
{ GDI d = new GDI(); Color colorBegin = img.GetPixel(pos.X, pos.Y); IntPtr panelDC = g.GetHdc(); IntPtr memDC = d.CreateCOMPATIBLEDC(panelDC); IntPtr hBrush = d.CreateSolidBRUSH((uint)ColorTranslator.ToWin32(CurrentColor)); IntPtr hOldBr = ...
0
c2471ea980cc7f5077e1bd772480c86b
b5c182d443c40eb207b8c5e08985d089
这个方法通过传入的RequestCode和ActionCode来找到对应的Controller里面对应的方法然后调用,data是要处理的数据,后面两个参数是持有一下Client和Server的引用,以便于比如广播消息给其他客户端之类的事件的响应
{ BaseRequest request = m_abDict.TryGetTool(act); if (request == null) { Debug.LogWarning("ActionCode: " + act + " ,不存在对应的Request类"); return; } request.OnResponse(data); }
0
a077d1d3203bd18d4df9946384877912
ee3d2a0e3a97c501b7d1e8dce6c88a96
从background-seq位置中提取固定长度背景序列的位置信息并将其写入到文件中
column_map = ( 0, 4, 3, 6, 13, 7, 8, 9, 11, 10, 12, 2, 14, 5, 1, 15, 16, 19, 17, 18 ) with open(binary_file, 'rb') as bf: data = bf.read() offset = 4 + sequence_length sequence = struct.unpack(str(sequence_length) + 'c', data[4:offset]) with open(text_fil...
1
46fb613ddfbaac000da822e5e451cbbc
543c1017b6b53fe458423d1416159160
выбор цвета текста
void QWDialog::setTextFontColor() { QPalette plet=ui->txtEdit->palette(); if (ui->rBtnBlue->isChecked()) plet.setColor(QPalette::Text,Qt::blue); else if (ui->rBtnRed->isChecked()) plet.setColor(QPalette::Text,Qt::red); else if (ui->rBtnBlack->isChecked()) plet.setColor(QPalett...
1
93885a310ce1e3a5b2bc035dad31efb7
5741d608bc0305c846584c6e02be895c
Returns the total jumps that the fish has completed
{ moves = null; int fishes = -1; return fishes; }
0
dcd2a934c95abd8cb87b0f4166a8370b
75267af8669d12ef24ed0c88de5a8d8b
Erstellt die Ableitung der Funktion
class Calculator(Loggable): # kontruktor def _derivative(self, value_to_differentiate, degree): x = Symbol(value_to_differentiate) y = x ** degree string_output = str(y.diff(x)) return string_output
1
64d4d74bc5b92756976dcae6ec95bf54
27303bae2c0e3ded18edd611527f0e1a
convert the sdpa form into the form that can be used by scs (splitting conic solver)
namespace scip class ObjConshdlr : public ObjProbCloneable static SCIP_DECL_CONSSEPALP(consSepalpObj) { SCIP_CONSHDLRDATA* conshdlrdata; conshdlrdata = SCIPconshdlrGetData(conshdlr); assert(conshdlrdata != NULL); assert(conshdlrdata->objconshdlr != NULL); SCIP_CALL( conshdlrdata->objconshdlr->scip_sepa...
0
c51016373fed7a8196b1d192eebb78db
894fedfb30ed7fdde2d208d07945ef8a
Insert or replace item.
class OnetoOneAssoc extends Assoc function insert() { if($this->item && !$this->options[Assoc::SYMETRY]) { $this->item->save(); } }
0
f1f8fc6d44a66f280b14cf3a92d2be84
411cedc6237fe143f3016896ac9c9915
Instantiate the promotion service on the basis of promotion type
{ ISTRACE_IN(createPromotionServiceDetails); ISAddItemCommand::createPromotionServiceDetails(); if (theEntry->isPromotionServiceEntry()) { if (theEntry->isPromotionServiceCoupon()) { LEXPromotionServiceCouponDetails* details = (LEXPromotionServiceCouponDetails*)getCouponEntryDetails()-...
0
e822ec02acd91996610ffccc7d983185
ffb9b8920105e1988acc0ecc55c393b7
Apply settings to local GCP environment. This must be called first to set the account and project.
class GcpTaskRunner(base_task_runner.BaseTaskRunner): def _SetupProject(self, gcloud_runner): project_changed = False if self._NeedProjectSetup(): project_changed = self._UpdateProject(gcloud_runner) if self._NeedClientIDSetup(project_changed): self._SetupClientIDSecret()...
1
75585a6c381c64f1005fa5d333c5090e
cfaa10979c36c4a6a1ff0366286912c8
This method allows the rotor's position to be manually set to a specific value. If using the machine "per procedure", this should only be used when setting up the machine's initial configuration, prior to encrypting or decrypting, and should not be used again until the process is complete
namespace Enigma_Console class EnigmaRotor public void SetPosition(char newPosition) { this.currentPosition = newPosition; }
1
37ff748fa2ccd8a56ee864acf06dcab9
3ee2939f909ec6afc53ee2c182762dac
Create a new deployment within the provider's API.
class DeploymentApi def create_deployment(deploymentCreateBody, opts = {}) data, _status_code, _headers = create_deployment_with_http_info(deploymentCreateBody, opts) return data end
1
fc840a15e3793352e0cf454a020c613f
bc29a7d359e02d0cd07c97b4fd53ab75
Test the search product view URL is accessible by name
response = self.client.post( reverse("home:search"), {"search": "product"}, follow=True ) self.assertEquals(response.status_code, 200) self.assertTemplateUsed(response, "home.html")
1
fc213c6349db4d1114d40f3fe3299880
8e88340605cc8aded0f1ade4e735ecc4
查询到达ID
int arriveNum = busInfo.arriveNum; List<BusLine.Result.Stations> stations = mBusLine.stations; float[] stationDistances = mBusLine.stationDistances; BusLine.Result.Stations localStation; float b2sDistance; float s2sDistance; if (arriveNum <= 0) { local...
0
397a17c47a1fa7c4106e0ce4ec48a9b4
9da315f91cb20a407020336e27069385
Clear the drawn polygon
function polygonClear(polygon){ polygon.length = 0; }
1
bca90f6737b30fbd8e3b5b65cab3e26e
0ccb3375f238d00aea7548250d9eb8dc
Change the location of the turbines
if len(xcoords) != len(ycoords): raise ValueError("WindPlant turbine coordinate arrays must have same length") self._system_model.value("wind_farm_xCoordinates", xcoords) self._system_model.value("wind_farm_yCoordinates", ycoords) self._system_model.value("system_capacity", s...
1
eea20406c40bb74e1e042553ec07ba84
1f7d8c41035dd035f630bc0b14988f6d
室内地图的翻页
if (typeof selector === "string") selector = $("#" + selector); selector.show(); laypage({ cont: selector, pages: pageCount, groups: 3, curr: currPage, skip: false, skin: '#428BCA', first: 1, last: pageCount, prev: false, next: false, j...
1
c6b99c2234582401e0cf916bbf2061d7
861f213c1b547049253cab70e8e9f29f
Print a character n times
i = 0 while i < lines: print_a_char_n_times(char, times) i += 1
0
b710f39546947e1c7d786972aeae8b1a
21e47969c87a66bf5984474aff14bdc3
Read all bookings for an event
{ $bookings = Booking::all(); return view('eventmanager.events.bookings.index',[ 'bookings' => $bookings ]); }
0
2ba733b818e41bc46ecdc1578497c2f8
b9bee254aad12d22cdf278779b5c1149
we ignore our own selections
void Scene::NoSelection() { for (unsigned int i = 1; i < lobjectes.size(); i++) { if (i == selected_obj) continue; bool c1 = lobjectes[selected_obj].collideBox(lmodels,lobjectes[i].getTransformedBBPoints(lmodels)); bool c2 = lobjectes[i].collideBox(lmodels,lobjectes[selected_obj].getTransformedBBPoints(lm...
1
a752ca08e01658bf05197349676d3627
ecc5e6d9bcffd477ab02ccc6038de478
Get the number of valid ground color values that are currently defined.
public static int numValid() { return values().length; }
1
b64adc688f83cca0bb1ef629c7d9715b
d26377f31029566b47adbf1e546793b1
Same behaviour as call of method <code>notifyInsertionFailure(null, String)</code>.
if (JdbcDebugCfg.entryActive) debug[methodId_othersInsertsAreVisible].methodEntry(); try { return false; } finally { if (JdbcDebugCfg.entryActive) debug[methodId_othersInsertsAreVisible].methodExit(); } }
0
eae0a4744021babb0473a2bc6a5a3b2c
0207cdc0c53cb712402ac562837c366e
ゲームの開始など、フェードインが完了した時に処理したい処理を実行します。
export class EaseScaleTransition implements MVC.ITransition private onFadeInFinish() { this._view.onShowFinish(); }
1
cfb025a27534116ffbb29cebae4d1ac7
8f951b23fda46740a85a79a78ceb5ccc
Creates a volume of specified size and export it as iscsi target.
volume_metadata = None if args.metadata is not None: volume_metadata = _extract_metadata(args.metadata) cs.volumes.create(args.size, args.snapshot_id, args.display_name, args.display_description, args.volume_type...
0
3c75f5495cce0cb0cf5f329010afe7db
d9a59eeb574460650c2b8ba7c7a1aa52
停止邮件队列管理器
class Queue public static function stopQueue() { chdir(ROOT_DIR); exec('php mysmarty queue stop'); }
1
ab2134e4a98f91057098a6f251dfa71a
85051385d025472c73d4d9bf3d8db34c
Returns the meta object for the attribute '{@link SAR.AttributeCondition#getOperator <em>Operator</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getArithmeticExpression_Operator();
0
f6706e636a4db3b50157a0b311060ba8
08c68564226c71237283e39056fe27a8
Returns true if PageElement is currently checked. Overwriting this function affects the behavior of the function `isChecked` in PageElement and its `currently`, `wait` and `eventually` APIs.
public final class Probes implements IProbe, IProbeExpectedConditions @Override public boolean isSelected() { return context().<SeleniumContext>getCurrentContext().getCurrentElement().isSelected(); }
1
ff617f871449e84a585d1da8c8443ffd
4ed1c31253d31605f90ad17a2d6084f8
Comments handler, loops every 1 second to handle the comments and show them when they appear
public class YoutubeCommentCrawler : MonoBehaviour private IEnumerator ProcessComment (string chatId) { var nextPageTokenstr = string.Empty; while (doFetchComment) { yield return new WaitForSeconds (commentFetchInterval); var chatURI = uriGenerator.GetLiveChat (chatId, nextPageTo...
1
5043310eaf1833943e90303e6bbfd452
8ae64aa83c87895d1dadf36a3ab00a7e
facebook回调
class WeixinController extends Controller public function callback(){ $redis = new Hredis(); $this->user = $this->app->oauth->user(); $Model = D('user'); $map['openid'] = $this->user->getId(); $data = $Model->where($map)->find(); if($data['is_delete'] == 2){ $...
0
2be1136b288820f5df7790420e9dc272
9dff2008764a799dfe1b3fd265f4a247
Returns whether the package is a development virtual package or a concrete one
class AliasPackage def is_dev? @dev end
1
8b4e1370901c61738181a290ebd87a26
c52d2f8ddd33b191e970d49a7e32e90f
set the room id's of the lecture representation.
@Path("/json/plan") public class PlanService @SuppressWarnings("unused") private static class LectureDto public void setStudyGroupIds(int[] studyGroupIds) { this.studyGroupIds = studyGroupIds; }
0
25bb96e8e48342972a47efae4d9277a1
6aa9c3652d38caea538a08d0bff90129
键盘读取一行输入,去掉其中重复字符, 打印出不同的那些字符
Scanner scanner = new Scanner(System.in); while (scanner.hasNext()){ String line = scanner.nextLine(); char[] lines = line.toCharArray(); Map<Character, Integer> map = new HashMap<>(); for (int i = 0; i <lines.length ; i++) { int cal = 0; ...
0
0dbc5ad32b24cf6f33ef569a08374a90
993573d01687d587f03556ab169e6853
Create Ninja variables to hold the names of the compilers and linker.
void init_name_list(void){ const_list = list_create(); label_list = list_create(); current_procedure_counter = 0; current_const_counter = 0; main_procedure = create_procedure(NULL); }
0
cc35c153d09a02dae9460e5916b4bb87
acdf04543b23a35aa6f8353a58e21143
Controls the population of sequins (fka pixels) by populating or culling
public class PopulationController : MonoBehaviour private void Update() { if(!hasActive() && hasStartedSim) { if (EnableScreenShots) MakeSS(); NextGeneration(); genNumber++; } }
0
5b3fa470af016fd8e935060b18070972
10f15e7535d1d30b77db981b8a7833f5
Get information about a person (address, hobbies etc) given a phone number.
this Client client, string phoneNumberPrefix = default) { return client.ExecuteAsync(new GetPhoneNumberInfo { PhoneNumberPrefix = phoneNumberPrefix }); }
0
255b0ed73be6a5b0fd75a3a5229ed50a
90831d35605272ef1ff54e1aded149cb
Sets the area_type of this IOspfArea.
try : self._ospfarea = ospfarea except Exception as e: raise e
0
76b2f8c75c12c208719128f9b99a1409
fceab1cc04ad47c4fd69756421463635
根据完整SQL查询,返回结果为包含bean对象的List 注意:1. bean对象必须有无参构造函数 2. bean的成员变量名可以和数据库字段名不同,通过第三个参数namedMap完成对照 3. bean的成员变量必须是String 4. 对于某些数据库字段,转成字符串是否有精度的问题还有待验证
Map<String, String> namedMap) { List<Object> ls = new ArrayList<Object>(); if (namedMap == null || namedMap.size() == 0) { return ls; } List<Map<String, Object>> result = jdbcTemplate.queryForList(sql); for (Map<String, Object> map : result) { ...
1
2a9c46300a00114ed016b3ed8c013387
498aaa21fe61b6879773b729a18fd3fb
returns 0 if not valid, 1 if valid csv
class ThroughputGraph private function validateCSV($datafile) { return TRUE; }
0
9aeaa228dd8e466db371aa629227d810
bd24e909bf5872e39a6510e0881da020
Ensure Pulp Smash can load the config file.
try: open(self.config.name) except FileNotFoundError: pytest.skip("config file not found") config_obj = read_config(self.config) self.assertIsInstance(config_obj, Config)
1
5d1cf4d9c44d99f90203589f53f5dacd
9e84f170ff046a3774e3d8c0842419d3
Handles the dismissed event of the referenced alert.
namespace HP.ScalableTest.DeviceAutomation.SolutionApps.HpRoam void HandleAlert();
0
5851dc1cc6a7959bb1be5e1f29d47c66
019458dd5f8e5caea4d3e9efde1912d6
Each metatron should register a URI regexp match for future bookmarklet functionality.
function astronvim.set_url_match() astronvim.delete_url_match() if vim.g.highlighturl_enabled then vim.fn.matchadd("HighlightURL", astronvim.url_matcher, 15) end end
0
b5f93f8695acf4a73d30d7000a571dd0
01bd0ff1866555d3b574fbd97e7e464f
SOCKETIO CONNECTOR
class SocketHandler{ handleConnection(){ this._io.on('connect', socket => { socket.emit('connected', `You have connected to server`) console.log(`User ${socket.handshake.query.clientName} with ID ${socket.id} has connected`) socket.on('join_room', args => { co...
1
d80f3e3d6d48c2b285fa72e4b59c826c
86e3b8b98a60e0204d9d776f2c0cbd52
Registers wizards.
function createWizards(count) { var arrWizards = []; for (var i = 0; i < count; i++) { arrWizards.push({ name: window.utils.getRandomElement(WIZARD_FIRST_NAMES) + ' ' + window.utils.getRandomElement(WIZARD_LAST_NAMES), coatColor: window.utils.getRandomElement(window.setupPlayer.CLOAK_COLOR...
0
72eb6af61eb928428c7237c8543db261
0ae49bebf99d14b47e47949f179f594a
清除超出屏幕的NPC
function SceneElementsModel:RemoveOutViewUnits() if not self.removeOutView then return end local removeList = {} for k,v in pairs(self.RoleView_List) do if k ~= self.self_unique and not BaseUtils.is_null(v.gameObject) then local p = v:GetCachedTransform().position if not Team...
1
e0f9258713de8cb6104310755c31a8dd
147dd2780191c95b43a8471e49366d61
@brief change ansi string to unicode string
{ int wideCharsNeeded = MultiByteToWideChar( CP_THREAD_ACP, MB_ERR_INVALID_CHARS, ansiString, -1, NULL, 0 ); if( wideCharsNeeded > 0 ) { wchar_t *wideString = (wchar_t*) malloc( wideCharsNeeded * sizeof( wchar_t ) ); if( wideString != NULL ) { if( 0 != MultiByteToWideChar( CP_THREAD_ACP, MB_ERR_INVALID_C...
1
3e770267e3c04677d57b128731b03c8a
99d781697b34bb3405ffec1f3d1083ee
Generate proposals from static anchors and normalizing coefficients coefficients: N x 4 tensor: N x (ty, tx, th, tw) anchors: N x 4 tensor with boxes N x (y, x, h, w) anchors contains x,y of box _center_ while returned tensor x,y coordinates are top-left corner. returns: N x 4 tensor with bounding box proposals
proposals = coord_corner2center(proposals) gt_bboxes = coord_corner2center(gt_bboxes) xy = (gt_bboxes[:, :2] - proposals[:, :2]) / proposals[:, 2:] wh = torch.log(gt_bboxes[:, 2:] / proposals[:, 2:]) x, y = xy.chunk(2, dim=1) w, h = wh.chunk(2, dim=1) bbox_targets...
0
f5046234a84f6ffe2998e1888221c2ce
9e970937a84a03c0168f7a79deb1e6b4
First we unmute the remote video stream so that Agora can start fetching the remote video feed We have to do this since we mute the remote video in the onUserJoined callback to save on bandwidth
function enableAudio() { if (remoteVideoIsMuted) { for (const streamInfo of Object.values(streams)) { let { videoElement } = streamInfo; videoElement.pause(); videoElement.muted = false; videoElement.play(); } remoteVideoIsMuted = false; const button = document.getElementById("...
1
4fe09ce7c6accddd2aa3933b06b8bdf7
d8417e9cafe103ef191855339b834e23
Set the number minmax using the quick "minmax" attribute.
@TargetApi(Build.VERSION_CODES.HONEYCOMB) public class NumberRangePicker extends NumberPicker private void processAttributeSet(AttributeSet attrs) { this.setMinValue(attrs.getAttributeIntValue(null, "min", 0)); this.setMaxValue(attrs.getAttributeIntValue(null, "max", 0)); }
1
f5c1f33a16afe5468d77a4cff96a73c8
d27c107b92b2cec078753699149d781d
支付后将购物车中已支付的商品修改为已支付
public ModelAndView Addorders(ModelAndView mov, HttpSession session){ Users u=(Users) session.getAttribute("u"); Long orderod=(Long) session.getAttribute("Orderid"); List<Long> pids=(List<Long>)session.getAttribute("proids"); List<Long> shopnum=((List<Long>)session.getAttribute("shopcarnum")); Order o=new Or...
1
7f983a140dd073ad3fa846d602e84287
ad5b64b275b7da2a28624270c39365c7
Seleciona um mecanismo de atribuição
namespace Calculadora public partial class MainPage : ContentPage private void SelecaoOperador(object sender, EventArgs e) { estadoAtual = -2; Button botao = (Button)sender; string pressionado = botao.Text; operadorMatematico = pressionado; }
0
e6aa25fa016d282dff1a29acd6a9d8d2
e9baa7960d354bbe4bf860089da4990e
Get model status
app.logger.debug('Getting model status.') logs = { 'failed': os.path.join(LOG_PATH, 'model.failed.json'), 'pending': os.path.join(LOG_PATH, 'model.pending.json'), 'current': os.path.join(LOG_PATH, 'model.json') } status = {} for level, path in logs.items(): if os.path...
1
e7b5a7699af2b246d55976b4015ba5c3
77145141692c0278ad39b5ea98cc82e2
Setter of the n_max property This function sets the value of n_max
if value is None: self._n_points = None return self._n_points = int(value)
0
b1aad2ee67a66a6d971680dc45ff3647
efd3a12eabc4e078516ec366ff059691
Get most similar trackers
return db.query(TrackerDatabaseHelper.TRACKER, new String[] { TrackerDatabaseHelper.KEY_ID, TrackerDatabaseHelper.LATITUDE, TrackerDatabaseHelper.LONGITUDE, TrackerDatabaseHelper.TIME, ...
0
62f66f631ec8a43fab5571f452ee6838
462df19a9489965f0c47f5a6eb45fa3e
Write a blank line to stdout.
public class MiniJava public static void writeLineConsole() { writeLineConsole(""); }
1
a1d94a7b2efa7929e0ec8a4055f6721c
c2520fb485be1757a94ae283f3827090
returns if a pickup is active or not
public class Pickup : MonoBehaviour void Awake () { gameObject.SetActive(false); }
0
3d4f353c30860193cbc1e7cbb483b75c
a6d765cc7d43f073bc02ec954b26e66a
@brief 引数の行列のノルムを返す関数。
const double norm(const Matrix& m, enum normtype type) { double ret; switch (type) { case NORM_1: ret = norm_1(m); break; case NORM_2: ret = norm_2(m); break; case NORM_INF: ret = norm_inf(m); break; case NORM_MAX: ret = norm_max(m); break; case NORM_FRO: ret = norm_fro(m); break; default: ...
1
373817b9f83d66e78d00de630afcd45a
f1465c0c0df337cdfcbbe35931da1a6b
Puts on labels for tiepoints in an age table on a stratigraphic plot.
for st in ['DC', 'MD', 'VA']: dD = params.loc[st, 'plot_data'] for tSt in r_[0,1,2]: ns = r_[0:2]+tSt x0 = np.mean(dD['xs'][ns]) y0 = np.mean(dD['ys'].iloc[ns]) slope0 = np.log10(dD['ys'].iloc[ns[0]])-np.log10(dD['ys'].iloc[ns[1]]) double_t...
1
bbcec3ebb34a7c737a9f2f8464bb652a
bd2d76a37e99e739180af402890abaf2
აბრუნებს მოთამაშის პროფილის სურათის მისამართს
$sql = "SELECT profilePicture FROM profile WHERE userId = :id"; $array = array(':id' => $id); $result = $this->db->fetch($sql, $array); if(sizeof($result) != 1) { return NULL; } else { return $result[0]["profileP...
1
29ae8654f3b2373792ac35356a2b2c2e
4607a9da84ee4215b1e5dc6fb65d60de
Verification of SBI parameters default values
bc := mockADVBatchControl() if err := bc.Validate(); err != nil { t.Error("mockADVBatchControl does not validate and will break other tests") } if bc.ServiceClassCode != CreditsOnly { t.Error("ServiceClassCode depedendent default value has changed") } if bc.ACHOperatorData != "T-BANK" { t.Error("ACHOperator...
0
9e4ed5105b85658fe069db94307989d9
cbd019cef2552b24cab15fc2b7e1190b
全メッセージ読み込み ひとつの固体の複数ファイルに渡る全メッセージを1つのマップに格納するのでアクション名の被りに注意
{ TextAsset[] allTextAssets = Resources.LoadAll<TextAsset>(ActionInteractiveData.dataDirectoryPath); List<ActionInteractiveDataInfoCollection> actionInteractiveDataInfoCollectionList = new List<ActionInteractiveDataInfoCollection>(); foreach (TextAsset textAsset in allTextAssets) { ...
1
106f8292ca868127f53a62ab6674b988
28c6c93695b1b6931a78a724fb67b8a5
接続切断開始時の画面Enable制御
namespace LineScanCamDemo public partial class Form1 : Form private void OnCameraClose(object sender, EventArgs e) { this.Invoke(new Action(() => { buttonOpenCam.Enabled = true; buttonCloseCam.Enabled = false; checkBoxAsync.Enabled = fa...
1
d0c2a33db89189d27593292bd542068e
0217f461ee2f7bee5efc07bbb43c6eb4
Identifies the current tenant's container as the logical root container.
public class StashboxMultitenantOptions public void ConfigureTenant(object tenantId, Action<IStashboxContainer> tenantConfig, bool attachTenantToRoot = true) { this.RootContainer.CreateChildContainer(tenantId, tenantConfig, attachTenantToRoot); }
0
233af038ddb298b0d9dc4aa88b07bfc9
8b6c4cb006ba115c682fd3de33219573
行動「パス」選択時の処理
finishCount = 0; _playerManager.phaseMode = PhaseMode.move; _playerManager.presentMass.RoadVectorEnable = true; _playerManager.presentMass.SetAroundMassCollider (true); }
0
e96eb62dceb79a85b6904617a22f9b69
af7728ed8ee9353d0762a704621fa615
Deletes all rows from the financeiro_historico table.
class HistoricoController extends Controller public function destroy($id) { }
0
5e07a7f32c0ab0b7e775cee767ca6ccd
c214f533b66e04619dd6b0218ead3807
Test if enabling of a terminated controller fails (as expected).
class HaScaleGroup1(TestBasic): def add_controllers_stop(self): self.env.revert_snapshot("ready_with_9_slaves") self.show_step(1, initialize=True) cluster_id = self.fuel_web.create_cluster( name=self.__class__.__name__, mode=DEPLOYMENT_MODE) self.show_step(2) ...
0
d6b87490d6c07f7555338a748d27ed32
fa155527abd4aa3a63d8f1cfec2dee3d
\brief Start transfer on the channel whose index is hc_num. \retval status in 8 bits
uint8_t* buff, uint16_t length, uint8_t hc_num) { pdev->host.hc[hc_num].ep_is_in = 1; pdev->host.hc[hc_num].data_pid = HC_PID_DATA1; pdev->host.hc[hc_num].xfer_buff = buff; pdev->host.hc[hc_num].xfer_len = length; ...
1
3638921d08da8283f5c9c73fe1a1071e
7f61448ad6da3ef0f9cb03f40c5be655
naive recursive implementation
cases like (1)
0
d8241809685319fac6c6f3efd370f0fe
9c53edd505813fbe986275d23a424a57
Copy the wallet address to the clipboard
void FindAddressDialog::copyAddress() { QApplication::clipboard()->setText(contextMenuItem->text(COLUMN_ADDRESS)); }
1
b4218acf9b75adb2c35b86c3a811a48a
0771a43b3a9b2db1baa23976c8d2090b
@brief función donde se comprueba la interrupción de la pulsación simultánea del boton_up y boton_down
{ static unsigned long ultimo_tiempo_interrupcion2 = 0; unsigned long tiempo_interrupcion2 = millis(); if (tiempo_interrupcion2 - ultimo_tiempo_interrupcion2 > 200) { contadorBoton4 += 50; if (contadorBoton4 > 255) { contadorBoton4 = 0; } } ultimo_tiempo_interrupcion2 = tiem...
0
28e43ca1147e33437be985f0954f069b
fb027098e70a94355227f5497ab9574b
Tells the program is the user has selected an item
public class GameView extends SurfaceView implements SurfaceHolder.Callback public class GameThread extends Thread public class MainGameState extends BasicGameState public boolean hasItemSelected() { return mSelectedInventoryItem != null; }
1
6dbb1cdaaac09d4a7d9db20d1a312ee9
647cff2031344a93033ec8d71ebd7232
Requests and updates Amazon and Channel Advisor Products
market_id = market.MarketplaceId if market else 'ATVPDKIKX0DER' products = Product.objects.filter(MarketplaceId=market_id, ASIN__isnull=True) length = 5 for group in [products[i:i+length] for i in xrange(0, len(products), length)]: sku_list = [p.SellerSKU for p in group] products = Produ...
1
fcb28bc897a4eb4c5b1c218d05ac84ae
cae2f7e256ec9e9f2e2146eedaf76861
Given a list of three points (x,y) and another with the same size containing the 3rd coordinate for these. In other words the parameters are three points in R3. Then calculates two vectors.
x = x2[0] y = x2[1] z = x2[2] A = x1[0] B = x1[1] C = x1[2] D = - A * x1[0] - B * x1[1] - C * x1[2] sigma1 = (A*x + B*y + C*z + D) / sqrt(A**2 + B**2 + C**2) A = v1[0] B = v1[1] C = v1[2] D = - A * x1[0] - B * x1[1] - C * x1[2] sigma2 = (A*x + B*y + C*z +...
0
9c6e6f6be667802d656019b23cb16876
f86640dc5dd4aea3a9436457be1590b8
https://webassembly.github.io/spec/core/binary/modules.html#binary-exportsec
let mut module = builder::module() .function() .signature().param().i32().build() .body() .with_opcodes(elements::Opcodes::new( vec![ elements::Opcode::Call(1), elements::Opcode::End ] )) .build() .build() .function() .signature() .param().i32() ...
1
a53f7ed1a80d162e4b47295950390ab1
d5286e4f7ce5ae0c4be753fb557c03f4
Wyświetla formularz dodawania filmu
class FilmController extends Controller public function addFilm() { $genres = Genre::all(); return view('admin.film.add-film', compact('genres')); }
1
b5ea4a52f2238cf0db16930207d9e894
af0bb9a2b7b58f907a70a44f865274e0
( a -- ) Drops the top item on the stack.
class RPNStackOps(object): def drop(self, stack): self.pop()
1
105816bd1ed6399d8ba1a1ee35efa4b1
93de033fef7d5c948b8574199359eba6
타입을 명확하게 선언해야 할 경우에는 아래와 같이 선언이 가능하다.
fun main() { var num1 = 0 var str1 = "Korea" var bYes = true var num2 = 0L var num3 = 3.0 var num4 = 3.0F var char1 = 'A' var num5: Int = 0 var num6: Long = 0L var num7: Float = 3.0F var num8: Double = 3.0 var bYes1: Boolean = true var str2: String = "대한민국" var st...
1
96c299d9ab9423dd6a131bb63f3b1482
b37ac52960737e104baea789482d1c9c
Add an event to the database Events are proposed meetings. A date has a specific AG which it is part of.
{ $db = JFactory::getDbo(); $query = $db->getQuery(true); $query ->insert($db->quoteName("#__nglrevents_events")) ->columns($db->quoteName(array( 'id', 'titre', 'soustitre', 'resume', 'fin...
1
c020a6b7bdd1258b7dd6deb066cdb69a
75fd8038e992c425880e3c4f7702dc64
Reconstructs the V matrix for comparison against the original V matrix
class Meka: def reconstruct_G_hat(self): n = len(self.df) G_hat = np.zeros((n, n)) index_row = 0 for i in range(self.number_clusters_c): W_1 = self.blocks_of_W[i] index_col = 0 for j in range(self.number_clusters_c): W_2 = np.transpose(...
0
485bf180b31066c1d1c5dec02978b183
3df3c372d3bcad5c0de0c01b772db2d2
Returns the implementation that finds handler classes in the registered locations
if os.name == 'nt': return GXWindowsHandler() if os.name == 'posix': return GXLinuxHandler() raise ImportError("Sorry: no implementation for your platform ('{}') available".format(os.name))
0
2eef8e3111fb5ee5f6919f827d92cbfd
c7500cd87002bc318c2d46fb33a9510d
Function for picking up keys.
int Pickup_Key( gentity_t *ent, gentity_t *other ) { other->client->ps.stats[STAT_KEYS] |= ( 1 << ent->item->giTag ); return RESPAWN_KEY; }
1
f597abd1b02e48f271ba71ca8a2ffa82
a1acdf687a8961502099bfbebf4d8909
Sorts a jagged array of integers according to given conditions.
int[] sortCore (int[] array, int maxDigit ,int currentDigit);
0
57e012f76fc357377c11027ec8aa2f70
11511f293227bbbd9f2c5c51918e6a60
Removes the element from the front of the Queue Decreases Queue size by 1
namespace StackAndQueue.Classes public class Queue public Node Dequeue() { Node temp = Front; Front = temp.Next; temp.Next = null; return temp; }
1
c2bf0781c1f7de306a02e0347f285b1d
816b3f4328b6810458e8271c77b634a7
Ao clicar na linha que associa a condicao pai ao filho, essa associacao e removida. Porem os objetos em si ainda permanecem.
function ClickRemoverFilho(id_filho, id_pai) { RemoveFilho(id_filho, Dom(id_pai)); AtualizaGeral(); }
1
fa2fa2392d8b05518ca5045ebfabba66
582a9e3a6089c77908fd9aa26904adbe
Index in static table for (name, value). There aren't many entries with value in the static table, so simple loop for the entries corresponding to the given name.
public class Config private int getIndexForName( String aName ) { for( int i=0; i < tables.size(); i++ ) { TableConfig aTable = (TableConfig) tables.get(i); if( ( aTable.getName() != null ) && aTable.getName().equals( aName ) ) { return i; } } return -1; }
1
f4e5bcfeb027c4f91d5b8c2c48be767e
11931660e83366705dbcddc26541b564
定位验证码输入框,清空输入框内容再输入验证码
class Common(Drivers): # 打开链接 def input_code(self): content = self.circle() el = self.locateElement('xpath', 'html/body/div[1]/div[2]/div/div/form/table/tbody/tr[5]/td/input') el.clear() el.send_keys(content)
1
379f1ae2fee6babfde89559284857a5b
87a8d87d0f7042f8c5df56f939c52b5e
The relative ordinate (y) of the upper left point of the rectangle
class Rect(object): def top(self): return self.y
1
ef27fe0f288b5aeaa9a03d06267ee3b8
7a366e5f9c0dfedb1dc5c3f600b2c086
computes the estimated lower and upper bounds of the similarity between the ideal model and the given data.. this is a remake of ``ceilingAvgRDMcorr`` in rsatoolbox in MATLAB.
mRp = checkarray(mRp) mRf = checkarray(mRf) mRb = checkarray(mRb) m = row_count(mRp) if row_count(mRb) != m: mRb = repmat(mRb, m, 0) if row_count(mRf) != m: mRf = repmat(mRf, m, 0) y = (np.mean(mRp, 1, keepdims=True) - np.mean(mRf, 1, keepdims=True)) / pbeta(mRp, mRb) ret...
0
0f5b772a61aebdc27a3af27364a29bcd
2ffd375f821fd08771c631208bb799d9
method to return the min value in the linked list returns the data value and not the node Time Complexity: ? Space Complexity: ?
val = float(math.inf) while(self.head != None): if (val > self.head.value): val = self.head.value self.head = self.head.next return val
0
119c7333d12111b213b8b16f044843ef
3875ea9ef5222d4c776f2543874c6fd2
Provides a way to handle transactions that are to be committed to the lightweight store.
Transaction transaction, OperationData metaData, OperationData undo, OperationData redo, object operationContext, long stateProviderId);
0