content
stringlengths
2
6.21k
label
stringclasses
16 values
>>, Error> { // ENetEvent is Copy (aka has no Drop impl), so we don't have to make sure we `mem::forget` it later on let mut sys_event = MaybeUninit::uninit(); let res = unsafe { enet_host_service(self.inner, sys_event.as_mut_ptr(), timeout_ms) }; match res { r if r > 0 => ...
Rust
unsigned long ts_reader_interval; /* Current interval for timer */ unsigned long ts_reader_min_interval; /* Minimum interval */ unsigned int pen_irq; /* Pen IRQ number in use */ struct workqueue_struct *ts_workq; struct work_struct pen_event_work; u16 acc_slot; /* AC97 slot used for acc touch data */ u16 acc...
C
} [dir="rtl"] .tree-child path.tree__item-child-rtl { display: block; } /* Last LTR tree child. */ .tree-child-last path:not(.tree__item-child-last-ltr) { display: none; } .tree-child-last path.tree__item-child-last-ltr { display: block; } /* Last RTL tree child. */ [dir="rtl"] .tree-child-last path:not(.t...
CSS
using LittleHorse.Sdk.Common.Proto; namespace LittleHorse.Sdk.Workflow.Spec; /// <summary> /// Represents the output of a TaskNode. /// </summary> public class TaskNodeOutput : NodeOutput { /// <summary> /// Initializes a new instance of the <see cref="TaskNodeOutput"/> class. /// </summary> /// <para...
C#
.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.5...
JavaScript
ster_event_type_t { tsip_i_newreg = tsip_i_newreg, tsip_i_register = tsip_i_register, tsip_ao_register = tsip_ao_register, tsip_i_unregister = tsip_i_unregister, tsip_ao_unregister = tsip_ao_unregister, }; public enum class rt_tsip_request_type_t { tsip_NONE = tsip_NONE, tsip_ACK = tsip_...
C
RN 8 tm1 RN 9 tm2 RN 10 tm3 RN 11 sum RN 12 height RN 14 RA RN 4 ;first register to push into stack at entry RZ RN 11 ;second last, and then it is lr=>pc REGIS_SHIFT_4x4_SAD EQU (9*4) ;//registers pushed into stack to preserve caller state: 6 here as example LOCAL_SHIFT_4x4_SAD EQU (...
Assembly
NSURL fileURLWithPath:videoWritePath] name:@"write you want to writre" fileName:videoWritePath mimeType:@"video/mpeg4" error:nil]; } progress:^(NSProgress * _Nonnull uploadProgress) { progress(uploadProgress.completedUnitCount / uploadProg...
Markdown
.EscherRecord; import com.wxiwei.office.fc.ddf.EscherSimpleProperty; import com.wxiwei.office.fc.ddf.EscherSpRecord; import com.wxiwei.office.fc.hwpf.usermodel.HWPFAutoShape; import com.wxiwei.office.fc.hwpf.usermodel.HWPFShape; import com.wxiwei.office.fc.hwpf.usermodel.HWPFShapeGroup; /** * TODO: 文件注释 * <p> * <p>...
Java
QCOMPARE(arr.removeIf(isVal2), 0); arr << "val0" << "val1" << "val2"; arr << "val0" << "val1" << "val2"; arr << "val0" << "val1" << "val2"; QCOMPARE(arr.size(), 9); arr.remove(1, 3); QCOMPARE(arr, QVarLengthArray<QString>({ "val0", "val1", "val2", "val0", "val1", "val2" })); arr.remove(2...
C++
ost -> Text, } } #[derive(Queryable)] pub struct Score { pub sha256: String, pub mode: i32, pub clear: i32, pub epg: i32, pub lpg: i32, pub egr: i32, pub lgr: i32, pub egd: i32, pub lgd: i32, pub ebd: i32, pub lbd: i32, pub epr: i32, pub lpr: i32, pub ems: i3...
Rust
.mixin-takes-one(@a: g); .mixin-takes-one(@a : h;); .mixin-takes-one(i); .mixin-takes-one(j;); .mixin-takes-two(k, l); .mixin-takes-one(m, n;); .mixin-takes-two(o, p; q); .mixin-takes-two(r, s; t;); } .mixin-conflict(@a:defA, @b:defB, @c:defC) { three: @a, @b, @c; } .mixin-conflict(@a:de...
CSS
nge this.$scaleWrapper = options.$scaleWrapper this.$runners = [] this.hasNegative = options.hasNegative this.min = options.min this.step = options.step /** Set calculated initial values */ this.$runners = this.createRunners(this.runners) /** Register events collection */ this.move...
Typescript
; break; case 'p': setparam(1); break; case 'P': setparam(2); break; case 'x': mute(this->in_face); listseq(this->in_face[1], cmd+1); break; case 'Z': mapsite(sd, 1); break; default: break; } prompt("\n#(+)/Aa/Comp/Ext/Find/List/Map/Nbr/Orf/"); c = *progets(cmd, "Quit/Rezm/Shufl/Trans/We...
C++
-- end, {}) -- Open DapUi create_cmd("TDebug", function() require("dapui").toggle() end, {}) -- Toggle CMP g.cmptoggle = true create_cmd("CmpToggle", function() g.cmptoggle = not g.cmptoggle if g.cmptoggle then vim.cmd 'echo "CmpAutoComplete is on"' setAutoCmp(true) else vim.cmd 'echo "CmpAutoC...
Lua
#ifndef PHP_SOCK_CONVERSIONS_H #define PHP_SOCK_CONVERSIONS_H 1 #include <php.h> #ifndef PHP_WIN32 # include <netinet/in.h> # include <sys/socket.h> #else # include <Ws2tcpip.h> #endif #include "php_sockets.h" /* TYPE DEFINITIONS */ struct err_s { int has_error; char *msg; int level; int should_free; }; str...
C
c += ' mceToolbarStartSplitButton'; else if (co.ListBox) c += ' mceToolbarStartListBox'; h += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '<!-- IE -->')); } // Add toolbar end before list box and after the previous button // This is to fix the o2k7 editor skins if (p...
JavaScript
this.stacks[stackIndex] -= take; this.lastMove = { player: true, stack: stackIndex, take, }; this.isPlayersChoice = false; } /** * Let the computer player make a move * If the game state is already balanced the computer will remove a...
Typescript
, just skip silently handleFileTransferWithFS(nonExistentDetection, sourceRoot, targetRoot, CopyFile, mockFS) // Verify no target file was created if mockFS.FileExists(targetPath) { t.Errorf("Target file created despite missing source file") } }) // Test error handling for mkdir failures t.Run("Error cr...
Go
al class ThreadCatcher : Thread.UncaughtExceptionHandler { var exceptionCount: java.util.concurrent.atomic.AtomicInteger = java.util.concurrent.atomic.AtomicInteger() override fun uncaughtException(t: Thread, e: Throwable) { e.printStackTrace() exceptionCount.incrementAndGet() ...
Kotlin
t *testing.T, ate *ondatra.ATEDevice) (*ondatra.ATETopology, []*ondatra.Flow, []*ondatra.Interface) { t.Helper() topo := ate.Topology().New() port1 := ate.Port(t, "port1") iDut1SubIntf1 := topo.AddInterface(atePort1SubIntf1.Name).WithPort(port1) iDut1SubIntf1.Ethernet().WithVLANID(vlan10) iDut1SubIntf1.IPv4().Wi...
Go
N84/NVIC.hpp> #include <Chip/CM0+/Freescale/SKEAZN84/ROM.hpp> #include <Chip/CM0+/Freescale/SKEAZN84/MCM.hpp> #include <Chip/CM0+/Freescale/SKEAZN84/FGPIOA.hpp> #pragma once #include <Chip/Unknown/Atmel/AT91SAM9G10/UHP.hpp> #include <Chip/Unknown/Atmel/AT91SAM9G10/LCDC.hpp> #include <Chip/Unknown/Atmel/AT91SAM9G10/TC0...
C++
%r11 must contain RFI target address. ** %r25/%r26 args to pass to target function ** %r2 in case rfi target decides it didn't like something ** ** 2.0w: ** %r3 PDCE_PROC address ** %r11 RFI target address ** ** Caller must init: SR4-7, %sp, %r10, %cr24/25, */ common_stext: .proc .callinfo #e...
Assembly
) { case TodoActions.LOAD_SUCCESS: return action.payload; case TodoActions.ADD_SUCCESS: return [ action.payload, ...todos ]; case TodoActions.TOGGLE_SUCCESS: return todos.map(todo => { if (todo.id !== action.payload.id) return todo; return Object.a...
Typescript
│ │ │ End-to-End │ │ Data │ │ Key │ │ │ │ Encryption │ │ Masking │ │ Management │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ └─────────────────────────────────────────────────────────────┘ ``` **安全功能**: - **身份联邦**: 与企业AD/LDAP集成 - **细粒度权限**: 资源级别的访...
Markdown
import rclpy from rclpy.action import ActionClient from rclpy.time import Duration from rclpy.node import Node from control_msgs.action import FollowJointTrajectory from trajectory_msgs.msg import JointTrajectoryPoint class ControlActionClient(Node): def __init__(self): super().__init__('joint_trajector...
Python
.Hor) { lly = cbsc.UR.Y - cut.Hor[i+1]*cbsc.Height() } cbb := types.RectForWidthAndHeight(llx, lly, w, h) d1["MediaBox"] = cbb.Array() d1["CropBox"] = cbb.Array() cb1 := cbb.Clone() cb1.LL.X += cut.Margin cb1.LL.Y += mv cb1.UR.X -= cut.Margin cb1.UR.Y -= mv var buf bytes.Buffer c := color.White if cu...
Go
import ctypes import numpy as np import cv2 from pyueye import ueye def main(): hCam = ueye.HIDS(0) ret = ueye.is_InitCamera(hCam, None) if ret != ueye.IS_SUCCESS: print(f"Camera initialization failed with error code: {ret}") return pcImageMemory = None MemID = ueye.int() try:...
Python
// does this case statement have exactly one type? if len(e.List) == 1 { // redefine switch variable Define(assign.Lhs[0].(*ast.Ident).Name, TypeOfDecl(e.List[0], Resolver)) } } } for _, c := range e.List { AccessExpr(c, ReadAccess) } for _, b := range e.Body { AccessEx...
Go
Id = sequenceService.nextRange(transaction, Constants.SEQUENCE_OUTGOING_BATCH, size); } transaction.prepare(getSql("insertOutgoingBatchSql")); for (OutgoingBatch batch : batches) { batch.setLastUpdatedHostName(clusterService.getServerId()); batch.setBatchId(batchId); ...
Java
"description", "isActive", "isPromoted", "price", "features", ], additionalProperties: false, }); export { IEditArticle }; export { IEditArticleValidator }; import { TestBed, inject } from '@angular/core/testing'; import { MovieService } from './movie.service'; describe('Mo...
Typescript
nse. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Li...
Java
MavenProxyHost("123.4.5.678") assertEquals("123.4.5.678", MavenRoboSettings.getMavenProxyHost()) } @Test fun setMavenProxyPort() { MavenRoboSettings.setMavenProxyPort(9000) assertEquals(9000, MavenRoboSettings.getMavenProxyPort().toLong()) } } plugins { alias(libs.plugins.android.library) alias...
Kotlin
Background() // Setup a P2P Host Node :创建 p2p host nodehost, kaddht := setupHost(ctx) // Debug log logrus.Debugln("Created the P2P Host and the Kademlia DHT.") // Bootstrap the Kad DHT :根据DHT启动节点 bootstrapDHT(ctx, nodehost, kaddht) // Debug log logrus.Debugln("Bootstrapped the Kademlia DHT and Connected to B...
Go
let metadata = Metadata::try_from(*metadata_block)?; // get typed name let node_typed_name = metadata.name.as_ref().ok_or(Error::NoNameInMetadata)?; // map index in the list of vertices to this typed name vertex_idx_mapping.insert(idx as u64, node_typed_name.clone()); //...
Rust
un_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka]...
JavaScript
agePrediction(prefix="timm_image", checkpoint_name="swin_tiny_patch4_window7_224") image_processor = ImageProcessor( model=model, train_transforms=augmentations["model.timm_image.train_transforms"], val_transforms=augmentations["model.timm_image.val_transforms"], size=224, no...
Python
import uuid from datetime import datetime, timedelta from sqlalchemy import func, or_ from app import db from app.dao.dao_utils import autocommit, version_class from app.models import ApiKey @autocommit @version_class(ApiKey) def save_model_api_key(api_key): api_key.secret = uuid.uuid4() db.session.add(api_...
Python
prototype.regexps.books = bcv_parser.prototype.regexps.get_books(false, "none"); export class Country{ name: string; newCases: number; totalCases: number; newRecoveries: number; totalRecoveries: number; newDeaths: number; totalDeaths: number; constructor( name: string, newCases...
Typescript
EMATICAL FRAKTUR SMALL D [0x1D522] = 0x0065, -- MATHEMATICAL FRAKTUR SMALL E [0x1D523] = 0x0066, -- MATHEMATICAL FRAKTUR SMALL F [0x1D524] = 0x0067, -- MATHEMATICAL FRAKTUR SMALL G [0x1D525] = 0x0068, -- MATHEMATICAL FRAKTUR SMALL H [0x1D526] = 0x0069, -- MATHEMATICAL FRAKTUR SMALL I [0x1D527] = 0x006A, -- MATHEM...
Lua
{ c.scrollTarget = cnt } return nil }, func(bounds image.Rectangle) { c.drawFrame(bounds, colorScrollBase) thumb := bounds thumb.Max.X = thumb.Min.X + max(c.style().thumbSize, bounds.Dx()*body.Dx()/cs.X) thumb = thumb.Add(image.Pt(cnt.layout.ScrollOffset.X*(bounds.Dx()-thumb.Dx())/maxscroll, 0))...
Go
) async { _s.validateNumRange( 'expiryMinutes', expiryMinutes, 1, 1152921504606846976, ); final $payload = <String, dynamic>{ 'Capabilities': capabilities.map((e) => e.value).toList(), if (expiryMinutes != null) 'ExpiryMinutes': expiryMinutes, }; final response = ...
Dart
为可拖动元素添加拖动的光标 * http://jsbin.com/apavod/1/edit */ [draggable] { cursor: move; } /*# sourceMappingURL=neat.css.map */.md-avatar{width:40px;min-width:40px;height:40px;min-height:40px;margin:auto;display:inline-block;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;p...
CSS
gType.Height); else if (Children[i].Height.IsRelativeToParent || Children [i].RequiredLayoutings.HasFlag (LayoutingType.Height)) continue; else ch = Children [i].Slot.Height; if (ch > contentSize.Height) { contentSize.Height = ch; tallestChild = Children [i]; } } if (...
C#
g, x+x2, y+y2, x+x1, y+y1); if(n2.nodeType!=SINGULAR_DUMMY) //!n2.dummy) drawArrow(g, x+x1, y+y1, x+x2, y+y2); } int tmpIndex=k; while(n2.nodeType!=NORMAL) { //n2.dummy==true) { g.drawLine(x+n2.x+paddedNodeWidth/2...
Java
local S = minetest.get_translator(minetest.get_current_modname()) return function(plg) minetest.register_tool("mesecons_fpga:programmer", { description = S("FPGA Programmer"), inventory_image = "jeija_fpga_programmer.png", stack_max = 1, on_place = function(itemstack, placer, pointed_thing) if pointed_thing.ty...
Lua
tartingState } from '../state/StartingState'; import { MessageReceived } from '../../discord-events'; export const StartFactory = () => CommandFactory.build.state(StartingState).event(MessageReceived) .process((state, {message}) => { if (message.channel === state.context.channel && message.content === '!start' &...
Typescript
>> VoidBowPlans::getReagentsInternal() { return { { VoidCrystal::create(), 5 }, { Obsidian::create(), 2 }, { Gold::create(), 1 }, { Coal::create(), 4 }, }; } Item* VoidBowPlans::clone() { return VoidBowPlans::create(); } LocalizedString* VoidBowPlans::getString() { return Strings::Items_Equipment_Weapons...
C++
c int booth_sctp_exit(void) { return 0; } struct booth_transport booth_transport[] = { { .name = "TCP", .init = booth_tcp_init, .get_myid = booth_get_myid, .open = booth_tcp_open, .send = booth_tcp_send, .recv = booth_tcp_recv, .close = booth_tcp_close, .exit = booth_tcp_exit }, { .name = "UDP", ...
C
function getName() return "test water" end function onMapLoaded() end function initMap() -- get the current map context local map = Map.get() map:addTile("tile-background-ice-03", 0, 0) map:addTile("tile-background-ice-cave-art-01", 0, 1) map:addTile("tile-background-ice-cave-art-02", 0, 2) map:addTile("tile-b...
Lua
} return uInt; } @Deprecated(message="Use maxByOrNull instead.", replaceWith=@ReplaceWith(imports={}, expression="maxByOrNull(selector)")) @DeprecatedSinceKotlin(warningSince="1.4") @SinceKotlin(version="1.3") @ExperimentalUnsignedTypes @InlineOnly private static final <R extends Co...
Java
if (index == null) return null; return namer.getNameForJsGetName( currentElementSpannable, JsGetName.values[index], ); } int? extractEnumIndexFromConstantValue( ConstantValue constant, ClassEntity classElement, ) { if (constant is ConstructedConstantValue) { if (constant.ty...
Dart
local mynix=nixio.sysinfo() mem['freeram']=mynix['freeram']/1024 mem['sharedram']=mynix['sharedram']/1024 mem['bufferram']=mynix['bufferram']/1024 return mem end ------------------------------------- -- Returns FS Usage details ------------------------------------- function model.getFSFree() local fsf={} local ...
Lua
ndler(args->name, SIGUSR1, stress_resched_usr1_handler, NULL) < 0) { rc = EXIT_NO_RESOURCE; goto tidy_s_pids; } yields_size = ((sizeof(*yields) * (size_t)s_pids_max) + args->page_size - 1) & ~(args->page_size - 1); yields = (uint64_t *)stress_mmap_populate(NULL, yields_size, PROT_READ | PROT_WRITE, MAP_...
C
tiBot.tips.warlock.dps.dpsDebuff = "Дебаффы урона|cffffffff\n".. "Активирует стратегии наложения ослабляющих эффектов.|r\n\n".. "|cffff0000Левый клик – включить/отключить дебаффы урона|r\n".. "|cff999999(Порядок выполнения: Бот)|r"; MultiBot.tips.warlock.dps.dpsAoe = "AOE-урон|cffffffff\n".. "Активирует стратегии уро...
Lua
_SIZE2) MFXlist.openwin_list = linkedList.new() -- Set up the header buffer for blitting -- cannot seem to get the blit of the header to work gfx.dest = MFXlist.BLITBUF_HEAD -- according to https://forum.cockos.com/showthread.php?t=204629, this piece is missing gfx.setimgdim(MFXlist.BLITBUF_HEAD , -1 , -...
Lua
harpies, $N !", ["O"] = "Maggran Lieur-de-terre, de la Retraite de Roche-Soleil, vous demande de tuer sept Harpies, sept Embusquées, sept Tueuses et sept Volplumes Rougefuries.", ["T"] = "La menace des harpies", }, [6283] = { ["D"] = "Tailler dans les rangs des Rougefuries ne sera pas suffisant en soi. ...
Lua
} updateStock(stockId:string,newStockCode:string,newName:string):Observable<any>{ return this.http.put( "http://localhost:3000/stocks/"+stockId, { name: newName, stockCode:newStockCode } ) } deleteStock(stockId:string):Observable<any>{ return this.http.delete("http://localhost:3000/stocks/"+sto...
Typescript
punct ``` ## [NLP-Cube](https://github.com/Adobe/NLP-Cube)-vel ```py >>> from cube.api import Cube >>> nlp=Cube() >>> nlp.load("hu") >>> doc=nlp("Amit ma megtehetsz, ne halaszd holnapra.") >>> import deplacy >>> deplacy.render(doc) Amit PROPN root ma ADV root megtehetsz VERB ═╗═══╗ roo...
Markdown
UT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package export import ( "cmp" "fmt" "slices" "cuelang.org/go/cue/ast" "cuelang.org/go/cue/token" "cuelang.org/go/internal" "cuelang.org/g...
Go
}); return criterion; }) .filter(criterion => !_.isEmpty(criterion.values)); } filteredCriteria .forEach((criterion) => { criterion.values.sort(criterion.compare); }); return filteredCriteria; } get criteria() { this.rebuildCriteria(...
JavaScript
Room', hex: '#60584b'}, {name: 'Muddy Green', hex: '#657432'}, {name: 'Mulled Grape', hex: '#675a74'}, {name: 'Murky Green', hex: '#6c7a0e'}, {name: 'Murray Red', hex: '#6b3c39'}, {name: 'Museum', hex: '#685951'}, {name: 'Muted Mulberry', hex: '#66626d'}, {name: 'Mysterious Mo...
JavaScript
// SPDX-License-Identifier: GPL-2.0-only /* * intel_soc_dts_thermal.c * Copyright (c) 2014, Intel Corporation. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/acpi.h> #include <linux/module.h> #include <linux/interrupt.h> #include <asm/cpu_device_id.h> #include <asm/intel-family.h> #include "intel_s...
C
// // ______ ______ ______ // /\ __ \ /\ ___\ /\ ___\ // \ \ __< \ \ __\_ \ \ __\_ // \ \_____\ \ \_____\ \ \_____\ // \/_____/ \/_____/ \/_____/ // // // Copyright (c) 2014-2015, Geek Zoo Studio // http://www.bee-framework.com // // // Permission is hereby granted, free of charge, to any person ob...
C
ponseCode: BUNDESWEHR_TALKINGBOARD_CODE_RESPONSE_OK, Details: result.join(' ')); } BundeswehrTalkingBoardCodingOutput decodeBundeswehr( String cypherText, BundeswehrTalkingBoardAuthentificationTable tableNumeralCode) { if (tableNumeralCode.Content.isEmpty) { return BundeswehrTalkingBoardCodingOutput( ...
Dart
attrs.push(("label_side", label_side)); } write_tag_with_attrs(writer, "aux", "", &attrs) } } impl From<Aux> for datamodel::view_element::Aux { fn from(v: Aux) -> Self { datamodel::view_element::Aux { name: v.name, uid: ...
Rust
.addRuleInstance(CoreRules.CALC_MERGE) .addRuleInstance(CoreRules.CALC_REDUCE_EXPRESSIONS) // the hard part is done... a few more rule calls to clean up .addRuleInstance(PruneEmptyRules.UNION_INSTANCE) .addRuleInstance(CoreRules.PROJECT_TO_CALC) .addRuleInstance(CoreRu...
Java
�测,我们看到该文档在VT上的检出率情况,可以看到一开始提交到VT时该样本检出率只有2/61,如图17所示,而且静态根本检测不出它后面利用了CVE-2017-8759,最多只能检测出该文档链接有远程对象。 [![](https://p3.ssl.qhimg.com/t017e51abd7b314880a.png)](https://p3.ssl.qhimg.com/t017e51abd7b314880a.png) 图17 该文档在word_relsdocument.xml.rels文件中指定了一个远程文档,如图18所示,这个所谓的mee.doc文件是一个内嵌ole对象的rtf文档,从文档中提取的ole对象中我们发现了如图19的...
Markdown
不应该依赖通知顺序来保证业务逻辑的正确性。 - 广播通信场景,需要 Observer/Subscriber 自己去判断是否需要处理该消息,否则容易导致 **unexpected update**。 ## 与其他模式的关联 观察者模式和发布-订阅模式中的 Subject 和 Broker,通常都会使用 [单例模式](https://mp.weixin.qq.com/s/fzdxrhziPkSqM_RBTeSPKA) 来确保它们全局唯一。 ### 文章配图 可以在 [用Keynote画出手绘风格的配图](https://mp.weixin.qq.com/s/-sYW-oa6KzTR9LNdMWCSnQ) 中找到文章的绘图方法。 ...
Markdown
ExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoMBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRMwEQYDVQQDDApkZXYtNDU4NDIxMRwwGgYJKoZIhvcNAQkBFg1pbmZvQG9rdGEuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxrBl7GKz52cRpxF9xCsirnRuMxnhFBaUrsHqAQrLqWmdlpNYZTVg+T9iQ+aq/iE68L+BRZcZniKIvW58wqqS0ltXVvIkXuDSvnvnkkI5yMIVErR20K8jSOKQm1FmK+...
Go
, labels=df["symbol"], autopct="%1.1f%%", colors=colors, startangle=90, ) ax.set_title("資產配置分布", fontsize=16, fontweight="bold") plt.tight_layout() return fig except...
Python
org>`, fromDomain: "example.org", }, { hdr: `From: <test@foo.example.org>`, fromDomain: "foo.example.org", }, { hdr: `From: <test@foo.example.org>, <test@bar.example.org>`, }, { hdr: `From: <test@foo.example.org>, From: <test@bar.example.org>`, }, { hdr: `From: <test@>`, }, ...
Go
pt) else: return self.generate_vanilla(image_path, prompt) def use_custom_prompt(self, dataset): assert dataset is not None if listinstr(['MMfin', 'MMfin_CN'], dataset): return False if DATASET_TYPE(dataset) == 'MCQ' or DATASET_TYPE(dataset) == 'VQA':...
Python
gesEmpty(int iMinLevel) { foreach (Edge edge in _mainGeometryGraph.Edges) { LgNodeInfo s = _lgData.GeometryNodesToLgNodeInfos[edge.Source]; LgNodeInfo t = _lgData.GeometryNodesToLgNodeInfos[edge.Target]; double zoomLevel = Math.Max(s.ZoomLevel, t.ZoomLevel); ...
C#
10 assert stats.sent == 8 assert stats.failed == 2 assert stats.success_rate == 80.0 assert stats.duration is not None assert len(progress_calls) > 0 @pytest.mark.asyncio async def test_broadcast_cancellation(self): """Test broadcast cancellation functionality""...
Python
image(file: &str) -> bool { file.ends_with(".svg") || file.ends_with(".png") || file.ends_with(".jpg") || file.ends_with(".jpeg") } #[instrument] #[inline] pub fn clean_rfd_html_links(content: &str, num: &str) -> String { let mut cleaned = content .replace(r#"href="\#"#, &format!(r#"href="/rfd/{}#"#, n...
Rust
i1, image_op_or); } void image_mask_and(image* i0, image* i1) { image_mask_binary(i0, i1, image_op_and); } void image_mask_xor(image* i0, image* i1) { image_mask_binary(i0, i1, image_op_xor); } void image_mask_nor(image* i0, image* i1) { image_mask_binary(i0, i1, image_op_nor); } void image_mask_nand(image* i0, ima...
Rust
yst::{ ecs::{World, WriteStorage}, shred::{ResourceId, SystemData}, }; use derivative::Derivative; use ui_model_spi::{config::WidgetStatus, play::Siblings}; /// `UiRectifySystemData`. #[derive(Derivative, SystemData)] #[derivative(Debug)] pub struct UiRectifySystemData<'s> { /// `WidgetStatus` components. ...
Rust
tored in the same order as on the diagonal of the Schur form // returned in H, with wr[i] = H[i,i] and, if H[i:i+2,i:i+2] is a 2×2 diagonal // block, wi[i] = sqrt(-H[i+1,i]*H[i,i+1]) and wi[i+1] = -wi[i]. // // If unconverged is positive, some eigenvalues have not converged, and // wr[unconverged:ihi+1] and wi[unconver...
Go
uxcore .kuma-upload-filelist.nwmode .kuma-upload-fileitem-visual.status-error .visual-progress-box{background:rgba(240,70,49,.06);padding:0}.uxcore .kuma-upload-filelist.nwmode .kuma-upload-fileitem-visual.status-error .visual-progress-box .re-upload{display:block;font-family:PingFangSC-Regular;font-size:12px;color:#f0...
CSS
}); }); test('.from', () => { expect(Path.from('/home/work/index.html').complete).toBe('/home/work/index.html'); expect(Path.from('/home', 'work/index.html').complete).toBe('/home/work/index.html'); }); }); // Системные классы import BaseM from '../../System/BaseM'; // Классы SQL Запросов import { ...
Typescript
dwValueType: DWORD, pValue: PCERT_RDN_VALUE_BLOB, psz: LPSTR, csz: DWORD, ) -> DWORD; pub fn CertRDNValueToStrW( dwValueType: DWORD, pValue: PCERT_RDN_VALUE_BLOB, psz: LPWSTR, csz: DWORD, ) -> DWORD; pub fn CertNameToStrA( dwCertEncodingTyp...
Rust
isTrue(new C<int_>() is C<Function>); // Function <: () -> int Expect.isFalse(new C<Function>() is C<int_>); // () -> dynamic <: () -> dynamic Expect.isTrue(new C<_>() is C<_>); // () -> dynamic <: () -> void Expect.isTrue(new C<_>() is C<void_>); // () -> void <: () -> dynamic Expect.isTrue(new C<void_...
Dart
}, 0); CheckActiveNeighbours(tree, {0,i,j}, 0); CheckActiveNeighbours(tree, {i,j,leafDim-1}, 0); CheckActiveNeighbours(tree, {i,leafDim-1,j}, 0); CheckActiveNeighbours(tree, {leafDim-1,i,j}, 0); } } } ...
C++
/* Copyright (C) 1997-2017 Free Software Foundation, Inc. Contributed by Richard Henderson <richard@gnu.ai.mit.edu>, 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; eith...
Assembly
splashRadius: 22, onPressed: onBack, icon: Icon(Icons.arrow_back_ios, size: 22), color: Theme.of(context).textTheme.displayMedium!.color, tooltip: 'BACK', ), if (title != null) Padding( padding: EdgeI...
Dart
-- items: 13110, 13111, 2314, 7321 function event_say(e) local fac = e.other:GetFaction(e.self); if(e.message:findi("hail")) then e.self:Say("Greetings. stranger! Are you the [bounty hunter I requested]?"); elseif(e.message:findi("bounty hunter you requested")) then e.self:Say("It is about time. I have been wa...
Lua
); background: #FFFFFF; border-bottom: 1px solid #BBBBBB; border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; border-top: 1px solid #CCCCCC; color: #333333; display: block; font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; padding: 8px; padding-left: 0px; padding-top: 2px; positi...
CSS
un(ctx)) }() // FIXME: used to induce context switch. // Determine more deterministic method for prompting a context switch startedWG.Wait() requireConnect(t, rpcConfig.ListenAddress, 20) cli, err := httpclient.New(rpcConfig.ListenAddress, "/websocket") require.NoError(t, err) resultBlock, err := cli.Block(cont...
Go
Helper: time=\"2019-01-10T08:55:39-05:00\" level=info msg=FAIL executionId=52cf78b2-14df-11e9-919c-9801a78f161d suiteId=GGQ groupId=ipd testCaseId=ipd_test_2 deviceId=DUT"; private static String ALL_TESTS_FINISHED_1 = "[INFO] BasicGroupTestHelper: time=\"2019-01-10T09:18:31-05:00\" level=info msg=All tests finishe...
Java
, nullptr, &EnsureNoShipProc)) return_cmd_error(STR_ERROR_SHIP_IN_THE_WAY); /* First test autoslope. However if it succeeds we still have to test the rest, because non-autoslope terraforming is cheaper. */ CommandCost autoslope_result = TestAutoslopeOnRailTile(tile, flags, z_old, tileh_old, z_new, tileh_new, rail_...
C++
of (1-c,-c) in (x,y), and // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where // c = (3-sqrt(3))/6 const x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords const y1 = y0 - j1 + G2; const x2 = x0 - 1.0 + 2.0 * G2; // Offsets for last corner i...
JavaScript
pect("during test"); assert_eq!(doc["foo"]["a"].as_i64().expect("during test"), 42); assert_eq!(doc["foo"]["b"].as_i64().expect("during test"), 43); } #[test] fn parse_change_type_to_object() { let s = r#"{ "foo" : [0, 1, 2], "foo" : { "b" : 43 } }"#; let doc: Hocon = d...
Rust
ort androidx.test.InstrumentationRegistry import androidx.test.runner.AndroidJUnit4 import org.junit.Assert.assertEquals import org.junit.Test import org.junit.runner.RunWith /** * Instrumented test, which will execute on an Android device. * * See [testing documentation](http://d.android.com/tools/testing). */ @R...
Kotlin
= "舌头穴"}, ["香港曾道人"] = {word = "香港曾道人"}, ["中共嚴密封鎖消息"] = {word = "中共嚴密封鎖消息"}, ["人性本色"] = {word = "人性本色"}, ["性感乳娘"] = {word = "性感乳娘"}, ["中共政治课"] = {word = "中共政治课"}, ["熟妇"] = {word = "熟妇"}, ["妹妹骚图"] = {word = "妹妹骚图"}, ["97sese"] = {word = "97sese"}, ["搞笑图片网"] = {word = "搞笑图片网"}, ["阴核"] = {word = "阴核"}, ...
Lua
nd initializes a new instance with given conds. // Each conds must be a struct or map. // // FirstOrInit never modifies the database. It is often used with Assign and Attrs. // // // assign an email if the record is not found // db.Where(User{Name: "non_existing"}).Attrs(User{Email: "fake@fake.org"}).FirstOrInit(&user)...
Go
IntPtr.Zero, ref IID_DShellFolderViewEvents, false, viewDispatch, ref viewConnectionPointCookie, ref nullPtr); Marshal.ReleaseComObject(viewDispatch); viewDispatch = null; ...
C#
c>? options]) { return compute(_modelsToObjects, {'models': models, 'options': options}); } @override Future<RelaxSoundMixBox> modelToObject(RelaxSoundMixModel model, [Map<String, dynamic>? options]) { return compute(_modelToObject, {'model': model, 'options': options}); } @override Future<RelaxSo...
Dart
{var x= 500var y= 500 }, 5000, "Linear", true, 2000) tween.to(object{var x= 800 }, 5000, "Linear", true, 0) // And this starts it going // tween.start() } } package examples.arcadephysics import Phaser.* class BoundingBox: State() { //var game = Phaser.Game(800, 600, Phaser.CANVAS, "phaser-ex...
Kotlin
"""Utilities module for Azure DevOps MCP Server."""
Python