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
/* | |
* Validate the user entered date | |
* '01/01/1970' -> valid date | |
* '45/01/1970' -> invalid date | |
*/ | |
function checkDate(str) | |
{ | |
var date = null; | |
var matches = str.match(/(\d{1,2})[\/](\d{1,2})[\/](\d{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
function checkDate(str) | |
{ | |
var matches = str.match(/(\d{1,2})[\/](\d{1,2})[\/](\d{4})/); | |
if (!matches) return; | |
var day = parseInt(matches[1],10); | |
var month = parseInt(matches[2],10); | |
var year = parseInt(matches[3],10); | |
var date = new Date(year, month - 1, day); | |
if (!date || !date.getTime()) return; | |
if (date.getMonth() + 1 != month || |
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
#The purpose of theme.css.fast.load property is to tell whether css should be cached or not. If it is cached, it can be loaded faster. | |
theme.css.fast.load=false | |
theme.images.fast.load=false | |
javascript.fast.load=true | |
javascript.log.enabled=false | |
layout.template.cache.enabled=false | |
velocity.engine.resource.manager.cache.enabled=false | |
com.liferay.portal.servlet.filters.cache.CacheFilter=false | |
com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true | |
com.liferay.portal.servlet.filters.sso.cas.CASFilter=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
<Resource name="LiferayPool" auth="Container" type="javax.sql.DataSource" | |
maxActive="100" maxIdle="30" maxWait="10000" | |
username="any_user" password=" any_pass" driverClassName="oracle.jdbc.driver.OracleDriver" | |
url="jdbc:oracle:thin:@192.168.1.180:1521:orcl"/> |
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
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-6 col-md-4 col-md-offset-4"> | |
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1> | |
<div class="account-wall"> | |
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120" | |
alt=""> | |
<form class="form-signin"> | |
<input type="text" class="form-control" placeholder="Email" required autofocus> | |
<input type="password" class="form-control" placeholder="Password" required> |
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 checkDataVar = 'Test'; | |
console.log('Outside var showES5Features: ' + checkDataVar); | |
while(true){ | |
//var key word | |
var checkDataVar = 'Poop!'; | |
console.log('Inside var showES5Features: ' + checkDataVar); | |
break; | |
} |
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
//ES 5 | |
function isBigEnough(value) { | |
return value >= 10; | |
} | |
var filtered = [12, 5, 8, 130, 44].filter(isBigEnough); | |
console.log(filtered); | |
//ES 6 | |
let filtered_extended = [12, 5, 8, 130, 44].filter((e) => { | |
return e >= 10; |
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 checkDataLet = 'Test'; | |
console.log('Outside let showES6Features: ' + checkDataLet); | |
while(true){ | |
//let key word | |
let checkDataLet = 'Poop!'; | |
console.log('Inside let showES6Features: ' + checkDataLet); | |
break; | |
} |
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
const PI = Math.PI; | |
console.log(PI); | |
//Can not assign value - TypeError: invalid assignment to const 'PI' | |
//PI = '1'; |
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 Vehicle { | |
constructor(){ | |
this.type = 'Vehicle'; | |
} | |
getBrand(val){ | |
console.log('Type: ' + val + ', This is a ' + this.type); | |
} | |
} | |
class Car extends Vehicle{ |