A Man Invoicing

Serverless Invoice Generation

One of my non-techie friends was starting a new business and he wanted an Invoicing System. he reached out to me hoping that I can help him with a small website or app Open Source Software to rescue If this was me a couple of years earlier I would have started the typical Software Development Life Cycle for a new project, but this new me is lazy. So, I searched the web to find a decent open-source project that can fulfil his needs for now, I came across this project it looked very interesting to me, it was using LaTeX to generate the invoice since I had no experience in the tools I refrained to use it (although I would love to explore it). after going through a couple of interesting looking projects, I found something familiar ...

November 28, 2021 · 2 min · Zeeshan Khan

Factorial in C using Character array

Hey Guys, wondering why I am here once again with this “factorial” thing? You will get to know it in no time..just keep reading! Let’s calculate some of the factorials: 1! = 1 2! = 2 3! = 6 4! = 24 5! = 120 6! = 720 ...

June 15, 2016 · 5 min · Swati Kesarwani

Factorial in C

Hey! Today i am gonna show you how to calculate factorial of a number. The code below depicts the basic methodology of how to calculate factorial of a number. # include<stdio.h> void factorial(int number){ int i; long long int factorial=1; for ( i = number ; i > 0 ; i-- ) factorial*=i; // Printing the factorial of the number **/ printf("Factorial of %d = %lld",number,factorial); return 0; } int main(){ // Declaring variables **/ int num; // Asking and scanning input **/ printf("Enter a number : "); scanf("%d",&num); // Passing number to the function **/ factorial(num); return 0; } output of above code will be ...

June 1, 2016 · 1 min · Swati Kesarwani

Linked List in C

First let’s get familiar with some basic terminologies used in linked list. A linked list is a type of array in which each elements points to the next element. Each element in the list is called a node The very first node of the list is called the root node or head of the list. Linked list is represented only by the root node i.e., we store only the pointer to the root node. Memory for each node is dynamically allocated using malloc() or calloc() function from stdlib.h header file. Allocated memory should be released after use, using free() function. Now let’s look at the code below, although the code is self explanatory we will explain each portion separately. ...

November 23, 2015 · 8 min · Zeeshan Khan

How To Scan Input In Java

The best way to scan input in java includes the use of BufferedReader class, another method uses Scanner class but is slower, so here we will prefer BufferedReader. The following code demonstrate the use of BufferedReader for scanning input of different type. // file ScanInput.java import java.io.*; public class ScanInput{ public static void main(String args[]) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter a String: "); String msg=br.readLine(); System.out.print("Enter a Integer: "); int integer=Integer.parseInt(br.readLine()); System.out.print("Enter a Decimal Number: "); Float float_number=Float.parseFloat(br.readLine()); System.out.println("String you entered is:"+msg); System.out.println("Integer you entered is:"+integer); System.out.println("Decimal Number you entered is:"+float_number); } } output is ...

February 3, 2015 · 1 min · Zeeshan Khan

Faster Input Scan Method in C

Sometimes we need to scan input really fast like when we are participating in coding competitions like codechef or SPOJ where the time limit is very strict and inputs are large, we can save some time by adopting faster scanning methods. We can achieve our gaol using getchar_unlocked function. code below scans 100000 integers and has two different methods one is scan_normal() this will scan integers using standard scanf() function and the other one is scan_fast() this scan integers using getchar_unlocked function, we will execute the program twice one for each method mark the time taken for execution to evaluate the performance. ...

January 26, 2015 · 2 min · Zeeshan Khan

How To Run a Java Program

To run a java program you must have one, so lets have a sample code which prints “Hello world!!” to console. Source Code If you have source code ready then ignore else create a new file Hello.java and copy the below code in it and save it. Source code // file Hello.java import java.io.*; class Hello{ public static void main(String args[]){ System.out.println("Hello World!!"); } } now you have your source code ready, ...

January 24, 2015 · 1 min · Zeeshan Khan

Client Server in Java

The following program demonstrate how we can implement simple client server architecture in java Start Server.java in a terminal/command prompt then open another command prompt/terminal and start Client.java in it Server can handle new Clients on disconnection of previous one. ...

January 21, 2015 · 2 min · Zeeshan Khan

ArrayList in java

ArrayList is a collection of data items that grows and shrinks depending on the number of data items present in it, you can think it as a dynamic array or a link lists in C, whose size increases when we insert a data and decreases as delete some data from it. To insert a data item we use add() method and to delete we use remove() method as demonstrated below in line 13 and 20 respectively. ...

January 8, 2015 · 2 min · Zeeshan Khan

File Handling in C

The following program demonstrate how we to perform read and write operations on files, We can create and open a file w+ (write plus) mode, this will open a file if it exists otherwise create a new file and open it in write mode ...

January 3, 2015 · 1 min · Zeeshan Khan