code
stringlengths
4
1.01M
language
stringclasses
2 values
require_relative '../../../spec_helper' require_relative 'shared/constants' require_relative '../../../core/file/shared/read' describe "Digest::SHA512.file" do describe "when passed a path to a file that exists" do before :each do @file = tmp("md5_temp") touch(@file, 'wb') {|f| f.write SHA512Constan...
Java
--- layout: post title: "ASP.NET Core基本原理(7)-日志" subtitle: "ASP.NET Core Fundamentals-Logging" tags: [netcore, fundamentals, logging] --- ASP.NET Core内置了对日志的支持。通过依赖注入请求`ILoggerFactory`或者`ILogger<T>`可以为应用程序添加日志功能。 ## 在应用程序中实现日志 如果请求了`ILoggerFactory`,那么日志记录器(Logger)就必须通过它的`CreateLogger`方法来创建: ```csharp var...
Java
using System; using System.Threading.Tasks; using Anotar.NLog; using CroquetAustralia.Domain.Services.Serializers; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Queue; namespace CroquetAustralia.Domain.Services.Queues { public abstract class QueueBase : IQueueBase { privat...
Java
module ModPlanet use ModConstants use ModSizeGITM implicit none ! Modified (01/18/07) : SWB : Aij, s-exponents for mutual diffusion ! Modified (06/12/08) : SWB : ordering to species revised ! Modified (06/12/08) : SWB : nSpecies = 6; nSpeciesTotal = 11 ! Majors (6): COntrol the Pressures Gradients and w...
Java
class CreatePhrases < ActiveRecord::Migration def change create_table :phrases do |t| t.belongs_to :country t.string :hello t.string :please t.string :thanks t.string :bathroom t.timestamps end end end
Java
const electron = require('electron'); const ipcRenderer = electron.ipcRenderer; window.onload = function() { ipcRenderer.send('game-preview-loaded'); } ipcRenderer.on('game-preview-start', function(event, data) { var app = new Application({ // resize: true, fullscreen: true, antyAliasing: true, ...
Java
module.exports = { token: 'TELEGRAM_BOT_TOKEN', polling: { timeout: 3, limit: 100 } };
Java
/* ColorComboBoxTest.cs -- * Ars Magna project, http://arsmagna.ru * ------------------------------------------------------- * Status: poor */ #region Using directives using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using ...
Java
<?php return array( '_root_' => 'admin/index', // The default route '_404_' => 'welcome/404', // The main 404 route 'admin/detail/:id' => array('admin/detail/$1', 'name' => 'detail'), 'admin/write' => '/admin/write/', 'test'=> 'api/test', 'blog'=> 'api/blog', 'blog/insert'=> 'api/blog/inser...
Java
Installing Sencha Touch ----------------------- [Download the Sencha Touch SDK][sdk], and unzip the archive. Assuming that you've saved the SDK into your downloads folder (`~/Downloads/sencha-touch-2-b3`), you can run the following commands in the terminal: cd path/to/sencha-touch-2-recipes/recipe2 cp -R ~/Do...
Java
<!-- Modal --> <div class="modal fade" id="explor_post" tabindex="-1" role="dialog" aria-labelledby="post_structlLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span...
Java
using System.Collections.ObjectModel; using ActiproSoftware.Text; using ActiproSoftware.Text.Utility; using ActiproSoftware.Windows.Controls.SyntaxEditor; using ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation; using NQuery.Authoring.ActiproWpf.SymbolContent; using NQuery.Authoring.ActiproWp...
Java
#include <iostream> using namespace std; void display(const int *xPos, const int *yPos); void move(int *xPos, int *yPos); int main(void) { int x = 10; int y = 20; display(&x, &y); move(&x, &y); display(&x, &y); return 0; } void display(const int *xPos, const int *yPos) { // btw const not needed for this c...
Java
<!DOCTYPE html> <HTML><head><TITLE>Manpage of TRUE</TITLE> <meta charset="utf-8"> <link rel="stylesheet" href="/css/main.css" type="text/css"> </head> <body> <header class="site-header"> <div class="wrap"> <div class="site-title"><a href="/manpages/index.html">linux manpages</a></div> <div class="site-description">...
Java
class Room < ActiveRecord::Base validates :name, :presence => true has_many :users has_many :room_logs end
Java
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="/static/img/ruby.ico" /> <title>43基本的面向对象分析和设计 - LJZN</tit...
Java
Template.friendPosts.onCreated(function() { Bisia.Notification.resetNotify('note', 'post'); }) Template.friendPosts.helpers({ getPost: function(postId) { var post = Posts.findOne(postId); if (post) { var user = Users.findOne({ '_id': post.authorId }, { 'fields': { 'username': 1, 'profile.city': 1, ...
Java
import { all, takeEvery } from 'redux-saga/effects'; import actions from '#actions'; import handleShareFormChange from './startAlbumsSharingService/handleShareFormChange'; import handleShareFormSubmit from './startAlbumsSharingService/handleShareFormSubmit'; import handleShareItemsSelect from './startAlbumsSharingSer...
Java
var fs = require('fs'), eol = require('eol'), path = require('path'), mkdirp = require('mkdirp'), watch = require('watch'); var specialFiles = { 'welcome.md': function(fileContent, consoleContent) { consoleContent.welcome = processFileContent(fileContent); }, 'config.json': function...
Java
#!/bin/bash set -e DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" channel() { if [ -n "${TRAVIS}" ]; then if [ "${TRAVIS_RUST_VERSION}" = "${CHANNEL}" ]; then pwd (set -x; cargo "$@") fi elif [ -n "${APPVEYOR}" ]; then if [ "${APPVEYOR_RUST_CHANNEL}" = "${...
Java
<?php include_once('conexao.class.php'); class Disciplina{ public $id_disciplina; public $nome; public $professor; public $curso; public $carga_horaria; public function __construct(){ //print "Disciplina instanciada!"; } public function gravar(){ $sql = "insert into disciplina (nome, professo...
Java
{{{ "bodyClass" : "bg-white", "screenshot" : { "background-size" : "contain" } }}} <div class="cf"> <div class="fl w-50 w-20-ns tc pv5 bg-black-05"> 1 </div> <div class="fl w-50 w-20-ns tc pv5 bg-black-10"> 2 </div> <div class="fl w-100 w-20-ns tc pv5 bg-black-20"> 3 </div> <div cla...
Java
// // MIT License // // Copyright 2019 // // 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, modify, merge, publi...
Java
{% extends "base.html" %} {% import "bootstrap/wtf.html" as wtf %} {% block title %}Flasky - Edit Teacher Profile{% endblock %} {% block side_content %} <div class="page-header"> <h1>Edit Student's Info</h1> </div> <div class="col-md-4"> {{ wtf.quick_form(form) }} </div> {% endblock %}
Java
export const Camera = ` <svg viewBox="0 0 28 28"> <g fill="none" fill-rule="evenodd"> <path d="M3 3h22a2 2 0 012 2v18a2 2 0 01-2 2H3a2 2 0 01-2-2V5a2 2 0 012-2z" stroke="currentColor"/> <circle stroke="currentColor" cx="14" cy="14" r="5"/> <path d="M22 7h1" stroke="currentColor" stroke-linecap="round" str...
Java
# BitForm Playing around with the idea of replacing XForms with Custom Property.
Java
import datetime import time import boto import redis import requests import random import zlib from django.shortcuts import get_object_or_404 from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.template.loader import render_to_string from django.db import IntegrityE...
Java
<!doctype html> <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]--> <!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<!...
Java
const determineTestFilesToRun = ({ inputFile, inputArgs = [], config }) => { const path = require("path"); const fs = require("fs"); const glob = require("glob"); let filesToRun = []; if (inputFile) { filesToRun.push(inputFile); } else if (inputArgs.length > 0) { inputArgs.forEach(inputArg => files...
Java
import "reflect-metadata"; import {createTestingConnections, closeTestingConnections, reloadTestingDatabases} from "../../utils/test-utils"; import {Connection} from "../../../src/connection/Connection"; import {Post} from "./entity/Post"; import {expect} from "chai"; import {PostStatus} from "./model/PostStatus"; des...
Java
// nodejs按行读取文件流 var Stream = require('stream').Stream, util = require('util'); var LineStream = function() { this.writable = true; this.readable = true; this.buffer = ''; }; util.inherits(LineStream, Stream); LineStream.prototype.write = function(data, encoding) { if (Buffer.isBuffer(data)) { data = data.to...
Java
using LibrarySystem.Models; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using System; using System.Collections.Generic; using System.Linq; namespace LibrarySystem.Account { public partial class Manage : System.Web.UI.Page { protected string SuccessMessage ...
Java
__author__ = "Guillaume" __license__ = "MIT" __copyright__ = "2015, ESRF" import numpy from freesas.model import SASModel class Grid: """ This class is used to create a grid which include all the input models """ def __init__(self, inputfiles): """ :param inputfiles: list of pdb files...
Java
// Based on "Design Patterns: Elements of Reusable Object-Oriented Software" // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm // // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan. #include "btree.h" namespace structural { namespace flywe...
Java
# OpenMultiplayerRobot This is a work in progress. ## Install ```bash npm install npm install -g typings gulp typings install gulp npm start ``` ## Credits - Developed by [Andreas Carlson](http://andreascarlson.se) Thanks to: - [iggyfisk](https://github.com/iggyfisk) - Based on [electron-typescript-react quickstar...
Java
#include <assert.h> #include <math.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // #include <antlr3.h> #include "toml.h" #include "toml-parser.h" // #include "tomlParser.h" // #include "tomlLexer.h" struct _TOMLStringifyData { TOMLError *error; int bufferSi...
Java
Enefele::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test s...
Java
<!doctype html> <html class="no-js" lang=""> <head> <title>Zabuun - Learn Egyptian Arabic for English speakers</title> <meta name="description" content=""> <?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?> </head> <body> <?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?> <?php inc...
Java
package main import ( "os" "github.com/codegangsta/cli" ) func main() { app := cli.NewApp() app.Name = "nano-client" app.Usage = "Send a request to service" app.Version = Version app.Flags = []cli.Flag{ cli.StringFlag{ Name: "service, s", Usage: "Service endpoint to send request to (Required)", },...
Java
import logger from './logger'; import app from './app'; const port = app.get('port'); const server = app.listen(port); process.on('unhandledRejection', (reason, p) => logger.error('Unhandled Rejection at: Promise ', p, reason) ); server.on('listening', () => logger.info('Feathers application started on http://%s...
Java
# Gistoria [**Gistoria**](http://gistoria.drteam.rocks/) it's a **Gist** of the some of **Stories** - a project devoted to Russian literature. Online development streams every Monday, Wednesday and Friday. https://www.twitch.tv/evilfreelancer If you can help to **Gistoria** it will be great! ## How to install ...
Java
package test import akka.actor.ActorSystem import akka.pattern.AskTimeoutException import github.gphat.datadog._ import java.nio.charset.StandardCharsets import org.json4s._ import org.json4s.native.JsonMethods._ import org.specs2.mutable.Specification import scala.concurrent.duration._ import scala.concurrent.Executi...
Java
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>class RubyXL::CellStyle - rubyXL 3.3.29</title> <script type="text/javascript"> var rdoc_rel_prefix = "../"; var index_rel_prefix = "../"; </script> <script src="../js/jquery.js"></script> <script src="../js/darkfish.js"></script> <link href="../css/f...
Java
// Template Source: BaseEntityCollectionResponse.java.tt // ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // -------------------------...
Java
/* * Copyright 2013 ZXing authors * * 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 t...
Java
require "capybara/rspec" require "webmock/rspec" require "plek" require "gds_api/test_helpers/publishing_api" WebMock.disable_net_connect!(allow_localhost: true) RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true en...
Java
#!/usr/bin/env python """ Project-wide application configuration. DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE. They will be exposed to users. Use environment variables instead. See get_secrets() below for a fast way to access them. """ import os """ NAMES """ # Project name used for display PROJECT_NAME = 'q...
Java
{ "date": "2019-12-01", "type": "post", "title": "Report for Sunday 1st of December 2019", "slug": "2019\/12\/01", "categories": [ "Daily report" ], "images": [], "health": { "weight": 82.9, "height": 173, "age": 14228 }, "nutrition": { "ca...
Java
<table class="legend-table" *ngIf="units"> <thead> <tr class="header"> <th>Chraracter</th> <th>Length (seconds)</th> </tr> </thead> <tbody> <tr> <th>Dot ( ● )</th> <td class="red">{{ units.dot }} Seconds</td> </tr> <tr> <th>Dash ( - )</th> <td class="red">{{...
Java
--- layout: post date: '2015-10-13' title: "Watters - Wtoo Wtoo Maids Dress 891 2015 Spring Sleeveless Knee-Length Aline/Princess" category: Watters - Wtoo tags: [Watters - Wtoo,Wtoo,Aline/Princess ,Jewel,Knee-Length,Sleeveless,2015,Spring] --- ### Watters - Wtoo Wtoo Maids Dress 891 Just **$189.99** ### 2015 Spring Sl...
Java
#include "udivmodti4.h" __int128 __modti3(__int128 a, __int128 b) { unsigned __int128 r; unsigned __int128 sign = a >> 127; udivmodti4_(a + sign ^ sign, b < 0 ? -b : b, &r); return r + sign ^ sign; }
Java
# # Swaggy Jenkins # Jenkins API clients generated from Swagger / Open API specification # Version: 1.1.2-pre.0 # Contact: blah@cliffano.com # Generated by OpenAPI Generator: https://openapi-generator.tech # Describe -tag 'PSOpenAPITools' -name 'EmptyChangeLogSet' { Context 'EmptyChangeLogSet' { It 'Initia...
Java
class AddIndexToSkillTotals < ActiveRecord::Migration def change add_index :skill_totals, :name add_index :skill_totals, :date end end
Java
<!DOCTYPE html> <html> <head lang="en"> <title>柱柱签收-移动互联网时代的物流,运输全程可视,让物流更简单</title> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="keywords" content="柱柱签收,物流管理系统,车队系统,第三方物流系统,物流签收, 签收单, 回单,车队管理,车辆管理,TMS,运输管理系统,OT...
Java
require_relative '../../../spec_helper' require 'matrix' describe "Vector#normalize" do it "returns a normalized copy of the vector" do x = 0.2672612419124244 Vector[1, 2, 3].normalize.should == Vector[x, x * 2, x * 3] end it "raises an error for zero vectors" do lambda { Vector[].normalize ...
Java
'use strict'; /** * Module dependencies. */ var users = require('../../app/controllers/users'), goaliedash = require('../../app/controllers/goaliedash'); module.exports = function(app) { app.route('/goaliedash') .get(users.requiresLogin, users.hasAuthorization); };
Java
// @flow import React from 'react' import withPropsStream from '@vega/utils/withPropsStream' import {map} from 'rxjs/operators' import styles from './styles/Communicator.css' import ThreadList from './ThreadList' import CreateComment from './CreateComment' function getPropsStream(props$) { // todo: implement open/c...
Java
# ember-promise-block This is an Ember Addon that exposes a component `promise-block` which shows a loader while a given promise is being resolved. ## Installing Install as an Ember-CLI addon: ember install ember-promise-block ## Usage // templates/posts.hbs {{#promise-block promise=postsPromise loade...
Java
package pricing; import org.configureme.ConfigurationManager; import org.configureme.Environment; import org.configureme.GlobalEnvironment; import org.configureme.environments.DynamicEnvironment; public class ShowPrice { public static void main(String a[]){ showPrice(); showPriceIn("USA", GlobalEnvironment.INSTA...
Java
## Part 3 [![](https://rawgit.com/Bogdan-Lyashenko/Under-the-hood-ReactJS/master/stack/images/3/part-3.svg)](https://rawgit.com/Bogdan-Lyashenko/Under-the-hood-ReactJS/master/stack/images/3/part-3.svg) <em>3.0 第 3 部分 (点击查看大图)</em> ### 挂载 `componentMount` 是我们整个系列中极其重要的一个板块。如图,我们关注 `ReactCompositeComponent.mountComp...
Java
## Release 1.1.0 ## Breaking Changes * removed cross-spawn dependency ### Features - ([fc25d5e](https://github.com/igniteram/protractor-cli/commit/fc25d5edc09d775f35e356796c19e0425fc936d2)) feat(install modules): added npm progress & async installation ## Release 1.0.1 ### Features - ([7441967](https://github....
Java
local d = require "distribution" d6 = d.uniform(6) d20 = d.uniform(20) foo = 2*d6 + d20 -- The basic summary method gives a sorted list of all the outcomes -- and a summary of statistical values print("2d6 + d20") print(foo:summary()) -- Note that tostring(foo) and print(foo) will automatically call summary -- To...
Java
/* Error handling */ #include "Python.h" void PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback) { PyThreadState *tstate = PyThreadState_GET(); PyObject *oldtype, *oldvalue, *oldtraceback; /* Save these in locals to safeguard against recursive invocation through Py_XDECREF */ oldtype = tsta...
Java
/* * Copyright (c) 2014-2022 The Voxie Authors * * 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, modify, mer...
Java
var models = require('../models'); var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { console.log(req.session); res.render('layout'); }); module.exports = router;
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>unicoq: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css"...
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `FromUtf8Error` struct in crate `collections`."> <meta name...
Java
* { margin: 0; padding: 0; } body { margin: 0; padding: 0; font: 12px Arial, Helvetica, sans-serif; color: #333; background: #fff url(images/bg_body.jpg) repeat-x; } img { border: none; } p { margin: 0; padding: 8px 0; } a, object, a:focus { outline: none; } h1, h2, h3, h4 { marg...
Java
<html><body> <h4>Windows 10 x64 (19041.388)</h4><br> <h2>_IO_APIC_REGISTERS</h2> <font face="arial"> +0x000 RegisterIndex : Uint4B<br> +0x004 Reserved1 : [3] Uint4B<br> +0x010 RegisterValue : Uint4B<br> +0x014 Reserved2 : [11] Uint4B<br> +0x040 EndOfInterrupt : Uint4B<br> </f...
Java
import os import logging from django.core.management.base import BaseCommand from django.core.mail import send_mail from django.template.loader import get_template from workshops.models import Badge, Person, Role logger = logging.getLogger() class Command(BaseCommand): help = 'Report instructors activity.' ...
Java
<?php /* * This file is part of the Phuri package. * * Copyright © 2014 Erin Millard * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Eloquent\Phuri\Generic; use Eloquent\Pathogen\Factory\PathFactoryInterface; use Eloqu...
Java
# react-all Use ReactJS to do cross platform StartKit
Java
/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softwar...
Java
// Copyright (c) 2013 Raphael Estrada // License: The MIT License - see "LICENSE" file for details // Author URL: http://www.galaktor.net // Author E-Mail: galaktor@gmx.de using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through t...
Java
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
Java
class CreateDocuments < ActiveRecord::Migration[5.0] def change create_table :documents do |t| t.integer :product_id, null: false t.string :type, null: false t.string :url, null: false t.timestamps end end end
Java
@font-face { font-family: 'icomoon'; src: url('../fonts/icomoon.eot'); src: url('../fonts/icomoon.eot?#iefix') format('embedded-opentype'), url('../fonts/icomoon.woff') format('woff'), url('../fonts/icomoon.ttf') format('truetype'), url('../fonts/icomoon.svg#icomoon') format('svg'); font-weight: normal; font...
Java
# -*- coding: utf-8 -*- """ Created on Fri Jun 25 16:20:12 2015 @author: Balázs Hidasi @lastmodified: Loreto Parisi (loretoparisi at gmail dot com) """ import sys import os import numpy as np import pandas as pd import datetime as dt # To redirect output to file class Logger(object): def __init__(self, filename=...
Java
# lecture-02 2018-01-29 * add buttons for handouts * add additional content related to Open GIS * add speakerdeck integration # lecture-02 2018-01-28 * add initial site with youtube video for lecture prep replication embedded # lecture-02 2018-01-02 * add `NEWS_SITE.md` for tracking updates to the course site, *bu...
Java
# Rustic Pizza A collection of pizzeria web apps, written in Rust, with each webapp using different web frameworks. * https://rust-lang.org * https://rustup.rs * https://doc.rust-lang.org/book/README.html * https://doc.rust-lang.org/std/ * http://rustbyexample.com/index.html * https://aturon.github.io/ * http://www....
Java
<?php namespace PSR2R\Sniffs\Commenting; use PHP_CodeSniffer\Files\File; use PHP_CodeSniffer\Util\Tokens; use PSR2R\Tools\AbstractSniff; use PSR2R\Tools\Traits\CommentingTrait; use PSR2R\Tools\Traits\SignatureTrait; /** * Methods always need doc blocks. * Constructor and destructor may not have one if they do not ...
Java
(function() { 'use strict'; process.env.debug_sql = true; var Class = require('ee-class') , log = require('ee-log') , assert = require('assert') , fs = require('fs') , QueryContext = require('related-query-context') , ORM ...
Java
#!/usr/bin/env ruby require 'tasklist' during '2010 September' do on '2010-09-03' do task 'Take out garbage' task 'Wash car' end on '2010-09-02' do task 'Create tasklist DSL', '09:15:56', '', 'admin', 'done' task 'Push tasklist to github', '09:34:00', '09:38:04', 'github' end end
Java
var passport = require('passport'); var WebIDStrategy = require('passport-webid').Strategy; var tokens = require('../../util/tokens'); var ids = require('../../util/id'); var console = require('../../log'); var createError = require('http-errors'); var dateUtils = require('../../util/date'); var url = require('url'); ...
Java
module AwsHelpers module ElasticLoadBalancing class CreateTag def initialize(elastic_load_balancing_client, load_balancer_name, tag_key, tag_value) @elastic_load_balancing_client = elastic_load_balancing_client @load_balancer_name = load_balancer_name @tag_key = tag_key @tag_...
Java
export declare class Console { private static quiet; private static debug; private static verbose; static Log(text: any): void; private static readonly Timestamp; static Debug(text: any): void; static Verbose(text: any): void; static Error(text: any): void; static Exit(reason: any): ...
Java
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Bundle\CoreBundle\Command; use Sylius\Component\Core\Model...
Java
import { Nibble, UInt4 } from '../types' /** * Returns a Nibble (0-15) which equals the given bits. * * @example * byte.write([1,0,1,0]) => 10 * * @param {Array} nibble 4-bit unsigned integer * @return {Number} */ export default (nibble: Nibble): UInt4 => { if (!Array.isArray(nibble) || nibble.length !== 4) ...
Java
import { Injectable } from '@angular/core'; import { DataService } from '../../../_service/dataconnect'; import { Router } from '@angular/router'; @Injectable() export class WarehouseViewService { constructor(private _dataserver: DataService, private _router: Router) { } getwarehouseTransfer(req: any) { ...
Java
{% extends "base.html" %} {% load static %} {% load template_extras %} {% block title %}Analyse{% endblock %} {% block active_class %}analyse{% endblock %} {% block extra_css %} <link href="{% static 'css/select2.min.css' %}" rel="stylesheet"> <link href="{% static 'css/jquery.nouislider.css' %}" rel="stylesheet"> <l...
Java
<!doctype html> <html class="theme-next pisces use-motion"> <head> <meta charset="UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> <meta http-equiv="Cache-Control" content="no-transform" /> <meta...
Java
using System; using Newtonsoft.Json; namespace MultiSafepay.Model { public class Transaction { [JsonProperty("transaction_id")] public string TransactionId { get; set; } [JsonProperty("payment_type")] public string PaymentType { get; set; } [JsonProperty("order_id")] ...
Java
require 'spec_helper' describe MWS::Report do describe ".method_missing" do describe ".get_report_list" do let(:valid_args){ { key: "ThisIsSigningKey", endpoint: "mws.amazonservices.com", params: { "AWSAccessKeyId" => "AccessKeyIdString", "Selle...
Java
require 'resolv' module Geocoder class IpAddress < String def loopback? valid? and !!(self == "0.0.0.0" or self.match(/\A127\./) or self == "::1") end def valid? !!((self =~ Resolv::IPv4::Regex) || (self =~ Resolv::IPv6::Regex)) end end end
Java
const chai = require('chai'); const expect = chai.expect; const ComplexArray = require('../complex-array/complex-array'); function assertArrayEquals(first, second) { const message = `${first} != ${second}`; first.forEach((item, i) => { expect(item).to.equal(second[i], message); }); } describe('Complex Ar...
Java
/* * Copyright (C) 2011 by Jakub Lekstan <kuebzky@gmail.com> * * 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, cop...
Java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package config; import interfaces.*; import java.sql.*; import java.util.logging.*; import javax.swing.*; /** * * @author Luis G *...
Java
<?php /* * This file is part of NodalFlow. * (c) Fabrice de Stefanis / https://github.com/fab2s/NodalFlow * This source file is licensed under the MIT license which you will * find in the LICENSE file or at https://opensource.org/licenses/MIT */ namespace fab2s\NodalFlow\Nodes; use fab2s\NodalFlow\Flows\Flo...
Java
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
Java
<!--Navigation bar--> <nav class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <sp...
Java