Month: October 2015

How to Setup Environment For MongoDB


To install the MongoDB on windows, first doownload the latest release of MongoDB from http://www.mongodb.org/downloads Make sure you get correct version of MongoDB depending upon your windows version. To get your windows version open command prompt and execute following command

C:\>wmic os get osarchitecture
OSArchitecture
64-bit
C:\>

32-bit versions of MongoDB only support databases smaller than 2GB and suitable only for testing and evaluation purposes.

Now extract your downloaded file to c:\ drive or any other location. Make sure name of the extracted folder is mongodb-win32-i386-[version] or mongodb-win32-x86_64-[version]. Here [version] is the version of MongoDB download.

Now open command prompt and run the following command

C:\>move mongodb-win64-* mongodb
      1 dir(s) moved.
C:\>

In case you have extracted the mondodb at different location, then go to that path by using command cd FOLDER/DIR and now run the above given process.

MongoDB requires a data folder to store its files. The default location for the MongoDB data directory is c:\data\db. So you need to create this folder using the Command Prompt. Execute the following command sequence

C:\>md data
C:\md data\db

If you have install the MongoDB at different location, then you need to specify any alternate path for \data\db by setting the path dbpath in mongod.exe. For the same issue following commands

In command prompt navigate to the bin directory present into the mongodb installation folder. Suppose my installation folder is D:\set up\mongodb

C:\Users\XYZ>d:
D:\>cd "set up"
D:\set up>cd mongodb
D:\set up\mongodb>cd bin
D:\set up\mongodb\bin>mongod.exe --dbpath "d:\set up\mongodb\data"

This will show waiting for connections message on the console output indicates that the mongod.exe process is running successfully.

Now to run the mongodb you need to open another command prompt and issue the following command

D:\set up\mongodb\bin>mongo.exe
MongoDB shell version: 2.4.6
connecting to: test
>db.test.save( { a: 1 } )
>db.test.find()
{ "_id" : ObjectId(5879b0f65a56a454), "a" : 1 }
>

This will show that mongodb is installed and run successfully. Next time when you run mongodb you need to issue only commands

D:\set up\mongodb\bin>mongod.exe --dbpath "d:\set up\mongodb\data" 
D:\set up\mongodb\bin>mongo.exe

LG Announces Android 6.0 Marshmallow On G4


LG_G4_Android_MarshmallowLG has announced that Android 6.0 Marshmallow will now be available on LG G4. The new update will be available for download from the next week. However, this new update will be available only for users residing in Poland. However, America, Asia and Europe will soon follow with the new Android Marshmallow update for their LG G4. 

According to LG, the new update will bring some new and improved features on your phone. Some of the highlighted features are stated below:
  • Permission has been simplified with more control on the information application access.
  • Users will now have better silent and vibrating features, along with do not disturb mode, which all sounds.
  • Doze mode has also been improved.

Chris Yie, vice president and head of marketing communications for LG Mobile Communications Company, in their official blog states,

“By working closely with Google, LG has been able to bring Android 6.0 to the G4 ahead of any of our competitors.”

Event Types In jQuery


The following are cross platform and recommended event types which you can bind using JQuery −

Sr.No Event Type Description
1 blur Occurs when the element loses focus.
2 change Occurs when the element changes.
3 click Occurs when a mouse click.
4 dblclick Occurs when a mouse double-click.
5 error Occurs when there is an error in loading or unloading etc.
6 focus Occurs when the element gets focus.
7 keydown Occurs when key is pressed.
8 keypress Occurs when key is pressed and released.
9 keyup Occurs when key is released.
10 load Occurs when document is loaded.
11 mousedown Occurs when mouse button is pressed.
12 mouseenter Occurs when mouse enters in an element region.
13 mouseleave Occurs when mouse leaves an element region.
14 mousemove Occurs when mouse pointer moves.
15 mouseout Occurs when mouse pointer moves out of an element.
16 mouseover Occurs when mouse pointer moves over an element.
17 mouseup Occurs when mouse button is released.
18 resize Occurs when window is resized.
19 scroll Occurs when window is scrolled.
20 select Occurs when a text is selected.
21 submit Occurs when form is submitted.
22 unload Occurs when documents is unloaded.

Advantages Of MongoDB


mongodb-logo1

Any relational database has a typical schema design that shows number of tables and the relationship between these tables. While in MongoDB there is no concept of relationship

Advantages of MongoDB over RDBMS

  • Schema less : MongoDB is document database in which one collection holds different different documents. Number of fields, content and size of the document can be differ from one document to another.
  • Structure of a single object is clear
  • No complex joins
  • Deep query-ability. MongoDB supports dynamic queries on documents using a document-based query language that’s nearly as powerful as SQL
  • Tuning
  • Ease of scale-out: MongoDB is easy to scale
  • Conversion / mapping of application objects to database objects not needed
  • Uses internal memory for storing the (windowed) working set, enabling faster access of data

Why should use MongoDB

  • Document Oriented Storage : Data is stored in the form of JSON style documents
  • Index on any attribute
  • Replication & High Availability
  • Auto-Sharding
  • Rich Queries
  • Fast In-Place Updates
  • Professional Support By MongoDB

Where should use MongoDB?

  • Big Data
  • Content Management and Delivery
  • Mobile and Social Infrastructure
  • User Data Management
  • Data Hub

WCF Different Types Of Bindings In WCF


What Is Binding In WCF?

Binding describes how a client is going to communicate to WCF service. Binding is used as per client need. It supports different types of protocol to communicate with client and different types of encoding to transfer the data over the internet. So, basically binding is nothing but it is a way of communication between client and service as per client need.

Binding

  • Describes how a service communicates
  • Specifies which protocol to be used
  • Specifies the encoding method to format the message contents
  • Specifies the security requirements
  • Specifies the message exchange format
  • Specifies the message session mode

There are different types of bindings available in WCF.

Binding Names Transposrt Encoding Interoperable
BasicHttpBinding HTTP/HTTPS Text/MTOM YES
NetTcpBinding TCP Binary NO
NetPeerBinding P2P Binary NO
NetNamedPipeBinding IPC Binary NO
WSHttpBinding HTTP/HTTPS Text/MTOM YES
WSFederationHttpBinding HTTP/HTTPS Text/MTOM YES
WSDualHttpBinding HTTP Text/MTOM YES
NetMsmqBinding MSMQ Binary NO
MsmqIntegrationBinding MSMQ Binary YES

(more…)

Introduction to XAML


Overview

XAML2XAML is a little bit similar to the very popular markup language HTML. XAML is nothing but the EXtensible Markup Language XML. XML is also similar to HTML since both markup languages share some base common properties and tag.

The only major difference we can determine is that HTML is a structure based markup language whereas XML is more generic (you can easily use XML for nearly any development work depending on your requirements).

In the past decades developers have used XML for things like:

  • Storing application settings
  • Data transfer
  • Communication medium

For using XML in your development work, first define a schema for declaring the proper name elements and their corresponding related attributes.

XAML is nothing but a special usage of XML. XAML has something to do with defining a user interface in our development work interface. So in this fashion it seems very similar to HTML, but there is a big difference between both of these. XAML is actually used to create instances of classes and sets of values of the properties and their related part.

Advantages of XAML

All you can do in XAML can also be done in code. XAML ist just another way to create and initialize objects. You can use WPF without using XAML. It’s up to you if you want to declare it in XAML or write it in code. Declare your UI in XAML has some advantages:

  • XAML code is short and clear to read
  • Separation of designer code and logic
  • Graphical design tools like Expression Blend require XAML as source.
  • The separation of XAML and UI logic allows it to clearly separate the roles of designer and developer.

(more…)

Mozilla Assures To Drop NPAPI And Silverlight From Firefox In 2016


Mozilla_FirefoxToday, Mozilla announced to end support for NPAPI (Netscape Plugin Application Programming Interface) and Silverlight at the end of 2016.

The negative impact of NPAPI plugins on a browser’s security, speed, and stability, and the complexity of the code base is the actual reason.

Google Chrome 42 release ended its support in April and Microsoft also droppeded Silverlight with the launch of Edge in July this year.

Benjamin Smedberg, Firefox’s quality engineering manager stated via a blog post:

“As browsers and the web have grown, NPAPI has shown its age. Plugins are a source of performance problems, crashes and security incidents for web users. “

“Mozilla intends to remove support for most NPAPI plugins in Firefox by the end of 2016. Firefox began this process several years ago with manual plugin activation, allowing users to activate plugins only when they were necessary.”

“This decision mirrors actions by other modern browsers, such as Google Chrome and Microsoft Edge, which have already removed support for legacy plugins.”

Mozilla kept the state of Flash alive stating since Adobe Flash is still a common part of the Web experience for most users, its support will continue within Firefox as an exception to the general plugin policy.

Also, the collaboration of Mozilla and Adobe will continue for improving Flash experience on Firefox with stability, performance, and security.