Search Results

Search found 78 results on 4 pages for 'alexandre gomes'.

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

  • 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

  • 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

  • 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

  • merge two binary images using Matlab

    - by Pier-alexandre Bouchard
    I need to create two different black binary rectangles using Matlab, to overlay a part of both and to extract the insertion. How can I overlay two binary images? -------|----------| | | 2 | | 1 |----|-----| | | |-----------| I created my two binary images using the false(X, Y) Matlab function. I dont find how to produce the merge the two images and to extract the insertion.

    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

  • 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

  • Whats wrong with my makefile

    - by user577220
    ##################################################################### # This is the filesystem makefile "make_BuddyAlloc". # Author:Michael Gomes # Date:2 jan 2011 ###################################################################### #variable defination CC = gcc CFLAGS = -g -O2 SRC_DIR=src INC_DIR=inc OBJ_DIR=obj #List of source files SOURCE= buddyMain.c \ Copy.c \ #List of object files OBJECTS=$(addprefix $(OBJ_DIR)/,$(SOURCE:.c=.o)) #BuddyAlloc is dependent on "obj/*.o". BuddyAlloc : $(OBJECTS) $(CC) $(CFLAGS) -o BuddyAlloc $< #obj/*.o depends on src/*.c and inc/*.h, we are redirecting the object files to obj folder $(OBJECTS):$(SRC_DIR)/$(SOURCE) $(CC) $(CFLAGS) -I$(INC_DIR) -o $(OBJ_DIR)/$(OBJECTS) -c $< #Cleans all the *.exe files clean: rm -f *.exe I have kept the source files under src folder includes under inc folder and the object files are being saved in obj folder .given above is the makefile i am trying to create for my mini project. I keep getting the error no rule to make target 'Copy.c' needed by 'obj/buddyAlloc.o', but it works fine it i dont include Copy.c, what did i do wrong?

    Read the article

  • MIX 2010 Covert Operations Day 1

    - by GeekAgilistMercenary
    Portland Departure - Farewell Stumptown Off I go on a plane from Portland, Oregon to Las Vegas, Nevada for the MIX 2010 Conference.  Before I even boarded the plane I met Paul Gomes a Senior Software Engineer and Andrew Saylor the Director of Business Development.  Both of these SoftSource Employees were en route to MIX themselves.  Being stoked to already be bumping into some top tier people, I bid them adieu and headed for my seat on the plane. I boarded, and had before the boarding opted for an upgrade.  I have to advise that if you get a chance on Alaska to upgrade at the last minute, take it.  It is usually only about $50 bucks or so and the additional space makes working on the ole' laptop actually possible (even on my monstrous 17" laptop).  So take it from me, click that upgrade button and fork over that $50 bucks for anything over an hour flight, the comfort and ability to work is usually worth it! Las Vegas Arrival - Welcome to Sin City Got into Las Vegas and swung out of the airport.  I then, with my comrade Beth attempted to get Internet Access for the next 3 hours.  Las Vegas, is not the most friendly Internet Access town.  I will just say it, I am not sure why any Internet related company (ala Microsoft) would hold a conference here.  There are more than a dozen other cities that would be better. But I digress, I did manage to get Internet Access after checking into the Circus Circus.  Don't ask why I ended up staying here, if you run into me in person, ask then because there is a whole story to it. At this point I started checking out each session further on the MIX10 Site.  There are a number I deemed necessary to check out.  However, you'll have to read my pending entries to see which session I jumped into. With this juncture in time reached, I got a ton of work to wrap up, some code to write and some sleep to get.  Until tomorrow, adieu. For more of my writing, thoughts, and other topics check out my other blog, where the original entry is posted.

    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

  • SharpDX: best practice for multiple RenderForms?

    - by Rob Jellinghaus
    I have an XNA app, but I really need to add multiple render windows, which XNA doesn't do. I'm looking at SharpDX (both for multi-window support and for DX11 / Metro / many other reasons). I decided to hack up the SharpDX DX11 MultiCubeTexture sample to see if I could make it work. My changes are pretty trivial. The original sample had: [STAThread] private static void Main() { var form = new RenderForm("SharpDX - MiniCubeTexture Direct3D11 Sample"); ... I changed this to: struct RenderFormWithActions { internal readonly RenderForm Form; // should just be Action but it's not in System namespace?! internal readonly Action RenderAction; internal readonly Action DisposeAction; internal RenderFormWithActions(RenderForm form, Action renderAction, Action disposeAction) { Form = form; RenderAction = renderAction; DisposeAction = disposeAction; } } [STAThread] private static void Main() { // hackity hack new Thread(new ThreadStart(() = { RenderFormWithActions form1 = CreateRenderForm(); RenderLoop.Run(form1.Form, () = form1.RenderAction(0)); form1.DisposeAction(0); })).Start(); new Thread(new ThreadStart(() = { RenderFormWithActions form2 = CreateRenderForm(); RenderLoop.Run(form2.Form, () = form2.RenderAction(0)); form2.DisposeAction(0); })).Start(); } private static RenderFormWithActions CreateRenderForm() { var form = new RenderForm("SharpDX - MiniCubeTexture Direct3D11 Sample"); ... Basically, I split out all the Main() code into a separate method which creates a RenderForm and two delegates (a render delegate, and a dispose delegate), and bundles them all together into a struct. I call this method twice, each time from a separate, new thread. Then I just have one RenderLoop on each new thread. I was thinking this wouldn't work because of the [STAThread] declaration -- I thought I would need to create the RenderForm on the main (STA) thread, and run only a single RenderLoop on that thread. Fortunately, it seems I was wrong. This works quite well -- if you drag one of the forms around, it stops rendering while being dragged, but starts again when you drop it; and the other form keeps chugging away. My questions are pretty basic: Is this a reasonable approach, or is there some lurking threading issue that might make trouble? My code simply duplicates all the setup code -- it makes a duplicate SwapChain, Device, Texture2D, vertex buffer, everything. I don't have a problem with this level of duplication -- my app is not intensive enough to suffer resource issues -- but nonetheless, is there a better practice? Is there any good reference for which DirectX structures can safely be shared, and which can't? It appears that RenderLoop.Run calls the render delegate in a tight loop. Is there any standard way to limit the frame rate of RenderLoop.Run, if you don't want a 400FPS app eating 100% of your CPU? Should I just Thread.Sleep(30) in the render delegate? (I asked on the sharpdx.org forums as well, but Alexandre is on vacation for two weeks, and my sister wants me to do a performance with my app at her wedding in three and a half weeks, so I'm mighty incented here! http://robjsoftware.org for details of what I'm building....)

    Read the article

  • Centralized Project Management Brings Needed Cost Controls to Growing Brazilian Firm

    - by Melissa Centurio Lopes
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Fast growth and a significant increase in business activities were creating project management challenges for CPqD, a developer of innovative information and communication technologies for large Brazilian organizations. To bring greater efficiency and centralized project management capabilities to its operations, CPqD chose Oracle’s Primavera P6 Enterprise Project Portfolio Management. “Oracle Primavera is an essential tool for our day-to-day business, and I notice the effort Oracle makes to constantly innovate and to add more functionality in an increasingly shorter period of time,” says Márcio Alexandre da Silva, IT department project coordinator, CPqD. He explains that before CPqD implemented the Oracle solution, the company did not have a corporate view of projects. “Our project monitoring was decentralized and restricted to each coordinator,” the project coordinator says. “With the Oracle solution, we achieved actual shared management, more control, and budgets that stay within projections.” Among the benefits that CPqD now enjoys are The ability to more effectively identify how employees are allocated, enabling managers to increase or reduce resources based on project scope, as well as secure the resources required for unexpected projects and demands A 75 percent reduction in the time it takes to collect project data and indicators—automated and centralized collection means project coordinators no longer have to manually compile information that was spread among various systems Read the complete CPqD company snapshot Read more in the October Edition of the quarterly Information InDepth EPPM Newsletter Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

    Read the article

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