text stringlengths 27 775k |
|---|
import React from 'react';
import {
Provider,
} from 'react-redux';
import './App.css';
import Store from './store/Store';
import PageLoader from './pageRenderer/PageLoader';
function App() {
return (
<Provider store={Store}>
<PageLoader />
</Provider>
);
}
export default App;
|
import {Module} from "../module";
import {Util} from "../util";
import {PuzzleJs} from "../puzzle";
import {EVENT, LOG_COLORS} from "../enums";
export interface IFragmentInfo {
[fragmentName: string]: {
[name: string]: any
}
}
export class Fragments extends Module {
set(fragmentInfo: IFragmentInfo) {
Ut... |
@extends('layouts.backend')
@section('content')
<div class="page-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-xl-3 col-lg-4 col-md-12 theiaStickySidebar">
<aside class="sidebar sidebar-user">
<div class="card ctm-border-radius shadow-sm">
<div clas... |
import './model/article.model'
import './model/banner.model'
import './model/category.model'
import './model/equipment.model'
import './model/hero.model'
import './model/rune.model'
import './model/homeHeroBanner.model'
import './model/homeVideo.model'
/** @description {引入一遍所有的model,避免一部分model没有被引入,populate时查询不... |
import Redis from 'ioredis';
import { EventEmitter } from 'events';
import RVDNode from './RVDNode';
import getLogger, { LoggerClass } from './logger';
const { debug, printinfo, printerror } = getLogger().getContext('flow');
export class RVDController extends EventEmitter {
constructor(params = {}) {
super(para... |
#!/usr/bin/env sh
if [ "$#" -ne "2" ]; then
echo "Two arguments must be set e.g. ./update-user.sh email user(json)"
exit 1
fi
curl -X PUT --data "$2" "username:password@localhost:8080/v1/admin/users/$1" -v
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
namespace BForms.Grid
{
public class BsGridRowConfigurator<TRow> where TRow : new()
{
private Func<TRow, Dictionary<string, object>> htmlAttributes;
... |
Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
root 'application#index'
# Provide a route for :provider strategies to "call back" to
# after the authenticating 3rd party decides whether the user has passed or failed authentic... |
[瞎搞系列之上一篇:vue转react系列-API封装](https://juejin.cn/post/6964316996531929125)
你是否在为reduce各种switch而烦恼,是不是对各种case代码而落泪,想要代码写的优雅,请你继续往下看
又是一个vue转react的娱乐封装,下面展示利用vuex的写法去改造reducer
## vuex温习
- state
- mutations
- actions
- getters
```javascript
const store = {
state: {
list: []
},
// 派生
getters: {
todoList(... |
<?php
namespace Oro\Bundle\CalendarBundle\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Persistence\ManagerRegistry;
use Oro\Bundle\SecurityBundle\Sec... |
package com.android.taitasciore.privaliatest.data.repository
import com.android.taitasciore.privaliatest.domain.model.Movie
import io.reactivex.Observable
interface MovieRepository {
fun getPopularMovies(page: Int): Observable<List<Movie>>
fun searchMovies(query: String, page: Int): Observable<List<Movie>>
... |
package com.pechuro.bsuirschedule.domain.interactor
import com.pechuro.bsuirschedule.domain.common.BaseInteractor
import com.pechuro.bsuirschedule.domain.entity.Lesson
import com.pechuro.bsuirschedule.domain.entity.WeekNumber
import com.pechuro.bsuirschedule.domain.repository.IScheduleRepository
import javax.inject.In... |
package com.github.davidmoten.bigsorter;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.I... |
module Types
class MutationType < Types::BaseObject
field :create_draft_prospect, mutation: Mutations::CreateDraftProspect
end
end
|
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond ... |
<?php
trait Company {
public function getName() {
return 'Facebook';
}
}
class English {
use Company;
public function getHi() {
return "Hi ";
}
public function sayHello() {
echo $this->getHi() . $this->getName();
}
}
$e = new English();
$e->sayHello();
?>
|
package com.chetantuteja.easy_binding_tutorial.activites
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.chetantuteja.easy_binding_tutorial.R
import com.chetantuteja.easy_binding_tutorial.fragments.ExampleFragment
import com.chetantuteja.easy_binding_tutorial.utils.performFragmentTr... |
<?php
namespace ComunidadAEI\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str as Str;
use Illuminate\Support\Facades\Storage;
use ComunidadAEI\Perfil_Empresa;
class MisLogrosController extends Controller
{
public function Index($slug_empresa)
{
... |
package powercraft.api.gres;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.inv... |
package fonts
import (
"fmt"
"github.com/faiface/pixel"
"github.com/faiface/pixel/text"
"github.com/golang/freetype/truetype"
"image/color"
"io/ioutil"
"os"
"retro-carnage/engine/geometry"
"retro-carnage/logging"
"unicode"
)
const (
defaultFontPath = "./fonts/XXII-DIRTY-ARMY.ttf"
maxFontSize = 52
)
v... |
namespace Assets.Scripts.Manager.Input
{
/// <summary>
/// UI用のマップIDを定義する定数クラス
/// </summary>
public static class UIMapId
{
public const int Menu = 1;
public const int Num = 1;
}
/// <summary>
/// キャラクター用のマップIDを定義する定数クラス
/// </summary>
public static class PMapId
{
public const int Normal = 1;
publi... |
#!/bin/sh
mkdir -p result
dataset="kdd"
#dataset="synthetic"
T=11
P=10
Q=5
R1=100
R2=10000
K=20
theta=0.01
./blesimrank $dataset $T $P $Q $R1 $R2 $K $theta | tee info.log |ccze
|
package api
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
// CreateAlertRequest the API request to be made to
// create a victorops alert
type CreateAlertRequest struct {
MessageType MessageType `json:"message_type,omitempty"`
EntityID string `json:"entity_id,omitempty"`
... |
using Commander.NET.Attributes;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZemberekDotNet.Classification;
using ZemberekDotNet.Core;
using static ZemberekDotNet.Core.Embeddings.FastText;
namespa... |
using System;
using System.Diagnostics;
using System.Windows.Forms;
using ResourceManager;
namespace GitExtensions.AzureDevOpsCommitMessage
{
public class LinkLabelOpener : LinkLabel
{
private static readonly string LinkInvalid = new TranslationString("The link to open is invalid").Text;
... |
module DatabaseTransactions
extend ActiveSupport::Concern
included do
around_action :wrap_in_transaction, if: :should_wrap_in_transaction?
end
def wrap_in_transaction
ActiveRecord::Base.transaction do
yield if block_given?
end
end
def should_wrap_in_transaction?
request.put? || reque... |
namespace Melville.FileSystem
{
/// <summary>
// Converts a file path into an IFile
/// </summary>
public interface IDiskFileSystemConnector
{
/// <summary>
/// Returns an IFile corresponding to a given file path
/// </summary>
/// <param name="path">the path of the file to retrieve</param>
... |
package com.prasan.kotlinmvvmhiltflowapp.data.datamodel
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class Photo(
@Json(name = "aperture")
val aperture: String?,
@Json(name = "camera")
val camera: String?,
@Json(name = "category")
... |
use crate::{
constants::*,
nlas::{WgPeer, WgPeerAttrs},
};
use anyhow::Context;
use byteorder::{ByteOrder, NativeEndian};
use netlink_packet_utils::{
nla::{Nla, NlaBuffer, NlasIterator},
parsers::*,
traits::*,
DecodeError,
};
use std::{convert::TryInto, mem::size_of_val};
#[derive(Clone, Debug,... |
#!/bin/sh
write_file() {
eval touch DB.txt
echo "Type the first name and phone number"
eval cat >DB.txt
}
write_file
exit 0
|
:- module(main, []).
/** <module> The main module */
:- use_module(library(bc/bc_env)).
:- dynamic(started/0).
% Catch uncaught errors/warnings before start and shut down
% when they occur.
user:message_hook(Term, Type, _):-
\+ started,
( Type = error ; Type = warning ),
message_to_string(Term, String)... |
import 'base.dart';
import 'package:ynab/extensions/ynab_datetime.dart';
import 'response.dart';
class MonthsApi extends BaseApi {
MonthsApi(Configuration configuration) : super(configuration);
Future<YNABResponse> getMonths(
String budgetId, [
int lastKnowledgeOfServer,
]) =>
makeRequest(
... |
package com.booking.pages;
import org.apache.logging.log4j.Logger;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static com.booking.utilities... |
# frozen_string_literal: true
module ActiveRecordShards
module Model
def not_sharded
if self != ActiveRecord::Base && self != base_class
raise "You should only call not_sharded on direct descendants of ActiveRecord::Base"
end
self.sharded = false
end
def is_sharded? # rubocop:... |
import React from 'react';
import { Flex, Link } from '@seno/core';
import { Trans } from '@lingui/macro';
import { Route, Switch, useRouteMatch } from 'react-router-dom';
import LayoutMain from '../layout/LayoutMain';
import PlotOverview from './overview/PlotOverview';
import PlotAdd from './add/PlotAdd';
import { Plo... |
package com.flashoverride.ambientcreatures.entity.passive;
import net.minecraft.entity.passive.EntityAmbientCreature;
import net.minecraft.world.World;
public class EntityAmbientCreatureTFC extends EntityAmbientCreature
{
public EntityAmbientCreatureTFC(World world)
{
super(world);
}
public boolean isInsect(... |
import crypto from "crypto";
import { CacheAdmin } from "../Cache/Admin.cache";
import { CacheCategories } from "../Cache/Categories.cache";
import { CacheCustomer } from "../Cache/Customer.cache";
import { CacheImages } from "../Cache/Image.cache";
import { CacheInvoice } from "../Cache/Invoices.cache";
import { Cache... |
# Geospatial MetaData ToolKit is one component of the GeoHydra head
module GeoHydra
end
require 'geohydra/version'
require 'geohydra/geonetwork'
require 'geohydra/transform'
require 'geohydra/solr'
require 'geohydra/accession'
require 'geohydra/utils'
require 'geohydra/gazetteer'
require 'geohydra/workflow/task'
requ... |
<?php
namespace CaseConverter\Tests\Unit;
use CaseConverter\CamelCaseConverter;
use CaseConverter\CaseFactory;
use CaseConverter\KebabCaseConverter;
use CaseConverter\SnakeCaseConverter;
use CaseConverter\StandardCaseConverter;
use CaseConverter\StudlyCapsCaseConverter;
use CaseConverter\TypeCase;
use PHPUnit\Framewo... |
<?php declare(strict_types=1);
/**
* @package s9e\TextFormatter
* @copyright Copyright (c) 2010-2021 The s9e authors
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
namespace s9e\TextFormatter\Configurator\RendererGenerators\PHP\XPathConvertor\Convertors;
class PHP80Functions exte... |
// Copyright 2019 Google LLC.
//
// 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 ... |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); ... |
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library test.source_maps_test;
import 'dart:convert';
import 'package:source_maps/source_maps.dart';
... |
using InsightHub.Data.Entities;
using InsightHub.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace InsightHub.Services.Mappers
{
public class UserMapper
{
/// <summary>
/// Maps a User Model from an existing Entity
/// </summary>
/// <param na... |
package cn.springmvc.service;
import java.util.List;
import java.util.Map;
import cn.springmvc.model.RefrePrcModel;
public interface RefrePrcService {
public List<String> select();
public List<RefrePrcModel> selectCargoId(List<String> list);
// public Map<String, Object> selectCargoId(List<String> list);
pu... |
#!/bin/sh
set -o errexit
set -o nounset
NGINX_BIN=nginx
if [ "${NGINX_DEBUG}" = "true" ]; then
NGINX_BIN=nginx-debug
fi
CONF_DIR=/etc/nginx/
cp "${CONF_DIR}/nginx.conf.tpl" "${CONF_DIR}/nginx.conf"
perl -pi -e 's/ENV_([_A-Z0-9]+)_ENV/$ENV{$1}/g' "${CONF_DIR}/nginx.conf"
${NGINX_BIN} -g 'daemon off;'
|
# Predicting Disease Progression and Outcome of COVID-19 Patients based on Temporal Deep Learning Method
Chenxi Sun, Shenda Hong, Moxian Song, Hongyan Li and Zhenjie Wang.
├── Readme.md // help
├── T-LSTM // method code
│ ├── LSTMtimedecay.py
│ ├... |
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace SqlSugar
{
public partial class JsonUpdateableProvider : IJsonUpdateableProvider<JsonUpdateResult>
{
private void AppendWhere(JToken item)
{
Check.Exception(i... |
package com.skeleton.common.page.repository
import org.apache.poi.ss.formula.functions.T
/**
* Created by LYT to 2021/09/07
*/
class QueryDslPage<T>(
val results: MutableList<T>,
val totalCount: Long
) |
class AddConditionsToRuns < ActiveRecord::Migration[5.2]
def change
add_column :runs, :conditions, :string
end
end
|
try {
Push-Location $PSScriptRoot\shared\ext\bgfx
..\bin\genie --with-dynamic-runtime --vs=winstore100 vs2019
..\bin\genie --with-dynamic-runtime vs2019
Get-ChildItem .build\projects\vs2019 | ForEach-Object {
$content = Get-Content $_.FullName -Raw
$content = $content -replace '8.1', '1... |
class CustomCommand < Discordrb::Commands::Command
def to_json(*args)
json_hash = {
command: @command
}
attributes.each do |attr, val|
json_hash[attr] = val
end
json_hash.to_json(*args)
end
end
|
import { AbstractRequestContextHelper } from "../../abstract-request-context-helper";
export class PromoCodesContextHelper extends AbstractRequestContextHelper {
public async getAll(count: number, offset: number) {
const data = await this.context.helpers.rest.get({
path: "/promo-code/get-all",
... |
#
# Cookbook Name:: iptables-ng
# Recipe:: install
#
# Copyright 2013, Chris Aumann
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any l... |
require 'rubygems'
require 'cgi'
require 'yaml'
require 'rest_client'
require 'xmlsimple'
require 'ostruct'
module Piwik
class ApiError < StandardError; end
class MissingConfiguration < ArgumentError; end
class UnknownSite < ArgumentError; end
class UnknownUser < ArgumentError; end
class UnknownGoal < Argume... |
package nak.data
/*
Copyright 2009 David Hall, Daniel Ramage
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... |
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using UnmanagedInspector;
namespace DebugInspector.Controls.UnManaged.ThreadStacks
{
internal class ThreadStackNodeManager
{
private readonly TreeView r_treeview;
private String _appName;
... |
package com.zhyea.bamboo.general
import android.graphics.Rect
import com.zhyea.bamboo.reader.common.Pool
class RectPool : Pool<Rect>() {
override fun newInstance(): Rect {
return Rect()
}
override fun reset(t: Rect) {
t.setEmpty()
}
} |
import { cms } from '@tensei/cms'
import SupertestSession from 'supertest-session'
import Supertest, { SuperTest as SI } from 'supertest'
import { setup, fakeUser, setupFakeMailer, getFakeMailer } from './setup'
export const getCmsCsrfToken = async (client: SI<any>): Promise<string> => {
const response = await clien... |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- | K3 code generation interface.
module Language.K3.Codegen where
import Language.K3.Core.Common
import Language.K3.Core.Annotation
import Language.K3.Core.Declaration
import Language.K3.Core.Expression
import Language.K3.Core.Type
{- Disable... |
import type { ModuleMetadata, Type } from '@nestjs/common/interfaces';
import type { ClientOptions } from 'blockcypher-apis';
export type BlockCypherModuleOptions = ClientOptions;
export interface BlockCypherOptionsFactory {
createBlockCypherOptions():
| Promise<BlockCypherModuleOptions>
| BlockCypherModule... |
import datetime
from methinks.db import Entry
import pytest
from server.app import create_app
from server.app import db as _db
from sqlalchemy import event
from sqlalchemy.orm import sessionmaker
@pytest.fixture(scope="session")
def app(request):
"""
Returns session-wide application.
"""
return create... |
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { TeamSignInPage } from '../team-sign-in/team-sign-in';
import { TeamCreationPage } from '../team-creation/team-creation';
import { AuthState, Database, Player } from '../../providers/my-data/my-data';
import { HomePage } f... |
class SmsCancellationSuccessJob < NotifyJobBase
STANDARD_TEMPLATE_ID = 'fd90b779-03e1-471d-b9e4-34afa9622410'.freeze
BSL_TEMPLATE_ID = '43fb57ed-1abe-4115-81ca-10f5042e23ca'.freeze
def perform(appointment)
return unless api_key
client.send_sms(
phone_number: appointment.canonical_sms_number,
... |
class LinkTypeValidator < ActiveModel::Validator
def validate(record)
return if record.link_type == "taxons"
record.errors[:link_type] << I18n.t("tag_import.errors.invalid_link_types")
end
end
|
using HillPigeon.ApplicationParts;
using Microsoft.AspNetCore.Http;
using System;
namespace HillPigeon.Orleans.Configuration
{
public class OrleansRoutingOptions
{
public Func<ControllerModel, string> ControllerNameRule { get; set; }
public Action<HttpContext, HttpRequestContext> HttpRequestCo... |
package protocol
import (
"github.com/tendermint/go-crypto"
"github.com/zbo14/pos/crypto/tndr"
"github.com/zbo14/pos/graph"
"github.com/zbo14/pos/merkle"
. "github.com/zbo14/pos/util"
)
type CommitProof struct {
ParentProofs [][]*merkle.Proof `json:"parent_proofs"`
Proofs []*merkle.Proof `json:"p... |
package never.ui
import never.repository.{RepositoryReadApi, RepositoryWriteApi}
import never.ui.TaskEditorModel.EditingExistingNode
import org.scalatest.Inspectors
class TaskEditorModelImplTest extends BaseTest {
val readApi = mock[RepositoryReadApi]
val writeApi = mock[RepositoryWriteApi]
val impl = new Tas... |
""" Helper module for handling common options """
import tornado.options
from tornado.options import define, options
define("debug", default=True, type=bool,
metavar="True|False", help="debug mode")
define("config", default="config/ms3.conf", type=str,
metavar="CONFIG FILE", help="Alternative configurat... |
class User < ApplicationRecord
validates :email, presence: true, email: true
delegate :admin?, :read?, :manage_results?, :manage_assignments?,
:department_slugs, to: :permissions
def username
email.split("@").first
end
def permissions
@permissions ||= PermissionSet.for(username)
end
def de... |
@section('title')
Quản Lý Danh Mục Sản Phẩm
@stop
@extends('admin.general.master')
@section('content')
<link rel="stylesheet" type="text/css" href="{{url('')}}/assets/dhtmlxgrid.css">
<script src="{{url('')}}/assets/dhtmlxgrid.js" type="text/javascript"></script>
<div class="content-body">
<section id="validation-s... |
FactoryGirl.define do
factory :food_information, class: Spree::FoodInformation do
description "test description"
end
end |
package com.team_no_yes.matzip_exe.activities
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MenuItem
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.LinearLayoutManager
import com.team_no_yes.matzip_exe.R
import com.team_no_yes.matzip_exe.a... |
<?php
/**
* Class Sheep_Debug_Test_Helper_Config
*
* @category Sheep
* @package Sheep_Subscription
* @license Copyright: Pirate Sheep, 2016
* @link https://piratesheep.com
*
* @covers Sheep_Debug_Helper_Config
* @codeCoverageIgnore
*/
class Sheep_Debug_Test_Helper_Config extends EcomDev_PHPUnit_Test_Ca... |
import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:iot_firestore_flutter_app/auth_helper.dart';
import 'package:iot_firestore_flutter_app/const/custom_styles.dart';
import 'package:iot_firestore_flutter_app/route/routing_constants.dart';
import 'pac... |
<?php
use Illuminate\Database\Seeder;
use App\Country;
class CountrySeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
// Read CSV file.
$file_path = resource_path('assets/data/country_list.csv');
$fil... |
package PIA::Agent::Logo; ###### Logo Agent
### $Id$
##############################################################################
# The contents of this file are subject to the Ricoh Source Code Public
# License Version 1.0 (the "License"); you may not use this file except in
# compliance with the License. You m... |
package trikita.router;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Pair;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import java.lang.reflect.InvocationTargetException;
import ... |
## Minimal HN
<p align="center">
<img src="graphics/feature graphic.png" alt="Minimal HN" />
</p>
Mininal HN is an open-source Hacker News client written with React Native.
[Download from Google Play](https://play.google.com/store/apps/details?id=com.hadaclay.minimalhn)
### Libraries Used:
- [React Navigation](ht... |
package dk.bayes.dsl.demo
import org.junit._
import Assert._
import dk.bayes.dsl.variable.Categorical
import dk.bayes.dsl.infer
import dk.bayes.clustergraph.testutil.AssertUtil._
class MontyHallProblemTest {
val carDoor = Categorical(Vector(1d / 3, 1d / 3, 1d / 3))
val guestDoor = Categorical(Vector(1d / 3, 1d /... |
source "${BASH_SOURCE%/*}/../helpers.bash"
set -x
function cleanup {
set +e
polycubectl simplebridge del br1
polycubectl router del r1
delete_veth 4
}
trap cleanup EXIT
echo ' ##### SETTING TEST ENVIROMENT ######'
create_veth 4
polycubectl simplebridge add br1 #loglevel=TRACE #type=XDP_SKB
polycubectl l... |
const typeforce = require('typeforce');
const UINT31_MAX: number = Math.pow(2, 31) - 1;
export function UInt31(value: number): boolean {
return typeforce.UInt32(value) && value <= UINT31_MAX;
}
export function BIP32Path(value: string): boolean {
return typeforce.String(value) && !!value.match(/^(m\/)?(\d+'?\/)*\d... |
# GameOfLife.jl
A toy package to demonstrate (and practice) parallel programming techniques
in Julia. Inspired by an example of the [DistributedArrays.jl documentation][1].
[1]: https://pkg.julialang.org/docs/DistributedArrays/Gfdem/0.6.1/#Distributed-Array-Operations-1
|
import { DrawingParametersEnum } from 'opensheetmusicdisplay';
import { useEffect, useState } from 'react';
import { useDevice } from '../../../ctx/device';
import { MusicDisplay, OpenSheetMusicDisplay } from '../../../lib/MusicDisplay';
import { NoopMusicDisplay } from '../../../lib/MusicDisplay/NoopMusicDisplay';
imp... |
'use strict';
/*global $:true*/
/*eslint no-undef: 2*/
window.onload = function() {
var source = $('#section').html();
var template = window.Handlebars.compile(source);
var itemSource = $('#item').html();
var itemTemplate = window.Handlebars.compile(itemSource);
$('.links').html('');
var iframe = $('<ifra... |
package vad
import (
"bufio"
"errors"
"fmt"
webRTCVAD "github.com/baabaaox/go-webrtcvad"
"io"
"os"
"time"
)
// GetVADInfoFromAudio 分析音频文件,得到 VAD 分析信息,看样子是不支持并发的,只能单线程使用
// 无需使用插值的函数
func GetVADInfoFromAudio(audioInfo AudioInfo, insert bool) ([]VADInfo, error) {
var (
frameIndex = 0
frameSize = audioIn... |
package cafe.caption
import cafe.caption.db.TransactionManager
import cafe.caption.db.TransactionManagerImpl
import cafe.caption.db.repositories.UserRepository
import cafe.caption.db.repositories.UserRepositoryImpl
import org.flywaydb.core.Flyway
import org.jetbrains.exposed.sql.Database
interface ApplicationModule {... |
ddd;
create database test;
use test;
DROP table IF EXISTS Contact;
DROP table IF EXISTS Company;
CREATE TABLE Company (
id INT NOT NULL AUTO_INCREMENT,
duns VARCHAR(9) UNIQUE,
name VARCHAR(255),
address VARCHAR(255),
zip_code VARCHAR(5),
company_creation Date,
website VARCHAR(255),
... |
DELETE FROM "public"."reports" WHERE "id" = 0;
DROP TABLE "public"."Reports";
|
export {default as error} from './error';
export {default as info} from './info';
|
package enigma
import (
"fmt"
)
type (
// Error extends the built in error type with extra error information provided by the Qlik Associative Engine
Error interface {
error
Code() int
Parameter() string
Message() string
}
qixError struct {
ErrorCode int `json:"code"`
ErrorParameter string `j... |
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. Th... |
/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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 app... |
package others.easy.ltwenty;
import tools.ListNode;
/**
* 876 Middle of the Linked List
*/
public class MiddleOfTheLinkedList {
public ListNode middleNode(ListNode head) {
int step = 0;
ListNode res = head;
while (head != null) {
head = head.next;
step++;
... |
#pragma once
#include "Fractal/Fractal.h"
#include "UI/FractalViewerUI.h"
namespace RM
{
namespace UI
{
struct FractalCompileData
{
Ref<Fractal> Fractal;
uint32_t Begin;
uint32_t End;
uint32_t Iterations;
};
class FractalManagerUI
{
public:
static void LoadFromDisk();
static void Crea... |
package lib
import kotlin.platform.*
[platformName("bar")]
fun foo() = "foo"
var v: Int = 1
[platformName("vget")]
get
[platformName("vset")]
set
|
(in-package :cl-user)
(defpackage :cl-firebird-asd
(:use :cl :asdf))
(in-package :cl-firebird-asd)
(defsystem cl-firebird
:version "0.3"
:author "Kirill Zverev"
:license "MIT"
:description "Firebird database remote protocol client"
:depends-on (:flexi-streams
#-sbcl :usocket
:ironclad
:... |
<?php
////////////////////////////////////////////////////////////////////////
// //
// test_text_submit.php //
// //
// ... |
Este repositório mudou de local!
Acesse aqui: https://woliveiras.com.br/my-precious-links
|
import React from 'react';
import './styles/formInput.scss';
export interface FormInputProps {
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
label: string;
value?: string;
type: 'text' | 'email' | 'number' | 'password' | 'date';
name?: string;
required?: boolean;
}
const FormInput: React.SFC<F... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.