text stringlengths 27 775k |
|---|
//
// Author: B4rtik (@b4rtik)
// Project: RedPeanut (https://github.com/b4rtik/RedPeanut)
// License: BSD 3-Clause
//
using System;
using System.Collections.Generic;
using System.Linq;
namespace RedPeanut
{
public class AutoCompletionHandler : IAutoCompleteHandler
{
// new char[] { ' ', '.', '/', '\... |
#!/bin/bash
project_name=$1
workflow=$2
file_suffix=$3 #extension of input file, does not include .gz if present in input
root_dir=$4
fastq_end1=$5
fastq_end2=$6
input_address=$7 #this is an s3 address e.g. s3://path/to/input/directory
output_address=$8 #this is an s3 address e.g. s3://path/to/output/directory
... |
---
layout: post
title: "leet671.second minimum NOde IN a Binary Tree"
author: "yzpwslc"
date: 2018-03-11 23:06
---
<p>题目:在一个特殊二叉树中寻找第二小值</p>
<p>分析:遍历树,将节点值存入列表,排序寻找</p>
<p>代码如下:</p>
{% highlight python %}
class Solution(object):
def findSecondMinimumValue(self, root):
"""
:type root: TreeNode
... |
---
title: Unity Scriptable Render Pipeline
author: Rito15
date: 2021-08-29 20:50:00 +09:00
categories: [Unity, Unity Study]
tags: [unity, csharp]
math: true
mermaid: true
---
# 목표
---
-
<br>
<!- --------------------------------------------------------------------------- ->
# 개념
---
-
<br>
<!- ------------... |
<?php
namespace Packages\System\Observers;
use Packages\System\Models\SystemCounty;
use Uuid;
class SystemCountyObserver
{
public function creating(SystemCounty $systemCounty)
{
$systemCounty->id = $systemCounty->id ?: (string) Uuid::generate(4);
}
/**
* Handle the ChilexpressCounty "cr... |
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY... |
namespace Tilia.Visuals.Tooltip.TextProcessing
{
using UnityEngine;
/// <summary>
/// A basis for text elements that can be set and processed.
/// </summary>
public abstract class BaseTextProcessor : MonoBehaviour
{
/// <summary>
/// Sets the text of the associated text process... |
import * as React from 'react';
export interface IApiConnectorCreatorToggleListProps {
step: number;
i18nDetails: string;
i18nReview: string;
i18nSecurity: string;
i18nSelectMethod: string;
}
export const ApiConnectorCreatorToggleList: React.FunctionComponent<IApiConnectorCreatorToggleListProps> = (
{
... |
require "mongoid/publishable/unpublished_object"
module Mongoid
module Publishable
class Queue < Array
# loads the queue from the session
def self.load(session = nil)
# create a new queue
queue = new
# if there was no existing queue, return new
return queue unless ses... |
using Entities.Concrete;
using System;
using System.Collections.Generic;
using System.Text;
namespace Business.Constants
{
public static class Messages
{
public static string CarAdded = "Araba eklendi";
public static string CarDailyPriceInvalid = "Araba fiyatı geçersiz";
internal static... |
import { createStyles, makeStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
import { Button, CircularProgress } from '@material-ui/core';
import { useEffect, useState } from 'react';
import { useAuthContext } from '../../hooks/UseAuth';
import useRouter from '../../hooks/Us... |
# Move Panes package
## Move active tab to different panes
Allows moving the active tab to the right, left, up or down. Also supports
cycling the active tab to next/previous panes.

| Command name ... |
#[doc = "Reader of register RAMINFO"]
pub type R = crate::R<u8, super::RAMINFO>;
#[doc = "Reader of field `RAMBITS`"]
pub type RAMBITS_R = crate::R<u8, u8>;
#[doc = "Reader of field `DMACHAN`"]
pub type DMACHAN_R = crate::R<u8, u8>;
impl R {
#[doc = "Bits 0:3 - RAM Address Bus Width"]
#[inline(always)]
pub ... |
require "pry-byebug/commands/backtrace"
require "pry-byebug/commands/next"
require "pry-byebug/commands/step"
require "pry-byebug/commands/continue"
require "pry-byebug/commands/finish"
require "pry-byebug/commands/up"
require "pry-byebug/commands/down"
require "pry-byebug/commands/frame"
require "pry-byebug/commands/b... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using TCCarShare.Models;
namespace TCCarShare.ViewModels
{
public class WaitingOrder
{
public Order info { get; set; } = new Order();
public ExtensionInfo extension { get; set; } = new ExtensionIn... |
#!/usr/bin/env bash
OLD_KEY=$(grep APP_KEY= .env)
if [ "$OLD_KEY" != "APP_KEY=" ]; then
read -p "An existing key has been found! Do you want to overwrite it? [y/N] " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo " > Cancelled."
exit 0
fi
fi
NEW_KEY=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 64 | hea... |
package ru.tinkoff.deimos.structure.operations
import cats.syntax.flatMap._
import cats.syntax.functor._
import ru.tinkoff.deimos.schema.classes.Element
import ru.tinkoff.deimos.structure.{GeneratedPackage, GlobalName, InvalidSchema, Pure, Tag, XmlCodecInfo}
object ProcessGlobalElement {
def apply(element: Element... |
export * from './entry'
export * from './ResponseFixture'
export * from './ResponseBuilder'
export * from './HttpMock'
export * from './HttpMockBuilder'
export * from './HttpMockRepository'
export * from './ResponseDelegate'
|
using Documenter, GeoFormatTypes
makedocs(;
modules = [GeoFormatTypes],
sitename = "GeoFormatTypes.jl",
)
deploydocs(;
repo="github.com/JuliaGeo/GeoFormatTypes.jl",
)
|
package com.banary.base
import org.apache.spark.{SparkConf, SparkContext}
object SparkContextFactory {
def getSparkContext(appName: String): SparkContext = {
val sparkConf = new SparkConf().setMaster("local").setAppName(appName);
return new SparkContext(sparkConf);
}
}
|
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Models\CustomTeam;
use App\Models\User;
use App\Models\Player;
class CustomTeamController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
... |
package com.force.api.chatter;
import com.force.api.*;
import org.junit.Test;
import java.util.ArrayList;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
/**
* Created by jjoergensen on 2/25/17.
*/
public class ChatterTest {
static final String TEST_NAME = "force-rest-api bas... |
module Lerk
RSpec.describe HintTag do
describe '::validate' do
it 'ensures case-insensitive uniqueness of the tag' do
create(:hint_tag, tag: 'test')
expect { create(:hint_tag, tag: 'Test') }.to raise_error Sequel::ValidationFailed
end
end
end
end
|
# @author Peter Bell
# Licensed under MIT. See License file in top level directory.
require 'CFSM'
module ConditionOptimisation
describe ConditionsNode do
before(:each) do
@conditions_node =
[ ConditionsNode.new( [1, 2, 3, 4], [:fsm1], [1, 2] ),
ConditionsNode.new( [1, 2, 3, 4], [:fs... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.5
-- Dumped by pg_dump version 9.5.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
... |
module Speedup
module Collectors
class Collector
def self.key
self.name.to_s.split('::').last.gsub(/Collector$/, '').underscore.to_sym
end
def initialize(options = {})
@options = options
parse_options
setup_subscribes
end
# Where any subclasses sho... |
package config
import (
"bytes"
"encoding/json"
"fmt"
"log"
"sync"
"github.com/joho/godotenv"
"github.com/kelseyhightower/envconfig"
)
type Config struct {
LogLevel string `envconfig:"LOG_LEVEL"`
PgURL string `envconfig:"PG_URL"`
PgMigrationsPath string `envconfig:"PG_MIGRATIONS... |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#pragma once
namespace Manage... |
<?php
namespace Bpost;
use Bpost\BpostApiClient\Bpost\Order\Address;
use Bpost\BpostApiClient\Bpost\Order\Box;
use Bpost\BpostApiClient\Bpost\Order\Box\AtHome;
use Bpost\BpostApiClient\Bpost\Order\Box\International;
use Bpost\BpostApiClient\Bpost\Order\Receiver;
use Bpost\BpostApiClient\Bpost\Order\Sender;
use Bpost\B... |
package com.mushdap.methodtest.utility;
import com.mushdap.methodtest.model.MethodTest;
import org.junit.Test;
import java.lang.reflect.Method;
import static org.assertj.core.api.Assertions.assertThat;
public class MethodUtilityTest {
@Test
public void getMethodsByName() {
// Act
Method[] m... |
<?php
/**
* Created by PhpStorm.
* User: gseidel
* Date: 08.12.18
* Time: 13:01
*/
namespace Enhavo\Bundle\AppBundle\Viewer;
use Sylius\Component\Resource\Metadata\MetadataInterface;
class DummyMetadata implements MetadataInterface
{
public function getAlias(): string
{
return '';
}
pu... |
#!/usr/bin/env ruby
# rssdigest.rb - rss to email digest daemon
# non-copyright (c) 2008 rodrigo franco <caffo@imap.cc>
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'ssl'
require 'utils'
# Required Gems
require 'rubygems'
require "simpleconsole"
require 'rubygems'
require 'active_record' #(sqlite3)
require ... |
package org.firstinspires.ftc.teamcode.ftc16072;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
import org.firstinspires.ftc.robotcore.external.navigation.DistanceUnit;
/**
* Autonomou... |
<?php
namespace App\Http\Controllers;
use App\Models\Categories;
class CategoriesController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$category = Categories::orderBy('name')->get();
... |
Evema.Modules[ "Grid" ] = ( function() {
const Grid = {
'Instance': null,
'Context': null
};
Grid.Init = function() {
const that = Grid;
const instance = document.getElementById( 'e-grid' );
if ( instance === null ) {
console.error( 'Evema.Core.Grid.Init error' );
console.error( 'Can\'t find elemen... |
// Code generated by sqlc. DO NOT EDIT.
package harddrive
import (
"time"
)
type HDD struct {
ID int64
MakeID int64
Name string
SizeBytes int64
Rpm int64
CreatedAt time.Time
UpdatedAt time.Time
}
|
#!/bin/sh
# Delete comments if needed
alg=9 #Run with SAMA-DiEGO-A (PV + MI-ES), if run with B, C, D please set to 10, 11, 12, accordingly
func=2 # Function id, the second choice of 'Func_ids' in IOHPBO_config.json
dim=1 # The first choice of 'Dims' in IOHPBO_config.json, the dimensionality
# run: stands for count of r... |
import pyramid_handlers
from blueyellow_pycharm_app.controllers.base_controller import BaseController
from blueyellow_pycharm_app.infrastructure.suppressor import suppress
class HomeController(BaseController):
@pyramid_handlers.action(renderer = 'templates/home/index.pt')
def index(self):
return {'val... |
# ====================================================================
# MultiModel
#
mutable struct MultiModel <: AbstractMultiModel
models::Vector{Model}
patchfuncts::Vector{ExprFunction}
patchcomps::Vector{OrderedDict{Symbol, PatchComp}}
function MultiModel(v::Vararg{Model})
multi = new([v..... |
package com.escodro.domain.usecase.task
import com.escodro.domain.model.Task
import com.escodro.domain.usecase.fake.AlarmInteractorFake
import com.escodro.domain.usecase.fake.CalendarProviderFake
import com.escodro.domain.usecase.fake.NotificationInteractorFake
import com.escodro.domain.usecase.fake.TaskRepositoryFake... |
package net.chigita.savepoint.ui.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.fragment.app.Fr... |
<?php
namespace Accompli\Deployment;
use Accompli\Deployment\Connection\ConnectionAdapterInterface;
use UnexpectedValueException;
/**
* Host.
*
* @author Niels Nijens <nijens.niels@gmail.com>
*/
class Host
{
/**
* The constant to identify a host in the test stage.
*
* @var string
*/
... |
class MainActivity < Android::App::Activity
def onCreate(savedInstanceState)
super
layout = Android::Widget::LinearLayout.new(self)
layout.orientation = Android::Widget::LinearLayout::VERTICAL
@paintView = PaintView.new(self)
layout.addView(@paintView, Android::Widget::LinearLayout::LayoutParams... |
package nl.dyonb.discordfabriclink.util;
import net.minecraft.text.Text;
import nl.dyonb.chathistory.ChatHistory;
import nl.dyonb.chathistory.util.ChatMessage;
import java.util.UUID;
public class ChatHistoryInteraction {
public static void addMessage(Text text, UUID uuid) {
ChatHistory.CHAT_HISTORY.add(... |
using Distributions
using ArrayViews
using Base.LinAlg.BLAS
import Base.length
abstract RBM
typealias Mat{T} AbstractArray{T, 2}
typealias Vec{T} AbstractArray{T, 1}
const UNIT_CLASSES = [:bernoulli, :gaussian]
type Units
bias::Vector{Float64}
class::Symbol
function Units(num::Int, class::Symbol=:... |
import { CanvasViewer } from './canvasViewer';
import { floor } from 'suf-utils';
export class CanvasViewerRect extends CanvasViewer {
constructor(public rect: { width: number, height: number }, scale = 1, cssScale = 1) {
super(rect.width, scale, cssScale)
this.canvas.style.width = `${rect.width * scale * ... |
// Copyright 2017 David Conran
#include "IRsend.h"
#include "IRsend_test.h"
#include "gtest/gtest.h"
// Tests for sendGlobalCache().
// Test sending a typical command wihtout a repeat.
TEST(TestSendGlobalCache, NonRepeatingCode) {
IRsendTest irsend(4);
IRrecv irrecv(4);
irsend.begin();
irsend.reset();
// ... |
<?php
namespace files;
use atomar\Atomar;
use model\File;
/**
* Stores files on the local disk
* Class LocalDataStore
* @package files\controller
*/
class LocalDataStore implements DataStore {
public function generateUpload(File $file, int $ttl) {
$upload = \R::dispense('fileupload');
$... |
package frame.styles
import javafx.scene.paint.Color
import tornadofx.Stylesheet
import tornadofx.box
import tornadofx.cssclass
import tornadofx.px
class NoteStyles: Stylesheet() {
companion object {
val notesPane_ by cssclass()
val paneToolbar_ by cssclass()
val editor_ by cssclass()
}
init {
notesPane_ ... |
package MetaCPAN::TestApp;
use strict;
use warnings;
use LWP::ConsoleLogger::Easy qw( debug_ua );
use MetaCPAN::Server::Test qw( app );
use Moose;
use Plack::Test::Agent;
has _test_agent => (
is => 'ro',
isa => 'Plack::Test::Agent',
handles => ['get'],
lazy => 1,
default => sub {
... |
OVPN_DATA=$1
CLIENT_NAME=$2
# Generate client configuration
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn easyrsa build-client-full $CLIENT_NAME nopass
# Export client configuration
docker run --volumes-from $OVPN_DATA --rm kylemanna/openvpn ovpn_getclient $CLIENT_NAME > config/$CLIENT_NAME.ovpn
|
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
@file:Suppress("unused", "MemberVisibilityCanBePrivate")
package bulma
import org.w3c.dom.HTMLElement
interface BulmaElement {
val root: HTMLElement
var text: String
get() = root.innerText
set(value) { root.innerText = value }
var hidden: Boolean
get() = root.classList.contains(... |
/** @file AnimationsMixer.cpp
@author Philip Abbet
Implementation of the class 'Athena::Entities::AnimationsMixer'
*/
#include <Athena-Entities/AnimationsMixer.h>
#include <Athena-Entities/Animation.h>
using namespace Athena::Entities;
using namespace Athena::Utils;
using namespace std;
/***************... |
module ServiceNow
class Client
Dir[File.expand_path('../client/*.rb', __FILE__)].each { |f| require f }
attr_reader :connection
class << self
def authenticate(instance_id, client_id, client_secret, username, password)
connection_options = {
url: "https://#{instance_id}.service-no... |
const path = require('path');
const share = require('./share');
module.exports = share;
|
package com.example
interface HelloSayer {
fun sayHello(): String
} |
package thu.brainmatrix.visualization
import thu.brainmatrix.synapse_symbol._
import thu.brainmatrix.Shape
import scala.util.parsing.json._
import thu.brainmatrix.Symbol
import thu.brainmatrix.Visualization
object SynapseVis {
def main(args: Array[String]): Unit = {
val leis = new ExampleVis
leis.net
... |
#!/bin/bash
export KONG_ADMIN_ENDPOINT="http://localhost:8001"
export KONG_PROXY_ENDPOINT="https://localhost:8443"
export API_PATH="/myapi"
export PROVISION_KEY="uKRXEw1RyKdHlZ6S7q6edY97zHZpZnro"
export DEMO_CLIENT_ID="y9FTvz0ovdczj3oxZf4NKkKUm0MMu4ii"
go run main.go |
#
# 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"); you may n... |
<?php
use Faker\Generator as Faker;
use App\Models\KeyResult;
$factory->define(KeyResult::class, function (Faker $faker) {
static $i = 0;
$i++;
return [
'organization_id' => $i % 2 ? 1 : 2,
'objective_id' => rand(1, 4),
'user_id' => rand(1, 10),
'title' => $faker->words(3, ... |
type Model
ws::Vector
end
function (m::Model)(s::State)
tokens = s.tokens
s0 = tokens[s.top]
s1 = isnull(s.left) ? tokens[s.left.top] : nulltoken
b0 = s.right <= length(tokens) ? tokens[s.right] : nulltoken
sl = isnull(s.lch) ? tokens[s.lch.top] : nulltoken
sr = isnull(s.rch) ? tokens[s.rch... |
import '~/android/RtpService'
import * as Application from '@nativescript/core/application'
import { DefineProperty } from '~/utils/decorators'
Application.android.on('activityCreated', function activityCreated(args) {
android.os.StrictMode.setThreadPolicy(
new android.os.StrictMode.ThreadPolicy.Builder().permitAll... |
use std::sync::mpsc::{channel, Sender};
use std::thread;
use std::vec::Vec;
#[derive(Default)]
pub struct Service {
web_sockets: Vec<ws::Sender>,
}
pub type ServiceSender = Sender<Message>;
pub enum Message {
AddWS(ws::Sender),
RemoveWS(ws::Sender),
SendEvent(String),
}
impl Service {
pub fn run... |
package org.decembrist.domain.content.classes
import org.decembrist.domain.content.IContent
import org.decembrist.domain.content.IAnnotated
import org.decembrist.domain.content.IVisibilityModified
interface IEntityContent: IAnnotated, IContent, IVisibilityModified {
val name: String
fun isAbstract(): Boolea... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\Products;
class CheckoutController extends Controller{
public function checkout(){
// $product = new Products(); //make an instance of the class products
... |
# quickly edit the bash_profile no matter wherever you are
#
alias bprofile='nano ~/.bash_profile'
# free to make an error when typing clear
# any other common mistakes will be added here
#
alias clera='clear'
alias dir='ls -al'
alias terminal='gnome-terminal'
# Make a directory and immediately change into it
# usag... |
// Copyright 2018-2019 @paritytech/substrate-light-ui authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import SUIContainer from 'semantic-ui-react/dist/commonjs/elements/Container';
import SUIInput from 'semantic-ui-... |
module Operations
def sparsity
assert valid?
@storage.sparsity
end
def trace
#pre
assert valid?
assert @storage.rows == @storage.columns
result = @storage.trace
assert valid?
result
end
def rank
assert valid?
return self.to_matrix.rank
end
def row_sum(rowNum)
assert valid?
assert rowN... |
class Curso {
String addressedTo;
DateTime created;
String creator;
DateTime date;
String description;
List<DownloadableContent> downloadableContent;
Duration duration;
DateTime edited;
String img;
List<Instructor> instructors;
String module;
String name;
String place;
Postulation postulatio... |
import matplotlib.pyplot as plt
import pandas as pd
def read_data():
'''
:return: the climate data with some pre-processing
'''
with open('./climate.data', 'r') as f:
data = pd.read_csv(f)
return data.rename(columns={name: name[1:] for name in data.columns})
def plot_part_line():
... |
package org.firezenk.goldenbleetle.features.common
class Store {
private val states: MutableList<State> = mutableListOf()
val frozenStates: List<State>
get() = states.toList()
internal fun add(function: () -> State) {
states.add(function())
}
internal fun clear() = states.clear(... |
#!/usr/bin/env bash
mkdir -p /var/www/data/stats-data
ln -s /var/www/data/stats-data stats-data |
import * as React from 'react';
import defaultOptions from '../../defaultOptions';
import { SortingMode } from '../../enums';
import { Column } from '../../Models/Column';
import { DispatchFunc } from '../../types';
import HeadCellContent from '../HeadCellContent/HeadCellContent';
export interface IHeadCellProps {
... |
/*
* =====================================================================================
*
* Filename: aer_backend.hpp
*
* Description:
*
* Version: 1.0
* Created: 09/28/2021 04:38:06 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Orga... |
class V8::Object
def to_hash
to_hash0(self)
end
def to_hash0(obj)
case obj
when V8::Array
obj.map {|v| to_hash0(v) }
when V8::Object
h = {}
obj.each do |k, v|
h[to_hash0(k)] = to_hash0(v)
end
h
else
obj
end
end
end
|
package com.example.calculator.presentation.settings
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.calculator.domain.SettingsDao
import com.example.calculator.domain.entity.ForceVibrationTypeE... |
package cn.edu.cug.cs.gtl.geom;
import cn.edu.cug.cs.gtl.io.Serializable;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
/**
* Created by hadoop on 17-3-27.
*/
public class Track implements Serializable, Comparable<Track> {
private static final long serialVersionUID = 1L;
... |
const fs = require('fs')
const data = require('./query_results.json')
const metrics = data.other_metrics;
handleErr = err => {
if(err){
console.log('error while writing:' , err);
}
}
var headers = "timestamp"
var dict = {}
metrics.forEach(element => {
headers = `${headers},${element.metric_name}`... |
const nuke = require("./../../build/system/fs/nuke");
const perf = require("./index").perf;
module.exports = function (dir) {
return perf(function () {
nuke.nukeSync(dir);
});
};
|
#ifndef __clang__
unsigned short __builtin_subcs(unsigned short, unsigned short, unsigned short, unsigned short *);
#endif
int main(int argc, const char **argv) {
unsigned short carryout, res;
res = __builtin_subcs((unsigned short)0x0, (unsigned short)0x0, 0, &carryout);
if (res != 0x0 || carryout != 0) {
r... |
module DeployGate
module Config
class Credential < Base
class << self
# @return [String]
def file_path
File.join(ENV["HOME"], '.dg/credentials')
end
end
end
end
end
|
# frozen_string_literal: true
RSpec.describe ActiveCampaignWrapper::Core::EmailActivityGateway, :vcr do
let(:email_activity_gateway) do
described_class.new(ActiveCampaignWrapper::Client.new)
end
describe '#all' do
subject(:response) { email_activity_gateway.all }
it 'returns email activities hash' ... |
#!/data/data/com.termux/files/usr/bin/bash -e
## Setup Colors
reset='\033[0m'
red='\033[1;31m'
blue='\033[1;34m'
yellow='\033[1;33m'
FS="$HOME/.mytermux/linux/kali/linux-fs"
## if file .setup-linux.sh exists, run with ash shell
setup="./.setup-linux.sh"
echo "[ -s $setup ] && $setup" > $FS/root/.profile
## change t... |
<?php
namespace app\models;
use yii\base\Model;
class Users extends model {
function Get_userAll() {
$sql = "SELECT * FROM masuser";
$result = \Yii::$app->db->createCommand($sql)->queryAll();
return $result;
}
}
|
;;; Purpose: Read a file of kif into a hashtable indexed by the line number at which
;;; each toplevel form appears.
(in-package :kif)
(defparameter *kif-readtable* (copy-readtable nil))
(defvar *kif-std-readtable* (copy-readtable nil))
(defvar *kif-line* 1 "Line at which we are reading")
(defparameter *ki... |
package tfimportables
import (
"testing"
"github.com/onelogin/onelogin/clients"
"github.com/stretchr/testify/assert"
)
func TestGetImportable(t *testing.T) {
clientList := &clients.Clients{
ClientConfigs: clients.ClientConfigs{
OneLoginClientID: "test",
OneLoginClientSecret: "test",
OneLoginURL: ... |
using RobotDynamics
using ForwardDiff
using LinearAlgebra
using RobotDynamics: dynamics, discrete_dynamics
function check_jacobians(model, z)
t,dt, = z.t, z.dt
xn = zeros(RD.state_dim(model))
J0 = ForwardDiff.jacobian(z->RD.discrete_dynamics(model, z[1:4], z[5:5], t, dt), z.z)
J = similar(J0)
for... |
package util
import (
"os"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
func NewLogger(json bool) *zap.Logger {
econf := zapcore.EncoderConfig{
MessageKey: "msg",
LevelKey: "level",
NameKey: "logger",
EncodeLevel: zapcore.LowercaseLevelEncoder,
EncodeTime: zapcore.ISO8601TimeEn... |
package chapter16
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMaxNumWithoutComparison(t *testing.T) {
testData := []struct {
name string
a, b, max int
}{
{"comparing possitive numbers", 1, 2, 2},
{"comparing zero values", 0, 0, 0},
{"comparing negative numbers", -123, -1212,... |
# Copyright (c) 2019 Herbert Shen <ishbguy@hotmail.com> All Rights Reserved.
# Released under the terms of the MIT License.
bacon_export prompt
declare -ga BACON_PROMPT_PS1_LAYOUT=()
declare -ga BACON_PROMPT_COUNTERS=()
declare -gA BACON_PROMPT_COLOR=()
declare -gA BACON_PROMPT_CHARS=()
bacon_promptc() {
local c... |
# Headers
# h1
## h2
### h3
#### h4
##### h5
###### h6
# h1
## h2
### h3
#### h4
##### h5
###### h6
# header *italic*
## header _italic text_
### header **bold text**
#### header __bold text__
##### header *italic*
###### header *italic*
# header `code`
## header ```code```
### header `code`
#### header ```co... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.1.63-community - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL version: 7.0.0.4053
-- Date/time: 2012-10-14 17:59:16
... |
package com.jeffpdavidson.kotwords.formats
import com.jeffpdavidson.kotwords.formats.AcrossLite.Companion.asAcrossLiteBinary
import com.jeffpdavidson.kotwords.readBinaryResource
import com.jeffpdavidson.kotwords.readStringResource
import com.jeffpdavidson.kotwords.runTest
import kotlin.test.Test
import kotlin.test.ass... |
---
Title: ソースからビルド
nav: ja
---
# ソースからビルド
Content App は [Angular CLI](https://cli.angular.io) をベースとしており、CLI でサポートされているすべてのコマンド、ジェネレーター、およびブループリントを使用できます。
## ビルドの前提条件
- [Node.js](https://nodejs.org/ja/) LTS
- (オプション) [Angular CLI](https://cli.angular.io/) 7.3.4 以降
> Angular CLI ライブラリはすでにセットアップの一部です。
> CLI コマンドを個別に... |
## pin map
|引脚 |功能 |片上外设 |功能模块 |
|:----------|:----------|:--------------|:--------------|
|P0.03 |ADC_IN1 |ADC |battery |
|P0.06 |BAT_CHRG |GPIOTE |battery |
|P0.07 |BAT_STDBY |GPIOTE |battery |
| | | | |
|P0.04 |VIBRATION |GPIOTE |vibration motor|
| | | | |
|P0.12 |IIC_CLK |II... |
import { NO_OP } from "@thi.ng/api";
import { Reducer } from "../api";
import { reduce, reducer } from "../reduce";
export function last<T>(): Reducer<T, T>;
export function last<T>(xs: Iterable<T>): T;
export function last<T>(xs?: Iterable<T>): any {
return xs ? reduce(last(), xs) : reducer<T, T>(<any>NO_OP, (_, ... |
import numpy as np
from pypex.poly2d import polygon
def main():
poly1 = polygon.Polygon([[0.0, 0.0], [1.0, 0.0], [0.0, 1.0], [1.0, 1.0]])
poly2 = polygon.Polygon([[0.5, 0.3], [0.0, -1.0], [1.0, -1.0]])
print("Polygon with hull defined by {} \n is automaticaly sorted to clokwise corners as {}\n"
... |
#ifndef _LINUX_TIMEKEEPING_WRAPPER_H
#define _LINUX_TIMEKEEPING_WRAPPER_H
#ifndef HAVE_KTIME_GET_TS64
#define ktime_get_ts64 ktime_get_ts
#define timespec64 timespec
#else
#include_next <linux/timekeeping.h>
#endif
#endif
|
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Hash;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Mahasiswa extends Authenticatable
{
protected $table = "mahasiswa";
protected $fillable = [
'nim',
'username',
'nama_mahasis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.