text
stringlengths
27
775k
extern crate adventofcode; use adventofcode::{input_reader, Part}; use std::env; use std::io::BufRead; fn main() { let part = env::args() .nth(1) .expect("missing part") .parse::<Part>() .expect("invalid part"); let input_file = env::args().nth(2).unwrap_or("input/2017/day-5.tx...
//! Definitions for all of the different types. pub use self::func::FunctionType; pub use self::integer::IntegerType; pub use self::composite::*; pub mod func; pub mod integer; pub mod composite; use SafeWrapper; use ir::Context; use sys; use std::marker; /// An LLVM type. pub struct Type<'ctx> { inner: sys::T...
import 'dart:math'; import 'package:flutter/material.dart'; Color genRandomColor() { int baseColor = 0xff000000; int tempRandomNum = 0xffffff - 0x000000; int randomNum = baseColor + Random().nextInt(tempRandomNum); return Color(randomNum); } double genRandomOneOrNegative() { if (Random().nextBool()) { ...
<?php /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | ...
import java.util.*; public class Ejercicio3 { public static void main(String[] args) { //int temperatura; System.out.println("introducir mes en numero: "); Scanner teclado=new Scanner(System.in); int numero=teclado.nextInt(); teclado.close(); switch(numero){ case 1: ...
uses OpenCLABC; begin Writeln(CombineSyncQueue(a->a.JoinToString, nil as object, nil as object)); Writeln(CombineAsyncQueue(a->a.JoinToString, nil as object, nil as object)); end.
package io.github.kavahub.learnjava.concurrent; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupit...
<?php namespace App\Controllers\sales; use App\Controllers\BaseController; use App\Models\CustomModel; class Sales extends BaseController{ public function index(){ $data = [ 'meta-title' => '', 'title' => 'Sales', ]; $data['name'] = $this->request->getGet('name'); $data...
<?php namespace app\controllers; use GraphQL\Examples\Blog\Types; use GraphQL\Type\Definition\ResolveInfo; use Yii; use yii\web\Controller; class BaseController extends Controller { // public function __construct() // { // $config = [ // 'name' => 'BaseController', // 'descriptio...
#include "listnd.h" #include "util.h" int main() { std::shared_ptr<item> items(new item[10],std::default_delete<item>()); items.get()[0]=item(1,10); items.get()[1]=item(2,9); items.get()[2]=item(3,8); items.get()[3]=item(4,7); items.get()[4]=item(5,6); items.get()...
package hotel import ( "fmt" "github.com/gin-gonic/gin" ) type Controllers struct { Services Services } /* .d8888b. 8888888b. 8888888888 d8888 88888888888 8888888888 d88P Y88b 888 Y88b 888 d88888 888 888 888 888 888 888 888 d88P888 888 888 888 88...
package io.laminext.fetch package upickle import _root_.upickle.default._ import com.raquo.laminar.api.L._ import org.scalajs.dom.experimental.Response import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.scalajs.js.Thenable.Implicits._ import scala.util.Failure import...
#!/bin/bash # Use the requirejs optimizer r.js to optimise js files # By default it will create a sibling build directory called 'csl' # or it uses a command line argument if present if [ "$1" == "" ] then BUILD_DIR="../bethecamera.com" else BUILD_DIR="$1" fi echo "deploying to build dir $BUILD_DIR" GIT_COMMIT=$...
var path = require('path'); var fsx = require('fs-extra'); var Filesystem = require('../'); describe('machinepack-fs :: rmrf-sync', function() { before(function() { fsx.copySync(path.resolve(__dirname, 'fixtures' ,'files'), path.resolve(__dirname, 'fixtures', 'sandbox')); }); after(function() { fsx.rem...
# functions Pure functions deployed to AWS A content-first approach for the very challenging process of conversation (not chat) ## Getting Started ## LICENSE MIT //https://medium.com/@tjholowaychuk/dos-and-don-ts-of-aws-lambda-7dfcab7ad115 // coupon apex up //medium-16B55817D719
'use strict'; goog.require('Blockly.Arduino'); Blockly.Arduino.oxocard_audio_wait_for_tone = function(block) { return 'oxocard.audio->setToneBlocking(true);\n'; }; Blockly.Arduino.oxocard_audio_wait_not_for_tone = function(block) { return 'oxocard.audio->setToneBlocking(false);\n'; }; Blockly.Arduino.oxocard_aud...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using JSON; namespace CommonClass { public abstract class MatterBasic:IJsonAble { public int user_id=0; public string matter_desc=""; public Json matter_addion_info=new Js...
import { AxiosInstance } from "axios"; export abstract class BaseApi { protected axiosInstance: AxiosInstance; constructor(axiosInstance: AxiosInstance) { this.axiosInstance = axiosInstance; } }
package com.guet.flexbox.handshake.lan import java.net.Inet4Address import java.net.InetAddress import java.net.NetworkInterface import java.util.* class MacOsLANAddressProvider : LANAddressProvider { private val interfaceName = "Netif" override fun get(): InetAddress? { var net: Process? = null ...
<?php namespace App\Http\Services\Video; use App\Http\Controllers\Controller; use App\Http\Resources\Screencast\VideoResource; use App\Http\Services\Service; use App\Models\Screencast\Playlist; use App\Models\Screencast\Video; use Exception; class VideoQueries extends Service { static $rules = [ 'title' ...
<?php namespace app\modules\admin\modules\brand\controllers; use yii\web\Controller; use app\modules\admin\modules\brand\models\BrandForm; use yii\filters\AccessControl; use Yii; class DefaultController extends Controller { //правила доступа (действия 'update', 'index' доступны только после входа в учётную запис...
import { GitProgressParser } from './git' const steps = [{ title: 'Checking out files', weight: 1 }] /** * A class that parses output from `git checkout --progress` and provides * structured progress events. */ export class CheckoutProgressParser extends GitProgressParser { public constructor() { super(steps...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Constants { public static string MCS_COMPUTERVISIONKEY = "---------Computer-Vision-Key---------"; }
#!/bin/sh -eux file="OpenJDK8U-jdk_x64_linux_hotspot_8u212b04.tar.gz" download /opt/java/openjdk/jdk8u212-b04 \ "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u212-b04/$file" \ "09f6ccbfd8a86e52665b56751403fd4e2513ad071e2b3f36bab73f86273d1ead" file="OpenJDK11U-jdk_x64_linux_hotspot_11.0....
<?php namespace App\Http\Controllers; // use Illuminate\Support\Facades\Storage; use App\Http\Requests\StoreRoomPost; use App\Models\Room; use App\Models\Service; use App\Models\Gender; use App\Models\Characteristics; use App\Models\Option; use App\Models\RoomType; use Illuminate\Http\Request; use Illuminate\Suppor...
using System.Collections; using UnityEngine; public class RewindBullet : MonoBehaviour { public float speed = 20f; public Rigidbody2D rb; public CircleCollider2D cC; public SpriteMask rewindPortal; private bool madeportal = false; // Start is called before the first frame updat...
class EstimatesController < ApplicationController def index @custom_matchup = Estimate.custom_matchup(["Sanders", "Clinton", "Biden"]) #these need to be made dynamically @sanders_array = Estimate.make_chart_array("Sanders", @custom_matchup) @clinton_array = Estimate.make_chart_array("Clinton", @cust...
#!/bin/bash echo "flake8 test started" flake8 app --exclude="settings.py, migrations" if [ $? -ne 0 ]; then echo "flake8 tests failed" exit 1 fi echo "flake8 test successfully passed"
package io.dac.mara.lang.variables import io.dac.mara.core._ import io.dac.mara.phases.{Factory, FactoryOp, Node} trait FactoryVariable extends FactoryOp with VariableAlg[Factory] { case class ValDeclare(name: String, typex: Option[String]) extends Node { override def exec[E: Empty](alg: ExprAlg[E]): E = alg m...
using PBApplication.Events.Publishing.Abstractions; using PBApplication.Services.Abstractions; using PBCommon.Serialization; namespace PBApplication.Events.ServiceObservers { internal sealed class CUDServiceObserver : ServiceObserver<IEventfulCUDService> { public CUDServiceObserver(IEventPublisher publisher) : ba...
package org.higherstate.jameson.parsers import reflect.{ClassTag, classTag} import org.higherstate.jameson.Path import org.higherstate.jameson.tokenizers._ import org.higherstate.jameson.failures._ case class AnyRefParser[T]()(implicit typeTag:ClassTag[T]) extends Parser[T] { def parse(tokenizer:Tokenizer, path: Pa...
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ //! Utilities for parsing information from headers use std::borrow::Cow; use std::convert::TryFrom; use std::error::Error; use std::fmt; use std::fmt::{Display, Formatter}; use std::str::FromStr; use ...
const expect = require('chai').expect const knex = require('../../../knex').stagingSchema const cleanTables = require('../../../app/wmt-etl/clean-tables') const config = require('../../../etl-config') const Promise = require('bluebird').Promise describe('wmt-etl/test-clean-tables', function () { it('should delete ...
(in-package :extensions) (require :java) (export '(*gui-backend* init-gui make-dialog-prompt-stream)) (defvar *gui-backend* :swing) (defun init-gui () "Dummy function used to autoload this file" t) (defun make-dialog-prompt-stream () (%make-dialog-prompt-stream *gui-backend*)) (defgeneric %make-dialog-prom...
#!/usr/bin/env perl use lib qw{ ./t/lib }; use Messenger; Messenger->runtests;
//@ Auto-Generated indexing files for avg.engine export * from './avg-native-fs'; export * from './avg-native-path'; export * from './avg-native-util';
<?php /** * Copyright 2012 do ICMBio * Este arquivo é parte do programa SISICMBio * O SISICMBio é um software livre; você pode redistribuí-lo e/ou modificá-lo dentro * dos termos da Licença Pública Geral GNU como publicada pela Fundação do Software Livre * (FSF); na versão 2 da Licença. * Este programa é distribu...
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @dart = 2.6 import 'package:ui/ui.dart'; import 'package:test/test.dart'; void main() { test('rect accessors', () { const Rect r = Rect.fromLTRB...
--- title: COLOUR TRIAD --- `COLOUR TRIAD` undefined` undefined
use crate::SpawnError; /// A value that spawns futures of a specific type. /// /// The trait is generic over `T`: the type of future that can be spawened. This /// is useful for implementing an executor that is only able to spawn a specific /// type of future. /// /// The [`spawn`] function is used to submit the futur...
const Rx = require("rxjs/Rx"); let stream$ = Rx.Observable.create(observer => { observer.next(1); observer.error("err"); }) .retry(3); // emits 1 1 1 1 err stream$ .subscribe(data => console.log(data));
require "headline_sources/scraper" require "headline_sources/fetchers/gawker_fetcher" module HeadlineSources class DefamerFetcher < RSSFetcher def feed_url "http://defamer.gawker.com/rss" end end end
package chapter4_4 import "fmt" // 结构体比较 type address struct { hostname string port int } func StructCompare() { p := Point{1, 2} q := Point{2, 1} fmt.Println(p.X == q.X && p.Y == q.Y) // "false" fmt.Println(p == q) // "false" // 可比较的结构体类型和其他可比较的类型一样,可以用于map的key类型。 hits := make(map[ad...
require 'ncaa_scrape' RSpec.describe NCAABasketball do before do @scrape = NCAABasketball.new end describe 'attributes' do it 'is initialized with data from NCAA.com' do expect(NCAABasketball.new.instance_variable_get('@division_one_data')).to be_a Hash expect(NCAABasketball.new.instance_var...
namespace Main.Logger { public class NullProcessLogger : IProcessLogger { public void ShowProcessMessage(string message, params object[] args) { //nothing to do } public void ShowProcessMessage(string message) { //nothing to do ...
var Key = { pressed: [], LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, ENTER: 13, SPACE: 32, PAGE_UP: 33, PAGE_DOWN: 34, W: 87, A: 65, S: 83, D: 68, isDown: function(keyCode) { return this.pressed[keyCode]; }, reset: function(keyCode) { this.pressed[keyCode] = false; }, onKeydown: function(event) { t...
#!/bin/sh set -e test ! -z "$DEBUG" && set -x dc_ip_address() { _domain="$1" dig A +short $(dig -t SRV _ldap._tcp.dc._msdcs."$_domain" +short | cut -d' ' -f4) | \ head -n 1 } main() { _username="$1" [ -z "$_username" ] && echo "Username is required" && exit 100 _domain="$2" [ -z "$_do...
# twitch-recognition youtube-dl + SpeechRecognition get twitch audio stream -> split into segments -> log speech recognition result ## Usage python main.py -c <username> [options] ### options -l, --language SpeechRecognition language code -e, --engine SpeechRecognition...
at(100033914,302303673). at(100033914,302304841). at(100845915,301204643). at(100845915,301204965). at(101092370,300485135). at(101092370,300486321). at(101218209,300198526). at(101218209,300199039). at(104628098,300953896). at(104628367,300954437). at(104629320,301353869). at(104630470,301137376). at(104630470,3011382...
package hydro.common trait I18n { def apply(key: String, args: Any*): String }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?> ERROR - 2019-05-22 12:04:39 --> 404 Page Not Found: Robotstxt/index ERROR - 2019-05-22 18:37:25 --> 404 Page Not Found: Apple-touch-icon-120x120-precomposedpng/index ERROR - 2019-05-22 18:37:25 --> 404 Page Not Found: Apple-touch-icon-120x120...
require "test_helper" class LogTicketTest < ActiveSupport::TestCase setup do @log_ticket = LogTicket.create!(directory: "test", key: "foo", status: "pending") end should "not allow duplicate directory and key" do assert_raise ActiveRecord::RecordNotUnique do LogTicket.create!(directory: "test", ke...
import 'package:flutter/material.dart'; import 'package:mymgs/data/clubs.dart'; import 'package:mymgs/data/setup.dart'; import 'package:mymgs/data_classes/club.dart'; import 'package:mymgs/screens/main_navigation.dart'; import 'package:mymgs/widgets/clubs/club_card.dart'; import 'package:mymgs/widgets/dashboard_cards/d...
#include "BEKeybinds.hpp" #include "../AutoSave/autoSave.hpp" #include "../../hooks/EditorUI.hpp" #include "../GroupIDFilter/AdvancedFilterLayer.hpp" #include "../GridSize/gridButton.hpp" #include "../../hooks/EditorPauseLayer.hpp" #include "../RotateSaws/rotateSaws.hpp" #include "../VisibilityTab/loadVisibilityTab.hpp...
#!/bin/bash mpirun -n 4 --tag-output python examples/cosmo.py |& tee $1
# # Copyright 2021 Ocean Protocol Foundation # SPDX-License-Identifier: Apache-2.0 # import pytest from ocean_lib.assets.utils import ( add_publisher_trusted_algorithm, create_publisher_trusted_algorithms, generate_trusted_algo_dict, remove_publisher_trusted_algorithm, ) from tests.resources.ddo_helper...
import gzip import shutil import sys #with gzip.open(sys.argv[1], 'rt') as f_gz: iline = 0 for line in gzip.open(sys.argv[1], 'rt'): iline += 1 if iline > 10: break print("-->" + line)
# 1단계 - 화면 응답 개선하기 1. 성능 개선 결과를 공유해주세요. - [X] Smoke, Load, Stress 테스트 결과 요청시간 50ms 이하로 개선 - [X] 개선전 Smoke 테스트 결과 [바로가기](../k6/before/smoke_test_result.md) - [X] 개선전 Load 테스트 결과 [바로가기](../k6/before/load_test_result.md) - [X] 개선전 Stress 테스트 결과 [바로가기](../k6/before/stress_test_result.md) --- - [X] 개선후 Smoke 테스트 결과 [...
import { BrokeragePolicy } from './BrokeragePolicy'; import { BrokerageRule } from './BrokerageRule'; export class PurchaseBrokeragePolicy implements BrokeragePolicy { rule: BrokerageRule[] = []; getRules: BrokerageRule[] = []; constructor() { this.rule.push( new BrokerageRule(50000000, 0.6, 250000), new B...
DROP table score_array; RENAME TABLE score_array_part TO score_array; DELIMITER / DROP TRIGGER IF EXISTS partitionScoreArray / CREATE TRIGGER partitionScoreArray BEFORE INSERT ON score_array FOR EACH ROW BEGIN DECLARE v_cv INT DEFAULT 0; DECLARE v_type INT DEFAULT null; IF (NEW.experiment_id IS NOT NULL) TH...
<?php use App\Http\Controllers\CommentsController; use App\Http\Controllers\PostController; use App\Http\Controllers\RegisterController; use App\Http\Controllers\LoginController; use App\Http\Controllers\UserController; use Illuminate\Support\Facades\Route; use App\Models\Post; use App\Models\Comment; /* |-----------...
def new @<%= singular_name %> = <%= class_name %>.new end
n, k = gets.split.collect{|i| i.to_i} if n/2 > k puts -1 elsif n == 1 if k > 0 puts -1 else puts 1 end else ans = Array.new(n) ans[0] = k-n/2+1 ans[1] = 2*ans[0] for i in 2...n ans[i] = ans[i-1]+1 end puts ans.join(' ') end
#!/bin/bash cello_dir=$1 # reading configure file curr_dir=`dirname $0` source ${curr_dir}/read_conf.sh read_conf "$2" read_conf "$3" curr_dir=`dirname $0` #${R_PATH}/Rscript -e "source('${curr_dir}/src/launch_viscello.R'); cello_local('$cello_dir')" ${R_PATH}/Rscript -e "library(VisCello.atac); cello('$cello_d...
<?php namespace View\Pages; /** * Publishing Tool */ class PubTool { /** * Label for the tool (e.g. PAGES, COMPONENTS, GLOSSARY) * @var string */ public $label; /** * Link to dashboard data for this tool * @var string */ public $link; }
package kr.owens.upa.service import android.app.Notification import android.app.NotificationChannel import android.app.NotificationManager import android.app.PendingIntent import android.app.PendingIntent.FLAG_UPDATE_CURRENT import android.content.Context import android.content.Intent import androidx.core.app.Notifica...
unit DelphiAMQP.Frames.BasicFrame; interface uses System.Rtti, DelphiAMQP.FrameIntf, System.Classes, System.SysUtils, DelphiAMQP.Frames.Header, DelphiAMQP.AMQPValue; type TAMQPBasicFrame = class(TPersistent) private procedure FillFrameInfo(); procedure BuildParams(); procedure FreeParams(); pro...
package ore.models.project import scala.language.higherKinds import ore.data.Color import ore.data.Color._ import ore.db.access.QueryView import ore.db.impl.DefaultModelCompanion import ore.db.impl.OrePostgresDriver.api._ import ore.db.impl.common.Named import ore.db.impl.schema.{ChannelTable, VersionTable} import or...
require 'rails_helper' require './spec/common/model_helpers' RSpec.describe 'Articles Index - Main Page', type: :feature do include ModelHelpers let!(:user) { User.create user_data } let!(:category) { Category.create category_data } let!(:article1) { user.articles.create article_data.merge(category_ids: catego...
package com.middleware.middleware.model.edi.po; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlElement; @XmlRootElement(name = "PO") @XmlAccessorType(XmlAcces...
set -e if [ "$BRANCH" = "master" ] then yarn build:production else yarn build:dev fi
require 'spec_helper' describe 'license categories' do families.each do |family| context "the #{family} family" do family_licenses = licenses.select { |l| l['family'] == family } primary = family_licenses.select { |l| l['variant'] == false } variants = family_licenses.select { |l| l['variant']...
class Bts class Item attr_reader :element def initialize element @element = element rank; link; title; magnet_link; added; size; files; popularity end def rank @rank ||= element.find('strong').text.to_i end def link @link ||= element.all('a')[0].native.attributes['h...
#include "triangle_mesh.h" #include <cstring> namespace helios { Triangle::Triangle(const ponos::Transform *o2w, const ponos::Transform *w2o, bool ro, const TriangleMesh *m, uint32 n) : Shape(o2w, w2o, ro) { mesh.reset(m); v = &mesh->indices[3 * n]; } ponos::BBox Triangle::objectBound() cons...
using JetBrains.ProjectModel; using JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.Modules; using JetBrains.ReSharper.Plugins.Yaml.ProjectModel; using JetBrains.ReSharper.Psi; namespace JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.Caches { public interface IProjectSettingsAssetHandler { bool IsApplicable(IPs...
import React from 'react'; import { BrowserRouter, Routes, Route } from 'react-router-dom'; import Blog from './views/Blog' import BlogsPage from './views/BlogsPage'; import NavBar from './components/NavBar'; const App = () => { return ( <BrowserRouter> <NavBar></NavBar> <Routes> <Route pat...
#![cfg(test)] use agpu::{u8n, VertexLayout, VertexLayoutInstance}; #[derive(VertexLayout)] struct MixedTypes { _position: [f32; 3], _color: [u8n; 4], _normal: [f32; 4], _some_raw_data: [u16; 4], } #[test] fn vertex_layout_mixed_types() { // Start at shader location 3 let layout = MixedTypes::...
{$mode delphi} {$modeswitch objectivec1} {$modeswitch cvar} unit DefinedClassesWatchKit; interface type WKAccessibilityImageRegion = objcclass external; WKInterfaceButton = objcclass external; WKInterfaceController = objcclass external; WKInterfaceDate = objcclass external; WKInterfaceDevice = objcclass ext...
# frozen_string_literal: true class Authenticator def initialize(login, password, hostname) @login = login @password = password @hostname = hostname @server = Server.find_by(hostname: hostname) @user = find_user end def valid_credentials? user_active? && valid_password? && not_connected_...
using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "ColorTable", menuName = "ScriptableObjects/ColorTable", order = 4)] public class ColorTable : ScriptableObject { public ColorInfo FindColorWithName(string name) { for (int i = 0; i < colorInfoLi...
# Who using saika - [kms-docs/starter](https://kms-docs.now.sh) 🍄 KMS guide's documentation. - [evillt/vercel-toast](https://toast.evila.me) 💬 A lightweight toast. - Add yours? PRs welcome!
package org.voovan.docker.message.node; import org.voovan.tools.json.JSON; import org.voovan.tools.log.Logger; import java.util.HashMap; import java.util.Map; /** * * @author helyho * <p> * DockerFly Framework. * WebSite: https://git.oschina.net/helyho/JDocker * Licence: Apache v2 License */ public class Node...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> </head> <link rel="stylesheet" href="{{asset('assets/css/bootstrap.min.css')}}"> <body> <div class="navbar"> <div class="navbar-inner"> <a class="brand" href="#">Title</a> <ul class="nav"> ...
package org.d3ifcool.finpro.core.interfaces.lists; import org.d3ifcool.finpro.core.models.Bimbingan; import java.util.List; /** * Created by Faisal Amir * FrogoBox Inc License * ========================================= * Finpro * Copyright (C) 23/06/2019. * All rights reserved * -----------------------------...
using System.Xml.Serialization; using VersionOne.ServiceHost.ConfigurationTool.Validation; namespace VersionOne.ServiceHost.ConfigurationTool.Entities { public class QCPriorityMapping { private Mapping qualityCenterPriority; public const string VersionOnePriorityIdProperty = "VersionOnePriorityId"...
<!-- ajax --> <script> function ajax_binder(data){ if(data.type == "user_ajax"){ // タグに情報を付加 $('#id').text(data['id']); $('#username').text(data['name']); $('#created_at').text(data['created_at']); $('#updated_at').text(data['updated_at']); } } </script>
package committee import "time" const ( // how often timer events are triggered in commiitee // each second timer tick is sent to consensus, another to state manager, so timer events // in objects are triggered each 200 milliseconds TimerTickPeriod = 100 * time.Millisecond // if leader actions does not reset de...
require 'spec_helper' require 'ddtrace' RSpec.describe Datadog::Contrib::Configuration::Resolver do subject(:resolver) { described_class.new } describe '#resolve' do subject(:resolve) { resolver.resolve(name) } let(:name) { double('name') } it { is_expected.to be name } end end
import { reflectY } from './reflect-y.js'; describe('Reflect point y coordinate', () => { it('returns proper point cordinates', () => { const p = reflectY( { x: -3, y: 5.5 } ); expect(p.x).to.equal(-3); expect(p.y).to.equal(-5.5); }); it('reflects over (10,10)', () => { const { x, y } = reflectY({ x...
# Project This repository contains the specifications and the reference implementation for EMP, the Extensible Messaging Protocol. # Specifications Protocol specifications are available [in the `specifications` directory](https://github.com/exograd/erl-emp/blob/master/specifications/emp.md). # Documentation A handboo...
// // Copyright 2021 Ardalan Amini // // 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...
/* * This code is open-source, MIT license. See the LICENSE file */ part of view; typedef void Reset(); /** * A bunch of buttons to press to step/unstep the simulation */ class ControlBar { int speed; Duration msPerStep = new Duration(milliseconds:80); final SimulationPresentation presentation; fi...
library(glue) library(rvest) library(dplyr) library(readr) library(rtweet) library(stringr) library(here) df <- read_csv("nuforc/march_april_2022.csv") # read archive of cases to prevent double-posting cases <- read_csv(here::here("nuforc", "data_raw", "archive.csv")) # filter out cases that were already tweeted df ...
require 'rails' # Register as a Rails engine # in order to hook into asset pipeline module SecureEscrow class Engine < ::Rails::Engine initializer :setup_escrow do |app| # Mix view helpers in through ActionController ActionController::Base.helper SecureEscrow::Railtie::ActionViewHelper # Mix r...
import {seq_num_primitive} from '../src/js/seq_num_primitive.js'; import {seq_num} from '../src/js/seq_num.js'; import {seq} from '../src/js/seq.js'; import {seq_date} from '../src/js/seq_date.js'; import {standardize_date_units} from '../src/js/standardize_date_units.js'; import {calculate_date_by} from '../src/js/cal...
require 'rails_helper' RSpec.describe Review, type: :model do describe 'associations' do it { should belong_to(:customer).class_name('Customer') } it { should belong_to(:business).class_name('Business') } end describe 'validations' do it { should validate_presence_of(:customer_id) } it { should validate_pr...
#include "referencing.hpp" #include "../util.hxx" using namespace svgdom; std::string referencing::get_local_id_from_iri() const { return iri_to_local_id(this->iri); }
#!/bin/sh -ex setup-xorg-base \ xorg-server xf86-video-vesa xf86-input-evdev xf86-input-mouse \ xf86-input-keyboard udev xinit if [ -z "$DWM" ]; then DWM=dwm; fi if [ -z "$ST" ]; then ST=st; fi if [ -z "$DMENU" ]; then DMENU=dmenu; fi if [ -z $"XRANDR" ]; then XRANDR=xrandr; fi if [ -z $"XRDP" ]; then XRDP=xrdp; fi...
const electron=require('electron'); const ipcRenderer=electron.ipcRenderer; //catching cpustuff ipcRenderer.on('CPU_INFO',(event,cpu_data) =>{ console.log(cpu_data); document.getElementById('infoValueCPUMN').innerHTML=cpu_data[0]; document.getElementById('infoValueCPUMO').innerHTML=cpu_data[1]; document.getEle...
from forked.cli import main def test_main(): """Worst test ever.""" main([])