content
stringlengths
2
6.21k
label
stringclasses
16 values
F //# MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810 // //# ATI_future_use: 0x8811-0x8813 // //# VERSION_3_0 enum: //# ARB_texture_float enum: //# ATI_texture_float enum: //# RGBA32F = 0x8814 # 3.0 //# RGBA32F_ARB = 0x8814 //# RGBA_FLOAT32_ATI = 0x8814 //# RGB32F = 0x8815 # 3.0 //# RGB32F_ARB = ...
Kotlin
Id: %w", err) } return } func (s *queueJSONStatements) DeleteQueueJSON( ctx context.Context, txn *sql.Tx, nids []int64, ) error { deleteSQL := strings.Replace(deleteJSONSQL, "($1)", sqlutil.QueryVariadic(len(nids)), 1) deleteStmt, err := txn.Prepare(deleteSQL) if err != nil { return fmt.Errorf("s.deleteQueueJS...
Go
#ifndef STATUS_GROUP_H #define STATUS_GROUP_H #include <QObject> #define STATUS_GROUPS Status_Group::instance() class Status_Group : public QObject { Q_OBJECT Q_PROPERTY(bool Is_Accepting_Create_Episodes READ Is_Accepting_Create_Episodes WRITE setIs_Accepting_Create_Episodes FINAL) Q_PROPERTY(boo...
C
inParseTree, depth: Int = 0): StringBuilder = builder.apply { node.children.forEach { child -> when (child.type) { KotlinParseTreeNodeType.RULE -> append(" ".repeat(depth) + child.name + ls) KotlinParseTreeNodeType.TERMINAL -> append(" ".repeat...
Kotlin
) } val c = Array(n) { IntArray(m) } var p: List<P2> = emptyList() val dim = 5 val label = JLabel("Start") val canvas = object : JPanel() { init { preferredSize = Dimension(dim * m, dim * n) } override fun paintComponent(g: Graphics) { g.color = C...
Kotlin
ex_metadata = next_index; parent_block = free_block; jump_index = find_free_index(free_block); if (jump_index == U_NUM_JUMP_DISTANCES) { resizeAndTryAgain(); // Overflow: resize and try again bfirst = true; goto loop; ...
C++
ew = ctrl; this.addChild(this.mHeadCtrlView); }else{ if(this.mTailCtrlView == null){ this.mTailCtrlView = this.mTailCtrlViewNew } this.mTailCtrlView.setNextControl(ctrl); ctrl.setLastControl(this.mTailCtrlVie...
Typescript
// define tail tracking todo1Title = todo.title }) autorun(autoFn) expect(autoFn).toHaveBeenCalledTimes(1) todo1.title = 'change' expect(autoFn).toHaveBeenCalledTimes(2) })import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'groupBy' }) export class GroupByPipe im...
Typescript
} package com.dream.flex.mapper; import com.dream.flex.def.DeleteDef; import com.dream.flex.def.InsertDef; import com.dream.flex.def.QueryDef; import com.dream.flex.def.UpdateDef; import com.dream.system.config.Page; import com.dream.util.tree.Tree; import java.util.List; /** * 链式操作接口 */ public interface FlexMappe...
Java
r height="' + tdHeight + '">'; } } if (cols % charsPerRow > 0) { var padd = charsPerRow - (cols % charsPerRow); for (var i=0; i<padd-1; i++) html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap">&nbsp;</td>'; } html += '</tr></table></div>'; html = html.replace(/<tr height="20"...
JavaScript
ABORTED: ignore(); break; case TxState.PREPARED: if (primary) ignore(); // In case when remote tx has updated the current state before. else invalid(currState); ...
Java
id: 12, groupId: 3 }, { name: 'John', id: 13, groupId: 4 }, { name: 'Joao', id: 14, groupId: 4 }, { name: 'Jean', id: 15, groupId: 4 }, { name: 'Gerard', id: 16, groupId: 4 } ]; const textList = [ { id: 1, groupId: 1, title: 'ex) タスク量が多い', text: '現状のタスク範囲拡大' }, { id: 2, groupId: 2, title: 'ex) 自動化を行う', te...
Typescript
9 194.4l0 101.4-28.3 0 0 120.5-77.1 0 0-120.4-28.3 0 0-101.5c0-4.4 1.6-8.2 4.6-11.3 3.1-3.1 6.9-4.7 11.3-4.7l101.9 0c4.1 0 7.8 1.6 11.1 4.7 3.1 3.2 4.8 6.9 4.8 11.3zm-32.5-64.5a34.5 34.5 0 1 1 -69 .8 34.5 34.5 0 1 1 69-.8zM255.6 8C397.4 8 504 118.1 504 256 504 403.1 385.5 504 255.6 504 121.6 504 8 394.5 8 256 8 123.1 1...
JavaScript
Marker _TableRow).() -> Unit): TableRow { return ankoView(`$$Anko$Factories$Sdk28ViewGroup`.TABLE_ROW, theme = 0) { init() } } fun ViewManager.themedTableRow(theme: Int = 0): TableRow = themedTableRow(theme) {} inline fun ViewManager.themedTableRow( theme: Int = 0, init: (@AnkoViewDslMarker _TableRow)...
Kotlin
y().u8() - 1, source_pos.x().u8() - 1, source_pos.y().u8() + 1, source_pos.x().u8() + 1, true, ); // let objs = js_sys::Array::from(&area).map(|x: Vec<StructureObject>| x.map().collect()); } use windows::core::Result; use windows::Win32::System::Com::{ CoInitializeEx, CoUnin...
Rust
58 13002296 */ lhu $v0, 0x13($s1) /* 5455F24 8008695C 070023A6 */ sh $v1, 0x7($s1) /* 5455F28 80086960 12400000 */ mflo $t0 /* 5455F2C 80086964 031B0800 */ sra $v1, $t0, 12 /* 5455F30 80086968 21104300 */ addu $v0, $v0, $v1 /* 5455F34 8008696C 0B1D0208 */ j .Llevel_61_80...
Assembly
setSlot(FIELD_TYPES_, it, fieldUnion) } setSlot(HASH_OR_ZERO, 0) } } // The variants disagree, so do it the hard(er) way. val narrowedFields = variant.allFields.setIntersectionCanDestroy( otherVariant.allFields, false) val resultVariant = variantForFields(narrowedFields) val mySlotMap = variant...
Kotlin
/* SPDX-License-Identifier: MIT */ #include "cpu_regs.h" .text .globl memcpy128 .type memcpy128, @function memcpy128: ands x2, x2, #~15 beq 2f 1: ldp x3, x4, [x1], #16 stp x3, x4, [x0], #16 subs x2, x2, #16 bne 1b 2: ret .globl memcpy64 .type memcpy64, @function memcpy...
Assembly
({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData( useMaterial3: true, ), home: const AnalogClockDemo(), ); } } class AnalogClockDemo extends StatefulWidget { const AnalogClockDemo({super.key}); @override ...
Dart
0] ADD R2, R1 STREX R3, R2, [R0] CMP R3, #0 BNE atomic_increment_u32 MOV R0, R2 BX LR #elif __aarch64__ LDXR W2, [X0] ADD W2, W2, W1 STXR W3, W2, [X0] CBNZ W3, atomic_increment_u32 MOV W0, W2 RET #endif .endfunc .global atomic_decrement_if_positive_i32 .func atomic_decrement_if_positive_i32 ....
Assembly
new_ncols_P_offd); } hypre_TFree(col_map_offd_P, HYPRE_MEMORY_HOST); hypre_ParCSRMatrixColMapOffd(P) = new_col_map_offd; hypre_CSRMatrixNumCols(P_offd) = new_ncols_P_offd; hypre_TFree(map, HYPRE_MEMORY_HOST); } } hypre_MatvecCommPkgCreate(P); ...
C
rt, found) }(i, uint64(ethash.rand.Int63())) } // Wait until sealing is terminated or a nonce is found var result *types.Block select { case <-stop: // Outside abort, stop all miner threads close(abort) case result = <-found: // One of the threads found a block, abort all others close(abort) case <-eth...
Go
Light", nil, nil}, [5669] = {"<NYI> A Blessing of Light", nil, {"스톰윈드에 있는 대여사제 로레나와 대화해야 합니다."}}, [5670] = {"<NYI> A Blessing of Light", nil, {"스톰윈드에 있는 대여사제 로레나와 대화해야 합니다."}}, [5671] = {"<NYI> A Blessing of Light", nil, {"스톰윈드에 있는 대여사제 로레나와 대화해야 합니다."}}, [5672] = {"엘룬의 은총", nil, nil}, [5673] = {"엘룬의 은총", nil, {"다르나서스에...
Lua
DAYNAME DAYOFMONTH DAYOFWEEK DEGREES E EXP FIND_IN_SET FLOOR FNV_HASH FROM_UNIXTIME FROM_UTC_TIMESTAMP GREATEST GROUP_CONCAT HEX HOUR IF INITCAP INSTR ISNULL LCASE LEAST LENGTH LN LOCATE LOG LOG10 LOG2 LOWER LPAD LTRIM MAX MIN MINUTE MONTH NDV NEGATIVE NOW NVL PARSE_URL PI PMOD POSITIVE POW POWER QUOTIENT RADIANS RAND ...
JavaScript
<<18|t<<12|k<<6|L:(O=i[o++]&63,p=(p&1)<<30|_<<24|t<<18|k<<12|L<<6|O))),p<65536)C+=String.fromCharCode(p);else{var U=p-65536;C+=String.fromCharCode(55296|U>>10,56320|U&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(i){return UTF8ArrayToString(HEAPU8,i)}Module.UTF8ToString=UTF8ToString;function ...
JavaScript
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
C
D[2]]=O(M,G,l);end;elseif K<=56 then if K==55 then B[D[2]]=J[D[3]];else B[D[2]]();G=A;end;elseif K<=57 then B[D[2]]=O(V[D[3]],nil,l);elseif K>58 then B[D[2]]=B[D[3]][B[D[5]]];else do return end;end;elseif K<=69 then if K<=64 then if K<=61 then if K>60 then l[F[D[3]]]=B[D[2]];C=C+1;D=E[C];B[D[2]]=(D[3]~=0);C=C+1;D=E[C];...
Lua
t.forwardSlip; //print(slip); } amt = slip.magnitude; //print(amt); } private IEnumerator emitter() { while (true) { while (emitTimer < 1) { yield return null; ...
C#
string.format("Waiting for %s...", self.game_name)) -- show GUI self.addr_list.getMemoryRecordByID(CT_MEMORY_RECORDS['GUI_SCRIPT']).Active = true self:version_check() local timer_callback = function() self:auto_attach_to_process() end self.logger:info("Searching fo
Lua
nt'] = "float specularStrength;\n\n#ifdef USE_SPECULARMAP\n\n vec4 texelSpecular = texture2D( specularMap, vUv );\n specularStrength = texelSpecular.r;\n\n#else\n\n specularStrength = 1.0;\n\n#endif"; // File:src/renderers/shaders/ShaderChunk/fog_fragment.glsl THREE.ShaderChunk[ 'fog_fragment'] = "#ifdef USE_FOG\n\n ...
JavaScript
).ReplyTok, hash) }) t.write(toaddr, req.name(), packet) return <-errc } func (t *udp) waitping(from NodeID) error { return <-t.pending(from, pingPacket, func(interface{}) bool { return true }) } // findnode sends a findnode request to the given node and waits until // the node has sent up to k neighbors. func (t...
Go
(colour1, colour2, ratio):\n r1, r2 = int(colour1[1:3], 16), int(colour2[1:3], 16)\n g1, g2 = int(colour1[3:5], 16), int(colour2[3:5], 16)\n b1, b2 = int(colour1[5:7], 16), int(colour2[5:7], 16)\n ratio = min(1, max(0, ratio))\n r = round(r1 * (1 - ratio) + r2 * ratio)\n g = round(g1 * (1 - ratio) + g2 * ratio)\n...
JavaScript
.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableMap; import java.io.IOException; import java.util.HashMap; import java.util.M...
Java
}{ {[]geo.Point{ {Lon: -80.881, Lat: 35.282}, {Lon: -80.858, Lat: 35.281}, {Lon: -80.864, Lat: 35.270}, }, "loc", []string{"k", "l"}}, {[]geo.Point{ {Lon: -82.467, Lat: 36.356}, {Lon: -78.127, Lat: 36.321}, {Lon: -80.555, Lat: 32.932}, {Lon: -84.807, Lat: 33.111}, }, "loc", []string{"k", "...
Go
ackGroup::SharedPtr PongNode::get_low_prio_callback_group() { return low_prio_callback_group_; // the second callback group created in the ctor. } void PongNode::high_ping_received(const std_msgs::msg::Int32::ConstSharedPtr msg) { std::chrono::nanoseconds busyloop = get_nanos_from_secs_parameter(this, "high_busyl...
C++
3591%;}.d2-d5 [class*=" d4"],.d2-d5 [class^=d4]{margin-left:43.47622394%;}.d2-d5 [class*=" d3"],.d2-d5 [class^=d3]{margin-left:21.73811197%;}.d3-d5 [class*=" d5"],.d3-d5 [class^=d5]{margin-left:55.55222987%;}.d3-d5 [class*=" d4"],.d3-d5 [class^=d4]{margin-left:27.77611493%;}.d4-d5 [class*=" d5"],.d4-d5 [class^=d5]{marg...
CSS
.NewDirstore(storageDirectory))) } kms.attestationCABaseURL = u.Get("attestation-ca-url") kms.attestationCARootFile = u.Get("attestation-ca-root") kms.attestationCAInsecure = u.GetBool("attestation-ca-insecure") kms.permanentIdentifier = u.Get("permanent-identifier") // TODO(hs): determine if this is needed ...
Go
_DebugUtils_C_PrintStr, Value) == 0x000010, "Member 'BPFL_DebugUtils_C_PrintStr::Value' has a wrong offset!"); static_assert(offsetof(BPFL_DebugUtils_C_PrintStr, TextColor) == 0x000020, "Member 'BPFL_DebugUtils_C_PrintStr::TextColor' has a wrong offset!"); static_assert(offsetof(BPFL_DebugUtils_C_PrintStr, __WorldConte...
C++
r1, r1, #0x0 orr r0, r0, #0x0 bx lr @ 0x20a3f9c .word 0x7ff @ 0x20a3f9c .arm Function_20a3fa0: @ 20a3fa0 :arm ldr r0, [r0, #0x8] bx lr @ 0x20a3fa8 .arm Function_20a3fa8: @ 20a3fa8 :arm ldr r1, [r0, #0x8] ldr r0, [r0, #0x4] orr r1, r1, #0x0 orr r0, r0, #0x0 bx l...
Assembly
SessionType.opening: 'opening', SpecialSessionType.keynote: 'keynote', SpecialSessionType.lunch: 'lunch', SpecialSessionType.preparation: 'preparation', SpecialSessionType.closing: 'closing', SpecialSessionType.party: 'party', }; // GENERATED CODE - DO NOT MODIFY BY HAND // ignore_for_file: type=lint, duplic...
Dart
.625rem; } h3 { --pico-font-size: 1.5rem; --pico-line-height: 1.175; --pico-typography-spacing-top: 2.25rem; } h4 { --pico-font-size: 1.25rem; --pico-line-height: 1.2; --pico-typography-spacing-top: 1.874rem; } h5 { --pico-font-size: 1.125rem; --pico-line-height: 1.225; --pico-typography-spacing-to...
CSS
get_binary, (void *(*)(char *))get_salt, { NULL }, fmt_default_source, { fmt_default_binary_hash_0, fmt_default_binary_hash_1, fmt_default_binary_hash_2, fmt_default_binary_hash_3, fmt_default_binary_hash_4, fmt_default_binary_hash_5, fmt_default_binary_hash_6 }, salt_hash, NULL, ...
C
its appropriate location. if (leftCompare > 0 && rightCompare < 0) { // The tag is smaller than both its neighbors. Must shift it left. goRight = false; } else if (leftCompare < 0 && rightCompare > 0) { // The tag is bigger than both its neighbors. Must shift it right. goRight = true; } } ...
Dart
erface GroupSelected { groupId: number; groupName: string; isAutoGroup: boolean; participantType: number; } export interface GroupManipulated extends GroupSelected { status: string; editStatus: boolean; } export interface EmployeeState { // list of employees employees: Array<Employee>; // department ...
Typescript
29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) #define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44)...
C++
[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}@media (forced-colors:active) {[ty...
CSS
P // in a DSCP environment this should be 40 (0x28, or AF11), per RFC-4594, // Section 4.8 "High-Throughput Data Service Class", and 80 (0x50, or AF22) // per Section 4.7 "Low-Latency Data Service Class". pref("network.ftp.data.qos", 0); pref("network.ftp.control.qos", 0); // </http> // <ws>: WebSocket pref("network....
JavaScript
1, 1 2.4 1))")] [TestCase("MULTIPOINT EMPTY")] [TestCase("MULTIPOINT Z EMPTY")] [TestCase("MULTILINESTRING EMPTY")] [TestCase("MULTILINESTRING Z EMPTY")] [TestCase("MULTIPOLYGON EMPTY")] [TestCase("MULTIPOLYGON Z EMPTY")] public void TestWriteReadWkt(string wkt) ...
C#
Zone import kotlinx.datetime.todayIn fun getDayHeader(date: LocalDate): String { val today = Clock.System.todayIn(TimeZone.currentSystemDefault()) val locale = getCurrentLocale() val daysDiff = today.toEpochDays() - date.toEpochDays() val weeksDiff = daysDiff / 7 val monthsDiff = (today.year - dat...
Kotlin
are `PRIMARY` and `ID` . /// </summary> public readonly Pulumi.AwsNative.QuickSight.TopicPropertyRole? PropertyRole; /// <summary> /// The property usage. Valid values for this structure are `INHERIT` , `DIMENSION` , and `MEASURE` . /// </summary> public readonly Pulumi.A...
C#
using ChartJs.Blazor.Common; using ChartJs.Blazor.LineChart; using System; using System.Collections.Generic; using System.Text; using Xunit; namespace ChartJs.Blazor.Tests { public partial class ClippingTests { [Fact] public void Equals_SameAll_ReturnsTrue() { // Arrange ...
C#
CreateGaps(true); setLayout(layout); layout.setHorizontalGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup() .addComponent(mHostLabel) .addComponent(morbIdsLabel) .addComponent(mnumLedsLabel) .addComponent(mPortLabel) .addComponent(museOrbSmoothingLabel) ...
Java
* * INPUT: coord -- This is the anchor coordinate. * * * * distance -- This is the distance in pixe...
C++
10")); try (Call call = handle.createCall("SELECT insert_foo_bars(:fooBar)")) { call.bindByType("fooBar", foos, new GenericType<List<FooBarPGType>>() {}) .invoke(); assertThat(handle.createQuery("SELECT get_foo_bars()") .mapTo(FooBarPGType.class) ...
Java
_ADDR = 0x5D; let formaldehyde = 0; let temperature = 0; let relative_humidity = 0; init(); function read_word(repeat = false) { let value = pins.i2cReadNumber(SFA30_I2C_ADDR, NumberFormat.UInt16BE, repeat); pins.i2cReadNumber(SFA30_I2C_ADDR, NumberFormat.UInt8BE, repeat); ...
Typescript
YPEKIND.TKIND_MODULE, /// <summary> /// [TKIND_INTERFACE] /// </summary> Interface = TYPEKIND.TKIND_INTERFACE, /// <summary> /// [TKIND_DISPATCH] /// </summary> Dispatch = TYPEKIND.TKIND_DISPATCH, /// <summary> /// [TKIND_COCLASS] /// </summary> CoClass = TYPEKIND.T...
C#
namic _dataDyn)`. These can be used with `dart:convert` to handle JSON: ```dart import '../generated/io/reproto/example.dart'; import 'dart:convert'; void main() { var data = jsonDecode('{"name": "John Smith", "age": 42}'); var person = Person.decode(data); print(person.name); print(person.age); ...
Markdown
::str::from_utf8_unchecked(include_bytes!("js_ops/99_main.js"))} ))); files }; } // DENO_OPS.iter().for_each(|(name, file) | { // js_runtime.execute(name, file).unwrap(); // }); /// This worker is created and used by almost all /// subcommands in Deno executable. /// /// It provides ops available in t...
Rust
符合标准 * RapidJSON 应完全符合 RFC4627/ECMA-404 标准。 * 支持 JSON Pointer (RFC6901). * 支持 JSON Schema Draft v4. * 支持 Unicode 代理对(surrogate pair)。 * 支持空字符(`"\u0000"`)。 * 例如,可以优雅地解析及处理 `["Hello\u0000World"]`。含读写字符串长度的 API。 * 支持可选的放宽语法 * 单行(`// ...`)及多行(`/* ... */`) 注释 (`kParseCommentsFlag`)。 * 在对象和数组结束前含逗号 (`kParseTrailingCommas...
Markdown
_batchNode ) { _transformToBatch = getNodeToParentTransform(); } else { CCASSERT(CocosCast<Sprite>(_parent), "Logic error in Sprite. Parent must be a Sprite"); const Mat4 &nodeToParent = getNodeToParentTransform(); ...
C++
(nullptr != Add(lsCmd, lsSwitches, lsAdd, anBefore)); } } else { lsCmd.Clear(); } // Well, known command was detected. What is next? if (lsNameVal || bTokenOk) { lsAmp.LoadPosFrom(lsSet); if (!((lsCmdLine = NextArg(lsCmdLine, lsAmp)))) { // End of command? User called only "set" witho...
C++
C903-06C8-47bb-9937-A30FEDB4E745}", [7] = "{A4BCC903-06C8-47bb-9937-A30FEDB4E742}", }, -- end of [4] [5] = { [6] = "{A4BCC903-06C8-47bb-9937-A30FEDB4E745}", [2] = "{AIM-9P5-ON-ADAPTER}", [8] = "{A4BCC903-06C8-47bb-9937-A30FEDB4E742...
Lua
elseif (option == 129) then -- Drenched! It Began with a Raindrop. player:startEvent(30025, 0, 0, 0, 0, 0, 0, 236) -- elseif (option == 2) then -- Hasten! In a Jam in Jeuno? -- player:startEvent(CSID, 0, 0, 0, 0, 0, 0, 236) end end player:setLocalVar...
Lua
ique: Express RandOp using mocked random number Evaluation<String, IMap<String, IVector<String>>, IVector<String>, IMap<String, int>, int> mockRandInterpreter(int mockedRandomInt, RandOp op) { if (op is NextInt) { return mockIO.MockM.pure(mockedRandomInt); } else { return mockIO.MockM.raiseError("Unimpleme...
Dart
toolbar.setNavigationOnClickListener { this.onBackPressed() } } override fun onBackPressed() { super.onBackPressed() finish() } protected fun excludeFromRecent() { try { val service = this.getSystemService(Context.ACTIVITY_SERVICE) as ActivityMan...
Kotlin
erQty=null, side=null, lastQty=null, leavesQty=null, avgPrice=null, symbol=null}) { this.writeInfluxPoint('execution', { price, orderQty, lastQty, leavesQty, avgPrice }, { side, symbol }) } position ({price=null, size=null, symbol=null}) { this.writeInfluxPoint('position', { price...
Typescript
'--footer-text', '/path/to/package/footer.html', '--allow-warnings-in-packages', // match package names RegExp(r'^(\w+,)+(\w+)$'), '--exclude-packages', RegExp(r'^(\w+,)+(\w+)$'), '--exclude', // match dart package UR...
Dart
"github.com/tendermint/tendermint/libs/rand" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" types "github.com/akash-network/akash-api/go/node/audit/v1beta3" "github.com/akash-network/node/testutil" "github.com/akash-network/node/x/audit/keeper" ) func TestPro...
Go
_handles: MockHandles, expected_crash_info: fsys::ComponentCrashInfo, mut success_reporter: mpsc::Sender<()>, ) -> Result<(), Error> { let crash_introspect_proxy = mock_handles.connect_to_service::<fsys::CrashIntrospectMarker>()?; let (thread_koid_sender, mut thread_koid_receiver) = mpsc::chann...
Rust
nal[torch.tensor] = None attention_mask: Optional[torch.tensor] = None @dataclass class PackedAVLMRawBatch(AVLMRawBatch): """Sample type for image text raw batch""" position_ids: torch.Tensor = field(default_factory=lambda: torch.empty(0, dtype=torch.float)) packed_seq_params: PackedSeqParams = field...
Python
'dart:convert'; import 'dart:io'; import 'dart:math'; import 'package:flutter/foundation.dart'; import 'package:path/path.dart' as path; import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import '../../assets/assets.dart'; import '../../common/async.dart'; import '../../common/consts.dart'; import '../../common/g...
Dart
"register { a: 192, b: 0, c: 138, d: 0, e: 192, f: 0, h: 126, l: 121, pc: 32363, sp: 57337 }" ); } #[test] fn test_opcode_0X31() { let mem = Rc::new(RefCell::new(FakeMemory::new())); let reg = Register::new_from_debug_string( "register { a: 0, b: 0, c: 19, d: 0, e: 216, f: 160, h: 1, l: 77, pc:...
Rust
s = os.cpu_count() or 4 print(f"\n - 初始化線程池,最大線程數: {max_worker_threads}") print(f" - 開始對 {len(fuku_files)} 套 fuku 進行並行處理...") with ThreadPoolExecutor(max_workers=max_worker_threads) as executor: # 提交所有任務 futures = [executor.submit(process_fuku_task, fuku_file, char_name, all_dirs, all_fil...
Python
uf} 🏞️ 𝙰𝚅𝙴𝙽𝚃𝚄𝚁𝙰 𝙵𝙸𝙽𝙰𝙻𝙸𝚉𝙰𝙳𝙰 ${cmenua}`; for (const lost in rewards.lost) { if (user[lost]) { const total = rewards.lost[lost].getRandom(); user[lost] -= total * 1; if (total) text += `\n${global.rpg.emoticon(lost)} ${total}`; } } text += '\n\n✨ 𝚁𝙴𝙲�...
JavaScript
but key data must be duplicated across both /// the array and bitmap sections of the report //25 bytes //byte 0 - modifiers //byte 1 - reserved 0s //byte 2-7 - array of keycodes - used for boot support //byte 9-24 - bit array of pressed keys #[rustfmt::skip] pub const NKRO_BOOT_KEYBOARD_REPORT_DESCRIPTOR: &[u8] = &[ ...
Rust
#define RETURN_BY_STACK #endif #ifdef F_INTERFACE_GFORT #define RETURN_BY_REGS #endif #ifdef F_INTERFACE_INTEL #define RETURN_BY_STACK #endif #define PROLOGUE \ .explicit; \ .text; \ .align 128; \ .global REALNAME; \ .proc REALNAME; \ REALNAME: #ifdef PROFILE #define PROFCODE \ .data; \ .align 8; \ .LP0:; \...
C
e MetricValue metricValue; private int numClassRound = 0; public boolean hasLabel = false; public int datasetSize; public double[] label; public TreeNode[] correspondingTreeNode; // 记录每一个datapoint对应的Treenode public double[][] pred; // new double[parameter.getNumClass()][datasetSize] pub...
Java
/** * Copyright (c) 2021 OceanBase * OceanBase CE is licensed under Mulan PubL v2. * You can use this software according to the terms and conditions of the Mulan PubL v2. * You may obtain a copy of Mulan PubL v2 at: * http://license.coscl.org.cn/MulanPubL-2.0 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BAS...
C
331, ["flask_life_and_mana_to_recover_+%"]=6332, ["flask_life_recovery_+%_while_affected_by_vitality"]=6333, ["flask_life_recovery_rate_+%"]=2090, ["flask_life_to_recover_+%"]=1960, ["flask_mana_charges_used_+%"]=2086, ["flask_mana_recovery_rate_+%"]=2091, ["flask_mana_to_recover_+%"]=1961, ["flask_minion_heal_...
Lua
if self.precise_locator: result = self.precise_locator.refine_pattern_bbox( frame, bbox, text, debug=False ) if result is not None: # 实际进行了精确定位 refined_bbox, refined_text = ...
Python
f._ConditionFactors._DesignLocations = filtered for r in value: if self not in r._DesignLocations: r._DesignLocations.append(self) self._ConditionFactors = value ConditionFactors = property(getConditionFactors, setConditionFactors) def addConditionFactors(self, *Con...
Python
cts(new Rectangle(0, 1, 2, 3)), false); expect(r.left, isNaN); expect(r.right, isNaN); } }); test('NaN top', () { var rectangles = [ const Rectangle(0, NaN, 2, 3), new MutableRectangle(0, NaN, 2, 3), new Rectangle.fromPoints(new Point(0, NaN), new Point(2, 4)), new Mutab...
Dart
copy of Mulan PSL v2 at: // http://license.coscl.org.cn/MulanPSL2 // THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, // EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, // MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. // See the Mulan PSL v2 for more d...
Go
ageViewer:new{ image = image_table, images_list_nb = #images_list, fullscreen = true, with_title_bar = false, image_disposable = false, } UIManager:show(viewer) viewer:switchToImageNum(curr_index) else local viewer = TextVie...
Lua
messageDisplay.setStyle("-fx-text-inner-color: red;"); } }); //Button to display the bfs in the message window bfsButton.setOnAction(event -> { if (vertexList.isEmpty()) { messageDisplay.setText("The graph is empty."); messageDisplay.set...
Java
licenses1 } func merge( input1 *parsed, input2 *parsed, outputName string, ) ( *build.File, error) { output := &build.File{ Path: outputName, Comments: input1.Comments, Stmt: nil, Type: build.TypeBuild, } // Merge file level comments output.Comments.Before = append( output.Comments.Be...
Go
or eggs hit a block: * <ul> * <li>It looks like a little piece with an item texture * </ul> */ ITEM_CRACK("iconcrack", 36, -1, ParticleProperty.DIRECTIONAL, ParticleProperty.REQUIRES_DATA), /** * A particle effect which is displayed when breaking blocks or sprinting: * <ul> * ...
Java
if (curr.limit && curr.limit > 0) { return curr; } return acc; } if ((curr.usage / curr.limit) > (acc.usage / acc.limit)) { return curr; } return acc; ...
Typescript
self.vars = vars end local parse_date --- parse a string into a Date object. -- @string str a date string -- @return date object function Date.Format:parse(str) assert_string(1,str) if self.plain then return parse_date(str,self.us) end local res = {str:match(self.fmt)} if #res==0 then retu...
Lua
TParams<TP>): void; exit(): void; promise: Promise<void>; } export interface IHostArgs<T> { module: T; path?: string; createNew?: boolean; } export interface IModuleDef<TWatch, TCtrl> { watch: TWatch; ctrl: TCtrl; } export type IModuleKey<T> = {[K in keyof T]: IModuleDef<any, any>}; e...
Typescript
ate if it exists if (this.colorPickerWidget && this.colorPickerWidget.colorPicker) { this.colorPickerWidget.colorPicker.color.set(this.color); } }; // Override onNodeCreated nodeType.prototype.onNodeCreated = function()...
JavaScript
/// </remarks> /// <returns> /// The next print mode to use. /// </returns> public static PrintMode Print(ulong seed, Span<Item> result, PrintMode printMode) { var rand = new Xoroshiro128Plus(seed); return Print(ref rand, result, printMode); } /// <summary> /// Determine...
C#
//Copyright 2017 Ryan Wick //This file is part of Bandage. //Bandage is free software: you can redistribute it and/or modify //it under the terms of the GNU General Public License as published by //the Free Software Foundation, either version 3 of the License, or //(at your option) any later version. //Bandage is di...
C
Plays a Spotify playlist on the user's active device. Use this when a Spotify playlist URI is available. """.trimIndent(), inputSchema = Tool.Input(properties = buildJsonObject { putJsonObject("playlistUri") { put("type", "string") put("description", ...
Kotlin
uint8m1_t m1 = __riscv_vreinterpret_v_b1_u8m1(m); size_t vlmax8 = __riscv_vsetvlmax_e8m1(); m1 = __riscv_vor_vv_u8m1( __riscv_vsrl_vx_u8m1(__riscv_vslide1up_vx_u8m1(m1, 0xFF, vlmax8), 7, vlmax8), __riscv_vsll_vx_u8m1(m1, 1, vlmax8), vlmax8); m = __riscv_vmand_mm_b1(m, __riscv_vreinterpret_v_u8m1_b1(m1), vl)...
Assembly
// remove the svg processedDg.select("svg").remove(); //if dynamic such as shiny remove data-processed // so mermaid will reprocess and redraw if (HTMLWidgets.shinyMode) { el.removeAttribute("data-processed") } processedDg.append("pre").html( ["parse error with " + x...
JavaScript
msModule } from '@angular/forms'; import { Investment } from '../models/investment'; import { InvestmentTypes } from '../models/investment-types'; describe('InvestmentEditComponent', () => { let component: InvestmentEditComponent; let fixture: ComponentFixture<InvestmentEditComponent>; beforeEach(async(() => { ...
Typescript
://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limit...
Markdown
s32 OSAL_DmaStart(__hdle hDMA, __u32 SrcAddr, __u32 DestAddr, __u32 TransferLength); /* ******************************************************************************* * OSAL_DmaStop * * Description: * ֹͣDMA 䡣 * * Parameters: * hDMA input. cspRequestDmaľ * * Return value: * ɹEBSP_OKʧܷEBS...
C
printf上的可能性。随后在调试Java的过程中,我发现了猫腻:在计算C[0][0]的结果时,一开始数字保持着6位小数,随后随着运算的增加,突然在一次运算中就只会保留5位小数了。 我随后推测这是float精度的结果。根据Project1计算器里对IEEE754的研究,在float的指数位确定的情况下,32bit的float最多可以表示2^23 = 8388608个数字,一共七位,这意味着最多能有7位有效数字,但绝对能保证的只有6位,即float的精度为6~7位有效数字。 而在矩阵乘法中C[0][0]会等于100个float数的和。那么根据**不确定度的传递公式**,当两个float x1与x2相乘时,得到的新float的不确定...
Markdown