Search Results

Search found 304 results on 13 pages for 'pierre olivier martel'.

Page 10/13 | < Previous Page | 6 7 8 9 10 11 12 13  | Next Page >

  • Best way to deal with multiple layouts in symfony

    - by Pierre
    Hey folks. I'm looking for the best way to do something simple in symfony. Basically, I have a module in which all the pages will contain the same header and footer. That module also shares the same general layout as the other modules. I'm just wondering, should I create one file and have my content pages called up as partials or should all files have their own content and somehow call the two other templates. I made a quick example of my setup: http://grab.by/3Riy Hopefully, it'll help understand what I'm trying to do. Thanks!

    Read the article

  • Delphi -> Delphi prism, how to use array of records?

    - by Pierre
    Hi there. I'm learning Delphi Prism, and i don't find how to write the following code with it : type TRapportItem = record Label : String; Value : Int16; AnomalieComment : String; end; type TRapportCategorie = record Label : String; CategoriesItems : Array of TRapportItem; end; type TRapportContent = record Categories : array of TRapportCategorie; end; Then, somewhere, i try to put items in the array : rapport.Categories[i].Label:=l.Item(i).InnerText; But it doesn't work.. Can someone enlight me? Thanks!

    Read the article

  • Rails - CSV export: prompt for file download

    - by Pierre
    Hello, I want to give my users the ability to export a table to CSV. So in my controller, I've added on top of the file: respond_to :html, :js, :csv I'm also setting the headers if the requested format is csv: if params[:format] == 'csv' generate_csv_headers("negotiations-#{Time.now.strftime("%Y%m%d")}") end Code for generate_csv_headers(in application_controller) is: def generate_csv_headers(filename) headers.merge!({ 'Cache-Control' => 'must-revalidate, post-check=0, pre-check=0', 'Content-Type' => 'text/csv', 'Content-Disposition' => "attachment; filename=\"#{filename}\"", 'Content-Transfer-Encoding' => 'binary' }) end I've also created a view named index.csv.erb to generate my file: <%- headers = ["Id", "Name"] -%> <%= CSV.generate_line headers %> <%- @negotiations.each do |n| -%> <%- row = [ n.id, n.name ] -%> <%= CSV.generate_line row %> <%- end -%> I don't have any error, but it simply displays the content of the CSV file, while I'd expect a prompt from the browser to download the file. I've read a lot, but could not find anything that'd work. Do you have an idea? thanks, p.

    Read the article

  • How to create instances of a class from a static method?

    - by Pierre
    Hello. Here is my problem. I have created a pretty heavy readonly class making many database calls with a static "factory" method. The goal of this method is to avoid killing the database by looking in a pool of already-created objects if an identical instance of the same object (same type, same init parameters) already exists. If something was found, the method will just return it. No problem. But if not, how may I create an instance of the object, in a way that works with inheritance? >>> class A(Object): >>> @classmethod >>> def get_cached_obj(self, some_identifier): >>> # Should do something like `return A(idenfier)`, but in a way that works >>> class B(A): >>> pass >>> A.get_cached_obj('foo') # Should do the same as A('foo') >>> A().get_cached_obj('foo') # Should do the same as A('foo') >>> B.get_cached_obj('bar') # Should do the same as B('bar') >>> B().get_cached_obj('bar') # Should do the same as B('bar') Thanks.

    Read the article

  • How to get the current exception without having passing the variable?

    - by Pierre-Alain Vigeant
    I am looking for a way to retrieve the current exception without having to pass it as a variable. Suppose the following code public void MakeItFail() { try { throw new FailException(); } catch // Yes I'm aware that this shouldn't be done, but I don't want to go through all the code base and change it { ShowMessage("An error occured"); } } public void ShowMessage(string message) { // How can I retrieve the exception here } In the watch window, I can use $exception to get the current exception. Is there is a code equivalent?

    Read the article

  • Expand a window beyond Windows limitation

    - by Pierre
    I try to setup UltraMon with a really big width and height for my Safari on Windows. See capture : http://cl.ly/de21e9cd2cf4f265efc4 The problem is that the width and height seems to have a max value that I would like to change. I want UltraMon not to change my width and height, even if they are bigger than the screen resolution.

    Read the article

  • GZipStream in an WebHttpResponse producing no data

    - by Pierre 303
    I want to compress my HTTP Responses for client that supports it. Here is the code used to send a standard response: IHttpClientContext context = (IHttpClientContext)sender; IHttpRequest request = e.Request; string responseBody = "This is some random text"; IHttpResponse response = request.CreateResponse(context); using (StreamWriter writer = new StreamWriter(response.Body)) { writer.WriteLine(responseBody); writer.Flush(); response.Send(); } The code above works fine. Now I added gzip support below. When I test it with a browser that supports gzip or a custom method, it returns an empty string. I'm sure I'm missing something simple, but I just can't find it... IHttpClientContext context = (IHttpClientContext)sender; IHttpRequest request = e.Request; string acceptEncoding = request.Headers["Accept-Encoding"]; string responseBody = "This is some random text"; IHttpResponse response = request.CreateResponse(context); if (acceptEncoding != null && acceptEncoding.Contains("gzip")) { byte[] bytes = ASCIIEncoding.ASCII.GetBytes(responseBody); response.AddHeader("Content-Encoding", "gzip"); using (GZipStream writer = new GZipStream(response.Body, CompressionMode.Compress)) { writer.Write(bytes, 0, bytes.Length); writer.Flush(); response.Send(); } } else { using (StreamWriter writer = new StreamWriter(response.Body)) { writer.WriteLine(responseBody); writer.Flush(); response.Send(); } }

    Read the article

  • How do I flag a folder as being a package?

    - by Pierre Bernard
    I used to think that folders needed to have an extension so that they are recognized as packages by the Finder. That extension would be declared in the owning application's Info.plist. Obviously there is another, more elegant way, but I can't figure out how it is done. E.g. the iPhoto Library is being treated as a package by the Finder. Yet it has no extension. mdls reveals that it indeed has "com.apple.package" in the content type tree. The actual content type is dynamically assigned. How did iPhoto go about to create such a directory?

    Read the article

  • How to build a Django form which requires a delay to be re-submitted ?

    - by pierre-guillaume-degans
    Hey, In order to avoid spamming, I would like to add a waiting time to re-submit a form (i.e. the user should wait a few seconds to submit the form, except the first time that this form is submitted). To do that, I added a timestamp to my form (and a security_hash field containing the timestamp plus the settings.SECRET_KEY which ensures that the timestamp is not fiddled with). This look like: class MyForm(forms.Form): timestamp = forms.IntegerField(widget=forms.HiddenInput) security_hash = forms.CharField(min_length=40, max_length=40, widget=forms.HiddenInput) # + some other fields.. # + methods to build the hash and to clean the timestamp... # (it is based on django.contrib.comments.forms.CommentSecurityForm) def clean_timestamp(self): """Make sure the delay is over (5 seconds).""" ts = self.cleaned_data["timestamp"] if not time.time() - ts > 5: raise forms.ValidationError("Timestamp check failed") return ts # etc... This works fine. However there is still an issue: the timestamp is checked the first time the form is submitted by the user, and I need to avoid this. Any idea to fix it ? Thank you ! :-)

    Read the article

  • How to create a HTML world map with GeoDjango ?

    - by pierre-guillaume-degans
    The GeoDjango tutorial explains how to insert world borders into a spatial database. I would like to create a world Map in HTML with these data, with both map and area tags. Something like that. I just don't know how to retrieve the coordinates for each country (required for the area's coords attribute). from world.models import WorldBorders for country in WorldBorders.objects.all(): print u'<area shape="poly" title="%s" alt="%s" coords="%s" />' % (v.name, v.name, "???") Thanks !

    Read the article

  • How can I retrieve the last IP address of a user in Microsoft Exchange

    - by Pierre
    I need to determine the location of (mobiles) users within the enterprise buildings & floors. They are all using Microsoft Exchange & Office Communicator. If I have access to the IP address, I can know the location. Is there a way to retrieve the last IP address of the user by using Microsoft Exchange or Office Communication Server API ? If yes how ? Thanks a lot in advance.

    Read the article

  • How to test a .net application against a proxy?

    - by Pierre-Alain Vigeant
    I need to support the use of proxy on our application that is using WCF connections. We do not have any proxy server on our network and I don't want to disrupt our corporate network by requesting a proxy installation. I was thinking of installing a proxy server on a local virtual machine and configurating Internet Explorer so that it will challenge that proxy. I don't know what proxy software to use (I don't want to install ISA server) and I don't know how to configure one. Does someone have any suggestion for a easy to use software that will require an authentication for any WCF services and do you have any guideline that would be helpful to know when testing a software against a proxy?

    Read the article

  • Multiple calculations on the same set of data: ruby or database?

    - by Pierre
    Hi, I have a model Transaction for which I need to display the results of many calculations on many fields for a subset of transactions. I've seen 2 ways to do it, but am not sure which is the best. I'm after the one that will have the least impact in terms of performance when data set grows and number of concurrent users increases. data[:total_before] = Transaction.where(xxx).sum(:amount_before) data[:total_after] = Transaction.where(xxx).sum(:amount_after) ... or transactions = Transaction.where(xxx) data[:total_before]= transactions.inject(0) {|s, e| s + e.amount_before } data[:total_after]= transactions.inject(0) {|s, e| s + e.amount_after } ... Which one should I choose? (or is there a 3rd, better way?) Thanks, P.

    Read the article

  • java Swing Listeners: components listening at each others.

    - by Pierre
    Hi all, I want to code two JList (categories and items). When I click one category it should select all the items for that category and when I click on one item it should select its categories. So both JList will have a ListSelectionListener listening at each other and changing the selection. Should I fear about some a of "loop" ? Is there a way to tell that an Event has been consumed ? how do people manage that kind of situation ? Thanks

    Read the article

  • What does this error mean: `somefile.c:200: error: the frame size of 1032 bytes is larger than 1024

    - by Pierre LaFayette
    During a make, I'm seeing an error along the lines of: cc1: warnings being treated as errors somefile.c:200: error: the frame size of 1032 bytes is larger than 1024 bytes The line number points to the closing brace of a c function that has a signature like this: void trace(SomeEnum1 p1, SomeEnum2 p2, char* format, ...) { Anyone know what this type of error means in general?

    Read the article

  • INSERT SQL in Java

    - by Pierre
    Hello. I have a Java application and I want to use SQL database. I have a class for my connection : public class SQLConnection{ private static String url = "jdbc:postgresql://localhost:5432/table"; private static String user = "postgres"; private static String passwd = "toto"; private static Connection connect; public static Connection getInstance(){ if(connect == null){ try { connect = DriverManager.getConnection(url, user, passwd); } catch (SQLException e) { JOptionPane.showMessageDialog(null, e.getMessage(), "Connection Error", JOptionPane.ERROR_MESSAGE); } } return connect; } } And now, in another class I succeeded to print my values but when I attempt to insert a value nothing is happening ... Here's my code : try { Statement state = SQLConnection.getInstance().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY); Statement state2 = SQLConnection.getInstance().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE); state2.executeUpdate("INSERT INTO table(field1) VALUES (\"Value\")"); // Here's my problem ResultSet res = state.executeQuery("SELECT * FROM plateau");

    Read the article

  • Use a function in a conditions hash

    - by Pierre
    Hi, I'm building a conditions hash to run a query but I'm having a problem with one specific case: conditions2 = ['extract(year from signature_date) = ?', params[:year].to_i] unless params[:year].blank? conditions[:country_id] = COUNTRIES.select{|c| c.geography_id == params[:geographies]} unless params[:geographies].blank? conditions[:category_id] = CATEGORY_CHILDREN[params[:categories].to_i] unless params[:categories].blank? conditions[:country_id] = params[:countries] unless params[:countries].blank? conditions['extract(year from signature_date)'] = params[:year].to_i unless params[:year].blank? But the last line breaks everything, as it gets interpreted as follows: AND ("negotiations"."extract(year from signature_date)" = 2010 Is there a way to avoid that "negotiations"." is prepended to my condition? thank you, P.

    Read the article

  • ehcp - access pop3 account

    - by iko
    Hi, I finally manage to get mail working with ehcp on an ubuntu server. I can get and send email from the webmail, but I can't seems to be able to access the pop3. I can telnet to the pop3 (server?) but my identification are rejected. Apparently the pop3 server is courier which seems to be configured like it should. Someone has any idea about this ? Thank you Olivier

    Read the article

  • "Rien n'est sécurisé sur le site Web de l'Hadopi" déclare Eric Walter, lors d'un débat sur les cyberguerriers

    "Rien n'est sécurisé sur le site Web de l'Hadopi" déclare Eric Walter, le secrétaire général était l'invité d'un débat sur les cyberguerriers Ce 8 février 2011 avait lieu dans un endroit huppé de la capitale un débat organisé par le Cercle, un réseau de 500 professionnels de la sécurité de l'information. Autour de la table, étaient réunis Olivier Laurelli, aka Bluetouff, blogueur spécialisé dans les problématiques liées à la sécurité et aux libertés individuelles ; Pierre Zanger, psychiatre et psychanalyste ; et Eric Walter, secrétaire général de l'Hadopi. Ce dernier, habituellement très contesté dans ce genre d'exercices, fut accueilli par ces mots de la part du "Monsieur Loyal" de la soirée :"Je n'ai pas ...

    Read the article

  • Windows Embedded Forums

    - by Luca Calligaris
    Here are the forums about Windows Embedded: Windows Embedded Standard Windows Embedded Compact Platform Development Windows Embedded Compact Managed Application Development Windows Embedded Compact Native Application Development The first forum has been online for some time while those about Windows Embedded Compact have been welcomed by Olivier Bloch a couple of hours ago. As I discuss in the previous post the public MS newsgroups will close between June 1, 2010 and October 1, 2010, starting from those with less traffic. The embedded NG's will be probably close at the beginning of the period since, for some reasons I do not understand, they're not so popular as those devoted to, let's say, Office. The forums will substitute the newsgroups so prepare to switch over soon!

    Read the article

  • On the Road(Map)

    - by Valter Minute
    The new roadmap of Windows Embedded has been announced, this is great news for anyone that wants to use Windows Embedded technologies in her/his device. Roadmaps are usually stuff for marketing people, but as a technician is important to know that you are basing your product on a system that is going to be supported for some years and that you can evolve it and will not have to re-design it completely to change its OS (unless this proves to be more convenient, of course!). Here you can read the press release: http://www.microsoft.com/Presspass/Features/2011/nov11/11-14RoadMap.mspx and here Olivier Bloch’s summary (the part that should interest tech people): http://blogs.msdn.com/b/obloch/archive/2011/11/14/windows-embedded-roadmap-update.aspx

    Read the article

  • INNOVATIONS IN PRODUCTS – Partner Briefing PROGRAM - October 1st

    - by Mike.Hallett(at)Oracle-BI&EPM
    Partners are invited to join the Innovations in Products webcast, October 1st: 4:00pm CET /5:00pm UK BI & EPM Product breakout Webcast sessions available on October 1st: Topics Speaker To Register Oracle Endeca Information Discovery, Product Overview Emma Palii, BI Sales Consultant CLICK HERE Hyperion Project Financial Planning, Measure the full financial impacts of your Projects Olivier Bernard, EPM Business Solutions Director CLICK HERE To see the full list of session topics, goto the overall registration page Innovations in Products October 1st.    To access the previously presented Applications, and Public-Sector Value Proposition presentations, please click here. Delivery Format: 1 Hour Webcast The Innovations in Products program is a series of Oracle product presentations followed by live Q&A.  It will be delivered over the Web.  Partner Participants have the opportunity to submit questions during the web cast via chat and subject matter experts will provide verbal answers live. For further information please contact Markku Rouhiainen.  

    Read the article

  • OpenWorld hands on labs: HOL9558, HOL9559 and HOL9870

    - by cpauliat
    In the upcoming event Oracle OpenWorld that will start in 2 days in San Francisco, Olivier Canonge, Simon Coter, Eric Bezille and I will run 3 hands on lab about Cloud using Oracle VM for X86 virtualization tool (details below) For each lab, a detailed document (in PDF format) explains all steps. If you don't have the opportunity to attend OpenWorld labs sessions, you can still run the labs at home or office using those documents. Lab 9558: Deploying Infrastructure as a Service (IaaS) with Oracle VM Session ID: HOL9558 Tuesday October 2nd, 2012, 10:15am – 11:15amLocation: Marriott Marquis - Salon 14/15PDF Document: part1 part2 part3 (right click and save link for each part then use winzip on file .001 to extract the PDF doc from the 3 zip files) Lab 9559: Virtualize and Deploy Oracle Applications Using Oracle VM Templates Session ID: HOL9559 Tuesday October 2nd, 2012, 11:45am – 12:45pmLocation: Marriott Marquis - Salon 14/15 PDF Document Lab 9870: x86 Enterprise Cloud Infrastructure with Oracle VM 3.x and Sun ZFS Storage Appliance Session ID: HOL 9870 Wednesday, 3 Oct, 2012, 5:00 PM - 6:00 PMLocation: Marriott Marquis - Salon 14/15 PDF Document: part1 part2 part3 (right click and save link for each part then use winzip on file .001 to extract the PDF doc from the 3 zip files)

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13  | Next Page >