text
stringlengths
1
1.05M
#!/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 A...
def sort_list(list_of_emails): list_of_emails.sort() return list_of_emails print(sort_list(['bob@example.com', 'alice@example.com', 'jane@google.com', 'mary@example.com']))
<reponame>huangbin082/Bin package com.leetcode.offer; import org.testng.annotations.Test; import static org.testng.Assert.*; public class Solution_7Test { @Test public void testBuildTree() { Solution_7 solution_7 = new Solution_7(); int[] ints = new int[]{3,9,20,15,7}; int[] ints2 = ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-old/7-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-old/7-512+0+512-N-VB-ADJ-1 --do_eval --per_device_eval_...
/* * Copyright (c) 2017, MegaEase * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
import re def detect_credit_cards(text): matches = re.findall(r'\b(?:(?:\d(?:-| )){13,16}\d|\d{4}-\d{4}-\d{4}-\d{4})\b', text) return matches
def get_highest_result(list_in): highest_val = 0 for item in list_in: highest_val = max(highest_val, item) return highest_val
#!/bin/sh set -e tmp1=`mktemp` tmp2=`mktemp` trap "rm -f file.a f1 f2 f3 $tmp1 $tmp2; exit" 0 2 3 ########################################################################### #empty file list rm -f file.a ar -qv file.a file.a
#!/usr/bin/env bash # Generate HTML documentation and commit to the gh-pages branch # ## Release Steps # update package.json with version=$ver # npm publish --dry-run # git tag v$ver # ./make-docs.sh # git push origin master gh-pages # npm publish # set -e node_modules/.bin/typedoc src/index.ts \ --tsconfig tsconfig...
// Preload for Space SpaceScene.prototype.preload = function() { // Load images this.load.image("spaceshipNormal", "main/space/assets/spaceshipNormal.png"); this.load.image("spaceshipCannon", "main/space/assets/spaceshipCannon.png"); this.load.image("spaceshipDouble", "main/space/assets/spaceshipDouble.png"); ...
function longestSubstringWithoutRepeat (s) { let start = 0; let maxLength = 0; let seen = {}; for (let end = 0; end < s.length; end++) { let char = s[end]; if (seen[char]) { start = Math.max(start, seen[char]); } maxLength = Math.max(maxLength, end - start + 1); seen[char] = end + 1...
<filename>build/esm/component/dynamics/Gate.js import * as tslib_1 from "tslib"; import { ToneAudioNode } from "../../core/context/ToneAudioNode"; import { GreaterThan } from "../../signal/GreaterThan"; import { Gain } from "../../core/context/Gain"; import { Follower } from "../analysis/Follower"; import { optionsFrom...
<gh_stars>10-100 //============================================================================ // Copyright 2009-2020 ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. // In applying this licence, ECMWF does not...
<filename>Modules/ThirdParty/SiftFast/src/siftmex.cpp // Copyright (C) <EMAIL>), 2008-2009 // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // at ...
def compare_strings(str1, str2): return str1 == str2
<reponame>andromeda/mir propertyIsEnumerable.length = {}; propertyIsEnumerable.name = {};
<reponame>favourch/football-data-dot-org-visualiser<gh_stars>0 // variable to hold api token var api_token = "<KEY>"; // set headers $.ajaxSetup({ headers: { "X-Auth-Token": api_token } }); // variable to hold competitions var competitions = $("#competitions"); // variable to hold competition var comp...
<filename>src/math/Boj17355.java package math; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.StringTokenizer; /** * * @author exponential-e * 백준 17355번: <NAME> * * @see https://www.acmicpc.net/problem/17355 * */ public cla...
<filename>docs/html/search/functions_2.js var searchData= [ ['conformerrigiddockingengine',['ConformerRigidDockingEngine',['../class_smol_dock_1_1_engine_1_1_conformer_rigid_docking_engine.html#a543e3df802cf3990dd5518a40e08aa52',1,'SmolDock::Engine::ConformerRigidDockingEngine']]] ];
#!/usr/bin/env bash INCLUDE: ./../../test.opencaching.de/actions/activate-maintenance.sh
package de.bitbrain.braingdx.audio; import aurelienribon.tweenengine.TweenManager; import com.badlogic.gdx.assets.AssetManager; import de.bitbrain.braingdx.behavior.BehaviorManager; import de.bitbrain.braingdx.graphics.GameCamera; import de.bitbrain.braingdx.world.GameWorld; import org.junit.Test; import org.junit.run...
// Copyright 2006, 2007, 2008, 2010, 2011 The Apache Software Foundation // // 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 requ...
<filename>server/game/cards/characters/01/samwelltarly.js const DrawCard = require('../../../drawcard.js'); class SamwellTarly extends DrawCard { setupCardAbilities() { this.plotModifiers({ reserve: 1 }); } } SamwellTarly.code = '01127'; module.exports = SamwellTarly;
#!/bin/bash cd $AMI/ rm -rf $AMI/work/temp cp $AMI/examples/viral15raw/ $AMI/work/temp/viral15raw/ ls $AMI/work/temp/viral15raw
#!/usr/bin/env bash # # Copyright (c) 2009-2012 VMware, Inc. set -e base_dir=$(readlink -nf $(dirname $0)/../..) source $base_dir/lib/prelude_apply.bash ovf=$work/ovf mkdir -p $ovf disk_size=$(($(stat --printf="%s" $work/${stemcell_image_name}) / (1024*1024))) # 512 bytes per sector disk_sectors=$(($disk_size * 2...
<gh_stars>0 #include <Core/Utils/ConfigReader.h> #include <fstream> namespace Lunia { Config::Config(const char* filename) { if (!FileExists(filename)) Logger::GetInstance().Exception("Could not find config file provided => {0}", filename); ReadConfigFile(filename); } bool Config...
#!/bin/bash set -e # Setup nexus as the maven proxy if [ -n "${NEXUS_REPO}" ] ; then mkdir -p "${MAVEN_CONFIG}" cat > ${MAVEN_CONFIG}/settings.xml <<EOF <settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/S...
def StringReplace(string, oldchar, newchar, case_sens=False): if case_sens == False: string = string.lower() oldchar = oldchar.lower() newString = "" for char in string: if char == oldchar: newString += newchar else: newString += oldchar retur...
// // Crappy barrels with kludged physics // #include "game.h" #include "barrel.h" #include "fmatrix.h" #include "mav.h" #include "pap.h" #include "statedef.h" #include "animate.h" #include "pcom.h" #include "psystem.h" #include "poly.h" #include "eway.h" #include "sound.h" #include "pow.h" #include "dirt.h" #ifndef P...
<reponame>dineshmm23/food_around<filename>app/src/main/java/com/opalfire/foodorder/activities/ResetPasswordActivity.java package com.opalfire.foodorder.activities; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Non...
#include <Veritas/Math/Complex.h> using namespace Veritas::Math; Complex::Complex() {} Complex::Complex(float32 a, float32 b) : a(a), b(b) {} Complex Complex::operator+(const Complex& c) const { return Complex(a+c.a, b+c.b); } Complex Complex::operator-(const Complex& c) const { return Complex(a-c.a, b-c.b); } Compl...
<gh_stars>0 /** * This namespace contains plugins which extend PIXI Object. * @namespace Yogame.plugins */ export {default as layer} from "./layer";
<reponame>MondayMorningHaskell/HaskellData class Person(object): # This definition hasn't changed from part 1! def __init__(self, fn, ln, em, age, occ): self.firstName = fn self.lastName = ln self.email = em self.age = age self.occupation = occ class Occupation(object): def __init__(self, na...
# frozen_string_literal: true module Rubanok VERSION = "0.2.1" end
package com.clj.blesample.net; public class UrlUtils { public static final String APIHTTP = "http://znshop.swzzkf.cn"; public static final String index_noconnected = APIHTTP + "/HardWare/Temperature/index_noconnected";//用户进入温度仪首页获取用户的信息(不链接蓝牙设备)接口 }
<reponame>leongaban/redux-saga-exchange import { initialCommunicationField } from 'shared/helpers/redux'; import * as NS from '../../namespace'; export const initial: NS.IReduxState = { communication: { loadFilteredOrders: initialCommunicationField, }, edit: { reportArchiveTotalPages: 1, }, data: { ...
#!/bin/bash # Copyright 2017 David Snyder # 2017 Johns Hopkins University (Author: Daniel Garcia-Romero) # 2017 Johns Hopkins University (Author: Daniel Povey) # # Copied from egs/sre16/v1/local/nnet3/xvector/tuning/run_xvector_1a.sh (commit e082c17d4a8f8a791428ae4d9f7ceb776aef3...
<gh_stars>1-10 import * as view from './view' import Controller from './controller' const { document, $ } = view $('select').each(function () { const $options = $(this).find('option') $options .eq(Math.floor(Math.random() * $options.length)) .prop('selected', true) }) function refill () { ...
<reponame>AITT-VN/xcontroller_arduino_lib /* LineArray.h */ #ifndef LINEARRAY_h #define LINEARRAY_h #include "Arduino.h" #include "PCF8574.h" #include "Wire.h" #define LINE_1 0 #define LINE_2 1 #define LINE_3 2 #define LINE_4 3 class LineArray { public: LineArray(int sda, int scl); int* read(); int...
<reponame>Crowntium/crowntium // Aleth: Ethereum C++ client, tools and libraries. // Copyright 2015-2019 Aleth Authors. // Licensed under the GNU General Public License, Version 3. #pragma once #include "TestFace.h" namespace dev { namespace eth { class Client; } namespace rpc { class Test: public TestFace { publi...
#!/usr/bin/env bash ############################## # Rare CNV Map Project # ############################## # Copyright (c) 2017 Ryan L. Collins # Distributed under terms of the MIT License (see LICENSE) # Contact: Ryan L. Collins <rlcollins@g.harvard.edu> # Code development credits availble on GitHub #Code to ...
#!/bin/bash CLEAN=1 #STACK=other-3 STACK=overcloud-0 METAL=deployed-metal-$STACK.yaml TMP=/tmp/ceph_nodes_$STACK grep cephstorage $METAL \ | grep -v CephStorageHostnameFormat \ | awk {'print $2'} > $TMP openstack overcloud delete $STACK --yes pushd ../metalsmith bash unprovision.sh $STACK rm -f deployed-{met...
#!/bin/sh _supernova() { local cur=${COMP_WORDS[COMP_CWORD]} local configs=$(cat "${XDG_CONFIG_HOME}"/supernova ~/.supernova ./.supernova 2> /dev/null) local possibilities=$(echo "${configs}" | sed -n '/^\[.*\]/ s_\[\(.*\)\].*_\1_p' | sort -u) COMPREPLY=( $(compgen -W "${possibilities}" -- $cur) ) } co...
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author <NAME> * @version 1.3 * @date Wed Aug 24 19:53:22 EDT 2011 * @see LICENSE (MIT style license file). */ package scalation.minima import scala.math.{abs, max, pow} import scalation.calculus.Differential.{Functio...
#!/usr/bin/env bash f=${1} path=`pwd` # XXX machine name depends on build type machine="maia01" # machine="maxnode2" echo "Path is ${path}" ssh ${machine} /bin/bash << EOF cd ${path}/.. pwd export LD_LIBRARY_PATH=/opt/gcc-4.9.2/lib64:${LD_LIBRARY_PATH} src/frontend/hwrun_maia ${path}/test_spmv_dfe ${f} | tee run...
export interface SitemapGeneratorOptions { pagesDirectory: string; exportDirectory: string; baseUrl?: string; exportFilename?: string; changeFreq?: string; sitemapPriority?: string; locales?: Array<string>; isSiteExcludedCallback?: Function; beforeFinishCallback?: Function; } export ...
#!/bin/bash # git remote add originbitbucket git@bitbucket.org:tttor/bibtex-entry.git # git remote add origin git@gitlab.com:tttor/bibtex-entry.git # https://askubuntu.com/questions/370697/how-to-count-number-of-files-in-a-directory-but-not-recursively echo '=== n entries ===' find ./entry -maxdepth 1 -type f | wc -l ...
package de.hswhameln.typetogether.client.proxy; import de.hswhameln.typetogether.networking.api.Document; import de.hswhameln.typetogether.networking.api.Lobby; import de.hswhameln.typetogether.networking.api.User; import de.hswhameln.typetogether.networking.api.exceptions.InvalidDocumentIdException; import de.hswhame...
#!/bin/bash -e find build/x86_64/obj/ -name "*.d" | xargs cat | grep '\.h:' | sed 's!:$!!' | sed 's!mldb/mldb/!mldb/!' | sort | uniq -c | sort -nr -k1 | head -n 100
# Import necessary libraries import pandas as pd import numpy as np import matplotlib.pyplot as plt # Load the data data = pd.read_csv("books_data.csv") # Define feature and target variables X = data['title'] y = data['category'] # Transform words into numerical features # Vectorize feature and target data from skle...
import cv2 import imageio import numpy as np # Initialize the video capture object cap = cv2.VideoCapture(0) # Initialize a list to store captured frames frames = [] try: while True: # Capture frame-by-frame ret, frame = cap.read() # Display the frame cv2.imshow('frame', frame) ...
<form> <label for="name">Name:</label> <input type="text" name="name" id="name" /> <label for="address">Address:</label> <input type="text" name="address" id="address" /> <label for="phone">Phone Number:</label> <input type="text" name="phone" id="phone" /> <input type="submit" /> </form>
from PyQt5 import QtCore import pickle COLUMN_COUNT = 5 COLUMN_COUNT2 = 3 class TableModel(QtCore.QAbstractTableModel): # Model for data def __init__(self, temp_headers): QtCore.QAbstractTableModel.__init__(self) self.__data = [] self.__headers = temp_head...
package com.ufrn.embarcados.reaqua.repository; import com.ufrn.embarcados.reaqua.model.WaterTank; import org.springframework.data.jpa.repository.JpaRepository; public interface WaterTankRepository extends JpaRepository<WaterTank, Long> { }
Template.preference.created = function () { this.autorun(function () { var mallParams = Session.get("mallParams"); var tmpmallParams = Router.current().params.query.mall;//for /?mall=0001 //console.log("mall.created: tmpmallParams="+tmpmallParams); if(tmpmallParams) { mallParams=tmpmallParam...
/* window.onload = function(){ $('#fab').draggable(function(){ }); window.document.addEventListener("touchmove", function(event){ event.preventDefault(); var tapX = event.touches[0].clientX; var tapY = event.touches[0].clientY; localStorage.setItem('tapX', tapX); localStorage.setItem('tapY'...
package cyclops.async.reactive.futurestream.pipeline.stream; import java.util.stream.Stream; public interface StreamWrapper<U> { public Stream<U> stream(); }
export PULUMI_CONFIG_PASSPHRASE= pulumi destroy --stack $1 --non-interactive -y
const number1 = 5; const number2 = 10; const calculation = (x, y) => { console.log(`Addition: ${x + y}`); console.log(`Subtraction: ${x - y}`); console.log(`Multiplication: ${x * y}`); console.log(`Division: ${x / y}`); }; calculation(number1, number2);
import urllib.request import json try: response = urllib.request.urlopen('http://example.com/api') data = json.loads(response.read().decode('utf-8')) except urllib.request.HTTPError as e: print("Error: ", e.code) except urllib.request.URLError as e: print("Error: ", e.reason) except: print("An unknown error o...
public String getDeviceType(int w) { if (w <= 420) { return "mobile"; } else if (w > 420 && w <= 768) { return "tablet"; } else if (w > 768 && w < 1024) { return "desktop"; } else { return "wide"; } }
<reponame>mschnieder/media_manager_plus DROP TABLE IF EXISTS `%TABLE_PREFIX%media_manager_plus_breakpoints`; ALTER TABLE `%TABLE_PREFIX%media_manager_type` DROP COLUMN `group`; ALTER TABLE `%TABLE_PREFIX%media_manager_type` DROP COLUMN `subgroup`;
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_fast_forward_twotone = void 0; var ic_fast_forward_twotone = { "viewBox": "0 0 24 24", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "rect", "attribs": { "fill": "none", ...
#include "z3D/z3D.h" #include "string.h" #include "custom_models.h" #include "objects.h" #include "settings.h" #define EDIT_BYTE(offset_, val_) (BASE_[offset_] = val_) u8 SmallKeyData[][7] = { { 0x00, 0x80, 0x00, 0x00, 0x00, 0xCC, 0x00 }, //Forest { 0x54, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00 }, //Fire { 0x0...
import test from 'ava'; import { Substitute, Arg } from '../../src/index'; class Key { private constructor(private _value: string) { } static create() { return new this('123'); } get value(): string { return this._value; } } class IData { private constructor(private _serverChec...
#!/bin/bash export overcloud_virt_type="kvm" export domain="lab1.local" export undercloud_instance="undercloud" export prov_inspection_iprange="192.168.24.51,192.168.24.91" export prov_dhcp_start="192.168.24.100" export prov_dhcp_end="192.168.24.200" export prov_ip="192.168.24.1" export prov_subnet_len="24" export pro...
#!/bin/bash # # Helper script for docker-compose app service. Ensures db services is actually # available before executing runserver command. # while !</dev/tcp/db/5432; do echo 'Waiting on db service; sleeping for 1 second.' sleep 1 done 2>/dev/null echo 'The db service is available.' ./manage.py runserver 0.0...
<reponame>cristidraghici/react-form-errors 'use strict'; exports.__esModule = true; exports.default = maxLength; var _lodash = require('lodash'); function maxLength(length, cannotBeEqual) { return function (data) { if (!cannotBeEqual && (0, _lodash.size)(data) <= length) { return null; ...
import React, {Component} from 'react' import Card from 'material-ui/Card' import Button from 'material-ui/Button' import TextField from 'material-ui/TextField' import Icon from 'material-ui/Icon' import PropTypes from 'prop-types' import {withStyles} from 'material-ui/styles' const styles = theme => ({ card: { ...
#include <stdio.h> int main() { int N = 20; for(int i = 0; i <= N; i++) { if(i % 5 == 0) { printf("Square of %d is %d\n", i, i * i); } } return 0; }
################################################## # Import Own Assets ################################################## from hyperparameter_hunter.metrics import ScoringMixIn, Metric, format_metrics, wrap_xgboost_metric from hyperparameter_hunter.metrics import get_formatted_target_metric, get_clean_prediction #####...
#!/bin/bash sudo docker logs -f godotengine-org--mariadb
package com.leetcode; import java.util.HashMap; import java.util.Map; public class Solution_13 { static Map<Character, Integer> map = new HashMap<>(); static { map.put('I', 1); map.put('V', 5); map.put('X', 10); map.put('L', 50); map.put('C', 100); map.put('D',...
<gh_stars>0 # Helper module to develop git-annex backends # # https://git-annex.branchable.com/design/external_backend_protocol/ # # Derived from AnnexRemote Copyright (C) 2017 <NAME> (GPL-3) """Interface and essential utilities to implement external git-annex backends """ import logging from abc import ( ABCMet...
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma on...
from flwr.common import Weights from typing import List, Tuple, Optional import numpy as np from .weighted_aggregate import Weighted_Aggregate def FedAdagrad_Aggregate( current_weights: Weights, results: List[Tuple[Weights, int]], eta=1.0, tau=1e-2, beta_1=None, beta_2=None, ) -> Weights: ...
#!/bin/bash for i in $(seq -f "%02g" 1 25) do GOFILE="./day_$i/main.go" if test -f "$GOFILE" then echo "#### Day $i ####" if test -f "$GOFILE" then echo "Go: " go run $GOFILE fi printf "\n" fi done
#!/bin/sh docker run --rm -it --tty --volume .:/app composer install
<reponame>neno--/ks package com.github.nenomm.ks.ktable; import org.apache.kafka.common.serialization.Serdes; import org.apache.kafka.streams.KeyValue; import org.apache.kafka.streams.kstream.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.stream.annotation.EnableBinding; ...
<filename>src/main/java/net/henbit/raytracing/life/hittable/Hittable.java package net.henbit.raytracing.life.hittable; import net.henbit.raytracing.life.AABB; import net.henbit.raytracing.life.HitRecord; import net.henbit.raytracing.life.Ray; import net.henbit.raytracing.life.Vector3; public abstract class Hittable {...
<reponame>CrafterKina/JustEnoughItems package mezz.jei.gui.ingredients; import javax.annotation.Nullable; import java.awt.Color; import java.awt.Rectangle; import java.util.Collection; import java.util.List; import com.google.common.base.Joiner; import mezz.jei.Internal; import mezz.jei.config.Config; impo...
package ormx; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Iterator; public class OrmIterator<T> implements Iterable<T>, Iterator<T>, AutoCloseable { final OrmObjectAdapter<T> adapter; final ResultSet resultSet; private boolean next; public OrmIterator(OrmObjectAdapter<T> ada...
def get_first_category(categories: list) -> str: return categories[0]["cat_name"]
import { isMaybeEmail, isMaybePhone } from '@authenticator/identity/validators'; describe('validators Test', (): void => { test('checks for possible email', (): void => { const tableTest = [ { email: '<EMAIL>', result: true, }, { email: '<EMAIL>', result: false, ...
#!/usr/bin/env bash cd $(dirname $0) rm -fr opera*.datadir rm *.log rm -f ./transactions.rlp
<reponame>vinci-project/goVncPVM<filename>goVncTCP/server.go package tcpServer import ( "encoding/hex" "encoding/json" "goVncPVM/goVncTCP/client" "goVncPVM/goVncTCP/tools" "goVncPVM/helpers" "log" "net" "runtime" "time" "github.com/go-redis/redis" "github.com/tidwall/evio" ) var redisDB *redis.Client var ...
import pygame def draw_split_rect_horizontal(display_surf, split_color, margin, height, m, window_shape): rect_y = (margin + height) * m rect = pygame.draw.rect(display_surf, split_color, [0, rect_y, window_shape[0], height])
#!/bin/sh # # 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 # "Licens...
class DatabaseError extends RuntimeError { constructor(message, errorCode) { super(message); this.errorCode = errorCode; } getErrorCode() { return this.errorCode; } } // Create an instance of DatabaseError and demonstrate its usage try { throw new DatabaseError('Connection failed', 500); } catch...
import reducer from './reducers' export { default as accountsOperations } from './operations' export { default as accountsTypes } from './types' export default reducer
<reponame>hallyn/lxd /* * An example of how to use lxd's golang /dev/lxd client. This is intended to * be run from inside a container. */ package main import ( "encoding/json" "fmt" "io/ioutil" "net" "net/http" "os" ) type DevLxdDialer struct { Path string } func (d DevLxdDialer) DevLxdDial(network, path s...
#!/bin/bash #### # Original source of the following script # Source : https://github.com/big-data-europe/docker-hadoop/blob/master/datanode/run.sh #### datadir=`echo $HDFS_CONF_dfs_datanode_data_dir | perl -pe 's#file://##'` if [ ! -d $datadir ]; then echo "Datanode data directory not found: $datadir" exit 2 fi ...
package controllers; import models.StateModel.SkillTreeModel; import models.StateModel.StatsModel; import utilities.GameStateManager; import utilities.KeyCommand.KeyCommand; import utilities.State.State; import views.StatsView; import views.View; import java.awt.event.KeyEvent; public class SkillTreeViewController...
#!/bin/bash eww close powertitle systemctl suspend
List<int> myList = new List<int>() {0, 5, 3, 2, 1, 4}; void SortListDescending(List<int> listToSort) { listToSort.Sort((a,b) => b.CompareTo(a)); } SortListDescending(myList); // After calling the SortListDescending() method, // myList will be sorted in descending order: {5, 4, 3, 2, 1, 0}
<reponame>samredway/cape-webservices # Copyright 2018 BLEMUNDSBURY AI 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 req...
"use strict"; const app = require("./express/server"); const { logger } = require("./express/utils/logger"); const { PORT } = require("./express/_constants"); const database = require("./express/db-config"); app.listen(PORT, () => { database().then(() => logger.info(`connected to mongodb database`)); logger.info(`...
<reponame>jonkumin/GV-Production<filename>src/cache.ts import { CustomCacheKey } from '@xdn/core/router' const ONE_HOUR = 60 * 60 const ONE_DAY = 24 * ONE_HOUR const queryParametersToExclude = [ 'utm_medium', 'utm_campaign', 'utm_source', 'utm_content', 'cjevent', '_hsenc', '_hsmi', 'hsCtaTracking', ...
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for USN-2881-1 # # Security announcement date: 2016-01-26 00:00:00 UTC # Script generation date: 2017-01-19 21:07:03 UTC # # Operating System: Ubuntu 12.04 LTS # Architecture: i386 # # Vulnerable packages fix on version: # - mysql-server-5.5:5.5.47-0ubuntu0.12.04...
<gh_stars>1-10 package xos import ( "io/ioutil" "os" "path/filepath" "strings" ) const ( MODE_DIR = 0 MODE_FILE = 1 ) // 返回下层所有文件或目录 func ListSubFiles(path string, mode int) ([]string, error) { var r []string d, err := ioutil.ReadDir(path) if err != nil { return r, err } for _, d := range d { if mode...