content
stringlengths
2
6.21k
label
stringclasses
16 values
snakeName = name.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}_${b}`).toLowerCase(); return ( // .npmrc process.env[`npm_config_electron_${name.toLowerCase()}`] || process.env[`NPM_CONFIG_ELECTRON_${snakeName.toUpperCase()}`] || process.env[`npm_config_electron_${snakeName}`] || // package.json ...
Typescript
)); Ok(acc) })?, nonce: rand::random::<u64>(), content: Keccak256::new().chain(&serialize(&content)?).result().into(), metadata: Metadata { end_of_chain: false }, }) } } #[derive(Serialize, Deserialize, Debug)] pub struct Message { body: M...
Rust
message, e); throw new System.Exception(message); } return reps; } } /** * Enumerate over the CSU_C09_STUDY_PHASE results */ public IEnumerable<CSU_C09_STUDY_PHASE> STUDY_PHASEs { get { for (int rep = 0; rep < STUDY_PHASERepetitionsUsed; rep++) { yield return (CSU_C09...
C#
r move.b #32,d0 ; + space move d0,([alert_ptr+56]) ; bad param moveq #38,d0 .box: bsr.l alert .bug: move.l #default_enhanced,enh_ptr0 sf enh_flag rts .cherche: cmp.b #'A',d0 bmi.s .ch1 cmp.b #'Z'+1,d0 bpl.s .ch1 or.b #$20,d0 .ch1: move.b (a1)+,d1 beq.s .ch5 ; return EQ if not found cmp.b d1,d0 beq.s ....
Assembly
} let mut sum = 0; manager.iter().run(|(d,): (&Datum,)| sum += d.value); assert_eq!(sum, 15); manager.iter().run(|(d,): (&mut Datum,)| d.value += 1); manager.iter().run(|(d,): (&Datum,)| sum += d.value); assert_eq!(sum, 35); } #[test] fn tagged_...
Rust
} public static IApplicationBuilder UseWingTipOpenIdConnectAuthentication( this IApplicationBuilder applicationBuilder, OpenIdConnectOptions options) { if (applicationBuilder == null) { throw new ArgumentNullException(nameof(applicatio...
C#
sar Bank', persianName: 'بانک انصار', code: '063', isAccountNumberAvailable: false), BankInformation( nickname: 'gardeshgari', name: 'Gardeshgari Bank', persianName: 'بانک گردشگری', code: '064', isAccountNumberAvailable: false), BankInformation( nickname: 'hekma...
Dart
#include "console.h" #include "types.h" #include "vga.h" #include "string.h" static uint16 *g_vga_buffer; //index for video buffer array static uint32 g_vga_index; // cursor positions static uint32 cursor_pos_x = 0, cursor_pos_y = 0; //fore & back color values uint8 g_fore_color = COLOR_WHITE, g_back_color = COLOR_BLA...
C
0 } else { let first = u32::from_le(offsets[0]) as usize; (first - 4) / 4 } } pub fn is_empty(&self) -> bool { self.len() == 0 } pub fn get(&self, idx: usize) -> Option<UncleBlockReader<'_>> { let len = self.len(); if idx >= len...
Rust
sual; } } /// <summary/> public override void Verify() { // Compare the two screen captures RenderBuffer renderBuffer = new RenderBuffer(firstCapture, BackgroundColor); Color[,] screenCapture = GetScreenCapture(); int differen...
C#
namespace BRG.DB { using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.Data; using System.Data.SQLite; using System.Diagnostics; using System.IO; using System.Linq; using BRG; using BRG.Entities; using BRG.Service; using Dapper; [Export(typeof(IDataContex...
C#
PD Z24, Z26, Z24 // Load and process 64 bytes from input 2 to 5 outputs VMOVDQU64 (SI), Z25 ADDQ $0x40, SI VGF2P8AFFINEQB $0x00, Z10, Z25, Z26 VXORPD Z20, Z26, Z20 VGF2P8AFFINEQB $0x00, Z11, Z25, Z26 VXORPD Z21, Z26, Z21 VGF2P8AFFINEQB $0x00, Z12, Z25, Z26 VXORPD ...
Assembly
r.ID, IP: ip, UA: ua, Rid: p.Rid, RootID: app.Dao().FindCommentRootID(p.Rid), IsPending: false, IsCollapsed: false, IsPinned: false, IsVerified: isVerified, } // Set the default pending status // (if not admin and the `PendingDefault` is enabled) if !isAdmin && app.Co...
Go
.include "macros.inc" .section .text, "ax" # 0x80006980 - 0x803E1E60 .global gdev_cc_initinterrupts gdev_cc_initinterrupts: /* 801D99F0 001D5650 94 21 FF F0 */ stwu r1, -0x10(r1) /* 801D99F4 001D5654 7C 08 02 A6 */ mflr r0 /* 801D99F8 001D5658 90 01 00 14 */ stw r0, 0x14(r1) /* 801D99FC 001D565C 48 00 06 19 */ b...
Assembly
"query" => ctx.document.format(&Style::default().indent(0)).replace('\n', " "), "complexity" => complexity, ); match options.max_complexity { Some(max_complexity) if complexity > max_complexity => { Err(vec![QueryExecutionError::...
Rust
e_from_str(string) } /// Parses the string `string` into a `Reference`. Allocates minimally on /// success and error. /// /// This method should be used instead of [`Reference::parse()`] when the /// source URI is already a `String`. Returns an `Error` if `string` is not /// a valid URI ref...
Rust
url = ql_url + 'api/user/two-factor/login' data = json.dumps({ "username": username, "password": password, "code": twoCode }) res = requests.put(url=url, headers=headers, data=data) ...
Python
tructuralMaterial() { // Arrange string samplePath = Path.Combine(workingDirectory, @".\FloorType\canGetFloorTypeStructuralMaterial.dyn"); string testPath = Path.GetFullPath(samplePath); int expectedMaterialIdOnFloor = 45453; // Act ViewM...
C#
h; textIndex-- ) { let patternIndex for ( patternIndex = this.patternLength - 1; patternIndex >= 0; patternIndex-- ) { if ( text[textIndex - (this.patternLength - patternIndex - 1)] !== this.pattern[patternIndex] ) break ...
Typescript
async function listIndexNames<TModels extends ModelMap>( db: WildebeestDb<TModels>, tableName: string, transactionOptions?: MigrationTransactionOptions<TModels>, ): Promise<string[]> { const { queryInterface } = db; // Determine the indexes const indexes: PgIndex[] = await queryInterface.sequelize.query( ...
Typescript
tar.xz 29292 SHA512:a64621c93975bc42ba171c9298c932f9515025513911e744183092e0ef9873db474c4ec27a21f310f40e7b970ba6300edb057552f7e90fc469897ffa2eb706f0 ``` ### `dpkg` source package: `rtmpdump=2.4+20151223.gitfa8646d.1-2build4` Binary Packages: - `librtmp1:amd64=2.4+20151223.gitfa8646d.1-2build4` Licenses: (parsed fro...
Markdown
fmove.l fp1,PDTESTSX(a6) fmove.l fp0,PDTESTSY(a6) move.w #1,PDHASMOVED(a6) rts data bss mwStep ds.w 1 mwAlpha ds.w 1
Assembly
628.307585 * t) + 0.0002061 * math.cos(2.67823 + 628.307585 * t) * t + 0.000349 * math.cos(4.6261 + 1256.61517 * t) - 20.5 / SECOND_PER_RAD); v = 7771.38 - 914 * math.sin(0.7848 + 8328.691425 * t + 0.0001523 * t2) - 179 * math.sin(2.543 + 15542.7543 * t) - ...
Dart
100.0 { percentage := float64(tmp) / float64(100.0) pos_x := int(delta_x * float64(index)) pos_y := height - int(delta_y*percentage) label := value description = append(description, "L "+strconv.Itoa(pos_x)+" "+strconv.Itoa(pos_y)) texts = append(texts, renderTextAt(pos_x, pos_y, ...
Go
string //, options?: {onOpen(filename: string): void} ) { const headerBar = new Gtk.HeaderBar() headerBar.set_title(title) if (subtitle != null) { headerBar.set_subtitle(subtitle) } headerBar.set_show_close_button(true) /* const button = new Gtk.Button({label: 'Open'}) if (options && options.onOpen) ...
Typescript
/* * linux/arch/x86/kernel/head_64.S -- start in 32bit and switch to 64bit * * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE * Copyright (C) 2000 Pavel Machek <pavel@suse.cz> * Copyright (C) 2000 Karsten Keil <kkeil@suse.de> * Copyright (C) 2001,2002 Andi Kleen <ak@suse.de> * Copyright (C) 2005...
Assembly
dgeStart.y) / 2.0f ) val afterDragQuarter = Point2D.Float( edgeStart.x + (startAtMidpoint.x - edgeStart.x - dragDelta.x) / 2.0f, edgeStart.y + (startAtMidpoint.y - edgeStart.y - dragDelta.y) / 2.0f ) // select edge canvas.click(startAtMidpoint) can...
Kotlin
eTo(l.x,l.y);for(var i=1;i<s.length;i++){var a=s[i];t.lineTo(a.x,a.y)}t.closePath&&t.closePath()}function sZe(t,e,r,n,i){t.beginPath&&t.beginPath(),t.arc(r,n,i,0,Math.PI*2,!1);var a=e,s=a[0];t.moveTo(s.x,s.y);for(var l=0;l<a.length;l++){var u=a[l];t.lineTo(u.x,u.y)}t.closePath&&t.closePath()}function oZe(t,e,r,n){t.arc...
JavaScript
// フォルダーまたはファイルのファイル システム属性を開いたり、フォルダーまたはファイルにファイル システム属性を書き込んだりする権限を指定します。 // これには、データ、拡張属性、またはアクセス規則や監査規則を書き込む権限は含まれません。 static WriteAttributes = 256; // // 概要: // フォルダーおよびファイルを作成し、ファイルに対してデータの追加または削除を行う権限を指定します。 この権限には、System.Security.AccessControl.FileSystemRights.WriteData /...
Typescript
\n]+$/, ''); } } // 删除两个 block 中间的空白字符 // <p>foo</p>\n<p>bar</p> const childPrev = child.prev(); const childNext = child.next(); if ( childPrev && nodeApi.isBlock(childPrev) && childNext && nodeApi.isBlock(childNext) && text.trim() === '' ) { text = text.t...
Typescript
.Look { panic("assert: search: invalid mlen in loop") } if s.b[p2+mlen-1] == scanend1 && s.b[p2+mlen] == s.b[p1+mlen] && s.b[p2] == s.b[p1] && s.b[p2+1] == s.b[p1+1] { if s.b[bp] != s.b[node] || s.b[bp+1] != s.b[node+1] || s.b[bp+2] != s.b[node+2] { panic("assert: seach: invalid initial match") ...
Go
ingToRegMask((byte)((val >> 3) & 7)), isLive, isThis, iptr)); isThis = false; iptr = false; continue; } /* This is probably an argument push/pop */ argOffs = (val & 0x38) >> 3; /* 6 [110] and 7 [111] are reserved for oth...
C#
ference(address) .also { it.read() } .let(::ByReference) } actual fun allocate(allocator: MemoryAllocator): WGPUComputePassDescriptor { return WGPUComputePassDescriptor.ByReference() .also { allocator.register(it) } } actual fun allocateArray(allocator: MemoryAllocator, size: UInt, provider: (U...
Kotlin
rmines the frame type that the IE will be associated with."] pub type wifi_vendor_ie_type_t = u32; pub const wifi_vendor_ie_id_t_WIFI_VND_IE_ID_0: wifi_vendor_ie_id_t = 0; pub const wifi_vendor_ie_id_t_WIFI_VND_IE_ID_1: wifi_vendor_ie_id_t = 1; #[doc = " @brief Vendor Information Element index"] #[doc = ""] #[doc =...
Rust
getDimLinearFormat(); // fixme - sand - move to generic utils! ret = RS_Units::formatLinear(dist, getGraphicUnit(), format, dimdec); if (format == RS2::Decimal) { ret = stripZerosLinear(ret, dimzin); } //verify if units are decimal and comma separator if (format == ...
C++
enchido _formKeyBancoPersistePage.currentState.save(); /// passa o _inForm para false, pois fecharemos a página e voltaremos para a página anterior _inFormPersiste = false; BancoController.persistir(_banco); BancoController.refrescarLista(); } } /// Classe que tem algum controle relacionado a pá...
Dart
(TinyV1Language::class.java)) /* * Minecraft Development for IntelliJ * * https://mcdev.io/ * * Copyright (C) 2025 minecraft-dev * * This program 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,...
Kotlin
// CHECK: call void @llvm.trap() // CHECK: unreachable Foo(x, *y) } // CHECK: attributes #0 = {{{.*}} noreturn {{.*}}} // CHECK: DISubprogram(name: "empty", {{.*}} DIFlagNoReturn // CHECK: DISubprogram(name: "foo", {{.*}} DIFlagNoReturn <gh_stars>0 #![feature(array_chunks)] #![feature(array_zip)] mod co...
Rust
"devtype" to 1.toString(), "queryCondition" to mutableListOf( QueryCondition("s8", "02"), QueryCondition("s2", "杭州互联网法院"), QueryCondition("s19", "张利民"), QueryCondition("s20", "陕西行中律师事务所"), QueryCondition("s21", "彩礼"), ...
Kotlin
id"].(string), amrr.GetResponse().Map["id"].(string), meta) if err != nil { return diag.Errorf("%v", serr) } if isPrimary { amrr.GetResponse().Map[authmethodOidcIsPrimaryAuthMethodForScope] = true } return setFromOidcAuthMethodResponseMap(d, amrr.GetResponse().Map) } func resourceAuthMethodOidcUpdate(ctx co...
Go
log('no package found for ' .. vim.inspect(path)) pkg = { '' } path_to_pkg[path] = pkg end if vfn.empty(pkg) == 1 then vim.notify('no package found ' .. pkg .. ' in path' .. path) util.log('No package found in current directory.') local setup = { 'go', 'doc', '-all', '-u', '-cmd' } gen_pkg_i...
Lua
l引入了一种名为 Value-informed Skill Chaining 的新机制来学习 Smooth Subtask 策略。为了创建适用于各种对象形状的通用操作策略,RMA2提出了一个两阶段训练框架,在 PPO 中有一个额外的适配器训练阶段,增强了策略在不同对象的鲁棒性。受基于模型的 RL 的启发、SAM-RL提出了一种传感感知架构,该架构从不同的角度渲染图像,并通过将这些生成的图像与实际的原始观察结果对齐来完善学习的世界模型,展示了显着的真实世界性能。Mandlekar 等人探索了离线 RL 中各种设计选择的影响并公开了他们的数据集以供进一步研究。为了克服RL中探索性挑战,Huang 等人提出了演示导向的 RL,它使用非参数...
Markdown
startTagMisplaced', frame: 'startTagMisplaced', frameset: 'startTagFrameset', tbody: 'startTagMisplaced', td: 'startTagMisplaced', tfoot: 'startTagMisplaced', th: 'startTagMisplaced', thead: 'startTagMisplaced', tr: 'startTagMisplaced', option: 'startTagOptionOptgroup', optgroup: 'startTagOptionOptg...
JavaScript
import regex as re from utils.lang import KanjiUtils class OZK5Utils: @staticmethod def extract_gendai_reading(soup): reading = "" gendai_head = soup.find("GendaiHeadG") if gendai_head: gendai_midashi = gendai_head.find("Gendai見出") ...
Python
: new Date(0), taskOptions: { arrivingUser: 'you', }, } ]); const updateTask = async (task: RTQTask<allTaskOptions>) => { const i = allTasks.findIndex((t) => t.id === task.id); allTasks[i] = task; }; const createQueueEntry = async (queueEntry: RTQQueueEntry) => { queue.push(queueEntry); }; con...
Typescript
tq = TQueue.new<Int>() atomically { stm { tq.read().let { true } } orElse { false } } shouldBe false } "reading from a queue should remove that value" { val tq = TQueue.new<Int>() atomically { tq.write(10); tq.write(20) } atomically { tq.read() } shouldBe 10 atomical...
Kotlin
{ this.setBackgroundAnimator(creator) } fun <T : DialogLayer> T.backgroundView(view: View) = this.apply { this.setBackgroundView(view) } fun <T : DialogLayer> T.backgroundView(@LayoutRes layoutId: Int) = this.apply { this.setBackgroundView(layoutId) } fun <T : DialogLayer> T.backgroundBitmap(bitmap: Bitm...
Kotlin
-- 古战场 去 3沉船 mapDoor5_7 = {} mapDoor5_7[1] = {-1.7305372953414917, 207.7891387939453, -66.75567626953125} -- 3宫殿 去 3 mapDoor6_1 = {} mapDoor6_1[1] = {-42.6407585144043, 38.3612060546875, -98.20526123046875} -- 3底层 去 3隐藏图 mapDoor6_1[2] = {-0.1043953374, 214.60452270508, 2.59286475182} -- 3底层 去 3高层 mapDoor6_2 = {} map...
Lua
0--BackgroundColor); } .pf-c-drawer__content > .pf-c-drawer__body { padding: var(--pf-c-drawer__content--child--PaddingTop) var(--pf-c-drawer__content--child--PaddingRight) var(--pf-c-drawer__content--child--PaddingBottom) var(--pf-c-drawer__content--child--PaddingLeft); } .pf-c-drawer__panel { position: relative;...
CSS
=y,(y|0)>=(b|0)))return Q=0,ue=W,Q|0;switch(S=y+1|0,_[j>>2]=0,T=Ce(m,g,2,j,z)|0,T|0){case 9:{L=9;break}case 0:{T=z,T=de(_[T>>2]|0,_[T+4>>2]|0,b,l,u,c,d,S)|0,T||(L=9);break}}e:do if((L|0)==9){switch(_[j>>2]=0,T=Ce(m,g,3,j,z)|0,T|0){case 9:break;case 0:{if(T=z,T=de(_[T>>2]|0,_[T+4>>2]|0,b,l,u,c,d,S)|0,T|0)break e;break}d...
JavaScript
is_boiling = True stri_count = 5 total_actions = stri_count + is_boiling # upcasting print(f"Total actions: {total_actions}") #returns 5 + 1 = 6 milk_present = 0 # no milk print(f"Is there milk? {bool(milk_present)}") water_hot = True tea_added = True can_server = water_hot and tea_added print(f"Can serve chai? {can...
Python
06/2019] / acuxin * @param model * @param type **/ private static getLabelObject(model: string, type: string): string { var labelObjetc: string; switch (type) { case 'columnsTable': return `${model}Columns`; default: return "undefined"; }; } /** * Función que i...
Typescript
val ptr: Int /** * @param index WebIDL type: unsigned long * @return WebIDL type: [PxShape] */ fun get(index: Int): PxShape /** * @param index WebIDL type: unsigned long * @param value WebIDL type: [PxShapePtr] (Const, Ref) */ fun set(index: Int, value: PxShapePtr) ...
Kotlin
pplication.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager runRetry(3) { am.runningAppProcesses.firstOrNull { it.pid == mPid }?.processName } ?: "unknown" } val procType: Int by lazy { val parts = procName.split(":") if (parts.size == 1) { re...
Kotlin
boolean => { // Return true when the string passed in is a valid sid format // and the sid passes the Luhn algorithm test // regex should cover if personalid is in correct length, century and format if (/^(19|20)?(\d{6}([-])\d{4}|(?!19|20)\d{10})/.test(sid)) { Logger.info(`${sid} passes regex check`) ...
Typescript
ect*, JSC::JSValue); JSC::JSValue jsHTMLMarqueeElementScrollAmount(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); void setJSHTMLMarqueeElementScrollAmount(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); JSC::JSValue jsHTMLMarqueeElementScrollDelay(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); void se...
C
></svg>'); } .ils_sidebar_header > div > a::before { @apply mt-1 mr-2; content: url('data:image/svg+xml,<svg class="sidebar-icon-header ___12fm75w_v8ls9a0 f1w7gpdv fez10in fg4l7m0" aria-hidden="true" width="1em" height="1em" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M4.35 4.33a.48.48 0 0 1 .6...
CSS
ate' in='SourceAlpha' result='shadowSpreadOuter1'/%3E%3CfeOffset dy='1' in='shadowSpreadOuter1' result='shadowOffsetOuter1'/%3E%3CfeGaussianBlur stdDeviation='1' in='shadowOffsetOuter1' result='shadowBlurOuter1'/%3E%3CfeComposite in='shadowBlurOuter1' in2='SourceAlpha' operator='out' result='shadowBlurOuter1'/%3E%3CfeC...
CSS
t#float ret (return value: float) -------------------------------- -- brief Set the center position of ripple effect.<br> -- param position The center position of ripple effect will be set. -- @function [parent=#Ripple3D] setPosition -- @param self -- @param #vec2_table position -- @return Ripple3D#Ripple3D s...
Lua
v) } } s.Todo = new_Todo } } func Conds2SMTSet(vecCond []stCond) (result *StSMTSet) { result = createEmptySMTSet() if len(vecCond) == 0 { result.Status = "Unhealthy" return } else { result.Status = "Generating" } for i, _ := range vecCond { cond := vecCond[len(vecCond)-1-i] // need to do this fro...
Go
tomPrefix: String? = null ) = Generic( ::getByte, ::putByte, reader, writer, name, customPrefix) package twitter4j_v2_support_example import twitter4j.* import twitter4j.conf.ConfigurationBuilder fun main(@Suppress("UNUSED_PARAMETER") args: Array<String>) { //...
Kotlin
m-s-inner .cm-number { color: #caa9fa; } #write .cm-s-inner .cm-qualifier, #write .cm-s-inner .cm-string, #write .cm-s-inner .cm-string-2, #write .cm-s-inner .cm-builtin { color: #f4f99d; } #write .cm-s-inner .cm-attribute { color: #f4f99d; } #write .cm-s-inner .cm-operator { color: #920448; } #write .cm-s-inne...
CSS
ak}}else a=0}else a=0}else{c=+p[f+24>>3];if(+p[f>>3]<=n?!(+p[f+8>>3]<=q?!(n<=+p[f+16>>3]):1):0)a=q<=c&1;else a=0}while(0);r=w;return a|0}function xA(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=By(72)|0;m=k[(k[a+8>>2]|0)+104>>2]|0;l=0;f=1...
JavaScript
\xa0]*سموئ[يی]ل|Sam)|(?:1\\.|۱)(?:(?:۔سموا|\\-?سموئ)ی|[\\s\\xa0]*سموئ[يی])ل))(?:(?=[\\d\\s\\xa0.:,;\\x1e\\x1f&\\(\\)\\uff08\\uff09\\[\\]/"'\\*=~\\-\\u2013\\u2014])|$)`, "gi") }, { osis: ["2Kgs"], regexp: new RegExp(`(^|[^0-9A-Za-zªµºÀ-ÖØ-öø-ɏؐ-ؚؠ-ٟٮ-ۓە-ۜ۟-۪ۨ-ۯۺ-ۼۿݐ-ݿࢠࢢ-ࢬࣤ-ࣾḀ-ỿⱠ-ⱿꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꟿﭐ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ...
Typescript
Price")) } panic(fmt.Errorf("message band.feeds.v1beta1.ValidatorPrice does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // /...
Go
eselect-chip .p-treeselect-token .p-treeselect-token-icon { font-size: 75%; } .p-input-filled .p-treeselect.p-invalid { border-color: transparent; background-image: linear-gradient(to bottom, #B00020, #B00020), linear-gradient(to bottom, #B00020, #B00020); } .p-input-filled .p-treeselect.p-invalid:n...
CSS
미합중국 정부와 같은 기존 제도의 구조에서 볼 수 있듯이 잘못된 의사 결정을 억제하고 한 그룹이 이기적인 이익을 위해 시스템 전체를 가로채는 것을 방지하려면 서로 다른 참여자 간의 힘의 균형이 필요합니다. 이 개념을 _견제와 균형_이라고 합니다. ![미국 정부는 견제와 균형을 구현하는 시스템의 예입니다.](./congress.png) 미국 정부와 마찬가지로 견제와 균형은 작업 증명 블록체인의 필수 기능이며 세 개의 주요 권력 그룹이 존재하고 서로의 권력이 균형을 이룹니다. | 그룹 | 역할 | 거부권 | | --- |...
Markdown
Toggle { isEnable: boolean; enable: () => void; disable: () => void; toggle: () => void; } const useToggle = (value = false): UseToggle => { const [isEnable, setIsEnable] = useState(value); useEffect(() => {}, [isEnable]); const enable = useCallback(() => { setIsEnable(true); }, []); const disable = useC...
Typescript
def get_week_day(value: str) -> str: num = int(value) result = "" match num: case 1: result = "Monday" case 2: result = "Tuesday" case 3: result = "Wednesday" case 4: result = "Thursday" case 5: result = "Fri...
Python
2': 3}, ], }; /// Descriptor for `GroupListingType`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List groupListingTypeDescriptor = $convert.base64Decode( 'ChBHcm91cExpc3RpbmdUeXBlEg4KCkFMTF9HUk9VUFMQABINCglNWV9HUk9VUFMQARIUChBSRV' 'FVRVNURURfR1JPVVBTEAISEgoOSU5WSVRFRF9HUk9VUFMQA...
Dart
// Loop through, receiving packets until we have an entire frame. loop { if av_read_frame(context, packet) < 0 { continue; } if (*packet).stream_index != self.videoindex { continue; } let mut got_picture: c_int = 0; ...
Rust
= ia64_tpa(init_hldlr_ptr_monarch->fp); ia64_mc_info.imi_monarch_init_handler_size = 0; ia64_mc_info.imi_slave_init_handler = ia64_tpa(init_hldlr_ptr_slave->fp); ia64_mc_info.imi_slave_init_handler_size = 0; IA64_MCA_DEBUG("%s: OS INIT handler at %lx\n", __func__, ia64_mc_info.imi_monarch_init_handler); ...
C
erfect and tostring(game.PERFECT_ROUND_BONUS) or "0" local rows = { { "" }, { "Score", score }, { "" }, { "Time Bonus", time_bonus }, { "Perfect Round", perfect_bonus, }, } local l_max = 0 local r_max = 0 for _, row in ipairs(rows) do l_max = math.max(l_max, #(row[1] ...
Lua
= console_buffer; for (i = 0; i < ip->rows * ip->cols; i++) { *fb++ = *buffer++; *fb++; } } } void cv_cursor(ip, flag) struct ite_softc *ip; int flag; { volatile caddr_t ba = ip->grf->g_regkva; switch (flag) { case DRAW_CURSOR: /*WCrt(ba, CRT_ID_CURSOR_START, & ~0x20); */ case MOVE_CURSOR...
C
; JS("void", "#[#] = #", this, index, value); } List<int> sublist(int start, [int end]) { end = _checkSublistArguments(start, end, length); var source = JS('Uint16List', '#.subarray(#, #)', this, start, end) .._setCachedLength(); return _create1(source); } static Uint16List _create1(ar...
Dart
["GS"] = 1241.875, ["HEAL"] = 0, ["HIT"] = 0, ["HP"] = 930, ["HPS"] = 755, ["ID"] = 19, ["INT"] = 123, ["LFS"] = 31, ["MCRIT"] = 0, ["MIMU"] = 0, ["MP"] = 0, ["MPS"] = 260, ["MR"] = 10, ["MRI"] = 0, ["Name"] = "SNK", ["NameRank"] ...
Lua
exception = (Exception_t *)e.ex; goto FINALLY_005e; } FINALLY_005e: { // begin finally (depth: 1) Enumerator_Dispose_m9FE451117A551A3AD97A0FC27C1C159B551B25F3((Enumerator_tF3C2A3B3C8EE5956E26FA5AE4C14FC7655975628 *)(&V_3), /*hidden argument*/Enumerator_Dispose_m9FE451117A551A3AD97A0FC27C1C159B551B25F3_RuntimeMet...
C++
Ax_u[ii] += tau*delta_Ax_u[ii]; } } } else { /* print a stepsize warning if stepsize is zero */ #ifndef __SUPPRESSANYOUTPUT__ snprintf( messageString,MAX_STRING_LENGTH,"Stepsize is %.15e",tau ); getGlobalMessageHandler( )->throwWarning( RET_STEPSIZE,messageString,__FUNC__,__FILE__,__LINE__,VS_VISIB...
C++
fun setX(x: Double) = apply { particleEntity.setPosition(x, getY(), getZ()) } fun setY(y: Double) = apply { particleEntity.setPosition(getX(), y, getZ()) } fun setZ(z: Double) = apply { particleEntity.setPosition(getX(), getY(), z) } fun scale(scale: Float) = apply { particleEntity.multipleParticleScaleB...
Kotlin
case Mips::BLTZ_MM: case Mips::BGEZ_MM: case Mips::BLEZ_MM: case Mips::BGTZ_MM: case Mips::JRC16_MM: case Mips::JALS_MM: case Mips::JALRS_MM: case Mips::JALRS16_MM: case Mips::BGEZALS_MM: case Mips::BLTZALS_MM: return true; case Mips::J_MM: return !Inst.getOperan...
C++
], [3, 4]])).toEqual([1, [1, 1], 3, 4]); expect(Rhythm.removePulse([[0, 0, 0, 4], [1, 2, 3, 4]])).toEqual([0, 0, 0, 4, 1, 2, 3, 4]); }) describe('new syntax', () => { /* test('flat', () => { expect(Rhythm.flat(['C'])).toEqual([{ value: 'C', path: [[0, 1, 1]] }]); expect( Rhythm.flat([{ body: ['C'],...
Typescript
Id { pub fn new() -> Self { Self::default() } } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RemoteServiceGroup { pub browser: BrowserConfig, pub remaining_sessions: u32, } #[derive(Debug, Serialize, Deserialize)] pub struct RemoteNodeCreate { #[serde(default)] name: Stri...
Rust
: #3a7ead !important; } margin-top: 0; margin-bottom: 0.5em; // avoid a thick line since this should be used under another fieldset border-top: 0; text-align: $right; float: none; clear: both; -webkit-border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 5px; } fiel...
CSS
iesCompanion.insert( description: 'description', priority: const Value(CategoryPriority.medium), )); verify(executor.runSelect( 'INSERT INTO "categories" ("desc", "priority") VALUES (?, ?) RETURNING *', ['description', 1], )); }); group('insert from select', () { ...
Dart
gins.googleServices) alias(libs.plugins.compose.compiler) } val keystorePropertiesFile = rootProject.file("keystore.properties") val keystoreProperties = Properties() try { keystoreProperties.load(FileInputStream(keystorePropertiesFile)) } catch(e: Exception) { } val versionMajor = 1 val versionMinor = 1 va...
Kotlin
/* Source File : WrittenFontRepresentation.h Copyright 2011 Gal Kahana PDFWriter 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 ...
C
err: LowerError) -> ParserError { ParserError::Lower { source: err } } } impl From<ParseError> for ParserError { fn from(err: ParseError) -> ParserError { use lalrpop_util::ParseError as E; match err { E::InvalidToken { location } => ParserError::InvalidToken { ...
Rust
Microsoft Corporation * All rights reserved. * MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to ...
Typescript
mmoningSkillOverCap(pet) local resm = applyPlayerResistance(pet, -1, target, dINT, bonus, tpz.magic.element.ICE) if (resm < 0.5) then skill:setMsg(tpz.msg.basic.JA_MISS_2) -- resist message return tpz.effect.SLEEP_I end duration = duration * resm if (target:hasImmunity(1) or hasSleep...
Lua
ecipient export function findCertificate(recipient: string): CertificateInfo | null { // console.log("trying to find cert"); if (certificates.contains(recipient)) { // console.log( `getting cert for ${recipient}, verified by: ${certificates.getSome(recipient).verifier}`) return certificates.getSome(recipien...
Typescript
伦理 | 在人工智能研究和开发中应该重视哪些伦理问题?| | 图像识别 | 如何使用卷积神经网络进行图像分类? | | 深度学习 | 深度学习模型训练时,如何防止过拟合? | | 强化学习 | 强化学习算法有哪些常见的应用场景? | | 数据挖掘 | 什么是关联规则挖掘?在实际中如何利用它? | | 语音识别 | 如何使用深度学习方法进行语音识别? | | 机器学习算法选择 | 对于不同的数据类型,我们应当使用哪种机器学习算法? | | 神经网络 | 神经网络的结构和参数调整对其性能有哪些影响? | | Open Generation | 写一篇科幻小说,描述一个具有智能的机器人与人类之间的互动。 | | Classificatio...
Markdown
* UP) self.play(MoveAlongPath(moving_dot, arc_ab, rate_func= smoothstep, run_time= 1)) self.play(MoveAlongPath(moving_dot, arc_bc, rate_func= smoothstep, run_time= 0.75)) self.play(MoveAlongPath(moving_dot, arc_cd, rate_func= smoothstep, run_time= 1)) self....
Python
lic: static class UClass* StaticClass() { return StaticClassImpl<"ProjectileObjectPool">(); } static class UProjectileObjectPool* GetDefaultObj() { return GetDefaultObjImpl<UProjectileObjectPool>(); } }; static_assert(alignof(UProjectileObjectPool) == 0x000008, "Wrong alignment on UProjectileObjectPool"); sta...
C++
-20.4 36.5l-1.3-1.6s8.1-38.2 6.4-47.6c-1.6-9.4-10.5-7.5-10.5-7.5s-11.3-1.3-14.2 5.9-13.7 55.3-15 70.7c0 0-28.2 20.2-46.8 20.4-18.5.3-16.7-11.8-16.7-11.8s68-23.3 49.4-69.2c-8.3-11.8-18-15.5-31.7-15.3-13.7.3-30.3 8.6-41.3 33.3-5.3 11.8-6.8 23-7.8 31.5 0 0-12.3 2.4-18.8-2.9s-10 0-10 0-11.2 14-.1 18.3 28.1 6.1 28.1 6.1c1.6...
JavaScript
{ margin-left: 25%; } .offset-xl-4 { margin-left: 33.33333333%; } .offset-xl-5 { margin-left: 41.66666667%; } .offset-xl-6 { margin-left: 50%; } .offset-xl-7 { margin-left: 58.33333333%; } .offset-xl-8 { margin-left: 66.66666667%; } .offset-xl-9 { margin-left: 75%; ...
CSS
lve` という名前の関数が定義されていなければなりません。 - `solve` 関数のそれぞれの引数の型は `int`, `List[int]`, `List[List[int]]`, `List[List[List[int]]]`, ... のいずれかでなければなりません。 - `solve` 関数の戻り値の型は `int`, `List[int]`, `List[List[int]]`, `List[List[List[int]]]`, ... のいずれか、あるいはそれらからなる `Tuple` でなければなりません。 ### `main` function `main` 関数は入出力フォーマットを指定するための特殊な関数...
Markdown
.Style.Alignment.WrapText = true; cell.Style.Alignment.Vertical = XLAlignmentVerticalValues.Center; cell.Style.Font.Bold = true; cell.Style.Font.FontColor = XLColor.DarkGray; //cell.Style.Font.FontName = strFontName; ...
C#
nTextFontSize = self:GetValue() DBM.Nameplate:UpdateIconOptions() end) local textEnable = style:CreateCheckButton(L.Enable, true, nil, "NPIconTextEnabled") textEnable:SetPoint("TOPLEFT", TextFontStyleDropDown, "TOPLEFT", 20, -35) local iconTextMaxLenSlider = style:CreateSlider(L.NPIcon_MaxTextLen, 3, 40, 1, 150) ico...
Lua
ue=ip_addr, }) db_add('port', { ip_addr_id=ip_addr_id, ip_addr=ip_addr, protocol='tcp', port=4444, status='open', }) end
Lua
hit_norm[0] = nx hit_norm[1] = ny hit_norm[2] = nz } return b } //Check edge cases min_step = +(EPSILON * (1.0 + t)) if(t > min_step) { ex = nx < 0 ? fx <= min_step : fx >= 1.0 - min_step ey = ny < 0 ? fy <= min_step : fy >= 1.0 - min_step ez = nz < ...
JavaScript