Daily Archives

Articles indexed Friday December 31 2010

Page 11/30 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to find the jmp address during a x86 function call?

    - by Bruce
    Suppose we have a call foo statement. So when the assembler encounters a call statement it breaks it down into - push ip + 6 jmp <addr of foo> I have the return address in a register ebx. Now I want to find out the "addr of foo". How do I do it? I want to confirm that the push statement is present before the jmp. Will the memory map look something like this? ------- push (what will be the value stored in this byte?? opcode ??) ------- jmp (what will be the value stored in this byte?? opcode ??) ------- jmp byte 1 ------- jmp byte 2 ------- jmp byte 3 ------- jmp byte 4 ------- return address stored in ebx ------- What are the opcodes for push and jmp?

    Read the article

  • Can the google map API return a street address that was clicked.

    - by Code
    Hi guys, I'm trying to work out an app design in my head and I would like the user to be able to click there destination address on the map of there area. If I know the user is in Liverpool is it possible to pop up the map over liverpool and then allow the user to select on the map where they wanna go, and the google map/api return the street or the name of the area? I've never used googlemap/api yet so just wondering if this kind of thing is possible on the iphone yet. Many Thanks -Code

    Read the article

  • PHP: Simulate multiple MySQL connections to same database

    - by Varun
    An insert query is constantly getting logged in my MySQL slow query log. I want to see how much time the INSERT query is taking with 100 simultaneous insert operations(to the same table). So I need to simulate the follwoing. 500 different simultaneous connections from PHP to the same database on a mysql server, all of which are inserting a row(simultaneously) to the same table. DO I need to use any load testing tool? Or Can I simply write a PHP script to do this? Any thoughts?

    Read the article

  • Prolog .. Can i convert from a list of chars to a string or term in Prolog !!

    - by AhmadAssaf
    i use read_line_to_codes(Stream,Line) to read a line from a file .. first is there any way to read a line and assign it to a term in prolog ?? if not i managed to read a line and put it in this char list .. now this char list contains spaces .. which is bad .. so i want to convert it to a term or a string in prolog so that i can process it easier .. spaces cannot be atoms so thats a problem .. i appreciate the help !!

    Read the article

  • How are you supposed to layout a page in VS2010 without using tables?

    - by CrustyApple
    I have been using .NET since beta and HTML since the days of HotDog pro & notepad, using table layout of course. I am FINALLY ready to use only div, li, CSS for the layout, but my question is, what is the proper way to layout pages in VS2010? When i use table layout its simple and i can visually see what im creating and where the elements are, such as the sample below - how should I do this using div's, etc in VS2010? <table width="300" border="0" cellpadding="5"> <tr> <td><img src="http://assets.devx.com/MS_Azure/azuremcau.jpg" alt="blah" width="70" height="70" /></td> <td><h2>This is some text to the right of the picture...</h2></td> </tr> <tr> <td colspan="2">Here some text underneath</td> </tr> </table>

    Read the article

  • Displaying menus on image

    - by Snehal
    Hi all, Here is what i am doing: I have a viewcontroller screen1 to which I have added long press gesture. On longPress, user will get draw menu. On selecting that menu, i am creating another uiviewcontroller class object which has a rectangle image. This instance i am adding as a subview to screen1. Now what i want is that once the image is displayed on the screen1, i want to display UImenuItems Done and cancel above the image drawn so that on tapping on done menu, the image is saved. I tried making the new viewcontroller as firstResponder after adding image to screen1 but the menus are not visible. Any one please help

    Read the article

  • Adding extra data to a Variable

    - by DogPooOnYourShoe
    Right now, my code plucks out only one value using Mysql. So I thought I might aswell add each found result to a variable, however I dont know how to do this. This must be a very basic question, but I cant find a answer for it echo '<table border="1">'; echo "<tr><td><b>Surname</b></td><td><b>Title/Name</b></td><td><b>Numbers</b></td><td><b>Telephone</b></td><td><b>Edit</b></td><td><b>Del</b></td></tr>\n"; while ($row= mysql_fetch_array($result)) { $Surname = $row["Surname"]; $Title = $row["TitleName"]; $Email = $row["Email"]; $Telephone = $row["Telephone"]; $id = $row["id"]; $MooringNumbers = $row['Number']; $Assignedto['AssignedTo']; } $MooringQuery = "select * FROM mooring WHERE AssignedTo='$id'"; $MooringResult = mysql_query($MooringQuery) or die("Couldn't execute query"); while ($row1= mysql_fetch_array($MooringResult)) { $AssignedTo = $row1["AssignedTo"]; $MooringNumbers = $row1["Number"]; echo '<tr><td>' .$Surname.'</td><td>'.$Title.'</td><td>'.$MooringNumbers . '</td><td>'.$Telephone.'</td><td>' . '<a href="rlayCustomerUpdtForm.php?id='.$id.'">[EDIT]</a></td>'.'<td>'. '<a href="deleteCustomer.php?id='.$id.'">[x]</a></td>'. '</tr>'; }

    Read the article

  • Any tips on reducing wxWidgets application code size?

    - by Billy ONeal
    I have written a minimal wxWidgets application: stdafx.h #define wxNO_REGEX_LIB #define wxNO_XML_LIB #define wxNO_NET_LIB #define wxNO_EXPAT_LIB #define wxNO_JPEG_LIB #define wxNO_PNG_LIB #define wxNO_TIFF_LIB #define wxNO_ZLIB_LIB #define wxNO_ADV_LIB #define wxNO_HTML_LIB #define wxNO_GL_LIB #define wxNO_QA_LIB #define wxNO_XRC_LIB #define wxNO_AUI_LIB #define wxNO_PROPGRID_LIB #define wxNO_RIBBON_LIB #define wxNO_RICHTEXT_LIB #define wxNO_MEDIA_LIB #define wxNO_STC_LIB #include <wx/wxprec.h> Minimal.cpp #include "stdafx.h" #include <memory> #include <wx/wx.h> class Minimal : public wxApp { public: virtual bool OnInit(); }; IMPLEMENT_APP(Minimal) DECLARE_APP(Minimal) class MinimalFrame : public wxFrame { DECLARE_EVENT_TABLE() public: MinimalFrame(const wxString& title); void OnQuit(wxCommandEvent& e); void OnAbout(wxCommandEvent& e); }; BEGIN_EVENT_TABLE(MinimalFrame, wxFrame) EVT_MENU(wxID_ABOUT, MinimalFrame::OnAbout) EVT_MENU(wxID_EXIT, MinimalFrame::OnQuit) END_EVENT_TABLE() MinimalFrame::MinimalFrame(const wxString& title) : wxFrame(0, wxID_ANY, title) { std::auto_ptr<wxMenu> fileMenu(new wxMenu); fileMenu->Append(wxID_EXIT, L"E&xit\tAlt-X", L"Terminate the Minimal Example."); std::auto_ptr<wxMenu> helpMenu(new wxMenu); helpMenu->Append(wxID_ABOUT, L"&About\tF1", L"Show the about dialog box."); std::auto_ptr<wxMenuBar> bar(new wxMenuBar); bar->Append(fileMenu.get(), L"&File"); fileMenu.release(); bar->Append(helpMenu.get(), L"&Help"); helpMenu.release(); SetMenuBar(bar.get()); bar.release(); CreateStatusBar(2); SetStatusText(L"Welcome to wxWidgets!"); } void MinimalFrame::OnAbout(wxCommandEvent& e) { wxMessageBox(L"Some text about me!", L"About", wxOK, this); } void MinimalFrame::OnQuit(wxCommandEvent& e) { Close(); } bool Minimal::OnInit() { std::auto_ptr<MinimalFrame> mainFrame( new MinimalFrame(L"Minimal wxWidgets Application")); mainFrame->Show(); mainFrame.release(); return true; } This minimal program weighs in at 2.4MB! (Executable compression drops this to half a MB or so but that's still HUGE!) (I must statically link because this application needs to be single-binary-xcopy-deployed, so both the C runtime and wxWidgets itself are set for static linking) Any tips on cutting this down? (I'm using Microsoft Visual Studio 2010)

    Read the article

  • page.replace_html for entire div not partial?

    - by odpogn
    My sites navigation is within my <%= render 'layouts/header' %. I want to use ajax so that when a user clicks on a navigation link, only the refreshes. is not a partial, is there a way to refresh the content of that div without using a partial? <div id="container"> <%= render 'layouts/header' %> <div id="content"> <% flash.each do |key, value| %> <div class="flash <%= key %>"><%= value %></div> <% end %> <%= yield %> </div> </div>

    Read the article

  • Can anyone help why my mockery doesn't work?

    - by user509550
    The test call real method(service) without mocking some expecations @Test public void testPropertyList() { Credentials creds = new Credentials(); creds.setUsername("someEmail"); creds.setPassword("somePassword"); creds.setReferrer("someReferrer"); final Collection<PropertyInfo> propertyInfoCollection = new LinkedList<PropertyInfo>(); final List<ListingInfo> listings = new ArrayList<ListingInfo>(); listings.add(listingInfoMock); listings.add(listingInfoMock); propertyInfoCollection.add(new PropertyInfo("c521bf5796274bd587c00bec80583c00", listings)); MultivaluedMap<String, String> params = new MultivaluedMapImpl(); params.add("page", "5"); params.add("size", "5"); instance.setPropertyListFacade(propertyListFacadeMock); mockery.checking(new Expectations() { { one(propertyListFacadeMock).getUserProperties(); will(returnValue(propertyInfoCollection)); one(listingInfoMock).getPropertyName(); allowing(listingInfoMock).getThumbnailURL(); one(listingInfoMock).getListingSystemId(); one(listingInfoMock).getPropertyURL(); one(listingInfoMock).getListingSystemId(); one(listingInfoMock).getPropertyURL(); } }); instance.setSessionManager(dashboardSessionManagerMock); testSuccessfulAuthenticate(); ClientResponse response = resource.path(PROPERTIES_PATH).queryParams(params).accept(MediaType.APPLICATION_XML) .get(ClientResponse.class); assertEquals(200, response.getStatus()); mockery.assertIsSatisfied(); }

    Read the article

  • Create a new embedded language using PHP

    - by dino beytar
    I am trying to develop an administration panel and I have a command line. When a user send a command like below, i need to recognize it using PHP. My aim is simplifying tasks in the admin panel. create page -attr1 90 -attr2 'page title'; or update category 90 -name 'Technology'; There are two main things: Verb and subject (ie. create page, update category) Attributes (can be both STRING and INT) and more complex example: create page -name EN:'Static Page' CA:'Staticna Stranica' -category 3,6,12,15; Where can I start to create this very small embedded language, or how can I do it well really? Clever answers, please.

    Read the article

  • Mandatory look back at 2010

    - by Bertrand Le Roy
    Yeah, it's one of those posts, sorry. First, the mildly depressing: the most popular post on this blog this year with 47,000 hits was a post from last year about a fix to a bug in ASP.NET. A content-less post except for that link to the KB article that people should have found by going directly to the support site in the first place. Then, the really depressing: the second most popular post this year with 34,000 hits was a post from 2005 about how to display message boxes on a web page. I mean come on. This was kind of fun five years ago and it did solve one of the most common n00b mistakes VB programmers trying to move to the web were making. But come on, we've traveled about 4.7 billion miles around the Earth since then. Do people still do that kind of stuff? I should probably put a big red banner on top of this post. Oh [supernatural entity of your choice]. Hand me that gun, please. Third most popular post with 24,000 hits is from 2004. It's about how to set a session variable before redirecting. That problem has been fixed a long time ago. Oh well. Fourth most popular post. 21,000 hits. 2007. How to work around a stupid bug in ASP.NET Ajax 1.0. Fixed in ASP.NET 3.5? ASP.NET Ajax 1.0? Need I say more? The fifth one (20,000 hits) is an old post as well but I'm kind of fond of it: it's about that photo album handler I've been organically growing for a few years. It reminds me that I need to refresh it and make a new release. Good SEO title too. Back to insanity with the sixth one (16,000) that's about working around a bug in IE6. IE6. Please just refuse to pander to that browser any more. It's about time. Let's move on, please. Actually, the first post from 2010 is 15th in the list. We have a trio of these actually with server-side image resizing and FluentPath. So what happened? Well, I like the ad money, but not to the point that I'm going to write my stuff to inflate it. Actually I think if I tried I would fail miserably (I mean, I would fail worse). What really happened this year was new stuff: Orchard, FluentPath and the stuff with the Netduino. That stuff needs time to get off the ground but my hope is that it's going to be useful in the long run and that five years from now I'll be lamenting on how well those posts are still doing. So, no regret. 2010 was a good year. Oh, and I was on This Developer's Life this year! Yay! Anyways, thank you all for reading me. Please continue doing that. And happy 2011!

    Read the article

  • Installing grub2 on ubutntu with software raid mirroring

    - by Marko
    Hi guys, Can someone help me out on this? I accidentally installed grub on usb flash drive during ubuntu server installation. Now I cant boot system without drive attached to server. I want to install grub on hard drive with grub-install but i don't know what to set as location for boot loader? my fstab looks like this: file system mount point type options dump pass proc /proc proc nodev,noexec,nosuid 0 0 /dev/mapper/pdc_jdbeghhjg1 / ext4 errors=remount-ro 0 1 /dev/mapper/pdc_jdbeghhjg5 none swap sw 0 0 and partition tables for hard drives as this: Device Boot Start End Blocks Id System /dev/sda1 2048 1215662079 607830016 83 Linux /dev/sda2 1215664126 1249998847 17167361 5 Extended /dev/sda5 1215664128 1249998847 17167360 82 Linux swap / Solaris Device Boot Start End Blocks Id System /dev/sdb1 1 75672 607830016 83 Linux /dev/sdb2 75672 77809 17167361 5 Extended /dev/sdb5 75672 77809 17167360 82 Linux swap / Solaris ?

    Read the article

  • Site hanging in iis7 - how do I troubleshoot?

    - by Chris Foot
    I am currently having a problem with a windows 2008 server running IIS 7. The server runs several sites but only seems to have the issue with one particular site. Every so often, the whole server slows to a crawl with nearly all requests timing out! Invariably, when we log in to take a look there is always an IIS process using up around 90% cpu. Looking into the worker processes in IIS there are usually one or two requests that have been running for a long time. They are always in the ExecuteRequestHandler state with ManagedPipeline as the module name and the current ones i'm looking at have been running for 7686248 (what units is this in, it doesn't say?). It is also not always the same page, in fact we have seen at least 3 different pages listed under url when this has happened. It seems that the only way to bring the server back to life is to kill the 90% process! The site is running under .Net 4.0 and the code on it is very similar to other sites on the server which do not have the problem! How do I start troubleshooting this?

    Read the article

  • Configuring ASP.NET web site in IIS 6.0

    - by Paul Knopf
    I have installed IIS and .NET 4.0 on Windows Server 2003. I have a web ready website that that targets .NET 4.0 and have updated the default website home directory to map to the website's directory. When I visit the website in a web browser (localhost, localhost:80), I get a 404 error (File or directory not found). Here is the IP address so you can see for yourself. http://72.45.244.92/ How do I get my ASP.NET 4.0 website to run?

    Read the article

  • Is there any good Corporate Instant Messenger?

    - by Junior Mayhé
    Hi Guys I asked Skype team if they have a corporate instant messenger, but they didn't give me a straight answer. My company wants employees to send message and files to each other, just like Skype or Windows Live Messenger. The bottom line here is: they don't want people to contact internet users. Only employees would be possible contacts. Is there any product like this? I think would be necessary a corporate server for this solution?

    Read the article

  • How do you make Google's interface always be in your chosen language?

    - by Michael Wolf
    Google's interface and search results don't always appear in my preferred language, English. I'm located in Mexico City and, although I generally have no problem with Spanish, I would prefer search results in English most of the time. (The exception is when I'm using search terms in Spanish.) I'd also prefer the interface to be in English, but that's far less important to me than search results. Google looks at your IP to decide where you're coming from and thus what language to present results in. So, when I type www.google.com into the URL bar, it redirects me to www.google.com.mx. Is there a way to force Google to use one language all the time? Here are some things I've done and tried: 0) I have a Google account, and I've configured it such that it should know that English is my preferred language. I don't often explicitly log out of Google, so generally Google knows I'm me and my preferences when I access its services. 1) I've configured my browser to ask for pages in English. Very few sites support this feature at all; Google isn't one of them. 2) From www.google.com.mx, I can click on "Google.com in English". This works until, I think, I close the browser. 2a) From www.google.com.mx, I can go into account configuration, which is English. From then on, everything's in English. 3) I can append &hl=en (Human Language = English) to the end of the URLs of result pages. 2, 2a, and 3 all "work", but they're all mildly annoying. I'd rather avoid them if I could. (At the risk of stating the obvious, English and Spanish are the languages I'm dealing with, but I imagine that, say, a francophone using Google from Korea would run into basically the same issue.)

    Read the article

  • UNIX install quota in ubuntu ?

    - by user52085
    I am new to UNIX and can't figure out how to use the 'quota' command to see my disk usages. So I install “quota” using the following command sudo apt-get install quota But when I type in the command quota -v or anything similar, it doesn’t show anything. According to most website online (http://acs.ucsd.edu/students/quota.shtml#check-remove) , it suppose to show me all the quota limitation when I type in quota -v. can you please tell me how can I make it work or if I am doing something wrong here. your help is greatly appreciated. Thanks.

    Read the article

  • Can I make my PC backup and then sleep on demand with WHS?

    - by Simon
    I really hate the way that WHS backs up at a particular time in the morning. First of all I don't EVER want my computer turning on when I am not there. EVER. I have a Core-i7 laptop which literally could burn the house down quite easily if it were to turn on in a bag. I also don't ever want my PC to sleep unless I tell it to. I don't have hibernation or sleep enabled and this is the only way that WHS will sleep after a backup is complete. I know that Windows 7 has the ability to disable waking up when on battery power but it doesn't seem to work on my laptop. These are the possibilities (with wake timers left as default): 'Wake this computer for backup' ON - it turns on in my bag if i forget to turn it off - and stays on when the backup is complete. 'Wake this computer for backup' OFF - it backs up in the morning, but I need to leave the machine on all night. I say 'Backup Now' and then it backs up immediately. I can turn it off when its done if I'm still awake, but then that backup appears as 'locked' in the console and not 'automatically managed'. What I'd really like to do is : Click 'Backup and Sleep' and then go to bed. It will backup immediately and then sleep the PC. This backup must be 'automatically managed' and not appear as a 'locked backup' in my console Show me a confirmation that everything was backed up successfully (or not) when I turn it on. Is there any way to achieve this?

    Read the article

  • Murali Papana Blogs About Date Effectivity

    - by steve.muench
    Murali Papana from our Human Capital Management (HCM) Fusion Applications team has posted a series of blogs on a lesser-known, but quite powerful feature of ADF called "date effectivity". This is a feature that allows the framework to simplify managing records whose data values are effective for a given period of time. Imagine an employee's job title or salary that changes over time, which as well might be entered today by an HR reprepsentative but go into effect at some time in the future. Check out these articles if you're curious to learn more: Learning basics of Date Effectivity in ADFADF Model: Creating Date Effective EOADF Model: Creating Date Effective Association and Date Effective VOADF UI - Implementing Date Effective Search with Example

    Read the article

  • Choppy/unresponsive keyboard and mouse pointer until suspend

    - by Stefan Thyberg
    I had a problem where my mouse and keyboard would be choppy, the mouse pointer would work at 1-2 fps and the keyboard would keep missing letters as I was typing them. Since they were both USB I suspected there was a problem there immediately. Whenever I got this problem I would suspend the computer and start it again and the problem would be gone. The problem started appearing when I plugged the mouse and keyboard directly into the computer rather than the USB hub in the screen. I'm using a Logitech UltraX Flat and a Razer Lachesis, but I'm not sure if that matters.

    Read the article

  • Timestamp problem showing 1970 instead of 1988

    - by gmuhammad
    Hi, I am trying to set default value in DateField using the following statement DateField dateField = new DateField("Birthday:", 567993600, DateField.DATE | DateField.FIELD_LEFT); but when I run my application it shows me 7 Jan 1970 instead of 1 Jan 1988. I checked the time stamp on http://www.onlineconversion.com/unix_time.htm and it shows me correct expected date which is, "Fri, 01 Jan 1988 00:00:00 GMT" I am using 8900 simulator and my date time is correct showing today's date 31 Dec 2010 in date time under options folder. Regards, -gmuhammad

    Read the article

  • c# Regex on XML string handler

    - by Dan Sewell
    Hi guys. Trying to fiddle around with regex here, my first attempt. Im trying to extract some figures out of content from an XML tag. The content looks like this: www.blahblah.se/maps.aspx?isAlert=true&lat=51.958855252721&lon=-0.517657021473527 I need to extract the lat and long numerical vales out of each link. They will always be the same amount of characters, and the lon may or may not have a "-" sign. I thought about doing something like this below: (The string in question is in the "link" tag): var document = XDocument.Load(e.Result); if (document.Root == null) return; var events = from ev in document.Descendants("item1") select new { Title = (ev.Element("title").Value), Latitude = Regex.xxxxxxx(ev.Element("link").Value, @"lat=(?<Lat>[+-]?\d*\.\d*)", String.Empty), Longitude = Convert.ToDouble(ev.Element("link").Value), }; foreach (var ev in events) { do stuff } Many thanks!

    Read the article

  • XML Architecture

    - by Roflcoptr
    For my application I have to use a undefined number of different detection strategies. A strategy is defined in the following fashion: The AND gate can also be a OR gate. For now, I hard coded all these rules in my code. For better extensability, I'd like to define all the detection startegies respectively rules in a XML file and parse it. But I'm not really sure how I can define such a detection strategy in a XML file. Any hints how to start?

    Read the article

  • Running Javascript in PHP

    - by Zero
    I'm loading an external .php file using: <script type="text/javascript" src="myfile.js.php"></script> Within the external myfile.js.php file, I'm using: <?php header('content-type: text/javascript'); $message = "Test message"; ?> document.write('<?php echo $message; ?>'); Everything works fine until I change the name of myfile.js.php to just myfile.php Why does it stop working if I remove the .js part from the file name? I'm serving the file as text/javascript, plus shouldn't the .js part be ignored since .php is the actual file extension? Does anyone know why? Thanks!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >