Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jakes2255's full-sized avatar
🎖️
Never Quit

Arun Jacob jakes2255

🎖️
Never Quit
View GitHub Profile
@jakes2255
jakes2255 / JsObjects.js
Created April 23, 2021 09:06
JS Create Object without prototypes
const obj = Object.create(null);
console.log(obj.__proto_ === null);
if(isNaN(mobNum)){
MessageToast.show("Only numbers please!");
input.setValue(mobNum.substring(0,mobNum.length-1));
}
if(mobNum.indexOf('.')!=-1){
MessageToast.show("No decimal values please!");
input.setValue(mobNum.substring(0,mobNum.length-1));
}
<Input id="mobnput" class="sapUiSmallMarginBottom" placeholder="Enter mobile number..."
width="170px" value="" liveChange="onMobNumberChange" type="Number"/>
onMobNumberChange: function (oEvent) {
var input = oEvent.getSource(),
mobNum = input.getValue();
if(mobNum.length > 10){
MessageToast.show("Upto 10 digits only!");
input.setValue(oEvent.getParameters().value.substr(0,10).trim());
}
else{
input.setValue(mobNum);
}
onMobNumberChangeRegEx: function (oEvent) {
var input = oEvent.getSource();
var mobNum = input.getValue();
mobNum = mobNum.replace(/[^\d]/g, '');
input.setValue(mobNum);
}
@jakes2255
jakes2255 / test.ipynb
Last active March 29, 2020 09:51 — forked from codebrain001/namedtuple.ipynb
A tactile guide to Python Collections
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function first(temp,callBack){
setTimeout(function(){
console.log(temp);
callBack();
},500);
//callBack();
}
function second(){
console.log(2);
}
@jakes2255
jakes2255 / test.py
Last active September 5, 2019 14:44
if(itemNumber == 0):
mailSubject = itemDetails
sign_content ="<br/>"+"Thanks,"+"<br/>"+"Jakes"