text
stringlengths
1
1.05M
import gql from "graphql-tag"; export default gql(` mutation( $id: ID! $customerId: String! $partnerId: String $cost: Int! $when: String! $discount: Int! $services: String! ) { createOrder(input: { id: $id customerId: $customerId partnerId: $partnerId cost: $cost when: $when ...
<reponame>abin1525/rose-edg<gh_stars>1-10 #include "ai_tool_runtime.h" int * _loop_counters; int _loop_count; char* _ofilename; static void allocAndCopyStr(char** dest, const char* src) { *dest = (char*) malloc((strlen(src)+1)*sizeof(char)); strcpy (*dest, src); assert (strlen(src) == strlen (*dest)); } void a...
import 'babel-polyfill' import configureMockStore from 'redux-mock-store' import thunk from 'redux-thunk' import { push } from 'react-router-redux' import { navigateTo } from 'actions/navigation' const mockStore = configureMockStore([thunk]) describe('action navigate', () => { let store beforeEach(() => { st...
#!/bin/bash # | # watch kubectl get gitrepository -A | # | # --------------------------------------+ # | # watch kubectl get kustomizastion -A | watch kubectl get pods -A # ...
<filename>kernel/modules/gpu/mali450/kernel_mode/driver/src/devicedrv/mali/platform/arm/arm.c /* * Copyright (C) 2010, 2012-2015 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the GNU General Public License version 2 * as published by the Free Software...
#!/bin/bash set -euo pipefail function contains() { local value=$1 shift local array="$@" echo "${array[*]}" for element in ${array[@]}; do if [ "$element" = "$value" ]; then return 0 fi done return 1 } function init_manifest_file() { mkdir -p /tmp/conta...
/*\ title: $:/plugins/sq/streams/streams-edit type: application/javascript module-type: widget-subclass \*/ exports.baseClass = "edit"; exports.name = "streams-edit"; exports.constructor = function(parseTreeNode,options) { this.initialise(parseTreeNode,options); } exports.prototype = {}; exports.prototype.getEdit...
echo "### CONTROLLER LOCAL INSTALL SCRIPT" INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" \ http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip) K8S_VERSION=1.10.6 echo " # INTERNAL_IP=${INTERNAL_IP}" echo " # K8S_VERSION=${K8S_VERSION}" echo " # Move certificates and config t...
<filename>test/unit/lib/path_test.js<gh_stars>1-10 /** * Copyright 2014 Skytap Inc. * * 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 ...
<reponame>AnnaPalna/basic-js-ds const { NotImplementedError } = require('../extensions/index.js'); /** * Given a singly linked list of integers l and an integer k, * remove all elements from list l that have a value equal to k. * * @param {List} l * @param {Number} k * @return {List} * * @example * For l = [3...
import logging import time from functools import wraps LOGGER = logging.getLogger(__name__) def log_execution_time(func): @wraps(func) def wrapper(*args, **kwargs): start_time = time.time() result = func(*args, **kwargs) end_time = time.time() execution_time_ms = (end_time - st...
<reponame>jproudlo/PyModel # pma.py --maxTransitions 100 synchronous msocket # 77 states, 100 transitions, 1 accepting states, 0 unsafe states, 0 finished and 0 deadend states # actions here are just labels, but must be symbols with __name__ attribute def send_return(): pass def send_call(): pass def recv_call(): pa...
import React from 'react' import { rgba } from 'polished' import styled from 'styled-components' import { Container, Row, Col } from 'react-bootstrap' import { Section, Title, Text, Span, Box } from '../../components/Core' import ContactForm from '../../components/ContactForm' import { device } from '../../utils' con...
SELECT TOP 10 * FROM Customers ORDER BY birth_date ASC;
(defn reverse-string [s] (apply str (reverse (seq s))))
package main import ( "fmt" "reflect" "testing" ) func assertErrorIsNil(t *testing.T, err error) { t.Helper() if err != nil { t.Errorf("got an error: %v", err) } } func assertIntListIsEqual(t *testing.T, got, want []int) { t.Helper() if !reflect.DeepEqual(got, want) { t.Errorf("got %v want %v", got, want...
<filename>Documentation/_permute_8cpp.js var _permute_8cpp = [ [ "Permute", "_permute_8cpp.xhtml#af3c74017185773dd61d8ca6662d65d43", null ], [ "Permuted", "_permute_8cpp.xhtml#abeaf4f6785039866fd075f4569ba8e84", null ], [ "Permuted", "_permute_8cpp.xhtml#a2ba6f6f40c7382b61b00ac02f961ba22", null ] ];
#!/usr/bin/env bash set -e echo echo "ANALYZE QUERY PLAN - GET STREAM MESSAGES CORRELATED" echo "===================================================" echo "- Write 3 messages to an entity stream" echo "- Retrieve a batch of messages from the stream matching the correlation category" echo source test/_controls.sh co...
def generate_unique_id(arr): # create an empty dictionary ids = {} # id = 0 # loop through the list and generate unique ids for item in arr: if item not in ids: ids[item] = id id += 1 return ids if __name__ == '__main__': arr = [1, 2, 3] print(generat...
def spam(divideBy): try: return 42 / divideBy except ZeroDivisionError: print('Error: Invalid argument.') print(spam(2)) print(spam(12)) print(spam(0))
<gh_stars>0 import { IsNotEmpty, IsString, MaxLength, Min, MinLength } from 'class-validator'; import { ObjectType, Field, ID, InputType, PartialType } from '@nestjs/graphql'; @ObjectType() export class DeveloperType { @Field(type => ID, { nullable: true }) _id?: string; @Field() name: string; @Field() ...
/* global browser */ // TEMP DEV let mockUrlToCheck = 'https://mockurl.example.com/a-path?fake-query=sure' let mockAssets = [ { fileUrl: 'bingbong.com.js', assetType: 'js', forPatch: 'bingbong.com', }, { fileUrl: 'wimwam.flam,bingbong.com,hiphop.stop,bingobango.bongo,hothere.stranger.css', assetType: 'js'...
#!/bin/bash unamestr=$(uname) if [[ "$unamestr" == "Darwin" ]]; then LIBRARY_NAME_SUFFIX=dylib else LIBRARY_NAME_SUFFIX=dll fi # make sure that we are under project folder mkdir -p build pushd build
<gh_stars>1-10 require 'etengine/scenario_migration' class HouseholdBatteryVolume < ActiveRecord::Migration[5.2] include ETEngine::ScenarioMigration P2P_KEY = "households_flexibility_p2p_electricity_market_penetration" # old volume divided by new volume ADJUSTMENT_FACTOR = 0.0198 / 0.0097 def up migrate...
#!/bin/bash set -ex mkdir build cd build cmake -G "Unix Makefiles" \ -DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DENABLE_TESTS=OFF \ -DCMAKE_LIBRARY_PATH="${PREFIX}/lib" \ -DCMAKE_INCLUDE_PATH="${PREFIX}/include" \ .. # CircleCI offers two cores....
def sort_ascending(lst): for i in range(len(lst)-1): min_index = i for j in range(i+1, len(lst)): if lst[j] < lst[min_index]: min_index = j lst[i], lst[min_index] = lst[min_index], lst[i] return lst
import Vue from 'vue' import moxios from 'moxios' import * as sinon from 'sinon' import { fn as momentProto } from 'moment' import New from '@/components/App/Sample/New' import VueRouter from 'vue-router' import { HTTP } from '@/utils/http-common' const sandbox = sinon.sandbox.create() const router = new VueRouter()...
$(document).ready(function() { $("h4#item1").click(function() { $("p.class-p1").toggle(); }); $("h4#item2").click(function() { $("p.class-p2").toggle(); }); $("h4#item3").click(function() { $("p.class-p3").toggle(); }); $("h4#item4").click(function() { $("p.class-p4").toggle(); }); $("...
<filename>src/app/components/fonctionnalite/fonctionnalite.component.spec.ts<gh_stars>0 import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { FonctionnaliteComponent } from './fonctionnalite.component'; describe('FonctionnaliteComponent', () => { let component: FonctionnaliteComponent; ...
package tree.declarations; public class TDeclarationSAD extends TDeclaration { public TDeclarationSAD(TDeclarationSAD node) { super(node); } public TStaticAssertDeclaration getStaticAssertDeclaration() { return (TStaticAssertDeclaration) getChild(0); } public TDeclarationSAD(TStaticAssertDeclaration sta...
for row = 0 to row < array.length for col = 0 to col < array.length newMatrix[row, col] = array[col, array.length - row - 1]
import React, { memo } from 'react'; // Assets import logo from 'assets/img/logo.png'; // Helpers import { useSessionContext } from 'shared/view/contexts'; import { clickOnEnter } from './helpers'; // Hooks // Styles import { Container, LobbyTitle, LoggedText, LogoContainer } from './styles'; const Navbar: React....
#!/usr/bin/env bash # Copyright 2016 The Kubernetes 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
/** * Copyright (c) 2010 MongoDB, Inc. <http://mongodb.com> * Copyright (c) 2009, 2010 Novus Partners, Inc. <http://novus.com> * * 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...
<reponame>cugg/BusinessParameters package be.kwakeroni.scratch; import be.kwakeroni.scratch.env.Environment; import be.kwakeroni.scratch.env.es.ElasticSearchTestData; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; import org.junit...
<gh_stars>0 const names = [ "Gerard", "Tania", "Richard", "Antonio", "Joe" ]; const getRandomName = () => { const name = names[Math.floor(Math.random() * names.length)]; //console.log('Welcome $(message)'); console.log(`Welcome ${name}`); }; // Export function module.exports = { getRan...
import { metrics, SignificanceLevel } from "../../src/analysis"; import { Document, PackageBenchmarkSummary, config } from "../../src/common"; describe("analysis", () => { describe("metrics", () => { test("proportionalTo significance", () => { const significance1 = metrics.typeCount.getSignificance( ...
<filename>elasta-composer/src/main/java/elasta/composer/message/handlers/builder/impl/DeleteAllMessageHandlerBuilderImpl.java package elasta.composer.message.handlers.builder.impl; import elasta.composer.converter.FlowToJsonArrayMessageHandlerConverter; import elasta.composer.flow.holder.DeleteAllFlowHolder; import el...
/*------------------------------------------------------------------------- * * pgtime.h * PostgreSQL internal timezone library * * Portions Copyright (c) 1996-2017, PostgreSQL Global Development PGGroup * * IDENTIFICATION * src/include/pgtime.h * *---------------------------------------------------------...
<gh_stars>0 import React, { useContext, useEffect } from 'react' import { View, Text, StyleSheet, Button } from 'react-native' import { AppContext } from '../provider/AppProvider' import DeckList from '../components/DeckList' export default function MyDecksScreen(props) { useEffect(() => { }, []) cons...
package com.efei.proxy.channelHandler; import com.efei.proxy.common.Constant; import com.efei.proxy.common.bean.ProxyTcpProtocolBean; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.Cha...
<reponame>lsm5/crio-deb /* Copyright 2016 The Kubernetes 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law o...
<filename>gcs_inspector/file_processor.py import pp, requests import os, os.path, pathlib, errno, json from gcs_inspector.custom_logging import print_log # File Read/Write def is_path_exist(filepath): return os.path.isfile(filepath) def mkdir_p(path): try: os.makedirs(path) except OSError as exc: ...
#!/bin/sh -x # Create Oracle user and groups groupadd -g 54321 oinstall groupadd -g 54322 dba groupadd -g 54323 oper useradd -m -c "Oracle" -u 54321 -g oinstall -G dba,oper oracle # Setup Oracle environment settings for user oracle cat /vagrant/oracle/environment.sh >> /home/oracle/.bashrc # Add vagrant user to Orac...
#!/usr/bin/env bash # # 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 "Lice...
// Get global library/lang parameters from the script. var library; var lang; var city; var consortium; var largeSchedules = false; // Get parameters from iframe url. function getParamValue(paramName) { var url = window.location.search.substring(1); //get rid of "?" in querystring var qArray = url.split('&'); /...
#!/bin/bash test_non_existing_command() { echo "stuff on stdout" echo "stuff on stderr" 1>&2 return 96 }
<reponame>thetruefixit2/Sky<filename>app/src/main/java/com/dabe/skyapp/utils/RandomUtils.java<gh_stars>0 package com.dabe.skyapp.utils; import java.util.Random; /** * Created by <NAME> on 28.01.2017 0:27. * Project: SkyApp; Skype: pandamoni1 */ public class RandomUtils { public static int getMockRandomDelay(...
<filename>api/index.js 'use strict' exports.policies = require('./policies')
<gh_stars>1-10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.socialStumbleupon = void 0; var socialStumbleupon = { "viewBox": "0 0 512 512", "children": [{ "name": "path", "attribs": { "d": "M256,0C114.609,0,0,114.609,0,256s114.609,256,256,256s256-114.609,256-...
#!/bin/bash set -o errexit set -o nounset set -o pipefail source $(dirname $0)/lib/utils.sh # UPGRADE_MAP maps gravity version -> space separated list of linux distros to upgrade from declare -A UPGRADE_MAP # Use a fixed tag until we cut our first non-pre-release, as recommended_upgrade_tag skips pre-releases # UPGRA...
<reponame>ansell/pipelines package org.gbif.pipelines.transforms.metadata; import java.time.Instant; import java.util.Optional; import java.util.Set; import org.gbif.pipelines.core.Interpretation; import org.gbif.pipelines.core.interpreters.metadata.MetadataInterpreter; import org.gbif.pipelines.io.avro.ExtendedRecor...
<gh_stars>1-10 from django.contrib import admin from library.models import Author, Book, Genre, Review admin.site.register(Author) admin.site.register(Book) admin.site.register(Genre) admin.site.register(Review)
def sum_of_multiples(limit): sum = 0 for i in range(limit): if (i % 3 == 0 or i % 5 == 0): sum += i return sum print(sum_of_multiples(1000))
import nextConnect from 'next-connect'; import middleware from '../../../middlewares/middleware'; const handler = nextConnect(); handler.use(middleware); handler.post(async (req, res) => { const id = req.body.id if (!id) { res.status(400).send('Missing field(s)'); return; } ...
package main import ( "fmt" "os" "strings" "github.com/mbauhardt/moneyflow/parse" "github.com/mbauhardt/moneyflow/persistence" ) func main() { env, err := persistence.Env() if err != nil { panic(err) } argsWithoutProg := os.Args[1:] // new db doc, dberr := persistence.NewDatabaseDocument(env) if dber...
/* * Copyright 2015 OpenCB * * 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 wr...
<reponame>ac-dc87/ruby-plugin require 'ruby/plugin/integrations/prism_edc/request' require 'json' RSpec.describe Ruby::Plugin::Integrations::PrismEdc::Request do let(:request) { nil } before do # Simulating mapping not provided $config = { mapping: { 'data' => {} } } Ruby::Plugi...
#!/bin/bash # Notarize dmg with Apple xcrun altool --notarize-app -t osx -f Tippy.dmg --primary-bundle-id "com.nervos.tippy" -u "$APPLE_ID" -p "$APPLE_ID_PASSWORD" --output-format xml | tee notarize_result request_id="$(cat notarize_result | grep -A1 "RequestUUID" | sed -n 's/\s*<string>\([^<]*\)<\/string>/\1/p' | xa...
#!/usr/bin/env bash # create directories if they don't exists with user privileges. # otherwise docker might create them with root privileges DIRS="$HOME/.composer" DIRS="$DIRS $HOME/.npm" DIRS="$DIRS $PWD/vendor/shopware/platform/src/Administration/Resources/app/administration/test/e2e" DIRS="$DIRS $PWD/vendor/shopw...
// // Animation Viewer // // // Copyright (C) 2016 <NAME> // #pragma once #include "documentapi.h" #include "animationview.h" #include "animationproperties.h" #include <QMainWindow> #include <QToolBar> #include <QLabel> #include <QSlider> //-------------------------- AnimationViewer --------------------------------...
#/bin/bash kubectl apply -f k8s/deployment.yaml && \ kubectl apply -f k8s/service.yaml
<reponame>minuk8932/Algorithm_BaekJoon package minimumcost_spanning_tree; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; /** * * @author exponential-e * 백준 5818번: SPIJUNI * * @see https://www.acmicpc.net/problem/5818 * */ public class Boj5818 { private static int[] pa...
<filename>Decorator/src/Decorator2.java<gh_stars>0 /** * 具体装饰类2 */ public class Decorator2 extends AbstractDecorator{ public Decorator2(Component component){ super(component); } @Override public void show() { System.out.println("装饰类 2"); super.show(); } }
<filename>open-sphere-base/core/src/main/java/io/opensphere/core/cache/jdbc/EnsureIndicesTask.java<gh_stars>10-100 package io.opensphere.core.cache.jdbc; import java.sql.Connection; import java.util.Collection; import java.util.Collections; import java.util.List; import io.opensphere.core.cache.CacheException;...
public class BreastRadiologyDocument { public string EncounterReference { get; set; } public string SubjectReference { get; set; } } public class ClinicalImpression { public string Encounter { get; set; } public string Subject { get; set; } } public class ClinicalImpressionBase { private BreastRad...
public static int getRandomNumber(){ // create instance of Random class Random rand = new Random(); // Generate random integers in range 0 to 10 int rand_int = rand.nextInt(10) + 1; return rand_int; }
<filename>app/src/main/java/com/h5190067/mahmut_mirza_kutlu_final/adaptor/GolfAdaptor.java package com.h5190067.mahmut_mirza_kutlu_final.adaptor; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import and...
#!/bin/bash set -e root=$(dirname "${BASH_SOURCE[0]}") # shellcheck disable=SC1091 source .env.local bash "$root/redeploy-dev-resources.sh" dlv --listen=:2345 --headless=true --api-version=2 debug main.go -- --zap-devel=true
<filename>lib/speakout/survey.rb module Speakout class Survey def initialize(api, id = nil) @api = api @id = id end def attributes if @id response, status = @api.get("surveys/#{@id}") return response else nil end end def update(attributes) ...
#!/bin/bash #MSUB -A p20519 #MSUB -l walltime=24:00:00 #MSUB -l nodes=1:ppn=1 #MSUB -M jiawu@u.northwestern.edu #MSUB -j oe #MSUB -o /projects/p20519/jia_output/Roller_error.txt #MSUB -m bae #MSUB -q normal #MSUB -N RF_window_scan_janes #MSUB -V nwindows=${MOAB_JOBARRAYINDEX} workon seqgen module load python/anaconda...
#!/usr/bin/env bash # # OpenVPN helper to add DHCP information into systemd-resolved via DBus. # Copyright (C) 2016, Jonathan Wright <jon@than.io> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundatio...
package net.b07z.sepia.server.teach.server; import static spark.Spark.get; import static spark.Spark.halt; import static spark.Spark.port; import static spark.Spark.post; import static spark.Spark.secure; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java...
import { Component } from '@angular/core'; import { connectState, ConnectState } from 'src'; import { interval } from 'rxjs'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) @ConnectState() export class AppComponent { constructor() {} state = co...
import '@brightspace-ui-labs/grade-result/d2l-grade-result.js'; import './consistent-evaluation-right-panel-block'; import { Grade, GradeType } from '@brightspace-ui-labs/grade-result/src/controller/Grade'; import { html, LitElement } from 'lit-element'; import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js...
using System; using System.Collections.Generic; namespace UserAclDesc { public class Helper { private Dictionary<string, HashSet<string>> rolePermissions; public Helper() { rolePermissions = new Dictionary<string, HashSet<string>>(); } public void AddRole(s...
<reponame>lacendarko/bluetooth package bluetooth import ( "errors" "time" "github.com/godbus/dbus/v5" ) var ( errScanning = errors.New("bluetooth: a scan is already in progress") errNotScanning = errors.New("bluetooth: there is no scan in progress") errAdvertisementPacketTooBig =...
#!/bin/bash # ========== Experiment Seq. Idx. 1130 / 56.3.1 / N. 56/2/1 - _S=56.3.1 D1_N=56 a=1 b=-1 c=-1 d=-1 e=1 f=1 D3_N=2 g=-1 h=1 i=-1 D4_N=1 j=1 ========== set -u # Prints header echo -e '\n\n========== Experiment Seq. Idx. 1130 / 56.3.1 / N. 56/2/1 - _S=56.3.1 D1_N=56 a=1 b=-1 c=-1 d=-1 e=1 f=1 D3_N=2 g=-1 h=1...
#!/bin/bash set -euo pipefail DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" $DIR/drop-tables.js $DIR/create-tables.js $DIR/add-test-data.js
#!/usr/bin/env bash set -e set -x CURRENT_BRANCH="master" function split() { SHA1=`./bin/splitsh-lite --prefix=$1` git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f } function remote() { git remote add $1 $2 || true } git pull origin $CURRENT_BRANCH remote amqp git@github.com:hyperf-cloud/amqp.git rem...
<filename>lib/util/mxEventObject.d.ts declare module 'mxgraph' { class mxEventObject { constructor(name: string, ...args: any[]); /** * Variable: name * * Holds the name. */ name: string; /** * Variable: properties * * Holds the properties as an associative array. ...
# ---------------------------------------------------------------------------- # # Package : gcsio # Version : master # Source repo : https://github.com/GoogleCloudDataproc/hadoop-connectors # Tested on : UBI: 8.5 # Language : Java # Travis-Check : True # Script License: Apache License 2.0 # Mai...
from mesa import Model, Agent from mesa.time import SimultaneousActivation from mesa.space import SingleGrid from mesa.datacollection import DataCollector class VehicleAgent(Agent): """ Vehicle agent """ def __init__(self, pos, model, max_speed): """ Create a new vehicle agent. ...
#!/usr/bin/env bashio set -e DIRSFIRST=$(bashio::config 'dirsfirst') ENFORCE_BASEPATH=$(bashio::config 'enforce_basepath') IGNORE_PATTERN="$(bashio::jq "/data/options.json" ".ignore_pattern")" WAIT_PIDS=() # Setup and run Frontend sed -i "s/%%PORT%%/8080/g" /etc/nginx/nginx-ingress.conf sed -i "s/%%PORT_INGRESS%%/809...
package com.google.sps.data; /** A message to the comment section. */ public final class Message{ private final long id; private final String content; private final long timestamp; private final String userEmail; /** * @param id datastore-generated unique id for this comment. * @param conte...
(defn random-string [length] (apply str (repeatedly length #(rand-int 36 (char (if (> % 36) (int (+ % 87)) (+ % 48))))))) random-string 8
<filename>server/routes/projects/publish.js "use strict"; var request = require("request"); var utils = require("../utils"); var HttpError = require("../../lib/http-error"); module.exports = function(config, req, res, next) { var project = req.project; project.description = req.body.description; // Uncomment t...
package com.testvagrant.ekam.reports.interceptors; import com.google.inject.Inject; import com.testvagrant.ekam.commons.Toggles; import com.testvagrant.ekam.commons.interceptors.InvocationInterceptor; import com.testvagrant.ekam.reports.annotations.Step; import org.aopalliance.intercept.MethodInterceptor; import org.a...
<gh_stars>1-10 /* * HMPPS Offender Assessment API * OASys Data API. * * OpenAPI spec version: 2020-09-02 * Contact: <EMAIL> * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.15 * * Do not edit t...
<filename>src/api/index.js import { version } from '../../package.json'; import { Router } from 'express'; import tweets from './tweets'; import config from '../config.json'; import { OAuth } from 'oauth'; const REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'; const ACCESS_TOKEN_URL = 'https://api.tw...
<gh_stars>1-10 /* * Copyright (c) 2018 Ahome' Innovation Technologies. 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/LICEN...
<gh_stars>0 import {Component, OnInit} from "@angular/core"; import {ComplaintService} from "../../../@core/services/complaint.service"; import {ActivatedRoute} from "@angular/router"; import {Complaint} from "../../../@core/model/complaint"; @Component({ selector: 'complaint-view', styleUrls: ['complaint-view.com...
import parse, { testables } from "../../engine/parser" import tokenize from "../../engine/lexer" import { isDuplicateIdentifier } from "../../engine/parser/identifiers" const { parseAttributes, parseRelBody, parseEntity, parseWeakEntity, parseRel, parseIdenRel, } = testables describe("tests for parser", (...
<reponame>jonaslu/thatswhatsup package getchange.version2; import java.util.ArrayList; import java.util.List; public class GetChange2 { public static int getNumberOfWays(List<Integer> denominators, int sum) { if (denominators.isEmpty()) { return 0; } if (sum < 0) { return 0; } if (sum == 0) { r...
#!/bin/sh test_description='git archive attribute tests' . ./test-lib.sh SUBSTFORMAT='%H (%h)%n' test_expect_exists() { test_expect_${2:-success} " $1 exists" "test -e $1" } test_expect_missing() { test_expect_${2:-success} " $1 does not exist" "test ! -e $1" } extract_tar_to_dir () { (mkdir "$1" && cd "$1" &&...
<filename>src/main/java/io/prestok8s/baseapp/AppModule.java package io.prestok8s.baseapp; import com.google.inject.AbstractModule; import io.dropwizard.Configuration; import lombok.Getter; @Getter public abstract class AppModule<T extends Configuration, E> extends AbstractModule { private final T configuration; ...
import {COALITIONS_GETTED} from "../actions/coalitions"; const initialState = { coalitions: [] }; const coalitions = (state = initialState, {type, payload}) => { switch (type) { case COALITIONS_GETTED: return { ...state, coalitions: [...Object.values(payload)] }; ...
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" # This protects against multiple targets copying the same framework dependency at the same time....
import { NdiControllerConnection } from '../NdiController/ndiControllerClient' import { CompanionActionEvent, CompanionActions, CompanionAction } from '../../../../instance_skel_types' export enum ActionId { SetCrossPoint = 'set_crosspoint', } type CompanionActionWithCallback = CompanionAction & Required<Pick<Compan...
(function() { 'use strict'; angular .module('app.usuario') .factory('UsuarioModel', usuarioModel); usuarioModel.$inject = ['UsuarioService', 'Notificacao']; function usuarioModel(UsuarioService, Notificacao) { var service = { create : create, find : find, findAll : findAll,...