Daily Archives

Articles indexed Wednesday April 21 2010

Page 15/126 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Is it safe to call a function to intialize a class in a ctor list?

    - by Michael Dorgan
    I have Angle class that I want initialized to a random value. The Angle constructor can accept an int from a random() function. Is it safe to place this call in the ctor list: foo::foo() : Angle(random(0xFFFF)) {...} or do I have to do it in the body of the constructor? foo::foo() { Angle = Angle(random(0xFFFF)); ...} If it matters, the foo class is derived from another class and does have virtual methods. In addition, no exception handling is allowed in our app.

    Read the article

  • how to use insert command in sql analysis services

    - by imcolin
    Hi all, I have a problem regarding how to use insert command in ssas, i try to send a request to server, server give a response saying "No binding exists for it", my request envelope is:- <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> SSAS SsasCubes Sales Territory Sales Territory Key fds aa 1033 Should i create a attribut binding before using insert command??? any body can help me ? one more question, when i use Update command in ssas, I also got a error say "Attributes cannot appear in Where ". can you tell me why?? Thanks

    Read the article

  • Visual Basic 2010 Language Enhancements

    Earlier this month Microsoft released Visual Studio 2010, the .NET Framework 4.0 (which includes ASP.NET 4.0), and new versions of their core programming languages: C# 4.0 and Visual Basic 10 (also referred to as Visual Basic 2010). Previously, the C# and Visual Basic programming languages were managed by two separate teams within Microsoft, which helps explain why features found in one language was not necessarily found in the other. For example, C# 3.0 introduced collection initializers, which enable developers to define the contents of a collection when declaring it; however, Visual Basic 9 did not support collection initializers. Conversely, Visual Basic has long supported optional parameters in methods, whereas C# did not. Recently, Microsoft merged the Visual Basic and C# teams to help ensure that C# and Visual Basic grow together. As explained by Microsoft program manager Jonathan Aneja, "The intent is to make the languages advance together. When major functionality is introduced in one language, it should appear in the other as well. ... [T]hat any task you can do in one language should be as simple in the other." To this end, with version 4.0 C# now supports optional parameters and named arguments, two features that have long been part of Visual Basic's vernacular. And, likewise, Visual Basic has been updated to include a number of C# features that it was previously missing. This article explores some of these new features that were added to Visual Basic 2010. Read on to learn more! Read More >

    Read the article

  • Clipboard feature in Windows

    - by iceman
    In Opensuse 11.0 Linux we can select any piece of text anywhere(browser, emacs..) and its in the clipboard and then we can paste it with the middle mouse click. How can i get similar functionality in Windows Xp?

    Read the article

  • Print spooler consumes over 1GB of memory

    - by Stephen Jennings
    Suddenly, on a Windows Vista Business workstation I manage, the Windows print spooler service is consuming over 1GB of memory. I got the call this morning that the user could not print. I discovered all printers were missing from the Printers applet in Control Panel. I rebooted the machine, and at first the printers were still missing, but after a few minutes (and much banging my head against the wall) they suddenly appeared. I stopped worrying about it until later today it happened again to the same workstation. To my knowledge, nothing has changed on the computer. No new printers have been added, no new print drivers would have been installed, and no new software is being used. I tried clearing out the spooler folder (C:\Windows\System32\spooler\printers) which did have four print jobs from this morning, but the problem persists after restarting the spooler service. When starting the service, it starts out using 824 KB of memory, then after about 20 seconds it starts creeping up about 10MB each second until it stabilizes around 1.8GB.

    Read the article

  • Why JavaScript Statement "ga = ga || []" Works?

    - by Morgan Cheng
    Below javascript statements will cause error, if ga is not declared. if (ga) { alert(ga); } The error is: ga is not defined It looks undeclared variable cannot be recognized in bool expression. So, why below statement works? var ga = ga || []; To me, the ga is treated as bool value before "||". If it is false, expression after "||" is assigned to final ga.

    Read the article

  • Matching 'weird' characters in PHP regex

    - by Bill X
    I have some strings that need a-strippin': ÃœT: 9.996636,76.294363 Tons of long strings of location codes. A literal regex in PHP won't match them, IE $pattern = /ÃœT:/; echo preg_replace($pattern, "", $row['location']); Won't match/strip anything. (To know it's working, /T:/ does strip the last bit of that string). What's the encoding error doing on here? Alternately, I would accept a concise way to take out just the numbers.

    Read the article

  • .Net Linq - Join together all item of a List

    - by Melursus
    How can I write a Linq expression that select item from a List and join them together ? Example IList<string> data = new List<string>(); data.Add("MyData1"); data.Add("MyData2"); string result = //some linq query... I try data.Select(x => x + ","); //result = "MyData1, MyData2"

    Read the article

  • Unable to have nokogiri obey custom path parameters during install

    - by Christopher
    I am trying to install nokogiri locally on dreamhost using the commands: $ wget ftp://xmlsoft.org/libxml2/libxml2-2.7.6.tar.gz $ wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz $ tar zxvf libxml2-2.7.6.tar.gz $ cd libxml2-2.7.6 $ ./configure --prefix=$HOME/local/ --exec-prefix=$HOME/local $ make && make install $ cd .. $ tar zxvf libxslt-1.1.26.tar.gz $ cd libxslt-1.1.26 $ ./configure --prefix=$HOME/local/ --with-libxml-prefix=$HOME/local/ $ make && make install $ export LD_LIBRARY_PATH=$HOME/local/lib $ gem install nokogiri -- --with-xslt-dir=$HOME/local \ --with-xml2-include=$HOME/local/include/libxml2 \ --with-xml2-lib=$HOME/local/lib but it still gives the error: Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for iconv.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for libxml/parser.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yes checking for libxslt/xslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... no libxslt is missing. try 'port install libxslt' or 'yum install libxslt-devel' *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.8 --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib Gem files will remain installed in /home/myusername/.gems/gems/nokogiri-1.4.1 for inspection. Results logged to /home/myusername/.gems/gems/nokogiri-1.4.1/ext/nokogiri/gem_make.out where it doesn't seem to be looking in the paths I have specified for the libraries. Is there something wrong with my installation method?

    Read the article

  • CFbuilder/RDS/working set:How to Add new working set

    - by vas
    Hi!. ISSUE:- I am using CFbuilder and my coldfusion server is on a Remote Desktop Services (RDS). Everything is working fine except that I do not see the folder that I am currently working on under CFbuilder /Navigator or CFbuilder /Prject/Build Working Set/. Even if I try to add "Prject/Build Working Set/Select working set/New" its not working. I want to add a "Working Set" so that it can show on my CFbuilder/Navigator on the right side. How do I do this with an RDS? Do I need the IP address Please help Thanks Vas

    Read the article

  • Semaphore race condition?

    - by poindexter12
    I have created a "Manager" class that contains a limited set of resources. The resources are stored in the "Manager" as a Queue. I initialize the Queue and a Semaphore to the same size, using the semaphore to block a thread if there are no resources available. I have multiple threads calling into this class to request a resource. Here is the psuedo code: public IResource RequestResource() { IResource resource = null; _semaphore.WaitOne(); lock (_syncLock) { resource = _resources.Dequeue(); } return resource; } public void ReleaseResource(IResource resource) { lock (_syncLock) { _resources.Enqueue(resource); } _semaphore.Release(); } While running this application, it seems to run fine for a while. Then, it seems like my Queue is giving out the same object. Does this seem like its possible? I'm pulling my hair out over here, and any help would be greatly appreciated. Feel free to ask for more information if you need it. Thanks!

    Read the article

  • What's a simple way to web-ify my command-line daemon?

    - by dreeves
    Suppose I have a simple daemon type script that I run on my webserver. I run it in a terminal, with gnu screen, so I can keep an eye on it. That works fine (incidentally, I use this trick). But now suppose I'd like to make a web page where I can keep an eye on my script's output. What's the easiest way to do that? Notes: This is mainly for myself and a couple co-hackers so if websockets is the answer and it only works on Chrome or something, that's acceptable. This question is asking something similar: http://stackoverflow.com/questions/1964494/how-to-make-all-connected-browsers. But I'm hoping for a simpler, quick-and-dirty solution, and especially a general way to quickly do this for any script I might want to keep an eye on from a browswer.

    Read the article

  • openSUSE on Virtual Box : Guest Additions

    - by Arkapravo
    I am using openSUSE 11.0 guest in Ubuntu 9.10 host on Virtual Box. When I try to install Guest-Additions it doesn't really work as expected, the screen is not sized to fit the correct resolution, seamless working between 2 OS doesn't happen ! Has anyone tried installing Guest-Additions in openSUSE ?

    Read the article

  • Extract Links and save pages

    - by Veejay
    I have a couple of pages, each has around 20 links on it. Each link leads to a different page. I want to provide the user an option to extract all the links on these Page and then download each of the pages(20) to their desktop. Any tools/addons/plugins that I can suggest users?

    Read the article

  • Help with Strings in C

    - by Anon
    Given the char * variables name1 , name2 , and name3 , write a fragment of code that assigns the largest value to the variable max (assume all three have already been declared and have been assigned values). I've tried and came up with this: if ((strcmp(name1,name2)0)&&(strcmp(name1,name3)0)){ max=name1; } else if ((strcmp(name2,name1)0)&&(strcmp(name2,name3)0)){ max=name2; } else if ((strcmp(name3,name1)0)&&(strcmp(name3,name2)0)){ max=name3; } However, I get this error Your code is incorrect. You are not handling the situation                where two or more strings are equal.

    Read the article

  • Hot to log in to a website using installed twill?

    - by brilliant
    Hello, everybody!!!! I have just successfully installed TWILL on my computer with the help of one very supportive member of "StackOverflow" (you can check it out HERE) and have tried to run one of the simple examples on the twill documentation page (you can see that page HERE). Here is that example: Let's say my username on www.slash.org is lynxye and my password is mammal. When I try to enter that exanple code into my Python prompt, I can only enter the first line of the code bexcause when I click on "Enter" to start a new line, I get some error messages right away: The same happens when I try to enter this code into my terminal: I think I miss out on some basics here. Perhaps, I need to create a file that would contain that code and then run that file somehow, but I really don't know where I need to create that file and with what extensdion. Can anyone, please, help me with this?

    Read the article

  • Supporting twitter-like user page urls with apache/php?

    - by user246114
    Hi, I'm using php on apache with mysql. I want to let users enter a url into their browser to see a custom user page for themselves, just like twitter does. For example, they could enter urls like: www.mysite.com/johndoe www.mysite.com/janedoe and see that user's page. How could I do this with php and apache? I don't want to create a folder on disk for every user like above, I'd instead kind of like to catch the url and generate the page on the fly for them, Thanks

    Read the article

  • Allocating memory in char * struct

    - by mrblippy
    hi, im trying to read in a word from a user, then dynamically allocate memory for the word and store it in a struct array that contains a char *. i keep getting a implicit declaration of function âstrlenâ so i know im going wrong somewhere. struct class { char class_code[7]; char *name; }; char buffer[101]; struct unit units[1000]; scanf("%s", buffer); units[0].name = (char *) malloc(strlen(buffer)+1); strcpy(units[0].name, buffer);

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >