Posts

Showing posts from February, 2012

AutoHotkey: open-source utility to remap gampad input to button input

Please check here for the program. Below is a sample script to translate both gamepad axis and button inputs. ======== ; Autohotkey Script that matches a few joypad buttons to keyboard events ; Instruction: ; 1) Identify the Joypad buttons that you want to use ; The sample script at ; http://www.autohotkey.com/docs/scripts/JoystickTest.htm ; provides a good way for you to find out the mapping ; 2) Modify Part 0 and Part 1 accordingly. ; 3) Enjoy! #Persistent ; Keep this script running until the user explicitly exits it. ; Part 0: turbo key config ; State if any keys need turbo ('Y' if needed) TurboJoy4 = N TurboJoy1 = N TurboJoy8 = N TurboJoy3 = N TurboJoy2 = Y TurboJoy6 = N ; main routine SetTimer, Watch, 5 return ; Watch method Watch: SetKeyDelay -1 ; Avoid delays between keystrokes. ; Part 1: key mapping routine each JoyX to be used ; Joy4 -> 'Q' GetKeyState, Joy4, Joy4 Joy4PPrev = %Joy4P% if Joy4 = D { if TurboJoy4 = Y { Send {Q down} ...

Look for packages that contain a certain file in Ubuntu

Install package apt-file sudo apt-get install apt-file apt-file update To look for a file, says tk.h, use the following command apt-file search tk.h Reference

MATLAB - cannot find libstdc++ when running external C/C++ program

Error message: ..../sys/os/glnx86/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ...) Solution: Start MATLAB with following command LD_PRELOAD = "Dirlocation"/libstdc++.so.6 "DirForMATLAB_Shell"/matlab For example: libstdc++.so.6 located on "/usr/lib/i386-linux-gnu/" MATLAB is located on " /opt/matlab2011b/bin" Start MATLAB by following command: LD_PRELOAD=/usr/lib/i386-linux-gnu/libstdc++.so.6 /opt/matlab2011b/bin/matlab Reference