content stringlengths 2 6.21k | label stringclasses 16
values |
|---|---|
e.
*/
pub async fn get_course_material_service_info_by_exercise_type(
conn: &mut PgConnection,
exercise_type: &str,
) -> ModelResult<Option<CourseMaterialExerciseServiceInfo>> {
if let Ok(exercise_service) = get_exercise_service_by_exercise_type(conn, exercise_type).await {
let full_service_info = g... | Rust |
item = __btrfs_first_delayed_insertion_item(delayed_node);
while (curr_item) {
btrfs_delayed_item_release_metadata(root, curr_item);
prev_item = curr_item;
curr_item = __btrfs_next_delayed_item(prev_item);
btrfs_release_delayed_item(prev_item);
}
curr_item = __btrfs_first_delayed_deletion_item(delayed_node)... | C |
u32 ba_off;
/* Compute bank offset according to NC in configuration register */
ba_off = (mpddr_value->cr & ATMEL_MPDDRC_CR_NC_MASK) + 9;
if (ddr2_decodtype_is_seq(base, mpddr_value->cr))
ba_off += ((mpddr_value->cr &
ATMEL_MPDDRC_CR_NR_MASK) >> 2) + 11;
ba_off += (mpddr_value->md & ATMEL_MPDDRC_MD_DBW_... | C |
s.Assert().EqualError(err, tc.expErr, "MetadataAddressFromBech32 error")
} else {
s.Assert().NoError(err, "MetadataAddressFromBech32 error")
}
s.Assert().Equal(tc.expAddr, addr, "MetadataAddressFromBech32 address")
})
}
}
func (s *AddressTestSuite) TestMetadataAddressFromDenom() {
newUUID := func... | Go |
0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
gsSPVertex(lll_seg7_vertex_07015F10, 15, 0),
gsSP2Triangles( 0, 1, 2, 0x0, 3, 4, 5, 0x0),
gsSP2Triangles( 3, 5, 6, 0x0, 7, 8, 9, 0x0),
gsSP2Triangles( 7, 10, 8, 0x0, 11, 12, 13, 0x0),
gsSP1Triangle(11, 13, 14, 0x0),
gsSPVertex(lll_se... | C |
import os
slurmScript = """#!/bin/bash
#SBATCH -J jID_jName
##SBATCH -D wkPath
#SBATCH -n CoreNum
#SBATCH --nodes=1
#SBATCH -t 72:0:0
#SBATCH --mem=MEMFREEG
#SBATCH -o wkPath/jName.o.log
#SBATCH -e wkPath/jName.e.log
#- End embedded arguments
echo $SLURM_JOB_NODELIST
module load Anaconda3
conda activate CONDAENV
RUMC... | Python |
if (hash_word != null) {
return hash2ID.get(hash);
} else {
int id = vocabList.size();
// let kenlm know about this word's ID.
kenlm.registerWord(token, id);
vocabList.add(token);
hash2String.put(hash, token);
hash2ID.put(hash, id);
return id;
}
}
}
/**
* Lowercase each token, i... | Java |
etVisible(true);
}
}
public void disposeUI() {
frame1.dispose();
frame2.dispose();
}
@Override
public void run() {
try {
if (frame1 == null) {
createUI();
} else {
disposeUI();
}
} catch (Ex... | Java |
super.didUpdateWidget(oldWidget);
var duration = widget.duration;
if (widget.removed) {
setState(() {
opacity = 0;
});
return;
}
if (!identical(oldWidget.child, widget.child)) {
if (widget.childPersist) {
setState(() {
child = widget.child;
});
... | Dart |
skill_type_35_43_60_77),
/**
* 36:攻击领域展开
*/
ATTACK_FIELD(36, R.string.skill_type_36_37_38_39_40),
/**
* 37:治疗领域展开
*/
HEAL_FIELD(37, R.string.skill_type_36_37_38_39_40),
/**
* 38:buff/debuff领域展开
*/
AURA_FIELD(38, R.string.skill_type_36_37_38_39_40),
/**
... | Kotlin |
tioner)",
[60891] = "팻 시험용 수경",
[60892] = "팻 시험용 방어구",
[60893] = "팻 시험용 맞물림톱니",
[60894] = "몬스터 - Staff, Orc 02",
[60895] = "이본로크 고리",
[60896] = "어둠 순찰대 조끼",
[60897] = "어둠 순찰대 장화",
[60898] = "유령의 머리띠",
[60899] = "교란의 겹셔츠",
[60900] = "거지의 허리띠",
[60901] = "더럽고 낡은 장갑",
[60902] = "애버크롬비의 장갑",
[60903] = "노인의 다리싸개",
[60904] =... | Lua |
return s.length() <= 3 && s.length() != 0 && (s.charAt(0) != '0' || s.length() <= 1) && Integer.parseInt(s) <= 255;
> }
> ```
---
# [649. Dota2 Senate](https://leetcode.com/problems/dota2-senate/)
---
**leetcode-cn Daily Challenge on December 11th, 2020.**
---
> **Difficulty** : **Medium**
>
> **Rela... | Markdown |
ng.as_ref().unwrap().driving_pos,
ParkingSpot::Lot(pl, _) => map.get_pl(pl).driving_pos,
}
}
pub fn spot_to_sidewalk_pos(&self, spot: ParkingSpot, map: &Map) -> Position {
match spot {
ParkingSpot::Onstreet(l, idx) => {
let lane = &self.onstreet_lanes[&l]... | Rust |
beroSgx/magica/blob/19bf60b/src/file/emscriptenFs.ts#L109)*
___
### ALLOC_STATIC
• **ALLOC_STATIC**: *number*
*Defined in [file/emscriptenFs.ts:110](https://github.com/cancerberoSgx/magica/blob/19bf60b/src/file/emscriptenFs.ts#L110)*
___
### FAST_MEMORY
• **FAST_MEMORY**: *number*
*Defined in [file/emscripten... | Markdown |
{
DB::rollBack();
}
});
## Overview
受到[大神的啟發](https://www.youtube.com/watch?v=5xPvsMX2q2M),決定自己動手來做一個加強版的、可以完全在本地端運行、可以永久記住與使用者之間的對話內容的個人AI助手。
可以完全放心的把任何事情告訴這個AI助手,他會永遠幫你記得,而且一切資訊都不會離開你的電腦。
隨著使用時間的推移,你的AI助手會越來越了解你。
---
這個專案也算是個人學習紀錄,盡量以簡潔乾淨的程式碼來完成,其中應用了包含:
- Docker應用
- 提示工程(Prompt engineer... | Markdown |
another commander was in charge of the mission."),
TextReadyForValidation = true,
TextsDone = true,
Title = T(933659636572, --[[StoryBit ExperimentalRocket_End_RocketScientist Title]] "Experimental Rocket"),
VoicedText = T(293409988154, --[[voice:narrator]] "A critical design flaw has been discovered in the prototy... | Lua |
. While the time stays the same, the results returned by methods such as hours() will change since they take the timezone into account. The timezone argument has to be of the ISO 8601 format.
__Example:__ Hour of the day in San Francisco (UTC/GMT -8, without daylight saving time).
```py
r.now().in_timezone('-08:00').... | Markdown |
assertThat(sessions).isEmpty()
}
@Test
fun `Verify sessions found to be initiated`() {
val sessions = generateSessionService.getSessionsNotGenerated(testContext.flowEventContext, sessionInfo)
assertThat(sessions.size).isEqualTo(1)
assertThat(sessions.first()).isEqualTo(sessionInfo.f... | Kotlin |
strokeLineCap = Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveTo(90.11f, 51.59f)
lineToRelative(1.96f, 2.23f)
lineToRelative(-20.06f, 17.66f)
lineToRelative(-1.96f, -2.23f)
... | Kotlin |
0, 5],
[9.60, -2.12, 0.0, 4],
[-2.64, 12.40, 0.0, 15],
[1.24, -6.65, 0.0, 15],
[2.02, -13.50, 0.0, 15],
[10.02, 1.50, 0.0, 3],
[12.63, 1.63, 0.0, 10],
[15.17, 6.79, 0.0, 10], //14.97, 1.57,0.0,5],
[13.60, 4.50, 0.0, 10], //17.33, 1.38,0.0,5],
[16.56, 8.88, 0.0, 15],... | Dart |
local i = 0 -- hero count
local ardm_heroes = {}
function Mutation:ARDM()
for hero, keys in pairs(KeyValues.HeroKV) do
if hero ~= "Version" and hero ~= FORCE_PICKED_HERO and hero ~= "npc_dota_hero_arc_warden" and hero ~= "npc_dota_hero_lone_druid" and hero ~= "npc_dota_hero_meepo" and hero ~= "npc_dota_hero_monkey_... | Lua |
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2020 MediaTek Inc.
*/
#define pr_fmt(fmt) "test_sensor " fmt
#include <linux/module.h>
#include <linux/string.h>
#include <linux/kthread.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/hrtimer.h>
#include "hf_sensor_type.h"
#include "se... | C |
let (valid, rest) = self.bytes.split_at(err.valid_up_to());
self.bytes = rest;
Some(Ok(from_utf8(valid).unwrap()))
}
}
}
}
Iter { bytes }
}
#[cfg(feature = "std")]
#[cfg(test)]
mod tests {
use super::*;
use... | Rust |
o work you need to specify a single input image path")
continue
if args.test_mode:
n_fine_tuning_iters = 1
else:
n_fine_tuning_iters = 50
print("Fine tuning generator on single image, this might take a minute or two")
curren... | Python |
prometheus.NewDesc("test_metric", "", nil, nil)
descUser := prometheus.NewDesc("per_tenant", "", []string{userLabel}, nil)
regs := NewTenantRegistries(log.NewNopLogger())
regs.AddTenantRegistry(user1, user1Reg)
regs.AddTenantRegistry(user2, user2Reg)
regs.AddTenantRegistry(user3, user3Reg)
verifySendMinOfGauge... | Go |
* x as f32) as u8;
let b = (0.3 * y as f32) as u8;
*pixel = image::Rgb([r, 0, b]);
}
// A redundant loop to demonstrate reading image data
for x in 0..imgx {
for y in 0..imgy {
let cx = y as f32 * scalex - 1.5;
let cy = x as f32 * scaley - 1.5;
... | Rust |
")
}
// Finally, test that the constraint has been added.
if len(initialMac.Caveats()) == len(newMac.Caveats()) {
t.Fatalf("No caveat has been added to the macaroon when " +
"constraint was applied")
}
}
// TestTimeoutConstraint tests that a caveat for the lifetime of
// a macaroon is created.
func TestTimeo... | Go |
oUInt128(), u8 / value)
assertEquals(0x163UL.toUInt128(), u16 / value)
assertEquals(0x163356bUL.toUInt128(), u32 / value)
assertEquals(0x163356b88ac0de0UL.toUInt128(), u64 / value)
assertEquals((12345678L / 13L).toUInt128(), 12345678uL.toUInt128() / 13uL.toUInt128())
// division... | Kotlin |
的子Widget
final Widget child;
///动画的定义
final Animation<double> animation;
///抖动的类型
final ShakeAnimationType shakeAnimationType;
///随机动画时使用构建随机数
final Random random = Random();
///随机动画时抖动的波动范围
final double randomValue;
///lib/demo/shake/shake_animation_builder.dart
@override
Widget build(Buil... | Dart |
rs.IPv4{
Version: 4,
IHL: 5,
TTL: 64,
Flags: layers.IPv4DontFragment,
SrcIP: fsafeDstIP,
DstIP: srcIP,
Protocol: layers.IPProtocolUDP,
},
Outbound: false,
Allowed: false,
},
{
Description: "Packets from non-failsafe IP to failsafe IP are denied",
Rules: &denyA... | Go |
FirstCategory());
templateRepository.save(TemplateFixture.get(member, category));
Long nonExistentID = 100L;
assertThatThrownBy(() -> sut.deleteByMemberAndIds(member, List.of(nonExistentID)))
.isInstanceOf(CodeZapException.class)
.hasMessage("... | Java |
{
struct drm_i915_private *i915;
struct intel_rps *rps;
i915 = mchdev_get();
if (!i915)
return false;
rps = &to_gt(i915)->rps;
spin_lock_irq(&mchdev_lock);
if (rps->max_freq_softlimit > rps->min_freq)
rps->max_freq_softlimit--;
spin_unlock_irq(&mchdev_lock);
drm_dev_put(&i915->drm);
return true;
}
EX... | C |
(),
viewEffectsConsumer = RemoveOverdueViewEffectHandler(uiActions)::handle
).build()
private val testCase = EffectHandlerTestCase(effectHandler)
@After
fun tearDown() {
testCase.dispose()
}
@Test
fun `when mark patient as visited effect is received, then mark patient as visited`() {
// gi... | Kotlin |
public Integer getYonghuId() {
return yonghuId;
}
/**
* 设置:用户
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
* 获取:内容
*/
public String getSaishiTijiaoText() {
return saishiTijiaoText;
}
/**
* 设置:内容
*/
public void ... | Java |
local state = require('miniharp.state')
local utils = require('miniharp.utils')
---@class MiniharpMarks
local M = {}
---@param file string
---@return integer|nil, MiniharpMark|nil
local function find_mark(file)
for i, m in ipairs(state.marks) do
if m.file == file then return i, m end
end
end
---@para... | Lua |
] = 10000;
tOutputs[i++] = tOutputs[0];
tChances[i ] = 10000;
tOutputs[i++] = tOutputs[0];
tDuration *= 2;
}
if (aData.mMaterial.mMaterial.contains(TD.Processing.PULVERIZING_CINNABAR)) {
tChances[i ] += 2500;
}
if (aData.mMaterial.mMaterial.mByProducts.contains(MT.Hg)) {
tChances[i ] += 10... | Java |
"""
This implementation is adapted from the Gymnasium API.
ref: https://github.com/Farama-Foundation/Gymnasium/blob/main/gymnasium/wrappers/utils.py
"""
import numpy as np
class RunningMeanStd:
"""Tracks the mean, variance and count of values."""
# https://en.wikipedia.org/wiki/Algorithms_for_calculating_va... | Python |
Endpoint's
* traffic that should be forwarded to that DeployedModel.
*
* If this field is non-empty, then the Endpoint's
* [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be
* overwritten with it. To refer to the ID of the just being deployed Model, a
* "0" should ... | Java |
ضِ ۚ وَمَنْ عِنْدَهُ لَا يَسْتَكْبِرُونَ عَنْ عِبَادَتِهِ وَلَا يَسْتَحْسِرُونَ',
20: 'يُسَبِّحُونَ اللَّيْلَ وَالنَّهَارَ لَا يَفْتُرُونَ',
21: 'أَمِ اتَّخَذُوا آلِهَةً مِنَ الْأَرْضِ هُمْ يُنْشِرُونَ',
22: 'لَوْ كَانَ فِيهِمَا آلِهَةٌ إِلَّا اللَّهُ لَفَسَدَتَا ۚ فَسُبْحَانَ اللَّهِ رَبِّ الْعَرْشِ عَمَّا... | Dart |
or
if outputPath != "" {
output, err = os.OpenFile(outputPath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
return fmt.Errorf("Error while opening the output file %s: %v.", outputPath, err)
}
defer output.Close()
} else {
output = os.Stdout
}
const padding = 2
writer := tabwriter.NewWrit... | Go |
val id = HashUtil.decodeIdToLong(agentId)
logger.info("The agent($id) is start up by ${startInfo.hostIp}")
val agentRecord = thirdPartyAgentDao.getAgent(dslContext, id) ?: return AgentStatus.DELETE
if (secretKey != SecurityUtil.decrypt(agentRecord.secretKey)) {
throw AgentPermission... | Kotlin |
test remains largely the same.
testLogger := log.New(io.Discard, "", 0)
t.Run("StandardSave", func(t *testing.T) {
testDir := t.TempDir()
tmpFilePath := filepath.Join(testDir, "test_paths.txt")
paths := []string{"b", "a", "c"} // unsorted
expectedContent := "a\nb\nc\n" // savePathsToFile sorts them
err :=... | Markdown |
dialog">'+f+'<span class="xubox_msg xubox_text" style="'+(f?"":"padding-left:20px")+'">'+e.msg+"</span></div>",'<div class="xubox_page">'+a+"</div>",'<iframe scrolling="'+d.iframe.scrolling+'" allowtransparency="true" id="'+g[1]+c+'" name="'+g[1]+c+'" onload="this.className=\''+g[1]+'\'" class="'+g[1]+'" frameborder="0... | JavaScript |
= xsvf_player_get_next_byte();
xsvf->wait_end_state = xsvf_player_get_next_byte();
if (instruction == XWAITSTATE) {
clock_cnt = xsvf_player_get_next_long();
wait_clock = clock_cnt > 0 ? 1 : 0;
}
#if XSVF_DEBUG
Serial.print(F("Dclock:"));
Serial.println(clock_cnt, DEC);
#endif
xsvf->wai... | C |
"l": 5, "f": 9199},
{"h": "鶠", "p": "yǎn", "sp": "yan", "r": "鳥", "sc": 20, "l": 5, "f": 9200},
{"h": "鷁", "p": "yì", "sp": "yi", "r": "鳥", "sc": 21, "l": 5, "f": 9201},
{"h": "鷖", "p": "yī", "sp": "yi", "r": "鳥", "sc": 22, "l": 5, "f": 9202},
{"h": "鸇", "p": "zhān", "sp": "zhan", "r": "鳥", "sc": 24, "l": 5, "... | Dart |
() async {
await createPlatformView(1, platformViewType);
ui.SceneBuilder sb = ui.SceneBuilder();
sb.pushOffset(0, 0);
sb.addPlatformView(1, width: 10, height: 10);
await renderScene(sb.build());
_expectSceneMatches(<_EmbeddedViewMarker>[_platformView]);
expect(platformViewsHost.querySele... | Dart |
an be invoked via [`Metadata::interpolate()`].
///
/// # Example
///
/// ```rust
/// use figment::Metadata;
///
/// let metadata = Metadata::named("environment variable(s)")
/// .interpolater(|profile, path| {
/// let keys: Vec<_> = path.iter()
/// .map(|k... | Rust |
t>();
map.put("roomCode", roomCode);
map.put("timestamp", System.currentTimeMillis());
map.put("giftList", String.join(",", secGiftIDList));
String sign = KuaiShouHelper.calcSign(map, appID, appSecret);
map.put("callBackUrl", "");
map.put("sign", sign);
var url = ... | Java |
{
lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, indev_act);
if(indev_reset_check(proc)) return;
}
/*If the prev. object also was in a group at least "LEAVE" it instead of defocus*/
else {
lv... | C |
(2), "'beforeComma,afterComma'");
}
@Test
public void testIsSmallPositiveInteger() {
assertTrue(StringUtils.isSmallPositiveInteger("99"));
assertFalse(StringUtils.isSmallPositiveInteger("100"));
assertFalse(StringUtils.isSmallPositiveInteger("1.5"));
assertFalse(StringUtils.... | Java |
ek;
use winrt::foundation::AsyncStatus;
#[test]
fn signed_enum() {
assert!(AsyncStatus::default() == 0.into());
assert!(AsyncStatus::Canceled == 2.into());
assert!(AsyncStatus::Completed == 1.into());
assert!(AsyncStatus::Error == 3.into());
assert!(AsyncStatus::Started == 0.into());
}
#[test]
fn ... | Rust |
_ACTION = uint32;
typedef CSSM_TP_CERTCHANGE_REASON = uint32;
final class cssm_tp_certchange_input extends ffi.Struct {
@CSSM_TP_CERTCHANGE_ACTION()
external int Action;
@CSSM_TP_CERTCHANGE_REASON()
external int Reason;
@CSSM_CL_HANDLE()
external int CLHandle;
external CSSM_DATA_PTR Cert;
external ... | Dart |
x::new(size, 1, v);
Ok(&v / v.norm(Euclidean))
}
}
<gh_stars>0
use std::collections::HashMap;
use flexstr::SharedStr;
use minecrevy_io_str::{McRead, McWrite};
use minecrevy_key::Key;
use minecrevy_text::Text;
use crate::types::Slot;
#[derive(Clone, PartialEq, Debug, McRead, McWrite)]
pub struct Advancem... | Rust |
取外部储存", Toast.LENGTH_LONG).show();
}
}
}
private fun loadModels() {
val dir = File(Environment.getExternalStorageDirectory(), "A/Live2D")
modelListData = mutableListOf()
dir.list()?.forEach { subDirName ->
val f = File(dir, subDirName)
if (f.i... | Kotlin |
heck())
{
printf("YES\n1\n");
continue;
}
bool ct2 = 0;
int pos;
for (int i = 1; i <= 100; i++)
{
if (ok(pos = a[i] - i + 2))
{
ct2 = 1;
break;
}
for (int j = 0; e.p[j] < 100; ++j)
if (a[i] % (e.p[j] - 1) == 0)
{
int q = a[i] / (e.p[j] - 1) + 1;
int p = e.p[j];
... | Markdown |
AAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMs'
'tn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2'
'QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbI'
'SD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqb'
... | Dart |
mark_tex = hardcore_option_button_frame:CreateTexture(nil, "OVERLAY")
check_mark_tex:SetDrawLayer("OVERLAY", 6)
check_mark_tex:SetHeight(check_circle_tex:GetHeight() * 0.8)
check_mark_tex:SetPoint("CENTER", check_circle_tex, "CENTER", 0, 0)
check_mark_tex:SetWidth(check_circle_tex:GetHeight() * 0.8)
check_mark_tex... | Lua |
//===-- Square root of IEEE 754 floating point numbers ----------*- C++ -*-===//
//
// 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
//
//===---------------------------... | C |
rn Scaffold(
appBar: AppBar(
title:
Text(widget.entry == null ? 'Add Chat Entry' : 'Edit Chat Entry'),
actions: [
IconButton(
icon: const Icon(Icons.save),
onPressed: () => _saveEntry(context),
)
],
),
body: Column(
... | Dart |
]!./resources/js/views/Resources/Show.vue?vue&type=template&id=0a008fb4":
/*!***************************************************************************************************************************************************************************************************************************************************... | JavaScript |
# mlapp/ml/evaluator.py
from sklearn.metrics import accuracy_score, confusion_matrix, ConfusionMatrixDisplay, precision_score, recall_score
# mlapp/ml/evaluator.py
import matplotlib.pyplot as plt
plt.switch_backend('Agg') # 백엔드 설정을 Agg로 변경
import io
import base64
import numpy as np
def evaluate_model(model, X_test,... | Python |
env.IP++
return env.Code[env.IP], env
}
} else {
stmt = func(env *Env) (Stmt, *Env) {
channel := channelfun(env).Interface().(chan float32)
channel <- exprfun(env)
env.IP++
return env.Code[env.IP], env
}
}
case
r.Float64:
if exprfun, ok := expr.Fun.(fun... | Go |
aggable>false</draggable>\n";
if (!isMovable())
xml += "<movable>false</movable>\n";
xml += "</particle>\n";
return xml;
}
}
package org.energy2d.model;
/**
* Make some custom shapes
*
* @author Charles Xie
*
*/
public class PartFactory {
private Model2D model;
public PartFactory(Model2D model) {... | Java |
ia ya mwisho kwa wasio wasanidi kuchangia kwa Monero ni kuhakikisha kuwa umeweka <a class=\"next-link\" target=\"_blank\" rel=\"noopener nofollow\" href=\"https://github.com/monero-project/monero/issues\">matatizo katika Github</a> unapokuwa na suala ambalo haliwezi kutatuliwa kwenye <a class=\"next-link\" target=\"_bl... | Dart |
wards[0] if len(rewards) > 1 else 0
}
# 分析帕累托最优性
if self.cumulative_rewards:
# 检查最终联合策略是否实现帕累托最优
final_cumulative = {sid: self.cumulative_rewards[sid][-1]
for sid in self.service_ids if self.cumulative_rewards[sid]}
... | Python |
private val instance: Instance,
private val name: String,
) : WasmFunctionBinding {
override fun executeVoid(vararg args: Any?) {
invoke(store, instance, name, args.argsToValues()).orThrow()
}
override fun executeForInt(vararg args: Any?): Int = invoke(store, instance, name, args.argsToValues... | Kotlin |
AspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M25 17.723c3.057-2.569 5-6.42 5-10.723H2c0 4.31 1.95 8.168 5.016 10.736v5.201c0 1.44.595 3.436 2.006 5.084C10.464 29.707 12.737 31 16 31c3.262 0 5.539-1.293 6.985-2.977C24.4 26.375 25 24.378 25 22.938v-5.215ZM9.016 14.969c0-.509.393-.993 1.374... | Dart |
adding: 8px;
width: 18px;
height: 18px;
}
.cmBox svg {
transform: rotate(0);
animation-name: reverse_rotate;
animation-duration: 0.2s;
}
.enabledCMBox svg {
transform: rotate(180deg);
animation-name: setting_rotate;
animation-duration: 0.2s;
}
@keyframes setting_rotate {
0% {
... | CSS |
end
end
end
function Act6FunBattleFinishDlg:_PlayEnterAnim()
local enterTween = self._animWrapper:PlayWithTween(self.m_animAnim);
enterTween:SetEase(CS.DG.Tweening.Ease.Linear);
self:Delay(tonumber(self.m_animDur), function()
self.m_isAnimEnd = true
end)
end
function Act6FunBattleFinishDlg:_InitBGM()
... | Lua |
np.max(sample) < 200 or np.min(sample) < 0:
sample = (sample * 255).astype(np.uint8)
ax = plt.subplot(batch_size // 2, 2, j + 1)
plt.imshow(sample)
title = ""
label = batch_labels[j]
if isinstance(label, torch.Tensor):
label = label.numpy()
if la... | Python |
if (right) "right"
else if (left) "left"
else ""
}
}
/**
* 文字代码高亮
*/
private fun StringBuilder.appendHighlightedByLexerAndEncodedAsHtmlCodeSnippet(
project: Project, language: Language, codeSnippet: String
): StringBuilder {
val codeSnippetBuilder = StringBuilder()
HtmlSyntaxInfoUtil... | Kotlin |
_add)?;
}
Instruction::F32Add => {
op2::<f32, f32, _>(rt, |a, b| value::canonicalize_f32_nan(a + b))?;
}
Instruction::I64Add => {
op2::<i64, i64, _>(rt, i64::wrapping_add)?;
}
Instruction::F64Add => {
op2::<f64, f64, _>(rt, |a, b| va... | Rust |
//
// PLViewController.h
// Play
//
// Created by Jon Maddox on 2/9/12.
// Copyright (c) 2012 GitHub, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AudioStreamer.h"
#import "PLATrack.h"
#import "SDWebImageDownloader.h"
@interface PLAPlayerViewController : UIViewController <SDWebImageDownloaderDele... | C |
--ウォークライ・ディグニティ
function c47882774.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47882774,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,47882774+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c47882774.act... | Lua |
"),$tabpanels=$this.find(".item"),$is_paused=!1,id_title="id_title",id_desc="id_desc";for($tablist.attr("role","tablist"),$tabs.focus(function(){$this.carousel("pause"),$is_paused=!0,$pauseCarousel.innerHTML="Play Carousel",$(this).parent().addClass("active"),setTablistHighlightBox(),$($tablistHighlight).addClass("focu... | JavaScript |
#ifndef STFS_LIBFCNTL_H
#define STFS_LIBFCNTL_H
///////////////////////////////////////////////////////////////////////////////
//
/// \file libclose.h
/// \brief Header file for STFSLIB_Close-associated functionality
///
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) und... | C |
tem title="选项一" id="1"><div style="padding:20px">选项一</div></lay-tab-item>
<lay-tab-item title="选项二" id="2"><div style="padding:20px">选项二</div></lay-tab-item>
<lay-tab-item title="选项三" id="3"><div style="padding:20px">选项三</div></lay-tab-item>
<lay-tab-item title="选项四" id="4"><div style="padding:20px">选项四</di... | Markdown |
tools.clock.fragments.ClockFragment
import com.simplemobiletools.clock.fragments.StopwatchFragment
import com.simplemobiletools.clock.fragments.TimerFragment
import com.simplemobiletools.clock.helpers.*
import com.simplemobiletools.commons.models.AlarmSound
class ViewPagerAdapter(fm: FragmentManager) : FragmentStatePa... | Kotlin |
if *m.IncludeOptionChain {
data[i] = 1
} else {
data[i] = 0
}
i++
}
if m.Source != nil {
data[i] = 0x92
i++
data[i] = 0x3
i++
i = encodeVarintPricing(data, i, uint64(len(*m.Source)))
i += copy(data[i:], *m.Source)
}
if m.User != nil {
data[i] = 0x9a
i++
data[i] = 0x3
i++
i = enc... | Go |
compile option(the compile option to compile source to bin)
* @return {@link ContractBuilder}
*/
public ContractBuilder upgrade(String source, String bin, VMType vmType, String addr, Map<String, String> compileOpt);
/**
* create ContractOperation to upgrade contract by con... | Markdown |
target:addMod(xi.mod.FOOD_DURATION, 100)
end
end
effectObject.onEffectTick = function(target, effect)
end
effectObject.onEffectLose = function(target, effect)
-- target:delLatent(xi.latent.SANCTION_EXP, ?, xi.mod.EXP_BONUS, ?)
local power = effect:getPower()
if power == 1 then
target:delLaten... | Lua |
IRQ_INPROGRESS);
desc->handler->startup(irq);
}
spin_unlock_irqrestore(&desc->lock,flags);
/* register_irq_proc(irq); */
return 0;
}
/* Initialize irq handling for IRQs.
BASE_IRQ, BASE_IRQ+INTERVAL, ..., BASE_IRQ+NUM*INTERVAL
to IRQ_TYPE. An IRQ_TYPE of 0 means to use a generic interrupt type. */
void ... | C |
프로토콜이 사용된다.
802.11 무선 랜에서 사용되는 랜덤 접속 프로토콜은 `CSMA/CA(carrier sense multiple access with collision avoidance)`다.
즉, 스테이션이 전송하기 전에 채널 상태를 감지하고(sense), 만일 채널이 사용 중이면 전송하지 않는다.
<br/>
이더넷과 802.11 모두 채널을 감지하는 랜덤 접속 프로토콜을 사용하지만,
이들 `MAC(Medium Access Control, 매체 접속 제어) 프로토콜`에는 차이가 있다.
1. 802.11은 충돌 검출(collision detecti... | Markdown |
Nutella, not 'der' nor 'das'" , 8, 0.4F , 5, C+37, 0.15F, 0, 0, 0, 20, 30, EnumAction.eat , F, F, F, PotionsGT.ID_STICKY, 300, 0, 70);
new FoodStatDrink(FL.create("peanutbutter" , "Peanut Butter" , null , 1, 1000, 300, Fluids... | Java |
成攻击伤害,并移除<skillEff=冰冻>', '3235', '5', 'one'},
{'323601', '323601', '协奏干扰', '3236', '1', '323602', '323601', '', '2003', '释放【虹音】后,有<color=#FFC432>20%</color>概率对目标随机施加以下1个<skillEff=负面效果>,持续2回合:100%<skillEff=基础概率>减少20%攻击、减少20%防御、<skillEff=残损>或<skillEff=昏睡>', '', '释放【虹音】后,有<color=#FFC432>20%(+20%)</color>概率对目标随机施加以下1个<skil... | Lua |
.target_bufnr, true, self.win_config)
if self.winid == 0 then
vim.notify("Overlook: Failed to open popup window.", vim.log.levels.ERROR)
return false
end
vim.w.is_overlook_popup = true
vim.w.overlook_popup = {
root_winid = self.root_winid,
}
State.register_overlook_popup(self.winid, self.opts... | Lua |
dor",0},
[4449] = {'Crazzle Sprysprocket',2016,2016,40,40,0,nil,nil,0,nil,nil,1080,"AH","Gnome Ticket Redeemer",2},
[4450] = {'Rugfizzle',1,1,35,35,0,nil,nil,0,nil,nil,35,"AH","Goblin Ticket Redeemer",0},
[4451] = {'Auld Stonespire',1200,1200,28,28,0,{[1638]={{35.97,59.92}}},nil,1638,{1102},{1102},104,"H",nil,2},
[4452... | Lua |
> {
# sibyl::block_on(async {
# let oracle = sibyl::env()?;
# let dbname = std::env::var("DBNAME").expect("database name");
# let dbuser = std::env::var("DBUSER").expect("user name");
# let dbpass = std::env::var("DBPASS").expect("password");
# let session = oracle.connect(&dbname, &dbuser, &dbp... | Rust |
np.array([('YRI','chr1',10114,4.3),('CEU','chr1',10116,5.2)], dtype=HapBlock)
>>> np.array([('CEU','chr1',10114,4.3),('YRI','chr1',10116,5.2)], dtype=HapBlock)
>>> ], 'HG00097': [
>>> np.array([('YRI','chr1',10114,4.3),('CEU','chr2',10116,5.2)], dtype=HapBlock)
>>> ... | Python |
.Sprintf(strFmt, DockerPrefix, imageCirros, DockerTag), "")
addNoCloudDisk(&vm.Spec.Template.Spec)
vm.Spec.Template.Spec.Domain.Devices.Disks[1].DiskDevice.Disk.Bus = ""
return vm
}
func GetVmWindowsInstancetypeComputeLargePreferencesWindows() *v1.VirtualMachine {
vm := getBaseVM(VmWindowsInstancetypeComputeLarge... | Go |
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* ISA Plug & Play support
* Copyright (c) by Jaroslav Kysela <perex@perex.cz>
*/
#include <linux/module.h>
#include <linux/isapnp.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/uaccess.h>
extern struct pnp_protocol isapnp_protocol;
static st... | C |
41] = "황금가시 차",
[10842] = "바람비늘 사롱",
[10843] = "깃털가죽 단망토",
[10844] = "학카르의 뾰족지팡이",
[10845] = "전사의 은총",
[10846] = "혈안의 경갑",
[10847] = "용의 부름",
[10858] = "도면: 튼튼한 철제 마울",
[10918] = "상처 감염 독",
[10919] = "약제사 장갑",
[10920] = "상처 감염 독 II",
[10921] = "상처 감염 독 III",
[10922] = "상처 감염 독 IV",
[10938] = "하급 마법의 정수",
[10939] = "상급 ... | Lua |
alert(resp.data);\n }\n else {\n alert(resp.msg);\n }\n window.location.reload();\n }\n });\n }\n });\n\n $(\'.package_row .cancel-deleting-pkg\').click(function... | Lua |
ctory(&self, mux_tx: tokio::sync::mpsc::Sender<MuxCall> ) -> Box<dyn Router>;
fn logger(&self) -> fn(message: &str);
fn portal_request_handler(&self) -> Arc<dyn PortalAssignRequestHandler>;
}
#[derive(Debug,Clone,Serialize,Deserialize)]
pub struct ClientIdent {
pub user: String,
pub portal_key: Option... | Rust |
size: (vertices.len() * std::mem::size_of::<Vertex>()) as wgpu::BufferAddress,
usage: wgpu::BufferUsage::VERTEX,
mapped_at_creation: true,
});
vertex_buffer
.slice(..)
.get_mapped_range_mut()
.copy_from_slice(bytemuck::cast_slice(&vertices)... | Rust |
, '', '', ''},
{'1030982', '', '她们可能分散在这个地下城市的各个部分,所以我们才没遇到。', '', '', '', '', '', '', '', '', '', '9906001', '', '', '2', '', '普罗米修斯', 'Prometheus', '', '', '1', '', '', '', '', '', '', '', '', '1030983', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''},
{'1030983', '', '她们或者也在想办法离开这里。', '', '', '', '',... | Lua |
eSpans{
{
Scope: &v1.InstrumentationScope{},
Spans: []*v1_trace.Span{
{
TraceId: traceID,
Status: &v1_trace.Status{},
Attributes: []*v1.KeyValue{
{
Key: "a",
Value: &v1.AnyValue{
Value: &v1.AnyValue_StringValue{StringValue: "b"},
... | Go |
--- chrome/browser/media/webrtc/webrtc_logging_handler_host.h.orig 2019-09-10 11:13:40 UTC
+++ chrome/browser/media/webrtc/webrtc_logging_handler_host.h
@@ -153,13 +153,13 @@ class WebRtcLoggingHandlerHost : public content::Brows
size_t web_app_id,
const StartEventLog... | C |
--tab-bg)calc(var(--tab-grad) + var(--border) + .25px))}}&:has(.tab-content){&>.tab:first-child{&:not(.tab-active,[aria-selected=true]){--tab-border-colors:#0000 var(--tab-border-color)var(--tab-border-color)var(--tab-border-color)}}}& .tab-content{--tabcontent-order:0;--tabcontent-margin:0 0 calc(-1*var(--border))0;--... | CSS |
a[0]/len(inp)
############### Main Script #################
n_epochs = args.epochs
print_every = args.log_interval
plot_every = 10
hidden_size = args.hidden_size
n_layers = args.n_layers
lr = args.lr
chunk_len = args.chunk_len
decoder = RNN(n_characters, hidden_size, n_characters, n_layers)
decoder_optimizer = to... | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.