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 |
|---|---|---|---|---|---|
'use strict';
angular.module('nav', ['playlist'])
.controller('NavController', function ($scope, $mdDialog, $location, webRTC, socket) {
$scope.showPlaylist = function(ev) {
$mdDialog.show({
controller: 'PlaylistController',
templateUrl: 'app/components/playlist/playlist.html',
parent: angula... | nickfujita/WhiteBoard | public/app/components/nav/nav.js | JavaScript | mit | 978 |
var gulp = require('gulp');
var less = require('gulp-less');
var browserSync = require('browser-sync').create();
var header = require('gulp-header');
var cleanCSS = require('gulp-clean-css');
var rename = require("gulp-rename");
var uglify = require('gulp-uglify');
var filter = require('gulp-filter');
var pkg = require... | maxroar/maxroar.github.io | gulpfile.js | JavaScript | mit | 2,957 |
import React from 'react';
import PropTypes from 'prop-types';
import DatePicker from './DatePicker';
import Cell from './Cell';
import {
View
} from 'react-native';
class CellDatePicker extends React.Component {
static defaultProps = {
mode: 'datetime',
date: new Date()
}
static proptTypes = {
... | lodev09/react-native-cell-components | components/CellDatePicker.js | JavaScript | mit | 1,159 |
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace ChromeRuntimeDownloader.Models
{
public class NugetInfo
{
public NugetInfo(PackageType packageType, string name, string version, CopyPath[] copyPaths)
{
PackageType = packageType;
Name = name;
... | pkudrel/ChromeRuntimeDownloader | src/ChromeRuntimeDownloader/Models/NugetInfo.cs | C# | mit | 626 |
using UnityEngine;
namespace Atlas.Examples
{
public sealed class Example_Range
{
// generic character class
public class Character
{
public void ApplyDamage( float damage ) { /* ... */ }
}
public void OnCharacterHit( Character hitCharacter )
{
... | david-knopp/Atlas | Assets/Examples/Scripts/Runtime/Math/Example_Range.cs | C# | mit | 635 |
/*
* Copyright (C) 2009 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | srsudar/MamasDelRioAndroid | app/src/main/java/org/mamasdelrio/android/views/HierarchyElementView.java | Java | mit | 3,631 |
package render
import (
"image"
"image/draw"
//import png
_ "image/png"
"os"
)
type LevelSheet struct {
width int
height int
filePath string
PixelArray []byte
encoding string
}
//Constructor for LevelSheet
func NewLevelSheet(filePath string) (LevelSheet, int, int) {
reader, err := os.Open(fi... | LokiTheMango/jatdg | game/render/levelsheet.go | GO | mit | 740 |
import java.util.Scanner;
/*
* @author https://github.com/Hoenn
* Happy St. Patrick's Day! Write a program that accepts a year as input and outputs what day St. Patrick's Day falls on.
*/
public class Challenge_27
{
public static final int spMonth=3;
public static final int spDay=17;
public static final St... | FreddieV4/DailyProgrammerChallenges | Intermediate Challenges/Challenge 0027 Intermediate/solutions/solution.java | Java | mit | 1,136 |
//-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2019 Ryo Suzuki
// Copyright (c) 2016-2019 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# include <Siv3D/EngineLog.hpp>
# include <Siv... | wynd2608/OpenSiv3D | Siv3D/src/Siv3D-Platform/WindowsDesktop/Window/HighDPI.cpp | C++ | mit | 1,768 |
var outputType = 'ARRAY';
var input = null;
var output = null;
var fs = require('fs');
var scriptName = process.argv[1].split('/');
scriptName = scriptName[ scriptName.length - 1 ];
function get_usage() {
var usage = "\n";
usage += "Usage: " + scriptName + ' <options> <input markdown file>\n';
usage += ... | finger563/webgme-codeeditor | tools/docStringConverter.js | JavaScript | mit | 2,300 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Common;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
namespa... | ircluzar/RTC3 | Real-Time Corruptor/BizHawk_RTC/BizHawk.Client.EmuHawk/tools/NES/BarcodeEntry.cs | C# | mit | 1,310 |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// Include the required modules
var {assert, expect} = require("../../../../lib/assertions");
var p... | lucashmorais/x-Bench | mozmill-env/msys/firefox/tests/functional/testPreferences/testRestoreHomepageToDefault.js | JavaScript | mit | 3,833 |
namespace ArgentPonyWarcraftClient;
/// <summary>
/// A character associated with a World of Warcraft account.
/// </summary>
public record AccountCharacter
{
/// <summary>
/// Gets a link to the character.
/// </summary>
[JsonPropertyName("character")]
public Self Character { get; init; }
//... | danjagnow/ArgentPonyWarcraftClient | src/ArgentPonyWarcraftClient/Models/ProfileApi/AccountProfile/AccountCharacter.cs | C# | mit | 1,827 |
/*
NormalBatteryProfileTestCase.java
Copyright (c) 2014 NTT DOCOMO,INC.
Released under the MIT license
http://opensource.org/licenses/mit-license.php
*/
package org.deviceconnect.android.profile.intent.test;
import android.content.Intent;
import android.os.Bundle;
import android.support.test.runner.AndroidJUnit4;... | Onuzimoyr/dAndroid | dConnectManager/dConnectManager/app/src/androidTest/java/org/deviceconnect/android/profile/intent/test/NormalBatteryProfileTestCase.java | Java | mit | 12,808 |
package net.bingyan.campass.greendao;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table ELECTRIC_RECORD.
*/
public class ElectricRecord {
private Long id;
private String area;
private Integer building;
private Integer dorm;
... | BingyanStudio/CamPass-Android | app/src-gen/net/bingyan/campass/greendao/ElectricRecord.java | Java | mit | 1,848 |
/**
* Unittest file for led. In this example the timer module is faked also
*
*/
#include "catch.hpp"
#include "Arduino.h"
#include "led.h" // include the unit under test
#include "mock_stimer.h" // include the faked module (so we can set the return values)
void run_loop( StatusToLed* led )
{
for ( int loo... | susundberg/arduino-simple-unittest | examples/example_blink_led/tests/test_led.cpp | C++ | mit | 894 |
# -*- coding: utf-8 -*-
# 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 Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope... | Yukinoshita47/Yuki-Chan-The-Auto-Pentest | Module/dirsearch/lib/core/Path.py | Python | mit | 987 |
<?php namespace eBussola\Feedback\Components;
use Cms\Classes\ComponentBase;
use Cms\Classes\Page;
use eBussola\Feedback\Models\Channel;
use Lang;
use October\Rain\Exception\AjaxException;
class Feedback extends ComponentBase
{
/**
* @var Channel
*/
public $channel;
public function componentDe... | ebussola/octobercms-feedback | components/Feedback.php | PHP | mit | 3,549 |
require 'spec_helper'
describe Cardiac::ResourceAdapter do
let(:base_url) { 'http://localhost/prefix/segment?q=foobar' }
let(:base_uri) { URI(base_url) }
let(:resource) { Cardiac::Resource.new(base_uri) }
let(:adapter) { Cardiac::ResourceAdapter.new(nil, resource) }
include_context 'Client responses... | joekhoobyar/cardiac | spec/shared/cardiac/resource/adapter_spec.rb | Ruby | mit | 1,981 |
using System;
class CheckPointInCircle
{
static void Main()
{
/*
Problem 7. Point in a Circle
Write an expression that checks if given point (x, y) is inside a circle K({0, 0}, 2).
*/
Console.WriteLine("Check if given point (x,y) is within K((0,0),2)");
Co... | TeeeeeC/TelerikAcademy2015-2016 | 01. C# part 1/03. Operators and Statements/CheckPointInCircle/CheckPointInCircle.cs | C# | mit | 676 |
/*
* ImageChangedEvent.java
* -- documented
*
* After a change, such an object is created and passed to the listener
*
*/
package oj.processor.events;
public class ImageChangedEventOJ {
public static final int IMAGE_ADDED = 1;
public static final int IMAGE_EDITED = 2;
public static fi... | steliann/objectj | src/oj/processor/events/ImageChangedEventOJ.java | Java | mit | 1,584 |
<?php require('HeadAndHeader.php'); ?>
<hr id="header-horizontal-line"/>
<div id="content">
<div id="current-path">
<p id="current-path-paragraph">Startsait > Settings</p>
</div>
<fieldset>
<legend id="fieldset-title">Settings</legend>
<div class="s... | kbuglow/intshop | application/views/shop/settings.php | PHP | mit | 6,625 |
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for y... | sporchia/alttp_vt_randomizer | config/auth.php | PHP | mit | 3,280 |
class TwitterHandle < ActiveRecord::Base
belongs_to :topic
has_many :tweets
validates :twitter_handle, presence: true
end
| tweet-squared/Tweets-Squared-App | app/models/twitter_handle.rb | Ruby | mit | 132 |
$(document).ready(function () {
var svgContainer = document.getElementById('svgContainer');
if (svgContainer) {
var mama = new bodymovin.loadAnimation({
wrapper: svgContainer,
autoplay: false,
animType: 'svg',
loop: false,
name: 'test',
... | soywod/MAD | public/js/index.js | JavaScript | mit | 697 |
"use strict"
// String interpolation: supports string interpolation via template literals
let first = 'Jon';
let last = 'Smith';
console.log(`Hello ${first} ${last}!`); // Hello Jon Smith
// Multi-line string
const multiLine = `
This is
a string
with four
lines`;
console.log (multiLine);
// This is
// a strin... | dlinaz/Simple-es6 | src/stringFeatures.js | JavaScript | mit | 350 |
namespace DemoForum.Data.Migrations
{
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Models;
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfigu... | zachdimitrov/Learning_2017 | ASP.NET-MVC/DemoForum/DemoForum.Data/Migrations/Configuration.cs | C# | mit | 2,643 |
# mailstat.console
# Console utilities for mailstat
#
# Author: Benjamin Bengfort <benjamin@bengfort.com>
# Created: Sun Dec 29 15:57:44 2013 -0600
#
# Copyright (C) 2013 Bengfort.com
# For license information, see LICENSE.txt
#
# ID: console.py [] benjamin@bengfort.com $
"""
Console utilities for mailstat
"""
###... | bbengfort/email-analysis | mailstat/console.py | Python | mit | 2,516 |
<?php
return [
'@class' => 'Grav\\Common\\File\\CompiledYamlFile',
'filename' => '/Users/kenrickkelly/Sites/hokui/user/plugins/admin/languages/eu.yaml',
'modified' => 1527231007,
'data' => [
'PLUGIN_ADMIN' => [
'ADMIN_BETA_MSG' => 'Beta bertsio bat da hau! Produkzioan erabili ezazu z... | h0kui/hokui | cache/compiled/files/f9471ea96fca48eee43207f0cb30d8d6.yaml.php | PHP | mit | 11,189 |
package us.grahn.trojanow.presentation.feed;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import us.grahn.trojanow.R;
/**
* An interface to display to display the default feed for the user. This will contain posts which
* are mad... | dgrahn/csci578 | client/app/src/main/java/us/grahn/trojanow/presentation/feed/FeedActivity.java | Java | mit | 1,442 |
import React from 'react';
import { css } from 'emotion';
import { Col, Row } from 'reactstrap';
import Localized from 'components/Localized/Localized';
import Locations from 'components/Locations/Locations';
import { useGameLocations } from 'selectors/gameLocations';
import { useSelectedLocationsCount } from 'selector... | adrianocola/spyfall | app/containers/Game/GameInfo.js | JavaScript | mit | 1,907 |
<?php
namespace Library\WhatsApp\Connection\WhatsAPI;
class rc4
{
private $s;
private $i;
private $j;
public function __construct($key, $drop)
{
$this->s = range(0, 255);
for ($i = 0, $j = 0; $i < 256; $i++) {
$k = ord($key{$i % strlen($key)});
$j = ($j + $k... | flolas/WhatsAppZorron | Classes/Library/WhatsApp/Connection/WhatsAPI/RC4.php | PHP | mit | 1,065 |
<?php
/**
* This file is part of the Loops framework.
*
* @author Lukas <lukas@loopsframework.com>
* @license https://raw.githubusercontent.com/loopsframework/base/master/LICENSE
* @link https://github.com/loopsframework/base
* @link https://loopsframework.com/
* @version 0.1
*/
namespace Loops;
use IteratorA... | loopsframework/base | src/Loops/Element.php | PHP | mit | 13,526 |
namespace More.Windows.Controls
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Windows.Controls;
/// <summary>
/// Represents a... | commonsensesoftware/More | src/More.UI.Presentation/Platforms/net45/More/Windows.Controls/ColumnsMediator.cs | C# | mit | 5,912 |
<form method="POST" action="<?= URL ;?>users/update/<?= $data['news']->id;?>">
<div class="modal-content">
<h4>Modifier l'utilisateur : <?= $data['user']->pseudo; ?></h4>
<input type="hidden" name="user_id" value="<?= $data['user']->id; ?>">
<div class="row">
<div class="input-f... | HelleboidQ/projetphpgghq | app/views/admin/edit_user.php | PHP | mit | 2,071 |
/**
* @(#)MenuScroller.java 1.5.0 04/02/12
* Code taken from https://tips4java.wordpress.com/2009/02/01/menu-scroller/
*/
package darrylbu.util;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListe... | Idrinth/WARAddonClient | src/main/java/darrylbu/util/MenuScroller.java | Java | mit | 18,868 |
import Ember from 'ember'
import config from '../config/environment'
export default function () {
if (config && config.mirageNamespace) {
this.namespace = config.mirageNamespace
}
this.get('/countries', function ({db}, request) {
let search = request.queryParams.p
search = search ? search.replace('... | sandersky/ember-frost-bunsen | tests/dummy/mirage/config.js | JavaScript | mit | 2,271 |
/****************************************************************************
** Meta object code from reading C++ file 'walletstack.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
**
** WARNING! All changes made in this file will be lost!
*********************************************************... | danielmash/matchcoin-wallet | build/moc_walletstack.cpp | C++ | mit | 4,766 |
// ref: http://www.cplusplus.com/reference/future/future/
// future example
#include <iostream> // std::cout
#include <future> // std::async, std::future
#include <chrono> // std::chrono::milliseconds
// a non-optimized way of checking for prime numbers:
bool is_prime (int x) {
for (int i=2; ... | flavio-fernandes/oclock | misc/junk/c++/future3.cpp | C++ | mit | 967 |
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Causas</h3>
<div class="form-group" style="width: 100%" >
<div style="width: 40%; float: left;">
<?php
echo "<code><a cla... | SoldierVega/SIRSJ1 | application/views/causa/listCausa.php | PHP | mit | 5,886 |
<?php
declare(strict_types=1);
namespace Phpcq\Runner\Console\Definition\OptionValue;
final class OptionParamsDefinition extends OptionValueDefinition
{
/**
* @var array<string,mixed>
*/
private $params;
/** @param array<string,mixed> $params */
public function __construct(bool $required, ... | phpcq/phpcq | src/Console/Definition/OptionValue/OptionParamsDefinition.php | PHP | mit | 544 |
package kv
import (
"sort"
"github.com/gocontrib/nosql/q"
)
type lookup struct {
collection *collection
tx Tx
}
func (c lookup) find(f []interface{}) keys {
return c.and(f)
}
func (c lookup) condition(f interface{}) keys {
switch t := f.(type) {
case q.Not:
return emptyKeys
case q.And:
return c... | gocontrib/nosql | kv/lookup.go | GO | mit | 3,434 |
package omise
// Dispute represents Omise's dispute object.
// See https://www.omise.co/disputes-api for more information.
type Dispute struct {
Base
Amount int64 `json:"amount"`
Currency string `json:"currency"`
Status DisputeStatus `json:"status"`
Message string ... | omise/omise-go | dispute.go | GO | mit | 463 |
import micropython
micropython.alloc_emergency_exception_buf(100)
import pyb
import micropython
class Heartbeat(object):
def __init__(self):
self.tick = 0
self.led = pyb.LED(4) # 4 = Blue
tim = pyb.Timer(4)
tim.init(freq=10)
tim.callback(self.heartbeat_cb)
def heart... | gregnordin/micropython_pyboard | 150729_pyboard_to_pyqtgraph/pyboard_code.py | Python | mit | 954 |
<?php declare(strict_types=1);
namespace Gos\Bundle\WebSocketBundle\Tests\Server\Type;
use Gos\Bundle\WebSocketBundle\Event\ServerLaunchedEvent;
use Gos\Bundle\WebSocketBundle\GosWebSocketEvents;
use Gos\Bundle\WebSocketBundle\Server\App\ServerBuilderInterface;
use Gos\Bundle\WebSocketBundle\Server\Type\WebSocketServ... | GeniusesOfSymfony/WebSocketBundle | tests/Server/Type/WebSocketServerTest.php | PHP | mit | 2,570 |
from . import server
import sys
server.main(*sys.argv) | TeamNext/qos.py | qos/__main__.py | Python | mit | 55 |
<?php
//error_reporting(E_ALL);
//ini_set('display_errors', 'On');
ini_set("memory_limit","300M");
set_time_limit(0);
$phpModelName = $_GET["layer"];
function getModel($modelname) {
include "dbconnect.php";
$modelquery = pg_query($db, "SELECT ST_AsText(geom), \"ID\" FROM public.\"$modeln... | JamesMilnerUK/Lacuna | ajax/getdataajax.php | PHP | mit | 4,445 |
/*
* Rotate Image
* Total Accepted: 10296 Total Submissions: 33430
*
* You are given an n x n 2D matrix representing an image.
*
* Rotate the image by 90 degrees (clockwise).
*
* Follow up:
* Could you do this in-place?
*/
class Solution
{
public:
void rotate(vector<vector<int> > &matrix)
{
in... | liyiji/LeetCode | 008_Rotate_Image.cpp | C++ | mit | 1,079 |
#!/usr/bin/env python2
"""Hacked-together development server for feedreader.
Runs the feedreader server under the /api prefix, serves URI not containing a
dot public/index.html, servers everything else to public.
"""
import logging
import tornado.ioloop
import tornado.web
from feedreader.config import ConnectionCon... | tdryer/feeder | run.py | Python | mit | 1,843 |
__author__ = 'heddevanderheide'
# Django specific
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url('', include('fabric_interface.urls'))
) | Hedde/fabric_interface | src/main/urls.py | Python | mit | 179 |
using System.Runtime.InteropServices;
namespace Meziantou.Framework.Win32.Natives;
[StructLayout(LayoutKind.Explicit)]
internal struct JOBOBJECT_INFO
{
[FieldOffset(0)]
public JOBOBJECT_EXTENDED_LIMIT_INFORMATION32 ExtendedLimits32;
[FieldOffset(0)]
public JOBOBJECT_EXTENDED_LIMIT_INFORMATION64 Exten... | meziantou/Meziantou.Framework | src/Meziantou.Framework.Win32.Jobs/Natives/JOBOBJECT_INFO.cs | C# | mit | 2,557 |
'use strict';
describe('Protractor Demo App', function() {
// it('should add a todo', function() {
// browser.get('https://angularjs.org');
// browser.sleep(5000);
// element(by.model('todoList.todoText')).sendKeys('write first protractor test');
// element(by.css('[value="add"]')).click();
... | SoftwareEngineering5c/Biotility | modules/quiz/tests/e2e/quiz.e2e.tests.js | JavaScript | mit | 2,664 |
namespace ContactSample.Models
{
public enum BusinessAreaEnum
{
Others = 0,
CallCenter = 1,
PostSales = 2,
PreSales = 3,
Delivery = 4
}
} | GlaucoGodoi/AspNet-MVC5-Angular | ContactSample/Models/BusinessAreaEnum.cs | C# | mit | 192 |
import { Injectable } from '@angular/core';
import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model';
import { BaseRepository } from 'app/core/repositories/base-repository';
import { ViewModelConstructor, BaseViewModel } from 'app/site/base/base-view-model';
/**
* Unifies the ModelConstructo... | emanuelschuetze/OpenSlides | client/src/app/core/core-services/collectionStringMapper.service.ts | TypeScript | mit | 3,031 |
<?php
namespace ModuleGenerator\PhpGenerator\WidgetName;
final class WidgetNameDataTransferObject
{
/** @var string */
public $name;
/** @var WidgetName|null */
private $widgetNameClass;
public function __construct(WidgetName $widgetName = null)
{
$this->widgetNameClass = $widgetName... | carakas/fork-cms-module-generator | src/PhpGenerator/WidgetName/WidgetNameDataTransferObject.php | PHP | mit | 709 |
<?php
namespace jeus\QuickstrikeBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Deck
*
* @ORM\Table(name="quickstrike_deck")
* @ORM\Entity(repositoryClass="jeus\QuickstrikeBundle\Repository\DeckRepository")
*/
class Deck
{
const NOMBRE_CARTE_PAR_DECK = 60;
/**
* @var integer
*
... | jsmagghe/tcg | src/jeus/QuickstrikeBundle/Entity/Deck.php | PHP | mit | 8,513 |
# frozen_string_literal: true
module Svelte
# Version
VERSION = '0.3.0'
end
| notonthehighstreet/svelte | lib/svelte/version.rb | Ruby | mit | 81 |
package com.github.ompc.greys.core;
import com.github.ompc.greys.core.util.AliEagleEyeUtils;
import com.github.ompc.greys.core.util.GaMethod;
import com.github.ompc.greys.core.util.LazyGet;
/**
* 通知点
*/
public final class Advice {
public final ClassLoader loader;
private final LazyGet<Class<?>> clazzRef;
... | yuweijun/learning-programming | linux/greys/core/src/main/java/com/github/ompc/greys/core/Advice.java | Java | mit | 5,911 |
import convexpress from "convexpress";
import * as config from "config";
const options = {
info: {
title: "lk-app-back",
version: "1.0.2"
},
host: config.HOST
};
export default convexpress(options)
.serveSwagger()
.convroute(require("api/buckets/post"))
.convroute(require("api... | lk-architecture/lk-app-back | src/api/index.js | JavaScript | mit | 342 |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
public class Parameters {
private ArrayList<Point> data = new ArrayList<Point>();
public Parameters(String pat... | lucasbrunialti/DataMiningProject | DBSCAN/Parameters.java | Java | mit | 2,493 |
var multipart = require('./');
var test = require('tape');
test('produces valid mime multipart archive', function(t) {
t.plan(1);
var content1 = {
content: 'thug',
mime: 'text/upstart-job',
encoding: 'ascii'
};
var content2 = { content: 'life' };
var expected = 'From: nobody Thu Apr 09 2015 14... | sergi/mime-multipart | test.js | JavaScript | mit | 1,995 |
export default class FormController {
constructor($stateParams, $state, EquipamentoServico, Notification) {
this.record = {}
this.title = 'Adicionando registro'
this._service = EquipamentoServico
if ($stateParams.id) {
this.title = 'Editando registro'
thi... | lucionei/chamadotecnico | chamadosTecnicosFinal-app/src/app/equipamentos/form.controller.js | JavaScript | mit | 977 |
using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.iOS;
using Xamarin.UITest.Queries;
namespace MessageBarUITests
{
[TestFixture]
public class Tests
{
iOSApp app;
[SetUp]
public void BeforeEachTest()
{
// TODO: If the iOS app being tested... | prashantvc/Xamarin.iOS-MessageBar | MessageBarUITests/Tests.cs | C# | mit | 2,113 |
<?php
namespace luya\admin\aws;
use Yii;
use yii\base\InvalidConfigException;
use Flow\Config;
use Flow\Request;
use Flow\File;
use luya\helpers\FileHelper;
use luya\admin\helpers\Storage;
use luya\admin\ngrest\base\ActiveWindow;
/**
* Flow Uploader ActiveWindow enables multi image upload with chunck ability.
*
*... | nandes2062/luya | modules/admin/src/aws/FlowActiveWindow.php | PHP | mit | 5,238 |
def add_generic_attachment_columns(t, want_image_columns)
t.string :storage_key, :null => false
t.string :content_type, :null => false
t.integer :size, :null => false
t.datetime :created_at, :null => false
t.datetime :updated_at
t.integer :width, :n... | willbryant/attachment_saver | test/schema.rb | Ruby | mit | 1,565 |
class CreateCommentVotes < ActiveRecord::Migration
def change
create_table :comment_votes do |t|
t.boolean :like, null: false
t.integer :user_id, null: false
t.integer :comment_id, null: false
t.timestamps null: false
end
end
end
| sayuloveit/rails-hacker-news-jr | hacker_news_jr/db/migrate/20150716211717_create_comment_votes.rb | Ruby | mit | 267 |
namespace topCoder
{
using System;
using System.Collections.Generic;
class p1
{
public void foo()
{
string[] sp = Console.ReadLine().Split(' ');
int n = int.Parse(sp[0]);
int m = int.Parse(sp[1]);
int k = int.Parse(sp[2]);
int[] x = new int[k];
int[] y = new int[k];
for (int i = 0; i < k... | karunasagark/ps | TopCoder-C#/288/p1.cs | C# | mit | 1,194 |
/* ========================================
ID: mathema6
TASK: friday
LANG: C++11
(...for USACO solutions)
* File Name : friday.cpp
* Creation Date : 03-01-2015
* Last Modified :
* Created By : Karel Ha <mathemage@gmail.com>
* URL : http://cerberus.delosent.com:791/usacoprob2?a=nJinR3Po... | mathemage/CompetitiveProgramming | usaco/train.usaco.org/1.2/friday/friday.cpp | C++ | mit | 1,781 |
using System;
using System.Collections.Generic;
using Microsoft.AspNet.Http;
namespace Glimpse.Server
{
public class GlimpseServerOptions
{
public bool AllowRemote { get; set; }
public string BasePath { get; set; }
public Action<IDictionary<string, string>> OverrideResources { get; s... | peterblazejewicz/Glimpse.Prototype | src/Glimpse.Server.Core/GlimpseServerOptions.cs | C# | mit | 478 |
using System.Diagnostics;
namespace NWamp.Messages
{
/// <summary>
/// Message class used to subscribe client to Pub/Sub topic.
/// </summary>
[DebuggerDisplay("[{Type}, \"{TopicUri}\"]")]
public class SubscribeMessage : IMessage
{
/// <summary>
/// Initializes a new instance o... | Horusiath/NWamp | NWamp/Messages/SubscribeMessage.cs | C# | mit | 1,512 |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using Mic... | ye4241/MahApps.Metro | src/MahApps.Metro/Behaviors/TabControlSelectFirstVisibleTabBehavior.cs | C# | mit | 2,051 |
#ifndef __DEFINES_HPP_
#define __DEFINES_HPP_
// Compiler defines
#if defined (_MSC_VER)
#define FORCE_INLINE __forceinline
#elif defined (__GNUG__)
#define FORCE_INLINE __attribute__((always_inline))
#elif defined (__clang__)
#define FORCE_INLINE __forceinline
#endif
// Plateform defines
#if defined(_WIN32) || defin... | Gotatang/DadEngine_2.0 | include/dadengine/core/defines.hpp | C++ | mit | 801 |
package iso20022
// Status and reason of an instructed order.
type StatusAndReason7 struct {
// Status and reason for the transaction.
StatusAndReason *Status2Choice `xml:"StsAndRsn"`
// Details of the transactions reported.
Transaction []*Transaction14 `xml:"Tx,omitempty"`
}
func (s *StatusAndReason7) AddStatu... | fgrid/iso20022 | StatusAndReason7.go | GO | mit | 580 |
<?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\DICOM;
use JMS\Serializer\Annotation\ExclusionPolicy;
u... | romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/DICOM/DischargeTime.php | PHP | mit | 788 |
/*License (MIT)
Copyright © 2013 Matt Diamond
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, ... | gregoryv/record-stuff | static/js/recorderjs/recorder.js | JavaScript | mit | 3,692 |
/*****************************************************
*
* Designed and programmed by Mohamed Adam Chaieb.
*
*****************************************************/
/*
Constructs a new tile.
*/
function Tile(position, level) {
this.x = position.x;
this.y = position.y;
this.level = level;
};
/*
Updates the po... | mac-adam-chaieb/Isometric-2048 | js/tile.js | JavaScript | mit | 444 |
<?php
/**
* Authentication Factory Method
*
* @package Molajo
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @copyright 2014-2015 Amy Stephen. All rights reserved.
*/
namespace Molajo\Factories\Authentication;
use CommonApi\IoC\FactoryInterface;
use CommonApi\IoC\FactoryBatch... | Molajo/User | Factories/Authentication/AuthenticationFactoryMethod.php | PHP | mit | 9,336 |
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/exec"
"path"
"time"
"github.com/nchern/red/app"
color "gopkg.in/fatih/color.v1"
)
const (
jsonIndent = " "
filenameBase = "query"
queryFilename = filenameBase + ".red"
outFilename = filenameBase + ... | nchern/red | main.go | GO | mit | 4,910 |
#ifdef WITH_SDL2
#pragma once
#include <SDL.h>
#include "../Window.hpp"
#include "psychic-ui/ApplicationBase.hpp"
#if defined(PSYCHIC_UI_WITH_GLAD)
#if defined(PSYCHIC_UI_SHARED) && !defined(GLAD_GLAPI_EXPORT)
#define GLAD_GLAPI_EXPORT
#endif
#include <glad/glad.h>
#endif
#if defined(ANDROID)
#include <GLES/gl.h>
#... | ubald/psychic-ui | psychic-ui/applications/SDL2Application.hpp | C++ | mit | 2,428 |
// This software is part of OpenMono, see http://developer.openmono.com
// Released under the MIT license, see LICENSE.txt
#include "encoder.hpp"
#include "constants.hpp"
Encoder::Encoder (PinName pinA, PinName pinB)
:
lastA(0),
lastB(0),
channelA(pinA),
channelB(pinB)
{
#ifndef EMUNO
// Pull up A.
CyPins_... | getopenmono/pong | encoder.cpp | C++ | mit | 1,532 |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-... | cherniavskii/material-ui | packages/material-ui-icons/src/InsertLink.js | JavaScript | mit | 360 |
<?php
namespace Madrasse\AdminBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symf... | fardus/madrasse-gestion | src/Madrasse/AdminBundle/DependencyInjection/Configuration.php | PHP | mit | 883 |
<?php
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Fixer\Phpdoc;
use PhpCsFixer\... | julienfalque/PHP-CS-Fixer | src/Fixer/Phpdoc/PhpdocNoAccessFixer.php | PHP | mit | 896 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Capercali.Entities
{
public class Runner : IEntity
{
public long Id
{
get;
set;
}
public string FirstName { get; set; }
... | yannisgu/capercali | src/Capercali.Entities/Runner.cs | C# | mit | 633 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Globalization;
using System.Web.Mvc;
namespace WMATC.Models
{
public class Player
{
[Required]
[Key... | ThatRickGuy/WMATC | WMATC/Models/Player.cs | C# | mit | 953 |
from random import randint
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models, connection
from django.db.models.aggregates import Avg, Max
from polymorphic.models import PolymorphicModel
from solo.models import SingletonModel
class Judge(PolymorphicModel):
n... | Kianoosh76/webelopers-scoreboard | jury/models.py | Python | mit | 3,183 |
/*
* LCADeviceRoomba
*
* MIT License
*
* Copyright (c) 2016
*
* Geoffrey Mastenbroek, geoffrey.mastenbroek@student.hu.nl
* Feiko Wielsma, feiko.wielsma@student.hu.nl
* Robbin van den Berg, robbin.vandenberg@student.hu.nl
* Arnoud den Haring, arnoud.denharing@student.hu.nl
*
* Permission is hereby gr... | maschel/LCADeviceRoomba | src/main/java/com/maschel/lcadevice/roomba/Simulator/RoombaDeviceSimulator.java | Java | mit | 8,709 |
#pragma once
#ifndef LINE_HPP
#define LINE_HPP
#include <initializer_list>
#include <map>
#include <string>
#include <vector>
#include "route.hpp"
using RouteName = std::string;
using RouteNames = std::vector<RouteName>;
using StepsByRoute = std::pair<RouteName, Steps>;
using StepsRoutes = std::vector<StepsByRoute>;... | gonmator/busplan | busplan/line.hpp | C++ | mit | 1,470 |
<?php
/*
* This file is part of the NAD package.
*
* (c) Ivan Proskuryakov
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NAD\ResourceBundle\Request;
use FOS\RestBundle\Request\RequestBodyParamConverter;
use JMS\Seria... | razzaghi/NAD | src/NAD/ResourceBundle/Request/ParamConverter.php | PHP | mit | 5,072 |
import knockout = require("knockout");
class Item
{
public Id:KnockoutObservable<string> = knockout.observable("");
public Title:KnockoutObservable<string> = knockout.observable("");
constructor(data:{Id:string; Title:string })
{
this.Id(data.Id);
this.Title(data.Title);
}
public DragStart(target:Item, ev... | Lillemanden/TierList | TierList/App/Components/Item/Item.ts | TypeScript | mit | 563 |
#!/usr/bin/env ruby
require 'i3rb'
include I3::API
include I3::Bar::Widgets
host = I3::Bar::Widgets::HOSTNAME
host.color = "#00FFFF"
host.add_event_callback do |w|
system "xterm", "-e", "top"
end
cmus = I3::Bar::Widgets::CMUS
cmus.add_event_callback do |w,e|
if e["button"]== 1
system "cmus-remote", "--pause"... | MinasMazar/dotfiles | i3.symlink/i3ba.rb | Ruby | mit | 574 |
import { connect } from 'react-redux';
import { makeSelectClaimForUri } from 'lbry-redux';
import LivestreamLink from './view';
const select = (state, props) => ({
channelClaim: makeSelectClaimForUri(props.uri)(state),
});
export default connect(select)(LivestreamLink);
| lbryio/lbry-app | ui/component/livestreamLink/index.js | JavaScript | mit | 275 |
#include "AnimationComponentModule.h"
#include "AnimationComponent.h"
using namespace PaintsNow;
using namespace PaintsNow::NsMythForest;
using namespace PaintsNow::NsSnowyStream;
AnimationComponentModule::AnimationComponentModule(Engine& engine) : ModuleImpl<AnimationComponent>(engine) {} | paintsnow/paintsnow | Source/Utility/MythForest/Component/Animation/AnimationComponentModule.cpp | C++ | mit | 292 |
set :runner, VirtualMonkey::Runner::Nginx
before do
@runner.stop_all
@runner.launch_all
@runner.wait_for_all("operational")
end
test "default" do
@runner.run_nginx_checks
@runner.probe(".*", "su - mysql -s /bin/bash -c \"ulimit -n\"") { |r,st| r.to_i > 1024 }
@runner.check_monitoring
@runner.reboot_all
... | kevin-bockman/virtualmonkey | features/nginx_pass_mysql_aio.rb | Ruby | mit | 405 |
var request = require("request");
var util = require("util");
var async = require("async");
var config = require("./config");
var log = require("./log");
var error = require("./error");
var tools = require("./tools");
var buffer = require("./buffer");
var api = {};
//url:http://127.0.0.1/path
//data: an object
//ifb... | JustAnotherCan/wechat-ship | server/core/api.js | JavaScript | mit | 2,796 |
uis.directive('uiSelect',
['$document', 'uiSelectConfig', 'uiSelectMinErr', 'uisOffset', '$compile', '$parse', '$timeout',
function($document, uiSelectConfig, uiSelectMinErr, uisOffset, $compile, $parse, $timeout) {
return {
restrict: 'EA',
templateUrl: function(tElement, tAttrs) {
var theme = tAtt... | 90TechSAS/ui-select | src/uiSelectDirective.js | JavaScript | mit | 15,230 |
#include <bandit/bandit.h>
#include <bitfield/util.hpp>
#include <bitfield/container/vector.hpp>
#include <bitfield/section/base.hpp>
#include <bitfield/section/list.hpp>
#include <vector>
namespace bitfield { namespace util {
namespace hex_dump_traits_test {
template<typename T>
using std_vector =... | mrk21/bitfield | test/spec/util_spec.cpp | C++ | mit | 5,997 |
package cz.muni.fi.pa165.languageschool.test;
import java.util.Collection;
import javax.persistence.EntityManager;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.spring... | fuca/languageschool | language-school-bus-impl-module/src/test/java/cz/muni/fi/pa165/languageschool/test/BaseTest.java | Java | mit | 1,161 |
require 'morpheus/api/api_client'
class Morpheus::NetworkStaticRoutesInterface < Morpheus::RestInterface
def base_path
"/api/networks"
end
def get_static_route(network_id, route_id, params={}, headers={})
validate_id!(network_id)
validate_id!(route_id)
execute(method: :get, url: "#{base_path}/#... | gomorpheus/morpheus-cli | lib/morpheus/api/network_static_routes_interface.rb | Ruby | mit | 1,349 |
import {singularize} from './noun';
export {
singularize
};
| Yomguithereal/talisman | src/inflectors/spanish/index.js | JavaScript | mit | 63 |