text
stringlengths
27
775k
#include <iostream> #include <cmath> using namespace std; int main() { cout.precision(17); double pi= 16*atan(1.0/5.0) - 4*atan(1.0/239.0); cout << "The value of pi according to Machin's formula is: " << pi; return 0; }
using System; using System.Collections.Generic; //na ovaj nacin deklarisemo korisnicki interfejs interface IExample<T> { //deklarisemo neku metodu koju taj interfejs moze da implementira T getValue(T val); } //deklarisemo genericku klasu koja implementira nas genericki interfejs class NewClass<T> : IExample<...
<?php namespace Tests\Feature; use Tests\TestCase; use App\Models\Brand; use App\Models\Category; use App\Models\Transaction; use Illuminate\Foundation\Testing\RefreshDatabase; class TotalCashTest extends TestCase { use RefreshDatabase; /** @test */ public function it_returns_correct_data() { ...
CREATE TABLE `accidents` ( `accidents_id` int(11) NOT NULL AUTO_INCREMENT, `registration` varchar(20) NOT NULL, `date` timestamp NOT NULL, `url` varchar(255) DEFAULT NULL, `country` varchar(255) DEFAULT NULL, `place` varchar(255) DEFAULT NULL, `title` text, `fatalities` int(11), `lat...
# lab-33-async Remote API: Lab Async with Star Wars API ### Author: Chloie Parsons ## Links and Resources - [Lab Async: Star Wars Person/People](https://codesandbox.io/s/lab-async-ws3f5) ## Modules - Index.js (Renders the app) - App.js (Renders a form with Star Wars characters and traits) - Actions.js (Redux actio...
package org.dhis2.usescases.settings.models data class ReservedValueSettingsViewModel( val numberOfReservedValuesToDownload: Int, val canBeEdited: Boolean )
using System; namespace Server { public class Program { public static void Main(String[] args) => ServerSocket.StartServer(); } }
<!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- Sidebar user panel --> <div class="user-panel"> <div class="pull-left image"> <img src="{{asset('admin/dist/img/ovo.j...
extension IterableEx<E> on Iterable<E> { Iterable<T> mapIndex<T>(T Function(E e, int i, bool isLast) mapFunction) => toList().asMap().entries.map((entry) => mapFunction(entry.value, entry.key, entry.key == length - 1)); /// Safely access `.first` and `.last` from an iterable without throwing an err...
### Here is my blog [xuyafan](http://xuyafan.top) --- Thank [qiubaiying](https://github.com/qiubaiying/qiubaiying.github.io) for his guide。 ### License 遵循 MIT 许可证。有关详细,请参阅 [LICENSE](https://github.com/xuyafan/xuyafan.github.io/blob/master/LICENSE)。
create 't_user_info','base_info','extra_info' put 't_user_info','001','base_info:username','gugu1' put 't_user_info','001','base_info:sex','female' put 't_user_info','001','extra_info:career','it' put 't_user_info','001','extra_info:addr','shanghai' scan 't_user_info' delete 't_user_info','001','extra_info:addr' -- 删除一...
=[G/Agt-License/Outline/_Misc/_Relate/_How/_Deal/0.md] Support.=[G/Agt-License/Outline/-Software/Support/0.md] Comp.=[G/Agt-License/Outline/-Software/Comp/0.md] Remedy.=[G/Agt-License/Outline/-Software/Remedy/0.md] Rep.Ti=Representations Rep.=[G/Agt-License/Outline/Z/Mutual-Licensor-Licensee/0.md]
using System.Collections; using UnityEngine; namespace BeatSaverVoting { public class CoroutineWithData { public Coroutine Coroutine { get; } public object Result; private readonly IEnumerator _target; public CoroutineWithData(MonoBehaviour owner, IEnumerator target) { ...
/// <summary> /// RandomHelper v1.0.0 by Christian Chomiak, christianchomiak@gmail.com /// /// Useful functions for random labors. /// </summary> using UnityEngine; namespace Unitilities { public static class RandomHelper { #region int /// <summary> /// Returns 1 or -1 at random. ...
package com.maoface.ueditor.entity; import java.io.Serializable; import java.util.List; /** * @author zhuxuchao * @date 2020-04-15 21:19 */ public class ListFileResponse extends BaseResponse { private int start; private int total; private List<FileItem> list; public int getStart() { retur...
package com.raha.pravin import cats.effect._ import com.raha.pravin.hello.Greeter import higherkindness.mu.rpc.server._ object Server extends IOApp { implicit val greeter: Greeter[IO] = new HappyGreeter[IO] def run(args: List[String]): IO[ExitCode] = for { serviceDef <- Greeter.bindService[IO] server ...
import { formations } from 'src/formation'; import { MarkdownPostProcessorContext, Plugin } from 'obsidian'; import { ParsedCode } from './ts/interfaces'; import { buildSvg } from './svg-builder'; export default class LineupBuilderPlugin extends Plugin { onInit() { } async onload() { this.r...
# frozen_string_literal: true module Popro class Info attr_accessor :total, :current def initialize(total: nil, current: nil) @total = total @current = current || 0 @started = false end def running? @started end def start @started = true self end ...
import math class zone: def __init__(self, pos, ring): self.pos = pos # The position around the circle. 0 - 15 self.ring = ring # The inner distance of the circle. 0 - city.radius self.area = math.pi * (2 * self.ring + 1) / 16 class city: def __init__(self, radius, population): ...
The smell of the ocean water. The sounds of the lapping waves. You have nothing to fear; it's unsinkable!
package com.twitter.web.dashboard.views import com.twitter.finatra.response.Mustache @Mustache("user") case class UserView( firstName: String, lastName: String)
-- SQLite INSERT INTO DataPackages (UID, Name, Hash, SubmissionUser, CreatorUid, Size) VALUES ('a','b','c','d','e','f');
@extends('infobase') @section('info_content') <?php $games = DB::select('select * from games'); foreach($games as $game){ echo "<div class='li-equiv'>"; echo "<h1>" . $game->name . "</h1>" . $game->min_length . " - " . $game->max_length . " minutes<br>" . $game->min_players . ...
#!/bin/bash -l set -e # Use local cache proxy if it can be reached, else nothing. eval $(detect-proxy enable) log::m-info "Cloning the project repo ..." cd /tmp #git clone --branch $SEMS_VERSION --single-branch https://github.com/yeti-switch/sems.git #git clone https://github.com/yeti-switch/yeti-management.git #git...
package com.imapi.watermark.service; import java.io.Serializable; /** * Completion status class, which is serialized and send to client on poll requests. */ public class Status implements Serializable { public static final Status NOT_FOUND = new Status("Wrong ticket"); public static final Status WAITING = ...
using System; using GitHubHook.Helpers; using GitHubHook.Models; namespace GitHubHook.Events { public class Release : SnakeCaseNamedObject { public string UploadUrl { get; set; } public string HtmlUrl { get; set; } public long Id { get; set; } public string TagName { get; set; ...
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace StudentEnrollment.Models { public class Class { public int ID { get; set; } [Required] public ClassName ClassName { get; set; } ...
module BufferedArrays import Base: size, IndexStyle, getindex, setindex using ..TiledArrays export BufferedArray struct BufferedArray{T, N, A} <: AbstractTiledArray{T, N} parent::A buffer::Array{T, N} tile::Ref{Tile{NTuple{N, Int}}} function BufferedArray{T, N, A}(parent, buffer, tile) where {T, N, ...
require_relative 'kafka_helpers' # Kafka Installation # https://kafka.apache.org/documentation # # Developed using Kafka 0.11.x documentation # namespace :kafka do namespace :service do # Set or update the system ENV for KAFKA_HOME # The kafka_bin.sh script should install into the KAFKA_HOME directory; #...
package org.cloudio.morpheus.test import org.junit.Test import org.junit.Assert._ import org.morpheus._ import org.morpheus.Morpheus._ import org.cloudio.morpheus.test.samples._ import scala.util.{Success, Try} /** * Created by zslajchrt on 21/07/15. */ class MorphIteratorTest { @Test def testIterator(): Un...
package pt.uminho.haslab.smpc.helpers; import pt.uminho.haslab.smpc.exceptions.InvalidSecretValue; import java.math.BigInteger; public class RangeChecker { public static void check(int nbits, BigInteger value) throws InvalidSecretValue { BigInteger max = BigInteger.valueOf(2).pow(nbits) ...
package calc; public interface Operation { void addOperand(int operand); int getResult(); boolean isCompleted(); }
using System; using System.IO; using System.Text; using System.Linq; using UnityEngine; using UnityEngine.Rendering; using UnityEditor; using Kawashirov; using Kawashirov.ShaderBaking; using Kawashirov.FLT; using GUIL = UnityEngine.GUILayout; using EGUIL = UnityEditor.EditorGUILayout; using EU = UnityEditor.EditorUtil...
package com.hartwig.hmftools.extensions.cli.options import org.apache.commons.cli.CommandLine import org.apache.commons.cli.Option import org.apache.commons.cli.Options import java.io.IOException class HmfOptions { val options = Options() private val optionsMap = mutableMapOf<Option, HmfOption>() fun add...
UPDATE KIM_PERSON_QUAL_ATTR_T SET ATTRIBUTE_NAME = 'unitNumber' WHERE ATTRIBUTE_NAME = 'kra.unitNumber'; UPDATE KIM_PERSON_QUAL_ATTR_T SET ATTRIBUTE_NAME = 'subunits' WHERE ATTRIBUTE_NAME = 'kra.subunits'; UPDATE KIM_PERSON_QUAL_ATTR_T SET ATTRIBUTE_NAME = 'proposal' WHERE ATTRIBUTE_NAME = 'kra.proposal'; UPDATE KIM_PE...
package service.actor import akka.actor.Actor import spray.http.HttpResponse /** * Created by aram on 2016. 12. 8.. */ class Hello extends Actor { def receive = { case r: RequestSender => { r.sender ! HttpResponse(status = 200, entity = "Hello, World!") } } }
package com.hotfixs.thinkinginjava.containers; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; /** * @author wangjunwei */ public class FailFast { public static void main(String[] args) { Collection<String> c = new ArrayList<>(); Iterator<String> it = c.iterat...
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package protoregistry provides data structures to register and lookup // protobuf descriptor types. // // The Files registry contains file descriptors and pr...
DROP TABLE IF EXISTS users, recipes; CREATE TABLE users ( id SERIAL PRIMARY KEY, username VARCHAR(30) ); CREATE TABLE recipes ( id SERIAL PRIMARY KEY, recipe_id INT, image VARCHAR(255), name VARCHAR(255), time INT, servings INT, timestamp BIGINT, user_id INT NOT NULL REFERENCES user...
/* * File: fDatiGrafoCasuale.cpp * Author: Michele * * Created on 21 luglio 2015, 16.42 */ #include "fDatiGrafoCasuale.h" fDatiGrafoCasuale::fDatiGrafoCasuale() { ui.setupUi(this); } int fDatiGrafoCasuale::ArchiCambiati() { int n = ui.eNodiDa->value(); if (ui.eNodiA->value() < n) ui.eNodi...
<<<<<<< HEAD <!DOCTYPE html> <html> <head> <title>exercice 4</title> </head> <body> <a href="?nblignes=2&Colonnes=2">2x2</a> <a href="?nblignes=5&Colonnes=5">5x5</a> <a href="?nblignes=10&Colonnes=8">10x8</a> <?php echo "<table border='1'> <tbody>"; for($l=0;$l<=$_GET["nblignes"];$l++){ ...
"use strict"; var Example = new Scene("Example Scene #1"); DemoService.registerScene(Example); Example.init = function() { // Scene-specific settings this.settings = {width: 400, height: 300}; this.createScene(); // Make the controls and add the object (character) to scene // this.camera = new THREE.Perspective...
mcmuseum ======== Simple weekend hack. mcmuseum is a minimal Minecraft Classic server (also compatible with Classicube) for browsing old .dat files. While my [launcher](https://github.com/calzoneman/boomcraft) supports loading .dat files, many files I have saved were from custom server implementations that supported...
package io.venuu.vuu.net.json import com.fasterxml.jackson.core.JsonParser import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.scala.DefaultScalaModule import io.venuu.vuu.net.{JsonViewServerMessage, MessageBody, ViewServerMessage} trait Serializer[R, SERTYPE] { def serialize(mess...
package com.twitter.finagle import com.twitter.conversions.storage._ import com.twitter.finagle.client._ import com.twitter.finagle.factory.BindingFactory import com.twitter.finagle.filter.PayloadSizeFilter import com.twitter.finagle.mux.lease.exp.Lessor import com.twitter.finagle.mux.transport.{Message, MuxFramer, Ne...
package com.esorokin.lantector.ui.plugin.base import android.content.Intent import android.os.Bundle import android.view.MenuItem import android.view.View open class BasePlugin : Plugin { override fun onCreate(savedInstanceState: Bundle?) { //override } override fun onViewCreated(view: View) { ...
#!/bin/bash # make database migrations python manage.py makemigrations --noinput --settings=cog.settings.development # apply database migrations python manage.py migrate --noinput --settings=cog.settings.development # collect static files python manage.py collectstatic --noinput --settings=cog.settings.development ...
require 'fastlane_core/ui/ui' module Fastlane UI = FastlaneCore::UI unless Fastlane.const_defined?("UI") module Helper class CompilationTimeReportHelper def self.generateResultsHashes(source_pathes, time_limit, xcodebuild_log_path) results = Array.new() source_pathes = source_p...
# rename this file to db_connection.py from pymongo import MongoClient def connect_to_db(): """ Utility, connects to the database :return: MongoDB cursor object """ mongo = MongoClient("add-your-mongo-uri") guild_db = mongo.PhoneBotDB.Guilds return guild_db
package org.rekotlinrouter import org.rekotlin.* /** This is ReKotlin's built in action type, it is the only built in type that conforms to the `Action` protocol. `StandardAction` can be serialized and can therefore be used with developer tools that restore state between app launches. It is recommended that you def...
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} module BossaNovaSpec where import qualified Data.Map as M import Data.Text hiding (all, map) import qualified Data.Text as T import qualified Data.Vector as V import Faker import Faker.BossaNova import TestImport import Test.Hspec spec :: Spec s...
import when from 'when'; import { AlbumModel, AuthorModel, SongModel } from './Models'; import { ArrayToObject } from '../utils/Utils'; const delay = ms => obj => when.promise((resolve, reject) => setTimeout(() => resolve(obj), ms)) export default { search(value) { return AlbumModel .find({ title...
# -*- coding: utf-8 -*- from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404, redirect from django.views.generic import ListView from faq.models import Topic, Question def _fragmentify(model, slug, url=None): get_object_or_404(model.objects.published().filter(slug=slug)) ...
#include <gtest/gtest.h> #include <vector> #include <thread> #include "LLP/packet.hpp" #include "LLP/block.hpp" #include "LLP/utils.hpp" using namespace ::nexuspool; using namespace ::testing; Packet create_packet(std::uint8_t header, network::Payload data) { Packet packet_input; packet_input.m_header = header; pa...
--- layout: project_single title: "DIY Faux Barn Doors: Hollow Core Door Makeover" slug: "diy-faux-barn-doors-hollow-core-door-makeover" parent: "awesome-home-design-with-fixer-upper" --- DIY Barn Doors East Coast Creative
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.VoucherTemplateLiteInfo; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.marketing.voucher.templatelist.query res...
#!/bin/bash set -e until psql --dbname "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@:5432/$POSTGRES_DB" -c '\q'; do >&2 echo "Postgres is unavailable - sleeping" sleep 1 done psql -v ON_ERROR_STOP=1 --dbname "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@:5432/$POSTGRES_DB" <<-EOSQL CREATE ROLE $DB_API_USER W...
require "aduki" require "spec_helper" describe Aduki::Initializer do it "assigns a value using a custom finder" do props = { "name" => "Anna Livia", "city" => "dublin" } contraption = MachineBuilder.new props expect(contraption.name).to eq "Anna Livia" expect(contraption.city)....
#!perl -w use Test::More; BEGIN { for (1,2) { require Net::LDAP::Constant; } } use Net::LDAP::Util qw(ldap_error_name);; my @constant = qw( LDAP_SUCCESS LDAP_OPERATIONS_ERROR LDAP_PROTOCOL_ERROR LDAP_TIMELIMIT_EXCEEDED LDAP_SIZELIMIT_EXCEEDED LDAP_COMPARE_FALSE LDAP_COMPARE_TRUE LDAP_STRONG_AUTH_N...
package renetik.android.maps.extensions import android.location.Location import com.google.android.gms.maps.model.LatLng fun LatLng.distanceTo(latLng: LatLng?) = latLng?.asLocation()?.distanceTo(asLocation()) ?: 0F fun LatLng.asLocation() = Location("").also { it.latitude = latitude it.longitude = lo...
function modularExponential(x, n, m) { if (n === 0) { return 1; } else if (n % 2 === 0) { return (modularExponential(x, n / 2, m) ** 2) % m; } else { return (x * modularExponential(x, n - 1, m)) % m; } } //Example : 5^8 mod 78 modularExponential(5,8,78);
package org.minima.system.input.functions.transfer; import org.minima.objects.base.MiniData; import org.minima.system.brains.ConsensusUser; import org.minima.system.input.CommandFunction; import org.minima.utils.messages.Message; public class exportcoin extends CommandFunction{ public exportcoin() { super("export...
<?php use yii\bootstrap\ActiveForm; use unclead\multipleinput\MultipleInput; use unclead\multipleinput\examples\models\ExampleModel; use yii\helpers\Html; /* @var $this \yii\base\View */ /* @var $model ExampleModel */ ?> <?php $form = ActiveForm::begin([ 'enableAjaxValidation' => true, 'enableClientValid...
This console application is using top level statement with implicit using directives. See https://aka.ms/new-console-template for more information.
<?php namespace App; use App\Filters\ThreadFilters; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; class Thread extends Model { protected static $recordEvents = ['...
/******************************************************************************* * Copyright (c) 1998, 2015 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 ...
# frozen_string_literal: true require 'forwardable' module LabyrinthSolver # Takes a labyrinth and attempts to solve it saving the path taken class Solver attr_reader :path extend Forwardable OPPOSITE_DIRECTIONS = { up: :down, right: :left, down: :up, left: :right }.freeze def_delegators :@labyr...
#! /usr/bin/env ruby # # check-topics-name # # DESCRIPTION: # This plugin checks topic's name. # # OUTPUT: # plain-text # # PLATFORMS: # Linux # # DEPENDENCIES: # gem: sensu-plugin # gem: zookeeper # # USAGE: # ./check-topics-name # # NOTES: # # LICENSE: # Olivier Bazoud # Released under the same terms ...
<?php /** * Created by PhpStorm. * User: Domenico Lupinetti <ostico@gmail.com> * Date: 26/11/16 * Time: 22:12 */ namespace PhpOrient; use PhpOrient\Abstracts\TestCase; use PhpOrient\PhpOrient; use PhpOrient\Protocols\Binary\Data\ID; use PhpOrient\Protocols\Binary\Data\Record; class FloatEmbeddedSetTest extends...
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace ExpressionTreeQueryBuilder { public static class ExpressionParameters { private class Operation { public string Token { get; set; } public int Priority { get; set;...
# Copyright (c) 2018-2021 Martin Heralecký <heralecky.martin@gmail.com> # License: MIT # Usage: ulozto-download #!/bin/bash ARGS=("$@") # The program's entry point. function main { loadOptions function curl-auth { curl -L --basic -u "$ULOZTO_USERNAME:$ULOZTO_PASSWORD" "$@" } FILE_SIZE="$( ...
#ifndef __JRNetAddress_H #define __JRNetAddress_H namespace Jumpropes { class IPAddress; class LookupObject; } #include <Groundfloor/Atoms/Defines.h> #include <Groundfloor/Atoms/Freeable.h> #include <Groundfloor/Molecules/String.h> #include <Groundfloor/Molecules/Vector.h> #include <Groundfloor/Molecules/Prope...
# URI Library for IncludeOS A part of the [IncludeOS](https://github.com/hioa-cs/IncludeOS) unikernel project. #### Warning: Work In Progress This is just bare bones, not to be relied upon by anyone
const WebSocket = require("ws"); const chat = { run: function (host, port) { wss = new WebSocket.Server({ host, port }); wss.on("listening", () => { const remote = wss.address(); console.log(`Server running at ${remote.address}:${remote.port}`); }); wss.on("connection", (ws, req) => { ...
// ----------------------------------------------------------------------- // <copyright file="StreamGeometry.cs" company="Steven Kirk"> // Copyright 2014 MIT Licence. See licence.md for more information. // </copyright> // ----------------------------------------------------------------------- namespace Perspex.Medi...
#!/usr/bin/env bash source .env/bin/activate export PATH=${PWD}:${PATH} export PYTHONPATH=${PWD} export PYTHONIOENCODING=utf-8 export MODE=default export PROJECT_PATH=${PWD} export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
require 'timeout' class Object def loop_with_timeout(timeout = 5) time = Time.now loop do if Time.now - time >= timeout raise TimeoutError, "Did not succeed within #{timeout} seconds" end sleep 0.01 # necessary on OSX; don't know why yield end end end
namespace Resume.Models { public class ResumeModel { public string Name { get; set; } public string Title { get; set; } public string GitHub { get; set; } public string LinkedIn { get; set; } public AboutModel About { get; set; } public SkillsModel Skills { get; s...
(ns de.virtual-earth.superdesk-graphql.graphql-api.api (:gen-class) (:require [clojure.core :refer [apply]] [de.virtual-earth.superdesk-graphql.graphql-api.core :as core])) (defn -main [& argv] (apply core/main argv) )
package exnihilofabrico.compatibility.rei.witchwater import exnihilofabrico.api.recipes.witchwater.WitchWaterEntityRecipe import exnihilofabrico.compatibility.rei.PluginEntry import exnihilofabrico.modules.witchwater.WitchWaterFluid import exnihilofabrico.util.asStack import me.shedaniel.rei.api.RecipeDisplay import n...
using System; using System.Collections.Generic; using System.Text; namespace CawkVM_Devirt.Protections.InitialiseMethod { public class ExceptionHandlerClass { public Type CatchType; public int FilterStart; public int HandlerEnd; public int HandlerStart; public int Handl...
from __future__ import annotations import argparse import dataclasses import logging from typing import Dict from typing import Iterable from typing import List from typing import Optional from typing import Tuple from typing import Type from rich.console import Console from safdie import BaseCommand from safdie impo...
/*---------------------------------------------------------------------------*/ // Author : hiyohiyo // Mail : hiyohiyo@crystalmark.info // Web : https://crystalmark.info/ // License : The MIT License /*---------------------------------------------------------------------------*/ #include "...
using System; using System.Collections.Generic; using System.Linq; using ABCat.Shared.Plugins.Catalog.ParsingLogics; using Component.Infrastructure; using Component.Infrastructure.Factory; using JetBrains.Annotations; namespace ABCat.Plugins.NormalizationLogic.Standard { [SingletoneComponentInfo("2.2")] [Used...
use crate::schema::m_products; #[derive(Queryable, Debug, Clone)] pub struct Product { pub id: uuid::Uuid, pub name: String, pub price: i64, pub seller_id: uuid::Uuid, pub created_at: chrono::NaiveDateTime, pub updated_at: Option<chrono::NaiveDateTime>, pub is_deleted: bool, } #[derive(Ins...
using MCMCBenchmarks, Test, Random @testset "SDT Tests " begin Random.seed!(6505) path = pathof(MCMCBenchmarks) include(joinpath(path,"../../Models/SDT/SDT_Functions.jl")) include(joinpath(path,"../../Models/SDT/SDT.jl")) Nd = 10^4 d = 2.0 c = 0.0 Nreps = 1 ProjDir = @__DIR__ cd...
/** * \file transport.h * * \brief Type definitions for the transport layer underlying MPS. * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in complianc...
class UploadTaskBean { /* * description : "任务创建成功" * uniqueId : "772565130@qq.com1566790167339" * status : 0 */ String description; String uniqueId; int status; static UploadTaskBean fromMap(Map<String, dynamic> map) { UploadTaskBean uploadTaskBean = new UploadTaskBean(); uploadTaskBean...
import express from "express"; import {inject, singleton} from "tsyringe"; import winston from "winston"; import httpError from "http-errors"; import {TokenInjection} from "./../infrastructure/token.injection"; import {PermissionFlag} from "./../services-layer/users/models/permission.flag"; import {CommonMiddleware} f...
module Spina class Project < ActiveRecord::Base extend FriendlyId friendly_id :title, use: [:slugged, :finders] belongs_to :project_category, optional: true belongs_to :image_collection, optional: true, class_name: "Spina::ImageCollection" belongs_to :image, class_name: "Spina::Image" accept...
module MrbRSpec def self.active_stubs_originals @active_stubs_originals ||= {} end class Stubbing class << self def reset active_stubs = MrbRSpec.active_stubs_originals active_stubs.each do |object, methods| methods.each do |method, original_proc| meta = class...
"use strict"; const request = require("supertest"); const { config, postcodesioApplication } = require("./helper"); const { defaults } = config; const { assert } = require("chai"); const promClient = require("prom-client"); describe("Prometheus /metrics endpoint", () => { afterEach(() => { promClient.register.c...
const { join } = require("path"); const i18next = require("i18next"); const SyncBackend = require("i18next-fs-backend"); i18next .use(SyncBackend) .init({ fallbackLng: "en", supportedLngs: ["en", "fr"], initImmediate: true, backend: { // for all available options read the backend's repository...
from graphics import * def main(): win = GraphWin() leftEye = Circle (Point(80,50),5) leftEye.setFill('yellow') leftEye.draw(win) rightEye = Circle (Point (100, 50),5) rightEye.setFill('yellow') rightEye.draw(win) main()
// CS 172 - Assignment 3 - Tic-Tac-Toe // Main File by Mark Boady // Drexel University 2016 //You may NOT change this file. //All coding MUST be done in the tic.h and tic.cpp. #include "tic.h" #include <iostream> #include <string> using namespace std; int main() { //Use the default constructor to create a new empt...
require File.expand_path('../spec_helper.rb', __FILE__) require 'digest' describe Naskit::API::AtomicParsley do describe ".get" do let(:file) { File.expand_path('../assets/empty.m4v', __FILE__) } subject { Naskit::API::AtomicParsley.get(file) } it { should be_a(Naskit::Episode) } its(:title) ...
package contacts.async.util import contacts.async.ASYNC_DISPATCHER import contacts.core.Contacts import contacts.core.entities.ExistingContactEntity import contacts.core.entities.MutableOptions import contacts.core.entities.MutableOptionsEntity import contacts.core.entities.Options import contacts.core.util.options im...
; ; Print16.asm ; KripayaOS Project ; ; Copyright (c) 2021 KripayaOS Project. All rights reserved. ; [bits 16] print16: ; Save the register push ax push bx mov ah, 0x0E .loop16: ; Check if the string is null cmp byte[bx], 0 je .end16 ; bx = char, al = style ...
import inspect from typing import Iterator from collections import OrderedDict import pickle from ..autograd.tensor import Tensor from ..autograd.parameter import Parameter from ..exception import ShapeError, LengthError class Module: def __init__(self,): self._modules = OrderedDict() self._param...
package hieupt.tourguidedemo import android.graphics.Color import android.os.Bundle import android.support.v7.app.ActionBarDrawerToggle import android.support.v7.app.AppCompatActivity import android.view.Gravity import android.view.View import android.view.ViewTreeObserver import kotlinx.android.synthetic.main.activit...