text stringlengths 1 1.05M |
|---|
<gh_stars>1-10
import { Column } from './../models/column.interface';
import { Formatter } from './../models/formatter.interface';
export const deleteIconFormatter: Formatter = (row: number, cell: number, value: any, columnDef: Column, dataContext: any) =>
`<i class="fa fa-trash pointer delete-icon" aria-hidden="tru... |
(this["webpackJsonp@react-bratus/app"]=this["webpackJsonp@react-bratus/app"]||[]).push([[4],{853:function(p,a){p.exports={messages:{page:"page"}}}}]);
//# sourceMappingURL=4.c9a26e93.chunk.js.map |
<reponame>hikair/keyserver
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 650... |
import rgbw = basic.rgbw;
serial.writeLine("I2C");
// send to 0x44, register 0x00, value 0x46 (RESET ISL29125)
pins.i2cWriteNumber(0x44, 0x0046, NumberFormat.UInt16BE);
// send to 0x44, register 0x01, value 0x05 (GRB SAMPLING)
pins.i2cWriteNumber(0x44, 0x0105, NumberFormat.UInt16BE);
basic.forever(() => {
serial.wr... |
/*
* Copyright (c) 2020, <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Atomic.h>
#include <Kernel/FileSystem/FileBackedFileSystem.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/KBufferBuilder.h>
namespace Kernel {
class Plan9FSInode;
class Plan9FS final : pub... |
import { IsString, IsPhoneNumber } from 'class-validator';
export class LoginDto {
@IsPhoneNumber('UA')
phone: string;
@IsString()
password: string;
}
|
#!/bin/bash
cd shopfront
mvn clean install
cd ..
cd productcatalogue
mvn clean install
cd ..
cd stockmanager
mvn clean install
cd ..
|
<filename>bootstrapped/ideal/runtime/texts/test_plain_text.java
// Autogenerated from runtime/texts/test_plain_text.i
package ideal.runtime.texts;
import ideal.library.elements.*;
import ideal.library.texts.*;
import ideal.runtime.elements.*;
import ideal.library.channels.output;
import ideal.machine.channels.string_... |
#!/bin/bash
# get path to script
SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
PACKAGE_PATH=$( rospack find mrs_uav_testing )
cp $PACKAGE_PATH/rviz/default_random_simulation.rviz /tmp/default_random_simulation.rviz
sed -i "s/uav[0-9]/$UAV_NAME/g" /tmp/default_random_simulation.rviz
|
<filename>blingfirecompile.library/inc/FARegexpLexer_wre.h
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
#ifndef _FA_REGEXPLEXER_WRE_H_
#define _FA_REGEXPLEXER_WRE_H_
#include "FAConfig.h"
#include "FARegexpLexer_triv.h"
namespace BlingFire
{
... |
#!/bin/bash
source script_common.sh
echo "Using build directory '${HN}' for executables"
# Run several evolves in parallel.
./${HN}/sim_supp/prob_fitinc 0.02 &
./${HN}/sim_supp/prob_fitinc 0.05 &
./${HN}/sim_supp/prob_fitinc 0.1 &
./${HN}/sim_supp/prob_fitinc 0.2 &
./${HN}/sim_supp/prob_fitinc 0.3 &
./${HN}/sim_supp/... |
<filename>sentrycli/group.py
import logging
import re
from collections import Counter
from datetime import datetime
from itertools import izip_longest
from argh import arg
from sentrycli.event import load_from_file
from sentrycli.table import Table
from sentrycli.utils import check_required_keys_present
logging.basi... |
#!/bin/sh
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Google SQL Service command line tool.
# Examples:
# $0 instance [database]
SQL_SH_DIR="$(cd $(dirname $0); pwd)"
JAR="${SQL_SH_DIR}/./google_sql.jar"
JAVA="${JAVA_HOME}/bin/java"
die() {
echo $1
exit 2
}
main() {
if [ ! -x "$... |
require 'rails_helper'
RSpec.describe 'games/categories/show' do
it 'renders the show template' do
assign(:game, FactoryBot.create(:game))
assign(:category, FactoryBot.create(:category))
render
expect(view).to render_template('games/categories/show')
end
end
|
<reponame>Aarushi21/Projects
const express = require("express");
const mongoose = require("mongoose");
const passport = require("passport");
const router = express.Router();
router.get(
"/google",
passport.authenticate("google", {
scope: ["profile", "email"],
})
);
///Callback route for google to redirect
router.g... |
<filename>bitmaplib/src/main/java/com/xingen/bitmaplib/internal/BitmapRequest.java<gh_stars>1-10
package com.xingen.bitmaplib.internal;
import android.graphics.Bitmap;
import com.xingen.bitmaplib.common.constants.Constants;
import com.xingen.bitmaplib.common.utils.MD5Utils;
/**
* Author by ${xinGen}, Date on 2018... |
import {
BoxCollider,
Collision,
GameObject,
RectPainter,
Subject,
Timer,
Vector,
} from '../../core';
import { GameUpdateArgs, Tag } from '../../game';
import {
EditorMapInputContext,
InputHoldThrottle,
InputHoldThrottleOptions,
} from '../../input';
import * as config from '../../config';
import ... |
<filename>simpleApp/functions/getCountFunction.js
'use strict';
const {getCount} = require('./db/dynamodb');
exports.handler = async (event, context) => {
let count = 1;
try {
count = parseInt(await getCount());
} catch (e) {
// no count record in the database
count = 1;
}
... |
#!/bin/bash
set -e
# setup ros2 environment
source /opt/ros/dashing/setup.bash
source /root/ros2_ws/install/setup.bash
exec "$@"
|
use quote::quote;
use syn::{Data, DeriveInput, Fields, Ident, parse_macro_input};
use proc_macro::TokenStream;
#[proc_macro_derive(SumFields)]
pub fn sum_fields_derive(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as DeriveInput);
let struct_name = &input.ident;
let sum_fields ... |
#!/bin/bash
brew install go
git clone https://github.com/syndbg/goenv.git ~/.goenv
VERSION="1.11.13"
#VERSION="1.12.9"
goenv install -s $VERSION
goenv global $VERSION
|
#!/bin/bash
# ysoftman
# 인자(매개변수) 변수
# clear(이전 명령) 실행 후 리턴 값
echo '$?:'$?
# 현재 쉘 옵션들(set -o 으로 설정된 옵션들 파악)
echo '$-:'$-
# 현재 프로세스 ID
echo '$$:'$$
# 마지막 백그라운드 프로세스 ID
echo '$!:'$!
# 매개변수 개수
echo '$#:'$#
# 매개변수 모두
echo '$*:'$*
# 매개변수 모두(문자로 취급)
echo '$@:'$@
# 0번째 인자
echo "\${0}:" ${0}
# 1번째 인자
echo "\${1}:" ${1}
... |
#!/usr/bin/env bash
#
# SPDX-License-Identifier: Apache-2.0
#
${AS_LOCAL_HOST:=true}
: "${TEST_NETWORK_HOME:=../..}"
: "${CONNECTION_PROFILE_FILE_ORG1:=${TEST_NETWORK_HOME}/organizations/peerOrganizations/org1.example.com/connection-org1.json}"
: "${CERTIFICATE_FILE_ORG1:=${TEST_NETWORK_HOME}/organizations/peerOrgan... |
#!/bin/bash
find .. -type d -name "__pycache__" -exec rm -rf {} +;
find .. -type f -name "*.pyc" -delete; |
import * as React from "react";
export default class ExecutionModel extends React.Component {
constructor(props) {
super(props);
}
public render() {
return (
<div>
<h1>Execution Model</h1>
<hr/>
<h3>Services and Controllers</h3>
<p>Services and Controllers act as singletons. In other word... |
cat > program.exs
elixir program.exs
|
import { NativeModules } from 'react-native'
const { RNAdMobPlus } = NativeModules
export default RNAdMobPlus
|
<filename>src/main/java/com/xstudio/dao/sys/SysUserMapperExtend.java
package com.xstudio.dao.sys;
import com.xstudio.controllers.framework.IList;
import com.xstudio.models.sys.SysUser;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.... |
#!/usr/bin/env sh
# First argument: Identifier
# Second argument: Operating system
identifier="$1"
os="$2"
mkdir -p ovpns
cat $os.conf \
<(echo -e "") \
<(echo -e "<ca>") \
pki/ca.crt \
<(echo -e "</ca>\n<cert>") \
pki/issued/"$identifier".crt \
<(echo -e "</cert>\n<key>") \
pki/private/"$identifier".k... |
<gh_stars>0
package machine
import (
"bufio"
"bytes"
"io/ioutil"
"runtime"
"strconv"
"github.com/coreos/fleet/resource"
)
const (
memInfoPath = "/proc/meminfo"
)
func readLocalResources() (resource.ResourceTuple, error) {
var res resource.ResourceTuple
res.Cores = 100 * runtime.NumCPU()
// TODO(uwedeport... |
source $stdenv/setup
source $mirrorsFile
curlVersion=$(curl -V | head -1 | cut -d' ' -f2)
# Curl flags to handle redirects, not use EPSV, handle cookies for
# servers to need them during redirects, and work on SSL without a
# certificate (this isn't a security problem because we check the
# cryptographic hash of the... |
<filename>python_modules/dagster/dagster/core/snap/mode.py
# Contains mode, resources, loggers
from collections import namedtuple
from dagster import check
from dagster.config.snap import ConfigFieldSnap, snap_from_field
from dagster.core.definitions import LoggerDefinition, ModeDefinition, ResourceDefinition
from dag... |
<filename>cogboard-webapp/src/components/widgets/types/SonarQubeWidget.js
import React from 'react';
import { number, string, object } from 'prop-types';
import { Caption, WidgetButton } from '../../styled';
const SonarQubeWidget = props => {
const { metrics, url, version, date } = props;
const ts = date ? new Da... |
//
// FMEncryptHelper.h
// FmdbDemo
//
// Created by ZhengXiankai on 15/8/26.
// Copyright (c) 2015年 ZhengXiankai. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface FMEncryptHelper : NSObject
/** encrypt sqlite database (same file) */
+ (BOOL)encryptDatabase:(NSString *)path encryptKey:(NSStri... |
<gh_stars>0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Red Hat, Inc
#
# 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
#
... |
<filename>website/static/src/components/App.js
import React from 'react';
import {
BrowserRouter as Router,
Switch,
Route
} from 'react-router-dom';
import Project from './Project';
import CreateProject from './CreateProject';
function App(props) {
return (
<div className="app">
<R... |
#!/bin/bash
echo "DEPLOYING WEB"
DOCKER_SCRIPTS="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
"${DOCKER_SCRIPTS}/install-system-libs.sh"
"${DOCKER_SCRIPTS}/install-python-libs.sh"
PROJECT_DIR="$(cd "${DOCKER_SCRIPTS}/.." >/dev/null 2>&1 && pwd)"
cd "${PROJECT_DIR}" || exit 1
pipenv --three
mak... |
<filename>src/app/application-list/student-create-application/student-create-application.component.ts<gh_stars>0
import {Component, Inject, OnDestroy, OnInit} from '@angular/core'
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef, MatOptionSelectionChange} from '@angular/material'
import {LabworkAtom} from '../../models... |
#!/bin/bash
# Copyright 2018 The Vitess 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 applicable law o... |
import numpy as np
def extractSpadData(data, mode):
"""
Extract data from specific detector elements from SPAD-FCS data
========== ===============================================================
Input Meaning
---------- ---------------------------------------------------------------
d... |
<reponame>OfficialDarkCometklr5x/mfvanek
/*
* Copyright (c) 2019-2021. <NAME> and others.
* https://github.com/mfvanek/pg-index-health
*
* This file is a part of "pg-index-health" - a Java library for
* analyzing and maintaining indexes health in PostgreSQL databases.
*
* Licensed under the Apache License 2.0
*... |
<reponame>BelgianSalamander/MoreBundles<gh_stars>0
package me.salamander.morebundles.common.gen;
import me.salamander.morebundles.common.Common;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.Nullable;
import javax.imageio.ImageIO;
import java.... |
public static int linearSearch(int[] arr, int x)
{
int n = arr.length;
for(int i = 0; i < n; i++)
{
if(arr[i] == x)
return i;
}
return -1;
} |
<reponame>andrewvo89/tempnote
import admin = require('firebase-admin');
const firestore = admin.firestore();
/**
* A class representing Firestore.
*
* @class Firestore
*/
class Firestore {
/**
* Generate a document ID for any collection.
* @static
* @param {string} collectionName
* @memberof Firestor... |
const os = require("os");
const EventEmitter = require("events");
var CPUMonitor = {
// Default options
isStarted: false,
startedAt: false,
timespan: 500, // Default time to calculate average usage is 500ms
delay: 1000, // Default time between for monitor cycles is 1000ms and should be > timespan
... |
#!/bin/sh
function cleanup() {
cd "$my_dir"
if [ -n "$node_0_pid" ]; then
kill $node_0_pid 2> /dev/null
fi
if [ -n "$node_1_pid" ]; then
kill $node_1_pid 2> /dev/null
fi
if [ -n "$tunnel_0_pid" ]; then
kill $tunnel_0_pid 2> /dev/null
fi
if [ -n "$tunnel_1_pid" ]; then
kill $tunnel_1_pid 2> /dev/null
... |
<filename>examples/src/App.js
import React, { Component } from "react";
import * as eva from "eva-icons";
import styled from "styled-components";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.min.css";
import Body from "./components/Body/Body";
import Header from "./compon... |
<filename>SCRIPTS/space_rp.sql
REM FILE NAME: space_rp.sql
REM LOCATION: Object Management\Tables\Reports
REM FUNCTION: Execute SPACE procedure
REM TESTED ON: 7.3.3.5, 8.0.4.1, 8.1.5, 8.1.7, 9.0.1
REM PLATFORM: non-specific
REM REQUIRES: space.sql script to be run first
REM
REM This is a part of the Knowledg... |
<gh_stars>0
package ovo
import (
"strconv"
"time"
)
// CreateRequest is request model for create push-to-pay transaction.
type CreateRequest struct {
Amount float64 `validate:"required,gt=0"`
Phone string `validate:"e164" mod:"no_space,e164"`
MerchantInvoice string `validate:"required" mod:"... |
<filename>Test-Peers/peer2.py
import socket
import threading
import errno
import time
import glob
import os
import hashlib
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import Queue
import struct
from Tkinter import *
import math
import tkMessageBox
from random import randint
import random
import sql... |
package org.sonatype.nexus.repository.protop.internal;
import org.sonatype.nexus.repository.Format;
import javax.inject.Named;
import javax.inject.Singleton;
/**
* protop repository format.
*/
@Named(ProtopFormat.NAME)
@Singleton
public class ProtopFormat extends Format {
public static final String NAME = "pro... |
<gh_stars>1-10
/*!
* qnfs - lib/stat.js
*
* Impl fs.Stat all APIs: http://nodejs.org/docs/latest/api/fs.html#fs_class_fs_stats
*
* stats.isFile()
* stats.isDirectory()
* stats.isBlockDevice()
* stats.isCharacterDevice()
* stats.isSymbolicLink() (only valid with fs.lstat())
* stats.isFIFO()
* stats.isSocket()... |
<reponame>Goxiaoy/go-saas-kit
package authorization
import (
"context"
"github.com/go-kratos/kratos/v2/errors"
"github.com/goxiaoy/go-saas-kit/pkg/authn/jwt"
)
type Result struct {
Allowed bool
Requirements []Requirement
}
func NewAllowAuthorizationResult() Result {
return Result{Allowed: true}
}
func Ne... |
#!/bin/bash
/usr/bin/mysqld_safe > /dev/null 2>&1 &
RET=1
while [[ RET -ne 0 ]]; do
echo "=> Waiting for confirmation of MySQL service startup"
sleep 5
mysql -uroot -e "status" > /dev/null 2>&1
RET=$?
done
mysql -uroot -e "CREATE DATABASE scrum_online"
# Create database schema
./vendor/bin/doctrine orm:sche... |
<filename>options/train_options.py
from .base_options import BaseOptions, boolstr
class TrainOptions(BaseOptions):
def __init__(self):
super(BaseOptions).__init__()
def get_arguments(self, parser):
parser = BaseOptions.get_arguments(self, parser)
parser.add_argument('--epochs', ... |
// Copyright 2011 The Apache Software Foundation
//
// 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 o... |
<reponame>allison-knauss/arkweb
from base import Base
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from marshmallow import Schema, fields, post_load
from datetime import datetime
class BlogPost(Base):
__tablename__ = 'blog_posts'
id = Column(Inte... |
def draw_triangle(n):
# outer loop to handle number of rows
# n in this case
for i in range(0, n):
# inner loop to handle number of columns
# values changing acc. to outer loop
for j in range(0, i+1):
# printing stars
print("*"... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.selectUnpublishedEntriesByStatus = exports.selectUnpublishedEntry = void 0;
var _immutable = require("immutable");
var _publishModes = require("../constants/publishModes");
var _editorialWorkflow = require("../a... |
#!/usr/bin/python
import tkinter
from tkinter import N, S, E, W, ttk, messagebox
class CanvasHelper(object):
class OnGridException(Exception):
pass
@staticmethod
def draw_grid(canvas, colour="black", thickness=2, rows=3, cols=3, outer=False, caps=tkinter.PROJECTING, tags=()):
"""Draws a... |
#ifndef _iic_h_
#define _iic_h_
#include <reg52.h>
sbit SCL=P2^1;
sbit SDA=P2^0;
void delayus(unsigned char x);
void iic_start(void);
void iic_stop(void);
void iic_ask(bit askbit);
unsigned char iic_waitask(void);
void iic_sendbyte(unsigned char byte);
unsigned char iic_readbyte(void);
void AT2402_SendByte(unsigned ... |
const admin = require("firebase-admin");
const dotenv = require("dotenv");
dotenv.config();
const serviceAccount = require("./service-account.json");
const authDomain = process.env.AUTH_DOMAIN;
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: `https://${authDomain}`
});
const... |
#!/usr/bin/env bash
#
# Copyright (c) 2021 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
# This script bootstraps a debian/bullseye64 Vagrant box
# to demo building containers with SBoMs
# Update repos and upgrade installed packages
apt-get update && sudo apt-get -y upgrade
# Install system dependencies
apt-g... |
<filename>lib/ketting.js
var Resource = require('./resource');
var representor = require('./representor');
var base64 = require('./utils/base64');
var oauth = require('./utils/oauth');
var fetch = require('./utils/fetch');
var url = require('./utils/url');
/**
* The main Ketting client object.
*
* @constructor
* ... |
<reponame>zhanglei1949/fastFFI
/*
* Copyright 1999-2021 Alibaba Group Holding Ltd.
*
* 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
... |
package com.ervin.litepal.ui.widget;
/**
* Created by Ervin on 2015/12/22.
*/
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
import android.graphics.Canvas;
import android.os.Build;
import android.util.AttributeSet... |
#!/bin/bash
# Copyright 2016 VMware, 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 applica... |
/*
* Copyright 2019 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 applicabl... |
#!/bin/bash
tmux -V | cut -c 6-
|
def simulate_cog_init():
initialization_log = []
# Step 1: Check power supply
power_supply_status = check_power_supply()
initialization_log.append(f"Power supply check: {power_supply_status}")
if power_supply_status == "OK":
# Step 2: Initialize communication interface
communicatio... |
<filename>lib/util/Logger.js
"use strict";
var logger;
function debug() {
if (logger) {
_callLog(logger.debug, arguments);
}
}
function info() {
if (logger) {
_callLog(logger.info, arguments);
}
}
function error() {
if (logger) {
_callLog(logger.error, arguments);
}
}... |
exports.Temperature = function(kTemp, setTemp) {
this.kTemp = kTemp;
this.setTemp = setTemp;
};
exports.Temperature.prototype.convertTemp = function(kTemp) {
var c = kTemp - 273.15;
var f = c * 1.8 + 32;
return f.toFixed(2);
};
exports.Temperature.prototype.tempAlarm = function(kTemp, setTemp) {
if (kTem... |
<filename>transform/path.go<gh_stars>0
package transform
import (
"fmt"
"os"
"path/filepath"
"regexp"
"strings"
"github.com/cuducos/go-cnpj"
)
var nonDigits = regexp.MustCompile(`\D`)
// PathsForSource lists files for a given `sourceType` in a directory `dir`.
func PathsForSource(t sourceType, dir string) ([]... |
var should = require('should');
var span = require('../index');
describe('Span', function() {
describe('interface', function() {
it('should export a function', function() {
span.should.be.an.instanceOf(Function);
});
it('should parse itself', function() {
span(span('3d 2h')).should.equal('3d ... |
#!/bin/bash -e
docker build -t test-app:$CONJUR_NAMESPACE_NAME .
|
#!/bin/bash -e
time=$(date +%Y-%m-%d)
mirror_dir="/var/www/html/rcn-ee.us/rootfs/"
DIR="$PWD"
export apt_proxy=apt-proxy:3142/
if [ -d ./deploy ] ; then
sudo rm -rf ./deploy || true
fi
if [ ! -f jenkins.build ] ; then
./RootStock-NG.sh -c rcn-ee_console_debian_stretch_armhf
./RootStock-NG.sh -c rcn-ee_console_debi... |
<gh_stars>0
import { NodeSelection } from "prosemirror-state"
export function canInsert(state, nodeType) {
let $from = state.selection.$from
for (let d = $from.depth; d >= 0; d--) {
let index = $from.index(d)
if ($from.node(d).canReplaceWith(index, index, nodeType))
return true
}
return false
... |
<filename>src/app/entry1/entry1.component.ts
import { Component, OnInit, Renderer2, ApplicationRef, Injector, ComponentFactoryResolver, AfterContentInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Entry2Component } from '../entry2/entry2.component';
@Component({
selector: 'scm... |
#slect循环:
#使用select循环将会在屏幕上生成一个数字化的菜单,并提示用户进行选择,默认的提示符是:”#“。用户只需在提示符下输入对应菜单的数字,即可完成选择。
#如下所示,item-list列表是一个字符串组成的序列,当用户选择数字以后,将会将相应的菜单值赋值给string变量,并执行select循环体内容。
#select经常与cast一起使用,允许用户在菜单中选择,并基于选择执行相应的命令,当执行到break语句时候,将退出select结构
#select是一个循环体,可以使用break退出循环。
# select string in item-list
# do
# command
# done
echo ... |
Thanks for your question! Our restaurant serves a variety of delicious cuisines, including Italian, American, Mexican, and Chinese. We also offer many vegan and vegetarian options. Let us know if you have any other questions! |
import { connect } from 'react-redux'
import { push } from 'connected-react-router'
import { get, omit } from 'lodash/fp'
import { postsUrl, postUrl } from 'util/navigation'
export const mapDispatchToProps = (dispatch, props) => {
const routeParams = get('match.params', props)
if (!routeParams) return {}
const... |
<reponame>nihalpandey4/Live_Video_Broadcasting_Service<gh_stars>1-10
import React from 'react';
import ReactDOM from "react-dom";
import {Link } from "react-router-dom";
import history from "../history";
const Modal = props=>{
return ReactDOM.createPortal(
<div className = "ui dimmer modals visible active... |
#!/bin/bash
sampleName="SRR3083838"
picard="/fh/fast/sun_w/bin/picard.jar"
gatk="/fh/fast/sun_w/bin/GenomeAnalysisTK-3.6/GenomeAnalysisTK.jar"
gatkBundle="/fh/fast/sun_w/research/data/GATK_bundle/hg38"
projDir="/fh/fast/sun_w/research/Immuno/data/Hugo_2016"
javaTmpDir="/fh/fast/sun_w/tmp4java/"
reference="/fh/fast/sun... |
<reponame>godjackhoo/fptu-fe
export const GET_CODEDAO_ARTICLE_SUCCESS = "GET_CODEDAO_ARTICLE_SUCCESS";
export const GET_CODEDAO_ARTICLE_FAILURE = "GET_CODEDAO_ARTICLE_FAILURE";
|
#!/bin/bash
curl -v 10.29.2.2:12345/objects/test3 -XPUT -d"this is object test3"
echo -n "this is object test3" | openssl dgst -sha256 -binary | base64
curl -v 10.29.2.2:12345/objects/test3 -XPUT -d"this is object test3" -H "Digest: SHA-256=GYqqAdFPt+CScnUDc0/Gcu3kwcWmOADKNYpiZtdbgsM="
curl 10.29.2.1:12345/objects/t... |
<reponame>sgururajan/hyperledger-tictactoe<gh_stars>0
export interface AppConfig {
productName:string
services:{
[apiKey:string]:string
}
} |
<?php
function find_sum($num1, $num2) {
return $num1 + $num2;
}
$a = 5;
$b = 10;
$sum = find_sum($a, $b);
echo "The sum of $a and $b is: $sum";
?> |
<gh_stars>1-10
/**
* The well-known name of the cookie used to save the current preview session's
* ref.
*/
export const preview = 'io.prismic.preview'
|
import json
import os.path
import re
from typing import Any, Dict, List, Optional, Set, Union
from urllib.parse import quote
from urllib.request import urlopen
import yaml
import pkg_resources
_re_ids = re.compile(r"u2ff[\dab]-")
_re_koseki = re.compile(r"^koseki-\d{6}$")
def isKanji(name: str):
if _re_ids.mat... |
def get_output_volume_size(model):
output_tensor_shape = model.layers[0].output_shape[1:] # Get the shape of the output tensor from the convolutional base
volume_size = 1
for dim in output_tensor_shape:
volume_size *= dim # Calculate the volume size by multiplying the dimensions
return volume_... |
import Proxy from './Proxy'
class TicketProxy extends Proxy {
/**
* The constructor for the TicketProxy.
*
* @param {Object} parameters The query parameters.
*/
constructor (parameters = {}) {
super('api/Tickets', parameters)
}
/**
* Method used to get all unassigned tickets.
*
* @par... |
let obj = {
name: "John",
age: 30
};
let hasKey = obj.hasOwnProperty('name');
console.log(hasKey); |
program="$1"
times=$2
wait=$3
range=$4
function justDoIt() {
for ((n=0;n<$times;n++));
do
# sleep for a random duration, between $range and $wait minutes
sleep_time=$(((RANDOM % (range * 60)) + ($wait * 60) + 1));
# echo "sleeping for $sleep_time"
sleep $sleep_time
# f... |
package com.badlogic.gdx.scenes.scene2d.ui;
public class ContainerLayout extends ActorLayout<Container> {
public ContainerLayout(){
super(Container.class);
}
@Override
protected Container createActor(Skin skin, StageLayoutListener listener) {
Container container;
container = new Container();
container.s... |
def format_phone_number(phone_num):
return f"({phone_num[:3]}) {phone_num[3:6]}-{phone_num[6:]}"
number = "1234567890"
formatted_number = format_phone_number(number)
print(formatted_number) |
def sum_two_numbers(a, b):
c = a + b # sum the two numbers
print(c)
return c |
<gh_stars>1-10
import * as React from 'react';
import block from 'bem-cn';
import { bind } from 'decko';
import { ISortInfo } from 'shared/types/ui';
import {
IAsset, IAssetColumnData, IAssetNonColumnData, IAssetColumns, IAssetsInfoMap, ICurrencyPair,
} from 'shared/types/models';
import { Table } from 'shared/view/... |
import java.util.Scanner;
public class FunnyString
{
public static void main(String[] args)
{
Scanner stdin = new Scanner(System.in);
int tests = Integer.parseInt(stdin.nextLine());
for(int i = 0; i < tests; i++)
{
String s = stdin.nextLine();
if(isFunny(s))
{
System.out.println("Funny");
}... |
TERMUX_PKG_HOMEPAGE=http://jodies.de/ipcalc
TERMUX_PKG_DESCRIPTION="Calculates IP broadcast, network, Cisco wildcard mask, and host ranges"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_DEPENDS="perl"
TERMUX_PKG_VERSION=0.41
TERMUX_PKG_SRCURL=http://jodies.de/ipcalc-archive/ipcalc-${TERMUX_PKG... |
<reponame>cryptofriend/incognito-chain
package blockchain
import (
"time"
"github.com/incognitochain/incognito-chain/common"
"github.com/incognitochain/incognito-chain/metadata"
)
type BFTBlockInterface interface {
// UnmarshalJSON(data []byte) error
}
type ShardToBeaconPool interface {
RemoveBlock(map[byte]ui... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.