text
stringlengths
27
775k
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // @dart=2.10 import 'package:pub/src/levenshtein.dart'; import 'package:test/test.dart'; void main()...
import "./_internal/arrayWithOrderFromValue.test"; import "./_internal/arrayWithoutValue.test"; import "./_internal/optionalRandomValueGivenArray.test"; import "./_internal/arrayWithMovedValue.test";
class Post < ApplicationRecord include ImageUploader::Attachment(:image) belongs_to :admin validates :category, presence: true validates :image, presence: true end
import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:menu_editor/controllers/menus_controller.dart'; import 'package:menu_editor/models/menu.dart'; import 'package:menu_editor/navigation/navigation.dart'; import 'package:menu_editor/routes/existing_menus/existing_menus_controller.dart'...
package com.twt.zq.commons.util import android.annotation.SuppressLint import android.content.Context import android.location.Location import android.location.LocationManager import android.widget.Toast import com.twt.zq.commons.common.CommonContext /** * Created by SGXM on 2019/5/7. */ class LocationUtil { com...
class CreateUsers < ActiveRecord::Migration def change create_table :users do |user| user.string :username user.string :email user.string :password_digest end end end
<?php $router->group(['namespace' => 'Category'], function () use ($router) { $router->group(['middleware' => 'access.routeNeedsPermission:create-article'], function () use ($router) { get('category/create','CategoryController@create')->name('admin.category.create'); post('category/store','CategoryContro...
package tofu.examples.di.algebras import derevo.derive import tofu.data.derived.ContextEmbed import tofu.examples.di.util.Summoner import tofu.higherKind.derived.representableK @derive(representableK) trait HttpClient[F[_]] { def send(request: String): F[String] } object HttpClient extends Summoner[HttpClient] wit...
--- layout: post title: "Traefik v2 Ingress Installation" categories: Kubernetes --- The Traefik Kubernetes Ingress provider is a Kubernetes Ingress controller; that is to say, it manages access to cluster services by supporting the Ingress specification. In this post we will be installing Traefik V2 and MetalLB. We ...
module Algorithm.Knapsack where {-# ANN module "HLint: ignore Avoid restricted function" #-} {-| >>> :{ let w = 9 weights = [2,1,3,2,1,5] values = [3,2,6,1,3,85] in foldr knapsack (replicate (w + 1) 0) (zip weights values) :} [0,3,5,6,9,85,88,90,91,94] -} knapsack :: (Int, Int) -> [Int...
module Extendable extend ActiveSupport::Concern included do has_many :content_extensions has_many :extensions, through: :content_extensions end def extensions_list self.extensions.map(&:name) end def extensions_list=(names) self.extensions = (names || []).map { |name| Extension.find_or_cr...
import basiclist.term.types.*; public class BasicList { %gom { module Term imports int String abstract syntax Element = | a() | b() | c() List = conc( Element* ) } public final static void main(String[] args) { List l = `conc(a(),a(),b(),c(),a()); ...
<?php namespace Commentics; class Memcached { private $time; private $host; private $port; private $memcached; private $status = false; public function __construct($settings) { $this->time = $settings['time']; $this->host = $settings['host']; $this->port = $settings...
#ifndef ENSEMBLE_WATER_BAG_HPP #define ENSEMBLE_WATER_BAG_HPP #include <cmath> #include <string> #include <random> namespace ensemble{ class WaterBag { public: static std::string name() { return "WaterBag Distribution"; } WaterBag(double T, int num) : T_(T), num_(num){} template <class Rand> void set_initia...
class ScoutsController < ApplicationController before_action :find_scout, only: [:edit, :update, :destroy] def index if params[:search] search_term = params[:search].downcase.gsub(/\s+/, "") @scouts = Scout.all.select{ |scout| scout.first_name.downcase.include?...
package com.example.spark.app import com.example.spark.testUtils.{SparkJobRunHelper, SparkLocalMaster} import org.scalatest.FunSuite class SampleSparkAppRunner extends FunSuite with SparkJobRunHelper with SparkLocalMaster { runSparkJobAsTest[SampleSparkApp.type] }
#include "Types.r" resource 'BNDL' (128) { 'FTHA', 0, { /* array TypeArray: 2 elements */ /* [1] */ 'ICN#', { /* array IDArray: 1 element */ /* [1] */ 0, 128 }, /* [2] */ 'FREF', { /* array IDArray: 1 element */ /* [1] */ 0, 128 } } }; resource 'FREF' (128) { 'APPL', 0, "" };
#!/bin/bash echo "This script will ask for sudo rights in order to copy files to the theme directory." echo " " echo "Installing..." sudo cp -r G-Flat-blue /boot/burg/themes echo "Setting permissions..." sudo chmod -R 755 /boot/burg/themes/G-Flat-blue/ echo "Udating burg config..." sudo sudo update-burg echo "Select yo...
/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #pragma once #include <AzToolsFramework/API/EditorEntityAPI.h> #include <AzToolsFramework/Prefab/...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const child_process_1 = require("child_process"); const devkit_1 = require("@nrwl/devkit"); const path = require("path"); function default_1(options, context) { return tslib_1.__awaiter(this, void 0, void ...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolar...
package dev.programadorthi // Integer Unary Operator typealias IntUnaryOp = (Int) -> Int val square: IntUnaryOp = { it * it } val triple: IntUnaryOp = { it * 3 } val compose: (IntUnaryOp) -> (IntUnaryOp) -> IntUnaryOp = { f -> { g -> { h -> f(g(h)) } } }
#ifndef LIBTENSOR_CTF_BTOD_SET_SYMMETRY_H #define LIBTENSOR_CTF_BTOD_SET_SYMMETRY_H #include <libtensor/core/noncopyable.h> #include <libtensor/gen_block_tensor/addition_schedule.h> #include "../ctf_btod_traits.h" namespace libtensor { /** \brief Sets the permutational symmetry of distributed blocks in accordance ...
module Main where import Database.LMDB.Simple import Control.Monad (forM_) main :: IO () main = do env <- openEnvironment "test/env" defaultLimits db <- readOnlyTransaction env $ getDatabase Nothing :: IO (Database String Int) transaction env $ do clear db forM_ [("one",1),("two",2),("three",3)] $ \(k...
public class StrangeCounter { static long strangeCounter(long t) { long pivotTime1 = 1; long pivotValue = pivotTime1 + 2; long pivotTime2 = pivotTime1 + pivotValue -1; long diference = t - pivotTime1; while(pivotTime2 < t) { pivotTime1 = (pivotTime1*2) + 2;...
import React from 'react'; import UserContext from "../../utils/userContext"; function CardBody() { return ( <UserContext.Consumer> {({ user }) => ( <div> <h4> Favorite language: {user.language} </h4> <h4> Email: {user.email} </h4> ...
using System; using System.Collections.Generic; using System.Text; using ReactiveUI; namespace SextantSample.ViewModels { public static class Interactions { public static Interaction<Exception, bool> ErrorMessage = new Interaction<Exception, bool>(); } }
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; public class Mover : MonoBehaviour { public static Vector3 MoverPosition; public Animator Animator; public Rigidbody Rigidbody; public float Speed; public bool IsSlowed; public bool Is...
# John Conway’s Game of Life [Click here](https://toblux.github.io/game-of-life/) for a demo.
from typing import List from .dromedary_case import darwin_to_dromedary_case, screaming_snake_to_dromedary_case, snake_to_dromedary_case, \ to_dromedary_case __all__ = ["dromedary_to_pascal_case", "screaming_to_pascal_case", "snake_to_pascal_case", "darwin_to_pascal_case", "to_pascal_case"] # All imp...
/* Copyright 1986, 1989, 1990, 1996 by Abacus Research and * Development, Inc. All rights reserved. */ #if !defined (OMIT_RCSID_STRINGS) char ROMlib_rcsid_windUpdate[] = "$Id: windUpdate.c 63 2004-12-24 18:19:43Z ctm $"; #endif /* Forward declarations in WindowMgr.h (DO NOT DELETE THIS LINE) */ #include "rsys/co...
// 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.Collections.Generic; using System.Diagnostics; using System.Linq.CompilerServices; using System.Linq.E...
using Pkg dependencies = [ "JLD", "LoopVectorization", "Optim", "NLsolve", "StatsBase", "Distributions", "Plots", "Revise", "DataFrames", "CSV" ] Pkg.add(dependencies)
#include "app/render/shader.hpp" #include "slope/debug/assert.hpp" #include "slope/debug/log.hpp" #include "slope/core/array.hpp" #include "glad/gl.h" #include <optional> namespace slope::app { static_assert(std::is_same_v<RenderHandle, GLuint>); static_assert(std::is_same_v<Shader::Location, GLint>); class ShaderSt...
<?php namespace AntdTag\ColumnType; use Illuminate\Support\Str; use Qscmf\Builder\ColumnType\ColumnType; use Think\View; class AntdTag extends ColumnType { public function build(array &$option, array $data, $listBuilder){ $opt = array_merge([ 'name' => $option['name'], 'tags' => $...
@file:Suppress("FILE_NAME_MATCH_CLASS", "FILE_WILDCARD_IMPORTS", "LargeClass") package org.cqfn.save.frontend.components.basic import org.cqfn.save.domain.Role import org.cqfn.save.entities.Organization import org.cqfn.save.info.UserInfo import org.w3c.fetch.Response import react.* import react.dom.* import kotlinx...
class CreateAdjustments < ActiveRecord::Migration[5.2] def change create_table :adjustments do |t| t.string :reason, null: false t.text :description, null: false t.bigint :creator_id, null: false t.bigint :validator_id, null: true t.decimal :amount, precision: 32, scale: 16, null: f...
#!/bin/bash # Pull in the helper functions for configuring BigBlueButton source /etc/bigbluebutton/bbb-conf/apply-lib.sh enableUFWRules enableMultipleKurentos echo " - Update config" yq w -i $HTML5_CONFIG public.app.copyright "©2021 Savvy Education Inc." yq w -i $HTML5_CONFIG public.app.remainingTimeThreshold 5 yq w...
# frozen_string_literal: true module Types class ReportCardType < Types::BaseObject field :rank, Integer, null: true field :score, Integer, null: false field :team_name, String, null: false field :team_organization, String, null: true field :each_score, ...
import React, { ReactNode } from 'react'; import AsyncResourceErrorBoundary, { Props as ErrorBoundaryProps } from './AsyncResourceErrorBoundary'; interface AsyncResourceContentProps { fallback: NonNullable<ReactNode> | null; errorComponent?: React.ComponentType<any>; } type Props<T> = AsyncResourceContentProps & ...
package io.iohk.metronome.examples.robot.app import cats.effect.ExitCode import monix.eval.{Task, TaskApp} import io.iohk.metronome.examples.robot.app.config.{ RobotConfigParser, RobotConfig, RobotOptions } object RobotApp extends TaskApp { override def run(args: List[String]): Task[ExitCode] = { RobotCo...
<?php declare(strict_types=1); namespace Vrok\MessengerReply\Tests; use PHPUnit\Framework\TestCase; use Vrok\MessengerReply\ReplyToStamp; class ReplyToStampTest extends TestCase { public function testProperties() { $stamp = new ReplyToStamp('output'); $this->assertEquals('output', $stamp->g...
import { CoreEntity } from '@core/core.orm-entity' import { GetOptions } from '@core/interfaces/get-options' import { OrderAttribute } from '@core/types/order-attribute.type' import { RelayGraphQLAdapter } from '../adapters/relay/relay.adapter' export abstract class BaseGraphQLResolver { protected readonly relay: R...
module Foo where data MaybeS a = NothingS | JustS a -- crashes with : -- Fixpoint: Testing Solution -- z3Pred: error converting && [ (isJust(lq_anf__ddc) <=> false) -- ; (lq_anf__ddc = ds_dd9) -- ; (fromJustS([gloop#r9K]) = True#6u) -- ...
#pragma once #include <QList> #include <QString> #include "model.h" #include "executable_resource.h" class Executable : public Model { public: Executable(); Executable(int id, int platformId, QString displayName, QString filepath, QString description, QString genres, QString players, QString publisher, QStri...
import styled, { css } from 'styled-components' import Drawer from '@material-ui/core/Drawer' import AppBar from '@material-ui/core/AppBar' import { ToolBar } from '../../../components' const SideDrawer = styled(Drawer)` > .MuiPaper-root { width: 400px; min-height: 100vh; ${({ theme }) => css` ${...
# 实现具有 echo 功能的超信机器人 使用示例代码,需要在[超信机器人广场](https://bot.chaoxin.com)创建机器人并获取API key,修改实例中的 API key (token),可以开启一个简单的具有echo功能的聊天机器人。 详情:请参阅文章 [使用 nodejs 制作 echo 超信机器人](https://sunqinying.com/articles/chaoxin_bot_echo_text_tutorial.html)
#MUST ALREADY HAVE default env sourced! #IMPORTANT: DO NOT OUTPUT MESSAGES ON LOAD BY DEFAULT! LIBNAME="DOCKER" VERSIONINFO="20181227.1" if [ -z "$LOADED_LIB_DOCKER" ]; then if [ "load-verbose" = "$1" ]; then echo "#Loaded function-library $LIBNAME v$VERSIONINFO" fi fi LOADED_LIB_DOCKER="YES" if [ -z ...
import {Component, OnInit} from '@angular/core'; import {Router} from "@angular/router"; import {ServerService} from "../../services/server.service"; @Component({ selector: 'app-login', templateUrl: './login.component.html', styleUrls: ['./login.component.scss'] }) export class LoginComponent implements OnInit {...
package com.softmotions.ncms.ui import org.oneandone.qxwebdriver.By.qxh import org.openqa.selenium.chrome.ChromeOptions import org.testng.annotations.AfterClass import org.testng.annotations.BeforeClass import org.testng.annotations.Test /** * @author Adamansky Anton (adamansky@softmotions.com) */ @Test(groups = a...
FactoryBot.define do factory :commit_count do commit_count { rand(500) } user project end end
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Post; use Validator; use File; class Postcontroller extends Controller { public function addpost(Request $request) { $validation = Validator::make($request->all(),[ 'title'=>'required', 'desciption'=>'req...
#!/bin/sh # Copyright 2016 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. umask 022 mkdir -p -m 0711 $LOCKBOX_CACHE_DIR # /sbin/mount-encrypted emits the TPM NVRAM contents, if they exist, to a # file on tmpfs which is...
UPDATE users set "role" = '0' WHERE "role" = 'user'; UPDATE users set "role" = '1' WHERE "role" = 'admin'; UPDATE users set "role" = '-1' WHERE "role" NOT IN ('user', 'admin'); ALTER TABLE users ALTER COLUMN "role" SET DATA TYPE INTEGER USING trim("role")::INTEGER;
package de.kotlinBerlin.kMapper import de.kotlinBerlin.kMapper.extensions.* import kotlin.properties.Delegates import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue class SimpleBidirectionalMappingTest { @ExperimentalStdlibApi @Test fun testSimpleMapping() { class ...
require 'logstash-logger' logger_type = ENV['LOGGER_TYPE'] || nil logger_path = ENV['LOGGER_PATH'] || nil logger_host = ENV['LOGGER_HOST'] || nil logger_port = ENV['LOGGER_PORT'] || nil logger_name = ENV['LOGGER_NAME'] || 'windmill-logger' if logger_type == 'file' and logger_path logger = LogStashLogger.new(type: :...
/* * Copyright (c) 2015 Nikolay Zapolnov (zapolnov@gmail.com). * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
using System.Collections.Generic; using model.cards; using model.zones; using UnityEngine; namespace view.gui { public class ZoneBox { private readonly GameObject gameObject; private CardPrinter Printer; private IDictionary<Card, GameObject> visuals = new Dictionary<Card, GameObject>()...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AlexPilotti.FTPS.Common; using VirtualPath.Common; namespace VirtualPath.AlexFTPS { public class FtpVirtualDirectory : AbstractVirtualDirectoryBase { internal FtpVirtualPathProvide...
import { AddressFormFields } from '../AddressForm/types'; export type StyleKeys = 'component' | 'addressLabel'; export const DVACardTypes = [ { label: 'GOLD', value: 'GOLD' }, { label: 'WHITE', value: 'WHITE' }, { label: 'ORANGE', value: 'ORANGE' }, ]; export const AboriginalStatus = [ { label: 'ABORIGINAL N...
/* * C128 CP/M C Library C3L * * 8564/8566 VIC-IIe bitmap demo. * * Copyright (c) Steven P. Goldsmith. All rights reserved. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys.h> #include <hitech.h> #include <cia.h> #include <vic.h> #include <graphics.h> /* * Clear bitmap. */ void clea...
<?php namespace Modules\Quotes\Entities; use Illuminate\Database\Eloquent\Model; class Quote_item_status_history extends Model { protected $fillable = [ 'id', 'quote_item_id_fk', 'quote_status_id_fk', 'remarks', 'created_by', 'assigned_to' ]; }
# N-BEATS: Neural basis expansion analysis for interpretable time series forecasting - *Implementation in Pytorch* - *Implementation in Keras by @eljdos* - https://arxiv.org/abs/1905.10437 <p align="center"> <img src="nbeats.png" width="600"><br/> <i>N-Beats at the beginning of the training</i><br><br> </p> Trust...
// mde_flutter - A cross platform viewer for the mods.de forum. // Copyright (C) 2019 Sebastian Uhl // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // ...
package com.app.androidPixabay.commons.util import org.mockito.invocation.InvocationOnMock import org.mockito.stubbing.Answer class SequenceList<T> constructor(results : List<T>) : Answer<T> { private var resultIterator : Iterator<T> = results.iterator() // the last element is always returned once the iterato...
#!/bin/bash SCRIPT_DIR="$( cd ${BASH_SOURCE[0]%/*} ; echo $PWD )" set -x set -e set -o pipefail : ${TRAVIS_OS_NAME?"TRAVIS_OS_NAME should be set"} if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ${SCRIPT_DIR}/travis_ci_osx_entry_point.sh elif [ "${TRAVIS_OS_NAME}" = "linux" ]; then ${SCRIPT_DIR}/travis_ci_linux_entry_...
--- image_lightbox: '0' margin_class: 'm-t-md-40 m-b-md-30' container: '1' columns: - col_grid: '2' new_row: '1' link_position: left text_link: Leggi image: user/pages/images/1000x1000.png: name: 1000x1000.png type: image/png ...
# -*- coding: windows-1252 -*- ### # # Copyright Alan Kennedy. # # You may contact the copyright holder at this uri: # # http://www.xhaus.com/contact/modjy # # The licence under which this code is released is the Apache License v2.0. # # The terms and conditions of this license are listed in a file contained # in...
require 'spec_helper' describe "Orders" do before(:each) do sign_in end it "lists orders" do visit_path orders_path end it "should render" do order = create :order visit_path order_path order end it "creates order from basket" do basket = create(:basket_with_item) visit_path edit_...
#change host and port value to bind the discovery service to HOST=localhost PORT=5003 DISC=localhost:5000 #register with discovery service first curl -X POST http://$DISC/register/visual_lib/$HOST:$PORT export FLASK_APP=visual_lib.py flask run --host=$HOST --port=$PORT
function Wait-EtcdCluster { [CmdletBinding()] param ( [Array]$IPAddress, [String]$CaPem, [String]$ClientPem, [String]$clientKey, [Int]$ExpectedNodes ) $continue = $true while ($continue) { try { $etcdctlargs = @( "--output json", "--endpoint https://${IPAddress}:2...
// <Snippet2> using System; using System.Globalization; public class Example { public static void Main() { NumberFormatInfo current1 = NumberFormatInfo.CurrentInfo; current1 = (NumberFormatInfo) current1.Clone(); Console.WriteLine(current1.IsReadOnly); CultureInfo culture2 = CultureInfo...
<?php $ini = parse_ini_file('config.ini'); echo $ini['attributes'][0] . "\n"; echo $ini['attributes'][1] . "\n"; echo $ini['apple'] . "\n"; $test = parse_ini_file('config.ini', true); echo $test['fruitCounter']['apple'] . "\n"; echo $ini['animals'] . "\n"; var_dump($test); // $test = file($filePath, ) ?>
namespace FoodControl { using System; using System.Windows.Forms; using FoodControl.Model; using FoodControl.View; using System.Configuration; using System.Threading; using FoodControl.Utility; /// <summary> /// Determine Lines of Code /// reg-ex: ^(?([^\r\n])\s)*[^\s+?/]+[^\n...
import { User, UserExtSource } from '@perun-web-apps/perun/openapi'; export interface Candidate extends User{ userExtSource: UserExtSource; attributes: Map<string, string>; additionalUserExtSource: UserExtSource[]; }
package me.fornever.avaloniarider.idea.settings import com.intellij.openapi.components.BaseState import com.intellij.openapi.components.Service import com.intellij.openapi.components.SimplePersistentStateComponent import com.intellij.openapi.components.State import com.intellij.openapi.project.Project enum class Aval...
#ifndef COMPASSWIDGET_H #define COMPASSWIDGET_H #include <QWidget> class CompassWidget: public QWidget { Q_OBJECT public: CompassWidget(); public slots: void setBearing(int degrees); protected: QSize minimumSizeHint() const; QSize sizeHint() const; void paintEvent(QPaintEvent *event); privat...
-- tamanho de uma lista tamanho [] = 0 tamanho (x:xs) = 1 + tamanho xs -- soma dos elementos de uma lista soma [] = 0 soma (x:xs) = x + soma xs -- soma dos números pares de uma lista somaPares [] = 0 somaPares (x:xs) | mod x 2 == 0 = x + somaPares xs | otherwise = somaPares xs -- soma dos elementos nas posições ...
<?php /** * File: functions.custom.php * Description: Place to put the custom and general functions. * * Package: REST-in PHP (RIP) Framework * Author: Arkar WINN MINN HTWE * Email: arkarwmh@gmail.com * Repository: https://github.com/arkarwmh/restinphp * Website: http://www.restinphp.com * Released under MIT ...
package ru.nbsp.pushka.presentation.core.base import android.content.Intent import android.os.Bundle import android.support.v7.app.AppCompatActivity import ru.nbsp.pushka.BaseApplication import ru.nbsp.pushka.network.auth.AccountManager import ru.nbsp.pushka.presentation.login.LoginActivity import javax.inject.Inject ...
# hello-world https://guides.github.com/activities/hello-world/ Hal here, my memory cassettes are finally in order, thanks
# OpenTelemetry Release Process ## Starting the Release Before releasing, it is a good idea to run `./gradlew japicmp` on the main branch and verify that there are no unexpected public API changes seen in the `docs/apidiffs/current_vs_latest` directory. Open the release build workflow in your browser [here](https://...
require 'command' require 'commands/look' require 'lookfile' # Command 'lookfile restore' implementation class Restore < Command def self.options_messages %( restore \t $ lookfile restore \t\t - Restore files from lookfile to user pc ) end def self.command_name 'restore' end def self.parent...
<?php class Laposta_Field extends Laposta_Resource { private $list_id; public function __construct($list_id) { // we need the list_id for each call $this->list_id = $list_id; parent::__construct(get_class()); } public function get($field_id) { return parent::connect(array( 'path' => array($field_id)...
define(["require", "exports"], function (require, exports) { "use strict"; var Utils = (function () { function Utils() { } Utils.prototype.randomInt = function (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }; return Utils; }()); ...
import { encode } from './utils'; export enum Fields { MINIMUM = 'min', EXTENDED = 'ext' } export interface Fieldsable { fields?: Fields; } export enum SortOrder { ASC = 'ASC', DESC = 'DESC' } export interface Paged { pageStart?: number; pageCount?: number; } /** * User defined type guard to identif...
<?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\MessageController; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your applica...
import json import os def get_info(): """ Retorna as informações do jogo. """ with open(os.path.join("data", "game_info.txt"), encoding = "utf-8") as file: return file.read() def get_questions(): """ Retorna as questões do jogo. """ with open(os.path.join("data", "game_...
/* Compile and run as scalac -classpath .:/path/to/junit/junit-4.x.jar MyTest.scala scala -classpath .:/path/to/junit/junit-4.x.jar org.junit.runner.JUnitCore MyTest */ import org.junit._ import org.junit.Assert._ class MyTest { @Test(timeout = 100) def testSomeFeature() { assertTrue(6 * 7 == 42) } }
/* * Copyright 2008 Google 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 ...
#include <stdio.h> #include<bits/stdc++.h> using namespace std; bool isSubsetSum(int set[], int n, int sum) { bool subset[n + 1][sum + 1]; for (int i = 0; i <= n; i++) subset[i][0] = true; for (int i = 1; i <= sum; i++) subset[0][i] = false; for (int i = 1; i <= n; i++) { for (int j = 1; j <= sum;...
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import * as io from 'socket.io-client'; import 'normalize.css'; import './styles.css'; import store from './store'; import App from './components/App'; const socket = io.connect('/'); socket.on('data', data => { store.addRequest(data); }); Reac...
part of 'booking_taxi_bloc.dart'; class BookingTaxiState extends Equatable { const BookingTaxiState._({ this.status = BookingTaxiStatus.unknown, this.from = UserPositionPlace.empty, this.to = UserPositionPlace.empty, this.distance = 0.0, this.time = 0, this.cost = const [0.0, 0.0], this....
#region using LoESoft.GameServer.networking.incoming; using System.Collections.Generic; #endregion namespace LoESoft.GameServer.networking.handlers { internal class URLHandler : MessageHandlers<URL> { public override MessageID ID => MessageID.URL; private readonly List<string> ALLOWED_DOMAI...
// Copyright 2015 The Vanadium Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. part of game; abstract class GameCommand { final String phase; final String data; final SimulLevel simultaneity; GameCommand(this.phase, this.da...
import { TransportStream } from '../src/TransportStream'; /** * Thin wrapper around a ranvier-telnet `TelnetSocket` */ export declare class TelnetStream extends TransportStream { attach(socket: TelnetStream): void; write(message: string, encoding?: string): void; pause(): void; resume(): void; end(): void; ...
docker build -t yaysh/dokub-backend:v1.0 . && docker push yaysh/dokub-backend:v1.0
// Copyright (c) 2018 Palantir Technologies. 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 require...
lazy val root = (project in file(".")) .enablePlugins(SbtPlugin) .settings( name := "sbt-byte-buddy", organization := "net.bytebuddy", version := "1.2.0", scalaVersion := "2.12.12", libraryDependencies += "net.bytebuddy" % "byte-buddy" % "1.10.16", bintrayRepository := "sbt-plugins", bin...
<?php /** * Provide a public-facing view for the plugin * * This file is used to markup the public-facing aspects of the plugin. * * @link http://flothemes.com * @since 1.0.0 * * @package Flo_Forms * @subpackage Flo_Forms/public/partials */ ?> <!-- This file should primarily consist of HTML ...