Search Results

Search found 81 results on 4 pages for 'pier alexandre bouchard'.

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

  • how iterate over class members java (app-engine)

    - by Alexandre H. Tremblay
    Hello, I am using the java version of the google app engine. I would like to create a function that can receive as parameters many types of objects. I would like to print out the members of the object. Each objects may be different and the function must work for all objects. Do I have to use reflection - if so, what kind of code do I need to write? public class dataOrganization { private String name; private String contact; private PostalAddress address; public dataOrganization(){} } public int getObject(Object obj){ // This function prints out the name of every // member of the object, the type and the value // In this example, it would print out "name - String - null", // "contact - String - null" and "address - PostalAddress - null" } How would I write the function getObject?

    Read the article

  • Server side includes on app engine (<!-- include virtual="header.html" -->)?

    - by Alexandre H. Tremblay
    Hi, I have been trying to figure this out a while. I would like to make my app engine website use basic html and shtml whenever in order to avoid the slow warm-up phase of jsp apps on app engine. This is so that my landing pages load instantly. Basically, I am trying to include an html file into my main html file (index.html - I tried index.shtml). This is the command I try: <!-- include virtual="header.html" --> However it does not work. The server side includes to not seem to get executed in app engine. Do I need to enable these commands somewhere first - or does app engine simply not allow them?

    Read the article

  • OneToOne JPA / Hibernate eager loading cause N+1 select

    - by Alexandre Lavoie
    I created a method to have multilingual text on different objects without creating field for each languages or tables for each objects types. Now the only problem I've got is N+1 select queries when doing a simple loading. Tables schema : CREATE TABLE `testentities` ( `keyTestEntity` int(11) NOT NULL, `keyMultilingualText` int(11) NOT NULL, PRIMARY KEY (`keyTestEntity`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE `common_multilingualtexts` ( `keyMultilingualText` int(11) NOT NULL auto_increment, PRIMARY KEY (`keyMultilingualText`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE `common_multilingualtexts_values` ( `languageCode` varchar(5) NOT NULL, `keyMultilingualText` int(11) NOT NULL, `value` text, PRIMARY KEY (`languageCode`,`keyMultilingualText`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; MultilingualText.java @Entity @Table(name = "common_multilingualtexts") public class MultilingualText implements Serializable { private Integer m_iKeyMultilingualText; private Map<String, String> m_lValues = new HashMap<String, String>(); public void setKeyMultilingualText(Integer p_iKeyMultilingualText) { m_iKeyMultilingualText = p_iKeyMultilingualText; } @Id @GeneratedValue @Column(name = "keyMultilingualText") public Integer getKeyMultilingualText() { return m_iKeyMultilingualText; } public void setValues(Map<String, String> p_lValues) { m_lValues = p_lValues; } @ElementCollection(fetch = FetchType.EAGER) @CollectionTable(name = "common_multilingualtexts_values", joinColumns = @JoinColumn(name = "keyMultilingualText")) @MapKeyColumn(name = "languageCode") @Column(name = "value") public Map<String, String> getValues() { return m_lValues; } public void put(String p_sLanguageCode, String p_sValue) { m_lValues.put(p_sLanguageCode,p_sValue); } public String get(String p_sLanguageCode) { if(m_lValues.containsKey(p_sLanguageCode)) { return m_lValues.get(p_sLanguageCode); } return null; } } And it is used like this on a object (having a foreign key to the multilingual text) : @Entity @Table(name = "testentities") public class TestEntity implements Serializable { private Integer m_iKeyEntity; private MultilingualText m_oText; public void setKeyEntity(Integer p_iKeyEntity) { m_iKeyEntity = p_iKeyEntity; } @Id @GeneratedValue @Column(name = "keyEntity") public Integer getKeyEntity() { return m_iKeyEntity; } public void setText(MultilingualText p_oText) { m_oText = p_oText; } @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "keyText") public MultilingualText getText() { return m_oText; } } Now, when doing a simple HQL query : from TestEntity, I get a query selecting TestEntity's and one query for each MultilingualText that need to be loaded on each TestEntity. I've searched a lot and found absolutely no solutions. I have tested : @Fetch(FetchType.JOIN) optional = false @ManyToOne instead of @OneToOne Now I am out of idea!

    Read the article

  • Ruby Actions: How to avoid a bunch of returns to halt execution?

    - by Alexandre
    How can I DRY the code below? Do I have to setup a bunch of ELSEs ? I usually find the "if this is met, stop", "if this is met, stop", rather than a bunch of nested ifs. I discovered that redirect_to and render don't stop the action execution... def payment_confirmed confirm_payment do |confirmation| @purchase = Purchase.find(confirmation.order_id) unless @purchase.products_match_order_products?(confirmation.products) # TODO notify the buyer of problems return end if confirmation.status == :completed @purchase.paid! # TODO notify the user of completed purchase redirect_to purchase_path(@purchase) else # TODO notify the user somehow that thigns are pending end return end unless session[:last_purchase_id] flash[:notice] = 'Unable to identify purchase from session data.' redirect_to user_path(current_user) return end @purchase = Purchase.find(session[:last_purchase_id]) if @purchase.paid? redirect_to purchase_path(@purchase) return end # going to show message about pending payment end

    Read the article

  • C: How come an array's address is equal to its value?

    - by Alexandre
    In the following bit of code, pointer values and pointer addresses differ as expected. But array values and addresses don't! How can this be? Output my_array = 0022FF00 &my_array = 0022FF00 pointer_to_array = 0022FF00 &pointer_to_array = 0022FEFC ... #include <stdio.h> int main() { char my_array[100] = "some cool string"; printf("my_array = %p\n", my_array); printf("&my_array = %p\n", &my_array); char *pointer_to_array = my_array; printf("pointer_to_array = %p\n", pointer_to_array); printf("&pointer_to_array = %p\n", &pointer_to_array); printf("Press ENTER to continue...\n"); getchar(); return 0; }

    Read the article

  • How to cache pages using background jobs ?

    - by Alexandre
    Definitions: resource = collection of database records, regeneration = processing these records and outputting the corresponding html Current flow: Receive client request Check for resource in cache If not in cache or cache expired, regenerate Return result The problem is that the regeneration step can tie up a single server process for 10-15 seconds. If a couple of users request the same resource, that could result in a couple of processes regenerating the exact same resource simultaneously, each taking up 10-15 seconds. Wouldn't it be preferrable to have the frontend signal some background process saying "Hey, regenerate this resource for me". But then what would it display to the user? "Rebuilding" is not acceptable. All resources would have to be in cache ahead of time. This could be a problem as the database would almost be duplicated on the filesystem (too big to fit in memory). Is there a way to avoid this? Not ideal, but it seems like the only way out. But then there's one more problem. How to keep the same two processes from requesting the regeneration of a resource at the same time? The background process could be regenerating the resource when a frontend asks for the regeneration of the same resource. I'm using PHP and the Zend Framework just in case someone wants to offer a platform-specific solution. Not that it matters though - I think this problem applies to any language/framework. Thanks!

    Read the article

  • N-tier architecture and unit tests (using Java)

    - by Alexandre FILLATRE
    Hi there, I'd like to have your expert explanations about an architectural question. Imagine a Spring MVC webapp, with validation API (JSR 303). So for a request, I have a controller that handles the request, then passes it to the service layer, which passes to the DAO one. Here's my question. At which layer should the validation occur, and how ? My though is that the controller has to handle basic validation (are mandatory fields empty ? Is the field length ok ? etc.). Then the service layer can do some tricker stuff, that involve other objets. The DAO does no validation at all. BUT, if I want to implement some unit testing (i.e. test layers below service, not the controllers), I'll end up with unexpected behavior because some validations should have been done in the Controller layer. As we don't use it for unit testing, there is a problem. What is the best way to deal with this ? I know there is no universal answer, but your personal experience is very welcomed. Thanks a lot. Regards.

    Read the article

  • Visual Studio debugger problem

    - by Alexandre Pepin
    In Visual Studio 2008, after debugging about 1-2 minutes, when I press F10 (Step Over), the debugger hangs and Visual Studio freezes for 5-10 seconds and then go to the next line. Then whatever I do (F10, F5, F11, etc), the debugger continues the execution as if i pressed F5 and all my forms that I was debugging close. I always have to restart the application. It is very hard to reproduce and it does not occurs every time I want to debug something. Does anyone has a solution ?

    Read the article

  • I want to read program content from command line.

    - by Alexandre Dominos
    I am trying to update a program which was wrotten in 1995 with pascal or c. I am not sure about programming language. Command line program. Now I am coded in C#. And I want to read program command line content. Is it possible? I tried something. But not succesfull. They are: private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { // Redirect the output stream of the child process. p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = "osl.exe"; p.Start(); logs.AppendText("Timer Started\n"); timer1.Enabled = true; } private void timer1_Tick(object sender, EventArgs e) { // write somethingg and read what is the program doing on command line? // What is the program printint? etc... // I try this code but not enough for mo. // logs.AppendText("d:" + p.StandardOutput.ReadToEnd()+"\n"); } private void p_Exited(object sender, EventArgs e) { timer1.Enabled = false; } i am open to any idea in java,cpp,c,c#.

    Read the article

  • Solve equation from string to result in C

    - by Alexandre Cassagne
    Hi, I would like to know if anyone has info or experience on how to do something which sounds simple but doesn't look like it when trying to program it. The idea is : give a string containing an equation, such as : "2*x = 10" for example (this is simple, but it could get very complex, such as sqrt(54)*35=x^2; and so on....) and the program would return x = 5 and possibly give a log of how he got there. Is this doable ? If so, does anyone have a lead ? For info there is this site (http://www.numberempire.com/equationsolver.php) which does the same thing in PHP, but isn't open source. Thanks for any help !

    Read the article

  • Trying to add functionality to MvcHandler

    - by Alexandre Brisebois
    I am currently trying to add 301 redirect to my routes in MVC to do this I have tried to inherit from the MvcHandler. The handler gets instantited with the right values. but I am never able to debug the overridden methods. can someone show me a working attempt at this? the asp.net pipe simply seems to the doing its own thing... public class CodeHttpHandler : MvcHandler { public CodeHttpHandler(RequestContext p_requestContext) : base(p_requestContext) { } protected override void ProcessRequest(HttpContext p_httpContext) { } protected override void ProcessRequest(HttpContextBase p_httpContext) { } }

    Read the article

  • PHP URL parameters append return special character

    - by Alexandre Lavoie
    I'm programming a function to build an URL, here it is : public static function requestContent($p_lParameters) { $sParameters = "?key=TEST&format=json&jsoncallback=none"; foreach($p_lParameters as $sParameterName => $sParameterValue) { $sParameters .= "&$sParameterName=$sParameterValue"; } echo "<span style='font-size: 16px;'>URL : http://api.oodle.com/api/v2/listings" . $sParameters . "</span><br />"; $aXMLData = file_get_contents("http://api.oodle.com/api/v2/listings" . $sParameters); return json_decode($aXMLData,true); } And I am calling this function with this array list : print_r() result : Array ( [region] => canada [category] => housing/sale/home ) But this is very strange I get an unexpected character (note the special character none*®*ion) : http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none®ion=canada&category=housing/sale/home For information I use this header : <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <?php header('Content-Type: text/html;charset=UTF-8'); ?> EDIT : $sRequest = "http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none&region=canada&category=housing/sale/home"; echo "<span style='font-size: 16px;'>URL : " . $sRequest . "</span><br />"; return the exact URL with problem : http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none®ion=canada&category=housing/sale/home Thank you for your help!

    Read the article

  • Crosstalk 2012

    - by David Dorf
    There are lots of industry conferences, but I consistently hear that Oracle Retail Crosstalk is one of the better ones, presumably because its focused is on helping Oracle Retail's customers interact, share insights, and exchange ideas.  If you're an Oracle Retail customer, I strongly encourage you to register and attend.  Here's why: Two days of fantastic speakers from companies like Daphne, Kohl's, Morrisons, Abercrombie & Fitch, Hot Topic, Talbots, and Disney to name a few. Held in the heart of Chicago with store tours on Michigan Avenue Special Interest discussions on merchandising, supply chain, planning, stores, and technology. Golf, fireworks at Navy Pier, and dancing at Soldier Field And best of all, the conference is free for qualified customers. So I certainly hope to see you there!

    Read the article

  • SOA &amp; BPM Partner Community Forum XI &ndash; thanks for the great event!

    - by Jürgen Kress
    Thanks to our team in Portugal we are running a great SOA & BPM Partner Community Forum in Lisbon this week. Yes we made our way to Lisbon – thanks to Lufthansa!   Program Wednesday April 21st 2010 Time Plenary agenda 10:00 – 10:15 Welcome & Introduction Paulo Folgado, Oracle 10:15 – 11:15 SOA & Cloud Computing Alexandre Vieira, Oracle 11:15 - 12:30 SOA Reference Case Filipe Carvalho, Wide Scope 12:30 – 13:15 Lunch Break 13:30 – 14:15 BPMN 2.0 Torsten Winterberg, Opitz Consulting 14:15 – 15:00 SOA Partner Sales Campaign Jürgen Kress, Oracle 15:00 – 15:15 Closing notes Jürgen Kress, Oracle 15:15 – 16:00 Cocktail reception You want to attend a SOA Partner Community event in the future? Make sure that you do register for the SOA Partner Community www.oracle.com/goto/emea/soa Program Thursday and Friday April 22nd & 23rd 2010 9:00 BPM hands-on workshop by Clemens Utschig-Utschig 18:30 End of part 1 8:30 BPM hands-on workshop part II 15:30 End of BPM 11g workshop Dear Lufthansa Team, Special thanks for making the magic happen! We all arrived just in time in Lisbon. Here the picture from Munich airport Wednesday morning. cancelled, cancelled, cancelled – Lisbon is boarding!    

    Read the article

  • google.com different IP in different countries. How?

    - by HeavyWave
    If you ping google.com from different countries you will get replies from local google servers. How does that work? Can a DNS record have multiple A addresses? Could someone point me to the technology they use to do that? Update. OK, so Google's DNS server gives out a different IP based on the location. But, as Alexandre Jasmin pointed out, how do they track the location? Surely their DNS won't ever see your IP address. Is the server querying Google's DNS guaranteed to be from the location it represents?

    Read the article

  • Novocaine - How to loop file playback? (iOS)

    - by lppier
    I'm using Novocaine by alexbw Novocaine for my audio project. I'm playing around with the example code here for file reading. The file plays back with no problem. I would like to loop this recording with the gap between the loops - any suggestion as to how I can do so? Thanks. Pier. // AUDIO FILE READING OHHH YEAHHHH // ======================================== NSArray *pathComponents = [NSArray arrayWithObjects: [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject], @"testrecording.wav", nil]; NSURL *inputFileURL = [NSURL fileURLWithPathComponents:pathComponents]; NSLog(@"URL: %@", inputFileURL); fileReader = [[AudioFileReader alloc] initWithAudioFileURL:inputFileURL samplingRate:audioManager.samplingRate numChannels:audioManager.numOutputChannels]; [fileReader play]; [fileReader setCurrentTime:0.0]; //float duration = fileReader.getDuration; [audioManager setOutputBlock:^(float *data, UInt32 numFrames, UInt32 numChannels) { [fileReader retrieveFreshAudio:data numFrames:numFrames numChannels:numChannels]; NSLog(@"Time: %f", [fileReader getCurrentTime]); }];

    Read the article

  • Post Crosstalk 2012

    - by David Dorf
    This year the Oracle Retail users conference, Crosstalk, had a 20% increase in attendees, which was driven by both new customers and those acquired via Endeca.  As the product assets of Oracle have grown, so has the completeness of the solution set.  This year was marked by the breadth of omni-channel stories. Rose Spicer and her marketing team (see photo on left) always strive for an equal balance of retailer presentations, networking opportunities, and unique experiences -- this year was no exception.  We had 41 different retailers from China, Russia, South Africa, Brazil, Chile, US, Canada and the UK sharing their insights with one another. In all there were 251 executives from 120 iconic brands such as Daphne, Kohl's, Morrisons, Abercrombie & Fitch, Hot Topic, Talbots, Petco, Deckers, Sportmaster, Mr. Price, Falabella, and Disney to name a few. From a product perspective, there were a few new developments from Oracle Retail: Endeca's search engine has been integrated into the ATG commerce platform. The latest Retail Analytics application, Oracle Retail Customer Analytics, is generally available. Oracle Retail previewed a new fully-integrated mobile POS. But the real benefit of attending Crosstalk was hearing about the experiences of retailers and partners.  Here are are a few interesting facts I picked up: At Kohl's, the most popular website accessed by customers within their stores is Facebook.  With all the buzz about showrooming, I was really expecting it to be Amazon. Daphne, a Chinese shoe retailer, is opening 3 new stores per day.  Being located near the factories allows them to have a very agile supply chain as well. Disney Stores have increased sales by 25% at stores upgraded to include Mobile POS.  They continue to lead the pack with excellent customer experiences. Quicksilver reported that 1 in 5 visits to their website comes from a tablet.  More evidence that tablets are replacing traditional PCs in households. By tagging shoes with RFID, Saks is able to ensure all shoe models are on display.  If a model is not being displayed, it has no chance of being sold. Additionally, there were awards, store tours on Michigan Avenue, fireworks at Navy Pier, and the Oracle Retail house band, Bolo313, performing at Solider Field.  Speaking of which, a few retailers got on stage and jammed with band -- possible rival to Rock & Roll Retail? You can always find the latest info from us at the Retail Rack. The next events on tap are the Partner Summit followed by OpenWorld.

    Read the article

  • Building v8 without JIT

    - by rames
    Hello, I would like to run some tests on v8 with and without JIT to compare performances. I know JIT will improve my average speed performance, but it would be nice for me to have some actual more detailed tests results as I want to work with mobile platforms. I haven't found how to enable or disable JIT like it exists on Squirrelfish (cf. ENABLE_JIT in JavaScriptCore/wtf/Platform.h). Does somebody knows how to do that with v8? Thanks. Alexandre

    Read the article

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