Search Results

Search found 9366 results on 375 pages for 'common lisp'.

Page 157/375 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • Attribute vector emptying itself

    - by ravloony
    Hello, I have two classes, derived from a common class. The common class has a pure virtual function called execute(), which is implemented in both derived classes. In the inherited class I have an attribute which is a vector. In both execute() methods I overwrite this vector with a result. I access both classes from a vector of pointers to their objects. The problem is when I try to access the result vector form outside the objects. In one case I can get the elements (which are simply pointers), in the other I cannot, the vector is empty. Code: class E; class A{ protected: vector<E*> _result; public: virtual void execute()=0; vector<E*> get_result(); }; vector<E*> A::get_result() { return _result; } class B : public A { public: virtual void execute(); }; B::execute() { //... _result = tempVec; return; } class C : public A { public: virtual void execute(); }; C::execute() { //different stuff to B _result = tempvec; return; } main() { B* b = new B(); C* c = new C(); b->execute(); c->execute(); b->get_result();//returns full vector c->get_result(); //returns empty vector!! } I have no idea what is going on here... I have tried filling _result by hand from a temp vector in the offending class, doing the same with vector::assign(), nothing works. And the other object works perfectly. I must be missing something.... Any help would be greatly appreciated.

    Read the article

  • Subversion causes network problems

    - by richard
    I often use tortoisesvn to checkout or update a working copy on a development server. Whenever I do this, it seems to slow down the network and other users complain that browsing websites and accessing files on the dev server is slow. Is this a common bug in Subversion or has anyone else has come across similar problems?

    Read the article

  • Sharing the same file between different projects

    - by selsine
    Hi Everyone, For version control we currently use Visual Source Safe and are thinking of migrating to another version control system (SVN, Mercurial, Git). Currently we use Visual Source Safe's "Shared" file feature quite heavily. This allows us to share code between design and runtimes of a single product, and between multiple products as well. For example: **Product One** - Design Login.cpp Login.h Helper.cpp Helper.h - Runtime Login.cpp Login.h Helper.cpp Helper.h **Product Two** - Design Login.cpp Login.h - Launcher Login.cpp Login.h - Runtime Login.cpp Login.h In this example Login.cpp and Login.h contain common code that all of our projects need, Helper.cpp and Helper.h is only used in Product One. In Visual Source Safe they are shared between the specific projects, which means that whenever the files are updated in one project they are updated in any project they are shared with. This is a simple example but hopefully it explains why we use the shared feature: to reduce the amount of duplicated code and ensure that when a bug is fixed all projects automatically have access to the new fixed code. After researching alternatives to Visual Source Safe it seems that most version control systems do not have the idea of shared files, instead they seem to use the idea of sub repositories. (http://mercurial.selenic.com/wiki/subrepos http://svnbook.red-bean.com/en/1.0/ch07s03.html) My question (after all of that) is about what the best practices for achieving this are using other version control systems? Should we restructure our projects so that two copies of the files do not exist and an include directory is used instead? e.g. Product One Design Login.cpp Login.h Runtime Login.cpp Login.h Common Helper.cpp Helper.h This still leaves what to do with Login.cpp and Logon.h Should the shared files be moved to their own repository and then compiled into a lib or dll? This would make bug fixing more time consuming as the lib projects would have to be edited and then rebuilt. Should we use externals or sub repositories? Should we combine our projects (i.e. runtime, design, and launcher) into one large project? Any help would be appreciated. We have the feeling that our project design has evolved based on the tools that we used and now that we are thinking of switching tools it's difficult for us to see how we can best modify our practices. Or maybe we are the only people are there doing this...? Also, we use Visual Studio for all of our stuff. Thanks.

    Read the article

  • Mutiple FK columns all pointing to the same parent table - a good idea?

    - by Randy Minder
    For those of you who live and breath database design, have you ever found compelling reasons to have multiple FK's in a table that all point to the same parent table? We recently had to deal with a situation where we had a table that contained six columns which were all FK columns to the same parent table. We're debating whether this indicates a poor design on our part or whether this is more common than we think. Thanks very much.

    Read the article

  • How to implement context menu on key press instead of long click/tap

    - by takyon
    I have a ListActivity and I want to implement context menu for each of the list elements. I know that the common way to do this is to show the context menu on long click/tap. I want to know if there is a way to show the context menu for each element on a key press(preferably the menu key). To rephrase my question, how can I trigger the context menu and not the options menu by pressing the menu key(or any other key).

    Read the article

  • jetty deploy problem

    - by user550748
    I had deploy a project in jetty(jetty-wtp plugin) in eclipse server. when i start jetty server the console output wrong: java.lang.NoClassDefFoundError: javax/annotation/security/RunAs i also add common-annotations.jar to this project lib but cann't resolve this problem. my installed environment: JDK 1.6.0 jetty 8.0.0.M2 jetty-wtp http://download.eclipse.org/jetty/updates/jetty-wtp/development can anyone help me?:)

    Read the article

  • Query parameter using JS framework ?

    - by Maxim Veksler
    Hi, I seem to not be able to find implementation from the common Ajax libraries (JQuery, mootools, prototypejs...) that would allow the operation of parsing the window.location.href for request parameter. I would expect something like: $P{"param1"} == "param1_value" Am I missing something? p.s. The web does contains implementation examples for such operations

    Read the article

  • generate PHP classes from XSD?

    - by Qwerty
    Is there in the world analogues of JavaBeans or JAXB for PHP? Is it possible to generate PHP classes from XML schema? It's common practice to publish API's as XSD schemas. Java and C# guys can get advantage of this by generating classes right from XSD. Is there same tool for PHP?

    Read the article

  • Re-usable views or xibs for use with UIStoryboard

    - by Leonardo
    I find it very convenient to use storyboards, especially to have (and show) an overview of the application. However, I also find it very annoying to replicate the same code and views without the possibility to keep at least a reusable library of the most common xibs. This is especially true with UITableView and its cell. Did some of you have had any idea or best practice to share for dealing with this issue?

    Read the article

  • Monad in plain English? (For the OOP programmer with no FP background)

    - by fig-gnuton
    In terms that an OOP programmer would understand (without any functional programming background), what is a monad? What problem does it solve and what are the most common places it's used? EDIT: To clarify the kind of understanding I was looking for, let's say you were converting an FP application that had monads into an OOP application. What would you do to port the responsibilities of the monads into the OOP app?

    Read the article

  • traits in php – any real world examples/best practices?

    - by Max
    Traits have been one of the biggest additions for PHP 5.4. I know the synatax and understand the idea behind traits, like horizontal code re-usage for common stuff like logging, security, caching etc. However, I still dont know yet how I would make use of traits in my projects. Are there any open source projects that already use traits? Any good articles/reading material on how to structure architectures using traits?

    Read the article

  • Behavior is different when debugger is attached

    - by Lys
    I'm using VS 2008 to debug C# program with source code access. The expected behavior happened as long as the debugger attached to the running program, but when the program ran without debugger attached the exception threw. What are the common reasons for this to happen, and how can I tell the code difference behind this? Thanks,

    Read the article

  • Z-index bug with IE6.. can't seem to figure this one out

    - by Trip
    I am working on this gorgeous header here at : http://kayaskitchenbelmar.com/test/header.html Unfortunately, in IE6, the drop downs that come off of the Print and View buttons collapse on to a new line. This is because of the common z-index bug. I tried resolving this by making the parent div have a higher z-index and position relative with its child a lower z-index and position absolute, but that didn't seem to work. Possibly I'm missing something obvious? Thanks so much

    Read the article

  • How to start an activity that is defined in other Android projects?

    - by qichuan
    I have defined some common Activities in a library project and want to reuse these activity in my working project. I declared my library project as Android library, use the fully-qualified name of the Activities and declare them in the AndroidManifest.xml of the new project. However, I get 'Unable to find explicit activity class' error when launching the application. Any other configurations shall I do in order to start the Activities?

    Read the article

  • How to adjust the distribution of values in a random data stream?

    - by BCS
    Given a infinite stream of random 0's and 1's that is from a biased (e.g. 1's are more common than 0's by a know factor) but otherwise ideal random number generator, I want to convert it into a (shorter) infinite stream that is just as ideal but also unbiased. Looking up the definition of entropy finds this graph showing how many bits of output I should, in theory, be able to get from each bit of input. The question: Is there any practical way to actually implement a converter that is nearly ideally efficient?

    Read the article

  • Does a syntax for this exist? In any language?

    - by Michael
    It seems pretty common to me to have an argument, in a dynamically typed language that is either an Object or a key to lookup that object. For instance when I'm working with a database I might have a method getMyRelatedStuff(person) All I really need to lookup the related stuff is the id of the person so my method could look like this in python: def getMyRelatedStuff(person_or_id): id = person_or_id.id if isinstance(person,User) else person_or_id #do some lookup Or going the other direction: def someFileStuff(file_or_name): file = file_or_name if hasattr(file,'write') else open(file_or_name)

    Read the article

  • Are there any lightweight analogues to CORBA/RPC for embedded programs?

    - by Mtr
    I am writing embedded applications for different hardware (avr, arm7, tms55xx…) and different rtoses (freeRTOS, rtx, dsp/bios). And every second of them needs to communicate with PC or another digital device. Sometimes interactions logic is very advanced. So I'm interesting in common methodology (like state-machine programming style), protocol specification or library, that could simplify developing such things.

    Read the article

  • Customer count map (Google maps?)

    - by David Hamilton
    I have a two column list consisting of a US zipcode and a count (number of customers in this case). I want to put this data onto a map. Would Google maps API be a good fit for this? It seems like this would be a common enough type of problem to already have an existing (preferably Java based) solution without having to re-invent the wheel. Any suggestions?

    Read the article

  • plain old system.out question

    - by mac
    I was looking at someone's code and saw that he repeatedly declared PrintStream out = System.out; and later called out.println("blah"); I actually thought this was kind of neat. Is this a common practice? Was he just being fancy?

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >