text stringlengths 27 775k |
|---|
require "date"
require "eph_jcg/version"
require "eph_jcg/argument"
require "eph_jcg/coeffs"
require "eph_jcg/constants"
require "eph_jcg/ephemeris"
require "eph_jcg/time_calculator"
module EphJcg
def self.new(arg = ARGV[0])
arg ||= Time.now.strftime("%Y%m%d")
jst = EphJcg::Argument.new(arg).get_jst
retu... |
//entry point of index.html
//in charge of rendering the game scene
import 'dart:html';
import 'package:SocketTile/common.dart';
import 'package:SocketTile/socketgame.dart';
void main() {
querySelector('#connect').onClick.listen(connect);
}
void connect(MouseEvent event) {
String ip=(querySelector('#ip') as Inpu... |
package test.api.route;
import javastrava.api.API;
import javastrava.model.StravaRoute;
import test.api.APIGetTest;
import test.api.callback.APIGetCallback;
import test.service.standardtests.data.RouteDataUtils;
/**
* <p>
* Tests for {@link API#getRoute(Integer)} methods
* </p>
*
* @author Dan Shann... |
import _Pagination from './Pagination';
import './style/index.js';
export type { PaginationProps } from './Pagination';
export * from './type';
export const Pagination = _Pagination;
export default Pagination;
|
/*
* The MIT License (MIT)
* Copyright (c) 2016 DataRank, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to us... |
import React from "react";
import styled from "styled-components";
import behance from "../assets/images/behance_white.png";
import github from "../assets/images/github_white.png";
import linkedin from "../assets/images/linkedin_white.png";
//footer is another component that will be used in all screens - it will impor... |
import 'package:vector_math/vector_math.dart';
import '../../../engine/collision/collider.dart';
import '../../../engine/collision/collider_circle.dart';
import '../../../renderer/shapes/shape.dart';
import '../../../renderer/shapes/shape_circle.dart';
import '../entities/entity.dart';
import '../obstacles/obstacle.da... |
# Attendence
___
___
CRUD for user's tasks with auth.
Used stack is Mongo+Express+React+Node, also custom CSS and Semantic UI React.
## Work flow
Users are registered and authorized.
In main section (`Home`) there is list of tasks and small form for creating a new one.
Tasks are shown for all users, but current us... |
/*
* This header is generated by classdump-dyld 1.0
* on Saturday, June 1, 2019 at 6:49:02 PM Mountain Standard Time
* Operating System: Version 12.1.1 (Build 16C5050a)
* Image Source: /System/Library/PrivateFrameworks/MediaSocial.framework/MediaSocial
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by ... |
package com.pax.market.android.app.sdk.dto;
import android.os.Parcel;
import android.os.Parcelable;
import com.pax.market.android.app.sdk.util.StringUtils;
/**
* Created by fojut on 2019/1/7.
*/
public class StoreProxyInfo implements Parcelable {
private int type; //0:DIRECT, 1:HTTP, 2:SOCKS
private Str... |
package javassist.bytecode.annotation;
import java.io.IOException;
import java.lang.reflect.Method;
import javassist.ClassPool;
import javassist.bytecode.ConstPool;
import javassist.bytecode.Descriptor;
public class EnumMemberValue extends MemberValue {
int typeIndex;
int valueIndex;
public EnumMemberValue(... |
package automaton.constructor.utils
import javafx.beans.binding.Binding
import javafx.geometry.Point2D
import javafx.scene.Group
import javafx.scene.shape.Line
import tornadofx.*
class Arrow(
val line: Line,
val length: Double,
val width: Double
) : Group() {
val normalizedVectorBinding: Binding<Point... |
#!/usr/bin/env bash
# This script is meant for the EnterprisePharo book. You can use it for other projects
# Exit immediately if a command exits with a non-zero status
set -e
LATEX_COMPILER="pdflatex"
# LATEX_COMPILER="lualatex"
PILLAR_COMMAND="./pillar"
if hash "pillar" 2>/dev/null; then
PILLAR_COMMAND="pillar"... |
/*
Copyright 2020 The Qmgo Authors.
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 in writing, sof... |
module TestConstraintZeroOne
using Test
using VecMathOptInterface
const MOI = VecMathOptInterface
function runtests()
for name in names(@__MODULE__; all = true)
if startswith("$(name)", "test_")
@testset "$(name)" begin
getfield(@__MODULE__, name)()
end
end... |
# Blue
Blue is a user configuration module based on [Kohana Red](https://github.com/davidstutz/kohana-red). |
# 1. 工厂的创建方法
可以创建一个具体产品(无形参),也可创建一个抽象产品的具体产品(有形参)
```c++
Product *Factory::create(){// 无形参,只能创建一个固定的对象
return new Product;
}
Product *Factory::create(string name){// 根据形参,创建不同具体对象
if(name=="pro1"){
return new Pro1;
}else if(name=="pro2"){
return new Pro2;
}else{
.... |
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class NewsLettersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//Empty the table first
DB::s... |
//! ASN.1 `ANY` type.
use crate::{
asn1::*, ByteSlice, Choice, Decodable, DecodeValue, Decoder, Encodable, EncodeValue, Encoder,
Error, ErrorKind, Header, Length, Result, Tag, Tagged,
};
use core::convert::{TryFrom, TryInto};
#[cfg(feature = "oid")]
use crate::asn1::ObjectIdentifier;
/// ASN.1 `ANY`: represe... |
package pkg
import (
"fmt"
"strconv"
"strings"
)
type Coordinate struct {
X int
Y int
}
type Direction int
func (c Coordinate) Plus(c2 Coordinate) Coordinate {
return Coordinate{c.X + c2.X, c.Y + c2.Y}
}
const (
LEFT Direction = iota
RIGHT
UP
DOWN
)
func (d Direction) String() string {
switch d {
case... |
#!/bin/bash
DOTFILES_DIR="$HOME/.dotfiles"
change_to_zsh() {
if [ "$(echo "$SHELL" | grep -c "zsh")" -eq "0" ]; then
echo "Setting shell to zsh"
chsh -s "$(which zsh)"
else
echo "zsh is already the default shell"
fi
}
create_ssh() {
mkdir -p "$HOME"/.ssh
chmod 0700 "$HOME"/.ssh
}
fonts_install... |
#!/bin/bash
## Vincent Major
## Created September 25 2017
## Last modified September 26 2017
## This script will take a raw xml file of pubmed articles,
## extract their pmids, years, titles and abstracts using R, and
## process the text and combine with manual labels using python.
## expecting one argument, remove ... |
<?php
class Mail {
private $error;
public function sendMailWithNativeMailFunction() {
return false;
}
public function sendMailWithSwiftMailer() {
return false;
}
public function sendMailWithPHPMailer($user_email, $from_email, $from_name, $subject, $body) {
$mail = new PHPMailer;
if (Config:... |
require_relative './exceptions'
ERRORS_BY_STATUS = {
'400' => FastTrack::BadRequestException,
'401' => FastTrack::UnauthorizedException,
'404' => FastTrack::NotFoundException,
'405' => FastTrack::MethodNotAllowedException,
'406' => FastTrack::NotAcceptableException,
'429' => FastTrack::TooManyRequestsExcep... |
# #!/bin/bash
### install metax
wget https://greenhosting.am:444/db/get/metax_1.2.13.zip?id=1452a7fb-0af2-4f66-865a-2d684894b7bf -O metax.zip
unzip metax.zip
sudo rm metax.zip
sudo rm -rf /opt/metax
sudo mv metax /opt/
cd /opt/metax/
sudo apt-get install g++ make pkg-config libssl-dev
sudo apt autoremove
make -j8
##... |
require 'spec_helper'
require 'cleaner/whitespace_cleaner'
describe WhitespaceCleaner do
include_context "shared cleaner"
subject { WhitespaceCleaner }
let(:data) { {a: " Test", b: "Double test "} }
# let!(:original_value) { data.first.last.clone }
# it "downcases an array of objects" do
#expect( m... |
/// <reference path="../../../globals.d.ts"/>
/// <reference path="./component.d.ts"/>
/// <reference path="./containerrenderer.d.ts"/>
/// <reference path="../dom/dom.d.ts"/>
/// <reference path="../events/keyhandler.d.ts"/>
/// <reference path="./control.d.ts"/>
/// <reference path="../events/event.d.ts"/>
/// <refer... |
---
layout: docs
title: Deployment methods
permalink: /docs/deployment-methods/
---
tbd
|
module PagesCore
class AdminMenuItem
attr_reader :label, :path, :group, :options
class << self
def items
return [] unless @menu_items
@menu_items.map { |_, v| v }
end
def register(label, path, group = :custom, options = {})
entry = new(label, path, group, options)
... |
module.exports = {
friendlyName: 'View query detail',
description: 'Display "Query detail" page.',
inputs: {
slug: { type: 'string', required: true, description: 'A slug uniquely identifying this query in the library.', example: 'get-macos-disk-free-space-percentage' },
},
exits: {
success: { ... |
use crate::cfg;
use crate::cmtp::{
AiOption, Ammo, Character, Equipment, Item, ItemKind, LogMessage, MapObject, Player,
PlayerAction, PlayerState, Slot, Symbol,
};
use crate::engine;
use crate::engine::game;
pub fn update(world: &mut game::World) {
if world.player.state != PlayerState::MakingTurn {
... |
import 'package:flutter/material.dart';
import 'package:dynamic_theme/dynamic_theme.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
class ThemeHelper {
List<Color> myGradientList = [
Colors.pink[300],
Colors.pink[400],
Colors.pink,
Colors.pink[600],
Colors.pink[700],
C... |
<?php
namespace JouwWeb\DocData\Model;
interface PaymentStatusUpdateInterface
{
/**
* Set payment
*
* @param PaymentInterface $payment
*
* @return $this
*/
public function setPayment(PaymentInterface $payment);
/**
* Get payment
*
* @return PaymentInterface
... |
package com.mob.lee.fastair.io.http
import com.mob.lee.fastair.io.socket.Writer
import kotlinx.coroutines.channels.Channel
import java.nio.ByteBuffer
import java.nio.channels.SocketChannel
interface Handler {
fun canHandleIt(request: Request):Boolean
suspend fun handle(request: Request,channel:SocketChannel):... |
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace teste_tria.Models
{
public class ClienteEmpresa
{
[Key]
public long Id { get; set; }
[Required]
[DisplayName("ID Cliente")]
public long ClienteID { get; set; }
public Cliente C... |
import { LitElement, html, css } from 'lit-element';
import styles from '../styles/ApiTemplateStyle';
export class ApiTemplate extends LitElement {
static get styles() {
return [styles];
}
render() {
return html`
<div class="container">
<h1>The <strong class="title">Ri... |
function Sync-CloudflareITGlueFlexibleAssets {
param(
[string]$FlexAssetType = 'Cloudflare DNS'
)
$Progress = 0
$ZoneDataArray = Get-CloudflareZoneDataArray
$FlexAssetTypeId = New-ITGlueWebRequest -Endpoint 'flexible_asset_types' -Method 'GET' | ForEach-Object data | Where-Object {$_.at... |
<?php
namespace web\widgets\user;
use \common\models\User;
class Photo extends \web\ext\Widget
{
/**
* Photo
* @var User\Photo
*/
public $photo;
/**
* Run widget
*/
public function run()
{
// Define photo URL
if ($this->photo !== null) {
$phot... |
---
name: Question
about: Any questions/anything else that does not fit into a bug or feature request
---
<!-- A clear and concise description of what your question is.--> |
package minq
import (
"fmt"
"io"
"io/ioutil"
"testing"
"time"
)
type testPacket struct {
b []byte
}
type testTransportPipe struct {
in []*testPacket
out []*testPacket
autoFlush bool
}
func newTestTransportPipe(autoFlush bool) *testTransportPipe {
return &testTransportPipe{
make([]*testPacke... |
#### Classes included
- org.apache.commons.fileupload.disk.DiskFileItemFactory
- org.apache.commons.fileupload.FileItem
- org.apache.commons.fileupload.FileItemFactory
- org.apache.commons.fileupload.FileItemHeadersSupport
- org.apache.commons.fileupload.FileItemIterator
- org.apache.commons.fileupload.FileItemStream
-... |
package im.conversations.compliance.xrd;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "XRD")
public class ExtensibleResourceDescript... |
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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://ww... |
package p1001
import (
"reflect"
"testing"
)
func runSample(t *testing.T, N int, lamps [][]int, queries [][]int, expect []int) {
res := gridIllumination(N, lamps, queries)
if !reflect.DeepEqual(res, expect) {
t.Errorf("Sample %d %v %v, expect %v, but got %v", N, lamps, queries, expect, res)
}
}
func TestSamp... |
---
title: deepfates log 2020-02-11
layout: post
toc: true
comments: false
search_exclude: false
hide: true
categories: [tweets]
---
#### <a href = "https://twitter.com/deepfates/status/1227470735276433411">*22:53:23*</a>
<font size="5">lmao someone reinvented the toaster</font>
🗨️ 0 ♺ 1 🤍 2
---
#### ... |
#!/usr/bin/env bash
DATASET=$1
if [ "$DATASET" == "kinetics400" ] || [ "$1" == "kinetics600" ] || [ "$1" == "kinetics700" ]; then
echo "We are processing $DATASET"
else
echo "Bad Argument, we only support kinetics400, kinetics600 or kinetics700"
exit 0
fi
cd ../../../
PYTHONPATH=. python tools... |
"""import cv2
scale = 30
cv2.namedWindow("preview")
vc = cv2.VideoCapture('http://192.168.1.155:5555/video')
rval, frame = vc.read()
width = int(frame.shape[1] * scale / 100)
height = int(frame.shape[0] * scale / 100)
dim = (width, height)
print(dim)
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('... |
namespace FortnoxNET.Constants.Search
{
public enum VoucherSearchParameters
{
CostCenter,
LastModified,
FinancialYear,
FinancialYearDate,
FromDate,
ToDate
}
} |
import * as React from 'react';
import { createRenderer, describeConformance } from 'test/utils';
import CardActions, { cardActionsClasses as classes } from '@mui/material/CardActions';
describe('<CardActions />', () => {
const { render } = createRenderer();
describeConformance(<CardActions />, () => ({
class... |
function swal_show(result) {
swal({
title: result['title'],
text: result['message'],
timer: 1500,
buttons: false,
dangerMode: false,
icon: result['type']
});
}
function swal_alert(title, msg, icon) {
swal({
title: title,
text: msg,
timer: 1500,
buttons: false,
dangerMode: false,
icon: icon
... |
export default ({ title }) =>
<header className='page-header'>
<h1>{title}</h1>
<i />
</header>
|
module Main where
import Chapter23
data CoordCheck
= Valid
| NotValid
deriving (Show, Read, Eq)
main :: IO ()
main = do
putStrLn "Enter Top Left Coordinate (x,y)"
coord1 <- fmap readCoord getLine
putStrLn "Enter Bottom Right Coordinate (x,y)"
coord2 <- fmap readCoord getLine
putStrLn "Pleas... |
<?php
/**
* Copyright 2013 François Kooman <fkooman@tuxed.net>
*
* 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 require... |
// Copyright Camille Gillot 2012 - 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef RTTI_MMETHOD_HASH_FETCH_POLE_HPP
#define RTTI_MMETHOD_HASH_FETCH_POLE_HPP
#include "mmethod/... |
process.env.NODE_ENV = "test";
let mongoose = require("mongoose");
let Marker = require("../models/markers");
let chai = require("chai");
let chaiHttp = require("chai-http");
let server = require("../app");
let should = chai.should();
chai.use(chaiHttp);
/*
* Test the /GET route (Get all makers)
*/
describe("/GE... |
//+build integration
package netfilter
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/mdlayher/netlink"
)
var (
badGroup = []NetlinkGroup{255}
)
func TestConnIntegrationJoinLeaveGroup(t *testing.T) {
c, err := Dial(nil)
require.NoError(t, err, "opening Conn")
// Join all Conntrack ev... |
import {Store} from "@ngxs/store";
import {Injectable} from "@angular/core";
import {map, Observable} from "rxjs";
import {ThemeOptions} from "../themes/theme";
import {SharedStateStore} from "../shared.state";
import {LIGHT_THEME} from "../themes/light.theme";
import {DARK_THEME} from "../themes/dark.theme";
@Injecta... |
import { EditorProps } from '@edtr-io/core'
import { RendererProps } from '@edtr-io/renderer'
import { storiesOf } from '@storybook/react'
import * as React from 'react'
import { EditorStory, RendererStory } from './container'
export function addStory(
name: string,
props: {
defaultPlugin?: EditorProps['defau... |
<?php
namespace Phpactor\Extension\Rpc\Tests\Unit\RequestHandler;
use PHPUnit\Framework\TestCase;
use Phpactor\Extension\Rpc\RequestHandler;
use Phpactor\Extension\Rpc\RequestHandler\ExceptionCatchingHandler;
use Phpactor\Extension\Rpc\Request;
use Phpactor\Extension\Rpc\Response;
use Prophecy\Prophecy\ObjectProphecy... |
#!/bin/bash
force_scale=1.0
julia Data_NNPlatePull.jl 100 $force_scale 2 2 &
julia Data_NNPlatePull.jl 101 $force_scale 2 2 &
julia Data_NNPlatePull.jl 102 $force_scale 2 2 &
julia Data_NNPlatePull.jl 103 $force_scale 2 2 &
julia Data_NNPlatePull.jl 104 $force_scale 2 2 &
julia Data_NNPlatePull.jl 105 $force_scale 2 ... |
import { IBlock, ILocationResponseBlockConfig } from '../..';
export interface ILocationResponseBlock extends IBlock<ILocationResponseBlockConfig> {
}
//# sourceMappingURL=ILocationResponseBlock.d.ts.map |
// Copyright 2019 Zachary Bush.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according t... |
using Revise
using JDF
using CSV, DataFrames, Blosc, JLSO, Base.GC
# use 12 threads
Blosc.set_num_threads(6)
@time a = CSV.read("C:/data/Performance_All/Performance_2010Q3.txt", delim = '|', header = false);
strs = "id".*string.(rand(UInt16, 100_000_000));
# write randomstring to io
strs = coalesc... |
# Fighting Novel Coronavirus COVID-19 with Data Science & Machine Learning
Fighting Novel Coronavirus COVID-19 with Data Science & Machine Learning. (Underdevelopment Project)
## Overview
- Find Answers by Analysing & Visualising Data.
- Test Hypothesis.
- Figure The Right Model For Predication.
## Methodology
- In... |
// MIT License
// Copyright (c) 2021 Tree Xie
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge,... |
<<м҃д ѡ҆б.: 88>>
*Въ понедѣ́льникъ в҃-ѧ седми́цы а҆нтїпа́схи на ᲂу҆́трени.*
*Повнегда̀ сотвори́ти і҆ере́ю нача́ло,* ~Сла́ва ст҃ѣ́й: *Глаго́лемъ:*
~Хрⷭ҇то́съ воскре́се *три́жды, ти́химъ гла́сомъ.*
*Сїе́ бо глаго́лемъ нача́ло:* ~Хрⷭ҇то́съ воскре́се: *въ часѣ́хъ, и҆ вече́рнѧхъ,
и҆ повече́рїѧхъ, ѿ сеѧ̀ ᲂу҆́трени недѣ́ли... |
# frozen_string_literal: true
require 'spec_helper'
require 'webmock'
require 'webmock/rspec'
require 'uri'
require 'puppet/util/http_client'
require 'logger'
describe 'HttpClient' do
describe '#attempt_http_request' do
BODY_HTTP_METHODS = [:put, :post].freeze
HTTP_METHODS = [:get, :delete].concat(BODY_HTTP... |
# THIS FILE SHOULD BE RUN DAILY, via a cronjob
# IT RUNS THE BACKUP SCRIPT INSIDE THE DOCKER CONTAINER
# AND COPIES THE BACKUP TO A REMOTE LOCATION
#
# Content of the crontab (edit with `sudo crontab -e`):
# @reboot mount -a
# 0 20 * * * /bin/bash /srv/bullfrog/cron_daily.sh
#
# note that the container name 'bullfrog_... |
import { async, ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
import { of } from 'rxjs';
import { EntitySchema } from '../../../../../store/src/helpers/entity-schema';
import { CoreTesting... |
package com.puntogris.blint.feature_store.presentation.sync
import androidx.fragment.app.viewModels
import androidx.lifecycle.Lifecycle
import androidx.navigation.fragment.findNavController
import com.puntogris.blint.R
import com.puntogris.blint.common.presentation.base.BaseFragment
import com.puntogris.blint.common.u... |
// Copyright (C) 2018 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "ie_api.h"
namespace InferenceEngine {
/**
* @brief Check if CPU is x86 with SSE4.2
*/
INFERENCE_ENGINE_API_CPP(bool) with_cpu_x86_sse42();
} // namespace InferenceEngine
|
#!/bin/bash
uninstall_module(){
# if module directory exists
if [ -d "../$1" ]; then
echo "Now uninstalling module " $1 " ... "
# go to that module
cd ../$1
# make and go to build directory
mkdir -p build && cd build
sudo make uninstall
cd ..
else
echo "ERROR: an error occurred during uninstalling.... |
#ifndef MOTIONFRAME_H
#define MOTIONFRAME_H
#include <iostream>
#include <opencv2/opencv.hpp>
#include <string>
// TODO: Re-implement pointers to use smart pointers
class MotionFrame
{
public:
MotionFrame(cv::UMat &frame, std::unique_ptr<cv::Rect> rectangle);
cv::UMat getFrame();
std::unique_ptr<cv::Rect> getR... |
_Meta-package containing a typescript preset for babel_
### Provides
- `@babel/plugin-proposal-class-properties`
- `@babel/plugin-proposal-decorators`
- `@babel/core`
### Usage
- Install: `yarn add -D @adaliszk/babel-typescript-preset`
- Add an `.babelrc.json` with the content of:
```json5
{"presets": ["@adalis... |
package cmd
import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions/tools/git"
"github.com/rsteube/carapace-bin/pkg/util"
"github.com/spf13/cobra"
)
var logCmd = &cobra.Command{
Use: "log",
Short: "Show commit logs",
Run: func(cmd *cobra.Command, args []string) {},
}
func init(... |
import { TestBed, waitForAsync } from '@angular/core/testing';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { FormsModule } from '@angular/forms';
import { TableComponent } from './table.component';
import { Config } from '../../model/config';
import { Language } from '../../model/la... |
using System;
using System.IO;
using System.Text;
using System.Linq;
using Google.Cloud.Storage.V1;
using Google.Apis.Auth.OAuth2;
using Microsoft.Extensions.Configuration;
using System.Security.Cryptography.X509Certificates;
namespace TwentyTwenty.Storage.Google.Test
{
public class StorageFixture : IDisposable
... |
package ru.otus.spring.dao.impl;
import lombok.RequiredArgsConstructor;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
import org.springframework.jdbc.support.GeneratedK... |
# -*- coding: utf-8 -*-
#
# MIT License
# Copyright (c) 2020 Netcloud AG
"""AciClient Testing
"""
from requests import RequestException
from aciClient.aci import ACI
import pytest
import time
__BASE_URL = 'testing-apic.ncdev.ch'
def test_login_ok(requests_mock):
requests_mock.post(f'https://{__BASE_URL}/api/a... |
# Vulk-Bare
Vulk-Bare is a bare metal library for the Vulk 3D engine.
It provides a lot of tools.
[VULK 3D ENGINE](https://github.com/realitix/vulk)
## Provided functions
```python
def load_image(buf, request_components=0):
"""Load a png or jpeg image into a bitmap buffer.
Args:
buf (Buffer): Buffe... |
jsonrpsee::rpc_api! {
Health {
/// Test
fn system_name() -> String;
/// Test2
fn system_name2() -> String;
}
System {
fn test_foo() -> String;
}
}
fn main() {
// Spawning a server in a background task.
async_std::task::spawn(async move {
let lis... |
var contentType = require('content-type')
var randombytes = require('randombytes')
var JSONStream = require('JSONStream')
var through = require('through2')
var pumpify = require('pumpify')
var version = require('../package.json').version
/**
* Converts objects from osm-p2p to objects compatible with the OSM JSON for... |
<?php
namespace Oro\Component\Config\Tests\Unit;
use Oro\Component\Config\CumulativeResourceInfo;
class CumulativeResourceInfoTest extends \PHPUnit\Framework\TestCase
{
public function testConfig()
{
$bundleClass = 'bundleClass';
$name = 'name';
$path = 'path';
$... |
import styled from 'styled-components';
export default styled.nav`
margin: 40px 0;
@media screen and (max-width: 600px) {
visibility: hidden;
margin: 20px 0 0 0;
}
`;
|
export interface Course{
courseId:number;
courseName:string;
courseDuration:string;
courseStartDate:Date;
courseEndDate:Date;
courseFees:string;
} |
package perfSONAR_PS::RegularTesting::Parsers::Owamp;
use strict;
use warnings;
our $VERSION = 3.1;
=head1 NAME
perfSONAR_PS::RegularTesting::Parsers::Owamp;
=head1 DESCRIPTION
A module that provides simple functions for parsing owamp output
=head1 API
=cut
use base 'Exporter';
use Params::Validate qw(:all);
u... |
package controllers
import javax.inject.{Singleton, Inject}
import akka.actor.ActorSystem
import akka.stream.Materializer
import controllers.crud.MongoCrud
import models.commons.{MongoCollectionNames => CN}
import play.api.Configuration
import play.api.mvc._
import play.modules.reactivemongo.{MongoController, Reactiv... |
-- | Saving/loading to files, with serialization and compression.
module Game.LambdaHack.Common.HSFile
( encodeEOF, strictDecodeEOF
, tryCreateDir, doesFileExist, tryWriteFile, readFile, renameFile
#ifdef EXPOSE_INTERNAL
-- * Internal operations
, encodeData
#endif
) where
import Prelude ()
import Game.La... |
package org.mulesoft.amfintegration.vocabularies.propertyterms.patched.oaslike.oas3
import org.mulesoft.amfintegration.dialect.dialects.oas.OAS30Dialect
import org.mulesoft.amfintegration.vocabularies.propertyterms.patched.PatchedKeyTerm
trait Oas3PatchedKeyTerm extends PatchedKeyTerm {
override lazy val dialectId:... |
//! An implementation of a byte buffer based on virtual memory.
//!
//! This implementation uses `mmap` on POSIX systems (and should use `VirtualAlloc` on windows).
//! There are possibilities to improve the performance for the reallocating case by reserving
//! memory up to maximum. This might be a problem for systems... |
{!! Form::text($input, $value ?? null, $attributes) !!}
|
# == Schema Information
#
# Table name: projects
#
# id :integer not null, primary key
# name :string(255)
# description :text
# created_at :datetime
# updated_at :datetime
# location ... |
package pongo2echo
import (
`bytes`
`embed`
`io`
`path`
`github.com/flosch/pongo2`
)
func NewLoader(prefix string, fs *embed.FS) pongo2.TemplateLoader {
return &Loader{
prefix: prefix,
fs: fs,
}
}
type Loader struct {
prefix string
fs *embed.FS
}
func (l *Loader) Abs(_, name string) string {
... |
const {text} = require('./output.js');
/**
* Sugar.Combinators.ServerErrors
* written by Joel Dentici
* on 6/18/2017
*
* Combinators for serving 5xx status HTTP responses
*/
/**
* INTERNAL_ERROR :: string -> WebPart
*
* HTTP 500 Status Internal Service Error
* response. Used when an unexpected error
* occu... |
void main(){
int num1=2;
int num2=3;
// if(num1==num2){
// print("Equal");
// }
// else if(num1<num2){
// print("$num2 is greater than $num1");
// }
// else{
// print("$num1 is greater than $num2");
// }
bool isEven=true;
// if(isEven){
// print("True");
// }
// else{
// ... |
import { parseSize } from '../utils'
const data = {
flexauto: {
'flex': '1 1 auto',
},
flexinitial: {
'flex': '0 1 auto',
},
flexnone: {
'flex': 'none',
},
}
/**
* flex
* flexAuto flex: 1 1 auto;
* flexInitial flex: 0 1 auto;
* flexNone flex: 'none';
* flex-1-2-auto flex: 1-2-auto;
*/
ex... |
! Create the righthand side to the elliptic equation that is solved in
! the MAC project step, \beta0 * (S - \bar{S}). For the MAC projection,
! this quantity is cell-centered.
!
! Note, we include the delta_gamma1_term here, to (possibly) account for
! the effect of replacing \Gamma_1 by {\Gamma_1}_0 in the constra... |
import { config } from './fragments.config';
export const WHITE = config.colors.white;
export const GREY_100 = config.colors['grey-100'];
export const GREY_200 = config.colors['grey-200'];
export const GREY_300 = config.colors['grey-300'];
export const GREY_400 = config.colors['grey-400'];
export const GREY_500 = con... |
CREATE TABLE IF NOT EXISTS rdm.application (
code VARCHAR PRIMARY KEY,
name VARCHAR,
system_code VARCHAR,
CONSTRAINT application_system_fk FOREIGN KEY (system_code) REFERENCES rdm.system(code)
);
COMMENT ON TABLE rdm.application IS 'Приложения';
COMMENT ON COLUMN rdm.application.code IS 'Код приложения';
COMME... |
import Pmw
from Tkinter import *
from tkSimpleDialog import Dialog
import os,string
from tv import readCT
class viewCT(Dialog):
"ColorTable(Dialog) - dialog to preview color table"
def body(self,master):
self.cwidth = 256
self.cheight = 40
self.title("Color Table Dialog...")
self.canvas = Canvas(master,wi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.