text stringlengths 27 775k |
|---|
# Samuel Vasko 2013
# Cmder build script
# Like really a beta
#
# This script downloads dependencies form google code. Each software is extracted
# in a folder with same name as the project on google code. So Conemu becomes
# conemu-maximus5. Correct files are beeing picked by using labels.
# I will move the script for... |
#!/bin/bash
# The only argument is the AVD name.
# Note: This script will hang, you may want to run it in the background.
if [ $# -eq 0 ]
then
echo "Please specify the AVD name"
exit 1
fi
echo "[INFO] Starting emulator $1"
emulator64-arm -avd $1 -netfast -no-skin -no-audio -no-window -port 5554
|
/**
* Provides classes for configuring which recipients are local and what to
* do with mails addressed to them.
*/
package mireka.filter.local.table; |
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Http;
use Illuminate\Http\Request;
class AdminController extends Controller
{
public function index(){
return view('admin.dashboard');
}
public function addPage(){
return view('admin.add_gor');
}
public functio... |
/**
* TodoListWidget
*
* (c) Machinify 2018. All rights reserved.
* @flow
**/
"use strict";
import * as React from "react";
import TodoList from "../models/TodoList.js";
import Todo from "../models/Todo.js";
import TodoWidget from "./TodoWidget.react.js";
export type TodoListWidgetProps = {
todoList: TodoList,
... |
function dealias!(out::T,u::T,d::Real) where {T<:AbstractField}
isrealspace(u) && fourier!(u)
isrealspace(out) && setfourier!(out)
kx = u.kx
ky = u.ky
kz = u.kz
kmax2 = (d*kx[end])^2
@inbounds for k in axes(u,3)
kz2 = kz[k]*kz[k]
for j in axes(u,2)
ky2 = ky[j]*ky... |
'''
'''
from __future__ import (unicode_literals, print_function, absolute_import,
division)
import logging
import sys
import pyNetLogo.pyNetLogo as netlogo
# Created on 1 Nov 2016
#
# .. codeauthor::jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
__all__ = []
# logging
roo... |
import fetch from 'node-fetch'
export default async function handler({ query: { id } }, res) {
const data = await fetch(`https://codesandbox.io/api/v1/sandboxes/${id}`)
.then((rsp) => rsp.json())
.then((rsp) => rsp.data)
res.status(200).json(data)
}
|
#!/bin/bash
cd "$( dirname "${BASH_SOURCE[0]}" )"
antlr4="java -Xmx500M -cp /usr/local/lib/antlr-4.9.3-complete.jar org.antlr.v4.Tool"
# Generate Python target
$antlr4 -Dlanguage=Python3 -visitor -no-listener SystemRDL.g4
# Generate C++ parse accelerator extension
$antlr4 -Dlanguage=Cpp -visitor -no-listener -o ext ... |
/* Copyright © 2020, Jason Ekstrand
*
* 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, publish,... |
#include<iostream>
#include<stack>
using namespace std;
int main()
{
stack<char> letter;
for (int i = 64; i < 90; i++)
{
cout << (char)i << letter.size() << " - ";
letter.push(i);
}
cout << endl << endl;
while (letter.size() != 0)
{
cout << letter.top() << letter.size() << " - ";
letter.pop();
}
} |
Income Comparer
---------------
Quickly calculate and compare income between salary and hourly, number of days
per week, and how many hours per day. Get a more accurate income prediction
based on your personal needs, or use to compare value during a negotiation.
[See it in action](http://joeyespo.com/income-comparer)... |
#!/usr/bin/env python
# -*- coding: utf_8 -*-
import os
import sys
import copy
EXCLUDE_DIRS = [
os.path.abspath(os.sep.join([os.getcwd(), "components"])),
os.path.abspath(os.sep.join([os.getcwd(), "build"])),
os.path.abspath(os.sep.join([os.getcwd(), "bsp", "stm32", "bearpi_stm32l431", "soc"])),
]
def get... |
import re
import subprocess
import sys
from threading import Timer
def kill_proc(proc, timeout):
timeout["value"] = True
proc.kill()
def run(cmd, timeout_sec):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
timeout = {"value": False}
timer = Timer(timeout_sec, kill_... |
mutable struct UnfoldAssessState{T}
weight::Float64
retvals::Vector{T}
state::T
end
function process_new!(gen_fn::Unfold{T,U}, params::Tuple, choices::ChoiceMap,
key::Int, state::UnfoldAssessState{T}) where {T,U}
local new_state::T
kernel_args = (key, state.state, params...)
... |
#[macro_export]
macro_rules! accessor {
((get = $property:ident): $type:ty) => {
fn $property(&self) -> $type;
};
((get = $property:ident, set = $setter:ident): $type:ty) => {
fn $property(&self) -> $type;
fn $setter(&mut self, val: $type);
};
}
#[macro_export]
macro_rules! acce... |
# frozen_string_literal: true
class UpdateDecimalPrecision < ActiveRecord::Migration[4.2]
def self.up
change_column :schedule_rules, :discount_percent, :decimal, precision: 10, scale: 2, null: false, default: 0
change_column :price_policies, :usage_rate, :decimal, precision: 10, scale: 2, null:... |
/*
* Package : Cbor
* Author : S. Hamblett <steve.hamblett@linux.com>
* Date : 04/01/2022
* Copyright : S.Hamblett
*/
import 'package:cbor/cbor.dart';
import 'stage1.dart';
class RawValueTagged {
RawValueTagged(
this.header, {
this.data = const [],
required this.offset,
this.tags = const []... |
-- Revert nz-buildings:buildings_bulk_load/functions/added from pg
BEGIN;
DROP FUNCTION buildings_bulk_load.added_delete_bulk_load_outlines(integer);
DROP FUNCTION buildings_bulk_load.added_insert_all_bulk_loaded_outlines(integer);
DROP FUNCTION buildings_bulk_load.added_insert_bulk_load_outlines(integer, integer);... |
// Filename whitelist validation for template creation
function validFilename(filename) {
const regex = /^[A-zÀ-ú0-9 \[\]\'()_-]+$/i;
return (regex.test(filename));
}
exports.validFilename = validFilename;
// Escape XML special entities when using {@RawXML} in template generation
function escapeXMLEntitie... |
# frozen_string_literal: true
module PageMeta
class Link
def self.build(rel, options)
klass_name = "::PageMeta::Link::#{rel.to_s.camelize}"
klass = begin
const_get(klass_name)
rescue ActionView::Template::Error, NameError
Link
end
klass.new(rel, options)
end
... |
{% macro pretty_time(format='%H:%M:%S') %}
{{ return(adapter.dispatch('pretty_time', 'dbt_utils_justos')(format)) }}
{% endmacro %}
{% macro default__pretty_time(format='%H:%M:%S') %}
{{ return(modules.datetime.datetime.now().strftime(format)) }}
{% endmacro %}
|
import scala.concurrent.duration.FiniteDuration
import reactivemongo.api.WriteConcern
import reactivemongo.api.commands.CommandException
import reactivemongo.api.bson.BSONDocument
import org.specs2.concurrent.ExecutionEnv
import reactivemongo.api.tests.{ builder, decoder, pack, reader, writer }
final class FindAnd... |
# Invoke the Office 365 OneNote application and load a page
Function Invoke-ONDesktop {
[CmdletBinding(DefaultParameterSetName = 'page')]
Param(
[parameter(Position = 0, ParameterSetName = "page", Mandatory = $true)]
[object]$Page,
[parameter(Position = 0, ParameterSetName = "id", Mandat... |
use crate::fuzzer::PoolStorageIndex;
use crate::traits::{CompatibleWithSensor, CorpusDelta, Pool, SaveToStatsFolder, Sensor, Stats};
use crate::{CSVField, ToCSV};
use nu_ansi_term::Color;
use std::fmt::Display;
use std::path::PathBuf;
const NBR_ARTIFACTS_PER_ERROR_AND_CPLX: usize = 8;
pub(crate) static mut TEST_FAILU... |
#!/usr/bin/env bash
if [ ! -f ~/opt/LanguageTool/languagetool-commandline.jar ]
then
echo Download LanguageTool: https://www.languagetool.org/
echo And unpack it to ~/opt/LanguageTool/
exit 1
fi
TOOL_SPELLING=~/opt/LanguageTool/org/languagetool/resource/ru/hunspell/spelling.txt
THIS_SPELLING=$(dirname $0)... |
import * as React from 'react';
import makeClass from 'classnames';
import { useSpring, animated } from 'react-spring';
import { TweetTree } from 'types/twitter';
import TweetComponent from '../components/TweetComponent';
import Connector from '../components/Connector';
interface TreeNodeProps {
node: TweetTree;
... |
JSONUtil
===
## 介绍
`JSONUtil`是针对JSONObject和JSONArray的静态快捷方法集合,在之前的章节我们已经介绍了一些工具方法,在本章节我们将做一些补充。
## 使用
### parseXXX和toXXX
这两种方法主要是针对JSON和其它对象之间的转换。
### readXXX
这类方法主要是从JSON文件中读取JSON对象的快捷方法。包括:
- readJSON
- readJSONObject
- readJSONArray
### 其它方法
除了上面中常用的一些方法,JSONUtil还提供了一些JSON辅助方法:
- quote 对所有双引号做转义处理(使用双反斜杠做转义)
... |
#!/usr/bin/env bash
# init data
php /var/www/backend/initialize.php \
--user_name=$SUPERUSER_NAME \
--user_password=$SUPERUSER_PASSWORD \
--workspace=$WORKSPACE_NAME \
--host=$MYSQL_HOST \
--port=$MYSQL_PORT \
--dbname=$MYSQL_DATABASE \
--user=$MYSQL_USER \
--password=$MYSQL_PASSWORD \
--broadcastServiceUriPush=$BROAD... |
// THIS FILE IS GENERATED! DO NOT EDIT IT MANUALLY! ALL CHANGES TO IT WILL BE OVERWRITTEN ON EACH BUILD
package godot
import godot.Curve
import godot.core.Signal0
import godot.core.VariantArray
import godot.core.Vector2
import godot.core.signal
import godot.icalls._icall_Double
import godot.icalls._icall_Double_Double... |
<?php
return ["Korea","Japan","China"];
?> |
module Ginatra
VERSION = "4.1.0"
RELEASE_NAME = "Baku"
end
|
package config
import (
"os"
"strconv"
"time"
"github.com/kelseyhightower/envconfig"
)
type Config struct {
Server *ServerConfig
DB *DBConfig
}
type ServerConfig struct {
Port uint16 `default:"8000"`
IdleTimeout time.Duration `default:"2m"`
ReadTimeout time.Duration `default:"... |
/*
Copyright (c) 2012 Juan Mellado
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, publish, distribute, su... |
<?php
namespace plainview\sdk_mcc\form2;
/**
@brief HTML5/XHTML form manipulation class.
@details
Provides form generation, manipulation, _POST handling and validation.
All values and labels are stored filtered and can be displayed directly.
Examples
--------
@par Generate a form with a text input
@cod... |
<?php
return [
'params' => [
'twitterApiKey' => 'НАШ CONSUMER KEY',
'twitterApiSecret' => 'НАШ CONSUMER SECRET',
'twitterAccessToken' => 'НАШ ACCESS TOKEN',
'twitterAccessTokenSecret' => 'НАШ ACCESS TOKEN SECRET'
]
];
|
const x = require('../xendit');
const { Disbursement } = x;
const d = new Disbursement({});
d.getBanks()
.then(r => {
console.log('available banks:', r); // eslint-disable-line no-console
return r;
})
.then(r =>
r.slice(0, 5).map(b => ({
externalID: `${b.name} - ${b.code}`,
bankCode: b.c... |
#!/bin/bash
hostfile=${1:-"/nfs/mpi.hosts"}
num=$2
#src=`sed -n 1p ${hostfile}`
#dst=`sed -n 2p ${hostfile}`
#for host in `cat ${hostfile}`; do
# hosts+="${host},"
#done
#hosts=`echo ${hosts} | rev | cut -c 2- | rev` # trim trailing comma
hosts=`cat ${hostfile} | awk '{print $1}' | xargs | tr ' ' ','`
[ ! -z "... |
#!/bin/sh
test_description='merging with submodules'
. ./test-lib.sh
#
# history
#
# a --- c
# / \ /
# root X
# \ / \
# b --- d
#
test_expect_success setup '
mkdir sub &&
(cd sub &&
git init &&
echo original > file &&
git add file &&
test_tick &&
git commit -m sub-root)... |
import 'package:flutter/material.dart';
import 'package:rehana/helpers/console.dart';
import 'package:captainpassword/levendr/blocs/password.dart';
import 'package:captainpassword/captainpassword/dialogs/add_edit_site.dart';
import 'package:rehana/locator.dart';
import 'package:captainpassword/levendr/models/password.d... |
reso: An esoteric R-based programming style
================
### Introduction
Have you ever been frustrated at R, maybe after reading too many rude
StackOverflow or R-help threads? (me too) Well, what if we took R and
instead of helping making it accessible and fun, made all of those
esoteric, argon-y, incredibly ann... |
package pro.holywars.restfilter;
import pro.holywars.restfilter.domain.ParentObject;
/**
* This file created by Maxim S. Ivanov
*/
public class SimpleController {
public ParentObject findObject(){
return null;
}
}
|
<?php
/**
* Created by PhpStorm.
* User: yf
* Date: 2018/8/14
* Time: 下午12:46
*/
namespace EasySwoole\Trace;
use EasySwoole\Trace\AbstractInterface\LoggerWriterInterface;
class Logger
{
private $loggerWriter;
private $logDir;
function __construct(string $logDir = null)
{
if(empty($logD... |
class AddStageToHarvest < ActiveRecord::Migration[4.2]
def change
add_column :harvests, :stage, :integer,
comment: 'enum: all of the method names called in ResourceHarvester#start (q.v.)'
end
end
|
import { GitProcess } from 'dugite'
import * as Path from 'path'
import { Repository } from '../../../src/models/repository'
import {
getConfigValue,
getGlobalConfigPath,
getGlobalConfigValue,
setGlobalConfigValue,
getGlobalBooleanConfigValue,
} from '../../../src/lib/git'
import { mkdirSync } from '../../h... |
#ifndef MIDASLISTENER_H_
// A client for a MidasYeller
#include "midassocket.h"
#if defined(OSF1_)
// This may or may not be necessary
typedef int socklen_t;
#endif
PTOOLS_BEGIN_NAMESPACE
//The MidasListener listens to a single MidasYeller. If we are not
//actively trying to receive data, it may be lost as the Mid... |
using MgSoft.K3Cloud.WebApi.Common.Dto.Property;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace MgSoft.K3Cloud.WebApi.Common.Dto.Gl
{
/// <summary>
/// 凭证
/// </summary>
/// <typeparam name="Type_Gl_Voucher_FEntity"></typeparam>
public class Gl_... |
require 'jwt'
require 'rest_client'
require 'json'
require 'active_support/all'
require 'octokit'
require 'sinatra'
require 'sinatra/cookies'
require 'uri'
require 'yaml'
require 'securerandom'
$stdout.sync = true
$default_branch_name = "JIRA-BOT-BRANCH"
begin
yml = File.open('jira-bot.yaml')
contents = YAML.load... |
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'dart:async';
import 'package:weather_app/l10n/messages_all.dart';
class AppLocalizations {
static Future<AppLocalizations> load(Locale locale) {
final String name = locale.countryCode.isEmpty
? locale.languageCode
: ... |
""" Generate a sequence of words. """
from __future__ import print_function
import re
import random
import cPickle as pickle
import json
import nltk
CORPUS_ROOT = 'corpus/'
MODEL_FILE = 'model.pkl'
SENTENCE_FILE = 'sents.json'
N = 3
def conditional_bigrams(bigram_list):
""" Generates a set of bigrams that look... |
//EXPORTING REACT
import React from 'react'
//IMAGE SECTION
import ImageSection from '../ImageSection'
//INSTAGRAM WALL
import InstagramWall from './InstagramWall'
//INSTAGRAM WALL SECTION
const InstagramWallSection = ({ wallUrl, ...rest }) => (
<ImageSection
{...rest}
childComponent={<InstagramWall wallUrl=... |
const fs = require('fs');
const filePath = fs.createReadStream('01-read-file/text.txt');
filePath.on('data', (data) => {
console.log(data.toString().trim())
}) |
const rimraf = require("rimraf");
const path = require("path");
function clear(destDir) {
const destPath = path.resolve(process.cwd(), destDir)
return new Promise((resolve, reject) => {
rimraf(destPath, err => {
if (!err) {
resolve();
} else {
rej... |
<?php
/**
* @copyright Copyright © 2014 Rollun LC (http://rollun.com/)
* @license LICENSE.md New BSD License
*/
namespace rollun\permission;
use Interop\Container\ContainerInterface;
use InvalidArgumentException;
use Zend\ServiceManager\Exception\ServiceNotFoundException;
use Zend\ServiceManager\Factory\AbstractFa... |
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv){
if (3 > argc) {
printf("Nombre de paramètres insuffisants\n");
return 1;
}
float nb = atoi(argv[1]);
int exponent = atoi(argv[2]);
int i =0;
float result = nb;
if (exponent > 0){
for (i = 1 ; i< exponent; ... |
# numactl
> Control politica NUMA pentru procese sau memorie partajată.
> Mai multe informaţii: <https://man7.org/linux/man-pages/man8/numactl.8.html>
- Rulați o comandă pe nodul 0 cu memorie alocată pe nodul 0 și 1:
`numactl --cpunodebind={{0}} --membind={{0,1}} -- {{command}} {{command_arguments}}`
- Rulați o com... |
using Vostok.Logging.Abstractions;
namespace SkbKontur.Cassandra.ThriftClient.Abstractions
{
internal interface ICommand
{
void Execute(Apache.Cassandra.Cassandra.Client client, ILog logger);
string Name { get; }
CommandContext CommandContext { get; }
}
} |
using System.Collections.Generic;
using UnityEngine;
using GlobalDefine;
public abstract class StateMachine : MonoBehaviour
{
public Dictionary<eMonsterState, MonsterStateBase> stateDict = new Dictionary<eMonsterState, MonsterStateBase>();
public MonsterStateBase cState;
public Vector3 knockBackDir;
public float k... |
/******************************************************************************
Copyright (c) 2012-2013, KAIST, S-Core.
All rights reserved.
Use is subject to license terms.
This distribution may include materials developed by third parties.
**********************************************************... |
using System.Collections.Generic;
using JetBrains.Annotations;
using UnInventory.Core.MVC.Model.Commands;
using UnInventory.Core.MVC.Model.Data;
namespace UnInventory.Standard.MVC.Model.Commands.Composite.InputData
{
public class CreateEntitiesInputData : ICommandInputData
{
public DataInventory Inven... |
package pt.ipg.application.masterquizapp.`object`
data class Result (
val title: String,
val desc: String,
val images: Int
) |
#!/bin/bash
cd src
cd temp
echo 'Hello, Jakub1.' >jakub1.txt
echo 'Hello, Jakub2.' >jakub2.txt
echo 'Hello, Jakub3.' >jakub3.txt |
package com.ku_stacks.ku_ring.ui.main.search.fragment_notice
import androidx.recyclerview.widget.RecyclerView
import com.ku_stacks.ku_ring.data.model.Notice
import com.ku_stacks.ku_ring.databinding.ItemNoticeBinding
class SearchNoticeViewHolder(
private val binding: ItemNoticeBinding,
private val itemClick: (... |
package dev.robingenz.capacitorjs.plugins.filepicker;
import android.database.Cursor;
import android.net.Uri;
import android.provider.MediaStore;
import android.provider.OpenableColumns;
import android.util.Base64;
import android.util.Log;
import com.getcapacitor.Bridge;
import java.io.ByteArrayOutputStream;
import ja... |
package com.headwire.aemdc.companion;
import java.io.File;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
... |
/*
* Copyright 2019 Zhenjie Yan
*
* 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... |
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... |
#### bcache功能设计实现
#### 前言
- 当本地磁盘存在ssd和hdd两种类型磁盘时,我们希望为POD提供的挂载卷既有ssd的高速读写能力,又具有hdd的大容量特性,因此我们引入了bcache来实现这一功能
- bcache是广泛采用的多盘缓存技术,在kernel 3.10正式加入linux内核,只需`modprobe bcache`即可开启
- lvm卷本身是有缓存卷功能的,它要求缓存卷与存储卷必须在一个vg下,这不符合我们目前的存储卷实现,我们目前将ssd/hdd磁盘分别创建了不同的vg
#### 功能设计
- 如果你要使用bcache功能,需要确保内核模块已经启动了bcache,在有些内核版本中bcach... |
{-# language CPP #-}
-- | = Name
--
-- VK_AMD_shader_trinary_minmax - device extension
--
-- == VK_AMD_shader_trinary_minmax
--
-- [__Name String__]
-- @VK_AMD_shader_trinary_minmax@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 21
--
-- [__Revision__]
-- 1
--... |
# Python et Bibliothèques
Ce document résume les bases de python , et de fonctions utiles en machine Learning pour des bibliothèques
|
import random
import time
import math
import itertools
import inspyred
def my_distance(x, y):
return sum([abs(a - b) for a, b in zip(x, y)])
def generate(random, args):
return [random.uniform(0, 26)]
def evaluate(candidates, args):
fitness = []
for cand in candidates:
fit = sum([math.sin(... |
class Positions
attr_reader :positions
DEFAULT_GRID_SIZE = 3
def initialize(grid_size = DEFAULT_GRID_SIZE)
grid_size = max_value(grid_size, DEFAULT_GRID_SIZE)
@row = 0
@col = 0
@position_counter = 0
@positions = {}
@row.upto(grid_size - 1) {
@col.upto(grid_size - 1) {
@po... |
import React, { useEffect, useState } from "react";
import { Button } from "react-bootstrap";
import "./App.scss";
enum Operators {
PLUS = "+",
MINUS = "-",
MULTIPLY = "*",
DIVIDE = "/",
EQUAL = "=",
}
function App() {
const buttons = ["9", "8", "7", "6", "5", "4", "3", "2", "1", "±", "0", ","];
const o... |
#include "system/stacktrace.h"
#include <string.h>
#include "ebisp/gc.h"
#include "ebisp/interpreter.h"
#include "ebisp/builtins.h"
#include "ebisp/scope.h"
#include "ebisp/parser.h"
#include "std.h"
static struct Expr
lambda(Gc *gc, struct Expr args, struct Expr body, struct Scope *scope)
{
return atom_as_expr(... |
/*
* Copyright (c) 2021 Demant
*
* SPDX-License-Identifier: Apache-2.0
*/
struct ll_conn_iso_stream {
struct ll_conn_iso_group *group;
struct lll_conn_iso_stream lll;
uint32_t sync_delay;
};
struct ll_conn_iso_group {
struct evt_hdr evt;
struct ull_hdr ull;
struct lll_conn_iso_group ll... |
<?php
namespace Codememory\Components\Database\Orm\Repository;
use Codememory\Components\Database\QueryBuilder\QueryBuilder;
/**
* Class ConstructionAssistant
*
* @package Codememory\Components\Database\Orm\Repository
*
* @author Codememory
*/
class ConstructionAssistant
{
/**
* @param array ... |
/*
* This file is part of Dis4IRC.
*
* Copyright (c) 2018-2019 Dis4IRC contributors
*
* MIT License
*/
package io.zachbr.dis4irc.bridge.mutator.mutators
import io.zachbr.dis4irc.bridge.message.Message
import io.zachbr.dis4irc.bridge.message.PlatformType
import io.zachbr.dis4irc.bridge.mutator.api.Mutator
/**
... |
package model
import (
"net/http/httptest"
"regexp"
"testing"
)
func TestRegisters(t *testing.T) {
clearDB() // Warning! Before testing we wipe out the DB!
t.Run("fresh new register in empty db", func(t *testing.T) {
req := httptest.NewRequest("GET", "/clock/hit", nil)
rw := httptest.NewRecorder()
Regist... |
declare module "lodash.tonumber" {
function toNumber(value: any): number;
export default toNumber;
}
declare module "lodash.tointeger" {
function toInteger(value: any): number;
export default toInteger;
}
declare module "lodash.isobject" {
function isObject(obj: any): boolean;
export default isObject;
}
dec... |
<?php
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\BuilderFactory;
use PhpParser\Node\Expr\Print_;
use PhpParser\Node\Expr\Variable;
class ClassMethodNamesTest extends Archetype\Tests\TestCase
{
/** @test */
public function it_can_retrieve_class_method_names()
{
$file = PHPFile::load('app/Co... |
import { NodeConfiguration } from "../models/nodeConfiguration";
import { BaseWalkStrategy } from "./baseWalkStrategy";
/**
* Node choice strategy which just iterates through the list of nodes.
*/
export class LinearWalkStrategy extends BaseWalkStrategy {
/**
* The current node to use.
*/
private _... |
# Release
Steps for releasing a new version of Pointcloud.
Add a new section to the [NEWS](NEWS) file, listing all the changes associated with the new release.
Change the version number in the [Version.config](Version.config) and
[pgsql/expected/pointcloud.out](pgsql/expected/pointcloud.out) files.
Update the value... |
INSERT INTO ${myuniversity}_${mymodule}.instance_format (id, jsonb)
VALUES ('0d9b1c3d-2d13-4f18-9472-cc1b91bf1752',
json_build_object('id','0d9b1c3d-2d13-4f18-9472-cc1b91bf1752', 'code','sb', 'name','audio -- audio belt', 'source','rdacarrier'))
ON CONFLICT DO NOTHING;
|
#!/usr/bin/env bash
OUTPUT=$1
CLOCK=$(date "+%F %A %R")
echo -en "%{T1}%{A:clock:}${CLOCK}%{A}" > $OUTPUT
|
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal.expression.proxies.primitives.operations.bitwise
import org.junit.Test
import org.scalaide.debug.internal.expression.Names.Java
import org.scalaide.debug.internal.expression.BaseIntegrationTest
import org.scalaide.debug.... |
#!/bin/bash
# ------------------------------------------------------------------
# [Shaurita Hutchins] download_all.sh
# This script downloads all the scripts from the bin into the user's home bin.
#
# A function that uses wget to download the scripts
download_scripts()
{
URL=https://raw.githubusercontent.co... |
# frozen_string_literal: true
describe 'Quovo::Resources::Account', :vcr do
describe '.all' do
it 'returns all accounts' do
response = Quovo.accounts.all
expect(response.status_code).to eql(200)
expect(response.body.accounts.size).to eql(2)
end
end
describe '.find' do
it 'returns ... |
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\Admin\StorePostRequest;
use App\Post;
use Validator;
class PostController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\... |
//using Cirrious.MvvmCross.ViewModels;
namespace MyShuttle.Client.Core.ViewModels.InterfacesForDependencyInjection
{
//public interface ISettingsViewModel : IMvxViewModel
//{
//}
}
|
import { parseTime } from '../../utils';
import { defaultProps } from '../props';
import initialState from './initial-state';
export function init({
slidesProp,
durationProp,
functionProp,
autoPlay,
autoPlayBehavior,
autoPlayIntervalProp,
autoPlayDelayProp,
autoPlayPauseProp,
}) {
r... |
/*/////////////////////////////////////////////////////////////////////////////////
/// An
/// ___ ____ ___ _____ ___ ____
/// / _ \ / ___|_ _|_ _/ _ \| _ \
/// | | | | | _ | | | || | | | |_) |
/// | |_| | |_| || | | || |_| | _ <
/// \___/ \____|___| |_| \___/|_| \_\
/// ... |
class Teacher < ApplicationRecord
validates :token,
presence: true,
uniqueness: { case_sensitive: false }
has_many :activity_choices, dependent: :destroy
has_many :activities, through: :activity_choices
has_many :downloads, dependent: :destroy
end
|
import userdocksSdk, { IOptions } from '@userdocks/web-client-sdk';
import { createContext, PropsWithChildren, useEffect, useState } from 'react';
export interface IIdentity {
isLoading: boolean;
userdocks: typeof userdocksSdk | null;
isAuthenticated: boolean;
}
interface UserdocksProviderProps {
options: IOp... |
import { List, Map, Record } from 'immutable'
import cuid from 'cuid'
const STATUS_UNACCEPTED = 0
const STATUS_ACCEPTED = 1
const STATUS_DISCONNECTED = 2
const Match = new Record({
id: null,
info: null,
clients: new Map(), // client -> status
timer: null,
})
// A service for allowing clients to register acce... |
! Obtain transformation.
subroutine gettrans(dimlatin,transname)
use transset
implicit none
! Names of elements of transformation.
character(len=*),intent(out)::transname(:)
character(len=32),allocatable::transnames(:)
! Dimension of input.
integer,intent(in)::dimlatin
! Buffer.
character(len=4)::buff
! degr... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class DeliveryMethod extends Model
{
use HasFactory, SoftDeletes;
public $timestamps = false;
protected $appends = array('isDisabl... |
github_git_diff
===============
# Description
git diff with github
# Usage:
```bash
usage: github_git_diff [-h] -t token [-o organization] -r repo -hc head-commit -bc base-commit
```
# Arguments
|short|long|default|help|
| :--- | :--- | :--- | :--- |
|`-h`|`--help`||show this help message and exit|
|`-t`||`None`|... |
---
title: Kubernetes
sidebar_label: Kubernetes
---
## Examples
Deploy opctl in kubernetes
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: opctl-in-kubernetes
spec:
replicas: 1
template:
spec:
containers:
- name: opctl
image: opctl/opctl:0.1.34-dind
ports:
... |
import cProfile
import random
import datetime
# Pure implementation of quick sort algorithm in Python
def quick_sort_score(arr,d):
print("QUICKSORT [{}] - START".format(d))
cp = cProfile.Profile()
cp.enable()
result = quick_sort_score_actual(arr)
cp.disable()
cp.print_stats()
print("QUICK... |
import 'package:example/user.dart';
import 'package:faker/faker.dart';
import 'package:flutter/material.dart';
import 'package:pagination_view/pagination_view.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.