content
stringlengths
2
6.21k
label
stringclasses
16 values
using Microsoft.ML; using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime.Data; using Spear.Tests.Client.ML.Models; using System; using System.IO; using Microsoft.ML.Transforms.Normalizers; namespace Spear.Tests.Client.ML { /// <summary> 出租车费用预测 </summary> public class TaxiFarePrediction { priv...
C#
table .rt-table .rt-tbody, .cve-table .rt-table .rt-thead, .dockerfile-table .rt-table .rt-tbody, .dockerfile-table .rt-table .rt-thead { @apply p-0 !important; } .cve-table .rt-tbody .rt-tr, .cve-table .rt-thead .rt-tr, .dockerfile-table .cve-table .rt-tbody .rt-tr, .dockerfile-table .cve-table .rt-thead .rt-tr {...
CSS
ncTest(() async { print('--test from kernel------------------------------------------------'); await runTests(); }); } // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be fo...
Dart
his.m_nCurrentY,pAttackEntity.GetCurentX(),pAttackEntity.GetCurrentY()); //技能攻击 if(this.m_NextUseSkill != null) { this.RawSetNextAction(StandardActions.SA_SPELL,nAttackDir); ...
Typescript
! vsub.i32 q0,q0,q2 vst1.8 d12,[r2,: 64] vadd.i32 q2,q5,q7 vst1.8 d0,[r5,: 64] vsub.i32 q0,q5,q7 vst1.8 {d4-d5},[r4,: 128]! vadd.i32 q2,q9,q10 vst1.8 {d0-d1},[r6,: 128]! vsub.i32 q0,q9,q10 vst1.8 {d4-d5},[r4,: 128]! vadd.i32 q2,q1,q3 vst1.8 {d0-d1},[r6,: 128]! vsub.i32 q0,q1,q3 vst1.8 d4,[r4,: 64] vst1.8 d0,[r6,: 64] a...
Assembly
a [**KLOCK\_QUEUE\_HANDLE**](/windows-hardware/drivers/kernel/eprocess) structure that receives the lock queue handle. Pass this value to the [**KeReleaseInStackQueuedSpinLockForDpc**](nf-wdm-kereleaseinstackqueuedspinlockfordpc.md) routine when you release the queued spin lock. ## -remarks A [*CustomThreadedDpc*](/...
Markdown
eek_to(get_fat_offset(fat_type, start_cluster, fat_start_sector, bytes_per_sec))?; let offset = get_fat_offset(fat_type, start_cluster, fat_start_sector, bytes_per_sec); let blk_offset = fs.get_block_offset(offset); // FAT12 tables do not exceed 6K let block_buf = get_bl...
Rust
}, -- { map = generate_122("elona.larna"), x = 64, y = 47 }, -- { map = generate_122("elona.miral_and_garoks_workshop"), x = 88, y = 25 }, -- { map = generate_122("elona.mansion_of_younger_sister"), x = 18, y = 2 }, -- { map = generate_122("elona.embassy"), x = 53, y = 21 }, -- { map = generate_122("elona.north_tyris_...
Lua
ion of this DateTime appropriate for use in SQL Time * @param {Object} opts - options * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' * @param {bool...
JavaScript
optimized code ! Who doesn't ? opt O+ ; Enable all optimizations opt OW1- ; Disable branch optim warnings opt D+ ; Enable debugging symbols text _start: ; Standard code preamble lea _stacktop,sp ; Initialize stack move.l sp,d0 ...
Assembly
// // MNNReluWithSlopeChannelBF16.S // MNN // // Created by MNN on 2022/06/23. // Copyright © 2018, Alibaba Group Holding Limited // #ifdef __aarch64__ #include "MNNAsmGlobal.h" .text .align 5 asm_function MNNReluWithSlopeChannelBF16 //void MNNReluWithSlopeChannel(float* dst, const float* src, const float* slope...
Assembly
DC 10610003 */ beq $v1, $at, .L801A66EC_ovl7 /* 14C750 801A66E0 24010007 */ li $at, 7 /* 14C754 801A66E4 14610003 */ bne $v1, $at, .L801A66F4_ovl7 /* 14C758 801A66E8 00001025 */ move $v0, $zero .L801A66EC_ovl7: /* 14C75C 801A66EC 03E00008 */ jr $ra /* 14C760 801A66F0 24020001 */ li $v0, 1 .L801A6...
Assembly
complete = {}, hidden = {}, hiddenDailies = { nhc = {}, hc = {}, cooking = {}, fishing = {}, pvp = {}, }, journey = {}, isTrackerExpande
Lua
-- ROBLOX upstream: https://github.com/facebook/jest/blob/v28.0.0/packages/jest-mock/src/__tests__/index.test.ts -- /** -- * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -- * -- * This source code is licensed under the MIT license found in the -- * LICENSE file in the root directory of this...
Lua
startsWith('for')) { ctx.appendLine(`${varName}_blocks.forEach(block => block.destroy())`) } ctx.appendLine(`dom.detach(${varName})`) }) // 所有变量设置为空(释放内存,并且 update 逻辑会检测,避免无意义更新) ctx.appendLine(`${ctx.allVars.join(' = ')} = void 0`) ctx.appendLine(`destroyed = true`) ctx.blockEnd(`}`) } export ...
Typescript
"][target=\"_blank\"] > span\nli:has(> .pic[href^=\"http\"]:not([href*=\"423down.\"]))\nspan > a > b",".widget_html_ad","#adbn_UMU",".zh_left",".cont_banner",".ad_left","div[class^=\"nativeAd-DS-card\"]",".main-wrapper-advlong-top","#news_detail_div > div[align=\"center\"]\n#news_detail_div > strong > a[rel=\"noreferre...
JavaScript
configUSE_TRACE_FACILITY 0 #define configUSE_STATS_FORMATTING_FUNCTIONS 0 #define configUSE_16_BIT_TICKS 0 #define configIDLE_SHOULD_YIELD 1 #define INCLUDE_xTaskGetIdleTaskHandle 1 #define INCLUDE_xTimerGetTimerDaemonTaskHandle 1 #define configCHECK_FOR_STACK_OVERFLOW 2 #define configUSE_MUTEXES 1 #define confi...
C
unds(long esp, long error_code) { die("bounds",esp,error_code); } void do_invalid_op(long esp, long error_code) { die("invalid operand",esp,error_code); } void do_device_not_available(long esp, long error_code) { die("device not available",esp,error_code); } void do_coprocessor_segment_overrun(long esp, long erro...
C
} getCursor(position: Vector) { return "crosshair"; } handleKey(value: string) { if (value && value.length === 1 && ["1", "2", "3", "4"].includes(value)) { // The value is not a special character, so lets use it. // TODO: better selection of template mechanism (select from a lis...
Typescript
") final List<Object> fieldTypes; @pragma("vm:entry-point") @pragma("wasm:entry-point") final int? packing; const _FfiStructLayout(this.fieldTypes, this.packing); } @pragma("vm:entry-point") @pragma("wasm:entry-point") final class _FfiInlineArray { @pragma("vm:entry-point") @pragma("wasm:entry-point") ...
Dart
endor_data_buf] and x10, x24, #0xffff lsl w9, w28, #7 and w28, w24, #0xffff lsl x24, x10, #9 add x0, x8, w9, uxtw #2 mov x1, x21 mov x2, x24 bl memcpy ldr x2, [x27, :lo12:p_vendor_data_buf] mov x0, x22 mov w1, w23 bl FtlMapWritePage add w23, w23, #1 // =1 subs w19, w19, w28 add w20, w2...
Assembly
ob: Job? = null private fun toConnecting() { _peerState.value = PeerState.Connecting handshakeJob?.cancel() handshakeJob = viewModelScope.launch { delay(2_000) if (_peerState.value == PeerState.Connecting) { toConnected() } } ...
Kotlin
173.66 173.66 0 0 0 54.9 31.7v33.6a24 24 0 0 0 20 23.6 224.88 224.88 0 0 0 75.9 0 23.93 23.93 0 0 0 19.7-23.6v-33.6a171.78 171.78 0 0 0 54.9-31.7l29.1 16.8a23.91 23.91 0 0 0 30.3-5.3c16.2-19.4 33.7-41.6 42.6-65.8a24 24 0 0 0-10.5-29.1zm-151.3 4.3c-77 59.2-164.9-28.7-105.7-105.7 77-59.2 164.91 28.7 105.71 105.7z"]] }; v...
JavaScript
外,我们还设置了 `dataset_num_proc` 和 `dataloader_num_workers` 等参数,用于加速数据预处理。 ```python # dpo_idefics2-8b.py from datasets import features, load_dataset from transformers import AutoModelForVision2Seq, AutoProcessor import torch from trl import DPOConfig, DPOTrainer from peft import LoraConfig def main(): # Load the mode...
Markdown
data = [0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x30, 0x89, 0xe4, 0xf2, 0x29, 0x20, 0x32, 0x89, 0x14, 0x80]; let mut reader = U8Reader::new(&data[..]); let inst = decoder.decode(&mut reader).unwrap(); assert_eq!(format!("{}", inst), expected); let expected = "[MMI] shladd r14=r17,0x3,r14;; nop.m 0x0; shl r...
Rust
合、それを16x16の画像パッチに分割できます。テキストが単語にトークン化されるように、画像はパッチのシーケンスに「トークン化」されます。 2. *学習埋め込み*、つまり特別な `` トークンが、BERTのようにパッチ埋め込みの先頭に追加されます。 `` トークンの最終的な隠れた状態は、付属の分類ヘッドの入力として使用されます。他の出力は無視されます。このトークンは、モデルが画像の表現をエンコードする方法を学ぶのに役立ちます。 3. パッチと学習埋め込みに追加する最後の要素は*位置埋め込み*です。モデルは画像パッチがどのように並べられているかを知りませんので、位置埋め込みも学習可能で、パッチ埋め込みと同じサイズを持ちます。最後に...
Markdown
I CLD MOVSL // arg 1 - name MOVSL // arg 2 - namelen MOVSL // arg 3 - oldp MOVSL // arg 4 - oldlenp MOVSL // arg 5 - newp MOVSL // arg 6 - newlen MOVL $SYS___sysctl, AX INT $0x80 JAE 4(PC) NEGL AX MOVL AX, ret+24(FP) RET MOVL $0, AX MOVL AX, ret+24(FP) RET GLOBL runtime·tlsoffset(SB),...
Assembly
// Copyright 2021 Jacobs Data Solutions // 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 wri...
C#
.9-8-12.4 1.7 13.9-14.3 3.8 13.7 2.7-.8 14.7 6.8-12.2 13.8 5.3zm165.4 145.2l-13.1 5.6-7.3-12.2 1.3 14.2-13.9 3.2 13.9 3.2-1.2 14.2 7.3-12.2 13.1 5.5-9.4-10.7zm106.9-77.2l-20.9 9.1-12-19.6 2.2 22.7-22.3 5.4 22.2 4.9-1.8 22.9 11.5-19.6 21.2 8.8-15.1-17zM248 29.9c-125.3 0-226.9 101.6-226.9 226.9S122.7 483.7 248 483.7s226....
JavaScript
ormat!("↑{}", index)); ctx.print_color(53, y, get_item_color(ecs, ent), black, &item_name.name); y += 1; index += 1; } }; let hunger = ecs.read_storage::<HungerClock>(); let hc = hunger.get(*player_entity).unwrap(); match hc.state { HungerState::WellFe...
Rust
lied to drawing")); } return actions; } #endregion #region Implementation private void OnLinkVisitedClick(object? sender, EventArgs e) { // Cast to the correct type // Double check the source is the expected type if (...
C#
"Tekst all","align_texttop":"Tekst \u00fcleval","align_bottom":"All","align_middle":"Keskel","align_top":"\u00dcleval","align_baseline":"Baas",align:"Joondus",hspace:"Horisontaalne vahe",vspace:"Vertikaalne vahe",dimensions:"M\u00f5\u00f5tmed",border:"Raam",list:"Piltide nimekiri",alt:"Pildi kirjeldus",src:"Pildi URL",...
JavaScript
ss*="inviteBannerUpsell_"] { display: none; } // Removes icon next to tab // disabled for now // div[class*="serverBoostTabItem_"] { // svg { // display: none; // } // } // Removes the nitro tab below Friends // as there's a nitro tab // literally everywhere. div[class*="sidebar_"] { >nav[class*="privateC...
CSS
combine( winston.format.colorize({ all: true }), winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }), winston.format.printf((info) => { return `[${info.timestamp}] [${info.level}] ${info.message}`; }), ), transports: [new winston.tr...
JavaScript
# pip langchain, streamlit, OpenAI, Snowflake-python-connector import os from pathlib import Path from PIL import Image from app_secrets import OPENAI_API_KEY import streamlit as st from snowflake_connection import execute_sf_query from langchain.prompts import load_prompt from langchain_openai import OpenAI from langc...
Python
* This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License ...
Kotlin
函数执行上下文弹出调用栈。 但是父函数的执行上下文不会被 GC,因为子函数的执行上下文与父函数的词法环境形成了闭包,所以子函数依旧可以访问父函数的变量。 ` }, ], tags: ['计算机科学', '程序设计语言', 'JavaScript'], type: '通用领域知识', }, { id: 306, title: '函数式编程这种编程范式,主要目的是消除__。', answers: [ '副作用', ], tags: ['计算机科学', '编程思想', '声明式编程', '函数式编程'], type: '...
Typescript
=> i18n.dayNames[D() + 7], m: () => m() + 1, mm: () => pad(m() + 1), mmm: () => i18n.monthNames[m()], mmmm: () => i18n.monthNames[m() + 12], yy: () => String(y()).slice(2), yyyy: () => pad(y(), 4), h: () => H() % 12 || 12, hh: () => pad(H() % 12 || 12), ...
Typescript
panic("implement me") } func (s *UnimplementedCSAServiceClient) ListKeypairs(ctx context.Context, in *csav1.ListKeypairsRequest, opts ...grpc.CallOption) (*csav1.ListKeypairsResponse, error) { panic("unimplemented") } package data import ( "bytes" "encoding/json" "errors" "math/big" "testing" "github.com/mul...
Go
debug("Detection failed at step %d\n", 7); goto release; } /* Determine the chip type */ outb_p(W83781D_REG_BANK, address + W83781D_ADDR_REG_OFFSET); save = inb_p(address + W83781D_DATA_REG_OFFSET); outb_p(save & 0xf8, address + W83781D_DATA_REG_OFFSET); outb_p(W83781D_REG_WCHIPID, address + W83781D_ADDR_REG_O...
C
, mapper: (I) => O) { return value !== undefined ? mapper(value) : undefined; } } import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, Output, } from '@angular/core'; import { SkyProgressIndicatorComponent } from '../progress-indicator.component'; import {...
Typescript
string()); } #[test] fn test_polynomial_str_has_ones() { let a = Polynomial::new(vec![-1, -1, -1, 0]); assert_eq!("-x^3 - x^2 - x", a.to_string()); } #[test] fn test_polynomial_str_has_negative() { let a = Polynomial::new(vec![-2, -1, -1, 0]); assert_eq!("-2x^3 ...
Rust
向了对权力的拥抱和对商业联合会宏伟愿景的妥协,成为卡西米尔这座“文明欣欣向荣”的城市机器中的一个重要齿轮。他明确表示已卸下“发言人职务”,以“玫瑰报业的董事长助理”身份出现,并自称“刚刚踏足媒体行业的新人”,积极寻求与耀骑士玛嘉烈及罗德岛的合作,共同为卡西米尔的“美好未来”努力。 在白金的梦境中,马克维茨以一个具象化的角色出现,与恰尔内等共同构成了白金心中“始终放不下、害怕的,那座塔”。他自称“我一直在”,并对白金关于“当箭射穿高塔后,会发生什么呢?”的问题给出“什么都不会”的回答,这反映了他对卡西米尔体制根深蒂固的认知。白金在梦中曾将他与博士混淆,而马克维茨则解释说“梦是不被自己控制的,欣特莱雅”,这暗示了他在白金内心深处扮演着...
Markdown
{} SC_61004.fields = { slot3.SC_61004_RESULT_FIELD } SC_61004.is_extendable = false SC_61004.extensions = {} slot3.CS_61005_TYPE_FIELD.name = "type" slot3.CS_61005_TYPE_FIELD.full_name = "p61.cs_61005.type" slot3.CS_61005_TYPE_FIELD.number = 1 slot3.CS_61005_TYPE_FIELD.index = 0 slot3.CS_61005_TYPE_FIELD.label = 2 slo...
Lua
rate::builder::Step::Comment(text)); }); // expr let child = children.get_next().unwrap(); steps.push_back(crate::builder::Step::NewLine); steps.push_back(crate::builder::Step::Pad); steps.push_back(crate::builder::Step::FormatWider(child.element)...
Rust
def pairwise_ioa(boxes1: Boxes, boxes2: Boxes) ->torch.Tensor: """ Similar to :func:`pariwise_iou` but compute the IoA (intersection over boxes2 area). Args: boxes1,boxes2 (Boxes): two `Boxes`. Contains N & M boxes, respectively. Returns: Tensor: IoA, sized [N,M]. """ area2 = b...
Python
1; uint32_t t1 : 1; uint32_t v2 : 1; uint32_t t2 : 1; uint32_t v3 : 1; uint32_t t3 : 1; uint32_t bt : 1; uint32_t stop : 1; uint32_t btf : 1; uint32_t gm : 1; }; uint32_t word; } e2k_dibcr_t; #define DIBCR_reg word #define E2K_DIBCR_MASK(cp_num) (0x3ULL << ((cp_num) * 2)) typedef u...
C
AFF6777_StaticFields*)il2cpp_codegen_static_fields_for(TimeZoneInfo_t46EF9BAEAA787846F1A1EC419BE75CFEFAFF6777_il2cpp_TypeInfo_var))->get_address_of_systemTimeZones_14()), L_4, (ReadOnlyCollection_1_tD63B9891087CF571DD4322388BDDBAEEB7606FE0 *)NULL); } IL_0025: { ReadOnlyCollection_1_tD63B9891087CF571DD4322388BDDBAE...
C++
from django.test import TransactionTestCase from localflavor.np.forms import NPDistrictSelect, NPPostalCodeFormField, NPProvinceSelect, NPZoneSelect from .selectfields_html import districts_select, provinces_select, zones_select from .models import NepalianPlace class NepalDetails(TransactionTestCase): """ ...
Python
do cliente (em minutos) Tempo de Pós-Atendimento (minutos) Tempo pós-atendimento (em minutos) Resolução no Primeiro Contato? "Sim" ou "Não" (resolução no 1º contato) Tipo de Atendimento Tipo de atendimento (ex.: Suporte Técnico) Canal de Atendimento Canal usado (ex.: Telefone, Chat) Produto/Serviço Relaciona...
Markdown
:= json.Marshal(task) if err != nil { return nil, err } packet.Size = uint32(len(body)) packet.Data = body return packet, nil } func (sender *AdminTaskManager) sendAdminTask(task *proto.AdminTask, conn net.Conn) (err error) { packet, err := sender.buildPacket(task) if err != nil { return errors.Trace(err, ...
Go
Orgrimmar",nil}, [15854] = {"Cavalier d'élite d'Orgrimmar",nil}, [15855] = {"Fusillier tauren",nil}, [15856] = {"Primaliste tauren",nil}, [15857] = {"Cavalier de Stormwind",nil}, [15858] = {"Fantassin de Stormwind",nil}, [15859] = {"Archimage de Stormwind",nil}, [15860] = {"Tireur d'élite kaldorei",nil}, [15861] = {"In...
Lua
Enabled(false) , readNotificationActivated(false) , writeNotificationActivated(false) , readNotificationPending(false) , writeNotificationPending(false) , connectionNotificationPending(false) , credentialsSent(false) , pendingResponseData(0) { socket = 0; state = QHttpSocketEngine::N...
C++
ior_blended_pass_ps20.inc" #include "flesh_interior_blended_pass_ps20b.inc" // NOTE: This has to be the last file included! #include "tier0/memdbgon.h" void InitParamsFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, FleshInteriorBlendedPassVars_t &info ) { SET_FLAG...
C++
--fa: "\e4d0"; } .fa-rupee-sign { --fa: "\f156"; } .fa-rupee { --fa: "\f156"; } .fa-file-image { --fa: "\f1c5"; } .fa-circle-question { --fa: "\f059"; } .fa-question-circle { --fa: "\f059"; } .fa-plane-departure { --fa: "\f5b0"; } .fa-handshake-slash { --fa: "\e060"; } .fa-book-bookmark { --fa...
CSS
th pub text: Option<String>, } #[derive(FromArgs, Debug, PartialEq)] #[argh(subcommand, name = "list", description = "list connected devices")] pub struct ListCommand { #[argh(positional)] pub nodename: Option<String>, } #[derive(FromArgs, Debug, PartialEq)] #[argh(subcommand, name = "run-component", desc...
Rust
*nread = 0; return CELL_EBADF; } vm::var<lv2_file_op_rw> arg; arg->_vtable = vm::cast(0xfa8a0000); // Intentionally wrong (provide correct vtable if necessary) arg->op = 0x8000000a; arg->fd = fd; arg->buf = buf; arg->offset = offset; arg->size = buffer_size; const s32 rc = sys_fs_fcntl(ppu, fd, 0x800000...
C++
- SHA256", (done) => { perform_symmetric_encryption_test(options_AES_256_CBC_SHA256, done); }); it("should produce a smaller buffer (reduceLength)", function () { const buffer = Buffer.from("Hello World", "ascii"); const reduced = reduceLength(buffer, 6); reduced.toString("asci...
Typescript
using FluentAssertions; using System; using Xunit; namespace FluentUri.Test { public class Path { [Fact] public void PathCannotBeNull() { FluentUriBuilder.Create() .Invoking(b => b.Path(null)) .ShouldThrow<ArgumentNullException>(); } ...
C#
nail = item.thumb, path = item.image, fullsize = item.fullsize, user = item.user, up = item.up, down = item.down, mark = item.mark, created = item.created, flags = item.flags, width = item.width, height = item.height, audio = item.a...
Kotlin
&remotePeer) }) }, } func init() { mountsCmd.Flags().StringSliceVarP(&mountsCmdFlags.configFiles, "file", "f", nil, "specify config files or patches in a YAML file (can specify multiple)", ) mountsCmd.PreRunE = func(cmd *cobra.Command, args []string) error { nodesFromArgs := len(GlobalArgs.Nodes) > 0 e...
Go
Value,RhinoMath.UnsetValue. /// </summary> /// <since>5.0</since> public static Point2d Unset { get { return new Point2d(RhinoMath.UnsetValue, RhinoMath.UnsetValue); } } /// <summary> /// Computes the distance between two points. /// </summary> /// <param name="other">Another ...
C#
anelLeftFocusRight = fluentIcon(name = "Filled.PanelLeftFocusRight") { fluentPath { moveTo(19.25f, 20.0f) arcTo(2.75f, 2.75f, 0.0f, false, false, 22.0f, 17.25f) verticalLineTo(6.75f) arcTo(2.75f, 2.75f, 0.0f, false, false, 19.25f, 4.0f) ...
Kotlin
yLabel() { dailyLabel = getDailyLabel() ?: "" setDailyLabel(dailyLabel) } /** * 获取日记视频 */ private fun getDailyVideo() { dailyViewModel.queryDailyVideoByUuid(getDailyUuid().toString()) .observe(this) { dailyVideoList -> val newVideoList = mutable...
Kotlin
1_a), Group(2_a)); GlobalVar(Source{{56, 78}}, "B", ty.sampled_texture(core::type::TextureDimension::k2d, ty.f32()), Binding(1_a), Group(2_a)); Func("F", tint::Empty, ty.void_(), Vector{ Decl(Var("a", ty.vec4<f32>(), Call("te...
C++
['D', 'Eb', 'F'], 'G', ['A', 'Bb', 'C']]); expect(Brackets.resolve('C[DE]E')).toEqual(['C', 'DE', 'E']); expect(Brackets.resolve('C[D[EF]]G')).toEqual(['C', ['D', 'EF'], 'G']); expect(Brackets.resolve('C [D E] E [F G]', s => s.split(' '))).toEqual(['C', ['D', 'E'], 'E', ['F', 'G']]); /* expect(Brackets.resolv...
Typescript
0.2857rem 0em 0em; } .ui.attached.bottom.button { border-radius: 0em 0em 0.2857rem 0.2857rem; } .ui.attached.left.button { display: inline-block; border-left: none; padding-right: 0.75em; text-align: right; border-radius: 0.2857rem 0em 0em 0.2857rem; } .ui.attached.right.button { display: inline-block; ...
CSS
let result = self.data as u8; self.data >>= 8; self.len -= 8; Ok(result) } else { Err(()) } } pub(crate) fn insert_and_extract_byte(&mut self, byte: u8) -> u8 { if self.len <= 64 - 8 { self.data += u64::from(byte) << self....
Rust
sqlite3_free (err_msg); return -100; } ret = sqlite3_exec (db_handle, "create VIRTUAL TABLE onesidedquote USING VirtualDBF('shapetest1.dbf, UTF-8);", NULL, NULL, &err_msg); if (ret != SQLITE_ERROR) { fprintf (stderr, "VirtualDBF unexpected result: %i\n", ret); return -1...
C
import arxiv import torch import torch.nn.functional as F from transformers import AutoTokenizer, AutoModel, DebertaV2Tokenizer, DebertaV2Model import numpy as np from sklearn.metrics.pairwise import cosine_similarity import re from sentence_transformers import SentenceTransformer # 1. 学術論文データの取得(arXiv API を利用) def fe...
Python
ingReducer); bTransparent = !FGet(Vars::Misc::Exploits::PingReducer); FSlider("Ping target", Vars::Misc::Exploits::PingTarget, 20, 105, 1, "%d", FSlider_Clamp | FSlider_Right); bTransparent = false; SetCursorPosY(GetCursorPosY() - 8); } EndSection(); if (Vars::Debug::Info.Value) { if (Section("Con...
C++
x + it.y }!! val bottomLeft = points.minByOrNull { it.x - it.y }!! val topRight = points.maxByOrNull { it.x - it.y }!! return listOf(bottomRight, topLeft, bottomLeft, topRight) } fun Offset.toCvPoint(): Point { return Point(this.x.toDouble(), this.y.toDouble()) } fun Point.toOffset(): Offset { re...
Kotlin
/* Copyright 2014, ACSE & CADIEEL * ACSE : http://www.sase.com.ar/asociacion-civil-sistemas-embebidos/ciaa/ * CADIEEL: http://www.cadieel.org.ar * Copyright 2014, 2015, Mariano Cerdeiro * All rights reserved. * * This file is part of CIAA Firmware. * * Redistribution and use in source and binary forms, ...
C
ondition{}) yyh3640.ElemContainerState(yyj3640) if r.TryDecodeAsNil() { yyv3640[yyj3640] = PodCondition{} } else { yyv3642 := &yyv3640[yyj3640] yyv3642.CodecDecodeSelf(d) } } } } else { yyj3640 := 0 for ; !r.CheckBreak(); yyj3640++ { if yyj3640 >= len(yyv3640) { yyv364...
Go
6AR = 0; c6GR++; if (c6GR < 0 || c6GR > d6G) c6GR = 0; c6MR++; if (c6MR < 0 || c6MR > d6M) c6MR = 0; c6SR++; if (c6SR < 0 || c6SR > d6S) c6SR = 0; c6YR++; if (c6YR < 0 || c6YR > d6Y) c6YR = 0; c6ZFR++; if (c6ZFR < 0 || c6ZFR > d6ZF) c6ZFR = 0; double o6AR = a6AR[c6AR-((c6AR > d6A)?d6A+1:0)]; do...
C++
#pragma once #if USE_JWT_CPP && USE_SSL #include <config.h> #include <Poco/Net/HTTPSClientSession.h> #include <Poco/Timestamp.h> #include <Poco/URI.h> namespace DB { class JWTProvider { public: JWTProvider( std::string auth_url, std::string client_id, std::string audience, std::...
C
//定义最上层 this.setChildIndex(this.btn_open0,this.numChildren-1); this.setChildIndex(this.btn_open1,this.numChildren-1); this.setChildIndex(this.btn_next,this.numChildren-1); this.setChildIndex(this.img_mask,this.numChildren-1); //注册按钮 this.btn_next.addEventListener(egre...
Typescript
5px, hsla(197, 62%, 11%, 0.5) 10px, hsla(5, 53%, 63%, 0) 10px, hsla(5, 53%, 63%, 0) 35px, hsla(5, 53%, 63%, 0.5) 35px, hsla(5, 53%, 63%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 40px, hsla(197, 62%, 11%, 0.5) 50px, hsla(197, 62%, 11%, 0) 50px, hsla(197, 62%, 11%, 0) 60px, hsla(5, 53%, 63%, 0.5) 60px, hsla(5, 53%...
CSS
IiRcIiwgXCJcIl1cbn0pO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBkZWZhdWx0TG9jYWxlKGRlZmluaXRpb24pIHtcbiAgbG9jYWxlID0gZm9ybWF0TG9jYWxlKGRlZmluaXRpb24pO1xuICBmb3JtYXQgPSBsb2NhbGUuZm9ybWF0O1xuICBmb3JtYXRQcmVmaXggPSBsb2NhbGUuZm9ybWF0UHJlZml4O1xuICByZXR1cm4gbG9jYWxlO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=...
JavaScript
s dangerous character"}, {"tab", "bad\tfile.conf", true, "filename contains dangerous character"}, {"normal path", "subdir/file.conf", false, ""}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := validateTarFilename(tt.filename) if tt.wantErr { assert.Error(t, err) assert.C...
Go
// Send the payload. t := time.Now() st, err := conn.NewStream(ctx, handlerTest, payload) if err != nil { if debugReqs { fmt.Println(err.Error()) } b.Fatal(err.Error()) } got := 0 for range requests { got++ st.Requests <- append(GetByteBuffer()[:0], pay...
Go
b() {} template <typename MatrixType> gko::test::LinearSystem<MatrixType> setup_linsys_and_solver( std::shared_ptr<const MatrixType> mat, const int num_rhs, const real_type tol, const int max_iters) { auto executor = exec; solve_lambda = [executor](const Settings settings, ...
C++
�载因子大于或等于5 负载因子的计算公式是:load_factor = ht[0].used / ht[0].size BGSAVE/BGREWRITEAOF 是redis持久化数据RDB/AOF的两个命令,至于为什么执行这两个命令时负载因子会变成5,我们下面说到,扩容过程是一样的,先看没有执行这两个命令时的情况。 不断往hash添加元素,负载因子就会大于等于1,redis就会触发扩容操作,过程如下: 1.为ht[1]分配空间,此时hash同时持有ht[0],ht[1]。扩容大小为:大于used * 2的第一个2的n次幂,例如当前used是16,则扩大为32 2.将rehashidx字段设置为0,表示...
Markdown
namespace GitExtUtils.GitUI.Theming { public static class AppColorDefaults { public static readonly Color FallbackColor = Color.Magenta; private static readonly Dictionary<AppColor, Color> _values = new() { { AppColor.PanelBackground, SystemColors.Window...
C#
number constructor(name: string, multiplier:number) { this._name = name; this._multiplier = multiplier; } get name(): string { return this._name; } get multiplier(): number { return this._multiplier; } public multiply(input: number):number { retur...
Typescript
.ErrorResponse#MESSAGE_BLOCKED_BY_HARMFUL_LINK_FILTER MESSAGE_BLOCKED_BY_HARMFUL_LINK_FILTER} * <br>If this message was blocked by the harmful link filter</li> * </ul> * * @param component * The {@link MessageTopLevelComponent} to send * @param other * Additional...
Java
} #[test] fn blocks_count() { let mut testkit = DmbcTestApiBuilder::new() .create(); let api = testkit.api(); let count = 2; testkit.create_block(); testkit.create_block(); testkit.create_block(); testkit.create_block(); let (status, response): (StatusCode, BlocksResponse) = ...
Rust
убивать в Альтеракской долине Отрекшихся.$B$BУбейте Отрекшегося и возвращайтесь к Карлу Филипсу (он ходит между лесопилкой и рудником) с сердцем Отрекшегося.", ["T"] = "Милосердие архиепископа", }, [7367] = { ["D"] = "Клан Северного Волка позволил заманить себя в совершенно идиотскую ловушку, $c. Надо быть ...
Lua
} } /** * SID clocking - delta_t cycles. * * @param delta_t * @param voice1 * @param voice2 * @param voice3 * @param ext_in */ public void clock(int /* cycle_count */delta_t, int /* sound_sample */voice1, int /* sound_sample */voice2, int /* sound_sample */voice3, int /* sound_sample */ext...
Java
//若生成了uri,则表示该文件添加成功 //使用流将内容写入该uri中即可 val outputStream = contentResolver.openOutputStream(uri) outputStream?.use { bitmap.compress(imageFormat.first, 90, it) it.flush() } ...
Kotlin
mut texture_atlases: ResMut<Assets<TextureAtlas>>, asset_server: Res<AssetServer>, ) { let bike_tex = asset_server.load("textures/rival_atlas.png"); let bike_atlas = RIVAL_SPRITE_DESC.make_atlas(bike_tex); let bike_atlas_handle = texture_atlases.add(bike_atlas); let rival_assets = RivalAssets {...
Rust
List<bool> valueList = values.toList(); Expect.equals(3, keyList.length); Expect.equals(3, valueList.length); Expect.equals(keys.first, map.firstKey()); Expect.equals(keys.last, map.lastKey()); } // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. U...
Dart
ioPorcentagemParcela = (vlParcela / parcela) var valorPresente = (parcela * desagioPorcentagemParcela) totalDesagio += desagio totalDesagioPorcentagemParcela += desagioPorcentagemParcela totalValorPresente += valorPresente parcelas.push({ parcela: index + 1, vlparcela: vlParcela, desagio: desagio, desag...
Typescript
[disabled][data-v-266f9077]{color:#bfbfbf;border:1px solid #dcdfe6}.le-goods--table[data-v-266f9077]{width:600px;margin-top:15px}.le-goods--table[data-v-266f9077] .le-table-row{font-size:14px;font-weight:400;color:#262626;height:72px}.le-goods--table[data-v-266f9077] .le-table-row .el-button--text{padding:0}.le-goods--...
CSS
lo[0] + padding_hi[0], iW + padding_lo[1] + padding_hi[1], C}; array in_padded(padded_shape, conv_dtype, nullptr, {}); // Fill with zeros std::vector<array> temps; temps.push_back(array(0, conv_dtype)); copy_cpu(temps.back(), in_padded, CopyType::Scalar, stream); // Pick input slice from padde...
C++
uct/242/49196) [UpdateProhibitionBatch](https://cloud.tencent.com/document/api/242/49193) [TransferProhibitionBatch](https://cloud.tencent.com/document/api/242/49194) [TransferInDomainBatch](https://cloud.tencent.com/document/api/242/49195) */ @SerializedName("LogIds") @Expose private Long [] LogIds; ...
Java
'1.5.3' //// implementation group: 'org.bytedeco', name: 'javacv-platform', version: '1.5.3' // implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.3' // implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.3', classifier: 'android-arm' // implementation group: ...
Kotlin
u $ffff860b dma_high equ $ffff8609 ;*********************; ; Registres Yamaha ; ;*********************; yam_ctrl equ $ffff8800 yam_read equ $ffff8800 yam_write equ $ffff8802 ;*********************; ; Registres PCM ; ;*********************; PCM_base equ $ffff8900 pcm_irq equ $0 pcm_mode equ $1 spl_starth equ $3...
Assembly
buffer.putDouble(value); } }, new Get<Double>() { @Override public Double get(CompositeBuffer buffer) { return buffer.getDouble(); } }); } @Test public void testDoubleIndexed() { doTestIndexed(new Doub...
Java
} /** * @internal Writes elements to XML. * * @param {EwsServiceXmlWriter} writer The writer. */ WriteElementsToXml(writer: EwsServiceXmlWriter): void { writer.WriteStartElement(XmlNamespace.Types, XmlElementNames.To); if (this.targetPeriod != null) { ...
Typescript