Search Results

Search found 1445 results on 58 pages for 'fan dz'.

Page 13/58 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Best practice for storage and retrieval of error messages.

    - by ferrari fan
    What is a best practice for storing user messages in a configuration file and then retrieving them for certain events throughout an application? I was thinking of having 1 single configuration file with entries such as REQUIRED_FIELD = {0} is a required field INVALID_FORMAT = The format for {0} is {1} etc. and then calling them from a class that would be something like this public class UIMessages { public static final String REQUIRED_FIELD = "REQUIRED_FIELD"; public static final String INVALID_FORMAT = "INVALID_FORMAT"; static { // load configuration file into a "Properties" object } public static String getMessage(String messageKey) { // return properties.getProperty(messageKey); } } Is this the right way to approach this problem or is there some de-facto standard already in place?

    Read the article

  • Google Web Toolkit in eclipse randomly requires me to reset GWT SDK

    - by Phuong Nguyen de ManCity fan
    I downloaded and install the latest version of Google App Engine Plugin into my Eclipse and created a project with it using both GAE SDK and GWT SDK. The funny thing is, randomly, my project become subjective to error, like the class RemoteServiceServlet cannot be resolved. The errors will be removed if I go to the configure tab of the project and change the GWT SDK from Default to Specific version (or vice versa). Has anyone ever encountered the same error? What the heck is it?

    Read the article

  • Where can I learn about JNDI strings?

    - by ferrari fan
    How do you know how to form a JNDI string? I know there must be a format and that the divisions must mean something but I haven't been able to find a good resource that explains them. For example: java:comp/env/wm/default. This is supposed to connect to a WorkManager in Websphere with the name of default. But what does the "java", "comp", "env" mean? I know what the wm/default mean because that's the JNDI name put in the WorkManager, but what does the rest mean? Thanks

    Read the article

  • Object slicing in Java.

    - by ferrari fan
    Can you take a subclass object and somehow convert it to an object of the same type as the parent class and at the same time slicing all the fields that are not part of the parent class? I know you can do this in C++, but I have no idea how to do it in Java.

    Read the article

  • Control serialization of GWT

    - by Phuong Nguyen de ManCity fan
    I want GWT to not serialize some fields of my object (which implements Serializable interface). Normally, transient keyword would be enough. However, I also need to put the object on memcache. The use of transient keyword would make the field not being stored on memcache also. Is there any GWT-specific technique to tell the serializer to not serialize a field?

    Read the article

  • Maven: Multiple class with the same path implemented in different jar

    - by Phuong Nguyen de ManCity fan
    I'm running into trouble with having multiple class with the same path (i.e. same name, same package!!!). For some reason, gwt-dev comes with its own version of org.apache.xerces.jaxp.DocumentBuilderFactoryImpl and javax.xml.parsers.DocumentBuilderFactory. At the same time, spring also depends on these classes but from different jar. I don't know what should be, but look like xalan & xml-api are the two dependencies that spring depends on (these dependency are optional) Funny thing is that eclipse can run the same code (it's a unit test) without problem, but surefire cannot. So I guess the problem is due to the way each runner consider the priority of each jar. Now come to the question: How can I setup my POM so that I can sure that when ever any code running inside my app, then class from a jar will be selected over class from other jar? Thanks.

    Read the article

  • Spawning Process Never Finishes on ASP.NET Page

    - by Nissan Fan
    The code below spawns the process and sits forever, never finishing. It doesn't matter what process I run. If I use delegates it doesn't work either. It just hangs up in my dev and on the test enviornment. Also, if I use Shell with Wait it does the same thing. If I set wait to false in either approach it works just fine. It's ASP.NET 2.0 VB.NET DotNetNuke 4.0 on Windows Server 2003. I can't even phathom why this would hang up. UPDATE: It causes the CPU to throttle up but it's not running anything. It's like there's something weird going on in the threading. From: http://www.freevbcode.com/ShowCode.asp?ID=5879 Public Sub ShellandWait(ByVal ProcessPath As String) Dim objProcess As System.Diagnostics.Process objProcess = New System.Diagnostics.Process() objProcess.StartInfo.FileName = ProcessPath objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden objProcess.Start() 'Wait until the process passes back an exit code objProcess.WaitForExit() 'Free resources associated with this process objProcess.Close() End Sub

    Read the article

  • A good Sorted List for Java

    - by Phuong Nguyen de ManCity fan
    I'm looking for a good sorted list for java. Googling around give me some hints about using TreeSet/TreeMap. But these components is lack of one thing: random access to an element in the set. For example, I want to access nth element in the sorted set, but with TreeSet, I must iterate over other n-1 elements before I can get there. It would be a waste since I would have upto several thousands elements in my Set. Basically, I'm looking for some thing similar to a sorted list in .NET, with ability to add element fast, remove element fast, and have random access to any element in the list. Has this kind of sorted list implemented somewhere? Thanks.

    Read the article

  • TDD a controller with ASP.NET MVC 2, NUnit and Rhine Mocks

    - by Nissan Fan
    What would a simple unit test look like to confirm that a certain controller exists if I am using Rhino Mocks, NUnit and ASP.NET MVC 2? I'm trying to wrap my head around the concept of TDD, but I can't see to figure out how a simple test like "Controller XYZ Exists" would look. In addition, what would the unit test look like to test an Action Result off a view?

    Read the article

  • Use a ContextLoaderListener in accordance with DispatchServlet

    - by Phuong Nguyen de ManCity fan
    I want to use both ContextLoaderListener (so that I can pass Spring Beans to my servlet) as well as DispatchServlet (Spring MVC). However, currently I have to pass init param to these both class initializer: <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/spring/app-config.xml </param-value> So, I use the same xml for these both classes. Wonder if it would lead to my beans being initialized twice? If yes, how would I do to avoid that?

    Read the article

  • Tiled Image for background of DIV is making IE sllllowww when scrolling

    - by Nissan Fan
    Take a look at http://www.pmverge.com at the "We're in Bootstrap Mode" DIV on the right-hand side. Having that background tile image is causing the IE browser (all versions) to drag when scrolling. What can I do to keep that tiled style but not have it slow down IE. background-image: url(http://blog.pmverge.com/assets/images/background.gif) NOTES Yes this is the Stackoverflow.com engine as I'm licensing it. The background watermark image is not slowing the page down (though it has about 50k).

    Read the article

  • Why can't I do this from ASP.NET?

    - by Nissan Fan
    The code below spawns the process and sits forever, never finishing. It doesn't matter what process I run. Also, if I use Shell with Wait it does the same thing. If I set wait to false in either approach it works just fine. It's ASP.NET 2.0 VB.NET DotNetNuke 4.0 on Windows Server 2003. I can't even phathom why this would hang up. From: http://www.freevbcode.com/ShowCode.asp?ID=5879 Public Sub ShellandWait(ByVal ProcessPath As String) Dim objProcess As System.Diagnostics.Process objProcess = New System.Diagnostics.Process() objProcess.StartInfo.FileName = ProcessPath objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal objProcess.Start() 'Wait until the process passes back an exit code objProcess.WaitForExit() 'Free resources associated with this process objProcess.Close() End Sub

    Read the article

  • Cannot get Request.Form by name in ASP.NET

    - by Nissan Fan
    I have an ASP.NET page which utilizes jQuery for an autocomplete-type scenario. The jQuery tucks the actual selected values into a hidden field it creates on the fly, but for some reason I cannot get the value of that standard HTML field on postback by calling Request.Form["HiddenFieldName"]. I can see it by ordinal in the Request.Form object, but if I add/remove controls it will break. Any suggestions?

    Read the article

  • Convert webpage to image from ASP.NET

    - by Nissan Fan
    I would like to create a function in C# that takes a specific webpage and coverts it to a JPG image from within ASP.NET. I don't want to do this via a third party or thumbnail service as I need the full image. I assume I would need to somehow leverage the webbrowser control from within ASP.NET but I just can't see where to get started. Does anyone have examples?

    Read the article

  • What are some good resources for WebForms MVP?

    - by Nissan Fan
    I've seen a little buzz on ASP.NET Web Forms MVP, but where can I get resources? http://webformsmvp.com is pretty much stubbed out for now. This appears to be a compelling refresh of the Web Forms paradigm and bring into the fold things that make ASP.NET MVC great. I hear it's going to be put out there at MIX10 this week, but anyone have any useful sites/references?

    Read the article

  • How to add JS/CSS files to Joomla modules?

    - by Apache Fan
    I am starting out with Joomla and am writing a simple Joomla module. I am using some custom CSS and JS in my module. Now when I distribute this module I need my JS/CSS files to go with the ZIP. I have added my files in my module ZIP file. This is what i need to know - How do I refer to these CSS/JS files in my module so that even if I distribute the module as a zip i would not have to send the css/js files separately? I tried looking at different solutions including http://www.howtojoomla.net/how-tos/development/how-to-add-cssjavascript-to-your-joomla-extension But I was not able to figure out what the URL for the JS/CSS file should be? I am using Joomla 1.7 hosted on a cloud hosting site. Thanks

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >