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 |
|---|---|---|---|---|---|
(function( window, $, undefined ) {
// http://www.netcu.de/jquery-touchwipe-iphone-ipad-library
$.fn.touchwipe = function(settings) {
var config = {
min_move_x: 20,
min_move_y: 20,
wipeLeft: function() { },
wipeRight: function() { },
wipeUp: function() { },
wipeDown: function() { },
pr... | LechDutkiewicz/serfenta_theme | lib/extensions/rg-gallery/jquery.elastislide.js | JavaScript | mit | 13,063 |
#include "test2D.hpp"
namespace boom {
namespace test2d {
MonoPolygon::MonoPolygon(DistV&& dL, DistV&& dR, const Vec2& ori, const Vec2& dir, float wofs):
_vOrigin(ori),
_vDir(dir),
_distL(std::move(dL)),
_distR(std::move(dR)),
_widthOffset(wofs)
{}
MonoPolygon MonoPolygon::Random(const FRandF& rf... | degarashi/boomstick | tests/monopolygon.cpp | C++ | mit | 3,121 |
<?php
/*
* This file is part of AppBundle the package.
*
* (c) Ruslan Muriev <muriev.r@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RonteLtd\JsonApiBundle\Serializer\Normalizer;
use Doctrine\Common\Collect... | ronte-ltd/JsonApiBundle | Serializer/Normalizer/Collection.php | PHP | mit | 1,811 |
// $flavio.lisboa @ 2017-09-04.
//
/*
* @file basic_octdiff_cons.hpp
*/
#ifndef adl__oct__cons__basic_octdiff_cons__hpp__
#define adl__oct__cons__basic_octdiff_cons__hpp__
#include <type_traits>
#include <string>
#include <iosfwd>
#include <stdexcept>
#include "adl.cfg.hpp"
#include "adl/oct.fwd.hpp"
#include "adl... | flisboac/adl | include/adl/oct/cons/basic_octdiff_cons.hpp | C++ | mit | 10,062 |
#!/usr/bin/env node
var _ = require('lodash');
var async = require('async-chainable');
var asyncFlush = require('async-chainable-flush');
var colors = require('chalk');
var doop = require('.');
var glob = require('glob');
var fs = require('fs');
var fspath = require('path');
var program = require('commander');
var sha... | MomsFriendlyDevCo/doop-cli | doop-list.js | JavaScript | mit | 5,758 |
#include "NoReturnFunctionExtractionValidator.hpp"
#include <cppmanip/boundary/ExtractMethodError.hpp>
#include <boost/range/adaptor/transformed.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/range/algorithm_ext/push_back.hpp>
#include <boost/range/algorithm/sort.hpp>
namespace cppmanip
{
namespace
{... | rafalprzywarski/libcppmanip | library/src/cppmanip/NoReturnFunctionExtractionValidator.cpp | C++ | mit | 1,135 |
<?php
namespace DomainBundle\Entity\Super;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\MappedSuperclass
*/
abstract class IntegerID extends Entity
{
/**
* @var int
*
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id = null;
pub... | sugatov/web-pms | src/DomainBundle/Entity/Super/IntegerID.php | PHP | mit | 528 |
if(!Hummingbird) { var Hummingbird = {}; }
Hummingbird.Base = function() {};
Hummingbird.Base.prototype = {
validMessageCount: 0,
messageRate: 20,
initialize: function() {
this.averageLog = [];
this.setFilter();
this.registerHandler();
},
registerHandler: function() {
this.socket.registe... | mikejihbe/hummingbird | public/js/widgets/base.js | JavaScript | mit | 1,907 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.github.sunnybat.paxchecker.setup.email;
import com.github.sunnybat.commoncode.email.EmailAddress;
import com.github.sunnyb... | SunnyBat/PAXChecker | src/main/java/com/github/sunnybat/paxchecker/setup/email/EmailSetupGUI.java | Java | mit | 22,577 |
#include "PSF.h"
#include "Utils.h"
#include <cassert>
#include <iostream>
#include <fstream>
using namespace std;
using namespace arma;
PSF::PSF(int size)
:size(size)
,pixels(size, vector<double>(size, 0.))
,fft_ready(false)
{
assert(size%2 == 1);
pixels[size/2][size/2] = 1.;
}
void PSF::set_size(int new_size)
{
... | eggplantbren/TwinPeaks3 | Code/C++/Models/PSF.cpp | C++ | mit | 3,180 |
define([
'knockout'
],function(
ko
){
ko.bindingHandlers.withfirst = {
'init' : function(element, valueAccessor, allBindings, viewModel, bindingContext) {
var savedNodes;
ko.computed(function() {
var dataValue = ko.utils.unwrapObservable(valueAccessor());
var shouldDisplay = typeof... | ssddi456/ko_custom_bindings | ko.withfirst.js | JavaScript | mit | 1,190 |
var bunyanConfig = require('../index');
var bunyan = require('bunyan');
var path = require('path');
describe('bunyan-config', function () {
it('should not convert things it does not understand', function () {
bunyanConfig({
name: 'test',
streams: [{
path: '/tmp/log.l... | LSEducation/bunyan-config | test/bunyanConfig.test.js | JavaScript | mit | 5,253 |
/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
package org.cfeclipse.cfml.parser.cfscript;
/**
* This exception is thrown when parse errors are encountered.
* You can explicitly create objects of this exception type by
* calling the method generateParseException in the generat... | cybersonic/org.cfeclipse.cfml | src/org/cfeclipse/cfml/parser/cfscript/ParseException.java | Java | mit | 6,569 |
'use strict';
var http = require('http');
var Logger = require('bunyan');
var log = new Logger({
name: 'test-server',
level: 'debug'
});
var server = http.createServer(function (request) {
var data = '';
log.info({ url: request.url }, 'Incoming Request');
request.on('data', function (chunk) {
... | timemachine3030/jenkman | test/test-server-errors.js | JavaScript | mit | 476 |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.23 at 08:... | r24mille/IesoPublicReportBindings | src/main/java/ca/ieso/reports/schema/iomspublicplannedoutageday/ConfidentialityClass.java | Java | mit | 1,298 |
#include "uritests.h"
#include "../guiutil.h"
#include "../walletmodel.h"
#include <QUrl>
void URITests::uriTests()
{
SendCoinsRecipient rv;
QUrl uri;
uri.setUrl(QString("mehcoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?req-dontexist="));
QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv));
uri.setUrl(QString... | bitmagnet/mehcoin | src/qt/test/uritests.cpp | C++ | mit | 2,842 |
#region licence
// =====================================================
// EfSchemeCompare Project - project to compare EF schema to SQL schema
// Filename: DbUpRunner.cs
// Date Created: 2016/04/06
//
// Under the MIT License (MIT)
//
// Written by Jon Smith : GitHub JonPSmith, www.thereformedprogrammer.net
// ===... | JonPSmith/EfSchemaCompare | DbUpHelper/DbUpRunner.cs | C# | mit | 1,582 |
#include "PrimitiveBatch.h"
#include "onut.h"
namespace onut
{
PrimitiveBatch::PrimitiveBatch()
{
// Create a white texture for rendering "without" texture
unsigned char white[4] = {255, 255, 255, 255};
m_pTexWhite = Texture::createFromData({1, 1}, white, false);
auto pDevice =... | Daivuk/ggj16 | onut/src/PrimitiveBatch.cpp | C++ | mit | 4,307 |
//
// File: GameController.cpp
// Class: GameController
// Author: John Barbero Unenge
// All code is my own except where credited to others.
//
// Copyright (c) 2012 Catch22. All Rights Reserved.
//
// Date: 24/9/12
//
// License: The following code is licensed under the Catch22-License
//
#include "Ga... | JBarberU/CatchLib | src/Controller/GameController.cpp | C++ | mit | 2,744 |
namespace DrinkAndRate.Web.User
{
using DrinkAndRate.Data;
using DrinkAndRate.Models;
using System;
using System.Linq;
using System.Web;
using System.Web.UI;
public partial class EventCreate : BaseUserPage
{
private IDrinkAndRateData data;
protected void P... | AynRandTelerik/DrinkAndRate | DrinkAndRate.Web/User/EventCreate.aspx.cs | C# | mit | 2,328 |
<?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Monolog\Handler;
use Monolog\TestCase;
use Monolog\Logger;
/**
* @cover... | Amaire/filmy | vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php | PHP | mit | 741 |
using BenchmarkDotNet.Attributes;
using Obj2ObjMapBench.Models;
using System.Collections.Generic;
using System.Linq;
namespace Obj2ObjMapBench
{
public abstract class BaseBenchmark
{
const int iterations = 10000;
protected IEnumerable<SimplePoco> _simpleData;
protected IEnumerable<Nes... | lusocoding/dotnet-objmap-benchmark | Obj2ObjMapBench/Benchmarks/BaseBenchmark.cs | C# | mit | 2,686 |
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
addFavorite() {
this.sendAction('addFavorite', this.get('newFavorite'));
}
}
});
| fostertheweb/kappa-client | app/components/add-channel-form.js | JavaScript | mit | 178 |
<?php
namespace UserBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Security\Core\User\UserInterface;
use Doctrine\ORM\Mapping as ORM;
/**
* Class User
* @package UserBundle\Entity
* @ORM\Entity(repositoryClass="\UserBundle\Entity\Repository\UserRepository")
* @ORM\Table(name... | moroztaras/symfony_blog.dev | src/UserBundle/Entity/User.php | PHP | mit | 6,624 |
package sprites;
public class Enemy extends Paddle
{
public Enemy(int x, int y)
{
super(x,y);
}
int updateFrameCounter = 0;
float moveDirection = 0;
public void update(float dt, Ball ball)
{
//if(++updateFrameCounter%3==0)
//{
updateFrameCounter = 0;
if(position.y < ball.position.y)
move... | lightofanima/GameDevelopmentTutorial | Pong/core/src/sprites/Enemy.java | Java | mit | 564 |
namespace StreetPacMan.Server
{
public class InitialApple
{
public AppleKind Type = AppleKind.Normal;
public double Lon;
public double Lat;
public override string ToString()
{
return string.Format("{0} apple at ({1}, {2})", Type, Lat, Lon);
}
}
} | QuickUnit/PacmanTlv | StreetPacMan.Server/InitialApple.cs | C# | mit | 322 |
'''
Created on Nov 19, 2011
@author: scottporter
'''
class BaseSingleton(object):
_instance = None
@classmethod
def get_instance(cls):
if cls._instance is None:
cls._instance = cls()
return cls._instance | freneticmonkey/epsilonc | resources/scripts/core/basesingleton.py | Python | mit | 263 |
(function ($) {
'use strict';
// Device check for limiting resize handling.
var IS_DEVICE = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
function FullHeight(el, options) {
this.el = $(el);
var data = {};
$.each(this.el.data(), function (attr, value) {
if (... | yrkup3/jquery-fullheight | src/jquery-fullheight.js | JavaScript | mit | 2,998 |
require 'spec_helper'
require 'rspec'
require 'active_model'
class RegonBastard
include ActiveModel::Validations
attr_accessor :regon
validates :regon, :presence => true, :regon => true
end
describe RegonValidator do
before :each do
@model = RegonBastard.new
end
it "should be valid" do
@model.s... | zaiste/valideez | spec/regon_validator_spec.rb | Ruby | mit | 829 |
<?php
namespace Modules\Dynamicfield\Composers;
use Illuminate\Contracts\View\View;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
use Modules\Dynamicfield\Utility\DynamicFields;
use Request;
use Route;
class FrontendViewComposer
{
/**
* @param View $view
*/
public function compose(Vi... | stone-lab/Dynamicfield | Composers/FrontendViewComposer.php | PHP | mit | 1,619 |
<?php
use Beanbun\Beanbun;
use JonnyW\PhantomJs\Client;
require_once(__DIR__ . '/vendor/autoload.php');
$beanbun = new Beanbun;
$beanbun->name = 'phantom';
$beanbun->count = 5;
$beanbun->interval = 2;
$beanbun->timeout = 10;
$beanbun->seed = [
'https://www.zhihu.com/question/23660494',
'https://www.zhihu.com/... | kiddyuchina/Beanbun | examples/phantomjs.php | PHP | mit | 1,249 |
/**
* Copyright (c) 2013-2014 Quentin Smetz <qsmetz@gmail.com>, Sebastien
* Jodogne <s.jodogne@gmail.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, inclu... | npettiaux/orthanc-viewer | Code/Model/ViewConfiguration.cpp | C++ | mit | 2,158 |
module Andrake::Generator
autoload :Rakefile, 'andrake/generator/rakefile'
end
| masarakki/andrake | lib/andrake/generator.rb | Ruby | mit | 81 |
<?php
function old_width($left, $right) {
$width = 540;
if (!$left ) {
$width = $width +190;
}
if (!$right) {
$width = $width +190;
}
return $width;
}
/**
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
* @return a string conta... | thomasturnbull/nycwhisky-angular | app/sites/nycwhisky.com/themes/old/template.php | PHP | mit | 628 |
using System;
namespace RecoTwAPI
{
[Serializable]
public class RecoTwException : Exception
{
public RecoTwException(ErrorCollection errors)
{
this.Errors = errors;
}
public ErrorCollection Errors { get; set; }
}
}
| atst1996/RecoTwAPI | RecoTwException.cs | C# | mit | 235 |
var _ = require('lodash'),
restify = require('restify'),
async = require('async');
module.exports = function(settings, server, db){
var globalLogger = require(settings.path.root('logger'));
var auth = require(settings.path.lib('auth'))(settings, db);
var api = require(settings.path.lib('api'))(se... | prokilogrammer/keet | routes.js | JavaScript | mit | 4,425 |
using Ghost.Server.Mgrs.Map;
using PNetR;
using System;
using System.Numerics;
namespace Ghost.Server.Utilities.Abstracts
{
public abstract class CreatureObject : WorldObject
{
protected bool _dead;
protected StatsMgr _stats;
protected NetworkView _view;
protected MovementGener... | Ignis34Rus/LoE-Ghost.Server | Ghost.Server/Utilities/Abstracts/CreatureObject.cs | C# | mit | 2,904 |
/*******************************************************************************
* Manchester Centre for Integrative Systems Biology
* University of Manchester
* Manchester M1 7ND
* United Kingdom
*
* Copyright (C) 2008 University of Manchester
*
* This program is released under the Academic Free License ("AF... | mcisb/SuBliMinaLToolbox | src/main/java/org/mcisb/subliminal/metacyc/MetaCycExtracter.java | Java | mit | 7,913 |
'use strict';
/**
* @ngdoc directive
* @name SubSnoopApp.directive:pieChart
* @description
* # pieChart
*/
angular.module('SubSnoopApp')
.directive('donutChart', ['d3Service', '$window', '$document', 'subFactory', '$filter', 'moment', 'sentiMood', 'reaction',
function (d3Service, $window, $document, subFact... | sharibarboza/SubSnoop | app/scripts/directives/donutchart.js | JavaScript | mit | 14,247 |
package com.stuffwithstuff.magpie.interpreter.builtin;
import com.stuffwithstuff.magpie.interpreter.Interpreter;
import com.stuffwithstuff.magpie.interpreter.Obj;
public interface BuiltInCallable {
Obj invoke(Interpreter interpreter, Obj thisObj, Obj arg);
}
| munificent/magpie-optionally-typed | src/com/stuffwithstuff/magpie/interpreter/builtin/BuiltInCallable.java | Java | mit | 263 |
class UserAgentsController < ApplicationController
before_action :set_user_agent, only: [:show, :update, :destroy]
# GET /user_agents
# GET /user_agents.json
def index
@user_agents = UserAgent.all
render json: @user_agents
end
# GET /user_agents/1
# GET /user_agents/1.json
def show
render... | deangiberson/myWakatimeApi | app/controllers/user_agents_controller.rb | Ruby | mit | 1,286 |
module RotpRails
VERSION = '0.0.1'
end
| steakknife/rotp_rails | lib/rotp_rails/version.rb | Ruby | mit | 41 |
"""Device tracker for Synology SRM routers."""
from __future__ import annotations
import logging
import synology_srm
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA as DEVICE_TRACKER_PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.const import (... | rohitranjan1991/home-assistant | homeassistant/components/synology_srm/device_tracker.py | Python | mit | 4,397 |
import * as _ from 'lodash';
import { data } from './data';
import { extendFramework } from './extendedFramework';
// Note: nugetTarget is empty for the XBox framework.
export const processedData = data
.filter(p => p.nugetTarget)
.map(p => ({
...p,
frameworks: p.frameworks.map(extendFramework... | StephenClearyApps/pcltargets | src/logic/processedData.ts | TypeScript | mit | 331 |
// Description:
// There are two lists of different length. The first one consists of keys,
// the second one consists of values. Write a function
//createDict(keys, values) that returns a dictionary created from keys and
// values. If there are not enough values, the rest of keys should have a
//None (JS null)value... | kanor1306/scrapyard | CodeWars Katas/7kyu/DictionaryTwoLists.js | JavaScript | mit | 832 |
"use strict";
const { ParserError } = require("../util/errors");
const yaml = require("js-yaml");
module.exports = {
/**
* The order that this parser will run, in relation to other parsers.
*
* @type {number}
*/
order: 200,
/**
* Whether to allow "empty" files. This includes zero-byte files, as ... | BigstickCarpet/json-schema-ref-parser | lib/parsers/yaml.js | JavaScript | mit | 1,730 |
package lol4j.protocol.dto.champion;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* Created by Aaron Corley on 12/10/13.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ChampionDto {
private boolean active;
private boolean botEnabled;
private boolean botMmEnabled;
pr... | aaryn101/lol4j | src/main/java/lol4j/protocol/dto/champion/ChampionDto.java | Java | mit | 1,387 |
<?php
if (! function_exists('array_set_defaults')) {
/**
* Set default key => value in an array, it's useful to prevent unseted array keys
* but you'd use that in next code.
*
* @param array $field An array that will recieve default key
* @param array $defaults Array of keys... | projek-xyz/ci-common | mod/helpers/App_array_helper.php | PHP | mit | 902 |
package pl.garciapl.banknow.service;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.List;
import pl.garciapl.banknow.model.Transaction;
import pl.garciapl.banknow.service.exceptions.GenericBankNowException;
import pl.garciapl.banknow.service.exceptions.InsufficientFundsException;
/**
* Tr... | GarciaPL/BankNow | src/main/java/pl/garciapl/banknow/service/TransactionService.java | Java | mit | 703 |
define([
'jquery',
'underscore',
'backbone',
'collections/users/students',
'collections/users/classes',
'collections/users/streams',
'text!templates/students/studentnew.html',
'text!templates/students/classes.html',
'text!templates/students/streams.html',
'jqueryui',
'bootstrap'
], function($, _, Backbone, ... | geoffreybans/student-is | public/js/views/students/studentnew.js | JavaScript | mit | 3,985 |
<?php
namespace Gsandbox\Action;
use Gsandbox\Model\DataRetrievalPolicy;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
class GetDataRetrievalPolicyAction
{
public function __invoke(Request $req, Response $res, $args = [])
{
$policy = new D... | sebcode/gsandbox | src/Action/GetDataRetrievalPolicyAction.php | PHP | mit | 457 |
<?php
/* Smarty version 3.1.28, created on 2016-04-29 19:20:04
from "C:\xampp\htdocs\monitoring\application\views\admin\parent\list.tpl" */
if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
'has_nocache_code' => false,
'version' => '3.1.28',
'unifunc' => 'content_572397c4... | uzumakitensho/simongarsis | application/third_party/smarty/templates_c/323cb364cb7db1b3e0e77127bc5abfbab64cb3f3_0.file.list.tpl.php | PHP | mit | 5,965 |
<?php
/**
* (c) Vespolina Project http://www.vespolina-project.org
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Vespolina\CommerceBundle\Process;
use Symfony\Component\DependencyInjection\ContainerAware;
/**
* @author Daniel Kucha... | vespolina/VespolinaCommerceBundle | Process/ProcessManager.php | PHP | mit | 2,761 |
require "erubis"
module Sliar
class Controller
def initialize(env)
@env = env
end
def env
@env
end
def render(view_name, locales = {})
filename = File.join("app","views", controller_name, "#{view_name}.html.erb")
template = File.read filename
eruby = Erubis::Eruby.... | joeltaylor/Sliar | lib/sliar/controller.rb | Ruby | mit | 536 |
<?php
namespace Oro\Bundle\WorkflowBundle\Tests\Unit\Acl\Extension;
use Oro\Bundle\WorkflowBundle\Acl\Extension\WorkflowMaskBuilder;
class WorkflowMaskBuilderTest extends \PHPUnit\Framework\TestCase
{
public function testViewWorkflowGroup()
{
$this->assertEquals(
WorkflowMaskBuilder::GROU... | orocrm/platform | src/Oro/Bundle/WorkflowBundle/Tests/Unit/Acl/Extension/WorkflowMaskBuilderTest.php | PHP | mit | 6,731 |
package eg.utils;
import java.io.File;
import java.awt.Toolkit;
/**
* Static system properties
*/
public class SystemParams {
/**
* True if the OS is Windows, false otherwise */
public static final boolean IS_WINDOWS;
/**
* The Java version */
public static final String JAVA_VERSION;
/**
... | Eadgyth/Java-Programming-Editor | src/eg/utils/SystemParams.java | Java | mit | 1,846 |
// Copyright (c) DotSpatial Team. All rights reserved.
// Licensed under the MIT license. See License.txt file in the project root for full license information.
// ORIGINAL HEADER FROM C++ source which was converted to C# by Ted Dunsford 2/24/2010
/******************************************************************... | CGX-GROUP/DotSpatial | Source/DotSpatial.Data/HfaType.cs | C# | mit | 12,977 |
var express = require('express');
var user = require('../model/user');
var jsonReturn = require('../common/jsonReturn');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
user.getUsers(function(err, rows, fields){
res.render('users', { users : rows } );
})
});
... | Justinidlerz/react-and-express | controller/users.js | JavaScript | mit | 535 |
# This is a user's notification settings, really. Might have been a better name for this, in retrospect.
class Notification < ActiveRecord::Base
belongs_to :user
has_many :pending_notifications
belongs_to :reply_to_comment, :foreign_key => :reply_to_comment,
:class_name => 'NotificationFrequency'
belongs_t... | DanielZhangQingLong/eol4 | app/models/notification.rb | Ruby | mit | 4,227 |
/* Generated by ../bin/opendds_idl version 3.6 (ACE version 6.2a_p7) running on input file DdsDcpsInfoUtils.idl*/
#include "DCPS/DdsDcps_pch.h"
#include "DdsDcpsInfoUtilsTypeSupportImpl.h"
#include <cstring>
#include <stdexcept>
#include "dds/DCPS/FilterEvaluator.h"
#include "dds/CorbaSeq/OctetSeqTypeSupportImpl.h"
#i... | binary42/OCI | dds/DdsDcpsInfoUtilsTypeSupportImpl.cpp | C++ | mit | 38,722 |
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Dynamic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runt... | rlyczynski/XSerializer | XSerializer/SerializationExtensions.cs | C# | mit | 39,564 |
'''
utils.py: helper functions for DLP api
Copyright (c) 2017 Vanessa Sochat
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, ... | radinformatics/som-tools | som/api/google/dlp/utils.py | Python | mit | 1,944 |
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.log... | UCT-White-Lab/provisioning-jig | fw_update/ST_decrypt.java | Java | mit | 22,664 |
import { createAction } from 'redux-actions';
import { APP_LAYOUT_CHANGE, APP_LAYOUT_INIT } from './constants';
// 选中菜单列表项
const appLayoutInit = createAction(APP_LAYOUT_INIT);
export const onAppLayoutInit = (key) => {
return (dispatch) => {
dispatch(appLayoutInit(key));
};
};
const appLayoutChange = createAct... | dunwu/react-app | codes/src/view/general/setting/redux/actions.js | JavaScript | mit | 471 |
using TORSHIA.App.Models.Binding;
using TORSHIA.Domain;
namespace TORSHIA.Services.Contracts
{
public interface IUsersService
{
void CreateUser(RegisterUserBindingModel registerUserBindingModel);
User GetUserByUsername(string username);
}
}
| MihailDobrev/SoftUni | C# Web/C# Web Development Basics/Exam Preparation II - Mish Mash/Apps/TORSHIA.Services/Contracts/IUsersService.cs | C# | mit | 274 |
/**
* Copyright (c) 2013 Andre Ricardo Schaffer
*
* 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, me... | wiselenium/wiselenium | wiselenium-elements/src/main/java/com/github/wiselenium/elements/component/MultiSelect.java | Java | mit | 4,862 |
<?php
namespace Kendo\Dataviz\UI;
class DiagramShapeDefaultsConnectorDefaultsHoverStroke extends \Kendo\SerializableObject {
//>> Properties
/**
* Defines the hover stroke color.
* @param string $value
* @return \Kendo\Dataviz\UI\DiagramShapeDefaultsConnectorDefaultsHoverStroke
*/
public func... | deviffy/laravel-kendo-ui | wrappers/php/lib/Kendo/Dataviz/UI/DiagramShapeDefaultsConnectorDefaultsHoverStroke.php | PHP | mit | 982 |
using Raccoon.Graphics;
namespace Raccoon.Fonts {
public class TextShaderParameters : IShaderParameters, IFontSizeShaderParameter {
#region Private Members
private float? _fontSize;
#endregion Private Members
#region Constructors
public TextShaderParameters(Font font) {
... | lucas-miranda/Raccoon | Raccoon/Graphics/Fonts/Shaders/TextShaderParameters.cs | C# | mit | 4,637 |
namespace Cosmos.Logging.Core.LogFields {
public class TagsField : ILogField<string[]> {
public TagsField(params string[] tags) => Value = tags;
public LogFieldTypes Type => LogFieldTypes.Tags;
public string[] Value { get; }
public int Sort { get; set; } = 1;
}
} | CosmosProgramme/Cosmos.Core | Logging/src/Cosmos.Logging/Core/LogFields/LogFields.Tags.cs | C# | mit | 306 |
<?php if($this->session->userdata('nivel')==2) {?>
<body>
<?php if ($grupos!=FALSE){?>
<div class="container">
<h5>Ver Grupos</h5>
<form action="<?php echo base_url();?>index.php/Welcome/verGrupo" method="post">
<div class="input-field col s12">
<select id="grupo" name="grup... | celli33/dictadosWeb | application/views/verGrupos.php | PHP | mit | 1,717 |
package lexek.wschat.db.dao;
import lexek.wschat.chat.e.EntityNotFoundException;
import lexek.wschat.chat.e.InvalidInputException;
import lexek.wschat.db.model.DataPage;
import lexek.wschat.db.model.UserData;
import lexek.wschat.db.model.UserDto;
import lexek.wschat.db.model.form.UserChangeSet;
import lexek.wschat.uti... | lexek/chat | src/main/java/lexek/wschat/db/dao/UserDao.java | Java | mit | 8,668 |
<?php
class LayoutViewTest extends PHPUnit_Framework_TestCase {
public function setUp() {
$this->view = new \Slim\LayoutView();
$this->view->setTemplatesDirectory(__DIR__ . '/templates');
}
public function testRendersTemplateWrappedWithLayout() {
$output = $this->view->fetch('simple.php');
$this... | petebrowne/slim-layout-view | tests/LayoutViewTest.php | PHP | mit | 1,714 |
// Init express server
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var server = require('http').Server(app);
server.listen(3000);
console.log("started listenning on port 3000");
// Subscribe to lexa's router stream and update the LED accordingly
// var onoff = requir... | JaxonDvl/lexa-piduino | serverlocal.js | JavaScript | mit | 4,714 |
import { AsyncIterableX } from '../../asynciterable/asynciterablex';
import { SkipAsyncIterable } from '../../asynciterable/operators/skip';
/**
* @ignore
*/
export function skipProto<T>(this: AsyncIterableX<T>, count: number): AsyncIterableX<T> {
return new SkipAsyncIterable<T>(this, count);
}
AsyncIterableX.pro... | ReactiveX/IxJS | src/add/asynciterable-operators/skip.ts | TypeScript | mit | 466 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="14"/>
<source>About FlorijnCoin</source>
<translation>FlorijnCoin hakkında</translation>
... | dutchpatriot/florijncoin | src/qt/locale/bitcoin_tr.ts | TypeScript | mit | 116,366 |
package iso20022
// Amount of money debited or credited on the books of an account servicer.
type AmountAndDirection55 struct {
// Amount of money in the cash entry.
Amount *RestrictedFINActiveOrHistoricCurrencyAndAmount `xml:"Amt"`
// Indicates whether an entry is a credit or a debit.
CreditDebitIndicator *Cred... | fgrid/iso20022 | AmountAndDirection55.go | GO | mit | 1,392 |
/*
* Copyright 2015 the original author or authors.
*
* 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 applica... | HenryHarper/Acquire-Reboot | gradle/src/model-core/org/gradle/model/internal/core/NodeBackedModelSet.java | Java | mit | 6,263 |
/// <reference types="@types/google-maps" />
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Injector, Input, OnInit, ViewChild } from '@angular/core';
import { AddressView } from 'app/api/models';
import { Breakpoint } from 'app/core/layout.service';
import { BaseComponent } from 'app/shared/b... | cyclosproject/cyclos4-ui | src/app/ui/shared/profile-addresses.component.ts | TypeScript | mit | 3,215 |
/**
* @file HGEventCollisionScripter.cpp
* @brief EventCollision script adapter implementation
*
* @author Master.G (MG), mg@snsteam.com
*
* @internal
* Created: 2013/02/21
* Company: SNSTEAM.inc
* (C) Copyright 2013 SNSTEAM.inc All rights reserved.
*
* This file is a part of Hourglass Engine... | master-g/hourglass | Hourglass/original/HGScript/HGEventScripter/HGEventCollisionScripter.cpp | C++ | mit | 2,308 |
# -*- coding: utf-8 -*-
'''
Description:
Extract the feature from the text in English.
Version:
python3
'''
from sklearn.feature_extraction.text import CountVectorizer
VECTORIZER = CountVectorizer(min_df=1)
# 以下代码设置了特征提取方法的参数(以1-2个单词作为滑动窗口大小,以空格作为单词的分割点,最小词频为1)
# 详细参考API介绍:
# http://scikit-learn.org/stable/m... | Jackson-Y/Machine-Learning | text/feature_extraction.py | Python | mit | 828 |
export default function(field, bucketKey) {
switch (field) {
case 'average_rating':
return {
0: '☆☆☆☆☆',
1: '★☆☆☆☆',
2: '★★☆☆☆',
3: '★★★☆☆',
4: '★★★★☆',
5: '★★★★★',
}[bucketKey];
case 'completion_date':
case 'start_date':
return new Date(pa... | clinwiki-org/clinwiki | front/src/utils/aggs/aggKeyToInner.ts | TypeScript | mit | 461 |
# frozen_string_literal: true
module MediaWiktory::Wikipedia
module Modules
# Output nothing.
#
# The "submodule" (MediaWiki API term) is included in action after setting some param, providing
# additional tweaking for this param. Example (for {MediaWiktory::Wikipedia::Actions::Query} and
# its s... | molybdenum-99/mediawiktory | lib/mediawiktory/wikipedia/modules/none.rb | Ruby | mit | 735 |
require "mars_geo/version"
module MarsGeo
autoload :Converter, 'mars_geo/converter'
autoload :Point, 'mars_geo/point'
end
| jonnyzheng/mars_geo | lib/mars_geo.rb | Ruby | mit | 127 |
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MonogameDraw
{
public enum LINECAP
{
NONE,
SQUARE,
CIRCLE
};
public class Renderer
{
private GraphicsDevice gd;
private BasicEffect effect;
private Matr... | battesonb/MonogameDraw | MonogameDraw/Renderer.cs | C# | mit | 11,384 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PathConverter
{
class Converter
{
public static string[] Convert(string input)
{
var results = new string[4];
if (String.IsNullOrEm... | yanxyz/Backslash2Slash | PathConverter/Converter.cs | C# | mit | 2,124 |
require "transformator/transformation/step"
require_relative "../request_transformation"
class Skala::PrimoAdapter::Search::RequestTransformation::
SetOnCampus < Transformator::Transformation::Step
def call
transformation.inner_search_request.locate("onCampus").first.tap do |_node|
_node << (transformat... | ubpb/skala | lib/skala/primo_adapter/search/request_transformation/set_on_campus.rb | Ruby | mit | 394 |
package mekanism.common.transmitters;
import mekanism.api.transmitters.DynamicNetwork;
import mekanism.api.transmitters.IGridTransmitter;
public abstract class Transmitter<A, N extends DynamicNetwork<A, N>> implements IGridTransmitter<A, N>
{
public N theNetwork = null;
public boolean orphaned = true;
@Override
... | Microsoft/vsminecraft | minecraftpkg/MekanismModSample/src/main/java/mekanism/common/transmitters/Transmitter.java | Java | mit | 1,976 |
using DevExpress.XtraEditors;
namespace DevExpress.MailClient.Win.Controls {
public class BackstageViewLabel : LabelControl {
public BackstageViewLabel() {
Appearance.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))... | svlcode/MailClient | sources/DevExpress.MailClient.Win/Controls/BackstageViewLabel.cs | C# | mit | 554 |
#include "main.hpp"
TargetSelector::TargetSelector(SelectorType type, float range)
: type(type), range(range) {
}
void TargetSelector::selectTargets(Actor *wearer, TCODList<Actor *> & list) {
switch(type) {
case CLOSEST_MONSTER :
{
Actor *closestMonster=engine.getClosestMonster(wearer->x,wearer->y,range);
... | vrum/rlTut | rlTut/Pickable.cpp | C++ | mit | 3,659 |
<?php
/*
/*
* Made by Samerton
* Translation by Hi_Michael
* https://github.com/NamelessMC/Nameless/
* NamelessMC version 2.0.0-pr12
*
* License: MIT
*
* Chinese Language - Users
* Translation progress : 97%
* 翻譯有誤請使用GitHun回報issues
* https://github.com/haer0248/NamelessMC-v2-Traditional-Chinese/is... | NamelessMC/Nameless | custom/languages/Chinese/user.php | PHP | mit | 11,505 |
// Copyright mogemimi. Distributed under the MIT license.
#include "pomdog/experimental/skeletal2d/blendtrees/animation_node.h"
namespace pomdog::skeletal2d {
AnimationNode::~AnimationNode() = default;
} // namespace pomdog::skeletal2d
| mogemimi/pomdog | pomdog/experimental/skeletal2d/blendtrees/animation_node.cpp | C++ | mit | 240 |
<?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\DICOM;
use JMS\Serializer\Annotation\ExclusionPolicy;
u... | romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/DICOM/ContentTime.php | PHP | mit | 782 |
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MessagesComponent } from './messages.component';
import { MessageService } from '../message.service';
describe('MessagesComponent', () => {
let component: MessagesComponent;
let fixture: ComponentFixture<MessagesComponent>;
... | mdvorak/resource-router | src/app/messages/messages.component.spec.ts | TypeScript | mit | 833 |
<?php
namespace Noxlogic\PhpotonBundle\Websocket;
class TimeoutException extends \RuntimeException { }
| jaytaph/phpoton_slack | src/Noxlogic/PhpotonBundle/Websocket/TimeoutException.php | PHP | mit | 105 |
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015 Neustar Inc.
*
* 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 th... | neustar/registrar_epp04toolkit | src/c++/src/epp/core/command/EppCommandInfoDomain.cpp | C++ | mit | 2,259 |
import _plotly_utils.basevalidators
class YValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="y", parent_name="bar", **kwargs):
super(YValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
anim=kwargs.pop("... | plotly/python-api | packages/python/plotly/plotly/validators/bar/_y.py | Python | mit | 480 |
// fetch() polyfill for making API calls.
import 'whatwg-fetch';
// Object.assign() is commonly used with React.
// It will use the native implementation if it's present and isn't buggy.
import objectAssign from 'object-assign';
Object.assign = objectAssign;
| ZachMayer35/Radioscope | API/tests/config/polyfills.js | JavaScript | mit | 261 |
///<reference path="./move.ts" />
module GobangOnline {
export enum Color { Empty, Black, White };
export function getOpponentColor(color: Color): Color {
return color == Color.Black ? Color.White : Color.Black;
}
export function buildSquareMatrix(size:number, defaultValue:any) {
var matrix = [];
... | go717franciswang/gobang | board.ts | TypeScript | mit | 4,943 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#inc... | zzh8829/CompetitiveProgramming | Codeforces/544/C.cpp | C++ | mit | 1,315 |
# -*- coding: utf-8 -*-
from .record import (
Metadata,
Record,
)
__all__ = ['Parser']
class Parser:
def __init__(self, store):
self.store = store
def parse_record(self, metadata, line):
factors = line.split('|')
if len(factors) < 7:
return
registry, cc... | yosida95/ip2country | ip2country/parser.py | Python | mit | 1,079 |