repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
l0gd0g/passport-ucoz | node_modules/passport-oauth1/lib/strategy.js | 13793 | /**
* Module dependencies.
*/
var passport = require('passport-strategy')
, url = require('url')
, util = require('util')
, utils = require('./utils')
, OAuth = require('oauth').OAuth
, InternalOAuthError = require('./errors/internaloautherror');
/**
* Creates an instance of `OAuthStrategy`.
*
* The OA... | mit |
ordinary-developer/book_java_the_complete_reference_9_ed_h_schildt | my_code/chapter_2_OVERVIEW_OF_JAVA/02_a_second_short_program/Example2.java | 343 | /*
Here is another short example
Call this file "Example2.java"
*/
class Example2 {
public static void main(String args[]) {
int num;
num = 100;
System.out.println("This is num: " + num);
num = num * 2;
System.out.print("The value of num * 2 is ");
System.out... | mit |
MiSchroe/klf-200-api | src/KLF200-API/GW_CS_VIRGIN_STATE_CFM.ts | 117 | "use strict";
import { GW_FRAME_CFM } from "./common";
export class GW_CS_VIRGIN_STATE_CFM extends GW_FRAME_CFM {}
| mit |
angular/angular-cli-stress-test | src/app/components/comp-1157/comp-1157.component.ts | 484 | /**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-comp-1157',
templateUrl: './comp... | mit |
tedc/cattelani-theme | extras/setup.php | 27144 | <?php
function ng_app($html) {
$html = $html . ' class="no-js" ng-app="catellani"';
return $html;
}
//add_filter( 'language_attributes', 'ng_app', 100 );
function theme_setup() {
add_theme_support( 'custom-logo' );
add_image_size('magazine', 1246, 700, true);
add_image_size('vertical-thumb', 440, 560, t... | mit |
jocoonopa/reebonz | src/Woojin/GoodsBundle/DependencyInjection/WoojinGoodsExtension.php | 880 | <?php
namespace Woojin\GoodsBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
/**
* This is the class that loads and manag... | mit |
igorkulman/Kulman.WPA81.BaseRestService | Kulman.WPA81.BaseRestService/Services/Abstract/BaseRestService.cs | 26008 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Windows.Storage.Streams;
using Windows.Web.Http;
using Windows.Web.Http.Filters;
using JetBrains.Annotations;
using Kulman.WPA81.BaseRestService.Services.Exceptions;
using New... | mit |
gdg-tangier/vue-firestore | tests/vue-firestore.spec.js | 675 | import { Vue, firebase, firestore, VueTick, randomString } from './TestCase';
let vm, collection;
describe('vue-firestore', () => {
beforeEach(async () => {
collection = firestore.collection('items');
vm = new Vue({
data: () => ({
items: null
}),
firestore() {
return {
... | mit |
joshsoftware/tip4commit | config/environments/production.rb | 3474 | T4c::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
... | mit |
jordanams/lunchr | lunchr_extranet/app/controler/compte/index.php | 875 | <?php
include('../app/model/compte/details_user.php');
include('../app/model/compte/update_user.php');
if(isset($_GET['logout'])) {
session_destroy();
header('location:index.php?module=login&action=index&logout=1');
exit;
}
if(isset($_POST['nom_user'])) {
$verif_details = verif_details($_SESSION['user_i... | mit |
mitsei/dlkit | dlkit/abstract_osid/osid/search_orders.py | 22990 | """Implementations of osid abstract base class search_orders."""
# pylint: disable=invalid-name
# Method names comply with OSID specification.
# pylint: disable=no-init
# Abstract classes do not define __init__.
# pylint: disable=too-few-public-methods
# Some interfaces are specified as 'markers' and includ... | mit |
marielb/ebolahackathon | Step_Model.php | 1335 | <?php
require_once('Step_DAO.php');
require_once('Option_Model.php');
class Step_Model {
public $dao;
public $stepID;
public $message;
public $options;
public function __construct($db, $stepID) {
$this->dao = new Step_DAO($db);
$this->stepID = $stepID;
}
public function loadOptions() {
$result =... | mit |
Lapanti/golf-scorebook | src/components/TabBar.js | 1232 | import React, {PropTypes} from 'react';
import TabBarButton from '../components/TabBarButton';
import {
StyleSheet,
View
} from 'react-native';
const TabBar = React.createClass({
displayName: 'TabBar',
propTypes: {
tabs: PropTypes.array.isRequired,
height: PropTypes.number.isRequired,
currentTabIn... | mit |
StayHungryStayFoolish/stayhungrystayfoolish.github.com | JavaSE/src/main/java/basic/FinalDemo.java | 521 | package basic;
/**
* Created by bonismo
* 14/10/17 上午11:50
*/
public final class FinalDemo {
final String name = null;
final int age;
// final 修饰的域,必须初始化赋值 1、直接赋值 2、构造器赋值
public FinalDemo(int age) {
this.age = 18;
}
public FinalDemo() {
this.age = 18;
}
public fina... | mit |
digibib/ls.ext | redef/services/src/test/java/no/deichman/services/entity/external/ContextObjectTest.java | 1228 | package no.deichman.services.entity.external;
import com.google.gson.Gson;
import org.apache.jena.system.JenaSystem;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* Res... | mit |
nasser/syntax-canvas | public/codemirror/mode/flexible/flexible.js | 1731 | CodeMirror.defineMode("flexible", function(config, mode) {
return {
startState: function() {
return {
parser: mode.parser,
multiTokens: []
};
},
token: function(stream, state) {
var style;
style = this.matchSyntax(stream, state); if(style) return style;
style = this.matchMultiTokens(stre... | mit |
mrstebo/slack-emoji-importer | lib/emoji.rb | 68 | class Emoji < Struct.new(:category, :id, :name, :command, :url)
end
| mit |
mennowo/TLCGen | TLCGen.Dependencies/TLCGen.Dependencies/Helpers/Base64Encoding.cs | 646 | using System;
using System.Text;
namespace TLCGen.Dependencies.Helpers
{
public static class Base64Encoding
{
public static string EncodeTo64(string toEncode)
{
var toEncodeAsBytes = Encoding.ASCII.GetBytes(toEncode);
var returnValue = Convert.ToBase64String(toEncodeAsB... | mit |
Tom-Alexander/redux-ecommerce | lib/actions/__tests__/SessionActionsTest.js | 1427 | import sinon from 'sinon';
import {expect} from 'chai';
import {describe, it} from 'mocha';
import {service} from '../../services';
import {getSession, removeSession, createSession} from '../sessionActions';
describe('SessionActions', () => {
afterEach(() => service.setFetcher(null));
describe('Action creators'... | mit |
orbitaljt/LEAD | Android/Lead/app/src/main/java/com/orbital/lead/logic/Asynchronous/AsyncUploadImage.java | 4766 | package com.orbital.lead.logic.Asynchronous;
import android.os.AsyncTask;
import com.orbital.lead.Parser.Parser;
import com.orbital.lead.logic.WebConnector;
import com.orbital.lead.model.Constant;
import com.orbital.lead.model.EnumFileType;
import com.orbital.lead.model.EnumPictureServiceType;
import java.io.IOExcep... | mit |
ONSdigital/ras-frontstage | tests/integration/test_sign_in.py | 14770 | import os
import unittest
import requests_mock
from config import TestingConfig
from frontstage import app, create_app_object
from frontstage.common.utilities import obfuscate_email
from frontstage.controllers.party_controller import (
notify_party_and_respondent_account_locked,
)
from frontstage.exceptions.excep... | mit |
Fedcomp/active_sms | lib/any_sms/configuration.rb | 2337 | # :nodoc:
module AnySMS
# @return [AnySMS::Configuration] object with configuration options
def self.config
@@config ||= Configuration.new
end
# Allows to configure AnySMS options and register backends
def self.configure
yield(config)
end
# resets AnySMS configuration to default
def self.reset... | mit |
tyh24647/Miami1984 | Assets/UFPS/Base/Scripts/Core/Editor/vp_ShooterEditor.cs | 8874 | /////////////////////////////////////////////////////////////////////////////////
//
// vp_ShooterEditor.cs
// © Opsive. All Rights Reserved.
// https://twitter.com/Opsive
// http://www.opsive.com
//
// description: custom inspector for the vp_Shooter class
//
/////////////////////////////////////////////////... | mit |
cruncher/sparky | test/select.test.js | 4244 |
import { Fn, noop, test as group, Observer } from '../../fn/module.js';
import Sparky from '../module.js';
group('select > option', function(test, log, fixture) {
var select = fixture.children[0];
test("Array scope", function(equals, done) {
const model = { country: 'UK' };
Sparky(select).push(model);
reque... | mit |
heartshare/cmf-1 | based/vendor/bower/jquery/src/sizzle/test/jquery.js | 367817 | /*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-2-4
*/
(function (window, undefined) {
// Can't do th... | mit |
Sharagoz/rails_exception_handler | spec/integration/rails_exception_handler_spec.rb | 4789 | require 'spec_helper'
describe RailsExceptionHandler do
it "should catch controller errors" do
get "/home/controller_error"
RailsExceptionHandler::ActiveRecord::ErrorMessage.count.should == 1
RailsExceptionHandler::Mongoid::ErrorMessage.count.should == 1 if defined?(Mongoid)
last_response.body.should... | mit |
keatflame/wekit | cron.go | 1571 | package wekit
import (
"fmt"
"os"
"strings"
"time"
)
// CronJob process
type CronJob struct {
Name string
Arg []string
RunType int64
RunDateTime *time.Time
Directories []string
LogFileName string
CommitBuffer int64
Process map[string]int64
}
// NewCronJob create new cron job
func N... | mit |
Jawira/case-converter | src/Convert.php | 12563 | <?php declare(strict_types=1);
namespace Jawira\CaseConverter;
use Jawira\CaseConverter\Glue\AdaCase;
use Jawira\CaseConverter\Glue\CamelCase;
use Jawira\CaseConverter\Glue\CobolCase;
use Jawira\CaseConverter\Glue\DashGluer;
use Jawira\CaseConverter\Glue\DotNotation;
use Jawira\CaseConverter\Glue\Gluer;
use Jawira\Ca... | mit |
ianstormtaylor/slate | site/examples/editable-voids.tsx | 3581 | import React, { useState, useMemo } from 'react'
import { Transforms, createEditor, Descendant } from 'slate'
import { Slate, Editable, useSlateStatic, withReact } from 'slate-react'
import { withHistory } from 'slate-history'
import { css } from '@emotion/css'
import RichTextEditor from './richtext'
import { Button, ... | mit |
kivegun/HIS_Srilanka | application/modules/login/views/count.php | 1576 | <?php
/**
* Created by PhpStorm.
* User: kivegun
* Date: 11/30/16
* Time: 6:36 AM
*/
?>
<div style='position:absolute;width:90%;height:50px;border:2px solid red;text-align:center;background-color:#f1f1f1;'>
Please try to login again in <span id='time'>15</span>sec.
<div id='link'></... | mit |
Greakz/TypeScriptReactTest | src/Components/Pages/ArticleDetails/ArticleDetails.state.ts | 568 | import { WebData } from '../../../ReduxCore/Util/webData';
import { ArticleFormState, createArticleFormState } from '../../../Evolve/Forms/ArticleForm';
import { Article } from '../../../Evolve/Entities/Article';
export interface ArticleDetailsState {
editMode: boolean;
saving: boolean;
webData: WebData<Ar... | mit |
dartpro13/e-governmentPitria | application/views/admin/content_list_surat_kelahiran.php | 5311 | <div class="right_col" role="main">
<div class="">
<div class="page-title">
<div class="title_left">
<h3>Surat Layanan Penduduk <small>/ List Surat Kelahiran</small></h3>
</div>
<div class="title_right">
<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
... | mit |
hanucito/utn-fullstack | clase3/ejercicios/ejercicio1/model/api.js | 1911 | const readJSONCPS = require('read-json');
const writeJSONCPS = require('write-json');
const path = require('path');
const booksFile = path.resolve(__dirname, '../data/books.json');
const categoriesFile = path.resolve(__dirname, '../data/categories.json');
const writeJSON = function(file, data) {
return new Promise(... | mit |
patrickneubauer/XMLIntellEdit | xmlintelledit/xmltext/src/main/java/eclassxmlschemadictionary_2_0Simplified/impl/Eclassxmlschemadictionary_2_0SimplifiedFactoryImpl.java | 3037 | /**
*/
package eclassxmlschemadictionary_2_0Simplified.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import eclassxmlschemadictionary_2_... | mit |
gpslab/cqrs | src/Query/Handler/QuerySubscriber.php | 530 | <?php
/**
* GpsLab component.
*
* @author Peter Gribanov <info@peter-gribanov.ru>
* @copyright Copyright (c) 2011, Peter Gribanov
* @license http://opensource.org/licenses/MIT
*/
namespace GpsLab\Component\Query\Handler;
interface QuerySubscriber
{
/**
* Get called methods for subscribed queries.... | mit |
selvasingh/azure-sdk-for-java | sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/cosmos/domain/PersonRepository.java | 369 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.azure.spring.autoconfigure.cosmos.domain;
import com.azure.spring.data.cosmos.repository.CosmosRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface PersonReposit... | mit |
mcgivrer/generator-java-webapp | app/templates/admin/static/js/main.js | 1935 | var CUI = CUI || {};
// 后台数据接口根路径
CUI.baseUrl = '/';
// 后台数据接口地址配置
CUI.dataUrl = {
'list': 'user/list.json',
'pay': 'pay/list.json'
};
// select 数据配置
CUI.optionsData = {
'status': [{
'id': 1,
'name': '完成'
}, {
'id': 2,
'name': '未完成'
}]
};
CUI.getUrl = function(k) ... | mit |
eleven41/skeddly-sdk-net | SkeddlySDK/Model/AssumeUserWithSamlRequest.cs | 408 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Skeddly.Model
{
public class AssumeUserWithSamlRequest
{
public string SamlResponseBase64 { get; set; }
public bool? IsAssumeOnSingleProvider { get; set; }
public string IdentityProvid... | mit |
benhardy/braintree-scala | src/main/scala/Plan.scala | 1563 | package net.bhardy.braintree.scala
import net.bhardy.braintree.scala.util.NodeWrapper
object Plan {
sealed trait DurationUnit {}
object DurationUnit {
case object DAY extends DurationUnit
case object MONTH extends DurationUnit
case object UNRECOGNIZED extends DurationUnit
case object UNDEFINED ex... | mit |
SkyGamesLT/skygames | cake/cake/tests/groups/xml.group.php | 1904 | <?php
/* SVN FILE: $Id: xml.group.php 7848 2008-11-08 02:58:37Z renan.saddam $ */
/**
* Xml Group test.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.... | mit |
YABhq/Quazar | src/Publishes/resources/commerce/plans/all.blade.php | 1038 | @extends('commerce-frontend::layouts.store')
@section('store-content')
<div class="row">
@foreach ($plans as $plan)
<div class="col-md-3">
<div class="card card-default">
<div class="card-header text-center">
<span class="plan-title">... | mit |
keepwalking1234/neocoin | src/rpcrawtransaction.cpp | 21589 | // Copyright (c) 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 <boost/assign/list_of.hpp>
#include "base58.h"
#include "rpcserver.h"
#includ... | mit |
fahrydgt/hotel_site | application/views/hotels/search_hotels.php | 7754 |
<script>
$(document).ready(function(){
get_results();
$("#name").keyup(function(){
event.preventDefault();
get_results();
});
$("#city").keyup(function(){
event.preventDefault();
get_results();
});
$("#phone").keyup(function(){
event.preventDefault();
get_results();
});
... | mit |
jjfeore/turingtweets | turingtweets/turingtweets/models/__init__.py | 2211 | from sqlalchemy import engine_from_config
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm import configure_mappers
import zope.sqlalchemy
# import or define all models here to ensure they are attached to the
# Base.metadata prior to any initialization routines
from .mymodel import Tweet # flake8: noqa
# ... | mit |
max-winderbaum/maxcoin | src/qt/locale/bitcoin_fr_CA.ts | 97250 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="fr_CA" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Maxcoin</source>
<translation>A propos de Maxcoin</translation>
... | mit |
raquelxmoss/learning_connect | db/migrate/20150423222044_delete_agreements.rb | 321 | class DeleteAgreements < ActiveRecord::Migration
def up
drop_table :agreements
end
def down
create_table :agreements do |t|
t.text :description
t.belongs_to :connection
t.belongs_to :course
t.integer :price
t.string :location
t.timestamps null: false
end
end
end... | mit |
MobilityLabs/pdredesign-server | app/assets/javascripts/client/inventories/MessageElementCtrl.js | 596 | (function() {
'use strict';
angular.module('PDRClient')
.controller('MessageElementCtrl', MessageElementCtrl);
MessageElementCtrl.$inject = ['$scope'];
function MessageElementCtrl($scope) {
var vm = this;
vm.message = $scope.message;
var kind = $scope.kind || 'Inventory';
vm.title = {
... | mit |
dsii-2016-unirsm/dsii-2016-unirsm.github.io | p5/10print/michele/cell.js | 2811 | function Cell(x, y, up) {
this.x = x; // coordinate x
this.y = y; // coordinate y
this.angle = up ? -HALF_PI : HALF_PI; // orientamento del triangolo
this.edges = [true, true, true]; // array booleana usata per stabilire quali bordi saranno disegnati
this.visited = false; // booleana usata per sapere se la c... | mit |
VladimirRadojcic/Master | BusinessProcessModelingTool/src/bp/text/box/ProcessTextBox.java | 5794 | package bp.text.box;
import java.util.List;
import bp.event.AttributeChangeListener;
import bp.model.data.Activity;
import bp.model.data.ActivityEvent;
import bp.model.data.ConditionalActivityEvent;
import bp.model.data.Edge;
import bp.model.data.Element;
import bp.model.data.ErrorActivityEvent;
import bp.model.data.... | mit |
Episerver-trainning/episerver6r2_sso | Templates/AlloyTech/Units/Placeable/DateTimePicker.ascx.cs | 6241 | #region Copyright
// Copyright © EPiServer AB. All rights reserved.
//
// This code is released by EPiServer AB under the Source Code File - Specific License Conditions, published August 20, 2007.
// See http://www.episerver.com/Specific_License_Conditions for details.
#endregion
using System;
using System.Globaliz... | mit |
Fishdrowned/test-stuff | php/dynamic.traits/DynamicProperties/EmptyProperties.php | 63 | <?php
namespace DynamicProperties;
trait EmptyProperties
{
}
| mit |
matholroyd/tworgy-ruby | spec/spec_helper.rb | 263 | $LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rubygems'
require 'tworgy-ruby'
require 'tworgy-ruby-testing'
require 'spec'
require 'spec/autorun'
Spec::Runner.configure do |config|
end
| mit |
legendvijay/quail | lib/assessments/imgAltNotPlaceHolder.js | 295 | /**
* A wrapper for assessments that call a component to determine
* the test outcome.
*/
'use strict';
quail.imgAltNotPlaceHolder = function (quail, test, Case) {
var options = {
selector: 'img',
attribute: 'alt'
};
quail.components.placeholder(quail, test, Case, options);
}; | mit |
jerrod/rbee | lib/vendor/unserialize.rb | 7020 | # License and Copyright {{{
# Copyright (c) 2003 Thomas Hurst <freaky@aagh.net>
#
# 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
... | mit |
chenjsh36/ThreeJSForFun | threejs_gallary/front/src/script/canvas_catchfish_game.js | 21880 | var Bubbles = require('./canvas_catchfish_bubbles.js');
// require('./canvas_catchfish_fish.js');
// 变量定义---------------------------------------------------
var bubble1,
bubble2,
bubble3
;
var scene,
camera,
renderer,
stats,
gui
;
var geometry,
material,
cube,
line;
var am... | mit |
tqcenglish/SoftStart | Golang/book/gobyexample/34_worker_pools/worker_pools.go | 520 | package main
import "fmt"
import "time"
func worker(id int, jobs <-chan int, results chan<- int) {
for j := range jobs {
fmt.Println("worker", id, "processing job", j)
time.Sleep(time.Second)
results <- j * 2
}
}
// https://gobyexample.com/worker-pools
func main() {
jobs := make(chan int, 100)
results := m... | mit |
frc-862/SummerSirius | src/org/usfirst/frc862/sirius/subsystems/Pivot.java | 6197 | // RobotBuilder Version: 2.0
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks... | mit |
infochimps-customers/chimps | lib/chimps/utils/uses_curl.rb | 1108 | module Chimps
module Utils
# A module which defines methods to interface with +curl+ via a
# system call.
module UsesCurl
def curl_program
`which curl`.chomp
end
# Curl invocations (specifically those that do S3 HTTP POST) are
# sometimes sensitive about the order of par... | mit |
eturino/prime_challenge | lib/prime_challenge/matrix.rb | 528 | module PrimeChallenge
class Matrix
attr_reader :prime_numbers
def initialize(prime_numbers)
@prime_numbers = prime_numbers
end
def call
[header_row].concat(body_rows)
end
private
def header_row
@header_row ||= [''].concat prime_numbers
end
def body_rows
... | mit |
LINKIWI/react-elemental | src/components/alert.js | 2357 | import PropTypes from 'prop-types';
import React from 'react';
import Spacing from 'components/spacing';
import Text from 'components/text';
import Clear from 'icons/clear';
import { colors } from 'styles/color';
import noop from 'util/noop';
// Mapping of alert types to their corresponding background and text colors
... | mit |
AIon-Gbbe/automatic_irigation_sistem_app | src/app/app.routing.ts | 703 | import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {AddNewBucketComponent} from "./add-new-bucket/add-new-bucket.component";
import {BucketDetailsComponent} from "./bucket-details/bucket-details.component";
const appRoutes: Routes = [
{
pat... | mit |
garymabin/YGOMobile | apache-async-http-HC4/src/org/apache/http/HC4/conn/ManagedHttpClientConnection.java | 2850 | /*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this ... | mit |
mg-wat/pum-lato-2014-2015 | Lab2-2/app/src/main/java/pl/edu/wat/wel/fragmenttest/ListAdapter.java | 2317 | package pl.edu.wat.wel.fragmenttest;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
/**
* Klasa Adaptera RecyclerView - dostarcza danych do ... | mit |
linkeddatalab/statspace | src/main/java/at/tuwien/ldlab/statspace/util/SpecialEndpointList.java | 4402 | package at.tuwien.ldlab.statspace.util;
import java.io.File;
import java.util.ArrayList;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class SpecialEndpoi... | mit |
coboosting/coboosting.github.io | js/ziyun.js | 1570 | /*!
* Ziyun Javascript (http://www.ziyuntech.com)
* Copyright 2016 Ziyun Technology, Inc.
* Licensed under the MIT license
*/
// jQuery to collapse the navbar on scroll
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-top").addClass("top-nav-collapse");
$(".sc... | mit |
BartKrol/tvmanager | client/src/components/shows/shows.service.js | 378 | 'use strict';
/*jshint esnext: true */
function popularShows($http) {
var popularShows = $http.get('/api/v1/popular').
success(function(data, status, headers, config) {
return data;
}).
error(function(data, status, headers, config) {
});
return {
popularShows: popularShows
};
}
popula... | mit |
SirKettle/myPortfolio | src/app/views/about/about.js | 2036 | 'use strict';
var angular = require('angular');
var template = require('./about.html');
// sub components
var headerComponent = require('../../components/header/header');
var footerComponent = require('../../components/footer/footer');
var socialNetworksComponent = require('../../components/socialNetworks/socialNetwo... | mit |
knuu/competitive-programming | atcoder/abc/abc147_c.py | 504 | N = int(input())
notes = []
for _ in range(N):
note = []
for _ in range(int(input())):
x, y = map(int, input().split())
note.append((x-1, y))
notes.append(note)
ans = 0
for state in range(1 << N):
flag = True
for i in range(N):
if state >> i & 1:
for x, y in not... | mit |
twinh/wei | tests/unit/IsEmailTest.php | 858 | <?php
namespace WeiTest;
/**
* @internal
*/
final class IsEmailTest extends BaseValidatorTestCase
{
/**
* @dataProvider providerForEmail
* @param mixed $input
*/
public function testEmail($input)
{
$this->assertTrue($this->isEmail($input));
}
/**
* @dataProvider prov... | mit |
davcs86/Highcharts4Net | Highcharts4Net/Library/Options/PlotOptionsAreasplinerangeEvents.cs | 3299 |
using Highcharts4Net.Library.Helpers;
namespace Highcharts4Net.Library.Options
{
public class PlotOptionsAreasplinerangeEvents
{
/// <summary>
/// Fires after the series has finished its initial animation, or in case animation is disabled, immediately as the series is displayed.
/// </summary>
public Fu... | mit |
Rewtek/GameLibrary | Code/Rewtek.GameLibrary/Properties/AssemblyInfo.cs | 1597 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: A... | mit |
akshaykamath/StateReviewTrendAnalysisYelp | StateReviewTrendsPOC.py | 4899 | __author__ = 'Akshay'
"""
File contains code to Mine reviews and stars from a state reviews.
This is just an additional POC that we had done on YELP for visualising number of 5 star reviews per state on a map.
For each business per state, 5 reviews are taken and the count of the review is kept in the dictionary for e... | mit |
Orlion/Minor | app/Modules/Index/Tpl/Index/index.php | 1338 | <html>
<head>
<script type="text/javascript">
console.log('<?=$name ?>=A PHP Framework');
console.log('It just did what a framework should do.');
</script>
<style>
body {
padding-top: 10%;
background-color: #95CACA;
}
.minor-content{... | mit |
Tuna-CMS/tuna-bundle | src/Tuna/Component/Common/Traits/LocaleTrait.php | 452 | <?php
namespace TunaCMS\Component\Common\Traits;
use Gedmo\Mapping\Annotation as Gedmo;
trait LocaleTrait
{
/**
* @var string
*
* @Gedmo\Locale
*/
protected $locale;
/**
* @inheritdoc
*/
public function setLocale($locale)
{
$this->locale = $locale;
... | mit |
orion6912/mizonokuchi-lab | DbfluteProject/src/main/java/com/example/demo/dbflute/exbhv/TUsersBhv.java | 371 | package com.example.demo.dbflute.exbhv;
import com.example.demo.dbflute.bsbhv.BsTUsersBhv;
/**
* The behavior of t_users.
* <p>
* You can implement your original methods here.
* This class remains when re-generating.
* </p>
* @author DBFlute(AutoGenerator)
*/
@org.springframework.stereotype.Component("tUsersBh... | mit |
Institute-Web-Science-and-Technologies/LiveGovWP1 | server/HARTools/src/main/java/eu/liveandgov/wp1/classifier/UKOB_NEW_Classifier.java | 22173 | package eu.liveandgov.wp1.classifier;
// Generated with Weka 3.6.10
//
// This code is public domain and comes with no warranty.
//
// Timestamp: Fri Mar 07 15:58:54 CET 2014
public class UKOB_NEW_Classifier {
public static String getActivityName(int p) {
switch (p) {
case 0:
r... | mit |
dorianneto/laraticket | resources/lang/pt_BR/miscellaneous.php | 931 | <?php
return [
'dashboard' => 'Dashboard',
'auxiliary' => 'Auxiliar|Auxiliares',
'category' => 'Categoria|Categorias',
'department' => 'Departamento|Departamentos',
'priority' => 'Prioridade|Prioridades',
'ticket' => 'Ticket|Tickets',
'report' => 'Reportar',
'login' => 'Login',
... | mit |
michaelkauflin/TestHelperExtensions | TestHelperExtensions.Test/StringExtensions_GetRandom_Should.cs | 1698 | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestHelperExtensions.Test
{
[TestClass]
public class StringExtensions_GetRandom_Should
{
[TestMethod]
public void ReturnAStringOfLength8IfNoLengthSpecified()
{
var actual = string.Empty.GetRando... | mit |
vasyahacker/fdream | libs/objects.rb | 13352 | # -*- coding: utf-8 -*-
###############
#Objects/items#
###############
class Obj
attr_accessor :id, :type, :names, :names_string, :data, :descriptions,
:static, :id_parent, :parent_type, :number_of_uses,
:code, :adjectives, :descr, :id_owner
attr_reader :silence_flag
def initi... | mit |
AnaSula/NYU-Python-Programming-Class | intro-programming/assignment_5/controlled_fall.py | 931 | import math
import math
def get_fall_time(height):
# gravity isn't going to change, units in m/(s^2)
acceleration_by_gravity = 9.8
time_elapsed = math.sqrt((2 * height) / acceleration_by_gravity)
return time_elapsed
get_fall_time(15)
def isVulnerable(tower_height, tower_x, tower_y, target_x, target... | mit |
rhythm-section/guh-libjs | src/models/device-class-state-type-model-service.js | 2912 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2015 Lukas Mayerhofer <lukas.mayerhofer@guh.guru> *
* ... | mit |
concord-consortium/lara | db/migrate/20160313031738_add_index_to_portal_publications.rb | 157 | class AddIndexToPortalPublications < ActiveRecord::Migration
def change
add_index :portal_publications, [:publishable_id, :publishable_type]
end
end
| mit |
nusedutech/coursemology.org | app/assets/javascripts/application.js | 15428 | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | mit |
EncontrAR/backoffice | src/containers/Charts/reactVis/charts/candleStick/candlestick.js | 2263 | import React from 'react';
import { AbstractSeries } from 'react-vis';
const predefinedClassName = 'rv-xy-plot__series rv-xy-plot__series--candlestick';
export default class CandlestickSeries extends AbstractSeries {
render() {
const {className, data, marginLeft, marginTop} = this.props;
if (!data) {
... | mit |
tlianglstyle/JZUI_V2 | build/js/Layout.js | 5726 | /* Layout()
* ========
* Implements AdminLTE layout.
* Fixes the layout height in case min-height fails.
*
* @usage activated automatically upon window load.
* Configure any options by passing data-option="value"
* to the body tag.
*/
+function ($) {
'use strict'
var DataKey = 'lte.layout'
... | mit |
hlex/vms | app/reducers/ads.js | 7397 | import _ from 'lodash';
import {
SET_FOOTER_ADS,
RESET_FOOTER_ADS,
SET_BASE_ADS,
REMEMBER_BASE_AD_PLAYING_INDEX,
ADD_PLAY_RECORD,
CLEAR_PLAY_RECORD
} from '../actions/actionTypes';
import {
normalizeStripAds
} from '../helpers/masterdata';
const stripAds = [
{
id: '4103',
type: 'image',
na... | mit |
GrinningHermit/Cozmo-Explorer-Tool | event_monitor.py | 6740 | """
Event Monitor for Cozmo
============================
Based on Event Monitor for cozmo-tools:
https://github.com/touretzkyds/cozmo-tools
Created by: David S. Touretzky, Carnegie Mellon University
Edited by: GrinningHermit
=====
"""
import re
import threading
import time
import cozmo
robot = None
q = None # de... | mit |
geekmakerteam/gdp | gdp_android/app/src/androidTest/java/gdp/com/gdp/ApplicationTest.java | 342 | package gdp.com.gdp;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Appli... | mit |
ThorbenKuck/NetCom | src/main/java/de/thorbenkuck/netcom/exceptions/CommandNotRegisteredException.java | 245 | package de.thorbenkuck.netcom.exceptions;
public class CommandNotRegisteredException extends RuntimeException {
public CommandNotRegisteredException(Class clazz) {
super("The command: " + clazz.getSimpleName() + " is not registered!");
}
}
| mit |
dertroglodyt/ScribeOP | src/main/java/de/dertroglodyt/scribeop/OPGameSystem.java | 687 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package de.dertroglodyt.scribeop;
import de.dertroglodyt.scribeop.json.JSONException;
import de.dertroglodyt.scribeop.json.JSONObject;
/**
*
* @author dertroglodyt
*/
public class OPGameSystem {
public final St... | mit |
Lunik/tcloud | src/server/model/search/jackett.js | 2268 | import Request from 'request-promise'
import { parseString } from 'xml2js'
export default class JackettAPI {
constructor (options) {
this.apiKey = options.apiKey
this.endpoint = options.endpoint
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0
}
_getUrl (query, category, count) {
return `${this.e... | mit |
tbossi/Aenigmata | src/com/tbossi/aenigmata/puzzle/crossword/Clue.java | 1165 | package com.tbossi.aenigmata.puzzle.crossword;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
public abstract class Clue<W extends Word<?,?>> {
private ObjectProperty<W> word;
private SimpleStringProperty clue;
pu... | mit |
raeffu/prog1 | src/_excercises/ch03/HouseComponent.java | 358 | package _excercises.ch03;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JComponent;
/**
This component draws a house.
*/
public class HouseComponent extends JComponent {
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D) g;
House house = new House(5, 10... | mit |
Microsoft/vscode | src/vs/workbench/common/editor/resourceEditorInput.ts | 6250 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | mit |
Karasiq/scalajs-highcharts | src/main/scala/com/highcharts/config/PlotOptionsMfiLabelStyle.scala | 903 | /**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highcharts]]
*/
package com.highcharts.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScri... | mit |
Lymia/CivV_Mod2DLC | project/LuaJITBuild.scala | 4529 | /*
* Copyright (c) 2015-2017 Lymia Alusyia <lymia@lymiahugs.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use,... | mit |
neekolas/uhuru-wiki | frontend/app.js | 548 | "use strict";
var isDeleted = require("./is-deleted");
require("./identify-user");
require("./enable-link-clicking");
if (!isDeleted) {
require("./paste");
require("./paste-media")(document.getElementById("content"));
require("./medium-editor");
require("./editor-initialize")();
//require("./upload-a... | mit |
e1r0nd/codewars | (6 kyu) IQ Test/(6 kyu) IQ Test.js | 1295 | // #1 Using for loop
// function iqTest(numbers) {
// numbers = numbers.split(' ');
// const evens = [];
// const odds = [];
// for (let i = 0; i < numbers.length; i++) {
// numbers[i] & 1 ? odds.push(i + 1) : evens.push(i + 1);
// }
// return evens.length === 1 ? evens[0] : odds[0];
// }
// #2 Using "s... | mit |
renatopp/ghost-editor | src/editor/project/managers/TreeManager.js | 2634 | b3e.project.TreeManager = function(editor, project) {
"use strict";
/**
* Adds a new tree to the project.
*/
this.add = function(_id) {
var tree;
if (_id instanceof b3e.tree.Tree) {
tree = _id;
project.addChild(tree);
editor.trigger('treeadded', tree);
this.select(tree);
... | mit |
substack/editor-timeline | lib/mark.js | 1313 | var fs = require('fs');
var html = fs.readFileSync(__dirname + '/mark.html', 'utf8');
var domify = require('domify');
var Left = require('./left.js');
var inherits = require('inherits');
var EventEmitter = require('events').EventEmitter;
module.exports = Mark;
inherits(Mark, EventEmitter);
function Mark (pos) {
v... | mit |