content stringlengths 2 6.21k | label stringclasses 16
values |
|---|---|
iyanlou.com/shiyanlou/datastructure_code
```
## 二、基本概念
### 1. 什么是数据结构
数据结构是由数据和结构两方面组成,下面举一个例子可以让大家很快地理解数据结构:
比如我们实验楼的课程管理系统,每一门课程由课程号、课程名、类别、作者等组成,每门课的课程号是唯一的,但不同的课程可能属于同一个类别,或者是同一个作者写的,由此我们可以建立一张按课程号顺序排列的课程表和两张按类别和作者名顺序排列的索引表,如下图所示,这样我们就可以按课程号或课程名或类别或作者名快速地找到我们想要学的那门课程。
.limit(5).skip(index), expected);
testIntegerStream(() -> Stream.concat(Stream.of(1), Stream.iterate(2, n -> n + 1).limit(4))
.skip(index), expected);
testIntegerStream(() -> Stream.concat(Stream.empty(), Stream.iterate(1, n -> n + 1).limit(5))
... | Java |
for i, batch in enumerate(tqdm(dataloader)):
view_id = f"{i:03d}"
camCv2world = batch["camCv2world"]
K = batch["K"]
real_img = batch["img"]
obj_mask_1d = batch["obj_mask_1d"]
distortion_params = batch.get("distortion_params")
distort... | Python |
ment.innerHTML="",t.node.element.appendChild(s.extractContents()),s.insertNode(t.node.element),s.detach(),!1}}return!0};e.keepMarkup.forEach((function(t){n(e.element,{node:t,pos:0})})),e.highlightedCode=e.element.innerHTML}})));
/*
* This is NOT part of the prism.js main script, it's specific to Dokka.
* Dokka gener... | JavaScript |
();
m_node0.append(m_node1);
m_node2 = new Node(Move.get(BLACK, 2, 2));
m_node1.append(m_node2);
m_node3 = new Node(Move.get(WHITE, 5, 3));
m_node2.append(m_node3);
m_node4 = new Node();
m_node3.append(m_node4);
m_node5 = new Node(Move.get(BLACK, 6, 3));
... | Java |
0], st = '';
h = '<hr';
if (f.size.value) {
h += ' size="' + f.size.value + '"';
st += ' height:' + f.size.value + 'px;';
}
if (f.width.value) {
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';'... | JavaScript |
this.growthRate = growthRate;
top = 0;
stack = new byte[growthRate];
size = growthRate;
}
public void Push(byte data) {
if (size == top) {
byte[] newstack = new byte[size + growthRate];
if (top > 0) {
... | C# |
g: &impl IsA<Message>) -> Vec<Cookie> {
skip_assert_initialized!();
unsafe {
FromGlibPtrContainer::from_glib_full(ffi::soup_cookies_from_response(msg.as_ref().to_glib_none().0))
}
}
//#[doc(alias = "soup_form_decode")]
//pub fn form_decode(encoded_form: &str) -> /*Unknown conversion*//*Unimplemente... | Rust |
b0c9}.custom-control-input-blue:checked~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-control-input-blue.custom-control-input-outline:checked[type=checkbox]~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' ... | CSS |
YWRp cG9pbnQ= JSU= MDM= IGds ZXJ2ZWQ= dmlyb24= SUY= dXRlZA== 44M= J20= IGNlcnQ= IHByb2Y= IGNlbGw= YXJp IHBsYXllcg== YWlz IGNvc3Q= IGh1bQ== KFI= IG9mZmlj a3M= LnRleHQ= YXR1cmVz IHRvdGFs ICovCgo= b3Bl IHN0YXQ= VU0= IGxvYWQ= aWdodHM= IGNsZWFy dXJv IHRlY2hu dXBwb3J0 SVI= IHJvdw== IHNlZW0= IHE= IHNob3J0 IE5vdA== aXBw R3Jvd... | JavaScript |
@keyframes gradient_move {
0%{background-position: 0% 92%}
50%{background-position: 100% 9%}
100%{background-position: 0% 92%}
}
/* Light - Dark Mode */
.dark .light-mode-btn {
@apply block;
}
.dark .dark-mode-btn {
@apply hidden;
}
/* Head... | CSS |
verride
public void send_internal( OutputStream ostream, CommMessage message, InputStream istream )
throws IOException {
Document doc = docBuilder.newDocument();
// root element <methodCall>
String rootName = "methodCall";
if( inInputPort ) {
// We're responding to a request
rootName = "methodResponse"... | Java |
_tree(final BvhDataArray primitive_boxes) {
// initialize node count to 0
num_nodes = 0;
// allocate nodes
node_array.resize(primitive_boxes.size() * 2);
_build_sub_tree(primitive_boxes, 0, primitive_boxes.size());
}
/**
* Clear nodes.
*/
public void clearNodes() {
node_array.clear();
num_nodes =... | Java |
namespace Masa.EShop.Services.Ordering.Application.Orders;
public class OrdersCommandHandler
{
private readonly IOrderRepository _orderRepository;
private readonly IHubContext<NotificationsHub> _hubContext;
public OrdersCommandHandler(IOrderRepository orderRepository, IHubContext<NotificationsHub> hubCon... | C# |
t inode
// 0: 00000000:36D3 00000000:0000 0A 00000000:00000000 00:00000000 00000000 1041 0 3069 1 00000000 100 0 0 10 -1
// 1: 0100007F:88B6 00000000:0000 0A 00000000:00000000 00:00000000 00000000 2000 0 5434 1 00000000 100 0 0 10 -1
// 2: E801A8C0:B... | Kotlin |
DE_REPOSITORY":
obj = new DevopsCodeRepositoryTrigger();
break;
case "BITBUCKET_CLOUD":
obj = new BitbucketCloudTrigger();
break;
}
if (obj != null)
{
serializer.Populate(j... | C# |
Value defines an error for the value is not addressable or interfaceable
ErrNotReadableValue = errors.New("value not addressable or interfaceable")
// ErrNotSettable defines an error for the variable is not settable
ErrNotSettable = errors.New("passed in variable is not settable")
// ErrUnsupportedValueType deinfes... | Go |
height:18px;
padding:9px 15px 8px;
border-top:1px solid #fff;
border-bottom:1px solid #e7e7e7;
background:#f6f6f6;
}
.edit_menu_top strong{
font-weight:700;
color:#333;
font-size:14px;
margin-right:10px;
float:left;
}
.edit_menu_cont{
padding:10px 15px;
}
.edit_menu_bot{
padding:5px 15px 15px;
text-align:ce... | CSS |
default = None
desc = """\
CA certificates file
"""
class SuppressRaggedEOFs(Setting):
name = "suppress_ragged_eofs"
section = "SSL"
cli = ["--suppress-ragged-eofs"]
action = "store_true"
default = True
validator = validate_bool
desc = """\
Suppress ragged EOFs (see std... | Python |
ST KDT KDT|-8r.Q -8u -90 -90 -90 -9u -a0|01234151515151515146464|-2um8r.Q 97XV.Q 12FXu jjA0 kKo0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0|23e6",
"Asia/Singapore|SMT MALT MALST MALT MALT JST SGT SGT|-6T.p -70 -7k -7k -7u -90 -7u -80|012345467|-2Bg6T.p 17anT.p 7hXE dM00 17bO 8Fyu... | JavaScript |
, #0x10
cmp r0, #0
bne _0800D41A
adds r0, r4, #0
bl sub_8016D30
adds r0, r4, #0
bl sub_8014E70
adds r0, r4, #0
bl sub_8016E00
_0800D41A:
pop {r4}
pop {r0}
bx r0
.align 2, 0
_0800D420: .4byte Player_8006F08
thumb_func_start sub_800D424
sub_800D424: @ 0x0800D424
push {r4, r5, lr}
adds r4, r0, #0
adds r0,... | Assembly |
Status.PENDING.name(),
false
),
new ParticipatedReservationResponse(
reservation2.getId(),
mentoring2.getId(),
mentoring2.getMentorName(),
null,
... | Java |
" [人名] 拉斯托姆",
"Ruston":"n. (Ruston)人名;(英)拉斯顿",
"rustpreventer":"[化] 防锈剂",
"rustproof":"a. 不锈的\\n[机] 不锈, 防锈的",
"rustproofed":"a. 防锈的;不锈的\\nvt. 使抗锈",
"rustproofing":" 抗锈",
"rusts":"n. [植物学]锈菌类(rust的复数)",
"rustum":" [人名] 拉斯特姆",
"rusty":"a. 生锈的, 腐蚀的, 生疏的, 顽固的, 腐烂的\\n[医] 锈色的",
"rusty blackbird":"[网络] 黑鸟;锈色黑鹂",
"rusty expect... | Typescript |
on arbitrary input frames, you can slightly modify the inference code by replace the `14` and `args.num_frames` with the input video frame number.
## Hugging face demo
[fffiloni](https://huggingface.co/fffiloni) builds a quick gradio demo for AniDoc, at [here](https://huggingface.co/spaces/fffiloni/AniDoc), Thanks fo... | Markdown |
/*
* =============================================================
* sd.c
* takes two input sorted input vectors and finds the difference
*
* =============================================================
*/
/* $Revision: 1.2 $ */
#include "mex.h"
/* If you are using a compiler that equates NaN to zero, yo... | C |
2 = _tmp34 * lambdas(2, 2) + _tmp35 * lambdas(1, 2) + _tmp36 * lambdas(0, 2) +
_tmp37 * lambdas(3, 2);
const Scalar _tmp43 =
_tmp33 * _tmp42 + _tmp39 * _tmp41 + _tmp40 * (-_tmp14 * _tmp33 + _tmp38 * _tmp39);
const Scalar _tmp44 = _tmp0 * _x_T_s[0];
const Scalar _tmp45 =
-_tmp33... | C |
item := slice[i]
slice[i] = slice[j]
slice[j] = item
j++
}
return
}
sliceValue := reflect.ValueOf(source)
if sliceValue.IsNil() || !sliceValue.IsValid() {
return
}
if sliceValue.Kind() == reflect.Ptr {
sliceValue = sliceValue.Elem()
}
var sliceLen = sliceValue.Len()
if sliceLen <= 1 {
return
... | Go |
_FARORE_MAKECHEST $11
;;
; Various generic events used in dungeons.
;
; @subid_00{Show text on entering dungeon; also initializes toggle blocks, switches, and loads
; static objects.}
; @subid_01{Small key falls here when [wNumEnemies] == 0}
; @subid_02{A chest appears here when [wNumEnemies] == 0}
; @subid_03{S... | Assembly |
export class LikeExpression extends SearchConditionExpression {
expr: BaseExpression;
likeExpr: BaseExpression;
escapeExpr: BaseExpression;
public generateM(variableStack: VariableStack): M.ConditionExpression {
throw new Error ('like will be supported in the future');
}
}
export class C... | Typescript |
8e7, U+b8ea-b8eb, U+b8ed-b8ef, U+b8f1-b8f7, U+b8fa, U+b8fc, U+b8fe-b903, U+b905-b917, U+b919-b91f, U+b921-b93b, U+b93d-b957, U+b95a-b95b, U+b95d-b95f, U+b961-b967, U+b969-b96c;
}
/* [47] */
@font-face {
font-family: 'Noto Sans KR';
font-style: normal;
font-weight: 100;
src: local('Noto Sans KR Thin'), local('No... | CSS |
00_01la3f2abc523201c1b0228df99119ab88e1.html#afaf52901287cfcadc0fe059e71b6842a',1,'cutlass::epilogue::warp::FragmentIteratorSimt< WarpShape_, Operator_, layout::RowMajor, MmaSimtPolicy_ >::Fragment()'],['../classcutlass_1_1epilogue_1_1warp_1_1FragmentIteratorTensorOp_3_01WarpShape___00_01OperatorShape_5e78dabe303... | JavaScript |
章《民用航空材料、零部件和机载设备技术
标准规定》
(CCAR37)颁发。中国民用航空技术标准规定是对用于民用航空器上的
某些航空材料、零部件和机载设备接受适航审查时,必须遵守的准则。
## 航空移动高频数据链(Hfdl)通信设备 1.目的
本技术标准规定
(CTSO)
适用于为航空移动高频数据链
(HFDL)
通信设备申请技术标准规定项目批准书
(CTSOA)
的制造人。
本CTSO
规定了航空移动高频数据链通信设备为获得批准和使用适用的
CTSO 标记进行标识所必须满足的最低性能标准。
## 2.适用范围
本CTSO 适用于自其生效之日起提交的申请。
按本CTSO 批准的
设备,其设计大改应按CCAR-21-R4 第... | Markdown |
ad, so that thread handling can be tested.
: signaling_thread_(CreateAndStartThread()),
pc_factory_(CreatePeerConnectionFactory(
nullptr,
nullptr,
signaling_thread_.get(),
FakeAudioCaptureModule::Create(),
CreateBuiltinAudioEncoderFactory(),
... | C++ |
_valid_balance_ratio(balance_ratio: Rate) -> bool {
Rate::zero() <= balance_ratio && balance_ratio <= Rate::one()
}
}
impl<T: Config> PoolsManager<T::AccountId> for Pallet<T> {
/// Gets module account id.
fn pools_account_id() -> T::AccountId {
T::LiquidationPoolsPalletId::get().into_account()
}
/// Gets curr... | Rust |
();
if (locationId <= 0)
{
return 0;
}
return locationId;
}
public ClientSetup setCompanyAddress(final I_C_Location companyAddress)
{
if (companyAddress == null)
{
return this;
}
// C_Location
final I_C_Location orgLocation = orgBPartnerLocation.getC_Location();
InterfaceWrapperHelper.cop... | Java |
);
//this.bg.start();
this.touchEnabled=true;
this.addEventListener(egret.Event.ENTER_FRAME,this.gameViewUpdate,this);
this.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.touchHandler,this);
this.myFighter.x = (this.stageW-this.myFighter.width)/2;
... | Typescript |
g masterPubkey,
DateTime randomCreatedAt, {
CancelToken? cancelToken,
bool isThumbnail = false,
}) async {
final mediaAttachments = <MediaAttachment>[];
final oneTimeEventSigner = await Ed25519KeyStore.generate();
final env = ref.read(envProvider.notifier);
final mediaType = MediaType.fro... | Dart |
d();
// Not-default
let (fg, bg, modifiers) = use_or_default_styles(&props, &span);
assert_eq!(fg, Color::Yellow);
assert_eq!(bg, Color::Cyan);
assert!(modifiers.intersects(Modifier::UNDERLINED));
// Default
let span: TextSpan = TextSpan::from("test");
let... | Rust |
r5, #2]
mov r0, r4
bl WMSP_WlRequest
mov r0, r5
ldmia sp!, {r4, r5, r6, lr}
bx lr
arm_func_start WMSP_WL_MlmeJoin
WMSP_WL_MlmeJoin: ; 0x06002D70
stmdb sp!, {r4, r5, lr}
sub sp, sp, #4
mov r4, r0
mov r3, #0
strh r3, [r4]
strh r3, [r4, #2]
strh r3, [r4, #4]
strh r3, [r4, #6]
strh r3, [r4, #8]
strh r3, [r... | Assembly |
/* Multiple versions of wcscat.
All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
... | C |
oid 0!==e.copyStructureFromAbove,s=e.copyStructureFromAbove?i-1:i,a=this.getRows(t),c=this.getColumns(t);n.change((e=>{const n=t.getAttribute("headingRows")||0;if(n>i&&Pg("headingRows",n+o,t,e,0),!r&&(0===i||i===a))return void ym(e,t,i,o,c);const l=r?Math.max(i,s):i,d=new Ig(t,{endRow:l}),u=new Array(c).fill(1);for(con... | JavaScript |
kground: #EBEFF6;
font-weight: bold;
}
hr {
height: 0px;
border: none;
border-top: 1px solid #4A6AAA;
}
hr.footer {
height: 1px;
}
/* @group Member Descriptions */
table.memberdecls {
border-spacing: 0px;
padding: 0px;
}
.memberdecls td, .fieldtable tr {
-webkit-transition-property: background-color, box-s... | CSS |
}版本{}、{C:attention}蜡封{}",
"则{X:mult,C:white}X#1#{}倍率",
"{C:inactive}(当前{C:attention}#3#{C:inactive})",
},
},
j_paperback_solar_system = {
name = "太阳系",
text = {
"九种基础{C:planet}星球{}中",
"{C:attention}等级{}最低的那个",
"按等级每级提供{X:mult,C:white}... | Lua |
: Option<unsafe extern "C" fn()>,
// }
// impl ::std::fmt::Debug for ClutterScriptClass {
// fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
// f.debug_struct(&format!("ClutterScriptClass @ {:?}", self as *const _))
// .field("get_type_from_name", &self.get_type_from_name)
... | Rust |
FileDialog>
#include <QDesktopServices>
#include <QThread>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#ifdef WIN32
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0501
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
#define _WIN32_IE 0x0501
#define WIN32_LEAN_AND_MEAN 1
#if... | C++ |
($t8) ## 00000000
/* 00684 808B52B4 01D9082A */ slt $at, $t6, $t9
/* 00688 808B52B8 54200032 */ bnel $at, $zero, .L808B5384
/* 0068C 808B52BC 8FBF0044 */ lw $ra, 0x0044($sp)
/* 00690 808B52C0 01320019 */ multu $t1, $s2
/* 00694 808B52C4 C60801... | Assembly |
utos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:"%dº"}),e.fullCalendar.datepickerLang("pt-br","pt-BR",{closeText:"Fechar",prevText:"<Anterior",nextText:"Próximo>",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Jun... | JavaScript |
): ChartDataLeaf[] {
const ret = [] as ChartDataLeaf[];
ownership.forEach((val, key) => {
ret.push({
name: key,
size: val[1],
image: USER_ICON,
info: [
{
name: "Lines Contributed",
value: val[1]
... | Typescript |
.bDuelStart = 0x0e;
pMsgSend.h.size = sizeof(pMsgSend);
DataSend(iDuelIndex, (BYTE*)&pMsgSend, pMsgSend.h.size);
return;
}
if(gObjMoveGate(gObj[aIndex].m_Index,g_DuelGates[btDuelRoom].UserGate01) == false)
{
g_DuelRoom.ClearRoom(btDuelRoom);
return;
}
if(gOb... | C++ |
359.json)
* [Cream Cheese Frosting 102716](../../index/c/cream-cheese-frosting-102716.json)
* [Cream Cheese Hamantaschen 13708](../../index/c/cream-cheese-hamantaschen-13708.json)
* [Cream Cheese Ice Cream 107998](../../index/c/cream-cheese-ice-cream-107998.json)
* [Cream Cheese Lemon Zest Frosting 353989](../../in... | Markdown |
/code/HelloBackend3.
Add okhttp3 library on top of Retrofit libraries in build.gradle (Module: app)
```gradle
implementation("com.squareup.okhttp3:okhttp:4.2.1")
```
We also need to add tree.jpg image in app / res / drawable / tree.jpg.
Create an interface, in app / java / com.example.helloretrofit5 / ImageApi.
```k... | Markdown |
.EqualTo(NodaTime.Offset.FromHoursAndMinutes(-1, -30)));
#endregion
}
[Test]
public void Test_JsonDeserialize_Array()
{
{ // empty
var res = CrystalJson.Deserialize<int[]>("[]");
Assert.That(res, Has.Length.EqualTo(0));
//Assert.That(res, Is.SameAs(Array.Empty<int[]>()));
}
{ // empty,... | C# |
aña Roca Negra. Hazlo y te llevarás un tributo.",
["O"] = "Ve a Las Estepas Ardientes y encuentra a Grark Lorkrub. Recuerdas que Lexlort mencionó que lo habían visto por última vez en una colosal fortaleza Roca Negra.$B$BCuando encuentres a Grark Lorkrub, usa los grilletes de torio para atarlo y condúcelo de vuelta... | Lua |
, arr[2])
assertEquals("$className{a=[1, 2, 3]}", i.toString())
}
@Test(timeout=300_000)
fun `nullable int array throws`() {
val className = "iEnjoySwede"
val schema = ClassSchema(
"gen.$className",
mapOf("a" to NonNullableField(IntArray::class.java))... | Kotlin |
x14589 = x14587 + x14588;
// loc("zirgen/circuit/recursion/poseidon.cpp":125:31)
auto x14590 = x14133 * x1386;
// loc("zirgen/circuit/recursion/poseidon.cpp":125:19)
auto x14591 = x14589 + x14590;
// loc("zirgen/circuit/recursion/poseidon.cpp":125:31)
auto x14592 = x14195 * x1411;
// loc("z... | C++ |
00C6CE4 ACE20000 */ sw $v0, ($a3)
/* B3DE88 800C6CE8 24820008 */ addiu $v0, $a0, 8
.L800C6CEC:
/* B3DE8C 800C6CEC 8FBF0014 */ lw $ra, 0x14($sp)
/* B3DE90 800C6CF0 27BD0018 */ addiu $sp, $sp, 0x18
/* B3DE94 800C6CF4 03E00008 */ jr $ra
/* B3DE98 800C6CF8 00000000 */ nop
glabel func_800C6CFC
/* B3DE9C ... | Assembly |
Buffer
/**
* @suppress
*/
class AudioBufferCallbackDispatcher : livekit.org.webrtc.audio.JavaAudioDeviceModule.AudioBufferCallback {
var bufferCallback: AudioBufferCallback? = null
override fun onBuffer(buffer: ByteBuffer, audioFormat: Int, channelCount: Int, sampleRate: Int, bytesRead: Int, captureTimeNs: ... | Kotlin |
3 -1.21 -0.33 -0.16 -0.76 -0.10 -1.18 0.07 -0.85 0.34 -1.70 1.14 -1.82 1.59 -0.11 0.45 -0.79 0.96 -1.79 1.36 -0.99 0.40 -2.30 0.68 -3.66 0.68 -1.36 0.00 -2.21 0.11 -2.72 0.51 -0.51 0.40 -0.68 1.08 -0.68 2.21 0.00 0.57 -0.04 1.03 -0.16 1.44 -0.12 0.40 -0.32 0.73 -0.63 1.03 -0.62 0.60 -1.70 1.05 -3.52 1.62 -1.82 0.57 -3.... | JavaScript |
Result<PathBuf> {
use std::convert::TryInto;
use std::mem::size_of;
use std::ffi::OsString;
use std::os::windows::ffi::OsStrExt;
use std::os::windows::ffi::OsStringExt;
use winapi::um::winreg::RegGetValueW;
use winapi::um::winreg::HKEY_CURRENT_USER;
use winapi::um::winreg::RRF_RT_REG_SZ... | Rust |
_ACK, requestId: 1, parameter: true });
});
});
test.serial('Webworker: should fail to send writeMemory', (t) => {
const event = {
data: [1, MESSAGE.writeMemory, 4],
};
return initializeWebWorker(128 * 1024)
.then(() => {
Webworker.handleMessage(event, postMessage);
t.deepEqual(answer, { ... | JavaScript |
ONLY0-NEXT: br label [[COND_END44]]
// SIMD-ONLY0: cond.end44:
// SIMD-ONLY0-NEXT: [[COND45:%.*]] = phi i64 [ [[TMP47]], [[COND_TRUE42]] ], [ [[TMP48]], [[COND_FALSE43]] ]
// SIMD-ONLY0-NEXT: store i64 [[COND45]], ptr [[ULX]], align 8
// SIMD-ONLY0-NEXT: [[TMP49:%.*]] = load i64, ptr [[ULX]], align 8
... | C++ |
protected void configureUpdateMethodTemplate() {
setUpdateMethodTemplate("sqlMapClient.update(\"{0}.{1}\", {2});"); //$NON-NLS-1$
}
}
/*
* Copyright 2008 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compli... | Java |
'删除', scope: this, handler: this.remove
}]
});
this.on('contextmenu', function(node, e) {
menu.showAt(e.getXY());
this.getSelectionModel().select(node);
}, this);
this.on('dblclick', this.openGraph, this);
this.tbar = [{
text: '新建',
menu: {
items: [{
... | JavaScript |
o(e){var t,n,o,s,a,u=e.size?i.$Z[e.size]:e.iconSize,l=(0,i._C)([{size:16,svgContent:"<path d='M1 2.75A.75.75 0 0 1 1.75 2H7v1.5H2.5v11h10.219V9h1.5v6.25a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1-.75-.75V2.75z'/><path d='M15 1v4.993a.75.75 0 1 1-1.5 0V3.56L8.78 8.28a.75.75 0 0 1-1.06-1.06l4.72-4.72h-2.433a.75.75 0 0 1 0-1.... | JavaScript |
);
@override
Widget build(BuildContext context) {
return Selector<CommentModel,CommentDetails?>(
selector: (_, commentModel) => commentModel.userCommentDetails,
shouldRebuild: (previous, next) => previous != next,
builder: (_,userCommentDetails,child) {
return ElevatedButton(
... | Dart |
}
/// 拍摄照片或者视频上传到服务器
/// 这是针对单个的
Future<Map?> taskPhone(String type) async {
try {
List<Media>? list = await ImagePicker.takePhotos(type);
if (list == null) return null;
ToastUtils.showLoad();
Map cosResult = {};
if (list[0].thumbPath != null) {
String cosUrl = await UploadDio.upload(list[0... | Dart |
def pre_act_resnet101(pretrained=False):
return _pre_act_resnet('pre_act_resnet101', PreActBottleneck, [3, 4, 23,
3], pretrained=pretrained)
| Python |
))]
#[transactional]
pub fn transfer_multiasset_with_fee(
origin: OriginFor<T>,
asset: Box<VersionedMultiAsset>,
fee: Box<VersionedMultiAsset>,
dest: Box<VersionedMultiLocation>,
dest_weight: Weight,
) -> DispatchResult {
let who = ensure_signed(origin)?;
let asset: MultiAsset = (*asset).try_... | Rust |
*2); // state graph
static StateMap sm;
static int threshold=256;
// clone next state
if (top>0 && top<t.size()) {
int next=t[curr].nx[y];
int n=y?t[curr].c1:t[curr].c0;
int nn=t[next].c0+t[next].c1;
if (n>=threshold*2 && nn-n>=threshold*3) {
int r=n*4096/nn;
assert(r>=0 && r<=4096... | C++ |
Util;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.Tuple;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil;
import org.dromara.jpom.common.i18n.I18nMessageUtil;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.LineNumberReader;
import ... | Java |
se + "e") # e.g., "coding" -> "code"
if keyword.endswith("ed"):
# Remove -ed
base = keyword[:-2]
if len(base) > 2:
search_terms.append(base)
search_terms.append(base + "e") # e.g., "created" -> "create"
# Ded... | Python |
data: (0..len).map(|_| T::default()).collect(),
}
}
/// Returns the number of dimensions in the array.
pub fn num_dims(&self) -> usize {
self.dims.len()
}
/// Converts a ND index into a 1D index.
fn nd_to_1d(&self, indexes: &[usize]) -> usize {
assert_eq!(self.dims.l... | Rust |
한 뉘앙스, 비꼬는 듯한 어조, 그리고 특정 사회적 맥락을 반영하는 어휘 등을 살립니다.
### 4.4. 고유 용어 및 클리셰 처리 방안 (Xử lý thuật ngữ đặc trưng và các khuôn mẫu)
* 경찰/수사 기관, 법률 용어 등은 베트남의 유사한 기관 및 용어와 일치시키거나, 베트남 독자가 이해하기 쉬운 일반적인 표현으로 번역합니다. (예: công an, thám tử, công tố viên, tòa án)
* '밀실 살인(án mạng trong phòng kín)', '알리바이(bằng chứng ngoại phạm)', '심리전(c... | Markdown |
[
Uint8Array,
Uint8ClampedArray,
Uint16Array,
Uint32Array,
Int8Array,
Int16Array,
Int32Array,
Float32Array,
Float64Array,
];
const BIGINT_TYPED_ARRAYS = [BigUint64Array, BigInt64Array];
describe("errors", () => {
test("null or undefined this value", () => {
TYPED_ARRAY... | JavaScript |
AD, &tmp);
if (retval == -1) {
/* not all RTCs support periodic IRQs */
if (errno == EINVAL) {
fprintf(stderr, "\nNo periodic IRQ support\n");
goto done;
}
perror("RTC_IRQP_READ ioctl");
exit(errno);
}
fprintf(stderr, "\nPeriodic IRQ rate is %ldHz.\n", tmp);
fprintf(stderr, "Counting 20 interrupts ... | C |
kotlinx.serialization.json.JsonElement>?, key: String): String? =
meta?.get(key)?.toString()?.trim('"')
// --- Cosine over List<Float> returning Double (good for MMR math) ---
fun cosineD(a: List<Float>, b: List<Float>): Double {
var dot = 0.0;
var na = 0.0;
var nb = 0.0
val n = minOf(a.size, b.si... | Kotlin |
entIp < 256 &&
!(currentIp <= hostIp && hostIp <= currentIp + netLength - 1)
) {
currentIp += netLength;
}
return currentIp;
}
getLastIp(ip: string, hosts: number): number {
// hosts + 1 == netLength - 1
return this.getFirstIp(ip, hosts) + hosts +... | Typescript |
ic key to Bytes")
return false
}
if (node.tcpAddress.isEmpty) {
log.trace(
"node record doesn't have a TCP address: {}",
node,
)
return false
}
return true
}
internal fun convertSafeNodeRecordToDiscoveryPeer(node: NodeRecord): MaruDisc... | Kotlin |
827.json)
* [Cornmeal And Chile Cumin Coated Pork Loin](../../index/c/cornmeal-and-chile-cumin-coated-pork-loin-103185.json)
* [Cornmeal And Currant Griddlecakes With Apple Cinnamon Syrup](../../index/c/cornmeal-and-currant-griddlecakes-with-apple-cinnamon-syrup-102945.json)
* [Cornmeal And Kale Spoon Bread With Red... | Markdown |
DependencyInfoPB clone() => DependencyInfoPB()..mergeFromMessage(this);
@$core.Deprecated('Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
DependencyInfoPB copyWith(void Function(DependencyIn... | Dart |
(isPowerOf3(9), Matchers.is(true));
assertThat(isPowerOf3(27), Matchers.is(true));
assertThat(isPowerOfThree(3), Matchers.is(true));
assertThat(isPowerOfThree(5), Matchers.is(false));
assertThat(isPowerOfThree(9), Matchers.is(true));
assertThat(isPowerOfThree(27), Matchers.is(tr... | Java |
reak:break-all;word-wrap:break-word}.com-select-con[label]{border:1px solid #ddd;border-radius:3px;padding-left:12px;height:auto}.com-select-con[label] .select-list{top:100%}.com-select-con .selected-labels{display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;width:100%}.com-select-con .selected-labe... | CSS |
tMessageDescriptor instead')
const CancelOfferNftMessage$json = const {
'1': 'CancelOfferNftMessage',
'2': const [
const {'1': 'receiver', '3': 1, '4': 1, '5': 9, '10': 'receiver'},
const {'1': 'creator', '3': 2, '4': 1, '5': 9, '10': 'creator'},
const {'1': 'collectionName', '3': 3, '4': 1, '5': 9, '10... | Dart |
:relative;margin-bottom:59px;color:#888;background:#232323;}
.benefits .arrows{top:0}
.benefits:hover .arrows .top,.benefits:hover .arrows .bottom{left:0}
.benefits h2{color:#fff;background:#6a5b8c}
.benefits a{color:#888;border-bottom-color:#444;}
.benefits a:hover{color:#aaa}
.benefits .mark{color:#777;background:#39... | CSS |
ATING_ALLOY_INGOT.get(), "Pulsating Alloy Ingot");
add(EIOItems.DARK_STEEL_INGOT.get(), "Dark Steel Ingot");
add(EIOItems.SOULARIUM_INGOT.get(), "Soularium Ingot");
add(EIOItems.END_STEEL_INGOT.get(), "End Steel Ingot");
add(EIOItems.COPPER_ALLOY_NUGGET.get(), "Copper Alloy Nugget");
... | Java |
#!/opt/manager/env/bin/python
import os
import re
import sys
import socket
import logging
import argparse
from manager_rest import config
from manager_rest.flask_utils import setup_flask_app
from manager_rest.storage import db, models
logger = logging.getLogger(__name__)
def update_managers_version(version):
l... | Python |
class MEPSize(object,IDisposable):
"""
Stores the basic size information for an MEP duct,pipe,cable tray,or conduit.
MEPSize(nominalDiameter: float,innerDiameter: float,outerDiameter: float,usedInSizeLists: bool,usedInSizing: bool)
"""
def Dispose(self):
""" Dispose(self: MEPSize) """
pass
def ReleaseUnma... | Python |
aded performance until compaction rebuilds filters). All
// built-in FilterPolicies (Bloom or Ribbon) are able to read other
// kinds of built-in filters.
//
// Note: the current Ribbon filter schema uses some extra resources
// when constructing very large filters. For example, for 100 million
// keys in a single filt... | C |
conf.sailor.friendly_urls = true
page.base_path = ''
local url = page:make_url('test')
assert.is_equal('/test',url)
url = page:make_url('test/etc')
assert.is_equal('/test/etc',url)
url = page:make_url('test',parms)
local exp = '/test'
for k,v in pairs(parms) do exp = exp .. '/' .. k .... | Lua |
mult = Mathf.Pow(10.0f, (float)digits);
return Mathf.Round(value * mult) / mult;
}
public static float Remap(float x, float A, float B, float C, float D)
{
float remappedValue = C + (x - A) / (B - A) * (D - C);
return remappedValue;
}
}
} | C# |
num stop;
final num step;
factory Range.integers(num start, [num stop, num step = 1]) =>
new Range(start, stop, step, true);
factory Range(num start, [num stop, num step = 1, bool integers = false]) {
List<num> values = <num>[];
if (stop == null) {
stop = start;
start = 0;
}
... | Dart |
'ember';
export enum MeasurementType {
Ounces,
Pounds,
Teaspoons,
Tablespoons
}
export function typeString(type: MeasurementType) {
switch (type) {
case MeasurementType.Ounces:
return 'oz';
case MeasurementType.Pounds:
return 'lbs';
case MeasurementType.Teaspoons:
return 'tsp'... | Typescript |
if (command <= GROUP_G0_END) {
handleG0Character(command);
cuesNeedUpdate = true;
} else if (command <= GROUP_C1_END) {
handleC1Command(command);
cuesNeedUpdate = true;
} else if (command <= GROUP_G1_END) {
handleG1Character(command);
... | Java |
# Copyright (c) OpenMMLab. All rights reserved.
import torch
def split_batch(img, img_metas, kwargs):
"""Split data_batch by tags.
Code is modified from
<https://github.com/microsoft/SoftTeacher/blob/main/ssod/utils/structure_utils.py> # noqa: E501
Args:
img (Tensor): of shape (N, C, H, W) e... | Python |
data);
}
},
})});
}
export interface GetBookReq {
id: number
}
export interface Book {
kind: "Book";
title: string
author: string
}
export function GetBook(params: GetBookReq): Promise<Book> {
return call("http://localhost:8080/books.get", params)
}
function callback<InType, OutType... | Typescript |
[prost(enumeration="ProposalDecisionStatus", repeated, tag="5")]
pub include_status: ::prost::alloc::vec::Vec<i32>,
}
/// A response to the ListProposals command.
#[derive(candid::CandidType, candid::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProposalsResponse {
/// The returned ... | Rust |
("hotreloading"),
daprd.WithExecOptions(exec.WithEnvVars(t, "DAPR_TRUST_ANCHORS", string(sentry.CABundle().X509.TrustAnchors))),
daprd.WithSentryAddress(sentry.Address()),
daprd.WithControlPlaneAddress(c.operator.Address(t)),
daprd.WithDisableK8sSecretStore(true),
)
return []framework.Option{
framework.Wit... | Go |
#include <Library/PcdLib.h>
#include <AsmMacroIoLibV8.h>
#include <Chipset/AArch64.h>
.text
.align 3
.set CTRL_SPAN_BIT, (1 << 23)
GCC_ASM_IMPORT (CEntryPoint)
GCC_ASM_IMPORT (SecondaryCEntryPoint)
GCC_ASM_IMPORT (ArmEnableInstructionCache)
GCC_ASM_IMPORT (ArmEnableDataCache)
GCC_ASM_IMPORT (ArmInvalidateTlb)
GCC_... | Assembly |
fn gmonth_parse_test() {
// No timezone.
assert_eq!(
GMonth::from_str("--12"),
Ok(GMonth {
value: 12,
timezone: None
})
);
// Timezone "Z".
assert_eq!(
GMonth::from_str("--12Z"),
Ok(G... | Rust |
Like("+this.evaluateNodeToJavaScript(E.left)+","+this.evaluateNodeToJavaScript(E.right)+
","+JSON.stringify(E.escape)+")";case "NOT LIKE":return"this.ternaryNot(this.applyLike("+this.evaluateNodeToJavaScript(E.left)+","+this.evaluateNodeToJavaScript(E.right)+","+JSON.stringify(E.escape)+"))";case "\x3c\x3e":case "\x3c"... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.