How JDBC URLs get mapped to connections at runtime

Who cares? I recently found the need to mock out a JDBC url to experiment with a new way of testing sqoop without a hard dependency on a particular database installation.  In order to do this, you first need to understand how it is that, at runtime, JDBC drivers connection call URLs get routed to implementation…

useful regex

Date: ^(0[1-9]|1[0-2])/(0[1-9]|1\d|2\d|3[01])/(\d{4})$ mm/dd/yyyy   Email ^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$ xx@163.com   IP ((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?) 255.255.255.255   URL http://(/%5B\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)? http://www.cnn.com exclude some url pattern, like do not want to url containing /pages/:  ‘github.kdc.capitalone.com/pages/xxx’. This is useful in stylus chrome extension when do not want to apply style for certain urls. ^https?://github.kdc.capitalone.com((?!/pages/).)*$  

ios webview url null problem

when i was trying to load a url in the uiWebView, my NSURL object is always nil when i init it this way: NSURL *url = [[NSURL alloc] initWithString: urlString]; This is because: If the string was malformed, returns nil. This method expects URLString to contain any necessary percent escape codes, which are ‘:’, ‘/’,…