text stringlengths 1 1.05M |
|---|
'use strict';
/*
This file contains verifying specs for:
https://github.com/sindresorhus/atom-editorconfig/issues/67
*/
const path = require('path');
const generateConfig = require('../commands/generate-config.js');
const {poll} = AtomMocha.utils;
const {punch} = require('./utils.js');
describe('Issue #67', () =>... |
class SmartHomeAdapter:
def __init__(self):
self.devices = {}
def register_device(self, device_name, device_class):
self.devices[device_name] = device_class
def control_device(self, device_name, command):
if device_name in self.devices:
device = self.devices[device_name... |
# Download IndicLink test data
|
#!/bin/bash
build='builder/builder'
src_dir='data/animations/'
dst_dir='data/animations/'
actor_dir='data/built/'
ybot_dir='data/animations/ybot_retargeted/fbx/'
sampling_frequency='--sampling_frequency 120'
$build 'data/animations/16_01.bvh' 'data/built/16' '--actor' '--root_bone' 'Hips' '--scale' '0.056444'
for i ... |
/**
* @file 获取节点 stump 的 comment
* @author errorrik(<EMAIL>)
*/
var getNodeStumpParent = require('./get-node-stump-parent');
/**
* 获取节点 stump 的 comment
*
* @param {Node} node 节点对象
* @return {Comment}
*/
function getNodeStump(node) {
if (typeof node.el === 'undefined') {
var parentNode = getNodeS... |
<filename>src/se/chalmers/watchme/notifications/Notifiable.java
/**
* Notifiable.java
*
* Interface for describing classes that may be used in
* notifications on a specific date.
*
* @author <NAME>
* @copyright (c) 2012 <NAME>, <NAME>, <NAME>, <NAME>
* @license MIT
*/
package se.chalmers.watchme.notifications;
public... |
#ifndef KSERV_H
#define KSERV_H
#include "package.h"
typedef void (*kserv_func_t) (package_t* pkg, void *p);
bool kserv_run(const char* reg_name, kserv_func_t servFunc, void* p);
int kserv_get_pid(const char* reg_name);
void kserv_wait(const char* reg_name);
#endif
|
#!/usr/bin/env bash
cd "${TRAVIS_BUILD_DIR}"
build/bin/tests
if [ $? -eq 0 ]
then
echo "Successfully ran Catch2 tests"
else
echo "Error in running Catch2 tests" >&2
exit 1
fi
exit 0
|
jQuery(document).ready(function ($) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$('#register').click(function() {
$.post(
"register",
{
email: $('#email-r').val(),
p... |
#!/bin/bash
# entrypoint.sh file for starting the xvfb with better screen resolution, configuring and running the vnc server, pulling the code from git and then running the test.
export DISPLAY=:20
Xvfb :20 -screen 0 1366x768x16 &
x11vnc -passwd wail -display :20 -N -forever &
wait
|
<filename>src/core/stats/StatsService.js
import { getDocAndRefs, isEmptyOrNonExistentDoc } from '../util/DocManagement'
const USERS_COLLECTION = 'users'
const MINISTRY_COLLECTION = 'ministries'
const GLOBAL_COLLECTION = 'global'
const GLOBAL_DOCUMENT = 'global'
export default class StatsService {
static incremen... |
#!/usr/bin/env bash
set -e
NPROC=1
# OS detection
if [ "$(uname)" = "Linux" ]; then
NPROC=$(nproc)
CC=clang-10
elif [ "$(uname)" = "Darwin" ]; then
NPROC=$(sysctl -n hw.ncpu)
CC=clang
elif [ "$(uname)" = "FreeBSD" ]; then
NPROC=$(sysctl -n hw.ncpu)
CC=cc
else
echo "Error: $(uname) not supported, sorry!"
exit ... |
<gh_stars>0
# frozen_string_literal: true
# Flattened view of the events database with one row per subject.
# Metadata is excluded
class AddFlatView < ActiveRecord::Migration[6.0]
def up
event_wh_db = Rails.application.config.event_wh_db
ViewsSchema.create_view(
'flat_events_view',
<<~SQL
... |
import { useQuery } from '@apollo/client';
import { GET_NODE_BOS_HISTORY } from './graphql'; // Assuming the GraphQL query is defined in a separate file
const useGetNodeBosHistoryQuery = ({ skip, variables, onError }) => {
const { pubkey } = variables;
const { data, loading, error } = useQuery(GET_NODE_BOS_HISTOR... |
if [ $SPIN ]; then
if ! command -v rcm &> /dev/null; then
sudo apt-get install -y rcm
fi
if ! command -v rg &> /dev/null; then
sudo apt-get install -y ripgrep
fi
if ! command -v tig &> /dev/null; then
sudo apt-get install -y tig
fi
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/... |
package org.apache.tomcat.jni;
public class SSLSocket
{
public static native int attach(long paramLong1, long paramLong2)
throws Exception;
public static native int handshake(long paramLong);
public static native int renegotiate(long paramLong);
public static native byte[] getInfoB(long paramLong,... |
#!/bin/bash
find $1 -print0 | while IFS= read -r -d '' filename
do
if file $filename | grep -q -i 'elf 64'; then
output=$(echo $filename | sed -e 's/.*\/\(.*\)$/\1/')
echo $output.o
objcopy -O binary --only-section=.text $filename $output.o
fi
done
|
<gh_stars>0
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
using namespace std;
bool bp[1000002]={false};
int p[100000];
int main(){
int k=2;
bp[2]=false;
bp[3]=false;
p[1]=2;
p[2]=3;
int l;
for(int q=4;q<1000000;q++){
l=sqrt(q);
for(int w=1;w<=k&&p[w]<... |
declare module '@freshie/ui.preact' {
import type { Props } from 'freshie';
import type { ComponentChild, ComponentChildren } from 'preact';
export { Props };
export function render(Tags: ComponentChildren, props: Props, target: HTMLElement): void;
export function hydrate(Tags: ComponentChildren, props: Props, t... |
<filename>src/model/redis/redisDbNode.ts
import { Constants, ModelType } from "@/common/constants";
import { RedisDBMeta } from "@/common/typeDef";
import { Cluster } from "ioredis";
import * as path from "path";
import * as vscode from "vscode";
import { Node } from "../interface/node";
import { RedisFolderNode } from... |
#!/bin/bash
if [ "$SWIFTC_VERSION" != "" ]; then
if [ "$SWIFTC_VERSION" == "4" ]; then
echo "$SWIFTC_VERSION.0" > .swift-version
else
echo "$SWIFTC_VERSION" > .swift-version
fi
elif [ "$SWIFT_VERSION" != "" ]; then
echo "$SWIFT_VERSION" > .swift-version
fi
echo "Swift fersion in file:"
cat .swift-versi... |
#!/usr/bin/env bash
# TODO:
# thing of to make this root unaffected
# get the theme in file
theme_file="/tmp/vim-colorschemes"
prev_theme_name="/tmp/vim-prev-theme"
vim_colors_file="/home/$(logname)/.config/nvim/modules/color_settings.vim"
# vim_colors_file="${HOME}/.cache/temp/sh_files/.vimrc"
PS3="Select the file:... |
<filename>xdr/allow_trust_op_asset.go
package xdr
import (
"fmt"
)
// ToAsset converts `a` to a proper xdr.Asset
func (a AllowTrustOpAsset) ToAsset(issuer AccountId) (ret Asset) {
var err error
switch a.Type {
case AssetTypeAssetTypeCreditAlphanum4:
ret, err = NewAsset(AssetTypeAssetTypeCreditAlphanum4, Asset... |
/*
* Copyright [2020-2030] [https://www.stylefeng.cn]
*
* 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... |
const express = require('express');
const _ = require('lodash');
const simpleCrud = require('./genericCRUD');
const extendedCrud = (Model) => {
return simpleCrud(Model, router => {
router.delete('/:id',(req,res,next) => {
//.....
});
});
}
module.exports = extendedCrud;
|
const mongoose = require('mongoose');
let AuthorSchema = new mongoose.Schema({
id: {
type: String,
required: true
},
name: {
type: String,
required: true
},
email: {
type: String,
required: true
},
books: {
type: [String]
}
});
module.exports = AuthorSchema; |
/*
Press <Ctrl-R> to invoke the function.
Along with C and Windows libraries
Remarks:
Refer at util/lib/obj/src/cli_io_beta.c
Run..
*/
# define CBR
# define CLI_W32
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_ctrl_r_beta(CLI_W32_STAT(*argp))) {
auto signed char *b;
auto signed i,r;... |
<reponame>rubenqba/gearman-java<filename>gearman-server/src/main/java/net/johnewart/gearman/server/JobManagerTest.java<gh_stars>0
package net.johnewart.gearman.server;
import io.netty.channel.Channel;
import net.johnewart.gearman.common.JobStatus;
import net.johnewart.gearman.common.interfaces.Client;
import net.johne... |
package org.rs2server.rs2.content.api.bank;
import org.rs2server.rs2.model.player.Player;
import javax.annotation.concurrent.Immutable;
/**
* Represents a click on the bank settings widget.
* @author twelve
*/
@Immutable
public final class BankSettingsClickEvent {
/**
* The player who initiated the clic... |
<filename>tests/typings/webdriverio/config.ts<gh_stars>1000+
class CustomService {
onPrepare() {
// TODO: something before all workers launch
}
}
const configA: WebdriverIO.Config = {
// @ts-expect-error should not be available
beforeFeature () {
},
async beforeCommand (name) {
... |
class Competition:
def __init__(self, cmap, json):
self.cmap = cmap
self.json = json
@classmethod
def make(cls, cmap, json):
return cls(cmap, json)
def ignore(d, *keys_to_ignore):
for key in keys_to_ignore:
d.pop(key, None)
def competition_generator(data):
for c in... |
<gh_stars>10-100
package com.vlkan.hrrs.replayer.base64;
import com.vlkan.hrrs.replayer.cli.Replayer;
import java.io.IOException;
public enum Base64Replayer {;
public static void main(String[] args) throws IOException {
Base64ReplayerModuleFactory moduleFactory = new Base64ReplayerModuleFactory();
... |
<filename>www/actors/stalfos.js
/**
* @fileoverview Provide the Stalfos class.
* @author <EMAIL> (<NAME>)
*/
/**
* Constructor for the Stalfos class, baddie who walks around and hurls rocks.
* @constructor
* @extends {ace.BaseClass}
*/
ace.Stalfos = function(game, room) {
ace.base(this, game, room);
this.... |
package br.com.digidev.messenger4j.send;
import br.com.digidev.messenger4j.send.templates.Template;
import java.util.Objects;
/**
* @author Messenger4J - http://github.com/messenger4j
*/
final class TemplateAttachment extends Message.Attachment {
private final Type type;
private final Template payload;
... |
import { Component, OnInit, Input } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';
import { FormGroup, FormControl, Validators } from '@angular/forms';
import { PriceBookService } from '../../../../@core/data/pricebook.service';
@Component({
selector: 'ngx-line-item-group',
templateUrl: './gro... |
import { VersionScope } from '../../../interface/Version';
import { ProjectV1Parser } from './ProjectV1Parser';
import { ProjectV2Parser } from './ProjectV2Parser';
import { Parser } from '../Parser';
import { IStorableCompactProject } from '../../../interface/Storage';
export declare class ProjectParser extends Parser... |
def translate_to_pig_latin(sentence):
words = sentence.split(" ")
translated_words = []
vowels = ["a", "e", "i", "o", "u"]
for word in words:
if word[0] in vowels:
translated_words.append(word + "way")
else:
translated_words.append(word[1:] + word[0] + "ay")
... |
// Copyright 2017-2019 @polkadot/ui-reactive authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { AccountId, AccountIndex, Address, Option, StakingLedger } from '@polkadot/types';
import { BareProps, CallProps }... |
<reponame>santaswarup/scala<filename>src/reflect/scala/reflect/internal/util/Statistics.scala
package scala
package reflect.internal.util
import scala.collection.mutable
import scala.reflect.internal.SymbolTable
import scala.reflect.internal.settings.MutableSettings
import java.lang.invoke.{SwitchPoint, MethodHandle,... |
#!/bin/bash
current_time=$(date +"%T")
current_date=$(date +"%D")
echo "Current Time: $current_time"
echo "Current Date: $current_date" |
#!/bin/sh
# Install libdb4.8 (Berkeley DB).
export LC_ALL=C
set -e
if [ -z "${1}" ]; then
echo "Usage: $0 <base-dir> [<extra-bdb-configure-flag> ...]"
echo
echo "Must specify a single argument: the directory in which db4 will be built."
echo "This is probably \`pwd\` if you're at the root of the defcoin repo... |
import React, { useState, useEffect } from 'react';
import { Form, Input, Button } from 'antd';
const AddressForm = () => {
const [name, setName] = useState('');
const [street, setStreet] = useState('');
const [city, setCity] = useState('');
const [state, setState] = useState('');
const [zip, setZip] = useState('... |
module.exports = (Bluebird) => {
// think: super.catch
const super_catch = Promise.prototype.catch;
Bluebird.prototype.catch = Bluebird.prototype.caught = function catchFn(fn) {
if (arguments.length > 1) {
const filters = Array.prototype.slice.call(arguments, 0, -1);
fn = ar... |
<filename>examples/r2d2_atari_breakout.py
import gym
from keras.optimizers import Adam
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
from src.r2d2 import R2D2, Actor
from src.r2d2_callbacks import *
from src.processor import AtariProcessor
from src.image_model import DQNImageMod... |
<reponame>sdsmnc221/nexus-tests-rn<filename>src/sharedUI/Header/EmailInboxHeader.js
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import HeaderSearchBar from './components/HeaderSearchBar';
const Wrapper = styled.View`
position: relative;
z-index: 999;
${... |
import { GetUser, GetUserByEmail, SendEmail } from 'components/Api'
import { useConfig, useLogAction, useProponents } from 'components/Hooks'
import { useCallback, useEffect, useMemo, useState } from 'react'
export const useEmail = () => {
const [contactEmail, setContactEmail] = useState()
const [contactEmailLogi... |
<gh_stars>0
Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
resource :record, only: :show
get '/search/:q', action: :search, controller: "search"
end
|
echo "Starting pull notifications $SERVER"
if [ "$SERVER" = "thrift" ]; then
python thrift-server.py
else
python api.py
fi
|
<filename>skill.js<gh_stars>0
const { Ability, events } = require('alexa-ability');
const { handleAbility } = require('alexa-ability-lambda-handler');
const { timeout, TimeoutError } = require('alexa-ability-timeout');
const { SQS } = require('aws-sdk');
const sqs = new SQS({ apiVersion: '2012-11-05' });
const app = n... |
<filename>prog/main.c
/*
By Liyanboy74
https://github.com/liyanboy74
*/
#include <mega16.h>
#include <stdlib.h>
#include <delay.h>
#include <alcd.h>
//KeyPad Lib
#include "key.h"
//Stepper motor StepAngel
#define step_angle 0.8
#define STEPPER_PORT PORTA
#define STEPPER_PIN PINA
#define STEPPER_DDR DDRA
//Step ... |
package main
import (
"fmt"
"log"
"net"
"net/url"
"os"
"os/signal"
"strings"
"syscall"
"time"
"github.com/aler9/gortsplib/pkg/h264"
"github.com/aler9/gortsplib/pkg/rtph264"
"github.com/eyeson-team/eyeson-go"
ghost "github.com/eyeson-team/ghost/v2"
"github.com/notedit/rtmp/av"
rtmph264 "github.com/noted... |
set echo off
set feedback off
set linesize 512
prompt
prompt All Snapshot Logs in Database
prompt
break on LOG_OWNER skip 1
SELECT LOG_OWNER, MASTER, LOG_TABLE, LOG_TRIGGER, ROWIDS, PRIMARY_KEY,
FILTER_COLUMNS, CURRENT_SNAPSHOTS
FROM DBA_SNAPSHOT_LOGS
ORDER BY 1, 2; |
<reponame>stoimen/algorithms
const Node = require('./node')
let n1, n2, n3
beforeEach(() => {
n1 = new Node(10)
n2 = new Node(20)
n3 = new Node(30)
})
// constructor
describe('Node', () => {
test('new without data', () => {
let node = new Node()
expect(node.next).toBeNull()
expect(node.prev).toBe... |
def find_top_n_frequent_elements(arr, n):
frequencies = {}
for item in arr:
if item in frequencies:
frequencies[item] += 1
else:
frequencies[item] = 1
result = list(frequencies.items())
result.sort(key=lambda x: x[1], reverse=True)
return result[:n] |
#! /bin/bash
. "$(dirname "$0")/config.sh"
PLUGIN_NAME="weave-ci-registry:5000/weaveworks/net-plugin"
HOST1_IP=$($SSH $HOST1 getent ahosts $HOST1 | grep "RAW" | cut -d' ' -f1)
SERVICE="weave-850-service"
NETWORK="weave-850-network"
setup_master() {
# Setup Docker image registry on $HOST1
docker_on $HOST1 run... |
<reponame>zouzias/microgbt
#include <metrics/logloss.h>
#include <metrics/rmse.h>
#include "gtest/gtest.h"
using namespace microgbt;
TEST(microgbt, RMSE)
{
RMSE rmse;
ASSERT_NEAR(rmse.scoreToPrediction(10.1), 10.1, 1.0e-11);
}
TEST(microgbt, RMSEHessian)
{
RMSE rmse;
Vector preds = Vector(10);
Ve... |
<filename>test.js
var nextTick = require('./nexttick')
, test = require('tap').test
test("simple", function (t) {
t.plan(1)
nextTick(function () {
t.pass()
})
})
test("specified loop length", function (t) {
var i = 0
nextTick.loop(function () {
++i
}, 50).then(function () {
t.equal(50, i)
... |
<gh_stars>1-10
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var GiftCardSchema = new Schema({
gift_card_number: String,
merchant_id: { type: Schema.Types.ObjectId, ref: 'Merchant' },
client_id: { type: Schema.Types.ObjectId, ref: 'Client' },
branch_id: { type: Schema.Typ... |
#!/bin/bash
# Define aws cli profile to use
profile="venicegeo"
function size_buckets {
# Set default search string to null (meaning search all buckets)
search_base=${1:null}
# Get a list of all buckets
buckets=$(aws s3api list-buckets --profile $profile | jq --raw-output '.Buckets[] | .Name')
for bucket in... |
set -eo nounset
cd /mnt/lfs/sources
rm -rf gawk-4.1.4
tar xf gawk-4.1.4.tar.xz
pushd gawk-4.1.4
./configure --prefix=/tools
make
#make check
make install
popd
rm -rf gawk-4.1.4
|
<filename>elements/lisk-utils/src/objects/buffer_array.ts<gh_stars>100-1000
/*
* Copyright © 2020 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part o... |
<reponame>Bernardinhouessou/Projets_Autres<filename>Java EE Projects (TPs-autres)/Projets Java EE-JDBC/IHM_Garage JDBC/P2PAPartie4-Vehicule-JDBC-Correction/src/fr/ocr/sql/MarqueDAO.java<gh_stars>0
package fr.ocr.sql;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.S... |
#! /usr/bin/env bash
# vim: set ts=3 sw=3 noet ft=sh : bash
SCRIPT="${0#./}"
BASE_DIR="${SCRIPT%/*}"
WORKDIR="$PWD"
if [ "$BASE_DIR" = "$SCRIPT" ]; then
BASE_DIR="$WORKDIR"
else
if [[ "$0" != /* ]]; then
# Make the path absolute
BASE_DIR="$WORKDIR/$BASE_DIR"
fi
fi
platform=vita ${BASE_DIR}/libretro-build.sh $... |
from common.tests.core import BaseLiveTestCase
from allegation.factories import (
OfficerAllegationFactory, AllegationCategoryFactory)
class DataToolCategoriesTabTestCase(BaseLiveTestCase):
def setUp(self):
self.allegation_category = AllegationCategoryFactory()
self.officer_allegation = Office... |
# /bin/bash
./build.sh
mkdir -p ../LoadAssembly/bin/Debug/net5.0/Assembly
rm ../LoadAssembly/bin/Debug/net5.0/Assembly/*.dll
cp ../Assembly2/bin/Debug/net5.0/Assembly2.dll ../LoadAssembly/bin/Debug/net5.0/Assembly/
cd ../LoadAssembly/bin/Debug/net5.0/
./LoadAssembly
cd -
|
// By KRT girl xiplus
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
bool nisp[46341]={false};
int p[10000];
int main(){
// ios::sync_with_stdio(false);
// cin.tie(0);
nisp[0]=nisp[1]=true;
int i=2,j,k=0;
while(i<46341){
if(!nisp[i]){
p[k++]=i;
j=i*2;
while(j<46341){
nisp[j]=true;
... |
<reponame>djeada/Nauka-programowania<filename>src/Python/01_Interakcja_z_konsola/Zad6.py
if __name__ == "__main__":
"""
Pobierz wielkosc w kilogramach i wypisz ilu gramom odpowiada.
"""
print("podaj wielkosc w kilogramach:")
kilogramy = int(input())
gramy = kilogramy * 1000
print(kilogra... |
#!/usr/bin/env bash
set -e
export ZABBIX_SERVER_HOST=${TCPREMOTEADDR%:*}
export PMPY_RUN_ID=`
cat /dev/urandom | base64 | \
tr -cd a-z0-9 | head -c8
`
: ${SCRIPTS_DIR:=$PMPY_SCRIPTS_DIR} \
${SCRIPTS_DIR:?}
: ${MODULES_DIR:=$PMPY_MODULES_DIR} \
$... |
<reponame>keinpyisi/Yukihime
/// <reference types="node" />
export declare const freshRequire: NodeRequireFunction;
|
<reponame>yurugengo-supporters/discord-bot-sandbox
import express from 'express';
// GAEがサーバーをリスンしていないとそもそもアプリとして認識してくれないので、ダミーのレスポンスを返すようにしておく
export const createDummyServer = (port: number) => {
const PORT = port;
const app = express();
app.get('/', (_req, res) => {
res.send('🤖Bot is running!!🤖');
});
... |
-- insert data sailboats for MySQL
-- Author wyh
-- 说明:打开此.sql文件,执行一次即可将数据插入已经建好的 sailboats 数据库中
use sailboats;
set names utf8;
insert into sailors
values('22','Dustin',7,45);
insert into sailors
values('29','Brutus',1,33);
insert into sailors
values('31','Lubber',8,55);
insert into sailors
values('32','Andy',8,25);
i... |
// https://codeforces.com/contest/1047/problem/C
#include <bits/stdc++.h>
using namespace std;
const int N = 15000000;
bool primes[N];
int p, ps[N],a[N], factors[N];
void f() {
for (int i = 2; i < N; i++) primes[i] = true;
for (int i = 2; i < N; i++)
if (primes[i])
for (int j = 2*i; j < N; j+=i)
... |
package org.usfirst.frc5112.Robot2017V3.subsystems;
import org.usfirst.frc5112.Robot2017V3.RobotMap;
import org.usfirst.frc5112.Robot2017V3.commands.DrivetrainCommands.OperatorControl;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.command.Subsystem;
/**
... |
<reponame>malliina/staticweb<filename>content/src/main/scala/com/malliina/staticweb/content/Html.scala
package com.malliina.staticweb.content
import com.malliina.staticweb.Constants.HelloContainerId
import com.malliina.staticweb.content.Html.defer
import scalatags.Text.all._
object Html {
val defer = attr("defer").... |
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/camelcase */
import { IsOptional } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { ApiError } from '../api/ApiResult';
import { ErrorCodes } from '../api/ResultCodes';
impo... |
<gh_stars>0
package com.yahoo.ycsb.generator;
import java.util.UUID;
import org.bson.types.ObjectId;
/**
* Unique ID Generator for Pi resources.
*
*/
public class UniqueIdGenerator {
/**
* Generates an incrementing unique id string.
*
* @return A Unique ID incremented from the previous.
... |
<reponame>golinski/webflux-graphql
/*
* This file is generated by jOOQ.
*/
package com.yg.gqlwfdl.dataaccess.db.tables.records;
import com.yg.gqlwfdl.dataaccess.db.tables.Company;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Record1;
import org.jooq.Record5;
import org.jooq.Row5;
impo... |
#!/bin/bash
export DEPS="/deps"
export TARGET="/target"
export PATH="$PATH:/target/bin"
# versions of dependencies
export VERSION_ZLIB=1.2.11
export VERSION_XML2=2.9.4
export VERSION_FFI=3.2.1
export VERSION_GETTEXT=0.19.8.1
export VERSION_GLIB=2.40.2
export VERSION_VIPS=8.6.1
export VERSION_EXIF=0.6.21
export VERSI... |
#!/bin/sh
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RET... |
class Component:
def __init__(self, component_id, component_type):
self.id = component_id
self.type = component_type
class Netlist:
def __init__(self):
self.components = {}
self.connections = set()
def add_component(self, component):
self.components[component.id] = ... |
<reponame>vamshop/vamshop-cakephp-skeleton-app<gh_stars>0
module.exports = function(grunt) {
var settings = {};
var settingsPath = 'Config/settings.json';
if (!grunt.file.exists(settingsPath)) {
settingsPath += '.install';
}
/**
* Config
*/
var initConfig = {
pkg: grunt.file.readJSON('package.json'),
s... |
//Componentes html
let imagen = document.getElementById('img-roulette'),
overlay = document.getElementById('overlay'),
botonAtras = document.getElementById('button-back'),
botonAdelante = document.getElementById('button-forward');
//Rutas imagenes
const rutaSmallImg = [
"img/food1_small.webp",
"img/food2_smal... |
// Kinect data
let bodies = null;
function startDemo() {
// ***************
// * Scene setup *
// ***************
let kinectJoints = [];
let canvas = document.getElementById('renderCanvas');
let engine = new BABYLON.Engine(canvas, true);
let scene = new BABYLON.Scene(engine);
let mainCa... |
/*
* Copyright (c) 2007, Novell Inc.
*
* This program is licensed under the BSD license, read LICENSE.BSD
* for further information
*/
/*
* deb2solv - create a solv file from one or multiple debs
*
*/
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#incl... |
if($id != null) {
$conn->query("UPDATE users SET name = '$name' WHERE id = '$id'");
} |
#!/bin/bash
# =============================================================================
# Sources a list of functions passed into the script. Functions must have a
# matching directory with *.sh files.
# =============================================================================
functions="$@"
echo "Sourcing fu... |
python -m domainbed.scripts.sweep launch\
--data_dir=./domainbed/data/\
--output_dir=../result_domainbed/final/Digits_sub04/ver01\
--command_launcher select_gpu\
--dataset Digits\
--algorithm RandGen\
--n_trials 2\
--multiple_job 2\
--holdout_fraction 0.0\
... |
#!/bin/bash
git filter-branch --tree-filter '
for f in $(git ls-files)
do
sed -i '"'"'s/^.*$/& /'"'"' "$f"
done'
|
<filename>ciat-bim-rule/src/main/java/com/ciat/bim/rule/engine/rpc/TbSendRPCReplyNode.java
/**
* Copyright © 2016-2021 The Thingsboard 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 Licens... |
#!/usr/bin/env bash
set -euo pipefail
GH_REPO="https://github.com/purescript/spago"
fail() {
echo -e "asdf-spago: $*"
exit 1
}
curl_opts=(-fsSL)
if [ -n "${GITHUB_API_TOKEN:-}" ]; then
curl_opts=("${curl_opts[@]}" -H "Authorization: token $GITHUB_API_TOKEN")
fi
sort_versions() {
sed 'h; s/[+-]/./g; s/.p\(... |
#!/bin/bash -e
# Copyright 2016 The Rook Authors. 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 ... |
//Sort the elements in an array
#include<iostream.h>
#include<conio.h>
int main()
{ int a[10],i,j,temp;
cout<<"Enter the elements of array:";
for(i=1;i!=0;i++)
{
cin>>a[i];
}
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
if(a[i]<a[j])
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
}
}
}
for(i=0;i<5;i... |
const Joi = require("joi");
exports.validateProfile = (opts) => {
const { id, phone, address, state, city, zip, company, status, seller } =
opts;
return Joi.object({
id: Joi.number().required(),
address: Joi.string().required(),
phone: Joi.number().required(),
state: Joi.string().required(),
... |
/**
* We.js default controller prototype
*
* All controllers is instance of this Controller prototype and have all actions defined here
*/
const _ = require('lodash');
/**
* Constructor
*/
function Controller (attrs) {
for (let attr in attrs) {
if (attrs[attr].bind) {
this[attr] = attrs[attr].bind(th... |
#!/bin/bash
#useMB="$1"
#useExtended="$2"
#isMC="$3"
#if [ -z "$useExtended" ]; then
# argument="$useMB"
#else
# if [ -z "$isMC" ]; then
# argument="$useMB,$useExtended"
# else
# argument="$useMB,$useExtended,$isMC"
# fi
#fi
#
#. scripts/extract_signal.sh $argument
root -l -b -q Spectra.cc+
root -l -b -q Sy... |
//
// Created by <NAME> @imgntn on April 18, 2016.
// Copyright 2016 High Fidelity, Inc.
//
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
var SCRIPT_URL = "http://hifi-production.s3.amazonaws.com/tutorials/entity... |
import React, { Component } from 'react';
import { base } from '../Firebase'
class ClickableAuthor extends Component {
constructor(props){
super(props)
this.state={"userName": ""}
}
componentDidMount(){
this.fetchUserName()
}
//Duplicando codigo en 2018 lul
fetchUserName(){
base.fetch('us... |
import io.chrisdavenport.rediculous._
import cats.implicits._
import cats.effect._
import fs2.io.net._
import fs2._
import com.comcast.ip4s._
import scala.concurrent.duration._
import cats.effect.std._
// Mimics 150 req/s load with 4 operations per request.
// Completes 1,000,000 redis operations
// Completes in <5 s... |
<reponame>lananh265/social-network
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.knife = void 0;
var knife = {
"viewBox": "0 0 512 512",
"children": [{
"name": "path",
"attribs": {
"d": "M285.7,32c-3.3,0-6,1.4-8,3.8C259,58.7,224,116.1,224,250.1c0,39.2,33,39.2,... |
/* Copyright (c) 2012, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.