Jeevan Rex Blog

Thursday, April 1, 2021

Find Max Memory, CPU% of a Subprocess in Python

›
This program uses psutil to track a job import atexit import math import psutil import time cmd = './fib.py' #the script which we wi...
Wednesday, July 8, 2020

Find and Replace in Terminal

›
To Find and Replace in Terminal use this for first occurrence: sed -i 's/FIND/REPLACE/' <file_name> for global occurrence:  ...
Monday, January 14, 2019

In Java Create Static Instance of a class

›
public class MyClass { private static MyClass instance = null; public synchronized static MyClass getInstance() { if (instance == n...
Thursday, May 10, 2018

Find and Replace in vi Editor

›
How do we find and replace a string in vi Editor?  Open the file in vi and use this:  :%s/FIND_PATTERN/REPLACE_STRING/  This will replac...

Replace String in Multiple Files Linux Bash

›
We can copy all file paths into a file. Let's call the file name as `list`. There are multiple ways of creating `list`. Here are some. ...
Friday, April 22, 2016

Level Order Traversal in a Binary Tree from Bottom to Top

›
    public void LevelOrderReverse()    {         System.out.println(LevelOrderReverse(this));     }     private String LevelOrderReverse(Bin...
Wednesday, April 20, 2016

Amazon Question: +1 or -1 Array Searching

›
Given an array, next element is either +1 or -1 of previous element then find any number k ?     public int getIndex(int element, int[] in...

Bucket Sort

›
Amazon Question: Given an array with 3 distinct elements, sort the elements in O(n) complexity Input: 1,3,1,2,3,1,2,2,3 Output: 1, 1, 1, 2...

Amazon Question: Print Last N nodes of Linked List in reverse

›
Given a singly linked list's head and an integer N, print last N nodes of the list in reverse order. Example: List = 1->2->3-...
Monday, April 11, 2016

Tamil Kumari FM Talk about Birds

›
This is a talk about Birds which I gave 3 years ago in Kumari FM about Origin of Birds, Living Birds, Conservation of Birds.
›
Home
View web version
Powered by Blogger.