code stringlengths 2 1.05M |
|---|
// JavaScript Document
var datable_result;
var _url_path = baseurl+'enrolment/new_enrolment/';
var _url_edit = baseurl+'enrolment/new_enrolment/';
var _url_del = baseurl+'enrolment/delete/';
$(document).ready(function() {
datable_result = $('#datable_score_student').DataTable( {
// fixedColumns : true,... |
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define('three.SoftwareRenderer', ['three'], factory);
}
else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {
module.exports = factory(require('three'));
}
else {
factory(root.T... |
import React from 'react';
import { shallow } from 'enzyme';
import FormElementControl from '../FormElementControl';
describe('<FormElementControl />', () => {
let mounted = null;
const child = <div className="foo" />;
beforeEach(() => {
mounted = shallow(<FormElementControl>{child}</FormElementControl>);
... |
function init_types_categories() {
var init = function () { init_edit_modal(); };
load_modal_on_click('#create-type', { target: '#modal-sm', controller: 'admin', action: 'type' }, { todo: init });
load_modal_on_click('#create-category', { target: '#modal-sm', controller: 'admin', action: 'category' }, { todo: init ... |
module.exports = {
verbose: true,
testURL: "http://localhost",
transform: {
".+\\.tsx?$": "ts-jest"
},
transformIgnorePatterns: ["/node_modules/", "/dist/"],
testRegex: "/__tests__/.*\\.spec\\.tsx?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"]
};
|
import config from '../config';
import path from 'path';
import gulp from 'gulp';
import {Server} from 'karma';
gulp.task('unit', ['blogViews'], function(cb) {
new Server({
configFile: path.resolve(__dirname, '../..', config.test.karma),
singleRun: true
}, cb).start();
});
|
/**
* Vehicle payload
*
* LIGNA scenario: step 15
*
* Display description: - A chart of the vehicle payload for the current day
*
* Input variables: - machine[mid].technical_data.vehicle_payload
*
* @@source_header
*
* --
*
* This file is part of the focus-app-demonstrator package.
*
* For the full... |
Chartled.registerChartleEditor( Chartled.ChartChartle, {
initialize: function( definition ) {
this.configuringChartle = false;
this._chartEditorDialog= new Chartled.ChartleEditDialog({
title: "Edit Chart"
});
this._metricEditors=[];
}
, dispose: function() {
this._disposeMe... |
import cp from 'child_process';
import fs from 'fs';
import path from 'path';
import test from 'ava';
import helpers from 'yeoman-test';
const files = [
'lib/config.js',
'lib/persister.js',
'lib/logger.js',
'lib/sub.js',
'sub/commands.js',
'sub/completions.js',
'sub/example.js',
'sub/help.js',
'sub/init.js',... |
export default class {
constructor(jsonInputData = {}, storyInputData = {}) {
this.jsonInputData = jsonInputData;
this.storyInputData = storyInputData;
}
get input() {
let {jsonInputData = {}, storyInputData = {}} = this;
let {radioButtons = []} = jsonInputData;
let ... |
// @flow
import * as React from 'react';
import Benchmark, { type BenchmarkRef } from '../Benchmark';
import BenchmarkType from '../BenchmarkType';
import { act, render, waitFor } from '@testing-library/react';
import type { Sample } from '../types';
type Props = {| testID: number |};
function Test({ testID }: Props)... |
Cufon.replace('h1', {fontFamily: 'Comfortaa'});
Cufon.replace('p.c_soon strong', {fontFamily: 'Comfortaa'}); |
import React from 'react';
class AboutPage extends React.Component {
render() {
return (
<div>
<h1>About </h1>
</div>
)
}
}
export default AboutPage; |
/*
Function: buttonPress
Params: - onclick - Function to call when button is clicked.
Returns: Nothing.
Operation: Adds consistent onmouse* events to a button.
*/
Element.prototype.buttonPress = function(onclick) {
this.onmouseover = function() {
this.style.borderColor = DEFAULT_COLOR;
};
this.onmouseo... |
(function (window, document) {
var layout = document.getElementById('layout'),
menu = document.getElementById('menu'),
menuLink = document.getElementById('menuLink');
function toggleClass(element, className) {
var classes = element.className.split(/\s+/),
length = cla... |
'use strict';
/* Controllers */
angular.module('restBrowser.controllers', [])
.controller('MyCtrl1', ['$scope', 'Restangular', function($scope, Restangular) {
$scope.itemSelected = function(item) {
console.log(item.attr('id'));
var listing = Restangular.all(item.attr('id')).getList();
return listi... |
/**
* Created by marciso on 10/02/2017.
*/
$('#nota').click(function(){
console.log('funcionou');
if($('#nota').is(":checked")){
$("#notaFiscal").prop('disabled',false);
$("#notaFiscal").val('');
}else{
$("#notaFiscal").prop('disabled',true);
$("#notaFiscal").val("S/N");
... |
/* OrderPortal
Meta documents indexed by id.
Value: title.
*/
function(doc) {
if (doc.orderportal_doctype !== 'meta') return;
emit(doc._id, null);
}
|
(function () {
"use strict";
angular.module("mailCRMApp", ["ngRoute", "MailCRM.services", "MailCRM.controllers"])
.config(function ($routeProvider, $locationProvider) {
$routeProvider.when("/login", {
controller: "loginCtrl",
templateUrl: "../../template... |
Meteor.startup(function() {
/**
* Sets Mideor.MIDI to the Web MIDI API object if there is a MIDI device
* detected otherwise false.
*
* Handles API change in Chrome 29.
*/
navigator.requestMIDIAccess()
.then(function (m) {
// Web MIDI API changed in Chrome 29 here's a catchall.
// Chr... |
// All symbols in the Kangxi Radicals block as per Unicode v6.1.0:
[
'\u2F00',
'\u2F01',
'\u2F02',
'\u2F03',
'\u2F04',
'\u2F05',
'\u2F06',
'\u2F07',
'\u2F08',
'\u2F09',
'\u2F0A',
'\u2F0B',
'\u2F0C',
'\u2F0D',
'\u2F0E',
'\u2F0F',
'\u2F10',
'\u2F11',
'\u2F12',
'\u2F13',
'\u2F14',
'\u2F15',
'\u2F16'... |
import { Base } from './base';
export class Asset extends Base {
setStage(stage) {
this.stage = stage;
}
set(params) {}
}
|
import Utils from './Utils';
import TestIDs from '../playground/src/testIDs';
const { elementById } = Utils;
describe.e2e('Lazy Registration', () => {
beforeEach(async () => {
await device.relaunchApp();
await elementById(TestIDs.STACK_BTN).tap();
});
it('push and pop lazily registered screen', async (... |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2016 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* The Physics Manager is responsible for looking after all of the running physics systems.
* Phaser supports 4 physics... |
class x509enrollment_cx500distinguishedname {
constructor() {
// string EncodedName (EncodingType) {get}
this.Parameterized = undefined;
// string Name () {get}
this.Name = undefined;
}
// void Decode (string, EncodingType, X500NameFlags)
Decode(string, EncodingType, X... |
/*
* @flow
* @lint-ignore-every LINE_WRAP1
*/
import {suite, test} from '../../tsrc/test/Tester';
export default suite(({addFile, addFiles, addCode}) => [
test('@jsx pragma without expression is disallowed', [
addCode('// @jsx')
.newErrors(
`
test.js:3
3: // @jsx
... |
/**
* Talisman tokenizers/ngrams tests
* =================================
*
*/
import assert from 'assert';
import ngrams, {
bigrams,
trigrams,
quadrigrams
} from '../../src/tokenizers/ngrams';
describe('ngrams', function() {
it('should throw if n is < 1.', function() {
assert.throws(function() {
... |
// This file has been generated by the SAPUI5 'AllInOne' Builder
jQuery.sap.declare('sap.uxap.library-all');
if ( !jQuery.sap.isDeclared('sap.uxap.BlockBaseMetadata') ) {
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2016 SAP SE or an SAP affiliate company.
* Licensed under the Apache License... |
var fs = require("fs");
var sqlite3 = require('sqlite3');//.verbose();
var _ = require("../utils");
var Certificate = require("../Certificate");
var log = console.log;
module.exports = _.class({
server: null, // server object
seg: null, // segment name 'D<num:oct>... |
define(["exports"], function (exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
... |
import { OrderedMap, Map } from 'immutable'
import IdOrderedMap, {
ITEMS_KEY,
SELECTED_ID_KEY
} from './IdOrderedMap'
describe('(Models) IdOrderedMap', () => {
it('Should export a constant ITEMS_KEY.', () => {
expect(ITEMS_KEY).to.eql('items')
})
it('Should export a constant SELECTED_ID_KEY.', () => {
... |
'use strict';
describe('Controller: TestUploadCtrl', function () {
// load the controller's module
beforeEach(module('vadsenceNodeApp'));
var TestUploadCtrl, scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
TestU... |
(function () {
if (!Object.keys) {
/**
* Define object keys overrides
* @param hash
* @returns {Array}
*/
Object.prototype.keys = function (hash) {
var keys = [], k;
for (k in hash) {
if (hash.hasOwnProperty(k)) {
... |
import fs from 'fs'
import bluebird from 'bluebird'
const readFile = bluebird.promisify(fs.readFile)
const writeFile = bluebird.promisify(fs.writeFile)
const upload = (array) =>
bluebird.each(array, (file) =>
readFile(file.path).then((img) => writeFile('/tmp/' + file.filename, img)))
export default upload
|
Ext.define('Flux.controller.UserExperience', {
extend: 'Ext.app.Controller',
requires: [
'Ext.form.field.Display',
'Ext.form.field.TextArea',
'Ext.window.Window'
],
refs: [{
ref: 'sourcePanel',
selector: 'sourcepanel'
}, {
ref: 'symbology',
s... |
define("Cedtory/mods/qwery",function(require,exports,module){
(function (name, context, definition) {
module.exports = definition()
})('qwery', this, function () {
var doc = document
, html = doc.documentElement
, byClass = 'getElementsByClassName'
, byTag = 'getElementsByTagName'
, qSA = 'queryS... |
import React from 'react';
import { IconInfoBadgedSmallFilled, IconMarkerSmallOutline } from '@teamleader/ui-icons';
import { Icon, Input, Label, TextSmall, Tooltip } from '../../index';
import { addStoryInGroup, LOW_LEVEL_BLOCKS } from '../../../.storybook/utils';
const TooltippedIcon = Tooltip(Icon);
export default... |
"use strict";
let datafire = require('datafire');
let openapi = require('./openapi.json');
module.exports = datafire.Integration.fromOpenAPI(openapi, "azure_network_endpointservice"); |
// 문자열의 오른쪽을 trim 합니다.역쉬 트림 수정하신분 세세함이 돋보입니다!
clean.string.rTrim = (function(){
var regExTrim;
// rTrim 을 지원하면
if( !!String.prototype.rTrim ){
return function( target ){
//REQUIRED: target: 바꿀 대상의 문자열입니다!
return target.rTrim();
};
// rTrim 을 지원하지 않으면
}else{
regExTrim = /\s+$/;
return function( target... |
function konami() {
var arr = [];
var konami = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13];
document.addEventListener('keyup', function(e) {
arr.push(e.keyCode);
if (arr.length >= 12) arr.shift();
if (arr.toString() === konami.toString()) cheatMode();
});
}
function cheatMode() {}
|
// Example webpack configuration for React with live reloading in development
// and asset fingerprinting in production.
"use strict";
var path = require("path");
var webpack = require("webpack");
// Helpers are hardcoded to expect dev assets at http://localhost:3808/webpack/*
var devServerPort = 3808;
// set TARGET... |
define([
"src/extender",
"src/events",
"src/hash.route",
"src/model",
"src/fetch",
"src/style",
"src/tmpl",
"src/view",
"src/resources",
"src/spromise",
"src/module"
], function(Extender, Events, Hash, Model, Fetch, Style, Tmpl, View, Resources, Promise, Module) {
return {
Extender: Extende... |
'use strict';
// From: https://github.com/w3c/web-platform-tests/blob/fa9436d12c/encoding/api-surrogates-utf8.html
require('../common');
const assert = require('assert');
const {
TextDecoder,
TextEncoder
} = require('util');
const badStrings = [
{
input: 'abc123',
expected: [0x61, 0x62, 0x63, 0x31, 0x... |
/**
* Created by w1 on 8/7/2015.
*/
/*
Run this app to view effects of illum 0 to illum 7 on sphere
0. neon, require Kd, optional map_Kd
1. diffuse, require Kd, Ka, optional map_Kd, map_Ka
2. specular, (1) and require Ks, Ns, optional map_Ks
3. reflection, (2) and require refl (en... |
'use strict'
const React = require('react')
// import _ from 'lodash'
//
// import hashHistory from 'react-router'
// import initStore from '../../src/front-end/js/store'
// import initRouter from '../../src/front-end/js/router'
const _ = require('lodash')
const { hashHistory } = require('react-router')
const initSto... |
JalaliDate = {
g_days_in_month : [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
j_days_in_month : [31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29]
};
JalaliDate.jalaliToGregorian = function (j_y, j_m, j_d) {
j_y = parseInt(j_y);
j_m = parseInt(j_m);
j_d = parseInt(j_d);
var jy = j_y - 979;
var jm = j_m - 1;
... |
'use strict';
const fs = require('fs');
const sharedData = require('@render/shared_data.js');
const Config = require('@render/config.js');
const { getKeyFromConfig, get } = require('@aux/aux_global.js');
const Logger = require('@render/logger.js');
const aux_webManager = require('@render/aux_web_manager.js');
const au... |
/* globals describe, it */
var assert = require('assert');
var t = require('../index');
var util = require('./util');
describe('t.intersection(types, [name])', function () {
var Min = t.subtype(t.String, function (s) { return s.length > 2; }, 'Min');
var Max = t.subtype(t.String, function (s) { return s.length < ... |
---
layout: null
---
$(document).ready(function () {
$('a.blog-button').click(function (e) {
if ($('.panel-cover').hasClass('panel-cover--collapsed')){
return;
}
currentWidth = $('.panel-cover').width();
if (currentWidth < 960) {
$('.panel-cover').addClass('panel-cover--collapsed');
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../actions';
class CommentBox extends Component {
constructor(props) {
super(props);
this.state = {
comment: ''
}
}
handleChange(e) {
this.setState({ comme... |
#!/usr/bin/env node
'use strict';
var getStdin = require('get-stdin');
var meow = require('meow');
var detectNewline = require('./');
var cli = meow({
help: [
'Usage',
' $ detect-newline <string>',
' $ cat unicorn.txt | detect-newline',
'',
'Example',
' $ detect-newline "$(printf \'Unicorns\\nRainbows\... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import * as actions from '../../redux/modules/ReceiversReducer'
import { studentsArraySelector,
teachersArraySelector,
groupsArraySelector,
lessonsArraySelector,
activeReceiversArraySelector } from '../../... |
/*
This file is part of Ext JS 4.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE in... |
import React from 'react';
import { connect } from 'react-redux';
import Colors from './../../constants/PolygonColors.js';
import Operations from './../../constants/Operations.js';
import { LOCALE } from './../../constants/Config';
import './Range.css';
const scaleFactor = 2;
let Range = ({min, max, operationType}) ... |
// Stwórz dwie funkcje, jedną nazwij range - powinna tworzyć tablicę
// zawierającą wszystkie liczby całkowite ze wskazanego przedziału,
// a jako dodatkowy argument przyjmować wielkość "kroku"
// np range(1, 10, 2) powinno stworzyć tablicę [1,3,5,7,9]
// druga funkcja o nazwie sum powinna sumować elementy tablicy
|
"use strict";
var Promise = require('bluebird');
var twilio = require('twilio');
var xoauth2 = require('xoauth2');
var crypto = require('crypto');
var crypto_pbkdf2 = Promise.promisify(crypto.pbkdf2);
var phone_regex = /\b[0-9]{10}\b/;
module.exports = function(api){
var client;
return {
phone: {
set... |
define([], function () {
var parser = (function(){
function parseMessage(message){
var parsedMessage = '',
laughingEmoticon = '<img src=\\"../server/media/emoticons/laughing.png\\"/>',
likeEmoticon = '<img src="../server/media/emoticons/like.png"/>',
... |
import { createIterable } from '../helpers/helpers';
import from from 'core-js-pure/es/array/from';
import Set from 'core-js-pure/features/set';
QUnit.test('Set#symmetricDifference', assert => {
const { symmetricDifference } = Set.prototype;
assert.isFunction(symmetricDifference);
assert.arity(symmetricDiffere... |
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin')
var TARGET = process.env.TARGET;
var config = {
devtool: 'eval-source-map',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./app/index'
],
... |
const { each } = require('async')
const executeInitializers = async (ready, params) =>
new Promise(async (resolve, reject) => {
const $ = Object.keys(ready).filter(r => r[0] === '$')
try { resolve(await each($, async i => await ready[i](params))) }
catch (e) { reject(e) }
})
module.exports = executeI... |
// Random number utilities
let retV = false,
vVal = 0.0,
/**
*
* @name Utility
* @type {object}
* @property {function} assert
* @property {function} getDirection:
* @property {function} getElementPosition
* @property {function} getOpt
* @property {function} loadJSON
* @property {function... |
module.exports = {
"env": {
"es6": true,
"node": true,
"mocha": true,
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
},
"parser": "babel-eslint",
"rules": {
"indent": [
"error",
2
],
... |
var button = document.getElementById('create-event-button');
button.addEventListener('click', function(e) {
e.preventDefault();
// Submit data to DB.
db.collection('events')
.add({
title: document.getElementById('event-title').value,
date: document.getElementById('event-date').value,
locat... |
'use strict';
require('es6-promise').polyfill();
window.regeneratorRuntime = require('regenerator-runtime');
// https://www.npmjs.com/package/browser-cookies
const Cookies = require('browser-cookies');
const qs = require('qs');
const co = require('co');
const Enums = require('billund-enums');
const WidgetEnums = Enum... |
// 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... |
'use strict';
// virtual-dom
var h = require('virtual-dom/h');
// lodash
var difference = require('lodash/difference');
// bpmn-questionnaire
var BpmnQuestionnaire = require('../../../../lib/BpmnQuestionnaire');
var interactive = BpmnQuestionnaire.createType({
renderQuestion: fu... |
(function () {
var default_item_width = 120;
var last_list_num = 0;
function getInt16String() {
return parseInt(Math.random()*200+56).toString(16);
}
let Random = {
color: function () {
return '#' + getInt16String() + getInt16String() + getInt16String() ;
... |
// Generated by CoffeeScript 1.9.1
(function() {
var bcv_parser, bcv_passage, bcv_utils, root,
hasProp = {}.hasOwnProperty;
root = this;
bcv_parser = (function() {
bcv_parser.prototype.s = "";
bcv_parser.prototype.entities = [];
bcv_parser.prototype.passage = null;
bcv_parser.prototype.re... |
var express = require('express');
var nodemailer = require('nodemailer');
var williamJHitchcock = express();
//default port to 8000 for dev
var PORT = process.env.PORT || 8000;
console.log(__dirname);
//serve static files
williamJHitchcock.use(express.static(__dirname + '/public/'));
//send email
williamJHitchcock.ge... |
describe("hapi-rest-methods", function() {
var testMethods = ['any', 'get', 'post', 'put', 'patch', 'delete', 'options'];
var hapi = require('hapi');
var request = require('request');
var restMethods = require('../lib/index')
var server;
beforeEach(function() {
server = new hapi.Server();
server... |
import {VelocityAnimator} from '../src/animator';
import {initialize} from 'aurelia-pal-browser';
jasmine.getFixtures().fixturesPath = 'base/test/fixtures/';
describe('stop function', () => {
let animator;
let container;
beforeAll(() => initialize());
beforeEach(() => {
let elem = $('#test-simple').eq(0... |
var MERU = {};
MERU.options = {
requestGet: {
host: 'mobileapp.merucabs.com',
port: 80,
method: 'GET',
path: ''
},
requestPost: {
host: 'merucabapp.com',
port: 80,
method: 'POST',
path: '',
headers: {
'Content-Type': 'appli... |
if ( typeof Promise == 'undefined' ) { var _P = require('../lib/promise.min.js').Promise; } else { var _P = Promise; }
var Excp = require('excp.js');
var Session = require('session.js');
var Table = require('table.js');
function Wss( option ) {
this.isOpen = false;
this.events = {};
this.conn_events = {};
this.... |
/**
* @since 2.2.0
*/
process.traceDeprecation = true;
process.env.BABEL_ENV = 'test';
const path = require('path');
require('@babel/register');
let ci = process.env.CI || process.env.APPVEYOR;
let webpackConfig = require('./build-config/webpack.prod.main.js');
let support_dir = path.resolve(__dirname, 'test', 'su... |
// Imports
var Entity = require('../entity');
// Utils
var fillChar = function(data, char, fieldLength, rTL) {
var result = data.toString();
if (rTL === true) {
for (var i = result.length; i < fieldLength; i++)
result = char.concat(result);
} else {
for (var i = result.length; i... |
version https://git-lfs.github.com/spec/v1
oid sha256:8dab13cd84b3c528037755762df99084451664baa1c87b6b0c9cd81d547fac00
size 39149
|
version https://git-lfs.github.com/spec/v1
oid sha256:cc9206eb96354984cfaaece07ee4ce59c3d753ea120208abe0ee5626ad8621fe
size 2958
|
version https://git-lfs.github.com/spec/v1
oid sha256:d332f13e7f0b16ef6915ebf6faeb3c55a9fa54c5828092777166a289835bcd2a
size 846
|
var TouchendBtn = require('../../../lib/touch/default/touchend-button'),
Q = require('q'),
expect = require('expect.js'),
initElement = function () {
var el = document.createElement('div');
el.style.width = '100px';
el.style.height = '100px';
el.style.position = 'absolute';
... |
// Generated by CoffeeScript 1.8.0
var BITSTR, DERNULL, INTERGER, OID, PRTSTR, SEQUENCE, SET, TAG, UTF8STR, asn1Util, cryptoUtil, generateCSR, generateKeyPair, j, keyUtil, onmessage;
postMessage({
type: 'status',
message: 'Importing JSRSASign library ...'
});
importScripts('jsrsasign-4.7.0-all-min.js');
j = KJUR... |
$(document).ready(function () {
$(document).on('click', '.loading', function () {
var btn = $(this);
btn.button('loading');
setTimeout(function () {
btn.button('reset')
}, 5000);
});
}); |
// Generated by CoffeeScript 1.6.3
(function() {
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ct... |
'use strict';
// TODO: best name? Better to call it Helpers? Utils is already taken
var Core = function () {};
Core.prototype.reserved = function (name) {
return (name && name.length >= 1 && name.charAt(0) === '$') ? true : false;
};
module.exports = new Core(); |
/**
* @ngdoc directive
* @name ui.controls.uiIcon
* @description
*
* uiIcon is used to render font icons. When uiIcon is placed inside a uiButton or uiToolbar it adjusts it's size to
* match it's parent size.
*
* @param {string} name The name of the font icon.
*
* @restrict E
* @example
<example module="ui"... |
var ViewAbstract = function () {
this.initialited = false;
this.$viewContainer = null;
};
ViewAbstract.prototype.setViewContainer = function($viewContainer) {
this.$viewContainer = $viewContainer;
return this;
};
ViewAbstract.prototype.getViewContainer = function() {
return this.$viewContainer;
};... |
//= require jquery/jquery
//= require raphael
//= require_tree .
$(document).ready(function(){
function arcs(id,n,type,mod,size){
var top = $(id).position().top;
var height = $(id).height();
var width = $(id).width();
var center = width/2;
var R = 100;
var paper = Raphael(0, top, width, height);
xm... |
angular.module('ps.core.service')
.service('dataTranslationService', function(i18n) {
'use strict';
var s = this;
s.translate = translate;
s.setStorageDataLabels = setStorageDataLabels;
function translate(data) {
angular.forEach(data, function(value, key) {
switch (key) {
... |
var expect = require('chai').expect;
var errors = require('../lib/Errors');
describe('Errors', function() {
it('maps status codes to custom errors', function() {
var unauthorized = errors('401');
expect(unauthorized.name).to.eq('Error');
expect(unauthorized.type).to.eq('AuthenticationError');
expect(... |
'use strict';
describe('Unit Test', function() {
beforeEach(module('appServices', 'serviceMocks'));
describe('Services', function(){
var Github;
var httpBackend;
var scope;
beforeEach(inject(function(_Github_, $httpBackend, $rootScope) {
Github = _Github_;
... |
var cron = require('./lib/cron');
cron.aliases(require('./lib/aliases.json'));
/**
* I have always hated these little individual files, literally taking one file and re-exporting it
* Turns out, in this situation it's needed, due to the way node require's modules
*
* Take two files: "cronfile" and "./lib/cron.js"
... |
window.onload = function() {
var prod_img = document.getElementById("prod_img");
// Set an interval o keep rotating the image every 256 milliseconds
setInterval(function(){
prod_img.src = getImageSrc();
},1000);
var imgIndex = 1;
function getImageSrc() {
imgIndex = (imgIndex + 1) > 5? 1 : imgIndex + 1;
... |
/* globals window, _, VIZI, THREE */
(function() {
"use strict";
/**
* Blueprint debug circles output
* @author Robin Hawkes - vizicities.com
* @author Edward Oliver Greer - eogreer.me
*/
// output: {
// type: "BlueprintOutputDebugCircles",
// options: {}
// }
VIZI.BlueprintOutputDebugCircles = ... |
"use strict";
var gulp = require("gulp");
var cfg = require("../../../gulp.config");
function serve() {
try {
var browserSync = require("browser-sync").create();
gulp.task("build:sync", ["build"], browserSync.reload);
gulp.task("serve", function (done) {
browserSync.init({
server: "./"
});
var ... |
/*global jQuery,alert*/
this.mytodo = (function (mytodo) {
mytodo.MyTodoView = function () {
var self, newTodoItemView, todoListView, eventBus, myTodoService;
self = this;
eventBus = new mytodo.EventBus();
myTodoService = new mytodo.MyTodoService();
todoListView = new mytod... |
window.Mobi = window.Mobi || {};
window.Mobi.View = Backbone.View.extend({
delegateEvents: function(events) {
var key, newKey, oldValue;
this.events = this.events || events;
for (key in this.events) {
if (key.indexOf('click') === 0) {
if (window.Modernizr.touch) {
newKey = key.rep... |
/*!
localForage -- Offline Storage, Improved
Version 1.4.2
https://mozilla.github.io/localForage
(c) 2013-2015 Mozilla, Apache License 2.0
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g... |
'use strict';
/**
* @ngdoc function
* @name uniappApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the uniappApp
*/
angular.module('uniappApp')
.controller('MainCtrl', function ($scope) {
$scope.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'Karma'
];
});
|
import React from 'react'
import PropTypes from 'prop-types'
import ReactDisqusComments from 'react-disqus-comments'
import * as S from './styled'
const Comments = ({ url, title }) => {
const completeURL = `https://muniz95.com.br${url}`
return (
<S.CommentsWrapper>
<S.CommentsTitle>Comentários</S.Comme... |
(function( $ ){
var multiSelectId=-1;
$.fn.multiSelect=function(options){
multiSelectId++;
var settings = {
'createCallback':false,
'createText':false,
'title':this.attr('title'),
'checked':[],
'oncheck':false,
'onuncheck':false,
};
$.extend(settings,options);
var button=$('<div class="... |
var currentTagsArray = new Array();
var popularTagsArray = new Array();
var separatorArray = new Array();
var currIdArray = new Array();
$(document).ready(function(){
for (var currDivId in currentTagsArray)
for(var index in currentTagsArray[currDivId])
if(isInteger(index) && currentTagsArray[... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.