Monday, February 17, 2020

create multiple files with single command in linux

touch {events.txt,app.txt,hello.txt} 

will create multiple files 




or a regex can be used as shown bellow.


touch hello{1..10}.txt


Create Multiple Subdirectories with One Linux Command

mkdir -p  src/{dir1,dir2,dir3,images/{im1,im2,im3}}

above command creates all with structure 



Tuesday, January 7, 2020

NTP Time Sync single shot

NTP time sync, previously was done using ntpdate and it was deprecated as of September 2012. ntpd provides same functionality from then on using following.

ntpd -gqx






NOTE:- one needs to setup the /etc/ntp.conf file.


-g
Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. See the tinker command for other options.


-q
Exit the ntpd just after the first time the clock is set. This behavior mimics that of the ntpdate program, which is to be retired. The -g and -x options can be used with this option. Note: The kernel time discipline is disabled with this option.



-x
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the -g and -q options. See the tinker command for other options. Note: The kernel time discipline is disabled with this option.


Monday, January 6, 2020

Fixed: blurry font fix on vm ( virtual machine )

Problem : Blurry font on the virtual machine screen.


Solution:

1. change the above setting to remove selection of both Keep Aspect Ratio Stretch and Free Stretch.
2. screen may resize.
3. if the fonts are still not fixed then you may need to change the screen resolution in VM to your screen resolution.



4. I changed mine to 2560 x 1600 (16:10)


NOTE: This sort of issue are due to Aspect Ratio mainly.



Monday, September 16, 2019

elipse gdb not stopping at breakpoint


Solutions: Set the eclipse to use C/C++ Breakpoints


If you are using eclipse and the breakpoints don't work. It's due to the Default breakpoint




1. Right click to set a breakpoint and from the menu choose C/C++ Breakpoints.


Now it should work as expected.

Tuesday, August 6, 2019

Solved : Reset family setting on xbox 360 slim

Go to the system info screen under console settings. Hit Left trigger, Right trigger, x, y, Left bumper, Right bumper, up, left bumper, left bumper, X.

It will come up asking if you want to reset to factory defaults.

OK go to your dashboard and go to system look for initial setup and click there the thing is though you will lose everything download content music movies etc...

--------------------------------------------------------------------------

This is the solution that worked for me. If it does not for you then please add your solution in comment.

Suppress doxygen for a section of code

//! @cond Doxygen_Suppress
code
//! @endcond

Fix AOC Dispaly "no signal" issue

Fix: Disconnect the power cable to the AOC display and reconnect it.


Note: Changing the Display cable or connecting the it via docking station, connecting / reconnecting  does not help.

Thursday, January 25, 2018

Turning Off Auto-Correction in iOS

  1. Open the “Settings” app on the iPhone or iPad.
  2. Go to “General” and then to “Keyboard”
  3. Locate “Auto-Correction” and flip the switch to the OFF position.
  4. Exit out of Settings as usual.

Wednesday, July 26, 2017

whatsapp audio does not get sent

may be you have application in background recording audio ?

solution 

1. stop the background application that is recording voice ( ex. voice recorder etc)
2. or restart the phone.