text
stringlengths
27
775k
package mw import ( "context" "errors" "fmt" "net/http" "github.com/casbin/casbin" "github.com/go-chi/jwtauth/v5" "go.ectobit.com/lax" ) // ErrInvalidSubject is returned when there is no sub within JWT claim or when it is not of a string type. var ErrInvalidSubject = errors.New("invalid subject") // Authoriz...
# A part system from my localhub project Chat system and Push Notification with node express a part system from my localhub project
import {LogLevel, LogPayloadModel} from "../../models/log-models"; export interface ILoggerInstance { log(level: LogLevel, message: string, payload: LogPayloadModel): void; }
package mem import ( "fmt" "testing" "github.com/szuwgh/temsearch/pkg/engine/tem/byteutil" ) func Test_logs(t *testing.T) { alloc := byteutil.NewByteBlockAllocator() table := NewLogsTable(byteutil.NewForwardBytePool(alloc)) table.WriteLog([]byte("aaaaaaaaaaaaaaaaaaaaa")) table.WriteLog([]byte("bbbbbbbbbbbbbbb...
using Revise using gtpmip graph = solve_hfg("test/pddl/hdomain.pddl", "test/pddl/hp1.pddl"; max_levels=100) # 1
/* * 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 may ...
<?php namespace Omnipay\AuthorizeNet\Message; /** * Authorize.net AIM Refund Request */ class AcceptjsRefundRequest extends AIMRefundRequest { }
GOLFER: { * = * "-Golfer" Init: { lda #LIGHT_RED sta VIC.SPRITE_COLOR_0 lda #RED sta VIC.SPRITE_COLOR_1 // now sprite engine lda #0 sta spr_v_x_hi+GOLFER_UPPER_BODY_SPR_NUM sta spr_v_x_hi+GOLFER_LOWER_BODY_SPR_NUM sta spr_v_x_hi+GOLFER_CLUB_SHAFT_SPR_NUM sta spr_...
abstract type AbstractAmplifier end struct SimpleAmplifier <: AbstractAmplifier name::String in_min::typeof(0.0V) in_max::typeof(0.0V) gain::Float64 offset::typeof(0.0V) current_max::typeof(0.0mA) end name(amp::SimpleAmplifier) = amp.name in_min(amp::SimpleAmplifier) = amp.in_min out_min(amp::...
using System; namespace MicroGe.Graphics { /// <summary> /// Defines a vector with two values. /// </summary> public struct Vector2 : IEquatable<Vector2> { public float X; public float Y; private static Vector2 vectorZero = new Vector2(0f, 0f); public Vector2(float...
#!/bin/sh PLIST_FILE_NAME="org.shikato.fc.evernote.reminder.plist" PLIST_FILE_INSTALL_DIR="${HOME}/Library/LaunchAgents/" if [[ ! -e "${PLIST_FILE_INSTALL_DIR}/${PLIST_FILE_NAME}" ]]; then echo "Uninstall failed." echo "Maybe FCEvernoteReminder hasn't been installed yet." exit 1 fi launchctl unload ${PLIST...
module.exports = { navigate: { name: "Navigate", info: "Direct the browser to a specific URL.", fields: ["value"], friendly: "navigate to {value}" }, click: { name: "Click", info: "Use this to execute a mouse click on the element specified by the target.", ...
#include <bitset> #include <initializer_list> #include <limits> #include <cassert> namespace example_01 { // -> the "how to do it" section template <typename T, typename Iter> T minimum(Iter const start, Iter const end) { T minval = std::numeric_limits<T>::max(); for (auto i = start; i < end; ++i) ...
// Usage: // From examples/node, transpile files by running `tsc` // To run: // node --require dotenv/config dist/users.js import { setClerkServerApiUrl, users } from '@clerk/clerk-sdk-node'; const serverApiUrl = process.env.CLERK_API_URL || ''; const userId = process.env.USER_ID || ''; const userIdToDelete = process...
class Settings include ActiveModel::Model attr_accessor :setting_model def self.human_attribute_name(a) I18n.translate "activerecord.attributes.settings.#{a}" end def column_for_attribute(attribute) # in ActiveRecord this returns a ActiveRecord::ConnectionAdapters::Column # so we need to return...
using System; namespace ow.Framework.Exceptions { public sealed class BadActionException : Exception { } }
module Class where data List a = Nil | Cons a (List a) instance Monad List where return x = Cons x Nil (>>=) = undefined
module Mina class Runner class Pretty include Mina::Helpers::Output attr_reader :script, :coathooks def initialize(script) @script = Shellwords.shellsplit(script) @coathooks = 0 end def run status = Open4.popen4(*script) do |pid, _stdin, stdout, s...
// // Converts calls to deprecated 'feature' to 'Feature' and // 'scenario' to 'Scenario' and 'scenariosFor' to 'ScenariosFor'. // // If a directory is specified as an argument, processes any // .scala files it finds under that directory tree. // // Renames original files as <filename>.feature. // import java.io.File i...
package xyz.olympusblog.service import org.springframework.stereotype.Service import org.thymeleaf.TemplateEngine import org.thymeleaf.context.Context @Service class MailContentBuilder(private val templateEngine: TemplateEngine) { fun build(message: String): String { val context = Context() conte...
2020年08月15日09时数据 Status: 200 1.王岳伦 微博热度:5349109 2.十一假期能否离校由各地各高校决定 微博热度:1938500 3.夏天啊这可是 微博热度:1910352 4.赵丽颖以身试法坏桃不能吃 微博热度:1657020 5.盒马暂停深圳21家门店营业 微博热度:1269094 6.金靖像极了夏天的我 微博热度:1008284 7.三伏天快过去了 微博热度:896507 8.拼多多回应特斯拉拒绝交付Model3 微博热度:730916 9.拜仁8-2巴萨 微博热度:638085 10.CNN反驳特朗普所谓中国病毒说法 微博热度:636383 11.李尔新...
namespace Infestation { public class Weapon : Supplyment { private const int WeaopnAggressionEffect = 3; private const int WeaopnHealthEffect = 0; private const int WeaopnPowerEffect = 10; public Weapon() : base( WeaopnAggressionEffect, WeaopnHealthEffect, WeaopnPow...
namespace Core.Entities.Catalog { public enum RiskClass { I, II, III, IV, Undefined } }
import React, { useState } from 'react'; import ImageUploaderPopup from '../../imageUploader/imageUploaderPopup/imageUploaderPopup'; import style from './imup.module.scss'; const ImageUploader = (props: any) => { const { foto, aspectRatio, text, imageHandler } = props; const [isPopupOpen, setPopupOpen] = useState(...
#!/usr/bin/env perl # # Generate some random sql queries # package sqlfuzz; use 5.16.0; use strict; use warnings; no if $] >= 5.017011, warnings => 'experimental::smartmatch'; use Data::Dumper; sub shuffle(@) { #@$deck = map{ splice @$deck, rand(@$deck), 1 } 0..$#$deck; my $deck = shift; $deck = [$deck,...
package com.github.yws179.business.common.utils.desensitize; import org.springframework.util.StringUtils; /** * 脱敏工具集 * <a href="https://github.com/yws179/business-common-library/blob/master/docs/Desensitize%20Utils.md">查看文档</a> * @author weisen.yan * @date 2021/7/23 */ public class DesensitizedUtils { /**...
library crossdart.package; import 'dart:io'; import 'dart:async'; import 'package:crossdart/src/config.dart'; import 'package:crossdart/src/environment.dart'; import 'package:crossdart/src/package_info.dart'; import 'package:crossdart/src/util.dart'; import 'package:path/path.dart' as p; import 'package:yaml/yaml.dart...
#ifndef OGL_BUFFER_H #define OGL_BUFFER_H #include "buffer.h" namespace wcore { class OGLVertexBuffer: public VertexBuffer { public: OGLVertexBuffer(float* vertex_data, std::size_t size, bool dynamic=false); virtual ~OGLVertexBuffer(); virtual void bind() const override; virtual void unbind() const ...
--- layout: default title: assertFormValue(var,name,expected) parent: pdf tags: command pdf comments: true --- ### Description This command asserts the form value in the pdf document is as `expected`. {% include_relative _form_parsing.md %} ### Parameters - **var** - the variable that stores previously parsed PDF ...
class Result: def __init__(self, correct, total): self.correct = correct self.total = total def report_accuracy(self): print("Accuracy: %.2f%%" % (100. * self.correct / self.total)) def accuracy(self): acc = 100. * self.correct / self.total return float('%.2...
using System; using System.Xml.Schema; using System.Xml; using System.Xml.Linq; namespace TelAPI.InboundXML.Test { public class TelAPIBaseTest { public XmlSchemaSet Schemas { get; set; } public const string PhoneNumberToDial = "+123456789"; public TelAPIBaseTest() ...
class IceCreamSuggestion < ApplicationRecord belongs_to :parlor validates :ice_cream_title, presence: true end
var searchData= [ ['solution',['Solution',['../classSolution.html',1,'']]], ['statistics',['Statistics',['../classStatistics.html',1,'']]], ['strassenp',['StrassenP',['../classStrassenP.html',1,'']]] ];
starterRequirejs ================ Blank template using requirejs with jQuery &amp; handlebars setup: bower install
package enumify.sources import cats.effect.IO import cats.effect.unsafe.implicits.global import doobie.implicits._ import doobie.util.transactor.Transactor import org.scalatest.matchers.should.Matchers import org.scalatest.BeforeAndAfterAll import org.scalatest.funsuite.AnyFunSuite import enumify.Enum class PostgreSQ...
import React, { Component } from "react"; import { Icon, Layout } from "antd"; import "./BaseHeader.less"; export default class BaseHeader extends Component { render() { const { collapsed, toggle } = this.props; return ( <Layout.Header className="layout-header"> <Icon className="trigg...
# frozen_string_literal: true module DefraRubyFeatures class ApplicationController < ::ApplicationController end end
from matplotlib.colors import LinearSegmentedColormap from numpy import nan, inf # Used to reconstruct the colormap in viscm parameters = {'xp': [0.62912107182941668, 5.9459613496072166, 109.50795214009284, -21.828857638709152, -6.5743399496759416], 'yp': [-9.0711805555555429, -75.1519097222222, 50.0400...
import { createRetryablePromise } from '@algolia/client-common'; import { TestSuite } from '../../../../client-common/src/__tests__/TestSuite'; const testSuite = new TestSuite('api_keys'); test(testSuite.testName, async () => { const client = testSuite.makeSearchClient(); const apiKeyOptions = { description...
export const API_URL = { LOGIN: 'https://localhost:44362/api/Login/User', REGISTER: 'https://localhost:44362/api/Register/User', ALLREGISTERDATA: 'https://localhost:44362/api/Register/AllUser' };
class Todo{ Todo({this.title, this.isDone = false}); String title; bool isDone; }
#!/usr/bin/env bash # Simple function to send metrics to Graphite based on the awesome example from # https://github.com/etsy/statsd/blob/master/examples/statsd-client.sh # Original Author: Alexander Fortin <alexander.fortin@gmail.com> # Usage _graphite_send_raw 'my_metric 100 [timestamp]' # Optionally set GRAPHITE_H...
-- A -- SELECT ENom FROM tblEmployes WHERE ENom LIKE 'M%'; -- B -- SELECT ENom FROM tblEmployes WHERE ENom LIKE '%ER'; -- C -- SELECT ENom FROM tblEmployes WHERE ENom LIKE '_____R'; -- D -- SELECT ENom FROM tblEmployes WHERE ENom LIKE '_a%'; -- E -- SELECT ...
using System; using System.Collections.Generic; using System.Text; namespace Figuras { public enum Colores { Blanco, Rojo, Verde, Azul, Negro } public enum Formas { Cuadrado, Circulo, Triangulo, Rectangulo } ...
<?php declare(strict_types=1); namespace FOS\MessageBundle\FormType; use FOS\MessageBundle\DataTransformer\RecipientsDataTransformer; use FOS\MessageBundle\DataTransformer\SingleRecipientDataTransformer; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Op...
#! perl # Copyright (C) 2007, Parrot Foundation. # 049-options_test_prepare.t use strict; use warnings; use Carp; use Cwd; use File::Basename qw( basename fileparse ); use File::Path qw( mkpath ); use File::Temp 0.13 qw| tempdir |; use Test::More tests => 12; use lib qw( lib ); use Parrot::Configure::Options::Test::Pr...
// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'dart:html' as html; import 'dart:ui' show hashValues; import 'package:flutter/foundation.dart'; /// The possible range of values for the zoom lev...
using System; using System.Collections.Generic; using System.Text; namespace s.library { public class Read:Function { private char lineSplit; private Encoding encoding; public Read(char lineSplit,Encoding encoding) { this.lineSplit = lineSplit; this.encod...
--- name: DataFire description: <p>DataFire allows you to process and transfer data between APIs, databases, and more. DataFire has hundreds of data sources and destinations for you to choose from. DataFire is built on open standards like RSS and Swagger so you can easily add your own integrations. Use JavaScript...
--- title: 로드맵 참고자료 layout: post categories : log --- # 로드맵 참고자료 출처 : 유튜브 채널 code Scalper ![로드맵1](/assets/jig_1.jpg) 출처 : https://github.com/kamranahmedse/developer-roadmap ![로드맵2](/assets/backend.png)
//#r "System.dll" //#r "System.Data.dll" using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Dynamic; using System.Threading.Tasks; public class Startup { public async Task<object> Invoke(IDictionary<string, object> input) { var query = @" DECLA...
package com.jayrave.falkon.engine /** * Used as a stand in for `null` (to inform which [Type] this null stands in for) */ data class TypedNull(val type: Type)
""" makedata(M, N, both=DataFrame(), withinS=DataFrame(), withinI=DataFrame()) Generate a data frame of `M` subjects (`S`) crossed with `N` items. The `both` covariates are within subject and within item. The `withinS` covariates are within subject only and the `withinI` covariates are within item only. In this ...
<?php $lang['server'] = 'Serveur'; $lang['servers'] = 'Serveurs'; $lang['ipadress'] = 'Adresse IP'; $lang['port'] = 'Port'; $lang['game'] = 'Jeux'; $lang['owner'] = 'Propri&eacute;taire'; $lang['online'] = 'En ligne'; $lang['addserver'] = 'Ajouter un serveur'; $lang['editserver'] = 'Modifier s...
#!/bin/sh # # Builds README.md as html with GitHub style # tested with pandoc 2.1.1 set -eux cd "$(dirname "$0")" build() { base="$1" pandoc \ -f gfm -t html5 \ --css github-md.css -Vpagetitle=capstone-sys \ --standalone --self-contained \ ${base}.md -o ${base}.html } build ....
using System; using System.Threading.Tasks; using DeviceProviders; namespace AllJoynClientLib.Devices.AllPlay { /// <summary> /// MCU (undocumented AllPlay interface, so doc in this class is questionable) /// </summary> public class Mcu { private readonly IInterface mcu; internal ...
export function assert(condition, error) { if (!condition) return error; } export function evaluate(test, result) { return { test, name: test.name.replace(/_/g, ' '), source: test.toString().replace(/\t/g, ''), passed: result == null, failed: result != null, rea...
import { MouseEvent, KeyboardEvent, useState, useMemo, useCallback, useRef, useEffect, } from 'react'; import { Shortcut, ShortcutMap, WritingDirection, useWritingDirection, } from '@condict/ui'; import {NavigationContextValue, useNavigation} from '../../../../navigation'; import {VerticalTabPre...
$Features = @() $Features += Feature 'Lookup value Inheritance' { Scenario 24 'Assign customer lookup value to sales document' { Given 'A customer with a lookup value' Given 'A sales document (invoice) without a lookup value' When 'Set customer on sales header' Then 'lookup value on sales document ...
<?php namespace App\Http\Controllers\Application\Settings; use App\Http\Controllers\Controller; use App\Models\PaymentMethod; use Illuminate\Http\Request; use App\Http\Requests\Application\Settings\Payment\Update; class PaymentController extends Controller { /** * Display Payment Settings Page * *...
# ByteOffset A ByteOffset represents the byte offset between successive elements of a Field. It is returned when creating a raw_rect_ptr to a PhysicalRegion.
#!/bin/bash cat videolist.txt | rev | cut -d '/' -f 1 | rev > videolist.txt.TEMP mv -f videolist.txt.TEMP videolist.txt
/* */ @@reports.inc column rowner format a30 heading "Group owner" column rname format a30 heading "Group name" column owner format a30 heading "Owner" column name format a30 heading "Name" column type format a30 heading "Type" SELECT rowner, rname, owner, name, type FROM dba_refresh_children ORDER BY 1, 2, 3, 4 /
cask "jpc-qlcolorcode" do version "4.1.2+m1" sha256 "2cd375ed04ad7c164ebfbdf5ea9dbf9dc99bbb104b044fd70fe389dc2a836e91" url "https://github.com/jpc/QLColorCode/releases/download/release-#{version}/QLColorCode-#{version}.zip" name "QLColorCode" desc "QuickLook plug-in that renders source code with syntax highl...
package io.gitlab.arturbosch.detekt.core.processors import io.gitlab.arturbosch.detekt.api.DetektVisitor import io.gitlab.arturbosch.detekt.core.processors.util.LLOC import org.jetbrains.kotlin.com.intellij.openapi.util.Key import org.jetbrains.kotlin.psi.KtFile class ProjectLLOCProcessor : AbstractProcessor() { ov...
from asyncio import TimeoutError import validators from discord import Game, Embed from discord.ext import commands import src.constants as const from src.modules.misc.misc_util import * class Simple: def __init__(self, bot): self.bot = bot @commands.command() async def ping(self, ctx): ...
<?php namespace App\Observers; use App\Event; class EventsObserver { use UploadObserverTrait; protected $field = 'image'; protected $path = 'eventos/'; protected $path2 = 'eventos/thumbs/'; protected $resize = true; protected $crop = true; protected $resize_width = 600; protected $re...
import unittest from parameterized import parameterized from game import board from game import pieces from game.move import Move class TestMove(unittest.TestCase): @classmethod def setUpClass(cls) -> None: cls.test_board_str = ' ' \ ' ' \ ...
import styled from 'styled-components/native'; import * as React from 'react-native'; import S from '$root/components/StatusAvatar/Simple'; export const Container = styled.View` `; export const FlatList = styled(React.FlatList)` min-width: 100%; height: 70px; padding: 10px; padding-bottom: 0px; margin-b...
require 'test_helper' class ConfirmableTest < ActiveSupport::TestCase def setup setup_mailer end test 'should generate confirmation token after creating a record' do assert_nil new_user.confirmation_token assert_not_nil create_user.confirmation_token end test 'should never generate the same co...
// // Storage.java // TextFileXpander // // Created by wanswings on 2014/08/25. // Copyright (c) 2014 wanswings. All rights reserved. // package com.wanswings.TextFileXpander; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; public class Pr...
<?php namespace ERP\Model\Accounting\TrialBalance; use Illuminate\Database\Eloquent\Model; use DB; use Carbon; use ERP\Exceptions\ExceptionMessage; use ERP\Entities\Constants\ConstantClass; /** * @author Reema Patel<reema.p@siliconbrain.in> */ class TrialBalanceModel extends Model { protected $table = 'trial_balanc...
<?php #echo "<pre>\n";var_dump($_SERVER);echo "</pre>\n";exit; // Construct the protocol (http|https): $s = empty($_SERVER['SERVER_PORT']) ? '' : ($_SERVER['SERVER_PORT'] == '443' ? 's' : ''); $_SERVER['PROTOCOL'] = preg_replace('#/.*#', $s, strtolower($_SERVER['SERVER_PROTOCOL'])); // Construct the ...
<?php namespace Libadmin\Controller; use Zend\Mvc\Controller\AbstractActionController; /** * [Description] * */ class AdminController extends AbstractActionController { }
<?php final class ArcanistStringConfigOption extends ArcanistScalarConfigOption { public function getType() { return 'string'; } public function getStorageValueFromStringValue($value) { return (string)$value; } public function getDisplayValueFromValue($value) { return $value; } public f...
require "spec_helper" module Jet class TypeSpec < Minitest::Spec let(:coercible_type) do Type.with(strict_type) do coerce do match { |input| input.respond_to?(:to_i) } transform(&:to_i) end end end let(:strict_type) { Type.new(:integer, ::Integer) } i...
# SQL Database Repository MSX promotes the usage of the common Controller > Service > Repository layered architecture within microservices. The role of the Repository is to query and mutate the persistent storage of Models. ## Defining the Repository To define a repository, create a standard Go structure with an an...
val taskA = taskKey[File]("") val taskB = taskKey[File]("") val taskC = taskKey[File]("") val taskD = taskKey[File]("") val taskE = taskKey[File]("") val taskF = taskKey[File]("") val taskG = taskKey[File]("") val taskH = taskKey[File]("") taskA := touch(target.value / "a") taskB := touch(target.value / "b") taskC :=...
/* ******************************************************************************************************* * Static pool maintained to avoid runtime mallocs. * It comprises of following pools: * 1. Pool for Arraylist * 2. Pool for Hashmap * 3. Pool for Strings * 4. Pool for Integers * 5. Pool for Bytes *******...
# -*- coding: UTF-8 -*- from collections import Counter class HexDays: def hex_to_days(self, dia): """Retorna un listado con los dias utilizado marcados con el número 1. Arguments: dia {str} -- Número hexadecimal Returns: [list] -- listado con los dias de la semana >>> HexDays().hex...
#!/bibn/bash set -e make -C ../lua/ INCS=" -I../inc/ -I../gen_inc -I../../../UTILS/inc -I../../../UTILS/gen_inc/ " gcc -g -std=gnu99 test_f_to_s.c $INCS \ ../gen_src/_sum_F8.c \ ../gen_src/_min_I4.c \ ../gen_src/_max_I1.c \ ../../../UTILS/src/get_bit_u64.c \ ../src/sum_B1.c \ -o tst_f_to_s valgrind ./tst_...
package check // VersionCheckRequest provides basic info about the client and is used to produce VersionCheckResponse. type VersionCheckRequest struct { Product string Version string Arch string OS string DB string ClusterID string Timestamp int64 }
<?php declare(strict_types=1); namespace Shopsys\ShopBundle\Form\Front\Order; use Shopsys\FrameworkBundle\Form\SingleCheckboxChoiceType; use Shopsys\FrameworkBundle\Model\Order\OrderData; use Shopsys\FrameworkBundle\Model\Payment\Payment; use Shopsys\FrameworkBundle\Model\Payment\PaymentFacade; use Shopsys\Framework...
import bolts.FilterWordsBolt; import bolts.PhraseToWordsBolt; import bolts.ToLowerCaseBolt; import bolts.WordCountBolt; import org.apache.storm.Config; import org.apache.storm.LocalCluster; import org.apache.storm.topology.TopologyBuilder; import org.apache.storm.tuple.Fields; import spouts.SendPhrasesSpout; public cl...
#!/usr/bin/env sh # Coopyright: https://github.com/10000TB/awesome-one-liner # Author: 10000tb # Last Updated: July 16, 2019 # # This script install docker engine in any of the platform # supported by docker. # # Suppoerted platform: centos SUPPORTED_PLATFORM=( 'centos' 'ubuntu' ) function get_...
--- title: Internship at Entria date: '2021-08-29' excerpt: '' rating: 3 tags: [] --- - One day pull request - Daily - No Roles difference
## How to install * Run the following command in your command line to run the server ```console uvicorn main:app ``` ## How to install (Docker-compose) * Run the following command in your command line to run the server ```console docker-compose up ``` * Or run the server in the background ```console docker-compo...
use dyn_fmt::AsStrFormatExt; use setup::{assert_css, parse}; #[macro_use] #[path = "../setup/mod.rs"] mod setup; const SHORTHAND: &str = r#" .name {{ border-color: {}; }}"#; const LONGHAND: &str = r#" .name {{ border-top-color: {}; border-right-color: {}; border-bottom-color: {}; border-left-color: {}; }}"#; #...
import type { Prompt } from '../../components/prompt-form'; const prompts: Prompt[] = [ { label: 'Namespace', key: 'namespace', constraint: { presence: { allowEmpty: false }, length: { minimum: 5, maximum: 15 }, format: { pattern: '^[a-z][a-z0-9-]{4,14}$', flags: 'gi', ...
package env import ( "fmt" "os" "testing" ) func TestConfigure(t *testing.T) { os.Setenv("environment", "development") Configure() port := GetValue("PORT") fmt.Println(port) prod, ok := GetBoolValue("PRODUCTION") if ok { fmt.Println(prod) } url := GetValue("DB_URL") fmt.Println(url) }
<table class="table table-stripped" width="100%"> <thead> <tr> <th>No.Unit</th> <th>Nama Tenant</th> <th>No.HP</th> <th>Total Tagihan</th> <th>Maintenance</th> <th>Utilities</th> </tr> </thead> <tbody> @foreach($invoices as $inv) <tr> ...
--- category: Linux --- # 查看文件类型 ### ls命令 ls命令时linux下最常用的命令。ls命令就是list的缩写,缺省下ls用来打印出当前目录的清单,如果ls指定其他目录,那么就会显示指定目录里的文件及文件夹清单。 通过ls命令不仅可以查看linux文件夹包含的文件,而且可以查看文件权限(包括目录、文件夹、文件权限),查看目录信息等等。 #### 常用选项 ``` -a:显示所有档案及目录(ls内定将档案名或目录名称为“.”的视为影藏,不会列出); -l:以长格式显示目录下的内容列表。输出的信息从左到右依次包括文件名,文件类型、权限模式、硬连接数、所有者、组、文件大小和文件的最后修改时间等...
package dev.komu.ahwen.parse import java.io.IOException import java.io.StreamTokenizer import java.io.StringReader class Lexer(s: String) { private val tok = StreamTokenizer(StringReader(s)).apply { ordinaryChar('.'.toInt()) lowerCaseMode(true) nextToken() } // methods to check s...
/* Copyright (c) 2007, Distributed Computing Group (DCG) ETH Zurich Switzerland dcg.ethz.ch All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are me...
package units import ( "context" "os/exec" "path/filepath" ) // Debootstrap bootstraps the base debian system. type Debootstrap struct { Track string URL string } // Name implements Unit. func (d *Debootstrap) Name() string { return "Debootstrap" } // Run implements Unit. func (d *Debootstrap) Run(ctx conte...
<?php /** * @package time */ namespace bbn; /** * Deals with date manipulation. * * * @author Thomas Nabet <thomas.nabet@gmail.com> * @copyright BBN Solutions * @since Apr 4, 2011, 23:23:55 +0000 * @category Time and Date * @license http://www.opensource.org/licenses/mit-license.php MIT * @version 0.2r89 ...
public void test03() throws Throwable { weka.core.matrix.Matrix matrix0 = weka.core.matrix.Matrix.random(22, 22); double[] doubleArray0 = new double[0]; boolean[] booleanArray0 = new boolean[0]; double[] doubleArray1 = Optimization.solveTriangle(matrix0, doubleArray0, true, booleanArray0); ...
package org.genericConfig.admin.shared.configTree.bo import org.genericConfig.admin.shared.configTree.status.StatusConfigTree /** * Copyright (C) 2016 Gennadi Heimann genaheimann@gmail.com * * Created by Gennadi Heimann 27.04.2018 */ case class ConfigTreeBO ( userId: Option[String] = None, configId: Opt...
const Queue = require("./queue"); const assert = require('assert'); function sleep(ms) { return new Promise(res => setTimeout(res, ms)); } async function consumer(queue, iterations) { let values = []; for (let i = 0; i < iterations; i++) { values.push(await queue.take()); } return values; } async functio...
/* * scala-exercises-server * Copyright (C) 2015-2016 47 Degrees, LLC. <http://www.47deg.com> */ package com.fortysevendeg.exercises.support import doobie.imports._ import org.scalatest.Assertions import play.api.db.evolutions._ import play.api.db.{ Database, Databases } import scalaz.concurrent.Task trait Datab...