repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
VerkhovtsovPavel/BSUIR_Labs | Labs/TI/TI-2/src/keyGenerationAlgorithms/LFSR.java | 665 | package keyGenerationAlgorithms;
public class LFSR implements BaseGenerationAlgorithm{
private int[] polinome;
private int[] currentState;
public LFSR(int[] startState, int[] polinom){
this.currentState = startState;
this.polinome = polinom;
}
@Override
public int generate() {
int newBitKey = currentS... | mit |
halsn/mean | modules/farm.recipe/server/routes/device_server.routes.js | 756 | 'use strict';
var adminPolicy = require('../policies/device.server.policy');
var userRecipeController = require('../controllers/user.recipe.controller');
var auth = require('../../../users/server/controllers/users/users.authentication.server.controller');
module.exports = function (app) {
// http://localhost:3000/v1... | mit |
jvz/atg-ant-plugin | src/main/java/atg/tools/ant/tasks/RequiredModules.java | 2837 | package atg.tools.ant.tasks;
import atg.tools.ant.types.AtgInstallation;
import atg.tools.ant.types.Module;
import atg.tools.ant.types.ModuleCollection;
import atg.tools.ant.util.StringUtils;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.a... | mit |
Kondou-ger/cobrapress | cobra/generate.py | 2143 | #!/usr/bin/python3
from os import listdir
from shutil import copyfile
class generate(object):
def __init__(self, config):
self.config = config
def generate_html(self):
"""
generate static html
"""
posts = self.generate_post_html()
print(posts)
templates = self.generate_template_html()
for template... | mit |
nebrius/commascript | test/tests/functions/15-function_with_switch_missing_return_path.js | 1359 | /*
The MIT License (MIT)
Copyright (c) 2013 Bryan Hughes <bryan@theoreticalideations.com> (http://theoreticalideations.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, in... | mit |
jonas-p/go-shp | shapefile.go | 18219 | package shp
import (
"encoding/binary"
"io"
"strings"
)
//go:generate stringer -type=ShapeType
// ShapeType is a identifier for the the type of shapes.
type ShapeType int32
// These are the possible shape types.
const (
NULL ShapeType = 0
POINT ShapeType = 1
POLYLINE ShapeType = 3
POLYGON ... | mit |
ozkriff/nergal | src/fs.rs | 1277 | // See LICENSE file for copyright and license details.
use std::path::{Path};
use std::io::{Cursor};
pub fn load_string<P: AsRef<Path>>(path: P) -> String {
String::from_utf8(load(path).into_inner()).unwrap()
}
#[cfg(not(target_os = "android"))]
pub fn load<P: AsRef<Path>>(path: P) -> Cursor<Vec<u8>> {
use s... | mit |
osoken/sqlite-tensor | doc/conf.py | 1305 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sqlite_tensor import __author__, __version__, __package_name__
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinxcontrib.asyncio',
]
templates_path = ['_templates']
source_suffix = ['.r... | mit |
bakuzan/mylist | public/modules/core/directives/click-pass.directive.js | 478 | (function() {
'use strict';
angular.module('core')
.directive('clickPass', clickPass);
clickPass.$inject = ['$timeout'];
function clickPass($timeout) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function(event) {
$timeout(function(... | mit |
AlienIdeology/J-Cord | src/main/java/org/alienideology/jcord/handle/builders/ApplicationBuilder.java | 2667 | package org.alienideology.jcord.handle.builders;
import org.alienideology.jcord.handle.Icon;
import org.alienideology.jcord.handle.client.app.IApplication;
import org.alienideology.jcord.internal.object.client.app.Application;
/**
* ApplicationBuilder - A builder for creating an {@link IApplication}. Used by {@link ... | mit |
ActiveState/code | recipes/Python/578692_QGstartscript_Change_display/recipe-578692.py | 7501 | # -*- coding: utf-8; -*-
''' CoordsConf: Configure QGIS coordinate display
Store this script as .qgis2/python/startup.py
Redoute, 19.10.2013 '''
from __future__ import unicode_literals, division
import qgis
QgsPoint = qgis.core.QgsPoint
CoordinateReferenceSystem = qgis.core.QgsCoordinateReferenceSystem
CoordinateTr... | mit |
tortus/refinerycms-alerts | spec/support/factories/refinery/alerts.rb | 290 | FactoryGirl.define do
factory :alert, :class => Refinery::Alerts::Alert do
sequence(:title) { |n| "RefineryAlert-#{n}" }
live_at { Time.zone.now }
trait :live do
live_at { Time.zone.now }
end
trait :expired do
down_at { Time.zone.now }
end
end
end
| mit |
lucionei/chamadotecnico | chamadosTecnicosFinal-app/node_modules/date-fns/startOfMonth/index.js | 1483 | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = startOfMonth;
var _index = require('../toDate/index.js');
var _index2 = _interopRequireDefault(_index);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @name start... | mit |
LighthouseBlog/Blog | src/app/article-portal/create-article-modal/create-article-modal.component.ts | 2087 | import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { Router } from '@angular/router';
import { MatDialogRef } from '@angular/material';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { EditorService } from 'app/_services/... | mit |
envicase/flip | src/Flip/InitExpressionResult.cs | 1773 | namespace Flip
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Linq.Expressions;
internal class InitExpressionResult<TDelegate>
where TDelegate : class
{
public InitExpressionResult(Expressio... | mit |
ToJans/Nancy | src/Nancy.Tests/Fakes/FakeNancyModuleWithBasePath.cs | 1241 | namespace Nancy.Tests.Fakes
{
using System;
using Nancy;
public class FakeNancyModuleWithBasePath : NancyModule
{
public FakeNancyModuleWithBasePath() : base("/fake")
{
Delete["/"] = x => {
throw new NotImplementedException();
};
... | mit |
WindSekirun/HannamQRReader | app/src/main/java/windsekirun/hnureader/CaptureActivity.java | 2729 | package windsekirun.hnureader;
import android.annotation.TargetApi;
import android.content.Intent;
import android.graphics.PointF;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Me... | mit |
minio/cli | help.go | 9076 | package cli
import (
"fmt"
"io"
"os"
"strings"
"text/tabwriter"
"text/template"
)
// AppHelpTemplate is the text template for the Default help topic.
// cli.go uses text/template to render templates. You can
// render custom help text by setting this variable.
var AppHelpTemplate = `NAME:
{{.Name}}{{if .Usage... | mit |
testdouble/testdouble.js | src/replace/module/index.browser.js | 141 | export default () => {
throw Error('Sorry, but CommonJS module replacement with td.replace() is only supported under Node.js runtimes.')
}
| mit |
stratedge/wye | tests/Unit/Binding/IsInputOutputTest.php | 1061 | <?php
namespace Tests\Unit\Binding;
use PDO;
use Stratedge\Wye\Binding;
use Stratedge\Wye\Wye;
class IsInputOutputTest extends \Tests\TestCase
{
public function testReturnsTrue()
{
$contants = [
PDO::PARAM_BOOL,
PDO::PARAM_INT,
PDO::PARAM_NULL,
PDO::PAR... | mit |
Dexesttp/jsbooru | public/js/search.js | 2605 | "use strict";
var Search = Vue.component("main-search", {
template: "#search-template",
props: {
itemsPerPage: {
type: Number,
default: 20,
},
},
data: function () {
return {
currentTags: "",
pos: 0,
count: 0,
... | mit |
objorke/PropertyTools | Source/Examples/PropertyGrid/PropertyGridDemo/Examples/DataErrorInfoExample.cs | 3506 | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="DataErrorInfoExample.cs" company="PropertyTools">
// Copyright (c) 2014 PropertyTools contributors
// </copyright>
// -----------------------------------------------------------... | mit |
Team-LANS/lepta | src/main/java/com/teamlans/lepta/service/exceptions/LeptaServiceException.java | 335 | package com.teamlans.lepta.service.exceptions;
public class LeptaServiceException extends Exception {
public LeptaServiceException(String message) {
super(message);
}
public LeptaServiceException(Exception e) {
super(e);
}
public LeptaServiceException(String message, Exception e) {
super(messa... | mit |
alanc10n/py-rau | pyrau/commands.py | 2093 | import humanfriendly
from redis import StrictRedis
from six.moves import range
from tabulate import tabulate
class Command:
""" Commands to run against the specified redis instance """
def __init__(self, redis_obj=None):
if redis_obj is None:
self.redis = StrictRedis()
else:
... | mit |
MortalFlesh/MFCollectionsPHP | src/Immutable/IMap.php | 962 | <?php declare(strict_types=1);
namespace MF\Collection\Immutable;
interface IMap extends \MF\Collection\IMap, ICollection
{
/**
* @return IMap
*/
public static function from(array $array, bool $recursive = false);
/**
* @param callable $creator (value:mixed,key:mixed):mixed
* @return ... | mit |
TsvetanKT/BgPeopleWebApi | BgPeopleWebApi.Services/App_Start/BundleConfig.cs | 1331 | namespace BgPeople.Services
{
using System.Web;
using System.Web.Optimization;
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles... | mit |
ZLima12/osu | osu.Game/Rulesets/Objects/Legacy/Osu/ConvertHitObjectParser.cs | 2727 | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osuTK;
using osu.Game.Rulesets.Objects.Types;
using System.Collections.Generic;
using osu.Game.Audio;
namespace osu.Game.Rulesets.Objects.Legacy.Osu
{
/// <su... | mit |
hoaaah/smdspr | console/migrations/m171016_141123_create_table_ta_periode.php | 1056 | <?php
use yii\db\Migration;
class m171016_141123_create_table_ta_periode extends Migration
{
public function safeUp()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
}
$thi... | mit |
mattweldon/indie-ui | addon/services/indie-toaster.js | 401 | import Ember from "ember";
export default Ember.Service.extend({
message: null,
setMessage(text, type) {
if (type == undefined) {
type = 'default';
}
this.set('type', type);
this.set('message', text);
Ember.run.later(() => {
this.set('type', null);
this.set('message', nu... | mit |
table-tennis-analytics/table-tennis-api | app/controllers/v1/games_controller.rb | 442 | module V1
class GamesController < ApplicationController
def index
respond_with Game.ordered.send(params[:scope])
end
def create
respond_with Game.create(game_params), location: nil
end
def update
game.update game_params
head :no_content
end
private
def gam... | mit |
iavanish/CollegePal | CollegePal/app/src/main/java/iavanish/collegepal/DiscussionForum/DeleteDiscussion.java | 583 |
package iavanish.collegepal.DiscussionForum;
import iavanish.collegepal.CommonClasses.DataBaseWrite;
import iavanish.collegepal.CommonClasses.Student;
/**
*
* @author deependra
*/
/**
*
* Delete a discussion
*/
public class DeleteDiscussion {
public Discussion discussion;
public Student student... | mit |
znerol75/anime-organizer | AnimeOrganizer/Library/Settings.cs | 7212 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
namespace AnimeOrganizer.Library
{
class Settings
{
// Default Stats
priva... | mit |
6bee/Remote.Linq | src/Remote.Linq/ExpressionExecution/ExpressionExecutionContext`1.cs | 1140 | // Copyright (c) Christof Senn. All rights reserved. See license.txt in the project root for license information.
namespace Remote.Linq.ExpressionExecution
{
using Remote.Linq.Expressions;
using System.Linq;
public class ExpressionExecutionContext<TDataTranferObject> : ExpressionExecutionDecoratorBase<TD... | mit |
InSilicoLabs/texture | lib/jats/article-meta/ArticleMeta.js | 258 | import { DocumentNode } from 'substance'
class ArticleMeta extends DocumentNode {}
ArticleMeta.type = 'article-meta'
ArticleMeta.define({
attributes: { type: 'object', default: {} },
nodes: { type: ['id'], default: [] }
})
export default ArticleMeta
| mit |
otto-torino/gino | ckeditor/plugins/print/lang/sq.js | 240 | /*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'print', 'sq', {
toolbar: 'Shtype'
} );
| mit |
nicole-a-tesla/Scrapples | app/assets/javascripts/games_show.js | 1281 | $( document ).ready(function() {
// Games page wlil auto-refresh
var $timestampDiv = $('#game-timestamp');
var gameTimestamp = $timestampDiv.attr('gameTimestamp')
var roundTimestamp = $timestampDiv.attr('roundTimestamp')
var gameId = $timestampDiv.attr('game-id')
console.log(gameTimestamp)
console.log(roun... | mit |
GuitarmonYz/AutoKnowledge | vue_front_end/node_modules/element-ui/lib/radio-button.js | 7030 | module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ ret... | mit |
rakeshsojitra/test | web/js/coolbaby.js | 59153 |
var $j = jQuery.noConflict();
jQuery(function ($) {
"use strict";
var iOS = (navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false);
if (iOS) {
$j('body').addClass('ios');
}
})
jQuery(function ($) {
"use strict";
var usualmenu = $j("ul.sf-menu");
if (usualmenu.length !... | mit |
jshint/jshint | tests/unit/options.js | 162101 | /**
* Tests for all non-environmental options. Non-environmental options are
* options that change how JSHint behaves instead of just pre-defining a set
* of global variables.
*/
"use strict";
var JSHINT = require("../..").JSHINT;
var fs = require('fs');
var TestRun = require('../helpers/testhelper').setup.testRu... | mit |
ddtraceweb/socool | src/Core/Controller/CoreResponse.php | 1950 | <?php
/**
* Created by JetBrains PhpStorm.
* User: daviddjian
* Date: 10/08/13
* Time: 11:02
* To change this template use File | Settings | File Templates.
*/
namespace Core\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Templating\Helper\SlotsHelper;
use Symfony\Component\Te... | mit |
CallFire/callfire-api-client-java | src/main/java/com/callfire/api/client/api/contacts/model/Contact.java | 847 | package com.callfire.api.client.api.contacts.model;
import java.util.HashMap;
import java.util.Map;
import com.callfire.api.client.api.common.model.CallfireModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Represents c... | mit |
nfl/react-metrics | src/core/useTrackBindingPlugin.js | 2858 | import EventListener from "fbjs/lib/EventListener";
import attr2obj from "./utils/attr2obj";
function isLeftClickEvent(event) {
return event.button === 0;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
export class TrackBindingPlugin {
c... | mit |
ac9831/StudyProject-Asp.Net | DevDataControl/DevDataControl/FrmObjectDataSource.aspx.designer.cs | 1651 | //------------------------------------------------------------------------------
// <자동 생성됨>
// 이 코드는 도구를 사용하여 생성되었습니다.
//
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
// 이러한 변경 내용이 손실됩니다.
// </자동 생성됨>
//------------------------------------------------------------------------------
namespace DevDataCont... | mit |
paine1690/cdp4j | src/main/java/io/webfolder/cdp/annotation/EventName.java | 1461 | /**
* The MIT License
* Copyright © 2017 WebFolder OÜ
*
* 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, mod... | mit |
lytics/jstag | src/rollup/dom/location.js | 98 | /** @module jstag/dom/location */
import window from './window';
export default window.location;
| mit |
jsor/doctrine-postgis | src/Functions/ST_TransScale.php | 1410 | <?php
declare(strict_types=1);
/* This file is auto-generated. Don't edit directly! */
namespace Jsor\Doctrine\PostGIS\Functions;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\Node;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
final ... | mit |
iandees/all-the-places | locations/spiders/hannaford.py | 5049 | import scrapy
from locations.items import GeojsonPointItem
import re
regex = r"(\D+,\s\D+-\d{5}).*" # city, state, zip
regex_am = r"\s?([Aa][Mm])"
regex_pm = r"\s?([Pp][Mm])"
regex_lat = r"(lat = \d+\.\d+)"
regex_lon = r"(lng = -\d+\.\d+)"
regex_id = r"(t\.id = \"\d+\")"
class HannafordSpider(scrapy.Spi... | mit |
SponsorPay/events_emitter | lib/events_emitter/pixel.rb | 801 | require "net/http"
module EventsEmitter
class Pixel
def record(fragment, _)
pixel_url = URI.parse("http:#{url(fragment)}")
http = Net::HTTP.new(pixel_url.host, pixel_url.port)
http.read_timeout = timeout
request = Net::HTTP::Get.new(pixel_url.request_uri)
response = http.reque... | mit |
spyder-ide/spyder-terminal | spyder_terminal/server/tests/test_server.py | 5329 |
"""
Tornado server-side tests.
Note: This uses tornado.testing unittest style tests
"""
import os
import sys
import os.path as osp
from urllib.parse import urlencode
import pytest
from flaky import flaky
from tornado import testing, websocket, gen
from tornado.concurrent import Future
from spyder.utils.programs im... | mit |
fernandolozer/CursoAspNetCore1 | ViewComponent1/src/ViewComponent1/Migrations/ApplicationDbContextModelSnapshot.cs | 6445 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using ViewComponent1.Models;
namespace ViewComponent1.Migrations
{
... | mit |
wizardone/mongoid_search | lib/mongoid_search/util.rb | 1712 | # encoding: utf-8
module Mongoid::Search::Util
def self.keywords(klass, fields)
if fields.is_a?(Array)
fields.map do |field|
self.keywords(klass, field)
end
elsif fields.is_a?(Hash)
fields.keys.map do |field|
attribute = klass.send(field)
unless attribute.blank?
... | mit |
zlx/fetch_meizi | lib/fetch_meizi/version.rb | 42 | module FetchMeizi
VERSION = "0.2.1"
end
| mit |
metodiobetsanov/Tech-Module-CSharp | Entry Module/CSharp/01. First Steps in Coding/02. Expression/Properties/AssemblyInfo.cs | 1404 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("02... | mit |
johnson/shadowgraph | vendor/plugins/authlogic/test/session_test/id_test.rb | 385 | require File.dirname(__FILE__) + '/../test_helper.rb'
module SessionTest
class IdTest < ActiveSupport::TestCase
def test_credentials
session = UserSession.new
session.credentials = [:my_id]
assert_equal :my_id, session.id
end
def test_id
session = UserSession.new
session.id... | mit |
Microsoft/MIEngine | src/WindowsDebugLauncher/DebugLauncher.cs | 10194 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using ... | mit |
nosplashurinal/order-management | app/components/AddTeam.js | 4316 | import React from 'react';
import PropTypes from 'prop-types';
import styles from '../styles/addTeam.scss';
import classNames from 'classnames';
import TeamMembers from './TeamMembers';
import TeamRoles from './TeamRoles';
import Input from '../components/Input';
import Select from '../components/Select';
impor... | mit |
Aldarov/StudentEmployment | Client/src/modules/_global/components/RenderList.js | 349 | import React from 'react';
import PropTypes from 'prop-types';
import List from './List';
export default function renderList ({
fields,
...custom
}) {
const data = fields.getAll() || [];
return (
<List
data={data}
{...custom}
/>
);
}
renderList.propTypes = {
fields: PropTypes.object,
... | mit |
DungntVccorp/hoc_Java | EP9_SOCKET/src/ep9_socket/EP9_MAIN_SERVER.java | 2428 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ep9_socket;
import java.io.*;
import java.net.*;
/**
*
* @author nguyendung
*/
public class EP9_MAIN_SERVER implements Ru... | mit |
UIUXEngineering/ix-material | libs/fn/src/lib/_common/uniqueId.ts | 465 | import { toString } from './toString';
/** Used to generate unique IDs. */
let idCounter = 0;
/**
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
*
* @category Util
* @param [prefix=''] The value to prefix the ID with.
* @example
*
* _.uniqueId('contact_');
* // => 'contact_104'
*
*... | mit |
bang88/ant-console | src/constants/DashboardConstants.js | 267 | /**
* SunEee
* @date Created on 11/16/15
* @author YuHui(语晖)<yuhui@suneee.com>
*/
import keyMirror from 'fbjs/lib/keyMirror';
export default keyMirror({
REQUEST_DASHBOARD: null,
REQUEST_DASHBOARD_SUCCESS: null,
REQUEST_DASHBOARD_ERROR: null
})
| mit |
tparisi/Vizi | engine/src/lights/pointLight.js | 1242 | goog.provide('Vizi.PointLight');
goog.require('Vizi.Light');
Vizi.PointLight = function(param)
{
param = param || {};
Vizi.Light.call(this, param);
this.positionVec = new THREE.Vector3;
if (param.object) {
this.object = param.object;
}
else {
var distance = ( param.distance !== undefined ) ? param.dis... | mit |
madkom/docker-registry-client | tests/spec/DockerRegistryApi/Authorization/TokenAuthorizationSpec.php | 2929 | <?php
namespace spec\Madkom\DockerRegistryApi\Authorization;
use Http\Client\HttpClient;
use Madkom\DockerRegistryApi\Authorization\TokenAuthorization;
use Madkom\DockerRegistryApi\AuthorizationService;
use Madkom\DockerRegistryApi\DockerRegistryException;
use Madkom\DockerRegistryApi\PsrHttpRequestFactory;
use Madko... | mit |
michelfernandes/crescer-2016-1 | src/modulo-01-java-OO/projeto-lotr-bluej/SindarinParaInglesTest.java | 352 |
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class SindarinParaInglesTest
{
@Test
public void traduzirNaurParaIngles(){
//naur
TradutorSindarin tradutorIngles = new SindarinParaIngles();
assertEquals("fire",tradutorIn... | mit |
born2net/ng2-minimal | src/app/heroes/hero-detail.component.ts | 1665 | import { Component, OnInit, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Hero, HeroService } from './hero.service';
@Component({
template: `
<h2>HEROES</h2>
<div *ngIf="hero">
<h3>"{{hero.name}}"</h3>
<div>
<label>Id: </label>{{hero.id}}</div... | mit |
gclusters/gclusters | biblio_all.php | 4808 | <?php
include 'conn.php';
include 'inte2.php';
include 'columns.php';
// define queries ...
$page= $_GET['page'];
$pgn = $page * 25;
$query_auth = "SELECT * FROM biblioclusters ORDER BY biblio_date DESC LIMIT $pgn,25";
$result = mysql_query($query_auth) or die("Sorry, not a valid query!");
$numres = mysql_num_row... | mit |
glapointe7/CryptoGL | src/Skipjack.cpp | 3246 | #include "Skipjack.hpp"
using namespace CryptoGL;
constexpr std::array<uint8_t, 256> Skipjack::f_table;
void Skipjack::setKey(const BytesVector &key)
{
const uint8_t key_len = key.size();
if (key_len != 10)
{
throw BadKeyLength("Your key has to be 10 bytes length.", key_len);
}
this->key... | mit |
graphology/graphology-layout-forceatlas2 | helpers.js | 5396 | /**
* Graphology ForceAtlas2 Helpers
* ===============================
*
* Miscellaneous helper functions.
*/
/**
* Constants.
*/
var PPN = 10,
PPE = 3;
/**
* Very simple Object.assign-like function.
*
* @param {object} target - First object.
* @param {object} [...objects] - Objects to merge.
... | mit |
victorrentea/training | jee7/src/main/java/victor/training/jee7/jms20/MessageReceiverSync.java | 547 | package victor.training.jee7.jms20;
import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.jms.JMSContext;
import javax.jms.Queue;
@Stateless
public class MessageReceiverSync {
@Inject
private JMSContext context;
@Resource(mappedName = "java:global/jms/myResponseQu... | mit |
ValmirJ/Projeto-Integrado-3-Bingo | Bingo/src/bingo/interactions/ConnectWithRa.java | 1154 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bingo.interactions;
import bingo.FormManager;
import bingo.TelaInicial;
import bingo.TelaSalas;
import org.json.simple.JSONObj... | mit |
ClubObsidian/ObsidianEngine | src/com/clubobsidian/obsidianengine/asm/commons/RemappingSignatureAdapter.java | 4716 | /***
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistribution... | mit |
joelghill/PocketRockets | PocketRocket/Assets/ModularRocket/ModularRocket2DBounds.cs | 1958 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PocketRockets;
using System;
namespace PocketRockets.ModularRocket
{
public class ModularRocket2DBounds : MonoBehaviour, IBoundingBox2d {
public Bounds RocketBounds;
private ModularRocketPart rocketPart;
... | mit |
sigaind/cupon | vendor/sonata-project/admin-bundle/Sonata/AdminBundle/Controller/HelperController.php | 8863 | <?php
/*
* This file is part of the Sonata package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\AdminBundle\Controller;
use Symfony\Bundle\FrameworkBu... | mit |
jeck5895/jfo-master | assets/js/admin/report.js | 939 | $(function() {
var ctx = $("#yearly-chart").get(0).getContext('2d');
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["January", "February", "March", "April", "May", "June", "July","August","September","October","November","December"],
datasets:
[
{
label: 'Employers',
backgrou... | mit |
hellofresh/rx.php-examples | src/Client/Memory/Converter/UserConverter.php | 568 | <?php
namespace Client\Memory\Converter;
use HelloFresh\Repository\UserRepositoryInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class UserConverter
{
/** @var UserRepositoryInterface */
private $repo;
public function __construct(UserRepositoryInterface $repo)
{
... | mit |
linyows/h2o-cookbook | recipes/source.rb | 897 | # Cookbook Name:: h2o
# Recipe:: source
build_essential 'install_build_packages'
case node['platform_family']
when 'rhel', 'fedora'
package %w[curl unzip cmake openssl-devel libyaml-devel]
when 'debian'
package %w[curl unzip cmake pkg-config libssl-dev zlib1g-dev]
end
version = node['h2o']['download_version']
ca... | mit |
lucasmichot/PHP-CS-Fixer | tests/Fixer/ReturnNotation/SimplifiedNullReturnFixerTest.php | 1691 | <?php
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Tests\Fixer\ReturnNotation;
u... | mit |
rwl/PyCIM | CIM15/IEC61970/Informative/InfLocations/Zone.py | 2259 | # Copyright (C) 2010-2011 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
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit |
ActiveState/code | recipes/Python/52216_a_Python_daemon/recipe-52216.py | 228 | import sys
import os
if os.fork()==0:
os.setsid()
sys.stdout=open("/dev/null", 'w')
sys.stdin=open("/dev/null", 'r')
while(1):
# Daemon's main code goes here
pass
sys.exit(0)
| mit |
TylerK/ctci | 1. Strings/check-permutation.spec.js | 429 | const expect = require('chai').expect
const checkPermutation = require('./check-permutation')
describe('Check Permutation', () => {
it('Should return true if string A is a permutation of string B', () => {
expect(checkPermutation('abcdefg', 'gbefacd')).to.equal(true)
})
it('Should return false if the two str... | mit |
FrenchYeti/ufo | framework/src/Db/Statement.php | 2784 | <?php
namespace Ufo\Db;
/**
* DatabaseStatementModel class.
* Intended as parent for all database prepared statement classes.
*/
class Statement
{
/**
* Object of type DatabaseModel
* @var \phpsec\DatabaseModel
*/
protected $db;
/**
* The query to be executed
* @var string
*/
protected $quer... | mit |
sanketbajoria/galaxy | src/app/views/download/downloadQueue.js | 258 | class DownloadQueue{
constructor(){
this.queue = [];
}
getAll(){
return this.queue;
}
push(item){
this.queue.push(item);
}
clear(){
this.queue = [];
}
}
module.exports = new DownloadQueue(); | mit |
TwilioDevEd/api-snippets | rest/transcription/list-get-example-1/list-get-example-1.5.x.rb | 500 | # Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'
# Get your Account SID and Auth Token from twilio.com/console
# To set up environmental variables, see http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account... | mit |
theinbetweens/spread | lib/spread/version.rb | 38 | module Spread
VERSION = "0.0.1"
end
| mit |
cowboyd/ember-microstates | tests/unit/macros/state-test.js | 2771 | /* jshint expr:true */
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { state, create } from '@microstates/ember';
import Object from '@ember/object';
describe('Unit: Macro | state', function() {
describe('with a value', function() {
let Container = Object.extend({
n: state(42)... | mit |
begeekmyfriend/leetcode | 0297_serialize_and_deserialize_binary_tree/tree_serdes.cc | 1746 | #include <bits/stdc++.h>
using namespace std;
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Codec {
public:
// Encodes a tree to a single string.
string ... | mit |
thinkingmik/ideman-cli | bin/scripts/dropTables.js | 3318 | var Promise = require('bluebird');
var Configuration = require('../configuration');
var dropsIdemanTables = function() {
return new Promise(function(resolve, reject) {
var config = Configuration.getConfig();
var tables = config.tables.entities;
var prefix = config.tables.prefix;
var knex = require('k... | mit |
dbishoponline/superdashboard | kendo/source/js/cultures/kendo.culture.ms-MY.js | 2451 | /*
* Kendo UI Web v2012.2.710 (http://kendoui.com)
* Copyright 2012 Telerik AD. All rights reserved.
*
* Kendo UI Web commercial licenses may be obtained at http://kendoui.com/web-license
* If you do not own a commercial license, this file shall be governed by the
* GNU General Public License (GPL) version 3.
* For GP... | mit |
wcang/pytekcap | tekcap.py | 870 | def nl_str(value):
return ns_str((value & 0xffff0000) >> 16) + ns_str(value)
def ns_str(value):
return chr((value & 0xff00) >> 8) + chr((value & 0xff))
def nc_str(value):
return chr(value & 0xff)
class tekcap:
def __setattr__(self, attr, value):
for index, field in enumerate(self.fields):
if field == attr:
... | mit |
palmerev/react-pomodoro | constants.js | 217 | export const INCREMENT = 'INCREMENT'
export const DECREMENT = 'DECREMENT'
export const statuses = {
INACTIVE: 'INACTIVE',
BREAK: 'BREAK',
WORK: 'WORK'
}
export default {
INCREMENT,
DECREMENT,
statuses
}
| mit |
leagueofcake/Project-Resistance | src/client/main/conversation/components/MessageHistory.stories.js | 603 | import React from 'react';
import { withKnobs, object } from '@storybook/addon-knobs';
import MessageHistory from './MessageHistory';
import { messageData } from './Message.stories';
export default {
component: MessageHistory,
title: 'MainPanel/Conversation/Components/MessageHistory',
decorators: [withKnobs],... | mit |
nodkz/graphql-compose-elasticsearch | src/elasticDSL/Query/Compound/FunctionScore.js | 2562 | /* @flow */
import { InputTypeComposer } from 'graphql-compose';
import { getQueryITC, prepareQueryInResolve } from '../Query';
import { getTypeName, type CommonOpts, desc } from '../../../utils';
export function getFunctionScoreITC<TContext>(
opts: CommonOpts<TContext>
): InputTypeComposer<TContext> {
const name... | mit |
grom358/zemscript | src/net/zeminvaders/lang/ast/TrueNode.java | 1721 | /*
* Copyright (c) 2008 Cameron Zemek
*
* 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, publi... | mit |
skn9x/Freja | src/freja/sql/Getter.java | 60 | package freja.sql;
public abstract class Getter {
}
| mit |
TheOdinProject/theodinproject | spec/support/cuprite.rb | 698 | require 'capybara/cuprite'
Capybara.register_driver(:cuprite) do |app|
Capybara::Cuprite::Driver.new(
app,
**{
window_size: [1200, 1200],
browser_options: {},
process_timeout: 30,
timeout: 60,
inspector: true,
headless: !ENV['HEADLESS'].in?(%w[n 0 no false]),
js_erro... | mit |
mpi77/cpdn-api | app/models/Background/Task.php | 3256 | <?php
namespace CpdnAPI\Models\Background;
use Phalcon\Mvc\Model;
use CpdnAPI\Utils\Common;
use CpdnAPI\Utils\MetaGenerator as MG;
class Task extends Model
{
const STATUS_PREPARING = "preparing";
const STATUS_NEW = "new";
const STATUS_WORKING = "working";
const STATUS_COMPLETE = "complete";
/**
* @... | mit |
be-pongit/confac-front | src/components/invoice/spec/InvoiceListModel.spec.ts | 2240 | import moment from 'moment';
import InvoiceListModel from '../models/InvoiceListModel';
import InvoiceModel from '../models/InvoiceModel';
import {InvoiceFilters} from '../../../models';
describe('InvoiceListModel', () => {
it('filters with last x days', () => {
const filters: InvoiceFilters = {
search: [... | mit |
akshaykumar90/sparkling-water | chapter9/inordertraversalwithparent.go | 1070 | // Problem 9.5
package chapter9
type TreeNodeWithParent struct {
Value int
Left *TreeNodeWithParent
Right *TreeNodeWithParent
Parent *TreeNodeWithParent
}
const (
left = iota
right = iota
parent = iota
)
func InorderTraversalWithParent(root *TreeNodeWithParent) []int {
result := make([]int, 0)
getN... | mit |
lingtalfi/bee | bee/modules/Bee/Notation/File/IndentedLines/MultiLineCompiler/MultiLineCompilerInterface.php | 512 | <?php
/*
* This file is part of the Bee package.
*
* (c) Ling Talfi <lingtalfi@bee-framework.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Bee\Notation\File\IndentedLines\MultiLineCompiler;
/**
* MultiLineComp... | mit |
surla/bookmark-list | app/models/bookmark.rb | 134 | class Bookmark < ActiveRecord::Base
belongs_to :user
belongs_to :category
validates_presence_of :url, :title, :description
end
| mit |
craftworkgames/Astrid.Framework | Astrid.Framework/Gui/Screen.cs | 2119 | using System.Collections.Generic;
using Astrid.Animations;
using Astrid.Core;
namespace Astrid.Gui
{
public interface IScreenContext : IDeviceManager
{
Camera Camera { get; }
Viewport Viewport { get; }
AssetManager AssetManager { get; }
void SetScreen(Screen screen);
}
... | mit |