content
stringlengths
2
6.21k
label
stringclasses
16 values
erenceFields.orEmpty().indexOf(referenceField) } }package com.siliconlabs.bledemo.bluetooth.ble import com.siliconlabs.bledemo.utils.Converters object ErrorCodes { private fun getTwoOctetsErrorCodeHexAsString(status: Int): String { return "0x" + Converters.getHexValue((status shr 8).toByte()) + Conve...
Kotlin
local M = {} --- @param highlights table<string, vim.api.keyset.highlight> function M.generate(_, highlights) local links = { FzfLuaFzfCursorLine = "CursorLine", FzfLuaFzfMatch = "Special", FzfLuaFzfBorder = "FzfLuaBorder", FzfLuaFzfScrollbar = "FzfLuaBorder", FzfLuaFzfSeparator = "FzfLuaBorder",...
Lua
#ifdef VMM_GUEST // Forward FS read/writes to the host instead of the IDE disk. #include "fs.h" #include <inc/vmx.h> #include <inc/fs.h> #include <inc/lib.h> #define HOST_FS_FILE "/vmm/fs.img" static struct Fd *host_fd; static union Fsipc host_fsipcbuf __attribute__((aligned(PGSIZE))); static int host_fsipc(unsig...
C
责任人员,依法给予行政处分;构成犯罪的,依法追究刑事责任。 ## 第六章 附则 第三十三条 国家机关、学校等单位内部的文化体育设施向公众开放的,由国务院文化行政主管部门、体育行政主管部门会同有关部门依据本条例的原则另行制定管理办法。 第三十四条 本条例自2003年8月1日起施行。# 中华人民共和国认证认可条例 2003年9月3日 中华人民共和国国务院令第390号公布 2016年2月6日 《国务院关于修改部分行政法规的决定》第一次修订 根据 <!-- INFO END --> ## 第一章 总则 第一条 为了规范认证认可活动,提高产品、服务的质量和管理水平,促进经济和社会的发展,制定本条例。 第二条 本条例所称认证...
Markdown
utter/services.dart'; import 'package:webf/foundation.dart'; import 'package:webf/module.dart'; import 'package:webf/bridge.dart'; const String DEFAULT_URL = 'about:blank'; const String UTF_8 = 'utf-8'; final ContentType _cssContentType = ContentType('text', 'css', charset: UTF_8); // MIME types suits JavaScript: htt...
Dart
개, 뼈 스카라베 5개를 가져가야 합니다. 또한, 이 퀘스트를 완료하려면 노즈도르무 혈족으로부터 중립적 이상의 평판을 얻어야 합니다."}}, [8638] = {"죽음의 선고자 조끼", {"안퀴라즈 지하에는 입에 담기조차 두려운 고대 신이 잠들어 있어요. 지금 그가 서서히 깨어나고 있습니다. 이제 아제로스를 기다리는 끔찍한 운명이 찾아올 겁니다. 며칠이 됐든 몇 년이 됐든 고대의 힘을 지닌 존재들에게 그 시간은 아무런 의미가 없습니다.","별들의 항로가 고대 신의 운명과 함께하는 날, 그는 살아 있는 모든 존재를 향해 무시무시한 분노를 터뜨릴 겁니다. 그날이 오기 전에...
Lua
q",full_py:"qin",hanzis:"侵亲钦衾骎媇嵚欽綅嵰誛嶔親顉駸鮼寴芹芩庈肣矜秦蚙菦埐珡耹捦菳禽覃鈙鈫雂琴琹溱勤靲嫀嗪廑慬嶜擒噙鳹斳澿檎懄螓瘽懃蠄鵭坅昑笉赾梫寑锓寝寢鋟螼吣吢抋沁唚菣揿搇撳藽瀙" }, { first_py:"q",full_py:"qiao",hanzis:"悄郻硗雀跷鄡鄥勪踍敲毃锹劁骹頝墝墽燆橇幧缲磽鍫鍬繑繰趬蹺鐰乔侨荞荍峤桥菬硚喬翘僑谯槗墧憔蕉蕎嘺嫶鞒犞燋樵橋瞧癄礄翹譙趫櫵藮鐈鞽顦巧釥愀髜壳陗俏诮帩峭窍誚髚僺撬撽韒鞘鞩竅躈" }, { first_py:"q",full_py:"qiang",hanzis:"羌呛抢斨枪戗戕玱羗将猐啌跄腔溬嗴獇椌蜣锖锵羫槍牄瑲戧嶈摤篬謒镪蹌蹡鎗鏘強...
JavaScript
01234567890") @Test fun rinkebyAddressWorks() { assertThat(getEtherScanBlockExplorer(ChainId(4L))!!.getAddressURL(address)) .isEqualTo("https://rinkeby.etherscan.io/address/0x1234567890123456789012345678901234567890") } @Test fun mainAddressWorks() { assertThat(getE...
Kotlin
/* $NetBSD: disklbl.c,v 1.3 1996/02/09 20:52:06 leo Exp $ */ /* * Copyright (c) 1995 Waldi Ravens. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code mus...
C
t; #else DUK_FREE_CHECKED(thr, (void *) cat); #endif } DUK_LOCAL #if defined(DUK_USE_CACHE_ACTIVATION) DUK_NOINLINE #endif duk_activation *duk__hthread_activation_alloc_slow(duk_hthread *thr) { duk_activation *act; act = (duk_activation *) DUK_ALLOC_CHECKED(thr, sizeof(duk_activation)); DUK_ASSERT(act != NULL); ...
C++
R.layout.fitem_dialogue_l); tv_name = itemView.findViewById(R.id.tv_name); tv_content = itemView.findViewById(R.id.tv_content); } } } package com.bamboy.bamboycollected.page.toast.bamtoast.btoast; import android.animation.ObjectAnimator; import android.content.Context; import and...
Java
"✅ Рассчитано для 100г: {kcal} ккал (Б{protein:.1f}/Ж{fat:.1f}/У{carbs:.1f}). 🍽️" # Добавляем информацию об источнике данных if "USDA FDC" in source_note: reply += "\n📊 Источник: база USDA FDC" elif "Open Food Facts" in source_note: ...
Python
print(f"\n{'='*100}") print(f"🎯 초안전 GridSearch 최적화 완료") print(f"{'='*100}") if results['ranking']: print(f"\n🏆 최고 성능 모델: {results['ranking'][0][0]}") print(f" 종합 점수: {results['ranking'][0][2]:.3f}") print(f" R²: {results['ranking'][0][1]['avg_r2']:...
Python
ロードランキング 1. [taglist.vim : Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc)](http://www.vim.org/scripts/script.php?script_id=273) (2795) 2. [The NERD tree : A tree explorer plugin for navigating the filesystem](http://www.vim.org/scripts/script.php?script_id=1658) (2536) 3. [python.vim : En...
Markdown
products = [ { id: 1, name: "Phone XL", price: 799, description: "A large phone with one of the best screens" }, { id: 2, name: "Phone Mini", price: 699, description: "A great phone with one of the best cameras" }, { id: 3, name: "Pho...
Typescript
------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ geMidiActivity::geMidiActivity(bool hasOut) : geFlex(Direction::VERTICAL, G_GUI_INNER_MARGIN) { o...
C++
u0bbf\u0baf\u0bc1\u0bb1\u0bcd\u0bb1\u0ba4\u0bc1: {0}","example":"\u0b89\u0ba4\u0bbe\u0bb0\u0ba3\u0bae\u0bcd","Search":"\u0ba4\u0bc7\u0b9f\u0bc1\u0b95","All":"\u0b85\u0ba9\u0bc8\u0ba4\u0bcd\u0ba4\u0bc1\u0bae\u0bcd","Currency":"\u0b9a\u0bc6\u0bb2\u0bbe\u0bb5\u0ba3\u0bbf (Currency)","Text":"\u0b89\u0bb0\u0bc8","Quotations...
JavaScript
/RandomColorScheme/issues). ## License Copyright 2020 Bernardo Ferrari 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...
Markdown
}; class CLMsg5ForCLMessageReceiverTest_Deserializer : public CLMessageDeserializer { public: virtual CLStatus Deserialize(CLIOVectors& IOVectors, CLMessage **ppMsg, CLBufferManager& BufferManager) { CLIteratorForIOVectors iter; IOVectors.GetIterator(0, iter); int len = 0; EXPECT_TRUE(IOVectors.ReadBlock(i...
C++
return name; } /** * 이름을 설정한다. * @param element 이름 엘레멘트 */ public void setName(PomString name) { this.name = name; } /** * Pom 오브젝트의 URL을 가져온다. * @return Pom URL */ public PomString getUrl() { return url; } /** * URL을 설정한다. * @param url URL */ public void setUrl(PomString url) { this.ur...
Java
/** * Tencent is pleased to support the open source community by making Tars available. * * Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except * in compliance with the License. You may obtain a c...
C
t(); return e.getClientX() - target.getAbsoluteLeft() + target.getScrollLeft() + target.getOwnerDocument().getScrollLeft(); } /** * Gets the mouse y-position relative to a given element. * * @param target the element whose coordinate system is to be used * @return the relative y-position ...
Java
@Override IVariableBinding getVariableBinding(SingleFieldDeclaration field) { IModelElement[] modelElements; try { modelElements = sourceModule.codeSelect(field.getStart(), field.getLength()); } catch (ModelException e) { if (DLTKCore.DEBUG) { Logger.logException(e); } return null; } if (Ar...
Java
kage:cw_core/format_amount.dart'; import 'package:cw_core/hive_type_ids.dart'; import 'package:hive/hive.dart'; class Trade extends HiveObject { Trade({ required this.id, required this.amount, ExchangeProviderDescription? provider, CryptoCurrency? from, CryptoCurrency? to, TradeState? state, ...
Dart
blt.s .ok sub.w d1,d2 bra.s .retry .ok dbf d0,.step * Updated byte position move.w d2,(a3,d7.w) * Set final sample position and length * for scopes ext.l d2 add.l d2,ns_start(a0) lsr #1,d2 * words sub d2,ns_length(a0) .skip lea ns_size(a0),a0 addq #2,d7 cmp #4*2,d7 bne.b .loop .x rts * Checks whet...
Assembly
觉得合理的嵌套是 2~3 层,如果超过 5 层可以考虑用 ConstraintLayout 布局来写,当然这种情况在实际项目中还是比较少的。 * 另外一个问题,就是我发现有些人写布局喜欢嵌套很多层,但是真正的情况并不是真的就需要嵌套那么多,而是这个人对这个布局的特性和属性不太熟悉而导致,正确的方式是深入学习,这样才能用好每一个布局。 #### 为什么不拆成多个框架来做这件事 * AndroidProject 其实一直有这样做,把很多组件都拆成了独立的框架,例如:权限请求框架 [XXPermissions](https://github.com/getActivity/XXPermissions),网络请求框架 [EasyHtt...
Markdown
��知识成功").put("data", jiashizhishiView); } /** * 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ JiashizhishiEntity jiashizhishi = jiashizhishiService.selectById(id); jiashizhishi.setClicknum(jiashizhishi.getClicknum()+1); jiashizhishi.setClicktim...
Java
int found = -1; bool matched = false; //only look at this if we have a populated search array and search bytes with a sensible start if (searchIn.Length > 0 && searchBytes.Length > 0 && start <= (searchIn.Length - searchBytes.Length) && searchIn.Length >= searchBytes.Length) ...
C#
(msg2) then msg1 = msg2 end; --display message self:DisplayMessage( msg1, rbgcolor ); else event = "event"; --set event type if (option == "SHOWHIT" or option == "SHOWSPELL" or option == "SHOWHEAL" or option == "SHOWSELFHEAL") then event = "damage"; end --see if crit override if (showcrit)...
Lua
code is copied from jQuery ($.browser is deprecated + there is a bug in IE) var u = navigator.userAgent.toLowerCase(), v = (u.match( /.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1], css_string = '' + '.jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } ' + ...
JavaScript
-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-...
JavaScript
register itself and its components with the shell. /// </summary> // This attribute tells the PkgDef creation utility (CreatePkgDef.exe) that this class is // a package. [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] [Description("PowerShell Interactive Window...
C#
)) printTable("9", Json.toTable(Data('{"a":"1"}'))) printTable("10", Json.toTable("a")) printTable("11", Json.toTable()) print("-----isValid------") print("12", Json.isValid('{"a":"1"}')) print("13", Json.isValid(Data('{"a":"1"}'))) print("14", Json.isValid("a")) print("15", Json.isValid()) print("-----nil---...
Lua
alue types crossing over between language // boundaries might have strange behaviors. // // Slices of types should be converted into a single multiplicative type wrapping // a go slice with the methods `Size`, `Get` and `Set`. Further slice operations // should not be provided to limit the remote code complexity. Array...
Go
,locator:Cj(C,T),ident:Vwe(C,T),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(b):!1,hoistPriority:U||0,dependencyKind:z||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,w)}if(E.dependencies.set(h.name,w),E.origina...
JavaScript
ommended). e.g. `TermLogger::new(LevelFilter::Warn, Config::default(), TerminalMode::Mixed).unwrap()` /// - silently ignoring (little better). e.g. `if let Some(logger) = TermLogger::new(LevelFilter::Warn, Config::default(), TerminalMode::Mixed) { /*...*/ }` /// - falling back: /// ``` /// # extern crat...
Rust
], ]), terminator: None, }, }, cr_lf_delimit("+TEST: (1=abc)(2,xyz=3)"), ) } <filename>2020/src/bin/day14.rs use anyhow::{anyhow, Result}; use std::collections::HashMap; enum Input { Mask(String), Assignment(usize, i64), } imp...
Rust
1', '0', '1', '', '', '0', '1.1', '2', '1', '8', '2', '', '12001', 'OnActionOver', '702900101', '', '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''}, {'703000105', '', '', '7030001', '聚合炮', '1', '1', '1', '', 'cast10', '5', '对单体目标造成攻击120%的能量伤害,自身防御+20%,状态抵抗+20%,持续2回合'...
Lua
exe.run(startup) fetch_list = [result] fetch_list.extend([x for x in grads if x is not None]) out = exe.run( train_prog, feed={"cond": self.cond, "x": self.x, "y": self.y}, f...
Python
5: "w\x05\U00025e45", // 𥹅 0x25e46: "w\x05\U00025e46", // 𥹆 0x25e47: "w\x05\U00025e47", // 𥹇 0x25e48: "w\x05\U00025e48", // 𥹈 0x25e49: "w\x05\U00025e49", // 𥹉 0x25e4a: "w\x05\U00025e4a", // 𥹊 0x25e4b: "w\x05\U00025e4b", // 𥹋 0x25e4c: "w\x05\U00025e4c", // 𥹌 0x25e4d: "w\x05\U00025e4d", // 𥹍 0x25e4e: "w...
Go
ABS) .add(WWBlocks.SCULK_SLAB) .add(WWBlocks.MOSSY_MUD_BRICK_SLAB) .add(WWBlocks.GABBRO_SLAB) .add(WWBlocks.POLISHED_GABBRO_SLAB) .add(WWBlocks.GABBRO_BRICK_SLAB) .add(WWBlocks.MOSSY_GABBRO_BRICK_SLAB); this.getOrCreateTagBuilder(BlockTags.WALLS) .add(WWBlocks.SCULK_WALL) .add(WWBlocks.MOSSY_...
Java
/** * ########## * Time * ########## */ [Foldout("Time", true)] [Range(0, 23)] public int StartTimeHour = 8; [Range(0, 59)] public int StartTimeMinute; [Range(0.5f, 1000f)] [Tooltip("Speeds up the in game time.")] ...
C#
.mynetwork.com 2>&1 | grep "%s" | wc -l`, keyword) cmd := exec.Command("sh", "-c", arg) result, err := cmd.Output() if err != nil { log.Fatal(err) } ret, _ := strconv.Atoi(strings.TrimSuffix(string(result), "\n")) return ret != 0 } func CheckHowManyEventHubRegistered() bool { key := fmt.Sprintf(`Successfully ...
Go
risk += 1 + current } } } risk } fn walk_basin(x: usize, y: usize, grid: &mut [Vec<u32>]) -> usize { if grid[y][x] == 9 { return 0; } grid[y][x] = 9; let mut count = 1; if x != 0 { count += walk_basin(x - 1, y, grid); } if y != 0 { ...
Rust
ostream& ostream); // protected: // const char *filename_; // name of file // int lineno_; // line number in file // LogLevel level_; // std::ostringstream msg_; // private: // static std::ostream* ostream_; // }; // } // #endif // NTA_LOG_ITEM_HPP export const updateTo...
Typescript
ue } }).into() }; local_res } #[no_mangle] /// Serialize the FundingSigned object into a byte array which can be read by FundingSigned_read pub extern "C" fn FundingSigned_write(obj: &FundingSigned) -> crate::c_types::derived::CVec_u8Z { crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner }) } #[no_mangle...
Rust
should be regarded as a code template only. * // It will require modifications to work: * // - It may require correct/in-range values for request initialization. * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#co...
Java
"License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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,...
Java
/* * strlen - calculate the length of a string * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ /* Assumptions: * * ARMv8-a, AArch64. */ #include "../asmde...
Assembly
bc = new BoisseauChargement; c = new Cereale(Nom.Ble); }); afterEach(() => { bc = null; c = null; }); it('Doit être vide ', () => { expect(bc.isVide()).toBeTruthy(); }); it('Ajout cereale ', () =>{ bc.setCereale(c); expect(bc.isVide())....
Typescript
e { DSPEffect::invalidate(); } /** * @brief Compute next value * @param x * @return */ double next(double x) { in = x; process(); return out; } /** * @brief Generate an anti-aliased tanh * @param x * @return */ inline d...
C++
sb.append(indentCurrent); firstDone = true; } sb.append(arg); } } return some; } //copied from java.util.stream.Collectors private static <T> BinaryOperator<T> throwingMerger() { return (u,v) -> { throw new IllegalS...
Java
1 round',['1d8','0d8'],['V','S','Weapon'], 'As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spells range, otherwise the spell fails.On a hit, the target suffers the attacks normal effects, and it becomes sheathed in booming energy until the start...
Typescript
utton{font-size:14px;font-weight:700;text-transform:uppercase;letter-spacing:2px;display:inline-block;color:#fff}[dir] .App .Signup .SignupForm__back-button{margin:20px auto}@media(max-height:900px){[dir] .App .Signup .SignupForm__back-button{margin:10px auto}}.App .Login{width:auto}.App .Login .LoginForm__login-button...
CSS
def disable_vae_slicing(self): """ Disable sliced VAE decoding. If `enable_vae_slicing` was previously invoked, this method will go back to computing decoding in one step. """ self.vae.disable_slicing()
Python
(|s| (conn.base_stats(), s)); } (connection.clone(), true, map.stats.clone(), stats, 0, 0) } None => { let (_, send_socket) = solana_net_utils::bind_in_range( IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), VALIDATOR_PORT_RANGE, ) ...
Rust
en restored,\nand your maximum health has\nincreased by 5.", } messages.health.img = sprites.pickups.health messages.failedLoad = { "No save file found.", } messages.intro = { "1-31-2056 \n" .. "St. Louis, Missouri, United States of America @\n\n" .. "Asteroid \"433 Eros\" has crashed into Ea...
Lua
0C;1106 1163 11B3;BA0C;1106 1163 11B3; # (먌; 먌; 먌; 먌; 먌; ) HANGUL SYLLABLE MYALS BA0D;BA0D;1106 1163 11B4;BA0D;1106 1163 11B4; # (먍; 먍; 먍; 먍; 먍; ) HANGUL SYLLABLE MYALT BA0E;BA0E;1106 1163 11B5;BA0E;1106 1163 11B5; # (먎; 먎; 먎; 먎; 먎; ) HANGUL SYLLABLE MYALP BA0F;BA0F;1106 1163 11B6;BA0F;1106 1163 11B6; # (먏; 먏; 먏; 먏; 먏;...
Kotlin
)] let mut scope_1680 = writer.prefix("CustomerGatewayId"); if let Some(var_1681) = &input.customer_gateway_id { scope_1680.string(var_1681); } #[allow(unused_mut)] let mut scope_1682 = writer.prefix("DryRun"); if let Some(var_1683) = &input.dry_run { scope_1682.boolean(*var_1683...
Rust
盐 ## 计算 - 鸡蛋 400g(约 8 颗) - 八角 4g(约 2 颗) - 香叶 0.5-1g(约 2 片) - 桂皮 3g(1 小块) - 茴香 5g - 冰糖 15g - 红茶 20g - 生抽 15g - 老抽 25g - 食盐 3g 使用上述条件,计算出计划使用的原材料比例。 ## 操作 - 用冷水将鸡蛋煮熟,大火大约 8 分钟(根据自家厨具决定) - 鸡蛋捞出,过冷水 - 将鸡蛋互相碰撞,使每个鸡蛋产生裂缝 - 将鸡蛋下锅,放入八角,香叶,桂皮,茴香,冰糖,红茶,生抽,老抽,食盐 - 加水直至没过鸡蛋 - 大火煮开之后,转中小火煮 15 分钟 > 中火煮15 分钟之后,捞出料渣,鸡蛋再浸泡一会口感更佳 ...
Markdown
ForbiddenError, Get, Body, Patch } from 'routing-controllers' import { Batch } from './entities' export const baseUrl = 'http://localhost:4001' const x = [ {"id": 1, "batchName": "Name", "startDate": "2017-08-22", "endDate": "2017-08-22"} ] const b = JSON.stringify(x) @JsonController() export default class Ba...
Typescript
local localhost = '127.0.0.1' return { { 'rcarriga/nvim-dap-ui', event = 'VeryLazy', dependencies = { { 'mfussenegger/nvim-dap' }, { 'theHamsta/nvim-dap-virtual-text', config = function() require('nvim-dap-virtual-text').setup({ commented = true }) end, }, { ...
Lua
import streamlit as st import pandas as pd import plotly.express as px # Configuración de la página st.set_page_config( page_title="Análisis de Sentimientos - Dashboard", page_icon="📊", layout="wide" ) # Título del Dashboard st.title("📊 Dashboard de Análisis de Sentimientos") logo_path = "https://i.ibb...
Python
/*- * Copyright (c) 2010 Konstantin Belousov <kib@FreeBSD.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * no...
Assembly
es. ---@return Knot2 function Knot2:reverse() local temp <const> = self.fh self.fh = self.rh self.rh = temp return self end ---Rotates this knot around the z axis by an angle in radians. ---@param radians number angle ---@return Knot2 function Knot2:rotateZ(radians) return self:rotateZInternal( ...
Lua
coroutineScope { launch { repo.getCpuGov(cluster).take(1).collect { _currentCpuGovernors[cluster]?.value = it } } launch { repo.getCpuFreq(cluster).take(1).collect { _currentCpuFrequencies[cluster]?.value = it } } launch { repo.getAvailableCpuGovernors(cluster...
Kotlin
ndex - 1 local range = entry.range if entry.value:absolute() == self._focused then range[2] = range[2] .. "Focused" end table.insert(self.entries, index, entry) A.nvim_buf_set_lines(self.buffer, line, line, true, { entry.display }) if not self.disable_devicons then A.nvim_buf_add_highlight(se...
Lua
e "white": Style["color"] = theme.white; break; case "gray1": Style["color"] = theme.gray1; break; case "gray2": Style["color"] = theme.gray2; break; case "gray3": Style["color"] = theme.gray3; break; case "gray4": Style["co...
Typescript
import { dataProcessors } from './testData'; const MockProvider = (props = {}) => { const contextValue = useReducer( DataPipelinesReducer, { ...initialState, ...props, }, ); return ( <DataPipelinesContext.Provider value={contextValue}> <DataOperationFilters namespace="mlreef" operationT...
JavaScript
as [%l6], %l3, %o2 ! move %o2(lower) -> %o2(upper) sllx %o2, 32, %o2 add %l4, 1, %l4 P4971: !DWLD [9] (Int) ldx [%i1 + 512], %l6 ! move %l6(upper) -> %o2(lower) srlx %l6, 32, %l3 or %l3, %o2, %o2 P4972: !DWST [9] (maybe <- 0x2000225) (Int) (Branch target of P4467) mov %l4, %l7 sllx %l7, 32, %l7 stx %l7, [%i1 + 51...
Assembly
gravy/advent-of-code/go/utils" "testing" ) func TestPart1(t *testing.T) { result := Part1(inputTest) expected := 1147 if result != expected { t.Errorf("Result is incorrect, got: %d, want: %d.", result, expected) } } //func TestPart2(t *testing.T) { // result := Part2(inputTest) // expected := 29 // if result !...
Go
Flag) { let flagList: string[] = []; _.forOwn(ChangeFlag, (value, key) => { if ((typeof value) === "number" && (value & flags)) { flagList.push(key); } }); return flagList.join(' | '); } export function observe(item: paper.Item, flags:...
Typescript
(&key_256)); } } } } <gh_stars>1-10 use std::cmp::Ordering; use serde::{Serialize, Deserialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct Node(i32, i32); impl Node { pub fn new(x: i32, y: i32) -> Node { Node(x, y) } } #[derive(Debug, Clone, Serialize, Deseria...
Rust
/****************************************************************************** * Copyright © 2018, VideoLAN and dav1d authors * Copyright © 2015 Martin Storsjo * Copyright © 2015 Janne Grunau * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permit...
Assembly
eModel: LocalImageModel) { viewModelScope.launch(Dispatchers.Default) { /*withContext(Dispatchers.Main) { siblingImagesLiveData.value = null }*/ siblingImagesLiveData.postValue(null) if (siblingImagesLiveData.value.isNullOrEmpty()) { ...
Kotlin
id("org.jlleitschuh.gradle.ktlint") version "12.1.1" } group = "pt.isel.daw" version = "1.0-SNAPSHOT" repositories { mavenCentral() } dependencies { // Module dependencies implementation(project(":tic-tac-toe:domain")) implementation(project(":tic-tac-toe:http")) implementation(project(":tic-...
Kotlin
); // MLFloat16 template std::unique_ptr<Tensor> MatMul<MLFloat16>( const Tensor& input_1, const gsl::span<const int64_t>& input_shape_1_override, const Tensor& input_2, const gsl::span<const int64_t>& input_shape_2_override, AllocatorPtr allocator, concurrency::ThreadPool* tp, void* einsum_cuda_assets, ...
C++
-- paths.lua -- Copyright (C) 2022 Posit Software, PBC function resourceRef(ref, dir) -- if the ref starts with / then just strip if off if string.find(ref, "^/") then -- check for protocol relative url if string.find(ref, "^//") == nil then return pandoc.text.sub(ref, 2, #ref) else return ...
Lua
orNames.substring(2); }, () => { this.errorMessage = 'An error occured on the server. Please try again later!'; } ); } //regardless whether we are updating or creating a new movie handleFormSubmission(){ let directors:string[] = this.directorNames.split(','); this.movie.dire...
Typescript
AsLastSibling(); break; } } private void OnAfterViewTransition(AbstractView view) { switch (view.State) { case ViewState.Closed: //view.enabled = false; view.gameObject.SetActive(fals...
C#
using System.Diagnostics.CodeAnalysis; using System.Windows; using System.Windows.Input; using JetBrains.Annotations; namespace LoadProfileGenerator { /// <summary> /// Interaktionslogik für InputBox.xaml /// </summary> [SuppressMessage("ReSharper", "NotNullMemberIsNotInitialized")] public par...
C#
Grabber pg = new PixelGrabber(image, 0, 0, 1, 1, false); try { pg.grabPixels(); } catch (InterruptedException ex) { } return pg.getColorModel().hasAlpha(); } } /** <code>SubFilter</code> singleton. */ public static final Filter SUB_FILTER = new Su...
Java
item[data-v-7262f3ec],.render-form .el-form-item[data-v-7262f3ec]{align-items:center}.form-widget-canvas .el-form-item--large .el-form-item__label[data-v-7262f3ec],.render-form .el-form-item--large .el-form-item__label[data-v-7262f3ec]{height:44px!important}.form-widget-canvas .el-form-item--default .el-form-item__labe...
CSS
argc(), opts.argv()); std::vector<std::string> commands{"reload"}; REQUIRE(args.cmds_to_execute() == commands); } #include "keymap.h" #include <algorithm> #include <set> #include "3rd-party/catch.hpp" #include "config.h" #include "confighandlerexception.h" #include "keycombination.h" using namespace newsboat; st...
C++
Каргат."}}, [4904] = {"Долгожданная свобода", nil, {"Выведите Лакоту Песню Ветра с Пика Темного Облака, а потом поговорите с Талией Янтарной Шкурой на Заставе Вольного Ветра."}}, [4905] = {"<UNUSED>", nil, {"Defend Kanati Greycloud"}}, [4906] = {"Снова порча!", nil, {"Эридана Грусть Ветра из Оскверненного леса просит в...
Lua
.map(|(dx, dy)| count_trees(&terrain, dx, dy)) .inspect(|x| println!("{}", x)) .product() } fn main() { let terrain = Terrain::from(DATA); println!("Trees hit with slope (3, 1): {}", count_trees(&terrain, 3, 1)); println!(); let r = mul_count(&terrain, vec![(1, 1), (3, 1), (5, 1...
Rust
class _SLATracker: def __init__(self, policy: SLAPolicy, *, node_id: str, interval: int) -> None: self.policy = policy self.node_id = node_id self.interval = int(interval) self._request_start = time.monotonic() self._violation: _SLAViolationDetail | None = None async ...
Python
TvZoomMode = Key(-1000000171) actual val TvContentsMenu = Key(-1000000172) actual val TvMediaContextMenu = Key(-1000000173) actual val TvTimerProgramming = Key(-1000000174) actual val StemPrimary = Key(-1000000175) actual val Stem1 = Key(-1000000176) actual val Stem2 = K...
Kotlin
lter { export function minion( source: ISource, entity: HsLogic.Entity, gameCtx: HsGameCtx ): boolean { return entity instanceof HsLogic.Minion; } export function hero( source: ISource, entity: HsLogic.Entity, gameCtx: HsGameCtx ): boolean { return entity instanceof HsLogic.Hero; } ...
Typescript
ns, name, backupJobName string, bm *backupManager, backup *v1alpha1.Backup, oldJob *batchv1.Job) error { if oldJob.DeletionTimestamp != nil { return controller.RequeueErrorf(fmt.Sprintf("backup %s/%s job %s is being deleted", ns, name, backupJobName)) } finished := false for _, c := range oldJob.Status.Conditions...
Go
.wp-block-group.global-header button:focus, .wp-block-group.global-header input[type="button"]:focus, .wp-block-group.global-header input[type="reset"]:focus, .wp-block-group.global-header input[type="submit"]:focus { /* Bring back the browser focus style */ outline: revert; } .wp-block-group.global-header p, .wp-bl...
CSS
enu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico...
CSS
[1]; --:-:-:-:1 MOV clocks0, param_clocks[0]; --:-:-:-:1 MOV clocks1, param_clocks[1]; //--:-:-:-:1 MOV in, c[0x0][0x148]; --:-:-:-:1 MOV blockDim, blockDimX; --:-:-:-:1 PSETP.AND.AND P0, PT, !PT, PT, PT; --:-:-:-:6 MOV32I result, 0xffffffff; --:-:-:-:6 MOV32I result2, 0x...
CSS
h); String points = "m " + (int) (w / 2) + " 0 l " + w + " " + (int) (h / 2) + " l " + (int) (w / 2) + " " + h + " l 0 " + (int) (h / 2); elem.setAttribute("path", points + " x e"); } else if (shape.equals(mxConstants.SHAPE_TRIANGLE)) { elem = document.createElement("v:shape"); elem.setAt...
Java
g/intensity lighting/rgb lighting extern int Lighting_on; // HACK INTERFACE: how far away the current segment (& thus texture) is extern int Current_seg_depth; extern int Max_perspective_depth; // Deepest segment at which perspective interpolation will be used. extern int Max_linear_depth; // Deepest segment at ...
C
val vecFile = Vector<String>() val file = File(fileAbsolutePath) val subFile = file.listFiles() for (iFileLength in subFile.indices) { // 判断是否为文件夹 if (!subFile[iFileLength].isDirectory) { val filename = subFile[iFileLen...
Kotlin
tion - 输出 spk_embedding - spk_mode = punc_segment | vad_segment - 依赖 timestamp - 没有 spk_model 的时候可以设置 sentence_timestamp=True 返回 sentence 信息 - punc - 处理 `result["text"]` - 输出 `{text:'', punc_array:[]}` - 如果设置了 preset_spk_num 会根据 spk_embedding 做 cluster 来确定说话人 - 如果设置了 return_raw_text 则会设置 `...
Markdown
ks.txt', 'deep_learning.txt'], 'relevance_scores': { 'neural_networks.txt': 3.0, 'deep_learning.txt': 3.0, 'ai_overview.txt': 2.0, 'ml_intro.txt': 1.0 } } ] # 执行评估 mock_rag = MockRAGSystem(system_type="balanced", random_seed=42) result...
Python
"); } Map? _getItem(String key) => convertNativeToDart_Dictionary(JS('', '#.get(#)', this, key)); void addAll(Map<String, dynamic> other) { throw new UnsupportedError("Not supported"); } bool containsValue(dynamic value) => values.any((e) => e == value); bool containsKey(dynamic key) => _getIt...
Dart
ypeConstants#INDETERMINATE} if a conclusive partial order relation cannot be determined</li> * </ul> * * @param duration to compare * * @return the relationship between <code>this</code> <code>Duration</code>and <code>duration</code> parameter as * {@link DatatypeConstants#LESSER}, {@lin...
Java