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
<mvc:View controllerName="com.study.Z_HttpRequests.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m">
<Shell id="shell">
<App id="app">
<pages>
<Page id="page" title="{i18n>ajaxTitle}">
<content>
<List class="sapUiResponsiveMargin" width="auto" items="{httpModel>/}">
<items>
<ObjectListItem title="User ID: {httpModel>userId}" numberUnit="{httpModel>title}"
intro="{httpModel>body}" number="ID: {httpModel>id}"/>
@jakes2255
jakes2255 / router.html
Created July 22, 2019 11:25 — forked from joakimbeng/router.html
A really simple Javascript router
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Building a router</title>
<script>
// Put John's template engine code here...
(function () {
// A hash to store our routes:
@jakes2255
jakes2255 / index.js
Created July 25, 2019 10:32
My Custom NPM package
module.exports = function(string) {
if(typeof string !== "string") throw new TypeError("Plesae enter a string value!");
return string.replace(/\s/g,"");
};
@jakes2255
jakes2255 / index.html
Created August 21, 2019 10:37
Expression Bindings // source https://jsbin.com/mobeyo
<!DOCTYPE html>
<html>
<head>
<script
src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.m"
data-sap-ui-xx-bindingSyntax="complex">
</script>
@jakes2255
jakes2255 / controller.js
Created August 22, 2019 12:02
Custom Controller
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function (Controller) {
"use strict";
return Controller.extend("com.demo.ZDemo_CustomPath.controller.Display", {
onInit: function () {
}
});
onPressAdd: function () {
//retrive model using helper function in base class
var oJsonModel = this.getMyModel("Results");
//create an additional node to be added to the model
var additional_props = {
"organization": "SAP",
"place": "Bangalore"
};
//add the new node to the current model
oJsonModel.setProperty("/address",additional_props);
# loop for retrieving div tags
for eachDiv in divs:
hrefS = re.findall(r'title=(.*?)>', str(eachDiv))
for hRef in hrefS: # loop for retrieving only titles in the relevent divs
print(hRef)
#Open the file and pass data to be written.
file1 = open(completeName, "w")
toFile = "SCN: Questions of the Day!"+\
"\n"+"**************************""\n"
file1.write(toFile)
sign_content ="<br/>"+"Thanks,"+"<br/>"+"Jakes"
@jakes2255
jakes2255 / test.py
Last active September 5, 2019 14:44
if(itemNumber == 0):
mailSubject = itemDetails