text stringlengths 27 775k |
|---|
package com.sumu.mobliesafe.utils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* Created by Sumu on 2015/11/5.
* 读取流的工具
*/
public class StreamUtils {
/**
* 将输入流读取成String后返回
* @param inputStream
* @return
*/
public static String readF... |
package de.illonis.eduras.gameclient.gui.game;
/**
* Does need notification when size of gui has changed.
*
* @author illonis
*
*/
@Deprecated
public interface GuiResizeListener {
/**
* Notifies gui objects that game panel size has changed.
*
* @param width
* new width.
*... |
#require 'vcr'
# VCR.configure do |c|
# c.cassette_library_dir = './spec/vcr_cassettes'
# c.hook_into :webmock
# end;
#VCR.insert_cassette "integration", :record => :new_episodes;
def bootstrap
require File.join(File.dirname(__FILE__), '../lib/mailroute')
puts
require 'mailroute'
Mailroute.configure({}... |
use rill_protocol::flow::core::Flow;
use rill_protocol::io::provider::StreamType;
use rrpack_basis::manifest::description::{Layer, PackFlow};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SliderSpec {
pub label: String,
pub min: f64,
pub max: f64,
pub s... |
#include "stdafx.h"
#include "HasSomethingToReport.h"
#include "Agent.hpp"
#include "Scout.hpp"
namespace bjoernligan
{
namespace ai
{
HasSomethingToReport::HasSomethingToReport()
{
}
EBNodeStatus HasSomethingToReport::Process()
{
if (!m_xAgent)
return EBNodeStatus::Invalid;
Scout* scout = sta... |
package tifmo
package dcstree {
sealed abstract class Context
case class ContextA(inRole: SemRole, ref: Ref) extends Context
case class ContextB(ref: Ref) extends Context
}
|
// using SendGrid's v3 Node.js Library
// https://github.com/sendgrid/sendgrid-nodejs
(function () {
'use strict';
var sendgrid = require('sendgrid')('meanjs_demo', '9lorbUKGQiCWsG5HmkfXqA');
// .mail
exports.create = function(req, res){
console.log(req.body);
var email = new sendgrid.Email({
to: 'cameronjhous... |
/*
* Copyright 2015 Antonio Leiva
*
* 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... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
typedef struct {
float e00;
float e01;
float e02;
float e03;
} VectorF128;... |
#!/usr/bin/env node
const program = require('commander');
const LabelX = 'https://github.com/zhoumingque/LabelX.git';
const log = require('../lib/log')({ debug: false });
const spawn = require('hexo-util/lib/spawn');
const pkg = require('../package.json');
const utils = require('../lib/utils');
const Promise = require... |
Папка для препроцессорных файлов стилей.
--
Пример структуры файлов:
style/
├── global/
├── _global.scss
└── другие _*.scss файлы стилизующие проект глобально
├── block/
├── _block.scss
└── другие _*.scss файлы стилизующие блок
├── temporally/
├── _outline.scss
└── другие _*.scss файлы стилиз... |
# openlabcmd ha cluster repair requests
RSYNCD_HA_PORT = 873
ZOOKEEPER_HA_PORTS = [2181, 2888, 3888]
MYSQL_HA_PORT = 3306
HA_PORTS = []
for ports in [RSYNCD_HA_PORT, ZOOKEEPER_HA_PORTS, MYSQL_HA_PORT]:
if isinstance(ports, list):
HA_PORTS.extend(ports)
else:
HA_PORTS.append(ports)
HA_SGs = ['o... |
use std::fs::{self, File};
use std::io::Write;
use symflow::Program;
use symflow::flow::{ControlFlowGraph, DataDependencyGraph};
use symflow::timings;
fn main() {
bench("bufs");
bench("paths");
bench("deep");
bench("overwrite");
}
fn bench(filename: &str) {
let path = format!("target/bin/{}", fi... |
package com.twitter.finatra.test
@deprecated("Use com.twitter.inject.server.FeatureTest and com.twitter.finatra.http.test.HttpTest", "")
trait HttpFeatureTest
extends com.twitter.inject.server.FeatureTest
with com.twitter.finatra.http.test.HttpTest
|
<?php namespace HendrikErz\Campaignr\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
class Events extends Controller
{
public $implement = [
'Backend\Behaviors\ListController',
'Backend\Behaviors\FormController'
];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_fo... |
#! /bin/bash -eu
#
# Copyright (c) 2021 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
#
# Quick howto:
#
# $ wget https://download.fedoraproject.org/pub/fedora/linux/releases/33/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-33-1.2.iso
# $ IMAGEDIR=/home/ttbd/images/tcf-live/x86_64
# $ /usr/s... |
resolvers += "Local Maven Repository" at Path.userHome.asFile.toURI.toURL + ".m2/repository"
addSbtPlugin("org.riot-framework" % "sbt-riotctl" % "0.7.1")
|
### Unreleased
- YYYY-MM-DD **BREAKING?** -- description
### 0.0.7 -- 2021-06-03
- 2021-06-03 -- Updates peerDependencies versioning
### 0.0.6 -- 2021-05-10
- 2020-05-10 -- Updates peerDependencies versioning
### 0.0.5 -- 2021-05-03
- 2020-05-03 -- Use config to resolve import addresses
### 0.0.3 -- 2020-11-05
... |
module MailerSpecHelper
def sender_names(mail)
# http://stackoverflow.com/a/7213323/358804
mail[:from].display_names
end
end
|
from pwnlib.constants.constant import Constant
__NR_Linux = Constant('__NR_Linux',1024)
__NR_ni_syscall = Constant('__NR_ni_syscall',(1024 + 0))
__NR_exit = Constant('__NR_exit',(1024 + 1))
__NR_read = Constant('__NR_read',(1024 + 2))
__NR_write = Constant('__NR_write',(1024 + 3))
__NR_open = Constant('__NR_open',(1024... |
package uoc.cbonache.tfg.data.repository.token.model
import uoc.cbonache.tfg.model.TokenInfo
/**
* @author cbonache
*/
fun TokenInfoDataEntity.mapToTokenInfo(): TokenInfo {
return TokenInfo(this.access_token,
this.expires_in,
this.refresh_token,
this.tokenRetrievalDateInMill... |
#!/bin/bash
set -e
ZKCLI=/usr/share/zookeeper/bin/zkCli.sh
ENDPOINT_NAME=$1
BACKEND_URL=$2
PATH_PREFIX=$3
cmds="
create /traefik/backends/${ENDPOINT_NAME} ''
create /traefik/backends/${ENDPOINT_NAME}/servers ''
create /traefik/backends/${ENDPOINT_NAME}/servers/server ''
create /traefik/backends/${ENDPOINT_NAME}/ser... |
Uses the Comfortaa font, all capitals only. Refer to the font folder for more information.
The final overlays can be found at https://github.com/batocera-linux/batocera-controller-overlays
|
#!/usr/bin/env ruby
#
##
## \file addingEvidenceCodes_1.py
## \brief adds controlled vocabulary terms to a reaction in a model
## \author Sarah Keating
##
## This file is part of libSBML. Please visit http://sbml.org for more
## information about SBML, and the latest version of libSBML.
##
require 'libSBML'
... |
<?php
namespace App\Http\Controllers\Api\V1;
use Illuminate\Http\Request;
use App\Http\Controllers\Api\ApiController;
use App\Http\Requests;
use App\Classes\LoadAircraft;
use App\Classes\BadgeImporter;
use App\Classes\MemberUtilities;
use App\Models\Member;
use App\Models\RatingMember;
use App\Models\BadgeMember;
us... |
# api_definitions
API definitions for some of our API's
## lam/
API defitionion for LAM (traffic measurement system) raw data
|
package com.chrynan.strings.core
interface ResourceID {
val name: String
} |
import type { FormEvent } from 'react';
import { useNavigate } from 'react-router-dom';
import { connect } from 'react-redux';
import styled from 'styled-components';
import { Helmet } from 'react-helmet';
import PageSection from '@c-atoms/PageSection';
import Heading from '@c-atoms/Heading';
import Form from '@c-ato... |
const { Interpreter, Parser } = require("./simple-interactive-interpreter");
describe("Parser", () => {
const interpreter = new Interpreter();
const parser = new Parser(interpreter);
const parse = source => parser.parse(interpreter.tokenize(source));
const avg = {
type: "fn",
name: "avg",
params: ... |
/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. */
package p.runtime.exceptions;
// MapInsertError is thrown when inserting duplicate keys into a map.
public class MapInsertError extends Error {
public MapInsertError(String errorMsg) {
super(errorMsg);
}
}
|
#!/usr/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
PROJECT_ROOT="$( dirname "${SCRIPT_DIR}" )"
build_prefix="${PROJECT_ROOT}/build-RelWithDebInfo"
bin_path="${build_prefix}/bin"
thallium_rdma_exe="${bin_path}/thallium_rdma2"
addrs=(
"sockets"
"tcp"
)
payloadSizes=(
1... |
## [2.2.0] - 2021-09-02
- Upgraded [bluemvc-core](https://github.com/themichaelhall/bluemvc-core) dependency to 2.2
- Upgraded [bluemvc-fakes](https://github.com/themichaelhall/bluemvc-fakes) dependency to 2.2
- Upgraded [bluemvc-twig](https://github.com/themichaelhall/bluemvc-twig) dependency to 2.2
- Upgraded [bluemv... |
#! /bin/bash
# brief: Import various CNN models from the web
# author: Andrea Vedaldi
# Models are written to <MATCONVNET>/data/models
# You can delete <MATCONVNET>/data/tmp after conversion
converter="python import-caffe.py"
out=./tracker.mat
test ! -e "$out" && \
$converter \
--caffe-variant=caffe \
--preproc=caffe... |
package lectures.part2oop
object Exceptions extends App{
val x: String = null
/*
println(x.length)// this throws null exception
*/
// throw exceptions
// --> throw new NullPointerException
// val aWeirdValue = throw new NullPointerException
// throwable classes extends the Throwable class.
// Excep... |
---
id: 12209
title: Hailie Masson
date: 2021-04-07T11:25:32+00:00
author: victor
layout: post
guid: https://ukdataservers.com/hailie-masson/
permalink: /04/07/hailie-masson
tags:
- Husband
- Wife
- Boyfriend
- Girlfriend
category: Marriage Guides
---
* some text
{: toc}
## Who is Hailie Masson
Canadian T... |
#!/bin/sh
set -e
build() {
[ $# -eq 1 ] || return 1
# remove previously generated files
git clean -fdX
# build cmake system for requested target
cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain/${1}.cmake .
# build all test programs for the target
make
}
export TESTVP="tiny32"
build rv32 >/dev/null
out="$(./run_te... |
[Database Structure](Database-Structure) > [Character-Database](Character-Database) > [bugreport](bugreport)
Column | Type | Description
--- | --- | ---
Id | INT UNSIGNED |
Type | longtext |
Content | longtext |
|
(ns maze.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [clojure.set :refer [difference]]
[cljs.core.async :refer [chan dropping-buffer]]))
(defn- neighbors [[x y]]
(set
(for [dx [-1 0 1] dy [-1 0 1]
:when (not= (.abs js/Math dx) (.abs js/Math dy))]
[(+ x dx... |
import { pick } from '../../utils'
import Source from './source.vue'
function plugin (Vue, options = {}) {
if (plugin.installed) {
return
}
plugin.installed = true
options = pick(options, 'dataProjection')
Object.assign(Source, options)
Vue.component(Source.name, Source)
Vue.component('VlSourceArc... |
# brackets-rpm-syntax
RPM spec file syntax highlighting for [Brackets](http://brackets.io/). Install via the Extension Manager.
rpm.js is a modified version of the RPM spec file mode in [CodeMirror](http://codemirror.net/).
|
use oxipng;
use oxipng::internal_tests::*;
use oxipng::{InFile, OutFile};
use std::collections::HashSet;
use std::fs::remove_file;
use std::path::Path;
use std::path::PathBuf;
fn get_opts(input: &Path) -> (OutFile, oxipng::Options) {
let mut options = oxipng::Options::default();
options.verbosity = None;
... |
// Created by Petr Karnakov on 25.04.2018
// Copyright 2018 ETH Zurich
#include <sstream>
#include "geom/mesh.h"
#include "kernel/kernelmesh.h"
#include "parse/vars.h"
#include "util/mpi.h"
#include "local.ipp"
DECLARE_FORCE_LINK_TARGET(distr_local);
template <class M>
class ModuleDistrLocal : public ModuleDistr<M... |
package mod.lucky.common.attribute
data class EvalContext(
val templateVarFns: Map<String, TemplateVarFn>,
val templateContext: Any?,
)
class EvalError(message: String) : Exception(message)
fun evalTemplateVar(templateVar: TemplateVar, context: EvalContext): Attr {
val fn = context.templateVarFns[templat... |
///
/// Copyright (c) 2021 Erwin Rol <erwin@erwinrol.com>
///
/// SPDX-License-Identifier: Apache-2.0
///
#ifndef ZPP_INCLUDE_ZPP_UNIQUE_LOCK_HPP
#define ZPP_INCLUDE_ZPP_UNIQUE_LOCK_HPP
#include <kernel.h>
#include <sys/__assert.h>
#include <chrono>
#include <zpp/result.hpp>
#include <zpp/error_code.hpp>
namespace... |
for <big bigger biggest> -> $form {
say "Testing '$form'";
$form ~~ / big | bigger | biggest /;
say $/;
$form ~~ / biggest || bigger || big /;
say $/;
}
|
<?php
/**
* This file is part of the GraphAware NeoClient package.
*
* (c) GraphAware <http://graphaware.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace GraphAware\NeoClient\Formatter\Graph;
class Collection
{
... |
## kubler/kibana
Run this [Kibana][] image with:
$ docker run -d --name kibana-0 -e ELASTICSEARCH_URL=http://es.example.com:9200 -p 5601:5601 kubler/kibana
[Last Build][packages]
[Kibana]: http://www.elasticsearch.org/overview/kibana/
[packages]: PACKAGES.md
|
use crate::hub::messages::hub::header::HubMessageHeader;
use crate::hub::messages::hub::VERSION;
use serde::Serialize;
use uuid::Uuid;
#[derive(Serialize, Debug, PartialEq, Eq)]
pub struct LogMessage {
pub header: HubMessageHeader,
pub body: LogMessageBody,
}
#[derive(Serialize, Debug, PartialEq, Eq)]
pub struct ... |
## Running via Docker
Use the provided Dockerfile, supplying the following environment variables:
* `SITE_DOMAIN`: the domain this will be hosted at, without the protocol.
Example: `journal.example.com`.
* `DATABASE_URL`: URL of a PostgreSQL database for the application to use.
Example: `postgres://journal:pAsSwO... |
SUBROUTINE LSEI(C,D,E,F,G,H,LC,MC,LE,ME,LG,MG,N,X,XNRM,W,JW,MODE)
C FOR MODE=1, THE SUBROUTINE RETURNS THE SOLUTION X OF
C EQUALITY & INEQUALITY CONSTRAINED LEAST SQUARES PROBLEM LSEI :
C MIN ||E*X - F||
C X
C S.T. C*X = D,
C ... |
#Deploy Instruction
>pip3 install -r requirements.txt
###if there dont have test.db
>python3 gen_db.py
>python3 dataImporter.py
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
namespace Devdog.QuestSystemPro.Dialogue.Editors
{
public class EdgeConditionSummary
{
public string msg { get; set; }
public Color color { get; set; }
public bool canUse { get; set... |
import { AttributeSeriesBuilder } from "../AttributeSeriesBuilder";
describe("AttributeSeriesBuilder", () => {
it("should build an attribute series", () => {
const series = new AttributeSeriesBuilder("r")
.setValues([10, 10, 10])
.setScale([10, 10])
.setNormalizeFunction("polynomial")
.bu... |
using System;
using UnityEngine;
/* CLASS DOCUMENTATION *\
*
* THIS CLASS USES A SINGLETON SO THERE IS ONLY INSTANCE OF IT IN EVERY SCENE
*
* [Class Flow]
* This class works just as a central hub to gather all the custom made game events.
*/
[DefaultExecutionOrder(100)]
public class GameEvents : MonoBehaviour
... |
#ifndef _klib_timer_test_h
#define _klib_timer_test_h
#include <core/timer_mgr.h>
bool print_info()
{
printf("timer per second !!! \r\n");
return true;
}
bool print_info_2second()
{
printf("timer 2 second !!! \r\n");
return true;
}
TEST(timer, 1)
{
timer_mgr t;
... |
package com.karhoo.uisdk.screen.address.domain
import com.karhoo.uisdk.base.listener.ErrorView
interface AddressSearchProvider {
fun getSessionToken(): String
fun setSearchQuery(searchQuery: String)
fun setCurrentLatLong(latitude: Double, longitude: Double)
fun addAddressesObserver(addressChangedL... |
description = "Utility for booting embedded test environment for HugeTable without external dependencies."
/* Build configuration */
plugins {
`project-convention`
application
}
application {
mainClassName = "nl.tudelft.htable.test.env.Main"
}
dependencies {
implementation("com.typesafe.scala-logging... |
var W;
function main() {
if (O876.Browser.checkHTML5('O876 Raycaster Level Editor')) {
W = new RCWE.Application();
$(window).on('resize', W.resizeWindow.bind(W));
}
}
$(window).on('load', main);
|
package com.xiao.o2o.service;
public interface CacheService {
/**
* 依据key前缀删除匹配该模式下的所有key-value如传入:shopcategory,则shopcategory_allfirstlevel等
* 以shopcategroy打头的key_value都会被清空
* @param keyPrefix
*/
void removeFromCache(String keyPrefix);
}
|
import { env as environment } from 'process';
import { v4 } from 'uuid';
/*
* Start every worker with a separate project ID so parallel test runs to not
* interfere with each other.
*/
export const PROJECT_ID = v4();
export const FIRESTORE_SERVICE_HOSTNAME =
typeof environment.FIRESTORE_SERVICE_HOSTNAME === 'str... |
function custom_generator{T<:Union{AbstractFloat,Integer}}(a::Number, b::Number, type_a::Bool, type_b::Bool,
var_type::Type{T}, p::Float64 = 1.5)
if a > b
error("Generotor received lower bound that is greater then upper bound:
$a > $b")
end
if a == -Inf && b == Inf
if var_type... |
package de.chandre.admintool.core.ui.select2;
import java.io.Serializable;
public class OptionTO implements Serializable, Comparable<OptionTO> {
private static final long serialVersionUID = 6804008394662197234L;
private String id;
private String text;
private boolean selected;
private boolean disable... |
module readncdf
use logging
implicit none
contains
subroutine readstepnc(fname,var_name,ff, fill_value, lon, lat,elevation, device, startindex, countnum)
! A condensed way to read a variable form netcdf file
! it is implied that the format is ff(time, device)
! in: - fname: netcdf filename
! -... |
//
// Created by serik1987 on 11.01.2020.
//
#ifndef IHNA_KOZHUKHOV_IMAGE_ANALYSIS___tracereading_INIT___H
#define IHNA_KOZHUKHOV_IMAGE_ANALYSIS___tracereading_INIT___H
#include "../../cpp/tracereading/TraceReader.h"
#include "../../cpp/tracereading/TraceReaderAndCleaner.h"
extern "C" {
static PyObject *PyIman... |
module ConsoleCreep
module IRBHooks
attr_accessor :current_user
def initialize(irb, workspace = nil, input_method = nil)
@current_user = IRB.conf[:current_user]
super
end
def evaluate(*args, &block)
begin
result = super(*args, &block)
ConsoleCreep.config.store.call(... |
module Celluloid
# Calls represent requests to an actor
class Call
attr_reader :id, :caller, :method, :arguments, :block
def initialize(caller, method, arguments, block)
@id = object_id # memoize object ID for serialization
@caller, @method, @arguments, @block = caller, method, arguments, block... |
@file:JvmName("HtmlUtil")
package com.librum.utils
import android.content.Context
import com.librum.R
import com.librum.data.db.HighLightTable
import java.util.regex.Pattern
/**
* @author lusinabrian on 19/09/17.
* @Notes HTML Utils
*/
/**
* Function modifies input html string by adding extra css,js and font i... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace cookboard.Models
{
public class EmentaViewModel
{
public EmentaViewModel(string dia, Receita receita)
{
Dia = dia;
Receita = receita;
}
public str... |
'use strict';
const commands = module.exports = {};
commands.parse = (message, client, clientPool) => {
const messageArray = message.split(' ');
const command = messageArray[0];
const name = messageArray[1];
const msg = messageArray.slice(2).join(' ');
switch (command) {
case '@screenName': {
con... |
# AutoFactory
This is the source code for the game I am making on Unity.
https://projectautofactory.wordpress.com
|
using Login.Models.Threadl;
using System.Collections.Generic;
namespace Login.Models.Album1
{
public class AlbumModel
{
public int AlbumId { get; set; }
public string Title { get; set; }
public string Image { get; set; }
public Channel Channel { get; set; }
public IEnum... |
app.controller("IngestController", ['$scope', 'endpoint', function($scope, endpoint) {
_.extend($scope, {
action : "",
form: null,
initialise : function() {
this.form = document.getElementById("uploadForm");
this.form.action = endpoint.getIngestUrl();
t... |
const MidiSynthVoiceMode = {
ON: 0,
RELEASE: 1,
OFF: 2
};
class MidiSynthVoice {
constructor(sampleFreq, bufferLen) {
this.sampleFreq = sampleFreq;
this.bufferLen = bufferLen;
this.done = false;
this.note = 60;
this.channel = 0;
this.veloci... |
using System;
namespace EasyNetQ.Management.Client.Model
{
public class MessageStats
{
public Int64 DeliverGet { get; set; }
public DeliverGetDetails DeliverGetDetails { get; set; }
public Int64 DeliverNoAck { get; set; }
public DeliverNoAckDetails DeliverNoAckDetails { get; se... |
import { pooledMap } from "https://deno.land/std@0.134.0/async/pool.ts";
import { enumerate } from "./enumerate.ts";
export async function map<T, R>(
iterable: Iterable<T> | AsyncIterable<T>,
mapper: (data: T) => Promise<R>,
opts?: { concurrency?: number },
): Promise<R[]> {
const arr: R[] = [];
const result... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/navigation_interception/intercept_navigation_delegate.h"
#include <memory>
#include "base/android/jni_android.h"
#include "base... |
$(function() {
var days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov", "Dec"
];
var date = new Date();
var currDay = days[date.getDay()];
var currMonth = months[date.getMonth()];
date.s... |
#!/bin/sh
export http_proxy="http://iss-emea-pitc-amsterdamz.proxy.corporate.ge.com:80"
export https_proxy="http://iss-emea-pitc-amsterdamz.proxy.corporate.ge.com:80" |
import axios from 'axios';
import chunk from 'lodash/chunk';
import uniqBy from 'lodash/uniqBy';
export const HTTP_LIMIT = 90000;
const canUse = () => {
return !!localStorage.getItem('adminKey');
};
export const listAllItems = async () => {
if (canUse()) {
try {
const res = await axios.ge... |
/*
* 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 writing, software
* distribu... |
export const environment = {
production: true,
API_BASE_URL: {
protocol: 'http://',
uri: 'localhost',
port: 9080,
endpoint: 'api',
api: {
drivers: '/drivers/',
vehicles: '/vehicles/',
trips: '/trips/',
utils: '/utils'
}
},
LICENSES : ['A', 'B', 'C', 'D']
};
|
const RegisterType = require('../lib/node-installer');
const GlobalContextHelper = require('../lib/helpers/global-context-helper');
module.exports = function(RED) {
const registerType = RegisterType(RED);
const globalContextHelper = GlobalContextHelper(RED);
function ChatBotPopMessage(config) {
RED.nodes.cr... |
---
title: _variant_t::Clear
ms.date: 11/04/2016
f1_keywords:
- _variant_t::Clear
- _variant_t.Clear
helpviewer_keywords:
- VARIANT object [C++], clear
- Clear method [C++]
- VARIANT object
ms.assetid: 844d43fa-9628-4643-a877-c1e129838b4e
ms.openlocfilehash: e74bacfb23081fea64d514d7085261e3648b05e1
ms.sourcegitcommit: ... |
package geometry
import (
"math"
)
const (
curveRecursionLimit = 32
)
// Bezier cubic curve defined by 2 control points
// the first and last point defined respectivly the start and the end of the curve
type CubicCurve [4]Vector
// Subdivide the curve into 2 CubicCurve that is equivalent
func (c CubicCurve) Subdi... |
import {spawn, ChildProcess} from 'child_process';
const UNIVERSE_SIZE = 512;
export class DmxProxy {
private readonly process: ChildProcess;
// 512 bytes of DMX data + 1 byte for the universe
private readonly buffer = new Buffer(UNIVERSE_SIZE + 1);
public constructor(proxyPath: string) {
// -u makes pyt... |
package com.github.gwtchartjs.client;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class ChartLegend {
/** true is the legend shown. Default: true */
public Boolean display;
/**
* Posi... |
using System;
using System.Drawing;
using System.Windows.Forms;
using Moway.Template;
using Moway.Project.GraphicProject.Actions;
namespace Moway.Project.GraphicProject.Controls
{
/// <summary>
/// Represents a selection button for an action
/// </summary>
public partial class ToolButton : Button
... |
package com.michalplachta.pacman.collectibles.http
import akka.http.scaladsl.server.{Directives, Route}
import com.michalplachta.pacman.collectibles.data.Position
import io.circe.generic.auto._
import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport
object HttpRoutes extends Directives with FailFastCirceSupport {
... |
import 'package:flutter/material.dart';
import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
import 'package:jiffy/jiffy.dart';
import 'package:mymgs/widgets/icon_button.dart';
typedef DateCallback = void Function(DateTime newDate);
class DateSelector extends StatefulWidget {
final DateTime sele... |
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -fwarn-orphans #-}
module T4912 where
import T4912a
type OurData = TheirData
instance Foo TheirData where
foo = id
instance Bar OurData where
bar _ = "Ours"
|
#!/bin/sh
rm -fr _site
rm -fr _api && mkdir _api
rm -f _manpages/*.gz
# make the TCO for the tutorial
./gen-toc.sh
# build the css
(cd assets && ./build.sh css)
# pre-process manpages with ronn
ls _manpages | while read page
do
__ptitle="`basename $page .md | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQR... |
const fs = require('fs');
const path = require('path');
const sourcePath = path.resolve(__dirname, 'styles');
const bundlePath = path.resolve(__dirname, 'project-dist', 'bundle.css');
let writeBundle = fs.createWriteStream(bundlePath);
fs.readdir(sourcePath, {withFileTypes: true}, (err, data) => {
if (err) throw ... |
# Pass an associative array name as first arg
# Pass the source dir as second
function run_cmake {
local -n _D=$1
# Build command line
local cmd="cmake -S $2"
local vname
for vname in "${!_D[@]}"; do
cmd="$cmd -D${vname}=${_D[$vname]}"
done
echo $cmd
eval $cmd
}
function get_cache_var... |
package io.axoniq.demo.giftcard.gui;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
//@SpringUI
//@Push
//@Profile("gui")
public class GiftcardUI { //extends UI {
private final static Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
... |
//
// LocationController.h
// rhorunner
//
// Created by vlad on 10/15/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface LocationController : NSObject<CLLocationManagerDelegate> {
CLLocationManager* _locationManager;
CFRunLoopTimerRef _timer;
@publi... |
require 'spec_helper'
# rubocop:disable Metrics/BlockLength
RSpec.describe DockerizeRails do
it 'has a version number' do
expect(DockerizeRails::VERSION).not_to be nil
end
it 'successfully runs help command' do
options = { tiny: false, purge: false, test_env: false }
expect(DockerizeRailsCLI.run('he... |
if( typeof module !== 'undefined' )
require( 'wTools' );
var _ = wTools;
// Input element
var got = _.arrayFlatten( [ 1, 2, 3, 3, 4 ], 3 );
logger.log( 'Array flattened', got )
// Input element + *Once pattern
var got = _.arrayFlattenOnce( [ 1, 2, 3, 4 ], 0 );
logger.log( 'Array flattened with *Once ', got )
var go... |
<?php
use Dapphp\TorUtils\TorDNSEL;
include __DIR__ . '/../src/TorDNSEL.php';
// Practical usage on a web server:
/*
try {
if (TorDNSEL::isTor($_SERVER['SERVER_ADDR'])) {
// do something special for Tor users
} else {
// not using Tor, educate them! :-D
}
} catch (\Exceptio... |
require 'test_helper.rb'
class TestPocket < Test::Unit::TestCase
context "Purse" do
context "Pocket" do
context "an instance" do
setup do
@pocket = Pocket.new(purse_path)
end
should "require a path" do
assert_raise(MissingParameter) do
Pocket.new(n... |
package edu.berkeley.cs.sdb.bw2
case class BosswaveException(msg: String = null, cause: Throwable = null) extends Exception(msg, cause)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.