text stringlengths 27 775k |
|---|
#!/bin/bash
echo "Unistalling volgrp dependencies"
echo "Removing volgrp"
systemctl stop volgrp
sudo rm /etc/systemd/system/volgrp.service
echo "Done"
echo "pluginuninstallend"
|
using System;
//using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core.Config;
namespace PepperDash.Core.JsonToSimpl
{
public class JsonToSim... |
check :: String -> String -> Bool
check [] [] = True
check (a:as) (b:bs) | a == b = (check as bs)
| otherwise = False
localizarGeral :: Int -> String -> String -> Int
localizarGeral n (a:as) [] = 0
localizarGeral n (a:as) (b:bs) | a == b && (check (a:as) (take (length (a:as)) (b:bs))) = n+1
... |
package slices_test
import (
"testing"
"github.com/boundedinfinity/commons/slices"
"github.com/stretchr/testify/assert"
)
func Test_All_String(t *testing.T) {
actual1 := slices.AllV("a", "a", "a", "a")
assert.Equal(t, true, actual1)
actual2 := slices.AllV("a", "b", "a", "a")
assert.Equal(t, false, actual2)
}... |
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* 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 a... |
import * as React from 'react'
import '../styles.scss'
import { BuildThemeStyle, Theme } from '../Models/Theme/Theme';
import { TextContent } from '../Text/TextContent';
import { defaultControlStyleMap } from '../Models/Theme/ThemeControls';
import { defaultControlPaletteStyleMap } from '../Models/Theme/ThemePalette... |
package org.cytosm.cypher2sql.cypher.parser;
import org.cytosm.cypher2sql.cypher.ast.Statement;
import org.cytosm.cypher2sql.cypher.ast.clause.match.pattern.Pattern;
import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CommonTokenStream;
/**
*/
public class ASTBuilder {
/**
* Parse the... |
package filters
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"../replacement"
)
// Filters maps reywords to result maps
var Filters map[string]string
// FilterFolder is the folder that filters are saved/loaded from
var FilterFolder string
// OutputLocation is the folder that compiled filters get saved to
v... |
# Quasar example
## Installation
```sh
yarn add pinia-plugin-persistedstate-2
```
## Usage
```diff
// src/stores/index.ts
import { store } from 'quasar/wrappers'
import { createPinia } from 'pinia'
+ import { createPersistedStatePlugin } from 'pinia-plugin-persistedstate-2'
/*
* If not building with SSR mode, you... |
import 'dart:convert';
import 'package:alfred_workflow/src/models/github_user.dart';
import 'package:data_fixture_dart/data_fixture_dart.dart';
extension GithubUserFixture on GithubUser {
static _GithubUserFactory get factory => _GithubUserFactory();
}
class _GithubUserFactory extends FixtureFactory<GithubUser> {
... |
package net.yslibrary.monotweety.domain
import dagger.Binds
import dagger.Module
import net.yslibrary.monotweety.domain.session.ObserveSession
import net.yslibrary.monotweety.domain.session.ObserveSessionImpl
import net.yslibrary.monotweety.domain.setting.GetTimelineTwitterApp
import net.yslibrary.monotweety.domain.se... |
The core plugins all implement standard plugins for implementing minecraft features. Some of them
are more essential then others. |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wno-orphans #-}
-- | Wrapper for Finkel code compilation monad.
module Language.Finkel.Fnk
( -- * Finkel compiler monad
Fnk(..)
, FnkEnv(..)
, FnkEnvRef(..)
, Macro(..)
, MacroFunction
, MacroName(..)
, EnvMacros
... |
# 自动调整栅格元素
待办: https://github.com/jbaysolutions/vue-grid-layout/issues/351
|
const utils = require('../utils/utils')
const JSONLD_PATTERN = 'script[type="application/ld+json"]'
exports.execute = function (html) {
const $html = utils.getCheerioObject(html)
let jsonldData = {}
$html(JSONLD_PATTERN).each((index, item) => {
try {
let parsedJSON = JSON.parse($html(i... |
<?php
require_once('init.php');
extract($_POST);
$tab = array();
// -------------- REQUETE DE SELECTEUR (aller)
$result = $bdd->query("SELECT * FROM employes WHERE id_employes = $id");
// ------------- DECLARATION TABLEAU (retour)
$tab['resultat'] = '<table class="table table-dark text-center"><tr>';... |
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
# Request factory
FactoryBot.define do
factory :request do
sequence :session_id do |n| "session-#{n}" end
referent
trait :av... |
// Copyright 2016, Google
//
// 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 writ... |
import React from "react";
import {
SignUpFormInput,
StyledSignUpForm,
SignUpFormCloseButton,
SignUpFormSubmitButton,
} from "./SignUpForm.styled";
import { SignUpRadioGroup, Title } from "components";
export default function SignUpForm({
onChange,
onBlur,
errorMessage,
onSubmit,
disabled,
closeMod... |
#Runs a simple Metropolis-Hastings (ie MCMC) algoritm to simulate an
#exponential distribution, which has the probability density
#p(x)=exp(-x/m^2), where m>0.
#
#Author: H. Paul Keeler, 2019.
# Website: hpaulkeeler.com
# Repository: github.com/hpaulkeeler/posts
#Note: Need the .+ for adding a scalar to an array
#Also... |
require_relative "../type/comment"
module Metado
module Parser
module File
class << self
def comments file
regex = single_line_comment_regex(file)
::File.readlines(file).each_with_index.reduce([[], nil]) { |(comments, current_comment), (line, index)|
if (line = line... |
require 'net/http'
require 'net/https'
require 'json'
require 'digest'
require 'logger'
require 'honeybadger/configuration'
require 'honeybadger/backtrace'
require 'honeybadger/notice'
require 'honeybadger/rack'
require 'honeybadger/sender'
require 'honeybadger/railtie' if defined?(Rails::Railtie)
module Honeybadger... |
# frozen_string_literal: true
FactoryBot.define do
factory :admin, class: 'InternalUser' do
activated_user
association :consumer
email { 'admin@example.org' }
generated_user_name
password { 'admin' }
role { 'admin' }
singleton_internal_user
end
factory :teacher, class: 'InternalUser'... |
<?php
namespace Kpicaza\ExamBundle\Form\Model;
use Symfony\Component\Validator\Constraints as Assert;
class FilterFormModel extends PagerFormModel
{
/**
* @Assert\Regex("/^[a-z\-0-9]/")
*
* @var type
*/
private $exam_id;
public function getExamId()
{
return $this->exam_... |
/**
* Copyright (c) 2015, by the Authors: Antonio Sanchez (UBC)
*
* This software is freely available under a 2-clause BSD license. Please see
* the LICENSE file in the ArtiSynth distribution directory for details.
*/
package maspack.fileutil;
import org.apache.commons.vfs2.FileObject;
/**
* Transfer event con... |
// Copyright © 2020 EPAM Systems, Inc. All Rights Reserved. All information contained herein is, and remains the
// property of EPAM Systems, Inc. and/or its suppliers and is protected by international intellectual
// property law. Dissemination of this information or reproduction of this material is strictly forbidde... |
import styled from 'styled-components'
import { Container } from 'components/containers'
import device from 'themes/device'
export const ContentContainer = styled(Container)`
flex-direction: column;
padding-top: 80px;
padding-bottom: 80px;
@media ${device.tablet} {
padding-top: 40px;
p... |
---
layout: docs
title: Facebook\HackCodegen\CodegenShape
id: class.Facebook.HackCodegen.CodegenShape
docid: class.Facebook.HackCodegen.CodegenShape
permalink: /docs/reference/class.Facebook.HackCodegen.CodegenShape/
---
# Facebook\\HackCodegen\\CodegenShape
Generate code for a shape
Please don't use this class... |
import * as math from '../index';
describe('math', () => {
it('getNumberSuffix', () => {
expect(math.getNumberSuffix(1)).toBe('st');
expect(math.getNumberSuffix(11)).toBe('st');
expect(math.getNumberSuffix(11111)).toBe('st');
expect(math.getNumberSuffix(2)).toBe('nd');
expe... |
/*
* 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 ... |
package scalanlp.concurrent
import org.scalatest._;
import org.scalatest.junit._;
import org.scalatest.prop._;
import org.scalacheck._;
import org.junit.runner.RunWith;
@RunWith(classOf[JUnitRunner])
class ParallelOpsTest extends FunSuite with Checkers {
import ParallelOps._;
test("sum works") {
assert((1 to ... |
package io.vertx.test.redis;
import io.vertx.core.AsyncResult;
import org.junit.Test;
public class NullableTest extends AbstractRedisClientBase {
private static final String notExistsKey = "notExistsKey";
@Test
public void testGetNullable() {
makeSureKeyNotExists(() -> {
redis.get(notExistsKey, this... |
# coding: utf-8
import socket
from multiprocessing.dummy import Pool as ThreadPool
def main():
global host_ip
host = input("Enter a host to scan:")
exit_port = int(input("Enter exit_port:"))
processes_num = int(input("Enter processes num:"))
host_ip = socket.gethostbyname(host)
port... |
#!/bin/bash
netstat -s | grep 'receive buffer errors$' | awk '{ print $1 }'
|
Puppet::Type.newtype(:cloudwatch_alarm) do
@doc = 'Type representing an AWS CloudWatch Alarm.'
ensurable
newparam(:name, namevar: true) do
desc 'The name of the alarm.'
validate do |value|
fail 'alarms must have a name' if value == ''
fail 'Name should be a String' unless value.is_a?(String)... |
@extends('index')
@section('main_section')
<div class="container">
<h3>Details Of <span style="color: #3f9ae5">{{$customer->name}}</span></h3>
</div>
@endsection |
#!/bin/bash
#
# Calculate unique sizes of all Time Machine snapshots.
#
BACKUPS=`tmutil listbackups`
for SNAPSHOT in $BACKUPS; do
sudo tmutil uniquesize $SNAPSHOT
done
|
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import * as nodemailer from 'nodemailer';
import * as hbs from 'nodemailer-express-handlebars';
import { iForgetCode } from './interface/forget.code';
import { IRegisterCode } from './interface/register.code';
@Injectable()
ex... |
package no.nav.dagpenger.streams
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockk
import org.apache.kafka.streams.KafkaStreams
import org.junit.jupiter.api.Test
internal class KafkaStreamHealthCheckTest {
@Test
fun `Should be up when streams are running`() {
val streams ... |
from .program import Program
from mongoengine.fields import ListField, StringField
class Terminal(Program):
commands = ListField(StringField(max_length=200))
|
using System;
using System.Collections.Generic;
using System.Threading;
namespace lab_16_rabbits
{
class RabbitProgram
{
static List<Rabbit> rabbits = new List<Rabbit>();
static void Main(string[] args)
{
for(int i = 1; i<=100;i++)
{
// create ... |
#[derive(Debug, PartialEq, Eq)]
enum PacketData {
Literal(usize),
Operator(usize, Vec<Packet>)
}
#[derive(Debug, PartialEq, Eq)]
struct Packet {
version: usize,
data: PacketData,
}
fn read_number(bitstream: &mut &[u8], n_bits: usize) -> Option<usize> {
let mut number = 0;
for _ in 0..n_bits {... |
require 'mspec/runner/filters/match'
require 'mspec/runner/filters/regexp'
require 'mspec/runner/filters/tag'
require 'mspec/runner/filters/profile'
|
using FluentResults;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using UsuariosApi.Data.Dtos.Usuario;
using UsuariosApi.Data.Request;
using UsuariosApi.Services;
namespace UsuariosApi.Controllers
{
[ApiController]
[Route("[co... |
# Tron TRC10 Token - TRC10
### 文档版本:3.6.6
检查日期: 2020.03.16
### 官网地址:
https://tron.network
### 钱包下载:
https://ww.getmonero.org/downloads/
### 查询网站:
https://tronscan.org/
### 开发文档
https://developers.tron.network/
### 安装说明:
* 同 TRX - Tron
### 配置文件:
* 同 TRX - Tron
### 升级说明:
* 同 TRX - Tron
### 创建地址:
* 同 TRX - Tron
... |
exclude :test_error_message_when_connection_not_established, 'Uses ObjectSpace::WeakMap#each_key not yet implemented in JRuby'
exclude :test_connection_no_longer_established, 'Uses ObjectSpace::WeakMap#each_key not yet implemented in JRuby'
exclude :test_underlying_adapter_no_longer_active, 'Uses ObjectSpace::WeakMap#e... |
package cmd
import (
"github.com/se7entyse7en/pydockenv/internal/dependency"
"github.com/se7entyse7en/pydockenv/log"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
var uninstallCmd = &cobra.Command{
Use: "uninstall [package_1] [package_2] ... [package_n]",
Short: "unInstall packages from args",
Args... |
#!/usr/bin/env bash
SERVICE_NAME=penny \
SERVICE_ROOT=knockknockknock \
PORT=8082 \
SERVICE_PORT=8082 \
REDIS_URL=redis://127.0.0.1:6379 \
java -jar target/penny-1.0-SNAPSHOT-fat.jar
|
extern crate cargo_deps;
use cargo_deps::{get_dep_graph, render_dep_graph, Config};
// This is really just a smoke test to ensure we can use cargo-deps as a lib.
#[test]
fn get_dep_graph_self() {
let cfg = Config::default();
let graph = get_dep_graph(cfg).unwrap();
assert!(graph.nodes.iter().any(|d| d.nam... |
function no_user() {
alert(" Vartotojas turi buti prisiregistraves !!!");
} |
using System;
using System.Collections.Generic;
namespace HttpMock
{
public class HttpServerFactory
{
private readonly Dictionary<int, IHttpServer> _httpServers = new Dictionary<int, IHttpServer>();
public IHttpServer Get(Uri uri)
{
if (_httpServers.ContainsKey(uri.Port))
{
IHttpServer... |
#!/bin/bash
cd ~
curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.18.8/2020-09-18/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin
sudo ln -s /usr/local/bin/kubectl /usr/bin/kubectl
|
#include <array>
#include <string>
#include <sstream>
#include "cboard.hpp"
class CGeister {
private:
static constexpr int ActionNum = 144;
static constexpr char InitState[] = "14B24B34B44B15B25B35B45B41B31B21B11B40B30B20B10B";
const bool openInfo;
int nextPlayer;
CBoard board;
public:
int turn;... |
#pragma once
#include "CoordinateTransform.h"
namespace SharpProj {
ref class CoordinateTransform;
namespace Proj {
[DebuggerDisplay("{Name,nq}")]
public ref class GridUsage
{
private:
[DebuggerBrowsable(DebuggerBrowsableState::Never)]
initonly CoordinateTransform^ m_transform;
[DebuggerBrowsable(De... |
import React from 'react'
import MixedFieldsForm from './../components/mixed-fields-form/mixed-fields-form'
const MixedFieldsPage = () => {
return (
<>
<h1>Controlled & Uncontrolled Inputs</h1>
<MixedFieldsForm />
</>
)
}
export default MixedFieldsPage
|
using System;
using LogCast.Engine;
using LogCast.Rendering;
using BddStyle.NUnit;
using Moq;
namespace LogCast.Test.given_ContextSummaryBuilder
{
public abstract class Context : ContextBase
{
internal ContextSummaryBuilder Builder;
protected MessageFactory Factory;
protected IContextT... |
using System;
using System.Diagnostics;
using System.IO;
using ICSharpCode.SharpZipLib.BZip2;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Tar;
namespace ElasticStack.BinaryPacker.Tasks.Internal
{
internal static class Utilities
{
internal static int Execute(
string fi... |
.MODEL small
.STACK
.DATA
N db 4h
num db 8h,4h,2h,1h
.CODE
.STARTUP
MOV cx,00h
MOV al,20h
MOV cl,N
MOV bx,offset num
subtraction: sub al,[bx]
inc bx
loop subtraction
.EXIT
end |
package gca.in.xap.tools.operationtool.predicates.container;
import org.openspaces.admin.gsc.GridServiceContainer;
import java.util.function.Predicate;
public class IsNonEmptyContainerPredicate implements Predicate<GridServiceContainer> {
@Override
public boolean test(GridServiceContainer gsc) {
return gsc.getPr... |
<?php
session_start();
//Va guardando toda la salida en una cache
ob_start();
include 'config.php';
include 'functionBD.php';
include 'resize.php';
//include 'functionForm.php';
//include 'functionTable.php';
// validacion de session
error_reporting( error_reporting() & ~E_NOTICE );
function getRealIpAddr... |
/*
* Copyright 2018 ABSA Group Limited
*
* 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... |
<?php
declare(strict_types=1);
namespace EonX\EasyCore\Tests;
use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Filesystem\Filesystem;
/**
* This class has for objective to provide common features to all tests without having to update
* the class they all extend.
*/
abstract class ... |
using System;
namespace Homework_6.Models
{
public class RunTracker
{
public double Distance { get; set; }
public TimeSpan TimeWorkout { get; set; }
}
}
|
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package net.sf.mmm.ui.toolkit.impl.swt.view.widget;
import java.util.Date;
import java.util.Locale;
import net.sf.mmm.ui.toolkit.api.view.widget.UiDateBox;
import net.sf.mmm.ui.toolkit.impl... |
import {Lesson} from "../models/lesson";
export class Course {
_id: string;
title: string;
description: string;
image: string;
alias: string;
lessons: Array<Lesson>;
} |
#!/bin/sh
start=`date +%s`
(
for a in `grep ::Action:: BuildList | awk -F '::' '{print \$5}'`; do (
echo $a
P6_AWS_TESTING=1 perl6 -Ilib t/04-actions.t --unit=$a --tests=basic 2>&1
)
done;
) 2>&1 | tee -a LastActionTests
end=`date +%s`
runtime=$((end-start))
echo "Tests ran in $runtime seconds";
grep nok... |
package com.seedcompany.cordtables.components.tables.up.prayer_requests
import com.seedcompany.cordtables.common.LocationType
import com.seedcompany.cordtables.common.ErrorType
import com.seedcompany.cordtables.common.Utility
import com.seedcompany.cordtables.common.GetPaginatedResultSet
import com.seedcompany.cordtab... |
<?php
namespace App\Http\Controllers;
use App\Attributes;
use App\AttributeMaster;
use App\Subcategorytype;
use App\UnitMaster;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Auth;
class AttributesController extends Controller
{
/**
* Display a listing... |
package com.guilla.lab.activities
import android.app.AlertDialog
import android.app.Dialog
import android.app.ProgressDialog
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.text.Html
import android.util.Log
import android.view.KeyEvent
import android.view.Menu
import android.vie... |
# This Chefspec test was created by Chef generate
#
# Cookbook Name:: openssl
# Spec:: upgrade_spec
#
# Author:: Joshua Timberman (<jtimberman@chef.io>)
# Author:: Charles Johnson (<charles@chef.io>)
#
# Copyright 2015, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may no... |
module Raycaster
class Controls
# Button mapping for 8Bitdo SFC30 GamePad
# Gosu::GP_BUTTON_0 -> B
# Gosu::GP_BUTTON_1 -> A
# Gosu::GP_BUTTON_2 -> Y
# Gosu::GP_BUTTON_3 -> X
# Gosu::GP_BUTTON_4 -> SELECT
# Gosu::GP_BUTTON_6 -> START
# Gosu::GP_BUTTON_9 -> L
# Gosu::GP_B... |
import gstore from './gstore';
const { Schema } = gstore;
export interface UserModel {
userId: string;
email: string;
name?: string;
createdOn?: Date;
modifiedOn?: Date;
}
const User = new Schema<UserModel>({
userId: { type: String, required: true },
email: { type: String, required: true },
name: { t... |
import {
scaleLinear,
scaleOrdinal,
axisLeft,
axisBottom,
max,
} from 'd3';
import { getChartDimensions, getRange } from '../../../d3';
import { colorGenerator, selectSamples } from '../../util';
import {
addSurvivalRate,
clusterKMeans,
clusterQuantiles,
clusterMean,
clusterMedi... |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = "Aubergine/Dash/Constant")]
public class Constant_dash : Dash {
override public float power(float start_time) {
// returns constant 1
return 1f;
}
} |
set echo off
set verify off
accept xTable prompt 'Enter Table Name: '
TTITLE LEFT 'Child Tables for the table: '&xTABLE
break on TABLE_NAME
SELECT B.TABLE_NAME, C.COLUMN_NAME, C.POSITION
FROM USER_CONSTRAINTS A, USER_CONSTRAINTS B, USER_CONS_COLUMNS C
WHERE A.CONSTRAINT_NAME = B.R_CONSTRAINT_NAME
AND A.TABLE_NA... |
package org.rundeck.core.auth.access;
import java.util.Map;
/**
* Defines a set of named auth actions
*/
public interface NamedAuthDefinition {
/**
* The group name
*/
String getGroupName();
/**
* The auth action defintions by name
*/
Map<String, AuthActions> getDefinitions();
}... |
<?php
return [
'title' => 'Password forgotten',
'heading' => 'Reset Password',
'submit' => 'Send Reset Mail',
];
|
/*
* This text was generated automatically
* It provides the ISC implementation of
* MPI_Cart_sub
*/
#include <_mpi.h>
#ifdef __GNUC__
void MPI_CART_SUB() __attribute__ ((weak, alias("iscf_cart_sub")));
void mpi_cart_sub() __attribute__ ((weak, alias("iscf_cart_sub")));
void mpi_cart_sub_() __attribute__ ((weak,... |
using Unityper, Test, Setfield, ConstructionBase
@compactify begin
@abstract struct AT
common_field::Int = 0
end
struct A <: AT
a::Bool = true
b::Int = 10
end
struct B <: AT
a::Int = 1
b::Float64 = 1.0
d::Complex = 1 + 1.0im # not isbits
end
s... |
#Inconsistent MRO
class X(object):
pass
class Y(X):
pass
class Z(X, Y):
pass
class O:
pass
#This is OK in Python 2
class N(object, O):
pass |
# rpi-auto-hostname
Automatic set unique hostname on boot
## How it works
On each boot a script the script updates `/etc/hostname` and runs `hostname` to
set it to `{prefix}-{raspberryid}`.'
## Installation
```
curl https://raw.githubusercontent.com/the-louie/rpi-auto-hostname/master/install.sh | sudo bash
```
Or dow... |
if defined?(Rack::Timeout)
if Rails.env.production? || Rails.env.staging?
Rack::Timeout.timeout = Rails.application.config.settings.rack.timeout # seconds
else
Rails.configuration.middleware.delete Rack::Timeout
# Rack::Timeout.unregister_state_change_observer(:logger)
end
# class TimeoutObserver
... |
# Development
This document highlights the required tools and workflows to develop for Conftest.
## Tools
### Go
Conftest is written in the [Go](https://golang.org) programming language, and can be installed from their [installation page](https://golang.org/doc/install).
If you are not familiar with Go we recommen... |
#!/bin/sh
genextdoc=`which genextdoc.py 2>/dev/null`
if test "x$genextdoc" = x; then
cat <<EOF
Need genextdoc.py to generate the documentation.
Fetch it at http://trific.ath.cx/Ftp/python/genextdoc.py
EOF
else
genextdoc.py Levenshtein NEWS
fi
|
# frozen_string_literal: true
require "spec_helper"
describe Mongoid::Association::Nested::One do
let(:association) do
Person.relations['name']
end
describe "#allow_destroy?" do
context "when the option is provided" do
let(:builder) do
described_class.new(association, {}, allow_destroy... |
package com.chilingaryan.expandablerecyclerview
import android.content.Context
import android.graphics.Color
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import andr... |
import * as schema from './schema';
export interface AttributeMap {
[key: string]: any;
}
export declare abstract class GraphElement {
private _id;
private _attributes;
id: string;
attributes: AttributeMap;
constructor(id: string);
}
export declare class Node extends GraphElement {
construct... |
<?php
use \Tsugi\Crypt\AesCtr;
use \Tsugi\Core\User;
if ( ! function_exists('hex2bin')) {
function hex2bin($hexString)
{
$hexLength = strlen($hexString);
// only hex numbers is allowed
if ($hexLength % 2 != 0 || preg_match("/[^\da-fA-F]/",$hexString)) return FALSE;
unset($binString);
$binString =... |
use inox_math::Vector4;
use crate::{VertexBufferLayoutBuilder, INVALID_INDEX};
#[repr(C)]
#[derive(Debug, PartialEq, Clone, Copy)]
pub struct InstanceData {
pub draw_area: [f32; 4],
pub matrix: [[f32; 4]; 4],
pub material_index: i32,
}
impl Default for InstanceData {
fn default() -> Self {
Se... |
package com.truiton.mergedlivedata.model
import com.google.gson.annotations.SerializedName
data class Response (
@SerializedName("venues") val venues : List<Venues>,
@SerializedName("geocode") val geocode : Geocode
) |
// Copyright 2014 DeNA Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... |
package labels
import "errors"
var _ Labels = (*Name)(nil)
type Name struct {
model InternalName
}
type InternalNameProp struct {
Name string `yaml:"app.kubernetes.io/name,omitempty"`
}
type InternalName struct {
InternalNameProp `yaml:",inline"`
InternalComponent `yaml:",inline"`
}
func ForName(l *Component... |
#!/bin/sh
CONFIG_DATA_PATH=$HOME/.sentinel/config.json
if [ -f "$CONFIG_DATA_PATH" ]; then
echo "Found config file."
else
while true; do
echo -n "Do you have a wallet address? [y/N]: "
read -r option
if [ "$option" = "y" ] || [ "$option" = "Y" ]; then
echo -n "Please enter your wallet address: "... |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule, Injectable } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS, HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
... |
use employeeDB;
INSERT INTO
department (department_name)
VALUES
('Pharmacy'),
('Engineering'),
('Finance'),
('Bowling');
INSERT INTO
role (title, salary, department_id)
VALUES
('Bowling Manager', 100000, 4),
('Bowling Rep', 75000, 4),
('Engineering Manager', 160000, 2),
('Electrical Engineer', 13000... |
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe DecodeJWT, type: :service do
subject { described_class.new(raw_jwt) }
describe '#call' do
context 'when given JWT is nil' do
let(:raw_jwt) { nil }
it 'raises DecodeJWTError' do
expect { subject.call }.to raise_error(Deco... |
---
layout: post
title: Next time we will not aim so high.
created: 1061060400
---
Come two o’clock, the rain will
pat down the roofs, cleansing
our everydays woken with weighted
hearts. The sun waits until
the clouds form like circling
vultures craving radiant rays.
Your eyes are true.
Those decadent days... |
# comparison-types-for-associative-containers-of-pointers
When you have an associative container of pointers or want to sort a
sequence of pointers, don’t forget to specify your own predicates to
dereference the pointers.
First of all, of course, don’t expect that if you iterate over such a
sequence, that you will ge... |
#!/usr/bin/env bash
aws s3api get-object --bucket org.mikeneck.test --key jmh-java-collection-benchmark.zip
unzip jmh-java-collection-benchmark.zip
artifact=jmh-java-collection-benchmark-`date "+%Y%m%d%H%M%S"`.txt
jmh-java-collection-benchmark/bin/jmh-java-collection-benchmark | tee ${artifact}
aws s3api put-object... |
/**
* @description 带样式的 log
* @author ronffy
* @Date 2021-01-08 14:24:27
* @LastEditTime 2021-01-14 11:21:14
* @LastEditors ronffy
*/
const baseStyle = {
color: 'white',
};
const defaultKeyStyle = {
...baseStyle,
background: '#606060',
['border-radius']: '2px 0 0 2px',
};
const defaultValStyle = {
...ba... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.