Search Results

Search found 37 results on 2 pages for 'guilherme defreitas'.

Page 2/2 | < Previous Page | 1 2 

  • C++ linking issue on Visual Studio 2008 when crosslinking different projects on same solution

    - by Luís Guilherme
    I'm using Google Test Framework to set some unit tests. I have got three projects in my solution: FN (my project) FN_test (my tests) gtest (Google Test Framework) I set FN_test to have FN and gtest as references (dependencies), and then I think I'm ready to set up my tests (I've already set everyone to /MTd (not doing this was leading me to linking errors before)). Particularly, I define a class called Embark in FN I would like to test using FN_test. So far, so good. Thus I write a classe called EmbarkTest using googletest, declare a member Embark* and write inside the constructor: EmbarkTest() { e = new Embark(900,2010); } Then , F7 pressed, I get the following: 1>FN_test.obj : error LNK2019: unresolved external symbol "public: __thiscall Embark::Embark(int,int)" (??0Embark@@QAE@HH@Z) referenced in function "protected: __thiscall EmbarkTest::EmbarkTest(void)" (??0EmbarkTest@@IAE@XZ) 1>D:\Users\lg\Product\code\FN\Debug\FN_test.exe : fatal error LNK1120: 1 unresolved externals Does someone know what have I done wrong and/or what can I do to settle this?

    Read the article

  • In python: how to apply itertools.product to elements of a list of lists

    - by Guilherme Rocha
    I have a list of arrays and I would like to get the cartesian product of the elements in the arrays. I will use an example to make this more concrete... itertools.product seems to do the trick but I am stuck in a little detail. arrays = [(-1,+1), (-2,+2), (-3,+3)]; If I do cp = list(itertools.product(arrays)); I get cp = cp0 = [((-1, 1),), ((-2, 2),), ((-3, 3),)] But what I want to get is cp1 = [(-1,-2,-3), (-1,-2,+3), (-1,+2,-3), (-1,+2,+3), ..., (+1,+2,-3), (+1,+2,+3)]. I have tried a few different things: cp = list(itertools.product(itertools.islice(arrays, len(arrays)))); cp = list(itertools.product(iter(arrays, len(arrays)))); They all gave me cp0 instead of cp1. Any ideas? Thanks in advance.

    Read the article

  • Validating class and superclass on RoR

    - by Luís Guilherme
    In ruby, you have an attribute called "type" which is the class of the object. Rails stores this at the database in a column called type. So, if I have several blog "types", I can do something like this def create @blog = Blog.new(params[:blog]) @blog[:type] = params[:blog][:type] # ... end If I add someone like this, and then load it, and ask its class (for instance, at the console), I have the right class name answered back. However, when I save it afterwards, rails will run only the superclass validators, not the ones I defined in the subclass. How should I make rails run the subclass validators?

    Read the article

  • rvm and different versions of a system library

    - by Guilherme Silveira
    I need to run a set of tests against the same ruby version and same gemset but with different versions of a .so library. Therefor I need to have two ruby installations (for the same version 1.8.7), each one pointing to a different set of .so files. How can I do that? Gemset usage is already too late because library binding is done when rvm install installs a ruby version.

    Read the article

  • Executing certain code for every method call in C++

    - by Luís Guilherme
    I have a C++ class I want to inspect. So, I would like to all methods print their parameters and the return, just before getting out. The latter looks somewhat easy. If I do return() for everything, a macro #define return(a) cout << (a) << endl; return (a) would do it (might be wrong) if I padronize all returns to parenthesized (or whatever this may be called). If I want to take this out, just comment out the define. However, printing inputs seems more difficult. Is there a way I can do it, using C++ structures or with a workaroud hack?

    Read the article

  • Binary Search Tree for specific intent

    - by Luís Guilherme
    We all know there are plenty of self-balancing binary search trees (BST), being the most famous the Red-Black and the AVL. It might be useful to take a look at AA-trees and scapegoat trees too. I want to do deletions insertions and searches, like any other BST. However, it will be common to delete all values in a given range, or deleting whole subtrees. So: I want to insert, search, remove values in O(log n) (balanced tree). I would like to delete a subtree, keeping the whole tree balanced, in O(log n) (worst-case or amortized) It might be useful to delete several values in a row, before balancing the tree I will most often insert 2 values at once, however this is not a rule (just a tip in case there is a tree data structure that takes this into account) Is there a variant of AVL or RB that helps me on this? Scapegoat-trees look more like this, but would also need some changes, anyone who has got experience on them can share some thougts? More precisely, which balancing procedure and/or removal procedure would help me keep this actions time-efficient?

    Read the article

  • Where to put files that will be read in a Rails app?

    - by Guilherme
    I'm developing a Rails application and within that application I developed a Rake task that will read entries from a file and store them into the DB. Producing the code was no problem, but I'd like to know, where do I place the file that is read? Is there a convention for that, if yes, what is it? I know I could have used the seed.rb file but is it ok, by the standards, to load and read a file from there? Thanks in advance!

    Read the article

  • getComputedStyle text-decoration inherit

    - by Guilherme Nascimento
    getComputedStyle fails to get text-decoration property inherited, but can get font-size. Failed in Firefox 25 and GoogleChrome 30. Note: In Internet Explorer 10 work! <!DOCTYPE html> <html> <style> #parent { font-size: 38px; text-decoration: underline; } </style> <body> <div id="parent"> <p id="child">Test</p> </div> <script> var elem = document.getElementById("child"); document.write("text-decoration:"+window.getComputedStyle(elem).getPropertyValue("text-decoration")); document.write("<br>"); document.write("text-decoration:"+document.defaultView.getComputedStyle(elem).getPropertyValue("text-decoration")); document.write("<hr>"); document.write("font-size:"+window.getComputedStyle(elem).getPropertyValue("font-size")); document.write("<br>"); document.write("font-size:"+document.defaultView.getComputedStyle(elem).getPropertyValue("font-size")); </script> </body> </html> It is a fault of mine, or browsers that failed?

    Read the article

  • Linking a template class using another template class (error LNK2001)

    - by Luís Guilherme
    I implemented the "Strategy" design pattern using an Abstract template class, and two subclasses. Goes like this: template <class T> class Neighbourhood { public: virtual void alter(std::vector<T>& array, int i1, int i2) = 0; }; and template <class T> class Swap : public Neighbourhood<T> { public: virtual void alter(std::vector<T>& array, int i1, int i2); }; There's another subclass, just like this one, and alter is implemented in the cpp file. Ok, fine! Now I declare another method, in another class (including neighbourhood header file, of course), like this: void lSearch(/*parameters*/, Neighbourhood<LotSolutionInformation> nhood); It compiles fine and cleanly. When starting to link, I get the following error: 1>SolverFV.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall lsc::Neighbourhood<class LotSolutionInformation>::alter(class std::vector<class LotSolutionInformation,class std::allocator<class LotSolutionInformation> > &,int,int)" (?alter@?$Neighbourhood@VLotSolutionInformation@@@lsc@@UAEXAAV?$vector@VLotSolutionInformation@@V?$allocator@VLotSolutionInformation@@@std@@@std@@HH@Z)

    Read the article

  • NHibernate - ISession

    - by Guilherme Cardoso
    Hi About the declaration of ISession. Should we close the Session everytime we use it, or should we keep it open? I'm asking this because in manual of NHibernate (nhforge.org) they recommend us to declare it once in Application_Start for example, but i don't know if we should close it everytime we use. Thanks

    Read the article

  • JavaOne Latin America Schedule Changes For Thursday

    - by Tori Wieldt
    tweetmeme_url = 'http://blogs.oracle.com/javaone/2010/12/javaone_latin_america_schedule_changes_for_thursday.html'; Share .FBConnectButton_Small{background-position:-5px -232px !important;border-left:1px solid #1A356E;} .FBConnectButton_Text{margin-left:12px !important ;padding:2px 3px 3px !important;} The good news: we've got LOTS of developers at JavaOne Latin America.The bad news: the rooms are too small to hold everyone! (we've heard you)The good news: selected sessions for Thursday have been moved larger rooms (the keynote halls) More good news: some sessions that were full from Wednesday will be repeated on Thursday. SCHEDULE CHANGES FOR THURSDAY, DECEMBER 9THNote: Be sure to check the schedule on site, there still may be some last minute changes. Session Name Speaker New Time/Room Ginga, LWUIT, JavaDTV and You 2.0 Dimas Oliveria Thursday, December 9, 11:15am - 12:00pm Auditorio 4 JavaFX do seu jeito: criando aplicativos JavaFX com linguagens alternativas Stephen Chin Thursday, December 9, 3:00pm - 3:45pm Auditorio 4 Automatizando sua casa usando Java; JavaME, JavaFX, e Open Source Hardware Vinicius Senger Thursday, December 9, 9:00am - 9:45am Auditorio 3 Construindo uma arquitetura RESTful para aplicacoes ricas com HTML 5 e JSF2 Raphael Helmonth Adrien Caetano Thursday, December 9, 5:15pm - 6:00pm Auditorio 2 Dicas eTruquies sobre performance em Java EE JPA e JSF Alberto Lemos e Danival Taffarel Calegari Thursday, December 9, 2:00pm - 2:45pm Auditorio 2 Escrevendo Aplicativos Multipatforma Incriveis Usando LWUIT Roger Brinkley Cancelled Platforma NetBeans: sem slide - apenas codigo Mauricio Leal Cancelled Escalando o seu AJAX Push com Servlet 3.0 Paulo Silveria Keynote Hall 9:00am - 9:45am Cobetura Completa de Ferramentas para a Platforma Java EE 6 Ludovic Champenois Keynote Hall 10:00am - 10:45am Servlet 3.0 - Expansivel, Assincrono e Facil de Usar Arun Gupta Keynote Hall 4:00pm - 4:45pm Transforme seu processo em REST com JAX-RS Guilherme Silveria Keynote Hall 5:00pm - 5:45pm The Future of Java Fabiane Nardon e Bruno Souza Keynote Hall 6:00pm - 6:45pm Thanks for your understanding, we are tuning the conference to make it the best JavaOne possible.

    Read the article

< Previous Page | 1 2