text
stringlengths
1
1.05M
<gh_stars>0 const Util = require('../../util/MitUtil.js'); const Discord = require('discord.js'); module.exports = { name: 'invite', description: 'Envia una invitacion del bot UwU', aliases: ['link'], usage: '', cooldown: 2, args: 0, catergory: 'Utilidad', async execute(client, message, args) { mes...
int[] array = {10, 4, 8, 3, 7, 6, 2, 9, 1, 5}; public void sortAscending(int[] array) { for (int i = 0; i < array.length - 1; i++) { int minIndex = i; for (int j = i + 1; j < array.length; j++) { if (array[j] < array[minIndex]) minIndex = j; } if (minIndex != i) { int temp = array[i]; array[i] =...
# # Copyright (C) 2011 The Android Open Source Project # # 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 ...
${PYTHON} -m pip install ./conda-store -vv --no-deps
<gh_stars>0 App = { web3Provider: null, contracts: {}, init: async function() { $.getJSON('../books.json', function(data) { var booksRow = $('#booksRow'); var bookTemplate = $('#bookTemplate'); for (i = 0; i < data.length; i ++) { bookTemplate.find('.panel-title').text(data[i].name...
#!/bin/bash # For use inside docker shell (github.com/mzedeler/dsh) echo "check_certificate = off" >> ~/.wgetrc wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash . /root/.nvm/nvm.sh nvm install v5.6.0 nvm use v5.6.0 npm install && npm run forever
DROP TABLE IF EXISTS `students`; CREATE TABLE `students` ( `id` int(9) unsigned NOT NULL AUTO_INCREMENT, `first_name` varchar(100) NOT NULL, `last_name` varchar(100) NOT NULL, `city` varchar(255) NOT NULL, `phone` varchar(255) NOT NULL, `gender` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `ad...
import pandas as pd import math import random from collections import defaultdict from opendp.smartnoise.sql.parse import QueryParser from opendp.smartnoise._ast.ast import Table from ._mechanisms.rand import laplace sys_rand = random.SystemRandom() def preprocess_df_from_query(schema, df, query_string): """ ...
def format_headers(headers): formatted_headers = "" for key, value in headers.items(): formatted_headers += f"{key}: {value}\n" return formatted_headers.strip() # Test the function with the given example headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/2010010...
import { TravelPerk } from '@services'; import { IStore } from '@store'; import { ILogger, toShortDateFormat } from '@utils'; import { IInvoice, IInvoiceLine, IManager, ITaxesSummaryItem } from './contracts'; export class Manager implements IManager { constructor( private readonly client: TravelPerk.IClie...
#ifndef LINKED_LIST_C #define LINKED_LIST_C #include "linkedList.h" local Node* linkedList_initNode(void*); inline ERROR_CODE linkedList_init(LinkedList* list) { memset(list, 0, sizeof(*list)); return ERROR(ERROR_NO_ERROR); } inline ERROR_CODE linkedList_add(LinkedList* list, void* data) { Node* node =...
<reponame>Mihran9991/async-forms-back<gh_stars>0 import { Sequelize } from "sequelize-typescript"; import { ModelAttributes, QueryOptionsWithWhere } from "sequelize"; import { Nullable } from "../types/main.types"; export class TableService { private sequelize: Sequelize; public constructor(sequelize: Sequelize)...
#!/bin/bash set -e dir=$(dirname "${BASH_SOURCE[0]}") cd $dir test -f .env && source .env chmod 777 ../../app/etc ../../media ../../var docker-compose up -d mysql apache sleep 4 echo "Starting services..." for i in $(seq 1 20); do sleep 1 docker exec openmage_mysql_1 mysql -e 'show databases;' 2>/dev/null | grep...
public static string GenerateRandomString() { stringchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"; char[] string = new char[8]; Random random = new Random(); for (int i = 0; i < 8; i++) { string[i] = stringchars[random.Next(stringchars.Length)]; ...
<gh_stars>0 package com.example.wbdemo.info.maindata; import java.io.Serializable; /** * Created by zhoujunyu on 2019/5/23. */ public class VisibleBean implements Serializable { /** * type : 0 * list_id : 0 */ private int type; private int list_id; public int getType() { ret...
SELECT product_id, MONTH(created_at) as month_number, COUNT(*) as total_purchases FROM purchases WHERE YEAR(created_at) = YEAR(CURRENT_DATE) GROUP BY product_id, MONTH(created_at) ORDER BY month_number, total_purchases DESC;
#include <iostream> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/serialization/split_member.hpp> class Point { private: int x; int y; friend class boost::serialization::access; template <class Archive> void save(Archive &ar, const unsigned ...
brew update brew install imagemagick
#!/bin/bash -xe # This script is meant to be run within a mock environment, using # mock_runner.sh or chrooter, from the root of the repository. get_run_path() { # if above ram_threshold KBs are available in /dev/shm, run there local suffix="${1:-lago}" local ram_threshold=15000000 local avail_shm=$(d...
#!/usr/bin/env bash main() { local cilium_started cilium_started=false for ((i = 0 ; i < 24; i++)); do if cilium status --brief > /dev/null 2>&1; then cilium_started=true break fi sleep 5s echo "Waiting for Cilium daemon to come up..." done ...
import java.io.*; public class Test { public static void main(String[] args) throws IOException { new File("foo").createNewFile(); new File("foo").delete(); // Don't flag: there's usually nothing to do new File("foo").mkdir(); new File("foo").mkdirs(); // Don't flag: the return value is uninformative/misleadi...
# install.sh is generated by ./extra/install.batsh, do not modify it directly. # "npm run compile-install-script" to compile install.sh # The command is working on Windows PowerShell and Docker for Windows only. # curl -o kuma_install.sh https://raw.githubusercontent.com/louislam/uptime-kuma/master/install.sh && sudo b...
#!/bin/sh # Build Google Cartographer for ROS from source (using catkin_ws) on Ubuntu 18.04 # TODO fix build failing sudo apt-get update sudo apt-get install -y python-wstool python-rosdep ninja-build stow if [ ! -d "~/catkin_ws" ] then mkdir -p ~/catkin_ws/src cd ~/catkin_ws catkin_make sudo rosdep...
// By KRT girl xiplus #include <bits/stdc++.h> #define endl '\n' using namespace std; int main(){ // ios::sync_with_stdio(false); // cin.tie(0); int N,K,L; cin>>N>>K>>L; vector<int> left,right; int t; for(int q=0;q<N;q++){ cin>>t; if(t==0); else if(t<=L/2)left.push_back(t); else right.push_back(L-t); } r...
/** * Contains the classes used to migrate old ArcGIS layers to the new one. */ package io.opensphere.arcgis2.migration;
#!/bin/bash composer install PHP_FILES=$(find . -path ./vendor -prune -o -type f -iname "*.php" -print) echo "--- PHP Syntax" for PHP_FILE in ${PHP_FILES}; do php -l ${PHP_FILE} if [ $? -ne 0 ]; then exit 1 fi done echo "--- PHP Standards" for PHP_FILE in ${PHP_FILES}; do BASENAME=$(basename ${PHP_FILE}...
#! /usr/bin/env bash # This file is part of the Hipace++ test suite. # It runs a Hipace simulation for a can beam, and compares the result # of the simulation to a benchmark. # abort on first encounted error set -eu -o pipefail # Read input parameters HIPACE_EXECUTABLE=$1 HIPACE_SOURCE_DIR=$2 HIPACE_EXAMPLE_DIR=${H...
<reponame>coding200/quizzapp<gh_stars>0 import { BaseEntity, PrimaryGeneratedColumn, Column, Entity, Unique, OneToMany, Timestamp, CreateDateColumn, UpdateDateColumn, } from 'typeorm'; import * as bcrypt from 'bcrypt'; // import { Task } from '../../task/Entities/task.entity'; @Entity('users') @Uniqu...
<gh_stars>0 # Asign a string to variable x. Formatter d means a decimal integer x = "There are %d types of people." % 10 binary = "binary" do_not = "don't" # Formatter s means str() of the variables (already stings in this case) y = "Those who know %s and those who %s." % (binary, do_not) print x print y # Formatter ...
<filename>hub-detect/src/main/groovy/com/blackducksoftware/integration/hub/detect/workflow/DetectConfigurationFactory.java<gh_stars>0 /** * hub-detect * * Copyright (C) 2018 Black Duck Software, Inc. * http://www.blackducksoftware.com/ * * Licensed to the Apache Software Foundation (ASF) under one * or mo...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 TH<NAME> Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in c...
package menu type ItemId int const ( MenuItemEasy ItemId = iota MenuItemNormal MenuItemHard MenuItemHighscores MenuItemExit ) type Item struct { isSelected bool id ItemId } func (mi *Item) IsSelected() bool { return mi.isSelected } func (mi *Item) GetId() ItemId { return mi.id } type Menu struct ...
<gh_stars>0 export function openFileDialog(accept: string, multiple: boolean, callback: (arg: Event) => void, filePickerRef: any) { // this function must be called from a user // activation event (ie an onclick event) console.log(filePickerRef.current); filePickerRef.current.type = 'file'; filePickerRef.cur...
#!/bin/sh cd api-gateway; ./gradlew clean build; cd .. cd auth-server; ./gradlew clean build; cd .. cd config-server; ./gradlew clean build; cd .. cd task-webservice; ./gradlew clean build; cd .. cd user-webservice; ./gradlew clean build; cd .. cd webservice-registry; ./gradlew clean build; cd .. cd comments-webservic...
<filename>ui.apps/src/main/content/jcr_root/apps/__appsFolderName__/components/webpack.resolve/js/utils.js /** * Checks if object has any key-value pairs. * * @param object * * @returns {boolean} */ export function isEmpty(object) { return Object.keys(object).length === 0; } export const helloWorld = () => 'He...
name 'delivery-base-build-cookbook' maintainer '<NAME>' maintainer_email '<EMAIL>' license 'Apache 2.0' description 'Build the delivery-base cookbook' version '0.1.0' depends 'delivery-truck'
package main import( ".." "fmt" ) func main() { client := scanpay.NewClient("1153:YHZIUGQw6NkCIYa3mG6CWcgShnl13xuI7ODFUYuMy0j790Q6ThwBEjxfWFXwJZ0W") client.SetHost("api.test.scanpay.dk") /* Connect to the test-environment instead of production */ data := scanpay.PaymentURLData { OrderId: "a...
sap.ui.define([ "com/sap/gtt/app/sample/pof/controller/deliveryItem/TrackingTimeline.controller", ], function (TrackingTimeline) { "use strict"; var sandbox = sinon.createSandbox(); function stub(object, method, func) { if (!(method in object)) { object[method] = function () {}; } var stubb...
import requests from bs4 import BeautifulSoup def parse_iana_registry(url): response = requests.get(url) if response.status_code == 200: soup = BeautifulSoup(response.content, 'html.parser') table = soup.find('table', {'class': 'alt'}) if table: rows = table.find_all('tr') ...
// // Copyright 2016 Kary Foundation, Inc. // Author: <NAME> <<EMAIL>> // namespace KaryGraph { // // ─── ADD EVENT TO SVG ─────────────────────────────────────────────────────────── // /** Adds an ***event*** to the ***element*** */ export function AddEventOnClick ( element: ISnapObje...
<filename>pwcracker-worker/src/main/scala/Permutator.scala object Permutator { import scala.collection.mutable.ArrayBuffer val combine: Array[Byte] = (' ' +: (('A' to 'Z') ++ ('a' to 'z') ++ ('0' to '9'))).toArray.map(_.toByte) val ncombine: Int = combine.length /** * find the next string in the sequenc...
export enum KeyCodes { BACKSPACE = 'Backspace', TAB = 'Tab', RETURN = 'Enter', ESC = 'Escape', SPACE = ' ', PAGE_UP = 'PageUp', PAGE_DOWN = 'PageDown', END = 'End', HOME = 'Home', LEFT = 'ArrowLeft', UP = 'ArrowUp', RIGHT = 'ArrowRight', DOWN = 'ArrowDown', DELETE = 'Delete' }
<reponame>Hannah-Abi/python-pro-21<filename>intro/part04-28_distinct_numbers/test/test_distinct_numbers.py import unittest from unittest.mock import patch from tmc import points from tmc.utils import load, load_module, reload_module, get_stdout, check_source from functools import reduce import os import textwrap exer...
<gh_stars>10-100 /** * @module */ /** * Protège les caractères spéciaux d'une chaine de caractères pour les * expressions rationnelles. * * @param {string} pattern La chaine de caractères. * @returns {string} La chaine de caractères avec les caractères spéciaux * protégés. */ export const qu...
<reponame>rjointer2/EMS import * as actionTypes from '../constants/loginConstants'; // the action will be dispatched from the stre // the reducer will take a state that will be an empty array and an action export const loginRequestReducer = ( state = { userLoggedIn: []}, action ) => { // checking the actions'...
#include "systems/CleanupSystem.hh" #include <queue> #include "advanced/transform.hh" #include "glow/common/log.hh" void gamedev::CleanupSystem::AddEntity(InstanceHandle& handle, Signature entitySignature) { mEntities.insert(handle); } void gamedev::CleanupSystem::RemoveEntity(InstanceHandle& handle, Signature entity...
class CarsUnder20k::Car attr_accessor :name ,:price, :gasmileage, :url def self.thisyear self.scrape_cars end #scape kbb and then return info based on that data def self.scrape_cars cars = [] cars << self.scrape_autotrader #go to kbb, find the car ...
#!/bin/sh cd qedserver java -jar start.jar cd ..
<reponame>GergoHong/cruise-control<filename>cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/monitor/sampling/aggregator/MetricCompletenessChecker.java /* * Copyright 2017 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License"). See License in the project root for license information. */ ...
# This file should be sourced before using go commands # it ensures that bazel's version of go is used EXEC_ROOT="$(bazel info execution_root)" if [[ ! -e ${EXEC_ROOT} ]]; then echo "*** ${EXEC_ROOT} does not exist - did you forget to bazel build ... ?" exit 1 fi export GOROOT="$(find ${EXEC_ROOT}/external -type...
#!/usr/bin/env bash PASSCODE=${1:-20202021} DISCRIMINATOR=${2:-42} UDP_PORT=${3:-5560} OTA_DOWNLOAD_PATH=${4:-"/tmp/test.bin"} FIRMWARE_BIN="my-firmware.bin" FIRMWARE_OTA="my-firmware.ota" OTA_PROVIDER_APP="chip-ota-provider-app" OTA_PROVIDER_FOLDER="out/ota_provider_debug" OTA_REQUESTOR_APP="chip-ota-requestor-app"...
<gh_stars>1-10 import { Component, OnInit } from '@angular/core'; import { ContactService } from '../services/contact.service'; import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms'; function containsValidCharacters(c: FormControl) { const specialChars = ['\\', '<', '>', '&' ]; for (co...
class BankAccount: def __init__(self): self.balance = 0 self.transaction_count = 0 def deposit(self, amount): self.balance += amount self.transaction_count += 1 def withdraw(self, amount): self.balance -= amount self.transaction_count += 1 def get_balan...
curl -X GET \ 'https://api.mercadopago.com/v1/payments/search?access_token=ACCESS_TOKEN&sort=date_created&criteria=desc&external_reference="ID_REF"'
def custom_dot(A, B): if len(A[0]) != len(B): raise ValueError("Number of columns in A must be equal to the number of rows in B") result = [[0 for _ in range(len(B[0]))] for _ in range(len(A))] for i in range(len(A)): for j in range(len(B[0])): for k in range(len(B)): ...
package stack // Stack data structure type Stack interface { Push(...interface{}) Pop() interface{} Peek() interface{} Values() []interface{} Length() int Empty() bool Clear() }
<reponame>MacKentoch/reactNativeReduxSidemenuTabbarStarter 'use strict'; import React, { PropTypes, Component } from 'react'; import { StyleSheet, View } from 'react-native'; import shallowCompare from 'react-addons-shallow-compare'; import Icon ...
<gh_stars>0 const { databaseConnection } = require("./connections") const filmes = {}
<reponame>Darian1996/mercyblitz-gp-public package com.darian.springbootjmx.mBean; public interface HelloMBean { public String greeting(); public void setValue(String value); public String getValue(); }
//does not subtract holidays // $(document).ready(function(){ // //plugin for start Date // $('#startDate').daterangepicker({ // singleDatePicker: true, // calender_style: "picker_4", // // minDate: new Date(), // isInvalidDate: function(date){ // /* // validates the following dates // ...
#!/bin/sh # # Unified Segger JLink script for RIOT # # This script is supposed to be called from RIOTs make system, # as it depends on certain environment variables. An # # Global environment variables used: # JLINK: JLink command name, default: "JLinkExe" # JLINK_SERVER: JLink GCB server command name, d...
#!/bin/bash set -evx mkdir ~/.kzcash # safety check if [ ! -f ~/.kzcash/.kzcash.conf ]; then cp share/kzcash.conf.example ~/.kzcash/kzcash.conf fi
<filename>lib/core_extensions.rb<gh_stars>0 Object.module_eval do def se command log_info command exit(1) unless system command end def log_info message message = "[INFO]\t#{message}" puts message end def log_error message message = "[ERROR]\t#{message}" all_error_messages << message...
#!/bin/sh set -ex apt-get -y autoremove apt-get -y clean rm -f /var/lib/dhcp/* # clean up dhcp leases
#!/bin/bash FUZZER=$1 #fuzzer name (e.g., aflnet) -- this name must match the name of the fuzzer folder inside the Docker container OUTDIR=$2 #name of the output folder OPTIONS=$3 #all configured options -- to make it flexible, we only fix some options (e.g., -i, -o, -N) in this script TIMEOUT=$4 #time f...
class TicTacToe: def __init__(self): self.size = 3 self.board = [[' ' for _ in range(self.size)] for _ in range(self.size)] def get_move(self, board, toplay): for i in range(self.size): for j in range(self.size): if board[i][j] == ' ': boa...
rm wingedgudda.deb || true rm -rf Builds/ || true rm lamo_staging/Library/MobileSubstrate/DynamicLibraries/Lamo.dylib || true rm lamo_staging/Library/MobileSubstrate/DynamicLibraries/LamoClient.dylib || true xctool -sdk iphoneos -project Lamo.xcodeproj/ -scheme Lamo CODE_SIGNING_REQUIRED=NO owner=$1 cp Builds/Lamo.dyli...
<reponame>toastier/srf (function () { 'use strict'; angular .module('core') .factory('_', LoDash); /** * wrapping the lodash library in an angular service * @param $window * @returns {*} * @constructor */ function LoDash($window) { // creating local var for lodash to return as the se...
<filename>db/migrate/20190606114621_create_reactions.rb<gh_stars>100-1000 class CreateReactions < ActiveRecord::Migration[5.2] def change create_table :reactions do |t| t.belongs_to :user, null: false, index: false t.belongs_to :post, null: false t.integer :type, null: false t.timestamps ...
/* * 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 may ...
#!/bin/bash set -e DIR=`echo $PWD | xargs dirname | xargs dirname` OS=$(cat /etc/os-release | grep "^ID=" | sed 's/ID=//g' | sed 's\"\\g') if [ $OS = "centos" ] || [ $OS = "rhel" ];then echo "Installing the environment in $OS" GOREL="go1.8.7.linux-amd64.tar.gz" # TODO: ALLWAYS DOWNLOAD AND INSTALL GOLANG!!!...
import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Box, Text } from 'ink'; import { Header, Style, useProgram } from '@boost/cli/react'; import { PackemonPackageConfig } from '../../types'; import { PackageForm } from './PackageForm'; export type InitPackageConfigs = Record<string, Pack...
from flask import Flask, request import sqlite3 app = Flask(name) conn = sqlite3.connect('movies.db') cur = conn.cursor() @app.route('/api/movies', methods=['GET']) def get_movie(): title = request.args.get('title') language = request.args.get('language') year = request.args.get('year') query = 'SELECT * FROM ...
<filename>01-upload-a-file/javascript/test/upload.spec.js const assert = require("assert"); const { Builder, By } = require("selenium-webdriver"); const path = require("path"); describe("Upload Test", function() { let driver; beforeEach(async function() { driver = await new Builder().forBrowser("firefox").bui...
<reponame>andersonzup/orange-talents-07-template-ecommerce package br.com.zup.mercadolivre.usuario; import br.com.zup.mercadolivre.config.validacao.annotation.UniqueValue; import com.fasterxml.jackson.annotation.JsonCreator; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.Email;...
#!/usr/bin/env bash BAR_ICON="" NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); } while true; do get_total_updates # notify user of updates if hash notify-send &>/dev/null; then if (( UPDATES > 50 )); ...
<gh_stars>1-10 package lvdb_test import ( "encoding/json" "io/ioutil" "log" "os" "strconv" "testing" "github.com/incognitochain/incognito-chain/blockchain" "github.com/incognitochain/incognito-chain/common" "github.com/incognitochain/incognito-chain/common/base58" "github.com/incognitochain/incognito-chain/...
# modified version of SSHKey rubygem module # https://github.com/bensie/sshkey # # Copyright (c) 2011 <NAME> # 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 # ...
<reponame>ooooo-youwillsee/leetcode<gh_stars>10-100 // // Created by ooooo on 2020/3/17. // #ifndef CPP_026__SOLUTION1_H_ #define CPP_026__SOLUTION1_H_ #include "TreeNode.h" class Solution { public: bool isSameTree(TreeNode *node1, TreeNode *node2) { if (!node2) return true; if (!node1) return false; ...
<filename>app/overrides/add_original_price_to_products_list.rb Deface::Override.new( :virtual_path => 'spree/shared/_products', :name => 'add_original_price_to_product_list', :insert_after => "span.price.selling", :text => ' <span class="old price"> <%= display_original_price(product) if product.on_sa...
#!/bin/bash set -e opt=${1} env=${2} aws_login() { aws configure set default.region us-east-1 eval $(aws ecr get-login --no-include-email) } setup() { export LC_ALL="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" sudo add-apt-repository ppa:deadsnakes/ppa curl -fsSL https://download.docker.com/li...
#!/bin/bash blue(){ echo -e "\033[34m\033[01m$1\033[0m" } green(){ echo -e "\033[32m\033[01m$1\033[0m" } red(){ echo -e "\033[31m\033[01m$1\033[0m" } yellow(){ echo -e "\033[33m\033[01m$1\033[0m" } bred(){ echo -e "\033[31m\033[01m\033[05m$1\033[0m" } byellow(){ echo -e "\033[33m\033[01m\033[05...
<filename>bundestag.io/admin/components/App.tsx const App = ({ children }) => ( <main> {children} <style jsx global>{` * { font-family: Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif; }...
<reponame>Nedelosk/OreRegistry<filename>src/main/java/oreregistry/api/registry/IProduct.java /* * Copyright (c) 2017 Nedelosk, Mezz * * This work (the MOD) is licensed under the "MIT" License, see LICENSE for details. */ package oreregistry.api.registry; import java.util.List; import net.minecraft.item.ItemStack;...
#!/bin/bash filename="webops-perf" url="http://www.oreilly.com/webops-perf/free/" lynx --dump $url | awk '/http/{$1=$200""; print}' | grep -E -i -w 'csp' > $filename #cp $filename.txt{,.pdf,.mobi,.epub} replace "free/" "free/files/" -- $filename replace "?intcmp=il-data-free-lp-lgen_free_reports_page" "" -- $filena...
<reponame>acidbubbles/MeshSync #include "pch.h" #include "msMisc.h" namespace ms { bool StartsWith(const std::string& a, const char *b) { if (!b) return false; size_t n = std::strlen(b); return std::strncmp(a.c_str(), b, n) == 0; } bool StartsWith(const std::string& a, const std::string& b) { ...
<reponame>wing-puah/thegeekwing-jekyll function loading(){ let loader = document.getElementById('loader'), footer = document.getElementById('site-footer'); if( !loader ){ return; } else { document.getElementById('loader-content').style.display = 'none'; if( footer ){ footer.style...
<reponame>CS-3398-264/DeadpoolRepo<gh_stars>0 const { riderModel, driverModel, tripModel } = require('../models'); const { getRating, calculateRate, computeMileage, distanceMatrixRequest, newDirectionRequest, buildSteps, simulateTrip } = require('../utils/tools'); const auth = require('basic-auth'); exports = module.e...
import { put, takeEvery, call, fork } from 'redux-saga/effects'; import { push } from 'connected-react-router'; import { GET_EVENTS_ARTIST } from './types'; import { errorMessage } from '../error/actions'; import { getEventsToServer, getPositionUser } from './utilities/events'; import { successGetEventsArtist, suc...
import secrets import jwt class AuthenticationHandler: @staticmethod def generate_auth_token(roles, secret): token = jwt.encode(roles, secret, algorithm='HS256') return token @staticmethod def validate_and_decode_token(token, key, audience): try: decoded_token = jwt...
import React, { useEffect } from 'react' import { useNavigate, useParams } from 'react-router-dom' import { ModeForm } from 'src/constants/object' import { UPDATE_SUCCESS } from 'src/constants/string' import { useNotification } from 'src/hook/useNotification' import { useLoadUsersQuery, useUpdateUsersMutation } fr...
package wordcram; /** * A WordColorer tells WordCram what color to render a word in. * <p> * <b>Note:</b> if you implement your own WordColorer, you should be familiar * with how <a href="http://processing.org/reference/color_datatype.html" * target="blank">Processing represents colors</a> -- or just make sure it...
#!/bin/sh test_description='git blame corner cases' . ./test-lib.sh pick_fc='s/^[0-9a-f^]* *\([^ ]*\) *(\([^ ]*\) .*/\1-\2/' test_expect_success setup ' echo A A A A A >one && echo B B B B B >two && echo C C C C C >tres && echo ABC >mouse && for i in 1 2 3 4 5 6 7 8 9 do echo $i done >nine_lines && for i ...
const BREAKPOINTS = { xs: '480px', sm: '768px', md: '992px', lg: '1200px', // Other breakpoint definitions may be present here }; function processViewportSettings(parameters) { if (parameters && parameters.chromatic && parameters.chromatic.viewports) { return parameters.chromatic.viewports; } else { ...
class VenueView < ActiveRecord::Base belongs_to :venue self.primary_key = "venue_id" self.table_name = 'venues_view' def readonly? true end def self.refresh ActiveRecord::Base.connection.execute('REFRESH VIEW venues_view') end end
/* * Copyright (C) 2012-2015 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence. * * ...
import React from 'react'; import soknadSetup from '../../utils/soknadSetup'; import Soknadstatussjekker from '../Soknadstatussjekker'; import EttSporsmalPerSide from './EttSporsmalPerSide'; import { validerDenneSiden, validerForegaendeSider } from './validerEttSporsmalPerSide'; const EttSporsmalPerSideContainer = (pr...
package com.zys.baselibrary.views.pagestatus; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Build; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.LinearLayout; import android...
/** * * 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 writing, software * distributed under ...
package io.dronefleet.mavlink.common; import io.dronefleet.mavlink.annotations.MavlinkEntryInfo; import io.dronefleet.mavlink.annotations.MavlinkEnum; /** * Enumeration of the ADSB altimeter types */ @MavlinkEnum public enum AdsbAltitudeType { /** * Altitude reported from a Baro source using QNH reference...