Search Results

Search found 1666 results on 67 pages for 'lurker indeed'.

Page 12/67 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Why is overloading operator&() prohibited for classes stored in STL containers?

    - by sharptooth
    Suddenly in this article ("problem 2") I see a statement that C++ Standard prohibits using STL containers for storing elemants of class if that class has an overloaded operator&(). Having overloaded operator&() can indeed be problematic, but looks like a default "address-of" operator can be used easily through a set of dirty-looking casts that are used in boost::addressof() and are believed to be portable and standard-compilant. Why is having an overloaded operator&() prohibited for classes stored in STL containers while the boost::addressof() workaround exists?

    Read the article

  • Programmatically obtain DNS servers of host

    - by Nicholas Palko
    Using C++, I would like to obtain the DNS servers being used by a host for three operating systems: OS X, FreeBSD, and Windows. I'd like confirmation that the approaches below are indeed best practice, and if not, a superior alternative. OS X: already answered; updated link at developer.apple.com Windows: [GetNetworkParms](http://msdn.microsoft.com/en-us/library/aa365968(VS.85).aspx) FreeBSD: /etc/resolv.conf Thanks in advance for your help!

    Read the article

  • Resize with minimal loss of quality

    - by oidfrosty
    Hi, I need to resize an image, but the image quality cannot be affected by this, the images will be from like 10x10 to 1000x1000, it will have some major congestions and some empty times it has to scale both up and down "potentially losing some image quality." is OK but it has to be at minimum, everything with raster graphics indeed NO libraries or other external binaries please

    Read the article

  • Does UrlDecode handle plus (+) correctly?

    - by harpo
    According to RFC 2396, The plus "+", dollar "$", and comma "," characters have been added to those in the "reserved" set, since they are treated as reserved within the query component. Indeed, search this site for "plus + comma , dollar $", and you get http://stackoverflow.com/search?q=plus+%2B+comma+,+dollar+$ Plus is only encoded (by the application) when it's not being used as a delimiter. But as others have observed, .NET's UrlDecode function converts plus to space. Where is this behavior specified?

    Read the article

  • Which is the best pick?

    - by Daniel
    Hi, considering I have experience with Java SE: which language should I learn(and is best for that purpose) in order to build web applications some day with it? I have been contemplating PHP and Java EE. The latter does indeed seems as an obvious choice given my Java SE knowledge. But how does it fares in comparison with PHP and how good is it for the aforementioned purpose? If there is a better language for this purpose, feel free to recommend it. Thank you.

    Read the article

  • SubSonic 3 LeftOuterJoin

    - by michaelpearce
    I have read in this forum that left outer join syntax is not supported by subsonic in an answer to a question on the topic by "Apocatastasis". I have the same issue in that when I create a query using the .LeftOuterJoin the resulting sql has an inner join rather than a left outer join. Can someone please confirm that LeftOuterJoin is indeed not supported and, if that is the case, why is it included in the active record syntax? Thanks Michael

    Read the article

  • [VB.Net] Typecasting generic parameters.

    - by CFP
    Hello world! Using the following code: Function GetSetting(Of T)(ByVal SettingName As String, ByRef DefaultVal As T) As T Return If(Configuration.ContainsKey(SettingName), CType(Configuration(SettingName), T), DefaultVal) End Function Yields the following error: Value of type 'String' cannot be converted to 'T'. Any way I could specify that in all cases, the conversion will indeed be possible (I'm basically getting integers, booleans, doubles and strings). Thanks!

    Read the article

  • How do I prevent ImageMagick convert from scaling images *up*?

    - by Kyle
    I'm using ImageMagick's convert tool to generate image thumbnails for a web application. I'm using notation like so: 600x600> The images are indeed scaled to 600px wide/tall (depending on the longer side) and proportions are properly maintained, however images less than 600px in either direction are scaled up — this behavior is not desired. Is there a way to prevent convert from scaling images up if the destination dimensions both exceed the original image size?

    Read the article

  • Which work process in my company should I Improve first?

    - by shoren
    I've just started to work in a new place, and I see several things they do that I find really terrible, and I want to know if they are indeed so wrong, or I am just too strict. Please let me know if my criticism is in place, and your opinion on which problem is the worst and should be fixed first. The developement is all in Java. 1) Not using svnignore. This means svn stat can't be used, and developers forget to add files and break the build. 2) Generated files go to same folders as committed files. Can't use simple maven clean, have to find them one by one. Maven clean doesn't remove all of them. 3) Not fixing IDE analyze warnings. Analyze code returns about 5,000 warning, of many different kinds. 4) Not following conventions: spring beans names sometimes start with uppercase and sometimes not, ant properties sometimes with underline and sometimes with dots delimiter, etc. 5) Incremental build takes 6 minutes, even when nothing is changed. 6) Developers only use remote debug, and don't know how to run the Tomcat server internally from the IDE. 7) Developers always restart the server after every compilation, instead of dynamically reloading the class and saving the server's state. It takes them at least 10 minutes to start checking any change in the code. 8) Developers only compile from command line. When there are compilation errors, they manually open the file and go the the problematic line. 9) A complete mess in project dependencies. Over 200 open sources are depended on, and no one knows what is indeed needed and why. They do know that not all dependencies are necessary. 10) Mixing Maven and Ant in a way that disables the benefits of both. In one case, even dependency checks are not done by Maven. 11) Not using generics properly. 12) Developers don't use Subversion integration with IDE (Eclipse, Intellij Idea). What do you think? Where should I start? Is any of the things I mentioned not really a problem?

    Read the article

  • True / false evaluation doesn't work as expected in Scheme

    - by ron
    I'm trying to compare two booleans : (if (equal? #f (string->number "123b")) "not a number" "indeed a number") When I run this in the command line of DrRacket I get "not a number" , however , when I put that piece of code in my larger code , the function doesn't return that string ("not a number") , here's the code : (define (testing x y z) (define badInput "ERROR") (if (equal? #f (string->number "123b")) "not a number" "indeed a number") (display x)) And from command line : (testing "123" 1 2) displays : 123 Why ? Furthermore , how can I return a value , whenever I choose ? Here is my "real" problem : I want to do some input check to the input of the user , but the thing is , that I want to return the error message if I need , before the code is executed , because if won't - then I would run the algorithm of my code for some incorrect input : (define (convert originalNumber s_oldBase s_newBase) (define badInput "ERROR") ; Input check - if one of the inputs is not a number then return ERROR (if (equal? #f (string->number originalNumber)) badInput) (if (equal? #f (string->number s_oldBase)) badInput) (if (equal? #f (string->number s_newBase)) badInput) (define oldBase (string->number s_oldBase)) (define newBase (string->number s_newBase)) (define outDecimal (convertIntoDecimal originalNumber oldBase)) (define result "") ; holds the new number (define remainder 0) ; remainder for each iteration (define whole 0) ; the whole number after dividing (define temp 0) (do() ((= outDecimal 0)) ; stop when the decimal value reaches 0 (set! whole (quotient outDecimal newBase)) ; calc the whole number (set! temp (* whole newBase)) (set! remainder (- outDecimal temp)) ; calc the remainder (set! result (appending result remainder)) ; append the result (set! outDecimal (+ whole 0)) ; set outDecimal = whole ) ; end of do (if (> 1 0) (string->number (list->string(reverse (string->list result))))) ) ;end of method This code won't work since it uses another method that I didn't attach to the post (but it's irrelevant to the problem . Please take a look at those three IF-s ... I want to return "ERROR" if the user put some incorrect value , for example (convert "23asb4" "b5" "9") Thanks

    Read the article

  • What's the point of the javascript navigator.javaEnabled function?

    - by den shade
    The navigator object has a javaEnabled function that indicates if the browser has javascript support. This seems to be a little odd: If JS is indeed enabled the function will return true, well obviously. If JS is disabled it will return <nothing since it is never run, javaScript is disabled. I must be missing something here, or is it really that useless this function?

    Read the article

  • Why is jQuery's .removeClass() adding a space to the class attribute?

    - by Sosh
    I'm having some strange issues with .removeClass() and .addClass() in jQuery. Specifically it seems that when I use .removeClass() the class is indeed removed, but a single space is left in it's place. then when I .addClass("secondclass") I get class=" secondclass" (with the space in front). I'm using jQuery 1.4.1 Is this intended behaviour or a bug? How to stop it?

    Read the article

  • Distinguishing between failure and end of file in read loop

    - by celtschk
    The idiomatic loop to read from an istream is while (thestream >> value) { // do something with value } Now this loop has one problem: It will not distinguish if the loop terminated due to end of file, or due to an error. For example, take the following test program: #include <iostream> #include <sstream> void readbools(std::istream& is) { bool b; while (is >> b) { std::cout << (b ? "T" : "F"); } std::cout << " - " << is.good() << is.eof() << is.fail() << is.bad() << "\n"; } void testread(std::string s) { std::istringstream is(s); is >> std::boolalpha; readbools(is); } int main() { testread("true false"); testread("true false tr"); } The first call to testread contains two valid bools, and therefore is not an error. The second call ends with a third, incomplete bool, and therefore is an error. Nevertheless, the behaviour of both is the same. In the first case, reading the boolean value fails because there is none, while in the second case it fails because it is incomplete, and in both cases EOF is hit. Indeed, the program above outputs twice the same line: TF - 0110 TF - 0110 To solve this problem, I thought of the following solution: while (thestream >> std::ws && !thestream.eof() && thestream >> value) { // do something with value } The idea is to detect regular EOF before actually trying to extract the value. Because there might be whitespace at the end of the file (which would not be an error, but cause read of the last item to not hit EOF), I first discard any whitespace (which cannot fail) and then test for EOF. Only if I'm not at the end of file, I try to read the value. For my example program, it indeed seems to work, and I get TF - 0100 TF - 0110 So in the first case (correct input), fail() returns false. Now my question: Is this solution guaranteed to work, or was I just (un-)lucky that it happened to give the desired result? Also: Is there a simpler (or, if my solution is wrong, a correct) way to get the desired result?

    Read the article

  • Search and replace in apache htaccess a RewriteRule

    - by Paul Irish
    I'd basically like to get /path/file+name+with+plusses.mp3 to rewrite to /path/file name with plusses.mp3 In my case wordpress is intercepting the request and giving a 404. But the file does indeed exist. Given the constraints of the regex in mod_rewrite implementation, I haven't yet seen a straightforward way of doing this.

    Read the article

  • How can I retrieve two values from jquery-autocomplete

    - by RedMist
    I need my application to auto-complete on a company name, but also fill in a hidden form field with the ID of that company selected. I believe it's possible to return pair values, with the pipe separator, such as........ Microsoft|10 Oracle|20 Sybase|30 And indeed this seems to work, but I don't know how to access the 2nd argument.

    Read the article

  • How to set the format of dates in a web appication

    - by GigaPr
    Hi, i would like to set the date format of all the dates in my web application in a central location. i mean if the website is opened in USA it will have a format such as 3/19/2010 (March/19/2010) while in Italy will be 19/3/2010 (19/March/2010) i am no really concerned with how to locate the users but indeed on how to set the different date format for the whole application in one single location in c#.NET thanks

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >