symbol

Controlling symbol generation in Clojure macros

I'm trying (as a self-learning exercise) to create a Clojure macro that will generate code to apply a function to a sequence of integers and sum the result, e.g. f(0) + f(1) + f(2) + f(3) This is my attempt: (defmacro testsum [func n] `(fn [x#] (+ ~@( map (fn [i] `(~func x#)) (range n))))) However something seems to go wrong wit...

Using a Scala symbol literal results in NoSuchMethod

I have recently begun using Scala. I've written a DSL in it which can be used to describe a processing pipeline in medici. In my DSL, I've made use of symbols to signify an anchor, which can be used to put a fork (or a tee, if you prefer) in the pipeline. Here's a small sample program that runs correctly: object Test extends Pipeline...

Display EURO Symbol in UTF-8 Format

Im wondering how I can display a Euro symbol in UTF-8 Format ? Cheers ...

How to use symbols/punctuation characters in discriminated unions

I'm trying to create a discriminated union for part of speech tags and other labels returned by a natural language parser. It's common to use either strings or enums for these in C#/Java, but discriminated unions seem more appropriate in F# because these are distinct, read-only values. In the language reference, I found that this symb...

Objective-c linking error with duplicate-symbol error

I am new to Objective C and have the following error when trying to import a class defined by me Building target “MusicCube” of project “MusicCube” with configuration “Debug” — (1 error) cd /Users/varsha_vijay/Downloads/MusicCube setenv MACOSX_DEPLOYMENT_TARGET 10.5 setenv PATH "/Xcode3.1.4/Platforms/iPhoneSimulator.platfo...

Qt QVariantAnimation instantiation runtime crash; symbol lookup error: undefined symbol: QVariantAnimation QObject

I'm getting this weird runtime crash when instantiating QVAriantAnimation or QPropertyAnimation. It appears this happens when the program doesn't link appropriately the class. But I have double checked my simple project and can't see anything wrong. #include <QtCore/QVariantAnimation> #include <QtCore/QEasingCurve> class MyAnimacion : ...

What can be the use of SymbolType in Python?

Here's the SymbolType package that adds symbols to Python. Can those who have done anything useful with Lisp/Scheme tell me what how can I take advantage of this type in Python? Can it be used to isolate strings coming from outside (from the web) from internal code? $ sudo easy_install SymbolType $ ipython Unfortunately, you can't us...

Eclipse problem with symbol §

I'm using Eclipse for programming. In one method of my project i used the String "§". I use a svn repository. If i edit the file with Ubuntu OS the § symbol isnt displayed correctly in the eclipse editor and also in my programm, if I edited it before on Windows. The same is vice versa. Any hints how to solve this problem? I don't want t...

how to define following operator/function in python ?

i am new to programming need to define operator/function s^m such that s^m(a^g^n+b^g^o+c^g^p*d^g^q)+a^g^f=a^g^(n+m)+b^g^(o+m)+c^g^(p+m)*d^g^(q+m)+a^g^f a b c d g ..all symbols ^=power ,in simple language operator which will transform all 'g's in bracket to g^m while keeping those out of bracket as it is . i am working on solving ...

What does "symbol" mean as in "Load Symbol List"?

What does "symbol" mean as in "Load Symbol List"? Or as in this example from MSDN: "#if lets you begin a conditional directive, testing a symbol or symbols to see if they evaluate to true." Where are these symbols defined and declared? ...

dyld: lazy symbol binding failed: Symbol not found - nm reports symbol found

Fairly abstract question here, as I don't know quite where to start my own investigations. I have a C package constructed with CMake that produces librpdb.so; I have a Ruby Gem set up for the same library, which produces rpdb.bundle. When used in Ruby, I get this: dyld: lazy symbol binding failed: Symbol not found: _RPDB_RuntimeStor...

Emacs ruby symbol word completion

Quite often I define a ruby symbol (eg. :some_value), then I want to create a method with the same name def some_value. Unfortunately, the autocompletion(M + /) for the second occurrence of some_value string does not work, being slightly different (:some_value vs some_value). How can I setup emacs to handle such events? ...

Custom expand/collapse symbols in Silverlight TreeView using HierarchicalDataTemplate

I have a TreeView control where nodes are dynamically built using a HierarchicalDataTemplate. In other words, no TreeViewItems are explicitly defined in the XAML. TreeViewItems are instead created automatically when the data are bound at runtime (I can see them in Silverlight Spy). Is it possible to customize the expand/collapse symbols...

AS3: Accessing External Library Symbols Dynamically

I am loading an external SWF containing uninstantiated MovieClip Symbols. I can get the SWF loaded, no problem. If I call: loader.contentLoaderInfo.applicationDomain.getDefinition( "TestClip" ) as Class I get the class of a Library symbol called "TestClip", which I can then instantiate. Jawesome. The issue I'm having is that basicall...

Objective C: Inline function - symbol not found

Hi! 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 i...

Why is in F# a dummy symbol literal needed between pipe and when?

Hi, I am new to F# and fiddling just around with it. What get's me is: let rec fact n = match n with | dummy when n < 2 -> 1 | _ -> n * fact (n - 1) let x = 6 printfn "%d! = %d" x (fact x) Why does F# needs this dummy placeholder between pipe and when? Dummy is even the whole time undefined and the compiler seems in some w...

Export a global symbol from a Delphi DLL

I'm trying to create a Gecko 2.0-compatible DLL in Delphi. Previously (pre-Gecko 2.0) the DLL needed to export a NSGetModule() function. This worked flawlessly. Starting with Firefox 4, my DLL is getting loaded (I have verified this though a breakpoint in my initialization section), but my NSGetModule() function does not get called any...

possible to concatenate a word with DIFFERENT font in dynamic text field? AS3/Flash

I have a submit button that I'm pulling in from XML. It needs to be XML because it is translated. Therefore... the length is varying depending on the language. I simply want to add an arrow to the end of the word using Webdings #4 (it looks like a solid arrow, not like > but solid)... Is this the best way to do this? What are my opti...

Button with dynamic text in Flash CS5

I'm new to Flash Pro programming, and am trying to create a button-type symbol where I can set the label. The problems I'm running into are as follows. If I make the symbol type=Button, I can't add ActionScripts in the frames and/or access any subcomponents? Why is this so? If I make the symbol type=MovieClip, I can add ActionScript...

Adding Actions to Button Symbol frames in Flash CS5

For some reason I can't add ActionScript actions to a timeline frame within a Button Symbol, like I normally would with MovieClip symbols or on the stage. The Actions panel shows this message: "In ActionScript 3.0, code cannot be placed directly on objects. Please select a frame..." even though I definetely have a frame selected! An...