Daily Archives

Articles indexed Friday June 18 2010

Page 24/76 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • How to rewrite this eval block

    - by est
    Hi, This code smells... how do I rewrite it better? my $record; eval { while ( # undef $record here, so if getRecord() failed, nothing will be written # in the reject file do { undef $record; defined( $record = $dataFile->getRecord ) } ) { $LT_DataFile->encode($record); } 1; }; if ( my $error = $@ ) { $rejectFile->writeRecord( $error, $record ); } Thanks.

    Read the article

  • Problem opening a csv file through asp on ie8?

    - by user370010
    Hi, From my asp application, i am trying to open a csv file onto ie8. The same code is working fine on ie6 although. Below is the code: Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open objStream.Type = adTypeBinary objStream.LoadFromFile strFilePath ContentType = "application/msexcel" Response.AddHeader "Content-Disposition", "attachment; filename=" & strFileName Response.AddHeader "Content-Length", strFileSize Response.Charset = "UTF-8" Response.ContentType = ContentType Response.BinaryWrite objStream.Read Response.Flush objStream.Close Please help me undestand where i am going wrong.

    Read the article

  • How to autodoc .Net Google code projects?

    - by Remus Rusanu
    I know how to generate html documentation using Sandcastle and similar tools. But if I want to host the project on Google code, how can I easily publish the documentation straight into the Google project Wiki pages? I can see the SVN repository has a wiki folder which I assume maps to the project Wiki pages and I guess I can make a build step to build the documentation from the autodoc tags. But is there some tool that generates wiki compatible format from the code documentation tags?

    Read the article

  • how to create a custom settings view / make cell label editable

    - by Lex
    Hi everyone, I need to create a custom settings view used within the app. The app is a mockup so it actually does have one already, it uses a UITableViewCellStyleValue1, but nothing is editable. So essentially what I would like to have is the same thing but with editable detailTextLabel (the label on the right hand side), what's the best way to do this?

    Read the article

  • SEVERE error in Eclipse Web application Startup

    - by lakshmanan
    I use tomcat. I am developing a web application using struts2, and I use eclipse as my IDE for development. I get this error Mar 7, 2010 7:38:42 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/C:/Documents%20and%20Settings/Lakshmanan/My%20Documents/My%20Dropbox/Final%20year%20project/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/projit1/WEB-INF/lib/struts2-spring-plugin-2.1.8.1.jar!/struts-plugin.xml:29:132 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:593) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/classloader/ReloadingClassLoader at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getDeclaredConstructors(Class.java:1836) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:198) ... 24 more Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.classloader.ReloadingClassLoader at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329) ... 28 more Mar 7, 2010 7:38:42 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Mar 7, 2010 7:38:42 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/projit1] startup failed due to previous errors Mar 7, 2010 7:38:42 PM org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext Mar 7, 2010 7:38:42 PM org.springframework.context.support.AbstractApplicationContext doClose INFO: Closing Root WebApplicationContext: startup date [Sun Mar 07 19:38:41 GMT+05:30 2010]; root of context hierarchy Mar 7, 2010 7:38:42 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@afae4a: defining beans [personCrud,companyCrud,projectCrud,discussionCrud]; root of factory hierarchy Mar 7, 2010 7:38:42 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. Mar 7, 2010 7:38:42 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Prototype beans currently in creation]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. Mar 7, 2010 7:38:42 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap SEVERE: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [XML bean definition resources currently being loaded]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed. I am confused . Please help me in rectifying this error.

    Read the article

  • function's return address is different from its supposed value, buffer overflow,

    - by ultrajohn
    Good day everyone! I’m trying to understand how buffer overflow works. I’m doing this for my project in a computer security course I’m taking. Right now, I’m in the process of determining the address of the function’s return address which I’m supposed to change to perform a buffer overflow attack. I’ve written a simple program based from an example I’ve read in the internet. What this program does is it creates an integer pointer that will be made to point to the address of the function return address in the stack. To do this, (granted I understand how a function/program variables get organized in the stack), I add 8 to the buffer variable’ address and set it as the value of ret. I’m not doing anything here that would change the address contained in the location of func’s return address. here's the program: Output of the program when gets excecuted: As you can see, I’m printing the address of the variables buffer and ret. I’ve added an additional statement printing the value of the ret variable (supposed location of func return address, so this should print the address of the next instruction which will get executed after func returns from execution). Here is the dump which shows the supposed address of the instruction to be executed after func returns. (Underlined in green) As you can see, that value is way different from the value printed contained in the variable ret. My question is, why are they different? (of course in the assumption that what I’ve done are all right). Else, what have I done wrong? Is my understanding of the program’s runtime stack wrong? Please, help me understand this. My project is due nextweek and I’ve barely touched it yet. I’m sorry if I’m being demanding, I badly need your help.

    Read the article

  • Creating TCP network errors for unit testing

    - by Robert S. Barnes
    I'd like to create various network errors during testing. I'm using the Berkely sockets API directly in C++ on Linux. I'm running a mock server in another thread from within Boost.Test which listens on localhost. For instance, I'd like to create a timeout during connect. So far I've tried not calling accept in my mock server and setting the backlog to 1, then making multiple connections, but all seem to successfully connect. I would think that if there wasn't room in the backlog queue I would at least get a connection refused error if not a timeout. I'd like to do this all programatically if possible, but I'd consider using something external like IPchains to intentionally drop certain packets to certain ports during testing, but I'd need to automate creating and removing rules so I could do it from within my Boost.Test unit tests. I suppose I could mock the various system calls involved, but I'd rather go through a real TCP stack if possible. Ideas?

    Read the article

  • Designing Business Objects to indicate constraints such as Max Length

    - by JR
    Is there a standard convention when designing business objects for providing consumers with a way to discover constraints such as a property's maximum length? It could be used up in the UI layer to, for example, set a Textbox's MaxLength property according to the maximum length limit back in the business object. Is there a standard design approach for this?

    Read the article

  • Using Squeak from a shell

    - by Vijay Mathew
    Can I launch Squeak as a REPL (no GUI), where I can enter and evaluate Smalltalk expressions? I know the default image don't allow this. Is there any documentation on how to build a minimum image that can be accessed from a command-line shell?

    Read the article

  • How to handle Windows Events in JAVA

    - by prasad
    I'd like to ask another question how to handle Windows' events in Java. To be specific, I'd like to know how to handle events such as mouse moved or mouse clicked in Windows XP and Vista. I want to wire my own custom behavior in my application to these events, even when my application is inactive or otherwise hidden. All help is appreciated!

    Read the article

  • Placement of ButtonField

    - by rupesh
    Hi i want to place the Buttons as displayed in the image: for this i am using the following code but it is not working for me can any one please help me out topbarManager = new HorizontalFieldManager(); topbarLeftManager = new HorizontalFieldManager(Field.FIELD_LEFT); topbarRightManager = new HorizontalFieldManager(Field.FIELD_RIGHT); topbarCenterManager = new HorizontalFieldManager(Field.FIELD_HCENTER); topbarLeftManager.add(new ButtonField("first")); topbarRightManager.add(new ButtonField("second")); topbarCenterManager.add(new ButtonField("third")); topbarManager.add(topbarLeftManager); topbarManager.add(topbarCenterManager); topbarManager.add(topbarRightManager); i am not getting the result as i required. can any one please Help me out. Thanks a lot

    Read the article

  • Problems creating service using sc.exe

    - by Shoko
    I have this command to create a service: sc create svnserve binpath="\"C:\Program Files (x86)\Subversion\bin\svnserve.exe\" --service --root C:\SVNRoot" displayname="Subversion" depend=tcpip start=auto obj="NT AUTHORITY\LocalService" Unfortunately, it seems not to work, even though the syntax is correct. When I run it, I get the usage instructions (which I guess is a way of telling me that I've supplied incorrect arguments, although I have no idea what incorrect argument I might have supplied). Can anyone help me out of my difficulty? Thanks!

    Read the article

  • Active Directory with nodes in multiple IP Addresses

    - by Stormshadow
    I have written some code to fetch user information from an Active Directory Server. Suppose the Active Directory Server has nodes, each of which is another Active Directory Installation in a different geographic location. Eg: one AD server in US and another in Australia with a root AD Server in US with the former two as nodes. Would the filter queries I write for searching users across geographic locations work if I run them on the root AD server ?. The query I use is (|(objectClass=user)(objectClass=person)(objectClass=inetOrgPerson)) I cannot actually test this scenario but need to know the what will happen here.

    Read the article

  • How To create a Simple NDK Program in Android NDK

    - by Rakesh
    Hi I am new to android Programming and NDK.Yet i am not clear with working in NDK.I just downloaded android ndk r4.If i want to develop appln using NDK,and i refered http://marakana.com/forums/android/android_examples/49.html for reference,But still not clear how to create the header file and implementation,I did nt have any previuos exp in c language.And they asked for run javah tool to create the JNI header file. I dont know how to use javah tool,but i found it in java bin directory and i tried using cmd javah -jni com.pathname.classname is this correct syntax? if so i tried doing it in android bin directory.I want to know ,what classname represents,is this name of header file class that i try to create Regards Rakesh Shankar.P

    Read the article

  • Change Default Contact Application in Eclipse

    - by Saurabh
    Hi I am running eclipse on windows XP. I am trying to make changes in Default Contact Application and make it a separate apk file. But due to dependancies on other libraries it's showing me compile errors. How can this be resolved? So that I can make a new contact application using current code base. Thanks, Saurabh

    Read the article

  • How to implement an interface member that returns void in F#

    - by Drew Noakes
    Imagine the following interface in C#: interface IFoo { void Bar(); } How can I implement this in F#? All the examples I've found during 30 minutes of searching online show only examples that have return types which I suppose is more common in a functional style, but something I can't avoid in this instance. Here's what I have so far: type Bar() = interface IFoo with member this.Bar = void Fails with FS0010: Unexpected keyword 'void' in expression.

    Read the article

  • I want jQuery validator to add a class to the form element's parent

    - by Eystein
    How do I use jQuery validator to add/remove a classname (e.g. validate) on the form element's parent <li> so I can style everything related to that element by only setting the one classname? The markup is <li class="validate"> <label for="product">Product of interest <abbr title="Required field">*</abbr></label> <input id="product" type="text" name="product" value="" placeholder="e.g. school bench" class="required" minlength="2"> <!-- Hidden by CSS unless parent has 'validate' class --> <label for="product" class="description">Please name a product.</label> </li> and the default jQuery is $("#commentForm").validate();

    Read the article

  • Complete list of Fonts which support

    - by Yan Cheng CHEOK
    Currently, if I change the locale setting of my application by Locale.setDefault(Locale.ENGLISH); Locale.setDefault(Locale.SIMPLIFIED_CHINESE); What I understand from this JFreeChart forum is that, I am not using correct font. Once you get the reference of the LegentTitle, you can set it to any font. Apparently, JFreeChart's default is "Tahoma" and it doesn't support Chinese characters. May I know, how I can programmatic determine, as list of available Fonts in my system, which support Chinese? I can hard code it to Serif (It fully support Chinese, doesn't it?), its look n feel doesn't looks good to me. I would like to have more choices.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >