Search Results

Search found 223 results on 9 pages for 'nicolas badia'.

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

  • How can I implement an interface member in protected ?

    - by Nicolas Dorier
    Hi, I've been quite surprise when I saw the metadata of ReadOnlyObservableCollection in VS 2008... public class ReadOnlyObservableCollection<T> : ReadOnlyCollection<T>, INotifyCollectionChanged, INotifyPropertyChanged { // Summary: // Initializes a new instance of the System.Collections.ObjectModel.ReadOnlyObservableCollection<T> // class that serves as a wrapper for the specified System.Collections.ObjectModel.ObservableCollection<T>. // // Parameters: // list: // The collection to wrap. public ReadOnlyObservableCollection(ObservableCollection<T> list); // Summary: // Occurs when an item is added or removed. protected virtual event NotifyCollectionChangedEventHandler CollectionChanged; // // Summary: // Occurs when a property value changes. protected virtual event PropertyChangedEventHandler PropertyChanged; // Summary: // Raises the System.Collections.ObjectModel.ReadOnlyObservableCollection<T>.CollectionChanged // event. // // Parameters: // args: // The event data. protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args); // // Summary: // Raises the System.Collections.ObjectModel.ReadOnlyObservableCollection<T>.PropertyChanged // event. // // Parameters: // args: // The event data. protected virtual void OnPropertyChanged(PropertyChangedEventArgs args); } As you can see, CollectionChanged, a member of INotifyCollectionChanged is implemented in protected... and I can't do that in my own class. .NET framework should not compile ! Does someone has an explanation of this mystery ?

    Read the article

  • Excel workbooks produced by POI don't work when linked

    - by Eric Nicolas
    Here is what I'm doing : Create a workbook in memory (book = new HSSFWorkbook(), ...) Save it to disk (book.write(...)) Open in Excel (ok) Create another workbook in Excel, which links to the first one (=PoiWorkbook?xls!A1) Close Excel Then everytime I open the second workbook again, all the links are #N/A, unless I also open the POI-generated workbook at the same time. I never saw this behaviour with standard workbooks created in Excel. Anyone has seen this and found a workaround ? Thanks.

    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

  • 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

  • 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

  • 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

  • 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

  • Deactivate any calls to Log before publishing: are there tools to do this?

    - by Nicolas Raoul
    According to Google, I must "Deactivate any calls to Log methods in the source code" before publishing my Android app (section 4 of the publication checklist). My open-source project is large and it is a pain to do it manually every time I release. Additionally, removing a Log line is potentially tricky, for instance: if(condition) Log.d(LOG_TAG, "Something"); data.load(); data.show(); If I comment the Log line, then the condition applies to the next line, and chances are load() is not called. Are such situations rare enough that I can decide it should exist? This is on the official checklist, so I guess many people do this on a regular basis. So, is there a tool that removes all Log lines? Preferably one that is not tricked by code like the above.

    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

  • How to solve this Java type safety warning? (Struts2)

    - by Nicolas Raoul
    Map session = ActionContext.getContext().getSession(); session.put("user", user); This code generates a warning: Type safety: The method put(Object, Object) belongs to the raw type Map. References to generic type Map should be parameterized. Map<String, Serializable> session = (Map<String, Serializable>)ActionContext.getContext().getSession(); session.put("user", user); This code generates a warning: Type safety: Unchecked cast from Map to Map. The getSession method belongs to Struts2 so I can't modify it. I would like to avoid using @SuppressWarnings because other warnings can be useful. I guess all Struts2 users in the world faced the same problem... is there an elegant solution?

    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

  • [Android] Is disabling landscape mode unforgivable?

    - by Nicolas Raoul
    Our application could support landscape mode without any problem, but it is such a pain that we are thinking about forcing portrait mode. Question: Is it BAD? The main problem is that changing orientation generates random crashes on many screens. Avoiding those crashes would potentially allow us to spend more time on the core aspects of the app. Will the same crashes happen when users switch apps anyway? Also, are there landscape-oriented devices where our app will become useless?

    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

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