Shortcuts to position screens on ultra wide screens
left (Ctrl+Super+Left):
wmctrl -r :ACTIVE: -e 0,0,0,1280,1032
right (Ctrl+Super+Right):
wmctrl -r :ACTIVE: -e 0,1280,0,1280,1032
left (Ctrl+Super+Left):
wmctrl -r :ACTIVE: -e 0,0,0,1280,1032
right (Ctrl+Super+Right):
wmctrl -r :ACTIVE: -e 0,1280,0,1280,1032
My .gitconfig contains
[user]
email = dan@bodar.com
name = Daniel Worthington-Bodart
[color]
ui = true
[alias]
ci = commit
co = checkout
st = status -sb
nuke = !git checkout -f && git clean -f -d
[push]
default = current
Nat Pryce pointed out these gems:
Precedence:
“The precedence of an infix operator is determined by the operator’s first character.”
Associativity
“The associativity of an operator is determined by the operator’s last character”
This actually made me cry.
As I got quoted recently in “Scala — 1★ Would Not Program Again” I though I finally should write up a little Wat moment we had recently:
So does anyone know “wat” the following Scala code returns? (Value and Type)
List(1,2,3).toSet()
A Set<Int> containing 1,2,3?
Nope how about I give you a clue, there are 2 bugs in this one line:
Yup you guessed it, it returns:
dconf reset -f /org/gnome/gnome-panel/
killall gnome-panel
An alternative approach to just doing CSV export (which is fast and more cross platform/app) is to use web queries (.iqy files that point to fairly HTML) or data queries (.dqy extension but point to the DB)
Pro
Cons
echo 'enabled=0' | sudo tee /etc/default/apport
[extensions]
hgext.bookmarks =
rebase =
hgext.purge =
color =
[ui]
username = Daniel Worthington-Bodart <***@*****.com>
[merge-tools]
meld.executable = meld
meld.args = $local $base $other -o $output
[auth]
google.prefix = code.google.com
google.username = **********
google.password = **********
google.schemes = http https
[alias]
pull = pull --rebase
nuke = !$HG revert --all --no-backup ; $HG purge
If you use C3PO you can make it do it when it checks the connection out.
As properties:
c3p0.preferredTestQuery=alter session set current_schema=animals
c3p0.testConnectionOnCheckout=true
As Java code:
ComboPooledDataSource dataSource = new ComboPooledDataSource();
dataSource.setPreferredTestQuery("alter session set current_schema=animals");
dataSource.setTestConnectionOnCheckout(true);
Downside is this will happen every time the connection is taken out of the pool
If you are using a JDBC connection yourself you could just do:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection = getConnection("jdbc:oracle:thin:@//server:1521/instance", "username", "password");
connection.createStatement().execute("alter session set current_schema=animals"));
I also posted it to StackOverflow
This is a quick post in response to Elliotte Rusty Harold article titled Why Functional Programming in Java is Dangerous.
Lets look at the some of the points made:
The example that Elliotte uses comes from Bob Martins article done in clojure
(take 25 (squares-of (integers)))
Lets show the same things written in Java with TotallyLazy (Disclaimer: I wrote it) :
range(1).map(squared).take(25);
You could write the same thing with most functional libraries for Java, as pretty much all of them have lazy Lists or lazy Sequences. In fact the clojure example is doing exactly the same thing: integers returns Seq. If you tried to make it return a PersistentList you would have exactly the same OutOfMemoryError exception.