query_id
string
corpus_id
string
query
string
code
string
label
int64
9f329e73cc18c0c47db02ceb3f8556eb
15403e3f5e3071ff88dc60665823aeb1
Creates a list with all network adapters and their properties
if os == "Windows": tmplist = [] for interface in self.wmi_obj.Win32_NetworkAdapterConfiguration(IPEnabled=1): tmpdict = {} tmpdict["Description"] = interface.Description tmpdict["IPAddress"] = interface.IPAddress[0] tmpdict...
1
42a12729fd6e223eca0a1bb6046d9af6
cde49c657495402943584035a589c849
Проверка формы восттановления пароля
let haveError = false, newPassRetryInpWrapper = this.page.fieldCl.surfacingToInpWrapper(newPassRetryInp); if (newPassInp.value.length !== 0) { if (newPassInp.value !== newPassRetryInp.value) { this.page.fieldCl.showError(newPassRetryInpWrapper, ...
1
dbe96766fe1ae2adb143053bd91b5f73
864b6e4fe54158bd7891a8946a436f3a
Handles OAuth 2.0 flow for implicit grant type. Involves user login on a window.
namespace qshine.oauth2 Task<WebApiResponse> ImplicitGrant(string state, string scope);
1
0064a0b5ffcc6b14ad02cfe3634174ca
285352cc90030a8d91ac5c63d8962a35
Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getTime <em>Time</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getTimeEvent();
0
5fdefaec9c0af27289156e84dda2bca3
267573e999ca2146aad77f86f1877aa6
m_v - pointer to map of cells->values m_f - pointer to map of cells->formulas going through all formulas and try to compute it if its possible add result to the values map else throwing error message
void calculate_values(map<Cell, int>* m_v, map<Cell, Formula>* m_f){ char op; int res; auto it = m_f->begin(); set<Cell> safe; stack<Cell> st; while(m_f->size()){ if(st.size()){ it = m_f->find(st.top()); } if(it == m_f->end()){ it = m_f->begin(); } auto search1 = m_f->find(get<0>(it->second)); ...
1
58e370ea4a40b0b8eadda389027dbfed
bca0fa7ad2a50cc2e96d575034eff3c1
Set uri path pattern for this route.
abstract class BaseRouteAction extends BaseAction implements RouteActionInterface public function setRoutePattern($routePattern) { $this->routePattern = $routePattern; return $this; }
1
c719654b5a691e65f39c1fc2372770f3
e745c05df1fe386bd6cabb755a62c18e
刷新势力任务列表
export class RiskOperateHerosListView extends component.UIItemBox public refreshHeroList(): void { let heroList = RiskDataMgr.getFightHeroList(); this.onRefresh(heroList.length, this, this.onRefreshHeroItem); }
0
77d15d62cc8e3474eb5c4bcc890fbf22
f7b15bd1cbbd08e6ce696d1540d1b162
上传录音到服务器
uploadServer(tempPath) { const filePath = 'sdk-doc/mini-record-' + new Date().getTime() + '.pcm'; wx.uploadFile({ url: 'https://workflow-c.ddkt365.com/api/res/uploadAudioAW', filePath: tempPath, name: 'file', formData: { 'file': filePath, 'ke...
1
5b12fca747274d11e4d31110acae95c0
d268853b4525e5d98d141d39ec761e99
The network type of the db instance. Valid values: `vpc`.
class DbInstanceEndpoint(pulumi.CustomResource): def ip_type(self) -> pulumi.Output[str]: return pulumi.get(self, "ip_type")
0
f2b6a81093c6ba8dfe5ce7594a4d9247
c65405e2b6f9360419fe3c709c89f282
根据per_id查询用户所有borrow_list
public List<BorrowInfoUser> findBorrowHistoryByUserId(Integer id)throws Exception;
1
a6f034c09055030cfaa178bbb93918c0
0fa9333dcc36eeb02d1b5199327e8aca
这里,自定义的layout才解析完,这时能拿到用户自定义的xml布局体,他的位置在最后 这里不能用i++,因为removeView之后,角标自动前移.就能拿到后面的view
public void destroyItem(ViewGroup container, int position, Object object) { container.removeView((LinearLayout) object); }
0
72956460f356d5ce00b7aefaf1eb51d3
571353b6178bd3f88b35051c3e3c14a0
Calcule la longueur de la plus longue liste de position à afficher
public class Player public void calculLonguestRoad(){ int longuestRoad=0,temp=0; LinkedList<Road> alreadyCounted = new LinkedList<Road>(); for (Road r : roads){ temp=0; alreadyCounted = new LinkedList<Road>(); if(r.getFriendlyRoadWithoutAlreadyCounted(number-1, alreadyCounted, null).size()...
1
e981de53201bcbd9cd8616f26553ded7
a3f671edc1393354727724298f64ea4a
getEntryIndex(string file_name) returns the vector index of a specified file
int findIndex(vector<string>& fileVector, string fileName) { for (int i = 0; i < fileVector.size() ; i++) { if(fileVector[i] == fileName) return i; } }
1
371ee08920666dcee0f6ee36e2c4d189
431ef9c135302229f1b6dcc24e4a3d6f
Calculates the GINI impurity of a single node
class Node: def impurity(self, attribute, left_counts, right_counts): entropy = self.entropy() outputs = list(self._outputs) tpr = float(left_counts[outputs[0]])/(left_counts[outputs[0]]+right_counts[outputs[0]]) fpr = float(left_counts[outputs[1]])/(left_counts[outputs[1]]+right_counts[outputs[1]]) ...
0
7b697334385be35a0c7d6575f5ba532c
775f7aa31fb94530c0969a50f9023a98
GET: api/Supermarkets
namespace Alps.Web.Admin.Controllers [Produces("application/json")] [Route("api/Suppliers")] public class SuppliersController : Controller [HttpGet] public IEnumerable<Supplier> GetSupplier() { return _context.Suppliers; }
0
766d12c41c199eb6c030a715542564c9
0ee4630f637c6dc9b5a9d1968f276787
从InputSource指定的源装载一个Document对象,支持名称空间,在解析文档时忽略验证
public Document load(InputStream is,boolean validate) { SAXReader reader = new SAXReader(); reader.setEntityResolver(entityResolver); reader.setValidation(validate); reader.setIncludeInternalDTDDeclarations(validate); reader.setIncludeExternalDTDDeclarations(validate); ...
0
2e54a59a869e7c65c5a823c1792a39e4
37e3ae8e5dc6112469a070fe83acf915
分かち書きを行う.
class WordsController extends Controller public function separate(MecabGetRequest $request) :\Illuminate\Http\Response { return response(["words" => $this->mecabService->separateWord($request->input('word'))], 200); }
1
6625ec1b537839adf91644ec0802bf8a
45c49092ca9c7aff0ab00bd85233d645
Get the integer encoding of the PAD token
class BpeVocabulary(Sized): def get_pad(self) -> str: if self.__pad_token is None: self.LOGGER.error("Using pad_token, but it is not set yet.") return self.__pad_token
0
edb6d04301b4c355b72054a7b59bfb59
45d4e9463b3f777c316a59c19b527431
Displays products related to the current product
{ $model = $this->_getModel(); $this->_getRegistry()->register('current_model', $model); $this->_view->loadLayout() ->getLayout() ->getBlock('blog.post.edit.tab.relatedproducts') ->setProductsRelated($this->getRequest()->getPost('products_related', null));...
1
85eae27352f35c80acbcf76f1458f5c9
f8f4bed9cbb7c32c572de897a307f683
Create an instance of the database session driver.
class QpSession extends BaseSession public static function driver() { if (self::$driver === null) { self::init(); } return self::$driver; }
0
efaf53efed1f7845a5092ac5a4b5cbdc
53cbf41233f97ca5a83de594fb6ebe52
Testing the normal scenario: open followed by close (done in the setup and teardown functions)
class TestExit(TestAbstractDeviceCommunicator): def test_exit_open_port(self) -> None: with self.communicator: self.assertTrue(self.communicator.mock_port.open.called) self.assertFalse(self.communicator.mock_port.close.called) self.assertTrue(self.communicator.mock_port.close.cal...
1
c077c3ce38789b21dd32cbdf6e98c1e9
2a3a7912c68778764108b01da9ae273d
A call to sleep/usleep would cause problems with the Notifier, so we simulate it. See chapter 20.11 of the XView programming manual
static void ss_lib_delay (void) { struct timespec yield = {0, 1000000}; (void)nanosleep(&yield, NULL); return; }
1
424426d371752ff4b22cb118ad5f36b3
94a5c6cd10117230af585a2db979f3c9
Get Frequency given a Channel number
if( ch<1 || ch>RADIO_CH ) { printf( "ERROR: Radio channel must be between 1 & %d \n", RADIO_CH ); } if( memoryPtr == NULL ) { printf( "ERROR: PRU radio controller not initialized \n" ); } return memoryPtr[2048+ch] * (24.0/200); }
1
29b6a286b0b7378511b92251dd188dbe
b33d3ea6b864c95ad0a98b402031c71c
Returns a slice of channels, that will each be used to communicate a section of the world between the distributor and a worker
c := make(chan string) go route(input1, c) go route(input2, c) return c }
0
21e3778e34bbd4ff4621bec8d0eb533e
b868678c43856e158472cb858c4ffd86
Returns True if the piece at the specified position belongs to the player specified.
namespace Cecs475.BoardGames.Chess public class ChessBoard : IGameBoard public int GetPlayerAtPosition(BoardPosition pos) { throw new NotImplementedException(); }
0
81955b0c1947fe26187c5e23f7295714
03534c899776ded03aaa94b96f16ba5f
返回账号acc的余额
def query_account_balance(account_id): sql = "select balance from account where id={account_id}".format( account_id=account_id) res = db_tool(sql)[0]['balance'] return res
1
76cfa9c68d8aaea8aada3db63803ecdc
4311e4264b8b0214f28e8b177bbd7d98
Gets the value of the netCshAmt property. possible object is {@link ActiveCurrencyAndAmount }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Backlog_c", namespace = "/oracle/apps/sales/custExtn/views/common/", propOrder = { "id", "recordName", "createdBy", "creationDate", "lastUpdatedBy", "lastUpdateDate", "objectVersionNumber", "lastUpdateLogin", "cpdrfVerS...
0
9c9d41673f61585f2c3e2865e82585f7
280da20fb001862600b1c9ff79802081
将牌分配到对应div中
$.each(drawHand, function(index, value) { let appendImgClass = '<img src=' + basePass + value + '>'; let appendDivClass = '<div class="card-place">' + appendImgClass + '</div>'; if (playFlag) { $("div.player-place .card-place-center").append(appendDivClass); } else { ...
1
5229cb77eed3648727cf659d3419f558
a524f939c51c8cca365b9977ec673023
Legt den Wert der jump-Eigenschaft fest. allowed object is {@link Boolean }
boolean isJump();
0
28f0405fba44940cf6461916f17f13c0
49a2ab6d8c01fa00105ada7ae1f72c91
Slices the correct json elements from a json object given a page number.
const temp = []; page--; for(let i = page * pageSize; i < page * pageSize + pageSize; i++) { if(typeof collection[i] != "undefined") temp.push(collection[i]); } return temp; }
1
a9cf536db299834127ff985da751f5ba
5cca2713a328b67a020ec7b1fe992fc8
Wrapper method for `error_reporting`
class Runner private function enable_error_reporting() { }
0
244b54556868e779836232b65ffd39fe
fefa5cb85fc8114fb1f586c7b586a8bd
This method notifies the implementer of this interface that the content stream of a batch operation has been disposed.
namespace System.Data.OData internal sealed class ODataBatchWriter : IODataBatchOperationListener, IDisposable #else public sealed class ODataBatchWriter : IODataBatchOperationListener, IDisposable #endif Task IODataBatchOperationListener.BatchOperationContentStreamRequestedAsync() { this.St...
0
074222518c3835eb385cf6fa2ac8fc6f
2405007a642fd337b6ddd03c033aed24
Adds optional information about a traced message: message id provided by messaging system.
namespace Silverback.Diagnostics void LogTraceWithMessageInfo( EventId eventId, string logMessage, IRawBrokerEnvelope envelope);
1
234a6d757c0a2506c409c3eb1cae2356
3543291c4685c66aeeb5bfee5fbea257
Get the number of Kinect devices. Returns: int: Number of Kinect devices.
{ int num_cams, returnCode; returnCode = is_GetNumberOfCameras(&num_cams); if (returnCode != IS_SUCCESS) { PyErr_Format(IDSError, "uEye SDK error %d", returnCode); return NULL; } return Py_BuildValue("i", num_cams); }
0
5c4ede107fef314422cd8879d3b9a18f
54403f0f679d6f40b354c8ef35de5ade
! \brief Méthode qui sélectionne une vidéo de la bibliothèque
{ if(uis.listWidget->selectedItems().size()==1) { std::vector<searchItem> selected = searchEngine.find(uis.listWidget->selectedItems().front()->text(), true); ui->lineEdit->setText(selected.front().getName()); video_filename = "file:"+ dir + "/database/"+selected.front().getVideoFileName...
1
393428ca8077be868b6aee0571f5a604
3b4b2b30a69d6693e2336a102444a368
Returns a new object of class '<em>Type Lumiere</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
TypeEvenementRadiologique createTypeEvenementRadiologique();
0
8d66c12a768a632e7df7dd44de9b1728
4135f411f278e0acdf0b0875391f402f
Get deleted character list.
export class NotebookModel implements INotebookModel get deletedCells(): string[] { return this._deletedCells; }
0
0a24befecb0745fd3936cd2f98460b91
7f832ab223c5bfa5dc56772c1eed461a
Reload host data.
class ZuzuBot public function reloadMysql() { $q = "SELECT `nick`, `vhost`, `level` " . "FROM `users`"; $stmt = $this->db->prepare($q); $stmt->execute(); $arr = $stmt->fetchAll(); foreach($arr as $key => $val) { $arr[$val['ni...
1
1e499a0a11dfa1e6e870efa1745ef5fb
a7e01d908ba74c4c5fe28b3ab15d82f7
Un-assign a shared task from presenter
var students = retrieveTable('students'); var tasks = retrieveTable('tasks'); var ownerId = tasks.data[retrieveIndex(tasks, taskId)].ownerId; if (ownerId !== undefined) { var i = students.data[retrieveIndex(students, ownerId)].tasksIds.indexOf(taskId); if (i === 1) { students...
1
92f757ca0f6432ce75703c871e99ce79
fde6ee2743449aeb329d336ab2f55d6e
フォームを終了させない
namespace RemoteViewingServerExample public partial class WhiteBoardForm : Form protected override void OnFormClosing(FormClosingEventArgs e) { e.Cancel = true; }
1
6d056d034fa0227e8cc00f0e0121ca77
abbeda0ccf85731fe313b4626f584e9d
Navigate from signup page to login page by using login navigation link
export class SignupPage public login(): void { this.nav.setRoot(LoginPage); }
1
3ed9513570d7d172aaad4e23edff3909
36d8059887bbdb43d01f9bfe37567e0e
删除地图上已经存在的警车图标
{ ArrayList ary = mdmap.GetMarks(DMapLabelLayer); if (ary != null) { for (int i = ary.Count - 1; i >= 0; i--) { GPSMonitorSystem.model.DmapInfo info = (GPSMonitorSystem.model.DmapInfo)ary[i]; ...
1
110954c6c0ca989ce257f3dacee2c79c
f8a3a5e9e7f9c371931ba5ccce9da10d
Realiza la selección de características utilizando un random forest.
fs = feature_selection_reg(feat, target) fs.f_reg() fs.f_lasso() fs.f_mutInfo() fs.f_randForest() fs.plot_comparison() return fs.ensemble_selection()
1
3f3906b8a6987257b260f9bb7c33233e
0cf733e45cc5b6c63cd3ba46199517e6
Sets the status of this recommendation
public class Content implements ContentInterface, Serializable public void setRecommend (Boolean recommend) { this.recommend = recommend; }
1
b5750b3c8ffc1df2037a490fa0b7f239
2aaad3accf36ca1ee5fef28076fa51eb
Row of clicked cell
def get_clicked_pos(pos,rows,width): cell_width = width//rows y,x = pos row = y//cell_width col = x//cell_width return row,col
1
180a65dd15c00050e48d6d1a298916be
8cdce1f141844b0ca3216450e4944981
Tests if the product of the pulses in a periodic DDS with pre/post pi/2-pulses is an identity, when the number of pulses is even.
Hd = drive(sine_func, 4.3, wires=[0, 1]) assert len(Hd.coeffs) == 2 assert isinstance(Hd.coeffs[0], AmplitudeAndPhase) assert isinstance(Hd.coeffs[1], AmplitudeAndPhase) t = 1.7 evaluated_H = Hd([3.4], t) c1 = np.sin(3.4 * t) * (2 * np.pi) * np.cos(4.3) c2...
0
a1a15fb70686abcacbc6c7e269ac4cf9
865e043c65fab027345be9ca36e85a2d
Get all the users. Returns: list[dict]: users model dict representation.
def get_all_users() -> Dict[str, List[str]]: pass
0
0fc7d3691150c97312f01d25cd18ada6
807a28341fb57120a59215a13aa2294b
Fetches and sorts by groups all the available timezones in php.
{ $aTimezones = array_merge( self::TZ_NORTH_AMERICA, self::TZ_SOUTH_AMERICA, self::TZ_EUROPE ); return $json ? json_encode($aTimezones) : $aTimezones; }
0
8a51e645f608faa940cb416607122f6b
eb03252fa24ef672c5cc1acc077060c6
===================== configuration =====================
function love.conf(t) t.identity = nil t.accelerometerjoystick = true t.version = "11.1" t.gammacorret = false t.title = "Desafio Corona 2020" t.window.icon = "assets/image/icon.png" t.window.width = 800 t.window.height = 48...
1
bae68c783c6b81050d62f5aa8ed523eb
e14f74c9a3f5b61780bddd54b2866bcd
In this Test we are considering file - testfile_task6.txt which contains strings: "a" : 1500 occurrences "b" : 600 occurrences "c" : 200 occurrences "d" : 1 occurrence "e" : 10 occurrences "z" : 0 occurrences
public class Task_2_OddOccurrencesInArray public static void main(String[] args) { int[] array = {9,3,9,3,9,7,9,10,10,100,100,7,2,2,2}; System.out.println(solution(array)); }
0
6a0f72036cddc222bfea3742e6f38f14
99e425846b6ff74309663031bb98cdf4
Place the populated thumbnail into the result list...
function drawThumbnails () { var photoList = getPhotoList(), totalPhotos = photoList.length, photo = {}, listItemMarkUp = [], i; if (!properties.$photoListContainer) { return $.Deferred().reject({ message: '$photoListContainer is not defined' }...
1
a58fc6348cda2ec3c590ea5b14ee2946
e355d933edb740d84c180c36f8c2b4fa
发送聊天框中的信息
public class GroupChatClient public void sendInfo(String info){ info=username+"说:"+info; try{ socketChannel.write(ByteBuffer.wrap(info.getBytes())); }catch (IOException e){ e.printStackTrace(); } }
1
06bf7a103afdfacb3a5ce761285c588d
803d89b21310e6577117dd327aaa9545
The method replaces all whitespaces in a string to the '-'(dash) char, then calls the "ConvertCyrillicToLatinLetters" method and then replaces any non word characters with the exception of the dot ('.') and the dash('-') with string.Empty.
{ if (value == "" || value == null) { throw new ArgumentException($"Value should not be empty!"); } const string pattern1 = @"^[a-z]+$"; const string pattern2 = @"^[a-z]+-[a-z]+$"; if (!Regex.IsMatch(value, pattern1, RegexOp...
0
3bd6760361f5bc712efac56a10f3fb93
59e9c787f08c6e499fc47b02ec37bec2
Plot points for camera position and arrows for view vectors.
def display_pointing_tel(tel, show=True): ax = plt.axes() ax.arrow(tel.camera_center[0], tel.camera_center[1], tel.normal[0], tel.normal[1], head_width=5, head_length=10, fc='k', ec='k') if show: plt.show()
1
d4adc2c51c9a256d3bc94db21dda7fd8
de694352ad6f239893a1e3448e4794fe
Sets the diameter to use for the selected dot. the diameter to use, measured in pixels
public class ArcProgressBar extends View public void setDiameter(int diameter) { this.diameter = dipToPx(diameter); }
1
cccd6bd2740f23974d7c2cacf1ad023a
a1248ddbe2248db9c360af31655ef8ef
Returns the position of the given identity.
class ContactManager extends AbstractContactManager implements DataProviderRepositoryInterface public function getPosition($id) { return $this->em->getRepository(self::$positionEntityName)->find($id); }
1
16ca5c3fb8d5e403d87841ff3f38f926
c702d815eecc7eada23c9d971403f952
***** auto expand textarea *****//
function readyAdd() function textareaSize(e) { e.style.height = 'auto'; e.style.height = e.scrollHeight + 2 + "px"; }
1
ab8d6c06c92a0301e4eed9f2139547e0
a91760e39b87d8a4d623fdc475b51c44
The delete publicIpAddress operation deletes the specified publicIpAddress.
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String publicIpAddressName);
1
ae85526a6222ba938023f4fcd973db8b
74cdb6e5cea80345d561622ac86d3ff0
Gets the in exec pipeline id.
public class PipelineConfig<T> public int getInPipelineId() { return inPipelineId; }
1
384b8dd5f5ff1823410e1eddcd74ece2
948205a84012df112c5d86a43417f56a
Every 5 seconds, each router will send a distance vector message to each of its LAN DV lan-id router-id d0 router0 d1 router1 d2 router2 . . . d9 router9
void *send_DV(void* send_data){ int i, notChange = 0; int send_buf[((sender*)send_data)->n_routers +1]; ((sender*)send_data)->port = calculate_port(((sender*)send_data)->port, ((sender*)send_data)->myName); ((sender*)send_data)->sock = create_client_socket(((sender*)send_data)->addr, ((sender*)send_data)->port); w...
0
9a67b3b8c7d2a4eaef9e0716855a8e4b
c66dde4d3154502e1e2bf1ad5da4d0f3
Gets the fk id marca.
class TurArma public function getCodigoArmaMarcaFk() { return $this->codigoArmaMarcaFk; }
1
44057417e59e266f05ce12d143732aa7
be7ccee0c5f74235b90ffb65010e6fc5
Скачать отчет
def download_report(request): report_id = req_get_param(request, 'report_id') return report.download_report(report_id)
1
f07f706fa28d4cac9df9a326c2342087
428484332482ce890dd53c873e158f58
Tableを2つ含むJiemamyContextのシリアライズ結果を確認。
public void test17_CORE207() throws Exception { JiemamyContext ctx = new JiemamyContext(); JmColumn foocolpk = new JmColumnBuilder("FOO1") .type(new SimpleDataType(new SimpleRawTypeDescriptor(RawTypeCategory.INTEGER))) .build(); JmColumn barcolpk = new JmColumnBuilder("BAR1") .type(new SimpleDataType(new...
1
7889a00a4dc1ba6b303a24106a631029
fd2b5973986135fe83f7985094f8ada4
Check if a tx_id is known to be committed
impl TransactionStore pub fn is_committed(&self, id: TransactionId) -> bool { let transactions = self.active.lock().unwrap(); !transactions.contains_key(&id) }
1
e66a60cd2c27674051f282ba8d007759
9342ba2d2b00e5ef89a4ac085b529931
Gets the postcode and returns a complete store object with lat and long Notes: The function that calls this one will be better off by using gevent to make parallel request into greenlets.
post_codes = [ address.postcode for address in addresses_obj_list] json_data = {"postcodes":post_codes} response = requests.post(url,json=json_data) result = json.loads(response.text)['result'] postcodes_dict = dict() for element in result: if element['result'] == None: pass ...
1
3e536131b800d73596751757c39c76b8
38643f39a3962c7e79217ed68c884aa2
Constructor method for batchTypeIds
this.packageId = labTestBatch.PackageId; this.labTestBatchId = labTestBatch.LabTestBatchId; this.labTestBatchName = labTestBatch.LabTestBatchName; }
0
7e2a52efaeffae16021f6bb7813d10e5
11cd92842ca6e9c6475c38d1fa112077
az aktuális pálya elmentése egy fájlba
try { Document doc= DOMAlapmuveletek.getDocument(); Element rootElement= doc.createElement(HELYSEGEK); doc.appendChild(rootElement); for (Szoba szoba : szobak){ Element szobaElem = doc.createElement(HELYSEG); szobaElem.setAttribute(ID, String.valueOf( szoba.getSzobaID() ) ); rootElement.append...
1
acbe6b0b5c304e42e1d1a5294151a43d
436898b96486d1f737e9add8b944b161
根据指定的时间跳到指此时间所在月的月视图
class Calendar extends React.Component preView() { let { y, m, d } = this.getYmd(this.state.viewTime); let curView = this.state.curView; let nextTime = null; if (curView === 'month') { nextTime = new Date(y, m - 1, d); } else if (curView === 'year') { nextTime = new Date(y - 1, m, d); } else if (curVi...
0
55a4876f43edd07a9623c7c9a3fa5b34
ea0a91cb73b838e70bf1e20e4071f38c
时间戳转时间,精确到秒
if (seconds == null || seconds.isEmpty() || seconds == "null") { return "" } val format = "yyyy-MM-dd" val sdf = SimpleDateFormat(format) return sdf.format(Date(java.lang.Long.valueOf(seconds + "000"))) }
0
92ec149b12a1d42eb3a44a1ae11d17b0
23ca6b0fb3b311367cc3242bea9ad411
creating function which can plot trajectories in 2D in real time
class PlotGPSTrajectory(): def loop(self): r = rospy.Rate(10) while not rospy.is_shutdown(): self.l_arr[1].set_xdata(self.x_ref_traj); self.l_arr[1].set_ydata(self.y_ref_traj) self.l_arr[2].set_xdata(self.x_vehicle); self.l_arr[2].set_ydata(self.y_vehicle) self.l_arr[3].set_xdata(self.x_mpc_traj); se...
1
ba22cef0be20312b032fcffd792d7389
f63924e43aac41aeee139e197ec54d0c
根据id删除一篇日记
public class DiaryDaoImpl implements DiaryDao public int diaryDelete(String diaryId) throws Exception { String sql="delete from t_diary where diaryId=?"; conn=DbUtil.getCon(); pstmt=conn.prepareStatement(sql); pstmt.setString(1, diaryId); return pstmt.executeUpdate(); }
1
2f60630cee2eef97882a5669bab3c657
8c06f043847a0fd922d5885b54753929
刷新当前门禁要素
local btnList = clone(self.btnList) self.notOpenGates = {} for k,v in pairs(btnList) do local frame = v:GetChild("n0") local icon = v:GetChild("n1") local lockImg = v:GetChild("n2") local title = v:GetChild("n3") local jieIcon = v:GetChild("n5") local confData...
1
f537fcd78b753127783bde97f5bb8485
d26b500d0c6221604d2126f300df0f6d
Extract the text from the web page's source code according to the simple idea: [the text should be the longgest continuous content in the web page]
sources = html.split("</html>") maxindex = 0 maxlen = 0 maxblock = "" for i in range(len(sources)): if len(sources[i]) >= maxlen: maxlen = len(sources[i]) maxindex = i maxblock = str(sources[maxindex]) + '</html>' return...
1
7ca6e4b054dbcedb060f36b4eff37b79
3a2e6add2ff6253f50b61e5abd5fd4f5
根据初报Id 获取已生成事件的 eventId
@Service public class AcceptService extends BaseService{ public String getEventIdByInfoId(String firstReportId){ Assert.hasText(firstReportId,"acceptDealId 不能为空"); ResponseEntity<String> result = client.getEventIdByInfoId(firstReportId); return ResponseEntityUtils.achieveResponseEntityBody(resul...
1
1ae7739bdf72e51611b5967e10654bbf
b372c9813f2c2fb17fb7f025f69655f5
division without division
TEST_F(Test_Operator_Division, ComplexInt_Div_ComplexInt) { st.push(shared_ptr<ComplexLiteral>(new ComplexLiteral( NumericLiteral(2), NumericLiteral(3) ))); st.push(shared_ptr<ComplexLiteral>(new ComplexLiteral( NumericLiteral(2), NumericLiteral(2) ))); ...
0
6d752552ef2dcd677947b010795e50f1
c7bbf00fee2abdb0b3ac45c00c08b4dd
获取农历数据类集合对象
SolarTerm stLiChun = new SolarTerm(); Calendar calLiChun = Calendar.getInstance(); try { calLiChun.setTime(sdf3.parse(stLiChun.getLiChunString(year))); } catch (ParseException e) { e.printStackTrace(); } return calLiChun; }
0
f4fbc4cfc2a75662896cea597dc2011e
113ce630895f5890edc927c6ad0df5aa
removes a task from the table
public class DatabaseHelper extends SQLiteOpenHelper public Integer deleteTask(String id) { SQLiteDatabase db = this.getWritableDatabase(); return db.delete(TABLE_NAME, COL_TABLE_ID + " = ?", new String[]{id}); }
1
6bd7cc4237b01d082f3ec65f24d80f19
cf02ebbfaf1b3aa45d96e9fa8f02cf2a
根据传入的name片段 查找完整的命令id
function GetCmdIdByName(cmd_name) { return cmd_name; }
0
c8d9f4da2ba01e3246ec5976e73d2bac
63bbd6692c1b02d5039ae4711983849c
推荐人奖励列表查询
@ResponseBody public ResponseModel recommendUserList(@RequestBody RequestModel requestModel) { RecommendUserTb recommendUserTb = transformJSONObjectToModel(requestModel, RecommendUserTb.class); recommendUserTb.setUserId(requestModel.getUserId()); List<UserView> list = mjAdvancedQueryServ...
0
992a26b396120085c3b568202f201c05
befdf1bb67c7ccce6d2160a5bacf2139
Sets the wsrdc bems id.
@Entity @Table(name = "WsrdMeasurementAssociation",schema="wsrd") @XmlRootElement @NamedQueries({ @NamedQuery(name = "WsrdMeasurementAssociation.findAll", query = "SELECT w FROM WsrdMeasurementAssociation w"), @NamedQuery(name="WsrdMeasurementAssociation.findByWsrdID", query="select w from WsrdMeasurementA...
0
4f855f1ac18e2a07f72fcd1f3b5cb66a
9bab515d031dc7e2c8dc8b38c076402f
Creates a new MlePhase with the specified <i>name</i>.
AzureDevOpsProject.DefinitionStages.Blank define(String name);
0
9f05f3a1c41ee809777be8471e3e66d1
6c387f5ae6e4d29d448ed57ff3dfb7a7
计算人员两两间联系数(为查找小团体、桥接人准备)
{ if (ds.isRetrieved == false) { ds.Ini_retrieve("usercheckins_train_20160314.csv", "usercheckins_test_20160314.csv"); } common = new Dictionary<Tuple<string, string>, int>(); foreach (var item in ds.poi_user) { ...
1
7f9fa6ca108b45c06a8202c6243169ec
682ddf3c2dffd0ea660f41a1aba73bff
Fill gaps in public holidays array
class Holiday_EnglandWales implements Holiday_Interface private function _substituteHolidays($year) { if (count($this->_substitute) > 0) { foreach ($this->_substitute as $key) { $timestamp = $this->{$key}($year); if (in_array($this->_dayOfWeek($timestamp), array( ...
1
a3418aef71ee779a0e303556142d17e2
e7a3299588667b9dc20595f709d63189
Function is used to build a vector of required terrain tiles and ask tileset manager to load them
public class FloorManager : MonoBehaviour{ void CreateTerrain(){ }
0
221c8c6c6448ba7a70f283d59eeb8208
be38fc352e0746efc372a0a58e91509b
initialize RFM69 for PCA301
void InitRF(void){ unsigned char tmp, cklf; SPICLK = 0; SPI_CTRL = 0x02; RACSN = 0; SpiReadWrite(RRC | 0x09); cklf = SpiReadWrite(0) | 0x04; RACSN = 1; RACSN = 0; SpiReadWrite(WRC | 0x09); SpiReadWrite(cklf); RACSN = 1; RACSN = 0; SpiReadWrite(WRC | 0x03); SpiReadWrite(PACKET_SIZE); SpiRead...
1
aa54f34d8f279471fb5607a7e55a4c8a
486c35424636f16676592e17ff357959
Causes an element to be rendered relative to the field of view, rather
setLockToFieldOfView(locked) { this.properties['lockToFov'] = !!locked; }
1
89d1e32056da0d529699a58a511371f6
583137341660e7bbce5d1bcd55914ed5
API Thêm mới bài tập
namespace MSmile.Api.Controllers [Route("api/[controller]")] [ApiController] public class ExerciseController : Controller [HttpPost] public Task<ExerciseDto> Add([FromBody] ExerciseDto dto, [FromServices] ExerciseService service) { return service.Add(dto); }
1
ec2609fd547f7ee0232b626ab4c24916
cb3049c4d342fdc0633dec055402c4c9
Berekent of 2 lijnstukken een snijpunt hebben
if (abgrenzung1['y'] + abgrenzung1['hoehe'] < abgrenzung2['y']): return False if(abgrenzung1['y'] > abgrenzung2['y'] + abgrenzung2['hoehe']): return False if (abgrenzung1['x'] + abgrenzung1['breite'] < abgrenzung2['x']): return False if(abgrenzung1['x...
0
9c7f3b134a949d7730b8d984eaa200d1
2aaf89f5c0f9069e1db664d033bb87b6
plpgsql caching: Negative Test - Non-plpgsql function: plperl. Split partition in between prepare and execute functions
valueVar = self.cursor.var(cx_Oracle.NUMBER) valueVar.setvalue(0, 6088343244) self.cursor.execute(u""" begin :value := :value + 5; end;""", value = valueVar) value = valueVar.getvalue() self.failUnlessEqual(value, ...
0
75fc38c045d20f179868ed1387f294a2
683affd926d4171d1efd1465987de7e0
Editor step handler
{ if (((CellType) m_type) == CELLTYPE_PROPMARKER) { return; } if (IsNull() && IsReadonly()) { return; } if (IsArray()) { EditArray(); return; } if (IsObject()) { EditObject(); return; } if (IsTime()) { EditTime(); return; } }
1
b9ad9b5c190511358b5082562f1e41c4
9b5cb00b426af1a0f4817a2be64df0ab
Get All Item Category
{ try { $item = DB::table('categories'); $data = $item->get(); $message = 'DB connected & like successfully got'; $status = 200; } catch (\Throwable $th) { $message = 'ERROR DB connection NG '; $status = 500; } finally {...
1
6c4b65f89a4f2ee54d263880aac28f2f
1a371623bdd57c1e66d451a70b2f1747
Gets the value of the dateIssue property. possible object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Instrument", propOrder = { "instrumentId", "datasetId", "version", "newIssue", "instrumentGrade", "lastModifiedDate", "source", "hasAdditionalCredit", "alternativePrincipalCcyCode", "amtIssuedPublic", "auction...
0
d3ca7f433b401da49d24c53c13448a1f
225da9c96d10d7f8e92fc0b3b1e0e319
重写save方法,最后判断完成后,调用父类save方法。
class OperatingHour(models.Model): def save(self, *args, **kwargs): super().save(*args, **kwargs)
1
731304d1b7862c4fd40b9f15d7103817
ed7317313acf74659cbbd8a0068fd5f7
Disable the 'Back' button
public final class AppUI extends UITemplate public void enableBackButton() { backButton.setDisable(false); }
0
651dd0d609a06002e6e95b58962888c9
d0d07fc4fed4efbd054f49cb301d8971
Send the event Down for the Right Mouse Button
void RemoteDlg::OnRButtonUp(UINT nFlags, CPoint point) { SendMouseEvent(MOUSE::RBUTTONUP, point); }
0
6c1ba942e500602c1d15c91b2de607a0
db9c6df8c79f32e8b815b8804e9471a9
@brief Clears the EXTI's line pending bits. This parameter can be any combination of EXTI_Linex where x can be (0..19).
void EXTI_ClearITPendingBit(uint32_t EXTI_Line) { GPIO->INTP_TYPE_STA[EXTI_Line].INTP_STA = 0xFFFF; }
1
734df5e8c405b19750c73602cebc05dc
ef241f9c63d79e7b2fd9a317e72fec06
合并同类项并从高阶到低阶排序
sortPolynomial(polynomial); int n = polynomial.getMonomials().size(); for (int i = 0; i < n - 1; i++) { if (polynomial.getMonomials().get(i).getDegree() == polynomial.getMonomials().get(i + 1).getDegree()) { polynomial.getMonomials().set(i, polynomial.getMonomials().g...
1
69e6381c1e0b0447902ca56f097be7b0
c6f975f74b96d5fe23dfabe96d4f3385
打印相关动作
def print_action(trajectory): global istep istep+=1 step = tf_env.pyenv.envs[0].current_time_step() iaction = step.step_type action = ['NOOP', 'FIRE', 'RIGHT', 'LEFT'][iaction] print(f"Step: {istep:5}: {action:7}")
1
4537f642d2649c169af21bca4bcd93f8
70324d37d8ba046edaef2edfb9bfabd7
Determine whether the demultiplexing has been copied for the latest analysis for a Novaseqx flow cell.
if self._is_demultiplexing_ongoing_or_started_and_not_completed is None: LOG.info(f"Checking demultiplexing status for flow cell {self.id}:") self._is_demultiplexing_ongoing_or_started_and_not_completed: bool = ( self.tb.has_latest_analysis_started(case_id=self.id) ...
0
3a1f8398848ddf3ac8c993ae560aa77f
3dfdfe4d5822b60946294e145938514f
获取对应列名的值,该列必须为Boolean类型 列名
Object rtnValue; Object value = getDetailValue(name, nullValue); if (value instanceof Boolean) { rtnValue = value; } else if (value == null || value.toString().equalsIgnoreCase("")) { rtnValue = nullValue; } else { String valueStr = value.toString(); if(valueStr.equalsIgnoreCase("YES")...
1