Top "Literals" questions

a notation for representing fixed values in source code

escaping question mark in regex javascript

This is a simple question I think. I am trying to search for the occurrence of a string in another …

javascript regex literals
Best way to convert string to array of object in javascript?

I want to convert below string to an array in javascript. {a:12, b:c, foo:bar} How do I convert …

javascript jquery arrays literals string-literals
What does preceding a string literal with "r" mean?

I first saw it used in building regular expressions across multiple lines as a method argument to re.compile(), so …

python string syntax literals rawstring
Python regex - r prefix

Can anyone explain why example 1 below works, when the r prefix is not used? I thought the r prefix must …

python regex string literals prefix
String literal with triple quotes in function definitions

I am following the Python tutorial and at some point they talk about how the 1st statement of a function …

python string literals
C# short/long/int literal format?

In C / C# / etc. you can tell the compiler that a literal number is not what it appears to be (…

c# literals language-specifications
Why can't Python's raw string literals end with a single backslash?

Technically, any odd number of backslashes, as described in the documentation. >>> r'\' File "<stdin>", …

python string literals rawstring
Why is [] faster than list()?

I recently compared the processing speeds of [] and list() and was surprised to discover that [] runs more than three times …

python performance list instantiation literals
What is array literal notation in javascript and when should you use it?

JSLint is giving me this error: Problem at line 11 character 33: Use the array literal notation []. var myArray = new Array(); What …

javascript arrays jslint literals
How to declare an array inline in VB.NET

I am looking for the VB.NET equivalent of var strings = new string[] {"abc", "def", "ghi"};

arrays vb.net literals