code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
<?php
class C_admin extends CI_Controller {
public function __construct() {
parent::__construct();
if($this->session->userdata('level') != 'admin') {
redirect('auth'); }
}
public function index() {
$data['username'] = $this->session->userdata('username');
$this->load->view('dashboard_admin', $data);
... | dinanandka/MonitoringKP_KPPL | application/controllers/c_admin.php | PHP | mit | 787 |
var blueMarker = L.AwesomeMarkers.icon({
icon: 'record',
prefix: 'glyphicon',
markerColor: 'blue'
});
var airportMarker = L.AwesomeMarkers.icon({
icon: 'plane',
prefix: 'fa',
markerColor: 'cadetblue'
});
var cityMarker = L.AwesomeMarkers.icon({
icon: 'home',
markerColor: 'red'
});
var... | alemela/wiki-needs-pictures | js/icons.js | JavaScript | mit | 431 |
<?php
namespace Phossa\Cache;
interface CachePoolInterface
{
}
class CachePool implements CachePoolInterface
{
}
class TestMap {
private $cache;
public function __construct(CachePoolInterface $cache) {
$this->cache = $cache;
}
public function getCache() {
return $this->cache;
}
... | phossa/phossa-di | tests/src/Phossa/Di/testData6.php | PHP | mit | 322 |
/**
* jspsych plugin for categorization trials with feedback and animated stimuli
* Josh de Leeuw
*
* documentation: docs.jspsych.org
**/
jsPsych.plugins["categorize-animation"] = (function() {
var plugin = {};
jsPsych.pluginAPI.registerPreload('categorize-animation', 'stimuli', 'image');
plugin.info = ... | wolfgangwalther/jsPsych | plugins/jspsych-categorize-animation.js | JavaScript | mit | 8,599 |
<?php
/*
* This file is part of the Pho package.
*
* (c) Emre Sokullu <emre@phonetworks.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Pho\Lib\Graph;
/**
* Holds the relationship between nodes and edges.
*
*... | phonetworks/pho-lib-graph | src/Pho/Lib/Graph/EdgeList.php | PHP | mit | 11,362 |
package me.august.lumen.data;
import me.august.lumen.compile.resolve.data.ClassData;
import me.august.lumen.compile.resolve.lookup.DependencyManager;
import org.junit.Assert;
import org.junit.Test;
public class DataTest {
@Test
public void testClassData() {
ClassData data = ClassData.fromClass(String... | augustt198/lumen | src/test/java/me/august/lumen/data/DataTest.java | Java | mit | 1,850 |
<?php
/**
* CodeBin
*
* @author CRH380A-2722 <609657831@qq.com>
* @copyright 2016 CRH380A-2722
* @license MIT
*/
/** 配置文件 */
/** 站点域名 */
define("SITEDOMAIN", "{SITE-DOMAIN}");
/** 数据库信息 */
//数据库服务器
define("DB_HOST", "{DB-HOST}");
//数据库用户名
define("DB_USER", "{DB-USER}");
//数据库密码
de... | CRH380A-2722/Code-Clipboard | config-sample.php | PHP | mit | 1,219 |
<?php
/**
* @package Response
* @subpackage Header
*
* @author Wojtek Zalewski <wojtek@neverbland.com>
*
* @copyright Copyright (c) 2013, Wojtek Zalewski
* @license MIT
*/
namespace Wtk\Response\Header\Field;
use Wtk\Response\Header\Field\AbstractField;
use Wtk\Response\Header\Field\FieldInterface;
/**
* Ba... | wotek/response-builder | src/Wtk/Response/Header/Field.php | PHP | mit | 1,319 |
'use strict';
var app = angular.module('Fablab');
app.controller('GlobalPurchaseEditController', function ($scope, $location, $filter, $window,
PurchaseService, NotificationService, StaticDataService, SupplyService) {
$scope.selected = {purchase: undefined};
$scope.currency = App.CONFIG.CURRENCY;
$s... | fabienvuilleumier/fb | src/main/webapp/components/purchase/purchase-edit-ctrl.js | JavaScript | mit | 4,952 |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ons;
import ons.util.WeightedGraph;
import org.w3c.dom.*;
/**
* The physical topology of a network refers to he physical layout of devices on
* a network, or to the way that the devices on a network are arra... | leiasousa/MySim | src/ons/PhysicalTopology.java | Java | mit | 6,858 |
require File.join [Pluct.root, 'lib/pluct/extensions/json']
describe JSON do
it 'returns false for invalid data' do
['', ' ', 'string'].each do |s|
expect(JSON.is_json?(s)).to be_false
end
end
it 'returns true for valid data' do
expect(JSON.is_json?('{"name" : "foo"}')).to be_true
end
end | pombredanne/pluct-ruby | spec/pluct/extensions/json_spec.rb | Ruby | mit | 319 |
module VhdlTestScript
class Wait
CLOCK_LENGTH = 2
def initialize(length)
@length = length
end
def to_vhdl
"wait for #{@length * CLOCK_LENGTH} ns;"
end
def in(ports)
self
end
def origin
self
end
end
end
| tomoasleep/vhdl_test_script | lib/vhdl_test_script/wait.rb | Ruby | mit | 271 |
class CreateUser < ActiveRecord::Migration
def up
create_table :users do |t|
t.integer :user_id, :limit => 8
t.string :screen_name
t.boolean :following, :default => false
t.boolean :followed, :default => false
t.boolean :unfollowed, :default => false
t.timestamp :followed_at
... | fdv/social-penis-enlargement | migrate.rb | Ruby | mit | 452 |
// WinProm Copyright 2015 Edward Earl
// All rights reserved.
//
// This software is distributed under a license that is described in
// the LICENSE file that accompanies it.
//
// DomapInfo_dlg.cpp : implementation file
//
#include "stdafx.h"
#include "winprom.h"
#include "DomapInfo_dlg.h"
#ifdef _DEBUG
#define new ... | edwardearl/winprom | winprom/DomapInfo_dlg.cpp | C++ | mit | 1,484 |
// MIT License
//
// Copyright( c ) 2017 Packt
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files( the "Software" ), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, mer... | PacktPublishing/Vulkan-Cookbook | Samples/Source Files/11 Lighting/01-Rendering_a_geometry_with_vertex_diffuse_lighting/main.cpp | C++ | mit | 27,469 |
# == Schema Information
#
# Table name: currencies
#
# id :integer not null, primary key
# name :string
# abbrev :string
# created_at :datetime not null
# updated_at :datetime not null
#
class Currency < ActiveRecord::Base
validates :name, :abbrev, presence: true
end
| nevern02/bread_exchange | app/models/currency.rb | Ruby | mit | 319 |
shared_examples 'collection::ansible' do
include_examples 'python::toolchain'
include_examples 'ansible::toolchain'
end
| webdevops/Dockerfile | tests/serverspec/spec/collection/ansible.rb | Ruby | mit | 128 |
<div class="form-group fg-float">
<div class="fg-line">
{!! Form::text('name', null, array('class' => 'form-control fg-input')) !!}
</div>
{!! Form::label('name', 'Name', array('class' => 'fg-label')) !!}
</div>
<div class="form-group fg-float">
<div class="fg-line">
{!! Form::textar... | freyr69/mh | resources/views/dom/count/partials/_form.blade.php | PHP | mit | 1,108 |
package exercise.task5_kingsGambitExtended.utils;
public class MessegeLogger {
public static void log(String message){
System.out.println(message);
}
}
| StoyanVitanov/SoftwareUniversity | Java Fundamentals/Java OOP Advanced/08.ObjectCommunication&Events/exercise/task5_kingsGambitExtended/utils/MessegeLogger.java | Java | mit | 170 |
<?php
/**
* Created by Khang Nguyen.
* Email: khang.nguyen@banvien.com
* Date: 10/3/2017
* Time: 9:33 AM
*/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Tin Đất Đai | Quản lý bài đăng</title>
<?php $this->load->view('/admin/common/header-j... | jnguyen095/real-estate | application/views/admin/product/list.php | PHP | mit | 13,824 |
import Form from 'cerebral-module-forms/Form'
import submitForm from './chains/submitForm'
import resetForm from './chains/resetForm'
import validateForm from './chains/validateForm'
export default (options = {}) => {
return (module, controller) => {
module.addState(Form({
name: {
value: '',
... | cerebral/cerebral-module-forms | demo/modules/Simple/index.js | JavaScript | mit | 1,344 |
namespace GarboDev
{
using System;
using System.Collections.Generic;
using System.Text;
public partial class Renderer : IRenderer
{
private Memory memory;
private uint[] scanline = new uint[240];
private byte[] blend = new byte[240];
private byte[] windowCover = new... | superusercode/RTC3 | Real-Time Corruptor/BizHawk_RTC/attic/GarboDev/Renderer.cs | C# | mit | 34,326 |
<?php
$data = array (
0 =>
array (
'id' => '3',
'name' => '三国杀',
'desc' => '三国演义',
'parent_id' => '0',
'has_child' => '0',
'is_show' => '0',
'level' => '1',
'type' => '0',
'sort' => '0',
),
);
?> | Bingle-labake/coollive.com.cn | public/data/static/prototype_cate_releate.php | PHP | mit | 254 |
<?php
namespace AppBundle\Controller;
use AppBundle\Entity\BillingAddress;
use AppBundle\Entity\ShippingAddress;
use AppBundle\Form\BillingAddressFormType;
use AppBundle\Form\ShippingAddressFormType;
use AppBundle\Form\ShippingMethodFormType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bun... | creative-junk/Webshop | src/AppBundle/Controller/CheckoutController.php | PHP | mit | 5,055 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MV... | gabrielsimas/SistemasExemplo | DDD/SPAAngularJSMVC/Solucao/MVCAngularJS.Aplicacao/Properties/AssemblyInfo.cs | C# | mit | 1,438 |
<?php
declare(strict_types=1);
/**
* This file is part of phpDocumentor.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @link http://phpdoc.org
*/
namespace phpDocumentor\Descriptor;
use Mockery\Adapter\Phpunit\MockeryTestCas... | rgeraads/phpDocumentor2 | tests/unit/phpDocumentor/Descriptor/CollectionTest.php | PHP | mit | 5,793 |
"use strict";
define("ace/snippets/scala", ["require", "exports", "module"], function (require, exports, module) {
"use strict";
exports.snippetText = undefined;
exports.scope = "scala";
}); | IonicaBizau/arc-assembler | clients/ace-builds/src/snippets/scala.js | JavaScript | mit | 198 |
<?php
/**
* Helper.
*
* @copyright Ralf Koester (RK)
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
* @author Ralf Koester <ralf@familie-koester.de>.
* @link http://k62.de
* @link http://zikula.org
* @version Generated by ModuleStudio (https://modulestudio.de).
*/
namespace... | rallek/helper | src/modules/RK/HelperModule/Controller/Base/AbstractExternalController.php | PHP | mit | 8,824 |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"errors"
"go/build"
"testing"
"github.com/golang/dep/internal/gps"
"github.com/golang/dep/internal/gps/pkgtree"
)
func TestInvalid... | variadico/etercli | vendor/github.com/golang/dep/cmd/dep/ensure_test.go | GO | mit | 3,387 |
'use strict';
module.exports = {
set: function (v) {
this.setProperty('src', v);
},
get: function () {
return this.getPropertyValue('src');
},
enumerable: true
};
| robashton/zombify | src/node_modules/zombie/node_modules/jsdom/node_modules/cssstyle/lib/properties/src.js | JavaScript | mit | 211 |
<?php
namespace App\Modules\OAuth\Controllers;
use App\Http\Controllers\Controller;
use App\Modules\Users\Controllers\UserController;
use App\Modules\Users\Models\User;
use App\Modules\Users\Supports\MailCheckSupport;
use Laravel\Socialite\Facades\Socialite as Socialite;
use Illuminate\Http\Request;
use Tymon\JWTAuth... | alissonphp/lumen-api-skeleton | app/Modules/OAuth/Controllers/LoginController.php | PHP | mit | 4,190 |
// Copyright (c) 2011-2013 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 <QApplication>
#include "bitcoingui.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#... | codecvlc/amerios | src/qt/bitcoin.cpp | C++ | mit | 10,776 |
#!/usr/bin/env python
"""
Manage and display experimental results.
"""
__license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>'
__author__ = 'Lucas Theis <lucas@theis.io>'
__docformat__ = 'epytext'
__version__ = '0.4.3'
import sys
import os
import numpy
import random
import scipy
import socke... | jonasrauber/c2s | c2s/experiment.py | Python | mit | 21,962 |
package ir.abforce.dinorunner.custom;
import com.makersf.andengine.extension.collisions.entity.sprite.PixelPerfectSprite;
import com.makersf.andengine.extension.collisions.opengl.texture.region.PixelPerfectTextureRegion;
import ir.abforce.dinorunner.managers.RM;
/**
* Created by Ali Reza on 9/4/15.
*/
public class... | abforce/Dino-Runner | app/src/main/java/ir/abforce/dinorunner/custom/SPixelPerfectSprite.java | Java | mit | 544 |
'use strict';
exports.connect = function () {
var mongoose = require('mongoose'),
config = require('../config'),
options = {
user : config.mongo.user,
pass : config.mongo.pass
};
mongoose.connect(config.db, options);
return mongoose.connection;
};
| swara-app/github-webhook | mongoose/index.js | JavaScript | mit | 280 |
# encoding: utf-8
# frozen_string_literal: true
require 'spec_helper'
describe RuboCop::Cop::Style::ElseAlignment do
subject(:cop) { described_class.new(config) }
let(:config) do
RuboCop::Config.new('Lint/EndAlignment' => end_alignment_config)
end
let(:end_alignment_config) do
{ 'Enabled' => true, 'Al... | mrb/rubocop | spec/rubocop/cop/style/else_alignment_spec.rb | Ruby | mit | 17,903 |
class TripsController < ApplicationController
before_action :set_trip, only: [:show, :update, :destroy, :edit]
def index
if current_user
@created_trips = current_user.created_trips
@joined_trips = current_user.trips
else
@trips = Trip.order(:start_at).limit(25)
end
end
def new
... | willot/raft-new | app/controllers/trips_controller.rb | Ruby | mit | 952 |
module RedditKit
class Client
# Methods for searching reddit's links.
module Search
# Search for links.
#
# @param query [String] The search query.
# @option options [String, RedditKit::Subreddit] subreddit The optional subreddit to search.
# @option options [true, false] restr... | samsymons/RedditKit.rb | lib/redditkit/client/search.rb | Ruby | mit | 1,908 |
//APP
var app = angular.module('PortfolioApp', ['ngRoute', 'slick']);
//ROUTING
app.config(function ($routeProvider) {
"ngInject";
$routeProvider
.when('/', {
controller: "HomeController",
templateUrl: "js/angular/views/home-view.html"
})
.when('/work/:projectId', {
controller: 'ProjectController',
templa... | michael-eightnine/frontend-portfolio | site/js/angular/app.js | JavaScript | mit | 1,907 |
// Copyright (c) 2018 Louis Wu
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distr... | FatJohn/UnicornToolkit | Library/Unicorn.Shared/Extension/CancellationTokenSourceExtensions.cs | C# | mit | 1,739 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Creative One Page Parallax Template">
<meta name="keywords" content="Creative, Onepage, Parallax, HTML5, Bootstrap, Popular, custom, personal, po... | dinanandka/MonitoringKP_KPPL | application/views/welcome.php | PHP | mit | 21,424 |
let original: (fn: FrameRequestCallback) => number;
let requesters: any[] = [];
function fakeRaf(fn: FrameRequestCallback): number {
requesters.push(fn);
return requesters.length;
}
function use() {
original = window.requestAnimationFrame;
window.requestAnimationFrame = fakeRaf;
}
function restore() {
set... | motorcyclejs/dom | test/helpers/fake-raf.ts | TypeScript | mit | 552 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MotoBotCore.Interfaces
{
public interface IChannel
{
string Name { get; set; }
string Motd { get; set; }
}
}
| luetm/MotoBot | MotoBotCore/Interfaces/IChannel.cs | C# | mit | 267 |
//-----------------------------------------------------------------------------
// Декодер Mpeg Layer 1,2,3
// Копонент звукового двигателя Шквал
// команда : AntiTank
// разработчик : Гилязетдинов Марат (Марыч)
//-----------------------------------------------------------------------------
// включения
#include <str... | gecko0307/squall | source/SoundFile/MP3/MpegDecoder.cpp | C++ | mit | 77,394 |
import { moduleForModel, test } from 'ember-qunit';
import Pretender from 'pretender';
// ToDo: Install ember-cli-faker
import mocks from './mocks';
const {
inventoryMock,
productMock,
componentsMock
} = mocks;
let mockServer;
moduleForModel('inventory', 'Unit | Serializer | inventory', {
needs: ['serial... | benoror/ember-airtable | tests/unit/serializers/inventory-test.js | JavaScript | mit | 2,679 |
package com.asksunny.batch.tasklets;
public class Demo1 {
long id;
String name;
public Demo1() {
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = n... | devsunny/app-galleries | batch-flow-process/src/main/java/com/asksunny/batch/tasklets/Demo1.java | Java | mit | 341 |
package net.glowstone.net.codec.play.game;
import com.flowpowered.network.Codec;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import net.glowstone.net.GlowBufUtils;
import net.glowstone.net.message.play.game.UpdateBlockEntityMessage;
import net.glowstone.util.nbt.CompoundTag;
import org.bukkit.util.Bloc... | GlowstoneMC/GlowstonePlusPlus | src/main/java/net/glowstone/net/codec/play/game/UpdateBlockEntityCodec.java | Java | mit | 1,140 |
//---------------------------------------------------------------------
// <copyright file="DuplicateStream.cs" company="Microsoft Corporation">
// Copyright (c) 1999, Microsoft Corporation. All rights reserved.
// </copyright>
// <summary>
// Part of the Deployment Tools Foundation project.
// </summary>
//-... | OneGet/oneget | src/Microsoft.PackageManagement.ArchiverProviders/Compression/DuplicateStream.cs | C# | mit | 8,313 |
+(function () {
'use strict';
angular
.module('DashboardApplication')
.controller('FileManagerRemoveFolderController', ['$scope', '$q', 'Event', 'FoldersRest', FileManagerRemoveFolderController]);
function FileManagerRemoveFolderController($scope, $q, Event, FoldersRest) {
var vm ... | MozhganNajafi/andisheh-bartar | source/dashboard/components/filemanager/controllers/removefolder.controller.js | JavaScript | mit | 980 |
package co.colector.model.request;
import java.util.ArrayList;
import java.util.List;
import co.colector.ColectorApplication;
import co.colector.R;
import co.colector.model.IdInputValue;
import co.colector.model.IdValue;
import co.colector.model.Survey;
import co.colector.model.AnswerValue;
import co.colector.session... | jlpuma24/colector-android-telecomsoftsrs | app/src/main/java/co/colector/model/request/SendSurveyRequest.java | Java | mit | 2,516 |
package controllers
import (
"github.com/revel/revel"
"AuthKeyPush/app/models"
)
type Auth struct {
*revel.Controller
}
func (c Auth) Github(code string) revel.Result {
login := models.GitHub(code)
if login == true {
c.Session["login"] = "true"
} else {
c.Session["login"] = "false"
c.Session["msg"] = "L... | rluisr/AuthKeyPush | app/controllers/auth.go | GO | mit | 397 |
// 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 "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... | w295472444/TMCOIN | src/bitcoinrpc.cpp | C++ | mit | 48,637 |
/**
* @module {Module} utils/math
* @parent utils
*
* The module's description is the first paragraph.
*
* The body of the module's documentation.
*/
import _ from 'lodash';
/**
* @function
*
* This function's description is the first
* paragraph.
*
* This starts the body. This text comes after the sign... | bitovi/documentjs | lib/process/test/module_with_multiple_exports.js | JavaScript | mit | 781 |
<?php
/* WebProfilerBundle:Collector:router.html.twig */
class __TwigTemplate_c8d21550850074782862265b813a9c2aea7c608253db98e24225c2ea859cc33f extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
$this->parent = $this->loadTe... | mehdiYal/Schoolium | var/cache/dev/twig/9d/9ddcdbb0671c46071f6efb8e5daeec192572165664b16d016f57f2b46b9702b3.php | PHP | mit | 8,083 |
<?php
if ($_SESSION['manager']==""){
header("Location: admin_login.php");
exit;
};
header("Location: admin_index.php");
?> | ArvoGuo/old | manager/index.php | PHP | mit | 147 |
using UnityEngine;
using UnityEditor;
using CreateThis.Factory.VR.UI.Button;
namespace MMVR.Factory.UI.Button {
[CustomEditor(typeof(FileManagerSaveButtonFactory))]
[CanEditMultipleObjects]
public class FileManagerSaveButtonFactoryEditor : MomentaryButtonFactoryEditor {
SerializedProperty fileMana... | createthis/mesh_maker_vr | Assets/MMVR/Factory/UI/Button/FileManager/Editor/FileManagerSaveButtonFactoryEditor.cs | C# | mit | 1,032 |
var box, mbox;
function demo() {
cam ( 0, 20, 40 );
world = new OIMO.World();
world.add({ size:[50, 10, 50], pos:[0,-5,0] }); // ground
var options = {
type:'box',
size:[10, 10, 10],
pos:[0,20,0],
density:1,
move:true
}
box = world.add( options );
... | lo-th/Oimo.js | examples/docs/rigidbody.js | JavaScript | mit | 504 |
class CreateCourses < ActiveRecord::Migration
def change
create_table :courses do |t|
t.string :name
t.string :short_name
t.string :sisid
t.text :description
t.integer :department_id
t.integer :term_id
t.boolean :graded
t.boolean :archived
t.string :type
... | JonBriggs/SISteMATIC | db/migrate/20131029185157_create_courses.rb | Ruby | mit | 353 |
import traceback
class EnsureExceptionHandledGuard:
"""Helper for ensuring that Future's exceptions were handled.
This solves a nasty problem with Futures and Tasks that have an
exception set: if nobody asks for the exception, the exception is
never logged. This violates the Zen of Python: 'Errors s... | mikhtonyuk/rxpython | concurrent/futures/cooperative/ensure_exception_handled.py | Python | mit | 3,261 |
module GitNetworkitis
class Getter
include HTTParty
include JSONHelper
base_uri 'https://api.github.com'
attr_accessor :url, :local_options, :query_options
LOCAL_KEYS = [:batch, :since]
def initialize(url, options={})
@url = url
scrub_local_options options
@query_options =... | jcoutu/gitnetworkitis | lib/gitnetworkitis/getter.rb | Ruby | mit | 1,826 |
var fs = require('fs'),
cons = require('consolidate'),
dust = require('dustjs-linkedin');
var pages = [
'index',
'contact',
'faq',
'registration',
'sponsors',
'travel',
'visit',
'volunteers'
];
pages.forEach(function(page) {
cons.dust('views/'+page+'.dust', { views: __dirname+'/views'}, function(err, htm... | selfcontained/mini-cassia-turkey-trot | generate.js | JavaScript | mit | 563 |
__package__ = 'archivebox.core'
| pirate/bookmark-archiver | archivebox/core/__init__.py | Python | mit | 32 |
package com.team2502.robot2017.command.autonomous;
import edu.wpi.first.wpilibj.command.CommandGroup;
public class ShinyFollow extends CommandGroup
{
/**
* Does a follow
*/
public ShinyFollow() { addSequential(new AutoVisionCommand(200, 0.3)); }
} | Team-2502/UpdatedRobotCode2017 | src/com/team2502/robot2017/command/autonomous/ShinyFollow.java | Java | mit | 267 |
package br.com.caelum.rest.server;
import javax.servlet.http.HttpServletRequest;
public class SimpleAction implements Action {
public String getUri() {
return uri;
}
public String getRel() {
return rel;
}
private final String uri;
private final String rel;
public SimpleAction(String rel, String uri) {
... | caelum/rest-client | rest-server-gae/src/br/com/caelum/rest/server/SimpleAction.java | Java | mit | 638 |
package com.ms.meizinewsapplication.features.meizi.model;
import android.content.Context;
import com.ms.meizinewsapplication.features.base.pojo.ImgItem;
import com.ms.retrofitlibrary.web.MyOkHttpClient;
import org.loader.model.OnModelListener;
import java.util.List;
import rx.Observable;
import rx.Subscription;
/... | qq137712630/MeiZiNews | app/src/main/java/com/ms/meizinewsapplication/features/meizi/model/DbGroupBreastModel.java | Java | mit | 1,004 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("12... | nellypeneva/SoftUniProjects | 01_ProgrFundamentalsMay/11_Data-Types-Exercises/12_RectangleProperties/Properties/AssemblyInfo.cs | C# | mit | 1,420 |
import logging.handlers
import os
_pabotlog = logging.getLogger('PABot')
_pabotlog.setLevel(logging.DEBUG)
_logPath = os.path.abspath("./logging/pabot.log")
_formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(name)s - %(message)s')
_consoleStreamHandler = logging.StreamHandler()
_consoleStreamHandler.s... | KevinJMcGrath/Symphony-Ares | modules/plugins/PABot/logging.py | Python | mit | 796 |
<?php
namespace Phpmvc\Comment;
/**
* To attach comments-flow to a page or some content.
*
*/
class CommentController implements \Anax\DI\IInjectionAware
{
use \Anax\DI\TInjectable;
/**
* View all comments.
*
* @return void
*/
public function viewAction($page)
{
$comm... | frjf14/Projekt | vendor/phpmvc/comment/src/Comment/CommentController.php | PHP | mit | 3,878 |
import ast
import heisenberg.library.heisenberg_dynamics_context
import heisenberg.library.orbit_plot
import heisenberg.option_parser
import heisenberg.plot
import heisenberg.util
import matplotlib
import numpy as np
import sys
# https://github.com/matplotlib/matplotlib/issues/5907 says this should fix "Exceeded cell ... | vdods/heisenberg | heisenberg/plot/__main__.py | Python | mit | 4,283 |
<?php
namespace Ooxif\LaravelSpecSchema\SqlServer;
trait BlueprintTrait
{
} | ooxif/laravel-spec-schema | src/Ooxif/LaravelSpecSchema/SqlServer/BlueprintTrait.php | PHP | mit | 77 |
def load_keys(filepath):
"""
Loads the Twitter API keys into a dict.
:param filepath: file path to config file with Twitter API keys.
:return: keys_dict
:raise: IOError
"""
try:
keys_file = open(filepath, 'rb')
keys = {}
for line in keys_file:
key, value =... | nhatbui/LebronCoin | lebroncoin/key_loader.py | Python | mit | 654 |
"""Main entry points for scripts."""
from __future__ import print_function, division
from argparse import ArgumentParser
from collections import OrderedDict
from copy import copy
from datetime import datetime
import glob
import json
import logging
import math
import os
import scipy.stats
import numpy as np
from .ve... | snfactory/cubefit | cubefit/main.py | Python | mit | 26,267 |
module IncomeTax
module Countries
class Morocco < Models::Progressive
register 'Morocco', 'MA', 'MAR'
currency 'MAD'
level 30_000, '0%'
level 50_000, '10%'
level 60_000, '20%'
level 80_000, '30%'
level 180_000, '34%'
remainder '38%'
end
end
end
| askl56/income-tax | lib/income_tax/countries/morocco.rb | Ruby | mit | 310 |
using System;
namespace sep20v1.Areas.HelpPage
{
/// <summary>
/// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class.
/// </summary>
public class TextSample
{
public TextSample(string text)
{
... | peteratseneca/dps907fall2013 | Week_03/sep20v1/sep20v1/Areas/HelpPage/SampleGeneration/TextSample.cs | C# | mit | 883 |
<?php
namespace YB\Bundle\RemoteTranslationsBundle\Tests\Translation\Loader;
use PHPUnit_Framework_TestCase;
/**
* Class AwsS3LoaderTest
* @package YB\Bundle\RemoteTranslationsBundle\Tests\Translation\Loader
*/
class AwsS3LoaderTest extends PHPUnit_Framework_TestCase
{
/**
* @param mixed $expected
*... | yurijbogdanov/symfony-remote-translations-bundle | Tests/Translation/Loader/AwsS3LoaderTest.php | PHP | mit | 636 |
package com.syncano.android.lib.modules.users;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.syncano.android.lib.modules.Params;
import com.syncano.android.lib.modules.Response;
/**
* Params to create new user.
*/
public class ParamsUserNew extends Params {... | Syncano/syncano-android-demo | Eclipse/SyncanoLib/src/com/syncano/android/lib/modules/users/ParamsUserNew.java | Java | mit | 1,864 |
class BeachApiCore::TeamUpdate
include Interactor
def call
if context.team.update context.params
context.status = :ok
else
context.status = :bad_request
context.fail! message: context.team.errors.full_messages
end
end
end
| beachio/beach-api-core | app/interactors/beach_api_core/team_update.rb | Ruby | mit | 259 |
# -*- coding: utf-8 -*-
def calc_note(count, value):
qnt = 0
if count >= value:
qnt = int(count) / value
print '%d nota(s) de R$ %d.00' % (qnt, value)
return count - qnt * value
n = float(raw_input())
print 'NOTAS:'
n = calc_note(n, 100)
n = calc_note(n, 50)
n = calc_note(n, 20)
n = calc_no... | vicenteneto/online-judge-solutions | URI/1-Beginner/1021.py | Python | mit | 907 |
'use strict';
module.exports = function (grunt) {
var exec = require('child_process').exec;
grunt.registerMultiTask('install-dependencies', 'Installs npm dependencies.', function () {
var cb, options, cp;
cb = this.async();
options = this.options({
cwd: '',
stdout: true,
stderr: tru... | justhamade/grunt-install-dependencies | tasks/install-dependencies.js | JavaScript | mit | 949 |
<?php
ini_set('display_errors', 1);
ini_set('error_reporting', -1);
$loader = require __DIR__ . '/../vendor/autoload.php';
$loader->add('ThisPageCannotBeFound', __DIR__);
| thispagecannotbefound/php-signals | tests/bootstrap.php | PHP | mit | 173 |
<?php
/*
Safe sample
input : get the field userData from the variable $_GET via an object, which store it in a array
SANITIZE : use of preg_replace
construction : use of sprintf via a %s with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee,... | stivalet/PHP-Vulnerability-test-suite | Injection/CWE_95/safe/CWE_95__object-indexArray__func_preg_replace__echo-sprintf_%s_simple_quote.php | PHP | mit | 1,579 |
ActionController::Dispatcher.to_prepare do
# Extend :account model to add :issues association.
Account.send(:include, AccountServiceRequestAssociations)
# Make issues observable.
ActivityObserver.instance.send :add_observer!, ServiceRequest
# Add :issues plugin helpers.
ActionView::Base.send(:include, ... | jensonzhao/crm_fieldservices | lib/crm_fieldservices.rb | Ruby | mit | 470 |
import { Component } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'chips-demo',
templateUrl: 'chips-demo.html',
styleUrls: ['chips-demo.css']
})
export class ChipsDemoComponent {
}
| liuy97/angular2-material-seed | src/client/app/material/demo-app/chips/chips-demo.ts | TypeScript | mit | 211 |
using System;
using System.Collections.Generic;
using System.Text;
public interface IIdentifiable
{
string Id { get; }
}
| giggals/Software-University | Exercises-Interfaces/2. Multiple Implementation/IIdentifiable.cs | C# | mit | 131 |
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2019 Dr. Marc Mültin (V2G Clarity)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Sof... | V2GClarity/RISE-V2G | RISE-V2G-EVCC/src/main/java/com/v2gclarity/risev2g/evcc/states/WaitForAuthorizationRes.java | Java | mit | 4,963 |
<?php
declare(strict_types=1);
namespace Phpcq\Runner\Test\Console\Definition;
use Phpcq\Runner\Console\Definition\OptionDefinition;
use Phpcq\Runner\Console\Definition\OptionValue\OptionValueDefinition;
use PHPUnit\Framework\TestCase;
/** @covers \Phpcq\Runner\Console\Definition\OptionDefinition */
final class Opt... | phpcq/phpcq | tests/Console/Definition/OptionDefinitionTest.php | PHP | mit | 2,135 |
<?php
if (isset($user_data['id'])) {
?>
<script>
var $records_per_page = '<?php echo $this->security->get_csrf_hash(); ?>';
var page_url = '<?php echo base_url(); ?>';
var $user_data ="<?php echo $user_data['id']?>";
</script>
<script s... | akashbachhania/jeet99 | application/views/includes/navbar.php | PHP | mit | 45,301 |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2013 The NovaCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "miner.h"... | eddietributecoin/EddieCoin | src/miner.cpp | C++ | mit | 19,965 |
using System.Threading.Tasks;
using Lykke.Service.ExchangeConnector.Client.Models;
using MarginTrading.Backend.Core;
using MarginTrading.Contract.RabbitMqMessageModels;
namespace MarginTrading.Backend.Services.Notifications
{
public interface IRabbitMqNotifyService
{
Task AccountHistory(string transactionId, stri... | LykkeCity/MT | src/MarginTrading.Backend.Services/Notifications/IRabbitMqNotifyService.cs | C# | mit | 1,359 |
require 'ims/lti'
class GuideController < ApplicationController
def home
end
def xml_builder
@placements = CanvasExtensions::PLACEMENTS
end
def xml_config
tc = IMS::LTI::Services::ToolConfig.new(:title => "Example Tool Provider", :launch_url => blti_launch_url)
tc.description = "This is a Sample... | instructure/lti_tool_provider_example | app/controllers/guide_controller.rb | Ruby | mit | 2,081 |
require_relative '../../../spec_helper'
require_relative 'shared/constants'
require_relative '../../../core/file/shared/read'
describe "Digest::SHA512.file" do
describe "when passed a path to a file that exists" do
before :each do
@file = tmp("md5_temp")
touch(@file, 'wb') {|f| f.write SHA512Constan... | ruby/rubyspec | library/digest/sha512/file_spec.rb | Ruby | mit | 1,321 |
using System;
using System.Threading.Tasks;
using Anotar.NLog;
using CroquetAustralia.Domain.Services.Serializers;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Queue;
namespace CroquetAustralia.Domain.Services.Queues
{
public abstract class QueueBase : IQueueBase
{
privat... | croquet-australia/api.croquet-australia.com.au | source/CroquetAustralia.Domain/Services/Queues/QueueBase.cs | C# | mit | 1,778 |
class CreatePhrases < ActiveRecord::Migration
def change
create_table :phrases do |t|
t.belongs_to :country
t.string :hello
t.string :please
t.string :thanks
t.string :bathroom
t.timestamps
end
end
end
| cicadas-2014/Elsewhere | db/migrate/20140626220711_create_phrases.rb | Ruby | mit | 250 |
const electron = require('electron');
const ipcRenderer = electron.ipcRenderer;
window.onload = function() {
ipcRenderer.send('game-preview-loaded');
}
ipcRenderer.on('game-preview-start', function(event, data) {
var app = new Application({
// resize: true,
fullscreen: true,
antyAliasing: true,
... | Baransu/Amble-Engine | src/game-preview/js/index.js | JavaScript | mit | 1,676 |
module.exports = {
token: 'TELEGRAM_BOT_TOKEN',
polling: {
timeout: 3,
limit: 100
}
};
| yurich/vow-telegram-bot | examples/settings.js | JavaScript | mit | 115 |
<!-- Modal -->
<div class="modal fade" id="explor_post" tabindex="-1" role="dialog" aria-labelledby="post_structlLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span... | freon-lunarion/dew | application/modules/om/views/_element/orgPostStruct_modal.php | PHP | mit | 1,450 |
using System.Collections.ObjectModel;
using ActiproSoftware.Text;
using ActiproSoftware.Text.Utility;
using ActiproSoftware.Windows.Controls.SyntaxEditor;
using ActiproSoftware.Windows.Controls.SyntaxEditor.IntelliPrompt.Implementation;
using NQuery.Authoring.ActiproWpf.SymbolContent;
using NQuery.Authoring.ActiproWp... | terrajobst/nquery-vnext | src/NQuery.Authoring.ActiproWpf/QuickInfo/NQueryQuickInfoProvider.cs | C# | mit | 2,436 |
#include <iostream>
using namespace std;
void display(const int *xPos, const int *yPos);
void move(int *xPos, int *yPos);
int main(void) {
int x = 10;
int y = 20;
display(&x, &y);
move(&x, &y);
display(&x, &y);
return 0;
}
void display(const int *xPos, const int *yPos) {
// btw const not needed for this
c... | BedrockDev/Sunrin2017 | Software/Game Programming/Codes/ConsoleApplication5/ConsoleApplication5/ConstPointer.cpp | C++ | mit | 468 |
class Room < ActiveRecord::Base
validates :name, :presence => true
has_many :users
has_many :room_logs
end
| ichylinux/chat | app/models/room.rb | Ruby | mit | 114 |
Template.friendPosts.onCreated(function() {
Bisia.Notification.resetNotify('note', 'post');
})
Template.friendPosts.helpers({
getPost: function(postId) {
var post = Posts.findOne(postId);
if (post) {
var user = Users.findOne({ '_id': post.authorId }, { 'fields': {
'username': 1,
'profile.city': 1,
... | redbaron76/Bisiacaria.com | client/pages/friend_posts.js | JavaScript | mit | 1,141 |