Search Results

Search found 384 results on 16 pages for 'ross rogers'.

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

  • Iterating multple lists consecutively (C++)

    - by Graham Rogers
    I have 3 classes, 2 inheriting from the other like so: class A { public: virtual void foo() {cout << "I am A!" << endl;} }; class B : public A { public: void foo() {cout << "B pretending to be A." << endl} void onlyBFoo() {cout << "I am B!" << endl} }; class C : public A { public: void foo() {cout << "C pretending to be A." << endl} void onlyCFoo() {cout << "I am C!" << endl} }; What I want to do is something like this: list<A> list_of_A; list<B> list_of_B; list<C> list_of_C; //put three of each class in their respective list for (list<B>::iterator it = list_of_B.begin(); it != list_of_B.end(); ++it) { (*it).onlyBFoo(); } for (list<C>::iterator it = list_of_C.begin(); it != list_of_C.end(); ++it) { (*it).foo(); } //This part I am not sure about for (list<A>::iterator it = list_of_all.begin(); it != list_of_all.end(); ++it) { (*it).foo(); } To output: I am B! I am B! I am B! I am C! I am C! I am C! I am A! I am A! I am A! B pretending to be A. B pretending to be A. B pretending to be A. C pretending to be A. C pretending to be A. C pretending to be A. Basically, sometimes I want to only loop the Bs and Cs so that I can use their methods, but sometimes I want to loop all of them so that I can use the same method from each i.e. iterate the As, then the Bs, then the Cs all in one loop. I thought of creating a separate list (like the code above) containing everything, but it would create lots of unnecessary maintenance, as I will be adding and removing every object from 2 lists instead of one.

    Read the article

  • How do you determine how coarse or fine-grained a 'responsibility' should be when using the single r

    - by Mark Rogers
    In the SRP, a 'responsibility' is usually described as 'a reason to change', so that each class (or object?) should have only one reason someone should have to go in there and change it. But if you take this to the extreme fine-grain you could say that an object adding two numbers together is a responsibility and a possible reason to change. Therefore the object should contain no other logic, because it would produce another reason for change. I'm curious if there is anyone out there that has any strategies for 'scoping', the single-responsibility principle that's slightly less objective?

    Read the article

  • How do I get the sequence of numbers in a sorted-set that are between two integers in clojure?

    - by Greg Rogers
    Say I have a sorted-set of integers, xs, and I want to retrieve all the integers in xs that are [x, y), ie. between x and y. I can do: (select #(and (>= % x) (< % y)) xs) But this is inefficient - O(n) when it could be O(log n), I expect the number of elements returned to be small. Using take-while and drop-while would let me exit once I've reached y, but I still can't jump to x efficiently. I am just learning clojure so here is how I would do it in C++: set<int>::iterator first = xs.lower_bound(x); set<int>::iterator last = xs.lower_bound(y); for (; first != last; ++first) // do something with *first Can I do this in clojure?

    Read the article

  • How do I write a regex that ignores strings starting with a particular prefix, and captures everythi

    - by Mark Rogers
    Background: I'm trying to come up with a regex for a rewrite rule that will take anything that does not start with a particular prefix, and add that prefix to it. But urls that already have the prefix should be rejected by the regular expression (because they already have the url). Example: If the prefix is s1 a string like home will capture the home part. But a string like s1/home, will not capture anything. This way I can add the capture group onto the prefix, so that 'home' will become 's1/home'. I've tried (^s1/), but I'm missing something here, because that rejected 'home' for some reason.

    Read the article

  • Unable to `submit()` an html form after intercepting the submit with javascript.

    - by Ross Rogers
    I'm trying to intercept the submission of a form in order to change the value of my keywords label. I have the following code: <HTML> <FORM name="searchForm" method="get" action="tmp.html" > <input type="label" name="keywords" /> <input type="button" name="submit" value="submit" onclick="formIntercept();"/> </FORM> <SCRIPT language="JavaScript"> document.searchForm.keywords.focus(); function formIntercept( ) { var f = document.forms['searchForm']; f.keywords.value = 'boo'; f.submit(); }; </SCRIPT> </HTML> When I run this in chrome and click the submit button the keywords label changes to boo, but the javascript console says: Uncaught TypeError: Property 'submit' of object <#an HtmlFormElement> is not a function. How can I submit the form with the manipulated keywords?

    Read the article

  • How do I call an upside down jQuery.slideDown()?

    - by Mark Rogers
    In the web app I'm working on I want to do a little slide up notification, like on twitter or your desktop. jQuery's .slideDown does exactly what I want, but it's upside down. The .slideUp doesn't execute an upside down version of slideDown. Instead it hides stuff, like after your cleaning up an old message you've displayed with slideDown. So what's the simplest code to do an upside down slideDown() in jQuery?

    Read the article

  • PHP - How do i display the first 20 li then have a link to display more (gallery)

    - by Matt Rogers
    I want to display about 20 li on a page with a link at the bottom that says something like 'display more'. This link will then clear the first 20 and display the next 20. How should i go about doing this. (I am creating a gallery) I was thinking about using PHP and MySQL. However for what I am doing I do not really need to store it in a database so is there an easier way of doing it only using html, php or javascript? thanks

    Read the article

  • Du tells me it can't find the current directory?

    - by C. Ross
    I'm on AIX, and in some directories I can't use the du command. I get the follow error message: du: 0653-175 Cannot find the current directory. Obviously the current directory exists, and I have permissions to it. I can list the directory and create files in it, both before and after I ran du. What could possibly be wrong here? The du command works just fine in my home directory. A quick google search turns up a bunch of forum posts of the same problem, but no clear answers.

    Read the article

  • dedicated server - cgi-sys/defaultwebpage.cgi redirect when accessing via server IP

    - by Ross
    This isn't so much of a problem, but would like to know why this happens. we have a dedicated server running WHM. If I access the server via its IP address directly I am automatically redirected to http://xx.xxx.xx.xxx/cgi-sys/defaultwebpage.cgi I know how to edit this page (this isnt the problem) I'm just curious why I get redirected to this .cgi page, rather than simply remain @ xx.xxx.xx.xxx/ and view my default "landing page", if you like. What setting could I change so that if anyone visits my server IP, they do not get redirected to xx.xxx.xx.xxx/cgi-sys/defaultwebpage.cgi For instance if you visit 173.194.37.104 (google), you view the google home page, but URL remains the same. Hope this makes sense. thanks

    Read the article

  • Clients not updating with approved updates from WSUS

    - by Ross
    Hi All, I've been a bit behind in my windows XP updates recently, and I have about 18 or so I need to roll out to all our users, according to WSUS. I'm trying it on a couple of test PCs, and so far i've had no luck. On each one, one update would install (and need a reboot), and nothing else since. When I run wuauclt.exe /detectnow, I get this in the windowsupdate.log: 2009-10-29 17:27:10:624 1128 93c AU Triggering AU detection through DetectNow API 2009-10-29 17:27:10:624 1128 93c AU Triggering Online detection (non-interactive) 2009-10-29 17:27:10:624 1128 504 AU ############# 2009-10-29 17:27:10:624 1128 504 AU ## START ## AU: Search for updates 2009-10-29 17:27:10:624 1128 504 AU ######### 2009-10-29 17:27:10:624 1128 504 AU <<## SUBMITTED ## AU: Search for updates [CallId = {59353978-CBA7-4B0B-AFD3-515577D3C16B}] 2009-10-29 17:27:10:624 1128 a14 Agent ************* 2009-10-29 17:27:10:624 1128 a14 Agent ** START ** Agent: Finding updates [CallerId = AutomaticUpdates] 2009-10-29 17:27:10:624 1128 a14 Agent ********* 2009-10-29 17:27:10:624 1128 a14 Agent * Online = Yes; Ignore download priority = No 2009-10-29 17:27:10:624 1128 a14 Agent * Criteria = "IsHidden=0 and IsInstalled=0 and DeploymentAction='Installation' and IsAssigned=1 or IsHidden=0 and IsPresent=1 and DeploymentAction='Uninstallation' and IsAssigned=1 or IsHidden=0 and IsInstalled=1 and DeploymentAction='Installation' and IsAssigned=1 and RebootRequired=1 or IsHidden=0 and IsInstalled=0 and DeploymentAction='Uninstallation' and IsAssigned=1 and RebootRequired=1" 2009-10-29 17:27:10:624 1128 a14 Agent * ServiceID = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7} 2009-10-29 17:27:10:624 1128 a14 Misc Validating signature for C:\WINDOWS\SoftwareDistribution\SelfUpdate\Default\wuident.cab: 2009-10-29 17:27:10:655 1128 a14 Misc Microsoft signed: Yes 2009-10-29 17:27:10:702 1128 a14 Misc Validating signature for C:\WINDOWS\SoftwareDistribution\SelfUpdate\Default\wuident.cab: 2009-10-29 17:27:10:702 1128 a14 Misc Microsoft signed: Yes 2009-10-29 17:27:10:780 1128 a14 Misc Validating signature for C:\WINDOWS\SoftwareDistribution\SelfUpdate\Default\wsus3setup.cab: 2009-10-29 17:27:10:780 1128 a14 Misc Microsoft signed: Yes 2009-10-29 17:27:10:796 1128 a14 Setup *********** Setup: Checking whether self-update is required *********** 2009-10-29 17:27:10:796 1128 a14 Setup * Inf file: C:\WINDOWS\SoftwareDistribution\SelfUpdate\Default\wsus3setup.inf 2009-10-29 17:27:10:796 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\cdm.dll: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:796 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuapi.dll: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:796 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuapi.dll.mui: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:796 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuauclt.exe: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuaucpl.cpl: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuaucpl.cpl.mui: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuaueng.dll: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuaueng.dll.mui: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wucltui.dll: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wucltui.dll.mui: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wups.dll: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wups2.dll: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup Update NOT required for C:\WINDOWS\system32\wuweb.dll: target version = 7.1.6001.65, required version = 7.1.6001.65 2009-10-29 17:27:10:874 1128 a14 Setup * IsUpdateRequired = No 2009-10-29 17:27:17:468 1128 a14 PT +++++++++++ PT: Synchronizing server updates +++++++++++ 2009-10-29 17:27:17:468 1128 a14 PT + ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, Server URL = hxxp://dublindc2/ClientWebService/client.asmx 2009-10-29 17:27:55:157 1128 a14 Agent * Found 0 updates and 46 categories in search; evaluated appl. rules of 478 out of 678 deployed entities 2009-10-29 17:27:55:173 1128 a14 Agent ********* 2009-10-29 17:27:55:173 1128 a14 Agent ** END ** Agent: Finding updates [CallerId = AutomaticUpdates] 2009-10-29 17:27:55:173 1128 a14 Agent ************* 2009-10-29 17:27:55:189 1128 f1c AU >>## RESUMED ## AU: Search for updates [CallId = {59353978-CBA7-4B0B-AFD3-515577D3C16B}] 2009-10-29 17:27:55:189 1128 f1c AU # 0 updates detected 2009-10-29 17:27:55:189 1128 f1c AU ######### 2009-10-29 17:27:55:189 1128 f1c AU ## END ## AU: Search for updates [CallId = {59353978-CBA7-4B0B-AFD3-515577D3C16B}] 2009-10-29 17:27:55:189 1128 f1c AU ############# 2009-10-29 17:27:55:189 1128 f1c AU AU setting next detection timeout to 2009-10-29 21:01:30 2009-10-29 17:27:55:189 1128 f1c AU Setting AU scheduled install time to 2009-10-30 13:00:00 2009-10-29 17:27:55:251 1128 a14 Report Uploading 2 events using cached cookie, reporting URL = hxxp://dublindc2/ReportingWebService/ReportingWebService.asmx 2009-10-29 17:27:55:267 1128 a14 Report Reporter successfully uploaded 2 events. 2009-10-29 17:28:00:173 1128 a14 Report REPORT EVENT: {BD891590-784B-4001-8116-D83962DAB749} 2009-10-29 17:27:55:173-0000 1 147 101 {00000000-0000-0000-0000-000000000000} 0 0 AutomaticUpdates Success Software Synchronization Windows Update Client successfully detected 0 updates. 2009-10-29 17:28:00:173 1128 a14 Report REPORT EVENT: {E578C377-5E09-4F4C-AB28-FE5131E2D6A7} 2009-10-29 17:27:55:173-0000 1 I've tried deleting everything in the C:\Windows\SoftwareDistribution, stopping the services, rebooting etc. Can anyone decipher the log to see where it's going wrong? Many thanks!

    Read the article

  • Blocking yandex.ru bot

    - by Ross
    I want to block all request from yandex.ru search bot. It is very traffic intensive (2GB/day). I first blocked one C class IP range, but it seems this bot appear from different IP ranges. For example: spider31.yandex.ru - 77.88.26.27 spider79.yandex.ru - 95.108.155.251 etc.. I can put some deny in robots.txt but not sure if it respect this. I am thinking of blocking a list of IP ranges. Can somebody suggest some general solution.

    Read the article

  • Lotus Notes 8.5.3 "Unable To Invoke Program"

    - by Ross Doughty
    Just got a little issue with some of my users today, when trying to open an email attachment in Lotus Notes, they get the error Unable To Invoke Program. Now, they can always just save the attachment and then open it through windows explorer, which is fine, but I would rather get a proper solution for this. Knowing almost nothing about Lotus Notes does not help me I know but I think it may have something to do with the default file association, however my colleague tells me that Notes uses the windows file associations, which are working. Any ideas anyone?

    Read the article

  • apache2: bad user name www-data

    - by Robert Ross
    Starting web server apache2 apache2: bad user name www-data I just tried restarting my webserver because of an update I did to my php.ini and originally I was getting something about the PID file being overwritten. Now I just get this: * Starting web server apache2 apache2: bad user name www-data this has NEVER happened before, and I haven't changed and permissions or apache2 configuration files. What gives?

    Read the article

  • Set JENKINS_HOME in Tomcat7?

    - by C. Ross
    I'm trying to set up Jenkins in Tomcat7 on Ubuntu. I installed Tomcat7 and deployed jenkins.war, and I now see the Jenkins home page at http://myhost:8080/jenkins, but it's attempting to create the Jenkins directory at /usr/share/tomcat7/.jenkins, which it can't for security reasons. I've already created /srv/jenkins and given the tomcat7 group permissions, and want to set JENKINS_HOME to that path. I've tried adding it to the tomcat configuration in /etc/tomcat7/server.xml: <GlobalNamingResources> <Environment name="JENKINS_HOME" value="/srv/jenkins" type="java.lang.String" override="false"/> <!-- Default settings --> And I've also tried adding it to the automatically created context file in ROOT/META-INF/context.xml (there is no $CATALINA_HOME/conf as far as I can tell). <Context path="/" antiResourceLocking="false" > <Environment name="JENKINS_HOME" value="/srv/jenkins/" type="java.lang.String"/> </Context> But even after restarting tomcat7 I still get the same result (trying to use /usr/share/tomcat7/.jenkins). Where do I need to set the environment variable for JENKINS_HOME in Tomcat7?

    Read the article

  • dedicated server - cgi-sys/defaultwebpage.cgi redirect when accessing via server IP

    - by Ross
    Hi This isn't so much of a problem, but would like to know why this happens. we have a dedicated server running WHM. If I access the server via its IP address directly I am automatically redirected to http://xx.xxx.xx.xxx/cgi-sys/defaultwebpage.cgi I know how to edit this page (this isnt the problem) I'm just curious why I get redirected to this .cgi page, rather than simply remain @ xx.xxx.xx.xxx/ and view my default "landing page", if you like. What setting could I change so that if anyone visits my server IP, they do not get redirected to xx.xxx.xx.xxx/cgi-sys/defaultwebpage.cgi For instance if you visit 173.194.37.104 (google), you view the google home page, but URL remains the same. Hope this makes sense. thanks

    Read the article

  • Route forwarded traffic through eth0 but local traffic through tun0

    - by Ross Patterson
    I have a Ubuntu 12.04/Zentyal 2.3 server configured with WAN NATed on eth0, local interfaces eth1 and wlan0 bridged on br1 on which DHCP runs, and an OpenVPN connection on tun0. I only need the VPN for some things running on the gateway itself and I need to make sure that everything running on the gateway goes through the VPNs tun0. root:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gw... 0.0.0.0 UG 100 0 0 eth0 link-local * 255.255.0.0 U 1000 0 0 br1 192.168.1.0 * 255.255.255.0 U 0 0 0 br1 A.B.C.0 * 255.255.255.0 U 0 0 0 eth0 root:~# ip route 169.254.0.0/16 dev br1 scope link metric 1000 192.168.1.0/24 dev br1 proto kernel scope link src 192.168.1.1 A.B.C.0/24 dev eth0 proto kernel scope link src A.B.C.186 root:~# ip route show table main 169.254.0.0/16 dev br1 scope link metric 1000 192.168.1.0/24 dev br1 proto kernel scope link src 192.168.1.1 A.B.C.0/24 dev eth0 proto kernel scope link src A.B.C.D root:~# ip route show table default default via A.B.C.1 dev eth0 How can I configure routing (or otherwise) such that all forwarded traffic for other hosts on the LAN goes through eth0 but all traffic for the gateway itself goes through the VPN on tun0? Also, since the OpenVPN client changes routing on startup/shutdown, how can I make sure that everything running on the gateway itself loses all network access if the VPN goes down and never goes out eth0.

    Read the article

  • Error message: do not have authority to access this function

    - by Ross
    Hi. I just reinstalled Windows on my computer after getting a virus. I worked with it for a while and everything worked as it should. I then used a backup of the computer that I had made a week or so earlier and copied the backup over my user folder. (That is, I took the folder named "Joe" from the backup drive and copied-replaced the whole thing over the folder named "Joe" on the new Windows install.) To do this I had to work from an Ubuntu live CD because some of the files were in use. Now the problem: After I did this copying my computer says that I have no authority. Anytime I try to access anything that is part of the operating system (Explorer, Personalize, Control Panel, etc) I get an error message that says I don't have the authority to do this. I am able to access things that aren't part of the OS: Chrome, Firefox, my accounting software, Rockbox, but nothing that is part of the OS. I only copied over the User file, so I didn't mess with the registry or anything, so I have no idea why this should be. Does anyone out in cyberspace have any idea? Thank you.

    Read the article

  • Zoneminder camera permanently idle

    - by C. Ross
    I have an Ubuntu server with zoneminder installed. I only have one camera (cheap Logitech USB model) and it seems to be permanently idle. I'm also getting this error repeatedly in the logs 06/06/2010 08:26:56.563783 zmwatch[28234].INF [Restarting capture daemon for main_room, shared memory not valid] 06/06/2010 08:26:56.812964 zmwatch[28234].INF ['zmc -d /dev/video0' starting at 10/06/06 08:26:56, pid = 29214] 06/06/2010 08:27:06.814486 zmwatch[28234].INF [Restarting capture daemon for main_room, shared memory not valid] 06/06/2010 08:27:07.054854 zmwatch[28234].INF ['zmc -d /dev/video0' starting at 10/06/06 08:27:07, pid = 29219] I've already tried following the instructions in the FAQ for increasing shared memory, but that doesn't seem to work. What do I need to do to get this working?

    Read the article

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