query_id
string
corpus_id
string
query
string
code
string
label
int64
4a8e5f758ab94c27bcf2b38b5e2456aa
f207bb89ca674d181a7540d533c61144
Handles the ``wx.EVT_LEFT_UP`` for L{BaseLineCtrl}.
class DisplayListView(docview.ScrollView, win32window.Window, DropTarget.DropTarget): def onLButtonUp(self, params): if self._tooltip: self._tooltip.onLButtonUp(params) msg=win32mu.Win32Msg(params) keystatus = params[2] ctrlstatus = keystatus & win32con.MK_CONTROL i...
0
eb7c4917f9a048a6c802fe6ff7156a89
6412dc145bcf1ef003a209a2ba7f0969
Returns the amount of columns, depending on the current text size
{ if (DIRECTORY_SEPARATOR != "\\" || $this->_isCygwin) { if ($force) { $cmd = "tput cols"; exec($cmd, $output, $return); if (!$return) { $this->_columns = trim($output[0]); } } else { ...
1
aa0656828984b708cdef2438d1c34f10
8314c60666a3410278ef9f444aaaca98
设置范围查询的条件。
public class Criteria public Criteria setTarget(CriteriaTarget target) { this.target = target; return this; }
0
c86a7a77c2e386a722d319b587e23826
e40f78e1e3c46c9055029be306caddf1
Train the model in online fashion. The model is trained with the data provided in the data argument. As example the data could come from a generator linked to standard in for live monitoring of the splitting. All compounds from data are only optimized once. After online training, batch training could be used for furthe...
class BaselineModel(object): def train_online(self, data, count_modifier=None, epoch_interval=10000, algorithm='recursive', algorithm_params=(), init_rand_split=None, max_epochs=None): self._check_segment_only() if count_modifier is not None: counts ...
1
e9c91da43736147081a8400e9e32386e
34306a37d6b45a86702ae8c52c0f34de
Deallocates all of the old rects ( if there are any ), then allocates and sets new ones in the world state.
{ m_textureRect = sf::IntRect( 0, 0, static_cast<int>(m_stateData->m_worldGridSize), static_cast<int>(m_stateData->m_worldGridSize) ); }
0
89603a7abde8a3d61faa28de97f0c265
d7c6943c30dc3a8c49ca5130b8b8ff29
Register all of the methods for the Array type
{ MethodInfo[] methodInfos = obj.GetType().GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly); if (methodInfos.Length > 0) { for (int index = 0; index < methodInfos.Length; index++) { ...
0
c8ea9b4ab405b6dd5cc420abc19f9841
c444edcaa4ea0ef158f83243fe0aec2d
Maps the bean property name of a property to its serialized property name. The default implementation just returns the bean property name.
namespace Sage.SDataHandler.ContentTypes string Map(string propertyName);
1
fafb761dd62113ea5babae0252a3ee11
ed3bba6e943bac765ddf782720ffcaad
Metoda akcji wyświetlająca szczegóły zamówienia z historii
class supplier_orderActions extends sfActions public function executeView(sfWebRequest $request) { $this->order = $this->loadSupplierOrder($request); return sfView::SUCCESS; }
1
7870d5971b83d38fb63db2ebadc5f5f5
373ba96cb4bf5c704099adc9a5e6bae7
初始化串 destStr的转移函数
public class KmpNext public static void initNext(String destStr) { int len = destStr.length(); next = new int[len]; next[0] = -1; int k = -1; for (int p = 1; p < len; p++) { while (k > -1 && destStr.charAt(p) != destStr.charAt(k + 1)) { k = next[k]; ...
1
f269757e2eeb0cb755fc335ce7c54723
6ede7d9cc99b620714fc462af13cde5a
重新下载自己的头像资源
let params = { headurl_: files[0] } request.updateMember(this, params) this.memberData.headurl_ = files[0] }
0
7e2139e8abc5dcd5f42cb6088bde7ac2
f2460990be9c5fe931762448b8e534a4
获取售后类型下拉列表
namespace BonSite.Core IDataReader GetFeedBackTypeList();
1
e6b796e3dee09c0dba1e6a04335ad8b1
ae595da62bf1d36a533f900828a2b2b4
实现新商品类别页面的表单存储
cate=request.GET.get('cate') amount=request.GET.get('amount') cate_id=request.GET.get('cateid') cate_object=Category.objects.filter(title=cate_id)[0].id print(cate,cate_id) print(amount) print(cate_object) try: with transaction.atomic(): print('存商品') Categ...
1
cef8b9e6424f013d833c4d21803610e9
4f6f7c539747a79a8b83e0579036ddc2
Obtains the set of recursively all children of a class.
if self.IS_COLLECTION: for class_def in self.collection: for cd in class_def.iter_class_def_recursive_depth_first(): yield cd yield self
1
181ffe7836c74f877dc4be0936824b90
bec8cc721de1f2d9f383542b7dfd9c55
Obtenemos los datos del Usuario, pasando su identificador (correo)
{ $connection = Database::Connect(); $this->pog_query = "select * from `usuarios` where `usr_id`='".intval($usr_id)."' LIMIT 1"; $cursor = Database::Reader($this->pog_query, $connection); while ($row = Database::Read($cursor)) { $this->usr_id = $row['usr_id']; $this->usr_nombre = $this->Unescape($row['...
0
6c4daa9063ff2326537df7f62d25f1f2
9b237b1ec71b575ed04a701ca0b84f37
Get the download bandwidth limit.
NAN_METHOD(FileTransfer::GetInstanceSpeedLimitUpload) { unsigned int error; uint64 limit; if((error = Argument::num(info)) != ERROR_ok) { return Error::throwException(error); } if((error = ts3client_getInstanceSpeedLimitUp(&limit)) != ERROR_ok) { return Error::throwExce...
0
55ec32aa0bc5f32ea11c01e46a8bc84d
8fbb29c6364a964656c95d47f74b51e9
Output the players' information to the file
class PlayerManager(): def update_player_file(self): self.player_file_info.write(self.player_file)
1
6b3c20441fe5ab4c2493791092996c15
a26f08908dd853a48e14a571cd73dd73
rb_ary_select
SORBET_INLINE VALUE sorbet_rb_array_all(VALUE recv, ID fun, int argc, const VALUE *const restrict argv, BlockFFIType blk, VALUE closure) { rb_check_arity(argc, 0, 1); long len = RARRAY_LEN(recv); if (argc == 1) { for (long i = 0; i < len; ++i) { if (!RTEST(rb_fu...
0
4821733f3e4a12839b95a92a5c67c77c
1805b0d24849b7978a4df910310cb707
The function delivers the acoustic frequency. The frequency can be a beep (200/200) or a gong (800/200).
{ int Hz = 0; switch (ch) { case 97: Hz= 208; break; case 115: Hz= 233; break; case 102: Hz= 277; break; case 103: Hz= 311; break; case 106: Hz= 370; break; case 107: Hz= 415; break; case 108:...
0
cbca981f037df6e0fc1d02f0ab52c0ca
d54515300342473c50e2d6bad7b6840e
Creates a MailSettings model, populated with post data.
{ $encryptInstance = \App\Encryption::getInstance(); $data = [ 'mailer_type' => $request->getByType('mailer_type'), 'password' => $encryptInstance->encrypt($request->getRaw('password')), 'smtp_password' => $encryptInstance->encrypt($request->getRaw('smtp_password')), 'default' => $request->isEmpty('def...
1
072c8050c3eabb77f685a7932afb6b8d
29ae97656c39a8e306432f294f763492
calculate (m-1 + n-1) C (n-1) (m+n-2)! / (n-1)! (m-1)!
long long C2(int n, int m) { if(m < n-m) m = n-m; long long ans = 1; for(int i = m+1; i <= n; i++) ans *= i; for(int i = 1; i <= n-m; i++) ans /= i; return ans; }
0
d74c628d4f53ca6448ff1c3e51c3e2f5
b93fcc0c7374e3d36570d50215460516
prints the level order traversal of the Symbol Table
Node rowPointer = root; while(rowPointer != null){ Node colPointer = rowPointer; while(colPointer != null){ System.out.print(colPointer.getData() + "\t"); colPointer = colPointer.getRight(); } System.out.println(); rowPointer = rowPointer.getDown(); } System.out.println("\n"); }
0
1849409c205e09ffb44e18d070b0f795
2f6d5ba17508c39ade19d69ed7720157
Matches an [Iterable] if any element is matched by [elementMatcher].
open class IterableSubject<T> internal constructor( actual: Iterable<T>?, metadata: FailureMetadata = FailureMetadata(), ) : Subject<Iterable<T>>(actual = actual, metadata = metadata) fun containsAnyIn(expected: Array<out Any?>?) { containsAnyIn(requireNonNull(expected).asList()) }
0
a687f010bd778aa6e7b9331bbb9aaccb
e4f0bfcd86ce4871bdcdf7be90067115
Get 云点播媒资文件 Id,当 SourceType 取值 VOD 或者缺省的时候必填。
public class ReviewAudioVideoRequest extends AbstractModel{ public String getFileId() { return this.FileId; }
1
387035701a54905bd9b94d3372e8a5a6
d0eabec3429b4df4abc091557ab0b347
Finds closest visible traffic light, if one exists, and determines its location and color returns: int: index of waypoint closes to the upcoming stop line for a traffic light (-1 if none exists) int: ID of traffic light color (specified in styx_msgs/TrafficLight)
light = None light_positions = config.light_positions light_distance_squared = 10000*MAX_DIST if( (self.pose is not None) and (len(self.lights) > 0)): car_position = self.get_closest_waypoint(self.pose.pose.position) first = True ...
1
ff39c4e983e5a939fb7a92dd4271fa47
4fa935a7d185d8f11fa92a94ee41f1db
省略表記の元号を返します。 <p> "平"や"昭"などです。 </p>
public class AfT403ShomeiboEntity extends DbTableEntityBase<AfT403ShomeiboEntity> implements IDbAccessable @CheckForNull public AtenaKanaMeisho getKanaShimei() { return kanaShimei; }
0
68acec82400a279e6308aae19399f768
701e622927e0369d674d95a28aa158d9
Metoda sa spusti pri drag and drop. Riesi situaciu tak ze najde prvy subor ktory je mozne otvorit a otvori ho.
namespace HTML_5_Editor public partial class MainForm : Form private void StartOpenFolder() { string path = listBox1.SelectedItem.ToString(); if (Directory.Exists(path)) { lastPath = path; OpenFolder(lastPath); } el...
0
2196a8d077ac473ce62ebd3e5b4fcd19
cf129804db98fa311019e5fcae97dc27
Получить статус состояния бита "передатчик включён" USART2
uint16_t getSW1_2(void) { return !(GPIOA->IDR & GPIO_IDR_IDR7); }
0
04c8c9cb245791115d2e831cf7cf45f8
6a71b172903f9ecdc453746900e053d7
以太网信息
{ unsigned char *mac_string = NULL; mac_string = (unsigned char *)ethernet->ether_shost; printf("Source MAC Address is %02x:%02x:%02x:%02x:%02x:%02x\n", *(mac_string+0),*(mac_string+1),*(mac_string+2),*(mac_string+3),*(mac_string+4),*(mac_string+5)); mac_string = (unsigned char *)ethernet->ether_dhos...
1
0133f264eb8c3b00c5ce2cab3631262f
31003698c364374cea79ceb28cf106d1
Returns the unicode representation of the Product.
class CoreProduct(object): def __repr__(self): return self.to_str()
1
97b76c2dd6ee84df1d9b088748cea218
cbee98110050c9ca5730978e98c47b40
是否可以吸收伤害
{ bool isAbsorb = false; Transform modelObject = GetModelObjectWithUnit(unit); if (null == modelObject || !m_NodeDataDic.ContainsKey(modelObject) || null == unit) { Debug.LogWarning("SpliteTool.IsAbsorb(): 不存在此对象"); } else ...
1
187f447083abfe07ee854735336a5136
a607ce18d08751b378e14d5b86e06782
Convert from nested list of tuples to nested list of lists.
assert islistoflists(l) l = [tuple(elem) for elem in l] return l
0
6f4155603a0eb3d4bd0107730ed694a3
6cfb744e927fee35bb08954141866116
! Destroys the scroll bar.
{ if ( iListBox ) { iListBox->SetScrollBarFrame( NULL, CEikListBox::EOwnedExternally ); } delete iPreviousTitleText; iSettingsArray = NULL; iListBox = NULL; iTitlePane = NULL; }
1
fe56d6f8742a8168c5cae72d4a400b0a
11cb20b66bbee6919c1c7cc72e1e581f
Toggle between selecting all and deselecting all when clicking on a checkbox header.
export class MainPage extends Component handleCheckboxClick(evt) { this.state.checkboxes[evt.target.name] = !this.state.checkboxes[ evt.target.name ]; this.forceUpdate(); this.filterData(); }
0
ea67cdbee230431dd75dcc9c7b37f877
7ac2d36f22e1622cdb27ef2ecfc5328c
This method daemonizes the "rrdUpdate" method.
try: pid = os.fork() except OSError, e: raise Exception, "%s [%d]" % (e.strerror, e.errno) if (pid == 0): os.setsid() try: pid = os.fork() except OSError, e: raise Exception, "%s [%d]" % (e.strerror, e.errno) if (pid == 0): os.umask(UMAS...
1
b806fc3976c36829e544474152d0e6a4
da538f4ba5729840c325e33133491f87
システム日付を時分秒ミリ秒を0に設定した値を返却する.
DateTime dt1 = new DateTime(); return new DateTime(dt1.getMillis() - dt1.getMillisOfSecond()); }
1
c3ea531ed738bf55654eb797d164febc
5a76f78ad7dbf707f9a177edac68e5b1
prilikom odredjivanja novog centra izracuna se i za koliko se novi centar razlikuje u odnosu na stari
diff = 0 for c in old_centroids.keys(): diff += cl.compute_similarity(old_centroids[c], new_centroids[c]) return diff
1
8b65325aa5ecd138439ae99b0de9b299
bf2afc13b2b6bbb2fc6a2a3c0a4d5c5e
상대경로를 가진 Uri에서 절대경로를 가진 Uri를 구해 반환
public class BitmapUtils public static Uri getUri(Activity activity, Uri uri) { if (TextUtils.isEmpty(uri.getAuthority())) return null; String[] projection = {MediaStore.MediaColumns.DATA}; Cursor cursor = activity.managedQuery(uri, projection, null, null, null); int column_index = curso...
1
eb53f7d7373986b880eede0388c23489
d5ab34794f52f5a19e3831263234edf9
根据 消毒柜(编号)查询手术鞋 的 数量
public List<HosSterilizer> selectSterilizerByThNumber(String number) throws BaseException ;
0
394f3b8b4c29a20c4b02bf9545a670d5
75c847ef46262e9b622065abd04cbdb8
Formats the specified fields of the snapshot.
class MongoResource public function format($fields) { foreach ($fields as $name => $value) { if ($value instanceof \MongoDate) { $fields[$name] = date('c', $value->sec); } else if ($value instanceof \MongoId) { unset($fields['_id']); } else...
1
abf615afa763499dad3195268bd1ed09
66e1306b5f84820b4e5a1c48a6936eaa
Минимальная цена единицы товара или услуги
class EventsLogItemAttributes public function getMinPrice() { return $this->MinPrice; }
1
56c2ff09dbbda53f52c507f19fa5b310
f4892b0cf6c9e178c33fd2493f3b7455
Draws one of three hair styled depending on the value of hairStyle
public class FaceArt extends SurfaceView{ private void drawAfroHair( Canvas canvas, Paint hairColor ) { canvas.drawCircle(150.0f, 420.0f, 80.0f, hairColor); canvas.drawCircle(350.0f, 290.0f, 200.0f, hairColor); canvas.drawCircle(600.0f, 190.0f, 170.0f, hairColor); canvas.drawCircle(8...
0
3c5415d7f578dbb8123ab3168c80f9c5
c6ad13b090d7fd1fce3293e177b6971d
创建隐藏物品完成事件。
namespace GameFramework.Item public sealed class HideItemCompleteEventArgs : GameFrameworkEventArgs public static HideItemCompleteEventArgs Create(int ItemId, string ItemAssetName, IItemGroup ItemGroup, object userData) { HideItemCompleteEventArgs hideItemCompleteEventArgs = ReferencePool.Acqui...
1
4a6beb72ee277e0a09fc93a444d7db46
1b08019a8df514093fbe8fa3a0788635
Return the index of the top panel, according to scroll position.
public int getTopIndex() { if ( getItemsCount() == 0 ) return ( -1 ); ListModel model = getModel(); if ( model.getUsesFixedHeight() ) { return ( (int)Math.ceil( -childrenOffset_HUD.getY() / model.getItemHeight( 0 ) ) ); } float tmp = -child...
1
e2f7ed754904645977eb443443d0ab8d
9636a83393469d46d3f240e54b73f97f
Sends all hazard sensor data over UART.
handleHMI (heli_t *heli) { handleUART (heli); displayMeanVal (heli->mappedAlt, heli->desiredAlt); displayYaw (heli->mappedYaw, heli->desiredYaw); displayPWM (heli->mainRotor, heli->tailRotor); displayState (heli->heliState); }
0
b48b0e7732264e5f20dce380643aff43
7df879930ef85c90e043d1885d5f93f0
************************************** Регистрация администратора URL: /Account/AdminSetup **************************************
namespace BrzeBoljeJeftinije.Messenger.UI.Controllers public class AdminController : BaseController [HttpPost] [AdminAuthorize] public ActionResult Register(AdminUser user) { if(string.IsNullOrWhiteSpace(user.Username) || string.IsNullOrWhiteSpace(user.Password)) { ...
1
1a7dbe2bfea27e955d40af160e45e708
5fe240b953fe00ea28d534864f29e27e
自动设置会员等级
class MembersLevelModel extends GyfxModel public function autoUpgrade($u_id){ $upgrade_status = D('SysConfig')->getCfgByModule('MEMBERSUPGRADE_SET'); if(!$upgrade_status['MEMBERSUPGRADE_STATUS'] ||empty($upgrade_status['MEMBERSUPGRADE_STATUS'])){ return false; } $member = session ( "Members" ); if(em...
1
15037cb84b88a39dafdd93d299847e05
d5be58f6a53a83f444a5f925a30a465d
save value to greasemonkey/tampermonkey etc.
{ var u; var bl = ';'; if (blacklist) for (u in blacklist) bl += u + ';'; GM_setValue('Blacklist',bl); }
1
c21cf5610da4a40fb291a070b34a9ca8
c6d33adb1c7d2b6d6fd7c15e4ce95d58
Define the authenticators present in a specific view.
class AuthenticationService implements AuthenticationServiceInterface, ImpersonationInterface public function authenticators(): AuthenticatorCollection { if ($this->_authenticators === null) { $identifiers = $this->identifiers(); $authenticators = $this->getConfig('authenticators'); ...
0
b158ed3a33fe1a2a971df96e681e6381
9648e566df259c9a7226716580a24796
Metoda vraci jmeno vyrobce zarizeni
class CDProduct public function getProducer(): string { return "{$this->producerFirstName} {$this->producerMainName}"; }
1
a89b0fe157559635a225ebfaffa7741a
3fc555b1fe998e445ab3a6d54eb2c947
the function change each letter in the tree to be the next following letter
result = [mdp] for i in range(len(mdp)): pos = alphabet.index(mdp[i]) if pos == len(alphabet)-1: pos=0 else: pos+=1 mdp = list(mdp) mdp[i] = alphabet[pos] mdp = ''.join(mdp) result.insert(0,mdp) return result
1
b86b17369c15a90c94c653be2366e66c
98ff04168b832a119feca5f49ce749be
Очищаем кэш браузера
class TestDriver: def clear_cache(self, timeout=60): self.driver.get('chrome://settings/clearBrowserData') wait = WebDriverWait(self.driver, timeout) wait.until(self.get_clear_browsing_button) self.get_clear_browsing_button(self.driver).click() wait.until_not(self.get_clear_brows...
1
529c127f673f09a39965b8b788e6cd60
2d1b1b3a6798d6c55f6b30848a1360ea
Сбор данных из датасета Hands Gesture Recognition.
dataStep = [] for fileName in inputFiles: ind, t = createData(fileName, inputGestures) dataStep.append((ind,t)) return dataStep
1
c233f11c97c8e5ec1ad8d9bc15c7e63f
7da47306e8038a812614b92f392d7ca8
\brief Allocates a list of doubles initialized by zero
{ double *a; int i; a = new double[n]; for ( i = 0; i < n; i++ ) { a[i] = 0.0; } return a; }
1
421bf2d323bf778f904290e11ff45190
0c4109ae21c8225c0212a3a5cc44d8d1
GET: StatusiZahtjeva
namespace VST_sprava_servisu public class ProvozyController : Controller [Authorize(Roles = "Administrator,Manager,Uživatel")] public PartialViewResult Index(int Zakaznik) { var provoz = db.Provoz.Include(p => p.Zakaznik).Where(p=>p.ZakaznikId == Zakaznik); ViewBag.Zakaznik =...
0
2c7dae9345b3a0757c8a25bf888e682e
f726d6ffd786e1f8ee660e69cd51679a
Fills apropiately the pseudo-backbone box list of atoms for common residuals with hydrogens
static void _add_hydrogen_atoms_backbone_ASN(z_matrix_global_t *z_matrix, int *index_z_matrix, const int *res_id, const top_global_t *top){ _add_atom_z_matriz(z_matrix, index_z_matrix, res_id, atmHN, atmN, atmC_, atmCA, angl_typ_dieh_0, 1.0, 1.9120, 1.30, top); _add_atom_z_matriz(z_matrix, index_z_matrix, res_i...
1
1cdb9b4f9f1ad8bc50525789dc516095
860addcad3b6c09634b904a05ad41de7
Searches for loyalty accounts in a loyalty program. You can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty `query` object or omit it entirely. Search results are sorted by `created_at` in ascending order.
params = {"q": query} if limit: params["n"] = str(limit) return self._get(f"/accounts/", params)
1
d05aa68f204dc9bf123894480f048272
0f26777094e49a4a491087d55bfa3a2a
Is param file exist.
class Api extends \yii\db\ActiveRecord private function isParamExist($param_name) { $hasOne = Params::find()->where(['parm_name' => $param_name])->one(); return $hasOne ? true : false; }
0
0a4c7097ac515b956362faee37df7d69
10403dfbad214940c1e5d19807b3663c
remove some variables because they would interfere with step analysis
class StepData(object): def __clean_up_data_manipulation(self): self.__data.pop("_loop", None) self.__data.pop("_key", None) self.__data.pop("_idx", None)
1
ecaeb691552506c84560fb6abde79ec3
8dd01377cfc1b589d9c0a745f78a8201
设计一种方式检查一个链表是否为回文链表。 核心就是找到链表中点,翻转链表,然后判定。 O(n)的时间和O(1)的额外空间。 ①找到链表中点 ==》 翻转 ②比较两链表
public class LinkListReview public boolean isPalindrome(ListNode head) { if (head == null || head.next == null) return true; ListNode fast = head; ListNode slow = head; while (fast != null && fast.next != null) { fast = fast.next.next; slow = slow.next...
1
07a9adf3ee52b1381a04b5f6d64d4112
5b06fc9191ec5a47cdfd9debe8778623
需要根据执行环境来加载不同的yaml文件
if os.path.exists('/ql/config/env.sh'): print("当前环境青龙面板新版") return '/ql/config/env.sh' elif os.path.exists('/ql/config/cookie.sh'): print("当前环境青龙面板旧版") return '/ql/config/env.sh' elif os.path.exists('/jd/config/config.sh'): print("当前环境V...
0
70db6c7435ba6fbfaebd45266fc2674e
06b7107a519fad42211839c2b8669478
Send all new comics from username to all subscribers
def email_client(book_title: str) -> None: followers = models.Follower.objects.all() data = f'Добавлена новая книга {book_title}' send_mail('Пополнение коллекции книг', data, settings.EMAIL_HOST_USER, [follower.email for follower in followers], fail_silently=False)
0
00d585c5bbbdee321e36879cee1f39e0
bb334140ad10666ca78236ec3d86a47d
Reads specified number of bits and builds the corresponding integer
b = 0 for i in range(length): b |= self.read_bit() << i return b
1
36eab85a79553f203ef5f26c4225e20e
e27a2ed0eaea1099641ce805df89f432
A specification for an unformatted boolean item.
def BoolProperty(name="", description="", default=False, options={'ANIMATABLE'}, override=set(), tags=set(), subtype='NONE', update=None, get=None, set=None): pass
1
fee7858a2dcaa1cde8700ea5180e0424
f83ea16786f1f0b27157a554d6d015be
Método que lanza un mensaje que explica el formato para calcular el número de vértices de un polígono.
int i, k=1; char msg[256]; s_triangulo *triangulo; for (i = 0; i < triangulos->size; i++) { sprintf (msg, "[nodo %d] Triangulo: %llu (%llu)",rank, k, i+1 ); triangulo = get_triangulo (i, triangulos); if ( triangulo != NULL ) { print_triangulo_info (msg, triangulo); k++; } } }
0
ed8cdd518136734907f8e4c711ea6a58
8de10a35587202143f9367e3888b4ccd
# computes VQR via primal program
prox_lp_mat <- function(V, p, alpha, eps = 1e-6, maxiter = 100L, verbose = 0L) { .Call(`_gradfps_prox_lp_mat`, V, p, alpha, eps, maxiter, verbose) }
0
14969a9daa7f5713ce868a68c9c4fc6e
eddb02ad46dbbb50a7eaddb4e51752db
Returns whether the value of the '{@link org.mule.schema.MuleEnvironmentPropertiesType#isClientMode <em>Client Mode</em>}' attribute is set. <!-- begin-user-doc --> <!-- end-user-doc -->
void unsetClientMode();
0
7862cc1a516fc2eda0cd9dd1bf61e36f
d561a85ce5a1e98ae12e13815799edb2
This method will echo the contents of a Java Bean
{ StringBuffer myResult = new StringBuffer(); String myIndent = pIndent + String.valueOf( get( PROPERTY_NAME ) ) + "."; myResult.append( myIndent + PROPERTY_NAME ); myResult.append( ": " ); myResult.append( String.valueOf( get( PROPERTY_NAME ) ) ); myResult.append("\n"); Obje...
1
2d941e4e46e212e3a6eba715e788bc5d
7e2379a502910198581cf6a290bd10a9
Metodo evento click del boton btnConfiguracion
{ if (panelContenido.Controls.Count > 0 && panelContenido.Controls[0] is FormConfiguracion) return; Mostrar(FormConfiguracion); }
1
dde9ea014fb24be2106241ebb5846623
8ca1da5b6b616ca49113c33e9b37f3ae
This causes the car to rotate 180 degrees clockwise
int i; oi_update(sensor); oi_setWheels(-500, -500); for( i = 0; i <4; i++){ oi_update(sensor); } oi_setWheels(0, 0); turn_clockwise(sensor, 180); oi_setWheels(500, 500); for(i=0;i<4;i++){ oi_update(sensor); ...
1
653fbbe30c2603b9b9b9ed45113e8f84
4fa63cc7c545056f1b4c6b0d89be750a
Wyświetla kontrolkę CameraDetails w elemencie CurrentControl. Dodaje zdarzenie opuszczenia kontrolki CameraDetails.
namespace CameraTools public partial class Main_Form : Form private void OpenCameraShowControls(TreeNode node, PictureBox pb, ConnectionCamera parameter) { node.Tag = fp_Left.Controls.Count; pb.Tag = parameter; fp_Left.Controls.Add(pb); mConnectionCamera.Add(p...
0
788f3b7311869fe10cd2baefbeaf3456
4f69a6b5400dfcfcdf450d4ef27d3ee7
Affiche un graphe en colonne ou en barre dans le container idContainer avec pour titre titre et comme données data
function CustomDataGridColumnContainer(title, sub_columns, select_menu_name) { this.title = title; this.grid_column_container = null; this.sub_columns = sub_columns; this.select_menu_name = select_menu_name; this.shown = false; this.getColumnById = function(id) { for (var i = 0; i < this.sub_columns.length; ++i...
0
1d262752e3672b7cf31b33fad9a062a4
01db26d2d602fd903b3e90ed57adac50
Finishes the asynchronous execution of the DeleteWorkspaceBundle operation.
namespace Amazon.WorkSpaces DescribeWorkspaceBundlesResponse EndDescribeWorkspaceBundles(IAsyncResult asyncResult);
0
8064aabff6e32d780884d22256daeb3e
e2aea2cada236949cc95d661bfc81f7c
Switch statement control-flow graph structure.
{ const size_t label_num = enc->label_num++; size_t curr_case_label_num = enc->case_label_num; const label old_label_break = enc->label_break; enc->label_break = (label){ .kind = L_END, .num = label_num }; const node condition = statement_switch_get_condition(nd); const rvalue tmp_condtion = emit_expression(enc, ...
1
3d7c75fe2a7e5531c6e88f724f3cfbf6
d6b1fa71433e4c5ed7009b053ec963a5
Returns the stylist API styling url
class DataMapActivity : AppCompatActivity() private fun makeStyleUrl(style: String = "jawg-streets"): String { return "${getString(R.string.jawg_styles_url) + style}.json?access-token=${getString(R.string.jawg_access_token)}" }
1
c7b566b5bef20c6c539233c4b8f5c8bb
85eb2f2b606ee746c646c406bbb19941
Generates a JSONSchema from the given element.
public class SchemaValidator extends AbstractHandler private void generateSchema(JsonElement parent) throws APIManagementException { JsonElement schemaProperty; Iterator<Map.Entry<String, JsonElement>> schemaNode; if (parent.isJsonArray()) { if (parent.getAsJsonArray().size() == 0) r...
1
f53dc926c07003a5e22f7cae6aba0a53
9ff4d09b34651a4b52d7061b9e710a89
Redirect the user to the ESGF SLCS Server for authorisation.
function requestUserAuthorization() { window.location.href = authorizationURI; }
1
0153af18f549239dc41e274e991d7f4b
17edda549e3bd5737ced352fc5e99917
Output only. The time when the lake was created.
class DataLakeAnalyticsResponse(dict): def created_on(self) -> str: return pulumi.get(self, "created_on")
1
41fe27540eb7cb5b14574dd9437214cb
fbbba8332f297ceedf9ffca0b048fd1a
Sets the value of queryExpression attribute. See {@link #getQueryExpression} for description on the attribute.
public class SyntheticColumnQueryWindow extends QueryWindow public void setExpression( String expr ) { expressionField.setText( expr ); }
0
2ae6bc2c7b7b29ce1344ce4f15445672
793a8ad5d16f8724a19cd73af3093b40
获取指定公司的 Office 号
export class JsonUtil static getOfficeId(officeName: string, offices: Office[]): number { for (var i = 0; i < offices.length; i++) { if (offices[i].name == officeName) { return offices[i].id; } } return 0; }
1
6fc5fb75f2ebf4e235785b9b9342239f
2875593ec5f1179e453b2e014fa22ffa
@brief Get Forwarding mode to Analyzer for egress/ingress mirroring. All register addresses are hard coded Based on cpssDxChMirrorToAnalyzerForwardingModeGet
{ PRV_TGF_NOT_SUPPORTED_DEV_CHECK_MAC(prvTgfDevNum, UTF_CH1_E | UTF_CH1_DIAMOND_E | UTF_CH2_E | UTF_CH3_E); prvTgfIngressMirrorSourceBasedConfigurationSet(); prvTgfIngressMirrorSourceBasedTrafficGenerate(); prvTgfIngressMirrorSourceBasedConfigurationRestore(); }
0
c04ec33a293ebd1e13e53a81e796c4d3
4864878d49c032319286fda80a6129b6
gets the list of current supervisors to populate a select menu (assigning a supervisor to an employee) and sets up the configuration for cloudinary upload
this.props.dispatch({ type: 'FETCH_SUPERVISORS' }); this.config = { cloud_name: 'dnjpvylxb', upload_preset: 'ijxdygxf', } }
1
d17576d69e4dacf081e74b36553d7a23
daa8e2384312644236190400fa9f19ad
Find the motif with the best score for a given TF and region, allow regions that have been used to be used again (might be multiple sequence differences for a single region)
meme_settings = get_meme_settings(config, ref, seeded) true_motif = get_true_motif(ref, config) nsites = int(2.15 * motif.size(true_motif)) psites = motif.pssm_search_on_regions(true_motif, genome.promoters(target), nsites) regions = sequence.merge_overlapping_seqs( [sequence.expand(site) fo...
0
3e1c09f92c965a235241966cab5768eb
bf50af5832997cbc5adf3a97d3cb117b
@brief Sets GPIO pins as inputs or outputs
def GPIO_SetInput(DevHandle,PinMask,PuPd): return Lucero.GPIO_SetInput(DevHandle,PinMask,PuPd)
1
d4a125e97dfecd36250517345e7f03fd
2cf045fea40b3adb417a6edb707eb1dc
@brief computes the squared distance between a point and the box
namespace DRVEngine namespace Collision float DistanceSq( const OBB& obb, const Vec3& point ) { Vec3 v = point - obb.center; float dist2 = 0.0f; for ( int i = 0; i < 3; i++ ) { float d = v.DotProduct( obb.basis[i] ); float excess = 0.0f; if ( d < -obb.ex[i] ) { excess = d...
1
d609bbf1d78ebe99dc49e1d61745d055
f71538989991ee83fd455c15ac40788b
<p> 向服务端上报'设备需授权'事件
String id = app.cust_id; final String url = "http://api.bibibaba.cn/customer/" + id + "/friend/" + friendId + "/rights?auth_code=" + app.auth_code; StringBuilder authBuilder = new StringBuilder("["); int code[] = { RIGHT_OBD_DATA, RIGHT_ODB_ERR, RIGHT_EVENT, RIGHT_VIOLATION, RIGHT_LOCATION, RIGHT_TRIP, ...
0
e53ae932465ec23dbc7fd43d0c5f6e90
33d76be0dc150f5ed9c50353b4d4e25f
Returns the proper idexes form squares that are not filled. If all are filled return [].
function getIncorrectFilledSpots(board) { var incorrectIds = []; for (var i = 0; i < board.length; i++) { for (var j = 0; j < board[i].length; j++) { if (board[i][j] != currentPuzzleSolution[i][j] && board[i][j] != 0) { var id = "" + i + j; incorrectIds.push(id); } } } return incorrectIds; }
0
064cafca7bf6e56a54d7494af927a2f5
bad890d7065eacc8c26ac399c628c996
将三维的点映射到平面,并添加了位移
def threeD(disp, Q): points_3d = cv2.reprojectImageTo3D(disp, Q) points_3d = points_3d.reshape(points_3d.shape[0] * points_3d.shape[1], 3) X = points_3d[:, 0] Y = points_3d[:, 1] Z = points_3d[:, 2] remove_idx1 = np.where(Z <= 0) remove_idx2 = np.where(Z > 15000) remove_idx3 = np.where(X...
0
efc1d23f6b4841e26ce3740cde32f8af
311595b254995405d5e1c41b9ae12a65
use numerial method to calculate the trajectory and range of cannon shell in different firing angle and time step
string testAgain = "n"; do { double ang; cout << "What is the angle of the howitzer where 0 is up? "; cin >> ang; initialize(ang); double hangtime = 0.0; double prevDistance = 0.0; double totalDistance = 0.0; double prevAltitude = 0.0; doub...
1
1ae6799d4c81be5c9589c1904fdbb76a
226a43d5e81f18997ebe2e11b2965643
get q value for existing game state, otherwise add state to table
class QTable: def set_q(self, state, action, val): if state.is_legal(action): if val == '0.0': val = '----' self.qTable[ACTIONS.index(action)][state.y][state.x] = val
0
e898ee5c3f6c2b8a0f4e71dbd8c7eeaf
0bbc1781c0dc4747e518d0636e33a294
API to Get User Vaccination
class VaccinationsController extends Controller public function index(Request $request) { try { if ($request->has('page')) { $vaccination = Vaccinations::all()->paginate(5); } else { $vaccination = Vaccinations::all(); } } catch (Ex...
0
670961fe62c3bdeff53b430da7e6be06
25176a168d3dae1c1ab0aa27f8acda4d
制造车壳
void buildTire();
0
5c16f7d185612c70937d269fd26d2eee
2c250b6f6c3907aca33e11ca24eac32f
Liest einen Integer aus der Konsole aus
if (msg == null) { System.out.println(" (!) UI.getInt: Keine Nachricht zum Zeigen."); return -1; } String input; while (true) { input = getInput(msg); if (NumberUtils.isParsable(input)) { return Integer.parseInt(input); } } }
1
9fefa007f75aabbf0ac0711e4cc85d39
e5314b90e4f12bae6614f648b5f508e2
Calculate the direction the user scrolled, and then switch the video to the next video or previous.
if (trackPositionDelta > 0) { this._slidePrevious(); } else { this._slideNext(); } }
1
3566f23ec667ac785e137339556511f8
76cebb7002c5f83e472f822195068363
Set queue index to device
fseek(dict->fp, 0, SEEK_END); fwrite(&index, sizeof(uint), 1, dict->fp); if (DEBUG) printf("dict_set_queue: (%u)\n", index); }
1
94b101bbcaa2bc9933dc912202c84829
0a35f391d17eea929bb6c9d94d663643
Creates an inspector that permits to evaluate the state of the specified type's static fields at any point in time.
{ return MultiSetter(type, FasterflectFlags.StaticInstanceAnyVisibility | BindingFlags.SetProperty | BindingFlags.SetField, memberNames); }
0
5458575060279d701a434a399da08e78
0f32b5e2e4d09ce4e24bac6ba925a36f
naive implementation which adds the vector representation of all the words together and then divides by the square root of the dot product
x=0.0 y1=0.0 y2=0.0 for k in dic1Vector: temp1=(float)(float(dic1Vector[k])/float(wordsCount)) temp2=(float)(float(dic2Vector[k])/float(wordsCount)) x=x+ (temp1*temp2) y1+=pow(temp1,2) y2+=pow(temp2,2) return x/math.sqrt(y1*y2)
0
3beec846e724d686ab07d6568d878fcc
85be71c4484f872cc3e10a130a1bd2e2
Shows the 404 not found page
function show_404(){ header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); echo '<h1>404</h1><p>Page Not Found!</p>'; }
1
26b7b3d0e572b697f2f5074cae2534b0
13103f7a58babdbe3bd2ee49bab2eae8
Returns whether or not the iterator has wrapped since the last time this method was called.
public final class PackedLineIterator extends AbstractLiteIterator public boolean isDone() { return done; }
0
2437f265d72b91f9b1b4838367d70f1a
edc345e68977f12b6b17ddef134b7eeb
Establishes the buffer read size for chunks that are read from the input buffer.
public class RTMP extends ProtocolState public void setReadChunkSize(int readChunkSize) { this.readChunkSize = readChunkSize; }
1
63dfc247043d3ab9d2a0b9d8f0d14dd1
388784e97495c88e893aacc5f15a3fda
Executes a SQL statement against the connection object and returns the number of rows affected
{ openConnection(); MySqlCommand mySqlCommand = new MySqlCommand(queryString, _mySqlConnection); int returnedValue = mySqlCommand.ExecuteNonQuery(); closeConnection(); return returnedValue; }
1