text
stringlengths
1
1.05M
#!/bin/bash #SBATCH --job-name=fastMRI #SBATCH --ntasks=2 #SBATCH --cpus-per-task=2 #SBATCH --mem=24000 #SBATCH --gres=gpu:4 #SBATCH -o /home/%u/%j-%x-on-%N.out #SBATCH -e /home/%u/%j-%x-on-%N.err #SBATCH --mail-type=ALL #Timelimit format: "hours:minutes:seconds" -- max is 24h #SBATCH --time=24:00:00 # Tell's pipenv t...
julia exp1/scenario_1a_randomgraph.jl julia exp1/scenario_2a_kuniform.jl julia exp1/scenario_1b_preferential_attachment.jl julia exp1/scenario_2b_duniform.jl julia exp2/scenario_3a_random.jl julia exp2/scenario_3c_kuniform.jl julia exp2/scenario_3b_preferential_attachment.jl julia exp2/scenario_3d_duniform.jl julia g...
g++ UnionIntersection.cpp listADTArr.cpp listADTArr.h -o solution
<reponame>keller35/ssh2-sftp-client 'use strict'; const chai = require('chai'); const expect = chai.expect; const chaiSubset = require('chai-subset'); const chaiAsPromised = require('chai-as-promised'); const utils = require('../src/utils'); chai.use(chaiSubset); chai.use(chaiAsPromised); describe('fmtError() tests'...
export default { name: "<NAME>" }
package com.davixdevelop.terracustomtreegen.baker; import com.davixdevelop.terracustomtreegen.PopulatorEventHandler; import com.davixdevelop.terracustomtreegen.repo.CustomTreeRepository; import com.davixdevelop.terracustomtreegen.repo.TreeBiome; import com.davixdevelop.terracustomtreegen.repo.TreeData; import net.buil...
package com.hapramp.datastore.callbacks; import com.hapramp.steem.models.Feed; public interface SinglePostCallback { void onPostFetched(Feed feed); void onPostFetchError(String err); }
const express = require('express'); const bodyParser = require('body-parser'); const mongoose = require('mongoose'); const Schema = mongoose.Schema; const FormSchema = new Schema({ name: String, email: String }); const FormModel = mongoose.model('FormData', FormSchema); const app = express(); app.use(bodyParser...
<reponame>KennethBWSong/TeamsFx // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. "use strict"; import { OptionItem } from "./qm"; import { Platform, Stage, VsCodeEnv } from "./constants"; export type Json = Record<string, unknown>; export type ConfigValue = any; export type PluginIdentity ...
<filename>src/components/common/Footer.js import React from 'react' function Footer() { const date = new Date().getFullYear(); return ( <div id="footer" className='z-50 bg-gradient-to-r from-custom-purple-400 to-custom-cyan text-white flex justify-center items-center h-24 w-full'> Copyright...
package pkg import ( "github.com/stripe/stripe-go" "github.com/stripe/stripe-go/client" "net/http" "time" ) type Environment struct { Name string Key string URL string } func NewMockedEnvironment(name, stripeMockURL string) *Environment { return &Environment{ Name: name, Key: "sk_test_123", URL: st...
git_prompt_info() { current_branch=$(git current-branch 2> /dev/null) if [[ -n $current_branch ]]; then echo " %{$fg_bold[blue]%}$current_branch%{$reset_color%}" fi } emoji_prompt() { echo "%{$fg_bold[red]%}✈ %{$reset_color%}" } setopt promptsubst # Allow exported PS1 variable to override default prompt....
// We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. // // Now, given an integer array, you need to find the length of its longest harmonious subsequence among all its possible subsequences. // // Example 1: // // Input: [1,3,2,2,5,2,3,7] // ...
#!/usr/bin/env bash # # The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 # (the "License"). You may not use this work except in compliance with the License, which is # available at www.apache.org/licenses/LICENSE-2.0 # # This software is distributed on an "AS IS" basis, WITHOUT WARRA...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package dao; import conexao.Call; import conexao.Conexao; import java.io.Serializable; import java.sql.CallableStatement; import java....
import React, { useState } from "react"; function App() { const [tasks, setTasks] = useState([]); const handleCreateTask = (task) => { const newTasks = [...tasks, task]; setTasks(newTasks); } const handleUpdateTask = (id, updatedTask) => { const newTasks = tasks.map(task => { if (task.id === id) { return { ...
#!/bin/bash # This is for a VM for multiple parties and bridged networking. # On distribution it should fetch an IP address from the router. # Problem: When changing the MAC address, the interface name changes # which then is not configured for DHCP. # Solution: One "eth0" to rule them all. # WARNING! This only works...
import { NodeInitializer } from 'node-red'; import { MyStromSwitchStatusNode, MyStromSwitchStatusNodeDef } from './modules/types'; import { MyStromSwitchConfigNode } from '../mystrom-switch-config/modules/types'; import { MyStromSwitch } from '../../modules/mystrom-switch'; const nodeInit: NodeInitializer = (RED): voi...
import * as React from 'react'; import SVGDefsContext, { SVGDefsContextProps } from './SVGDefsContext'; import { SVGDefsSetter } from './SVGDefsSetter'; interface SVGDefsProps { id: string; children: React.ReactNode; } export type SVGDefsSetterProps = SVGDefsContextProps & SVGDefsProps; /** * Contributes `child...
FactoryGirl.define do factory :cfror_integer, :class => 'Cfror::Integer' do field body 1 end end
<reponame>rbg001/WxJava package me.chanjar.weixin.mp.bean.card; import com.google.gson.annotations.SerializedName; import lombok.Data; import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder; import java.io.Serializable; /** * . * @author leeis * @Date 2018/12/29 */ @Data public class Card implements Serializable ...
<filename>src/main/java/com/meida/model/base/BaseUser.java package com.meida.model.base; import com.jfinal.plugin.activerecord.Model; import com.jfinal.plugin.activerecord.IBean; /** * Generated by JFinal, do not modify this file. */ @SuppressWarnings("serial") public abstract class BaseUser<M extends BaseUser<M>> ...
#!/bin/bash # Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. set -e set -x set -o pipefail PREFIX="$1" case $OSTYPE in darwin*) TARGET=darwin64-x86_64-cc ;; *) echo IDKWTF exit 1 esac ...
#!/usr/bin/env bash # Run Susceptible-Recovered-Infected (SIR) model experiments and generate plots trap "echo Stopping; exit;" SIGINT SIGTERM # Grid of observation noise standard deviations to run experiments for # -1 value indicates unknown observation noise standard deviation as variable to infer OBS_NOISE_STD_GRI...
<gh_stars>1-10 package crawler type Board struct { Title string URL string } type Thread struct { Title string Board *Board URL string ResCount int } type ThreadData struct { Board *Board Thread *Thread URL string Handle string MailTo string Date string Comment string Other s...
#!/bin/bash # As an alternative to shell script loops like this, see bevelbar-time. while sleep 0.25 do echo 0 # Monitor 0 echo 0"$(date +%s)" # Select style 0 echo 1I am pressed # Select style 1 echo 2This is another style echo -...
class CLI: def __init__(self): self.commands = {} def add_command(self, command_name, functionality): self.commands[command_name] = functionality def list_commands(self): return list(self.commands.keys()) def execute_command(self, command_name): if command_name in self...
#!/bin/bash # Copyright (c) 2020-2029 ASTRID Project (https://www.astrid-project.eu) # author: Alex Carrega <alessandro.carrega@cnit.it> pipenv lock -r --dev-only > dev/requirements.txt
var File = function (data) { if (typeof data !== 'object') return; this.name = data.name || ''; this.type = data.type || 'file'; this.size = parseInt(data.size) || 0; this.path = data.path || ''; this.owner = parseInt(data.owner) || ''; this.group = parseInt(data.group) || ''; this.modi...
<gh_stars>0 from __future__ import absolute_import from __future__ import print_function import sys import os import veriloggen.core.vtypes as vtypes import pyverilog.dataflow.reorder as reorder import pyverilog.dataflow.optimizer as voptimizer from pyverilog.dataflow.dataflow import * def try_optimize(node, width=3...
#!/bin/bash # Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. set -e rm -rf bin/cache/pkg/tests git clone https://github.com/flutter/tests.git bin/cache/pkg/tests dart --enable-asserts dev/customer_testing...
import cv2 import os import sys sys.path.append("/home/syc/py-faster-rcnn/caffe-fast-rcnn/python") import caffe import numpy as np import random import time from math import * import dproc from utils import * video_dir = '/media/syc/My Passport/_dataset/tracking2013/' video_name = "Shaking/img" video_tra...
<filename>Include/ZoomList.hpp #ifndef ZOOM_LIST_HPP #define ZOOM_LIST_HPP #include <vector> #include <utility> #include "Zoom.hpp" class ZoomList { private: int m_width{0}; int m_height{0}; std::vector<Zoom> m_zooms; double m_xCenter{0.0f}; double m_yCenter{0.0f}; double m_scale{1.0f}; ...
#! /bin/bash gzcat backup-2020-01-21.sql.gz | docker exec -i evemonk_postgresql psql -U postgres
def calculateLetterFrequency(inputString): frequency = {} for char in inputString.lower(): if char.isalpha(): if char in frequency: frequency[char] += 1 else: frequency[char] = 1 return frequency
#!/bin/bash # 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 at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
<reponame>srishti77/OpenWhisk_SGAK /* * 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, Versi...
#!/bin/sh xcodebuild -parallelizeTargets \ -project "IconScanner.xcodeproj" \ -target "IconScanner" \ -configuration "Release" \ clean \ build open build/Release
const express = require('express'); const logger = require('morgan'); const cookieParser = require('cookie-parser'); const bodyParser = require('body-parser'); const compress = require('compression'); const nunjucks = require('nunjucks'); const router = require('./routes'); module.exports = (app, config) => { const...
var test = require('tape'); var foo = function(cb) { setTimeout(function() { console.log("beep"); cb(); },1000); } test('testWaterfallAsync',function(t) { t.plan(1); var Q = require('../'); var queue = new Q; queue.series([ function(lib) { console.log("before...
#!/bin/sh # Copyright © 2012 Bart Massey # [This program is licensed under the "MIT License"] # Please see the file COPYING in the source # distribution of this software for license terms. TMP="/tmp/i7gh-release.$$" trap "rm -rf $TMP" 0 1 2 3 15 cp -a *.materials/Release $TMP [ -d *.materials/Figures ] && cp -a *.mater...
#!/bin/bash # Access granted under MIT Open Source License: https://en.wikipedia.org/wiki/MIT_License # # 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 ...
#!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the...
/************************************************************************** * * Copyright (c) 2016-2017 <NAME>, All Rights Reserved. * **************************************************************************/ "use strict"; /** * Utility functions for working with traits. */ define(function ( require ) { ...
import Modifier from '@mafia/structures/Modifier'; import type Role from '@mafia/structures/Role'; import { Attack } from '../managers/NightActionsManager'; const VALID_ROLES = ['Vigilante', 'Goon', 'Godfather', 'Serial Killer']; export default class StrongmanModifier extends Modifier { public patch(role: Role) { ...
#!/bin/sh # # This script starts the application container. If # needed, it will seed the Docker repository with the firmware's built-in # container image. MANIFEST="/usr/share/container-images/images.manifest" info() { echo "container-image: ${*}" logger -t "container-image" "${*}" } die() { info "Fatal...
import TableTemplate from '@/assets/img/table.png' import DialogTemplate from '@/assets/img/dialog.png' const templates = [ { id: 0, img: TableTemplate, label: '搜索表格', path: '/template/basicData' }, { id: 1, img: DialogTemplate, label: '弹窗', path: '/template/dialog' }, ] export { templates }
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2021/7/15 2:47 下午 # @File : my_ppo.py # @Author: johnson # @Desc : 使用stable-baseline3 的PPO算法 import os import sys import time import gfootball.env as football_env import argparse from stable_baselines3 import PPO from stable_baselines3.common.callbacks import C...
<gh_stars>100-1000 // // mulle_objc_object_convenience.h // mulle-objc-runtime // // Created by Nat! on 11.03.15. // Copyright (c) 2015 Nat! - <NAME>. // Copyright (c) 2015 Codeon GmbH. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitte...
function insertDashes(inputStr) { let result = inputStr[0]; for (let i = 1; i < inputStr.length; i++) { if (parseInt(inputStr[i - 1]) % 2 !== 0 && parseInt(inputStr[i]) % 2 !== 0) { result += `-${inputStr[i]}`; } else { result += inputStr[i]; } } return result; }
<filename>src/data/transaction-history-data.js export default () => [ { "id": 1, "date": "01-01-2020", "factor": "Grijze stroom", "waarde": 649, "default": 104, "status": "Complete", "eenheid": "g CO2 / kWh", "total": "$6541.92" }, { "id": 2, "date": "01-07-2020", "factor": "Ingekochte...
package training.string; import org.junit.jupiter.api.Test; import java.util.function.Function; import static org.junit.jupiter.api.Assertions.assertEquals; /** * 151. 翻转字符串里的单词: https://leetcode-cn.com/problems/reverse-words-in-a-string/ * * 给定一个字符串,逐个翻转字符串中的每个单词。 * * 说明: * - 无空格字符构成一个「单词」。 * - 输入字符串可以在前面或者...
#!/usr/bin/env bash # CONFIG set FORK_NAME="Yatopia" API_REPO="" SERVER_REPO="" PAPER_API_REPO="" PAPER_SERVER_REPO="" MCDEV_REPO="" # Added Multithreading to builds # By JosephWorks mvncmd="mvn -T 1.5C" gitcmd="git -c commit.gpgsign=false -c core.quotepath=false -c core.safecrlf=false -c i18n.commit.encoding=UTF-8 -...
from rasa_core.channels import HttpInputChannel from rasa_core.agent import Agent from rasa_core.interpreter import RegexInterpreter # initializing the agent agent = Agent.load('models/dialogue', interpreter=RegexInterpreter()) # setting input channel input_channel = HttpInputChannel(5004, '/webhooks/rasa/webhook') a...
import pandas as pd import numpy as np # Read in dataset df = pd.read_csv('dataset.csv') # Separate input (x) and output (y) variables X = df.drop('target', axis=1) y = df['target'] # Split the dataset into training and test set from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = ...
<reponame>zsh2401/cat-paw<filename>src/view/pages/IndexPage/Left/index.tsx<gh_stars>1-10 import React from 'react' import BCard from './BCard' import { Divider } from 'rsuite' export default function () { return <div> <Divider>去哪咧?</Divider> <div className="row"> <BCard to="/flow" name="...
use std::convert::Infallible; use hyper::{Body, Request, Response, Server}; use hyper::service::{make_service_fn, service_fn}; async fn ping_handler(_req: Request<Body>) -> Result<Response<Body>, Infallible> { Ok(Response::new("Pong".into())) } async fn retrieve_handler(_req: Request<Body>) -> Result<Response<Bod...
export const reducer = (state, newState) => ({ ...state, ...newState }); const curry = (fn) => { return function curried(...args) { if (args.length >= fn.length) { return fn(...args); } return (...args1) => { return curried(...(args.concat(args1))); }; }; }; export const traverseTree ...
# Homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" # Oh My ZSH chsh -s "$(which zsh)" sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # Powerline Fonts git clone https://github.com/powerline/fonts.git --de...
<gh_stars>100-1000 # test basic async for execution # example taken from PEP0492 class AsyncIteratorWrapper: def __init__(self, obj): print('init') self._it = iter(obj) async def __aiter__(self): print('aiter') return self async def __anext__(self): print('anext') ...
package cbedoy.cblibrary.services; import java.util.ArrayList; import java.util.HashMap; /** * Created by <NAME> on 28/12/2014. * * Mobile App Developer * CBLibrary * * E-mail: <EMAIL> * Facebook: https://www.facebook.com/carlos.bedoy * Github: https://github.com/cbedoy */ public class NotificationCenter { ...
<filename>src/components/pages/dept/GovtDept.js import React, { Component } from 'react'; import GovtService from '../../../services/GovtService' import './govtDept.css' class GovtDept extends Component { constructor(props) { super(props) this.state = { name: '', rewards: '', currentName: '' } ...
class MongoModel: def __init__(self, **kwargs): self._id = kwargs.get('id', None) # Initialize other fields based on kwargs @classmethod def from_mongo(cls, data): id = data.pop('_id', None) return cls(**dict(data, id=id)) def mongo(self, **kwargs): exclude_unse...
<filename>SCRIPT/Element/Notify.js const _notifyDurations = { "three": 3, "five": 5, "eight": 8, "fourteen": 14, "twenty": 20, "permanent": -99 }; const parseElement = (elm) => { let tmp = elm.getAttribute("class"); let val; let result = {}; for (let str of tmp.split(" ")) { if (str.startsWit...
#include <stdio.h> #include <string.h> //Concatenates two strings int main(int argc, char* argv[]){ if(argc != 3){ printf("ERROR: please type in a string and a positive integer\n"); return 0; } char s1[256]; char s2[256]; strcpy(s1, argv[1]); strcpy(s2, argv[2]); strcat(s1, " "); strcat(s1, s2); puts(s1)...
<reponame>guidiaalo/sdk-js /** * Make the async function wait * @internal * @param timerMS Time to wait */ const sleep = (timerMS: number) => new Promise((resolve) => setTimeout(resolve, timerMS)); export default sleep;
<gh_stars>1-10 package com.home.demo.service.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.flowable.engine.IdentityService; import org.flowable.engine.RepositoryService; import org.flowable.engine.RuntimeService; import org.flowable.engine.TaskServ...
// Function to generate the number of rows void pascalTriangle(int rows) { // Array to store generated pascal // triangle values int arr[rows] [rows]; // Iterate through every line and print // integer(s) in it for (int line = 0; line < rows; line++) { // Every lin...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-shuffled/7-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-shuffled/7-1024+0+512-shuffled-N-VB-256 --do_eva...
/* * * Copyright (c) 2021 * <NAME> * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) // // Make sure our forward declarations...
<reponame>UNIZAR-30245-2018/modelo-control<filename>src/modelo/datos/DAO/UsuarioDAO.java /** * */ package modelo.datos.DAO; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; import java.util.ArrayList; import modelo.da...
package com.yoga.core.mybatis; import com.google.common.base.Joiner; import com.google.common.base.Splitter; import com.google.common.base.Strings; import org.apache.ibatis.type.BaseTypeHandler; import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.MappedJdbcTypes; import org.apache.ibatis.type.MappedT...
import java.util.Scanner; public class AlienUsername { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int testCases = scanner.nextInt(); for (int i = 0; i < testCases; i++) { String input = scanner.next(); if(input.matches("[_\\.]\\d+[a-zA-Z]*_?")) { System.ou...
import React from 'react'; import { CodeDemo, Api } from '../CommonDispalyComponents'; import './progress.example.scss'; import CodeDemo1 from './progress.codeDemo1'; const code1 = require('!!raw-loader!./progress.codeDemo1.tsx'); import CodeDemo2 from './progress.codeDemo2'; const code2 = require('!!raw-loader!./prog...
#! /bin/bash -ex kubectl apply -f ../hello/cafe.yaml kubectl apply -f ../hello/cafe-ingress.yaml kubectl apply -f pass-on-session-cookie.yaml
package com.aditiva.ISO8583.interfaces; /** * @author aditiva */ public interface NetworkManagement<T> { }
from collections import namedtuple import requests import logging import time from twitch.FuncCache import FuncCache AppToken = namedtuple("AppToken", ["data", "expires"]) AppToken.__doc__ = """App token used to authorize API access. data : str The token itself, stored as a string. expires : int The time in ...
#!/usr/bin/env bash set -o errtrace set -o errexit set -o nounset # ignore tput errors for terms that do not # support colors (colors will be blank strings) set +e RED=$(tput setaf 1) GREEN=$(tput setaf 2) NORMAL=$(tput sgr0) BOLD=$(tput bold) set -e log() { printf "%b\n" "$*"; } fail() { printf "${RED}" >&2; log "...
<filename>Lib/zDogPy/vector.py '''Vector''' from importlib import reload import zDogPy.boilerplate reload(zDogPy.boilerplate) import math from zDogPy.boilerplate import TAU, lerp class Vector: x = 0 y = 0 z = 0 def __init__(self, position=None, **kwargs): self.set(position, **kwargs) d...
var _unsupported_8cpp = [ [ "BOOST_FIXTURE_TEST_CASE", "_unsupported_8cpp.xhtml#aae7fa857598a8590c2efe13832774dc9", null ], [ "BOOST_FIXTURE_TEST_CASE", "_unsupported_8cpp.xhtml#aa79dc79c1094831a55a21fbb8d4c12f5", null ] ];
const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); const TSLintWebpackPlugin = require('tslint-webpack-plugin'); const...
//Import controllers const userController = require("./controllers/user"); const ratingController = require("./controllers/rating"); const routes = [ /************ Users **********/ { method: "GET", url: "/api/users", handler: userController.getUsers }, { method: "POST", url: "/api/lo...
<reponame>benstepp/d3sim var legendaryData = require('../../data/legendary'); var getCraftable = function(dClass) { var craftable = {}; var slots = Object.keys(legendaryData); var slotsLength = slots.length; for (var i =0; i < slotsLength; i++) { //initialize array for each slot craftable[slots[i]] = []; ...
<gh_stars>0 import {http} from "./config"; export default { listar: () => { return http.get("/category/list") } }
<filename>src/kamil09875/bfparser/syntax/BFISet.java<gh_stars>0 package kamil09875.bfparser.syntax; import java.io.IOException; import kamil09875.bfparser.BFMemory; import kamil09875.bfparser.Translator; public enum BFISet implements BFInstruction{ LEFT{ @Override public void execute(final BFMemory memory, fina...
#!/usr/bin/sh #-------------------------------------------------------------------------------------------- # Expecting the following arguments in order - # <host> = hostname/ip-address of HBase Master. # This is made available as a macro in host configuration. # <port> = Port # on which the hbase master metric...
<reponame>laurence-myers/tcat<filename>src/generator/walker.ts<gh_stars>1-10 import { ArrayIterationNode, AssignmentNode, GeneratorAstNode, ObjectIterationNode, TemplateRootNode, ScopedBlockNode, ParameterNode, IfStatementNode } from "./ast"; import { assertNever, last } from "../core"; import {...
package com.fiends.bware.Activities; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.view.View; import android.widget.Button; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import com.fiend...
# Optimize the Memory Usage of a Web Page The following optimizations can be used to reduce the amount of memory a web page uses: 1. Minify code: Minifying HTML, JavaScript and CSS code removes unnecessary characters such as spaces and line breaks that can increase the overall size of the website. 2. Compress images:...
import { Logger } from '@nestjs/common'; import { CommandHandler, EventBus, ICommandHandler } from '@nestjs/cqrs'; import { InjectStripe } from 'nestjs-stripe'; import * as Stripe from 'stripe'; import { SubscriptionCreatedEvent } from '@ultimatebackend/core'; import { ChangeSubscriptionCommand } from '../../impl'; imp...
class NoStarchPress::Topic attr_accessor :name, :url, :books @@all = [] def initialize(name = nil, url = nil, books = []) @name = name @url = url @books = [] @@all << self if ( !@@all.include?(self) and self.name != "Gift Certificates" ) end def self.all @@all.uniq end def add_boo...
<gh_stars>1-10 const responseFunctions = require('./responseFunctions'); const createResponseJson = responseFunctions.responseJson; const requestError = responseFunctions.errorList; const generateDataJson = responseFunctions.dataJson; const generateErrorList = require('./generateErrorList'); function handleJoinPostRe...
<reponame>3dcitydb/web-feature-service package vcs.citydb.wfs.kvp; import net.opengis.fes._2.AbstractQueryExpressionType; import net.opengis.wfs._2.GetFeatureType; import org.citygml4j.builder.jaxb.CityGMLBuilder; import vcs.citydb.wfs.config.WFSConfig; import vcs.citydb.wfs.exception.KVPParseException; import vcs.cit...
package com.androidapp.cachewebviewlib.utils; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; public class AppUtils { public static int getVersionCode(Context context){ PackageManager packageManager=context.getPackageManager(); Pack...
// Copy belows to core/utils/android/jni_helper.h static jobject GetJUserByCoreUser(const User& user); static jobjectArray GetJUsersArrayByCoreUsers(const std::vector<std::unique_ptr<User>>& users); // Copy belows to core/utils/android/jni_helper.cc jobject JniHelper::GetJUserByCoreUser(const User& user) { JN...
<filename>app/js/nico-mylist.js<gh_stars>0 const cheerio = require("cheerio"); const fs = require("fs"); const path = require("path"); const { NicoClientRequest } = require("./nico-client-request"); const { NICO_URL } = require("./nico-url"); const { CacheStore } = require("./cache-store"); const { logger } = require("...
<reponame>zhoujiagen/learning-algorithms /* * SimpleTreeTest.java * JUnit based test * * Created on March 9, 2007, 11:45 PM */ package tamp.ch15.priority.priority; import junit.framework.TestCase; import java.util.HashMap; import java.util.Map; import java.util.Random; /** * @author mph */ public class Simpl...
<reponame>undef-thesis/BT.Web<gh_stars>0 import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { Profile } from 'src/app/core/models/Profile'; import { UserProfileService } from 'src/app/core/services/user-profile.service'; @Component({ selector: 'app-pers...
#!/bin/bash eval "$(gimme $GO_VERSION)" source ~/.gimme/envs/go$GO_VERSION.env wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip unzip protoc-${PROTOBUF_VERSION}-linux-x86_64.zip -d protobuf go install google.golang.org/protobuf/cmd/pr...
<filename>src/main/java/com/magicminer/ai/constant/ConstantAlgorithm.java package com.magicminer.ai.constant; import com.magicminer.ai.Algorithm; import com.magicminer.model.LotoFacilGame; import java.util.Random; public class ConstantAlgorithm implements Algorithm<LotoFacilGame> { private LotoFacilGame constan...