repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
dev4christ/biblepearls | collections/diaries.js | 156 | Diaries = new Mongo.Collection('diaries');
Diaries.helpers({
});
Diaries.before.insert(function (userId, doc) {
doc.createdAt = moment().toDate();
});
| mit |
TheObsidian/crowfallBot | powers/Archetypes/Knight/ShieldBash.js | 386 | exports.power = {
name: "Shield Bash",
archetype: "Knight",
discipline: false,
bar: "Primary",
type: "Attack",
cast_time: "Instant",
duration: false,
lifetime: false,
target: "Cone",
velocity: false,
range: "5 Meters",
cost: "75 Mana",
tooltip: "Attack in front of you for 1052 - 1423 + 124% We... | mit |
saulshanabrook/django-simpleimages | simpleimages/trackers.py | 820 | from django.db.models.signals import post_save
from django.dispatch import receiver
import simpleimages.utils
def track_model(model):
'''
Perform designated transformations on model, when it saves.
Calls :py:func:`~simpleimages.utils.perform_transformation`
on every model saves using
:py:data:`d... | mit |
jayli/kissy | src/html-parser/src/html-parser/writer/basic.js | 1776 | /**
* basic writer for inheritance
* @author yiminghe@gmail.com
*/
KISSY.add("html-parser/writer/basic", function () {
function escapeAttrValue(str) {
return String(str).replace(/"/g, ""e;");
}
function BasicWriter() {
this.output = [];
}
BasicWriter.prototype = {
... | mit |
WebRockit/webrockit-ui | spec/controllers/spotcheck_controller_spec.rb | 60 | require 'spec_helper'
describe SpotcheckController do
end
| mit |
Christoph/tag-connect | embeddings/nlp_pipeline.py | 2809 | from importlib import reload
import spacy
from sklearn.decomposition import TruncatedSVD, PCA, NMF, LatentDirichletAllocation
from sklearn.metrics.pairwise import cosine_similarity
from scipy.stats import wasserstein_distance
from scipy.stats import entropy
import numpy as np
from os import path
import sys
sys.path.app... | mit |
simpleci/simpleci | src/backend/dispatcher/src/main/java/simpleci/dispatcher/listener/BuildListener.java | 658 | package simpleci.dispatcher.listener;
import simpleci.dispatcher.model.event.BuildStartEvent;
import simpleci.dispatcher.model.event.BuildStopEvent;
import simpleci.dispatcher.model.repository.UpdaterRepository;
public class BuildListener {
private final UpdaterRepository repository;
public BuildListener(Up... | mit |
matrharr/first_aid | bower_components/simpler-sidebar/dist/jquery.simpler-sidebar.js | 4289 | /*! simpler-sidebar v1.4.9 (https://github.com/dcdeiv/simpler-sidebar)
** Copyright (c) 2015 - 2016 Davide Di Criscito
** Dual licensed under MIT and GPL-2.0
*/
( function( $ ) {
$.fn.simplerSidebar = function( options ) {
var cfg = $.extend( true, $.fn.simplerSidebar.settings, options );
return this.each( function... | mit |
LegalizeAdulthood/cimple | src/providers/Cross/CrossSubClass_Provider.cpp | 3264 | // Generated by genprov 2.0.5
#include "CrossSubClass_Provider.h"
CIMPLE_NAMESPACE_BEGIN
CrossSubClass_Provider::CrossSubClass_Provider()
{
}
CrossSubClass_Provider::~CrossSubClass_Provider()
{
}
Load_Status CrossSubClass_Provider::load()
{
return LOAD_OK;
}
Unload_Status CrossSubClass_Provider::unload()
{
... | mit |
animekita/selvbetjening | selvbetjening/sadmin2/tests/__init__.py | 62 |
from filtering import *
#from ui import *
from views import * | mit |
delacroixe/webScraper | DAO/subscriptionDAO.js | 1533 | /*
*
*/
var moment = require('moment');
function SubscriptionDAO(db) {
"use strict";
var that = this;
if (false === (this instanceof SubscriptionDAO)) {
console.log('Warning: SubscriptionDAO constructor called without "new" operator');
return new SubscriptionDAO(db);
}
this.getObjectId =... | mit |
guiconti/Buildev | tools/serverProduction.js | 796 | "use strict";
/* eslint-disable no-console */
const dotenv = require('dotenv');
dotenv.config();
const logger = require('./logger');
const history = require('connect-history-api-fallback');
const express = require('express');
const path = require('path');
const router = require('../server/core/router.js');
const Rollb... | mit |
ganthore/docker-workflow-plugin | aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/ExecutorStepTest.java | 18336 | /*
* The MIT License
*
* Copyright 2015 CloudBees, 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 the Software without restriction, including without limitation the rights
* to use, copy, ... | mit |
da99/okdoki | Public/js/Form.js | 5397 | "use strict";
$(function () {
$('form').each(function (i, e) {
var id = $(e).attr('id');
if (!id)
throw new Error('Form does not have id: ' + $(e).html());
form('#' + id);
});
});
// ================================================================
// ================== Form DSL =================... | mit |
tswanepoel/gsmgadgetry | Program.cs | 3463 | using System.Text;
namespace GsmGadgetry
{
using System.IO.Ports;
using Microsoft.SPOT;
using Micro.Hardware;
using Micro.Hardware.Gsm;
public class Program
{
public static void Main()
{
Debug.EnableGCMessages(false);
using (var client = new Sim900Clie... | mit |
linnull/go-simple | googleSearch/main.go | 1357 | package main
import (
"fmt"
"net/http"
"net/url"
"strings"
"github.com/PuerkitoBio/goquery"
)
var keys = []string{"golang", "java", "c++", "mysql"}
func main() {
proxy := func(*http.Request) (*url.URL, error) {
return url.Parse("http://127.0.0.1:1080")
}
transport := &http.Transport{Proxy: proxy}
http... | mit |
Jianfengxia/tbm | resources/views/taskcomments/show_fields.blade.php | 1244 | <!-- Id Field -->
<div class="form-group col-sm-6 widget">
<h5 class="wlabel"><b>{!! Form::label('id', 'Id:') !!}</b></h5>
<h5 class="wvalue">{!! $taskcomment->id !!}</h5>
</div>
<!-- Task Id Field -->
<div class="form-group col-sm-6 widget">
<h5 class="wlabel"><b>{!! Form::label('task_id', 'Task Id:') !!}... | mit |
gamernetwork/gn-django | tests/gn_django_tests/test_utils_html.py | 1152 | from django.test import TestCase
from gn_django.utils import htmlify_content
class TestHtmlifyContent(TestCase):
def test_url_parse(self):
content = "http://example.com"
self.assertEqual(htmlify_content(content), '<a href="http://example.com" target="_blank">http://example.com</a>')
def test... | mit |
conpago/conpago | tests/Conpago/Core/BuilderStorageTest.php | 1666 | <?php
/**
* Created by PhpStorm.
* User: Bartosz Gołek
* Date: 2014-10-17
* Time: 08:10
*/
namespace Conpago\Core;
use Conpago\File\Contract\IFileSystem;
use Conpago\Helpers\Contract\IAppPath;
use PHPUnit\Framework\TestCase;
class BuilderStorageTest extends TestCase
{
const CONTEXT_CONTAINER_PATH =
... | mit |
MattFarm/BusinessPlatformApps | Source/Actions/Microsoft.Deployment.Actions.Salesforce/SalesforceGetEntityInitialCounts.cs | 4221 | using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Globalization;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Deployment.Actions.Salesforce.Helpers;
using Microsoft.Deployment.Actions.Salesforce.Salesf... | mit |
longze/vue-scalable-table | gulpfile.js/tasks/deploy.js | 168 | /**
* @file gulp 默认执行任务
*
* @author liubin29@baidu.com
* 2015年10月27日
*/
var gulp = require('gulp');
gulp.task('deploy', ['build:production']);
| mit |
alexdu98/Ambiguss | src/AppBundle/Repository/PhraseRepository.php | 7197 | <?php
namespace AppBundle\Repository;
use AppBundle\Entity\Membre;
class PhraseRepository extends \Doctrine\ORM\EntityRepository
{
/**
* Retourne le classement des phrases de tous les joueurs
*
* @param int $limit
* @return array
*/
public function getClassementPhrases(int $limit){
... | mit |
raeffu/prog2 | src/_threads/main/java/Chronometer_sol/StartUp.java | 275 | package _threads.main.java.Chronometer_sol;
public final class StartUp {
private StartUp() {}
public static void main(String[] l) {
DisplayFrame frm = new DisplayFrame();
frm.setLocation(100, 100);
frm.setSize(400, 400);
frm.pack();
frm.setVisible(true);
}
}
| mit |
baihui212/tsharding | tsharding-client/src/main/java/com/mogujie/trade/db/EmptyDataSourceRoutingHandler.java | 510 | package com.mogujie.trade.db;
import java.lang.reflect.Method;
import java.util.Collection;
/**
* @author by jiuru on 16/7/14.
*/
public class EmptyDataSourceRoutingHandler implements DataSourceRoutingHandler {
@Override
public String dynamicRoute(Method method, Object[] args) {
// this will never ... | mit |
jdivo/photo-manager | config/environments/development.rb | 1910 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web serv... | mit |
ddidier/ndd-url_checker | spec/ndd/url_checker/parallel_url_checker_spec.rb | 1653 | require 'spec_helper'
RSpec.describe NDD::UrlChecker::ParallelUrlChecker do
before(:all) do
# Logging.logger.root.level = :debug
end
# ---------------------------------------------------------------------------------------------------------- MRI -----
context 'when running MRI' do
before(:all) do
... | mit |
m-philipp/ip_collector | epiphany/EpiDatabase.php | 3429 | <?php
class EpiDatabase
{
const MySql = 'mysql';
private static $instances = array(), $type, $name, $host, $user, $pass;
private $_type, $_name, $_host, $_user, $_pass;
public $dbh;
private function __construct()
{
}
public static function getInstance($type, $name, $host = 'localhost', $user = 'root', $pass =... | mit |
kony/News-and-Weather | NewsNWeather/actions/mobile/AS_Label_d531a0166ea047e0ad486374656ed24a.js | 55 | function AS_Label_d531a0166ea047e0ad486374656ed24a() {} | mit |
scriptotek/php-alma-client | src/Users/Requests.php | 1192 | <?php
namespace Scriptotek\Alma\Users;
use Scriptotek\Alma\Client;
use Scriptotek\Alma\Model\IterableCollection;
use Scriptotek\Alma\Model\LazyResourceList;
use Scriptotek\Alma\Model\ReadOnlyArrayAccess;
/**
* Iterable collection of Request resources.
*/
class Requests extends LazyResourceList implements \Countabl... | mit |
GarboMuffin/nicehash-calculator | src/handlers/UnifiedHandler.ts | 2441 | import chalk from "chalk";
import { IHandlerData } from "../calculator/IHandlerData";
import { NiceHashCalculator } from "../calculator/NiceHashCalculator";
import { AbstractHandler } from "./AbstractHandler";
const PRECISION = 4;
function fancyFormatNumber(num: number): string {
const isPositive = num > 0;
cons... | mit |
xuru/pyvisdk | pyvisdk/do/host_local_file_system_volume_spec.py | 1044 |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def HostLocalFileSystemVolumeSpec(vim, *args, **kwargs):
'''The specification for creatin... | mit |
boxmein/boxnode | lib/tinystore/repl.js | 1053 | var repl = require('repl');
var tinystore = require('./index.js');
function load(filename, key, method) {
tinystore.load(filename, key, method).then(function(data) {
console.log('success: ', data);
}, function(err) {
console.log('error: ', err);
});
}
function edit(filename, newdata, key, method) {
va... | mit |
GoodforGod/dummymaker | src/main/java/io/dummymaker/factory/impl/GenFactory.java | 11264 | package io.dummymaker.factory.impl;
import static io.dummymaker.generator.simple.EmbeddedGenerator.toDepth;
import static io.dummymaker.util.CastUtils.castObject;
import static io.dummymaker.util.CastUtils.instantiate;
import static io.dummymaker.util.CollectionUtils.isEmpty;
import io.dummymaker.annotation.complex.*... | mit |
YellowBinary/server | core/src/main/java/org/yellowbinary/server/core/annotation/Prototype.java | 825 | package org.yellowbinary.server.core.annotation;
import java.lang.annotation.Annotation;
public class Prototype {
private final Class<? extends Annotation> annotation;
private final Class[] expectedParameterTypes;
private final Class expectedReturnType;
public Prototype(Class<? extends Annotation> a... | mit |
czuendorf/KevinJS | app/scripts/app/main.js | 37 | define(["jquery"],
function($) {}
); | mit |
mike-es6/reslice | examples/todo/src/todolist/ducks.js | 2427 | import { mappedReducer, createSelector } from 'reslice' ;
import { reducer as todoReducer } from '../todo/ducks' ;
export const actions = {
/**
* Action to add a new Todo to the list, given the specified
* text.
**/
add: function (text) {
return {
type: 'ADD',
text... | mit |
gems-uff/dominoes | gitdataminer/src/main/java/com/josericardojunior/gitdataminer/Matrix2D.java | 11746 | package com.josericardojunior.gitdataminer;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.zip.CRC32;
import org.la4j.matrix.Mat... | mit |
agonzalez0515/Coco-app | app/models/comment.rb | 366 | # == Schema Information
#
# Table name: comments
#
# id :integer not null, primary key
# body :text
# user_id :integer
# message_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
class Comment < ApplicationRecord
belongs_to :message
belong... | mit |
joehua87/graphql-mongodb-server | src/parseFilter/constants.js | 277 | // @flow
// Compare Type
export const EQUAL = 'EQUAL'
export const GT = 'GT'
export const GTE = 'GTE'
export const LT = 'LT'
export const LTE = 'LTE'
export const REG_EX = 'REG_EX'
export const REG_EX_I = 'REG_EX_I'
export const FULL_TEXT = 'FULL_TEXT'
export const IN = 'IN'
| mit |
sergiopuntar/CommonsJEE6 | commons-jee6-core/src/main/java/br/com/sgpf/common/infra/event/Before.java | 798 | /*
* Copyright (c) 2017 Sergio Gonçalves Puntar Filho
*
* This program is made available under the terms of the MIT License.
* See the LICENSE file for details.
*/
package br.com.sgpf.common.infra.event;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
... | mit |
drcapulet/ap | spec/ap/client/category_spec.rb | 2857 | require 'spec_helper'
describe AP::Client::Category do
context "with an API key" do
before do
AP.configure do |c|
c.api_key = "api"
end
end
describe ".categories" do
before do
stub_get("/v2/categories.svc/?apiKey=api").to_return(:body => fixture("categories.xml"), :... | mit |
LiveSplit/SpeedrunComSharp | SpeedrunComSharp/Series/SeriesClient.cs | 4427 | using System;
using System.Collections.Generic;
namespace SpeedrunComSharp
{
public class SeriesClient
{
public const string Name = "series";
private SpeedrunComClient baseClient;
public SeriesClient(SpeedrunComClient baseClient)
{
this.baseClient = baseClient;
... | mit |
AndrewDeCHamplain/Bomberman | Bomberman/src/server/BombFactory.java | 1766 | package server;
public class BombFactory implements Runnable{
private Player player;
private GameBoard board;
/**
* Assigns paramaters to the variables intialized in the field.
* @param player, Player
* @param board, GameBoard
*/
BombFactory(Player player, GameBoard board){
this.player... | mit |
dalepartridge/seapy | model/grid.py | 29466 | #!/usr/bin/env python
"""
grid
This module handles general model grid information, whether from ROMS or
other models; however, it is mostly geared towards ROMS
Written by Brian Powell on 10/09/13
Copyright (c)2017 University of Hawaii under the BSD-License.
**Examples**
>>> grid = seapy.model.asgrid("... | mit |
ImagicTheCat/vRP | vrp/client/survival.lua | 5899 | -- https://github.com/ImagicTheCat/vRP
-- MIT license (see LICENSE or vrp/vRPShared.lua)
if not vRP.modules.survival then return end
local Luang = module("vrp", "lib/Luang")
local Survival = class("Survival", vRP.Extension)
function Survival:__construct()
vRP.Extension.__construct(self)
self.in_coma = false --... | mit |
popkit/pelpa | pelpa-web/src/main/java/org/popkit/leap/geekpen/controller/WechartController.java | 4228 | package org.popkit.leap.geekpen.controller;
import com.alibaba.fastjson.JSONObject;
import org.apache.http.HttpEntity;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEnt... | mit |
qishanmingfeng/qishanmingfeng.github.io | public/js/base.js | 2960 | /* 控制导航按钮动作 */
function nav_click(is_show) {
if (is_show) {
/* 显示左侧aside */
$('.aside')
.addClass('visible-md visible-lg')
.removeClass('hidden-md hidden-lg')
/* 调整右侧内容 */
$('.aside3')
.removeClass('col-md-12 col-lg-12')
.addClass('col-md-8 col-lg-8');
/* 调整文字内容格式 */
$(... | mit |
peter-murach/tty-progressbar | spec/unit/finish_spec.rb | 401 | RSpec.describe TTY::ProgressBar, '#finish' do
let(:output) { StringIO.new('', 'w+') }
it 'finishes progress' do
progress = TTY::ProgressBar.new("[:bar]", output: output, total: 10)
progress.advance
progress.finish
expect(progress.complete?).to be(true)
output.rewind
expect(output.read).to e... | mit |
Sutto/emmett | lib/emmett/renderer.rb | 1617 | require 'fileutils'
require 'handlebars'
require 'pathname'
module Emmett
class Renderer
attr_reader :handlebars, :global_context, :configuration, :templates
attr_writer :global_context
def initialize(configuration)
@configuration = configuration
@templates = configuration.to_template... | mit |
Intellipharm/angular-svg-nodes | src/app/angular-svg-nodes-directive-d3.js | 8516 | import * as d3 from 'd3';
import _ from 'lodash';
// local: constants
import {
HIGHLIGHT_NODE_ON_SELECT,
HIGHLIGHT_NODE_ON_DESELECT,
HIGHLIGHT_NODE_ON_ADD,
DEFAULT_HIGHLIGHT_NODE_ON,
DEFAULT_INITIAL_GRID_COLS,
DEFAULT_INITIAL_GRID_ROWS,
DEFAULT_NODE_WIDTH,
DEFAULT_NODE_HEIGHT,
DEFAU... | mit |
jonathanobino/complementitw | Esercizi/500.php | 108 | <!DOCTYPE html>
<html>
<head>
<title>Error: 500</title>
</head>
<body>
<h1>Errore 500</h1>
</body>
</html> | mit |
KailinLi/LeetCode-Solutions | 34. Search for a Range/solution.cpp | 342 | class Solution {
public:
vector<int> searchRange(vector<int>& nums, int target) {
auto res = equal_range(nums.begin(), nums.end(), target);
if (res.first == res.second) return {-1, -1};
return {static_cast<int>(distance(nums.begin(), res.first)), static_cast<int>(distance(nums.begin(), res.s... | mit |
hold-the-door-game/Prototypes | client/src/Game/Prototype03/Door/index.js | 1836 | import React from 'react';
import bind from 'react-autobind';
import DoorSprite from './sprite';
import Game from 'Game/index.js'
class Door extends React.Component {
constructor(props) {
super(props);
bind(this);
this.doorSprite = {};
this.loadAnimations();
this.createSprite();
this.state = ... | mit |
locoframework/loco-rails | test/integration/admin/review_article_test.rb | 1344 | # frozen_string_literal: true
require 'test_helper'
class Admin
class ReviewArticleTest < IT
include Loco::Emitter
include AdminHelpers
def setup
super
sign_in
click_on 'Articles'
click_on 'Review'
end
test 'should auto update an article' do
update_article article... | mit |
darknight-007/Firmware | Tools/px_generate_uorb_topic_helper.py | 5150 |
# helper methods & common code for the uorb message templates msg.{cpp,h}.template
# Another positive effect of having the code here, is that this file will get
# precompiled and thus message generation will be much faster
import genmsg.msgs
import gencpp
type_map = {
'int8': 'int8_t',
'int16': 'int16_t',
... | mit |
rwl/traitsbackendpyjamas | enthought/pyface/ui/pyjd/widget.py | 2232 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# Copyright (c) 2009, Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# d... | mit |
vjangari/todo-list-angular2 | dev/shared/string.trim.pipe.ts | 352 | /**
* Created by venkat_jangari on 5/4/2016.
*/
import { Pipe, PipeTransform } from 'angular2/core';
@Pipe({name: 'trim'})
export class TrimPipe implements PipeTransform{
transform(value:string, charLimit:number):string {
return isNaN(charLimit)? value: (value.length>=charLimit?value.substr(0,charLimit)... | mit |
MrJoy/UnityGUIExtensions | Editor/EditorGUIHelper.cs | 866 | using UnityEngine;
using UnityEditor;
public static class EditorGUIStyleExtensions {
private static bool wasProSkin = EditorGUIUtility.isProSkin;
public static void InvalidateOnSkinChange(GUIStyle[] styles) {
if(EditorGUIUtility.isProSkin != wasProSkin) {
wasProSkin = EditorGUIUtility.isProSkin;
f... | mit |
bens640/Ask-a-Cuban | app/controllers/users_controller.rb | 1176 | class UsersController < ApplicationController
before_action :require_login, only: [:edit, :update, :destroy]
before_action :set_user, only: [:show, :edit, :update, :destroy]
def new
# user registration page
@user = User.new
end
def create
@user = User.new(user_params)
if @user.save
au... | mit |
keystonejs/keystone | design-system/packages/icons/src/icons/WatchIcon.tsx | 403 | import * as React from 'react';
import { createIcon } from '../Icon';
export const WatchIcon = createIcon(
<React.Fragment>
<circle cx={12} cy={12} r={7} />
<polyline points="12 9 12 12 13.5 13.5" />
<path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0... | mit |
mcmunder/eaternity-react | app/store/sagas/fao.js | 538 | import { takeLatest } from 'redux-saga'
import { call, put } from 'redux-saga/effects'
import edbApi from '../../api/edb'
import * as actionTypes from '../data/action-types'
function * fetchAllFAOs () {
try {
const faos = yield call(edbApi.fetchAllFAOs)
yield put({type: actionTypes.FAO_FETCH_ALL_SUCCEEDED, f... | mit |
robnightingale/ore-dashboard-beta | public/js/echart/chartController.js | 26333 | /*
* Copyright (C) 2016 Quaternion Risk Management Ltd
* All rights reserved
*
*/
var drilldownLevels = [
{name: 'creditrating', level: 0, text: 'Credit Rating'}
, {name: 'counterparty', level: 1, text: 'Counterparty'}
, {name: 'nettingset', level:2, text:'Netting Set'}
, {name: 'trade', level:3, ... | mit |
Grinch/SpongeCommon | src/main/java/org/spongepowered/common/block/SpongeTileEntityArchetypeBuilder.java | 8693 | /*
* 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... | mit |
wp-plugins/laterpay | application/Helper/Rating.php | 3020 | <?php
/**
* LaterPay rating helper.
*
* Plugin Name: LaterPay
* Plugin URI: https://github.com/laterpay/laterpay-wordpress-plugin
* Author URI: https://laterpay.net/
*/
class LaterPay_Helper_Rating
{
/**
* Array of rating indexes.
*
* @var array
*/
protected static $rating_indexes = a... | mit |
dappur/framework | database/migrations/20180722001608_add_two_factor_auth.php | 1364 | <?php
use \Dappur\Migration\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddTwoFactorAuth extends Migration
{
public function up()
{
$this->schema->table('users', function (Blueprint $table) {
$table->string('2fa')->after('password')->nullable();
});
// Add 2... | mit |
LordGoodman/light-wallet | app/scripts/controllers/CX/myWalletsCtrl.js | 5867 | 'use strict';
var myWalletsCtrl = function($scope, $sce) {
$scope.editModal = new Modal(document.getElementById('editWallet'));
$scope.viewModal = new Modal(document.getElementById('viewWalletDetails'));
$scope.removeModal = new Modal(document.getElementById('removeWallet'));
$scope.allWallets = [];
$scope.allWatc... | mit |
ankitagupta12/karafka | spec/lib/karafka/schemas/server_cli_options_spec.rb | 636 | # frozen_string_literal: true
RSpec.describe Karafka::Schemas::ServerCliOptions do
let(:schema) { described_class }
let(:config) do
{
pid: 'name'
}
end
context 'config is valid' do
it { expect(schema.call(config)).to be_success }
end
context 'when we want to use consumer groups that ar... | mit |
bzquan/GherkinEditor | GherkinEditor/GherkinEditor/View/RichTextBlockHtml/BrowserBehavior.cs | 1060 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
namespace Gherkin.View
{
public static class BrowserBehavior
{
public static readonly DependencyProperty HtmlProperty = DependencyPro... | mit |
nailsapp/module-invoice | src/Events.php | 2615 | <?php
/**
* The class provides a summary of the events fired by this module
*
* @package Nails
* @subpackage module-common
* @category Events
* @author Nails Dev Team
*/
namespace Nails\Invoice;
use Nails\Common\Events\Base;
use Nails\Invoice\Resource\Invoice;
/**
* Class Events
*
* @package ... | mit |
UkFluidsNetwork/ukfn | resources/views/gallery/index.blade.php | 2168 | @extends('layouts.master')
@section('head')
<script type="text/javascript" src="{{ asset('js/vendor/jquery.easing.1.3.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/vendor/jquery.mousewheel.min.js') }}"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4/... | mit |
NikiforovAll/IMEMium | imem/src/app/dashboard/gentelella.service.ts | 559 | import { Injectable } from '@angular/core';
@Injectable()
export class GentelellaService {
constructor() { }
/**
* addCollapsablePanels
*/
public sideBarSetUp() {
if (!!(<any>window).sideBarPanelFix) {
(<any>window).sideBarPanelFix();
}
}
public addCollapsablePanels() {
if (!!(<an... | mit |
nico01f/z-pec | ZimbraServer/src/java/com/zimbra/cs/dav/resource/RemoteCalendarCollection.java | 2228 | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of th... | mit |
louisgv/verdandi | convos/poster/skills.js | 530 | "use strict";
let Skills = {};
module.exports = Skills;
const Utils = require('../utils');
function askSkillItem(r, c, req) {
c.ask(Utils.response('What skill are you looking for in the candidates? :thinking_face: (For example, `c++, calculus, wordpress`. Please separate them with comma :sweat_smile:)', 'skills'),... | mit |
jjvainav/Mitten | src/Mitten.Mobile.iOS/Views/CheckBoxView.cs | 3064 | using System;
using CoreGraphics;
using Mitten.Mobile.iOS.Views.Renderers;
using UIKit;
namespace Mitten.Mobile.iOS.Views
{
/// <summary>
/// A basic check box view.
/// </summary>
public class CheckBoxView : UIControl
{
private readonly CheckBoxRenderer renderer;
private CGColor c... | mit |
nus-mtp/worldscope | client/android/WorldScope/app/src/main/java/com/litmus/worldscope/utility/CircleTransform.java | 1328 | package com.litmus.worldscope.utility;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import com.squareup.picasso.Transformation;
/**
* Created by kylel on 24/3/2016.
*/
// Class used to passed into Picasso for cropping pictures ... | mit |
cdgallahue/atomic-turbine | web/bower_components/px-moment-imports/momentLocale/fa.js | 3296 | //! moment.js locale configuration
//! locale : Persian [fa]
//! author : Ebrahim Byagowi : https://github.com/ebraminio
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'functio... | mit |
gdavidkov/Fleet-management-system | Source/FleetManagmentSystem/Data/FleetManagmentSystem.Common/Repository/GenericRepository.cs | 2546 | namespace FleetManagmentSystem.Common.Repository
{
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
public class GenericRepository<T> : IRepository<T> where T : class
{
public GenericRepository(DbCo... | mit |
TorchPowered/Thallium | src/main/java/net/minecraft/command/CommandDebug.java | 7087 | package net.minecraft.command;
import java.io.File;
import java.io.FileWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import net.minecraft.profiler.Profiler;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.BlockPos;
import org.apache.logging.log4j.LogMan... | mit |
damagefilter/damagebot4twitch | DamageLib/Commands/CommandContainer.cs | 6171 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DamageBot.Commands {
public delegate void CommandDelegate(IMessageReceiver caller, string[] args);
public class CommandContainer {
public CommandDelegate commandLogic;
public CommandAttribu... | mit |
concord-consortium/testswarm | content/run.php | 552 | <div class="userinfo">
<div class="browser you">
<img src="<?php echo swarmpath( "images/{$browser}.sm.png" ); ?>" class="browser-icon <?php echo $browser; ?>" alt="<?php echo $useragent_name; ?>" title="<?php echo $useragent_name; ?>"/>
<span class="browser-name"><?php echo preg_replace('/\w+ /', "", $useragent_n... | mit |
emarchak/symfony2_training | app/cache/dev/twig/48/2e/eb21696e4c5823f5e4edc3879646.php | 1264 | <?php
/* SensioTrainingBundle:Default:index.html.twig */
class __TwigTemplate_482eeb21696e4c5823f5e4edc3879646 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("SensioTrainingBundle::layout.html.twi... | mit |
ikrum/code-challenge | url-parser/index.js | 893 | const URL = require('./parser');
/*** Usage ***
var url = new URL('http://ABC.com/%7Esmith/home.html');
console.log(url.parse());
console.log(url.getCleanUrl());
*/
(function () {
var testUrls = [
['http://abc.com:80/~smith/home.html', 'http://ABC.com/%7Esmith/home.html'],
['http://abc.com/drill/down/... | mit |
Youssefares/python-error-helper-web | config/initializers/devise.rb | 13642 | # Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmat... | mit |
PiotrDabkowski/Js2Py | tests/test_cases/language/expressions/property-accessors/S11.2.1_A4_T5.js | 4963 | // Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Check type of various properties
es5id: 11.2.1_A4_T5
description: Checking properties of the String object
---*/
//CHECK#1-28
if (typeof String.prototype !== "object") $ERR... | mit |
shashanksingh28/code-similarity | data/Big Java 6th Edition/ch03/section_4/BankAccountTester.java | 475 | /**
A class to test the BankAccount class.
*/
public class BankAccountTester
{
/**
Tests the methods of the BankAccount class.
@param args not used
*/
public static void main(String[] args)
{
BankAccount harrysChecking = new BankAccount();
harrysChecking.deposit(2000);... | mit |
samleybrize/bugzorcist | src/Bugzorcist/Symfony/Bundle/DataCollector/BugzorcistDataCollector.php | 5511 | <?php
/*
* This file is part of Bugzorcist.
*
* (c) Stephen Berquet <stephen.berquet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Bugzorcist\Symfony\Bundle\DataCollector;
use Symfony\Component\HttpFoundat... | mit |
krhubert/etherdisplay | src/components/Hash/index.js | 47 | /* @flow */
export { default } from "./Hash";
| mit |
giovannicandido/slush-spring-aurelia | templates/client/karma.conf.js | 2149 | // Karma configuration
// Generated on Fri Dec 05 2014 16:49:29 GMT-0500 (EST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/k... | mit |
PumpGroupCoin/PumpGroupCoin | src/qt/locale/bitcoin_ja.ts | 136306 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About PumpGroupCoin</source>
<translation>ブラックコインについて</translation>
</message>
<message>
<loc... | mit |
adrianocaldeira/thunder | src/main/Thunder.NHibernate/Pattern/ActiveRecord.cs | 22092 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using NHibernate;
using NHibernate.Criterion;
using NHibernate.Transform;
using Thunder.Collections;
using Thunder.Collections.Extensions;
using Thunder.Data;
using Thunder.NHibernate.Extensions;
using Property = Thunder.... | mit |
chentsulin/redux-example | src/constants/ActionTypes.js | 139 | import create from 'create-action-types';
const types = [
'INCREMENT_COUNTER',
'DECREMENT_COUNTER',
];
export default create(types);
| mit |
CorcovadoMing/DataLoader | datum_utils.py | 1074 | import datum_pb2
import numpy as np
def datum_to_array(datum):
"""Converts a datum to an array. Note that the label is not returned,
as one can easily get it by calling datum.label.
"""
if len(datum.data):
return np.fromstring(datum.data, dtype=np.uint8).reshape(
datum.height, datum... | mit |
mayth/Lemonedo | Lemonedo/TreeNode/Collection/KeyValuePairTreeNode.cs | 3467 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;
using System.Collections.ObjectModel;
using System.ComponentModel;
using MsgPack;
namespace Lemonedo
{
class KeyValuePairTreeNode : CollectionTreeNode
{
public override TreeNodeTyp... | mit |
ryanbrainard/richsobjects | richsobjects-core/src/main/java/com/github/ryanbrainard/richsobjects/api/client/SfdcApiLoader.java | 2431 | package com.github.ryanbrainard.richsobjects.api.client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Iterator;
import java.util.ServiceLoader;
/**
* @author Ryan Brainard
*/
public class SfdcApiLoader {
private SfdcApiLoader() {}
private static final Logger logger = LoggerFa... | mit |
badfortrains/spotcontrol | spirc_controller.go | 7002 | package spotcontrol
import (
"errors"
"fmt"
Spotify "github.com/badfortrains/spotcontrol/proto"
"github.com/golang/protobuf/proto"
"strings"
"sync"
)
type SpircController struct {
session *session
seqNr uint32
ident string
username string
devices map[string]ConnectDevice
devicesLock... | mit |
gabrielmf/SIR-EDU-2.0 | src/store/students.js | 3672 | import studentService from 'services/student-service'
import router from 'helpers/router-helper';
// ------------------------------------
// Constants
// ------------------------------------
export const SAVE_STUDENT_REQUEST = 'SAVE_STUDENT_REQUEST'
export const SAVE_STUDENT_SUCCESS = 'SAVE_STUDENT_RECEIVE'
export con... | mit |
ejrh/hex | src/hexutil/messaging/checksum.cpp | 465 | #include "common.h"
#include "hexutil/messaging/checksum.h"
#include "hexutil/messaging/message.h"
#include "hexutil/messaging/serialiser.h"
namespace hex {
void MessageChecksum::receive(Message *msg) {
std::ostringstream stream;
Serialiser writer(stream);
writer << msg;
std::string buffer(stream.st... | mit |
weirdsoft/coopcon | api/migrations/002-add-paid-field-to-order.js | 363 | const mongoose = require('mongoose')
module.exports = {
name: '002-add-paid-field-to-order',
up() {
return mongoose.connection.db.collection('orders').updateMany(
{},
{ $set: { paid: false } },
)
},
down() {
return mongoose.connection.db.collection('orders').updateMany(
{},
... | mit |
UWSEDS/short-course | LectureNotes/style_examples/ugly.py | 551 | from statistics import mean
import numpy.random as nprnd
from statistics import stdev
def MyFuNcTiOn(ARGUMENT):
m = mean(ARGUMENT)
s = stdev(ARGUMENT)
gt3sd = 0
lt3sd = 0
for m in ARGUMENT:
if m > m + (s * 2):
gt3sd += 1
elif m < m - (s * 2):
lt3sd += 1
return(gt3sd,lt3sd)
def AnotherFunction(anumber, a... | mit |
elwayman02/ember-data-twitch | tests/unit/serializers/twitch-chat-test.js | 423 | import { moduleForModel, test } from 'ember-qunit';
moduleForModel('twitch-chat', 'Unit | Serializer | twitch chat', {
// Specify the other units that are required for this test.
needs: ['serializer:twitch-chat']
});
// Replace this with your real tests.
test('it serializes records', function(assert) {
let reco... | mit |