July 17, 2018

#LeetCode: Maximum consecutive one's

Let's say we want to find maximum consecutive one’s in a binary array.

Algorithm:
1). Maintain two counters current and max.
2). Start iterating the array, if 3.a). the current number is 1, we need to increment 'current'.
3). If the current number is 0, then we need perfom below checks:
3.a) If the 'current' is greater than 'max', we set 'current' in 'max'.
3.b). If max is greater than equal to half of array length, so we should return max as there is no point in checking the array further.
3.c). Set the 'current' as zero.
4). Return 'current' or 'max', which ever is higher.

July 12, 2018

BARC TV Ratings (Impressions)- Week 27, 2018


Top 10 Hindi GEC Channel
  1. Zee Anmol : 698822
  2. Zee TV : 614367
  3. Sony Pal : 552330
  4. Colors : 552010
  5. STAR Bharat : 545871
  6. STAR Utsav : 508738
  7. STAR Plus : 487574
  8. Rishtey : 445400
  9. SONY SAB : 401353
  10. Sony Entertainment Television : 362280

Netflix's Sacred Games needs stronger villains, feels James Bond baddie Alex Reece

Last week, amid a lot of hype and hoopla, Netflix released its first Indian original series Sacred Games which met with a relatively positive response, critically as well as with the masses. Starring Saif Ali Khan as a cop and Nawazuddin Siddiqui as a don, it has the police officer stumbling upon clues given by the gangster, and going on a wild goose chase behind a foreign white guy smuggling ammunition into Mumbai.

July 10, 2018

Sunny Deol starrer Bhaiaji Superhit To Hit The Theaters on 19th Ocotber


Bhaiaji Superhit starring Sunny Deol, Preity G Zinta, Arshad Warsi, Shreyas Talpade, Ameesha Patel, Sanjay Mishra, Brijendra Kala, Jaydeep Alahwat, Mukul Dev, Pankaj Tripathi and Pankaj Jha will be releasing on 19th October 2018. The action comedy directed by Neerraj Pathak will see Sunny Deol playing a double role for the first time.

Punjabi superstar Gippy Grewal’s new single is out..

With music by well-known B Praak, composed and written by the very successful Jaani, Sooraj’s theme is a marked departure from the Punjabi superstars’ recent work which has mostly been upbeat, dance numbers.  The video, shot in Vancouver, is directed by Baljit Singh Deo and features Shinda Grewal and Navpreet Banga.

July 09, 2018

#Shocking : Kavi Kumar Azad aka Dr Haathi of Taarak Mehta Ka Ooltah Chashma is no more..

Kavi Kumar Azad, popularly knows as 'Dr Hansraj Hathi' from 'Taarak Mehta Ka Ooltah Chashmah' died because of a massive cardiac arrest.

July 07, 2018

Swagger Questions and Answers

How can you document your RESTful API?
One of the outdated option is to maintain documentation manually. Or, you can generate documentation from code by using: WADL, RESTDocs or Swagger.

Swagger is one of the mostly used and popular REST API documentation standard.

What is Swagger?
Swagger is a specification for documenting REST API, which specifies the format (URL, method, and representation) to describe REST web services.

July 05, 2018

BARC TV Ratings (Impressions)- Week 26, 2018

Top 10 Hindi GEC Channel
  1. Zee Anmol : 719829
  2. Zee TV : 582960
  3. STAR Bharat : 565587
  4. Colors : 564746
  5. Sony Pal : 540331
  6. STAR Plus : 502843
  7. STAR Utsav : 479691
  8. Rishtey : 456356
  9. SONY SAB : 367955
  10. Sony Entertainment Television : 344737

Surveen Chawla set to play a crucial part in sacred games

Surveen Chawla is eagerly anticipating the launch of her forthcoming web series, Sacred Games also featuring Saif Ali Khan and Nawazuddin Siddiqui. 

July 03, 2018

Difference Between @RestController and @Controller

What is the difference between @RestController and @Controller Annotation in Spring MVC and REST?
@RestController was added into Spring 4.0 to make the development of RESTful Web Services in Spring framework easier. But @Controller was added on Spring 2.5 version.

A web application is generally returns a view (HTML + CSS + JavaScript) because they are intended for human viewers. Where as REST API just returns data in form of JSON or XML.

Mental Hai Kya to release on 22nd Feb, 2018!

Balaji Motions Pictures & karma Media and Entertainment's much awaited film Mental Hai Kya, starring Kangana Ranaut and Rajkummar Rao is all set for a release on 22nd February, 2019.

Family time for Annup Sonii!

Annup Sonii, who has for long been anchoring the reality-based television show, Crime Patrol, has taken some time off from work and is currently in Sri Lanka for a family vacation.

July 02, 2018

History TV18 Presents Amelia Earhart

Amelia Earhart, American aviation pioneer and author was the first pilot aviator to fly solo across the Atlantic. On July 2, 1937, during an attempt to circumnavigate the world, Earhart and her fellow navigator mysteriously vanished over the Central Pacific Ocean. All search efforts made during the period were unable to locate the pair or their airplane. HISTORY TV18’s upcoming show ‘Amelia Earhart: The Lost Evidence’ airing 1st July, 2018 at 9 PM will unfold this mystery, as the two hour special documentary reveals some shocking evidence.

Difference between RANK, DENSE_RANK and ROW_NUMBER functions

RANK
The RANK function is used to retrieve ranked rows based on the condition of the ORDER BY clause. For example, if you want to find the name of the employee with third highest salary, you can use RANK Function.

July 01, 2018