content stringlengths 2 6.21k | label stringclasses 16
values |
|---|---|
{
/// let pty: Pty = openpty(&term, width, height, width_px, height_px, &modes);
/// Ok(pty)
/// }.boxed()
/// });
/// struct Pty {
/// // ...
/// }
/// # fn openpty(_: &str, _: u32, _: u32, _: u32, _:u32, _:&[u8]) -> Pty {
/// # Pty {}
/// # }
//... | Rust |
$pb.GeneratedMessage.$_defaultFor<BlockHeader>(create);
static BlockHeader? _defaultInstance;
@$pb.TagNumber(1)
$fixnum.Int64 get timestamp => $_getI64(0);
@$pb.TagNumber(1)
set timestamp($fixnum.Int64 v) { $_setInt64(0, v); }
@$pb.TagNumber(1)
$core.bool hasTimestamp() => $_has(0);
@$pb.TagNumber(1)
... | Dart |
': 'display_text', '3': 2, '4': 1, '5': 9, '10': 'displayText'},
],
};
/// Descriptor for `ModuleLikeUser`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List moduleLikeUserDescriptor = $convert.base64Decode(
'Cg5Nb2R1bGVMaWtlVXNlchJACgpsaWtlX3VzZXJzGAEgAygLMiEuYmlsaWJpbGkuYXBwLmR5bm'
... | Dart |
11743a0ca7693f3cc51fce03))
* remove deprecated aliases in double-nested protos ([#4997](https://github.com/googleapis/google-cloud-php/issues/4997)) ([c4c790c](https://github.com/googleapis/google-cloud-php/commit/c4c790cc33266848c8851c5ae557d326ad27fcf5))
</details>
<details><summary>google/cloud-dialogflow: 0.24.0</... | JavaScript |
for (Integer key : redBlackBST.keys()) {
StdOut.println(key);
}
StdOut.println();
}
}
package chapter3.section3;
import util.Constants;
import util.FileUtil;
import util.VisualAccumulator;
/**
* Created by Rene Argento on 08/07/17.
*/
public class Exercise46_Height {
private... | Java |
--
-- tests/actions/vstudio/vc2010/test_config_props.lua
-- Validate generation of the configuration property group.
-- Copyright (c) 2011-2013 Jason Perkins and the Premake project
--
T.vstudio_vs2010_config_props = { }
local suite = T.vstudio_vs2010_config_props
local vc2010 = premake.vstudio.vc2010
local projec... | Lua |
border-width:0px;
position:absolute;
left:0px;
top:0px;
width:35px;
height:25px;
}
#u10733 {
border-width:0px;
position:absolute;
left:885px;
top:1238px;
width:35px;
height:25px;
color:#999999;
}
#u10733_img.mouseOver {
}
#u10733.mouseOver {
}
#u10733_img.selected {
}
#u10733.selected {
}
#u1073... | CSS |
制措施。
市区范围的详细规划和城镇开发边界内的跨区、县(市)的核心区域、重点区域、一般区域的详细规划,由市规划和自然资源主管部门组织编制;城镇开发边界内的其他核心区域、重点区域、一般区域的详细规划,由所在地的县(市)规划和自然资源主管部门组织编制;在城镇开发边界外的乡村地区的详细规划,由所在地的乡(镇)人民政府组织编制。
详细规划应当按照法定程序经批准后组织实施。
第九条 编制钱塘江及两岸区域国土空间专项规划、详细规划应当依据国务院批准的本市国土空间总体规划,坚持生态优先、绿色发展,尊重自然规律、经济规律、社会规律和城乡发展规律,在资源环境承载能力和国土空间开发适宜性评价的基础上,科学有序统筹布局生态、农业、城镇等功能空间,落... | Markdown |
з клана Камнерогов",
[19998] = "Шаман из клана Камнерогов",
[19999] = "Астраланский чарокрад",
[20000] = "Канретад",
[20001] = "Mountain Lion Mother",
[20002] = "Hurlog Horde",
[20003] = "Острогорье: цель наклона 01",
[20010] = "Иллиана Лунное Сияние",
[20011] = "Иллиана Лунное Сияние",
[20012] = "Илл... | Lua |
g, t])
constESS = Equation(m, name="constESS", type="regular", domain=t)
balance = Equation(m, name="balance", type="regular", domain=t)
wind = Equation(m, name="wind", type="regular", domain=t)
costThermalcalc = Sum(t, VWC * PWC[t]) + Sum(
[t, g],
gendata[g, "a"] * gams_math.power(p[g,... | Python |
SNumNotInt,
inst:JSNumber,
inst:JSPositiveInt,
inst:JSUInt31,
inst:JSUInt32]
*/
testPreDec(o) => --o;
/*member: testIs:type=[inst:JSBool]*/
testIs() => null is Class;
/*member: testIsGeneric:type=[inst:JSBool]*/
testIsGeneric() => null is GenericClass<int, String>;
/*member: testIsGenericRaw:type=[inst:JSBoo... | Dart |
�력하십시오","remove":"책갈피 제거"},"anchorId":"책갈피 ID","anchorName":"책갈피 이름","charset":"링크된 자료 문자열 인코딩","cssClasses":"스타일시트 클래스","download":"Force Download","displayText":"Display Text","emailAddress":"이메일 주소","emailBody":"메시지 내용","emailSubject":"메시지 제목","id":"ID","info":"링크 정보","langCode":"언어 코드","langDir":"언어 방향","langDirLTR... | JavaScript |
2FjbA== 166586
IGxhdmFnZQ== 166587
IHBvZW1hcw== 166588
IOCyteCyvuCyuQ== 166589
IEZFQg== 166590
IFNoYWNr 166591
INCa0YPQv9C40YLRjA== 166592
YWx0ZXJuYXRpdmU= 166593
4KS14KS+4KS54KWA 166594
SGVhcnRiZWF0 166595
IGNvbWXDp2Ft 166596
IHRyYW5zdmVyc2U= 166597
4LmE4Lir4Lih 166598
44G+44Gg 166599
4LWH4LSo 166600
0LXQttC00LU= 1666... | Kotlin |
/* ResidualVM - A 3D game interpreter
*
* ResidualVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms ... | C |
err)))
.unwrap()
.and_hms(0, 0, 0));
let duration = matches.value_of("duration")
.map(|duration| Duration::from_std(parse_duration::parse(duration)
.unwrap_or_else(|err| exiting_errf!("duration: {}", err))).unwrap());
let filter = matches.value_of("filter")
... | Rust |
* 3.5)
end,
rotationFun = function (slot0)
return Vector3(0, slot0 * ys.Battle.BattleConfig.SHIELD_ROTATE_CONST + 90, 0)
end
}
},
{
id = 2,
type = "BattleBuffShieldWall",
trigger = {
"onStack",
"onUpdate"
},
arg_list = {
effect = "shield02",
count = 8,
do_when_... | Lua |
ence -> PlatformBlendMode.DIFFERENCE
this == BlendMode.Dst -> PlatformBlendMode.DST
this == BlendMode.DstAtop -> PlatformBlendMode.DST_ATOP
this == BlendMode.DstIn -> PlatformBlendMode.DST_IN
this == BlendMode.DstOut -> PlatformBlendMode.DST_OUT
this == BlendMode.DstOver -> PlatformBlendMode.DST_OVER
this =... | Kotlin |
text-indent: -1px;
}
.ark-card.zoo-card
.ark-card-wrapper
.ark-card-top
.ark-card-top-right
.zoo-card-badge {
align-items: flex-end;
background: #d9dde8;
border-radius: 0 0 28px 28px;
box-shadow: 1px 1px 3px #000;
display: flex;
height: 73px;
margin: 0 3px;
width: 55px;
z-index: 3;
}
.ark... | CSS |
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Common LSM logging functions
* Heavily borrowed from selinux/avc.h
*
* Author : Etienne BASSET <etienne.basset@ensta.org>
*
* All credits to : Stephen Smalley, <sds@tycho.nsa.gov>
* All BUGS to : Etienne BASSET <etienne.basset@ensta.org>
*/
#ifndef _LSM_COMMON_LOGGI... | C |
fixed in py3.x (this adjustment is documented
# and/or debated in http://bugs.python.org/issue10789); so we'll just
# stick to the format that works in both (oddly the keyword argument
# works in py2.x but only with reentrant locks).
was_locked = lock.acquire(False)
try:
yield was_locked
... | Python |
obj instanceof emu.grasscutter.net.proto.CrystalLinkActivityDetailInfoOuterClass.CrystalLinkActivityDetailInfo)) {
return super.equals(obj);
}
emu.grasscutter.net.proto.CrystalLinkActivityDetailInfoOuterClass.CrystalLinkActivityDetailInfo other = (emu.grasscutter.net.proto.CrystalLinkActivityDetailI... | Java |
n initial.split(".") if len(t.strip()) > 0
]
for i, (sent1, sent2) in enumerate(zip(sentences, sentences[1:])):
if sent1.endswith(alpha1 + ".") and sent2.startswith(alpha2 + "."):
# merge sentence i and i+1
sentences = (... | Python |
/collector/pkg/component"
analyzerpackage "github.com/Kindling-project/kindling/collector/pkg/component/analyzer"
"github.com/Kindling-project/kindling/collector/pkg/component/receiver"
"github.com/Kindling-project/kindling/collector/pkg/model"
)
const (
Cgo = "cgoreceiver"
)
type CKindlingEventForGo C.struct_kin... | Go |
const PUBLIC_KEY_LENGTH: usize = ed25519::PUBLICKEYBYTES;
/// Number of bytes in a secret key.
pub const SECRET_KEY_LENGTH: usize = ed25519::SECRETKEYBYTES;
/// Number of bytes in a seed.
pub const SEED_LENGTH: usize = ed25519::SEEDBYTES;
/// Number of bytes in a signature.
pub const SIGNATURE_LENGTH: usize = ed255... | Rust |
// Peak hours surge
if ((hour >= 8 && hour <= 10) || (hour >= 18 && hour <= 21)) {
return 1.5; // 1.5x surge during peak hours
}
// Late night surge
if (hour >= 23 || hour <= 5) {
return 1.3; // 1.3x surge late night
}
... | Java |
nimation-fill-mode: both;
}
#QuestResult #ResultWrap #missionText2.off .textWrap:before {
display: none;
}
#QuestResult #ResultWrap #missionText2.off .textWrap:after {
background: url("/magica/resource/image_web/page/questresult/result_mission_star_gray.png");
-webkit-animation: starFadeIn .25s linear 1.50s 1 a... | CSS |
if diff already finished
go func() {
v2.Diff(v1, spliceChan, stopChan)
close(spliceChan)
}()
for splice := range spliceChan {
if splice.SpRemoved == splice.SpAdded {
ch <- diffSummaryProgress{Changes: splice.SpRemoved}
} else {
ch <- diffSummaryProgress{Adds: splice.SpAdded, Removes: splice.SpRemove... | Go |
DeleteNetworkEdgeSecurityService(
NoAwaitTag,
google::cloud::cpp::compute::network_edge_security_services::v1::
DeleteNetworkEdgeSecurityServiceRequest const& request);
virtual future<StatusOr<google::cloud::cpp::compute::v1::Operation>>
DeleteNetworkEdgeSecurityService(
google::cloud::... | C |
}
package org.roboquant.journals
import org.roboquant.common.Account
import org.roboquant.common.Event
import org.roboquant.common.Order
import org.roboquant.common.Signal
import java.time.Instant
import kotlin.math.max
/**
* Tracks basic progress metrics and optionally print them to the console. This journal has v... | Kotlin |
er::stype::SType;
use super::stype_param::STypeParam;
#[derive(PartialEq, Eq, Debug, Clone)]
pub struct SFunc {
pub t_dom: Vec<SType>,
pub t_range: SType,
pub tpe_params: Vec<STypeParam>,
}
<gh_stars>0
//! The `splits_io` module provides communication with
//! [Splits.io](https://Splits.io). The raw API is... | Rust |
E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) {
NavigableMap<E, Object> subMap = m.subMap(fromElement, fromInclusive, toElement, toInclusive);
return new TreeSet<>(subMap);
}
/**
* @throws ClassCastException {@inheritDoc}
* @throws NullPoi... | Java |
var saved = await spotify.me.containsSavedShows(['4XPl3uEEL9hvqMkoZrzbx5']);
print('Checking is 4XPl3uEEL9hvqMkoZrzbx5 is in saved shows...');
print(saved);
print('Removing show wish id 4XPl3uEEL9hvqMkoZrzbx5');
await spotify.me.removeShows(['4XPl3uEEL9hvqMkoZrzbx5']);
print('Checking is 4XPl3uEEL9hvqMkoZr... | Dart |
n the element goes away.
// The decoder does not add a reference the element.
MediaDecoderOwner* mOwner;
// Counters related to decode and presentation of frames.
FrameStatistics mFrameStats;
nsRefPtr<VideoFrameContainer> mVideoFrameContainer;
// Time that the last progress event was fired. Read/Write fr... | C |
,nil},
[3271] = {"Мистик из племени Иглогривых",nil},
[3272] = {"Пастух из племени Колкар",nil},
[3273] = {"Буревестница из племени Колкар",nil},
[3274] = {"Отарщик из племени Колкар",nil},
[3275] = {"Мародер из племени Колкар",nil},
[3276] = {"Гарпия из стаи Зачарованного Крыла",nil},
[3277] = {"Разбойница из стаи Зач... | Lua |
(lex.p)++
lex.cs = 116
goto _out
}
}
goto st116
tr179:
// line internal/scanner/scanner.rl:54
// line internal/scanner/scanner.rl:137
lex.te = (lex.p)
(lex.p)--
{
lex.ungetStr("<")
lex.setTokenPosition(tkn)
tok = token.T_INLINE_HTML
{
(lex.p)++
lex.cs = 116
goto _... | Go |
// sb.append('\\');
// }
// sb.append(c);
// }
// return sb.toString();
}
static boolean isSyntaxDelimChar(char c) {
return c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'
|| c == '^' || c == '[' || c == ']' || c == '\"' ... | Java |
n the 3d directory for now
head3D = head2D;
}
ImageIO.write(head3D, "png", SKINS_3D_DIR.resolve(this.uuid + ".png").toFile());
} catch (Throwable t) {
Logger.warn("Failed to process player texture with uuid of %s".formatted(this.uuid), t);
}
}
... | Java |
#pragma once
namespace Babylon
{
namespace
{
class NativeRenderTargetProvider : public Napi::ObjectWrap<NativeRenderTargetProvider>
{
static constexpr auto JS_CLASS_NAME = "NativeRenderTargetProvider";
public:
static void Initialize(Napi::Env env)
{
... | C |
{
log.Error("Failed to Write Aggregate Results", "Err", err)
return err
}
log.Info("Finished", "Duration", time.Since(startT))
return nil
}
type batchRange struct {
Start uint64
End uint64
}
// toBatches is a helper function to split a single large range into smaller batches
func toBatches(start, end, s... | Go |
CA8:
e.tmp[8] = 8
e.tmp[9] = ctTrueColorAlpha
case cbG16:
e.tmp[8] = 16
e.tmp[9] = ctGrayscale
case cbTC16:
e.tmp[8] = 16
e.tmp[9] = ctTrueColor
case cbTCA16:
e.tmp[8] = 16
e.tmp[9] = ctTrueColorAlpha
}
e.tmp[10] = 0 // default compression method
e.tmp[11] = 0 // default filter method
e.tmp[12] =... | Go |
shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
position: absolute;
top: 50%;
margin-top: -2px;
right: 5px;
}
.responsiv-uploader-fileupload.style-file-single .upload-object .progress-bar .upload-progress {
float: left;
width: 0%;
height: 100%;
line-height: 5px;
color: #ffffff;
background-color: #5fb6f5... | CSS |
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_new() {
let c = Canvas::new(10, 20);
assert_eq!(c.get(0, 0), Color::new(0.0, 0.0, 0.0));
}
#[test]
fn test_fmt() {
let mut c = Canvas::new(2, 2);
c.set(0, 0, Color::new(1.0, 0.0, 0.0));
c.set(0, 1, ... | Rust |
This script shows the current status of the Docker container including any mapped ports.
## Stop
Linux: ./stop.sh ; Windows: stop.bat
Stops the container and cleans up its files.
## Test
Linux: ./test.sh ; Windows: test.bat
Runs within the container all scripts located in Container-Root that have a name s... | Markdown |
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Alfa Addon - Kodi Plugin
# https://github.com/alfa-addon/addon/blob/master/plugin.video.alfa/lib/aadecode.py
# ------------------------------------------------------------
# Modified by jsergio, gujal
import re
import six
def dec... | Python |
) {
_cancelled = true;
_cancelCompleter.complete();
}
}
bool get wasCancelled => _cancelled;
}
/// Used by classes which may be closed.
mixin ClosableMixin {
bool _closing = false;
final Completer _completer = Completer<void>();
Future get done => _completer.future;
bool get isClosing =>... | Dart |
每个片段的持续时间(秒)(默认值:900)
-l LANG, --lang LANG 语言代码(默认值:zh-TW)
-m MODEL, --model MODEL
Gemini 模型(默认值:gemini-2.5-pro-exp-03-25)
--start START 开始时间(秒)
--end END 结束时间(秒)
--save-raw 保存原始转录结果
--skip-existing 如果 SRT 字幕文件已存在则跳过处理
--debu... | Markdown |
ontext()
id := c.Param("keyID")
key, err := ocrkc.App.GetKeyStore().OCR().Get(id)
if err != nil {
jsonAPIError(c, http.StatusNotFound, err)
return
}
_, err = ocrkc.App.GetKeyStore().OCR().Delete(ctx, id)
if err != nil {
jsonAPIError(c, http.StatusInternalServerError, err)
return
}
ocrkc.App.GetAuditLog... | Go |
ems(
MapBuilder<String, GetListeningStats200ResponseItemsValue>? items) =>
_$this._items = items;
MapBuilder<String, num>? _days;
MapBuilder<String, num> get days =>
_$this._days ??= new MapBuilder<String, num>();
set days(MapBuilder<String, num>? days) => _$this._days = days;
MapBuilder... | Dart |
/// ln((β^α / Γ(α)) * x^(-α - 1) * e^(-β / x))
/// ```
///
/// where `α` is the shape, `β` is the rate, and `Γ` is the gamma function
fn ln_pdf(&self, x: f64) -> f64 {
self.pdf(x).ln()
}
}
#[rustfmt::skip]
#[cfg(test)]
mod test {
use std::f64;
use crate::statistics::*;
use cr... | Rust |
d::-moz-placeholder{font-weight:400;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.vk__page_publish .create_post .textfield:-ms-input-placeholder{font-weight:400;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto}.vk__page_publish .create_post .textfield::placeholder{fon... | CSS |
ations shouldBe emptySet()
}
@Test
fun `a node with a name as the second attribute should be parsed`() = test {
val text = """
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string someOtherAttribute="hi" name="app_name"/>
</resources>
""".trimIndent()
val xml = workin... | Kotlin |
)
return x + y;
__asm__ volatile("fmin.d\t%0, %1, %2" : "=f" (result) : "f" (x), "f" (y));
return result;
}
__declare_extern_inline(int)
__finite(double x)
{
long fclass = _fclass_d (x);
return (fclass & (_FCLASS_INF|_FCLASS_NAN)) == 0;
}
__declare_extern_inline(int)
finite(double x)
{
return... | C |
( 1 + ( 2 * 3 ) ) / 4")?.prettyPrint())
println(cfg.prettyPrint())
}
}
/*
./gradlew jvmTest --tests "ai.hypergraph.kaliningraph.parsing.SetValiantTest.testCFLValidationFails"
*/
@Test
fun testCFLValidationFails() {
assertFails { """( S ) -> S""".validate() }
}
/*
./gradlew jvmTest --tests "ai.hy... | Kotlin |
dấu hai chấm trên đầu",ETH:"Viết hoa của ký tự Eth",Ntilde:"Ký tự la-tinh viết hoa N với dấu ngã",Ograve:"Ký tự la-tinh viết hoa O với dấu huyền",Oacute:"Ký tự la-tinh viết hoa O với dấu sắc",Ocirc:"Ký tự la-tinh viết hoa O với dấu mũ",Otilde:"Ký tự la-tinh viết hoa O với dấu ngã",Ouml:"Ký tự la-tinh viết hoa O với dấ... | JavaScript |
#!/usr/bin/python3
"""lass Student that defines a student"""
class Student:
"""
Represents a student.
Attributes:
first_name (str): The first name of the student.
last_name (str): The last name of the student.
age (int): The age of the student.
"""
def __init__(self, firs... | Python |
0) { acc, value -> acc + (value - mean).squared() } / size)
}
private fun Double.toOneDP() = "%.1f".format(this)
private fun Double.squared() = this * this
/*
* The MIT License (MIT)
*
* Copyright (c) 2020-2023 Dmitriy Gorbunov (dmitriy.goto@gmail.com)
*
* Permission is hereby granted, free of charge, to any per... | Kotlin |
MASK: bool = true;
const OFFSET: u8 = 31;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[d... | Rust |
evt) {
GigiTidakteraturKeyPressed(evt);
}
});
FormInput.add(GigiTidakteratur);
GigiTidakteratur.setBounds(709, 270, 80, 23);
jLabel91.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jLabel91.setText("Apakah anak mempunyai kebiasaan menyikat g... | Java |
#Modified/simplified version of the node from: https://github.com/pamparamm/sd-perturbed-attention
#If you want the one with more options see the above repo.
#My modified one here is more basic but has less chances of breaking with ComfyUI updates.
import comfy.model_patcher
import comfy.samplers
class PerturbedAtte... | Python |
/12416): Added the [`widget.definition.upcastPriority`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcastPriority) property which gives more control over widget upcasting order to the widget author.
* [#12036](https://dev.ckeditor.com/ticket/12036): Initialize the ed... | Markdown |
getDataset().getXSeriesValues().get(getDataset().getCommonXIndex()), dvalue,
chartCycle, barvalues, listvalue);
break;
}
}
} else {
// new XY values
switch (type_val) {
case ChartDataSource.DATA_TYPE_POINT: {
final GamaPoint pvalue = Cast.asPoint(scope, newValue... | Java |
=> {}
}
let physx = physx_cfg
.define("PX_OUTPUT_LIB_DIR", &output_dir)
.define("PX_OUTPUT_BIN_DIR", &output_dir)
.define("PX_OUTPUT_ARCH", "x86")
.define("PX_BUILDSNIPPETS", "False")
.define("PX_BUILDSAMPLES", "False")
.define("PX_GENERATE_STATIC_LIBRARIES", "T... | Rust |
ZO_GAMEPAD_MARKET_INDIVIDUAL_PRODUCT_WIDTH = 407
ZO_GAMEPAD_MARKET_INDIVIDUAL_PRODUCT_HEIGHT = 270
ZO_GAMEPAD_MARKET_PRODUCT_TEMPLATE = "ZO_Gamepad_MarketProductTemplate"
ZO_GAMEPAD_MARKET_PRODUCT_BUNDLE_ATTACHMENT_TEMPLATE = "ZO_Gamepad_MarketProductBundleAttachmentTemplate"
ZO_GAMEPAD_MARKET_BLANK_TILE_TEMPLATE = "Z... | Lua |
update request to the expression compilation worker.
class UpdateDependenciesRequest {
final List<InputDill> inputs;
UpdateDependenciesRequest(this.inputs);
factory UpdateDependenciesRequest.fromJson(Map<String, dynamic> json) =>
UpdateDependenciesRequest([
for (var input in json['inputs'] as Lis... | Dart |
#creamos una lista con list[]
lista = list(["hola",56,18])
#cuenta el numero de elementos de una lista
resultado = len(lista)
#agregando elementos a una lista con append
lista.append("ajajjajaja")
#agregando un elemento a la lista en un indice especifico
lista.insert(2,"papaya")
#agregando varios elementos a la lista... | Python |
ricaoCartao = descricaoCartao + 'Erro reportado pelo usuário ' + usuario + '\n';
descricaoCartao = descricaoCartao + '===\n';
descricaoCartao = descricaoCartao + '**Formato do Erro**\n';
descricaoCartao = descricaoCartao + widget.objetoJsonErro.tipo + '\n';
descricaoCartao = descricaoCartao + '**Código*... | Dart |
egin character range
p.WriteRune('[')
groupStartStack = append(groupStartStack, r)
regexed = true
case ']':
// End character range
priorGroupStart := groupStartStack[len(groupStartStack)-1]
if priorGroupStart != '[' {
return nil, false, errors.NewInvalidParamsError(fmt.Errorf("invalid ']' at %d,... | Go |
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft shared
// source or premium shared source license agreement under which you licensed
// this source code. If you did not accept the terms of the license agreement,
// you are not au... | C |
'7', '', '', '1', '夜暝在场时,友方所有单位释放大招后有10%概率获得10NP,夜暝造成伤害时,22%基础概率为目标施加1层辉夜,最高8层,不可驱散,当目标辉夜状态达到8层后,每层辉夜造成目标耐久上限5%伤害,不超过夜暝攻击120%。辉夜:每层辉夜使目标对碎星角色造成暴击伤害-5%,并承受碎星角色攻击时,每层减少50点防御', '5', '4402901', '31', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '2', '1', '', '', '', '', '', '', '', '', '', '', '', '', '', ''... | Lua |
import os
import launch
from ament_index_python.packages import get_package_share_directory
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
def generate_launch_description():
# TODO: 驗證 drone_id <= num_drones
... | Python |
wn all cards of a certain color), you will be able to hit the 'House' button to buy a house
- If you have a house, you will then be able to hit the 'Hotel' button to buy a hotel
### Sixth screen (other card screen) -
- This screen has the cards for railroads, utilities, and holds your get out of jail free cards
- The... | Markdown |
esult = parse(input);
assert_eq!(result, expected);
}
#[test]
fn error_unexpected_end() {
let input = "";
let expected = Err(Error::UnexpectedEnd);
let result = parse(input);
assert_eq!(result, expected);
}
}
<gh_stars>1-10
use std::{borrow::Cow, fmt};
#[derive(... | Rust |
2e-14,
7.79819451246194e-30,
-3.2138365634328507e-14,
-3.175994945548343e-14,
6.36770905528953e-14,
),
}
)
experiments = ExperimentList()
experiments.append(
Experiment(
beam=beam,
detector=d... | Python |
ent),
action: Snackbar.() -> Unit = {}
) {
Snackbar.make(view, message, length).apply(action).show()
}
@JvmOverloads
inline fun Fragment.showSnackBar(
message: CharSequence,
length: Int = Snackbar.LENGTH_SHORT,
view: View = requireView(),
action: Snackbar.() -> Unit = {}
) {
Snackbar.make(v... | Kotlin |
Vec<f32>>,
bones: Option<(BoneAttributes, u8)>,
) -> Vec<Vertex> {
let mut vertices = vec![];
for idx in 0..vertex_positions.len() / 3 {
let position = [
vertex_positions[idx * 3],
vertex_positions[idx * 3 + 1],
vertex_positions[idx * 3 + 2],
];
le... | Rust |
/*c4droid代码手册
*cpu性能测试
*佚名编写
*TTHHR收集整理
*转载请说明出处
*/
#include<stdio.h>
#include<time.h>
#include<conio.h>
int n=1;
void delay()
{
int i=0,j=0;
for(i=0;i<1000;i++)
for(j=0;j<15000;j++);
}
void flash()
{
int i;
char c=' ';
for(i=0;i<20;i++)
printf("\033[1;45;33m%50c\n",c);
printf("\033[5;15H\033[1;45;36m正... | C |
xe6ea3d65.toInt(),
0xeba91bbc.toInt(), 0xef68060b.toInt(), 0xd727bbb6.toInt(), 0xd3e6a601.toInt(), 0xdea580d8.toInt(),
0xda649d6f.toInt(), 0xc423cd6a.toInt(), 0xc0e2d0dd.toInt(), 0xcda1f604.toInt(), 0xc960ebb3.toInt(),
0xbd3e8d7e.toInt(), 0xb9ff90c9.toInt(), 0xb4bcb610.toInt(), 0xb07... | Kotlin |
}
}
@Test
void test_parse_ThrowsAnException_WhenTheElementDoesNotExist() {
DslContext context = context();
try {
parser.parse(context, tokens("image", "element", "key"));
fail();
} catch (RuntimeException iae) {
assertEquals("The element ... | Java |
're using.
//
// The cleaner registers objects and returns cleanables, so now we are
// defining a `UniffiCleaner` with a `UniffiCleaner.Cleanable` to abstract the
// different implementations available at compile time.
interface UniffiCleaner {
interface Cleanable {
fun clean()
}
fun register(valu... | Kotlin |
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVI... | Java |
02;
setState(() {});
} else if (scaleDiff < 0) {
controller.zoom -= 0.02;
setState(() {});
} else {
final now = details.focalPoint;
final diff = now - _dragStart!;
_dragStart = now;
transformer.drag(diff.dx, diff.dy);
setState(() {});
}
}
Widget _buildMar... | Dart |
f (lineEnd == -1)
lineEnd = textEnd
if (flags hasnt TextFlag.NoWidthForLargeClippedText)
textSize.x = textSize.x max calcTextSize(text, line, lineEnd).x
line = lineEnd + 1
linesSkipped++
}
... | Kotlin |
el.foogallery-promo i {
font: 400 15px/1 dashicons !important;
speak: none;
color: #31be4d;
vertical-align: inherit;
padding-left: 2px;
}
.foogallery_metabox_field-radio label.foogallery-promo-prostarter i {
font: 400 15px/1 dashicons !important;
speak: none;
color: #3397C1;
vertical-align: inherit;
padding-... | CSS |
* 1.2, max_y)
fig = plt.figure(term, figsize=(6, 1.5), dpi=100)
ax = fig.add_subplot(111)
print(data[term_index])
ax.plot(data[term_index], color='b', linestyle='-', marker='x', label='Ground truth')
if smoothed_data is not None:
ax.plot(list(smoothed_data[term_inde... | Python |
ook in the chart's 'templates' data (e.g. the 'templates/' directory)
// and attempt to render the templates there using the values passed in.
//
// Values are scoped to their templates. A dependency template will not have
// access to the values set for its parent. If chart "foo" includes chart "bar",
// "bar" will no... | Go |
22, 24);
}
// Display the current field state
for (int y = 0; y < fieldHeight; y++)
{
for (int x = 0; x < fieldWidth; x++)
{
reg_video_map[y * fieldWidth + x] = field[y * fieldWidth + x];
}
}
// Display the c... | C |
JobId(analyzerJobId: Long): AnalyzerRun? = GetAnalyzerRunForAnalyzerJob(analyzerJobId).execute()
}
class AnalyzerRunDao(id: EntityID<Long>) : LongEntity(id) {
companion object : LongEntityClass<AnalyzerRunDao>(AnalyzerRunsTable) {
/**
* Constant for the _worker_ property value set for issues to ma... | Kotlin |
ション」。
中央:URL入力 + 「実行」ボタン。
下部:結果テーブル。
3.2 課題①(表示列)
タイトル|日時|本文(複数段落)
3.3 課題②(表示列)
タイトル|リスクスコア|要約|本文
画像サンプルのレイアウトを踏襲。文字は折返し、セルは可変高さ。
初回ロード時は空テーブル、送信後リダイレクトで結果ページをレンダリング。
4. API / ルーティング
GET / … 入力フォーム表示
POST /scrape … フォーム受付(URLバリデーション→スクレイプ→保存→/result/<id>にリダイレクト)
GET /result/<article_id> … 課題①結果
GET /result_... | Markdown |
XSkpLAo= IGhlYWRsaWdodHM= X3ZlbnRh QU5USQ== IHByb3BpZWRhZA== IGVubGlzdA== CW9yZw== TWVzc2VuZ2Vy LmxhbmQ= IicK YXNwZXJz IHRlcnM= ZmlsdA== IEZ1bmN0b3I= IHNsaW5n X0JMSw== LUV1cm9wZWFu IEFjaGlsbGVz XEVudGl0aWVz LkRpc3BsYXlNZW1iZXI= IHJlZGV2ZWxvcG1lbnQ= CWhlbHA= IFsnLQ== IEp1bGllbg== PUludGVnZXI= LmlzTnVsbE9yRW1wdHk= IFdvV... | JavaScript |
import pandas as pd
import numpy as np
def fun1():
df1 = pd.read_csv("../weibo_keyword_crawl-main/weibo_keyword_crawl-main/data.csv",encoding='gb18030')
df2 = pd.DataFrame([df1['帖子内容'], df1['发布时间']]).T
df2.to_csv('data.csv')
#统一格式 保存字数大于100内容
def deal_bayi_weibo():
df1 = pd.read_csv("巴以冲突_weibo.csv")... | Python |
Iterator[dict]:
"""
For each path in the input, iterate over the jsonl files in that path.
Look in subdirectories recursively.
Use an iterator to conserve memory.
"""
if type(paths) == str:
paths = [paths]
def _iter():
for path in paths:
if bf.isdir(path):
... | Python |
protected Object invokeAlterClazz(final MethodInvocation mi, Flip ff) throws Throwable {
Class<?> alterClazz = ff.alterClazz();
Method method = mi.getMethod();
Class<?> declaringClass = method.getDeclaringClass();
try {
// Spring context may have a bean of expec... | Java |
hrow new ArbitrateException("Load_single", e.getMessage(), e);
// }
}
// private DistributedLock getLock(Long pipelineId) {
// DistributedLock lock = locks.get(pipelineId);
// if (lock == null) {
// synchronized (locks) {
// if (!locks.containsKey(pipelineId)) {
// lock = new Distri... | Java |
dist_rs = np.linalg.norm(receiver_positions[:, np.newaxis, :] - sender_positions[np.newaxis, :, :], axis=2)
# 创建冲突矩阵
conflict_matrix = np.zeros((len(senders), len(senders)), dtype=int)
# 发送者和接收者重叠检查
overlap = (senders[:, np.newaxis] == senders[np.newaxis, :]) | (
receivers[:, np.n... | Python |
ion. A score of 5 indicates the response is empathetic and understanding, while a 1 suggests it lacks empathy and may come across as cold or indifferent.",
"Cultural Sensitivity": "Assess the response's cultural awareness and sensitivity, avoiding assumptions and generalizations while respecting diversity. A score ... | Python |
生成一系列的相关或者独立的对象,而不用指定具体对象的类型。简单地说,一个创建新对象的方法,返回的却是接口或者抽象类的,比如说:java.util.Calendar#getInstance();
**(3) 单例模式**:用来确保类只有一个实例。比如说:java.lang.Runtime#getRuntime();
**(4) Builder 建造者模式**:定义了一个新的类来构建另一个类的实例,以简化复杂对象的创建。建造模式通常也使用方法链接来实现。比如说:java.lang.StringBuilder#append();
**(5) 原型模式**:使得类的实例能够生成自身的拷贝。如果创建一个对象的实例非常复杂且耗时,就可以使... | Markdown |
FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, "test");
var body = test.functionExpression.body as ExpressionFunctionBody;
var call = body.expression as MethodInvocation;
_isNum(call.typeOrThrow);
_isFunction2Of(_isFunction2Of(_isNum, _isString), _isNum)(
call.staticInvokeType!,
... | Dart |
sau khi tạo và encode b64 key và iv script có in chúng ra nhưng cái này chỉ để phục vụ cho việc malware lấy key và iv -> gửi qua telegram API chứ sẽ không tìm được 2 cái output này trong log của hệ thống (zzz)
```py
if len(output) >= 2:
cee = output[0].strip()
vee = output[1].strip()
retur... | Markdown |
Box<Connection>>> {
let conn = Connection::new(scid, None, config, false)?;
if let Some(server_name) = server_name {
conn.handshake.lock().unwrap().set_host_name(server_name)?;
}
Ok(conn)
}
/// Writes a version negotiation packet.
///
/// The `scid` and `dcid` parameters are the source connec... | Rust |
ified": false
}`,
},
testUtils.CreateDoc{
CollectionID: 0,
DocMap: map[string]any{
"name": "Painted House",
"rating": 4.9,
"author_id": testUtils.NewDocIndex(1, 0),
},
},
testUtils.CreateDoc{
CollectionID: 0,
DocMap: map[string]any{
"name": "A Time fo... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.