text stringlengths 27 775k |
|---|
// Copyright (c) 2015, Viktor Dakalov. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.
library dlog.example.time;
import "dart:math";
import "package:dlog/dlog.dart" as dlog;
sleep() {
DateTime init = new DateTime.now();
int ms = 1500;
w... |
package test
import dependency.*
data A("a") B(1) C class Annotations {
inline A("f") B(2) C fun f(A("i") B(3) C deprecated("1") i: @A("int") Int) {
}
inline A("p") B(3) C val p: @B(4) Int = 2
}
|
#!/bin/bash
#==========================
# GMP start script
#==========================
#
# Usage:
# ./start.sh
# Var setup
# Don't allow non initialized vars
set -o nounset
# Exit on failure
set -e
# Verify dependencies
#====================
# Check that java is available
which java > /dev/null || { echo "Need jav... |
require 'shellwords'
require 'fileutils'
##
# Awestruct:Extensions:Minify is a transformer that minimizes JavaScript, CSS and HTML files.
# The transform runs on the rendered stream before it's written to the output path.
#
# Minification is performed by the following three libraries:
#
# htmlcompressor (minifies HT... |
// Copyright (c) SDV Code Project. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace SdvCode.Controllers
{
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CloudinaryDotNet.Action... |
namespace Yandex.Alice.Sdk.Models.DialogsApi
{
using System;
using System.Text.Json.Serialization;
using Yandex.Alice.Sdk.Converters;
public class DialogsSoundInfo
{
[JsonPropertyName("id")]
public Guid Id { get; set; }
[JsonPropertyName("skillId")]
public Guid Ski... |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad (join, (<=<))
import Test.Hspec
import Test.Hspec.Wai
import qualified System.Exit as Exit
import qualified FirstApp.Conf as Conf
import qualified FirstApp.DB as DB
import qualified FirstApp.Main as Main... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT License.
// See the LICENSE file in the project root for more information.
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Threading;
using System.Threadi... |
module Lib.Ast
( Element (..),
TypeDecl (..),
Position (..),
Ident (..),
Stmt (..),
Expr (..),
Program (..),
)
where
import Data.Hashable
import Data.Map
import Data.Scientific
-- | Means all parsable elements in the language
-- All elements should have a position
class Element e where
p... |
<?php
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Search\Model;
use Magento\Framework\Model\AbstractModel;
use Magento\Search\Api\Data\SynonymGroupInterface;
class SynonymGroup extends AbstractModel implements SynonymGroupInterface
{
... |
package parser
import (
docopt "github.com/docopt/docopt-go"
"github.com/drycc/workflow-cli/cmd"
)
// Version displays the client version
func Version(argv []string, cmdr cmd.Commander) error {
usage := `
Displays the client version.
Usage: drycc version [options]
Options:
-a --all
list api and controller ... |
require 'yaml'
$config = YAML.load_file('../../_config.yml');
$changelog = YAML.load_file('../../_data/changelog.yml');
$hasWarning = false;
# Discourse link at end of chapters
def discourse_link comments_id
link = "
<div class=\"post-links\">
<p>For help and discussion</p>
<a target=\"_blank\" href=\"#{$conf... |
package com.ocnyang.recyclerviewevent.paging3
import androidx.paging.PagingSource
import androidx.paging.PagingState
import java.lang.Exception
class FruitPagingSource(
private val repository: FruitRepository,
private val queryFruitName: String
) : PagingSource<Int, PagingFruitBean>() {
override ... |
#[doc(hidden)]
pub mod tokenizer;
#[doc(hidden)]
pub use tokenizer::Tokenizer;
use crate::common::Method;
use rsip_derives::TypedHeader;
use std::convert::TryFrom;
/// The `CSeq` header in its [typed](super) form.
#[derive(TypedHeader, Eq, PartialEq, Clone, Debug)]
pub struct CSeq {
pub seq: u16,
pub method:... |
module Test.IO where
import Config
import Test.Framework
import Test.IO.Ptr
import Test.IO.Vector
test_io :: Config -> Test
test_io conf =
testGroup "io"
[ test_ptr conf
, test_vector conf
]
|
import 'package:grpc/grpc.dart';
import 'package:m10_sdk/library.dart';
import 'package:m10_sdk/src/generated/directory/api.pbgrpc.dart';
import 'package:m10_sdk/src/generated/google/protobuf/empty.pb.dart';
import 'package:uuid/uuid.dart';
abstract class TokenProvider {
String get subject;
Future<String> get acce... |
<?php
namespace KSolution;
use SilverStripe\ORM\DataObject;
/**
* Description
*
* @package silverstripe
* @subpackage mysite
*/
class Breed extends DataObject
{
/**
* Singular name for CMS
* @var string
*/
private static $singular_name = '种类';
/**
* Plural name for CMS
* @va... |
# Demo EditTextChips
EditTextChips shows different libraries to display 'chips' in an EditText (usually used to show tags, email addresses, etc.).
The libraries demoed are:
- [Chips library from EyeEm](https://github.com/eyeem/chips-android)
- [Splitwise TokenAutoComplete](https://github.com/splitwise/TokenAutoCom... |
require("dotenv").config()
require("@nomiclabs/hardhat-waffle")
require("@nomiclabs/hardhat-etherscan")
require("@nomiclabs/hardhat-ethers");
const accounts = [process.env.DEV_PK]
module.exports = {
networks: {
hardhat: {},
fantom: {
url: "https://rpc.ftm.tools",
accounts: accounts,
gasMult... |
ActiveSupport::Inflector.inflections(:en) do |inflect|
inflect.irregular 'curso', 'cursos'
inflect.irregular 'tipo_documento', 'tipo_documentos'
inflect.irregular 'genero', 'generos'
inflect.irregular 'docente', 'docentes'
inflect.irregular 'estudiante', 'estudiantes'
inflect.irregular 'curso_docente', 'cu... |
const scriptRunningStateStrings = {
/**
* The process of running script has not yet begun.
*/
pending: `Pending`,
/**
* TThe process of running script is in-progress.
*/
inProgress: `In-Progress`,
/**
* TThe process of running script has failed.
*/
failed: `Failed`,... |
[expect php]
[file]
<?php
$myobjects = array(1,array(2,3));
function foo(&$hovno){ }
foo($myobjects[1]);
$checkpoint = $myobjects;
$myobjects[1][0] = 7;
echo "x: ";
var_dump($myobjects);
echo '<br/><br/>checkpoint ';
var_dump($checkpoint);
?> |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SLIDDES.Modular
{
[CreateAssetMenu(fileName = "Event UInt", menuName = "SLIDDES/Modular/Events/Event UInt")]
public class UIntEvent : Event<uint>
{
}
}
|
import ContentLoader from 'react-content-loader';
const CardPlaceholder = () => (
<ContentLoader
speed={1}
primaryColor='#cecece'
secondaryColor='#ecebeb'
style={{
width: '100%',
backgroundColor: 'rgba(255, 255, 255, 0.92)',
padding: '5px',
borderRadius: '4px',
}}
>
... |
require 'prime'
module RSA
class Key
def initialize(bits = 8)
@@bits = bits
@p = pseudo_random_prime
@q = pseudo_random_prime
@n = @p*@q
@f = (@p-1)*(@q-1)
@e = 257
@d = invmod(@e, @f)
end
def ps... |
package io.fluidsonic.graphql
internal data class DefaultExecutorContext(
override val document: GDocument,
val exceptionHandler: GExceptionHandler?,
override val extensions: GExecutorContextExtensionSet,
val fieldResolver: GFieldResolver<Any>?,
val fieldSelectionExecutor: DefaultFieldSelectionExecutor,
val nod... |
export const state = () => ({
list: []
})
export const mutations = {
set(state, articles) {
state.list = articles
}
}
export const actions = {
async getArticles({ commit }) {
await fetch(`https://dev.to/api/articles?username=luisaugusto`)
.then((data) => data.json())
.then((articles) => co... |
%%%-------------------------------------------------------------------
%% @doc router top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(router_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(... |
/*
* 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, software
* distribut... |
-- update miner count
UPDATE user SET miner_count = 3 where name = 'Halil';
|
if Rails.env.production?
Messaging::Client.master = Twilio::REST::Client.new(
ENV.fetch('TWILIO_ACCOUNT_SID'), ENV.fetch('TWILIO_AUTH_TOKEN')
)
Messaging::Client.client = ENV.fetch('MESSAGING_CLIENT').constantize
end |
#!/bin/bash
if test `which gtk-query-settings`; then
theme="$(gtk-query-settings gtk-icon-theme-name | awk '{print $2}')"
else
theme="$(gsettings get org.gnome.desktop.interface icon-theme | sed -e 's/'\''/"/g')"
fi
echo "##THEME:$theme##" |
package org.ahooper.JsoupTasks;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Created by Thibaud on 27/05/15.
*/
public class GetVideoTask {
/**
* Récupère les nouvelle... |
using System;
using Cosmos.Business.Extensions.SMS.Exceptions;
namespace Cosmos.Business.Extensions.SMS.Events {
public class SmsSendFeedback {
private readonly SmsAggregationException _exception;
public SmsSendFeedback(string name, int successCount, ISmsAggregationExceptionFactory exceptionFacto... |
---
title: PKSM Documentation
url: https://github.com/FlagBrew/PKSM/wiki
thumbnail-url: https://raw.githubusercontent.com/FlagBrew/PKSM/master/assets/banner.png
help-desc: Links to PKSM Documentation
cooldown-rate: 0
cooldown-per: 0
color: E74C3C
---
Documentation for PKSM
|
using System;
namespace PnModel
{
public partial class PN_Mandor
{
/// <summary>
///
/// </summary>
public const string ThisName = "Mandor";
/// <summary>
/// Required.
/// </summary>
public const string prop0 = "prop0";
/// <summary>
/// Required.
/// </summary>
... |
CREATE "insight" createDB WITH PASSWORD 'insight';
CREATE USER insight WITH PASSWORD 'insight';
/**
* pSQL way of "USE insight": change default DB to "insight"
*/
\c insight
/**
* Step 1.1 CREATE TABLE for storing Stock Trading Data
*/
CREATE TABLE REDFIN (
SALE_TYPE VARCHAR(50),
SOLD_DATE DATE,
PROPERTY_TY... |
# -*- perl -*-
# t/001_load.t - check module loading
use Test::More tests => 2;
BEGIN {
use_ok( 'Google::SAML::Request' );
}
my $saml = Google::SAML::Request->new(
{
ProviderName => 'somebody.invalid',
AssertionConsumerServiceURL => 'https://login.somebody.invalid/fooBar',
}
);
isa_ok( ... |
#!/bin/bash
username=`cat /home/tivoli/monica/VPN_user`
password=`cat /home/tivoli/monica/VPN_pass`
connection_name="tun_vpn"
while true; do
tunActive=`ifconfig | grep $connection_name | wc -l`
echo "Checking the VPN Connection"
if [ $tunActive -eq 0 ]; then
echo "VPN connection down, reconnecting:"
sudo kill `ps au... |
import 'dart:convert';
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';
import 'screens/home_screen.dart';
import 'package:http/http.dart' as http;
String api = '';
void main() async {
WidgetsFlutterBinding.ensureInitializ... |
import keyMirror from 'keymirror';
import moment from 'moment';
export const ActionTypes = keyMirror({
RECEIVE_PROCESS_INFO_COLLECTION: null
});
function receiveProcessInfoCollection(json) {
return {
type: ActionTypes.RECEIVE_PROCESS_INFO_COLLECTION,
payload: {
processInfoCollectio... |
#include "handler_test.h"
#include "specexamples.h" // IWYU pragma: keep
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
#include "gmock/gmock.h"
#include "gtest/gtest.h"
using ::testing::_;
#define EXPECT_THROW_PARSER_EXCEPTION(statement, message) \
ASSERT_THROW(statement, ParserException); \
t... |
---
layout: single
title: "2022-02-15 N차원 Array"
---
## p.s 개념만 알고 주말에 복습
N차원 Array란
N차원 배열
배열 안에 N개 만큼의 배열이 존재하는 객체.
2/3차원 지도 정보, rgb를 저장하는 2차원 사진 파일 등을 표현할때 활용가능*/
```javascript
array = [[123],[456],[789]] 각 배열 안에있는 개수는 동일해야한다
array [3][3]
```
***
## 기본예제
```javascript
let array = [
[101, 102, 103],
[201, ... |
package easyMahout.GUI.classification;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFi... |
use crate::{
config::RewardParams,
rewards::Ratio,
testing::{
ledger::ConfigBuilder,
scenario::{prepare_scenario, stake_pool, template::StakePoolDefBuilder, wallet},
verifiers::LedgerStateVerifier,
},
value::Value,
};
use std::num::{NonZeroU32, NonZeroU64};
#[test]
pub fn t... |
/**
* @file struct_declaration.cc
* @brief
*
* @copyright Copyright (c) 2018 All Rights Reserved.
*
*/
#include <analyzer/semantic_analyzer.h>
#include <core/semantic_error.h>
#include <core/syntax_error.h>
#include <declaration/struct_declaration.h>
namespace cassio {
std::unique_ptr<Declaration> StructDeclar... |
# GregSecNuke
Simple discord nuke with both regular spam and webhook spam.
#Commands
nuke: Nukes the server
chandel: deletes all channels
roledel: deletes all roles
#Don't skid it.
|
package datatypes_test
import (
"testing"
"gorm.io/datatypes"
. "gorm.io/gorm/utils/tests"
)
func TestTime(t *testing.T) {
if SupportedDriver("mysql", "postgres", "sqlite", "sqlserver") {
type UserWithTime struct {
ID uint
Name string
Time datatypes.Time
}
DB.Migrator().DropTable(&UserWithTime{... |
---
title: "Towards Skills-Based Curriculum Analytics: Can We Automate the Recognition of Prior Learning?"
date: 2020-01-01
publishDate: 2021-08-20T12:06:00.572886Z
authors: ["Kirsty Kitto", "N Sarathy", "A Gromov", "M Liu", "K Musial", "Simon Buckingham Shum"]
publication_types: ["2"]
abstract: ""
featured: false
publ... |
#
# EDOS/lib/shell/decorations.rb
# by IceDragon
# dc 27/06/2013
# dm 27/06/2013
# vr 1.0.0
module Hazel
class Shell
module Decoration
VERSION = "1.0.0".freeze
@decoration_klasses = {}
def self.get_decoration(obj)
if obj.is_a?(Symbol) || obj.is_a?(String)
return @decor... |
#!/bin/sh
WORKDIR="$PWD"
SOURCE=${SOURCE:-"https://github.com/coredns/coredns.git"}
BUILDDIR=${BUILDDIR:-"build"}
SYSTEM=${SYSTEM:-""}
OUTFILE=${OUTFILE:-"coredns"}
WINDOWS=${WINDOWS:-"0"}
if [ $WINDOWS = "1" ]; then
SYSTEM="GOOS=windows GOARCH=amd64"
OUTFILE="coredns.exe"
fi
if [ -d $BUILDDIR ]; then
rm -rf $BUIL... |
import { DataThreejs } from '../data/data.threejs';
export class ThreeJSViewerService {
DataThreejs: DataThreejs;
initRaycaster(event) {
const scene = this.DataThreejs;
const rect = scene.renderer.domElement.getBoundingClientRect();
scene.mouse.x = ((event.clientX - rect.left) / rect.wid... |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Purchase_details extends CI_Controller {
public function __construct(){
parent::__construct();
//Call model
$this->load->model('purchase_details_model');
$this->load->model('product_details_model');
$this->load->model('tax_details... |
export * from './stops';
export * from './vehicles';
|
<?php
class IndexController extends BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
if (Auth::check())
{
/* $id = Auth::user()->getId(); //don't need declared in base already
$name = Auth::user()->getFullName(); ... |
#ifndef __ENUM_S_H__
#define __ENUM_S_H__
//定义枚举
enum week{
Mon = 1,
Tues,
Wed,
Thurs,
Fri,
Sat,
Sun
};
//测试枚举
void test_enum();
#endif
|
module Idv
module Actions
class VerifyDocumentAction < Idv::Steps::DocAuthBaseStep
def call
enqueue_job
end
private
def form_submit
response = form.submit
presenter = ImageUploadResponsePresenter.new(
form_response: response,
url_options: url_o... |
#!/bin/bash
#
# Usage:
# wait_port.sh <host> <port>
#
# Waits up to 10 seconds for <port> to become open on <host>. Polls every half
# second.
until nc -q 0 $1 $2 < /dev/null > /dev/null; do
echo "waiting for $1:$2..."
sleep 0.5
done
|
@extends('layouts.master')
@section('title','Surveyors Info')
@section('surveyors','active')
@section('breadcrumb')
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
<li class="breadcrumb-item"><a href="{{ route('surveyors.index') }}">Surveyors</a></li>
<li class="breadcrumb-item active">Surveyors Info... |
import { complement, includes } from 'ramda';
/**
* Complement for includes
*
* @function
* @param {*} searched - The value searched
* @param {Array} list - The list where to find the value
* @returns {Boolean}
*
* @example
* notIncludes('a', ['b', 'c']); // true
* notIncludes('b', ['b', 'c']); // false
*/
... |
#!/bin/bash
# Takes strings of texts, appends to a single-line string to allow for parsing
# with only a single call to `sed`. Hopefully improving speed.
#
# Need to think through the pre/post processing. What things should be done
# at each stage? What is the 'processing' stage actually look like, such that
# the pre/... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import math
from xlrd import XL_CELL_EMPTY, XL_CELL_TEXT, XL_CELL_NUMBER
import arrayLexer
from . import dictLexer
from . import tolua
class Field(object):
def __init__(self):
#配置字段名
self.cfgName = None
#中文字段名
self.chinaN... |
package wasarabi::Model::Wiki;
use 5.10.0;
use strict;
use warnings;
use utf8;
use Data::Printer;
sub validate_wiki {
my ($self, $c) = @_;
my $req = $c->{request};
my $error_title;
my $error_honbun;
if($req->param('wiki_title')){
}
else{
$error_title = 'missing';
}
if($req->param('... |
interface LoginRes {
data: {
success: boolean,
token: string,
user: User
}
};
class LoginService {
static $inject = ['$http', 'localStorageService', 'serverUrl'];
constructor(private $http: angular.IHttpService,
private localStorageService: angular.local.storage.ILocalStorageService,
priv... |
package com.example.think.tp2;
import java.util.Observable;
public class Calculette extends Observable implements CalculetteI {
private PileI<Integer> pile;
public Calculette(){
this.pile = new Pile2<Integer>(PileI.CAPACITE_PAR_DEFAUT);
}
public Calculette(PileI<Integer> pile){
this.pile = pile;
... |
/*
给你一个整数数组 nums 和一个整数k ,编写一个函数来判断该数组是否含有同时满足下述条件的连续子数组:
子数组大小 至少为 2 ,且
子数组元素总和为 k 的倍数。
如果存在,返回 true ;否则,返回 false 。
如果存在一个整数 n ,令整数 x 符合 x = n * k ,则称 x 是 k 的一个倍数。
示例 1:
输入:nums = [23,2,4,6,7], k = 6
输出:true
解释:[2,4] 是一个大小为 2 的子数组,并且和为 6 。
示例 2:
输入:nums = [23,2,6,4,7], k = 6
输出:true
解释:[23, 2, 6, 4, 7] 是大小为 5 的子... |
/*
* Copyright 2020 Lunatech Labs
*
* 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 t... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is au... |
<?php
namespace App\Models;
use App\Models\Galeno\Empleador;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ListaMoraItem extends Model
{
use HasFactory;
public $timestamps = false;
protected $table = "lista_mora";
protected $fillable = [
... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using uNet2.Channel;
using uNet2.Packet;
using uNet2.SocketOperation;
namespace uRAT.CorePlugin.ExtendedSystemInformation.Operations
{
public class ExtendedInformationOperation : SocketOperationBase
{
public override... |
//! fftw_test
//!
//! provide test functions using fftw crate
use fftw::array::AlignedVec;
use fftw::plan::*;
use fftw::types::*;
use rulinalg::utils as linalg_utils;
use std::f64::consts::PI;
use super::example_utils as eutils;
/// hello fftw
pub fn hello_fftw() {
let n = 128;
let mut plan: C... |
unit frFrameColorEdit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, UcButtons, ExtCtrls;
type
TFrameColorEdit = class(TFrame)
Shp_Color: TShape;
UcWBtn_Color: TUcWinButton;
procedure UcWBtn_ColorClick(Sender: TObject);
private
... |
package dimensions
import "math"
func calculateMarginsAndSize(dims *Heatmap, columns, rows []string) {
dims.FontSize = int(math.Floor(dims.Ratio * float64(idealFontSize)))
// Calculate required top margin. Find the longest column name and assume it
// is made entirely of the "W" character (which has a width of 11... |
package day11
import "testing"
func TestOctopusMap(t *testing.T) {
start := [][]int{
{5, 4, 8, 3, 1, 4, 3, 2, 2, 3},
{2, 7, 4, 5, 8, 5, 4, 7, 1, 1},
{5, 2, 6, 4, 5, 5, 6, 1, 7, 3},
{6, 1, 4, 1, 3, 3, 6, 1, 4, 6},
{6, 3, 5, 7, 3, 8, 5, 4, 7, 8},
{4, 1, 6, 7, 5, 2, 4, 6, 4, 5},
{2, 1, 7, 6, 8, 4, 1, 7, 2... |
-- | A "client" that uses the reflected definitions.
{-@ LIQUID "--reflection" @-}
{-@ LIQUID "--ple" @-}
module ListClient where
import Prelude hiding (concat, filter, foldr, map)
{-@ reflect incr @-}
incr :: Int -> Int
incr x = x + 1
{-@ reflect isPos @-}
isPos :: Int -> Bool
isPos x = x > 0
{-@ refle... |
const { ApolloServer } = require('apollo-server-micro')
const { typeDefs, resolvers } = require('../../graphql/index')
const { query } = require('../../graphql/postgres')
const { config } = require('../../config/config')
const server = new ApolloServer({
typeDefs,
resolvers: resolvers({ query }),
introspection:... |
package zio.webhooks.internal
import zio.webhooks.WebhookId
/**
* A [[BatchKey]] specifies how the server groups events for batching: by [[WebhookId]] and content
* type.
*/
private[webhooks] final case class BatchKey(webhookId: WebhookId, contentType: Option[String])
|
import { ApolloDriver } from '@nestjs/apollo';
import { Module } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { GraphQLModule } from '@nestjs/graphql';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Sampletable1 } from '../entity/sampledb1';
import { SimpleService } from './... |
import { ng } from '../../utils/process';
import { expectFileToMatch } from '../../utils/fs';
export default async function() {
await ng('build', '--build-event-log', 'bep-log.txt');
await expectFileToMatch('bep-log.txt', '{"id":{"started":{}},"started":{"command":"build",');
await expectFileToMatch('bep-log.t... |
/**
* Created by liuzh on 2016/3/27.
*/
package org.apache.spark.graphx.OSR.selfDefType
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
object RTree extends Serializable{
def buildFromMBRs(mbrs: List[(MBR, Int)], expChildNum: Int): RTree = {
val sliceNumX: Int = math.ceil(math.sq... |
python save_pcl.py \
--exp ../../expts/temp\
--gpu 1 \
--dataset shapenet\
--pred_disp \
--categ car\
--batch_size 1 \
--N_PROJ 1 \
--save_n 1 \
--load_model \
--print_n 10
|
package com.pallaw.flickrgallery.data.model
import com.google.gson.annotations.SerializedName
/**
* Created by Pallaw Pathak on 21/04/20. - https://www.linkedin.com/in/pallaw-pathak-a6a324a1/
*/
data class Photo(
@SerializedName("farm")
var farm: String = "",
@SerializedName("server")
var server: St... |
namespace FPL.Data.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class ExtractedFullStatsBase : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.HistoryPasts",
c => new
{
... |
# Pod::ParseLink -- Parse an L<> formatting code in POD text.
#
# Copyright 2001, 2008, 2009, 2014 by Russ Allbery <rra@cpan.org>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
#
# This module implements parsing of the text of an L<> formatting code as... |
#region License
/*
* Copyright 2002-2010 the original author or 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
*
* Unle... |
//
// Created by qiaopc on 2021/8/31.
//
#ifndef QIAOPCMUSIC_PLAYSTATUS_H
#define QIAOPCMUSIC_PLAYSTATUS_H
class Playstatus {
public:
bool exit;
bool load = true;
bool seek = false;
bool pause = false;
public:
Playstatus();
};
#endif //QIAOPCMUSIC_PLAYSTATUS_H
|
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public static class GradientX {
public enum GradientType {
Radial,
Linear,
Conical,
Reflected
}
public static Gradient blackToWhite {
get {
return GradientX.Create(Color.black, Color.white);
}
}
p... |
#!/bin/sh
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# *****************************************************************************
# -- File: gdb_launch_sphere_m4.sh
#
# -- Description:
# This script runs the azure sphere gdb debug tool for debugging SEAL-Embedde... |
package com.guy.login.Service;
import com.guy.login.domain.TaskUser;
import java.util.List;
public interface TaskService {
void saveTask(TaskUser task);
TaskUser findOneById(Long id);
List<TaskUser> findAll();
List<TaskUser> findCustomByTitle(String title);
}
|
# Website code
- Deployment in django framework
- Build pipeline in circleci
- Autogenerate figures for website and
upload to image store. Ensure highest possible
quality, maybe try to find vector outputs
- Display jupyter notebooks on website.
Can I use prettier to format notebooks?
- Autogenerate data documentatio... |
import 'dart:async';
import 'package:fancy_stream/fancy_stream.dart';
import 'package:fancy_stream/src/injector.dart';
// ignore: import_of_legacy_library_into_null_safe
import 'package:rxdart/rxdart.dart';
///Give all power of Fancy Streans to Disposable class.
///All power are based on Type of generic function, tha... |
/*******************************************************************************
* 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... |
#!/bin/bash
set -e
set -x
PKG=$(conda build conda.recipe --output)
anaconda --token ~/.tokens/anaconda upload -u bokeh -l dev -l main $PKG
|
# VRM Parameter Viewer
This is a viewer that displays the parameters in the VRM file.


 { described_class.new(config) }
let(:cop_config) { { 'EnforcedStyle' => 'symmetrical' } }
it 'ignores implicit calls' do
inspect_source(cop, ['foo 1,',
... |
using System;
using System.Buffers;
using System.IO;
using DDSTextureLoader.NET.TextureParsing;
using TerraFX.Interop;
using static TerraFX.Interop.D3D12_RESOURCE_DIMENSION;
using JetBrains.Annotations;
namespace DDSTextureLoader.NET
{
/// <summary>
/// The type used for loading of DDS files
/// </summary... |
package fraction_test
import (
"github.com/jason-ball/fraction"
"testing"
)
func TestFraction(t *testing.T) {
n := 1
d := 2
f := fraction.Fraction{n, d}
if f.Numerator != n {
t.Errorf("f.Numerator = %d; want %d", f.Numerator, n)
}
if f.Denominator != d {
t.Errorf("f.Denominator = %d; want %d", f.Denomi... |
SORT_SIZES=$(ufasta sort $TEST1 | ufasta sizes -H /dev/fd/0)
SIZES_SORT=$(ufasta sizes -H $TEST1 | sort -k1,1)
EXPECT_EQ "$SIZES_SORT" "$SORT_SIZES" "Sorted sizes"
SORT_SIZES=$(sed -e 's/>read\([0-9]\+\)/>blah read\1/' $TEST1 | ufasta sort -k 2 /dev/stdin | ufasta sizes -H /dev/fd/0)
SIZES_SORT=$(ufasta sizes -H $TES... |
SELECT pd.id,
pd.user_id,
pd.declaration_type,
pd.declaration_date,
(pd.state = 'voided') as voided,
pd.evidence_held
FROM participant_declarations pd
WHERE course_identifier in ('ecf-induction', 'ecf-mentor'); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.