Tuesday, August 8, 2017

Intermittent Fasting According to Al-Quran (Anzalal Kitab) - Part 1

 The Answer for CANCER Prevention and Cure by Nobel Prize Winner, Otto Warburg

https://www.youtube.com/watch?v=Q9socQcwPIs

CELL FUEL: GLUCOSE vs KETONES


1. As explained in the video above, cancer cells take glucose as their only source of feed for their survival and growth.

2. Cancer cells thrive well in a body that provide them with rich glucose metabolism environment.

3. In order to starve the cancer cells to death, the body need to get rid of glucose metabolism and adapt fat metabolism (ketosis) as the cancer cells is unable to feed themselves with "Ketone Bodies", an alternative fuel for body cells beside glucose.

4. The healthy cells thrive well with Ketone Bodies, compared to Cancer Cells which only survive on Glucose.

ACCELERATING KETONES PRODUCTION WITH FASTING


5. The state of ketosis is can be accelerated with Intermittent (Periodical) Fasting. The long non feed period of 8 - 10 hours will deplete glycogen stores in liver, as well glucose, in circulating blood. The more physical activity done, the faster glucose is depleted from the body.

6. Once glucose is depleted, the brain will instruct the body to initiate Fat metabolism as survival mechanism. Thus, fat energy stores will be shoved out and diluted, liquidated and metabolize into Ketone Bodies.

7. Qur'an prescribed intermittent fasting no of days in verse 2:196 such as:
  • 3 days - فَصِيَامُ ثَلَاثَةِ أَيَّامٍ
  • 7 days - وَسَبْعَةٍ
  • 10 days - تِلْكَ عَشَرَةٌ كَامِلَةٌ
Note: This fasting was prescribed as fidyah (فدية) or ransom to the ones who are unable to provide offering or Al-Hadya (الهدي) which is explained as the offering of four leg cattle animals (بهيمة الانعم), during the period of Hajj.

The opposite terminology for Al-Hadya (الهدي) is Al-Soida (الصيد) which is referring to the wild animal that Allah had prohobit from being hunted during the 4 restricted Shahr period as in 9:36 (اربعة اشهورالحروم).

During this restricted period, only water based wild life hunt/harvest (Soida al-bahr -صيد البحر ) is allowed as in 5:96.

See concordance of root words:
http://tanzil.net/#search/quran/الهدي
http://tanzil.net/#search/quran/هدي
http://tanzil.net/#search/quran/الصيد
http://tanzil.net/#search/quran/صيد


BEST INTERMITTENT FASTING RATIO


8. The best ratio is 10:20 (10 days continued fasting and 20 days "feasting" / per month).

9. This ratio was mentioned as "The Perfect 10" (تِلْكَ عَشَرَةٌ كَامِلَةٌ)

10. The 10:20 ratio provide sufficient "de-toxification" (fasting) vs feeding cycle to the physical body (Jasad).

FASTING: A PATH TO NAFS AL-MUTMAINNAH 


11. Al-Insan (Human) structural design was comprise of 3 core elements, identified as Jasad (جسد), Nafs (نفس) and Ruh (روح ).

12. Fasting is key to the development of one of the above core elements i.e Nafs.

13. Fasting as Tazkiah An-Nafs will elevate the Nafs from the state of Ammarah (Inner Self in Commanding Power) to the state of Mutmainnah (Inner Self in Calm/Obey/Submission).

14. In relation to fasting, Nafs in its commanding state, is always want to enjoy food, drinking and sex at anytime of the day. During fasting, this freedom is restricted. A kind of discipline is introduced to the Nafs.

The tactical objective of Fasting is to "pull off the commanding power" of Nafs, it enjoys by default.

15. The body that suffering from Diabetes or other Metabolic Disorder condition (Over Weight, Obesity, High Blood, High Cholesterol, Atherosclerosis, Kidney, Heart Disease, Cancer) own themselves partly to the state of Nafs Ammarah (Commanding Self to be in Excess). Thus, their outer body is just a victim or result of inner self will. The suffering was initiated from inside > out.

16. Once Nafs were made to be trained in an intended starvation days, it will start mellowing down and turned into the state of Nafs Lawwamah and finally to the state of Nafs Al-Mutmainnah.

17. At Mutmainnah stage, An-Nafs is bowing down, listening and communicating with another insani element called *RUH* (divine element from Allah being breath in into us during the initial creation stage).

To be continued...

Sunday, March 19, 2017

Appery IO: Login, Register & Recover Password

What are we going to build?


In this tutorial, we’ll build an app where users can log in, register, and recover forgotten passwords via the email they specified when registering. This app uses the Appery.io database and server code, shows how to create a sign in/registration feature, and shows how to use server scripts in the app to recover password.

This tutorial assumes you know how to build mobile pages, add and map services, and write server code scripts. To send an email with a secret code to restore the password, you need a SendGrid account.

Creating from the backup

You can build this app by following our step-by-step tutorial below or create it from the backup.

To create an app from the backup:

Click “Create new app.”Type an app name.Click “From backup” and select the project backup file.Click “Create.”

You still have to create the database and Server Code scripts manually. If you’ve already created the database, locate the X-Appery-Database-Id and paste it toPasswordRecoveryDB_settings > database_id.

Also, specify the URLs forsendEmail_service andresetPassword_service. Find how to create them here andhere.


Creating a new app

Switch to the Apps tab, and create a new app (use any name). The app builder opens. We’ll create three pages, one each for: registering, logging in, and recovering the password.

Creating pages

The loginScreen is the start screen of the app. It is used to log into the database.

1. Build the following UI:

2. The Input components are defined as placeholders. Name the Input components:loginInput andpasswordInput.

3. Name the Buttoncomponents: loginButton,registerButton andrecoverPasswordButton.

The registerScreen is used for registering new users.

4. Build the following UI:

5. All Input components are defined as placeholders. Name the Input components:loginInput, emailInput,passwordInput, andconfirmPasswordInput.

6. Name the buttonregisterButton.

The recoverScreen is used to recover the password, with the help of a secret code sent to the user’s email.

7. Build the following UI:

8. All Input components are defined as placeholders. Name the Input components:loginInput,secretCodeInput,newPasswordInput, andconfirmNewPasswordInput.

9. Name buttons:getCodeButton andchangePasswordButton.

Now we’ll create a database to store users’ data.

Creating a new database

1. Go to https://appery.io/database, and create a new database. In the app, we need only theUsers collection. It has two predefined columns:username and password. Add two more columns: user’s e-mail (email) and the secret code (secret_code):

2. Now, we need to createREST services for registering and signing into the database. The services should then be mapped and the events invoking them defined.

Creating & invoking database services

1. To create the signup and login services, select Create New > Database Services, select your database, and then check the Login andSignup services.

Three services are created:

2. Open the loginScreen, switch to the DATA tab, and add a login service. Rename the service instance tologinService:

3. Create the following Before send mapping:

In this tutorial, no Success mapping is needed.

4. Add the following events to see whether the login failed or succeeded:

loginService > Success > Run JavaScript > add the following script:

alert(“You have successfully logged in”);

loginService > Error > Run JavaScript >add the following script:

try {
alert(JSON.parse(jqXHR.responseText).description);
} catch (e) {
alert(‘Login failed’);
}

5. Switch to the DESIGN tab, and add the following events:

loginButton > Click > Invoke service > loginServiceregisterButton > Click > Navigate to page > registerScreenrecoverPasswordButton > Click > Navigate to page > recoverScreen

The loginScreen is ready.

The database services import doesn’t include user-defined fields as email orsecret_code. So they must be added manually.

6. OpenDatabase_signup_service (it’s listed under the Servicesfolder) and go to the Requesttab. Add the email parameter:

7. Open registerScreen, switch to the DATA tab, and add the sign-up service. Rename the service instance to signupService:

8. Create the following Before send mapping:

9. Add the following events to see whether registration failed or succeeded:

signupService > Success > Run JavaScript > add the following script:

alert(“You have successfully registered”);

signupService > Error > Run JavaScript > add the following script:

try {
alert(JSON.parse(jqXHR.responseText).description);
} catch (e) {
alert(‘Registration failed’);
}

10. Switch to the DESIGN tab, and add the following event on button click:

registerButton > Click > Run JavaScript > add the script; check that all values are correct and then invoke the service:

if ($.trim(Appery(“loginInput”).val()) != “”) {
if (Appery(“passwordInput”).val() == Appery(“confirmPasswordInput”).val()) {
if ($.trim(Appery(“emailInput”).val()) != “”) {
if (!document.getElementsByName(“emailInput”)[0].checkValidity || document.getElementsByName(“emailInput”)[0].checkValidity()) {
signupService.execute({});
} else {
alert(“Please enter a valid email”);
}
} else {
alert(“Please specify your email”);
}
} else {
alert(“Passwords don’t match!”);
}
} else {
alert(“Please enter your login”);
}

Before adding services to the recoverScreen, you need to create server scripts.

Creating server script to send password recovery code

1. Go to https://appery.io/servercode/, and create a new script. Name it SendEmail.

2. Add the following code (it generates the secret code and sends it to the user’s email):

var responseBody = {},
requestParams = {},
paramKeys = request.keys();
for (var key = 0; key < paramKeys.length; key++) {
requestParams[paramKeys[key]] = request.get(paramKeys[key]);
}
// Declare database ID and Master key
var dbId = “Database ID”;
var masterKey = “Master Key”;
// Get username from request parameters
var username = requestParams[‘username’];
// Generate a random secret code
var secretCode = Math.random().toString(36).slice(-12);
console.log(secretCode);
try {
// Get the user with a given username from the database
var XHRResponse = XHR.send(“GET”, “https://api.appery.io/rest/1/db/users/”, {
“headers”: {
“X-Appery-Database-Id”: dbId,
“X-Appery-Master-Key”: masterKey
},
“parameters”: {
“where”: ‘{“username”: “‘ + username + ‘”}’
}
});
// If the user exists update user’s secret code with the generated value
if (XHRResponse.body.length) {
var userId = XHRResponse.body[0][“_id”];
var email = XHRResponse.body[0][“email”];
var XHRResponse = XHR.send(“PUT”, “https://api.appery.io/rest/1/db/users/” + userId, {
“headers”: {
“X-Appery-Database-Id”: dbId,
“X-Appery-Master-Key”: masterKey,
“Content-Type”: “application/json”
},
“body”: {
“secret_code”: secretCode
}
});
// If secret code was successfully updated, send email with the code to user with Sendgrid API
if (XHRResponse.status == 200 && email) {
var XHRResponse = XHR.send(“POST”, “https://api.sendgrid.com/api/mail.send.json”, {
“parameters”: {
“api_user”: “Sendgrid username”,
“api_key”: “Sendgrid password”,
“to”: email,
“toname”: “”,
“subject”: “Password Recovery”,
“text”: “Your recovery code is: ” + secretCode + “. Copy and this code into the field provided.”,
“from”: “admin@company.com”
}
});
// If the email was successfully sent, inform the user about it
if (XHRResponse.status == 200) {
responseBody.message = “An email with the recovery code has been sent to you. Please follow the instructions to reset your password”;
} else {
responseBody.message = “An error occured while sending the email”;
}
} else {
responseBody.message = “Database error”;
}
} else {
responseBody.message = “User not found”;
}
response.success(responseBody, “application/json”);
} catch (e) {
response.success(“message: ” + e.message + “\ncode: ” + e.code); //If something goes wrong, error message appears
}

In this script, you should enter the following custom data:

Database ID – replace with your Database ID.Master Key – replace with your Master Key.Sendgrid username,Sendgrid password – replace with your SendGrid credentials.admin@company.com – replace with your email.

Now, you need to create one more script to recover the password in the database.

Creating server script to change password

1. Create a new script, and name it ResetPassword. Add the following code (it checks the entered secret code and updates the password):

var responseBody = {},
requestParams = {},
paramKeys = request.keys();
for (var key = 0; key < paramKeys.length; key++) {
requestParams[paramKeys[key]] = request.get(paramKeys[key]);
}
// Declare database ID and Master key
var dbId = “”;
var masterKey = “”;
// Get username, new password and secret code from request parameters
var username = requestParams[‘username’];
var newPassword = requestParams[‘newPassword’];
var secretCode = requestParams[‘secretCode’];
try {
// Get the user with a given username from the database
var XHRResponse = XHR.send(“GET”, “https://api.appery.io/rest/1/db/users/”, {
“headers”: {
“X-Appery-Database-Id”: dbId,
“X-Appery-Master-Key”: masterKey
},
“parameters”: {
“where”: ‘{“username”: “‘ + username + ‘”}’
}
});
// If the user exists, get his email, id and secret code from response
if (XHRResponse.body.length) {
var email = XHRResponse.body[0][“email”];
var userId = XHRResponse.body[0][“_id”];
var secretCodeDB = XHRResponse.body[0][“secret_code”];
// If the secret code from the database matches the secret code received from user,
// update the password with the new value
if (secretCode == secretCodeDB) {
// If new password is not blank
if (newPassword != ”) {
var XHRResponse = XHR.send(“PUT”, “https://api.appery.io/rest/1/db/users/” + userId, {
“headers”: {
“X-Appery-Database-Id”: dbId,
“X-Appery-Master-Key”: masterKey,
“Content-Type”: “application/json”
},
// Update user’s password with a new value
“body”: {
“password”: newPassword
}
});
// If the password update was successful, send an email to the user
if (XHRResponse.status == 200) {
var XHRResponse = XHR.send(“POST”, “https://api.sendgrid.com/api/mail.send.json”, {
“parameters”: {
“api_user”: “Sendgrid username”,
“api_key”: “Sendgrid password”,
“to”: email,
“toname”: “”,
“subject”: “Password Recovery Complete”,
“text”: “You have successfully changed your password”,
“from”: “admin@company.com”
}
});
if (XHRResponse.status == 200) {
// If the email was successfully sent, inform the user about it
responseBody.message = “Your pasword was successfully changed. A confirmation email has been sent to you”;
} else {
// Email was not sent, but the password reset was still successful
responseBody.message = “Your pasword was successfully changed”;
}
} else {
responseBody.message = “Database error”;
}
}
else {
responseBody.message = “New password is not provided”;
}
}
else {
responseBody.message = “Wrong secret code”;
}
} else {
responseBody.message = “User not found”;
}
response.success(responseBody, “application/json”);
} catch (e) {
response.success(“message: ” + e.message + “\ncode: ” + e.code); //If something goes wrong error message will appear
}

Where:

Database ID – your Database ID.Master Key – your Master Key.Sendgrid username,Sendgrid password – your SendGrid credentials.admin@company.com – your email.

Creating REST services to invoke server code scripts

sendEmail_service

1. Inside the app builder, select CREATE NEW > Service. Create a REST service, name it sendEmail_service. Define the following settings:

2. To get the URL value, go toServer Code >  SendEmail script > Script tab, and copy the Execute URL value:

3. Create only one requestparameter – username:

4. There’s only one responseparameter: message. The service response can be automatically created from the Test tab:


resetPassword_service

1. Select CREATE NEW > Service. Create a RESTservice, and name itresetPassword_service. Define the following settings:

2. To get the URL value, go toServer Code >  ResetPassword script > Script tab, and copy theExecute URL value:

3. There are three requestparameters: username, secretCode, and newPassword:

4. There may be one response in this service, message, but since we’re not going to use it, disregard it.

Invoking server code on the page

1. Open the recoverScreen, switch to the DATA tab, and two services are created. Name themsendEmailService andresetPasswordService:

2. In the sendEmailService,create the following Before send mapping:

3. Click “Save and return”.

4. In the resetPasswordService, create the following Before sendmapping:


In both services, no response mapping is needed.

Switch to the DESIGN tab, and add the following button click events:

getCodeButton > Click > Invoke service > sendEmailService.changePasswordButton > Click > Run JavaScript and add the following script:

if (Appery(“newPasswordInput”).val() == Appery(“confirmNewPasswordInput”).val()) {
resetPasswordService.execute({});
}

Switch to the DATA tab, and add events for successful executing services:

sendEmailService > Success > Run JavaScript  and add the following script:
alert(data.message);
resetPasswordService > Success > Run JavaScript and add the following script:
alert(data.message);
Now the app is ready and you can test it.

Testing the app

When testing the app, you’ll first see the login page:

If you have users in your database, enter the username and password (or wrong password) to check if the app works correctly.

You can also enter the wrong username:

To sign up, click “Register”:

If you want to change the password, on the login page, click “Recover password” and enter the username:

Enter the secret code from the email you received, and the new password:



Anonymous

April 13, 2016 at 1:41 pm | Reply

Create new app from example
https://devcenter.appery.io/documentation/jqm/create-new-app-from-examples/#Login_Registration_Example

Leave a Comment

HuMaN BeInG? *Time limit is exhausted. Please reload CAPTCHA.  −  1  =  eight

Select an image for your comment (GIF, PNG, JPG, JPEG):

 Notify me of follow-up comments by email.

 Notify me of new posts by email.

 Notify me when new comments are added.

Copyright © 2017 · GeneratePress ·WordPress

Saturday, March 11, 2017

The Mother of All Scandals: Part 1

This crisis is 10x bigger than 1MDB or Bank Negara Forex scandal combined. It is fast reaching to RM trillion. The culprit that contributing to the losses are not only politician, but the poor and the rich, the ignorant and the intellectuals, the atheist and the religious.



1. In year 2017 alone, RM25 billion were allocated for Ministry of Health. RM4 billion went to Pharmaceuticals Industry. It is estimated that 90% is meant for Opex (Maintaining Health, Salary, etc) and remaining 10% for Capex (Development of New Hospitals or Major Equipment).

2. Based on Non Communicable Disease (NCD) death statistics, NCD treatment cost is estimated at 73% for Malaysia, which is equivalent to roughly RM18 billion. For example: cost for diabetes treatment is RM4 billion, Renal patient treatment RM1.6 billion. Cardiovascular related treatment cost will be easily at RM9 billion (based on 36% ratio).

3. This crisis is 10x bigger than 1MDB or Bank Negara Forex scandal combined. It is fast reaching to RM trillion. Government coffer's is depleting.

4. The culprit that contributing to the losses are not only politician, but the poor and the rich, the ignorant and the intellectuals, the atheist and the religious.

5. A concerted effort is required to bring peoples backs to their self consciousness that surplus energy intake had caused tremendous losses to the country and to their very own longevity.


High Energy Intake but Low Energy Usage


6. Surplus energy is the excess energy being stored in the body. The result is overweight and obesity. This baggage cause us many side effects in the long run. It is like a car that being drove around with extra fuel tank, but the fuel was never used till death. All the mounting, suspension, tyres, mileage, brake pads etc are worn out quickly.

7. Most of us consume energy more than what is required. As a consequence, excess energy were stored and piled up in our body as fat and toxic excess.

8. This stored energy keep on added daily, caused obesity and finally resulting in various NCDs (Non-Communicable Diseases).

9. Economic costs of energy excess and NCDs such as diabetes, renal failure and cardiovascular disease is tremendous to the local economy.

10. It is everyone responsibility to ensure that public money (baitul mal) were not utilized for maintaining wrong personal lifestyle or to finance personal hospitalization cost for disease which could be averted in the first place.

Part 2 >>