Search Results

Search found 3244 results on 130 pages for 'david fraser'.

Page 70/130 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • SVN Delete with wildcard?

    - by David Lively
    I'm migrating a VSS repository to SVN and inadvertently included all of the _vti_cnf, *.scc files in the first check-in. I'd like to remove these from SVN. (Not permanently, of course - just in the HEAD). The application in question is quite large, and finding and deleting these files on a folder-by-folder basis will take forever. Suggestions? There must be some obvious way to do this, but the proximity of the weekend is interfering with my higher brain functions.

    Read the article

  • Loop through XML::Simple structure

    - by David
    So I have some xml file like this: <?xml version="1.0" encoding="ISO-8859-1"?> <root result="0" > <settings user="anonymous" > <s n="blabla1" > <v>true</v> </s> <s n="blabla2" > <v>false</v> </s> <s n="blabla3" > <v>true</v> </s> </settings> </root> I want to go through all the settings using the XML Simple. Here's what I have when I print the output with Data::Dumper: $VAR1 = { 'settings' => { 'user' => 'anonymous', 's' => [ { 'n' => 'blabla1', 'v' => 'true' }, { 'n' => 'blabla2', 'v' => 'false' }, { 'n' => 'blabla3', 'v' => 'true' } ] }, 'result' => '0' }; And here's my code $xml = new XML::Simple; $data = $xml->XMLin($file); foreach $s (keys %{ $data->{'settings'}->{'s'} }) { print "TEST: $s $data->{'settings'}->{'s'}->[$s]->{'n'} $data->{'settings'}->{'s'}->[$s]->{'v'}<br>\n"; } And it returns these 2 lines, without looping: TEST: n blabla1 true TEST: v blabla1 true I also tried to do something like this: foreach $s (keys %{ $data->{'settings'}->{'s'} }) { Without any success: Type of arg 1 to keys must be hash (not array dereference) How can I procede? What am I doing wrong? Thanks a lot!

    Read the article

  • Tomcat Exception-Type Ignoring Specific Exception for More General

    - by David Marks
    For one type of exception, IOException, I want to display one page. For all other exceptions I have a default error page. In my web.xml I have things setup like this: java.io.IOException /queryException.jsp java.lang.Exception /error.jsp The problem is the error.jsp is the only page that ever shows, even if an IOException is thrown. The order the tags appear in doesn't matter; if I remove the java.lang.Exception tag though, I can get queryException to show for IOExceptions. What is the solution here? How can I keep a general error page for all exceptions EXCEPT for those with specific pages?

    Read the article

  • In Jetty, can NCSARequestLog be configured to auto-detect the time zone?

    - by David Moles
    It looks as though in 2003 or so NCSARequestLog would pick up the system time zone using TimeZone.getDefault().getID(), but in more recent versions it seems as though it's hard-coded to GMT, unless you override it in jetty.xml or programmatically. If true, this kind of annoying, since it means if you don't want GMT logging you have to edit jetty.xml for every installation (not to mention twice a year for daylight saving time). Is there a workaround that will let Jetty pick the time zone up from the system?

    Read the article

  • Subclassing UIScrollView for drawing w/o views

    - by David Dunham
    I'm contemplating subclassing UIScrollView (the way UITextView does) to draw a fairly large amount of text (formatted in ways that NSTextView can't). So far the view won't actually scroll. I'm setting contentSize, and when I drag, I see the scroll indicator. But nothing changes (and I don't get a drawRect: message). An alternate approach is to use a child view, and I've done this. The view can be over 5000 pixels high, however, and I'm a bit concerned about performance on an actual device. (The other approach, be like UITableView, would be a huge pain -- I'm "porting" Mac Cocoa code, and a collection of views would be a huge architecture change.) I've done some searching, but haven't found anyone who is using UIScrollView to do the drawing. Has anyone done this and know of any pitfalls?

    Read the article

  • ASP.NET MVC 2 - do UrlParameter.Optional entries have to be at the end of the route?

    - by David M
    I am migrating a site from ASP.NET MVC 1 to ASP.NET MVC 2. At the moment, the site supports the following routes: /{country}/{language}/{controller}/{action} /{country}/{controller}/{action} /{language}/{controller}/{action} /{controller}/{action} The formats for country and language are distinguishable by Regex and have suitable constraints. In MVC 1, I registered each of these as a separate route - for each of around 20 combinations. In MVC 2, I have been trying to get the same thing working with one route to cover all four cases, using UrlParameter.Optional, but I can't seem to get it working - if I define country and language as both optional, then the route /Home/Index for example doesn't successfully match the route. This is what I am trying to do: routes.MapRoute("Default", "{country}/{language}/{controller}/{action}", new { country = UrlParameter.Optional, language = UrlParameter.Optional, controller = "Home", action = "Index" }, new { country = COUNTRY_REGEX, language = LANGUAGE_REGEX }); Is this just impossible because my optionals are at the beginning of the route, or am I just missing something? I can't find any documentation to either tell me what I am doing is impossible or to point me in the right direction.

    Read the article

  • A JTAG emulator for use with a Hawkboard and OpenOCD?

    - by David Brown
    I'd like to try bare metal ARM programming with the Hawkboard, but the deployment process looks awful. I'm totally new to this, so I could be misunderstanding the instructions, but it appears that I have to use a program called AISgen to convert the binary file, then boot with u-Boot over UART and copy the AIS binary into memory. Not only is that a lot of stuff to do every time I make a change, it also doesn't give me the ability to debug with GDB. The best solution for this that I can find is JTAG. But the prices for these JTAG emulators look ridiculous. I'm not even sure which ones will work with the Hawkboard and which ones won't. So far, my best bet appears to be the Flyswatter, but the pin layout is different. Basically, I need something that's relatively cheap and works with the Hawkboard and OpenOCD. Any suggestions? Or is there another way I could do this, perhaps?

    Read the article

  • Python: win32console import problem

    - by David
    I want to run wexpect (the windows port of pexpect) on my Windows 7 64-bit machine. I am getting the following error: C:\Program Files (x86)\wexpect\build\libwexpect.py Traceback (most recent call last): File "C:\Program Files (x86)\wexpect\build\lib\wexpect.py", line 97, in raise ImportError(str(e) + "This package was intended for Windows like operating systems.") ImportError: No module named win32console This package requires the win32 python packages.This package was intended for Windows like operatin g systems. In the code it is failing on the following line: from win32console import * I am using Python 2.6.4. I cannot figure out how to install win32console.

    Read the article

  • Executing Line/Multiple Lines Only in mySQL Query Browser

    - by David Bonnici
    I already used Microsoft SQL Server 2005 and found really easy to execute single/multiple lines of an sql query. Example: insert into tablea ($vala, $valb, $valc) values ($vala, $valb, $valc); insert into tableb ($vala, $valb, $valc) values ($vala, $valb, $valc); How can I execute the second part only? In MSSQL i will highlight the second insert statment and press F5. How can do this in mySQL?

    Read the article

  • iphone menu navigation with buttons help requested

    - by David
    Hi, I'm trying to program an iphone app that will have several different (sub)apps. Ideally, I want to know how to make the main menu for this app look and behave like the iphone's own app menu, but I can't figure it out. If any one knows a package or library that does this, please let me know. Plan B is to mock one using UIButtons, and here is where I'm having problems. Basically, when I press a button that should push a new view, it calls the push method, but I still see the top view. in the app delegate, I have something like: AppViewController *viewController; App1ViewController *app1ViewController; UINavigationController *navController; and in didFinishLaunching method, something like: viewController = [ [ AppViewController alloc ] initWithAppDelegate: self ]; app1ViewController = [ [App1ViewController alloc ] initWithAppDelegate: self ]; navController = [ [ UINavigationController alloc ] initWithRootViewController:viewController]; [window addSubview:viewController.view]; and 2 methods -(void)app1{[ navController pushViewController: app1ViewController animated:YES ];} -(void)back{[ navController popViewControllerAnimated:YES ];} then I have 2 viewcontrollers in AppViewController.h @interface AppViewController : UIViewController { UINavigationController *navController; UIButton *appbtn1, *appbtn2, *appbtn3, *appbtn4; } -(id)initWithAppDelegate:(id)appDelegate; @end @interface App1ViewController : UIViewController { UITextView *textView; UINavigationController *navController; } -(id)initWithAppDelegate:(id)appDelegate; @end and define a loadView for each viewcontroller. However, when I press the app1 button and the app1 method gets called, it says the view hasa been pushed, but my view remains the buttons view, i.e. the root view. If I press the button again, it tells me I can't repush the app1view, the one I can't see. Any ideas? I can post the full code if that helps. Thank you for your time.

    Read the article

  • Programmatically Centering UIViews

    - by David Foster
    I've seen a bunch of similar questions to this, but nothing seems to be completely what I'm looking for. Do forgive me if I have missed the solution answered in another question, though! Right. I have a view. 160 pixels both tall and wide. I know that this view is going to be used as a subview, and I know that it always needs to be centered about both axis in whatever situation it's used. If defining the view programmatically, how can I be sure that it is always perfectly centered, horizontally and vertically, relative to its superview? So far, all I have is this simple code: - (void)loadView { self.view = [[UIView alloc] initWithFrame:CGRectMake(80, 150, 160, 160)]; self.view.backgroundColor = [UIColor greenColor]; self.view.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin); [self.view release]; } This does the centralization, but only in the simplest of cases. Any insight is greatly appreciated.

    Read the article

  • Twisted Python getPage

    - by David Dixon II
    I tried to get support on this but I am TOTALLY confused. Here's my code: from twisted.internet import reactor from twisted.web.client import getPage from twisted.web.error import Error from twisted.internet.defer import DeferredList from sys import argv class GrabPage: def __init__(self, page): self.page = page def start(self, *args): if args == (): # We apparently don't need authentication for this d1 = getPage(self.page) else: if len(args) == 2: # We have our login information d1 = getPage(self.page, headers={"Authorization": " ".join(args)}) else: raise Exception('Missing parameters') d1.addCallback(self.pageCallback) dl = DeferredList([d1]) d1.addErrback(self.errorHandler) dl.addCallback(self.listCallback) def errorHandler(self,result): # Bad thingy! pass def pageCallback(self, result): return result def listCallback(self, result): print result a = GrabPage('http://www.google.com') data = a.start() # Not the HTML I wish to get the HTML out which is given to pageCallback when start() is called. This has been a pita for me. Ty! And sorry for my sucky coding.

    Read the article

  • Convert C++Builder AnsiString to std::string via boost::lexical_cast

    - by David Klein
    For a school assignment I have to implement a project in C++ using Borland C++ Builder. As the VCL uses AnsiString for all GUI Components I have to convert all of my std::strings to AnsiString for the sake of displaying. std::string inp = "Hello world!"; AnsiString outp(inp.c_str()); works of course but is a bit tedious to write and code duplication I want to avoid. As we use Boost in other contexts I decided to provide some helper functions go get boost::lexical_cast to work with AnsiString. Here is my implementation so far: std::istream& operator>>(std::istream& istr, AnsiString& str) { istr.exceptions(std::ios::badbit | std::ios::failbit | std::ios::eofbit); std::string s; std::getline(istr,s); str = AnsiString(s.c_str()); return istr; } In the beginning I got Access Violation after Access Violation but since I added the .exceptions() stuff the picture gets clearer. When the conversion is performed I get the following Exception: ios_base::eofbit set [Runtime Error/std::ios_base::failure] Does anyone have an idea how to fix it and can explain why the error occurs? My C++ experience is very limited. The conversion routine the other way round would be: std::ostream& operator<<(std::ostream& ostr,const AnsiString& str) { ostr << (str.c_str()); return ostr; } Maybe someone will spot an error here too :) With best regards! Edit: At the moment I'm using the edited version of Jem, it works in the beginning. After a while of using the programm the Borland Codeguard mentions some pointer arithmetic in already freed regions. Any ideas how this could be related? The Codeguard log (I'm using the german version, translations marked with stars): ------------------------------------------ Fehler 00080. 0x104230 (r) (Thread 0x07A4): Zeigerarithmetik in freigegebenem Speicher: 0x0241A238-0x0241A258. **(pointer arithmetic in freed region)** | d:\program files\borland\bds\4.0\include\dinkumware\sstream Zeile 126: | { // not first growth, adjust pointers | _Seekhigh = _Seekhigh - _Mysb::eback() + _Ptr; |> _Mysb::setp(_Mysb::pbase() - _Mysb::eback() + _Ptr, | _Mysb::pptr() - _Mysb::eback() + _Ptr, _Ptr + _Newsize); | if (_Mystate & _Noread) Aufrufhierarchie: **(stack-trace)** 0x00411731(=FOSChampion.exe:0x01:010731) d:\program files\borland\bds\4.0\include\dinkumware\sstream#126 0x00411183(=FOSChampion.exe:0x01:010183) d:\program files\borland\bds\4.0\include\dinkumware\streambuf#465 0x0040933D(=FOSChampion.exe:0x01:00833D) d:\program files\borland\bds\4.0\include\dinkumware\streambuf#151 0x00405988(=FOSChampion.exe:0x01:004988) d:\program files\borland\bds\4.0\include\dinkumware\ostream#679 0x00405759(=FOSChampion.exe:0x01:004759) D:\Projekte\Schule\foschamp\src\Server\Ansistringkonverter.h#31 0x004080C9(=FOSChampion.exe:0x01:0070C9) D:\Projekte\Schule\foschamp\lib\boost_1_34_1\boost/lexical_cast.hpp#151 Objekt (0x0241A238) [Größe: 32 Byte] war erstellt mit new **(Object was created with new)** | d:\program files\borland\bds\4.0\include\dinkumware\xmemory Zeile 28: | _Ty _FARQ *_Allocate(_SIZT _Count, _Ty _FARQ *) | { // allocate storage for _Count elements of type _Ty |> return ((_Ty _FARQ *)::operator new(_Count * sizeof (_Ty))); | } | Aufrufhierarchie: **(stack-trace)** 0x0040ED90(=FOSChampion.exe:0x01:00DD90) d:\program files\borland\bds\4.0\include\dinkumware\xmemory#28 0x0040E194(=FOSChampion.exe:0x01:00D194) d:\program files\borland\bds\4.0\include\dinkumware\xmemory#143 0x004115CF(=FOSChampion.exe:0x01:0105CF) d:\program files\borland\bds\4.0\include\dinkumware\sstream#105 0x00411183(=FOSChampion.exe:0x01:010183) d:\program files\borland\bds\4.0\include\dinkumware\streambuf#465 0x0040933D(=FOSChampion.exe:0x01:00833D) d:\program files\borland\bds\4.0\include\dinkumware\streambuf#151 0x00405988(=FOSChampion.exe:0x01:004988) d:\program files\borland\bds\4.0\include\dinkumware\ostream#679 Objekt (0x0241A238) war Gelöscht mit delete **(Object was deleted with delete)** | d:\program files\borland\bds\4.0\include\dinkumware\xmemory Zeile 138: | void deallocate(pointer _Ptr, size_type) | { // deallocate object at _Ptr, ignore size |> ::operator delete(_Ptr); | } | Aufrufhierarchie: **(stack-trace)** 0x004044C6(=FOSChampion.exe:0x01:0034C6) d:\program files\borland\bds\4.0\include\dinkumware\xmemory#138 0x00411628(=FOSChampion.exe:0x01:010628) d:\program files\borland\bds\4.0\include\dinkumware\sstream#111 0x00411183(=FOSChampion.exe:0x01:010183) d:\program files\borland\bds\4.0\include\dinkumware\streambuf#465 0x0040933D(=FOSChampion.exe:0x01:00833D) d:\program files\borland\bds\4.0\include\dinkumware\streambuf#151 0x00405988(=FOSChampion.exe:0x01:004988) d:\program files\borland\bds\4.0\include\dinkumware\ostream#679 0x00405759(=FOSChampion.exe:0x01:004759) D:\Projekte\Schule\foschamp\src\Server\Ansistringkonverter.h#31 ------------------------------------------ Ansistringkonverter.h is the file with the posted operators and line 31 is: std::ostream& operator<<(std::ostream& ostr,const AnsiString& str) { ostr << (str.c_str()); **(31)** return ostr; } Thanks for your help :)

    Read the article

  • Lightweight development web server with support for PHP v2

    - by David
    In line with this question: http://stackoverflow.com/questions/171655/lightweight-web-app-server-for-php The above question has been asked numerous times and answered exactly the same in all the cases I've found using google. My question is similar to a degree but with a different desired goal: On demand development instances. I have come up with a somewhat questionable solution to host arbitrary directories in my user account for the purpose of development testing. I am not interested in custom vhosts but looking to emulate the behaviour I get when using paster or mongrel for Python & Ruby respectively. Ubuntu 9.10 TOXIC@~/ APACHE_RUN_USER=$USER APACHE_RUN_GROUP=www-data apache2 -d ~/Desktop/ -c "Listen 2990" Is there a better solution, could I do something similar with nginix or lighttpd? Note: The above won't work correctly for stock environments without a copied & altered httpd.conf. Update: The ideal goal is to mimic Paster, Webbrick, and Mongrel for rapid local development hosting. For those light weight servers, it takes less then a minute to get a working instance running ( not factoring any DB support ). Apache2 vhost is great but I've been using Apache2 for over ten years and it would be some sort of abomination hack to setup a new entry in /etc/hosts unless you have your own DNS, in which case a wildcard subdomain setup would probably work great. EXCEPT one more problem, it's pretty easy for me to know what is being hosted ( ex. by paster or mongeral ) just doing a sudo netstat -tulpn while there would be a good possibility of confusion in figure out which vhost is what.

    Read the article

  • SSL pages under ASP.NET MVC

    - by David Laing
    How do I go about using HTTPS for some of the pages in my ASP.NET MVC based site? Steve Sanderson has a pretty good tutorial on how to do this in a DRY way on Preview 4 at: http://blog.codeville.net/2008/08/05/adding-httpsssl-support-to-aspnet-mvc-routing/ Is there a better / updated way with Preview 5?,

    Read the article

  • Log4Net in App object?

    - by David Veeneman
    I am getting started with Logging in a WPF desktop app, using Log4Net as the logging component. Here is my question: In a simple desktop app, is there any reason not to instantiate my logger as a property ov the App class (App.xaml.cs), like this? public partial class App : Application { private static readonly ILog p_Logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public ILog Logger { get { return p_Logger; } } #endregion } } That would allow me to invoke the logger

    Read the article

  • Jquery AJAX and figuring out how NOT to nest callbacks for multiple reloads.

    - by David H
    I have a site with a few containers that need to load content dynamically via AJAX. Most of the links inside of the containers actually load new data in that same container. I.E: $("#navmenu_item1").click(function() { $("#navmenu").load(blah); }); When I click on a link, lets say "logout," and the menu reloads with the updated login status, none of the links now work because I would need to add a new .click into the callback code. Now with repeated clicks and AJAX requests I am not sure how to move forward from here, as I am sure nested callbacks are not optimal. What would be the best way to do this? Do I include the .click event inside the actual AJAX file being pulled from the server, instead of within index.php? Or can I somehow reload the DOM? Thanks for the help!

    Read the article

  • MVC view engine that can render classic ASP?

    - by David Lively
    I'm about to start integrating ASP.NET MVC into an existing 200k+ line classic ASP application. Rewriting the existing code (which runs an entire business, not just the public-facing website) is not an option. The existing ASP 3.0 pages are quite nicely structured (given what was available when this model was put into place nearly 15 years ago), like so: <!--#include virtual="/_lib/user.asp"--> <!--#include virtual="/_lib/db.asp"--> <!--#include virtual="/_lib/stats.asp"--> <!-- #include virtual="/_template/topbar.asp"--> <!-- #include virtual="/_template/lftbar.asp"--> <h1>page name</h1> <p>some content goes here</p> <p>some content goes here</p> <p>.....</p> <h2>Today's Top Forum Posts</h2> <%=forum_top_posts(1)%> <!--#include virtual="/_template/footer.asp"--> ... or somesuch. Some pages will include function and sub definitions, but for the most part these exist in include files. I'm wondering how difficult it would be to write an MVC view engine that could render classic ASP, preferably using the existing ASP.DLL. In that case, I could replace <!--#include virtual="/_lib/user.asp"--> with <%= Html.RenderPartial("lib/user"); %> as I gradually move existing pages from ASP to ASP.NET. Since the existing formatting and library includes are used very extensively, they must be maintained. I'd like to avoid having to maintain two separate versions. I know the ideal way to go about this would be to simply start a new app and say to hell with the ASP code, however, that simply ain't gonna happen. Ideas?

    Read the article

  • Hiding Table Rows

    - by David Stein
    I have a table that I'm using to show details from the line items of a quote. I want to hide a particular row depending on the value of the field in it. The expression I've tried is to set the row visibility to: =IIF(isnothing(First(Fields!NEW_PRICEBREAKS.Value, "QuoteDetail")),true,false) When I run the query from the dataset "Null" returns for NEW_PRICEBREAKS for most of the records. Also, when I expanded the row with another column with this expression: =IIF(isnothing(First(Fields!NEW_PRICEBREAKS.Value, "QuoteDetail")),"is nothing","not nothing") I see "not nothing" repeated over and over again. I've attempted to use TRIM inside of the isnothing to remove spaces and it still doesn't work. Also, the sql data type for NEW_PRICEBREAKS is nvarchar(MAX). Any ideas how I can suppress this row correctly?

    Read the article

  • Calling ADODB inside a function?

    - by David
    Hi, I'm wondering why when i put an sql ADODB query in side a function it produces the following error: Fatal error: Call to a member function Execute() on a non-object in -path to script- My function is something like: $dsn = 'mysql://user:pass@localhost/db'; $db = ADONewConnection($dsn); function getem($q){ $r=$db->Execute($q); return $r->RecordCount(); } echo getem("select * from table"); Any ideas how to fix that?

    Read the article

  • What is the life cycle of the XNA GraphicsDevice on the Xbox 360?

    - by David Brown
    I'm working on an XNA project that doesn't use the built-in Game class, mostly for learning purposes (so I can mess with different game loop types, etc). It's only designed for the Xbox 360, because the hardware is consistent and I don't have to worry about compatibility among different PC hardware configurations. So far, it's working well and I can clear the screen to a color, but I'd like to make sure I handle the GraphicsDevice correctly before moving on. What exactly is the life cycle for the GraphicsDevice on the Xbox 360? Is it ever lost or reset automatically? I know that on Windows, it's lost when the window loses focus, but the Xbox obviously doesn't manage focus. It appears to even keep the graphics device when the Guide pops up, which is the closest thing I can find to "losing focus" on the Xbox. I'd like to think it's simply a matter of "fire and forget," which would make a lot of other things much easier (only needing to load content once, for instance). But I want to make sure.

    Read the article

  • Telephone Number to Geolocation UK

    - by David Toy
    Is there a service that provides latitude and longitude for UK phone numbers? For example: Query: 0141 574 xxx, Returns: (55.8659829, -4.2602205) [Glasgow City Centre] Allow me to stress that I am not looking for a reverse-directory-enquires. I am more interested in 'local area' for things like weather by phone or "Where's my nearest Pizza Shop?" If this service doesn't exist your suggestions on how to implement it or where to get data from would also be incredibly useful. I am aware that Ofcom provides a list of area codes with a place name [1] suitable for geolocation, but I have my concerns about resolution. I see this as a particular problem in smaller towns and rural areas where an area code will cover a large geographical area. Second Example: Area Code: 01555, Ofcom: Lanark However: 01555 860xxx is Crossford (4 miles W of Lanark) 01555 77xxxx is Carluke (5 miles NW) 01555 89xxxx is Lesmahagow (5 miles SW) 01555 840xxx is Carnwath (7 miles NE) Therefore 01555 covers about ~80 sq miles. That's not particularly local. [1] Ofcom Area Code Tool: http://www.ofcom.org.uk/consumer/2009/09/telephone-area-codes-tool/

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >