Search Results

Search found 9771 results on 391 pages for 'equivalence classes'.

Page 160/391 | < Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >

  • DUnit: How to run tests?

    - by Ian Boyd
    How do i run TestCase's from the IDE? i created a new project, with a single, simple, form: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) private public end; var Form1: TForm1; implementation {$R *.DFM} end. Now i'll add a test case to check that pushing Button1 does what it should: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private public end; var Form1: TForm1; implementation {$R *.DFM} uses TestFramework; type TForm1Tests = class(TTestCase) private f: TForm1; protected procedure SetUp; override; procedure TearDown; override; published procedure TestButton1Click; end; procedure TForm1.Button1Click(Sender: TObject); begin //todo end; { TForm1Tests } procedure TForm1Tests.SetUp; begin inherited; f := TForm1.Create(nil); end; procedure TForm1Tests.TearDown; begin f.Free; inherited; end; procedure TForm1Tests.TestButton1Click; begin f.Button1Click(nil); Self.CheckEqualsString('Hello, world!', f.Caption); end; end. Given what i've done (test code in the GUI project), how do i now trigger a run of the tests? If i push F9 then the form simply appears: Ideally there would be a button, or menu option, in the IDE saying Run DUnit Tests: Am i living in a dream-world? A fantasy land, living in a gumdrop house on lollipop lane?

    Read the article

  • How to help Open Source Softwares?

    - by Rajan Walia
    I know basic C++ like about classes and other basic stuff what are the things which i need to know so that i can understand the source code of some advance open source projects and be able to make one too. Like if i read the code of vlc or some other projects I can't understand many things moreover i am just a beginner have not worked on even multi file programs so please suggest which are the books and what are the basic projects from where i can start.

    Read the article

  • Convert a custom config class into POCO

    - by BozoJoe
    Given a set custom configuration classes based off ConfigurationElement I want to convert the custom class into a POCO object graph. Could reflection and LINQ extension methods give me an object which removes the ConfigurationElement inheritance?

    Read the article

  • defining asmx webservice class objects as static

    - by Usama Khalil
    Hi, is it better to declare Webservice class object instances as static as the .asmx webservice classes have only static methods. what i want is that i declare and instantiate webservice asmx class as static in aspx Page Behind Class. and on every event call on that page i could perform operation against webservice methods. is it beneficial in terms of performance? Thanks Usama

    Read the article

  • Howcan I get started with Spring Batch?

    - by C. Ross
    I'm trying to learn Spring Batch, but the startup guide is very confusing. Comments like You can get a pretty good idea about how to set up a job by examining the unit tests in the org.springframework.batch.sample package (in src/main/java) and the configuration in src/main/resources/jobs. aren't exactly helpful. Also I find the Sample project very complicated (17 non-empty Namespaces with 109 classes)! Is there a simpler place to get started with Spring Batch?

    Read the article

  • StackOverFlowException when generating C# code from xsd using xsd.exe (VS2010)

    - by Staffan
    Hello, I am trying to generate C# code from an XML schema with xsd.exe with Visual Studio RC1 (version 10.0.30128.1) but get the follwoing error: C:\Developmentxsd CR2008Schema.xsd /classes Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 4.0.30128.1] Copyright (C) Microsoft Corporation. All rights reser Process is terminated due to StackOverflowException. The xsd is http://www.businessobjects.com/products/xml/CR2008Schema.xsd Any help appreciated. Thanks, Staffan

    Read the article

  • Twitter class by Tijs Verkoyen

    - by Tim
    I am trying to use this class http://classes.verkoyen.eu/twitter/ to update status on twitter, but I am getting this error: /statuses/update.xml Could not authenticate you. My code is just the following, I am using the latest version of the class (1.0.5) <?php include "twitter.php"; $twit = new Twitter("username","password"); $twit->updateStatus("Testing"); ?>

    Read the article

  • Does multiple cpp files correspond to multiple compilation units?

    - by Rahul
    Hello All, Suppose, we have a big Class. and we don't want to break it. In order to maintain code suppose we have created a multiple example1.cpp, example2.cpp, example3.cpp files for single example.h file for class cexample. Does this correspond to multiple compilations units? What is the best approach to handle such big classes? Any suggestions and comments are appreciated. Thank you, RAHUL

    Read the article

  • How to test lib files in Rails?

    - by jerhinesmith
    I understand the benefit of putting classes, modules, etc. in the lib folder in Rails, but I haven't been able to find a clean way of testing these files. For the most part, it seems like unit tests would be the logical approach. I guess my question is: What is the "rails way" for testing lib files?

    Read the article

  • Finding objects in J2ME M3G

    - by Jani
    I'm using Blender to create m3g files and then I load them in a java program. Which is the best way to find an object in the World? Should I create separate classes for every object and then add them to one World object or should I assign IDs to the objects in Blender and find them in the program by ID? Or export every object to a separate M3G file? (Or some other way?)

    Read the article

  • Where should jpos.xml be located for JPos Tomcat app.?

    - by user258526
    I am trying to add in a new driver to our system running under Tomcat. The vendor has provided a JPos driver, my question is where to put the jpos.xml file so Tomcat can find it? I tried putting it in tomcat\common\classes but still get a JPOSException "Service does not exist in loaded JCL registry" when I try to open it. Help!

    Read the article

  • Why doesn't genstrings convert NSLocalizedStringFromTable entries to table.strings?

    - by juan tendero
    In my source code I have some lines like NSLocalizedStringFromTable(@"Info", @"en", @"Title of this view"). When I subsequently call genstrings -o en.lproj ./Classes/*.m I would not get the expected file en.strings but Localized.strings, although I've read in the genstrings-manpage that it would generate a table.strings file from NSLocalizedStringFromTable(a, table, c) function. Am I wrong? How would I create a table.strings file then?

    Read the article

  • Accessing not Non-QObject-based objects from Qt Script

    - by uni
    Is there any nice and simple way to access non QObject-based classes, such as QXmlQuery, QDateTime etc. from Qt Script? The only way I see is to wrap QXmlQuery in another class that inherits QObject and declare as slot every function which I need to access from Qt Script: void MyXmlQuery::setQuery ( const QString & sourceCode, const QUrl & documentURI ) { realxmlquery_.setQuery(sourceCode, documentURI); }

    Read the article

  • How to implement HMVC using Kohana's cascading file system

    - by Yarin
    Kohana 3.2 was designed to support the HMVC design pattern. The HMVC pattern consists of nested MVC-triads. Yet as far as I can tell, Kohana's cascading file system requires all Models and Controllers to be placed within a top 'classes' directory, and Views into a top 'views' directory. If Model/Controllers are thus separated from Views at the top level of the file system, then how are we supposed to implement nested MVC-triads?

    Read the article

  • The same class file in multiple .jar files. How bad is this?

    - by Kannan Goundan
    I have a library that writes data in either a text or binary format. It has the following three components: common data structures text writer (depends on 1) binary writer (depends on 1) The obvious way to distribute this is as 3 .jar files, so that users can include only what they need. However, the "common data structures" component is really just two small classes so I'm considering creating only two .jar files and including the common .class files in both. My question: What are the potential problems with doing this?

    Read the article

  • Rational Application Developer (RAD) 7.5+ and websphere runtime will not pick up jars from projects

    - by Berlin Brown
    With RAD Version: 7.5.3, Java 1.5. I have a couple of different projects. I needed to break out the java code and turn the *.class files into a jar. So basically, same *.class files I just removed the code and then jarred the class files into a jar. I broke the classes into a jar and then included the jar in the project. And I also did an order/export on the jar so that other projects can see the jar. At this point, ideally my project should not have changed because I am using class files in a jar instead of the java code. When I visit my web application in websphere, I get class not found errors on the classes that are now in the jar. Project Structure: A. Project earApp -- will need the webapp B. Project webapp -- will need the project (no jar files or *.java files are found in this project) C. Project javasrc -- the java source and the NEW JAR file are found here. I don't think websphere is acknowledging the jar. Here is the error: java.lang.NoClassDefFoundError: com.MyApp at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:258) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:675) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:614) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:431) at java.lang.ClassLoader.loadClass(ClassLoader.java:597) at java.lang.Class.getDeclaredMethodsImpl(Native Method) at java.lang.Class.getDeclaredMethods(Class.java:664) at com.ibm.ws.webcontainer.annotation.data.ScannedAnnotationData.collectMethodAnnotations(ScannedAnnotationData.java:130) at com.ibm.ws.webcontainer.annotation.data.ScannedAnnotationData.<init>(ScannedAnnotationData.java:47) at com.ibm.ws.webcontainer.annotation.AnnotationScanner.scanClass(AnnotationScanner.java:61) at com.ibm.ws.wswebcontainer.webapp.WebApp.processRuntimeAnnotationHelpers(WebApp.java:711) at com.ibm.ws.wswebcontainer.webapp.WebApp.populateJavaNameSpace(WebApp.java:624) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:289) at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:93) at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:162) at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:671) at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:624) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:395) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:611) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1274) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1165) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:587) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:832) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:921) at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2124) at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:342) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497) What do you think I need to do?

    Read the article

  • Java keyboard hook

    - by Jason S
    I would like to write a Java app that counts how long I have been using the keyboard or mouse w/o a break. Are there any built-in classes or 3rd party libraries that can detect global keyboard/mouse use?

    Read the article

  • Cant full read querystring data in mvc4 application using a class array as input to action

    - by Anders Lindén
    I have made a mvc4 application and I have a Controller that outputs a png file like this: using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Drawing.Text; using System.IO; using System.Web.Mvc; using Foobar.Classes; namespace Foobar.Controllers { public class ImageController : Controller { public ActionResult Index(Label[] labels) { var bmp = new Bitmap(400, 300); var pen = new Pen(Color.Black); var font = new Font("arial", 20); var g = Graphics.FromImage(bmp); g.SmoothingMode = SmoothingMode.HighQuality; g.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; if (labels != null) { g.DrawString("" + labels.Length, font, pen.Brush, 20, 20); if (labels.Length > 0) { g.DrawString("" + labels[0].label, font, pen.Brush, 20, 40); } } var stream = new MemoryStream(); bmp.Save(stream, ImageFormat.Png); stream.Position = 0; return File(stream, "image/png"); } } } The Label class looks like this: using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Foobar.Classes { public class Label { public string label { get; set; } public int fontsize { get; set; } } } When I run my controller having this in the url: http://localhost:57775/image?labels[0][label]=Text+rad+1&labels[0][fontsize]=5&labels[1][fontsize]=5&labels[2][fontsize]=5 I get the correct amount of labels, so the image will show 3. But the instances of Label will not get its data members fill in. I have also tried to do this using plain variables (not properties). If they were filled in, the image would actually show "3" and "Text rad 1". So what do I put in the class "Label" to have the properties right? Should there be some kind of annotation? Where do I read about this?

    Read the article

  • Technique/class to clean invalid XML in AS3/Flex 4?

    - by Quentin
    I'm looking for a way to load invalid (malformed) XML into an AS3 XML object. Do you know a class or a technique to do so? I have to load malformed HTML and parse it as XML. This is a Flex project so I can use Flex specific classes if needed! I thought of using the HTMLLoader since it accepts all kinds of malformed HTML and renders it properly but couldn't get anything to work...

    Read the article

  • Robust, Mature HTML Parser for PHP

    - by Alan Storm
    Are there any robust and mature HTML parsers available for PHP? A quick skimming of PEAR didn't turn anything up (lots of classes for generating HTML, not so much for consuming), and Google taught me a lot of people have started and then abandoned a variety of parser projects. Not interested in XML parsers (unless then can consume non-well formed HTML) or hacking it on my own with regular expressions. Clarification of Intent: I'm not interested in filtering of HTML content, I'm interesting in extracting information from HTML documents.

    Read the article

< Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >