Category "syntax"

Is there another way to write SUM(IIF([CONDITION], 1, 0))?

What SUM(IIF([CONDITION], 1, 0)) does is very simple. So simple, that what I really just want to write is COUNT([CONDITION]) (but that's invalid). Is there a sh

How to put mathematical equations in source code without making it unreadable?

When implementing complex calculations, I found that readability suffered a lot. For example, this formula is absolutely unreadable when translated to code (I c

Sytax error: Missing ), but I don't see it. My quotation marks don't seem to be the problem either

I've been working on this app script trying to automate data from a Google sheet to create events on Google Calendar. I've tried changing the Quotation marks fr

Python, what does an underscore before parenthesis do

Looking through some of the Django code at authentication forms I noticed the following syntax label=_("Username") Normally I would have just used a pair of

Trying to target specific links for styling in CSS

I'm trying to target just the links in my nav bar as I have inserted other dummy links further down in my home page that I want to style on their own. I have tr

Boolean assignment operators in PHP

I find myself doing this kind of thing somewhat often: $foo = true; $foo = $foo && false; // bool(false) With bitwise operators, you can use the &

Why can an Object member variable not be both final and volatile in Java?

If in a class I have a ConcurrentHashMap instance that will be modified and read by multiple threads I might define like this: public class My Class { pri

Best way to "negate" an instanceof

I was thinking if there exists a better/nicer way to negate an instanceof in Java. Actually, I'm doing something like: if(!(myObject instanceof SomeClass)) { /*

What does it mean += in Python?

What does it mean when it's like this: self.something += ('somethin',) What does "+=" mean and what does the comma mean?

Empty productions in RFC 5234 (Augmented BNF)

Does Augmented BNF (as specified by RFC 5234) allow matches to empty string? From reading grammar of the Augmented BNF itself (section 4, ABNF Definition of ABN

OCaml explicit type signatures

In Haskell, it is considered good practice to explicitly declare the type signature of your functions, even though it can (usually) be inferred. It seems like t

Python: Make class iterable

I have inherited a project with many large classes constituent of nothing but class objects (integers, strings, etc). I'd like to be able to check if an attribu