text stringlengths 27 775k |
|---|
#![allow(clippy::into_iter_on_ref)]
use yarte::Template;
#[derive(Template)]
#[template(path = "unless-template")]
struct UnlessTemplate {
license: bool,
}
#[test]
fn test_unless() {
let t = UnlessTemplate { license: true };
assert_eq!("<div class=\"entry\"></div>", t.call().unwrap());
let t = Unles... |
import { HttpError } from 'routing-controllers';
import { ReasonPhrases, StatusCodes } from 'http-status-codes';
import ErrorResponse from '@service/api/error-response';
class InternalServerError extends HttpError {
private errorMessage: string
constructor(error: Error) {
super(StatusCodes.INTERNAL_SERVER_ERR... |
package uk.ac.warwick.tabula.data.model.notifications.profiles.meetingrecord
import org.joda.time.DateTime
import uk.ac.warwick.tabula.data.model._
import uk.ac.warwick.tabula.{Fixtures, TestBase}
class MeetingRecordApprovedNotificationTest extends TestBase {
val agent: StaffMember = Fixtures.staff("1234567")
ag... |
import { IConnectionDB } from '../../../src/infrastructure/port/connection.db.interface'
import { DIContainer } from '../../../src/di/di'
import { Identifier } from '../../../src/di/identifiers'
import { App } from '../../../src/app'
import { Patient } from '../../../src/application/domain/model/patient'
import { Defau... |
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/4/25
* Time: 10:34
* 阿里云接口配置
*/
return [
'app_id' => 'wx83a6c8b880163e00',
'key'=>'FaYWrW8lEdFy0JmHG5QdJ9LEgSwi8U6S',
'mch_id'=>'1488339852',
]; |
//source: less/tree/url.js 3.7.1 20180718
part of tree.less;
///
class URL extends Node {
@override
String type = 'Url';
@override
covariant Node value;
///
bool isEvald;
///
URL(this.value, {int index, FileInfo currentFileInfo, this.isEvald = false})
: super.init(currentFileInfo: currentFile... |
#!/usr/bin/env bash
echo 333${command}333
case "${command}" in
gocron:cli) ## [<arg>...] %% Redis CLI
$(serviceDockerComposeExec gocron) gocron ${args} ;;
gocron:node)
echo 333${command}333
nohup ./gocron-node & ;;
*)
serviceHelp gocron
esac
|
<?php
return array(
//'配置项'=>'配置值'
'MODULE_ALLOW_LIST' => array ('Home'),
'DEFAULT_MODULE' => 'Home', // 默认模块
'DEFAULT_CONTROLLER' => 'Admin', // 默认控制器名称
'DEFAULT_ACTION' => 'login', // 默认操作名称
'DB_TYPE'=>'mysql', //数据库类型
'DB_HOST'=>'localhost', //服务器地址
'DB_NAME'=>'shanghu'... |
package org.jetbrains.bunches.hooks
import org.jetbrains.bunches.git.readCommits
data class PushInfo(val localRef: String, val localSha: String, val remoteRef: String, val remoteSha: String)
internal fun checkBeforePush(args: Array<String>) {
val repoPath = args[0]
// $1 -- Name of the remote to which the p... |
// Package cmd implements the tag CLI
package cmd
import (
"github.com/MakeNowJust/heredoc/v2"
"github.com/spf13/cobra"
)
var (
version = "dev" // Tag version, set at compile time by ldflags
commit = "" // Tag version's commit hash, set at compile time by ldflags
push bool // The --push flag, persisten... |
<?php
// sets file paths for nucleotide sequences and `nucleotide` and `telomere` table contents
function set_sequence_file_paths( array $DIRECTORIES, $nucleus, array &$file_paths ) {
$file_paths['nucleotide_file_path'] = $DIRECTORIES['NUCLEOTIDE_FILE_PATH'];
$file_paths['alias_file_path'] = $DIRECTORIES['ALIAS_F... |
package io.scalaland.ocdquery
import cats.data.NonEmptyList
import doobie._
import doobie.implicits._
package object sql {
// scalastyle:off
implicit class UniversalSqlFilter[A](val columnName: ColumnName[A]) {
def `=`(otherColumn: ColumnName[A]): Filter =
() => columnName.fragment ++ fr"=" ++ otherCo... |
using Ninject;
using Ninject.Parameters;
using Should;
using System;
using System.Collections.Generic;
using Xunit;
using Xunit.Abstractions;
using System.Linq;
namespace lib.logging.tests
{
using common.tests;
using Ninject.Planning.Bindings;
[Collection("Common")]
public class LogProv... |
require 'spec_helper'
feature "Graph legend", js: true do
before(:each) { FactoryGirl.create :server }
describe "general behavior" do
before(:each) do
visit dashboard_slug_path FactoryGirl.create(:dashboard).slug
end
it "shows the default legend string when one is removed" do
open_tab 'Le... |
DROP TABLE IF EXISTS customer;
CREATE TABLE customer
(
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR2(255) NOT NULL,
score INT NOT NULL
); |
//! collection of all traits used
use crate::response::FeroxResponse;
use anyhow::Result;
use serde::Serialize;
use std::any::Any;
use std::fmt::Debug;
// references:
// https://dev.to/magnusstrale/rust-trait-objects-in-a-vector-non-trivial-4co5
// https://stackoverflow.com/questions/25339603/how-to-test-for-equal... |
# This is the heading
And here is some text...
<!-- Comment -->
<!-- MAGNETIZER_INCLUDE _include_1.html -->
More text...
Text with a footnote reference[^1] in it
<!-- MAGNETIZER_INCLUDE _include_2.html -->
<!-- MAGNETIZER_INCLUDE _include_3.html -->
A bit more text...
<!-- MAGNETIZER_INCLUDE _include_1.html -->... |
# ETFSD CTF 2021 – A suspicious photo...
* **Category:** elektra
* **Points:** 50
## Challenge
> I was told somone hid vital information in this photo, can you help me find it?
## Hints
> Hint 1: Check for metadata
## Solve
> Run exiftool or any other metadata tool on the image, flag is a metadata attribute
```
et... |
package org.oneugene.parsers
import _root_.java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations.{Benchmark, BenchmarkMode, Mode, OutputTimeUnit}
import org.openjdk.jmh.infra.Blackhole
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@BenchmarkMode(Array(Mode.AverageTime))
class ScalaParserPerformanceTest {
@Benc... |
package com.mana.innovative.dto.client.payload;
import com.mana.innovative.dto.client.Item;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import java.util.List;
/**
* The ... |
(*
ENUNCIADO
Uma matriz inteira A n×n é considerada uma matriz de permutação se em cada linha e em cada coluna
houver n - 1 elementos nulos e um único elemento igual a 1.
Um exemplo de Matriz de permutação:
//Devia ter uma imagem aqui
Um exemplo de Matriz que não é de permutação:
//Devia ter uma imagem aqui
Faça ... |
package internal
import (
"fmt"
"io/ioutil"
"path/filepath"
"github.com/coreos/go-systemd/dbus"
"github.com/pkg/errors"
)
const cleanupUnit = `
[Unit]
Description=Clean docker datadir for torcx changes
DefaultDependencies=no
Before=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rm... |
extern const CertificateAuthority testAuthority;
extern const CertificateAuthority silverSpringAuthority;
extern const CertificateAuthority g2hAuthority;
extern const CertificateAuthority atmelAuthority;
extern const CertificateAuthority tiAuthority;
extern const CertificateAuthority exeginAuthority;
extern const Cert... |
using System;
using System.IO;
namespace Grisaia.Asmodean {
/// <summary>
/// An entry for a file in a KIF INT archive.
/// </summary>
public sealed class KifintEntry {
#region Fields
/// <summary>
/// Gets the KIFINT file used to extract this entry from.
/// </summary>
public Kifint Kifint { get; ... |
using System.Collections;
namespace Letmebe.Binding.Nodes {
internal sealed class BoundGotoStatement : BoundStatement {
public readonly BoundLabelStatement Label;
public BoundGotoStatement(BoundLabelStatement label) {
Label = label;
}
public override IEnumerable Child... |
import React, { MouseEvent } from "react";
import styles from "./InternalChip.css";
import { InternalChip } from "./InternalChip";
import { ChipMultiSelectProps } from "./ChipsTypes";
import { Icon } from "../Icon";
type InternalChipChoiceMultipleProps = Pick<
ChipMultiSelectProps,
"selected" | "onChange" | "child... |
-- ch1 ex.1.23
import Statistics.Distribution.Normal
import qualified Statistics.Distribution as S
normalD :: NormalDistribution
normalD = normalDistr mean stdD
where
mean = 75
stdD = 20
main :: IO ()
main = do
-- ratio greater than 95 sec:
putStrLn $ "the ratio of longer than 95 second: "
... |
$managedag = "managedACIApplicationGroup"
$deployedAppName = "aciApp"
Remove-AzManagedApplication -name $deployedAppName -ResourceGroupName $managedag |
import 'package:flutter/foundation.dart';
class Videos {
Videos({
@required this.results,
});
final List<Result> results;
factory Videos.fromJson(Map<String, dynamic> json) => Videos(
results: List<Result>.from(
json["results"].map(
(x) => Result.fromJson(x as Map<String, dy... |
#include "parsing.hpp"
#include <algorithm>
#include <iostream>
namespace stx::parsing {
cursor_location::cursor_location(unsigned line, unsigned column) :
line(line),
column(column)
{}
cursor_location::cursor_location(const char* start, const char* location) :
cursor_location(1u, 1u)
{
const char* line_start = ... |
<?php namespace VotingApp\Models;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\SluggableInterface;
use Cviebrock\EloquentSluggable\SluggableTrait;
use Image;
class Candidate extends Model implements SluggableInterface
{
use SluggableTrait;
/**
* The attributes which may be ma... |
require 'spec_helper'
describe CompassPoint do
describe '.azimuth' do
it 'returns mid point in degrees' do
expect(CompassPoint.azimuth('N')).to eq 0.0
expect(CompassPoint.azimuth(:nw)).to eq 315.0
expect(CompassPoint.azimuth('sbw')).to eq 191.25
expect(CompassPoint.azimuth('X')).to be_nil... |
"use strict";
/** @typedef {import("firebase")} firebase */
const Socket = require("./socket");
class FireSocket {
/**
* @param {string} uid
* @param {firebase} firebase
*/
constructor(uid, firebase) {
this.database = firebase.database();
this.callbacks = new Map([ // events not in common with so... |
import 'package:flutter/material.dart';
import 'package:rann_github/style/style.dart';
class HubCardItem extends StatelessWidget {
final Widget child;
final EdgeInsets margin;
final Color color;
final RoundedRectangleBorder shape;
final double elevation;
HubCardItem({
@required this.child,
this.ma... |
#!/bin/sh
LOCALDIR="/var/etc/persistent/mqtt"
LOCALSCRIPTDIR=$LOCALDIR/client
echo "Installing mFi tools MQTT v4 ..."
chmod 755 $LOCALDIR/mosquitto_pub
chmod 755 $LOCALDIR/mosquitto_sub
chmod 755 $LOCALSCRIPTDIR/mqrun.sh
chmod 755 $LOCALSCRIPTDIR/mqpub-static.sh
chmod 755 $LOCALSCRIPTDIR/mqpub.sh
chmod 755 $LOCALSCR... |
/// We speed up compilation by using the expanded output and then deselecting the macro feature
/// of pyo3, removing syn and proc macros from the dependencies
use pyo3::prelude::*;
fn add(x: usize, y: usize) -> usize {
some_path_dep::add(x, y)
}
unsafe extern "C" fn __pyo3_raw_add(
_slf: *mut pyo3::ffi::PyOb... |
# -*- coding: utf-8 -*
from scrapy import Spider
from scrapy.http import Request
from firmware.items import FirmwareImage
from firmware.loader import FirmwareLoader
import json
import urllib.parse
class TendaZHSpider(Spider):
name = "tenda_zh"
vendor = "tenda"
allowed_domains = ["tenda.com.cn"]
sta... |
# Lovely STL Fx Module
This is the standard visual effects module for lovely.io
It is essentially a port of the http://rightjs.org Fx module
## License & Copyright
All code in this project is published under the terms of the MIT license
Copyright (C) 2011 Nikolay Nemshilov |
import React from 'react';
import { Form, Input } from 'antd';
import ModalForm, { ModalFormProps } from '@/components/ModalForm';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 15 },
};
export interface CreateModalProps extends ModalFormProps {}
const CreateModal: React.FC<CreateModalProps>... |
/** Login Page */
function loginCredentials() {
const username = document.getElementById("username").value;
const password = document.getElementById("password").value;
if (findUser(username, password)) {
window.location = "/home.html";
}
else {
document.querySelector('display-text'... |
// Copyright 2011 The Whiley Project Developers
//
// 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... |
# ----------------------------------------------------------------------------
#
# Package : apicurio-registry
# Version : 1.3.2.Final
# Source repo : https://github.com/apicurio/apicurio-registry
# Tested on : RHEL8
# Script License: Apache License, Version 2 or later
# Maintainer : Amit Shirodka... |
package repast.simphony.visualization.gui.styleBuilder;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashSet;
import ... |
import 'package:tekartik_firebase_firestore/firestore.dart';
import 'package:tekartik_http/http.dart';
import 'src/firestore/http_to_firestore_client.dart' as _impl;
/// Create a new firestore client (only one needed).
HttpClientFactory newHttpClientFactoryToFirestore(
{required String path, required Firestor... |
# encoding: utf-8
require "rbconfig"
class SimpleTemplater
module Helpers
extend self
def shebang(executable = ruby_basename, *args)
if RUBY_PLATFORM.match(/darwin/)
self.env_shebang(executable, args)
else
self.plain_shebang(executable, args)
end
end
def plain_she... |
import java.io.*;
import java.util.*;
import java.util.concurrent.*;
public class OversizedIntFinder {
private static final String FILENAME = "test.txt";
public static void main(String[] args) {
long startTime = System.currentTimeMillis();
// Core Function here
generateFile(FILENAME, (int) 10e6, 2);
Syst... |
import {
SkyIconDocsIconItem
} from './icon-item';
export interface SkyIconDocsIconManifest {
name: string;
cssPrefix: string;
glyphs: SkyIconDocsIconItem[];
}
|
package com.akh.java_concepts_test.dateTest;
public class TopCoderTime {
public static String whatTime(int inputSecs) {
String res = null;
if(inputSecs < 0)
return res;
else if(inputSecs == 0){
res = "0:0:0";
return res;
}else if(inputSecs>86399){
return res;
}else{
int hou... |
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2011-2011. 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
%%
... |
require('./gulpfile.js')
const gulp = require('gulp')
gulp.start('fractal')
|
package filecache
import (
"errors"
jsoniter "github.com/json-iterator/go"
"io/ioutil"
"time"
)
// MetaFromFile reads cache metadata from file
func MetaFromFile(path string) (meta *Meta, err error) {
data, err := ioutil.ReadFile(path)
if err != nil {
return
}
meta = &Meta{}
if err = jsoniter.Unmarshal(dat... |
using SparseArrays, Graphs
A = sprand(Bool, 20, 20, 0.5)
for i in 1:20; A[i,i] = 0; end
dropzeros!(A)
g = IndexedBiDiGraph(A)
@testset "BiDirected graph" begin
@testset "transpose constructor" begin
At = sparse(A')
gg = IndexedBiDiGraph( transpose(At) )
@test gg.A.rowval === At.rowval
... |
//go:build linux
// +build linux
package netlink
import (
"testing"
)
func TestNetNSDisabled(t *testing.T) {
// Attempt to open a non-existent file as a netns descriptor.
netns, err := fileNetNS("/netlinktestdoesnotexist")
if err != nil {
t.Fatal("unexpected error opening dummy netns file", err)
}
if !netns.... |
package org.stepik.android.view.course_revenue.ui.delegate
import android.view.View
import androidx.core.content.ContextCompat
import androidx.core.text.bold
import androidx.core.text.buildSpannedString
import androidx.core.text.color
import kotlinx.android.synthetic.main.view_course_benefit_summary.view.*
import org.... |
package com.eaglesakura.firearm.viewmodel
import android.content.Context
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProviders
int... |
module JWS where
import System.Exit (exitFailure)
import Control.Monad.Except (runExceptT)
import Data.Aeson (decode, encode)
import qualified Data.ByteString.Lazy as L
import Crypto.JOSE.JWS
-- | Create a JWS. Args are:
--
-- 1. filename of JWK
-- 2. filename of payload
--
-- Output is a signed JWS (JSON serialis... |
(ns datalite.id
"Manage entity ids.")
(def t-bits 42)
(def part-bits 21)
(def max-t (dec (bit-shift-left 1 t-bits)))
(def max-part (dec (bit-shift-left 1 part-bits)))
(def ^:private part-mask (bit-shift-left max-part t-bits))
(def ^:private t-mask (bit-not part-mask))
(defn eid
"Construct an entity id from part... |
This is part of [Λrrow](http://arrow-kt.io): [LICENSE](https://github.com/arrow-kt/arrow/blob/master/LICENSE).
|
import {TranslateLoader} from '@ngx-translate/core';
import {from, Observable} from 'rxjs';
export class WebpackTranslateLoader implements TranslateLoader {
getTranslation(lang: string): Observable<any> {
return from(import(`../assets/i18n/${lang}.json`));
}
}
|
import pytest
from aprspy import APRS, MessagePacket
from aprspy.exceptions import ParseError, GenerateError
# Input packet
raw = r'XX1XX-1>APRS,TCPIP*,qAC,TEST::YY9YY-9 :This is a test message{001'
@pytest.fixture
def packet():
packet = APRS.parse(raw)
return packet
def test_empty():
packet = Messag... |
# frozen_string_literal: true
class AddManyNullFalse < ActiveRecord::Migration[5.2]
def up # rubocop:disable Metrics/MethodLength, Metrics/AbcSize -- comprehension not an issue
puts("************************************************************************")
puts("*********************************************... |
/*
* Copyright (C) 2016 - Niklas Baudy, Ruben Gees, Mario Đanić and contributors
*
* 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
*
... |
class AddColumnsToMapppings < ActiveRecord::Migration
def change
add_column :mappings, :sourcefilepath, :text
add_column :mappings, :targetfilepath, :text
add_column :mappings, :sourcefilename, :text
add_column :mappings, :targetfilename, :text
add_column :mappings, :databasetype, :strin... |
package buildbuddy_enterprise
import (
"fmt"
"testing"
"github.com/buildbuddy-io/buildbuddy/server/testutil/app"
)
const (
DefaultConfig = "enterprise/config/test/buildbuddy.fakeauth.yaml"
NoAuthConfig = "enterprise/config/test/buildbuddy.noauth.yaml"
)
func Run(t *testing.T, args ...string) *app.App {
retur... |
<?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Requests\SecuritiesRequest;
use App\Securities;
use Redirect;
class AdminSecuritiesCtrl extends Controller {
public function index()
{
$securities=Securities::paginate(5);
... |
using Autofac.Extras.Moq;
using FluentAssertions;
using Moq;
using Newbe.Mahua.MahuaEvents;
using Newbe.Mahua.Samples.Sqlite.MahuaEvents;
using Newbe.Mahua.Samples.Sqlite.Services;
using System;
using System.Threading.Tasks;
using Xunit;
namespace Newbe.Mahua.Samples.Sqlite.Tests
{
public class PrivateMessageFrom... |
require 'open-uri'
class AppStore
def self.find_details_by_url(link)
uri = URI.parse(link)
if uri.host == "itunes.apple.com"
id = uri.path.split("/id").last
details = self.apple_store_data(id)
elsif uri.host == "play.google.com"
params = Rack::Utils.parse_nested_query uri.query
i... |
import RCPU.assembler.preprocessor as p
def test_remove_whitespace():
lines = [
"\tMOV 1, 5 ",
" MOV 5,6\t"
]
assert p.remove_whitespace(lines) == ["MOV 1, 5", "MOV 5,6"]
def test_remove_comments():
lines = [
";this is a comment;",
"MOV 4, 6",
";another c... |
# Dataquest Practices
Practice data analysis and document notebooks on [Dataquest](https://www.dataquest.io/) courses
|
#!/bin/bash
set -ex
vt_base_version='v7.0.2'
orchestrator_version='3.2.3'
pmm_client_version='1.17.4'
docker pull vitess/base:$vt_base_version
docker build --build-arg VT_BASE_VER=$vt_base_version -t vitess/k8s:$vt_base_version-buster .
docker tag vitess/k8s:$vt_base_version-buster vitess/k8s:$vt_base_version
docker... |
package ad9910
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
type CFR1TestSuite struct {
suite.Suite
r CFR1
}
func (s *CFR1TestSuite) SetupTest() {
s.r = NewCFR1()
}
func (s *CFR1TestSuite) TestRAMEnabled() {
s.r[0] = 0
assert.False(s.T(), s.r.RAMEnabled())
... |
source_files = File.expand_path('../../*.rb', __FILE__)
Dir[ source_files ].each { |file| require file }
class Integer
def to_bits(length = 8)
bits = to_s(2).chars.map(&:to_i)
if bits.length < length
bits = Array.new(length - bits.length, 0) + bits
end
bits
end
end
|
Import-Csv C:\maquinas.csv | ForEach-Object {
if (Test-Connection -ComputerName $_.Nombre -Count 1 -Quiet){
Invoke-Command -ComputerName $_.Nombre -ScriptBlock {Stop-Process -Name winlogon -Force}
Write-Host $_.Nombre ejecutado correctamente}
else {Write-Host $_.Nombre apagado o fuera de li... |
# CSRF Plugin
The form method `add_csrf($id, $namespace)` is the easiest way to add
[cross-site request forgery](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
protection to a form.
The following PHP
$form->add_csrf('csrf', 'mmi');
generates a hidden form field used for CSRF detection.
<div><input type... |
use crate::Error;
use once_cell::sync::Lazy;
use sqlx::postgres::PgConnectOptions;
use sqlx::postgres::PgPoolOptions;
use sqlx::ConnectOptions;
use std::sync::Arc;
use std::time::Duration;
use util::ResultLogger;
pub type DatabaseConnection = sqlx::pool::PoolConnection<Database>;
pub type Database = sqlx::Postgres;
#... |
#!/bin/bash
#
# Simple system backup.
#
# VERSION :0.3.0
# DATE :2016-08-18
# AUTHOR :Viktor Szépe <viktor@szepe.net>
# URL :https://github.com/szepeviktor/debian-server-tools
# LICENSE :The MIT License (MIT)
# BASH-VERSION :4.2+
# DEPENDS :apt-get install debconf-utils sshf... |
REVISION=$(git rev-list --count HEAD)
ARGS=$(echo -o ..\_nuget -p:PackageVersion=1.0.$REVISION;TargetFrameworks=netstandard2.0)
dotnet pack Figlotech.Core $ARGS
dotnet pack Figlotech.BDados $ARGS
dotnet pack Figlotech.BDados.MySqlDataAccessor $ARGS
dotnet pack Figlotech.BDados.PostgreSQLDataAccessor $ARGS
dotne... |
helm install --name harbor --namespace registry --set externalPort='',persistence.enabled=false,externalDomain=harbor.c1.k8s.work,email.host=172.18.0.1,email.from="c1 <admin-c1@harbor.com>" .
|
/**
* <p>Describes the permissions.</p>
*/
export interface _PermissionInfo {
/**
* <p>The role of the user.</p>
*/
Role?: "VIEWER" | "CONTRIBUTOR" | "OWNER" | "COOWNER" | string;
/**
* <p>The type of permissions.</p>
*/
Type?: "DIRECT" | "INHERITED" | string;
}
export type _UnmarshalledPermissi... |
# Migration
## Chowdown
To migrate recipes from a Chowdown
1. Download the code repository as a .zip file
2. Upload the .zip file in the Chowdown section in Mealie
3. Select import on the newly available migration.
## Nextcloud Recipes
Nextcloud recipes can be imported from a zip file that contains the data ... |
import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { SafeStyle } from "@angular/platform-browser";
@Component({
selector: 'tm-radio-button',
templateUrl: 'app/widgets/radio-button.compone... |
#ifndef PACWOMAN_GAME_HPP
#define PACWOMAN_GAME_HPP
#include "GameState.hpp"
#include <SFML/Graphics.hpp>
#include <array>
class Game
{
public:
Game();
~Game();
void run();
sf::Font& getFont();
sf::Texture& getLogo();
sf::Texture& getTexture();
void changeGameState(GameState::State gameState);
pri... |
package polyglot.hello
import kotlin.test.assertEquals
import org.junit.Test
class GreeterTest {
@Test fun nameNotProvided1() {
assertEquals( "Hello!", hello() )
}
@Test fun nameNotProvided2() {
assertEquals( "Hello!", hello( null ) )
}
@Test fun nameProvided() {
assertE... |
<?php
/**
* Date: 19.11.18
* Time: 20:09
*/
namespace Tests\Unit\DataProviders;
use AlecRabbit\Accessories\Circular;
use AlecRabbit\Structures\Trade;
class CommonTrades
{
public static function generator(
Circular $type,
Circular $pair,
Circular $price,
Circular $amount,
... |
// license:BSD-3-Clause
// copyright-holders:Brad Oliver, Bernd Wiebelt, Allard van der Bas
/***************************************************************************
machine/asteroid.cpp
Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
I/O ports)
***********************************... |
#! /bin/bash
wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
tar xzf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1
sudo apt-get update
sudo apt-get install build-essential
sudo ./configure
sudo make
sudo make check
sudo make install
sudo ldconfig
protoc --version
|
#ifndef _EAGLEEYE_SEGMENT_H_
#define _EAGLEEYE_SEGMENT_H_
#include "eagleeye/common/EagleeyeMacro.h"
#include "eagleeye/basic/Matrix.h"
#include "eagleeye/basic/Array.h"
#include <algorithm>
#include <map>
namespace eagleeye{
/**
* @brief Returns a color image representing the segmentation.
*
* @param _src3f image... |
<?php
class ControllerExtensionModuleSoconfig extends Controller {
protected function index($setting) {
$this->data['status'] = $this->config->get('cpanel');
if($this->data['status']==1){
$data_template = $this->cache->get('soconfig.' . (int)$this->config->get('config_language_id'));
$this->data['dat... |
#!/bin/bash
# This file was generated on 2022-01-10T22:24:10+00:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
set -e
source script/functions.sh
run_cukes
|
package basic
type UserRegisteredEvent struct {
Username string
Email string
}
type UserLoggedOutEvent struct {
UserID string
}
|
package com.android.systemui.util.extensions
import android.os.UserHandle
fun UserHandle_of(userId: Int): UserHandle {
return UserHandle::class.java.getMethod("of", Integer.TYPE).invoke(null, userId) as UserHandle
}
val UserHandle.identifier: Int
get() {
return this::class.java.getMethod("getIdentifi... |
(ns lacinia-tut.run
(:require [lacinia-tut.core :refer [artist-schema]]
[io.pedestal.http :as server]
[com.walmartlabs.lacinia :refer [execute]]
[com.walmartlabs.lacinia.pedestal :as lacinia])
(:gen-class))
(def service (lacinia/pedestal-service artist-schema {:graphiql true}))
... |
import { mount } from '@vue/test-utils';
import { asyncExpect } from '@/tests/utils';
import Slider from '..';
import mountTest from '../../../tests/shared/mountTest';
describe('Slider', () => {
mountTest(Slider);
it('should show tooltip when hovering slider handler', async () => {
const wrapper = mount(Slider... |
{- |
Module : Frontend.Desugaring.Grouping.TypeSynonym
Description : Grouping of type synonyms
Copyright : (c) Danil Kolikov, 2019
License : MIT
Grouping of type synonyms
-}
module Frontend.Desugaring.Grouping.TypeSynonym
( groupTypeSynonyms
, groupTypeSynonym
) where
import Frontend.Desuga... |
# frozen_string_literal: true
describe 'Device Type index page', type: :feature do
it 'view the device type list' do
visit device_types_path
expect(page).to have_content 'Device Types'
end
end
|
# frozen_string_literal: true
require "rails_helper"
RSpec.describe "User Activations", type: :request do
let(:active_user) { create(:user) }
let(:inactive_user) { create(:user, :inactive) }
describe "GET /users/activate/:id" do
context "when a system user is signed in" do
let(:user) { create(:user, ... |
#!/usr/bin/perl -w
# -*- Mode: Perl; indent-tabs-mode: nil; -*-
#
# Copyright 2005-2006 Open Source Applications Foundation
#
# 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://w... |
use error::{Result, ErrorKind, Error};
use ffi::bindings::*;
use std::ffi::CStr;
/// LED states for an S-class unit.
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum LedState {
/// Indicates good health.
Green,
/// Indicates a problem alon... |
## 1.1.2
- Fixed Github issue #1: force move bookmarks sequentially.
## 1.1.1
- Version skipped
## 1.1.0
- Github issue #1: keep bookmark orders when switching. Improved throttling of switching function.
- Sync current addon state across multiple browsers (from different devices)
- Auto focus the text input when ... |
-module(erlang_ls_doc).
-export([ get_doc/2 ]).
-spec get_doc(module(), binary()) -> binary().
get_doc(Module, Label) ->
Which = code:which(Module),
[BF, BA] = re:split(Label, "/"),
{ok, {_, [{abstract_code, {_, AC}}]}} = beam_lib:chunks(Which, [abstract_code]),
case [erl_pp:form(Spec) ||
{attribute... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.