How do you print a dollar sign $ in Dart

Dart strings can be either raw or … not raw (normal? cooked? interpreted? There isn’t a formal name). I’ll go with “interpreted” here, because it describes the problem you have. In a raw string, “$” and “\” mean nothing special, they are just characters like any other. In an interpreted string, “$” starts an interpolation … Read more

How to select all leaf nodes using XPath expression?

Use: //node()[not(node())] In case only element leaf nodes are wanted (and this needs clarification — are elements that have non-element children considered leaf nodes?), then the following XPath expression selects them: //*[not(*)] Both expressions above are probably the shortest that select the desired nodes (either any-node or element — leaf nodes).

Go golang, syntax error: unexpected ++, expecting :

Go Frequently Asked Questions (FAQ) Why are ++ and — statements and not expressions? And why postfix, not prefix? Without pointer arithmetic, the convenience value of pre- and postfix increment operators drops. By removing them from the expression hierarchy altogether, expression syntax is simplified and the messy issues around order of evaluation of ++ and … Read more

Understanding the simplest LLVM IR

define i32 @main() #0 This defines a function called main that returns a 32 bit integer. The #0 means to use the attributes named #0 for the function. For example, there may be something like attributes #0 = { alwaysinline alignstack=4 } in the IR, and these attributes will be applied to main. %1 = … Read more

Dash double semicolon (;;) syntax

;; is only used in case constructs, to indicate the end of an alternative. (It’s present where you have break in C.) case $answer in yes) echo ‘yay!’;; no) echo ‘boo!’;; esac Syntactically, ; and & both mark the end of a command. A newline is equivalent to ;, in a first approximation. The difference … Read more

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