text stringlengths 27 775k |
|---|
# encoding: utf-8
module Bunny
=begin rdoc
=== DESCRIPTION:
Asks the server to start a "consumer", which is a transient request for messages from a specific
queue. Consumers last as long as the channel they were created on, or until the client cancels them
with an _unsubscribe_. Every time a message reaches the que... |
import * as React from "react";
import { withRouter, RouteComponentProps } from "react-router";
import Button, { ButtonProps } from "@material-ui/core/Button";
import { onLinkClick } from "./utils";
export interface ButtonLinkProps
extends Omit<ButtonProps, "href" | "component"> {
to: string;
}
type Props = Bu... |
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading.Tasks;
using Inedo.Documentation;
using Inedo.Extensibility;
using Inedo.Extensibility.Operations;
using Inedo.Web;
namespace Inedo.Extensions.Docker.Operations.Compose
{
[DisplayName("Run command in Docker Compose")]
[Descr... |
package p2102
import "testing"
func TestSample1(t *testing.T) {
tracker := Constructor()
tracker.Add("bradford", 2)
tracker.Add("branford", 3)
res := tracker.Get()
if res != "branford" {
t.Fatalf("should get branford at 1th Get(), but got %s", res)
}
tracker.Add("alps", 2)
res = tracker.Get()
if res !... |
namespace DevRocks.Ocelot.FileServiceDiscovery
{
public class ServiceConfig
{
public string Schema { get; set; }
public string Host { get; set; }
public int Port { get; set; }
public bool IsGrpcHost { get; set; }
}
}
|
package typingsSlinky.locatePath
import typingsSlinky.locatePath.locatePathStrings.directory
import typingsSlinky.locatePath.locatePathStrings.file
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName... |
package initialize
import (
"gin-vue-admin/global"
"gin-vue-admin/service"
)
func Data() {
var err error
err = service.InitSysApi()
err = service.InitSysUser()
err = service.InitExaCustomer()
err = service.InitCasbinModel()
err = service.InitSysAuthority()
err = service.InitSysBaseMenus()
err = service.Init... |
package com.fengyongge.wanandroidclient.mvp.contract
import com.fengyongge.baseframework.mvp.IBaseView
import com.fengyongge.rxhttp.bean.BaseResponse
import com.fengyongge.rxhttp.exception.ResponseException
import io.reactivex.Observable
class SettingContract {
interface Presenter{
fun getLogout()
... |
CREATE OR REPLACE VIEW balancer.view_remove_liquidity AS SELECT a.caller
AS liquidity_provider,
a.contract_address AS exchange_address,
a."tokenAmountOut" / 10 ^ t.decimals AS token_amount,
(a."tokenAmountOut" / 10 ^ t.decimals) * p.price AS usd_amount,
t.symbol AS token_symbol, a.evt_tx_hash AS tx_... |
/*
* 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 ... |
This code represents the build process for [wordfreq][], among other things.
I've made it public because it's good to know where the data in wordfreq comes
from. However, I make no promises that you'll be able to run it if you don't
work at Luminoso.
[wordfreq]: https://github.com/LuminosoInsight/wordfreq
## Dependen... |
from asyncio import sleep
from telethon.events import NewMessage, StopPropagation
from telethon.tl.functions.channels import LeaveChannelRequest
from telethon.tl.functions.messages import DeleteChatUserRequest
from telethon.tl.types import Channel
from telethon.errors.rpcerrorlist import UserAlreadyParticipantError
f... |
using System;
using System.IO;
using KeyboardSwitch.Core.Services.Startup;
using KeyboardSwitch.Core.Settings;
using Microsoft.Extensions.Logging;
using Microsoft.Win32;
namespace KeyboardSwitch.Windows.Services
{
internal class RegistryStartupService : IStartupService
{
private const string StartupR... |
require File.dirname(__FILE__) + '/../../spec_helper'
describe "Range#step" do
it "passes each nth element to the block" do
a = []
(-5..5).step(2) { |x| a << x }
a.should == [-5, -3, -1, 1, 3, 5]
a = []
("A".."F").step(2) { |x| a << x }
a.should == ["A", "C", "E"]
a = []
("A"..."G")... |
# DbConnectorPool.Get method
Creates a connector that delegates to a connector in the pool (or a new connector if the pool is empty).
```csharp
public DbConnector Get()
```
## Remarks
Dispose the returned connector to return the actual connector to the pool.
## See Also
* class [DbConnector](../DbConnector.md)
* ... |
/*
* Copyright (c) 2018 Machine Zone Inc. All rights reserved.
*/
package org.apache.spark.metrics.mz
import com.codahale.metrics._
import org.apache.spark.SparkEnv
import org.apache.spark.metrics.MetricsSystem
import org.apache.spark.metrics.source.Source
import org.slf4j.LoggerFactory
import scala.util.{Failure, ... |
package node
type OutOfBoundsErr struct {
msg string
}
func (o *OutOfBoundsErr) Error() string {
return o.msg
}
|
package vault
import (
"encoding/json"
"fmt"
"log"
"os"
"time"
"github.com/ragul28/svault/cipher"
)
const bucket = "kvStore"
func WriteVault(encryptKey []byte, Key, secret string) {
ciphertext, _ := cipher.Encrypt([]byte(encryptKey), secret)
fmt.Printf("%s saved in svault!\n", Key)
boltdb := open(getVaut... |
module GitHub.Organizations.Members where
data MembersFilter = TwoFactorAuthDisabled | AllMembers
data RoleFilter = AllRoles | Admin | Member
members
:: Org
-> Maybe Filter
-> Maybe Role
-> m (Page Member)
-- TODO look into beta org permission api
checkMembership
:: Org
-> Username
-> m Bool
removeMe... |
{-# LANGUAGE DeriveFunctor #-}
module HydraSim.DelayedComp
( DelayedComp (..),
delayedComp, promptComp,
runComp
) where
import Control.Monad.Class.MonadTimer
import Data.Time.Clock (DiffTime)
-- | A computation that might take a non-neglible amount of time.
data DelayedComp a = DelayedComp
{ -- | The ... |
/** Valid token types in expressions. */
export enum TokenType {
/** An operator. */
Operator,
/** An identifier. */
Identifier,
/** A string literal. */
String,
/**
* The start of a template until its first expression.
*
* See https://tc39.github.io/ecma262/#sec-template-l... |
; An interface to prove$ that indicates whether a step limit was reached.
;
; Copyright (C) 2022 Kestrel Institute
;
; License: A 3-clause BSD license. See the file books/3BSD-mod.txt.
;
; Author: Eric Smith (eric.smith@kestrel.edu)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-... |
using System;
using Citolab.Repository.Helpers;
using Newtonsoft.Json;
namespace Citolab.QConstruction.Model
{
/// <summary>
/// Count of items per status
/// </summary>
public class ItemStatusCount : Citolab.Repository.Model
{
/// <summary>
/// Empty constructor
//... |
#!/usr/bin/env perl
use strict;
use warnings;
use lib ($ENV{EUK_MODULES});
use Fasta_reader;
my $usage = "usage: $0 transcripts.cdna.fasta\n\n";
my $transcripts_fasta_file = $ARGV[0] or die $usage;
my $graphs_per_dir = 100;
main: {
my $fasta_reader = new Fasta_reader($transcripts_fasta_file) or die $!;... |
// Copyright Carl Philipp Reh 2009 - 2016.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef FCPPT_OPTIONAL_FILTER_HPP_INCLUDED
#define FCPPT_OPTIONAL_FILTER_HPP_INCLUDED
#include <f... |
(ns differentiae.scheduling)
(defprotocol Schedule
(path [x])
(schedule! [x]))
|
{*******************************************************}
{ }
{ Firebird Database Converter }
{ }
{*******************************************************}
// -------------------... |
## `HelloWorld.java`
Code for many examples
### Build
```bash
javac HelloWorld.java
```
### Package
```bash
jar -cvf HelloWorld.jar HelloWorld.class
```
### Run
```bash
java HelloWorld
java -jar HelloWorld.jar
```
|
package com.aitorgf.threekt.core
import com.aitorgf.threekt.math.Vector2
import com.aitorgf.threekt.math.Vector3
@ExperimentalJsExport
@JsExport
class Intersection3(
val distance: Double,
val point: Vector3,
val face: Any, // TODO: Define type
val faceIndex: Int,
val obj: Object3,
val uv: Vect... |
use std::future::Future;
use std::marker::PhantomData;
use std::pin::Pin;
use std::task::{Context, Poll};
use super::{Service, ServiceFactory};
/// Service for the `map_err` combinator, changing the type of a service's
/// error.
///
/// This is created by the `ServiceExt::map_err` method.
pub struct MapErr<A, F, E> ... |
{-# LANGUAGE TypeFamilies,
MultiParamTypeClasses,
DeriveFunctor
#-}
{-|
Module : Data.List.AtLeast2
Copyright : (c) 2015 Maciej Piróg
License : MIT
Maintainer : maciej.adam.pirog@gmail.com
Stability : experimental
Lists with at least 2 elements. They do not form a monad (no w... |
require "blogger/engine"
module Blogger
mattr_accessor :user_class
#override the getter for user_class
def self.author_class
@@user_class.constantize
end
end
|
module Mod_sldup_ComputeSubscales
use typre
use Mod_sld_BaseElmope
use Mod_sldup_SubgridSpaceResidual
implicit none
private
public SetPointersComputeSubscales
!SubgridScales
integer(ip), allocatable :: kfl_IsSet, kfl_IsSetGetSubscales
contains
!---------------------------------------------... |
package protocols.membership.partial.messages;
import babel.generic.ProtoMessage;
import io.netty.buffer.ByteBuf;
import network.ISerializer;
import network.data.Host;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
public class ShuffleMessage extends ProtoMessage {
public final stat... |
namespace GadzhiApplicationCommon.Models.Enums.StampCollections
{
/// <summary>
/// Тип контейнера штампов
/// </summary>
public enum StampContainerType
{
Separate,
United,
}
} |
# Snapshot report for `SectionRenderer/CardSectionRenderer/index.test.js`
The actual snapshot is saved in `index.test.js.snap`.
Generated by [AVA](https://ava.li).
## preact: renders a card section
> Snapshot 1
'<root><card-type payload="[object Object]"></card-type></root>'
## react: renders a card section
... |
(defsystem "typo.sb-simd"
:description "sb-simd support for Typo."
:author "Marco Heisig <marco.heisig@fau.de>"
:license "MIT"
:depends-on
("alexandria"
"closer-mop"
"sb-simd"
"trivia"
"typo")
:serial t
:components
((:module "sb-simd"
:components
((:file "packages")
(:file "as... |
#!/bin/bash
# update install run & report
sudo apt-get update
sudo apt-get install cmake build-essential libboost-all-dev
git clone -b Linux https://github.com/daogster/nheqminer.git
cd nheqminer
cd cpu_xenoncat
cd Linux
cd asm
sh assemble.sh
mkdir build && cd build
cmake ../nheqminer
make -j $(nproc)
bash ... |
---
date: 2021-04-24
photo:
- url: /img/photos/20210424-1.jpg
alt: A white windmill behind some green bushes and blue skies.
- url: /img/photos/20210424-2.jpg
alt: A close up shot of some bluebells with a field of bluebells in the out of focus background.
- url: /img/photos/20210424-3.jpg
alt: A close... |
// Creature Creator - https://github.com/daniellochner/SPORE-Creature-Creator
// Version: 1.0.0
// Author: Daniel Lochner
using System;
using UnityEngine;
using UnityEngine.Events;
namespace DanielLochner.Assets.CreatureCreator
{
public class Drag : MonoBehaviour
{
#region Fields
[SerializeFi... |
<?php
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
... |
# -*- coding: utf-8 -*-
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation"""
import logging
try:
from urllib.parse import urlparse
except:
from urlparse import urlparse
from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionEr... |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
module Language.Exalog.SrcLoc
( SrcLoc(..)
, InputSource(..)
, SrcSpan(..)
, transSpan
, listSpan
, pretty... |
--- lib/vmCheck/vmcheck.c.orig 2020-10-16 23:15:58 UTC
+++ lib/vmCheck/vmcheck.c
@@ -144,6 +144,7 @@ VmCheckSafe(SafeCheckFn checkFn)
#else
do {
int signals[] = {
+ SIGBUS,
SIGILL,
SIGSEGV,
};
|
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\DB;
use App\post;
use Illuminate\Database\Eloquent\Model;
cla... |
# gostackamount
Golang で作ったプログラムの,各 goroutine が消費するスタックサイズを見積もるためのツールです.
pprof で取得できる goroutine のスタックフレーム情報を,バイナリを解析して得られた関数のスタック消費量に照らし合わせて算出します.
## 用途
Golang 製プログラムのスタック消費量を見積もりたい場合に使えます.
Golang 標準の [pprof](https://golang.org/pkg/net/http/pprof/) パッケージではヒープメモリの詳細なプロファイルを取ることが可能ですが,スタックの使用状況に関する情報は得られません.
本ツールにより各... |
import React from 'react';
import { ErrorContent } from '@daniel.neuweiler/react-lib-module';
import { Box } from '@mui/material';
interface ILocalProps {
sourceName?: string;
errorMessage?: string;
}
type Props = ILocalProps;
const ErrorPage: React.FC<Props> = (props) => {
// Helpers
const sourceName = (pro... |
import { IEthEventsClient } from './eth.events.client.interface';
import { IEthTestnetEventsClient } from './eth.testnet.events.client.interface';
export interface IEthEvents extends IEthEventsClient {
testnet: IEthTestnetEventsClient;
}
|
/*
* Copyright 2003-2016 MarkLogic Corporation
*
* 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... |
@extends('layouts.bootstrap.container')
@section('page')
<link rel="stylesheet" href="{{asset('plugins/steps/jquery.steps.css')}}">
<link rel="stylesheet" href="{{asset('plugins/iCheck/all.css')}}">
<link rel="stylesheet" href="{{asset('plugins/country-select/build/css/countrySelect.css')}}" media="screen">
... |
(ns contrib-dom.core
(:require [cljs.core.async :as a]
[clojure.string :as s]
[contrib.ext.async :as async :refer-macros [loop-chan-js]]
[contrib.ext.core :as ext]
[contrib.talk.emitter :as emitter]
[reagent.core :as r]
[reagent.ratom :refer-macr... |
---
title: ExtensionServices
description: documentation for extended functionality in MRTK
author: davidkline-ms
ms.author: davidkl
ms.date: 01/12/2021
keywords: Unity,HoloLens, HoloLens 2, Mixed Reality, development, MRTK,
---
# Extension services
Extension services are components that extend the functionality of th... |
using System;
namespace MicroApi.Server
{
public interface IHttpServerBuilder
{
IHttpServerBuilder SetHostUrl(string hostUrl);
IHttpServerBuilder SetProcessor(Func<string, string> expression);
IHttpServer Build();
}
} |
import sys
import time
from tornado.testing import AsyncTestCase
import tornadoredis
def get_callable(obj):
return hasattr(obj, '__call__')
def async_test_ex(timeout=5):
def _inner(func):
def _runner(self, *args, **kwargs):
try:
func(self, *args, **kwargs)
e... |
# -----------------------------------------------------------------------------
#
# Package : xalan-j
# Version : xalan-j_2_7_2
# Source repo : https://github.com/apache/xalan-j
# Tested on : UBI 8.4
# Script License: Apache License, Version 2 or later
# Maintainer : Atharv Phadnis <Atharv.Phadnis@ibm.com>
#
# Disclaim... |
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.
library testing.discover;
import 'dart:io' show
Directory,
FileSystemEntity,
Platform,
... |
from django.shortcuts import render
from .forms import RegisterForm
from .models import UserModel
from django.http import HttpResponse
# Create your views here.
def hello(request):
form = RegisterForm()
return render(request, "hello.html", {"form" : form})
def saveUser(request):
resp = ''
if request.POST:
form... |
CREATE R SCALAR SCRIPT
get_database_name() returns varchar(300) AS
run <- function(ctx)
exa$meta$database_name
/
create R scalar script
get_database_version() returns varchar(20) as
run <- function(ctx)
exa$meta$database_version
/
create R scalar script
get_script_language() emits (s1 varchar(300), s2 varchar(300)) a... |
package com.apurebase.kgraphql.schema
interface Subscription {
fun request(n: Long)
fun cancel()
} |
class Apply < MailForm::Base
attributes :first, :validate => true
attributes :last, :validate => true
attributes :email, :validate => /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\z/i
attributes :category, :validate => true
attributes :description, :validate => true
attributes :nickname, :captcha => true
... |
{-# LANGUAGE FlexibleInstances, OverloadedStrings, BangPatterns #-}
module Language.Nano.TypeCheck where
import Language.Nano.Types
import Language.Nano.Parser
import qualified Data.List as L
import Text.Printf (printf)
import Control.Exception (throw)
-----------------------------------------... |
package edu.ubb.micro.nowaste.usermanager.controller
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@RestController
class ServiceController {
@RequestMapping("/users/health")
fun getServiceHe... |
from mock import call, patch
import pytest
from merfi.backends import gpg
class TestGpg(object):
backend = gpg.Gpg([])
# args to merfi.backends.gpg.util's run()
detached = ['gpg', '--batch', '--yes', '--armor', '--detach-sig', '--output', 'Release.gpg', 'Release']
clearsign = ['gpg', '--batch', '--ye... |
/* Add your widget's module(s) here */
export {DemoWidgetModule} from "./demo-widget/demo-widget.module";
|
using NLog;
using PaletteInsightAgent.Helpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace PaletteInsightAgent.... |
class MlAuthorsController < ApplicationController
layout "main"
def index
@authors = MlAuthor.search(params['user_input']) \
.paginate(:page => params[:page], :per_page => 12) \
.order('n_appeared desc')
@users = User.all
end
... |
/*
* This work is released into the Public Domain under the
* terms of the Creative Commons CC0 1.0 Universal license.
* https://creativecommons.org/publicdomain/zero/1.0/
*/
package pityoulish.sockets.server;
/**
* Represents a request to the Message Board Server.
*
* Because the protocol is simple and has on... |
# Pick a value from a JSON string
## Installation
```
npm install -g pluckjson
```
## Usage
```
pluckjson --key=hello.galaxy < test-file.json
```
## Options
```
--key: key to value to print
--copy: copy value to clipboard
--noemit: do not print value
```
# Change Logs
## 0.0.1
- initial release
|
package dev.cancio.start.endpoint.service
import dev.cancio.core.model.Debt
import dev.cancio.core.repository.DebtRepository
import lombok.extern.slf4j.Slf4j
import org.springframework.stereotype.Service
@Service
@Slf4j
class DebtService(
val debtRepository: DebtRepository
) {
fun list(pageable: org.springfra... |
package dev.trotrohailer.shared.util
import android.content.Intent
import android.content.res.Resources
import android.location.Location
import android.os.Bundle
import android.os.Parcel
import android.view.View
import android.widget.Toast
import androidx.annotation.DimenRes
import androidx.core.content.res.ResourcesC... |
// ReSharper disable All
using Lumina.Text;
using Lumina.Data;
using Lumina.Data.Structs.Excel;
namespace Lumina.Excel.GeneratedSheets
{
[Sheet( "GatheringItem", columnHash: 0x032ca4ae )]
public partial class GatheringItem : ExcelRow
{
public int Item { get; set; }
public LazyRow<... |
// // Library imports
// import mongoose from 'mongoose';
// // Project imports
// import { logger } from './logger';
// const mongo_host = process.env.MONGO_HOST;
// const mongo_port = process.env.MONGO_PORT;
// const mongo_db_name = process.env.MONGO_DATABASE;
// const mongo_url = `mongodb://${mongo_host}:${mongo_p... |
package code
fun main(args: Array<String>) : Unit {
println(AddFunction(3,6))
println("3 + 6 + 9 = ${AddFunction(3,6)+ 9}")
}
fun AddFunction(number1: Int, number2: Int): Int{
println("number1: $number1 number2: $number2 ")
return number1 + number2
} |
module Dec05 where
import Common
import Data.Char
import Data.Maybe
import Data.Function
import Data.List
dec05P1 :: IO ()
dec05P1 = readFile "data/dec05.txt" >>= reactFull .> print
reaction :: String -> String
reaction = go []
where
go xs [] = reverse xs
go xs (c:cs) = case cs of
[] -> go (c:xs) []
... |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -verify-machineinstrs -mattr=+mve %s -o - | FileCheck %s
@var_36 = hidden local_unnamed_addr global i8 0, align 1
@arr_61 = hidden local_unnamed_addr global [1 x i32] zeroinitializer, align ... |
using System;
using System.Collections.Generic;
using System.Text;
namespace Cake.LibMan
{
/// <summary>
/// Details the libman verbosity log levels
/// </summary>
public enum LibManVerbosity
{
/// <summary>
/// default
/// </summary>
Default = 0,
/// <summa... |
(ns lan-van.views
(:require [re-frame.core :refer [subscribe dispatch]]
[lan-van.subs :as subs]
[lan-van.events :as events]
[reagent.core :as r]
[clojure.string :as str]))
(defn dispatch-resize-event
[]
(dispatch [::events/window-resize]))
(defonce resize-event
... |
---
layout: page
title: About
permalink: /about/
---
Hey there, I'm Lizzy! Welcome to my blog, I
guess. Here are some links around the internet
that relate to me.
- **Twitter:** [@LizzyReborn](https://twitter.com/LizzyReborn)
- **GitHub:** [@LizAinslie](https://github.com/LizAinslie)
- **Instagram:** [@railrunner166]... |
---
title: "Hello Github from Neel"
date: 2021-02-08
---
**This is Neel**
*How is it going*
|
package infrastructure.tester
import infrastructure.IT
/**
* requester and responder connections for test purposes
*/
trait RequesterAndResponder extends TestRequester with TestResponder{
self:IT =>
/**
* starts both - requester and responder
* @param proto broker protocol: http (default) or https
... |
import { useEffect, useState } from 'react';
import WikipediaApi from './api/wikipedia';
const useStateInfo = (state) => {
const [stateInfo, setStateInfo] = useState(null);
const fetchStateInfo = (stateToFetch) => {
WikipediaApi
.summary(stateToFetch)
.then(data => {
... |
---
title: White Label
layout: category
category: "white-label"
permalink: /en/category/white-label
lang: en
--- |
/*
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
<?php
/*
* // +----------------------------------------------------------------------
* // | erp
* // +----------------------------------------------------------------------
* // | Copyright (c) 2006~2020 erp All rights reserved.
* // +----------------------------------------------------------------------
* // |... |
class Meteorlog::Client
include Meteorlog::Logger::Helper
include Meteorlog::Utils
def initialize(options = {})
@options = options
@cloud_watch_logs = Aws::CloudWatchLogs::Client.new
end
def export(opts = {})
exported = Meteorlog::Exporter.export(@cloud_watch_logs, @options.merge(opts))
Mete... |
import React from 'react'
import renderer from 'react-test-renderer'
import sinon from 'sinon'
import { configure, shallow, mount, render } from 'enzyme'
import { ActionLink } from '../ActionLink'
import Adapter from 'enzyme-adapter-react-16'
configure({ adapter: new Adapter() })
describe('<ActionLink />', () => {
... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SafetyAnalysis.Framework.Graphs
{
[Serializable]
public abstract class HeapGraphBase
{
public abstract IEnumerable<HeapVertexBase> Vertices { get; }
public abstract IEnumerable<He... |
using IOTConnect.Application.Values;
using IOTConnect.Domain.IO;
using IOTConnect.Domain.System.Logging;
using System;
namespace IOTConnect.Persistence.IO.Adapters
{
public class JsonToValueStateAdapter : IAdaptable
{
public JsonToValueStateAdapter()
{
}
public Tout Adapt<Tou... |
package Memoize::SDBM_File;
=head1 NAME
Memoize::SDBM_File - glue to provide EXISTS for SDBM_File for Storable use
=head1 DESCRIPTION
See L<Memoize>.
=cut
use SDBM_File;
@ISA = qw(SDBM_File);
$VERSION = '1.03';
$Verbose = 0;
sub AUTOLOAD {
warn "Nonexistent function $AUTOLOAD invoked in Memoize::SDBM_File\n";... |
<?php
namespace org\camunda\php\sdk\service;
use Exception;
use org\camunda\php\sdk\entity\request\AuthorizationRequest;
use org\camunda\php\sdk\entity\response\Authorization;
use org\camunda\php\sdk\entity\response\ResourceOption;
class AuthorizationService extends RequestService
{
/**
* Removes an authori... |
import { CanActivate, ExecutionContext } from '@nestjs/common';
export class AdminGuard implements CanActivate {
canActivate(ctx: ExecutionContext) {
const request = ctx.switchToHttp().getRequest();
if (!request.currentUser) return false;
return request.currentUser.admin;
}
}
|
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System.Linq;
using Object = UnityEngine.Object;
namespace OnionCollections.DataEditor.Editor
{
public static class OnionDataEditor
{
const string ResourcePath... |
package org.apache.gora.examples.generated;
import java.util.Set;
import org.apache.gora.persistency.Persistent;
import org.apache.gora.persistency.StateManager;
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBHashKey;
import com.amazona... |
import { MoyskladAdapter } from '@warehouse/moysklad-adapter'
import { IWarehouseService } from './warehouse.interfaces'
export class WarehouseService implements IWarehouseService {
private vendorAdapter: MoyskladAdapter
constructor() {
this.vendorAdapter = new MoyskladAdapter()
}
async createProduct(... |
namespace EA.Weee.Web.Areas.Admin.ViewModels.Scheme.Overview.PcsDetails
{
public class PcsDetailsOverviewViewModel : OverviewViewModel
{
public string ApprovalNumber { get; set; }
public string BillingReference { get; set; }
public string ObligationType { get; set; }
public s... |
use std::vec;
pub struct StorageByInts2<T> {
data: ~[T],
size_0: uint,
size_1: uint,
}
impl <T:Clone> StorageByInts2<T> {
pub fn from_elem(size_0: uint, size_1: uint, elem: T) -> StorageByInts2<T> {
let sz = size_0 * size_1;
let data = vec::from_elem(sz, elem);
StorageByInts2 {
data: data,
... |
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Linq;
using Perspex.Controls.Generators;
using Perspex.Controls.Primitives;
using Perspex.Controls.Shapes;
using Perspex.Contro... |
import getHTMLText from "./getHTMLText";
/**
* getHTMLCharacterLength will strip all tags and return remaining
* character length.
*
* @param html the html which length should be determined
*/
export default function getHTMLCharacterLength(html: string | undefined) {
if (!html) {
return 0;
}
const inner... |
#!/bin/bash
hostname=$1
echo 'Updating /etc/sudoers'
if [[ ! -e '/etc/sudoers.d/jenkins' ]]; then
sudo /bin/bash --login -c 'echo "jenkins ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/jenkins'
fi
sudo sed -i -e 's/^Defaults.*requiretty/# Defaults requiretty/g' /etc/sudoers
sudo /bin/bash --login -c 'echo "Defaults:admi... |
extern BOOL goTopBydeVbugForSafari();
extern BOOL goBottomBydeVbugForSafari();
extern BOOL goLeftBydeVbugForSafari(int);
extern BOOL goRightBydeVbugForSafari(int);
extern BOOL goUpBydeVbugForSafari(int);
extern BOOL goDownBydeVbugForSafari(int);
extern BOOL prevTabBydeVbugForSafari();
extern BOOL nextTabBydeVbugForSaf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.