repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
CaitlinJD/RA-Angular2Project | node_modules/tslint/lib/rules/onlyArrowFunctionsRule.js | 3447 | /**
* @license
* Copyright 2013 Palantir Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | mit |
lotaris/api-copilot | spec/cli.logger.spec.js | 8724 | var _ = require('underscore'),
colors = require('colors');
RegExp.escape = function(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
};
// TODO: complete this spec
describe("CLI Logger", function() {
var log4jsMock = require('./support/log4js.mock'),
ScenarioMock = require('./support/scenario.m... | mit |
deviffy/laravel-kendo-ui | wrappers/php/lib/Kendo/UI/TreeListColumnMenu.php | 1556 | <?php
namespace Kendo\UI;
class TreeListColumnMenu extends \Kendo\SerializableObject {
//>> Properties
/**
* If set to true the column menu would allow the user to select (show and hide) treelist columns. By default the column menu allows column selection.
* @param boolean $value
* @return \Kendo\UI\... | mit |
cmccullough2/cmv-wab-widgets | wab/2.2/widgets/BasemapGallery/setting/nls/cs/strings.js | 1046 | define({
"showArcgisBasemaps": "Zahrnout podkladové mapy portálu",
"add": "Kliknutím přidáte novou podkladovou mapu.",
"edit": "Vlastnosti",
"titlePH": "Název podkladové mapy",
"thumbnailHint": "Kliknutím na obrázek jej aktualizujete.",
"urlPH": "Adresa URL vrstvy",
"addlayer": "Přidat podkladovou mapu",
... | mit |
github/codeql | csharp/ql/test/library-tests/dataflow/ssa/Patterns.cs | 869 | using System;
class Patterns
{
void Test()
{
object o = null;
if (o is int i1)
{
Console.WriteLine($"int {i1}");
}
else if (o is string s1)
{
Console.WriteLine($"string {s1}");
}
else if (o is var v1)
{
}
... | mit |
LassieME/Discord.Net | src/Discord.Net.Rest/Entities/Users/RestConnection.cs | 1135 | using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using Model = Discord.API.Connection;
namespace Discord
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class RestConnection : IConnection
{
public string Id { get; }
public string Type { ge... | mit |
oliviertassinari/material-ui | packages/mui-icons-material/lib/esm/SearchOffOutlined.js | 617 | import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3 6.08 3 3.28 5.64 3.03 9h2.02C5.3 6.75 7.18 5 9.5 5 11.99 5 14 7.01 14 9.5S11.99 14 ... | mit |
maurer/tiamat | samples/Juliet/testcases/CWE90_LDAP_Injection/CWE90_LDAP_Injection__w32_wchar_t_connect_socket_81_bad.cpp | 2776 | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE90_LDAP_Injection__w32_wchar_t_connect_socket_81_bad.cpp
Label Definition File: CWE90_LDAP_Injection__w32.label.xml
Template File: sources-sink-81_bad.tmpl.cpp
*/
/*
* @description
* CWE: 90 LDAP Injection
* BadSource: connect_socket Read data using a connect ... | mit |
johnsietsma/HackerRankChallenges | src/c++/introduction/ForLoop.cpp | 792 | #include <iostream>
#include <cstdio>
using namespace std;
#include <iostream>
#include <cstdio>
using namespace std;
void print_number(int input) {
if (input == 1) std::cout << "one";
else if (input == 2) std::cout << "two";
else if (input == 3) std::cout << "three";
else if (input == 4) std::cout << "four";
el... | mit |
almera7/Movie-rental | app/cache/prod/twig/8f/e0/e3e93fa2f035d6ebe8a35f287f3b355ff3089a8760e71ca294f8ae2f0d3d.php | 2448 | <?php
/* TwigBundle:Exception:exception.xml.twig */
class __TwigTemplate_8fe0e3e93fa2f035d6ebe8a35f287f3b355ff3089a8760e71ca294f8ae2f0d3d extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = arra... | mit |
PaymentSuite/paymentsuite | src/PaymentSuite/RedsysBundle/Tests/RedsysSignatureTest.php | 686 | <?php
namespace PaymentSuite\RedsysBundle\Tests;
use PaymentSuite\RedsysBundle\RedsysSignature;
use PHPUnit\Framework\TestCase;
class RedsysSignatureTest extends TestCase
{
public function testToString()
{
$signature = new RedsysSignature('12345');
$this->assertEquals('12345', $signature->__... | mit |
nycdot/transam_core | spec/models/activity_log_spec.rb | 535 | require 'rails_helper'
RSpec.describe ActivityLog, :type => :model do
let(:test_log) { create(:activity_log) }
describe 'associations' do
it 'has an org' do
expect(test_log).to belong_to(:organization)
end
it 'has a user' do
expect(test_log).to belong_to(:user)
end
end
describe 'v... | mit |
djeik/goto | grading/typing/valid/unops.go | 620 | package main
func base_types() {
var (
a int
b float64
c rune
d string
e bool
)
// Unary plus
println(+a)
println(+b)
println(+c)
// Unary negation
println(-a)
println(-b)
println(-c)
// Unary bit-not
println(^a)
println(^c)
// Unary logical not
println(!e)
}
func type_aliases() {
type (... | mit |
cosnics/cosnics | src/Chamilo/Core/Repository/ContentObject/Rubric/Domain/Exceptions/InvalidRubricDataException.php | 1045 | <?php
namespace Chamilo\Core\Repository\ContentObject\Rubric\Domain\Exceptions;
use Chamilo\Core\Repository\ContentObject\Rubric\Storage\Entity\RubricData;
/**
* @package Chamilo\Core\Repository\ContentObject\Rubric\Domain\Exceptions
*
* @author Sven Vanpoucke - Hogeschool Gent
*/
class InvalidRubricDataExceptio... | mit |
smoench/SimpSpector | src/js/components/Markdown.js | 760 | import React from "react";
import 'prismjs/components/prism-core';
import 'prismjs/components/prism-markup';
import 'prismjs/components/prism-twig';
import 'prismjs/components/prism-clike';
import 'prismjs/components/prism-php';
import 'prismjs/plugins/line-highlight/prism-line-highlight';
import 'prismjs/plugins/line... | mit |
Yahnoosh/azure-sdk-for-net | src/Batch/Client/Src/Azure.Batch/GeneratedProtocol/IAccountOperations.cs | 4038 | // Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by a... | mit |
marcCanipel/xjavascript | exercises/crypto-square/crypto-square.spec.js | 1717 | var Crypto = require('./crypto-square');
describe('Crypto',function() {
it('normalize strange characters',function() {
var crypto = new Crypto('s#$%^&plunk');
expect(crypto.normalizePlaintext()).toEqual('splunk');
});
xit('normalize numbers',function() {
var crypto = new Crypto('1, 2, 3 GO!');
e... | mit |
Polynomial-C/PAmix | src/sinkinputentry.cpp | 2995 | #include <entry.hpp>
void SinkInputEntry::update(const pa_sink_input_info *info) {
// general vars
const char *name = pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME);
m_Name = name != nullptr ? name : info->name;
m_Index = info->index;
m_Mute = info->mute;
m_PAVolume = info-... | mit |
BrianAdams/openrov-cockpit | src/plugins/mobile-ui/index.js | 223 | function mobileUi( name, deps )
{
console.log( 'Mobile UI plugin loaded.' );
this.plugin =
{
name: "mobile-ui",
type: "theme"
};
}
module.exports = function( name,deps )
{
return new mobileUi( name, deps );
};
| mit |
FurryHead/Server | src/org/hyperion/rs2/model/NPCDefinition.java | 567 | package org.hyperion.rs2.model;
/**
* <p>Represents a type of NPC.</p>
* @author Graham Edgecombe
*
*/
public class NPCDefinition {
/**
* Gets an npc definition by its id.
* @param id The id.
* @return The definition.
*/
public static NPCDefinition forId(int id) {
return new NPCDefinition(id);
}
... | mit |
WesleyyC/Restaurant-Revenue-Prediction | Ari/preprocessing/feat_drop.py | 963 | import numpy as np
import pandas as pd
###############################################################################
# Load data
df_train = pd.read_csv("train_numerical_head.csv")
df_train.head()
df_test = pd.read_csv("test_numerical_head.csv")
df_train.head()
#####################################################... | mit |
rtoal/polyglot | python/memoized_fibonacci.py | 278 | def memoized(f):
cache = {}
def wrapper(*args):
if args in cache:
return cache[args]
cache[args] = f(*args)
return cache[args]
return wrapper
@memoized
def fib(n):
return 1 if n <= 1 else fib(n-1) + fib(n-2)
print(fib(100))
| mit |
tkerola/chainer | tests/chainermn_tests/links_tests/test_batch_normalization.py | 11195 | import chainer
import chainer.testing
import chainer.utils
import mpi4py.MPI
import numpy
import pytest
from chainermn.communicators.naive_communicator import NaiveCommunicator
from chainermn.communicators.pure_nccl_communicator import PureNcclCommunicator
from chainermn.links import MultiNodeBatchNormalization
from c... | mit |
qrb/riotjs | test/specs/compiler/parsers/js/test-alt.js | 659 | // alternative to nested custom tags using the comment hack.
// as the compiler expects only blanks after closing the tag, the inline
// comment following the first closing tag prevents the compiler sees it.
// UPDATE: hack NOT NECESSARY with the 0 indent restriction.
riot.tag2('treeitem', '<div class="{bold: isFolder(... | mit |
kdcllc/Chavah | Chavah.NetCore/wwwroot/js/Controllers/ShareThanksController.ts | 763 | namespace BitShuva.Chavah {
export class ShareThanksController {
static $inject = [
"$routeParams",
];
readonly artist: string | null;
constructor($routeParams: ng.route.IRouteParamsService) {
this.artist = $routeParams["artist"];
}
get do... | mit |
Diaks/git_repo-dashboard | app/cache.old/prod/annotations/1401ac6686cc754bbe82736c33282addb3aa4a11$totalpmd.cache.php | 264 | <?php return unserialize('a:1:{i:0;O:27:"Doctrine\\ORM\\Mapping\\Column":9:{s:4:"name";s:8:"TotalPMD";s:4:"type";s:5:"float";s:6:"length";N;s:9:"precision";i:24;s:5:"scale";i:0;s:6:"unique";b:0;s:8:"nullable";b:1;s:7:"options";a:0:{}s:16:"columnDefinition";N;}}'); | mit |
daviderwin/fiche | fiche-scroll.js | 1975 | var ficheScroll = function (e, f, args) {
// cache the fiche
this.f = f;
// cache the jquery element
this.$e = $(e);
this.$e.css({
position: 'relative',
overflow: 'hidden'
});
this.$viewable = $('<div></div>');
this.$viewable.addClass('fiche-scroll-viewable');
this.$viewable.css({
position: 'absolute... | mit |
egensolutions/data-viewer | src/app/features/infotable/infotable.controller.js | 346 | (function (angular) {
'use strict';
angular
.module('egen.app.infotable')
.controller('InfoTableController', InfoTableController);
function InfoTableController(dataService) {
var infoTableVm = this;
infoTableVm.tableContent=null;
infoTableVm.tableContent = dataSer... | mit |
Eclo/azure-iot-sdks | node/common/core/test/_shared_access_signature_test.js | 9823 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var assert = require('chai').assert;
var ArgumentError = require('../lib/errors.js').ArgumentError;
var FormatError = require('../lib/errors.js').FormatE... | mit |
NewSpring/apollos-core | imports/pages/profile/home/__tests__/Layout.js | 1104 | import { shallow } from "enzyme";
import { shallowToJson } from "enzyme-to-json";
import { Meteor } from "meteor/meteor";
import Layout from "../Layout";
const defaultProps = {
photo: "http://test.com/photo.jpg",
person: {
nickName: "jim",
lastName: "bob",
home: {
city: "anderson",
},
},
... | mit |
Dackng/eh-unmsm-client | node_modules/ng2-smart-table/lib/helpers.d.ts | 596 | /**
* Extending object that entered in first argument.
*
* Returns extended object or false if have no target object or incorrect type.
*
* If you wish to clone source object (without modify it), just use empty new
* object as first argument, like this:
* deepExtend({}, yourObj_1, [yourObj_N]);
*/
ex... | mit |
AbdulBasitBashir/learn-angular2 | step9_gulp_router/node_modules/angular2/src/change_detection/pipes/observable_pipe.d.ts | 1486 | import { Observable } from 'angular2/src/facade/async';
import { Pipe, PipeFactory } from './pipe';
import { ChangeDetectorRef } from '../change_detector_ref';
/**
* Implements async bindings to Observable.
*
* # Example
*
* In this example we bind the description observable to the DOM. The async pipe will... | mit |
solag/Sofia | app/cache/prod/annotations/9007c2252085976a65360cbdb38f64955fe485d5.cache.php | 311 | <?php return unserialize('a:2:{i:0;O:26:"Doctrine\\ORM\\Mapping\\Table":5:{s:4:"name";N;s:6:"schema";N;s:7:"indexes";N;s:17:"uniqueConstraints";N;s:7:"options";a:0:{}}i:1;O:27:"Doctrine\\ORM\\Mapping\\Entity":2:{s:15:"repositoryClass";s:41:"A2F\\SofiaBundle\\Entity\\SERVEROSRepository";s:8:"readOnly";b:0;}}'); | mit |
GlobalcachingEU/GAPP | GAPPSF/GCComBookmarks/Manager.cs | 5684 | using GAPPSF.ActionSequence;
using GAPPSF.Commands;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace GAPPSF.GCComBookmarks
{
public class Manager
{
private ... | mit |
QuantumRand/admob-google-cordova | src/android/AdMobAds.java | 35258 | /*
AdMobAds.java
Copyright 2015 AppFeel. All rights reserved.
http://www.appfeel.com
AdMobAds Cordova Plugin (com.admob.google)
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 re... | mit |
cmm863/HearthAttack | java/HearthSim/src/main/java/com/hearthsim/card/thegrandtournament/minion/common/BoneguardLieutenant.java | 865 | package com.hearthsim.card.thegrandtournament.minion.common;
import com.hearthsim.card.minion.Minion;
import com.hearthsim.card.minion.MinionWithInspire;
import com.hearthsim.event.effect.EffectCharacter;
import com.hearthsim.event.effect.EffectCharacterBuffDelta;
import com.hearthsim.event.filter.FilterCharacter;
imp... | mit |
mikesmayer/vdms | spec/controllers/visitor_field_types_controller_spec.rb | 9033 | require 'spec_helper'
describe VisitorFieldTypesController do
before(:each) do
@field_type = Factory.create(:visitor_field_type)
@event = @field_type.event
Event.stub(:find).and_return(@event)
@admin = Factory.create(:person, :ldap_id => 'admin', :role => 'administrator')
RubyCAS::Filter.fake('ad... | mit |
ViniciusWAHaas/DNS_stub_server-Node.js | dnsserver.js | 37043 | const dgram = require('dgram');
const server = dgram.createSocket('udp4');
const dns = require('dns');
const fs = require('fs');
fs.mkdirTreeSync = function (path, lastfolder) {
path = path.split('/');
lastpath = ".";
for (var a = 0; a < path.length - (lastfolder ? 0 : 1); a++) {
try {
fs.mkdirSync(lastpath = ... | mit |
leotsarev/joinrpg-net | src/PscbApi/Models/PaymentMessage.cs | 5143 | // ReSharper disable IdentifierTypo
// ReSharper disable InconsistentNaming
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace PscbApi.Models
{
/// <summary>
/// Payment message
/// </summary>
/// <remarks>
/// See https://... | mit |
MaryJaneCoin/maryjane | src/qt/locale/bitcoin_la.ts | 118196 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="la" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About MaryJaneCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location l... | mit |
gintsgints/sequelize | test/integration/hooks.test.js | 76264 | 'use strict';
/* jshint -W030 */
var chai = require('chai')
, expect = chai.expect
, Support = require(__dirname + '/support')
, DataTypes = require(__dirname + '/../../lib/data-types')
, Sequelize = Support.Sequelize
, sinon = require('sinon')
, dialect = Support.getTestDialect();
describe(Support.getTes... | mit |
sgpatil/NeoEloquent | src/Vinelab/NeoEloquent/Console/Migrations/MigrateMakeCommand.php | 3183 | <?php
namespace Vinelab\NeoEloquent\Console\Migrations;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Vinelab\NeoEloquent\Migrations\MigrationCreator;
class MigrateMakeCommand extends BaseCommand
{
/**
* {@inheritDoc}
*/
protected $name = 'n... | mit |
BanBart/Symfony2-Project | app/cache/dev/twig/73/61/a3743db2e60af0775bb3bc0f75e86dfe96a8ee258462c47d889f44823ab1.php | 1017 | <?php
/* SonataDoctrineORMAdminBundle:Form:filter_admin_fields.html.twig */
class __TwigTemplate_7361a3743db2e60af0775bb3bc0f75e86dfe96a8ee258462c47d889f44823ab1 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->... | mit |
galinski/jquery-countdown-rails | lib/jquery-countdown-rails.rb | 416 | require 'jquery-countdown-rails/version'
# Public: Adds jquery-countdown to the asset pipeline, for rails and
# standalone Sprockets
module JqueryCountdownRails
if defined? ::Rails
if ::Rails.version.to_s < '3.1'
require 'jquery-countdown-rails/railtie'
else
require 'jquery-countdown-rails/engine... | mit |
SrunSundy/NhameyWebBackEnd | application/views/pages/event.php | 54333 | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Event List | Dernham</title>
<?php include 'imports/cssimport.php' ?>
<style>
p.list-shop-total{
font-size: 18px;
font-weight: bold;
color: #616161;
}
button... | mit |
dmitry-merzlyakov/the-cat-lang | OriginCode/cat-1-0-b4/CatVarRenamer.cs | 6611 | /// Dedicated to the public domain by Christopher Diggins
/// http://creativecommons.org/licenses/publicdomain/
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
namespace Cat
{
/// <summary>
/// The renamer assigns new names to a set of variables either from a supp... | mit |
TelerikAcademy-Cloning/Databases | Sample-Exams/2015/Author/Problem 3 - Sample Data/PetStore.Importer/Importers/CategoryImporter.cs | 1344 | namespace PetStore.Importer.Importers
{
using System;
using System.Collections.Generic;
using System.IO;
using PetStore.Data;
public class CategoryImporter : IImporter
{
private const int NumberOfCountries = 50;
public string Message
{
get { re... | mit |
johnsonlin/portfolio | src/main.ts | 391 | import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import 'hammerjs';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDyn... | mit |
kittehcoin/kittehcoin | src/qt/addressbookpage.cpp | 12783 | #include "addressbookpage.h"
#include "ui_addressbookpage.h"
#include "addresstablemodel.h"
#include "optionsmodel.h"
#include "bitcoingui.h"
#include "editaddressdialog.h"
#include "csvmodelwriter.h"
#include "guiutil.h"
#ifdef USE_QRCODE
#include "qrcodedialog.h"
#endif
#include <QSortFilterProxyModel>
#include <Q... | mit |
minime283/draft | app/config/view.php | 922 | <?php
return array(
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be check... | mit |
devatwork/Premotion-Mansion | src/Premotion.Mansion.Core/ScriptTags/Stack/SetPropertiesTag.cs | 1682 | using System;
using System.Collections.Generic;
using Premotion.Mansion.Core.Collections;
using Premotion.Mansion.Core.Scripting.TagScript;
namespace Premotion.Mansion.Core.ScriptTags.Stack
{
/// <summary>
/// Opens a template.
/// </summary>
[ScriptTag(Constants.NamespaceUri, "setProperties")]
public class SetPr... | mit |
axilleas/gitlabhq | spec/javascripts/environments/environments_app_spec.js | 7320 | import Vue from 'vue';
import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
import environmentsComponent from '~/environments/components/environments_app.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { environment, folder } from './mock_data';
... | mit |
abulrim/ember.js | packages/ember/tests/helpers/link_to_test.js | 64949 | import "ember";
import { objectControllerDeprecation } from "ember-runtime/controllers/object_controller";
import EmberHandlebars from "ember-htmlbars/compat";
var compile = EmberHandlebars.compile;
var Router, App, AppView, router, registry, container;
var set = Ember.set;
function bootApplication() {
router = c... | mit |
cosnics/cosnics | src/Chamilo/Core/Repository/ContentObject/File/Common/Rendition/Html/Extension/HtmlInlineHtmlRenditionImplementation.php | 1994 | <?php
namespace Chamilo\Core\Repository\ContentObject\File\Common\Rendition\Html\Extension;
use Chamilo\Core\Repository\ContentObject\File\Common\Rendition\Html\HtmlInlineRenditionImplementation;
use Chamilo\Core\Repository\ContentObject\File\Storage\DataClass\File;
use Chamilo\Libraries\Format\Theme;
/**
*
* @pack... | mit |
amplitude/analytics-android | analytics/src/main/java/com/segment/analytics/Properties.java | 11963 | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 Segment, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use... | mit |
gregwym/joos-compiler-java | testcases/a2/Je_4_ExtendFinal.java | 342 | // JOOS1:HIERARCHY,EXTENDS_FINAL_CLASS
// JOOS2:HIERARCHY,EXTENDS_FINAL_CLASS
// JAVAC:UNKNOWN
//
/**
* Hierarchy:
* - A class must not extend a final class (8.1.1.2, 8.1.3, simple
* constraint 4).
*/
public class Je_4_ExtendFinal extends Integer {
public Je_4_ExtendFinal() {}
public static int test() {
... | mit |
OndraM/php-webdriver | lib/Exception/InvalidElementStateException.php | 284 | <?php
namespace Facebook\WebDriver\Exception;
/**
* A command could not be completed because the element is in an invalid state, e.g. attempting to clear an element
* that isn’t both editable and resettable.
*/
class InvalidElementStateException extends WebDriverException
{
}
| mit |
valentin-biig/sentry-demo | tests/AppBundle/Controller/Admin/BlogControllerTest.php | 5972 | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests\AppBundle\Controller\Admin;
use AppBundle\DataFixtures\FixturesTr... | mit |
navalev/azure-sdk-for-java | sdk/mediaservices/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/Codec.java | 1790 | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.mediaservices.v2018_06_01_preview;
import com.fa... | mit |
redknightlois/arrayslice | Corvalius.ArraySlice.Portable328/IHideObjectMembers.cs | 337 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
namespace Corvalius.ArraySlice
{
[EditorBrowsable(EditorBrowsableState.Never)]
public interface IHideObjectMembers
{
[EditorBrowsable(EditorBrowsableState.Never)]
string ToStr... | mit |
mattdbridges/validates_formatting_of | spec/validates_formatting_of/model_additions_spec.rb | 12755 | require 'spec_helper'
RSpec.describe ValidatesFormattingOf::ModelAdditions do
describe "email" do
class Email < TestActiveRecord
attr_accessor :email
validates_formatting_of :email
end
it "validates that the email provided is valid" do
expect(Email.new(:email => "example@example.com"))... | mit |
rrozewsk/OurProject | UnitTests/test_corporateRates.py | 1403 | from datetime import date
from unittest import TestCase
import numpy as np
import pandas as pd
from Curves.Corporates.CorporateDaily import CorporateRates
from parameters import WORKING_DIR
periods = '1Y'
freq = '1M'
t_step = 1.0 / 365.0
simNumber = 10
start = date(2005, 3, 30)
trim_start = date(2000, 1, 1)
trim_en... | mit |
5t111111/tapp | lib/tapp/printer/pretty_print.rb | 318 | require 'tapp/printer'
module Tapp::Printer
class PrettyPrint < Base
def print(*args)
require 'pp'
self.class.class_eval do
remove_method :print
def print(*args)
pp(*args)
end
end
print(*args)
end
end
register :pretty_print, PrettyPrint
end
| mit |
MetaMemoryT/node-libcurl | test/main.js | 1076 | function importTest( name, path, only, skip ) {
if ( typeof only == 'undefined' )
only = false;
if ( typeof skip == 'undefined' )
skip = false;
only = !!only;
skip = !!skip;
if ( only ) {
describe.only( name, function () {
require( path );
});
} ... | mit |
lrt/lrt | vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Mapping/Driver/Annotation.php | 3766 | <?php
namespace Gedmo\Loggable\Mapping\Driver;
use Doctrine\ORM\Mapping\ClassMetadata;
use Gedmo\Mapping\Driver\AbstractAnnotationDriver,
Gedmo\Exception\InvalidMappingException;
/**
* This is an annotation mapping driver for Loggable
* behavioral extension. Used for extraction of extended
* metada... | mit |
shaunstanislaus/phaser | src/pixi/renderers/webgl/WebGLShaders.js | 3171 | /**
* @author Mat Groves http://matgroves.com/ @Doormat23
*/
PIXI.initDefaultShaders = function()
{
PIXI.primitiveShader = new PIXI.PrimitiveShader();
PIXI.primitiveShader.init();
PIXI.stripShader = new PIXI.StripShader();
PIXI.stripShader.init();
PIXI.defaultShader = new PIXI.PixiShader();
... | mit |
lefela4/agario-clientv4 | examples/socks.js | 3539 | //This is example of connection to agar.io's server through SOCKS4/SOCKS5 server
if(process.argv.length < 5) {
var warning = [
'Please launch this script like',
' node ./examples/socks.js SOCKS_VERSION SOCKS_IP SOCKS_PORT',
'SOCKS_IP - IP of SOCKS server',
'SOCKS_PORT ... | mit |
kataras/gapi | core/router/router_subdomain_redirect.go | 9393 | package router
import (
"fmt"
"net/http"
"strconv"
"strings"
"text/template"
"unicode/utf8"
"github.com/kataras/iris/v12/context"
"github.com/kataras/iris/v12/core/netutil"
)
type subdomainRedirectWrapper struct {
// the func which will give us the root domain,
// it's declared as a func because in that st... | mit |
standard-analytics/mesh-tree | export/exportPropertiesObjects.js | 660 | let fs = require('fs');
let _ = require('lodash');
let Promise = require('bluebird');
let MeshTree = require('../dist');
let meshTree = new MeshTree();
const MESH = 'http://id.nlm.nih.gov/mesh/';
(Promise.coroutine(function* () {
let objs = {};
let ids = yield meshTree.getAllDescUIs({ format: 'rdf' });
for (let... | mit |
fireball-packages/console | test/renderer/basic.js | 1988 | 'use strict';
describe('Basic', function() {
Helper.runPanel( 'console.panel' );
it('should recv ipc "console:log"', function() {
let targetEL = Helper.targetEL;
Helper.send('console:log', 'foo bar');
expect(targetEL.logs[0] ).to.deep.equal({
type: 'log',
text: 'foo bar',
desc: 'fo... | mit |
zaoying/EChartsAnnotation | src/cn/edu/gdut/zaoying/Option/series/funnel/markLine/data/p0/SymbolString.java | 357 | package cn.edu.gdut.zaoying.Option.series.funnel.markLine.data.p0;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface SymbolStri... | mit |
packlnd/IFDS-RA | src/main/java/flow/twist/propagator/backwards/ArgumentSourceHandler.java | 2131 | package flow.twist.propagator.backwards;
import static flow.twist.ifds.Propagator.KillGenInfo.identity;
import soot.Local;
import soot.SootMethod;
import soot.Unit;
import soot.Value;
import soot.jimple.IdentityStmt;
import soot.jimple.ParameterRef;
import soot.jimple.Stmt;
import flow.twist.TransitiveSinkCaller;
impo... | mit |
vuejs/vue-validator | test/unit/components/validity-group-functional.test.js | 8101 | import ValidityControl from '../../../src/components/validity/index'
import ValidityGroup from '../../../src/components/validity-group.js'
const validityControl = ValidityControl(Vue)
const validityGroup = ValidityGroup(Vue)
describe('validity-group functional component', () => {
let el
const components = {
v... | mit |
korayguney/veteranteam_project | src/views/shows/shows-view.js | 789 | import ListView from './list-view';
import { View, ViewManager, NavBar, __ } from 'erste';
export default class ShowsView extends View {
constructor() {
super();
this.vm = new ViewManager(this);
this.listView = new ListView(this.vm);
this.navBar = new NavBar({
title: _... | mit |
lianke123321/centinel-server | tests.py | 3925 | import flask
from flask import Flask
from flask.ext.testing import TestCase
from server import app, db, Client
import config
#for tests
import os
from cStringIO import StringIO
import unittest
import uuid
import base64
import io
from passlib.apps import custom_app_context as pwd_context
class MyTest(TestCase):
t... | mit |
vegas-cmf/official | app/modules/Project/services/Gallery.php | 696 | <?php
/**
* This file is part of Vegas package
*
* @author Jaroslaw <Macko>
* @copyright Amsterdam Standard Sp. Z o.o.
* @homepage http://vegas-cmf.github.io
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Project\Serv... | mit |
gizwits/Gizwits-AirConditioner_Android | src/com/gizwits/framework/activity/onboarding/AutoConfigActivity.java | 7594 | /**
* Project Name:XPGSdkV4AppBase
* File Name:AutoConfigActivity.java
* Package Name:com.gizwits.framework.activity.onboarding
* Date:2015-1-27 14:45:54
* Copyright (c) 2014~2015 Xtreme Programming Group, Inc.
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ass... | mit |
dsp2003/GARbro | ArcFormats/FC01/WidgetMCG.xaml.cs | 2369 | using GameRes.Formats.FC01;
using GameRes.Formats.Strings;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Controls;
using System.Windows.Data;
namespace GameRes.Formats.GUI
{
/// <summary>
/// Interaction logic for WidgetMCG.xaml
/// </s... | mit |
ahellander/Cloud-Metric | resource_mining.py | 4126 | #! /usr/bin/env python
import platform, socket
import psutil
import sys, datetime, os, json
import pymongo
from pymongo import MongoClient
"""
Retrieve memmory information
"""
def bytes_to_human(n):
# >>> bytes2human(10000)
# '9.8K'
# >>> bytes2human(100001221)
# '95.4M'
symbols = ('G')
pre... | mit |
fuhongliang/20150606renren | Application/Common/Common/function.php | 23376 | <?php
// .-----------------------------------------------------------------------------------
// | WE TRY THE BEST WAY
// |-----------------------------------------------------------------------------------
// | Author: 贝贝 <hebiduhebi@163.com>
// | Copyright (c) 2013-2015, http://www.gooraye.net. All Rights Reserv... | mit |
cjord01/imdb_clone | imdb/app/models/movie.rb | 89 | class Movie < ActiveRecord::Base
has_many :roles
has_many :actors, through: :roles
end
| mit |
chicho2114/Proy_Frameworks | app/cache/dev/twig/06/45/e00d68ac581955401f16ae6bf40fd3aec4453b7a1248f1b791dc08b37fb9.php | 1540 | <?php
/* SonataAdminBundle:CRUD:edit_array.html.twig */
class __TwigTemplate_0645e00d68ac581955401f16ae6bf40fd3aec4453b7a1248f1b791dc08b37fb9 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->blocks = array(
'field' => ar... | mit |
vihoangson/LearningEnglish | application/controllers/Ajax.php | 764 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Ajax extends CI_Controller {
public function word_in_cat()
{
if(!$_REQUEST["id"]) return false;
$this->load->model('word');
header('Content-Type: application/json');
echo json_encode($this->word->getByCat($_REQUEST["id"]));
}
pub... | mit |
yogeshsaroya/new-cdnjs | ajax/libs/yui/3.17.1/io-xdr/io-xdr-debug.js | 129 | version https://git-lfs.github.com/spec/v1
oid sha256:fc0e8a48504c3168a9c64fd938a26d63c4ca82ab857f63ce78fd885050fb2d4d
size 8326
| mit |
testcontainers/testcontainers-java | modules/db2/src/main/java/org/testcontainers/containers/Db2ContainerProvider.java | 604 | package org.testcontainers.containers;
import org.testcontainers.utility.DockerImageName;
public class Db2ContainerProvider extends JdbcDatabaseContainerProvider {
@Override
public boolean supports(String databaseType) {
return databaseType.equals(Db2Container.NAME);
}
@Override
public Jd... | mit |
tatsuio/converse | spec/dialogue/message_decorators/slack_spec.rb | 1288 | RSpec.describe Dialogue::MessageDecorators::Slack do
let(:channel_id) { "CHANNEL1" }
let(:message) { double(:message, user: user_id, channel: channel_id, team: team_id) }
let(:team_id) { "TEAM1" }
let(:user_id) { "USER1" }
subject { described_class.new(message) }
describe "#initialize" do
it "is initia... | mit |
andygrunwald/go-jira | organization_test.go | 10603 | package jira
import (
"encoding/json"
"fmt"
"net/http"
"testing"
)
func TestOrganizationService_GetAllOrganizationsWithContext(t *testing.T) {
setup()
defer teardown()
testMux.HandleFunc("/rest/servicedeskapi/organization", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
testRequestU... | mit |
GlobalcachingEU/GAPP | GAPPSF/MapProviders/OSMBinMap/Way.cs | 1012 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GAPPSF.MapProviders.OSMBinMap
{
public class Way
{
public class WayCoordinate
{
public int Latitude { get; set; }
public int Longitude { get; set; }
}
public ... | mit |
jorupp/conference-room | Bot/Criteria/RoomStatusCriteria.cs | 2198 | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Bot.Builder.FormFlow;
using Microsoft.Bot.Builder.FormFlow.Advanced;
using Microsoft.Bot.Builder.Luis.Models;
using RightpointLabs.ConferenceRoom.Bot.Extensions;
namespace RightpointLabs.ConferenceRoom.Bot.Criteria
{
[Serializable]... | mit |
romulo1984/bolt | tests/phpunit/unit/Nut/ConfigGetTest.php | 1963 | <?php
namespace Bolt\Tests\Nut;
use Bolt\Filesystem\Adapter\Local;
use Bolt\Filesystem\Filesystem;
use Bolt\Nut\ConfigGet;
use Bolt\Tests\BoltUnitTest;
use Symfony\Component\Console\Tester\CommandTester;
/**
* Class to test src/Nut/ConfigGet.
*
* @author Ross Riley <riley.ross@gmail.com>
*/
class ConfigGetTest e... | mit |
jhelbig/postman-linux-app | app/resources/app/node_modules/parley/test/fixtures/validate.fixture.js | 4355 | /**
* Module dependencies
*/
var _ = require('@sailshq/lodash');
var parley = require('../../');
/**
* validate.fixture.js
*
* A simplified mock of a hypothetical `validate()` model method
* that is actually synchronous. (This is primarily for use in benchmarks.)
*
* @param {Function} explicitCbMaybe
*
* ... | mit |
brussell/leadsneeds | addentry.php | 2588 | <div id="inputs">
<form action="">
<fieldset>
<h2>Add a lead or a need.</h2>
<div class="field">
<label for="givenname">First Name</label><br />
<input type="text" id="givenname" />
</div>
<div class="field">
<label for="additionalname">Middle Name</label><br />
<input type="text" id="additiona... | mit |
nsartor/Squire | source/Range.js | 15413 | /*jshint strict:false, undef:false, unused:false, latedef:false */
var getNodeBefore = function ( node, offset ) {
var children = node.childNodes;
while ( offset && node.nodeType === ELEMENT_NODE ) {
node = children[ offset - 1 ];
children = node.childNodes;
offset = children.length;
... | mit |
Yobeekster/SolidWorks | SolidDna/AngelSix.SolidDna/SolidWorks/Models/Feature/FeatureData/FeatureDeleteBodyData.cs | 485 | using SolidWorks.Interop.sldworks;
namespace AngelSix.SolidDna
{
/// <summary>
/// Represents a SolidWorks Delete Body feature data
/// </summary>
public class FeatureDeleteBodyData : SolidDnaObject<IDeleteBodyFeatureData>
{
#region Constructor
/// <summary>
/// Default co... | mit |
m00s/MS-MealPlanner-CLIENT- | client/components/recipe/recipe.service.js | 169 | 'use strict';
angular.module('msMealPlannerApp.recipe', ['restangular'])
.factory('Recipe', function (Restangular) {
return Restangular.service('recipes');
});
| mit |
srthurman/transitland-python-client | transitland/errors.py | 452 | ##### Exceptions #####
class ExistingIdentifierError(KeyError):
pass
class NoPointsError(ValueError):
pass
class InvalidFeedRegistryError(ValueError):
pass
class InvalidChecksumError(ValueError):
pass
class DatastoreError(Exception):
def __init__(self, message, response_code=None, response_body=Non... | mit |
bburnichon/PHPExiftool | lib/PHPExiftool/Driver/Tag/IFD0/LinearityLimitGreen.php | 808 | <?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\IFD0;
use JMS\Serializer\Annotation\ExclusionPolicy;
... | mit |
HANDLL/Dynamoid | spec/dynamoid_spec.rb | 356 | require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe "Dynamoid" do
it "doesn't puke when asked for the assocations of a new record" do
User.new.books.should == []
end
it "doesn't connect automatically when configured" do
Dynamoid::Adapter.expects(:reconnect!).never
Dynamoid.co... | mit |
KeyteqLabs/benchit.com | js/main.js | 3694 | var cloudfront = 'd6z0ab4she5iy.cloudfront.net';
angular.module('benchit.com', ['ui.router'])
.config(function($locationProvider, $urlRouterProvider, $stateProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$urlRouterProvider.when('', '/')... | mit |
dblock/slack-ruby-bot | examples/market/marketbot.rb | 931 | # frozen_string_literal: true
require 'iex-ruby-client'
require 'slack-ruby-bot'
SlackRubyBot::Client.logger.level = Logger::WARN
class MarketBot < SlackRubyBot::Bot
scan(/([A-Z]{2,5}+)/) do |client, data, stocks|
stocks.each do |stock|
begin
quote = IEX::Resources::Quote.get(stock.first)
... | mit |