code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
import axios from 'axios';
export default axios.create({
baseURL: 'http://localhost:9000/v1/'
}); | FrederikS/das-blog-frontend | app/http/client.js | JavaScript | mit | 102 |
/*
* THIS FILE IS AUTO GENERATED FROM 'lib/lex/lexer.kep'
* DO NOT EDIT
*/
define(["require", "exports", "bennu/parse", "bennu/lang", "nu-stream/stream", "ecma-ast/token", "ecma-ast/position",
"./boolean_lexer", "./comment_lexer", "./identifier_lexer", "./line_terminator_lexer", "./null_lexer",
"./number_lexe... | mattbierner/parse-ecma | dist/lex/lexer.js | JavaScript | mit | 4,873 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using IdentityServer3.Core.Events;
using IdentityServer3.ElasticSearchEventService.Extensions;
using IdentityServer3.ElasticSearchEventService.Mapping;
using IdentityServer3.ElasticSearchEventService.Mapping.Configuration... | johnkors/IdentityServer3.Contrib.ElasticSearchEventService | source/Unittests/DefaultLogEventMapperTests.cs | C# | mit | 4,525 |
<h1><?=$title?></h1>
<h5>Ordered by Points</h5>
<?php foreach ($users as $user) : ?>
<div class="mini-profile left">
<img class="gravatar left" src="<?= $this->mzHelpers->get_gravatar($user->email, 128); ?>" alt="">
<div class="info">
... | nuvalis/GMAQ | app/view/users/list-all.tpl.php | PHP | mit | 587 |
require 'spec_helper'
require 'serializables/vector3'
describe Moon::Vector3 do
context 'Serialization' do
it 'serializes' do
src = described_class.new(12, 8, 4)
result = described_class.load(src.export)
expect(result).to eq(src)
end
end
end
| polyfox/moon-packages | spec/moon/packages/serializables/vector3_spec.rb | Ruby | mit | 274 |
<?php
/*
SQL Laboratory - Web based MySQL administration
http://projects.deepcode.net/sqllaboratory/
types.php
- list of data types
MIT-style license
2008 Calvin Lough <http://calv.in>, 2010 Steve Gricci <http://deepcode.net>
*/
$typeList[] = "varchar";
$typeList[] = "char";
$typeList[] = "text";
$typeList[] = "t... | sgricci/sqllaboratory | includes/types.php | PHP | mit | 1,775 |
#if false
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LionFire.Behaviors
{
public class Coroutine
{
}
}
#endif | jaredthirsk/LionFire.Behaviors | LionFire.Behaviors/Dependencies/Coroutines.cs | C# | mit | 208 |
package SOLID.Exercise.Logger.model.appenders;
import SOLID.Exercise.Logger.api.File;
import SOLID.Exercise.Logger.api.Layout;
import SOLID.Exercise.Logger.model.files.LogFile;
public class FileAppender extends BaseAppender {
private File file;
public FileAppender(Layout layout) {
super(layout);
... | lmarinov/Exercise-repo | Java_OOP_2021/src/SOLID/Exercise/Logger/model/appenders/FileAppender.java | Java | mit | 670 |
match x:
| it?(): true
| wcjohnson/babylon-lightscript | test/fixtures/safe-call-expression/lightscript/match-test/actual.js | JavaScript | mit | 25 |
import {Component} from 'react'
export class Greeter {
constructor (message) {
this.greeting = message;
}
greetFrom (...names) {
let suffix = names.reduce((s, n) => s + ", " + n.toUpperCase());
return "Hello, " + this.greeting + " from " + suffix;
}
greetNTimes ({name, times}) {
let greetin... | doasync/eslint-config-airbnb-standard | example.js | JavaScript | mit | 1,250 |
class CreateLists < ActiveRecord::Migration[5.1]
def change
create_table :lists do |t|
t.string :letter
t.string :tax_reference
t.string :list_type
t.date :date_list
t.timestamps
end
end
end
| vts-group/sat-lista-negra | db/migrate/20170506210330_create_lists.rb | Ruby | mit | 234 |
var groove = require('groove');
var semver = require('semver');
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var mkdirp = require('mkdirp');
var fs = require('fs');
var uuid = require('./uuid');
var path = require('path');
var Pend = require('pend');
var DedupedQueue = require('./dedup... | dwrensha/groovebasin | lib/player.js | JavaScript | mit | 88,399 |
def add_age
puts "How old are you?"
age = gets.chomp
puts "In 10 years you will be:"
puts age.to_i + 10
puts "In 20 years you will be:"
puts age.to_i + 20
puts "In 30 years you will be:"
puts age.to_i + 30
puts "In 40 years you will be:"
puts age.to_i + 40
end
add_age
| poligen/Tealeaf | prep_course/variables/age.rb | Ruby | mit | 291 |
import { stringify } from 'qs'
import _request from '@/utils/request'
import mini from '@/utils/mini'
import env from '@/config/env'
// import { modelApis, commonParams } from './model'
// import { version } from '../package.json'
let apiBaseUrl
apiBaseUrl = `${env.apiBaseUrl}`
const regHttp = /^https?/i
const isMoc... | jskit/kit-start | src/config/api.js | JavaScript | mit | 6,364 |
import m from 'mithril';
import _ from 'underscore';
import postgrest from 'mithril-postgrest';
import models from '../models';
import h from '../h';
import projectDashboardMenu from '../c/project-dashboard-menu';
import projectContributionReportHeader from '../c/project-contribution-report-header';
import projectContr... | thiagocatarse/catarse.js | src/root/projects-contribution-report.js | JavaScript | mit | 8,807 |
<?php
namespace Faker\Provider\fa_IR;
class PhoneNumber extends \Faker\Provider\PhoneNumber
{
/**
* @link https://fa.wikipedia.org/wiki/%D8%B4%D9%85%D8%A7%D8%B1%D9%87%E2%80%8C%D9%87%D8%A7%DB%8C_%D8%AA%D9%84%D9%81%D9%86_%D8%AF%D8%B1_%D8%A7%DB%8C%D8%B1%D8%A7%D9%86#.D8.AA.D9.84.D9.81.D9.86.E2.80.8C.D9.87.D8.A7.... | localheinz/Faker | src/Faker/Provider/fa_IR/PhoneNumber.php | PHP | mit | 2,348 |
version https://git-lfs.github.com/spec/v1
oid sha256:f5c198d5eef0ca0f41f87746ef8fefe819a727fcd59a6477c76b94b55d27128d
size 1730
| yogeshsaroya/new-cdnjs | ajax/libs/globalize/0.1.1/cultures/globalize.culture.da.js | JavaScript | mit | 129 |
<?php
$news = array(
array(
'created_at' => '2015-04-29 00:00:00',
'image' => 'http://fakeimg.pl/768x370/3c3c3c/',
'thumb' => 'http://fakeimg.pl/200x200/3c3c3c/',
'title' => 'Blimps to Defend Washington, D.C. Airspace',
'content' => '<p>Lorem ipsum dolor sit amet, consectetur ad... | tonimedina/crobo | app/widgets/featured_news.php | PHP | mit | 4,331 |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePlatformsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('platforms', function (Blueprint $table) {
... | g33kidd/bracket | database/migrations/2016_05_25_043614_create_platforms_table.php | PHP | mit | 703 |
package nl.ulso.sprox.json.spotify;
import nl.ulso.sprox.Node;
import java.time.LocalDate;
import java.util.List;
/**
* Sprox processor for Spotify API album data. This is a very simple processor that ignores most data.
* <p>
* This implementation creates an Artist object for each and every artist in the response... | voostindie/sprox-json | src/test/java/nl/ulso/sprox/json/spotify/AlbumFactory.java | Java | mit | 972 |
from corecat.constants import OBJECT_CODES, MODEL_VERSION
from ._sqlalchemy import Base, CoreCatBaseMixin
from ._sqlalchemy import Column, \
Integer, \
String, Text
class Project(CoreCatBaseMixin, Base):
"""Project Model class represent for the 'projects' table
which is used to store project's basic i... | DanceCats/CoreCat | corecat/models/project.py | Python | mit | 1,533 |
/**
* Angular 2 decorators and services
*/
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { environment } from 'environments/environment';
import { AppState } from './app.service';
/**
* App Component
* Top Level Component
*/
@Component({
selector: 'my-app',
encapsulation: ViewEn... | hankaibo/myangular | src/app/app.component.ts | TypeScript | mit | 1,649 |
import React from 'react';
import { TypeChooser } from 'react-stockcharts/lib/helper'
import Chart from './Chart'
import { getData } from './util';
class ChartComponent extends React.Component {
componentDidMount () {
getData().then(data => {
this.setState({ data})
})
}
render () {
if (this.st... | kevyu/ctp_demo | app/components/Chart/index.js | JavaScript | mit | 516 |
#
# Cookbook Name:: stow
# Spec:: default
#
# Copyright (c) 2015 Steven Haddox
require 'spec_helper'
describe 'stow::default' do
context 'When all attributes are default, on an unspecified platform' do
let(:chef_run) do
runner = ChefSpec::ServerRunner.new
runner.converge(described_recipe)
end
... | stevenhaddox/cookbook-stow | spec/recipes/default_spec.rb | Ruby | mit | 4,049 |
/*
* database.hpp
*
* Created on: Sep 22, 2016
* Author: dan
*/
#ifndef SRC_TURBO_BROCCOLI_DATABASE_HPP_
#define SRC_TURBO_BROCCOLI_DATABASE_HPP_
#include <boost/filesystem.hpp>
#include <turbo_broccoli/type/key.hpp>
#include <turbo_broccoli/type/value.hpp>
#include <turbo_broccoli/type/blob.hpp>
#include... | dan-42/turbo-broccoli | src/turbo_broccoli/database.hpp | C++ | mit | 6,563 |
#!/usr/bin/env python
from ansible.module_utils.hashivault import hashivault_argspec
from ansible.module_utils.hashivault import hashivault_auth_client
from ansible.module_utils.hashivault import hashivault_init
from ansible.module_utils.hashivault import hashiwrapper
ANSIBLE_METADATA = {'status': ['stableinterface'],... | TerryHowe/ansible-modules-hashivault | ansible/modules/hashivault/hashivault_approle_role_get.py | Python | mit | 1,659 |
package com.gmail.hexragon.gn4rBot.command.ai;
import com.gmail.hexragon.gn4rBot.managers.commands.CommandExecutor;
import com.gmail.hexragon.gn4rBot.managers.commands.annotations.Command;
import com.gmail.hexragon.gn4rBot.util.GnarMessage;
import com.google.code.chatterbotapi.ChatterBot;
import com.google.code.chatte... | DankBots/GN4R | src/main/java/com/gmail/hexragon/gn4rBot/command/ai/PrivateCleverbotCommand.java | Java | mit | 1,619 |
/**
* Created by Keerthikan on 29-Apr-17.
*/
export {expenseSpyFactory} from './expense-spy-factory';
export {compensationSpyFactory} from './compensation-spy-factory';
| teiler/web.teiler.io | src/test/spy-factory/index.ts | TypeScript | mit | 171 |
package logbook.data;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.... | sanaehirotaka/logbook | main/logbook/data/ScriptLoader.java | Java | mit | 3,288 |
get '/user' do
if logged_in?
redirect '/'
end
erb :create_account
end
post '/user' do
user = User.create(params[:user])
redirect '/'
end
post '/login' do
if user = User.login(params[:user])
session[:permissions] = '3'
end
redirect '/'
end
get '/logout' do
session.clear
session[:permission... | rjspencer/projectmogo_server | app/controllers/user.rb | Ruby | mit | 348 |
<?php
/*************************************************************************************
* pascal.php
* ----------
* Author: Tux (tux@inamil.cz)
* Copyright: (c) 2004 Tux (http://tux.a4.cz/), Nigel McNie (http://qbnz.com/highlighter)
* Release Version: 1.0.6
* CVS Revision Version: $Revision: 1.1 $
* Date St... | Quantisan/WholeCell | knowledgebase/lib/geshi/filter/geshi/geshi/pascal.php | PHP | mit | 4,352 |
<?php
namespace infinitydevphp\gii\migration;
use infinitydevphp\MultipleModelValidator\MultipleModelValidator;
use infinitydevphp\tableBuilder\TableBuilder;
use infinitydevphp\tableBuilder\TableBuilderTemplateMigration;
use infinitydevphp\gii\models\Field;
use yii\db\ColumnSchema;
use yii\db\Schema;
use yii\db\TableS... | infinitydevphp/infinity-gii | src/migration/Generator.php | PHP | mit | 4,539 |
#include "HotNeedleLightControl.h"
HotNeedleLightControlClass::HotNeedleLightControlClass(uint8_t background[NEOPIXEL_COUNT][COLOR_BYTES], uint8_t hotNeedleColor[COLOR_BYTES], float highlightMultiplier, bool useHighlight, uint16_t fadeTime, uint8_t framePeriod, Adafruit_NeoPixel *strip) : LightControlClass(framePeriod... | iotdesignshop/FizViz-Arduino | FizVizSketch/HotNeedleLightControl.cpp | C++ | mit | 2,285 |
import { createSelector } from 'reselect';
import * as movie from './../actions/movie';
import { Movie } from './../models';
import * as _ from 'lodash';
import { AsyncOperation, AsyncStatus, makeAsyncOp } from "./../utils";
export interface State {
entities: { [movieId: string]: Movie };
mapMovieToCinema:... | bkorobeinikov/movieapp-ionic | src/store/reducers/movie.ts | TypeScript | mit | 3,346 |
from scrapy.spiders import Spider
from scrapy.selector import Selector
from scrapy.http import HtmlResponse
from FIFAscrape.items import PlayerItem
from urlparse import urlparse, urljoin
from scrapy.http.request import Request
from scrapy.conf import settings
import random
import time
class fifaSpider(Spider... | HashirZahir/FIFA-Player-Ratings | FIFAscrape/spiders/fifa_spider.py | Python | mit | 3,458 |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$(document).ready(function(){
var div = document.getElementById('content');
var div1 = document.getElementById('leftbox');
div.style.height = document.body.clientHeight + 'px';
div1.style.height = div.st... | JulesMarcil/colocall | web/js/base.js | JavaScript | mit | 1,815 |
require 'spec_helper'
describe Webpack::Rails do
it 'has a version number' do
expect(Webpack::Rails::VERSION).not_to be nil
end
end
| goldenio/webpack-rails | spec/webpack/rails_spec.rb | Ruby | mit | 141 |
require 'optparse'
require 'pathname'
module EdifactConverter
class CommandLineParser
class << self
attr_writer :options
def options
@options ||= {}
end
def parser
@parser ||= begin
OptionParser.new do|opts|
opts.banner = "Usage: #{$COMMAND_NAME} [... | glasdam/edifact_converter | lib/edifact_converter/command_line_parser.rb | Ruby | mit | 2,042 |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See License.txt in the project root.
/*
* Copyright 2000-2010 JetBrains s.r.o.
*
* 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... | Microsoft/vso-intellij | plugin/src/com/microsoft/alm/plugin/idea/tfvc/ui/ServerPathCellEditor.java | Java | mit | 4,047 |
package org.peerbox.presenter;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.layout.Pane;
public class MainController implements INavigatable {
@FXML
private Pane mainPane;
/*
* (non-Javadoc)
*
* @see org.peerbox.presenter.INavigatable#setContent(javafx.scene.Node)
*/
@Override
... | PeerWasp/PeerWasp | peerbox/src/main/java/org/peerbox/presenter/MainController.java | Java | mit | 467 |
<?php
/*
Template Name: Full Page Width Template
*/
get_header();
while ( have_posts() ) {
the_post();
get_template_part( 'content', 'page-full' );
} // end of the loop
get_footer(); | PathwayToRecovery-IndyGiveCamp/give-camp-theme-2013 | page-full.php | PHP | mit | 200 |
print("hello!!!!") | coolralf/KaggleTraining | HELP.py | Python | mit | 18 |
/// <reference path="../definitions/mocha.d.ts"/>
/// <reference path="../definitions/node.d.ts"/>
/// <reference path="../definitions/Q.d.ts"/>
import Q = require('q');
import assert = require('assert');
import path = require('path');
import fs = require('fs');
describe('General Suite', function () {
this.timeou... | kkdawkins/vsts-tasks | Tests/L0.ts | TypeScript | mit | 23,620 |
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Gang } from '../models/gang';
import { Session } from '../models/session';
import { CREW_2_ROUTE } from '../../app/app.routes.model';
import { HttpClient } from '@angular/common/http';
@Injectable()
export class CrewServ... | manuelhuber/LostColonies | src/data/services/crew.service.ts | TypeScript | mit | 1,407 |
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2001-2011 Hartmut Kaiser
http://spirit.sourceforge.net/
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at h... | gazzlab/LSL-gazzlab-branch | liblsl/external/lslboost/spirit/include/support_standard.hpp | C++ | mit | 651 |
# 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 ... | Azure/azure-sdk-for-python | sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/aio/_sql_virtual_machine_management_client.py | Python | mit | 5,342 |
#include "NL_ImguiD3D11Renderer.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include <imgui.h>
namespace NLE
{
namespace GRAPHICS
{
struct VERTEX_CONSTANT_BUFFER
{
float mvp[4][4];
};
ImguiD3D11Renderer::ImguiD3D11Renderer() :
_vertexBuffer(nullptr),
_indexBuffer(nullptr),
_vertexShad... | AlexandrSachkov/NonLinearEngine | NLE/NL_ImguiD3D11Renderer.cpp | C++ | mit | 17,834 |
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | levfurtado/scoops | vendor/bombayworks/zendframework1/library/Zend/Pdf/Annotation/FileAttachment.php | PHP | mit | 3,689 |
/* Copyright (C) 2011-2014 Mattias Ekendahl. Used under MIT license, see full details at https://github.com/developedbyme/dbm/blob/master/LICENSE.txt */
dbm.registerClass("dbm.thirdparty.facebook.constants.EventTypes", null, function(objectFunctions, staticFunctions, ClassReference) {
//console.log("dbm.thirdparty.fac... | developedbyme/dbm | javascripts/dbm/classes/dbm/thirdparty/facebook/constants/EventTypes.js | JavaScript | mit | 1,089 |
module TweetStream
class Terminated < ::StandardError; end
class Error < ::StandardError; end
class ConnectionError < TweetStream::Error; end
# A ReconnectError is raised when the maximum number of retries has
# failed to re-establish a connection.
class ReconnectError < StandardError
attr_accessor :tim... | eerwitt/tweetstream | lib/tweetstream/error.rb | Ruby | mit | 506 |
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information.
#pragma warning disable CA1801 // Remove unused parameter
#pragma warning disable IDE0060 // Remove unused parameter
using System;
using System.Linq;
using System.Text;
na... | dotnet/roslyn-analyzers | src/TestReferenceAssembly/OtherDllClass.cs | C# | mit | 3,861 |
<?php
namespace FashionGuide\Oauth2\Exceptions;
class AppException extends \Exception
{
} | flash662/fashionguide | src/Exceptions/AppException.php | PHP | mit | 91 |
// Release 1: User Stories
// As a user, I want to be able to create a new grocery list. After that, I need to be able to add an item with a quantity to the list, remove an item, and update the quantities if they change. I need a way to print out the list in a format that is very readable.
// Release 2: Pseudocode
// ... | taylordaug/phase-0 | week-9/review.js | JavaScript | mit | 3,848 |
Dagaz.Controller.persistense = "setup";
Dagaz.Model.WIDTH = 8;
Dagaz.Model.HEIGHT = 8;
ZRF = {
JUMP: 0,
IF: 1,
FORK: 2,
FUNCTION: 3,
IN_ZONE: 4,
FLAG: 5,
SET_FLAG: 6,
POS_FLAG: 7,
SET_POS_FLAG: 8,
ATTR:... | GlukKazan/GlukKazan.github.io | checkmate/scripts/visavis-chess.js | JavaScript | mit | 18,337 |
namespace InfluxData.Net.InfluxDb.Models.Responses
{
public class User
{
/// <summary>
/// User name.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Whether or not the user is an administrator.
/// </summary>
public bool IsAdmi... | pootzko/InfluxData.Net | InfluxData.Net.InfluxDb/Models/Responses/User.cs | C# | mit | 346 |
package id3
import (
"bytes"
"errors"
"io"
"time"
)
var timestampFormats = []string{
"2006-01-02T15:04:05",
"2006-01-02T15:04",
"2006-01-02T15",
"2006-01-02",
"2006-01",
"2006",
}
func parseTime(timeStr string) (time.Time, error) {
for i := range timestampFormats {
t, err := time.Parse(timestampFormats[... | cjlucas/go-audiotag | src/github.com/cjlucas/audiotag/id3/util.go | GO | mit | 649 |
using Argolis.Hydra.Annotations;
using Argolis.Models;
using Vocab;
namespace TestHydraApi
{
public class IssueFilter : ITemplateParameters<Issue>
{
[Property(Schema.title)]
public string Title { get; set; }
[Property(Schema.BaseUri + "year")]
[Range(Xsd.integer)]
publ... | wikibus/Argolis | src/Examples/TestHydraApi/IssueFilter.cs | C# | mit | 356 |
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit037b77112e3f60b3fb10492299961fe0::getLoader();
| perzy/slim-demo | vendor/autoload.php | PHP | mit | 183 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using Office = Microsoft.Office.Core;
// TODO: Follow these steps to enable the Ribbon (XML) item:
// 1: Copy the following code block into the ThisAd... | dchanko/Badger | BadgerAddin2010/Ribbon.cs | C# | mit | 2,794 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InTheHand.Net;
using InTheHand.Net.Sockets;
using InTheHand.Net.Bluetooth;
namespace NXTLib
{
public static class Utils
{
public static string AddressByte2String(byte[] address, bool withcolons)
{
... | smo-key/NXTLib | nxtlib/src/Utils.cs | C# | mit | 1,877 |
<?php
/**
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
namespace Clash82\EzPlatformStudioTipsBlockBundle\Installer;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\I... | omniproject/ezstudio-tips-block | bundle/Installer/ContentTypeInstaller.php | PHP | mit | 5,989 |
# frankie - a plugin for sinatra that integrates with the facebooker gem
#
# written by Ron Evans (http://www.deadprogrammersociety.com)
#
# based on merb_facebooker (http://github.com/vanpelt/merb_facebooker)
# and the Rails classes in Facebooker (http://facebooker.rubyforge.org/) from Mike Mangino, Shane Vitarana, &... | jsmestad/frankie | lib/frankie.rb | Ruby | mit | 6,584 |
package tutorialHorizon.arrays;
/**
* Created by archithrapaka on 7/4/17.
*/
public class InsertionSort {
public static void insertionSort(int[] items, int n) {
int i, j;
for (i = 1; i < n; i++) {
j = i;
while (j > 0 && (items[j] < items[j - 1])) {
swap(i... | arapaka/algorithms-datastructures | algorithms/src/main/java/tutorialHorizon/arrays/InsertionSort.java | Java | mit | 813 |
import { createContext } from 'react';
export const defaultApiStatus = {
offline: false,
apiUnreachable: '',
appVersionBad: false,
};
export default createContext(defaultApiStatus);
| ProtonMail/WebClient | packages/components/containers/api/apiStatusContext.ts | TypeScript | mit | 196 |
from flask import Blueprint, request, render_template
from ..load import processing_results
from ..abbr import get_abbr_map
abbr_map = get_abbr_map()
liner_mod = Blueprint('liner', __name__, template_folder='templates', static_folder='static')
@liner_mod.route('/liner', methods=['GET', 'POST'])
def liner():
if r... | griimick/feature-mlsite | app/liner/views.py | Python | mit | 1,108 |
# 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 ... | lmazuel/azure-sdk-for-python | azure-mgmt-web/azure/mgmt/web/models/dimension.py | Python | mit | 1,562 |
/*
* 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... | SpongePowered/SpongeCommon | src/main/java/org/spongepowered/common/mixin/api/mcp/tileentity/TileEntityDropperMixin_API.java | Java | mit | 1,688 |
var fs = require('fs')
var d3 = require('d3')
var request = require('request')
var cheerio = require('cheerio')
var queue = require('queue-async')
var _ = require('underscore')
var glob = require("glob")
var games = []
glob.sync(__dirname + "/raw-series/*").forEach(scrape)
function scrape(dir, i){
var series = d... | 1wheel/scraping | final-games/downloadGames.js | JavaScript | mit | 1,383 |
<?php
class Neostrada
{
const API_HOST = 'https://api.neostrada.nl/';
private $_key;
private $_secret;
public function __construct($key, $secret)
{
$this->_key = $key;
$this->_secret = $secret;
}
public function domain($domain)
{
return new Neostrada_Domain($this, $domain);
}
public function save(N... | justim/neostrada-api-client | src/Neostrada.php | PHP | mit | 2,315 |
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Department extends Model
{
protected $fillable =['name'];
}
| mucyomiller/workloads | app/Department.php | PHP | mit | 134 |
module Fae
module BaseModelConcern
extend ActiveSupport::Concern
require 'csv'
attr_accessor :filter
included do
include Fae::Trackable if Fae.track_changes
include Fae::Sortable
end
def fae_display_field
# override this method in your model
end
def fae_nested_par... | wearefine/fae | app/models/concerns/fae/base_model_concern.rb | Ruby | mit | 2,926 |
package biz.golek.whattodofordinner.business.contract.presenters;
import biz.golek.whattodofordinner.business.contract.entities.Dinner;
/**
* Created by Bartosz Gołek on 2016-02-10.
*/
public interface EditDinnerPresenter {
void Show(Dinner dinner);
}
| bartoszgolek/whattodofordinner | app/src/main/java/biz/golek/whattodofordinner/business/contract/presenters/EditDinnerPresenter.java | Java | mit | 261 |
package main
import (
"github.com/weynsee/go-phrase/cli"
"log"
"os"
)
func main() {
args := os.Args[1:]
c := cli.NewCLI("1.0.0", args)
exitStatus, err := c.Run()
if err != nil {
log.Println(err)
}
os.Exit(exitStatus)
}
| weynsee/go-phrase | main.go | GO | mit | 234 |
version https://git-lfs.github.com/spec/v1
oid sha256:2e4cfe75feb71c39771595f8dea4f59e216650e0454f3f56a2a5b38a062b94cf
size 1360
| yogeshsaroya/new-cdnjs | ajax/libs/openlayers/2.12/lib/OpenLayers/Format/XLS/v1_1_0.js | JavaScript | mit | 129 |
require 'spec_helper'
describe ZK::Threadpool do
before do
@threadpool = ZK::Threadpool.new
end
after do
@threadpool.shutdown
end
describe :new do
it %[should be running] do
@threadpool.should be_running
end
it %[should use the default size] do
@threadpool.size.should == ZK... | rickypai/zk | spec/zk/threadpool_spec.rb | Ruby | mit | 3,568 |
<div class="col-xs-7">
<div class="box">
<div class="box-header">
<h3 class="box-title">Order Table</h3>
<div class="box-tools">
<div class="input-group input-group-sm" style="width: 150px;">
<input type="search" class="light-table-filter form-control pull-right" data-table="order-t... | NamBker/web_laptop | fuel/app/views/admin/order/index.php | PHP | mit | 2,776 |
package multiwallet
import (
"errors"
"strings"
"time"
eth "github.com/OpenBazaar/go-ethwallet/wallet"
"github.com/OpenBazaar/multiwallet/bitcoin"
"github.com/OpenBazaar/multiwallet/bitcoincash"
"github.com/OpenBazaar/multiwallet/client/blockbook"
"github.com/OpenBazaar/multiwallet/config"
"github.com/OpenBa... | OpenBazaar/openbazaar-go | vendor/github.com/OpenBazaar/multiwallet/multiwallet.go | GO | mit | 3,469 |
// Copyright (c) 2012 Pieter Wuille
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "addrman.h"
#include "hash.h"
#include "serialize.h"
#include "streams.h"
int CAddrInfo::GetTriedBucket(const uint256& nKey) const
{
... | BlockchainTechLLC/3dcoin | src/addrman.cpp | C++ | mit | 15,655 |
import asyncio
import discord
import datetime
import pytz
from discord.ext import commands
from Cogs import FuzzySearch
from Cogs import Settings
from Cogs import DisplayName
from Cogs import Message
from Cogs import Nullify
class Time:
# Init with the bot reference, and a reference to the s... | TheMasterGhost/CorpBot | Cogs/Time.py | Python | mit | 8,457 |
/*
* @param parseObject [ParseObject]
* @return [Object]
* */
export const convertBrand = (parseObject) => {
const ret = {};
const object = parseObject.toJSON();
ret.id = object.objectId;
ret.name = object.name;
ret.description = object.description;
ret.images = (object.images || []).map(image => ({ id:... | ihenvyr/react-parse | src/utils.js | JavaScript | mit | 934 |
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d;
int sum=1080;
while(cin>>a>>b>>c>>d)
{
if(a==0&&b==0&&c==0&&d==0)
break;
if(a>b)
{
sum=(a-b)*9+sum;
}
else if(a<b)
{
sum=((40-b)+a)... | w181496/OJ | Zerojudge/c006.cpp | C++ | mit | 711 |
/* */
"format cjs";
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.1-master-342ee53
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.toast
* @description
* Toast
*/
MdToastDirective['$inject'] = ["$mdToa... | andream91/fusion-form | app/jspm_packages/github/angular/bower-material@master/modules/js/toast/toast.js | JavaScript | mit | 18,003 |
<?php
namespace Dvsa\Mot\Frontend\SecurityCardModule\CardOrder\Controller;
use Core\Controller\AbstractDvsaActionController;
use Dvsa\Mot\Frontend\AuthenticationModule\Model\Identity;
use Dvsa\Mot\Frontend\SecurityCardModule\CardOrder\Service\OrderNewSecurityCardSessionService;
use DvsaCommon\Constants\FeatureToggle;... | dvsa/mot | mot-web-frontend/module/SecurityCardModule/src/CardOrder/Controller/CardOrderConfirmationController.php | PHP | mit | 2,570 |
/* SaveFileController
*
* Version 1.0
*
* November 13, 2017
*
* Copyright (c) 2017 Cup Of Java. All rights reserved.
*/
package com.cmput301f17t11.cupofjava.Controllers;
import android.content.Context;
import com.cmput301f17t11.cupofjava.Models.Habit;
import com.cmput301f17t11.cupofjava.Models.HabitEvent;
imp... | CMPUT301F17T11/CupOfJava | app/src/main/java/com/cmput301f17t11/cupofjava/Controllers/SaveFileController.java | Java | mit | 8,104 |
namespace UCloudSDK.Models
{
/// <summary>
/// 获取流量信息
/// <para>
/// http://docs.ucloud.cn/api/ucdn/get_ucdn_traffic.html
/// </para>
/// </summary>
public partial class GetUcdnTrafficRequest
{
/// <summary>
/// 默认Action名称
/// </summary>
privat... | icyflash/ucloud-csharp-sdk | UCloudSDK/Models/UCDN/GetUcdnTrafficRequest.cs | C# | mit | 808 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Progress extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this contr... | primasalama/simoniks2 | application/controllers/Progress.php | PHP | mit | 6,302 |
require "spec_helper"
module Smsru
describe API do
shared_context "shared configuration", need_values: 'configuration' do
before :each do
Smsru.configure do |conf|
conf.api_id = 'your-api-id'
conf.from = 'sender-name'
conf.test = test
conf.format = format
... | alekseenkoss77/smsru | spec/lib/smsru/api_spec.rb | Ruby | mit | 3,612 |
import { expect } from 'chai';
import buildUriTemplate from '../src/uri-template';
describe('URI Template Handler', () => {
context('when there are path object parameters', () => {
context('when the path object parameters are not query parameters', () => {
const basePath = '/api';
const href = '/pet... | apiaryio/fury-adapter-swagger | test/uri-template.js | JavaScript | mit | 7,065 |
let Demo1 = require('./components/demo1.js');
document.body.appendChild(Demo1()); | zjx1195688876/learn-react | src/webapp/main.js | JavaScript | mit | 82 |
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Demo05")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration(""... | HungryAnt/AntWpfDemos | AntWpfDemos/Demo05/Properties/AssemblyInfo.cs | C# | mit | 2,195 |
package doit.study.droid.fragments;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
i... | JaeW/dodroid | app/src/main/java/doit/study/droid/fragments/DislikeDialogFragment.java | Java | mit | 3,105 |
<?php
namespace Zycon42\Security\Application;
use Nette;
use Nette\Application\Request;
use Nette\Reflection\ClassType;
use Nette\Reflection\Method;
use Symfony\Component\ExpressionLanguage\Expression;
class PresenterRequirementsChecker extends Nette\Object {
/**
* @var ExpressionEvaluator
*/
priv... | Zycon42/Security | lib/Zycon42/Security/Application/PresenterRequirementsChecker.php | PHP | mit | 2,781 |
<?php
namespace App\Http\Middleware;
use Input, Closure, Response, User;
class CheckClientKey {
public function handle($request, Closure $next)
{
$input = Input::all();
$output = array();
if(!isset($input['key'])){
$output['error'] = 'API key required';
return Response::json($output, ... | tokenly/token-slot | app/Http/Middleware/CheckClientKey.php | PHP | mit | 696 |
#region References
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using Speedy;
#endregion
namespace Scribe.Data.Entities
{
public class Page : ModifiableEntity
{
#region Constructors
[SuppressMessage("ReSharper", "VirtualMemberCallInContructor"... | BobbyCannon/Scribe | Scribe.Data/Entities/Page.cs | C# | mit | 889 |
var Handler, MiniEventEmitter;
Handler = require("./handler");
MiniEventEmitter = (function() {
function MiniEventEmitter(obj) {
var handler;
handler = new Handler(this, obj);
this.on = handler.on;
this.off = handler.off;
this.emit = handler.emit;
this.emitIf = handler.emitIf;
this.trigg... | hawkerboy7/mini-event-emitter | build/js/app.js | JavaScript | mit | 522 |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import {connect} from 'react... | hmeinertrita/MyPlanetGirlGuides | src/routes/search/Search.js | JavaScript | mit | 1,083 |
Given(/^I have an Auton that has two steps, first step scheduling the next step$/) do
class ScheduleSecondStepAuton < Nestene::Auton
def first
context.schedule_step(:second)
end
def second
'ok'
end
attr_accessor :context
attribute foo: Fixnum
end
@auton_type="ScheduleSecond... | draganm/nestene | features/step_definitions/schedule_steps_steps.rb | Ruby | mit | 1,992 |
using MineLib.Core;
using MineLib.Core.Data;
using MineLib.Core.IO;
using ProtocolClassic.Data;
namespace ProtocolClassic.Packets.Server
{
public struct LevelFinalizePacket : IPacketWithSize
{
public Position Coordinates;
public byte ID { get { return 0x04; } }
public short Size { get... | MineLib/ProtocolClassic | Packets/Server/LevelFinalize.cs | C# | mit | 812 |
#ifndef IDUCK_HPP_124b1b04_74d3_41ae_b7ce_2a0bea79f1c7
#define IDUCK_HPP_124b1b04_74d3_41ae_b7ce_2a0bea79f1c7
#include "../strategy/IFly.hpp"
/**
\interface IDuck
Interface for duck. It can fly, quack and rotate right.
*/
class IDuck
{
public:
virtual Course getCourse() const = 0;
virtual int getDistan... | PS-Group/compiler-theory-samples | interpreter/IDuckPro_AST/src/duck/IDuck.hpp | C++ | mit | 553 |
require 'cred_hubble/resources/credential'
module CredHubble
module Resources
class UserValue
include Virtus.model
attribute :username, String
attribute :password, String
attribute :password_hash, String
def to_json(options = {})
attributes.to_json(options)
end
... | tcdowney/cred_hubble | lib/cred_hubble/resources/user_credential.rb | Ruby | mit | 767 |