Search Results

Search found 8397 results on 336 pages for 'implementation'.

Page 53/336 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • ExecutorService that interrupts tasks after a timeout

    - by scompt.com
    I'm looking for an ExecutorService implementation that can be provided with a timeout. Tasks that are submitted to the ExecutorService are interrupted if they take longer than the timeout to run. Implementing such a beast isn't such a difficult task, but I'm wondering if anybody knows of an existing implementation.

    Read the article

  • Fastest way to represent a collection of bits in PHP?

    - by Piskvor
    What is a good way to represent a collection of bits? I have a set of various on/off toggles (thousands of them) and need to store and retrieve their state. The naïve implementation would be an array of booleans, but I'm wondering if there's a better way (better in terms of access speed and/or memory requirements). I've found this BitArray implementation, but it's limited to 32 bits, which is not enough for this case.

    Read the article

  • how to redraw markers without redrawing the map? google maps.

    - by vishwanath
    I currently have a implementation where some markers coming from JSON list is shown, on a particular area, Now I want to filter these marker depending upon some criteria, I have done the filtering part, and got the filtered list. Now to render this markers on the map again, The current implementation loads the js with a key again, also creates the GMap2 object and draws the list of marker on the newly created map, which is really annoying. I want map to be there and only markers to be added and removed from the map. Any help is appreciated

    Read the article

  • How safe is apache Commons-javaflow while using jasperreports

    - by Nayn
    Hi, I am using jasperreport and trying to pass an alternate report runner. • net.sf.jasperreports.engine.fill.JRThreadSubreportRunner: The initial thread-based implementation • net.sf.jasperreports.engine.fill.JRContinuationSubreportRunner: A Javaflow-based implementation I am using the second one (for the reason, it runs on tomcat server, and creating threads wouldn't be good while writing subreports). The second one depends on commons-javaflow which is a sandbox version. Not sure if I should use it, Could somebody suggest a better way. Thanks

    Read the article

  • Returning superclass of return type from remote EJB method

    - by fish
    Let's say I have remote interface A: @Remote public interface A { public Response doSomething(); } And implementation: @Stateless public class B implements A { public BeeResponse doSomething() {...} } Where: BeeResponse extends Response. Response is located in the EJB-API jar and BeeResponse is in the implementation jar. Response and BeeResponse have different serialVersionUID. My assumption is that the unmarshalling of the response from B will fail, am I correct?

    Read the article

  • Developing multiple user interfaces for an application

    - by denizkocak
    I want to develop an application which has a graphical user interface that could be developed by using different widget toolkits. For example I want to use Qt, GTK+ or even ncurses as a building block for my user interface for the same application. Moreover users could choose which GUI implementation will be used during the next startup of the application without recompiling it first. I wonder what are possible design strategies and design patterns used in the implementation of this design?

    Read the article

  • Flex 4: Component move event

    - by alexey
    I have a CustomTextInput component based on TextInput (Spark) component. The instance of this class is placed on a popup window (TitleWindow). How can I capture the popup move (dragging the title) event inside CustomTextInput implementation? MoveEvent.MOVE event of the CustomTextInput itself doesn't work. Of course, I can't access the parent popup window inside the component implementation, because it's a common component that can be used not only on the popup windows.

    Read the article

  • Why membership provider is not generic?

    - by Timmy O' Tool
    I have to confess that I hate membership provider. The default implementation is not very appropriate normally and I haven't seen so far a good implementation of a custom membership provider, probably because this is not possible :-) So the question is: In your opinion: which are the reasons for not having membership/role provider as a generic class? I mean, why Microsoft didn't selected this approach.

    Read the article

  • Priority queue with dynamic item priorities.

    - by sean
    I need to implement a priority queue where the priority of an item in the queue can change and the queue adjusts itself so that items are always removed in the correct order. I have some ideas of how I could implement this but I'm sure this is quite a common data structure so I'm hoping I can use an implementation by someone smarter than me as a base. Can anyone tell me the name of this type of priority queue so I know what to search for or, even better, point me to an implementation?

    Read the article

  • Where do you put your unit test?

    - by soulmerge
    I have found several conventions to housekeeping unit tests in a project and I'm not sure which approach would be suitable for our next PHP project. I am trying to find the best convention to encourage easy development and accessibility of the tests when reviewing the source code. I would be very interested in your experience/opinion regarding each: One folder for productive code, another for unit tests: This separates unit tests from the logic files of the project. This separation of concerns is as much a nuisance as it is an advantage: Someone looking into the source code of the project will - so I suppose - either browse the implementation or the unit tests (or more commonly: the implementation only). The advantage of unit tests being another viewpoint to your classes is lost - those two viewpoints are just too far apart IMO. Annotated test methods: Any modern unit testing framework I know allows developers to create dedicated test methods, annotating them (@test) and embedding them in the project code. The big drawback I see here is that the project files get cluttered. Even if these methods are separated using a comment header (like UNIT TESTS below this line) it just bloats the class unnecessarily. Test files within the same folders as the implementation files: Our file naming convention dictates that PHP files containing classes (one class per file) should end with .class.php. I could imagine that putting unit tests regarding a class file into another one ending on .test.php would render the tests much more present to other developers without tainting the class. Although it bloats the project folders, instead of the implementation files, this is my favorite so far, but I have my doubts: I would think others have come up with this already, and discarded this option for some reason (i.e. I have not seen a java project with the files Foo.java and FooTest.java within the same folder.) Maybe it's because java developers make heavier use of IDEs that allow them easier access to the tests, whereas in PHP no big editors have emerged (like eclipse for java) - many devs I know use vim/emacs or similar editors with little support for PHP development per se. What is your experience with any of these unit test placements? Do you have another convention I haven't listed here? Or am I just overrating unit test accessibility to reviewers?

    Read the article

  • Why are there magic attributes exposed in the Servlet spec?

    - by Brabster
    It's always seemed a little at odds with the principles of Java that the Java Servlet Spec (2.5 version here) includes a set of magic attributes containing info about included resources, namely: javax.servlet.include.request_uri javax.servlet.include.context_path javax.servlet.include.servlet_path javax.servlet.include.path_info javax.servlet.include.query_string It's not even specifically pointed out in the API documentation, only in the spec where it is a must for correct implementation. This approach feels very wrong, an exposed implementation detail that clients will use and depend on. Why is this information exposed in this way?

    Read the article

  • ldd output showing shared object file whose function is not called

    - by iamrohitbanga
    I ran ldd command on an executable created by Open MPI. It shows a reference to libpthread.so Using LD_PRELOAD variable I created my own implementation of pthread_create, but from the it output it seems that MPI implementation is not calling pthread_create as I had expected. Why does ldd show pthread so file in output if it is not being used? does Open MPI not use a separate MPI thread for every node to implement the functionality?

    Read the article

  • Behavior of virtual function in C++

    - by Summer_More_More_Tea
    Hi everyone: I have a question, here are two class below: class Base{ public: virtual void toString(); // generic implementation } class Derive : public Base{ public: ( virtual ) void toString(); // specific implementation } The question is: If I wanna subclass of class Derive perform polymophism using a pointer of type Base, is keyword virtual in the bracket necessary? If the answer is no, what's the difference between member function toString of class Derive with and without virtual?

    Read the article

  • Does it should be in a namespace?

    - by Knowing me knowing you
    Do I have to put code from .cpp in a namespace from corresponding .h or it's enough to just write using declaration? //file .h namespace a { /*interface*/ class my { }; } //file .cpp using a::my; // Can I just write in this file this declaration and // after that start to write implementation, or // should I write: namespace a //everything in a namespace now { //Implementation goes here } Thanks.

    Read the article

  • How to implement pure virtual function in C++

    - by skydoor
    Hi, I think the implementation of virtual function is talked about a lot. My question is what about pure virtual function? However it is implemented? In virtual table, how to tell it is a pure or non-pure? What the difference between pure virtual function and virtual function with implementation?

    Read the article

  • package private static member class vs. package private class

    - by Helper Method
    I was writing two implementations of a linked list for an assignment, a doubly linked list and a circular doubly linked list. Now as the class representing a Link within the linked list is the same in both implementations, I want to use it in both. Now I wonder which approach would be better: Implement the Link class as a package private static member class in the first implementation and then use this class in the second implementation or make the Link class a package private class.

    Read the article

  • Hash Table v/s STL map in C++

    - by anon
    Hi, I am trying to learn C++ maps. Was just wondering about the implementation of STL map. I read it employs Binary search tree. Is there a implementation of hash table in STL? How exactly do STL map stores Key Value pairs?

    Read the article

  • Open-Source Q&A Site Software Implementations?

    - by JakiT
    I really like how 37signals created a simplified Q&A site (i.e. simplified StackExchange) http://answers.37signals.com/basecamp Does anyone know of a free, self-hosted, open-source software implementation that is similar to simplified functionality of 37signals implementation of a Q&A site?

    Read the article

  • organizing unit test

    - by soulmerge
    I have found several conventions to housekeeping unit tests in a project and I'm not sure which approach would be suitable for our next PHP project. I am trying to find the best convention to encourage easy development and accessibility of the tests when reviewing the source code. I would be very interested in your experience/opinion regarding each: One folder for productive code, another for unit tests: This separates unit tests from the logic files of the project. This separation of concerns is as much a nuisance as it is an advantage: Someone looking into the source code of the project will - so I suppose - either browse the implementation or the unit tests (or more commonly: the implementation only). The advantage of unit tests being another viewpoint to your classes is lost - those two viewpoints are just too far apart IMO. Annotated test methods: Any modern unit testing framework I know allows developers to create dedicated test methods, annotating them (@test) and embedding them in the project code. The big drawback I see here is that the project files get cluttered. Even if these methods are separated using a comment header (like UNIT TESTS below this line) it just bloats the class unnecessarily. Test files within the same folders as the implementation files: Our file naming convention dictates that PHP files containing classes (one class per file) should end with .class.php. I could imagine that putting unit tests regarding a class file into another one ending on .test.php would render the tests much more present to other developers without tainting the class. Although it bloats the project folders, instead of the implementation files, this is my favorite so far, but I have my doubts: I would think others have come up with this already, and discarded this option for some reason (i.e. I have not seen a java project with the files Foo.java and FooTest.java within the same folder.) Maybe it's because java developers make heavier use of IDEs that allow them easier access to the tests, whereas in PHP no big editors have emerged (like eclipse for java) - many devs I know use vim/emacs or similar editors with little support for PHP development per se. What is your experience with any of these unit test placements? Do you have another convention I haven't listed here? Or am I just overrating unit test accessibility to reviewing developers?

    Read the article

  • Dynamic swappable Data Access Layer

    - by Andy
    I'm writing a data driven WPF client. The client will typically pull data from a WCF service, which queries a SQL db, but I'd like the option to pull the data directly from SQL or other arbitrary data sources. I've come up with this design and would like to hear your opinion on whether it is the best design. First, we have some data object we'd like to extract from SQL. // The Data Object with a single property public class Customer { private string m_Name = string.Empty; public string Name { get { return m_Name; } set { m_Name = value;} } } Then I plan on using an interface which all data access layers should implement. Suppose one could also use an abstract class. Thoughts? // The interface with a single method interface ICustomerFacade { List<Customer> GetAll(); } One can create a SQL implementation. // Sql Implementation public class SqlCustomrFacade : ICustomerFacade { public List<Customer> GetAll() { // Query SQL db and return something useful // ... return new List<Customer>(); } } We can also create a WCF implementation. The problem with WCF is is that it doesn't use the same data object. It creates its own local version, so we would have to copy the details over somehow. I suppose one could use reflection to copy the values of similar fields across. Thoughts? // Wcf Implementation public class WcfCustomrFacade : ICustomerFacade { public List<Customer> GetAll() { // Get date from the Wcf Service (not defined here) List<WcfService.Customer> wcfCustomers = wcfService.GetAllCustomers(); // The list we're going to return List<Customer> customers = new List<Customer>(); // This is horrible foreach(WcfService.Customer wcfCustomer in wcfCustomers) { Customer customer = new Customer(); customer.Name = wcfCustomer.Name; customers.Add(customer); } return customers; } } I also plan on using a factory to decide which facade to use. // Factory pattern public class FacadeFactory() { public static ICustomerFacade CreateCustomerFacade() { // Determine the facade to use if (ConfigurationManager.AppSettings["DAL"] == "Sql") return new SqlCustomrFacade(); else return new WcfCustomrFacade(); } } This is how the DAL would typically be used. // Test application public class MyApp { public static void Main() { ICustomerFacade cf = FacadeFactory.CreateCustomerFacade(); cf.GetAll(); } } I appreciate your thoughts and time.

    Read the article

  • Both OpenID and normal Login on the same View?

    - by PlayKid
    Hi there, Is there any site that show both OpenID and normal login on the same view? Most of the sites either have OpenID implementation or Normal Login implementation on different views. I tried to do that, but it seems my code is very dirty, passing a blank username and password if using OpenID, otherwise OpenID will be blank but passed the username and password. But then I lose the capability of verifying whether the user has entered the correct values, is there any best practice for me to do that? Thanks a lot

    Read the article

  • expecte ')' before className

    - by Akbarbuneri
    Hi I have a class DataObject as Header ::: #import <Foundation/Foundation.h> @interface DataObject : NSObject { NSString *erorrMessage; BOOL hasError; NSDictionary *dataValues; } @property(nonatomic, retain)NSString *erorrMessage; @property(nonatomic)BOOL hasError; @property(nonatomic, retain)NSDictionary *dataValues; @end Class Implementation:::: #import "DataObject.h" @implementation DataObject @synthesize erorrMessage; @synthesize hasError; @synthesize dataValues; @end And I have another class as DataManager Header as :::: #import <Foundation/Foundation.h> @interface DataManager : NSObject - (DataObject *)getData :(NSString*)url; @end Implementation :::: #import "DataManager.h" #import "DataObject.h" #import "JSON.h" @implementation DataManager - (DataObject *)getData :(NSString*)url{ DataObject* dataObject = [[DataObject alloc]init]; NSString *urlString = [NSString stringWithFormat:url]; NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]; //TODO: Here we have to check the internet connection before requesting. NSError * erorrOnRequesting; NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:&erorrOnRequesting]; NSString* responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; if( erorrOnRequesting != nil) { dataObject.hasError = YES; dataObject.erorrMessage = @"Error on requsting to the web server"; return dataObject; } NSError *errorOnParsing; SBJSON *json = [[SBJSON new] autorelease]; NSDictionary *dataValues = [json objectWithString:responseString error:&errorOnParsing]; [responseString release]; if(errorOnParsing != nil) { //TODO: We have to send the website a feedback that there is some problem on the server end. dataObject.hasError = YES; dataObject.erorrMessage = @"Error on parsing, the server returned invalid data."; return dataObject; } dataObject.hasError = NO; dataObject.dataValues = dataValues; return dataObject; } @end Now when I build I got an error in the DataManager header where I #import Dataobject header, it says "error: expected')' before DataObject" I don;t understand what I miss. Thanks for the help..

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >