Search Results

Search found 866 results on 35 pages for 'simon thorpe'.

Page 26/35 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Newbie question on MvcContrib TestHelpers

    - by Simon Lomax
    Hi, I'm just starting to use the TestHelpers in MvcContrib. I want to try and test an action method on my controller that itself tests if IsAjaxRequest() is true. I've used the same code that is shown in the TestHelper samples to set up the TestControllerBuilder _controller = new StarsController(); _builder = new TestControllerBuilder(); _builder.InitializeController(_controller); So that _controller has all the faked/mocked HttpContext inside it, which is really great. But what do I do now to force IsAjaxRequest() on the internally faked Request object to return true?

    Read the article

  • C++ memcpy problem :(

    - by Simon
    Hey all :) I have a problem my src pointer of memcpy is pointing wrong. unsigned char* lpBuffer is a buffer that contains my bytes, i checked with olly. The code: IMAGE_DOS_HEADER iDOSh; memcpy(&iDOSh,lpBuffer,sizeof(iDOSh)); The problem is that lpBuffer points wrong, output from debugger is dest = 002859E8 RIGHT src = 000001D8 FALSE src is pointing invalid :( i have no idea why Thanks for reading

    Read the article

  • Can't export release build / compile for Adobe Air 1.0

    - by Shawn Simon
    I opened up an old project in Flex Builder 3 which runs on Adobe AIR 1.0. I believe it was originally written in Flex Builder 2. When I try to run the air app, nothing happens. When I try to export a release build, I get this error: If I change the main-app.xml file to use the 1.5 version of the namespace, it builds fine. Unfortunately, the clients environment runs on 1.0. Ideas?

    Read the article

  • Comparing date in access database

    - by Simon
    How can i compare the day in the access database to a given day in c#? The date column in the database is an general date(day/month/year) try { database = new OleDbConnection(connectionString); database.Open(); date = DateTime.Now.ToShortDateString(); string queryString = "SELECT user_name,zivila.naziv " + "FROM (users LEFT JOIN obroki_save ON obroki_save.ID_uporabnika=users.ID)" + " LEFT JOIN zivila ON zivila.ID=obroki_save.ID_zivila " + " WHERE users.ID= " + a.ToString() + " AND obroki_save.datum=# " + date; loadDataGrid(queryString); } catch (Exception ex) { MessageBox.Show(ex.Message); return; }

    Read the article

  • Wrapping quotes around a php id in XML

    - by Simon Hume
    I've got this line of code: $xml_output .= "\t<Event=" . $x . ">\n"; And it will output: <Event=0> <Event=1> <Event=2> etc etc through my loop. I need it to output as this (with the quotes around the number): <Event="0"> <Event="1"> <Event="2"> Any help, and I'm sure it's simple would be greatly appreciated!

    Read the article

  • Date range/query problem..

    - by Simon
    Am hoping someone can help me out a bit with date ranges... I have a table with 3 fields id, datestart, dateend I need to query this to find out if a pair of dates from a form are conflicting i.e table entry 1, 2010-12-01, 2010-12-09 from the form 2010-12-08, 20-12-15 select id from date_table where '2010-12-02' between datestart and dateend; That returns me the id that I want, but what I would like to do is to take the date range from the form and do a query similar to what I have got that will take both form dates 2010-12-08, 20-12-15 and query the db to ensure that there is no conflicting date ranges in the table. Am sat scratching my head with the problem... TIA

    Read the article

  • Why does Android allocate more memory than needed when loading images

    - by Simon
    Folks, I don't think that this is a duplicate and is NOT one of those how do I avoid OOMs questions. This is a genuine quest for knowledge so hold off on those down votes please... Imagine I have a JPEG of 500x500 pixels. I load it as ARGB_8888 which is as "bad as it gets". I would expect Android to allocate 500x500x4 bytes = a little under 1MB however, look at a heap dump and you will see that Android allocates significantly more, often factors of 5-10 times greater. You frequently see questions on here about OOMS where the stack trace shows a heap request of say 15MB and it is ALWAYS much larger than is required simply to hold the bytes of the image. The OP usually catches some downvotes then is bombarded with stock answers and comments about using less memory (thanks Romain!) and in scaling. I think there is more than meets the eye here. Anybody know why this is? If there is no apparent answer, I will put together an SSCCE if it helps. PS. I assume that JPEG vs PNG etc is irrelevant since we're talking about the memory usage of the backing bitmap which is simply x times y times BPP - or am I being slow?

    Read the article

  • Javascript error : " 'Sys' is undefined "

    - by Simon
    Hi there, I keep having an error when running my web application. The error does not cause a compilation error when on live server at least a javascript error and nothing else. But the real problem is when "debug" ... javascript error stops the compilation and I have to "Continue" three times before proceeding normally my debug. But this error occurs at every refresh the page. All this using Visual Studio. After several hours of search on google, I saw that it was a problem with the ScriptManager and Ajax. The real problem is that I do not use any Ajax on this page but the ScriptManager is on the masterpage. Worse still, on any other page on the website, that may use Ajax or not, no javascript error! Only THIS page cause this error! Any suggestion? Note that I usualy talk french so there's probably error and sorry for this! EDIT There's the 3 places were compilation stop. 1. Sys.WebForms.PageRequestManager._initialize('ctl00$ctl08', document.getElementById('aspnetForm')); 2. Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90); 3. Sys.Application.initialize();

    Read the article

  • How to enable/create elements on the fly

    - by Simon S
    Hi all I am using a combination of PHP, jQuery and Spry to serve a series of listboxes in which a user will select first the type of vehicle, then the make, then the model and finally the specific model. All my listboxes (SELECT) are working fine, and they update properly using the Spry elements. Each listbox is populated from a different Spry XML Dataset, and this is my problem. If I present all four listboxes to the user, the script has to go and fetch all four lots of XML to populate all four listboxes, taking several seconds. What I want to do is to create/enable the listboxes in order, so at the user selects from the first listbox, the second is created/enabled, when they select from the second, the third is created/enabled... and so on. Setting the disabled attribute is no good because the script has already fetched the XML before this is processed. Any ideas?? Si

    Read the article

  • Naming conventions for complex getters in Java

    - by Simon
    Hi there! I was reading this C# article about the usage of properties and methods. It points out why and when to use properties or methods. Properties are meant to be used like fields, meaning that properties should not be computationally complex or produce side effects I was asking myself how you could express this difference in Java, where you only use getters for the retrieval of data. What is your opinion?

    Read the article

  • How can fill a variable of my own created data type within Oracle PL/SQL?

    - by Frankie Simon
    In Oracle I've created a data type: TABLE of VARCHAR2(200) I want to have a variable of this type within a Stored Procedure (defined locally, not as an actual table in the DB) and fill it with data. Some online samples show how I'd use my type if it was filled and passed as a parameter to the stored procedure: SELECT column_value currVal FROM table(pMyPassedParameter) However what I want is to fill it during the PL/SQL code itself, with INSERT statements. Anyone knows the syntax of this?

    Read the article

  • Display Spry results in Jquery modal dialog

    - by Simon S
    I am using Spry to retrieve data from a SOAP webservice (received as XML). I want to display these results in modal Dialog using the jquery dialog plugin. I have an almost working solution, but the dialog shows the spry placeholders (i.e. the fieldnames surrounded by {}), not the actual retrieved data. Any ideas how I might achieve what I want?

    Read the article

  • Write permission for a specific folder in web.config

    - by Simon Dugré
    My question is preaty simple. Is there any way to give current user (IIS User, in this case, ASP NET USER) permission to write to a specific folder location (folder inside our web application) using web.config? Because, it's getting boring to ask to the web hoster to gain access to a specific folder each time we want to do a file uploader on a website. I know it's maybe preaty simple to find an answer using google, but it keeps returning me how to write INTO web.config instead of permission to write into web.config FOR a specific folder. In addition, I'm french so my english is not at the top.

    Read the article

  • Copy/Paste functionality in UITableViewController.

    - by Simon
    Hi.. I have a UITableViewController. I want to pop the copy/paste menu up when the user touches a cell. How to implement this functionality. Can someone help me. I tried this code, UIMenuController *theMenu = [UIMenuController sharedMenuController]; [theMenu setTargetRect:CGRectMake(10, 200, 100, 40) inView:[self tableView]]; [theMenu setMenuVisible:YES animated:YES]; But it doesn't work. My question is, What CGRect I have to pass as the setTargetRect parameter? Do I need to call SetNeedsDisplayInRect in my TableViewController? What else to do to make this work?

    Read the article

  • Focus-dependent text change for TextBoxes in WPF

    - by Simon
    Hey there. I'm writing an application in WPF using the MVVM-pattern and will really often use TextBoxes. I don't want to use labels for the user to know user what the text box is for, i.e. I don't want something like this: <TextBlock> Name: </TextBlock> <TextBox /> Instead, I would like the TextBox to contain its own label. Statically, you would express it like this: <TextBox>Name</TextBox> If the cursor is displayed in the textbox, i.e. the TextBox gains focus, I want the description text to disappear. If the TextBox is left empty and it loses the focus, the description text should be shown again. It's similar to the search textbox of StackOverflow or the one of Firefox. (please tell me if your not sure what I mean). One TextBox's label may change at runtime, dependending on e.g. a ComboBox's selected element or a value in my ViewModel. (It's like in Firefox's search TextBox, if you select google from the search engins' menu, the TextBox's label changes to "Google", if you select "Yahoo" its set to "Yahoo"). Thus I want to be able to bind the label's content. Consider that I may already have a Binding on the Text-Property of the TextBox. How can implement such a behaviour and make it reusable for any of my TextBox's? Code is welcome but not needed; a description of what to do is enough. Thank you in advance.

    Read the article

  • Connect two daemons in python

    - by Simon
    What is the best way to connect two daemons in Python? I have daemon A and B. I'd like to receive data generated by B in A's module (maybe bidirectional). Both daemons support plugins, so I'd like to shut communication in plugins. What's the best and cross-platform way to do that? I know few mechanisms from low-level solutions - shared memory (C/C++), linux pipe, sockets (TCP/UDP), etc. and few high-level - queue (JMS, Rabbit), RPC. Both daemons should run on the same host, but obviously better approach is to abstract from connection type. What are typical solutions/libraries in python? I'm looking for an elegant and lightweight solution. I don't need external server, just two processes talking with each other. What should I use in python to do that?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >