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 |
|---|---|---|---|---|---|
from SBaaS_base.postgresql_orm_base import *
class data_stage01_rnasequencing_analysis(Base):
__tablename__ = 'data_stage01_rnasequencing_analysis'
id = Column(Integer, Sequence('data_stage01_rnasequencing_analysis_id_seq'), primary_key=True)
analysis_id = Column(String(500))
experiment_id = Column(Str... | dmccloskey/SBaaS_rnasequencing | SBaaS_rnasequencing/stage01_rnasequencing_analysis_postgresql_models.py | Python | mit | 2,579 |
require 'faraday'
# @private
module Faraday
module Disqussion
# @private
class RaiseHttp4xx < ::Faraday::Response::Middleware
def on_complete(env)
case env[:status].to_i
when 400
raise ::Disqussion::BadRequest.new(error_message(env), env[:response_headers])
when 401
... | jeremyvdw/disqussion | lib/faraday/disqussion/raise_http_4xx.rb | Ruby | mit | 997 |
package jp.co.future.uroborosql.parameter.mapper;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.Timestamp;
import java.text.ParseException;
imp... | future-architect/uroborosql | src/test/java/jp/co/future/uroborosql/parameter/mapper/BindParameterMapperManagerTest.java | Java | mit | 6,049 |
<?php namespace Ejimba\Pesapal\OAuth;
class OAuthRequest {
private $parameters;
private $http_method;
private $http_url;
// for debug purposes
public $base_string;
public static $version = '1.0';
public static $POST_INPUT = 'php://input';
function __construct($http_method, $http_url, $parameters=NULL) {
@... | Ejimba/pesapal | src/Ejimba/Pesapal/OAuth/OAuthRequest.php | PHP | mit | 7,121 |
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModu... | syndbg/webpack-google-cloud-storage-plugin | examples/bin/app.bundle.js | JavaScript | mit | 271,678 |
/**
* Scale Interpolation Function.
*
* @param {number} a start scale
* @param {number} b end scale
* @param {number} v progress
* @returns {string} the interpolated scale
*/
export default function scale(a, b, v) {
// eslint-disable-next-line no-bitwise
return `scale(${((a + (b - a) * v) * 1000 >> 0) / 1000... | thednp/kute.js | src/interpolation/scale.js | JavaScript | mit | 327 |
/*
* jQuery ZenPen url/link action
*
* Copyright (c) 2013 Deux Huit Huit (http://www.deuxhuithuit.com/)
* Licensed under the MIT (http://deuxhuithuit.mit-license.org)
* Based on the work of Tim Holman (https://github.com/tholman/zenpen)
* Licensed under the Apache License (https://github.com/tholman/zenpen/b... | DeuxHuitHuit/jQuery-zenpen | src/js/jquery.zenpen.url.js | JavaScript | mit | 2,580 |
const mockMark = jest.fn();
const mockUnmark = jest.fn();
jest.mock('mark.js', () => () => ({
mark: mockMark,
unmark: mockUnmark,
}));
import { MarkerService } from '../MarkerService';
describe('Marker service', () => {
let marker: MarkerService;
const element = document.createElement('span');
beforeEach(... | Rebilly/ReDoc | src/services/__tests__/MarkerService.test.ts | TypeScript | mit | 2,623 |
# Copyright (c) 2010-2011 ProgressBound, Inc.
#
# 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, pu... | marclove/stumpwise | db/migrate/20100118062606_create_articles.rb | Ruby | mit | 1,203 |
package goginjsonrpc
import (
"fmt"
"encoding/json"
"io/ioutil"
"net/http"
"reflect"
"github.com/gin-gonic/gin"
)
func jsonrpcError(c *gin.Context, code int, message string, data string, id string) {
c.JSON(http.StatusOK, map[string]interface{}{
"result": nil,
"jsonrpc": "2.0",
"error": map[string]int... | kanocz/goginjsonrpc | jsonrpc.go | GO | mit | 8,250 |
require 'open-uri'
require 'nokogiri'
require 'pry'
require "oracle/version"
require 'oracle/cli'
require 'oracle/hero'
require 'oracle/scraper'
| TraiLYNNE/oracle-cli-project | lib/oracle.rb | Ruby | mit | 146 |
//~ name a744
alert(a744);
//~ component a745.js
| homobel/makebird-node | test/projects/large/a744.js | JavaScript | mit | 52 |
'use strict';
var Q = require('q')
, _ = require('underscore');
exports.defaults = function () { return { storage: {} }; };
exports.mixin = {
/**
* Converts `arguments` to a key to be stored.
*/
toKey: function () {
return _.toArray(arguments);
},
contains: function () {
return this.contain... | filipovskii/bolter | lib/bolter-memory.js | JavaScript | mit | 894 |
<?php
namespace Baghayi\Skyroom\Factory;
use Baghayi\Skyroom\Room as RoomItself;
use Baghayi\Skyroom\User;
use Baghayi\Skyroom\Collection\Users;
use Baghayi\Skyroom\Exception\AlreadyExists;
use Baghayi\Skyroom\Request;
use Baghayi\Skyroom\Exception\DuplicateRoom;
final class Room {
private $request;
public ... | baghayi/skyroom | src/Factory/Room.php | PHP | mit | 1,107 |
capstone.controller("RegisterCtrl", function($scope,$http,AuthFactory,$location,user1){
// $(".button-collapse").sideNav();
$http.get(`states.json`)
.then((data)=>{
$scope.stateName = data.data
console.log($scope.stateName)
$('input.autocomplete').autocomplete({
data: $scope.stateName,
limit: 10 // The max... | priyakamesh/frontendcapstone-priya | app/controller/registerCtrl.js | JavaScript | mit | 2,390 |
<?php if(time() > 1346310303){return null;} return array (
2 =>
array (
4 =>
array (
0 =>
array (
'id' => 3,
'type' => 'document',
'contentType' => 'text/html',
'pagetitle' => 'Гастроэнтерология',
'longtitle' => '',
'description' => 'Гастроэнтер... | yenbekbay/clinic | core/cache/resource/web/resources/5/e17fd6472397a7760f677426bb024e70.cache.php | PHP | mit | 29,091 |
<?php
namespace AppBundle\Service\Crud\Strategy;
/**
* @author Alexandr Sibov<cyberdelia1987@gmail.com>
*/
trait ResolverAwareTrait
{
/**
* @var ResolverInterface
*/
private $resolver;
public function setStrategyResolver(ResolverInterface $resolver)
{
$this->resolver = $resolver;
... | Cyberdelia1987/symfony-test | src/AppBundle/Service/Crud/Strategy/ResolverAwareTrait.php | PHP | mit | 575 |
(function(){
angular
.module('users')
.controller('UserController', [
'userService', '$mdSidenav', '$mdBottomSheet', '$log', '$q',
UserController
]);
/**
* Main Controller for the Angular Material Starter App
* @param $scope
* @param $mdSidenav
* @param avatars... | hassanabidpk/portfolio | app/src/users/UserController.js | JavaScript | mit | 2,971 |
import Router = require('koa-router');
import * as schema from './schema';
import * as routes from './routes';
import validator from '../../utils/validator';
const router = new Router({ prefix: '/toolkit' });
router.get('/example', routes.example);
router.post('/upload', validator(schema.upload), routes.upload);
exp... | whosesmile/koa-scaffold | src/modules/toolkit/index.ts | TypeScript | mit | 340 |
class Report < ActiveRecord::Base
mount_uploader :forest_photo, ForestPhotoUploader
end
| pilou15/https-github.com-pilou15-acacias-harvest | app/models/report.rb | Ruby | mit | 90 |
package io.mattw.youtube.commentsuite.util;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.IOException;
import java.util.List;
import java.util.stre... | mattwright324/youtube-comment-suite | src/main/java/io/mattw/youtube/commentsuite/util/ClipboardUtil.java | Java | mit | 1,872 |
package com.aol.cyclops.guava;
import com.aol.simple.react.stream.traits.FutureStream;
import com.google.common.collect.FluentIterable;
public class FromSimpleReact {
public static <T> FluentIterable<T> fromSimpleReact(
FutureStream<T> s) {
return FluentIterable.from(s);
}
}
| sjfloat/cyclops | cyclops-guava/src/main/java/com/aol/cyclops/guava/FromSimpleReact.java | Java | mit | 286 |
<?php
namespace Nijens\FailureHandling;
use Nijens\Utilities\UnregisterableCallback;
/**
* FailureCatcher
*
* @author Niels Nijens <nijens.niels@gmail.com>
* @package Nijens\Failurehandling
**/
class FailureCatcher
{
/**
* The failure handler instance implementing FailureHandlerInterface
*
*... | niels-nijens/FailureHandling | src/FailureCatcher.php | PHP | mit | 4,222 |
namespace Farmhand.Installers.Patcher.Injection.Components.Modifiers
{
// ReSharper disable StyleCop.SA1600
using System;
using System.ComponentModel.Composition;
using Farmhand.Installers.Patcher.Cecil;
using Farmhand.Installers.Patcher.Injection.Components.Hooks;
using Farmhand.Installers.Pa... | ClxS/Stardew-Farmhand | Libraries/Installers/Patcher/FarmhandPatcherCommon/Injection/Components/Modifiers/AlterProtectionHandler.cs | C# | mit | 1,879 |
<?php
namespace Superjobs\HomeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Superjobs\HomeBundle\Entity\CVtheque;
use Superjobs\HomeBundle\Form\CVthequeType;
use Superjobs\HomeBundle\Entity\Category;
use Superjobs\HomeBundle\Form\Categor... | anderson-abc/Superjobs | src/Superjobs/HomeBundle/Controller/MainController.php | PHP | mit | 2,833 |
<?php
/**
* BjyAuthorize Module (https://github.com/bjyoungblood/BjyAuthorize)
*
* @link https://github.com/bjyoungblood/BjyAuthorize for the canonical source repository
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace BjyAuthorize\Service;
use BjyAuthorize\View\UnauthorizedStrat... | JohnPaulConcierge/BjyAuthorize | src/BjyAuthorize/Service/UnauthorizedStrategyServiceFactory.php | PHP | mit | 1,135 |
require 'spec_helper'
describe Micropost do
let(:user) { FactoryGirl.create(:user) }
before { @micropost = user.microposts.build(content: "Lorem ipsum") }
subject { @micropost }
it { should respond_to(:content) }
it { should respond_to(:user_id) }
it { should respond_to(:user) }
its(:user) { should e... | prank7/jsTwitter | spec/models/micropost_spec.rb | Ruby | mit | 480 |
<?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\FujiFilm;
use JMS\Serializer\Annotation\ExclusionPolicy... | romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/FujiFilm/Face7Name.php | PHP | mit | 840 |
var gulp = require('gulp'),
concat = require('gulp-concat'),
compass = require('gulp-compass'),
notify = require('gulp-notify');
function swallowError(error) {
this.emit('end');
}
function reportError(error) {
notify.onError().apply(this, arguments);
this.emit('end');
}
// com... | jalvarado91/searchMyProf | gulpfile.js | JavaScript | mit | 1,611 |
import { CustomVirtualAudioNodeFactory, VirtualAudioNode } from "../types";
export default abstract class VirtualAudioNodeBase {
public readonly node!: string | CustomVirtualAudioNodeFactory;
public cannotUpdateInPlace(newVirtualAudioNode: VirtualAudioNode): boolean {
return newVirtualAudioNode.node !== this.... | benji6/virtual-audio-graph | src/VirtualAudioNodes/VirtualAudioNodeBase.ts | TypeScript | mit | 332 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
from __future__ import absolute_import
from math import acos, cos, pi, radians, sin, sqrt
import auttitude as at
import numpy as np
def normalized_cross(a, b):
"""
Returns the normalized cross product between vectors.
Uses numpy.cros... | endarthur/autti | auttitude/math.py | Python | mit | 4,348 |
# frozen_string_literal: true
require 'spec_helper'
module Pathway
describe Result do
describe ".success" do
let(:result) { Result.success("VALUE") }
it "returns a Success object with passed value", :aggregate_failures do
expect(result).to be_a(Result::Success)
expect(result.value).... | pabloh/pathway | spec/result_spec.rb | Ruby | mit | 4,096 |
package dao;
import java.util.List;
import org.apache.ibatis.session.SqlSession;
import factory.FactoryService;
import vo.Bbs_CommmVo;
import vo.Board2Vo;
public class BoardDao2 {
private static BoardDao2 dao;
public static synchronized BoardDao2 getDao(){
if ( dao == null ) dao = new BoardDao2();
return dao;... | ByeongGi/Koata_Java | Jsp1012-13_struts2-04/src/dao/BoardDao2.java | Java | mit | 1,753 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.freteplanejado.entity;
/**
*
* @author 43596980895
*/
public class Frete {
private int id;
private String orige... | 5devs/web-project-m1 | FretePlanejado/src/java/com/freteplanejado/entity/Frete.java | Java | mit | 2,066 |
module.exports = require( "./src/LRUCache" ); | eventEmitter/ee-lru-cache | index.js | JavaScript | mit | 49 |
'use strict';
angular.module('sportzCast')
.controller('FooterCtrl', function ($scope) {
$('#footer').hide();
$(function () {
$(window).scroll(function () {
// set distance user needs to scroll before we start fadeIn
if ($(this).scrollTop() > 500) {
$('.na... | AriGonzo/SportzCast | src/components/footer/footerController.js | JavaScript | mit | 439 |
package ru.otus.l51.tests;
/**
* Created by tully.
*/
@SuppressWarnings("unused")
public class TestClass {
private int a = 0;
private String s = "";
public TestClass() {
}
public TestClass(Integer a) {
this.a = a;
}
public TestClass(Integer a, String s) {
this.a = a;
... | artem-gabbasov/otus_java_2017_04_L1 | L5.1/src/test/java/ru/otus/l51/tests/TestClass.java | Java | mit | 502 |
<?php
namespace Blogger\BlogBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
//\Blogger\BlogBundle\Entity\Client
class ClientController extends Controller{
... | PavelKovalchuk/symblog | src/Blogger/BlogBundle/Controller/ClientController.php | PHP | mit | 901 |
<?php
namespace mle86\Value;
/**
* The interface of all value classes,
* i.e. AbstractValue and AbstractSerializableValue.
*
* It just specifies that Value classes should have a 'value' method
* and a one-argument constructor, although those classes have another
* important requirement: being immutable. But... | mle86/php-value | src/Value.php | PHP | mit | 536 |
package main
import (
"fmt"
"log"
"net"
"os"
"github.com/kennylevinsen/g9p"
"github.com/kennylevinsen/g9ptools/fileserver"
"github.com/kennylevinsen/g9ptools/ramfs/ramtree"
)
func main() {
if len(os.Args) < 5 {
fmt.Printf("Too few arguments\n")
fmt.Printf("%s service UID GID address\n", os.Args[0])
fmt... | joushou/g9ptools | ramfs/server.go | GO | mit | 857 |
/**
* Usuario Controller Test Suite
*
* @author Thiago Paes <mrprompt@gmail.com>
* @license MIT
*/
'use strict';
var connection = require('../test');
var Usuario = require('../../src/controllers/UsuarioController');
var sinon = require('sinon');
var assert = require('assert');
var request = require('request');
... | mrprompt/expressjs-api-skel | test/controllers/UsuarioControllerTest.js | JavaScript | mit | 2,672 |
#!/usr/bin/env ts-node
import * as Path from 'path'
import * as Fs from 'fs'
import Ajv, { ErrorObject } from 'ajv'
function handleError(error: string) {
console.error(error)
process.exit(-1)
}
function formatErrors(errors: ErrorObject[]): string {
return errors
.map(error => {
const { dataPath, mes... | desktop/desktop | script/validate-changelog.ts | TypeScript | mit | 1,979 |
<?php
namespace TheScienceTour\DocumentBundle\Document;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique as MongoDBUnique;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use TheScienceTour\MediaBundle\... | assemblee-virtuelle/science-tour | src/TheScienceTour/DocumentBundle/Document/Document.php | PHP | mit | 1,916 |
define([
], function () {
'use strict';
return function (req, res, next) {
function filterParams(req, action) {
var paramsWhitelist = action.params,
whitelistParam,
paramValue,
type,
filteredParams = {};
// check a... | KillerCodeMonkey/handmade | middleware/validation.js | JavaScript | mit | 2,697 |
module Em
module Systemcommand
VERSION = "2.0.10"
end
end
| leoc/em-systemcommand | lib/em-systemcommand/version.rb | Ruby | mit | 66 |
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SourceSchemaParser.DOTA2;
using System;
using System.Collections.Generic;
using System.Reflection;
namespace SourceSchemaParser.JsonConverters
{
internal class SchemaItemToDotaHeroJsonConverter : JsonConverter
{
public override void WriteJson(Js... | babelshift/SourceSchemaParser | src/SourceSchemaParser/JsonConverters/SchemaItemToDotaHeroJsonConverter.cs | C# | mit | 1,860 |
<?php
/*
* This file is part of the Quantum Unit Solutions development package.
*
* (c) Quantum Unit Solutions <http://github.com/dmeikle/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gossamer\Tehuti\Routing;
... | dmeikle/tehuti | src/framework/Gossamer/Tehuti/Routing/ServerContext.php | PHP | mit | 417 |
<?php
/**
Protein Engineering Analysis Tool Structure Analysis (PEATSA)
Copyright (C) 2010 Michael Johnston & Jens Erik Nielsen
Author: Michael Johnston
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free S... | dmnfarrell/peat | PEATSA/WebApp/Interface/Pages/JSGetCalculationData.php | PHP | mit | 3,887 |
from django.contrib import admin
# Register your models here.
from rcps.models import *
class IngredientToRecipeInline(admin.TabularInline):
model = Ingredient.recipes.through
verbose_name = 'Ингредиент'
verbose_name_plural = 'Ингредиенты'
class EquipmentInline(admin.TabularInline):
model = Equipme... | ADKosm/Recipes | Recipes/rcps/admin.py | Python | mit | 1,503 |
var gulp = require('gulp'),
webserver = require('gulp-webserver'),
htmlreplace = require('gulp-html-replace');
//gulp.task('default', function() {
// gulp.run('watcher', 'webserver');
//});
gulp.task('webserver', function() {
gulp.src('build')
.pipe(webserver({
livereload: true
... | julia-reutskaya/julia.reutskaya.tasks.github.com | gulpfile.js | JavaScript | mit | 1,333 |
/// <reference types="chai" />
declare module "chai-bytes" {
function chaiBytes(chai: any, utils: any): void;
export = chaiBytes;
}
declare namespace Chai {
// For BDD API
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
equalBytes(expected: string | Array<... | MiSchroe/klf-200-api | types/chai-bytes/index.d.ts | TypeScript | mit | 364 |
<?php
namespace TemperatureBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Equipement
*
* @ORM\Table(name="equipement")
* @ORM\Entity(repositoryClass="TemperatureBundle\Repository\EquipementRepository")
*/
class Equipement
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
... | aabasse/otacos | src/TemperatureBundle/Entity/Equipement.php | PHP | mit | 2,286 |
<?php
namespace AppBundle\Admin;
use Sonata\UserBundle\Admin\Entity\UserAdmin as BaseUserAdmin;
class UserAdmin extends BaseUserAdmin
{
/**
* {@inheritdoc}
*/
protected $datagridValues = array(
'_page' => 1, // display the first page (default = 1)
'_sort_order' => 'ASC', ... | sgomez/sf2-behat-skel | src/AppBundle/Admin/UserAdmin.php | PHP | mit | 427 |
using System;
using System.IO;
using Aspose.Pdf;
using Aspose.Pdf.Facades;
namespace Aspose.Pdf.Examples.CSharp.AsposePDF.Images
{
public class CGMImageToPDF
{
public static void Run()
{
// ExStart:CGMImageToPDF
// The path to the documents directory.
string ... | aspose-pdf/Aspose.Pdf-for-.NET | Examples/CSharp/AsposePDF/Images/CGMImageToPDF.cs | C# | mit | 776 |
#include "HelloWorldScene.h"
#include ".\Scene\LevelScene.h"
#include ".\Entity\Umbrella.h"
#include "SimpleAudioEngine.h"
#include ".\Scene\SceneManager.h"
USING_NS_CC;
Scene* HelloWorld::createScene()
{
// 'scene' is an autorelease object
auto scene = Scene::create();
// 'layer' is an autorelease o... | 1452712/DP-Project | Umbrella/Classes/HelloWorldScene.cpp | C++ | mit | 2,881 |
/**
* Created by siddharthsharma on 5/21/16.
*/
var React = require('react');
var Contact = require('./contact/app-catalog');
var Cart = require('./cart/app-cart');
var Router = require('react-router-component');
var CatalogDetail = require('./product/app-catalogdetail');
var Template = require('./app-template.js');... | hearsid/react-contacts-manager | app/js/components/app.js | JavaScript | mit | 772 |
package com.project.library.utils;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import org.springframework.stereotype.Component;
@Component
public class MyDateUtil {
public Date calculateDate(String currentDate... | rtashev/University-Projects | library/webapplibraryproject/src/main/java/com/project/library/utils/MyDateUtil.java | Java | mit | 667 |
<?php
/*
* Sendanor SimpleREST PHP Framework
* Copyright 2017-2020 Jaakko-Heikki Heusala <jheusala@iki.fi>
*/
namespace SimpleREST\Legacy\Database;
/* Security check */
if(!defined('REST_PHP')) {
die("Direct access not permitted\n");
}
/** Database interface */
interface iDatabaseTable {
public function __const... | sendanor/php-rest | lib/SimpleREST/Legacy/Database/iDatabaseTable.interface.php | PHP | mit | 955 |
<?php
/*
* This file is part of Laravel HTTP Adapter.
*
* (c) Hidde Beydals <hello@hidde.co>, Mark Redeman
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace HiddeCo\HttpAdapter\Adapters;
use Symfony\Component\EventDispat... | hiddeco/laravel-http-adapter | src/Adapters/AbstractEventDispatcher.php | PHP | mit | 4,428 |
class UsersController < ApplicationController
load_and_authorize_resource
def index
end
def update
if params[:admins].present?
@new_admins = User.not_admins.where(:id => params[:admins])
@new_admins.map {|user| user.admin = true}
@no_longer_admins = User.admins.where('id NOT IN (?)', par... | belighted/bennett | app/controllers/users_controller.rb | Ruby | mit | 945 |
"use strict";
var gulp = require('gulp');
var clean = require('gulp-clean');
var cleanTask = function() {
return gulp.src('dist', { read: false })
.pipe(clean());
};
gulp.task('clean', cleanTask);
module.exports = cleanTask;
| troykinsella/junkie | tasks/clean.js | JavaScript | mit | 233 |
var scroller = angular.module("scroller", ["ngTouch", "angular-websql"]); | jouk0/Scroller | js/index.js | JavaScript | mit | 73 |
/******************************************************************************
QtAV: Multimedia framework based on Qt and FFmpeg
Copyright (C) 2012-2016 Wang Bin <wbsecg1@gmail.com>
* This file is part of QtAV (from 2014)
This library is free software; you can redistribute it and/or
modify it unde... | fuyanzhi1234/DevelopQt | QtAV-master/src/filter/LibAVFilter.cpp | C++ | mit | 17,637 |
r"""
Create MapServer class diagrams
Requires https://graphviz.gitlab.io/_pages/Download/Download_windows.html
https://stackoverflow.com/questions/1494492/graphviz-how-to-go-from-dot-to-a-graph
For DOT languge see http://www.graphviz.org/doc/info/attrs.html
cd C:\Program Files (x86)\Graphviz2.38\bin
dot -Tpng D:\Git... | geographika/mappyfile | docs/scripts/class_diagrams.py | Python | mit | 3,102 |
import { get_definition } from './../base';
export const push_link = (
oid, linkurl, linkname, onmenu='true', instance_name,
when, additional_args, description
) => get_definition({
oid,
linkurl,
linkname,
onmenu,
instance_name
},
{
label: 'VersionOne - P... | walkerrandolphsmith/VersionOne.JavaScript.PipelineBuilder | src/plugins/v1/push_link.js | JavaScript | mit | 457 |
#region License
/* The MIT License
*
* Copyright (c) 2011 Red Badger Consulting
*
* 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 limitatio... | redbadger/XPF | XPF/RedBadger.Xpf/Graphics/ITexture.cs | C# | mit | 1,630 |
<?php
namespace fufudao\base;
use yii\behaviors\TimestampBehavior;
//use yii\behaviors\AttributeBehavior;
use yii\db\ActiveRecord as ar;
use yii\db\Expression;
class ActiveRecord extends ar
{
public function behaviors()
{
return [
'timestamp' => [
'class' => TimestampB... | fufudao/yii2-base | base/ActiveRecord.php | PHP | mit | 1,074 |
#
# Cookbook Name:: dokku
# Spec:: plugins
#
# Copyright (c) 2015 Nick Charlton, MIT licensed.
require "spec_helper"
describe "dokku::plugins" do
context "when all attributes are default" do
let(:chef_run) do
runner = ChefSpec::ServerRunner.new
runner.converge(described_recipe)
end
before d... | nickcharlton/dokku-cookbook | spec/unit/recipes/plugins_spec.rb | Ruby | mit | 2,604 |
'use strict';
// Load the application's configuration
const config = require('../server/config');
const url = config.express_host + '/api';
// Required modules
const async = require('async');
const colors = require('colors');
const request = require('request');
// Counter for the Measurements
let counter = 1;
/... | mrunde/WoT-Vertical-Approach | server/demo/demoSensorController.js | JavaScript | mit | 5,051 |
import React from 'react'
import {HOC, Link} from 'cerebral-view-react'
import PageProgress from '../PageProgress'
// View
class AutoReload extends React.Component {
constructor (props) {
super(props)
this.state = {
secondsElapsed: 0
}
this.onInterval = this.onInterval.bind(this)
}
compone... | burning-duck/twibral | src/ui/components/AutoReload/index.js | JavaScript | mit | 3,914 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Task Management System</title>
... | rudiliu/task_management | application/views/frame/header_view.php | PHP | mit | 2,394 |
# Author: John Elkins <john.elkins@yahoo.com>
# License: MIT <LICENSE>
from common import *
if len(sys.argv) < 2:
log('ERROR output directory is required')
time.sleep(3)
exit()
# setup the output directory, create it if needed
output_dir = sys.argv[1]
if not os.path.exists(output_dir):
os.makedirs(ou... | soulfx/gmusic-playlist | ExportLists.py | Python | mit | 3,890 |
/* Client-side router settings */
Router.configure({
layoutTemplate:"layout",
notFoundTemplate:"page_not_found",
loadingTemplate:"loading"
});
Router.route("/", {
name:"home",
template:"home"
});
Router.route("/profile", {
name:"profile",
template:"profile"
});
Router.route("/admin", {
name:"admin",... | RadioRevolt/DABelFish | client/router.js | JavaScript | mit | 494 |
<?php
namespace S327at\L51blog\Models;
use Illuminate\Database\Eloquent\Model;
class Group extends Model {
} | s327at/l51blog | src/Models/Group.php | PHP | mit | 114 |
package com.calebmeyer.bettercrafting.creativetab;
import com.calebmeyer.bettercrafting.constants.Project;
import com.calebmeyer.bettercrafting.initialization.ModItems;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
public class CreativeTabBCT {
public static final CreativeTabs BE... | calebmeyer/Better-Crafting-Tables | src/main/java/com/calebmeyer/bettercrafting/creativetab/CreativeTabBCT.java | Java | mit | 907 |
//Change class of "Home" and "About"
function setActive() {
document.getElementById("about").className += "active"
document.getElementById("home").setAttribute('class','no')
}
| losko/CodeNameSite | public/js/helper.js | JavaScript | mit | 184 |
<?php
class PostModel extends CI_Model
{
public $id;
public $title;
public $content;
public $date;
public $author;
public $upvotes = 0;
public $downvotes = 0;
public $voters;
public function __construct()
{
parent::__construct();
}
public function GetAll()
... | vonderborch/CS483 | final/application/models/PostModel.php | PHP | mit | 1,606 |
/// <reference types="xrm" />
export declare function findIndex(handlers: Xrm.Events.ContextSensitiveHandler[], handler: Xrm.Events.ContextSensitiveHandler): number;
| camelCaseDave/xrm-mock | dist/xrm-mock-generator/helpers/array.helper.d.ts | TypeScript | mit | 166 |
<?php
namespace Vilks\DataObject;
use Vilks\DataObject\Exception\DirectPropertySetException;
use Vilks\DataObject\Exception\PropertyNotFoundException;
use Vilks\DataObject\Exception\PropertyValidationFailedException;
use Vilks\DataObject\Exception\WrongEvolutionInheritanceException;
use Vilks\DataObject\Validator\Data... | igrizzli/data-object | src/Vilks/DataObject/DataObject.php | PHP | mit | 5,163 |
import _plotly_utils.basevalidators
class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showexponent",
parent_name="scatterpolar.marker.colorbar",
**kwargs
):
super(ShowexponentValidator, self).__init__(
... | plotly/plotly.py | packages/python/plotly/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py | Python | mit | 554 |
<?php
namespace Midnight\Crawler\Plugin\TestData;
class MuryoTestData extends AbstractTestData
{
/**
* @var string
**/
protected $rss_name = 'muryo.xml';
/**
* @var array
**/
protected $html_paths = array(
'muryo/71340.html',
'muryo/71370.html',
'muryo/7... | togusafish/app2641-_-AdultMidnight | src/Midnight/Crawler/Plugin/TestData/MuryoTestData.php | PHP | mit | 397 |
using System;
using Argus.Extensions;
namespace Argus.Data
{
/// <summary>
/// Contains a string name/value pair seperated by an equals sign. The values can be set via the properties or by passing in a
/// delimited string. E.g. FirstName=Blake.
/// </summary>
/// <remarks></remarks>
public... | blakepell/Argus | Argus/Argus.Core/Data/Parameter.cs | C# | mit | 3,083 |
from csacompendium.csa_practice.models import PracticeLevel
from csacompendium.utils.pagination import APILimitOffsetPagination
from csacompendium.utils.permissions import IsOwnerOrReadOnly
from csacompendium.utils.viewsutils import DetailViewUpdateDelete, CreateAPIViewHook
from rest_framework.filters import DjangoFilt... | nkoech/csacompendium | csacompendium/csa_practice/api/practicelevel/practicelevelviews.py | Python | mit | 2,046 |
export const ADD_COCKTAIL = 'ADD_COCKTAIL';
export const LOAD_COCKTAILS = 'LOAD_COCKTAILS';
export const ADD_SPIRIT = 'ADD_SPIRIT';
export const REMOVE_SPIRIT = 'REMOVE_SPIRIT';
export const UPDATE_HUE = 'UPDATE_HUE';
| Jack95uk/HappyHour | src/actions/types.js | JavaScript | mit | 218 |
#include <algorithm>
#include <iostream>
#include "RustyFist/DrawMe.h"
#include "RustyFist/TouchSink.h"
#include "OpenGLLayer.h"
using namespace cocos2d;
using namespace std;
OpenGLLayer::OpenGLLayer()
{
}
OpenGLLayer::~OpenGLLayer()
{
}
bool OpenGLLayer::init()
{
return Layer::init();
}
cocos2d::Scene* OpenGLLay... | Ingener74/Lost-Foot | RustyFist/src/OpenGLLayer.cpp | C++ | mit | 2,225 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
#include "tcp_socket.h"
using namespace easynet;
//TCPSocket 已连接的服务器
TCPSocket::TCPSocket(EPOLLSvrPtr s) {
socket_handler_... | PickMio/NetEase | olds/network/src/tcp_socket.cc | C++ | mit | 5,843 |
using Android.OS;
using Android.Text;
using Android.Util;
using REKT.Graphics;
using REKT.Graphics.Unsafe;
using REKT.DI;
using SkiaSharp;
using System;
using System.Text;
using D = System.Diagnostics.Debug;
using NativeActivity = Android.App.Activity;
using NativeBitmap = Android.Graphics.Bitmap;
using NativeBitmapFac... | marzer/REKT | REKT.Droid/Extensions.cs | C# | mit | 16,165 |
// animating the scroll effect
$('.screenshots').on('click', function(e){
e.preventDefault();
$("html, body").animate({ scrollTop: "950px", duration: 500 });
});
| PersonifyJS/PersonifyApp | app/public/javascripts/application.js | JavaScript | mit | 167 |
'use strict';
var path = require('path');
module.exports = path.join.bind(path, __dirname, '..');
| stackjie/vue-pull-to | build/index.js | JavaScript | mit | 99 |
<?php
/*
* This file is part of the Asset Injection package, an RunOpenCode project.
*
* (c) 2015 RunOpenCode
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RunOpenCode\AssetsInjection\Tests\Mockup;
use RunOpenCode\Asse... | RunOpenCode/assets-injection | test/Mockup/DummyCompilerPass.php | PHP | mit | 1,708 |
var markdown = window.markdownit();
$(document).ready(function() {
var $wish = $('#wish');
var todoNotificationArea = $('#todos .notification-area');
var todoNotificationIcon = $('#todos .notification-area > i');
var todoNotificationText = $('#todos .notification-area > span');
$('#news-stream ... | arpitbbhayani/penny | app/static/js/index.js | JavaScript | mit | 13,851 |
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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, ... | beetbox/beets | beets/dbcore/query.py | Python | mit | 29,107 |
require_relative '../animation'
module NixonPi
module Animations
class CountFromToAnimation < Animation
register :count_from_to, self
accepted_commands :start_value, :single_digit?
# TODO: unfinished and untested
def initialize(options = {})
super(options)
@options[:singl... | danielkummer/nixon-pi | lib/nixonpi/animations/tube/count_up_all_animation.rb | Ruby | mit | 704 |
"use strict";
var http_1 = require("@angular/http");
var AppSettings = (function () {
function AppSettings() {
}
Object.defineProperty(AppSettings, "API_OPTIONS", {
get: function () {
var headers = new http_1.Headers({ 'Content-Type': 'application/json' }), options = new http_1.RequestOp... | cristirosu/rpg-scheduler-front | src/app/shared/services/app.settings.js | JavaScript | mit | 1,301 |
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using tomware.Microwf.Domain;
using tomware.Microwf.Infrastructure;
namespace tomware.Microwf.Engine
{
public interface IJobQueueControllerService
{
Task<IEnumerable<WorkItemViewModel>> GetSnapshotAsync();
Task<PaginatedLis... | thomasduft/microwf | src/microwf.AspNetCoreEngine/Services/JobQueueControllerService.cs | C# | mit | 2,595 |
require "pivotal/sass/version"
module Pivotal
module Sass
class Engine < ::Rails::Engine
end
end
end
| pivotal/pivotal-styles-sass | lib/pivotal/sass.rb | Ruby | mit | 114 |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table... | Ranthalion/LevelUp | database/migrations/2014_10_12_000000_create_users_table.php | PHP | mit | 787 |
<?php
/*
*
*/
namespace RDF\JobDefinitionFormatBundle\Type;
/**
*
*
* @author Richard Fullmer <richardfullmer@gmail.com>
*/
class CMYKColor
{
/**
* @var float
*/
protected $cyan;
/**
* @var float
*/
protected $magenta;
/**
* @var float
*/
protected $yell... | richardfullmer/RDFJobDefinitionFormatBundle | Type/CMYKColor.php | PHP | mit | 1,730 |
<html>
<head>
<title> Install SEO Commerce</title>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<style>
#container {
margin:auto;
}
label, input {
display: block;
}
</style>
</head>
<body>
<div class="container">
<form action="pasang_p.php" method="POST">
<label> Nama Situs </label>
<input t... | idmahardika/SEO_commerce | pasang.php | PHP | mit | 634 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DebtSnowBall2017
{
class LoanList
{
private List<Loan> loanList;
public LoanList()
{
this.loanList = new List<Loan>();
... | passanpm/DebtSnowBall | DebtSnowBall2017/DebtSnowBall2017/LoanList.cs | C# | mit | 2,759 |