text stringlengths 27 775k |
|---|
cd manga-reader-frontend
./build.sh
cd ..
stack build && stack exec manga-reader-exe
|
module Common.Routes where
import Data.Proxy (Proxy(..))
import Miso (View)
import qualified Servant.API as Servant
import Servant.API ((:<|>)(..), (:>))
import qualified Servant.Utils.Links as Servant
import Common.Model
-- Holds a servant route tree of `View action`
type ViewRoutes = Home :<|> Flipped
-- Home rou... |
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -bdce -S < %s | FileCheck %s
; Funnel shift based rotate test cases from PR39771
declare i32 @llvm.fshr.i32(i32, i32, i32)
declare <2 x i32> @llvm.fshr.v2i32(<2 x i32>, <2 x i32>, <2 x i32>)
; First fshr operand is dead.
define i32 ... |
package com.redridgeapps.trakx.ui.common
import android.util.Log
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.Observer
import java.util.concurrent.atomic.AtomicBoolean
class SingleLiveEvent<T> : MediatorLiveData<T>() {
private val mPending = Atomi... |
package ocwalk
import lib.browser.Browsers
import lib.facade.ml5.PitchDetection
import lib.facade.p5.AudioIn
import lib.ml5._
import lib.{browser, ml5, p5}
import ocwalk.common._
import ocwalk.model._
import ocwalk.mvc._
import ocwalk.util.global.GlobalContext
import ocwalk.util.logging.Logging
/** Pitch detection al... |
CREATE TABLE messages (
id UUID NOT NULL,
client_id UUID NOT NULL,
content TEXT NOT NULL,
status VARCHAR(255) NOT NULL,
CONSTRAINT messages_pkey PRIMARY KEY (id),
CONSTRAINT client_id_fkey FOREIGN KEY (client_id) REFERENCES clients
);
|
package com.avito.module.internal.dependencies
import com.avito.module.internal.dependencies.FindAndroidAppTaskAction.Verdict.MultipleSuitableApps
import com.avito.module.internal.dependencies.FindAndroidAppTaskAction.Verdict.NoSuitableApps
import com.avito.module.internal.dependencies.FindAndroidAppTaskAction.Verdict... |
--Listing 2.23.sql
--Deklaration und Initialisierung einer neuen Tabellenvariable beim Prozeduraufruf
DO BEGIN
statustexte(iv_sprache=>'DE',
et_result=>lt_statustexte) ;
SELECT * FROM :lt_statustexte;
END;
|
import 'package:flutter/material.dart';
// Color values specified in ARGB
const kColorPrimary = const Color(0xFFC5CAE9); // 100
const kColorSecondary = const Color(0xFFE8EAF6); // 50
const kColorVariant = const Color(0xFF442B2D); // 900
const kColorSurface = const Color(0xFFFFFBFA);
const kColorBackground = Colo... |
<?php
namespace asdrenxhafa\mooddetection;
include __DIR__ . '/vendor/autoload.php';
use Rubix\ML\PersistentModel;
use Rubix\ML\Persisters\Filesystem;
use Rubix\ML\Other\Loggers\Screen;
use Rubix\ML\Datasets\Labeled;
use Rubix\ML\Pipeline;
use Rubix\ML\Transformers\TextNormalizer;
use Rubix\ML\Transformers\WordCount... |
import { normalizeParty } from './utils'
export const partyMixin = {
props: {
party: {
type: [String, Object],
required: true
}
},
computed: {
meta () {
return normalizeParty(this.party)
}
}
}
|
package com.lsdconsulting.exceptionhandling.server.testapp.api.exception
import com.lsdconsulting.exceptionhandling.api.ErrorResponse
import com.lsdconsulting.exceptionhandling.server.exception.ErrorResponseException
import org.springframework.http.HttpStatus.NOT_FOUND
class TestObjectNotFoundException : ErrorRespons... |
# source activate pyts
# atomic-images and sacred should be installed
## How to use pyts
Program to find Transiton State automatically
## Installation
To install pyts from GitHub repository, do:
```console
git clone https://github.com/sunxb05/pyts.git
cd pyts
python3 -m pip install .
``` |
INSERT INTO workspaces (title, description, admins, members)
VALUES ($1, $2, $3, $4)
RETURNING *
|
using System;
using System.Threading;
using System.Diagnostics;
using System.Net;
using BetterHttpClient;
namespace Balance.Http
{
public class Request
{
public delegate void ResponseDelegate(Exception exception, Response response);
public delegate void LogDelegate(String message);
private String host;
pr... |
#!/usr/bin/env bash
mkdir -p mp3/
for i in norm/*.wav ; do
echo "Converting normalized file to MP3: $i"
b=`basename "$i" .wav`
# echo $b
lame -b 64 "$i" "mp3/$b.mp3"
done
|
package com.pkukielka.stronghold.effect
import com.badlogic.gdx.graphics.g2d.{ParticleEffectPool, ParticleEffect}
import com.badlogic.gdx.Gdx
object FireEffect {
val fireEffect = new ParticleEffect()
fireEffect.load(Gdx.files.internal("data/particles/fire.p"), Gdx.files.internal("data/particles"))
val fireEffec... |
#include <stdio.h>
#include <stdbool.h>
#include <time.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "animation.h"
#include "dotstar.h"
#define NUM_LAMPS 6
static uint8_t curanimation = 0;
static bool running = false;
static bool started = false;
static bool powered = fal... |
use strict;
use warnings;
use Test::More tests => 34;
use FindBin;
use Data::Printer;
use File::Slurp;
use File::Temp qw(tempfile tempdir);
BEGIN {
use_ok( 'Bio::Rfam::FamilyIO' ) || print "Failed to load Bio::Rfam::FamilyIO!\n";
use_ok( 'Bio::Rfam::Family::CM' ) || print "Failed to load Bio::Rfam::Family::CM!\n";... |
package au.csiro.variantspark.genomics.family
import org.junit.Assert._
import org.junit.Test
class PedigreeTreeTest {
val testTrios = Seq(
FamilyTrio("FUN1", Gender.Male),
FamilyTrio("FUN2", Gender.Female),
FamilyTrio("FUN3", Gender.Female),
FamilyTrio("OFF1", Gender.Mal... |
require "spec_helper"
require "wisper/rspec/matchers"
require "carb/rspec/service"
require "carb/service/lambda"
require "carb/flow/pipeline"
describe Carb::Flow::Pipeline do
include Carb::RSpec::Service
include Wisper::RSpec::BroadcastMatcher
before do
@do_nothing = ->(**args) { Carb::Monads.monadize(true)... |
package mill.scalalib
import mill.util.ScriptTestSuite
import os.Path
import utest._
object GenIdeaTests extends ScriptTestSuite(false) {
def tests: Tests = Tests {
'genIdeaTests - {
initWorkspace()
eval("mill.scalalib.GenIdea/idea")
Seq(
s"$workspaceSlug/idea_modules/helloworld.iml"... |
from flask import (
Blueprint, flash, g, redirect, render_template, request, session, url_for
)
bp = Blueprint('game', __name__)
@bp.route('/')
def index():
return render_template('game.html')
@bp.route('/start', methods=('GET', 'POST' ))
def start():
current_scene = {
'place': 'The Village',
'o... |
import NameManager from "../NameManager";
import TokenProcessor from "../TokenProcessor";
import Transformer from "./Transformer";
/**
* Transformer supporting the optional chaining and nullish coalescing operators.
*
* Tech plan here:
* https://github.com/alangpierce/sucrase/wiki/Sucrase-Optional-Chaining-and-Null... |
import { CreepSizes } from "constants/enum.CreepSizes";
export interface CreepMemory {
Role: string;
CurrentAction: string;
CurrentEnergySource: Source | null; //number;
CurrentSize?: CreepSizes;
CurrentWorth?: number;
};
|
(ns simple-experiments.view
(:require [re-frame.core :refer [subscribe dispatch dispatch-sync]]
[reagent.core :as r]
[clojure.string :as string]
[simple-experiments.view.components :as c]
[simple-experiments.view.styles :as s]
[simple-experiments.view.home :... |
#include <vector>
#include <algorithm>
#include <utility>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back
const int inf=~0U>>1,maxn=100000;
using namespace std;
#define Tree int t,int l,int r
#define Left t*2,l,l+r>>1
#define Right t*2... |
#!/bin/bash
APP_HOST=find-me-a-kite.herokuapp.com
APP_PORT=80
printf "\n\n*********************************************************"
printf "\n searching on ${APP_HOST} "
printf "\n**********************************************************\n"
curl -v http://$APP_HOST:$APP_PORT/searchv2 \
--header "Content... |
require 'spec_helper'
describe 'logdna::default' do
platforms = [
{ platform: 'ubuntu', version: '14.04', name: 'Trusty' },
{ platform: 'ubuntu', version: '16.04', name: 'Xenial' },
{ platform: 'centos', version: '6.8', name: 'CentOS 6' },
{ platform: 'centos', version: '7.4.1708', name: 'CentOS 7' }... |
package re.notifica.internal
import android.content.SharedPreferences
import re.notifica.InternalNotificareApi
@InternalNotificareApi
public abstract class NotificareModule {
public open fun migrate(savedState: SharedPreferences, settings: SharedPreferences) {}
public open fun configure() {}
public ope... |
function multiplicar() {
let numtxt = document.getElementById('number')
let num = Number(numtxt.value)
let restxt = document.getElementById('res')
restxt.innerHTML = ''
for (let c = 1; c <= 10; c++) {
restxt.innerHTML += `${num} x ${c} = ${num * c}<br>`
}
}
|
// Copyright (c) 2020, 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 file.
import "package:expect/expect.dart";
import 'libB.dart';
@pragma('dart2js:noInline')
g_000_000_000_10... |
package circuit_test
import (
"testing"
"github.com/heustis/tsp-solver-go/circuit"
"github.com/heustis/tsp-solver-go/model"
"github.com/heustis/tsp-solver-go/model2d"
"github.com/stretchr/testify/assert"
)
func TestCompletedCircuit(t *testing.T) {
assert := assert.New(t)
expectedPath := []model.CircuitVertex... |
/* Copyright 2018 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* Explicitly include common.h to populate predefined macros in test_config.h
* early. e.g. CONFIG_FPU, which is needed in math_util.h
*/
#inc... |
package yfy.github.stair.adapters;
import android.content.Context;
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 com.bumptech.glide.Glide;
import java.... |
import sys
import os
import zmq
sys.path.append(os.getcwd() + '/build')
from msg_pb2 import *
# Socket to talk to server
context = zmq.Context()
socket = context.socket(zmq.SUB)
print("Collecting updates from weather server...")
socket.connect ("tcp://localhost:5560")
# Subscribe to zipcode, default is NYC, 10001
s... |
-module(node_mon).
-export([start_link/1]).
-define(RESTART_DELAY, 15000).
-define(SLAVE_ARGS, "+K true -connect_all false").
-define(RPC_CALL_TIMEOUT, 30000).
-define(RPC_RETRY_TIMEOUT, 120000).
-type host() :: nonempty_string().
-spec start_link(host()) -> pid().
start_link(Host) ->
spawn_link(fun() -> spawn_n... |
# encoding: utf-8
require 'ostruct'
require 'yaml'
module Confucius
class Setup
def initialize(block)
@block = block
end
def then(&block)
@then = block
end
def call(config)
@block.call(config).tap{|res|
@then.call(res) if @then
}
end
end
def from_yaml(... |
namespace Sudoku.Bot.Communication.Models;
/// <summary>
/// Indicates the instance that describes the recommend channel.
/// </summary>
/// <param name="ChannelId">Indicates the channel ID.</param>
/// <param name="Introduce">Indicates the introducing text.</param>
/// <remarks>
/// The data type is referenced from
... |
# SageMaker + EMR: Timeseries
In this lab, we're going to utilize our knowledge of connecting and interacting with EMR clusters in order to perform
dataprep at scale for built-in SageMaker algorithms to train a probabilistic forecasting model.
The Amazon SageMaker DeepAR forecasting algorithm is a supervised learning... |
#ifndef B_HPP
#define B_HPP
class A {};
class B {};
#endif // B_HPP
|
module T10458 (callSO) where
import Foreign
import Foreign.C.Types
foreign import ccall "foo" dle :: IO CInt
callSO :: IO CInt
callSO = dle
|
/**
* Imports
*/
const test = require('tape')
const prosh = require('../')
/**
* Tests
*/
const capture = true
test('should echo and consume', (t) => {
prosh('echo "hello world"', {capture}).then((stdout) => {
t.equal(stdout, 'hello world\n')
t.end()
}).catch(err => console.log('error', err))
})
te... |
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe WebIdeButtonHelper do
describe '#show_pipeline_editor_button?' do
subject(:result) { helper.show_pipeline_editor_button?(project, path) }
let_it_be(:project) { build(:project) }
context 'when can view pipeline editor' do
before d... |
/**
Copyright 2014 JARST, LLC
This file is part of Quibit.
Quibit is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
LICENSE file for details.
**/
// Package quibit... |
package main
import (
"fmt"
"github.com/spf13/viper"
)
type Config struct {
Msg string
}
func greet(name string) string {
return fmt.Sprintf("hello, %s!", name)
}
func main() {
viper.SetConfigName("config")
viper.SetConfigType("toml")
viper.AddConfigPath(".")
viper.ReadInConfig()
p := viper.GetStringMap("... |
; Trivial-ancestors-check: replace the ACL2 ancestors check heuristic with a
; simpler one
; Copyright (C) 2013 Centaur Technology
;
; Contact:
; Centaur Technology Formal Verification Group
; 7600-C N. Capital of Texas Highway, Suite 300, Austin, TX 78731, USA.
; http://www.centtech.com/
;
; License: (An MIT/X1... |
from pycsp3 import *
x = VarArray(size=10, dom=range(150))
y = Var(dom=range(150))
satisfy(
[x[p] in range(100) for p in range(10)],
[x[p] in {1, 2, 3} for p in range(10)],
[x[p] not in range(100) for p in range(10)],
[x[p] not in {1, 2, 3} for p in range(10)],
[x[p] <= 5 for p in range(10)],
... |
package io.chrisdavenport.github
import org.http4s.Uri
/**
* The authentication method to use
*/
sealed trait Auth
/**
* Authenticates using username and password
* @param username The username
* @param password The password
*/
final case class BasicAuth(username: String, password: String) extends Auth
/**
*... |
buildscript {
val kotlin_version: String by project
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath(kotlin("gradle-plugin", version = kotlin_version))
}
}
plugins {
kotlin("jvm") apply false
id("com.gradle.plugin-publish") apply false
id("c... |
-- vsum is as amended and has fewer columns
-- this takes the name from sum_and_det_sum_report to vsum
select
vs.cmte_id,
vs.rpt_tp as rpt_tp,
vs.cvg_start_dt as cvg_start_dt,
vs.cvg_end_dt as cvg_end_dt,
vs.rpt_yr as rpt_yr,
vs.receipt_dt as receipt_dt,
vs.rpt_yr + vs.rpt_yr % 2::numeric as election_cycle,
vs.coh_bop ... |
package at.sunilson.chargestatistics.presentation.overview
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import at.sunilson.chargestatistics.presentation.chargeEntries.ChargeEntriesFragment
import at.sunilson.chargestatistics.presentation.deChargeEntries.DeChargeEntriesF... |
package minuskelvin.gamelib.test
import minuskelvin.gamelib.Application
import minuskelvin.gamelib.Screen
import minuskelvin.gamelib.Windowed
import minuskelvin.gamelib.graphics.Camera
import minuskelvin.gamelib.graphics.Color
import minuskelvin.gamelib.graphics.Orthographic
import minuskelvin.gamelib.graphics.ShapeRe... |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Captcha_model extends My_Model {
public function __construct() {
$this->table_name = 'captcha';
parent::__construct();
}
function save_captcha($data) {
$this->insert($data);
}
function delete_old_captcha($expiration) {
... |
<?php namespace OFFLINE\SnipcartShop\Models;
use Model;
/**
* Model
*/
class Order extends Model
{
public $timestamps = false;
public $guarded = ['id'];
public $dates = ['creation_date', 'modification_date', 'completion_date'];
public $jsonable = ['billing_address', 'shipping_address', 'custom_fiel... |
/**
* Copyright 2015 Mike Reed
*/
#ifndef GColor_DEFINED
#define GColor_DEFINED
#include "GMath.h"
#include "GPixel.h"
class GColor {
public:
float fA;
float fR;
float fG;
float fB;
static GColor MakeARGB(float a, float r, float g, float b) {
GColor c = { a, r, g, b };
... |
define :verify_user do
if params[:name] == 'root'
Chef::Application.fatal!("User must not be set as root")
end
end |
package de.gccc.jib
import sbt._
import sbt.Keys._
import java.io.File
import sbt.util.CacheStore
object Stager {
/**
* create a cache and sync files if needed
*
* @param config - create a configuration specific cache directory
* @param cacheDirectory - e.g. streams.value.cacheDirectory
* @param st... |
/* eslint-disable no-console */
import { eventChannel, delay } from 'redux-saga'
import { put, call, take } from 'redux-saga/effects'
import _keys from 'lodash/keys'
import { WS_CONNECT_SUCCESS, WS_CONNECT_PENDING, WS_CONNECT_FAILURE } from './actions'
import { PING, SUBSCRIBE, UNSUBSCRIBE } from './constants/wsMessage... |
// Original bug: KT-17339
class C {
fun foo() { }
}
fun main(args: Array<String>) {
val f = C::foo::invoke
val s = f.toString()
//the same for "val s = f.isAbstract" and other f.<anything>
}
|
import {Component} from "react";
import {createPortal} from "react-dom";
const modalRoot = document.getElementById('modal-root');
type ModalProps = {
children: React.ReactNode,
};
class Modal extends Component<ModalProps> {
el = document.createElement('div');
componentDidMount() {
if (modalRoot) {
m... |
mkdir() { # create hidden folder without error
echo -e error \\n$@ > .gitignore
/bin/mkdir $@ > error 2>&1
true
}
Store=data
name() { # get data address on disk
echo "$Store/$1"
mkdir $Store #check
} |
import React, { useCallback } from 'react'
import { Dimensions, StyleSheet, Text, View } from 'react-native'
import { Pokeball } from './Pokeball'
type Props = {
name: string
id: string
children?: React.ReactNode,
color?: string
backgroundColor?: string,
pokeballColor?: 'white' | 'gray'
}
const DEFAULT_C... |
###############################################################################
# cFE Software Bus (SB) tutorial top-level script
#
# Notes:
# 1. This tutorial is part of the cFE Service training module and implements
# the SB exercises.
#
# License:
# Written by David McComas, licensed under the copyleft GNU... |
// Copyright (c) 2022, didaktik-aktuell e.V. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Kurseinladung', {
// refresh: function(frm) {
// }
});
frappe.ui.form.on("Kurseinladung", "loadtn", function(frm) {
if(frm.doc.kurse){
const future_tn = frappe.call({
method: "g... |
using System;
using Microsoft.UI.Xaml.Input;
namespace Microsoft.Maui
{
public static class ReturnTypeExtensions
{
public static InputScope ToNative(this ReturnType returnType)
{
var scopeName = new InputScopeName()
{
NameValue = GetKeyboardButtonType(returnType)
};
var inputScope = new InputSc... |
package com.chrynan.chat.feature.contact.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import coil.api.load
import com.chrynan.chat.R
import com.chrynan.chat.adapter.AdapterItem
import ... |
Simple-python-backend
=====
A backend written by Python for study
## Development
### Get ready
- [Pyenv](https://github.com/pyenv/pyenv) for no more annoying with controlling version
- [Virtualenv](http://flask.pocoo.org/docs/0.12/installation/#virtualenv) for isolated virtual environment
- [pip](https://pip.pypa.i... |
require './lib/abstract.rb'
describe Abstract do
it 'parses a clean 1864 abstract' do
abs = Abstract.new(
[
'1|24 - L Mar. 5:4/4 - George Miller was arrested on a charge of entering',
'2|the shop of Humbert Droz, a watchmaker, on Detroit st. and running off',
'3|with a watch. He cla... |
<?php
namespace Demo;
/**
* OAuthRoute default with homepage and several authentication
* facilities such as signing in and out.
*/
class OAuthRoute extends \BFITech\ZapAdmin\OAuthRouteDefault {
public $srvfile;
/**
* GET: /
*/
public function route_home() {
$mithril = '//cdnjs.cloudflare.com/ajax/lib... |
// @target: es3
// @useDefineForClassFields: true
class A {
a = 12
}
|
module FoosHelper
def passes
true
end
def users_path_helper
users_path
end
def users_url_helper
users_url
end
end
|
package app.web.mbeans;
import javax.enterprise.context.RequestScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;
@Named
@RequestScoped
public class ErrorHandler {
public String getStatusCode() {
String val = String.valueOf((Integer) FacesContext.getCurrentInstance().getExternalC... |
package tui
import "image"
var _ Widget = &Table{}
// Table is a widget that lays out widgets in a table.
type Table struct {
selected int
onItemActivated func(*Table)
onSelectionChanged func(*Table)
*Grid
}
// NewTable returns a new Table.
func NewTable(cols, rows int) *Table {
return &Table{
... |
package io.iohk.ethereum.nodebuilder.tooling
import com.typesafe.scalalogging.Logger
import io.iohk.ethereum.db.storage.BlockHeadersStorage
import io.iohk.ethereum.db.storage.BlockNumberMappingStorage
object StorageConsistencyChecker {
type ShutdownOp = () => Unit
val DefaultStep = 1000
def checkStorageConsi... |
<?php
namespace vihv;
abstract class WpXmlWidget extends \WP_Widget {
abstract protected function getWidgetId();
abstract protected function getWidgetName();
abstract protected function createControl($args, $instance);
protected function getRootTag() {
return get_class($this);
}
public function __constru... |
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
namespace Volo.Abp.OpenIddict;
public interface IOpenIddictDestinationService
{
IEnumerable<string> GetDestinations(Claim claim, ClaimsPrincipal principal);
Task SetDestinationsAsync(ClaimsPrincipal principal);
} |
/**
* @license
* Copyright 2017 Google Inc. All rights reserved.
*
* 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 requir... |
#!/usr/bin/env bash
# fetching cmake
CMAKE_MAJOR="3.12"
CMAKE_PATCH="4"
CMAKE_VERS="${CMAKE_MAJOR}.${CMAKE_PATCH}"
if [ ! -f "${PWD}/cmake-${CMAKE_VERS}-Linux-x86_64.sh" ]
then
wget https://cmake.org/files/v${CMAKE_MAJOR}/cmake-${CMAKE_VERS}-Linux-x86_64.sh
fi
if [ ! -f "/usr/bin/cmake" ]
then
sh cmake-${CMAKE_VE... |
#include <gsl/gsl>
#include <vector>
#include <iostream>
// Circular buffer
template <typename T>
class CircularBuffer {
private:
std::vector<int> vec;
int current_idx;
int current_size;
public:
CircularBuffer(const int capacity_=3)
: current_idx(0), current_size(0), vec(capacity_, 0)
... |
import React from 'react'
import { Ellipsis } from 'components'
import { Spacer, Text } from '@sharingexcess/designsystem'
export function Loading({ text = 'Loading', relative = false }) {
return (
<div id="Loading" className={relative ? 'relative' : ''}>
<div id="Loading-icon">⚙️</div>
<Spacer heigh... |
package com.stripe.android.paymentsheet.elements
import com.stripe.android.paymentsheet.ElementType
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.map
/**
* This class controls the dropdown view and implements the [InputController] interface.
* Bec... |
#!/bin/bash
#Menu
echo "Select an option from the menu below"
printf '\n'
echo "1. Currently logged user and his logname."
echo "2. Your current shell."
echo "3. Your home directory."
echo "4. You current path setting."
echo "5. Your current working directory."
echo "6. Show currently logged number of users."
echo "7... |
package com.github.kerubistan.kerub.planner.steps.storage.gvinum.create
import com.github.kerubistan.kerub.data.dynamic.HostDynamicDao
import com.github.kerubistan.kerub.data.dynamic.VirtualStorageDeviceDynamicDao
import com.github.kerubistan.kerub.host.HostCommandExecutor
import com.github.kerubistan.kerub.model.dyna... |
require "gds_api/publishing_api"
require "gds_api/search"
require "gds_api/content_store"
module Services
def self.publishing_api
@publishing_api ||= GdsApi::PublishingApi.new(
Plek.new.find("publishing-api"),
disable_cache: true,
bearer_token: ENV["PUBLISHING_API_BEARER_TOKEN"] || "example",
... |
/*
* Copyright (C) 2019 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 app... |
import * as PIXI from "pixi.js";
class SpreadLine extends PIXI.Graphics {
constructor(x = 0, y = 0) {
super();
this.from(x, y);
}
from(x, y) {
this.points = [{ x, y }];
}
next(x, y, { water }) {
this.points.push({ x, y, width: 4, water: 15 * water });
if (!!this.animationFrameID) cancel... |
package participants;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import static org.junit.Assert.assertEquals;
@RunWith(MockitoJUnitRunner.class)
public class AttackerTest {
private Attacker sut;
@Test(expected = IllegalArgumentException.class)
... |
/**
* @license
* Copyright (c) 2020 PocketLivecoder
* MIT License
*/
/**
* @fileoverview Scroll bar script.
* @author Marek Lukac
*/
var button = document.getElementById("button");
var display = document.getElementById("display");
var container = document.getElementById("container");
va... |
# -*- coding: UTF-8 -*-
require 'spec_helper'
describe "abjad character number" do
it "should return abjad number of string" do
expect(Abjad.get("علی")).to eq(110)
end
end
|
using System;
using Newtonsoft.Json;
namespace LovePdf.Core
{
/// <summary>
/// Start Task Response
/// </summary>
public class StartTaskResponse
{
/// <summary>
/// Server
/// </summary>
[JsonProperty("server")]
public String Server { get; set; }
... |
import Controller from '@ember/controller';
export default class Application extends Controller {
queryParams = ['a', 'b', 'foo', 'bar'];
}
|
/*
* Class ARRAYED_LIST [NATURAL_8]
*/
#include "eif_macros.h"
#ifdef __cplusplus
extern "C" {
#endif
static const EIF_TYPE_INDEX egt_0_471 [] = {0xFF01,232,0xFFFF};
static const EIF_TYPE_INDEX egt_1_471 [] = {0xFF01,245,470,209,0xFFFF};
static const EIF_TYPE_INDEX egt_2_471 [] = {0xFF01,470,209,0xFFFF};
static c... |
<?php
/**
* Contains Class TestOptionLoginRedirect.
*
* @package WP-Auth0
*
* @since 3.7.0
*/
class OptionLoginRedirectTest extends WP_Auth0_Test_Case {
/**
* WP_Auth0_Admin_Advanced instance.
*
* @var WP_Auth0_Admin_Advanced
*/
public static $admin;
/**
* Run before the test suite starts.
*/
p... |
package sgf.gateway.service.security;
import sgf.gateway.model.security.Group;
import sgf.gateway.model.security.User;
/**
* Interface defining behavior for a group membership event.
*/
public interface GroupMembershipEvent {
/**
* Returns the user for which this event was generated.
*
* @return... |
#ifndef CLIENT_HPP
#define CLIENT_HPP
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include "CGI.hpp"
#include "ISocket.hpp"
#include "Request.hpp"
#include "Response.hpp"
#include "config.hpp"
#include "utility.hpp"
#ifdef GOOGLE_TEST
#include <gtest/gtest.h>
#endif
class Client : public ISocket {
#i... |
---
title: world_wide_move
searchTitle: Lua EQ world_wide_move
weight: 1
hidden: true
menuTitle: world_wide_move
---
## world_wide_move
```lua
eq.world_wide_move(const char *zone_short_name) -- void
``` |
title: Tomcat Server Info
date: 2018-03-05
category: java
tags: java, tomcat
Tomcat has a class `org.apache.catalina.util.ServerInfo` which you can
run to find out the version of Tomcat, if you don't trust the
directory in which it is installed, of course 😉
```text
$ cd /path/to/tomcat/install
$ java -cp lib/catalin... |
export const JSS_MODE_CONNECTED = 'connected';
export const JSS_MODE_DISCONNECTED = 'disconnected';
|
#!/usr/bin/env bash
readonly COLLECTION_NAME=${1:-lorem-ipsum}
. lib.sh
for i in {1..42}; do
text=$(lorem -p 3 | tr '\n' ' ')
echo $i
json='{
"text": "'$text'",
"order": '$i'
}'
execute_post_request collections/$COLLECTION_NAME/documents <<< "$json"
done
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.