Monday, July 30, 2012
Mac OSX hints resources
Here are the resources of many hints you would to know about your Mac:
macosxhints.com
macworld.com
http://mac.appstorm.net/roundups/utilities-roundups/40-super-secret-os-x-lion-features-and-shortcuts/
http://computerlearnhow.com/list-of-97-mac-os-x-keyboard-shortcuts
Useful utility CheatSheet: http://itunes.apple.com/us/app/cheatsheet/id529456740?mt=12
Why there is no update for Android 4 for HTC HD
Read the article "HTC: Desire HD to stay on current software, no ICS update" about why there is no update for Android 4 for HTC HD.
Mac OSX Central Update Manager Alternative
There is no Central Update Manager on Mac as it is on Linux. If you want something like that you can use 3rd party application AppFresh as its alternative. It will update 99% of your soft.
Download AppFresh here http://osx.iusethis.com/app/appfresh
Download AppFresh here http://osx.iusethis.com/app/appfresh
Saturday, July 28, 2012
How to Attach Java Source Code in Eclipse
Here is the simple way how to Attach Java Source Code in Eclipse:
WAY 1
WAY 1
1. Go to the page where this source is located (in my case it was not something like src.zip or FILE, but whole FOLDER with everything you need): http://download.java.net/openjdk/jdk6/ This is how this page it looks like http://nekaka.com/d/quyFnl0ynC
2. Download archive with the name "openjdk-6-src-b25-01_may_2012.tar.gz" (as an example).
Or download it directly from this link: http://nekaka.com/d/92tCNq5nhN (I hope it is still there).
3. Again (this is important) when you will unpack this archive you will not find any src.zip, all you need is this very FOLDER with same name openjdk-6-src-b25-01_may_2012.
4. Now this is what you need to do in Eclipse - press the button "Attach Source", here is like it looks like http://cavdar.net/uploads/2008/07/method1.gif and... THIS IS VERY IMPORTANT (this super hint costs many hours) choose EXTERNAL FOLDER (NOT FILE) pointing to the unpacked folder with the source code openjdk-6-src-b25-01_may_2012.
5. Press OK and that's it. Once again: don't look for the magic file SRC.ZIP
WAY 2
1. Do everything as it is in WAY 1, but instead of selecting openjdk-6-src-b25-01_may_2012 folder do select sources from Android SDK folder:
LINKS:
Downloading the Source Tree on source.android.com
Friday, July 27, 2012
Mac OS X Internals: A Systems Approach
If you want to know more about Mac OS X buy this book "Mac OS X Internals: A Systems Approach".
You must have it!
http://www.amazon.com/Mac-OS-Internals-Systems-Approach/dp/0321278542
You must have it!
http://www.amazon.com/Mac-OS-Internals-Systems-Approach/dp/0321278542
Wednesday, July 11, 2012
Java Collection Set to Array
If you want to change your Set implementation to Array this is the way you can make it:
Set<String> set = new HashSet<String>();
String[] array = set.toArray(new String[set.size()]);
String[] array = set.toArray(new String[set.size()]);
Tuesday, May 1, 2012
Android: How to refer to the current activity inside of a listener.
Instead of this use YourActivityName.this where YourActivityName is the class name of your Activity subclass.
Explanation: You are creating an anonymous inner class when you use this part of your code: "new OnClickListener() {". Anonymous inner classes have a reference to the instance of the class they are created in. It looks like you are creating it inside an Activity subclass because findViewById is an Activity method. Activity's are a Context, so all you need to do is use the reference to it that you have automatically.
Refer to this link for more explanation.
Thursday, April 19, 2012
How to run GWT test with Maven
If you want to run just one test do this:
1. Go to the module where your tests live. In my case it is here:
MBPro-2:ui-common apple$ pwd
/Users/apple/Documents/workspace/svn/TRT-1##9/t0-mvn/ui-common
MBPro-2:ui-common apple$
2. Then run the test
mvn -Dtest=HostlistExprTestGWT test
HostlistExprTestGWT is the name of the test without its extension.
1. Go to the module where your tests live. In my case it is here:
MBPro-2:ui-common apple$ pwd
/Users/apple/Documents/workspace/svn/TRT-1##9/t0-mvn/ui-common
MBPro-2:ui-common apple$
2. Then run the test
mvn -Dtest=HostlistExprTestGWT test
HostlistExprTestGWT is the name of the test without its extension.
Thursday, March 22, 2012
Java and Python password generators resources
Python password generator code:
SecureRandom sr = new SecureRandom();
#!/usr/bin/python
import random, string
myrg = random.SystemRandom()
length = 10
# If you want non-English characters, remove the [0:52]
alphabet = string.letters[0:52] + string.digits
pw = str().join(myrg.choice(alphabet) for _ in range(length))
print pw
Java password generator resource:
import java.security.SecureRandom;
import com.Ostermiller.util.RandPass;
public class PasswordGenerater {
public static void main(String[] args) {
RandPass rp = new RandPass(sr);
System.out.println(rp.getPass());
}
}
Tuesday, February 28, 2012
How to set new environment variable on Mac
Subscribe to:
Posts (Atom)
