problem about embedding-Collection of common programming errors
u??o? x??
php html css embedding
I’m a little bit confused right now. I have this code:<?php $this->head( ?><style type=”text/css”>.error {background-color: #ccc;border: 1px solid #999;padding: 10px;width: 500px;}</style> <?php ); ?>I was pretty sure that you could do this. It’s pretty similar to:<?php if (true) { ?>Hei <?php } ?>In fact an error occurs: Parse error: syntax error, unexpected ‘;’, expecting ‘)’ in file.php on line 1 (line 1 of the code)How can i better fix it?
Jordan
actionscript-3 flash fonts swf embedding
I have seen lots of questions related to font embedding in flash and I can’t seem to find an answer to my problem.I load fonts from a font swf and register them at a high level so that they can be used in child swfs. The issue is the child swf might also embed these fonts, but not explicitly so, meaning they are only embedded because there are fields in the child swf that use certain characters of a font. This means the text fields in the child use the incomplete embedded font instead of the emb
Nick Randell
wpf ironpython embedding
I’ve got a WPF application that embeds IronPython to use as a scripting language. I’ve got an object model that IronPython scripts can use to do ‘stuff’.However I’ve come across a strange problem that I’ve solved in a way that I don’t believe is correct.In my script I want to type the following to set the location of an object in WPF.map.CanvasLocation = 10,10This comes up with an exception saying that it cannot convert from PythonTuple to System.Windows.Point.I’ve currently solved that using a
Pavel Vlasov
c++ c winapi webkit embedding
The solutions I have found are irrelevant:someone used WebKit in a Delphi project someone used it with Java there is QtWebKit (about:blank demo app takes 44 megs) .Net port of it GTK+ portI need a guide how to embed WebKit instance into a pure C/C++ application under Win32.
Sam P
scripting pascal embedding
Is anyone aware of a Pascal interpreter/compiler which is embeddable in C++ (or anything else other than Pascal) applications? I am cloning (for lack of a better word) an application which uses an Object-Pascal compatible scripting language and needs to be script compatible. Am I going to end up writing an interpreter? (!)
zerodx
python c configuration embedding
I’m trying to embed python into c to use it for configuration:If I do it like this:/****************************************************************************** * * Embeding Python Example * * To run: * gcc -c test.c -o test.o -I”C:/Python25/include” * gcc -o test.exe test.o -L”C:/Python25/libs” -lpython25 * test.exe * ******************************************************************************/#include <Python.h>int main(int argc, char *argv[]) {PyObject *run;PyObject *globals
Eric Anastas
c# .net winforms dll embedding
I’m writing a plug-in for another application through an API. The plug-ins are distributed a DLLs. Is it possible to embed other files in the DLL file like pdfs, images, chm help files etc… I want to be able to provide documentation with my plug-in but I’d still like to retain the ability to distribute the plug-in as a single file the user can just drag and drop onto the application to install.
Andy
c# binary embedding
Is it possible to embed a custom binary file inside a C# class library and then at runtime read it with a binary reader?I’m guessing it might be possible through resources.Many thanks
genesys
actionscript-3 fonts embedding
I have a problem with doing proper font embedding in a actionscript 3 project (flash CS4, not flex).I followed this Adobe guide to do font embedding: http://www.adobe.com/devnet/flash/quickstart/embedding%5Ffonts/the guide tells to set the Textfield.embedFonts property to true. if I do so and try to display a text with another font in this textfield, then nothing is displayed – that’s fine, i expect it like this.But now I have this particular problem:i embed the font “Arial” in Regular style and
Antonio
c++ python embedding extending
We have a DLL that implements a custom programming language. What I want to do is adding support for the python language keeping the same code for “API function”. I have succefully embedded python in this DLL, now I’m approaching the problem to expose all the old function as a python module. Now this DLL doesn’t expose the API function as interface function but it’s installed (as function pointer) to the language engine. In this way it’s impossible to create a new python module (a new DLL). But
Tinelise
flex3 fonts format embedding
I’m trying to change the text format in a TextField I get from a .swf. I’m embedding my font in a myFont.swf:public class TemplateFont extends Sprite{[Embed(source=’../fontFiles/geogrotesque/Geogrotesque-Regular.ttf’, fontName=’theFontName’)]public static var FONT_TEXT:Class;}Then I’m loading it where I need it and registering it:var FontLibrary:Class = e.target.applicationDomain.getDefinition(“TemplateFont”) as Class; Font.registerFont(FontLibrary.FONT_TEXT);And then I’m trying to set the forma
Ghassen Hamrouni
c++ c mono appdomain embedding
I have a multithreaded application that activate multiple Mono domains from native code. Each domain has it’s own thread. I use the following code to activate a domain:///Create a new domain. m_domain = mono_domain_create_appdomain((char*) name.c_str(), NULL);///Activate the domain. mono_domain_set(m_domain, 0);///Register the current thread mono_thread_attach(m_domain);///Invoke some code … mono_runtime_invoke (m_method, m_objectInstance, NULL, &exception);But when I unload a domain the
Muhammad Alkarouri
python delphi embedding
I am using Python4Delphi to embed Python in a Delphi program. Versions: Python 2.6.4, Delphi 2009, Windows XP.The Delphi program crashes with EInvalidOp when importing json. I tracked it to the lineNaN, PosInf, NegInf = float(‘nan’), float(‘inf’), float(‘-inf’)in json.decoder.Sure enough, the command float(‘nan’) raises an EInvalidOp when run inside Python embedded in the Delphi program. When executed in the command line Python (same installation) it simply returns nan.Any idea what is the diffe
Otherside
ssl https embedding gecko nss
I have an application in which a gecko browser is embedded. The application is crashing when I try to access any https url’s because nss is not properly initialised at this point. The crash is in PK11_TokenExists(). I want to block my browser from rendering https sites. If a user clicks on a https link I can block that load in OnStartURI() of nsIURIContentListener.But if the user types in say orkut.com I wont know in OnStartURI() whether its a http url or a https one(i.e. whether it will use SSL
joeforker
python embedding ipython
Certain list comprehensions don’t work properly when I embed IPython 0.10 as per the instructions. What’s going on with my global namespace?$ python >>> import IPython.Shell >>> IPython.Shell.IPShellEmbed()() In [1]: def bar(): pass…: In [2]: list(bar() for i in range(10)) ————————————————————————— NameError Traceback (most recent call last)/tmp/<ipython console> /tmp/<ipython console&
Vairis
pdftex 3d embedding
The movie15 package (an interface to embed movies, sounds and 3D objects into PDF documents for use with LaTeX as well as pdfLaTeX) requires 3D files to be in u3d format for embedding into pdf. This works fine with the sample files provided, and I have no problem generating suitable 3D files, but so far, I have not found a way to convert them to u3d. MeshLab, usually the first place to go for such things, crashes during u3d export.Does anyone know of a way to produce u3d files suitable for use w
???z??
c# bitmap panel embedding cursors
If I use this code my panel (Canvas) crashes:Assembly asm = Assembly.GetExecutingAssembly();using (Stream resStream = asm.GetManifestResourceStream(“Pie_X.blank.cur”)){CanvasCursor = new Cursor(resStream);resStream.Close();}using (Stream resStream = asm.GetManifestResourceStream(“Pie_X.hand.cur”)){HandCursor = new Cursor(resStream);resStream.Close();}How ever this code does not cause it to crash:Assembly asm = Assembly.GetExecutingAssembly();using (Stream resStream = asm.GetManifestResourceStrea
tmax_dev
firefox crash embedding xpcom
I’m embedding Firefox since version 1.8 but now with Firefox 10 I get a crash when callingmWebNav->LoadURI(mCurrentURI.get(), nsIWebNavigation::LOAD_FLAGS_IS_LINK, NULL, NULL, NULL);The Strange thing is that the crash only occurs on a Firefox Release Build. A Firefox Debug Build is not crashing at this point, but code which is called afterwards is also not executed.Does anybody have an idea on this behaviour ?Best regards,Thomas
Valdemar
c# c multithreading mono embedding
I’m working on a Native dll written in C++ that uses mono to show a graphical user interface. I’ve written a simple skeleton, it works but I get an error under certain conditions.First here is the C# code I’m calling from the Mono APIusing System; using System.Collections.Generic; using System.Windows.Forms; using System.Threading;namespace testApp {static class Program{// This creates a new thread and runs dialog() on it, // which opens a dialog windowstatic void start(){Console.WriteLine(“Runn
Lucas Jones
c# scheme dynamic-language-runtime embedding ironscheme
I’m trying to add a plugin architecture to my C# app. I’ve chosen IronScheme as the language, and also because it’s built on the DLR, which should make it easier to embed.On the Codeplex Wiki, they have the following example. I changed it slightly:public class PluggerInner {IScriptEngine scheme;public PluggerInner(){InitScheme();}private void InitScheme(){var domMgr = ScriptDomainManager.CurrentManager;var schemePrv = new IronSchemeLanguageProvider(domMgr);scheme = schemePrv.GetEngine();}public
Navnath
c# nosql embedding ravendb document-database
I was able to successfully run a simple test for RavenDB based on the code found at: http://ravendb.net/tutorials/hello-worldNext I tried to run it in an Embedded Manner, but I keep on getting the following error: Message: Could not find transactional storage type: Raven.Storage.Esent.TransactionalStorage, Raven.Storage.Esent StackTrace: at Raven.Database.Config.InMemoryRavenConfiguration.CreateTransactionalStorage(Action notifyAboutWork) in c:\Builds\raven\Raven.Database\Config\InMemoryRa
Vigo
c++ python multithreading sockets embedding
Can i not send and receive UDP packets in a single python embedded C++ program in which send and receive scripts run in different threads? I get an unhandled exception when the exe file is run. When one of the send or receive command is commented out i.e either PyRun_SimpleString(sendPy) or PyRun_SimpleString(recPy) then the program works all fine. What is the mistake here?The code is given below:DWORD WINAPI sendPack(LPVOID iValue) {while(1){const char* sendPy = “UDPSockSend.sendto(‘10707’,(’10
Harisankar Krishna Swamy
python apache hadoop pig embedding
I am trying to embed a pig script in Python and am encountering an exception and can’t seem to find what the problem is. I have a python script with pig script embedded in it and have Apache PIG 0.10 installed. I can run pig scripts from the shell and it works ok. when I run the python script with pig embedded from shell using command pig -x mapreduce pythonscript.py it gives me the error Error before Pig is launchedERROR 2998: Unhandled internal error. org/python/util/PythonInterpreterjava.lang
Stefano
jquery youtube-api embedding youtube-javascript-api
I have embedded a YouTube video in a website, but I want to start playing it by clicking on a custom button outside the player.After some research on the web I’ve tried with this piece of js:$(document).ready(function() {$.getScript(‘http://www.youtube.com/player_api’);$(‘#playvideo’).click( function() {thevid=document.getElementById(‘thevideo’); thevid.style.display=’block’; this.style.display=’none’; $(‘#video’).playVideo();}); });where #playvideo is the button and #video is the YouTube iframe
Leo Perez
actionscript-3 flash audio embed embedding
I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can’t seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF. It’s easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF. I read several solutions, but none seem to work. I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 im
Ólafur Waage
c++ python import ctypes embedding
I’m trying to embed python within a C++ based programming language (CCL: The compuatational control language, not that any of you have heard of it). Thus, I don’t really have a “main” function to make calls from.I have made a test .cc program with a main, and when I compile it and run it, I am able to import my own python modules and system modules for use.When I embed my code in my CCL-based program and compile it (with g++), it seems I have most functionality, but I get a RUNTIME error: Import
user2610218
php html textarea embedding
<?php If ( isset ($_POST[‘name’] ) ) {$name = $_POST[‘name’];if (!empty ($name)) {$sentence = $name . ” is the best footballer of his generation. “;} else {echo “Please enter a name”;}} ?><html> <head> </head> <body> <!– ********************************** –> <form action=”form3.php” method=”POST”>Name: <input type=”text” name=”name”><br><input type=”submit” value=”Send”></form><textarea rows=”7″ cols=”30″> <
GTDev
mongodb database-schema embedding one-to-one
I am new to developing with mongodb. This may be a noobish question but I was wondering what the benefit in creating a 1:1 embedding is in mongodb? Why is useful over attributes which hold 1:1 embedding’s data?In the case of 1:n embedding it is good to organize an undefined number of objects under a document.All referenced relationships are good for queries to and from documents.What additional functionality do 1:1 embeddings give? Thanks
CharlieRB
pdf microsoft-word-2010 microsoft-office-2010 embedding
Embedding PDF documents in Word 2010 results in an error when trying to open them on other systems: The server application, source file, or item can’t be found, orreturned an unknown error. You may need to reinstall the serverapplication.I’ve followed the normal for embedding files (and the same procedure that worked for me when using Word 2007). The files aren’t set to be linked to. I’ve also uninstalled Acrobat X, which I read might encourage a permissions problem. I have Foxit Reader installe
Speakr
java html applet embedding
I have some code I posted about earlier (converting into an application) that was working as an applet, but has since mysteriously ceased to work outside of an IDE applet viewer.Code here: http://www.mediafire.com/?4eslqqr4aoh33j1After compiling the code into a .jar file and uploading that file to my site (www.insertnamestudios.com/lib), I am trying to embed the applet in a different site. I thought it was working okay, but apparently it isn’t. The HTML code I am using to embed is<applet code
Web site is in building