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
namespace NoteBundle\Repository;
/**
* PriorityRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class PriorityRepository extends \Doctrine\ORM\EntityRepository
{
}
| adriangarciaics/notas | src/NoteBundle/Repository/PriorityRepository.php | PHP | mit | 240 |
import { Match, Link } from './index';
Match.Link = Link;
export default Match; | developit/preact-router | match/src/cjs.js | JavaScript | mit | 80 |
// File auto generated by STUHashTool
using static STULib.Types.Generic.Common;
namespace STULib.Types.Dump {
[STU(0xAD4F324E)]
public class STU_AD4F324E : STU_7A7F2732 {
}
}
| kerzyte/OWLib | STULib/Types/Dump/STU_AD4F324E.cs | C# | mit | 188 |
using System.Web;
using System.Web.Mvc;
namespace WeCanHelp.Web
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}
| se02035/WEcanHELP | WeCanHelp/WeCanHelp.Web/App_Start/FilterConfig.cs | C# | mit | 268 |
#ifndef PK_PRIORITYQUEUE_HPP
#define PK_PRIORITYQUEUE_HPP
#include <algorithm>
#include <functional>
#include "vector.hpp"
namespace pk
{
template<class T, int Size, class Compare>
class priority_queue
{
public:
priority_queue() {}
priority_queue(const T* first, const T* last)
{
while(first ... | pawel-kieliszczyk/algorithms | source/priority_queue.hpp | C++ | mit | 1,441 |
package edu.ucsb.cs56.w15.drawings.vonmeier.advanced;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JPanel;
import javax.swing.JComponent;
// the four tools things we'll use to draw
import java.awt.geom.Line2D; // single lines
import java.awt.geom.Ellipse2D; // ellipses and cir... | UCSB-CS56-W15/W15-lab04 | src/edu/ucsb/cs56/w15/drawings/vonmeier/advanced/MultiPictureComponent.java | Java | mit | 2,031 |
import * as Promise from 'bluebird'
import BinarySearchTree from './BinarySearchTree'
export class Actor {
constructor(draw, props = {}) {
this.draw = draw
this.zIndex = props.zIndex
this.animationDuration = props.animationDuration || 0
this.animationLoop = props.animationLoop || false
this.anima... | dherault/Menestrel | src/menestrel.js | JavaScript | mit | 3,306 |
import urllib
import urllib2
import string
import json
import websocket
import thread
import time
#// Grab hitbox ip and socket id //////////////////#
site = "http://api.hitbox.tv/chat/servers.json?redis=true"
lines = json.load(urllib2.urlopen(site))#.read()
for line in lines:
ip = ".".join(line['server_ip'].sp... | cgwennap/pyHitBot | testsocket.py | Python | mit | 3,056 |
/// <amd-module name="@angular/language-service/src/reflector_host" />
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { StaticSymbolResolverHost } from '@ang... | friendsofagape/mt2414ui | node_modules/@angular/language-service/src/reflector_host.d.ts | TypeScript | mit | 970 |
from octopy.utils import *
from ru.parallel.octotron.core.logic import Response
from ru.parallel.octotron.generators.tmpl import ReactionTemplate
from ru.parallel.octotron.generators.tmpl import ReactionAction as Reaction
def ReactsFromDict(reactions_dict):
res = []
for name, reaction in reactions_dict.items():
... | srcc-msu/octotron | octopy/react_wrapper.py | Python | mit | 1,761 |
package collision
import (
"github.com/teomat/mater/vect"
)
func ExampleAddBodies() {
space := NewSpace(vect.Vect{0, 10})
{
//Create a body
body := NewBody(BodyType_Dynamic)
//Change body properties
body.SetMass(2.0)
//Create a new shape
circle := NewCircle(vect.Vect{-3, -10}, 1)
//Add the shape ... | vova616/mater | collision/space_test.go | GO | mit | 1,040 |
package min15.structure;
import java.math.BigInteger;
/**
* Created by Antoine-Ali on 18/02/2015.
*/
public class IntegerInstance extends Instance
{
private final BigInteger _value;
public IntegerInstance(ClassInfo classInfo, BigInteger value) {
super(classInfo);
this._value = ... | sidewinder94/Min15 | min15/structure/IntegerInstance.java | Java | mit | 419 |
module DomainViewerTracker
VERSION = "0.1.1"
end
| rockuapps/domain_viewer_tracker | lib/domain_viewer_tracker/version.rb | Ruby | mit | 51 |
<?php
declare(strict_types=1);
/*
* This file is part of the Valkyrja Framework package.
*
* (c) Melech Mizrachi <melechmizrachi@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Valkyrja\Http\Facades;
use Va... | valkyrjaio/valkyrja | src/Valkyrja/Http/Facades/Request.php | PHP | mit | 2,447 |
/* -- Imports -- */
//Process information
//Windows and mac
//var ps = require('psnode');
var ps = require('ps-man');
var pusage = require('pidusage');
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var cron = require('node-cron');
... | MusicalCreeper01/Monitor | index.js | JavaScript | mit | 4,590 |
import mock
from st2tests.base import BaseActionTestCase
from runfolder_service import ArteriaRunfolderServiceAction
from tests.pack_test_utils import FakeResponse
class RunfolderServiceServiceTest(BaseActionTestCase):
action_cls = ArteriaRunfolderServiceAction
def test_get_state(self):
expected... | arteria-project/arteria-packs | tests/test_action_runfolder_service.py | Python | mit | 1,239 |
using System;
using System.IO;
using DataTool.FindLogic;
using DataTool.Flag;
using TankLib;
using TankLib.STU.Types;
using static DataTool.Helper.IO;
using static DataTool.Program;
using static DataTool.Helper.STUHelper;
namespace DataTool.ToolLogic.Extract {
[Tool("extract-abilities", Description = "Extract abi... | overtools/OWLib | DataTool/ToolLogic/Extract/ExtractAbilities.cs | C# | mit | 1,921 |
<?php
namespace Bolt;
use Bolt\AccessControl\Permissions;
use Bolt\Storage\Entity;
use Bolt\Translation\Translator as Trans;
use Doctrine\DBAL\Exception\TableNotFoundException;
use Silex;
use Symfony\Component\HttpFoundation\Request;
/**
* Class to handle things dealing with users.
*/
class Users
{
/** @intern... | richardhinkamp/bolt | src/Users.php | PHP | mit | 17,354 |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class PageviewDevicesAndReferers extends Migration
{
public function up()
{
Schema::create('session_devices', function (Blueprint $table) {
$table->increment... | remp2020/remp | Beam/database/migrations/2018_03_22_105849_pageview_devices_and_referers.php | PHP | mit | 1,497 |
package net.minecraft.world.border;
import com.google.common.collect.Lists;
import java.util.Iterator;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.world.ChunkCoordIntPair;
public class WorldBorder
{
pr... | Hexeption/Youtube-Hacked-Client-1.8 | minecraft/net/minecraft/world/border/WorldBorder.java | Java | mit | 7,779 |
module Spectacles
module SchemaStatements
module Mysql2Adapter
include Spectacles::SchemaStatements::AbstractAdapter
# overrides the #tables method from ActiveRecord's MysqlAdapter
# to return only tables, and not views.
def tables(name = nil, database = nil, like = nil)
database ... | liveh2o/spectacles | lib/spectacles/schema_statements/mysql2_adapter.rb | Ruby | mit | 1,402 |
package protocol
import (
"bytes"
"crypto"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"gopkg.in/square/go-jose.v2"
)
// requestBodyLimit is the maximum number of bytes we read from a
// request body. This is for basic DoS protection.
const requestBodyLimit int = 1 << 20
// A NonceSource is something that c... | tommie/acme-go | protocol/httpserver.go | GO | mit | 3,820 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Whiteboard.DataAccess.Models;
namespace whiteboard.BusinessLogic.ProfileModule
{
public interface IProfileService : IService<Profile>
{
Profile Get(string email);
bool Vali... | pizarron/whiteboard | whiteboard.BusinessLogic/ProfileModule/IProfileService.cs | C# | mit | 696 |
'use strict';
const mergeTestDescriptions = require('../../../testUtils/mergeTestDescriptions');
const { messages, ruleName } = require('..');
const sharedTests = {
accept: [
{
code: 'a { border-#$side: 0; }',
description: 'ignore sass-like interpolation',
},
{
code: 'a { box-sizing: #$type-box; }',
... | stylelint/stylelint | lib/rules/color-hex-case/__tests__/index.js | JavaScript | mit | 6,240 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace Wilderness.Game.Web.Startup
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pat... | JornWildt/Wilderness | Wilderness.Game.Web/Startup/RouteConfig.cs | C# | mit | 543 |
using System.Windows;
using System.Windows.Interactivity;
namespace Fluent.Metro.Behaviours
{
/// <summary>
/// Enables the use of behaviors in styles
/// </summary>
public static class StylizedBehaviors
{
private static readonly DependencyProperty OriginalBehaviorProperty = DependencyProp... | robertmuehsig/Fluent.Ribbon | Fluent.Ribbon/Metro/Behaviours/StylizedBehaviors.cs | C# | mit | 4,118 |
from keras_code import predict, models
import numpy as np
import os
import math
from PIL import Image
from keras import backend as K
from utilities.logging import print_n_log
import utilities.paths as paths
DRIVE = paths.get_drive()
def build_img(array):
array = np.squeeze(array)
# In Pixels
padding = 5
... | HaydenFaulkner/phd | visualisations/networks/activations.py | Python | mit | 3,664 |
class ChoreListItemsController < ApplicationController
# PUT /chore_list_items/1.json
def update
@chore_list_item = ChoreListItem.find(params[:id])
respond_to do |format|
if @chore_list_item.update_attributes(params[:chore_list_item])
format.json { render json: @chore_list_item }
else
... | dhahn/r13-team-45 | app/controllers/chore_list_items_controller.rb | Ruby | mit | 439 |
/******/ (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... | dxfstart521/study | webpack/dist/main.js | JavaScript | mit | 764,807 |
require 'contentstack/api'
require 'contentstack/content_type'
require 'contentstack/asset_collection'
module Contentstack
class Client
attr_reader :region, :host
# Initialize "Built.io Contentstack" Client instance
def initialize(api_key, access_token, environment, options={})
@region = options[:r... | builtio-contentstack/contentstack-ruby | lib/contentstack/client.rb | Ruby | mit | 1,003 |
import asyncio
from arq import create_pool
from arq.connections import RedisSettings
async def the_task(ctx):
print('running the task with id', ctx['job_id'])
async def main():
redis = await create_pool(RedisSettings())
# no id, random id will be generated
job1 = await redis.enqueue_job('the_task')
... | samuelcolvin/arq | docs/examples/job_ids.py | Python | mit | 1,073 |
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
using namespace std;
int main ()
{
ios_base::sync_with_stdio (false);
int n=0... | exaw/timustasks | 1313/main.cpp | C++ | mit | 968 |
package parser;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import edu.stanford.nlp.ling.CoreLabel;
import edu.stanford.nlp.ling.HasWord;
import edu.stanford.nlp.ling.Label;
import edu.stanford.nlp.ling.TaggedWord;
import edu.stanford.nlp.parser.lexparser.LexicalizedParse... | visio/STT | GSTT_V2/src/parser/Parser.java | Java | mit | 2,185 |
/**
* 客户在wo中的信息
* @type {[type]}
*/
var _ = require('underscore');
var mongoose = require('mongoose');
var connection = mongoose;
var BSS = require('../libs/bss_gz');//** 贵州联通BSS系统
var schema = new mongoose.Schema({
mobile: String, //** 客户手机号
name: String, //** 客户姓名
category: String, //** 类型
info: {},//** wo系统信... | williambai/beyond-webapp | unicom/models/CustomerPhone.js | JavaScript | mit | 2,320 |
'use strict';
angular.module('Friends').controller('UsersCtrl', ['$scope', 'usersData', function ($scope, usersData) {
usersData.getAll().then(function (users) {
$scope.users = users;
});
}]); | georgiwe/FriendsFrontEnd | app/users/usersCtrl.js | JavaScript | mit | 197 |
require.ensure([], function(require) {
require("./108.async.js");
require("./216.async.js");
require("./432.async.js");
require("./864.async.js");
});
module.exports = 865; | skeiter9/javascript-para-todo_demo | webapp/node_modules/webpack/benchmark/fixtures/865.async.js | JavaScript | mit | 172 |
require 'rails_helper'
describe EventImportFilesController do
fixtures :all
describe "GET index" do
describe "When logged in as Administrator" do
login_fixture_admin
it "assigns all event_import_files as @event_import_files" do
get :index
assigns(:event_import_files).should eq(Eve... | next-l/enju_event | spec/controllers/event_import_files_controller_spec.rb | Ruby | mit | 9,028 |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | milfred/draft-o-tron-3000 | app/assets/javascripts/application.js | JavaScript | mit | 669 |
package view;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
import java.util.Queue;
import model.Event;
import model.Params;
import processing.core.PApplet;
import controller.MainLoop;
/**
* The hud handle the update and drawing of one or multiples emi... | francisbonneau/lscv-client | src/view/Hud.java | Java | mit | 5,871 |
using UnityEngine;
using System.Collections;
public class Narration : MonoBehaviour {
public string[] content = new string[0];
public bool isFinal = false;
}
| Almax27/LD33 | Assets/scripts/Narration.cs | C# | mit | 171 |
// Copyright (C) 2016 Jonathan Müller <jonathanmueller.dev@gmail.com>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#ifndef TYPE_SAFE_INTEGER_HPP_INCLUDED
#define TYPE_SAFE_INTEGER_HPP_INCLUDED
#include <iosfwd>
#include <limits>
#include <t... | kkitsune/GoblinEngine | engine/libs/type_safe/include/type_safe/integer.hpp | C++ | mit | 23,595 |
<?php
/*
* This file is part of the umulmrum/holiday package.
*
* (c) Stefan Kruppa
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Umulmrum\Holiday\Resolver;
use Umulmrum\Holiday\Provider\HolidayProviderInterface;
fi... | umulmrum/holiday | src/Resolver/ClassNameResolver.php | PHP | mit | 959 |
/**
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v25.1.0
* @link http://www.ag-grid.com/
* @license MIT
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics ... | ceolter/ag-grid | community-modules/core/dist/es6/selectionController.js | JavaScript | mit | 14,742 |
exports.read = _fs_read;
exports.write = _fs_write;
exports.readAsync = _fs_read_async;
exports.writeAsync = _fs_write_async;
| orktes/huealexa | vm/fs.js | JavaScript | mit | 127 |
import {
it,
describe,
async,
inject,
TestComponentBuilder,
beforeEachProviders
} from 'angular2/testing';
import {Component} from 'angular2/core';
import {LoggedInOutlet} from './logged-in-outlet';
@Component({
selector: 'test-component',
template: `<div logged-in-outlet></div>`
})
class TestComponen... | gravity-addiction/angular2-webpack-login | src/app/directives/logged-in-outlet/logged-in-outlet.spec.ts | TypeScript | mit | 602 |
/* Flot plugin for drawing all elements of a plot on the canvas.
Copyright (c) 2007-2014 IOLA and Ole Laursen.
Licensed under the MIT license.
Flot normally produces certain elements, like axis labels and the legend, using
HTML elements. This permits greater interactivity and customization, and often
looks better, du... | enettolima/ceva-finance | lib/js/flot/plugins/jquery.flot.canvas.js | JavaScript | mit | 12,499 |
#include "gamelib/components/update/QPhysics.hpp"
#include "gamelib/components/geometry/AABB.hpp"
#include "gamelib/core/geometry/CollisionSystem.hpp"
#include "gamelib/core/geometry/flags.hpp"
#include "gamelib/core/ecs/Entity.hpp"
#include "gamelib/components/CollisionComponent.hpp"
#include "gamelib/core/Game.hpp"
#... | mall0c/GameLib | src/gamelib/components/update/QPhysics.cpp | C++ | mit | 16,615 |
export { default } from 'ember-uni-form/models/uni-form-field'
| dollarshaveclub/ember-uni-form | app/models/uni-form-field.js | JavaScript | mit | 63 |
from django.conf.urls import url
from Overlay import views
urlpatterns = [
url(r'^$',
views.main,
name='main'),
url(r'^checks/$',
views.checks,
name='checks'),
url(r'^results/$',
views.results,
name='results'),
url(r'^upload/$',
views.upload,
... | DalenWBrauner/FloridaDataOverlay | Website/Florida_Data_Overlay/Overlay/urls.py | Python | mit | 344 |
///<reference path="../../typings/tsd.d.ts"/>
import * as jwt from "jsonwebtoken";
export function authenticate(excludes: string[] = []) {
return function(req, res, next) {
var isExcluded = excludes.filter(exclude => exclude === req.path).length;
if(isExcluded) {
// bypass
... | munxar/projektzwo | backend/src/authenticate.ts | TypeScript | mit | 556 |
const { spawn } = require('child_process');
const _ = require('lodash');
module.exports = function SpawnWatch(bosco) {
return (service, command, cwd, verbose, buildFinished) => {
bosco.log(`Spawning ${'watch'.cyan} command for ${service.name.blue}: ${command.log}`);
const wc = spawn(process.env.SHELL, ['-c',... | tes/bosco | src/ExternalBuilders/SpawnWatch.js | JavaScript | mit | 2,801 |
"use strict";
var Inflector = require('../../inflector/inflector');
/**
* ObjectIdentifier object which helps with the location of files and building identifiers
*
* @class ObjectIdentifier
* @param {String} identifier Identifier to convert to an object.
* @constructor
*/
function ObjectIdentifier(identifier)... | JaspervRijbroek/raddish | lib/object/identifier/identifier.js | JavaScript | mit | 4,498 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Globalization;
using System.Linq;
#if NATIVE_ASYNC
using System.Threading;
#endif
namespace LinqToDB.DataProvider
{
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;... | linq2db/linq2db | Source/LinqToDB/DataProvider/BulkCopyReader.cs | C# | mit | 12,041 |
import marked from 'marked';
import htmlclean from 'htmlclean';
import he from 'he';
const renderer = new marked.Renderer();
renderer.listitem = (text) => {
if (/<input[^>]+type="checkbox"/.test(text)) {
return `<li class="task-list-item">${text}</li>\n`;
}
return `<li>${text}</li>\n`;
};
renderer.code = (... | oneteam-dev/draft-js-oneteam-rte-plugin | src/encoding/markdownToHTML.js | JavaScript | mit | 842 |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
public class ArraysIndices {
public static void main(String[] args) {
int[][] t = new int[0][0];
System.out.println("t = " + t);
System.out.println("Arrays.toString(t) = " + Arrays.toString(t));
System... | levelp/java_beginners_homework | lesson_04/java/ArraysIndices.java | Java | mit | 1,373 |
/**
* Creates a new Element
*
* @class Element
* @extends EventTarget
* @description todoc
* @property {ClassList} classList
* @property {Vector2} velocity
**/
function Element() {
EventTarget.call(this);
Storage.call(this);
addElementPropertyHandlers.call(this);
this.uuid = generateUUID();
this.velocity ... | bokodi/chillJS | src/core/Element.js | JavaScript | mit | 33,138 |
version https://git-lfs.github.com/spec/v1
oid sha256:4683f5e177392cb502f8c856a4aa32000b062d0aea820991c42454318f0d66da
size 1635
| yogeshsaroya/new-cdnjs | ajax/libs/codemirror/4.3.0/mode/z80/z80.min.js | JavaScript | mit | 129 |
using UnityEngine;
using UnityEditor;
using System.Collections;
namespace UForms.Controls.Fields
{
/// <summary>
///
/// </summary>
public class CurveField : AbstractField< AnimationCurve >
{
/// <summary>
///
/// </summary>
public Color CurveColor { get; set; ... | kilguril/UForms | Assets/UForms/Runtime/Editor/Controls/Fields/CurveField.cs | C# | mit | 3,930 |
import itertools as it
from conference_scheduler.resources import Shape, Constraint
from conference_scheduler.lp_problem import utils as lpu
def _schedule_all_events(events, slots, X, summation_type=None, **kwargs):
shape = Shape(len(events), len(slots))
summation = lpu.summation_functions[summation_type]
... | PyconUK/ConferenceScheduler | src/conference_scheduler/lp_problem/constraints.py | Python | mit | 3,874 |
package com.arellomobile.android.push.utils.notification;
import android.app.Notification;
/**
* Date: 30.10.12
* Time: 18:14
*
* @author MiG35
*/
public interface NotificationFactory
{
void generateNotification();
void addSoundAndVibrate();
void addCancel();
Notification getNotification... | laurion/wabbit-client | Hackathon/YoeroBasePush/src/com/arellomobile/android/push/utils/notification/NotificationFactory.java | Java | mit | 330 |
#ifndef STACK_HPP
#define STACK_HPP
#include "Deque.hpp"
namespace tour {
template <class T>
class Stack{
private:
Deque<T> _deque;
public:
Stack(); //construtor
~Stack (); //metodo destruidor
bool push(T); //insere elemento no inicio da pilha, usa pushFront do deque
... | falcaopetri/ufscar-summer-tour | include/Stack.hpp | C++ | mit | 1,069 |
import java.util.*;
public class Sort {
private List<String> names = Arrays.asList("Peter", "Ali", "Moe", "Eli");
// This 4 comparators have same functionality.
private Comparator<String> myComp1 = new Comparator<String>(){
@Override
public int compare(String a, String b) ... | nejads/java8-examples | Sort.java | Java | mit | 1,003 |
module MatrixDdLppT16
class Fraccion
#Módulo Comparable
include Comparable
attr_reader :num, :dem
def initialize(num,dem)
@num, @dem = num, dem
mcm = gcd(num, dem)
@num = num/mcm
@dem = dem/mcm
end
#Calculo del minimo comun multiplo
def gcd(u, v)
u, v = u.abs, v.ab... | alu0100498820/prct11 | lib/matrix_dd_lpp_t16/fraccion.rb | Ruby | mit | 878 |
package net.robig.stlab;
import net.robig.logging.Logger;
import net.robig.stlab.util.config.AbstractValue;
import net.robig.stlab.util.config.BoolValue;
import net.robig.stlab.util.config.DoubleValue;
import net.robig.stlab.util.config.IValueChangeListener;
import net.robig.stlab.util.config.IntValue;
import net.robi... | robig/stlab | src/net/robig/stlab/StLabConfig.java | Java | mit | 5,762 |
using System;
using System.Diagnostics.Contracts;
using System.Windows;
using starshipxac.Windows.Devices.Interop;
using starshipxac.Windows.Interop;
namespace starshipxac.Windows.Devices
{
/// <summary>
/// スクリーン情報を保持します。
/// </summary>
public class Screen : IEquatable<Screen>
{
... | starshipxac/starshipxac.ShellLibrary | Source/starshipxac.Windows/Devices/Screen.cs | C# | mit | 4,288 |
package presenters
| open-gtd/server | tags/presentation/presenters/dummy_test.go | GO | mit | 19 |
class Solution {
public:
static bool cmp(string a, string b){
if(a.length()!=b.length()) return a.length()>b.length();
if(a.compare(b)<0) return true;
return false;
}
string findLongestWord(string s, vector<string>& d) {
sort(d.begin(),d.end(),cmp);
map<char,vector<in... | zfang399/LeetCode-Problems | 524.cpp | C++ | mit | 1,218 |
import sinon from 'sinon';
import unexpected from 'unexpected';
import unexpectedSinon from 'unexpected-sinon';
import unexpectedKnex from 'unexpected-knex';
import { Knorm } from '../src/Knorm';
import { Virtual } from '../src/Virtual';
import { knex } from '../util/knex';
import { postgresPlugin } from '../util/postg... | joelmukuthu/knorm | packages/knorm/test/Model.spec.js | JavaScript | mit | 74,813 |
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_Add_course_kml extends CI_Migration {
function up(){
echo "Adding col: course_kml<br>";
$this->dbforge->add_column('course', array(
'course_kml' => array('type'=>'VARCHAR', 'constraint'=>512)
));
echo "Remove col: c... | iufer/race | public/system/race/migrations/012_Add_course_kml.php | PHP | mit | 624 |
namespace DotNet.HighStock.Options
{
/// <summary>
/// Properties for each single point
/// </summary>
public class PlotOptionsBoxplotPoint
{
/// <summary>
/// Events for each single point
/// </summary>
public PlotOptionsBoxplotPointEvents Events
{
... | lisa3907/dotnet.highstock | DotNet.HighStock/Options/PlotOptionsBoxplotPoint.cs | C# | mit | 349 |
const printMessage = require('..');
printMessage([
'This message will be without border',
'But you still can set marginTop and marginBottom'
], {
border: false,
marginTop: 3,
marginBottom: 3
});
| ghaiklor/node-print-message | examples/withoutBorder.js | JavaScript | mit | 206 |
using UnityEngine;
using System.Collections;
public class AnalogueStick : MonoBehaviour {
// Public vars
public Texture Tex;
public Texture InnerTex;
public Vector2 Position = Vector2.zero;
public float Radius;
public float Sensitivity = 1;
public static Vector3 Val = Vector3.zero;
// Private vars
priva... | bombpersons/RocketDodger | Assets/Resources/Scripts/Utils/GUI/AnalogueStick.cs | C# | mit | 3,318 |
package itchio
import (
"encoding/json"
"testing"
"time"
"github.com/mitchellh/mapstructure"
"github.com/stretchr/testify/assert"
)
func Test_GameHook(t *testing.T) {
ref := Game{
ID: 123,
InPressSystem: true,
Platforms: Platforms{
Linux: ArchitecturesAll,
Windows: ArchitecturesAll,
... | itchio/go-itchio | hook_game_test.go | GO | mit | 2,858 |
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(5) braces fieldsfirst noctor nonlb space lnc
package weka.classifiers.bayes.net;
import java.awt.event.ActionEvent;
import javax.swing.Action;
import jav... | Prisjacke/Sismos | Source/net/GUI$ActionCutNode.java | Java | mit | 996 |
<div class="box">
<div class="box-table">
<?php
echo show_alert_message($this->session->flashdata('message'), '<div class="alert alert-auto-close alert-dismissible alert-info"><button type="button" class="close alertclose" >×</button>', '</div>');
echo show_alert_messag... | cigiko/brdnc.cafe24.com | cb/views/admin/basic/deposit/depositlist/index.php | PHP | mit | 9,561 |
<?php
namespace AppBundle\Infrastructure\Market;
use Domain\Order\Order;
interface ClientOrderInterface
{
/**
* @param Order $order
* @return bool
*/
public function createOrder(Order $order);
/**
* @param Order $order
* @param string $message
* @return string Response cont... | pvgomes/symfony2biso | src/AppBundle/Infrastructure/Market/ClientOrderInterface.php | PHP | mit | 801 |
const babelRule = require('./rule-babel')
const lessRule = require('./rule-less')
const rules = [babelRule, lessRule]
module.exports = rules
| Acgsior/Innovation | build/rules/index.js | JavaScript | mit | 143 |
package types
// PaymentRequest request to make payment
type PaymentRequest struct {
ClientID string `json:"clientID"`
ClientToken string `json:"clientToken"`
PaymentReferenceID string `json:"paymentReferenceID"`
}
| WPTechInnovation/worldpay-within-sdk | sdkcore/wpwithin/types/paymentrequest.go | GO | mit | 236 |
class Hash
def compact
select do |_, v|
!v.nil?
end
end
def except(*keys)
dup.except!(*keys)
end
def except!(*keys)
keys.each { |key| delete(key) }
self
end
def only!(*ks)
except!(*(keys - ks))
end
def only(*ks)
dup.only!(*ks)
end
end
| abdulsattar/rottendesk | lib/rottendesk/helpers/hash.rb | Ruby | mit | 294 |
using System.IO;
namespace NClap.ConsoleInput
{
/// <summary>
/// Abstract interface for managing console history.
/// </summary>
public interface IConsoleHistory
{
/// <summary>
/// The count of entries in the history.
/// </summary>
int EntryCount { get; }
... | reubeno/NClap | src/NClap/ConsoleInput/IConsoleHistory.cs | C# | mit | 1,201 |
jQuery(document).ready(function($){
// Хук начала инициализации javascript-составляющих шаблона
ls.hook.run('ls_template_init_start',[],window);
$('html').removeClass('no-js');
// Определение браузера
if ($.browser.opera) {
$('body').addClass('opera opera' + parseInt($.browser.version));
}
if ($.... | ViktorZharina/auto-alto-971-cms | plugins/njournal/js/template.js | JavaScript | mit | 8,464 |
#
# Author:: Matheus Francisco Barra Mina (<mfbmina@gmail.com>)
# © Copyright IBM Corporation 2015.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#
module Fog
module Softlayer
class Account
class Mock
# Get all accounts who are owned by brand.
# @param [Integer] identifier
#... | fog/fog-softlayer | lib/fog/softlayer/requests/account/get_brand_owned_accounts.rb | Ruby | mit | 3,546 |
/*
Copyright (c) 2006, NAKAMURA Satoru
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions... | robert-kurcina/generator | common/js/lib/DateFormatter.js | JavaScript | mit | 7,258 |
/**
* Logback: the reliable, generic, fast and flexible logging framework.
* Copyright (C) 1999-2015, QOS.ch. All rights reserved.
*
* This program and the accompanying materials are dual-licensed under
* either the terms of the Eclipse Public License v1.0 as published by
* the Eclipse Foundation
*
* ... | cscfa/bartleby | library/logBack/logback-1.1.3/logback-core/src/main/java/ch/qos/logback/core/ConsoleAppender.java | Java | mit | 3,892 |
package de.silveryard.car.gradleplugin;
import java.io.File;
/**
* Created by silveryard on 23.05.17.
*/
public class InstallBluetoothPlayerTask extends InstallAppTask {
@Override
protected File getAPFFile() {
return getProject().file("BluetoothPlayer/build/apf/de_silveryard_car_BluetoothPlayer_1_0-... | Silveryard/CarLauncher | GradlePlugin/src/main/java/de/silveryard/car/gradleplugin/InstallBluetoothPlayerTask.java | Java | mit | 344 |
import './src/styles/theme.css'
| siddharthkp/siddharthkp.github.io | gatsby-browser.js | JavaScript | mit | 32 |
package main
import (
"github.com/codegangsta/martini"
"github.com/dustin/go-humanize"
"github.com/tanner/isgtwifidown.com/gtwifi"
"html/template"
"log"
"net/http"
"time"
)
type PageData struct {
Green bool
Yellow bool
Red bool
Reason string
LastUpdated string
}
type LastData stru... | Tanner/isgtwifidown.com | main.go | GO | mit | 1,441 |
if( !String.prototype.trim ){
String.prototype.trim = function () {
return this.replace(/^\s*/, "").replace(/\s*$/, "");
}
}
if( !String.prototype.ltrim ){
String.prototype.ltrim=function(){return this.replace(/^\s+/,'');};
}
if( !String.prototype.rtrim ){
String.prototype.rtrim=function(){ret... | scirelli/multifileuploader | js/extras-string.js | JavaScript | mit | 3,405 |
# 倒序排
a = sorted(['bob', 'about', 'Zoo', 'Credit'], key=str.lower, reverse=True)
print(a)
# 按成绩从高到低排序:
L = [('Bob', 75), ('Adam', 92), ('Bart', 66), ('Lisa', 88)]
def by_score(t):
return t[1]
L2 = sorted(L, key=by_score)
print(L2)
# [('Bart', 66), ('Bob', 75), ('Lisa', 88), ('Adam', 92)] | longze/my-cellar | web/articles/python/demo/09-sort.py | Python | mit | 322 |
DGVocabulary = function () {
};
DGVocabulary._MSG = {};
DGVocabulary._MSG["alert_select_row"] = "你必须选择一个或多个行进行此操作!";
DGVocabulary._MSG["alert_perform_operation"] = "您是否确定要进行这项行动?";
DGVocabulary._MSG["alert_perform_operation_delete"] = "您是否确定要进行删除操作?";
DGVocabulary._MSG["alert_perform_operation_clone"] = "您是否确定要进行克隆操作... | jessadayim/findtheroom | web/datagrid-backend/datagrid/languages/js/dg-ch.js | JavaScript | mit | 1,001 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('tracking', '0007_auto_20160313_1725'),
]
operations = [
migrations.AddField(
model_name='organization',
... | Heteroskedastic/Dr-referral-tracker | tracking/migrations/0008_adding_creation_modification_time.py | Python | mit | 1,984 |
/*
VerbDestroyStructure.cpp
(c)2000 Palestar Inc, Richard Lyle
*/
#include "Debug/Assert.h"
#include "SceneryEffect.h"
#include "VerbDestroyStructure.h"
#include "GameContext.h"
//-------------------------------------------------------------------------------
IMPLEMENT_FACTORY( VerbDestroyStructure, Verb );
BEGI... | palestar/darkspace | DarkSpace/VerbDestroyStructure.cpp | C++ | mit | 1,280 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace Jmp.Web
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
... | virtuallysmart/jmp | source/Jmp.Web/Global.asax.cs | C# | mit | 589 |
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using OpenRealEstate.Core.Models;
using OpenRealEstate.Core.Models.Land;
using OpenRea... | OpenRealEstate/OpenRealEstate.NET | Code/OpenRealEstate.Services/RealEstateComAu/ReaXmlTransmorgrifier.cs | C# | mit | 70,646 |
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Filter to correct the joint locations and joint orientations to constraint to range of viable human motion.
/// </summary>
public class BoneOrientationsConstraint
{
public enum ConstraintAxis { X = 0, Y = ... | webrokeit/DTU | 02515 - Healthcare Technology/Jump Squat/Example/Assets/KinectScripts/Filters/BoneOrientationsConstraint.cs | C# | mit | 14,866 |
// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of ... | h0x91b/redis-v8 | redis/deps/v8/src/version.cc | C++ | mit | 4,513 |
require 'volt/server/rack/source_map_server'
# There is currently a weird issue with therubyracer
# https://github.com/rails/execjs/issues/15
# https://github.com/middleman/middleman/issues/1367
#
# To get around this, we just force Node for the time being
ENV['EXECJS_RUNTIME'] = 'Node'
# Sets up the maps for the opa... | merongivian/volt | lib/volt/server/rack/opal_files.rb | Ruby | mit | 2,735 |
var fs = require('fs')
var yaml = require('yamljs')
// Usage: node lib/roundup-helper.js <RoundupMonth> <PostMonth> <Year>
// Returns: Markdown table rows to be copy and pasted into blog post
// Example for August roundup: node lib/roundup-helper.js August September 2016
// Example post: http://electron.atom.io/blog/2... | noomatv/noomatv.github.io | lib/roundup-helper.js | JavaScript | mit | 994 |
// compare version of current installation with the one on github
// inform the user of any update if github version is different
//
$(document).ready(function() {
var current = $.get("./version/version-info.json"),
github = $.get("http://raw.githubusercontent.com/kodejuice/localGoogoo/master/version/version-i... | kodejuice/localGoogle | version/version-tracker.js | JavaScript | mit | 939 |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v0.10.1-rc2-master-7bbfd1f
*/
goog.provide('ng.material.components.list');
goog.require('ng.material.core');
/**
* @ngdoc module
* @name material.components.list
* @description
* List module
*/
angular.module('material.compon... | CirceThanis/bower-material | modules/closure/list/list.js | JavaScript | mit | 8,249 |