Wikipedia:Reference desk/Archives/Computing/2007 March 2
Computing desk | ||
---|---|---|
< March 1 | << Feb | March | Apr >> | March 3 > |
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. |
March 2
[edit]Learning languages
[edit]Do people usually learn computer languages and programming languages by themselves or in a class? --The Dark Side 01:54, 2 March 2007 (UTC)
- Depends on the person, but it's probably best to learn the principles of computer programming and at least one language in a class, allowing you to more easily teach yourself other languages from books or the internet. --Canley 10:12, 2 March 2007 (UTC)
- It probably also depends on the language in question. It is relatively easy to teach yourself something like VBScript, which is only a few steps removed from common, everyday language in certain forms. For things which require a bit more abstract thought about how computers work (memory management, ports, etc.) it becomes a lot harder to wander in unguided (not impossible, mind you, but you are probably going to have to have a lot of commitment to get much out of it). --140.247.251.81 17:36, 6 March 2007 (UTC)
Mass un-capitilization
[edit]Hi is there any way to turn all the filename of a large group (100) of files into all lowercase characters on a Windows machine? For example: "Something.jpg" into "something.jpg". I am asking because I'm hosting a website on a Linux sever, and apparently the capilization is important when establishing links.
- As well, when I'm backing up files from a hard drive to a USB drive, I have the same files on both drives, but the filenames of the files on my harddrive is all lowercase and when i replace the files on my USB with my lowercased files on my harddrive, the USB files still remain capitalized. Any way to fix this? Thanks. Jamesino 02:05, 2 March 2007 (UTC)
- For the first issue, a Google search: file + renamer + capitalization. − Twas Now ( talk • contribs • e-mail ) 04:26, 2 March 2007 (UTC)
- I'm well-aware that this is a very heavy-handed solution, but if you do a lot of "advanced" manipulation of files of any sort you might find it useful: Emacs. I just threw together a tiny bit of Emacs Lisp that does precisely what you want:
(mapcar (lambda (f) (rename-file f (downcase f))) (directory-files "." nil "[^.]"))
- ...obviously "downcase" can become "upcase" or, with a bit more work, "abbreviate to 12 characters", or whatever else; you could also make it only affect ".jpg" files, or make it recursive (an entire directory tree at a time). Anyway, enough evangelizing; it's just an answer to many questions so I thought it worthwhile. As for the second thing, delete the files on the USB drive and then copy the HDD's files again. --Tardis 06:06, 2 March 2007 (UTC)
- If you have a Unix-like system, tr can easily do this. If you have Perl, Python, or other similar langauges, a few moments of programming using one regular expression will allow you to make a tool that can do this.
D-FileMU will do what you want and much more. A great program for renaming files. http://www.pcadvisor.co.uk/downloads/index.cfm?categoryID=1474&itemID=29329 GooPC 20:07, 7 March 2007 (UTC)
OCR Software
[edit]Is it possible to get OCR software that reads hand-writing?
- Yes, though as I understand it, they're not as good as OCRs that do printed text. As for specific, I don't have. Splintercellguy 04:18, (UTC)
- Windows XP has a built in ocr for text User:Nerdd 07:45,2 March 2007 (Utc)
- See also Graffiti (Palm OS) and Apple Newton. Many graphics tablet also include or offer software that can read printing (but usually not script). It's a much simpler problem to read handwriting "on the fly" (as it is written) than it is to read (for example) a scan of some handwriting ex-post facto; capturing the dynamics of the moving hand offers a lot of clues as to what you're actually writing.
- Atlant 14:22, 5 March 2007 (UTC)
- Note that Palm's graffiti (at least the version I used) isn't exactly the same as regular script, I remeber 'k' in particular being very different, almost like a truncated 'infinity' sign. The main problem is the high degree of variance with handwriting as compared to printed typefonts. Even if you could get it to recognise, there may be so many errors it might not be worth it. OCR itself is prone to mistakes, let alone OCR on an irregular medium. Wintermut3 21:33, 8 March 2007 (UTC)
- Atlant 14:22, 5 March 2007 (UTC)
Windows XP - is it possible to make your 'C: drive' spin down?
[edit]Is it possible to configure Windows XP so that it leaves the main hard drive alone for more than 3 minutes in a row? I would like to use the 'turn off hard disks' feature in Power Management to - yup - turn of the hard disk, but even on the shortest timeout (3 minutes), the main hard drive (where Windows, the pagefile and hibernate file live) never gets to stop, however little the machine is doing. Any details of exactly what services/processes might be bothering my drive would be welcome, but I'd also like to know has it ever been done?. Thanks. -84.69.45.120 04:37, 2 March 2007 (UTC)
- Someplace I thought I read somewhere that the NTFS file $LogFile has a header which is updated every few seconds with a new sequence number or timestamp. I thought it was described here, but I don't see it. Anyway, just because "the system" isn't doing much, doesn't mean that the internals aren't busy! Various programs check the windows registry every so often, program execute code or access data sporadically, which might cause a hard page fault. Also, windows prefetchs data it predicts is about to be accessed as part of a caching scheme under certain conditions. Turning off all of this seems akin to asking someone not to exhale for a couple hours. —EncMstr 05:35, 2 March 2007 (UTC)
- Even if you could, you don't want to do that. Spinning up and down often will harm the hard disk. – b_jonas 08:34, 2 March 2007 (UTC)
Inverted screen
[edit]One of the computers in our college digital library is having an inverted screen(I dont know how it got into that condition).How can I revert it back to it's original position of straight screen.
- Check video card/display settings for Windows? Splintercellguy 06:07, 2 March 2007 (UTC)
- If it's the same as the ones we used to have, hit Ctrl+Alt+(up arrow). — Matt Eason (Talk • Contribs) 09:37, 2 March 2007 (UTC)
- Thanks a lot for you'r lovely help. —The preceding unsigned comment was added by 218.248.2.51 (talk) 05:05, 5 March 2007 (UTC).
Running as arbitrary ring
[edit]Is there any built-in way to get Windows or Linux to assign a particular running program Ring 0 priviliges? I realize that this is very bad form but I like having control over my computer and this seems like something that's important to know. --frothT 07:01, 2 March 2007 (UTC)
- You can setuid 'nix programs to run with root privileges, but you can't do this once the program has already started running. If I understand correctly, ring 0 is essentially kernel space, and no operating system worth its salt will let you run a program in kernel space.
- Yeah I don't mean root, I mean actual kernel space. If I wanted to test a program from within Linux.. a program that needs the direct hardware control that Ring 0 provides, how would I make this happen? Since linux is open-source it shouldn't be too much of an issue to add this functionality to your own kernel revision or something. --frothT 15:00, 2 March 2007 (UTC)
- Write a loadable [virtual] device driver. See here. —EncMstr 17:30, 2 March 2007 (UTC)
- You don't need ring 0 to have direct hardware control. You just have to do the same thing the X server does:
iopl(3)
orioperm()
to get access to the I/O ports, andmmap()
of/dev/mem
to get access to the memory-mapped registers. Of course, you still can conflict with the kernel's handling of the hardware (this has been an issue with the X server in the past; someday the relevant parts of the graphics driver will end up in the kernel instead), and you cannot handle interrupts (there is a "user-mode driver" patch floating to allow you to handle interrupts in user mode, with only a small stub in the kernel to acknowledge the interrupt). That said, unless the hardware you want to control is like USB (which can safely be managed from userspace with something like libusb), I'd recommend you write a full kernel-mode device driver (it's not that hard; I've done it recently). --cesarb 01:00, 3 March 2007 (UTC)
- You don't need ring 0 to have direct hardware control. You just have to do the same thing the X server does:
Firefox search thing
[edit]I have two computers. Both have firefox. One of them's firefox 1.5, and the other's firefox 2.0. On the 1.5 one, when i type seperate words, not adresses, into the address bar (not the search bar), it would automatically load a page related to it. I think it may have basically been using google's feeling lucky thing that opens the search found to be the most popular. it was really nice, because i could type, say, "amazon no sun in venice" and be taken to the amazon.com site specific to that modern jazz quartet cd. this doesn't happen on the computer with 2.0. I don't know if this has always been the case. I just started using the computer again after a while of only using my laptop (with 1.5). But I was hoping one of you knew how I might be able to make my firefox 2.0 do that. i really liked it. thanks, sasha
- Here you go --frothT 07:07, 2 March 2007 (UTC)
Danke
Statistical distribution of bits
[edit]Has anyone ever done a study of the statistical distribution of 1s and 0s in registers as various programs run? What would you think would be seen more often, 1s or 0s? --frothT 07:03, 2 March 2007 (UTC)
- That's going to vary widely depending on the particular register(s), their function, the program, and the alignment of Venus with Mars. Without any further information, I'd guess that the pmf converges upon a uniform distribution as time goes on. -- mattb
@ 2007-03-02T07:19Z
- It will vary widely, but you have to consider that most of the numbers stored in registers will be (much) smaller than the register's maximum value, especially on 64b platforms. This is a direct result of architecture (nobody has fully populated RAM, so pointers won't get the most significant bits set, ever), and would lead to more 0's than 1's, I believe. Droud 13:27, 2 March 2007 (UTC)
- 0 will be seen more often. Not only is zero a commonly used number, but also small positive numbers (which have a lot of zero bits) are very common. --cesarb 14:32, 2 March 2007 (UTC)
- Also, ASCII (commonly used for text) is mostly 7-bit (extended ASCII is rare compared to normal ASCII). The 8th bit is normally a 0. --Kainaw (talk) 17:21, 2 March 2007 (UTC)
Photoshop JPEG color downsampling.
[edit]At what quality settings does Photoshop CS2 apply 4:4:4, 4:2:2 and 4:2:0 color sampling? --24.249.108.133 19:33, 2 March 2007 (UTC)
Graphics card - what does this mean?
[edit]I'm looking at the specs for the NVIDIA GeForce 7300 GT. The specs say this "NVIDIA GeForce 7300 GT 256MB of GDDR2 SDRAM (1 x single-link DVI / 1 x dual-link DVI)". So does that mean that it will support two monitors from the one card, i.e. one monitor on the single link connector and one on the dual link connector? Or does it mean that it will support one monitor with either a single or dual link connector? Dismas|(talk) 20:29, 2 March 2007 (UTC)
- Nevermind, I found out. One place said "(single-link DVI /dual-link DVI)" which led me to believe it was one connector which would work with both. Another place said "(1 x single-link DVI / 1 x dual-link DVI)" which made me think it was one of each on the same card. Rooting around more I found "making it capable of simultaneously supporting one 23-inch and one 30-inch Apple Cinema Display." So, I have my answer. Dismas|(talk) 20:35, 2 March 2007 (UTC)
Reset a Dell Dimension 4600
[edit]How do you reset a Dell Dimension 4600 to its original settings? 68.193.147.179 21:36, 2 March 2007 (UTC)
- Assuming you mean you want to reset the BIOS settings so you can get to the menu where you can configure boot devices, etc.? Disconnect power and pull out the little battery on the motherboard for a few minutes. It's not sufficient to use the unit's power switch as some power is still applied and might maintain the CMOS memory. If that doesn't do it, it might be necessary identify and operate a reset jumper on the motherboard. —EncMstr 21:55, 2 March 2007 (UTC)
- I mean is there an easy way to restore the factory defaults (like reseting the "C:" drive)? 68.193.147.179 22:05, 2 March 2007 (UTC)
- Did your Dell Dimension come with a recovery CD? That's what you would use to restore to out-of-box install. Splintercellguy 22:07, 2 March 2007 (UTC)
- I think I only have a WinXP Home reintall CD-ROM. 68.193.147.179 22:11, 2 March 2007 (UTC)
- Is this like a stand-alone Windows setup CD? Or is it a CD that re-creates the partition from out-of-box? If you do perform the recovery/reinstall, be sure to back up! Splintercellguy 01:03, 3 March 2007 (UTC)
- It is a CD-ROM that is a "stand-alone Windows setup CD". 68.193.147.179 03:11, 3 March 2007 (UTC)
- In that case, start up Windows setup, format in setup, then install? You might lose the bundled stuff though so BACK UP! Splintercellguy 03:39, 3 March 2007 (UTC)
- I f I drop files into D: Drive will that save it? 68.193.147.179 03:44, 3 March 2007 (UTC)
- it depends what D: is, if D: is an external drive of sufficient size, then yes, if it's a mass storage device then yes, if it's a recovery partition then defiantly not. Either way, make sure to create a recovery disc before you reformat, unless you have a separate disk somewhere with all your drivers on it--VectorPotentialTalk 16:50, 3 March 2007 (UTC)
- I f I drop files into D: Drive will that save it? 68.193.147.179 03:44, 3 March 2007 (UTC)
Trouble converting LaTeX PDF to SVG via pstoedit and skconvert.
[edit]I'm using beton.sty
and euler.sty
in a LaTeX file. I intend to replace AMS_Euler_sample.png with an SVG. I get this when trying to convert the file.
$ pstoedit -dt -psarg "-r9600x9600" euler.pdf -f sk euler.sk pstoedit: version 3.42 / DLL interface 108 (build Jan 19 2006 - release build) : Copyright (C) 1993 - 2005 Wolfgang Glunz Warning: image operation ignored due to restriction of target format or driver (repeated 12 times) $ skconvert euler.sk euler.svg $
In the resultant SVG, the "sin" and "cos" operators don't print (they were in Concrete Roman to match the math symbols). I'm thinking there's something wrong with the beton
package (if I remove beton
, the operators appear, albeit in Computer Modern), in that the fonts it inserts won't convert with pstoedit... but what? And how can I fix it?
$ pdflatex euler.tex This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./euler.tex LaTeX2e <2003/12/01> Babel <v3.8d> and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk, polis h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedish, tur kish, ukrainian, nohyphenation, loaded. (/usr/share/texmf-tetex/tex/latex/base/article.cls Document Class: article 2004/02/16 v1.4f Standard LaTeX document class (/usr/share/texmf-tetex/tex/latex/base/size12.clo)) (/usr/share/texmf-tetex/tex/latex/beton/beton.sty Package: `beton' v1.3 <1995/03/05> (FJ) ) (/usr/share/texmf-tetex/tex/latex/euler/euler.sty Package: `euler' v2.5 <1995/03/05> (FJ and FMi) LaTeX Font Warning: Encoding `OML' has changed to `U' for symbol font (Font) `letters' in the math version `normal' on input line 35. LaTeX Font Warning: Encoding `OML' has changed to `U' for symbol font (Font) `letters' in the math version `bold' on input line 35. ) (./euler.aux) (/usr/share/texmf-tetex/tex/latex/concmath/ot1ccr.fd) (/usr/share/texmf-tetex/tex/latex/amsfonts/ueur.fd) (/usr/share/texmf-tetex/tex/latex/amsfonts/ueuf.fd) (/usr/share/texmf-tetex/tex/latex/amsfonts/ueus.fd) (/usr/share/texmf-tetex/tex/latex/amsfonts/ueuex.fd) [1{/var/lib/texmf/fonts/ma p/pdftex/updmap/pdftex.map}] (./euler.aux) )</usr/share/texmf-tetex/fonts/type1 /bluesky/cm/cmsy10.pfb> </var/cache/fonts/pk/ljfour/public/concrete/ccr10.720pk ></usr/share/texmf-tetex/fonts/type1/bluesky/euler/eufm7.pfb></usr/share/texmf- tetex/fonts/type1/bluesky/cm/cmex10.pfb></usr/share/texmf-tetex/fonts/type1/blu esky/euler/eufm10.pfb></usr/share/texmf-tetex/fonts/type1/bluesky/euler/eurm7.p fb></usr/share/texmf-tetex/fonts/type1/bluesky/euler/euex10.pfb></usr/share/tex mf-tetex/fonts/type1/bluesky/euler/eurm10.pfb> Output written on euler.pdf (1 page, 26806 bytes). Transcript written on euler.log.
Here's hoping someone has experienced similar troubles and found a way around them. grendel|khan 21:52, 2 March 2007 (UTC)
- Well, mentioning this, you informed me of a copyright violation (thanks!). When I originally uploaded the image, I added the source as well -- but it's written in plain TeX. Perhaps plain TeX that source, ps2pdf it, then try whatever juju you're doing to get it to a PDF. While you're at it, you might want to change the 3 in that integral to a t, remove the C, and change every x on the right hand side to a t (my bad): so it reads
- Dysprosia 23:36, 2 March 2007 (UTC)
- No dice; same error. (Though I did figure out that to suppress page numbering in that example of yours, I just had to do a
\def\rightheadline{\relax}
.) I wonder which mailing list I should take this to--whose fault is it, really? grendel|khan 07:50, 3 March 2007 (UTC)
- No dice; same error. (Though I did figure out that to suppress page numbering in that example of yours, I just had to do a
- TeXing it works fine for me, perhaps there's something wrong with your installation? I don't have pstoedit so I can't test further, sorry. Dysprosia 13:05, 3 March 2007 (UTC)
- TeXing works fine for me too; the problem is converting to SVG. Something about the Concrete Roman font doesn't like being converted through pstoedit, but I can't imagine why it would fail--and I don't know who to ask about it. I'll file a bug with pstoedit, I guess. grendel|khan 15:07, 3 March 2007 (UTC)