Search Results

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

Page 88/391 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • Code cleanup in netbeans

    - by Kapsh
    Is there something similar to the Eclipse cleanup rules ((Preferences Java Code Style Clean Up) in NetBeans? The cleanup rules in eclipse will allow you to clean things up like organizing imports, removing unnecessary casts, adding missing override annotations etc. Also can you do that on a whole set of classes/packages instead of individual classes?

    Read the article

  • How to packing Resources in Maven Project?

    - by Rehman
    I am looking for suggestion in putting image file maven web project. One of classes under src/main/java need to use an image file. My problem is, if i put image file under src/main/webapp/images then application server cannot find that path on runtime(where myeclipse can ) because war archive do not have specified path "src/main/webapp/images". My question is where should i put the image file that my project can find it without prompting any error or exception. I am using Java Web Application with Mavenized falvour MyEclipse 10 Application Server: JBoss 6 Currently i do have following dir structure Project Directory Structure -src/main/java -- classes -src/main/resources -- applicationContext.xml -src/test/java -- test classes -src/test/resources (nothing) -src -- main --- webapp --WEB-INF --Images --Css --Meta-INF -target -pom.xml And pom.xml's build snippet is as follows <build> <sourceDirectory>${basedir}/src/main/java</sourceDirectory> <outputDirectory>${basedir}/target/${project.artifactId}/classes</outputDirectory> <resources> <resource> <directory>${basedir}/src/main/resources</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> <testResources> <testResource> <directory>${basedir}/src/test/resources</directory> </testResource> </testResources> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${jdk.version}</source> <target>${jdk.version}</target> <optimize>true</optimize> <useProjectReferences>true</useProjectReferences> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory> <webResources> <resource> <directory>${basedir}/src/main/resources</directory> </resource> </webResources> </configuration> </plugin> </plugins> </build> Thanks in advance

    Read the article

  • problem in concurrent web services

    - by user548750
    Hi All I have developed a web services. I am getting problem when two different user are trying to access web services concurrently. In web services two methods are there setInputParameter getUserService suppose Time User Operation 10:10 am user1 setInputParameter 10:15 am user2 setInputParameter 10:20 am user1 getUserService User1 is getting result according to the input parameter seted by user2 not by ( him own ) I am using axis2 1.4 ,eclipse ant build, My services are goes here User class service class service.xml build file testclass package com.jimmy.pojo; public class User { private String firstName; private String lastName; private String[] addressCity; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String[] getAddressCity() { return addressCity; } public void setAddressCity(String[] addressCity) { this.addressCity = addressCity; } } [/code] [code=java]package com.jimmy.service; import com.jimmy.pojo.User; public class UserService { private User user; public void setInputParameter(User userInput) { user = userInput; } public User getUserService() { user.setFirstName(user.getFirstName() + " changed "); if (user.getAddressCity() == null) { user.setAddressCity(new String[] { "New City Added" }); } else { user.getAddressCity()[0] = "==========="; } return user; } } [/code] [code=java]<service name="MyWebServices" scope="application"> <description> My Web Service </description> <messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> </messageReceivers> <parameter name="ServiceClass">com.jimmy.service.UserService </parameter> </service>[/code] [code=java] <project name="MyWebServices" basedir="." default="generate.service"> <property name="service.name" value="UserService" /> <property name="dest.dir" value="build" /> <property name="dest.dir.classes" value="${dest.dir}/${service.name}" /> <property name="dest.dir.lib" value="${dest.dir}/lib" /> <property name="axis2.home" value="../../" /> <property name="repository.path" value="${axis2.home}/repository" /> <path id="build.class.path"> <fileset dir="${axis2.home}/lib"> <include name="*.jar" /> </fileset> </path> <path id="client.class.path"> <fileset dir="${axis2.home}/lib"> <include name="*.jar" /> </fileset> <fileset dir="${dest.dir.lib}"> <include name="*.jar" /> </fileset> </path> <target name="clean"> <delete dir="${dest.dir}" /> <delete dir="src" includes="com/jimmy/pojo/stub/**"/> </target> <target name="prepare"> <mkdir dir="${dest.dir}" /> <mkdir dir="${dest.dir}/lib" /> <mkdir dir="${dest.dir.classes}" /> <mkdir dir="${dest.dir.classes}/META-INF" /> </target> <target name="generate.service" depends="clean,prepare"> <copy file="src/META-INF/services.xml" tofile="${dest.dir.classes}/META-INF/services.xml" overwrite="true" /> <javac srcdir="src" destdir="${dest.dir.classes}" includes="com/jimmy/service/**,com/jimmy/pojo/**"> <classpath refid="build.class.path" /> </javac> <jar basedir="${dest.dir.classes}" destfile="${dest.dir}/${service.name}.aar" /> <copy file="${dest.dir}/${service.name}.aar" tofile="${repository.path}/services/${service.name}.aar" overwrite="true" /> </target> </project> [/code] [code=java]package com.jimmy.test; import javax.xml.namespace.QName; import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.rpc.client.RPCServiceClient; import com.jimmy.pojo.User; public class MyWebServices { @SuppressWarnings("unchecked") public static void main(String[] args1) throws AxisFault { RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference( "http://localhost:8080/axis2/services/MyWebServices"); options.setTo(targetEPR); // Setting the Input Parameter QName opSetQName = new QName("http://service.jimmy.com", "setInputParameter"); User user = new User(); String[] cityList = new String[] { "Bangalore", "Mumbai" }; /* We need to set this for user 2 as user 2 */ user.setFirstName("User 1 first name"); user.setLastName("User 1 Last name"); user.setAddressCity(cityList); Object[] opSetInptArgs = new Object[] { user }; serviceClient.invokeRobust(opSetQName, opSetInptArgs); // Getting the weather QName opGetWeather = new QName("http://service.jimmy.com", "getUserService"); Object[] opGetWeatherArgs = new Object[] {}; Class[] returnTypes = new Class[] { User.class }; Object[] response = serviceClient.invokeBlocking(opGetWeather, opGetWeatherArgs, returnTypes); System.out.println("Context :"+serviceClient.getServiceContext()); User result = (User) response[0]; if (result == null) { System.out.println("User is not initialized!"); return; } else { System.out.println("*********printing result********"); String[] list =result.getAddressCity(); System.out.println(result.getFirstName()); System.out.println(result.getLastName()); for (int indx = 0; indx < list.length ; indx++) { String string = result.getAddressCity()[indx]; System.out.println(string); } } } }

    Read the article

  • eclEmma - full code coverage on class header?

    - by Fork
    Hi, I have a class that starts with: public class GeneralID implements WritableComparable<GeneralID>{ ... } And another that is: public class LineValuesMapper<KI, VI, KO, VO> extends Mapper<LongWritable, Text, Text, IntWritable>{ ... } All methods in these classes are covered. But not their header. The header of both classes gets painted as yellow with EclEmma. Is there anything I can do to fully cover the class header?

    Read the article

  • execute python file from another file

    - by ariel
    Hi I have a python file that has functions and classes. now I am writting another program (in another file). and I want to start the new file with running the old file (with the function and classes). I have tried using exec(path_2_oldFile.pyw) but it didn't work. thanks for any help Ariel

    Read the article

  • Jquery UI: How to define different CSS styles for Tabs and Slider on the same page

    - by Kelvin
    Hello all, I have two elements on the same page that are using the same stylesheet: Jquery Tabs and Jquery Slider. I cannot redefine classes of slider since change of css will affect both elements. Tabs using these classes: ui-tabs ui-widget ui-widget-content ui-corner-all And these are used in Slider: ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all How can I modify slider css without modifying one for tabs? Thanks

    Read the article

  • Custom Collection Initializers

    - by Jake
    Classes that implement IEnumerable and provide a public void Add(/* args */) function can be initialized like in the following example: List<int> numbers = new List<int>{ 1, 2, 3 }; which calls the Add(int) function 3x after initializing the List<int>. Is there a way to define this behavior explicitly for my own classes? For example, could I have the initializer call a function other than the appropriate Add() overload?

    Read the article

  • Java SecurityException : signer information does not match

    - by Frank
    I recompiled my classes as usual, and suddenly got the following error message, why ? How to fix it ? "java.lang.SecurityException: class "Chinese_English_Dictionary"'s signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:776)

    Read the article

  • defining class relationships in c# and visual studio 2010

    - by andy
    Hey guys, in Visual Studio 2010 I can point to a bunch of classes and create a diagram. However, the diagram by default doesn't recognize any relationships between the classes, except inheritance and implementations. Is there a way, ideally by using Attributes, to define class and property relationships and associations in such a way that it is picked up by a new Class Diagram automatically? cheers!

    Read the article

  • Serializing WPF RichTextBox to XAML vs RTF

    - by chaiguy
    I have a RichTextBox and need to serialize its content to my database purely for storage purposes. It would appear that I have a choice between serializing as XAML or as RTF, and am wondering if there are any advantages to serializing to XAML over RTF, which I would consider as more "standard". In particular, am I losing any capability by serializing to RTF instead of XAML? I understand XAML supports custom classes inside the FlowDocument, but I'm not currently using any custom classes (though the potential for extensibility might be enough reason to use XAML).

    Read the article

  • Serializing WPF RichTextBox to XAML vs RTF

    - by chaiguy
    I have a RichTextBox and need to serialize its content to my database purely for storage purposes. It would appear that I have a choice between serializing as XAML or as RTF, and am wondering if there are any advantages to serializing to XAML over RTF, which I would consider as more "standard". In particular, am I losing any capability by serializing to RTF instead of XAML? I understand XAML supports custom classes inside the FlowDocument, but I'm not currently using any custom classes (though the potential for extensibility might be enough reason to use XAML).

    Read the article

  • How to apply Single Responsibility Principle to a service class

    - by Shekhar
    Hello Suppose we are designing a UserServiceImpl class which does CRUD(Create, Read, Update, and Delete) operations. In my view Create, Read, Update, and Delete are four reasons for a class to change. Does this class violates Single Responsibility Principle? If it violates, then should we have four classes like CreateUserServiceImpl, ReadUserServiceImpl, UpdateUserServiceImpl, and DeleteUserServiceImpl. Isn't it an overkill to have lots of classes? Thanks Shekhar

    Read the article

  • Why is the setContextClassLoader() method placed on Thread ?

    - by Roman
    Why is the setContextClassLoader() method placed on thread ? What different thread have different classloaders? The question is what if i extended a classloader , loaded there some new classes. to the my custom classloader. Now , I want it to be the context classloader , so I call the method (Thread.currentThread().setContextClassLoader(loader)). Are these new classes awailable only in the context of the current Thread ? ( or how does it work ?) Thanks

    Read the article

  • Is this not downcasting?

    - by cambr
    If I do double d = 34.56; int i = (int)d; Am I not "downcasting"? OR Is this term only used in terms of classes and objects? I am confused because in this case we are "downcasting" from a bigger double to a smaller int, but in case of classes, we "downcast" from a smaller base class to a bigger derived class. Aren't these two conventions, in some sense, opposite?

    Read the article

  • MSDN: How can I see what inherits/implements a class/interface?

    - by d03boy
    One thing I really, really miss from Javadoc is the ability to see which classes inherit the class you're looking at. So if you are looking at an abstract class (such as List) then you would be able to see all classes that inherit/implement the class/interface you're looking at. Is this available in the MSDN and I'm just missing it or is this really a missing feature?

    Read the article

  • Ambiguos class name

    - by Pedro Dias
    Hello If have a new project (ProjNew ) where i want to put several classes, that are on other project (ProjOld). The problem is i want to maintain the old classes marked with Obsolete to avoid running all my projects and check if they using it. But in that way this may throw a ambiguos class name error because i didn't explicity call by namespace.. There is an way to say in the obsolete what assymbly to use in ambiguity case=

    Read the article

  • How do I nested options for plugins in jQuery

    - by Oscar Godson
    I know how to do plugins, but how do I do nested options like: var defaults = { spacing:10, shorten_to:50, from_start:0, from_end:2, classes: { test:'testing' } }; i know that isn't right, i just dont know how to write the proper syntax when I want to do something like this: $('#breadcrumbs').breadcrumbs({classes{test:'new_example'},spacing:12}) other suggestions are welcome, im in need of the ability to custom class names and there are 7, so rather than making something like test_class, example_class, etc id like it cleaner and neater like the example above.

    Read the article

  • Me As Child Type

    - by Steven
    I have a MustInherit Parent class with two Child classes which Inherit from the Parent. How can I use (or Cast) Me in a Parent function as the the child type of that instance? EDIT: My actual goal is to be able to serialize (BinaryFormatter.Serialize(Stream, Object)) either of my child classes. However, "repeating the code" in each child "seems" wrong.

    Read the article

  • how to access class and its functions from another class

    - by vbNewbie
    This is my first major application using multiple classes. It is written in vb and I know about creating objects of the class and using that instance to call functions of the class. But how do I create an object with constructors to allow another program written in C# to access my classes and functions and accept things from the program. Hope this makes sense.

    Read the article

  • Overriding previously set float using javascript in ie

    - by wheresrhys
    I've read this question to figure out how to set float:none on an element which already has float:right set with class. I used element.style.cssFloat = "none", but this just added a new style property cssFloat which didn't over-ride the existing float:right. I've now fixed it using the adding/removing classes method. But is there a way of over-riding existing float rules in ie without having to use classes?

    Read the article

  • How do I make nested options for plugins in jQuery

    - by Oscar Godson
    I know how to do plugins, but how do I do nested options like: var defaults = { spacing:10, shorten_to:50, from_start:0, from_end:2, classes: { test:'testing' } }; i know that isn't right, i just dont know how to write the proper syntax when I want to do something like this: $('#breadcrumbs').breadcrumbs({classes{test:'new_example'},spacing:12}) other suggestions are welcome, im in need of the ability to custom class names and there are 7, so rather than making something like test_class, example_class, etc id like it cleaner and neater like the example above.

    Read the article

  • android mobile development performance vs extensibility

    - by mixm
    im developing a game in android, and i've been thinking about subdividing many of the elements of the game (e.g. game objects) into separate classes and sub-classes. but i know that method calls to these objects will cause some overhead. would it be better to improve performance or to improve extensibility?

    Read the article

  • Anybody using Qi4J

    - by Jon
    I was reading an InfoQ article on Composite Oriented Programming earlier on: http://www.infoq.com/articles/Composite-Programming-Qi4j I was interested in finding out whether anybody is currently using (or has used) the Qi4j framework at all? How does it compares to using a traditional dependency injection framework such as Spring for wiring classes together. Is the resulting object graph (based on mixins rather than classes) easier to deal with from a maintenance point of view?

    Read the article

  • Is there a simple way to emulate friendship in php 5.3

    - by Itay Moav
    I need some classes to befriend other classes in my system. Lack of this feature made me publicize some methods which shouldn't be public. The consequences of that are that members of my team implement code in a bad and ugly way which causes a mess. Is there a way to define a friendship in php 5.3? (I am aware of http://bugs.php.net/bug.php?id=34044 You might want to vote there if there is no simple solution).

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >