Search Results

Search found 14 results on 1 pages for 'bedwyr'.

Page 1/1 | 1 

  • How can I get Hudson to be able to access JUnit?

    - by Bedwyr Humphreys
    I've got Hudson running on TOMCAT, it can build my Netbeans project using the ant build.xml, but it won't run any of my unit tests because of what I assume is a problem with the classpath: package org.junit does not exist [javac] import org.junit.After; [javac] ^ But I've got the junit-4.8.1.jar on the classpath in /etc/environment and I can successfuly run the junit tests from a console using java org.junit.runner.JUnitCore org.junit.tests.AllTests My CLASSPATH is set to /home/bedwyr/junit4.8.1/junit-4.8.1.jar:. Am I going wrong somewhere or is there anything else I need to set? [edit] What I did was to export/include (using the ide) all libraries (including Junit) hudson then reads all it needs from the subversion repo. I then ran into an issue with exposing hudson to the internet, and pretty soon gave up on tomcat on ubuntu server (again, to do with the tomcat security manager) - glassfish is a lot smoother and that's where I am now - apache front end with ajp_proxy to hudson on glassfish.

    Read the article

  • How do you track bugs in your personal projects?

    - by bedwyr
    I'm trying to decide if I need to reassess my defect-tracking process for my home-grown projects. For the last several years, I really just track defects using TODO tags in the code, and keeping track of them in a specific view (I use Eclipse, which has a decent tagging system). Unfortunately, I'm starting to wonder if this system is unsustainable. The defects I find are typically associated with a snippet of code I'm working on; bugs which are not immediately understood tend to be forgotten, or ignored. I wrote an application for my wife which has had a severe defect for almost 9 months, and I keep forgetting to fix it. What mechanism do you use to track defects in your personal projects? Do you have a specific system, or a process for prioritizing and managing them?

    Read the article

  • How do you track bugs in your personal projects?

    - by bedwyr
    I'm trying to decide if I need to reassess my defect-tracking process for my home-grown projects. For the last several years, I really just track defects using TODO tags in the code, and keeping track of them in a specific view (I use Eclipse, which has a decent tagging system). Unfortunately, I'm starting to wonder if this system is unsustainable. The defects I find are typically associated with a snippet of code I'm working on; bugs which are not immediately understood tend to be forgotten, or ignored. I wrote an application for my wife which has had a severe defect for almost 9 months, and I keep forgetting to fix it. What mechanism do you use to track defects in your personal projects? Do you have a specific system, or a process for prioritizing and managing them?

    Read the article

  • Why does my computer beep when i type <shift>-DE quickly?

    - by Bedwyr Humphreys
    I'm writing a report on developing EJBs in Jdeveloper and every time i type "IDE" my laptop beeps twice in quick succesion. Actually, whilst typing this I've worked out that any combination of shift plus two adjacent keys, one from the row that starts qwerty and one from the row that starts asdfg will beep. It's really quite annoying. It's a hp laptop. Anyone know how I can make it stop?

    Read the article

  • Is there a config value in Wine to force Enter to send CR+LF?

    - by bedwyr
    I'm pretty new to Wine and I'm trying to use an IM client which is required for my work. When I hit 'Enter' to send a chat message, the characters indicating a new line are not being correctly interpreted. Here's a basic SYN-ACK between the two of us: His view: me: SYN!him: ACK! My view: him: SYN!me: ACK!me: ACK! Is there any way I can configure Wine to handle this correctly? Please note: this is a required application and I have no way to change its configuration.

    Read the article

  • Can I make Axis2 generate a WSDL with 'unwrapped' types?

    - by Bedwyr Humphreys
    I'm trying to consume a hello world AXIS2 SOAP web service using a PHP client. The Java class is written in Netbeans and the AXIS2 aar file is generated using the Netbeans AXIS2 plugin. You've all seen it before but here's the java class: public class SOAPHello { public String sayHello(String username) { return "Hello, "+username; } } The wsdl genereated by AXIS2 seems to wrap all the parameters so that when I consume the service i have to use a crazy PHP script like this: $client = new SoapClient("http://myhost:8080/axis2/services/SOAPHello?wsdl"); $parameters["username"] = "Dave"; $response = $client->sayHello($parameters)->return; echo $response."!"; When all I really want to do is echo $client->sayHello("Dave")."!"; My question is two-fold: why is this happening? and what can I do to stop it? :) Here's are the types, message and porttype sections of the generated wsdl: <wsdl:types> <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://soap.axis2.myhost.co.uk"> <xs:element name="sayHello"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="username" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="sayHelloResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> <wsdl:message name="sayHelloRequest"> <wsdl:part name="parameters" element="ns:sayHello"/> </wsdl:message> <wsdl:message name="sayHelloResponse"> <wsdl:part name="parameters" element="ns:sayHelloResponse"/> </wsdl:message> <wsdl:portType name="SOAPHelloPortType"> <wsdl:operation name="sayHello"> <wsdl:input message="ns:sayHelloRequest" wsaw:Action="urn:sayHello"/> <wsdl:output message="ns:sayHelloResponse" wsaw:Action="urn:sayHelloResponse"/> </wsdl:operation> </wsdl:portType>

    Read the article

  • Is there a Java API for creating a XHTML document?

    - by Bedwyr Humphreys
    I want to provide a simple XHTML representation of each of the resources in a REST web service. At the moment i'm using a StringBuilder to generate these which is both tedious and error prone. I don't see these changing after I publish the service but the process of coding each is a bit painful. Is there a XHTML document writer api? Should I just use an XML writer? Which one? Should I just roll my own basic HTML document class - doctype is the same each time, i just need to set the title, metatags and body content, most of which (but not all content) is already in HTML for the GETs. Or should I just use StringBuilder and stop whining? ;) Thanks.

    Read the article

  • How do I make a request using HTTP basic authentication with PHP curl?

    - by Bedwyr Humphreys
    I'm building a REST web service client in PHP and at the moment I'm using curl to make requests to the service. How do I use curl to make authenticated (http basic) requests? Do I have to add the headers myself? If so I've got some other questions - Is there a REST library for php? or is there a wrapper for curl that makes it a bit more rest friendly? or am I going to have to continue to roll my own? Thanks.

    Read the article

  • What exactly happens when I call a web service method using PHP::SOAP?

    - by Bedwyr Humphreys
    Say I have a simple client/server scenario with one method: // client code $client = new SoapCLient("service.wsdl"); $result = $client.getPi(); ... // server code function getPi(){ return 3.141; } $server = new SoapServer("service.wsdl"); $server.addFunction("getPi"); $server.handle(); Am I right in thinking that when the client makes a call to the getPi() method the addfunction() gets called everytime? Is this really how PHP SOAP web services work? Or is there some caching going on? Thanks.

    Read the article

  • Break a class in twain, or impose an interface for restricted access?

    - by bedwyr
    What's the best way of partitioning a class when its functionality needs to be externally accessed in different ways by different classes? Hopefully the following example will make the question clear :) I have a Java class which accesses a single location in a directory allowing external classes to perform read/write operations to it. Read operations return usage stats on the directory (e.g. available disk space, number of writes, etc.); write operations, obviously, allow external classes to write data to the disk. These methods always work on the same location, and receive their configuration (e.g. which directory to use, min disk space, etc.) from an external source (passed to the constructor). This class looks something like this: public class DiskHandler { public DiskHandler(String dir, int minSpace) { ... } public void writeToDisk(String contents, String filename) { int space = getAvailableSpace(); ... } public void getAvailableSpace() { ... } } There's quite a bit more going on, but this will do to suffice. This class needs to be accessed differently by two external classes. One class needs access to the read operations; the other needs access to both read and write operations. public class DiskWriter { DiskHandler diskHandler; public DiskWriter() { diskHandler = new DiskHandler(...); } public void doSomething() { diskHandler.writeToDisk(...); } } public class DiskReader { DiskHandler diskHandler; public DiskReader() { diskHandler = new DiskHandler(...); } public void doSomething() { int space = diskHandler.getAvailableSpace(...); } } At this point, both classes share the same class, but the class which should only read has access to the write methods. Solution 1 I could break this class into two. One class would handle read operations, and the other would handle writes: // NEW "UTILITY" CLASSES public class WriterUtil { private ReaderUtil diskReader; public WriterUtil(String dir, int minSpace) { ... diskReader = new ReaderUtil(dir, minSpace); } public void writeToDisk(String contents, String filename) { int = diskReader.getAvailableSpace(); ... } } public class ReaderUtil { public ReaderUtil(String dir, int minSpace) { ... } public void getAvailableSpace() { ... } } // MODIFIED EXTERNALLY-ACCESSING CLASSES public class DiskWriter { WriterUtil diskWriter; public DiskWriter() { diskWriter = new WriterUtil(...); } public void doSomething() { diskWriter.writeToDisk(...); } } public class DiskReader { ReaderUtil diskReader; public DiskReader() { diskReader = new ReaderUtil(...); } public void doSomething() { int space = diskReader.getAvailableSpace(...); } } This solution prevents classes from having access to methods they should not, but it also breaks encapsulation. The original DiskHandler class was completely self-contained and only needed config parameters via a single constructor. By breaking apart the functionality into read/write classes, they both are concerned with the directory and both need to be instantiated with their respective values. In essence, I don't really care to duplicate the concerns. Solution 2 I could implement an interface which only provisions read operations, and use this when a class only needs access to those methods. The interface might look something like this: public interface Readable { int getAvailableSpace(); } The Reader class would instantiate the object like this: Readable diskReader; public DiskReader() { diskReader = new DiskHandler(...); } This solution seems brittle, and prone to confusion in the future. It doesn't guarantee developers will use the correct interface in the future. Any changes to the implementation of the DiskHandler could also need to update the interface as well as the accessing classes. I like it better than the previous solution, but not by much. Frankly, neither of these solutions seems perfect, but I'm not sure if one should be preferred over the other. I really don't want to break the original class up, but I also don't know if the interface buys me much in the long run. Are there other solutions I'm missing?

    Read the article

  • Flex ChangeWatcher bind to a negative condition

    - by bedwyr
    I have a bindable getter in a component which informs me when a [hidden] timer is running. I also have a context menu which, if this timer is running, should disable one of the menu items. Is it possible to create a ChangeWatcher which watches for the negative condition of a bindable property/getter and changes the enabled property of the menu item? Here are the basic methods I'm trying to bind together: Class A: [Bindable] public function get isPlaying():Boolean { return (_timer != null) ? _timer.running : false; } Class B: private var _playingWatcher:ChangeWatcher; public function createContextMenu():void { //...blah blah, creating context menu var newItem:ContextMenuItem = new ContextMenuItem(); _playingWatcher = BindingUtils.bindProperty(newItem, "enabled", _classA, "isPlaying"); } In the code above, I have the inverse case: when isPlaying() is true, the menu item is enabled; I want it to only be enabled when the condition is false. I could create a second getter (there are other bindings which rely on the current getter) to return the inverse condition, but that sounds ugly to me: [Bindable] public function get isNotPlaying():Boolean { return !isPlaying; } Is this possible, or is there another approach I'm completely missing?

    Read the article

1