escape dictionary key double quotes when doing println dictionary item in Swift

Xcode 7.1+ Since Xcode 7.1 beta 2, we can now use quotations within string literals. From the release notes: Expressions interpolated in strings may now contain string literals. For example, “My name is (attributes[“name”]!)” is now a valid expression. (14050788) Xcode <7.1 I don’t think you can do it that way. From the docs The … Read more

println vs System.out.println in Scala

Predef.println is shortcut for Console.println and you can use Console.setOut or Console.withOut for redirecting. Also, Console.setOut only affects the current thread while System.setOut affects the whole JVM. Additionally Scala 2.9 repl evaluates each line in its own thread, so Console.setOut is not usable there. scala> val baos = new java.io.ByteArrayOutputStream baos: java.io.ByteArrayOutputStream = scala> Console.withOut(baos)(print(“hello”)) … Read more

difference between System.out.println() and System.err.println()

In Java System.out.println() will print to the standard out of the system you are using. On the other hand, System.err.println() will print to the standard error. If you are using a simple Java console application, both outputs will be the same (the command line or console) but you can reconfigure the streams so that for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)