Search Results

Search found 9410 results on 377 pages for 'simulator difference'.

Page 45/377 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • Difference between Singleton implemention using pointer and using static object

    - by Anon
    EDIT: Sorry my question was not clear, why do books/articles prefer implementation#1 over implementation#2? What is the actual advantage of using pointer in implementation of Singleton class vs using a static object? Why do most books prefer this class Singleton { private: static Singleton *p_inst; Singleton(); public: static Singleton * instance() { if (!p_inst) { p_inst = new Singleton(); } return p_inst; } }; over this class Singleton { public: static Singleton& Instance() { static Singleton inst; return inst; } protected: Singleton(); // Prevent construction Singleton(const Singleton&); // Prevent construction by copying Singleton& operator=(const Singleton&); // Prevent assignment ~Singleton(); // Prevent unwanted destruction };

    Read the article

  • Difference between Java SE/EE/ME?

    - by Richard Knop
    Which one should I install when I want to start learning Java? I going to start with some basics so I will create simple programs that create files, directories, edit XML files and so on, nothing too complex for now. I guess Java SE (Standard Edition) is the one I should install on my Windows 7 desktop? I already have Komodo IDE which I will use to write Java code.

    Read the article

  • Worksheet.Unprotect - Office Interop - Difference between 2003 and 2007

    - by sdmcnitt
    I have a .NET winforms app that automates Excel and checks for a worksheet password. The requirements are to be able to detect 1) that the protection is turned off 2) that the password is removed (protected but there is no password) 3) that the password matches the correct password from a database To meet the second requirement the program calls the Worksheet.Unprotect command with a null string, capturing the error. If error as expected, the 3rd check is made. If no error, then the Unprotect worked without a password == password was removed. The code sample below has these checks. The application can do this fine with Office 2003. I have since had my dev machine updated to Office 2007 and it no longer works as it did. When I call the Worksheet.Unprotect, Excel prompts for the password! I need to know how this should be accomplished in the new version of Excel or if there is a way to reference the old PIA. No matter what if I set a reference to Excel 11 it is replaced with the PIA for 12 in the GAC. 'return true if unprotect of worksheet does not generate an error 'all other errors will bubble up 'return false if specific error is "Password is invalid..." Try 'detect unprotected or no password If oWorksheet.ProtectContents Then 'try with no passsword and expect an error 'if no error then raise exception Dim blnRaiseException As Boolean = True Try 'oWorksheet.Unprotect(vbNullString) oWorksheet.Unprotect() Catch ex As Exception blnRaiseException = False End Try If blnRaiseException Then Throw New ExcelSheetNoPasswordException End If oWorksheet.Unprotect(strPwd) 'no error so if we get here -- success fnCheckWorksheetPwd = True 'leave as it was -- this may still cause workbook to think it is changed oWorksheet.Protect(strPwd) Else Throw New ExcelSheetNotProtectedException End If Catch COMex As System.Runtime.InteropServices.COMException 'handle error code -2146827284 If COMex.ErrorCode = -2146827284 Then 'this is the error we're looking for Else Throw End If Catch ex As Exception Throw End Try

    Read the article

  • Difference of maven jaxb plugins

    - by cuh
    I have determined that two jaxb plugin for maven2 exist, with some different configurations. The one is from Sun: http://jaxb.dev.java.net/jaxb-maven2-plugin/ the other from Mojo: http://mojo.codehaus.org/jaxb2-maven-plugin/ Has anybody experience with these two plugins, and give a recommendation? Thanks Matt. On my little research project, i found that there's quit another plugin comming from the sunners: <groupId>com.sun.tools.xjc.maven2</groupId> <artifactId>maven-jaxb-plugin</artifactId> and that one: <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> and still the one from Codehouse.

    Read the article

  • Difference dynamic static 2d array c++

    - by snorlaks
    Hello, Im using opensource library called wxFreeChart to draw some XY charts. In example there is code which uses static array as a serie : double data1[][2] = { { 10, 20, }, { 13, 16, }, { 7, 30, }, { 15, 34, }, { 25, 4, }, }; dataset->AddSerie((double *) data1, WXSIZEOF(dynamicArray)); WXSIZEOF ismacro defined like: sizeof(array)/sizeof(array[0]) In this case everything works great but in my program Im using dynamic arrays (according to users input). I made a test and wrotecode like below: double **dynamicArray = NULL; dynamicArray = new double *[5] ; for( int i = 0 ; i < 5 ; i++ ) dynamicArray[i] = new double[2]; dynamicArray [0][0] = 10; dynamicArray [0][1] = 20; dynamicArray [1][0] = 13; dynamicArray [1][1] = 16; dynamicArray [2][0] = 7; dynamicArray [2][1] = 30; dynamicArray [3][0] = 15; dynamicArray [3][1] = 34; dynamicArray [4][0] = 25; dynamicArray [4][1] = 4; dataset->AddSerie((double *) *dynamicArray, WXSIZEOF(dynamicArray)); But it doesnt work correctly. I mean point arent drawn. I wonder if there is any possibility that I can "cheat" that method and give it dynamic array in way it understands it and will read data from correct place thanks for help

    Read the article

  • Java - Difference between SwingWorker and SwingUtilities.invokeLater()

    - by Yatendra Goel
    SwingWorker is used for the following purposes: For running long-running tasks in a different thread so as to prevent the GUI from being unresponsive For updating GUI with the results produced by the long-running task at the end of the task through done() method. For updating GUI from time to time with the intermediate results produced and published by the task with the help of publish() and process() methods. SwingUtilities.invokeLater() can perform the above tasks as follows: Instead of executing SwingWorker.execute() method from the EDT, we can execute ExecutorService.submit(new MyRunnable()) as it will also create another thread which can execute long-running task. For updating GUI at the end of the task, we can put code (written in done() method of case1) SwingUtilites.invokeLater(new RunnableToExecuteDoneMethodCode()) at the end of the task. For updating GUI in the middle of the task, we can put code (written in process() method of case1) SwingUtilites.invokeLater(new RunnableToExecuteProcessMethodCode()) at the place where we called publish() method in case1. I am asking this question because the problem specified in question http://stackoverflow.com/questions/2797483/java-swingworker-can-we-call-one-swingworker-from-other-swingworker-instead-o/2824306#2824306 can be solved by SwingUtilities.invokeLater() but can't be solved with SwingWorker

    Read the article

  • Speed Difference between native OLE DB and ADO.NET

    - by weijiajun
    I'm looking for suggestions as well as any benchmarks or observations people have. We are looking to rewrite our data access layer and are trying to decide between native C++ OLEDB or ADO.NET for connecting with databases. Currently we are specifically targeting Oracle which would mean we would use the Oracle OLE DB provider and the ODP.NET. Requirements: 1. All applications will be in managed code so using native C++ OLEDB would require C++/CLI to work (no PInvoke way to slow). 2. Application must work with multiple databases in the future, currently just targeting Oracle specifically. Question: 1. Would it be more performant to use ADO.NET to accomplish this or use native C++ OLE DB wrapped in a Managed C++ interface for managed code to access? Any ideas, or help or places to look on the web would be greatly appreciated.

    Read the article

  • Difference between MS C#(csc) and mono C#(mcs) in terms of linking DLL

    - by prosseek
    I could generate DLL and link it to the EXE as follows with Visual Studio (csc) mcs /target:library /out:MathLibrary.DLL Add.cs Mult.cs mcs /out:TestCode.exe /reference:MathLibrary.DLL TestCode.cs But, with mono, I have to give the DLL info as follows. mcs /out:TestCode.exe /reference:./MathLibrary.DLL TestCode.cs <-- Is this expected behavior? Is there any way to use just the name of DLL in mono?

    Read the article

  • In .net what are the difference between Eventlog and ManagementObject for retriving logs from remote

    - by Mitesh Patel
    I have found out following two ways for getting Application Event log entries from remote server. 1. Using EventLog object string logType = "Application"; EventLog ev = new EventLog(logType,"rspl200"); EventLogEntryCollection evColl = ev.Entries 2. Using ManagementObjectSearcher object ConnectionOptions co = new ConnectionOptions(); co.Username = "testA"; co.Password = "testA"; ManagementScope scope = new ManagementScope(@"\" + "machineName"+ @"\root\cimv2", co); scope.Connect(); SelectQuery query = new SelectQuery(@"select * from Win32_NtLogEvent"); EnumerationOptions opt = new EnumerationOptions(); opt.BlockSize = 1000; using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query,opt)) { foreach (ManagementObject mo in searcher.Get()) { // write down log entries Console.Writeline(mo["EventCode"]); } } I can easily get remote eventlog using method #1 (Using EventLog object) without any security access denied exception. But using method #2 (Using ManagementObjectSearcher object) i get access denied exception. Actually I want remote event log (only application and also latest log not all application logs) to be displayed in treeview like below - ServerName - Logs + Error + Information + Warning Can anybody help me in this to find out best way from this or any other? Also the main thing is that user who reads remote logs may be in different domain than server. Thanks Mitesh Patel

    Read the article

  • Difference in performance between Stax and DOM parsing

    - by Fazal
    I have been using DOM for a long time and as such DOM parsing performance wise has been pretty good. Even when dealing with XML of about 4-7 MB the parsing has been fast. The issue we face with DOM is the memory footprint which become huge as soon as we start dealing with large XMLs. Lately I tried moving to Stax (Streaming parsers for XML) which are supposed top be second generation parsers (reading about Stax it said its the fastest parser now). When I tried stax parser for large XML for about 4MB memory footprint definitely reduced drastically but time take to parse entire XML and create java object out of it increased almost by 5 times over DOM. I used sjsxp.jar implementation of Stax. I can deuce to some extent logically that performance may not be extremely good due to streaming nature of the parser but a reduction of 5 time (e.g. DOM takes about 8 seconds to build object for this XML, whereas Stax parsing took about 40 seconds on average) is definitely not going to be acceptable. Am I missing some point here completely as I am not able to come to terms with these performance numbers

    Read the article

  • difference between adobe flash media server products

    - by Oren Mazor
    Hey folks, I've been told that I can only record streams with flash media interactive server. I already have Flash media streaming server running to stream flvs. it would seem to be trivial to set up the interactive server, and adobe obliges me by having a developer download. however, once I extracted that download, it appears to contain just standard flash media streaming server? is adobe screwing with me? the more I look into this the more it seems that nobody is actually differentiating between the two except adobe (who charge $1000 for fms, and $4000 for fmis).

    Read the article

  • Difference between Property and Method

    - by Asim Sajjad
    Which one is better to use when it come to return value for example public int EmployeeAge { get{return intEmployeeAge}; } And public int EmployeeAge() { return intEmployeeAge; } Which one is better and why? And what is best programming practice to use when we have secnario like above ?

    Read the article

  • Difference between the List and Enumeration

    - by harigm
    I have a written a method to get all the records and return in the List Type, but I got out of memory error. So I changed return type from List to Enumeration, in the method, instead of ArrayList, uses Vector and return vector.elements at the end of the method. It works without any error. but I did not understand why. Could someone explain Why this Enumeration worked?

    Read the article

  • Difference b/w putting condition in JOIN clause versus WHERE clause

    - by user244953
    Suppose I have 3 tables. Sales Rep Rep Code First Name Last Name Phone Email Sales Team Orders Order Number Rep Code Customer Number Order Date Order Status Customer Customer Number Name Address Phone Number I want to get a detailed report of Sales for 2010. I would be doing a join. I am interested in knowing which of the following is more efficient and why ? SELECT O.OrderNum, R.Name, C.Name FROM Order O INNER JOIN Rep R ON O.RepCode = R.RepCode INNER JOIN Customer C ON O.CustomerNumber = C.CustomerNumber WHERE O.OrderDate >= '01/01/2010' OR SELECT O.OrderNum, R.Name, C.Name FROM Order O INNER JOIN Rep R ON (O.RepCode = R.RepCode AND O.OrderDate >= '01/01/2010') INNER JOIN Customer C ON O.CustomerNumber = C.CustomerNumber

    Read the article

  • Difference between OData and REST web services

    - by Scott
    While looking into some web services, I ran across this "new" technology that Microsoft is calling OData. (http://www.odata.org) Reading through their description within the FAQ on what OData is, I am having a hard time distinguishing OData from REST-ful web services. Could someone please help me understand the differences?

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >