text
stringlengths
1
1.05M
<filename>src/utils/useFocusTrap/useFocusTrap.js import React, { useEffect, useRef, useCallback } from 'react'; import { focusOnFirstDescendent, focusOnLastDescendent } from './utils'; const FocusRing = ({ topFocusBumperRef, bottomFocusBumperRef, children }) => { return ( <div> <div ref={topFocusBumperRef...
const { EPROTONOSUPPORT } = require('constants'); var fs = require('fs'); fs.appendFile('myfile1.txt', "selamat pagi", function(err) { if (err) throw err; console.log("saved"); }); fs.open('myfile2.txt', 'r', function(err, file) { if (err) throw err; console.log("saved file2"); }); fs.open('myfile2.t...
<gh_stars>0 /* * Copyright 2014-2018 the original author or 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 req...
<filename>angularapp/filters.js 'use strict'; var filters = angular.module('haoshiyou.filters', []);
class TaskManager: def __init__(self): self.tasks = [] def add_task(self, task): self.tasks.append(task) def remove_task(self, task): if task in self.tasks: self.tasks.remove(task) def get_tasks(self): return self.tasks def num_tasks(self): ret...
func calculateTotalCost(cart: [[String: Any]]) -> Double { var totalCost: Double = 0.0 for item in cart { if let price = item["price"] as? Double { totalCost += price } } return totalCost }
<filename>src/out.hpp #ifndef __OUT_HPP__ #define __OUT_HPP__ #include <iostream> class out{ private: out(std::ostream& o, bool discard) : o(o), discard(discard) {} std::ostream& o; bool discard = false; public: void flush(){ std::flush(o); } static out cout(unsigned int level){ return o...
rm -rf *.xcarchive rm -f *.ipa rm -rf *.app rm -f DistributionSummary.plist rm -f ExportOptions.plist rm -f Packaging.log rm -rf app rm -f app.zip # rm -f Podfile.lock # rm -rf Pods # rm -rf *.xcworkspace
import React, { useReducer, useEffect } from "react"; import PlanetList from "../planet-list/planet-list.component.js"; import SelectedPlanet from "./selected-planet/selected-planet.component.js"; import { get } from "lodash"; import { getPlanets } from "../utils/api.js"; import { Button } from "@react-mf/styleguide"; ...
#!/bin/bash #SBATCH --account=def-dkulic #SBATCH --mem=8000M # memory per node #SBATCH --time=23:00:00 # time (DD-HH:MM) #SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/continuous_BipedalWalkerHardcore-v2_ddpg_hardcopy_epsilon_greedy_seed2_run1_%N-%j.out # %N for node name, %j fo...
<reponame>lgoldstein/communitychest package net.community.chest.net; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.community.chest.util.collection.CollectionsUtils; /** * <P>Copyright 2007 as per GPLv2</P> * * <P>Known protocol(s)</P> * @author <NAME>. * @since Sep 20,...
#!/usr/bin/env zsh # TRADES (Imagnette) echo "开始训练 1......" CUDA_VISIBLE_DEVICES=0,1,2,3 python train_trades_cifar10.py --model preactresnet --AT-method TRADES --dataset Imagnette --gpu-id 2,3 --seed 1 wait echo "开始训练 2......" CUDA_VISIBLE_DEVICES=0,1,2,3 python train_trades_cifar10.py --model preactresnet --AT-method...
package de.schub.marathon_scaler.Customer; import com.google.gson.Gson; import com.orbitz.consul.Consul; import com.orbitz.consul.async.ConsulResponseCallback; import com.orbitz.consul.model.ConsulResponse; import com.orbitz.consul.model.kv.Value; import com.orbitz.consul.option.QueryOptionsBuilder; import com.orbitz....
<reponame>pashchenkoromak/jParcs<filename>sys_prog/java/io/github/lionell/lab1/CliquesFinder.java package io.github.lionell.lab1; import com.google.common.collect.ImmutableSet; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.stream.Collectors; impor...
#include <iostream> #include <string> #include <set> using namespace std; int main() { string s; getline(cin, s); set<char> chars; string result; for (char c : s) { if (chars.find(c) == chars.end()) { result += c; chars.insert(c); } } cout << result << endl; return 0; }
total = 0 for x in range(1, 101): if x%3 == 0 or x%5 == 0: total += x print("The sum is %d." %total)
list_a = [1, 2, 3, 4, 5] #function to calculate even and odd values def calculate_even_odd(list_a): #initialize counters for even and odd numbers even_counter = 0 odd_counter = 0 #check for even and odd numbers for int in list_a: if int % 2 == 0: even_counter += 1 ...
#!/bin/bash # # Purpose: Custom Xray Commands Master Script # Requirements: jq | curl | Xray credentials # Author: Loren Y # SCRIPT_DIR=`dirname $0`; PARENT_SCRIPT_DIR="$(dirname "$SCRIPT_DIR")" PARENT2_SCRIPT_DIR="$(dirname "$PARENT_SCRIPT_DIR")" if [ ! -f $PARENT_SCRIPT_DIR/json/xrayValues.json ]; then SCRIPT_V...
from flask import Flask, request import threading app = Flask(__name__) def process_sentence(sentence): # Implement the processing logic for the given sentence # Example: Reversing the sentence return sentence[::-1] def proc_stop(): # Implement the logic to stop any running processes or threads #...
<filename>src/www/index.py<gh_stars>0 #!/bin/python3 # author: <NAME> import sys from flask import redirect, url_for, send_file from env import Env from www import app, login_required from loguru import logger from utils.crypto import b64decode max_file_view_limit = 1024*1024 @app.route('/') @app.route('/index') @l...
""" Flask API to return customer data """ import sqlite3 from flask import Flask, jsonify, request, g DATABASE = 'customer_database.db' app = Flask(__name__) def get_db(): db = getattr(g, '_database', None) if db is None: db = g._database = sqlite3.connect(DATABASE) return db @app.teardown_appc...
//#region IMPORTS import type Pose from '../../armature/Pose'; import type { IKChain } from '../rigs/IKChain'; import QuatUtil from '../../maths/QuatUtil'; import Vec3Util from '../../maths/Vec3Util'; import { quat } from 'gl-ma...
#!/bin/bash echo Put echo into maintenance mode docker-machine ssh bravo sudo docker node update --availability drain echo echo Inspect the node docker-machine ssh bravo sudo docker node inspect --pretty echo echo Inspect the status of the Swarm docker-machine ssh bravo sudo docker node ls echo Monitor the transit...
#!/bin/bash doTempFileTesting(){ # NEEDS THIS TO BE SET BEFORE CALL : # testedFile="" if [ ! -r "${testedFile}" ] || [ ! -e "${testedFile}" ] || [ ! -f "${testedFile}" ] || [ ! -s "${testedFile}" ]; then echo "Temporary file not found or empty file : ${testedFile}" >&2 echo "EXITI...
import { Router } from 'express' import { celebrate, Joi, Segments } from 'celebrate' import UsersController from '../controllers/UsersController' import isAuthenticated from '@server/middlewares/isAuthenticated' const usersRouter = Router() const usersController = new UsersController() usersRouter.get('/', isAuthent...
def check_duplicates(input_list): seen = set() for num in input_list: if num in seen: return "Things are not ok" seen.add(num) return "There are no duplicates" # Example usage input_list1 = [1, 2, 3, 4, 5] input_list2 = [1, 2, 3, 4, 2] print(check_duplicates(input_list1)) # Ou...
<gh_stars>1-10 package kbasesearchengine.main; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import kbasesearchengine.GetObjectsInput; import kbasesearchengine.GetObjectsOutput; import kbasesearchengine.ObjectData; import kbasesearchengine.SearchObjectsInput; import k...
<reponame>backwardn/gudgeon package resolver import ( "fmt" log "github.com/sirupsen/logrus" "net" "strconv" "strings" "time" "github.com/miekg/dns" "github.com/chrisruffalo/gudgeon/pool" "github.com/chrisruffalo/gudgeon/util" ) const ( defaultPort = uint(53) defaultTLSPort = uint(853) portDelimeter ...
from microbit import * from enum import * class CRASH(object): """基本描述 碰撞传感器 Args: RJ_pin (pin): 连接端口 """ def __init__(self, RJ_pin): if RJ_pin == J1: self.__pin = pin8 elif RJ_pin == J2: self.__pin = pin12 elif RJ_pin == J3: ...
const http = require("http"); const app = require("./config/express"); const port = 3000; http.createServer(app).listen(port, function() { console.log("Servidor iniciado na porta 3000"); });
echo Stop VLC kill -9 `cat player.pid`
#! /bin/bash PACKAGE="xz" VERSION=$1 FOLD_NAME="$PACKAGE-$VERSION" if [ -z "$CORES" ]; then CORES='4' fi tar xf "$PACKAGE_DIR/$FOLD_NAME.tar.xz" pushd "$FOLD_NAME" # Prevent an error sed -e '/mf\.buffer = NULL/a next->coder->mf.size = 0;' \ -i src/liblzma/lz/lz_encoder.c # Configure the source ./configure --p...
def find_view_function(url_path: str) -> str: for pattern in urlpatterns: pattern_path = pattern[0] view_function = pattern[1] if pattern_path == url_path: return pattern[2] elif "<str:" in pattern_path: pattern_prefix = pattern_path.split("<str:")[0] ...
<filename>python_modules/dagster/dagster/core/storage/output_manager.py from abc import ABC, abstractmethod, abstractproperty from dagster.core.definitions.definition_config_schema import ( convert_user_facing_definition_config_schema, ) from dagster.core.definitions.resource import ResourceDefinition class IOut...
<gh_stars>1-10 /* * Copyright 2018-2020 the original author or 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 * * https://www.apache.org/licenses/LICENSE-2.0 ...
# Generated by Django 3.2.7 on 2021-12-01 13:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("connector_airflow", "0017_cluster_auto_sync"), ] operations = [ migrations.AlterField( model_name="dag", name="sampl...
<reponame>danishkiani94/RC-RN-TEMPLATE import { StyleSheet } from 'react-native' export default StyleSheet.create({ applicationView: { flex: 1, }, container: { flex: 1, justifyContent: 'center', backgroundColor: 'white', }, welcome: { fontSize: 20, textAlign: 'center', }, myImage:...
import os import re import sys from sys import version_info from . import porter_stemmer class Analyzer: """This app collects all of the words in a text file (which the user provides), removes any stop words found in another file (which the user also provides), removes all non-alphabetical text, stems all re...
import java.util.StringTokenizer; public class Tokenizer { public static void main(String[] args) { String str = "Hello World"; // Create the tokenizer StringTokenizer st = new StringTokenizer(str); // Create the array String[] arr = new String[st.countTok...
<gh_stars>0 package authenticator import ( "bytes" "context" "encoding/json" "errors" "fmt" "io/ioutil" "net/http" "net/url" "os" "time" "github.com/alesr/callbacksrv" "github.com/alesr/pocketoauth2/httputil" ) const ( authURLTemplate string = "https://getpocket.com/auth/authorize?request_token=%s&...
###################################################################### # Copyright © 2021. TIBCO Software Inc. # This file is subject to the license terms contained # in the license file that is distributed with this file. ###################################################################### #!/bin/bash FSREST_BUILD...
package com.prt2121.fire; import com.firebase.client.Firebase; import android.app.Application; /** * Created by pt2121 on 8/20/15. */ public class FireApp extends Application { @Override public void onCreate() { super.onCreate(); } }
function closestPackageJson(filePath: string): string | null { const path = require('path'); const fs = require('fs'); let currentDir = path.dirname(filePath); while (currentDir !== '/') { const packageJsonPath = path.join(currentDir, 'package.json'); if (fs.existsSync(packageJsonPath)) { return ...
import { boosts } from "./boosts/boosts.js"; import { boostShop } from "./boosts/boosts-shop.js"; // the S stands for Shop export interface SItem { name: string; description: string; cost: number | string; // in cycles tpc?: number | string; cpp?: number | string; tpm?: number | string; ref?: number; ...
<gh_stars>0 /* * 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 * "Lic...
///////////////////////////////////////////////////////////////////////////// // Name: emulator.cpp // Purpose: Emulator wxWidgets sample // Author: <NAME> // Modified by: // Created: 04/01/98 // Copyright: (c) <NAME> // Licence: wxWindows licence //////////////////////////////////////////////...
cat "underscore.js" "encoding.js" "common.js" "log-full.js" "mime.js" "buffer.js" "request.js" "crypto.js" "stream.js" "chromesocketxhr.js" "connection.js" "webapp.js" "websocket.js" "upnp.js" "handlers.js" "httplib.js" > wsc-chrome.min.js
<filename>src/js/upload.js $(document).ready(init()); function init() { $('.file-upload-modal .modal-content form').submit(function (e) { upload(e); }); } function upload(e) { e.preventDefault(); var fileName = $('.file-upload-modal .modal-content form').find("input[type=file], textarea").val();...
#!/bin/sh # script for execution of deployed applications # # Sets up the MCR environment for the current $ARCH and executes # the specified command. # exe_name=$0 exe_dir=`dirname "$0"` echo "------------------------------------------" if [ "x$1" = "x" ]; then echo Usage: echo $0 \<deployedMCRroot\> args else ...
package main; import java.util.Scanner; public class DisplayCalendar { public static void main(String[] args) { Scanner input = new Scanner(System.in); int year = -1; while (year < 0) { System.out.print("Enter the year (Must be positive): "); year = input.nextInt(); } int day = -1; whi...
#!/bin/bash gcloud endpoints services deploy openapi-functions.yaml --project shadowsocks-218808
<gh_stars>0 package com.zhcs.utils; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import com.alib...
#!/usr/bin/env bash # Tags: no-replicated-database, no-parallel # Tag no-replicated-database: Unsupported type of ALTER query CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh ALTER_OUT_STRUCTURE='command_type String, partition_id String, part_n...
import { Button, Grid, LinearProgress } from '@material-ui/core' import { FormikControls } from 'components' import { Form, Formik } from 'formik' import React from 'react' import * as Yup from 'yup' export const FormikContainer = (props) => { const initialValues = { title: '', description: '', select: '', ch...
def verify_password(password): if len(password) < 8 or len(password) > 15: return False has_upper = False has_lower = False has_num = False for l in password: if l.isupper(): has_upper = True elif l.islower(): has_lower = True elif l.isnumeri...
#!/bin/bash set -ev which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available BUILD_NICKNAME=$(basename "$0" .sh) BUILD_DIR="./build-$BUILD_NICKNAME" # Adding Ubsan here, only added in GCC 4.9 ./configure.py --with-build-dir="$BUILD_DIR" --with-debug-info --with-sanitizer --cc-abi-flags='-...
<reponame>GybiBite/Asteroids<filename>core/src/gybibite/asteroids/TypewriterTextAnim.java package gybibite.asteroids; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.TimeUt...
package org.lagalag.web.model.entity; import lombok.Data; @Data public class Place { private Long id; private String name; private String countryCode; private LatLng latLng; }
from cyder.cydns.nameserver.forms import Nameserver, NameserverForm, from cyder.cydns.views import cy_render class NSView(object): model = Nameserver form_class = NameserverForm queryset = Nameserver.objects.all() extra_context = {'obj_type': 'nameserver'}
<reponame>harry-xiaomi/SREWorks package com.alibaba.sreworks.job.master.jobtrigger.quartz; import com.alibaba.tesla.common.base.TeslaBaseResult; import com.alibaba.tesla.web.controller.BaseController; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springfra...
#!/bin/sh if [ "$(uname)" = "Linux" ]; then systemctl start couchbase-server elif [ "$(uname)" = "Darwin" ]; then output="$(open -a "Couchbase Server")" status="$?" [ "$status" -gt 1 ] && { printf "%s" "$output" exit $status } # We set a default timeout of 20 seconds, since cluster should be up b...
package collins.kent.tutor.arithmetic; import java.util.Random; import collins.kent.tutor.Problem; import collins.kent.tutor.Meta; /*** * Produces a modulo problem involving integers. Avoids % 0. Operands are * intentionally low to keep the focus on the operation rather than the * mathematics. * * @author <NAM...
import * as React from "react"; import { SvgIconProps } from "@material-ui/core/SvgIcon"; import { createSvgIcon } from "@material-ui/core"; const Pin = createSvgIcon( <> <path d="M50,2.5c-18.1,0-32.8,14-32.8,31.2c0,7.1,2.5,13.9,7.1,19.3L50,83.8L75.8,53c4.6-5.4,7.1-12.3,7.1-19.3 C82.8,16.5,68.1,2.5,50,2.5z...
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * 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 re...
import { Network } from './networks'; type ChangeAddressAction = { type: 'changeAddress', value: string | null }; type ChangeNetworkAction = { type: 'changeNetwork', value: Network }; export type Action = | ChangeAddressAction | ChangeNetworkAction;
import React, { Component} from 'react'; import { View, Text, TextInput, Image, StyleSheet, Dimensions, FlatList, TouchableHighlight, ActivityIndicator, ListView } from 'react-native'; import { Button, Subheader } from 'react-native-material-ui'; import simpleContacts from 'react-native-simple-contacts'; import * as An...
<reponame>PierceLBrooks/Facialoid<gh_stars>1-10 // Author: <NAME> package com.piercelbrooks.common; import android.app.Activity; import android.app.Application; import android.content.Context; import android.os.Bundle; import androidx.annotation.DrawableRes; import androidx.multidex.MultiDex; import androidx.multide...
var searchData= [ ['nameandtags_898',['NameAndTags',['../structCatch_1_1NameAndTags.html',1,'Catch']]], ['noncopyable_899',['NonCopyable',['../classCatch_1_1NonCopyable.html',1,'Catch']]], ['not_5fthis_5fone_900',['not_this_one',['../structCatch_1_1not__this__one.html',1,'Catch']]] ];
<gh_stars>0 /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 o...
<filename>js/utils/leaflet.js<gh_stars>1-10 // sets initial map view to UK coordinates export const map = L.map('map').setView([53.483959, -2.244644], 6); // Uses maptiler api to render street tiles with 512x512 size. Attributions to maptiler, openstreetmap and leaflet are also rendered on screen export const tileLaye...
package core.framework.test.web; import core.framework.inject.Inject; import core.framework.test.IntegrationTest; import core.framework.web.site.Message; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * @author neo */ class MessageIntegrationTest extends In...
package Polymorphism; public class Animal { void talk() { System.out.println("Animals can talk"); } } class Dog{ void talk() { System.out.println("Dogs can bark too."); } } class Cat { void talk() { System.out.println("Meow Meow!!"); } } class Driver{ public static void main(String[] args...
#!/usr/bin/env bash set -e host="authority0" shift cmd="$@" until curl --data '{"method":"web3_clientVersion","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST "$host":8545; do >&2 echo "Parity is unavailable - sleeping" sleep 1 done >&2 echo "Parity is up - executing command...
import React from 'react'; import { v4 as uuidV4 } from 'uuid'; import { useToasts } from 'react-toast-notifications'; import { Layout } from '../components/Layout'; import classes from '../styles/Submit.module.css'; import { EmailSubscription } from '../components/EmailSubscription'; import { Loader } from '../compone...
#!/bin/bash BASEDIR=$(dirname "$0") if [ $(ps -ef | grep -v grep | grep importLNJC05F.py | wc -l) -lt 1 ]; then /usr/local/bin/python3.6 ${BASEDIR}/importLNJC05F.py > /dev/null 2>&1 & echo "RUN ${BASEDIR}/importLNJC05F.py" else echo "Worldfone ScanJob service is running" exit 0 fi if [ $(ps -ef | grep -v ...
package com.yoga.content.property.dto; import com.yoga.core.base.BaseDto; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.validation.constraints.NotNull; @Getter @Setter @NoArgsConstructor public class UpdateDto extends BaseDto { @NotNull(message = "选项ID不能为空"...
<reponame>Codes4Fun/starweb /** * Given a set of strings such as search terms, this class allows you to search * for that string by prefix. * @author <NAME> * */ function PrefixStore() { // This is a naive implementation that simply stores all the prefixes in a // hashmap. A better solution would be to use a tr...
<reponame>moziliar/main package seedu.weme.model; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static seedu.weme.model.Model.PREDICATE_SHOW_ALL_MEMES; import static seedu.weme.t...
import { GET_CAMPAIGNS_SUCCESS, SELECT_CAMPAIGN, SET_LOADING, PATCH_CAMPAIGN, GET_USER_SUCCESS, GET_USERS_SUCCESS, GET_USERME_SUCCESS, SET_EDIT, EDIT_ARTICLE, DELETE_ARTICLE, SUBMIT_ARTICLE, BLOG_PAGE_LOADED, } from "./actions"; import storage from "utils/storage"; const initialState = { sele...
#!s/bin/env bash docker build -t lucifer1004/machine-learning .
<gh_stars>0 package ca.bc.gov.educ.gtts.services; import ca.bc.gov.educ.gtts.exception.TraxBatchServiceException; import ca.bc.gov.educ.gtts.model.dto.students.api.GraduationStudentRecord; import java.util.List; import java.util.function.Predicate; /** * Trax batch service */ public interface TraxBatchService { ...
<filename>src/icon/IconNavigation.tsx import React from 'react'; export interface IconNavigationProps extends React.SVGAttributes<SVGElement> { color?: string; size?: string | number; className?: string; style?: React.CSSProperties; } export const IconNavigation: React.SFC<IconNavigationProps> = ( props: Ic...
#!/bin/bash # Debug_eGui_Dhrystone.sh # Check Environment if [ -z ${IMPERAS_HOME} ]; then echo "IMPERAS_HOME not set. Please check environment setup." exit fi ${IMPERAS_ISS} --verbose --output imperas.log \ --program ../../../Applications/dhrystone/dhrystone.ARM_CORTEX_M0-O0-g.elf \ --processorvendor arm....
import React, {useState, useEffect} from 'react'; import {TextInput, Text, FlatList} from 'react-native'; const App = () => { const [searchTerm, setSearchTerm] = useState(''); const [articles, setArticles] = useState([]); useEffect(() => { searchNews(searchTerm); }, [searchTerm]); const searchNews = (term) => ...
<reponame>GrahamA2/PushoverTWPlugin package io.waterworx.pushover; import push.AppInjector; import java.util.Date; import com.google.inject.Guice; import com.google.inject.Injector; import com.thingworx.metadata.annotations.ThingworxConfigurationTableDefinitions; import com.thingworx.metadata.annotations.ThingworxSe...
<gh_stars>0 export const STORE_STORAGE_VERSION = "0.3";
travis_install_jdk() { local url vendor version license jdk certlink jdk="$1" vendor="$2" version="$3" case "${TRAVIS_CPU_ARCH}" in "arm64" | "s390x" | "ppc64le") travis_install_jdk_package "$version" ;; *) travis_install_jdk_ext_provider "$jdk" "$vendor" "$version" ;; esac } travis_in...
<gh_stars>0 #include "../include/infosqlitestore.h" #include "../include/sqlite_database.h" #include "../include/sqlite_statement.h" #include <infovalue.h> #include <stringconvert.h> //////////////////////////////////////// #if defined(__CYGWIN__) #include <iostream> #else #include <boost/log/trivial.hpp> #endif //////...
fibonacci <- function(n) { fib <- c() x <- 0 y <- 1 for (i in 1:n){ fib <- c(fib,x) x <- x+y y <- x-y } return(fib) }
json.partial! "box_request_abuse_types/box_request_abuse_type", box_request_abuse_type: @box_request_abuse_type
import re pattern = '''^[A-Za-z0-9_@$]*$''' if(re.search(pattern,testString)): print("String does not contain special characters") else: print("string contains special characters")
#!/bin/bash echo "Making local files readable..." sudo chgrp www-data . -R #sudo chmod a+x . -R
#!/bin/bash -x # # 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 # "License...
'use strict' const run = function(generator) { //initialize the generator let gen = generator(); // call next to assign the return value to 'yield' next(); function next(error, value){ if (error) return gen.throw(error); // call next on the generator // one first execution, value will be nul...
#!/bin/bash -l export PORT=${PORT:-8080} export THREAD_COUNT=${THREAD_COUNT:-2} echo "................. FLASKAPP-PROM ......................" echo "" echo " Starting application via waitress-server" echo "" echo " PORT: ${PORT}" echo " THREADS: ${THREAD_COUNT}" echo " VERSION: $(cat VE...
/** * Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.interestrate.bond.definition; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.Validate; import com.opengamma.a...
import unittest from factorial_module import calculate_factorial class TestFactorialCalculation(unittest.TestCase): def test_positive_integer(self): self.assertEqual(calculate_factorial(5), 120) self.assertEqual(calculate_factorial(3), 6) self.assertEqual(calculate_factorial(10), 3628800) ...
#!/bin/sh # ideas used from https://gist.github.com/motemen/8595451 # abort the script if there is a non-zero error set -e # show where we are on the machine pwd remote=$(git config remote.origin.url) siteSource="$1" if [ ! -d "$siteSource" ] then echo "Usage: $0 <site source dir>" exit 1 fi # make a dire...
class BankAccount: def __init__(self): self.balance = 0 self.total_transactions = 0 def deposit(self, amount): self.balance += amount self.total_transactions += 1 def withdraw(self, amount): if self.balance >= amount: self.balance -= amount s...
find ../include ../src/compiler/include -name '*hpp' -exec clang-format -i {} \; find ../src ../include ../test ../sample ../benchmarks -name '*cpp' -exec clang-format -i {} \; python ../3rd_party/run-clang-format/run-clang-format.py -r ../include ../src ../test ../sample ../benchmarks --exclude '*asn_compiler.hpp'