content
stringlengths
2
6.21k
label
stringclasses
16 values
{ box-shadow: 0 0 0 2px rgba(33, 150, 243 0.12); } .pure-material-slider:hover > input:focus::-moz-range-thumb { box-shadow: 0 0 0 2px rgba(33, 150, 243 0.16); } /* Moz | Active */ .pure-material-slider > input:active::-moz-range-thumb { box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.24) !important; } /* Mo...
CSS
up_events{%s} >= 1`, selector.labelsForQueryBFD), metrics.There) if err != nil { return err } err = metrics.ValidateCounterValue(metrics.GreaterOrEqualThan(1), "frrk8s_bfd_zebra_notifications", selector.labelsBFD, podMetrics) if err != nil { return err } err = metrics.ValidateOnPromet...
Go
} } else { DWORD attribs = GetFileAttributes(filename); if (readonly) { SetFileAttributes(filename, attribs | FILE_ATTRIBUTE_READONLY); } else { SetFileAttributes(filename, attribs & ~FILE_ATTRIBUTE_READONLY); } } } while (bSearch && ...
C++
=> { bar!($l); }; } macro_rules! bar { (3) => {}; } //1.52 版本的 Rust 已有 13 个片段分类符 (Fragment Specifiers,以下简称分类符) // item macro_rules! items { ($($item:item)*) => {}; } items! { struct Foo; enum Bar { Baz } impl Foo {} /*...*/ } // block macro_rules! blocks { ($($block...
Rust
RibbonIcon("replicate", "Replicate", (async () => { await this.replicate(true); })).addClass("livesync-ribbon-replicate"); this.addRibbonIcon("view-log", "Show log", (() => { this.showView(VIEW_TYPE_LOG); })).addClass("livesync-ribbon-showlog"); this.addRibbonIcon("custom-sync", "Show Custom...
JavaScript
this.fileButtonAccessibilityLabel, required this.inputPlaceholder, required this.sendButtonAccessibilityLabel, required this.holdToRecordLabel, required this.releaseToSendLabel, this.clickToRecordLabel = "Click to record", this.clickToSendLabel = "Click to send", }); /// Accessibility labe...
Dart
ineNumberInRange(o.model,f,a),d=o.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(o,i[0],t,c,d)]}case 13:{const c=this._lastLineNumberInRange(o.model,f,a),d=o.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(o,i[0],t,c,d)]}case 12:{const c=Math.round((f.startLineNumber...
JavaScript
A1", "id=%25C2%25A1&di=%C2%AE"); } @Test public void testUtf8WithBothQsFlagsRQSA() throws Exception { // Note %C2%A1 == \u00A1 doTestRewrite("RewriteRule ^/b/(.*)/(.*) /c/\u00A1$1?$2 [R,QSA]", "/b/%C2%A1/id=%C2%A1?di=%C2%AE", "/c/%C2%A1%C2%A1", ...
Java
,"_mbuffer").getArrayElement(true,RemoteObject.solve(new RemoteObject[] {_cp,RemoteObject.createImmutable(1)}, "+",1, 1)),RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_x),RemoteObject.createImmutable(1)}, "+",1, 1)); BA.debugLineNum = 263;BA.debugLine="b(x + 2) = mBuffer(cp + 2)"; Debug.ShouldSt...
Java
p: -0.5rem; } .xl\:tsg--mr-2 { margin-right: -0.5rem; } .xl\:tsg--mb-2 { margin-bottom: -0.5rem; } .xl\:tsg--ml-2 { margin-left: -0.5rem; } .xl\:tsg--mt-3 { margin-top: -0.75rem; } .xl\:tsg--mr-3 { margin-right: -0.75rem; } .xl\:tsg--mb-3 { margin-bottom: -0.75rem; ...
CSS
mDependTargetY = ((AppBarLayout) dependency).getTotalScrollRange(); } // 背景颜色渐变 if (child.getBackground() instanceof ColorDrawable) mStartBackgroundColor = ((ColorDrawable) child.getBackground()).getColor(); // 自定义动画 if (mAnimationId != 0) { mAnimation = AnimationUt...
Java
\b\n\'\b10(\t\f 8:\b@R\r2?\r"e\0\v\r\r\r\f\b\n1\n\r\r3!\0q}` /\0$]]\0\0\0b\nP"Ng\b—\r&\b\v.0B\f\b#\v3d\ty\0“\0\f"©\v#/-C\0â•\0*\t\0(...
JavaScript
uration:.25s}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{...
CSS
, T1, T2, T3, T4, T5, T6, T7, T8)>; } impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Tuple9Map0Option<T0, T1, T2, T3, T4, T5, T6, T7, T8> for Option<(T0, T1, T2, T3, T4, T5, T6, T7, T8)> { fn map0<U>(self, f: impl FnOnce(T0) -> U) -> Option<(U, T1, T2, T3, T4, T5, T6, T7, T8)> { match self { Some(v) =...
Rust
(0.550, 0.085, 0.680, 0.530); $ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190); $ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220); $ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060); $ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715); $ease-in-expo: cubic-bezier(0.95...
CSS
null */ public T poll() { T result = null; if (this.hasElements()) { result = _queue.remove(0); } return result; } /** * Main method * * @param args Command line arguments */ public static void main(String[] args) { GenericArrayListQueue<Integer> queue = new GenericArr...
Java
. * Licensed under the License of KuiklyUI; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * https://github.com/Tencent-TDS/KuiklyUI/blob/main/LICENSE * Unless required by applicable law or agreed to in writing, software * distributed under the License...
Kotlin
u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42...
JavaScript
背景 - **背景** 论文讨论了大型语言模型(LLMs)的一个重要应用场景——在边缘计算设备(如手机、智能传感器等)上部署和使用。这些设备通常具有较小的内存和计算能力,不足以直接运行庞大的LLMs。企业希望在多种边缘设备上实现LLMs的部署,以应对不同的硬件需求和动态变化的资源水平。 - **已有的工作** 当前研究主要集中在LLMs的压缩上,如参数剪枝、低秩近似和量化等。然而,现有的方法大多只是产生一个单一压缩模型,不能满足多种设备需求。超网络(Supernet)训练方法是为了同时训练具有权重共享的多个子网络而提出的,但当LLMs需要多种部署场景的细调时,全参数的超网络训练方法的适用性受限。 #...
Markdown
ght(id + 0x4000, 11.2f) .DeactivateOnExit<WreathOfThorns5>(); } private void AkanthaiAct6(uint id, float delay) { // timeline: // 0.0s: curtain call cast ends // 0.8s: icons and tethers appear // 5.8s: 'thornpricked' debuffs with 12/22/32/42 duration /...
C#
+) { let target = (<HTMLInputElement>document.getElementsByClassName('badgesBoxs')[i]); target.style.backgroundImage = "url('../assets/code.jpg')"; target.style.backgroundColor = "none"; target.style.borderTop = "red 2px solid"; target.s...
Typescript
":54}],22:[function(require,module,exports){ /** * Module dependencies */ var Query = require('../Query'); var RecordStream = require('../RecordStream'); /** * `Model.findOrCreate()` * * @return {Query} */ module.exports = function findOrCreate ( /* criteria, values[], callback */ ) { // ******************...
JavaScript
des_.begin(), code_len); this->file_writer_.Write((char*)(data.features().begin()), sizeof(real_t) * feat_num); } return Status_OK; } RegisterDataWriter(BinaryWriter, "bin", "binary format data writer"); } // namespace pario } // namespace sol /**********************************...
C++
)}body .ui-menu.ui-menu-toggleable .ui-menu-list .ui-widget-header .ui-icon{position:static;margin-right:.5rem}body .ui-menu.ui-menu-toggleable .ui-menu-list .ui-widget-header .ui-icon-triangle-1-e{font-family:"primeicons" !important;font-style:normal;font-weight:normal;display:inline-block;background:none}body .ui-men...
CSS
6-london-tube .hljs-template-tag, .theme-base16-london-tube .diff .hljs-meta, .theme-base16-london-tube .hljs-keyword { color: #98005d; } .theme-base16-london-tube .hljs-emphasis { color: #98005d; font-style: italic; } .theme-base16-london-tube .hljs-meta, .theme-base16-london-tube .hljs-meta .hljs-keyword, .theme-b...
CSS
tatement.default) elseif statement.kind == "destructure_assignment" then self:SetLocalOrGlobalValue(NodeToString(statement.default), obj) end end for _, node in ipairs(statement.left) do local obj = node.value and obj:Get(NodeToString(node)) if not obj then if self:IsRuntime() then obj = ...
Lua
print(v) end local out = {} for y=0,H-1 do for x=0,W-1 do local rx = (x+xs)%W local ry = (y+ys)%H table.insert(out, t[ry*W+rx+1]) end end --for k,v in ipairs(out) do print("OUT",v) end return out end local R = require "rigel" local RM = require "generators.modules" rigelInput = R...
Lua
version is less than the input version. Parameters ---------- v : str Version string, e.g. "0.25.0" Returns ------- bool Raises ------ InvalidVersion If the version strings are not valid. """ import pyarrow as pa return is_version_less_than(pa.__ver...
Python
equest request, { core.String? $fields, }) async { final body_ = convert.json.encode(request); final queryParams_ = <core.String, core.List<core.String>>{ if ($fields != null) 'fields': [$fields], }; const url_ = 'v1alpha1/policies:test'; final response_ = await _requester.request( ...
Dart
-focus.x-btn-menu-active .x-btn-wrap-default-large.x-btn-split-bottom:after, .x-keyboard-mode .x-split-button.x-btn-default-large.x-arrow-focus.x-arrow-pressed .x-btn-wrap-default-large.x-btn-split-bottom:after { background-color: #6ab8f7; background-color: var(--base-pressed-color); } /* /Volumes/BOOTCAMP/_res...
CSS
final Color couleur; final FontWeight fontWeight; TextStatutDescription({ required this.titre, required this.fontSize, required this.couleur, required this.fontWeight, }); @override Widget build(BuildContext context) { return Text( titre, //overflow: TextOverflow.ellipsis, ...
Dart
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_UTILS_H_ #define THIRD_PARTY_BLINK_PUBLIC_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER...
C
Short circuit if the data was never requested request := pendPool[id] if request == nil { return 0, errNoFetchesPending } reqTimer.UpdateSince(request.Time) delete(pendPool, id) // If no data items were retrieved, mark them as unavailable for the origin peer if results == 0 { for _, header := range request...
Go
istribution. */ #ifndef lint _sccsid:.asciz "@(#)fork.c 5.2.M (Mach) 19-aug-86" #endif not lint #include <syscall.h> .globl _mach_init #ifdef PROF #define ENTRY(x) .globl _/**/x; .align 2; _/**/x: \ .data; 1:; .long 0; .text; addr 1b,r0; bsr mcount #else #define ENTRY(x) .globl _/**/x; .align 2; _/**/x: #endif...
C#
TODO: SAFETY: The UNDEFINED const is Value<'static>, and doesn't reference any other Values, // so there shouldn't be an issue casting it Value<'a>, right? unsafe { std::mem::transmute::<&Value<'static>, &'a Value<'a>>(&UNDEFINED) } } pub fn null(arena: &Bump) -> &mut Value { arena.all...
Rust
l.data, l.offsetInElements, length); } else { jsArray.toDart.setRange(0, length, l); } return jsArrayRef; } @patch @pragma('wasm:prefer-inline') WasmExternRef jsFloat32ArrayFromDartFloat32List(Float32List l) { assert(l is! JSArrayBase); final length = l.length; final jsArray = JSFloat32Array.withLeng...
Dart
date: '2012/07/05', }, { id: 1566, region: 'North America', country: 'USA', city: 'Denver', amount: 3585, date: '2012/07/22', }, { id: 1567, region: 'Asia', country: 'KOR', city: 'Seoul', amount: 2600, date: '2012/07/11', }, { id: 1568, region: 'North America', country: 'USA', city: 'N...
JavaScript
lTo(0) // Verify the peer received what was expected. val synStream = peer.takeFrame() assertThat(synStream.type).isEqualTo(Http2.TYPE_HEADERS) assertThat(synStream.outFinished).isFalse() assertThat(synStream.streamId).isEqualTo(3) assertThat(synStream.associatedStreamId).isEqualTo(-1) asse...
Kotlin
comics import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source....
Kotlin
import pandas as pd import sys # print top of file print("<!doctype html>") print("<html>") print("<head>") print('<meta charset="UTF-8"/>') print('<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scalable=yes" />') print("<title>Table with expandable rows</title>") print(...
Python
IG_MangledTypeQuery("_p_SwigPyObject"); assert(SwigPyObject_stype); cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; if (!cd) { SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); } else if (SwigPyObject_TypeOnce()->tp_basicsize !=...
C++
DOM node with the current render configuration") } } /** * The text of the node. */ public open var data: String by updatingProperty(data) { text.data = it } override var visible: Boolean by updatingProperty(true) { text.data = if (it) data else "" } @Co...
Kotlin
ors.WHITE.color, partialTicks) } else { renderCapeLayer(playerRenderer, player, CapeTexture.TEXT, DyeColors.WHITE.color, partialTicks) } return true } private fun renderCapeLayer(renderer: RenderPlayer, player: AbstractClientPlayer, texture: CapeTexture, color: ColorHolder,...
Kotlin
/ 压缩期间释放的页数 // val pages_compacted = KernelProrp.getProp("/sys/block/zram0/pages_compacted") // 不可压缩数据 // val huge_pages = KernelProrp.getProp("/sys/block/zram0/huge_pages") String.format( getString(R.string.swap_zram_stat_format),...
Kotlin
Socket. */ const config: WebSocketSubjectConfig<Message> = <WebSocketSubjectConfig<Message>>{ url: this._config.cineastEndpointWs, openObserver: openObserver, closeObserver: closeObserver, serializer: (m: Message) => JSON.stringify(m, (key, value) => { if (key.startsWith('_')) { ...
Typescript
+M0):scatter_release # CHECK: 2b20c028 { vmem(r0++m0):scatter_release } // V6_vscattermhw_add // vscatter(Rt32,Mu2,Vvv32.w).h+=Vw32 vscatter(R0,M0,V1:0.w).h+=V0 # CHECK: 2f20c0c0 { vscatter(r0,m0,v1:0.w).h += v0 } // V6_vmpabuu // Vdd32.h=vmpa(Vuu32.ub,Rt32.ub) V1:0.h=vmpa(V1:0.ub,R0.ub) # CHECK: 19...
Assembly
numChannels, err := xcvrLanesByXcvrName(t, dut, xcvrName) if err != nil { t.Fatalf("%v", err) } for channel := uint16(0); channel < numChannels; channel++ { if channel != gnmi.Get(t, dut, gnmi.OC().Component(xcvrName).Transceiver().Channel(channel).Index().State()) { t.Errorf("Failed to get telemetry channel...
Go
PixelBufferError::RequestOutOfBounds), _ => assert!(false) } assert_eq!(buffer.data[4], 127); assert_eq!(buffer.data[5], 0); assert_eq!(buffer.data[6], 64); assert_eq!(buffer.data[7], 64); } #[test] fn get_pixel() { let data = vec![0, 1, 2, 3, 0...
Rust
es[i].indexA; saveB[i] = vertices[i].indexB; } switch (simplex.m_count) { case 1: break; case 2: simplex.Solve2(); break; case 3: simplex.Solve3(); break; // DE...
Typescript
.eclipse.dashboard.dialogs.EditElementXmlDlg; import org.netxms.ui.eclipse.dashboard.views.DashboardControlOwner; import org.netxms.ui.eclipse.dashboard.widgets.internal.DashboardElementConfig; import org.netxms.ui.eclipse.dashboard.widgets.internal.DashboardElementLayout; import org.netxms.ui.eclipse.dashboard.widgets...
Java
a=22 gender="male" name="Himanshu Kashyap" height=5.9 salary=75499 incremental=99.9 total_amount=salary+incremental print(total_amount) print(type(total_amount)) print(type(a)) print(type(gender)) print(type(name)) print(type(height))
Python
fidoalliance.org/specs/mds/fido-metadata-service-v3.0-ps-20210518.html#security-notification-statuses">Security Notification Status</a> /// </para> /// <para> /// This authenticator has identified weaknesses that allow registered keys to be compromised and should not be trusted. This would i...
C#
expire pending HTLCs that go unclaimed }, } #[derive(Clone)] // See Channel::revoke_and_ack for why, tl;dr: Rust bug pub(super) struct PendingHTLCInfo { routing: PendingHTLCRouting, incoming_shared_secret: [u8; 32], payment_hash: PaymentHash, pub(super) amt_to_forward: u64, pub(super) outgoing_cltv_value: u32, ...
Rust
PathStyle = configMap['isS3PathStyle'] ?? false; bool isEnableSSL = configMap['isEnableSSL'] ?? true; if (customUrl != "None" && !customUrl.startsWith(RegExp(r'http(s)?://'))) { customUrl = 'http://$customUrl'; } if (uploadPath != 'None') { uploadPath = '${uploadPath.replaceAll...
Dart
), 0) addr = uintptr(r0) if addr == 0 { err = errnoErr(e1) } return } func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) { r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } r...
Go
": [6, 7, 23], "must": [6, 12, 14, 17, 24], "arbitrari": [6, 7, 17], "acut": 6, "somewher": [6, 10, 17], "els": [6, 17, 21], "global": [6, 16, 17, 19, 20, 22, 23, 32], "percept": [6, 9, 11, 13], "alreadi": [6, 13, 17, 23], "w": [6, 7, 17, 19, 24, 25], "x3": 6, "argument": [6, 7, 11, 15, 16, 21, 32], "fxypxi": 6, "four"...
JavaScript
egion, hostgroup, environment<br /> hostgroup<br /> environment<br /> domain</td> </tr> <tr> <td>Attribute type</td> <td>fqdn = foo.domain</td> </tr> <tr> <td>Value</td> <td>67</td> </tr> <tr> <td>Attribute type</td> <td>region, h...
Markdown
'3': 2, '4': 1, '5': 11, '6': '.tensorflow.AttrValue', '10': 'value' }, ], '7': const {'7': true}, }; @$core.Deprecated('Use functionDefDescriptor instead') const FunctionDef_ArgAttrs$json = const { '1': 'ArgAttrs', '2': const [ const { '1': 'attr', '3': 1, ...
Dart
, eta: 0s)</span> </pre> ### Continuous Integration ```text 2023-05-07T01:30:31.135Z | app_download | downloaded at /tmp/.a9efb2/web_app.tar 2023-05-07T01:30:31.754Z | s3_bucket | creating bucket 2023-05-07T01:30:32.687Z | s3_bucket | bucket created ``` ### Web API ```json // GET /api/v1/demo/env_deploy/pro...
Markdown
``` {.json} { "header": { "messageId": "789-123", "namespace": "Rokid", "name": "ErrorResponse", "payloadVersion": "v1", }, "payload": { "name": "E_DRIVER_ERROR", "message": "发生了一些不可告人的错误" } } ``` 关于错误的更多信息请查阅 [当发生了错误](./error-response.md)。 # Webhook ## Webhook 功能简介 目前若琪通过该接口开放了tts播...
Markdown
word: "arm".to_string(), team: Team::Civilian, picked: false, }); tiles.push(Tile { word: "server".to_string(), team: Team::Civilian, picked: false, }); tiles.push(Tile { word: "pupil".to_string(), team: Team::Blue, picked: false, ...
Rust
nt += ((selected && bagSlot) ? '[' : ('<span style='+design.grey_button+'>')) + 'Store '+itemName + ((selected && bagSlot && !remove) ? ('](!magic --button '+storeCmd+'|'+tokenID+'|'+MIrowref+'|'+selectedMI+'|?{Quantity?|'+qty+'+1})') : '</span>') + ' in your MI Bag**'+(!!removeMI ? (', overwriting...
JavaScript
velocity data // <group> static std::vector<Vector<Double>> calcVelocityLSRK(); static std::vector<Vector<Double>> calcVelocityLSR(); static std::vector<Vector<Double>> calcVelocityLSRGal(); static std::vector<Vector<Double>> calcVelocityLGROUP(); static std::vector<Vector<Double>> calcVelocityCMB(); // <...
C
', '1', '', '', '0.0333', '', ''}, {'20046', '', '', '', '', '', '', '', '9', '3', '', '', '', '50100', '1', '', '', '0.0333', '', ''}, {'20046', '', '', '', '', '', '', '', '10', '3', '', '', '', '60070', '1', '', '', '0.0333', '', ''}, {'20046', '', '', '', '', '', '', '', '11', '3', '', '', '', '60080', '1', '', '',...
Lua
PKIX_GENERALNAME_DEBUG("\t\tCalling CERT_NewGeneralName).\n"); nssGenName = CERT_NewGeneralName(arena, nameType); if (nssGenName == NULL) { PKIX_ERROR(PKIX_ALLOCATENEWCERTGENERALNAMEFAILED); } switch (nameType) { case certRFC822Name: case certDNS...
C
", "r": "犬", "sc": 11, "l": 5, "f": 3392 }, {"h": "佯", "p": "yáng", "sp": "yang", "r": "人", "sc": 8, "l": 5, "f": 3393}, {"h": "肛", "p": "gāng", "sp": "gang", "r": "肉", "sc": 7, "l": 5, "f": 3394}, {"h": "奚", "p": "xī", "sp": "xi", "r": "大", "sc": 10, "l": 5, "f": 3395}, {"h": "甭", "p": "béng"...
Dart
eight-lifter": F115D, "weight-pound": F09B5, "whatsapp": F05A3, "wheel-barrow": F14F2, "wheelchair-accessibility": F05A4, "whistle": F09B6, "whistle-outline": F12BC, "white-balance-auto": F05A5, "white-balance-incandescent": F05A6, "white-balance-iridescent": F05A7, "white-balance-sunny": F05A8, "...
CSS
距離になるので、距離の最大値などが簡単に求められます """ res_x = x - y res_y = x + y return res_x, res_y def chebyshev_dis(x1: int, y1: int, x2: int, y2: int) -> int: """ チェビシェフ距離を計算します """ return max(abs(x1 - x2), abs(y1 - y2)) # 便利変数 INF = 1 << 63 lowerlist = list("abcdefghijklmnopqrstuvwxyz") upperlist ...
Python
remove reference to soundfile var index = p5sound.soundArray.indexOf(this); p5sound.soundArray.splice(index, 1); this.stop(now); if (this.buffer && this.bufferSourceNode) { for (var i = 0; i < this.bufferSourceNodes.length - 1; i++) { if (this.bufferSourceNodes[i] !== null) { th...
JavaScript
clc lda #$01 adc (sp),y jmp L031E L0203: ldy #$0A jmp addysp .endproc ; --------------------------------------------------------------- ; void __near__ draw_fixed_text (unsigned char, unsigned char, __near__ const unsigned char *, unsigned char) ; ---------------------------------------------...
Assembly
import pygame pygame.init() pygame.font.init() pygame.display.set_caption("Homemade Shapez") screen = pygame.display.set_mode((0,0), pygame.FULLSCREEN)
Python
from __future__ import annotations from datetime import datetime, timezone from urllib.parse import urlsplit, urlunsplit from cronsim import CronSim, CronSimError from django.core.exceptions import ValidationError from django.core.validators import URLValidator from oncalendar import OnCalendar, OnCalendarError from...
Python
ptr指针作为传参传入do_mq_timedsend()函数; * 在do_mq_timedsend()函数中,通过load_msg()函数将消息从用户空间加载到内核中,这里将u_msg_ptr指针作为传参; * load_msg()函数中,通过copy_from_user()函数将u_msg_ptr指针指向的用户空间信息复制到分配的内核空间msg,并返回一个指向消息块所在内核空间的指针msg_ptr,此时我们便在内核中跟踪到了具体的消息块实体,后续操作都是围绕这个消息块指针展开的,包括接收程序也是对此指针进行copy_to_user操作; 接受过程 * 用户程序通过mq_receive()或mq_timedreceive()函...
Markdown
fd = io.output('tests/foo/bar/baz/foobazbar/contents') fd:write('full of contents') fd:close() remove_dir('tests/foo') assert(not posix.stat('tests/foo')) -- Architecture detection assert(get_arch_for_path('tests/hello_2.9-2+deb8u1_amd64') == 'x86_64') assert(get_arch_for_path('tests/hello_2.9-2+deb8u1_arm64') == nil)...
Lua
must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its * contributors may be used to endorse or promote products de...
C++
using System; using Ardalis.GuardClauses; using Xunit; namespace GuardClauses.UnitTests; public class GuardAgainstOutOfRangeForInt { [Theory] [InlineData(1, 1, 1)] [InlineData(1, 1, 3)] [InlineData(2, 1, 3)] [InlineData(3, 1, 3)] public void DoesNothingGivenInRangeValue(int input, int rangeFr...
C#
''' Have the function StockPicker(arr) take the array of numbers stored in arr which will contain integers that represent the amount in dollars that a single stock is worth, and return the maximum profit that could have been made by buying stock on day x and selling stock on day y where y > x. For example: if arr is [...
Python
9f9b6a0509a3a2d24c784d9678cb12cf981ed612269a0a41ebbc88f98e62cea6cacc03c53089a22b523d56f", "authTag":"5eecdb5f073cb518e53260d02b6a58fe" } }, { "GCM":{ "key":"18417041c1810bb800658860f27f6e23fdb910e19817e41c", "iv":"23bb948eb0a56240218bea21", "plain":"c241b79a1b754b16...
Kotlin
dma_cfg.tx_dma_channel = DMA_Channel0; s_uart_param.dma_cfg.rx_dma_channel = DMA_Channel1; app_uart_init(&s_uart_param, uart_evt_handler, &s_uart_buffer); app_uart_dma_init(&s_uart_param); app_uart_dma_receive_async(APP_UART_ID, s_uart_rx_buffer, UART_RX_BUFFER_SIZE); } static void log_flush(void) { ...
C
import artifacts.integration.ModCompat; import artifacts.integration.lootr.LootrCompat; import artifacts.platform.PlatformServices; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; import net.minecraft.client.model.geom.EntityModelSet; import net....
Java
0x394 01 0012d618 5dcedf7c mscorwks!CHECK::Trigger+0x2df 02 0012d800 5dcedb2d mscorwks!CLRVectoredExceptionHandlerPhase2+0x33c 03 0012d864 5d9cfd67 mscorwks!CLRVectoredExceptionHandler+0xcd 04 0012d890 5d9cfc4a mscorwks!CPFH_FirstPassHandler+0xc7 05 0012d8c4 7c9037bf mscorwks!COMPlusFrameHandler+0x14a WARNING: Stack un...
C#
g, val hkdfSalt: String, ) : OutgoingPayloadJson @Serializable data class InitTransfer( val totalChunks: Int, val totalSize: Int, val sha256GzipVaultDataEnc: String, val fcmTokenEnc: String, val newSessionIdEnc: String, val expirationDateEnc: String?,...
Kotlin
/* * Copyright (c) 1999 * Silicon Graphics Computer Systems, Inc. * * Copyright (c) 1999 * Boris Fomitchev * * This material is provided "as is", with absolutely no warranty expressed * or implied. Any use is at your own risk. * * Permission to use or copy this software for any purpose is hereby granted * wi...
C
} } return []; }; const matchesForRange = ( expression: MatchExpression, editor: ReactEditor, range: Range, start: number ): MatchResult[] => { const text = Editor.string(editor, range); const { path } = range.focus; return findMatchIndices(expression, text).map((match) => { const { offsets,...
Typescript
() }) }) import React from 'react' export const EmailIconFill = () => ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M22 4H2C.9 4 0 4.9 0 6v12c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.25 14.43l-3.5 2c-.08.05-.17.07-.25.07-.17 0-.34-.1-.43-.25-.14-.24-.06-.55.18-.68l3.5-2c.24...
JavaScript
Str(PToken), Name(ANameId), TyApp(ATyAppExpr), Record(ARecordExpr), Field(AFieldExpr), Call(ACallLikeExpr), Index(ACallLikeExpr), Cast(ACastExpr), UnaryOp(AUnaryOpExpr), BinaryOp(ABinaryOpExpr), Block(ABlockExpr), Break(AJumpExpr), Continue, Return(AJumpExpr), ...
Rust
in.com 应急响应热线:4000-327-707 收录于合集  # 2023漏洞风险提示  19 个 上一篇 风险提示|泛微OA e-cology 前台文件上传漏洞 # Python URL 解析漏洞可导致命令执行攻击 THN 代码卫士 2023-08-14 17:46 ![](https://mmbiz.qpic.cn/mmbiz_gif/Az5ZsrEic9ot90z9etZLlU7OTaPOdibteeibJMMmbwc29aJlDOmUicibIRoLdcuEQjtHQ2qjVtZBt0M5eVbYoQzlHiaw/64...
Markdown
# encoding: UTF-8 from objectmaphelper import * gDMS_Sample_Application_QQuickWindowQmlImpl = {"title": "GDMS Sample Application", "type": "QQuickWindowQmlImpl", "unnamed": 1, "visible": True} gDMS_Sample_Application_RoundButton = {"checkable": False, "container": gDMS_Sample_Application_QQuickWindowQmlImpl, "occurre...
Python
people are supplying it inconsistently to cause superfluous resolution conflicts, so we choose to also ignore them. """ parsed: urllib.parse.SplitResult query: Dict[str, List[str]] subdirectory: str hashes: Dict[str, str] def _clean_link(link: Link) -> _CleanResult: parsed = link._...
Python
0, r1, r0 mov r1, #5 #else ldr r0, [r1, #0xc] mov r1, #0xa add r0, r0, #0x40 mla r0, r4, r1, r0 #endif bl MemZero ldr r1, _022BD3F0 ; =ov00_023187A0 mov r0, #0xc ldr r1, [r1, #0xc] #ifdef JAPAN add r1, r1, #0x90 #else add r1, r1, #0xe0 #endif mla r0, r4, r0, r1 bl ov00_022E3680 ldmia sp!, {r4, pc} .align...
Assembly
import os import torch.distributed as dist def get_dist_info() -> str: """Check distributed training env variables""" # Tested on the instance (best.sh): # LOCAL_RANK = 2 | RANK = 2 | MASTER_ADDR = 127.0.0.1 | MASTER_PORT = 29500 | WORLD_SIZE = 4 keys = [ "NODE_RANK", "GROUP_RANK", ...
Python
toStringImpl() = buildString { append("Extension(name=\"$name\", number=$number") if (type != null) { append(", type=$type") } append(", author=\"$author\"") append(", contact=\"$contact\"") if (platform != null) { append(", platform=\"$platform\"...
Kotlin
CHECK: 1800c020 { v0.uh = vasr(v0.uw,v0.uw,r0):rnd:sat } // V6_vasrwuhrndsat // Vd32.uh=vasr(Vu32.w,Vv32.w,Rt8):rnd:sat V0.uh=vasr(V0.w,V0.w,R0):rnd:sat # CHECK: 1800c040 { v0.uh = vasr(v0.w,v0.w,r0):rnd:sat } // V6_vL32b_cur_npred_ai // if (!Pv4) Vd32.cur=vmem(Rt32+#s4) { v1=v0 if (!P0) V...
Assembly
":{"x":0.5,"y":0.5}},"shapeEdgeSoftness":{"value":0,"range":[0,0.5]},"shapeRadius":{"value":0,"range":[0,2]},"currentScroll":{"value":0},"scrollLerp":{"value":0.07},"gooey":{"value":true},"infiniteGooey":{"value":true},"growSize":{"value":4,"range":[1,15]},"durationOut":{"value":1,"range":[0.1,5]},"durationIn":{"value"...
JavaScript
// Protocol Buffers - Google's data interchange format // Copyright 2023 Google LLC. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
C
(); void checkEvents(); int lastMouseY; int lastMouseX; vector<CocoaEvent> cocoaEvents; NSOpenGLContext *context; vector<GamepadDeviceEntry*> gamepads; unsigned int nextDeviceID; bool checkSpecialKeyEvents(PolyKEY key); Number getBackingXRes(); Number getBa...
C
# The MIT License (MIT) # # Copyright (c) 2016 Adam Schubert # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
Python
rs.Errorf("tiflash_compute dispatch should be %v, but got %v", expStr, actStr) panic(err) } }) } func filterAllStoresAccordingToTiFlashReplicaRead(allStores []uint64, aliveStores *aliveStoresBundle, policy tiflash.ReplicaRead) (storesMatchedPolicy []uint64, needsCrossZoneAccess bool) { if policy.IsAllReplicas()...
Go
val accelContact = cdsMetrics.accelerator.format("% 3d%%").map { "$it ${L.CARINFO_ACCEL}"} // val clutchContact = cdsMetrics.clutch.map { "Clutch $it"} // val brakeContact = cdsMetrics.brake.map { "Brake $it ${Integer.toBinaryString(it).padStart(8, '0')}"} private val steeringAngle = cdsMetrics.steeringAngle.map { ...
Kotlin
writeNotNull('reason', _$AudioMixingReasonTypeEnumMap[instance.reason]); return val; } const _$AudioMixingStateTypeEnumMap = { AudioMixingStateType.audioMixingStatePlaying: 710, AudioMixingStateType.audioMixingStatePaused: 711, AudioMixingStateType.audioMixingStateStopped: 713, AudioMixingStateType.audioMi...
Dart