Top "Literals" questions

a notation for representing fixed values in source code

Can I escape a double quote in a verbatim string literal?

In a verbatim string literal (@"foo") in C#, backslashes aren't treated as escapes, so doing \" to get a double quote …

c# string escaping literals verbatim-string
How do you express binary literals in Python?

How do you express an integer as a binary number with Python literals? I was easily able to find the …

python syntax binary integer literals
Empty set literal?

[] = empty list () = empty tuple {} = empty dict Is there a similar notation for an empty set? Or do I have to …

python set literals
SQL Server - boolean literal?

How to write literal boolean value in SQL Server? See sample use: select * from SomeTable where PSEUDO_TRUE another sample: …

sql sql-server boolean literals
Java: how do I get a class literal from a generic type?

Typically, I've seen people use the class literal like this: Class<Foo> cls = Foo.class; But what if …

java generics class literals
How do you specify a byte literal in Java?

If I have a method void f(byte b); how can I call it with a numeric argument without casting? …

java byte literals
What does the M stand for in C# Decimal literal notation?

In order to work with decimal data types, I have to do this with variable initialization: decimal aValue = 50.0M; What …

c# decimal literals
Setting Short Value Java

I am writing a little code in J2ME. I have a class with a method setTableId(Short tableId). Now …

java literals primitive-types
python ValueError: invalid literal for float()

I've a script which reads temperature data: def get_temp(socket, channels): data = {} for ch in channels: socket.sendall('KRDG? %…

python literals
Why does instanceof return false for some literals?

"foo" instanceof String //=> false "foo" instanceof Object //=> false true instanceof Boolean //=> false true instanceof Object //=> false …

javascript literals instanceof