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 |
|---|---|---|---|---|---|
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 |
/**
* Default Panels for Pattern Lab plus Panel related events
*
* note: config is coming from the default viewer and is passed through from PL's config
*/
import { PrismLanguages as Prism } from './prism-languages';
import { Dispatcher } from '../utils';
export const Panels = {
panels: [],
count() {
ret... | bolt-design-system/bolt | packages/uikit-workshop/src/scripts/components/panels.js | JavaScript | mit | 2,943 |
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 |
#region Using namespaces...
using System;
using System.Diagnostics;
using System.IO;
using Ninject;
using NLog;
using NLog.Config;
using NLog.Targets;
#endregion
namespace Expanse.Services.Logger
{
internal sealed class LoggerService : Core.Services.Logger.LoggerService
{
#region Private Fields
... | DaniilMonin/Expanse.js | Expanse/Expanse.Services/Logger/LoggerService.cs | C# | mit | 2,840 |
#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 lists
import (
"reflect"
"testing"
)
type TestPairStringSlice struct {
In StringSlice
Out interface{}
}
type TestPairStringSlice2Out struct {
In StringSlice
Out1 interface{}
Out2 interface{}
}
type TestPairGenericSlice struct {
In []interface{}
Out interface{}
}
type TestPairIntSlice struct {
... | heynickc/ninety_nine_prolog | lists/lists_test.go | GO | mit | 24,126 |
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 |
<?php
namespace Mm\RecycleBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class BatterypackControllerTest extends WebTestCase
{
private $inputValues = array(
array(
'batterypack[type]' => 'AA',
'batterypack[count]' => 4
),
array(
... | arkadiych/recycle | src/Mm/RecycleBundle/Tests/Controller/BatterypackControllerTest.php | PHP | mit | 1,288 |
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 |
from util import *
@responses.activate
def test_getters(client, dummy_data):
assert client.host() == dummy_data.host
assert client.api_host() == dummy_data.api_host
@responses.activate
def test_setters(client, dummy_data):
try:
client.host('host.nexmo.com')
client.api_host('host.nexmo.com'... | Nexmo/nexmo-python | tests/test_getters_setters.py | Python | mit | 627 |
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 |
<?php
$email_to = "benwaymichael@gmail.com";
$email_subject = "MB Designs";
$nameCompany = $_POST['NameCompany']; // required
$phone = $_POST['Phone']; // required
$email = $_POST['Email']; // required
$message = $_POST['Message']; // not required
$budget = $_POST['Budget']; // required
// These are for testing if it ... | mbenway1/portfoilo | app/submit-test.php | PHP | mit | 1,904 |
// 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 |
package hudson.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* Adds more to commons-io.
*
* @author Kohsuke Kawaguchi
* @since 1.337
*/
public class IOUtils extends org.apache.co... | vivek/hudson | core/src/main/java/hudson/util/IOUtils.java | Java | mit | 1,790 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About stripecoin</source>
<translation>Info su stripecoin</translation>
... | stripecoin/stripecoin | src/qt/locale/bitcoin_it.ts | TypeScript | mit | 116,607 |
#include <iostream>
#include <stddef.h>
#include <fitsio.h>
#include <fitsio2.h>
#include <longnam.h>
#include "leastsq.h"
#include <cmath>
/*
*/
using namespace std;
// error handling
void printerror( int status)
{
/*****************************************************/
/* Print out cfitsio error mess... | deapplegate/wtgpipeline | sfdir/expand_cosmics_mask.cc | C++ | mit | 6,037 |
package com.lanceolata.leetcode;
public class Question_0082_Remove_Duplicates_from_Sorted_List_II {
// Definition for singly-linked list.
public class ListNode {
int val;
ListNode next;
ListNode(int x) {
val = x;
next = null;
}
}
public ListNode ... | Lanceolata/code-problems | java/src/main/java/com/lanceolata/leetcode/Question_0082_Remove_Duplicates_from_Sorted_List_II.java | Java | mit | 901 |
/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { Directive, EmbeddedViewRef, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
@Directive({
selector: '[sqxTemplateWrapper]',
})
expo... | Squidex/squidex | frontend/src/app/framework/angular/template-wrapper.directive.ts | TypeScript | mit | 1,495 |
using System.Collections.Generic;
using System.Threading.Tasks;
using Majorsilence.MediaService.Dto;
namespace Majorsilence.MediaService.RepoInterfaces
{
public interface IMediaFileInfoRepo
{
Task<IEnumerable<MediaFileInfo>> SearchAsync(long id);
}
} | majorsilence/MediaService | Majorsilence.MediaService.RepoInterfaces/IMediaFileInfoRepo.cs | C# | mit | 284 |
namespace CoreFtp.Tests.Integration.FtpClientTests.Files
{
using System;
using System.Linq;
using System.Threading.Tasks;
using Enum;
using FluentAssertions;
using Helpers;
using Microsoft.Extensions.Logging;
using Xunit;
using Xunit.Abstractions;
public class When_deleting_a_fi... | sparkeh9/CoreFTP | tests/CoreFtp.Tests.Integration/FtpClientTests/Files/When_deleting_a_file.cs | C# | mit | 2,233 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace DDZProj
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Appl... | flysnoopy1984/DDZ_Live | DDZProj/Program.cs | C# | mit | 477 |
<?php
namespace Vicus\Controller;
/**
* Description of ErrorContorller
*
* @author Michael Koert <mkoert at bluebikeproductions.com>
*/
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\FlattenException;
class ErrorController
{
public function indexAction(FlattenExceptio... | opensourcerefinery/vicus | src/Controller/ErrorController.php | PHP | mit | 915 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BackEnd;
namespace Assignment5
{
//types aliasing
using S = BackEnd.Student<long>;
usi... | Mooophy/158212 | Assignment5/Assignment5/MainForm.cs | C# | mit | 10,271 |
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace LinqToTwitter
{
public partial class TwitterContext
{
/// <summary>
/// Adds a user subscription to specified webhook
/// </summary>
/// <param... | JoeMayo/LinqToTwitter | src/LinqToTwitter5/LinqToTwitter.Shared/AccountActivity/TwitterContextAccountActivityCommands.cs | C# | mit | 6,813 |
<?php
namespace Acme\BookBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class AuthorControllerTest extends WebTestCase
{
/*
public function testCompleteScenario()
{
// Create a new client to browse the application
$client = static::createClient();
/... | okovalov/alexbookstore | src/Acme/BookBundle/Tests/Controller/AuthorControllerTest.php | PHP | mit | 1,800 |
from matplotlib import pyplot as plt
import seaborn as sns
import pandas as pd
from ..ml.linear_algebra import distmat
def scatter_2d(orig_df: pd.DataFrame, colx, coly, label_col,
xmin=None, xmax=None, ymin=None, ymax=None):
"""
Return scatter plot of 2 columns in a DataFrame, taking labels as ... | Seiji-Armstrong/seipy | seipy/plots_/base.py | Python | mit | 875 |
package ita8
// Constants
var (
ClipboardPath = "clipboard"
OpenPath = "open"
)
| yushi/ita8 | ita8.go | GO | mit | 88 |
module PettanrPublicDomainV01Licenses
VERSION = "0.1.11"
end
| yasushiito/pettanr_pd_v01_licenses | lib/pettanr_public_domain_v01_licenses/version.rb | Ruby | mit | 63 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net.Http.Headers;
namespace ContosoUniversity.WebApi.Areas.HelpPage
{
/// <summary>
/// This is used to identify the place where the sample should be applied.
/// </summary>
public class HelpPageSampleKey
{
... | ChauThan/WebApi101 | src/ContosoUniversity.WebApi/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs | C# | mit | 6,488 |
module ActiveRecord
# = Active Record Autosave Association
#
# AutosaveAssociation is a module that takes care of automatically saving
# associated records when their parent is saved. In addition to saving, it
# also destroys any associated records that were marked for destruction.
# (See #mark_for_destruct... | tijwelch/rails | activerecord/lib/active_record/autosave_association.rb | Ruby | mit | 19,240 |
/**
* clientCacheProvider
**/
angular.module('providers')
.provider('clientCacheProvider', function ClientCacheProvider($state, clientCacheService) {
console.log(clientCacheService)
console.log(clientCacheService.logout());
var forceLogin = false;
this.forceLogin = function(clientCacheService) {
... | evoila/cf-spring-web-management-console | frontend/app/js/providers/general/clientCacheProvider.js | JavaScript | mit | 407 |
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="/admin" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>C</b>MS</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>The</b>CMS</span>
</a>... | SergeyOlifir/The-CMS-2.0 | fuel/app/views/admin/main/header.php | PHP | mit | 6,499 |
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ReaderFragment } from "relay-runtime";
import { FragmentRefs } from "relay-runtime";
export type ArtworkFilterArtworkGrid_filtered_artworks = {
readonly id: string;
readonly pageInfo: {
readonly hasNextPage: boolean;
readonly end... | artsy/force | src/v2/__generated__/ArtworkFilterArtworkGrid_filtered_artworks.graphql.ts | TypeScript | mit | 3,068 |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::CDN::Mgmt::V2020_09_01
module Models
#
# Result of the request to list endpoints. It contains a list of endpoint
# objects and a... | Azure/azure-sdk-for-ruby | management/azure_mgmt_cdn/lib/2020-09-01/generated/azure_mgmt_cdn/models/afdendpoint_list_result.rb | Ruby | mit | 2,932 |
/* eslint react/no-multi-comp:0, no-console:0 */
import { createForm } from 'rc-form';
import React, { PropTypes } from 'react';
import ReactDOM from 'react-dom';
import { regionStyle, errorStyle } from './styles';
let Form = React.createClass({
propTypes: {
form: PropTypes.object,
},
setEmail() {
this... | setState/form | examples/setFieldsValue.js | JavaScript | mit | 1,127 |
const commander = require('../');
// These are tests of the Help class, not of the Command help.
// There is some overlap with the higher level Command tests (which predate Help).
describe('sortOptions', () => {
test('when unsorted then options in order added', () => {
const program = new commander.Command();
... | tj/commander.js | tests/help.sortOptions.test.js | JavaScript | mit | 3,036 |
package de.hawhamburg.vs.wise15.superteam.client.worker;
import de.hawhamburg.vs.wise15.superteam.client.PlayerServiceFacade;
import de.hawhamburg.vs.wise15.superteam.client.callback.CallbackA;
import de.hawhamburg.vs.wise15.superteam.client.model.Command;
import javax.swing.*;
import java.io.IOException;
import java... | flbaue/vs-wise15 | client/src/main/java/de/hawhamburg/vs/wise15/superteam/client/worker/CommandListener.java | Java | mit | 1,377 |
'''
Created on Jan 30, 2011
@author: snail
'''
import logging
import logging.handlers
import os
import sys
from os.path import join
from os import getcwd
from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL
from pickle import dumps
LogPath = "Logs"
#ensure the logging path exists.
try:
from os import mkdir
... | theepicsnail/SuperBot2 | Logging.py | Python | mit | 3,658 |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | DustinCampbell/vscode | src/vs/workbench/browser/parts/quickinput/quickInput.ts | TypeScript | mit | 44,636 |
/**
* @summary Race timing system
* @author Guillaume Deconinck & Wojciech Grynczel
*/
'use strict';
// time-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const timeSchema = ne... | osrts/osrts-backend | src/services/times/time-model.js | JavaScript | mit | 568 |
<?php
/* FOSUserBundle:Group:edit.html.twig */
class __TwigTemplate_ef57f06f37b4b105df31eabec2d1cd20acba6f1995ab286ffcc795254ca469ef extends Sonata\CacheBundle\Twig\TwigTemplate14
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
try {
... | wieloming/GPI | 1/ef/57/f06f37b4b105df31eabec2d1cd20acba6f1995ab286ffcc795254ca469ef.php | PHP | mit | 1,473 |
/* global elmApp Elm */
// Brunch automatically concatenates all files in your
// watched paths. Those paths can be configured at
// config.paths.watched in "brunch-config.js".
//
// However, those files will only be executed if
// explicitly imported. The only exception are files
// in vendor, which are never wrapped... | chasm/trelm | web/static/js/app.js | JavaScript | mit | 1,133 |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRoleUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('role_user', function (Blueprint $table) {
... | Khairulrabbi/htmis | database/migrations/2016_04_21_052356_create_role_user_table.php | PHP | mit | 968 |
module Garages
class ToggleStatusController < ApplicationController
before_action :set_garage, only: :update
after_action :verify_authorized
def update
authorize @garage
@garage.toggle_status
respond_to do |format|
format.html { redirect_to garages_url }
end
end
p... | jonnyjava/ewoks | app/controllers/garages/toggle_status_controller.rb | Ruby | mit | 534 |
#!/usr/bin/env python
import sys, json
from confusionmatrix import ConfusionMatrix as CM
def main():
for line in sys.stdin:
cm = json.loads(line)
print CM(cm["TP"], cm["FP"], cm["FN"], cm["TN"])
if __name__ == '__main__':
main()
| yatmingyatming/LogisticRegressionSGDMapReduce | display_stats.py | Python | mit | 264 |
/*
* @(#)ByteBufferAs-X-Buffer.java 1.18 05/11/17
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
// -- This file was mechanically generated: Do not edit! -- //
package java.nio;
class ByteBufferAsDoubleBufferB // ... | jgaltidor/VarJ | analyzed_libs/jdk1.6.0_06_src/java/nio/ByteBufferAsDoubleBufferB.java | Java | mit | 2,856 |
import { Injectable } from 'angular2/core';
@Injectable()
export class Config {
SERVER_URL:string = "http://128.199.158.79:9000/";
}
| alexsalesdev/fiori-blossoms-ui-web-angular-2 | public/app/service/config.ts | TypeScript | mit | 138 |
class GeometryTests < PostgreSQLExtensionsTestCase
def test_create_geometry
Mig.create_table(:foo) do |t|
t.geometry :the_geom, :srid => 4326
end
expected = []
expected << strip_heredoc(<<-SQL)
CREATE TABLE "foo" (
"id" serial primary key,
"the_geom" geometry,
CO... | zoocasa/activerecord-postgresql-extensions | test/geometry_tests_legacy_postgis.rb | Ruby | mit | 12,763 |
module FrankAfcProxy
VERSION = "0.0.1"
end
| suzumura-ss/frank_afc_proxy | lib/frank_afc_proxy/version.rb | Ruby | mit | 45 |
/// <reference path="//Microsoft.WinJS.1.0/js/base.js" />
/// <reference path="../model/event.js" />
(function () {
var initAppBarGlobalCommands = function () {
var eventsButton = document.getElementById("navigate-onClick-to-events");
eventsButton.addEventListener("click", function () {
... | vaster/RestReminder | RestReminderApp/RestReminderApp/js/commands/command.js | JavaScript | mit | 2,545 |
<?php if (count($brands) > 0): ?>
<?php if ($sf_request->hasParameter('is_search')): ?>
<?php $action = '@product_search' ?>
<?php else: ?>
<?php $action = '@product_list' ?>
<?php endif; ?>
<?php if ($sf_request->hasParameter('path')): ?>
<?php $path = '?path=' . $sf_r... | alecslupu/sfshop | plugins/sfsProductPlugin/modules/brand/templates/_filterList.php | PHP | mit | 1,333 |
package tile;
import java.net.URL;
public class Box extends Tile {
public Box(URL url, char key) {
// TODO Auto-generated constructor stub
super(url, key);
this.canMove = false;
}
}
| Sy4z/The-Excellent-Adventure | src/tile/Box.java | Java | mit | 193 |
// Generated by CoffeeScript 1.7.1
(function() {
var pf, pfr;
pf = function(n) {
return pfr(n, 2, []);
};
pfr = function(n, d, f) {
if (n < 2) {
return f;
}
if (n % d === 0) {
return [d].concat(pfr(n / d, d, f));
}
return pfr(n, d + 1, f);
};
module.exports = pf;
}).c... | dlwire/coffeescript-barebones | javascripts/pf.js | JavaScript | mit | 331 |
var plan = require('./index');
module.exports = plan;
var HOST = 'brainbug.local';
plan.target('single', function(done) {
setTimeout(function() {
done([
{
host: HOST + 'lol',
username: 'pstadler',
agent: process.env.SSH_AUTH_SOCK,
failsafe: true
},
{
ho... | thundernixon/thundernixon2015wp-sage | node_modules/flightplan/flightplan.js | JavaScript | mit | 2,931 |
<?php
namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class SecurityController extends Controller
{
public function loginAction(Request $request)
{
$authUtils = $this->get('security.authentication_utils');
... | marko126/symfony-nastava | src/AppBundle/Controller/SecurityController.php | PHP | mit | 612 |
require File.dirname(__FILE__) + '/spec_helper'
module SDP
describe "Dokken iteration 3" do
before(:all) do
@iteration = Iteration.new(3, "Dokken", Date.parse('01/21/2008'), Date.parse('01/25/2008'))
s = <<EOQ
http://bugzilla.songbirdnest.com/buglist.cgi?quicksearch=632%2C754%2C2025%2C3370%2C3600%2C3... | skelliam/sdpbot | spec/dokken_iteration_3_spec.rb | Ruby | mit | 5,352 |
using System;
using Edsoft.Hypermedia.Serializers;
using Newtonsoft.Json.Linq;
using NUnit.Framework;
using Ploeh.AutoFixture;
using Rhino.Mocks;
namespace Edsoft.Hypermedia.Tests.Serializers
{
public class JsonSerializerTests : TestWithFixture
{
private JsonSerializer sut;
private Func<IRepre... | edandersen/Edsoft.Hypermedia | tests/Edsoft.Hypermedia.Tests/Serializers/JsonSerializerTests.cs | C# | mit | 4,991 |
class TweetsController < ApplicationController
def create
# Planned on rendering json for line 6 to Ajax a new post back onto the page
# But this single-app feature wouldn't grab new tweets. Having it live update
# through streaming would take care of this, otherwise, just refresh page
client.update(p... | heycait/twitter | app/controllers/tweets_controller.rb | Ruby | mit | 371 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the fr... | opengbu/gbuonline | application/config/autoload.php | PHP | mit | 3,814 |
#include <iostream>
#include <seqan/file.h>
#include <seqan/sequence.h>
#include <seqan/score.h>
template <typename TText, typename TPattern>
int computeLocalScore(TText const &subText, TPattern const &pattern)
{
int localScore = 0;
for (unsigned i = 0; i < seqan::length(pattern); ++i)
if (su... | bkahlert/seqan-research | raw/pmsb13/pmsb13-data-20130530/sources/caivjx2geotu92t0/2013-04-09T16-09-03.492+0200/sandbox/my_sandbox/apps/firstSteps1/firstSteps1.cpp | C++ | mit | 1,740 |
package denvlib
import (
"encoding/json"
"io/ioutil"
"os"
git "github.com/buckhx/gitlib"
"github.com/buckhx/pathutil"
)
/*
DenvInfo is a mechanism for handling state of the denv environment.
It flushed it's contents to disk and reads from a given location
*/
type DenvInfo struct {
Current *Denv
Path ... | buckhx/denv | denvlib/info.go | GO | mit | 1,538 |