Monday, July 20, 2009

build.xml does not exist! - Apache Ant

Problem: When trying to run a command with ant after installation, you might see this error:
Buildfile: build.xml does not exist!
Build failed

Solution/Explanation: This message is showing you that ant works and that it is looking for your project file. The documentation by Apache gives this explanation:
You can check the basic installation with opening a new shell and typing ant. You should get a message like this
Buildfile: build.xml does not exist!
Build failed
So Ant works. This message is there because you need to write an individual build file for your project. With a ant -version you should get an output like
Apache Ant version 1.7.0 compiled on December 13 2006
You can see that this is not really an error but just a notification.

Friday, July 10, 2009

Linux Permission Made Easy

When learning Linux, sometimes people have a tough time understanding how folder/file/application permissions work. I am writing this to show you a quick easy way to figure out which permissions to use.

Problem: 
Folder/file permissions on Linux can be difficult to understand. Sometimes you will see 0775 or 735 or if you are looking at files in Linux (using ll or similar command) you will see something like -rw-rw-r--.

Solution: Figuring out what these mean is easy, you just need to perform two steps and you can have permissions the way you want in no time. Also, keep in mind that the 0775 is basically the same as 735, the leading zero on the second has been removed and is not displayed in this report. For the purposes of this post, we are going to ignore the leading zero. Let's look real quick how 0775 (or 735) and the display of "-rw-rw-r--" relate.

Understanding how we got the 7
The second number of 0775 is actually made of from this simple chart by adding which permissions you want enabled:
4 : Read
2 : Write
1 : Execute
0 : None

These four options are compined in various ways to give you exactly the permission you want for each digit in the full sequence of 0775. The second number has all the permissions ( 4+ 2 + 1 = 7) meaning it can be read, written, and executed (if executable). Like wise, setting this to read and write only, would equal the number 6.

So, now understand the full sequence as it applied to the file/folder/application
The numbers representing the our demo sequence of 0775 have been charted to show what each one represents.
0 : Reserved (we not discussed this in this tutorial)
7 : User (the permissions of the user)
7 : Group (groups made in Linux, this could be staff, etc.)
5 : World (the permissions the rest of the world [or in our case, operating system users/guests])

Now let's look at how 0775 and -rw-rw-r-- relate
You may have already guessed it, but here it goes. You will notice there are 3 main permissions (read, write, execute). The first letter in the sequence -rw-rw-r-- is that one that we don't talk about in this tutorial, the leading zero in 0775. The next three letters or hyphens (rw-), make up the read, write, and execute permissions for the user group. The following 3 after that make up the permissions for the Group. And the last 3 represent the world permissions.

Now you hopefully have an idea of how to read, understand, and how to set up your own permissions.

Disclaimer: At the time of writing this, I am new to some things Linux and am bound to get things wrong. If I have listed something incorrectly, please let me know so I can change it and provide good reliable information. Thanks.

Thursday, July 2, 2009

Windows Bug - Exabytes of Temporary Internet Files

It recently came to my attention when performing a Disk Cleanup, that Windows has begun telling me I have 4.70 EB (fyi 1 Exabyte = 1073741824 GB, I guarantee my laptop only has 120 GB max). When I went to search this out online, I didn't find much online except one other guy's forum posting. I decided to create this post and report on what I find. Looking closer into my temp i-files, the largest file I found, was a 350 MB Photoshop file.

It seems that somehow, one of my files is causing Vista to report incorrectly on space. After running Disk Cleanup Utility, this problem still existed.

I decided to try using Glary Utilities, some great personal tools for computer maintenance and management.

Although, these tools are great and cleared out another couple GBs of wasted space, the problem still exits. I am guessing I will have to do a post later to follow up on this situation. Good luck to anyone looking for a solution, and if you find one, please post me a comment about it. Thanks.





Well it looks like my computer needed a restart.

Native Screenshot of Application in Windows Trick

I learned about this at work and thought it was really cool and figured I would put it on my blog.

If you are like me, sometimes you want to take screen shots of just one window or application (instead of 3+ screens as I know some of the people have).

The normal screenshot is done using the Print Screen button on your keyboard, sometimes on laptops, etc. the button will read "Prt Scr".

When you hit this button and paste it into a graphics program, it will place a screenshot of your entire desktop(s).

Problem:
Normal Print Screen takes a picture of the screen and not the application or window in focus. If you have to open a editing program and go cropping the image, it just isn't any fun.

Solution:
You hold down the Alt key when you hit Print Screen or Prt Sc.

Hope this is useful and saves you time without having to get a program just for cropping or screenshots (plus there is a tool built into Vista to help with this called Snipping Tool)