code stringlengths 4 1.01M | language stringclasses 2
values |
|---|---|
// 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... | Java |
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... | Java |
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... | Java |
/// <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 {... | Java |
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... | Java |
/*
*= require ecm/tags/backend/application
*/
| Java |
{{ 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... | Java |
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... | Java |
export default function() {
var links = [
{
icon: "fa-sign-in",
title: "Login",
url: "/login"
},
{
icon: "fa-dashboard",
title: "Dashboard",
url: "/"
},
{
icon: "fa-calendar",
titl... | Java |
<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>
| Java |
@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... | Java |
<?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.
*
... | Java |
/*
--------------------------------------------------------------------------------
Based on class found at: http://ai.stanford.edu/~gal/Code/FindMotifs/
--------------------------------------------------------------------------------
*/
#include "Platform/StableHeaders.h"
#include "Util/Helper/ConfigFile.h"
... | Java |
# 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)
... | Java |
.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... | Java |
// 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 ... | Java |
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... | Java |
<?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... | Java |
<?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... | Java |
<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;
}
... | Java |
using System;
using Xamarin.Forms;
namespace EmployeeApp
{
public partial class ClaimDetailPage : ContentPage
{
private ClaimViewModel model;
public ClaimDetailPage(ClaimViewModel cl)
{
InitializeComponent();
model = cl;
BindingContext =... | Java |
<!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>
... | Java |
/*
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... | Java |
package cellsociety_team05;
public class SimulationException extends Exception {
public SimulationException(String s) {
super(s);
}
}
| Java |
PhotoAlbums.Router.map(function() {
this.resource('login');
this.resource('album', {path: '/:album_id'});
this.resource('photo', {path: 'photos/:photo_id'});
});
| Java |
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... | Java |
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... | Java |
<?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... | Java |
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... | Java |
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... | Java |
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:"... | Java |
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... | Java |
--[[
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... | Java |
# 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 = ... | Java |
/**
* 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
{... | Java |
# 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... | Java |
<!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=... | Java |
# 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... | Java |
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... | Java |
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... | Java |
<?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\... | Java |
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... | Java |
'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... | Java |
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... | Java |
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#{... | Java |
/**
* 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(',');
}... | Java |
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... | Java |
<!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>
... | Java |
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... | Java |
'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)... | Java |
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.... | Java |
(function(){
'use strict';
angular.module('GamemasterApp')
.controller('DashboardCtrl', function ($scope, $timeout, $mdSidenav, $http) {
$scope.users = ['Fabio', 'Leonardo', 'Thomas', 'Gabriele', 'Fabrizio', 'John', 'Luis', 'Kate', 'Max'];
})
})(); | Java |
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! ... | Java |
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, ... | Java |
const express = require('express');
const router = express.Router();
const routes = require('./routes')(router);
module.exports = router;
| Java |
package simulation.generators;
import simulation.data.PetrolStation;
import simulation.data.Road;
/**
* Created by user on 03.06.2017.
*/
public class PetrolStationGenerator {
private Road road;
private int minimalDistanceBetweenStations = 50;
private int maximumDistanceBetweenStations = 200;
priva... | Java |
var HDWalletProvider = require("truffle-hdwallet-provider");
var mnemonic = "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";
module.exports = {
networks: {
development: {
provider: function () {
return new HDWalletProvider(mnemonic, "http://127.0.0.1... | Java |
<!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... | Java |
# What is fakeLoader.js
fakeLoader.js is a lightweight jQuery plugin that helps you create an animated spinner with a fullscreen loading mask to simulate the page preloading effect.
Check out the demo [http://joaopereirawd.github.io/fakeLoader.js/](http://joaopereirawd.github.io/fakeLoader.js)
## Current Version
`V... | Java |
<!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"/>
<meta name="generator" con... | Java |
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var HtmlWebpackPlugin = require("html-webpack-plugin");
var path = require("path");
var webpack = require("webpack");
var projectTemplatesRoot = "../../ppb/templates/";
module.exports = {
context: path.resolve(__dirname, "src"),
entry: {
a... | Java |
var h = require('hyperscript')
var human = require('human-time')
exports.needs = {}
exports.gives = 'message_meta'
exports.create = function () {
function updateTimestampEl(el) {
el.firstChild.nodeValue = human(new Date(el.timestamp))
return el
}
setInterval(function () {
var els = [].slice.call(... | Java |
import { HookContext, Application, createContext, getServiceOptions } from '@feathersjs/feathers';
import { NotFound, MethodNotAllowed, BadRequest } from '@feathersjs/errors';
import { createDebug } from '@feathersjs/commons';
import isEqual from 'lodash/isEqual';
import { CombinedChannel } from '../channels/channel/co... | Java |
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import <CoreData/NSSQLIntermediate.h>
// Not exported
@interface NSSQLLimitIntermediate : NSSQLIntermediate
{
unsigned long long _limit;
}
- (id)generateSQLStringInContext... | Java |
version https://git-lfs.github.com/spec/v1
oid sha256:e40a08695f05163cfb0eaeeef4588fcfad55a6576cfadfb079505495605beb33
size 27133
| Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Stranger Things Wall</title>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<img src="img/vacio.gif" al... | Java |
<?php
class Thread extends Eloquent {
public static $table = 'threads';
public static $timestamps = true;
public function replies()
{
return $this->has_many('Reply');
}
} | Java |
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>Blog | Guilherme Matheus Costa</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link href="/css/essentials.min.css" rel="stylesheet" type="text/css"/>
<meta proper... | Java |
#!/usr/bin/env python
from hdf5handler import HDF5Handler
handler = HDF5Handler('mydata.hdf5')
handler.open()
for i in range(100):
handler.put(i, 'numbers')
handler.close()
| Java |
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Famous Industries Inc.
*
* 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... | Java |
/*
* Copyright 2016 Christoph Brill <egore911@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, copy, ... | Java |
var map;
var bounds;
var markers = {};
var cluster_polygons = {};
var zoomTimeout;
var cluster_center_overlay;
var white_overlay;
var overlay_opacity = 50;
var OPACITY_MAX_PIXELS = 57;
var active_cluster_poly;
var marker_image;
var center_marker;
var cluster_center_marker_icon;
function createMap() {
bounds = new ... | Java |
#include "sendcoinsdialog.h"
#include "ui_sendcoinsdialog.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "addressbookpage.h"
#include "optionsmodel.h"
#include "sendcoinsentry.h"
#include "guiutil.h"
#include "askpassphrasedialog.h"
#include "base58.h"
#include <QMessageBox>
#include <QLocale>
#include... | Java |
{!!
Form::select(
'routes[]',
$allRoutes,
(isset($routes) ? array_keys($routes) : []),
array(
'class' => 'form-control select2',
'placeholder' => 'Enter Routes',
'multiple' => true
)
)
!!}
| Java |
<?php
namespace Aquatic;
use Aquatic\FedEx\Contract\Address;
use Aquatic\FedEx\Contract\Shipment;
use Aquatic\FedEx\Response\Contract as ResponseContract;
use Aquatic\FedEx\Request\ValidateAddress as ValidateAddressRequest;
use Aquatic\FedEx\Response\ValidateAddress as ValidateAddressResponse;
use Aquatic\FedEx\Reque... | Java |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Pe... | Java |
@charset "utf-8";
/* CSS Document */
/* -------------------------------------------------------------------------- */
/* BASE AD - typically, we do not mess with this section
/* -------------------------------------------------------------------------- */
body, body * {
vertical-align: baseline;
border: 0;
... | Java |
<article class="home_single_post gallery_post_type" typeof="BlogPosting">
{{ partial "post/image_area.html" . }}
<div class="post_content_area">
<div class="row">
<div class="col-xs-12 col-sm-8 col-md-8 col-lg-8 col-xs-offset-0 col-sm-offset-2 col-md-offset-2 col-lg-offset-2">
... | Java |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { MultiSelect } from '../../src'
class MultiSelectWithStringValues extends Component {
constructor(props) {
super(props)
this.state = {
value: []
}
}
handleChange = (event) => {
const { valueKey } = this.p... | Java |
/* util/operators.hpp
*
* Copyright (C) 2007 Antonio Di Monaco
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#ifndef __OPERATORS_HPP__
#define __OPERATORS_HPP__
template< typename T >
struct EqualComparable
{
friend ... | Java |
"""
[2015-07-13] Challenge #223 [Easy] Garland words
https://www.reddit.com/r/dailyprogrammer/comments/3d4fwj/20150713_challenge_223_easy_garland_words/
# Description
A [_garland word_](http://blog.vivekhaldar.com/post/89763722591/garland-words) is one that starts and ends with the
same N letters in the same order, f... | Java |
/**
*
* Licensed Property to China UnionPay Co., Ltd.
*
* (C) Copyright of China UnionPay Co., Ltd. 2010
* All Rights Reserved.
*
*
* Modification History:
* =============================================================================
* Author Date Description
* ------------ -----... | Java |
require 'faraday'
require 'simple_ratings/foursquare/meta/venue'
module SimpleRatings
class Foursquare < Faraday::Connection
def initialize
super(url: 'https://api.foursquare.com/v2/')
end
def default_params
{
client_id: ENV['FOURSQUARE_CLIENT_ID'],
client_secret: ENV['FOURSQ... | Java |
//
// Copyright (C) 2006-2008 Mateusz Loskot
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef SOCI_PLATFORM_H_INCLUDED
#define SOCI_PLATFORM_H_INCLUDED
#if defined(_MSC_VER) || defined(__MIN... | Java |
using System;
using System.Text;
namespace ExifLibrary
{
/// <summary>
/// Represents an enumerated value.
/// </summary>
public class ExifEnumProperty<T> : ExifProperty
{
protected T mValue;
protected bool mIsBitField;
protected override object _Value { get { return Value;... | Java |
using System.Collections.Generic;
using System.Threading.Tasks;
using MongoDB.Bson;
using MongoDB.Driver;
using ShowFinder.Models;
namespace ShowFinder.Repositories.Interfaces
{
public interface IMongoRepository
{
IMongoDatabase Database(string name);
Task<BsonDocument> GetUserProfi... | Java |
<!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"/>
<meta name="generator" con... | Java |
//
// BABAudioPlaylist.h
// Pods
//
// Created by Bryn Bodayle on May/12/2015.
//
//
#import <Foundation/Foundation.h>
@interface BABAudioPlaylist : NSObject
+ (instancetype)audioPlaylistWithArray:(NSArray *)array;
- (instancetype)initWithArray:(NSArray *)array;
- (id)objectAtIndexedSubscript:(NSUInteger)idx;
-... | Java |
/*!
* Module dependencies.
*/
var util = require('util'),
moment = require('moment'),
super_ = require('../Type');
/**
* Date FieldType Constructor
* @extends Field
* @api public
*/
function datearray(list, path, options) {
this._nativeType = [Date];
this._defaultSize = 'medium';
this._underscoreMethods... | Java |
# -*- coding: utf-8 -*-
require "em-websocket"
require "eventmachine-tail"
module Tailer
# Extends FileTail to push data tailed to an EM::Channel. All open websockets
# subscribe to a channel for the request stack and this pushes the data to
# all of them at once.
class StackTail < EventMachine::FileTail
d... | Java |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_05) on Thu Jul 03 13:49:54 PDT 2008 -->
<TITLE>
edu.sdsc.inca
</TITLE>
<META NAME="keywords" CONTENT="edu.sdsc.inca package">
<LINK REL ="styleshee... | Java |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace DotNetty.Transport.Channels.Sockets
{
using System;
using System.Diagnostics.Contracts;
using System.Net;
using System.Net.NetworkInformation... | Java |
/*
* Search first occurence of a particular string in a given text [Finite Automata]
* Author: Progyan Bhattacharya <progyanb@acm.org>
* Repo: Design-And-Analysis-of-Algorithm [MIT LICENSE]
*/
#include "Search.h"
static int NextState(int m, char* pattern, int state, int symbol) {
if (state < m && pattern[stat... | Java |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
class Video
include Claire::Client::Item
end
describe Claire::Client::Item do
#@session.should_receive(:post).with("url", "data", "headers")
#@session = mock("session")
before do
Claire::Client.stub(:get).with('videos/id').and_return xml :ite... | Java |
PathMission
===========
### Prefix: pm
------------------------------------------------------------------------
`Enum`
PathMissionDisplayType
----------------------
- **Soldier\_Assassination**
- **Soldier\_Defend**
- **Soldier\_Demolition**
- **Soldier\_FirstStrike**
- **Soldier\_Holdout... | Java |
<?php
namespace Zanson\SMParser\Traits\Song;
use Zanson\SMParser\SMException;
trait Banner
{
public $banner = '';
/**
* @return string
*/
public function getBanner() {
return $this->banner;
}
/**
* @param string $banner
*
* @return $this
* @throws SMExceptio... | Java |
if ( !window.console ) window.console = { log:function(){} };
jQuery(document).ready(function($) {
console.log('Keep being awesome.');
}); | Java |
package parser
import (
"monkey/ast"
"monkey/token"
)
func (p *Parser) parseStringLiteralExpression() ast.Expression {
return &ast.StringLiteral{Token: p.curToken, Value: p.curToken.Literal}
}
func (p *Parser) parseInterpolatedString() ast.Expression {
is := &ast.InterpolatedString{Token: p.curToken, Value: p.cu... | Java |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Timers;
using System.Diagnostics;
namespace ForumHelper
{
public partial class ToastForm : Form
{
... | Java |
<?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2018 Spomky-Labs
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
use Base64Url\Base64Url;
use Jose\Decrypter;
use Jose\Encrypter;
use Jose\Factory\JWEFactory;
use Jose\Loader;
u... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.