Daily Archives

Articles indexed Thursday May 20 2010

Page 30/120 | < Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >

  • Inheriting and static members

    - by Bruce
    Here is my code - #include <iostream> #include <conio.h> using namespace std; class Base { public: int a; }; //int Base::a = 5; class Derived : public Base { public: int static a; }; int main() { Derived d; cout<<d.a; getch(); return 0; } I get a linker error here. But when I do it the other way round - class Base { public: int static a; }; int Base::a = 5; class Derived : public Base { public: int a; }; I get no error. Can someone please explain what is happening here.

    Read the article

  • Working by group by for grouping data into string format

    - by Shantanu Gupta
    I have a table that contains some data given below. It uses a tree like structure i.e. Department SubD1, SubD2 ..... PreSubD1, PreSubD1... PreSubD2, PreSubD2... pk_map_id preferences ImmediateParent Department_Id -------------------- -------------------- -------------------- -------------------- 20 14 5 1 21 15 5 1 22 16 6 1 23 9 4 2 24 4 3 2 25 24 20 2 26 25 20 2 27 23 13 2 I want to group my records on behalf of department then immediate parent then preferences each seperated by ',' i.e. department Immediate Parent preferences 1 5,6 14,15,16 2 4,3,20,13 9,4,24,25,23 and this table also Immediate parent preferences 5 14,15 6 16 4 9 3 4 20 24,25 13 13 In actual scenario all these are my ids which are to be replaced by their string fields. I am using sql server 2k5

    Read the article

  • How to add django-db-log models to admin panel?

    - by Enchantner
    Just installed django-db-log module and trying to make it work properly. 'python manage.py syncdb' command created databases, it seems like logging works, but there is nothing about it in admin panel. As I found in documentation, it should add itself in admin panel without any additional configuration, but then I added 'djangodblog.middleware.DBLogMiddleware' in MIDDLEWARE_CLASSES and 'djangodblog' in INSTALLED_APPS it looks like nothing happens. What I'm doing wrong?

    Read the article

  • Countdown timer in asp.net

    - by Zerotoinfinite
    Hi Experts, I am using asp.net 3.5 with C#. I want to create a countdown timer and my requirement is like this: Countdown end date: June 16 2010 So, till June 16 comes my timer will show the remeaning time. Please let me know how to achieve it, I google it but i didn't get the excat solution to my problem. Thanks in advance.

    Read the article

  • Try::Tiny-Question

    - by sid_com
    Why doesn't the subroutine with try/catch give me the same results as the eval-version does. #!/usr/bin/env perl use warnings; use strict; use 5.012; use Try::Tiny; sub shell_command_1 { my $command = shift; my $timeout_alarm = shift; my @array; eval { local $SIG{ALRM} = sub { die "timeout '$command'\n" }; alarm $timeout_alarm; @array = qx( $command ); alarm 0; }; die $@ if $@ && $@ ne "timeout '$command'\n"; warn $@ if $@ && $@ eq "timeout '$command'\n"; return @array; } shell_command_1( 'sleep 4', 3 ); say "Test_1"; sub shell_command_2 { my $command = shift; my $timeout_alarm = shift; my @array; try { local $SIG{ALRM} = sub { die "timeout '$command'\n" }; alarm $timeout_alarm; @array = qx( $command ); alarm 0; } catch { die $_ if $_ ne "timeout '$command'\n"; warn $_ if $_ eq "timeout '$command'\n"; } return @array; } shell_command_2( 'sleep 4', 3 ); say "Test_2"

    Read the article

  • Filtering coluns in SQL Server replication - how?

    - by truthseeker
    Hi, I need to replicate some data from two tables in one database to another databases. I used snapshot replication. The issue is that I would like to replicate only some selected columns and the others should stay with untouched data. I don't want to loose their data. The sours of those columns is other system. So I need to replicate only data from my columns. Do anybody know how to achieve this?

    Read the article

  • emacs23 pops up debugger way too frequently

    - by werner r.
    Since I've upgraded to Ubuntu lucid and emacs23, Emacs pops up the debugger in situations, where emacs22 does not. For example, when hitting C-c C-c in org-mode, emacs22 simply states can do nothing useful at this location, whereas in emacs23 the debugger shows up. Debugger entered--Lisp error: (error "C-c C-c can do nothing useful at this location") signal(error ("C-c C-c can do nothing useful at this location")) error("C-c C-c can do nothing useful at this location") org-ctrl-c-ctrl-c(nil) call-interactively(org-ctrl-c-ctrl-c nil nil) That only illustrates the pattern -- the behavior is not limited to org-mode. Occurring every 3 minutes, it really annoys me. How can I prevent it? I've already tried to stop this using debug-on-error and stack-trace-on-error: it didn't work.

    Read the article

  • How do you do a foursquare style uitableview refresh?

    - by nickthedude
    If you haven't seen their implementation Of the refresh of a tableview it is extremely slick. I was surprised to see no search results asking for this to be explained so I figured ask it myself. If you haven't seen it, it basically adds a subviews to the uitableview above the header to the blank part of the screen when you pull a uitableview view down farther than it has data to display. Sorry if that doesn't make sense but just download the app and you will immediately want to do it too. Just wondering how they did it?

    Read the article

  • How to format and where to put the SPF TXT record?

    - by YellowSquirrel
    EDIT I think I more or less understand the syntax and, anyway, Google is giving, in the link below, the syntax needed. My question is really where to put that stuff. Should I quote every field? The whole line? :) I've set up Google apps for my domain: I've registered the domain with Google by adding the CNAME Google asked and I've apparently succesfully setup the MX Google mail servers. So far I haven't yet a dedicated server: I'm just having a domain at a registrar. Now I want to activate SPF and I'm confused. In the following short webpage: http://www.google.com/support/a/bin/answer.py?answer=178723 it is written that I must add a TXT record containing: v=spf1 include:_spf.google.com ~all Where should I enter this? Should this go in the zone (?) file, like I did for the CNAME and the MX records? So far I have something like this: @ 10800 IN A 217.42.42.42 @ 10800 IN MX 5 ASPMX3.GOOGLEMAIL.COM. @ 10800 IN MX 5 ASPMX2.GOOGLEMAIL.COM. @ 10800 IN MX 3 ALT2.ASPMX.L.GOOGLE.COM. @ 10800 IN MX 3 ALT1.ASPMX.L.GOOGLE.COM. @ 10800 IN MX 1 ASPMX.L.GOOGLE.COM. google8a70835987f31e34 10800 IN CNAME google.com. Does adding the SPF TXT record mean I should literally have something like that: @ 10800 IN A 217.42.42.42 @ 10800 IN MX 5 ASPMX3.GOOGLEMAIL.COM. @ 10800 IN MX 5 ASPMX2.GOOGLEMAIL.COM. @ 3600 IN TXT "v=spf1 include:_spf.google.com ~all" @ 10800 IN MX 3 ALT2.ASPMX.L.GOOGLE.COM. @ 10800 IN MX 3 ALT1.ASPMX.L.GOOGLE.COM. @ 10800 IN MX 1 ASPMX.L.GOOGLE.COM. google8a70835987f31e34 10800 IN CNAME google.com. I made that one up and included right in the middle to show how confused I am. What I'd like to know is the exact syntax and where/how I should put this TXT record.

    Read the article

  • Reliable backup software for windows network/samba shares.

    - by Eli
    Hi All, I have a Win2003 server that works as a pdc for a number of XP boxes, and a couple related FreeBSD boxes. I need to back up roaming profiles, non-roaming profiles via network shares, local hard drive data, and files on the FreeBSD boxes via samba shares. I have tried Genie Backup Manager and Backup4All pro, and both have excellent features, but both also begin to fail disastrously with more than a few days use. Mostly, the errors seem to have been from the backup catalog getting out of synch with itself. Whatever it is, there is no excuse for a backup software that says it backed up files when it really didn't, or the log saying it backed up exactly the same file 10,000 times in a single run, or flat-out crashing, or any of the other myriad problems I've run into with these. Really sad for products that fill such an important need. Anyway, does anyone know of a backup software that works reliably and can do the following? Scheduled backups for multiple jobs, without a user logged in. Backup from local hard drives or network shares. Incremental backups. Thanks! Edit: Selected solution: I've added my (hopefully final) solution as an answer.

    Read the article

  • Generate multiple pdfs using FPDF class

    - by Pankaj Khurana
    Hi, I have added a link on a page clicking on which generates a pdf and asks for download for which i have used fpdf class. My new requirement is that clicking on the link should generate n number of pdf with different content and should ask for downloading these pdfs. I am unable to find out the method to accomplish the same. Please help me on this. Thanks

    Read the article

  • How do I reload servlet classes without restarting my web application?

    - by Ramon
    I want to reload just my web layer classes without reloading my service layer classes (which take longer to initialize and change less frequently). There are no references from my service layer into the web layer and I can create a whole new instance of the web layer without problems. I can conceive of a solution involving complicated class-loader tricks to isolate the web layer in its own class-loader and I think this is probably the only way to do this so what I'm asking is, is there a library out there which does this? I know about JavaRebel - I don't need that much power and I'm really looking for a more lightweight free solution.

    Read the article

  • How to replicate data with memcache

    - by Industrial
    Hi everyone, I am trying to find good resources on best practices to data replication across memcache servers. What I want to accomplish is that if one of my servers in my pool goes down, the next server in line already has the info set. I have found "repcached" but since I run a WIN32 test environment, I have been unable to install it. So what's our alternatives on how to replicate data between servers? Thanks,

    Read the article

  • How to print a dictionary in python c api function

    - by dizgam
    PyObject* dict = PyDict_New(); PyDict_SetItem(dict, key, value); PyDict_GetItem(dict, key); Bus error if i use getitem function otherwise not. So Want to confirm that the dictionary has the same values which i have set. Other than using PyDict_GetItem function, Is there any other method to print the values of the dictionary?

    Read the article

  • Suppress checking for changes on file system in Eclipse RCP

    - by panschk
    Okay, I guess this question is too difficult, but it's worth a try. I have an eclipse RCP application that edits HTML-files. I deal with the content of the files only in a W3C-Dom representation. There is some stuff that I can not do with that, so I the program edits each file each time after it is saved (save, save as). Of course, the file is then out of synch with the file system, and the next time I touch it, eclipse complains: "The file has been changed on the file system. Do you want to replace the editor contents with these changes? (Yes/No)" I do not want to load the changes into the editor ("No") Maybe there is a way to tell Eclipse programmatically to not check that file for changes, or to configure it to not check for changes on any file? edit: Everything has to be done either programatically or by editing some XML files. I can not expect the user to do anything;-)

    Read the article

< Previous Page | 26 27 28 29 30 31 32 33 34 35 36 37  | Next Page >