Search Results

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

Page 69/391 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • Where are classpath, path and pathelement documented in Ant version 1.8.0?

    - by Robert Menteer
    I'm looking over the documentation that comes with Apache Ant version 1.8.0 and can't find where classpath, path and pathelement are documented. I've found a page that describes path like structures but it doesn't list the valid attributes or nested elements for these. Another thing I can't find in the documentation is a description of the relationships between filelist, fileset, patternset and path and how to convert them back and forth. For instance there has to be an easier way to compile only those classes in one package while removing all class dependencies on the package classes and update documentation. <!-- Get list of files in which we're interested. --> <fileset id = "java.source.set" dir = "${src}"> <include name = "**/Package/*.java" /> </fileset> <!-- Get a COMMA separated list of classes to compile. --> <pathconvert property = "java.source.list" refid = "java.source.set" pathsep = ","> <globmapper from = "${src}/*.@{src.extent}" to = "*.class" /> </pathconvert> <!-- Remove ALL dependencies on package classes. --> <depend srcdir = "${src}" destdir = "${build}" includes = "${java.source.list}" closure = "yes" /> <!-- Get a list of up to date classes. --> <fileset id = "class.uptodate.set" dir = "${build}"> <include name = "**/*.class" /> </fileset> <!-- Get list of source files for up to date classes. --> <pathconvert property = "java.uptodate.list" refid = "class.uptodate.set" pathsep = ","> <globmapper from="${build}/*.class" to="*.java" /> </pathconvert> <!-- Compile only those classes in package that are not up to date. --> <javac srcdir = "${src}" destdir = "${build}" classpathref = "compile.classpath" includes = "${java.source.list}" excludes = "${java.uptodate.list}"/> <!-- Get list of directories of class files for package. --: <pathconvert property = "class.dir.list" refid = "java.source.set" pathsep = ","> <globmapper from = "${src}/*.java" to = "${build}*" /> </pathconvert> <!-- Convert directory list to path. --> <path id = "class.dirs.path"> <dirset dir = "${build}" includes = "class.dir.list" /> </path> <!-- Update package documentation. --> <jdepend outputfile = "${docs}/jdepend-report.txt"> <classpath refid = "compile.classpath" /> <classpath location = "${build}" /> <classespath> <path refid = "class.dirs.path" /> </classespath> <exclude name = "java.*" /> <exclude name = "javax.*" /> </jdepend> Notice there's a number of conversions between filesets, paths and comma separated list just to get the proper 'type' required for the different ant tasks. Is there a way to simplify this while still processing the fewest files in a complex directory structure?

    Read the article

  • Exposing a .Net Service

    - by Dave
    I have written a Windows Service in .Net and I want to expose the classes to be called by other .Net code. Specifically, I have an API that I want to expose via a DLL that will be placed in the GAC, and I want the DLL in the GAC to use the classes of the .Net Windows Service. I need this architecture as the code in the Windows Service needs to be run as a different user/account as the caller of the API (the account would be created at install time). My plan was to expose the Windows Service classes via COM (regasm.exe to register and tlbexp.exe to create the type library), and then call the classes in the GAC DLL via COM (imported via tlbimp.exe). However I get the following error from tlbimp: TlbImp : error TI0000 : System.Runtime.InteropServices.COMException - Type library '' was exported from a CLR assembly and cannot be re- imported as a CLR assembly. This implies to me that my method is not going to easily work. I can only think that I might need a C++ DLL as a bridge for my GAC DLL to invoke the COM calls, but this seems like a nasty solution. I am basically looking for suggestions. Does anyone know how to expose classes of a Windows Service written in .Net to other .Net code?

    Read the article

  • Mysql - Help me alter this search query to get desired results

    - by sandeepan-nath
    Following is a dump of the tables and data needed to answer understand the system:- The system consists of tutors and classes. The data in the table All_Tag_Relations stores tag relations for each tutor registered and each class created by a tutor. The tag relations are used for searching classes. CREATE TABLE IF NOT EXISTS `Tags` ( `id_tag` int(10) unsigned NOT NULL auto_increment, `tag` varchar(255) default NULL, PRIMARY KEY (`id_tag`), UNIQUE KEY `tag` (`tag`), KEY `id_tag` (`id_tag`), KEY `tag_2` (`tag`), KEY `tag_3` (`tag`), KEY `tag_4` (`tag`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `Tags` (`id_tag`, `tag`) VALUES (1, 'Sandeepan'), (2, 'Nath'), (3, 'first'), (4, 'class'), (5, 'new'), (6, 'Bob'), (7, 'Cratchit'); CREATE TABLE IF NOT EXISTS `All_Tag_Relations` ( `id_tag` int(10) unsigned NOT NULL default '0', `id_tutor` int(10) default NULL, `id_wc` int(10) unsigned default NULL, KEY `All_Tag_Relations_FKIndex1` (`id_tag`), KEY `id_wc` (`id_wc`), KEY `id_tag` (`id_tag`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `All_Tag_Relations` (`id_tag`, `id_tutor`, `id_wc`) VALUES (1, 1, NULL), (2, 1, NULL), (3, 1, 1), (4, 1, 1), (6, 2, NULL), (7, 2, NULL), (5, 2, 2), (4, 2, 2); Following is my query:- This query searches for "first class" (tag for first = 3 and for class = 4, in Tags table) and returns all those classes such that both the terms first and class are present in the class name. SELECT wtagrels.id_wc,SUM(DISTINCT( wtagrels.id_tag =3)) AS key_1_total_matches, SUM(DISTINCT( wtagrels.id_tag =4)) AS key_2_total_matches FROM all_tag_relations AS wtagrels WHERE ( wtagrels.id_tag =3 OR wtagrels.id_tag =4 ) GROUP BY wtagrels.id_wc HAVING key_1_total_matches = 1 AND key_2_total_matches = 1 LIMIT 0, 20 And it returns the class with id_wc = 1. But, I want the search to show all those classes such that all the search terms are present in the class name or its tutor name So that searching "Sandeepan class" (wtagrels.id_tag = 1,4) or "Sandeepan Nath" also returns the class with id_wc=1. And Searching. Searching "Bob First" should not return any classes. Please modify the above query or suggest a new query, if possible using MyIsam - fulltext search, but somehow help me get the result.

    Read the article

  • TDD and UML together

    - by uther-lightbringer
    Hello, I'm new to TDD approach so I'm wondering if anyone experienced wit this could enlighten me a little. I would like to get some leads how to use UML and TDD methodology together. I've been used to: Design with UML -- Generate skeleton classes (and then keep it synchronized) - Implement and finally Test. I must admit that testing part was the worst one, so I started to look for something else - TDD. So I have some general knowledge what is it about but before I proceed further, I am interested knowing how it goes together with software design especially UML. So when I first design/create test, how can UML fit in? Would it be possible to design classes first, from them create skeleton classes, from them generate Unit tests which would be "filled" before actual implementation of UML pregenerated classes, would this approach break whole TDD? Or is there any other way that would keep UML and TDD together? Thanks everyone for answer.

    Read the article

  • How to determine which source files are required for an Eclipse run configuration

    - by isme
    When writing code in an Eclipse project, I'm usually quite messy and undisciplined in how I create and organize my classes, at least in the early hacky and experimental stages. In particular, I create more than one class with a main method for testing different ideas that share most of the same classes. If I come up with something like a useful app, I can export it to a runnable jar so I can share it with friends. But this simply packs up the whole project, which can become several megabytes big if I'm relying on large library such as httpclient. Also, if I decide to refactor my lump of code into several projects once I work out what works, and I can't remember which source files are used in a particular run configuration, all I can do it copy the main class to a new project and then keep copying missing types till the new project compiles. Is there a way in Eclipse to determine which classes are actually used in a particular run configuration? EDIT: Here's an example. Say I'm experimenting with web scraping, and so far I've tried to scrape the search-result pages of both youtube.com and wrzuta.pl. I have a bunch of classes that implement scraping in general, a few that are specific to each of youtube and wrzuta. On top of this I have a basic gui common to both scrapers, but a few wrzuta- and youtube-specific buttons and options. The WrzutaGuiMain and YoutubeGuiMain classes each contain a main method to configure and show the gui for each respective website. Can Eclipse look at each of these to determine which types are referenced?

    Read the article

  • Observer pattern used with decorator pattern

    - by icelated
    I want to make a program that does an order entry system for beverages. ( i will probably do description, cost) I want to use the Decorator pattern and the observer pattern. I made a UML drawing and saved it as a pic for easy viewing. This site wont let me upload as a word doc so i have to upload a pic - i hope its easily viewable.... I need to know if i am doing the UML / design patterns correctly before moving on to the coding part. Beverage is my abstract component class. Espresso, houseblend, darkroast are my concrete subject classes.. I also have a condiment decorator class milk,mocha,soy,whip. would be my observer? because they would be interested in data changes to cost? Now, would the espresso,houseblend etc, be my SUBJECT and the condiments be my observer? My theory is that Cost is a changes and that the condiments need to know the changes? So, subject = esspresso,houseblend,darkroast,etc.. // they hold cost() Observer = milk,mocha,soy,whip? // they hold cost() would be the concrete components and the milk,mocha,soy,whip? would be the decorator! So, following good software engineering practices "design to an interface and not implementation" or "identify things that change from those that dont" would i need a costbehavior interface? If you look at the UML you will see where i am going with this and see if i am implementing observer + Decorator pattern correctly? I think the decorator is correct. since, the pic is not very viewable i will detail the classes here: Beverage class(register observer, remove observer, notify observer, description) these classes are the concrete beverage classes espresso, houseblend,darkroast, decaf(cost,getdescription,setcost,costchanged) interface observer class(update) // cost? interface costbehavior class(cost) // since this changes? condiment decorator class( getdescription) concrete classes that are linked to the 2 interface s and decorator are: milk,mocha,soy,whip(cost,getdescription,update) these are my decorator/ wrapper classes. Thank you.. Is there a way to make this picture bigger?

    Read the article

  • Classloading order in JBoss

    - by Spiderman
    I'd like to know if the default behavior of JBoss server (4.2.3.GA in my case) is loading the classes in parent-first or parent-last mode. And in case it work as I suspect in parent-last mode (i.e. first trying to load classes from the application's WEB-INF/lib and only if they are not found go to server\lib), how can I configure it to work in the opposite- first trying to load classes from outside and only looking inside the application afterwards.

    Read the article

  • Hibernate - moving annotations from property (method) level to field level

    - by kan
    How do I generate hibernate domain classes from tables with annotations at field level? I used Hibernate Tools project and generated domain classes from the tables in the database. The generated classes have annotations on the getter methods rather than at the field level. Kindly advice a way to generate domain classes that have the fields annotated. Is there any refactoring facility available in eclipse/IDEA etc.. to move the annotations from method level to field level? Appreciate your help and time.

    Read the article

  • .NET SettingsProvider/ApplicationSettingsBase caching

    - by Andy White
    I'm looking at some code that uses the .NET System.Configuration.SettingsProvider and ApplicationSettingsBase to handle configuration. We have a class that derives from SettingsProvider that uses a database as the data store, and then we have other settings classes that inherit from ApplicationSettingsBase, and have the [SettingsProvider(typeof(MySettingsProvider))] attribute. The problem is that we're using these settings classes in multiple applications, but they seem to permanently cache the configuration values, the first time they are loaded. The issue is that if a setting is changed in one application, the other applications will not get the setting until the next restart, because they are cached everywhere. My question is: is there a way to force the SettingsProvider implementation, or the classes derived from ApplicationSettingsBase to not cache values, and re-query the datastore every time the setting is accessed? A valid answer might be that these classes were not intended to be used in multi-application environments...

    Read the article

  • Classification: Dealing with Abstain/Rejected Class

    - by abner.ayala
    I am asking for your input and/help on a classification problem. If anyone have any references that I can read to help me solve my problem even better. I have a classification problem of four discrete and very well separated classes. However my input is continuous and has a high frequency (50Hz), since its a real-time problem. The circles represent the clusters of the classes, the blue line the decision boundary and Class 5 equals the (neutral/resting do nothing class). This class is the rejected class. However the problem is that when I move from one class to the other I activate a lot of false positives in the transition movements, since the movement is clearly non-linear. For example, every time I move from class 5 (neutral class) to 1 I first see a lot of 3's before getting to the 1 class. Ideally, I will want my decision boundary to look like the one in the picture below where the rejected class is Class =5. Has a higher decision boundary than the others classes to avoid misclassification during transition. I am currently implementing my algorithm in Matlab using naive bayes, kNN, and SVMs optimized algorithms using Matlab. Question: What is the best/common way to handle abstain/rejected classes classes? Should I use (fuzzy logic, loss function, should I include resting cluster in the training)?

    Read the article

  • Reloading Rails Directories on Change for Dev: Not Lib!

    - by yar
    I have checked out several questions on this, including all of those you see next to the question. Unfortunately, I'm not working with a plugin, and I don't want to work in lib. I have a directory called File.join(Rails.root, 'classes') and I'd like the classes in this directory to reload automatically in dev. In my environment.rb I have this line config.load_paths << File.join(Rails.root, 'classes') which works fine and blows up if the path isn't there. The reloading line in my development.rb also works fine require_dependency File.join(Rails.root, 'classes', 'blah.rb') which blows up if the file is not there (a good sign). However, the file doesn't reload. This all works if the file is in the root of lib and I use the require_dependency line, but my whole point is to get stuff out of lib as suggested here.

    Read the article

  • Kohana PHP - Multiple apps with shared model

    - by Josamoto
    I'm using Kohana 3 to create a website that has two applications, an admin application and the actual site frontend. I have separated my folders to have the two applications separated, so the hierarchy looks as follows: /applications /admin /classes /controller /... /site /classes /controller /.... My question is, how I need to go about creating a shared /model folder. Essentially, both the admin and site itself operates on the same data, so the database layer and business logic remains more or less the same. So to me, it makes sense to have a single model folder, sitting outside of the two application folders. Is it possible to achieve the following hierarchy: /applications /model --> Where model sits in a neatly generic location, accessible to all applications /admin /classes /controller /... /site /classes /controller /.... Thanks in advance!

    Read the article

  • Associating Models with Polymorphic

    - by Josh Crowder
    I am trying to associate Contacts with Classes but as two different types. Current_classes and Interested_classes. I know I need to enable polymorphic but I am not sure as to where it needs to be enabled. This is what I have at the moment class CreateClasses < ActiveRecord::Migration def self.up create_table :classes do |t| t.string :class_type t.string :class_name t.string :date t.timestamps end end def self.down drop_table :classes end end class CreateContactsInterestedClassesJoin < ActiveRecord::Migration def self.up create_table 'contacts_interested_classes', :id => false do |t| t.column 'class_id', :integer t.column 'contact_id', :integer end end def self.down drop_table 'contacts_interested_classes' end end class CreateContactsCurrentClassesJoin < ActiveRecord::Migration def self.up create_table 'contacts_current_classes', :id => false do |t| t.column 'class_id', :integer t.column 'contact_id', :integer end end def self.down drop_table 'contacts_current_classes' end end And then inside of my Contacts Model I want to have something like this. class Contact < ActiveRecord::Base has_and_belongs_to_many :classes, :join_table => "contacts_interested_classes", :foreign_key => "class_id" :as => 'interested_classes' has_and_belongs_to_many :classes, :join_table => "contacts_current_classes", :foreign_key => "class_id" :as => 'current_classes' end What am I doing wrong?

    Read the article

  • Refactor/rewrite code or continue?

    - by Dan
    I just completed a complex piece of code. It works to spec, it meets performance requirements etc etc but I feel a bit anxious about it and am considering rewriting and/or refactoring it. Should I do this (spending time that could otherwise be spent on features that users will actually notice)? The reasons I feel anxious about the code are: The class hierarchy is complex and not obvious Some classes don't have a well defined purpose (they do a number of unrelated things) Some classes use others internals (they're declared as friend classes) to bypass the layers of abstraction for performance, but I feel they break encapsulation by doing this Some classes leak implementation details (eg, I changed a map to a hash map earlier and found myself having to modify code in other source files to make the change work) My memory management/pooling system is kinda clunky and less-than transparent They look like excellent reasons to refactor and clean code, aiding future maintenance and extension, but could be quite time consuming. Also, I'll never be perfectly happy with any code I write anyway... So, what does stackoverflow think? Clean code or work on features?

    Read the article

  • org.hibernate.annotations.Entity not being picked up by Hibernate 3.6

    - by user1317764
    I am using hibernate 3.6.7 I am using annotated classes. My classes were annotated with org.hibernate.annotations.Entity. Added the classes to configuration using configuration.addAnnotatedClass() method. Hibernate does not seem to pick it up. Stuff works fine if I use the standard jpa Entity annotation. What am I missing? I know that the classes have been deprecated in the Hibernate 4.x releases with the advent of newer annotations to configure stuff like dynamic-insert and dynamic-updates. I am not using any XML configuration file. I am setting up configuration with a properties file and using java apis.

    Read the article

  • static library, but I still need headers?

    - by ML
    Hi All, I have a bunch of projects that all could share a "common" static library of classes. What confuses me is if I make a static library out of these classes and link against it in my projects that I still need the headers of the classes in the static library in my main projects. What is the benefit of the static library then? How do companies like Adobe deal with this?

    Read the article

  • Yet another Ant + JUnit classpath problem

    - by user337591
    Hi, I'm developing an Eclipse SWT application using Eclipse. There are also some JUnit 4 tests, which test some DAO's. But when I try to run the tests via an ant build, all of the tests fail, because the test classes aren't found. Google brought up about a million of people who all have the same problem, but none of their solutions seem to work for me -.- . These are the contents of my build.xml file: <property name="test.reports" value="./test/reports" /> <property name="classes" value="build" /> <path id="project.classpath"> <pathelement location="${classes}" /> </path> <target name="testreport"> <mkdir dir="${test.reports}" /> <junit fork="yes" printsummary="no" haltonfailure="no"> <batchtest fork="yes" todir="${test.reports}" > <fileset dir="${classes}"> <include name="**/Test*.class" /> </fileset> </batchtest> <formatter type="xml" /> <classpath refid="project.classpath" /> </junit> <junitreport todir="${test.reports}"> <fileset dir="${test.reports}"> <include name="TEST-*.xml" /> </fileset> <report todir="${test.reports}" /> </junitreport> </target> The test classes are in the build-directory together with the application classes, although they are in some subfolders according to their packages. Maybe this is important too: At first Ant complained that JUnit wasn't in its classpath, but since I put it there (with the eclipse configuration editor) it complains about JUnit being in its classpath twice. WARNING: multiple versions of ant detected in path for junit [junit] jar:file:C:/Users/as df/Documents/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/lib/ant.jar!/org/apache/tools/ant/Project.class [junit] and jar:file:/C:/Users/as%20df/Documents/eclipse/plugins/org.apache.ant_1.7.1.v20090120-1145/lib/ant.jar!/org/apache/tools/ant/Project.class I've tried specifying each and every subdirectory, each and every class file, I've tried filesets and filelists, nothing seems to work. Thanks for your help, I've been sitting for hours on this thing now...

    Read the article

  • JSP package problems

    - by Taylor
    Hi, I had all my servlets and classes in the default package. I have created these and JSP's and its all working fine. However i want to import some of the classes into the JSP's so i moved all the classes and servelts into a new package called Driver. I did not change any code anywhere, just moved it into a new package. The application compiles just fine. Now i cant seem to access any of my classes or servlets, any ideas? javax.servlet.ServletException: Wrapper cannot find servlet class Driver.viewTrip or a class it depends on

    Read the article

  • Generic data input form in asp.net mvc application

    - by Diego
    Hello, I have an application that have EF 16 classes that share this information: They all are classes only with a key field and a description. I think it should be a waste if I make a controller with just 1 method just to present a form to fill these classes info, then I was thinking in to make a generic form(with key, description) and dynamically fill the right class through a sort of selection the selected info in any way, any good suggestion or pattern to do that? Where the generic methods should be located.

    Read the article

  • Asp.Net MVC and Entity Framework Architecture

    - by Pino
    Hi, I'm working on a fairly large project at the moment and am currently in the planning stages. I've done a lot of reading into the various patterns suggested for development, somthing that has split the team at the moment is when using Entity Framework should the classes be passed through the applciation layers so that a view accepts an Entity Framework class or should these classes be mapped to BLL Classes and if so at which point (Controller or Library) should this be done? I'm interested in hearing some positives and negitives for each solutions.

    Read the article

  • static array in c++ forgets its size

    - by Karel Bílek
    In this small example, c++ forgets size of an array, passed to a constructor. I guess it is something simple, but I cannot see it. In classes.h, there is this code: #ifndef CLASSES_INC #define CLASSES_INC #include <iostream> class static_class { public: static_class(int array[]) { std::cout<<sizeof(array)/sizeof(int)<<"\n"; } }; class my_class{ public: static static_class s; static int array[4]; }; #endif In classes.cpp, there is this code: #include "classes.h" int my_class::array[4]={1, 2, 3, 4}; static_class my_class::s = static_class(my_class::array); In main.cpp, there is only simple #include "classes.h" int main () { return 0; } Now, the desired output (from the constructor of static_class) is 4. But what I get is 1. Why is that?

    Read the article

  • How to bundle extension methods requiring configuration in a library

    - by Greg
    Hi, I would like to develop a library that I can re-use to add various methods involved in navigating/searching through a graph (nodes/relationships, or if you like vertexs/edges). The generic requirements would be: There are existing classes in the main project that already implement the equivalent of the graph class (which contains the lists of nodes / relationships), node class and relationship class (which links nodes together) - the main project likely already has persistence mechanisms for the info (e.g. these classes might be built using Entity Framework for persistance) Methods would need to be added to each of these 3 classes: (a) graph class - methods like "search all nodes", (b) node class - methods such as "find all children to depth i", c) relationship class - methods like "return relationship type", "get parent node", "get child node". I assume there would be a need to inform the library with the extending methods the class names for the graph/node/relationships table (as different project might use different names). To some extent it would need to be like how a generics collection works (where you pass the classes to the collection so it knows what they are). Need to be a way to inform the library of which node property to use for equality checks perhaps (e.g. if it were a graph of webpages the equality field to use might be the URI path) I'm assuming that using abstract base classes wouldn't really work as this would tie usage down to have to use the same persistence approach, and same class names etc. Whereas really I want to be able to, for a project that has "graph-like" characteristics, the ability to add graph searching/walking methods to it.

    Read the article

  • Jython saying "No visible constructors for class"

    - by clutch
    I have a jython servlet as part of a large application running in tomcat5. I tested a few Spring Framework classes and create the objects in the Jython servlet. When I try to create objects of classes in the application I catch an Exception message "No visible constructors for class". These java classes do have a public constructor class, such as: public SchoolImpl() { } I create the object in python: from com.dc.sports.entity import SchoolImpl ... school = SchoolImpl() What am I doing wrong?

    Read the article

  • NHibernate mapping for subclasses and joined-subclasses

    - by Husain
    In a project that I am working on, I have the following entities: Analyst, Client and Contractor. Each inherit from a base class User. public abstract class User { public virtual int Id { get; set; } public virtual string Username { get; set; } public virtual string FullName { get; set; } } I then have the other classes inheriting from the base class as: public class Analyst : User { // Empty class. There are no additional properties for an analyst. } public class Client : User { // Empty class. There are no additional properties for a client. } public class Contractor : User { public int TotalJobs { get; set; } public int JobsInProgress { get; set; } } For the above classes, I have the following table structure: USER ---- UserId Username FullName UserType (1 = Analyst, 2 = Client, 3 = Contractor) CONTRACTOR ---------- UserId TotalJobs JobsInProgress There are no tables for Analyst and Client classes. I would like to know how I can write the NHibernate mapping file for the Contractor class. For the other classes, I have created a User mapping file and added Client and Analyst as sub-classes. How can I map the Contractor class?

    Read the article

  • do not use com.sun.xml.internal.*?

    - by sarah xia
    Hi all, Is this statement true: com.sun.xml.internal package is an internal package as the name suggestes. Users should not write code that depends on internal JDK implementation classes. Such classes are internal implementation details of the JDK and subject to change without notice One of my colleagues used one of the classes in his code, which caused javac task in Ant fail to compile our project as the compiler couldn't find the class. Answer from Sun/Oracle says that this is expected behavior of the compiler as user shouldn't use the package. Question is why the classes in the package made public in the first place? Thanks, Sarah

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >