text
stringlengths
1
1.05M
#! /bin/bash #SBATCH -o /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_03_scalability_rexi_fd_high_res/run_rexi_fd_par_m0512_t001_n0128_r3220_a1.txt ###SBATCH -e /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_...
#include <stdlib.h> #include <string.h> #include <math.h> #include "triangle.h" triangle * triangle_new(double * p_x0, double * p_x1, double * p_x2) { triangle * p; p = (triangle *) malloc(sizeof(triangle)); /* NULL pointer check */ memcpy(p->x0, p_x0, sizeof(double) * 2); memcpy(p->x1, p_x1, sizeof(doubl...
#! /bin/bash -e # Copyright 2019-Present Couchbase, Inc. # # Use of this software is governed by the Business Source License included in # the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that # file, in accordance with the Business Source License, use of this software # will be governed by the...
package db import "example/users/entities" // RoleRepository handles storage of roles type RoleRepository interface { Persist(roles ...entities.Role) error Find(ids ...entities.RoleID) ([]entities.Role, error) All() ([]entities.Role, error) } func NewMemoryRoleRepository() *MemoryRoleRepository { r := &MemoryRol...
#!/bin/bash dieharder -d 4 -g 2 -S 1740814690
# -*- coding: utf-8 -*- """ Azure Resource Manager (ARM) Container Instance Group State Module .. versionadded:: 3.0.0 .. versionchanged:: 4.0.0 :maintainer: <<EMAIL>> :configuration: This module requires Azure Resource Manager credentials to be passed via acct. Note that the authentication parameters are case s...
int choose(int n, int k) { if (k == 0 || k == n) return 1; return choose(n - 1, k - 1) + choose(n - 1, k); }
#!/bin/bash # Execute system setup hook /systemsetup.sh # If we are running docker natively, we want to create a user in the container # with the same UID and GID as the user on the host machine, so that any files # created are owned by that user. Without this they are all owned by root. if [[ -n $BUILDER_UID ]] && [...
#!/bin/bash # Copyright 2016 The TensorFlow Authors. 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 require...
load ../test_setup.bash teardown_file() { delete_package "test-remote-build-python" } @test "deploy python projects with remote build" { run $NIM project deploy $BATS_TEST_DIRNAME --remote-build assert_success assert_line "Submitted action 'default' for remote building and deployment in runtime python:default" }...
date=$(date -d '2 day ago' "+%Y%m%d") echo $date REGION_NAME=$1 if [ "$1" = "" ] then echo "usage: ./multi_measure_2.sh [REGION_NAME]" exit 1 fi start_time=`date +%s` #mkdir ingress #mkdir egress mkdir ingress_${REGION_NAME} mkdir egress_${REGION_NAME} mkdir ingress_${REGION_NAME}_${date} mkdir egress_${RE...
<gh_stars>0 import numpy as np import pandas as pd import pytest from sklearn.linear_model import LogisticRegression from sklearn.base import BaseEstimator from poniard import PoniardClassifier @pytest.mark.parametrize( "X,preprocess,scaler,numeric_imputer,include_preprocessor", [ ( pd.Da...
package com.atguigu.web.config; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.FilterType; import org.springframework.stereotype.Controller; import java.lang.reflect.Method; /** * SpringMVC只扫描controller组件,可以不指定父容器类,让MVC扫所有。@Component+@RequestMapping就生效了 ...
<filename>node_modules/@medusajs/medusa/dist/services/fulfillment-provider.d.ts export default FulfillmentProviderService; /** * Helps retrive fulfillment providers */ declare class FulfillmentProviderService { constructor(container: any); /** @private {logger} */ private container_; registerInstalled...
<filename>Modules/Detection/RoadExtraction/include/otbBreakAngularPathListFilter.hxx /* * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may ...
const DrawCard = require('../../../drawcard.js'); class WolvesOfTheNorth extends DrawCard { setupCardAbilities() { this.reaction({ when: { onBypassedByStealth: event => event.source === this }, handler: context => { let target = context.ev...
import React, {PropTypes} from 'react'; import { observer } from 'mobx-react'; import styles from './index.less'; function Table({dataSource, columns}) { const createThead = () => { return columns.map((item) => { return (<th key={item.key} className={styles['table-th']} width={item.width ? item.width : 'au...
import { Component, Inject, OnInit } from '@angular/core'; import { Validators } from '@angular/forms'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; import { empty, Observable } from 'rxjs'; import { GendersService } from '../../../../shared/genders.service'; import { GovernoratesService } from '....
# # The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause # # This file is part of MinGW-W64(mingw-builds: https://github.com/niXman/mingw-builds) project. # Copyright (c) 2011-2021 by niXman (i dotty nixman doggy gmail dotty com) # Copyright (c) 2012-2015 by Alexpux (alexpux doggy gmail dotty com)...
#include <iostream> #include <string> int main() { char str1[32], str2[32]; std::cout << "Enter a string: "; std::cin >> str1; std::cout << "Enter another string: "; std::cin >> str2; if (strcmp(str1, str2) == 0) { std::cout << "The strings are equal!" << std::endl; } el...
import logging import os class DirectoryManager: def __init__(self): self.logger = logging.getLogger(__name__) self.pidPathesVars = [] # Assume this list is populated elsewhere def fillDirValues(self): for pidVar in self.pidPathesVars: try: # Populate the d...
export RAILS_ENV="development" alias b="bundle" alias be="bundle exec" alias fs="clear && foreman start" export PATH=$HOME/.rbenv/bin:$PATH eval "$(rbenv init -)"
// SPDX-License-Identifier: Apache-2.0 package nco import breeze.math.Complex import chisel3._ import dsptools.numbers._ import dsptools.numbers.implicits._ import org.scalatest.{FlatSpec, Matchers} import scala.io.Source import dsptools.RoundHalfUp class NCOStreamingPINCandPOFFSpec extends FlatSpec with Matchers { ...
def rearrangeArray(arr): # Initialize left and right indexes left, right = 0, len(arr) - 1 while left < right: # Increment left index while we see 0 at left while (arr[left] % 2 == 0 and left < right): left += 1 # Decrement right index while we see 1 at right while (arr[right] % 2 == 1 and...
<reponame>svegon/AutoItemSwitch package net.autoitemswitch.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.At.Shift; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered....
<reponame>usa-usa-usa-usa/runelite<filename>runelite-client/src/main/java/net/runelite/client/plugins/pyramidplunder/PyramidPlunderConfig.java /* * Copyright (c) 2020 Mitchell <https://github.com/Mitchell-Kovacs> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modifi...
/*!! include('common/ids', { symbol_prefix = ''}, { }) !! 32 */ /* ################# !! GENERATED CODE -- DO NOT MODIFY !! ################# */ #pragma once #ifndef BE_OMICRON_IDS_HPP_ #define BE_OMICRON_IDS_HPP_ #include <be/core/id.hpp> #ifdef BE_ID_EXTERNS namespace be { namespace ids { } // be::ids } // be ...
# Function to find the sum of digits def sum_digits(num): # Variable to store the sum of digits sum = 0 while num > 0: digit = num % 10 sum = sum + digit num = num // 10 return sum num = 1234 sum = sum_digits(num) print("Sum of digits of %d is %d" % (num, sum)) # Output: Sum of digits of 1234 is 10
<reponame>BrandonBrasson/cups class CreateAddCreatorToCupcakes < ActiveRecord::Migration def change rename_table('user_cupcakes', 'bookmarks') end end
using RIQExtensions module RIQ # Simple object for retrieving your org-wide account properties. The object is read only and provides only fetch and convenience methods. class AccountProperties attr_reader :data # Performs a network call and fetches the account properties for the org. def initialize ...
<filename>app/src/main/java/com/example/user/stijnverdenius_pset3/get_hppt_reqt.java package com.example.user.stijnverdenius_pset3; /** * Created by User on 2/24/2017. */ import android.util.Log; import java.net.MalformedURLException; import java.net.URL; import java.net.HttpURLConnection; import java.io.IOExcepti...
module.exports = require('./assets/vue-directive-image-previewer.js')
<reponame>AlexProkhor/DotNext-Moscow-2020<gh_stars>0 export abstract class MenuElementBase { path: string; name: string; }
<gh_stars>0 package weixin.weicar.service.impl; import weixin.weicar.service.CarToolServiceI; import org.jeecgframework.core.common.service.impl.CommonServiceImpl; import weixin.weicar.entity.CarToolEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; i...
#!/usr/bin/env bash require_env_variable () { local env_dir=$1 local name=$2 if [[ -z $(get_env_variable $env_dir $name) ]]; then echo "${name} was not set, aborting." | indent exit 1 fi }
class NetworkDevice: def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) self.port = "" def validate_port(self, port): # Implement this method to validate and set the port attribute if not isinstance(port, str) or not port.isdigi...
#!/bin/sh test_description='wildmatch tests' . ./test-lib.sh match() { if [ $1 = 1 ]; then test_expect_success "wildmatch: match '$3' '$4'" " test-wildmatch wildmatch '$3' '$4' " else test_expect_success "wildmatch: no match '$3' '$4'" " ! test-wildmatch wildmatch '$3' '$4' " fi if...
<filename>app/models/lastfm_user.rb class LastfmUser attr_accessor :name, :lastfm def initialize(name, lastfm) @name = name @lastfm = lastfm @group = 'mnml' end def info Rails.cache.fetch("/users/#{@name}#info", :expires_in => 7.days, :compress => true) do @lastfm.user.get_info(:us...
import { ErrorCodes, LoginCredentialEntity } from "../../../src/domain/entity/LoginCredential" import { DomainError } from "../../../src/domain/DomainError" import config from "../../../src/config/app" function generateRandomPassword(length: number) { const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS...
import hmac import hashlib from datetime import datetime from simple_rest.auth.decorators import request_passes_test from simple_rest.utils.decorators import wrap_object def get_secret_key(request, *args, **kwargs): public_key = request.GET.get('_auth_public_key') if public_key: #user = User.objects....
#!/bin/sh make -C /Users/christian/GIT/opencv/ios/build/iPhoneSimulator-x86_64 -f /Users/christian/GIT/opencv/ios/build/iPhoneSimulator-x86_64/CMakeScripts/ZERO_CHECK_cmakeRulesBuildPhase.make$CONFIGURATION all
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for USN-2497-1 # # Security announcement date: 2015-02-09 00:00:00 UTC # Script generation date: 2017-01-01 21:04:14 UTC # # Operating System: Ubuntu 14.04 LTS # Architecture: i686 # # Vulnerable packages fix on version: # - ntp:1:4.2.6.p5+dfsg-3ubuntu2.14.04.2 #...
<gh_stars>10-100 package bird import ( "testing" ) func Test_MemoryCacheAccess(t *testing.T) { cache, err := NewMemoryCache() parsed := Parsed{ "foo": 23, "bar": 42, "baz": true, } t.Log("Setting memory cache...") err = cache.Set("testkey", parsed, 5) if err != nil { t.Error(err) } t.Log("Fetchin...
# frozen_string_literal: true require_relative 'twitch/version' require_relative 'twitch/client'
#!/usr/bin/env bash # Compiling with ghcjs: stack build --stack-yaml=stack-ghcjs.yaml # Moving the generated files to the js folder: mkdir -p js cp -r $(stack path --local-install-root --stack-yaml=stack-ghcjs.yaml)/bin/starterApp.jsexe/all.js js/ # Minifying all.js file using the closure compiler: cd js ccjs all.js...
#!/usr/bin/env bash set -euo pipefail MEMORY_QUERY='sum by (label_app_kubernetes_io_component) (sum(container_memory_usage_bytes{namespace="openshift-cnv"}) by (pod) * on (pod) group_left(label_app_kubernetes_io_component) kube_pod_labels{namespace="openshift-cnv"}) / (1024* 1024)' CPU_QUERY='sum by (label_app_kubern...
from sklearn.cluster import AgglomerativeClustering # Create a dataset x = [[1, 2], [4, 7], [9, 8], [12, 17], [20, 3]] # Create a hierarchical clustering object hc = AgglomerativeClustering(n_clusters=2, affinity='euclidean', linkage='ward') # Apply the clustering algorithm to the dataset y_pred = hc.fit_predict(x)...
#!/bin/bash echo "setup k8s cluster" cd ${HOME}/pai-deploy/kubespray ansible-playbook -i inventory/pai/hosts.yml cluster.yml --become --become-user=root -e "@inventory/pai/openpai.yml" || exit $? sudo mkdir -p ${HOME}/pai-deploy/kube || exit $? sudo cp -rf ${HOME}/pai-deploy/kubespray/inventory/pai/artifacts/admin.co...
#! /bin/bash # Author: Marco Esposito # Based on instructions by the MARP developing team. # Run this script on bash to compile the presentation in html format. # This script is only intended to be used on Linux. if [ -z ${2} ]; then echo "compiling to HTML"; else FLAG=--allow-local-files; echo "compiling to PDF"; f...
<gh_stars>0 /* * Contacts Service * * Copyright (c) 2010 - 2012 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: <NAME> <<EMAIL>> * * 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 ...
/** * @file c_api_sparse_array_spec.cc * * @section LICENSE * * The MIT License * * @copyright Copyright (c) 2016 MIT and Intel Corporation * @copyright Copyright (c) 2018-2020 Omics Data Automation, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software an...
package tr.com.minicrm.productgroup.data.mongo.collection; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; @Document(collection = "database_sequences") @Getter @Setter @NoArgsCon...
<reponame>SodY2/meanAP 'use strict'; angular.module('users').controller('AuthenticationController', ['$scope', '$state', '$http', '$location', '$window', 'Authentication', 'PasswordValidator', function($scope, $state, $http, $location, $window, Authentication, PasswordValidator) { $scope.authentication = A...
import React from "react"; import BackgroundSlider from "react-background-slider"; import beach from "../assets/landing/beach.jpg"; import mountain from "../assets/landing/mountain.jpg"; import desert from "../assets/landing/desert.jpg"; import { Card, Button } from "reactstrap"; import { Link } from "react-router-dom"...
#!/bin/sh # Crea una imagen de disco que contiene bootstrappr y paquetes. THISDIR=$(/usr/bin/dirname ${0}) DMGNAME="${THISDIR}/bootstrap.dmg" if [[ -e "${DMGNAME}" ]] ; then /bin/rm "${DMGNAME}" fi /usr/bin/hdiutil create -fs HFS+ -srcfolder "${THISDIR}/bootstrap" "${DMGNAME}"
#!/bin/sh -e # set a configuration file if not already set ! (: "${GEOIP_CONFIG_FILE?}") 2>/dev/null && { GEOIP_CONFIG_FILE="/etc/GeoIP.conf" [[ ! -z $GEOIP_USER_ID ]] && { echo "UserId $GEOIP_USER_ID" > $GEOIP_CONFIG_FILE } [[ ! -z $GEOIP_LICENSE_KEY ]] && { echo "LicenseKey $GEOIP_LIC...
#!/bin/bash # standardize species names for the two models python ../../../scripts/standardizeModelSpeciesNames.py --model1 Models/minimal_chem.inp Models/minimal_species_dictionary.txt --model2 Models/superminimal_chem.inp Models/superminimal_species_dictionary.txt
<gh_stars>10-100 package io.opensphere.core.units.length; import io.opensphere.core.util.Utilities; /** * A length with feet as its native unit. */ public final class Feet extends Length { /** Long label. */ public static final String FEET_LONG_LABEL1 = "foot"; /** Long label. */ publi...
asar pack ./OutApp/FISH_EDITOR-win32-x64/resources/app ./OutApp/FISH_EDITOR-win32-x64/resources/app.asar rm -rf ./OutApp/FISH_EDITOR-win32-x64/resources/app
<gh_stars>0 #include "Loader.h" Loader::Loader() { numVertices=0; } Loader::~Loader() { } void Loader::loadScene(const char* filePath){ Assimp::Importer importer; myScene = importer.ReadFile(filePath, aiProcess_Triangulate | aiProcess_GenSmoothNormals | aiProcess_FlipUVs); if(!myScene){ std...
<reponame>msrivastav13/sfbulk2 /* eslint-disable header/header */ import * as fs from 'fs'; import { flags, SfdxCommand } from '@salesforce/command'; import { Messages } from '@salesforce/core'; import BulkAPI2 from 'node-sf-bulk2/dist/bulk2'; import { BulkAPI2Connection } from 'node-sf-bulk2'; // Initialize Messages ...
cd "$(dirname "$0")" echo "LITEGL" ../../litegl/utils/pack.sh cp -v ../../litegl/build/* ../editor/js/extra echo "LITESCENE" ../../litescene/utils/pack.sh cp -v ../../litescene/build/* ../editor/js/extra cp -v ../../litescene/data/shaders.xml ../editor/data echo "LITEGUI" ../../litegui/utils/pack.sh cp -v ../../litegui...
#!/bin/sh # peform unit tests # ABOUT='peform unit tests' USAGE='[<...OPTIONS>] [<TEST-UTIL>] [[--]<...passthru args>]' COPYRIGHT='Copyright (c) 2018-2019, Doug Bird. All Rights Reserved.' ME='tests.sh' # # resolve $APP_DIR [ -n "$APP_DIR" ] || { ME_DIR="/$0"; ME_DIR=${ME_DIR%/*}; ME_DIR=${ME_DIR:-.}; ME_DIR=${ME_DIR...
import re def process_log_file(log_file_path, pattern): matching_lines = [] with open(log_file_path, 'r') as file: for line in file: if re.search(pattern, line): matching_lines.append(line.strip()) return matching_lines # Example usage log_file_path = '/path/to/log/file...
<gh_stars>0 import React from "react"; import Grid from "@material-ui/core/Grid"; import TextField from "@material-ui/core/TextField"; import Button from "@material-ui/core/Button"; import Fab from "@material-ui/core/Fab"; import Icon from "@material-ui/core/Icon"; import AddIcon from "@material-ui/icons/Add"; import R...
<!DOCTYPE html> <html> <head> <title>Date Formatter</title> </head> <body> <form> <lable>Enter Date: </lable> <input type="date" name="date"> <input type="submit"> </form> </body> </html> <script> document.querySelector('form').addEventListener('submit', function (e) { e.preventDefault(); var userinput =...
def search(arr, target): result = -1 for i, n in enumerate(arr): if n == target: result = i break return result
import {Component, Input, OnInit} from '@angular/core'; import { ApiService } from '../../services/api.service'; @Component ({ selector: 'comments', templateUrl: './comments.component.html', styleUrls: ['./comments.component.scss'] }) export default class CommentsComponent implements OnInit{ @Input()...
#!/bin/sh set -e ROOTDIR=dist BUNDLE=${ROOTDIR}/StintCoin-Qt.app CODESIGN=codesign TEMPDIR=sign.temp TEMPLIST=${TEMPDIR}/signatures.txt OUT=signature.tar.gz if [ ! -n "$1" ]; then echo "usage: $0 <codesign args>" echo "example: $0 -s MyIdentity" exit 1 fi rm -rf ${TEMPDIR} ${TEMPLIST} mkdir -p ${TEMPDIR} ${CO...
#!/bin/env bash PORT=8888 docker run \ -d \ -p $PORT:8888 \ -v "${PWD}":/home/jovyan \ -v /tmp:/tmp \ -e NB_UID=1000 \ -e NB_GID=1000 \ --user root \ ghcr.io/sorosliu1029/explore-git:latest \ start-notebook.sh --NotebookApp.password='sha1:34147a04de8e:28b0c1d0c034adf65f78074e69253c...
<gh_stars>0 var $ = jQuery; class authenticateAdmin { constructor() { this.events(); this.ajaxAuthentication(); } events() { $(".loginform").submit(this.createCookie); $(".end-the-day").on('click', this.openPageModal); $(".do-not-end-day").on('click', this.closeModa...
import { $TSContext } from 'amplify-cli-core'; describe('command blocking', () => { test('validate which commands will be blocked or not', async () => { const { isCommandInMatches, versionGatingBlockedCommands } = await import('../version-gating'); expect(isCommandInMatches({ plugin: 'api', command: 'add' }...
<reponame>adamsrsen/watchinsync import {Column, Entity, ManyToOne, PrimaryGeneratedColumn} from 'typeorm' import Users from './Users' import Rooms from './Rooms' @Entity() export default class Messages { @PrimaryGeneratedColumn() id: number @Column() text: string @Column({type: 'timestamptz'}) timestamp:...
///<reference types="Cypress" /> let faker = require('faker'); let localforage = require('localforage'); describe('Frogbudget - Repeats', () => { beforeEach(() => { cy.visit('/'); indexedDB.deleteDatabase('entry'); indexedDB.deleteDatabase('repeat'); }) it('create default weekly repeat', () => { cy.get('.f...
<reponame>nabeelkhan/Oracle-DBA-Life set echo off set heading off set feedback off prompt prompt Current Date and Time prompt select '*** Time = '||to_char(sysdate,'DD-MON-YY HH:MI:SS')|| ' ***' from dual;
import { locales } from 'nextra/locales' export const middleware = locales
<reponame>bbernhar/skia<filename>modules/skottie/src/SkottieTest.cpp /* * Copyright 2018 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/core/SkFontMgr.h" #include "include/core/SkMatrix.h" #include "include/core/SkStream.h" ...
# 依存関係解決 apt-get update apt-get install -y git cmake ninja-build clang python uuid-dev libicu-dev icu-devtools libbsd-dev libedit-dev libxml2-dev libsqlite3-dev swig libpython-dev libncurses5-dev pkg-config curl HOME=/home/vagrant export $HOME # swiftenvをクローン git clone https://github.com/kylef/swiftenv.git $HOME/.swi...
<gh_stars>10-100 /* * 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 "Li...
package api import ( "net/http" "github.com/labstack/echo/v4" ) var registers []func(e *echo.Echo, h *HTTPHandler) func init() { registers = append(registers, func(e *echo.Echo, h *HTTPHandler) { assetHandler := http.FileServer(http.Dir("static")) e.GET("/", echo.WrapHandler(assetHandler)) e.GET("/*", ech...
#!/usr/bin/env bash # --------------------------------------------------- # paste commands below into the command prompt on the new server. # The server will need open-ssh-server installed. You can connect with username and password. # use putty or some ssh client that you can paste text into. # Other cli...
<reponame>hanyueqiang/actionview-fe import { asyncFuncCreator } from '../utils'; export function index(key) { return asyncFuncCreator({ constant: 'STATE_INDEX', promise: (client) => client.request({ url: '/project/' + key + '/state' }) }); } export function create(key, values) { return asyncFuncCreator(...
<filename>test/buffer.js /*global global, testSuite, Buffer*/ testSuite('buffer', function(assert) { testSuite('strings', function() { var b = new Buffer('sa'); assert('string without encoding specified', b.toString() === 'sa'); b = new Buffer('sa', 'utf8'); assert('string with utf8', b.toString() ==...
<reponame>montmanu/env-ci import test from 'ava'; import git from '../../services/git'; import {gitRepo, gitCommit} from '../helpers/git-utils'; test('Return "commit" and "branch" from local repository', async t => { const {cwd} = await gitRepo(); const commit = await gitCommit('Test commit message', {cwd}); t.dee...
def insertion_sort(A): for i in range(1, len(A)): currentValue = A[i] j = i - 1 while j >= 0 and A[j] > currentValue: A[j + 1] = A[j] j -= 1 A[j + 1] = currentValue A = [4,1,3,2] insertion_sort(A) print(A)
package tv.twitch.android.shared.ui.menus.core; public abstract class MenuModel { public static abstract class SingleItemMenu extends MenuModel { } }
import React from "react"; import { StyleSheet, View, Text, Animated, TouchableOpacity, Platform, } from "react-native"; import MapView, { Marker } from 'react-native-maps'; import { connect } from "react-redux"; class HomeScreen extends React.Component { state = { distance: 0, duration: 0, pace: 0, animVal...
#!/usr/bin/env python ''' Use processes and Netmiko to connect to each of the devices in the database. Execute 'show version' on each device. Record the amount of time required to do this. DISCLAIMER NOTE: Solution is limited to the exercise's scope ''' from net_system.models import NetworkDevice import django from mu...
var chai = require('chai'); var expect = chai.expect; var sinon = require('sinon'); var sinonChai = require('sinon-chai'); var queryUtil = require('../server/customUtils/queryUtil.js'); var loginApiManager = require('../server/ApiManager/loginApiManager.js'); var defaultApiManager = require('../server/ApiManager/defaul...
# author:pengrk # email:546711211@qq.com # qq group:573283836 scp 01dns.yaml root@10.1.12.20:/dns/dns.yaml
<gh_stars>10-100 package io.opensphere.csvcommon.detect.datetime.algorithm; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.text.ParseException; import java.util.List; ...
import React from "react"; const WeatherUI = ({ data }) => { return ( <div id="weather-ui"> <h1>Weather forecast</h1> <ul> {data.map(day => ( <li> <h2>{day.name}</h2> <div>{day.temperature} &deg;C</div> <div>{da...
// Function to find the mid-point of the list public Node FindMiddle(Node head) { // Edge cases if (head == null || head.next == null) return head; Node slow = head; Node fast = head; // Move fast by two nodes, and slow by one node while (fast != null && fast.next != null)...
#!/usr/bin/env bash CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$CURRENT_DIR/variables.sh" source "$CURRENT_DIR/helpers.sh" source "$CURRENT_DIR/spinner_helpers.sh" # delimiters d=$'\t' delimiter=$'\t' # if "quiet" script produces no output SCRIPT_OUTPUT="$1" grouped_sessions_format() {...
BASEDIR=$(dirname $(pwd)) echo ${BASEDIR} WORKDIR=$1 sudo docker rm --force lc if [ -x "$BASEDIR/lc" ]; then sudo docker run -d --name lc \ -v ${BASEDIR}/integrate/cephconf:/etc/ceph/ \ -v ${BASEDIR}/integrate/yigconf:/etc/yig/ \ -v ${BASEDIR}:/var/log/yig \ -v ${BASEDIR}:${WORKDIR} \ ...
<reponame>shaba1567/Elastos.Essentials.App<gh_stars>0 import { AsciiMapping } from "./asciimapping"; import { MnemonicSuggestionProvider } from "./suggestionprovider"; export class FrenchMnemonicSuggestionProvider implements MnemonicSuggestionProvider { private mapping: AsciiMapping; constructor() { void impo...
#!/usr/bin/env bash CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CURDIR"/../../../shell_env.sh echo "drop stage if exists s2;" | $MYSQL_CLIENT_CONNECT echo "CREATE STAGE if not exists s2;" | $MYSQL_CLIENT_CONNECT echo "list @s2" | $MYSQL_CLIENT_CONNECT curl -u root: -XPUT -H "stage_name:s2" -F "upload=@$...
#!/bin/bash set -e node_modules/.bin/sequelize db:create || echo 'Database cant be created might be exists' npm run migrate
<filename>Notes/Notes/geoNotes-Bridging-Header.h // // geoNotes-Bridging-Header.h // geoNotes // // Created by <NAME> on 2/29/16. // Copyright © 2016 <NAME>. All rights reserved. // #import <Parse.h> #import <Bolts.h>
import java.util.Scanner; class linearsearch { public static void main(String args[]) { int c,n,search,array[]; Scanner in = new Scanner(System.in); System.out.print("Enter no of elements : "); n = in.nextInt(); array = new int[n]; System.out.println("En...