text
stringlengths
27
775k
import copy import numpy as np import curiosity.utils.base as base import curiosity.models.normal_encoder_asymmetric_with_bypass as modelsource import curiosity.datasources.images_and_normals as datasource dbname = 'threeworld_normals' colname = 'test' experiment_id = 'test0_longdr' model_func = modelsource.get_mode...
# frozen_string_literal: true module Del class SocketConnection def initialize(path:) File.unlink(path) if File.exist?(path) @server = UNIXServer.new(path) end def on_receive socket = @server.accept yield socket rescue StandardError => error Del.logger.error(error) ...
# nodegame-mturk Handles operations with Amazon Mechanical Turk (MTurk), such as approve/reject HITS, grant bonuses, assign qualifications, etc. ## Decription It can be used as an interactive console or can be called programmatically. As an interactive console, it can operate in two modes: - **standalone mode**: i...
module PokeApi module Common # GenerationGameIndex object handling lists of game_index and generation class GenerationGameIndex attr_reader :game_index, :generation def initialize(data) @game_index = data[:game_index] @generation = Generation.new(data[:generation...
<?php namespace Orca\Admin\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Http\Response; use Orca\Admin\Http\Controllers\Controller; use Orca\Admin\DataGrids\TestDataGrid; /** * TestDataGrid controller * * @author Nikhil orca <orca@orca.com> @ysmorca * @author <> * */ class DataGridContro...
package com.github.beikern.monoids trait CustomMonoidInstances { val AndInstance = new MonoidCustom[Boolean] { override def empty: Boolean = true override def combine(x: Boolean, y: Boolean): Boolean = x && y } val OrInstance = new MonoidCustom[Boolean] { override def empty: Boolean = false overr...
package cn.edu.sdnu.i.livemeeting.profile; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import cn.edu.sdnu.i.livemeeting.R; public class ProfileEdit extends Li...
import { Component, Inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material'; import { Router } from '@angular/router'; @Component({ // tslint:disable-next-line:component-selector selector: 'new-signal', templateUrl: 'new-signal.component.html', styleUrls: ['new-...
import os import typing from urllib.parse import urljoin import requests class _Router: """ Provides generic `get` and `post` methods. Implemented by DoccanoClient. """ def get( self, endpoint: str, params: dict = {}, ) -> requests.models.Response: """ Ar...
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; use App\Models\Asset; class AddNextAutoincrementToSettings extends Migration { /** * Run the migrations. * * @return void */ public function up() {...
package entity func (s *Constellation) GetName(lang string) string { for _, lt := range s.Names { if *lt.Lang == lang { return *lt.Text } } return "" } func (s *Region) GetName(lang string) string { for _, lt := range s.Names { if *lt.Lang == lang { return *lt.Text } } return "" } func (s *SolarS...
{"score": 7.97, "timestamp": 1562142748.0, "score_count": 74934} {"score": 7.97, "timestamp": 1560745353.0, "score_count": 74728} {"score": 7.98, "timestamp": 1554197497.0, "score_count": 73928} {"score": 7.98, "timestamp": 1554003522.0, "score_count": 73883} {"score": 8.0, "timestamp": 1522339370.0, "score_count": 695...
// This file is part of Substrate. // Copyright (C) 2020-2021 Parity Technologies (UK) Ltd. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // 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 F...
# Ubuntu1804InstallCuda ## Step 1 * Reset environment * Install gpu driver ## Step 2 * Install cuda (copied from TF [homepage](https://www.tensorflow.org/install/gpu)) ## Tested 2020/02/23 * TensorFlow 2.1 works * Pytorch 1.4 works
(def nplayers 478) (def last-marble 71240) (defn insert-at [array pos item] (vec (concat (subvec array 0 pos) [item] (subvec array pos)))) (defn remove-at [array pos] (vec (concat (subvec array 0 pos) (subvec array (inc pos))))) (defn max-score [] (loop [circle [0] current-marble 0 curr...
<?php (defined('BASEPATH')) OR exit('No direct script access allowed'); /* load the MX_Router class */ require APPPATH."third_party/MX/Router.php"; class MY_Router extends MX_Router { /** * Override the default system routing to add the initial module routes */ protected function _set_routing() { // Load the...
package com.chenjim.andlibs.demo import android.util.Log import com.chenjim.andlibs.BaseApplication import com.chenjim.andlibs.loadsir.* import com.chenjim.andlibs.preference.SPUtil import com.chenjim.andlibs.utils.Logger import com.kingja.loadsir.core.LoadSir /** * @description: * @fileName: UserApp * @author: ji...
/**********************************************************************************************/ /* Copyright (c) 2015 Amanda Randles, John Gounley */ /* All rights reserved. */ /* ...
import AddCommentDialog from './AddCommentDialog.vue' import AddStaffNotationDialog from './AddStaffNotationDialog.vue' import BusinessAuthErrorDialog from './BusinessAuthErrorDialog.vue' import CancelPaymentErrorDialog from './CancelPaymentErrorDialog.vue' import CoaWarningDialog from './CoaWarningDialog.vue' import {...
#pragma once #include <fstream> class Settings { public: Settings() { soundOn = true; _w = -1; _h = -1; } void setWH(int w, int h) { _w = w; _h = h; } void getWH(int& w, int& h) { w = _w; h = _h; } int getW() { return _w; } int getH() { return _h; } bool isSoundOn() { return soundOn...
package de.westermann.kobserve.property import de.westermann.kobserve.base.ObservableProperty import de.westermann.kobserve.base.ObservableValue import kotlin.math.pow import kotlin.test.Test import kotlin.test.assertEquals class FlatMappingObservablePropertyTest { @Test fun flatReceiverTest() { val ...
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class PromotionLog extends Model { use softDeletes; protected $fillable = [ 'employee_id', 'grade_code', 'grade_name','position','valid_from','valid_to', 'created_by' ]; public function user() { retu...
# frozen_string_literal: true module XitoliteRepositoryFinder extend ActiveSupport::Concern def find_xitolite_repository @repository = Repository::Xitolite.find find_repository_param rescue ActiveRecord::RecordNotFound render_404 else @project = @repository.project render_404 if @project.nil? ...
package io.udash package rest.raw import com.avsystem.commons.serialization.GenCodec import com.avsystem.commons.serialization.json.RawJson /** * Value used as encoding of [[io.udash.rest.Body Body]] parameters of * [[io.udash.rest.JsonBody JsonBody]] methods. Wrapped value MUST be a valid JSON. */ final case c...
import unittest from katas.beta.list_length_v1 import count class ListLengthTestCase(unittest.TestCase): def test_equals(self): self.assertEqual(count([1, 2, 3, 4]), 4) def test_equals_2(self): self.assertEqual(count([1, 2, 3, 4, 5, 6, 7]), 7)
namespace MediaManager.Media { public interface IMediaExtractorProvider { } }
{-# LANGUAGE OverloadedStrings #-} module SMSAPI.Config (apiCfg) where import System.Directory import System.FilePath.Posix import System.Exit (exitFailure) import qualified Data.Text.IO as TIO import SMSAPI.Types import Data.Ini.Config iniParser :: IniParser APICfg iniParser = section "api" $ APICfg <$> field "use...
[Back to Guides](../README.md) # Configuration Options You can configure options in **config/secrets.yml** | Option | Definition | |----|----| | `oauth_github_id` | ID of GITHUB application | | `oauth_github_secret` | SECRET of GITHUB application | | `oauth_gitlab_id` | ID of GITLAB application | | `oauth_gitlab_sec...
package machine import ( "runtime/volatile" ) const bufferSize = 128 // RingBuffer is ring buffer implementation inspired by post at // https://www.embeddedrelated.com/showthread/comp.arch.embedded/77084-1.php type RingBuffer struct { rxbuffer [bufferSize]volatile.Register8 head volatile.Register8 tail v...
DROP TABLE IF EXISTS atcoder; CREATE TABLE atcoder ( id SERIAL, name VARCHAR(255) NOT NULL, start_time TIMESTAMP WITH TIME ZONE NOT NULL, end_time TIMESTAMP WITH TIME ZONE NOT NULL, range VARCHAR(255) NOT NULL, PRIMARY KEY (id) ); DROP TABLE IF EXISTS codeforces; CREATE TABLE codeforces ( id SERIAL, ...
import React from 'react'; import PropTypes from 'prop-types'; import Ripple from 'material-ripple-effects'; const colors = { white: 'bg-white', blueGray: 'bg-blue-gray-500', gray: 'bg-gray-700', brown: 'bg-brown-500', deepOrange: 'bg-deep-orange-500', orange: 'bg-orange-500', amber: 'bg-am...
<?php declare(strict_types=1); namespace Kerox\Tmdb\Tests\Api; class TvEpisodesTest extends AbstractApiTest { public function testGet(): void { $response = $this->tmdb->tvEpisodes()->get(4087, 1, 1); self::assertSame(200, $response->getStatusCode()); self::assertNotEmpty($response->g...
/* * Copyright 2017 Australian Digital Health Agency (The Agency) * * Licensed under the Agency’s Open Source (Apache) License; you may not use this * file except in compliance with the License. A copy of the License is in the * ' Source Code Licence and Production Disclaimer.txt' file, which should be * provided w...
import React, { useState } from 'react'; import { view, store } from '@risingstack/react-easy-state'; import { Collapse, Select } from 'antd'; import { SettingOutlined } from '@ant-design/icons'; import Setting_base from './SettingBarRight/Setting_base'; import Setting_Layout from './SettingBarRight/Setting_Layout'; im...
using System; namespace GraphQLCore.Execution { public interface IContext<T> { T Instance { get; } } }
import React from 'react' import * as R from 'ramda' import * as NodeDef from '@core/survey/nodeDef' import * as NodeDefLayout from '@core/survey/nodeDefLayout' import { NumberFormats } from '@webapp/components/form/Input' import NodeDefEntitySwitch from './components/types/nodeDefEntitySwitch' import NodeDefFile fr...
unit uModeloBaseDados; interface uses SysUtils, Classes, FMTBcd, DB, FireDAC.Comp.Client; type TDSServerModuleBaseDados = class(TDataModule) FCONEXAO: TFDConnection; FQueryGeral: TFDQuery; private public function Conectar:boolean; function Desconectar:boolean; function GetDataSet(AQuery:...
Prerequisite ============ * `mvn install` my [Spring Boot gRPC Starter](https://github.com/saturnism/spring-boot-starter-grpc) Build ===== * `mvn install` Run === 1. Start Eureka: `java -jar eureka-server/target/eureka-server-1.0-SNAPSHOT.jar` 1. Start gRPC Server #1: `java -jar grpc-server/target/springboot-grpc-ser...
// --------------------------------------------------------------------------- // File name: Armor.java // Project name: Game Project // --------------------------------------------------------------------------- // Creator’s name and email: Roberto Hernandez, hernandezr@etsu.edu // Course-Section: CSCI-1260-900 // Cre...
<head> <link rel='stylesheet' href='/v6/css/experience.css'> <script src='/v6/js/experience.js'></script> </head> <section id='experience' class='home-section'> <div id='timeline'> <div id='line'></div> <template id='timeline-block'> <img class='job' src=''> </template> ...
(define-resource complaint-form () :class (s-prefix "ext:ComplaintForm") :properties `((:name :string ,(s-prefix "foaf:name")) (:contact-person-name :string ,(s-prefix "ext:personName")) (:street :string ,(s-prefix "schema:streetAddress")) (:house-number :number ,(s-p...
<?php namespace App\Http\Controllers; use App\Models\Order; use App\Exports\OrderMultipleExport; use App\Exports\OrderExport; use Illuminate\Http\Request; use App\Notifications\OrderDelivery; use Maatwebsite\Excel\Facades\Excel; class OrderController extends Controller { // public function delivery($id) ...
-- Creation Date: 2021-04-06 -- Description: telegram chat id added to notification config alter table notification_configs add column telegram_chat_id integer;
#!/usr/bin/perl -w # use strict; use Digest::MD5; use Time::HiRes qw( time gettimeofday tv_interval ); $| = 1; #The URI paths in the DB are: # my $db_root = "/usr/local/apps/ncia/CTP-server/CTP"; # my $fs_root = "/mnt/erlbluearc/systems/cipa-images"; #/usr/local/apps/ncia/CTP-server/CTP/storage #/usr/local/apps/n...
require 'coveralls' require 'simplecov' if RUBY_ENGINE == 'ruby' if Coveralls.should_run? Coveralls.wear! else SimpleCov.start end end require 'phonetic' RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config...
package roth.lib.java.mapper; import java.util.Map.Entry; import roth.lib.java.Characters; import roth.lib.java.deserializer.Deserializer; import roth.lib.java.lang.Map; import roth.lib.java.serializer.Serializer; import roth.lib.java.time.TimeZone; import roth.lib.java.util.IdUtil; public class MapperConfig impleme...
SECTION code_l PUBLIC l_small_utob l_small_utob: ; write unsigned binary number to ascii buffer ; ; enter : hl = unsigned integer ; de = char *buffer ; carry set to write leading zeroes ; ; exit : de = char *buffer (one byte past last char written) ; carry set if in ...
/* * (c) Copyright 2019 Palantir Technologies Inc. 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 ...
package password import ( "log" "time" argonpass "github.com/dwin/goArgonPass" ) // HashPassword attempts to hash the supplied password func HashPassword(password string) (string, error) { // debug check time start := time.Now() hash, err := argonpass.Hash(password, &argonpass.ArgonParams{ Time: 15,...
# ulog server ulog server - маленькое обособленное дополнение для проектов unity3d, позволяющее в редакторе и билде направлять сообщения стандартного лога unity по сети в указанный порт. для выбора порта используйте параметр запуска **--log-server-port (port)**
import 'dart:async'; import 'package:flutter/material.dart'; /// SBB Toast. Use according to documentation. /// /// See also: /// /// * <https://digital.sbb.ch/de/design-system-mobile-new/module/toast> class SBBToast { SBBToast._(this._overlayState); static const durationShort = const Duration(milliseconds: 2000...
class MainController < ApplicationController def index if params[:id] @current_image = Photo.find(params[:id]) else @current_image = Photo.last end @voted = Vote.already_voted?(request.remote_ip) @image = Photo.new end def create @photo = Photo.new(photo_params) @photo.ip = request.remote_ip i...
; RUN: %opt < %s %loadEnzyme -enzyme -enzyme-preopt=false -mem2reg -sroa -simplifycfg -instcombine -adce -S | FileCheck %s source_filename = "submemcpy.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind readnone uwtable define dso_local ...
#!/bin/sh autopoint --force autoreconf --force --install --symlink --warnings=all
/* * Copyright 2008-2013 NVIDIA Corporation * * 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...
# frozen_string_literal: true require_relative '../config/environment' require 'rails/test_help' require 'sidekiq/testing' Sidekiq::Testing.inline! Apartment::Tenant.drop 'default' rescue nil Apartment::Tenant.create 'default' Apartment::Tenant.switch! 'default' class ActiveSupport::TestCase set_fixture_class...
using UnityEngine; using UnityEngine.UI; using DG.Tweening; public class Gallery : MonoBehaviour { [SerializeField] private Image photoImage; [SerializeField] private CanvasGroup canvasGroup; private Photo currentPhoto; public void TakePhoto(Photo photo) { currentPhoto = phot...
--- title: "(Qt) 79. GraphicsView 핵심 컴포넌트" date: 2020-03-01 00:00:00 -0000 --- ## 핵심 컴포넌트 * Display : `QGraphicsView` * Store Data Items : `QGraphicsScene` * Item : `QGraphicsItem` ![](/file/image/qt-gdi-s7-79-image-1.png) > 사실 이렇게 봐서 이해가 전혀 안된다. ㅋㅋ<br> > 엄청난 예시들이 기다리고 있으니 다음 장들을 참조하자.
package com.picawen.nano.spring.framework.beans.factory.support; import com.picawen.nano.spring.framework.beans.factory.config.SingletonBeanRegistry; import java.util.HashMap; import java.util.Map; /** * 单例Bean默认实现 */ public class DefaultSingletonBeanRegistry implements SingletonBeanRegistry { private Map<Str...
using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace Lykke.Service.KucoinAdapter.Services.RestApi.Models { public sealed class ActiveOrdersListResponse { [JsonProperty("SELL")] public IReadOnlyCollection<JArray> Sell { get; set; } [JsonPropert...
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py ; RUN: opt < %s -mtriple=i686-unknown-linux-gnu -cost-model -analyze -mattr=+sse2 | FileCheck %s -check-prefixes=X86,SSE2 ; RUN: opt < %s -mtriple=i686-unknown-linux-gnu -cost-model -analyze -mattr=+sse4.2 | FileCheck %s -check-prefixes=X...
#!/bin/bash set -e -x aws iam delete-login-profile --user-name $1 || true aws iam remove-user-from-group --user-name $1 --group-name students || true aws iam delete-user --user-name $1 || true
# More Variety Brings more variety into bots. Includes MoreFactions, ScavVariety, EnhancedPlayerScav and BossesOnAllMaps.
using System.Threading.Tasks; using DSerfozo.RpcBindings.Execution.Model; namespace DSerfozo.RpcBindings.Contract.Execution { public interface IMethodExecutor<TMarshal> { Task<MethodResult<TMarshal>> Execute(MethodExecution<TMarshal> methodExcecution); } }
# Tools for Post-Processing of Nyles output This folder contains tools that can be useful to process the output files created by Nyles after the simulation has finished.
#!/usr/bin/perl # Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved # # This file is a part of Codendi. # # Codendi 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 2 ...
/** * Copyright [2016] [Muhammad Afzal] * * 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 agree...
/*global DateTimeShortcuts, SelectFilter*/ /** * Django admin inlines * * Based on jQuery Formset 1.1 * @author Stanislaus Madueke (stan DOT madueke AT gmail DOT com) * @requires jQuery 1.2.6 or later * * Copyright (c) 2009, Stanislaus Madueke * All rights reserved. * * Spiced up with Code from Zain Memon's G...
package com.cjh.eshop.common; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** * 定时任务 * @author 陈建杭 * */ @Component public class ScheduledTast { private static Logger logger = LoggerFa...
#!/bin/bash cd /dagger install () { npm install } test_install () { if [ -z "$(ls -A node_modules)" ]; then install fi } start () { npm start } build () { npm run-script build } lint () { npx eslint . } version () { RELEASE=`git describe --tags | sed 's|release_||; s|-.*||'` BRANCH=`git rev-p...
#!/bin/bash set -x PACKAGE_NAME=$(cat package.json | grep name | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | xargs) ELECTRON_VERSION=1.8.3 PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | xargs) ROOT_DIR=$(cd $(dirname $0)/..; pwd) cd $ROOT_DIR rm -r d...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
package hemendra.books.model import android.os.Handler import android.os.Looper import hemendra.books.data.Book import hemendra.books.model.listeners.BooksLoaderListener import hemendra.books.model.utils.ConnectionCallback import hemendra.books.model.utils.ContentDownloader import hemendra.books.model.utils.CustomAsyn...
/* * focus.h * starkiller * * Created by Justin on 13/06/09. * Copyright 2009 Monkey Style Games. All rights reserved. * */ #ifndef __LXT_UI_FX_FOCUS_H__ #define __LXT_UI_FX_FOCUS_H__ #include "math/util.h" namespace Lxt { // Apply a "focus" effect, increasing alpha and decreasing size to "focus", // a...
<?php namespace Craft; class Freeform_BaseController extends BaseController { /** * @return Freeform_FormsService */ protected function getFormService() { return freeform()->forms; } /** * @return Freeform_FieldsService */ protected function getFieldsService() ...
package service import ( "github.com/echocat/caretakerd/errors" "strings" ) // Environments represents a couple of key value pair environment variables. // @inline type Environments map[string]string func (i Environments) String() string { result := "" for key, value := range i { if len(result) > 0 { result...
# frozen_string_literal: true module DataTest class Fetcher attr_accessor :s3 def initialize credentials = Aws::Credentials.new(access_key, secret) Aws.config.update(region: S3_REGION, credentials: credentials) @s3 = Aws::S3::Resource.new(region: S3_REGION) ...
<?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond ...
package BitManipulation; import java.util.Scanner; public class find_one_complement_of_number { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter any number:"); int num = sc.nextInt(); int n = num; // // fin...
--- ms.custom: devx-track-js ms.topic: include ms.date: 04/15/2021 --- If you already use the Azure service extensions, you should already be logged in and can skip this step. Once you've installed an extension in Visual Studio Code, you need to sign into your Azure account. 1. In Visual Studio Code, select the **...
require 'spec_helper' require 'pry' describe ::FFI::Fasttext::Predictor do describe "API" do let(:filename) { ::File.join(::File.dirname(__FILE__), "..", "model.bin") } it "validates #destroy! present" do ::FFI::Fasttext::Predictor.new(filename).must_respond_to :destroy! end it "validates #pr...
// https://leetcode-cn.com/problems/largest-number/ #include "extern.h" class S0179 { struct StringCompare { inline bool operator()(string& s1, string& s2) { return s1 + s2 > s2 + s1; } }; public: string largestNumber(vector<int>& nums) { if (nums.empty()) return ""; ...
package typingsSlinky.googleapis.servicenetworkingV1betaMod.servicenetworkingV1beta import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} /** * `SourceContext` represents informati...
describe ROM::Kafka::Dataset do let(:gateway_class) { ROM::Kafka::Gateway } let(:consumer_class) { ROM::Kafka::Connection::Consumer } let(:consumer) { double :consumer } before { allow(consumer_class).to receive(:new) { consumer } } let(:dataset) { described_class.new(gateway, topic.to_sym) } let(:...
using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; namespace sharedcmd.Commands { /// <summary> /// Manages commands on the CLI. /// </summary> public sealed class CommandManager : IManageCommand { private readonly List<string> commands = new(); ...
// Copyright (c) 2021, Janoš Guljaš <janos@resenje.org> // All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package schulze import "sort" // Voting holds voting state in memory for a list of choices and provides // methods to vote, to export...
class ReviewAuthorizer < ApplicationAuthorizer # Users may view (preview) published reviews in their own unit. def readable_by?(user) return true if user.has_role?(:admin, resource.customer.unit) return true if user.has_role?(:wizard, resource.customer.unit) resource.published? && user.has_role?(:user,...
import { Component, OnInit } from '@angular/core'; import { Order } from 'src/app/models/order'; import { Store } from '@ngrx/store'; import { ApplicationState } from 'src/app/store'; import { getOrderState } from 'src/app/store/selectors'; @Component({ selector: 'app-order-history', templateUrl: './order-history....
# ls aliases alias ll='ls -FGlAhp' alias la='ls -A' # Aliases to protect against overwriting and to correct mistyping alias cp='cp -iv' alias mv='mv -iv' alias mkdir='mkdir -pv' alias dc='cd' # Create a directory and cd into it mcd() { mkdir "${1}" && cd "${1}" } # python aliases alias python='python3.8' alias p...
<?php namespace marionnewlevant\snitch\models; use Craft; use craft\base\Model; class Settings extends Model { const SERVERPOLLINTERVAL = 2; const MESSAGE = 'May also be edited by: {user}.'; const INPUTIDSELECTOR = 'form input[type="hidden"][name="entryId"]' // entry forms .', form input[type="hi...
<?php Route::auth(); // Вывод форм Route::get('/', 'HomeController@index'); // Проверяет авторизован ли пользователь Route::group(['middleware' => 'auth'], function(){ // Обмен сообщениями Route::post('/sendMessage', 'MessageController@sendMessage'); Route::get('/viewForm/{id_forms_departments}', 'ViewF...
"use strict"; angular.module("Pin", ["ui.bootstrap", "google-maps", "ngRoute"]). config(['$routeProvider', function($routeProvider) { $routeProvider.when('/', {templateUrl: 'partials/splash.html'}); $routeProvider.when('/pin', {templateUrl: 'partials/map.html', controller: 'DropPin'}); $routeProvider.when('/p...
<?php declare(strict_types=1); namespace PowerSrc\AmazonAdvertisingApi\Concerns; trait HasPropertyCasts { /** * Return an array of types to cast values to on object creation. * * The property to cast is the key and the type to cast to is the value. * * The type to cast should be a Primit...
#!/usr/bin/env python # Copyright 2019 Google, LLC. # # 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...
import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:wdb106_sample/model/model.dart'; part 'items_state.freezed.dart'; @freezed abstract class ItemsState implements _$ItemsState { factory ItemsState({ @Default(<ItemStock>[]) List<ItemStock> stocks, @Default(true) bool isLoading, })...
/* * * Copyright 2019 PingCAP, 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 agre...
class Api { //Auth Section... //User Register... static const register = 'https://us-central1-bridge-fd58f.cloudfunctions.net/auth/register'; //User Login... static const login = 'https://us-central1-bridge-fd58f.cloudfunctions.net/auth/login'; //User Logout... static const logout = 'htt...
package scaladays.akka.stream import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} import akka.stream.{Attributes, FlowShape, Inlet, Outlet} final case class RepeatNTimes[T](n: Int) extends GraphStage[FlowShape[T, T]] { val in = Inlet[T]("RepeatNTimes.in") val out = Outlet[T]("RepeatNTime...
#pragma once //------------------------------------------------------------------------------ /** @class Structures::Block @ingroup Block @brief inline Block of dynamic Memory, Self Allocating on heap */ #include "Interfaces/iBlock.h" #include "Table.h" class keyBuilder : public BlockDV{ public: keyBui...
namespace Juniper.Input { /// <summary> /// An extension of Unity's UnityEngine.EventSystem.PointerInputModule.InputButton, /// to include a "None" value, for making explicit selections of no support for /// input features while working in the editor. /// </summary> public enum InputEventButton ...