text
stringlengths
1
1.05M
/* Copyright (C) 2017-2021 by Arm Limited. All rights reserved. */ #ifndef INCLUDE_NON_ROOT_GLOBALSTATSTRACKER_H #define INCLUDE_NON_ROOT_GLOBALSTATSTRACKER_H #include "linux/proc/ProcLoadAvgFileRecord.h" #include "linux/proc/ProcStatFileRecord.h" #include "non_root/CounterHelpers.h" #include "non_root/GlobalCounter....
<reponame>kenna-kevin/kenna-js-api-interview-demo export const validQueryParams = [ "connector_pipeline[]=value", "next_param[]=value2", "tags[]=value3", "queries[]=value4" ]
import random # Generate 10 random numbers between 0 and 1 numbers = [random.uniform(0, 1) for _ in range(10)] # Sort the random numbers in order numbers.sort() # Output the sorted numbers print(numbers)
<reponame>fondation451/monorepo-dry-api import { TMP } from "@dry-api/core"; console.log(TMP);
class AuthDb: @staticmethod async def fetch_data(token: str) -> bool: # Simulated asynchronous database fetching logic # Replace with actual database interaction in a real application authorized_keys = ["valid_api_key_1", "valid_api_key_2"] return token in authorized_keys def au...
./bahdanau_run.sh ./luong_run.sh ./noattention_run.sh ./normed_bahdanau_run.sh ./scaledluong_run.sh
#!/bin/bash -l # #PBS -l nodes=1 #PBS -l walltime=00:05:00 #PBS -d . regent 6.rg -ll:cpu 1
<filename>src/components/NotebookCreator/NotebookCreatorModal.js import React, { useRef } from "react"; import { Modal } from "antd"; import NotebookCreator from "."; function NotebookCreatorModal(props) { const { visible, onOk, onCancel } = props; const formRef = useRef(null); const closeModal = () => { fo...
<html> <head> <title>Math Game</title> </head> <body> <form> <h3>Math Game</h3> Enter a number: <input type="number" name="number1" id="number1" required> Enter another number: <input type="number" name="number2" id="number2" required> <input type="button" onclick="sumNumbers()" value="Calculate"> <input type...
#!/bin/bash echo $(date) " - Starting Script" set -e SUDOUSER=$1 PASSWORD="$2" PRIVATEKEY=$3 MASTER=$4 MASTERPUBLICIPHOSTNAME=$5 MASTERPUBLICIPADDRESS=$6 NODE=$7 NODECOUNT=$8 MASTERCOUNT=$9 ROUTING=${10} REGISTRYSA=${11} ACCOUNTKEY="${12}" METRICS=${13} LOGGING=${14} TENANTID=${15} SUBSCRIPTIONID=${16} AADCLIENTID=$...
import React from 'react' import { Cardy } from 'my-react-module' // import Card from '' import 'my-react-module/src/index.css' const App = () => { return <Cardy headerContent="Je suis le Header" bodyContent="Je suis le contenu du card" footerContent="Je suis le footer" /> } export default App
<gh_stars>1-10 require "cyborg/command/help" require "cyborg/command/npm" require "cyborg/command/scaffold" module Cyborg module Command extend self def run(options) @production = options[:production] if options[:help] version puts options[:help] return end ...
package com.corsair.sparrow.pirate.oauth.security.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.corsair.sparrow.pirate.oauth.constant.SecurityConstant; import com.corsair.sparrow.pirate.oauth.domain.bean.SysRole; import com.corsair.sparrow.pirate.oauth.domain.bean.SysUser; import...
<gh_stars>1-10 column_settings = { 'Account': [ {'id': 'id', 'title': 'ID', 'width': 35}, {'id': 'name', 'title': 'NAME', 'width': -1}, ], 'CloudRegion': [ {'id': 'id', 'title': 'ID', 'width': 25}, {'id': 'provider', 'title': 'PROVIDER', 'width': 20}, {'id': 'display_...
<reponame>Adrian-Garcia/Algorithms /* 406. Queue Reconstruction by Height Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of this person who have a height greater than or e...
# This startup script creates a config file based on environment variables and then starts the bot # CONFIG => holds the stormy.[json|yml|toml|hcl|env] content # CONFIG_TYPE => json|yml|toml|hcl|env can be used, default: json # CONFIG_2, CONFIG_3, CONFIG_4 => can be used to split the config into multiple variables # E...
<filename>app/src/main/java/com/hapramp/views/UserItemView.java package com.hapramp.views; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Handler; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import andr...
An iterator is an object that iterates over a sequence of values in a data structure or container. The iterator is responsible for keeping track of the current position in the sequence, and it provides methods to move to the next element or to retrieve information about the current element. Iterators can be used to loo...
#!/bin/bash echo "export LS_OPTIONS='--color=auto'" > /etc/bash.bashrc echo "alias grep='grep --color=auto'" >> /etc/bash.bashrc echo "alias ls='ls \$LS_OPTIONS'" >> /etc/bash.bashrc echo "alias ll='ls \$LS_OPTIONS -l'" >> /etc/bash.bashrc echo "alias l='ls \$LS_OPTIONS -lA'" >> /etc/bash.bashrc echo -e "\n" >> /root/...
<reponame>ocamler/expense-www import { METHOD_PAYMENTS_LOAD, METHOD_PAYMENT_SELECTED, } from '../constants/ActionTypes'; const initialState = {methods: [], active: ''}; export default (state = initialState, action) => { switch (action.type) { case METHOD_PAYMENTS_LOAD: return { ...
#!/bin/bash -l ## ## Copyright (c) 2019 Opticks Team. All Rights Reserved. ## ## This file is part of Opticks ## (see https://bitbucket.org/simoncblyth/opticks). ## ## 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...
<gh_stars>1-10 #ifndef __XENO__ #define __XENO__ #endif #include "RTClient.h" //Modify this number to indicate the actual number of motor on the network #define ELMO_TOTAL 16 #define DUAL_ARM_DOF 16 hyuEcat::Master ecatmaster; hyuEcat::EcatElmo ecat_elmo[ELMO_TOTAL]; // When all slaves or drives re...
#!/bin/bash BINDIR=`pwd`/build/demo SRCDIR=`pwd`/demo TMPDIR=/tmp/opsica KEYOPT=-g while getopts s OPT; do case $OPT in "s" ) KEYOPT="" ;; esac done CONFIG=${SRCDIR}/querier/config.txt INFILE_A=${SRCDIR}/dataownerA/datasetA2_1.txt INFILE_B=${SRCDIR}/dataownerB/datasetB2_1.txt OUTDIR_A=${TMPDIR}/A OUTDIR_B=$...
#ifndef PORT2_H #define PORT2_H // Module initialisation extern void Port2_init(); // Attempt to interrupt a Port2 peripheral and wait for an interrupt in return. // Returns the round trip response time of the peripheral (including the libnds // interrupt dispatch latency) in bus clock ticks, if there is a response. ...
class Graph: def __init__(self): self.edges = {} def add_edge(self, relationship_type, parent_key, child_key): if parent_key not in self.edges: self.edges[parent_key] = [] self.edges[parent_key].append((relationship_type, child_key)) def add_edges_to_graph(graph, relationsh...
/** * 解决图片跨域问题 * @export * @param {string} api * @return {*} */ export function imageProxy(api: string) { return function (url: string) { if (url != '') { if (/^data:image\/\w+;base64,/.test(url)) { return url } else { return api + encodeURICompo...
class PostReport < Struct.new(:word_count, :word_histogram) def self.generate(post) PostReport.new( # Word_count post.content.split.map { |word| word.gsub(/\W/, '') }.count, # Word_histogram calc_histogram(post) ) end private def self.calc_histogram(post) (post .conte...
module QuickSearch # QuickSearch seacher for WorldCat Knowledge Base class WorldCatKnowledgeBaseSearcher < QuickSearch::Searcher def search raw_response = @http.get(base_url, parameters, headers) @response = JSON.parse(raw_response.body) end def results # rubocop:disable Metrics/MethodLengt...
#!/usr/bin/env zsh #bsub < hpcSeq96cells.sh ./startHpcCom96cells.sh ./startHpcCom96cellsInterval.sh ./startHpcPar96cells.sh ./startHpcPar96cellsInterval.sh
#pragma once #include <array> #include "queue.h" #define LOG_BLOCK_SIZE 1024 #define LOG_BUFFER_SIZE 1024 using block = std::array<uint8_t, LOG_BLOCK_SIZE>; using queue = spsc_queue<block, LOG_BUFFER_SIZE>;
#!/bin/bash #check to see if online, if not online we cant do anything if sudo ping -q -c 1 -W 1 google.com >/dev/null; then #online, continue echo -e "Online..." else echo -e "No internet connection, please follow the reconnect instructions before continuning..." exit 1 fi TISENSE="aws-iot-tisense-js" ...
export function uniqueId(prefix, correlativo) { var id = ++correlativo + ''; return prefix ? prefix + id : id; };
/** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.model.option.pricing.fourier; /** * A Characteristic Exponent with value at -i equal to 0. That is E[exp(x)] = 1, where E[] is the expec...
<reponame>pjunior/titanium testSuite("Titanium.App API tests", "dummy.html", { run: function() { test("Titanium.App exists", function() { assertNotNull(Titanium); assertNotNull(Titanium.App); }); test("Titanium.App top-level API", function() { assertNotNull(Titanium.App); assertNotNull(Titaniu...
<reponame>mariosky/protoboard<gh_stars>1-10 #!/usr/bin/env python from FIS import * # Variables service = LinguisticVariable('service') service.addMF('poor',MF.Gaussian(1.5,0.0)) service.addMF('good',MF.Gaussian(1.5,5.0)) service.addMF('excelent',MF.Gaussian(1.5,10)) food = LinguisticVariable('food') food.addMF('ran...
<reponame>scenarioo/scenarioo-js<filename>src/docuWriter/docuWriter.js<gh_stars>1-10 import path from 'path'; import fs from 'fs'; import del from 'del'; import isUndefined from 'lodash/isUndefined'; import isArray from 'lodash/isArray'; import isString from 'lodash/isString'; import omit from 'lodash/omit'; import pi...
import pact from "./pact"; module.exports = exports = pact; export default pact; export * from "./verifier"; export * from "./server"; export * from "./publisher"; export * from "./broker"; export * from "./stub";
#!/usr/bin/env bash root_path=/Users/titan/repository/lol mkdir -p ${root_path}/logs sudo nginx -t -p ${root_path} -c ${root_path}/config/nginx.conf sudo nginx -s quit -p ${root_path} -c ${root_path}/config/nginx.conf echo "nginx stop" echo -e "===========================================\n\n" tail -f ${root_path}...
/********************************************************************************************************** NAME: index_definition.sql SYNOPSIS: Displays the definition of indexes; useful to audit indexes across servers & environments DEPENDENCIES: The following dependencies are require...
#!/usr/bin/env bash # Compile the thrift API for the Python service . "`dirname "$0"`/.compile-thrift-include" TARGET="../concourse-driver-python" PACKAGE=$TARGET cd $THRIFT_DIR # Run the thrift compile thrift -out $TARGET -gen py concourse.thrift if [ $? -ne 0 ]; then exit 1 fi echo "Finished compiling the Thr...
/******************************************************************************* * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to d...
# code snippet import Foundation // Get name and age from the user print("What is your name?") guard let name = readLine() else { fatalError("Unable to read from the standard input.") } print("What is your age?") guard let ageString = readLine(), let age = Int(ageString) else { fatalError("Unable to...
<reponame>michael-gann/larder import React from "react"; import ReactDOM from "react-dom"; import "./index.css"; import App from "./App"; import { Provider } from "react-redux"; import configureStore from "./store/reducers/rootReducer.reducer"; import * as userActions from "./store/reducers/users.reducer"; import * a...
SELECT temperatures FROM ( SELECT temperatures, ROW_NUMBER() OVER(ORDER BY temperatures DESC) AS row_num FROM temperatures ) AS t WHERE row_num > 5 AND row_num <= 10
import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.GridPane; import javafx.scene.web.WebView; import javafx.stage.Stage; import javafx.webengine_debugger.JavaFXWebEngineDebugger; import javafx.webengine_debugger.JavaFXWebEngineDebuggerFactory; public class TestMultipleViews ex...
<gh_stars>0 import { Unknown } from './unknown'; export declare type Void = Unknown; /** * Void is an alias for Unknown * * @deprecated Please use Unknown instead */ export declare const Void: Unknown;
<filename>targets/TARGET_Maxim/TARGET_MAX32630/device/wdt2_regs.h /** * @file * @brief Registers, Bit Masks and Bit Positions for the WDT2 Peripheral Module. */ /* **************************************************************************** * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Rese...
#!/bin/bash # In this file the authentication tokens where censored from the requests. curl 'https://campus.tum.de/tumonline/ee/rest/slc.xm.ac/achievements?$orderBy=acDate=descnf' \ -H 'Connection: keep-alive' \ -H 'Accept: application/json' \ -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36...
/******************************************************************************* * Copyright (c) 2015 IBM Corp. * * 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...
<reponame>Fragrant-Yang/git-test-copy<gh_stars>1-10 #ifndef NLIB_CONDITION_H #define NLIB_CONDITION_H #include "Mutex.h" class Condition { public: explicit Condition( MutexLock& mutex) : m_nMutex(mutex) { pthread_cond_init(&m_nCond, NULL); } ~Condition() { ...
# yoda_transform.py from typing import List def yodlify(text: str) -> str: """ Transforms the input text into Yoda-speak. Args: text (str): The input text to be transformed. Returns: str: The Yoda-speak version of the input text. """ words = text.split() yoda_speak = " ".join(wor...
# set sudo to work whether logged in as root user or non-root user if [[ ${EUID} == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi ${SUDO} apt-get -y install expect > /dev/null 2>&1 FINGERPRINT=$(cat FINGERPRINT.txt) expect -c "spawn gpg --edit-key \ ${FINGERPRINT} \ trust quit; send \"5\ry\r\"; expect e...
<gh_stars>0 import _ from 'lodash'; import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import SafeHTMLMessage from '@folio/react-intl-safe-html'; import compose from 'compose-function'; import { MultiSelectionFilter, SearchAndSort, withTags } from '@folio/stri...
"""Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal Medium URL: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. Fo...
import mongo from 'mongodb'; const mongodb = mongo.MongoClient; const url = 'mongodb://localhost:27017/tempDatabase'; var shoppingDAC = function() { const getShoppingList = function (callback) { mongodb.connect(url, function (err, db) { const collection = db.collection('shoppingList'); ...
<reponame>Misssusu/simple-style-react-ui import React from "react"; import Demo from "../demo"; const code = require('!!raw-loader!./install.code.txt'); const InstallDemo: React.FunctionComponent = () => { return( <div> <h2>可通过 npm 或者 yarn 来安装</h2> <Demo code={code.default}></Demo> ...
function removeChars(str, chars) { let result = ''; for (let i = 0; i < str.length; i++) { if (!chars.includes(str[i])) result += str[i]; } return result; } const result = removeChars('Hello', ['l', 'H']); console.log(result);
<reponame>Hyman-Yuan/meiduo_project from celery import Celery import os # 在当前程序系统环境中添加django配置文件模板, # 如果当前celery 中有函数或者方法使用了django的配置文件,则必须加 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meiduo_mall.settings.dev") # 创建celery实例 # 1.创建celery客户端对象 Celery第一个位置参数是当前任务的别名 celery_cli = Celery('meiduo_mall') # 加载celery配置...
/* * Copyright (C) 2012-2014 <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 agree...
<reponame>twitter-zuiwanyuan/finatra<filename>utils/src/test/scala/com/twitter/finatra/tests/conversions/BooleanConversionsTest.scala package com.twitter.finatra.tests.conversions import com.twitter.finatra.conversions.boolean._ import com.twitter.inject.Test class BooleanConversionsTest extends Test { "RichBoolea...
<filename>src/components/evan-form/utils.js import AsyncValidator from "async-validator"; const utils = { validate: (model, rules, callback, options) => { const initOptions = { showMessage: true, }; options = Object.assign({}, initOptions, options || {}); // 如果需要验证的fields为空,调用验证时立刻返回callback ...
package frc.robot.gamestate.routine; import edu.wpi.first.wpilibj.Timer; /** * Derived class of AutonSegment that acts as a delay during an autonomous period. */ public class AutonTimer extends AutonSegment { // Timer util class used to determine time passed. private Timer timer; // The delay amount in seconds ...
var db = require('../../db'); var users = {}; users.invalid = { id: 'thisisastring', username: 1919 }; module.exports = function(cb) { db.select().from('users').orderBy('id') .then(function(rows) { users.valid = rows; cb(null, { valid: rows, invalid: { id: 'thisisastring', ...
for (int i = 0; i < 10; ++i) { cout << i*i << endl; }
/*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *--------------------------------------------------------*/ import path = require('path'); import { DocumentSymb...
#-- # Copyright (c) 2011 <NAME>, <NAME>, Geni Inc # # 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 to use, copy, modify, merge,...
BASE_DIR="$(pwd)/$(dirname "$0")" cd $BASE_DIR composer install ## Basic test cd $BASE_DIR/basic_test ../vendor/bin/phpunit *.php --verbose --log-junit all-tests.xml ## Out of order test cd $BASE_DIR/out_of_order_test ../vendor/bin/phpunit *.php --verbose --log-junit all-tests.xml ## Coverage test cd $BASE_DIR/cove...
#!/bin/sh ##### VARS ############## red=$(tput setaf 1) green=$(tput setaf 2) yellow=$(tput setaf 3) blue=$(tput setaf 4) normal=$(tput sgr0) ##### HELPERS ########### function waitToContinue() { printf "\npress any key to continue..." read -n 1 } function replace() { export VARS="$1" cat generated/v...
#!/usr/bin/env bash testdir=$(readlink -f $(dirname $0)) rootdir=$(readlink -f $testdir/../../..) source $rootdir/test/common/autotest_common.sh source $rootdir/test/iscsi_tgt/common.sh # $1 = "iso" - triggers isolation mode (setting up required environment). # $2 = test type posix or vpp. defaults to posix. iscsites...
#!/bin/bash # Generate the hooks/post-refresh file for a DNS plugin # Usage: bash generate_dnsplugins_postrefreshhook.sh path/to/dns/plugin # For example, from the certbot home directory: # tools/snap/generate_dnsplugins_postrefreshhook.sh certbot-dns-dnsimple set -eu PLUGIN_PATH=$1 mkdir -p "${PLUGIN_PATH}/snap/hoo...
function daysToYWD(days){ let years = Math.floor(days/365); let weekdays = days % 365; let weeks = Math.floor(weekdays/7); let days = weekdays % 7; return `${years} years, ${weeks} weeks, ${days} days`; }
// Define the DnaDef type representing the definition of a DNA sequence pub struct DnaDef { // Define the fields of the DnaDef type as per the requirements // For example: // name: String, // sequence: String, } // Implement the missing methods for the DnaDefBuf struct to manage DNA definitions pub str...
<gh_stars>10-100 /* * Copyright (c) 2004-2021, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice...
import commons from 'feathers-hooks-common'; import { restrictToOwner } from 'feathers-authentication-hooks'; import local from '@feathersjs/authentication-local'; import { toChecksumAddress } from 'web3-utils'; import isOwner from './hooks/isOwner'; import notifyOfChange from '../../hooks/notifyOfChange'; import san...
def float_to_string(number): # Round the number rounded_num = round(number, 2) # Return the number converted to a string return str(rounded_num)
<gh_stars>0 exports.seed = function(knex) { return knex('recipesinstructions').insert([ { recipeid: 1, instructionsid: 3 }, { recipeid: 1, instructionsid: 4 }, { recipeid: 4, instructionsid: 2 }, { recipeid: 3, instructionsid: 1 }, { recipeid: 2, instructionsid: 5 }, ...
<gh_stars>0 export default { namespace: 'restree', state: [ { key: 0, title: "x", children: [{ key: 3, title: "华或多或少" }, { key: 4, title: "大大师傅" } ] }, { key: 1, title: "sfddssdfds" }, { key...
<gh_stars>0 import { ui } from "../ui/layaMaxUI"; import ProgressView from "../widget/ProgressView"; import { AppConfig } from "../AppConfig"; import Log from "../utils/Log"; export default class LoadPage extends ui.page.LoadPageUI { private static self: LoadPage = null; private progressBar: ProgressView = nu...
<reponame>copslock/o-ran_nonrtric<filename>enrichment-coordinator-service/src/main/java/org/oransc/enrichment/controllers/producer/ProducerController.java<gh_stars>0 /*- * ========================LICENSE_START================================= * O-RAN-SC * %% * Copyright (C) 2020 Nordix Foundation * %% * Licensed ...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_fiscal_icfefetuarpagamentoformatado.ui' # # Created: Mon Nov 24 22:25:42 2014 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui from pydaruma.py...
(function ($) { $(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' }); $("table.selectable-row tbody tr").click(function () { window.document.location = $(this).attr("link"); }); $(".ikariera-show").click(function () { var a = $(this).attr("data-ikariera-show"); $("." + ...
<gh_stars>1-10 package sample; import com.sun.javafx.css.StyleCacheEntry; import com.sun.javafx.geom.Shape; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Line; import java.io.IOException; import java.util.Arrays; public class ShapeLine { private double[] ...
mkdir -p bin ./gradlew makeJar && cp build/libs/driver-report-all-0.1.0.jar bin/main.jar && chmod 777 bin/main.jar echo "Done." echo
# # only init if installed. fasd_cache="$HOME/.fasd-init-bash" if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then eval "$(fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)" >| "$fasd_cache" fi source "$fasd_cache" unset fasd_cache # jump to recently use...
'use strict'; System.register(['./froala-editor-config'], function (_export, _context) { "use strict"; var Config; function configure(aurelia, configCallback) { var instance = aurelia.container.get(Config); if (configCallback !== undefined && typeof configCallback === 'function') { configCallback...
PATH=$HOME/bin:$PATH export PATH PS1="[\$?]\$ " export PS1 HISTCONTROL=ignoreboth HISTIGNORE=ls:ll:la:cnl:d:pd:xd HISTTIMEFORMAT='%F %T ' alias l='ls -rt' alias ll='ls -lrt' alias la='ls -Aort' alias lla='ls -Alort' alias d='dirs -v' alias pd=pushd alias xd=popd # careful move and copy alias cmv='mv -i' alias ccp=...
#!/bin/bash ## ## Sense Collector - start-device-details.sh ## ## ## Set Specific Variables ## collector_type="device-details" ## ## Sense-Collector Details ## source sense-collector-details.sh ## ## Set Variables from Environmental Variables ## debug=$SENSE_COLLECTOR_DEBUG debug_curl=$SENSE_COLLECTOR_DEBUG_CURL...
<gh_stars>0 import INegativeScoreParams from "../../types/INegativeScoreParams"; import { Modifier } from "../../types/Modifier"; export function computeNegativepoints(params: INegativeScoreParams, modifier: Modifier) { const energyScore = modifier === Modifier.DRINK ? _computeEnergyPointsForDrinks(params.energy) ...
<filename>src/com/opengamma/maths/lowlevelapi/functions/utilities/Reverse.java /** * Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.maths.lowlevelapi.functions.utilities; import java.util.Arrays; import org.apac...
@Injectable({ providedIn: 'root' }) export class IdService { private static idCounter: number = 0; constructor() { } generateId(): string { const paddedId = IdService.idCounter.toString().padStart(4, '0'); IdService.idCounter++; return `ID-${paddedId}`; } }
<filename>programmers/source/1-17.cpp // x만큼 간격이 있는 n개의 숫자 // 2019.03.08 #include<vector> using namespace std; vector<long long> solution(int x, int n) { vector<long long> answer; int tmp = x; for (int i = 0; i<n; i++) { answer.push_back(tmp); tmp += x; } return answer; }
#!/bin/bash FILES="test/*.ha" COUNT="0" OK=0 Wrongs=0 for f in $FILES do let COUNT=COUNT+1 name=$(echo $f | cut -f 1 -d '.') echo "Testing $name" cat $f | ./comp -noBin > $f.output mv a.ll $name.ll if(clang $name.ll -c -o $name.out) then rm $f.output rm $name.ll rm $name.out echo "OK" let OK=OK+1 else ...
package kbasesearchengine.system; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constru...
<filename>spec/dry/elastic_model_spec.rb # frozen_string_literal: true require "spec_helper" RSpec.describe Dry::ElasticModel do it "has a version number" do expect(Dry::ElasticModel::VERSION).not_to be nil end end
The best way to optimize a website for faster loading speed is to minify the HTML, CSS, and JavaScript files, reduce the size of images, enable browser caching, and reduce the number of HTTP requests. To minify the HTML, CSS, and JavaScript files, these files can be run through online tools that will remove comments a...
# frozen_string_literal: true require 'grpc' require_relative '../lib/graphd' def client_stub # if timeout is exceeded will throw `GRPC::DeadlineExceeded` @client_stub ||= Graphd::ClientStub.new('localhost:9080', timeout: 1) end def client(client_stub) @client ||= Graphd::Client.new(client_stub) end def run ...
SELECT COUNT(*) AS 'Number of Products' FROM products UNION SELECT COUNT(*) AS 'Number of Accounts' FROM accounts;
import React, {useState} from 'react'; import {RenderInput, RenderSearchResults, RenderSearchBar} from './components'; const App = () => { // state to store search results const [searchResults, setSearchResults] = useState([]); // state to store search queries const [inputValues, setInputValues] = useState({ nam...
(function(cornerstoneTools) { 'use strict'; function drawCircle(context, start, color, lineWidth) { var handleRadius = 6; context.beginPath(); context.strokeStyle = color; context.lineWidth = lineWidth; context.arc(start.x, start.y, handleRadius, 0, 2 * Math.PI); ...
<reponame>SamuelThulin/SensingSugar import HomeIcon from '@mui/icons-material/Home'; import { Box, Button, ButtonGroup, IconButton, Stack, Typography } from '@mui/material'; import React, { FC } from 'react'; import { useNavigate } from 'react-router-dom'; import * as Sound from './Sound'; import * as Visuals from './V...