content stringlengths 2 6.21k | label stringclasses 16
values |
|---|---|
Date.day - 7 * i),
downloads: weeklyDownloads[i],
),
).sublist(0, dataListLength).reversed.toList();
}
drawChart(svg, toolTip, chartSubText, prepareDataForSparkline(dataPoints));
}
void drawChart(
Element svg,
HTMLDivElement toolTip,
HTMLDivElement chartSubText,
List<({DateTime date, int... | Dart |
;
(*stream)->buffers_idx = -1;
(*stream)->buffer2_sum = 0.;
return TI_OKAY;
}
#define PUSH_NONFULL(buffer, value1, value2) do { \
++buffers_idx; \
(*buffer)[buffers_idx][0] = value1; \
(*buffer)[buffers_idx][1] = value2; \
buffer2_sum += value2; \
} while (0)
#define PUSH_FULL(buffer, val... | C |
, just before the Chiefs' game-winning field goal. After a brief drop as the game ended, there was an additional spike to 134%.</p>
<figure class="kg-card kg-image-card ">
<img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3USAZg6xnQExvCWqqlL4Ku/9d6716e2e9d629f86ce97c39ce7b6032/image4-1.png" alt="" class="... | HTML |
******************************************************/
int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests,
unsigned int flags)
{
enum efx_loopback_mode loopback_mode = efx->loopback_mode;
int phy_mode = efx->phy_mode;
int rc_test = 0, rc_reset, rc;
efx_selftest_async_cancel(efx);
/* Online (... | C |
, var14, var20);
var12.addVertexWithUV(var24, p_147740_8_ + 0.0D, var32, var18, var20);
var12.addVertexWithUV(var24, p_147740_8_ + p_147740_4_, var32, var18, var16);
var12.addVertexWithUV(var24, p_147740_8_ + p_147740_4_, var32, var18, var16);
var12.addVertexWithUV(var24,... | Java |
i.setCurrent(e),i.stem(),i.getCurrent())}}(),e.Pipeline.registerFunction(e.fr.stemmer,"stemmer-fr"),e.fr.stopWordFilter=e.generateStopWordFilter("ai aie aient aies ait as au aura aurai auraient aurais aurait auras aurez auriez aurions aurons auront aux avaient avais avait avec avez aviez avions avons ayant ayez ayons c... | JavaScript |
mpl<'a> StateSummary<'a> {
pub fn into_owned(self) -> Vec<u8> {
self.0.into_owned()
}
}
impl<'a> From<Vec<u8>> for StateSummary<'a> {
fn from(state: Vec<u8>) -> Self {
StateSummary(Cow::from(state))
}
}
impl<'a> From<&'a [u8]> for StateSummary<'a> {
fn from(state: &'a [u8]) -> Self... | Rust |
o will be preserved
// when the presentation is scaled to fit different resolutions
width: 960,
height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.04,
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 2.0,
... | HTML |
, _faction.GetDataBlob<FactionTechDB>());
//engineDesigner.ComponentDesignAttributes["Size"].SetValueFromInput(5); //size = 25 power.
//_engineComponentDesign = engineDesigner.CreateDesign(_faction);
var factionDataStore = _faction.GetDataBlob<FactionInfoDB>().Data;
_eng... | C# |
able) {
Log.d(TAG,"loadRows() getRecorded API Failure")
Toast.makeText(context!!, getString(R.string.connect_epgstation_failed), Toast.LENGTH_LONG).show()
}
})
}
}
}
}
privat... | Kotlin |
(double) mh / 2) * CHIP_TILESIZE) + (statExists ? CHIP_TILESIZE + CHIP_GAP * 2 : 0) + CHIP_GAP;
g.setColor(Color.BLACK);
g.fillRect(tileXOffset, tileYOffset, CHIP_TILESIZE + 1, CHIP_TILESIZE + 1);
g.setColor(boardIndex > -1 ? app.colors()[boardInd... | Java |
{
me->SetReactState(REACT_PASSIVE);
}
void Reset() override
{
me->SetCanFly(true);
}
};
CreatureAI* GetAI(Creature* creature) const override
{
return GetInstanceAI<npc_akilzon_amani_kidnapp... | C++ |
for index=0,ram.blobCount-1 do
local blobEntryPtr = ram.blobEntries + index
assert.le(0, blobEntryPtr.addr, 'blob #'..index..' type '..blobEntryPtr.type..' addr is oob')
assert.le(blobEntryPtr.addr + blobEntryPtr.size, size, 'blob #'..index..' type '..blobEntryPtr.type..' addr is oob')
local blobClass = assert.... | Lua |
;
import java.util.ArrayList;
public class CommandMessage extends VCommand {
public CommandMessage(EssentialsPlugin plugin) {
super(plugin);
this.setModule(MessageModule.class);
this.setPermission(Permission.ESSENTIALS_MESSAGE);
this.setDescription(Message.DESCRIPTION_MESSAGE);
... | Java |
s specific reasons why this can happen, but the general answer
is: When ExifTool writes an image, the meta information may be restructured in
such a way that it takes less space than in the original file.</blockquote>
<blockquote>For instance, the EXIF/TIFF standard allows for blocks of
unreferenced data to exist in ... | HTML |
aived through
the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
For more information, see [license](https://github.com/fugacious/fugacious/blob/dev/LICENSE.md).
# T1121 - Regsvcs/Regasm
## [Description from ATT&CK](https://attack.mitre.org/wiki/Technique/T1121)
<bloc... | Markdown |
union by rank.
3. **Main Function**:
- Reads input and initializes the Union-Find structure.
- Sorts edges and processes them to build the MST while keeping track of the total cost.
- Checks if a valid MST is constructed and prints the result.
## Planets and Kingdoms
- https://cses.fi/problemset/task/1682
... | Markdown |
= 0) {
NSK_DISPLAY0(
"CHECK PASSED: original nativeMethod() to be redirected\n"
"\thas not been invoked as expected\n");
} else {
result = STATUS_FAILED;
NSK_COMPLAIN1(
"TEST FAILED: nativeMethod() has not been redirected by the NativeMethodBind:\n"
... | C++ |
ND-PP라고 지칭하는 The Pile(Gao et al., 2020)의 비저작권 보호 섹션으로부터 선택된 랜덤 프롬프트 쌍에 대한 도 8(상단) 및 도 9의 결과를 보고한다. 피티아-410M이 두 프롬프트에서 여전히 낮은 손실을 달성하도록 프롬프트 쌍을 선택했다.\n' +
'\n' +
'우리는 AtP/AtP*가 여기에서 다소 덜 효과적이라는 것을 발견했으며, 이는 AtP/AtP*의 강력한 성능이 특히 선명한 회로를 사용하는 깨끗한 프롬프트나 정확한 제어인 노이즈 프롬프트에 의존하지 않는다는 잠정적인 증거를 제공한다.\n' +
'\n'... | HTML |
-a52e-4f735466cecf&quot;:&quot;f.69CC32C21C41CB32DE71771D3BEDEB2D.d.CEEBA1A89D89DDF236A61D6BB9B7F545.e.4&quot;}} | headers=HTTPHeaderDict({&#x27;Content-Length&#x27;: &#x27;125&#x27;, &#x27;Content-Type&#x27;: &#x27;application/json; charset=utf-8&#x27;, &#x27;cache-contr... | HTML |
which must be cheaper than doing the equivalent
/// operation with mismatches and gaps
pub fn new(mismatch_cost: u8, gap_cost: u8, start_gap_cost: u8, transpose_cost: Option<u8>) -> Self {
assert!(mismatch_cost > 0);
assert!(gap_cost > 0);
if let Some(cost) = transpose_cost {
... | Rust |
rections, i);
var qcDist = FloatVector.fromArray(FLOAT_SPECIES_128, scores, i);
// ax * ay * dimensions + ay * lx * (float) targetComponentSum + ax * ly * y1 + lx * ly *
// qcDist;
var res1 = ax.mul(ay).mul(dimensions);
var res2 = lx.mul(ay).mul(targetComponen... | Java |
}
map.popover.hide();
}
fn add_bookmark(app: &app::Handle, title: &str, uri: &str, tags: &[String]) {
use gtk::prelude::*;
let bookmarks = app.bookmarks();
let map = app.stored();
let map = map.bookmarks();
let id = bookmarks.add_bookmark(title, uri, tags);
let title_escaped = text:... | Rust |
*/
HipsterModel([this.attributes]) {
if (attributes == null) attributes = {};
_onSave = new StreamController.broadcast();
_onDelete = new StreamController.broadcast();
}
Stream get onSave => _onSave.stream;
Stream get onDelete => _onDelete.stream;
// TODO: better hashing function (delimited key... | Dart |
o it yourself. Generally, if you’re using GCC-based toolchain, the process does not differ from building any other library as DLL (adding -shared to compilation flags should suffice); if you’re using MSVC-based toolchain, you’ll have to explicitly mark exported symbols with a declspec attribute. You c... | HTML |
import nextcord
from nextcord import Interaction
from nextcord.ext import commands
import os
from placeholders.apikeys import *
intents = nextcord.Intents.default()
intents.members = True
client = commands.Bot(command_prefix= '!', intents=intents)
@client.event
async def on_ready():
print("Bot ready!")
initial_e... | Python |
// } else if (currentDate === 2 || currentDate === 22) {
// suffix = 'nd';
// } else if (currentDate === 3 || currentDate === 23) {
// suffix = 'rd';
// } else {
// suffix = 'th';
// }
var ampm = currentHours >= 12 ? 'pm' : 'am';
var hoursString = currentHours % 12 || 1... | JavaScript |
intId> {
self.pipes.get_mut(&eid).map_or(None, |pipe| {
pipe.recv(ctx);
Some(eid)
})
}
pub fn close_all(&mut self, ctx: &mut dyn Context) {
for (_, pipe) in self.pipes.drain() {
pipe.close(ctx);
}
}
}use std::process::Command;
use std::p... | Rust |
ol" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1063604349"><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:1995_FIFA_Women%27s_... | HTML |
background-image: linear-gradient(to left, #f0f0f0 20.6667px, ThreeDLightShadow 20.6667px,
ThreeDLightShadow 21.3333px, ThreeDHighlight 21.3333px,
ThreeDHighlight 22px, #f0f0f0 22px);
}
}
@media (min-resolution: 2dppx) {
#main-window[defaultfxtheme="true"] #appmenuPrimaryPane menupopup ... | CSS |
20h]
mov rax, [rax+10h]
mov rax, [rax+10h]
mov [rbp+os], os_0
test rax, rax
jnz loc_4C47A9
call ASN1_OCTET_STRING_new
test os_0, os_0
jz loc_4C4883
mov rcx, [p7_0+20h]
mov rcx, [rcx+10h]
mov [rbp+os], os_0
mov [rcx+10h], rax
... | Assembly |
RDS(891.3, 807.9, 188.1));
// etc.
// */
// ZONE::OVERRIDE_POPSCHEDULE_VEHICLE_MODEL(popSchedules[index], vehicleHash);
// STREAMING::REQUEST_MODEL(vehicleHash);
static void OVERRIDE_POPSCHEDULE_VEHICLE_MODE... | C |
renderer("FloatRefTarget", function(_)
return _quarto.format.isHugoMarkdownOutput()
end, function(float)
decorate_caption_with_crossref(float)
local el = quarto.utils.match("Plain/[1]/Image")(float.content)
if el then
local text = pandoc.write(pandoc.Pandoc({
pandoc.Image(
pandoc.utils.stringi... | Lua |
knobInfo.value=_value,delete knobValuesFromUrl[knobName]}else knobInfo.defaultValue=options.value;return knobStore.set(knobName,knobInfo),this.getKnobValue(knobStore.get(knobName))}},{key:"_mayCallChannel",value:function _mayCallChannel(){var _this=this;if(this.channel&&!this.calling){this.calling=!0;var timestamp=+new... | JavaScript |
p = ((FP) playerIndex / totalPlayers) * 2 * FP.Pi + FP.PiOver2 + (FP.Pi / (2 * totalPlayers));
FP scale = (FP._2 - ((FP) totalPlayers + 1) / totalPlayers) * SpawnpointArea.X;
FPVector2 offset = new(
FPMath.Sin(comp) * scale,
FPMath.Cos(comp) * (totalPlayers > 2 ? scale * Spawnpo... | C# |
;
}
&::-webkit-scrollbar-thumb {
background-color: var(--rs-divider-border);
border-radius: 4px !important;
opacity: 0;
}
&::-webkit-scrollbar-track {
border-radius: 4px !important;
background-color: var(--rs-border-secondary);
}
&:hover {
&::-webkit-scrollbar-thumb {
opacit... | CSS |
ាក្យទាំងមូល","notFoundMsg":"រកមិនឃើញពាក្យដែលបានបញ្ជាក់។","replace":"ជំនួស","replaceAll":"ជំនួសទាំងអស់","replaceSuccessMsg":"ការជំនួសចំនួន %1 បានកើតឡើង។","replaceWith":"ជំនួសជាមួយ:","title":"រកនិងជំនួស"},"fakeobjects":{"anchor":"យុថ្កា","flash":"Flash មានចលនា","hiddenfield":"វាលកំបាំង","iframe":"IFrame",... | JavaScript |
Sans',sans-serif;font-size:9pt;font-weight:400;line-height:100%"><ix:nonFraction unitRef="usd" contextRef="c-79" decimals="-6" name="us-gaap:CashEquivalentsAtCarryingValue" format="ixt:num-dot-decimal" scale="6" id="f-526">8,897</ix:nonFraction> </span></td><td style="background-color:#ffffff;border-top:1pt solid... | HTML |
T_EQ(1, config.route(genHeaders("www.lyft.com", "/foo", "GET"), 0)
->routeEntry()
->hedgePolicy()
.initialRequests());
EXPECT_EQ(true, config.route(genHeaders("www.lyft.com", "/foo", "GET"), 0)
->routeEntry()
->hedgeP... | C++ |
ara langsung
pada objek-objek _live_ dalam sebuah klaster. Pengguna menjalankan operasi tersebut melalui
argumen atau _flag_ pada perintah `kubectl`.
Ini merupakan cara yang paling mudah untuk memulai atau menjalankan tugas "sekali jalan" pada sebuah klaster.
Karena metode ini dijalankan secara langsung pada objek _li... | Markdown |
1
bt_PatternPos rs.w 1
bt_PBreakPos rs.b 1
bt_PosJumpFlag rs.b 1
bt_PBreakFlag rs.b 1
bt_LowMask rs.b 1
bt_PattDelTime rs.b 1
bt_PattDelTime2 rs.b 1
bt_Arpeggioctr rs.b 1
mt_SongDataPtr dc.l 0
*mt_speed dc.b 6
*mt_counter dc.b 0
*mt_SongPos dc.b 0
*mt_PBreakPos dc.b 0
*mt_PosJumpFlag dc.b 0
*mt_PBreakFlag dc.b 0
*mt_L... | Assembly |
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2025 ShareX Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the ... | C# |
nfig},
// Request,
// };
// use tonic::codegen::futures_core::Stream;
// use std::env;
// async fn download() -> Result<(), Box<dyn std::error::Error>> {
// let target = "https://github.com/twbs/bootstrap/archive/v4.0.0.zip";
// let response = reqwest::get(target).await?;
// let path = Path::new("./... | Rust |
re><code class='html'><c- p><</c-><c- f>link</c-> <c- e>rel</c-><c- o>=</c-><c- s>"preload"</c-> <c- e>as</c-><c- o>=</c-><c- s>"image"</c->
<c- e>imagesrcset</c-><c- o>=</c-><c- s>"wolf_400px.jpg 400w, wolf_800px.jpg 800w, wolf_1600px.jpg 1600w"</c->
<c- e>imagesizes</c-><c- o>=</c-><c- s>"50vw"</c-><c-... | HTML |
codec.video_sizeof,d1
cmp.l d1,d0
blo .pas_assez_parametres
lea info_entree_iv32(pc),a1
lea (a1),a3
lsr.l #1,d1
subq.l #1,d1
.copy_parametres
move.w (a0)+,(a1)+
dbf d1,.copy_parametres
IF NEW_PLAYER
move.l info_init_codec.compression(a3),d0
cmp.l #IV31tag|MIN,d0
beq.s .supported
cmp.l #IV32tag|MIN,d0
beq... | Assembly |
]^^ = cx16.r2L
bptrarray[3]^^ = cx16.r3bL
}
}"""
compileText(VMTarget(), false, src, outputDir) shouldNotBe null
compileText(C64Target(), false, src, outputDir) shouldNotBe null
compileText(Cx16Target(), false, src, outputDir) shouldNotBe null
}
test("passing arrays to subro... | Kotlin |
}
-- 变量
variables = {
}
--================================================================
--
-- 初始化配置
--
--================================================================
-- 初始化时创建
init_config = {
suite = 1,
rand_suite = true,
npcs = { }
}
--================================================================
-... | Lua |
using System;
using UnityEngine;
using UnityEngine.Analytics; // CustomEvent
using UnityEngine.SceneManagement; // SceneManager
public class PauseScreenBehaviour : MainMenuBehaviour
{
public static bool paused;
[Tooltip("Reference to the pause menu object to turn on/off")]
public GameObject pause... | C# |
result = 31 * result + Objects.hashCode(this.unlike);
result = 31 * result + Objects.hashCode(this.version);
result = 31 * result + Objects.hashCode(this.versionType);
return result;
}
@Override
public boolean equals(Object o) {
if (!super.equals(o)) {
r... | Java |
:</p>
<p> The second the doors shut behind Alkar there is an<br>
immediate change of atmosphere in the room as their<br>
grief is replaced with a drive toward action. Beverly<br>
whirls around and pulls out a tricorder to scan Troi.<br>
Riker and Picard move to her side, while Ogawa readies<br>
se... | HTML |
ght .user-panel > .info > a {
color: #444444;
}
.skin-black-light .sidebar-menu > li {
-webkit-transition: border-left-color 0.3s ease;
-o-transition: border-left-color 0.3s ease;
transition: border-left-color 0.3s ease;
}
.skin-black-light .sidebar-menu > li.header {
color: #848484;
background: #f9fafc;
}
... | CSS |
dateFormat : this.config.dateFormat,
disabled : (this.config.disabled) ? 'disabled="disabled"' : '',
inputValidation : this.config.inputValidation,
inputValidationMessage : this.config.inputValidationMessage,
ignoreVariableIfEmpty : this.config.ignoreVariableIfEmpty,
... | JavaScript |
64 = writer.prefix("RoleARN");
if let Some(var_65) = &input.role_arn {
scope_64.string(var_65);
}
#[allow(unused_mut)]
let mut scope_66 = writer.prefix("RollbackConfiguration");
if let Some(var_67) = &input.rollback_configuration {
crate::query_ser::serialize_structure_crate_model_ro... | Rust |
e view direction points from that surface
// point toward the center, and the length is the sphere's radius. Since the view
// direction points straight through the sphere, that sphere is the sweet zone for
// putting our particles to pile them up in front of the camera. But we'd like to
// do this independently for ea... | C++ |
1,
.custom--shadow-hover-11:hover {
@include custom--box-shadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3);
}
.custom--shadow-12,
.custom--shadow-hover-12:hover {
@include custom--box-shadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4);
}
.custom--shadow-13,
.custom--shadow-hover-13:hover {
@include custom--box-shadow(0,... | CSS |
d + Sync + 'static>>;
pub async fn connect(addr: String) -> Result<QueryServiceClient<Channel>, ClientError> {
connect_inner(addr)
.await
.map_err(|err| ClientError::ConnectionError { source: err })
}
async fn connect_inner(
addr: String,
) -> Result<QueryServiceClient<Channel>, tonic::transpo... | Rust |
ert_eq!(big_to_6u64(&expected), actual_norm);
}
}
}
use common::util::*;
#[test]
fn test_default() {
//CmdResult.stdout_only(...) trims trailing newlines
assert_eq!("hi\n", new_ucmd!().arg("hi").succeeds().no_stderr().stdout);
}
#[test]
fn test_no_trailing_newline() {
//CmdResult.stdout_only(... | Rust |
lls",
"taplo",
"rust-analyzer",
"beautysh",
"cpplint",
"eslint_d",
"htmlhint",
"markdownlint",
"pyright",
"ruff",
"selene",
"shellcheck",
"stylelint",
"yamllint",
"black",
"clang-format",
"prettier",
"prettierd",
"stylua",
}
if which:is_exis... | Lua |
f_map_struct_ts TIMESTAMP(3))>)"),
// col_struct_nested_struct
ImmutableList.of(
"CAST(ROW(101, CAST(ROW('inner_str_1', true) AS ROW(inner_f1 VARCHAR, inner_f2 BOOLEAN))) AS ROW(outer_f1 INTEGER, nested_struct ROW(inner_f1 VARCHAR, inner_f2 BOOLEAN)))",
... | Java |
parameters">(double decimalNumber,
int numeralSystemBase,
int format)</span></div>
<div class="block">Decimal number to other numeral system conversion with base
between 1 and 36.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>decimalNumber</code> - Decimal number</dd>
<dd><code>numeralSystem... | HTML |
;
--rounded-box: 1rem;
--rounded-badge: 1.9rem;
--animation-btn: 0.25s;
--animation-input: .2s;
--btn-focus-scale: 0.95;
--border-btn: 1px;
--tab-border: 1px;
--p: 83.0828% 0.034896 316.8737;
--s: 88.0763% 0.049197 8.688364;
--a: 89.2096% 0.06028 170.923263;
--n: 71.3406% 0.0... | CSS |
val totCards = before.ownedCards.sumBy { it.numberOfCopies }
val totPacks = before.cardPacks
assertTrue(totPacks > 0)
given().contentType(ContentType.JSON)
.body(PatchUserDto(Command.OPEN_PACK))
.patch("/$userId")
.then()
.sta... | Kotlin |
en-line" style="color:#393A34"><span class="token plain"> private IExtensionHelpers helpers;</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> private JPanel rootPanel;</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display... | HTML |
namespace Tvl.Java.DebugInterface.Types
{
using System.Runtime.Serialization;
[DataContract]
public struct VariableData
{
/// <summary>
/// The local variable's index in its frame.
/// </summary>
[DataMember(IsRequired = true)]
public int Slot;
/// <sum... | C# |
_OCTET_STRING(&os,NULL);
size=ASN1_object_size(1,n,V_ASN1_SEQUENCE);
if ((osp=ASN1_STRING_new()) == NULL) return(0);
/* Grow the 'string' */
if (!ASN1_STRING_set(osp,NULL,size))
{
ASN1_STRING_free(osp);
return(0);
}
M_ASN1_STRING_length_set(osp, size);
p=M_ASN1_STRING_data(osp);
ASN1_put_object(&p,1,... | C |
point.setY(y);
}
}
plots.add(points);
}
}
}
}
if (!Double.isInfinite(drawMinX))
minX = drawMinX;
if (!Double.isInfinite(drawMaxX))
maxX = drawMaxX;
if (!Double.isInfinite(drawMinY))
minY = drawMinY;
if (!Double.isInfinite(drawMaxY))
maxY = drawMaxY;
if (dat... | Java |
lCase handles whitespace in pragma options`() {
assertEquals(
AndroidxSqliteSpecialCase.SetJournalMode,
AndroidxSqliteUtils.findSpecialCase("PRAGMA journal_mode = WAL"),
)
assertEquals(
AndroidxSqliteSpecialCase.ForeignKeys,
AndroidxSqliteUtils.findSpecialCase("PRAGMA foreign... | Kotlin |
ect: { [key: string]: T },
reducer: (acc: R, value: T, key: string) => R,
initialAcc: R
): R {
let result = initialAcc;
oForEach(subject, (value, key) => {
result = reducer(result, value, key);
});
return result;
}
export function oFilterMap<T, R>(
subject: { [key: string]: T },
filter: (value: T, ... | Typescript |
:
FastAssignment() : Assignment() {}
FastAssignment(int k, int num_obs, DistMatrix* dist_matrix)
: Assignment(k, num_obs, dist_matrix), cost(k) {}
virtual ~FastAssignment() {}
// Compute the reassignment cost, for one swap.
double computeCostDifferential(int h);
// Perform la... | C |
少编译后的代码大小,收益是很高的。比如对于程序中仅用于输出Debug信息的分支,就根本不需要生成代码。
另外,这种基于推理的优化,还会带来其他额外的优化机会。比如对于逃逸分析而言,去掉了一些导致逃逸的分支以后,在剩下的分支中,对象并没有逃逸,所以也就可以做优化了!
总结起来,基于运行时的统计信息进行推理的优化,有时会比基于静态分析的AOT产生出性能更高的目标代码。所以,现代编译技术的实践,会强调“全生命周期”优化的概念。甚至即使是AOT产生的目标代码,仍然可以在运行期通过JIT做进一步优化。LLVM项目的发起人之一,Chris Lattner就曾写了一篇[论文](<https://llvm.org/pubs/2003-09-30... | Markdown |
28)
/* 80424F6C 00421EAC C0 02 21 58 */ lfs f0, lbl_805204B8@sda21(r2)
/* 80424F70 00421EB0 EC 42 00 72 */ fmuls f2, f2, f1
/* 80424F74 00421EB4 D0 61 00 20 */ stfs f3, 0x20(r1)
/* 80424F78 00421EB8 D0 01 00 18 */ stfs f0, 0x18(r1)
/* 80424F7C 00421EBC D0 01 00 1C */ stfs f0, 0x1c(r1)
/* 80424F80 00421EC0 D0 41 0... | Assembly |
a", "region": "Ханты-Мансийский автономный округ", "city": "Пыть-Ях", "operator": "", "desc": "" },
{ "mask": "+7(34638)#-##-##", "cc": "RU", "cd": "Russia", "region": "Ханты-Мансийский автономный округ", "city": "Лянтор", "operator": "", "desc": "" },
{ "mask": "+7(34643)#-##-##", "cc": "RU", "cd": "Russia", "region... | JavaScript |
oups[var1] = null;
}
if (var3 > 1) { // L: 284
int var9 = var20.length; // L: 285
--var9;
int var10 = var20[var9] & 255; // L: 286
var9 -= var3 * var10 * 4; // L: 287
Buffer var11 = new Buffer(var20); // L: 288
int[] var12 = new int[var3]; // L: 289
var11.offset = var9; // L:... | Java |
을 하면 실패한다`() {
// given
val command =
IRefreshToken.Command(
refreshToken = RefreshToken("12345678901"),
)
// when, then
shouldThrow<IllegalArgumentException> {
sut.handle(command)
}
... | Kotlin |
wx.wxPoint(0, 0), wx.wxSize(winWidth, winHeight),
wx.wxTE_PROCESS_ENTER+wx.wxTE_CENTRE)
sudokuGUI.cellTextCtrl:SetFont(sudokuGUI.valueFont.wxfont)
sudokuGUI.cellTextCtrl:SetMaxLength(1)
--local valid = wx.wxTextValidator(wx.wxFILTER_INCLUDE_LIST)
--vali... | Lua |
for (let i = 0; i < NUMBER_OF_ROWS; i++) {
for (let j = 0; j < NUMBER_OF_COLUMNS; j++) {
// INITIALIZE SURROUNDING WALLS
clickCounter = 0;
if (i === 0) {
topWall = true;
}
if (i === NUMBER_OF_ROWS - 1) {
bottomWall = true;
}
if (j === 0) {
leftWal... | Typescript |
class with only nullable fields with a Duration defined when calling toJsonForProtocol then the key and value is set.',
() {
var types = Types(aDuration: Duration(seconds: 1));
var jsonMap = types.toJsonForProtocol();
expect(jsonMap, {'aDuration': 1000});
});
test(
'Given a class with on... | Dart |
624]
bl FtlBbmMapBadBlock
ldrh w0, [x20, 2628]
bl FtlBbmMapBadBlock
bl FtlBbmTblFlush
strh wzr, [x20, 2626]
ldr w0, [x20, 2632]
ldrh w1, [x20, 2628]
add w0, w0, 1
str w0, [x20, 2632]
ldrh w0, [x20, 2624]
strh w0, [x20, 2628]
strh w1, [x20, 2624]
bl FtlBbmTblFlush
.L2435:
ldp x19, x20, [sp, 16]
mov w0, 0
... | Assembly |
IntegrationAttachmentToPb(ctx, res, org.ID)
if err != nil {
return nil, handleUseCaseErr(err, s.log)
}
return &pb.IntegrationsServiceAttachResponse{Result: result}, nil
}
func (s *IntegrationsService) ListRegistrations(ctx context.Context, _ *pb.IntegrationsServiceListRegistrationsRequest) (*pb.IntegrationsServi... | Go |
ced) */
span.dynatree-node
{
/* display: -moz-inline-box; /* @ FF 1+2 */
/* display: inline-block; /* Required to make a span sizeable */
}
/* Remove blue color and underline from title links */
ul.dynatree-container a
/*, ul.dynatree-container a:visited*/
{
color: black; /* inherit doesn't work on IE */
text-deco... | CSS |
allResult<AddAppDependencyResult_t>* HL_NAME(add_app_dependency)(vuid updateHandle, int appId, vclosure *closure){
if (!CheckInit() || updateHandle == NULL) return NULL;
ASYNC_CALL(SteamUGC()->AddAppDependency(hl_to_uint64(updateHandle), appId), AddAppDependencyResult_t, on_app_added);
return m_call;
}
static void ... | C++ |
$capitalized_name$ValueList());\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
"@java.lang.Override\n"
"$deprecation$public int "
"${$get$capitalized_name$... | C++ |
n5m7fyul=b''):
pass
assert 0.0
g8n_u8py272 = s5mc54bcyf2
''.waqfdbnac37 *= False
raise e79ysl7cjd4
'# documentation_contrast_horizon -> wait_junctions_buzzer'
del umsbdlwv7x5
from tzlkweug8f5 import mj7cthcj5re as rhelgmbpa6i, tduph4wwto3, nuvbt9ze5_0, i_1yf0rw3js as xfc67rdl69d, wpt3omo... | Python |
JPEGFullProgressionNonHierarchicalProcess11_and_13: UID = UID {
ident: "JPEGFullProgressionNonHierarchicalProcess11_and_13",
uid: "1.2.840.10008.1.2.4.56",
name: "JPEG Full Progression, Non-Hierarchical (Process 11 & 13) (Retired)",
};
/// JPEG Lossless, Non-Hierarchical (Process 14)
///
/// - **UID:** 1.... | Rust |
Glue library for integration lwIP in <code>NO_SYS=0</code> mode with the SDK. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__pico__lwip__nosys"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom">... | HTML |
period: self.cooling_period,
name: self.name,
}
}
}
}
impl TieringPolicy {
/// Creates a new builder-style object to manufacture [`TieringPolicy`](crate::model::TieringPolicy)
pub fn builder() -> crate::model::tiering_policy::Builder {
crate::model::tiering_policy... | Rust |
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
# 為了去除跑程式碼過程會被顯示出來
import cv2
import numpy as np
import argparse
from tensorflow.keras.applications import VGG16
from tensorflow.keras.applications.vgg16 import preprocess_input
from tensorflow.keras.models import Model
from sklearn.metrics.pai... | Python |
using System;
using LiveSplit.TimeFormatters;
using Xunit;
namespace LiveSplit.Tests.TimeFormatterTests;
public class DaysTimeFormatterTests
{
// These tests cover DaysTimeFormatter, which (is/was not) based on any other TimeFormatter implementation
[Fact]
public void FormatsTimeAsZero_WhenTimeIsNull()... | C# |
.tox-form__group--stretched .tox-textarea{flex:1}.tox .tox-form__group--stretched .tox-navobj{display:flex;flex:1}.tox .tox-form__group--stretched .tox-navobj :nth-child(2){flex:1;height:100%}.tox:not([dir=rtl]) .tox-form__controls-h-stack>:not(:first-child){margin-left:4px}.tox[dir=rtl] .tox-form__controls-h-stack>:n... | JavaScript |
if (GENERATE_IMPLEMENTATION) {
builder.append(
""" {
| local op1:${vs.sleighSize} = ${vs.sleighReader};
| local op2:${vt.sleighSize} = ${vt.sleighReader};
| local result:${vd.sleighSize} = $pcodeName(op1, op2);
| ${vd.sleighWriter("result")}
|}
... | Kotlin |
isSdk: false,
dependencies: [],
),
);
}
licenses.add(
const Package(
name: 'Metronome 1kHz (weak pulse)',
description: '',
authors: ['unfa'],
version: '',
license: 'CC-0',
isMarkdown: false,
isSdk: false,
h... | Dart |
ID of the query logging configuration
/// </li>
/// <li>
/// <code>Name</code>: The name of the query logging configuration
/// </li>
/// <li>
/// <code>OwnerId</code>: The Amazon Web Services account ID for the account
/// that created the query logging configuration.
/// </li>
/// <li>
/// <code>... | Dart |
m == PM_VAMPIRE_LEADER \
|| (mon)->cham == PM_VLAD_THE_IMPALER)
#define vampshifted(mon) (is_vampshifter((mon)) && !is_vampire((mon)->data))
/* Vlad might be vampshifted so just checking monst->data is insufficient */
#define is_Vlad(m) ((m)->data == &mons[PM_VLAD_THE_IMPALER] \
|| (m)->cham =... | C |
Since we're here, we can also assume MaxSockets was not changed in the VM spec since last boot.
// Therefore, bumping Sockets to a value higher than MaxSockets is fine, it just requires a reboot.
if vmCopyWithInstancetype.Spec.Template.Spec.Domain.CPU.Sockets > vmi.Spec.Domain.CPU.MaxSockets {
setRestartRequired(v... | Go |
to indicate UTC time. If 'local', convert to the local timezone
first, and suffix with a +-#### timezone offset. If a tzinfo object,
then do as with 'local', but use the specified timezone.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}
Casting to allow when changing between datet... | Python |
, Error> {
let mut out_size = 0usize;
let result = unsafe {
bindings::lzokay_decompress(
src.as_ptr(),
src.len(),
dst.as_mut_ptr(),
dst.len(),
&mut out_size,
)
};
lzokay_result(out_size as usize, result)
}
#[cfg(test)]
mod test... | Rust |
1.1.3.cmml">)</mo></mrow></mrow></mrow><mo id="S2.Ex4.m4.2.2.1.2" xref="S2.Ex4.m4.2.2.1.1.cmml">,</mo></mrow><annotation-xml encoding="MathML-Content" id="S2.Ex4.m4.2b"><apply id="S2.Ex4.m4.2.2.1.1.cmml" xref="S2.Ex4.m4.2.2.1"><csymbol cd="latexml" id="S2.Ex4.m4.2.2.1.1.1.cmml" xref="S2.Ex4.m4.2.2.1.1.1">similar-to</cs... | HTML |
( 0 0 0 0 )\n";
throw std::runtime_error( oss.str() );
}
}
{
test_ = "Column-major self-transpose via trans()";
blaze::ZeroMatrix<int,blaze::columnMajor> Z( 4UL, 3UL );
Z = trans( Z );
checkRows ( Z, 3UL );
checkColumns ( Z, 4UL );
checkNonZeros( Z, 0UL );... | C++ |
dName] == null) return 1;
return a[fieldName].compareTo(b[fieldName]);
});
} else {
sort((a, b) {
if (a[fieldName] == null && b[fieldName] == null) return 0;
if (a[fieldName] == null && b[fieldName] != null) return 1;
if (a[fieldName] != null && b[fieldName] == null) retu... | Dart |
r:0;
background-color:#0000;
}
.github {
background-image: url("data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416... | HTML |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.