text
stringlengths
27
775k
module GroupsHelper def display_banner(group) if group.image.attached? image_tag url_for(group.image), class: "group-banner" else image_tag url_for("placeholder-banner.png"), class: "group-banner" end end end
DELETE FROM `command` WHERE `name` = 'reload locales_creature_text'; INSERT INTO `command` (`name`, `security`, `help`) VALUES ('reload locales_creature_text', 3, 'Syntax: .reload locales_creature_text\nReload locales_creature_text Table.');
the promo server serves the mailserver section of the game, as well as the promo/tutorial material also nginx configs are in here because my filestructure is dumb
package molecule.core.util import scala.concurrent.ExecutionContext object Executor extends ExecutorImpl { implicit def global: ExecutionContext = globalImpl }
package api import ( "context" "encoding/json" "github.com/project-flogo/core/support/log" "reflect" "strconv" "strings" "github.com/project-flogo/core/action" "github.com/project-flogo/core/activity" "github.com/project-flogo/core/app" "github.com/project-flogo/core/data" "github.com/project-flogo/core/da...
<?php namespace WorkOS; class ClientTest extends \PHPUnit\Framework\TestCase { use TestHelper; /** * @dataProvider requestExceptionTestProvider */ public function testClientThrowsRequestExceptions($statusCode, $exceptionClass) { $this->withApiKeyAndClientId(); $path = "some...
module Dossier class ReportsController < ApplicationController include ViewContextWithReportFormatter self.responder = Dossier::Responder respond_to :html, :json, :csv, :xls def show respond_with(report) end def multi respond_with(report) end private def report_cl...
class Project < ApplicationRecord belongs_to :user has_many :comments, dependent: :delete_all has_many :enrollments, dependent: :delete_all has_many :backers, through: :enrollments, source: :user, dependent: :delete_all has_one_attached :image validates :duration, presence: {message: 'can’t be l...
import 'dart:async'; import 'dart:io'; import 'dart:convert'; import 'package:chess_against_engine/screens/settings_screen.dart'; import 'package:flutter/material.dart'; import 'package:simple_chess_board/models/board_arrow.dart'; import 'package:simple_chess_board/simple_chess_board.dart'; import 'package:chess_vector...
package net.nemerosa.ontrack.extension.github.model enum class GitHubRepositoryPermission { /** * Can read, clone, and push to this repository. Can also manage issues, pull requests, and repository settings, including adding collaborators */ ADMIN, /** * Can read, clone, and push to this r...
package Leetcode; /** * Definition for a binary tree node. public class TreeNode { int val; TreeNode * left; TreeNode right; TreeNode(int x) { val = x; } } */ class Solution_637_AverageOfLevels { public List<Double> averageOfLevels(TreeNode root) { Queue<TreeNode> mainQueue = new LinkedList<>(); Queue<Tre...
class CommitScore def initialize(commit, repo) @commit = commit @repo = repo @pr = commit.pull_request end def calculate rand(6..10) end end
use v6.*; use List::MoreUtils <insert_after_string>; use Test; plan 5; my @longer = <This is a longer list>; my @list = <This is a list>; insert_after_string( "a", "longer" => @list); is-deeply @list, @longer, "longer positional Pair"; @list = <This is a list>; insert_after_string( "a", longer => @list); is-deeply...
// // PeepOpen.h // PeepOpen // // Created by Michael Enriquez on 5/6/13. // Copyright (c) 2013 Mike Enriquez. All rights reserved. // #import <AppKit/AppKit.h> @interface PeepOpen : NSObject @end
package org.iproduct.spring.aop; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.co...
import 'package:json_annotation/json_annotation.dart'; import 'package:matrix_rest_api/src/api/matrix_client_api/r0/model/event/room_event.dart'; part 'timeline.g.dart'; @JsonSerializable() class Timeline { final List<RoomEvent> events; final bool limited; final String prev_batch; Timeline({ this.events...
import os import requests from commons.config import DEFAULT_IMAGE_SIZE, IMAGE_DOWNLOAD_PATH def download_cimri_image(image_id, size=DEFAULT_IMAGE_SIZE): file_url = "https://cdn.cimri.io/image/{0}x{0}/asdf_{1}.jpg".format(size, image_id) r = requests.get(file_url) save_path = IMAGE_DOWNLOAD_PATH + "{0}....
# == Schema Information # # Table name: site_settings # # id :integer not null, primary key # title :string # created_at :datetime not null # updated_at :datetime not null # logo_file_name :string # logo_content_type :string # logo_file_size ...
package com.github.uryyyyyyy.samples.fp.chapter2 import scala.annotation.tailrec object Recursive { def calcFibs(m:Long):Long = { @tailrec def go(n:Long, acc_1:Long, acc_2:Long):Long = { if (n <= 1) acc_1 else go(n-1, acc_2, acc_1 + acc_2) } go(m, 0, 1) } def calcFibs_2(m:Long):Long = { if(m <= 0...
import { createStore } from 'vuex'; import createPersistedState from 'vuex-persistedstate'; import constants from '../constants'; import pick from 'lodash/pick'; import addStylesheet from '../share/addStylesheet'; export default createStore({ state: () => ({ isLight: window.matchMedia !== undefined ...
--- uid: System.Web.Configuration.FullTrustAssemblyCollection --- --- uid: System.Web.Configuration.FullTrustAssemblyCollection.Clear --- --- uid: System.Web.Configuration.FullTrustAssemblyCollection.#ctor --- --- uid: System.Web.Configuration.FullTrustAssemblyCollection.Remove(System.String) --- --- uid: System.We...
#!/bin/sh cp sources/ffprobe $PRANAOS_SYSROOT/System/Utilities/ cp sources/ffmpeg $PRANAOS_SYSROOT/System/Utilities/
package com.orion.test.encrypt; import com.orion.utils.crypto.Caesars; import org.junit.Test; /** * @author Jiahang Li * @version 1.0.0 * @since 2021/9/4 1:11 */ public class CaesarTests { @Test public void test1() { Caesars caesars = new Caesars(); String e = caesars.encrypt("kdqoijiwqo4...
# encoding: utf-8 require 'helper' class TestAddressCHIT < Test::Unit::TestCase def test_ch_it_canton FFaker::AddressCHIT::CANTON.each do |canton| assert_match(/\A[- a-zàâ]+\z/i, canton) end end end
package com.chatwork.quiz /** * 値が存在する・しないの両状態を表すオブジェクト。いわゆるMaybeモナド。 * * @tparam A 値の型 */ sealed trait MyOption[+A] { /** * 格納された値を返す。 * * @return 値 * @throws NoSuchElementException 値が存在しない場合スローする */ def get: A /** * 値がないかどうかを返す。 * * @return 値が存在しない場合はtrue。 */ def...
import {AbstractExecutable, IExecutableConfig, IRunError} from "../executable"; import {IStorageOperationOptions} from "../storage"; import {IModel} from "../model"; import {failure, GenericResult} from "../result"; import {AbstractModelStorage} from "../storage/model"; const createExecutor = async <K, P>(storage :Abs...
#![no_std] #[cfg(feature = "probes")] pub mod bindings; pub mod iotop; pub mod knock;
#include <iostream> #include "evolve.hh" using namespace std; vector2d evolve(int popsize, int genomelength, vector2d pop, int numgens, float CR, float F, double targets[8][20]){ // here we declare variables and determine the initial cost matrix vector2d optimum = create_vector2d(2,genomelength); vector2d trial = ...
Music Example ============= In this example we will see how to play some simple music with the micro:bit and a piezzo buzzer. In the [Analog Out](../analog_out) we said the the analog output was actually a Pulse Width Modulation (PWM) signal. When a piezzo buzzer is connect to an analog output, changing the frequency...
/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2001-2002 Ricky Yuen <ryuen@qualcomm.com> * Copyright (C) 2003-2011 Marcel Holtmann <marcel@holtmann.org> * * */ #ifndef __SDP_H #define __SDP_H /* Bluetooth assigned UUIDs for protocols */...
<?php declare(strict_types = 1); namespace App\Application\Event; use App\Domain\Entity\Gallery; use App\Domain\Event\GalleryProcessed; use Symfony\Contracts\EventDispatcher\Event; class SfGalleryProcessed extends Event implements GalleryProcessed { /** @var Gallery */ private $gallery; public function ...
using System; using System.Collections.Generic; using IdentityServer4.Models; namespace ExtenFlow.Identity.IdentityServer { /// <summary> /// Class Config. /// </summary> public static class Config { /// <summary> /// Gets the API resources. /// </summary> /// <val...
package de.pxlab.pxl; import java.awt.Graphics; /** * Plays frame animated display objects. The player shows single frames of * animated display objects. Frames are prepared by calling the Display object's * computeAnimationFrame() method with the proper frame number as an argument. * At each frame all ti...
package org.snobot.leds; public interface IAddressableLedStripPattern { boolean update(); }
package com.example.sergio.bookstarapp.room import android.arch.persistence.room.Database import android.arch.persistence.room.Room import android.arch.persistence.room.RoomDatabase import android.content.Context @Database(entities = [BookEntity::class], version = 1) abstract class BookRoomDatabase : RoomDatabase() {...
namespace ModernSlavery.BusinessDomain.DevOps.Models { public class WebjobsModel { } }
// Copyright 2018-2020, Wayfair GmbH // // 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...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; namespace SimpleReport.Model.Replacers { /// <summary> /// Used to replace xml code and remove sty...
# Make the app's "gems" directory a place where gems are loaded from Gem.clear_paths Gem.path.unshift(Merb.root / "gems") # Make the app's "lib" directory a place where ruby files get "require"d from $LOAD_PATH.unshift(Merb.root / "lib") Merb::Config.use do |c| ### Sets up a custom session id key, if you want t...
require 'test_helper' class HeadacheTest < ActiveSupport::TestCase def setup @user = users(:michael) @headache = @user.headaches.build(headache_date: Time.zone.today) end test "should be valid" do assert @headache.valid? end test "user id should be present" do @headache.user_id = nil ...
/******************************************************************************* * * Copyright 2012 Impetus Infotech. * * * * 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 *...
use super::selector::StyleSelector; pub mod standard; pub mod imp; pub trait StyleSelectag<E>: Clone { } pub trait StyleSelectagInto<S,E>: StyleSelectag<E> where S: StyleSelector<E> { fn into_selector(self) -> S; }
// mocha & chai var chai = require('chai'); var should = chai.should(); var assert = chai.assert; var expect = chai.expect; var DELAY = 77; //for asnync test var Promise = require('../src/promise.js').Promise; // console.info(Promise) describe('Test: Instance Method', function() { describe('#then()', function() { ...
export const delay = ms => new Promise(res => setTimeout(res, ms)); export const fakeApi = (url, data) => { console.group('request:', url); console.log('params:', data); console.groupEnd(); return delay(500); };
minikube start --driver=hyperv minikube addons enable ingress kubectl create deployment home --image=rubinjo/home-service:1.0.7 kubectl expose deployment home --type=NodePort --port=8083 kubectl create deployment movie --image=rubinjo/movie-service:1.0.8 kubectl expose deployment movie --type=NodePort --port=8081 kubec...
// Copyright (c) 2021, Janoš Guljaš <janos@resenje.org> // All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package boltron import ( "encoding/binary" "fmt" "math" "time" ) const yearShift = math.MaxInt16 + 1 // TimeEncodingLen is the l...
#ifndef _SIZE_H_ #define _SIZE_H_ // // size.h // // (C) Copyright 2000 Jan van den Baard // All Rights Reserved. // #include "../standard.h" // This class is a wrapper for the SIZE structure. class ClsSize { public: // Initializes the ClsSize with the passed coordinates // or 0. ClsSize( int cx = 0, int cy = ...
#region License // // Copyright (c) 2013, Kooboo team // // Licensed under the BSD License // See the file LICENSE.txt for details. // #endregion using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace Kooboo.CMS.Web { public c...
package jobs import ( "context" eiriniv1 "code.cloudfoundry.org/eirini-controller/pkg/apis/eirini/v1" "code.cloudfoundry.org/lager" batchv1 "k8s.io/api/batch/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type StatusGetter struct { logger lager.Logger } func NewStatusGetter(logger lager.Logger) *StatusGe...
atom_feed({}) do |feed| feed.title(active_blog_title) feed.updated(@blog_posts[0].published_at) if @blog_posts.length > 0 @blog_posts.each do |post| feed.entry(post, { :published_at => post.published_at, :updated_at => post.updated_at, :url => active_blog_post_url(post.cached_slug) }) d...
require 'forwardable' #collection of similar method calls module CodeWeb class MethodList extend Forwardable include Enumerable # what was used in the group by attr_accessor :name # the collection (actually [[k,[v1,v2]],[k2,[v1,v2]]]) attr_accessor :collection def initialize(name, collec...
<?php namespace Chen\NbdomainLogin\Listener; use Flarum\Api\Event\Serializing; use Flarum\Api\Serializer\UserSerializer; class AddUserOpayAddressAttribute { public function handle(Serializing $event) { if ($event->isSerializer(UserSerializer::class)) { $event->attributes += [ ...
part of crop_your_image; /// Calculation logics for various [Rect] data. abstract class _Calculator { const _Calculator(); /// calculates [Rect] of image to fit the screenSize. Rect imageRect(Size screenSize, double imageRatio); /// calculates [Rect] of initial cropping area. Rect initialCropRect( Si...
import { Mesh, BufferGeometry, BufferAttribute, RawShaderMaterial, Vector2, BackSide, AdditiveBlending, Vector3 } from 'three'; import MathEx from 'js-util/MathEx'; import store from '@/store'; import { TRIANGULATION } from '@/const/FACEMESH'; import vs from './glsl/Face.vs'; import fs from './glsl/F...
#!/bin/sh sudo cp ../services/booster.service /etc/systemd/system sudo systemctl enable booster.service
package com.carrotgarden.maven.scalor import org.apache.maven.plugin.AbstractMojo import org.apache.maven.plugins.annotations._ import org.apache.maven.execution.MavenSession import org.apache.maven.project.MavenProject import org.apache.maven.plugin.BuildPluginManager import org.apache.maven.plugin.MojoFailureExcepti...
module Logtail module LogDevices class HTTP # Represents an attempt to deliver a request. Requests can be retried, hence # why we keep track of the number of attempts. class RequestAttempt attr_reader :attempts, :request def initialize(req) @attempts = 0 @req...
require File.expand_path('../../test_helper', __FILE__) module Stripe class ApplePayDomainTest < Test::Unit::TestCase FIXTURE = API_FIXTURES.fetch(:apple_pay_domain) should "be listable" do domains = Stripe::ApplePayDomain.list assert_requested :get, "#{Stripe.api_base}/v1/apple_pay/domains" ...
import React, { Component } from 'react'; export default class Status extends Component { render(){ const character = this.props.character; return ( <div className={"status " + character.name}> <h3>{character.name}</h3> <p>Health: {character.health}</p> ...
#!/usr/bin/env python import argparse import os import sys pkg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', "..")) # noqa sys.path.insert(0, pkg_root) # noqa from tests.fixtures.populate_lib import populate if __name__ == '__main__': parser = argparse.ArgumentParser(description="Set u...
package com.guideapp.ui.views.menu import android.support.v7.widget.RecyclerView import android.view.ViewGroup import com.guideapp.R import com.guideapp.model.MainMenu import com.guideapp.utilities.inflate import kotlinx.android.synthetic.main.item_menu.view.* internal class MenuAdapter(private val mDataSet: List<Mai...
require "spec_helper" def make_and_convert(options) d = DataPointUri.new(options) d.convert_units d end def create_measurement_from_name(taxon_name) measurement = DataMeasurement.new(subject: TaxonConcept.gen, resource: Resource.gen, predicate: KnownUri.gen.uri, object: 'whatever', taxon_name: taxon_name...
# Tic-Tac-Toe-JS > Traditional Tic Tac Toe game ![tic](https://user-images.githubusercontent.com/25789605/91907161-fdd23600-ecb1-11ea-98b1-1eb56a9ab67c.png) The purpose of building this project was to learn about factory functions and the module pattern ## Built With - Javascript, - HTML, - CSS ## Live Demo [Liv...
--- permalink: Algorithm-DataBase --- 1. 一道算法题 有两个单向链表(链表长度分别为 m,n),这两个单向链表有可能在某个元素合并,如下图所示的这样,也可能不合并。 现在给定两个链表的头指针,在不修改链表的情况下,如何快速地判断这两个链表是否合并?如果合并,找到合并的元素,也就是图中的 x 元素。 请用(伪)代码描述算法,并给出时间复杂度和空间复杂度。 ![](/assets/img/blogs/2020-07-25/IntersectionLinkedList.png) 算法: * 用环的思想来做; * 让两条链表分别从各自的开头开始往后遍历; * 当其中一条遍历到末尾时,跳到另一个条链...
import React, { useState, useEffect, useRef, MutableRefObject } from "react"; import { useRecoilState } from "recoil"; import { useDebounce } from "react-use"; import { useHotkeys } from "react-hotkeys-hook"; import { Command, MagnifyingGlass, X, HourglassHigh } from "phosphor-react"; import ReactGA from "react-ga"; i...
# prerequisites # nix in case the .cabal changed $ cabal2nix . > default.nix configure $ nix-shell -I ~ --command 'cabal configure' and build $ cabal build run code generator note: code generator broken for nix build, because of package servant_purescript # dist/build/psclient-generator/psclient...
using UnityEngine; using System.Collections; public class HeightStabiliser : MonoBehaviour { public Vector3 setPoint; public float pGain; public float iGain; public float dGain; public GameObject zCCWRotor1; public GameObject zCCWRotor2; public GameObject xCWRotor1; public GameObject...
class DumpFilesController < ApplicationController before_action :set_dump_file, only: [:show] def show send_file @dump_file.path, file_name: File.basename(@dump_file.path), type: 'application/x-gzip' end private def set_dump_file @dump_file = DumpFile.find(params[:id]) end def dump_fil...
/* * Copyright 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
package devproxy import ( "strconv" "sync" "testing" ) func TestIdGeneratorHandler(t *testing.T) { idGenerator := NewStringIdGenerator() for i := 1; i <= 10; i++ { if idGenerator.NewId() != strconv.Itoa(i) { t.Errorf("Expected %d", i) } } } func TestIdGeneratorHandlerWithMultipleThreads(t *testing.T) { ...
require 'rubygems/format' require 'rubygems/indexer' require 'rdoc/markup/simple_markup' require 'rdoc/markup/simple_markup/to_html' require 'simple_ssl_requirement'
using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public class SuperpositionOfWaves { public bool isObserved { get { return unCollaspedWavesCount > 1 ? false : true; } } public int? observedWaveHashCode { get { if (!isObserved) return null; if (_oberve...
mutable struct Posterior MeanHistogram::DataFrame Parameters::DataFrame Probability::Float64 end mutable struct Results ABCsetup ABCresults VAF::Array{Float64, 1} Posterior::Array{Posterior, 1} ModelProb::DataFrame SampleName::String end
<?php Route::get('/', 'HomeController@index'); Route::get('/balance', 'BalanceController@index'); Route::get('/pagodeservicios', 'PagoDeServiciosController@index'); Route::get('/inversiones', 'InversionesController@index'); Route::get('/login', 'LoginController@index'); Route::post("/pagodeservicios/pago","PagoDeSe...
import BrowserPrograms from './browserPrograms/BrowserPrograms'; import * as browserProgramsSlice from './browserPrograms/browserProgramsSlice'; import BrowserUsers from './browserUsers/BrowserUsers'; import * as browserUsersSlice from './browserUsers/browserUsersSlice'; import Controller from './Controller'; import * ...
(ns clojure-problems.25 (:use [clojure-problems.2])) #_(prn (+ 2 (count (take-while #(< (count (str %)) 1000) (fib (bigint 1) 2)))))
const { expect } = require('chai'); const timeStamp = require('../../src/hooks/time-stamp'); describe('\'time stamp\' hook', () => { it('Should add a timeObj to the field{name}', () => { const hookTest = timeStamp('testCol'); const testCtx = { data: { role: null, testCol: null } }; const test = hookTes...
namespace SimpleFeedNS { public class SFFeedMeta { public string Value { get; set; } public string Type { get; set; } public string Url { get; set; } public string Source { get; set; } public string ExtraInfo { get; set; } public int Length { get; set; } public override string ToString() { re...
$:.unshift File.join(File.dirname(__FILE__),'..','lib') require 'test/unit' require 'chess' module Chess class FileTest < Test::Unit::TestCase def test_values assert_equal( [ File::File_a, File::File_b, File::File_c, File::File_d, File::File_e, ...
# Multithreading, race condition và sứ mệnh thăm dò sao Hỏa của tàu Mars Pathfinder [trang cá nhân của Mike Jones](https://www.microsoft.com/en-us/research/people/mbj/#!just-for-fun) http://www.oarval.org/missionsr3.htm
<?php namespace App; use Illuminate\Database\Eloquent\Model; class NombrePU extends Model { protected $table ='nombrepu'; protected $fillable= ['id','nombrepu','unidad', 'presupuesto_fk']; public function preciounitario() { return $this->hasMany('App\PrecioUnitario'); } public funct...
<?php namespace lib\model; class Model{ }
using Steamboat.Controllers; using System; using System.Windows; namespace Steamboat { /// <summary> /// Interaction logic for App.xaml /// </summary> public partial class App : Application { public App() { App.Controller = new MainController(); } publi...
# frozen_string_literal: true require 'spec_helper' RSpec.describe SolidusQuietLogistics::Aws::Credentials do subject { described_class.new } it 'can be instantiated' do expect { subject }.not_to raise_error end end
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Linq; using System.Runtime.InteropServices; using Xunit; namespace Tests.System.Runtime.InteropServices { public class SafeHeapHandleCacheTests {...
require_relative '../lib/mqttesla' require 'mqtt' require 'json' describe Mqttesla do class DummyMqttClient def get(mqtt_topic, &block) @block = block @mqtt_topic = mqtt_topic end def receive_message(topic, message) @block.call(topic, message) end end let(:mqtt_client) { Dummy...
(ns streamparse.cli (:require [clojure.pprint :as pp] [clojure.string :as s]) (:gen-class)) (defn- tokenize-args "Reduce arguments sequence into [opt-type opt ?optarg?] vectors and a vector of remaining arguments. Returns as [option-tokens remaining-args]. Expands clumped short options like \"...
using Newtonsoft.Json.Linq; using SenecEntities; using System; namespace SenecSource { public class LalaRequestBuilder : ILalaRequestBuilder { private JObject result; private readonly Func<ILalaRequest> _buildRequest; public LalaRequestBuilder(Func<ILalaRequest> buildRequest) ...
#!/bin/bash echo Compiling modules rm -rf builds/modules/ mkdir -p builds/modules/ node scripts/modules/compile_modules.js rm -rf compile
import "reflect-metadata"; import {createTestingConnections, closeTestingConnections, reloadTestingDatabases} from "../../utils/test-utils"; import {Connection} from "../../../src/connection/Connection"; import {expect} from "chai"; import { Foo } from "./entity/Foo"; import { Bar } from "./entity/Bar"; import { Baz } ...
/* * Copyright © 2022 John Viega * * 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 i...
// Copyright (c) 2017 mimir developers // // Licensed under the Apache License, Version 2.0 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT // license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. All files in the project carrying such notice may not be copied, // ...
using System.Collections.Generic; namespace Serilog.Ui.Web { public class AuthorizationOptions { public IEnumerable<string> Usernames { get; set; } public IEnumerable<string> Roles { get; set; } internal bool Enabled { get; set; } = false; } }
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import '../types.dart'; import 'maps_object.dart'; /// Converts an [Iterable] of Circles in a Map of CircleId -> Circle. Map<CircleId, Circle> keyByCircle...
package client import ( "net" "fmt" "bufio" "time" "strings" "net/mail" "net/textproto" "mail-test/server" "io" "errors" "crypto/tls" "encoding/base64" ) var ErrNoCommand = errors.New("No command found in message") type Message struct { Command string Arguments []string } type Address struct { Name stri...
-- | -- Module : Data.Edison.Seq.RevSeq -- Copyright : Copyright (c) 1998-1999, 2008 Chris Okasaki -- License : MIT; see COPYRIGHT file for terms and conditions -- -- Maintainer : robdockins AT fastmail DOT fm -- Stability : stable -- Portability : GHC, Hugs (MPTC and FD) -- -- This mo...
package consul import ( "fmt" consulapi "github.com/hashicorp/consul/api" log "github.com/sirupsen/logrus" ) // GetKV - получить данные для клюса func GetKV(prefix string, user string, key string, defaultVal string, conn *consulapi.Client) (val string) { k := fmt.Sprintf("%s/%s/%s", prefix, user, key) if le...
package io.betterapps.graysky.data.network import io.betterapps.graysky.const.GlobalConstants import okhttp3.OkHttpClient import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory object RetrofitFactory { private val client = OkHttpClient.Builder().build() private val retrofit = Retrofi...
#!/bin/bash # This script will deploy to a branch model following best practices defined in # http://nvie.com/posts/a-successful-git-branching-model/ # ################################################################################# # # Instructions: # # Copy this script to the root directory of the repository # Ple...
#!/usr/bin/env bash deno lint && \ deno fmt --check && \ deno test --unstable --allow-env --allow-read --allow-net --no-check=remote mod_test.js lib/**/*_test.js