text stringlengths 27 775k |
|---|
<?php
$SQL_DOMAIN='localhost';
$SQL_USERNAME='admin';
$SQL_PASSWORD='root';
$DB='master';
?> |
import 'dart:io';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:fogosmobile/actions/preferences_actions.dart';
import 'package:fogosmobile/constants/endpoints.dart';
import 'package:fogosmobile/loc... |
class GameService {
joinGameRoom = (socket, roomId) => {
return new Promise((resolve, reject) => {
socket.emit("join_game", { roomId });
socket.on("room_joined", () => resolve(true));
socket.on("room_join_error", ({ error }) => reject(error));
});
};
upda... |
require 'fileutils'
require 'tmpdir'
module Redispot
class WorkingDirectory
# Create a temporary directory
#
# @param basedir [String]
def initialize (basedir = nil)
@directory = File.expand_path(Dir.mktmpdir(nil, basedir))
ObjectSpace.define_finalizer(self, Remover.new(@directory))
... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import {
OPEN_TELEMETRY_AGENT_NAMES,
RUM_AGENT_NAMES,
} from '../../../..... |
package com.squareup.sqldelight.intellij
import com.alecstrong.sqlite.psi.core.psi.SqliteColumnAlias
import com.alecstrong.sqlite.psi.core.psi.SqliteColumnName
import com.alecstrong.sqlite.psi.core.psi.SqliteCteTableName
import com.alecstrong.sqlite.psi.core.psi.SqliteTableAlias
import com.alecstrong.sqlite.psi.core.p... |
package gatherlogs
import (
log "github.com/sirupsen/logrus"
"github.com/chef/automate/lib/platform/command"
)
// Copy holds the fetching data
type Copy struct {
SrcPath string
DestPath string
}
func (c *Copy) execute() error {
copyArgs := command.Args(
"--recursive",
"--dereference",
"--parents",
c.S... |
{-# language TypeFamilies #-}
module Fun
( module Term
, Fun(..)
, _S
, _K
, _I
) where
import Term
class Fun t where
term :: Term -> [Term] -> t
instance Fun Term where
term t xs = foldr (flip app) t xs
instance (tm ~ Term, Fun t) => Fun (tm -> t) where
term x xs y = term x (y:xs)
_S, _K, _I :: ... |
/**
*
*/
package cjlite.web.core;
import java.util.Map;
import cjlite.error.ErrorManager;
import cjlite.utils.Maps;
/**
* @author YunYang
* @version Sep 18, 2015 3:14:40 PM
*/
public class ErrorManagerImpl implements ErrorManager {
private Map<String, Exception> exceptionMap = Maps.newHashMap();
@Override
... |
import kotlinx.browser.document
import kotlinx.coroutines.*
import org.w3c.dom.*
private val scope = CoroutineScope(Dispatchers.Default)
fun main() {
document.addEventListener(
"DOMContentLoaded",
{
val botsContainer = document.getElementById("bots_container") ?: return@addEventListene... |
{-
Author(s): Jesse Michael Han (2019)
Core combinators and utility functions.
-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
module Colada.Basic.Core where
import Prelude hiding (Word)
import Control.Monad.Trans.State.Lazy
import qualified Prelude
import Text.Megaparsec
import Text.Megaparsec.... |
/* _ _
* | | (_)
* | | __ _ _ _ _
* | | / _` || | | || |
* | || (_| || |_| || |
* |_| \__, | \__,_||_|
* __/ |
* |___/
*
* Copyright (c) 2015-22 frank256
*
* License (BSD):
*
* Redistribution and use in source and binary forms, with or without modification,
* ar... |
#!/bin/bash
# Modifying .env
if [[ $1 ]] && [[ $2 ]] && [[ $3 ]] && [[ $4 ]] && [[ $5 ]] && [[ $6 ]]; then
sed -i 's/WP_ENV=/WP_ENV='$1'/g' .env
sed -i 's/www.example.com/'$2'/g' .env
sed -i 's/database_name_here/'$3'/g' .env
sed -i 's/username_here/'$4'/g' .env
sed -i 's/password_here/'$5'/g' .env... |
import { ConnectionPool, Request as SqlRequest, TYPES } from 'mssql';
/* eslint-disable no-unused-vars */
export enum UatType {
All = 0,
ConsiliuJudetean = 11,
Municipiu = 12,
Oras = 13,
Comuna = 14,
Bucuresti = 15, // Primaria Municipiului Bucuresti
BucurestiSector = 16 // Primarie de Sector al Municipi... |
<?php
namespace Database\Factories;
use Faker\Generator as Faker;
use App\Data\Models\Committee;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the m... |
package net.caiban.utils.param;
import java.util.Date;
public class Param implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
private String name;
private String types;
private String key;
private String value;
private Integer sort;
private Inte... |
<?php
/**
* IR controls for a frankly bizarre "Netta" branded heater
*
*/
namespace Ensemble\Device\IR;
use Ensemble\Async as Async;
class NettaHeater extends IRDevice {
public function __construct($name, \Ensemble\MQTT\Client $client, $deviceName, $context_device, $context_field) {
$this->context_fie... |
<?php
namespace Volosyuk\SimpleEloquent;
use Closure;
use Illuminate\Contracts\Pagination\LengthAwarePaginator as LengthAwarePaginatorInterface;
use Illuminate\Contracts\Pagination\Paginator as PaginatorInterface;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Eloquent\Collection as EloquentColle... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Patient;
use App\Models\Treatment;
use App\Models\Visit;
use App\Http\Requests\StoreVisit;
class VisitController extends Controller
{
public function create(Patient $patient){
return view('patients.visits.create', compact('... |
package com.github.choppythelumberjack.tryclose
import org.scalactic.Equality
trait FailureEqualityComparison {
implicit def failureEquality[T]:Equality[TryCloseResult[T]] = new Equality[TryCloseResult[T]] {
override def areEqual(a: TryCloseResult[T], b: Any): Boolean =
(a, b) match {
case (Failur... |
#!/bin/bash
# Looks like yarn 1.22.x breaks --silent
if [[ "$(yarn --version)" =~ ^1.22 ]]; then
export ETHEREUM_CHAIN_ID=`yarn --silent flash network-id | sed '1d'`
export CUSTOM_CONTRACT_ADDRESSES=`yarn --silent flash get-all-contract-addresses --ugly | sed '1d'`
export GNOSIS_SAFE_CONTRACT_ADDRESS=`yarn --sil... |
package glide.backoffice.locators.accounts.hotlines;
import org.openqa.selenium.By;
public class HomepageHotlines {
/**
* This locator will find Add a Hotline element in Account-->Hotlines--> Homepage
*/
public final By aTagAddAHotlineHomepageHotlines=
By.xpath(".//div[@class='pageManagementHeader_actionB... |
package org.ranji.lemon.volador.service.personal.prototype;
import org.ranji.lemon.core.service.prototype.IGenericService;
import org.ranji.lemon.volador.model.personal.StudyTime;
public interface IStudyTimeService extends IGenericService<StudyTime, Integer>{
}
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BASE_DIR=$SCRIPT_DIR/..
build=false
while getopts 'b' opt; do
case $opt in
b) build=true ;;
esac
done
shift $((OPTIND -1))
jupytext --to notebook --output $BASE_DIR/docs/$1.ipynb $BASE_DIR/scripts/$1.py
jupyter nbconvert... |
#!/bin/bash
gpu="0"
reward_type="dense"
pos="fixed"
irs="30.0"
sgr="0.0"
lr="1e-4"
meta_lr="1e-5" # 1e-4, 1e-5
fr_lr="0" # 0, 100
death="30.0"
init_std_dev_xy="0.6" # 0.6, 1.2
init_std_dev_z="0.1"
failed_pnt="0.0" # 0.0, -0.2
num_steps="1024"
ext_col="0.0" # 0.0, 0.5, 1.0, 2.0
name="exp... |
/****** Object: View [dbo].[V_Sample_Submission_List_Report] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[V_Sample_Submission_List_Report]
AS
SELECT SS.ID,
C.Campaign_Num AS Campaign,
U.Name_with_PRN AS Received_By,
SS.Description,
SS.Container_Li... |
<?php
/**
* класс для работы с данными агентств и их сотрудников
* Class AgenciesMgr
*/
class AgenciesMgr
{
/**
* Ссылка на объект модуля
* @var object
*/
private $_module;
/**
* Код ошибки
* @var int
*/
private $_errorCode;
/**
* namespace для записи логов
... |
require "pry"
class PurchaseOrdersController < ApplicationController
before_action :set_purchase_order, only: [:update]
def update
@purchase_order.status = true;
@purchase_order.save
redirect_to :back
end
private
def set_purchase_order
binding.pry
@purchase_order=PurchaseOrder.find(params[:id])
... |
package com.example.urlshortener.service;
import com.example.urlshortener.dao.AccountToUrlHashesRepository;
import com.example.urlshortener.dao.UrlRepository;
import com.example.urlshortener.main.UrlShortenerApplication;
import com.example.urlshortener.model.RegisteredUrl;
import com.google.common.collect.ImmutableSet... |
// aux-build:unstable-macros.rs
#![feature(decl_macro)]
#![feature(staged_api)]
#[macro_use] extern crate unstable_macros;
#[unstable(feature = "local_unstable", issue = "0")]
macro_rules! local_unstable { () => () }
#[unstable(feature = "local_unstable", issue = "0")]
macro local_unstable_modern() {}
#[stable(feat... |
# Use this file to easily define all of your cron jobs.
every 60.seconds do
region = ENV['AWS_REGION'] or raise 'Missing AWS region'
rake "write_item[\"#{region}\"]"
end
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.CommandLine;
namespace Microsoft.DotNet.ImageBuilder.Commands
{
public class MergeImageInfoOption... |
import { BadRequest } from "./BadRequest";
import { NotFound } from "./NotFound";
import { Unauthorized } from "./Unauthorized";
import { Forbidden } from "./Forbidden";
import { MethodNotAllowed } from "./MethodNotAllowed";
export { BadRequest, NotFound, Unauthorized, Forbidden, MethodNotAllowed };
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TDE_Alexandre_Formulario
{
public partial class Principal : Form
{
public Prin... |
;; Repl runs basically by message passing over a shared bus/queue
;; the queue it uses is a hydra, see hydra.clj
;these imports are not all needed, needs to be weeded
(ns hiredman.repl
(:gen-class)
(:use [hiredman.hydra :only (react-on event hydra)]
[clojure.stacktrace :only (e)])
(:require [clojure.main :as r]... |
package com.sergiop.aparcamientos.di
import android.app.Application
import android.content.Context
import android.content.pm.PackageManager
import com.google.android.gms.wearable.DataClient
import com.google.android.gms.wearable.Wearable
import com.sergiop.aparcamientos.data.DataRepository
import com.sergiop.a... |
## Task #1 : Object Oriented Programming
<hr>
**Task description:**
Write a class to perform search on an interactive website.
|
var searchData=
[
['xml2dom',['xml2dom',['../de/d5e/a00007.html#ab4fb618493c4249a138793c531f90d92',1,'xml2json.php']]],
['xml2json',['xml2json',['../de/d5e/a00007.html#ae7364e84a697c2e41d3bb404f0ddfae9',1,'xml2json.php']]],
['xpath2jsonml',['xpath2jsonML',['../de/d5e/a00007.html#ae4f39f48d4ca43dcc1c36f8f4376151f'... |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Web.HackerNews
main :: IO ()
main = do
mgr <- newManager tlsManagerSettings
print =<< getItem mgr (ItemId 1000)
print =<< getUser mgr (UserId "dmjio")
print =<< getMaxItem mgr
print =<< getTopSt... |
export * from "./Add";
export * from "./Sub";
export * from "./Mul";
export * from "./Div";
export * from "./Mod";
export * from "./Pow";
export * from "./Sqrt";
export * from "./Clamp";
export * from "./Remap";
export * from "./DoOp";
|
<?php
/**
* This source file is proprietary and part of Rebilly.
*
* (c) Rebilly SRL
* Rebilly Ltd.
* Rebilly Inc.
*
* @see https://www.rebilly.com
*/
namespace Rebilly\Entities\RulesEngine;
use DomainException;
use Rebilly\Rest\Resource;
/**
* Class Condition.
*/
class Condition extends Resource
{... |
require 'test_helper'
class HomeControllerTest < ActionController::TestCase
test 'GET show' do
get :show
assert_response :success
end
test "should send slimmer analytics headers" do
get :show
assert_equal "Jobs", @response.headers["X-Slimmer-Section"]
assert_equal "125", @response.he... |
[CreateAssetMenuAttribute] // RVA: 0x14A320 Offset: 0x14A421 VA: 0x14A320
public class ReviatanBossDataAsset : BossDataAssetBase // TypeDefIndex: 10088
{
// Fields
[SerializeField] // RVA: 0x180650 Offset: 0x180751 VA: 0x180650
private int IcePillarMax; // 0x2C
[SerializeField] // RVA: 0x180660 Offset: 0x180761 VA:... |
export interface BlogItem {
id: number;
title: string;
}
export interface TypeItem {
id: number;
name: string;
}
export interface TagItem {
id: number;
title: string;
}
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MarkdownSharp.EpicMarkdown.Parsers
{
using System.Text.RegularExpressions;
public class EMRegexMatch : IMatch
{
public EMRegexMatch(Match m... |
using MimeKit;
using DCXWRUATF.UITests.Pages;
using System.Linq;
namespace DCXWRUATF.UITests.Support
{
public class EmailLetterContext : EmailFolderContext
{
public EmailLetterContext(EmailFolderContext context, MimeMessage message)
: base(context)
{
Message = message;
... |
package webapp
import java.nio.ByteBuffer
import boopickle.Default._
import chameleon.ext.boopickle._
import covenant.http.HttpClient
import sloth.{Client, ClientException, LogHandler}
import scala.concurrent.Future
import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue
object RPC {
private val client... |
class ReviewsController < ApplicationController
def index
# if directed from park/reviews
if park = Park.find_by(id: params[:park_id])
reviews = Review.all.select{|review| review.park == park}
render json: reviews, each_serializer: ReviewSerializer
# if directed from ... |
namespace PowerUtils.Geolocation.Tests;
[Trait("Type", "Guard")]
public class GuardTests
{
[Fact(DisplayName = "Throw an 'MinLatitudeException' when the degree is small")]
public void Latitude_Small_MinLatitudeException()
{
// Arrange
var degree = -180.1;
// Act
var act = ... |
// CivOne
//
// To the extent possible under law, the person who associated CC0 with
// CivOne has waived all copyright and related or neighboring rights
// to CivOne.
//
// You should have received a copy of the CC0 legalcode along with this
// work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
us... |
import { StructureProcessor } from '@ephox/boulder';
import { Arr, Optional, Type } from '@ephox/katamari';
import { checkboxDataProcessor } from '../components/dialog/Checkbox';
import { collectionDataProcessor } from '../components/dialog/Collection';
import { colorInputDataProcessor } from '../components/dialog/Col... |
package me.yaman.can.database.r2dbcsample.controller
import me.yaman.can.database.r2dbcsample.service.CityService
import me.yaman.can.database.r2dbcsample.entity.City
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bin... |
using OrchardCore.Deployment;
namespace OrchardCore.Lucene.Deployment
{
/// <summary>
/// Adds layers to a <see cref="DeploymentPlanResult"/>.
/// </summary>
public class LuceneSettingsDeploymentStep : DeploymentStep
{
public LuceneSettingsDeploymentStep()
{
Name = "Luce... |
export const httpMethodList = [
"GET",
"POST",
"PUT",
"PATCH",
"HEAD",
"DELETE",
"OPTIONS",
"TRACE",
] as const;
export type HTTPMethod = typeof httpMethodList[number];
export interface Header {
name: string;
value: string;
}
export interface HTTPPayload {
addr: string;
method: HTTPMethod;
... |
<?php
/**
* Created by 七月.
* Author: 七月
* Date: 2017/5/26
* Time: 12:50
*/
namespace app\lib\enum;
class OrderEnum
{
const FROM_MINI = 1;
const FROM_DRIVER = 2;
const FROM_MANAGER = 3;
const FROM_PUBLIC = 4;
const NOT_FIXED_MONEY = 1;
const FIXED_MONEY = 2;
const ORDER_NO = 1;
... |
Changelog
=========
1.1.3
-----
_2021-11-15_
* **Fix:** Don't leak nested enums across multiple AVK extension passes.
* **Fix:** Add missing `@JsonClass` annotation to nested enums.
* **Fix:** Generate constructor parameter defaults for `@JsonClass`-annotated classes.
1.1.2
-----
_2021-11-05_
* **Enhancement:** S... |
import DatGui, { DatButton, DatNumber, DatSelect } from "react-dat-gui";
import { IAnimationConfig } from "@usertive/react-fluid-animation";
export interface IGUIProps {
config: Partial<IAnimationConfig>;
updateConfig: (newConfig: Partial<IAnimationConfig>) => void;
resetConfig: () => void;
makeRandomSplats: (... |
#!/bin/bash
GIT_INSTALLED=$(git --version)
echo $GIT_INSTALLED
if ! [[ $GIT_INSTALLED =~ "git version"* ]]; then
echo "Git is not installed, cannot install logid. Exiting..."
exit 1
fi
echo "Downloading resources..."
wget https://github.com/vu-dinh-hung/logiops/archive/oneclick_installer.zip
if [ $(echo $?) != "... |
export class PatternDefinitionException extends Error {
constructor(message) {
super(message);
}
}
export class LexerException extends Error {
constructor(message) {
super(message);
}
}
export class UnmatchedCharacterException extends LexerException {
constructor(visibleUserPartOfString, line, chara... |
// Copyright 2018 The Darwin Neuroevolution Framework 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 ... |
//! # Global service/sub-application settings.
//!
// Project name.
// Valid characters: _ a-z A-Z 0-9
// Hint: PROJECT_NAM it is recommended not to change.
// Max size: 21
// First character: a-z A-Z
pub const PROJECT_NAME: &str = "project_name";
// Unique project key.
// Hint: UNIQUE_PROJECT_KEY it is recommended n... |
import axios from 'axios'
function getGoods() {
return axios.get('/api/goods')
}
export default {
// model的命名空间,区分多个model
namespace: 'goods',
// 初始状态
// state: [{ title: 'javascript' }, { title: 'Golang' }],
state: [],
// 异步操作
effects: {
*getList(actions, { call, put }) {
... |
require "stringio"
RSpec.describe SysprepFile do
let(:good_ini) { "[section1]\n; some comment on section1\nvar1 = foo\nvar2 = bar" }
let(:bad_ini) { "; some comment on section1\nvar1_foo\nINI_DATA" }
let(:good_xml) { "<?xml version=\"1.0\"?><unattend/>" }
let(:bad_xml) { "<?xml version=\"1.0\"?><bad_root_nam... |
# Eveil: a roleplaying mud using websocket
## Description
Like some MUDs (Multi-User Dungeon) and MUSHes (Multi-User Shared
Hallucination), this game aims to provide a text only roleplaying
environment: The player creates a character and interacts with others
by describing its actions with the `pose` command.
But wh... |
// TODO(adamjcook): Add library description.
library katex.delimiters;
import 'dart:math' as Math;
import 'build_common.dart' as buildCommon;
import 'dom_node.dart';
import 'font_metrics.dart' as fontMetrics;
import 'options.dart';
import 'parse_error.dart';
import 'styles.dart' as styles;
import 'symbols.dart';
impo... |
-------------------------------------------------------------------------------
--
-- Script: resource_waiters.sql
-- Purpose: to show the sessions that have waited for a certain event
--
-- Copyright: (c) Ixora Pty Ltd
-- Author: Nabeel Khan
--
--------------------------------------------------------------------------... |
# frozen_string_literal: true
module Barong
class App
include ActiveSupport::Configurable
class Error < ::StandardError; end
class << self
def define
yield self
end
def set(key, default = nil)
if by_env(key)
config[key] = by_env(key)
elsif Rails.app... |
using System.Threading;
using System.Threading.Tasks;
using Stormpath.SDK.Linq;
namespace Stormpath.SDK.Account
{
/// <summary>
/// Represents a collection of <see cref="IFactor">Factors</see>.
/// </summary>
public interface IFactorCollection : IAsyncQueryable<IFactor>
{
/// <summary>
... |
import * as Ably from 'ably';
interface AblyKeyOk {
ok: true;
key: string;
}
interface AblyKeyError {
ok: false;
error: string;
}
const fetchAblyKey = async (): Promise<AblyKeyOk | AblyKeyError> => {
try {
const before = Date.now();
const fetchResponse = await fetch(`/api/ably`);
// TODO: Vali... |
// Copyright (c) 2012 Alexander Sychev. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package scms
import (
"net/http"
"html/template"
"os"
"io"
"encoding/json"
"bytes"
"archive/zip"
"appengine"
"appengine/datastore"
"appengine/u... |
#include "ch05.h"
double get_cpu_time(void)
{
struct rusage r_usage;
time_t msec;
getrusage(RUSAGE_SELF,&r_usage);
msec = r_usage.ru_utime.tv_sec*1000000.0 + r_usage.ru_utime.tv_usec;
return ((double)(msec)/1000000.0);
}
|
//
// LGSearchBar.h
// LGDictionaryDemo
//
// Created by 刘亚军 on 2018/9/27.
// Copyright © 2018年 刘亚军. All rights reserved.
//
#import <UIKit/UIKit.h>
@class LGSearchBar;
@protocol LGSearchBarDelegate <NSObject>
- (void)lg_searchBar:(LGSearchBar *)searchBar didSearchWord:(NSString *)word;
@end
@interface LGSearch... |
#!/bin/bash
# Docker entrypoint script.
# Start phoenix server
mix phx.server
|
I needed a topological sort in PL/PgSQL, so here it is. This is probably not
especially fast, but it's written in pure PL/PgSQL using only hstore.
Example usage with the graph on the Wikipedia page:
```SQL
SELECT topological_sort(
ARRAY[5,7,3,11,8,2,9,10],
hstore '11 => "{5,7}", 8 => "{7,3}", 2 => "{11}", 9 ... |
<?php
/*
|--------------------------------------------------------------------------
| Display data in view
|--------------------------------------------------------------------------
|
| 1. created app.blade
| 2. Enter data in title section of master template
| 3. Enter data in contact section of master template
| 4... |
import * as Caml_option from "../../../../../../../node_modules/bs-platform/lib/es6/caml_option.js";
import * as ImmutableSparseMapService$WonderCommonlib from "../../../../../../../node_modules/wonder-commonlib/lib/es6_global/src/ImmutableSparseMapService.js";
function buildData(base64, uint8Array, name, mimeType, ... |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'UstensilLineDTO.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
UstensilLineDTO _$UstensilLineDTOFromJson(Map<String, dyna... |
#!/bin/bash
curl -XDELETE http://localhost:9200/streaming
curl -XDELETE http://localhost:9200/ml
curl -XPUT http://localhost:9200/streaming
curl -XPUT http://localhost:9200/ml
curl -XPOST http://localhost:9200/streaming/_mapping/tweets -d '{
"tweets": {
"properties": {
"user": { "type": "stri... |
export const problem1 = (numbers, target) => {
var set = new Set();
var result = 0;
var complement = 0;
set.add(numbers[0]);
for(var i = 1; i < numbers.length; ++i) {
complement = target - numbers[i];
if(set.has(complement)) {
result = numbers[i] * complement;
break;
... |
---
name: User Story
about: Add new features
title: ''
labels: user story
assignees: mskradde
---
# User story
As a developer I want to setup the basic template
## Notes / Links
## Acceptance criteria
- [ ] Prettier
- [ ] Eslint
- [ ] Create-React-App
- [ ] Storybook
- [ ] Json-Server
- [ ] MongoDB
- [ ] React ... |
// Imports
import * as express from 'express';
import {setupAuth} from './setup/index.ts';
import {config} from '../../config.ts';
import * as bodyParser from 'body-parser';
import * as cookieParser from 'cookie-parser';
// Server setup
let serverConfig = config.servers.auth;
export let server = express();
//... |
#!/usr/bin/env bash
#
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Helper Function to unpack Bitcoin
unpack_btc() {
# Seperate new section
seperator
# Compile if user downloaded source
echo "${RESET}${BOLD}Unpackin... |
//
// NumberView.cpp
// curves
//
// Created by Aaron Taylor on 10/18/14.
// Copyright (c) 2014 Aaron Taylor. All rights reserved.
//
#include "NumberView.h"
void NumberView::setupCurve(int d)
{
digit = d;
// if (curve ) {
// delete curve;
// }
curve1 = new Bezier();
curve2 = new Be... |
<?php
namespace Keycloak\Client\Entity;
use Keycloak\JsonDeserializable;
class Client implements JsonDeserializable
{
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $clientId;
/**
* @var bool
*/
public $enabled;
/**
* @var array
*/
... |
#!/usr/bin/ruby
require 'getoptlong'
# ---------------------------------------
# Utility Functions
# ---------------------------------------
##
# Print the required usage of vagrant
#
def print_usage()
puts 'vagrant [options] <command>'
puts
puts 'Options:'
puts ' --name The name assigned to the ... |
#include "fscommon.hpp"
#include <fstream>
#include <boost/filesystem.hpp>
using namespace boost::filesystem;
namespace fs
{
uint32_t FileSize(std::ifstream& File)
{
uint32_t Size;
File.seekg(0, ios::end);
Size = File.tellg();
File.seekg(0, ios::beg);
return Size;
}
uint32_t FileSize(const string... |
export interface IIdentityKeyPair { privKey?: ArrayBuffer, pubKey: ArrayBuffer }
export interface IPreKeyPair { pubKey, privKey }
export interface ISignedPreKeyPair { signature, pubKey, privKey }
interface ISignalStore {
Direction: { SENDING: number, RECEIVING: number }
getIdentityKeyPair(): Promise<IIdentityK... |
package org.springframework.bootstrap.sample.service;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.j... |
module Database.MongoDB.Migration.Utils where
import Control.Monad.Logger (MonadLogger, logInfoN)
import qualified Data.Text as T
logInfo :: MonadLogger m => String -> m ()
logInfo = logInfoN . T.pack
|
#!/usr/bin/Rscript
library(igraph)
args<-commandArgs(T);
path=args[1];
network=read.delim(paste(path, "PRpair.txt", sep="/"), header=F);
Network=as.data.frame(network);
g=graph_from_data_frame(Network);
pdf(paste(path, "network.pdf", sep="/"));
plot(g, vertex.size=3, vertex.color="red", edge.arrow.size=0.5, vertex.... |
"""
Builders: Each builder specifies the expected output format
raw text : TextBuilder
words + boxes : WordBoxBuilder
lines + words + boxes : LineBoxBuilder
"""
from html.parser import HTMLParser
import logging
import xml.dom.minidom
logger = logging.getLogger(__name__)
__all__ = [
'Box',
'TextBuilder',
... |
import { Injectable } from '@angular/core';
import { QueryEntity } from '@datorama/akita';
import { BoothStore, BoothState } from './booth.store';
@Injectable({
providedIn: 'root'
})
export class BoothQuery extends QueryEntity<BoothState, any> {
constructor(protected store: BoothStore) {
super(store);
}
... |
package main
import (
"context"
"crypto/tls"
"crypto/x509"
"log"
"net/http"
"sync"
"time"
api "github.com/iredelmeier/grpc-http-shared-port"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/examples/helloworld/helloworld"
)
const (
ServerStartTimeout = time.Second
)
... |
# OrangePI dht22 support
Install python 3.9 from source and continue installing required parts
```
pip3 install pyA20
wget https://raw.githubusercontent.com/jingl3s/DHT11-DHT22-Python-library-Orange-PI/master/dht.py
cp dht.py /usr/local/lib/python3.9/dhtopi.py
cp mqtt_io/modules/sensor/dht22opi.py /usr/local/lib/pytho... |
/*
* (C) 2018 Ribose Inc
*
* Botan is released under the Simplified BSD License (see license.txt)
*/
#include <botan/pwdhash.h>
#include <botan/exceptn.h>
#include <botan/internal/scan_name.h>
#if defined(BOTAN_HAS_PBKDF2)
#include <botan/pbkdf2.h>
#endif
#if defined(BOTAN_HAS_PGP_S2K)
#include <botan/pgp_s2k.... |
## bugfix/memtx
* Fixed MVCC transaction manager story garbage collection breaking memtx TREE
index iterator (gh-6344).
|
homebrew_cask 'spectacle'
cookbook_file "/Users/#{node['sprout']['user']}/Library/Preferences/com.divisiblebyzero.Spectacle.plist" do
source 'com.divisiblebyzero.Spectacle.plist'
user node['sprout']['user']
mode '0600'
end
|
$scriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$nightlyRevFile = Join-Path -Path $scriptDir -ChildPath nightly.rev
$previousHash = git rev-parse HEAD~1
$hashOfLatestBuild = Get-Content -Path $nightlyRevFile -ErrorAction SilentlyContinue
$hasChanges = -Not ($previousHash -eq $hashOfLatestBuild)
return @{... |
# -*- coding: utf-8 -*-
#
# Copyright © 2009- The Spyder Development Team
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""External Python Shell widget: execute Python script in a separate process"""
import os
import os.path as osp
import socket
import sys
from ... |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
module Raft where
import Codec.Serialise
import Control.Concurrent.MVar
import Control.Monad.Reader
import Data.ByteString
import GHC.Generic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.