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 |
|---|---|---|---|---|---|
const TYPE_NUMBER = 'number';
export function isNumber(value: unknown): value is number {
return typeof value === TYPE_NUMBER || value instanceof Number;
}
| rumble-charts/rumble-charts | src/helpers/isNumber.ts | TypeScript | mit | 161 |
// module of common directives, filters, etc
namespace common {
'use strict';
angular
.module('common', []);
}
| yellownoggin/dkindred | src/client/app/common/common.module.ts | TypeScript | mit | 128 |
/**
* Description : This is a test suite that tests an LRS endpoint based on the testing requirements document
* found at https://github.com/adlnet/xAPI_LRS_Test/blob/master/TestingRequirements.md
*
* https://github.com/adlnet/xAPI_LRS_Test/blob/master/TestingRequirements.md
*
*/
(function (module) {
"use str... | cr8onski/lrs-conformance-test-suite | test/v1_0_2/configs/statements.js | JavaScript | mit | 16,935 |
package creditnote
import (
"testing"
assert "github.com/stretchr/testify/require"
stripe "github.com/stripe/stripe-go/v72"
_ "github.com/stripe/stripe-go/v72/testing"
)
func TestCreditNoteGet(t *testing.T) {
cn, err := Get("cn_123", nil)
assert.Nil(t, err)
assert.NotNil(t, cn)
}
func TestCreditNoteList(t *t... | stripe/stripe-go | creditnote/client_test.go | GO | mit | 3,100 |
<?php
namespace BackOffice\RO\ReservationBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link ... | ramisg85/oueslatirami | src/BackOffice/RO/ReservationBundle/DependencyInjection/Configuration.php | PHP | mit | 891 |
CatarsePaypalExpress::Engine.routes.draw do
resources :paypal_express, only: [], path: 'payment/paypal_express' do
collection do
post :ipn
end
member do
get :review
match :pay
match :success
match :cancel
end
end
end
| MHBA/catarse_paypal_express | config/routes.rb | Ruby | mit | 271 |
package com.symbolplay.tria.game;
public final class CollisionEffects {
public static final int JUMP_BOOST = 0;
public static final int REPOSITION_PLATFORMS = 1;
public static final int VISIBLE_ON_JUMP = 2;
public static final int IMPALE_ATTACHED_SPIKES = 3;
public static final int REVEAL_ON_J... | mrzli/tria | core/src/com/symbolplay/tria/game/CollisionEffects.java | Java | mit | 2,103 |
<?php
/* SVN FILE: $Id: cake_test_case.php 7945 2008-12-19 02:16:01Z gwoo $ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.c... | tectronics/fambom | cake/tests/lib/cake_test_case.php | PHP | mit | 21,057 |
#include "ofApp.h"
#include "SharedUtils.h"
void updatePuppet(Skeleton* skeleton, ofxPuppet& puppet) {
for(int i = 0; i < skeleton->size(); i++) {
puppet.setControlPoint(skeleton->getControlIndex(i), skeleton->getPositionAbsolute(i));
}
}
//--------------------------------------------------------------
void ofAp... | CreativeInquiry/digital_art_2014 | MeshTester/src/ofApp.cpp | C++ | mit | 6,809 |
<?php
namespace Home\Controller;
use Think\Controller;
class AddressController extends Controller
{
protected function _initialize ()
{
if (!session('user')) {
if (IS_AJAX) {
$this->ajaxReturn(['status'=>2, 'info'=>'请登陆之后在执行此操作!']);
} else {
$th... | hookidea/yiwukongjian | Application/Home/Controller/AddressController.class.php | PHP | mit | 2,650 |
public class ENG {
}
| zacswolf/CompSciProjects | Java (AP CompSci)/Eclipse/RankedGPA/src/ENG.java | Java | mit | 23 |
require "rails_helper"
RSpec.describe FormsController do
describe "#index" do
context "when an application has been started" do
it "renders the index page" do
current_app = create(:common_application)
session[:current_application_id] = current_app.id
get :index
expect(resp... | codeforamerica/michigan-benefits | spec/controllers/forms_controller_spec.rb | Ruby | mit | 2,108 |
import { MutableRefObject, useEffect, useMemo, useState } from 'react';
import { useApi } from '@proton/components';
import { addMilliseconds } from '@proton/shared/lib/date-fns-utc';
import { Calendar as tsCalendar } from '@proton/shared/lib/interfaces/calendar';
import { noop } from '@proton/shared/lib/helpers/funct... | ProtonMail/WebClient | applications/calendar/src/app/containers/alarms/useCalendarsAlarms.ts | TypeScript | mit | 3,017 |
class ArrowSprite extends Phaser.Sprite {
constructor(game, x, y) {
super(game, x, y, 'arrow');
this.game.stage.addChild(this);
this.scale.set(0.2);
this.alpha = 0.2;
this.anchor.setTo(0.5, 1.3);
this.animations.add('rotate', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], 30, true);
thi... | babruix/alien_worm_game | src/objects/Arrow.js | JavaScript | mit | 1,556 |
import { Injectable } from '@angular/core';
@Injectable()
export class DummyService {
// eslint-disable-next-line no-useless-constructor
constructor() {}
getItems() {
return new Promise(resolve => {
setTimeout(() => {
resolve(['Joe', 'Jane']);
}, 2000);
});
}
}
| storybooks/react-storybook | examples/angular-cli/src/stories/moduleMetadata/dummy.service.ts | TypeScript | mit | 300 |
require "danger/commands/local_helpers/pry_setup"
RSpec.describe Danger::PrySetup do
before { cleanup }
after { cleanup }
describe "#setup_pry" do
it "copies the Dangerfile and appends bindings.pry" do
Dir.mktmpdir do |dir|
dangerfile_path = "#{dir}/Dangerfile"
File.write(dangerfile_pa... | KrauseFx/danger | spec/lib/danger/commands/local_helpers/pry_setup_spec.rb | Ruby | mit | 1,200 |
class HomeController < ApplicationController
skip_authorization_check
def index
@project_promotions = ProjectPromotion.includes(:project => :brand).order("projects.title")
@tags_by_category = Tag.includes(:tag_category, :projects).order(:name).group_by(&:tag_category)
end
end
| nbudin/larp_library | app/controllers/home_controller.rb | Ruby | mit | 292 |
package router
import "testing"
func TestColon(t *testing.T) {
for k, v := range tCases["Colon"] {
r := Colon(k)
testingRouter(t, r, v)
}
}
func BenchmarkColon(b *testing.B) {
for k, v := range tCases["Colon"] {
r := Colon(k)
benchmarkingRouter(b, r, v)
}
}
| mikespook/possum | router/colon_test.go | GO | mit | 273 |
module Overcast
class Color
def self.darken(hex, amount=0.5)
hex = remove_pound(hex)
rgb = convert_to_rgb(hex).map{|element| element * amount }
convert_to_hex(rgb)
end
def self.lighten(hex, amount=0.5)
hex = remove_pound(hex)
rgb = convert_to_rgb(hex).map{ |element| [(elemen... | jespr/overcast | lib/overcast/color.rb | Ruby | mit | 633 |
#include "Receiver.h"
#include "ofGraphics.h"
#include "Utils.h"
namespace ofxSpout {
//----------
Receiver::Receiver() :
defaultFormat(GL_RGBA) {
this->spoutReceiver = nullptr;
}
//----------
Receiver::~Receiver() {
this->release();
}
//----------
bool Receiver::init(std::string chann... | elliotwoods/ofxSpout | src/ofxSpout/Receiver.cpp | C++ | mit | 2,691 |
class RenameUserIdInContacts < ActiveRecord::Migration
def self.up
rename_column "contacts", "user_id", "az_user_id"
end
def self.down
rename_column "contacts", "az_user_id", "user_id"
end
end
| stg34/azalo | db/migrate/20100709182724_rename_user_id_in_contacts.rb | Ruby | mit | 210 |
<header class="banner" role="banner">
<nav role="navigation" class="navbar navbar-inverse">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" ... | obelis/AverageOCR | web/app/themes/averageocr/templates/header.php | PHP | mit | 1,410 |
import random
color_names=[
'aliceblue',
'antiquewhite',
'aqua',
'aquamarine',
'azure',
'beige',
'bisque',
'blanchedalmond',
'blue',
'blueviolet',
'brown',
'burlywood',
'cadetblue',
'chartreuse',
'chocolate',
'coral',
'cornflowerblue',
'cornsilk'... | largetalk/tenbagger | draw/colors.py | Python | mit | 2,176 |
using System.Collections.Generic;
using System.Text;
namespace SourceGenerators
{
internal static class Templates
{
public static string AppRoutes(IEnumerable<string> allRoutes)
{
// hard code the namespace for now
var sb = new StringBuilder(@"
using System.Collections.G... | andrewlock/blog-examples | BlazorPreRender/BlazorApp1/SourceGenerators/Templates.cs | C# | mit | 2,345 |
#region Copyright
//--------------------------------------------------------------------------------------------------------
// <copyright file="RecentChanges.ascx.cs" company="DNN Corp®">
// DNN Corp® - http://www.dnnsoftware.com Copyright (c) 2002-2013 by DNN Corp®
//
// Permission is hereby granted, free... | DNNCommunity/DNN.Wiki | Views/RecentChanges.ascx.cs | C# | mit | 4,659 |
package ku_TR
import (
"testing"
"time"
"github.com/go-playground/locales"
"github.com/go-playground/locales/currency"
)
func TestLocale(t *testing.T) {
trans := New()
expected := "ku_TR"
if trans.Locale() != expected {
t.Errorf("Expected '%s' Got '%s'", expected, trans.Locale())
}
}
func TestPluralsRan... | go-playground/locales | ku_TR/ku_TR_test.go | GO | mit | 19,303 |
var _for = require ('../index');
var should = require ('should');
describe ('passing data', function () {
it ('should call the loop with the passed data', function (done) {
var results = '';
var loop = _for (
0,
function (i) { return i < 2; },
function (i) { return i + 1; },
functio... | JosephJNK/async-for | tests/data.tests.js | JavaScript | mit | 1,126 |
#region License
// Copyright (c) 2013 Chandramouleswaran Ravichandran
//
// 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, c... | devxkh/FrankE | Editor/VEF/VEF.Core.Shared/Interfaces/Converters/MenuVisibilityConverter.cs | C# | mit | 2,235 |
using System;
namespace Paramore.Darker.Builder
{
internal sealed class RegistryActionWrapper : IQueryHandlerDecoratorRegistry
{
private readonly Action<Type> _action;
public RegistryActionWrapper(Action<Type> action)
{
_action = action;
}
public void Regis... | BrighterCommand/Darker | src/Paramore.Darker/Builder/RegistryActionWrapper.cs | C# | mit | 407 |
# encoding: utf-8
class LogoPhotoUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support:
# include CarrierWave::RMagick
include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader:
storage :file
# storage :fog
# Override the directory where uploaded f... | zhaoguobin/company_website | app/uploaders/logo_photo_uploader.rb | Ruby | mit | 1,512 |
/**
* @fileoverview A rule to suggest using of const declaration for variables that are never reassigned after declared.
* @author Toru Nagashima
*/
"use strict";
const astUtils = require("../util/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//----------... | Aladdin-ADD/eslint | lib/rules/prefer-const.js | JavaScript | mit | 16,721 |
"""
Compare the regions predicted to be prophages to the regions that are marked as prophages in our testing set
Probably the hardest part of this is the identifiers!
"""
import os
import sys
import argparse
import gzip
from Bio import SeqIO, BiopythonWarning
from PhiSpyModules import message, is_gzip_file
__author_... | linsalrob/PhiSpy | scripts/compare_predictions_to_phages.py | Python | mit | 8,988 |
from pymarkdownlint.tests.base import BaseTestCase
from pymarkdownlint.config import LintConfig, LintConfigError
from pymarkdownlint import rules
class LintConfigTests(BaseTestCase):
def test_get_rule_by_name_or_id(self):
config = LintConfig()
# get by id
expected = rules.MaxLineLengthRu... | jorisroovers/pymarkdownlint | pymarkdownlint/tests/test_config.py | Python | mit | 1,809 |
Template.SightingsEdit.helpers({
onDelete: function () {
return function (result) {
//when record is deleted, go back to record listing
Router.go('SightingsList');
};
},
});
Template.SightingsEdit.events({
});
Template.SightingsEdit.rendered = function () {
};
AutoForm.hooks({
updateSight... | bdunnette/meleagris | client/views/sightings/sightingsEdit.js | JavaScript | mit | 482 |
/**
* Copyright (c) 2013 Egor Pushkin. All rights reserved.
*
* 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, cop... | egorpushkin/iremote | dev/iRemote.Android/src/com/scientificsoft/iremote/platform/net/Socket.java | Java | mit | 2,463 |
package org.zenframework.easyservices.update;
import java.util.Collection;
@SuppressWarnings("rawtypes")
public class CollectionUpdateAdapter implements UpdateAdapter<Collection> {
@Override
public Class<Collection> getValueClass() {
return Collection.class;
}
@SuppressWarnings("unchecked")
... | zenframework/easy-services | easy-services-core/src/main/java/org/zenframework/easyservices/update/CollectionUpdateAdapter.java | Java | mit | 657 |
"""
homeassistant.components.binary_sensor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Component to interface with binary sensors (sensors which only know two states)
that can be monitored.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/binary_sensor/
"""
im... | badele/home-assistant | homeassistant/components/binary_sensor/__init__.py | Python | mit | 1,321 |
<?php
$eZTranslationCacheCodeDate = 1058863428;
$CacheInfo = array (
'charset' => 'utf-8',
);
$TranslationInfo = array (
'context' => 'design/admin/content/edit',
);
$TranslationRoot = array (
'd5c6e07de8b9dccaac1d0452dee0b581' =>
array (
'context' => 'design/admin/content/edit',
'source' => 'Edit <%... | SnceGroup/snce-website | web/var/cache/translation/f1fa2db4683ed697d014961bf03dd47c/ita-IT/e1865bb9511c2e58519696970e878347.php | PHP | mit | 32,257 |
// Copyright (c) 2012-2013 The PPCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp>
#include "kernel.h"
#include "txdb.h"
using namespace std;
extern int nStakeMaxAge;
exte... | Rimbit/Wallets | src/kernel.cpp | C++ | mit | 18,814 |
<?php
class Html
{
public static function LinkCSS($filename)
{
$link = Configuration::$base_dir."/Ressources/css/".$filename;
return($link);
}
public static function LinkImage($filename)
{
$link = Configuration::$base_dir."/Ressources/images/".$filename;
return($link);
}
public static function LinkJS(... | abclive/Lightning | Core/Html.php | PHP | mit | 729 |
require 'cnpj'
module Presenter
class CNPJ < Each
def output
::CNPJ.new(value).formatted
end
end
end
| thiagoa/super_form | lib/presenter/cnpj.rb | Ruby | mit | 120 |
package main
import (
"net/http"
"github.com/freehaha/token-auth"
"github.com/freehaha/token-auth/memory"
"github.com/gorilla/mux"
)
// Route type is used to define a route of the API
type Route struct {
Name string
Method string
Pattern string
HandlerFunc http.HandlerFunc
}
// Routes type i... | fthomasmorel/reimburse-me-golang | routes.go | GO | mit | 2,108 |
#include "smd3d.h"
#define SMSFACE_MAX 1000
//Àӽà ÆäÀ̽º ¸ñ·Ï ÀúÀå Àå¼Ò
smSTAGE_FACE *smFaceList[ SMSFACE_MAX ];
int smFaceListCnt;
//°É¾î ´Ù´Ò¼ö ÀÖ´Â ÃÖ´ë °íÀúÂ÷
int Stage_StepHeight = 10*fONE;
int smStage_WaterChk; //¹° ýũ¿ë Ç÷¢
smSTAGE_FACE *CheckFace=0;
//Æò¸é°ú 1Á¡ÀÇ À§Ä¡ÀÇ °ªÀ» ±¸ÇÔ ( Æò¸é ¹æ... | rafaellincoln/Source-Priston-Tale | J_Server/smLib3d/smStage3d.cpp | C++ | mit | 55,585 |
#! /usr/bin/env python
import sys
sys.setrecursionlimit(150000)
import time
count = 0
def my_yield():
global count
count = count + 1
yield
def run_co(c):
global count
count = 0
t0 = time.clock()
for r in c: ()
t = time.clock()
dt = t-t0
print(dt,count,count / dt)
return r
def parallel_(p1,p2)... | vs-team/Papers | 0. MonadicCoroutines/Src/MonadicCoroutines/CSharp/main.py | Python | mit | 3,063 |
package io.reactivesw.order.order.infrastructure.enums;
/**
* Created by Davis on 16/11/17.
*/
public enum OrderState {
/**
* Open order state.
*/
Open,
/**
* Confirmed order state.
*/
Confirmed,
/**
* Complete order state.
*/
Complete,
/**
* Cancelled order state.
*/
Cancel... | reactivesw/customer_server | src/main/java/io/reactivesw/order/order/infrastructure/enums/OrderState.java | Java | mit | 327 |
<?php
namespace Ibw\MagSoftBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* ProiecteRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ProiecteRepository extends EntityRepository {
public function getLastProiectGeneratId() {
... | annonnim/magsoft | src/Ibw/MagSoftBundle/Entity/ProiecteRepository.php | PHP | mit | 3,167 |
package org.adaptlab.chpir.android.survey.utils;
import org.adaptlab.chpir.android.survey.models.DeviceUser;
public class AuthUtils {
private static DeviceUser sCurrentUser = null;
public static boolean isSignedIn() {
return sCurrentUser != null;
}
public static void signOut() {
... | DukeMobileTech/AndroidSurvey | app/src/main/java/org/adaptlab/chpir/android/survey/utils/AuthUtils.java | Java | mit | 543 |
using System;
namespace SDNUMobile.SDK.Entity.Bathroom
{
/// <summary>
/// 浴室使用用量实体
/// </summary>
public class BathroomUsageAmount
{
#region 字段
private DateTime _logTime;
private Int32[] _amount;
#endregion
#region 属性
/// <summary>
... | isdnu/DotNetSDK | SDNUMobile.SDK/Entity/Bathroom/BathroomUsageAmount.cs | C# | mit | 809 |
;(function() {
'use strict';
const nodemailer = require('nodemailer');
const htmlToText = require('nodemailer-html-to-text').htmlToText;
module.exports = Extension => class Mailer extends Extension {
_constructor() {
this.send.context = Extension.ROUTER;
}
send(ctx) {
let subject = ct... | xabinapal/verlag | extensions/mailer.js | JavaScript | mit | 1,288 |
<?php
include('dbconnect.php');
include('_admin_session.php');
if(isset($_POST['form1'])){
$acc_date = $_POST['acc_date'];
$acc_desc = $_POST['acc_desc'];
$acc_amo = $_POST['acc_amo'];
$acc_dr_cr = $_POST['acc_dr_cr'];
$acc_total = $_POST['acc_total'];
$result = mysql_query("insert into accounts (acc_date, ac... | saidurwd/muradschool | backend/_accounts_view.php | PHP | mit | 3,202 |
require 'spec_helper'
require_relative '../../lib/concerns/linkable'
describe Linkable do
context 'link' do
class Example
include Linkable
def initialize(response)
@response = response
end
end
it 'removes all \ from strings' do
e = Example.new("\"https:\\/\\/ead.local.co... | fortesinformatica/iesde | spec/concerns/linkable_spec.rb | Ruby | mit | 514 |
export class VendorTest {
private expe: string = 'z100123';
constructor(props:any){
//console.log(props);
//this.expe = props;
}
} | ferrugemjs/library | src/example/ui-vendor-example/vendor-test.ts | TypeScript | mit | 144 |
from django import forms
class SearchForm(forms.Form):
criteria = forms.CharField(label='Criteria', max_length=100, required=True) | chaocodes/playlist-manager-django | manager/search/forms.py | Python | mit | 135 |
# frozen_string_literal: true
module DropletKit
class DomainMapping
include Kartograph::DSL
kartograph do
mapping Domain
root_key plural: 'domains', singular: 'domain', scopes: [:read]
property :name, scopes: [:read, :create]
property :ttl, scopes: [:read]
property :zone_file,... | digitalocean/droplet_kit | lib/droplet_kit/mappings/domain_mapping.rb | Ruby | mit | 400 |
package com.example.author.boundary;
import com.example.author.entity.Author;
import com.example.author.repository.AuthorRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.... | andifalk/spring-rest-docs-demo | src/main/java/com/example/author/boundary/AuthorServiceImpl.java | Java | mit | 1,838 |
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
{
/// <summary>
/// CPCHawk: Core Class
/// * Controllers *
/// </summary>
public partial class AmstradCPC
{
/// <summary>
/// The one CPCHawk ControllerDefi... | ircluzar/RTC3 | Real-Time Corruptor/BizHawk_RTC/BizHawk.Emulation.Cores/Computers/AmstradCPC/AmstradCPC.Controllers.cs | C# | mit | 4,843 |
#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <math.h>
#include<cstdio>
#include<string.h>
using namespace std;
int main(){
int in=0,x,o=0,n;
cin>>n;
for (int i = 0; i < n; i++) {
cin>>x;
if(x>=10&&x<=20)
in++;
else
o++;
}
printf("%d ... | ahmedengu/URI-solutions | Beginner/1072 - Interval 2.cpp | C++ | mit | 354 |
namespace p03_WildFarm.Models.Foods
{
public class Vegetable : Food
{
public Vegetable(int quantity) : base(quantity)
{
}
}
} | DimitarIvanov8/software-university | C#_OOP_Basics/Polymorphism/p03_WildFarm/Models/Foods/Vegetable.cs | C# | mit | 164 |
<?php
/**
* PHPExcel
*
* Copyright (c) 2006 - 2013 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ve... | cigiko/brdnc.cafe24.com | os/PHPExcel/Classes/PHPExcel/Reader/SYLK.php | PHP | mit | 14,181 |
package com.polydes.common.comp.utils;
import java.awt.AWTEvent;
import java.awt.Component;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.MouseEvent;
public class HierarchyLeaveListener extends TemporaryAWTListener implements FocusListener
{
private boolean inHierarchy;... | justin-espedal/polydes | Common/src/com/polydes/common/comp/utils/HierarchyLeaveListener.java | Java | mit | 1,420 |
import {bindable} from 'aurelia-framework';
export class SideBarLeft {
@bindable router;
@bindable layoutCnf = {};
}
| hoalongntc/aurelia-material | src/components/layout/sidebar-left.js | JavaScript | mit | 122 |
/**
* @depends nothing
* @name core.array
* @package jquery-sparkle {@link http://balupton.com/projects/jquery-sparkle}
*/
/**
* Remove a element, or a set of elements from an array
* @version 1.0.0
* @date June 30, 2010
* @copyright John Resig
* @license MIT License {@link http://creativecommons.org/licenses... | balupton/jquery-sparkle | scripts/jquery.sparkle.js | JavaScript | mit | 134,797 |
/* globals document, ajaxurl, tinymce, window */
define([
'jquery',
'modal',
'jquery-ui.sortable'
], function ($, modal) {
return function(areas, callback) {
var $areas = $(areas).filter(':not(.initialized)');
$areas.addClass('initialized');
var updateData = function() {
... | Neochic/Woodlets | js/content-area-manager.js | JavaScript | mit | 7,553 |
Factory.define :content_element_text do |p|
p.content_element { |c| c.association(:content_element, :element_type => "ContentElementText") }
end | dkd/palani | spec/factories/content_element_text_factory.rb | Ruby | mit | 146 |
$(document).ready(function() {
var $sandbox = $('#sandbox');
module('typographer_punctuation', {
teardown: function() {
teardownSandbox($sandbox);
}
});
var bdquo = '\u201E'; // „
var rdquo = '\u201D'; // ”
var laquo = '\u00AB'; // «
var raquo ... | mir3z/jquery.typographer | test/jquery.typographer.punctuation.test.js | JavaScript | mit | 4,996 |
<?php
include('head.php');
global $TPL;
?>
<div class="page-header">
<h1>Dateiliste</h1>
</div>
<?php
if($_SESSION['login_msg']) {
$_SESSION['login_msg']=false;
?>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">×</button>
<h4>Erfolgreich eingeloggt.</h4>
Willkommen
... | jnugh/php-miniupload | tpl/default/list.php | PHP | mit | 603 |
module.exports = {
general: {
lenguage (){ temp['locale'] = event.target.value },
close (){ temp['exit_without_ask'] = event.target.checked },
minimize (){ temp['exit_forced'] = event.target.checked },
hide (){ temp['start_hide'] = event.target.checked },
delete (){ temp['ask_on_delete'] = event.ta... | FaCuZ/torrentmedia | app/js/configs.js | JavaScript | mit | 2,228 |
/* This file has been generated by yabbler.js */
require.define({
"program": function(require, exports, module) {
var test = require('test');
var a = require('submodule/a');
var b = require('submodule/b');
test.assert(a.foo == b.foo, 'a and b share foo through a relative require');
test.print('DONE', 'info');
}}, ["te... | jbrantly/yabble | test/modules1.0/wrappedTests/relative/program.js | JavaScript | mit | 356 |
(function() {
'use strict';
angular
.module('material')
.controller('MainController', MainController);
/** @ngInject */
function MainController($timeout, webDevTec, toastr) {
var vm = this;
vm.awesomeThings = [];
vm.classAnimation = '';
vm.creationDate = 1437577753474;
vm.showToas... | LuukMoret/gulp-angular-examples | es5/material/src/app/main/main.controller.js | JavaScript | mit | 906 |
package io.github.intrainos.samsungltool;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
public class Main extends Activity {
@Override
protected void onCre... | Intrainos/SamsungLTool | src/main/java/io/github/intrainos/samsungltool/Main.java | Java | mit | 5,768 |
import { makeStyles } from '@material-ui/core/styles';
const drawerWidth = 240;
export const useStyles = makeStyles((theme) => ({
root: {
display: 'flex',
height: '100vh',
},
appBar: {
width: `calc(100% - ${drawerWidth}px)`,
marginLeft: drawerWidth,
},
drawer: {
width: drawerWidth,
f... | diegodoumecq/joymap | examples/Main/styles.ts | TypeScript | mit | 872 |
import getValue from './getValue.js';
import getNumberValue from './getNumberValue.js';
export default function getOverlayPlaneModule(metaData) {
const overlays = [];
for (let overlayGroup = 0x00; overlayGroup <= 0x1e; overlayGroup += 0x02) {
let groupStr = `x60${overlayGroup.toString(16)}`;
if (groupStr... | chafey/cornerstoneWADOImageLoader | src/imageLoader/wadors/metaData/getOverlayPlaneModule.js | JavaScript | mit | 1,430 |
class Solution:
def combine(self, n, k):
return [list(elem) for elem in itertools.combinations(xrange(1, n + 1), k)]
| rahul-ramadas/leetcode | combinations/Solution.6808610.py | Python | mit | 132 |
'use strict';
/**********************************************************************
* Angular Application (client side)
**********************************************************************/
angular.module('SwagApp', ['ngRoute', 'appRoutes', 'ui.bootstrap', 'ui.bootstrap.tpls' , 'MainCtrl', 'LoginCtrl', 'MySwag... | e2themillions/swaggatar | public/js/app.js | JavaScript | mit | 1,462 |
import os
import unittest
from erettsegit import argparse, yearify, monthify, levelify
from erettsegit import MessageType, message_for
class TestErettsegit(unittest.TestCase):
def test_yearify_raises_out_of_bounds_years(self):
with self.assertRaises(argparse.ArgumentTypeError):
yearify(2003)
... | z2s8/erettsegit | test_erettsegit.py | Python | mit | 1,186 |
module Boxy
class HomesickHandler
def install(url, options)
url = URI.parse(url)
name = File.basename(url.path)
unless castle_cloned?(name)
system "homesick clone #{url.to_s}"
system "homesick symlink #{name}"
else
puts "skipping #{name}, already installed"
en... | fooheads/boxy | lib/boxy/homesick.rb | Ruby | mit | 505 |
from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
from django.core.paginator import InvalidPage, Paginator
from django.db import models
from django.http import HttpResponseRedirect
from django.template.response import SimpleTemplateResponse, TemplateResponse
from django.utils.datastructures import... | A425/django-nadmin | nadmin/views/list.py | Python | mit | 25,811 |
<?php
namespace Dragoon\MoviesBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class DragoonMoviesBundle extends Bundle
{
}
| lboulay/sonata | src/Dragoon/MoviesBundle/DragoonMoviesBundle.php | PHP | mit | 134 |
import { bindable, customAttribute, inject } from 'aurelia-framework';
import { AttributeManager } from '../common/attributeManager';
@customAttribute('b-button')
@inject(Element)
export class BButton {
@bindable bStyle = 'default';
@bindable bSize = null;
@bindable bBlock = null;
@bindable bDisabled ... | aurelia-ui-toolkits/aurelia-bootstrap-bridge | src/button/button.js | JavaScript | mit | 1,041 |
<?php
namespace ZPB\AdminBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* AnimationProgramRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class AnimationProgramRepository extends EntityRepository
{
public function animationsInMonth($mont... | Grosloup/multisite3 | src/ZPB/AdminBundle/Entity/AnimationProgramRepository.php | PHP | mit | 1,680 |
<?php
/**
* Lithium: the most rad php framework
*
* @copyright Copyright 2011, Union of RAD (http://union-of-rad.org)
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
namespace lithium\tests\cases\net\http;
use lithium\action\Request;
use lithium\net\http\Route;
use lithium\... | WarToaster/HangOn | libraries/lithium/tests/cases/net/http/RouterTest.php | PHP | mit | 22,379 |
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICUL... | SuperWangKai/DirectX-Graphics-Samples | Samples/Desktop/D3D12MeshShaders/src/MeshletCull/CullDataVisualizer.cpp | C++ | mit | 7,493 |
package com.wrapper.spotify.requests.data.player;
import com.wrapper.spotify.TestUtil;
import com.wrapper.spotify.enums.CurrentlyPlayingType;
import com.wrapper.spotify.enums.ModelObjectType;
import com.wrapper.spotify.exceptions.SpotifyWebApiException;
import com.wrapper.spotify.model_objects.miscellaneous.CurrentlyP... | thelinmichael/spotify-web-api-java | src/test/java/com/wrapper/spotify/requests/data/player/GetUsersCurrentlyPlayingTrackRequestTest.java | Java | mit | 4,985 |
package org.javacs.rewrite;
/** JavaType represents a potentially parameterized named type. */
public class JavaType {
final String name;
final JavaType[] parameters;
public JavaType(String name, JavaType[] parameters) {
this.name = name;
this.parameters = parameters;
}
}
| georgewfraser/vscode-javac | src/main/java/org/javacs/rewrite/JavaType.java | Java | mit | 307 |
/*
* Copyright (c) 2018 Rain Agency <contact@rain.agency>
* Author: Rain Agency <contact@rain.agency>
*
* 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 wi... | armonge/voxa | src/ssml.ts | TypeScript | mit | 1,552 |
MRuby::Build.new do |conf|
toolchain :gcc
conf.gembox 'default'
conf.gem '../m-activerecord'
conf.enable_test
end
| yasuyuki/m-activerecord | .travis_build_config.rb | Ruby | mit | 122 |
$(document).ready(function(){
var nav = navigator.userAgent.toLowerCase(); //La variable nav almacenará la información del navegador del usuario
if(nav.indexOf("firefox") != -1){ //En caso de que el usuario este usando el navegador MozillaFirefox
$("#fecha_inicio").mask("9999-99-99",{placehold... | JoseSoto33/proyecto-sismed | assets/js/funciones-formulario-evento.js | JavaScript | mit | 1,944 |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["shared-components"]... | mrlew/react-number-picker | dist/react-number-picker.js | JavaScript | mit | 10,328 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH... | DeRossi/Training_CI | application/config/config.php | PHP | mit | 18,210 |
import json
import re
from pygeocoder import Geocoder
from pygeolib import GeocoderError
import requests
# from picasso.index.models import Tag
from picasso.index.models import Address, Listing, Tag
__author__ = 'tmehta'
url = 'http://www.yellowpages.ca/ajax/search/music+teachers/Toronto%2C+ON?sType=si&sort=rel&pg=1&... | TejasM/picasso | picasso/yellow_pages.py | Python | mit | 3,125 |
require 'timeout'
require 'spec_helper'
shared_examples 'using a mysql database' do
before :all do
within 'form#jira-setup-database' do
# select using external database
choose 'jira-setup-database-field-database-external'
# allow some time for the DOM to change
sleep 1
# fill in database configuratio... | wpxgit/docker-atlassian-jira | spec/support/shared_examples/using_a_mysql_database_shared_example.rb | Ruby | mit | 678 |
package com.sincsmart.attendance.util;
import com.activeandroid.util.Log;
import android.content.Context;
import android.util.TypedValue;
//常用单位转换的辅助类
public class DensityUtils {
private DensityUtils() {
/* cannot be instantiated */
throw new UnsupportedOperationException("cannot be instantiated");
}
/**
... | zhilianxinke/attendance | src/com/sincsmart/attendance/util/DensityUtils.java | Java | mit | 1,335 |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... | PiotrDabkowski/Js2Py | tests/test_cases/built-ins/Object/defineProperties/15.2.3.7-6-a-78.js | JavaScript | mit | 975 |
import './clean-rich-text-editor.css';
import select from 'select-dom';
import onetime from 'onetime';
import * as pageDetect from 'github-url-detection';
import features from '.';
function hideButtons(): void {
document.body.classList.add('rgh-clean-rich-text-editor');
}
function hideTextareaTooltip(): void {
for... | sindresorhus/refined-github | source/features/clean-rich-text-editor.tsx | TypeScript | mit | 650 |
import subprocess
with open('names.txt') as f:
names = f.read().splitlines()
with open('portraits.txt') as f:
portraits = f.read().splitlines()
for i, name in enumerate(names):
portrait = portraits[i]
if portrait.endswith('.png'):
subprocess.call(['cp', 'minor/{}'.format(portrait), '{}.png'.fo... | dcripplinger/rotj | data/images/portraits/copy_portraits.py | Python | mit | 341 |
<h2>New Group</h2>
<br>
<?php echo render('admin/group/_form'); ?>
<p><?php echo Html::anchor('admin/group', 'Back'); ?></p>
| hrabbit/newzearch | fuel/app/views/admin/group/create.php | PHP | mit | 128 |
import React from "react";
export default class TransactionSentModal extends React.Component {
constructor(props) {
super(props);
this.state = {
};
}
render() {
return (
<div className={this.props.transactionSent ? "transaction-sent-wrap active" : "transaction-... | safex/safex_wallet | src/components/partials/TransactionSentModal.js | JavaScript | mit | 4,367 |
#pragma once
#include <vector>
#include <memory>
#ifndef ARBITER_IS_AMALGAMATION
#include <arbiter/driver.hpp>
#include <arbiter/util/http.hpp>
#endif
#ifdef ARBITER_CUSTOM_NAMESPACE
namespace ARBITER_CUSTOM_NAMESPACE
{
#endif
namespace arbiter
{
namespace drivers
{
/** @brief HTTP driver. Intended as both a stan... | connormanning/arbiter | arbiter/drivers/http.hpp | C++ | mit | 5,624 |
Chance = require('chance');
chance = new Chance();
function generateStudent() {
var numberOfStudent = chance.integer({
min: 0,
max: 10
})
console.log(numberOfStudent);
var students = [];
for (var i = 0; i < numberOfStudent; i++) {
var birthYear = chance.year({
... | verdonarthur/Teaching-HEIGVD-RES-2016-Labo-HTTPInfra | docker-images/node-image/src/jsonPayloadGen.js | JavaScript | mit | 1,797 |
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
from distutils.core import setup, Extension
setup(name='sample',
ext_modules=[
Extension('sample',
['pysample.c'],
include_dirs=['/some/dir'],
define_macros=[('FOO', '1')],
... | xu6148152/Binea_Python_Project | PythonCookbook/interaction_c/setup.py | Python | mit | 474 |