Search Results

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

Page 138/434 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • PDO::ATTR_EMULATE_PREPARES => false

    - by user264058
    I'm new to php and PDO ,so i read this response to a similar post- Does PDO really not use prepared statements with mysql? Yes, by default (at least with version I tested) but native mode can be turned on manually. If not, can it be forced to do so By employing PDO::ATTR_EMULATE_PREPARES setting, the name is pretty self-explanatory. $dbh-setAttribute( PDO::ATTR_EMULATE_PREPARES, false ); should you do that? That's hardest question of them all. Well, I'd say - yes, you should. If you choose PDO as your db driver, there is no point in using it in the emulation mode. by YOUR COMMON SENSE Aren't prepared statements secure from SQL injection, why change if from 'true'-false?? what is native mode??

    Read the article

  • how to run line by line in text file - on windows mobile ?

    - by Gold
    hi in WinForm on PC i use to run like this: FileStream FS = null; StreamWriter SW = null; FS = new FileStream(@"\Items.txt", FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); SW = new StreamWriter(FS, Encoding.Default); while (SW.Peek() != -1) { TEMP = (SW.ReadLine()); } but when i try this on Windows-mobile i get error: Error 1 'System.IO.StreamWriter' does not contain a definition for 'Peek' and no extension method 'Peek' accepting a first argument of type 'System.IO.StreamWriter' could be found (are you missing a using directive or an assembly reference?) Error 2 'System.IO.StreamWriter' does not contain a definition for 'ReadLine' and no extension method 'ReadLine' accepting a first argument of type 'System.IO.StreamWriter' could be found (are you missing a using directive or an assembly reference?) how to do it ? thanks

    Read the article

  • What Swing look and feel should I use for a Java desktop application?

    - by waiting
    I am developing a Java desktop application and I use Swing to build the GUI. I realize that I can change the look of my app by setting different L&Fs. The JRE (from SUN) provides me at least two L&Fs, one is the default Metal L&F and the other is the "System" L&F which let my app have a native look. Also I can find some really cool L&Fs on the internet. The question is: which L&F should I use for my desktop app? Someone said the native look will be more user friendly, is that true? If I use the system L&F, should I make different versions of my user handbook (since the UI will change according to the OS)?

    Read the article

  • Viewing, building & debugging Borland C++ Builder project in Visual Studio 2010

    - by grunt
    I would like to use VC2010 to handle a BCB 2006 project I have. I do not want to convert the code to VC since much UI will need to be ported. I just want to be able to view build & debug from VS IDE. Viewing: I assume once I create VS projects for the native BCB code viewing will be possible, although the UI editor will not. Building: I found the "C++ Native Multi-Targeting" option of VS, although I'm not sure on what to set the different options there to (Daffodil is mentioned as helpful although I'm not sure what the added value is over existing functionality). Debugging: not sure how to do this at all from within VS. There are some stand alone console tools that convert debug info files e.g. tds2pdb (wheres the documentation link?). If anyone has experience with such a task I would thank you for any advice.

    Read the article

  • Is using an OS's functions for retrieving file content type reliable (using PHP < 5.3)?

    - by letseatfood
    I am using PHP versions < 5.3. Is it reliable to use the OS's functions for retrieving file content types? I am just trying to make sure that files are of a specific type before displaying them in a browser. I don't want to rely on just using the file extension. mime_content_type() is deprecated and I do not have the PECL Fileinfo extension. In my case I am using Windows or Linux for my development servers, depending on the job.

    Read the article

  • Why the followind upload if condition does not work?

    - by Ole Media
    So I have an upload script, and I want to check the file type that is being uploaded. I only want pdf, doc, docx and text files So I have: $goodExtensions = array('.doc','.docx','.txt','.pdf', '.PDF'); $name = $_FILES['uploadFile']['name']; $extension = substr($name, strpos($name,'.'), strlen($name)-1); if(!in_array($extension,$goodExtensions) || (($_FILES['uploadFile']['type'] != "applicatioin/msword") || ($_FILES['uploadFile']['type'] != "application/pdf"))){ $error['uploadFile'] = "File not allowed. Only .doc, .docx, .txt and pdf"; } Why I'm getting the error when testing and including correct documents?

    Read the article

  • How to install gem pg on snow leopard

    - by dorelal
    I need to install gem pg on snow leopard because I am running rake on rails codebase. I am not using postgres. This is the error I am getting. $ sudo gem install pg Password: Sorry, try again. Password: Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. looked at various blogs from google search but none of them works.

    Read the article

  • Monitor file in Java on Linux 64bits

    - by Tim
    I'd like to be notified when a file has been created, deleted or changed, but not using polling mechanism. I have surveyed related Java API that can use.(EX:JNotify, JPathWatch and JXFileWatcher) Those APIs provide file monitor by using native component on OS. But I met the same problem is that they can't run on Linux 64bits, because native component in those APIs donen't support Linux 64bits, and this confused me for a long time. I also know that there'll be a WatchService API as part of NIO2 in JDK7, but JDK7 has not released yet. So, can any one suggest me a better solution? Very Thanks.

    Read the article

  • How to make query on a property from a joined table in Hibernate using Criteria

    - by Palo
    Hello, I have the following mapping: <hibernate-mapping package="server.modules.stats.data"> <class name="User" table="user"> <id name="id"> <generator class="native"></generator> </id> <many-to-one name="address" column="addressId" unique="true" lazy="false" /> </class> <class name="Address" table="address"> <id name="id"> <generator class="native"></generator> </id> <property name="street" /> </class> </hibernate-mapping> How can I do a Criteria query to select all users living on some street? That is create Criteria query for this SQL: Select * from user join address on user.addressId = address.id where address.street='someStreet'

    Read the article

  • looking for information on porting Linux apps to windows

    - by claws
    Today I've encountered a very good book : UNIX to Linux® Porting: A Comprehensive Reference By Alfredo Mendoza, Chakarat Skawratananond, Artis Walker This reminded me of the thing I always wanted to know. "Porting Linux apps to Windows". I mean porting native Linux apps to native Windows with no platforms involved. If I can find any good book which explains this topic. I've lot of amazing linux command line tools in mind which needs a windows port. Please point me to relevant articles/tutorials/books. PS: please don't tell me to use linux emulation platforms like Cygwin.

    Read the article

  • Runtime.exec causes duplicate JVM to hang indefinitely until killed (Solaris 10)

    - by John
    All, We are running a J2EE application on WebLogic server 9.2 MP2 with a jrockit 64-bit JVM (27.3.1) on Solaris 10. We call use runtime.exec to call an executable called jfmerge to create PDF documents. We have found that in Solaris, when runtime.exec is called, a duplicate JVM is temporarily spawned to kick off the jfmerge process. While this is inefficient (our JVM is 5 GB, thus the duplicated shell JVM is also 5 GB), the major problem lies in the fact that when there is heavy load on this functionality (PDF generation) in our application, sometimes the duplicated JVM never exits. When the JVM hangs, the servers create large issues (extreme application slowness and terminated user sessions) as the entire duplicate JVM get's all of its 5 GB of process size written to disk swap. We have noted the following hung thread correlated with a hung JVM process until the process is manually killed: "[STUCK] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'" id=3463 idx=0x158 tid=3460 prio=1 alive, in native, daemon at jrockit/io/FileNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BII)I(Native Method) at jrockit/io/FileNativeIO.readBytes(FileNativeIO.java:30) at java/io/FileInputStream.readBytes([BII)I(FileInputStream.java) at java/io/FileInputStream.read(FileInputStream.java:194) at java/lang/UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:227) at java/io/BufferedInputStream.fill(BufferedInputStream.java:218) at java/io/BufferedInputStream.read(BufferedInputStream.java:235) ^-- Holding lock: java/io/BufferedInputStream@0xfffffffec6510470[thin lock] at gov/v3/common/formgeneration/sessionbean/FormsBean.getProcessStatus(FormsBean.java:809) at gov/v3/common/formgeneration/sessionbean/FormsBean.createPDF(FormsBean.java:750) at gov/v3/common/formgeneration/sessionbean/FormsBean.getTemplateDetails(FormsBean.java:450) at gov/v3/common/formgeneration/sessionbean/FormsBean.generateSinglePDF(FormsBean.java:1371) at gov/v3/common/formgeneration/sessionbean/FormsBean.generatePDF(FormsBean.java:263) at gov/v3/common/formgeneration/sessionbean/FormsBean.endorseDocument(FormsBean.java:2377) at gov/v3/common/formgeneration/sessionbean/Forms_qaco28_EOImpl.endorseDocument(Forms_qaco28_EOImpl.java:214) at gov/v3/delegates/common/FormsAndNoticesDelegate.endorseDocument(FormsAndNoticesDelegate.java:128) at gov/v3/actions/common/EndorseDocumentAction.executeRequest(EndorseDocumentAction.java:68) at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.dispatchToExecuteMethod(V3CommonDispatchAction.java:532) at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.executeBaseAction(V3CommonDispatchAction.java:336) at gov/v3/fwk/controller/struts/action/V3BaseDispatchAction.execute(V3BaseDispatchAction.java:69) at org/apache/struts/action/RequestProcessor.processActionPerform(RequestProcessor.java:484) at gov/v3/fwk/controller/struts/requestprocessor/V3TilesRequestProcessor.processActionPerform(V3TilesRequestProcessor.java:384) at org/apache/struts/action/RequestProcessor.process(RequestProcessor.java:274) at org/apache/struts/action/ActionServlet.process(ActionServlet.java:1482) at org/apache/struts/action/ActionServlet.doGet(ActionServlet.java:507) at gov/v3/fwk/controller/struts/servlet/V3ControllerServlet.doGet(V3ControllerServlet.java:110) at javax/servlet/http/HttpServlet.service(HttpServlet.java:743) at javax/servlet/http/HttpServlet.service(HttpServlet.java:856) at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3231) at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:121) at weblogic/servlet/internal/WebAppServletContext.securedExecute(WebAppServletContext.java:2002) at weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:1908) at weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1362) at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209) at weblogic/work/ExecuteThread.run(ExecuteThread.java:181) at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method) -- end of trace We would like to do a couple of things: 1.) Prevent the spawning of a duplicate JVM, as we do not need any of it's functions when executing the simple jfmerge executable, and it creates massive overhead. 2.) In the short term at least prevent this duplicate JVM from handing indefinitely.

    Read the article

  • How to profile a silverlight application?

    - by rudigrobler
    Is their any profilers that support Silverlight? I have tried ANTS (Version 3.1) without any success? Does version 4 support it? Any other products I can try? Updated since the release of Silverlight 4, it is now possible to do full profiling on SL applications... check out this article on the topic At PDC, I announced that Silverlight 4 came with the new CoreCLR capability of being profile-able by the VS2010 profilers: this means that for the first time, we give you the power to profile the managed and native code (user or platform) used by a Silverlight application. woohoo. kudos to the CLR team. Sidenote: From silverlight 1-3, one could only use things like xperf (see XPerf: A CPU Sampler for Silverlight) which is very powerful to see the layout/text/media/gfx/etc pipelines, but only gives the native callstack.) From SilverLite (PDC video, TechEd Iceland, VS2010, profiling, Silverlight 4)

    Read the article

  • How to make a file_exist from a server to the local machine ?

    - by bahamut100
    Hi, how to test if a file exist on the current computer using the application ? I try to put the full url at my file like this, but it doesn't work : if(file_exists("C:/wamp/www/project/photo/".$nom_photo)) { echo "file exist"; $extension=pathinfo("C:/wamp/www/project/photo/".$nom_photo,PATHINFO_EXTENSION); echo "<br>"; $nom=md5($nom_photo.time().rand(0, 99999)).".".$extension; echo $nom; rename("C:/wamp/www/project/photo/".$nom_photo,"C:/wamp/www/project/photo/".$nom); echo "<br>"; } How to fix it ?

    Read the article

  • When compiling programs to run inside a VM, what should march and mtune be set to?

    - by Russ
    With VMs being slave to whatever the host machine is providing, what compiler flags should be provided to gcc? I would normally think that -march=native would be what you would use when compiling for a dedicated box, but the fine detail that -march=native is going to as indicated in this article makes me extremely wary of using it. So... what to set -march and -mtune to inside a VM? For a specific example... My specific case right now is compiling python (and more) in a linux guest inside a KVM-based "cloud" host that I have no real control over the host hardware (aside from 'simple' stuff like CPU GHz m CPU count, and available RAM). Currently, cpuinfo tells me I've got an "AMD Opteron(tm) Processor 6176" but I honestly don't know (yet) if that is reliable and whether the guest can get moved around to different architectures on me to meet the host's infrastructure shuffling needs (sounds hairy/unlikely). All I can really guarantee is my OS, which is a 64-bit linux kernel where uname -m yields x86_64.

    Read the article

  • How to pass content in response from Exception filter in Asp.net WebAPI?

    - by jaffa
    Consider following code: My problem is: 1) I can't seem to cast the errors to HttpContent 2) I can't use the CreateContent extension method as this doesn't exist on the context.Response.Content.CreateContent public class ServiceLayerExceptionFilter : ExceptionFilterAttribute { public override void OnException(HttpActionExecutedContext context) { if (context.Response == null) { var exception = context.Exception as ModelValidationException; if ( exception != null ) { var modelState = new ModelStateDictionary(); modelState.AddModelError(exception.Key, exception.Description); var errors = modelState.SelectMany(x => x.Value.Errors).Select(x => x.ErrorMessage); // Cannot cast errors to HttpContent?? // var resp = new HttpResponseMessage(HttpStatusCode.BadRequest) {Content = errors}; // throw new HttpResponseException(resp); // Cannot create response from extension method?? //context.Response.Content.CreateContent } else { context.Response = new HttpResponseMessage(context.Exception.ConvertToHttpStatus()); } } base.OnException(context); } }

    Read the article

  • Linux based MS Office thumbnail generation

    - by El Yobo
    I've been taken on board to work on a PHP based web application. One part of the application generates thumbnail images for MS Office documents on demand, and it uses MS Office + the VeryPDF docprint utility to do this. Because of this one requirement, the system is running on Windows Server 2003 + IIS. I would prefer to have the system running on a Linux server, rather than MS, as I have far more experience in administering Linux systems than Windows and we have no other in-house technical staff. Does anyone know a way to handle the document conversion using native Linux software? I would love something PHP native, but am willing to look outside that if necessary. Thanks for your suggestions.

    Read the article

  • Adding hover trigger from another div

    - by jakeprzespo
    I am trying to activate the native hover effect of a div from another div. I understand that I could do this all in jQuery and add the styles in there, but would rather leave the native :hover in the CSS. I'm just wondering if there is a way for this to work: $("#div1").live("mouseenter", function() { $("#div2").trigger("mouseenter"); }); I'd like to call it by doing something like this, but it isn't working. Is there really no way to trigger an event from another element's event? Thanks in advance.

    Read the article

  • How to create file of files?

    - by TheMachineCharmer
    class Node { FooType Data; // I can save Data to file with extension .foo void Save() { // save Data to .foo file } } Now , class Graph { List<Node> Nodes; void Save() { foreach(Node node in Nodes) { node.Save(); } } } Now when I invoke someGraph.Save(); then it creates Nodes.Count number of files. I would like to appear those files as one file with extension somename.graph and be able to read it again as Nodes. How can I do this? Is there a way to bundle files into a single different file?

    Read the article

  • Missing nativeInit when compiling multimple files

    - by RankoR
    Android.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := pacman LOCAL_SRC_FILES := main.cpp \ Pacman.cpp LOCAL_CFLAGS := -DANDROID_NDK \ -DDISABLE_IMPORTGL LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog include $(BUILD_SHARED_LIBRARY) In main.cpp: void Java_com_wiagames_pacman_PacmanRenderer_nativeInit(JNIEnv* env) { ... } The package is com.wiagames.pacman; The Java class, containing the nativeInit method, is PacmanRenderer in the com.wiagames.pacman package. It works fine before I added pacman.cpp, but after adding it I have: E/AndroidRuntime( 2238): FATAL EXCEPTION: GLThread 1104 E/AndroidRuntime( 2238): java.lang.UnsatisfiedLinkError: Native method not found: com.wiagames.pacman.PacmanRenderer.nativeInit:()V E/AndroidRuntime( 2238): at com.wiagames.pacman.PacmanRenderer.nativeInit(Native Method) E/AndroidRuntime( 2238): at com.wiagames.pacman.PacmanRenderer.onSurfaceCreated(MainActivity.java:120) E/AndroidRuntime( 2238): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1494) E/AndroidRuntime( 2238): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240) W/ActivityManager( 306): Force finishing activity com.wiagames.pacman/.MainActivity main.c: http://pastebin.com/GPexqwcv MainActivity.java: http://pastebin.com/yWfWpyNb

    Read the article

  • Trying to open a excel template and rename or save to new location

    - by JPJedi
    I get the following error message when I try the following: Dim XL As New Microsoft.Office.Interop.Excel.Application XL.Visible = True XL.Workbooks.Open(XLTemplatePath) XL.SaveWorkspace(XLSaveReportPath) XL.Workbooks.Close() XL.Workbooks.Open(XLSaveReportPath) "Excel cannot open the file 'ContactReports.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file." What I would like to do is Open a excel file that is the XLTemplatePath and the either rename or save the file at the XLSaveReportPath and then use that renamed/saved file to fill the report out. I am using Visual Studio 2008 in VB.NET

    Read the article

  • Flex SDK 3.5 - Check file mimetype

    - by Fernando
    Is there a way to get a file's mimetype in Flex SDK 3.5 without using its extension? I need to validate if an uploaded file is of a certain kind. This is for images, or documents (PDF, ODT, etc.) All the solutions I've found are by checking its extension. What if I rename a .odt file as a .jpg? Then I can upload it as an image... I should add, we are using an AIR desktop client and a Java EE server. File checking is solved on the Java side, but the idea is not to go to the server, validate the file so if it's not valid, there's no network traffic at all.

    Read the article

  • How can I measure TForm deserialization time in Delphi?

    - by mjustin
    For performance tests I need a way to measure the time needed for a form to load its definition from the DFM. All existing forms inherit a custom form class. To capture the current time, this base class needs overriden methods as "extension points": before the beginning of the deserialization process after the completion of deserialization (can be implemented by overriding the Loaded procedure) the moment just before the execution of the OnFormCreate event Which TObject (or TComponent) methods are best suited? Maybe there are other extension points in the form creation process, please feel free to make suggestions.

    Read the article

  • How can a Delphi TPersistent object calculate its own deserialization time?

    - by mjustin
    For performance tests I need a way to measure the time needed for a form to load its definition from the DFM. All existing forms inherit a custom form class. To capture the current time, this base class needs overriden methods as "extension points": start of the deserialization process after the deserialization (can be implemented by overriding the Loaded procedure) the moment just before the execution of the OnFormCreate event So the log for TMyForm.Create(nil) could look like: - 00.000 instance created - 00.010 before deserialization - 01.823 after deserialization - 02.340 before OnFormCreate Which TObject (or TComponent) methods are best suited? Maybe there are other extension points in the form creation process, please feel free to make suggestions.

    Read the article

  • Windows media player control with .NET

    - by brovar
    What I want to do is to read media files (pics and videos) from a directory and display them one by one using the WMP control (AxWMPLib.AxWindowsMediaPlayer). In its older version it was enough to check the file's duration to distinguish images from videos, the new one randomly shows movies' duration properly or as zero. Does anyone know any other way of finding out what file is being proceeded withouth checking its extension (as a file can have an extension of .abc or so)? I'll be very grateful for any help. (Sorry for my lousy English.)

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >