This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mockNuclearDec = mockNuclearComponent({formState, formValidation}); | |
HigherOrderInput.__Rewire__('nuclearComponent', mockNuclearDec); | |
let HigherOrderComponent = HigherOrderInput(Input); | |
let hoc = TestUtils.renderIntoDocument( | |
<HigherOrderComponent {...mockProps} /> | |
); | |
let hocElm = React.findDOMNode(hoc); | |
let inputObj = TestUtils.findRenderedDOMComponentWithClass(hoc, 'one'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var checkComplexPassword = function(password) { | |
var CHAR_LOWERS = /[a-z]/, | |
CHAR_UPPERS = /[A-Z]/, | |
CHAR_NUMBERS = /[0-9]/, | |
CHAR_SPECIAL = /[?=.*!@#$%^&*]/, | |
CHAR_TYPES = [CHAR_LOWERS,CHAR_UPPERS,CHAR_NUMBERS,CHAR_SPECIAL], | |
counter = 4; | |
for (var i=0; i<CHAR_TYPES.length; i++){ | |
if(!CHAR_TYPES[i].test(password)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module = angular.module 'draggable', [] | |
module.controller "dragDropCtrl", ($scope) -> | |
$scope.dropPosition = null | |
module.directive 'pixbiDraggable', ($timeout) -> | |
restrict: 'A' | |
controller: 'dragDropCtrl' | |
scope: { | |
dropPosition: "=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Enter the pyramid height" | |
input = gets.chomp.to_i | |
while input < 1 || input > 69 | |
puts "Please enter a number between 1 and 69" | |
input = gets.chomp.to_i | |
end | |
puts "Your input is #{input}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Car | |
def initialize(name) | |
@name = name | |
end | |
def name | |
@name | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
files: { | |
desktopSrc: ['public/js/config/*.js', 'public/js/factories/*.js', 'public/js/controllers/*.js', 'public/js/directives/*.js'], | |
mobileSrc: ['public_mobile/js/config/*.js', 'public_mobile/js/factories/*.js', 'public_mobile/js/controllers/*.js', 'public_mobile/js/directives/*.js'], | |
desktopImg: ['public/images/{,**/}*.{jpg,png,gif}', 'public/video/**/{,**/}*.{jpg,png,gif}'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lexical | |
(function(){ | |
function addIt(){ | |
var x = 100; | |
function addInside(){ | |
return x += 5; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://www.crockford.com/javascript/little.html | |
var singleton = (function(){ | |
var privateHello = "hello"; | |
function privateFunction(something){ | |
privateHello = privateHello + " " + something; | |
} | |
return { | |
changeSomething: function(a){ | |
privateFunction(a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sharer-message-container { | |
// finished state when visible | |
position: absolute; | |
top: 0%; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background: rgba(0, 0, 0, 0.9); | |
z-index: 100; | |
padding: 20px 10px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin testing($properties) { | |
@if(type-of(nth($properties, 1)) == list) { | |
@each $property, $value in $properties { | |
#{$property}: $value; |
OlderNewer