Search Results

Search found 295 results on 12 pages for 'roger lipscombe'.

Page 8/12 | < Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >

  • SCM/VCS: Tracking directories

    - by Roger Pate
    When I first found out that Mercurial tracked files and not directories, I was a bit disappointed. (This means you can't represent an empty directory in the repo.) However, it doesn't seem to be an issue in practice, and makes some things a tad easier for me. How about other SCM systems? (Edit this post to add them.) What advantages or disadvantages have you found by not tracking directories? (Each one separately in an answer, please.) Do track directories: Subversion Bazaar/bzr (add one!) Do NOT track directories: Mercurial/hg git (add one!)

    Read the article

  • jquery ui autocomplete problem

    - by Roger
    Hi, i've got a select box containing countries, and when one is selected, i want my autocomplete data for the city field to load via ajax. here's my code: // Sets up the autocompleter depending on the currently // selected country $(document).ready(function() { var cache = getCities(); $('#registration_city_id').autocomplete( { source: cache } ); cache = getCities(); // update the cache array when a different country is selected $("#registration_country_id").change(function() { cache = getCities(); }); }); /** * Gets the cities associated with the currently selected country */ function getCities() { var cityId = $("#registration_country_id :selected").attr('value'); return $.getJSON("/ajax/cities/" + cityId + ".html"); } This returns the following json: ["Aberdare","Aberdeen","Aberystwyth","Abingdon","Accrington","Airdrie","Aldershot","Alfreton","Alloa","Altrincham","Amersham","Andover","Antrim","Arbroath","Ardrossan","Arnold","Ashford","Ashington","Ashton-under-Lyne","Atherton","Aylesbury","Ayr",... ] But, it doesn't work. When i start typing in the city box, the style changes so the autocompleter is doing something, but it won't display this data. If i hard-code the above it works. Can anyone see what's wrong? Thanks

    Read the article

  • How to show / hide all tags with the same class with Java Script?

    - by Roger
    I need a javascrit function that shows/hides all span tags with a specific class (t1, t2 or t3) in a HTML document. Example: <script type="text/javascript"> <!-- function sh(t){//show_hide(text number class) //??? } //--> </script> <div id='C'> <p> <span class="P"> Normal allways visible text. <span class="t1">Text 1</span> <span class="t2">Text 2</span> <span class="t3">Text 3</span> Normal allways visible text. <span> </p> <p> <span class="P"> Normal allways visible text. <span class="t1">Text 1</span> <span class="t2">Text 2</span> <span class="t3">Text 3</span> Normal (allways visible text. <span> </p> <p><span>Normal allways visible text.</span></p> </div> The function sh (show hide) could be trigerred like this: <p>Show: <a href="#" onclick="sh('t1');">text 1</a> | <a href="#" onclick="sh(t2);">text 2</a> | <a href="#" onclick="sh(t3);">text 3</a></p> An important detail is that when the span class t1 is visible, all other span class t2 and t3 are hidden. The default is to have all span class t1 visible at the first load. Till now, the only solution I found was this one (a bit too complicated though). Thanks a lot. The folks are using these links to help visualize the effect of the code: http://jsfiddle.net/v3vWM/ http://jsfiddle.net/tEUYC/ http://jsfiddle.net/RpVUN/

    Read the article

  • SmartGWT alternatives

    - by Roger
    I have been using SmartGWT but have run into trouble mixing SmartGWT with other frameworks such as Wicket. Infact it has been a bit of a disaster and I regret going with it in the first place. I do not want this question to turn into any type of flame war, so therefore would just like people to list alternatives and their experience with those alternatives.

    Read the article

  • Buildr, Gradle or wait for Maven 3?

    - by Sten Roger
    I am really tired of struggling with Maven 2 all the time. Build tools should not be in the way. Recently I have been looking at Buildr and Gradle. Maven 3 seems to fix some of the struggles. So, what should I go for now? Buildr? Gradle? Or wait a year for Maven 3?

    Read the article

  • PHP Explode with an Unicode character as separator

    - by Young Roger
    XPDFs pdftotext converts pdf to text and outputs it at command line level. If needed it inserts PageBreaks between the pages as specified in TextOutputDev.cc: eopLen = uMap->mapUnicode(0x0c, eop, sizeof(eop)); This Unicode symbol is encoding independent, -enc ASCII7 wouldn't change it. I'm currently willing to use PHP for converting and splitting the PDF file into several TXT pages for database storage. However, the following function does work, but takes twice as long as a conversion of the whole book in one time. for($i = 1; $i <= $pages[0]; $i++) $page[$i] = shell_exec('/usr/bin/pdftotext sample.pdf -f '.$i.' -l '.$i.' -'); How am I supposed to explode(0x0c, $wholePDF) with an Unicode character as separator? Currently, page[$i] doesn't seem to retrieve those weird Unicode PageBreak characters from the shell_exec(). I tried several headers for encoding (UTF-8 especially) but it didn't work out so far.

    Read the article

  • Jquery star rating plugin and cancel rating button

    - by Roger
    Using this plugin: http://www.fyneworks.com/jquery/star-rating/#tab-Testing I have a simple callback function that picks up the id from the radio buttons: <input type="radio" class="auto-submit-star {split:2}" id="myid" value="1" /> $('.auto-submit-star').rating({ callback: function(value, link){ alert($(this).attr('id')); } }); This works fine, but if the user clicks on the cancel button, then it can't read the id of it. In the js, I think the cancel button is added dynamically with: control.cancel = $('<div class="rating-cancel"><a title="' + control.cancel + '">' + control.cancelValue + '</a></div>') If I add an id to it like this: control.cancel = $('<div class="rating-cancel"><a id="someid" title="' + control.cancel + '">' + control.cancelValue + '</a></div>') How could I read the id? This would be undefined. I can set a class and use $('.myclass').attr('id') but I will have multiple ratings on one page so I'll need something similar to "this". Or is it possible for the cancel button to pick up the id of the corresponding radio buttons?

    Read the article

  • Persisting details in Master Detail relation EF4 POCO

    - by Roger Alsing
    Scenario: Entity Framework 4 , POCO templates and Master Detail relation. Lets say I have a master type like this: //partial implementation of master entity partial class Master { public void AddDetail(x,y,z) { var detail = new Detail() { X = x, Y = y, Z = z, }; //add the detail to the master this.Details.Add(detail); } } If I then add a master instance to my context and commit, the details will not be saved: var masterObject = new Master(); masterObject.AddDetail(1,2,3); myContext.MasterSet.AddObject(masterObject); Is there any way to make the details to be persisted by reachabillity when using POCO templates? Or any other way? the Details collection in the Master entity is a FixUpCollection, so it ought to track the changes IMO. So, any ideas how to make this work W/O killing the POCO'ness too much?

    Read the article

  • Microsoft Flight Simulator SDK Capabilities

    - by Roger
    Hello, I have not been able to find detailed documentation about the Microsoft Flight Simulator SDK, so I have a couple of questions regarding its capabilities. I am currently running FS2004(could buy FSX if needed) and would like to know if I could add moving or static boats through the SDK. Ideally, the boat's position would be controlled by an external program at runtime. Secondly, can i access the flight management system through the SDK? I would like to upload a custom flight path through an external program while the plane is flying. So why the plane would follow the original flight path I would like to be able to change it on the go. Thanks

    Read the article

  • Why is shrink_to_fit non-binding?

    - by Roger Pate
    The C++0x FCD states in 23.3.6.2 vector capacity: void shrink_to_fit(); Remarks: shrink_to_fit is a non-binding request to reduce capacity() to size(). [Note: The request is non-binding to allow latitude for implementation-specific optimizations. —end note] Why is it non-binding, and what optimizations are intended to be allowed?

    Read the article

  • F# pattern matching

    - by Roger Alsing
    What would be the most effective way to express the following code? match cond.EvalBool() with | true -> match body.Eval() with | :? ControlFlowModifier as e -> match e with | Break(scope) -> e :> obj //Break is a DU element of ControlFlowModifier | _ -> next() //other members of CFM should call next() | _ -> next() | false -> null cond.EvalBool returns a boolean result where false should return null and true should either run the entire block again (its wrapped in a func called next) or if the special value of break is found, then the loop should exit and return the break value. Is there any way to compress that block of code to something smaller?

    Read the article

  • php soapclient responds as 'null' but xml response is ok using __getLastResponse

    - by Roger S
    I'm looking for help with a php soapclient call: The call is to a remote panel and I want to pull off the log data. There are various services published via the WSDL and I am able to use several with no issues. Here's the list: array(12) { [0]=> string(77) "GetGPTimerChannelsResponse GetGPTimerChannels(GetGPTimerChannels $parameters)" [1]=> string(74) "GetGPTimerChannelResponse GetGPTimerChannel(GetGPTimerChannel $parameters)" [2]=> string(74) "SetGPTimerChannelResponse SetGPTimerChannel(SetGPTimerChannel $parameters)" [3]=> string(47) "GetSlaveResponse GetSlave(GetSlave $parameters)" [4]=> string(71) "GetLogDataInlineResponse GetLogDataInline(GetLogDataInline $parameters)" [5]=> string(71) "GetLogItemInlineResponse GetLogItemInline(GetLogItemInline $parameters)" [6]=> string(59) "GetAlarmListResponse GetAlarmList(GetAlarmList $parameters)" [7]=> string(50) "GetSyslogResponse GetSyslog(GetSyslog $parameters)" [8]=> string(47) "SetSlaveResponse SetSlave(SetSlave $parameters)" [9]=> string(53) "GetVersionResponse GetVersion(GetVersion $parameters)" [10]=> string(53) "GetTDBInfoResponse GetTDBInfo(GetTDBInfo $parameters)" [11]=> string(53) "GetLogItemResponse GetLogItem(GetLogItem $parameters)" } I am trying to use the GetLogDataInline service which requires four parameters - these I'm passing as an array and all seems OK when doing the connection (the request/response takes around 30 seconds to process). When I look at a var_dump / print_r of the result, it returns NULL, whereas when I do a call to the __getLastResponse all of the data I need to populate my local database is there. Below is the code for the soapclient call: $client = new soapclient ("http://192.168.1.126/cgi-bin/cgi.cgi?WSDL", array("trace" => 1, "exceptions" => true, "cache_wsdl" => WSDL_CACHE_NONE, "features" => SOAP_SINGLE_ELEMENT_ARRAYS )); $params = array ( "ResponseType" => "Xml", "Step" => 15, "Start" => "2012-06-14T12:00:00+01:00", "End" => "2012-06-14T23:59:45+01:00" ); $result = $client -> GetLogDataInline ($params); An extract from the var_dump / __getLastResponse is: var_dump($client) object(SoapClient)#1 (4) { ["trace"]= int(1) ["_features"]= int(1) ["_soap_version"]= int(1) ["sdl"]= resource(4) of type (Unknown) } var_dump($result) NULL __getLastResponse 15 2012-06-14T12:00:00+01:00 2012-06-14T23:59:45+01:00 External Temperature Workshop Lux Level Electricity Pulse 100wh Workshop PIR Active Boiler Flow Temp Outside Lux Workshop_Light_Override_Hours Water Consumption (Litres) Electricity kWh Consumption Water Consumption M3 Gas kWh Consumption Outside Lighting Heating Effective Setpoint Router Reset Workshop Lighting State Heating Run Hours Heating On Receptin Percent RH Reception Temp Reception RH Reception Temp 2012-06-14T12:00:00+01:00 -85.6 2.1 -1.0 Off -91.5 13.8 0.0 -1.0 0.0 0.0 -0.1 Off 21.0 Off Off 0.0 Off 53.0 22.0 53.0 22.0 2012-06-14T12:00:15+01:00 -85.4 2.1 -1.0 Off -91.8 13.8 0.0 -1.0 0.0 0.0 -0.1 Off 21.0 Off Off 0.0 Off 53.0 22.0 53.0 22.0 2012-06-14T12:00:30+01:00 -85.4 2.1 -1.0 Off -91.8 13.8 0.0 -1.0 0.0 0.0 -0.1 Off 21.0 Off Off 0.0 Off 53.0 22.0 53.0 22.0 2012-06-14T12:00:45+01:00 -85.4 2.1 -1.0 Off -91.5 13.7 0.0 -1.0 0.0 0.0 -0.1 Off 21.0 Off Off 0.0 Off 54.0 22.0 54.0 22.0 (this should be xml but doesn't appear to have copied correctly) If you've got this far, thanks for taking the time. Any help would be much appreciated.

    Read the article

  • Idiom vs. pattern

    - by Roger Pate
    In the context of programming, how do idioms differ from patterns? I use the terms interchangeably and normally follow the most popular way I've heard something called, or the way it was called most recently in the current conversation, e.g. "the copy-swap idiom" and "singleton pattern". The best difference I can come up with is code which is meant to be copied almost literally is more often called pattern while code meant to be taken less literally is more often called idiom, but such isn't even always true. This doesn't seem to be more than a stylistic or buzzword difference. Does that match your perception of how the terms are used? Is there a semantic difference?

    Read the article

  • Render action return View(); form problem

    - by Roger Rogers
    I'm new to MVC, so please bear with me. :-) I've got a strongly typed "Story" View. This View (story) can have Comments. I've created two Views (not partials) for my Comments controller "ListStoryComments" and "CreateStoryComment", which do what their names imply. These Views are included in the Story View using RenderAction, e.g.: <!-- List comments --> <h2>All Comments</h2> <% Html.RenderAction("ListStoryComments", "Comments", new { id = Model.Story.Id }); %> <!-- Create new comment --> <% Html.RenderAction("CreateStoryComment", "Comments", new { id = Model.Story.Id }); %> (I pass in the Story id in order to list related comments). All works as I hoped, except, when I post a new comment using the form, it returns the current (parent) View, but the Comments form field is still showing the last content I typed in and the ListStoryComments View isn’t updated to show the new story. Basically, the page is being loaded from cache, as if I had pressed the browser’s back button. If I press f5 it will try to repost the form. If I reload the page manually (reenter the URL in the browser's address bar), and then press f5, I will see my new content and the empty form field, which is my desired result. For completeness, my CreateStoryComment action looks like this: [HttpPost] public ActionResult CreateStoryComment([Bind(Exclude = "Id, Timestamp, ByUserId, ForUserId")]Comment commentToCreate) { try { commentToCreate.ByUserId = userGuid; commentToCreate.ForUserId = userGuid; commentToCreate.StoryId = 2; // hard-coded for testing _repository.CreateComment(commentToCreate); return View(); } catch { return View(); } }

    Read the article

  • C# Help with a basic pedagogic example of a BackGroundWorker process populating a DataGridView

    - by Roger
    Scenario: I have a windows form that holds a DataGridWiew with 3 pre-defined columns. I have 3 variables declared outside the function and assigned to inside the function. I have a function that enumerates stuff and puts it in the 3 columns, line by line: string VARIABLE1; string VARIABLE2; string VARIABLE3; private void FunctionEnumerateStuff() { foreach (StuffObject STUFF in StuffCollection) { VARIABLE1 = STUFF.SubStuff1.ToString(); VARIABLE2 = STUFF.SubStuff2.ToString(); VARIABLE3 = STUFF.SubStuff3.ToString(); DatagridWiew1.Rows.Add(VALUE1, VALUE2, VALUE3); } } What I want to do, is to execute this function from a BackGroundWorker process, so that the GUI of the application will be smooth and responsive. I have read up on backgroundworkers but I am having trouble relating, because all examples seems to be of entirely different scenarios and most of them are overwelmingly complex. San some helpful pedagogic soul help me and others with a very basic example of how to get this to work in the simplest way possible. Thanks.

    Read the article

  • Should I replace string patterns in asp.net mvc using a custom viewengine?

    - by Roger Rogers
    Have an ASP.NET MVC site that is localized. The localization functionality adds the two digit language ID to the URL, e.g. /es/Page. If no language Id is found in the URL, the site switches to the user's browser culture. All's good. However, the site's hyperlinks, a mixture of hard-coded href tags, actionlinks, etc., don't include the base language ID, so when clicking through the site the set culture is lost, and the site reverts to the user's browser culture. My (lazy) thought is to replace all href values, that don't point to an external site, with the localized URL (e.g. include the /es/). Otherwise, all site links will need to be updated to include the culture code. Is this just plain dumb? Or, reasonable, and should be done using a custom view engine, or some other approach?

    Read the article

  • Parallel scroll textarea and webpage with jquery

    - by Roger Rogers
    This is both a conceptual and how-to question: In wiki formatting, or non WYSIWYG editor scenarios, you typically have a textarea for content entry and then an ancillary preview pane to show results, just like StackOverflow. This works fairly well, except with larger amounts of text, such as full page wikis, etc. I have a concept that I'd like critical feedback/advice on: Envision a two pane layout, with the preview content on the left side, taking up ~ 2/3 of the page, and the textarea on the right side, taking up ~ 1/3 of the page. The textarea would float, to remain in view, even if the user scrolls the browser window. Furthermore, if the user scrolls the textarea content, supposing it has exceeded the textarea's frame size, the page would scroll so that the content presently showing in the textarea syncs/is parallel with the content showing in the browser window. I'm imagining a wiki scenario, where going back and forth between markup and preview is frustrating. I'm curious what others think; is there anything out there like this? Any suggestions on how to attack this functionality (ideally using jquery)? Thanks

    Read the article

  • Getting the median of 3 values using scheme's

    - by kristian Roger
    The problem this time is to get the median of three values (easy) I did this: (define (med x y z) (car(cdr(x y z))) and it was accepted but when testing it: (med 3 4 5) I get this error: Error: attempt to call a non-procedure (2 3 4) And when entering letters instead of number i get: (md x y z) Error: undefined varia y (package user) Using something besides x y z I get: (md d l m) Error: undefined variable d (package user) the question was deleted dont know how anyway write a function that return the median of 3 values Sorry for editing the question I got that I should put the values in order first not just a sill car and cdr thing so I did so 33> (define (med x y z) (if(and( (<x y) (<y z) y if(and( (<y x) (<x z) x z))))) Warning: invalid expression (if (and< (<x y) (<y z) y if (and ((<y x) (<x z) x z)))) but as u see Im getting a warning so what is wronge ?

    Read the article

  • Dispelling the UIImage imageNamed: FUD

    - by Roger Nolan
    I see a lot of people saying imageNamed is bad but equal numbers of people saying the performance is good - especially when rendering UITableViews. See this SO question for example or this article on iPhoneDeveloperTips.com UIImage's imageNamed method used to leak so it was best avoided but has been fixed in recent releases. I'd like to understand the caching algorithm better in order to make a reasoned decision about where I can trust the system to cache my images and where I need to go the extra mile and do it myself. My current basic understanding is that it's a simple NSMutableDictionary of UIImages referenced by filename. It gets bigger and when memory runs out it gets a lot smaller. For example, does anyone know for sure that the image cache behind imageNamed does not respond to didReceiveMemoryWarning? It seems unlikely that Apple would not do this. If you have any insight into the caching algorithm, please post it here.

    Read the article

  • Immutable Dictionary overhead?

    - by Roger Alsing
    When using immutable dictionaries in F# , how much overhead is there when adding / removing entries? Will it treat entire buckets as immutable and clone those and only recreate the bucket whos item has changed? Even if that is the case, it seems like there is alot of copying that needs to be done in order to create the new dictionary(?)

    Read the article

  • allocing an object based on a string name

    - by Roger Gilbrat
    Is there a way in objective-c/Cocoa to alloc an object when the class name isn't know until run-time. I seem to remember something about this a while ago, but can't find anything on it now. Something like: [[@"MyClass" alloc] init]; I seem to recall a function that would return some kind of class id based on a string that can then be used to alloc the object.

    Read the article

  • Implementing "Generator" support in a custom language

    - by Roger Alsing
    I've got a bit of fettish for language design and I'm currently playing around with my own hobby language. (http://rogeralsing.com/2010/04/14/playing-with-plastic/) One thing that really makes my mind bleed is "generators" and the "yield" keyword. I know C# uses AST transformation to transform enumerator methods into statemachines. But how does it work in other languages? Is there any way to get generator support in a language w/o AST transformation? e.g. Does languages like Python or Ruby resort to AST transformations to solve this to? (The question is how generators are implemented under the hood in different languages, not how to write a generator in one of them)

    Read the article

  • CUDA: When to use shared memory and when to rely on L1 caching?

    - by Roger Dahl
    After Compute Capability 2.0 (Fermi) was released, I've wondered if there are any use cases left for shared memory. That is, when is it better to use shared memory than just let L1 perform its magic in the background? Is shared memory simply there to let algorithms designed for CC < 2.0 run efficiently without modifications? To collaborate via shared memory, threads in a block write to shared memory and synchronize with __syncthreads(). Why not simply write to global memory (through L1), and synchronize with __threadfence_block()? The latter option should be easier to implement since it doesn't have to relate to two different locations of values, and it should be faster because there is no explicit copying from global to shared memory. Since the data gets cached in L1, threads don't have to wait for data to actually make it all the way out to global memory. With shared memory, one is guaranteed that a value that was put there remains there throughout the duration of the block. This is as opposed to values in L1, which get evicted if they are not used often enough. Are there any cases where it's better too cache such rarely used data in shared memory than to let the L1 manage them based on the usage pattern that the algorithm actually has?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12  | Next Page >