What is the “pin” operator for, and are Elixir variables mutable?

The data in Elixir is still immutable, but there are couple of shorthands, that let you type less or don’t worry about finding new names. In Erlang, you could often see code like this: SortedList = sort(List), FilteredList = filter(SortedList), List3 = do_something_with(FilteredList), List4 = another_thing_with(List3) In Elixir, you could just write: list = sort(list) … Read more

Java – char, int conversions

The first example (which compiles) is special because both operands of the addition are literals. A few definitions to start with: Converting an int to char is called a narrowing primitive conversion, because char is a smaller type than int. ‘A’ + 1 is a constant expression. A constant expression is (basically) an expression whose result is … Read more

Java: define terms initialization, declaration and assignment

assignment: throwing away the old value of a variable and replacing it with a new one initialization: it’s a special kind of assignment: the first. Before initialization objects have null value and primitive types have default values such as 0 or false. Can be done in conjunction with declaration. declaration: a declaration states the type … Read more

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