text
stringlengths
1
1.05M
import XCTest import NIO enum APIError: Error { case invalidResponse } struct DCCRule { // Define the structure of DCCRule } class DCCRuleLoader { let session: URLSession init(session: URLSession) { self.session = session } func loadDCCRule(country: String, hash: String) -> EventLoo...
"use strict"; var scrollToHash = function scrollToHash(offsetY) { // Make sure React has had a chance to flush to DOM first. setTimeout(function () { var hash = window.decodeURI(window.location.hash.replace("#", "")); if (hash !== "") { var element = document.getElementById(hash); if (element) ...
#!/bin/sh -l # check if the first argument passed in looks like a flag if [ "${1#-}" != "$1" ]; then set -- /sbin/tini -- phpunit "$@" # check if the first argument passed in is phpunit elif [ "$1" = 'phpunit' ]; then set -- /sbin/tini -- "$@" fi exec "$@"
import Vue from 'vue' export default { list (cb, errorCb) { Vue.http.get('/api/user/list').then((result) => { cb(result.data.users) }, (result) => { errorCb(result.data.error) }) }, buyProducts (products, cb, errorCb) { setTimeout(() => { // simulate random checkout failure. ...
<filename>no8/doc.go // 函数 myAtoi(string s) 的算法如下: // // 读入字符串并丢弃无用的前导空格 // 检查下一个字符(假设还未到字符末尾)为正还是负号,读取该字符(如果有)。 确定最终结果是负数还是正数。 如果两者都不存在,则假定结果为正。 // 读入下一个字符,直到到达下一个非数字字符或到达输入的结尾。字符串的其余部分将被忽略。 // 将前面步骤读入的这些数字转换为整数(即,"123" -> 123, "0032" -> 32)。如果没有读入数字,则整数为 0 。必要时更改符号(从步骤 2 开始)。 // 如果整数数超过 32 位有符号整数范围 [−231,  231 − 1] ,...
<reponame>paketo-buildpacks/poetry package poetry import ( "fmt" "os" "path/filepath" "strings" "time" packit "github.com/paketo-buildpacks/packit/v2" "github.com/paketo-buildpacks/packit/v2/chronos" "github.com/paketo-buildpacks/packit/v2/postal" "github.com/paketo-buildpacks/packit/v2/sbom" "github.com/pa...
#!/usr/bin/env bats ######################################################################################################################## # Test remove command ######################################################################################################################## load test_helper @test '"cls" emp...
cd /storage/home/users/pjt6/phy/orthofinder python /storage/home/users/pjt6/misc_python/BLAST_output_parsing/Blast_RBH_two_fasta_file_evalue.py --threads 2 -o ../GCA_001707905.2_PkChile2v2.0_cds_from_genomi.fa_GCA_002911725.1_ASM291172v1_cds_from_genomi.fa GCA_001707905.2_PkChile2v2.0_cds_from_genomi.fa GCA_002911725...
function stringsConstruction(a, b) { let count = 0; while (true) { for (let x of a) { if (b.indexOf(x) < 0) return count; b = b.replace(x, ""); } count++; } } function stringsConstruction(a, b) { return Math.min( ...a .split("") .map(i => Math.floor((b.split(i).length - ...
<filename>seeds-db/src/main/java/com/github/smallcreep/cucumber/seeds/storage/StorageWithoutIids.java<gh_stars>1-10 /* * MIT License * * Copyright (c) 2018 <NAME> (@smallcreep) <<EMAIL>> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentatio...
<filename>api/test/unit/routes/policies.test.js 'use strict'; var request = require('supertest'); var expect = require('chai').expect; var fs = require('fs'); var path = require('path'); var settings = require(path.join(__dirname, '../../../lib/config/setting.js'))((JSON.parse( fs.readFileSync(path.join(__dirname, '...
#pragma once #include <goliath/servo.h> #include "basic_command.h" #include "../handles.h" namespace goliath::commands { class MoveArmCommand : public BasicCommand { public: explicit MoveArmCommand(const size_t &id); private: void execute(handles::HandleMap &handles, const proto::Command...
// // HotViewController.h // MyCar // // Created by 🐵 on 16-5-26. // Copyright (c) 2016年 MC. All rights reserved. // #import "BaseBBsViewController.h" @interface HotViewController : BaseBBsViewController @end
/** * Copyright 2020 Google 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
<gh_stars>1-10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.arrowDownLight = void 0; var arrowDownLight = { "viewBox": "0 0 512 512", "children": [{ "name": "path", "attribs": { "fill-rule": "evenodd", "clip-rule": "evenodd", "d": "M0,256c0,141.40...
#!/bin/bash echo "install session..." ERROR_CODE_EXTENSION_HOME=10 ERROR_CODE_INSTALL=200 if test -z $DEBIAN_EXTENSION_HOME; then echo "Debian extension home path must be not empty!" exit $ERROR_CODE_EXTENSION_HOME fi ARRAY=(\ "dbus" \ "libpam-systemd") SIZE=${#ARRAY[@]} for ((i = 0; i < SIZE; i++)); do IT...
#!/bin/bash echo "Maximizing CPU & GPU clocks within the current" echo "performance mode" if [ -f ~/jetson_clocks.sh ]; then # For JetPack 3.3 and below sudo ~/jetson_clocks.sh sudo ~/jetson_clocks.sh --show else # For JetPack 4.2 and above sudo jetson_clocks sudo jetson_clocks --show fi
#!/bin/bash #SBATCH --job-name=/data/unibas/boittier/test-neighbours2 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --partition=short #SBATCH --output=/data/unibas/boittier/test-neighbours2_%A-%a.out hostname # Path to scripts and executables cubefit=/home/unibas/boittier/fdcm_project/mdcm_bin/cubefit.x fdcm=/home/uni...
<filename>2A. C++ Advanced (STL)/Attic/functor-varargs.cpp // GB derived from http://stackoverflow.com/questions/27604128/c-stdfunction-like-template-syntax #include <functional> std::function<void(int)> f1; std::function<int(std::string, std::string)> f2; #include <iostream> using namespace std; template <typename F...
#!/bin/bash # This script intends to change the instance type of an instance started by Auto Scaling Group. # It does not change the existing Launch Configuration in the Auto Scaling Group. # Set to fail script if any command fails. set -e # Define the help menu help_menu() { echo "Usage: ${0##*/} --name-tag ...
#!/bin/bash set -ex # Install Docker # Random, unaudited, but "official" script from the internet. # What could possibly go wrong? ¯\_(ツ)_/¯ curl -sSL https://get.docker.com | sh # sudo usermod -aG docker pi
using System; class Program { static void Main(string[] args) { int[] arr = new int[] {2, 4, 10, 3, 8}; int max = arr[0]; for (int i = 0; i < arr.Length; i++) { if (arr[i] > max) { max = arr[i]; } } Console.W...
ssh bwg "cd /var/www/blog && git pull origin master"
DELETE FROM table_name WHERE column_name = 'inactive';
// Before refactoring: class Item { .. } class Basket { // .. float getTotalPrice(Item i) { float price = i.getPrice() + i.getTax(); if (i.isOnSale()) price = price - i.getSaleDiscount() * price; return price; } } // After refactoring: class Item { // .. float getTotalPrice() { float price = getPrice()...
<filename>pkg/band/band.go<gh_stars>0 // Copyright © 2019 The Things Network Foundation, The Things Industries B.V. // // 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.ap...
#ifndef _UTILS_H_ #define _UTILS_H_ #include <iostream> #include <mutex> using namespace std; mutex stdout_mutex; /* thread-safe cout */ template <class T> void print(T t) { stdout_mutex.lock(); std::cout << t; stdout_mutex.unlock(); } template <class T, class... Args> void print(T t, Args... args) { stdout...
/* Copyright 2021 Adobe. All rights reserved. This file is licensed to you 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 agre...
<filename>commonlib/src/main/java/com/common/manager/UserManager.java package com.common.manager; import android.text.TextUtils; import com.common.constant.Const; import com.tencent.mmkv.MMKV; import androidx.annotation.Keep; /** * Created by Richard on 2018/7/31 * 用户信息管理类 */ @Keep public class UserManager { // ...
package here import "github.com/mdwhatcott/helps/here/there" func JoinedFileLine(sep string) string { return there.Locate(1).Joined(sep) } func FileLine() (string, int) { return there.Locate(1).FileLine() } func Line() int { return there.Locate(1).Line() } func File() string ...
<gh_stars>1-10 package binary_search; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; /** * * @author minchoba * 백준 16434번: 드래곤 앤 던전 * * @see https://www.acmicpc.net/problem/16434/ * */ public class Boj16434 { private static final long INF = Long.MAX_VALUE; ...
<gh_stars>0 // @ts-ignore import abiDecoder from 'abi-decoder' import Web3 from 'web3' import crypto from 'crypto' import { HttpProvider } from 'web3-core' import { toHex, keccak256 } from 'web3-utils' import * as ethUtils from 'ethereumjs-util' import { Address } from '../../src/relayclient/types/Aliases' import { I...
class File: """A simple file class""" def __init__(self, name, size, type): self.name = name self.size = size self.type = type def get_name(self): return self.name def get_size(self): return self.size def get_type(self): return self.type
import os import tensorflow as tf def save_predictions_to_tsv(estimator, predict_input_fn, output_dir): result = estimator.predict(input_fn=predict_input_fn) output_predict_file = os.path.join(output_dir, "test_results.tsv") with tf.gfile.GFile(output_predict_file, "w") as writer: num_written_...
<filename>product-group-business-impl/src/main/java/tr/com/minicrm/productgroup/business/ProductGroupDoesNotExistException.java package tr.com.minicrm.productgroup.business; public class ProductGroupDoesNotExistException extends RuntimeException { private static final long serialVersionUID = -394078545391923795L; ...
#!/bin/bash { cat <<EOF (define (convert-psd-to-jpg src dest) (let* ( (image (car (file-psd-load RUN-NONINTERACTIVE src src))) (drawable (car (gimp-image-get-active-drawable image))) (img_width nil) (img_height nil) (new_layer nil) (merged_layers nil) ) (set! img_width (car...
import networkx as nx class EdgeBetweennessCentrality: def __init__(self, normalized, weight, max_iterations): self.normalized = normalized self.weight = weight self.max_iterations = max_iterations def calculate(self, graph): G = nx.Graph(graph) edge_betweenness = nx.ed...
package com.product.controller; import com.product.dto.Product; import com.product.service.ProductService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.sql.SQLException; import java.util.List; @RestController public class ProductControll...
package com.abner.playground.designpattern.factorymethod; public class BMWFactory implements ICarFactory{ @Override public Car buildCar() { return new BMW(); } }
/** * @license AngularJS v1.5.0-rc.2 * (c) 2010-2016 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) {'use strict'; /** * @ngdoc module * @name ngAria * @description * * The `ngAria` module provides support for common * [<abbr title="Accessible Rich Internet Applicat...
#include "gtest/gtest.h" #include "util/util.h" #include "util/data_filler.h" namespace { void ZeroFillTest() { cux::DataFiller filler; int len = 20; cux::half *arr = new cux::half[len]; filler.ZeroFill(len, arr); for (int i = 0; i < len; i++) { EXPECT_EQ(float(arr[i]), 0); } delete[]arr; } temp...
use regex::Regex; fn process_positions(input_data: &str) -> Result<Vec<i32>, String> { let re = Regex::new(r"\((\d+), (\d+)\)").unwrap(); let mut positions = Vec::new(); for caps in re.captures_iter(input_data) { let x: i32 = caps.get(1).unwrap().as_str().parse().map_err(|e| format!("{:?}", e))?; ...
var express = require("express"); var app = express(); app.use(express.static(__dirname)); app.get("/", function (request, response){ response.sendFile(__dirname+"/postman.html"); }); app.listen(5000); console.log("Something awesome to happen at http://localhost:5000");
<gh_stars>0 package co.com.bancolombia.commons.jms.api; import javax.jms.JMSContext; import javax.jms.JMSException; import javax.jms.Message; public interface MQMessageCreator { Message create(JMSContext context) throws JMSException; }
#include "input/joystick.hpp" void Joystick::setState(unsigned int state) { this->state = state; } void Joystick::release() { state = JOYSTICK_NONE; }
#!/bin/bash . ./_error_handling.sh . ./_config.sh . ./_common_functions.sh # To keep my kernel minimal I want to disable these things that I'm not # actively using. They're interesting enough that they warrant additional # research and when I get there I'll want to turn them on. log "Disabling features that may be u...
#!/bin/sh -e set -x xsltproc merge.xsl index.xml > tmp.xml xsltproc uniq.xsl tmp.xml > bla.xml
#!/bin/bash echo $PATH arch=$(dpkg --print-architecture) case "$arch" in amd64) echo Architecture: amd64 wget --no-check-certificate https://cdn.statically.io/gh/simonpla/ArduinoFingerprintLogin/main/releases/0.1/linux/main_amd64.afplogin ;; i386) echo Architecture: i386 wg...
public class SoilProfile { public string Name { get; set; } public double FieldWaterCapacity { get; set; } public double WiltWaterCapacity { get; set; } public double ReadilyEvaporableWater { get; set; } public double TotalEvaporableWater { get; set; } public string Description { get; set; } ...
package com.touch.air.mall.order; import com.touch.air.mall.order.entity.OrderEntity; import com.touch.air.mall.order.entity.OrderReturnReasonEntity; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; import org.springframework.amqp.core.AmqpAdmin; import org.springframework.amqp.core.Binding; import...
def is_rename_allowed(oldname, newname, allowed_type): if oldname != '' and newname.split('.')[-1] in allowed_type: return True else: return False
#pragma once #warning USING DEVELOPMENT IDs namespace ladspa_ids { constexpr auto peaking = 100; constexpr auto linkwitz_riley_lowpass = 108; constexpr auto linkwitz_riley_highpass = 116; constexpr auto low_shelf = 124; constexpr auto high_shelf = 132; constexpr auto delay = 140; constexpr auto invert = 148; constexp...
const express = require('express'); const request = require('request'); // Create an express application const app = express(); // An API endpoint to get the current temperature app.get('/temperature', (req, res) => { const city = req.query.city; const weatherURL = `https://api.openweathermap.org/data/2.5/weather?q...
/* * 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 required by app...
<reponame>TingKaiChen/B-SHOT-SLAM<filename>include/bshot_headers_bits.h #ifndef headers_bshot_bits #define headers_bshot_bits #include <iostream> #include <bitset> #include <vector> #include <ctime> #include <chrono> #include <dirent.h> // for looping over the files in the directory #include <pcl/point_types.h> #inc...
<gh_stars>0 require 'test_helper' describe BrNfe::Product::Operation::NfeDownloadNf do subject { FactoryGirl.build(:product_operation_nfe_download_nf) } let(:gateway) { FactoryGirl.build(:product_gateway_web_service_svrs) } before do subject.stubs(:gateway).returns(gateway) end describe '#aliases' do it { ...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package operators; import java.lang.Math; import Evaluator.Operand; /** * * @author handa */ public class PowerOperator extends Op...
package com.github.starter.core.exception; import java.util.Arrays; public enum StatusCodes { OK(200), BAD_REQUEST(400), NOT_FOUND(404), UNAUTHORIZED(401), FORBIDDEN(403), INTERNAL_SERVER_ERROR(500); private int code; private StatusCodes(int code) { this.code = code; } public int getCode...
#!/bin/sh cp $1/ClickCounter-other.spec.js src/__tests__/
#!/bin/bash gcloud beta compute network-endpoint-groups create sumservice-neg-$1 \ --region=$1 \ --network-endpoint-type=SERVERLESS \ --cloud-run-service=sumservice gcloud beta compute backend-services add-backend --global sumservice-backend \ --network-endpoint-group-region=$1 \ --network-endpoin...
def find_closest_value(input_array, target): closest_value = float('inf') for array in input_array: for num in array: if abs(target - num) < abs(target - closest_value): closest_value = num return closest_value input_array = [[1, 5, 10], [3, 6, 8], [8, 11, 15]] target = ...
// Image.h // // An image class that can load a file from disk into main memory and to VRAM. // // Copyright (c) 2019-2022 <NAME>. // Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby // granted, provided that the above copyright notice and this permiss...
import consola from 'consola' import yargs from 'yargs' import { DruxtDocgen } from '..' const argv = yargs .option('config', { alias: 'c', description: 'Path to config', type: 'string', }) .help() .alias('help', 'h') .argv const druxtDocgen = new DruxtDocgen(argv.config || null) async functio...
#!/bin/bash # Usage - from the repository root, enter # # ./releasing/localbuild.sh # # The script attempts to use cloudbuild configuration # to create a release "locally". # # See https://cloud.google.com/cloud-build/docs/build-debug-locally # # At the time of writing, # # https://pantheon.corp.google.com/cloud-b...
import doctest import unittest from zope import interface, component, schema from zope.testing.cleanup import cleanUp from z3c.form import testing def setUp(test): testing.setUp(test) test.globs.update(dict( interface=interface, component=component, schema=schema)) def tearDown(test)...
#!/usr/bin/env python # coding=utf-8 """ This file contains a collection of miscellaneous utility functions. """ from __future__ import absolute_import from __future__ import print_function import imp import os import shutil import stat import sys import tempfile import uuid __author__ = "<NAME>" __copyright__ = "Co...
package com.p.g.j.lenovo.jgp; import android.support.design.widget.BottomNavigationView; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.Image...
<filename>client/src/components/Loading.js import React, { Component } from 'react' import ReactDOM from 'react-dom' class Loading extends Component { render() { return ReactDOM.createPortal( <div className="ui dimmer modals visible active"> <div className="ui active inverted"> <div className="ui text lo...
import React, { useEffect, useState } from "react"; // import Navbar from "../components/Navbar"; import API from "./../utils/API"; import Logo from "../components/Logo"; import MenuItem from "../components/MenuItem"; import "../index.css"; function Pickup() { const [formState, setFormState] = useState({ _id: "5...
<filename>oauth2-server-boot/src/main/java/com/newnil/cas/oauth2/provider/config/SecurityConfig.java<gh_stars>100-1000 package com.newnil.cas.oauth2.provider.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.ann...
<reponame>thanhdanh/todo-app import React, { useState } from 'react'; import moment from 'moment'; import { EuiCheckbox, htmlIdGenerator, EuiTitle, EuiListGroupItem, EuiBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { ITodo, TodoPriority } from '../../types'; import { updateTodo, deleteTodo } from '../....
#!/usr/bin/env bash # Push HTML files to gh-pages automatically. # Fill this out with the correct org/repo ORG=icopy-site REPO=icopy-site.github.io # This probably should match an email for one of your users. EMAIL=chenjiajia1@gmail.com set -e git remote add gh-token "https://${GH_TOKEN}@github.com/$ORG/$REPO.git"; ...
#!/usr/bin/env bash set -e dir="$(pwd)" cacheDir="${CACHE_DIR:-"$HOME/.kibana"}" RED='\033[0;31m' C_RESET='\033[0m' # Reset color ### ### Since the Jenkins logging output collector doesn't look like a TTY ### Node/Chalk and other color libs disable their color output. But Jenkins ### can handle color fine, so this ...
#!/bin/sh cd $(dirname $0)/../web SDK="../../ext-6.0.1" sencha compile --classpath=app.js,app,$SDK/packages/core/src,$SDK/packages/core/overrides,$SDK/classic/classic/src,$SDK/classic/classic/overrides \ exclude -all \ and \ include -recursive -file app.js \ and \ exclude -namespac...
<reponame>matheusca/jamef<gh_stars>1-10 require 'spec_helper' items = [ Jamef::Item.new(10, 9, 8, 7, 6, 10.0), Jamef::Item.new(8, 7, 6, 5, 4, 10.0), ] describe Jamef::Cubage do before(:each) do @cubage = Jamef::Cubage.new(items) end it "should return the cubage" do @cubage.total.should == 6720 e...
PK
import os def process_config(cfg: dict, settings: dict): log_path = settings.get('log_path') if log_path and not os.path.isdir(log_path): os.mkdir(log_path) handlers = cfg.get('handlers', {}) for handler in handlers.values(): filename = handler.get('filename') if filename and l...
int[] arr = {2, 4, 5, 6, 7, 8}; int evenCount = 0; int oddCount = 0; for(int i = 0; i < arr.length; i++) { if(arr[i] % 2 == 0) { evenCount++; } else { oddCount++; } } Console.WriteLine("Number of even numbers: " + evenCount); Console.WriteLine("Number of odd numbers: " + oddCount);
// Setup view pager ViewPager viewPager = findViewById(R.id.view_pager); viewPager.setAdapter(new PageAdapter(getSupportFragmentManager())); // Setup tab layout TabLayout tabLayout = findViewById(R.id.tab_layout); tabLayout.setupWithViewPager(viewPager); // Create fragments Fragment fragment1 = new Fragment1(); Fragm...
'use strict'; const secret = require('./secret'); const keepAlive = require('./keepAlive'); const auth = require('./auth'); module.exports = { secret, keepAlive, auth };
set echo off set feedback off set linesize 512 prompt prompt All Operators in Database prompt SELECT OWNER, OPERATOR_NAME, NUMBER_OF_BINDS FROM DBA_OPERATORS ORDER BY OWNER, OPERATOR_NAME;
#!/bin/bash # Copyright 2017 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); . $(dirname $0)/../common.sh set -x rm -rf $CORPUS fuzz-*.log mkdir $CORPUS test_source_location() { SRC_LOC="$1" echo "test_source_location: $SRC_LOC" [ -e $EXECUTABLE_NAME_BASE ] && ...
import numpy as np print("--------------------------------------") print("eindimensionale Arrays indizieren") print("--------------------------------------") F = np.array([1, 1, 2, 3, 5, 8, 13, 21]) # Ausgabe erstes Element print(F[0]) # Ausgabe letzes Element print(F[-1]) S = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]...
export BROWSERSTACK_KEY="your_browserstack_access_key" export BITBUCKET_COMMIT="your_bitbucket_commit_identifier" cd AtlasKit/build/bin ./browserstack.tunnel.start.sh
#!/bin/bash NODE_PATH=$(which node) USER1='0x5399850AB7BFE194FA1594F8051329CcC8aCfd56' # owner of token, savebox contract USER2='0x02c3d28f9d2618f03f8a499774ac28332471ae6a' USER3='0x5ba199b049453802cd3ddaaf45781c8ab31df5e2' SAVEBOX='0x590061696601268f4784822F546A8CdB5388b7a8'
<reponame>vovajr11/swf-client import React from 'react'; import ReactModal from 'react-modal'; import { ReactComponent as CloseIcon } from '../../assets/svg/close-icon.svg'; const customStyles = { content: { top: '50%', left: '50%', right: 'auto', bottom: 'auto', marginRight: '-50%', transfor...
<reponame>edge-fortress/OSS-13<filename>OSS13 Client/Sources/Network/SyncCommandsProcessor.cpp #include "SyncCommandsProcessor.h" #include <Client.hpp> #include <Graphics/Window.hpp> #include <Graphics/UI/UI.hpp> #include <Graphics/UI/UIModule/GameProcessUI.hpp> #include <Graphics/TileGrid/TileGrid.hpp> #include <Grap...
/** * Apache License * Version 2.0, January 2004 * http://www.apache.org/licenses/ * * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION * * 1. Definitions. * * "License" shall mean the terms and conditio...
<reponame>Andrey-V-Georgiev/SPRING_DATA package spring_data.ex_spring_data_intro.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import spring_data.ex_spring_data_intro.entities.Author; ...
#!/bin/sh EXEC=2D_af if ( [ $# -ne 1 ] ) ; then echo "This script requires the number of processors" exit fi rm -f "$YALES2_HOME"/lib/*.a make clean cd "$YALES2_HOME"/src make -j $1 cd - make mpirun -np $1 ./$EXEC
def solve(board): find = find_empty(board) if not find: return True else: row, col = find for i in range(1,10): if valid(board, i, (row, col)): board[row][col] = i if solve(board): return True board[row][col] = 0 return...
#!/bin/bash function findinjar() { for jar in `find . -iname \*.jar | sort -u`; do echo "$jar: "; jar tvf $jar | grep $1; done } function gcstat() { $JAVA_HOME/bin/jstat -gcutil -h 10 $1 5s } function heapSummary() { $JAVA_HOME/bin/jmap -heap $1 } function threadDump() { $JAVA_HOME/bin/jstack $1; he...
/** * Copyright (c) 2016 Wind River Systems * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge,...
DELETE FROM Employee WHERE id NOT IN (SELECT MAX(id) FROM Employee GROUP BY name)
/* TITLE Draw a diagram Chapter12Exercise10.cpp Bjarne Stroustrup "Programming: Principles and Practice Using C++" COMMENT Objective: Draw the FLTK and helper GUI headers and source files hierarchical diagram, from Chapter 12.8. Input: - Output: Graph on screen. ...
let el = document.getElementsByClassName('classname')[0];
require 'rails' module Discretion class Railtie < ::Rails::Railtie initializer 'discretion.insert_middleware' do |app| if defined?(Clearance::RackSession) app.config.middleware.insert_after( Clearance::RackSession, Discretion::Middleware, ) end end end end
#smallrnaseq #!/bin/bash #torun #chmod u+x smallrnaseq.sh #./smallrnaseq.sh /home/fb416/projects/fabian/FB37/ BASEPATH=${1} for filepath in $BASEPATH/seq/*.fastq do filename=$(basename $filepath .fastq) qsub -o $BASEPATH/log/fastqc_$filename.out -e $BASEPATH/log/fastqc_$filename.err -N fastqc_$filename -pe slots 1 -...
#! /bin/bash #SBATCH -o /home/hpc/pr63so/di69fol/workspace/SWEET_2016_01_16/benchmarks_performance/rexi_tests/2016_01_06_scalability_rexi_fd_run2/run_rexi_fd_par_m4096_t004_n0128_r0896_a1.txt ###SBATCH -e /home/hpc/pr63so/di69fol/workspace/SWEET_2016_01_16/benchmarks_performance/rexi_tests/2016_01_06_scalability_rexi_...
# load the necessary library library(tidyverse) # sample list list <- c(1, 2, 3, 4, 5, 6, 7, 8) # calculate mean mean <- mean(list) # calculate standard deviation sd <- sd(list) # print the results print(paste("Mean: ", mean)) print(paste("Standard Deviation: ", sd))