underscore

Parsing XML with nodes containing underscores.

How do I parse an XML document that contains nodes where underscores exist? <some_xml> <child_node> <child width_info="" height_info="" /> </childnode> </some_xml> I tried this: for each (var item:XML in Environment._XMLData.some_xml.child_node.child){ trace(child.@width_info); } But that does'nt seem to work. I...

Implicit vs explicit getters/setters in AS3, which to use and why?

Since the advent of AS3 I have been working like this: private var loggy:String; public function getLoggy ():String { return loggy; } public function setLoggy ( loggy:String ):void { // checking to make sure loggy's new value is kosher etc... this.loggy = loggy; } and have avoided working like this: private var _loggy:String;...

SEO difference between dash and hypen

I understand with dashes once can search for keywords in different order. What if my keyword has a space in it like real estate or New York Should I use underscores in this case? If I do a Google search for New_York Google hints me: Did you mean: New York There is clearly a difference. Even capitals seems to make a difference, lookin...

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://djangosnippets.org/snippets/494/) What is the meaning of the leading underscores? And why is the second value in the tuple even parent...

Embedded video with an underscore in youtube ID won't work on iPhone

I can get all 5 videos working on my computer's browser, but the fourth video fails on my iPhone (via Safari). http://basenycapp.s3.amazonaws.com/stream.html I think it's because the youtube id has an underscore in it. For each video, I'm embedding the youtube videos with the following: <object width="70" height="60"><param name="movi...

Underscore function

I'm here watcing at some C source code and I've found this: fprintf(stderr, _("Try `%s --help' for more information.\n"), command); I already saw the underscore when I had a look at wxWidget, and I read it's used for internationalization. I found it really horrible (the least intutive name ever), but I tought it's just another weird w...

Use SerializeJSON to return an array of structs instead of JSON object with COLUMNS and DATA nodes?

Hi all, I am building a Railo app which deals with a lot of JSON data sent back and forth via Ajax. I've identified an opportunity to optimize its performance, but I'd like to hear some advice from the community before I tackle it. Here is a good example of the situation. I have an action on the server that queries a set of bid respon...

doctrine 2 Annotations and Zend Framework underscore convention

I am working through the doctrine 2 (Beta3) sandbox and trying to apply the Zend Framework coding convention of placing a leading underscore to private class members. When I query Address, while its private members are NOT underscored, i retrieve the object as expected. When I add the underscores, regenerate and repopulate the db, and th...

Trailing underscores for member variables in C++

I've seen people use a trailing underscore for member variables in classes, for instance in the renowned C++ FAQ Lite. I think that it's purpose is not to mark variables as members, that's what "m_" is for. It's actual purpose is to make it possible to have an accessor method named like the field, like this: class Foo { public: bar...

zend framework 2 underscore private

Will Zend Framework 2 continue to place underscores in front of private members and methods of classes? e.g: class blah { private $_name; private function _doSomethingToName() { } } I see that they are still there in the dev release of ZF2. ...

Underscore.js: how to chain custom functions

Using Underscore.js, I can write the following which returns 42: _([42, 43]).chain() .first() .value() I have custom function, not part of Underscore.js called double(): function double(value) { return value * 2; }; I would like to be able to call this function in an Underscore chain, as if it was part of Underscore. I woul...