code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
<?php /* @var $this DemoController */ /* @var $model Demo */ $this->breadcrumbs=array( 'Demos'=>array('index'), $model->title=>array('view','id'=>$model->id), 'Update', ); $this->menu=array( array('label'=>'List Demo', 'url'=>array('index')), array('label'=>'Create Demo', 'url'=>array('create')), array('label'=...
perminder-klair/cms-core
protected/views/demo/update.php
PHP
mit
553
<?php namespace Philsquare\LaraManager\Http\Controllers; use Illuminate\Http\Request; use Philsquare\LaraManager\Http\Requests\CreateRedirectRequest; use Philsquare\LaraManager\Http\Requests\UpdateRedirectRequest; use Philsquare\LaraManager\Models\Redirect; class RedirectsController extends Controller { protect...
frodex/LaraManager
src/Philsquare/LaraManager/Http/Controllers/RedirectsController.php
PHP
mit
2,779
When(/^I fill in the email details$/) do fill_in "Subject", :with => "Petition email subject" fill_in "Body", :with => "Petition email body" end Then(/^the petition should not have any emails$/) do @petition.reload expect(@petition.emails).to be_empty end Then(/^the petition should have the email details I pr...
telekomatrix/e-petitions
features/step_definitions/petition_email_steps.rb
Ruby
mit
1,922
module PageObjectModel require 'calabash-android/abase' require_relative '../../../features/pages/actions/common_actions' class Page < Calabash::ABase include PageOperations include UtilityObjects include PageObjectModel::PageActions def initialize(world, transition_duration = 0.5) logger....
blinkboxbooks/android-test
features/pages/model/page.rb
Ruby
mit
1,617
/* * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Fou...
daniel-beck/sorcerer
javac/src/main/java/com/sun/source/util/TaskEvent.java
Java
mit
3,433
//****************************************************************************************************** // PQMarkAggregate.cs - Gbtc // // Copyright © 2017, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // ...
GridProtectionAlliance/openXDA
Source/Libraries/openXDA.Model/PQMarkAggregate.cs
C#
mit
1,815
document.getElementById('input_search').onfocus = function () { document.getElementById('search').classList.add('activeSearch'); }; document.getElementById('input_search').onblur = function () { document.getElementById('search').classList.remove('activeSearch'); }; try { window.$ = window.jQuery = require('jqu...
reed-jones/DiscoverMovies
resources/assets/js/app.js
JavaScript
mit
404
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("Di...
chschenk/SVP
DisagLib/Properties/AssemblyInfo.cs
C#
mit
1,392
//------------------------------------------------------------------------------ // resourceBase.cc //------------------------------------------------------------------------------ #include "Pre.h" #include "resourceBase.h" namespace Oryol { namespace _priv { //-------------------------------------------------------...
floooh/oryol
code/Modules/Gfx/private/resourceBase.cc
C++
mit
1,349
/* * Jot v1.1 * License: The MIT License (MIT) * Code: https://github.com/jdemeuse1204/Jot * Email: james.demeuse@gmail.com * Copyright (c) 2016 James Demeuse */ namespace Jot { public enum TokenValidationResult { NotBeforeFailed, TokenExpired, TokenNotCorrectlyFormed, Si...
jdemeuse1204/Jot
Jot/TokenValidationResult.cs
C#
mit
481
package main import ( "flag" "fmt" "net/http" . "gopkg.in/go-on/lib.v2/types" . "gopkg.in/go-on/lib.v2/html" "gopkg.in/go-on/lib.v2/internal/bootstrap/bs3" "gopkg.in/go-on/cdncache.v1" ) var ( port = flag.Int("port", 8083, "port of the http server") mountPoint = flag.String("mountpoint", "", "mount p...
go-on/cdncache
example/main.go
GO
mit
2,369
/// <reference path="lib/jquery-2.0.3.js" /> define(["httpRequester"], function (httpRequester) { function getStudents() { var url = this.url + "api/students/"; return httpRequester.getJSON(url); } function getMarksByStudentId(studentId) { var url = this.url + "api/students/" + st...
niki-funky/Telerik_Academy
Web Development/JS_frameworks/04. Reqiure/StudentsDB.WebClient/scripts/app/data-persister.js
JavaScript
mit
505
package apns import ( "errors" "github.com/cosminrentea/gobbler/server/connector" "github.com/jpillora/backoff" "github.com/sideshow/apns2" "net" "time" ) const ( // deviceIDKey is the key name set on the route params to identify the application deviceIDKey = "device_token" userIDKey = "user_id" ) var ( ...
cosminrentea/gobbler
server/apns/apns_sender.go
GO
mit
2,689
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication21 { class Program { static void Main(string[] args) { int hour = int.Parse(Console.ReadLine()); int min = int.Parse(Console.R...
VaskoViktorov/SoftUni-Homework
01. Programming Basics - 20.08.2016/Other unsorted/time +15 min.cs
C#
mit
763
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
mrkmarron/ChakraCore
lib/Common/DataStructures/BigInt.cpp
C++
mit
15,350
package com.raoulvdberge.refinedstorage.block.enums; import net.minecraft.util.IStringSerializable; public enum ControllerType implements IStringSerializable { NORMAL(0, "normal"), CREATIVE(1, "creative"); private int id; private String name; ControllerType(int id, String name) { this.id...
way2muchnoise/refinedstorage
src/main/java/com/raoulvdberge/refinedstorage/block/enums/ControllerType.java
Java
mit
557
require 'spec_helper' describe Fulcrum::Client do let(:client) { Fulcrum::Client.new } it 'has a default url' do expect(client.url).to eq(Fulcrum::Client::DEFAULT_URL) end it 'can query' do url = "#{client.url}/query" response = 'audio,system,,,,,' stub_request(:post, url) .with(body: ...
fulcrumapp/fulcrum-ruby
spec/lib/client_spec.rb
Ruby
mit
2,850
/** * WhatsApp service provider */ module.exports = { popupUrl: 'whatsapp://send?text={title}%0A{url}', popupWidth: 600, popupHeight: 450 };
valerypatorius/Likely
source/services/whatsapp.js
JavaScript
mit
155
/*************************************************************************** * Copyright (C) 2006 by Arnaud Desaedeleer * * arnaud@desaedeleer.com * * * * Thi...
nayan92/ic-hack
OpenOMR/openomr/omr_engine/XProjection.java
Java
mit
4,106
/** * 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.eventgrid.v2020_04_01_preview; import com.faster...
selvasingh/azure-sdk-for-java
sdk/eventgrid/mgmt-v2020_04_01_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2020_04_01_preview/NumberGreaterThanOrEqualsAdvancedFilter.java
Java
mit
1,359
package derpstream; import java.io.FileOutputStream; import java.io.IOException; import java.util.PriorityQueue; import java.util.TimerTask; import java.util.concurrent.LinkedBlockingDeque; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author Mads */ public final class ChunkInfo extends...
maesse/DerpStream
src/derpstream/ChunkInfo.java
Java
mit
5,842
/* * Copyright (c) .NET Foundation and Contributors * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. * * https://github.com/piranhacms/piranha.core * */ using System; using System.ComponentModel.DataAnnotations; namespace Piranha.Models...
PiranhaCMS/piranha.core
core/Piranha/Models/Param.cs
C#
mit
1,301
var path = require('path'), HtmlReporter = require('protractor-html-screenshot-reporter'); exports.config = { chromeDriver: 'node_modules/chromedriver/bin/chromedriver', // seleniumAddress: 'http://localhost:4444/wd/hub', // Boolean. If true, Protractor will connect directly to the browser Drivers ...
rajanmayekar/e2e-protractor-setup
protractor.conf.js
JavaScript
mit
1,883
import express = require("express"); import passport = require('passport'); import jwt = require('express-jwt'); import AuthController = require("../../controllers/AuthController"); import IUser = require('../../app/model/interfaces/IUser'); import User = require('../../app/model/User'); var router = express.Router()...
teengoz/inventory-management
server/src/config/routes/AuthRoutes.ts
TypeScript
mit
850
from bioscrape.inference import DeterministicLikelihood as DLL from bioscrape.inference import StochasticTrajectoriesLikelihood as STLL from bioscrape.inference import StochasticTrajectories from bioscrape.inference import BulkData import warnings import numpy as np class PIDInterface(): ''' PID Interface : Pa...
ananswam/bioscrape
bioscrape/pid_interfaces.py
Python
mit
13,998
/** * format currency * @ndaidong **/ const { isNumber, } = require('bellajs'); const formatCurrency = (num) => { const n = Number(num); if (!n || !isNumber(n) || n < 0) { return '0.00'; } return n.toFixed(2).replace(/./g, (c, i, a) => { return i && c !== '.' && (a.length - i) % 3 === 0 ? ',' + c...
ndaidong/paypal-nvp-api
src/helpers/formatCurrency.js
JavaScript
mit
369
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; using FilesToDatabaseImporter.Annotations; using FilesToDatabaseImporter.Helpers; using FilesToDatabaseImporter.Interfaces; namespace FilesToDatabaseImporter.ViewModels { public c...
JeroenVinke/FilesToDatabaseImporter
FilesToDatabaseImporter/ViewModels/SqlServerViewModel.cs
C#
mit
6,773
<upgrade> <phpfox_update_settings> <setting> <group>server_settings</group> <module_id>log</module_id> <is_hidden>0</is_hidden> <type>integer</type> <var_name>active_session</var_name> <phrase_var_name>setting_active_session</phrase_var_name> <ordering>2</ordering> <version_id>2.0.0alpha1</ve...
edbiler/BazaarCorner
module/log/install/version/3.0.0beta1.xml.php
PHP
mit
1,794
import React from 'react' import PropTypes from 'prop-types' import FormGroup from '../forms/FormGroup' import InputColor from '../forms/InputColor' const ColorStackOption = ({ label, name, value, definitions, required, onChange, error }) => { // default value may be null if (value === null) { value = '' } ...
rokka-io/rokka-dashboard
src/components/options/ColorStackOption.js
JavaScript
mit
884
import * as React from 'react'; import './TextBox.css'; interface Props { className: string; onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; placeholder: string; } class TextBox extends React.Component<Props, {}> { public constructor(props: Props) { super(props); this.handleChange = this...
Chingu-Dolphins-3/9ball-scoring-app
client/src/components/TextBox/TextBox.tsx
TypeScript
mit
723
using System; using System.Threading; using System.Threading.Tasks; namespace Tmds.DBus.Tests { class PingPong : IPingPong { public static readonly ObjectPath Path = new ObjectPath("/tmds/dbus/tests/pingpong"); public event Action<string> OnPing; public event Action OnPingNoArg; ...
tmds/Tmds.DBus
test/Tmds.DBus.Tests/PingPong.cs
C#
mit
1,208
from flask_bcrypt import generate_password_hash # Change the number of rounds (second argument) until it takes between # 0.25 and 0.5 seconds to run. generate_password_hash('password1', 8)
VaSe7u/Supernutrient_0_5
hash_check.py
Python
mit
195
<?php defined('SYSPATH') OR die('No direct script access.'); /** * Grid modeling library for creating data tables * * @package Grid * @author Kyle Treubig * @copyright (C) 2010 Kyle Treubig * @license MIT */ class Grid_Core { /** Array of table columns */ private $columns = array(); /** Array...
vimofthevine/grid
classes/grid/core.php
PHP
mit
2,048
package cn.honjow.leanc.ui.Fragment; import cn.honjow.leanc.adapter.QuestionListAdapter; import cn.honjow.leanc.ui.Activice.ChoQueActivity; import cn.droidlover.xdroidmvp.base.SimpleRecAdapter; import cn.honjow.leanc.model.QuestionItem; import cn.honjow.leanc.ui.BaseLeancFragment; import cn.droidlover.xrecyclerview.Re...
honjow/XDroidMvp_hzw
app/src/main/java/cn/honjow/leanc/ui/Fragment/ChoQueListFragment.java
Java
mit
1,611
<?php namespace JHWEB\SeguridadVialBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * SvCfgTipoVictima * * @ORM\Table(name="sv_cfg_tipo_victima") * @ORM\Entity(repositoryClass="JHWEB\SeguridadVialBundle\Repository\SvCfgTipoVictimaRepository") */ class SvCfgTipoVictima { /** * @var int * * ...
edosgn/colossus-sit
src/JHWEB/SeguridadVialBundle/Entity/SvCfgTipoVictima.php
PHP
mit
1,536
// (C) 2004 by Khaled Daham, <khaled@w-arts.com> // // Singleton // #include <iterator> #include "Log.h" #include <stdio.h> #include <stdarg.h> #include <windows.h> namespace ps2emu { typedef std::map<int32, std::string>::iterator m_mapIterator; /////////////////////////////// PUBLIC /////////////////////////////...
jsvennevid/tbl-4edges
Shared/External/ps2emu/Log.cpp
C++
mit
2,995
class Post < ActiveRecord::Base belongs_to :forum, :counter_cache => true belongs_to :user, :counter_cache => true belongs_to :topic, :counter_cache => true has_one :event_log, :as => :target, :dependent => :destroy acts_as_ferret :fields => ['company_id', 'project_id', 'body', 'forum_id'] format_attr...
SpiderJack/cit
app/models/post.rb
Ruby
mit
1,537
<?php namespace UserBundle\Security; use Symfony\Component\DependencyInjection\ContainerInterface as Container; use Symfony\Component\Routing\Router; class GoogleService { protected $container; protected $router; protected $redirectRouteName = 'google_check'; protected $scopes = ['email', 'profile'];...
KriBetko/rating.npu
src/UserBundle/Security/GoogleService.php
PHP
mit
1,146
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace Querify.Advanced { public static class AdvancedQueryableExtensions { public interface IAdvancedQueryable<out T> { IQueryable<T> Query { get; } } private cla...
Lotpath/Querify
src/Querify/Advanced/AdvancedQueryableExtensions.cs
C#
mit
3,810
<?php $gameinfos = array( // Game designer (or game designers, separated by commas) 'designer' => 'Bruno Faidutti, Alan R. Moon', // Game artist (or game artists, separated by commas) 'artist' => 'Matthias Catrein, Paul Mafayon', // Year of FIRST publication of this game. Can be negative. 'year' =>...
AntonioSoler/bga-incangold
gameinfos.inc.php
PHP
mit
3,249
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # 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,...
tuturto/pyherc
src/herculeum/ui/gui/mainwindow.py
Python
mit
8,099
<?php namespace Anax\Comments; /** * A controller for comments and such events. */ class CommentsController implements \Anax\DI\IInjectionAware { use \Anax\DI\TInjectable; /** * Initialize the controller. * * @return void */ public function initialize() { $this->comments = new \Anax\Comments\Comment(...
KarlGW/fo
src/Comments/CommentsController.php
PHP
mit
3,992
package joshie.progression.api.gui; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; /** Implement this on rewards, triggers, filters, conditions, * if you wish to draw something special on them, other than default fields. */ public interface ICustomDrawGuiDisplay {...
joshiejack/Progression
src/main/java/joshie/progression/api/gui/ICustomDrawGuiDisplay.java
Java
mit
449
from utils.face import Face import pygame from utils.message import Message from utils.alarm import Alarm class Button(pygame.sprite.Sprite): def __init__(self, rect, color=(0,0,255), action=None): pygame.sprite.Sprite.__init__(self) self.color = color self.action = action self...
khan-git/pialarmclock
faces/alarmsetting.py
Python
mit
3,537
const td = require('testdouble'); const expect = require('../../../../helpers/expect'); const RSVP = require('rsvp'); const Promise = RSVP.Promise; const adbPath = 'adbPath'; const deviceUUID = 'uuid'; const apkPath = 'apk-path'; const spawnArgs = [ad...
isleofcode/corber
node-tests/unit/targets/android/tasks/install-app-device-test.js
JavaScript
mit
1,696
package edu.gatech.nutrack; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.support.v4.app.NavUtils; import android.view.Menu; import android.view.MenuItem; import android.view.View; public class Home extends Activity { @Override protected void onCreate(Bundle ...
i3l/NuTrack
src/edu/gatech/nutrack/Home.java
Java
mit
2,842
<?php /** * Smarty Internal Plugin Template * This file contains the Smarty template engine * * @package Smarty * @subpackage Template * @author Uwe Tews */ /** * Main class with template data structures and methods * * @package Smarty * @subpackage Template * * @property Smarty_Template_Source|...
yanlyan/si_ibuhamil
system/plugins/smarty/libs/sysplugins/smarty_internal_template.php
PHP
mit
23,765
/**************************************************************************** Copyright (c) 2013-2015 scutgame.com http://www.scutgame.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 ...
wenhulove333/ScutServer
Sample/Koudai/Server/src/ZyGames.Tianjiexing.BLL/Action/Action6103.cs
C#
mit
6,232
app.config(function ($routeProvider, $locationProvider) { "use strict"; $routeProvider.when('/', { controller: 'HomeController', templateUrl: '/static/apps/main/views/home.html', resolve: { tasks: function (TaskService) { return Tas...
mc706/task-burndown
assets/apps/main/config/routes.js
JavaScript
mit
4,692
import React from 'react'; import { getCategoryGroups } from '../selectors/categoryGroups'; import { getCategoriesByGroupId } from '../selectors/categories'; import { getSelectedMonthBudgetItemsByCategoryId, getBudgetItemsSumUpToSelectedMonthByCategoryId } from '../selectors/budgetItems'; import { getTransactionsSumUpT...
Nauktis/inab
client/src/components/BudgetTable.js
JavaScript
mit
2,735
class EventProcessor def initialize(event) @event = event end def process return SipgateIo::XmlResponse.reject end end
superbilk/sipgate_io
test/dummy/app/models/event_processor.rb
Ruby
mit
136
class RemoveModels < ActiveRecord::Migration[4.2] def change drop_table :roles drop_table :role_names drop_table :people end end
ZeusWPI/Gandalf
db/migrate/20140308135535_remove_models.rb
Ruby
mit
145
'use strict'; module.exports = { db: 'mongodb://localhost/equinix-test', port: 3001, app: { title: 'Equinix - Test Environment' }, facebook: { clientID: process.env.FACEBOOK_ID || 'APP_ID', clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET', callbackURL: 'http://localhost:3000/auth/facebook/callbac...
linhlam/equinix
config/env/test.js
JavaScript
mit
1,371
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class PotatoSelections extends Migration { /** * Run the migrations. * * @return void */ public function up() { \Schema::create('potato_selections', function (Blueprint $table) { ...
tpavlek/YEGVotes
database/migrations/2016_05_26_103345_potato_selections.php
PHP
mit
657
import { injectReducer } from '../../../../store/reducers' export default (store) => ({ path: 'admin/positions/add', /* Async getComponent is only invoked when route matches */ getComponent (nextState, cb) { /* Webpack - use 'require.ensure' to create a split point and embed an async module loader (...
kritikasoni/smsss-react
src/routes/Admin/Position/AddPosition/index.js
JavaScript
mit
828
# -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from django.forms import inlineformset_factory from djangosige.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo class PlanoContasGrupoForm(forms.ModelForm): class Meta: model = Pl...
thiagopena/djangoSIGE
djangosige/apps/financeiro/forms/plano.py
Python
mit
1,165
/* * This code is under the MIT License * * Copyright 2016, Jonathan Alexander, All rights reserved */ using Monitor.Core.Utilities; using System.IO; namespace JunctionManager { class JunctionManager { public static void MoveWithJunction(string origin, string target) { //Copy folder and...
notdisliked/JunctionManager
JunctionManager/JunctionManager.cs
C#
mit
1,368
from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, UserChangeForm from django.contrib.auth.admin import UserAdmin from django.contrib import admin from django import forms class VoterCreationForm(UserCreationForm): section = forms.CharField() def save(self, com...
seanballais/SAElections
SAElections/voting/admin.py
Python
mit
1,715
package com.dgex.offspring.nxtCore.service; import java.util.List; import nxt.Account; import nxt.Alias; import nxt.Block; import nxt.Transaction; import com.dgex.offspring.nxtCore.core.TransactionHelper.IteratorAsList; public interface IAccount { public Account getNative(); public Long getId(); public Str...
incentivetoken/offspring
com.dgex.offspring.nxtCore/src/com/dgex/offspring/nxtCore/service/IAccount.java
Java
mit
1,085
'use strict'; var fetchUrl = require('fetch').fetchUrl; var packageInfo = require('../package.json'); var httpStatusCodes = require('./http.json'); var urllib = require('url'); var mime = require('mime'); // Expose to the world module.exports.resolve = resolve; module.exports.removeParams = removeParams; /** * Reso...
andris9/resolver
lib/resolver.js
JavaScript
mit
4,516
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Clarity.Rpa.Instructions { public enum NumberCompareOperation { Equal, NotEqual, LessThan, GreaterThan, LessOrEqual, GreaterOrEqual, NumHighCom...
elasota/clarity
Clarity.Rpa/Instructions/NumberCompareOperation.cs
C#
mit
344
require 'tempfile' require 'fileutils' require 'config' require 'open-uri' require 'data_repository' class CI def initialize(opts=Conf.config) @url = opts.fetch(:url, "http://ci/api/json?tree=jobs[name,builds[timestamp,result,building]]") @ignored_projects = opts[:ignored_projects] || [] end def broken_...
reevoo/build-monitor
lib/ci.rb
Ruby
mit
1,153
"use strict" var o = require("ospec") var m = require("../../render/hyperscript") o.spec("hyperscript", function() { o.spec("selector", function() { o("throws on null selector", function(done) { try {m(null)} catch(e) {done()} }) o("throws on non-string selector w/o a view property", function(done) { try...
MithrilJS/mithril.js
render/tests/test-hyperscript.js
JavaScript
mit
18,028
<?php // autoload.php @generated by Composer require_once __DIR__ . '/composer' . '/autoload_real.php'; return ComposerAutoloaderInitf63a394c8496bb8b8178c286d239e5ee::getLoader();
jairoserrano/SimpleBlogClase
vendor/autoload.php
PHP
mit
183
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["choose_file"] = factory(); else root["c...
zobzn/choose-file
dist/choose-file.js
JavaScript
mit
6,946
function move(Restangular, $uibModal, $q, notification, $state,$http) { 'use strict'; return { restrict: 'E', scope: { selection: '=', type: '@', ngConfirmMessage: '@', ngConfirm: '&' }, link: function(scope, element, attrs) { ...
MAGOWARE/backoffice-administration
public/admin/js/smsbatch/move.js
JavaScript
mit
3,393
let mongoose = require('mongoose'); let URL = process.env.MONGO_URL || 'localhost'; let USER = process.env.MONGO_USR || ''; let PASSWORD = process.env.MONGO_PWD || ''; mongoose.connect(`mongodb://${USER}:${PASSWORD}@${URL}`); //TODO doens't work for localhost console.log(`Connecting to ${URL}...`); let db = mongoose....
tmlewallen/PongPing
server/db.js
JavaScript
mit
448
<?php require_once('./config/accesscontrol.php'); require_once('./utilities.php'); // Set up/check session and get database password etc. require_once('./config/MySQL.php'); session_start(); sessionAuthenticate(); $mysql = mysql_connect($mysql_host, $mysql_user, $mysql_password); if (!mysql_select_db($mysql_database...
louiseadennis/primeval_game
www/location32.php
PHP
mit
1,052
define([], function() { return Backbone.View.extend({ tagName: "a", className: "projectlink", attributes: { href: "#" }, template: _.template("<%- name %>"), events: { "click": "toggleSelection" }, initialize: function() { this.listenTo(this.model, "change:selected", function(m, selected) { ...
EusthEnoptEron/bakastats
js/views/projectview.js
JavaScript
mit
704
'use strict'; (function() { describe('HomeController', function() { //Initialize global variables var scope, HomeController, myFactory; // Load the main application module beforeEach(module(ApplicationConfiguration.applicationModuleName)); beforeEach(inject(function($controller, $rootScope)...
kylelin47/great-unknown
public/modules/core/tests/home.client.controller.test.js
JavaScript
mit
701
<?php namespace Droath\ConsoleForm\Field; /** * Define field interface. */ interface FieldInterface { /** * The data type the field holds. * * @return string */ public function dataType(); /** * Field question class name. * * @return string * The question class...
droath/console-form
src/Field/FieldInterface.php
PHP
mit
591
using System; using System.Linq; namespace GestorONG.Models { interface IPaginationCollaborators<T> where T:class { /// <summary> /// Get data paginated. /// </summary> /// <param name="filter">Filter applied by user.</param> /// <param name="initialPage">Initial page.<...
joakDA/gestor-ongd-sps
GestorONG/Models/IPaginationCollaborators.cs
C#
mit
1,070
package com.bitdubai.fermat_api.layer.dmp_basic_wallet.common.enums; /** * Created by natalia on 06/07/15. */ public enum BalanceType { AVAILABLE("AVAILABLE"), BOOK("BOOK"); private final String code; BalanceType(String code) { this.code = code; } public String getCode() { retur...
fvasquezjatar/fermat-unused
fermat-api/src/main/java/com/bitdubai/fermat_api/layer/dmp_basic_wallet/common/enums/BalanceType.java
Java
mit
574
<?php namespace TagProNews\Exceptions; use Exception; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; class Handler extends ExceptionHandler { /** * A list of the exception types that should not be reported. * * @var array */ protected $dontReport = [ 'Symfony\Component\HttpKernel\Excep...
tagpronews/api
app/Exceptions/Handler.php
PHP
mit
951
/** @file This file contains the functions to adjust an existing polygon. */ /** * Creates the adjusting event * @constructor * @param {string} dom_attach - The html element where the polygon lives * @param {array} x - The x coordinates for the polygon points * @param {array} y - The y coordinates for t...
joelimlimit/LabelMeAnnotationTool
annotationTools/js/adjust_event.js
JavaScript
mit
17,777
#include <algorithm> #include <map> #include <math.h> #include <mpi.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <time.h> #ifndef HUGE_JOB_MODE #include <fj_tool/fapp.h> #include <fjcoll.h> #endif using namespace std; #include "pearson-3d.h" bool EXTEND_MISSION=false; int T_MAX; int T_MO...
nushio3/formura
examples/pearson-3d-main.cpp
C++
mit
6,294
package dis func Rearrange(s string, k int) string { hm := make([]int, 26) valid := make([]int, 26) var id, maxF, numOfMaxF int for _, c := range s { id = int(c - 'a') hm[id]++ if hm[id] > maxF { maxF, numOfMaxF = hm[id], 1 } else if hm[id] == maxF { numOfMaxF++ } } if (maxF-1)*k+numOfMaxF > len(...
Catorpilor/LeetCode
358_rearrange_string_k_distance_apart/dis.go
GO
mit
768
// Write a program that extracts from a given text all palindromes, e.g. "ABBA", "lamal", "exe". function findPalindromes(input) { var words = input.replace(/\W+/g, ' ').replace(/\s+/, ' ').trim().split(' '), palindromes = [], length = words.length, currentWord, i; for (i = 0;...
danisio/JavaScript-Homeworks
08.Strings/Problem10-FindPalindromes.js
JavaScript
mit
958
module MailItemsHelper end
xsunsmile/smartmail
app/helpers/mail_items_helper.rb
Ruby
mit
27
#Scripts to plot the data, currently only in the context of Q&A communites.
Nik0l/UTemPro
Plot.py
Python
mit
76
package org.shenit.tutorial.android; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class HelloWorldActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layou...
jgnan/edu
android/AndroidTutorial/app/src/main/java/org/shenit/tutorial/android/HelloWorldActivity.java
Java
mit
353
<?php namespace FdjBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * JoueursTennis * * @ORM\Table(name="joueurs_tennis") * @ORM\Entity(repositoryClass="FdjBundle\Repository\JoueursTennisRepository") */ class JoueursTennis { /** * @var int * * @ORM\Column(name="id", type="integer") * ...
Jpilosel/cote
src/FdjBundle/Entity/JoueursTennis.php
PHP
mit
8,018
namespace sharp.Serene.Administration { @Serenity.Decorators.registerClass() export class LanguageDialog extends Serenity.EntityDialog<LanguageRow, any> { protected getFormKey() { return LanguageForm.formKey; } protected getIdProperty() { return LanguageRow.idProperty; } protected getL...
narekye/code
sharp/src/Serene/sharp.Serene/sharp.Serene.Web/Modules/Administration/Language/LanguageDialog.ts
TypeScript
mit
585
// 19. Write a JavaScript function that returns array elements larger than a number. //two agrs - an array and a number to be larger than function isGreater(arr, num) { //set up an array to contain the results var resultArray = []; //iterate through based on length of the arr for(var i = 0; i < arr.length; i++...
jaj1014/w3-js-exercises
js-functions/exercise-19.js
JavaScript
mit
517
from django.conf.urls.defaults import * urlpatterns = patterns('member.views', url(r'^$', 'login', name='passport_index'), url(r'^register/$', 'register', name='passport_register'), url(r'^login/$', 'login', name='passport_login'), url(r'^logout/$', 'logout', name='passport_logout'), url(r'^active/...
masiqi/douquan
member/urls.py
Python
mit
478
# -*- coding: utf-8 -*- """ The following examples are used to demonstrate how to get/record analytics The method signatures are: Pushbots.get_analytics() and Pushbots.record_analytics(platform=None, data=None) In which you must specify either platform or data. """ from pushbots import Pushbots def example_get_an...
tchar/pushbots
pushbots/examples/analytics.py
Python
mit
1,805
<?php /** * simplemon * * @license ${LICENSE_LINK} * @link ${PROJECT_URL_LINK} * @version ${VERSION} * @package ${PACKAGE_NAME} * @author Casey McLaughlin <caseyamcl@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. *...
caseyamcl/simplemon
app/src/Utility/TwigTryFileLoader.php
PHP
mit
1,938
# -*- coding: utf-8 -*- from __future__ import unicode_literals import httpretty import json import sure from pyeqs import QuerySet, Filter from pyeqs.dsl import Term, Sort, ScriptScore from tests.helpers import homogeneous @httpretty.activate def test_create_queryset_with_host_string(): """ Create a querys...
Yipit/pyeqs
tests/unit/test_connection.py
Python
mit
4,100
namespace DotNetGroup.Services.Rss { using DotNetGroup.Services.Generic; public class UrlConfigProvider : BaseConfigProvider { protected override string Prefix { get { return "rss."; } } } }
sergejusb/DotNetGroup
Services/Rss/UrlConfigProvider.cs
C#
mit
259
module app.domain { export interface IProduct{ productId: number; productName: string; productCode: string; releaseDate: Date; price: number; description: string; imageUrl: string; //calculateDiscount(percent:number):number; } export class Product implements IProduct{ constructor(public productI...
nrock/Angular-TypeScript
APM/app/products/product.ts
TypeScript
mit
635
/* * www.javagl.de - Flow * * Copyright (c) 2012-2017 Marco Hutter - http://www.javagl.de * * 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 w...
javagl/Flow
flow-gui/src/main/java/de/javagl/flow/gui/Shapes.java
Java
mit
4,028
'use strict'; const signup = require('./signup'); const handler = require('feathers-errors/handler'); const notFound = require('./not-found-handler'); const logger = require('./logger'); module.exports = function() { // Add your custom middleware here. Remember, that // just like Express the order matters, so err...
le1tuan/feathersjs
src/middleware/index.js
JavaScript
mit
492
'use strict'; var form = $('[name="uploadForm"]'); exports.getForm = function() { return form; }; exports.setDetails = function(url, id) { form.element(by.model('inputText')).sendKeys(url); form.element(by.model('snapshotId')).sendKeys(id); }; exports.submit = function() { form.element(by.css('[ng-c...
cloudify-cosmo/cloudify-ui-selenium-tests-nodejs
src/components/ui/snapshots/uploadSnapshotDialog.js
JavaScript
mit
352
#include "NumberParser.hpp" #include <algorithm> /** * Operator array * Used to confirm that a token is an operator */ QChar NumberParser::m_operators[] = { '(', ')', '*', '+', '-', '/', '^', '_' }; /** * Shunting-yard algorithm * Info: http://en.wikipedia.org/wiki/Shunting-yard_algorithm * @param const QSt...
Futsy/LineCalculator
LineCalculator/LineCalculator/NumberParser.cpp
C++
mit
5,665
require File.expand_path('../../../lib/tinytable/layout', __FILE__) require File.expand_path('../../../lib/tinytable/row', __FILE__) require File.expand_path('../../../lib/tinytable/cell', __FILE__) describe TinyTable::Layout do let(:table) { mock(:table, :has_header? => false, :has_rows? => true, :has_footer? => fa...
leocassarani/tinytable
spec/tinytable/layout_spec.rb
Ruby
mit
2,108
<?php namespace SumoCoders\FrameworkMultiUserBundle\Form\Interfaces; use Symfony\Component\Form\FormTypeInterface; interface FormWithDataTransferObject extends FormTypeInterface { public static function getDataTransferObjectClass(): string; }
sumocoders/FrameworkMultiUserBundle
Form/Interfaces/FormWithDataTransferObject.php
PHP
mit
250
package net.ausiasmarch.fartman.util; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Sound; /** * AudioManager.java * Gestiona la musica y sonidos * @author Luis * */ public class AudioManager { /** Administrador de audio */ public static final AudioManager instance = new AudioManager(); ...
fluted0g/Mr.Fartman
core/src/net/ausiasmarch/fartman/util/AudioManager.java
Java
mit
1,784
<?php /** * Created by PhpStorm. * User: pkupe * Date: 2017-02-12 * Time: 19:06 */ namespace StackExchangeBundle\FormFactory; use StackExchangeBundle\Form\AnswerType; use StackExchangeBundle\Form\QuestionType; use StackExchangeBundle\Model\FormFactory; use Symfony\Component\Form\AbstractType; use Symfony\Compon...
Lezas/AutoShare
src/StackExchangeBundle/FormFactory/AnswerFormFactory.php
PHP
mit
484
module Runcible VERSION = '2.13.1'.freeze end
Katello/runcible
lib/runcible/version.rb
Ruby
mit
48
from typing import Union, Iterator from ...symbols import NOUN, PROPN, PRON from ...errors import Errors from ...tokens import Doc, Span def noun_chunks(doclike: Union[Doc, Span]) -> Iterator[Span]: """ Detect base noun phrases from a dependency parse. Works on both Doc and Span. """ # fmt: off l...
spacy-io/spaCy
spacy/lang/id/syntax_iterators.py
Python
mit
1,515