text stringlengths 27 775k |
|---|
<?php
namespace Vuba\OIDC\Controllers\Account;
use Symfony\Component\Validator\Constraint;
class Constrain extends Constraint{
public function validatedBy()
{
return ContainsEmaTel::class;
}
} |
<?php
declare(strict_types=1);
namespace TestApp\Model\Table;
use Cake\ORM\Table;
/**
* Used to test correct class is instantiated when using $this->getTableLocator()->get();
*/
class UsersTable extends Table
{
}
|
package com.chuckerteam.chucker.internal.data.har
import com.chuckerteam.chucker.internal.data.entity.HttpTransaction
import com.chuckerteam.chucker.internal.data.har.log.Creator
import com.google.gson.annotations.SerializedName
internal data class Har(
@SerializedName("log") val log: Log
) {
constructor(tran... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# <codecell>
with open ('./foo.txt', 'r') as f:
print(f.readlines())
# out:['aaaaa\n', 'bbbbb\n', 'ccccc\n']
# <codecell>
with open ('./foo.txt', 'r') as f:
print(list(map(lambda line: line.strip('\n'), f.readlines())))
# out: ['aaaaa', 'bbbbb', 'ccccc']
|
namespace XLabs.Platform.Services
{
using System;
using System.Runtime.CompilerServices;
using Foundation;
using Security;
/// <summary>
/// Implements <see cref="ISecureStorage"/> for iOS using <see cref="SecKeyChain"/>.
/// </summary>
public class SecureStorage : ISecureStorage
{
... |
<?php
declare(strict_types=1);
/**
* Copyright (c) 2020 Andreas Möller
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/ergebnis/factory-bot
*/
namespace Ergebnis\FactoryBot\Test\Unit\Exception;
use E... |
package com.sap.oss.phosphor.fosstars.tool.github;
import com.sap.oss.phosphor.fosstars.data.UserCallback;
import com.sap.oss.phosphor.fosstars.data.ValueCache;
import com.sap.oss.phosphor.fosstars.model.ValueSet;
import com.sap.oss.phosphor.fosstars.model.subject.oss.GitHubProject;
import java.io.IOException;
/**
*... |
using System;
using System.Collections;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace SocialStream.Converters
{
/// <summary>
/// Convert non-empty strings, true bools, and numbers above zero to visible. Everything else to collapsed. Pass any parameter to reverse the b... |
package com.outr.arango
case class FieldAndValue[T](field: Field[T], value: fabric.Value) |
<?php
namespace App\Controller;
use App\Entity\Size;
use App\Entity\User;
use App\Entity\Product;
use App\Form\RegisterType;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class HomeControlle... |
package edu.gatech.vera.vera.model.util.localhost
import com.tinder.scarlet.*
import org.junit.Test
import com.tinder.scarlet.ws.Receive
import com.tinder.scarlet.ws.Send
import okhttp3.OkHttpClient
import com.tinder.scarlet.websocket.okhttp.newWebSocketFactory
import org.junit.Assert.*
import java.io.BufferedReader... |
package com.jbkalit.usersearch.presentation.search.viewmodel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.jbkalit.domain.model.Feed
import com.jbkalit.domain.model.User
import com.jbkalit.domain.usecase.UserUseCaseContract
import com.jbkalit.usersearch.presentation.base.BaseV... |
package arrays_and_strings
import "testing"
// 1.2 Check Permutation: Given two strings, write a method to decide if one is a permutation of
// the other.
func TestCheckPermutation(t *testing.T) {
if !CheckPermutation("abc", "cba") {
t.Errorf("abc and cba should be a permutation!")
}
if CheckPermutation("cba", ... |
package main
import (
"embed"
"os"
"testing"
"github.com/stretchr/testify/assert"
)
//go:embed templates decks
var testContent embed.FS
// this test is not great; if you add more decks in your local environment it will fail.
func Test_FindDecks(t *testing.T) {
var decks map[string]*Deck
decks = FindDecks(tes... |
# bqed
Experimental text editor written in [BQN](https://mlochbaum.github.io/BQN/)
## Why?
I'm an array language newbie and I want to see how far I can go.
## CBQN fork, why?
I needed to add a couple of system functions to be able to use stdin and stdout in raw mode.
|
//
// Created by alfonso on 12/04/19.
//
#include "distloc.h"
extern void escribeSalida(char *, int);
extern void escribeSalidaR(char *nomarch, int epoca);
extern const double RT;
extern PLocalidad ploc;
extern PDiccionario pdic;
extern int cantiloc;
extern const int cantidadTiposOC;
/**
* Función que escribe la ... |
# Harmonic Playlist
Python implementation for composing a spotify playlist that match the Key and style
from a reference track.
## Installation
Clone the repository, install dependencies:
pip install -r requirements.txt
### Spotify Auth Token
Generate a spotify auth token from https://developer.spotify.com/ an... |
import 'package:ekko_cli/commands/create/create.dart';
import 'package:ekko_cli/commands/create/screen/samples/controller_interface.dart';
import 'package:ekko_cli/common/utils/logger/logger.dart';
import 'package:ekko_cli/core/command.dart';
import 'package:ekko_cli/core/functions/add_export.dart';
import 'package:rec... |
// Copyright (c) 2018-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package interfaces
import "github.com/uni-x/mattermost-server/model"
type MigrationsJobInterface interface {
MakeWorker() model.Worker
MakeScheduler() model.Scheduler
}
|
CAD Models
==========
A few designs including a case for TriTag.
|
SELECT MIN(s.PRICE)
FROM SIMPLE s
WHERE s.ITEM.CATEGORY.NAME = 'Aviação'; |
package cafe.adriel.greenhell
import android.app.Application
import cafe.adriel.greenhell.repository.CraftingRepository
import cafe.adriel.greenhell.repository.LocationRepository
import cafe.adriel.greenhell.view.main.MainViewModel
import cafe.adriel.greenhell.view.main.crafting.CraftingViewModel
import cafe.adriel.gr... |
class NullAuthor
def initialize ; end
def author
"Test Author"
end
end
|
namespace BeehiveManager
{
public interface IStingPatrol
{
int AlertLevel { get; }
int StingerLenght { get; set; }
bool LookForEnemies();
int SharpenStinger(int lenght);
void Sting();
}
} |
require 'thread'
require 'socket'
class WebServer
attr_reader :requests
READBYTES = 256
def initialize
@tcp_server = TCPServer.new('localhost', 23232)
@requests = []
end
def read_until_content_length(socket)
buffer = ''
content_length = 0
while (tmp = socket.recv(READBYTES))
buf... |
{-
SockeyeBackendProlog.hs: Backend for generating ECLiPSe-Prolog for Sockeye
Part of Sockeye
Copyright (c) 2018, ETH Zurich.
All rights reserved.
This file is distributed under the terms in the attached LICENSE file.
If you do not find this file, copies can be found by writing to:
ETH Zu... |
package io.gitlab.arturbosch.detekt.core
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe
import java.io.PrintStream
internal object DetektMessageCol... |
const http = require('../utils/http')
const url = require("url")
const auth = require('../config').auth
module.exports = {
async signinForm(ctx , next){
let {username , password} = ctx.request.body
let result = {
message: '',
data: null,
code:-1,
status: -1
}
if(auth.type == ... |
CREATE OR REPLACE FUNCTION markdatasetdeleted(IN inckanid character varying, IN stime timestamp with time zone)
RETURNS status.sysid%TYPE AS
$BODY$
DECLARE
retid status.sysid%TYPE;
BEGIN
INSERT INTO status(datasetid, hittime, status)
SELECT sysid, stime, 'deleted'
FROM dataset
WHERE ckanid = inckanid
... |
var a02352 =
[
[ "Entry", "a02356.html", "a02356" ],
[ "iterator", "a02352.html#ad65a466787dbca899c40b9fcd4ad8d0b", null ],
[ "Map", "a02352.html#a2631e1fdd548521cef9700ee0af1fd06", null ],
[ "Set", "a02352.html#ab1fd268d29b894cc11168e8354e4f362", null ],
[ "DSFMap", "a02352.html#aac017122db12132a7b... |
package api.server.Connectors;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Map;
/**
* Created by charles on 09/11/2015.
*/
public class ConnectorUtils {
public static char concat = '/';
public static char equal = '/';
public static String buildParameters(... |
use shader::Shader;
use std::collections::HashMap;
pub struct ShaderManager {
shader_map: HashMap<String, Shader>
}
impl ShaderManager {
pub fn new() -> ShaderManager {
ShaderManager {
shader_map: HashMap::new()
}
}
pub fn get_shader(&self, name: String) -> &Shader {
self.shader_map.get(&na... |
import React, { useEffect, useRef } from "react";
import Quagga from "quagga";
function get_correct_bar_code(array: any[]) {
if (array.length == 0)
return null;
const modeMap: any = {};
let maxEl = array[0], maxCount = 1;
for (var i = 0; i < array.length; i++) {
var el = array[i];
if (modeMap[el] =... |
class InvitationCode < ApplicationRecord
has_paper_trail
has_one :invitation_code_assignment
ASSIGNMENT_STATUS_UNASSIGNED = 'Unassigned'
ASSIGNMENT_STATUS_ASSIGNED = 'Assigned'
ASSIGNMENT_STATUSES = [ASSIGNMENT_STATUS_UNASSIGNED, ASSIGNMENT_STATUS_ASSIGNED]
after_initialize :set_defaults
validates_prese... |
package top.littlefogcat.clickerx.home.me
import android.os.Bundle
import android.util.Log
import android.view.View
import top.littlefogcat.clickerx.base.base.BaseFragment
import top.littlefogcat.clickerx.base.utils.getViewModel
import top.littlefogcat.clickerx.home.R
import top.littlefogcat.clickerx.home.databinding.... |
# PHP-CS-Fixer
The PHP-CS-Fixer task will run codestyle checks.
***Composer***
```
composer require --dev friendsofphp/php-cs-fixer
```
***Config***
The task lives under the `phpcsfixer` namespace and has following configurable parameters:
```yaml
# grumphp.yml
parameters:
tasks:
phpcsfixer:
... |
#include "../maths/special_functions.hpp"
#include "chi_square_distribution.hpp"
ChiSquareDistribution::ChiSquareDistribution(int k_)
: gamma_distribution(k_ / 2.0, 2.0) {
left_support = 0.0;
k = k_;
}
double ChiSquareDistribution::pdf(double x) {
return gamma_distribution.pdf(x);
}
double ChiSquareDi... |
package idris.adetunmbi.features.moviedetail
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class MovieResponse(
val adult: Boolean? = false,
val budget: Int? = 0,
@SerialName("genres")
val genreList: List<Genre?>? = listOf(),
val id: Int? = 0,... |
package trustymain
import (
"runtime/pprof"
"github.com/juju/errors"
)
type cpuProfileCloser struct {
file string
closed bool
}
func (c *cpuProfileCloser) Close() error {
if c.closed {
return errors.New("already closed")
}
c.closed = true
pprof.StopCPUProfile()
return nil
}
|
require "poi"
module DocImageExtract
module Reader
class Xwpf
java_import java.io.FileInputStream
java_import org.apache.poi.xwpf.usermodel.XWPFDocument
attr_reader :file
def initialize(file)
@file = file
end
def pictures
document = XWPFDocument.new FileInpu... |
#!/bin/bash -xe
mkdir -p m4
autoreconf --install --symlink
if [ -z "$NOCONFIGURE" ]; then
./configure "$@";
fi
|
using DocumentFormat.OpenXml.Wordprocessing;
using OOXMLComparer.Helpers;
namespace OOXMLComparer.Roots
{
public class HeaderComparer : OpenXmlElementComparer<Header>
{
public HeaderComparer(Header a, Header b) : base(a, b)
{
}
public override bool Compare()
{
... |
{
NB>{Hello All! I've recently coded this screen saver.It really looks like
NB>snow is falling all over, don't you think?
Yeah, it looked pretty neat!
NB>However, I did not set out to do a snow screen saver and if you exp
NB>with it a little you will see that it can even turn out to be a fir
NB>If anyone can ... |
{-# LANGUAGE OverloadedStrings #-}
module Y2021.M02.D19.Exercise where
{--
Okay, we have our ~120k wine-reviews uploaded, great! Did we do it correctly?
Hm.
Today's Haskell problem.
We've verified before (Y2021.M02.D04.Solution) that wine-labels and wineries
weren't redundant, and, if they were, we eliminated tho... |
import { JWT } from 'jose';
import { ClaimValueType, JwtSecret } from '@/types';
import { UserFieldsFragment } from '../__generated__/graphql-request';
import { ENV } from '../env';
import { generateCustomClaims } from './custom-claims';
// const RSA_TYPES = ["RS256", "RS384", "RS512"];
const ALLOWED_JWT_TYPES = [
'... |
---
title: The Daiso
permalink: wiki/The_Daiso/
layout: wiki
---
The biggest of the [100 yen shops](100_Yen_Shops "wikilink"). Sells
mostly own-brand stuff.
Locations
---------
- In [Repsa Mall](/wiki/Repsa_Mall "wikilink")
- Off [Route 408](/wiki/Route_408 "wikilink") in an old pachinko parlour in
[Ushiku](... |
package champ2010client;
import java.util.Hashtable;
import java.util.Enumeration;
import java.util.StringTokenizer;
/**
* Created by IntelliJ IDEA.
* User: Administrator
* Date: Feb 22, 2008
* Time: 6:17:32 PM
*/
public class MessageParser {
// parses the message from the serverbot, and creates a table of
... |
package renetik.android.primitives
import renetik.android.framework.lang.CSComparisonConstants.Ascending
import renetik.android.framework.lang.CSComparisonConstants.Descending
import renetik.android.framework.lang.CSComparisonConstants.Equal
import renetik.kotlin.isNull
import renetik.kotlin.notNull
fun compare(x: In... |
thekkedam.org
=============
thekkedam.org site
|
import {Db} from 'mongodb';
import {Observable} from 'rxjs';
import {map, mergeMap} from 'rxjs/operators';
import {getConnection} from '../memory/Mongo';
import {EffectSchema} from '../memory/Schemas';
import {mongoToObservable} from '../rxjs/Convience';
export interface Effect {
guid: string;
timeCreated: number;... |
package com.kpit.scenichiking.util.permission
import android.app.Activity
import com.kpit.scenichiking.util.permission.AbstractPermissionDispatcher.PermissionState.DENIED
import com.kpit.scenichiking.util.permission.AbstractPermissionDispatcher.PermissionState.GRANTED
import com.kpit.scenichiking.util.permission.Abstr... |
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Z... |
import { generateFunctionDecorator, isUndefined } from '../../helpers/general';
export function TimeMemoize(timeoutMs: number, hashFn?: (...args: any[]) => string) {
return generateFunctionDecorator('TimeMemoize', decorator, timeoutMs, hashFn);
}
function decorator<T>(fn: (...args: any[]) => any, timeoutMs: number,... |
package pgp
import (
"errors"
"os/exec"
"regexp"
"strings"
)
// GPGVersion stores discovered GPG version
type GPGVersion int
// GPG version as discovered
const (
GPG1x GPGVersion = 1
GPG20x GPGVersion = 2
GPG21xPlus GPGVersion = 3
)
var gpgVersionRegex = regexp.MustCompile(`\(GnuPG\) (\d)\.(\d)`)
/... |
using System;
using System.Collections.Generic;
namespace Chess.Model
{
public interface IChessBoard
{
IEnumerable<ISquare> Squares { get; }
ISquare this[File file, Rank rank] { get; }
}
} |
<?php
//STARTING SESSION
session_start();
//GENERATING RANDOM 4 CHARACTER FOR CAPTCHA
$string = 'abcdefhjkmnpqrstuvwxyz23456789';
$text = substr(str_shuffle($string), 0, 4);
//CREATING SESSION
$_SESSION['captcha'] = $text;
//CREATING IMAGE TEMPLATE WITH SIZE 120x40
$image_width = 120;
$ima... |
#include <CQSVGFeTile.h>
#include <CQSVG.h>
CQSVGFeTile::
CQSVGFeTile(CQSVG *svg) :
CQSVGObject(svg, this), CSVGFeTile(*svg)
{
}
void
CQSVGFeTile::
addProperties(CQPropertyTree *propTree, const std::string &name)
{
CQSVGObject::addProperties(propTree, name);
}
|
#!/bin/sh
# check if ansible is already installed by using hash function
if hash ansible-playbook 2> /dev/null; then
echo "ansible already installed"
else
echo "installing ansible"
yum install -y epel-release
yum install -y ansible
fi
|
/* leave this
l:see LICENSE file
g:utility
k:virtual,file,log,vlf,enterprise,size,db,dbs,server,status
v:130107\s.zaglio: get global info about entire server
todo:integrate sp__util_vlf
t:sp__info_svr detail
*/
CREATE proc sp__info_svr
@opt sysname = null,
@dbg int=0
as
begin try
-- se... |
# frozen_string_literal: true
# Explicitly set the JSON adapter used by MultiJson
# Currently we want this to default to the existing json gem
MultiJson.use(:json_gem)
|
import { render, screen } from '@testing-library/react'
import React from 'react'
import { Card, CardBody, CardHeader, CardSubtitle, CardText, CardTitle } from '.'
describe('Card', () => {
it('renders card correctly', () => {
const { asFragment } = render(
<Card>
<CardHeader>Ca... |
const mongoose = require('mongoose');
const Recipe = mongoose.model('Recipe');
//Converts DB information to match mongoDB and adds it to the DB
module.exports = function addRecipe(recipe){
const recipeModel = new Recipe(recipe);
recipeModel.save()
.then(() => { console.log('Succesfuly inserted')... |
{-# LANGUAGE
UnicodeSyntax
#-}
-- | Some functions currently missing from
-- "Data.Vector.Fusion.Stream".
module Data.Bitstream.Fusion
( genericLength
, genericTake
, genericDrop
, genericIndex
, genericReplicate
, genericUnfoldrN
, genericFindIndex
, genericIndexed
)
where... |
m = float(input('Digite quantos metros voce quer converter: '))
print('{}cm, {}mm'.format(m*100, m*1000))
|
# t.datetime "starts_at"
# t.datetime "ends_at"
# t.integer "venue_id"
# t.string "hero_image_url"
# t.text "extended_html_description"
# t.integer "category_id"
# t.string "name"
# t.datetime "created_at", null: false
# t.datetime "updated_at", null: f... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace cor64.Mips
{
[Serializable]
public class MipsException : Exception
{
private ExceptionType m_Exception;
public MipsException(ExceptionType type) : bas... |
%%%-------------------------------------------------------------------
%%% @author Kalin
%%% @copyright (C) 2015, <COMPANY>
%%% @doc
%%% Routes incoming message to any established connections that should receive them
%%% @todo: Persist messages that do not match currently established connections
%%% @end
%%% Created : ... |
#include "GoICP.h"
#include <queue>
#include <cassert>
using namespace std;
using namespace cgv;
using namespace cgv::pointcloud;
#define PI 3.141592653589793238462643383279502884L
namespace cgv {
namespace pointcloud {
GoICP::GoICP()
{
source_cloud = nullptr;
target_cloud = nullptr;
max_rot_dis = n... |
//
// SRSecurityPolicy.h
// SignalR.Client.ObjC
//
// Created by Kris Katsanevas on 4/15/20.
// Copyright © 2020 DyKnow LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface SRSecurityPolicy : NSObject
@property (nonatomic, assign) BOOL allowInvalidCertificates;
@prope... |
#!/usr/bin/env bash
(cd blacksmith && cargo build --release)
./blacksmith/target/release/mdbook-blacksmith "$@"
|
import React, { useEffect, useContext } from 'react'
import { Outlet } from 'react-router-dom'
import { MovieListsContext } from '../App'
export default function ListsGetter(props) {
const { lists, setLists } = useContext(MovieListsContext)
useEffect(() => {
fetch('/api/movie_lists', {
method: 'GET', ... |
---
layout: post
title: "Docker Command"
subtitle: "Docker Command"
categories: environment
tags: docker
comments: true
---
##### Docker 이미지 가져오기
```
docker pull [image name]
```
|
package dialog
import (
"encoding/json"
"io"
)
type jsonTable struct {
w io.Writer
headers []string
rows [][]string
}
func stringsToMap(headers, row []string) map[string]string {
res := make(map[string]string, len(headers))
for idx, h := range headers {
res[h] = row[idx]
}
return res
}
func al... |
(ns ohmycards.web.kws.hydra.leaf)
(def value "The value for this head." ::value)
|
#!/bin/bash
#
# Jobscript for launching dcmip2012 test3-1 on the NERSC Edison machine
#
#SBATCH -J d31-theta # job name
#SBATCH -o out_dcmip3-1.o%j # output and error file name (%j expands to jobID)
#SBATCH -n 64 # total number of mpi tasks requested
#SBATCH -p debug # queue (p... |
import { Module } from '@nestjs/common';
import { SuggestionsService } from './suggestions.service';
import { SuggestionsController } from './suggestions.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { SuggestionEntity } from './suggestion.entity';
import { PsychologistEntity } from '../psycholog... |
import 'package:test/test.dart';
import 'package:http_interceptor/utils/utils.dart';
main() {
group("buildUrlString", () {
test("Adds parameters to a URL string without parameters", () {
// Arrange
String url = "https://www.google.com/helloworld";
Map<String, dynamic> parameters = {"foo": "bar"... |
package net.pfiers.osmfocus.service.taginfo
import com.beust.klaxon.Json
import java.net.URI
import java.net.URL
import java.time.Instant
/**
* Because Klaxon doesn't handle generics *yet* (because
* of type erasure), we can't add a data: T generic field :(
*/
abstract class BasicRes(
val total: Int?,
val ... |
package me.srikavin.fbla.game.trigger
import com.artemis.World
import me.srikavin.fbla.game.ecs.component.MapTrigger
import me.srikavin.fbla.game.util.EntityInt
/**
* Handles delegation of triggers to their associated [TriggerHandler].
*/
class TriggerManager {
private val coinTriggerHandler = CoinTriggerHandle... |
package com.qihoo.finance.chronus.storage.h2.plugin.dao.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import org.springframework.beans.BeanUtils;
import org.springframework.bean... |
<?php
namespace tgMdk\dto;
/**
* 検索条件:スコア@払い検索パラメータクラス<br>
*
* @author Veritrans, Inc.
*
*/
class ScoreatpaySearchParameter
{
/**
* 詳細オーダー決済状態<br>
*/
private $detailOrderType;
/**
* 詳細コマンドタイプ名<br>
*/
private $detailCommandType;
/**
* 最新自動審査結果<br>
*/
privat... |
<?php
echo "<script> window.location.replace('".route('inicio')."') </script>"; |
pub use self::checkstyle::*;
pub use self::diff::*;
pub use self::files::*;
pub use self::json::*;
pub use self::modified_lines::*;
pub use self::stdout::*;
use std::fs;
use std::io::{self, Write};
use std::path::Path;
use std::rc::Rc;
use thiserror::Error;
use crate::formatting::ParseSess;
use crate::{config::FileN... |
using UnityEngine;
using UnityEngine.UI;
public class Enemy : MonoBehaviour
{
public int curHp;
public int maxHp;
public int goldToGive;
public Image healthBarFill;
public Animation anim;
public void Damage()
{
anim.Stop();
anim.Play();
//Subtract 1 from curHP
... |
/*
* Copyright 2014-2021 JKOOL, 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 agreed to... |
<?php
declare(strict_types=1);
namespace Enm\JsonApi\Tests\Model\Error;
use Enm\JsonApi\Model\Error\Error;
use PHPUnit\Framework\TestCase;
/**
* @author Philipp Marien <marien@eosnewmedia.de>
*/
class ErrorTest extends TestCase
{
public function testSimpleError()
{
$error = new Error(500, 'Test Err... |
---
uid: aspnet/overview/building-web-apis-with-aspnet/index
redirect_url: /aspnet/overview#web-apis
---
|
; RUN: opt < %s -indvars -replexitval=always -S | FileCheck %s --check-prefix=ALWAYS
; RUN: opt < %s -indvars -replexitval=never -S | FileCheck %s --check-prefix=NEVER
; RUN: opt < %s -indvars -replexitval=cheap -scev-cheap-expansion-budget=1 -S | FileCheck %s --check-prefix=CHEAP
; rewriteLoopExitValues() must rewrit... |
require 'test/unit'
require 'repo'
require 'owner'
require 'set'
class TestRepo < Test::Unit::TestCase
def test_restrict_repos_from_each_owner
owner = Owner.new('name')
owner2 = Owner.new('name')
repo1 = Repo.new
repo1.owner = owner
repo2 = Repo.new
repo2.owner ... |
// 1) Create a new Flutter App (in this project) and output an AppBar and some text
// below it
// 2) Add a button which changes the text (to any other text of your choice)
// 3) Split the app into three widgets: App, TextControl & Text
import 'package:flutter/material.dart';
import './textchange.dart';
import './text... |
package hero.concentrationcamp.utils;
import android.text.TextUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
/**
* Created by hero on 2016/12/6 0006.
*/
public class TimeUtils {
public static String parseT... |
RSpec.describe Presenters::Helper do
include Presenters::Helper
let(:post) { Post.new }
describe "#present" do
context "without class" do
it {
present(post) do |post|
expect(post.title).to eq("No Title")
end
}
end
context "with class" do
it {
pr... |
/** @jsx jsx */
import { jsx } from 'theme-ui'
import { Space, SpaceProps } from './Space'
export interface MarginProps extends Omit<SpaceProps, 'property'> {}
export const Margin = (props: MarginProps) => (
<Space {...props} property="margin" />
)
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Adam M. Rafuse - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential
"""
Analyze stats dumps.
"""
import sys
import json
import argparse
sys.path.insert(0, 'lib/')
import ut... |
package main
// import (
// "log"
// "time"
// )
// func main() {
// for {
// log.Println("hello there")
// <-time.After(time.Second * 5)
// }
// }
import (
"fmt"
"log"
"time"
"github.com/dimiro1/banner"
"github.com/mattn/go-colorable"
)
func main() {
templ := `{{ .Title "Hello World" "" 0 }}
GoVe... |
{-# LANGUAGE BangPatterns #-}
module LocMan.Conduit where
import Conduit
import Data.Aeson
import Data.Aeson.Types()
import Data.ByteString.Lazy
import Data.Text.Lazy
import Debug.Trace
import ClassyPrelude hiding (ByteString, Text)
import LocMan.Types
import Control.Monad.Trans.Maybe
traceConduit :: (MonadIO m, Show... |
#pragma once
#include <Monumentum/Utility/ByteBuffer.hpp>
#include <cstdint>
namespace Monumentum {
class Compressor {
public:
Compressor(const int reservedLength = 8192);
virtual ~Compressor();
uint8_t* const GetData();
void Resize(int reservedLength);
const int &ReservedLength;
const int ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lpp.Dns.DataMart.Model.QueryComposer.Adapters
{
public class EncounterPeriodValues
{
public DateTimeOffset? AdmissionDate { get; set; }
public DateTimeOffset? DischargeDate { get; set; }
}
}
|
package io.abacus.tallyho.hyperloglog
import org.scalatest.WordSpec
import org.scalatest.ShouldMatchers
import shapeless._
class CardinalityEstimationPipelineSpec extends WordSpec with ShouldMatchers {
"The cardinality estimator" should {
"count unique things with both StreamLib and Algebird" in {
val dat... |
package com.example.demo
import org.springframework.http.HttpStatus;
import java.util.*
import com.example.demo.entity.AccountType
import com.example.demo.dao.AccountRepository
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*
@RestController
@RequestMa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.