Wednesday, 9 November 2016

Sonam Kapoor Takes A Dig At Deepika Padukone

Bollywood celebrates 9 years of Deepika Padukone, Ranbir Kapoor and Sonam Kapoor in the film industry. 9 years ago, today, the trio made their Bollywood debut with Sonam and Ranbir together in Saawariya and Deepika Padukone opposite Shah Rukh Khan in Om Shanti Om. Their careers soared forward from there with many ups and some downs and all three have individually made a significant mark in the Indian film industry.


Now Sonam is attempting to join the ranks of Deepika Padukone and Priyanka Chopra, and trying her luck with Hollywood. A report on reports that Sonam has allegedly signed up with an agency in Los Angeles and is excitedly awaiting offers from the west. The report goes on to state that when Sonam was questioned about this move, she replied, “If there is something that excites me, and if there is a good opportunity, then why not? I am in Los Angeles, to gauge at the possibilities. I am not going to hide it (trying to bag a film in the West) from anybody, and then suddenly announce that I have signed a (Hollywood) film. I am trying my best to sign good films. I am doing the same in Mumbai as well. But I have to see what I enjoy doing, and who I can work with or what I can work on.” Meow! We sense a cat-fight in the works here.


Sonam is obviously taking a jab at our dear Dips with her catty statement, "I am not going to hide it (trying to bag a film in the West) from anybody, and then suddenly announce that I have signed a (Hollywood) film. I am trying my best to sign good films" referring to how Deepika Padukone was completely mum on the topic of her debut in Hollywood, during her film, xXx: The Return of Xander Cage's intial days. Its only much later that she actually confirmed the news.


Sonam has never been one to shy away from being open, or retorting with unneccessary crass, which has landed her inumerous trouble. And we can't help loving her for her bluntness.


http://www.epaperindia.in/2016/11/sonam-kapoor-takes-dig-deepika-padukone/
#CATFIGHT, #Deepika_Padukone, #Sonam_Kapoor

First look of ‘Badrinath Ki Dulhania’ depicts Varun Dhawan and Alia Bhatt in a fun chemistry!

The makers of ‘Badrinath Ki Dulhania‘ have unveiled the first look of the movie. The first look has a compilation of four images from #SingaporeDiaries where you see the fun chemistry between Varun Dhawan and Alia Bhatt.


Check out the first look pictures of the movie here:


First look of 'Badrinath Ki Dulhania'


First look of 'Badrinath Ki Dulhania'


First look of 'Badrinath Ki Dulhania'


First look of 'Badrinath Ki Dulhania'


http://www.epaperindia.in/2016/11/first-look-badrinath-ki-dulhania-depicts-varun-dhawan-alia-bhatt-fun-chemistry/
#Featured, #Varun_Dhawan, #Alia_Bhatt, #Badrinath_Ki_Dulhania

Data Serialization Comparison: JSON, YAML, BSON, MessagePack

JSON is the de facto standard for data exchange on the web, but it has its drawbacks, and there are other formats that may be more suitable for certain scenarios. I’ll compare the pros and cons of the alternatives, including ease of use and performance


Note: I won’t cover implementation details here, but if you’re a Ruby programmer, check out this article, where Dhaivat writes about implementing some serialization formats in Ruby.



What Is Data Serialization


According to Wikipedia, serialization is:


the process of translating data structures or object state into a format that can be stored (for example, in a file or memory buffer, or transmitted across a network connection link) and reconstructed later in the same or another computer environment.


Let’s say you want to collect certain data about a group of people — name, last name, nickname, date of birth, instruments they play. You could easily set a spreadsheet, define some columns, and make every row an entry. You could go just a little further, define that the date of birth column must be a number, and that the instruments columns could be a list of options. It’d look like this:


















namelast namedobnicknameinstruments
WilliamBailey1962Axl Rosevocals, piano
SaulHudson1965Slashguitar

More or less, what you did there was to define a data structure; and you’ll do just fine if you only need this on a spreadsheet format. The problem is that, if you ever want to exchange this information with a database or a website, the mechanics by which these data structures are implemented on these other platforms — even if the underlying semantics are overall the same — will be dramatically different. You can’t just plug-n-play a spreadsheet into a web application, unless the application has been specifically designed for it. And you can’t transfer that info from the website to the database unless you have some sort of export tool or gateway for it.


Let’s assume that our website already has these data structures implemented in its internal logic, and that it just cannot deal with a spreadsheet format. In order to solve these problems, you can translate these data structures into a format that can be easily shared across different applications, architectures, or what have you: you serialize them. And by doing so, you ensure not only that you can transfer this data across platforms, but that they can be reconstructed in the reverse process called deserialization. Furthermore, if exchanged back from the website to the spreadsheet, you’ll get a semantically identical clone of the original object — that is, a row that looks exactly the same as the one you originally sent.


In short: serializing data is finding some sort of universal format that can be easily shared across different applications.



The Formats


JSON


JSON logoJSON (JavaScript Object Notation) is a lightweight data-interchange format. It’s easy for humans to read and write; it’s easy for machines to parse and generate.


JSON is the most widespread format for data serialization, and it has the following features:



  • (Mostly) human readable code: even if the code has been obscured or minified, you can always indent it with tools such as JSONLint and make it readable again.

  • Very simple and straightforward specification: a summary of the whole spec fits on a single page (as displayed on the JSON site).

  • Widespread support: not only does every programming language or IDE come with JSON support, but also many web services APIs offer JSON as a means of data interchange.

  • As a subset of JavaScript, it supports the following JavaScript data types:
    • string

    • number

    • object

    • array

    • true and false

    • null


This is how our previous spreadsheet would look, after being serialized in JSON:



[

"name": "William",
"last name": "Bailey",
"dob": 1962,
"nickname": "Axl Rose",
"instruments": [
"vocals",
"piano"
]
,

"name": "Saul",
"last name": "Hudson",
"dob": 1965,
"nickname": "Slash",
"instruments": [
"guitar"
]

]

BSON


BSON logoBSON, short for Bin­ary JSON, is a bin­ary-en­coded seri­al­iz­a­tion of JSON-like doc­u­ments. … It also con­tains ex­ten­sions that al­low rep­res­ent­a­tion of data types that are not part of the JSON spec.


JSON is a plain text format, and while binary data can be encoded in text, this has certain limitations and can make JSON files very big. BSON comes in to deal with these problems.


It has the following features:



  • convenient storage of binary information: better suitable for exchanging images and attachments

  • designed for fast in-memory manipulation

  • simple specification: like JSON, BSON has a very short and simple spec

  • primary data rep­res­ent­a­tion for Mon­goDB: BSON is de­signed to be tra­versed eas­ily

  • extra data types:
    • double (64-bit IEEE 754 floating point number)

    • date (integer number of milliseconds since the Unix epoch)

    • byte array (binary data)

    • BSON object and BSON array

    • JavaScript code

    • MD5 binary data

    • regular expressions


MessagePack


MessagePackIt’s like JSON. But fast and small.


MessagePack (also msgpack) is another binary format for serialization. Not as well known as BSON, but it’s worth having a look at.


Among its features:



  • designed for efficient transmission over the wire

  • better JSON-compatibility than BSON: as explained by Sadayuki Furuhashi in this Stack Overflow post

  • smaller than BSON: is has a smaller overhead than BSON, and can serialize smaller objects most of the time

  • type checking: it supports static-typing

  • streaming API: support for streaming deserializers, which is useful for network communication.

YAML


YAML: YAML Ain’t Markup Language.
What It Is: YAML is a human friendly data serialization standard for all programming languages.


Back to plaintext formats, YAML is an alternative to JSON:



  • (truly) human readable code: YAML is so readable that even its front-page content is displayed in YAML to make this point

  • compact code: whitespace indentation is used to denote structure, no need for quotes nor brackets

  • syntax for relational data: to allow internal references with anchors ( &) and aliases (*)

  • especially suited for viewing/editing of data structures: such as configuration files, dumping during debugging, and document headers

  • a rich set of language independent types:
    • collections:
      • unordered set of key (!!map)

      • ordered sequence of key (!!omap)

      • ordered sequence of key (!!pairs)

      • unordered set of non-equal values (!!set)

      • sequence of arbitrary values (!!seq)


    • scalar types:
      • null values (~, null)

      • decimals (1234), hexadecimal (0x4D2) and octal (02333) integers

      • fixed (1_230.15) and exponential (12.3015e+02) floats

      • infinity (.inf, -.Inf) and not-a-number (.NAN)

      • true (Y, true, Yes, ON) and false (n, FALSE, No, off)

      • binary (!!binary) with base64 encoding

      • timestamps (!!timestamp).



This is how our little spreadsheet looks when serialized in YAML:



- name: William
last name: Bailey
dob: 1962
nickname: Axl Rose
instruments:
- vocals
- piano

- name: Saul
last name: Hudson
dob: 1965
nickname: Slash
instruments:
- guitar

Other Formats


There are a number of other formats for serialization, such as Protocol Buffers (protobuf, also binary), that I’ve (in a rather discretionary manner) left out. If you just want to know every possible format, go and have a look at Wikipedia’s comparison of data serialization formats.



… HDF5?


HDF5 logo


We’ll get a bit off-topic here, but just slightly. The Hierarchical Data Format version 5 (HDF5) isn’t really for serialization, but rather for storage, and it’s taking data science and other industries by storm. It’s a very fast and versatile format that can be used not only to store a number of data structures, but even as a replacement for relational databases.


To conclude this intermission, let’s just mention that if you’re into binary formats such as BSON and MessagePack for storing/exchanging big volumes of information, you may very well want to have a look at HDF5.



Benchmarks and Comparisons


A pattern that emerges is that BSON can be more expensive than JSON when serializing, but faster when deserializing; and MessagePack is faster than both on any operation. Also, because of its overhead and in spite of being a binary format, BSON files can occasionally be bigger than JSON ones when storing non-binary data. Some links to have a look at:



  • Serialization Performance comparison (C#/.NET) by Maxim Novak on M@X on DEV.

  • Protocol Buffers, Avro, Thrift & MessagePack by Ilya Grigorik on ivita.com.

  • Binary Serialization Tour Guide by Karlin Fox in Atomic Object.

  • Efficiently Store Pandas DataFrames by Matthew Rocklin.

  • MessagePack vs JSON vs BSON by Wesley Tanaka.

It’s also worth noting that the performance could change depending on the serializer and the parser you choose, even for the same format.



Remarks and Commentary


As silly as it may sound, BSON has the advantage of the name: people automatically link the format developed by MongoDB (BSON) to the standard (JSON), which are not associated one to another. So when searching for a binary alternative for JSON, you may also consider other options.


In fact, MessagePack seems to beat BSON in every possible aspect: it’s faster, smaller, and it’s even more compatible to JSON that BSON is. (In fact, if you’re already working with JSON, MessagePack is almost a drop-in optimization.) Maybe as a “reporter” I should be more balanced, but as a developer, this is a no brainier.


Still, BSON is MongoDB’s format to store and represent data, so if you’re working with this NoSQL DB, that’s a reason to stick with it.


Of course, serialization is not all about storing binary data. Admittedly, JSON has a different goal in mind — that of being “human readable”. But it doesn’t take much effort to notice that YAML does a significantly better job at it.


However, the YAML spec is awfully big, specially when compared to that of JSON’s. But arguably, it must be, as it comes with more data types and features.


On the other hand, in can’t be ignored that the simplicity of JSON played a key role in its adoption over other serialization formats. It relies on an already existent widespread language, JavaScript, and if you know or are exposed to JS (which if you are in the web development industry, you are), you already know JSON.


Then why not adopt YAML, like now? In many cases it isn’t that easy. JSON still has a place for web APIs, as you can easily embed JSON code in HTTP requests (both for GET, as in URLs, and POST, as in sending a form): the format will let you know if the transmission was suddenly cut, as the code will automatically render invalid, which may not be the case with YAML and other competing plaintext formats. Also, you’ll still need to interact at one point or another with JSON-based APIs and legacy code, and it’s always a pain maintaining two pieces of code (JSON and YAML methods) for the same purpose (data serialization).


But then again, these are partly the same arguments that push us backwards and prevent us from adopting newer and more efficient technologies (e.g: like Python 3 over Python 2). And I thought for a minute that we, programmers and entrepreneurs, were innovators, aren’t we?


http://www.epaperindia.in/2016/11/data-serialization-comparison-json-yaml-bson-messagepack/
#Bson, #Data_Exchange, #Data_Serialization, #Json, #MessagePack, #Yaml

Seven Food Hacks To Stay Healthy On The Go

Every time you plan that fun filled road trip or a vacation to a foreign destination, you have a little fear deep down about how you would come back and stand on that weighing machine and go ‘oh my god’. The efforts that you had taken all this while, working out, following all forms of diet, to lose a single kilo of weight, could go waste in just ten days of vacation. Healthy eating may go right out of the window during holidays.


You always wonder why it's tough to shed pounds during vacation, even though you are more active than ever. Often people say that returning home from any trip is like taking five giant steps backwards on their health and having to start all over again. The whole idea bums you out and puts you under constant worry about missing a great night out on your travel itinerary. Being out of your natural surroundings can throw good intentions overboard. While controlling temptations is very difficult, it also can be a challenge to spot options that aren't loaded with calories, fat, and sodium.

Fitness expert Steve Kamb in his book Level Up Your Life says, “We should put a decent plan in place so that we cannot go overboard while travelling and therefore skip drastic measures when we get back home, something that’s consistent and sustainable.” He adds, “What we’re aiming for is food that keeps us satiated and on target, mostly vegetables, some form of protein (be it from animal sources or legumes), and then some fruits and nuts — occasionally a bit of rice or potatoes, and minimal bread or pasta or liquid calories. You’ve probably heard of this type of diet referred to as the Paleo diet or eating like a caveman. It’s the ultimate time-tested nutrition strategy, as you’re eating natural foods that have existed for millennia. Better yet, these foods can generally be found anywhere on the planet, and it keeps things simple, so you don’t need to worry about counting calories or weighing your food. The focus should be on quality food from natural sources.” Be a smart adventurer on your next vacation with our travel tips for eating and staying healthy on the go.



http://www.epaperindia.in/2016/11/seven-food-hacks-stay-healthy-go/
#Eating_Healthy, #Holidays, #Road_Trip, #Staying_Healthy, #VACATION

Asia Map Illustrations by Jing Zhang

Here comes another fine project created by one of our most featured illustrators. Jing Zhang spent four exhilarating months this year traveling the world. Inspired by all the different impressions, the talented illustrator has decided to work on this personal project. Starting with Asia, Jing Zhang has created numerous map illustrations of different destinations. Each illustration conveys the typical color palette and personality of the respective location. Every map was created in a modern, flat style. The series includes cities, towns, districts, islands, and provinces such as Taipei, Bali, Bangkok, Guangzhou, Hanoi, Nagiso, Pingxi, Seoul, and Singapore. Just check it out below. More continents will follow.


For more of Jing Zhang’s creative work, please have a look at our previous features or visit her portfolio on Behance.



Bali


Bangkok
Guangzhou
Hanoi
Nagiso
Pingxi District
\
Seoul
Singapore

http://www.epaperindia.in/2016/11/asia-map-illustrations-jing-zhang/
#Asia_Map, #Illustrations, #Jing_Zhang

Tuesday, 8 November 2016

Woah! Kareena Kapoor Khan and Sonam Kapoor to team up for ‘Koffee With Karan 5’

The guest list of Karan Johar’s chat show ‘Koffee With Karan 5‘ is getting interesting by the day. After the first episode starring Shah Rukh Khan and Alia Bhatt, the other guests to appear on the show are Akshay Kumar-Twinkle Khanna, Aditya Roy Kapur-Parineeti Chopra, Farah Khan-Sania Mirza.


Now, the latest buzz is that ‘Veere Di Wedding’ actresses Kareena Kapoor Khan and Sonam Kapoor will team up for the show. In fact, sources reveal that both the actresses have already shot for the episode. If this is indeed true, then we are loving how KJo has opted for fresh pairings. Just imagine two actresses who are quite vocal and are known to speak their hearts out together on the show.


‘Koffee With Karan 5’ airs every Sunday at 9 pm on Star World.


http://www.epaperindia.in/2016/11/woah-kareena-kapoor-khan-sonam-kapoor-team-koffee-karan-5/
#Featured, #Karan_Johar, #KAREENA_KAPOOR_KHAN, #Sonam_Kapoor, #Koffee_With_Karan_5

PM Narendra Modi Says Rs. 500 And Rs. 1,000 Notes Being Discontinued

PM Narendra Modi Says Rs 500 And Rs 1,000 Notes Being Discontinued
Click to Play
PM Modi says Rs. 500 and Rs. 1000 notes will be discontinued from midnight tonight
NEW DELHI:
HIGHLIGHTS
Old Rs. 500, Rs. 1000 notes illegal from midnight; new notes to be issued
Citizens have 50 days from Nov 10 to return notes at banks, post offices
Banks and ATMs closed to public on Wednesday
Prime Minister Narendra Modi, addressing the country tonight, announced that Rs. 500 and Rs. 1000 notes will not be used from midnight onwards. The Rs. 500 and Rs. 1000 notes must be deposited at post offices and banks by the end of December, the PM said, adding the move was essential to fight "the disease of black money."
Here are the highlights from his address:
Some important decisions and some serious issues to share.
When you elected this government in 2014, world was talking about India being shaky economically. But India is now an economic star - this is what IMF and World Bank are saying.
Sab ka sarkaar, sab ka vikas - governance and progress for all is our motto. We are focused on empowerment of the poor. A series of schemes we have introduced all aim at this. This is a government for our farmers.
Corruption and black money are diseases rooted in this country, they are obstacles to our success.
We are among fastest-growing economies, but we also rank so high in global corruption rankings.
Terror strikes at the innocent. Who funds these terrorists? Across the border, our enemy uses fake currency and dodgy funds to sponsor terror - this has been proven repeatedly.
Terror strikes at the innocent. Who funds these terrorists? Across the border, our enemy uses fake currency and dodgy funds to sponsor terror - this has been proven repeatedly.
Our measures to check black money are paying off. A voluntary disclosure scheme for undeclared money saw a good response. A Special Investigating Team is making progress to identify who has sent money abroad.
1.25 lakh crores of black money has been recovered.
We need to take a new solid step to fight black money. From now on, Rs. 500 and Rs. 1000 notes will not be used. Have 50 days to turn them into banks and post offices.
On November 9 and in some places on November 10, ATMs will not work.
Respite for people for the initial 72 hours, government hospitals will accept old Rs. 500 and 1000 notes till 11 November midnight.
Petrol pumps and retail outlets will have to keep every single entry of cash transaction with 500 and 1000 notes till November 11.
Crematoriums and cemeteries will also be allowed to transact 500 and 1000 notes till November 11.
There will be no change in any other form of currency exchange be it cheque, DD, payment via credit or debit cards etc.
Those unable to deposit Rs. 1000, Rs. 500 notes by December 30 for some reason, can change them till March 31, 2017 by furnishing ID proof
Notes of Rs. 2000 and Rs. 500 will be circulated soon, RBI has decided to limit the notes with higher value
http://www.epaperindia.in/2016/11/pm-narendra-modi-says-rs-500-rs-1000-notes-discontinued/
#1000Notes, #500Notes, #Narendramodi