code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
'use strict';exports.__esModule = true;var _stringify = require('babel-runtime/core-js/json/stringify');var _stringify2 = _interopRequireDefault(_stringify);var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);var _possibleConstructorRetu... | JackPu/albums | App/user/controller/base.js | JavaScript | mit | 4,099 |
# Die Class 2: Arbitrary Symbols
# I worked on this challenge [by myself, with: ].
# I spent [#] hours on this challenge.
# Pseudocode
# Input: array of strings
# Output: random selection from the array
# Steps: initialize the die with a non-empty array
# define a method that finds the number of sides (strings in t... | schwartztal/phase-0 | week-6/die-2/my_solution.rb | Ruby | mit | 1,874 |
// +build !windows
package native
import "github.com/itchio/butler/endpoints/launch"
func handleUE4Prereqs(params launch.LauncherParams) error {
// nothing to worry about on non-windows platforms
return nil
}
| itchio/butler | endpoints/launch/launchers/native/ue4_prereqs_stub.go | GO | mit | 214 |
package com.ntlx.exception;
public class BoardNotFoundException extends KanbanException {
private static final long serialVersionUID = 1L;
private int boardId;
public BoardNotFoundException (int boardId) {
this.boardId = boardId;
}
public String getMessage() {
return "Board not found. (ID: " + boardId + ")";... | NautiluX/yukan | java_backend/src/main/java/com/ntlx/exception/BoardNotFoundException.java | Java | mit | 326 |
# coding: utf-8
require_relative 'wrapper_comparator'
module Comparability
module Comparators
class ReverseWrapperComparator < WrapperComparator
def compare(me, other)
reverse(wrapped_compare(me, other))
end
private
def reverse(comparison_result)
if comparison_result.n... | ippeiukai/comparability | lib/comparability/comparators/reverse_wrapper_comparator.rb | Ruby | mit | 461 |
<h2>Editing Tip</h2>
<br>
<?php echo render('admin/tips/_form'); ?>
<p>
<?php echo Html::anchor('admin/tips/view/'.$tip->id, 'View'); ?> |
<?php echo Html::anchor('admin/tips', 'Back'); ?></p>
| gudeg-united/mishAPP | fuel/app/views/admin/tips/edit.php | PHP | mit | 196 |
package com.hyh.arithmetic.skills;
import android.annotation.SuppressLint;
import java.util.ArrayList;
import java.util.List;
/**
* 规划了一份需求的技能清单 req_skills,并打算从备选人员名单 people 中选出些人组成一个「必要团队」
* ( 编号为 i 的备选人员 people[i] 含有一份该备选人员掌握的技能列表)。
* 所谓「必要团队」,就是在这个团队中,对于所需求的技能列表 req_skills 中列出的每项技能,团队中至少有一名成员已经掌握。
* 我们可以用每个人的... | EricHyh/FileDownloader | ArithmeticDemo/src/main/java/com/hyh/arithmetic/skills/Solution4.java | Java | mit | 4,599 |
// Generated by CoffeeScript 1.8.0
(function() {
var TaskSchema, mongoose;
mongoose = require('./mongoose');
TaskSchema = mongoose.Schema({
id: {
type: Number,
unique: true
},
title: {
type: String
},
url: {
type: String,
unique: true
},
status: {
... | youqingkui/fav-dailyzhihu2evernote | models/tasks.js | JavaScript | mit | 472 |
var mongoose = require('mongoose'),
_ = require('underscore'),
roomTokenizer = function(msg) {
var tokens = [];
tokens = tokens.concat(msg.content.split(' '));
tokens.push(msg.author);
return tokens;
};
exports.init = function(db) {
var EntitySchemaDefinition,
E... | vitoss/Corpo-Chat | service/lib/model/Message.js | JavaScript | mit | 1,286 |
import React, { PropTypes } from 'react'
import { Grid, Row, Col } from 'react-bootstrap'
import Sort from '../../components/Sort'
import ProjectFilterForm from '../../components/ProjectFilterForm'
import Search from '../../containers/Search'
import ProjectsDashboardStatContainer from '../../containers/ProjectsDashboar... | envisioning/tdb-storybook | src/pages/ProjectsDashboard/index.js | JavaScript | mit | 978 |
import _plotly_utils.basevalidators
class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="textfont", parent_name="scattersmith", **kwargs):
super(TextfontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | plotly/plotly.py | packages/python/plotly/plotly/validators/scattersmith/_textfont.py | Python | mit | 1,869 |
export default function mapNodesToColumns({
children = [],
columns = 1,
dimensions = [],
} = {}) {
let nodes = []
let heights = []
if (columns === 1) {
return children
}
// use dimensions to calculate the best column for each child
if (dimensions.length && dimensions.length === children.length) ... | novascreen/react-columns | src/mapNodesToColumns.js | JavaScript | mit | 811 |
/**
* @fileoverview enforce or disallow capitalization of the first letter of a comment
* @author Kevin Partington
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const... | Aladdin-ADD/eslint | lib/rules/capitalized-comments.js | JavaScript | mit | 10,861 |
namespace PythonSharp.Exceptions
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class AttributeError : Exception
{
public AttributeError(string message)
: base(message)
{
}
}
}
| ajlopez/PythonSharp | Src/PythonSharp/Exceptions/AttributeError.cs | C# | mit | 308 |
package iso20022
// Security that is a sub-set of an investment fund, and is governed by the same investment fund policy, eg, dividend option or valuation currency.
type FinancialInstrument11 struct {
// Unique and unambiguous identifier of a security, assigned under a formal or proprietary identification scheme.
I... | fgrid/iso20022 | FinancialInstrument11.go | GO | mit | 983 |
module.exports = {
FIREBASE_URL: 'https://amber-heat-<your-app>.firebaseio.com/',
TWITTER_KEY: '',
TWITTER_SECRET: '',
TWITTER_CALLBACK: process.env.TWITTER_CALLBACK || 'Twitter Callback Url'
}; | mikhailbartashevich/ngCarcass | server/config.js | JavaScript | mit | 199 |
/**
* @hidden
* @param a0
* @param a1
* @param a2
* @param a3
* @param a4
* @param a5
* @param a6
* @param a7
* @param b0
* @param b1
* @param b2
* @param b3
* @param b4
* @param b5
* @param b6
* @param b7
* @param index
* @returns
*/
export declare function extE3(a0: number, a1: number, a2: number,... | geometryzen/davinci-newton | build/module/lib/math/extE3.d.ts | TypeScript | mit | 501 |
require 'rails_helper'
describe SectionSevenController do
it { should respond_to(:index) }
end
| impact100/common-grant-application | spec/controllers/section_seven_controller_spec.rb | Ruby | mit | 98 |
/**
* Copyright (C) 2012 - 2014 Xeiam LLC http://xeiam.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 limitation the rights to
* use, copy,... | habibmasuro/XChange | xchange-justcoin/src/main/java/com/xeiam/xchange/justcoin/service/polling/JustcoinBasePollingService.java | Java | mit | 2,758 |
'use strict'
const _ = require('lodash')
module.exports = {
getQueryString(url) {
const qs = {}
_.forEach(url.split('?').pop().split('&'), s => {
if (!s) return
const kv = s.split('=')
if (kv[0]) {
qs[kv[0]] = decodeURIComponent(kv[1])
}
})
return qs
},
toQuerySt... | tmspnn/uic | src/util/helpers.js | JavaScript | mit | 554 |
/*
* This file is part of React, licensed under the MIT License (MIT).
*
* Copyright (c) 2013 Flow Powered <https://flowpowered.com/>
* Original ReactPhysics3D C++ library by Daniel Chappuis <http://danielchappuis.ch>
* React is re-licensed with permission from ReactPhysics3D author.
*
* Permission is hereby gra... | flow/react | src/main/java/com/flowpowered/react/collision/narrowphase/EPA/EPAAlgorithm.java | Java | mit | 18,355 |
using Microsoft.Xna.Framework;
namespace XmasHell.FSM
{
public struct FSMStateData<T>
{
public FSM<T> Machine { get; internal set; }
public FSMBehaviour<T> Behaviour { get; internal set; }
public T State { get; internal set; }
public GameTime GameTime { get; internal set; }
}
}
| Noxalus/Xmas-Hell | Xmas-Hell/Xmas-Hell-Core/FSM/FSMStateData.cs | C# | mit | 315 |
// --------------------------------------------------------------------------------------------
#region // Copyright (c) 2020, SIL International. All Rights Reserved.
// <copyright from='2011' to='2020' company='SIL International'>
// Copyright (c) 2020, SIL International. All Rights Reserved.
//
// Distributable und... | sillsdev/hearthis | src/HearThis/Script/IScripture.cs | C# | mit | 2,007 |
module CdnBacon
VERSION = "0.0.1"
end
| bjedrocha/cdn_bacon | lib/cdn_bacon/version.rb | Ruby | mit | 40 |
'use strict';
var eachAsync = require('each-async');
var onetime = require('onetime');
var arrify = require('arrify');
module.exports = function (hostnames, cb) {
cb = onetime(cb);
eachAsync(arrify(hostnames), function (hostname, i, next) {
var img = new Image();
img.onload = function () {
cb(true);
// ... | arthurvr/is-reachable | browser.js | JavaScript | mit | 506 |
<?php
class Ressource extends Thing {
var $name;
var $url;
var $schemaDefinition;
function __construct($url = null) {
if ($url) $this->url = $this->preparePath($url);
}
function preparePath($path) {
$path = str_replace(" ", "+", $path);
return $path;
}
function getFileName() {
if (strpos($this->re... | neuronalysis/engulfing-core | classes/EDI/Ressource.php | PHP | mit | 2,052 |
module Ldaptic
class Error < ::RuntimeError
end
class EntryNotSaved < Error
end
# All server errors are instances of this class. The error message and error
# code can be accessed with <tt>exception.message</tt> and
# <tt>exception.code</tt> respectively.
class ServerError < Error
attr_accessor ... | tpope/ldaptic | lib/ldaptic/errors.rb | Ruby | mit | 3,960 |
package org.broadinstitute.sting.utils.codecs.table;
import org.broad.tribble.Feature;
import org.broad.tribble.readers.LineReader;
import org.broadinstitute.sting.gatk.refdata.ReferenceDependentFeatureCodec;
import org.broadinstitute.sting.utils.GenomeLocParser;
import org.broadinstitute.sting.utils.exceptions.UserEx... | iontorrent/Torrent-Variant-Caller-stable | public/java/src/org/broadinstitute/sting/utils/codecs/table/TableCodec.java | Java | mit | 4,090 |
//IP Flow Information Export (IPFIX) Entities
// Last Updated 2013-01-15
// http://www.iana.org/assignments/ipfix/ipfix.xml
var entities = [];
//ipfix-information-elements
entities['elements'] = {
"1":{"name":"octetDeltaCount","dataType":"unsigned64","dataTypeSemantics":"deltaCounter","group":"flowCounter","units":"... | shaofis/Netflow | lib/ipfix.js | JavaScript | mit | 37,954 |
using System;
namespace Versioning
{
public class NominalData : Sage_Container, IData
{
/* Autogenerated by sage_wrapper_generator.pl */
SageDataObject110.NominalData nd11;
SageDataObject120.NominalData nd12;
SageDataObject130.NominalData nd13;
SageDataObject140.... | staafl/dotnet-bclext | to-integrate/libcs_staaflutil/Business/Versioning/Definitions/Data/NominalData.cs | C# | mit | 13,238 |
using AutoMapper;
using Bivi.Domaine;
using Bivi.FrontOffice.Web.ViewModels;
using Bivi.FrontOffice.Web.ViewModels.ModelBuilders;
using Bivi.FrontOffice.Web.ViewModels.Pages.Common;
using Bivi.Infrastructure.Attributes.Modularity;
using Bivi.Infrastructure.Constant;
using Bivi.Infrastructure.Services.Caching;
... | apo-j/Projects_Working | Bivi/src/Bivi.FrontOffice/Bivi.FrontOffice.Web.Controllers/Controllers/PlanDuSiteController.cs | C# | mit | 1,396 |
module Rentjuicer
class Response
attr_accessor :body
def initialize(response, raise_error = false)
rash_response(response)
raise Error.new(self.body.code, self.body.message) if !success? && raise_error
end
def success?
self.body && !self.body.blank? && self.body.respond_to?(:statu... | tcocca/rentjuicer | lib/rentjuicer/response.rb | Ruby | mit | 944 |
class CreateComments < ActiveRecord::Migration
def change
create_table :comments do |t|
t.references :post, index: true
t.integer :author_id
t.string :comment
t.timestamps
end
end
end
| morcov/socnet | db/migrate/20130906133507_create_comments.rb | Ruby | mit | 221 |
<?php
namespace TheCodingMachine\Yaco\Discovery;
use Interop\Container\ContainerInterface;
use Interop\Container\Factory\ContainerFactoryInterface;
use Puli\Discovery\Api\Discovery;
use Puli\Discovery\Binding\ClassBinding;
use Symfony\Component\Filesystem\Filesystem;
use TheCodingMachine\Yaco\Compiler;
/**
* A cla... | thecodingmachine/yaco-discovery | src/YacoFactory.php | PHP | mit | 2,891 |
from django.core import serializers
from rest_framework.response import Response
from django.http import JsonResponse
try:
from urllib import quote_plus # python 2
except:
pass
try:
from urllib.parse import quote_plus # python 3
except:
pass
from django.contrib import messages
from django.contrib.co... | our-iot-project-org/pingow-web-service | src/posts/views.py | Python | mit | 5,217 |
<?php
return array (
'id' => 'nokia_c7_00_ver1_subuaold_subu2k9',
'fallback' => 'nokia_c7_00_ver1_subuaold',
'capabilities' =>
array (
'mobile_browser' => 'UCWeb',
'mobile_browser_version' => '9',
),
);
| cuckata23/wurfl-data | data/nokia_c7_00_ver1_subuaold_subu2k9.php | PHP | mit | 222 |
package com.exilegl.ld34.entity.enemy;
import java.util.Random;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
... | some1epic123/Mr.-Dungeon-Aase-LD34- | LD34/src/com/exilegl/ld34/entity/enemy/EntityBullet.java | Java | mit | 6,144 |
import { Component, OnInit, Input } from '@angular/core';
import { ROUTER_DIRECTIVES } from '@angular/router';
import { PublishingItemsService, PublishingItem } from '../shared/index';
@Component({
moduleId: module.id,
selector: 'app-publish-card',
templateUrl: 'publish-card.component.html',
styleUrls: ['publi... | gallotamas/falcon | src/app/publish/publish-card/publish-card.component.ts | TypeScript | mit | 856 |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Split the input into chunks.
exports.default = (function (input, fail) {
var len = input.length;
var level = 0;
var parenLevel = 0;
var lastOpening;
var lastOpeningParen;
var lastMultiComment;
var lastMultiCommen... | lordtiago/linvs | node_modules/less/lib/less/parser/chunker.js | JavaScript | mit | 5,641 |
using MasterDevs.ChromeDevTools;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
namespace MasterDevs.ChromeDevTools.Protocol.Chrome.IndexedDB
{
/// <summary>
/// Enables events from backend.
/// </summary>
[Command(ProtocolName.IndexedDB.Enable)]
[SupportedBy("Chrome")]
public class Enabl... | MasterDevs/ChromeDevTools | source/ChromeDevTools/Protocol/Chrome/IndexedDB/EnableCommand.cs | C# | mit | 370 |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class music_switch : MonoBehaviour {
private AudioSource aud;
public AudioClip[] songs;
private int selection;
// Use this for initialization
void Start () {
aud = this.GetComponent<AudioSource> ();
selection = Random.Ran... | lheckle/SomethingSomethingTacos | EnemySpawnTest/Assets/Scripts/music_switch.cs | C# | mit | 541 |
from ..cw_model import CWModel
class Order(CWModel):
def __init__(self, json_dict=None):
self.id = None # (Integer)
self.company = None # *(CompanyReference)
self.contact = None # (ContactReference)
self.phone = None # (String)
self.phoneExt = None # (String... | joshuamsmith/ConnectPyse | sales/order.py | Python | mit | 1,974 |
package adts;
/**
* Interface that represents any music item. MusicSymbol and MusicPart extend
* this. Thus, a Music could be a MusicPiece, a Voice, a Chord, a Lyric, a
* Pitch, or a Rest. a The objects are immutable. The equals, toString, and
* hashCode methods work recursively and individually different fr... | zekedroid/ABC-Music-Player | src/adts/Music.java | Java | mit | 1,812 |
class ApplicationPolicy
attr_reader :user, :record
def initialize(user, record)
@user = user
@record = record
end
class Scope
attr_reader :user, :scope
def initialize(user, scope)
@user = user
@scope = scope
end
end
end
| jcpny1/recipe-cat | app/policies/application_policy.rb | Ruby | mit | 267 |
'use strict';
var isA = require("Espresso/oop").isA;
var oop = require("Espresso/oop").oop;
var init = require("Espresso/oop").init;
var trim = require("Espresso/trim").trim;
var isA = require("Espresso/oop").isA;
var oop = require("Espresso/oop").oop;
function RequestInterface(){
oop(this,"Espresso/Http/RequestIn... | quimsy/espresso | Http/RequestInterface.js | JavaScript | mit | 369 |
namespace AnimalLookupWebservice.Areas.HelpPage.ModelDescriptions
{
public class KeyValuePairModelDescription : ModelDescription
{
public ModelDescription KeyModelDescription { get; set; }
public ModelDescription ValueModelDescription { get; set; }
}
} | rohansen/Code-Examples | Web Development/Web Service Examples/AnimalLookupWebservice/AnimalLookupWebservice/Areas/HelpPage/ModelDescriptions/KeyValuePairModelDescription.cs | C# | mit | 281 |
module.exports = function(dataUri, maxDimension, callback){
var source = new Image();
source.addEventListener('load', function(){
var canvas = document.createElement('canvas'),
ratio = Math.max(source.width, source.height) / maxDimension;
canvas.width = source.width / ratio;
... | MauriceButler/resizeo | index.js | JavaScript | mit | 715 |
</script> <!--script end-->
</body> <!--body end-->
</html> <!--html end-->
| zhangbobell/reportv2 | application/views/templates/task_footer_final.php | PHP | mit | 103 |
// @flow
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import Middleware from './Middleware';
type Base = {
href?: string,
target?: string,
};
type Link = {
crossOrigin?: string,
href?: string,
hrefLang?: string,
integrity?: string,
media?: string,
preload?: bool... | michalkvasnicak/spust | packages/spust-koa/src/RenderApp.js | JavaScript | mit | 2,997 |
import {
RESOURCE,
SERVER_ERRORS,
INITIAL_STATE_WITH_CACHED_LIST,
INITIAL_STATE_WITH_LIST_BEING_FETCHED,
INITIAL_STATE_WITH_CACHED_AND_SELECTED_LIST,
} from '../mocks'
import { generateListResourceActions } from './mocks'
const request = () => Promise.resolve([RESOURCE])
const errorRequest = () => ... | travisbloom/redux-resources | src/actions/listResource.spec.js | JavaScript | mit | 2,626 |
// acquisition.hpp
#ifndef ACQUISITION_HPP
#define ACQUISITION_HPP
#include <QAbstractVideoBuffer>
#include <QAbstractVideoSurface>
#include <QList>
#include <QVideoFrame>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(visionAcquisitionLog)
class Acquisition : public QAbstractVideoSurface {
Q_OBJECT
... | derpicated/articated | source/vision/acquisition.hpp | C++ | mit | 608 |
/*
* The MIT License
* Copyright © 2014 Cube Island
*
* 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, modif... | CubeEngine/Modularity | core/src/main/java/de/cubeisland/engine/modularity/core/LifeCycle.java | Java | mit | 11,912 |
import { AppPage } from './app.po';
describe('material2 App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
});
});
| dylan-smith/pokerleaguemanager | spikes/Material2/e2e/app.e2e-spec.ts | TypeScript | mit | 291 |
package com.bugsnag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
/**
* If spring-webmv... | bugsnag/bugsnag-java | bugsnag-spring/src/main/java/com/bugsnag/MvcConfiguration.java | Java | mit | 1,039 |
import React, {Component} from 'react';
import MiniInfoBar from '../components/MiniInfoBar';
export default class About extends Component {
state = {
showKitten: false
}
handleToggleKitten() {
this.setState({showKitten: !this.state.showKitten});
}
render() {
const {showKitten} = this.state;
... | vbdoug/hot-react | src/views/About.js | JavaScript | mit | 1,598 |
package com.seafile.seadroid2.transfer;
/**
* Download state listener
*
*/
public interface DownloadStateListener {
void onFileDownloadProgress(int taskID);
void onFileDownloaded(int taskID);
void onFileDownloadFailed(int taskID);
}
| huangbop/seadroid-build | seadroid/src/main/java/com/seafile/seadroid2/transfer/DownloadStateListener.java | Java | mit | 249 |
package cn.javay.zheng.common.validator;
import com.baidu.unbiz.fluentvalidator.ValidationError;
import com.baidu.unbiz.fluentvalidator.Validator;
import com.baidu.unbiz.fluentvalidator.ValidatorContext;
import com.baidu.unbiz.fluentvalidator.ValidatorHandler;
/**
* 长度校验
* Created by shuzheng on 2017/2/18.
*/
publ... | javay/zheng-lite | zheng-common/src/main/java/cn/javay/zheng/common/validator/LengthValidator.java | Java | mit | 1,107 |
define([
"dojo/_base/array",
"dojo/_base/connect",
"dojo/_base/declare",
"dojo/_base/lang",
"dojo/_base/window",
"dojo/dom",
"dojo/dom-class",
"dojo/dom-construct",
"dojo/dom-style",
"dijit/registry",
"dijit/_Contained",
"dijit/_Container",
"dijit/_WidgetBase",
"./ProgressIndicator",
"./ToolBarButton",
... | aguadev/aguadev | html/dojo-1.8.3/dojox-1.9.0/mobile/Heading.js | JavaScript | mit | 7,774 |
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../..'
export const input = (
<editor>
<block>
<mark key="a">
<anchor />o
</mark>
n
<mark key="b">
e<focus />
</mark>
</block>
</editor>
)
export const run = editor => {
return Array.from(E... | isubastiCadmus/slate | packages/slate/test/queries/activeMarks/union.js | JavaScript | mit | 418 |
/**
* 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-access/src/main/java/ch/qos/logback/access/spi/AccessEvent.java | Java | mit | 14,592 |
package appalounge;
import org.json.JSONArray;
import org.json.JSONObject;
import resources.Constructors;
import resources.exceptions.ApiException;
import resources.exceptions.AuthRequiredException;
import resources.exceptions.BadRequestException;
import resources.exceptions.DataNotSetException;
import resources.infra... | vontell/EasyAPI | build/resources/main/appalounge/APPAAnnounce.java | Java | mit | 2,768 |
package com.carlisle.incubators.PopupWindow;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.carlisle.incubators.R;
/**
* Created by chengxin on 11/24/16.
*/
public class PopupWindowActivity extends AppCompa... | CarlisleChan/Incubators | app/src/main/java/com/carlisle/incubators/PopupWindow/PopupWindowActivity.java | Java | mit | 728 |
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Serenghetto::Application.initialize!
| randomm/serenghetto-server | config/environment.rb | Ruby | mit | 155 |
# Phusion Passenger - https://www.phusionpassenger.com/
# Copyright (c) 2010 Phusion Holding B.V.
#
# "Passenger", "Phusion Passenger" and "Union Station" are registered
# trademarks of Phusion Holding B.V.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and ass... | clemensg/passenger | src/ruby_supportlib/phusion_passenger/plugin.rb | Ruby | mit | 2,994 |
// ReSharper disable RedundantNameQualifier
// ReSharper disable InconsistentNaming
namespace Gu.Analyzers.Benchmarks.Benchmarks
{
public class GU0050IgnoreEventsWhenSerializingBenchmarks
{
private static readonly Gu.Roslyn.Asserts.Benchmark Benchmark = Gu.Roslyn.Asserts.Benchmark.Create(Code.AnalyzersP... | JohanLarsson/Gu.Analyzers | Gu.Analyzers.Benchmarks/Benchmarks/GU0050IgnoreEventsWhenSerializingBenchmarks.cs | C# | mit | 534 |
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2002,2008 Oracle. All rights reserved.
*
* $Id: EntityConverter.java,v 1.11 2008/01/07 14:28:58 cwl Exp $
*/
package com.sleepycat.persist.evolve;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
/**
* A... | plast-lab/DelphJ | examples/berkeleydb/com/sleepycat/persist/evolve/EntityConverter.java | Java | mit | 2,735 |
/*
* Popular Repositories
* Copyright (c) 2014 Alberto Congiu (@4lbertoC)
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
var React = require('react');
/**
* Like Array.map(), but on an object's own properties.
... | 4lbertoC/popularrepositories | src/components/layout/LanguageList.js | JavaScript | mit | 1,648 |
<?php
namespace Sitpac\ExtranetBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* DisponibilidadVehi
*
* @ORM\Table(name="disponibilidad_vehi")
* @ORM\Entity
*/
class DisponibilidadVehi
{
/**
* @var integer
*
* @ORM\Column(name="id_disp_vehi", type="integer", nullable=false)
* @ORM\Id... | jorgeibarra87/SITPAC | src/Sitpac/ExtranetBundle/Entity/DisponibilidadVehi.php | PHP | mit | 2,806 |
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\ResourceBundle;
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler... | Symfomany/Sylius | src/Sylius/Bundle/ResourceBundle/SyliusResourceBundle.php | PHP | mit | 976 |
package photoeffect.effect.otherblur;
import java.awt.image.BufferedImage;
import measure.generic.IGenericWorkload;
public interface IEffectOtherBlur extends IGenericWorkload<BufferedImage>
{
}
| wolfposd/jadexphoto | photoeffect/src/photoeffect/effect/otherblur/IEffectOtherBlur.java | Java | mit | 198 |
import Store from '../../Store';
import Expires from '../../Expires';
import { lpush } from '../lpush';
import { lpushx } from '../lpushx';
describe('Test lpushx command', () => {
it('should prepend values to list', () => {
const redis = new MockRedis();
redis.set('mylist', []);
expect((<any>redis).lpush... | nileshmali/ioredis-in-memory | src/commands/__tests__/lpushx.spec.ts | TypeScript | mit | 800 |
/**
* Reparse the Grunt command line options flags.
*
* Using the arguments parsing logic from Grunt:
* https://github.com/gruntjs/grunt/blob/master/lib/grunt/cli.js
*/
module.exports = function(grunt){
// Get the current Grunt CLI instance.
var nopt = require('nopt'),
parsedOptions = parseOptions(nopt, gru... | widgetworks/nopt-grunt-fix | index.js | JavaScript | mit | 1,652 |
module.exports = {
"name": "ATmega16HVB",
"timeout": 200,
"stabDelay": 100,
"cmdexeDelay": 25,
"syncLoops": 32,
"byteDelay": 0,
"pollIndex": 3,
"pollValue": 83,
"preDelay": 1,
"postDelay": 1,
"pgmEnable": [172, 83, 0, 0],
"erase": {
"cmd": [172, 128, 0, 0],
"delay": 45,
"pollMethod":... | noopkat/avrgirl-chips-json | atmega/atmega16hvb.js | JavaScript | mit | 1,112 |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DocAsCode.DataContracts.Common
{
using System;
using Newtonsoft.Json;
using YamlDotNet.Serialization;
using Microsoft.DocAsCode.Ut... | sergey-vershinin/docfx | src/Microsoft.DocAsCode.DataContracts.Common/SourceDetail.cs | C# | mit | 1,881 |
export function JavapParser(input: any): this;
export class JavapParser {
constructor(input: any);
_interp: any;
ruleNames: string[];
literalNames: (string | null)[];
symbolicNames: (string | null)[];
constructor: typeof JavapParser;
get atn(): any;
compilationUnit(): CompilationUnitCont... | wizawu/1c | dist/parser/javap/JavapParser.d.ts | TypeScript | mit | 15,534 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by Brian Nelson 2016. *
* See license in repo for more information *
* https://github.com/sharpHDF/sharpHDF *
* ... | sharpHDF/sharpHDF | src/sharpHDFTests/Objects/Hdf5AttributeTests.cs | C# | mit | 23,622 |
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
namespace UniversityStudents.Models
{
// You can add profile data for the user by adding more properties to your ApplicationUser class... | twabbott/FeralNerd | Projects/AspDemo/UniversityStudents/Models/IdentityModels.cs | C# | mit | 1,238 |
const express = require('express');
const app = express();
const path = require('path');
const userCtrl = require('./userCtrl.js');
//extra middleware
const bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({extended: true}), bodyParser.json());
app.use(express.static(path.join(__dirname, '../../node... | dbviews/dbview | src/server/server.js | JavaScript | mit | 814 |
package com.wjiec.learn.reordering;
public class SynchronizedThreading {
private int number = 0;
private boolean flag = false;
public synchronized void write() {
number = 1;
flag = true;
}
public synchronized int read() {
if (flag) {
return number * number;
... | JShadowMan/package | java/concurrency-arts/src/main/java/com/wjiec/learn/reordering/SynchronizedThreading.java | Java | mit | 357 |
<?php
namespace Torchbox\Thankq\Api;
class doContactInsert
{
/**
* @var esitWSdoContactInsertArgument $doContactInsertArgument
*/
protected $doContactInsertArgument = null;
/**
* @param esitWSdoContactInsertArgument $doContactInsertArgument
*/
public function __construct($doConta... | mrhorse/crm_api | lib/Api/doContactInsert.php | PHP | mit | 894 |
package eu.hgross.blaubot.android.views;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget... | Blaubot/Blaubot | blaubot-android/src/main/java/eu/hgross/blaubot/android/views/KingdomView.java | Java | mit | 6,132 |
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("17... | kalinmarkov/SoftUni | Programming Basic/ProgrammingBasic-EXAMS/17.July.02.Harvest/Properties/AssemblyInfo.cs | C# | mit | 1,412 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import zmq
from zmq.eventloop import ioloop as ioloop_mod
import zmqdecorators
import time
SERVICE_NAME = "urpobot.motor"
SERVICE_PORT = 7575
SIGNALS_PORT = 7576
# How long to wait for new commands before stopping automatically
COMMAND_GRACE_TIME = 0.250
class motorserv... | HelsinkiHacklab/urpobotti | python/motorctrl.py | Python | mit | 3,257 |
from rest_framework import serializers
from . import models
class Invoice(serializers.ModelSerializer):
class Meta:
model = models.Invoice
fields = (
'id', 'name', 'additional_infos', 'owner',
'creation_date', 'update_date',
)
| linovia/microinvoices | microinvoices/invoices/serializers.py | Python | mit | 281 |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
namespace Izzo.Collections.Immutable
{
[DebuggerDisplay( "Count = {Count}" )]
public sealed partial class ImmutableList<T> : IImmutableList<T>
{
public static readonly ImmutableList<T> Empty = new I... | SuperIzzo/Unity3D-Immutable-Collections | Assets/Collections/Immutable/ImmutableList_1.cs | C# | mit | 5,038 |
module Models
class TimeStamp
attr_accessor :sec
attr_accessor :usec
end
end | Ruhrpottpatriot/WarframeApi | app/api/models/time_stamp.rb | Ruby | mit | 88 |
class Users::SessionsController < Devise::SessionsController
layout :layout
def presign
end
def layout
if params[:no_layout].present?
return false
else
return 'user'
end
end
end
| sleepinglion/anti-kb | app/controllers/users/sessions_controller.rb | Ruby | mit | 215 |
exports.find = function(options) {
options || (options = {});
options.param || (options.param = 'query');
options.parse || (options.parse = JSON.parse);
return function(req, res, next) {
var query = req.query[options.param];
var conditions = query ? options.parse(query) : {};
re... | scttnlsn/emt | lib/query.js | JavaScript | mit | 2,776 |
// MooTools: the javascript framework.
// Load this file's selection again by visiting: http://mootools.net/more/f0c28d76aff2f0ba12270c81dc5e8d18
// Or build this file again with packager using: packager build More/Assets More/Hash.Cookie
/*
---
script: More.js
name: More
description: MooTools More
license: MIT-st... | donatj/CorpusPHP | Source/js/mootools.more.js | JavaScript | mit | 7,181 |
"""Basic thermodynamic calculations for pickaxe."""
from typing import Union
import pint
from equilibrator_api import (
Q_,
ComponentContribution,
Reaction,
default_physiological_ionic_strength,
default_physiological_p_h,
default_physiological_p_mg,
default_physiological_temperature,
)
fro... | JamesJeffryes/MINE-Database | minedatabase/thermodynamics.py | Python | mit | 11,041 |
// MIT License
// Copyright (c) 2017 Simon Pettersson
// 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... | simonvpe/cmap | include/cmap.hpp | C++ | mit | 5,268 |
import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ _____ | ||
|| | | | | | / \ / ___| |/ / ... | Yadnyawalkya/hackRIT | hackRIT.py | Python | mit | 3,140 |
package fi.helsinki.cs.okkopa.main.stage;
import fi.helsinki.cs.okkopa.mail.read.EmailRead;
import fi.helsinki.cs.okkopa.main.ExceptionLogger;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import javax.mail.Message;
import javax.mail.MessagingException;
import org.apache.commons.io.IOU... | ohtuprojekti/OKKoPa_all | OKKoPa_core/src/main/java/fi/helsinki/cs/okkopa/main/stage/GetEmailStage.java | Java | mit | 2,409 |
import codecs
unicode_string = "Hello Python 3 String"
bytes_object = b"Hello Python 3 Bytes"
print(unicode_string, type(unicode_string))
print(bytes_object, type(bytes_object))
#decode to unicode_string
ux = str(object=bytes_object, encoding="utf-8", errors="strict")
print(ux, type(ux))
ux = bytes_object.dec... | thedemz/python-gems | bitten.py | Python | mit | 978 |
package simple.practice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import simple.practice.service.GreetingService;
@Component
public class Greeting {
@Autowired
private GreetingService greetingService;
public String printGreeting(String name... | blackphenol/SimpleSpring | src/main/java/simple/practice/Greeting.java | Java | mit | 438 |
"""Class to perform random over-sampling."""
# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>
# Christos Aridas
# License: MIT
from collections.abc import Mapping
from numbers import Real
import numpy as np
from scipy import sparse
from sklearn.utils import check_array, check_random_state
from sklear... | scikit-learn-contrib/imbalanced-learn | imblearn/over_sampling/_random_over_sampler.py | Python | mit | 9,497 |
# Source Generated with Decompyle++
# File: session_recording.pyc (Python 2.5)
from __future__ import absolute_import
from pushbase.session_recording_component import FixedLengthSessionRecordingComponent
class SessionRecordingComponent(FixedLengthSessionRecordingComponent):
def __init__(self, *a, **k):
... | phatblat/AbletonLiveMIDIRemoteScripts | Push2/session_recording.py | Python | mit | 842 |
# Generated by Django 2.1 on 2018-08-26 00:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('model_filefields_example', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='book',
name='cover',
... | victor-o-silva/db_file_storage | demo_and_tests/model_filefields_example/migrations/0002_auto_20180826_0054.py | Python | mit | 1,197 |
require 'active_service/model/attributes/nested_attributes'
require 'active_service/model/attributes/attribute_map'
require 'active_service/model/attributes/serializer'
module ActiveService
module Model
# This module handles attribute methods not provided by ActiveAttr
module Attributes
extend ActiveSu... | zacharywelch/activeservice | lib/active_service/model/attributes.rb | Ruby | mit | 6,526 |
require 'corelib/numeric'
require 'corelib/rational/base'
class ::Rational < ::Numeric
def self.reduce(num, den)
num = num.to_i
den = den.to_i
if den == 0
::Kernel.raise ::ZeroDivisionError, 'divided by 0'
elsif den < 0
num = -num
den = -den
elsif den == 1
return new(num,... | opal/opal | opal/corelib/rational.rb | Ruby | mit | 7,210 |