Apr 10, 2014

Installing openGL

sudo apt-get install build-essential
sudo apt-get install python-setuptools
sudo apt-get install python-pygame
sudo apt-get install python-opengl
sudo apt-get install python-gst0.10
sudo apt-get install python-enchant
sudo apt-get install gstreamer0.10-plugins-good
sudo apt-get install cython
sudo apt-get install python-dev
sudo apt-get update --fix-missing
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libegl1-mesa-dev
sudo apt-get install libgles2-mesa
sudo apt-get install libgles2-mesa-dev 
 

Your hardware/driver need to support the required OpenGL version, you can check the version reported using
glxinfo | grep "OpenGL version"
 
sudo apt-get update
    OpenGL: sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
    OpenAL: sudo apt-get install libopenal0a libopenal-dev
    ALUT:   sudo apt-get install libalut0 libalut-dev 

Apr 3, 2014

Ubuntu 12.10 bug : paraview

https://launchpad.net/~gladky-anton/+archive/paraview
http://ppa.launchpad.net/gladky-anton/precise-backports/ubuntu/dists/devel/main/binary-amd64/

So in essence: this is a common bug in Ubuntu.

http://www.cfd-online.com/Forums/openfoam-paraview/121904-nuisance-output-messages-paraview-3-12-0-64-bit-openfoam-version.html


The quickest solution to no longer have to be bothered by this kind of buggy warning messages, should be to do these steps as follows:

  1. Add the repository that has got the fixed ParaView 3.98 for Ubuntu 12.04 and 12.10, by running:
    Code:
    sudo add-apt-repository ppa:gladky-anton/paraview
  2. Then update apt-get's cache and upgrade ParaView:
    Code:
    sudo apt-get update
    sudo apt-get install paraview
  3. Then uninstall the ParaView 3.12.0 version that is provided for OpenFOAM:
    Code:
    sudo apt-get remove paraviewopenfoam3120
  4. Add an alias command to your "~/.bashrc" file:
    Code:
    alias paraFoam='paraFoam -builtin'
  5. Start a new terminal window and try running paraFoam from within your case folder.

Mar 10, 2014

wasabi xbox 360 mod to play backups from hard disk : a to z

Tutorials

general
http://xboxpirate.eu/forums/topic/1599-wasabi-360s-setup-and-installation-guide-beta/

check your dashboard version is compatible
https://www.youtube.com/watch?v=58gryfLMlew
-----------------------------------------------
get the dvd drive key
https://www.youtube.com/watch?v=4edHp_ltFpQ
hands on: http://www.ehow.com/how_5806788_out-360-dvd-drive-key.html
using computer:
---------------------------------------------------
or use wasabi ultra with auto key extraction
https://www.youtube.com/watch?v=BPtIVJ8IwYI

Where to get the hw
http://www.modchipcentral.com/store/wasabi360-wasabi-360-usa-canada.html
http://www.ebay.com/itm/TWO-Wasabi360-ultra-for-X360-Slim-/141155127529?pt=LH_DefaultDomain_0&hash=item20dd8050e9

installation
http://www.modcontrol.com/Board/xbox-360-reviewcenter/34738-wasabi360-ultra-x360s-review-english.html
http://team-xecuter.com/forums/archive/index.php/t-73706.
hard disk (esata)

Jan 31, 2014

Overwriting to set of files in a folder with awk + add a line to print existing variables with fortran

shell script

#!/usr/bin/
for file in *.txt
do
awk -f f.awk "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
done

awk script

{
  print gensub(/sqrt\(([^)]*)\)/,"&; print*, \"\\1\"","g")

}

Run the shell script to excecute
sh ./run.sh

This will execute the awk script
example:

input.txt

abc;
sqrt(7);
def;

after we run the script

input.txt will look like following.

abc;
sqrt(7); print, "7";
def;


Dec 6, 2013

Fusion code

#! /bin/bash

files=(*.txt)

for ((i=0; i<${#files[@]}; i++)) ; do
    file="${files[$i]}"
    awk -f f.awk "$file" > "${file}.mod"
done

 f.awk is:
{
    gsub(/\([^)]*\)/,"&; printf&")
    print
}

input.txt:

x=7;
sqrt(x+5*4); sqrt(x*x); 
i=3;
a=2+sqrt(8);

Running: awk -f f.awk input.txt gives:
x=7;
sqrt(x+5*4); printf(x+5*4); sqrt(x*x); printf(x*x); 
i=3;
a=2+sqrt(8); printf(8);

This wont work for nested parenthesis, like sqrt(4+2*(x+y))
Running: awk -f f.awk input.txt>>output.txt writes it to output file

Followers