What does to_proc method mean?

I am learning rails and following this thread. I am stuck with the to_proc method. I consider symbols only as alternatives to strings (they are like strings but cheaper in terms of memory). If there is anything else I am missing for symbols, then please tell me. Please explain in simple way what to_proc means … Read more

What does the SQL # symbol mean and how is it used?

Can someone please explain to me what the # symbol means in MS SQL Code. I’ve tried Googling it, and even searching on StackOverflow, but can’t seem to find the answer. I feel like an idiot – having one of “those” days. Please help. Answer They normally prefix temporary tables. From the docs…. Prefix local … Read more

What does the Ruby method ‘to_sym’ do?

What does the to_sym method do? What is it used for? Answer to_sym converts a string to a symbol. For example, “a”.to_sym becomes :a. It’s not specific to Rails; vanilla Ruby has it as well. It looks like in some versions of Ruby, a symbol could be converted to and from a Fixnum as well. … Read more

Duplicate symbol issues

During a refactor of an iOS project, I ran into this bear of a bug. During the linking phase, I get this message: ld: duplicate symbol _OBJC_IVAR_$_TinCanViewController.currentViewController in /path/to/TinCanViewController-E98A666B7AF2673A.o and /path/to/TinCanViewController-E98A666B7AF2673A.o As far as I can tell, it looks like it claims TinCanViewController-E98A666B7AF2673A.o is declaring the specified symbol twice; both paths are pointing to the … Read more

What does a double colon followed by an equals sign (::=) mean in programming documentation?

What does ::= mean in programming documentation? For example in the Lua documentation: or in Python documentation. Answer It symbolizes ‘symbol derivation rule’ in Backus–Naur Form Meaning that in: <symbol> ::= __expression__ nonterminal <symbol> consists of (is defined as, is constructed from, derives from) __expression__ It’s used to describe language grammars. Notice that both examples … Read more

Missing symbol names when profiling IPhone application with Instruments

I am compiling an IPhone application via command line (so no XCode options involved) and I am unable to get my symbol names to show when profiling with Instruments. I have tried several flags such as -gdawrf-2 and -g without any success. I have also tried using dsymutils to generate a .dSYM file but i … Read more

Why is it not a good idea to dynamically create a lot of symbols in ruby (for versions before 2.2)?

What is the function of symbol in ruby? what’s difference between string and symbol? Why is it not a good idea to dynamically create a lot of symbols? Answer Symbols are like strings but they are immutable – they can’t be modified. They are only put into memory once, making them very efficient to use … Read more

readelf-like tool for Mac OS X? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 6 years ago. Improve this question Is there a tool for reading Mac OS X binaries that would print information about relocation tables and symbol … Read more