A very interesting video from TED Talks, Dan Ariely speaks about how people make decisions and how it’s so easy to influence ones choices. Are you sure you decide yourself, or are others taking the decisions for you?
Enjoy…
If you use pidgin, but as me hate the ugly smileys that it has, then this is right for you: yahoo smileys pack. Simply drag and drop the file in Preferences -> Smiley Themes. Enjoy
Download: yahoo9pidgin.tar.gz
I was thinking these days about how much time we, programmers, spend working with our editor per day…. a lot! So i thought about a list of keyboard shortcuts for eclipse that could (or better said should) make our life a lot easier:
- Ctrl+Shift+T (Find Java Type) - Start typing the name and the list gets smaller. Try typing the capital letters of the class only (e.g. type “CME” to find “ConcurrentModificationException”)
- Ctrl+Shift+R (Find Resource) - Use this to look for XML files, text files, or files of any other type. which are in your workspace.
- Ctrl + Q (Last Edit) - Go to the location on code where you last edited
- Ctrl+E (Open Editor Drop-Down) - Presents a popup window listing currently opened files. Start typing to limit the list or simply use the down arrow key.
- Ctrl+O (Quick Outline) - Use this to find a method or a member variable in a class. Start typing to limit the choices. Press Ctrl+O a second time to include inherited methods.
- Ctrl+Space (Content Assist) - Context sensitive content completion suggestions while editing Java code.
Ctrl+Shift+Space (Context Information) - If typing a method call with several parameters use this to show the applicable parameter types. The current parameter where the cursor is will be shown in bold. - Ctrl+Shift+O (Organize Imports) - After typing a class name use this shortcut to insert an import statement. This works if multiple class names haven’t been imported too.
- F3 (Open Declaration) - Drills down to the declaration of the type, method, or variable the cursor is on. This works much like a browser hyperlink.
- Alt+Left/Right (Backward/Forward History) - This works like a browser’s Back & Froward buttons.
- Ctrl+L (Go to Line) - Go to a specific line number.
- F4 (Open Type Hierarchy) - Show the type hierarchy (downward tree) or the supertype hierarchy (upward tree).
- Ctrl+Alt+H (Open Call Hierarchy) - Show where a method is called from. In the Call Hierarchy view keep expanding the tree to continue tracing the call chain.
- Ctrl+H (Open Search Dialog) - Opens a search dialog with extensive search options for Java packages, types, methods, and fields.
- Alt+Shift+R (Rename/Refactor) - Refactoring Use this to rename type, method, or field. All existing references will be refactored as well.
- Alt+Shift+L (Extract Local Variable) - Use this to create a local variable from the selected expression. This is useful for breaking up larger expressions to avoid long lines.
- Alt+Shift+M (Extract Method) - Use this to extract a new method from existing code. The parameter list and return type will be automatically created.
- Ctrl+Up / Down (Scroll Line Up / Down) - Very handy if you want to scroll by 1 line without changing your cursor position or using the mouse.
- Ctrl+Shift+Up / Down (Go to Previous / Next Member - Great for stepping down through the methods of a Java source file.
- Ctrl+Shift+P (Go to Matching Bracket Helps to find the closing bracket of lengthly if-else statements.
- Ctrl+J (Incremental Find - adding Shift makes it work in reverse) - The first matching occurrence is shown with each typed letter. Press again and the next matching occurrence is shown.
- Shift+Enter(+Ctrl) - (Insert Line Below /Above) - Insert a line above or below the current line.
- Ctrl+/ or \ (Add / RemoveBlock Comment) - Comment in/out blocks of code with a key stroke.
- Ctrl+M (Maximize Active View or Editor) - Maximize the current view or editor at the expense of all other currently shown views. Press again to restore to normal view.
- Ctrl+Alt+Up / Down (Duplicate Lines) - Doesn’t seem like it at first but a great shortcut once you learn to use it. Instead of select, copy and paste simply select and duplicate without affecting the clipboard.
- Alt+/ (Word Completion) - This is excellent for code editing or writing plain help files with variables and other words having no English language equivalents. The word completion is based on the set of words already present in the current file.
- Ctrl+I (Correct Indentation) - Select a block of Java code or an entire class file and use this shortcut to correct its indentation.
Enjoy and use them, will spare you a lot of time!
You have a make powered application, but you want to make it run through ant (for example if you want to integrate your application into maven) ? Well, it seems that this is easyer than i thought… you just need to add a build.xml in the application’s path, and add all your make rules as ant targets:
<?xml version='1.0'?> <project name="MyProject" xmlns:ac="antlib:net.sf.antcontrib" default="help" basedir="."> <!-- ****************** BUILD ********************* --> <target name="build"> <exec executable="make" failonerror="true" logerror="true"> <arg value="--file=Makefile" /> <arg value="build" /> </exec> </target> ..... </project>
This assumes that your Makefile is located in the same folder as your new-created build.xml. And now voilla:
~/$ ant build
Buildfile: build.xml
build:
[exec] building MyProject
.............
Soooo…
I am migrating my former google project to assembla. The main problem was that i could not find through the google admin a way of exporting my repository. After a bit of searching i realized i have to migrate my repository from a local copy. So the steps are:
1. install svk
sudo apt-get install swk
2. create a local copy of the project
svk ls <https://project.svn.url.here>
this step will create in your ~/.svk/local a copy of the repository
in the step where svk asks you for the depot path, choose the folder name you want to import the project into for the new repository
Depot path: [//mirror/svn] //<project-name>
3. now you can create a dump file from the local repository copy for project
svnadmin dump ~/.svk/local > <project-name>.dump
You can now use the resulting dump file to import it in the new location or use it as backup.










Recent Comments