Sign in to Publish article.

Sign in

avatar

anoop_singh published an article

SDE 1 at Amazon 1 week, 6 days ago

Find root of a number using Newton’s method

There are in built functions in all programming languages to calculate square root of any given number but sometimes in any interview we are asked to write our own method to calcualte it.

In this article, I'll explain how to use Newton's method to find out square root of any given number.

You can read more about Newton's method from here …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


Ritu Aggrawal

ritu_aggrawal published an article

Site reliability engineer at Uber 2 weeks, 5 days ago

How to Implement Browser side Caching of static files on Nginx with header

Static files are almost in every website and the faster they load the better is user experience. Static files contain images, css fies, javascript files etc.

HTTP requests to these static files should not hit the web servers, they should be handled by HTTP request handlers, like Ngnix.

Usually, static files are not modified very frequently and its a good …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


avatar

harsh_shukla published an article

Intern at Microsoft 2 weeks, 5 days ago

Search an element in a sorted and rotated array

Searching an element in any array is very common task we are asked to do during interviews and in competitive programming contests.

We can search an element in a sorted array by using binary search in O(log n) time complexity. But things become mess when the given array is rotated. 

In this article, I'll explain how to search …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


Vishal Saxena

vishal_saxena published an article

SDE 1 at Amazon 3 weeks, 6 days ago

10 Git commands you must know

If you are a developer, you must have been throught git. Git is what makes us manage all our codes, it is a sort of version control system. Version control means, it allows you to keeps all the versions of your code, if you change a single character / file in your code it's a new version.

Almost every developer manages their …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


Rajan Kumar

rajan published an article

Founder & Programmer at HackersFriend 4 weeks ago

forEach() Vs map() in JavaScript - Things every developer should know

Javascript offers two methods to iterate over an array forEach()  and map().

They are both used for the same purpose - iterate over an array but they are very different. But it becomes confusing to developers, specially beginners.

Javascript has a high reputation of surprising developers. 

JavaScript Meme

 

In this article, I am going to clearify the differences of both …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


avatar

Abhishek_thewarrior published an article

1 month ago

Fork() Function in C

//program to demonstrate the use of fork Function

Int main()

{

Printf("Hello");

Fork();

Fork();

}

This function will print 4 times Hello ,

Thats because fork Function clones the parent process and returns value either 0 or 1.

When it returns" 0" implies the "child"

And for parent  its "1".

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


Rajan Kumar

rajan published an article

Founder & Programmer at HackersFriend 1 month, 1 week ago

Convert a number to a string in C - best way

We can use sprintf() function to conver any number to string in C. Number can be any integer or float.

Here is an implementation of it.

#include<stdio.h> 
int main() 
{ 
	char final[100]; 

	float number = 98.12;
 
	sprintf(final, "%f", number);

	printf("\nString of given number is %s", final); 

	return 0;
} 

 

 

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


Rajan Kumar

rajan published an article

Founder & Programmer at HackersFriend 1 month, 1 week ago

Building news aggregator web app with Django using python web scraping

We can build a news aggerator web app by scrapping the news websites and serving those scrapped news via Django on web or in any app.

In this article, i will explain step by step guide on how to implement everything. Let's start by understand what a news aggregator is and why should we build it.

 

What is news aggregator ?

A news aggregator is …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


Rajan Kumar

rajan published an article

Founder & Programmer at HackersFriend 1 month, 2 weeks ago

Find Length of a Linked List

We can find the length of a linked list by initializing a counter to zero and incrementing it for every node of linked list. We will traverse the linked list from start and go until we reach the end of it. 

linked list

In the above linked list, we can see there are 4 nodes and hence, the legth of this …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote


Rajan Kumar

rajan published an article

Founder & Programmer at HackersFriend 1 month, 2 weeks ago

Print a matrix in spiral form

To print a matrix in spiral form we can use four loops.

Let's break down the problem, there 4 moves that are possible during spiral traversal.

  • From left to right
  • From top to bottom
  • Right to left
  • and From bottom to up

We'll need to have loop for each move. We'll loop around the entire matrix, with these moves and …

Read full article

arrow_upward Upvote

comment Comment

arrow_downward downvote



View more

HackersFriend Updates





View more


Events


Nov. 28, 2018, 5:30 p.m.

Python from zero to hero

place Delhi

View details


Aug. 13, 2018, 5:30 p.m.

Python from zero to hero

place Bangalore ( HackersFriend office BTM Layout)

View details