Search Results

Search found 10841 results on 434 pages for 'air native extension'.

Page 97/434 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • C# Help: Adding a complexType to the main XmlSchema

    - by G33kKahuna
    I need to create program that creates a XML schema like below using System.Xml.XmlSchema namespace I'm using the XmlSchemaComplexType to MyString and MyInteger but I can't seem to find a way to set the extension to base string and int respectively. Any guidance is much appreciated ... thanks <?xml version="1.0" encoding="utf-8" ?> <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="MyString"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="modified" type="xs:boolean" /> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:complexType name="MyInteger"> <xs:simpleContent> <xs:extension base="xs:int"> <xs:attribute name="modified" type="xs:boolean" /> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:element name="data"> <xs:complexType> <xs:sequence> <xs:element name="row"> <xs:complexType> <xs:sequence> <xs:element name="order_id" type="MyInteger" /> <xs:element name="order_status" type="MyString" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

    Read the article

  • printf and Console.WriteLine - problems with Console.SetOut?

    - by Matt Jacobsen
    i have a bunch of Console.WriteLines in my code that I can observe at runtime. I communicate with a native library that I also wrote. I'd like to stick some printf's in the native library and observe them too. I don't see them at runtime however. I've created a convoluted hello world app to demonstrate my problem. When the app runs, I can debug into the native library and see that the hello world is called. The output never lands in the textwriter though. Note that if the same code is run as a console app then everything works fine. C#: [DllImport("native.dll")] static extern void Test(); StreamWriter writer; public Form1() { InitializeComponent(); writer = new StreamWriter(@"c:\output.txt"); writer.AutoFlush = true; System.Console.SetOut(writer); } private void button1_Click(object sender, EventArgs e) { Test(); } and the native part: __declspec(dllexport) void Test() { printf("Hello World"); } Despite my earlier ramblings (see edits) I actually think this is a problem in C# (or rather my understanding of it).

    Read the article

  • The speed of .NET in numerical computing

    - by Yin Zhu
    In my experience, .net is 2 to 3 times slower than native code. (I implemented L-BFGS for multivariate optimization). I have traced the ads on stackoverflow to http://www.centerspace.net/products/ the speed is really amazing, the speed is close to native code. How can they do that? They said that: Q. Is NMath "pure" .NET? A. The answer depends somewhat on your definition of "pure .NET". NMath is written in C#, plus a small Managed C++ layer. For better performance of basic linear algebra operations, however, NMath does rely on the native Intel Math Kernel Library (included with NMath). But there are no COM components, no DLLs--just .NET assemblies. Also, all memory allocated in the Managed C++ layer and used by native code is allocated from the managed heap. Can someone explain more to me? Thanks!

    Read the article

  • Converting a Linq expression tree that relies on SqlMethods.Like() for use with the Entity Framework

    - by JohnnyO
    I recently switched from using Linq to Sql to the Entity Framework. One of the things that I've been really struggling with is getting a general purpose IQueryable extension method that was built for Linq to Sql to work with the Entity Framework. This extension method has a dependency on the Like() method of SqlMethods, which is Linq to Sql specific. What I really like about this extension method is that it allows me to dynamically construct a Sql Like statement on any object at runtime, by simply passing in a property name (as string) and a query clause (also as string). Such an extension method is very convenient for using grids like flexigrid or jqgrid. Here is the Linq to Sql version (taken from this tutorial: http://www.codeproject.com/KB/aspnet/MVCFlexigrid.aspx): public static IQueryable<T> Like<T>(this IQueryable<T> source, string propertyName, string keyword) { var type = typeof(T); var property = type.GetProperty(propertyName); var parameter = Expression.Parameter(type, "p"); var propertyAccess = Expression.MakeMemberAccess(parameter, property); var constant = Expression.Constant("%" + keyword + "%"); var like = typeof(SqlMethods).GetMethod("Like", new Type[] { typeof(string), typeof(string) }); MethodCallExpression methodExp = Expression.Call(null, like, propertyAccess, constant); Expression<Func<T, bool>> lambda = Expression.Lambda<Func<T, bool>>(methodExp, parameter); return source.Where(lambda); } With this extension method, I can simply do the following: someList.Like("FirstName", "mike"); or anotherList.Like("ProductName", "widget"); Is there an equivalent way to do this with Entity Framework? Thanks in advance.

    Read the article

  • Running SQLite 3 in MicroApache

    - by Alien426
    I'm running MicroApache (http://microapache.amadis.sytes.net) on Windows XP and would like to use SQLite 3 databases. The PHP version is 5.2.9-2. My MicroApache version has SQLite 2 support through 2 lines in the php.ini: extension=php_pdo.dll extension=php_sqlite.dll I test whether the extension works in 3 ways: 1. phpinfo() 2. extension_loaded() and get_loaded_extensions() 3. using sample code that var_dump()s the constant SQLITE3_NUM (should be the integer 2) and tries to create a database (error: class 'SQLite3' does not exist) Things I have tried (if I can remember them all): 1. copied php_sqlite3.dll from a full installation of PHP and added "extension=php_sqlite3.dll" to php.ini - error "Procedure entry point gc_remove_zval_from_buffer was not found in php5ts.dll" 2. compressed the DLL with UPX (like the other DLLs of MicroApache seem to be) - does not display an error on start, nor in the log file, but does not work 3. tried various things with php.ini - created a section "[sqlite3]" - prefixed "sqlite3." to "extension_dir=." and "extension=php_sqlite3.dll" - ... 4. tried to use PDO, it says it 'could not find driver' Who can help me get SQLite 3 to work?

    Read the article

  • Sending most correct mimetype

    - by Roland Franssen
    Hi all, I have a list of extension to mimetype in a INI file. However some extensions have multiple mimetypes, for example; midi[] = "application/x-midi" midi[] = "audio/midi" midi[] = "audio/x-mid" midi[] = "audio/x-midi" midi[] = "music/crescendo" midi[] = "x-music/x-midi" 6 (possible) mimetypes for 1 extension. Whats common practice to determine the correct mimetype? (e.g. i need to set a HTTP content-type header). I know its not ideal; determining mimetypes based on extension.. but i need consistent (cross-server) results (e.g. fileinfo extension in PHP is making terrible guesses*). * Some fileinfo results for example; js - text/plain css - text/c-h

    Read the article

  • image submit button passing value

    - by air
    I have one image submit button like this <input id="enter" name="enter" type="image" value="Login" src="images/btn_login.jpg"/> once i click on this image i got following values enter.x=39&enter.y=11 but i want to get enter=Login on submit how to get enter value as login on submit? Thanks

    Read the article

  • MSTest on x64 C++/CLI

    - by Oyvind
    I got a problem using MSTest on x64: The test project depends on a couple of C++/CLI assemblies, and fails to load for some reason. In Visual Studio, I get (stripped down): Error loading D:\xxx\Xxx.Test.dll: Unable to load the test container 'D:\xxx\Xxx.Test.dll' or one of its dependencies. Error details: System.BadImageFormatException: Could not load file or assembly 'Common.Geometry.Native, Version=1.1.4574.22395, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Running MSTest manually in a command prompt, I get: Unable to load the test container 'D:\xxx\Xxx.Test.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Common.Geometry.Native, Version=1.1.4574.22395, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Details worth mentioning: The test project itself is compiled using 'Any Cpu'. I use a x64 specific testrunconfig Dependency walker shows no missing native dependencies in the C++/CLI assembly (Common.Geometry.Native) Even more interesting, there is another test project in the same solution using the same C++/CLI assembly (Common.Geometry.Native), and it runs without any problems. I have also verified that there are no 32bit assemblies/dlls interfering. Any suggestions is welcome !

    Read the article

  • How to install MUI files into GAC?

    - by Filip
    I am writing a C++/CLI assembly that uses some native DLLs. During compile I can list them as "assembly link resource" so that the assembly is aware of these dependencies. When I use gacutils, it properly pulls all the native DLLs into GAC and they get properly loaded from GAC. Now, some of these native DLLs are localized, and have MUI files. How do I get those to be automatically copied to GAC as well?

    Read the article

  • how to use a pear package!?

    - by Naughty.Coder
    I want to use HTTP_DOWNLOAD to manage my downloads ,, I have never used PEAR before !! HTTP_DOWNLOAD depends on many other packages , I downloaded them and the ones they , in turn , depend on and this is the structure I made : Download.PHP <---HTTP_DOWNLOAD MAIN FILE Header.php <--- HTTP_HEADER MAIN FILE PEAR.php PEAR5.php Type.php <--- MIME_Type >Type <---- FOLDER - Extension.php MIME_Type File - Parameter.php MIME_Type File assuming that Http_DOWNLOAD depends on : * PHP 4.2.0 * PEAR 1.4.0b1 * PEAR * HTTP_Header * pcre extension * Archive_Tar (Optional) * Archive_Zip (Optional) * MIME_Type (Optional) * mime_magic extension (Optional) * pgsql extension (Optional) and I edited the paths inside each file to reflect this structure , and I tried to run the following code : <?php require_once 'Download.php'; $params = array('file'=>'file.zip'); $down = new HTTP_Download($params); $down->send(true); ?> nothing happens !! I also got a hard time trying to figure how to use the class and I think this code should work .. but not sure ! Help Please !

    Read the article

  • How do I call a function defined in a C++ DLL that has a parameter of type int *, from inside C# code ?

    - by Ashutosh
    I have a native regular C++ Dll which I want to call from C# code, so i created C++/CLI class (as described here and here) which will include managed C++ code and which can be called by any C# code directly and which can make calls inturn to native unmanaged C++. One of function in native C++ dll has parameter of type int *. How do I declare in wrapper function and how can i convert it into int *?

    Read the article

  • put link on table row or any other way to put link

    - by air
    i have one php code for button creation for($i=1;$i<=$n;$i++) { $row=mysql_fetch_array($result); if($row['btn_color']==1) $btbg="side-button5.png"; if($row['btn_color']==2) $btbg="side-button6.png"; if($row['btn_color']==3) $btbg="side-button7.png"; if($row['btn_color']==4) ?> <br> <table width="200" height="50" border="0" cellpadding="0" cellspacing="0"> <tr> <td background="images/<?php echo $btbg ; ?>" style="background-repeat:no-repeat"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="66"> <div align="center" class="buttonside"> <p> <a class="buttonside" href="vpa.php?pgid=<?php echo $row['page_id']; ?>"> <?php echo $row['btn_text']?></p> </a> </div> </td> </tr> </table> </td> </tr> </table> <?php } ?> this code is working fine but the link is on text, i want to put link on full button(background) Thanks

    Read the article

  • Passing an arbitrary JSONValue to a JSNI function

    - by Riley Lark
    I have a JSONValue in my Java that may be a JSONArray, a JSONObject, a JSONString, etc. I want to pass it to a JSNI function that can accept any of those types. If I naively write my JSNI as something like: public final native jsni(Object parameter) /*-{ doSomething(parameter); }-*/; public void useFunction(JSONValue value) { jsni(value); //Throws js exception at runtime :( } then I get a javascript exception, because GWT doesn't know how to convert the JSONValue to a JavaScriptObject (or native string / number value). My current workaround is public final native jsniForJSO(Object parameter) /*-{ doSomething(parameter); }-*/; public final native jsniForString(String parameter) /*-{ doSomething(parameter); }-*/; public final native jsniForNumber(double parameter) /*-{ doSomething(parameter); }-*/; public actuallyUseFunction(JSONValue value) { if (value.isObject()) { jsniForJSO(value.isObject().getJavaScriptObject()); } else if (value.isString()) { jsniForString(value.isString().stringValue()); } else { //etc } } This is a big burden for code maintainability, etc... especially if you have more than one parameter. Is there a way to generate these functions automatically, or get around this issue altogether? I've taken to wrapping everything in a JSONObject first, so I can definitely get a JavaScriptObject to pass to my jsni, but that's another clumsy mechanic.

    Read the article

  • open corel draw file into photoshop

    - by air
    i have one coral draw file and i don't have coral draw software with me. is this possible to open that file in PSD or convert into PSD or image format. i search on internet but didn't find any free software or plug in. Thanks

    Read the article

  • table problem in loop

    - by air
    i have one table in loop which come under li <?php for($i=1;$i<=$tc;$i++) { $row=mysql_fetch_array($result); ?> <li style="list-style:none; margin-left:-20px"> <table width="600" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="hline" style="width:267px"><?php echo $row['tit'] .",". $row['name'] ?></td> <td class="vline" style="width:1px">&nbsp;</td> <td class="hline" style="width:100px"><?php echo $row['city']; ?></td> </tr> </table> </li> <?php } ?> the out put comes like this i can't put table outside the loop, due to li sorting thanks

    Read the article

  • NSSavePanel selecting part of file name

    - by regulus6633
    How do I set the part of the file name that is selected in NSSavePanel? I only want the file name selected and not the file extension. Here's what I noticed. If I setAllowedFileTypes: for the save panel then only the file name is selected but not the file extension. However if I don't set the allowed file types then the file extension is selected along with the file name. I don't want to use setAllowedFileTypes but I still want to control the selection so that the file extension is not selected. Can that be done?

    Read the article

  • Assign click event to addon icon on navigation bar

    - by Charsee
    We have created a chrome extension for our app. Where we call a METHOD from a "js file" on CLICK event of the "extension icon" placed on the navigation bar. For this we use message passing between the app.js (file containing the METHOD to be called on icon click) and background.html (using a js file included in this html). The script used to pass message is:(from background.html) chrome.browserAction.onClicked.addListener(function (tab) { chrome.tabs.sendMessage(tab.id, "showPopup"); }); and to listen the message :(in app.js) chrome.extension.onMessage.addListener(function(request) { if (request === "showPopup") { showPopup(); } }); The click event works as expected. But now we want to do same thing in mozilla extension. and we can't pass message to app.js on the click of the icon,so that it can execute the containing methods. We have also added the app.js using pageMod, something like this exports.main = function(options, callbacks) { pageMod.PageMod({ include: ["*"], contentScriptWhen: 'start', contentScriptFile: [data.url('jquery-1.7.1.min.js'),data.url('app.js')] }); createAndAddNavBarButton(); }; function createAndAddNavBarButton() { var navBar = document.getElementById('nav-bar');//assume document has been defined if (!navBar){return;}; var nbBtn = document.createElement('navbaricon'); nbBtn.setAttribute('id', 'navButton'); nbBtn.setAttribute('image', data.url('icon_16.png')); nbBtn.onclick = function(){ showPopup(); return true; } navBar.appendChild(btn); } But the click event does nothing and showPopup() is undefined. When a new page loads event associated with it in the app.js executes without any error but the click event doesn't work. Is there a method from where we can assign click event directly to this icon, as we have done in the case of chrome extension.

    Read the article

  • Java FileFilter

    - by Mr CooL
    public class DocFilter extends FileFilter { public boolean accept(File f) { if (f.isDirectory()) { return true; } String extension = Utils.getExtension(f); if (extension != null) { if (extension.equals(Utils.doc) || extension.equals(Utils.docx) ) { return true; } else { return false; } } return false; } //The description of this filter public String getDescription() { return "Just Document Files"; } } Netbeans compiler warned with the error, "No interface expected here" for above code Anyone has idea what was the problem?? I tried changing the 'extends' to 'implements', however, it didn't seem to work that way. and when I changed to implements, the following code cannot work, chooser.addChoosableFileFilter(new DocFilter()); and with this error, "method addChoosableFileFilter in class javax.swing.JFileChooser cannot be applied to given types required: javax.swing.filechooser.FileFilter" Can anyone help on this? Thanks..

    Read the article

  • Instanced drawing with OpenGL ES 2.0

    - by Mårten Wikström
    In short: Is it possible to use the gl_InstanceID built-in variable in OpenGL ES 2.0? And, if so, how? Some more info: I want to draw multiple instances of an object using glDrawArraysInstanced and gl_InstanceID, and I want my application to run on multiple platforms, including iOS. The specification clearly says that these features require ES 3.0. According to the iOS Device Compatibility Reference ES 3.0 is only available on a few devices (those based on the A7 GPU; so iPhone 5s, but not on iPhone 5 or earlier). So my first assumption was that I needed to avoid using instanced drawing on older iOS devices. However, further down in the compatibility reference document it says that the EXT_draw_instanced extension is supported for all SGX Series 5 processors (that includes iPhone 5 and 4s). This makes me think that I could indeed use instanced drawing on older iOS devices too, by looking up and using the appropriate extension function (EXT or ARB) for glDrawArraysInstanced. I'm currently just running some test code using SDL and GLEW on Windows so I haven't tested anything on iOS yet. However, in my current setup I'm having trouble using the gl_InstanceID built-in variable in a vertex shader. I'm getting the following error message: 'gl_InstanceID' : variable is not available in current GLSL version Enabling the "draw_instanced" extension in GLSL has no effect: #extension GL_ARB_draw_instanced : enable #extension GL_EXT_draw_instanced : enable The error goes away when I specifically declare that I need ES 3.0 (GLSL 300 ES): #version 300 es Although that seem to work fine on my Windows desktop machine in an ES 2.0 context I doubt that this would work on an iPhone 5. So, shall I abandon the idea of being able to use instanced drawing on older iOS devices?

    Read the article

  • how to downlaod and configure phpimage for TinyMCE

    - by air
    actually i am looking for some best html editor for my CMS system. witch support (PHP, JQUERY) i found TinyMCE but it dont have image upload functionality, after i found phpimage for this but every time i goto http://sourceforge.net/tracker/?func=detail&aid=2844769&group_id=103281&atid=738747 and click on files, i get normal TinyMCE my question is how to find phpimage to download and configure it. if you know any other FREE HTML editor with image uplaod let me know. Thanks

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >