All Questions

761
votes
5answers
191231 views

What are the rules about using an underscore in a C++ identifier?

It's common in C++ to name member variables with some kind of prefix to denote the fact that they're member variables, rather than local variables or parameters. If you've come from an MFC background,...
881
votes
12answers
245111 views

What is the meaning of a single- and a double-underscore before an object name?

I want to clear this up once and for all. Can someone please explain the exact meaning of having leading underscores before an object's name in Python? Also explain the difference between a single and...
388
votes
3answers
151496 views

What is the purpose of the single underscore "_" variable in Python?

What is the meaning of _ after for in this code? if tbh.bag: n = 0 for _ in tbh.bag.atom_set(): n += 1
57
votes
3answers
32915 views

Underscore _ as variable name in Python

Peter Norvig has an essay describing a program to solve sudoku puzzles, even the hardest ones, by combining deterministic logical operations and smart traversal of the possible solutions. The latter ...
69
votes
1answers
20579 views

Scala underscore - ERROR: missing parameter type for expanded function

I know there have been quite a few questions on this, but I've created a simple example that I thought should work,but still does not and I'm not sure I understand why val myStrings = new Array[Strin...
37
votes
2answers
6675 views

what does a underscore and interface name after keyword var in golang mean?

http://golang.org/src/pkg/database/sql/driver/types.go 30 type ValueConverter interface { 31 // ConvertValue converts a value to a driver Value. 32 ConvertValue(v interface{}) (Value, erro...
177
votes
9answers
115025 views

Converting camel case to underscore case in ruby

Is there any ready function which converts camel case Strings into underscore separated string? I want something like this: "CamelCaseString".to_underscore to return "camel_case_string". .....
17
votes
2answers
2863 views

How to get the sort order in Delphi as in Windows Explorer?

Summarization: The terminology that I have been looking for seems to be "natural sort". For behaviors in operating systems: For Windows (version >= XP), Windows Explorer utilizes natural sort. For...
10
votes
3answers
10301 views

iOS: Usage of self and underscore(_) with variable

Possible Duplicate: How does an underscore in front of a variable in a cocoa objective-c class work? I have been very confused with using self or underscore with variable name after synthes...
38
votes
1answers
6559 views

Django: Meaning of leading underscore in list of tuples used to define choice fields?

I've seen a few examples defining choice fields like so: COUNTRIES = ( ('fr', _('France')), ('de', _('Germany')), ... ) (source: http://code.djangoproject.com/ticket/5446 Also see: http...

Previous Next