repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
9Cloud/orion | site/guide/routes.tsx | 2099 | import * as React from "react";
import {action} from "mobx";
import {route} from "tide/router/route";
import {bind_all_methods} from "tide/utils/object";
import {Home} from "./views/home";
import {Interactions} from "./views/interactions";
import {UIComponents} from "./views/components";
import {HelpersPage} from "./v... | mit |
stivalet/PHP-Vulnerability-test-suite | Injection/CWE_90/safe/CWE_90__POST__whitelist_using_array__userByCN-sprintf_%s_simple_quote.php | 1508 | <?php
/*
Safe sample
input : get the field UserData from the variable $_POST
SANITIZE : use in_array to check if $tainted is in the white list
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
... | mit |
mikeireland/pyxao | doc/conf.py | 9331 | # -*- coding: utf-8 -*-
#
# pyxao documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 11 12:35:11 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | mit |
julio73/scratchbook | code/fizzbuzz/fizzbuzz.py | 321 | import sys
def fizzbuzz(number):
for x in xrange(1, number+1):
div5 = x%5 == 0
div3 = x%3 == 0
if div5 and div3:
print "fizz-buzz"
elif div3:
print "buzz"
elif div5:
print "fizz"
else:
print x
if __name__ == '__main__':
if sys.argv[1:]:
fizzbuzz(int(sys.argv[1])... | mit |
Bullseyed/Bullseye | app/components/Threads/SingleThread.js | 1990 | import React, { Component } from 'react';
import { Row, Col, Button } from 'react-materialize';
import { connect } from 'react-redux';
import { upvoteThread } from '../../reducers/thread-reducer';
import Comments from './Comments';
import AddComment from './AddComment';
class SingleThread extends Component {
construc... | mit |
sygcom/diesel_2016 | application/controllers/crm/bkp/Products_2016_09_12.php | 13874 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Products extends CI_Controller {
var $database_limit = 10;
public function __construct() {
parent::__construct();
$this->load->helper('crm');
$this->load->helper('common');
$this->load->library('Digg... | mit |
cie/rubylog | benchmark/benchmark.rb | 2494 | #!/usr/bin/env ruby
# benchmark
#
# The task is to collect all grandparent-granchild relationships in a family
# tree to an array.
# First it is done with pure rubylog. Second, it is done with compiled rubylog
#
#
require "rubylog"
require "benchmark"
require "ruby-prof"
DEGREES = 3
LEVELS = 6
NAME_LENGTH = 5
class... | mit |
sgwill/familyblog | Tests/Williamsonfamily.Models.Tests/Family/FamilyRepositoryTests.cs | 2085 | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WilliamsonFamily.Models.Data;
using WilliamsonFamily.Models.Data.Tests;
namespace Williamsonfamily.Models.Tests
{
[TestClass]
public class FamilyRepositoryTests
{
#region Load Tests
[TestMethod]
public void Fam... | mit |
JFCCoding12/ellen-s-mirror | plugins/rss/controller.js | 1618 | function Rss($scope, $http, $q, $interval) {
$scope.currentIndex = 0;
var rss = {};
rss.feed = [];
rss.get = function () {
rss.feed = [];
rss.updated = new moment().format('MMM DD, h:mm a');
if (typeof config.rss != 'undefined' && typeof config.rss.feeds != 'undefined') {
var promises = [];
angular.f... | mit |
HackMerced/Admit | client/assets/js/src/components.js | 4247 | function generateComponents(){
Vue.component('hilite', {
props: ['text'],
template: '<span class="hilite">{{ text }}</span>'
});
Vue.component('information', {
props: ['info', 'hilite'],
template: '<div class="information">{{ info }} <hilite v-bind:text="hilite"></hilite></div>'
});
Vue.com... | mit |
dragonworx/axial | test/lib/test.js | 252795 | /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ retu... | mit |
hydrogen-music/hydrogen-music | feeds/drumkit_list.php | 20357 | <?xml version='1.0' encoding='UTF-8'?><drumkit_list>
<drumkit>
<name>Audiophob</name>
<url>http://hydro.smoors.de/Audiophob.h2drumkit</url>
<info>Cheap sounds from freesound.org with no copyright</info>
<author>soundcloud.com/audiophobdubstep</author>
<license>This work is licensed under the Creative Commons 0 License.... | mit |
naelstrof/PugBot-Discord-Django | pugbot/cogs/pug.py | 47354 | import asyncio
import collections
import collections.abc
import contextlib
import functools
import heapq
import itertools
import random
import re
import shelve
import os
from discord.ext import commands
import discord
import pendulum
PICKMODES = [
[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
[0, ... | mit |
bccaddress/bccaddress.org | src/ninja.qrcode.js | 2631 | (function (ninja) {
var qrC = ninja.qrCode = {
// determine which type number is big enough for the input text length
getTypeNumber: function (text) {
var lengthCalculation = text.length * 8 + 12; // length as calculated by the QRCode
if (lengthCalculation < 72) { return 1; }
else if (lengthCalculation <... | mit |
m-enochroot/websync | client/app/admin/admin.controller.ts | 350 | 'use strict';
(function() {
class AdminController {
constructor(User) {
// Use the User $resource to fetch all users
this.users = User.query();
}
delete(user) {
user.$remove();
this.users.splice(this.users.indexOf(user), 1);
}
}
angular.module('gatewayApp.admin')
.controller('AdminControll... | mit |
workshare/swaggable | spec/swaggable/rack_response_adapter_spec.rb | 1331 | require_relative '../spec_helper'
RSpec.describe Swaggable::RackResponseAdapter do
let(:subject_class) { Swaggable::RackResponseAdapter }
subject { subject_class.new rack_request }
let(:rack_request) { [200, {}, []] }
describe '#content_type' do
it 'returns CONTENT_TYPE' do
rack_request[1]['Content-... | mit |
elize1979/AzureKeyVaultExplorer | Vault/Explorer/SettingsDialog.Designer.cs | 16213 | namespace Microsoft.Vault.Explorer
{
partial class SettingsDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/... | mit |
JoostvanPinxten/tsplib-parser | parser/location.hh | 5367 | // A Bison parser, made by GNU Bison 3.0.
// Locations for Bison parsers in C++
// Copyright (C) 2002-2013 Free Software Foundation, Inc.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, ei... | mit |
jerimum-bug-tracker/jerimum | features/screens/favorites_screen.rb | 2229 | class FavoritesScreen
def initialize(browser)
@browser = browser
@home_favorites = @browser.a(text: "Favorites")
@add_favorites = @browser.is(text: "star_border")
@remove_favorites = @browser.is(text: "grade")
#PROJECT
#@project_title_home = @browser.ul(index: 0).li.... | mit |
couchbaselabs/mini-hacks | android-rating-app/android/app/src/main/java/com/couchbase/ratingapp/StorageManager.java | 4469 | package com.couchbase.ratingapp;
import android.content.Context;
import android.util.Log;
import com.couchbase.lite.CouchbaseLiteException;
import com.couchbase.lite.Database;
import com.couchbase.lite.Emitter;
import com.couchbase.lite.Manager;
import com.couchbase.lite.Mapper;
import com.couchbase.lite.Reducer;
imp... | mit |
reinforced/Reinforced.Lattice.Samples | Reinforced.Lattice.CaseStudies.Formwatcher/doc/loading-overlap.cs | 184 | // Configure loading overlap to overlap all table layout
// and also elements having filterColumn class
conf.LoadingOverlap(ui => ui.Overlap(OverlapMode.All).Overlap(".filterColumn")); | mit |
rheoli/SDX | lib/goliath/rack/validation/required_param.rb | 1858 | require 'goliath/rack/validator'
module Goliath
module Rack
module Validation
# A middleware to validate that a given parameter is provided.
#
# @example
# use Goliath::Rack::Validation::RequiredParam, {:key => 'mode', :type => 'Mode'}
#
class RequiredParam
include Go... | mit |
VIPShare/VIPShare | src/screens/RecommendScreen/RecommendScreen/index.style.js | 508 | import { width, size, colors } from '../../../theme';
export default {
banner: {
container: {
flexDirection: 'row',
},
image: {
width,
height: 220,
resizeMode: 'contain',
},
},
content: {
container: {
paddingTop: 20,
paddingLeft: 20,
paddingRight: 20,... | mit |
internsaccount/ovfwrapper | Properties/Settings.Designer.cs | 1098 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... | mit |
MalucoMarinero/react-wastage-monitor | npm/index.js | 3212 | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va... | mit |
tiagoamaro/sapos | db/migrate/20131118160144_add_workload_to_courses.rb | 262 | # Copyright (c) Universidade Federal Fluminense (UFF).
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file.
class AddWorkloadToCourses < ActiveRecord::Migration
def change
add_column :courses, :workload, :integer
end
end
| mit |
neyko5/mtgslo | config/admin/formats.php | 846 | <?php
return array(
'form'=>array(
'fields' => array(
array(
'type' => 'text',
'name' => 'name',
'label' => 'Name'
),
),
'controls' => array(
'save',
... | mit |
griffithsh/sqlite-squish | cmd/sqlite-squish/doc.go | 530 | /*
command sqlite-squish provides an interface to convert between SQL statements
in plain-text *.sql files and sqlite databases.
Given a sqlite database called `database.sqlite3`, it is possible to
decompose it to a series of text files like this:
sqlite3 database.sqlite3 .dump | sqlite-squish -v -out-dir ./database... | mit |
eemebarbe/schemeBeam | public/js/vendors.js | 757 | !function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n=window.webpackJsonp;window.webpackJsonp=function(o,p){for(var l,c,s=0,i=[];s<o.length;s++)c=o[s],a[c]&&i.push.apply(i,a[c]),a[c]=0;for(l in p)Object.prototy... | mit |
datasift/served | src/served/mux/matchers.test.cpp | 3416 | /*
* Copyright (C) MediaSift Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, ... | mit |
DaanHaaz/TypeFighter | ending.js | 1878 | Ending = Class.extend("Ending");
Ending.init = function () {
baa.graphics.setBackgroundColor(0,0,0);
this.keys = Object.keys(WORDS);
this.start = 0;
this.otherStart = 0;
this.percentage = (Game.listOfWords.length/this.keys.length)*100;
this.percentage = Math.floor(this.percentage*10000)/10000;
}
Ending.update ... | mit |
qoomon/domain-value | src/main/java/com/qoomon/domainvalue/type/BigDecimalDV.java | 767 | package com.qoomon.domainvalue.type;
import java.math.BigDecimal;
public abstract class BigDecimalDV extends ComparableDV<BigDecimal> {
protected BigDecimalDV(final BigDecimal value) {
super(value);
}
protected BigDecimalDV(final String stringValue) {
this(new BigDecimal(stringValue));
... | mit |
vihoangson/LearningEnglish | application/config/autoload.php | 3902 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the fr... | mit |
staabm/After | lib/Promisor.php | 2211 | <?php
namespace After;
/**
* A Promisor is a contract to resolve a value at some point in the future
*
* The After\Promisor is NOT the same as the common JavaScript "promise" idiom. Instead,
* After defines a "Promise" as an internal agreement made by producers of asynchronous
* results to fulfill a placeholder ... | mit |
webcaetano/phaser-boilerplate | src/scripts/preload.js | 577 | var utils = require('utils');
var _ = require('lodash');
var Phaser = require('phaser');
var {scope,game,craft} = require('./main');
var assets = {
images:{
phaser:'images/phaser-dude.png'
},
sprites:{},
audio:{},
atlas:{}
}
var scope = {};
module.exports = function(){
var state = {};
state.init = function... | mit |
zyphrus/Akaro | Engine/graphics/drawable.cpp | 1239 | /*
* drawable.cpp
*
* Created on: 15/10/2013
* Author: drb
*/
#include "drawable.h"
namespace graphics
{
drawable::drawable()
{
//Set the rectangle to be (0,0,0,0)
this->pos.x = 0;
this->pos.y = 0;
this->area.x = 0;
this->area.y = 0;
this->area.w = 0;
this->area.h = 0;
this->adjust_cam... | mit |
vrezin/bookcase-test | src/main/java/com/hc/bookcase/book/tmp/repository/TMPRepository.java | 504 | package com.hc.bookcase.book.tmp.repository;
import com.hc.bookcase.book.tmp.model.TMPBookEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;
@NoRepositoryBean
public interface TMPRepository<T extends TMPBookEntity> extends JpaRepository<T... | mit |
thcmc/th | app/controllers/api.server.controller.js | 14995 | 'use strict';
var secrets = require('../../config/secrets');
var User = require('../models/User');
var querystring = require('querystring');
var validator = require('validator');
var async = require('async');
var cheerio = require('cheerio');
var request = require('request');
var _ = require('underscore');
var graph =... | mit |
mr-uuid/snippets | python/sockets/clients/async_client.py | 688 | import errno
import socket
def asyn_client(ip='localhost', port=8080):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(ip, port)
sock.setblocking(0)
try:
new_data = sock.recv(1024)
except socket.error, e:
if e.args[0] == errno.EWOULDBLOCK:
# This e... | mit |
mk-prg-net/mk-prg-net.lib | ATMO.mko.Logging/Monitoring/JobMonitoringConsole.cs | 6182 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Concurrent;
using TechTerms = ATMO.mko.Logging.PNDocuTerms.DocuEntities.Composer.TechTerms;
using static ATMO.mko.Logging.PNDocuTerms.DocuEntities.ComposerSubTrees;
namespace ... | mit |
Grizzlybeardesignltd/davidcullimore | page-templates/investment.php | 5525 | <?php
/*
Template Name: Investment Template
*/
get_header();
?>
<?php echo get_template_part('parts/content', 'banner'); ?>
<section id="content" class="os-animation animated fadeIn">
<?php while (have_posts()) : the_post(); ?>
<div class="row">
<div class="medium-5 columns rightCenter">
... | mit |
pbanaszkiewicz/amy | amy/trainings/filters.py | 4915 | import re
from django.db.models import Q
from django.forms import widgets
import django_filters
from workshops.fields import ModelSelect2Widget
from workshops.filters import AMYFilterSet, NamesOrderingFilter
from workshops.forms import SELECT2_SIDEBAR
from workshops.models import Event, Person
def filter_all_person... | mit |
Pihta-Open-Data/TransportNocturnal | src/main/java/ru/pihta/nocturnaltransport/model/LocalTimePersistenceConverter.java | 519 | package ru.pihta.nocturnaltransport.model;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import java.sql.Time;
import java.time.LocalTime;
@Converter
public class LocalTimePersistenceConverter implements AttributeConverter<LocalTime, Time> {
@Override
public Time convertToDa... | mit |
katajakasa/Raidcal | raidcal/maincal/migrations/0004_auto_20151114_2029.py | 2451 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import datetime
from django.utils.timezone import utc
import tinymce.models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(se... | mit |
adonisjs/adonis-sink | test/json-file.spec.ts | 2297 | /*
* @adonisjs/sink
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import test from 'japa'
import { join } from 'path'
import { Filesystem } from '@poppinss/dev-utils'
import { JsonFile... | mit |
SlashGames/slash-framework | Source/Slash.Unity.Common/Source/Input/Handlers/IDragOverHandler.cs | 278 | namespace Slash.Unity.Common.Input.Handlers
{
using UnityEngine.EventSystems;
public interface IDragOverHandler : IEventSystemHandler
{
#region Public Methods and Operators
void OnDragOver(PointerEventData eventData);
#endregion
}
} | mit |
cinder14/echosign_sdk_csharp | Source/Cinder14.EchoSign/Endpoints/LibraryDocumentEndpoint.cs | 998 | using Cinder14.EchoSign.Models;
using RestSharp;
using System.Threading.Tasks;
namespace Cinder14.EchoSign.Endpoints
{
public class LibraryDocumentEndpoint : EndpointBase
{
public LibraryDocumentEndpoint(EchoSignSDK api)
: base(api)
{
}
/// <summary>
/// R... | mit |
TheCheat/CTRev | include/classes/class.attachments.php | 10493 | <?php
/**
* Project: CTRev
* @file include/classes/class.attachments.php
*
* @page http://ctrev.cyber-tm.ru/
* @copyright (c) 2008-2012, Cyber-Team
* @author The Cheat <cybertmdev@gmail.com>
* @name Реализация вложений
* @version 1.00
*/
if (!defined(... | mit |
SpartaHack/SpartaHack2016-Windows | 2016/SpartaHack/Parse/Public/ParsePushNotificationEventArgs.cs | 1387 | // Copyright (c) 2015-present, Parse, LLC. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory.
using System;
using System.Collec... | mit |
sonicyang/chiphub | login/migrations/0005_auto_20151108_1213.py | 768 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('login', '0004_auto_20151108_1139'),
]
operations = [
migrations.AlterField(
model_name='login_sessions',
... | mit |
DocuWare/PlatformJavaClient | src/com/docuware/dev/schema/_public/services/platform/Notifications.java | 4351 |
package com.docuware.dev.schema._public.services.platform;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.net.URI;
import com.docuware.dev.Extensions.*;
import java.util.concurrent.CompletableFuture;
import java.util.*;
import com.docuware.dev.schema._public.services.Link;
import... | mit |
Jeroen96/Project-Novus | Oculus/src/app/app-routing/auth-guard.service.ts | 458 | import { Router, CanActivate } from '@angular/router';
import { LoginService } from './../login/login.service';
import { Injectable } from '@angular/core';
@Injectable()
export class AuthGuardService implements CanActivate {
constructor(private loginService: LoginService, private router: Router) { }
canActivate()... | mit |
louistin/fullstack | Python/module/base64_20161020.py | 313 | #!/usr/bin/python
# _*_ coding: utf-8 _*_
import base64
print base64.b64encode('louis%20luna')
print base64.b64decode('bG91aXMlMjBsdW5h')
# urlsafe的base64
print base64.b64encode('i\xb7\x1d\xfb\xef\xff')
print base64.urlsafe_b64encode('i\xb7\x1d\xfb\xef\xff')
print repr(base64.urlsafe_b64decode('abcd--__'))
| mit |
hubrix/acs | db/migrate/20101223204622_add_completed_by_to_access_requests.rb | 223 | class AddCompletedByToAccessRequests < ActiveRecord::Migration
def self.up
add_column :access_requests, :completed_by_id, :integer
end
def self.down
remove_column :access_requests, :completed_by_id
end
end
| mit |
dev-lucid/container | tests/NewConstructorTest.php | 2995 | <?php
use Lucid\Container\InjectorFactoryContainer;
use Lucid\Container\Constructor\Constructor;
use Lucid\Container\Constructor\Parameter\Fixed;
use Lucid\Container\Constructor\Parameter\Container;
use Lucid\Container\Constructor\Parameter\Closure;
class NewConstructorTest_class1
{
public function testMethod1()
... | mit |
Ajroudi/behmanager | src/Manager/CommercialBundle/Controller/DefaultController.php | 288 | <?php
namespace Manager\CommercialBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
return $this->render('ManagerCommercialBundle:Default:index.html.twig');
}
}
| mit |
ho-ri1991/genetic-programming | include/gp/utility/default_initializer.hpp | 428 | #ifndef GP_UTILITY_DEFAULT_INITIALIZER
#define GP_UTILITY_DEFAULT_INITIALIZER
#include <type_traits>
namespace gp::utility {
//(partial) specialize this class if you want to use other default value
template <typename T>
struct DefaultInitializer {
static T getDefaultValue(){return T{};}
};
... | mit |
mabotech/mabo.io | py/vision/test1/ocr_test.py | 1130 | import cv2.cv as cv
import tesseract
import time
start = time.time()
image=cv.LoadImage("app2.jpg", cv.CV_LOAD_IMAGE_GRAYSCALE)
api = tesseract.TessBaseAPI()
api.Init("E:\\Tesseract-OCR\\test-slim","eng",tesseract.OEM_DEFAULT)
#api.SetPageSegMode(tesseract.PSM_SINGLE_WORD)
api.SetPageSegMode(tesseract.PSM_AUTO)
te... | mit |
dbrumley/recfi | llvm-3.3/tools/clang/test/Analysis/derived-to-base.cpp | 9826 | // RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s
// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -DCONSTRUCTORS=1 -analyzer-config c++-inlining=constructors -verify %s
void clang_analyzer_eval(bool);
void clang_analyzer_checkInlined(bool);
class A {
protected:... | mit |
edgcarmu/myproject.fcm | assets/libs/formvalidation-dist-v0.6.2/src/js/validator/isin.js | 3199 | /**
* isin validator
*
* @link http://formvalidation.io/validators/isin/
* @author https://twitter.com/formvalidation
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function($) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, ... | mit |
Leko/node-nextengine | Entity/Entity.js | 416 |
class Entity {
/**
* should convert 'search' to 'info' or not
*
* @return bool true:should convert, false:should not convert
*/
static get getAsInfo () {
return false
}
/**
* return request path of this API
*
* path must starts with spash
* path must not contain trailing spash
*... | mit |
Mischa-Alff/cee | plugins/sfml/__init__.py | 2336 | import plugins.BasePlugin
import plugins.CompilerPlugin
class Plugin(plugins.CompilerPlugin.CompilerPlugin, object):
name = None
author = None
description = None
connection = None
def curly_brace_snippet(self, data, extra_args):
data["command"] = "int main()\n{" + data["command"]
... | mit |
danielcaldas/react-d3-graph | src/components/node/node.helper.js | 3663 | /**
* @module Node/helper
* @description
* Some methods that help no the process of rendering a node.
*/
import {
symbolCircle as d3SymbolCircle,
symbolCross as d3SymbolCross,
symbolDiamond as d3SymbolDiamond,
symbolSquare as d3SymbolSquare,
symbolStar as d3SymbolStar,
symbolTriangle as d3SymbolTriangle... | mit |
beckrob/Photo-z-SQL | Jhu.PhotoZ/PriorAbsMagLimitInFilter.cs | 2859 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Concurrent;
namespace Jhu.PhotoZ
{
public class PriorAbsMagLimitInFilter : PriorOnFluxInFilter
{
private double absMagLimit;
private ConcurrentDictionary<double, double> re... | mit |
airpaca/pyair | tests/test.py | 3308 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
Test de `pyair` avec une configuration spéficique.
Un fichier de configuration au format JSON doit être préparer sur le modèle du fichier `config-test.json`.
La variable d'environnement `CFG_PYAIR_TEST` peut être définit pour l'utilisation d'un fichier spécifique.
"""
... | mit |
aspgems/kewego_party | spec/kewego_party/client/request_spec.rb | 1065 | # -*- encoding: utf-8 -*-
require 'spec_helper'
describe KewegoParty::Request do
before do
@client = KewegoParty::Client.new(:token => 'd4c804fd0f42533351aca404313d26eb')
end
it "raise an exception if the response not a kewego response" do
VCR.turned_off do
stub_request(:get, "http://api.kewego.c... | mit |
elr-utilities/elr-calendar | src/js/elr-calendar-create.js | 851 | import $ from 'jquery'
import elrMonths from './elr-calendar-months'
import elrCalendarWeeks from './elr-calendar-weeks'
// const elrMonths = elrCalendarMonths()
const elrWeeks = elrCalendarWeeks()
const renderDateView = (renderDate, $cal, evts) => {
// create date view
}
const buildCalendar = (view, renderDate, $... | mit |
chikara-chan/full-stack-javascript | manager/client/item/components/Form.js | 1646 | import React, {Component} from 'react'
import {findDOMNode} from 'react-dom'
import styles from '../sass/Form'
import {Button, Form, Input, DatePicker, Select} from 'antd'
class FormComponent extends Component {
constructor() {
super()
this.handleSubmit = this.handleSubmit.bind(this)
}
handleSubmit(e)... | mit |
minersc/msc | src/qt/locale/bitcoin_hu.ts | 110284 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About MinerSCoin</source>
<translation>A MinerSCoinról</translation>
<... | mit |
arminhammer/rubbertiger | test/index.js | 258 | 'use strict';
var assert = require('assert');
var rubbertiger = require('../lib');
describe('rubbertiger', function () {
it('should have unit test!', function () {
assert(false, 'we expected this package author to add actual unit tests.');
});
});
| mit |
angular/angular-cli-stress-test | src/app/components/comp-1976/comp-1976.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 { Comp1976Component } from './comp... | mit |
zalari/tus-server | upload.js | 713 | /**
* (c) Christian Ulbrich, Zalari UG (haftungsbeschränkt)
* 2014
*/
var fs = require('fs');
var self = {};
/**
* returns the offset, i.e. the file size of a file.
* @param filepath fully qualified path to the file, whose offset should be returned
*/
self.getOffset = function (filepath) {
//when the file i... | mit |
trandangquyen/MVC | application/views/site/login.php | 5255 | <!DOCTYPE html>
<html >
<head>
<base href="<?php echo base_url(); ?>">
<meta charset="UTF-8">
<title>Material Login Form</title>
<link rel="stylesheet" href="public/admin/css/reset.min.css">
<link rel='stylesheet prefetch' href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900|R... | mit |
jut-io/statsd-jutgraphite-backend | jutgraphite.js | 7875 | /*
* Flush stats to Jut (http://www.jut.io) using the graphite protocol.
*
* To enable this backend, install alongside statsd and include an entry in the
* backends configuration array:
*
* backends: ['../statsd-jutgraphite-backend/jutgraphite']
*
* This backend supports the following config options:
*
* ... | mit |
soukoku/ModernWpf2 | samples/BasicRunner/VM/SampleAppVM.cs | 12842 | using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using ModernWpf;
using ModernWpf.Messages;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using Syste... | mit |
upfluence/thrift-amqp-ruby | spec/support/handlers/thrift_helpers.rb | 752 | require 'thrift'
require 'thrift/amqp/server'
require 'thrift/amqp/client'
require 'test'
require 'test_handler'
def run_server
processor = Test::Processor.new(TestHandler.new)
prot_factory = Thrift::JsonProtocolFactory.new
Thrift::AMQPServer.new(
processor, prot_factory, nil,
amqp_uri: ENV['RABBITMQ_UR... | mit |
Mohammad-Alavi/Samandoon | config/ide-helper.php | 5961 | <?php
return array(
/*
|--------------------------------------------------------------------------
| Filename & Format
|--------------------------------------------------------------------------
|
| The default filename (without extension) and the format (php or json)
|
*/
'filena... | mit |
ddtm/deep-smile-warp | deepwarp/Transformer5.lua | 4822 | -- [SublimeLinter luacheck-globals:+cudnn,deepwarp,nn]
require 'cudnn'
require 'nn'
require 'nngraph'
require 'stn'
local nninit = require 'nninit'
local nnq = require 'nnquery'
cudnn.fastest = true
local backend = cudnn
local Transformer, parent = torch.class('deepwarp.Transformer5', 'nn.Container')
function Tran... | mit |
flyelmos/Software-University | 03. Software Technologies/Java Exercises/02. Boolean Variable/src/Main.java | 357 | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String word = scan.nextLine();
boolean bool = (word.equals("True"));
if(bool){
System.out.println("Yes");
} else {
System.... | mit |
Condors/TunisiaMall | vendor/payum/core/Payum/Core/Reply/HttpResponse.php | 984 | <?php
namespace Payum\Core\Reply;
class HttpResponse extends Base
{
/**
* @var string
*/
protected $content;
/**
* @var int
*/
protected $statusCode;
/**
* @var string[]
*/
protected $headers;
/**
* @param string $content
* ... | mit |
tamirdresher/RxInAction | AppendixC-Testing/RxLibrary.Tests/PlayingWithTestSchduler/ColdObservable.cs | 3336 | using System;
using System.Reactive;
using System.Reactive.Linq;
using Microsoft.Reactive.Testing;
using Xunit;
using RxLibrary;
using Xunit.Abstractions;
namespace RxLibrary.Tests
{
public class CreatColdObservableTests : ReactiveTest
{
[Fact]
public void CreatColdObservable_ShortWay()
... | mit |
darul75/dynupdate-aws | test/main.js | 558 | // test/main.js
var dynupdate = require('../src/dynupdate-aws');
var assert = require("assert");
describe('service calls', function() {
describe('with ip arguments', function() {
it('return simple call result', function(done) {
dynupdate.daemon({hostname: 'coucou.no-ip.biz', auth:'user:password... | mit |
hakobe/hakoblog-python | hakoblog/config.py | 486 | import os
class Config:
"""Extendable configuation class.
This is also used for flask application config.
"""
DATABASE = "hakoblog"
DATABASE_HOST = "db"
DATABASE_USER = "root"
DATABASE_PASS = ""
TESTING = False
GLOBAL_USER_NAME = "hakobe"
class Test(Config):
DATABASE = "hako... | mit |
xt0rted/Raygun.Owin | src/Raygun.Owin.AppBuilder/AppBuilderExtensions.cs | 1858 | namespace Raygun.Owin
{
using System;
using System.Collections.Generic;
using global::Owin;
using Raygun.LibOwin;
public static class AppBuilderExtensions
{
public static IAppBuilder UseRaygun(this IAppBuilder builder, Action<RaygunOptions> configuration)
{
if (bu... | mit |
EmberSands/esi_client | spec/models/put_fleets_fleet_id_members_member_id_internal_server_error_spec.rb | 1144 | =begin
#EVE Swagger Interface
#An OpenAPI for EVE Online
OpenAPI spec version: 0.4.6.dev11
Generated by: https://github.com/swagger-api/swagger-codegen.git
=end
require 'spec_helper'
require 'json'
require 'date'
# Unit tests for ESIClient::PutFleetsFleetIdMembersMemberIdInternalServerError
# Automatically genera... | mit |
pdaniell/machine.js | test/Condition.Test.js | 478 | describe("Condiiton Test Suite", function() {
it("FSA Condition Constructor Test", function() {
//imports
var State = Machine.State;
var Condition = Machine.Condition;
var controlState = new Machine.State({label:"A", isAccepting:false});
var tsCondition = new Condition({st... | mit |
NativeScript/NativeScript | packages/core/ui/core/view-base/index.d.ts | 14310 | import { Property, CssProperty, CssAnimationProperty, InheritedProperty } from '../properties';
import { BindingOptions } from '../bindable';
import { Observable } from '../../../data/observable';
import { Style } from '../../styling/style';
import { CoreTypes } from '../../../core-types';
import { Page } from '../../p... | mit |
joeleyu/coc | application/config/autoload.php | 3992 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the fr... | mit |
joshterainsights/Grad_Apps | public/modules/applications/tests/applications.client.controller.test.js | 5902 | 'use strict';
(function() {
// Applications Controller Spec
describe('Applications Controller Tests', function() {
// Initialize global variables
var ApplicationsController,
scope,
$httpBackend,
$stateParams,
$event,
$location;
// The $resource service augments the response object with methods for u... | mit |
xezw211/wx | resources/views/admin/user/permission.blade.php | 325 |
@if($status)
<h3>用户: {{$user->name}}</h3>
<ul class="list-group">
@foreach($user_permissions as $user_permission)
<li class="list-group-item list-group-item-default">{{$user_permission->slug}}--{{$user_permission->name}}--{{$user_permission->description}}</li>
@endforeach
</ul>
@else
<p>{{$msg}}</p>
@endi... | mit |
findologic/sentry-browser-demo | test/unit/sentry-browser-demo.js | 194 | describe('sentryBrowserDemo', () => {
describe('Raven.js wrapper', () => {
it('should not pollute the window object', () => {
expect(window.Raven).to.be.undefined;
});
});
});
| mit |
mediawiki-utilities/python-mwsessions | mwsessions/defaults.py | 160 | CUTOFF = 60 * 60
"""
Default cutoff is set to one hour. This is almost always a good choice.
See https://meta.wikimedia.org/wiki/Research:Activity_session
"""
| mit |
enlim/core | app/Models/Mship/Account/Note/Format.php | 1115 | <?php
namespace App\Models\Mship\Account\Note;
use App\Traits\RecordsActivity;
use Illuminate\Database\Eloquent\SoftDeletes as SoftDeletingTrait;
/**
* App\Models\Mship\Account\Note\Format
*
* @property-read \App\Models\Mship\Account\Note $note
* @method static bool|null forceDelete()
* @method static \Illumina... | mit |
MIAUUUUUUU/Sticky.io | src/MiauCore.IO/Domain/Services/NewsService.cs | 1013 | using MiauCore.IO.Data;
using MiauCore.IO.Domain.Repository;
using MiauCore.IO.Models;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace MiauCore.IO.Domain.Services
{
public class NewsService
{
private ApplicationDbContext... | mit |
rajdeep26/Java-mini-project | src/DisplayData.java | 2000 | import java.awt.*;
import java.io.IOException;
import javax.swing.*;
import java.io.*;
public class DisplayData extends JApplet
{
public DisplayData()
{
Container contentPane = getContentPane();
contentPane.setLayout(new BorderLayout());
final String[] colHeads = { "Phone Na... | mit |
yoanngern/gospelcenter | src/gospelcenter/UserBundle/gospelcenterUserBundle.php | 217 | <?php
namespace gospelcenter\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class gospelcenterUserBundle extends Bundle
{
public function getParent()
{
return 'FOSUserBundle';
}
}
| mit |
dmeikle/GossamerCMS-DB-V2 | src/components/shoppingcart/entities/Client.php | 334 | <?php
namespace components\shoppingcart\entities;
use entities\AbstractEntity;
use database\SQLInterface;
class Client extends AbstractEntity implements SQLInterface
{
public function __construct(){
$this->primaryKeys = array('id');
parent::__construct();
$this->tablename = 'Cl... | mit |
WsdlToPhp/PackagePayPal | src/StructType/ManageRecurringPaymentsProfileStatusRequestType.php | 2351 | <?php
namespace PayPal\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for ManageRecurringPaymentsProfileStatusRequestType StructType
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class ManageRecurringPaymentsProfileStatusRequestType extends AbstractReque... | mit |
SpongePowered/SpongeCommon | src/main/java/org/spongepowered/common/data/processor/data/item/BreakableDataProcessor.java | 4203 | /*
* 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 |
yigexiangfa/the_data | app/channels/done_channel.rb | 213 | class DoneChannel < ApplicationCable::Channel
def subscribed
stream_from "done:#{current_receiver.class.base_class.name}:#{current_receiver.id}" if current_receiver
end
def unsubscribed
end
end
| mit |