content stringlengths 2 6.21k | label stringclasses 16
values |
|---|---|
');
expect(colors.hsvToHex([360, 0, 0])).to.deep.equal('000000');
expect(colors.hsvToHex([360, 100, 0])).to.deep.equal('000000');
expect(colors.hsvToHex([360, 0, 100])).to.deep.equal('FFFFFF');
expect(colors.hsvToHex([360, 100, 100])).to.deep.equal('FF0000');
// Mixed
expect(colors.... | Typescript |
=== '' || authority === 'localhost') &&
isVolumeCharacter(path.charCodeAt(authorityEnd + 1))
) {
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
if (volumeSeparatorEnd !== -1) {
if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) {
... | Typescript |
/*==============================================================================
Program: 3D Slicer
Copyright (c) Kitware Inc.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Unless required by applicable law or agreed to in writing, software
distributed under the License... | C |
_for_table_key_Ethernet*_with_new_test_field_field_on_Ethernet68
=== RUN TestGnmiSubscribe/stream_query_for_table_key_Ethernet*/SAI_PORT_STAT_PFC_7_RX_PKTS_with_field_value_update
=== RUN TestGnmiSubscribe/poll_query_for_table_COUNTERS_PORT_NAME_MAP_with_new_field_test_field
=== RUN TestGnmiSubscribe/poll_query_f... | Markdown |
R14 R9 K21 ["CharacterConversion"]
GETTABLEKS R13 R14 K23 ["ExpandableCharacterListItem"]
CALL R12 1 1
GETIMPORT R13 K5 [require]
GETTABLEKS R16 R0 K11 ["Src"]
GETTABLEKS R15 R16 K24 ["Thunks"]
GETTABLEKS R14 R15 K25 ["CreateWorldModels"]
CALL R13 1 1
GETTABLEKS R14 R2 K26 ["ContextServices"]
GETTABLE... | Assembly |
ENT_BIT_KHR".enum(0x00000001)
)
EnumConstant(
"VIDEO_CODING_CONTROL_RESET_BIT_KHR".enum(0x00000001)
)
EnumConstant(
"QUERY_RESULT_STATUS_NOT_READY_KHR".."0",
"QUERY_RESULT_STATUS_COMPLETE_KHR".."1",
"QUERY_RESULT_STATUS_ERROR_KHR".."-1"
)
VkResult(
"Get... | Kotlin |
யாக சுதந்திரமாக நகரும் என்பதை சரிபார்க்கவும் (ச்டெப்பர் மோட்டார்கள் முடக்கப்பட்டுள்ளன). இல்லையென்றால், மோட்டார்கள் முடக்க M84 கட்டளையை வழங்கவும். ஏதேனும் அச்சுகள் இன்னும் சுதந்திரமாக நகர்த்த முடியாவிட்டால், கொடுக்கப்பட்ட அச்சுக்கான ச்டெப்பரை "இயக்கு_பின்" உள்ளமைவை சரிபார்க்கவும். பெரும்பாலான பொருட்களின் ச்டெப்பர் மின்ன... | Markdown |
using Qmmands;
using Qommon;
namespace Disqord.Bot.Commands.Components;
/// <summary>
/// Marks the decorated method as a component command.
/// </summary>
public abstract class ComponentCommandAttribute : CommandAttribute
{
/// <summary>
/// Gets or sets the custom ID pattern of this command.
///... | C# |
legal_argument",
RollingCounter()
),
OBSERVABILITY_EXCEPTIONS_ILLEGAL_STATE_EXCEPTION(
"exception.illegal_state",
RollingCounter()
),
OBSERVABILITY_EXCEPTIONS_IO_EXCEPTION(
"exception.io",
RollingCounter()
),
OBSERVABILITY_EXCEPTIONS_INTERNAL_SERVER_ERROR(... | Kotlin |
"?e:e(s,o,a)}class n extends t{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=t.name,n.prototype.code=r,ice[r]=n}function rce(r,e){if(Array.isArray(r)){let t=r.length;return r=r.map(i=>String(i)),t>2?`one of ${e} ${r.slice(0,t-1).join(", ")}, or `+r[t-1]:t===2?`one of ${e} ${r[0]} or ${r[1]}`:`of ${e} ${r[0]}`}el... | JavaScript |
pack that `./a.js` should be separated from `bundle.js` and built into a single chunk file.
```javascript
// a.js
module.exports = 'Hello World';
```
Now Webpack takes care of the dependencies, output files and runtime stuff. You don't have to put any redundancy into your `index.html` and `webpack.config.js`.
```htm... | Markdown |
int tx = static_cast<signed>(test + da->getWidth());
if (((*it)->getX() < tx) && ((*it)->getRX() > test)) {
placed = increase = false;
test = right
? (*it)->getX() - da->getWidth()
: (*it)->getRX();
}
}
if (placed) {
x = test;
} else if (increase) {
test += right ? -1 : 1;
}
... | C++ |
}
/**
* 获取Field中的对象 并转换为T类型
* @param field 属性
* @return 成功时返回获取到的对象 失败时抛出异常
*/
@Suppress("UNCHECKED_CAST")
fun <T> getStaticObjectAs(field: Field): T = getStaticObject(field) as T
/**
* 扩展函数 通过类型 获取类中的静态对象
*
* 不推荐使用 此函数只会返回第一次匹配到的对象
* @param type 类型
* @return 成功时返回获取到的对象 失败时抛出异常
*/
fun Class<*>.getStaticObj... | Kotlin |
/ NewFrontierInstructionSet returns the frontier instructions
// that can be executed during the frontier phase.
func newFrontierInstructionSet() [256]operation {
return [256]operation{
STOP: {
execute: opStop,
gasCost: constGasFunc(0),
validateStack: makeStackFunc(0, 0),
halts: true,... | Go |
OP1 MOVE.L EX_STRCT,A4
MOVE EX_PRN2,EX_PRN3
EX_91 MOVE EX_PRN3,D1
MOVE FCONN(A4),D0
BEQ EX_93
CMP #2,D0
BCS EX_RCRS1
CMP #6,D0
BCC EX_RCRS1
CMP #1,FCALC(A4)
BEQ EX_RCRS1
CMP FPARN(A4),D1
BGT EX_RCRS1
MOVE #223,D7
MOVE.L A4,A2
EX_94 ADD.L #EV_FSZ,A2
CMP #1,FCALC(A2)
BNE EX_95
TST FCONN(A2)
BEQ EX_ERR... | Assembly |
1 0-.19.08-.37.21-.5Zm6.59 11.41L22.2 25.8c-.13.13-.21.31-.21.5 0 .39.32.71.71.71.19 0 .37-.07.5-.21l1.59-1.59c.13-.13.21-.31.21-.5 0-.39-.32-.71-.71-.71-.19 0-.37.07-.5.21ZM15 23.97v-1.23c0-.44.28-.83.69-.97l2.14-.71c.11-.03.22-.05.33-.05h1.59c.16 0 .32.04.46.11l1.21.61c.35.17.57.53.57.92v1.12c0 .16-.04.32-.11.46l-.61... | Dart |
}
return units;
}
/*
(DoesUnitNeedHelp)
Unit need help if:
1. Player has more units nearby
2. Player has more total power nearby this specific unit
3. Unit is flanked
return value is range from 0 to 100,
0 unit does not need any help
1 - unit need help urgently
*/
export const DoesUnitNeedHelp = (... | Typescript |
51:
!$EV trig_pc_d(3,expr(@VA(.MAIN.T3_hwint_1351), 16, 16)) -> intp(3, 0, 2e)
.word 0xb53cc000 ! 9864: SRA_R sra %r19, %r0, %r26
T3_irf_ce_825:
!$EV error(3,expr(@VA(.MAIN.T3_irf_ce_825), 16, 16),1,IRF,ce,57,22, x,x,x, x,x,x)
.word 0xb8450000 ! 9867: ADDC_R addc %r20, %r0, %r28
.word 0xbfa81420 ! 9867: FMOVRNZ... | Assembly |
、ERC721 という NFT トークンを発行可能なインターフェースに準拠しています。なお、実装は [openzeppelin の ERC721](https://docs.openzeppelin.com/contracts/3.x/erc721) を継承していますが、一部独自の実装もあります。実装内容は [こちら](/contract/contracts/SimpleERC721.sol)。
## Contract のコンパイル
まずは、必要なモジュールをインストールします。
```bash
npm install
```
続いて、hardhat を利用して Contract をコンパイルします。
```bash
np... | Markdown |
, 'Not authenticated');
if (questId === undefined) return sendRes(res, false, 403, 'Please provide a quest Id');
try {
const template = await Quest.findByPk(questId);
if (!template) return sendRes(res, false, 403, 'No template found with that questId');
const friends = await user.getFriends();
con... | Typescript |
NECTING: WMT_STATUS = 28i32;
#[doc = "*Required features: `\"Win32_Media_WindowsMediaFormat\"`*"]
pub const WMT_BACKUPRESTORE_DISCONNECTING: WMT_STATUS = 29i32;
#[doc = "*Required features: `\"Win32_Media_WindowsMediaFormat\"`*"]
pub const WMT_ERROR_WITHURL: WMT_STATUS = 30i32;
#[doc = "*Required features: `\"Win32_Med... | Rust |
ts
const MAX_DECIMALS = 18;
/**
* Converts a value (expressed in unit) to wei.
*
* @param value value expressed in 'unit'
* @param unit unit for value
*/
export function toWei(value: string | number | BN, unit: EthUnit): BN;
/**
* Converts a value in wei to specified unit.
* @param value ... | Typescript |
EquipmentTypeId> values = {
0: NONE,
1: Weapon};
static const fb.Reader<EquipmentTypeId> reader = _EquipmentTypeIdReader();
@override
String toString() {
return 'EquipmentTypeId{value: $value}';
}
}
class _EquipmentTypeIdReader extends fb.Reader<EquipmentTypeId> {
const _EquipmentTypeIdReader(... | Dart |
ed;
/// The basic amount of funds that must be reserved for an order.
#[pallet::constant]
type AuctionDeposit: Get<BalanceOf<Self, I>>;
/// The amount of auction fee as tax
#[pallet::constant]
type AuctionFeeTaxRatio: Get<Perbill>;
/// Minimum deadline of auction
#[pallet::constant]
type MinDeadline: ... | Rust |
as.EnhancedCrossReaping))
{
if (!ReaperSettings.Instance.UseAoe || !ReaperSettings.Instance.EfficientAoEPotencyCalculation || Utilities.Routines.Reaper.EnemiesIn8YardCone * 200 < 520)
return await Spells.CrossReaping.Cast(Core.Me.CurrentTarget);
}
... | C# |
luster.mihelper.data.Pref
import dev.lackluster.mihelper.hook.drawable.MediaControlBgDrawable
import dev.lackluster.mihelper.hook.drawable.TransitionDrawable
import dev.lackluster.mihelper.hook.rules.systemui.media.MediaControlBgFactory.brightness
import dev.lackluster.mihelper.hook.rules.systemui.media.MediaControlBgF... | Kotlin |
to final position with a buffer tolerance`() {
val finalPosition = LatLng(10.0, 10.0)
val durationMs = 100L
// Start the animation
AnimationUtil.animateMarkerTo(marker, finalPosition, durationMs)
val mainLooper = Shadows.shadowOf(android.os.Looper.getMainLooper())
// ... | Kotlin |
_EXPLOSION_MAP.put(ParticleRegistry.NIGHTFALL_PARTICLE, new Vec3d(1, 1, 1));
CORE_BEAM_EXPLOSION_MAP.put(ParticleTypes.CLOUD, new Vec3d(1.25, 1.25, 1.25));
}
public static void mjolnirLeviathanAxeCollision(World world, double x, double y, double z) {
HashMap<ParticleEffect, Vec3d> map = Maps.ne... | Java |
play:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .pr... | CSS |
en(af))
for i, row := range af {
if got := Row(nil, i, a); !reflect.DeepEqual(got, row) {
t.Errorf("test %d: unexpected values returned for dense row %d: got: %v want: %v",
id, i, got, row)
}
got := make([]float64, len(row))
if Row(got, i, a); !reflect.DeepEqual(got, row) {
t.Errorf("test %d... | Go |
warnings before we #include anything
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETER... | C++ |
r5, .LuigiTalkNPC_TakeOutStar@ha
addi r5, r5, .LuigiTalkNPC_TakeOutStar@l
mr r6, r5
addi r7, r13, sInstance__Q210NrvRosetta14RosettaNrvWait - STATIC_R13
li r8, 0
bl __ct__11TakeOutStarFP8NPCActorPCcPCcPC5Nervel
.LuigiTalkNpcInitJumpLoc_Failure:
stw r3, 0x164(r29)
mr r3, r29
bl declarePowerStar__2MR... | Assembly |
function will be call and then
* kfree() the memory.
*/
extern void edac_pci_free_ctl_info(struct edac_pci_ctl_info *pci);
/**
* edac_pci_alloc_index: Allocate a unique PCI index number
*
* Returns:
* allocated index number
*
*/
extern int edac_pci_alloc_index(void);
/**
* edac_pci_add_device(): Insert... | C |
Metadata": {
"HTTPHeaders": {
"content-length": "1737",
"content-type": "text/xml",
"date": "Thu, 30 May 2019 20:08:32 GMT",
"x-amzn-requestid": "c52dccd3-9d9c-5f34-9e74-99b9a71cc3e9"
},
"HTTPStatusCode": 200,
"RequestId": "c52dccd3-9d9c-5f34-9e74-99b9a71cc3e9",
"RetryAttempt... | Markdown |
ategory("NumericRange")]
public void UpdateRangeMatrixTest()
{
int[,] dstInt3x3Matrix = new int[,]
{
{ 1, 2, 3 },
{ 4, 5, 6 },
{ 7, 8, 9 }
};
var dstMatrix = new Matrix(dstInt3x3Matrix, BuiltInType.Int32);
... | C# |
(params.text), params.variables)
{
Ok(data) => dbg!(data),
Err(error) => dbg!(error),
};
Ok(())
}
<reponame>timboldt/rusty-two-wheel
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with t... | Rust |
c_returning_failure_E_on_valuetask_success_E_returns_failure()
{
ValueTask<UnitResult<E>> sut = UnitResult.Success<E>().AsValueTask();
UnitResult<E> result = await sut.BindTry(ValueTask_UnitResult_Failure_E, e => E.Value2);
AssertFailure(result);
}
[Fact]
... | C# |
from django.contrib import admin
from blog.models import Blogpost
# Register your models here.
@admin.register(Blogpost)
class AdminBlogpost(admin.ModelAdmin):
list_display = (
'title',
'content',
'preview',
'views_count',
'date_create',
'is_published',
)
| Python |
or if you find it useful, you can support us at:
*
* https://plantuml.com/patreon (only 1$ per month!)
* https://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
... | Java |
系。参见本书第二卷《新民主主义论》第九节和第十节。
〔21〕一九二四年,孙中山在共产党人的帮助下,将国民党改组成各阶级的民主革命的联盟。当时,中国共产党的许多党员曾以个人名义参加国民党。一九二七年蒋介石、汪精卫相继叛变革命以后,在全国各地屠杀共产党人以及国民党内许多真正拥护孙中山三大政策的左派分子,他们称之为“清党运动”。从此,国民党基本上变成代表大地主大资产阶级的反动集团。
〔22〕 这里是指一九二七年上半年陈独秀右倾投降主义的领导所造成的情况。 # 在晋绥干部会议上的讲话
(一九四八年四月一日)
同志们,今天我想讲的,主要地是一些和晋绥工作有关的问题,然后讲到一些和全国工作有关的问题。 ... | Markdown |
#ifndef PATCH_H
#define PATCH_H
#include "Utilities.h"
#include "Console.h"
#include "Disassembler.h"
#include <keystone/keystone.h>
#include <unordered_map>
#include "StringPatcher.h"
enum section { non_allocated = 0, extra_rdata1 = 1, extra_text1 = 2, extra_text2 = 3, extra_str = 4};
class Patch {
public:
Pat... | C |
-caption-buttons a:nth-child(2n+1) {
background-color: #fff;
color: #333;
}
.seriousslider-light .seriousslider-caption-buttons a:hover:nth-child(2n+1) {
background-color: #444;
border-color: #444;
color: #FFF;
}
.seriousslider-light .seriousslider-control {
width: 50px;
height: 50px;
font-s... | CSS |
= c29sZXM= KG5hbWVz IEJpZA== LXBvd2VyZWQ= TXVsdA== YW1pbGlhcg== LmNsZWFuZWQ= IFppbW1lcg== CWNsZWFy IHVuc3VwcG9ydGVk Q2FsbGFibGU= IHJlcHM= YWx0ZXJu X1JFUE9SVA== LmdldENvbHVtbkluZGV4 X1NUT1JF IHN1Y2h0 c3VidGl0bGU= IHBlcmQ= q5g= Lk5PVA== fT48Lw== OmQ= bWRp YmluZFZhbHVl IERlY2lzaW9u UmV0dXJuVmFsdWU= LGluZGV4 eGZj IHNlcnVt ... | JavaScript |
= os.Stderr
if err := cmd.Run(); err != nil {
t.Errorf("eg tests for %s failed: %s.\n%s\n", filename, err, buf)
if *updateFlag {
t.Logf("Updating %s...", golden)
if err := exec.Command("/bin/cp", got, golden).Run(); err != nil {
t.Errorf("Update failed: %s", err)
}
}
}
}
}
// Copyright ... | Go |
,
"database": F01BC,
"database-alert": F163A,
"database-alert-outline": F1624,
"database-arrow-down": F163B,
"database-arrow-down-outline": F1625,
"database-arrow-left": F163C,
"database-arrow-left-outline": F1626,
"database-arrow-right": F163D,
"database-arrow-right-outline": F1627,
"database-arrow... | CSS |
}
// 数据为空的话会报错,为空则为零
if (d != null) {
line.type(SeriesType.line).data(d);
} else {
line.type(SeriesType.line).data(0);
}
if (yAxisIndex != null && yAxisIndex.get(key) != null) {
line.type(SeriesType.line).yAxisIndex(yAxisIndex.get(key));
// 显示直线,而不是密密麻麻的点,一点都不好看
line.symbol... | Java |
目与容器边框之间也是同样长度的间隔。

`place-content`属性是`align-content`属性和`justify-content`属性的合并简写形式。
> ```css
> place-content: <align-content> <justify-content>;
> ```
下面是一个例子。
> ```css
> place-content: space-around space-evenly;
> ```
如果省略第二个值,浏览器就会假定第二个值等于第一个... | Markdown |
ggerId []int32 `json:"TriggerId,omitempty"` //触发器类型
TriggerRelation int32 `json:"TriggerRelation,omitempty"` //触发器条件关系
}
// SkillBase.csv属性表集合
type SkillBaseEntries struct {
Rows map[int32]*SkillBaseEntry `json:"Rows,omitempty"` //
}
func init() {
excel.AddEntryLoader("SkillBase.csv",... | Go |
ait windowManager.setSize(const Size(400, 600));
await windowManager.setAlignment(Alignment.topRight);
await initEnv(kAppTypeMain);
for (var client in testClients) {
gFFI.serverModel.clients.add(client);
gFFI.serverModel.tabController.add(TabInfo(
key: client.id.toString(),
label: client.n... | Dart |
ambém o conceito de janelas, hipertexto, gráficos, vídeo conferência,
processador de texto, controle de versão e um editor de texto colaborativo. Essa
apresentação foi — e é — um marco na história da computação, e ficou conhecida
como **A Mãe de Todos os Demos**, a demonstração mais fantástica e à frente de
seu tempo d... | Markdown |
inTolerance, kDaikinMarkExcess, false);
if (used == 0) return false;
offset += used;
pos += ksectionSize[section];
}
// Compliance
if (strict) {
if (!IRDaikin128::validChecksum(results->state)) return false;
}
// Success
results->decode_type = decode_type_t::DAIKIN128;
results->bits = nbi... | C++ |
}
func TestWrappedFindDataFromParsedError(t *testing.T) {
{
genericErr := DataKind[int]("generic_error")
urlErr := DataKind[string]("url_error")
err := newErr(1741657070, "something went wrong").WithKind(genericErr(30))
err = wrapErr(1741657072, err).WithKind(urlErr("https://www.google.com"))
err1 := fmt.E... | Go |
logger.set_dimensions({dimension_key: dimension_value})
# act
await logger.flush()
context = sink.accept.call_args[0][0]
dimensions = context.get_dimensions()
assert len(dimensions) == 1
assert dimensions[0][dimension_key] == dimension_value
await logger.flush()
context = sink.accep... | Python |
sink.write(Buffer().writeUtf8("abcdefghij"), 10)
handle.reposition(sink, 5)
assertEquals(5, handle.position(sink))
sink.write(Buffer().writeUtf8("KLM"), 3)
assertEquals(8, handle.position(sink))
handle.reposition(sink, 200)
sink.write(Buffer().writeUtf8("ABCDEFG... | Kotlin |
# time_input_widget.py
from PyQt5.QtWidgets import QWidget, QHBoxLayout, QLabel, QSpinBox
class TimeInputWidget(QWidget):
def __init__(self, parent=None):
super().__init__(parent)
# 创建控件
self.days_spinbox = QSpinBox()
self.days_spinbox.setRange(0, 365)
self.days_spinbox.s... | Python |
_flat.reshape((b, oc, o0, o1, o2)) # circular!
# Now we extract the region of interest.
# We just cut it out from the output_circ
# array that was used for the computation.
# We do not need to handle pad_last_dim in a
# special way because we specify explicitly here
# how much values are expec... | Python |
ableOfColorFromBytes(t) -- { { 255,255,0,255 }, {}...} -> { { 1,1,0,1 }, {}...}
for i = 1, #t do
t[i] = {love.math.colorFromBytes(unpack(t[i]))}
end
return t
end | Lua |
= source_entry.get_mut();
source_space.pieces.remove(piece_index)
} else {
None
};
if let Some(piece) = possible_piece {
if let Occupied(mut target_entry) = board.entry(to) {
let mut target_space = target_entry.get_mut();
//shpuld this be an insert at 0
... | Rust |
et;
import gnu.testlet.TestHarness;
public class write implements Testlet
{
class TestOutputStream extends FilterOutputStream
{
TestOutputStream (ByteArrayOutputStream baos)
{
super(baos);
}
}
public void test (TestHarness harness)
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FilterOut... | Java |
---@class renewed_weather : OxClass
---@field weather string
---@field time number
---@field windSpeed? number
---@field windDirection? number
---@field isRain boolean
local weather_class = lib.class('renewed_weather')
---@class renewed_weather_payload
---@field weather string
---@field time number
---@field isRain bo... | Lua |
n=e.indexOf(t);n>-1&&e.splice(n,1)}}function wt(e,t,n){var i="hash"===n?"#"+t:t;return e?N(e+"/"+i):i}yt.install=se,yt.version="3.6.5",yt.isNavigationFailure=Ye,yt.NavigationFailureType=Fe,yt.START_LOCATION=g,le&&window.Vue&&window.Vue.use(yt)},"8ca5":function(e,t){function n(e){var t="('|\\.')+",n={relevance:0,contain... | JavaScript |
id']),
tipoPagamento: serializer.fromJson<int?>(json['tipoPagamento']),
produto: serializer.fromJson<int?>(json['produto']),
r01: serializer.fromJson<int?>(json['r01']),
r02: serializer.fromJson<int?>(json['r02']),
r03: serializer.fromJson<int?>(json['r03']),
r04: serializer.fromJson... | Dart |
/x-amz-json-1.1',
'X-Amz-Target': 'AmazonForecast.CreateExplainability'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ExplainabilityConfig': explain... | Dart |
Reinforced() and 2 or 1
end
-- normal armor level change (update)
if STATUS:Active("ttt_armor_status") then
STATUS:SetActiveIcon("ttt_armor_status", icon_id)
return
end
-- added armor if not active
STATUS:AddStatus("ttt_armor_status", icon_id)
end
-- SERVER -> CLIENT ARMOR SY... | Lua |
ither version 3 of the License, or
* (at your option) any later version.
*
* Encom 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 Lesser Public License for more details.
... | Java |
ExternalView(record));
routingTable.onExternalViewChange(externalViewList, changeContext);
instances = routingTable.getInstances("TESTDB", "TESTDB_0", "SLAVE");
AssertJUnit.assertNotNull(instances);
AssertJUnit.assertEquals(instances.size(), 1);
} finally {
routingTable.shutdown();
... | Java |
ght(this);
CShadows::StoreShadowForPole(this, 4.81F, 0.0F, 0.0F, 16.0F, 0.4F, 0);
} else if (m_nModelIndex == ModelIndices::MI_TRAFFICLIGHTS_TWOVERTICAL) {
CTrafficLights::DisplayActualLight(this);
CShadows::StoreShadowForPole(this, 7.503F, 0.0F, 0.0F, 16.0F, 0.4F, 0);
} else if (m_nMode... | C++ |
ate<TableStory> {
late final List<_TableData> _tableDataOriginal;
late List<_TableData> _tableDataToShow;
final List<String> _columnNames = [
'ID',
'First name',
'Last name',
'Age',
'Activity',
];
final List<bool> _columnSorting = List.generate(6, (int _) => true);
bool _checkAllBoxes... | Dart |
ments for RPC
parser.add_argument("--scanner-host", help="Host running the scanner service (optional)")
parser.add_argument("--scanner-port", type=int, default=18861, help="Port of the scanner service")
args = parser.parse_args()
source_dir = args.source_dir
dest_dir = args.dest_dir
timeout = a... | Python |
32_t back_max = i->second.hb_max_back;
uint32_t front_avg = i->second.hb_total_front / i->second.hb_average_count;
uint32_t front_min = i->second.hb_min_front;
uint32_t front_max = i->second.hb_max_front;
// Reset for new interval
i->second.hb_average_count = 0;
... | C++ |
lignment()
perform_data_layout_alignment data;
view->Perform(PERFORM_CODE_LAYOUT_ALIGNMENT, &data);
return data.return_value;
}
extern "C" bool
_ReservedView6__5BView(BView* view)
{
// HasHeightForWidth()
perform_data_has_height_for_width data;
view->Perform(PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH, &data);
return da... | C++ |
eb) {
throw UnsupportedError('Web平台不支持加载本地字幕文件');
}
try {
final filePickerService = FilePickerService();
final filePath = await filePickerService.pickSubtitleFile();
if (filePath == null) return null;
final fileName = p.basename(filePath);
// 检查文件格式
final validExten... | Dart |
}
}
[Test]
public void TestPackCollectionEnumerable_NotNull()
{
using ( var buffer = new MemoryStream() )
using ( var packer = CreatePacker( buffer ) )
{
packer.PackCollection( Enumerable.Range( 1, 3 ) );
Assert.AreEqual(
new byte[] { 0x93, 1, 2, 3 },
this.GetResult( packer )
... | C# |
ree
/dev/sda2 os lvm2 a-- 73.42g 19.53g
/dev/sda3 os lvm2 a-- 158.97g 158.97g
/dev/sdb1 lvm2 a-- 232.88g 232.88g
```
Since we do not need anymore for the physical volume ``/dev/sdb1`` , remove it from the LVM layout
```
# pvremove /dev/sdb1
Labels on physical volume "/dev/sdb1" successfully wi... | Markdown |
#include "com_alarm_list.h"
#define BTNMX_CLEAR_ID 10
#define BTNMX_RESET_ID 11
#define BTNMX_OK_ID 12
static lv_obj_t* com_parent;
static lv_obj_t* list_alarm;
static lv_obj_t* re_focus;
static lv_obj_t* time_cont;
static lv_obj_t* label_time;
static char time_txt[8];
static const char* btnm_map[] = { "1", "2... | C |
completing all 120 shrines.",
Items: [
{
Equip: "Head",
Name: "Cap of the Wild",
"Upgrade Requirements": {
1: { "Acorn": 10, "Farosh’s Scale": 2 },
2: { "Courser Bee Honey": 5, "Farosh’s Claw": 2 },
3: { "Energetic Rhino Beetle": 5, "Farosh’s Fang": 2 },
4: { "Star Fragment": 1, "S... | Typescript |
bitmap = Bitmap()
bitmap.allocPixels(ImageInfo.makeS32(25, 25, ColorAlphaType.OPAQUE))
val shader = bitmap.makeShader(Matrix33.makeRotate(45f))
}
@Test
fun canExtractAlpha() = runTest {
val bitmap = Bitmap()
bitmap.allocPixels(ImageInfo.makeS32(25, 25, ColorAlphaType.OPAQUE... | Kotlin |
xad,0x00,0x14,0xb2,0x00,0x08,0x00,0x00]
vunpcklpd 2048(%rdx), %xmm26, %xmm30
// CHECK: vunpcklpd -2048(%rdx), %xmm26, %xmm30
// CHECK: encoding: [0x62,0x61,0xad,0x00,0x14,0x72,0x80]
vunpcklpd -2048(%rdx), %xmm26, %xmm30
// CHECK: vunpcklpd -2064(%rdx), %xmm26, %xmm30
// CHECK: encoding: [0x62,0x... | Assembly |
g
import androidx.lifecycle.lifecycleScope
import com.google.android.material.textfield.TextInputLayout
import com.hippo.ehviewer.R
import com.hippo.ehviewer.Settings
import com.hippo.ehviewer.client.EhCookieStore
import com.hippo.ehviewer.client.EhEngine
import com.hippo.ehviewer.client.EhUrl
import com.hippo.ehviewer... | Kotlin |
.test.TestContainer
import me.him188.ani.test.TestFactory
import me.him188.ani.test.runDynamicTests
import kotlin.test.assertEquals
@TestContainer
class MediaListFilterEpisodeFilterTest {
@TestFactory
fun `base cases`() = runDynamicTests {
case(
"simple sort match",
subjectName... | Kotlin |
reorderer.afterBoxReflow,
scope: me
});
}
// If not animated, clean up after the mouseup has happened so that we don't click the thing being dragged
else {
Ext.Function.defer(me.reorderer.afterBoxReflow, 1, me);
}
... | JavaScript |
n deserialize<_i4.ChatJoinChannel>(data['data']);
}
if (dataClassName == 'ChatJoinChannelFailed') {
return deserialize<_i5.ChatJoinChannelFailed>(data['data']);
}
if (dataClassName == 'ChatJoinedChannel') {
return deserialize<_i6.ChatJoinedChannel>(data['data']);
}
if (dataClassName ... | Dart |
_t *arcs, size_t arcs_count);
/*
* Parse the OBJECT IDENTIFIER textual representation ("1.3.6.1.4.1.9363").
* No arc can exceed the (0..ASN_OID_ARC_MAX, which is the same as UINT32_MAX).
* This function is not specific to OBJECT IDENTIFIER, it may be used to parse
* the RELATIVE-OID data, or any other data consis... | C |
All() {
logger.log('document.write("");', 'grind', 1);
document.write('');
for(var i=1; i<id.length; i++) {
logger.log('id_' + i + ' = null;', 'grind', 1);
id[i] = null;
}
logger.log('gc();', 'grind', 1);
gc();
//window.open('', '_self', '');
//window.close();
}
funct... | JavaScript |
the corresponding reshaped column and row indices.
Two arguments are required:
an argument `old_shape` specifies the original shape of the matrix,
and `new_shape` specifies the new shape.
One of the dimension in `old_shape` and `new_shape` can be -1.
The valid combinations are listed below, where p, q, r, s are
strict... | C++ |
from django.contrib import admin
from .models import Usuario
@admin.register(Usuario)
class UsuarioAdmin(admin.ModelAdmin):
list_display = ['username', 'email', 'first_name', 'last_name', 'telefono_personal', 'tipo_usuario']
search_fields = ['username', 'email', 'first_name', 'last_name']
list_filter = ['t... | Python |
('limitTo', limitToFilter);
register('lowercase', lowercaseFilter);
register('number', numberFilter);
register('orderBy', orderByFilter);
register('uppercase', uppercaseFilter);
}
/**
* @ngdoc filter
* @name ng.filter:filter
* @function
*
* @description
* Selects a subset of items from `array` and return... | JavaScript |
void)adjustLayoutToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
- (void)layoutPreviewLayer;
- (void)saveVideo;
- (NSURL *)videoFileURL;
@end
///////////////////////////////// CvPhotoCamera ///////////////////////////////////////////
@class CvPhotoCamera;
@protocol CvPhotoCameraDelegate <NSObj... | C |
NKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7h... | CSS |
ow_wood',
recipe = {
{'', 'farming:string', 'default:wood'},
{'default:wood', 'default:wood', 'default:wood'},
{'', 'farming:string', 'default:wood'},
}
})
minetest.register_craft({
output = 'lottthrowing:crossbow_steel',
recipe = {
{'', 'farming:string', 'default:steel_ingot'},
{'default:wood', 'default... | Lua |
38 84 FF FF */ addi r4, r4, -1
/* 801D29D4 001CE634 FC 40 10 1E */ fctiwz f2, f2
/* 801D29D8 001CE638 D8 41 02 C8 */ stfd f2, 0x2c8(r1)
/* 801D29DC 001CE63C 80 01 02 CC */ lwz r0, 0x2cc(r1)
/* 801D29E0 001CE640 6C 00 80 00 */ xoris r0, r0, 0x8000
/* 801D29E4 001CE644 90 01 02 4C */ stw r0, 0x24c(r1)
/* 801D29E8 00... | Assembly |
/*******************************************************************************
* Copyright (c) 2009, 2022 IBM Corp., Ian Craggs
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* and Eclipse Distribution License v1.0 whic... | C |
#!/usr/bin/env python3
"""
Advanced EAT agent demonstrating multi-tool workflows with error handling.
This example shows how to chain multiple tools together for complex tasks.
"""
import asyncio
import sys
import os
from typing import List, Dict, Any
# Add parent directory to path for imports
sys.path.insert(0, os.p... | Python |
h = (hash << 5) - hash + string.charCodeAt(i)
hash |= 0 // Convert to 32bit integer
}
return hash + ''
}
/**
* Hash a string using the FNV-1a algorithm.
*
* @public
*/
export function getHashForObject(obj: any) {
return getHashForString(JSON.stringify(obj))
}
/** @public */
export function lns(str: string) {... | Typescript |
/*!
\file named_critical_section.h
\brief Named critical section synchronization primitive definition
\author Ivan Shynkarenka
\date 26.05.2016
\copyright MIT License
*/
#ifndef CPPCOMMON_THREADS_NAMED_CRITICAL_SECTION_H
#define CPPCOMMON_THREADS_NAMED_CRITICAL_SECTION_H
#include "threads/locker.h... | C |
und = tex_def;
_btnStyle.hover.background = tex_hov;
_btnStyle.onNormal.background = tex_on;
_btnStyle.onActive.background = tex_on;
_btnStyle.onHover.background = tex_onHov;
RescaleAndSetTextures();
}
public virtual void RescaleAndSetTexture... | C# |
, 0x73, 0x62,// scasb
0x05, 0x73, 0x63, 0x61, 0x73, 0x77,// scasw
0x05, 0x73, 0x63, 0x61, 0x73, 0x64,// scasd
0x05, 0x73, 0x63, 0x61, 0x73, 0x71,// scasq
0x04, 0x72, 0x65, 0x74, 0x77,// retw
0x04, 0x72, 0x65, 0x74, 0x64,// retd
0x04, 0x72, 0x65, 0x74, 0x6C,// retl
0x05, 0x72, 0x65, 0x74, 0x6E, 0x64,// retnd
0x0... | Rust |
import polars as pl
def test_rolling_var_stability_12905() -> None:
s1 = pl.Series("a", [36743.6 for _ in range(10)])
assert s1.rolling_var(window_size=12, min_samples=2).sum() == 0.0
assert s1.rolling_std(window_size=12, min_samples=2).sum() == 0.0
| Python |
699448, 243460643}}, // 645
// {"rnbkrbqn/p1pp1ppp/4p3/1p6/8/BPN3P1/P1PPPP1P/R2KRBQN w EAea - 2 9", {29,
// 692, 20014, 500375, 14904192, 386694739}}, // 646
// {"rnbkrqn1/pppppp2/8/1Q2b1pp/P3P3/5P2/1PPP2PP/RNBKR1NB w EAea - 0 9",
// {37, 1001, 36440, 987842, 35626426, 993747544}}, // 647
// {"rb... | C++ |
--- **AceComm-3.0** allows you to send messages of unlimited length over the addon comm channels.
-- It'll automatically split the messages into multiple parts and rebuild them on the receiving end.\\
-- **ChatThrottleLib** is of course being used to avoid being disconnected by the server.
--
-- **AceComm-3.0** can be ... | Lua |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.