repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
seuffert/rclone | vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2017-07-01/devices/iothubresource.go | 74066 | package devices
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// 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
//
// Unl... | mit |
seuffert/rclone | vendor/github.com/Azure/azure-sdk-for-go/services/preview/network/mgmt/2015-05-01-preview/network/publicipaddresses.go | 17872 | package network
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// 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
//
// Unl... | mit |
zuazo-forks/rubocop | spec/rubocop/cop/lint/block_alignment_spec.rb | 17585 | # encoding: utf-8
require 'spec_helper'
describe RuboCop::Cop::Lint::BlockAlignment do
subject(:cop) { described_class.new }
context 'when the block has no arguments' do
it 'registers an offense for mismatched block end' do
inspect_source(cop,
['test do',
' e... | mit |
kilikkuo/py_simple_host_target | simple_host_target/simple_host_target/client.py | 1956 | import os
import sys
import socket
PACKAGE_PARENT = '..'
SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__))))
sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, PACKAGE_PARENT)))
from simple_host_target.definition import OP_HT_DATA_BEGIN, OP_HT_DATA_END,\
... | mit |
marcusdarmstrong/cloth-io | src/html-handler.js | 989 | // @flow
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { createStore } from 'redux';
import layout from './layout';
import App from './components/app';
import reducer from './reducer';
import onError from './util/on-error';
import { Map as map } from 'immutable';
const namespaces = ... | mit |
vulcansteel/autorest | AutoRest/Generators/CSharp/Azure.CSharp.Tests/Expected/AcceptanceTests/HeadExceptions/HeadExceptionOperationsExtensions.cs | 4272 | // 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 cause incorrect behavior and will be lost if the code is
// regenerated.
namespa... | mit |
eberson/chunker-florestal | rule-extraction/src/main/java/br/usp/nlp/chunk/rule/extraction/identifiers/GramaticalCategory.java | 899 | package br.usp.nlp.chunk.rule.extraction.identifiers;
import static br.usp.nlp.chunk.rule.extraction.Constants.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
class GramaticalCategory implements ValueRecognizer{
@Override
public boolean apply(String content) {
return Pattern.matches(REGEX_GRA... | mit |
Phyrra/javasql | src/main/java/ch/sama/sql/dbo/generator/ObjectGenerator.java | 5702 | package ch.sama.sql.dbo.generator;
import ch.sama.sql.dbo.Field;
import ch.sama.sql.dbo.IType;
import ch.sama.sql.dbo.Table;
import ch.sama.sql.dbo.schema.ISchema;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import... | mit |
selvasingh/azure-sdk-for-java | sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/OperationStatusesInner.java | 7065 | /**
* 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.
*/
package com.microsoft.azure.management.loganalytics.v2020_08_01.implementation;
import ... | mit |
quteron/algorithmify | algorithms/sorting/comparison-sort/bubble-sort/bubble-sort.js | 3644 | /*
* Implementation of the Bubble Sort algorithm using JavaScript programming language.
* Copyright (c) 2016 Quteron
*
* 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,
... | mit |
choodur/aviator | test/aviator/openstack/compute/v2/admin/bulk_delete_floating_ips_test.rb | 2540 | require 'test_helper'
class Aviator::Test
describe 'aviator/openstack/compute/v2/admin/bulk_delete_floating_ips' do
def create_request(session_data = get_session_data, &block)
block ||= lambda do |p|
p[:ip_range] = '192.168.6.56/29'
end
klass.new(session_data, &block)
end
d... | mit |
webforge-labs/minimock | bootstrap.php | 455 | <?php
use Psc\Boot\BootLoader;
/**
* Bootstrap and Autoload whole application
*
* you can use this file to bootstrap for tests or bootstrap for scripts / others
*/
$ds = DIRECTORY_SEPARATOR;
require_once __DIR__.$ds.'lib'.$ds.'package.boot.php';
$bootLoader = new BootLoader(__DIR__, 'Webforge\Setup\BootContainer... | mit |
dcastro/JSendWebApi | tests/JSend.WebApi.Tests/JSendAuthorizeAttributeTests.cs | 3042 | using System;
using System.Net;
using System.Threading.Tasks;
using System.Web.Http.Controllers;
using FluentAssertions;
using JSend.WebApi.Properties;
using JSend.WebApi.Responses;
using JSend.WebApi.Tests.FixtureCustomizations;
using Newtonsoft.Json;
using Xunit;
namespace JSend.WebApi.Tests
{
public class JSen... | mit |
Fafa87/EP | ep/evalplatform/gather_results.py | 14971 | import shutil
from PIL import Image
from ep.evalplatform.create_report import create_report, create_sensible_report
from ep.evalplatform.plotting import Plotter
from ep.evalplatform.utils import *
images_sufixes = [SEGPLOT_SUFFIX, TRACKPLOT_SUFFIX]
SUMMARY_GNUPLOT_FILE = "plot_summary.plt"
terminal_type = "png"
de... | mit |
dchq/dchq-core | app/models/store.rb | 17809 | class Store < ActiveRecord::Base
has_paper_trail
include CurrentUserInfo
belongs_to :company
belongs_to :currency
has_and_belongs_to_many :users
has_many :certification_levels
has_many :certification_level_costs
has_many :payment_methods
has_many :tax_rates
has_many :commission_rates
has_many :... | mit |
duhaly/MVC6.Template | test/MvcTemplate.Tests/Unit/Components/Mvc/Adapters/MaxValueAdapterTests.cs | 1358 | using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.ModelBinding.Validation;
using MvcTemplate.Components.Mvc;
using MvcTemplate.Tests.Objects;
using System;
using System.Linq;
using Xunit;
namespace MvcTemplate.Tests.Unit.Components.Mvc
{
public class MaxValueAdapterTests
{
#region Me... | mit |
kvnbai/revtrial | dockersymfonytrial/symfonytrial/app/DoctrineMigrations/Version20170408072031_alter_user_table_for_authentication_listener.php | 1379 | <?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20170408072031_alter_user_table_for_authentication_listener extends AbstractMigration
{
/**
* @param Schema ... | mit |
Glank/Java-Games | Frogger/src/FroggerLevel.java | 493 | public class FroggerLevel implements java.io.Serializable
{
//public static final FroggerLevel TEST = new FroggerLevel(new int[]{1,1,1}, new String[]{"RRR LLL BB MM ","RRR LLL BB MM ","RRR LLL BB MM "});
private int[] speeds;
private String[] patterns;
public FroggerLevel(int[] speeds, String[] pat... | mit |
sallyyoo/ced2 | shop/components/dialog/dialog.js | 6791 | /**
* 模块化组件
* @author https://github.com/skyvow
* @param {Object} options 配置项
* @param {String} options.scope 组件的命名空间
* @param {Object} options.data 组件的动态数据
* @param {Object} options.methods 组件的事件函数
*
* confirm,toast通用参数
* @skin {String} 自定义皮肤类名
* @backdrop {Bolean} 遮罩层
* @title {String} 标题
* @content {Str... | mit |
ozym/ros | tool_macserver.go | 1202 | package ros
// only manage the default mac-server
func toolMacServer(legacy bool) Command {
if legacy {
return Command{
Path: "/tool mac-server",
Command: "print",
Flags: map[string]bool{
"default": true,
},
Detail: true,
}
}
return Command{
Path: "/tool mac-server",
Command: "print... | mit |
eyeofhorus-world/eyeofhorus | src/app/agents/client/framework/config/shadows.js | 489 |
import palette from './palette';
import dimens from './dimens';
const shadowStyle = elevationPixels => `0 0 ${elevationPixels} 0 ${palette.semiTransparentGrey}, 0 ${elevationPixels} ${elevationPixels} 0 ${palette.semiTransparentGreyDouble}`;
export default {
elevationPixels0: 'none',
elevationPixels2: shadowStyl... | mit |
garafu/express-junction | lib/authorizer.js | 1245 | var Validator = require("./validator.js");
/**
* Authorizer class.
* @constructor
* @param {Validator[]} validators
*/
var Authorizer = function (validators) {
this.validators = validators || [];
};
/**
* Get whether specified condition is authorized or not.
* @param {Request} request Re... | mit |
gotmc/ivi | fgen/keysight/key33220/stdfunc.go | 7273 | // Copyright (c) 2017-2022 The ivi developers. All rights reserved.
// Project site: https://github.com/gotmc/ivi
// Use of this source code is governed by a MIT-style license that
// can be found in the LICENSE.txt file for the project.
package key33220
import (
"fmt"
"strings"
"github.com/gotmc/ivi/fgen"
)
// ... | mit |
asiboro/asiboro.github.io | vsdoc/search--/s_4322.js | 74 | search_result['4322']=["topic_0000000000000A4A.html","StatusVm Class",""]; | mit |
maurer/tiamat | samples/Juliet/testcases/CWE78_OS_Command_Injection/s01/CWE78_OS_Command_Injection__char_console_execl_82_goodG2B.cpp | 1218 | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__char_console_execl_82_goodG2B.cpp
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-82_goodG2B.tmpl.cpp
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: console Read input f... | mit |
dmzubr/testing-store | app/scripts/controllers/createuser.js | 595 | 'use strict';
/**
* @ngdoc function
* @name testerApp.controller:CreateuserCtrl
* @description
* # CreateuserCtrl
* Controller of the testerApp
*/
angular.module('testerApp')
.controller('CreateuserCtrl',['$scope', 'toastr', 'userProvider', '$location', function ($scope, toastr, userProvider, $location) {
... | mit |
ctrutmann/bootbook | app/controllers/follows_controller.rb | 668 | class FollowsController < ApplicationController
def index
@followers = Follow.where(followee_id: current_user.id)
@following = Follow.where(follower_id: current_user.id)
end
def new
end
def create
@follow = Follow.create(follow_params)
if @follow.save
@follow.save
redirect_to use... | mit |
res4j/res4j | res4j-jar/src/main/java/org/res4j/strategy/ContextStrategy.java | 802 | package org.res4j.strategy;
import org.res4j.provider.AbstractContextProvider;
public class ContextStrategy extends AbstractFilterStrategy {
protected AbstractContextProvider provider;
@Override
public void initialize(ClassLoader classloader) throws Exception {
assert provider != null : "ContextStrategy must i... | mit |
Facepunch/arcade-SmashBloxTS | Entities/Ball.ts | 2896 | /// <reference path="GameEntity.ts"/>
class Ball extends GameEntity {
private _paddleHit: GameAPI.BudgetBoy.Sound;
private _blockHit: GameAPI.BudgetBoy.Sound;
private _velocity: GameAPI.Vector2f;
private _alive: boolean;
onLoadAudio() {
this._paddleHit = audio.getSound("bounce2");
... | mit |
lyndn/weixin | public/js/mainlayout/rollover.js | 720 | /**
* jQuery.Preload - Multifunctional preloader
* Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com
* Dual licensed under MIT and GPL.
* Date: 3/12/2008
* @author Ariel Flesler
* @version 1.0.7
*/
function initRollOverImages() {
var image_cache = new Object();
$("img.swap").each(functio... | mit |
kamilogorek/galaxy-shooter | app/scripts/main.js | 4463 | /* global Engine */
'use strict';
/*
* TODO:
* [ ] - Debug overall performance issue
* [ ] - Fix particles performance issue
* [ ] - Fix grunt build
* [ ] - Fix keys persistence bug that happens from time to time
*
*/
require(['config', 'game', 'background', 'player', 'ui', 'asteroids', 'sounds'], function (co... | mit |
sigaind/cupon | src/sigaind/siagBundle/Entity/TmEnfermedadesRepository.php | 587 | <?php
namespace sigaind\siagBundle\Entity;
use Doctrine\ORM\EntityRepository;
class TmEnfermedadesRepository extends EntityRepository
{
public function allEnfermedadesActivosPorEmpresa($empId)
{
$sql="SELECT e.enfid, e.enfcodigo, e.enfnombre, e.prioridad "
." FROM sigaind\siagBundle\... | mit |
raphaelstary/highfive.js | src/publicexposedinternals/resizeutils/changePath.js | 1476 | H5.changePath = (function (BezierCurvePath, LinePath, Vectors, CirclePath) {
'use strict';
function changePath(path, startX_or_x, startY_or_y, endX_or_radius, endY, p1_x, p1_y, p2_x, p2_y) {
var curve = path.curve;
if (curve instanceof LinePath) {
var vector = Vectors.get(startX_or... | mit |
clibc/howabout | features/steps/levenshtein_steps.py | 1581 | import random
from behave import given, when, then
from howabout import get_levenshtein
@given('two long strings')
def step_two_long_strings(context):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
random_str = lambda size: [random.choice(alphabet) for _ in range(0, size)]
context.first = random_str(1024)
c... | mit |
mug3n/entity | src/entity/model/base/processor/Processor/Processor.js | 665 | /**
* Created by mugen on 6/13/16.
*/
import {Stream} from '../../../../stream/Stream/Stream';
//var worker = new Worker('src/model/base/processor/Worker/Worker.js');
class Process {
constructor (method, args) {
this.stream = new Stream();
worker.postMessage(
{
method: method,
arguments: args
}... | mit |
dodekeract/bitwise | source/buffer/create.test.ts | 964 | import bitwise from '../'
test('with less than one byte', () => {
const buffer: Buffer = bitwise.buffer.create(bitwise.string.toBits('10011'))
expect(bitwise.buffer.read(buffer).join()).toBe(
bitwise.string.toBits('1001 1000').join()
)
})
test('with one byte', () => {
const buffer: Buffer = bitwise.buffer.creat... | mit |
Lumbi/cookie | Cookie/Block.cpp | 345 | //
// Block.cpp
// Cookie
//
// Created by Gabriel Lumbi on 2014-10-13.
// Copyright (c) 2014 Gabriel Lumbi. All rights reserved.
//
#include "Block.h"
Cookie::Block::Block()
{
active_ = true;
}
Cookie::Block::~Block()
{
}
bool Cookie::operator==(const Cookie::Block& lhs, const Cookie::Block& rhs)
{
... | mit |
drhenner/angel_deck | app/controllers/admin/inventory/receivings_controller.rb | 1302 | class Admin::Inventory::ReceivingsController < Admin::BaseController
def index
# by default find all POs that are not received
@purchase_orders = PurchaseOrder.receiving_admin_grid(params)
respond_to do |format|
format.html
format.json { render :json => @purchase_orders.to_jqgrid_json(
... | mit |
marinho/german-articles | webapp/resources/sap/ui/dt/ElementUtil-dbg.js | 7779 | /*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides object sap.ui.dt.ElementUtil.
sap.ui.define([
'jquery.sap.global'
],
function(jQuery) {
"use strict";
/**
* Class f... | mit |
yzhnasa/TASSEL-iRods | src/net/maizegenetics/analysis/association/MLMPlugin.java | 26877 | package net.maizegenetics.analysis.association;
import net.maizegenetics.plugindef.AbstractPlugin;
import net.maizegenetics.plugindef.DataSet;
import net.maizegenetics.plugindef.Datum;
import net.maizegenetics.plugindef.PluginEvent;
import net.maizegenetics.dna.snp.GeneticMap;
import net.maizegenetics.trait.Mar... | mit |
doctrine/couchdb-odm | lib/Doctrine/ODM/CouchDB/Mapping/Annotations/Version.php | 226 | <?php
namespace Doctrine\ODM\CouchDB\Mapping\Annotations;
use Doctrine\Common\Annotations\Annotation;
/**
* @Annotation
*/
final class Version extends Field
{
public $type = 'string';
public $jsonName = '_rev';
}
| mit |
gavinfish/leetcode-share | python/125 Valid Palindrome.py | 827 | '''
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a palindrome.
Note:
Have you consider that the string might be empty? This is a good question to ask during an in... | mit |
hendryluk/cormo | src/Cormo.Web/Impl/CormoHttpControllerSelector.cs | 2196 | using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Dispatcher;
using Cormo.Injects;
using Cormo.Web.Api;
namespace Cormo.Web.Impl
{
[ConditionalOnMissingComponent]
public class CormoHttpControllerSelector ... | mit |
MartynJones87/clubhouse.io.net | Clubhouse.io.net/Entities/Teams/ClubhouseTeam.cs | 1089 | using System;
using System.Collections.Generic;
using Clubhouse.io.net.Entities.Workflows;
using Newtonsoft.Json;
namespace Clubhouse.io.net.Entities.Teams
{
public class ClubhouseTeam
{
[JsonProperty(PropertyName = "created_at")]
public DateTime? CreatedAt { get; set; }
[JsonProperty... | mit |
szenekonzept/QPSCoin-Source | src/qt/locale/bitcoin_fr.ts | 122639 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Litecoin</source>
<translation>À propos de QPSCoin</translation>
... | mit |
astrellon/Rouge | game/body_part_common.cpp | 2731 | #include "body_part_common.h"
#include <util/data_table.h>
#include <util/data_string.h>
#include <cstring>
namespace am {
namespace game {
const char *BodyPartType::sNiceBodyPartTypeNames[] =
{
"Unknown Part", "None", "Any", "Hand", "Arm", "Leg", "Head", "Torso", "Neck", "Shoulders", "Legs", "Feet", "MAX_BODY... | mit |
robbynshaw/stackattack | stackattack/Scripts/src/app/question-detail/question-detail.module.js | 121 | 'use strict';
// Define the `questionDetail` module
angular.module('questionDetail', ['core.user', 'core.question']); | mit |
fermin/workflow | lib/workflow/rails/routes/mapping.rb | 560 | module Workflow
module Rails
class Routes
class Mapping
attr_accessor :controllers, :as, :skips
def initialize
@controllers = {
work_categories: 'workflow/work_categories',
work_items: 'workflow/work_items',
work_events: 'workflow/work_events'
}
... | mit |
nchambe2/excusify | sinatra-mvc-skeleton/db/migrate/20160204092731_create_users.rb | 273 | class CreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
t.string :first_name, null: false
t.string :last_name, null: false
t.string :password_hash, null: false
t.timestamps(null: false)
end
end
end
| mit |
KarrLab/wc_utils | wc_utils/util/__init__.py | 328 | from . import chem
from . import decorate_default_data_struct
from . import dict
from . import enumerate
from . import environ
from . import files
# from . import git
from . import list
from . import misc
from . import ontology
from . import rand
from . import stats
from . import string
from . import types
from . impor... | mit |
linjinjin123/BetaMoive | BetaMovie/src/main/java/com/example/model/Movie.java | 2048 | package com.example.model;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
import java.sql.Date;
import java.sql.Timestamp;
public class Movie {
public String movie_name, movie_director, movie_types, movie_actors, movie_description;
public float movie_grade;
public int movie_id, mo... | mit |
suuhui/code | laravel56/stud/live/admin/js/xadmin.js | 5154 | $(function () {
//加载弹出层
layui.use(['form','element'],
function() {
layer = layui.layer;
element = layui.element;
});
//触发事件
var tab = {
tabAdd: function(title,url,id){
//新增一个Tab项
element.tabAdd('xbs_tab', {
title: title
,content... | mit |
mxcube/lucid | lucid/myutils.py | 3554 | from math import ceil
import numpy
def expand(input_img, sigma, mode="constant", cval=0.0):
"""Expand array a with its reflection on boundaries
@param a: 2D array
@param sigma: float or 2-tuple of floats
@param mode:"constant","nearest" or "reflect"
@param cval: filling value used for constant, 0.0 by default
"""... | mit |
williamrodriguezb/ascensos | frontend/e2e/app.e2e-spec.ts | 305 | import { FrontedPage } from './app.po';
describe('fronted App', () => {
let page: FrontedPage;
beforeEach(() => {
page = new FrontedPage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
});
});
| mit |
bkoprucu/distributed-counter | distributedcounter-service/src/main/java/org/berk/distributedcounter/rest/CounterResource.java | 3412 | package org.berk.distributedcounter.rest;
import org.berk.distributedcounter.api.Count;
import org.berk.distributedcounter.counter.Counter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.Res... | mit |
kfrankc/kfrankc.github.io | js/debouncedresize.js | 1127 | /*
* debouncedresize: special jQuery event that happens once after a window resize
*
* latest version and complete README available on Github:
* https://github.com/louisremi/jquery-smartresize/blob/master/jquery.debouncedresize.js
*
* Copyright 2011 @louis_remi
* Licensed under the MIT license.
*/
var $event = $.event,... | mit |
stopsopa/stopsopa-annotations | src/Stopsopa/Annotations/Cache/MemcacheService.php | 638 | <?php
namespace Stopsopa\Annotations\Cache;
use Memcache;
/**
* Stopsopa\Annotations\Cache\MemcacheService
*/
class MemcacheService {
/**
* @var Memcache
*/
protected static $m;
protected function __construct() {}
public static function getInstance() {
if (!static::$m... | mit |
So-Cool/xCave | xCave/helpers.py | 1201 | """
Helper functions for xCave.
"""
import sys
def parse_config(config):
conf = {}
for section in config.sections():
conf[section] = {}
for name, raw_value in config.items(section):
try:
# Ugly fix to avoid '0' and '1' to be parsed as a boolean value.
... | mit |
TheFive/osmbc | routes/auth.js | 8259 | "use strict";
const debug = require("debug")("OSMBC:routes:auth");
const async = require("../util/async_wrap.js");
const HttpStatus = require("http-status-codes");
const config = require("../config.js");
const logger = require("../config.js").logger;
const passport = require("passport");
const OpenStre... | mit |
Hooked74/2048 | src/app/components/Scoresheet.tsx | 408 | import * as React from 'react';
import { Component } from 'react';
interface IProps {
value:number;
}
interface IState {}
export default class ScoresheetComponent extends Component<IProps, IState> {
public render() {
return (
<div className="scoresheet">
<span>{this.props.c... | mit |
thedespicableknight/web_crawlers | flight_ticket_jet_airways.py | 7521 | '''
This script checks for jet airways round-trip flights, and sends an mail
notifying about the combined price falling below a set threshold value.
'''
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
import time
import smtpli... | mit |
Neil-Ni/ng2-bootstrap-sbadmin | src/client/app/components/home/home.spec.ts | 1252 | import {
TestComponentBuilder,
describe,
expect,
injectAsync,
it,
beforeEachProviders
} from 'angular2/testing';
import {Location, Router, RouteRegistry, ROUTER_PRIMARY_COMPONENT} from 'angular2/router';
import {SpyLocation} from 'angular2/src/mock/location_mock';
import {RootRouter} from 'angular2/src/rout... | mit |
justinholzer/WinIoTLibLCD16x2 | LibLCD16x2/LibLCD16x2.cpp | 5095 | #include "pch.h"
#define LIBLCD16X2_EXPORT
#include "LibLcd16x2.h"
#include "LibLcd16x2Impl.h"
#include "Details.h"
namespace LibLCD16x2
{
LibLCD16x2::LibLCD16x2(
int select_command_reg_pin,
int select_read_write_reg_pin,
int send_data_reg_pin,
const std::vector<int>& data_pins_in)... | mit |
0robustus1/specroutes | spec/specroutes/utility_belt/state_based_equality_spec.rb | 3316 | require 'rails_helper'
describe Specroutes::UtilityBelt::StateBasedEquality do
context 'with default implementation of equality_state' do
let(:klass) do
class SBE_ImplementingKlass_01
include Specroutes::UtilityBelt::StateBasedEquality
def initialize(a, b)
@a, @b = a, b
e... | mit |
akkirilov/SoftUniProject | 04_DB Frameworks_Hibernate+Spring Data/05_DB Apps Introduction/src/entity/User.java | 959 | package entity;
import java.sql.Date;
public class User {
private Long id;
private String name;
private int age;
private Date registrationDate;
public User(String name, int age, Date registrationDate) {
super();
this.name = name;
this.age = age;
this.registrationDate = registrationDate;
}
public Use... | mit |
hxxft/lynx-native | Core/third_party/JavaScriptCore/jit/ICStats.cpp | 3667 | /*
* Copyright (C) 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... | mit |
MarcoAlducinR5/ProyectoFEX | application/controllers/api/cuentageneralrest.php | 7367 | <?php defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH.'/libraries/REST_Controller.php';
class Cuentageneralrest extends REST_Controller{
function __construct(){
parent::__construct();
$this->load->model('cuentageneralmodel');
... | mit |
OptimalPayments/node-js_SDK | lib/OptimalApiClient.js | 8488 |
/*
* Copyright (c) 2016 Paysafe
*
* 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, publish, di... | mit |
isitecnologia/php-activerecord | sys/phpac/lib/Validations.php | 24341 | <?php
/**
* These two classes have been <i>heavily borrowed</i> from Ruby on Rails' ActiveRecord so much that
* this piece can be considered a straight port. The reason for this is that the vaildation process is
* tricky due to order of operations/events. The former combined with PHP's odd typecasting means
* that ... | mit |
KatsuYuzu/Citrus.Interactions | Citrus.Interactions/Sample/Sample.WindowsPhone/Properties/AssemblyInfo.cs | 1058 | 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("Sa... | mit |
mp2apps/pesetacoin-master | src/net.cpp | 57438 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "db.h"
#include "net.h"
#include "init.h"
#include "addrman.h"
#include "... | mit |
portchris/NaturalRemedyCompany | src/app/code/core/Mage/Customer/Model/Api2/Customer/Rest/Admin/V1.php | 2387 | <?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a co... | mit |
mmartensson/creative-atrocities | lib/creative-atrocities/logstyle.js | 1490 | /* Based on https://github.com/einaros/tinycolor */
'use strict';
var stringStyles = {
'arg' : [
function() { return '\u001b[37m"\u001b[35m' + this + '\u001b[37m"\u001b[39m'; },
function() { return '"' + this + '"'; }
],
'ctx' : [
function() { return '\u001b[37m[\u001b[36m' + this ... | mit |
jamieshepherd/tygr | resources/views/account/index.blade.php | 1240 | @extends('_layout.base')
@section('body')
<body>
@include('_layout.nav')
<div id="main">
<header>
@if(Auth::user())
<a class="signout action nofill green" href="/auth/logout"><i class="fa fa-sign-out"></i> Sign out</a>
<div class="crumbtrail">
... | mit |
WoodyNaDobhar/interquest | tests/NpcRepositoryTest.php | 1857 | <?php
use App\Models\Npc;
use App\Repositories\NpcRepository;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class NpcRepositoryTest extends TestCase
{
use MakeNpcTrait, ApiTestTrait, DatabaseTransactions;
/**
* @var NpcRepository
*/
protected $npcRepo;
public function setUp()
... | mit |
sserrot/champion_relationships | venv/Lib/site-packages/jupyter_client/jsonutil.py | 2920 | # coding: utf-8
"""Utilities to manipulate JSON objects."""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from datetime import datetime
import re
import warnings
from dateutil.parser import parse as _dateutil_parse
from dateutil.tz import tzlocal
from ipython_g... | mit |
MrMilan/HL7Message | HL7Message/Properties/AssemblyInfo.cs | 1396 | 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("HL... | mit |
gnk-sato-hotto/nkdash | source/_isWindows.js | 117 | export default function _isWindows() {
const plt = navigator.platform.toLowerCase();
return /^win/.test(plt);
}
| mit |
FAForever/downlords-faf-client | src/test/java/com/faforever/client/coop/CoopControllerTest.java | 3745 | package com.faforever.client.coop;
import com.faforever.client.builders.FeaturedModBeanBuilder;
import com.faforever.client.domain.CoopMissionBean;
import com.faforever.client.fx.JavaFxUtil;
import com.faforever.client.fx.WebViewConfigurer;
import com.faforever.client.game.GameService;
import com.faforever.client.game... | mit |
RideSurf/website | server/public/javascripts/init.js | 617 | (function ($) {
$(function () {
$('.button-collapse').sideNav();
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 15, // Creates a dropdown of 15 years to control year
selectTime: true
});
$('.tim... | mit |
eclipxe13/CfdiUtils | src/CfdiUtils/Validate/Cfdi33/RecepcionPagos/Pagos/BancoBeneficiarioRfcCorrecto.php | 957 | <?php
namespace CfdiUtils\Validate\Cfdi33\RecepcionPagos\Pagos;
use CfdiUtils\Nodes\NodeInterface;
use CfdiUtils\Utils\Rfc;
/**
* PAGO15: En un pago, cuando el RFC del banco emisor de la cuenta beneficiaria existe
* debe ser válido y diferente de "XAXX010101000"
*/
class BancoBeneficiarioRfcCorrecto exten... | mit |
Massnory/Mass | app/src/main/java/xyz/geminiwen/mass/model/ArticleModel.java | 2629 | package xyz.geminiwen.mass.model;
import android.os.Parcel;
import com.google.gson.annotations.SerializedName;
/**
* Created by geminiwen on 16/8/25.
*/
public class ArticleModel extends BaseModel {
private long id;
private String url;
private String title;
private String createdDate;
private ... | mit |
flopp/go-findfont | fontdirs_windows.go | 410 | // Copyright 2016 Florian Pigorsch. All rights reserved.
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package findfont
import (
"os"
"path/filepath"
)
func getFontDirectories() (paths []string) {
return []string{
filepath.Join(os.Getenv("windir"), "F... | mit |
xuetu0606/lgzx | application/views/home/user/center.php | 4375 | <link rel="stylesheet" href="/static/css/tpls/lgb.css"/>
<link rel="stylesheet" href="/static/css/tpls/table.css"/>
<section>
<p class="title">
<span><?php echo $title; ?></span>
</p>
<div class="infor">
<div class="portrait">
<a href="/user/personalInfor">
<img ... | mit |
butterbrother/alpha-versions | learn/java/Collections/HashSetDemo.java | 298 | package Collections;
import java.util.*;
class HashSetDemo {
public static void main(String args[]) {
HashSet<Character> hs = new HashSet<Character>();
hs.add('B');
hs.add('A');
hs.add('D');
hs.add('E');
hs.add('C');
hs.add('F');
System.out.println(hs);
}
}
| mit |
raskolnikova/infomaps | node_modules/devextreme/events/gesture/swipeable.js | 3028 | /**
* DevExtreme (events/gesture/swipeable.js)
* Version: 16.2.6
* Build date: Tue Mar 28 2017
*
* Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/
"use strict";
var $ = require("jquery"),
swipeEvents = require("... | mit |
Sheco/cdda-itembrowser | src/app/views/world/constructionCategories.blade.php | 495 | @section('title')
Construction categories - Cataclysm: Dark Days Ahead
@endsection
<h1>Construction categories</h1>
<div class="row">
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked">
@foreach($categories as $category)
<li class="@if($category==$id) active @endif"><a href="{{ route(Route::currentRouteNam... | mit |
shiro16/activerecord-jwt | spec/activerecord-jwt/decoder_spec.rb | 2332 | require 'spec_helper'
class User < ActiveRecord::Base
include ActiveRecord::Jwt::Decoder
end
describe ActiveRecord::Jwt::Decoder do
let(:secret_key) { 'secret_key' }
let(:algorithm) { 'HS256' }
let(:user) { User.create(nickname: "test") }
let(:payload) {
{
'sub' => user.nickname,
'iss' => 'i... | mit |
kongkongmao/MCMagicEra-Reloaded | src/main/java/club/kongkongmao/magicera/Crafting/UpgradeFrameBrewingRecipe.java | 2064 | package club.kongkongmao.magicera.Crafting;
import club.kongkongmao.magicera.Blocks.MBlocks;
import club.kongkongmao.magicera.Items.MItems;
import club.kongkongmao.magicera.Utils.NBTBuilder;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.... | mit |
FEUP-MIEIC/PROG | a01_Ficha1/p02_ExpressoesAritmeticas/2.02b.cpp | 650 | #include <iostream>
using namespace std;
int main() {
int n1, n2, n3;
// Leitura de n1
cout << "N1 ? ";
cin >> n1;
// Leitura de n2
cout << "N2 ? ";
cin >> n2;
// Leitura de n3
cout << "N3 ? ";
cin >> n3;
int nmax=n1, nmin=n1;
int nmed=n1;
if (n2 > nmax)
nmax = n2;
if (n3 > nmax)
nmax = n3;
... | mit |
dickeyxian/JavaLeetCode | src/leetcode/TrappingRainWater.java | 688 | package leetcode;
public class TrappingRainWater {
public static int trap(int[] A) {
int result = 0;
int len = A.length;
if (len <= 2) {
return 0;
}
int maxleft[] = new int[len];
int maxright[] = new int[len];
for (int i = 1; i < len; i++) {
maxleft[i] = Math.max(maxleft[i - 1], A[i - 1]);
maxr... | mit |
Karasiq/scalajs-highcharts | src/main/scala/com/highstock/config/SeriesVbpMarkerStatesNormal.scala | 1159 | /**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highstock]]
*/
package com.highstock.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScript... | mit |
bitcoin-s/bitcoin-s | core-test/.jvm/src/test/scala/org/bitcoins/core/p2p/InetAddressJVMTest.scala | 912 | package org.bitcoins.core.p2p
import org.bitcoins.testkitcore.gen.p2p.P2PGenerator
import org.bitcoins.testkitcore.util.BitcoinSUnitTest
import java.net.{InetAddress => JvmAddress}
class InetAddressJVMTest extends BitcoinSUnitTest {
implicit override val generatorDrivenConfig: PropertyCheckConfiguration =
gen... | mit |
b263/tchart | src/services/event-bus.js | 407 | import Vue from 'vue';
import log from './log';
const v = new Vue();
export default {
logEvent(data) {
log('event', `${data[0]}: ${JSON.stringify(data[1]).substring(0, 80)}`);
},
$on(...args) {
v.$on.apply(v, args);
},
$emit(...args) {
this.logEvent(args);
v.$emi... | mit |
CSCfi/antero | db/python/load.py | 3776 | #!/usr/bin/python
# vim: set fileencoding=UTF-8 :
"""
load
todo doc
"""
import sys,os,getopt
import urllib2, base64, httplib
import ijson.backends.yajl2_cffi as ijson
import json
from time import localtime, strftime
import dboperator
def show(message):
print(strftime("%Y-%m-%d %H:%M:%S", localtime())+" "+message)
... | mit |
dries007/HoloInventory | src/main/java/net/dries007/holoInventory/network/request/RequestMessage.java | 1664 | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 - 2017 Dries K. Aka Dries007
*
* 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 r... | mit |
ontohub/gitlab_git | lib/bringit/diff_collection.rb | 3048 | module Bringit
class DiffCollection
include Enumerable
DEFAULT_LIMITS = { max_files: 100, max_lines: 5000 }.freeze
def initialize(iterator, options = {})
@iterator = iterator
@max_files = options.fetch(:max_files, DEFAULT_LIMITS[:max_files])
@max_lines = options.fetch(:max_lines, DEFAU... | mit |
Mnemosyne-20/Mnemosyne-2.1 | Mnemosyne2Reborn/Commenting/UserLinks.cs | 5979 | using ArchiveApi.Interfaces;
using Mnemosyne2Reborn.UserData;
using RedditSharp;
using RedditSharp.Things;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Mnemosyne2Reborn.Commenting
{
/// <summary>
/// This class is used for archiving links in... | mit |
zzareva/TelerikAcademy-2012-2013 | CSharpPartII/CS2Homework9Exams/SampleExamP05Liquid/Properties/AssemblyInfo.cs | 1414 | 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("Sa... | mit |
JuanMantilla/saircoApp | src/main/java/co/utb/softeng/moviesapp/entities/Equipo.java | 2216 | /*
* 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 co.utb.softeng.moviesapp.entities;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.per... | mit |