text
stringlengths
27
775k
import React, { forwardRef } from 'react' import { Link } from 'react-router-dom' import posed from 'react-pose' import classNames from 'classnames' import SvgChar from '~/components/svg/char' const CharItem = forwardRef((props, ref) => { const wrapperClasses = classNames(`char-section__item`, { [`class-${props...
pub type Stage = (&'static str, &'static str); #[derive(Copy, Clone)] pub enum Category { LastWarp, Cavern, Developer, DragonRoostCavern, DragonRoostIsland, EarthTemple, ForbiddenWoods, ForestHaven, ForsakenFortress, GanonsTower, GreatFairy, Hyrule, NintendoGallery, ...
module Lazada module API module Image def set_images(params) url = request_url('Image') params = { 'ProductImage' => params } response = self.class.post(url, body: params.to_xml(root: 'Request', skip_types: true)) response end def migrate_image(image_url) ...
G_DURATION=10 START=100; STEP=100 END=100 OFFSET=5 CMD="LD_LIBRARY_PATH=../appgen/6month-demo ./halperf.py" TYPE="bw" ADDP="ipc:///tmp/hal" RES="results_halperf_$G_DURATION_" INT="--interval 10000" run_g="$CMD -i ${ADDP}sub${TYPE}green -o ${ADDP}pub${TYPE}green -r 2 2 1 -t $G_DURATION $INT -Z -s 1 1 1 " run_o="$CMD ...
var firebase = require('firebase-admin') var crypto = require('crypto') function decrypt (encrypted) { var decipher = crypto.createDecipheriv(algorithm, password, iv) decipher.setAuthTag(encrypted.tag) var dec = decipher.update(encrypted.content, 'hex', 'utf8') dec += decipher.final('utf8') return dec } var...
package io.elytra.api.chat /** * Allows for a tooltip to be displayed when the player hovers their mouse over text. */ data class HoverEvent(val action: Action, val value: JsonComponent) : JsonComponent { override fun toJson(buff: Appendable) { buff.append('{') buff.append("\"action\":\"").appen...
import cors from 'cors'; import express from 'express'; import { json } from 'body-parser'; // book routes import { createBook } from './routes/book/createBook'; import { updateBook } from './routes/book/updateBook'; import { deleteBook } from './routes/book/deleteBook'; import { getBookById } from './routes/book/getB...
if defined?(ActiveAdmin) and News.config.engine_active_admin ActiveAdmin.register News::Item, {:sort_order => :created_at} do controller do cache_sweeper News.config.news_item_sweeper if News.config.news_item_sweeper defaults :finder => :find_by_url end menu :label => 'Story', :parent => "New...
namespace MassTransit.RabbitMqTransport { using System; using System.Text; using RabbitMQ.Client; public static class RabbitMqExtensions { /// <summary> /// Close and dispose of a RabbitMQ channel without throwing any exceptions /// </summary> /// <param name="mode...
<?php namespace App\Http\Controllers; use App\Http\Requests\AdminRequest; use Illuminate\Support\Facades\Auth; use Illuminate\Http\Request; class QuanTriVienController extends Controller { protected $rederectTo = 'trang-chu'; public function dangnhap() { return view('dang-nhap'); } public ...
package com.escodro.task.di import com.escodro.task.mapper.AlarmIntervalMapper import com.escodro.task.mapper.CategoryMapper import com.escodro.task.mapper.TaskMapper import com.escodro.task.mapper.TaskWithCategoryMapper import com.escodro.task.presentation.add.AddTaskViewModel import com.escodro.task.presentation.det...
import 'package:flutter/material.dart'; void main() => runApp(MaterialApp( home: Scaffold( body: ListaTransferencias(), appBar: AppBar( title: Text('Transferências'), ), floatingActionButton: FloatingActionButton( child: Icon(Icons.home), ), ), ...
; Basic Axe rules about BVs ; ; Copyright (C) 2008-2011 Eric Smith and Stanford University ; Copyright (C) 2013-2020 Kestrel Institute ; Copyright (C) 2016-2020 Kestrel Technology, LLC ; ; License: A 3-clause BSD license. See the file books/3BSD-mod.txt. ; ; Author: Eric Smith (eric.smith@kestrel.edu) ;;;;;;;;;;;;;;;;...
package com.carlosedp.scalautils.riscvassembler.internal import com.carlosedp.scalautils.ObjectUtils._ object InstructionParser { /** Parse an assembly instruction and return the opcode and opdata * * @param input * the assembly instruction string * @return * the opcode and opdata */ ...
namespace Reportr.Data { using Reportr.Data.Querying; using System; using System.Linq; /// <summary> /// Represents a single data binding /// </summary> public sealed class DataBinding { /// <summary> /// Constructs the data binding with the details /// </summar...
(ns aoc2019.day02.core (:require [intcode.core :refer [run]])) (defn inc-verb "Increment verb" [verb] (if (= verb 99) 0 (inc verb))) (defn inc-noun "Increment noun" [noun verb] (if (= verb 99) (inc noun) noun)) (defn day02a "Calculate int codes for puzzle input" [program] (first (:...
#!/bin/bash set -e RETRIES=50 while [ $RETRIES -gt 0 ]; do if $(curl --connect-timeout 30 --speed-time 60 --speed-limit 1000 "$@"); then exit 0 else RETRIES=$((RETRIES - 1)) PAUSE=$(( ( RANDOM % 5 ) + 1 )) echo "Retry in $PAUSE seconds, $RETRIES times remaining..." sleep "$PAUSE" fi done e...
package stat import ( "crypto/sha256" "encoding/binary" "os" "path/filepath" "sort" "github.com/bmatcuk/doublestar" ) type Stater struct { checkContent bool } func New(checkContent bool) *Stater { s := &Stater{ checkContent: checkContent, } return s } // Stat creates a hash of al...
// Copyright 2021 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // 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 ...
#!/usr/bin/env node import { convertNpmVersion } from "../lib"; if(process.argv.length !== 3) { console.error(`Usage: npm-get-version <package>@<tag>~<N>`); process.exit(1); } try { const res = convertNpmVersion(process.argv[2]); console.log(res); } catch (error) { console.error(`Error [${error.code}]: ${e...
import unittest from src.homework.d_repetition.repetition import get_factorial from src.homework.d_repetition.repetition import sum_odd_numbers class Test_Config(unittest.TestCase): def test_factorial(self): self.assertEqual(get_factorial(5),120) def test_sum_odd_numbers(self): s...
using System; using System.Linq; using System.Threading.Tasks; using Gress; using MaterialDesignThemes.Wpf; using Stylet; using Tyrrrz.Extensions; using YoutubeDownloader.Internal.Extensions; using YoutubeDownloader.Models; using YoutubeDownloader.Services; using YoutubeDownloader.ViewModels.Components; using YoutubeD...
require 'debugger_xml/ide/control_command_processor' module DebuggerXml module Vim class ControlCommandProcessor < Ide::ControlCommandProcessor def initialize(*args) super(*args) @mutex = Mutex.new end def process_command(*args) @mutex.synchronize do super(*a...
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class EndGame : MonoBehaviour { [SerializeField] Text endgametext; private void Start() { } public void endgamemsg(int lcikills, int lcakills,int scorelimit) { ...
function focus() { document.getElementById("readline").focus(); } function jrun() { var expr = document.getElementById("readline").value ; var checked = document.getElementById("lambda").checked ; document.getElementById("term").innerHTML += expr + "<br />"; document.getElementById("readlin...
# build gybs cd Sources/gyb/ ./generate_py_stub_models.py ./gyb.py --line-directive '' -o "types.swift" "types.swift.gyb" ./gyb.py --line-directive '' -o "description.swift" "description.swift.gyb" ./gyb.py --line-directive '' -o "wrappers.swift" "wrappers.swift.gyb" ./gyb.py --line-directive '' -o "builders.swift" "bu...
import {HttpModule, Module} from '@nestjs/common'; import {SoterService} from './soter.service'; import {UploadHandler} from './useCase/uploadFile/uploadHandler'; import {ArchiveHandler} from './useCase/archiveFile/archiveHandler'; import {UnzipHandler} from './useCase/unzipFile/unzipHandler'; import {ConfigModule} fro...
import { TestBed, ComponentFixture, fakeAsync, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { ScrollPanel } from './scrollpanel'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Component } from '@angular/core'; @Component({ template...
#nullable disable namespace Avalonia.Platform { /// <summary> /// Defines the platform-specific interface for a <see cref="Avalonia.Media.Imaging.WriteableBitmap"/>. /// </summary> internal interface IWriteableBitmapImpl : IBitmapImpl { ILockedFramebuffer Lock(); } }
<?php namespace Drupal\commerce_price\Comparator; use SebastianBergmann\Comparator\Comparator; use SebastianBergmann\Comparator\ComparisonFailure; /** * Provides a PHPUnit comparator for numbers cast to strings. * * In PHPUnit 6, $this->assertEquals('2.0', '2.000') would pass because * numerically the two string...
--- published: true layout: default category: exhibit title: 6/5 Wednesday section: Week two --- ## Wednesday <img src="https://i.imgur.com/WnvVq9Dl.jpg"> <br><br> <br><br> <br><br> <br><br> <br><br> <img src="https://i.imgur.com/YnS9n1tl.jpg"> <br><br> <br><br> <br><br> <br><br> <br><br> <img src="https://i.imgur.co...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from setuptools import setup, find_packages setup( name='prov_es', version='0.2.2', long_description='PROV-ES python library', packages=find_packages(), ...
import fs = require('fs'); import os = require('os'); import path = require('path'); interface FromTreeOutput { /** * Absolute path of the created temporary directory, containing the generated structure */ readonly directory: string; /** * Cleanup function that will remove the generated files once calle...
""" Register a user interaction """ import json import logging import subprocess import os from scipy.io.wavfile import read import numpy import requests from admin.notify_admin import NotifyAdmin from admin.admin import Admin from checks import CheckResident, CheckCondo from db.schema import create_resident, residen...
from os import environ worker_class = "quart.worker.GunicornWorker" bind = "0.0.0.0:5000" reload = environ.get('QUART_ENV') == 'development'
# Helper function to detect if we're currently compiling currently_compiling() = ccall(:jl_generating_output, Cint, ()) != 0 # Helper function to get the UUID of a module, throwing an error if it can't. function get_uuid(m::Module) uuid = Base.PkgId(m).uuid if uuid === nothing throw(ArgumentError("Modu...
# -*- coding: utf-8 -*- """ @date: 2020/10/30 下午3:41 @file: video_manager.py @author: zj @description: """ import cv2 from .live import Live class VideoManager: def __init__(self, cfg): """ Args: cfg (CfgNode): configs. Details can be found in tsn/config/slowfast.py ...
# e-tickets > A Vue.js project ## Build Setup ``` bash # install dependencies npm install # serve with hot reload at localhost:8080 npm run dev # build for production with minification npm run build # build for production and view the bundle analyzer report npm run build --report ``` ## what I think is worth to ...
package test import java.util.* public open class WrongMethodName { public open fun foo() : String? = "" }
/* * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. 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 i...
import { createSlice } from '@reduxjs/toolkit'; import { ethSendTransaction, getTransactionReceipt } from '../../api' export const slice = createSlice({ name: 'contract', initialState: { contracts: {} }, reducers: { setContract: (state, action) => { state.contracts[action.payload.address] = actio...
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Command.Export.Perform ( ExportOptions , options , perform ) where import Data.Monoid import Options.Applicative import System.Exit import Text.Comma import qualified Data.Text as T import qualified Data.Text.IO as T import qualified System.FilePat...
package com.zhuinden.navigationexamplekotlinview.utils.unused import android.os.Parcelable import com.zhuinden.simplestack.navigator.DefaultViewKey interface ViewKey : DefaultViewKey, Parcelable { override fun layout(): Int }
import chalk from 'chalk'; import { resolve } from 'path'; import bundle from '../dist/bundle'; const green = chalk.reset.inverse.bold.green; const red = chalk.reset.inverse.bold.red; const fixturePath = resolve(__dirname, '../test/fixture'); process.chdir(fixturePath); bundle() .then(() => { console.log(green(...
using Interceptor; using Model; using Sample.Repository; using System; using System.Collections.Generic; using System.Linq; namespace Repository { public class Repository : IClientRepository { private IList<Client> _clients = new List<Client>(); public void Add(Client client) { ...
package pef fun String.toByteArray () : ByteArray { val charArray = toCharArray() val arraySize = charArray.size val byteArray = ByteArray( arraySize ) for (a in 0 until arraySize) byteArray[a] = charArray[a].toByte() return byteArray } fun ByteArray.toString () : String { val arraySize = si...
# frozen_string_literal: true module RobotV2 class Board attr_accessor :board def initialize @board = [] @prev_position_x = 0 @prev_position_y = 0 end # Creates a 2D array/matrix based on arg of size def create_board(size) @board = Array.new(size) { Array.new(size, 'X') ...
#include "philo.h" size_t ft_strlen(const char *s) { size_t i; i = 0; while (s[i]) i++; return (i); } int ft_isdigit(int c) { if (c >= '0' && c <= '9') return (1); return (0); } int ft_isspace(char c) { if (c == '\t' || c == '\n' || c == '\v' || \ c == '\f' || c == '\r' || c == ' ') return (1); retu...
use diesel_derive_enum::DbEnum; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Copy, Serialize, Deserialize, DbEnum)] #[DieselType = "Account_availability"] pub enum AccountAvailability { Immediately, Days, Weeks, Months, Years, Decades, } #[derive(Debug, Clone, Copy, Serialize, D...
require 'spec_helper' describe Dex2jar::Command do let(:command) {described_class.new('', [])} describe "execute" do it 'executes with the right params' do expect(command).to receive(:dex2jar_command).and_return('dex2jar.sh') expect(command).to receive(:`).with('dex2jar.sh ').and_return("mmr") ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Logging { public class LogConsoleListener : LogListener { public void sendMessage(string message, LogLevel logLevel, string subsystem) { Console.WriteLine(Log.formatMessage(me...
use std::cell::RefCell; mod parser; #[derive(Debug)] pub struct Config<'a> { contents: RefCell<Vec<&'a str>>, } impl<'a> Config<'a> { pub fn load(contents: Vec<&'a str>) -> Config { Config { contents: RefCell::new(contents), } } pub fn get_config(&self) -> String { ...
package no.nav.helse import com.fasterxml.jackson.module.kotlin.readValue import io.ktor.http.* import io.ktor.routing.* import io.ktor.server.testing.* import no.nav.common.KafkaEnvironment import org.apache.kafka.clients.consumer.KafkaConsumer import org.apache.kafka.clients.producer.KafkaProducer import org.apache....
(ns rlserver.generate.timer (:require [rlserver.entity.entity :refer [create-entity]])) (defn generate-animated-effect ([state pos animation timer] (create-entity state {:pos pos :timer timer :animated animation})) ([state pos animation] (gene...
# Compiles protocol buffers files BOSY_PROTO_PATH="../ml2/tools/bosy/bosy.proto" LTL_PROTO_PATH="../ml2/tools/protos/ltl.proto" NUXMV_PROTO_PATH="../ml2/tools/nuxmv/nuxmv.proto" SPOT_PROTO_PATH="../ml2/tools/spot/spot.proto" STRIX_PROTO_PATH="../ml2/tools/strix/strix.proto" if [ $1 == "bosy" ] then PROTO_PATH=$BO...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from collections import deque from io import StringIO from math import ceil import threading import unittest from hwt.simulator.simTestCase import SingleUnitSimTestCase from hwtLib.examples.axi.debugbusmonitor import DebugBusMonitorExampleAxi from hwtLib.tools.debug_bus_...
package net.floodlightcontroller.arscheduler; import java.util.Calendar; import java.util.Date; import org.slf4j.Logger; /** * Runs in the background, waiting to provision a successfully scheduled flow until the starting time. * @author Dylan Davis and Jeremy Plante * */ public class SchedulingThread...
grt-realtime ============ A simple app to expose the GRT's real-time transit information on Android phones.
#= # Tests vector unknown capability with a simple Poisson-like problem. =# ### If the Finch package has already been added, use this line ######### using Finch # Note: to add the package, first do: ]add "https://github.com/paralab/Finch.git" ### If not, use these four lines (working from the examples directory) ### ...
#include "DebugList.h" #include "Application.h" //---------------------------------------------------- //This class was made to centralise all debug toggles. //Very poorly implemented :( //It does do the job however and initialises values //correctly. //Note that the existence of the class could be nulled ...
package Main; import java.io.IOException; import java.util.List; import org.junit.Before; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions; import io.cucumber.jav...
-- Switch to the DBA database USE DBA; GO -- Begin a conversation and send a request message DECLARE @conversation_handle UNIQUEIDENTIFIER; DECLARE @message_body XML; BEGIN TRANSACTION; BEGIN DIALOG @conversation_handle FROM SERVICE [WhoIsActiveService] TO SERVICE N'WhoIsActiveService' ON CONTRACT ...
#!/bin/bash duration() { ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $1 } log() { date=$(date --rfc-3339=seconds) path=$1 m3u8="$path"index.m3u8 duration=$(duration $path$file) echo $date - [$file] [$duration]["$path"index.m3u8] >> /opt/log_data/report...
import chai = require('chai'); const should = chai.should(); import { exec } from '../../../src/slimming/color/exec'; describe('颜色解析', () => { it('keywords', () => { exec('red').should.deep.equal({ r: 255, g: 0, b: 0, a: 1, origin: '#ff0000', valid: true, }); exec('yellow').should.deep.equal(...
-module(rc_example). -include_lib("riak_core/include/riak_core_vnode.hrl"). -export([ping/0, ping/1, ring_status/0, put/2, get/1, delete/1, keys/0, values/0, clear/0 ]). %% @doc Pings a random vnode to make sure communication is function...
package models type paramDomain interface { IsIn() bool IsNotIn() bool IsLike() bool IsList() bool IsLtGt() bool IsOperator(operator string) bool GetValueList() []string GetValueItem() string } type paramIntGet interface { getIn() (string, []interface{}, error) getNotIn() (string, []interface{}, error) get...
#!/bin/bash pylint app pep8 app #path = pwd export PYTHONPATH=${PYTHONPATH}:/home/user/.../open-event-server find . -name "*.pyc" -exec rm -rf {} \; nosetests --with-coverage --cover-erase --cover-package=app --cover-html
package com.hellohasan.weatherappmvpdagger.features.weather_info_show.view import com.hellohasan.weatherappmvpdagger.features.weather_info_show.model.data_class.City import com.hellohasan.weatherappmvpdagger.features.weather_info_show.model.data_class.WeatherDataModel interface MainActivityView { fun handleProgre...
/* * Copyright (c) 2020 Huawei Technologies Co.,Ltd. * * openGauss is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * * http://license.coscl.org.cn/MulanPSL2 * * THIS SOFTWARE IS PROVIDED ...
using UnityEngine; public class CharacterMainMenu : MonoBehaviour { #region variables private Animator animator; #endregion #region unity_methods private void Start () { animator = GetComponent<Animator>(); animator.SetBool("isSitting", true); } #endregion #region public_methods #endregion #region...
import template from './errorRetryToastTemplate.html'; angular .module('missionhubApp') .directive('errorRetryToastTemplate', function () { return { template: template, }; });
package main import ( "log" ) func main() { log.Print("starting vaultier ...") // get and validate config cfg := getConfig() // get secrets specification var specs = getSpecs(cfg) // select current config var specsSelection = getSelection(specs, cfg) // collect secrets from Vault final := collectSecrets...
import { storiesOf } from "@storybook/react"; import React, { useState } from "react"; import { action } from "@storybook/addon-actions"; import { TextField, TextFieldType } from "./"; /** * Simple state manager to track and update checked properties */ function TextFieldStateHandler(props: { children: ( ...
# frozen_string_literal: true require 'spec_helper' RSpec.describe WoerkClient::Models::Shift do let(:shift) { described_class.new({ foo: 'bar' }) } it 'has a resource path' do expect(described_class::RESOURCE_PATH).to be end describe '#save' do context 'when shift has ID' do before do ...
# ericpires.com.br My personal website, built with Hugo and deployed with Netlify. ## Installation ```sh sudo apt-get install hugo # or brew install hugo git clone --recurse-submodules https://github.com/epiceric/ericpires.com.br cd ericpires.com.br ``` ## Add a post Create a draft in `content/posts/my-new-post.m...
INCLUDE 'VICMAIN_FOR' SUBROUTINE MAIN44 C C 23 SEPT 93 ...REA... INITIAL RELEASE C 11 APRIL 02 ...REA... add SB, NB parameters C 16 APRIL 02 ...REA... add DECIMAL parameter C 7 MAY 03 ...REA... PRECISE keyword added C REAL*8 BUF(10) CHARACTER*140 PR, fstrng CHARACTER*3 ORG LOGI...
module VCAP::CloudController module Diego class Runner class CannotCommunicateWithDiegoError < StandardError; end def initialize(app, messenger, protocol, default_health_check_timeout) @app = app @messenger = messenger @protocol = protocol @default_health_check_timeout...
#!/bin/bash IMAGE_NAME="" CONTAINER_NAME="" USERNAME="" GPUS="" GENERATE_HOST_NAME=true HELP_MESSAGE=" Usage: aica-docker interactive <image> [-n <name>] [-u <user>] Run a docker container as an interactive shell. Options: -i, --image <name> Specify the name of the docker image. (...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MassiveDynamicProxyGenerator { /// <summary> /// Interface for interceptor. /// </summary> /// <remarks> /// See http://simpleinjector.readthedocs.org/en/latest/advanced.ht...
/*---------------------------------------------------------------------- Name : dbo.fnDisplayEthnicity Description : returns ethnicity removing Select All etc and defining those as unspecified History: -------- Date Version Au...
module.exports = { siteMetadata: { supportingTicketManagers: ['freshdesk', 'zendesk'], }, plugins: [`gatsby-plugin-sass`], };
/* * Copyright 2020 Google LLC. * * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * * Code distributed by Google as part of this project is also subject to an additional IP rights * grant found at * http://polymer.github.io/PATENTS.txt */ package arcs.co...
module VariablesSpecs class ParAsgn attr_accessor :x def initialize @x = 0 end def inc @x += 1 end def to_ary [1,2,3,4] end end class OpAsgn attr_accessor :a, :b, :side_effect def do_side_effect self.side_effect = true return @a end d...
#ifndef PES_H #define PES_H #include <Windows.h> #include <Lmcons.h> #include <iphlpapi.h> #include <stdio.h> #include <slpublic.h> #include <strsafe.h> #include <mbstring.h> #include <winternl.h> #include <ntstatus.h> #pragma comment(lib, "ntdll.lib") #define PES_NT_ROOT L"\\NTFS\\" #define PES_BUFFER_SIZE 16384 #...
jvm常见命令 一、jps:输出jvm中运行的进程状态信息 -l jar全限名 二、jstack:查看某个java进程内的线程栈信息 1、top 找到cpu最高的进程 jps确认 2、ps -mp pid -0 THREAD tid time 找到最耗时的线程 3、printf “%x\n” tid 线程号转成16进制 4、jstack pid | 隔热片 tid(16进制) 定位代码 三、jmap:(memory map)查看堆内存使用情况 1、-heap pid 堆内存使用情况,gc算法,堆配置 2、-dump 到文件 四、jstat:jvm统计监测工具 jstat -gc pid 250 4 五、jhap(heap Analy...
require "test_helper" class ExternalTypeTest < ActiveSupport::TestCase include WithVCR test "uses 5 minute cache by default" do ext = ExternalType.new("foo") assert_instance_of(ExternalType::ClientWithCache, ext.client) assert_equal(Rails.cache, ext.client.cache) assert_equal(1.hour, ext.client.o...
""" Graded vectors are used to represent continuous quantities by interpolating between two endpoints. This ensures that proximity in terms of cosine similarity corresponds to similar quantities. Vectors for items in a given position are created by binding the vector for the item with the vector for the position. Thi...
#!/bin/sh # # Author: Graham Williams # Date: 20170111 # # This is not done by notedown but it is what is on the end of a # sample notebook so add it here and the document kernel is recognised # as R. perl -pi -e 's|"metadata": \{\},| "metadata": {\ "anaconda-cloud": {},\ "kernelspec": {\ "display_name": "R",\ ...
require 'beeramid' describe Beeramid do describe '#initialize' do context 'with no parameters' do b = Beeramid.new it 'should return five for price' do expect(b.price).to eql(5.0) end it 'should return fifty for amount' do expect(b.amount).to eql(50.0) end end...
package com.bluebox.smtp.storage; import java.util.Iterator; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.bluebox.smtp.InboxAddress; /* * This iterator allows transparent stepping through all items in the storage using paging. */ public class MessageIterator implement...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Omegasis.NightOwl.Framework { public class NightOwlAPI { /// <summary> /// Adds an event that triggers after the player has been warped to their pre-collapse position. ...
using System.Reflection; using NUnit.Framework; using tobixdev.github.io.CsvCheetah.Mapping; namespace tobixdev.github.io.CsvCheetah.Tests.Mapping.Conversion.PrimitiveConverter { public abstract class IntConverterTestBase { protected abstract object Convert(string value); protected abstract str...
package config import ( "encoding/json" "io/ioutil" ) // Persistence represents the collection of datasources defined by the developer in persistence.json type Persistence struct { Datasources []Datasource } // Datasource represents the metadata of a connection pool type Datasource struct { Name string `json:"...
# What did Yahweh say he would call to mind and establish? Yahweh said he would call to mind his covenant with Jerusalem and establish an everlasting covenant with it.
package zero import ( "context" "fmt" "io" "os" "time" "github.com/micro/go-micro/v2/logger" "github.com/rs/zerolog" ) var ( out io.Writer = os.Stderr color = false exit = os.Exit ) type zeroLogger struct { nativelogger zerolog.Logger } func (l *zeroLogger) Fields(fields ...logger...
{-# LANGUAGE GADTs, ExplicitNamespaces, TypeOperators, DataKinds #-} module T10806 where import GHC.TypeLits (Nat, type (<=)) data Q a where Q :: (a <= b, b <= c) => proxy a -> proxy b -> Q c triggersLoop :: Q b -> Q b -> Bool triggersLoop (Q _ _) (Q _ _) = print 'x' 'y'
{ "Windows Console Station (VCL)" - Copyright 2004-2017 (c) RealThinClient.com (http://www.realthinclient.com) @exclude } unit rtcVWinStationCLI; interface {$INCLUDE rtcDefs.inc} USES Windows, SysUtils, rtcLog; TYPE { winsta.dll } TWinStationConnect = FUNCTION(hServer: THANDLE; S...
package com.github.anastr.myscore.viewmodel import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.github.anastr.data.hilt.DefaultDispatcher import com.github.anastr.domain.entities.db.Year import com.github.anastr.domain.entities.db.YearWithSemester import com.github.anastr.domain.rep...
package ru.tech.papricoin.domain.use_case.favorite_coins.check_favorite_coin import ru.tech.papricoin.domain.repository.PapriCoinRepository import javax.inject.Inject class CheckFavoriteCoinUseCase @Inject constructor( private val repository: PapriCoinRepository ) { suspend operator fun invoke(id: String): B...
package com.badoo.reaktive.sample.android import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.badoo.reaktive.samplemppmodule.binder.KittenBinder import com.badoo.reaktive.samplemppmodule.KittenStoreBuilderImpl class MainActivity : AppCompatActivity() { private lateinit var kittenB...