Procrastination is like a drug. When you're in it, it feels great, but come back to reality, and you will drop. Tis' a terrible cycle..
Learn with me, on my journey of discovery about ... everything, but mainly computers and programming.
May 27, 2011
Procrastination
May 20, 2011
Toilet Time
![]() |
| Photo rights to ssalonso on flickr. |
I have a theory that there is a certain space, let's call it a mindspace, that can be harnessed for higher productivity. Your mindspace is the time you have in your mind during which you're physically occupied, e.g. going to the toilet at school/work. Let's try and use every toilet stop during our day to think about something productive shall we? Plan ahead, think about current problems etc. :)
Extra:
I often went to the toilet during exams. The extra exercise, fresh air (out of the exam room, not in the toilet...) and time away from script sometimes helped trigger memory while I thought about whatever I was stuck on.
Mar 24, 2011
Excel Edit Cell Shortcut
Just found the keyboard shortcut that puts the cursor inside the cell: F2.
Saves having to mouse click.
Jan 25, 2011
Why gmail (not hotmail?) #1 -basic
- Conversations
Emails are stored as conversations instead of individual messages. If you've used iphone or Andriod's messaging system, you know what I mean. It's much easier to see. (Each individual message is expandable, as well as the recipients and extra info.)
- Forgotten Attachment Detector
If you typed something like 'see attachment' in an email, then later forget to attach it, a message will pop up asking if you forgot.
This has definitely helped me! =P
- Undo Send
What? Yes, Gmail has lots of 'lab' features, and this is one of my favourite. It keeps any message you send for 5,10, 15 or 20 seconds, during which you can decide to undo. To use, go to >Settings >Labs >Undo Send >Enable (Really useful for when you realise the second after you send that you addressed the person with Mr. instead of Ms. or something embarrassing like that!)
- Inbox Preview
A static sneak peak of your inbox when Gmail is loading. This lets you quickly see if you have unread mail, and saves you having to wait for your inbox to load. To use, go to >Settings >Labs >Inbox Preview >Enable
A great saver if you sometimes have slow internet connection!
Nov 17, 2010
TeXnic Center Starter
Jan 15, 2010
QDoubleValidator
Oct 6, 2009
How to package the PyQt with VTK application
(Download the version that corresponds with your python version.)
Sep 24, 2009
Navigate Faster with your Keyboard
Moving Cursor
Home................ = to the beginning of line
End................... = to the end of line
Ctrl + Home..... = to the beginning of page
Ctrl + End........ = to the end of page
Deleting
Ctrl + Backspace......= word to the left
Ctrl + Delete.............= word to the right
Selecting
Shift + left arrow...........................= one character to the left
Ctrl + Shift + left/right arrow......= word to the left/right
Shift + Home/End.........................= Select all till Start/Finish
Internet Browser
Ctrl + Enter..................= when entering URLs automatically adds www & .com
Ctrl + w.........................= close window/tab
Alt + Tab.......................= next tab
Alt + Shift + Tab...........= previous tab
Alt + d.........................= Go to url box
Alt + g..........................=Go to search box
Sep 15, 2009
Python loop and modify list
Sep 10, 2009
Picking actors
Sep 5, 2009
Sep 3, 2009
-1 is true (if loops)
myString = 'Hello World'
QStrings and Strings
My problem was that I wanted to find a certain string in the filename, but it was a QString, and not a string. I found that...
to convert a qstring to string, use the str function.
stringB = str(stringA)
In this situation, stringB will be the string version of stringA, which is of type QString. By the way, str works on integers as well.
PyQt Documentation on Qfiledialog
Sep 2, 2009
Backslashes and Forward slashes
Sep 1, 2009
Embedding vtk into a pyqt GUI
import vtk
Aug 26, 2009
VTK displaying finite element mesh using vtkunstructuredgrid from data file of coordinates
Aug 4, 2009
Actor Color / Colour Change
The colour in the actor’s property only takes effect if there is no scalar data available to the actor’s mapper. By default, the mapper’s input scalar data colours the actor, and the actor’s colour is ignored. To ignore the scalar data, use the method ScalarVisibilityOff().
(Taken from the book: The VTK User's Guide; updated for VTK Version 5)
Jul 29, 2009
How to keep your laptop kinda cool (at no cost)
Jul 27, 2009
How to call (or execute) a python file from another
Jul 26, 2009
How to Install VTK for use with Python
I am installing VTK, which I will need to incorporate 3D visualisation in my GUI. I am designing my GUI in Qt, and programming with Python. (Hence, PyQt). To make VTK work with Python, you need to install from binaries, instead of downloading with the windows installer. Feel free to make comments, or ask questions. (I'm not an expert. I am actually a beginner, but I want to document my problems and solutions so that others can be benefited. So feel free to talk here, as it might help others too.)
Download and install:
Cmake(http://www.cmake.org/cmake/resources/software.html)
Python(http://www.python.org/download/releases/)
Download and unzip into a file (we will call this the source file):
VTK(http://www.vtk.org/VTK/resources/software.html): Source: vtk-5.4.2.zip (Don't use the windows installer, because then you can't use Python.)
Then follow these steps:
1. Open the Cmake 2.6 GUI, and type in the path for the source file, and also where you would like to store the binary files.
Source: C:/Qt/vtk-5.4.2 (I have unzipped the source file into this directory called vtk-5.4.2, which is in my 'Qt' folder. Type in the path for your source file.)
Binary: C:/Qt/VTKbin7 (This is an empty folder, into which Cmake will put binaries.)
>Configure
>Choose Visual Studio 8 2005 as generator
>Configure
>Generate
2. Open Visual Studio;
Open File;
Find the folder where Cmake has put your binaries. E.g. C:/Qt/VTKbin7
Open VTK.sln
3. >Build >Configuration Manager >Active solution configuration
>Choose ‘Release’
>Ok
4. >Build
>Build Solution
This will take more than an hour.
5. Now you should be able to find ‘vtkpython.exe’ in your bin/release file. E.g. C:/Qt/VTKbin7/bin/release
Now go to Embedding VTK into a PyQt GUI

