symbols

Create a variable name from a string in Lisp

邮差的信 提交于 2019-11-30 23:09:13
问题 I'm trying to take a string, and convert it into a variable name. I though (make-symbol) or (intern) would do this, but apparently it's not quite what I want, or I'm using it incorrectly. For example: > (setf (intern (string "foo")) 5) > foo 5 Here I would be trying to create a variable named 'foo' with a value of 5. Except, the above code gives me an error. What is the command I'm looking for? 回答1: There are a number of things to consider here: SETF does not evaluate its first argument. It

Can a class share a namespace's name?

微笑、不失礼 提交于 2019-11-30 21:45:19
问题 Is the following C++ code valid? namespace Foo { class Bar { // Class code here. }; } namespace Foo { namespace Bar { void SomeFunction(); { // Function code here. } } } In other words, can there be a namespace with the same name as a class? 回答1: You cannot have the arrangement you have in your question because there is no way to disambiguate Bar . My compiler says: error C2757: 'Bar' : a symbol with this name already exists and therefore this name cannot be used as a namespace name 回答2: "can

iPhone unit testing: Symbols not found when calling custom code

孤人 提交于 2019-11-30 20:41:49
问题 I'm trying to set up unit testing for my iPhone application. I followed the Apple Unit Testing documentation through and that woked fine, but as soon as I added another class in to that test, I get the following error: "_OBJC_CLASS_$_RootViewController", referenced from: __objc_classrefs__DATA@0 in AppDelegateTests.o ld: symbol(s) not found collect2: ld returned 1 exit status The application itself is a basic navigation app with Core data for data storage. The unit test is as follows: #import

What's  sign at the beginning of my source file?

断了今生、忘了曾经 提交于 2019-11-30 19:42:36
I have a PHP source file where  characters automatically got added in! I don't know from where they have come. I'm not getting any parse errors but it results in weird behavior in the execution of the file. E.g. header location functionality is not working sometimes! I'm curious how these kind of symbols are getting auto generated? I'm using UTF-8 encoding & the sign  is not showing in Notepad++ or Windows Notepad but with Netbeans IDE. Eg. Code: <?php echo "no errors!"; header("Location: http://stackoverflow.com"); exit; ?> What is this? How can I prevent it? You propably save the

Crash dump - WinDbg - force PDB files to match doesn't work?

跟風遠走 提交于 2019-11-30 19:21:27
I have a crash dump for a customer's application built with a very old version of our dll (release build, don't have original symbols) that I've been analyzing in WinDbg. In order to get more information, I rebuilt the dll in release mode, with symbols this time, using the same compiler version and I believe the same settings as when the dll was originally built. I added the symbol file to my symbol path, but the WinDbg extension !itoldyouso tells me the module in the dump doesn't match the PDB file. Enabling SYMOPT_LOAD_ANYTHING doesn't help either. !itoldyouso tells me they don't match

SVG symbols not being displayed in Firefox

时光毁灭记忆、已成空白 提交于 2019-11-30 17:55:06
问题 I'm currently using SVG symbols to display icons. This works in IE, Chrome, and Safari but the icons don't show up in Firefox. There are lots of similar questions on StackOverflow but most of them are older or aren't using symbols. I'm loading all of the icons in index.html using the following markup: <?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" style="display:none"> <symbol id="user" viewBox="0 0 64 64"> <path d="..."> </symbol> </svg> I then use the symbols

Objective C: Inline function - symbol not found

血红的双手。 提交于 2019-11-30 17:49:56
I have a library which uses an inline C function, and is compiling just fine. When another library references that library, it still compiles fine. But if an actual app references the library, it fails to compile, saying that the _functionNameHere (yes, function name beginning with underline) - symbol is not found. If I remove the inline specifier, it all compiles fine. But as long as a function is inline inside the library, the app can't compile! Any ideas as to why that is? I know pretty much about compilers, but am new to the Objective-C, and anything I know about it is nothing more than

How to refer to the start-of a user-defined segment in a Visual Studio-project?

你离开我真会死。 提交于 2019-11-30 15:26:04
问题 I'm struggling to convert a C-program linked with ld, of the gnu tool-chain to make it compile as a visual-studio (2005) project. The program puts .data-symbols in different segments and during an initialization phase it copies data between segments. Pointers to the start and end of the segments are defined in the ld linker script. I understand how to locate the variables into different, user-defined segments, but i havent been able to figure out how to define linker constants such as _start

How do I debug into an ILMerged assembly?

a 夏天 提交于 2019-11-30 15:17:16
问题 Summary I want to alter the build process of a 2-assembly solution, such that a call to ILMerge is invoked, and the build results in a single assembly. Further I would like to be able to debug into the resultant assembly. Preparation - A simple example New Solution - ClassLibrary1 Create a static function 'GetMessage' in Class1 which returns the string "Hello world" Create new console app which references the ClassLibrary. Output GetMessage from main() via the console. You now have a 2

How to refer to the start-of a user-defined segment in a Visual Studio-project?

丶灬走出姿态 提交于 2019-11-30 14:18:23
I'm struggling to convert a C-program linked with ld, of the gnu tool-chain to make it compile as a visual-studio (2005) project. The program puts .data-symbols in different segments and during an initialization phase it copies data between segments. Pointers to the start and end of the segments are defined in the ld linker script. I understand how to locate the variables into different, user-defined segments, but i havent been able to figure out how to define linker constants such as _start_of_my_segment or if there is something similar to a linker script in Visual Studio. My goal is to be