Search Results

Search found 34 results on 2 pages for 'allain lalonde'.

Page 2/2 | < Previous Page | 1 2 

  • toString() in Java

    - by Allain Lalonde
    A lead developer on my project has taken to referring to the project's toString() implementations as "pure cruft" and is looking to remove them from the code base. I've said that doing so would mean that any clients wishing to display the objects would have to write their own code to convert the object to string, but that was answered with "yes they would". Now specifically, the objects in this system are graphic elements like rectangles, circles, etc and the current representation is to display x, y, scale, bounds, etc... So, where does the crowd lie? When should you and when shouldn't you implement toString?

    Read the article

  • Best tool for DOM manipulation ?

    - by Olivier Lalonde
    I'm working on a web scraper which will aggregate data from various websites. I've started using PHP's built in DOM functions but after running into a couple of issues (especially regarding malformed markup and character encoding), I've chosen to ditch PHP. I was thinking of server side Javascript but am open to other suggestions. If I go with Javascript, which interpreter should I use?

    Read the article

  • PHP encoding with DOMDocument

    - by Olivier Lalonde
    <tag> ????? ? </tag> When I try to get the content of the following code using DOMDocument functions, it returns something like: ÐÐ»ÐµÐºÑ Ðœ I've tried setting DOMDocument encoding to different values (UTF-8, ISO-8859-1), using mb_convert_encoding, iconv and utf8_encode but without success. How can I get "????? ?" instead of "ÐÐ»ÐµÐºÑ Ðœ" ? EDIT: The input is coming from a page loaded with curl. When I output the page content to my browser, the characters are displayed correctly (so I doubt the input is the problem).

    Read the article

  • How to nest shapes in a DSL Tools diagram?

    - by Paul Lalonde
    I have a DSL containing two main domain classes: Area and Entity. Areas are represented visually by a GeometryShape, whereas entities are represented by a CompartmentShape. Entities can be embedded in an Area, or not (in this case they are embedded in the root object, which is a kind of Area). There may be relationships between entities, including between entities in different areas. Areas cannot be embedded inside of other areas, nor entities embedded inside of other entities. My problem is that I cannot get the behavior I want from the diagram. The embedding of entities in areas works perfectly well at the model level, but the visual representation behaves erratically. For example, if I drag an entity that was created in an area outside of that area, it no longer responds to mouse clicks (I have code that performs the re-parenting, but somehow the diagram side of things is broken). I have searched high and low for samples of how to do this, and come up empty. Every example I've found on the web simulates nesting via "references" relationships, whereas I am performing true embedding of the domain classes (and therefore of their associated shape classes). Does anyone have an example of how to do this? While I'm venting, am I the only one who thinks the diagram/shape classes are massively under-documented?

    Read the article

  • Ruby as a scripting language for web server

    - by Olivier Lalonde
    Is it possible to use Ruby as a scripting language with a HTTP server ? I'd like to be able to simply put some Ruby files in a web directory and be able to execute them from my browser - just like I did with PHP. I have absolutely nothing against frameworks such as RoR, but I was told that I should first learn Ruby and only then move on with higher level frameworks. Of course, I could write some Ruby scripts and run them in the console, but I would prefer getting the input/output from my browser :) Is that possible at all ? Otherwise, how hard would it be for me to build a quick and simple web framework ?

    Read the article

  • How to write backwards compatible HTML5 ?

    - by Olivier Lalonde
    I'd like to start using HTML5's basic features, but at the same time, keep my code backwards compatible with older browsers (graceful degradation). For instance, I'd like to use the cool CSS3 properties for making rounded corners. Is there any available tutorial for writing gracefully degradable HTML5 ? Additionally, what browsers should I support so that my app. is functional for at least 95% of visitors? What are the ways to test those browsers painlessly ?

    Read the article

< Previous Page | 1 2