text stringlengths 27 775k |
|---|
-- Test cases for JitCert.Analysis.
module Analysis where
import Control.Monad
import Data.Digest.Pure.SHA
import Test.HUnit
import JitCert.Analysis
import JitCert.Context
import JitCert.Docs
import JitCert.Docs.Shared
import JitCert.GSN.Builder
tests = TestList [testCheckUnboundFigure6, testShadowedFigure5, testCh... |
package com.nexthink.utils.parsing.distance
import java.util
import scala.collection.JavaConverters._
object DiceSorensenDistance {
def diceSorensenSimilarity(a: String, b: String): Double = {
val aWords = tokenizeWords(a.toLowerCase)
val bWords = tokenizeWords(b.toLowerCase)
val ... |
<?php namespace Slackwolf;
use React\EventLoop\Factory;
use Slack\ConnectionException;
use Slack\RealTimeClient;
use Slackwolf\Game\Command\AliveCommand;
use Slackwolf\Game\Command\DeadCommand;
use Slackwolf\Game\Command\EndCommand;
use Slackwolf\Game\Command\GuardCommand;
use Slackwolf\Game\Command\HealCommand;
use S... |
/*
* @Author: lihuan
* @Date: 2022-01-01 23:43:51
* @LastEditors: lihuan
* @LastEditTime: 2022-01-04 19:44:24
* @Email: 17719495105@163.com
*/
import { memo } from 'react';
import { Swiper } from 'antd-mobile';
import { SwiperWrapper } from './style';
import { IBanner } from '@/api/home/model';
const LHSwiper... |
namespace AudioPlayerManager.Common
{
public enum Sound
{
CoinCollect = 0,
DoorClose = 1,
DoorOpen = 2,
EnemyDie = 3,
EnemyRoar = 4,
EnemySpeak = 5,
GameOver = 6,
Punch01 = 7,
Punch02 = 8,
Punch03 = 9,
Win = 10,
You... |
#!/usr/bin/env ruby
# coding: utf-8
Gem::Specification.new do |spec|
spec.name = "casjaysdev-jekyll-theme"
spec.version = "0.1.8"
spec.authors = ["CasjaysDev"]
spec.email = ["gem-admin@casjaysdev.com"]
spec.summary = "CasjaysDev jekyll theme"
spec.homepage = "https:... |
from __future__ import absolute_import
import os
import zmq
import uuid
import binascii
import random
import socket
import struct
import six.moves.cPickle
import marshal
import mmap
from multiprocessing import Manager, Condition
from mmap import ACCESS_WRITE, ACCESS_READ
from dpark.util import compress, decompress, sp... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Auth;
class PokemonController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$userActual = Auth::User();
if($us... |
<?php
/**
* @filesource modules/index/models/memberstatus.php
*
* @copyright 2016 Goragod.com
* @license http://www.kotchasan.com/license/
*
* @see http://www.kotchasan.com/
*/
namespace Index\Memberstatus;
use Gcms\Config;
use Gcms\Login;
use Kotchasan\Http\Request;
use Kotchasan\Language;
/**
* module=memb... |
#include <iostream>
#include "sampler/metropolis/metropolis.h"
#include "sampler/gibbs/gibbs.h"
using namespace std;
int main() {
// filenames
string filename = "RBMoutput.txt";
string blockFilename = "blocking.txt";
// Nqs parameters
int nx = 4; // Number which represent... |
using Shared.Models;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
namespace Client.Services
{
class NetworkSevice : INetworkService
{
private const int PORT = 8080;
private con... |
<?php
namespace App\Http\Controllers;
use Auth;
use Illuminate\Http\Request;
use App\User;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Session;
class AuthController extends Controller
{
public function login(){
return view('auth.login');
}
public function postlogin(Request... |
# frozen_string_literal: true
module ::Salesforce
class Contact < Person
ID_FIELD = "salesforce_contact_id"
SOURCE = "Web"
OBJECT_NAME = "Contact"
def self.group
Salesforce.contacts_group
end
def self.payload(user)
user.salesforce_contact_payload
end
end
end
|
using NUnit.Framework;
using Shouldly;
namespace Eshop.Domain.UnitTests.Customers
{
[TestFixture]
public class when_setting_delivery_address : CustomerWithDeliveryAddressSetSetup
{
[Test]
public void delivery_address_is_set()
{
Customer.DeliveryAddress.ShouldB... |
import 'isomorphic-fetch';
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
export declare const fetchAsync: (endpoint: string, options?: RequestInit, timeoutMs?: number) => Promise<Response>;
//# sourceMappingURL=fetch_async.d.ts.map |
import { MyService } from './service';
import sinon from 'sinon';
import { expect } from 'chai';
describe('61695981', () => {
let clock;
before(() => {
clock = sinon.useFakeTimers();
});
after(() => {
clock.restore();
});
it('should pass', async () => {
const service = new MyService();
co... |
---
layout: post
microblog: true
date: 2008-02-20 19:00 -0500
guid: http://bdougherty.micro.blog/2008/02/21/t737690092.html
---
Rochester clouds = lunar eclipse fail
|
import numpy as np
import sys
np.set_printoptions(threshold=sys.maxsize)
from scipy.ndimage.interpolation import zoom
arr = np.random.uniform(size=(4,4))
arr = zoom(arr, 8)
arr = arr > 0.5
arr = np.where(arr, '-', '#')
arr = np.array_str(arr, max_line_width=500)
print(arr) |
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
public class MandelbrotBW {
public static void main(String[] args) throws Exception {
int width = 1920, height = 1080, max = 5000;
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE... |
CREATE TABLE EGTL_DEMAND_VOUCHER
(
ID BIGINT NOT NULL,
LICENSEDETAIL BIGINT NOT NULL,
VOUCHERHEADER BIGINT NOT NULL,
VERSION NUMERIC DEFAULT 0,
CREATEDBY BIGINT NOT NULL,
LASTMODIFIEDBY BIGINT NOT NULL,
CREATEDDATE TIMESTAMP WITHOUT TIME ZONE NOT NULL,
LASTMODIFIEDDATE TIMESTAMP WITHOUT TIME ZONE NOT NU... |
/*
* Copyright (C) 2015 Square, 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 agre... |
--
-- Base de datos: `newsletter`
--
CREATE DATABASE IF NOT EXISTS `newsletter` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `newsletter`;
--
-- Estructura de tabla para la tabla `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
... |
import React from "react";
interface TokenObject {
value: string | null;
set(a: string): void;
}
const TokenContext = React.createContext({
value: "",
set: (a: string) => {},
} as TokenObject);
export { TokenContext };
|
# Copyright 2020-2021 Couchbase, 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 ... |
//-----------------------------------------------------------------------------
// <copyright file="JsonAssert.cs" company=".NET Foundation">
// Copyright (c) .NET Foundation and Contributors. All rights reserved.
// See License.txt in the project root for license information.
// </copyright>
//-------------... |
use std::io::{Error, BufRead, BufReader};
use std::fs::File;
use std::path::Path;
use async_std::task;
use sqlx::Connection;
use sqlx::any::AnyConnection;
use sqlx::any::AnyQueryResult;
const CONFIG: &str = "/root/confixx/confixx_main.conf";
pub fn is_confixx() -> bool {
if Path::new(CONFIG).exists() {
... |
# Configuration
If for any reason, this library fails to detect the actual type of the field type, application
developers can make a shortcut and tell the type from configuration.
To do this, the `migration.compatibility.map.<referenced_table>.<referenced_field>` configuration
value has to be set.
## Examples
To te... |
## iOS 平台手动集成
拖拽下列 framework 从 `InMobi` 插件包的 __plugins/ios__ 目录到您的 Xcode 工程中,在添加 frameworks 的时候,请勾选 `Copy items if needed`:
> sdkbox.framework
> PluginInMobi.framework
上面的 frameworks 依赖于其他 frameworks。如果您没有添加它们,您也需要添加下列这些 frameworks:
> AdSupport.framework
> AudioToolbox.framework
> AVFoundation.framework
> CoreLo... |
[BITS 16]
%define KERNEL_BASE_SEGMENT 0x0800
%define BOOT_SECTOR_BASE_SEGMENT 0x07C0
%define STACK_SEGMENT 0x00
%define STACK_OFFSET 0x6FFF
%define NB_SECTORS_TO_COPY 128
global _start
_start:
jmp _boot_sector_start
%include "includes/utils.inc"
_boot_sector_start:
sti
mov ax, BOOT_SECTOR_BASE_SEGMENT
... |
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace GeoJSON {
[System.Serializable]
public class FeatureObject {
public string type;
public GeometryObject geometry;
public Dictionary<string, string> properties;
public FeatureObject(JSONObject jsonObject) {
type =... |
/*
* Copyright 2020 James Courtney
*
* 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... |
dep 'apache bench' do
requires \
'tap'.with('apache'),
'ab.managed'
end
dep 'ab.managed' do
provides "ab"
end
|
; ModuleID = '/home/david/src/c-semantics/tests/unitTests/weirdmain.c'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define i32 @main(i32 %argc, i8** %arg... |
class CssRegressionTest
require 'capybara'
include Capybara::DSL
class << self
attr_accessor :default_key_mode
attr_accessor :durable_asset_path
attr_accessor :temp_asset_path
attr_accessor :base_asset_path
end
self.default_key_mode = [:path, :query, :fragment]
self.durable_asset_path = ['... |
# -*- coding: utf-8 -*-
# @Brief: 不同数据集的父类实现
import numpy as np
import glob
from PIL import Image
import cv2 as cv
import os
import core.config as cfg
class Dataset:
def __init__(self, target_size=(320, 320), num_classes=21):
self.target_size = target_size
self.num_classes = num_classes
def ... |
import { Component } from 'react'
import Link from 'next/link'
import Layout from '../components/Layout'
import ajax from '../ajax'
export default class HomePage extends Component {
state = {
posts: [],
}
async componentDidMount() {
const res = await ajax('posts')
if (res.data.ok) {
this.setSt... |
#!/usr/bin/env bash
# vi: ft=sh
# @brief Cache sourced in entrys iusing BASH 4+ associative
# arrays.
#
declare cache_is_supported
export cache_is_supported=1
function cache.init() {
if bashmatic.bash.version-four-or-later ; then
declare -A item_cache_map 2>/dev/null
declare -A caches_cache_map 2>/d... |
import { IInstance, IInstanceContext } from 'altinn-shared/types';
export function buildInstanceContext(instance: IInstance): IInstanceContext {
if (!instance) {
return null;
}
const instanceContext: IInstanceContext = {
appId: instance.appId,
instanceId: instance.id,
instanceOwnerPartyId: insta... |
RACK_ENV = 'test'.freeze unless defined?(RACK_ENV)
require File.expand_path(File.dirname(__FILE__) + '/../config/boot')
require File.dirname(__FILE__) + '/../app/helpers/wanikani_api'
require File.dirname(__FILE__) + '/../app/helpers/wkanki_helper'
require 'capybara'
require 'capybara/dsl'
Capybara.app = Wkanki::App
... |
//
// IOS11Adapter.h
// VansLive
//
// Created by xinwei on 2017/11/3.
// Copyright © 2017年 Xiaomi. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface IOS11Adapter : NSObject
+ (void)scrollViewContentInsetAmendment:(UIScrollView *)scrollView;
+ (void)tableViewCancelEstimatedSeriesFunction:(UITableView *)... |
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* 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 ... |
require 'rails_helper'
RSpec.describe Api::V1::CurrenciesController, type: :request do
let(:user) { create(:user) }
let(:requested_day) { Time.parse('2020-10-10') }
let!(:currency) do
create(:currency, valid_at: requested_day, daily_rates: { 'USD' => { value: 3.0 } })
end
before { travel_to req... |
<?php
namespace spec\Bxav\Component\ResellerClub\Model;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Bxav\Component\ResellerClub\Model\ResellerClubClient;
use Bxav\Component\ResellerClub\Model\JsonResponse;
use Bxav\Component\ResellerClub\Model\Customer;
use Bxav\Component\ResellerClub\Model\Response;
clas... |
#!/bin/bash
ROOTS=( \
"/" \
"/android" \
"/android/tools-base" \
)
export ROOTS
function all_tags_remote() {
repo=$(case "$1" in
("/") echo "community.git" ;;
("/android") echo "android.git" ;;
("/android/tools-base") echo "adt-tools-base.git" ;;
(*) exit 1 ;;
esac)
echo "git://git.labs.int... |
namespace WpfAnalyzers.Test.WPF0006CoerceValueCallbackShouldMatchRegisteredNameTests
{
using Gu.Roslyn.Asserts;
using NUnit.Framework;
public class ValidCode
{
private static readonly PropertyMetadataAnalyzer Analyzer = new PropertyMetadataAnalyzer();
[Test]
public void Depende... |
from compressor_toolkit.precompilers import SCSSCompiler, ES6Compiler
def test_scss_compiler():
"""
Test ``compressor_toolkit.precompilers.SCSSCompiler`` on simple SCSS input.
"""
input_scss = '''
.a {
.b {
padding: {
left: 5px;
right: 6px;
}
}
}... |
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.
package marketplace
import (
"bytes"
"encoding/json"
"fmt"
"net"
"net/http"
"net/url"
"time"
"github.com/scaleway/scaleway-sdk-go/internal/errors"
"github.com/scaleway/scaleway-sd... |
package kata
import "unicode"
func Solve(s string) []int {
cnt_upper := 0
cnt_lower := 0
cnt_digit := 0
cnt_other := 0
for _, c := range s {
switch {
case unicode.IsUpper(c):
cnt_upper++
case unicode.IsLower(c):
cnt_lower++
case unicode.IsDigit(c):
cnt_digit++
default:
cnt_other++
}
}
r... |
package com.example.data.api
import com.example.data.constant.*
import com.example.data.entity.film.FilmEntity
import com.example.data.entity.film.FilmsResponse
import com.example.data.entity.person.PeopleResponse
import com.example.data.entity.person.PersonEntity
import com.example.data.entity.planet.PlanetEntity
imp... |
## `java:openjdk-6b38-jdk`
```console
$ docker pull java@sha256:c5a8b342ca8c70d4b347cf4dfbff6f2823822d15b2fe1ae4bd9a5bda5a2c89ed
```
- Platforms:
- linux; amd64
### `java:openjdk-6b38-jdk` - linux; amd64
- Docker Version: 1.12.3
- Manifest MIME: `application/vnd.docker.distribution.manifest.v2+json`
- Total Size: ... |
using System.Collections.Immutable;
using BenchmarkDotNet.Attributes;
namespace ImmutableListBuilderBenchmark;
[MemoryDiagnoser]
public class ImmutableBenchmark
{
private readonly List<int> _collection;
public ImmutableBenchmark()
{
_collection = Enumerable.Range(0, 1_000).ToList();
}
... |
import { put, all, takeEvery } from 'redux-saga/effects';
import axios from 'axios';
import { SUBMIT_ACTION } from './constants';
import { ServerDataLoaded, ServerDataLoadingError, PostDataLoaded } from './actions';
export function* callDataSaga() {
try {
const equipmentData = yield axios.get('http://manufactur... |
'use strict'
const path = require('path')
function resolve(dir = '') {
return path.join(__dirname, dir)
}
const name = 'vtz-ui' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
// For example, Mac: sudo npm run
// You can change the port by the following me... |
interface GameOver {
winner: number;
}
interface Random {
D6: () => number;
}
interface Events {
endTurn: () => void;
}
export interface GameContext {
numPlayers: number;
turn: number;
currentPlayer: number;
gameover?: GameOver;
random: Random;
events: Events;
}
|
#!/bin/bash
#
# [DNB 7-Jun-2018] Script to upgrade galaxy instance
#
# ==================================================
#
# Some variables
NGINX_CLOUDMAN_TEMPLATE=/opt/cloudman/config/conftemplates/nginx_galaxy_locations
NGINX_FILE=/etc/nginx/sites-enabled/galaxy.locations
GALAXY_ROOT=/mnt/galaxy/galaxy-app
# Funct... |
%%%===================================================================
%%% @copyright (C) 2012, Erlang Solutions Ltd.
%%% @doc Module abstracting Websockets over TCP connection to XMPP server
%%% @end
%%%===================================================================
-module(escalus_ws).
-behaviour(gen_server).
-b... |
rm -rf ./output-testnet/ks/*
rm -rf ./output-testnet/gpkKs
rm -rf ./output-testnet/ks/*
rm -rf ./output-testnet/gskList
rm -rf ./output-testnet/nodeKeyList
rm -rf ./output-testnet/RelationList
rm -rf ./output-testnet/WalletAddList
rm -rf ./output-testnet/WorkingAddList
cp ./output/ks_admin/* ./output-testnet/ks |
console.log('blah');
huh = function anotherDependency() {
console.log('we are in dep2');
};
module.exports = {
anotherDependency: anotherDependency
};
|
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormatRoutingModule } from './format-routing.module';
import { FormatEditComponent } from './edit/format-edit.component';
import { FormatListComponent } from './list/format-list.component';
import { FormatCardComponent }... |
require "sass"
require "compass"
require "fancy-buttons"
begin
require "yui/compressor"
rescue LoadError
puts "YUI-Compressor not available. Install it with: gem install yui-compressor"
end
module Middleman::Sass
def self.included(base)
base.supported_formats << "sass"
end
def render_path(path, layout)... |
#! /bin/bash
# This a simple build script which uses sub-scripts to build an X.Org server
# from scratch, along with all of it's necessary dependencies.
START_DIR=$(pwd)
SCRIPT_DIR="$START_DIR/build_scripts/xorg"
PACKAGE_DIR="$START_DIR/packs/xorg"
XORG_CONFIG="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --d... |
<?php
namespace TheFox\Network;
class Network
{
const NAME = 'Network';
const VERSION = '1.2.0-dev.1';
}
|
import * as express from 'express';
import { createServer, Server } from 'http';
import PoweredUP = require('node-poweredup');
import * as socketIo from 'socket.io';
import { HubController } from './controllers/hubController';
import { ILedRequest } from './interfaces/ILedRequest';
import { IMotorAngleRequest } from '... |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- |Strict encoder
module Flat.Encoder.Strict where
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as L
im... |
using System;
namespace Many.Mocks.Tests.TestClasses
{
public class ImplIClass3Bis :IClass3
{
public static int ValidMocksInConstructor = 2;
public static int NotValidMocksInConstructor = 0;
public ImplIClass3Bis(IClass2 class1, IClass1 class2)
{
}
... |
#!/bin/bash
DEFAULT_UWKGM_MASTER_HOST=http://localhost
DEFAULT_UWKGM_EXT_HOST=http://localhost
DEFAULT_UWKGM_GRAPH=http://dbpedia.org
echo "Initializing configurations for deployment and update..."
read -p "[UWKGM: INPUT] Local environment (production*, pre-release, production:ext, pre-release:ext): " INIT_UWKGM_ENV... |
import getData from './getData';
const initialize = (projects, id) => {
if (localStorage.getItem('projects') == null) {
projects = [];
} else {
projects = getData('projects');
}
if (localStorage.getItem('currentId') == null) {
id = 0;
} else {
id = getData('currentId');
}
return ({ proje... |
---
layout: post
title: "C# Fragment : Event and Delegate"
date: 2019-04-19
excerpt: ""
tag:
- C#
- Event
- Delegate
---
# 委托
委托的实质是一个类。
```c#
// 委托定义
delegate ReturnType DelegateName([parameters]);
// 委托声明
DelegateName delegateInstance = new DelegateName();
// 委托赋值
delegateInstance = delegateFunctionName1;
// 绑定... |
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
describe Praxis::Mapper::Query::Base do
let(:scope) { {} }
let(:unloaded_ids) { [1, 2, 3] }
let(:connection) { double("connection") }
let(:identity_map) { double("identity_map", :scope => scope, :get_unloaded => unloaded_ids) }
let(:mod... |
#! /bin/bash
PRGNAME="lame"
### LAME (LAME Ain't an Mp3 Encoder)
# Утилиты для кодирования аудио в формат MP3. LAME - рекурсивный акроним для
# Ain’t an MP3 Encoder (LAME - это не MP3-кодировщик), относящийся к ранней
# истории LAME, когда он не был кодером в полной мере, а входил в
# демонстрационный код ISO
# Requ... |
import fs from "fs";
import parse from "../parse";
import { logWarning } from "../log";
jest.mock("../log", () => ({
__esModule: true,
logMessage: jest.fn(),
logWarning: jest.fn()
}));
const parsed = parse(fs.readFileSync("tests/.env", { encoding: "utf8" }));
describe("Parse Method", () => {
it("returns an o... |
<x-page
title="Websites & webapplications in Laravel"
background="/backgrounds/home-2020.jpg">
<x-slot name="description">
Spatie is a digital allrounder: we design solid websites & web applications using Laravel & Vue. No frills, just
proven expertise. From Antwerp, Belgium
</x-... |
package eu.xenit.alfred.initializr.start.sdk.alfred.platform;
import eu.xenit.alfred.initializr.start.project.alfresco.artifacts.AlfrescoVersionArtifactSelector;
import eu.xenit.alfred.initializr.start.project.alfresco.platform.AlfrescoPlatformModule;
import io.spring.initializr.generator.condition.ConditionalOnBuildS... |
---
title: API Reference
permalink: /docs/api/
layout: docs
category: ignore
breadcrumb: API
---
<h2 class="docs-heading pb-3 mb-3"><span class="mega-octicon octicon-gear pr-3"></span>API Reference</h2>
<table class="table table-ruled table-full-width table-with-spacious-second-column">
<tr>
<th>API</th><th>Process... |
package typingsSlinky.awsSdk.ec2Mod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait Region extends StObject {
/**
* The Region service endpoint.
*... |
package com.gabrielbmoro.programmingchallenge.repository
import com.gabrielbmoro.programmingchallenge.repository.entities.Movie
import com.gabrielbmoro.programmingchallenge.repository.retrofit.ApiRepository
import com.gabrielbmoro.programmingchallenge.repository.retrofit.responses.PageResponse
import com.gabrielbmoro.... |
TASK=RTE
for SEED in 3 7 42 50 87
do
CUDA_VISIBLE_DEVICES=2 python predict.py \
--task $TASK \
--output_dir ./outputs/rte/$SEED/ \
--data_dir RTE-bin
done |
module MailerHelper
def total_movements_values(movements)
movements.values.collect(&:to_i).inject(:+)
end
def calcular_valor_total_licenca(licencas, movimentacoes_quantidades)
soma = 0
licencas.each do |licenca|
soma += movimentacoes_quantidades[licenca.id.to_s].to_i * licenca.valor_unitario
... |
using ODEInterfaceDiffEq, DiffEqProblemLibrary, DiffEqBase
using Test
@time @testset "Algorithms" begin include("algorithm_tests.jl") end
@time @testset "Saving" begin include("saving_tests.jl") end
@time @testset "Mass Matrix" begin include("mass_matrix_tests.jl") end
@time @testset "Jacobian Tests" begin include("ja... |
<?php
namespace Tests\Feature;
use App\Persona;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Http\Response;
use Tests\TestCase;
class PersonasTest extends TestCase
{
use RefreshDatabase, WithFaker;
/** @test */
public function se_puede... |
/*
* Copyright (c) 2019. Ang Hou Fu.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
import {CHECK_BOX, CheckBox, ItemExpress, ItemFull} from "../src";
describe('CheckBox -- ', () => {
describe('Should convert from an Item. ', function () {
it('An Ite... |
using LLMerge2Lists;
using System;
using Xunit;
namespace Merge2ListsTests
{
public class UnitTest1
{
[Fact]
public void CanMerge2Lists()
{
//Arrange
LinkList llOne = new LinkList();
llOne.Add(new Node(31));
llOne.Add(new Node(8));
... |
from helper.ptt_class import ptt_craw
from db.connect import Heroku_DB
from imgur.upload import uploader
import os
import requests
if __name__ == "__main__":
ptt_beauty_album_id = os.environ.get('ptt_beauty_Album_ID')
# conn = Heroku_DB()
uploader = uploader()
ptt_craw = ptt_craw()
content, ind... |
#if XAMARIN_APPLETLS
#if XAMARIN_NO_TLS
#error THIS SHOULD NEVER HAPPEN!!!
#endif
//
// MobileTlsStream.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2015 Xamarin, Inc.
//
using System;
using System.IO;
using System.Linq;
using SD = System.Diagnostics;
using System.Collections... |
import Rect from '../geometry/Rect';
import Node from '../cells/Node';
import RemarkView from './RemarkView';
class Remark extends Node {
isRemark() {
return true;
}
getRemark() {
return this.data.name || '';
}
getBBox() {
const size = this.getSize();
const position = t... |
import { INode } from ".";
export function delay(ms: number) {
return new Promise((resolve: any) => {
setTimeout(resolve, ms);
})
}
export function shuffle(array: any[]) {
let m = array.length;
while (m) {
// 选出一个剩余的元素
const i = Math.floor(Math.random() * m--);
// 交换两个元素
const t = array... |
//..............................................................................
//
// This file is part of the AXL library.
//
// AXL is distributed under the MIT license.
// For details see accompanying license.txt file,
// the public copy of which is also available at:
// http://tibbo.com/downloads/archive/axl/... |
package br.com.zup.clients.itau.response
import br.com.zup.TipoConta
import br.com.zup.chave.cadastro.Conta
data class DadosContaItauResponse(
val tipo: TipoConta,
val instituicao: InstituicaoItauResponse,
val agencia: String,
val numero: String,
val titular: TitularItauResponse
) {
fun toMode... |
// import { Expect, SetupFixture, Teardown, TeardownFixture, Test, TestFixture } from 'alsatian';
// import * as fs from 'fs';
// import * as path from 'path';
// import { read, readPromise, readSync } from './read';
// @TestFixture('Extract Tests')
// export class ExtractTests {
// public outputFolderPath = '';
/... |
use crate::abpoa::{
abpoa_add_graph_edge, abpoa_add_graph_node, abpoa_align_sequence_to_graph, abpoa_dump_pog,
abpoa_init, abpoa_init_para, abpoa_msa, abpoa_para_t, abpoa_post_set_para, abpoa_res_t,
abpoa_t, free, strdup, ABPOA_CDEL, ABPOA_CDIFF, ABPOA_CHARD_CLIP, ABPOA_CINS, ABPOA_CMATCH,
ABPOA_CSOFT_C... |
<?php
namespace App\Controllers;
class Profile extends BaseController {
public function index()
{
echo view('template/header');
echo view('content/profile');
echo view('template/footer');
}
} |
'use strict';
var psTree = require('ps-tree');
module.exports = function kill(pid, signal, cb) {
if (!pid) {
throw new Error('You must provide pid to kill.');
}
if (typeof signal === 'function') {
cb = signal;
signal = null;
}
if (!cb) {
throw new Error('You must provide a callback functio... |
package database
import (
"errors"
"fmt"
"github.com/apex/log"
"github.com/gomodule/redigo/redis"
"time"
"unsafe"
)
type SubscribeCallback func(channel, message string)
type Subscriber struct {
client redis.PubSubConn
cbMap map[string]SubscribeCallback
}
func (c *Subscriber) Connect() {
conn, err := GetRe... |
#!/bin/bash
function usage(){
printf "\n$(basename $0) [OPTIONS]\n"
cat $0 | grep -E "[$1]\) # --.*$"
exit 0
}
# Check no arguments
[ $# -eq 0 ] \
&& printf "No arguments provided and exiting\n"
: ${DATALOAD_S3_ROOT:?"AWS S3 root path not defined; Exiting Script"}
while getopts "f:l:p:s:u" option; ... |
<?php
namespace Curl\Test\Unit;
use shuber\Curl\Curl;
class CurlTest extends \PHPUnit_Framework_TestCase {
/**
* @test
*/
function itAllowsAddingHeaders()
{
$curl = new Curl;
$curl->add_header('Expect', '');
$this->assertEquals(array('Expect' => ''), $curl->headers);
... |
import 'dart:async';
import 'dart:convert';
import 'dart:isolate';
import 'package:chainmetric/models/readings/readings.dart';
import 'package:chainmetric/shared/logger.dart';
import 'package:flutter/services.dart';
import 'package:streams_channel2/streams_channel2.dart';
import 'package:talos/talos.dart';
import 'pac... |
package me.cassayre.florian.masterproject.legacy.parser
import scala.util.parsing.input.{Reader, Position, NoPosition}
private[parser] class SCTokensReader(tokens: Seq[SCToken]) extends Reader[SCToken] {
override def first: SCToken = tokens.head
override def atEnd: Boolean = tokens.isEmpty
override def pos: Pos... |
import PropTypes from 'prop-types'
import React from 'react'
import generateScriptLoader from '../util/generateScriptLoader'
import AppLoadingScreen from './AppLoadingScreen'
// todo: investigate this. Doesn't seem like NODE_ENV gets set on sanity.io
const ENV = process.env.NODE_ENV || 'development'
function assetUrl... |
package providers
import (
"gitlab.com/nxcp/tools/gophercloud"
"gitlab.com/nxcp/tools/gophercloud/pagination"
)
// Provider is the Octavia driver that implements the load balancing mechanism
type Provider struct {
// Human-readable description for the Loadbalancer.
Description string `json:"description"`
// Hum... |
---
layout: page
title: "Página no encontrada"
permalink: /404.html
hide: true
---
Lo sentimos, pero no hemos podido encontrar la página que buscas.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.