Wikipedia:Reference desk/Archives/Computing/2014 July 25
Computing desk | ||
---|---|---|
< July 24 | << Jun | July | Aug >> | July 26 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
July 25
Search engine question. Ignore vs. exclude
Are there search engines which can do both, ignore and exclude?
I mean by "ignore", a search like (shades AND of AND grey) but ignore "50 Shades of Grey" should return most files containing the words "shades", "of", "grey" but only if they are not part of the wording, "50 Shades of Grey".
By "exclude", even a file containing both the wording "50 Shades of Grey" and the individual words outside the context would be excluded.
For example, the article would stay in the "ignore" results, because of the sentence "Not to be confused with Shades of Grey." but get excluded from the "exclude" search results, due to the redirect remark, "(Redirected from 50 Shades of Grey)". - ¡Ouch! (hurt me / more pain) 08:50, 25 July 2014 (UTC)
- And again, the signature gained a second meaning.
- I'm not sure of your distinction, but in Google, using -"some phrase", will ignore results containing exactly that phrase, for example searching for -"fifty shades of grey" -"50 shades of grey" shades of grey will ignore references to a certain BDSM-lite book and film. Note that both representations of 50 have to be separately ignored. CS Miller (talk) 11:12, 25 July 2014 (UTC)
- Thanks, but actually, I'm mostly interested in the "ignore" search which does not exclude the files with both.
- Many results have ads and I don't want to get the pages with the only reference to my search term in the ads, but get all the pages with the search term in both the ads and in the page proper. The very existence of adbots makes the latter case much more likely than pure coincidence.
- I picked "shades of grey" as example because it went well with my signature. As a search term, it's quite nonsensical, both because of the internet memes about 50SoG, and because "of" is a word which would appear in very few good search queries. - ¡Ouch! (hurt me / more pain) 05:54, 28 July 2014 (UTC)
- I'm not sure if I understand exactly, but "shades of grey -"50 shades of grey" -"fifty shades of grey"", in Google, will return everything that "shades of grey" would, but excluding the two phrases with 50. If you wanted the specific phrase "shades of grey", you could add a quote to that. Is this what you were asking? If not, could you include a simple example of a case this would miss?:-)Phoenixia1177 (talk) 04:16, 31 July 2014 (UTC)
pdf format
I cannot use all the functions in some pdf files (e.g. in Wikipedia article footnotes) on my new laptop, e.g. Search and Go To page number. Do I need to update some software in my laptop, and if so, how, please? I have Windows 7, IE11 and Firefox. --P123ct1 (talk) 11:21, 25 July 2014 (UTC)
- If you access the PDF using a browser, the browser may display the file with any of several different PDF viewers, depending on your browser settings. I find Firefox picking different ways to display the PDF for reasons I can't fathom.
- Once the PDF is displayed, see if there is a menu bar across the top with the choices "File Edit View Window Help". Click "Help"; see if there is a choice "About Adobe Reader XI". If there is, click it and make note of the version. Mine is 11.0.07. Let us know what you find. Jc3s5h (talk) 11:38, 25 July 2014 (UTC)
- @Jc3s5h:There is no menu bar with "File Edit" at all, just "Print Save Share Create pdf using Acrobat". When I go to "Create using Acrobat", it calls up a screen asking you to buy Acrobat which will convert files to pdf, at £65 a year! I see I already have Adobe 9.5 in the laptop, but when I save the pdf file (from a Wikipedia footnote) to Adobe 9.5 and then use this new file, only the Go To page function works, not the Search function. I did this using IE11 and then Firefox, with the same result. Could you look at the Wikipedia file, please, and see if you can make the functions work? It is at Islamic State of Iraq and the Levant, footnote #142, "Senate Committee on Intelligence ...", which is a US government document. --P123ct1 (talk) 07:39, 26 July 2014 (UTC)
- I have just tried some other pdf files from Wikipedia footnotes, and all the functions work perfectly, without any conversion to Adobe 9.5. It would be interesting to know if you have the same difficulty I had with the file I referred you to. I suppose it could be something to do with it being a very sensitive US government document (on terrorism) - there is a lot blacked out - but it is in the public domain, so I don't see why. --P123ct1 (talk) 09:10, 26 July 2014 (UTC)
- When I click on the footnote in Firefox, on a Windows 8.1 laptop, it downloads the document into my Downloads folder. When I click on the Firefox download arrow and then click on the document, the document opens in Adobe Reader XI, as usual. So I think your problem has nothing to do with the footnote, it has to do with the way your computer and browser are set up. By the way, "Adobe 9.5" isn't a useful software designation, since Adobe sells so many different programs. You might be referring to Adobe Reader 9.5 or Adobe Acrobat 9.5. I think they also have some on-line versions of Acrobat, although I don't remember if they had an on-line version back in the 9.5 era. Jc3s5h (talk) 11:09, 26 July 2014 (UTC)
- Sorry, yes, I meant Adobe Reader 9.5, and I have Windows 7. I have downloaded it the way you said you did with Firefox and it opens in Adobe Reader 9.5, but I still get the same problem, only the GoTo works, not the Search function - and as I said before, this only happen with this particular document, not other pdfs I have opened with IE11 and Firefox. They have all been in Adobe Acrobat, and only this one doesn't work. Very strange. P123ct1 (talk) 12:36, 26 July 2014 (UTC)
- What do you mean 'search' doesn't work. Do you mean search doesn't find anything? Or you can even get it to open? If the PDF is an image rather than text and it isn't OCRed in the background, then searching won't find anything. For that matter, if it is text but they did one of those copy protection things where they used a custom font with custom mappings you'll have to know what to actually search for.
- While there are numerous restrictions that can be placed on a PDF (look at the document properties in Reader to see what ones apply to your PDF) including disabling copying the content, printing etc; disabling searching isn't one of them. (If the PDF can be opened, these restrictions are more annoying than real restrictions. There are many ways around them although that may or may not fall afoul of the DMCA in the US.) And AFAIK, even if the PDF has absolutely no text, you should still be able to try to search, although I can't speak for Reader 9.5 in particular.
- Nil Einne (talk) 13:57, 26 July 2014 (UTC)
- P.S. I has a quick look and the PDF is indeed an image one without any apparent text. However attempting to search still works fine on Reader XI. It doesn't find anything, as you would expect. Nil Einne (talk) 14:02, 26 July 2014 (UTC)
- @Nil Einne: The file opens in Adobe Reader 9.5 and the search box is there, but when I type in a word and press "Find next", it says it has searched but cannot find, so it does perform a search. I didn't know about the image thing, which explains it. Thanks. --P123ct1 (talk) 14:52, 26 July 2014 (UTC)
- P.S. I has a quick look and the PDF is indeed an image one without any apparent text. However attempting to search still works fine on Reader XI. It doesn't find anything, as you would expect. Nil Einne (talk) 14:02, 26 July 2014 (UTC)
C Compiler on Windows 7 Desktop
I would like to run C programs on my Windows 7 desktop computer. What is anyone's advice for a compiler? In the 1990's the compiler of choice was Borland Turbo C for about $300. However, now it has been made into freeware. That would be fine if I could figure out how to complete its installation, but I can't. Some of the web sites that come up on a Google search for it then try aggressively to get you to download other software that I don't want and don't trust. The site that I think really is Borland downloads a ZIP file to me, which I can unpack, but it doesn't include instructions for what to do next. Is there a .exe program that will install the unpacked elements? Is there a set of instructions? I assume, with freeware, that there is no technical support. There are C compilers out there for $700, but that is a lot. Is there a reasonable commercial C compiler for $400 or less, or is there a web site that provides detailed instructions on how to install Borland? Robert McClenon (talk) 14:41, 25 July 2014 (UTC)
- Microsoft Visual Studio Express is free, if you want to use it. If you want to use the Borland compiler, then WinZip or 7-Zip will extract the files for you, they are both free, but WinZip is nagware. CS Miller (talk) 15:41, 25 July 2014 (UTC)
- Maybe I wasn't clear. I wasn't asking how to unzip the files. I did download the ZIP file and I did extract the files for Borland C. What do I do to install the compiler? All that the unzipping does it to create a folder of files. It doesn't install the compiler. Also, what does Visual Studio Express do? Will it compile K&R C, or does it do something else? Robert McClenon (talk) 16:11, 25 July 2014 (UTC)
- What's inside the ZIP file? Is there an .exe? MS VS Express is a full C and C++ compiler, IDE, and Debugger, but the profiling and installer builder won't work (you need the paid-for versions for those). It appears to support K&R code, over ANSI. Why are you using K&R anyway, ANSI C gives you warning about incorrect parameters, and automatic casting. CS Miller (talk) 16:29, 25 July 2014 (UTC)
- I will answer later whether there is a .exe in the files that were unzipped. (I am not in front of the desktop but of the laptop.) What does the installer builder do? Does it install the compiler, or does it create the install wizard that installs the compiled C program on someone else's computer? I don't need that feature. My real question was whether it would compile source code that had all of the power of K&R C (so that I can use the K&R blue book as my language bible). It is my understanding that the differences between ANSI C and K&R C are not significant. Robert McClenon (talk) 16:38, 25 July 2014 (UTC)
- It does the later, allows your program to be installed else where. VS express is installed by a wizard. Unless you have good reason to use K&R, you'd be better using ANSI, as it will catch some common mistakes. CS Miller (talk) 18:03, 25 July 2014 (UTC)
- I will answer later whether there is a .exe in the files that were unzipped. (I am not in front of the desktop but of the laptop.) What does the installer builder do? Does it install the compiler, or does it create the install wizard that installs the compiled C program on someone else's computer? I don't need that feature. My real question was whether it would compile source code that had all of the power of K&R C (so that I can use the K&R blue book as my language bible). It is my understanding that the differences between ANSI C and K&R C are not significant. Robert McClenon (talk) 16:38, 25 July 2014 (UTC)
- What's inside the ZIP file? Is there an .exe? MS VS Express is a full C and C++ compiler, IDE, and Debugger, but the profiling and installer builder won't work (you need the paid-for versions for those). It appears to support K&R code, over ANSI. Why are you using K&R anyway, ANSI C gives you warning about incorrect parameters, and automatic casting. CS Miller (talk) 16:29, 25 July 2014 (UTC)
- Maybe I wasn't clear. I wasn't asking how to unzip the files. I did download the ZIP file and I did extract the files for Borland C. What do I do to install the compiler? All that the unzipping does it to create a folder of files. It doesn't install the compiler. Also, what does Visual Studio Express do? Will it compile K&R C, or does it do something else? Robert McClenon (talk) 16:11, 25 July 2014 (UTC)
- Unless you have some ancient programs to compile that will only work on Borland C (16 bit segmented programs, TurboVision, OWL, .COM creation) you should not need, and shouldn't use, Borland C. The obvious choice for C development on Windows is Visual C/C++, as CS Miller has noted. Apart from that, there is GCC (you'd probably install the MinGW environment to get it and its toolchain) or you'd use an IDE like Code::Blocks, Eclipse, Netbeans, Bloodshed, or Qt Creator, which all use GCC too. C as described in the 2nd (latest, still very old) edition of K&R is (essentially) ANSI C (the older form, found in the even more ancient 1st edition, is very rarely seen these days). -- Finlay McWalterᚠTalk 17:00, 25 July 2014 (UTC)
- So is Visual C/C++ consistent with ANSI C? Visual Basic is not the same as other Basic implementations (as if Basic ever were a standard language). I don't have ancient code; I want to write new code. Robert McClenon (talk) 17:16, 25 July 2014 (UTC)
- Yes. Much more so than 16-bit Borland C, where you'll run into limitations of the memory model (segmented memory, FAR pointers) which correspond to nothing in K&R. -- Finlay McWalterᚠTalk 17:24, 25 July 2014 (UTC)
- Am I correct that segmentation was needed to work around the limitations of the 16-bit architecture on the 8086 and 80286? Robert McClenon (talk) 23:35, 26 July 2014 (UTC)
- Segmentation (in real mode) was needed to make the 8086 and 8088 look and feel more like their 8-bit predecessors to the software. It obviated the need to make program images relocatable (COM files supplied no relocation information and had a fixed load address (0x100) but the system was still able to load them at any physical address divisible by 16) and it facilitated the translation of legacy software Asmrulz (talk) 02:52, 27 July 2014 (UTC)
- Am I correct that segmentation was needed to work around the limitations of the 16-bit architecture on the 8086 and 80286? Robert McClenon (talk) 23:35, 26 July 2014 (UTC)
- Visual C++ is Microsoft C/C++ rebranded by marketing after the release of Visual Basic. There's nothing Visual about it. -- BenRG (talk) 19:57, 26 July 2014 (UTC)
- If I Google on Microsoft Visual C, I see, among other things, options to install Microsoft C++ Redistributive. Am I correct that that isn't what I want, because only permits me to run C programs compiled on someone else's machine if I don't have my own compiler? In that case, is Visual Studio Express what I want? It is described as a tool page, but a compiler seems like something that stands on its own and is not merely a tool package or part of a tool package. Robert McClenon (talk) 23:35, 26 July 2014 (UTC)
- Yes, the redistributable is useless to you. You want either "Visual Studio Express 2013 for Windows Desktop" or "Visual C++ 2010 Express". The latter may be a smaller download and use less disk space. It also supports C, despite the name. -- BenRG (talk) 00:08, 27 July 2014 (UTC)
- Since C++ is a proper superset of C, any compiler that supports C++ supports C. The compiler won't return an error just because there are no objects. Robert McClenon (talk) 03:24, 27 July 2014 (UTC)
- Mostly true. There are a few weird contrived C constructs that won't compile in C++. You can come up with some by mixing C-style comments with C++-style ones, for example.
a = b//*This is a C comment*/ 2;
- In C, this just sets a to b/2, but in C++, it sets a to b but is missing a semicolon. --Trovatore (talk) 03:40, 27 July 2014 (UTC)
- There are much bigger differences than that. For example char *p = malloc(1234); is legal C but not legal C++ (C++ requires an explicit cast to char *). In C it's legal to use printf without including stdio.h, in C++ it's not. Also, C99 and C11 added many features to C that are not in C++ and probably never will be. Visual C++ 2013 appears to support compound literals and designated initializers (both C99 features) in C mode but not C++ mode. (C99 also added // line comments, so your comment-syntax example is no longer valid.) -- BenRG (talk) 05:12, 27 July 2014 (UTC)
- The relationship between C and C++ is beside the point. The compiler operates in a different mode when compiling C or C++ (indeed, there are different modes for each of the C standards and the different C++ standards). You tell the compiler which mode to operate in (either explicitly at the command line, or it infers it from the source file extension). -- Finlay McWalterᚠTalk 13:10, 27 July 2014 (UTC)
- "Fixed" it:
a = b//*This is a C comment*/ 2;
-c++;
- This compiles on both, but C's which don't recognize the "//" atom (programming) (i.e. don't treat the rest of the line as a comment) see the
-c++;
part as a separate instruction to compute the negative of c, increment c, and will probably issue a warning that there are no side effects. - C's which include "//" comments will subtract c; depending on the values of b and c, the compiled program can check if its compiler recognized "//" comments.
- The "++" part was included for punnery purposes only. - ¡Ouch! (hurt me / more pain) 06:55, 28 July 2014 (UTC)
- "Fixed" it:
- Mostly true. There are a few weird contrived C constructs that won't compile in C++. You can come up with some by mixing C-style comments with C++-style ones, for example.
- Since C++ is a proper superset of C, any compiler that supports C++ supports C. The compiler won't return an error just because there are no objects. Robert McClenon (talk) 03:24, 27 July 2014 (UTC)
- Yes, the redistributable is useless to you. You want either "Visual Studio Express 2013 for Windows Desktop" or "Visual C++ 2010 Express". The latter may be a smaller download and use less disk space. It also supports C, despite the name. -- BenRG (talk) 00:08, 27 July 2014 (UTC)
- If I Google on Microsoft Visual C, I see, among other things, options to install Microsoft C++ Redistributive. Am I correct that that isn't what I want, because only permits me to run C programs compiled on someone else's machine if I don't have my own compiler? In that case, is Visual Studio Express what I want? It is described as a tool page, but a compiler seems like something that stands on its own and is not merely a tool package or part of a tool package. Robert McClenon (talk) 23:35, 26 July 2014 (UTC)
- Yes. Much more so than 16-bit Borland C, where you'll run into limitations of the memory model (segmented memory, FAR pointers) which correspond to nothing in K&R. -- Finlay McWalterᚠTalk 17:24, 25 July 2014 (UTC)
Turning Off Scheduled Update on Laptop
I have a Dell laptop with Windows 8. Three days ago, it started telling me that it would restart in 2 days in order to apply updates. Yesterday, it restarted itself (without giving me a choice to delay it), but then the installation of the updates failed, and the process of the restart and the backing out of the updates took about 90 minutes. I have now used the Control Panel so that it now checks for updates but prompts me as to whether to apply them. However, it is again saying that it will restart in two days. I used the troubleshooter to correct one problem with the updates. My question is whether I can remove the cached updates so as not to risk another update failure, or whether is anything else that I can to do to avoid having another failed update. Robert McClenon (talk) 15:01, 25 July 2014 (UTC)
- My guess is that it's smart enough not to reuse a cached update that failed. StuRat (talk) 00:28, 26 July 2014 (UTC)
- I don't think so. Why is it telling me that it will restart in two days? Robert McClenon (talk) 00:44, 26 July 2014 (UTC)
- That would mean it will try to re-download the update(s), not use the (possibly corrupted) cached version(s). StuRat (talk) 01:50, 26 July 2014 (UTC)
When it comes down to information processing (and not storing), what are the most basic units?
What are the 0s and 1s of information processing? OsmanRF34 (talk) 22:33, 25 July 2014 (UTC)
- 0s and 1s. AndyTheGrump (talk) 22:41, 25 July 2014 (UTC)
- Information processing is not quantified in that manner. -- Gadget850 talk 23:55, 25 July 2014 (UTC)
- I wonder if the original poster is thinking of Logic in computer science or Boolean algebra? Jc3s5h (talk) 00:00, 26 July 2014 (UTC)
- I would still call a unit of data (that can contain only a 1 or 0) a bit, in any case. StuRat (talk) 00:22, 26 July 2014 (UTC)
- Clarification: I was thinking what are the operations that cannot be broken down further. OsmanRF34 (talk) 08:00, 26 July 2014 (UTC)
- One is theoretically enough. Asmrulz (talk) 12:38, 26 July 2014 (UTC)
- See RISC. StuRat (talk) 22:46, 26 July 2014 (UTC)
- Depending on exactly what you mean by an operation, you might be interested in the Turing machine article. If you mean what are the simplest operations needed to implement an arbitrary operation on two bit strings to yield a third bit string, it suffices to be able to perform these operations:
- COPY a bit from input to output
- INVERT a bit
- output a 0 regardless of input
- output a 1 regardless of input
- AND (two inputs)
- OR (two inputs)
- Strictly speaking, it isn't necessary to have both the operations AND and OR; only one of the two is really necessary. A book on combinational logic will confirm this. Jc3s5h (talk) 23:45, 26 July 2014 (UTC)
- Depending on exactly what you mean by an operation, you might be interested in the Turing machine article. If you mean what are the simplest operations needed to implement an arbitrary operation on two bit strings to yield a third bit string, it suffices to be able to perform these operations:
- You can do better than that. One instruction set computer describes several single logic operations that are sufficient to make a Turing-complete computer. So, for example, a computer that can ONLY execute the "subneg" instruction ("Subtract and branch if negative") can do everything that any other computer can do. SteveBaker (talk) 05:19, 29 July 2014 (UTC)
- Maybe NOR logic or CMOS is what you're looking for? -- BenRG (talk) 07:00, 27 July 2014 (UTC)