repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
kongchun/salary | web/src/manage/answers.js | 3878 | $(function() {
initTable();
$("#searchBtn").on('click',function(){
let positionStatus = $("select[name=positionStatus]").val();
layui.table.reload('compnayList', {where: {'positionConfirm':positionStatus},page: {curr: 1}});
});
});
function initTable(){
layui.use(['table'], function(){
var table = ... | mit |
0100354256/Prct12M17 | lib/Prct12M17/naranjero.rb | 798 | class Naranjero
VELOCIDAD_CRECIMIENTO = 1.5
EDAD_PRODUCCION = 3
EDAD_MUERTE = 10
NARANJAS_ANIO = 70
attr_reader :edad, :altura, :contador
def initialize
@altura = 0
@edad = 0
@contador = 0
end
def edad()
return @edad
end
def altura()
return @altura
end
... | mit |
edersonjseder/devopsbank | userfront/src/main/java/com/userfront/web/controller/AppointmentController.java | 2299 | package com.userfront.web.controller;
import java.security.Principal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import ... | mit |
visla/i18n-walker | example/test/js/test.js | 6239 | 'use strict';
var _ = require('underscore');
var common = require('../common');
var companyController = null;
var Security = require('../lib/security');
var orm = require('orm');
var selectn = require('selectn');
var striptags = require('striptags');
var async = require('async');
var SessionLogManager = require('../li... | mit |
bouzuya/hubot-backlog-burndownchart | lib/scripts/backlog-burndownchart.js | 4286 | // Description
// A Hubot script that DESCRIPTION
//
// Dependencies:
// "form-data": "^0.1.4",
// "hubot-arm": "^0.2.1",
// "hubot-request-arm": "^0.2.1",
// "q": "^1.0.1",
// "request": "^2.42.0"
//
// Configuration:
// HUBOT_BACKLOG_BURNDOWNCHART_SPACE_ID
// HUBOT_BACKLOG_BURNDOWNCHART_USERNAME
// ... | mit |
karim/adila | database/src/main/java/adila/db/atlas40_n880e.java | 191 | // This file is automatically generated.
package adila.db;
/*
* ZTE
*
* DEVICE: atlas40
* MODEL: N880E
*/
final class atlas40_n880e {
public static final String DATA = "ZTE||";
}
| mit |
tejanium/satutempat_locale-client | spec/config/config_spec.rb | 471 | require 'spec_helper'
describe SatutempatLocale::Client::Config do
before :each do
SatutempatLocale::Client.reset_configuration
end
context 'override' do
before :each do
SatutempatLocale::Client.configure do |config|
config.server_url = 'http://anywhere.else'
end
end
it 'lo... | mit |
apo-j/Projects_Working | S/SOURCE/SOURCE.EspaceCandidature/SOURCE.EspaceCandidature.Web/JsModules/Global/Templates.js | 2318 | Templates.tabTemplate = "<li id='#{id}' class='#{class}' data-type='#{type}' data-vueid='#{vueid}' data-groupevueid='#{groupevueid}'><a href='#{href}'>#{label}</a></li>";
Templates.tabConflictTemplate = "<li id='#{id}' class='#{class}' data-type='#{type}' data-targetpanelid= '#{targetpanelid}' data-vueid='#{vueid}' d... | mit |
ellianadwi/LARAVEL | resources/views/detail.blade.php | 1105 | @extends('layouts.app')
@section('content')
<div class="container">
<div class="col-sm-offset-2 col-sm-8">
<div class="panel panel-default">
<div class="panel-heading">
Current Tasks
</div>
<div class="pa... | mit |
ghenga/ghenga-ui | app/controllers/navbar.js | 633 | (function () {
"use strict";
angular
.module("ghenga.controllers")
.controller("NavbarController", NavbarController);
function NavbarController($scope, $state, $rootScope, Authentication) {
var vm = this;
vm.logout = logout;
vm.account = Authentication.getAuthenticatedAccount();
$rootS... | mit |
hguerrerojaime/bong2 | modules/validation/index.ts | 36 | export * from './src/ts/validation'; | mit |
daemon3000/BombingChap | Assets/_BomberChap/Scripts/AI/AIController.cs | 3510 | using UnityEngine;
using System.Collections;
namespace BomberChap
{
[RequireComponent(typeof(CharacterMotor))]
[RequireComponent(typeof(AIAnimatorParameters))]
public class AIController : MonoBehaviour
{
private const int DIR_UP = 0;
private const int DIR_DOWN = 1;
private const int DIR_RIGHT = 2;
privat... | mit |
Credit-Jeeves/Heartland | src/Payum2/Heartland/Soap/Base/AuthenticateRequest.php | 2369 | <?php
namespace Payum2\Heartland\Soap\Base;
/**
* This class is generated from the following WSDL:
* https://heartlandpaymentservices.net/BillingDataManagement/v3/BillingDataManagementService.svc?xsd=xsd2
*/
class AuthenticateRequest
{
/**
* ApplicationID
*
* The property has the following chara... | mit |
balinterdi/twuckoo | lib/twuckoo/duration_string.rb | 421 | module Twuckoo
module DurationString
class << self
MULTIPLIERS = { "s" => 1, "m" => 60, "h" => 60 * 60, "d" => 60 * 60 * 24, "w" => 60 * 60 * 24 * 7 }
def to_seconds(duration)
duration.scan(/(\d+)([smhdw])/).inject(0) do |seconds, match|
num, dur_chr = match
multiplier = MU... | mit |
Muhammadkumail/Car_Secure_Me | example/src/main/java/com/felhr/serialportexample/MyNotification.java | 434 | package com.felhr.serialportexample;
import java.io.Serializable;
public class MyNotification implements Serializable{
private String title;
private String msg;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public ... | mit |
lulurun/earthworm | src/Scraper.js | 411 | module.exports = class Scraper {
/* eslint class-methods-use-this: 0 */
/* eslint-disable no-unused-vars */
scrape(content, emitter) {
throw new Error('You have to implement the method "scrape"!');
/**
* const item = parseForItem(content);
* emitter.emitItem(item);
* ...
* const url = ... | mit |
wonderzhou/read4u | src/main/java/com/zoe/wechat/message/event/SubscribeEvent.java | 89 | package com.zoe.wechat.message.event;
public class SubscribeEvent extends BaseEvent {
} | mit |
Mteuahasan/ror-microblog | public/jspm_packages/npm/aurelia-fetch-client@1.0.0-beta.1.0.1.js | 110 | define(["npm:aurelia-fetch-client@1.0.0-beta.1.0.1/aurelia-fetch-client"], function(main) {
return main;
}); | mit |
samuelcolvin/pydantic | pydantic/errors.py | 17547 | from decimal import Decimal
from pathlib import Path
from typing import TYPE_CHECKING, Any, Callable, Sequence, Set, Tuple, Type, Union
from .typing import display_as_type
if TYPE_CHECKING:
from .typing import DictStrAny
# explicitly state exports to avoid "from .errors import *" also importing Decimal, Path etc... | mit |
whitj00/VpnCoin-mac | src/qt/locale/bitcoin_da.ts | 128797 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="da" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About VPNCoin</source>
<translation>Om VPNCoin</translation>
</message>
<message>
<location l... | mit |
rwaldron/travis-ci | lib/travis/notifications/webhook/payload.rb | 463 | module Travis
module Notifications
class Webhook
class Payload
attr_reader :object
def initialize(object)
@object = object
end
def to_hash
render(:hash)
end
def render(format)
Travis::Renderer.send(format, object, :type => :web... | mit |
emailhunter/workers | config.go | 1783 | package workers
import (
"strconv"
"time"
"github.com/garyburd/redigo/redis"
)
type config struct {
processId string
Namespace string
PollInterval int
Pool *redis.Pool
Fetch func(queue string, concurrency int) Fetcher
}
var Config *config
func Configure(options map[string]string) {
va... | mit |
team5149/2016 | src/subsystems/drivetrain.cpp | 838 | #include "drivetrain.h"
#include "../utils/constants.h"
Drivetrain::Drivetrain()
{
tal_left_a.reset(new Talon {Constants::LEFT_DRIVE_PWM_A});
tal_left_b.reset(new Talon {Constants::LEFT_DRIVE_PWM_B});
tal_right_a.reset(new Talon {Constants::RIGHT_DRIVE_PWM_A});
tal_right_b.reset(new Talon {Constants::RIGHT_DRIVE_P... | mit |
masonium/twinkle | src/spectrum.cpp | 3299 | #include <iostream>
#include "spectrum.h"
#include "util.h"
using std::cout;
using std::cerr;
const spectrum spectrum::zero{0.0};
const spectrum spectrum::one{1.0};
const scalar CIE_RGB_TO_XYZ[3][3] = {{0.4887180, 0.3106803, 0.2006017},
{0.1762044, 0.8129847, 0.0108109},
... | mit |
yogeshsaroya/new-cdnjs | ajax/libs/codemirror/2.36.0/continuecomment.js | 129 | version https://git-lfs.github.com/spec/v1
oid sha256:06a22496a721f9c627cac51da2ff61422d51a47de1ae4b492c9b8bec0fb8d55b
size 1518
| mit |
jlgaffney/neo-gui-wpf | Neo.Gui.Base/Dialogs/Results/Home/HomeDialogResult.cs | 97 | namespace Neo.Gui.Base.Dialogs.Results.Home
{
public class HomeDialogResult
{
}
}
| mit |
omadahealth/SlidePager | lib/src/main/java/com/github/omadahealth/slidepager/lib/views/SlideChartView.java | 19674 | /*
* The MIT License (MIT)
*
* Copyright (c) 2015 Omada Health, 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... | mit |
heneke/php-doctrine-module | src/test/configs/orm.nounits.config.php | 1196 | <?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Hendrik Heneke
*
* 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
... | mit |
SorX14/smart-mirror | public/assets/js/main.js | 12275 | /**
* Created by stephen.parker on 13/03/2016.
*/
var React = require('react');
var ReactDom = require('react-dom');
var $ = jQuery = require('jquery');
var moment = require('moment');
var ReactCSSTransitionGroup = require('react-addons-css-transition-group');
// SetInterval mixin, allowing timed events to occur
va... | mit |
fabricioct/Hedy | src/Hedy.Core.Authentication/Models/Validator/CreateRoleModelValidator.cs | 338 | using FluentValidation;
using Hedy.Core.Authentication.Models;
namespace Hedy.Core.Administration.Models.Validator
{
public class CreateRoleModelValidator : AbstractValidator<CreateRoleModel>
{
public CreateRoleModelValidator()
{
this.RuleFor(x => x.Name).NotNull().Length(3, 64);
... | mit |
abique/vst-bridge | plugin/plugin.cc | 26165 | #include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <limits.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <pthread.h>
#include <signal.h>
#include <list>
#include <X11/Xlib.h>
#define __cdecl
#include "../config.h"
#include ".... | mit |
FlowerWrong/camaleon-cms | app/controllers/camaleon_cms/admin/posts/drafts_controller.rb | 2060 | class CamaleonCms::Admin::Posts::DraftsController < CamaleonCms::Admin::PostsController
before_action :set_post_data_params, only: [:create, :update]
def index
render json: @post_type
end
def create
if params[:post_id].present?
@post_draft = CamaleonCms::Post.drafts.where(post_parent: params[:po... | mit |
handshakinglemma/cwhlstatbot | stat_bot.py | 2676 | from read_file import read_file
import most_stat_per
import most_stat
import team_most_per
import random
from secret import *
import tweepy
def main():
auth = tweepy.OAuthHandler(C_KEY, C_SECRET)
auth.set_access_token(A_TOKEN, A_TOKEN_SECRET)
api = tweepy.API(auth)
skaters = read_file('skaters.... | mit |
landolsi1/tunisiehologram | app/cache/dev/twig/66/6656a11eca60c44de42831f9e574b35f8e29ce66a4fee51d2a84d9541de45cfb.php | 2075 | <?php
/* HologramBundle:Group:new.html.twig */
class __TwigTemplate_6d1459436444d566a8267c304f9f09baeb5af004b296d206df4e29e96825e642 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
$this->parent = $this->loadTemplate("FO... | mit |
workinprog/beebee | src/init.cpp | 29128 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2012 Litecoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "db.h"
#include "walletdb.h... | mit |
gryffon/ringteki | server/game/cards/01-Core/HidaKisada.js | 1781 | const DrawCard = require('../../drawcard.js');
const EventRegistrar = require('../../eventregistrar.js');
const { Locations, CardTypes, EventNames, AbilityTypes } = require('../../Constants');
class HidaKisada extends DrawCard {
setupCardAbilities() {
this.firstActionEvent = null;
this.abilityRegis... | mit |
hks-epod/paydash | tasks/watch.js | 287 | 'use strict';
var Gulp = require('gulp');
var paths = require('../config/assets');
Gulp.task('watch', ['dev-build'], function() {
Gulp.watch(paths.get('/fonts'), ['fonts']);
Gulp.watch(paths.get('/styles'), ['styles']);
// Js watch is done with webpack for performance
});
| mit |
Hackathonners/swap | app/Judite/Models/Student.php | 4358 | <?php
namespace App\Judite\Models;
use Illuminate\Database\Eloquent\Model;
use App\Exceptions\EnrollmentCannotBeDeleted;
use App\Exceptions\StudentIsNotEnrolledInCourseException;
use App\Exceptions\UserIsAlreadyEnrolledInCourseException;
class Student extends Model
{
/**
* The relations to eager load on eve... | mit |
EUDAT-B2STAGE/http-api-base | rapydo/services/authentication/neo4j.py | 9323 | # -*- coding: utf-8 -*-
"""
Implement authentication with graphdb as user database
Note: to delete the whole db
MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r
Remove tokens:
MATCH (a:Token) WHERE NOT (a)<-[]-() DELETE a
"""
import pytz
from datetime import datetime, timedelta
from rapydo.utils.uuid import getUUID
... | mit |
Lazyuki/Discord-Stats-Bot | eventProcessors/imgurUploads.js | 1895 | module.exports.name = 'imgurUploads';
module.exports.events = ['NEW'];
module.exports.initialize = (json, server) => {
server.watchedImagesID = [];
server.watchedImagesLink = [];
if (!json || !json['watchedImagesID']) return;
server.watchedImagesID = json['watchedImagesID'];
server.watchedImagesLink = json['... | mit |
IronCountySchoolDistrict/test-forge | src/logger.js | 283 | import { logger } from './index';
import { printObj } from './util';
export function logErrors(item, msg, e) {
logger.log('info', msg, {
psDbError: printObj(e)
});
if (item) {
logger.log('info', 'Source Data Record: ', {
sourceData: printObj(item)
});
}
}
| mit |
TeamFat/go-way | code/atomic/main.go | 484 | package main
import (
"fmt"
"log"
"net/http"
_ "net/http/pprof"
"runtime"
"sync"
"sync/atomic"
"time"
)
var (
count int32
wg sync.WaitGroup
)
func main() {
go func() {
log.Println(http.ListenAndServe("localhost:8081", nil))
}()
wg.Add(2)
go incCount(1)
go incCount(2)
wg.Wait()
fmt.Println("dfda... | mit |
janko-m/tus-ruby-server | test/test_helper.rb | 132 | require "bundler/setup"
ENV["MT_NO_EXPECTATIONS"] = "1"
require "minitest/autorun"
require "minitest/pride"
require "tus-server"
| mit |
lucas-solutions/work-server | ext/src/form/field/Text.js | 43001 | /**
* @docauthor Jason Johnston <jason@sencha.com>
*
* A basic text field. Can be used as a direct replacement for traditional text inputs,
* or as the base class for more sophisticated input controls (like {@link Ext.form.field.TextArea}
* and {@link Ext.form.field.ComboBox}). Has support for empty-field placeho... | mit |
EvanSimpson/olin-dining-hacks | routes/recipes.js | 2094 | var express = require('express');
var router = express.Router();
var ObjectID = require('mongodb').ObjectID;
module.exports = function(db){
router.post('/recipe', function(req, res){
// post a new recipe and save to database
var ingredients = req.body.ingredients.split(",");
if (req.session.user.id == r... | mit |
novify/batmania | src/Novify/ModelBundle/DataFixtures/ORM/LoadArticles.php | 1550 | <?php
namespace Novify\ModelBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Novify\ModelBundle\Entity\Articles;
use Novify\ModelBundle\Entity\Categories;
use Novify\ModelBundle\Entity\Souscategories;
class LoadArticles implements FixtureIn... | mit |
georgeouzou/survgr | transform/migrations/0002_load_hattblocks15.py | 1152 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-22 15:28
from __future__ import unicode_literals
import os, json
from django.db import migrations
def load(apps, schema_editor):
Hattblock = apps.get_model("transform", "Hattblock")
OKXECoefficient = apps.get_model("transform", "OKXECoefficient")
cur_d... | mit |
tinylabproductions/tlplib | parts/0000-TLPLib/Assets/Vendor/TLPLib/Test/FunTween/TweenCallbackTest.cs | 5472 | using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using com.tinylabproductions.TLPLib.Functional;
using tlplib.reactive;
using tlplib.test_framework;
using com.tinylabproductions.TLPLib.Tween.fun_tween;
using NUnit.Framework;
namespace com.tinylabproductions.TLPLib.FunTween {
usin... | mit |
SolutionheadOpenTech/EF-Split-Projector | Tests/LINQMethods/DefaultIfEmpty_Value.cs | 403 | using System.Linq;
using NUnit.Framework;
namespace Tests.LINQMethods
{
[TestFixture]
public class DefaultIfEmpty_Value : LINQQueryableInventoryMethodTestBase<IntegratedTestsBase.InventorySelect>
{
protected override IQueryable<InventorySelect> GetQuery(IQueryable<InventorySelect> source)
{... | mit |
ucdavis/Commencement | Commencement.Core/Domain/TemplateToken.cs | 819 | using System.ComponentModel.DataAnnotations;
using FluentNHibernate.Mapping;
using UCDArch.Core.DomainModel;
namespace Commencement.Core.Domain
{
public class TemplateToken : DomainObject
{
[Required]
public virtual TemplateType TemplateType { get; set; }
[Required]
... | mit |
rjbernaldo/hivemind | server/views/line_graph_view.js | 206 | function LineGraphView(io) {this.io = io;}
LineGraphView.prototype = {
update: function(topHashtagCounts) {
this.io.sockets.emit('new count', topHashtagCounts);
}
}
module.exports = LineGraphView;
| mit |
spurdocoin/spurdocoin | src/rpcwallet.cpp | 53716 | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include "wallet.h"
#include "walletdb.h"
#include... | mit |
anudeepsharma/azure-sdk-for-java | azure-mgmt-servicebus/src/main/java/com/microsoft/azure/management/servicebus/implementation/TopicAuthorizationRulesImpl.java | 5193 | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.servicebus.implementation;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.mi... | mit |
awto/effectfuljs | packages/core/test/samples/break-stmt/test2-out-ft.js | 299 | import * as M from "@effectful/core";
// *- when it is the last statement
(function () {
var ctx = M.context();
return M.scope(f_1);
});
function f_1(ctx) {
return M.chain(eff(2), f_2);
}
function f_2(ctx, a) {
if (a) {} else {
return M.chain(eff(3), f_3);
}
}
function f_3(ctx) {} | mit |
Iluvatar82/helix-toolkit | Source/HelixToolkit.SharpDX.Shared/Core/Lights/LightCoreBase.cs | 3943 | /*
The MIT License (MIT)
Copyright (c) 2018 Helix Toolkit contributors
*/
using SharpDX;
using SharpDX.Direct3D11;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
#if !NETFX_CORE
namespace HelixToolkit.Wpf.SharpDX.Core
#else
namespace HelixToolkit.UWP.Core
#endif
{
using Mod... | mit |
mungobungo/coursera | parallel_scala/reductions/src/main/scala/reductions/LineOfSight.scala | 3503 | package reductions
import org.scalameter._
import common._
object LineOfSightRunner {
val standardConfig = config(
Key.exec.minWarmupRuns -> 40,
Key.exec.maxWarmupRuns -> 80,
Key.exec.benchRuns -> 100,
Key.verbose -> true
) withWarmer(new Warmer.Default)
def main(args: Array[String]) {
v... | mit |
acadet/wanderer-android | app/src/main/java/com/adriencadet/wanderer/ui/screens/PlaceListScreen.java | 509 | package com.adriencadet.wanderer.ui.screens;
import com.adriencadet.wanderer.ui.controllers.body.PlaceListController;
import com.lyft.scoop.Controller;
import com.lyft.scoop.EnterTransition;
import com.lyft.scoop.ExitTransition;
import com.lyft.scoop.Screen;
import com.lyft.scoop.transitions.FadeTransition;
/**
* Pl... | mit |
prinsmike/go-start | utils/xmlwriter.go | 3143 | package utils
import (
"fmt"
"html"
"io"
"github.com/ungerik/go-start/errs"
"github.com/ungerik/go-start/reflection"
// "github.com/ungerik/go-start/debug"
)
///////////////////////////////////////////////////////////////////////////////
// XMLWriter
func NewXMLWriter(writer io.Writer) *XMLWriter {
if xmlWri... | mit |
roc/govuk_template | source/assets/javascripts/core.js | 697 | (function() {
// fix for printing bug in Windows Safari
var windowsSafari = (window.navigator.userAgent.match(/(\(Windows[\s\w\.]+\))[\/\(\s\w\.\,\)]+(Version\/[\d\.]+)\s(Safari\/[\d\.]+)/) !== null),
style;
if (windowsSafari) {
// set the New Transport font to Arial for printing
style = document.c... | mit |
tkrekry/tkrekry-admin | app/scripts/services/user.js | 809 | angular.module('tkrekryApp')
.factory('User', function($resource) {
'use strict';
return $resource('/api/users/:id', {
id: '@id'
}, { //parameters default
update: {
method: 'PUT',
params: {
id: '@id'
... | mit |
suxinde2009/TheFirstMyth02 | src/com/game/fengshen/GameActivity.java | 1739 | package com.game.fengshen;
import com.example.fengshen.R;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import android.view.Window;
import android.view.WindowManager;
public class GameActivity ex... | mit |
jinutm/silvfinal | vendor/bundle/ruby/2.1.0/gems/high_voltage-2.0.0/config/routes.rb | 117 | Rails.application.routes.draw do
if HighVoltage.routes
get HighVoltage.route_drawer.match_attributes
end
end
| mit |
plotly/python-api | packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py | 487 | import _plotly_utils.basevalidators
class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="ticksuffix", parent_name="barpolar.marker.colorbar", **kwargs
):
super(TicksuffixValidator, self).__init__(
plotly_name=plotly_name,
... | mit |
NZJenkins/ChessAnt | util.js | 4003 | "use strict";
//Zobrist lookup table and hash object
var ZobristTable = function(){
var numbers = ZobristTable.toMove + 1;
//buffer of 64 bit ints
this.randomBuffer = new ArrayBuffer(numbers * 8);
this.view = new Uint32Array(this.randomBuffer);
this.Initialize();
}
ZobristTable.wPiece = 0;
ZobristTable.bPiece =... | mit |
xhhjin/heroku-ghost | node_modules/mysql/test/integration/pool/test-pool-escape.js | 777 | var common = require('../../common');
var assert = require('assert');
var pool = common.createPool();
// standard test
assert.equal(pool.escape('Super'), "'Super'");
// object stringify test
assert.equal(pool.escape({ a: 123 }), "`a` = 123");
// cannot simply test with default timezone, because i don't kown ... | mit |
Georgegig/EstateSocialSystem | Source/EstateSocialSystem/EstateSocialSystem.Data/Migrations/Configuration.cs | 657 | namespace EstateSocialSystem.Data.Migrations
{
using System.Data.Entity.Migrations;
public sealed class Configuration : DbMigrationsConfiguration<EstateSocialSystemDbContext>
{
public Configuration()
{
this.AutomaticMigrationsEnabled = true;
//// TODO: Remove in prod... | mit |
rpgdude/r2b | app/scripts/app.js | 266 | 'use strict';
angular.module('r2bExpressApp', [])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.otherwise({
redirectTo: '/'
});
});
| mit |
stivalet/PHP-Vulnerability-test-suite | Injection/CWE_91/safe/CWE_91__GET__func_intval__ID_at-sprintf_%s_simple_quote.php | 1351 | <?php
/*
Safe sample
input : reads the field UserData from the variable $_GET
sanitize : use of intval
construction : use of sprintf via a %s with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute this s... | mit |
berle/modula-client | src/Logger.php | 845 | <?php namespace Eyego\Modula\Client;
class Logger
{
protected $filename, $callback;
public function __construct($target = null) {
if ($target instanceof \Closure) {
$this->callback = $target;
} elseif (! is_null($target)) {
$this->filename = $target;
}
}
... | mit |
OctoEnigma/shiny-octo-system | lua/menu/getmaps.lua | 9756 |
local MapPatterns = {}
local MapNames = {}
local function UpdateMaps()
MapPatterns = {}
MapNames = {}
MapNames[ "aoc_" ] = "Age of Chivalry"
MapPatterns[ "^asi-" ] = "Alien Swarm"
MapNames[ "lobby" ] = "Alien Swarm"
MapNames[ "cp_docks" ] = "Blade Symphony"
MapNames[ "cp_parkour" ] = "Blade Symphony"
MapN... | mit |
liangqikang/gulosity | app/config/app.php | 6927 | <?php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every ... | mit |
intelcommerce/ffcrm_project_management | lib/ffcrm_project_management/engine.rb | 3488 | require 'project_view_hooks'
module FfcrmProjectManagement
class Engine < ::Rails::Engine
initializer :load_config_initializers do
config.paths["config/initializers"].existent.sort.each do |initializer|
load(initializer)
end
end
config.to_prepare do
require 'ffcrm_project_manag... | mit |
remind101/emp | env.go | 3391 | package main
import (
"fmt"
"log"
"os"
"sort"
"strings"
"github.com/remind101/emp/Godeps/_workspace/src/github.com/docker/docker/opts"
)
var cmdEnv = &Command{
Run: runEnv,
Usage: "env",
NeedsApp: true,
Category: "config",
Short: "list env vars",
Long: `Show all env vars.`,
}
func runEnv(... | mit |
nekollx/RPBot | guildsetup.js | 3468 | const Discord = require('discord.js');
const client = new Discord.Client();
const token = "MjgwODM3NTg5MzAzMjk2MDEw.C4PN6w.Y2v3G9p02tcnilUmmh0PpCUngAU";
const ddiff = require('return-deep-diff');
client.on('ready', () => {
console.log('I\'m Online\nI\'m Online');
});
// client.on('',''=>{});
client.on('guildDelete'... | mit |
joeyvandijk/rimg | test/examples/simple.js | 1280 | casper.test.begin('Simple test', 55, function suite(test) {
var currentURL = params.url + '/simple.html';
casper.start(currentURL, function() {
test.assertTitle('simple test', "page title is okay");
});
casper.then(function() {
casper.checkImage(test, 319, 480, 'tiny');
casper.c... | mit |
jwilder/shuttle | registry.go | 13822 | package main
import (
"fmt"
"reflect"
"sort"
"strings"
"sync"
"github.com/litl/shuttle/client"
"github.com/litl/shuttle/log"
)
var (
ErrNoService = fmt.Errorf("service does not exist")
ErrNoBackend = fmt.Errorf("backend does not exist")
ErrDuplicateService = fmt.Errorf("service already exists... | mit |
floeit/floe | config/flow.go | 5590 | package config
import (
"fmt"
"io/ioutil"
"strings"
"github.com/cavaliercoder/grab"
nt "github.com/floeit/floe/config/nodetype"
yaml "gopkg.in/yaml.v2"
)
// FlowRef is a reference that uniquely identifies a flow
type FlowRef struct {
ID string
Ver int
}
func (f FlowRef) String() string {
if f.ID == "" {
... | mit |
ptournem/AXIS_MoM_WebSite | app/Providers/CommentsServiceProvider.php | 500 | <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\App;
class CommentsServiceProvider extends ServiceProvider {
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot() {
//
}
/**
* Register the... | mit |
heartshare/cmf-1 | based/vendor/swiftmailer/swiftmailer/tests/acceptance/Swift/Transport/StreamBuffer/SslSocketAcceptanceTest.php | 1303 | <?php
require_once __DIR__ . '/AbstractStreamBufferAcceptanceTest.php';
class Swift_Transport_StreamBuffer_SslSocketAcceptanceTest
extends Swift_Transport_StreamBuffer_AbstractStreamBufferAcceptanceTest
{
public function setUp()
{
$streams = stream_get_transports();
if (!in_array('ssl', $s... | mit |
L5hunter/TestCoin | src/qt/locale/bitcoin_nb.ts | 145488 | <TS language="nb" version="2.0">
<context>
<name>AddressBookPage</name>
<message>
<source>Double-click to edit address or label</source>
<translation>Dobbelklikk for å redigere adresse eller merkelapp</translation>
</message>
<message>
<source>Create a new address</source>
... | mit |
jballe/Kragefolket.Website | src/web/wp-content/themes/radiate/content-single.php | 1911 | <?php
/**
* The template used for displaying page content in single.php
*
* @package ThemeGrill
* @subpackage Radiate
* @since Radiate 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-... | mit |
HenryLoenwind/AgriCraft | src/main/java/com/InfinityRaider/AgriCraft/compatibility/natura/NaturaHelper.java | 3030 | package com.InfinityRaider.AgriCraft.compatibility.natura;
import com.InfinityRaider.AgriCraft.blocks.BlockCrop;
import com.InfinityRaider.AgriCraft.compatibility.ModHelper;
import com.InfinityRaider.AgriCraft.farming.CropPlantHandler;
import com.InfinityRaider.AgriCraft.handler.ConfigurationHandler;
import com.Infini... | mit |
grofit/treacherous | dist/commonjs/rules/regex-validation-rule.js | 954 | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var type_helper_1 = require("../helpers/type-helper");
var RegexValidationRule = /** @class */ (function () {
function RegexValidationRule() {
this.ruleName = "regex";
}
RegexValidationRule.p... | mit |
somacoin/somacoin | src/qt/locale/bitcoin_eo.ts | 101436 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="eo" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Somacoin</source>
<translation>Pri Somacoin</translation>
... | mit |
FIPress/fiputil | collection.go | 215 | package fiputil
func mapArray(in interface{}, out interface{}) {
/*l := len(in)
if l == 0 {return}
//reflect
out = make([]BlogInfo,l)
for i:=0;i<l;i++ {
blog := in[i]
out[i] = newBlogBrief(&blog)
}*/
}
| mit |
creepycheese/yandex-kassa-api | lib/yandex_kassa/api.rb | 940 | module YandexKassa
class Api
include Requests
def initialize(params = {})
@response_parser = params.fetch(:response_parser)
@url = params.fetch(:url)
@cert_file = params.fetch(:cert_file)
@key_file = params.fetch(:key_file)
@request_signer = params.fetch(:request_signer)
end... | mit |
science09/SpringBootDemo | src/main/java/com/example/entity/User.java | 1996 | package com.example.entity;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
/**
*... | mit |
project-ellis/ellis | src/stream/fd_input_stream.cpp | 2527 | /*
* Copyright (c) 2016 Surround.IO Corporation. All Rights Reserved.
* Copyright (c) 2017 Xevo Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restr... | mit |
olegburov/Introduction-to-TypeScript | src/FamousPainters/scripts/painter/painterExample.ts | 355 | namespace Painter
{
export class PainterExample implements Interfaces.IExample
{
name: string;
year: string;
type: string;
image: string;
constructor(example: Interfaces.IExample)
{
this.name = example.name;
this.year = example.year;
this.type = example.type;
this.i... | mit |
angular/angular-cli-stress-test | src/app/components/comp-3412/comp-3412.component.spec.ts | 847 | /**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Comp3412Component } from './comp... | mit |
PuercoPop/EleccionesPeru | test_cases/Ejemplo_Acta_Congreso_2_files/general.js | 3556 | /* Función que retira espacios en blanco al principio y al final de la cadena*/
/* Reemplaza además dos o mas espacios por uno solo dentro de la cadena.*/
function trim(inputString){
if (typeof inputString != "string")
return inputString;
var retValue = inputString;
var ch = retValue.subs... | mit |
Aqwis/verk | src/parsers/dusken.py | 684 | import sys
from bs4 import BeautifulSoup
def parse(raw_html, verbose=False):
soup = BeautifulSoup(raw_html, 'html.parser')
contents_list = soup.find_all("section", class_='article')
if len(contents_list) > 1:
raise Exception()
contents = contents_list[0]
try:
contents.find(class_='factboxcontainer').... | mit |
d-saitou/Spring4MvcExample | src/main/java/com/example/springmvc/domain/entity/jpa/MUserRole.java | 839 | package com.example.springmvc.domain.entity.jpa;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
import com.example.springmvc.utility.StringUtility;
import lombok.Data;
/**
... | mit |
ArtOfCode-/nails | src/library/cookies.js | 1122 | 'use strict';
const Cookies = require('cookies');
const getCookie = (get, ...args) => {
const str = get(...args);
// istanbul ignore if: this is only for compatibility with the library itself
if (args[0].endsWith('.sig')) {
return str;
}
if (str == null || str === 'undefined') {
return;
}
return... | mit |
jimanx2/myoffice | app/controllers/paymentstats_controller.rb | 57 | class PaymentstatsController < ApplicationController
end
| mit |
juan-gamez/simapro | application/controllers/Grupos.php | 6066 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Grupos extends LoggedInController {
function __construct()
{
parent::__construct();
$this->load->model('MGrupos','',TRUE);
$this->load->model('MAreasAdministrativas','',TRUE);
$this->load->helper('url');
}
function ... | mit |
kspearrin/NPress | src/Core/Repositories/IBlogRepository.cs | 255 | using System.Threading.Tasks;
using NPress.Core.Domains;
namespace NPress.Core.Repositories
{
public interface IBlogRepository
{
Task<Blog> GetAsync();
Task CreateAsync(Blog blog);
Task ReplaceAsync(Blog blog);
}
}
| mit |
danielwegener/unluac-scala | shared/src/main/scala/unluac/decompile/branch/OrBranch.scala | 802 | package unluac.decompile.branch
import unluac.decompile.Registers
import unluac.decompile.expression.BinaryExpression
import unluac.decompile.expression.Expression
case class OrBranch(left: Branch, right: Branch) extends Branch(right.line, right.begin, right.end) {
def invert: Branch = {
new AndBranch(left.inv... | mit |
achan/android-reddit | src/com/pocketreddit/library/things/UserSubmittedContent.java | 2958 | package com.pocketreddit.library.things;
import com.pocketreddit.library.things.Subreddit;
import com.pocketreddit.library.things.Thing;
import com.pocketreddit.library.Created;
import com.pocketreddit.library.Votable;
public abstract class UserSubmittedContent extends Thing implements Created, Votable {
private ... | mit |
BarryThePenguin/ava | lib/reporters/mini.js | 9376 | 'use strict';
const StringDecoder = require('string_decoder').StringDecoder;
const path = require('path');
const cliCursor = require('cli-cursor');
const lastLineTracker = require('last-line-stream/tracker');
const plur = require('plur');
const spinners = require('cli-spinners');
const chalk = require('chalk');
const c... | mit |