Skip to content

cpatel@veejansh.com

Veejansh

Cloud++ Container++

  • Come Join Us
  • Know Us
  • Privacy Policy
  • Services
  • Tech Stack
  • Blog
  • Contact Us
  • Come Join Us
  • Know Us
  • Privacy Policy
  • Services
  • Tech Stack
  • Blog
  • Contact Us

Author: admin

  1. Home   »  
  2. Author: admin

Author: admin

Add time to prompt

2021 December 242021 December 24 adminLinuxLeave a Comment on Add time to prompt

# Put a timestame in front of the prompt in the form: # Oct24 12:28[user@host MY_PWD]$ PROMPT_COMMAND=echo -ne $(date +%-b%-e […]

Continue reading

Detached Process

2021 December 242021 December 24 adminLinuxLeave a Comment on Detached Process

If you want to run an application from ssh even if you exit ssh session, do the following: # nohup […]

Continue reading

Public IP

2021 December 242021 December 24 adminLinux, NetworkingLeave a Comment on Public IP

To know public IP of the network, use following commands on Linux shell: # curl ifconfig.co (returns IPv6 address) #curl […]

Continue reading

Traceroot

2021 December 242021 December 24 adminAndroidLeave a Comment on Traceroot

our device must be rooted. # su # toybox traceroute toybox has multiple internal commands at your perusal. This worked […]

Continue reading

RW Shell

2021 December 242021 December 24 adminAndroidLeave a Comment on RW Shell

On a rooted Android device, adb shell su -c “mount -o rw,remount /system” This makes /system writable and can update any […]

Continue reading

CPU Temperature

2021 December 242021 December 24 adminAndroid, Java, ProgrammingLeave a Comment on CPU Temperature

public static float cpuTemperature(){    Process process;    try {        process = Runtime.getRuntime().exec(“cat sys/class/thermal/thermal_zone0/temp”);        process.waitFor();        BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));        String line = reader.readLine();        if(line!=null) {            float temp = […]

Continue reading

Double Precision Comparision

2021 December 24 adminC++, ProgrammingLeave a Comment on Double Precision Comparision

Checking double precision value for limits is tricky. Say, DOUBLE X = 1.0;IF ( X == 1.0 ) DO_SOMETHING(); This […]

Continue reading

Double Precision Rounding

2021 December 242021 December 24 adminC++, ProgrammingLeave a Comment on Double Precision Rounding

Uses my_double_greater_check from earlier article DOUBLE MY_DOUBLE_ROUND( DOUBLE VAL, INT MULTIPLIER ){         DOUBLE VAL_ADJ = VAL * […]

Continue reading

Thread Info in Java

2021 December 242021 December 24 adminAndroid, Java, ProgrammingLeave a Comment on Thread Info in Java

On Android java code, print stack trace of all the threads owned by current process. try{    Map info = Thread.getAllStackTraces();    for (Map.Entry<Thread, […]

Continue reading

Thread Priority in Android

2021 December 242021 December 24 adminAndroid, C++, Java, ProgrammingLeave a Comment on Thread Priority in Android
Continue reading

Posts navigation

Older posts

Recent Posts

  • Add time to prompt
  • Detached Process
  • Public IP
  • Traceroot
  • RW Shell

Recent Comments

No comments to show.

Archives

  • December 2021

Categories

  • Android
  • C++
  • Go
  • Java
  • Linux
  • Networking
  • PHP
  • Programming
  • Wordpress
Proudly powered by WordPress | Theme: goldly by reviewexchanger.