Search Results

Search found 8850 results on 354 pages for 'libreoffice base'.

Page 13/354 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • How to implement fluent interface with a base class, in C++

    - by Vincenzo
    How can I implement this fluent interface in C++: class Base { public: Base& add(int x) { return *this; } } class Derived : public Base { public: Derived& minus(int x) { return *this; } } Derived d; d.add(1).minus(2).add(3).minus(4); Current code doesn't work since Base class doesn't know anything about Derived class, etc. I would be very thankful for a hint/suggestion.

    Read the article

  • static_cast from Derived* to void* to Base*

    - by Roberto
    I would like to cast a pointer to a member of a derived class to void* and from there to a pointer of the base class, like in the example below: #include <iostream> class Base { public: void function1(){std::cout<<"1"<<std::endl;} virtual void function2()=0; }; class Derived : public Base { public: virtual void function2(){std::cout<<"2"<<std::endl;} }; int main() { Derived d; void ptr* = static_cast<void*>(&d); Base* baseptr=static_cast<Base*>(ptr); baseptr->function1(); baseptr->function2(); } This compiles and gives the desired result (prints 1 and 2 respectively), but is it guaranteed to work? The description of static_cast I found here: http://en.cppreference.com/w/cpp/language/static_cast only mentions conversion to void* and back to a pointer to the same class (point 10).

    Read the article

  • Some Insight on the Field of Knowledge Representations and Reasoning

    - by picmate
    I started following an MS in computer sciences after about two years of work for a software company. I worked primarily in data warehousing and business intelligence related software development during my previous occupation. There is a high chance for me to select a research in knowledge representations, ontologies and reasoning, as there are no other research available in any other interesting fields, such as pattern recognition and navigation. I developed an interest towards knowledge representation with what I learnt from the courses I am taking currently. But I do not have a deep understanding of it in terms of which areas such a field would have an impact in a real life scenario, and how it will help me when I am hunting for a job in the near future. Some thought about this would be greatly appreciated.

    Read the article

  • How to share problem solving knowledge in a multiteam group?

    - by jonathan
    I've been working in multiteam groups for as long as I'm a webdeveloper, for me a team can be a lonely soldier or several people, generally a company will have multiple teams working in different projects and once the project is out in the wild, any team can perform the maintenance. This is a small picture since I'm not talking only about project wise knowledge, but "craft wise" knowledge, but it gives the picture of how I'm used to work, so: Since we work on modularised teams, sometimes I feel like the teams are too tightly enclosed in their projects, I've seen cases where after an hour of discussion, someone asked the question aloud and other person totally unrelated answered in a much simpler fashion. The problem is not so simple to solve as people tend not to be available all the time, also sometimes people can't afford the time to go through a problem with the "asker", but could do it alone. I've thought about software based solutions, something in the lines of SE, but I'd like to know other programmers opinions on the subject. EDIT I don't know if this is a wikipedia complex, but I feel that Wikis don't encourage the user to actually ask questions, but rather to write articles, and sometimes we don't know the knowledge we need, before needing it.

    Read the article

  • Some Insight on the Field of Knowledge Representations

    - by picmate
    I started following an MS in computer sciences after about two years of work for a software company. I worked primarily in data warehousing and business intelligence related software development during my previous occupation. There is a high chance for me to select a research in knowledge representations, ontologies and reasoning, as there are no other research available in any other interesting fields, such as pattern recognition and navigation. I developed an interest towards knowledge representation with what I learnt from the courses I am taking currently. But I do not have a deep understanding of it in terms of which areas such a field would have an impact in a real life scenario, and how it will help me when I am hunting for a job in the near future. Some thought about this would be greatly appreciated.

    Read the article

  • getting bone base and tip positions from a transform matrix?

    - by ddos
    I need this for a Blender3d script, but you don't really need to know Blender to answer this. I need to get bone head and tip positions from a transform matrix read from a file. The position of base is the location part of the matrix, length of the bone (distance from base to tip) is the scale, position of the tip is calculated from the scale (distance from bone base) and rotation part of the matrix. So how to calculate these? bone.base([x,y,z]) # x,y,z - floats bone.tip([x,y,z])

    Read the article

  • What do you use to organize your team knowledge?

    - by Stefano Verna
    Last year, me and three good old friends of mine founded a small web/mobile development team. Things are going pretty well. We're learning a lot, and new people are joining the group. Keeping knowledge always updated and in-sync is vital for us. Long emails threads are simply not the way to go for us: too dispersing and confusing, and hard to retrieve after a while. How your team manages and organizes common knowledge? How do you collect and share useful resources (articles, links, libraries, etc) inside your team? Update: Thanks for the feedback. More than using a wiki to share team common procedures or informations, I'd like to share external links, articles, code libraries, and be able to comment them easily within my team. I was particularly interested in knowing if you're aware of any way/webservice to share a reading list with a team. I mean, something like Readitlater/Instapaper, but for teams, maybe with some stats available, like "# of coworkers who read it".

    Read the article

  • What is your most unusual javascript concept you've ever seen ?

    - by Cybrix
    Hi, I've learned javascript at school but since I'm working with it and study about it every day, I've found very particular aspect of javascript that I didn't know about. Which at first, was very hard to understand for me and finally, I found it very usefull and easy to implement. And in the final, it gives to my code some kind of "beauty". An example I've once seen: function getter( input ) { result = { foo1 : 'bar1', foo2 : 'bar2', foo3 : 'bar3' }[input] || input || "default"; return result; } Do you guys have other examples of particular use you make of Javascript ? Thank you PS: I use the term particular use because it might be unusual for any Javascript beginner. I believe this question is most likely to belong to the community wiki.

    Read the article

  • Fix for: Xlib: extension "XINERAMA" missing on display

    - by obeliksz
    I am using Xming 6.9 with putty trying to run libreoffice remotely. It works well, but an error line appears in the terminal from where I launch it: Xlib: extension "XINERAMA" missing on display "localhost:12.0". Looks like it needs this extension but I can't find the necessary dll file (libXinerama-1.dll) for it as it is not included in the package. I ask for a link from where I could download this file (I accept a hit with a lmgtfy if you can do it) or the source code of it and how to complie it on my win7 machine... or just a surface fix could do it also if it is really clean and simple: hide the error line.

    Read the article

  • apply seach criteria to whole cells

    - by Tom
    I am trying to use MATCH() and/or LOOKUP() in LibreOffice Calc. I have the "Search criteria = and < must apply to whole cells" and the "Enable regular expressions in formulas" options selected. The item I am looking for is a multi word string. How do I provide a search criteria as a cell reference (E3) in to LOOKUP(E3, B1:B20, C1:C20) and have it match the value in B1:B20 EXACTLY? Right now it is matching partial strings rather than matching the cell values exactly.

    Read the article

  • Libre Office/Writer PDF export: white borders appear between lines even after setting borders to none

    - by Yttric
    My document prints ok (exactly as it appears on the screen in Libre Office), but when I export to PDF and view the PDF on screen there are white borders around each text or picture object. Here's a sample snapshot from PDF/Preview: http://imgur.com/TWip5 I've tried selecting a paragraph and changing the border property to None as described in Libre Office help (http://help.libreoffice.org/Common/Borders), setting the "Line arrangement Default" to "Set no borders". But borders set by the Format dialog don't correspond to the borders I see in PDF/Preview. In PDF/Preview the border appears on line boundaries. Borders set in Format appear around each picture, for example. What am I doing wrong?

    Read the article

  • Macro to manage sport ranking and calendar?

    - by Ale
    I need to write a macro to manage ranking and calendar for curling turnament. The event will follow the Shenkel system first match determined by general draw after that every team has played one match is possible to determine the first ranking second match determined by the rule: 1st vs. 2nd - 3rd vs. 4th - 5th vs. 6th and so on after that every team has played two matches is possible to determine the second ranking and so on until the end (3 to 5 matches normally). Another rule is that from the second match is not possible to play against a team that I played before! I was thinking to use MS-excel but also Calc (both LibreOffice/OpenOffice) should be fine. Thanks in advanced

    Read the article

  • Printing the second page from a Calc sheet

    - by Luke
    I've created a simple invoice document in LibreOffice Calc and it consists of 2 pages. I have defined the print range for my document as: $A$1:$D$33,$D$34:$D$35 My first page holds the actual invoice information the second page is a single merged cell holding terms and conditions text (wrapped to the cell width). The second page is defined by a row break. When I export the sheet as a PDF the first page comes out great but the second page with the terms text is all wrong. On the left hand side I see a portion of text (looks like a single column) and when I select the text inside the PDF I can see it go of the page somewhere to the left. I get the same result in a print preview. I'm at a complete loss on how to approach this problem and any insight is much appreciated.

    Read the article

  • Text Formatting toolbar continuously disappears in Impress (open office)

    - by Davide
    This is a very weird and annoying problem. Not sure if it's a bug or a "feature" I'm using OpenOffice 3.2 (within Ubuntu 10.04). The Text Formatting toolbars disappear in many circumstances, e.g. each time I click out of a writing area. It's becoming very time consuming to go to View-Toolbars-TextFormatting to re-enable it each time. 3 questions: is this expected behavior, and if so, is there any setting where I can change it? (note this wasn't happening in the past with other presentation I made)? is there a workaround, such as defining a shortcut like CTRL-whatever that would make the toolbar appearing without menu joggling? is anybody experiencing this too, especially someone using LibreOffice?

    Read the article

  • How do I find all text with particular background color?

    - by Dave M G
    I have a LibreOffice Writer document that has undergone a process of editing, and sections of the text that needed to be rewritten were highlighted in yellow. As I fixed those sections, I removed the yellow highlight. Now, I want to make sure there are no remaining areas of highlighted text that have not been fixed or possibly the highlight was not removed. It's many hundreds of pages, so a manual scan is unfeasible. Also, it might be that one space or one character got accidentally left highlighted, and I want to ensure I've accounted for them all. How can I search the document to find all instances where text has been highlighted?

    Read the article

  • Drupal base URL and root relative paths.

    - by kellyllek
    I changed my Drupal base url in settings.php to " http://www.example.com/subfolder " but root relative paths are still pointing to " http://www.example.com " and not to the correct "subfolder". Any idea what I'm doing wrong? I flushed cache re-edited a couple links to make sure but they're still pointing to the root domain and not to the correct subfolder.

    Read the article

  • open source knowledge base CMS system

    - by Thomi
    I'm looking for an open source knowledge base system that uses tags, rather than free-text search to identify articles (a lot like serverfault does). I've looked at twiki, which many people suggested, but haven't found what I'm looking for. Basically I want to be able to create and tag articles, and provide an easy way for anonymous users to search based on tags. Edit: OK, here's some more detail regarding what I want. Basically, all the knowledge base systems I have seen so far are a collection of articles, each article with a title. Most of them allow you to categorise articles into groups and sub-groups. Users of the system can search for information using a title search, for example "How do I print from AwesomeProduct?" - which then shows a list of any articles that match that search text. This is fine and dandy when your KB is for one version of the software product (the mythical AwesomeProduct ver 1.0). However, the development team then go ahead and create a new version (ver 2.0) that adds many new features and changes some existing features. Now, how do we support both products in the same KB? The Naive method is to copy all articles from 1.0, and update them for 2.0, adding and removing articles in 2.0 as required. We can then add text at the top of every 1.0 article that says: "this articles applies to 1.0 only, to see the 2.0 version, click here" (or something similar) The problem with articles being indexed in the system by title is that it's very hard to filter based on meta-data like version. What happens when we create version 3.0 or 4.0? The end-situation here is that you have a mess of articles. They're hard to search, hard to filter, and even harder to manage. The solution (it seems to me) is to use tags, rather than text as the article index mechanism. So articles can be tagged with a tag representing the software version, topic area etc. etc. Users can then filter based on tag - an example search might be "version_1 printing" - which straight away gives a list of articles with all these tags. So that's what I'm looking for - a KB system that uses tags, rather than text to index many articles. I'm sure I could build something with drupal, but I was hoping for something that worked out-of-the-box.

    Read the article

  • Is do-notation specific to "base:GHC.Base.Monad"?

    - by yairchu
    The idea that the standard Monad class is flawed and that it should actually extend Functor or Pointed is floating around. I'm not necessarily claiming that it is the right thing to do, but suppose that one was trying to do it: import Prelude hiding (Monad(..)) class Functor m => Monad m where return :: a -> m a join :: m (m a) -> m a join = (>>= id) (>>=) :: m a -> (a -> m b) -> m b a >>= t = join (fmap t a) (>>) :: m a -> m b -> m b a >> b = a >>= const b So far so good, but then when trying to use do-notation: whileM :: Monad m => m Bool -> m () whileM iteration = do done <- iteration if done then return () else whileM iteration The compiler complains: Could not deduce (base:GHC.Base.Monad m) from the context (Monad m) Question: Does do-notation work only for base:GHC.Base.Monad? Is there a way to make it work with an alternative Monad class? Extra context: What I really want to do is replace base:Control.Arrow.Arrow with a "generalized" Arrow class: {-# LANGUAGE TypeFamilies #-} class Category a => Arrow a where type Pair a :: * -> * -> * arr :: (b -> c) -> a b c first :: a b c -> a (Pair a b d) (Pair a c d) second :: a b c -> a (Pair a d b) (Pair a d c) (***) :: a b c -> a b' c' -> a (Pair a b b') (Pair a c c') (&&&) :: a b c -> a b c' -> a b (Pair a c c') And then use the Arrow's proc-notation with my Arrow class, but that fails like in the example above of do-notation and Monad. I'll use mostly Either as my pair type constructor and not the (,) type constructor as with the current Arrow class. This might allow to make the code of my toy RTS game (cabal install DefendTheKind) much prettier.

    Read the article

  • Why does virtual assignment behave differently than other virtual functions of the same signature?

    - by David Rodríguez - dribeas
    While playing with implementing a virtual assignment operator I have ended with a funny behavior. It is not a compiler glitch, since g++ 4.1, 4.3 and VS 2005 share the same behavior. Basically, the virtual operator= behaves differently than any other virtual function with respect to the code that is actually being executed. struct Base { virtual Base& f( Base const & ) { std::cout << "Base::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Base::operator=(Base const &)" << std::endl; return *this; } }; struct Derived : public Base { virtual Base& f( Base const & ) { std::cout << "Derived::f(Base const &)" << std::endl; return *this; } virtual Base& operator=( Base const & ) { std::cout << "Derived::operator=( Base const & )" << std::endl; return *this; } }; int main() { Derived a, b; a.f( b ); // [0] outputs: Derived::f(Base const &) (expected result) a = b; // [1] outputs: Base::operator=(Base const &) Base & ba = a; Base & bb = b; ba = bb; // [2] outputs: Derived::operator=(Base const &) Derived & da = a; Derived & db = b; da = db; // [3] outputs: Base::operator=(Base const &) ba = da; // [4] outputs: Derived::operator=(Base const &) da = ba; // [5] outputs: Derived::operator=(Base const &) } The effect is that the virtual operator= has a different behavior than any other virtual function with the same signature ([0] compared to [1]), by calling the Base version of the operator when called through real Derived objects ([1]) or Derived references ([3]) while it does perform as a regular virtual function when called through Base references ([2]), or when either the lvalue or rvalue are Base references and the other a Derived reference ([4],[5]). Is there any sensible explanation to this odd behavior?

    Read the article

  • Jackson object mapping - map incoming JSON field to protected property in base class

    - by Pete
    We use Jersey/Jackson for our REST application. Incoming JSON strings get mapped to the @Entity objects in the backend by Jackson to be persisted. The problem arises from the base class that we use for all entities. It has a protected id property, which we want to exchange via REST as well so that when we send an object that has dependencies, hibernate will automatically fetch these dependencies by their ids. Howevery, Jackson does not access the setter, even if we override it in the subclass to be public. We also tried using @JsonSetter but to no avail. Probably Jackson just looks at the base class and sees ID is not accessible so it skips setting it... @MappedSuperclass public abstract class AbstractPersistable<PK extends Serializable> implements Persistable<PK> { @Id @GeneratedValue(strategy = GenerationType.AUTO) private PK id; public PK getId() { return id; } protected void setId(final PK id) { this.id = id; } Subclasses: public class A extends AbstractPersistable<Long> { private String name; } public class B extends AbstractPersistable<Long> { private A a; private int value; // getter, setter // make base class setter accessible @Override @JsonSetter("id") public void setId(Long id) { super.setId(id); } } Now if there are some As in our database and we want to create a new B via the REST resource: @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Transactional public Response create(B b) { if (b.getA().getId() == null) cry(); } with a JSON String like this {"a":{"id":"1","name":"foo"},"value":"123"}. The incoming B will have the A reference but without an ID. Is there any way to tell Jackson to either ignore the base class setter or tell it to use the subclass setter instead? I've just found out about @JsonTypeInfo but I'm not sure this is what I need or how to use it. Thanks for any help!

    Read the article

  • Create inherited class from base class

    - by Raj
    public class Car { private string make; private string model; public Car(string make, string model) { this.make = make; this.model = model; } public virtual void Display() { Console.WriteLine("Make: {0}", make); Console.WriteLine("Model: {0}", model); } public string Make { get{return make;} set{make = value;} } public string Model { get{return model;} set{model = value;} } } public class SuperCar:Car { private Car car; private int horsePower; public SuperCar(Car car) { this.car = car; } public int HorsePower { get{return horsePower;} set{horsepower = value;} } public override void Display() { base.Display(); Console.WriteLine("I am a super car"); } When I do something like Car myCar = new Car("Porsche", "911"); SuperCar mySupcar = new SuperCar(myCar); mySupcar.Display(); I only get "I am a supercar" but not the properties of my base class. Should I explicitly assign the properties of my base class in the SuperCar constructor? In fact I'm trying Decorator pattern where I want a class to add behaviour to a base class.

    Read the article

  • Method binding to base method in external library can't handle new virtual methods "between"

    - by Berg
    Lets say I have a library, version 1.0.0, with the following contents: public class Class1 { public virtual void Test() { Console.WriteLine( "Library:Class1 - Test" ); Console.WriteLine( "" ); } } public class Class2 : Class1 { } and I reference this library in a console application with the following contents: class Program { static void Main( string[] args ) { var c3 = new Class3(); c3.Test(); Console.ReadKey(); } } public class Class3 : ClassLibrary1.Class2 { public override void Test() { Console.WriteLine("Console:Class3 - Test"); base.Test(); } } Running the program will output the following: Console:Class3 - Test Library:Class1 - Test If I build a new version of the library, version 2.0.0, looking like this: public class Class1 { public virtual void Test() { Console.WriteLine( "Library:Class1 - Test V2" ); Console.WriteLine( "" ); } } public class Class2 : Class1 { public override void Test() { Console.WriteLine("Library:Class2 - Test V2"); base.Test(); } } and copy this version to the bin folder containing my console program and run it, the results are: Console:Class3 - Test Library:Class1 - Test V2 I.e, the Class2.Test method is never executed, the base.Test call in Class3.Test seems to be bound to Class1.Test since Class2.Test didn't exist when the console program was compiled. This was very surprising to me and could be a big problem in situations where you deploy new versions of a library without recompiling applications. Does anyone else have experience with this? Are there any good solutions? This makes it tempting to add empty overrides that just calls base in case I need to add some code at that level in the future...

    Read the article

  • Seam @Factory in abstract base class?

    - by Shadowman
    I've got a series of web actions I'm implementing in Seam to perform create, read, update, etc. operations. For my read/update/delete actions, I'd like to have individual action classes that all extend an abstract base class. I'd like to put the @Factory method in the abstract base class to retrieve the item that is to be acted upon. For example, I have this as the base class: public abstract class BaseAction { @In(required=false)@Out(required=false) private MyItem item=null; public MyItem getItem(){...} public void setItem(...){...} @Factory("item") public void initItem(){...} } My subclasses would extend BaseAction, so that I don't have to repeat the logic to load the item that is to be viewed, deleted, updated, etc. However, when I start my application, Seam throws errors saying I have declared multiple @Factory's for the same object. Is there any way around this? Is there any way to provide the @Factory in the base class without encoutnering these errors?

    Read the article

  • From Sinatra Base object. Get port of application including the base object

    - by Poul
    I have a Sinatra::Base object that I would like to include in all of my web apps. In that base class I have the configure method which is called on start-up. I would like that configure code to 'register' that service with a centralized database. The information that needs to be sent when registering is the information on how to contact this web-service... things like host and port. I then plan on having a monitoring service that will spin over all registered services and occasionally ping them to make sure they are still up and running. In the configure method I am having trouble getting the port information. The 'self.settings.port' variable doesn't seem to work in this method. a) any ideas on how to get the port? I have the host. b) is there a sinatra plug-in that already does something like this so I don't have to write it myself? :-) //in my Sinatra::Base code. lets call it register_me.rb RegisterMe < Sinatra::Base configure do //save host and port information to database end get '/check_status' //return status end //in my web service code require register_me //at this point, sinatra will initialize the RegisterMe object and call configure post ('/blah') //example of a method for this particular web service end

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >