content stringlengths 2 6.21k | label stringclasses 16
values |
|---|---|
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class VehicleService(Document):
pass
| Python |
style.display = DisplayStyle.None;
_uploadProgressBarHeader.value = 0f;
_uploadProgressBarFlow.style.display = DisplayStyle.None;
_uploadProgressBarFlow.value = 0f;
_uploadProgressBarFlow.title = string.Empty;
}
private void ResetUploadButton()
{... | C# |
r(self):
"""Measures the direct-to-reverberant ratio of the impulse
response.
Returns
-------
float
Direct-to-reverberant ratio
"""
early_response, late_field, _ = self.decompose_ir()
num = (early_response**2).sum(dim=-1)
den = (late_f... | Python |
)
val path =
filePath.substring(0, filePath.lastIndexOf(File.separatorChar))
log(TAG, "path = $path")
//-----------------------------------------
val imageFolder = FolderBean()... | Kotlin |
ureCellContextImprint(self)
}
}
impl SecureCellWithPassphrase {
/// Switches this Secure Cell into the _Seal_ operation mode.
pub fn seal(self) -> SecureCellSealWithPassphrase {
SecureCellSealWithPassphrase(self)
}
}
/// Secure Cell in _Seal_ operation mode.
///
/// This is the most secure and... | Rust |
"start": &types.SandboxHookNative{Enabled: true},
},
Image: types.ContainerImage{
Name: "nginx",
Tag: "latest",
},
Registry: types.ContainerRegistry{
Auth: types.ContainerRegistryAuth{
Username: "user",
Password: "pass",
},
},
}).Return(nil, errors.New... | Go |
G_37 55
#define MOVE_EFFECT_NOTHING_38 56
#define MOVE_EFFECT_NOTHING_39 57
#define MOVE_EFFECT_NOTHING_3A 58
#define MOVE_EFFECT_SP_ATK_TWO_DOWN 59
#define NUM_MOVE_EFFECTS 60
#define MOVE_EFFECT_AFFECTS_USER (1 << 6) // 64
#define MOVE_EFFECT_CERTAIN ... | C |
telemetry.io/proto/otlp: v1.0.0 → v1.3.1
- go.uber.org/goleak: v1.2.1 → v1.3.0
- go.uber.org/zap: v1.19.0 → v1.27.0
- golang.org/x/crypto: v0.25.0 → v0.30.0
- golang.org/x/exp: a9213ee → 8a7402a
- golang.org/x/mod: v0.17.0 → v0.21.0
- golang.org/x/net: v0.27.0 → v0.32.0
- golang.org/x/oauth2: v0.20.0 → v0.24.0
- golang... | Markdown |
} else {
// _mUiCurrentSensorState.emit(null)
_uiState.emit(
_uiState.value.copy(
currentSensor = null,
activeSensorCounts = _mActiveSensorList.size
)
)
}
}... | Kotlin |
ion doesUserHaveFeaturedCube(userid) {
const cubes = await getFeaturedQueueForUser(userid);
return cubes.length > 0;
}
async function replaceForUser(userid, cubeid) {
// Use the owner-filtered query instead of fetching entire queue
const cubes = await getFeaturedQueueForUser(userid);
if (cubes.length === 0)... | JavaScript |
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : MotionLayout(context, attrs, defStyleAttr) {
private var attached: Boolean = false
private val transitionListener = object : TransitionListener {
override fun onTransitionStarted(
motionLayout: MotionLayo... | Kotlin |
== toNFC(X) == toNFD(X) == toNFKC(X) == toNFKD(X)
#
@Part0 # Specific cases
#
1E0A;1E0A;0044 0307;1E0A;0044 0307; # (Ḋ; Ḋ; D◌̇; Ḋ; D◌̇; ) LATIN CAPITAL LETTER D WITH DOT ABOVE
1E0C;1E0C;0044 0323;1E0C;0044 0323; # (Ḍ; Ḍ; D◌̣; Ḍ; D◌̣; ) LATIN CAPITAL LETTER D WITH DOT BELOW
1E0A 0323;1E0C 0307;0044 0323 0307;1E0C 0307;... | Kotlin |
='f9/x9'>f9/x9</a>
[fa]=<a href='http://www.apache.org/fa/xa#MY_LABEL'>http://www.apache.org/fa/xa#MY_LABEL</a>
[fb]=<a href='http://www.apache.org/fb/xb?label=MY_LABEL&foo=bar'>MY_LABEL</a>
[fc]=<a href='http://www.apache.org/fc/xc?foo=bar&label=MY_LABEL'>MY_LABEL</a>
[fd]=<a href='http://www.apach... | Java |
override fun getMemberVar(key: String, accessModifier: Member.AccessModifier): Pair<Var<*>?, Boolean> {
return field.getMemberVar(key, accessModifier)
}
fun getter(): Var<*> {
return property.getter(caller, field)
}
fun setter(b: Var<*>){
property.setter(caller, field, b)... | Kotlin |
["Count"] = apertureInfo.Count;
apertureUseTable.Rows.Add(row);
}
}
apertureUseDataGridView.DataSource = apertureUseTable;
apertureUseDataGridView.AutoGenerateColumns = true;
apertureUseDataGridView.SelectionMode = DataGridViewSelectio... | C# |
e {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_seconds Rust documentation for `has_seconds`} for more information.
* @throws {@link FFIError}<{@link ICU4XError}>
*/
gmt_offset_has_seconds(): boolean | never;
/**
* Sets the `time_zone_id` field from a string.
* Error... | Typescript |
af72.png\" loading=\"lazy\"></a></p>\n<h2 data-sourcepos=\"650:1-650:15\">\n<span id=\"おわりに\" class=\"fragment\"></span><a href=\"#%E3%81%8A%E3%82%8F%E3%82%8A%E3%81%AB\"><i class=\"fa fa-link\"></i></a>おわりに</h2>\n<p data-sourcepos=\"652:1-653:135\">ちょいちょい時間を見つけて更新していたら1年ぐらいかかりましたが、全部書けてよかったです。<br>\nなんとなく意識高く難しく感じる『デザイン... | JavaScript |
/*
* SPDX-FileCopyrightText: 2011 Dmitry Kazakov <dimula73@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __STROKE_TESTING_UTILS_H
#define __STROKE_TESTING_UTILS_H
#include <QString>
#include <KoCanvasResourceProvider.h>
#include "kis_node.h"
#include "kis_types.h"
#include "kis_stroke_stra... | C |
-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and Chan... | C++ |
consumer.getFacts().put(factPrefix + "virbr0.ipv4_address.global_list", ip);
consumer.getFacts().put(factPrefix + "virbr0.ipv4_address.link_list", ip);
ConduitFacts conduitFacts = controller.getFactsFromConsumer(consumer);
assertEquals(uuid, conduitFacts.getSubscriptionManagerId());
var nic = conduit... | Java |
new Promise(async (resolve, reject) => {
try {
// Display loading message
// toast.loading(`Song ${name} Downloading...`, {
// id: 'loading-toast' // Set a unique ID for the loading toast
// });
// Perform the download
const res = await fetc... | JavaScript |
INC_CLIENT()
local matTrail = Material("trails/physbeam")
local colTrail = Color(230, 35, 45)
local matGlow = Material("sprites/light_glow02_add")
local vector_origin = vector_origin
function ENT:Draw()
render.SetBlend(0.4)
self:DrawModel()
render.SetBlend(1)
render.SetMaterial(matTrail)
for i=1, #self.TrailPo... | Lua |
enable_groups | 否 | [] | 是否使用Reaction🐳代替设精,用于防止精华消息过于泛滥导致刷屏 |
如果要寻找数据库和缓存的位置,请参考nonebot文档的[data-storing](https://nonebot.dev/docs/best-practice/data-storing)章节
## 🎉 使用
### 指令表
| 指令 | 权限 | 需要@ | 范围 | 说明 |
| ----------------------- | ------ | -----... | Markdown |
var builder = DistributedApplication.CreateBuilder(args);
var mongoServer = builder.AddMongoDB("mongoserver")
.WithDataVolume()
// 👇🏼 Seed data using script(s) in mongodb-init folder. You can have multiple ones
.WithInitBindMount("mongodb-init")
// 👇🏼 Add web-based MongoDB admin in... | C# |
: Armor
/// </summary>
OiledLeatherLeggings = 33241,
/// <summary>
/// Legs
/// Level: 40
/// Class: Armor
/// </summary>
RaptorhideLegguards = 33242,
/// <summary>
/// Head
/// Level: 39
/// Class: Armor
/// </summary>
SkirmishersCover = 33243,
/// <summary>
/// Head
/// Level: 39
/... | C# |
股市大跌,李子柒火了。 |
| 餐厅推荐 | 推荐一个适合约会的法餐厅。 |
| 写作指导 | 如何让我的小说更有张力? ... | Markdown |
// <auto-generated>
// This file was generated by a tool; you should avoid making direct changes.
// Consider using 'partial classes' to extend these types
// Input: dota_client_enums.proto
// </auto-generated>
#region Designer generated code
#pragma warning disable CS0612, CS0618, CS1591, CS3021, CS8981, IDE007... | C# |
Kernel('Minimum', {inputs: {a, b}}) as T;
}
/**
* Computes the maximum of elements across dimensions of an array.
*
* Reduces the input along the dimensions given in `axes`. Unless `keepDims`
* is true, the rank of the array is reduced by 1 for each entry in `axes`.
* If `keepDims` is true, the redu... | Typescript |
0 = false;
{
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 L_0 = ___lhs0;
Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 L_1 = ___rhs1;
IL2CPP_RUNTIME_CLASS_INIT(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357_il2cpp_TypeInfo_var);
float L_2 = Quaternion_Dot_m0C931CC8127C5461E5B8A857BDE2CE0... | C++ |
OperatorAssignInt32(b *testing.B, n int) {
a := make(map[int32]int)
for i := 0; i < b.N; i++ {
a[int32(i&(n-1))] += i
}
}
func benchmarkMapAppendAssignInt32(b *testing.B, n int) {
a := make(map[int32][]int)
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
key := int32(i & (n - 1))
a[key] = appen... | Go |
moryInfo.getDeviceName());
Integer deviceIndex = nodeMemoryInfo.getDeviceIndex();
if (checkInteger(deviceIndex) != null) {
xmlMemoryInfo.setDeviceIndex(deviceIndex.intValue());
}
xmlMemoryInfo.setDeviceType(nodeMemoryInfo.getDeviceType());
Long deviceSize = nodeMemoryInfo.getDeviceSize();
... | Java |
Locales['ru'] = {
-- Russian 🇷🇺 by denrulezz
['emotes'] = "~h~~p~ Эмоции 🎬",
['danceemotes'] = "~h~~p~ 🕺 Танцевальные эмоции",
['animalemotes'] = "~h~~p~ 🐩 Эмоции животных",
['propemotes'] = "~h~~p~ 📦 Эмоции с пропом",
['prop2info'] = "❓ Эмоции с пропом могут быть располож... | Lua |
)
cy.fillElementsInput('cardCvc', '123')
//clicar para comprar
cy.findByRole('button', { name: /buy now/i })
.should('be.enabled')
.click()
cy.wait(5000)
//redirecionar para pag de success
cy.location('href').should('contain', 'success')
cy.wait(5000)
... | Typescript |
ameElement: HTMLElement;
private cells: HTMLElement[][];
public constructor(snake: Snake, board: Board, p: RendererProperties) {
this.snake = snake;
this.board = board;
this.p = p;
this.M = this.board.getSizeProperties().height;
this.N = this.board.getSizeProperties().width;
this.initialize();
}
... | Typescript |
�.
- 써클이 있다면 무한 루프를 돌게 됨.
- 오른 손이 닿는 곳이 항상 있어야 된다는 전제가 필요
### 📜Player.cs
```c#
using System;
using System.Collections.Generic;
using System.Text;
namespace Algorithm
{
class Pos
{
public Pos(int y, int x) { Y = y; X = x; }
public int Y;
public int X;
}
class Player
... | Markdown |
end
},
},
Nt = {
{
msg = "SessionDeleteMember",
func = function ()
TppUiCommand.AnnounceLogView("Client Player Disconnected!")
end
},
{
msg = "SessionDisconnectFromHost",
func = function ()
TppUiCommand.AnnounceLogView("Host Player Disconnected!")
end
},
},
nil
... | Lua |
k[pLevelLinkData->nIteration].nLevelLink], &pLevelLinkData->pLevelCoord[pLevelLinkData->nIteration], pLevelLinkData->nRand[0][pLevelLinkData->nIteration], 1);
return TRUE;
}
//D2Common.0x6FD815E0
void __fastcall sub_6FD815E0(D2DrlgCoordStrc* pDrlgCoord1, D2DrlgCoordStrc* pDrlgCoord2, int a3, int a4)
{
switch (a3)
... | C++ |
abel = "Else If";
break;
case "0" : description.label = "Condition0";
break;
case "1" : description.label = "Condition1";
break;
case "2" : description.label = "Condition2";
break;
case "3" :... | C# |
rsify(label_list, start=0, sentinel=''):
pivoted = lzip(*label_list)
k = len(label_list)
result = pivoted[:start + 1]
prev = pivoted[start]
for cur in pivoted[start + 1:]:
sparse_cur = []
for i, (p, t) in enumerate(zip(prev, cur)):
if i == k - 1:
sparse... | Python |
}
assertEquals(expected.get("raw"), doc.raw());
assertEquals(expected.get("date"), ((ClueWeb12Collection.Document) doc).getDate());
assertEquals(expected.get("url"), ((ClueWeb12Collection.Document) doc).getURL());
}
}
/*
* Anserini: A Lucene toolkit for reproducible information retrieval research
*
* L... | Java |
偶数次,只有两个整数出现了奇数次(比如1,1,2,2,3,4,5,5),如何找到这个出现奇数次的整数?
解法:
遍历整个数组,依次做异或运算。由于数组存在两个出现奇数次的整数,所以最终异或的结果,等同于这两个整数的异或结果。
这个结果中,至少会有一个二进制位是1(如果都是0,说明两个数相等,和题目不符)。
举个例子,如果最终异或的结果是5,转换成二进制是00000101。
此时我们可以选择任意一个是1的二进制位来分析,比如末位。
把两个奇数次出现的整数命名为A和B,如果末位是1,说明A和B转为二进制的末位不同,必定其中一个整数的末位是1,另一个整数的末位是0。
根据这个结论,我们可以把原数组按照二进制的末位不同,分成两部分,
... | Markdown |
" var \" = \" val\n"
" ) nl;\n"
"\n"
"code:yygetcond =\n"
" (.api.generic\n"
" ? YYGETCOND\n"
" : (.api.record ? yyrecord \".\") var);\n"
"\n"
"code:yysetcond =\n"
" topindent (.api.generic\n"
" ? YYSETCOND\n"
" : (.api.rec... | C |
path=request.path,
query=request.query_string,
latency=spend_time
)
if response.status >= 400:
logger.error(msg)
elif response.status >= 300:
logger.warning(msg)
else:
logger.info... | Python |
/*
Simple DirectMedia Layer
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this ... | C |
("Running blur kernel");
blur_kernel
.launch(
&[
cu::Any(&input_pixels_buf),
cu::Any(&output_pixels_buf),
cu::Any(&image_info_buf),
cu::Any(&radius),
],
grid,
block,
)
.chain_err(|... | Rust |
OTargets[i]);
const auto buffer_handles = buffer_handles_mem.p;
#else
static_assert(sizeof(*ppSOTargets) == sizeof(reshade::api::resource));
const auto buffer_handles = reinterpret_cast<const reshade::api::resource *>(ppSOTargets);
#endif
temp_mem<uint64_t, D3D10_SO_BUFFER_SLOT_COUNT> offsets_64(NumBuffers);
for ... | C++ |
ba7258fe473f1d8befff367bb793c786107[m
Author: <NAME> <<EMAIL>>
Date: Mon Dec 13 22:54:43 2021 -0500
753 Test file
[1mdiff --git a/file b/file[m
[1mindex 72943a1..f761ec1 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[31m@@ -1 +1 @@[m
[31m-aaa[m
[32m+[m[32mbbb[m
"#;
const GIT_DIFF_COLOR_WORD... | Rust |
er(str.length);
let view = new Uint8Array(buf);
for (let i = 0, l = str.length; i != l; ++i) {
view[i] = str.charCodeAt(i) & 0xFF;
}
return new Blob([view], {type: "application/octet-stream"});
}
export function SendToDownload(data: Blob, file: string) {
let url = URL.createObjectURL(data); // 创建blob地址
... | Typescript |
:5,18:5,t:q(a){3.7.1q.A.t.B(8,M);9(a){3.s.I(8,a)}},r:q(){p a=8;a.27=5;a.2r=5;a.18=5},C:"3.7.5T"});3.7.5T.G=q(b){9(!b){u}p a=v 3.7.5T();9(b.27){a.27=b.27}9(b.2r){a.2r=b.2r}a.18=b.18;u a};3.7.9o=3.E(3.P,{H:5,t:q(a,c){3.P.A.t.B(8,[c]);p b=8;b.H=a},r:q(){3.P.A.r.B(8,M);p a=8;9(a.H){a.H.r();a.H=5}},C:"3.7.9o"});3.7.c7=3.E(3... | JavaScript |
positorController.clearColor = it }
if (shouldOpen) {
geckoSession.open(runtime)
}
geckoSession.navigationDelegate = createNavigationDelegate()
geckoSession.progressDelegate = createProgressDelegate()
geckoSession.contentDelegate = createContentDelegate()
ge... | Kotlin |
periodId: string) {
const connection = await db.connect()
try {
const period = await connection.oneOrNone(
`SELECT end_date, fk_period_id as id
FROM week
WHERE end_date < $1
AND fk_period_id != $2
ORDER BY end_date DESC
LIMIT 1`,
[todayTimeStamp... | Typescript |
uster.apply(rt.colorBuffer(0), flowfield)
drawer.drawStyle.colorMatrix = tint(ColorRGBa(10.0, 10.0, 1.0))
drawer.image(flowfield)
}
}
}@file:Suppress("RUNTIME_ANNOTATION_NOT_SUPPORTED")
package org.openrndr.extra.jumpfill.fx
import org.openrndr.color.ColorRGBa
import org.openrndr... | Kotlin |
final int fileCount;
final Function(List<String>) onUploadFiles;
final bool maxFilesReached;
final int maxFileCount;
final String testID;
ImageQuickAction({
required this.disabled,
this.fileCount = 0,
required this.onUploadFiles,
required this.maxFilesReached,
required this.maxFileCount,
... | Dart |
alytics YOLOv8 モード
<img width="1024" src="https://github.com/ultralytics/assets/raw/main/yolov8/banner-integrations.png" alt="Ultralytics YOLOエコシステムと統合">
## はじめに
Ultralytics YOLOv8は、単なるオブジェクト検出モデルではありません; これは、データ収集、モデルトレーニングから検証、デプロイメント、実際のトラッキングに至るまでの機械学習モデルのライフサイクル全体をカバーするように設計された多用途フレームワークです。各モードは特定の目的に役立ち、異なるタスク... | Markdown |
}
.coral3-Icon--sizeXXL:before {
height: 4.5rem;
width: 4.5rem;
}
.coral3-Icon.is-image:before {
display: none;
}
.coral3-Icon.is-image.coral3-Icon--sizeXXS .coral3-Icon-image {
width: .5625rem;
height: .5625rem;
}
.coral3-Icon.is-image.coral3-Icon--sizeXS .coral3-Icon-image {
width: .75rem;
height: .... | CSS |
key) => ({
...variant,
...productVariantFields[key],
})),
},
}
/* ------------------------------ */
/* Check for previous sync
/* ------------------------------ */
console.log('Checking for previous sync data...')
// Setup our Shopify connection
const shopifyConfig = {
... | JavaScript |
ink--download:before {
content: "\279C";
margin-right: 2px;
-webkit-transform: rotate(90deg) scale(0.9);
transform: rotate(90deg) scale(0.9);
}
.common-Uppercase.common-Link--arrow:after {
content: "\279C";
}
.common-InvertedText .common-BodyTitle,
.common-InvertedText .common-PageSubtitle,
.common-Inverted... | CSS |
;
text-decoration: none; }
a.navbar:visited { background: transparent; color: #204080;
text-decoration: none; }
code {
font-family: "Lucida Console", "Courier New", Courier, monospace;
}
pre {
font-family: "Lucida Console", "Courier New", Courier, monospace;
}
.pre {... | CSS |
}
reset() {
this.currentPage = this.startPage;
}
}
export interface TextDisplay {
game: Phaser.State;
inputs: Inputs;
name: string;
textEncounter: ITextEncounter;
isDisplaying: boolean;
scrollPage: (direction: Direction) => vo... | Typescript |
le
it \cond
vcvt\().f16.s16 q0, q1
.endr
.endm
cond2
vcvt.f64.s64 q0, q1
vcvt.f64.u64 q0, q1
vcvt.s64.f64 q0, q1
vcvt.u64.f64 q0, q1
it eq
vcvteq.u32.f32 q0, q1
vcvteq.u32.f32 q0, q1
vpst
vcvteq.u32.f32 q0, q1
vcvtt.u32.f32 q0, q1
vpst
vcvt.u32.f32 q0, q1
.macro cond3 mnem
.irp cond, eq, ne, gt, ge, lt, le
it \cond
\... | Assembly |
turn buildNumber;
}
/// Get Windows OS version pointer
///
/// [Note]
/// Please use this function wrapped with `Platform.isWindows`.
Pointer<win32.OSVERSIONINFOEX> _getOSVERSIONINFOEXPointer() {
final pointer = calloc<win32.OSVERSIONINFOEX>();
pointer.ref
..dwOSVersionInfoSize = sizeOf<win32.OSVERSIONINFOEX>(... | Dart |
n kernel */
SWAPGS
xorl %ebx, %ebx
1:
#ifdef CONFIG_PAGE_TABLE_ISOLATION
/*
* We might have come in between a swapgs and a SWITCH_KERNEL_CR3
* on entry, or between a SWITCH_USER_CR3 and a swapgs on exit.
* Do a conditional SWITCH_KERNEL_CR3: this could safely be done
* unconditionally, but we need to find ou... | Assembly |
x.z()+neighbor.z());
if(y.x() < 0 || y.y() < 0 || y.z() < 0 ||
y.x() >= width || y.y() >= height || y.z() >= depth) {
continue;
}
if(data[y.x() + y.y()*width + y.z()*width*height] <= threshold && segmentation[y.x() + y.y()*width + y.z()*width*height] == 0) {
segmenta... | C++ |
QgQ0EgKGNsaWVudCBjZXJ0aWZpY2F0ZXMgb25seSEpMB4XDTE0MTIwNTAwMDAwMFoXDTE1\n" +
"MDMwNTAwMDAwMFowLTErMCkGA1UEAwwiVU5MSU1JVEVEZDBwZDdkMzE4eTNtOHNkeXllaTFqYmZl\n" +
"eDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANRNhZ4aCwdL5+OKObOKeI2rDqEwGnIr\n" +
"hL9wzo/FXbwLfdW45Y9Mxwhh6xy2NkA1YUKCB8VNB... | Java |
Error>> {
# let tdir = tempfile::Builder::new().prefix("fitsio-").tempdir().unwrap();
# let tdir_path = tdir.path();
# let filename = tdir_path.join("test.fits");
# let mut fptr = fitsio::FitsFile::create(filename).open()?;
# let table_description = &[
# ColumnDescription::new("bar")
# ... | Rust |
e {
log.Info().Msgf("Service %s unlocked", serviceName)
}
} else {
log.Info().Msgf("Service %s doesn't have lock", serviceName)
}
}
package config
import (
"fmt"
"github.com/spf13/cobra"
)
func Get(args []string) error {
if len(args) < 1 {
return fmt.Errorf("must specifiy a config item")
}
customConfi... | Go |
nt must be a power of two ({} isn't)", max_chunks);
}
if chunk_size.count_ones() != 1 {
panic!("Chunk size must be a power of two ({} isn't)", chunk_size);
}
Self {
store: vec![ChunkMap::with_capacity_and_hasher(
chunk_size as usize,
... | Rust |
/********************************************************************************
* Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are mad... | C# |
=== 'W')
return 'blue'
if (signs[cell[0]])
return 'gold'
return 'green'
}import { registerEnumType } from "type-graphql";
export enum Personality {
BigSister = "Big Sister",
Cranky = "Cranky",
Jock = "Jock",
Lazy = "Lazy",
Normal = "Normal",
Peppy = "Peppy",
Snooty = "Snooty"
}
... | Typescript |
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(LipSyncer))]
public abstract class LipSyncerEditor : Editor
{
protected SerializedProperty parentObject, sourceAudio, sourceAudioScript, phonemeList, animationName, extendG, extendH, extendX, pho... | C# |
// CStats::m_WeaponCounter
GameVariablesToReset.emplace_back( *(int**)(0x55CF2A + 2) ); // CStats::m_LastWeaponTypeFired
GameVariablesToReset.emplace_back( *(int**)(0x55CFC1 + 1) ); // CStats::m_DeathCounter
GameVariablesToReset.emplace_back( *(int**)(0x55C5E5 + 1) ); // CStats::m_MaxHealthCounter
GameVariable... | C++ |
'</oppia-noninteractive-collapsible><a><sample_tag>Text input 2' +
'</sample_tag></a></p>')
).toEqual('[Math] Text input [Collapsible] Text input 2');
expect(
filter('<oppia-noninteractive-math></oppia-noninteractive-math>' +
'Text input<oppia-noninteractive-collapsible>' +
... | Typescript |
->iter.iterzset;
if (op->encoding == OBJ_ENCODING_ZIPLIST) {
it->zl.zl = (unsigned char*)op->subject->m_ptr;
it->zl.eptr = ziplistIndex(it->zl.zl,-2);
if (it->zl.eptr != NULL) {
it->zl.sptr = ziplistNext(it->zl.zl,it->zl.eptr);
serverAssert(it-... | C++ |
,nil},
[44725] = {"Marche-soleil Atohmo","Maître des paladins"},
[44726] = {"Shalla Blanche-Feuille","Maître des druides"},
[44727] = {"Forme de félin (druide troll)",nil},
[44728] = {"Joseph l’Eveillé",nil},
[44729] = {"Indésirable du Crépuscule",nil},
[44730] = {"Jack","Aux multiples talents"},
[44731] = {"Hâleur de ... | Lua |
using System;
using ApiClientCodeGen.Tests.Common.Infrastructure;
using Rapicgen.Core;
using Rapicgen.Core.Generators;
using FluentAssertions;
using Moq;
using Xunit;
namespace ApiClientCodeGen.Core.Tests
{
public class NpmHelperTests
{
[Fact]
public void TryGetNpmPrefixPathFromNpmConfig_Retur... | C# |
ms)
}, 2000)
const enrichItems = (items, feed) => {
each(items, it => {
it.feed = feed
})
return items
}
//
// custom fetcher possible (for youtube for instance)
// enrich items data with feed data
//
let countWaitIntervalId = 0
const fetchFeedItems = (f... | JavaScript |
lwc1 $f10, 0x0028($s0) ## 00000028
/* 0034C 80A9B2EC 46062202 */ mul.s $f8, $f4, $f6
/* 00350 80A9B2F0 C6260008 */ lwc1 $f6, 0x0008($s1) ## 80A9C244
/* 00354 80A9B2F4 46184402 */ mul.s $f16, $f8, $f24
/* 00358 80A9B2F8 46105480 */ add.s $f18, $f10, $f16 ... | Assembly |
>> i;
}
int[] toArray(int bitMask) {
int[] result = new int[8];
for (int i = 0; i < 8; i++) {
if ((bitMask & (1 << i)) > 0) {
result[i] = 1;
}
}
return result;
}
public int[] prisonAfterNDays(int[] cells, int N) {
int[] mem... | Java |
log.debug("User canceled the download of the update.")
return
log.debug("The update bundle has been downloaded successfully.")
if generate_sha1hash(bundle_file) != upstream_version_info.update_sha1hash:
log.debug("Hashes do not match.")
progress_dlg.Dismiss()
bundle_file... | Python |
ScanMaps()))
))
))
);
}
@Override
public void onCreate(Object frame)
{
if (frame instanceof JFrame)
{
JFrame f = (JFrame)frame;
Rectangle bounds = settings.getBounds();
boolean maximized = settings.getBoundsMaximized();
f.setBounds(bounds);
if (maximized)
f.setExtendedState(f.getEx... | Java |
//=========================================================================
// parcv2-j.S
//=========================================================================
#include "parc-macros.h"
TEST_PARC_BEGIN
//-----------------------------------------------------------------
// Basic test
... | Assembly |
== 2 && typeof (args[0]) == "string") {
handleMethod.call(this, args[0], args[1]);
}
return this;
}
function build(options: JQueryGanttView.ChartOptions) {
let els: JQuery = this;
let defaults = {
showWeekends: true,
cellWidth: 21,
cellHeight: 31,
sl... | Typescript |
ta-state='open'] {
animation: slideDown 300ms ease-out;
}
.CollapsibleContent[data-state='closed'] {
animation: slideUp 300ms ease-out;
}
@keyframes slideDown {
from {
height: 0;
}
to {
height: var(--radix-collapsible-content-height);
}
}
@keyframes slideUp {
from ... | CSS |
4_no_content(int sock)
{
int n;
n = web_resp_add_str(sock, HTTP_204_OK HTTP_SERVER HTTP_NOCACHE);
n += web_resp_add_content_len(sock, 0);
n += web_resp_add_str(sock, HTTP_CONNECTION_CLOSE HTTP_HEADER_END);
tcp_sock_close(sock);
return (n);
}
// Send a "400 Bad Request" response
int web_400_ba... | C |
0 8.854h4.41v7.803H0zm4.914-1.328h4.388v8.572H4.914zm4.892.725h4.388v8.81H9.806zm4.892-1.312h4.388v9.158h-4.388Z"/></svg>';
static const String stmicroelectronics =
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" view... | Dart |
, 1); n++;
XtSetArg(args[n], XmNsashHeight, 1); n++;
XtSetArg(args[n], XmNseparatorOn, False); n++;
// FWJ
This->listsDialog = XmCreatePanedWindow(This->myShellDialog, (char *) "MainPane",
args, n);
////////////////////////TOP FORM//////////////////////////
... | C++ |
, Parsimmon.optWhitespace, Parsimmon.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),
(_1, field, _2, dir) => {
let direction = dir.length == 0 ? 'ascending' : dir[0].toLowerCase();
if (direction == 'desc') direction = 'descending';
if (direction == 'asc') ... | Typescript |
rows: 0, read_bytes: 0]",
error: "",
},
Test {
name: "database-passed",
sql: "select database()",
expect: "Projection: database([default]):Utf8\n Expression: database([default]):UInt8 (Before Projection)\n ReadDataSource: scan partitions: [1], scan schema: [dummy:UInt... | Rust |
CONG_VK_GL_%d_0", j),
smartvectors.RightPadded(vkMappingWhiteListGL[j][0], vkMappingWhiteListGL[j][0][0], vkMappingPaddedSize),
)
vkMappingColumnsGL[j][1] = comp.InsertPrecomputed(
ifaces.ColIDf("CONG_VK_GL_%d_1", j),
smartvectors.RightPadded(vkMappingWhiteListGL[j][1], vkMappingWhiteListGL[j][1][0], vkMa... | Go |
ce-btn.mce-active,.mce-sidebar-toolbar .mce-btn.mce-active:hover{background-color:#555c66}.mce-sidebar-toolbar .mce-btn.mce-active button,.mce-sidebar-toolbar .mce-btn.mce-active:hover button,.mce-sidebar-toolbar .mce-btn.mce-active button i,.mce-sidebar-toolbar .mce-btn.mce-active:hover button i{color:white;text-shado... | CSS |
a href="https://habr.com/ru/company/yandex/blog/311104/">YT</a>
</td>
<!-- Analogs --><td>
<a href="https://ytsaurus.tech">YTsaurus</a> (Open source by Yandex)<br/>
<a href="https://hadoop.apache.org/">Hadoop</a> (Open source)<br/>
<a href="https://spark.apache.org/">Spark</a> (Open source)
... | Markdown |
() => {
if (executionId != null) 'executionId': executionId!,
if (nextLineNumber != null) 'nextLineNumber': nextLineNumber!,
if (pod != null) 'pod': pod!,
if (podNamespace != null) 'podNamespace': podNamespace!,
};
}
/// Response to PollAirflowCommandRequest.
class PollAirflowCommandResponse {
/// ... | Dart |
line.tokens)
return {
line: parseInt(currentLine, 10),
highlights,
}
})
filteredLines.forEach(line => {
const lineNumber = parseInt(line, 10)
this._previousState[line] = Selectors.getLineFrom... | Typescript |
;\nout float vIntensityMin;\nout float vIntensityMax;\nvoid main(void) {\ngl_Position = project_position_to_clipspace(positions, vec3(0.0), vec3(0.0));\nvTexCoords = texCoords;\nvec4 maxTexture = texture(maxTexture, vec2(0.5));\nfloat maxValue = aggregationMode < 0.5 ? maxTexture.r : maxTexture.g;\nfloat minValue = max... | JavaScript |
class MemberDeviceRepositoryImpl @Inject constructor(
private val localDataSource: MemberDeviceLocalDataSource,
private val remoteDataSource: MemberDeviceRemoteDataSource,
scopeProvider: CoroutineScopeProvider,
) : MemberDeviceRepository {
private val store = StoreBuilder.from(
fetcher = Fetc... | Kotlin |
512M_DRAM_COMPONENT)
li t6, 0x12323121
#elif defined (ON_BOARD_1024M_DRAM_COMPONENT)
li t6, 0x12363121
#else
DRAM Component not defined
#endif
#elif defined(RT6855_FPGA_BOARD)&&defined(ON_BOARD_DDR1)
#ifdef ON_BOARD_128M_DRAM_COMPONENT
li t6, 0x122A3111
#elif defined (ON_BOARD_256M_DRAM_... | Assembly |
not(rect){background:0 0;border:0;box-shadow:none;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.tox:not([dir=rtl]){direction:ltr;text-align:left}.tox[dir=rtl]{direction:rtl;text-align:right}.tox-tinymce{border:1px solid #000;border-radius:0;box-shadow:none;box-sizing:bor... | CSS |
page, [Microsoft TV Technologies](/previous-versions/windows/desktop/mstv/microsoft-tv-technologies-portal), is a legacy feature. Microsoft strongly recommends that new code does not use this feature.\]
The <b>get_MinMajorChannel</b> method retrieves the lowest major channel number for this tuning space.
## -paramete... | Markdown |
css({
top: '-99999px'
});
btn.addClass('webuploader-pick-disable');
},
destroy: function() {
var btn = this.options.button;
$( window ).off( 'resize', this._resizeHandler );
btn.removeClass('web... | JavaScript |
/* Copyright (c) 2002-2012 Croteam Ltd.
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as published by
the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without... | C |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.