17.1.12
Vim Cheatsheet
http://worldtimzone.com/res/vi.html
14.1.12
APB Patch
Recently, I had this client manifest download failed error from the APB launcher. I was unable to update the game. Go to the link below for a manual patch update instead.
http://apbcorner.com/file-manager/browse/Patches
5.1.12
Top 25 Animes of 2011
1. Puella Magi Madoka Magicavia SC & most probably via biglobe
2. Ano Hi Mita Hana
3. Working!!
4. Dog Days
5. Hanasaku Iroha
6. Nichijou
7. Boku wa Tomodachi ga Sukunai
8. Baka to Test II
9. Ro-Kyu-Bu!
10. YuruYuri
11. Tamayura -hitotose-
12. Ika Musume
13. Natsume’s Book of Friends
14. Infinite Stratos
15. Hidan no Aria
16. GOSICK
17. Blue Exorcist
18. Ben-to [tied]
19. Ikoku Meiro no Croisée
20. Chihayafuru
21. Mashiroiro Symphony
22. Mayochiki!
23. The World Only God Knows
24. Denpa Onna to Seishun Otoko
25. Heaven’s Memo Pad
31.12.11
Teleport your lost companion to you!
On PC: (try the simpler console methods above first)
- Save your game.
Reload a game where your follower is with you.
- Now open the console with the `/~ key on your keyboard.Click on your follower, and it should display their ID in brackets. For instance, with Erandur it displayed: " (00024280). Write this number down.
- Reload your current game (the one where you're looking for your follower), and open the console again.
Type in 'prid putfolloweridhere' (selects any object in the game)
Hit enter.
Followed by 'moveto player' (moves that object to your location)
Then hit enter, and they should be moved to you. Close the console again by pressing the `/~ key.
Example: to move Erandur to your location:
Type: `
Type: prid 00024280 (enter)
Type: moveto player (enter)
Type: `
Erandur will appear next to you.
Followers moved with this method will still have all their items etc from last time you saw them.
Some follower IDs:
Layla: 000a2c94
Erandur: 00024280
29.12.11
Android Market on EFUN nextbook Premium 8
forum.xda-developers.com/showthread.php?t=1374742&page=1
which is based on..
http://www.slatedroid.com/topic/25575-e-fun-nextbook-8-premium-next8p-modification/
Currently, there is an issue with the camera if you root it. So beware!
Also, click here for a review of the EFUN nextbook Premium 8.
16.12.11
Even or Odd? (Java)
http://www.roseindia.net/java/beginners/IfElse.shtml
import java.io.*;
public class IfElse{
public static void main(String[] args) throws IOException{
try{
int n;
BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));
n = Integer.parseInt(in.readLine());
if (n % 2 == 0)
{
System.out.println("Given number is Even.");
}
else
{
System.out.println("Given number is Odd.");
}
}
catch(NumberFormatException e){
System.out.println(e.getMessage()
+ " is not a numeric value.");
System.exit(0);
}
}
} Convert numbers in to words (Java)
Convert numbers in to words (Java)
Short and sweet?
http://www.daniweb.com/software-development/java/threads/67369/page2
Short and sweet?
http://www.daniweb.com/software-development/java/threads/67369/page2
/** Holds the number 1-19, dual purpose for special cases (teens) **/ private static final String[] UNITS = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"}; /** Holds the tens places **/ private static final String[] TENS = {"ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninty"}; /** Covers max value of Long **/ private static final String[] THOUSANDS = {"", "thousand", "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion"}; /** * Represents a number in words (seven hundred thirty four, two hundred and seven, etc...) * * The largest number this will accept is *999,999,999,999,999,999,999but that's okay becasue the largest * value of Long is9,223,372,036,854,775,807. The smallest number * is-9,223,372,036,854,775,807(Long.MIN_VALUE +1) due to a * limitation of Java. * @param number between Long.MIN_VALUE and Long.MAX_VALUE * @return the number writen in words */ public static String numberInWords(long number) { StringBuilder sb = new StringBuilder(); // Zero is an easy one, but not technically a number :P if (number == 0) { return "zero"; } // Negative numbers are easy too if (number < 0) { sb.append("negative "); number = Math.abs(number); } // Log keeps track of which Thousands place we're in long log = 1000000000000000000L, sub = number; int i = 7; do { // This is the 1-999 subset of the current thousand's place sub = number / log; // Cut down number for the next loop number = number % log; // Cut down log for the next loop log = log / 1000; i--; // tracks the big number place if (sub != 0) { // If this thousandths place is not 0 (that's okay, just skip) // tack it on sb.append(hundredsInWords((int) sub)); sb.append(" "); sb.append(THOUSANDS[i]); if (number != 0) { sb.append(" "); } } } while (number != 0); return sb.toString(); } /** * Converts a number into hundreds. * * The basic unit of the American numbering system is "hundreds". Thus * 1,024 = (one thousand) twenty four * 1,048,576 = (one million) (fourty eight thousand) (five hundred seventy six) * so there's no need to break it down further than that. * @param n between 1 and 999 * @return */ private static String hundredsInWords(int n) { if (n < 1 || n > 999) { throw new AssertionError(n); // Use assersion errors in private methods only! } StringBuilder sb = new StringBuilder(); // Handle the "hundred", with a special provision for x01-x09 if (n > 99) { sb.append(UNITS[(n / 100) - 1]); sb.append(" hundred"); n = n % 100; if (n != 0) { sb.append(" "); } if(n < 10){ sb.append("and "); } } // Handle the special cases and the tens place at the same time. if (n > 19) { sb.append(TENS[(n / 10) - 1]); n = n % 10; if (n != 0) { sb.append(" "); } } // This is the ones place if (n > 0) { sb.append(UNITS[n - 1]); } return sb.toString(); }
Subscribe to:
Posts (Atom)
