text stringlengths 27 775k |
|---|
import express from 'express';
import debugFactory from '../../shared/debugFactory';
const debug = debugFactory('client-errors-register');
export default class ErrorRegisterController {
async add (req: express.Request, res: express.Response): Promise<void> {
debug.log('Error on client-side:');
deb... |
package com.gizrak.ebook.constant;
public interface Request {
public static final int IMPORT_EPUB = 0;
public static final int PREFERENCE_CHANGE = 1;
}
|
package org.firstinspires.ftc.teamcode.oldcode;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorSimple;
import com.qualcomm.robotcore.hardware.HardwareMap;
import com.qualcomm.robotcore.hardware.Servo;
/**
* Created by ftc8045 on 10/22/2017.
*/
public class RelicArm {
... |
# GUI vs Domain
## Uitgangspunt
Een (mogelijk eerder al gemaakt) programma waar een aantal classes
in zitten en een User Interface (mogelijk Grafisch).
(We gaan hier voor het verhaal uit van een Console-app)
De klant blijkt tevreden en wil een nieuwe versie van het programma:
deze nieuwe versie moet hetzelfde doen, ... |
/**
* Created by johan on 11/11/2015.
*/
export class PluginModel {
name:string;
sentences:string[];
url:string;
script:string;
folder:string;
} |
/*
Copyright 2012-2013, Polyvi Inc. (http://polyvi.github.io/openxface)
This program is distributed under the terms of the GNU General Public License.
This file is part of xFace.
xFace is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
t... |
package es.joseluisgs.kotlinspringbootrestservice.mappers.pedidos
import es.joseluisgs.kotlinspringbootrestservice.dto.pedidos.PedidoDTO
import es.joseluisgs.kotlinspringbootrestservice.mappers.usuarios.UsuariosMapper
import es.joseluisgs.kotlinspringbootrestservice.models.Pedido
import org.springframework.beans.facto... |
module Minvar
##################Dependencies####################
using Revise
if pwd() ∉ LOAD_PATH
push!(LOAD_PATH,pwd())
end
if "$(pwd())\\data" ∉ LOAD_PATH
push!(LOAD_PATH,"$(pwd())\\data")
end
using DataFrames, Distributions, GZip, ForwardDiff, Dates, LinearAlgebra, Statistics,
Measures, Formatting, Stats... |
require_relative 'util.rb'
require_relative 'card.rb'
class GathererSet
attr_accessor :name
def initialize(name); self.name = name; end
def self.dump(name); self.new(name).as_json; end
# Dump each individual card for a given set.
def card_json
multiverse_ids = Gatherer.scrape_multiverse_ids(name)
Wo... |
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
*/
package opengl.templates
import org.lwjgl.generator.*
import opengl.*
val EXT_depth_bounds_test = "EXTDepthBoundsTest".nativeClassGL("EXT_depth_bounds_test", postfix = EXT) {
documentation =
"""
Native ... |
---
templateKey: mabel-page
metaDescription: ''
inspirationImage: /img/inspiration.jpg
biographyImage: /img/biography.jpg
mabelImage: /img/author-mabel.jpg
title: Mabel
description: Star of my bestselling memoir, 'For the Love of a Dog'
presetGalleryImage1:
id: Bxrl4QChHhi
path: /img/ftload-preview.png
presetGaller... |
import os
import gflags
from common import metrics
from common import ssh
FLAGS = gflags.FLAGS
gflags.DEFINE_boolean("no_flamegraphs", False, "Set true to disable generating flamegraphs.")
TARGET_DIR = "/var/lib/ic/data/flamegraph"
class Flamegraph(metrics.Metric):
"""Flamegraph abstraction. Can be started and... |
/**
* @author Francisco Miguel Aramburo Torres - atfm05@gmail.com
*/
package arckane.schedules
import java.time._
import scala.concurrent.Future
import play.api.libs.json._
import play.api.libs.functional.syntax._
import play.api.libs.concurrent.Execution.Implicits._
import arckane.db.Node
import arckane.db.tra... |
import 'package:flutter/material.dart';
import 'package:package_info/package_info.dart';
import 'package:flutter_appcenter_bundle/flutter_appcenter_bundle.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await AppCenter.startAsync(
appSecretAndroid: '49361c2e-b788-4bc2-a33d-838b04b3e06b',... |
<?php
$db_dsn = array(
'host'=>'daniellebutters.ca',
'dbname'=>'danie481_portfolio',
'charset'=>'utf8',
);
$dsn ='mysql:'.http_build_query($db_dsn,'',';');
//DataBase credentials
$db_user = 'danie481_CB7U0c';
$db_pass = 'portfoli0123';
//tri-catch to show connection error
try{
$pdo = new PDO($dsn,$db... |
package jahirfiquitiva.apps.textdrawable.models
import android.graphics.drawable.Drawable
/**
* @author amulya
* @datetime 17 Oct 2014, 3:50 PM
*/
class DataItem(val label: String, val drawable: Drawable?, val navigationInfo: Int)
|
package com.adyen.core.exceptions;
public class UIModuleNotAvailableException extends Exception {
public UIModuleNotAvailableException(String message) {
super(message);
}
}
|
#!/bin/sh -x
export outfile=$2/$(basename $1 .dat).jpg
java -jar Vash.jar -a 1.1 -o ${outfile} -f $1
# write results manifest
cat > $2/results_manifest.json << EOF
{ "version": "1.1",
"output_data": [{
"name": "results",
"file": {
"path": "${outfile}"
}
}]
}
EOF
cat $2/results_manifest.json
|
package cn.csbe.web.cms.pub.mapper;
import java.util.List;
import cn.csbe.web.cms.common.mapper.IBaseMapper;
import cn.csbe.web.cms.pub.bean.PubCategory;
public interface IPubMapper extends IBaseMapper {
/**
* 获取城市信息
*
* @return
*/
Object getCityById(Integer id);
/**
* 获取城市列表
*
* @return
*/
L... |
Sector SS Hex Name UWP Bases Remarks Zone PBG Allegiance Stars {Ix} (Ex) [Cx] Nobility W RU
Anta A 0102 Riry D756653-7 S Ag Ni Ga 814 ImDa G5 V { -2 } (852-5) [3424] BC 8 -400
Anta A 0103 Khadiraash E000110-7 As Lo Va 323 ImDa K8 V { -3 } (300-5) [1112] B 11 0
Anta A 0108 Sag BABA455-A N Fl Ni 115 ImDa M2 V M2 V { ... |
import { BaseCommand } from '../BaseCommand';
import { MessageBox } from '../../ui/control/MessageBox';
function NewSceneCommand(options) {
BaseCommand.call(this, options);
}
NewSceneCommand.prototype = Object.create(BaseCommand.prototype);
NewSceneCommand.prototype.constructor = NewSceneCommand;
NewSceneCommand... |
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.16.1]
### Changed
- Add Finalizer for conn, stat... |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal
{
public static class ScaffoldingAnnotationNames
{
public const st... |
<?php
declare(strict_types=1);
/*
* This file is part of bardoqi/circular-linked-list.
*
* (c) Bardeen QI <bardoqi@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace bardoqi\Tests;
require_once(__DIR__ ."/../src... |
/*
* Copyright (c) 2016 Flokart World, Inc.
* All rights reserved.
*/
#include "wwwmain.hpp"
#include <sstream>
namespace hello {
void wwwmain(pion::http::response &output,
const pion::http::request &input) {
std::ostringstream content;
content << "<!DOCTYPE html>"
<< "<html>"
... |
package org.bowlerframework.view.scalate
import org.bowlerframework.controller.Controller
/**
* Created by IntelliJ IDEA.
* User: wfaler
* Date: 20/04/2011
* Time: 23:46
* To change this template use File | Settings | File Templates.
*/
trait LayoutScope{ this: Controller => {
}
//activeLayout(activeLayout... |
#!/bin/sh
# virtual-image-launcher
# IP MUST BE UPDATED accordingly to hosting IP/hostname!!!
export PUBLIC_VIRTUAL_IMAGE_COMPOSER_REST_URL=http://IP:8080/virtual-image-composer/rest
# VIRTUAL_IMAGE_MANAGER_REST_URL: see virtual-image-composer
# installer-storage
export INSTALLER_STORAGE_TOKEN=entice
export INSTALLER... |
package fr.brandon.tp3.part1_2;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import fr.brandon.tp3.part1_2.client.api.Client;
import fr.brandon.tp3.part1_2.servicetest.HelloWorldService;
@Spr... |
steal("can/view", function(can) {
/**
* @class Jaml
* @plugin jquery/view/jaml
* @parent jQuery.View
* @author Ed Spencer (http://edspencer.net)
* Jaml is a simple JavaScript library which makes
* HTML generation easy and pleasurable.
*
* Instead of magic tags, Jaml is pure JS. It looks like:
*
* @cod... |
/// <reference path='fourslash.ts' />
// @Filename: foo.ts
//// /*Destination*/export function foo() { return "foo"; }
//// import([|"./f/*1*/oo"|])
//// var x = import([|"./fo/*2*/o"|])
verify.goToDefinition("1", "Destination");
verify.goToDefinition("2", "Destination"); |
#!/bin/bash
echo "Starting livy server."
export SPARK_DIST_CLASSPATH=$($HADOOP_HOME/bin/hadoop classpath)
$LIVY_HOME/bin/livy-server
|
Struc DESCRIPTOR
Dummy dw ?, ?, ?, ?
GDT_LOC dw ?, ?, ?, ?
SourceLimit dw ?
SourceLoWord dw ?
SourceHiByte db ?
SourceRights db ?
SourceInternal db ?
SourceHiByteHi db ?
TargetLimit dw ?
TargetLoWord dw ?
TargetHiByte db ?
TargetRights db ?
TargetInternal db ?
TargetHiByteHi db ?
Bios d... |
require 'rails_helper'
RSpec.describe TwitterUserMultiplePeopleApi do
let(:twitter_user) { create(:twitter_user, with_relations: true) }
describe '#common_mutual_friend_uids' do
let(:other) { create(:twitter_user, with_relations: true) }
subject { twitter_user.common_mutual_friend_uids(other) }
it do
... |
/*
* Copyright 2017 by DITA Project
*
* 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 ag... |
package com.atom.camera.core.gl.beauty
import android.content.res.Resources
import android.opengl.GLES20
import com.atom.camera.core.gl.BaseShader
class BeautyShader :BaseShader{
private var mGLaaCoef = 0
private var mGLmixCoef = 0
private var mGLiternum = 0
private val aaCoef = 0f
private val m... |
import React from 'react'
import Cases from './case-charts'
import NewByDay from './new-by-day'
import Positivity from './positivity'
import GrowthFactor from './growth-factor'
import Tests from './tests'
const ProvinceCasesModal = ({ province, onClose }) => {
return (
<div className="modal is-active">
<di... |
package org.grapheco.lynx.types
import org.grapheco.lynx.LynxType
import org.grapheco.lynx.types.composite.{LynxList, LynxMap}
import org.grapheco.lynx.types.property.{LynxBoolean, LynxFloat, LynxInteger, LynxNull, LynxString}
import org.grapheco.lynx.types.time.{LynxDate, LynxDateTime, LynxLocalDateTime, LynxLocalTim... |
class KeywordsController < ApplicationController
skip_before_action :authenticate_user!, only: %i[index show]
before_action :load_keyword, only: %i[show edit update]
def index
@keywords = Keyword.find_keyword("%#{params[:query]}%").by_episode(@episode).order(:name).distinct.page(params[:page]).per(params[:pa... |
package day0;
import java.util.*;
public class Solution {
public static void main(String[] args) {
// Create a Scanner object to read input from stdin.
try (Scanner scan = new Scanner(System.in)) {
// Read a full line of input from stdin and save it to our variable, inputString.
String ... |
import 'package:admin/views/auth/auth_provider.dart';
import 'package:admin/views/models/ui.dart';
import 'package:admin/views/ui_provider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
class ProfileButton extends ConsumerWidget {
const ProfileButton({this.com... |
#!/bin/sh
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
sudo cpanm Algorithm::Diff
sudo -u postgres psql -f install.sql
|
import {Component} from 'angular2/core';
import {SignupComponent} from './signup.component';
import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
import {LoginComponent} from './login.component';
import {LogoutComponent} from './logout.component';
import {AuthService} from './auth.service';
@Component({
... |
module MiHome
class AbstractDevicePlatform
include Unobservable::Support
attr_accessor :log, :raise_exceptions
attr_reader :devices
attr_event :ready
def initialize(config: {},
names: {},
log: nil,
raise_exceptions: false,
... |
package com.floppylab.molecules;
import java.io.Serializable;
import javax.persistence.Embeddable;
import javax.persistence.MappedSuperclass;
import lombok.Getter;
import lombok.NoArgsConstructor;
@MappedSuperclass
@Embeddable
@NoArgsConstructor
public abstract class Molecule<T extends Serializable> implements Seri... |
<?php
namespace Modules\Admin\Services\Validations\Task;
use Modules\Task\Models\Task;
use App\Services\Validations\LaravelValidator;
class NewTaskValidator extends LaravelValidator
{
protected $id = '';
protected $messages = [
// 'sys_type.unique' => 'Widget type already taken by an other alert plea... |
SET search_path = pg_catalog;
ALTER TYPE public.typ_enum
ADD VALUE 'e-1' BEFORE 'e1';
ALTER TYPE public.typ_enum
ADD VALUE 'e0' AFTER 'e-1';
ALTER TYPE public.typ_enum
ADD VALUE 'e2.5' AFTER 'e2';
|
use anyhow::Result;
use bitcoin::consensus::{deserialize, serialize};
use bitcoin::{Block, BlockHash, OutPoint, Txid};
use crate::{
chain::Chain,
daemon::Daemon,
db::{DBStore, Row, WriteBatch},
metrics::{Gauge, Histogram, Metrics},
signals::ExitFlag,
types::{HeaderRow, ScriptHash, ScriptHashRow... |
CREATE TABLE contacts (
id INTEGER PRIMARY KEY,
first_name TEXT NOT NULL,
last_name TEXT NOT NULl,
email TEXT NOT NULL UNIQUE
); |
require 'sinatra'
require './main'
require './app/models/user'
require './app/models/oauth_token'
require './errors'
get '/api/messages' do
uid = params['id']
token = params['token']
github_token = 'get github token with some method'
messages = []
(1..10).to_a.sample.times do
messages << { title: "title ... |
package apk
import (
"bufio"
"fmt"
"io"
"net/mail"
"strconv"
"strings"
"time"
"github.com/midbel/packit"
)
const (
ctrlPackage = "pkgname"
ctrlVersion = "pkgver"
ctrlDesc = "pkgdesc"
ctrlUrl = "url"
ctrlBuildDate = "builddate"
ctrlMaintainer = "packager"
ctrlSize = "size"
ct... |
#ifndef constants_h
#define constants_h
/* This file is where you put the system constants (especially the configuratiosn of the hardware, etc.).
You can edit this file to match your system's requirements */
//LCD pin configuration
#define RS 8
#define EN 9
#define D4 4
#define D5 5
#define D6 6
#define... |
<?php
require_once(__DIR__ . '/../vendor/autoload.php');
$sample1 = file_get_contents(__DIR__ . '/resources/nietzsche.txt');
$sample2 = file_get_contents(__DIR__ . '/resources/mobydick.txt');
$chain = new \MarkovPHP\MixedSourceChain($sample1, $sample2);
$sentence = $chain->generate();
echo "RESULT:<br>";
echo $sent... |
require 'rails_helper'
describe 'RelationMethods' do
before do
10.times do |i|
Post.create(created_at: Time.now + i)
end
posts[0, 3].each do |post|
post.is_published = true
post.save
end
end
after do
Post.delete_all
end
shared_examples_for 'next_cursor exists' do
... |
package ktfx.controls
import javafx.scene.Node
import javafx.scene.Scene
import javafx.scene.image.WritableImage
/** Alias of [Scene.lookup] with non-null return and specified type. */
inline fun <reified T : Node> Scene.find(selector: String): T = lookup(selector) as T
/** Take a snapshot of this [Node] returning i... |
import {
KeyboardAvoidingView,
TextInputProps,
View,
Platform,
Image,
Text,
TouchableOpacity,
ActivityIndicator,
Alert
} from "react-native";
import { useRef, useState, useCallback, useMemo } from "react";
import { SafeAreaView } from "react-native-safe-area-context";
import { useNav... |
#!/bin/bash
set -e
echo "[Info] Starting iBrew docker!"
echo "[INFO] Startting ibrew Web"
python /home/app/iBrew/source/ibrewui
echo "[Info] Finished "
|
package com.eusecom.samshopersung.di;
import com.eusecom.samshopersung.OrderListKtFragment;
import dagger.Module;
import dagger.android.ContributesAndroidInjector;
/**
* Created by mertsimsek on 02/06/2017.
*/
@Module
public abstract class OrderListKtFragmentProvider {
@ContributesAndroidInjector(modules = O... |
import { Inject } from 'tiny-injector';
import { ClaimsPrincipal } from '../Claims';
import { AuthorizationEvaluator } from './AuthorizationEvaluator';
import { AuthorizationHandlerContext } from './AuthorizationHandlerContext';
import { AuthorizationOptions } from './AuthorizationOptions';
import { AuthorizationPolic... |
import React from "react";
import TableColumnPathType from "@arteneo/forge/components/Table/definitions/TableColumnPathType";
import { getIn, isString } from "formik";
import CSS from "csstype";
import { useTranslation } from "react-i18next";
interface TextTruncateColumnProps extends TableColumnPathType {
defaultE... |
---
layout: page-fullwidth
header: no
title: News and Media
image:
file: about_images.png
title: Felder family.
---
# News and Media
Work in progress
|
use 5.008001;
use strict;
use warnings;
package Log::Any::Proxy::Null;
# ABSTRACT: Log::Any generator proxy for no adapters
our $VERSION = '1.711';
use Log::Any::Adapter::Util ();
use Log::Any::Proxy;
our @ISA = qw/Log::Any::Proxy/;
# Null proxy objects waiting for inflation into regular proxy objects
my @nulls;
s... |
# google-actions-wolfram
Query Wolfram Alpha using Google Actions api
## Setup
1. `git clone git@github.com:evant/google-actions-wolfram.git && cd google-actions-wolfram`.
2. Go to https://developer.wolframalpha.com/portal/myapps/ and create a an app id.
3. `touch .env && echo WOLFRAM_KEY=<YOUR APP ID> > .env`.
4. Edi... |
const acc = document.getElementsByClassName("accordion");
const commentForms = document.getElementsByTagName("form");
for (let i = 0; i < commentForms.length; i++) {
commentForms[i].addEventListener("submit", addCommentHandler);
}
for (let i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function ()... |
using System;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using CritterBrains;
namespace DemoCritter
{
public class DemoCritterBrain1 : CritterBrains.CritterBrain
{
string ConfigurationFileName = ConfigurationDirectory + "/" + "Drunkard.cfg";
Random random = new Rand... |
<?php
/**
* Public, global PHP functions.
*
* @package Just_Slider
*/
// Prevent direct script access.
if ( ! defined( 'ABSPATH' ) ) {
die( 'No direct script access allowed' );
}
/**
* Display the slider.
*
* @param int $slider_id The slug of the slider.
*/
function just_slider( $slider_id ) {
$instance ... |
using CulverinEditor;
using CulverinEditor.SceneManagement;
using CulverinEditor.Debug;
public class ContinueButton : CulverinBehaviour
{
public bool reset = false;
private float volume = 0.0f;
void Start()
{
volume = Audio.GetVolume();
Audio.ChangeVolume(20);
}
public void ... |
<?php
namespace App\Http\Controllers\Admin;
use App\Permission;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
class PermissionsController extends Controller
{
public function show()
{
//查询权限表的数据
$... |
package de.oth.clustering.scala.vm.messages
import java.io.File
import akka.actor.{ActorRef, Address}
import de.oth.clustering.java.vm.vagrant.configuration.{VagrantEnvironmentConfig, VagrantVmConfig}
/**
* Created by oliver.ziegert on 22.04.17.
*/
trait VmMessages extends Serializable
case object Init extends ... |
///
/// forked from https://www.tiptap.dev/experiments/global-drag-handle/#globaldraghandle
///
import { Extension } from "@tiptap/core";
import { NodeSelection, Plugin } from "prosemirror-state";
import { serializeForClipboard } from "prosemirror-view/src/clipboard";
function removeNode(node) {
node.parentNode.rem... |
import { ObjectUtils } from "@batch-flask/utils";
import { List } from "immutable";
import { ImageInformation } from "./image-information";
const dataScienceVms = {
"linux-data-science-vm": {
osType: "linux",
},
"linux-data-science-vm-ubuntu": {
osType: "linux",
},
"standard-data-sc... |
package com.jahnelgroup.elasticsearch
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.FilterType
import org.springframework.data.elasticsearch.... |
package org.fkjava.gift.service;
import org.fkjava.commons.domain.Result;
import org.fkjava.gift.domain.Present;
import org.fkjava.gift.domain.Tally;
import org.fkjava.gift.repository.PresentRepository;
import org.fkjava.gift.repository.TallyRepository;
import org.springframework.data.domain.*;
import org.springframew... |
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin;
use lib "$FindBin::RealBin/../perl5", "$FindBin::RealBin/../perl5-ext";
use Unison::WWW;
use Unison::WWW::Page qw(skip_db_connect);
use Unison::WWW::utilities qw(render_app_list);
use Unison::WWW::PageInfo;
my $p = new Unison::WWW::Page;
print $p->render(
... |
package org.freefinder.activities;
/**
* Created by rade on 30.9.17..
*/
final class Constants {
public static final String RESOURCE_ID = "id";
public static final String REVISION_TYPE = "revisionType";
}
|
import type { ExpressConfig } from "./types";
import getEnvVar from "./getEnvVar";
const express_config: ExpressConfig = {
port: +getEnvVar("PORT"),
hostname: getEnvVar("HOSTNAME")
};
export default express_config;
|
package com.adevinta.android.barista.interaction
import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import android.util.Log
import androidx.test.core.app.ApplicationProvider.getApplicationContext
import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation
i... |
package model
import "time"
// ChatResponse is a response for a chat.
type ChatResponse struct {
Nickname string `json:"nickname"`
Message string `json:"message"`
Date string `json:"date"`
}
// ChatParams is params for chat.
type ChatParams struct {
FromDate time.Time
}
// MakeChatParams makes a chatparams... |
#include <iostream>
#include "../JSON.h"
int main(int argc, char* argv[]) {
JSON json("../example json/b.json");
std::cout << json.get<std::string>("web-app.servlet.0.servlet-name") << std::endl;
}
// g++ -std=c++17 b.cpp ../JSON.cpp ../lexer.cpp ../parser.cpp -o b |
# Copyright 2015 Ufora 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
#
# Unless required by applicable law or agreed to i... |
<?php
namespace Matthias\SymfonyConsoleForm\Console\Helper\Question;
use InvalidArgumentException;
use Symfony\Component\Console\Question\ChoiceQuestion;
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
final class AlwaysReturnKeyOfChoiceQuestion extends ChoiceQuestion
{
/**
* @var ChoiceView[]
*... |
if (Math.random()) {
xxx = 42;
}
//dumpValue(xxx);
var __result1; // for SAFE
var __result2; // for SAFE
var __result3; // for SAFE
var __result4; // for SAFE
try { // for SAFE
__result1 = xxx; // for SAFE
__result2 = xxx; // for SAFE
} catch(e) { // for SAFE
__result3 = e.name; // for SAFE
... |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Converter for RSS 2.0 feeds
module Converter.RSS
( extractFeed
, extractPosts
, isRSS
) where
import Control.Applicative ((<|>))
import Control.Monad (join)
import Data.Function ((&))
import Data.Maybe (listToMaybe, fromMaybe, fromJust)
import Data.Text (Text, pack, ... |
type MOGAFitnessScheme{T} <: ParetoFitnessScheme{T}
maximise::Vector{Bool}
end
"""
TODO: Describe MOGA.
"""
moga(s::Dict{Any, Any}) =
MOGAFitnessScheme{eval(Base.parse(Base.get(s, "of", "Float")))}(s["maximise"])
scale!{F}(s::MOGAFitnessScheme, inds::Vector{Tuple{Int, F}}) =
for (p1_id, p1_f) in inds
p1_f.r... |
module Ef.Base (module Ef.Base,module X) where
import Ef as X hiding (observe)
import Ef.Async as X
import Ef.Event as X
import Ef.Except as X
import Ef.Fiber as X
import Ef.Fork as X
import Ef.Manage as X
import Ef.Reader as X
import Ef.State as X
import Ef.Writer as X
import Data.Promise as X
import Data.Queue as ... |
namespace AnimalCentre.Models.Procedures
{
using Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public abstract class Procedure : IProcedure
{
protected IList<IAnimal> procedureHistory;
protected Procedure()
{
... |
import { useEffect } from 'react'
import { amplitudeLogger } from '../lib/amplitude-utils'
import daysFromNow from '../lib/days-from-now'
import calculateStatus from '../lib/calculate-status'
import Arbeidsplassen from './arbeidsplassen'
import DagpengerOgRegistrering from './dagpenger-og-registrering'
import Dokumenta... |
var proxy = new Proxy({}, {
get: function(obj, prop) {
console.log('设置 get 操作')
return obj[prop];
},
set: function(obj, prop, value) {
console.log('设置 set 操作')
obj[prop] = value;
}
});
proxy.time = 35; // 设置 set 操作
console.log(proxy.time); |
/**
* @auth Nannf
* @date 2020/7/10 20:30
* @description: 给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。
* <p>
* 如果你最多只允许完成一笔交易(即买入和卖出一支股票一次),设计一个算法来计算你所能获取的最大利润。
* <p>
* 注意:你不能在买入股票前卖出股票。
* <p>
* 输入: [7,1,5,3,6,4]
* 输出: 5
* 解释: 在第 2 天(股票价格 = 1)的时候买入,在第 5 天(股票价格 = 6)的时候卖出,最大利润 = 6-1 = 5 。
* 注意利润不能是 7-1 = 6, 因为卖出价格需要大于买入价... |
package pl.combosolutions.backup.psm
object DefaultsAndConstants {
val JavaHomeProperty = "java.home"
val ClassPathProperty = "java.class.path"
val RMICodebaseProperty = "java.rmi.server.codebase"
val RMIDisableHttpProperty = "java.rmi.server.disableHttp"
}
|
package io.subutai.common.security.crypto.ssl;
import java.security.KeyStore;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.subutai.common.secur... |
#!/bin/bash
ln -sr "${MESON_INSTALL_DESTDIR_PREFIX}/lib/os-release" "${DESTDIR}${1}"
|
# Joomla CMS
Homepage: [https://www.joomla.org/](https://www.joomla.org/)
Joomla! is an award-winning content management system (CMS), which enables you to build web sites and powerful online applications.
## Usage
Set `joomla_enabled: true` in your `inventories/<your_inventory>/nas.yml` file.
If you want to acces... |
# `recoil-persistent`
A very simple library for persisting recoil state.
## Installation
```sh
npm install recoil-persistent
```
## Usage
Pass `recoilPersistent()` to the Recoil's `effects` param. That's it!
```tsx
import { atom, useRecoilState, useResetRecoilState } from 'recoil';
import recoilPersistent from 'r... |
import { assertEquals } from "https://deno.land/std@0.84.0/testing/asserts.ts";
import { PrimitiveOperator } from "../operator/operators.ts";
import { Pokemon, pokemon } from "../data/pokemon.ts";
Deno.test("PrimitiveOperator: instantiates with value", () => {
const data = { id: "1234", name: "foo" };
const op = ... |
package ecs.systems
import ecs.{ Entity, EventManager }
import ecs.components.AComponent
import scala.collection.mutable.ArrayBuffer
import ecs.components.HasHP
class HPSystem extends ASystem[HPSystemNode](
new ArrayBuffer[HPSystemNode]()
) {
//TODO: See HasHP component for todo information
def process(n: HPS... |
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]$DomainNetBIOSName,
[Parameter(Mandatory=$true)]
[string]$AdminSecret,
[Parameter(Mandatory=$true)]
[string]$SQLSecret,
[Parameter(Mandatory=$true)]
[string]$ClusterName,
[Parameter(Mandatory=$true)]
... |
/*
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (C) 2011-2012 Michael Möller <mmoeller@openhardwaremonitor.org>
*/
using System;
using System.Coll... |
package com.example.kaspresso.recycler.test
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.contrib.RecyclerViewActions.actionOnItem
import androidx.test.espresso.matcher.ViewMatchers.hasDescendant
import androidx.test.espresso.matcher... |
#!/usr/bin/env bash
: '
Enables us to easily find our repo we"re looking for
go_to <tab><tab> then yields all of the git repos we can find in the GITHUB_PATH variable
# TODO app-spec find -maxdepth 2 -type f -name '.git' etc.
'
go_to_git() {
: '
Prepend the GITHUB_PATH with the auto_completion
'
cd "${GITHUB_... |
require 'rubygems'
require 'bunny'
XMLS_FOLDER="/Users/aldos/Code/blinkbox/data/zz.Distribution.Book"
abort("No such folder #{XMLS_FOLDER}!!!") unless File.exist?(XMLS_FOLDER)
t0 = Time.now
puts "Connecting to RabbitMQ..."
connection = Bunny.new
connection.start
channel = connection.create_channel
exchange = channel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.