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 x = {'5':'cliff', '6':'19', length:3}; | |
var y = Array.prototype.slice.call(x); | |
console.log(y); | |
// result: [undefined, "cliff", "19"] | |
var a = {'0':'cliff', '1':'19', length:4}; |
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 arr =[1, [2,[3, [4, [5, [6]]]]]]; | |
function flattenCtrl(list, level){ | |
do { | |
list=_.flatten(list, true); | |
level--; | |
} while(level>0); |
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
<!doctype html> | |
<html > | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script> | |
<script type="text/javascript"> | |
var Dm = angular.module('testDirective',[]); | |
Dm.controller('DmCtrl', function($scope) { | |
$scope.name = "cliff"; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
--js---- | |
/** Basic input validator for input text field, it detect empty input and special characters */ | |
app.directive('inputValidator', function() { | |
return { | |
require: 'ngModel', //ngModelController is required here | |
link: function(scope, element, attr, mCtrl) { | |
function myValidation(value) { | |
if (value.trim()!=="" && new RegExp(/[~`!@#\$%\^&*\/\\\|\?\.,:;"']/g).test(value)==false) { | |
mCtrl.$setValidity('charE', true); |
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
$(chartId).kendoChart({ | |
theme: 'bootstrap', | |
title: { | |
position: "bottom", | |
text: chartTitle, | |
color: "#ffffff", | |
fontSize: "22px" | |
}, | |
legend: { | |
visible: false |
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
$(document).ready(function () { | |
setCurrentTabHeaderText(); | |
// $("#ownedTaskSection").resizable(); | |
var prevY = 0, | |
nextY =0, | |
offset = 0; |
OlderNewer