Sunday, June 7, 2015

Ubuntu:How to change my MS mouse wheel scroll rate?

 
Some MS mice have a scrollwheel bug. Try unplugging the USB cable/dongle then plug back in.



Wednesday, June 3, 2015

VNC server on ubuntu 14.04




#!/bin/sh

# Uncomment the following two lines for
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
# exec /etc/X11/xinit/xinitrc

#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &






normal desktop:

Thursday, April 16, 2015

Maple: Display plots several plots together

with(plots);
p1 := plot(sin(x), x = 0 .. 2*Pi, color = red);
p2 := plot(cos(y), y = -Pi .. Pi, color = blue);
display({p1, p2});

Saturday, April 11, 2015

How to create a bootable USB on Linux

Installation


1. Using UNetbootin

2.

sudo mkdir /media/iso/
sudo mount -o loop /path/to/ubuntu.iso /media/iso

cp -a /media/iso/. /media/xxx/

sudo apt-get install syslinux mtools
sudo syslinux -s /dev/sdd1

Then rename the isolinux directory in media/xxx/ to syslinux, rename the file isolinux.cfg to syslinux.cfg.



In case of the message:

"The installer has tried to mount image #1, but cannot find it on the hard drive.Please copy this image to the drive and click Retry.Click Exit to abort the installation."

press Ctrl-Alt-F2

mount /dev/sdc1 /mnt/foldername

ps -ef | grep sd

copy /mnt/foldername/centos.iso /mnt/isodir/centos.iso

press Ctrl-Alt-F6

Thursday, February 19, 2015

How to Repair, Restore, or Reinstall Grub 2 with a Ubuntu Live CD



















Mount the partition your Ubuntu Installation is on (with the root partition "/").


sudo mount /dev/sdc2 /mnt

sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys



sudo chroot /mnt

grub-install /dev/sdc # grub-install --recheck /dev/sdc
update-grub

exit &&
sudo umount /mnt/sys &&
sudo umount /mnt/proc &&
sudo umount /mnt/dev/pts &&
sudo umount /mnt/dev &&
sudo umount /mnt




Reboot your computer, and Grub2 screen will be on.
 

Tuesday, February 10, 2015

Why V_dc >> V_ac for electrostatic actuators ?


Consider a parallel plate capacitor with one fixed and one free electrode. If a voltage V is applied to the capacitor, the free electrode will experience an attractive electrostatic force of magnitude 
F = 1/2*e*A*V^2/g^2, where e is the dielectric constant of the material between the plates, A is the capacitor area,V is the voltage across the capacitor, and g is the electrode spacing. Because the force depends on the square of the voltage, the second harmonic of the applied voltage will be generated. For operation at the first harmonic, a dc bias Vbias is applied to the capacitor along with the RF signal such that V(t) = Vbias + Vac cos (wt +phi) . By making the bias voltage much larger than the time varying voltage, the dominant time varying force becomes F=e*A*Vbias*Vac/g^2 cos (wt + phi ).

Tuesday, February 3, 2015

Acoustic model for far distance propagation coupling with CFD


Is the acoustic model for far distance propagation coupling with CFD can handle sound propagation over different media like air, water?

Direct prediction of far‐field noise in a CFD code is made somewhat impractical because of the meshing and timestep requirements.



  • First, you must solve the time accurate compressible Navier‐Stokes equations. Accurately resolving the propagation of acoustic waves imposes timestep restrictions such that the Courant number is in the range of 1‐2 at most. This restriction can be highly costly. 
  • Second, the CFD mesh must span all the way to the reception points with enough spatial resolution to directly resolve acoustic waves over the propagation distance with minimal to no numerical damping. 
These requirements do not make practical sense for many industrial applications. Practical predictions of farfield sound pressure levels are made by first starting with a time accurate CFD calculation of the near field region. Boundary and interior noise sources are taken from the transient CFD calculation, and used as input to an acoustic code using the Lighthill analogy. This method is however a one‐way approach that ignores coupling between acoustics and the flow field, and assumes the fluid behaves as an ideal gas.

How to Encrypt and Decrypt Files With GPG on Linux

https://www.howtogeek.com/427982/how-to-encrypt-and-decrypt-files-with-gpg-on-linux/