Search Results

Search found 3181 results on 128 pages for 'david stratton'.

Page 9/128 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • typeid , dynamic casting (upcast) and templates

    - by David
    Hello, I have few questions regarding dynamic casting , typeid() and templates 1) How come typeid does not require RTTI ? 2) dynamic_cast on polymorphic type: When I do downcast (Base to Derive) with RTTI - compilation passes When RTTI is off - I get a warning (warning C4541: 'dynamic_cast' used on polymorphic type 'CBase' with /GR-; unpredictable behavior may result) When I do upcast (Derive to Base), with or without RTTI - compilation passes smoothly What I don't understand is why when I do upcast and RTTI is off - I don't get any warning/error! 3) dynamic_cast on NON polymorphic type: When I do downcast with or without RTTI - compilation fails (error C2683: 'dynamic_cast' : 'CBase' is not a polymorphic type) BUT When I do upcast with or without RTTI - compilation passes smoothly. How come on upcast on NON polymorphic type passes w/o RTTI ? 4) Does 'inline' in front of a template function has any effect, i.e. when the compiler compiles the function and see it is 'inline' it will actually treat the function as inline or it is ignored? Thank you very much for the assistance David

    Read the article

  • problem showing pictures stored outside web root folder

    - by David
    On a website users can upload pictures. For security reasons these are stored outside the webroot (public_html) folder. When I need to display the picture, I send the headers and have "readfile" read and output the picture data, like so: header("Pragma: public"); header("Expires: 0"); // set expiration time header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header('Content-type: image/jpg'); header('Content-Length: ' . $filesize); readfile($path_url . '/' . $photo); This works great, but the site is growing and this is starting to be a burden on the server. Question: is there a way to send the picture or picture data to the user, without the server first having to load the picture (obviously with the picture still being stored outside the webroot folder)? Thanks! David

    Read the article

  • Conditional configuration in maven pom.xml

    - by David Zhao
    I'd like to ONLY exclude certain files in maven-war-plugin when property "skipCompress" set to true, I thought I could do something like this, but it doesn't work for me. BTW, I can't use profile to achieve this even I want to use skipCompress to turn on and off the compression in both development and deployment profiles. <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <if> <not> <equals arg1="${skipCompress}" arg2 = "true"/> </not> <then> <warSourceExcludes>**/external/dojo/**/*.js</warSourceExcludes> </then> </if> </configuration> </plugin> Thanks, David

    Read the article

  • C# File.ReadAllLines not breaking on line feeds

    - by David Dickerson
    Hello, I have an application that I am building that needs to modify a configuration file. My problem is that I am not able to read the file in line by line. I keep geeting the the entire file as a single string. string ConfigTemplate = AEBuildsSPFolderName + "\Template_BuildReleaseScript.Config"; string[] fileSourceLines = File.ReadAllLines(ConfigTemplate, Encoding.Default); --Returns the entire file contents into the first array element. using (StreamReader reader = new StreamReader(ConfigTemplate)) { string line; while ((line = reader.ReadLine()) != null) --Returns the entire file contents into the first line read. Any idea of what I am doing wrong? Thanks, david

    Read the article

  • How to measure the time HTTP requests spend sitting in the accept-queue?

    - by David Jones
    I am using Apache2 on Ubuntu 9.10, and I am trying to tune my configuration for a web application to reduce latency of responses to HTTP requests. During a moderately heavy load on my small server, there are 24 apache2 processes handling requests. Additional requests get queued. Using "netstat", I see 24 connections are ESTABLISHED and 125 connections are TIME_WAIT. I am trying to figure out if that is considered a reasonable backlog. Most requests get serviced in a fraction of a second, so I am assuming requests move through the accept-queue fairly quickly, probably within 1 or 2 seconds, but I would like to be more certain. Can anyone recommend an easy way to measure the time an HTTP request sits in the accept-queue? The suggestions I have come across so far seem to start the clock after the apache2 worker accepts the connection. I'm trying to quantify the accept-queue delay before that. thanks in advance, David Jones

    Read the article

  • JavaScript - How to change a dom node back to an existing Google Map?

    - by David Robertson
    I set a div to a class which shows a spinning animated when the map is loading some data, the question is, how can I set the div back to the map (I don't want to load a new map, but load the existing one, which is assigned to a var 'map')? //map is assigned originally like this: map = new google.maps.Map(document.getElementById('map3'),options); //animated graphic is assigned to map div on load of data: document.getElementById('map3').className = "loading"; but how to get the map back? Thanks for any tips! David

    Read the article

  • help with inline images/mail with cron - php?

    - by David Verhulst
    I've got mailings that need to be sended using cron. When I load the script manualy all works fine. With cron i get broken images. to change the src of my img i used: $body = eregi_replace("managersrc_logo","images/managers/acertainlogo.jpg",$body); Because i thaught that it is importent to use absolute paths i also tried: $body = eregi_replace("managersrc_logo","http://www.site.com/images/managers/acertainlogo.jpg",$body); In that case i even do not see the images when i run the cronscript manualy. Nor the automated cron will display me the images. When i check the source of the mail that is received i always see "cid:encryptedstuff" even if i use absolute paths? Why is that? I just want my absolute paths being printed in the src attribute of the img tag. Who changes my absolute path to cid: ? is it php, phpmailer or outlook itself? Any help someone?.... David

    Read the article

  • MySQL LOAD DATA LOCAL INFILE example in python?

    - by David Perron
    I am looking for a syntax definition, example, sample code, wiki, etc. for executing a LOAD DATA LOCAL INFILE command from python. I believe I can use mysqlimport as well if that is available, so any feedback (and code snippet) on which is the better route, is welcome. A Google search is not turning up much in the way of current info The goal in either case is the same: Automate loading hundreds of files with a known naming convention & date structure, into a single MySQL table. David

    Read the article

  • IntelliSense has forgotten my code snippets!

    - by David
    Hi all I have a stack of code snippets imported into Visual Studio. Just recently, they have stopped displaying in Intellisense. If the keyboard shortcut doesn't bring up anything else on IntelliSense, then I can tab and the code snippet is inserted just fine. However, if the keyboard shortcut for the snippet happens to also bring up other items in IntelliSense, tabbing will select the first of those items, so I actually can't use the code snippet at all! Does anyone have any ideas why IntelliSense would be unable to list my code snippet shortcuts? I started using ReSharper recently, but that wouldn't be the problem surely?! Thanks for your help David

    Read the article

  • Select dynamic string has a different value when referenced in Where clause

    - by David
    I dynamically select a string built using another string. So, if string1='David Banner', then MyDynamicString should be 'DBanne' Select ... , Left( left((select top 1 strval from dbo.SPLIT(string1,' ')) //first word ,1) //first character + (select top 1 strval from dbo.SPLIT(string1,' ') //second word where strval not in (select top 1 strval from dbo.SPLIT(string1,' '))) ,6) //1st character of 1st word, followed by up to 5 characters of second word [MyDynamicString] ,... From table1 Join table2 on table1pkey=table2fkey Where MyDynamicString <> table2.someotherfield I know table2.someotherfield is not equal to the dynamic string. However, when I replace MyDynamicString in the Where clause with the full left(left(etc.. function, it works as expected. Can I not reference this string later in the query? Do I have to build it using the left(left(etc.. function each time in the where clause?

    Read the article

  • "The breakpoint will not currently be hit. The source code is different from the original version."

    - by David
    Hi everyone I'm really hoping someone can help me out with this one. When debugging in Visual Studio, sometimes I add a breakpoint but it's hollow and VS says "The breakpoint will not currently be hit. The source code is different from the original version." Obviously this prevents me being able to debug. What on earth does the message mean? What original version? If I've just opened up the solution and not made any changes whatsoever to the code, how can there be an 'original version'? The appearance of this problem just seems totally arbitrary. It's just Visual Studio going 'Na na na na na, I'm not going to debug for you today'. Can anyone give any advice? Ta David

    Read the article

  • T-SQL - how to get around the order by restriction in CTEs

    - by David
    Hi all I have the following CTE. Its purpose is to provide unique Month/Year pairs. Later code will use the CTE to produce a concatenated string list of the Month/Year pairs. ;WITH tblStoredWillsInPeriod AS ( SELECT DISTINCT Kctc.GetMonthAndYearString(DateWillReceived) Month FROM Kctc.StoredWills WHERE DateWillReceived BETWEEN '2010/01/01' AND '2010/03/31' ORDER BY DateWillReceived ) I have omitted the implmementation of the GetMonthAndYearString function as it is trivial. Sadly, it seems T-SQL is always one step ahead. When I run this code, it tells me I'm not allowed to use ORDER BY in a CTE unless I also use TOP (or FOR XML, whatever that is.) If I use TOP, it tells me I can't use it with DISTINCT. Yup, T-SQL has all the answers. Can anyone think of a solution to this problem which is quicker than simply slashing my wrists? I understand that death from blood loss can be surprisingly lingering, and I have deadlines to meet. Thanks for your help. David

    Read the article

  • Multiple NSURLDownloads with Progress

    - by David Schiefer
    Hello, I'm trying to build a small app which allows downloading of multiple files at the same time while displaying them in a custom NSTableView. This works, i've done this by using an NSEnumerator, but I struggle at getting the progress right. It's calculated correctly, but it's not done individually for every download, instead they're added up. The way I've tried to set the subtitles containing the progress is by loading them into a separate array and then inserting/replacing objects containing the progress, but here I run into another problem - I don't know how to get the index of the object that's being downloaded, so I can't differentiate between the progresses. I hope you understand what I mean :P I've uploaded the source code to my server, I'd be really grateful if someone could have a look and help me out: http://web.me.com/david.schiefer/MyController.m

    Read the article

  • C#: Put member variables into a list.

    - by David
    Hi all Assuming I have a method which accepts an IList or similar thing as a parameter: public void JiggleMyList(IList<string> list)... Is there an easy way that I can pass in string members of a list of objects? I mean, if for example, I have a list of Person objects which expose a string property called FullName, is there a quick way to stuff the FullNames of all the Person objects into the method parameter, or do I have to create a new List and iterate through the Person objects: List<string> fullNames = new List<string>; foreach (Person person in people) { fullNames.Add(person.FullName); } JiggleMyList(fullNames); I come across this all the time, and it would be nice if there was a shortcut. Many thanks David

    Read the article

  • Full Width Divs using ScrollTo.js

    - by David Haigh
    This is my first ever post. I am using the ScrollTo jQuery plugin and i have stumbled across a problem... I have 6 rows, each with 6 child divs , I would like each of these child divs to be full width. The plugin works great but I cannot seem to get the child div to be full width (then use ScrollTo to 'slide' to the next div, or to a div on the next row. ) Here is my code: http://jsfiddle.net/RZjrV/ Is it even possible? I have set body - Overflow:hidden to avoid any initial confusion. Thank you all who read this post and even take a minute to think about it. David

    Read the article

  • GET syntax in xpath

    - by David Doria
    I am trying to use a parameter that I pass to the page in an xpath query. This works properly (hard coded): <?php $xml = simplexml_load_file("bookstore.xml"); $res = $xml->xpath("/bookstore/book[title = 'Everyday Italian']"); echo $res[0]->author ?> but I pass the parameter with: bookdetails.php?title="Everyday Italian" and then do: <?php $xml = simplexml_load_file("bookstore.xml"); $res = $xml->xpath("/bookstore/book[title = $_GET['title']]"); echo $res[0]->author ?> I get a 500 error. Any thoughts? Thanks, David

    Read the article

  • Showing the ProgressDialog while opening the Website

    - by david
    I have to open a website say Facebook page, twitter page and You Tube page in order to share my post there. Now when I click to the item Facebook , it gets redirected to FB to share and same for Twitter and YouTube. I have to show them in my WebView and all this is done perfectly. What I want is to show the Progress Dialog after clicking on the Item till it gets redirected to the FB , Twitter or YouTube. I don know how to show the Progress Bar for redirecting to the Main Website. Can anyone Please help me put Here. Thanks, David Brown

    Read the article

  • C#: Hook up all events from object in single statement.

    - by David
    In my domain layer all domain objects emit events (of type InvalidDomainObjectEventHandler) to indicate invalid state when the IsValid property is called. On an aspx codebehind, I have to manually wire up the events for the domain object like this: _purchaseOrder.AmountIsNull += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); _purchaseOrder.NoReason += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); _purchaseOrder.NoSupplier += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); _purchaseOrder.BothNewAndExistingSupplier += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); Note that the same method is called in each case since the InvalidDomainobjectEventArgs class contains the message to display. Is there any way I can write a single statement to wire up all events of type InvalidDomainObjectEventHandler in one go? Thanks David

    Read the article

  • Pushing a variable onto a vector, value at that point in vector changes when the variable does.

    - by David Andrews
    I have a programming problem =) std::vector<char*> Names; if(MyPacket.ID == 3) {Names.push_back(MyPacket.Buffer);} I push the recieved buffer onto a vector like so, but when the buffer changes so does the value of the variable at that point in the vector. So say I sent and pushed a buffer containing 'Simon' onto the vector that would be fine so at point [0] on the vector would be the word Simon. but then when I recieve a new buffer it overwrites position [0] even though the packets ID is different, a breakpoint within the if statement is not reached with this new buffer. I really hope i'm explaining this well enough, I tried asking a friends advice and he pointed me towards this site. Any help appreciated David Andrews

    Read the article

  • python lxml problem

    - by David ???
    I'm trying to print/save a certain element's HTML from a web-page. I've retrieved the requested element's XPath from firebug. All I wish is to save this element to a file. I don't seem to succeed in doing so. (tried the XPath with and without a /text() at the end) I would appreciate any help, or past experience. 10x, David import urllib2,StringIO from lxml import etree url='http://www.tutiempo.net/en/Climate/Londres_Heathrow_Airport/12-2009/37720.htm' seite = urllib2.urlopen(url) html = seite.read() seite.close() parser = etree.HTMLParser() tree = etree.parse(StringIO.StringIO(html), parser) xpath = "/html/body/table/tbody/tr/td[2]/div/table/tbody/tr[6]/td/table/tbody/tr/td[3]/table/tbody/tr[3]/td/table/tbody/tr/td/table/tbody/tr/td/table/tbody/text()" elem = tree.xpath(xpath) print elem[0].strip().encode("utf-8")

    Read the article

  • Summing the results of Case queries in SQL

    - by David Stelfox
    I think this is a relatively straightforward question but I have spent the afternoon looking for an answer and cannot yet find it. So... I have a view with a country column and a number column. I want to make any number less than 10 'other' and then sum the 'other's into one value. For example, AR 10 AT 7 AU 11 BB 2 BE 23 BY 1 CL 2 I used CASE as follows: select country = case when number < 10 then 'Other' else country end, number from ... This replaces the countries values with less than 10 in the number column to other but I can't work out how to sum them. I want to end up with a table/view which looks like this: AR 10 AU 11 BE 23 Other 12 Any help is greatly appreciated. Cheers, David

    Read the article

  • Configuring Cisco 877W router from scratch for DHCP, WiFi, ADSL2+, NAT

    - by David M Williams
    Hi all, I apologise if this is a BIG question but I am quite lost with the Cisco IOS. I know what I want to achieve just not how to do it :( I have a Cisco 877W router with 4 FastEthernet interfaces, 1 ATM interface and 1 802.11 Radio. I want to set it up for a small network and am trying to construct a configuration below. I was using Google to try and flesh it out but I think I need help and guidance from actual experts! If it helps, output from show ver says Cisco IOS software, C870 software (C870-ADVSECURITYK9-M), version 12.4(4)T7, release software (fc1) ROM: System bootstrap, version 12.3(8r)YI4, release software Here's what I have so far, which hopefully outlines clearly enough what I am wanting to do. The bits in angle brackets are placeholders (eg the secret password). ! ! Set router hostname ! hostname Shazam ! ! Set usernames and passwords ! username david privilege 15 secret 0 <PASSWORD> enable secret <SECRETPASSWORD> ! ! Configure SSH and telnet access ! line vty 0 4 privilege level 15 login local transport input telnet ssh ! ! Local logging ! logging buffered 51200 warning ! ! Set date and time for NSW, Australia (GMT +10h) ! ! ! Set router IP address to 192.168.1.1 on FastEthernet0 port ! interface FastEthernet0 ip address 192.168.1.1 255.255.255.0 no shut ip nat inside ! ! Forward any unknown DNS requests to Google ! ip dns server ip name-server 8.8.8.8 ip name-server 8.8.4.4 ! ! Set up DHCP ! DHCP pool covers 192.168.1.100 - .199 ! Set gateway and DNS server to be the router, ie 192.168.1.1 ! service dhcp ip routing ip dhcp excluded-address 192.168.1.1 192.168.1.99 ip dhcp excluded-address 192.168.1.200 192.168.1.255 ip dhcp pool <DHCPPOOLNAME> network 192.168.1.0 255.255.255.0 default-router 192.168.1.1 dns-server 192.168.1.1 lease 7 ! ! DHCP reservations ! ! Assign IP address 192.168.1.105 to MAC address 00-21-5D-2F-58-04 ! ! Configure ADSL2 connection details ! interface atm dsl operating-mode adsl2+ ! ! Set up NAT rules ! ! Forward port 35394 to 192.168.1.105 ! ! Set up WiFi ! ! SSID visible, WPA2 security, Pre-shared key I'm hoping most of this is boiler-plate stuff to you guys. I'm keen to not just get a working script but to actually understand it also. Unfortunately, I'm finding the Cisco reference material online very complex. Thank you!

    Read the article

  • Retrive unchanged data

    - by cnkt
    How can i get the Doctrine_Record's unchanged version of field data. For example; echo $user->username; // Prints 'David' $user->username = 'John'; echo $user->username; // Prints 'John' How to get the pre-changed value (David)?

    Read the article

  • Mysql: how to extract multiple text files from my mysql table

    - by Patrick
    hi, I need to extract data from my mysql database into multiple text files. I have a table with 4 columns: UserID, UserName, Tag, Score. I need to create a text file for each Tag, with the userID, the userName and score (ordered by score) i.e. Tag1.txt 234922 John 35 234294 David 205 392423 Patrick 21 Tag2.txt 234922 John 35 234294 David 205 392423 Patrick 21 and so on... Edited: Sample: http://dl.dropbox.com/u/72686/expertsTable.png thanks

    Read the article

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