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 |
|---|---|---|---|---|---|
package Problems;
import java.io.IOException;
import java.util.Scanner;
/**
* Created by nhs0912 on 2016-12-15.
*/
public class P_10039 {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int sum = 0;
int score = 0;
for (int i = 0; i... | nhs0912/BOJ | src/Problems/P_10039.java | Java | mit | 520 |
class Worker < ActiveRecord::Base
belongs_to :detail, polymorphic: true, touch: true
has_many :contracts, dependent: :destroy
has_many :tweets, dependent: :destroy
end
| chingor13/cache_debugging | test/dummy/app/models/worker.rb | Ruby | mit | 176 |
require File.join(File.dirname(__FILE__), 'spec_helper')
describe SmsPromote::Gateway do
it "should be possible to create a sms gateway" do
gateway = SmsPromote::Gateway.new API_KEY
gateway.service_url.to_s.should =~ /http:/
gateway.route.should == :basic
gateway = SmsPromote::Gateway.new API_KEY, :s... | threez/smspromote | spec/gateway_spec.rb | Ruby | mit | 2,425 |
class WatchesController < ApplicationController
def create
# puts "In controller Watch.count: #{Watch.count}"
@watch = Watch.new(watch_params)
if !@watch.save
logger.error("Save failed: #{@watch.errors.full_message} #{@watch.inspect}")
end
respond_to do |format|
format.js do
#... | weenhanceit/outages | app/controllers/watches_controller.rb | Ruby | mit | 1,336 |
using System.Windows.Controls;
namespace Accelerider.Windows.Modules.NetDisk.Views.Dialogs
{
/// <summary>
/// Interaction logic for SelectNetDiskTypeDialog.xaml
/// </summary>
public partial class SelectNetDiskTypeDialog : UserControl
{
public SelectNetDiskTypeDialog()
{
... | ResourceHunter/BaiduPanDownloadWpf | Source/Accelerider.Windows.Modules.NetDisk/Views/Dialogs/SelectNetDiskTypeDialog.xaml.cs | C# | mit | 366 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="gl" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About BillaryCoin</source>
<translation>Acerca de BillaryCoin</translation>
</message>
<message>
... | Billary/BillaryCoinSource | src/qt/locale/bitcoin_gl.ts | TypeScript | mit | 120,750 |
(function(window, factory) {
if (typeof define === 'function' && define.amd) {
define([], function() {
return factory();
});
} else if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = factory();
} else {
(window.LocaleData || (... | jsor/locale-data | data/de_LU@euro.js | JavaScript | mit | 4,447 |
/*
* AStar.hpp
*
* Created on: 10.07.2014
* Author: lowkey
*/
#ifndef ASTAR_HPP_
#define ASTAR_HPP_
#include "DungeonGenerator.hpp"
#include <vector>
#include <algorithm>
#include <cassert>
#include <iostream>
typedef std::vector<Position> Path;
template<class CostCalculatorType>
class AStar {
public:
... | lowkey42/test-dungeonGen | dungeon-gen/src/AStar.hpp | C++ | mit | 3,966 |
/*
* This file is part of the Photomaton-mobile package.
*
* (c) Romain Lamarche
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#include "gphotolistcamerascommand.h"
#include "gphoto/gphotocameracontroller.h"
GPhotoListCamerasC... | rlamarche/photomaton-mobile | gphoto/commands/gphotolistcamerascommand.cpp | C++ | mit | 621 |
package chip8
import (
"testing"
)
func Test0xAnnn(t *testing.T) {
c := New([]byte{
0xAF, 0xFF,
})
c.Step()
if c.i != 0xFFF {
t.Error("i was not set to 0xFFF as expected")
}
}
| pmcatominey/gochip8 | chip8/instructions_a_test.go | GO | mit | 190 |
import { Component} from '@angular/core';
import {RenderingUIAbstractComponent} from "../../../main/components/rendering-iu/rendering-ui.abstract.component";
@Component({
selector:'gota-home-content',
moduleId : module.id || __moduleName,
templateUrl: './product-detail-content.component.html',
styleUr... | caohonghiep/gota | client/products/components/product-detail-content/product-detail-content.component.ts | TypeScript | mit | 485 |
#include "mouse.h"
//////////////////////////////////////////////////////////////////////////
// RAY //
//////////////////////////////////////////////////////////////////////////
RAY::RAY()
{
org = dir = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
}
RAY::RAY(D3DXVECTOR3 o, D3DXVECTOR3 d)
{
org = o;
dir = d;
}
... | ericrrichards/rts | rts-master/Chapter 5/Example 5.9/mouse.cpp | C++ | mit | 6,933 |
#!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the importmulti RPC.
Test importmulti by generating keys on node0, importing the scriptPubKeys an... | Bitcoin-ABC/bitcoin-abc | test/functional/wallet_importmulti.py | Python | mit | 37,468 |
import os
import json
from base import BaseController
from nqueens.models import Piece, Panel, Meta
class NQueensController(BaseController):
def __init__(self, view):
super(NQueensController, self)
self._piece_data = None
self._piece_cache = None
self.view = view
@classmethod... | PereBal/advanced-algorithms | nqueens/controller.py | Python | mit | 2,927 |
var React = require('react');
var _ = require('underscore');
var List = React.createClass({
render: function() {
var listItems = [];
_.each(this.props.value, function(data, index) {
listItems.push(<li>{JSON.stringify(data)}</li>);
});
return (
<div>
... | jmather/scope.js | client/components/Displays/List.react.js | JavaScript | mit | 466 |
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
* 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 l... | fujibee/hudson | core/src/main/java/hudson/model/JobProperty.java | Java | mit | 5,215 |
#!/usr/bin/env python
# *-* coding: UTF-8 *-*
"""
Organizaţia Internaţională a Aviaţiei Civile propune un alfabet în care
fiecărei litere îi este asignat un cuvânt pentru a evita problemele în
înțelegerea mesajelor critice.
Pentru a se păstra un istoric al conversațiilor s-a decis transcrierea lor
conform următoarelo... | iulianbute/labs | python/solutii/iulian_andrei/icao/from_icao.py | Python | mit | 1,888 |
var Helper = require("@kaoscript/runtime").Helper;
module.exports = function() {
var path = require("path");
require("../require/require.string.ks")(Helper.cast(path.join(__dirname, "foobar.txt"), "String", false, null, "String"));
}; | kaoscript/kaoscript | test/fixtures/compile/import/import.parameter.expression.default.js | JavaScript | mit | 236 |
var phonecatControllers = angular.module('phonecatControllers', []);
phonecatControllers.controller('PhoneListCtrl', ['$scope', '$http',
function ($scope, $http) {
$http.get('phones/phones.json').success(function(data) {
$scope.phones = data;
});
$scope.orderProp = 'age';
}]);
phonecatCont... | dlamoureux/angularaxa | app/js/controllers.js | JavaScript | mit | 696 |
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;
using Raptor.Library.Common;
using Raptor.Library.Enums;
using Raptor.Library.WebAPI.Transports.Content;
using Raptor.WebAPI.B... | jcapellman/Raptor | Src/Raptor.WebAPI/Controllers/ContentSyncController.cs | C# | mit | 1,295 |
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Larave... | Beyond-Game/Raffaello | gulpfile.js | JavaScript | mit | 572 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="la" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Termocoin</source>
<translation>Informatio de Termocoin</translation... | Termocoin/Termocoin | src/qt/locale/bitcoin_la.ts | TypeScript | mit | 117,262 |
module PostsWithCollectionAndFilesHelper
end
| AskDiana/uploadcare-rails | spec/dummy/app/helpers/posts_with_collection_and_files_helper.rb | Ruby | mit | 45 |
namespace App.Common.Enums
{
public enum ResourceFileVersion
{
Version1 = 1,
Version2 = 2
}
}
| Digiman/AzureBillingViewer | App.Common/Enums/ResourceFileVersion.cs | C# | mit | 125 |
package modulo0.tree;
public class Declare extends Stat {
public Declare(Var x, Expr e, Stat s) {
super("Declare", new M0Node[] { x, e, s });
}
@Override
protected Stat copy() {
return new Declare((Var) getChild(0), (Expr) getChild(1), (Stat) getChild(2));
}
}
| nuthatchery/modulo0 | modulo0/src/modulo0/tree/Declare.java | Java | mit | 275 |
<?php
/**
* @copyright Copyright (C) 2015-2018 AIZAWA Hina
* @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT
* @author AIZAWA Hina <hina@fetus.jp>
*/
use app\components\db\Migration;
use app\components\db\WeaponMigration;
class m180420_090724_longblaster_custom extends Migration
{
use... | fetus-hina/stat.ink | migrations/m180420_090724_longblaster_custom.php | PHP | mit | 714 |
package telebot
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"mime/multipart"
"net/http"
"os"
"strconv"
"strings"
"time"
)
// Raw lets you call any method of Bot API manually.
// It also handles API errors, so you only need to unwrap
// result field from json data.
func (b *Bot) Raw(metho... | tucnak/telebot | api.go | GO | mit | 5,082 |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | rishii7/vscode | src/vs/base/parts/tree/browser/treeDnd.ts | TypeScript | mit | 1,682 |
import Vue from 'vue';
import Router from 'vue-router';
import Home from '@/views/Home.vue';
import Sms from '@/views/SMS.vue';
import Services from '@/views/Services.vue';
import Settings from '@/views/Settings.vue';
import Wlan from '@/views/settings/wlan.vue';
import DialUp from '@/views/settings/dialup.vue';
import... | nextgensparx/quantum-router | src/vue-router/index.js | JavaScript | mit | 1,330 |
<?php
namespace Mpay24\Responses;
/**
* The AbstractPaymentResponse class contains all the parameters, returned with the confirmation from mPAY24
*
* Class AbstractPaymentResponse
* @package Mpay24\Responses
*
* @author mPAY24 GmbH <support@mpay24.com>
* @author Stefan Polzer <develop@ps-webdesign.c... | mpay24/mpay24-php | src/Responses/AbstractPaymentResponse.php | PHP | mit | 2,290 |
module Wocket
module Bindable
def available_bindings
raise NotImplementedError
end
def bind(name, &callback)
raise "Invalid binding: #{name}" unless available_bindings.include? name
@callbacks[name] = callback
end
def trigger(name, *args)
@callbacks[name].call *args if @c... | bradylove/wocket | lib/wocket/bindable.rb | Ruby | mit | 353 |
package main.java.test;
import java.util.Optional;
import main.java.modul.Catalog;
import main.java.modul.Categorie;
import main.java.modul.Oferta;
import main.java.modul.Produs;
import main.java.service.Log;
import main.java.util.Printer;
import main.java.util.Sort;
import main.java.util.SortUtil1;
impor... | stoiandan/msg-code | Marius/Day6/src/main/java/test/Test.java | Java | mit | 3,349 |
const Promise = require('bluebird');
const fs = require('fs-extra');
const debug = require('ghost-ignition').debug('api:themes');
const common = require('../../lib/common');
const themeService = require('../../services/themes');
const settingsCache = require('../../services/settings/cache');
const models = require('../... | Gargol/Ghost | core/server/api/v2/themes.js | JavaScript | mit | 7,109 |
import React, {PropTypes, Component} from 'react';
import { NavGroup } from 'react-photonkit'
/*class NavGroup extends Component {
static propTypes = {
children: PropTypes.any
}
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<nav className="nav-group">
... | z81/PolarOS_Next | src/components/Elements/NavGroup/NavGroup.js | JavaScript | mit | 397 |
var Vector;
(function (Vector) {
function clean(n) {
var vector = [];
for (var i = 0; i < n; i++) {
vector[i] = 0;
}
return vector;
}
Vector.clean = clean;
function create() {
var values = [];
for (var _i = 0; _i < arguments.length; _i++) {
... | Rikmuld/Atlas | public/scripts/libs/plena/math.js | JavaScript | mit | 11,693 |
using Microsoft.DirectX;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TGC.Core.SceneLoader;
namespace TGC.Group.Model.Entities
{
class EntityPlayerItemNightVisionDevice : EntityPlayerItem
{
public EntityPlayerItemNightVisionD... | AVinitzca/0FPS | TGC.Group/Model/Entities/EntityPlayerItemNightVisionDevice.cs | C# | mit | 695 |
package svc.managers;
import javax.inject.Inject;
import org.springframework.stereotype.Component;
import svc.data.users.UserDAO;
import svc.models.User;
@Component
public class UserManager {
@Inject
private UserDAO userDAO;
public User Login(String userId, String pwd) {
return userDAO.checkUserLogin(userId,... | gh6-team/less-homelessness-api | src/main/java/svc/managers/UserManager.java | Java | mit | 431 |
<?php use_helper('Pagination'); ?>
<script type="text/javascript" src="/js/jquery.lightbox-0.5.js"></script>
<link rel="stylesheet" type="text/css" href="/css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript">
$(function() {
$('a.lightbox').lightBox(); // Select all links with lightbox class
})... | phpchap/symfony14-beauty-salon | apps/frontend/modules/content/templates/gallerySuccess.php | PHP | mit | 2,587 |
<?php
/*
* This file is part of HkApps.
*
* (c) Hiroto Kitazawa <hiro.yo.yo1610@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace HkApps\App\Http\Middleware;
use Closure;
/**
* Class HttpsProtocol.
*
* @pa... | Hiroto-K/HkApps | app/Http/Middleware/HttpsProtocol.php | PHP | mit | 837 |
package conqueror.security;
import io.jsonwebtoken.JwtException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.filter.GenericFilterBean;
i... | moonik/conqueror | src/main/java/conqueror/security/StatelessAuthenticationFilter.java | Java | mit | 1,573 |
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {Component, DebugElement} from '@angular/core';
import {By} from '@angular/platform-browser';
import {ViewportRuler} from '@angular/cdk/scrolling';
import {FakeViewportRuler} from '@angular/cdk/testing';
import {MdButtonModule} from './index... | shaunak1111/material2 | src/lib/button/button.spec.ts | TypeScript | mit | 9,914 |
require "fanny_pack/version"
require "fanny_pack/assets"
FannyPack::Assets::Sprockets.auto_detect | polleverywhere/fannypack | lib/fanny_pack.rb | Ruby | mit | 98 |
'use strict';
/*!
* V4Fire Client Core
* https://github.com/V4Fire/Client
*
* Released under the MIT license
* https://github.com/V4Fire/Client/blob/master/LICENSE
*/
const
$C = require('collection.js');
const
{getThemes} = include('build/ds'),
{getThemedPathChunks, checkDeprecated} = include('build/stylus/... | V4Fire/Client | build/stylus/ds/plugins.js | JavaScript | mit | 7,150 |
/*Copyright (c) 2011 Anton Yakimov.
GELF created by Lennart Koopmann, Aleksey Palazhchenko.
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 r... | krisachai/GelfLogger | src/org/graylog2/GelfMessage.java | Java | mit | 8,476 |
package com.mypodcasts.support.injection;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import javax.inject.Inject;
import javax.inject.Provider;
public class ImageLoaderProvider implements Provider<ImageLoader> {
@Inject
private ImageLoader.ImageCache imageCache;
@Inj... | alabeduarte/mypodcasts-android | app/src/main/java/com/mypodcasts/support/injection/ImageLoaderProvider.java | Java | mit | 506 |
var model = require('model');
var adapter = require('./..').adapter;
var Issue = function () {
this.adapter = adapter;
this.property('assignees','string');
this.property('htmlUrl','string');
this.property('number','number');
this.property('state','string');
this.property('title','string');
this.property(... | diasdavid/issue-tracker | db/models/meta.js | JavaScript | mit | 873 |
<TS language="hu" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>A cím vagy címke szerkeszteséhez kattintson a jobb gombbal</translation>
</message>
<message>
<source>Create a new address</source>... | psionin/smartcoin | src/qt/locale/bitcoin_hu.ts | TypeScript | mit | 52,718 |
<div class="form-input">
<input class="form-line-text" type="text" id="{name}" name="data[{name}]" value="{{ (old('data.{name}')) ? old('data.{name}') : $item->{name} }}" {params} />
</div>
<label class="form-line-label" for="{name}">{label}</label> | SafiStudio/LaravelGenerators | templates/elements/inputs/text.php | PHP | mit | 313 |
package seedu.address.logic.commands;
import seedu.address.commons.core.IndexPrefix;
import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.model.Model;
import seedu.address.model.task.DeadlineTask;
import seedu.address.model.task.DeadlineTaskBuilder;
public class MarkDeadlineUnfinishedCo... | snehasp13/main | src/main/java/seedu/address/logic/commands/MarkDeadlineUnfinishedCommand.java | Java | mit | 1,602 |
'use strict';
angular.module('core').controller('HomeController', ['$scope', 'Authentication',
function($scope, Authentication) {
// This provides Authentication context.
$scope.authentication = Authentication;
$scope.alerts = [
{
icon: 'glyphicon-user',
colour: 'btn-success',
total: '20,408',
d... | jamesynz/mapp | public/modules/core/controllers/home.client.controller.js | JavaScript | mit | 952 |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media.Effects;
using SimulaDesign.WPFCustomUI.Util;
namespace SimulaDesign.WPFCustomUI.Converters
{
public class ShadowConverter : IValueConverter
{
private... | FinchYang/test | AecPrivateCloud.ALL/Client/SimulaDesign.WPFCustomUI/Converters/ShadowConverter.cs | C# | mit | 2,398 |
var Vector = function(values) {
// An N-Dimensional vector.
//
// Args:
// values: A list of values for each dimension of the vector.
var self = this;
self.values = values;
self.hash = function() {
// Generate a hash of the vector.
//
// Returns:
// A hash of the vector.
var r = '... | astex/nbody.js | vector.js | JavaScript | mit | 2,770 |
// -----------------------------------------------------------------------
// <copyright file="PuntConverter.cs" company="Nathan Miller">
// The MIT License (MIT)
//
// Copyright(c) 2015 Nathan Miller
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associate... | nathankmiller/NFLToy | Conversion/Offense/PuntConverter.cs | C# | mit | 3,555 |
require 'rails_helper'
RSpec.describe SoundcloudController, type: :controller do
end
| rorykoehler/soundcloud_radio_channels | spec/controllers/soundcloud_controller_spec.rb | Ruby | mit | 87 |
# frozen_string_literal: true
module DropletKit
class Links < BaseModel
attribute :myself
attribute :first
attribute :next
attribute :prev
attribute :last
end
end
| digitalocean/droplet_kit | lib/droplet_kit/models/links.rb | Ruby | mit | 188 |
/**
* Plugin Name: Autocomplete for Textarea
* Author: Amir Harel
* Copyright: amir harel (harel.amir1@gmail.com)
* Twitter: @amir_harel
* Version 1.4
* Published at : http://www.amirharel.com/2011/03/07/implementing-autocomplete-jquery-plugin-for-textarea/
*/
(function($){
/**
* @param obj
* @attr wordCo... | tygarimew/Mana-Haven | global/js/auto_suggest.js | JavaScript | mit | 12,043 |
using System.Linq;
using Xunit;
namespace Farity.Tests
{
public class FilterTests
{
[Fact]
public void FilterFiltersElementsInTheList()
{
var expected = new[] {1, 2, 3};
var actual = F.Filter(x => x < 4, new[] {1, 2, 3, 4, 5});
Assert.Equal(expected,... | farity/farity | Farity.Tests/FilterTests.cs | C# | mit | 745 |
"""
Django settings for apps project.
Generated by 'django-admin startproject' using Django 1.9.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
from... | pattu777/LearningDjango | apps/apps/settings.py | Python | mit | 3,307 |
package com.zhanghedr.mvc;
/**
* Created by zhanghedr on 1/2/17.
*/
public class User {
private String name;
private String email;
public User(String name, String email) {
this.name = name;
this.email = email;
}
public String getName() {
return name;
}
public v... | zhanghedr/design-pattern | src/main/java/com/zhanghedr/mvc/User.java | Java | mit | 518 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Ponscoin</source>
<translation>O Ponscoinu</translation>
</messa... | fcanbolat/ponscoin | src/qt/locale/bitcoin_bs.ts | TypeScript | mit | 96,738 |
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System;
using System.Text;
using System.IO;
using System.Collections;
using System.Text.RegularExpressions;
[InitializeOnLoad]
public class NoesisUpdater: EditorWindow
{
static NoesisUpdater()
{
EditorApplication.update += CheckV... | JinkiJung/PAUT | VRAT/vrat/Assets/Editor/NoesisGUI/NoesisUpdater.cs | C# | mit | 15,876 |
#include <set>
#include <map>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <list>
#include <cassert>
#include <climits>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <fstream>
#include <sstream>
#include <iostream>
#include <algori... | bolatov/contests | codeforces.ru/cf183/p4.cpp | C++ | mit | 1,861 |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# 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 or ag... | Sorsly/subtle | google-cloud-sdk/lib/surface/spanner/databases/create.py | Python | mit | 2,377 |
class HomeController < ApplicationController
def index
end
def playgame
@orientation = ""
@waiting_players = []
if params[:nick_name]
# This user gave us a nickname and is looking for other players
@looking = true
#register user
nick_name = params[:nick_name]
@u = User.... | sdb1228/chess | app/controllers/home_controller.rb | Ruby | mit | 1,377 |
package com.almasb.fxglgames.geowars.component;
import com.almasb.fxgl.dsl.FXGL;
import com.almasb.fxgl.dsl.components.HealthIntComponent;
import com.almasb.fxgl.entity.component.Component;
import com.almasb.fxgl.texture.Texture;
import com.almasb.fxgl.time.LocalTimer;
import com.almasb.fxglgames.geowars.GeoWarsApp;
i... | AlmasB/FXGLGames | GeometryWars/src/main/java/com/almasb/fxglgames/geowars/component/MineComponent.java | Java | mit | 1,735 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = fn;
var _includes = require('utilise/includes');
var _includes2 = _interopRequireDefault(_includes);
var _client = require('utilise/client');
var _client2 = _interopRequireDefault(_client);
var _all = require('utilise... | lems111/bittrex-node-client | node_modules/rijs/node_modules/rijs.components/dist/types/fn.js | JavaScript | mit | 1,205 |
'use strict';
/* jshint -W098 */
angular.module('mean.rules').controller('RulesController', ['$scope', '$stateParams', '$location', '$http','Global', 'Rules', 'MeanUser','Circles','Groups',
function($scope, $stateParams, $location, $http, Global, Rules, MeanUser,Circles,Groups) {
$scope.global = Global;
$sco... | jenavarro/AllRules | packages/custom/rules/public/controllers/rules.js | JavaScript | mit | 4,812 |
var utilities = (function(window, $){
/**
* Draws a rounded rectangle using the current state of the canvas.
* If you omit the last three params, it will draw a rectangle
* outline with a 5 pixel border radius
* @param {CanvasRenderingContext2D} ctx
* @param {Number} x The top left x coordi... | paradite/GestFly | js/app/utilities.js | JavaScript | mit | 4,614 |
require 'forwardable'
module Gimlet
module Queryable
module API
extend Forwardable
def select(options = {})
selecting = @instances
options[:where].each do |attribute, operator, argument|
selecting = selecting.select do |id, instance|
instance[attribute].send(ope... | darashi/gimlet-model | lib/gimlet/queryable.rb | Ruby | mit | 1,545 |
package graphql.analysis;
import graphql.PublicApi;
import graphql.language.Argument;
import graphql.language.Node;
import graphql.schema.GraphQLArgument;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLSchema;
import graphql.util.TraverserContext;
import java.util.Map;
@PublicApi
public i... | graphql-java/graphql-java | src/main/java/graphql/analysis/QueryVisitorFieldArgumentEnvironment.java | Java | mit | 706 |
#!/usr/local/bin/python3
from zeroconf import Zeroconf, ServiceInfo
import socket
import configparser
from . import hazc_cmd
# import pdb
class hazc_device:
#Forward constants
NO_PARAM = hazc_cmd.NO_PARAM
BOOL = hazc_cmd.BOOL
FLOAT = hazc_cmd.FLOAT
STRING = hazc_cmd.STRING
INT = hazc_cmd.... | ArcAwe/hazc | hazc_device.py | Python | mit | 6,518 |
require 'spec_helper'
def department_in_index?(d)
Department.__elasticsearch__.refresh_index!
Department.__elasticsearch__.search(query: { match: { '_id' => d.id.to_s } }).count == 1
end
describe Department do
let(:attrs) { {} }
subject(:department) { build :department, attrs }
# relationships
it { shoul... | biola/buweb-content-models | spec/lib/buweb/department_spec.rb | Ruby | mit | 10,147 |
var c = require("./config").twitter;
var Twit = require('twit');
//console.log(c);
console.log(c.apiKey);
console.log(c.apiSecret);
console.log(c.accessToken);
console.log(c.accessTokenSecret);
var T = new Twit({
consumer_key: c.apiKey,
consumer_secret: c.apiSecret,
access_token: c.accessToken,
acce... | russjohnson09/rdjgvus | twit.js | JavaScript | mit | 691 |
// These are the pages you can go to.
// They are all wrapped in the App component, which should contain the navbar etc
// See http://blog.mxstbr.com/2016/01/react-apps-with-pages for more information
// about the code splitting business
import { getAsyncInjectors } from './utils/asyncInjectors';
const errorLoading = ... | mikejong0815/Temp | app/routes.js | JavaScript | mit | 4,755 |
/**
* Fac.js
* (c) 2017 Owen Luke
* https://github.com/tasjs/fac
* Released under the MIT License.
*/
var copy = require('./copy');
var chain = require('./chain');
var super_ = require('./super');
var core = {
new: function(options){
typeof options === 'string' && (options = {name: options});
var obj = cha... | tasjs/fac | lib/core/core.js | JavaScript | mit | 1,691 |
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Net;
using System.Threading.Tasks;
using System.Xml;
namespace Kitechan
{
public class UserInfo
{
public struct ImagePath
{
public string ImageUrl { get; set; }
public st... | Asky314159/kitechan | UserInfo.cs | C# | mit | 5,514 |
from victor.exceptions import (
FieldValidationException,
FieldTypeConversionError,
FieldRequiredError,
VectorInputTypeError
)
class Field(object):
required = True
"""Field is required and an exception will be raised if missing"""
missing_value = None
"""Value to use when field is mis... | alexph/victor | victor/vector.py | Python | mit | 4,717 |
/*
Copyright 2017 Coin Foundry (coinfoundry.org)
Authors: Oliver Weichhold (oliver@weichhold.com)
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 l... | shtse8/miningcore | src/MiningCore/Stratum/StratumError.cs | C# | mit | 1,708 |
// Copyright (c) 2011-2016 The Flericoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "Globals.h"
#include "CryptoNoteCore/Account.h"
#include "CryptoNoteCore/CryptoNoteFormatUtils.h"
#include "CryptoN... | flericoin-project/flericoin | tests/TransfersTests/Tests.cpp | C++ | mit | 17,519 |
const express = require('express');
const path = require('path');
const fs = require('fs');
const bodyParser = require('body-parser')
// const formidable = require('formidable');
// const createTorrent = require('create-torrent');
// const WebTorrent = require('webtorrent');
const socketController = require('./socketCo... | jpmitchellpierson/nile.js | nileServer.js | JavaScript | mit | 907 |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... | arunetm/ChakraCore_0114 | lib/Parser/globals.cpp | C++ | mit | 627 |
using Content.Server.Throwing;
using Content.Shared.Acts;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
namespace Content.Server.Explosion.Components
{
[RegisterComponent]
public sealed class ExplosionLaunchedComponent : Component, IExAct
{
[Dependency] privat... | space-wizards/space-station-14 | Content.Server/Explosion/Components/ExplosionLaunchedComponent.cs | C# | mit | 1,249 |
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.office.impl;
import com.wilutions.com.*;
@SuppressWarnings("all")
@CoClass(guid="{C09B8C5A-A463-DB41-5DAE-69E7A5F7FCBC}")
public class ODSOColumnImpl extends Dispatch implements com.wilutions.mslib.office.ODSOColumn {
@DeclDISPID(16107438... | wolfgangimig/joa | java/joa/src-gen/com/wilutions/mslib/office/impl/ODSOColumnImpl.java | Java | mit | 1,933 |
/*
* BLITSaw_processor.cpp
*
* Copyright (c) 2014, fukuroda (https://github.com/fukuroder)
* Released under the MIT license
*/
#include "BLITSaw_processor.h"
#include "BLITSaw_guids.h"
#include "pluginterfaces/vst/ivstparameterchanges.h"
#include <algorithm>
namespace MyVst {
//
BLITSaw_processor... | fukuroder/bandlimited_sawtooth_synthesis | source/BLITSaw_processor.cpp | C++ | mit | 3,004 |
module Hideous
VERSION = "0.0.5"
end
| yabawock/hideous | lib/hideous/version.rb | Ruby | mit | 39 |
<?php
/*
Safe sample
input : get the UserData field of $_SESSION
sanitize : cast via + = 0
construction : interpretation with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute this software and its docum... | stivalet/PHP-Vulnerability-test-suite | Injection/CWE_95/safe/CWE_95__SESSION__CAST-cast_int_sort_of2__variable-interpretation_simple_quote.php | PHP | mit | 1,174 |
<?php
namespace StorageBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Show\ShowMapper;
use Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery;
use Symfony\Compone... | vol4onok/symfony | src/StorageBundle/Admin/FileAdmin.php | PHP | mit | 4,705 |
#!/usr/bin/env python
#
# Copyright (c) 2014 Hamilton Kibbe <ham@hamiltonkib.be>
#
# 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 ... | hamiltonkibbe/PyAbleton | pyableton/__init__.py | Python | mit | 1,356 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace _2._1.WebForms_Sumator
{
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | svetlai/TelerikAcademy | Software-Technologies/ASP.NET-Web-Forms/01-Introduction-to-ASP.NET/02-WebFormsSumator/Default.aspx.cs | C# | mit | 314 |
<?php
namespace Nova\View;
use Nova\Container\Container;
use Nova\Events\Dispatcher;
use Nova\Support\Contracts\ArrayableInterface as Arrayable;
use Nova\View\Engines\EngineResolver;
use Nova\View\Layout;
use Nova\View\View;
use Nova\View\ViewFinderInterface;
use Closure;
use InvalidArgumentException;
class Factor... | ignazas/ma2016 | vendor/nova-framework/system/src/View/Factory.php | PHP | mit | 23,140 |
"""
Django settings for figexample project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)... | arbiterofcool/fig-seed | template/fig-django/figexample/settings.py | Python | mit | 2,114 |
import SqSortableList from 'sq-ember-inputs/components/sq-sortable-list';
export default SqSortableList;
| benjaminbalazs/sq-ember-inputs | app/components/sq-sortable-list.js | JavaScript | mit | 106 |
(function() {
"use strict";
angular.module('common.dragdrop', [])
.factory('DragDropHandler', [function() {
return {
dragObject: undefined,
addObject: function(object, objects, to) {
objects.splice(to, 0, object);
},
moveObject: func... | michaeljcalkins/angular-common | modules/dragdrop/dragdrop.js | JavaScript | mit | 3,374 |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _functionalCurry = require('../functional/curry');
var lt = (0, _functionalCurry.curry)(function (a, b) {
return a < b;
});
exports.lt = lt; | gonzaloruizdevilla/alicates | lib/modules/relation/lt.js | JavaScript | mit | 228 |
/**
* Blog-api.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
}
};
| shubham2192/kclub | api/models/Blog-api.js | JavaScript | mit | 238 |
/**
* Palindromic Substrings
*
* Given a string, your task is to count how many palindromic substrings in this string.
*
* The substrings with different start indexes or end indexes are counted as different substrings even they consist of
* same characters.
*
* Example 1:
*
* Input: "abc"
* Output: 3
* Expl... | jeantimex/javascript-problems-and-solutions | src/string/palindromic-substrings.js | JavaScript | mit | 1,092 |
// -*- mode: java; c-basic-offset: 2; -*-
// Copyright 2009-2011 Google, All Rights reserved
// Copyright 2011-2012 MIT, All rights reserved
// Released under the MIT License https://raw.github.com/mit-cml/app-inventor/master/mitlicense.txt
package com.google.appinventor.components.runtime;
import android.app.Activit... | rkipper/AppInventor_RK | appinventor/components/src/com/google/appinventor/components/runtime/PhoneStatus.java | Java | mit | 2,694 |
namespace do
managers = layer "managers"
users = layer "users"
environment "secrets" do
add_member "manage_variable", managers.roleid
add_member "use_variable", users.roleid
end
alice, bob, claire = %w(alice bob claire).map do |hostname|
host hostname
end
managers.add_host ali... | conjurdemos/secrets-management | permissions-model.rb | Ruby | mit | 362 |
/*
* The MIT License
*
* Copyright 2013 Thomas Schaffer <thomas.schaffer@epitech.eu>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitatio... | loopfz/Lucki | src/shaft/poker/game/table/IPlayerActionListener.java | Java | mit | 1,532 |
jest.unmock('../../src/filtering/filter');
import React from 'react';
import {shallow} from 'enzyme';
import {Filter} from '../../src/filtering/filter';
describe('Filter', () => {
it('has empty filtering text by default', () => {
// when
const filter = shallow(
<Filter/>
);
... | nkoder/lol-champions | __tests__/filtering/filter.test.js | JavaScript | mit | 843 |