query_id
string
corpus_id
string
query
string
code
string
label
int64
59f430ab4e9237d16d8b40349a400a03
81b0a4e7403db7048b374bfdf42c8312
标准乘法
{ Bigint ans; for (int i = 0; i < a.len; i++) { for (int j = 0; j < b.len; j++) { int temp = a.data[i] * b.data[j]; ans.data[i + j] += temp % 10; ans.data[i + j + 1] += temp / 10; } } ...
1
c8cd67b4bf490a7db9183395f5d779e9
f0be277da1556b5af9e3a622b9dc7535
이긴횟수, 진횟수, 비긴횟수, 승률을 출력하는 함수
def judge_count(): print(str(judge_list[0]) + '勝:' + str(judge_list[1]) + '敗:' + str(judge_list[2]) + '引き分け', sep='')
0
07a4d41ef86c465ebf5be6e7dd6754f6
fd6f90c23248efbeb72f37831f9cff6c
Recupere la ligne de la matrice d'adjacence de x
{ if ( $iColumn < ($this->blockLength - 1) && $iLine > 0) return $this->matriceBlock[$iLine-1][$iColumn]; }
0
acf00398c2ca848335e87ea1150e28fc
331b15a136dbe195edbd83135cdf876c
indicate that the pusher interlock A has had an edge and we should re-read the pin
static bool interlock_done(void *context, bool *value) { struct epics_interlock *interlock = context; release_interlock(interlock); return true; }
0
fe6c0d7f4e7d48b97e40438c95e62e6c
e6d6dd44f7ced141be926c321d98d23d
清空房间中所有玩家的麻将数据
function RoomView:clearAllPlayerCards_Callback(dt) if self.m_clearAPCCId then cc.Director:getInstance():getScheduler():unscheduleScriptEntry(self.m_clearAPCCId) self.m_clearAPCCId = nil end if self.m_bIsRoomClear then return end self.m_bIsRoomClear = true if self.m_allPotLayer then self.m_allPotLayer:cle...
1
90059b6b51dcec75fe1fef9ad3baa37f
362ed8a05a4c7836e478b4e1e512961a
method for getting access token using .env config and the utility method get_access_token_client_creds (Promise)
function getAccessToken(code) { let accessToken = null; const config = { headers: { "Content-Type": 'application/x-www-form-urlencoded' } }; const parameters = { "grant_type": "authorization_code", "code": code, "redirect_uri": process.env.REDIRECT_URI, "client_id": process.env.CLIENT_ID, ...
0
b8b065aa17378f0807e5e86c47f32758
ef90f03a08f97ca6522079f445ba2825
设备配置默认页面
class UserServiceLogic extends CI_Controller public function Default1(){ $this->load->view('admin/BaseData/UserService/Dedault'); }
0
e7284aa0872cc771db1663fb91f2a85f
d915dc696b72261c0f835beac2c36384
Поиск сотрудников конркетного подразделения
$sql = "SELECT first_name,a.person_id FROM " . $this->_table_employees . ' AS a,' . $this->_table_people . " AS b WHERE a.person_id = b.person_id AND a.deleted = 0 AND a.department_id IN ($array_id)"; $data = $this->db->query($sql); return $data->result_array(); }
1
c2e5c791935e86e268121cbf0e90a9b5
a7a091a97bfcbf8110eac5f427317405
Configure sb via its constructor and via its properties
protected void configure() { bind(PriamConfiguration.class).toInstance(priamConfiguration); bind(CassandraConfiguration.class).toInstance(priamConfiguration.getCassandraConfiguration()); bind(BackupConfiguration.class).toInstance(priamConfiguration.getBackupConfiguration()); bind(Zoo...
0
b907b40ebe348540e91916341faa7ef0
20366fea119be8d921b0117c882b8bd6
Create a new register composer.
class InvoiceComposer public function __construct() { }
0
ce6a0c010c7e70064ff0ec3b7aa33931
025ff1de2e9cb0417882efa3ad2af63e
將字型大小設定為16
namespace MainMenu功能表 public partial class MainMenu : Form private void MenuItem13_Click(object sender, EventArgs e) { StrFontSize = 16; MenuItem13.Checked = true; MenuItem9.Checked = false; MenuItem10.Checked = false; MenuItem11.Checked = false; MenuItem12.Check...
1
93b9245e5f018bf91c2440a80997050c
5a6bbfdcef317c4bb82b41b9a9f40542
Emit the code to close the try/catch block.
namespace WebAssembly public class ReflectionEmitILGenerator : ILGenerator public override void EndExceptionBlock() { this.generator.EndExceptionBlock(); }
1
439f0e67a7a49954366f35a1cb5b8e5a
7805f8c61288525b4193b4a1a5617d63
현재 listview에서 확인하지 않은 아이템이 5개 이하가되면 다음 목록을 준비해둘 수 있도록 합니다.
public class MovieListActivity extends MovieMultiViewActivity private boolean ifloadNext(int firstVisibleItem, int visibleItemCount, int totalItemCount) { return visibleItemCount < 10 && (firstVisibleItem + visibleItemCount == totalItemCount) && !loading; }
0
2a056013b913a96f0b9dfac8cb0348f0
4e3cea1878b0f52443a8bd5eea579588
初始化时将面板取消激活
public class IGUIManager : FSM<IGUIManager> void Init() { _PCommon.gameObject.SetActive(false); _POption.gameObject.SetActive(false); _PGameOver.gameObject.SetActive(false); }
1
9acc9c4b525acf2efa37225cd3d0c087
23cd254c285886121cfe4d8adef7db28
Report an excepetion that was not expected
def unexpected_exception_event(): return exception_event(ValueError("Unexpected!"))
1
e801d7258bac936f441fc26b43635a34
15f2f08c3a3d120fe156a7962d261c27
Log a FINEST message. If the logger is currently enabled for the FINEST message level then the given message is forwarded to all the registered output Handler objects. Typically, this method is invoked from a macro where __FILE__, __LINE__, __DATE__, __TIME__ macros are automatically added to the function call.
public final class Logger public static void logFineMsg(Class c, String info, int fineLevel) { Level level; if (fineLevel == 0) { level = Level.FINE; } else if (fineLevel == 1) { level = Level.FINER; } else { level = Level.FINEST; } if ...
1
9b94b86ebbfd64f52a7ec7f399b41ae9
6ee053d303e9f7c1ee123cbfd5a0747f
1从XML中读取要采集的站点配置信息
public class CenterActivity extends BaseActivity implements WaySelectMeterDialog.WaySelectMeterCallback, CollectSelectDialog.CollectCallback, MeterSelectDialog.MeterCallback, BaseDialog.DialogCallback, IServiceHandlerCallback private boolean parseXml() throws XmlPullParserException, IOException { XmlRes...
1
745ba41d3737dbf9c7d9902e11e4e6eb
4ce1a525291f1935f380fde02bee4dec
@brief Writes to an ADXL362 Register.
void ADXL345::write_reg(char reg, char data){ }
0
593e0172f0798cc2dcc02d8f07e77983
4816361bf0df937553998e1236d6fc44
获取指定时间前n个小时的时间
public class DateTimeUtils public static Date getPreHourN(Date date, int n) { Calendar c = Calendar.getInstance(); c.setTime(date); c.add(Calendar.HOUR_OF_DAY, 0-n); return c.getTime(); }
1
cc411bd73b6971431d4dcadedc7ef720
ab75350558295ee279bb60280c0a8d1c
Register an one time handler of a specific event
namespace PowerArgs public class EventRouter<T> public void RegisterOnce(string route, Action<RoutedEvent<T>> handler) { var routeLifetime = new Lifetime(); GetOrAddRoutedEvent(route).SubscribeForLifetime((t)=> { handler(t); routes.Remove(r...
1
0e6ada0296625217fefa00bfec9ae443
5d51f2aed333a2582cbc719c44f587cf
设置磁盘缓存地址是否在外部存储中,默认false
public class ImageLoaderOld public void useDiskCache(boolean diskCahce) { isUseDiskCache = diskCahce; }
0
906d87e0c04b5726ddf38349dc9a34fd
b5c9552cae050f8be5bfc37957e7d7e7
Inserts the purchased item into the shop inventory. For testing purposes.
{ Item[] newPlayerInventory = new Item[_inventory.Length + 1]; Console.WriteLine("You purchased " + item.Name + "!"); for (int i = 0; i < _inventory.Length; i++) { newPlayerInventory[i] = _inventory[i]; } _gold -= item.Cost;...
0
8ab7fc81700c4e9fe87781959a487879
34ed5b601f5bd54ee6da0f8b9244ec25
Submits otb_lsms.py to scheduler.
class IPyParallelExecutor(ParslExecutor): def submit(self, *args, **kwargs): return self.lb_view.apply_async(*args, **kwargs)
0
264d3f9e9d091cf8372947c2c922bfca
902f8fa20da72bb4c3a54191622e8a66
Retorna a quantidade de itens que serão exibidos
class UsuarioAdapter(var listaTarefa: MutableList<Tarefas>):RecyclerView.Adapter<UsuarioAdapter.ItemViewHolder>() override fun getItemCount(): Int { return listaTarefa.size }
1
27e9eebc8bdf8d80d0f3a5cdc92804f8
10a8f0495c714c69676684679e1c85f6
统计各时间段的数据量
$returns = array(); $where = "WHERE `time`> {$from} AND `time` <= {$to} "; if (! empty($time)) { $where = "WHERE `time` = {$time}"; } $where .= empty($hosts) ? '' : " AND `host_id` in ({$hosts})"; $sql = "SELECT `time`,sum(`num`) AS num FROM `". Sys_Database::...
1
54e13c7c6bee2a2bb45fba9808c11329
c8706bd5d76f67b956136a9d0b499e04
the function fills the combo box that list all the available DAQ devices
void ProxyMainWindow::createComboBox() foreach (QObject *plugin, QPluginLoader::staticInstances()) { NeuralDataAcqInterface *iNDAcq = qobject_cast<NeuralDataAcqInterface *>(plugin); if(iNDAcq) { pluginCombo_->addItem(iNDAcq->device()); } }
1
c2cfdd2e64ee50a6ad3f0f2b83d0ba3a
1a28e628bcd3d8f1fc25f97f17eb6f2e
Generate a consolidate report of regression comparison for multiple models.
def model_comparison(results, title = ''): sns.set_style('darkgrid') fig, ax = plt.subplots() ax = sns.barplot(x= list(results.keys()), y =list(results.values())) ax.set_xticklabels(labels = results.keys(), rotation = 90) ax.set_ylabel('') ax.set_xlabel('') ax.set_title(title) plt.show()...
1
0de1ae8f11670a3734efeca10220ad56
348b8943b00c94057bb73fd3070f5655
Sync over a single resource from Neutron to OpenDaylight. Handle syncing a single operation over to OpenDaylight, and correctly filter attributes out which are not required for the requisite operation (create or update) being handled.
def update(openstack_resource, args): args = reset_dict_empty_keys(args) updated_server = openstack_resource.update(args) assign_resource_payload_as_runtime_properties(ctx, updated_server, SERVER_OPENSTACK_TY...
0
db408bb21c297331f74f226a567d3cb8
f390515caee000ed2f210ee5a163097f
Get the Docker data root
function docker_path($path = '') { return app()->basePath('docker' . ($path != '' ? DIRECTORY_SEPARATOR.$path : '')); }
1
46fa3cd3eaa870a592052d3da8849648
494c556b46b2a56bb8445949a6fd0dd3
添加到我的词库
public void actionPerformed(ActionEvent e) { if (NewWord != null){ int flag = 0; for (int i=0; i<WordList.size(); i++){ if (WordList.elementAt(i).getFrontSide().equals(NewWord.getFrontS...
1
d5c130796882f4fe7d991e0e1bf98039
fc56f7ab97da8c402b0a0953ee41bdc9
Реляция. Возвращает свойства, связанные со сборкой темы.
{ return $this->relation( 'theme', $this->hasOne(Theme::className(), [ 'buildId' => 'buildId', 'code' => 'themeCode' ]), $result ); }
1
71b086846c293866f41296ab4a417b4f
7e00ac887a8b52f7a3677bde5208a114
<pre> Deletes a variant set including all variants, call sets, and calls within. This is not reversible. For the definitions of variant sets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) </pre>
@javax.annotation.Generated( value = "by gRPC proto compiler (version 1.0.3)", comments = "Source: google/genomics/v1/variants.proto") public class VariantServiceV1Grpc public static final class VariantServiceV1FutureStub extends io.grpc.stub.AbstractStub<VariantServiceV1FutureStub> public com.google.common.u...
0
ea401c9e59a7cdacf6240629d27359d7
17b6f851a773d5942fd147924d758d2f
Set if we are detecting bots.
void setMotionDetection(boolean value, String chatId) throws IOException, BotTokenAccessException;
0
b22e9e311300ecdefe26bfd68dd3fdb7
af945cb2160316f7b771f3ba8323b05f
Check if p is within tolerance of (x, y). Useful for knobbies.
def isAligned(p1, p0, p2): x0,y0 = p0 x1,y1 = p1 x2,y2 = p2 x21 = x2-x1 y21 = y2-y1 distance = abs(y21*x0-x21*y0+x2*y1-y2*x1) if x21!=0 or y21!=0: distance /= math.sqrt(x21*x21+y21*y21) return distance<0.1
0
bd5e9dfb3b36123fa6b1f5689e3ee65e
58c74b0eeeeb9f32ba5312ef8929ae23
Toggles the state of autoset keyframes.
public class Autoplay : MonoBehaviour public void ToggleState() { SetState(!isPlaying); }
0
53ce6ebfbe738e9b31581d9a9992eeb1
2344c08df2640f6f08140b10da89c111
Create all needed inputs for each resource based on hierarchy
def create_resource_chain(syntax, name): result = [] if syntax in zen_settings: resource = zen_settings[syntax] if name in resource: result.append(resource[name]) if 'extends' in resource: for type in resource['extends']: if has_deep_key(zen_settings, [type, name]): result.append(zen_settings[ty...
1
31dc28e7439d06eea4a585aefb81b709
13ccf674a1fb95eb4a4138f3bdccf0b8
ensure all keys are present, if not present set to an empty string
class bin_pkg(): def check_dict(self): for field in ftpnew_gatherer.b_non_mandatory: if not self.b.has_key(field): self.b[field] = ''
1
02b1055fb2598f2974e1ce6e0d331e70
ec23b86516053f87ec6f6cf26988dcff
Get the amount of brick in the resource collection.
if not self.__initialized: raise NotInitializedException( "The instance used before calling initialize method") return self.__amountOfAvailableBricks
1
04d13be5ee43987b3635f9c9e95277d2
db1d650231093558fd694dc98d141ba6
Возвращает название расчетного модуля (типа доставки)
class OrderModule implements ModuleInterface public function getName() { return 'Order'; }
0
27b3469a4b10319611c41022230afab7
484a1a9c52dfde2b2ad96549b52ea26c
Enter a parse tree produced by {@link TSqlParser#procedure_param}. @param ctx the parse tree
T visitProcedure_spec(OracleParser.Procedure_specContext ctx);
0
80cdb4ff078afcf39092bd66e7d2f095
b4e8dd22957d6f479c19b1f6c5fae05d
5. Import scoreboard of a course(midterm, final, lab, bonus) from a csv file.
def import_student_enrollement(term_code): dbase_functions.clear_myDPRC_enroll_data() with open(course_enrollement_csv) as course_enrollement: csv_reader = csv.reader(course_enrollement, delimiter='\t') csv_reader = itertools.islice(csv_reader, 1, None) for row in csv_reader: ...
0
107230eee9fb6f0cdf2abf65d8fd9c3e
d568dd78bf66df34fa401863a15178b8
Adds the basic crystal information to a pyUSID style hdf5 file.
newline = "\n" with open(self.inputFilename,"w") as inputFile: inputFile.write(self.crystalBlock) inputFile.write(newline) inputFile.write(newline) inputFile.write(self.beamBlock) inputFile.write(newline) inputFile.write(newline) ...
0
63c958a95540d5df92850d518a7b5a41
6f746d9a7b2ebce5cd0fb7644875ecaa
Returns the meta object for the '{@link easyflow.graph.jgraphx.TraversalEventGraph#applyTraversalEvent(com.mxgraph.model.mxICell, easyflow.traversal.TraversalEvent, java.lang.String, org.eclipse.emf.common.util.EList) <em>Apply Traversal Event</em>}' operation. <!-- begin-user-doc --> <!-- end-user-doc -->
EOperation getEA2SRule__Perform_FWD__IsApplicableMatch();
0
26aa223c4aa2e495e30a448f604d9a1b
97f7868455d5a05b0ccda1f4b00d87d7
Delete a quickReceipt Deletes the quickReceipt identified by the specified id.
class QuickReceiptApi public function executeQuickReceiptAsync($body) { return $this->executeQuickReceiptAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; } ); }
0
2e3e015b0fdf57b8437cf15decf13100
c4b7f48a1a2a592c2c6de4c53331b61c
会根据最新的价格来计算中间价,并更新我的出价为中间价,前提是市场买一跟卖一价格不是我的出价
void acceptCurrentMarket(String product, Price bp, int bv, Price sp, int sv);
0
9f62f86dff7bc85af685b684da7850fc
d6b8ff59c13284f8c9da39671fa7a44f
Applies an asset query to this repository.
class RepositoryQuery: def get_asset_query(self): return
0
cc2e27fb203f71194d4a457557e56f4f
6e2452d0c4b0920bbe07a69fc6fde52a
返回成功添加的个数
void addSuccess(int n);
0
cd2a1afc5b4f203f340208ea7b68e654
c7a6ba850c42e5f0861c3dc0394b47c5
This routine checks a string to see if it is a valid field name. It returns 0 if it is not, or a 1 if it is. A check is made to see if it contains an unprintable character or any character from a list of excluded characters. All names starting with "cmsg", independent of case, are reserved for use by the cMsg system it...
{ UCHAR *pc,*pctop,ch,*previd; int namelen,astctr,symbfound; for (pc=Pname-1,pctop=Pplh->ULHdata,astctr=0;pc>=pctop;pc--) { ch=*pc; if (ch==SPACE) continue; if (ch!='*') break; astctr++; } if (pc<pctop) return 0; if (!isalnum(...
0
42659f2f1ce927dc9028c22f0516f1f4
48dbd55e7dd1566ce1a4358dd0e2475b
查询缓存带宽利用率(周)
{ Dictionary<string, string> urlParam = new Dictionary<string, string>(); string urlPath = HttpUtils.AddUrlPath("/v1.0/cdn/statistics/bandwidth-calc",urlParam); SdkRequest request = HttpUtils.InitSdkRequest(urlPath, "application/json", showBandwidthCalcRequest); H...
1
0aae9e6862cb1b49c446bcbf21a75ab9
b2fe2f77f62c0fe5ebc692d30fb580dc
Injects a frontend user repository. A frontend user repository.
class Tx_JdavSv_Controller_AbstractController extends Tx_PtExtbase_Controller_AbstractActionController public function injectFeUserRepository(Tx_JdavSv_Domain_Repository_FeUserRepository $feUserRepository) { $this->feUserRepository = $feUserRepository; }
1
eeb0a81a4bbcf290c8fc8e0678d78d81
485402c351af5b0cc13ba8506308da13
Create the Demo Table
def main(): create_table()
1
25f41a5fcf94a5e395589bd316cad2a1
791134fbc36d30060878eb7b60008124
Test isEmpty method for empty value.
public class EFSUtilTest @Test public void testIsEmpty() throws Exception { Integer value = 10; boolean result = EFSUtil.isEmpty(value); assertEquals(false, result); }
0
56133aa7487731615272e752241cb12d
a1d69042463c1e682d20c2c279a26ad1
Fonction qui gére l'évolution de la population Ne retourne rien.
for entity in self.entities: entity[0]=entity[0]+entity[2]*Evol.speedDirection(entity[1]) Evol.anti_exit(self,entity) entity[4]-=0.25*entity[2] for i1 in range(len(self.entities)): for i2 in range(i1+1,len(self.entities)): if Evol.dist(self...
1
081fcbac945d4c365890e2599572906d
8297047981be9d368dc867dd3b370fa7
Compute the number of bytes that would be needed to encode a MessageSet extension to the stream. For historical reasons, the wire format differs from normal fields.
public final int getNumEnocdeBytes() { return 1 + this.getClass().getName().length() * 2 + 4 + getNumWriteBytes(); }
1
6e40fe827dfc5c113dfb433728ce8e37
6356510d968dae9fdac7910bbc5443e0
mute/unmute all audio playback. These are reference counted
{ int ret = -1; if (g_audio_handle >= 0) { ret = vm_audio_play_stop(g_audio_handle); ret = vm_audio_play_close(g_audio_handle); if (g_audio_interrupt_handle != 0) { vm_audio_clear_interrupt_callback(g_audio_interrupt_handle); } } lua_pushinteger(L, ret); vm_signal_post(g_shell_sig...
0
84fee8c12e187d0f4d2dbf6aba72e50f
9591072d46da58690f226e36a65ef6f3
A coroutine that immediately raises the given exception If exc is not actually an exception, excclass is instantiated using it as the only parameter and raised. If excclass is not an exception class (and not a callable that returns a valid exception object), Python raises a TypeError exception.
try: callableObj(*args, **kwargs) except excClass as e: return e else: if hasattr(excClass, '__name__'): excName = excClass.__name__ else: excName = str(excClass) raise AssertionError("%s not raised" % excName)
0
e5d77f6ad816b4250b9d6f381e804f55
f22e2f22e32c9f35484aa0194d5b1b1c
A wrapper over rightViewUtil()
public class TreeView public static void rightView(Node root) { if(root == null) { return; } Queue<Node> q = new ArrayDeque<>(); q.add(root); int level = 0; while(!q.isEmpty()) { int count = q.size(); while(count > 0) { Node target = q.remove(); if(count == 1) {...
0
6493d5b82247cd3dc36965091e3cf605
fd7bbe48bf942f895fa8cec204b207ec
Returns the factor of increased damage dealt due to monster vulnerable.
public class CustomMob{ public int getDMGMultiplikator() { return dmgmulti; }
1
6a225bd4792b8366bbedb605ca4a18a7
dcb8f543b18852629f4bb12e6325b5b6
Converts the matrix A in dense format into a matrix in CSR format. All the parameters are pre-allocated by the user, and the arrays are filled in based on nnzPerRow.
void CCS(const MatrixXd & A, VectorXd & val, VectorXd & row_ind, VectorXd & col_ptr) { int m = A.rows(); int n = A.cols(); int nnz = 0; for(int i=0; i<m; ++i) { for(int j=0; j<n; ++j) { if(A(i,j) != 0) { ++nnz; } } } val.resize(nnz); row_ind.resize(nnz); col_ptr.resize(n); #if SOLUTION int inde...
1
2c8f1d49fb5c7bfadffcb9124015b16f
e35f2f1f672e789fee715cdf549854ff
Moves the object this script is attached to right in order to create our looping backedge effect.
{ float t = 0.0f; Vector3 originalPosition = go.transform.position; Vector3 endPos = go.transform.position + moveRight; while (t < 1.0f) { t += Time.deltaTime / m_MovementSpeed; if (originalPosition.z == m_ZoomZ) { go.transform.position = Vector3.Lerp (originalPosition, new Vector3 (originalPosition....
1
10728ae4261d5fb46849ad62383696cb
84e685f52e99b888ba4c9ca0d727d803
Returns doc terms keys for the set of terms that have been indexed.
docs_indices = [] for term_index, term in enumerate(terms): if term not in self.term_index: docs_indices = [] break docs_with_term = self.term_index[term] if term_index == 0: docs_indices = docs_with_term ...
0
e9cb341ee8b3a7e99724e059e6202e6e
a8939c070ce732952e6b2e1854865cc9
DecodeIDBase58 decodes a base58 encoded ID.
id := 0 base := 1 for idx := len(name) - 1; idx > 0; idx-- { d := name[idx] if '0' <= d && d <= '9' { id += base * (int(d) - '0') base *= 10 } else { if base > 1 { return idset.ID(id) } return idset.ID(-1) } } return idset.ID(-1) }
0
99307776b4b3cd7850a984419e716b2d
6298fe1e43e01c81de0b652e8f9ec697
This slot opens a manage user directories dialog to allowing the default output directory to be changed
dirPath = QFileDialog.getExistingDirectory(self, 'Select an Empty Output Directory...', '', QFileDialog.ShowDirsOnly) if dirPath: self._path.setText(dirPath) self._internalModel.changeSetting('outputdir', dirPath) tra...
1
ea342efbba7a534665e704567d502aec
d30005f75b69c6879dba8bf07159b5c3
Finishes the asynchronous execution of the DisassociateResolverRule operation.
namespace Amazon.Route53Resolver PutResolverRulePolicyResponse EndPutResolverRulePolicy(IAsyncResult asyncResult);
0
7a46275120c6dce07706da5e21678dc6
41599198f842968fc642a7cd491ea01d
Do some math to scale the canvas to the right size, while preserving aspect ratio. As ugly as this is, it's preferable to me than the pure-CSS padding + pseudo-element hack.
const bounds = baseSvgElem.getBBox(); const parent = assertNotNull(baseSvgElem.parentElement); const fullWidth = parent.clientWidth; const fullHeight = parent.clientHeight; const xfactor: number = fullWidth / bounds.width; const yfactor: number = fullHeight / bounds.heigh...
1
3d98e93f947ce1864f97e8c2e398e020
5379e9b7553e46bd7798f09246f4010f
Clicks the button to open the IB Console
try { MC3SB_Interface window = new MC3SB_Interface(); window.open(); } catch (Exception e) { e.printStackTrace(); } }
0
fdfec4f069d57dfb1fa658743c0b6258
f28bc2d8488e37d16316f1e7aa881f4a
Returns array of weekend dates between two dates (inclusive).
$weekend = $this->getWeekend($start,$end); $legalDays = $this->getLegalDays($start,$end); foreach ($legalDays[0] as $day) { $key = array_search(strtotime($day[0]),$weekend); if ($key !== false) { array_splice($weekend,$key,1); } } ...
0
bea75b4f39d4d28d2a0d3adf9ab269c4
70eed5e1dfe035cbb284be9fc8720e5c
@brief Sends a data half-byte to an LCD. has to be split into two half-bytes and send in that manner.
inline void lcd_send(uint16_t is_data, uint8_t data8) { uint16_t data9 = data8 | (is_data << 8); uint8_t j; #ifdef WRITE_SLOW for (j = 0; j < 9; j++) { if ((data9 & 0x100) == 0x100) GPIO_SetBits(LCD_GPIO, LCD_MOSI_PIN); else GPIO_ResetBits(LCD_GPIO, LCD_MOSI_PIN); GPIO_SetBits(LCD_GPIO,...
0
25bea78a2db02139c0462a6a38791386
497bfc7d231c1a63989b97f819f545c5
Creates a new unique closure type name.
namespace Dot42.CompilerLib.Structure.DotNet internal sealed class DelegateInstanceTypeBuilder private static string CreateInstanceTypeName(ClassDefinition owner) { var i = 1; while (true) { var name = owner.Name + "$d" + i++; if (owner.Inn...
1
e3154dd5527f8d7ff8bf2dd1a9e312a1
e6251c5aff67f3e0f6e1dfed589065f2
Test that each metric identifies the number of reads mapped to an exon (XF=='CODING')
exons = _run(get_exon_ranges_for_transcript, "ENST00000534358") self.assertEqual(exons, [(118307205, 118307659), (118339490, 118339559), (118342377, 118345030), (118347520, 118347697), (118348682, 118348916), (118350889, 118350953), (118352430, 118352807), (118353137, 118353210),...
0
d8d09f665ea44826641198cd64e10528
c649be74912acc1b0e6fd1c42f622c17
开始定位一次
location_type = 0; globalData.isFirstLoction = 0; control.stopLocate(); control == window || control.onUpdateLocation(); control.startLocate(location_type, 1000, jsonStr, true, true, true); control == window && control.onUpdateLocation(); }
1
66036bc8624c44f6ff1d8706592574ce
98848a51f30fe13c6999ab31435040b8
get a frame from the camera and optionally convert to jpg uses global pointer to fb_struct (camera framebuffer) 1=OK, 0=capture or convert failed. The buffer with data and the length is returned to caller using pointers!!
uint32_t *l, uint32_t *w, uint32_t *h, uint32_t *ffmt) { struct v4l2_buffer buf; struct v4l2_format vfmt; struct timeval timeout; fd_set fds; int r; FD_ZERO(&fds); FD_SET(ctx->fd, &fds); timeout.tv_sec = 10; timeout.tv_usec = 0; for (;r < 1;) { r = select(ctx->fd +...
0
f87b44757beb7720350aef60d201e8fc
f11924b200a5dc8d73389837534198f4
Fill the internal list of iterations items
class _IterationPhase(object): def enterPhase(self): self.__iter = iter(xrange(self.__nIters)) self.__iter.next()
0
5b7c064ab8fa0d27c13a284ba1f2fb66
49cf85285caa07b2cb89b0f0ac464a44
将本地文件上传到s3后生成文件下载路径
{ var policy = new PutPolicy(_bucket, 3600); string upToken = policy.Token(); PutExtra extra = new PutExtra(); IOClient client = new IOClient(); var putRet = await client.PutFileAsync(upToken, new FileInfo(localFile).Name, localFile, extra); ...
1
f7ba74464b7cfaf791b3abe0401fab18
668d3d66d410078f6c363f207f4bc535
修改接口文档
public void updateApiInterface(String data, HttpServletRequest request, HttpServletResponse response) { String methodName = "ApiRelatedController#updateApiInterface"; LOGGER.info("methodName:{} , data:{}", new Object[]{methodName, data}); ResultVO resultVO = new ResultVO(); resultVO....
1
775bd9ad1d1be201fdaa8567a163505f
4fbd02683c91f831589f7327aafc8252
Gets an entity from the Database with the given primary id. If there is no such entity present in the database returns null.
namespace ABB.AC800PEC.DbConfigTool.DbAccess.Interfaces TEntity GetById(long id);
1
9d03dc3551d20f2bafd19e9a1ae02cda
42a69fbc51e9361f22c5ff2eb0542027
- - - - - - - - - - - - - - - - - - CALCULATE MODEL GOALPOS - - - - - - - - - - - - - - - - - -
data = self.read_address( self.ADDR_DICT["ADDR_GOAL_POSITION_L"], 2) enc_val = data[0] + data[1] * 256 return enc_val
1
2087bc9cfe5a3e272f7bf73b6c4e7584
55821d507c4b3209711107c938a247b1
Returns a window that is the result of merging a set of windows.
List *HorizontalFission::ModifyWindow(List *inputList,List *outputList,int popValue,int peekValue,int pushValue) { assert(inputList); assert(outputList); assert(ListLength(inputList) == ListLength(outputList) == 1); assert(ListLength(inputList)==1); Node *inputNode = (Node *)FirstItem(inputList); Node *outputNo...
0
581b699433c77ebe7455a9191e3945ca
a85e2948be5338843e50d7ed7d23beef
グラフGの強連結成分分解を行う関数
public class SCC public static void process(int size){ G.dfs(); GT = getGT(G); GT.dfs(G.f); }
1
8440d8e2ea89ed0f6c72ae8985a8e044
96d51a8e753a5eddb7f35226e80765c9
Set initial focus on the modal Title h1
class SearchPaneset extends React.Component componentDidMount() { if (this.props.resultsView && !this.props.detailsView) { this.$title.current.focus(); } }
1
ddb224fe265e2fa2ec67d93c45ec075d
b6b530e12138df5a2f48445e5e0ea1bd
Have icon follow the soldier.
public class IconFollow : MonoBehaviour void Start() { }
0
e94809bd1a669f987434d3c5f72dcb32
e87d8146976906160a1796e2b8af1a25
Look at a collection of intervals, return the interval on which they all overlap. The input is a list of tuples [(begin, end), (begin, end) ...]
def mergeOverlapping(intList): intList = sorted(intList, key = lambda num: (num.LBound, num.min, num.max, num.UBound)) newList = [] newList.append(intList[0]) intList.pop(0) while len(intList) != 0: if overlapped(intList[0], newList[-1]) == True : newList[-1] = (mergeInterval(int...
0
f33be2cba710d70b6aea06b5806b00bd
bcf585387ec80f9df5b94029905d5214
Функция добавления нового бензина
time_create = datetime.datetime.now() collection.insert({ 'value': value, 'mileage': mileage, 'automobile': automobile_id, 'automobile_props': automobile_props, 'created_at': time_create, 'updated_at': time_create })
0
2e076e6f7b06a094b769fa0391c733f3
6841ae493140f79dd1e858c2af6b54fd
Returns a list of news types depending on condition
namespace lw.Articles public class NewsManager : DirectorBase public DataView GetNewsTypes(string cond) { NewsDs _ds = new NewsDs(); IDataAdapter Adp = base.GetAdapter(cte.NewsTypesAdp); return ((NewsDs)base.FillData(Adp, _ds, cond)).NewsTypes.DefaultView; }
1
3e5bff8d63fd4f37f64664bf71c66b8c
e448bb707fd25ebbfc46c7033d4b7e64
Initialize all the various tasks
{ U8 index; for( index=ZERO_CPV; index<NUM_OF_TASKS; index++ ) { } ready_tasks = &readys; idle_tasks = &idles; skipped_tasks = &skippeds; lst_tasks = &lsts; removed_tasks = &removeds; waiting_tasks = &waits; doubled_periods = &doubleds; }
0
d72327ab46b73572bb44b817b3cb527b
86a57edc7b352a3420aa8f3470780a2b
To String:
class Question override fun toString(): String { return "${this.q_id},${this.question},${this.a},${this.b},${this.c},${this.d},${this.correct}" }
1
d75df826bf5763fb57b0588d4bb4525b
b8e4f8569dfdcde5a5b0cfd7e08dce95
Returns agent group. - If self.use_diskcache is True: returns the cached `_agent_group` if available, otherwise load the agent group and cache it. - If self.use_diskcache is False: returns `_agent_group` in memory if the instance has attribute `_agent_group`, otherwise load the agent group and save it in memory. NOTE: ...
class ConnectionPool(object): def server_agent(self): return self._server_agent
0
406d32075c088333cbd5c1e496ac293b
7aa5e01c10dbd1f6197c4de89ef05e8e
Generic property setter. Used to notify subscribers about changed properties.
class DerivedProperty(DeviceFlagBase): def _properties_updated(self): self._call_subscribers(name=self._name, value=self.value)
1
adaaf0578f355f80b74d7c798265858d
fd6ab04fcf8e7b9e7c0195370c4867d2
将数据库中查出的列表以指定的 id 作为数组的键名 数组指定列为元素 的一个数组
function arrToArrByKey($array,$key='id'){ $arr=array(); if ($array){ foreach ($array as $o){ $arr[$o[$key]]=$o; } } return $arr; }
1
2dd2e2f5062bf8dd33c5b9b07cff2ebe
ab26615945a072fde8b346f540cd6859
Force the immediate removal of this tower from the playing field.
[System.Serializable, RequireComponent(typeof(AuraStat))] public class AuraTower : Tower public override void Sell(){ RemoveModifiersFromTower(); base.Sell(); }
0
9b9714795522bbebfd4ec25cba558bff
5d457afca97445b48bf3c14f33ca2510
Free a previously allocated map. This frees a givem map @p m and all memory associated with it. You must NOT free a map returned by evas_object_map_get() as this is internal.
void _LSTransportClientMapFree(_LSTransportClientMap *map) { g_hash_table_unref(map->map); #ifdef MEMCHECK memset(map, 0xFF, sizeof(_LSTransportClientMap)); #endif g_free(map); }
1
fc3bde7db99392baeb1f3cc27ecba680
7992a8c0f1257bd12b603c49da329a39
ColorMask specifies whether color components in the framebuffer
{ int argc = lua_gettop(L); if (argc != 1) return luaL_error(L, "Argument error: Gu.pixelMask(color) takes one argument."); sceGuPixelMask(*luaL_checkColor(L, 1)); return 0; }
1
34ac314adfa51fb15958a9fcf4859ca5
e9f4f52ef07f0da27c971ae99bb64aa0
open the image in the users default photo viewer
if(individual.hasImageUri()) { Uri uri = Uri.parse(individual.getImageUri()); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); } }
1
a9ff7caff6c9352398da999dd75954ee
22486de065f80ce2a2477d2d9c1823c1
Sets the provincia local service.
public abstract class SubTipoReclamacionLocalServiceBaseImpl extends BaseLocalServiceImpl implements SubTipoReclamacionLocalService, IdentifiableBean public void setExpedienteLocalService( ExpedienteLocalService expedienteLocalService) { this.expedienteLocalService = expedienteLocalService; }
0
8803cb121c5131acb1b4d1dc13c01368
eabe8305276f6b88a0c14493f6b05617
Check whether the objects need to be reordered.
class ListControl extends Control_1.default _needOrder() { return true; }
1
1cd02090dac5581e42bb58e9737cf194
48efc5dbe97575f29edc00b5bd3734d4
是否需要反序列化
boolean requiresSerialization();
0
0224368547064abc36ab7fc2d49880f1
4c887f1762a77b451a8682c287acfa11
Compute fl(a+b) and err(a+b).
def df_prod_with_err(df, a_col, b_col, a_err_col, b_err_col): prod = df_prod(df, a_col, b_col) return prod, np.abs(prod) * df_rel_err_sum(df, a_col, b_col, a_err_col, b_err_col)
0
9094c46c9e471429cd2f0af7c7fdd230
75291b6527899a9387e4f7122915b22a
soke 解除质押
$id = I('id'); $issue = M('shares_issue')->where(array('id' => $id))->find(); if ($id && $issue) { if ($issue['is_type'] != 1) { $this->error('操作失败,请勿重复提交'); } else { $model = new \Think\Model(); $model->startTrans(); ...
1
9fcfda39a15c7ec731a236b18c767acb
626fdd2d72f9354191cd2ed9e48876cb
Adds vertical spacer
class ControlBar(wx.PyPanel): def AddStretchSpacer(self): self._sizer.AddStretchSpacer(2)
0
ab8f8bc1c518a9350e5404e244daf0fc
c6c2a4ce6ab976e04f4305d3b73d9783
Returns the assigned instructor for the current instance
public class Course extends Activity implements Comparable<Course> public String getInstructorId() { return instructorId; }
1