Total Pageviews

Tuesday, July 18, 2017

Cannot set variable of undefined

https://stackoverflow.com/questions/38807643/error-uncaught-in-promise-typeerror-cannot-set-property-isadmin-of-null

when variable not set in function "then" block, this doesnt work, need to a copy of "this" reference with in the calling function.



down voteaccepted
Either you can use arrow function
firebase.database().ref('/userProfile/' + user.uid).once('value')
.then((snapshot) => {
or use
var self = this;

firebase.database().ref('/userProfile/' + user.uid).once('value')
.then(function(snapshot) {
   self.isAdmin = true;
otherwise this doesn't point to the current function when it's called.

Monday, July 17, 2017

promise-polyfill error while using Firebase in Angular


ERROR in ./~/firebase/app/shared_promise.js

Module not found: Error: Can't resolve 'promise-polyfill'

Solution: 
npm install promise-polyfill --save-exact

Friday, July 14, 2017

continuous integration | angular cli + firebase + travis ci

https://houssein.me/continuous-integration-angular-firebase-travisci

Angular project with gitHub

http://developer.telerik.com/featured/quick-angular-2-hosting-angular-cli-github-pages/

Tuesday, July 11, 2017

Udemy course videos download


CourtesyPankaj Barnwal, Quora ( https://www.quora.com/How-do-I-download-videos-from-Udemy)

How to Download your subscribed course videos from Udemy:

If you don't mind getting your hand dirty in coding, may i suggest you a python script 'python-dl' which is best to download videos from the mentioned course site.
Step-by-step Guide -
if you dont have pip installer, have it installed via following command-
  1. sudo apt install python-pip
Now download python script "python-dl" through pip install-
  1. sudo pip install udemy-dl
Below is the command to download entire udemy course using this script
  1. udemy-dl course-link
Next type your username & password and you will be good to go, or you can type them in the same sentence like this
  1. udemy-dl -u username -p password course link
Advance Usage - This is where it gets fun. if you want to download specific video from the list, use following command -
  1. udemy-dl -u username -p password --lecture-start lecture No where you want download to start --lecture-end end point
For Example -
  1. udemy-dl -u abcd@xyz.com -p HND$#$5 --lecture-start 52 --lecture-end 58 https://www.udemy.com/COURSE_NAME
Note - This script does not pull written docs but it works great for videos.


Wednesday, October 7, 2015

API centric devlopment

The shift in software design thinking from User Interface design to API first design.
The plethora of devices, Web, Thin clients, thick clients, varied mobile screens, smart watches, IOTs, touch screens- which produce and consume lot of data to/from the back-end systems, demands diversified User interfaces and user experiences, however the interaction with back system remains same.
Due to proliferation of devices, so the user interaction with the system, the only way to gain control is from API first design approach.  
Abstraction of API interface is critical to orchestrate the back-end interaction, which allows dynamic adoption of User offerings and allows UI developers think without worrying the back-end access mechanisms.
The Internet of Things (IOT)- really driving the paradigm shift and forces developers to think API way.
Amazon AWS, Google, Salesforce, Apple and any large enterprises are all API centric which are creating an echo system to expand their offerings, so their market, by opening APIs to developers. A Win-Win approach.
Larger legacy systems like banks, Insurance companies, Automobile companies what not , shall start API centric design thinking to get ready for the future or perish.
The consequences of failing to adapt to API centric development is huge from un-happy customers, large maintenance costs and outdated service offerings etc.
Mule helps to adapt API centric approach and transcend legacy systems or design new products on latest technology platform whether Cloud or on-premise with out-of-box offerings.
Mule is an open source ESB platform which has strong active developer support.

Friday, August 21, 2015

MAVEN with MULE- Any Point Studio

1. Download latest version of Maven from https://maven.apache.org/download.cgi
(just unzip maven in a folder- no other installation required)

2. Goto Window->preferences->AnyPointstudio->Maven settings
   - Add Maven path in Maven install home directory

3. Go to Window->preferences->Java->Installed JREs
     - JRE location - change to JDK path

Create sample Mule project and try running the app as Maven app.

Now the build process will download all dependent poms and jars, it takes a while

4. While downloading if encounter a problem of permission denied:
add Maven options in (Window->preferences->AnyPointstudio->Maven settings)

MAVEN_OPTS environment variable ad  "-Djava.net.preferIPv4Stack=true" (no quotes)