text
stringlengths
1
1.05M
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common' import { TypeOrmModule } from '@nestjs/typeorm' import { JourneyService } from './journey.service' import { JourneyResolver } from './journey.resolver' import { JourneyEntity } from './journey.entity' @Module({ imports: [TypeOrmModule.forFeatu...
#!/bin/bash # Copyright 2016 gRPC 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 or agreed t...
<filename>app/Database/ci4_wpu.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 13, 2020 at 06:04 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*...
<reponame>xfyre/tapestry-5 // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, s...
/* eslint-disable react-hooks/exhaustive-deps */ import { useState, useEffect } from 'react' import axios from 'axios' const useUrlLoader = (url: string, deps: any[] = []) => { const [data, setData] = useState<any>(null) const [loading, setLoading] = useState(false) useEffect(() => { setLoading(true) axi...
var fs = require("fs"); function hex2num(hex) { return parseInt(hex); } function createByte(code) { var high = Math.floor(code / 0x100), low = code % 0x100; return String.fromCharCode(high, low); } fs.readFile("src/uao250-u2b.txt", "utf-8", function(err, data) { if (err) { throw err; } var i = 0, j, line, ...
# awscli s3 ls peco function peco-s3arch() { if [[ $LBUFFER =~ "aws s3 ls" ]]; then local filepath="$(${=BUFFER} | awk '{print $NF}' | peco)" BUFFER=$LBUFFER$filepath CURSOR=$#BUFFER zle redisplay fi } zle -N peco-s3arch bindkey '^j' peco-s3arch
from flask import Flask, jsonify from pymongo import MongoClient app = Flask(__name__) client = MongoClient('localhost', 27017) @app.route('/create', methods=['GET']) def create_record(): db = client.test db.records.insert_one({'name':'John'}) return jsonify({'message': 'Success'}) @app.route('/get', met...
const TextStyleMixin = { styles: { heading: { fontSize: '24px', fontWeight: 'bold', color: 'black', }, subheading: { fontSize: '18px', fontWeight: 'normal', color: 'gray', }, link: { fontSize: '16px', fontWeight: 'bold', color: 'blue', te...
<reponame>lerages/anarchy-source<filename>src/main/java/org/rs2server/rs2/model/combat/npcs/Vespula.java package org.rs2server.rs2.model.combat.npcs; public class Vespula { }
<filename>presentation/src/main/java/com/gw/presentation/mapper/TransactionItemModelMapper.java<gh_stars>1-10 package com.gw.presentation.mapper; import com.gw.data.entity.TransactionItemEntity; import com.gw.domain.model.TransactionItem; import com.gw.presentation.internal.di.PerActivity; import com.gw.presentation.m...
# Upload the config.json aws s3 cp config.json s3://emmaa/models/covid19/config.json # Upload the raw statement pickle file python ../../scripts/emmaa_model_from_stmts.py -m covid19 -s ../../../covid-19/stmts/cord19_combined_stmts.pkl -c config.json
#!/bin/bash NODE_QT_MOD=../../node_modules/qt-darwin/Frameworks QMAKE=`which qmake` if [ "$QMAKE" == "" ]; then QT_LIBS_PATH=$NODE_QT_MOD else QT_LIBS_PATH=`qmake -query QT_INSTALL_LIBS` fi QTVERSION=`qmake -query QT_VERSION` if [ "$1" == "--include-dirs" ]; then shift 1 for i in $@; do INCPATH=$QT_LIBS_PATH/...
<gh_stars>0 import { useState } from "react"; import { ChromePicker } from "react-color"; import { StyledBox } from "./Styled"; export default function Box({ data, pickColor, index }) { const [show, setShow] = useState(false); return ( <StyledBox bgColor={data?.color || "orange"} onClick={() => setShow(true)}>...
class InternalTransferLogsController < ApiController def index internal_transfer_logs = InternalTransferLog.for_user(current_user) json_response internal_transfer_logs end def show internal_transfer_log = InternalTransferLog.for_user(current_user).find(params[:id]) json_response internal_transfe...
#!/bin/bash #borrowed form Jeff Helt BRIDGE_NAME=br0 CLIENT_SIDE_IP=192.1.1.1 SERVER_SIDE_IP=10.1.1.1 OVS_PORT=6677 DOCKER_PORT=4243 update() { echo "Updating apt-get..." sudo apt-get update -qq sudo apt-get install -yqq openjdk-11-jre openjdk-11-jdk maven jq echo "Update complete" } install_docker...
<reponame>nascu/dht-tracker<gh_stars>1-10 from __future__ import absolute_import import tornado.ioloop from ._basehandle import BaseHandle from ._counthandle import CountHandle from ._taskhandle import TaskHandle from ..config import WEBPORT approte = [(r"/count.*",CountHandle),(r"/task",TaskHandle),] application = to...
<reponame>xblia/Upgrade-service-for-java-application /* * Copyright 2015 lixiaobo * * VersionUpgrade project licenses this file to you 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://...
<gh_stars>0 package de.morphyum.speedruncomapiwrapper.entity; public class Moderator { private String id; private String role; }
mylist = [x**2 for x in range(0, 10) if x % 2 == 0]
<reponame>kazukiigeta/go-myjvn // Copyright 2020 go-myjvn authors. All rights reserved. // Use of this source code is governed by a MIT-style license that can be // found in the LICENSE file. package myjvn_test import ( "context" "fmt" "github.com/kazukiigeta/go-myjvn" ) func ExampleClient_GetAlertList() { c :=...
package com.telenav.osv.recorder.camera.focus; import java.util.ArrayList; import java.util.List; import android.graphics.Point; import android.hardware.Camera; import android.os.Handler; import com.google.common.base.Optional; import com.telenav.osv.recorder.camera.util.CameraHelper; import com.telenav.osv.utils.Log;...
<reponame>retrofuturejosh/typescript-kafka-consumer export interface IKafkaConfig { bootstrap: { servers: string } sasl: { username: string password: string mechanisms: string } security: { protocol: 'plaintext' | 'ssl' | 'sasl_plaintext' | 'sasl_ssl' } dr_msg_cb: boolean topic: stri...
<gh_stars>1-10 import Vue from 'vue' import Vuex from 'vuex' import common from "../utils/common"; Vue.use(Vuex) export default new Vuex.Store({ state: { menuBG:sessionStorage.getItem("menuBG") || 'no',//导航栏背景是否展示 CurrenciesInfo:{ btc:sessionStorage.getItem("btcprice") || 0, hc:sessionStorage.get...
#!/usr/bin/env bash set -e REPO_ROOT="$(dirname "$0")"/.. USE_DEBUGGER=0 DEBUGGER="gdb --args" BOOST_OPTIONS= SOLTEST_OPTIONS= SOLIDITY_BUILD_DIR=${SOLIDITY_BUILD_DIR:-${REPO_ROOT}/build} usage() { echo 2>&1 " Usage: $0 [options] [soltest-options] Runs BOOST C++ unit test program, soltest. Options: --debug ...
<reponame>zhaozw/servicecomb-java-chassis<filename>demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-client/src/main/java/org/apache/servicecomb/demo/zeroconfig/client/ClientServerEndpoint.java /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor l...
export function repeater(str: string, n: number): string { let repeatedStr: string = ""; for (let i = 0; i < n; i++) repeatedStr += str; return repeatedStr; } // Write a function named repeater() that takes two arguments (a string and a number), // and returns a new string where the input string is repeate...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-FW/13-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-FW/13-512+0+512-N-VB-FILL-first-256 --do_eval --per_dev...
#!/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}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRO...
import { RefObject } from "react"; export interface UseOutsideClickProps { /** * Whether the hook is enabled */ enabled?: boolean; /** * The reference to a DOM element. */ ref: RefObject<HTMLElement>; /** * Function invoked when a click is triggered outside the referenced el...
<gh_stars>100-1000 require "forwardable" require "agent/queue/buffered" require "agent/queue/unbuffered" require "agent/errors" module Agent class Queue extend Forwardable attr_reader :type, :operations # protected attributes attr_reader :mutex, :queue, :pops, :pushes protected :mutex, :queue, ...
g++ -std=c++11 -g -o Test test.cpp -I ./ -ltcmalloc #g++ -std=c++11 -g -o Test test.cpp -I ./
import operator import re def get_keywords(sentence): # Store list of words in a set words = set(re.split(r"\W+", sentence)) # Count occurances of each word in the set count_dict = {} for word in words: count_dict[word] = sentence.count(word) # Sort the words according to their...
// <NAME> Copyright (c) 2019 // New Beginnings 2018 - Capstone Project // filename: f_printUserList.c #include "headers.h" int userListPrint(struct userList* L) { printf("printing user linked list\n"); if (L->head == NULL) { printf("no head, returning to main\n"); return 0; ...
func distinctElements(input: [Int]) -> [Int] { // Create a set with the elements in the input array var distinctSet = Set(input) // Create an array from the set let distinctArray = Array(distinctSet) return distinctArray } // Test cases print(distinctElements(input: [1,2,1,3,4,4,4])) // ...
<filename>src/ProgressChart/consts.js export const TYPES_LAYOUT = ['vertical', 'horizontal']; export const TYPES_LABEL_POSITION = ['left', 'right', 'inline', 'above', 'below'];
package com.github.chen0040.leetcode.day21.medium; import java.util.ArrayList; import java.util.List; /** * Created by xschen on 16/8/2017. * * link: https://leetcode.com/problems/permutation-sequence/description/ */ public class PermutationSequence { public class Solution { String target; int co...
/* eslint-disable */ /* ESLint didn't like some expects */ import { expect } from 'chai' import { shallowMount } from 'corteza-webapp-messaging/tests/lib/helpers' import Threads from 'corteza-webapp-messaging/src/views/Threads' import Messages from 'corteza-webapp-messaging/src/components/Messages' import fp from 'flu...
#!/bin/sh "${SRCROOT}/Pods/Target Support Files/Pods-ClubMessenger/Pods-ClubMessenger-frameworks.sh"
#include <stddef.h> #include <stdio.h> #include <string.h> #include <stdint.h> #include <stdlib.h> #include <lib/formats/gltf.h> int main(int argc, char** argv) { struct Gltf gltf; if (argc < 2) { printf("usage: %s filename\n", argv[0]); return -1; } gltf_ctor(&gltf, argv[1]); f...
/** * Implementation of the * {@link com.google.android.stardroid.source.AstronomicalSource} interface * from objects serialized as protocol buffers. * * @author <NAME> */ function ProtobufAstronomicalSource(proto, resources) { AbstractAstronomicalSource.call(this); var shapeMap = {}; shapeMap[0] = PointSo...
/** Name: <NAME> Course: BTP305 **/ #ifndef _I_PRODUCT_H_ #define _I_PRODUCT_H_ #include <iostream> #include <fstream> namespace w7 { class iProduct { public: virtual double getCharge() const = 0; virtual void display(std::ostream&) const = 0; virtual ~iProduct(){}; }; std::ostream& operator<<(std::o...
<gh_stars>0 package services import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "os" ) func GetAwsSession() *session.Session { return session.Must(session.NewSession( &aws.Config{ Endpoint: aws.String(os.Getenv("AWS_ENDPOINT")), Region: aws.String(os.Getenv("AWS_REGION")), ...
package com.codecool.quest; import com.codecool.quest.inventoryui.*; import com.codecool.quest.logic.*; import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx.scene.control.Button; imp...
<gh_stars>1-10 import { useEffect, useState } from 'react'; import useRouter from './useRouter'; function useSearch<T>(arr: T[], textFields: (keyof T)[], priceFields: (keyof T)[]) { const [dataToReturn, setDataToReturn] = useState<T[]>([]); const { query } = useRouter(); const { search = '', minMax = '' } = quer...
<filename>docs/.vuepress/routes/2019.js<gh_stars>100-1000 const genSidebarConfig = require('./getSidebarConfig') module.exports = [ { title: '2019十二月(December)', collapsable: true, children: genSidebarConfig('english/2019/2019-December', false) }, { title: '2019十一月(November)...
const cheerio = require('cheerio'); const fs = require('fs'); const path = require('path'); const glob = require('glob'); const cleanCSS = require('clean-css'); var appRoot = require('app-root-path'); var dummyFn = function (html) { return html; } module.exports = function (options) { if (!(options && options...
<filename>core/src/main/java/org/hisp/dhis/android/core/arch/repositories/filters/internal/PeriodFilterConnector.java /* * 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 fo...
const memUsage = handler.getMemoryUsage(); let output = ''; for (let key in memUsage) { output += `${key} ${Math.round(memUsage[key] / 1024 / 1024 * 100) / 100} MB\n`; } output += `Total Loaded Game Objects: ${objectManager.objectStore.getLoadedObjectCount()}\n`; user.send(output);
import React, {useState, useRef} from 'react'; const child = { padding: '25px', margin: '25px', border: '2px solid blue' }; const Counter = (prop) => { console.log("fuction called...."); let counter = useRef(0); let [myState, setMyState] = useState("A"); let updateState = () => { counter.current++...
#!/bin/bash source ~/.bash_profile sed -i "s/mysql_url/${mysql_url}/g" application.conf sed -i "s/mysql_port/${mysql_port}/g" application.conf sed -i "s/redis_url/${redis_url}/g" application.conf sed -i "s/redis_port/${redis_port}/g" application.conf
package com.quantconnect.lean; /// Live server types available through the web IDE. / QC deployment. public enum ServerType { /// Additional server Server512, /// Upgraded server Server1024, /// Server with 2048 MB Ram. Server2048 }
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "functions.h" #include "main-screen.h" #include "models/profile.h" int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); app.setApplicationName("Gr...
#!/bin/bash ############################################################################# # Engine tests ############################################################################# CURRUSER=`whoami` TESTPREFIX="" SLEEPCMD="" HAS_XSERVER="0" if [ "$CURRUSER" == "buildbot" ] || [ "$CURRUSER" == "abuild" ]; then if...
#Calculate the sum of all elements in a given dataframe df$sum <- rowSums(df) #Print the results print(df$sum)
<reponame>DNAbro/Java-Game-Project-3<filename>src/models/Item/Armors/HeadArmor.java package models.Item.Armors; import models.Entity.Entity; import models.Inventory.Inventory; import models.Equipment.Equipment; import utilities.Location.Location; import views.Assets; import java.awt.image.BufferedImage; /** * Imp...
package fwcd.fructose.ml.math; import java.io.Serializable; import java.util.Arrays; import java.util.Iterator; import java.util.concurrent.ThreadLocalRandom; import fwcd.fructose.ArrayIterator; import fwcd.fructose.exception.SizeMismatchException; import fwcd.fructose.function.FloatSupplier; import fwcd.fructose.fun...
<reponame>Igfernandes/modaousada function hoverImg(z, l){ val = z.childNodes; if(l == 'off'){ y = z.childElementCount x = 2; wait = setInterval(() =>{ if(x <= y){ if(x > 1){ val[x - 1].classList.remove('on') val[x - 1].classList.add('of...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by <NAME>, <EMAIL>, All rights reserved. # LLNL-CODE-647188 # # For det...
// Exercício 09 - Crie um programa por meio do qual o usuário irá digitar a operação desejada e // dois valores, ao final deverá ser exibido o resultado da operação. // Opções disponíveis: 1 – Divisão; 2 – resto da divisão; 3 – adição; 4 – multiplicação. #include <stdio.h> int main(void) { int escolha; int n1,...
#!/bin/sh echo [$(date)] "Download success." echo "Group Id: $1" echo "File Num: $2" echo "File Path: $3"
<filename>src/views/systemManagement/role/api copy.js import request from '@/utils/request' const BASE_API_7 = process.env.VUE_APP_BASE_API_7 //shuiku //查看图片接口 export function getReservoirImage(params) { return request({ url: '/web/point/getReservoirImage', baseURL: BASE_API_7, method: 'GET', params:...
<reponame>darshanpatil/SampleSpringBootApp package com.demoapp; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DemoSpringBoot...
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from "typeorm"; import { ItemPedido } from "src/item-pedido/itemPedido.entity"; @Entity() export class Produto{ @PrimaryGeneratedColumn() id: number; @Column({type: "varchar" }) nome: String; @Column({type: "varchar" }) des...
#!/bin/bash set -ex LOCAL_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ROOT_DIR=$(dirname "$LOCAL_DIR") # Run build script from scripts if applicable if [[ "${BUILD_ENVIRONMENT}" == *android ]]; then export ANDROID_NDK=/opt/ndk ./scripts/build_android.sh "$@" exit 0 fi # Run cmake from ./build directory ...
<filename>spacegraphcats/catlas/test_components.py #! /usr/bin/env python3 import unittest from .graph import Graph from .components import components, num_components class ComponentsTest(unittest.TestCase): def test_components(self): g = Graph(num_nodes=12) g.add_arc(1, 2) g.add_arc(3, ...
const express = require('express') const _ = require('lodash') const bodyParser = require('../../services/body-parser') const helper = require('../../helper') //const log = require('hw-logger').log module.exports = (config, store) => { const router = express.Router() router.post('/', helper.checkAuth(config, tru...
var assert = require('assert'); var helpers = require('we-test-tools').helpers; var path = require('path'); var utils, we; describe('lib/utils', function () { before(function (done) { utils = require('../../../src/utils'); we = helpers.getWe(); done(); }); describe('listFilesRecursive', function() {...
import React, { PureComponent } from 'react'; const Greeter = () => { return ( <h1> Hello World!</h1> ); } export default Greeter ;
<gh_stars>0 package personalfinance.gui.panel; import personalfinance.gui.MainButton; import personalfinance.gui.MainFrame; import personalfinance.settings.HandlerCode; import personalfinance.settings.Text; public final class StatisticsTypePanel extends AbstractPanel { private final String title; public Sta...
#! /bin/bash scp -P 2022 farm:charcoal/output.ibd2/just_taxonomy.combined_summary.csv . scp -P 2022 farm:charcoal/output.ibd2/SRS104400_110.fna.gz.report.txt .
<filename>thread/src/main/java/com/java/study/chapter14/ConditionBoundBuffer.java<gh_stars>1-10 package com.java.study.chapter14; import org.apache.http.annotation.GuardedBy; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public c...
<gh_stars>1-10 /* * */ package net.community.chest.jfree.jfreechart.plot.category; import java.util.List; import net.community.chest.convert.ValueStringInstantiator; import net.community.chest.dom.DOMUtils; import net.community.chest.jfree.jfreechart.chart.renderer.BaseGeneratorConverter; import net.community.chest...
package com.lsngo.myapplication.ui.activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import com.lsngo.myapplication.ui.adapter.mPagerAdapter; import com.lsngo.myapplication.R; /** *...
package com.rahul.uberapi.android.demo; import android.app.Activity; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.os.Bundle; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.util.HashMap; public class Constants { private static ...
class MyClass: def __init__(self, name, age): self.name = name self.age = age def test_repr(self): return f'MyClass("{self.name}", {self.age})' # Example usage obj = MyClass("Alice", 25) print(obj.test_repr()) # Output: 'MyClass("Alice", 25)'
<gh_stars>1-10 'use strict'; const client = require('../client'); // CARD WITH WISHLIST TAG CALL FROM DATABASE function getCardWishlist(request, response) { let sql = `SELECT * FROM cardtable WHERE tag = 'wish-list' ORDER BY id DESC;`; client.query(sql) .then(results => { response.render('pages/wish-l...
package com.lepao.ydcgkf.mvp.presenter; import android.util.Log; import com.lepao.ydcgkf.api.ApiService; import com.lepao.ydcgkf.base.BasePresenter; import com.lepao.ydcgkf.mvp.model.CommonModel; import com.lepao.ydcgkf.mvp.model.FingerModel; import com.lepao.ydcgkf.mvp.view.FingerView; import java.util.Map; import...
#!/bin/bash SCRIPTDIR=$(dirname $(readlink -f "$0")) export FLUENTDCONFIGDIR="$SCRIPTDIR/realtimeapp_fluentd/config" export LOGDIR="$SCRIPTDIR/logs" docker-compose -f monitoring.yml "$@"
#!/bin/bash if [ ! -d ./builds ] ; then mkdir builds fi; SRC="spatial.c tools.c" FLAGS="-lgsl -std=c99 -DLOG -qopenmp -Wall -fast" echo Building: $1-saved rm -f ./builds/$1-saved icc $SRC -o builds/$1-saved $FLAGS strip ./builds/$1-saved echo Building: $1-gen rm -rf ./buids/$1-gen icc $SRC -o builds/$1-gen -D_BUI...
import React, { useEffect, useState } from 'react'; import { BrowserRouter as Router, useLocation, Link, useParams, useHistory } from "react-router-dom"; import { HttpClient } from '../shared/http-client'; import { MeetingAttendeeListProperties, MeetingAttendeesList } from './meeting-attendees-list'...
def add_10_elements(old_array): new_array = [] for i in range(len(old_array)): new_array.append(old_array[i] + 10) return new_array # Driver code old_array = [1, 2, 3, 4, 5] print(add_10_elements(old_array))
#include <queue> #include <memory> #include <iostream> // Event structure representing an event with a unique identifier and a timestamp struct Event { int id; long long timestamp; // Other event properties and methods // ... void Delete() { // Implementation to delete the event std...
model = Sequential() model.add(Dense(50, input_dim=X_train.shape[1], activation='relu')) model.add(Dense(50, activation='relu')) model.add(Dense(1, activation='sigmoid'))
<reponame>kxepal/couchdb-fauxton // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy of // the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
import { ALERT_SUCCESS, ALERT_ERROR, ALERT_INFO, ALERT_WARNING, ALERT_CLEAR } from 'ActionTypes'; const initialState = { visible:true }; export default function productReducer(state = initialState, action) { switch (action.type) { case ALERT_SUCCESS: // All done: set l...
#!/usr/bin/env bash # Copyright AppsCode Inc. and Contributors. # # 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 appl...
<reponame>ctuning/ck-spack ############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by <NAME>, <EMAIL>, All rights reserved. # L...
""" CPSC 231 Group Project - Apocalypse 095 Play the game of Apocalypse! A simultaneous game based upon the principles of chess. The rules can be found here: https://en.wikipedia.org/wiki/Apocalypse_(chess_variant) The program functions are neatly divided into different sections to define different areas of the pro...
<filename>src/features/userActivityMonitoring/redux/actions/communication.ts<gh_stars>1-10 import { makeCommunicationActionCreators } from 'shared/helpers/redux/index'; import * as NS from '../../namespace'; /* tslint:disable:max-line-length */ export const { execute: setLastActivity, completed: setLastActivityComplete...
// Copyright <NAME> 2006. // Distributed under 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) #include <boost/parameter/config.hpp> #if (BOOST_PARAMETER_MAX_ARITY < 4) #error Define BOOST_PARAMETER_MAX_ARITY as 4 or greater. #endi...
<reponame>Azeirah/note-taking-experimentation<filename>lib/disableContextMenu.js function disableContextMenu(element) { element.addEventListener("contextmenu", function (event) { event.preventDefault(); return false; }); }
import { WizardContext } from 'react-albus'; import WelcomeAnimation from 'scenes/WelcomeAnimation/WelcomeAnimation'; function Welcome({ next }: WizardContext) { return <WelcomeAnimation next={next} />; } export default Welcome;
mkdir target # Execute static code analysis with swiftlint swiftlint > target/swiftlint-result.xml
#!/bin/bash set -e -x -o pipefail DUB_FLAGS=${DUB_FLAGS:-} # Check for trailing whitespace" grep -nrI --include='*.d' '\s$' . && (echo "Trailing whitespace found"; exit 1) # test for successful release build dub build -b release --compiler=$DC -c $CONFIG $DUB_FLAGS # test for successful 32-bit build if [ "$DC" == ...
#!/bin/bash fw_depends zeromq RETCODE=$(fw_exists ${IROOT}/mongrel2.installed) [ ! "$RETCODE" == 0 ] || { \ source $IROOT/mongrel2.installed return 0; } MONGREL2=$IROOT/mongrel2 # TODO: Get away from apt-get # Dependencies sudo apt-get install -y sqlite3 libsqlite3-dev uuid uuid-runtime uuid-dev # Update linke...
#!/bin/sh . /usr/share/openclash/ruby.sh LOG_FILE="/tmp/openclash.log" LOGTIME=$(echo $(date "+%Y-%m-%d %H:%M:%S")) dns_advanced_setting=$(uci -q get openclash.config.dns_advanced_setting) if [ "${14}" != "1" ]; then controller_address="0.0.0.0" bind_address="*" else controller_address=${11} bind_address=...
<reponame>captainwong/Tools #pragma once // CalcDlg dialog class CalcDlg : public CDialogEx { DECLARE_DYNAMIC(CalcDlg) public: CalcDlg(CWnd* pParent = nullptr); // standard constructor virtual ~CalcDlg(); // Dialog Data #ifdef AFX_DESIGN_TIME enum { IDD = IDD_DIALOG_CALC }; #endif protected: virtual void D...
<reponame>pkubiak/mdoc import unittest, sys, os sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/..') from parameterized import parameterized from mdoc.parser import tokenize class TokenizeTestCase(unittest.TestCase): @parameterized.expand([ ### COMMENTS ### # Leading and trailing ...
#!/usr/bin/env bash # Copyright 2021 The Knative 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 ...