Search Results

Search found 55268 results on 2211 pages for 'startup error'.

Page 116/2211 | < Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >

  • Is unnecessary error handling recommended in business logic? eg. Null check/Percentage limit check etc

    - by novice_at_work
    We usually put unnecessary checks in our business logic to avoid failures. Eg. 1. public ObjectABC funcABC(){ ObjectABC obj = new ObjectABC; .......... .......... //its never set to null here. .......... return obj; } ObjectABC o = funABC(); if(o!=null){ //do something } Why do we need this null check if we are sure that it will never be null? Is it a good practice or not? 2. int pplReached = funA(..,..,..); int totalPpl = funB(..,..,..); funA() just puts a few more restriction over result of funB(). Double percentage = (totalPpl==0||totalPpl<pplReached) ? 0.0 : pplReached/totalPpl; Do we again need this check? The questions is: Aren't we swallowing some fundamental issue by putting such checks? Issues which should be shown ideally, are avoided by putting these checks. What is the recommended way?

    Read the article

  • An error saying unidentifed function "push", "pop", and"display" occurs, what should i add to fix i

    - by Alesha Aris
    #include<stdio.h> #include<iostream.h> #include<conio.h> #include<stdlib.h>(TOP) #include<fstream.h> #define MAX 5 int top = -1; int stack_arr[MAX]; main() { int choice; while(1) { printf("1.Push\n"); printf("2.Pop\n"); printf("3.Display\n"); printf("4.Quit\n"); printf("Enter your choice : "); scanf("%d",&choice); switch(choice) { case 1 : push(); break; case 2: pop(); break; case 3: display(); break; case 4: exit(1); default: printf("Wrong choice\n"); }/*End of switch*/ }/*End of while*/ }/*End of main()*/ push() { int pushed_item; if(top == (MAX-1)) printf("Stack Overflow\n"); else { printf("Enter the item to be pushed in stack : "); scanf("%d",&pushed_item); top=top+1; stack_arr[top] = pushed_item; } }/*End of push()*/ pop() { if(top == -1) printf("Stack Underflow\n"); else { printf("Popped element is : %d\n",stack_arr[top]); top=top-1; } }/*End of pop()*/ display() { int i; if(top == -1) printf("Stack is empty\n"); else { printf("Stack elements :\n"); for(i = top; i >=0; i--) printf("%d\n", stack_arr[i] ); } }/*End of display()*/

    Read the article

  • Is it ever OK to throw a java.lang.Error?

    - by Abhijeet Kashnia
    I have a plugin module that goes into a web application. If the module does not load correctly, it does not make sense for the web application to go on, and the web application should probably not load at all, we would prefer this module to initialize correctly always. If I were to throw a runtime exception, it would get into the logs, and just get ignored since the application will continue anyway, and the end users would never know... I know that errors are meant to be thrown only under exceptional conditions, and they generally have to do with situations that the system cannot recover from, but what would you do in such a situation?

    Read the article

  • Workstation hardware at does your company buy developers?

    - by Bosh
    I'm curious to know what workstation hardware companies are devoting to you, as a developer -- and how much they're spending. I'd consider this thread a big success if I could shed some light on these questions: Do engineers at big companies use substantially different hardware than engineers at start-ups companies? Does a fresh developer recruit at Google get substantially different hardware from someone in the same position at Microsoft or Yahoo!? Do programmers in more senior positions have more powerful hardware on their desks? Does anyone think faster hardware makes more efficient engineers?

    Read the article

  • A 110 kb .NET 4.0 app needs 10 seconds for a cold start, thats not acceptable !

    - by msfanboy
    Hello, I am using the .NET 4.0 client profile for my app and I run a dual core with 4 GB Ram and a fast hard disk. nothing big is done at the start just showing a generic List in a wpf listview. How can I make the cold start faster of my assembly ? I have done now again a cold start and run the windowsapplication.exe in my \obj\x86\Debug folder and my harddisk run like hell and it took 10,5 seconds ??? What is wrong? The warm start after the cold one took 1 second. Java 6 apps has not that problem, not at all just to compare...

    Read the article

  • FASM - Adding to Start Up HKCU

    - by Josh Line
    I am trying to make my FASM application add itself to the system start up by adding an entry in "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" I am using the following API's: RegOpenKeyExA RegSetValueExA RegCloseKey In advapi32.dll When my code is ran, the entry is never created. Here is my code: format PE GUI 4.0 include "Win32A.Inc" entry start section ".idata" import data readable writable library kernel32, "kernel32.dll",\ advapi32, "advapi32.dll" import kernel32,\ lstrlen, "lstrlenA",\ ExitProcess, "ExitProcess" import advapi32,\ RegOpenKeyExA, "RegOpenKeyExA",\ RegSetValueEx, "RegSetValueExA",\ RegCloseKey, "RegCloseKey" section ".data" data readable writeable sKey db "SOFTWARE\Microsoft\Windows\CurrentVersion\Run",0 lpData db "C:\File.txt",0 lpValueName db "Text File" phkresult dd ? section ".code" code readable executable start: invoke RegOpenKeyExA, HKEY_CURRENT_USER, sKey, 0, KEY_SET_VALUE, phkresult invoke lstrlen, lpData invoke RegSetValueEx, phkresult, lpValueName, 0, REG_SZ, lpData, eax invoke RegCloseKey, phkresult exit: invoke ExitProcess, 0 I am not understanding as to why my entry is not being added in the registry. Any help on this issue would be greatly appreciated.

    Read the article

  • [C#] Running elevated applications on user login with UAC?

    - by Alex
    I need to start a program every time the user logs in, but I cannot do this without being met by a UAC dialog asking for permissions for that application. Is there any way to have an application start up on user login without the user having to answer the UAC prompt? I was thinking about running a service, but this would be a last resort. I saw something about an Application Compatibility Toolkit to disable UAC for certain applications, but I feel this is too big of a hassle - even services would be easier to program. I was just wondering if there is an even easier solution I am missing. Thanks in advance.

    Read the article

  • Android phone as a dedicated device

    - by user649459
    Hi, We want to use Android mobile for dedicated application. Can somebody suggest how can we make it happen. Here are the requirement: The phone when started, should launch our application., so the user cannot launch any other application. The application will be a 1D barcode reader. The application should be live as long as the phone is up and running, user cannot close the application at all. Thanks for your help. Regards, Manish

    Read the article

  • VS 2010 Error “Object reference not set to an instance of an object” when adding Service Reference f

    - by Andy
    I have a VS2010 (RTM) solution which contains: WCF Service project Console WCF client project Class project for DataContracts and members Class project for some simple classes I successfully added a service reference in the console client project and ran the client. I then did a long dev cycle repeatedly modifying the service then updating console service reference. I then changed the namespace and assembly names for the projects as well as the .cs using references and app.config. I of course missed some things as it would not build so I eventually removed the project references and the service reference, cleaned and built successfully. I then attempted to add the service reference again, it discovered it but threw the “Object reference not set to an instance of an object” when OK'ing. Fix in answer below...

    Read the article

  • New Site : Showing first time visitors what the site offers

    - by PlanetUnknown
    The site I'm working on, is almost completed. I have a Demo page created as well, where people can try out the product. However for first time visitors to understand what service the site actually provides I'm brainstorming with the following ideas. Since a lot of folks have been through this a number of time, would like to get some advice on what they use and what generally works. Here is what I came up with - 1.) Plain Slideshow, showing various features. (Using jQquery, hence figuring out a simple BUT professional looking plugin).Simplest to implement. 2.) Flash - Will have to hire someone. 3.) JellyVision ? - I'm not sure if this is free though. But something free like this would be great !

    Read the article

  • Spring server start-up event

    - by jia
    i am facing a problem. I am using tomcat server for my spring maven project and i want to subscribe my application to facebook once when server starts up. I have tried ApplicationListener ContextRefreshedEvent. It gets invoked on application context initialization, but the issue is at that time my server has not completely started and hence my application is not publically accessible which is required in my case as facebook subscription requires verification using application public URL. So i want to do subscription when my server gets started completey and not on application context initialization. Any idea how can i do it? Do i have nay application level event listener that can tell me that server has started completely? Regards jia

    Read the article

  • Global.asax for Unit Tests?

    - by AngryHacker
    In my MSTest UnitTest project, before running any tests, I need to execute some commands. Is there a feature, kind of like Global.asax is for web based projects, that will let me kick off something before any tests run?

    Read the article

  • 2 Rails Apps, 1 Database (using Heroku)

    - by Paul A.
    I've made 2 apps, App A and App B. App A's sole purpose is to allow users to sign up and App B's purpose is to take select users from App A email them. Since App A & B were created independently & are hosted in 2 separate Heroku instances, how can App B access the users database in App A? Is there a way to push certain relevant rows from App A to App B?

    Read the article

  • The type initializer for {Data.DataModule} threw an exception.

    - by squirms
    In visual basic, when in the "frmMain Events: Load", I get the following error The type initializer for 'projData.projDataModule' threw an exception. when running the code: var = 180 "var" is defined in projDataModule as Module projDataModule Public var As Double End Module When I rebuild the solution, It says "0 errors, 0 warnings" and will actually compile, however the Error list shows the following error: Error 1 Custom tool error: Failed to generate file: There is an error in XML document (1, 1). I:\Documents and Settings\Bill\Desktop\Projects\Data\My Project\Application.myapp 1 1 Data Any ideas or help at all would be greatly appreciated. Thanks in advance.

    Read the article

  • JavaScript library not working in IE, can't see error information.

    - by Wolfy87
    Hi there. I have been writing a JavaScript library for a few weeks now and it works brilliantly in Firefox, Chrome and Safari. I had not tested it in IE until recently. I do not own a Windows box so after testing it on my friends and realising it wasnt working I started going over my code for things that could be causing it to break. So far I have found nothing. I could not find any descriptions of the errors in the browser while I was there either. So I wondered if anyone could run my test script in an IE browser (6, 7 or 8) and let me know any information they can find as to why it crashed. Please ignore any information saying it works in IE6, I put that up there after testing it through http://ipinfo.info/netrenderer/ I just assumed it was working because I could set transparency and size via my script and see it run in this tool. Here is the link to my GitHub repository: https://github.com/Wolfy87/Spark If you download it and run spark.html it will attempt to run all of my functions from the library. So if anyone could be kind enough to run it in IE and either let me know what errors they are getting and possibly how to fix them then I will be extreamly grateful. Thank you in advance. EDIT: Here is it's website http://sparkjs.co.uk/

    Read the article

< Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >