Skip to main content

Posts

AN INTRODUCTION TO OPERATING SYSTEMS ? What is operating system ?

 AN INTRODUCTION TO OPERATING SYSTEMS  ? What is operating system ? There are two type of software Application software and System software  Application software performs specific task for the user. System software operates and controls the computer system and provides a platform to run application software. what is an operating system - An operating system is a piece of software that manages all the resources of a computer system,both hardware and software, and provides an environment in which the user can execute his/her programs in a convenient and efficient manner by hiding underlying the complexity of the hardware and acting as a resource manager. Why OS Needed in computers?  1. What if there is no OS?  a. Bulky  and  complex  app.  (Hardware  interaction  code  must be  in  app’s code base)  b. Resource exploitation by 1 App.  c. No memory protection.  2. What is an OS made up of?  a. Collection of system software.  The function of Operating system -  - Access to the computer har

How do I get today's date in JavaScript?

  How do I get today's date in JavaScript?- There are various methods that retrieve the date in JavaScript. The data values can get like years, months, days, hours, minutes, seconds, milliseconds from a Date Object.  What are different method provided by Date class in JavaScript-> Method Description getFullYear() Get the  year  as a four digit number (yyyy) getMonth() Get the  month  as a number (0-11) getDate() Get the  day  as a number (1-31) getHours() Get the  hour  (0-23) getMinutes() Get the  minute  (0-59) getSeconds() Get the  second  (0-59) getMilliseconds() Get the  millisecond  (0-999) getTime() Get the time (milliseconds since January 1, 1970) getDay() Get the weekday as a number (0-6) Date.now() Get the time. ECMAScript 5.

Implement stack Using array || how to implement stack c++

 Implement stack Using array || how to implement stack  In this blog, we will be implementing stack using array. What is stack?  A stack is a conceptual structure consisting of a set of homogeneous elements and is based on the principle of last in first out (LIFO). It is a commonly used abstract data type with two major operations, namely push and pop. Push and pop are carried out on the topmost element, which is the item most recently added to the stack. The push operation adds an element to the stack while the pop operation removes an element from the top position. The stack concept is used in programming and memory organization in computers. Operation in Stack -> Push:  Adds an item in the stack. If the stack is full, then it is said to be an Overflow condition. Pop:  Removes an item from the stack. The items are popped in the reversed order in which they are pushed. If the stack is empty, then it is said to be an Underflow condition. Peek or Top:  Returns the top element of the

bubble sort algorithm in c++ || Bubble sort explained || sinking sort

 Bubble sort- Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. The pass of the list is repeated until the list is sorted. Why bubble sort is called “bubble” sort? The “bubble” sort is called so  because the list elements with greater value than their surrounding elements “bubble” towards the end of the list . For example, after first pass, the largest element is bubbled towards the right most position. Worst complexity :  n^2 Average complexity :  n^2 Best complexity :  n Space complexity :  1 at the end of i th pass, we have the i th largest element placed at its correct place. look the example below. Example:   First Pass:   (  5   1  4 2 8 ) –> (  1   5  4 2 8 ) ( 1  5   4  2 8 ) –>  ( 1  4   5  2 8 ) ( 1 4  5   2  8 ) –>  ( 1 4  2   5  8 ) ( 1 4 2  5   8  ) –> ( 1 4 2  5   8  ) 1st largest placed at the correct place. Second

What is an algorithm in computer science ?

 What is an algorithm in computer science ?- You may have heard the term  algorithm  recently, whether it was online or perhaps in some conversation about technology. It's a word that gets thrown around a lot, but what does it mean exactly? suppose your mom gave you a task to prepare a cup of tea for her. How do you prepare a cup of tea for her ? definitely, to prepare a cup of tea you are gonna follow the following steps 1- Boil water. 2- Warm up teapot 3-  Put the tea into a teapot and add hot water. 4- Cover teapot and steep tea 5- Strain tea solids and pour hot tea into tea cups. Basically preparing tea was a problem and you follow some step-by-step procedures to solve this problem.  similarly, in computer science,  An algorithm is simply a  set of steps used to complete a specific task . They're the building blocks for programming, and they allow things like computers, smartphones, and websites to function and make decisions. An algorithm is a specific procedure for solvin

How to find all prime number till N? most efficient solution Sieve of Eratosthenes in c++

 How to find all prime number till N? most efficient solution Sieve of Eratosthenes- There are multiple ways to find prime numbers till N. but the sieve of Eratosthenes is the most efficient solution to find prime numbers till n. This efficient solution often used in competitive programming contests. algorithm step by step - step -1 Create a bool vector of size n  and initialize it by false value. step -2  create an empty vector to store prime numbers. step 3-  loop through the visited vector from 2 to n. step 4- if the current value is pointing to unvisited we will push this value to our answer vector and mark visited it's all multiple till n. check below image how it works.                Code for  most efficient solution Sieve of Eratosthenes in c++  

Entire work summary GSOC 2021 coding period || final wrap up blog

 Entire work summary GSOC 2021 coding period - Hey, reader Welcome to my blog.  In this blog post, I am going to share my entire work during GSOC 2021 coding period. take a cup of coffee and enjoy this blog post.  The coding period for GSoC 2021 started in June month. I was very excited about the coding period. I was part of  Improve LibreHealth Toolkit Cost of Care Explorer   Project. The goal of this project is to improve the existing flutter application and web application.   Robby O'Connor and Mua Rachmann   mentoring me in this project.  Task Done during GSOC 2021 coding period -  1- migrated flutter application to null safety  As soon as the coding period has begun I choose to improve the cost of care flutter application.  Since this flutter application was not migrated to null safety I migrated it to null safety. link of work -   https://gitlab.com/librehealth/toolkit/cost-of-care/lh-toolkit-cost-of-care-app/-/merge_requests/89 2- added bookmark feature  I added a bookmark f