text
stringlengths
1
1.05M
#!/usr/bin/env sh ################################################################################ # ERROR: Let the user know if the script fails ################################################################################ trap 'ret=$?; test $ret -ne 0 && printf "\n \e[31m๏ฑ\033[0m Setup failed \e[31m๏ฑ\033[0m\...
#!/bin/bash help() { cat <<EOF Usage: ./mktest.sh issueXXX.md [-g : generate a new test case from a .md file] [-d : diff expected and actual] [-e : generate TWO html previews, issueXXX.actual.html and issueXXX.expected.html] [-o : open the H...
<filename>lib/assets/javascripts/dashboard/data/backbone/sync-options.js var _ = require('underscore'); var Backbone = require('backbone'); (function () { // helper functions needed from backbone (they are not exported) var getValue = function (object, prop, method) { if (!(object && object[prop])) return null...
<gh_stars>0 package common import ( "fmt" "strings" "github.com/flant/werf/pkg/storage" "github.com/flant/werf/pkg/werf" ) func GetStagesStorageCache(synchronization string) (storage.StagesStorageCache, error) { if synchronization == storage.LocalStorageAddress { return storage.NewFileStagesStorageCache(werf....
function transformData(datos) { return datos.map((element) => { return { Numero2: element.Numero + '.' + element.MetaId.Numero, ...element }; }); } // Example usage const datos = [ { Numero: 1, MetaId: { Numero: 10 } }, { Numero: 2, MetaId: { Numero: 20 } }, { Numero: 3, MetaId: { Numero:...
#!/bin/bash dieharder -d 9 -g 45 -S 403526862
class CustomEventDispatcher implements EventDispatcher { private eventListeners: { [eventType: string]: (() => void)[] } = {}; addEventListener(eventType: string, listener: () => void): void { if (!this.eventListeners[eventType]) { this.eventListeners[eventType] = []; } this.eventListeners[eventT...
import React from 'react'; import Layout from '../../components/Layout'; const Thanks = () => ( <Layout> <section className="section"> <div className="container mx-auto"> <div className="flex flex-wrap justify-center bg-white shadow-xl rounded-lg -mt-64 py-16 px-12 relative z-10"> <div cl...
require 'test_helper' class OverwatchAPITest < ActiveSupport::TestCase test 'battletag is encoded for URL' do api = OverwatchAPI.new(battletag: 'Amรฉlie#1234', platform: 'pc') assert_equal '/api/v3/u/Am%C3%A9lie-1234/stats?platform=pc', api.profile_url end end
<gh_stars>10-100 package fastly // Coordinates represent the location of a datacenter. type Coordinates struct { Latitude float64 `mapstructure:"latitude"` Longtitude float64 `mapstructure:"longitude"` X float64 `mapstructure:"x"` Y float64 `mapstructure:"y"` } // Datacenter is a list of Datac...
package com.vc.easy object L561 { def arrayPairSum(nums: Array[Int]): Int = { scala.util.Sorting.quickSort(nums) var sum = 0 (nums.indices by 2).foreach(i => { sum += nums(i) }) sum } }
<filename>examples/plotting/plot_with_matplotlib.py import numpy as np import matplotlib.pyplot as plt from acconeer_utils.clients import SocketClient, SPIClient, UARTClient from acconeer_utils.clients import configs from acconeer_utils import example_utils def main(): args = example_utils.ExampleArgumentParser(...
#!/bin/bash # Ensure that one server and n clients run, and print plausible output. . test-common.sh if [[ $# -eq 0 ]]; then exit 1 fi n=$1 if [[ $# -ge 2 ]]; then port=$2 else port=4444 fi conf=$(mktemp /tmp/clockkit.conf.XXX) srv=$(mktemp /tmp/clockkit.srv.XXX) clis='' for i in $(seq $n); do cli[i]=$(mkte...
#!/bin/bash typeset __abspath=$(cd ${0%/*} && echo $PWD/${0##*/}) typeset __shelldir=`dirname "${__abspath}"` typeset __testdir=`dirname "${__shelldir}"` typeset __tmp=`mktemp /tmp/avn-test.XXXXXX` typeset __written="" export HOME="${__testdir}/fixtures" # start in a known location cd "${__testdir}/fixtures/home" fu...
# ----------------------------------------------------------------------------- # # Package : markdown-it # Version : 8.4.2 # Source repo : https://github.com/markdown-it/markdown-it # Tested on : RHEL 8.3 # Script License: Apache License, Version 2 or later # Maintainer : BulkPackageSearch Automation <sethp@us.ibm.com...
# Creation of routing instances export ROUTER_NAMESPACE=router oc new-project $ROUTER_NAMESPACE oc project $ROUTER_NAMESPACE # Creation of Service Account echo \ '{"kind":"ServiceAccount","apiVersion":"v1","metadata":{"name":"router"}}' \ | oc create -f - # Edit privileged, add to bottom under users: - syste...
#!/bin/bash source ./box.sh source ./variables.sh box "Starting Docker Machine creation" "green" "blue" for node in $(seq 1 $leaders); do box "Node leader $node" "light_purple" "red" docker-machine create \ --engine-env 'DOCKER_OPTS="-H unix:///var/run/docker.sock"' \ --driver vmwarevsphere \ --v...
#!/bin/sh # shellcheck disable=SC1090 # shellcheck disable=SC1091 # shellcheck disable=SC2039 test_load_config() { CONFIG="../etc/basepkg.conf" _load_config assertEquals "0" "$?" } test_load_config_invalid_path_pattern() { CONFIG="xxxxx" local result="$(_load_config)" local expected="$CONFI...
'use strict'; const expect = require('chai').expect; const ApplicationStore = require('../lib/application-store'); describe('ApplicationStore', function() { describe('#set dataService', function() { it('sets the data service', function() { ApplicationStore.dataService = 'test'; expect(ApplicationSto...
// Given class and methods template <typename T> class binary_indexed_tree { std::vector<T> dat; T merge(T a, T b) const { return a + b; } // ... other constructors and methods public: binary_indexed_tree(size_t N) : dat(N + 1, NEUTRAL) {} binary_indexed_tree(size_t N, T t) : dat(N + 1, NEUTRAL) { for (i...
<reponame>sportsreport2/nodeless-trakt-ts<gh_stars>0 export type Status = | "ended" | "returning series" | "canceled" | "in production"; export type Type = "movie" | "show" | "episode" | "person" | "list"; export type ExtendedType = | "full" | "noseasons" | "episodes" | "full,episodes" | "metadata"; e...
<filename>src/components/GraduateCheck/index.ts export { default } from "./GraduateCheck";
#!/bin/bash # ****************************************************************************** # IBM Cloud Kubernetes Service, 5737-D43 # (C) Copyright IBM Corp. 2017, 2022 All Rights Reserved. # # SPDX-License-Identifier: Apache2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
<reponame>mia-platform/lc39 import { FastifyInstance } from 'fastify' import { expectType } from 'tsd' import lc39 from '../' const server = lc39('../tests/modules/correct-module.js') expectType<FastifyInstance>(server)
#Function to add two numbers def add(val1, val2): return val1+val2 #Function to subtract two numbers def subtract(val1, val2): return val1-val2 #Function to multiply two numbers def multiply(val1, val2): return val1*val2 #Function to divide two numbers def divide(val1, val2): return val1/val2 while ...
<reponame>tylerchen/foss-qdp-project-v4<gh_stars>0 /******************************************************************************* * Copyright (c) 2017-11-09 @author <a href="mailto:<EMAIL>"><NAME></a>. * All rights reserved. * * Contributors: * <a href="mailto:<EMAIL>"><NAME></a> - initial API and imple...
#!/bin/bash QSQLPATH=$1 SQLCPATH=$2 echo "sqlcipher is in $SQLCPATH" echo "qsqlcipher is in $QSQLPATH" echo "If either of these is not correct, press [ctrl]+[C] now and try again." echo "Otherwise, press [enter] to continue building sqlite3-cipher." read dummy cd $SQLCPATH patch -p 0 < $QSQLPATH/Makefile.in.patch p...
# %matplotlib inline import numpy as np import matplotlib.pyplot as plt import scipy.fftpack import comms_utils bandwidth = 5 tb = 1/bandwidth ts = tb*2 rect = comms_utils.pulse.Sinc(ts) rect.set_max_pulses(20) message_length = 10 oversampling_factor = 8 ak = comms_utils.ak.AK(n=message_length, levels=4) comb = comms...
#!/bin/bash git clone https://github.com/dockersamples/docker-swarm-visualizer cd docker-swarm-visualizer docker build -f Dockerfile.arm -t visualizer-arm:latest . docker service create \ --name=viz \ --publish=8080:8080/tcp \ --constraint=node.role==manager \ --mount=type=bind,src=/var/r...
<filename>controltool/src/main/java/com/mh/controltool2/serialize/json/FastjsonDataObjectSerialize.java package com.mh.controltool2.serialize.json; import com.alibaba.fastjson.JSON; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jac...
import * as DataDomain from '@redux/Stocks/Types/DataDomain'; /** * Data structure for Stock quote used in Stock Reducer */ export interface QuoteData { fetching: boolean; data: DataDomain.Quote; error?: Error; } /** * Data structure for Stock Chart used in Stock Reducer */ export interface ChartData { fe...
require 'rails_helper' RSpec.describe IpAddressMatcher do it 'matches a single IP address' do matcher = described_class.new('12.34.56.78') expect(matcher).to include('12.34.56.78') expect(matcher).not_to include('11.22.33.44') end it 'matches several IP addresses separated by commas' do matcher ...
#! /bin/sh mkdir -p /config mkdir -p /config/cache cd /sickrage if [ -f /config/config.ini ] then rm -rf /sickrage/config.ini rm -rf /sickrage/sickbeard.db rm -rf /config/sickbeard.db.v32 rm -rf /config/sickbeard.db.v33 rm -rf /config/sickbeard.db.v34 rm -rf /config/sickbeard.db.v35 rm -rf /config/sickbeard.db...
<template> <table> <thead> <tr> <th>Name</th><th>Age</th> </tr> </thead> <tbody> <tr v-for="person in persons" :key="person.name"> <td>{{ person.name }}</td> <td>{{ person.age }}</td> </tr> ...
<filename>src/ui/Clock.js<gh_stars>1-10 import Nanocomponent from 'nanocomponent' import html from 'nanohtml' class Clock extends Nanocomponent { constructor() { super() this._interval = null this.startTime = null this.handleReset = this.handleReset.bind(this) this.handleStart = this.handleStart....
#!/bin/sh TOOLSDIR=$(dirname $(realpath $0)) SOURCEFILE=$(realpath $1) SCRIPTFILE=$(realpath $2) kill_qemu() { killall -9 qemu-system-arm > /dev/null 2>&1 ;} cd $TOOLSDIR cd .. ; make -B KMAIN=$SOURCEFILE || exit 1 cd $TOOLSDIR kill_qemu ./run-qemu.sh > /dev/null 2>&1 & ./run-gdb.sh $SCRIPTFILE kill_qemu
import validator from 'is-my-json-valid'; import schema from './User.schema.json'; const __validate = validator(schema); export default class User { constructor(params) { this.id = params.id; this.key = params.key; this.email = params.email; this.name = params.name; this.imageUrl = params.imageU...
class FileCompressor { private $compression; public function __construct() { $this->compression = null; } /** * @param string $compression */ public function setCompression(string $compression): void { $this->compression = $compression; } /** * @return strin...
<reponame>maraboinavamshi/courses import os import numpy as np import pandas as pd import matplotlib.pyplot as plt ''' Read: http://pandas.pydata.org/pandas-docs/stable/api.html#api-dataframe-stats ''' def symbol_to_path(symbol, base_dir = 'data'): return os.path.join(base_dir, "{}.csv".format(str(symbol))) def d...
#!/bin/bash # Environment variables required by the AWS CLI export AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-us-west-2} export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-CHANGEME} export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-CHANGEME} # Environment variables required to identify the correct EC2 instances PROJECT=...
# Handle incrementing the docker host port for instances unless a port range is defined. DOCKER_PUBLISH= if [[ ${DOCKER_PORT_MAP_TCP_80} != NULL ]] then if grep -qE \ '^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:)?[1-9][0-9]*$' \ <<< "${DOCKER_PORT_MAP_TCP_80}" \ && grep -qE \ '^.+\.[0-9]+(\.[0-9]+)?$...
public static void main(String[] args) { int size = 10; // Create an array int[] array = new int[size]; // Generate numbers in range 0-99 Random random = new Random(); for (int i=0; i<size; i++) { array[i] = random.nextInt(100); } // Find the biggest and smallest number ...
<filename>lib/capistrano/tasks/config.rake require 'capistrano/runit' require 'capistrano/helpers/puma/template_paths' include Capistrano::DSL::BasePaths include Capistrano::DSL::RunitPaths include Capistrano::Helpers::Base include Capistrano::Helpers::Runit namespace :load do task :defaults do # Puma Configurat...
/* jshint indent: 2 */ module.exports = function (sequelize, DataTypes) { return sequelize.define('user', { id: { type: DataTypes.INTEGER(10).UNSIGNED, allowNull: false, primaryKey: true, autoIncrement: true, field: 'id', }, fbId: { type: DataTypes.STRING(255), a...
<reponame>Clunt/shqz Game.Map.XXCD = function() {}; Game.Map.XXCD.prototype = { preload: function() { this.game.load.tilemap('MAP_XXCD', 'client/data/map/xxcd/xxcd.json', null, Phaser.Tilemap.TILED_JSON); this.game.load.image('MAP_XXCD', 'client/data/map/xxcd/xxcd.jpg'); this.game.load.image('MAP_XXCD_M',...
<reponame>PongsakDev/hacktoberfest2021<gh_stars>1-10 //Difference with bubble sort, Here at any iteration of outerloop, //the array to the left of the element will be sorted func InsertionSort(numbers []int) []int{ for i :=0; i< len(numbers); i++{ for j:=0; j<i+1; j++{ //compare element present at index i with...
<gh_stars>0 // // MBECurrentRecordingSetProvider.h // Echoes // // Created by <NAME> on 04.06.2015. // Copyright (c) 2015 SO MANY APPS. All rights reserved. // #import <Foundation/Foundation.h> #import "MBERequest.h" #import "MBERecord.h" @interface MBECurrentRecordingSetProvider : NSObject @property NSMutableDi...
def optimize_array(arr,target): # Initialize the result list result = [] # Iterate over the list and find the closest # combination to the target for x in arr: if (target - x) > 0 and (target - x) in arr: result.append(x) result.append(target-x) break ...
# List all Azure Firewalls for a given resource group RESOURCE_GROUP="myresourcegroup" az resource show --id /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Network/azureFirewalls --api-version 2018-11-01
#!/bin/bash if [ -f /.root_pw_set ]; then echo "Root password already set!" exit 0 fi PASS=${ROOT_PASS:-$(pwgen -s 12 1)} _word=$( [ ${ROOT_PASS} ] && echo "preset" || echo "random" ) echo "=> Setting a ${_word} password to the root user" echo "root:$PASS" | chpasswd echo "=> Done!" touch /.root_pw_set echo "====...
#ifndef COMMUNICATION_H #define COMMUNICATION_H #include <QtCore> #include <QtWidgets> #include <QtSerialPort/QSerialPort> #include <QtSerialPort/QSerialPortInfo> #include <vector> #include <thread> #include "kfly_comm/kfly_comm.hpp" class communication : public QObject { Q_OBJECT private: QSerialPort _seri...
#!/bin/sh ############################################################################### ### FUNCTIONS ### ############################################################################### # Creates a validator for a given node # Take 1 arg the name of the node e....
#!/bin/bash if [[ "${DEPLOY:-true}" == "true" ]]; then node ./output/deployment/deploySideChainNetwork.js $@ if [[ "$?" != "0" ]]; then echo "Error while deploying side chain contracts to $ETHEREUM_NETWORK, exiting and skipping artifact management" exit 1 fi else echo "Skipping deploy, set DEPLOY=true ...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See License.txt in the project root. package com.microsoft.alm.plugin.external.commands; import com.microsoft.alm.common.utils.ArgumentHelper; import com.microsoft.alm.plugin.context.ServerContext; import com.microsoft.alm.plugin.exte...
<gh_stars>0 /****************************************************************************** * * Project: CPL - Common Portability Library * Author: <NAME>, <EMAIL> * Purpose: Progress function implementations. * ****************************************************************************** * Copyright (c) 20...
#!/bin/sh export PORT=5000 exec java -server -cp target/notepad-0.0.1-SNAPSHOT.jar:"target/dependency/*" notepad.Launcher
class ScoreBoardsController < ApplicationController # def index # @scores = ScoreBoard.all # render json: @scores # end def create @score = ScoreBoard.create(name: params[:name], score: params[:score]) @scores = ScoreBoard.all.order(score: :desc).limit(5) render json: @scores end end
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); int n, k; while (cin >> n >> k) { if (n == -1 && k == -1) break; for (int i = 0; i < k; i++) { if (n % 2 == 0) n /= 2; else n = n * 3 + 1; ...
"This is an example of HTML code This is a paragraph."
#! /bin/sh node --heap-prof --cpu-prof kubeless.js && node servelogs.js
import React from "react"; export const CustomColorInput: React.FC<InputColorProps> = (props) => { const { name, form, push, remove } = props; const [selectedColor, setSelectedColor] = React.useState(""); const handleColorChange = (e: any) => { const val = e.target.value; setSelectedColor(val); }; ...
// // Created by matthew on 23/11/2020. // #include <iostream> #include "../../../include/parser/old/Parser.h" Parser::Parser(const Tokeniser &tokeniser) : tokeniser(tokeniser) { } std::unique_ptr<ParseTree> Parser::parse(std::unique_ptr<ParseTree> &&tree) { fileIndex = tree->addFile(tokeniser.sourceFi...
package event import ( "testing" ) type TestListener struct { evchan chan Event } func (l *TestListener) HandleEventTypeOne(ev Event) { go func() { l.evchan <- ev }() } func TestEventBus(t *testing.T) { evchan := make(chan Event) bus := NewEventBus() bus.AddListener("test", &TestListener{evchan}) ev := Eve...
CHALLENGE = function () { return { init: function () { $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }) $('.js-user-name').on('blur', function (event) { event.pre...
package com.mblinn.mbfpp.oo.iterator import org.junit.runner.RunWith import org.scalatest.matchers.ShouldMatchers import org.scalatest.FunSpec import org.scalatest.junit.JUnitRunner import com.mblinn.mbfpp.oo.iterator.TheLambdaBarAndGrille._ import com.mblinn.mbfpp.oo.iterator.TheLambdaBarAndGrille.Person @RunWith(cl...
/* * Copyright 2018 WebAssembly Community Group participants * * 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...
<reponame>yann-soubeyrand/kubernetes-ingress // Copyright 2019 HAProxy Technologies LLC // // 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...
#!/bin/bash # ============================================================================== # Copyright (C) 2018-2019 Intel Corporation # # SPDX-License-Identifier: MIT # ============================================================================== set -e BASEDIR=$(dirname "$0")/../.. if [ -n ${GST_SAMPLES_DIR} ] t...
/** * Classes to rewrite Query algebra, expressions and other objects to handle variable replacement for * the prepared statement functionality. * * In most cases developers will not need to access the rewriters directly. */ package org.apache.jena.arq.querybuilder.rewriters;
<gh_stars>1-10 import { hbs } from 'ember-cli-htmlbars'; export const returnTo = (args) => { return { template: hbs` <PixReturnTo @route='profile' @shade={{shade}} /> `, context: args, }; }; returnTo.args = { shade: 'blue', }; export const returnToWithText = (args) => { return { template...
"""Classes to handle constant-time mean/stddev updates""" import numpy as np class ParallelStats: def __init__(self, stabilize=False): """Object for aggregation of stats across multiple arrays/values Parameters ---------- stabilize : bool Should a potentially more sta...
/* * Copyright (c) 2008-2019, Hazelcast, 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 required ...
import requests from typing import List class DataDogExporter: def __init__(self, api_key: str): self.api_key = api_key self.api_base_url = 'https://api.datadoghq.com/api/v1/' def _make_request(self, method: str, endpoint: str, data: dict = None): headers = { 'Content-Type'...
<gh_stars>0 function iniciador(){ var url = "data/proyects.json"; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function(){ if (xhttp.readyState ==4 && xhttp.status == 200){ //console.log(xhttp.status); //console.log(xhttp.response); var json = JSON.parse(xhttp.responseText...
<gh_stars>1-10 class RegistrationsController < Devise::RegistrationsController private def sign_up_params params.require(:user).permit(:username, :email, :password, :about, location_id: []) end def account_update_params params.require(:user).permit(:username, :email, :password, :curren...
<filename>src/app/components/activity_entry/training_result/training_result.component.ts<gh_stars>0 import 'jquery'; import { Component, AfterViewInit, OnInit, OnChanges, } from '@angular/core'; import { Router, ActivatedRoute, Params } from '@angular/router'; import { AuthService, ApiService, LoadingS...
#!/bin/bash # Relase.sh will make a new realse of k8s including hyperkube image and deployment scripts # all in aio.tar.gz set -ex export VERSION=v0.18.2 cd image && make cd .. sudo docker save wizardcxy/hyperkube:${VERSION} > hyper.tar sudo docker pull docker.io/kubernetes/pause sudo docker save docker.io/kubernete...
<gh_stars>100-1000 require 'sinatra' # Handle message status hook, # which is called whenever the message status changes post '/MessageStatus' do message_sid = params['MessageSid'] message_status = params['MessageStatus'] print "SID: #{message_sid}, Status: #{message_status}\n" response.status = 204 end
<gh_stars>1-10 #ifndef PSO_H #define PSO_H #include<vector> #include"Particle.h" #include"PSO_AlgorithmParam.h" #include <fstream> using namespace std; enum ParticleType { Default }; class PSO { private: static vector<Particle*> particles; pair<vector<float>&, float> getLocalBest(int particleIdx, int NoNeighbors); ...
<filename>open-sphere-plugins/geopackage/src/main/java/io/opensphere/geopackage/mantle/GeoPackageLayerActivationHandler.java package io.opensphere.geopackage.mantle; import java.awt.Color; import io.opensphere.core.event.EventListener; import io.opensphere.core.event.EventManager; import io.opensphere.core.geom...
const prompt = "Do you want to continue?"; const logChoice = (prompt) => { const response = prompt(prompt); console.log(`The user's choice was ${response}`); }; logChoice(prompt);
The algorithm should involve several steps. Firstly, the input data should be filtered and pre-processed to detect any anomalies. After this data pre-processing, the algorithm should build a probabilistic model using historical data, such as the amount and type of transactions, to detect suspicious patterns. The output...
package com.smart.controller; import javax.servlet.http.HttpSession; import javax.validation.Valid; import org.apache.tomcat.jni.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.valida...
#!/bin/bash cd "$(dirname "$0")" if [[ ! -d esp-idf ]]; then git clone -b v4.0 --recursive https://github.com/espressif/esp-idf.git fi source esp-idf/export.sh cd esp32-ogn-tracker cd utils && make read_log && make serial_dump && cd .. function disable { opt=$1 sed -i "s/^\s*#define\s*$opt\s/\/\/#defin...
package com.carlos.popularmovies.themoviedb.api.client; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * Created by Carlos on 22/07/2016. */ public class Constants { public static final String API_KEY="fd743d7e561dafce3e95178a53...
#!/bin/bash CLUSTER_API=${CLUSTER_API:-cluster-manager-api.cnct.io} CLUSTER_API_PORT=${CLUSTER_API_PORT:-443} CLUSTER_NAME=${CLUSTER_NAME:-vmware-test-$(date +%s)} [[ -n $DEBUG ]] && set -o xtrace set -o errexit set -o nounset set -o pipefail main() { curl -X GET \ "https://${CLUSTER_API}:${CLUSTER_API_PORT}/a...
TERMUX_PKG_HOMEPAGE=https://github.com/google/protobuf TERMUX_PKG_DESCRIPTION="Protocol buffers C++ library" TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_VERSION=3.11.4 TERMUX_PKG_SRCURL=https://github.com/google/protobuf/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=a79d19dcdf9139fa4b81206e318e33d245c4c9da1f...
#!/bin/bash SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ENVPATH=$(echo $SCRIPT_PATH"/.direnv/bin/activate") CLIENT_PATH=$(echo $SCRIPT_PATH"/app/client") if [[ ! -f $ENVPATH ]] then echo "Creating enviroment" python -m venv $SCRIPT_PATH"/.direnv" fi echo "Activating enviroment" source $ENVPATH ...
<gh_stars>0 package ru.job4j.analysis; import java.util.HashMap; import java.util.List; /** * Analysis - class for analysis collections modifications. * @author <NAME> (<EMAIL>) * @version $Id$ * @since 0.1 */ public class Analysis { /** * The method analysis list modifications from the previous to the ...
#!/usr/bin/env bash if [[ "$#" -lt 1 || "$1" = "--help" ]]; then echo "Syntax: gentpl.sh <number of services>" echo "" exit fi NB_SERVICES="$1" NAMESPACE="default" LAST_ARG="" for arg in "$@" do if [[ "$LAST_ARG" = "-n" ]]; then NAMESPACE="$arg" LAST_ARG="" else LAST_ARG="$arg" ...
<gh_stars>0 import { $, ElementFinder } from 'protractor'; export class ProductAddedModalPage { private modal: ElementFinder; constructor () { this.modal = $('[style*="display: block;"] .button-container > a'); } public async open(): Promise<void> { await this.modal.click(); } }
require('mocha-sinon')() const assert = require('assert') const { resolve } = require('path') const Connector = require('../src/connector') const { testProjectPath } = require('../../../test/support/paths') const testAdapterPath = resolve(__dirname, 'fixtures', 'test-adapter') const noopAdapterPath = resolve(__dirna...
import Cookies from 'js-cookie'; export default function({ store, redirect, route, $axios }) { $axios.onRequest(config => { store.commit('common/loading', true); const token = Cookies.get('DEMOAPP-XSRF-TOKEN'); if (token) { config.headers.common['DEMOAPP-XSRF-TOKEN'] = token; } }); $axios....
<reponame>TCC-Aquaponia/sistema-aguaponia const { Broker, Investment } = require('../../src/models').models; describe('Broker', () => { describe('attributes', () => { it('should have name', async () => { const broker = await Broker.create({ name: 'Foo' }); expect(broker.get('name')).toEqual('Foo'); ...
// import { ethers } from "ethers"; export interface MetaMaskProvider extends Object { isMetaMask: boolean; isConnected: () => boolean; request: (request: { method: string; params?: any[] | undefined; }) => Promise<any>; on: (event: string, callback: (param: any) => void) => void; }
#include <iostream> // Assume MeshId is a typedef or class representing the identifier of a 3D mesh typedef int MeshId; class Instance { private: bool is_static; MeshId mesh_id; public: Instance(MeshId id, bool isStatic) : mesh_id(id), is_static(isStatic) {} bool isStatic() const { return is...
<reponame>krrrr38/mackerel-client-scala package com.krrrr38.mackerel4s package api import dispatch._ import com.krrrr38.mackerel4s.model.Types.{ ApiKey, Path } trait MackerelClientBase { val setting: ClientSetting val apiKey: ApiKey val userAgent: String val baseRequest: Req = Req(_ .addHeader(sett...
<gh_stars>100-1000 package com.xyoye.common_component.weight.swipe_menu; /** * Created by guanaj on 2017/6/6. * * Modified by xyoye on 2020/6/24. */ public enum SwipeState { SWIPE_LEFT, SWIPE_RIGHT, SWIPE_TOP, SWIPE_BOTTOM, SWIPE_CLOSE, }
package io.github.vampirestudios.obsidian.addon_modules; import io.github.vampirestudios.obsidian.Obsidian; import io.github.vampirestudios.obsidian.api.obsidian.AddonModule; import io.github.vampirestudios.obsidian.configPack.ObsidianAddon; import io.github.vampirestudios.obsidian.minecraft.obsidian.*; import io.gith...
<reponame>yugasun/serveless-egg-ssr-boilerplate<gh_stars>1-10 'use strict'; // https://yuque.com/easy-team/egg-react module.exports = { devtool: 'source-map', entry: { blog: 'app/web/page/blog/index.js', blogx: 'app/web/page/blog/index.jsx', list: 'app/web/page/list/index.jsx', detail: 'app/web/page...