repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
ErikSchierboom/xcsharp
exercises/resistor-color/ResistorColorTest.cs
730
// This file was auto-generated based on version 1.0.0 of the canonical data. using Xunit; public class ResistorColorTest { [Fact] public void Black() { Assert.Equal(0, ResistorColor.ColorCode("black")); } [Fact(Skip = "Remove to run test")] public void White() { Assert.Eq...
mit
canfeit/canfei
canfei.js
1478
/** * Creates an array with all falsey values removed. The values undefined,null,0,+0,-0,NaN,'',"",false are falsey. * <br>compact([1, 0, '', 8])//[1, 8] */ const compact = function (arr) { return arr.filter(v => v) }; /** * 判断对象类型 * <br>complexType(1)//'Number' * <br>complexType(new Date())//'Date' */ const c...
mit
maciejkaiser/InvoiceApp
application/controllers/Firm.php
2806
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /** * User class */ class Firm extends CI_Controller { public function index(){ if(($this->session->userdata('user_name'))){ $this->load->model('firmmodel'); $title = "Firms"; $data = array('title' => $title); $data['firms'] = $this-...
mit
jocoonopa/lubri
app/Http/Controllers/Report/RetailSalesController.php
618
<?php namespace App\Http\Controllers\Report; use App\Events\Report\RetailSales\ReportEvent; use App\Export\RetailSales\Export; use App\Http\Controllers\Controller; use Event; class RetailSalesController extends Controller { public function index() { return redirect('/pos/store_goal'); } publ...
mit
ycabon/presentations
2020-devsummit/arcgis-js-api-road-ahead/js-api/esri/widgets/smartMapping/SizeSlider/nls/SizeSlider.js
410
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.16/esri/copyright.txt for details. //>>built define({root:{widgetLabel:"Size Slider"},ar:1,bs:1,ca:1,cs:1,da:1,de:1,el:1,es:1,et:1,fi:1,fr:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,ko:1,lv:1,lt:1,nl:1,nb:1,pl:1,"pt-br"...
mit
RectorPHP/Rector
vendor/ssch/typo3-rector/stubs/t3lib_cache_Factory.php
196
<?php namespace RectorPrefix20210615; if (\class_exists('t3lib_cache_Factory')) { return; } class t3lib_cache_Factory { } \class_alias('t3lib_cache_Factory', 't3lib_cache_Factory', \false);
mit
kamermans/guzzle4-oauth2-subscriber
src/kamermans/GuzzleOAuth2/GrantType/GrantTypeInterface.php
373
<?php namespace kamermans\GuzzleOAuth2\GrantType; use kamermans\GuzzleOAuth2\TokenData; use kamermans\GuzzleOAuth2\Signer\ClientCredentials\SignerInterface; interface GrantTypeInterface { /** * Get the token data returned by the OAuth2 server. * * @return TokenData */ public function getTo...
mit
kunesv/stuha18-server
src/main/java/net/stuha/messages/formattedText/ReplyTo.java
1089
package net.stuha.messages.formattedText; import net.stuha.messages.MessageReplyTo; public class ReplyTo extends TextNode { private String replyToId; private String iconPath; private String caption; ReplyTo() { this.nodeType = NodeType.REPLY_TO; } ReplyTo(String replyToId, String ico...
mit
the-wr/infineon
Infineon/HelpWindow.cs
2161
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Windows; using System.Windows.Controls; using mshtml; namespace Infineon { public class HelpWindow { private WebBrowser wb; public HelpWind...
mit
stevejc/subscribem
app/controllers/subscribem/accounts_controller.rb
598
require_dependency "subscribem/application_controller" module Subscribem class AccountsController < ApplicationController def new @account = Subscribem::Account.new @account.build_owner end def create @account = Subscribem::Account.new(params[:account]) if @account.save...
mit
nullstyle/nrepl
lib/nrepl.rb
184
require "nrepl/version" require 'active_support/core_ext/hash' require 'active_support/core_ext/object' require 'nrepl/core_ext/hash' module Nrepl autoload :Repl, 'nrepl/repl' end
mit
monty5811/cedarserver
media/client/subscriptions.js
27
Meteor.subscribe('media');
mit
kirnbas/BlogEngineTK
BlogEngineTK.WebUI/Properties/AssemblyInfo.cs
1372
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("Bl...
mit
CCPorg/BOS-BossCoin-Ver-1-Copy
src/wallet.cpp
52918
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Copyright (c) 2013 Bosscoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license...
mit
abbr/ShowPreper
src/components/overview/handouts.js
1851
import React from 'react' import './handouts.less' import _ from 'lodash' import { langs } from 'i18n/lang' var DisplayableComponent = require('components/widgets/displayableComponent') module.exports = class extends React.Component { updateNotes = (index, markUndoDesc, e) => { this.props.onSelectedWidgetUpdated...
mit
hrist0stoichev/Telerik-Exams
DataBasesExam2014/Solution/CarsStore/CarsStore/CarsStore.Models/Properties/AssemblyInfo.cs
1408
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("Ca...
mit
JoeFu/mseproject
Website/demo/backend/ServiceTest.php
10500
<!-- This is Test file to test the backend services. --> <?php /** APIs is for new DashBoard, Simple Query and Report System **/ session_start(); /** AService is supporting APIs **/ // Load Activity Numbers function class testService { function testLoadActivityNumber() { include_once('one_connection.php...
mit
JCube001/socketcan-demo
src/socketcan-raw-demo.cpp
8308
/* The MIT License (MIT) Copyright (c) 2015, 2016 Jacob McGladdery 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, modif...
mit
dangerozov/linqor
Linqor.Tests/SelectManyTests.cs
2771
using System.Collections.Generic; using System.Linq; using NUnit.Framework; using static Linqor.Tests.Helpers; namespace Linqor.Tests { [TestFixture] public class SelectManyTests { [TestCaseSource(nameof(GetTestCases))] public string[] SelectMany(string[] source, string[][] selectorResult) ...
mit
roshankulkarni/springbaseline
src/main/java/com/mindstix/sample/controller/SampleController.java
940
/** * Released under the Creative Commons License. */ package com.mindstix.sample.controller; import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.sprin...
mit
AlexMAS/GostCryptography
Source/GostCryptography/Native/ISafeHandleProvider.cs
962
using System.Runtime.InteropServices; using System.Security; namespace GostCryptography.Native { /// <summary> /// Провайдер дескрипторов криптографического объекта. /// </summary> /// <typeparam name="T">Тип безопасного дескриптора.</typeparam> public interface ISafeHandleProvider<out T> where T : SafeHandle {...
mit
ustream/yolo
src/test/java/tv/ustream/yolo/config/ConfigPatternTest.java
4247
package tv.ustream.yolo.config; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; /** * @author bandesz */ public class ConfigPatternTest { @Rule public ExpectedException ...
mit
mrjoseph/react-redux-todo-app
src/todo-app/actions.js
635
const uid = () => Math.random().toString(34).slice(2); export function addTodo(text) { return { type: 'ADD_TODO', payload: { id: uid(), isDone: false, text: text, editable:false } }; } export function toggleTodo(id) { return { type: 'TOGGLE_TODO', payload: id }; } ...
mit
thesolarnomad/lora-serialization
test/helpers.cpp
297
void printByteArrayToHex(byte *arr) { for(int i = 0; i < sizeof(arr); i++) { printf("%02x", arr[i]); } printf("\n"); } void compare_array(byte *arr1, byte *arr2, int start, int len) { for(int i = start; i < start + len; i++) { REQUIRE(arr1[i] == arr2[i]); } }
mit
ClifG/daily-fantasy-football
models/user.js
493
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var userSchema = new Schema({ facebookId: String, facebookToken: String, // TODO: Make a publicProfile so we don't expose email address or anything else // that may be sensitive to other users. profile: { name: String, ...
mit
Alberdi/ancientest
src/country.py
3817
from element import Element class Country(): def __init__(self): self.area = None self.element = None def add_area(self, list_of_points): if not self._check_inline(list_of_points): self.area = Area(list_of_points, self) def is_adjacent(self, other): return self._intersects(other, False) def is_enemy(...
mit
cadyyan/levels
src/main/java/com/cadyyan/levels/Levels.java
1876
package com.cadyyan.levels; import com.cadyyan.levels.commands.CommandLevel; import com.cadyyan.levels.handlers.ConfigurationHandler; import com.cadyyan.levels.proxies.IProxy; import com.cadyyan.levels.registries.RecipeModificationRegistry; import com.cadyyan.levels.utils.SerializationHelper; import net.minecraftforge...
mit
hazzik/Maybe
src/Maybe/Maybe.Nullable.cs
517
namespace Hazzik.Maybe { using System; using JetBrains.Annotations; public partial class Maybe { [CanBeNull, ContractAnnotation("self:null=>null")] public static TResult With<T, TResult>([CanBeNull] this T? self, [NotNull] Func<T, TResult> func) where T : struct { ...
mit
AlanBell/robopi
scratra.py
6776
# scratra ~ 0.3 # greatdane ~ easy python implementation with scratch # inspired by sinatra(sinatrarb.com) ~ code snippets from scratch.py(bit.ly/scratchpy) import socket from errno import * from array import array import threading # Errors from scratch.py class ScratchConnectionError(Exception): pass class Scratch...
mit
Innmind/TimeContinuum
tests/Earth/Timezone/Asia/BruneiTest.php
376
<?php declare(strict_types = 1); namespace Tests\Innmind\TimeContinuum\Earth\Timezone\Asia; use Innmind\TimeContinuum\{ Earth\Timezone\Asia\Brunei, Timezone, }; use PHPUnit\Framework\TestCase; class BruneiTest extends TestCase { public function testInterface() { $zone = new Brunei; $...
mit
DBooots/ReCoupler
ReCoupler/AbstractJointTracker.cs
2023
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ReCoupler { public abstract class AbstractJointTracker { public List<Part> parts; public List<AttachNode> nodes; protected bool[] structNodeMan = new bool[2] { false, false }; publi...
mit
codeflo/cubehack
source/CubeHack.Core/Util/GameDuration.cs
2567
// Copyright (c) the CubeHack authors. All rights reserved. // Licensed under the MIT license. See LICENSE.txt in the project root. using ProtoBuf; namespace CubeHack.Util { /// <summary> /// Represents a duration (or time span) between two <see cref="GameTime"/> instances. /// </summary> [ProtoContr...
mit
MarkKremer/laravel-elixir-image
lib/compiler.js
3570
var gutil = require('gulp-util'), through = require('through2'), path = require('path'), spawn = require('child_process').spawn, config = require('./../config'), util = require('./util'); /** * Check if the file should be skipped because it is empty or because of incompatibility. * * @param file...
mit
chcaru/csquared
Interpreter/Program.cs
848
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CSquared; namespace Interpreter { class Interpreter { static void Main(string[] args) { if (args.Length <= 0) { throw new Exception(...
mit
rawlep/MetaAnalyticFramework
Program.cs
7137
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace paperTestsCode { class Program { static void Main(string[] args) { /// example from the article List<double[]> articleData = new List<double[]>(); articleData.Add...
mit
travelpaq/Connect-SDK-PHP
src/Models/Exceptions/PackagesAPIException.php
1331
<?php /** * TravelPAQ Connect Api * * @package TravelPAQ * * @author TravelPAQ <malves@travelpaq.com.ar> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace TravelPAQ\PackagesAPI\Models\Exceptions; abstract class...
mit
guidance-guarantee-programme/pension_guidance
app/lib/bsl/mapper.rb
1132
module Bsl class Mapper def initialize(booking_request) @booking_request = booking_request end def call # rubocop:disable MethodLength, AbcSize { first_name: booking_request.first_name, last_name: booking_request.last_name, email: booking_request.email, phone: ...
mit
Womak/MVC-Froggy
src/CFroggy/CFroggy.php
3934
<?php /** * Main class for Froggy, holds everything. * * @package FroggyCore * -- Based on MOS creation Lydia MVC -- */ class CFroggy implements ISingleton { private static $instance = null; /** * Constructor */ protected function __construct() {...
mit
pmrozek/highcharts
Highsoft.Web.Mvc/src/Highsoft.Web.Mvc/Charts/PlotOptionsLineMarkerStatesSelect.cs
3156
// Type: Highsoft.Web.Mvc.Charts.PlotOptionsLineMarkerStatesSelect using System.Collections; using Newtonsoft.Json; namespace Highsoft.Web.Mvc.Charts { public class PlotOptionsLineMarkerStatesSelect : BaseObject { public PlotOptionsLineMarkerStatesSelect() { bool? nullable1 = new...
mit
ricsv/react-leonardo-ui
src/tab/tab-aside.js
136
import React from 'react'; const TabAside = props => <div className="lui-tab__aside">{props.children}</div>; export default TabAside;
mit
UNOPS/UiMetadataFramework
clients/ionic 3/src/core/handlers/index.ts
173
export * from "./MessageResponseHandler"; export * from "./RedirectResponseHandler"; export * from "./ReloadResponseHandler"; export * from "./FormComponentResponseHandler";
mit
nippled/majesticcoin
src/qt/optionsdialog.cpp
8248
#include "optionsdialog.h" #include "ui_optionsdialog.h" #include "bitcoinunits.h" #include "monitoreddatamapper.h" #include "netbase.h" #include "optionsmodel.h" #include <QDir> #include <QIntValidator> #include <QLocale> #include <QMessageBox> #include <QRegExp> #include <QRegExpValidator> OptionsDialog::OptionsDi...
mit
nbushak/postgraphql
src/interface/type/Type.ts
1339
/** * A type in our type system. * * Every type will have a `TValue` which represents the internal value of this * type. * * All of the types in our interface represent *data access patterns*. They do * not perscript how the data should be stored or fetched, but rather just how * to expose that data. So for exa...
mit
saxx/Erbsenzaehler-2014
Erbsenzaehler/Migrations/201405181229284_RefundDate.cs
530
namespace Erbsenzaehler.Migrations { using System; using System.Data.Entity.Migrations; public partial class RefundDate : DbMigration { public override void Up() { AddColumn("dbo.Lines", "RefundDate", c => c.DateTime()); DropColumn("dbo.Lines", "Refund"); ...
mit
llafuente/esprima-ast-utils
test/test-manipulation.js
5206
var tap = require("tap"), test = tap.test, utils = require("../index.js"), object = require("object-enhancements"); test("renameVariable", function(t) { var tree = utils.parseFile(__dirname + "/fixture-manipulation-01.js"); var tokens = object.clone(tree.tokens); utils.renameVariable(tree, {"...
mit
damhau/logify
resources/views/probes/show_fields.blade.php
760
<!-- Id Field --> <div class="form-group"> {!! Form::label('id', 'Id:') !!} <p>{!! $probe->id !!}</p> </div> <!-- Name Field --> <div class="form-group"> {!! Form::label('Name', 'Name:') !!} <p>{!! $probe->Name !!}</p> </div> <!-- Ip Field --> <div class="form-group"> {!! Form::label('Ip', 'Ip:') ...
mit
alexkolar/home-assistant
homeassistant/components/device_tracker/__init__.py
12969
""" homeassistant.components.device_tracker ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Provides functionality to keep track of devices. device_tracker: platform: netgear # Optional # How many seconds to wait after not seeing device to consider it not home consider_home: 180 # Seconds between each scan int...
mit
okular/markryansatt
src/app/views/PortfolioPageView.js
344
import $ from 'jquery'; import _ from 'lodash'; import Marionette from 'backbone.marionette'; import template from '../templates/portfolioTemplate.hbs'; export default class PortfolioPageView extends Marionette.ItemView{ get template() { return template; } serializeData() { return { model: this.model....
mit
robhor/tcbvrp
src/supplySwapHeuristic.cpp
412
// Copyright 2014 Robert Horvath, Johannes Vogel #include <iostream> #include <string> #include "supplySwapHeuristic.h" #include "./supplySwapper.h" bool supplySwap(Solution* solution) { int current_length = solution->length; SupplySwapper ss(solution); while (ss.next() != nullptr) { if (solutio...
mit
coingecko/cryptoexchange
lib/cryptoexchange/exchanges/idex/services/order_book.rb
1545
module Cryptoexchange::Exchanges module Idex module Services class OrderBook < Cryptoexchange::Services::Market class << self def supports_individual_ticker_query? true end end def fetch(market_pair) params = {} params['market'] = ...
mit
sydes/framework
src/L10n/Locales/EtLocale.php
285
<?php namespace Sydes\L10n\Locales; use Sydes\L10n\Locale; use Sydes\L10n\Plural\Rule1; class EtLocale extends Locale { use Rule1; protected $isoCode = 'et'; protected $englishName = 'Estonian'; protected $nativeName = 'Eesti keel'; protected $isRtl = false; }
mit
alexeybob/epc
src/EPC/AdminBundle/Controller/TestController.php
155
<?php namespace EPC\AdminBundle\Controller; use Sonata\AdminBundle\Controller\CRUDController as Controller; class TestController extends Controller { }
mit
runandrew/memoriae
app/utils/userDialog.js
350
// Required libraries const remote = require('electron').remote; const dialog = remote.dialog; // Required files const { settings } = require('./userSettings'); const getDbPathUserInput = () => { let resultArr = dialog.showOpenDialog({ properties: ['openDirectory'] }); return resultArr[0]; }; module.export...
mit
MatthewGreen/ToolsManagerAppExternalAPI
server.js
4606
// server.js // Base Setup // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // instantiate packages var express = require('express'); var bodyParser = require('body-parser'); var path = require('path'); var app = express(); // setup bodyParser() app.use(bodyParser.url...
mit
Satyam/RoxyMusic
client/store/config/reducer.js
764
import update from 'react-addons-update'; import { REPLY_RECEIVED, } from '_store/requests/actions'; import { GET_CONFIG, GET_ALL_CONFIG, SET_CONFIG, } from './actions'; const SUB_STORE = 'config'; export const configSelectors = { all: state => state[SUB_STORE], get: (state, name) => state[SUB_STORE][na...
mit
RooseveltJavier/Proyecto
resources/js/modules/stecnico.js
6142
var progressbar = '<div class="progress"> <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%"> <span class="sr-only">45% Complete</span> </div> </div>'; function searchMarca(){ $('#marcasearchid').typeahead({ ...
mit
flybayer/next.js
packages/next/compiled/webpack/amd-define.js
1800
module.exports = /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 441: /***/ (function(module) { module.exports = function() { throw new Error("define cannot be used indirect"); }; /***/ }) /******/ }); /**********************************************************************...
mit
acq4/acq4
acq4/devices/MicroManagerCamera/mmcamera.py
17155
# -*- coding: utf-8 -*- from __future__ import division, with_statement, print_function import time from collections import OrderedDict import numpy as np import six from pyqtgraph.debug import Profiler from six.moves import range import acq4.util.ptime as ptime from acq4.devices.Camera import Camera from acq4.util ...
mit
wadeanthony0100/api
app/Http/Controllers/MentorController.php
1417
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; class MentorController extends Controller { /** * Display a listing of the resource. * * @return Response */ public function index() { // } ...
mit
encse/sicp
Sicp/app/sicp/Env.ts
2398
module Sicp.Lang { export class StackFrame { constructor(private _sv: Sicp.Lang.Sv, private _env: Sicp.Lang.Env) {} public sv(): Sicp.Lang.Sv { return this._sv; } public env(): Sicp.Lang.Env { return this._env; } public parent(): StackFrame { return this._env.getParentStackF...
mit
stoeffel/react-motion-drawer
example/webpack.config.js
667
var path = require("path"); var webpack = require("webpack"); module.exports = { devtool: "eval", entry: [ './example/src/index.js', ], output: { path: path.join(__dirname, "static"), filename: "bundle.js", publicPath: "/static/", }, plugins: [ new webpack.NoEmitOnErrorsPlugin(), ne...
mit
plumer/codana
tomcat_files/6.0.43/MapELResolver.java
3910
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mit
monque/PHP-Migration
src/Utils/Packager.php
4393
<?php namespace PhpMigration\Utils; class Packager { const NAME = 'phpmig.phar'; protected $filelist = [ 'LICENSE', 'README.md', 'README_ZH.md', 'bin/phpmig', 'composer.json', 'composer.lock', 'doc/Migrating from PHP 5.2.x to PHP 5.3.x.md', 'doc...
mit
wistityhq/strapi
packages/strapi-plugin-content-manager/admin/src/utils/formatFiltersFromQuery.js
1267
// List of all the possible filters const VALID_REST_OPERATORS = [ 'eq', 'ne', 'in', 'nin', 'contains', 'ncontains', 'containss', 'ncontainss', 'lt', 'lte', 'gt', 'gte', 'null', ]; // from strapi-utils/convert-rest-query-params const findAppliedFilter = whereClause => { // Useful to remove ...
mit
oRastor/jira-client
src/Resource/FluentIssueDelete.php
691
<?php namespace JiraClient\Resource; use JiraClient\JiraClient, JiraClient\Resource\Issue, JiraClient\Exception\JiraException; /** * Description of FluentIssueCreate * * @author rastor */ class FluentIssueDelete { /** * * @var JiraClient */ private $issue; public function __...
mit
BStalewski/dontWasteTime
webapp/crawler_app/crawling/urls.py
527
from django.conf.urls import patterns, url import crawling.views as crv urlpatterns = patterns( '', url(r'^results$', crv.CrawlerResultList.as_view()), url(r'^new$', crv.CrawlerNewList.as_view()), url(r'^accepted$', crv.CrawlerAcceptedList.as_view()), url(r'^ignored$', crv.CrawlerIgnoredList.as_v...
mit
tomekwszelaki/WeddingPlanner
backend/utils/rabbittest.js
562
/** * Created by tomasj on 26/03/14. */ var amqpClient = require('./amqp'); var config = require('../../config'); var receiverOptions = { url: config.rabbitmq.receiverURL, implOptions: config.rabbitmq.implOptions, qname: config.rabbitmq.uploadQueue }; amqpClient.init(receiverOptions, function(err) { ...
mit
aescobarr/natusfera
spec/lib/acts_as_spammable/active_record_spec.rb
4152
require "spec_helper" describe "ActsAsSpammable", "ActiveRecord" do before(:all) do @user = User.make! Rakismet.disabled = false end after(:all) do Rakismet.disabled = true end it "recognizes spam" do Rakismet.should_receive(:akismet_call).and_return("true") o = Observation.make!(user:...
mit
evanhughes3/tutorials
webpack/tutorial/node_modules/css-loader/lib/parseSource.js
9143
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var loaderUtils = require("loader-utils"); var Parser = require("fastparse"); function errorMatch(message, newParserMode) { return function(match) { var index = arguments[arguments.length - 1]; var nextLi...
mit
civol/HDLRuby
lib/HDLRuby/high_samples/with_fsm.rb
991
require 'HDLRuby' configure_high require 'HDLRuby/std/fsm' include HDLRuby::High::Std # Implementation of a fsm. system :my_fsm do input :clk,:rst [7..0].input :a, :b [7..0].output :z # fsm :fsmI # fsmI.for_event { clk.posedge } # # Shortcut: fsmI.for_event(clk) # fsmI.for_reset { rst }...
mit
DDReaper/XNAGameStudio
Samples/PerformanceMeasuringSample_4_0/PerformanceMeasuring/PerformanceMeasuring/Program.cs
729
#region File Description //----------------------------------------------------------------------------- // Program.cs // // Microsoft XNA Community Game Platform // Copyright (C) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- #endregion usin...
mit
Skrittles/SPMinistocks
src/nitezh/ministock/utils/UrlDataTools.java
2680
/* The MIT License Copyright (c) 2013 Nitesh Patel http://niteshpatel.github.io/ministocks 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 t...
mit
hkupty/dotfiles
.config/nvim/lua/tasks.lua
3761
local errands = require("errands") local tasks = require("errands.tasks") local impromptu = require("impromptu") local pop = { description = "Return to previous screen" } local with_pop = function(fn) return function(session, option) if option.index == 'pop' then session:pop() return false els...
mit
posita/stone
stone/frontend/lexer.py
13729
from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import ply.lex as lex _MYPY = False if _MYPY: import typing # noqa: F401 # pylint: disable=import-error,unused-import,useless-suppression class MultiToken(object): """Object used to monkeypatch ply....
mit
kairos666/pmp-ui
e2e/app.po.ts
210
import { browser, element, by } from 'protractor'; export class PmpUiPage { navigateTo() { return browser.get('/'); } getParagraphText() { return element(by.css('app-root h1')).getText(); } }
mit
storybooks/storybook
addons/measure/src/preset/addDecorator.tsx
181
import { withMeasure } from '../withMeasure'; import { PARAM_KEY } from '../constants'; export const decorators = [withMeasure]; export const globals = { [PARAM_KEY]: false, };
mit
mathiasquintero/RandomStuff
Java/Numerical Programming/FastMath/Gleitpunktzahl.java
11162
public class Gleitpunktzahl { /** * Update by * * @author Juergen Braeckle (braeckle@in.tum.de) * @author Sebastian Rettenberger (rettenbs@in.tum.de) * @since Oktober 22, 2014 * @version 1.2 * * Diese Klasse beschreibt eine Form von Gleitpunktarithmetik */ /********************/ /* M...
mit
FezVrasta/brackets-git
src/git/GitCli.js
31744
/*jshint maxstatements:false*/ /* This module is used to communicate with Git through Cli Output string from Git should always be parsed here to provide more sensible outputs than just plain strings. Format of the output should be specified in Git.js */ define(function (require, exports) { // Brac...
mit
davidchristie/kaenga-housing-calculator
src/components/pages/Privacy/Privacy.test.js
265
import React from 'react' import ReactTestUtils from 'react-dom/test-utils' import Privacy from './Privacy' const shallowRenderer = ReactTestUtils.createRenderer() it('matches snapshot', () => { expect(shallowRenderer.render(<Privacy />)).toMatchSnapshot() })
mit
dhax/go-base
auth/jwt/token.go
992
package jwt import ( "time" "github.com/go-pg/pg/orm" ) // Token holds refresh jwt information. type Token struct { ID int `json:"id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` AccountID int `json:"-"` Token string ...
mit
aldenaik/angular_practice
app/js/services/EventData.js
828
eventsApp.factory('eventData',function(){ return{ event: { name:"Whatever", date: '1/1/2013', time: '10:30 am', location: { address: 'Google Headquarters', city: 'Mountain View', province: 'CA' }, imageUrl: '/Users/aldenaik/DevMtn/angular_practice/app/img/angularjs.jpg', sessions: ...
mit
nchkdxlq/Algorithm
Algorithm/LeetCode/39-combinationSum/39-combinationSum.cpp
5099
// // 39-combinationSum.cpp // LeetCode // // Created by Knox on 2019/8/18. // Copyright © 2019 nchkdxlq. All rights reserved. // #include "39-combinationSum.hpp" #include "STLHelper.hpp" /* 39. 组合总和 给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的数字可以无限制重复被选取。 链接:...
mit
skyiea/wix-style-react
stories/EditableSelector/PopoverWithEditableSelector.js
1853
import React from 'react'; import {EditableSelector, Tooltip, Button} from 'wix-style-react'; class PopoverWithEditableSelector extends React.Component { constructor(props) { super(props); this.state = { options: [ {title: 'Marc Banks'}, {title: 'Bernard Park'}, {title: 'Carlo...
mit
harc/ohm-editor
src/searchBar.js
3721
/* global CodeMirror */ import ohmEditor from './ohmEditor'; import {$} from './domUtil'; // Returns the first ancestor node of `el` that has class `className`. function ancestorWithClassName(el, className) { let node = el; while ((node = node.parentElement) != null) { if (node.classList.contains(className)) ...
mit
carlosbuenosvinos/php-geckoboard-api
src/CarlosIO/Geckoboard/Tests/Data/PointTest.php
981
<?php namespace CarlosIO\Geckoboard\Tests\Data; use CarlosIO\Geckoboard\Data\Point; class PointTest extends \PHPUnit_Framework_TestCase { public function testFullMethodsDataEntry() { $point = new Point(); $point ->setCityName('Barcelona') ->setColor('ffffff') ...
mit
chylex/TweetDuck
resources/Plugins/reply-account/browser.js
4779
enabled(){ let configuration = { defaultAccount: "#preferred" }; window.TDPF_loadConfigurationFile(this, "configuration.js", "configuration.default.js", obj => configuration = obj); this.lastSelectedAccount = null; this.uiComposeTweetEvent = (e, data) => { if (!(data.type === "reply" || (data.type === "twee...
mit
oscar-barlow/apiify
lib/apiify/scaffolder.rb
1674
class Apiify::Scaffolder def generate(csv_path, index_col) run_scaffold(csv_path, index_col) confirm(csv_path, index_col) end def get_file_name(csv_path) if is_a_csv?(csv_path) get_file(csv_path).first else raise "Error: wrong file type. Please supply a .csv file" end end de...
mit
spiral/spiral
src/Boot/src/Exception/FatalException.php
242
<?php /** * Spiral Framework. * * @license MIT * @author Anton Titov (Wolfy-J) */ declare(strict_types=1); namespace Spiral\Boot\Exception; /** * Raised on fatal exceptions. */ class FatalException extends \ErrorException { }
mit
kbase/ui-common
src/widgets/social/kbaseWSObjRefUsers.js
10120
define ( [ 'kbwidget', 'bootstrap', 'jquery' ], function( KBWidget, bootstrap, $ ) { return KBWidget({ name: "KBaseWSObjRefUsers", parent : kbaseAuthenticatedWidget, version: "1.0.0", //wsUrl: "http://dev04.berkeley.kbase.us:7058", wsUrl:"https://kbas...
mit
changke/grunt-plovr-modules
test/fixtures/entry.js
410
goog.provide('entry'); goog.require('pm.application'); pm.start = function() { try { var app = pm.application.getInstance(); app.registerModule('core'); app.registerModule('moduleone'); app.registerModule('moduletwo'); app.registerModule('modulethree'); app.start(); } catch (e) { con...
mit
izzyaxel/ArcaneArtificing
src/main/java/izzyaxel/arcaneartificing/divination/divinationEffects/EffectMobs.java
5391
package izzyaxel.arcaneartificing.divination.divinationEffects; import izzyaxel.arcaneartificing.main.AAUtils; import izzyaxel.arcaneartificing.mana.Mana; import net.minecraft.entity.monster.EntityIronGolem; import net.minecraft.entity.monster.EntitySnowman; import net.minecraft.entity.passive.*; import net.minecraft....
mit
concordiadiscors/chili_pepper
app/models/chili_pepper/menu.rb
2794
# == Schema Information # # Table name: chili_pepper_menus # # id :integer not null, primary key # name :string(255) # position :integer # description :string(255) # created_at :datetime # update...
mit
NormanMarlier/blcf
src/main.cpp
6228
// // Disclamer: // ---------- // // This code will work only if you selected window, graphics and audio. // // Note that the "Run Script" build phase will copy the required frameworks // or dylibs to your application bundle so you can execute it on any OS X // computer. // // Your resource files (images, sounds, font...
mit
airbrake/gobrake
fiber/fiberbrake.go
702
package fiber import ( "context" "errors" "github.com/airbrake/gobrake/v5" "github.com/gofiber/fiber/v2" ) // New returns a function that satisfies fiber.Handler interface func New(notifier *gobrake.Notifier) fiber.Handler { return func(c *fiber.Ctx) error { if notifier == nil { return errors.New("airbrak...
mit
hiloteam/generator-hilo
generators/app/templates/src/js/hilo/kissy/hilo/view/CacheMixin.js
1766
/** * Hilo 1.1.10 for kissy * Copyright 2016 alibaba.com * Licensed under the MIT License */ KISSY.add('hilo/view/CacheMixin', function(S, Drawable, browser){ var _cacheCanvas, _cacheContext; /** * @language=en * @class CacheMixin A mixin that contains cache method.You can mix cache method to the target by use...
mit
dazzle-php/redis
src/Redis/Command/CommandInterface.php
421
<?php namespace Dazzle\Redis\Command; interface CommandInterface extends Api\ApiChannelInterface, Api\ApiClusterInterface, Api\ApiConnInterface, Api\ApiCoreInterface, Api\ApiGeospatialInterface, Api\ApiHyperLogInterface, Api\ApiKeyValInterface, Api\ApiListInterface, Api\ApiSetInter...
mit
ivanna-ostrovets/language-and-literature-admin
src/common/components/backButton/backButton.component.ts
318
import { Component } from '@angular/core'; import { Location } from '@angular/common'; @Component({ selector: 'llta-back-button', templateUrl: './backButton.component.html' }) export class BackButtonComponent { constructor( private location: Location ) { } goBack() { this.location.back(); } }
mit
kennisnet/phpEdurepSearch
src/Model/DrilldownNavigator.php
492
<?php namespace Kennisnet\Edurep\Model; class DrilldownNavigator { /** * @var string */ private $name; /** * @var DrilldownNavigatorItem[] */ private $items; public function __construct(string $name, array $items) { $this->name = $name; $this->items = $it...
mit
afaan5556/phase-0
week-6/nested_data_solution.rb
2990
# RELEASE 2: NESTED STRUCTURE GOLF # Hole 1 # Target element: "FORE" array = [[1,2], ["inner", ["eagle", "par", ["FORE", "hook"]]]] # attempts: 1 # ============================================================ p array[1][1][2][0] # ============================================================ # Hole 2 # Target elemen...
mit
fea17e86/node-webserver
routes/index.js
1647
var express = require('express'); var router = express.Router(); router.get('/', function (req, res, next) { res.render('index', {title: 'Express Server', name: 'Cynthia'}); }); router.get('/variable', function (req, res, next) { res.render('variable', { title: 'Basic Variable', user: { firstname:...
mit