18 Mar 2010, 1:32pm

7 comments

Bank of China – Wire Transfer Info

Just spoke with the BoC regarding wire transfers and such.

RMB is not a settlement currency so you cannot wire it directly.  Instead, whatever currency you wire will sit in your BoC account, in that currency.  Then you must go to the bank with your passport to convert it.  USD$50,000 conversion limit applies per year.

The good news is that the conversion rate that applies is basically the market spot-rate.  Listed here as “Buying Rate”:  this is substantially better than the whopping 3% fee (due to currency spread) you pay at the “Cash Buying Rate” (i.e. over the counter in a money exchange).

There is no fee to receive the money (unlike HSBC in Australia), nor any direct fees on the currency transfer.

BoC hotline is 95566.  The lady I spoke to had excellent english, and knew exactly what she was talking about.  That’s more than I can say about a lot of operators for Australian banks.

Going the *other* way is more problematic.  You cannot transfer RMB out directly (same reason you cannot transfer it in directly).  And changing the RMB back to a settlement currency requires you to prove the source of the funds, apparently involving a visit to a government branch (read: PITA).  More info on that is apparently here. Then if you do change it back from RMB, you can transfer it out again, for a fee.  If you were not physically in China, I don’t know how any of this would be possible.

Net result:  I think I’ll just transfer in only what I plan to spend.

From my memory filling out the customs entry forms, limits also apply to the amount of RMB notes you can take in and out of the country. Something like ¥6,000.  So that limits you from taking the RMB notes out of the country and converting it elsewhere (unless you are a fan of stuffing money down your underpants).

11 Mar 2010, 1:39am

leave a comment

iPhone dev – forcing the user language

From my post on StackOverflow

You can force the language like so:

[[NSUserDefaults standardUserDefaults] setObject: [NSArray arrayWithObjects:@"en", nil] forKey:@"AppleLanguages"];

And undo this setting by:

[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"AppleLanguages"];

Consider if you need to call [[NSUserDefaults standardUserDefaults] synchronize];

This change is persistant and only needs to be set once.

NB. you will normally have to restart the app for this to take affect.

I agree there is little need to allow the user to specify a language. However the one exception is being able to override the language and set it to the developer’s native language. If the user can speak the developer’s language (e.g. English for me) then they may wish to use the App in that language, if the translations are incorrect.

I reference this answer: http://stackoverflow.com/questions/1669645/how-to-force-nslocalizedstring-to-use-a-specific-language/1670524#1670524 (the answer doesn’t actually work for me, but following the ideas in the comments did. The undo stuff I worked out.

8 Mar 2010, 12:04pm

2 comments

Objective-C: NSArray of weak references

Need an array of weak references? e.g. for delegates. Here’s some good tips.

One convenient way is to box it in a NSValue with a non-retained object.

NSValue *value = [NSValue valueWithNonretainedObjectValue:myObj];
[array addObject:value];

and when you get the object:

value = [array objectAtIndex:x];
myObj = [value nonretainedObjectValue];
3 Mar 2010, 7:41pm

1 comment

Simple Java ReplaceAll for string literals (i.e. no regex)

Regex is great.  Really great.  But sometimes you just don’t want it.  Java provides a Stirng.replaceAll method but it uses regex and both parameters MUST be escaped if you just want a string literal replace.

Use Pattern.quote for the first param of Stirng.replaceAll, and Matcher.quoteReplacement for the second.

Here’s an example on how to escape the regex parameters:

String myString = “foo[]bar”;
myString = myString.replaceAll(Pattern.quote(“foo[]“), Matcher.quoteReplacement(“bar$”));
System.out.println(myString);
// output bar$bar

If you don’t believe me, try the above sample with

myString = myString.replaceAll(“foo[]“, “bar$”);

(you will get exceptions for both arguments if you try).

Hope that helped…

 

free winrar download

free winrar download

winrar download free

winrar download free

windows 7 key generator

windows 7 key generator

windows 7 activation crack

windows7 activation crack

free winzip

free winzip

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

windows 7 crack

windows 7 crack

winzip free download full version

winzip free download full version

winzip activation code

winzip activation code

windows 7 product key

windows 7 product key
\n