Wikipedia:Reference desk/Archives/Computing/2012 July 4

= July 4 =

CLRS, the Algorithms Textbook
I've heard that not only does the book not have any solutions, it doesn't have any answers for the end-of-chapter problems. How is an independent learner supposed to know if he or she is learning correctly and not learning incorrectly? 69.243.220.115 (talk) 00:25, 4 July 2012 (UTC)
 * You could find other independent learners and study together and compare answers.  Or, you could find the instructor's version of the text, which includes answers.  This might be available through bookstores or online.  RudolfRed (talk) 00:44, 4 July 2012 (UTC)


 * The Instructor's Manual isn't available legally online. MIT Press and the authors limit access to instructors from institutions - they specifically say "the manual is not available to students, or to those studying the book on their own". Instructors agree (maybe they, or their institution, signs or click-agrees to a contract) not to share it, or their own solutions, online. That said, it's easy to find a PDF of the instructors manual (illegally) online (no, I'm not going to link to it). But it's not just a collection of solutions - at over 400 pages it's about half the size of the textbook itself. It's intended for people teaching a class based on the book's syllabus, so the intended audience is CS postgrads and professors. Thus it's mostly not solutions, but a detailed pedagogical treatment of teaching the subject, the nature of proof, and a more formal elucidation of the points covered in the text. Skimming a few sections of it compared to the textbook, I would say the Instructor's Manual is a level above the text, so for a student of the textbook the manual wouldn't help - if you're knowledgeable enough to understand the manual, you don't need help understanding the textbook. 31.185.34.151 (talk) 16:18, 4 July 2012 (UTC)
 * Is that half the size, or half the size again? Rojomoke (talk) 16:33, 4 July 2012 (UTC)


 * Half the size (or so). My (older) copy of the textbook is about 950 pages, the instructor's manual is about 450 pages. 31.185.34.151 (talk) 16:37, 4 July 2012 (UTC)


 * One would hope that if one has learned the material sufficiently well to have successfully solved a problem correctly, one would be able to follow an also correct solution from the solutions manual. At least, one would hope the solutions manual was not written such that even people who successfully solved a given problem couldn't decode the symbols the solutions manual writer used just to say, "yep, my solution was right." Sad would be the person who could successfully solve a problem themself but could not understand what a correct solution looked like. Sad would be the subject where it were possible to be able to solve problems but not be able to read solutions. Yes, I found the solutions manual too but I'm not going to look at it until I have really studied the material and feel that my solution to a given problem is right, and then just to confirm that it is. 69.243.220.115 (talk) 16:42, 4 July 2012 (UTC)

pop-ups
Ubiquitous Apple pop-ups!!!

Have just restored my system to get back on to Wikipedeia after computer girations trying to disable Apple pop-ups. Have checked all the help advice and followed instructions but they still keep appearing - one popped up on this page!! Should Apple be considered malware when they can invade your computer. So angry that I uninstalled any Apple names on my computer. Any help that is available would be welcome, and my thanks in advance.

Hamish84 (talk) 03:53, 4 July 2012 (UTC)


 * Let's start with the basics, do you have a pop-up blocker enabled for your browser ? And what browser is that ? StuRat (talk) 04:35, 4 July 2012 (UTC)


 * I don't think a pop-up blocker will matter here. It sounds like the OP's problem is that Apple software keeps popping things up. More information on what you're seeing would be nice - what exactly is in the window that pops up (trying to update, etc). Then someone who is familiar with the software may be able to tell you how to disable to messages you're seeing. If the pop-ups are still happening even though you uninstalled all Apple software, you may have some sort of malware infection. Maybe it is trying to make money by popping up Apple ads or is trying to trick you into giving it your iTunes account information. Windows Security Essentials is a simple free program that can help make sure you're not infected with anything like that. 209.131.76.183 (talk) 14:33, 5 July 2012 (UTC)

Data Members
Hi, i just want to know why data members are not initialized in class? Signed off; Kveesram — Preceding unsigned comment added by 164.100.45.146 (talk) 10:32, 4 July 2012 (UTC)


 * You haven't told us what programming language you're using, which matters because different languages do different things. They are initialised in Java, but not in C or C++, and the question is mostly moot for Python or Javascript. And they can be initialised in a constructor if someone does so (except in C, really). -- Finlay McWalterჷTalk 10:35, 4 July 2012 (UTC)

Dr. mr. Finlay, the programming language is C++. Expecting ur answer soon. bye, Kveesram — Preceding unsigned comment added by Kvees (talk • contribs) 03:56, 5 July 2012 (UTC)


 * They're not initialised by definition. It's a decision made by the language designers. -- Finlay McWalterჷTalk 09:35, 5 July 2012 (UTC)

Inheritance
Hi friends, do please try to answer my following questions on INHERITANCE. (1) What is Inheritance and what is its need and advantage? (2) What are visibility nodes? Do please explain the impact of visibility modes on access specifier of inheritable members of base class? Do please post answers the above mentioned quaries. Bye, kveesram — Preceding unsigned comment added by 164.100.45.146 (talk) 10:38, 4 July 2012 (UTC)


 * Inheritance in object oriented programming is discussed at great length at the Inheritance (object-oriented programming) article. -- Finlay McWalterჷTalk 10:40, 4 July 2012 (UTC)

Bypassing app clash in Windows 7
Using Windows 7 I have a publishing app (Texmaker, though I assume it's irrelevant what app I am using) that creates a PDF. I open the PDF in Adobe Reader to check it, and then make any adjustments in Texmaker, but it refuses to save the PDF (it fact it hangs) because the PDF is still open in Adobe Reader, so I have to close Adobe Reader before I can regenerate the PDF and reopen it. I'm told there is a switch somewhere in Windows 7 (or perhaps Adobe?) that enables me to override this sort of clash, but I haven't been able to find it. Any assistance would be appreciated.--Shantavira|feed me 11:49, 4 July 2012 (UTC)
 * I found a web forum where this question was asked last year, and the only answer given was to use a free PDF viewer called SumatraPDF, which does not maintain a lock on the PDF file. Looie496 (talk) 16:02, 4 July 2012 (UTC)
 * Not only does it not lock the file, it detects changes and auto-reloads it. If there is a way to change Adobe Reader's behavior then I'd like to hear about it too, but you're probably better off with Sumatra PDF. I think it's a better viewer than Adobe Reader in any case. -- BenRG (talk) 16:08, 4 July 2012 (UTC)

c puzzle
Hi sir!my doubt is below programme. Out put:

12++

My doubts:
 * 1) here main is not a variable.we are incrementing it in our code.how is it possible?
 * 2) we are using pow on main .what it means?
 * 3) totally can you explain line by line?  — Preceding unsigned comment added by Phanihup (talk • contribs) 17:11, 4 July 2012 (UTC)


 * main is a variable, in this (silly) case - they're overriding the function name main with an integer variable called main (if you don't specify the type of a function argument, C defaults to making it an int). In this case that variable will be filled with the content of argc
 * pow raises one double to the power of another - see the manual
 * It doesn't do anything useful or interesting
 * -- Finlay McWalterჷTalk 17:25, 4 July 2012 (UTC)

SQL server, VS team system 2008 and windows 8
I am running VS 2008 version 9.0.21022.8 RTM on windows 8 release preview, which seemed already to have a later version of SQL server installed bilt-in. Now while installing VS, I was unable to install SQL server 2005 express edition as an error message shown it has known compatiblity issues with the version of windows. Now when I try to connect a database, it says SQL server 2005 express is necessary to function properly. So, uninstalling and reinstalling something may strike a fix? or, should I upgrade to VS 2010? 49.136.26.206 (talk) 17:52, 4 July 2012 (UTC)

Unicode support
I'm curious about unicode... how come ASCII letters don't have 4 bytes for each unicode character but computers can display unicode with ascii with no apparent problem

For example 'A' in hexadecimal is 41 and "䇐" is 41d0, How computers know that it's unicode instead of displaying AÐ which would be the characters for 41 d0. tl;dr: Why '\ud800\udc00' is not equal to '\xd8\x00\xdc\x00' --190.60.93.218 (talk) 18:08, 4 July 2012 (UTC)


 * When storing unicode data, some implementations use an expanded 4 byte system called Universal Character Set. This is also sometimes used where one computer transmits unicode character data to another (e.g on a network, or by storing in a file) - this is just the unicode code point. But it's very common to transmit (and sometimes to store) the character data in UTF-8 instead, which is a variable length encoding.  UTF-8 only needs to use multiple bytes for non-ascii characters; ascii is encoded as is, and software that manipulates ascii can send and receive (but not create or display) utf-8 encoded character data without modification. This probably seem like a lot of reading (you need to understand the difference between a code point, its UCS encoding (which may be the same) and its utf-8 encoding.  When you get there, I hope you'll agree with me just how darn clever Thompson and Pike, utf-8's creators, are. -- Finlay McWalterჷTalk 18:17, 4 July 2012 (UTC)
 * You wrote "When storing unicode data, some implementations use an expanded 4 byte system called Universal Character Set"—that makes no sense. Unicode and ISO 10646 ("UCS") are basically the same standard (though they weren't always). Maybe you're confused by the existence of character encodings named UCS-2 and UCS-4 (precursors to what are now called UTF-16 and UTF-32). Communication over the network doesn't use "just the code point". It may use UTF-32, which uses 32 bits for every code point. But the concept of a single code point has little meaning anyway because of the existence of combining accents and invisible formatting control codes and roman numeral eight and whatnot, so I wouldn't call this a fixed-width encoding in any sense that matters. -- BenRG (talk) 16:17, 5 July 2012 (UTC)


 * As to the question of "How computers know" - the short answer is that they don't.  Although a computer could examine a collection of bytes to try to determine what kind of encoding is being used, there are lots of them, and I don't think there's any safe way to distinguish among all of them a priori. rc (talk) 00:23, 5 July 2012 (UTC)
 * But, once you do know that some text is UTF-8, examining the bit patterns tells you how many bytes to lump up and scrounge through in order to extract the underlying codepoint. It takes advantage of the fact that there was never a standard use for ASCII bytes that started with 1 in the first place. Paul (Stansifer) 14:50, 5 July 2012 (UTC)
 * Relevant: How notepad attempts to figure it out, and again. 77.97.198.48 (talk) 14:55, 5 July 2012 (UTC)


 * Also relevant is the Wikipedia article Bush hid the facts. But really this has nothing to do with Unicode. The question is how a computer (or a human, for that matter) can tell between two different numbers when they have digits in common. The answer is that somebody designs a representation for the numbers that isn't ambiguous. You can delimit the numbers with a space or comma, or you can pad everything to a fixed width (00000041000041d0), or you can use some kind of tag on the first or last digit ( 4 1 4 1d0). That last one isn't UTF-8, but it's a similar idea. -- BenRG (talk) 16:17, 5 July 2012 (UTC)

Manuals for Inkscape
I would like to learn how to use Inkscape (well, I'd like to learn how to use any vector graphics program, but I don't want to take out a second mortgage to buy Illustrator). I'm reasonably familiar with raster graphics programs, but I've never gotten the hang of vectors. Could someone suggest a book (or printable document) that would be suitable for a guy good with using a variety of programs, but essentially a complete beginner when it comes to vector graphics? Amazon lists a few titles when I search for Inkscape, but the reviews vary quite widely and the books seem to range from last year to three years old - so I guess my secondary question is: has Inkscape changed very much over that time? Matt Deres (talk) 23:57, 4 July 2012 (UTC)


 * I would suspect that "Bible" series of tech books (Linux Bible, I've seen GIMP Bible, etc...) to possibly have one for Inkscape. 69.243.220.115 (talk) 02:24, 5 July 2012 (UTC)


 * As someone with no graphics experience at all, I learned Inkscape just from messing around (I don't think I read a tutorial). I wouldn't buy a book, because Inkscape has evolved fairly quickly, so you end up reading a book about a depressingly different version - that's different to how commercial projects like Illustrator work, because those tend to save up big functional changes and improvements for a new version (so they can charge again for it). -- Finlay McWalterჷTalk 09:42, 5 July 2012 (UTC)
 * I used a video tutorial.. 65.49.68.173 (talk) 13:53, 5 July 2012 (UTC)


 * I've had no problems teaching myself raster graphics (and Excel and Agent and..) by messing around with the programs, but there's something about the vectors that I'm just not getting. The business with Bezier curves, for example, so far seems impenetrable to me; I try fooling about with it, but I obviously need more hand holding. On the occasions I've had to read up about a program, I prefer being about to read and cogitate on something and then have it in hand when I try it on the actual program, hence my preference for something printed (or printable). Matt Deres (talk) 17:56, 5 July 2012 (UTC)


 * If you really want to understand vector graphics, it would be more useful to learn SVG than any specific editor. I personally learned vector concepts by learning PostScript, which is comparable -- I was writing data analysis programs and needed to generate graphics for a laser printer. Looie496 (talk) 16:22, 5 July 2012 (UTC)


 * Well, I'm kind of groping about in the dark, but your suggestion seems reasonable to me. I've never done any sort of programming nor any work with PostScript before, though. Could you recommend a beginner's guide to SVG? Matt Deres (talk) 17:56, 5 July 2012 (UTC)


 * Learning SVG is not going to help you learn how to use the GUI tools, any more than learning how JPEG is implemented at the file level is going to teach you how to use Photoshop. I think this is a poor direction to go to if you actually want to learn how to use the programs. Unless you are planning to exclusively generate graphics programmatically (e.g. writing programs that output graphs), I wouldn't pursue this avenue. In theory you could do real vector work purely from editing raw SVG, but this is a maddening way to do it. Personally I would just work through a few of the many online tutorials for Inkscape and then dive into a project. The tutorials will help you figure out the basics and as you work on a project (say, making an illustration for Wikipedia), you'll figure out what else you don't know that you might actually use. --Mr.98 (talk) 18:52, 5 July 2012 (UTC)