Search Results

Search found 218 results on 9 pages for 'nicolas raoul'.

Page 8/9 | < Previous Page | 4 5 6 7 8 9  | Next Page >

  • Move 3 rectangles up in their X but keep order of rectangles

    - by Nicolas Martel
    I have 3 rectangles being rendered here. Let's say i wanted to move them all above the line yet keep their order, how would i go about that? I tried subtracting the Y and height rather than adding the Y it but as expected, the lower rectangle goes at the top, middle stays in the middle and top goes to the bottom before: after: So is there any simple solution to render them just above rather than having to change all values ?

    Read the article

  • Longest common substring from more than two strings - Python

    - by Nicolas Noël
    Hi, I'm looking for a python library for finding the longest common substring from a set of python strings. I'have read that it exist to way to solve this problem : - one using suffix trees - the other using dynamic programming. The method implemented is not important. Otherwise, it is important to have a implementation that can be use for a set of strings and not only two strings Thanks,

    Read the article

  • Type classe, generic memoization

    - by nicolas
    Something quite odd is happening with y types and I quite dont understand if this is justified or not. I would tend to think not. This code works fine : type DictionarySingleton private () = static let mutable instance = Dictionary<string*obj, obj>() static member Instance = instance let memoize (f:'a -> 'b) = fun (x:'a) -> let key = f.ToString(), (x :> obj) if (DictionarySingleton.Instance).ContainsKey(key) then let r = (DictionarySingleton.Instance).[key] r :?> 'b else let res = f x (DictionarySingleton.Instance).[key] <- (res :> obj) res And this ones complains type DictionarySingleton private () = static let mutable instance = Dictionary<string*obj, _>() static member Instance = instance let memoize (f:'a -> 'b) = fun (x:'a) -> let key = f.ToString(), (x :> obj) if (DictionarySingleton.Instance).ContainsKey(key) then let r = (DictionarySingleton.Instance).[key] r :?> 'b else let res = f x (DictionarySingleton.Instance).[key] <- (res :> obj) res The difference is only the underscore in the dictionary definition. The infered types are the same, but the dynamic cast from r to type 'b exhibits an error. 'this runtime coercition ... runtime type tests are not allowed on some types, etc..' Am I missing something or is it a rough edge ?

    Read the article

  • What is faster in MySQL? WHERE sub request = 0 or IN list

    - by Nicolas Manzini
    Hello I was wondering what is better in MySQL. I have a SELECT querry that exclude every entry associated to a banned userID currently I have a subquerry clause in the WHERE statement that goes like AND (SELECT COUNT(*) FROM TheBlackListTable WHERE userID = userList.ID AND blackListedID = :userID2 ) = 0 Which will accept every userID not present in the TheBlackListTable Would it be faster to retrieve first all Banned ID in a previous request and replace the previous clause by AND creatorID NOT IN listOfBannedID Thank you!

    Read the article

  • How to validate data for a Rest Service with symfony

    - by Nicolas V.
    For example imagine I've a rest service, this service takes two parameters : phone number text The goal is to send the message via a sms gateway. I've a class Message which has two properties destinationNumber and textMessage. Before calling the gateway, I want to validate the data received by the rest service. I've two questions relatives to how to validate the data : Where should I put the validation rules ? in the model or in the controller How should I use the sfValidator* classes from Symfony to validate the data (ie. where's the documentation for using sfValidator or where can I find some examples) Any help would be appreciated.

    Read the article

  • Show SVG files on Sharepoint 2007

    - by Nicolas Irisarri
    I'm building a WSS site which has to show SVG files stored on WSS. I'm trying to use <object> tag to show it and it doesn't show, however, if I use <embed> it works ok. Im'using IE8 and IE7 I've been reading and everyone tells IE prefers <Object> over <embed>, but in WSS it doesn't work this way. To display the file I'm using a web content editor webpart with this code: <object type="image/svg+xml" data="/samples/sample.svg" name="owMain" width="400" height="150"> </object> Any clue??

    Read the article

  • DB Architecture : Linking to intersection or to main tables?

    - by Jean-Nicolas
    Hi, I'm creating fantasy football system on my website but i'm very confuse about how I should link some of my table. Tables The main table is Pool which have all the info about the ruling of the fantasy draft. A standard table User, which contains the usual stuff. Intersection table called pools_users which contains id,pool_id,user_id because a user could be in more than one pool, and a pool contains more than 1 user. The problem Table Selections = that's the table that is causing problem. That's the selection that the user choose for his pool. This is related to the Player table but thats not relevant for this problem. Should I link this table to the table Pools_users or should I link it with both main table Pool and User. This table contains id,pool_id,user_id,player_id,... What is the best way link my tables? When I want to retrieve my data, I normally want the information to be divided BY users. "This user have those selections, this one those selections, etc).

    Read the article

  • Is scala's cake pattern possible with parametrized components?

    - by Nicolas
    Parametrized components work well with the cake pattern as long as you are only interested in a unique component for each typed component's, example: trait AComponent[T] { val a:A[T] class A[T](implicit mf:Manifest[T]) { println(mf) } } class App extends AComponent[Int] { val a = new A[Int]() } new App Now my application requires me to inject an A[Int] and an A[String], obviously scala's type system doesn't allow me to extends AComponent twice. What is the common practice in this situation ?

    Read the article

  • Two way binding when setter is overriden

    - by Nicolas Goy
    I have an NSTextField bound to some object "zoom" property. In this object's class implementation, I have the following - (void)setZoom:(CGFloat)zoom { _zoom = MAX(0, MIN(10, zoom)); } If I write "-5" in the textfield, setZoom: will be called with "-5" as argument and _zoom will be set to 0. Then problem is that the textfield is not updating itself and it shows "-5" instead of re-reading the property value it has just set. If I do myObject.zoom = -5; in code, the text field will display 0 correctly. I tried to wrap _zoom =... inside willChangeValueForKey/didChangeValueForKey calls but it didn't change anything.

    Read the article

  • need a code snippet to find all *.html under a folder in nodejs

    - by Nicolas S.Xu
    I'd like to find all *.html files in src folder and all its sub folders using nodejs. What is the best way to do it? var folder = '/project1/src'; var extension = 'html'; var cb = function(err, results) { // results is an array of the files with path relative to the folder console.log(results); } // This function is what I am looking for. It has to recursively traverse all sub folders. findFiles(folder, extension, cb); I think a lot developers should have great and tested solution and it is better to use it than writing one myself.

    Read the article

  • This November, Join Me in Stockholm and Amsterdam

    - by Adam Machanic
    Late last year, I was invited by Raoul Illyés, a SQL Server MVP from Denmark, to present a precon at the 2013 edition of SQLRally Nordic. I agreed and decided to skip the US PASS Summit this year and instead visit an area of Europe I've never seen before. A bonus came a while later when I learned that there is another SQLRally in Europe that same week: SQLRally Amsterdam. Things worked out in just the right way and today I'm happy to announce that I'll be speaking at both events, back-to-back. Should...(read more)

    Read the article

  • Fake ISAPI Handler to serve static files with extention that are rewritted by url rewriter

    - by developerit
    Introduction I often map html extention to the asp.net dll in order to use url rewritter with .html extentions. Recently, in the new version of www.nouvelair.ca, we renamed all urls to end with .html. This works great, but failed when we used FCK Editor. Static html files would not get serve because we mapped the html extension to the .NET Framework. We can we do to to use .html extension with our rewritter but still want to use IIS behavior with static html files. Analysis I thought that this could be resolve with a simple HTTP handler. We would map urls of static files in our rewriter to this handler that would read the static file and serve it, just as IIS would do. Implementation This is how I coded the class. Note that this may not be bullet proof. I only tested it once and I am sure that the logic behind IIS is more complicated that this. If you find errors or think of possible improvements, let me know. Imports System.Web Imports System.Web.Services ' Author: Nicolas Brassard ' For: Solutions Nitriques inc. http://www.nitriques.com ' Date Created: April 18, 2009 ' Last Modified: April 18, 2009 ' License: CPOL (http://www.codeproject.com/info/cpol10.aspx) ' Files: ISAPIDotNetHandler.ashx ' ISAPIDotNetHandler.ashx.vb ' Class: ISAPIDotNetHandler ' Description: Fake ISAPI handler to serve static files. ' Usefull when you want to serve static file that has a rewrited extention. ' Example: It often map html extention to the asp.net dll in order to use url rewritter with .html. ' If you want to still serve static html file, add a rewritter rule to redirect html files to this handler Public Class ISAPIDotNetHandler Implements System.Web.IHttpHandler Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest ' Since we are doing the job IIS normally does with html files, ' we set the content type to match html. ' You may want to customize this with your own logic, if you want to serve ' txt or xml or any other text file context.Response.ContentType = "text/html" ' We begin a try here. Any error that occurs will result in a 404 Page Not Found error. ' We replicate the behavior of IIS when it doesn't find the correspoding file. Try ' Declare a local variable containing the value of the query string Dim uri As String = context.Request("fileUri") ' If the value in the query string is null, ' throw an error to generate a 404 If String.IsNullOrEmpty(uri) Then Throw New ApplicationException("No fileUri") End If ' If the value in the query string doesn't end with .html, then block the acces ' This is a HUGE security hole since it could permit full read access to .aspx, .config, etc. If Not uri.ToLower.EndsWith(".html") Then ' throw an error to generate a 404 Throw New ApplicationException("Extention not allowed") End If ' Map the file on the server. ' If the file doesn't exists on the server, it will throw an exception and generate a 404. Dim fullPath As String = context.Server.MapPath(uri) ' Read the actual file Dim stream As IO.StreamReader = FileIO.FileSystem.OpenTextFileReader(fullPath) ' Write the file into the response context.Response.Output.Write(stream.ReadToEnd) ' Close and Dipose the stream stream.Close() stream.Dispose() stream = Nothing Catch ex As Exception ' Set the Status Code of the response context.Response.StatusCode = 404 'Page not found ' For testing and bebugging only ! This may cause a security leak ' context.Response.Output.Write(ex.Message) Finally ' In all cases, flush and end the response context.Response.Flush() context.Response.End() End Try End Sub ' Automaticly generated by Visual Studio ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property End Class Conclusion As you see, with our static files map to this handler using query string (ex.: /ISAPIDotNetHandler.ashx?fileUri=index.html) you will have the same behavior as if you ask for the uri /index.html. Finally, test this only in IIS with the html extension map to aspnet_isapi.dll. Url rewritting will work in Casini (Internal Web Server shipped with Visual Studio) but it’s not the same as with IIS since EVERY request is handle by .NET. Versions First release

    Read the article

  • allow infiniband for non root users

    - by user1219721
    I got Infiniband running on RHEL 6.3 [root@master ~]# ibv_devinfo hca_id: mthca0 transport: InfiniBand (0) fw_ver: 4.7.927 node_guid: 0017:08ff:ffd0:6f1c sys_image_guid: 0017:08ff:ffd0:6f1f vendor_id: 0x08f1 vendor_part_id: 25208 hw_ver: 0xA0 board_id: VLT0060010001 phys_port_cnt: 2 port: 1 state: PORT_ACTIVE (4) max_mtu: 2048 (4) active_mtu: 2048 (4) sm_lid: 2 port_lid: 3 port_lmc: 0x00 link_layer: InfiniBand port: 2 state: PORT_DOWN (1) max_mtu: 2048 (4) active_mtu: 512 (2) sm_lid: 0 port_lid: 0 port_lmc: 0x00 link_layer: InfiniBand but it's only working as root. when trying from a non-super user, I got nothing : [nicolas@master ~]$ ibv_devices device node GUID ------ ---------------- mthca0 001708ffffd06f1c So, how to allow regular users to use infiniband ?

    Read the article

  • Advisor Webcast: Integrating DRM with EPMA

    - by THE
    Leave out your shoes early this year!On December 5th Saint Nicolas has something to put into them... Another Advisor Webcast is on: This time it is Matt Lontchar presenting the setup and use of Data Relationship Modeling ( DRM ) with Hyperion EPMA (to be then used with Planning and or HFM) In this one-hour session he will demonstrate the setup and configuration of a Data Relationship Management application for chart of accounts management with Oracle General Ledger and dimension management for Oracle EPM System applications such as Hyperion Financial Management and Hyperion Planning. Key Points will be: Configuring Data Relationship Management for Oracle GL and EPM Architect integration Configuring Hyperion Foundation Services (Weblogic, Web Services Manager, Shared Services) Deploying and configuring the DRM Web Service Setting up Oracle General Ledger for DRM integration Configuring EPM Architect for DRM integration So - treat yourself for some pre-season "chocolate" and join in on this webcast. You find all relevant information on Doc ID 1504283.1 or via the Advsior Webcast Schedule Note  Doc ID 740966.1 Or simply go directly to the registration site at Webex: https://oracleaw.webex.com/oracleaw/onstage/g.php?d=596766085&t=a

    Read the article

  • Google I/O 2012 - What's Possible with the Google Drive SDK

    Google I/O 2012 - What's Possible with the Google Drive SDK Nicolas Garnier Partners of Google Drive have already implemented a number of extremely compelling applications that use Google Drive for file storage. Implementing on the Google Drive SDK enables developers to distribute the cost of storage, while also removing the pain of reimplementing file management. In this session, we'll take a look at a number of existing Google Drive SDK implementations with popular apps. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 276 6 ratings Time: 56:25 More in Science & Technology

    Read the article

  • How do I rename a mounted Truecrypt volume?

    - by invert
    When I mount the Truecrypt file on my USB drive it shows up as truecrypt1. The volume is FAT, using mtools to rename a volume label involves e2label /dev/sdbx, however truecrypt1 does not map to a physical partition. fdisk -l does not show the volume partition (only the physical USB device), and df -h lists the volume path as /dev/mapper/truecrypt1. Finally, using the Nautilus 'Rename' context action, gives the error: "Sorry, could not rename "truecrypt1" to "towel": Operation not supported by backend". Apparently this can be done in Win, but how can I rename this volume in Ubuntu? As Nicolas said, specifying the mount point names the partition the same. The truecrypt GUI does not remember the mount point I set, so I specify the mount points in a script which I placed in my main menu. #!/bin/bash gksudo truecrypt /media/usbdrive/encryptedfile /media/securedata/

    Read the article

  • Google I/O 2012 - Android WebView

    Google I/O 2012 - Android WebView Nicolas Roard Hundred of thousands of Android applications use WebView to display HTML content. In Android 4.0 it's hardware-accelerated, which allows support for HTML5 features such as inline video, CSS 3d, CSS animations, and overflow elements. This talk will give an overview of the underlying implementation in ICS, explain how to best take advantage of WebView in your application, and cover best practices for high-performance HTML code. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 83 3 ratings Time: 52:04 More in Science & Technology

    Read the article

  • Java-Powered Robot Named NAO Wows Crowds

    - by Tori Wieldt
    He drew a crowd where he went at JavaOne. And only being 22.5 inches/573 mm tall, that's pretty impressive. Nao (pronounced now) is an autonomous, programmable humanoid robot developed by Aldebaran Robotics, a French robotics company. Over 200 academic institutions worldwide have made use of the robot. In this video from JavaOne, Nicolas Rigaud shows off the NAO robot which you can control with Java. We are eager to see what Java developers can do with a robot that can walk, talk, see, hear, and dance. &amp;amp;amp;amp;amp;amp;lt;span id=&amp;amp;amp;amp;amp;amp;quot;XinhaEditingPostion&amp;amp;amp;amp;amp;amp;quot;&amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;amp;gt; You can see several pictures in the blog Aldebaran Robotics at JavaOne. Learn more about the Aldebaran robotics developer program.

    Read the article

  • Devoxx UK JCP & Adopt-a-JSR activities

    - by Heather VanCura
    Devoxx UK starts this week!  The JCP Program is organizing many activities throughout the conference, including some tables in the Hackergarten area on 12-13 June.  Topics include Java EE, Data Grids, Java SE 8 (Lambdas and Date & Time API), Money & Currency API and OpenJDK.  We will have two book signings by Richard Warburton and Peter Pilgrim during the Hackergarten - free signed copy of their books at these times - first come, first served (limited quantities available).  Thursday night is the party and the Birds of a Feather (BoF) sessions - come with your favorite questions and topics related to the JCP, Adopt-a-JSR and Adopt OpenJDK Programs!  See below for the schedule of activities; I will fill in details for each session tomorrow.    Thursday 12 June 10:20 - 12:50 Java EE -- Arun Gupta 13:30-17:00 Lambdas/Date & Time API --Richard Warburton & Raoul-Gabriel Urma (also a book signing with Richard Warburon during the afternoon break) 14:30-17:30 Data Grids - Peter Lawrey 14:30-18:00 Money & Currency -- Anatole Tresch 18:45 Adopt OpenJDK BoF session (Java EE BoF runs concurrently) 19:45 JCP & Adopt-a-JSR BoF session Friday 13 June 10:20-13:00 OpenJDK -- Mani Sarkar  10:20- 14:30 Money & Currency -- Anatole Tresch 10:20 - 13:00 Java EE -- Peter Pilgrim 13:00-13:30 Peter Pilgrim Java EE 7 Book signing sponsored by JCP @ lunch time 13:30 - 15:30 JCP.Next/JSR 364 -- Heather VanCura

    Read the article

  • Tech Article: Tired of Null Pointer Exceptions? Use Java SE 8's Optional!

    - by Tori Wieldt
    A wise man once said you are not a real Java programmer until you've dealt with a null pointer exception. The null reference is the source of many problems because it is often used to denote the absence of a value. Java SE 8 introduces a new class called java.util.Optional that can alleviate some of these problems. In the tech article "Tired of Null Pointer Exceptions? Use Java SE 8's Optional!" Java expert Raoul-Gabriel Urma shows you how to make your code more readable and protect it against null pointer exceptions. Urma explains "The purpose of Optional is not to replace every single null reference in your codebase but rather to help design better APIs in which—just by reading the signature of a method—users can tell whether to expect an optional value. In addition, Optional forces you to actively unwrap an Optional to deal with the absence of a value; as a result, you protect your code against unintended null pointer exceptions." Learn how to go from writing painful nested null checks to writing declarative code that is composable, readable, and better protected from null pointer exceptions. Read "Tired of Null Pointer Exceptions? Use Java SE 8's Optional!"

    Read the article

  • Ruby on Rails function grapher

    - by Hock
    Hi, I'm looking for a function grapher that I can use in a small Rails application I'm working on for my university. Is there anything out there? If it needs the values (points) is not a problem but it would be better if it just parsed the equation. The functions will be 100% in ruby format (for example Math.exp(3*x))... Thanks a lot! Nicolás Hock

    Read the article

  • Rails routes question. Always find by name and remove /class_name/ from route

    - by Hock
    I have a Category model and a Product model. Category has_many products and Product belongs_to Category I want my routes to be like this: /:category_type/:category_name/ opens Product#index /:category_type/ opens Category#show / opens Category#index Is there a way to achieve that with resources? I tried with path_prefix but I just can't get it done. Any help? Thanks, Nicolás Hock Isaza

    Read the article

  • One way Has-Many-Through

    - by Hock
    Hello, I have a Category, a Subcategory and a Product model. I have: Category has_many Subcategories Subcategory has_many Products Subcategory belongs_to Category Product belongs_to Subcategory Is there a way to have something like Category has_many Projects through Subcategories ? The 'normal' rails way wouldn't work because "subcategory" doesn't belongs to product so product does not have a subcategory_id field. Instead, I need the query to be something like SELECT * FROM products WHERE id IN category.subcategory_ids Is there a way to do that? Thanks, Nicolás Hock Isaza

    Read the article

< Previous Page | 4 5 6 7 8 9  | Next Page >