repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
lihanli/eternal-scroll
test/test.js
384
(function() { var times = 0 , $el = $('#load-more').click(function() { var $this = $(this); $this.hide(); setTimeout(function() { $this.show(); }, 250); $('.spacers').append('<div class="spacer"></div>'); times++; $('#output').text(times); }); window.scr...
mit
SpongePowered/SpongeForge
src/main/java/org/spongepowered/mod/plugin/SpongeModPluginManager.java
3110
/* * 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
petyodelta/ASP-NET-MVC
Orders/OrdersSystem/Models/OrdersSystem.Models/Order.cs
854
namespace OrdersSystem.Models { using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Common; public abstract class Order { public int Id { get; set; } [Required] [MinLength(ValidationConstants.Description...
mit
bwthomas/stachio
lib/stachio/version.rb
39
module Stachio VERSION = "0.2.1" end
mit
TheKevJames/dead-simple-ops
dsops/monitor_repos.py
4257
#!/usr/bin/env python """DeadSimpleMonitorRepos Usage: monitor-repos <org> [--port=PORT] [--conf=CONF] Options: --port=PORT Host the monitor on a specific port. [default: 5000] --conf=CONF Specified config file. --version Show version. -h --help Show this screen. """ from flask imp...
mit
davidwparker/programmingtil-webgl
0024-random-color-pixels/libs/uiUtils.js
472
(function(global){ var uiUtils = { VERSION : '0.0.1', pixelInputToGLCoord: function(event, canvas) { var x = event.clientX, y = event.clientY, midX = canvas.width/2, midY = canvas.height/2, rect = event.target.getBoundingClientRect(); x = ((x - rect.left) - midX) / midX; ...
mit
piotrlewalski/birdstorm
game/utils/patch.py
809
import rest_framework.fields from sockjs.tornado.basehandler import BaseHandler #TODO add a comment from sockjs.tornado.transports.websocket import WebSocketTransport def strip_multiple_choice_msg(_): return '' rest_framework.fields.strip_multiple_choice_msg = strip_multiple_choice_msg #mitigates following ex...
mit
rafaeljuzo/makeuptown
site/controllers/admin/AdminTabsController.php
9491
<?php /* * 2007-2013 PrestaShop * * 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...
mit
siddharthsudheer/lumX-fontAwesome
build/js/templates/file-input_template.js
334
angular.module("lumx.file-input").run(['$templateCache', function(a) { a.put('file-input.html', '<div class="input-file">\n' + ' <span class="input-file__label" ng-bind-html="label | unsafe"></span>\n' + ' <span class="input-file__filename"></span>\n' + ' <input type="file">\n' + '</div>\n' + ...
mit
oleiade/Dormeur
dormeur/response/middlewares.py
974
# -*- coding: utf-8 -*- # Copyright (c) 2012 theo crevon # # See the file LICENSE for copying permission. from functools import wraps def with_headers(headers): """Middleware updating response header with provided datas. Parameters ---------- list(tuples) : headers A list of key/value headers wrapped in tuples...
mit
jeremywohl/moviebot
tests/mock_slack.rb
255
# # Slack mock # class SlackMock attr :history def initialize @history = [] end def pop @history.pop end def say(s) Thread.new { COMMANDS.handle_msg(s) }.join end def notify(s, opts={}) @history << s end end
mit
lijeffreytli/GeoBeacon
src/com/geobeacondev/geobeacon/ShareMyLocation.java
21548
package com.geobeacondev.geobeacon; import java.util.ArrayList; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; import android.app.PendingIntent; import android.app.ProgressDialog; import android.content.BroadcastReceiver; import android....
mit
mtchavez/circleci
spec/support/checkout_keys.rb
219
# frozen_string_literal: true def test_checkout_key_fingerprint '3e:35:e0:96:f7:c8:23:9c:b8:2f:50:9e:d0:16:f7:05' end def test_delete_checkout_key_fingerprint '29:15:12:e8:f7:f4:17:7a:8f:cc:db:de:43:53:f4:73' end
mit
MihailDobrev/SoftUni
C# Fundamentals/C# OOP Advanced/BashSoft/BashSoftProgram/IO/Commands/DisplayCommand.cs
2903
namespace BashSoftProgram { using BashSoftProgram.Attributes; using BashSoftProgram.Contracts; using BashSoftProgram.Exceptions; using BashSoftProgram.IO.Commands; using System; using System.Collections.Generic; [Alias("display")] public class DisplayCommand : Command, IExecutable ...
mit
feedbin/feedbin
app/presenters/subscription_presenter.rb
1664
class SubscriptionPresenter < BasePresenter presents :subscription def graph_volume @template.number_with_delimiter(total_posts) end def total_posts counts.last(30).sum end def graph_date_start days.ago.to_formatted_s(:day_month).upcase end def graph_date_mid total_days = (Time.now -...
mit
davinnovation/TikiTaka
encog-examples/src/main/java/org/encog/examples/neural/cpn/RocketCPN.java
9437
/* * Encog(tm) Java Examples v3.3 * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-examples * * Copyright 2008-2014 Heaton Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ...
mit
tuupola/base85
src/Base85/PhpEncoder.php
3016
<?php declare(strict_types = 1); /* Copyright (c) 2017-2021 Mika Tuupola 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, cop...
mit
jonbo372/sipstack
sipstack-core/src/main/java/io/sipstack/transaction/event/impl/SipTransactionEventImpl.java
596
package io.sipstack.transaction.event.impl; import io.pkts.packet.sip.SipMessage; import io.sipstack.transaction.Transaction; import io.sipstack.transaction.event.SipTransactionEvent; /** * @author jonas@jonasborjesson.com */ public class SipTransactionEventImpl extends TransactionEventImpl implements SipTransactio...
mit
esjay/nonbots-bot
webpack.config.js
137
module.exports = { entry: './site/index.js', output: { path: './dist', filename: 'site.bundle.js' } };
mit
mattherman/MbDotNet
MbDotNet/Models/Predicates/MatchesPredicate.cs
604
using Newtonsoft.Json; using MbDotNet.Models.Predicates.Fields; namespace MbDotNet.Models.Predicates { public class MatchesPredicate<T> : PredicateBase where T : PredicateFields { [JsonProperty("matches")] public T Fields { get; private set; } public MatchesPredicate(T fields, bool is...
mit
mike-robertson/doctor_finder
client/app/app.js
633
'use strict'; angular.module('mrWebdesignApp', [ 'ngCookies', 'ngResource', 'ngSanitize', 'btford.socket-io', 'ui.router', 'ui.bootstrap', 'google-maps'.ns() ]) .config(['GoogleMapApiProvider'.ns(), function (GoogleMapApi) { GoogleMapApi.configure({ key: 'AIzaSyAaZm95uSnPabqgVJx9cpl2UbS...
mit
nikofil/go-dpi
modules/classifiers/rdp.go
1135
package classifiers import ( "encoding/binary" "github.com/google/gopacket" "github.com/google/gopacket/layers" "github.com/mushorg/go-dpi/types" "strings" ) // RDPClassifier struct type RDPClassifier struct{} // HeuristicClassify for RDPClassifier func (classifier RDPClassifier) HeuristicClassify(flow *types.F...
mit
CSClassroom/CSClassroom
Services/test/CSClassroom/CSClassroom.Service.UnitTests/Assignments/QuestionResolvers/QuestionResolverUnitTestBase.cs
1624
using System; using System.Collections.Generic; using System.Text; using Castle.DynamicProxy.Generators.Emitters.SimpleAST; using CSC.CSClassroom.Model.Assignments; using CSC.CSClassroom.Model.Classrooms; using CSC.CSClassroom.Model.Users; using CSC.CSClassroom.Service.UnitTests.Utilities; namespace CSC.CSClassroom.S...
mit
thomasvanhorde/self-engine
inc/class/external/zend/Gdata/YouTube/Extension/Token.php
2269
<?php /** * zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license a...
mit
vue-bulma/vue-bulma
packages/vue-bulma-examples/src/code/components/navbar.js
5253
let code = {} code.basic = `\ <vb-navbar> <vb-navbar-item slot="brand"> <a> <img src="https://bulma.io/images/bulma-logo.png" width="112" height="28" alt="Bulma"> </a> </vb-navbar-item> <vb-navbar-item> <vb-icon name="fa fa-home" iconSize="lg"></vb-icon> </vb-navbar-item> <vb-navbar-item>...
mit
LeoPlatform/PHP
src/lib/Stream.php
1172
<?php namespace LEO; class Stream { private $id; private $opts; private $config; public function __construct($id=null, $opts=[]) { $this->id = $id; $this->opts = array_merge([ "enableLogging"=>false, "version"=>"latest", "server"=>gethostname(), "uploader"=>"firehose" ],$opts); $this->config ...
mit
ozburo/babushka
example/models.py
943
# -*- coding: utf-8 -*- """ example.models.py """ from google.appengine.ext.ndb import model from babushka.model import BabushkaModel # -------------------------------------------------------------------- # Blog Model # -------------------------------------------------------------------- class Blog(BabushkaModel):...
mit
corker/estuite
Estuite.StreamStore/AggregateId.cs
322
using System; namespace Estuite.StreamStore { public class AggregateId { public AggregateId(string value) { if (string.IsNullOrWhiteSpace(value)) throw new ArgumentOutOfRangeException(nameof(value)); Value = value; } public string Value { get; } } }
mit
ajlopez/SharpMongo
Src/SharpMongo.Language/Commands/ExitCommand.cs
332
namespace SharpMongo.Language.Commands { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class ExitCommand : ICommand { public object Execute(Context context) { throw new NotImplementedException(); } ...
mit
kanonirov/lanb-client
src/main/java/ru/lanbilling/webservice/wsdl/DelPacketResponse.java
1709
package ru.lanbilling.webservice.wsdl; import javax.annotation.Generated; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * ...
mit
aulas-lab/ads-and
SQLiteLab/app/src/main/java/br/unopar/sqlitelab/MainActivity.java
3315
package br.unopar.sqlitelab; import android.app.AlertDialog; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.vi...
mit
nickjanssen/react-native-swipe-a-lot
example/root.js
4666
import React, { PropTypes } from 'react' import { View, Text, Image } from 'react-native' import SwipeALot from '../src/index' const styles = { wrapper: { flex: 1, }, image: { flex: 1, // tintColor: 'blue', // resizeMode: 'cover', // justifyContent: 'center', alignItems: 'center', w...
mit
GaryCas/Vermello
src/VM/CoreBundle/Tests/Controller/DefaultControllerTest.php
396
<?php namespace VM\CoreBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class DefaultControllerTest extends WebTestCase { public function testIndex() { $client = static::createClient(); $crawler = $client->request('GET', '/hello/Fabien'); $this->assertTr...
mit
yannickcr/pw2014-isomorphic
tasks/start.js
171
'use strict'; module.exports = function(grunt) { grunt.registerTask('start', 'Start the server and watch for file change', ['browserify:dist', 'concurrent:start']); };
mit
wavebeem/battenberg
app/src/js/paginator.js
714
function Paginator(pageSize, currentPage, data) { function pageCount() { return Math.ceil(data.length / pageSize); } function isOnFirstPage() { return currentPage === 1; } function isOnLastPage() { return currentPage === pageCount(); } function goToPrevPage() { currentPage = Math.max(cu...
mit
strillo/JEFF
JEFF.Portal/Startup.cs
478
using Microsoft.Owin; using Owin; [assembly: OwinStartupAttribute(typeof(JEFF.Portal.Startup))] namespace JEFF.Portal { /// <summary> /// Startup /// </summary> public partial class Startup { /// <summary> /// Configures the specified application. /// </summary> //...
mit
MomentumCMS/momentum_cms
spec/models/momentum_cms/entry_spec.rb
83
require_relative '../../rails_helper' describe MomentumCms::Entry, 'Model' do end
mit
coreation/Cachet
app/views/dashboard/incidents/add.blade.php
5762
@extends('layout.dashboard') @section('content') <div class="header"> <div class="sidebar-toggler visible-xs"> <i class="icon ion-navicon"></i> </div> <span class="uppercase"> <i class="icon icon ion-android-alert"></i> {{ trans('dashboard.incidents.incidents') }} ...
mit
dynamicform/dynamicform-react-client
src/components/elements/TimePicker.js
3553
/** * Created by KangYe on 2017/4/24. */ import React from 'react'; import {connect} from 'react-redux'; import moment from 'moment'; import {TimePicker, Form} from 'antd'; import _ from 'lodash'; import {initFormData,initDynamicFormData ,updateFormData,updateDynamicFormData} from '../../actions/formAction'; import {...
mit
kakakaya/tweetsave-python
setup.py
835
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Author: kakakaya, Date: Sat Feb 4 18:59:06 2017 from setuptools import setup, find_packages setup( name="tweetsave", version="1.1.0", description='A Python3 library for https://tweetsave.com', author='kakakaya', author_email="kakakaya@gmail.com", ...
mit
adaltas/node-nikita
packages/core/lib/actions/fs/base/stat.js
5501
// Generated by CoffeeScript 2.6.1 // # `nikita.fs.base.stat` // Retrieve file information. // ## File information // The `mode` parameter indicates the file type. For conveniency, the // `@nikitajs/core/lib/utils/stats` module provide functions to check each // possible file types. // ## Example // Check if targe...
mit
gfmio/Whitespace
src/js/whitespace.dist.js
376
// // Whitespace JS browser component library // var whitespace = require('./whitespace.lib').whitespace; if (typeof window != "undefined") { // Export as global browser variable window.whitespace = whitespace; $().ready(function(){ // $("input[type=color]").spectrum({}); $('input[type="range"]')...
mit
stl-florida/casestudy-riskmap
node_modules/aurelia-dependency-injection/dist/native-modules/aurelia-dependency-injection.js
21199
var _dec, _class, _dec2, _class3, _dec3, _class5, _dec4, _class7, _dec5, _class9, _dec6, _class11, _dec7, _class13, _classInvokers; import { protocol, metadata } from 'aurelia-metadata'; import { AggregateError } from 'aurelia-pal'; export var resolver = protocol.create('aurelia:resolver', function (target) { if ...
mit
cryptoquick/evweb
Version2/ShipMovement.js
1727
// Define global variables var MoveX = 0; var MoveY = 0; var SpeedX = 0; var SpeedY = 0; var otherShipX; // curX = document.getElementById('PlanetLayer').style.top; // curX = curX.substring(0, curX.length - 2); // curY = document.getElementById('PlanetLayer').style.left; // curY = curY.substring(...
mit
kaelzhang/switch
plugins/cleaner.js
2952
'use strict'; /** * temporarily remove unnecessary items away from the container */ var _ = require('underscore'); var METHODS_OVERRIDDEN = { _cleanItems: function() { var self = this, activeIndex = self.activeIndex, rightIndexOfStage = activeIndex + self.get('stage') - 1, testDistance = C...
mit
DJTobias/JetsonTX1
gst_cam_test.py
1173
# copied from https://gist.github.com/jampekka/ec4a3f3a3748fd2a281d/ import numpy as np import cv2 import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst def gst_to_opencv(gst_buffer): return np.ndarray((480,640,3), buffer=gst_buffer.extract_dup(0, gst_buffer.get_size()), dtype=np.uint...
mit
Felorati/Thesis
code/Tests/Multiverse/multiverse-core/src/test/java/org/multiverse/commitbarriers/CountDownCommitBarrier_joinCommitUninterruptiblyWithTransactionTest.java
7108
package org.multiverse.commitbarriers; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.multiverse.TestThread; import org.multiverse.api.Txn; import org.multiverse.api.TxnStatus; import org.multiverse.api.callables.TxnVoidCallable; import org.multiverse.api.ex...
mit
Sugarfooot/VeggyBot
Assets/Scripts/InGame/Bonus/WaterPill.js
219
#pragma strict function Start () { } function Update () { } function OnTriggerEnter (collider : Collider){ if (collider.CompareTag("Player")){ UIManager.Instance().FillWaterTank(); Destroy(gameObject); } }
mit
6iplus/music_wall
startup.js
2009
var MongoClient = require('mongodb').MongoClient, settings = require('./config.js'), Guid = require('Guid'); var fullMongoUrl = settings.mongoConfig.serverUrl + settings.mongoConfig.database; function runSetup() { return MongoClient.connect(fullMongoUrl) .then(function(db) { r...
mit
dreamineering/start.ionic
tasks/karma.js
357
'use strict'; // path config var cfg = require('../gulp_config'); // gulp and general utils var gulp = require('gulp'); // karma var karma = require('gulp-karma'); module.exports = gulp.task('karma', ['lint'], function () { return gulp.src(cfg.test.js) .pipe(karma({ configFile: 'test/karma/karma.conf.j...
mit
jaykang920/x2boost
include/x2boost/event_sink.hpp
733
// Copyright (c) 2014-2017 Jae-jun Kang // See the file LICENSE for details. #ifndef X2BOOST_EVENT_SINK_HPP_ #define X2BOOST_EVENT_SINK_HPP_ #ifndef X2BOOST_PRE_HPP_ #include "x2boost/pre.hpp" #endif #include <boost/weak_ptr.hpp> namespace x2boost { class X2BOOST_API event_sink { public: virtual...
mit
hshoff/vx
packages/visx-demo/src/pages/network.tsx
485
import React from 'react'; import Show from '../components/Show'; import Network from '../sandboxes/visx-network/Example'; import NetworkSource from '!!raw-loader!../sandboxes/visx-network/Example'; import packageJson from '../sandboxes/visx-network/package.json'; const NetworkPage = () => ( <Show component={Net...
mit
franklingu/leetcode-solutions
questions/groups-of-special-equivalent-strings/Solution.py
1851
""" You are given an array A of strings. Two strings S and T are special-equivalent if after any number of moves, S == T. A move consists of choosing two indices i and j with i % 2 == j % 2, and swapping S[i] with S[j]. Now, a group of special-equivalent strings from A is a non-empty subset S of A such that any stri...
mit
neogeek/reader.py
fetch_remote_file.py
972
import os import datetime import requests def fetch_remote_file(url, cache = '', expire = 0): if cache and expire: expire = (datetime.datetime.now() - datetime.timedelta(minutes=expire)).strftime('%s') if not os.path.isfile(cache) or int(os.path.getmtime(cache)) < int(expire): try:...
mit
wolfogre/AndroidProgramming
ActivityTaskFragment/ActivityLifeCycleSample/src/main/java/com/example/me/activitylifecyclesample/SecondActivity.java
1884
package com.example.me.activitylifecyclesample; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.RelativeLayout; public class SecondActivity extends AppCompat...
mit
gviau/sketch-3d
sketch3d-main/src/render/Renderer.cpp
10268
#include "render/Renderer.h" #include "math/Constants.h" #include "math/Sphere.h" #include "render/OpenGL/RenderSystemOpenGL.h" #include "system/Platform.h" // Windows is the only OS where it makes sense to have DirectX #if PLATFORM == PLATFORM_WIN32 #include "render/Direct3D9/RenderSystemDirect3D9.h" #endif #incl...
mit
will14smith/Toxon.Fonts
src/Toxon.Fonts.Application/Properties/AssemblyInfo.cs
835
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: AssemblyConfigurat...
mit
jupiny/MIDASChallenge2017
midas_web_solution/midas_web_solution/settings/partials/static.py
359
# Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.11/howto/static-files/ import os from .base import BASE_DIR, PROJECT_ROOT_DIR STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), ) # Media files MEDIA_ROOT = os.path.join( PROJECT_ROOT_DIR, "dist"...
mit
kolocoda/Debt-Manager
app/src/main/java/com/chikeandroid/debtmanager/util/NetworkUtil.java
916
package com.chikeandroid.debtmanager.util; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public final class NetworkUtil { private NetworkUtil() { } /** * Returns true if the Throwable is an instance of RetrofitError with an * http stat...
mit
markkimsal/php-raft
src/raft/msghandler.php
4846
<?php /** * Raft consensus algorithm * * Copyright 2015 Mark Kimsal * * 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
roydejong/midway-editor
src/midway-toolbar-button.js
497
/** * A reusable instance of a toolbar button. * @constructor */ var MidwayToolbarButton = function (id, label) { this.id = id; this.label = "Button"; this.icon = this.id; this.style = ''; if (label) { this.label = label; } this.apply = function (midway, selection) { // ...
mit
lixar/giant
giant/plugins/client/objc_ios/objc_ios/objc_ios/examples.py
5539
#!/usr/bin/env python import random from collections import defaultdict from giant.giant_base.giant_base import GiantError def raise_(ex): raise ex swagger_to_objc_enum_example_map = { 'string': defaultdict(lambda: lambda enum: '@"' + random.choice(enum) + '"', { 'guid': lambda enum: '@"'...
mit
kidshenlong/warpspeed
Project Files/Assets/Scripts/Editor/StateRemoveComponentInspector.cs
587
using UnityEngine; using UnityEditor; [CustomEditor(typeof(StateRemoveComponentScript))] public class StateRemoveComponentInspector : Editor { private StateRemoveComponentScript remover; public void OnEnable() { remover = (StateRemoveComponentScript)target; } public override void OnInspe...
mit
yaseenagag/pizza-restaurant
src/server/routes/preference.js
1765
const dbPreference = require('../../models/preference.js'); const router = require('express').Router(); const renderError = require('../utils.js'); router.post('/', (request, response, next) => { dbPreference.createPreference(request.body) .then(function(preference) { if (preference) return response.redirect(`...
mit
gulian/fuzzy-octo-hipster
routes/article.js
3211
exports.retreive = function(req, res){ var request = req.params.id ? { _id : req.params.id } : null ; req.mongoose.models.article.find(request).sort({created: -1}).populate('user', 'email').populate('comments').exec(function(error, articles){ req.mongoose.models.user.populate(articles, { ...
mit
gschrader/ratpack-react-boilerplate
react/src/Login.js
2436
import React, { useState } from 'react'; import {Alert, Button, FormControl, FormGroup, Modal} from 'react-bootstrap'; import {Redirect} from 'react-router-dom'; import {AuthConsumer} from './AuthContext' function Login() { const [username, setUsername] = useState(''); const [password, setPassword] = useState(...
mit
charliesome/opal
spec/language/ensure_spec.rb
2633
module EnsureSpec class Container attr_reader :executed def initialize @executed = [] end def raise_in_method_with_ensure @executed << :method raise "An Exception" ensure @executed << :ensure end def raise_and_rescue_in_method_with_ensure @executed << :meth...
mit
wkevina/feature-requests-app
features/tests/test_models.py
2927
import django.db from django.test import TestCase from ..models import Client, ProductArea, FeatureRequest class ModelSanityTests(TestCase): def test_client(self): name = 'ClientA' # Check that the universe is roughly logical client_A = Client(name=name) client_A.save() as...
mit
lpdw/Stratajm
src/AdminBundle/Resources/public/js/bootstrap-table-export.js
5128
/** * @author zhixin wen <wenzhixin2010@gmail.com> * extensions: https://github.com/kayalshri/tableExport.jquery.plugin */ (function ($) { 'use strict'; var sprintf = $.fn.bootstrapTable.utils.sprintf; var TYPE_NAME = { json: 'JSON', xml: 'XML', png: 'PNG', csv: 'CSV', ...
mit
ikikai/HelpIn
db/migrate/20160528145121_create_experts.rb
281
class CreateExperts < ActiveRecord::Migration def change create_table :experts do |t| t.string :name t.string :email, unique: true t.text :bio t.string :specialization t.decimal :rating t.timestamps end end end
mit
f500/equatable
src/Exceptions/InRangeException.php
519
<?php /** * @license https://github.com/f500/equatable/blob/master/LICENSE MIT */ declare(strict_types=1); namespace F500\Equatable\Exceptions; use OutOfRangeException as BaseException; /** * @copyright Copyright (c) 2015 Future500 B.V. * @author Jasper N. Brouwer <jasper@future500.nl> */ final class InRan...
mit
laura333/Q1-project
js/init.js
1731
'use strict'; $(document).ready(function() { console.log('Let\'s do this!'); $('.button-collapse').sideNav(); $('.parallax').parallax(); $('.modal').modal(); var answers = {}; $('.gender').on('click', function(event) { event.preventDefault(); var $elmf = $(event.target); ...
mit
noelheesen/Ensured
Ensured/Ensure.cs
8825
namespace Ensured { using System; using System.Linq.Expressions; /// <summary> /// Exposes methods to validate values /// </summary> /// <remarks> /// The only public class for the API. /// </remarks> public static class Ensure { /// <summary> /// This method pr...
mit
juanhm93/proyecto
application/models/excel_data_insert_model.php
1902
<?php class Excel_data_insert_model extends CI_Model { public function __construct() { parent::__construct(); } public function gerencia($g){ $this->db->insert('gerencia',$g); } public function categoria($categ){ $this->db->insert('categoria',$categ); } ...
mit
stolinski/st2017
src/pages/projects.js
2311
import React from 'react'; import Layout from '../components/Layout'; import { Title, MainWrapper } from '../components/Headings'; import { ProjectsList } from '../components/ProjectsStyles'; const projects = [ { title: 'Level Up Tutorials', link: 'https://www.leveluptutorials.com/', desc: '2000+ ...
mit
paymentwall/paymentwall-ruby
features/step_definitions/charge.rb
749
When(/^test token is retrieved$/) do pending # Write code here that turns the phrase above into concrete actions end Then(/^charge should be successful$/) do pending # Write code here that turns the phrase above into concrete actions end Given(/^charge ID "([^"]*)"$/) do |arg1| pending # Write code here that tu...
mit
elmanortiz/adminbeard
src/ERP/AdminBundle/Entity/ClientePotencial.php
8030
<?php namespace ERP\AdminBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * ClientePotencial * * @ORM\Table(name="cliente_potencial", indexes={@ORM\Index(name="fk_cliente_potencial_contacto1_idx", columns={"contacto_id"})}) * @ORM\Entity */ class ClientePotencial { /** * @var integer * * @...
mit
girub/accreditamenti
app/DoctrineMigrations/Version20120830105303.php
1007
<?php namespace Application\Migrations; use Doctrine\DBAL\Migrations\AbstractMigration, Doctrine\DBAL\Schema\Schema; /** * Auto-generated Migration: Please modify to your need! */ class Version20120830105303 extends AbstractMigration { public function up(Schema $schema) { // this up() migration...
mit
kraumor/symblog
src/Blogger/BlogBundle/Entity/Repository/BlogRepository.php
1793
<?php namespace Blogger\BlogBundle\Entity\Repository; use Doctrine\ORM\EntityRepository; /** * BlogRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class BlogRepository extends EntityRepository { public function getLatestBlogs($limit = null) ...
mit
codeandcats/delaunay-animation-editor
client/typescripts/app/actions/fileDialogs.ts
1907
import { ActionType, IAction, IProjectAttributes } from '../models'; export interface IShowNewProjectDialog extends IAction { } export interface ICancelNewProjectDialog extends IAction { } export interface IProjectFileNamesAction extends IAction { fileNames: string[]; } export interface IUpdateAllProjectFileNamesA...
mit
Mohammad-Alavi/Samandoon
app/Containers/NGO/UI/API/Routes/FindNgoByPublicName.v1.private.php
556
<?php /** * @apiGroup NGO * @apiName findNgoByPublicName * * @api {GET} /v1/ngo/get/{public_name} Find NGO by Public Name * @apiDescription Search a NGO in local DB and return it's data if ngo is found * * @apiVersion 1.0.0 * @apiPermission none * * @apiUs...
mit
bodrovis/ChgkRating
lib/chgk_rating/collections/tournaments/tournament_team_players.rb
540
module ChgkRating module Collections class TournamentTeamPlayers < Base attr_reader :team, :tournament def initialize(params = {}) @tournament = build_model params[:tournament], ChgkRating::Models::Tournament @team = build_model params[:team] super end private ...
mit
SMarone/NDInterp
NDimInterp.py
62528
import numpy as np from scipy import spatial from scipy.sparse import csc_matrix import scipy.sparse.linalg as spsl import scipy.interpolate as interp from matplotlib import cm import matplotlib.pyplot as plt import time import math from mpl_toolkits.mplot3d import Axes3D import copy as cp from matplotlib.backends.ba...
mit
white-cats/white-cat
src/demos/components/CheckBox/CheckBoxSize.tsx
382
import * as React from 'react' import {CheckBox} from '../../../index' export interface ICheckBoxSizeProps {} export default class CheckBoxSize extends React.Component<ICheckBoxSizeProps> { render () { return ( <div> <CheckBox size='small'>小</CheckBox> <CheckBox>中</CheckBox> <Chec...
mit
transcranial/keras-js
src/layers/convolutional/Conv1D.js
3986
import Layer from '../../Layer' import Tensor from '../../Tensor' import Conv2D from './Conv2D' import * as tensorUtils from '../../utils/tensorUtils' import ops from 'ndarray-ops' import squeeze from 'ndarray-squeeze' import unsqueeze from 'ndarray-unsqueeze' /** * Conv1D layer class */ export default class Conv1D ...
mit
MarimerLLC/csla
Source/Csla.Blazor/EditContextCslaExtensions.cs
3869
using System; using System.Collections.Generic; using System.Text; using Csla.Core; using Csla.Rules; using Microsoft.AspNetCore.Components.Forms; namespace Csla.Blazor { /// <summary> /// Implements extension methods for edit context. /// </summary> public static class EditContextCslaExtensions { /// <...
mit
mattatz/unity-teddy
Assets/Teddy/Scripts/Drawer.cs
3647
using UnityEngine; using System; using System.IO; using System.Linq; using System.Collections; using System.Collections.Generic; using mattatz.Utils; using mattatz.Triangulation2DSystem; namespace mattatz.TeddySystem.Example { public enum OperationMode { Default, Draw, Move }; public class Drawer : MonoB...
mit
aggiedefenders/aggiedefenders.github.io
node_modules/chordsheetjs/lib/chord_sheet/song.js
2746
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va...
mit
virtualstaticvoid/human_faktor
app/models/demo_request.rb
636
class DemoRequest < ActiveRecord::Base belongs_to :country default_values :identifier => lambda { TokenHelper.friendly_token }, :country => lambda { Country.default }, :trackback => false validates :identifier, :presence => true, :uniqueness => true # contact details vali...
mit
bonnici/scrobble-along-scrobbler
scrapers/json/DigMusicScraper.js
2009
"use strict"; /// <reference path="../../definitions/typescript-node-definitions/winston.d.ts"/> /// <reference path="../../definitions/DefinitelyTyped/underscore/underscore.d.ts"/> var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } ins...
mit
zachdimitrov/Homework
CSharp-OOP/CSharpOOPWorkshop/SocietiesCore/Contracts/IConsumable.cs
264
namespace SocietiesCore.Contracts { using Infrastructure.Enumerations.Common; using System; using System.Collections.Generic; public interface IConsumable { BeverageType Type { get; set; } decimal Price { get; set; } } }
mit
shaggy8871/frame
src/Frame/Response/StdOut.php
480
<?php namespace Frame\Response; /* * For CLI sapi only */ class StdOut extends Foundation implements ResponseInterface { /* * Render must send through a string */ public function render($params = null) { $params = ($params != null ? $params : $this->viewParams); if (!is_str...
mit
derekgraham/portfolio
scripts/models/experience.js
254
(function(module) { var experience = {}; experience.all = []; experience.getData = function(callback) { experience.all = experienceData; callback(); }; module.experience = experience; // module.followers = followers; })(window);
mit
Semyonic/Study
Java/BinaryHeap.java
2181
import java.util.*; public class BinaryHeap<T extends Comparable<T>> { private T[] arr; private int total; private boolean max; public BinaryHeap(int capacity, boolean isMax) { arr = (T[]) new Comparable[capacity]; total = 0; max = isMax; } public BinaryHeap(boo...
mit
Gary-Moore/DevOps-Portal
DevOps.Portal.Application/ActionResponse.cs
322
using System.Collections.Generic; namespace DevOps.Portal.Application { public class ActionResponse { public bool Success { get; set; } public IEnumerable<string> Errors { get; set; } } public class ActionResponse<T> : ActionResponse { public T Data { get; set; } } }
mit
winiceo/pm_pmker
app/controller/api/activity.js
7383
'use strict'; const Parse = require('../../lib/parse'); const moment = require('moment'); const _ = require('lodash'); const Activity = Parse.Object.extend('activity'); // 活动管理 // cate 'dzp','zjd' module.exports = app => { class ActivityController extends app.Controller { * list() { const {ctx...
mit
beathan/django-ajax-filtered-fields
ajax_filtered_fields/forms/fields.py
10078
# -*- coding: utf-8 -*- from django import forms from django.forms.util import ValidationError from django.utils.translation import ugettext as _ from ajax_filtered_fields.forms import FilteredSelectMultiple, FilteredSelect from ajax_filtered_fields import utils class AjaxManyToManyField(forms.ModelMultipleChoiceFiel...
mit
DiegoPatrocinio/ArcMovies
ArcMovies/ArcMovies/Helpers/ObservableRangeCollection.cs
3307
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; namespace ArcMovies.Helpers { /// <summary> /// Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole l...
mit
lucasjo/todo
src/main/resources/public/bower_components/angular-material/modules/js/radioButton/radioButton.js
10725
/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.1.1-master-342ee53 */ (function( window, angular, undefined ){ "use strict"; /** * @ngdoc module * @name material.components.radioButton * @description radioButton module! */ mdRadioGroupDirective['$inject'] = ["$mdUtil", ...
mit
fog/fog-brightbox
lib/fog/brightbox/requests/compute/get_database_snapshot.rb
735
module Fog module Brightbox class Compute class Real # @param [String] identifier Unique reference to identify the resource # @param [Hash] options # @option options [Boolean] :nested passed through with the API request. When true nested resources are expanded. # # @r...
mit