code stringlengths 2 1.05M |
|---|
var assert = require('chai').assert;
var ROOT_PATH = './../../';
describe('CategoryService', function () {
var _CategoryService = require(ROOT_PATH + 'services/CategoryService');
var categoryService = _CategoryService.CategoryService;
it('should choose a category', function () {
var category... |
// Main eduCrud Module
//Declare app level module which depends on filters, and services
var eduGridServices = angular.module('edu-grid.services', []);
var eduGridDirectives = angular.module('edu-grid.directives', []);
var eduGridFilters = angular.module('edu-grid.filters', []);
var eduGridTpl=angular.module('edu-grid... |
// Load Plugins
var pkg = require('./package.json'),
gulp = require("gulp"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename"),
jshint = require("gulp-jshint"),
merge = require("merge-stream"),
header = require("gulp-header"),
au... |
export function createAction(type, payload = null) {
const action = {
type,
}
if (payload) {
action.payload = payload
}
return action
}
|
// const symbols = {
// '~': 'tilde',
// '`': 'backtick',
// '!': 'exclamation',
// '@': 'at',
// '#': 'pound',
// $: 'dollar',
// '%': 'percent',
// '^': 'carat',
// '&': 'ampersand',
// '*': 'asterisk',
// '(': 'paren-open',
// ')': 'paren-close',
// '-': 'hyphen',
// _: 'underscore',
// ... |
// app/pods/components/comment-form/component.js
import CommentForm from 'ember-osf/components/comment-form/component';
import layout from './template';
export default CommentForm.extend({
layout,
tagName: ['comment-form'],
classNames: ['comment', 'form']
});
|
import React, { Component, PropTypes } from 'react';
var _ = require("lodash");
import AddFriend from './AddFriend';
import Friend from './Friend';
export default class FriendList extends Component {
static propTypes = {
actions: PropTypes.object.isRequired,
friends: PropTypes.object.isRequired,
};
render() {... |
/*
* grunt-contrib-copy
* http://gruntjs.com/
*
* Copyright (c) 2012 Chris Talkington, contributors
* Licensed under the MIT license.
* https://github.com/gruntjs/grunt-contrib-copy/blob/master/LICENSE-MIT
*/
module.exports = function(grunt) {
'use strict';
var path = require('path');
grun... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.defaultStyles = exports.defaultColors = undefined;
var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
exports.reduce = reduce;
exports.createValueG... |
// Page profile
var _page_profile = undefined;
updatePageProfile();
// Render menus and search box on the left side
renderEnvironmentMenuItems();
renderPartnerMenuItems();
renderSearchBoxWithAutoComplete();
// Events binding
window.onhashchange = _handlerUpdatePage;
// Force the first refresh
_handlerUpdatePage();
|
/*********************************************
* app-src/js/ycfgdb.js
* YeAPF 0.8.52-107 built on 2016-12-01 07:30 (-2 DST)
* Copyright (C) 2004-2016 Esteban Daniel Dortta - dortta@yahoo.com
* 2016-01-23 22:00:19 (-2 DST)
* First Version (C) 2014 - esteban daniel dortta - dortta@yahoo.com
*************************... |
const EventEmitter = require('events').EventEmitter;
const instance = new EventEmitter();
/**
* Node EventEmitter facade
*/
module.exports = {
on() {
return instance.on.apply(instance, arguments);
},
once() {
return instance.once.apply(instance, arguments);
},
emit() {
return instance.emit.ap... |
/*
* Copyright (c) 2012 Adobe Systems Incorporated. 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 ri... |
'use strict'
/**
* pem module
*
* @module pem
*/
var Buffer = require('safe-buffer').Buffer
var net = require('net')
var helper = require('./helper.js')
var openssl = require('./openssl.js')
module.exports.createPrivateKey = createPrivateKey
module.exports.createDhparam = createDhparam
module.exports.createEcpar... |
gameProjectionCurrentGame = null;
function gameProjection(){
this.arrayWorldInformation = null;
this.canvasCanvas = document.getElementById("gameBoard");
this.contextContext = this.canvasCanvas.getContext("2d");
this.intSelection = new point(0, 0);
this.pointHover = new point(0, 0);
this.pointSelectio... |
function sender_button(e){var t=document.getElementById("message_receiver_id"),n=document.getElementById("form_message");n.hidden=!1,t.value=e,document.getElementById("text_comment").focus()}function cancel_message(){var e=document.getElementById("form_message");e.hidden=!0} |
var transformComps = require('./transform-composed-nodes'),
async = require('async'),
_ = require('underscore'),
compositionRelationCypherList = require('./composition-relation-cypher-list'),
sortComps = require('./sort-compositions'),
getId = require('./get-id');
function stripComposedObjects(obje... |
var group___p_w_r___exported___macro =
[
[ "__HAL_PWR_CLEAR_FLAG", "group___p_w_r___exported___macro.html#ga96f24bf4b16c9f944cd829100bf746e5", null ],
[ "__HAL_PWR_GET_FLAG", "group___p_w_r___exported___macro.html#ga2977135bbea35b786805eea640d1c884", null ],
[ "__HAL_PWR_PVD_EXTI_CLEAR_FLAG", "group___p_w_r... |
'use strict';
/**
* logger adapter
*/
class LoggerShim {
constructor(loggerImpl) {
this._impl = loggerImpl;
}
info(msg) {
if (this._impl) this._impl.info(msg);
}
warning(msg) {
if (this._impl) this._impl.warning(msg);
}
error(msg) {
if (this._impl) this._impl.error(msg);
}
debug... |
import createHistory from 'history/createBrowserHistory';
import { queryToJson } from './utils';
import { PATH, QUERY, HASH } from './RouterModes';
export function createHistoryFromLocation(location, mode = PATH) {
const { pathname, hash, search } = location;
let route = pathname;
switch (mode) {
case PATH:
... |
define([], function() {
return {
"Title": "Paramètre de requête de l'URL",
"QQueryStringParameter": "Valeur du paramètre 'q'"
}
}); |
/*! jQuery UI - v1.9.2 - 2015-05-31
* http://jqueryui.com
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
jQuery(function(e){e.datepicker.regional.id={closeText:"Tutup",prevText:"<mundur",nextText:"maju>",currentText:"hari ini",monthNames:["Januari","Februari","Maret","April","Mei"... |
/* jslint node: true */
'use strict';
var assert = require('assert'),
jshint = require('../../lib/js/jshint');
describe('JSHint', function () {
it('should report errors for bad code', function (done) {
var file = __dirname + '/data/jshint/bad.js';
jshint.run([file], function(err, output) {
assert.e... |
import React from 'react';
let GithubButton = ({
href,
size,
countAriaLabel,
ariaLabel,
showCount,
children,
...rest
}) => (
<a
className="github-button"
href={href}
data-size={size}
data-count-aria-label={countAriaLabel}
aria-label={ariaLabel}
data-show-count={showCount}
{.... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
angular.module('BwafTM.pages.charts.amCharts').
factory('RouteQuery', ['$http', '$q', function($http, $q) {
return {
get: function(route) {
var data = {};
var defer = $q.defer();
var service = {};
$http.get(route).
... |
/* */
"format amd";
//! moment.js locale configuration
//! locale : Latvian [lv]
//! author : Kristaps Karlsons : https://github.com/skakri
//! author : Jānis Elmeris : https://github.com/JanisE
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require ===... |
/*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-2-4
*/
(function( window, undefined ) {
// Can't do t... |
const assert = require('assert')
const Automerge = process.env.TEST_DIST === '1' ? require('../dist/automerge') : require('../src/automerge')
const { BloomFilter } = require('../backend/sync')
const { decodeChangeMeta } = require('../backend/columnar')
const { decodeSyncMessage, encodeSyncMessage, decodeSyncState, enco... |
/**
* WhRequest.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
date: {
type: 'date'
},
offices: {
model: 'Office'
},
... |
function solve([arg1]){
let number = Number(arg1)
for(i=number; i>0;i-=1){
console.log(i)
}
}
solve(['10'])
|
module.exports = angular.module('app.login', [])
.controller('LoginController', function($scope, $state, AuthenticationService, localStorageService) {
$scope.username = "";
$scope.password = "";
$scope.login = function() {
console.log($scope.username);
if ($scope.user... |
var gulp = require('gulp');
var util = require('gulp-util')
var gulpConnect = require('gulp-connect');
var connect = require('connect');
var cors = require('cors');
var path = require('path');
var exec = require('child_process').exec;
var portfinder = require('portfinder');
var swaggerRepo = require('swagger-repo');
v... |
Module( 'IMC.getIp', function(getIp) {
getIp.create = function() {
this.request();
};
getIp.request = function() {
this._getJSON();
};
getIp._getJSON = function() {
var args = {
url : 'http://ipinfo.io',
data : {},
dataType : 'jsonp',
cache : false
}
, ajax = jQuery.ajax( a... |
// 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... |
/**
*
* AVIONIC
* Propelling World-class Cross-platform Hybrid Applications ✈
*
* Copyright 2015 Reedia Limited. 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 w... |
import {describe, it} from 'mocha';
import {expect} from 'chai';
import _ from 'lodash';
import {
GraphQLObjectType,
GraphQLSchema,
GraphQLString,
graphql
} from 'graphql';
import {
getFieldsFromAst,
getFieldsFromInfo
} from '../';
describe('Fields', () => {
describe('getFieldsFromAst', () => {
it('... |
import * as fs from 'fs';
import * as Path from 'path';
import * as StreamSplit from 'stream-split';
import {chunk} from 'lodash';
import {fields as gitLogFields} from './git-log-fields';
import {yellow, green, reset} from './colors';
import {console} from './console';
const fields = [
...gitLogFields,
{identifi... |
"use strict";
var util = require('util'),
mpath = require('mpath'),
Promise = require("bluebird"),
_extend = require('node.extend'),
_filter = require('./lib/filter'),
_validator = require('./lib/validator'),
ConformaError = require('./lib/error').ConformaError,
ConformaValidationError = require('./lib/e... |
/**
* Created by Jackey Li on 2015/12/3.
*/
(function (angular) {
'use strict';
angular.module('desktop').factory('desktopStyleHttpService',
['$http',
function ($http) {
var service = {};
service.getData = function () {
return $http.get('desktop/content/data/style.json');
};
return serv... |
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const twilio = require('twilio');
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const workspaceSid = 'WSXXXXXXXXXXXXXXXXXXXX... |
exports.ESLINT_PLUGIN_PREFIX = 'eslint-plugin-';
exports.PLUGIN_NAME_SHORT = 'disable';
exports.PLUGIN_NAME = this.ESLINT_PLUGIN_PREFIX + this.PLUGIN_NAME_SHORT;
exports.PLUGIN_PROCESSOR_NAME = 'disable';
|
'use strict';
(function() {
// Tipos Controller Spec
describe('Tipos Controller Tests', function() {
// Initialize global variables
var TiposController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deleting the resour... |
'use strict'
import {
createAction, handleActions
}
from 'redux-actions'
import { find } from 'lodash'
// ------------------------------------
// Constants
// ------------------------------------
export const MAP_GROUND_SET_MAP_STYLE = 'MAP_GROUND_SET_MAP_STYLE'
const DARK_MAP_NAME = 'mapbox://styles/mapbox/dark-v9... |
import R from 'ramda'
export default {
name: 'book',
schema: {
data: {
type: R.always('book'),
id: R.compose(R.toString, R.path(['data', 'id'])),
untransformId: R.compose(Number, R.path(['id'])),
attributes({ data }) {
const attributes = R.pick(['title', 'copyright'], data)
... |
import formStyle from '../forms/style';
const initialState = {
isLoading: false,
success: false,
auto: 'none',
fields: {
password: {
placeholder: 'nova senha',
secureTextEntry: true,
maxLength: 72,
error: 'deve ter pelo menos 8 caracteres',
stylesheet: formStyle
},
pas... |
version https://git-lfs.github.com/spec/v1
oid sha256:049d55faf599cf56e0c61557d364f01b10b961b815ed1831d1573796ec45bdff
size 350776
|
'use strict'
const test = require('tap').test
const Rule = require('../../lib/rules/pr-url')
const MISSING_PR_URL = 'Commit must have a PR-URL.'
const INVALID_PR_URL = 'PR-URL must be a GitHub pull request URL.'
const NUMERIC_PR_URL = 'PR-URL must be a URL, not a pull request number.'
const VALID_PR_URL = 'PR-URL is v... |
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
config = require(path.resolve('./config/config'));
/**
* Values module init function.
*/
module.exports = function (app, db) {
};
|
describe('tabs', function () {
var tabsComponent = require('../tabs')
it('should have a created hook', function () {
expect(typeof tabsComponent.created).toBe('function')
})
it('should set empty default data', function () {
expect(typeof tabsComponent.data).toBe('function')
var d... |
'use strict';
/**
* @ngdoc function
* @name trellocloneApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the trellocloneApp
*/
angular.module('trellocloneApp')
.controller('MainCtrl', function ($scope) {
$scope.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'Karma'
... |
/**
* Created by nuintun on 2015/11/20.
*/
'use strict';
var fs = require('fs');
var path = require('path');
var util = require('../../util');
var Vue = require('../../vue/vue');
require('../project-base');
require('../dynamic-item');
module.exports = Vue.component('project-configure', {
template: fs.readFileSy... |
module.exports = {
entry: './src/index.tsx',
output: {
filename: 'bundle.js',
path: __dirname + '/dist'
},
// Enable sourcemaps for debugging webpack's output.
devtool: 'source-map',
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ['.ts', '.tsx', '.js', '.json']
... |
const CARD_SECTION_TYPE = 10;
const IMAGE_SECTION_TYPE = 2;
/*
* input mobiledoc: [ markers, elements ]
* output: Post
*
*/
export default class MobiledocParser {
constructor(builder) {
this.builder = builder;
}
parse({version, sections: sectionData}) {
const markerTypes = sectionData[0];
const ... |
define([
"../core",
"../var/document",
"../data/var/dataPriv",
"../data/var/acceptData",
"../var/hasOwn",
"../event"
], function (jQuery, document, dataPriv, acceptData, hasOwn) {
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
jQuery.extend(jQuery.event, {
trigger: func... |
/**
* Author: Cameron Green <cam at uq.edu.au>
* Date: 02/12/13
*
* Click directive for buttons
*/
'use strict';
angular.module('uql.orgs')
.directive('uqlOrgsGoClick', ['$location', function ($location) {
return function (scope, element, attrs) {
var path;
attrs.$observe('uqlOrgsGoClick', fun... |
import { h, Component } from 'preact';
import { Link } from 'preact-router/match';
import style from './style';
export class Intro extends Component {
render({ offsetX }) {
return <div class={style.intro}>
<div style={this.getStyles(offsetX)}>Scroll or drag to start your advent adventure...</div>
<L... |
var readYaml = require('read-yaml');
BlockchainConfig = function() {};
BlockchainConfig.prototype.loadConfigFile = function(filename) {
try {
this.blockchainConfig = readYaml.sync(filename);
} catch (e) {
throw new Error("error reading " + filename);
}
return this;
};
BlockchainConfig.prototype.loadC... |
// homeIntent creates streams from click events on .increment & .decrement
const homeIntent = s => ({
inc$: s.DOM.select('.increment').events('click').map(ev => +1),
dec$: s.DOM.select('.decrement').events('click').map(ev => -1),
});
export default homeIntent
|
// 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... |
/**
* @ngdoc module
* @name material.components.virtualRepeat
*/
angular.module('material.components.virtualRepeat', [
'material.core'
])
.directive('mdVirtualRepeatContainer', VirtualRepeatContainerDirective)
.directive('mdVirtualRepeat', VirtualRepeatDirective);
/**
* @ngdoc directive
* @name mdVirtualRepeat... |
/*jslint white: true*/
var tests = [
'text', 'json'
];
for (var file in window.__karma__.files) {
if (window.__karma__.files.hasOwnProperty(file)) {
if (/[sS]pec\.js$/.test(file)) {
tests.push(file);
}
}
}
// hack to make jed (the i18n library that Jupyter uses) happy.
document... |
'use strict';
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
describe('Visit the Home Page', function () {
beforeEach(function () {
browser().navigateTo('../../app/index.html');
});
it('should see the root page', function() {
expect(browser().location().url()).toBe("");
... |
const mongoose = require('mongoose');
let productSchema = mongoose.Schema({
name: {type: 'string', required: 'true'},
priority : {type: 'number', required: 'true'},
quantity : {type: 'number', required: 'true'},
status : {type: 'string', required: 'true'},
});
let Product = mongoose.model('Product', p... |
import hoistStatics from 'hoist-non-react-statics';
import React from 'react';
import { Redirect } from 'react-router-dom';
import AuthService from "./AuthService";
function withAuth(Component) {
const auth = new AuthService();
function C(props) {
if (!auth.loggedIn()) {
return <Redirect to="/login" />... |
var results = angular.module('results', []);
results.controller('resultsController', ['$scope', 'Ballot', 'User', 'socket', function($scope, Ballot, User, socket){
var ctrl = this;
var ballot = Ballot.getBallot();
ctrl.username = User.getUser();
ctrl.topic = ballot.topic;
ctrl.options = ballot.options;
ct... |
/*
* This class will get the mint data and return the correct values.
*/
var exec = require('child_process').exec;
var Energy = require('../models/energy');
var Logins = require('../models/logins');
var $ = require('jquery');
var _ = require('underscore');
var ElectricityCommand = function(app) {
this.app = app... |
import _ from 'lodash';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
export default (config, options) => {
if (options.docs) {
let jsLoader = '';
let cssSourceMap = options.development ? '?sourceMap' : '';
config = _.extend({}, config, {
entry: {
bundle: './client.js'
... |
/**
* Created by Sweets823 on 2016/6/23.
*/
(function () {
'use strict';
angular
.module('sysApp.demo')
.controller("demoController", demoController)
demoController.$inject = ['$scope','$timeout','$log','$q'];
function demoController($scope,$timeout,$log,$q){
var vm = $scop... |
import React, { Component, PropTypes } from 'react';
export default class Checkbox extends Component {
handleChange(e) {
const { onChange, checked } = this.props;
onChange(e.target.checked);
}
render() {
const { text, checked } = this.props;
return (
<div className="checkbox-container">
... |
import * as mutations from "src/store/mutations";
describe('mutations.js', () => {
it('should set products', () => {
checkSet('products', mutations.setProducts);
});
it('should set categories', () => {
checkSet('categories', mutations.setCategories);
});
it('should set packs', () => {
checkSet(... |
describe("JsonBloomfilter.BitArray", function() {
describe("#initialize", function() {
it("should require a size", function() {
expect(function(){new JsonBloomfilter.BitArray()}).toThrow("Missing argument: size")
});
it("should take an optional bit field", function() {
field = [0,0,0,2];
... |
'use strict';
module.exports = app => {
const { STRING, DATE } = app.Sequelize;
const SITE_NAME = {
WEAPP: 'WEAPP',
WECHAT: 'WECHAT',
WEIBO: 'WEIBO',
};
const SocialOauth = app.model.define('social_oauth', {
site: {
type: STRING(32),
defaultValue: SITE_NAME.WEAPP,
},
site_... |
import crypto from 'crypto';
/**
* Transform a string in camelCase style
*
* @param {String} string string to transform
* @return {String} transformed string
*/
export const camelCase = function(string) {
return string
.split('_')
.map((word, i) => {
if (i === 0) {
return word.toLo... |
// Your card and deque factory code should be loaded into the browser before this file
// by the main.html container file.
// At this point, both makeCard and makeDeque should be defined.
// 2b:
// make a deque instance to store a full deck of cards:
var deckOfCards = makeDeque(makeCard.fullSet);
function compareBy... |
define(function(require, exports, module){
/*
* webui popover plugin - v1.1.3
* A lightWeight popover plugin with jquery ,enchance the popover plugin of bootstrap with some awesome new features. It works well with bootstrap ,but bootstrap is not necessary!
* https://github.com/sandywalker/webui-popover
*
* ... |
exports.buildBreadcrumb = (nodes, selector, onClick) => {
window.requestAnimationFrame(() => {
const breadcrumb = document.createDocumentFragment();
nodes.forEach((node, idx) => {
const domNode = document.createElement("a");
domNode.className = "breadcrumb-item";
domNode.addEventListener("c... |
describe('User Stories', function() {
var plane;
var airport;
var weather;
describe('under normal conditions', function() {
beforeEach(function() {
weather = new Weather();
airport = new Airport(weather);
plane = new Plane();
spyOn(Math, 'random').and.returnValue(0);
});
// A... |
/**
* created by Tomas Kulhanek on 4/11/17.
*/
//import {HttpClient} from 'aurelia-http-client';
import {ProjectApi} from "../components/projectapi";
import {EventAggregator} from 'aurelia-event-aggregator';
import {SelectedFile} from '../filepicker/messages';
import {bindable} from 'aurelia-framework';
import {File... |
import React from 'react';
import ReactDOM from 'react-dom';
import a11y from 'react-a11y';
import App from './App';
import './index.css';
a11y(React);
ReactDOM.render(<App />, document.getElementById('root'));
|
import test from 'ava';
import nightmare from 'nightmare';
import cleanstyle from '../../helpers/cleanstyle';
import common from '../../helpers/common';
const runner = nightmare({
show : false
});
let tagName = 'quote';
let docUrl ... |
'use strict';
/**
* @ngdoc overview
* @name memoappUiApp
* @description
* # memoappUiApp
*
* Main module of the application.
*/
angular
.module('memoappUiApp', [
'ngAnimate',
'ngCookies',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'ui.bootstrap'
])
.config(['$routeProvid... |
/*
* grunt-ssh
* https://github.com/andrewrjones/grunt-ssh
*
* Copyright (c) 2013 Andrew Jones
* Licensed under the MIT license.
*/
// TODO: use passphrase
// TODO: unit tests
module.exports = function (grunt) {
'use strict';
grunt.util = grunt.util || grunt.utils;
grunt.registerMultiTask('sshexec', 'Exe... |
$(function() {
document.onkeydown = function(e) {
var ev = document.all ? window.event : e;
if (ev.keyCode == 13) {
$('#search').click()
}
}
$('#search').click(function() {
if ($('#key').val() == '') {
$('.input-group').addClass('has-error');
}... |
"use strict"
var xdTesting = require('./index')
var AddressOptions = require('./addressOptions')
var CommandAnalyzer = require('./commandAnalyzer')
var WebdriverIOMultiBrowser = require('webdriverio/lib/multibrowser')
var q = require('q')
var Flow = require('./flow/flow')
var Checkpoint = require('./flow/checkpoint')
... |
// @flow
import type { Layer } from 'types/layers.types';
import i18n from 'i18next';
/**
* Sorts an array of GFW contextual layers (from either API)
*
* The sort order is slightly complex and is as follows:
* 1. Protected Areas
* 2. TCL in descending date order
* 3. All other GFW areas in alphabetical order
... |
"use strict";
module.exports = function(context){
return context.be.tableDefAdapt({
name:'element_images',
title:'images for elements and isotopes',
editable:context.user.rol==='boss',
fields:[
{name:'atomic_number', title:'A#',typeName:'integer', nullable:false, ... |
import React from 'react';
import {Link} from 'react-router';
import ResumeStore from '../stores/ResumeStore'
import ResumeActions from '../actions/ResumeActions';
class Resume extends React.Component {
constructor(props) {
super(props);
this.state = ResumeStore.getState();
this.onChange = this.onChange.... |
angular.module('DashboardModule', ['ui.router', 'toastr', 'ngResource', 'ngAnimate'])
.run(['$templateCache', function ($templateCache) {
$templateCache.put('assets/templates/toast.html',
"<div>Your template here</div>"
);
$templateCache.put('assets/templates/progressbar.html',
... |
// Copyright (C) 2011 - Texas Instruments, Jason Kridner
//
//
var fs = require('fs');
var http = require('http');
var winston = require('winston');
var express = require('express');
var events = require('events');
var socketHandlers = require('./socket_handlers');
var serverEmitter = new events.EventEmitter();
var d... |
/**
Template Controllers
@module Routes
*/
/**
The app routes
@class App routes
@constructor
*/
// Change the URLS to use #! instead of real paths
// Iron.Location.configure({useHashPaths: true});
// Router defaults
Router.configure({
layoutTemplate: 'layout_main',
notFoundTemplate: 'layout_notFound',
... |
function htmlbodyHeightUpdate(){
var height3 = $(window).height();
var height1 = $('.nav').height() + 50;
var height2 = $('.main').height();
if(height2 > height3) {
$('html').height(Math.max(height1,height3,height2)+10);
$('body').height(Math.max(height1,height3,height2)+10);
} else {
$('h... |
var fs = require('fs');
fs.readFile('./helloworld.js', encoding='utf-8', function(err, data){
if(err){
throw err;
}
console.log(data);
});
console.log('파일의 내용 : ');
|
import React from 'react';
class ToolbarGroup extends React.Component {
shouldComponentUpdate(nextProps) {
return (nextProps.children !== this.props.children);
}
render() {
return (
<section className="toolbar-group">
<h2 className="toolbar-group-title">
{this.props.label}
</h2>
{this.props.... |
import { Platform } from 'react-native';
export const HOT_COLOR = '#EE2A7B';
export const NAV_BAR_HEIGHT = 44;
export const STATUS_BAR_HEIGHT = Platform.select({ ios: 20, android: 10 });
export const INPUT_HEIGHT = 50;
export const INPUT_FONT_SIZE = 14;
export default {
mainContainer: {
flex: 1,
paddingTop:... |
'use strict';
const calculateCacheKeyForTree = require('./calculate-cache-key-for-tree');
/*
An implementation of Addon#cacheKeyForTree that assumes the return values of
all trees is stable. This makes it easy to opt-back-in to tree caching for
addons that implement stable overrides of treeFor hooks.
@public... |
module.exports = {
dynamic: undefined,
bool: 'bool',
number: 'number',
string: 'string',
object: 'object',
list: 'list'
}; |
search_result['4422']=["topic_0000000000000A84_events--.html","CompanyService Events",""]; |
/**
* Handlebars Mech Helpers
* Copyright (c) 2015 Alexander Brandt
* Based on Assemble Handlebars Helpers Copyright (c) 2013 Jon Schlinkert, Brian Woodward, contributors
* Licensed under the MIT License (MIT).
*/
'use strict';
// Node.js
var path = require('path');
// node_modules
//var Handlebars = require('.... |
function productOfNumbers(nums) {
let x = Number(nums[0]);
let y = Number(nums[1]);
let z = Number(nums[2]);
let sum = x * y * z ;
if (sum >= 0){
return "Positive";
}
else
{
return "Negative";
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.