Wednesday 7 January 2015

Uncaught TypeError-undefined is not a function



Uncaught TypeError: undefined is not a functionUncaught TypeError: undefined is not a function in datepicker






This error takes my 2 hours today I was developing an asp.net application and I never gone through this error before First time i got this error and it shuffles me for two big hours

You will get number of solutions over forums
But sorry to say all these are workaround to get rid-off that error
very less tried to explain why this error came and what is meaning of this error .

Today after spending my 2 hours on this simple error i decided to write something about solution to this error

CAUSE OF ERROR :Uncaught TypeError: undefined is not a function


This error clearly means this is some function that is undefined in the class from which we are accessing it

Like in my case this error was coming at this line :-

$( "#datepicker" ).datepicker();
or
jquery( "#datepicker" ).datepicker();

The main reason behind this error is Jquery Multiple versions calling . If you are using jquery and you have refrenced multiple versions of jquery like Jquery1.10.2 and Jquery 2.0.1 in same file then mostly this error will come at runtime at that page .

The reason behind why it says Undefined TypeError because when multiple versions of jquery are called on same page then we are having two jquery script running and they are like -

1.  Jquery1_10_2
2.  Jquery2_0_1

and we are using only jquery or a '$' dollar symbol there and when browser is unable to find Jquery there then how can it find datepicker function or any other function that you are using at that time . This is main cause of error

Solution of Error : 

Uncaught TypeError: undefined is not a function

So let's talk about solutions to this error . I tried my best at 1:00 AM at Night to find solution to this error and then share it with my blog readers

Now we need to tell browser that we need to use specific version of juery only if we are using multiple versions of jquery on same page

Otherwise simple solution would be to remove the second refrenced version of jquery if possible

so in order to tell broser that we are using specific version of jquery we need to make some changes to our code

Like in my case i am using following code to put jquery datepicker on my website and i am using
jquery1_11_0 version of jquery
So here is my code i have replaced '$' or jquery with jquery1_11_0 and that's it the problem is solved

CODE -
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>

<script type="text/javascript">
    var jQuery_1_11_0 = $.noConflict(true);
    jQuery_1_11_0(document).ready(function () {
        jQuery_1_11_0('#datepicker').datepicker();

    })
</script>

Friday 2 January 2015

Nopcommerce Developer Guide


Internship - Day 1


Today was first day of my internship Period of 6 months . I am very happy to start my internship with Abax Technologies . Abax technologies is a recognized IT company Situated in Noida . It deals with Desktop , web and Mobile application development and providing solutions to market .

Mr. Rohit Jain is CEO of Company and I am doing Internship under their guidance .

Now came to work -- On 2nd January - 8:23 am Rohit Sir posted my first task on skype . My first task was first to learn more about Nopcommerce , Its Architecture , Plugin development , Module Development , Theme development and widget development .

First i need to download the source code for Nopcommerce form Nopcommerce office webiste then using that source code to compile it , set up its database then run a demo site in nopcommerce .

After setup the demo site for nopcommerce it started exploring its source code architecture and learn more about it from its developer's documentation

I have previously done a ecommerce website in Nopcommerce but at that time i used Nopcommerce 1.9 version that was asp.net version of nopcommerce Now i am going to use Nopcommerce 3.2 and this version is really cool . It is MVC version of nopcommerce using Linq queries instead of using sql and using Razor view engines and more flexibility . Actually I liked this version .

Important Links that i have studied and explored today -

Link for Nopcommerce Developer's Documentation
Nopcommerce Developer Documentation



Nopcommerce uses code first approach for each and every development component in nopcommerce so i decided to first give a look at code first approach to revise my concepts about codefirst approach

Code First Approach Documentation MVC


After Reading about code first approach of Nopcommerce I reached a Nerd Dinner app that is MVC app that uses code first approch for MVC application development
Nerd Dinner MVC App with Code First Approach

So that was it for the day i learned number of things today

Today I have explored following Modules -


1. Nopcommerce Installation v3.20 (mvc)
2. Explored Nopcommerce Developers Documentation
3. Exploring Nopcommerce Architecture
4. Explored Nopcommerce Theme CUstomization and Creating Own Theme
5. Exploring Plugin Development Documentation
     -- Created simple hello world Plugin

Next I will explore create plugins with database access and various nopcommerce inbuilt modules

Monday 29 December 2014

Jan Creater of Whatsapp

From Welfare to WhatsApp

Jan ( co-founder whatsapp) , who turns 38 this year, was just a teenager when he emigrated to the U.S. from a small village outside Kiev, Ukraine. Life in rural Kiev, a city that is currently rife with political tension and mass protests, was not easy. Jan's home had no hot water, and his parents refused to use the phone, which was tapped by the government. Once in the U.S., he taught himself computer networking by reading manuals bought from a used bookstore.
In 1997, he met his future WhatsApp cofounder, Brian, who convinced Jan to join Yahoo! even though he was still in college. Jan became an infrastructure engineer at Yahoo! and dropped out of San Jose State University. The two still describe themselves as "two guys who spent combined 20 years doing geeky stuff at Yahoo! Inc. before starting WhatsApp Inc." on the company's About page.
The Forbes piece includes a photo of Jan signing the billion-dollar Facebook deal on the doors of his old welfare office in Mountain View, Calif.—a perfect full-circle summation of his rags-to-riches journey.

whatsapp



A Company With A Unique Vision




WhatsApp had a completely refreshing outlook on messaging between smartphones. Privacy was Jan's priority, first and foremost. The service has remained largely the same since 2009, with just a few more bells and whistles in its latest incarnation.
A user does not have to submit information like his or her name, gender, address, or age—just a phone number. No fancy username is required for WhatsApp; users log in with a 10-digit number. WhatsApp borrowed elements from instant messaging like status updates and "read" receipts (long before iMessage incorporated that feature).
Jan was interested in disrupting the way cell phone carriers nickeled-and-dimed customers for text messaging, which was especially useful for those looking to connect with loved ones overseas. The app quickly built a following in Europe and other international communities. By early 2011, WhatsApp was an App Store superstar, reaching the top 20, and has remained in the top 10 free apps ever since.

story of creater of whatsapp



REJECTED BY FACEBOOK
REJECTED BY TWITTER
CREATED WHATsAPP

Brian Acton ....A Person that is Vice President of Engineering At Yahoo . Left the job then Applied for Facebook Rejected there then started working on world's best messaging app


A FAILURE NOT A DEFEAT

This Amazing pic above tells you everything . The person in the pic is 'BRIAN ACTON' The Creater of WhatsApp ( The Best cross-platform Mobile Messaging App ) .

It is the destiny that a person that applied for job in Facebook is rejected in 2009 and The same person with his team and with an awesome Idea Sold WhatsApp To Facebook for jaw-dropping deal of $19 billion

It clearly states Intelligence can never be stopped . IF you can think then that's all that you need to have .......




So from the pic all is clerified . Yes two months before Rejection from Facebook , Brian Acton The Creater of WhatsApp was Rejected from Twitter . That means Failures and Failures don't mean Defeat .

But the app's success did not come at a small price. Founders Jan Koum and Brian Acton are no strangers to failure, and their incredible journey speaks volumes about the value of tenacity and vision. Today, Jan and Brian's app is now the most valuable messaging platform on the planet

Also Read -
whatsapp -- A Company With A Unique Vision

Jan - Creater of Whatsapp

Don't Forget to Subscribe and Share Us.