Search Results

Search found 175 results on 7 pages for 'edison'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • How to move value from the stack to ST(0)?

    - by George Edison
    I am having trouble believing the following code is the most efficient way to move a value from the stack to ST(0): .data var dd 4.2 tmp dd ? .code mov EAX, var push EAX ; top of stack now contains a value ; move it to ST(0) pop EAX mov tmp, EAX fld tmp Is the temporary variable really necessary? Further, is there an easier way to get a value from the stack to ST(0)?

    Read the article

  • How to add a slot to my main window in Qt builder?

    - by George Edison
    I am using Qt Builder to create a simple window. I used the menu editor to add a menu. Now, I figured out how to connect one of the menu items to the close() method of the main window. My problem is how to add a slot to the main window. Here is what I have: private slots: void OnAbout(); However, I can't get this method to show up in the 'Signals and Slots Editor'. How can I get it to show up?

    Read the article

  • jQuery UI problem: why do the elements go flying around the screen?

    - by George Edison
    Yes, I know the title sounds a little suspicious. I will try to explain this the best I can... The code below is supposed to have the blue div slide down beside the red div. The first time you hit the Show the div button, it works. Also, the Hide the div works. Then when I click to show the div again, it appears to the right of where it is supposed to be! Why is this?!? Note: You can find a live example of the code here <html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Demo</title> <style type='text/css'> #red { background-color: red; width: 200px; height: 150px; position: absolute; } #blue { background-color: blue; width: 150px; height: 200px; position: absolute; display: none; } #tester_1 { top: 300px; left: 300px; position: absolute; } #tester_2 { top: 350px; left: 300px; position: absolute; } </style> </head> <script type="text/javascript" src="jquery.js"></script> <script type='text/javascript'> function Show() { $('#blue').position({ of: $('#red'), my: 'left top', at: 'right top'}).slideDown(); } function Hide() { $('#blue').hide(); } </script> <body> <div id='red'></div> <div id='blue'></div> <button id='tester_1' onclick='Show()'>Show the <kbd>div</kbd></button> <button id='tester_2' onclick='Hide()'>Hide the <kbd>div</kbd></button> </body> </html>

    Read the article

  • How to capture a 'sub-section' of a URL in a rewrite rule?

    - by George Edison
    I know the title is a little bit strange, but here is what the URLs look like: /user/xxx/page /user/xxx/page?error=yyy The rule for the first URL looks something like this: RewriteRule ^user/(\d+)/page$ something.pl?id=$1 [L] And to make it work with the second URL, it becomes: RewriteRule ^user/(\d+)/page(error=\d+)?$ something.pl?id=$1 [L] My question is... how do I capture the error number? I tried both of these: RewriteRule ^user/(\d+)/page(error=(\d+))?$ something.pl?id=$1&error=$2 [L] RewriteRule ^user/(\d+)/page(error=(\d+))?$ something.pl?id=$1&error=$3 [L] But it isn't working... How can I do this?

    Read the article

  • How to remove margin at top of table?

    - by George Edison
    I have the following HTML: <div></div> <table> <tr><td>Test</td></tr> </table> ...and the following CSS: div { /* nothing yet */ } table { margin: 0px; border-collapse: collapse; padding: 0px; } No matter what I do, there is still a gap between the table and the DIV. This occurs on Google Chrome 5.0.375.70 beta on Linux. (And it seems to occur on other Webkit-based browsers too.) How can I get rid of the space?

    Read the article

  • How to refer to object in JavaScript event handler?

    - by George Edison
    Note: This question uses jQuery but the question has nothing to do with jQuery! Okay so I have this object: var box = new BigBox(); This object has a method named Serialize(): box.AddToPage(); Here is the method AddToPage(): function AddToPage() { $('#some_item').html("<div id='box' onclick='this.OnClick()'></div>"); } The problem above is the this.OnClick() (which obviously does not work). I need the onclick handler to invoke a member of the BigBox class. How can I do this? How can an object refer to itself in an event handler?

    Read the article

  • How to get this JavaScript class member to return a value?

    - by George Edison
    I have a JavaScript class that has a method: function someClass() { this.someMethod = someClass_someMethod; } function someClass_someMethod() { // make an AJAX request } The problem is that someClass_someMethod() needs to return the value of the AJAX request. I'm using jQuery's $.getJSON() method to fetch the data. The data needs to be returned but it seems the only way to get the data is through a callback. How can this be done?

    Read the article

  • What is the future of C++?

    - by George Edison
    Given the rise in popularity of C# and others, (which you can point out in the comments) what future does C++ have? Consider that most OS code is a mix of Asm/C/C++ and a lot of FOSS still use it. Also consider the upcoming C++0x standard that brings a few changes to the mix.

    Read the article

  • How do I remove a <tr> with jQuery?

    - by George Edison
    Okay, I am really stuck here. I have a table of tr's that have id's: #tr_xx where xx is a number. item is a number. The if(... part makes sure that what follows is only executed once at the end of all the animations. $('#tr_' + item + '>td').fadeOut('slow', function() { if($('#tr_' + item + '>td:animated').length === 0) { $(this).parent().remove(); // This function recolors the rows // -not really related to this Recolor(); } }); The problem is that the tr does not get deleted. It just gets hidden. How can I delete the <tr> and not just hide it?

    Read the article

  • How should a Gnome applet store its configuration data?

    - by George Edison
    I have a Gnome applet written in Python. In order to save configuration data/settings, it creates a file ~/.appname. However, this prevents multiple instances of the applet from being added to the panel because each cannot have its own settings. How can I store the settings in a way that allows each instance to have its own unique settings? Update: I specifically want to know how to store settings per instance.

    Read the article

  • Why isn't IE displaying this alert()?

    - by George Edison
    I have the following piece of code: // setup the AJAX request var pageRequest = false; if(window.XMLHttpRequest) pageRequest = new XMLHttpRequest(); else if(window.ActiveXObject) pageRequest = new ActiveXObject("Microsoft.XMLHTTP"); // callback pageRequest.onreadystatechange = function() { alert('pageRequest.readyState: ' + pageRequest.readyState + '\npageRequest.status: ' + pageRequest.status); } pageRequest.open('POST','ajax.php',true); // q_str contains something like 'data=value...' pageRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); pageRequest.setRequestHeader("Content-length", q_str.length); pageRequest.setRequestHeader("Connection", "close"); pageRequest.send(q_str); This works fine in Chrome, but IE chokes on it, spitting out an "Unspecified error." and it points to the line with the alert() in it. Why can't it display the alert?

    Read the article

  • Is there a way to be notified when the user makes changes in a wxStyledTextCtrl?

    - by George Edison
    I have a wxWidgets application that has a wxStyledTextCtrl. But for the life of me, I cannot figure out how to get notified of modification events. I have the following code: void CMainWindow::OnDocumentModified(wxStyledTextEvent & event) { wxString msg; msg << event.GetModificationType(); wxMessageBox(msg); } This gets called for EVT_STC_MODIFIED. When I run the application and press a key, the message box displays 1040 and 8209. When I call SetText the same two messages are displayed. How can I differentiate between user events and programmatically-generated events?

    Read the article

  • What speech libraries are available in Linux?

    - by George Edison
    When it comes to TTS (text-to-speech) libraries in Linux, what choices do developers have? What libraries ship with the majority of distros? Are there minimal libraries? What functionality does each library offer? I'm approaching this primarily from a C++ point of view, although Python would suit me too.

    Read the article

  • How to compile a Windows binary in Ubuntu?

    - by George Edison
    I have a Qt application that I can compile in Ubuntu 10.04 64-bit and on Windows. However, I would like to avoid switching to Windows every time I want to compile the Windows version. Is there a way I can compile a Windows Qt executable in Ubuntu with mingw32 or something? Further, is there a way to integrate that compiler into Qt Creator?

    Read the article

  • Is it wise to rely on default features of a programming language?

    - by George Edison
    Should I frequently rely on default values? For example, in PHP, if you have the following: <?php $var .= "Value"; ?> This is perfectly fine - it works. But what if assignment like this to a previously unused variable is later eliminated from the language? (I'm not referring to just general assignment to an unused variable.) There are countless examples of where the default value of something has changed and so much existing code was then useless. On the other hand, without default values, there is a lot of code redundancy. What is the proper way of dealing with this?

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >