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 isEnabled from 'ember-metal/features';
import run from 'ember-metal/run_loop';
import { observer } from 'ember-metal/mixin';
import { set } from 'ember-metal/property_set';
import { bind } from 'ember-metal/binding';
import {
beginPropertyChanges,
endPropertyChanges
} from 'ember-metal/property_events';
impo... | topaxi/ember.js | packages/ember-runtime/tests/system/object/destroy_test.js | JavaScript | mit | 4,435 |
package seedu.tache.ui;
import java.util.logging.Logger;
//import org.controlsfx.control.Notifications;
import com.google.common.eventbus.Subscribe;
import javafx.application.Platform;
//import javafx.geometry.Pos;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.i... | CS2103JAN2017-T09-B4/main | src/main/java/seedu/tache/ui/UiManager.java | Java | mit | 6,234 |
// softlayer_billing_item_cancellation_request - SoftLayer customers can use this API to submit a
// cancellation request. A single service cancellation can contain multiple cancellation items which
// contain a billing item.
package softlayer_billing_item_cancellation_request
// DO NOT EDIT. THIS FILE WAS AUTOMATICAL... | sudorandom/softlayer-go-gen | methods/softlayer_billing_item_cancellation_request/doc.go | GO | mit | 333 |
#define VMA_IMPLEMENTATION
#include <vk_mem_alloc.h>
#include "VulkanMemoryAllocator.h"
#include "VulkanUtility.h"
#include "Core/Assertion.h"
namespace cube
{
namespace rapi
{
void VulkanMemoryAllocator::Initialize(VkInstance instance, VkPhysicalDevice GPU, VkDevice device)
{
VkR... | Cube219/CubeEngine | Source/RenderAPIs/VulkanAPI/VulkanMemoryAllocator.cpp | C++ | mit | 4,378 |
#ifndef VPP_OPENCV_UTILS_HH_
# define VPP_OPENCV_UTILS_HH_
# include <iostream>
# include <regex>
# include <opencv2/highgui/highgui.hpp>
# include <vpp/core/boxNd.hh>
# include <vpp/core/image2d.hh>
inline bool open_videocapture(const char* str, cv::VideoCapture& cap)
{
if (std::regex_match(str, std::regex("[0-9]+... | pdebus/MTVMTL | thirdparty/vpp/vpp/utils/opencv_utils.hh | C++ | mit | 1,322 |
import collections
puzzle_input = (0,13,1,8,6,15)
test_inputs = [
([(0,3,6), 10], 0),
([(1,3,2)], 1),
([(2,1,3)], 10),
([(1,2,3)], 27),
([(2,3,1)], 78),
([(3,2,1)], 438),
([(3,1,2)], 1836),
# Expensive Tests
# ([(0,3,6), 30000000], 175594),
# ([(1,3,2), 30000000], 2578),
#... | AustinTSchaffer/DailyProgrammer | AdventOfCode/2020/day_15/solution.py | Python | mit | 1,352 |
import { DomSanitizer } from '@angular/platform-browser';
export declare class IndexTrack {
transform(_x: any): (index: any) => any;
}
export declare class Stringify {
transform(input: any, spaces?: number): string;
}
export declare class ForceArray {
transform(input: any, repeat?: any, repeatValue?: any): ... | AckerApple/ack-angular | pipes.d.ts | TypeScript | mit | 3,095 |
<?php
namespace Fdr\UserBundle\Form\Type;
//use Symfony\Component\Form\FormBuilder;
//use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Doctrine\ORM\EntityRepository;
class RegistrationFormType extends AbstractTy... | ingetat2014/www | src/Fdr/UserBundle/Form/Type/RegistrationFormType.php | PHP | mit | 2,730 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Physics
{
/// <summary>
/// A Distorter that distorts points based on their distance and directi... | SystemFriend/HoloLensUnityChan | Assets/MRTK/Core/Utilities/Physics/Distorters/DistorterGravity.cs | C# | mit | 2,822 |
#include "questdisplay.h"
#include "../core/global.h"
//QuestLister stuff
QuestLister::QuestLister(int xp, int yp, int wp, int hp) : BasicGUI(xp, yp, wp, hp) {
headerSize = 35;
//-1 due to the header
displayableQuestCount = h / headerSize - 1;
padding = 5;
selectedElementPos = 0;
defaultBGTexture = Global::res... | kovleventer/FoD | src/player/questdisplay.cpp | C++ | mit | 6,449 |
package com.github.gilz688.mifeditor;
import com.github.gilz688.mifeditor.proto.MIEView;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
public class MIEApplication extends Application {
pri... | gilz688/MIF-ImageEditor | MIFImageEditor/src/main/java/com/github/gilz688/mifeditor/MIEApplication.java | Java | mit | 1,289 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ShadowCoin</source>
<translation>O ShadowCoin</translation>
</message>
<message>
<locat... | hansacoin/hansacoin | src/qt/locale/bitcoin_pl.ts | TypeScript | mit | 119,674 |
var axios = require('axios')
module.exports = function (app) {
app.get('/context_all.jsonld', function (req, res) {
axios.get(app.API_URL + 'context_all.jsonld')
.then(function (response) {
res.type('application/ld+json')
res.status(200).send(JSON.stringify(response.data, null, 2))
})... | nypl-registry/browse | routes/context.js | JavaScript | mit | 477 |
module Githu3
class Tag < Githu3::Resource
end
end
| sbellity/githu3 | lib/githu3/tag.rb | Ruby | mit | 55 |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(d... | Ragingart/TRage | src/app/page/settings/settings.component.js | JavaScript | mit | 1,673 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Reflection;
using System.Runtime.Serialization;
using System.Web.Http;
using System.Web.Http.Description;
using System.Xml... | kpnlora/LoRaClient | examples/Betabit EventHub Example/Betabit.Lora.Nuget.EventHub/Betabit.Lora.Nuget.EventHub/Areas/HelpPage/ModelDescriptions/ModelDescriptionGenerator.cs | C# | mit | 19,100 |
<?php
\Larakit\StaticFiles\Manager::package('larakit/sf-grid')
->cssPackage('lk-grid.css')
->setSourceDir('public'); | larakit/sf-grid | init.php | PHP | mit | 124 |
'use strict';
import React from 'react-native'
import {
AppRegistry,
Component,
Navigator,
ToolbarAndroid,
View,
} from 'react-native';
import globalStyle, { colors } from './globalStyle';
class NavBar extends Component {
onClickBackToHome() {
this.props.navigator.push({
name: 'home',
sc... | kmjennison/boop | components/NavBar.js | JavaScript | mit | 1,192 |
<?php
namespace App;
use App\models\User;
use Illuminate\Database\Eloquent\Model;
class InstDepartment extends Model
{
public static function get_departments_by_inst_id($id)
{
$departments = InstDepartment::where('institution_id', $id)->get();
return $departments;
}
public static f... | Webnician/EduForum | app/InstDepartment.php | PHP | mit | 2,871 |
# Copyright (c) 2015 Jean Dias
require 'test_helper'
class PublicidadesControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end
| jeanmfdias/blog-initial | test/controllers/publicidades_controller_test.rb | Ruby | mit | 171 |
class CreateTakedowns < ActiveRecord::Migration[5.0]
def change
create_table :takedowns do |t|
t.integer :linked_account_id, null: false
t.timestamps
end
end
end
| bountysource/core | db/migrate/20171126185423_create_takedowns.rb | Ruby | mit | 186 |
package fpr9.com.nbalivefeed.entities;
/**
* Created by FranciscoPR on 07/11/16.
*/
public class RecordContainer {
private String id;
private Record record;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Record getRecord() {
... | FranPR9/NBALIVEFEED | app/src/main/java/fpr9/com/nbalivefeed/entities/RecordContainer.java | Java | mit | 430 |
import React, { Component, PropTypes } from 'react';
import ItemTypes from './ItemTypes';
import { DragSource, DropTarget } from 'react-dnd';
import flow from 'lodash.flow';
function isNullOrUndefined(o) {
return o == null;
}
const cardSource = {
beginDrag(props) {
return {
id: props.id,
index: pr... | jas-chen/react-dnd-card | src/index.js | JavaScript | mit | 3,144 |
using System;
using Microsoft.Hadoop.MapReduce;
namespace MapReduceSamples.Utils
{
public class TestReducerCombinerContext : ReducerCombinerContext
{
public TestReducerCombinerContext(bool isCombiner) : base(isCombiner)
{
}
public override void EmitKeyValue(string key, string ... | SaschaDittmann/MapReduceSamples | MapReduceSamples/MapReduceSamples.Utils/TestReducerCombinerContext.cs | C# | mit | 1,520 |
#!/usr/bin/env python
import os
import time
import argparse
import tempfile
import PyPDF2
import datetime
from reportlab.pdfgen import canvas
parser = argparse.ArgumentParser("Add signatures to PDF files")
parser.add_argument("pdf", help="The pdf file to annotate")
parser.add_argument("signature", help="The signature... | yourcelf/signpdf | signpdf.py | Python | mit | 2,594 |
# frozen_string_literal: true
require 'vk/api/responses'
module Vk
module API
class Likes < Vk::Schema::Namespace
module Responses
# @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json
class IsLikedResponse < Vk::Schema::Response
# @return [Object] @see https://gi... | alsemyonov/vk | lib/vk/api/likes/responses/is_liked_response.rb | Ruby | mit | 473 |
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('sandbox... | basp/sandbox | e2e/src/app.e2e-spec.ts | TypeScript | mit | 640 |
// @license
// Redistribution and use in source and binary forms ...
// Copyright 2012 Carnegie Mellon University. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of sou... | CI-WATER/tmaps | tmc-1.2.1-linux/timemachine-viewer/js/org/gigapan/timelapse/mercator.js | JavaScript | mit | 2,858 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About GoldDiggerCoin</source>
<translation>Acerca de GoldDiggerCoin</trans... | golddiggercoin/golddiggercoin | src/qt/locale/bitcoin_es.ts | TypeScript | mit | 120,085 |
#include "../../include/domains/AODeterminization.h"
#include "../../include/domains/DummyAction.h"
AllOutcomesDeterminization::
AllOutcomesDeterminization(mlcore::Problem* problem) {
originalProblem_ = problem;
problem->generateAll();
int s_idx = 0;
for (mlcore::State* s : problem->states()) ... | luisenp/mdp-lib | src/domains/AODeterminization.cpp | C++ | mit | 2,532 |
<?php
namespace BigD\ThemeBundle\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://symfony.... | matudelatower/BigD | src/BigD/ThemeBundle/DependencyInjection/Configuration.php | PHP | mit | 870 |
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace Flarum\Post;
/**
* @property array $content
*/
abstract class AbstractEventPost extends Post
{
/**
* Unserialize the cont... | flarum/core | src/Post/AbstractEventPost.php | PHP | mit | 783 |
var searchData=
[
['setdebugflags',['setDebugFlags',['../dwarfDbgDebugInfo_8c.html#ab42dd1f5e0f83cb14eed0902aa036a95',1,'dwarfDbgDebugInfo.c']]],
['showchildren',['showChildren',['../dwarfDbgDieInfo_8c.html#a7e7301f838fc67cbb4555c6c250c2dc0',1,'dwarfDbgDieInfo.c']]],
['showcontents',['showContents',['../dwarfDbgL... | apwiede/nodemcu-firmware | docs/dwarfDbg/search/functions_8.js | JavaScript | mit | 660 |
/*Owner & Copyrights: Vance King Saxbe. A.*//*Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe@... | VanceKingSaxbeA/KOSPI-Engine | App/HITEJINRO.php | PHP | mit | 9,175 |
import 'reflect-metadata';
import 'rxjs/Rx';
import 'zone.js';
import AppComponent from './components/AppComponent.js';
import { bootstrap } from 'angular2/platform/browser';
bootstrap(AppComponent);
| Scoutlit/realtimeSyncing | webclient/app/app.js | JavaScript | mit | 201 |
#!/usr/bin/python
import pexpect
import sys
import logging
import vt102
import os
import time
def termcheck(child, timeout=0):
time.sleep(0.05)
try:
logging.debug("Waiting for EOF or timeout=%d"%timeout)
child.expect(pexpect.EOF, timeout=timeout)
except pexpect.exceptions.TIMEOUT:
logging.debug("Hit timeout... | paulboal/pexpect-curses | demo/demo3.py | Python | mit | 1,476 |
<?php
namespace Outil\ServiceBundle\Param;
use Symfony\Component\HttpKernel\Exception\Exception;
class Param{
// private $mailer;
// private $locale;
// private $minLength;
// public function __construct(\Swift_Mailer $mailer, $locale, $minLength)
// {
// $this->mailer = $mailer;
// $this->locale... | junioraby/architec.awardspace.info | src/Outil/ServiceBundle/Param/Param.php | PHP | mit | 605 |
#include "CharTypes.h"
namespace GeneHunter {
bool firstMatchSecond( char c1, char c2 )
{
if ( c1 == c2 ) return true;
if ( c1 == 'U' and c2 == 'T' ) return true;
if ( c1 == 'T' and c2 == 'U' ) return true;
if ( c1 == 'K' and ( c2 == 'G' or c2 == 'T' )) return true;
if ( c1 == 'S' and ( c2 == 'G' ... | BrainTwister/GeneHunter | src/GenomeLib/CharTypes.cpp | C++ | mit | 652 |
using System;
using System.Collections.Generic;
using System.Text;
namespace DesignPatterns.Behavioral.Visitor
{
public class Director : Employee
{
public Director(string name, double income, int vacationDays)
: base(name, income, vacationDays) { }
}
}
| Ysovuka/design-patterns | src/c-sharp/DesignPatterns/Behavioral/Visitor/Director.cs | C# | mit | 289 |
class CreateImages < ActiveRecord::Migration
def change
create_table :images do |t|
t.string :title, :null => false
t.boolean :free_shipping, :null => false, :default => false
t.timestamps
end
end
end
| piggybak/piggybak_free_shipping_by_product | test/dummy/db/migrate/20111231040354_create_images.rb | Ruby | mit | 231 |
class VideoRepliesController < ApplicationController
before_filter :require_user, :only => [:create, :delete]
def create
@reply = VideoReply.new(params[:video_reply])
@reply.user = @current_user
if @reply.save
flash[:notice] = 'Reply Submitted Successfully'
redirect_to @reply.video
else
... | AlexChien/shadowgraph | app/controllers/video_replies_controller.rb | Ruby | mit | 492 |
// Copyright (c) Microsoft Corporation
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Runtime.InteropServices;
namespace Microsoft.Xbox.Services.Leaderboard
{
public partial class LeaderboardQuery
{
public string StatNam... | MSFT-Heba/xbox-live-unity-plugin | CSharpSource/Source/api/Leaderboard/LeaderboardQuery.cs | C# | mit | 1,787 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Sm... | Shtereva/Fundamentals-with-CSharp | Lists-ProcessingVariable-LengthSequences/SmallestElementInArray/Properties/AssemblyInfo.cs | C# | mit | 1,420 |
/**
* Returns an Express Router with bindings for the Admin UI static resources,
* i.e files, less and browserified scripts.
*
* Should be included before other middleware (e.g. session management,
* logging, etc) for reduced overhead.
*/
var browserify = require('../middleware/browserify');
var express = requir... | joerter/keystone | admin/server/app/createStaticRouter.js | JavaScript | mit | 1,923 |
/*
* User: aleksey.nakoryakov
* Date: 03.08.12
* Time: 12:32
*/
using System;
using System.Reflection;
using Autodesk.AutoCAD.ApplicationServices;
namespace LayoutsFromModel
{
/// <summary>
/// Класс для работы с настройками AutoCAD
/// </summary>
public static class AcadPreferencesHelper
{
/// <summary>
... | bargool/LayoutsFromModel | LayoutsFromModel/Helpers/AcadPreferencesHelper.cs | C# | mit | 1,694 |
package org.nextrtc.signalingserver.api;
import lombok.extern.log4j.Log4j;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import com.google.common.eventbus.EventBus;
@Log4j
@Service("nextRTCEventBus")
@Scope("singleton")
public class NextRTCEventBus {
private E... | kevintanhongann/nextrtc-signaling-server | src/main/java/org/nextrtc/signalingserver/api/NextRTCEventBus.java | Java | mit | 719 |
'use strict'
const isPlainObject = require('lodash.isplainobject')
const getPath = require('lodash.get')
const StaticComponent = require('./StaticComponent')
const DynamicComponent = require('./DynamicComponent')
const LinkedComponent = require('./LinkedComponent')
const ContainerComponent = require('./ContainerCompo... | zaboco/deependr | src/components/index.js | JavaScript | mit | 1,892 |
# Include hook code here
require 'active_record'
require 'qds'
ActiveRecord::Base.extend MindAsLab::Searchable
| mindaslab/qds | init.rb | Ruby | mit | 112 |
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "Cards" do
it "fails" do
fail "hey buddy, you should probably rename this file and start specing for real"
end
end
| rhyhann/cards | spec/cards_spec.rb | Ruby | mit | 199 |
//-----------------------------------------------------------------------
// <copyright file="PropertiesFileGenerator.cs" company="SonarSource SA and Microsoft Corporation">
// Copyright (c) SonarSource SA and Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the pr... | HSAR/sonar-msbuild-runner | SonarRunner.Shim/PropertiesFileGenerator.cs | C# | mit | 14,482 |
'use strict';
var program = require('commander');
var Q = require('q');
var fs = require('fs');
var resolve = require('path').resolve;
var stat = Q.denodeify(fs.stat);
var readFile = Q.denodeify(fs.readFile);
var writeFile = Q.denodeify(fs.writeFile);
var assign = require('./util/assign');
program
.option('--get', ... | zorrodg/fox-cove | lib/config.js | JavaScript | mit | 1,822 |
require "pubdraft/version"
require "pubdraft/engine"
require "pubdraft/state"
require "pubdraft/model"
module Pubdraft
def pubdraft(**options)
include Model::InstanceMethods
extend Model::ClassMethods
cattr_accessor :pubdraft_states
cattr_accessor :pubdraft_options
before_create :set_pubdraft_d... | neotericdesign/pubdraft | lib/pubdraft.rb | Ruby | mit | 772 |
package pt.lsts.imc;
import java.io.IOException;
import java.net.URI;
import java.util.concurrent.Future;
import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect;
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage;
import org.eclipse.jet... | LSTS/imcproxy | src/pt/lsts/imc/ImcClientSocket.java | Java | mit | 1,796 |
<?php
namespace Core;
use Silex\ControllerCollection;
abstract class AbstractController
{
/**
*
* @var Application
*/
protected $app;
public function __construct( Application $app )
{
$this->app = $app;
}
/**
*
* @param \Silex\ControllerCollection $controllers
* @return \Si... | kor3k/silex | src/Core/AbstractController.php | PHP | mit | 714 |
# -*- coding: utf-8 -*-
import json
from axe.http_exceptions import BadJSON
def get_request(request):
return request
def get_query(request):
return request.args
def get_form(request):
return request.form
def get_body(request):
return request.data
def get_headers(request):
return request.header... | soasme/axe | axe/default_exts.py | Python | mit | 680 |
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
# Mayor.create(:n... | warolv/wikydoc | db/seeds.rb | Ruby | mit | 362 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Reflection;
using System.Net.Http;
using Newtonsoft.Json;
namespace Codenesium.DataConversionExtensions
{
public static class ObjectExtensions
{
... | codenesium/DataConversionExtensions | DataConversionExtensions/ObjectExtensions.cs | C# | mit | 2,903 |
import qambi, {
getMIDIInputs
} from 'qambi'
document.addEventListener('DOMContentLoaded', function(){
console.time('loading and parsing assets took')
qambi.init({
song: {
type: 'Song',
url: '../data/minute_waltz.mid'
},
piano: {
type: 'Instrument',
url: '../../instruments/h... | abudaan/qambi | examples/concat/main.js | JavaScript | mit | 1,165 |
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS ... | bigfoot90/doctrine2 | lib/Doctrine/ORM/Query/AST/DeleteClause.php | PHP | mit | 1,646 |
module Doorkeeper
class TokensController < Doorkeeper::ApplicationMetalController
def create
response = authorize_response
headers.merge! response.headers
self.response_body = response.body.to_json
self.status = response.status
rescue Errors::DoorkeeperError => e
hand... | EasterAndJay/doorkeeper | app/controllers/doorkeeper/tokens_controller.rb | Ruby | mit | 2,774 |
export default function widget(widget=null, action) {
switch (action.type) {
case 'widget.edit':
return action.widget;
case 'widget.edit.close':
return null;
default:
return widget;
}
}
| KevinAst/astx-redux-util | src/reducer/spec/samples/hash/widgetOld.js | JavaScript | mit | 223 |
def tryprint():
return ('it will be oke') | cherylyli/stress-aid | env/lib/python3.5/site-packages/helowrld/__init__.py | Python | mit | 45 |
/*
* JBox2D - A Java Port of Erin Catto's Box2D
*
* JBox2D homepage: http://jbox2d.sourceforge.net/
* Box2D homepage: http://www.gphysics.com
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use o... | cr0ybot/MIRROR | libraries/JBox2D/src/org/jbox2d/testbed/TestSettings.java | Java | mit | 2,286 |
<?php
/*
* This file is part of the AntiMattr Content MongoDB Bundle, a Symfony Bundle by Matthew Fitzgerald.
*
* (c) 2014 Matthew Fitzgerald
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AntiMattr\Bundle\ContentMongo... | antimattr/symfony-demo-app-01 | src/vendor/content-mongodb-bundle/src/AntiMattr/Bundle/ContentMongoDBBundle/Form/Document/PageSectionFormType.php | PHP | mit | 1,927 |
require "rails_helper"
RSpec.describe GoogleUrlValidator do
include GoogleSheetHelper
it "validates an incorrect host name" do
record = build_stubbed(:tagging_spreadsheet, url: "https://invalid.com")
GoogleUrlValidator.new.validate(record)
expect(record.errors[:url]).to include(/is not a google docs ... | alphagov/content-tagger | spec/validators/google_url_validator_spec.rb | Ruby | mit | 1,701 |
<div class="post">
<h1><a href="{{ Cupboard::route('posts.show', $post->slug) }}">{{ $post->title }}</a></h1>
<div class="date">{{ date("M/d/Y", strtotime($post->publish_date)) }}</div>
<div class="content">
{{ $post->parsed_intro }}
</div>
</div>
| CupboardCMS/core | public/themes/default/inc/post.blade.php | PHP | mit | 254 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Se... | BlueDress/School | C# Advanced/Regular Expressions Exercises/Series of Letters/Properties/AssemblyInfo.cs | C# | mit | 1,410 |
package be.swsb.productivity.chapter5.beans;
public abstract class CoffeeBeans {
public abstract String scent();
}
| Sch3lp/ProductivityWithShortcuts | src/main/java/be/swsb/productivity/chapter5/beans/CoffeeBeans.java | Java | mit | 120 |
'use strict';
var MemoryStats = require('../../src/models/memory_stats')
, SQliteAdapter = require('../../src/models/sqlite_adapter')
, chai = require('chai')
, expect = chai.expect
, chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
describe('MemoryStats', function() {
describe('.con... | davidcunha/wharf | test/models/memory_stats_test.js | JavaScript | mit | 848 |
package com.zs.leetcode.array;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class MergeIntervals {
public static void main(String[] args) {
}
public List<Interval> merge(List<Interval> intervals) {
List<Interval> list = new ... | zsgithub3895/common.code | src/com/zs/leetcode/array/MergeIntervals.java | Java | mit | 1,011 |
module.exports = {
resolve: {
alias: {
'vue': 'vue/dist/vue.js'
}
}
}
| ye-will/vue-factory | webpack.config.js | JavaScript | mit | 88 |
/**
* Created by kalle on 12.5.2014.
*/
/// <reference path="jquery.d.ts" />
var TheBall;
(function (TheBall) {
(function (Interface) {
(function (UI) {
var ResourceLocatedObject = (function () {
function ResourceLocatedObject(isJSONUrl, urlKey, onUpdate, boundToElements, boundTo... | abstractiondev/TheBallDeveloperExamples | WebTemplates/AdminTemplates/categoriesandcontent/assets/oiplib1.0/TheBall.Interface.UI/UpdatingDataGetter.js | JavaScript | mit | 4,578 |
package bixie.checker.transition_relation;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import bixie.boogie.controlflow.AbstractControlFlowFactory;
import bixie.boogie.controlflow.BasicBlock;
import bixie.boogie.controlflow.CfgProcedure;
import ... | SRI-CSL/bixie | src/main/java/bixie/checker/transition_relation/FaultLocalizationTransitionRelation.java | Java | mit | 5,883 |
package ru.ifmo.springaop.namepc;
import org.springframework.aop.Advisor;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.aop.support.NameMatchMethodPointcut;
import ru.ifmo.springaop.staticpc.SimpleAdvice;
/**
... | meefik/java-examples | SpringAOP/src/main/java/ru/ifmo/springaop/namepc/NamePointcutExample.java | Java | mit | 1,153 |
package fastlanestat
import (
"net/http"
"html/template"
// "fmt"
// Import appengine urlfetch package, that is needed to make http call to the api
"appengine"
"appengine/datastore"
)
type ViewContext struct {
PricePoints []PricePoint
}
func viewStatsHandler(w http.ResponseWriter, r... | ido-ran/fastlanestats | view.go | GO | mit | 881 |
// The MIT License (MIT)
// Copyright © 2015 AppsLandia. All rights reserved.
// 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
... | haducloc/appslandia-common | src/main/java/com/appslandia/common/base/BufferedWriter.java | Java | mit | 3,684 |
/**
* Copyright (c) 2010 Daniel Murphy
*
* 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, publ... | pearlqueen/java-simple-mvc | src/main/java/com/dmurph/mvc/gui/combo/MVCJComboBox.java | Java | mit | 10,703 |
<?php
/*
Unsafe sample
input : use exec to execute the script /tmp/tainted.php and store the output in $tainted
sanitize : regular expression accepts everything
construction : concatenation with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty f... | stivalet/PHP-Vulnerability-test-suite | Injection/CWE_90/unsafe/CWE_90__exec__func_preg_match-no_filtering__userByCN-concatenation_simple_quote.php | PHP | mit | 1,525 |
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Threading;
using System.Web.Mvc;
using WebMatrix.WebData;
using PersonaMVC4Example.Models;
namespace PersonaMVC4Example.Filters
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, I... | shanselman/AspNetPersonaId | MVC4/PersonaMVC4Example/Filters/InitializeSimpleMembershipAttribute.cs | C# | mit | 2,018 |
/*
* Copyright (c) 2013 Triforce - in association with the University of Pretoria and Epi-Use <Advance/>
*
* 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... | jwfwessels/AFK | src/afk/ge/tokyo/ems/systems/DebugRenderSystem.java | Java | mit | 6,629 |
<?php
require_once('vendor/autoload.php');
| thepsion5/menuizer | tests/bootstrap.php | PHP | mit | 45 |
# -*- encoding: utf-8 -*-
module XenAPI
module Network
def network_name_label(name_label)
self.network.get_by_name_label(name_label)
end
end
end
| locaweb/xenapi-ruby | lib/xenapi/network.rb | Ruby | mit | 163 |
package view.menuBar.workspace;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.JOptionPane;
import view.Constants;
import view.ViewController;
/**
* Class that reads in workspace preference files
*
* @author Lalita Maraj
* @author Su... | chinnychin19/CS308_Proj3 | src/view/menuBar/workspace/WorkSpacePreferenceReader.java | Java | mit | 1,836 |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package erp.cfd;
import java.io.Serializable;
/**
*
* @author Juan Barajas
*/
public final class SCfdiSignature implements Serializable {
private String msUuid;
private String msFechaTimbrado;
private ... | swaplicado/siie32 | src/erp/cfd/SCfdiSignature.java | Java | mit | 1,709 |
import traverse from "../lib";
import assert from "assert";
import { parse } from "babylon";
import * as t from "babel-types";
function getPath(code) {
const ast = parse(code, { plugins: ["flow", "asyncGenerators"] });
let path;
traverse(ast, {
Program: function (_path) {
path = _path;
_path.stop... | STRML/babel | packages/babel-traverse/test/inference.js | JavaScript | mit | 8,822 |
var Chartist = require('chartist');
module.exports = makePluginInstance;
makePluginInstance.calculateScaleFactor = calculateScaleFactor;
makePluginInstance.scaleValue = scaleValue;
function makePluginInstance(userOptions) {
var defaultOptions = {
dot: {
min: 8,
max: 10,
unit: 'px'
},
... | psalaets/chartist-plugin-scale-lines-and-dots | index.js | JavaScript | mit | 2,292 |
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | SpongePowered/Sponge | src/main/java/org/spongepowered/common/entity/ai/goal/SpongeGoalType.java | Java | mit | 1,809 |
exports.BattleStatuses = {
brn: {
effectType: 'Status',
onStart: function (target, source, sourceEffect) {
if (sourceEffect && sourceEffect.id === 'flameorb') {
this.add('-status', target, 'brn', '[from] item: Flame Orb');
return;
}
this.add('-status', target, 'brn');
},
onBasePower: function ... | nehoray181/pokemon | data/statuses.js | JavaScript | mit | 14,531 |
package com.example.profbola.bakingtime.provider;
import android.database.sqlite.SQLiteDatabase;
import com.example.profbola.bakingtime.provider.RecipeContract.IngredientEntry;
import static com.example.profbola.bakingtime.utils.RecipeConstants.IngredientDbHelperConstants.INGREDIENT_RECIPE_ID_IDX;
/**
* Created by... | Ehbraheem/Baking-Time | app/src/main/java/com/example/profbola/bakingtime/provider/IngredientDbHelper.java | Java | mit | 2,247 |
version https://git-lfs.github.com/spec/v1
oid sha256:5a4f668a21f7ea9a0b8ab69c0e5fec6461ab0f73f7836acd640fe43ea9919fcf
size 89408
| yogeshsaroya/new-cdnjs | ajax/libs/bacon.js/0.7.46/Bacon.js | JavaScript | mit | 130 |
<?php
namespace Sydes\L10n\Locales;
use Sydes\L10n\Locale;
use Sydes\L10n\Plural\Rule1;
class EuLocale extends Locale
{
use Rule1;
protected $isoCode = 'eu';
protected $englishName = 'Basque';
protected $nativeName = 'euskara';
protected $isRtl = false;
}
| sydes/framework | src/L10n/Locales/EuLocale.php | PHP | mit | 280 |
( function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
} ( function( $ ) {
$.ui = $.ui || {};
return $.ui.version = "1.12.1";
} ) );
/*!
* jQuery UI Widget 1... | malahinisolutions/verify | public/assets/jquery-ui/widgets/controlgroup-f525e8d53867db2d7a4e30c79b5d800b.js | JavaScript | mit | 28,612 |
<?php
/**
* TOP API: taobao.xhotel.rate.add request
*
* @author auto create
* @since 1.0, 2013-12-10 16:57:25
*/
class XhotelRateAddRequest
{
/**
* 额外服务-是否可以加床,1:不可以,2:可以
**/
private $addBed;
/**
* 额外服务-加床价格
**/
private $addBedPrice;
/**
* 币种(仅支持CNY)
**/
private $currencyCode;
/**
*... | allengaller/mazi-cms | web/doc/Resources/open/taobao/taobao-sdk-PHP-online_standard-20131210/top/request/XhotelRateAddRequest.php | PHP | mit | 3,443 |
import java.util.Iterator;
import java.util.NoSuchElementException;
@SuppressWarnings("unchecked")
public class RandomizedQueue<Item> implements Iterable<Item> {
private Item[] _arr;
private int _length = 0;
private void resize(int newLength) {
if (newLength > _arr.length) newLength = 2 * _arr.len... | hghwng/mooc-algs1 | 2/RandomizedQueue.java | Java | mit | 2,505 |
//
//#include "Mesure.h"
//
//Mesure *m;
//
//void setup()
//{
//
//}
//
//void loop()
//{
// m = new Mesure(13,20,4,4);
// m->addNote(Note_E,4,NOIR);
// m->addNote(Note_E,4,NOIR);
// m->addNote(Note_E,4,NOIR);
// m->addNote(Note_C,4,NOIR);
// m->play();
//
// m = new Mesure(13,20,4,4);
// m->addNot... | alexgus/libAudio | Mesure_test.cpp | C++ | mit | 1,521 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Cookies;
usi... | Useful-Software-Solutions-Ltd/PhantomRunnerAndSearchCrawlerHelper | SearchCrawlerHelper.Sample/Providers/ApplicationOAuthProvider.cs | C# | mit | 4,146 |
import * as types from '@/store/mutation-types';
export default {
namespaced: true,
state: {
type: 0,
catId: 0
},
getters: {
[types.STATE_INFO]: state => {
return state.type + 3;
}
}
}
| Tiny-Fendy/web-express | public/store/modules/m2/m3/index.js | JavaScript | mit | 204 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Microsoft.Dx.Wopi.Models
{
public class WopiHostCapabilities : IWopiHostCapabilities
{
public bool SupportsCobalt { get; set; }
public bool SupportsContainers { get; se... | apulliam/WOPIFramework | Microsoft.Dx.Wopi/Models/WopiHostCapabilities.cs | C# | mit | 991 |
package com.company;
import java.util.Scanner;
public class TrainingHallEquipment {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double budget = Double.parseDouble(scanner.nextLine());
int numberOfItems = Integer.parseInt(scanner.nextLine());
... | ivelin1936/Studing-SoftUni- | Programming Fundamentals/Basics-MoreExercises/src/com/company/TrainingHallEquipment.java | Java | mit | 1,209 |
document.observe('click', function(e, el) {
if (el = e.findElement('form a.add_nested_fields')) {
// Setup
var assoc = el.readAttribute('data-association'); // Name of child
var target = el.readAttribute('data-target');
var blueprint = $(el.readAttribute('data-blueprint-id'));
var cont... | Stellenticket/nested_form | vendor/assets/javascripts/prototype_nested_form.js | JavaScript | mit | 2,739 |