Friday, 11 April 2014
Restarting Samsung S3 when power button doesn't respond
1. Disconnect the usb/power cord from the device.
2. Remove back cover from the device.
3. Remove battery, and leave the back cover off. You will place the battery back-in in a second.
4. Reconnect the usb/power cord to the device and then to your PC.
5. Now, while the device is connected, plugin the battery. This is the key step.
At this point, the device shows the battery charging animation, the black/white one on fullscreen, the one that is shown when the device is powered-off and charging. The device had not shown this image in a very long time, while the power button issue was going on, so this looked promising.
6. Now, I pressed the power button, and then the phone started to boot-up.
7. I then went inot downloading mode, flashed it again with the default OS and it was good as new.
source: http://forums.androidcentral.com/samsung-galaxy-s3/234582-samsung-galaxy-s3-will-not-turn-5.html
Fixing MATLAB compiler error with Simulink function blocks in 2013a
The problem is with compiler updates in xcode 5.1. The 5.0.2 version still works by downloading it from the developer store and renaming the versions to different paths.
source: http://stackoverflow.com/questions/22563533/downgrade-xcode-to-5-0-2
source: http://stackoverflow.com/questions/22563533/downgrade-xcode-to-5-0-2
Monday, 10 March 2014
Sunday, 23 February 2014
How to fix MATLAB and mex version incompatibilities
1. In the MATLAB Command Window, execute the following commands:
cd(matlabroot)
cd bin
edit mexopts.sh
2. Save a backup copy of this file somewhere in case you make a mistake and you need to revert your changes.
3. Scroll down to the Mac (“maci64”) section of this file, beginning around line 120.
4. Replace all instances of 10.7 with 10.8; there are four of these in all (a fifth may be found in comments only)
5. Save the file, then execute the following command in the MATLAB Command Window:
mex -setup
Source: http://www.mathworks.com/matlabcentral/answers/103904-can-i-use-xcode-5-as-my-c-or-c-compiler-in-matlab-8-1-r2013a-or-matlab-8-2-r2013b
Tuesday, 18 February 2014
Acquiring data via FFMPEG
Only one connection can exist at a time when reading video data from FFMPEG, otherwise the program will freeze while attempting to pick up the data. Once one connection has been established, you can use:
ffmpeg -i tcp://[ip:port] [outputfile]
In addition, there seem to be some errors with the Jan 14 2014 version of FFMPEG where the recorded data is either sampled or slowed. I updated to the Jan 16 2014 and no longer had this issue.
ffmpeg -i tcp://[ip:port] [outputfile]
In addition, there seem to be some errors with the Jan 14 2014 version of FFMPEG where the recorded data is either sampled or slowed. I updated to the Jan 16 2014 and no longer had this issue.
Monday, 17 February 2014
Installing ffplay on OSX
Download the most recent static FFplay binaries for Mac OS X Intel 64bit at http://www.evermeet.cx/ffplay/. (If this gets disabled, leave a message and I can mirror my copy from this date.)
Use something that can unzip 7z files, like The Unarchiver for Mac (h/t: Ren). Move the ffplay binary into /usr/bin/ or some other folder on your $PATH.
Now it should be accessible from terminal!
Use something that can unzip 7z files, like The Unarchiver for Mac (h/t: Ren). Move the ffplay binary into /usr/bin/ or some other folder on your $PATH.
Now it should be accessible from terminal!
Monday, 20 January 2014
What is Node.js?
Node.js is a server-side javascript interpreter that is useful for receiving and responding to http requests. Node itself isn't javascript, but the code that it handles is javascript. Node is actually a c program, and uses javascript as a way to send instructions to the c program and drastically simplify the server networking code required in c.
source: http://radar.oreilly.com/2011/07/what-is-node.html
Sunday, 19 January 2014
Python: input() vs raw_input()
raw_input() reads everything as a string and you have to process it yourself.
input() functions as eval(raw_input()) which can lead to vulnerabilities in injection code.
Blocking websites on Android phones
Goal: Want to stop lying in bed reading facebook and 9gag so that I will get out of bed sooner in the morning.
Solution: I used an app called safebrowser which allows you to black/whitelist specific websites. I also hid the default internet browser so that I wouldn't be tempted to bypass the safe browser.
https://play.google.com/store/apps/details?id=com.cloudacl
Thursday, 16 January 2014
Mac: Finder <-> Terminal
Terminal -> Finder:
open .
source: http://alvinalexander.com/blog/post/mac-os-x/open-finder-window-in-current-directory-off-terminal-window
Finder -> Terminal:
More complicated. Have to enable settings in System Preferences.
source: http://stackoverflow.com/questions/420456/open-terminal-here-in-mac-os-finder
open .
source: http://alvinalexander.com/blog/post/mac-os-x/open-finder-window-in-current-directory-off-terminal-window
Finder -> Terminal:
More complicated. Have to enable settings in System Preferences.
source: http://stackoverflow.com/questions/420456/open-terminal-here-in-mac-os-finder
Wednesday, 15 January 2014
Drone
Disabling the default Parrot AR.Drone altitude height setting:
http://forum.parrot.com/ardrone/en/viewtopic.php?id=3712
http://forum.parrot.com/ardrone/en/viewtopic.php?id=3712
Saturday, 11 January 2014
Giving up competitive Dominion
Dominion is a multi-player card game with a large library of possibilities and interesting techniques/combinations.
I am giving up competitive dominion because there is too much randomness at the beginning of the game pending your initial hand and I decided that I prefer a game with less initial randomness.
On the goko servers I achieved ~8k ranking amongst casual players with ~2000 elo.
Head-to-head competitive activities I am currently still interested in:
I am giving up competitive dominion because there is too much randomness at the beginning of the game pending your initial hand and I decided that I prefer a game with less initial randomness.
On the goko servers I achieved ~8k ranking amongst casual players with ~2000 elo.
Head-to-head competitive activities I am currently still interested in:
- programming
- chess
- SSBM
- league of legends
- fencing
Recording videos on AR.Drone
When using the built-in record function, you have to end recording BEFORE you land, otherwise the video DOES NOT SAVE.
First flight video below:
First flight video below:
Sunday, 5 January 2014
Saving Mac External Monitor Configurations
In OSX 10.8.3, I encountered an issue with external monitors where unplugging and restablishing the external monitor would cause the position to reset, which was annoying for every time I reconnected my laptop. A fix that seems to work properly is below:
Got a Mac Pro 2008 model with 2 x 5770 cards (Apple Ones) running 10.8.4 and 6 screens. Had this problem since I bought this unit about 8 months ago and been running latest release all through this period. Screen would lose settings after power off but also just on reboot. Complete PRAM zap, replaced CR2032 battery inside (just in case) worked through all discussed fixes. So reading the thread tonight it appears that our Admin users don't have the rights to change the setting perminantly. So.... I setup the root user account and then logged in, usual problem with screens all over the place. Reset them and then rebooted. All fixed! Have done this a few times now so not just a fluke. Will have to do a cold start and leave the unit off for a couple of days. Have a go and let me know if you also get the same results. Very interested as I was thinking it was my old hardware and it was going to get skipped and replaced with a 2010 12 core but I'm glad I haven't now as I would still have this issue!Here is the link to setting up root. Usual caveats apply. With great power comes great responsibility Take care!
Source: https://discussions.apple.com/thread/4157760?start=75&tstart=0
Friday, 3 January 2014
Quick check to avoid stripping screws
For a given screw, many screwdriver sizes available smaller than the hole will still work on the screw. However, the smaller sizes will wear away at the material. A way to avoid this mistake is to start at the larger spectrum of screwdrivers available and work your way down to a size that is appropriate.
Tuesday, 17 December 2013
Un-tab in VIM
Control D to untab, Control T to tab
Other keywords: shift tab
Other keywords: shift tab
source: http://stackoverflow.com/questions/2874415/what-is-the-un-tab-sequence-in-gvim
Thursday, 28 November 2013
Accessing webcam via MATLAB
imaqhwinfo
"Image Acquisition Hardware Info" tells you what cameras you have available.
vid = videoinput('macvideo', 1, 'YCbCr422_1280x720')
Specify the video channel and the output format.
preview(vid)
Display the video stream.
"Image Acquisition Hardware Info" tells you what cameras you have available.
vid = videoinput('macvideo', 1, 'YCbCr422_1280x720')
Specify the video channel and the output format.
preview(vid)
Display the video stream.
Sunday, 24 November 2013
Version Control On Google Drive
To upload a new version of an existing file:
Right click on the file name
Select Manage Revisions … from the menu
Click on Upload New Revision
Right click on the file name
Select Manage Revisions … from the menu
Click on Upload New Revision
source: http://cumulusglobal.com/cms/tuesday-take-away-version-control-with-google-drive
Sunday, 10 November 2013
Restrictions on Double Indexing in MATLAB
You can follow {} referencing by () referencing, {}(), but you cannot use ()() or (){} or ().{} or ().(), and you cannot use function(){} or function()() or function().field
source: http://www.mathworks.com/matlabcentral/answers/25890
source: http://www.mathworks.com/matlabcentral/answers/25890
Friday, 8 November 2013
Adding code blocks to blogger
To put a “code” block in any of your blogger blog posts, you have to first modify your template a bit.
1. Login to your blogger account
2. Go to Layout > Edit HTML
3. Find ]]></b:skin>
and just ABOVE it, add this line of code:
code {background:#EEEEEE; font-family: Trebuchet MS; display:block; border:1px solid #999999; padding:10px;}
Screen Capture in OSX
Launch Terminal and use the following syntax:
defaults write com.apple.screencapture location /path/
For example, if I want to have the screenshots appear in my Pictures folder, I would use:
defaults write com.apple.screencapture location ~/Pictures/
To have the changes take effect, you then must type and restart.
killall SystemUIServer
source: http://osxdaily.com/2011/01/26/change-the-screenshot-save-file-location-in-mac-os-x/
Wednesday, 6 November 2013
Assigning Default Applications to a File Type on OSX
For Mac OSX 10.6:
1. Open a New Finder Window and browse to a file of the type you'd like to change the extension.
2. Click on the file. Go to File in the top left and select "Get Info".
3. Go to "Open With" and expand that section.
4. Click on the drop down and select the program you'd like this file type to be associated to.
5. Click on the "Change All" button and "Continue"
source: http://www.mathworks.com/support/solutions/en/data/1-18ELZ/index.html
1. Open a New Finder Window and browse to a file of the type you'd like to change the extension.
2. Click on the file. Go to File in the top left and select "Get Info".
3. Go to "Open With" and expand that section.
4. Click on the drop down and select the program you'd like this file type to be associated to.
5. Click on the "Change All" button and "Continue"
source: http://www.mathworks.com/support/solutions/en/data/1-18ELZ/index.html
Subscribe to:
Posts (Atom)