content
stringlengths
2
6.21k
label
stringclasses
16 values
// Calculate correct return value based on object comparison if (m_orderOfSort == SortOrder.Ascending) { // Ascending sort is selected, return normal result of compare operation return compareResult; } if (m_orderOfS...
C#
============= class CMsgApplyPennantUpgrade::_Internal { public: using HasBits = decltype(std::declval<CMsgApplyPennantUpgrade>()._impl_._has_bits_); static void set_has_upgrade_item_id(HasBits* has_bits) { (*has_bits)[0] |= 1u; } static void set_has_pennant_item_id(HasBits* has_bits) { (*has_bits)[0]...
C++
}, { '_id': '49221', 'city': 'ADRIAN', 'loc': [-84.044556, 41.900516], 'pop': 33769, 'state': 'MI' }, { '_id': '49224', 'city': 'ALBION', 'loc': [-84.756052, 42.258073], 'pop': 13514, 'state': 'MI' }, { '_id': '49227', 'city': 'ALLEN', 'loc': [-84.76078200...
Dart
, end, fp)) { reg = candidate; freeUntilPos_reg = fp; } } // None of the hinted registers could fit the interval, so try all registers next. if (reg == LifeTimeInterval::InvalidRegister) longestAvailableReg(freeUntilPos, freeUntilPosCount, reg, freeUntilPos_reg, curr...
C++
f() { final $ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_self); return NSItemProvider.castFromPointer($ret, retain: true, release: true); } /// setSuggestedName: set suggestedName(NSString? value) { objc.checkOsVersionInternal( 'NSItemProvider.setSuggestedName:', iOS: (false, (11, ...
Dart
/* * Array get, 64 bits. vAA <- vBB[vCC]. * */ /* aget-wide vAA, vBB, vCC */ lbu a2, 2(rPC) # a2 <- BB lbu a3, 3(rPC) # a3 <- CC srl a4, rINST, 8 # a4 <- AA GET_VREG_U a0, a2 # a0 <- vBB (array object) ...
Assembly
es Beispiel funktioniert, müssen wir ein Skript schreiben, um alle Tastatur- und Zeigerereignisse zu verarbeiten, einschließlich Event-Listener für `pointermove`, `pointerup`, `focus`, `blur` und `keydown`, und Stile für den Standardzustand und wenn der Daumen und der Schieberegler den Fokus erhalten. Die Position des ...
Markdown
m88.3-4.9a163.2 163.2 0 00.9-17.1 170.2 170.2 0 00-3.8-35.6A151.2 151.2 0 01208 140h3.2a84 84 0 01-35.1 56.8Z"/></svg>'; static const String dribbble_logo_duotone = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256" preserveAspectRatio="xMidYMid meet" vi...
Dart
re som kjøper og selger Monero online for mer enn 60 forskjellige betalingsmetoder. Hvis du er ny på $appName og ønsker å kjøpe Monero, vennligst ta en titt på vår kjøpsveiledning for å lære hvordan du kjøper Monero.'; } @override String faq250Sbanswer8722Sb057Sbagoradesk(Object appName) { return '$appName e...
Dart
HTMLInputElement; vcell.appendChild(this.v_type); vcell.appendChild(document.createElement("BR")); CreateInput(" Stabilizers", this.v_count, vcell); this.v_count.min = "0"; this.v_count.max = "20"; this.v_count.onchange = () => { this.stab.SetVStabCount(this.v_count.val...
Typescript
= true, silent = true, desc = "Debugger: Toggle breakpoint" }, }, }) -- Steps Keybind.g({ { "n", "<Space>vc", [[<Cmd>lua require('dap').continue()<CR>]], { noremap = true, silent = false, desc = "Debugger: Continue" }, }, }) Keybind.g({ { "n", "<Space>vss", [[<Cmd>lua require('dap').step_over()<CR>]...
Lua
to store message: %v", err) } else { // Log message reception timestamp := msg.Info.Timestamp.Format("2006-01-02 15:04:05") direction := "←" if msg.Info.IsFromMe { direction = "→" } // Log based on message type if mediaType != "" { fmt.Printf("[%s] %s %s: [%s: %s] %s\n", timestamp, direction, sen...
Go
}); view.Resize2(400, 800); view.Show(); } // // test stack depth // if (true) { final o = core.NewQObject(null); o.ConnectObjectNameChanged((String) { if (o.ObjectName().length < 300) { o.SetObjectName(o.ObjectName() + "x"); } }); o.SetObjectName("x"); } ...
Dart
.getSessionId(); if (session == "") { return null; } else { final profileResponse = await getProfileInformation(session); if (profileResponse == null) { return ""; } return session; } } catch (e) { debugPrint(e.toString()); return null;...
Dart
r.LogLevels LogLevels { get; set; } /// <summary> /// Gets or sets the log decoration /// </summary> Logger.LogDecorations LogDecorations { get; set; } /// <summary> /// Initializes the logger /// </summary> void InitLog(); /// <summary> ...
C#
По поручению Фьюрлина Ледоброва из Ледяной крепости добудьте 8 кусков свежего мяса люторога и покормите грозовестников, обитающих прямо над городом."}}, [12866] = {"Сопротивление агрессорам", nil, {"По заданию Глортала Жесткоборода из Ледяной крепости убейте 8 крикуний и 8 ведьм из стаи Ледяного Пера."}}, [12867] = {"П...
Lua
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. //======================================================================================= // SkookumScript Plugin for Unreal Engine 4 //======================================================================================= using System.IO; using System.Net...
C#
// Copyright 2019 Google // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
C
moveq #0,d1 move.l d1,d2 move.l d2,d3 move.l d2,d4 move.l d2,d5 move.l d2,d6 move.l d2,d7 move.l d2,a1 move.l d2,a2 moveq #127,d1 and.l d0,d1 bra.s .strt .long move.l d2,(a0)+ .strt dbra d1,.long lsr.l #7,d0 move.l d0,d1 lsl.l #8,d1 ; *256 lsl.l #1,d1 ; *2 = *512 add.l d1,a0 bra.s .next .clr movem.l...
Assembly
cppsim/state_dm.hpp> #include <cppsim/type.hpp> #include <cppsim/utility.hpp> #include <csim/constant.hpp> #include <csim/update_ops.hpp> #include <fstream> #include <functional> #include "../util/util.hpp" TEST(ObservableTest_multicpu, CheckExpectationValue) { const UINT n = 4; const UINT dim = 1ULL << n; ...
C++
= Stream::new(); let mapped_stream_ = mapped_stream.new_same(); self.observe(move |sig| { if let Some(ref mapped_sig) = f(sig) { mapped_stream_.send(mapped_sig); } }); mapped_stream } /// Filter the signals flowing out of a stream with a predicate. pub fn filter<F>(&self, p...
Rust
t getUInt8ListBytes(List<int> audioBytes, int sampleRate) { // https://discord.com/channels/1192313062041067520/1231903583717425153/1256187110554341386 // https://github.com/BasedHardware/omi/blob/main/docs/_developer/Protocol.md Uint8List wavHeader = getWavHeader(audioBytes.length * 2, sampleRate); ret...
Dart
` 和 `decrease1` 的作用相互抵消,得到的结果是值为 `(x, 2)` 的对象。 ##### 清单 6\. 函数组合示例 ``` Tuple2<Integer, Integer> doCompose(int x) { return compose(this::increase1, this::decrease1).apply(x); } ``` Show moreShow more icon 可以看到,`doCompose` 函数的输入参数和返回值类型与 `increase1` 和 `decrease1` 相同。所返回的结果可以继续使用 `doCompose` 函数来与其他类型相同的函数进行组合。 ### M...
Markdown
/ function getBackgroundAudioPlayerState(obj: any): void; /** * 获取所有已搜索到的`iBeacon`设备 */ function getBeacons(obj: any): void; /** * 获取本机蓝牙适配器状态 */ function getBluetoothAdapterState(obj: any): void; /** * 获取所有已发现的蓝牙设备,包括已经和本机处于连接状态的设备 */ function getBluetoothDevices(obj: any): void; /** * 获取系统剪贴板内容 */ functi...
Typescript
1880868, "Bug Fix", "May 19th, 2021", "Fixing mod load conditions and 'Combo Points [Plater]' mod.", "cont1nuity"}, {1621880868, "Backend Change", "May 19th, 2021", "Adding support for Questie quest tracking.", "cont1nuity"}, {1621880868, "Backend Change", "May 19th, 2021", "Support for 'nameplateNotSelectedAl...
Lua
et field roll_ailerons from hil_controls message * * @return Control output -1 .. 1 */ static inline float mavlink_msg_hil_controls_get_roll_ailerons(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 8); } /** * @brief Get field pitch_elevator from hil_controls message * * @return Control output -1...
C
40C 0040C94C 4C C6 31 82 */ crclr 6 /* 80411410 0040C950 48 00 5E C5 */ bl func_804172D4 /* 80411414 0040C954 38 60 00 00 */ li r3, 0 lbl_80411418: /* 80411418 0040C958 80 01 00 14 */ lwz r0, 0x14(r1) /* 8041141C 0040C95C 7C 08 03 A6 */ mtlr r0 /* 80411420 0040C960 38 21 00 10 */ addi r1, r1, 0x10 /* 80411424 004...
Assembly
IOException) { e.printStackTrace() ContextCompat.getMainExecutor(this).execute { showDialog("读卡失败", "请重新贴紧卡片") { dismissDialog() isPre.value = true isPreLiveData.postValue(true) ...
Kotlin
.pad*2 + 1) self.output = padded:narrow(4,x,imsize):narrow(3,y,imsize) else self.output:set(input) end return self.output end function RandomCrop:type(type) self.module:type(type) return parent.type(self, type) end end do -- random horizontal flip local Batch...
Lua
)) : gamma.toDegrees(); final scale = roundResults ? double.parse(k.toStringAsFixed(12)) : k; // projected coornidates in the zone specified by `lonZone` and `h` final projected = to.call( x: easting, y: northing, z: elev, // do not convert optional elevation (meters) m: m, // do not conver...
Dart
.len() { // 左項をキャリーダウン。 for i in 0..long_num.numbers.len() { if i == 0 { // 一の位に変化なし。 } else if i == long_num.numbers.len() - 1 { // 最上位は1減る。 long_num.add_figure(i, -1); ...
Rust
70 */ lwz r5, lbl_8063D530-_SDA_BASE_(r13) /* 80101EF4 000FDB54 3C 80 80 49 */ lis r4, lbl_80493614@ha /* 80101EF8 000FDB58 C0 22 8C 0C */ lfs f1, lbl_8064120C-_SDA2_BASE_(r2) /* 80101EFC 000FDB5C 38 64 36 14 */ addi r3, r4, lbl_80493614@l /* 80101F00 000FDB60 80 C5 00 D8 */ lwz r6, 0xd8(r5) /* 80101F04 000FDB64 8...
Assembly
position:absolute;left:8px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:...
CSS
value={`$${data.totalPnL.toFixed(2)}`} subtitle="All time" colorScheme={data.totalPnL >= 0 ? "green" : "red"} /> <PerformanceCard title="Today's P&L" value={`$${data.dailyPnL.toFixed(2)}`} subtitle="Since midnight" colorSchem...
Markdown
of set-up, just calling ;; the function each time you want a pseudo-random number ;; (start code) ;; // Get next pseudo-random 8-bits number ;; u8 getRandomNumber() { ;; return cpct_getRandom_glfsr16_u8(); ;; } ;; (end code) ;; However, this will return always the same sequence, in the same order. Yo...
Assembly
== -1) { animating = true; draw(); drawGunHalfStep(x, getY() + getHeight(oldPos) + 6); animating = false; } draw(); SD_PlaySound("menu/move2"); // // WAIT FOR BUTTON-UP OR DELAY NEXT MOVE // TicDelay (20); break; } case dir_West: getIndex(curPos)->left()...
C++
/icons.duckduckgo.com/ip3/reflect.app.ico" height="13"> [Reflect](https://reflect.app/.well-known/ai-plugin.json) | 🟩 Up | [reflect.yml](https://github.com/targed/Awesome-Plugins/commits/HEAD/history/reflect.yml) | <details><summary><img alt="Response time graph" src="./graphs/reflect/response-time-week.png" height="2...
Markdown
* @file offb_node.cpp * @brief Offboard control example node, written with MAVROS version 0.19.x, PX4 Pro Flight * Stack and tested in Gazebo Classic SITL */ #include <ros/ros.h> #include <geometry_msgs/PoseStamped.h> #include <mavros_msgs/CommandBool.h> #include <mavros_msgs/SetMode.h> #include <mavros_msgs/State...
C++
using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; namespace SuchByte.MacroDeck.GUI.CustomControls; public partial class RoundedUserControl : UserControl { private int borderRadius = 8; public RoundedUserControl() { InitializeComponent(); SetStyle(ControlSt...
C#
^H" |sort -V |cut -f 3- | sed 's/\[ro_RO\]//g' |$TOKENIZER ro > en_ro.hyp cat en_ro | grep -P "^T" |sort -V |cut -f 2- | sed 's/\[ro_RO\]//g' |$TOKENIZER ro > en_ro.ref sacrebleu -tok 'none' -s 'none' en_ro.ref < en_ro.hyp ``` ## Citation ```bibtex @article{liu2020multilingual, title={Multilingual Denoising Pre-t...
Markdown
import requests, json, time, math from scipy import stats import csv ''' ahr999囤币指标: 计算方式:ahr999指标 =(比特币价格/200日定投成本)*(比特币价格/指数增长估值)。 其中指数成长估值为币价和币龄的拟合结果,本指数拟合方法为每月对历史数据进行拟合。 指标说明:该指标由微博用户ahr999创建,辅助比特币定投用户结合择机策略做出投资决策。 该指标隐含了比特币短期定投的收益率及比特币价格与预期估值的偏离度。 从长期来看,比特币价格与区块高度呈现出一定的正相关,同时借助定投方式的优势,短期定投成本大都位于比特币价格之下。 因此,当比...
Python
(vp.containsChild(CTLibEn.M_VBD_VBN)) return DEPLibEn.DEP_AUXPASS; if (!vp.containsChild(CTLibEn.M_VBx) && (vp = vp.getFirstChild(CTLibEn.M_VP)) != null && vp.containsChild(CTLibEn.M_VBD_VBN)) return DEPLibEn.DEP_AUXPASS; } return DEPLibEn.DEP_AUX; } return null; } private Strin...
Java
from redux.pipe import Pipe import pyami.fft # Two threads doing power at the same time may be causing trouble. # Make a thread lock to prevent this. import threading import sys powerlock = threading.Lock() sys.stderr.write('**power thread lock in effect') pyami.fft.calculator.stashing_on = False class Power(Pipe): ...
Python
/* * ARM NEON optimised DSP functions * Copyright (c) 2008 Mans Rullgard <mans@mansr.com> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * ve...
C
n "<patterndb version='3' pub_date='2010-02-22'>\ <ruleset name='testset' id='1'>\ <patterns>\ <pattern>prog1</pattern>\ </patterns>\ <tags>\ <tag>tag1</tag>\ </tags>\ </ruleset>\ </patterndb>" #define pdb_test_match_in_program "<patterndb version='5' pub_date='2010-02-22'>\ <ruleset name='sshd' id='1...
C
, x20 adc x6, xzr, xzr # A[0] * B[2] mul x19, x15, x13 umulh x20, x15, x13 adds x5, x5, x19 adc x6, x6, x20 # A[1] * B[1] mul x19, x16, x12 umulh x20, x16, x12 adds x5, x5, x19 adcs x6, x6, x20 adc x7, xzr, xzr # A[2] * B[0] mul x19, x17, x11 umulh x20, x17, x11 adds x5, x5, x19 adcs x6, x6, x20 ad...
Assembly
tring = RawOsStr::from_str("\u{F6}"); test(|| string.index(1..2)); test(|| string.index(0..1)); test(|| string.index(1..)); test(|| string.index(0..=0)); test(|| string.index(..1)); test(|| string.index(..=0)); test(|| string.split_at(1)); #[track_caller] fn test<F, R>(f: F) whe...
Rust
## Q: 宿舍晚上查寝吗,封寝吗,晚归能回去吗? - A21987: 查 封 好像回不来 看阿姨吧 - A24210: 涿州查,北京不查。晚归可回,上报与否看阿姨 - A25883: 查寝,封寝,太晚的话理论上不能(可以给阿姨打电话试试呢,高公可以翻栅栏) ## 自由补充部分 A21987: 别来 *** A24210: 欢迎报考culr,如果你成绩一般但想来北京,这个学校是不错的选择# 山东劳动职业技术学院 > [免责声明](https://colleges.chat/#_3):本页面内容均来源于问卷收集,仅供参考,请自行确定信息准确性和真实性! > 若您发现回答中存在答非所问或胡言乱语,欢迎记录对应的...
Markdown
with_capacity.capacity()); }// Helper macro to execute a system call that returns an `io::Result`. // // Macro must be defined before any modules that uses them. cfg_os_poll! { mod selector; pub(crate) use self::selector::{event, Event, Events, Selector}; mod waker; pub(crate) use self::waker::Waker; ...
Rust
# encoding: utf-8 """ """ import typing as _t from .node_dict_add_any import StringConstructorDictAddAny from .node_dict_add_string import StringConstructorDictAddString from .node_dict_key_extract import StringConstructorDictExtractString from .node_dict_from_text import StringConstructorDictFromText from .node_dict...
Python
div></td><td style=";;" class="navbox-list navbox-even"><div><a href="/%E4%BA%BA%E5%81%B6%E3%80%8CSemi-Automaton%E3%80%8D" class="mw-redirect" title="人偶「Semi-Automaton」">人偶「Semi-Automaton」</a> &#8226; <a href="/%E9%AA%91%E5%A3%AB%E3%80%8CDoll_of_Round_Table%E3%80%8D" class="mw-redirect" title="骑士「Doll of Round Table」">...
Markdown
, errMessageTooShort } var err error m := &Message{Code: int(b[1]), Checksum: int(binary.BigEndian.Uint16(b[2:4]))} switch proto { case iana.ProtocolICMP: m.Type = ipv4.ICMPType(b[0]) case iana.ProtocolIPv6ICMP: m.Type = ipv6.ICMPType(b[0]) default: return nil, errInvalidProtocol } if fn, ok := parseFns[...
Go
") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; const TypeIcon = { info: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ant_design_icons_e...
JavaScript
vst1.32 {q6}, [r5:128] @vld1.32 {q7}, [r4:128] vadd.i32 q8, q0, q7 sub r3, #4 vld1.32 {q4}, [r0:128]! vld1.32 {q5}, [r0:128]! vadd.i32 q4, q0 vadd.i32 q9, q8, q7 vadd.i32 q5, q8 vld1.32 {q6}, [r0:128]! vmov.i32 q15, #0x800000 vadd.i32 q6, q9 vtst.32 q13, q4, q15 vtst.32 q14, q5, q15 vtst.32 q15, q6, ...
Assembly
answer.code.PARAM_ERR) response.message = string.format("%s|%s",response.message,err) httpc.response_json(linkobj.linkid,200,response) return end local appid = request.appid local new_account = request.new_account local roleid = request.roleid local app = util.get_app(appid) ...
Lua
------* ; Sous Programme de la fentre Gnrale deplacement_curseur: move.l #(8+8)*2,d2 ; une ligne en quartet moveq #1,d3 move.l GWVA_WIND_OBJ_USER_PTR1(a0),a1 tst.w champ_edition(a1) beq.s .edition_hexa moveq #1*2,d3 ; 2 quartets par 2 quartets en ASCII .edition_hexa: rts *-------------------------* ; d0.l :...
Assembly
rty("Instance", BindingFlags.Public | BindingFlags.Static); // if (instanceProp == null) // return false; // object configInstance = instanceProp.GetValue(null); // if (configInstance == null) // return false; // PropertyInfo inflationProp = ...
C#
rl{cursor:pointer}.fc .fc-list-event:hover td{background-color:#f5f5f5;background-color:var(--fc-list-event-hover-bg-color,#f5f5f5)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{display:inline-block;box-sizing:content-box;width:0;height:0;border:5px solid #3788d8...
CSS
string[]; rowTotalsSets: Array<number[]> = []; // magic variable playersStillAvailable: string[]; subscription: Subscription; private _gameObservable: Observable<any>; constructor(private _game: GameService, private _activeGame: ActiveGameService, private _totalsC...
Typescript
] HYPHEN-MINUS (HY) × [6.0] <LINE FEED (LF)> (LF) ÷ [0.3] × 002D × 0020 × 000A ÷ # × [0.3] HYPHEN-MINUS (HY) × [7.01] SPACE (SP) × [6.0] <LINE FEED (LF)> (LF) ÷ [0.3] × 002D × 0308 × 000A ÷ # × [0.3] HYPHEN-MINUS (HY) × [9.0] COMBINING DIAERESIS (CM1_CM) × [6.0] <LINE FEED (LF)> (LF) ÷ [0.3] × 002D × 0308 × 0020 × 00...
Dart
Children: []Widget{ Label{ Text: "*并发协程:(1~99999)", }, NumberEdit{ Value: Bind("ThreadNum", Range{1, 99999}), Suffix: "", Decimals: 0, }, }, }, VSplitter{ Children: []Widget{ Label{ ...
Go
v24, v0.t" ::[A] "r"(scalar)); VCMP_U32(15, v8, 0x48da7aac, 0x9dfe886c, 0xf49f26e5, 0xddd6bece, 0x40ca82f5, 0x2f0a66ed, 0x38c88af2, 0x915f2166, 0x6f61c0a9, 0x802d8981, 0x31aba619, 0xa3f70986, 0xbc63c280, 0xa4fbf240, 0x9451b955, 0xdd51d971); /* #if ELEN == 64 */ /* VSET(16, e64...
C
rn "C" { pub fn DAQmxResetAOFuncGenOffset( taskHandle: TaskHandle, channel: *const ::std::os::raw::c_char, ) -> int32; } extern "C" { pub fn DAQmxGetAOFuncGenSquareDutyCycle( taskHandle: TaskHandle, channel: *const ::std::os::raw::c_char, data: *mut float64, ) -> ...
Rust
dd(modifiedServer); } return fullPaths; } // FD testnet4 server static const String TESTNET4_ELECTRUM_SERVER = "ssl://testnet4.foundation.xyz:50002"; // MutinyNet Electrum static const String SIGNET_ELECTRUM_SERVER = "ssl://signet.foundation.xyz:50002"; DisplayUnit displayUnit = Dis...
Dart
ing_WinInet'*"] pub const INTERNET_OPTION_HIBERNATE_INACTIVE_WORKER_THREADS: u32 = 91u32; #[doc = "*Required features: 'Win32_Networking_WinInet'*"] pub const INTERNET_OPTION_HSTS: u32 = 157u32; #[doc = "*Required features: 'Win32_Networking_WinInet'*"] pub const INTERNET_OPTION_HTTP_09: u32 = 191u32; #[doc = "*Require...
Rust
url: List<Regex> = listOf( "[-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_+.~#?&//=]*)", "https?://(www\\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_+.~#?&//=]*)" ).map { it.toRegex() } /** A discord invite url */ public val invite: Regex = Regex("(https?://...
Kotlin
.addEventListener( "submit", function (event) { if (!form.checkValidity()) { event.preventDefault(); event.stopPropagation(); } form.classList.add("was-validated"); }, false ); }); } /** * 图片预览 */ function initImagePreview() { const fileInp...
JavaScript
Buckets[i]); bucketMap[defaultBuckets[i]] = i; } confAvg.resize(maxConfirms); curBlockConf.resize(maxConfirms); unconfTxs.resize(maxConfirms); for (unsigned int i = 0; i < maxConfirms; i++) { confAvg[i].resize(buckets.size()); curBlockConf[i].resize(buckets.size()); u...
C++
{ Ok(acc) => acc["code_hash"].as_str().unwrap_or("0"), Err(e) => { debug!("get_account_code_hash failed: {}", e); "0" } }; Ok(( answer_id, json!({ "code_hash": format!("0x{}", code_hash_str) }), )) } ...
Rust
d ڵһ float Gq0 = 1, Gq1 = 0, Gq2 = 0, Gq3 = 0; // quaternion elements representing the estimated orientation float exInt = 0, eyInt = 0, ezInt = 0; // scaled integral error /* * IMUupdate * Ԫؽŷ * ٶȼ * * ڲ */ void IMUupdate(float gx, float gy, float gz, float ax, float ay, float az) { float no...
C
ew[] { "RunsList", "--subject", "example.com" }) .WithExample(new[] { "RunsList", "--count", "5" }); config.AddCommand<DomainDetective.CLI.Commands.RunsOpenCommand>("RunsOpen") .WithDescription("Open most recent run directory or scan.json") .WithExample(new[] ...
C#
fffffa1d.w lea $ffff8800.w,a0 move.l #$0707ffff,(a0) * wyciszenie dywieku move.l #$08080000,(a0) move.l #$0909ffff,(a0) move.l #$0a0a0000,(a0) move.b #$c0,$fffffa23.w * powtarzanie klawiatury bset #0,$484.w * klawiatura z dzwiekiem move.w (sp)+,sr clr.w -(sp) trap #1 * wyjscie z programu ...
Assembly
tityQuery(query)) { using (var entities = group.ToEntityArray(Allocator.TempJob)) { Assert.That( entities.Length, Is.EqualTo(1), $"Conversion systems produced unexpected number of phys...
C#
e total number of characters is odd, then the front path will collide with the reverse path. front := (delta%2 != 0) // Offsets for start and end of k loop. Prevents mapping of space beyond the grid. k1start := 0 k1end := 0 k2start := 0 k2end := 0 for d := 0; d < maxD; d++ { // Bail out if deadline is reached....
Go
!videoEl.paused) { done(); return; } videoEl.addEventListener('play', function onPlay() { videoEl.removeEventListener('play', onPlay); done(); }); videoEl.play(); function done() { ignoreVastEvents = false; if (callback) callback(); ...
JavaScript
随想曲', '获得5星乐团队员——随想曲', '', '', '5', '9999', '', 'rolecard_5', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '20140', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''}, {'42015', '', '幻响', '', '', '5', '0', '获得3星乐团队员——幻响', '获得3星乐团队员——幻响', '', '', '3', '9999', '', 'rolecard_3', '',...
Lua
, value); dst->append(buf, sizeof(buf)); } void PutFixed64(std::string* dst, uint64_t value) { char buf[sizeof(value)]; EncodeFixed64(buf, value); dst->append(buf, sizeof(buf)); } char* EncodeVarint32(char* dst, uint32_t v) { // Operate on characters as unsigneds unsigned char* ptr = reinterpret_cast<unsi...
C++
ns/slicer.scss */ .x-tip-form-invalid:after { display: none; content: "x-slicer:corners:url(images/tip/tip-form-invalid-corners.gif), sides:url(images/tip/tip-form-invalid-sides.gif)"; } /*</if slicer>*/ /* */ /* line 36, ../../../ext-theme-neutral/sass/src/tip/Tip.scss */ .x-tip-form-invalid { border-color: #e1...
CSS
"zì"], "宋玉东墙": ["sòng", "yù", "dōng", "qiáng"], "送抱推襟": ["sòng", "bào", "tuī", "jīn"], "送风机": ["sòng", "fēng", "jī"], "送佛送到西天": ["sòng", "fó", "sòng", "dào", "xī", "tiān"], "送话器": ["sòng", "huà", "qì"], "送故迎新": ["sòng", "gù", "yíng", "xīn"], "送货上门": ["sòng", "huò", "shàng", "mén"], "送旧迎新": ["sòng", "jiù", "yíng", "xīn...
JavaScript
": "jue", "r": "子", "sc": 3, "l": 5, "f": 6370}, {"h": "螋", "p": "sōu", "sp": "sou", "r": "虫", "sc": 15, "l": 5, "f": 6371}, { "h": "鲳", "p": "chāng", "sp": "chang", "r": "魚", "sc": 16, "l": 5, "f": 6372 }, {"h": "铙", "p": "náo", "sp": "nao", "r": "金", "sc": 11, "l": 5, "f": 6373}, ...
Dart
word\" " + "xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" " + "xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\">" ...
Java
="+(rvector[4]==1));} } if(!overlapped || (overlapWithoutQuality && (x<0 || rvector[4]==1))){ x=BBMergeOverlapper.mateByOverlapRatio(r1, r2, aprob, bprob, rvector, min0, min, minInsert0, minInsert, maxRatio, minSecondRatio, ratioMargin, RATIO_OFFSET, 0.95f, 0.95f, false); if(verbose){outstream.print...
Java
from rest_framework import serializers from .models import AIConfig class AIConfigSerializer(serializers.ModelSerializer): api_key = serializers.CharField(help_text='密钥明文返回') class Meta: model = AIConfig fields = [ 'id', 'name', 'provider', 'model', 'enabled', 'is_default', 'prior...
Python
int level; f->f_fsdata = (void *)0; if (fp == (struct file *)0) return (0); for (level = 0; level < NIADDR; level++) { if (fp->f_blk[level]) free(fp->f_blk[level], fp->f_fs->fs_bsize); } if (fp->f_buf) free(fp->f_buf, fp->f_fs->fs_bsize); free(fp->f_fs, SBSIZE); free(fp, sizeof(struct file)); return ...
C
ssert.That(GreaterThan(x0, x1), Is.False); Assert.That(GreaterThan(x0, x2), Is.False); Assert.That(GreaterOrEqual(x0, x0), Is.True); Assert.That(GreaterOrEqual(x0, x1), Is.False); Assert.That(GreaterOrEqual(x0, x2), Is.False); }); } #endif } }
C#
均衡第一版是由 kube-vip 实现的,但是之后发现只能实现高可用,vip 绑定到具体一台 master 节点,所有流量也均会进入这台 master,不能实现负载均衡。 ### Q2:KubeKey 部署的 K8s 集群安装路径(比如 kubelet,kubectl,kubeadm)和a pt get 安装默认路径不一样,后期手工升级有影响,这个差异是预期还是有其他考虑? A:建议通过 KubeKey 升级 K8s 集群。与apt默认安装路径不同也是为了使 KubeKey 方便统一管理,尽可能不受环境其他因素影响。 ### Q3:Module、task 是串行还是并行?支持 Module 之间有 DAG 依赖的情况?只能按照...
Markdown
let mut b: Vec<u8> = digit.bytes().filter(|b| sample_4.contains(b)).collect(); b.sort_unstable(); let b = b.len() == 3; if b {5} else{2} } } ,6 => { let mut c: Vec<u8> = digit.bytes().filter(|b| sampl...
Rust
("Client{clientId}.ch{index} received {totalEvents} events in {latencyMs:F2}ms", this.shortClientId, index, totalEvents, stopwatch.Elapsed.TotalMilliseconds); if (blobBatches != null) { Task backgroundTask = Task.Run(() => blobBatchReceiver.De...
C#
}\n" ); test!( index_unit_conversions, "a {\n color: index(1px 1in 1cm, 96px);\n}\n", "a {\n color: 2;\n}\n" ); test!( zip_three, "a {\n color: zip(1px 1px 3px, solid dashed solid, red green blue);\n}\n", "a {\n color: 1px solid red, 1px dashed green, 3px solid blue;\n}\n" ); test!( zip_...
Rust
"github.com/cometbft/cometbft/types" cmttime "github.com/cometbft/cometbft/types/time" ) // Consensus sentinel errors var ( ErrInvalidProposalSignature = errors.New("error invalid proposal signature") ErrInvalidProposalPOLRound = errors.New("error invalid proposal POL round") ErrAddingVote =...
Go
+ SimpleTest.NewLine + " expecting: " + s + SimpleTest.NewLine + " got : " + sig[1]); } } /** * X9.62 - 1998,<br/> * J.2.1, Page 100, ECDSA over the field F2m<br/> * an example with 191 bit binary field */ ...
C#
Points.add(point); } return derivativePoints; } /// Returns the signed angle in radians between the lines formed by [cornerPoint] /// to [firstEndpoint] and [cornerPoint] to [secondEndpoint]. double cornerAngle( Vector2 cornerPoint, Vector2 firstEndpoint, Vector2 secondEndpoint) { final deltaVector1 = Vecto...
Dart
in H2, you can also do it in UPDATE queries. Additionally, when using `returningKeys` most databases will only let you return the key of the inserted row that is being generated however, H2 will let you return the value of any column in it. Bottom line, returning inserted row IDs is not uniformly supported across ...
Kotlin
ntycastle.impl.ec_domain_parameters.secp112r1; import "package:pointycastle/ecc/api.dart"; import "package:pointycastle/ecc/ecc_base.dart"; import "package:pointycastle/src/ec_standard_curve_constructor.dart"; import "package:pointycastle/src/registry/registry.dart"; class ECCurve_secp112r1 extends ECDomainParameters...
Dart
.v', '1', lines); final archivedEntries = data.ext.resourceExt!.archivedSorobanEntries; final count = archivedEntries.length; _addLine('$prefix.ext.archivedSorobanEntries.len', count.toString(), lines); for (int i = 0; i < count; i++) { _addLine('$prefix.ext.archivedSorobanEntries[$i]', ...
Dart
expect(user.success).toBe(true); expect(user.user.name).toBe('Test 123'); expect(user.user.balance).toBe(0); users = await DI.userRepository.findAll(); expect(users.length).toBe(2); // We added a new user await cleanupDatabase(); done!(); }); }); test('Create user with invalid body to fail', async ...
Typescript
1V1c0-.55-.45-1-1-1zm-1 14H2V2h12v12zM7 3H3v10h4V3z"],h0=["M14.99 2.95h-14c-.55 0-1 .45-1 1v1h16v-1c0-.55-.45-1-1-1zm-15 10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-6h-16v6zm5.5-2h5c.28 0 .5.22.5.5s-.22.5-.5.5h-5c-.28 0-.5-.22-.5-.5s.23-.5.5-.5zm-3 0h1c.28 0 .5.22.5.5s-.22.5-.5.5h-1c-.28 0-.5-.22-.5-.5s.23-.5.5-.5z"],z0=["M9...
JavaScript
= calloc<WCharStruct>(); p.ref.a0 = 1; Expect.equals(1, p.ref.a0); p.ref.a0 = 2; Expect.equals(2, p.ref.a0); calloc.free(p); } final class WCharArrayStruct extends Struct { @Array(100) external Array<WChar> a0; } void testInlineArray() { final p = calloc<WCharArrayStruct>(); final array = p.ref.a0;...
Dart
cc-tlyw .cc-kxkl .cc-nsge[data-is-failure=false],.crisp-client .cc-tlyw .cc-kxkl .cc-nsge[data-is-failure=false] *{cursor:pointer!important}.crisp-client .cc-tlyw .cc-kxkl .cc-nsge[data-pane-animate-entrance=true]{animation-name:cc-1851!important;animation-duration:.75s!important;animation-fill-mode:both!important}.cri...
CSS
ectTimestampEntity> OnPublish(ITrakHoundObjectTimestampEntity entity) { if (entity != null && !string.IsNullOrEmpty(entity.ObjectUuid)) { lock (_lock) { _empty.Remove(entity.ObjectUuid); _timestamps.Remove(entity.Ob...
C#