text stringlengths 27 775k |
|---|
<?php
namespace StableCube\FileMuncherBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
class FilemuncherExtension extends ... |
use {Traversal, Internal};
impl<'a, T> Traversal for &'a [T] {
type Item = &'a T;
#[inline]
fn foreach<F>(self, f: F) where F: FnMut(&'a T) -> bool {
Internal::new(self).foreach(f)
}
}
impl<'a, T> Traversal for &'a mut [T] {
type Item = &'a mut T;
#[inline]
fn foreach<F>(self, f:... |
namespace NftSideapp.Api.Features.WebThree.Contracts.NftCreator.GetNftCount
{
using NftSideApp.Api.Features.Base;
public class GetNftCountSharedResponse : BaseResponse
{
public uint NftCount { get; set; }
}
} |
CREATE TABLE spdx_review_ref (
review_pk integer, -- Primary Key
reviewer text NOT NULL,
review_date timestamp NOT NULL,
review_comment text,
spdx_fk integer NOT NULL,
CONSTRAINT spdx_review_ref_pk PRIMARY KEY (review_pk)
); |
"""Contains settings for the admin page."""
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.conf import settings
from .models import (
Game,
MatchupStatsNode,
Player,
PlayerRatingNode,
PlayerStatsNode,
RatingPeriod,
User,
)
class ReadOnlyModelA... |
export * from './lib/color.interface';
export { formatColor } from './lib/formatting/format-color.function';
export { formatHexColor } from './lib/formatting/format-hex-color.function';
export { formatRgbColor } from './lib/formatting/format-rgb-color.function';
export { formatRgbaColor } from './lib/formatting/format-... |
#ifndef _A4_EXCEPTIONS_
#define _A4_EXCEPTIONS_
#include <exception>
#include <a4/string.h>
namespace a4 {
/// Exception base class that collects a backtrace
class BackTraceException : public std::exception {
public:
BackTraceException();
virtual ~BackTraceException() throw()... |
package controlflow
val ID1: Boolean = true
val ID2: Boolean = false
// if else control flow
fun checkID(validID: Boolean): Unit {
if (validID == true) {
println("The user has a valid ID")
} else {
println("The user does not have a valid ID")
}
}
// if each block of the if-else is simpl... |
package com.svitovyda.configuration
class ConfigurationsComponents() {
lazy val controller = new ConfigurationsController
}
|
import { Injectable } from '@nestjs/common';
import { CreateTasksDto } from './dto/tasks-create.dto';
import { InjectRepository } from '@nestjs/typeorm';
import { Tasks } from './tasks.entity';
import { Repository } from 'typeorm';
import { UpdateTasksDto } from './dto/tasks-update.dto';
@Injectable()
export class Tas... |
require('dotenv').config();
const express = require('express');
const router = express.Router();
const User = require('../../models/user');
const BITAPIHandler = require('../../api/BITAPIHandler');
const SpotifyWebApi = require('spotify-web-api-node');
const bandsInTown = new BITAPIHandler(`${process.env.BASE_URL}`, ... |
package replacer
import (
"debug/gosym"
"encoding/binary"
"math"
)
const (
immediate32bit = math.MaxUint32
immediate26bit = immediate32bit >> 6
immediate24bit = immediate26bit >> 2
immediate20bit = immediate24bit >> 4
)
type x86 struct{}
func (x86) GenerateTrampoline(source, target *gosym.Func) ([]byte, erro... |
SUBROUTINE IB01QD( JOBX0, JOB, N, M, L, NSMP, A, LDA, C, LDC, U,
$ LDU, Y, LDY, X0, B, LDB, D, LDD, TOL, IWORK,
$ DWORK, LDWORK, IWARN, INFO )
C
C SLICOT RELEASE 5.7.
C
C Copyright (c) 2002-2020 NICONET e.V.
C
C PURPOSE
C
C To estimate the initial stat... |
; ModuleID = '/home/grosu/celliso2/c-semantics/tests/gcc-torture/va-arg-24.ll'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"
%struct.__va_list_tag = type { i32... |
package org.echocat.kata.java.part1;
import org.echocat.kata.java.part1.model.Book;
import org.echocat.kata.java.part1.model.Publication;
import org.echocat.kata.java.part1.repository.PublicationRepository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;... |
#include "core/2d/texture.hpp"
#include "nana/paint/graphics.hpp"
#include "boost/gil/extension/io_new/png_all.hpp"
#include "core/image/pixel_inserters.hpp"
windy::entity::texture::texture() {
}
bool windy::entity::texture::load(const std::string& path) {
this->_image = std::make_shared <mmap_image>();
bool ... |
namespace AppCampus.PortalApi.Models.ResponseModels
{
/// <summary>
/// The error response model.
/// </summary>
public class ErrorModel
{
/// <summary>
/// The message explaining the error.
/// </summary>
public string Message { get; set; }
internal static ... |
class Knj::Gtk2::Menu
def initialize(paras)
@paras = paras
@items = []
@mainmenu = Gtk::Menu.new
@signal = ""
count = 0
if @paras["items"].respond_to?("reverse")
items = @paras["items"].reverse
else
items = @paras["items"]
end
if items.is_a?(Arra... |
/*
* Copyright 2016 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe IncidentManagement::PagerDuty::ProcessIncidentWorker do
let_it_be(:project) { create(:project) }
let_it_be(:incident_management_setting) { create(:project_incident_management_setting, project: project, pagerduty_active: true) }
describe '#perfo... |
package global.template;
import java.lang.management.*;
class Monitor {
private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
private final boolean logEnabled;
private long lastMark = System.nanoTime();
int turn = 0;
Monitor(boolean logEnabled) {
this.logEnabled = logEnable... |
#!/usr/bin/env bash
mkdir temp
cd ./temp
git clone https://github.com/wieslawsoltes/resvg-test-suite.git
mkdir resvgtestsuite
dotnet run -p ../src/svgc/svgc.csproj -c Release -- -j ../resvg-test-suite.json
dotnet new console -n resvgtestsuite -o resvgtestsuite
dotnet add ./resvgtestsuite/resvgtestsuite.csproj package -... |
-module (erlcloud_cloudformation).
-include("erlcloud.hrl").
-include("erlcloud_aws.hrl").
-include("erlcloud_cloudformation.hrl").
-define(API_VERSION, "2010-05-15").
-type access_key_id() :: string().
-type secret_access_key() :: string().
-type params() :: proplists:proplist().
-type cloudformation_list() :: [pr... |
package pl.elpassion.cloudtimer.domain
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
class TimerTests {
@Test
fun isNotFinishedWhenEndTimeIsAfterCurrentTime() {
val oneSec: Long = 1000
val timer = Timer("test", oneSec)
assertFalse(timer.f... |
subroutine sldsup_turnonModel_NH(a)
use typre
use Mod_SUPSolids_NH
implicit none
class(SUPSolidsProblem_NH) :: a
a%sld_type = 'NONLI'
a%sld_model ='NEOHO'
end subroutine sldsup_turnonModel_NH
|
use mpi_util::*;
fn main() {
let universe = mpi::initialize().unwrap();
let _ = universe.world();
let mut v = vec![0; 4];
let _ = mpi_dims_create(16, 4, &mut v);
println!("{:?}", v); // [2, 2, 2, 2]
}
|
<?php
/*
Modelo de categorías, creado con:
php artisan make:model Categorias -a
(-a para generar migration, controller y resource)
*/
namespace App;
use Illuminate\Database\Eloquent\Model;
class Categorias extends Model
{
protected $guarded= [];
protected $hidden = [];
public function articul... |
# Image Roll

**Image Roll** is a simple and fast GTK image viewer with basic image manipulation tools.
## Features
- Written in Rust
- uses modern GTK 3
- adaptive - can be used on desktop and mobi... |
package server
import (
"context"
"fmt"
"os"
"path/filepath"
"time"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"k8s.io/client-go/rest"
"k8s.io/client... |
enum DocumentConnectionType
{
Default = 0
Word = 1
Excel = 2
PowerPoint = 3
Image = 4
Visio = 5
OneNote = 6
PDF = 7
Certificate = 8
Text = 9
PhoneBook = 10
PrivateKey = 11
Email = 12
Spreadsheet = 13
RichText = 14
Video = 15
Html = 16
HtmlEditor = ... |
Rails.application.routes.draw do
root to: 'home#index'
resources :agents, only: [:show, :edit, :update] do
# Custom Edit Routes. Exclude the default edit routes after...
get '/guides/edit', to: 'agents#guides', as: 'edit_guides'
get '/brokers/edit', to: 'brokers#edit', as: 'edit_brokers'
get '/l... |
<?php
declare(strict_types=1);
namespace VGirol\JsonApiStructure\Constraint;
use VGirol\JsonApiStructure\Messages;
/**
* Constraint that checks if a name is a valid member name.
*/
class MemberName extends Constraint
{
/**
* Undocumented variable
*
* @var bool
*/
private $strict;
... |
#!/usr/bin/env bash
docker run -it --name alpine-bash \
alpine:latest /usr/ash
|
package org.grapheneos.apps.client.ui.container
import android.app.NotificationManager
import android.content.Context
import android.os.Bundle
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.... |
#![no_std]
#[cfg(feature = "std")]
extern crate std;
extern crate alloc;
pub mod and_then;
pub mod done;
pub mod flatten;
pub mod flatten_result;
pub mod map;
pub mod map_result;
mod sequencable_arena;
mod sequence;
mod sequence_ext;
mod sequence_fn;
mod sequence_result_ext;
pub mod then;
pub use self::done::{done,... |
package by.leonovich.hibernatecrm.mappings.joinedtable;
import by.leonovich.hibernatecrm.common.model.DrivingCategory;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.Random;
/**
* Created : 06/12/2020 18:22
* Project : hibernate-crm
* IDE : IntelliJ IDEA
*
* @autho... |
if member.is_a?(MnoEnterprise::User)
json.id member.id
json.entity 'User'
json.name member.name
json.surname member.surname
json.email member.email
json.role member.role
elsif member.is_a?(MnoEnterprise::OrgInvite)
json.id member.id
json.entity 'OrgInvite'
json.email member.user_email
json.role memb... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Schedule;
use Yajra\Datatables\Datatables;
use Notification;
class ScheduleController extends Controller
{
public function Index()
{
$schedules = Schedule::orderBy('event_date','desc')->where('active',1)->get();
return view('schedule')-... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019-05-29 16:51
# @Author : xiaolinzi
from playLA.Vector import Vector
if __name__ == '__main__':
vec = Vector([5, 2])
print(vec)
print(len(vec))
print('\nvec[0] = {}, vec[1] = {}'.format(vec[0], vec[1]))
vec2 = Vector([3, 4])
print(... |
package com.nitramite.gamescoreapi.service
import com.nitramite.gamescoreapi.dao.AchievementEntity
import com.nitramite.gamescoreapi.dao.AchievementTypeEntity
import com.nitramite.gamescoreapi.model.Achievement
import com.nitramite.gamescoreapi.model.AchievementType
import com.nitramite.gamescoreapi.model.User
import ... |
# 序列化配置(FastJson)
### FastJson依赖
```xml
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.68</version>
</dependency>
```
### 配置消息转换器
<<< @/docs/java/java/DefaultFastJsonConfig.java
::: warning
支持Java8最新时间处理
:::
|
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace Auth0.AuthenticationApi
{
/// <summary>
/// Interface used to customize implementation or mock behavior of <see cref="AuthenticationApiClient"/>.
/// </summary>
public... |
# frozen_string_literal: true
require 'pry'
require 'k_builder'
require 'json'
require 'getoptlong'
module KBuilder
module Watch
# List of and options paths that are relevant to the KBuilder::Watch::Cli
class CliOptions
# This is the path that the watcher was started from.
# It is the default ba... |
module Hydramata
module Mecha
# Responsible for being the bearer of information from a service call to
# the response handler.
class Messenger
def initialize(collaborators = {})
self.message_container = collaborators.fetch(:message_container) { default_message_container }
yield(self)... |
import 'package:EMatdaan/bidings/bindings.dart';
import 'package:EMatdaan/models/models.dart';
import 'package:EMatdaan/screens/add_vote_option_screen.dart';
import 'package:EMatdaan/screens/screens.dart';
import 'package:EMatdaan/services/database.dart';
import 'package:EMatdaan/widgets/candidate_box.dart';
import 'pa... |
import * as electron from "electron";
import appshell = require("./appshell/index");
let t: any;
// define global object extensions
interface BracketsWindowGlobal {
// TODO: better define appshell (brackets) global object
appshell: any;
brackets: any;
electron: typeof electron;
node: {
pro... |
featureFlag("Expand signals box", () => {
document.addEventListener("DOMContentLoaded", expandSignalsBox);
document.addEventListener("pjax:end", expandSignalsBox);
backoffInterval({
callback: expandSignalsBox,
minWait: 10,
maxWait: 200,
factor: 1.05,
});
});
function expandSignalsBox() {
let... |
class Timesheet < ActiveRecord::Base
belongs_to :user
has_many :entries, :dependent => :destroy
accepts_nested_attributes_for :entries, :allow_destroy => true
validates :date, :start_time, :end_time, :lunch_break, :presence => true
validates_associated :entries
validate :validate_times, :validate_entries
... |
# Security Related Application Discovery Tool Resources
## OWASP Amass Project
- https://www.owasp.org/index.php/OWASP_Amass_Project
|
const loginTypes = require('../../constants/login-types')
function getActivityText (loginType) {
switch (loginType) {
case loginTypes.apply:
return 'The email includes a link to apply for a review. This link will expire in 15 minutes.'
case loginTypes.claim:
return 'The email includes a link to c... |
---
title: Daily UI 003 - Landing Page
description: ""
category: "Design"
tags:
- "Design"
- "Daily UI"
date: "2019-08-12T14:00:00.000Z"
path: "/blog/daily-ui-003-landing-page"
image: "/images/posts/daily-ui-003-landing-page/1.jpg"
draft: false
source: "internal"
---
 -> Result<()>;
async fn load_contest_prob... |
package com.spinyowl.spinygui.demo.simple;
import static com.spinyowl.spinygui.core.node.NodeBuilder.TYPE_PASSWORD;
import static com.spinyowl.spinygui.core.node.NodeBuilder.button;
import static com.spinyowl.spinygui.core.node.NodeBuilder.div;
import static com.spinyowl.spinygui.core.node.NodeBuilder.frame;
import st... |
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace CVF.Contract.Responses
{
/// <summary>
/// Provide a class for pagination response.
/// </summary>
/// <typeparam name="TRaw">The type of object to paginate</typeparam>
[DataContract]
public class PluginPaginationR... |
/**
* Read a trusted JSON-based local file (UTF-8).
*
* @param {string} path - Fie location
* @returns {json-object} - A parsed JSON object
*/
'use strict';
const fs = require('fs');
module.exports = (path) => {
let data = fs.readFileSync(path, 'utf8');
return JSON.parse(data);
};
|
using System.Net.Http.Formatting;
using System.Web.Http;
using System.Web.Http.ExceptionHandling;
using BlaBlaService.Api.App_Start;
using Swashbuckle.Application;
namespace BlaBlaService.Api
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
... |
import path from 'path';
import execa from 'execa';
export const transformerDirectory = path.join(__dirname, '../', 'transformers');
export const jscodeshiftExecutable = require.resolve('.bin/jscodeshift');
function executeTransformation(files, flags, transformer, transformerArgs) {
const transformerPath = path.j... |
# django-docker-compose-pipelines-example
An example of how to use bitbucket pipelines for a django docker-compose project.
## what's inside.
* python3
* Django 1.11
## main commands
### development
* `make install` or `docker-compose build`
* `make migrate` or `docker-compose run django python ./manage.py migrate`
... |
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
namespace Masa.Contrib.Configuration;
public class MasaConfigurationBuilder : IMasaConfigurationBuilder
{
private readonly IConfigurationBuilder _builder;
public IS... |
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'public_transport_options.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PublicTransportOptions _$PublicTransportOptionsFr... |
# Ansible Role tests
To run the test playbook(s) in this directory:
1. Install and start Docker.
1. cd .. (cd to the root directory of this role)
1. Download the test shim (see .travis.yml file for the URL) into `tests/test.sh`:
```sh
wget -O tests/test.sh https://gist.githubusercontent.com/geerlingguy/73... |
/*
==============================================================================
Animator.h
Created: 24 Apr 2011 12:52:57pm
Author: Haydxn
==============================================================================
*/
#ifndef __ANIMATOR_H_332DB77B__
#define __ANIMATOR_H_332DB77B__
#include "Ani... |
package com.simple.newsfeed.backend;
import java.util.List;
import static spark.Spark.*;
import com.google.gson.Gson;
/**
* Simple Newsfeed Backend Implementation
*
*/
public class App {
private NewsEntitiesService newsEntitiesService;
private NewsEntityDAO newsEntityDAO;
public App() {
this.... |
#! /bin/sh
echo "static const uint32_t to_ucs4[256] = {"
sed -ne '/^[^[:space:]]*[[:space:]]*.x00/d;/^END/q' \
-e 's/^<U\(....\)>[[:space:]]*.x\(..\).*/ [0x\2] = 0x\1,/p' \
"$@" | sort -u
echo "};"
echo "static const struct gap from_idx[] = {"
sed -ne 's/^<U\(....\).*/\1/p;/^END/q' \
"$@" | sort -u | $AWK ... |
import {
SET_ADD_TODO_INPUT,
CLEAR_ADD_TODO_INPUTS
} from '../constants'
// used to set an input field value on state
export const setTodoFormInputValue = (val, field) => ({
type: SET_ADD_TODO_INPUT,
payload: { val, field }
})
// used to set an input field value on state
export const clearFormInputs = () => (... |
//
// TutorialNode.h
// SpaceExplorer
//
// Created by João Baptista on 14/03/15.
//
//
#ifndef __SpaceExplorer__TutorialNode__
#define __SpaceExplorer__TutorialNode__
#include "cocos2d.h"
#include "ui/CocosGUI.h"
class TutorialNode : public cocos2d::ui::Text
{
std::deque<std::string> messageQueue;
std::s... |
"""A helper class for managing batch normalization state.
This class is designed to simplify adding batch normalization
(http://arxiv.org/pdf/1502.03167v3.pdf) to your model by
managing the state variables associated with it.
Important ... |
class Books {
constructor(users) {
this.users = users
this.BOOKS_URL = "http://localhost:3000/api/v1/books"
this.USERS_URL = "http://localhost:3000/api/v1/users"
this.books = []
this.adapter = new BooksAdapter()
this.initBindingsAndEvenListeners()
this.createNewBookButton()
this.fe... |
import scipy.sparse
import numpy
def rhs(x_1, x_2):
"""
Returns the result of f for the points x_1 and x_2
"""
return -2*(x_2*(x_2-1)+x_1*(x_1-1))
def lgs(rhs, n):
"""
Returns a tuple of a matrix A and a vector b which provides an approximation of the problem.
:param rhs: The rhs functio... |
require 'spec_helper'
describe Opener::Daemons::Worker do
INPUT = 'Hello'
OUTPUT = 'World'
let :component do
Class.new do
def initialize *; end
def run input, options = {}
OUTPUT
end
end
end
describe 'with inline IO' do
before :all do
described_class::INLINE_I... |
SELECT round(A.LAT_N,4) as median_LAT_N
FROM (
SELECT S.LAT_N, @rownum:=@rownum+1 as row_number, @total_rows:=@rownum
FROM STATION S, (SELECT @rownum:=0) r
ORDER BY S.LAT_N
) as A
WHERE A.row_number IN ( FLOOR((@total_rows+1)/2), FLOOR((@total_rows+2)/2) ); |
// see ticket #3896. Tests interaction between overloading, specialization and default params
trait Atomic[@specialized(Boolean) T] {
def x: T
// crash depends on the overloading: if second method is "g", no crash.
def f(fn: T => T): Boolean = f(fn(x))
def f[R](a: T, b: R = true) = b
}
class AtomicBoolean(val ... |
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_masked_text/flutter_masked_text.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:restaurant_ui_kit/business/PessoaBusiness.dart';
import 'package:restaurant_ui_kit/business/auth.dart';
import '... |
class RMXView < UIView
include RMXCommonMethods
include RMXSetAttributes
def prepare
end
def setup
end
def init
s = super
if RMX::IOS8_COMPAT
self.layoutMargins = UIEdgeInsetsZero
end
prepare
setUserInteractionEnabled(false)
setup
s
end
def setUserInteractionEnab... |
package uk.gov.hmrc.test.api.models.ttpp
import play.api.libs.json.Json
case class CreatePlanResponse(customerReference: String, planId: String, caseId: String, planStatus: String)
object CreatePlanResponse {
implicit val format = Json.format[CreatePlanResponse]
}
|
<?php
/**
* Zend Framework 2 Events Module
*
* Long description for file (if any)...
*
* @link http://github.com/pchela/events
* @copyright Copyright (c) 20015 Kowalski Piotr (http://www.kowalski-piotr.pl)
* @license https://opensource.org/licenses/MIT
* @since File available since Release 0.0.1
*... |
class ForgotPasswordPolicy < ApplicationPolicy
def new?
true
end
alias :create? :new?
alias :edit? :new?
alias :update? :new?
end
|
<?php
namespace app\admin\controller;
header("Content-Type:text/html; charset=utf-8");//防止输出乱码
use think\Controller;
//公共函数
class Common extends Controller
{
//验证是否登录session
public function lin_in()
{
// 验证session
if(session('name') == null)
{
echo "<script>alert('您好!请先登录!');location.href='".url('admin/logi... |
export function warn(msg: string, ...args: any[]): void {
console.warn(`[Vue warn] ${msg}`, ...args)
}
|
import { memo } from 'react'
import { ReactComponent as PlusIcon } from '../../assets/storyPlusIcon.svg'
import type { User } from '../../utils/user'
import {
Container,
Content,
PreviewImage,
TextContainer,
Text,
UserImage,
PlusIconContainer,
PlusIconContent,
} from './styles'
export type FeedStory... |
from django.test.simple import DjangoTestSuiteRunner
from django.test.testcases import TestCase
class MongoengineDjangoTestSuiteRunner(DjangoTestSuiteRunner):
def setup_databases(self, **kwargs):
return None
def teardown_databases(self, old_config, **kwargs):
pass
class MongoengineTestCase... |
/*
* Copyright 2019 Confluent Inc.
*
* Licensed under the Confluent Community License (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.confluent.io/confluent-community-license
*
* Unless required by applicable law or agr... |
require 'rails_helper'
describe PlayerSeasonInfosHelper, type: :helper do
describe "#player_value" do
specify { expect(helper.player_value 123).to eq "12.3" }
specify { expect(helper.player_value 5).to eq "0.5" }
end
end
|
package net
import (
"os"
"testing"
"github.com/stretchr/testify/require"
)
func TestResolveHostIP(t *testing.T) {
_, err := ResolveHostIP("interface-not-found")
require.Equal(t, ErrNetworkInterfaceNotFound, err)
if os.Getenv("SKIP_TestResolveHostIP_IPLOOKUP") != "" {
t.Skip("skip ip address lookup")
}
_,... |
using System;
using System.Collections.Generic;
namespace TatmanGames.Missions.Interfaces
{
public interface IMission : IComparable
{
/// <summary>
/// ID for this mission, should be unique so you can write code to react to events
/// specific for the mission but system doesn't enforce... |
package com.gyf.cactus.pix
import android.app.Activity
import android.os.Bundle
import android.util.Log
import android.view.Gravity
import com.gyf.cactus.Cactus
import com.gyf.cactus.ext.finishOnePix
import com.gyf.cactus.ext.isScreenOn
import com.gyf.cactus.ext.setOnePix
/**
* 一像素界面
* @author geyifeng
* @date 201... |
# jotter
Note taking and syncing utility.
## Design
- `jotter init [REMOTE-URL]`
- Create a jotter project (jotterproject.yml).
- Git init.
- If remote url is given then instead just git clone.
- If clone didn't have jotterproject.yml then create one to 'adopt'.
- `jotter set-remote REMOTE-URL`
- Set the ... |
// SPDX-License-Identifier: ISC
// Copyright (c) 2014-2020 Bitmark Inc.
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
// Code generated by MockGen. DO NOT EDIT.
// Source: ../announce/announce.go
// Package mocks is a generated GoMock package.
package mocks
import... |
import Data.List
import Data.Char
-- my solution
accum :: [Char] -> [Char]
accum = intercalate "-" . reverse . foldl (\acc c -> (toUpper c : replicate (length acc) (toLower c)) : acc) []
-- the solutions learning from others
{-
法一:
accum = intercalate "-" . zipWith (\i c -> toUpper c : replicate (i-1) (toLower c)) ... |
module IOHelpers where
import ImageAbstractions (ColourRGB)
import Codec.Picture (DynamicImage (..))
import Data.List (foldl')
import Numeric (showHex)
getColourSpaceName :: DynamicImage -> String
getColourSpaceName img = case img of
ImageY8 _ -> "ImageY8"
ImageYA8 _ -> "ImageYA8"
ImageRGB8 ... |
IF NOT EXISTS (select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='sa' and TABLE_NAME='sa_oiva_maara') BEGIN
CREATE TABLE sa.sa_oiva_maara(
id bigint IDENTITY(1,1) NOT NULL,
alkupvm nvarchar(255) NULL,
urheilija bit NULL,
valma_erityinen bit NULL,
sisaoppilaitosopiskelijamaara_2 int NULL,
sisaoppil... |
#!/usr/bin/env bash
## IMPORTANT: start cycle will always be 1 because of the intention of this
## script and the way it is written now. In fact, var. $START is not used at
## the moment.
## Call: $ ./run_test.sh <{sm1|sm2|sm3|maponia3}> <start cycle> <stop cycle>
## Example: ./run_test.sh sm2 1 500
TEST=test_h5.O2
... |
#ifndef __ORDERNET_H__
#define __ORDERNET_H__
#include <nlohmann/json.hpp>
#include <vector>
#include <zmq.hpp>
#include "db/drObj/drNet.h"
#include "db/obj/frNet.h"
#define USE_ORDERNET 1
using json = nlohmann::json;
namespace fr {
class FlexDRWorker;
}
class OrderNet
{
public:
OrderNet();
~OrderNet();
v... |
# Parchis GoT
Parchis Game inspired by Game of Thrones

## Houses
House|Slogan|Banner|Token
-----|------|------|-----
Night King|Winter is Here (Guessing)||
Stark|Winter is Coming|, IsRequired = true, Order = 0)]
MetadataReference _metadataReference;
... |
package azahara;
import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.*;
@DisplayName("test de azahara")
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class ejercicio_azaharaTest {
}
|
(defn same-digits-in-multiples? [n maxMultiple]
(let [baseSortedDigitStr (sort (str n))
multiples (map #(* n %) (range 2 (inc maxMultiple)))
multipleSortedDigitStrs (map #(sort (str %)) multiples)]
(every? #(= baseSortedDigitStr %) multipleSortedDigitStrs)))
(time
(take 1
(filter #(same-d... |
export interface SetStorage {
set(key: string, value: object): void;
}
|
import React from 'react';
import './App.css';
import Dashboard from './components/Dashboard';
import logo from './plane.png';
function App() {
return (
<div className="app">
<header className="app-header">
<div>
<img className="float-left" src={logo} alt="logo" />
<div classNam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.