repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
WojciechKo/Walletudo | app/src/main/java/com/walletudo/ui/tag/TagInputFilter.java | 934 | package com.walletudo.ui.tag;
import android.text.InputFilter;
import android.text.Spanned;
public class TagInputFilter {
public static class SingleTag implements InputFilter {
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
... | mit |
Overbryd/adyen_client | spec/spec_helper.rb | 1201 | require "pathname"
require "bundler"
Bundler.setup(:default, :test)
require "minitest/spec"
require "minitest/autorun"
require "webmock"
require "mocha/mini_test"
require "vcr"
require "minispec-metadata"
root = Pathname.new(File.expand_path("..", File.dirname(__FILE__)))
$:.unshift(root.join("lib"))
require "adyen_cl... | mit |
obasola/master | src/main/java/com/kumasi/journal/rest/controller/BookPublisherRestController.java | 3340 | /*
* Created on 24 Oct 2015 ( Time 23:23:56 )
* Generated by Telosys Tools Generator ( version 2.1.1 )
*/
package com.kumasi.journal.rest.controller;
import java.util.LinkedList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.http.HttpStatus;
import org.springframework.http.Me... | mit |
Kaytal/premier-jf-cruise | templates/content-front.php | 1357 | <div class="alert">
<div class="alert-content">
<div class="close">close (x)</div>
<img src="<?php echo get_template_directory_uri(); ?>/assets/images/brand.png" alt="<?php bloginfo('name'); ?>" />
<p class="lead">Register by January 31st, save $100</p>
<p class="small-lead">*limited rooms available, ... | mit |
incentivetoken/offspring | com.dgex.offspring.ui/src/com/dgex/offspring/ui/controls/AliasControl.java | 6649 | package com.dgex.offspring.ui.controls;
import nxt.Alias;
import nxt.NxtException.ValidationException;
import org.eclipse.e4.ui.di.UISynchronize;
import org.eclipse.e4.ui.services.IStylingEngine;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse... | mit |
netcredit/NetCreditHub | src/NetCreditHub.Kernel/Runtime/Validation/IntValueValidator.cs | 4203 | namespace NetCreditHub.Runtime.Validation
{
using System;
using Extensions;
[Serializable]
public class IntValueValidator : ValidationAttributeBase
{
public int Min { get; set; } = 0;
public bool ContainMin { get; set; } = true;
public int Max { get; set; } = 0;
... | mit |
BlazeMV/Blazing | src/api/payment/ShippingQuery.php | 208 | <?php
namespace Blazing\api\payment;
class ShippingQuery{
protected $shippingQuery;
public function __construct($shippingQuery){
$this->shippingQuery = $shippingQuery;
}
} | mit |
phil-smith-1/task-tracker | app/models/user.rb | 173 | class User < ApplicationRecord
include Clearance::User
has_many :tasks, dependent: :destroy
has_and_belongs_to_many :companies
has_and_belongs_to_many :projects
end
| mit |
johnnyzhang1992/php-learning | php-mysql/blog/add_new.php | 2372 | <?php
/**
* Created by PhpStorm.
* User: zq199
* Date: 2016/10/31
* Time: 23:04
*/
//添加新blog
require 'class/system.php';
//主页
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo SITE_NAME ?>|新建blog</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link re... | mit |
Perth155/ActiviLog | client/index.js | 143 | import React from 'react';
import ReactDOM from 'react-dom';
import App from "./app"
ReactDOM.render(<App />, document.getElementById('app')); | mit |
IstiN/android_benchmark | benchmark/src/main/java/com/epam/benchmark/util/CloseableListIterator.java | 206 | package com.epam.benchmark.util;
import java.io.Closeable;
import java.util.ListIterator;
/**
* @author Egor Makovsky
*/
public interface CloseableListIterator<T> extends ListIterator<T>, Closeable {
} | mit |
ChristopherBiscardi/gatsby | packages/gatsby/src/schema/context.js | 426 | const { LocalNodeModel } = require(`./node-model`)
const withResolverContext = (context, schema) => {
const nodeStore = require(`../db/nodes`)
const createPageDependency = require(`../redux/actions/add-page-dependency`)
return {
...context,
nodeModel: new LocalNodeModel({
nodeStore,
schema,
... | mit |
mattn/ccat | Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/src/doall_cmd.go | 1332 | package src
import (
"log"
"os"
"github.com/jingweno/ccat/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib/config"
)
func init() {
// TODO(sqs): "do-all" is a stupid name
c, err := CLI.AddCommand("do-all",
"fully process (config, plan, execute, and import)",
`Fully processes a tree: configures it, p... | mit |
Xeeynamo/KingdomHearts | OpenKh.Tools.Common/Models/Kh2WorldsList.cs | 763 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Xe.Tools.Models;
using OpenKh.Kh2;
namespace OpenKh.Tools.Common.Models
{
public class Kh2WorldsList : IEnumerable<EnumItemModel<World>>, IEnumerable
{
private static List<EnumItemModel<World>> _list = E... | mit |
koobonil/Boss2D | Boss2D/addon/_old/webrtc-qt5.11.2_for_boss/p2p/base/pseudotcp_unittest.cc | 25862 | /*
* Copyright 2011 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... | mit |
dstockhammer/Brighter | samples/GenericListener/Ports/Events/Tasks.cs | 270 | namespace GenericListener.Ports.Events
{
public class GenericTask : EventStoredEvent { }
public class GenericTaskAddedEvent : GenericTask { }
public class GenericTaskEditedEvent : GenericTask { }
public class GenericTaskCompletedEvent : GenericTask { }
} | mit |
gefei/angular_requirejs_example | tests/main-test.js | 1122 | /**
* @author gefei
*/
describe('Sample application', function() {
var EC = protractor.ExpectedConditions;
it('should succeed', function() {
browser.get('http://localhost:63342/js_testing_example/app/index.html#/');
var btn_de = element(by.buttonText('EN'));
btn_de.click();
... | mit |
darrynten/sage-one-php | src/Models/TaxType.php | 2758 | <?php
/**
* SageOne Library
*
* @category Library
* @package SageOne
* @author Darryn Ten <darrynten@github.com>
* @license MIT <https://github.com/darrynten/sage-one-php/blob/master/LICENSE>
* @link https://github.com/darrynten/sage-one-php
*/
namespace DarrynTen\SageOne\Models;
use DarrynTen\SageOne... | mit |
savonarola/pulse_meter-dygraphs_visualizer | lib/pulse_meter/dygraphs_visualize/sensor.rb | 1551 | require "pulse_meter/dygraphs_visualize/series_extractor"
module PulseMeter
module DygraphsVisualize
class Sensor < Base
def last_value(now, need_incomplete=false)
sensor = real_sensor
sensor_data = if need_incomplete
sensor.timeline_within(now - sensor.interval, now).first
... | mit |
andrewlock/blog-examples | updating-test-host-to-3-0/3.0/ExampleApp3.IntegrationTests/HttpTests.cs | 917 | using System;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
namespace ExampleApp3.IntegrationTests
{
public class HttpTests: IClassFixture<ExampleAppTestFixture>, IDisposable
{
readonly ExampleAppTestFixture _fixture;
readonly HttpClient _client;
... | mit |
Webiny/Htpl | test/benchmark/twig/test2.php | 295 | <?php
require __DIR__.'/vendor/autoload.php';
// setup
$loader = new Twig_Loader_Filesystem([__DIR__.'/template/']);
$twig = new Twig_Environment($loader, ['cache' => false]);
// assign variables
$twig->addGlobal('entries', include(__DIR__.'/../entries.php'));
$twig->render('template.html'); | mit |
petyakostova/Telerik-Academy | C#/_Demos C# 1/3. Operators and Expressions/Expressions/Expressions.cs | 1314 | using System;
class Expressions
{
static void Main()
{
int r = (150 - 20) / 2 + 5;
Console.WriteLine("r={0}", r); // r=70
// Expression for calculation of circle area
double surface = Math.PI * r * r;
Console.WriteLine("surface={0}", surface); // surface=15393,80400259
... | mit |
ansteh/difference-json | gulpfile.js | 958 | var path = require('path');
var gulp = require('gulp');
var gutil = require("gulp-util");
var jasmine = require('gulp-jasmine');
var webpack = require('webpack');
var paths = {
scripts: ['lib/**/*.js'],
spec: 'test/spec/*.js'
};
gulp.task('test', function () {
return gulp.src(paths.spec)
.pipe(jasmine());
});
... | mit |
KiPaWanG/jquery-mobile-master | demos/widgets/headers/optimized-persistant-toolbars-a.php | 3259 | <?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest') { ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Navbar - jQuery Mobile Demos</title>
<link rel="stylesheet... | mit |
samuelfac/portalunico.siscomex.gov.br | src/main/java/br/gov/siscomex/portalunico/cct_ext/model/RetornoConsulta.java | 12027 | package br.gov.siscomex.portalunico.cct_ext.model;
import java.util.List;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind... | mit |
holmesal/hire-alonso | src/components/SexyBackground.js | 6131 | import React, {
Component,
Image,
PropTypes,
StyleSheet,
Text,
View
} from 'react-native';
import {
CanvasSpace,
Const,
Form,
Point,
Pair,
Vector
} from 'ptjs';
export default class SexyBackground extends Component {
componentDidMount() {
this.initPt();
}
initPt() {
var colors = {
a1: "#ff2d5d... | mit |
HexogenDev/MCProtocolLib | src/main/java/org/spacehq/mc/protocol/packet/ingame/client/player/ClientPlayerPlaceBlockPacket.java | 2412 | package org.spacehq.mc.protocol.packet.ingame.client.player;
import org.spacehq.mc.protocol.data.game.NetItemStack;
import org.spacehq.mc.protocol.data.game.NetPosition;
import org.spacehq.mc.protocol.data.game.values.Face;
import org.spacehq.mc.protocol.data.game.values.MagicValues;
import org.spacehq.mc.protocol.uti... | mit |
vduseev/browspot-kinect-library | controlpanel/devicetreeitem.cpp | 254 | #include "devicetreeitem.h"
#include "abstractdevice.h"
DeviceTreeItem::DeviceTreeItem( QTreeWidget* parent, AbstractDevice* prototype )
: QTreeWidgetItem( parent )
, m_prototype( prototype )
{
}
DeviceTreeItem::~DeviceTreeItem()
{
}
| mit |
ludios/Protojson | protojson/error.py | 83 | class PbDecodeError(Exception):
"""
Deserializing a PbLite list has failed.
"""
| mit |
crowsonkb/style_transfer | config_system.py | 8245 | """The configuration system."""
import argparse
from fractions import Fraction
import math
import os
from pathlib import Path
import re
import subprocess
import sys
import numpy as np
CONFIG_PY = Path(__file__).parent.resolve() / 'config.py'
def detect_devices():
try:
gpu_list = subprocess.run(['nvidia... | mit |
regexps/todo-regex | index.js | 302 | /*!
* todo-regex <https://github.com/regexps/todo-regex>
*
* Copyright (c) 2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
module.exports = function () {
return /<!--[ \t]*@?(?:todo|fixme):?[ \t]*([^\n]+)[ \t]*-->|(?:@|\/\/[ \t]*)?(?:todo|fixme):?[ \t]*([^\n]+)/i;
};
| mit |
stivalet/PHP-Vulnerability-test-suite | Injection/CWE_95/safe/CWE_95__GET__whitelist_using_array__echo-sprintf_%s_simple_quote.php | 1366 | <?php
/*
Safe sample
input : reads the field UserData from the variable $_GET
SANITIZE : use in_array to check if $tainted is in the white list
construction : use of sprintf via a %s with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
... | mit |
Lisennk/Slack-Events | src/Events/PinAdded.php | 273 | <?php
namespace Lisennk\LaravelSlackEvents\Events;
use Lisennk\LaravelSlackEvents\Events\Base\SlackEvent;
/**
* Slack Events API event
*
* @see https://api.slack.com/events
* @package Lisennk\LaravelSlackEvents\Events
*/
class PinAdded extends SlackEvent
{
//
} | mit |
Gracker/ZhiHuDaily-React-Native | ListScreen.js | 12870 | 'use strict';
var React = require('react-native');
var {
AsyncStorage,
Platform,
Dimensions,
ListView,
Image,
StyleSheet,
Text,
View,
DrawerLayoutAndroid,
ToolbarAndroid,
ToastAndroid,
BackAndroid,
TouchableOpacity,
} = React
var TimerMixin = require('react-timer-mixin');
var StoryItem = req... | mit |
kompyang/UnityGamePlayPocketLab | LeapMotionTest/Assets/LeapMotion/Modules/InteractionEngine/Scripts/Internal/SlidingWindowThrow.cs | 5706 | /******************************************************************************
* Copyright (C) Leap Motion, Inc. 2011-2017. *
* Leap Motion proprietary and confidential. *
* *
... | mit |
dip712204123/kidskula | mychat/includes/json/send/send_message.php | 4466 | <?php
/*
|| #################################################################### ||
|| # ArrowChat # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved. # ||
|| #... | mit |
calben/UE4-TiledBoardGameTemplate | Source/TiledGameEditor.Target.cs | 551 | // Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class TiledGameEditorTarget : TargetRules
{
public TiledGameEditorTarget(TargetInfo Target)
{
Type = TargetType.Editor;
}
//
// TargetRules interface.
//
public ove... | mit |
amardaxini/ups_pickup | lib/ups_pickup/pickup_cancel.rb | 1596 |
module UpsPickup
class PickupCancel < PickupRequest
def initialize(user_name, password, license, options={})
super(user_name, password, license, options)
@cancel_by = options[:cancel_by] || "02"
@prn = options[:prn]
end
def to_ups_hash
{
"ns2:CancelBy"=>@cancel_by,
... | mit |
byllyfish/pylibofp | doc/presentation/faucet-20171020/src/02_example.py | 397 | import zof
APP = zof.Application(__name__)
def role_request(role, generation_id):
return {
'type': 'ROLE_REQUEST',
'msg': {
'role': role,
'generation_id': generation_id
}
}
@APP.message('CHANNEL_UP')
def channel_up(event):
ofmsg = role_request('ROLE_MASTER'... | mit |
cheshire137/overwatch-team-comps | db/migrate/20170304164544_create_heroes.rb | 187 | class CreateHeroes < ActiveRecord::Migration[5.0]
def change
create_table :heroes do |t|
t.string :name, null: false
t.string :role
t.timestamps
end
end
end
| mit |
rhewitt22/atl-kickball | app/scorekeeper/ScorekeeperController.js | 488 | 'use strict';
angular.module('kickballApp.controllers')
.controller('ScorekeeperController', ['$scope', 'Team', function ( $scope, Team ) {
$scope.team = Team.getTeam();
$scope.count = {balls: 0, strikes: 0, fouls: 0};
$scope.inning = {outs: 0, half: "Top", num: 1};
$scope.bases = {atBat: $scope.team[1], fir... | mit |
vitorfs/cmdbox | cmdbox/snippets/migrations/0001_initial.py | 2421 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-28 21:26
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | mit |
shooterman/ideasbulb | db/migrate/20120328030907_add_fail_to_ideas.rb | 106 | class AddFailToIdeas < ActiveRecord::Migration
def change
add_column :ideas,:fail,:string
end
end
| mit |
gertjvr/ChatterBox | src/Server/ChatterBox.ChatServer/Handlers/Users/AllowedRoomsRequestHandler.cs | 2307 | using System;
using System.Linq;
using System.Threading.Tasks;
using ChatterBox.Core.Infrastructure;
using ChatterBox.Core.Mapping;
using ChatterBox.Domain.Aggregates.RoomAggregate;
using ChatterBox.Domain.Aggregates.UserAggregate;
using ChatterBox.Domain.Extensions;
using ChatterBox.MessageContracts.Dtos;
using Chatt... | mit |
Dunduro/SonataPageBundle | Tests/Cache/BlockEsiCacheTest.php | 2835 | <?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\PageBundle\Tests\Page;
use Sonata\PageBundle\C... | mit |
rejinka/fluent-symfony | tests/CreateTest.php | 6771 | <?php
namespace Fluent\Test;
use function Fluent\create;
use function Fluent\get;
use Fluent\PhpConfigLoader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Test create() definitions.
*/
class CreateTest extends TestCase
{
public function test_create_with_clas... | mit |
Heroes-Academy/IntroPython_Winter_2016 | code/week2/formulas.py | 1359 | """
I will provide the equations in the comments and you must
write the code that reflects the equations.
I will also specify which variable you should input.
You should write a message indicating what the person is inputting.
I have done the first one for you.
"""
# this is an import for the pi number
# it is used ... | mit |
namics/eslint-config-namics | test/es5-node/rules/node/no-sync.js | 107 |
// DESCRIPTION = disallow use of synchronous methods (off by default)
// STATUS = 0
// <!START
// END!>
| mit |
wxh7777/oas | oas/src/com/pfkj/oas/model/qx/QxRole.java | 1671 | package com.pfkj.oas.model.qx;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
@Entity
@Ta... | mit |
r1dd1ck777/td | app/DoctrineMigrations/Version20131020181804.php | 2124 | <?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20131020181804 extends AbstractMigration
{
public function up(Schema $schema)
{
// this up() migratio... | mit |
tomvodi/QTail | src/gui/highlighting/HighlightingDialog.cpp | 11561 | /**
* @author Thomas Baumann <teebaum@ymail.com>
*
* @section LICENSE
* See LICENSE for more informations.
*
*/
#include "HighlightListItemDelegate.h"
#include "HighlightingDialog.h"
#include "ui_HighlightingDialog.h"
int HighlightingDialog::HighlightRuleDataRole = Qt::UserRole + 1;
HighlightingDialog::Highli... | mit |
c-bata/Flask-Angular-PyJWT | client/gulpfile.babel.js | 775 | import gulp from 'gulp';
import babelify from 'babelify';
import browserify from 'browserify';
import source from 'vinyl-source-stream';
import buffer from 'vinyl-buffer';
import sourcemaps from 'gulp-sourcemaps';
let paths = {
test: "./static/test/*.js",
src: "./static/js/",
dist_src: "./s... | mit |
psenger/Jersey2-Security-JWT | src/main/java/com/sample/mappers/AuthenticationExceptionMapper.java | 904 | /**
* Created by Philip A Senger on November 10, 2015
*/
package com.sample.mappers;
import com.sample.domain.GenericErrorMessage;
import javax.ws.rs.NotAuthorizedException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Prov... | mit |
MattSurabian/webpack-audio-sprite-plugin | test/fixtures/manifestEntryModule.js | 489 | 'use strict';
var path = require('path');
module.exports = function(fileName, fileInfo, metadataFileName) {
var manifest = {
path: path.join('fixtures', fileName),
duration: fileInfo.duration,
size: fileInfo.size,
format: "mp3",
metadata: metadataFileName ? 'REPLACE' : {}
};
if (!metadataF... | mit |
Emiliya93/TelerikAcademy | DataStructuresAndAlgorithms/WorkshopDataStructures/WorkshopDataStructures/JediMeditation/Jedi.cs | 1275 | //using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//namespace JediMeditation
//{
// public class Jedi : IComparable<Jedi>
// {
// static readonly Dictionary<char, int> priorities = new Dictionary<char,int>
// {
// {'m', 1},
// {'k',... | mit |
jonstokes/shine | lib/shine/engine.rb | 220 | module Shine
class Engine < ::Rails::Engine
isolate_namespace Shine
config.generators do |g|
g.test_framework :rspec
g.fixture_replacement :factory_girl, :dir => 'spec/factories'
end
end
end
| mit |
Rebilly/ReDoc | src/components/Fields/Field.tsx | 3056 | import { observer } from 'mobx-react';
import * as React from 'react';
import { ClickablePropertyNameCell, RequiredLabel } from '../../common-elements/fields';
import { FieldDetails } from './FieldDetails';
import {
InnerPropertiesWrap,
PropertyBullet,
PropertyCellWithInner,
PropertyDetailsCell,
PropertyNam... | mit |
hxjp/simekiri-bot | ts/conversations/on-update-message.ts | 4181 | import {OnMessage} from './on-message';
import {Sequelize, Model} from 'sequelize';
import * as moment from 'moment';
import {INPUT_DATE_FORMATS, UserType} from '../constants';
import {formatSchedule} from './util';
import {messages} from '../messages-ja';
const usage = `
usage:
update (-i | --id) <id>
... | mit |
MrVibe/bp-profile-cover | includes/class.settings.php | 9248 | <?php
/**
* Setup BP Profile Cover settings
*
* @class BP_Profile_Cover_Settings
* @author VibeThemes
* @category Admin
* @package BP Profile Cover
* @version 1.2
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class BP_Profile_Cover_Settings{
var $settings;
var $temp;
public static $ins... | mit |
uppercounty/uppercounty | web/forms.py | 1731 | from __future__ import absolute_import
from __future__ import unicode_literals
# Copyright (c) 2015 Upper County Dolphins
#
# 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 |
cheminfo/database-aggregator | front/src/components/svg/ChevronRight.js | 272 | import React from 'react';
export default function(props) {
return (
<svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M12.95 10.707l.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657l4.95-4.95z" />
</svg>
);
}
| mit |
argerim/address_by_cep | lib/generators/address_by_cep/model_generator.rb | 867 | module AddressByCep
class ModelGenerator < Base
include Rails::Generators::Migration
source_root File.expand_path('../templates', __FILE__)
def initialize(*args, &block)
super
end
def create_partial
copy_file 'partial_addressable_form.html.erb', "app/views/addresses/_addressable... | mit |
csmeal/accord | backend-library/lib.models/card.ts | 793 | import { GameObject } from './gameObject';
import { v4 as uuid } from 'uuid';
export abstract class Card implements GameObject {
name: string;
id: string;
mana: number;
type: string;
imageUrl: string =
'http://conceptartworld.com/wp-content/uploads/2015/03/Magdalena_Radziej_Concept_Art_Illustration_fossi... | mit |
elcct/amazingwebsite | system/core.go | 2835 | package system
import (
"encoding/json"
"encoding/gob"
"github.com/golang/glog"
"net/http"
"reflect"
"github.com/zenazn/goji/web"
"github.com/gorilla/sessions"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"html/template"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
)
... | mit |
TheLastCard/react-redux-mvc | react-mvc/DBContexts/Migrations/Configuration.cs | 1123 | namespace react_mvc.DBContexts.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<CRUDDB>
{
public Configuration()
{
AutomaticMigrationsEnabled =... | mit |
teddymacn/CoreProfiler | CoreProfiler/Data/ProfiledDbDataReader.cs | 17603 | using System;
using System.Data.Common;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace CoreProfiler.Data
{
/// <summary>
/// Represents a profiled <see cref="DbDataReader"/>
/// which will call <see cref="IDbProfiler"/>.DataReaderFinished() automatically
/// when the ... | mit |
tobowers/barking-dog | spec/barking-dog/internal-services/configuration_service_spec.rb | 1293 | require 'spec_helper'
require 'barking-dog/internal-services/configuration_service'
module BarkingDog
describe ConfigurationService do
let(:receiver) { EventReceiver.new }
before do
@publisher = EventPublisher.new
@config_service = ConfigurationService.create_isolated
end
after do
... | mit |
andresmm07/slider | examples/slider.js | 2884 | /* eslint react/no-multi-comp: 0 */
require('rc-slider/assets/index.less');
const React = require('react');
const ReactDOM = require('react-dom');
const Slider = require('rc-slider');
const style = { width: 400, margin: 50 };
function log(value) {
console.log(value); //eslint-disable-line
}
function percentForma... | mit |
okfde/froide-theme | froide_theme/settings.py | 866 | # -*- coding: utf-8 -*-
import os
from froide.settings import Base, ThemeBase, HerokuPostmark, HerokuPostmarkS3 # noqa
class CustomThemeBase(ThemeBase):
FROIDE_THEME = 'froide_theme.theme'
SITE_NAME = "My Froide"
SITE_EMAIL = "info@example.com"
SITE_URL = 'http://localhost:8000'
SECRET_URLS = ... | mit |
kashike/SpongeCommon | src/main/java/org/spongepowered/common/service/pagination/PlayerPaginationCalculator.java | 6958 | /*
* 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... | mit |
mitselek/pildimaag | jobrunner.js | 4127 | var fs = require('fs')
var path = require('path')
var debug = require('debug')('app:' + path.basename(__filename).replace('.js', ''))
var async = require('async')
var op = require('object-path')
var Promise = require('bluebird')
var entu = require('entulib')
Promise.onPossiblyUnhandledRejection(function (error) { thro... | mit |
valarion/JAGE | JAGEgradle/JAGEmodules/src/main/java/com/valarion/gameengine/events/menu/battlemenu/MenuShield.java | 2341 | /*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015 Rubén Tomás Gracia
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to dea... | mit |
rwestbrookjr/riverandraintracker | lib/api.js | 295 | /*jshint esversion: 6 */
/*
* Library to handle services associated with this application/api
*/
// Container for services
const api = {};
// Import service files
api.users = require('./userservice');
api.waterData = require('./waterdataservice');
// Export services
module.exports = api;
| mit |
harvard-lil/nuremberg | nuremberg/documents/migrations/0002_auto_20160525_2155.py | 814 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-25 21:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('documents', '0001_initial'),
]
operations = [
migrations.AlterField(
... | mit |
redox-os/orbtk | utils/src/thickness.rs | 4870 | use crate::Value;
/// Used to describes a thickness e.g a border thickness.
#[derive(Copy, Clone, Default, Debug, PartialEq)]
pub struct Thickness {
/// Left of thickness.
pub left: f64,
/// Top of thickness.
pub top: f64,
/// Right of thickness.
pub right: f64,
/// Bottom of thickness.
... | mit |
haydnKing/seqJS | src/melting.js | 9962 | /*
* seqJS
* https://github.com/haydnKing/seqJS
*
* Copyright (c) 2014 Haydn King
* Licensed under the MIT license.
*/
var seqJS = seqJS || {};
/**
* @namespace seqJS.Melt
*/
seqJS.Melt = {};
(function(){
/*
* Data from SantaLucia 1996
*/
var DH = 0, DS = 1, //DG = 2,
ALL_PAIRS = ['AA','AT','AG','AC',... | mit |
danmcclain/octolure | lib/octolure.rb | 171 | require 'octolure/version'
require 'thor'
require 'io/console'
require 'netrc'
require 'octokit'
module Octolure
end
require 'octolure/templates'
require 'octolure/cli'
| mit |
superfaz/corniro.api | tests/unit/Corniro/Controller/ConnectControllerTest.php | 2266 | <?php
/**
* Corniro API
*
* @link https://github.com/superfaz/corniro.api
* @copyright 2016 Francois Karman
* @license https://opensource.org/licenses/MIT MIT
*/
namespace Corniro\Controller;
use Corniro\BaseInitializedTest;
use Slim\Http\Response;
/**
* Tests the Corniro\Controller\ConnectController c... | mit |
digisec/Payum | src/Payum/Payex/Request/Api/CreateAgreementRequest.php | 137 | <?php
namespace Payum\Payex\Request\Api;
use Payum\Request\BaseModelRequest;
class CreateAgreementRequest extends BaseModelRequest
{
} | mit |
tauheedahmed/ecosys | project_files/frmProfileOrgs.aspx.cs | 2590 | using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
namespace WebApplication2
{
/// <summary>
... | mit |
ItsCosmo/jscs-styleguide | src/rules/disallowArrowFunctions.js | 315 | export const disallowArrowFunctions = () => {
let message, right, wrong;
message = "ES6 arrow functions are not allowed.";
right = "function square(a) {\r return a * a;\r}";
wrong = "const square = (a) => { return a * a };";
return {
message,
right,
wrong
}
};
| mit |
antjs/ant.js | src/token.js | 1092 | var tokenReg = /{{({([^}\n]+)}|[^}\n]+)}}/g;
//字符串中是否包含模板占位符标记
function hasToken(str) {
tokenReg.lastIndex = 0;
return str && tokenReg.test(str);
}
function parseToken(value) {
var tokens = []
, textMap = []
, start = 0
, val, token
;
tokenReg.lastIndex = 0;
while((val = tokenReg.exec(... | mit |
screepers/screeps_console | screeps_console/command.py | 12525 |
from autocomplete import Autocomplete
import calendar
import settings
import re
from themes import themes
import time
import urwid
class Processor(object):
shard = 'shard0'
lastkey = False
apiclient = False
aliases = {
'theme': 'themes',
'time': 'Game.time',
'help': 'list'
... | mit |
gangadharkadam/office_frappe | frappe/templates/includes/login.js | 3138 | window.disable_signup = {{ disable_signup and "true" or "false" }};
window.login = {};
login.bind_events = function() {
$(window).on("hashchange", function() {
login.route();
});
$(".form-login").on("submit", function(event) {
event.preventDefault();
var args = {};
args.cmd = "login";
args.usr = ($("#l... | mit |
jedray/factoring | dixon.cpp | 10114 | #include <list> // lists
#include <vector> // vector
#include <iostream> //
#include <gmpxx.h> // mpz_class and large numbers
#include <assert.h>
#define myTime(t0) ((float)clock()-(t0))/CLOCKS_PER_SEC
void seive_erastothen(int B, std::vector<int> & factor_base){
bool isPrime[B];
for(int i=0;i<... | mit |
Deletescape-Media/Primitives | src/test/java/ch/deletescape/primitives/CharsTest.java | 1480 | package ch.deletescape.primitives;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;
public class CharsTest {
@Test
public void fromLong() {
assertThat(Chars.from(1L), is((char) 1));
assertThat(Chars.from(Long.MAX_VALUE), is((char) -1));
ass... | mit |
tilap/tilapp | tilapp/src/Router.js | 5944 | import React from 'react';
// import { StatusBar } from "react-native";
import { TabNavigator, DrawerNavigator, StackNavigator } from 'react-navigation';
import { getCurrentRouteName } from '~/lib/reactNavigation/helpers';
import Drawer from '~/containers/Drawer';
import EmptyPage from '~/containers/Scenes/EmptyPage/In... | mit |
vivaxy/design | number-animations/index.js | 643 | /**
* @since 150523 10:36
* @author vivaxy
*/
var animate = function() {
new NumberAnimation({
container: document.querySelector('.number1'),
targetNumber: 12345.67,
});
new NumberAnimation({
container: document.querySelector('.number2'),
targetNumber: 54321.09,
});
new NumberAnimation({... | mit |
Rodz3rd2/my-framework | functions/config.php | 267 | <?php
function config($string)
{
$temp = explode(".", $string);
$filename = array_shift($temp);
$keys = $temp;
$content = include config_path("{$filename}.php");
$active = $content;
foreach ($keys as $key) {
$active = $active[$key];
}
return $active;
}
| mit |
Tosch110/SuperNET-Lite-3 | js/nrs.news.js | 3580 | /******************************************************************************
* Copyright © 2013-2016 The Nxt Core Developers. *
* *
* See the AUTHORS.txt, DEVELOPER-AGREEMENT.txt and LICENSE.txt files at *
... | mit |
sebastienros/yessql | src/YesSql.Core/Provider/ServiceCollectionExtensions.cs | 814 | using System;
using YesSql;
namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddDbProvider(
this IServiceCollection services,
Action<IConfiguration> setupAction)
{
if (serv... | mit |
SYCstudio/OI | Practice/2017/2017.10.5/Luogu1563.cpp | 502 | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxN=100100;
const int inf=2147483647;
int n,m;
int Op[maxN];
char name[maxN][50];
int main()
{
scanf("%d%d",&n,&m);
for (int i=0;i<n;i++)
scanf("%d%s",&Op[i],name[i]);
int pos=0;
for (int... | mit |
jarves/Propel2 | src/Propel/Generator/Command/DatabaseReverseCommand.php | 3424 | <?php
/**
* This file is part of the Propel package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
namespace Propel\Generator\Command;
use Propel\Generator\Schema\Dumper\XmlDumper;
use Symfony\Componen... | mit |
TylerDrinkard/Comp-1210 | Labs/Activity 5/NumberOpsDriver.java | 1866 | import java.util.Scanner;
import java.util.ArrayList;
/**
* Demonstrates the NumberOperations class.
*
*@author Tyler Drinkard
*@version 2/19/17
*/
public class NumberOpsDriver {
/**
* Reads a set of positive numbers from the user until the user enters 0.
* Prints odds under and powers of 2 u... | mit |
BCNC/bcnc.github.io | public/javascripts/table.js | 3070 | /*
var retrieve = function(id) {
var link = '/resume?filename=' + id;
window.open(link);
document.getElementById('ifram1').src = link;
$.ajax({
type: "GET",
url: '/resume',
data: {
'filename': id
},
success: function(resp) {
window.open('/resume?filename=' + id);
//window.open('http... | mit |
deminy/jieba-php | src/Jieba/Data/TopArrayElement.php | 1229 | <?php
namespace Jieba\Data;
use Jieba\Exception;
/**
* Class TopArrayElement
*
* @package Jieba
*/
class TopArrayElement
{
/**
* @var mixed
*/
protected $key;
/**
* @var mixed
*/
protected $value;
/**
* TopArrayElement constructor.
*
* @param array $array
... | mit |
nick-ma/wechat-enterprise | test/api_common.test.js | 3680 | var expect = require('expect.js');
var urllib = require('urllib');
var muk = require('muk');
var config = require('./config');
var API = require('../').API;
describe('common.js', function () {
describe('mixin', function () {
it('should ok', function () {
API.mixin({sayHi: function () {}});
expect(API... | mit |
objective-audio/ui | ui/layout/yas_ui_layout.cpp | 9086 | //
// yas_ui_layout.cpp
//
#include "yas_ui_layout.h"
#include <ui/yas_ui_layout_dependency.h>
#include <ui/yas_ui_layout_guide.h>
using namespace yas;
using namespace yas::ui;
#pragma mark - value source
observing::syncable ui::layout(std::shared_ptr<layout_value_source> const &src_guide,
... | mit |
miaowjs/miaow-thirdparty-plugin | test/fixtures/miaow.config.js | 324 | var Plugin = require('../..');
var path = require('path');
module.exports = {
// 工作目录
context: __dirname,
// 输出目录
output: path.resolve(__dirname, '../output'),
// 缓存目录
cache: '',
// 静态文件的域名
domain: 'http://127.0.0.1',
plugins: [new Plugin()],
hashLength: 0
};
| mit |
InnovateUKGitHub/innovation-funding-service | ifs-web-service/ifs-project-setup-mgt-service/src/main/java/org/innovateuk/ifs/project/grantofferletter/populator/AcademicFinanceTableModelPopulator.java | 1982 | package org.innovateuk.ifs.project.grantofferletter.populator;
import org.innovateuk.ifs.competition.resource.CompetitionResource;
import org.innovateuk.ifs.finance.resource.ProjectFinanceResource;
import org.innovateuk.ifs.organisation.resource.OrganisationResource;
import org.innovateuk.ifs.project.grantofferletter.... | mit |