identifier

What's the rationale/history for the # convention of identifying methods in Ruby?

For example, I've always seen methods referred to as String#split, but never String.split, which seems slightly more logical. Or maybe even String::split, because you could consider #split to be in the namespace of String. I've even seen the method alone, when the class is assumed/implied (#split). I understand that this is the way me...

iPhone iAd: "no qualified ads found for this request"

Hello, I have a problem with iAd. I have two apps: let's call them AAA and BBB. AAA is a new application which is "Waiting for upload" with iAd enabled. BBB is an existing application which I want to update and is "Waiting for upload" too, with iAd enabled. iAd in AAA works just fine. In BBB it shows this error in the console: Error Do...

Ipad xcode plist problem

Hey guys I'm having a problem with my plist file. Maybe you will be able to figure out the solution. I made a project for ipad, everything is working well on the ipad simulator, absolutely no problem. Now I decided to test it on an ipad device. Therefore I modified the "Bundle Identifier" in the plist which was by default "com.yourcomp...

groovy "def" declarations translates to C language?

i know this sounds totally ridiculous at the moment but trust me, i want something like "$variable" in php or "def" in groovy, by means of my approach is an automatic variable "data type" identification to IMPLEMENT into c language. for example: "def" is a replacement for a type name. In variable definitions it is used to indicate that...

When to use different cell identifiers for retrieving the reused table cells?

Just curious about the identifier used in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath I saw some cases that people use different identifiers for different sections in the uiviewtable, generally speaking, what is the motivation for that? Is it because that, for example, secti...

Gmail URLs - How do you go from a database id to a URL String

Does anybody know how gmail goes from the id of an email in their database to a String URL? I dont really like the idea of putting the actual database id into the URL as this would tell people how many rows of data our in the database and other information. Is there a way of mapping from a database id to an alphanumeric String which is ...

Duplicate Identifier Error

I was just coding on my Lazarus, without changing nothing on the TForm declarations. Then I tried to test my application, but on the compilation I got this error: TomAct.lpr(11,43) Error: Duplicate identifier "TOMACT" TomAct.lpr(15,32) Error: Identifier not found "TForm1" TomAct.lpr(15,39) Error: Identifier not found "Form1" TomAct.lpr(...

How to efficiently identify a binary file

What's the most efficient way to identify a binary file? I would like to extract some kind of signature from a binary file and use it to compare it with others. The brute-force approach would be to use the whole file as a signature, which would take too long and too much memory. I'm looking for a smarter approach to this problem, and I'...

select custom UITableViewCell by Identifier from xib

Hi, I try to fill my UITableView withd different UITableViewCells. I tried to choose 1 of 3 UITableViewCells out of a XIB-file by identifier but I can't get the value of the UITableViewCell's Identifier. - (UITableViewCell *)tableView:(UITableView *)_tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ MyTableViewCell *cell = (...

identifier rename in java program

Hi, I need to programmatically rename identifiers within a given scope, for example, a method in java program. For example, given the following java function: public void doSomething(){ int x = 10; int y = x * 2; int z = x + y; } after renaming the variables (x to a, y to b, and z to c) I should obtain the following function...

MYSQL: Avoiding cartesian product of repeating records when self-joining

There are two tables: table A and table B. They have the same columns and the data is practically identical. They both have auto-incremented IDs, the only difference between the two is that they have different IDs for the same records. Among the columns, there is an IDENTIFIER column which is not unique, i.e. there are (very few) record...

TableLayout background from sdcard

hey :) I want to put a background image in may java file from an image stored on the sdcard. I use the code below but with no success :/ TableLayout tl=new TableLayout(this); int tmp = this.getResources().getIdentifier("sdcard/pic.png", "drawable", getPackageName()); tl.setBackgroundResource(tmp); an idea ? ...

C2065 identifier undeclared

Hi, In my Service.h I have: #include "Configuration.h" and in my class: private: ConfigurationInterface* configuration_; Then, in my Service.cpp: Service::Service(Foundation::Framework* framework) : framework_(framework) { configuration_ = new Configuration(); } and later... const Info GetInfo() { retur...

Referencing inserted elements in a single pass

I'm trying to insert unique IDs and references to those IDs using a single XSLT file. Given the XML: <Parent> <Name>Dr Evil</Name> <Child> <Name>Scott Evil</Name> </Child> </Parent> And this XSLT snippet after an identity transform: <xsl:template match="Parent"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:...

What is the point of unicode escape sequences in identifier names in JavaScript?

JavaScript allows for having unicode escape sequences in identifier names... for example: var \u0160imeVidas = "blah"; The above variable starts with the (croatian) letter Š, so that the complete name of the variable is "ŠimeVidas". Now, this is neat, but what's the point? Is there any scenario where this feature may be of any use? -...

Why are List and String identifiers named "xs" (in Scala and other languages)?

A lot of sample Scala code contains Strings and Collections named "xs" Why xs? Anything to do with the xs: used in XML (for Schema?) Examples: var xs = List(1,2,3) val xs = "abc" ...

Flash - Turning Off Code Identifier Colors By Case?

sometimes Flash Authoring colors my actionscript inappropriately. for example: i have custom variable that i've named "closeButton". closeButton does not reference any of the official classes yet it always colored blue as an identifier. i'm assuming it's referencing some internal, private variable from some class in the frameworks. ...

Error CS1001 (Identifier expected)

Hello, I'm new to programming and am taking a C# class. I am getting compiler error CS1001 when I try to write this program. I read the Compiler Error description (link below), but I'm really not getting it. What am I doing wrong? http://msdn.microsoft.com/en-us/library/b839hwk4.aspx Here is my source code: using System; public cla...

Storing vars and constants during compilation. (sample language)

Background: I'm making a compiler, the scanner and parser is already done. We have our formal grammar, which defines a program as: program = declarations procedureDeclarations main  (  ){   declarations statementSequence } So you can notice that declarations can be either global or local to the main method. So as I pa...

Using strings to identify objects: what's the purpose ?

OGRE3D for example uses strings to identify objects, so each time the code does something on an object using its name (a string), it has to do string operations, and since a 3D engine is very sensitive on speed, how can it be a good way on doing it ? When a computer has to do operations on a string, it does it sequentially, bytes after ...