Creating or referencing variables dynamically in Sass

This is actually possible to do using SASS maps instead of variables. Here is a quick example: Referencing dynamically: $colors: ( blue: #007dc6, blue-hover: #3da1e0 ); @mixin colorSet($colorName) { color: map-get($colors, $colorName); &:hover { color: map-get($colors, #{$colorName}-hover); } } a { @include colorSet(blue); } Outputs as: a { color:#007dc6 } a:hover { color:#3da1e0 } Creating … Read more

Removing double quotes from variables in batch file creates problems with CMD environment

You have an extra double quote at the end, which is adding it back to the end of the string (after removing both quotes from the string). Input: set widget=”a very useful item” set widget set widget=%widget:”=% set widget Output: widget=”a very useful item” widget=a very useful item Note: To replace Double Quotes ” with … Read more

Is it possible to create a multi-line string variable in a Makefile

Yes, you can use the define keyword to declare a multi-line variable, like this: define ANNOUNCE_BODY Version $(VERSION) of $(PACKAGE_NAME) has been released. It can be downloaded from $(DOWNLOAD_URL). etc, etc. endef The tricky part is getting your multi-line variable back out of the makefile. If you just do the obvious thing of using “echo … Read more

What’s the difference between parenthesis $() and curly bracket ${} syntax in Makefile?

There’s no difference – they mean exactly the same (in GNU Make and in POSIX make). I think that $(round brackets) look tidier, but that’s just personal preference. (Other answers point to the relevant sections of the GNU Make documentation, and note that you shouldn’t mix the syntaxes within a single expression)

Why are variables “i” and “j” used for counters?

It comes ultimately from mathematics: the summation notation traditionally uses i for the first index, j for the second, and so on. Example (from http://en.wikipedia.org/wiki/Summation): It’s also used that way for collections of things, like if you have a bunch of variables x1, x2, … xn, then an arbitrary one will be known as xi. … Read more

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