Search Results

Search found 117 results on 5 pages for 'olivier lalonde'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • 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

  • hook_user not being called for 'login' operation

    - by Allain Lalonde
    I've read in the drupal documentation that hook_user should be invoked for the login operation. To test this I've added a call to drupal_set_message at the top of my modules hook implementation and the only message I'm receiving is a call with 'load' as the $op. I've confirmed that drupal_set_message can be called multiple times and it doesn't erase the previous message, so I'm confident that hook_user is only being invoked the one time. Any good reasons for why hook_user isn't being invoked with 'login' as an operation when I'm logging in?

    Read the article

  • Interface naming in Java

    - by Allain Lalonde
    Most OO languages prefix their interface names with a capital I, why does Java not do this? What was the rationale for not following this convention? To demonstrate what I mean, if I wanted to have a User interface and a User implementation I'd have two choices in Java: Class = User, Interface = UserInterface Class = UserImpl, Interface = User Where in most languages: Class = User, Interface = IUser Now, you might argue that you could always pick a most descriptive name for the user implementation and the problem goes away, but Java's pushing a POJO approach to things and most IOC containers use DynamicProxies extensively. These two things together mean that you'll have lots of interfaces with a single POJO implementation. So, I guess my question boils down to: "Is it worth following the broader Interface naming convention especially in light of where Java Frameworks seem to be heading?"

    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

  • What are some good usability guidelines an average developer should follow?

    - by Allain Lalonde
    I'm not a usability specialist, and I really don't care to be one. I just want a small set of rules of thumb that I can follow while coding my User Interfaces so that my product has decent usability. At first I thought that this question would be easy to answer "Use your common sense", but if it's so common among us developers we wouldn't, as a group, have a reputation for our horrible interfaces. Any Suggestions?

    Read the article

  • current transform being applied by canvas

    - by Allain Lalonde
    How can I determine the current transform that's being applied by an html5 canvas. It seems that it only supports two methods for dealing with transforms "transform", "setTransform" but I can't seem to discover the results of applying the transforms. Short of tracking them all myself and duplicating the the matrix mathematics that it must be doing natively, how can I figure out the current transform?

    Read the article

  • Access.Application.CurrentDb is Nothing?

    - by Allain Lalonde
    I'm at a loss to explain this one: I'm getting an error "91" (Object or With block not set) on the second line below: Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT * FROM employees") The following also causes it: Set rs = CurrentDb.OpenRecordset("employees") Executing ?CurrentDb.Name alone in the immediate window causes the error as well. Now, clearly the database is open since I'm editing the form within it, so what can cause this error here?

    Read the article

  • Does having a longer string in a SQL Like expression allow hinder or help query executing speed?

    - by Allain Lalonde
    I have a db query that'll cause a full table scan using a like clause and came upon a question I was curious about... Which of the following should run faster in Mysql or would they both run at the same speed? Benchmarking might answer it in my case, but I'd like to know the why of the answer. The column being filtered contains a couple thousand characters if that's important. SELECT * FROM users WHERE data LIKE '%=12345%' or SELECT * FROM users WHERE data LIKE '%proileId=12345%' I can come up for reasons why each of these might out perform the other, but I'm curious to know the logic.

    Read the article

  • 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

  • France : Le CSA veut devenir le gendarme des magasins d'applications mobiles, le Conseil serait-il trop gourmand ?

    France : Le CSA veut devenir le gendarme des magasins d'applications mobiles le Conseil serait-il trop gourmand ?Suite au rapport « Contribution aux politiques culturelles à l'ère numérique » de Pierre Lescure, Président de la mission Acte 2 de l'exception culturelle, remis au Président de la République française François Hollande, la CSA (Conseil Supérieur de l'Audiovisuel) a pris le relais d'Hadopi dans la lutte contre le piratage.Ces nouveaux pouvoirs ne semblent pas contenter la CSA qui réclame aussi, par l'entremise de son président Olivier Schrameck, la régulation des magasins en ligne d'applications mobile en France. Il justifie cette demande en expliquant « qu'un fabricant de terminau...

    Read the article

  • Prevent Python from caching the imported modules

    - by Olivier
    While developing a largeish project (split in several files and folders) in Python with IPython, I run into the trouble of cached imported modules. The problem is that instructions import module only reads the module once, even if that module has changed! So each time I change something in my package, I have to quit and restart IPython. Painful. Is there any way to properly force reloading some modules? Or, better, to somehow prevent Python from caching them? I tried several approaches, but none works. In particular I run into really, really weird bugs, like some modules or variables mysteriously becoming equal to None... The only sensible resource I found is Reloading Python modules, from pyunit, but I have not checked it. I would like something like that. A good alternative would be for IPython to restart, or restart the Python interpreter somehow. So, if you develop in Python, what solution have you found to this problem?

    Read the article

  • FBML tag to detect user language in a tab

    - by Pierre Olivier Martel
    I have a custom tab for a fan page that need to display a JPEG image. I have an image in English and one in French. Is there a way to detect the user locale in FBML to display the right image? I know how to do this server side using the Facebook fb_sig_locale param but I was planning on just using the Static FBML app which is much simpler than setting up a whole custom application.

    Read the article

  • Accessing Facebook Likes and Interests with the old rest api

    - by Pierre Olivier Martel
    In their recent changes, Facebook now links your likes and interests with community and fan pages. How can I retrieve this information using the old rest API and Facebooker. I tried things like this to get the music preferences : facebook_session.user.music but I get a blank string instead of the relevant connections. Is it mandatory to use the new Graph API in order to make this work?

    Read the article

  • Foreign keys in django admin list display

    - by Olivier
    If a django model contains a foreign key field, and if that field is shown in list mode, then it shows up as text, instead of displaying a link to the foreign object. Is it possible to automatically display all foreign keys as links instead of flat text? (of course it is possible to do that on a field by field basis, but is there a general method?) Example: class Author(models.Model): ... class Post(models.Model): author = models.ForeignKey(Author) Now I choose a ModelAdmin such that the author shows up in list mode: class PostAdmin(admin.ModelAdmin): list_display = [..., 'author',...] Now in list mode, the author field will just use the __unicode__ method of the Author class to display the author. On the top of that I would like a link pointing to the url of the corresponding author in the admin site. Is that possible? Manual method: For the sake of completeness, I add the manual method. It would be to add a method author_link in the PostAdmin class: def author_link(self, item): return '<a href="../some/path/%d">%s</a>' % (item.id, unicode(item)) author_link.allow_tags = True That will work for that particular field but that is not what I want. I want a general method to achieve the same effect. (One of the problems is how to figure out automatically the path to an object in the django admin site.)

    Read the article

  • ExtJs: Tree: how download then select using AJAX calls ?

    - by Olivier Pons
    Hi, Here's my goal : - open a tree - download the root nodes - expand automatically one specific node using AJAX (and loop n times here) until i find a leaf then select the leaf Here's the function that works when I declare the Tree : listeners: { load: function(n) { console.log('load(n)'); n.eachChild( function(n) { if ((n.id=='lys/2007') || (n.id=='lys/2007/08') || (n.id=='lys/2007/08/29')) { n.expand(false,false); } }); } } But if I don't know how to make it more "generic" (almost exactly like the ExtJs documentation). But they don't jump automatically to a specific node (i.e. I want no user interaction). Any idea / advice how to do this? Don't hesitate to edit my post to make it proper English :)

    Read the article

  • Facebook dialogs keep popping up in Firefox

    - by Pierre Olivier Martel
    I have a facebook application running in a FBML canvas and I have a problem with dialogs (either extended permissions or stream publish dialogs). Once they popup, they keep popping up for every subsequent requests. I've tested it in Chrome and everything works fine. It seems that the URL is chained in Firefox, which gives cryptic long urls like : http://apps.facebook.com/webdweller-po/discover?_fb_q=1&_fb_qsub=apps.facebook.com#!/webdweller-dev/?_fb_q=1&_fb_qsub=apps.facebook.com Did anybody experienced such a bug?

    Read the article

  • Use localeURL middleware with apache prefix

    - by Olivier R.
    Good morning everyone, I Got a question about localeURL usage. Everything works great for me with url like this : www.mysite.com/ If I type www.mysite.com/ in adress bar, it turns correctly in www.mysite.com/en/ for example. If I use the view change_locale, it's also all right (ie change www.mysite.com/en/ in www.mysite.com/fr/). But my application use apache as server, and use a prefix for the site, that gives url like this : www.mysite.com/prefix/ If I type www.mysite.com/prefix/ in the adress bar, the adress turns into www.mysite.com/en/ without prefix (so 404) I change code of view to manage our settings.SERVER_PREFIX value : def change_locale(request) : """ Redirect to a given url while changing the locale in the path The url and the locale code need to be specified in the request parameters. O. Rochaix; Taken from localeURL view, and tuned to manage : - SERVER_PREFIX from settings.py """ next = request.REQUEST.get('next', None) if not next: next = request.META.get('HTTP_REFERER', None) if not next: next = settings.SERVER_PREFIX + '/' next = urlsplit(next).path prefix = False if settings.SERVER_PREFIX!="" and next.startswith(settings.SERVER_PREFIX) : prefix = True next = "/" + next.lstrip(settings.SERVER_PREFIX) _, path = utils.strip_path (next) if request.method == 'POST': locale = request.POST.get('locale', None) if locale and check_for_language(locale): path = utils.locale_path(path, locale) if prefix : path = settings.SERVER_PREFIX + path response = http.HttpResponseRedirect(path) return response with this customized view, i'm able to correctly change language, but i'm not sure that's the right way of doing stuff. Is there any option on localeURL to manage prefix of apache ?

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >