24 karma · joined February 29, 2012
And no, we’re not trying to spread rumors :)
Yes, being a foreigner in China does suck but not for this case.
Every competent developer in China knows how to bypass the firewall.
Anyway, here's a few steps that I would recommend:
1. Go through http://tldp.org/LDP/abs/html/ and http://www.tldp.org/LDP/Bash-Beginners-Guide/html/ , or at least go through the table of contents so that you have a feeling of what bash is capable of. A few important things are: if, while, for, switch, functions, string manipulation, pipe, subshell, command substitution
2. Understand the execution model. Variables in subshell cannot be accessed from the parent shell, this is a common mistake
3. Learn to avoid common pitfalls. I always recommend my colleagues to always quote the variables in double quote, always use "$@" instead of "$*", always use double square bracket instead of single square bracket for testing, use echo to pass return value from functions instead of assigning to global variable
4. Learn awk, sed, grep. Bash can be quite limiting when it comes to data processing and these tools can be quite powerful. You can use bash to glue different filters together at a higher level.
Bash is a fantastic language and there are quite a lot of things that can be much more quickly in bash than in other "proper" languages. A lot of people says that it's too difficult to maintain a shell script beyond a "critical mass" but I believe that if you follow good practices and write modular codes, shell scripts can be very manageable.
Disclaimer: I've never used gettext before.
n.forEach(console.log);
Just tested on Chrome, it gives me an error TypeError: Illegal invocationPython website has since added another download link written in Chinese on their website.
[1]: http://en.wikipedia.org/wiki/Tiananmen_Square_protests_of_19... , called 六四事件 in Chinese, literally means six-four incident since it happened on 4th of June
Same rule applies for driving, walking, and basically everything.
func join(string s1: String, toString s2: String, withJoiner joiner: String)
-> String {
return s1 + joiner + s2
}
join(string: "hello", toString: "world", withJoiner: ", ")
// returns "hello, world"
[1]: https://developer.apple.com/library/ios/documentation/swift/... mi = dict((v,k) for k,v in m.iteritems()) 5. 193 ^(?!.*(.)(.)\2\1)
11. 379 ^\*(er|[fiptv])|^([blpw]|c[hor]|do|mi|re) ^\*(er|[fiptv])|^([blpw]|c[hor]|do|re|mi)
and it has "do re mi" in it! > ^(?!(.)(.)\3\2)$
> But now it matches nothing.
Things like (?!..) are called assertions. I like to think of assertions as patterns that match the space between two characters. So (?!a) means that it matches the space, where the next character is not 'a'.So in this case, your regex matches an empty string (since it doesn't match any character at all between ^ and $, only spaces.)
> ^((?!(.)(.)\3\2).)∗$
> 1. Why are my backrefs still \3 and \2?
Well, you're referencing the second and third opening parenthesis. > but it counted in my second example above
Maybe that's because your second example is wrong? I mean, I don't really know what you are trying to achieve in your second example.By the way, my solution for abba is
^(?!.*(.)(.)\2\1)
I guess you'll will be able to figure out what this regex means by now :) ^[a-g]*[^a-g]*$