underscore

What are underscored symbols in a VB DLL?

I have a C++ app in VS2005 and import a VB DLL. IntelliSense shows me all the symbols in the DLL as expected but it also shows all (or nearly all) of them again with an underscore prefix (no @s in them though). Why is this? What are the differences between the underscored items and the normal items? ...

What's the deal with a leading underscore in PHP class methods?

While looking over various PHP libraries I've noticed that a lot of people choose to prefix some class methods with a single underscore, such as public function _foo() ...instead of... public function foo() I realize that ultimately this comes down to personal preference, but I was wondering if anyone had some insight into where th...

Unix sort treatment of underscore character

Hi, I have two linux machines, on which unix sort seems to behave differently. I believe I've narrowed it down to the treatment of the underscore character. If I run sort tmp, where tmp contains the following two lines: aa_d_hh aa_dh_ey one machine outputs aa_d_hh aa_dh_ey (i.e. '_' precedes 'h') while the other outputs aa_dh_e...

How can I configure vim so that movement commands will include underscores and CamelCase, but completion will ignore them?

For example, I currently have this: set iskeyword-=_ This has the effect of making this work: foo_bar If cursor is on "f", pressing w moves cursor to the underscore. Pressing again moves to the "b" in bar. This is the desired effect for movement, but has the undesired side-effect of breaking completion. Same story with CamelCas...

The meaning of a single- and a double-underscore before an object name in Python

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 a double leading underscore. Also, does that meaning stay the same whether the object in question is a variable, a function, a method, etc...

Escaping _ efficiently in Tabular environment, LaTeX

How can you escape underscores only in the tabular environment without the use of \_? This thread discusses about underscore in general. I cannot use the environment verbatim nor the package underscore. Sample data \begin{tabular}{| l | l | p{5cm} |} \hline ...

CSS: camelCase vs under_score

There is much to read out there concerning this old question. Most languages seem to have their preferred style - and everythings ok with this. But what about this question of style in the CSS context? Both is correct and looks fine: someContainerContent vs. some_container_content What do you think? Which is your and what do you th...

What does double underscore ( __const) mean in C?

extern int ether_hostton (__const char *__hostname, struct ether_addr *__addr) __THROW; I found the above function definition in /usr/include/netinet/ether.h on a Linux box. Can someone explain what the double underscores mean in front of const (keyword), addr (identifier) and at last __THROW. ...

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_undescore to return "camel_case_string" ...

What is the meaning of leading underscores in a C++ constructor?

OK I am not a very experienced C++ programmer, but I was wondering what is the significance of the underscores in the arguments of the following constructor? class floatCoords { public: floatCoords(float _x, float _y, float _width, float _height) : x(_x), y(_y), width(_width), height(_height) { } float x, y, width, heigh...

Underscores in Company Name when using C# Settings & LocalFileSettingsProvider

I've noticed that when using the Settings object that's created by a Windows Forms application, any spaces in the "Company Name" field of the assembly info are replaced by underscores in the path of the user.config file. For example, in XP the path to the user.config file will be something like: \Documents and Settings\user\Local Setti...

PHP Preg-Replace more than one underscore

How do I, using preg_replace, replace more than one underscore with just one underscore? ...

_ as variable name in Python

At http://norvig.com/sudoku.html, there's an essay describing a Python program to solve sudoku puzzles, even the hardest ones, by combining deterministic logical operations and smart traversal of the possible solutions. The latter is done recursively; here's the function (from http://norvig.com/sudo.py): def search(values): "Using ...

How to remove cookie with underscore in name in VB6?

I have VB6 web application and I have to remove cookie. Unfortunately cookie has underscore character in name -- exemplary cookie name looks like that: XXXXXXAAASS_session_key. When I try to remove it by assign empty value to it: Response.cookies.Item("XXXXXXAAASS_session_key") = "" I've got a new cookie with name `XXXXXXAAASS%5Fsess...

Underscore in php function

What does it mean when a PHP function name begins with an underscore? for example: __construct() I know what the construct means but I've seen other places where the function begins with an underscore, or a double underscore and I'm just not sure of the significance. ...

temp. removing spaces form array objects

I have an array full of place names. One for eg is "Tower Of London" i want to put it on the end of http://en.wikipedia.org/wiki/ and open it. how do i change the spaces to underscores.. eg 'Tower of London' to 'Tower_of_London'? any ideas appreciated as always :) Cheers ...

How to make MySQL treat underscore as a word separator for fulltext search?

I am using MySQL fulltext and PHP (codeigniter) to search a database containing RSS items. Problem is some of these items's titles use underscores instead of spaces. Since MySQL considers underscores as part of a word, these items will never be matched in the search, unless the user types the exact title including underscores. Server is...

dashes vs underscores in URL

In URL rewriting, i am quite confused that should i use underscore (_) OR hyphen (-) to replace spaces. According to this and this, hyphen should be used. But wikipedia uses underscores like en.wikipedia.org/wiki/Computer_network_programming. so which should be used? ...

Lucene search and underscores

When I use Luke to search my Lucene index using a standard analyzer, I can see the field I am searchng for contains values of the form MY_VALUE. When I search for field:"MY_VALUE" however, the query is parsed as field:"my value" Is there a simple way to escape the underscore (_) character so that it will search for it? EDIT: 4/1/2010 ...

How is a functional programming-based javascript app laid out?

I've been working with node.js for awhile on a chat app (I know, very original, but I figured it'd be a good learning project). Underscore.js provides a lot of functional programming concepts which look interesting, so I'd like to understand how a functional program in javascript would be setup. From my understanding of functional pro...