text
stringlengths
1
1.05M
#!/usr/bin/env bash ############################################################################### # Twitter ############################################################################### # Disable smart quotes as it’s annoying for code tweets defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled...
#!/bin/bash echo 'TIME USS PSS'
<filename>src/gatsby-node.js const webpack = require("webpack") const fs = require(`fs`) const flatten = require("flat") // remove endings "/" and ".html" from fileNames const removeFileEndings = fileName => fileName.replace(/\/+$/, "").replace(".html", "") exports.onCreateWebpackConfig = ({ actions, plugins }, plu...
<reponame>xwf20050250/SmallUtils package com.smallcake.utils; import android.content.Context; public class DpPxUtils { private DpPxUtils() { /* cannot be instantiated */ throw new UnsupportedOperationException("cannot be instantiated"); } public static int dp2px(Context context, float dpVa...
<filename>node_modules/react-icons-kit/icomoon/underline.js<gh_stars>1-10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.underline = void 0; var underline = { "viewBox": "0 0 16 16", "children": [{ "name": "path", "attribs": { "fill": "#000000", "d": "M11...
package org.apache.tapestry5.integration.app1.base; import org.apache.tapestry5.annotations.Log; public abstract class InheritBase { @Log public void setupRender() { } }
<reponame>moyudyz/gin_vue_admin_test package core import ( "fmt" "gin-vue-admin/config" "gin-vue-admin/global" "gin-vue-admin/utils" "io" "os" "strings" "time" "github.com/gin-gonic/gin" rotatelogs "github.com/lestrrat/go-file-rotatelogs" oplogging "github.com/op/go-logging" ) const ( logDir = "log"...
/* eslint global-require: off */ import electron, { app, clipboard, BrowserWindow } from 'electron'; import { autoUpdater } from 'electron-updater'; import log from 'electron-log'; import MenuBuilder from './utils/menu'; import tray from './utils/tray'; import config, { installExtensions } from './config'; import { ...
/***** License -------------- Copyright © 2017 Bill & Melinda Gates Foundation The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the Licens...
#!/bin/bash set -e # 6.52. Ninja-1.10.0 # Ninja is a small build system with a focus on speed. echo "Building Ninja..." echo "Approximate build time: 0.3 SBU" echo "Required disk space: 89 MB" tar -xf /sources/ninja-*.tar.* -C /tmp/ \ && mv /tmp/ninja-* /tmp/ninja \ && pushd /tmp/ninja # Add the capability to u...
#!/bin/bash rm cliStdo.log &> /dev/null timeout 8 socat -x -v PTY,link=modem0 PTY,link=modem1& sleep 1 timeout -s SIGINT 6 nodejs ServerUIntCfg/main.js > srvStdo.log 2> srvStdr.log& sleep 3 timeout -s SIGINT 4 ./ClientUIntCfg/ClientUIntCfg > cliStdo.log 2> cliStdr.log& sleep 5 #printf "Cli stdo:\n\n" cat cliStdo.lo...
import { DynamoDB } from "aws-sdk"; import { News, NewsSource } from "../../common/models"; import { Event } from "./models"; import { atob, logWarmState } from "./utils"; // Environment variables const { REGION, NEWS_TABLE_NAME = "", SOURCES_TABLE_NAME = "", MEDIA_URL, DEFAULT_LIMIT, MAX_LIMIT, SUMMARY...
<reponame>FOCONIS/ebean<gh_stars>1-10 package io.ebean.bean; /** * Holds information on mutable values (like plain beans stored as json). * <p> * Used internally in EntityBeanIntercept for dirty detection on mutable values. * Typically dirty detection is based on a hash/checksum of json content or the * original ...
def simplify(numerator, denominator): # find the gcd (greatest common divisor) gcd = gcd(numerator, denominator) # divide both numerator and denominator by the gcd simplified_numerator = int(numerator/gcd) simplified_denominator = int(denominator/gcd) return simplified_numerator, simplifi...
#include <immintrin.h> __m256i compareVectors(__m256i a, __m256i b) { __m256i greaterThanMask = _mm256_cmpgt_epi64(a, b); return greaterThanMask; } int main() { __m256i vectorA = _mm256_set_epi64x(10, 20, 30, 40); __m256i vectorB = _mm256_set_epi64x(25, 15, 35, 45); __m256i result = compareVe...
const average = (arr) => { let sum = 0; arr.forEach(num => { sum += num; }); return sum/arr.length; }; console.log(average([2, 4, 6, 8])); // Prints 5
#! /bin/bash go run . -region=sh -zone=sh001 -deploy.env=dev -logtostderr=true
#!/bin/sh -e # # Copyright (c) 2009-2015 Robert Nelson <robertcnelson@gmail.com> # # 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...
<gh_stars>1-10 class User < ActiveRecord::Base has_many :restores acts_as_authentic end
<filename>src/main/java/frc/robot/commands/moveArm.java<gh_stars>0 package frc.robot.commands; import edu.wpi.first.wpilibj.command.Command; import edu.wpi.first.wpilibj.DigitalInput; import frc.robot.OI; import frc.robot.subsystems.Arm; public class moveArm extends Command { private OI oi; private Arm arm; ...
<filename>client/src/settings.js export default { colors: { vuetify_themes: { light: { background: "#FFFFFF", header: "#FFFFFF", footer: "#F1F1F1", primary: "#1967C0", secondary: "#424242", accent: "#...
class Customer: def __init__(self, name, phone_number): self.name = name self.phone_number = phone_number def get_name(self): return self.name def get_phone_number(self): return self.phone_number
#include "Includes.hpp" void* __cdecl operator new(size_t size, POOL_TYPE pool, ULONG tag) { PVOID newAddress; newAddress = ExAllocatePoolWithTag(pool, size, tag); // // Remove remenants from previous use. // if (newAddress) { memset(newAddress, 0, size); } return newAddress; } void __cd...
var stgr; stgr = stgr || {}; stgr.updateView = (function() { 'use strict'; var beforeUpdate, trackGA, update, _computePageTitle, _registerEventListeners, _removeBodyClasses, _updateBodyClasses, _updateCurrentPage; beforeUpdate = function(request) {}; update = function(type) { var currentPage; if (type...
package com.dg.examples.restclientdemo; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import android.widget.Toast; import com.dg.examples.restclientdemo.communication.GoogleService; import com.dg.examples.restclientdemo.communication.requests.PatchRequest; import com.dg.example...
// query the element const elem = document.querySelector('#elem'); // set initial animation const animation1 = elem.animate([ {transform: 'scale(1)'}, {transform: 'scale(1.5)'}, ], { duration: 500, fill: 'forwards' }); // set delay animation1.addEventListener('finish', () => { setTimeout(() => { // set another an...
#!/usr/bin/with-contenv bash # ============================================================================== # Community Hass.io Add-ons: SSH & Web Terminal # Configures the SSH daemon # ============================================================================== # shellcheck disable=SC1091 source /usr/lib/hassio-ad...
<reponame>NIRALUser/BatchMake // Id /*************************************************************** * FLU - FLTK Utility Widgets * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University * * This file and its content is protected by a software license. * You should have received a cop...
<gh_stars>1-10 var Service, Characteristic, DoorState // set in the module.exports, from homebridge var pfio = require("piface-node-12") pfio.init() module.exports = function(homebridge) { Service = homebridge.hap.Service Characteristic = homebridge.hap.Characteristic DoorState = homebridge.hap.Characteristic.Cu...
#!/bin/bash SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" if [ -e "$SCRIPT_DIR/requirements.txt" ];then pip install -r "$SCRIPT_DIR/requirements.txt" fi install "$SCRIPT_DIR/syscall_searcher.py" "$HOME/.local/bin" install "$SCRIPT_DIR/syscall_sigs.sh" "$HOME/.local/bin"
// This file is part of SWGANH which is released under the MIT license. // See file LICENSE or go to http://swganh.com/LICENSE #pragma once #include <exception> #include <functional> #include <memory> #include <unordered_map> #include <boost/noncopyable.hpp> #ifdef WIN32 #include <concurrent_unordered_map.h> #else #...
static void insertionSort(int[] arr) { int n = arr.Length; for (int i = 1; i < n; ++i) { int key = arr[i]; int j = i - 1; /* Move elements of arr[0..i-1], that are greater than key, to one position ahead of their current position */ while (j >= 0 && arr[j] > key) { arr[j + 1...
#!/usr/bin/env bash # local version: 1.2.0.0 @test "1" { #[[ $BATS_RUN_SKIPPED == true ]] || skip run bash grains.sh 1 [[ $status -eq 0 ]] [[ $output == "1" ]] } @test "2" { [[ $BATS_RUN_SKIPPED == true ]] || skip run bash grains.sh 2 [[ $status -eq 0 ]] [[ $output == "2" ]] } @test "3" { [[ $BA...
/* Copyright 2021 freecodeformat.com */ package com.littlejenny.gulimall.order.to.paypal.create; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; /* Time: 2021-08-28 20:19:7 @author freecodeformat.com @website http://www.freecodeformat.com/json2javabean.php */ @Data publ...
'use strict'; function toObj(module) { var obj = { uid: module.uid, type: module.type }; if (module.sourceModuleCount > 0) { var children = []; for (var i = 0; i < module.sourceModuleCount; i++) { children[i] = module.sourceModules[i].uid; ...
import React from 'react' import reactCSS from 'reactcss' import { Eyedropper } from '../common' import ColorizeIcon from './ColorizeIcon' export const ChromeEyedropper = (props) => { const styles = reactCSS({ 'default': { wrap: { position: 'relative', display: 'flex', justifyConten...
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" # This protects against multiple targets copying the same framework dependency at the same time....
def statistics(data): # Compute min, mean, max of the data min_val = min(data) max_val = max(data) mean_val = sum(data)/len(data) # Print the result print("Minimum:", min_val) print("Maximum:", max_val) print("Mean:", mean_val) data = [11, 4, 8, 10, 5, 9, 6] statistics(data) Output: M...
<filename>offer/src/main/java/com/java/study/zuo/vedio/basic/chapter2/ShortestEnd.java package com.java.study.zuo.vedio.basic.chapter2; /** * <Description> * 给定一个字符串,往字符串后添加字符编程str2,要求整体回文,且最短 * * @author hushiye * @since 2020-08-20 22:43 */ public class ShortestEnd { public static char[] manacherString(St...
# sliderdemo.py # Demo of the slider control courtesy of <NAME>. import win32con, win32ui from pywin.mfc import dialog class MyDialog(dialog.Dialog): ''' Example using simple controls ''' _dialogstyle = (win32con.WS_MINIMIZEBOX | win32con.WS_DLGFRAME | win32con.DS_MODALFRAME | win32con.WS_POPU...
#!/bin/bash file=/etc/resolv.conf while IFS= read -r line # IFS : inter field separator do # echo line is stored in $line echo $line done < "$file"
script_dir=$(dirname "$(readlink -f "$0")") export KB_DEPLOYMENT_CONFIG=$script_dir/../deploy.cfg WD=/kb/module/work if [ -f $WD/token ]; then cat $WD/token | xargs sh $script_dir/../bin/run_AtomicRegulonInference_async_job.sh $WD/input.json $WD/output.json else echo "File $WD/token doesn't exist, aborting." ...
<reponame>Fronikuniu/LavarcBT-portfolio import { useForm } from 'react-hook-form'; import { Link } from 'react-router-dom'; import { BsFacebook } from 'react-icons/bs'; import { FcGoogle } from 'react-icons/fc'; import { signInWithEmailAndPassword } from 'firebase/auth'; import { useState } from 'react'; import AuthIma...
export enum KernelProfilingInfoMask { None = 0, CmdExecTime = 0x00000001, }
# % escapes expanded in prompts setopt prompt_percent # Allow $ expansion in prompts setopt prompt_subst # Initialize the prompt autoload -U promptinit promptinit
<gh_stars>0 import React, { Component } from "react"; import CardList from "./components/CardList"; ///Implement card class class App extends Component { constructor(props) { super(props); this.state = { json: null }; } componentDidMount() { let endPoint = "https://api.weather.gov/gridpoin...
# Generated by Powerlevel10k configuration wizard on 2021-02-27 at 01:22 CET. # Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 59290. # Wizard options: ascii, rainbow, 24h time, 2 lines, solid, lightest-ornaments, sparse, # fluent, transient_prompt, instant_prompt=verbose. # Type `p10k configure` to g...
<reponame>streamglider/streamglider // // StreamCastViewController.h // StreamCast // // Created by <NAME> on 7/15/10. // Copyright 2010 StreamGlider, Inc. All rights reserved. // // This program is free software if used non-commercially: you can redistribute it and/or modify // it under the terms of the BSD 4 Cl...
#!/bin/bash #====================================== # Functions... #-------------------------------------- test -f /.kconfig && . /.kconfig test -f /.profile && . /.profile #====================================== # Greeting... #-------------------------------------- echo "Configure image: [$kiwi_iname]..." #========...
<filename>test/ajax.tests.js describe('CHIM AJAX Service', () => { const assert = chai.assert; let field1 = 'field1', field2 = 'field2', value1 = 'value1', value2 = 'value2'; const formData = [ { name: field1, value: value1 }, { name: field2, value: value2 } ...
def sumArray(arr): if not arr: return 0 else: return arr[0] + sumArray(arr[1:]) print(sumArray(arr))
package weixin.lottery.entity; import org.jeecgframework.core.common.entity.IdEntity; import javax.persistence.*; import java.util.Date; /** * 系统活动父类表 * Created by aa on 2016/1/21. */ @Entity @Table(name = "weixin_commonforhd") @Inheritance(strategy = InheritanceType.JOINED) public class WeixinCommonforhdEntity e...
export containerId=$(docker ps -l -q) xhost +local:`docker inspect --format='{{ .Config.Hostname }}' $containerId` docker start $containerId
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-shuffled/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-shuffled/1024+0+512-shuffled-first-256 --do_eval...
#ifndef CGEN_H_ #define CGEN_H_ #include <stdlib.h> #include <string.h> #include <stdio.h> #include <ctype.h> #include <stdarg.h> #include "schema.h" #define CJOB_FPRINTF(...) do { if (fprintf(__VA_ARGS__) < 0) \ return CJOB_IO_ERROR; } while (0) #define CJOB_FMT_HEADER_STRING(job, .....
<reponame>antoniny/codenation-central-error package com.challenge.service.dto; import com.challenge.entity.Role; import com.challenge.entity.User; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import lombok.NoArgsConstructor; import java.time.LocalDateTime; @Data @NoArgsConstructor public c...
<filename>src/main/java/moe/mkx/uimf/groupbuilder/model/LoginUser.java package moe.mkx.uimf.groupbuilder.model; import com.fasterxml.jackson.annotation.JsonProperty; import javax.validation.constraints.NotBlank; import java.util.UUID; public class LoginUser { private final UUID userID; @NotBlank private ...
#pragma once #include "ZZX/Core/Core.h" namespace ZZX { enum class FrameBufferTextureFormat { None = 0, // color RGBA8, RED_INTEGER, // depth/stencil DEPTH24STENCIL8, // defaults Depth = DEPTH24STENCIL8 }; struct FrameBufferTextureSpecification { FrameBufferTextureSpecification() = default;...
DJANGO_SETTINGS_MODULE=social_distribution.test_settings python3 manage.py test
#!/usr/bin/env bash # buildah-bud-demo.sh # author : ipbabble # Assumptions install buildah, podman & docker # Do NOT start the docker deamon # Set some of the variables below demoimg=buildahbuddemo quayuser=ipbabble myname="William Henry" distro=fedora distrorelease=28 pkgmgr=dnf # switch to yum if using yum #S...
<reponame>s00d/webpack-notifier import {join} from 'path'; import {contentImageSerializer, reduceArraySerializer, testChangesFlow as _testChangesFlow, PartialTestArguments} from './helpers/utils'; import CustomWarningPlugin from './helpers/CustomWarningPlugin'; import ChildCompilationPlugin from './helpers/ChildCompila...
const express = require('express'); const mysql = require('mysql'); const parser = require('body-parser'); const connection = mysql.createConnection({ host: 'localhost', user: 'root', password: '', database: 'mydb' }); connection.connect(function(err) { if (err) throw err; console.log('Connected to the database...
import { IGeofenceGroup } from "@/models/IGeofenceGroup"; import { IPictogram } from "@/models/IPictogram"; import { IStand } from "@/models/IStand"; import { ITerminalResource } from "@/models/ITerminalResource"; import { IVehicle } from "@/models/IVehicle"; class BaseModelDataService { private _pictogramData = ...
#!/bin/sh set -eu clang++ -fbracket-depth=999999 -march=native -mtune=native -std=gnu++11 -O3 -flto -fuse-ld=lld -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -Da24_hex='0x3039' -Da24_val='12345' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0...
public double calculate(double x) { return Math.pow(x, 2) + (3 * x) + 2; }
function install_xcode_cli { echo "Installing Xcode CLI tools..." xcode-select --install } function install_brew { echo "Installing Homebrew..." if !(hash brew 2>/dev/null); then ruby \ -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" \ </dev/null brew doctor...
#!/bin/bash INDIR=~/kostka-dir/Will_testing-metagenome-assemblers/DeepC_Metagenomes_Mason/trimmed2/size_filtered/paired_ends/CoupledReads/fasta_files for FILE in $(find $INDIR -type f -name "*sam"); do qsub -v INFILE=$FILE /nv/hp10/woverholt3/job_scripts/metagenome_scripts/multiple_qsub_sam2bam.pbs done
class Statistics::AverageBidsPerAuction def to_s Average.new( completed_auctions.map(&:bids).flatten.count, completed_auctions.count ).to_s end private def completed_auctions @_completed_auctions ||= AuctionQuery.new.completed end end
package org.odk.collect.geo; import static android.app.Activity.RESULT_OK; import static android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; import static org.jun...
<gh_stars>0 package com.zhcs.service; import com.zhcs.entity.InsureEntity; import java.util.List; import java.util.Map; //***************************************************************************** /** * <p>Title:InsureService</p> * <p>Description: 保险管理</p> * <p>Copyright: Copyright (c) 2017</p> * <p>Company: ...
<reponame>mephux/ssm<filename>state.go package ssm // StateList type for []string type StateList []string // States list of states type States []State // Callback type type Callback func() // State holds state metadata and // callbacks type State struct { Name string Initial bool To StateList From StateLi...
<reponame>iamfantaser/philosophers #include "../../includes/main.h" void philo_print(t_philosopher *philo, char *str) { sem_wait(philo->write_sem); printf("%lld %d %s", (ft_time() - philo->time_start) / 1000, philo->id, str); sem_post(philo->write_sem); } void philo_clear_sem_all(t_info *info) { sem_close(info-...
def find_largest_smallest(numbers): if not numbers: return (None, None) elif len(numbers) == 1: return (numbers[0], numbers[0]) else: largest = numbers[0] smallest = numbers[0] for i in numbers: if i > largest: largest = i if i ...
import os import sys from datetime import date, datetime from libs.database import db class CrudModel: dblite = None # a DbLite() object db_name = "comments.db" db_table = "comments" conn = None # a SQLite database connection handle def __init__(s...
#!/usr/bin/env bash # # This file detects the C/C++ compiler and exports it to the CC/CXX environment variables # if [[ "$#" -lt 2 ]]; then echo "Usage..." echo "detect-compiler.sh <Architecture> <compiler> <compiler major version> <compiler minor version>" echo "Specify the target architecture." echo "Specify...
<gh_stars>0 import React from 'react'; import { connect } from 'dva'; import Container from '../components/Container'; import PropTypes from 'prop-types'; import styles from './IndexPage.css'; class IndexPage extends React.Component { render(){ return ( <Container loading={this.props.loading}> ...
import { IGridSeparator } from '../../typings/interfaces' import { IColumnOperationFactory } from '../../typings/interfaces/grid-column-operation-factory.interface' import { Operation } from '../operation.abstract' export class GetColumnSeparators extends Operation { constructor(factory: IColumnOperationFactory) { ...
// 1788. 피보나치 수의 확장 // 2019.05.18 // 수학, 구현 #include<iostream> using namespace std; int d[1000001]; // d[i] : i번쨰 피보나치수 int main() { int n; cin >> n; int tmp = n; if (n < 0) tmp *= -1; d[0] = 0; d[1] = 1; for (int i = 2; i <= tmp; i++) { d[i] = d[i - 1] + d[i - 2]; d[i] %= 1000000000; } if (n < 0) // n...
<filename>extern/typed-geometry/src/typed-geometry/functions/objects/size.hh #pragma once #include <typed-geometry/types/size.hh> #include <typed-geometry/types/objects/aabb.hh> #include <typed-geometry/types/objects/box.hh> #include <typed-geometry/detail/operators/ops_pos.hh> namespace tg { template <int D, class...
import requests from bs4 import BeautifulSoup url = 'www.example.com' page = requests.get(url) soup = BeautifulSoup(page.content, 'html.parser') data = [element.text for element in soup.find_all()] print(data)
import UIKit class ViewController: UIViewController { var expenses = [Expense]() override func viewDidLoad() { super.viewDidLoad() } func addExpense(amount: Double, category: String) { expenses.append(Expense(amount: amount, category: category)) } } struct Expense { var amount: Double var ca...
<filename>src/containers/artists/ArtistsList.tsx import { Artist } from '@favid-inc/api'; import { StyleType, ThemedComponentProps, ThemeType, withStyles } from '@kitten/theme'; import { Input, InputProps, List, Text } from '@kitten/ui'; import { SearchIconOutline } from '@src/assets/icons'; import { ArtistCard, Artist...
# -*- sh -*- # Create $ZSH/run/u if it doesn't exist [[ -d $ZSH/run/u ]] || { mkdir -p $ZSH/run/u chmod 1777 $ZSH/run/u } # Create per-UID directory [[ -d $ZSH/run/u/$HOST-$UID ]] || { mkdir -p $ZSH/run/u/$HOST-$UID }
<filename>src/main/java/com/crowdin/client/sourcefiles/SourceFilesApi.java package com.crowdin.client.sourcefiles; import com.crowdin.client.core.CrowdinApi; import com.crowdin.client.core.http.HttpRequestConfig; import com.crowdin.client.core.http.exceptions.HttpBadRequestException; import com.crowdin.client.core.htt...
import { defineAsyncComponent } from 'vue' export const pagesComponents = { // path: / "v-8daa1a0e": defineAsyncComponent(() => import(/* webpackChunkName: "v-8daa1a0e" */"/Users/bytedance/yaoshen/yaoshenwang/docs/.vuepress/.temp/pages/index.html.vue")), // path: /aboutMe/aboutMe.html "v-586fde37": defineAsync...
package com.ahmetkilic.ealocationhelper; import android.support.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import static com.ahmetkilic.ealocationhelper.FunctionType.LAST_LOCATION; import static com.ahmetkilic.ealocationhelper.FunctionType.LOCATION_UPDATES;...
#!/bin/bash # # run_ci_tasks.sh [OPTIONS] [PATH TO SAMPLE APP] # where OPTIONS are: # -a to run Android CI tasks. # -i to run iOS CI tasks. # Defaults to -a -i. # set -euxo pipefail SCRIPT_DIRECTORY=`dirname "$0"` SCRIPT_NAME=`basename "$0"` # get platforms to build ANDROID=false IOS=false # Parse arguments OPT...
#!/bin/bash # this script expects to be ran from root of # quay repository. set -e Files=( 'util/ipresolver/aws-ip-ranges.json' 'revision_head' 'local-dev/jwtproxy_conf.yaml' 'local-dev/mitm.cert' 'local-dev/mitm.key' 'local-dev/quay.kid' 'local-dev/quay.pem' 'local-dev/supervisord.conf' 'local-dev/__pyca...
import java.util.Arrays; public class MaxNumbers { // function to return top 10 maximum values public static int[] getMaxNumbers(int[] arr) { int[] top = new int[10]; // sort array Arrays.sort(arr); // get top 10 maximum values for(int i=arr.length-1, j=0; j<10 && i>=0; i--, j++) { top[j] = arr[i]; } r...
<filename>azure/store.go package azure import ( "bufio" "encoding/base64" "encoding/binary" "fmt" "io" "os" "path" "strings" "time" az "github.com/Azure/azure-sdk-for-go/storage" "github.com/araddon/gou" "github.com/lytics/cloudstorage" "github.com/pborman/uuid" "golang.org/x/net/context" "golang.org/x...
<filename>MedasIoT/medas-iot-rbac/src/main/java/com/foxconn/iot/dto/DeviceTypeDto.java package com.foxconn.iot.dto; import java.util.Date; import javax.validation.constraints.NotBlank; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat.Shape; public class...
#!/usr/bin/env bash ./liquibase --classpath=scripts --logLevel debug --defaultsFile=azor-shop.properties "$@"
# Copyright (C) 2011, 2012, 2015 Internet Systems Consortium, Inc. ("ISC") # # 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 permission notice appear in all copies. # # THE SOFTWARE IS PROVID...
import Foundation class ReverseString { let originalString: String init(originalString: String) { self.originalString = originalString } func reversedString() -> String { var reversedString = "" for char in self.originalString { reversedString = "\(char)" + reversedString } return reversedString...
package com.lgq.servlet; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * @author lgq * @date 2019/10/25 */ public class FrameworkServlet extends HttpServlet {...
import csv def parse_table(data): table = [] lines = data.split("\n") # Get the headers headers = lines[0].split("|")[1:-1] # Get the rows for row in lines[1:]: row = row.split("|")[1:-1] row_dict = {key:value for key, value in zip(headers, row)} table.append(row_dict) ...
#!/bin/sh # WARNING: REQUIRES /bin/sh # # Install puppet-agent with shell... how hard can it be? # # 0.0.1a - Here Be Dragons # # Set up colours if tty -s;then RED=${RED:-$(tput setaf 1)} GREEN=${GREEN:-$(tput setaf 2)} YLW=${YLW:-$(tput setaf 3)} BLUE=${BLUE:-$(tput setaf 4)} RESET=${RESET:-$(tput...
#!/bin/bash chmod +x /usr/local/bin/redis-trib.rb VALID_REDIS_CONTAINERS=() for i in `docker ps -q`; do FIRST_ALIAS=`docker inspect --format '{{range .NetworkSettings.Networks}}{{(index (index .Aliases 0))}}{{end}}' "$i"` SECOND_ALIAS=`docker inspect --format '{{range .NetworkSettings.Networks}}{{(index (index ...
#!/bin/bash declare -a xxh64sums declare -a duplicates declare -a originals mainindex=0 workspace="$1" filecount_raw=0 duplicates_folder=""$workspace"/duplicates_found_by_simple_duplicator" ##### #bu fonksiyon bir dizinin icindeki her bir elemani alip bakiyor. #eger dosya ise sumini alip kaydediyor #eger klasorse; bos...
<gh_stars>10-100 /** * @fileoverview Closure Builder - Closure compiler config * * @license Copyright 2017 Google Inc. 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...