code
stringlengths
4
1.01M
<?php namespace HiFebriansyah\LaravelContentManager\Traits; use Form; use Illuminate\Support\MessageBag; use Carbon; use Session; trait Generator { public function generateForm($class, $columns, $model) { $lcm = $model->getConfigs(); $errors = Session::get('errors', new MessageBag()); ...
# Recipe-Box An implamentation of freeCodeCamp's Recipe Box
--- layout: post title: bbcp tags: [Network, Linux, Security] --- In this post, we document how we installed and configured [BBCP](https://www.slac.stanford.edu/~abh/bbcp/) on [pulpo-dtn]({{ site.baseurl }}{% post_url 2017-2-9-pulpos %}).<!-- more --> * Table of Contents {:toc} ## Installation For simplicity, We sim...
<?php namespace AppBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Routing\Annotation\Route; /** * Weekly controller. * * @Route("/weekly") */ class WeeklyController extends Controller { /** * @Route("/", name="default") */ public function defa...
cocoalumberjackTest =================== ## setting platform :ios, '7.0' pod 'BlocksKit' pod 'SVProgressHUD' pod 'CocoaLumberjack' $ pod install ### xxx-Prefix.pch #ifdef DEBUG static const int ddLogLevel = LOG_LEVEL_VERBOSE; #else static const int ddLogLevel = LOG_LEVEL_OFF; ...
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <title>WebApp</title> <base href="/" /> <link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" /> <link href="css/...
/** * The MIT License * * Copyright (C) 2015 Asterios Raptis * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, c...
#//////////////////////////////////////////////////////////////////////////// #// #// This file is part of RTIMULib #// #// Copyright (c) 2014-2015, richards-tech, LLC #// #// Permission is hereby granted, free of charge, to any person obtaining a copy of #// this software and associated documentation files (the "S...
<?php /** * Chronjob that will delete expired nonce tokens every hour * Author: Sneha Inguva * Date: 8-2-2014 */ require_once('../config.php'); require_once('../db/mysqldb.php'); $con = new mysqldb($db_settings1,false); $stmt = "Delete FROM nonce_values Where expiry_time <= CURRENT_TIMESTAMP"; $result = $con...
# GTD <a name="top"></a> <a href="http://spacemacs.org"><img src="https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg" alt="Made with Spacemacs"> </a><a href="http://www.twitter.com/zwb_ict"><img src="http://i.imgur.com/tXSoThF.png" alt="Twitter" align="right">...
--- title: activiti实体类服务组件和实体类 tags: [activiti] --- ### 实体类服务组件 activiti对数据的管理都会提供相应的服务组件。 1)IdentityService,对用户和用户组的管理 2)RepositoryService,流程存储服务组件。主要用于对Activiti中的流程存储的相关数据进行操作。包括流程存储数据的管理、流程部署以及流程的基本操作等。 3)TaskService,提供了操作流程任务的API,包括任务的查询、创建与删除、权限设置和参数设置等。 4)RuntimeService主要用于管理流程在运行时产生的数据以及提供对流程操作的API。 其中流程运...
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //--...
Ur/Web ======================= A set of Sublime Text 2 resources for Ur/Web. **If you had previously installed this package into your "Packages/User", you should consider reinstalling as described below to get future updates.** # Included: - Language definition for Ur/Web. Provides syntax highlighting in Sublime ...
#!/usr/bin/python from noisemapper.mapper import * #from collectors.lib import utils ### Define the object mapper and start mapping def main(): # utils.drop_privileges() mapper = NoiseMapper() mapper.run() if __name__ == "__main__": main()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.6.0_18) on Thu Dec 18 17:18:43 PST 2014 --> <title>Uses of Class org.xml.sax.helpers.ParserFactory (Java Platform SE 7 )</title> <meta name...
--- layout: default --- {% assign minutes = content | number_of_words | divided_by: 180 %} {% if minutes == 0 %} {% assign minutes = 1 %} {% endif %} <div class="post-header mb2"> <h2>{{ page.title }}</h2> <span class="post-meta">{{ page.date | date: "%b %-d, %Y" }}</span><br> {% if page.update_date %} <spa...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Julas.Utils; using Julas.Utils.Collections; using Julas.Utils.Extensions; using TheArtOfDev.HtmlRen...
#ifndef INCLUDED_openfl__legacy_events_KeyboardEvent #define INCLUDED_openfl__legacy_events_KeyboardEvent #ifndef HXCPP_H #include <hxcpp.h> #endif #ifndef INCLUDED_openfl__legacy_events_Event #include <openfl/_legacy/events/Event.h> #endif HX_DECLARE_CLASS3(openfl,_legacy,events,Event) HX_DECLARE_CLASS3(openfl,_lega...
/* * PokeDat - A Pokemon Data API. * Copyright (C) 2015 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, ...
今日のコミット - [bouzuya/rust-sandbox](https://github.com/bouzuya/rust-sandbox) 15 commits - [add session file creation to log_in](https://github.com/bouzuya/rust-sandbox/commit/342db99d04c7f9e537055a0b114d87c478629413) - ここまでで mfa log-in サブコマンドが動くようになった - [add status check to log_in](https://github.com/bouzuya/rust...
export { default } from './ui' export * from './ui.selectors' export * from './tabs'
<?php /* * This File is part of the Lucid\Common\Tests\Struct package * * (c) iwyg <mail@thomas-appel.com> * * For full copyright and license information, please refer to the LICENSE file * that was distributed with this package. */ namespace Lucid\Common\Tests\Struct; use Lucid\Common\Struct\Items; /** * @...
<input type="hidden" id="permission" value="<?php echo $permission;?>"> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Usuarios</h3> <?php if (strpos($permission,'Add') !== false) { ...
using System; using System.Diagnostics.CodeAnalysis; namespace Delimited.Data.Exceptions { [Serializable, ExcludeFromCodeCoverage] public class DelimitedReaderException : Exception { // // For guidelines regarding the creation of new exception types, see // http://msdn.microsoft.com/library/default.asp?ur...
import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need to review where to return a string, where to return a l...
/* Credits: Most of the original code seems to have been written by George Michael Brower. The changes I've made include adding background particle animations, text placement and modification, and integration with a sparkfun heart rate monitor by using Pubnub and johnny-five. INSTRUCTIONS ...
<!DOCTYPE html> <!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" dir="ltr"> <!--<![endif]--> <!-- Usage: /eic/site/ccc-rec.nsf/tpl-eng/template-1col.html?Open...
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2020_08_01 module Models # # Response for ApplicationGatewayBackendHealth API service call. # class Applicat...
define("resolver", [], function() { "use strict"; /* * This module defines a subclass of Ember.DefaultResolver that adds two * important features: * * 1) The resolver makes the container aware of es6 modules via the AMD * output. The loader's _seen is consulted so that classes can be *...
package billing; import cuke4duke.Then; import cuke4duke.Given; import static org.junit.Assert.assertTrue; public class CalledSteps { private boolean magic; @Given("^it is (.*)$") public void itIs(String what) { if(what.equals("magic")) { magic = true; } } @Then("^mag...
#include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <assert.h> #include <sys/epoll.h> #include "reactor.h" struct state { reactor_handler input; reactor_handler output; char buffer[4096]; data remaining; }; int fill(struct state *state) { ssize_t n; ...
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::CognitiveServices::ContentModerator::V1_0 module Models # # Detected SSN details. # class SSN include MsRestAzure ...
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Posts &middot; dpc&#39;s blog</title> <meta name="description" content="Random posts about stuff."> <meta name="generator" content="Hugo 0.16" /> <meta name="twitter...
(function() { 'use strict'; var express = require('express'); var path = require('path'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var app = express(); // view engine setup app.set('v...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>ViennaCL - The Vien...
#include "randomplayer.h" #include <QDirIterator> void RandomPlayer::start() { this->setMedia(QUrl::fromLocalFile(fileList.takeFirst())); this->play(); this->_readyToPlay = true; } void RandomPlayer::quitPlayMode() { this->_readyToPlay = false; this->stop(); } bool RandomPlayer::isPlayMode(){ ...
#ifndef BITCOIN_CHAINPARAMSSEEDS_H #define BITCOIN_CHAINPARAMSSEEDS_H /** * List of fixed seed nodes for the bitcoin network * AUTOGENERATED by share/seeds/generate-seeds.py * * Each line contains a 16-byte IPv6 address and a port. * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly. *...
<h1 align="center"> <br> <br> <img width="360" src="logo.png" alt="ulid"> <br> <br> <br> </h1> [![](https://img.shields.io/pypi/v/python-ulid.svg?style=flat-square)](https://pypi.python.org/pypi/python-ulid) [![](https://img.shields.io/travis/mdomke/python-ulid/master.svg?style=flat-square)](https://travis-ci.or...
"use strict"; var C = function () { function C() { babelHelpers.classCallCheck(this, C); } babelHelpers.createClass(C, [{ key: "m", value: function m(x) { return 'a'; } }]); return C; }();
using System; using System.Collections.Generic; using System.IO; using System.Linq; using log4net; using Newtonsoft.Json; using RoboticsTxt.Lib.Contracts; using RoboticsTxt.Lib.Contracts.Configuration; namespace RoboticsTxt.Lib.Components.Sequencer { internal class PositionStorageAccessor { private re...
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Miruken Docs &mdash; SymbolDownloader docum...
/** * The MIT License (MIT) * * Copyright (c) 2015 Vincent Vergnolle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * t...
/** @jsx jsx */ import { Transforms } from 'slate' import { jsx } from '../../..' export const run = editor => { Transforms.move(editor, { edge: 'start' }) } export const input = ( <editor> <block> one <anchor /> two t<focus /> hree </block> </editor> ) export const output = ( <editor...
using UnityEngine; using System; using System.IO; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization.Formatters.Binary; // Emanuel Strömgren public class DebugTrackerVisualizer : MonoBehaviour { private BinaryFormatter m_Formatter = new BinaryFormatter(); private B...
package shuaicj.hello.configuration.case04; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** * Spring boot application. * * @author shuaicj 2019/10/12 */ @SpringBootApplication public class Application { public static void main(String...
# -*- coding: utf-8 -*- from django.contrib.admin import TabularInline from .models import GalleryPhoto class PhotoInline(TabularInline): """ Tabular inline that will be displayed in the gallery form during frontend editing or in the admin site. """ model = GalleryPhoto fk_name = "gallery"
// Copyright (c) 2015, Peter Mrekaj. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE.txt file. // Package epiutil is an utility class with functions // common to all packages in the epi project. package epiutil import "math/rand" // RandStr retur...
var assert = require('assert'); var fs = require('fs'); var requireFiles = require(__dirname + '/../lib/requireFiles'); var files = [ __dirname + '/moch/custom_test.txt', __dirname + '/moch/json_test.json', __dirname + '/moch/test.js' ]; describe('requireFiles testing', function(){ describe('Structure...
package com.reactnativeexample; import com.facebook.react.ReactActivity; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import java.util.Arrays; import java.util.List; public class MainActivity extends ReactActivity { /** * Returns the name of the main component r...
/// <reference path="Global.ts" /> /// <reference path="Decks.ts" /> module ScrollsTypes { 'use strict'; export class DeckCards { cards:CardsAndStats[] = []; deck:Deck; constructor(deck:Deck) { this.deck = deck; this.update(); } update():void {...
class Admin::<%= file_name.classify.pluralize %>Controller < Admin::BaseController inherit_resources <% if options[:actions].present? %> actions <%= options[:actions].map {|a| ":#{a}"}.join(", ") %> <% else %> actions :all, except: [:show] <% end %> private def collection @<%= file_name.pluraliz...
/* *= require ecm/tags/backend/application */
{{ with $.Site.Params.themeColor }} <style type="text/css"> .sidebar { background-color: {{ . }}; } .read-more-link a { border-color: {{ . }}; } .pagination li a { color: {{ . }}; border: 1px solid {{ . }}; } .pagination li.active a { background-color: {{ . }}; } .pagination li...
package net.inpercima.runandfun.service; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_MEDIA; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_URL_PAGE_SIZE_ONE; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants...
export default function() { var links = [ { icon: "fa-sign-in", title: "Login", url: "/login" }, { icon: "fa-dashboard", title: "Dashboard", url: "/" }, { icon: "fa-calendar", titl...
<html> <title>nwSGM</title> <body bgcolor="#000066" text="#FFFF00" link="#8888FF" vlink="#FF0000"> <h1><em>nwSGM</em></h1> <hr> <p> <b><em>Segment generator</em></b> <p> <hr> </body> </html>
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600); body { font-family: 'Open Sans', sans-serif; margin: auto; max-width: 100%; overflow-x: hidden; } .container{ margin: 10px auto; } @import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro); .navbar-brand{ font-family: 'Source S...
<?php /** * Pure-PHP implementation of SFTP. * * PHP version 5 * * Currently only supports SFTPv2 and v3, which, according to wikipedia.org, "is the most widely used version, * implemented by the popular OpenSSH SFTP server". If you want SFTPv4/5/6 support, provide me with access * to an SFTPv4/5/6 server. * ...
/* -------------------------------------------------------------------------------- Based on class found at: http://ai.stanford.edu/~gal/Code/FindMotifs/ -------------------------------------------------------------------------------- */ #include "Platform/StableHeaders.h" #include "Util/Helper/ConfigFile.h" ...
# frozen_string_literal: true module Webdrone class MethodLogger < Module class << self attr_accessor :last_time, :screenshot end def initialize(methods = nil) super() @methods = methods end if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7') def included(base) ...
.pad { padding:30px 30px 30px 30px !important; } .button-gm { min-height: 30px; line-height: 30px; font-size: 14px } .button-me { border-color: transparent; background-color: #00c0f5; color: #FFF; position: relative; display: inline-block; margin: 10px 0; padding: 0 12px; min-widt...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #if XR_MANAGEMENT_ENABLED using UnityEngine.XR.Management; #endif // XR_MANAGEMENT_ENABLED namespace Microsoft.MixedReality.Toolkit.Utilities { /// <summary> /// Utilities that abstract XR settings functionality so that the MRTK need ...
const Koa = require('koa'); const http = require('http'); const destroyable = require('server-destroy'); const bodyParser = require('koa-bodyparser'); const session = require('koa-session'); const passport = require('koa-passport'); const serve = require('koa-static'); const db = require('./db'); const config = requir...
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\Se...
<?php namespace app\base; use Yii; use yii\base\Component; class MailService extends Component { public function init() { parent::init(); if ($this->_mail === null) { $this->_mail = Yii::$app->getMailer(); //$this->_mail->htmlLayout = Yii::getAlias($this->id . '/mail...
<link rel="import" href="../../polymer/polymer-element.html"> <link rel="import" href="../overlay-mixin.html"> <dom-module id="sample-overlay"> <template> <style> :host { background: #ddd; display: block; height: 200px; position: absolute; width: 200px; } ...
using System; using Xamarin.Forms; namespace EmployeeApp { public partial class ClaimDetailPage : ContentPage { private ClaimViewModel model; public ClaimDetailPage(ClaimViewModel cl) { InitializeComponent(); model = cl; BindingContext =...
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"> <link rel="stylesheet" href="../css/weui.css"/> <link rel="stylesheet" href="../css/weuix.css"/> <script src="../js/zepto.min.js"></script> ...
/* Copyright (C) 2013-2015 MetaMorph Software, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this data, including any software or models in source or binary form, as well as any drawings, specifications, and documentation (collectively "the Data"), to deal in the Data withou...
package cellsociety_team05; public class SimulationException extends Exception { public SimulationException(String s) { super(s); } }
PhotoAlbums.Router.map(function() { this.resource('login'); this.resource('album', {path: '/:album_id'}); this.resource('photo', {path: 'photos/:photo_id'}); });
from __future__ import annotations from collections import defaultdict from collections.abc import Generator, Iterable, Mapping, MutableMapping from contextlib import contextmanager import logging import re import textwrap from types import MappingProxyType from typing import TYPE_CHECKING, Any, NamedTuple from markd...
package com.globalforge.infix; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import com.globalforge.infix.api.InfixSimpleActions; import com.google.common.collect.ListMultimap; /*- The MIT License (MIT) Copyright (c) 2019-2020 Global Forge LLC Permission is hereby granted, free of ch...
<?php namespace App\Controllers; use App\Models\Queries\ArticleSQL; use App\Models\Queries\CategorieSQL; use Core\Language; use Core\View; use Core\Controller; use Helpers\Twig; use Helpers\Url; class Categories extends Controller { public function __construct() { parent::__construct(); } publi...
import Icon from '../components/Icon.vue' Icon.register({"arrows":{"width":1792,"height":1792,"paths":[{"d":"M1792 896q0 26-19 45l-256 256q-19 19-45 19t-45-19-19-45v-128h-384v384h128q26 0 45 19t19 45-19 45l-256 256q-19 19-45 19t-45-19l-256-256q-19-19-19-45t19-45 45-19h128v-384h-384v128q0 26-19 45t-45 19-45-19l-256-256...
require 'test_helper' require 'bearychat/rtm' class BearychatTest < Minitest::Test MOCK_HOOK_URI = 'https://hook.bearychat.com/mock/incoming/hook' def test_that_it_has_a_version_number refute_nil ::Bearychat::VERSION end def test_incoming_build_by_module assert_equal true, ::Bearychat.incoming(MOCK_H...
package iron_hippo_exe import ( "fmt" "io" "net/http" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "google.golang.org/appengine" "google.golang.org/appengine/log" "google.golang.org/appengine/urlfetch" ) const ProjectID = "cpb101demo1" type DataflowTemplatePostBody struct { JobName string `json:"...
Title: On Git and GitHub Flow Date: 2015-01-01 Recently, I have been making an added effort to seek out and contribute to open source projects on GitHub. The motivation behind this was largely the [24 Pull Requests](http://24pullrequests.com) project, which encourages developers to submit one pull request for each day...
--[[ File: src/animation/frame.lua Author: Daniel "lytedev" Flanagan Website: http://dmf.me Contains the data to specify a piece of a texture over a period of time. ]]-- local Frame = Class{} function Frame.generate(w, h, imgw, imgh, num, time, frames, offset, start) local start = start or 0 local t...
# Input Number Simple jQuery plugin to add plus and minus controls to an input element ## Installation Installation can be done through bower ``` bower install develo-input-number --save ``` Then add the script and jQuery to your page. ## Example Usage ``` // Default options, feel free to override them. var options = ...
/** * Your Copyright Here * * Appcelerator Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. * and licensed under the Apache Public License (version 2) */ #import <UIKit/UIKit.h> #import "TiModule.h" @class iPhoneHTTPServerViewController; @class HTTPServer; @interface Com0x82WebserverModule : TiModule {...
# Awful Recruiters This used to be a list of third party recruiters. This was on the website: > I am definitely not saying these companies are awful. Simply that they are a source of undesirable email. This site is simply a list of domains. No claims are being made about the owners or their intentions. Ideally, it w...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content=...
# Controllers - [Introduction](#introduction) - [Writing Controllers](#writing-controllers) - [Basic Controllers](#basic-controllers) - [Single Action Controllers](#single-action-controllers) - [Controller Middleware](#controller-middleware) - [Resource Controllers](#resource-controllers) - [Partial Resour...
using NUnit.Framework; using Ploeh.AutoFixture; using RememBeer.Models.Dtos; using RememBeer.Tests.Utils; namespace RememBeer.Tests.Models.Dtos { [TestFixture] public class BeerDtoTests : TestClassBase { [Test] public void Setters_ShouldSetProperties() { var id = this...
import teca.utils as tecautils import teca.ConfigHandler as tecaconf import unittest class TestFileFilter(unittest.TestCase): def setUp(self): self.conf = tecaconf.ConfigHandler( "tests/test_data/configuration.json", {"starting_path": "tests/test_data/images"} ) self...
<?php /* * This file is part of the Integrated package. * * (c) e-Active B.V. <integrated@e-active.nl> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Integrated\Bundle\AssetBundle\Tests\Manager; use Integrated\Bundle\...
import { h, Component } from 'preact'; import moment from 'moment'; const MonthPicker = ({ onChange, ...props }) => ( <select onChange={onChange} id="select-month">{ optionsFor("month", props.date) }</select> ); const DayPicker = ({ onChange, ...props }) => ( <select onChange={onChange} id="select-date">{ options...
'use strict'; angular.module('users').factory('Permissions', ['Authentication', '$location', function(Authentication, $location) { // Permissions service logic // ... // Public API return { //check if user suits the right permissions for visiting the page, Otherwise go to 401 userRolesContains: functio...
import $ from 'jquery'; import keyboard from 'virtual-keyboard'; $.fn.addKeyboard = function () { return this.keyboard({ openOn: null, stayOpen: false, layout: 'custom', customLayout: { 'normal': ['7 8 9 {c}', '4 5 6 {del}', '1 2 3 {sign}', '0 0 {dec} {a}'], }, position: { // null...
require 'nokogiri' require 'ostruct' require 'active_support/core_ext/string' require 'active_support/core_ext/date' module Lifebouy class MalformedRequestXml < StandardError def initialize(xml_errors) @xml_errors = xml_errors end def message "The request contains the following errors:\n\t#{...
/** * Trait class */ function Trait(methods, allTraits) { allTraits = allTraits || []; this.traits = [methods]; var extraTraits = methods.$traits; if (extraTraits) { if (typeof extraTraits === "string") { extraTraits = extraTraits.replace(/ /g, '').split(','); }...
require 'integrity' require 'fileutils' module Integrity class Notifier class Artifacts < Notifier::Base def initialize(commit, config={}) @project = commit.project super end def deliver! return unless self.commit.successful? self.publish_artifacts self...
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="shortcut icon" href="http://www.entwicklungshilfe.nrw/typo3conf/ext/wmdb_base_ewh/Resources/Public/img/favicon.ico" type="image/x-icon"> <title>oh-my-zsh Präsentation von Php-Schulung Entwicklungshilfe</title> ...
import {Component, Input} from '@angular/core'; import {CORE_DIRECTIVES} from '@angular/common'; import {ROUTER_DIRECTIVES, Router} from '@angular/router-deprecated'; import {AuthService} from '../common/auth.service'; @Component({ selector: 'todo-navbar', templateUrl: 'app/navbar/navbar.component.html', direct...
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Game = mongoose.model('Game'), Team = mongoose.model('Team'), Player = mongoose.model('Player'), async = require('async'); exports.all = function(req, res) { Game.find({'played': true}).exec(function(err, games) { if (err)...
package championpicker.console; import com.googlecode.lanterna.gui.*; import com.googlecode.lanterna.TerminalFacade; import com.googlecode.lanterna.terminal.Terminal; import com.googlecode.lanterna.terminal.TerminalSize; import com.googlecode.lanterna.terminal.swing.SwingTerminal; import com.googlecode.lanterna.gui....
(function(){ 'use strict'; angular.module('GamemasterApp') .controller('DashboardCtrl', function ($scope, $timeout, $mdSidenav, $http) { $scope.users = ['Fabio', 'Leonardo', 'Thomas', 'Gabriele', 'Fabrizio', 'John', 'Luis', 'Kate', 'Max']; }) })();
require 'byebug' module Vorm module Validatable class ValidationError def clear_all @errors = Hash.new { |k, v| k[v] = [] } end end end end class Valid include Vorm::Validatable def self.reset! @validators = nil end end describe Vorm::Validatable do before { Valid.reset! ...
module Embratel class PhoneBill attr_reader :payables def initialize(path) @payables = CSVParser.parse(path) end def calls @calls ||= payables.select(&:call?) end def fees @fees ||= payables.select(&:fee?) end def total @total ||= payables.inject(0) { |sum, ...