Jump to content

Wikipedia:Reference desk/Archives/Computing/2012 October 24

From Wikipedia, the free encyclopedia
Computing desk
< October 23 << Sep | Oct | Nov >> October 25 >
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.



October 24

[edit]

Font size of the subtitles shown by Adobe Flash Player11 in Internet Explorer9

[edit]

I watch Web-TV with Windows7, InternetExplorer v.9 and FlashPlayer v.11.
In some of the programs, on some of the web sites, there is a button at the bottom of the flash window that lets me toggle subtitles on and off, but those subtitles are far to small for me to read.
How may I increase the font size of the Flash Player subtitles?
--89.9.206.6 (talk) 03:14, 24 October 2012 (UTC)[reply]

Flash by default allows you to zoom in on movies by right-clicking on them and choosing the Zoom in option. If they've disabled that feature, then you can just zoom in on the page itself. In IE, you hold down the CTRL key and scroll your mouse wheel to zoom in. If you're talking about the old Web TV with the remote control and TV, then the buttons you press will be different.—Best Dog Ever (talk) 05:47, 24 October 2012 (UTC)[reply]
I have already zoomed all the way in to make the video fit my full screen. Zooming the whole video picture any further is therefore not an option.
I need to only increase the font size of the subtitles. How may I do that? --89.9.206.6 (talk) 07:46, 24 October 2012 (UTC)[reply]

Which websites? ¦ Reisio (talk) 21:13, 24 October 2012 (UTC)[reply]

For instance this one: http://tv.nrk.no/serie/ardna-samisk-kulturmagasin-2012
--(OP) 89.9.197.107 (talk) 05:12, 26 October 2012 (UTC)[reply]

MS Outlook Reading Pane

[edit]

I don't like the Reading Pane in Outlook. I prefer to open each email explicitly to read it. I also like to create lots of subfolders to categorize my incoming mail, but at the moment, whenever I create a new folder, I have to go to the View menu and turn the RP off explicitly. Is there a way to disable it permanently
Outlook 2007 on Windows 7. Thanks, Rojomoke (talk) 08:51, 24 October 2012 (UTC)[reply]

In the menu bar, View -> Current View -> Define Views..., then select "Messages" (or, depending on your settings, "IMAP Messages") and hit "Modify...", then click "Other Settings". Reading Pane settings are just below the middle of this window. -- 143.85.199.242 (talk) 16:03, 24 October 2012 (UTC)[reply]
Thanks, but it's already set to "off" there. Both in "Messages" and in "Messages with AutoPreview". Rojomoke (talk) 08:20, 25 October 2012 (UTC)[reply]

Desktop Linux start Equivalent Command

[edit]

Hi.

I've just recently switched from Windows 7 to Desktop Linux 11SP2. On Windows, I could script a set of actions to open applications, and save it to a .bat file, e.g.

start iexplore http://www.fusionio.com/products/iodriveoctal?tab=specs
start explorer "E:\Documents\Brochures\nVidia Graphics\GeForce"
start notepad "E:\Documents\Lists\2012\Shopping Lists\*.txt"

All I've managed to figure out so far is that in Linux the batch file has to be saved with a .sh file extension. What I'm looking for is basically the Linux equivalent of the start command. 11:32, 24 October 2012 (UTC)~ — Preceding unsigned comment added by 27.104.238.175 (talk)

1. Save your commands to any .sh file using your favorite text editor, separated by line. It's good practice to start the file with "#!/bin/sh" on the first line.
2. Make the .sh file executable by executing "chmod a+x filename.sh".
3. Run the .sh file by simply typing "./" before the filename. So to run test.sh, you would type "./test.sh".
Habstinat (talk) 11:39, 24 October 2012 (UTC)[reply]
Thanks, Habstinat, but any idea what's the equivalent in Linux for the Windows start command? Thanks again, 11:51, 24 October 2012 (UTC). — Preceding unsigned comment added by 27.104.238.175 (talk) [reply]
I think it is the screen command, though this is not an exact equivalent. If you are just starting browsers and things you can just use a command with an & on the end. -- Q Chris (talk) 12:11, 24 October 2012 (UTC)[reply]
If I understand start correctly, you want to create a new terminal (text) window for each command and run the command as a child of that (so you can see error messages and stuff it printfs). To do that on a unix-like system like Linux, you'd write a script that, for each command, opened a terminal windows and passed it a command to run with its -e option. The following is an example for gnome-terminal; -e works for xterm and oterm too, and I think for KDE's terminal and others.
#!/bin/bash
nohup gnome-terminal -e "gedit foo" > /dev/null &
nohup gnome-terminal -e "inkscape blah.svg" > /dev/null &
Just change the quoted commands to suit your needs. -- Finlay McWalterTalk 13:26, 24 October 2012 (UTC)[reply]
But if you just wanted to start those programs, without the text window for each, you'd say:
#!/bin/bash
nohup gedit foo > /dev/null &
nohup inkscape blah.svg > /dev/null &
-- Finlay McWalterTalk 13:27, 24 October 2012 (UTC)[reply]
Only use nohup if you want the command to carry on running after you log out. This might stop the application shutting down cleanly at shutdown. -- Q Chris (talk) 15:11, 24 October 2012 (UTC)[reply]
Resolved

commenting code

[edit]

Hi, this is a pretty simple one, but I am genuinely curious. I was writing some code just now, and it occurred to me there is only one line in one of my functions that really does anything. This is of course rather common - most of a function is just setting things up, then you do something useful for one or two lines, then you clean up after yourself. I'm wondering if there is a standard computing term for the line of code that does the actual work, simply because I can't think of a good term for it when commenting. I just want to write a single standard comment beside these "workhorse" lines, and if there is any conventional way of doing it, I'd be really thankful for anyone telling me. IBE (talk) 11:45, 24 October 2012 (UTC)[reply]

Not aware of a standard, but if it were me, I would just write /* do it */, and then /* clean up */ for the following part if necessary. Looie496 (talk) 15:13, 24 October 2012 (UTC)[reply]
I label my code "Initialization", "Body", and "Termination". In your case, you are talking about the body of the function. StuRat (talk) 16:43, 24 October 2012 (UTC)[reply]
No clue on standards (doubt there is one), but your question did remind me of the amusing commenting in this code in which the crucial line has, well, attention drawn to it. --Mr.98 (talk) 01:59, 25 October 2012 (UTC)[reply]

"Real Programmers use Fortran. Quiche Eaters use Pascal. "

[edit]

The sentence is from the 80s. How would we say it today? OsmanRF34 (talk) 12:48, 24 October 2012 (UTC)[reply]

"Real Programmers use Java, Quiche Eaters use Scala"? Or (sorry can't resist it) "Programmers use C++, Italian Politicians use Ruby". -- Q Chris (talk) 13:20, 24 October 2012 (UTC)[reply]
How about, "Real programmers use C, quiche eaters use C#"? Looie496 (talk) 15:15, 24 October 2012 (UTC)[reply]
The phrase appears to originate from the essay Real Programmers Don't Use Pascal although per the talk page and Real Programmer, the 'real programmers' and 'quiche eaters' concepts appear to predate the essay. The article on the essay doesn't give any more recent examples (although does link to a XKCD on the concept of real programmers) but the article on Real Programmer gives an unsourced example from the 90s, ironically (or perhaps not so ironically if you consider it a natural evolutuon of real programmers) given the above answers, that real programmers use C rather then C++ or Java. Nil Einne (talk) 15:38, 24 October 2012 (UTC)[reply]
Yes, Java™ replaced Pascal. ¦ Reisio (talk) 21:16, 24 October 2012 (UTC)[reply]
But nothing replaced Fortran? Nil Einne (talk) 22:33, 24 October 2012 (UTC)[reply]
Fortran continued to evolve, and now offers many of the features of newer languages. No more limits to 8 character, uppercase-only variable names, for example. StuRat (talk) 22:41, 24 October 2012 (UTC)[reply]
Are there non-trivial improvements? (Like, say, support for object-oriented programming?) I mean, being able to not use ancient variable names is an improvement, I guess, but it seems the equivalent of NOW GRIT FREE! product labeling — a reminder of how awful the original was rather than a genuine mark in its favor. --Mr.98 (talk) 13:16, 25 October 2012 (UTC)[reply]
I wouldn't exactly call the ability to have useful variable names trivial. But, yes, Fortran 2003 explicitly supports OOP: [1]. There are many other non-trivial improvements, as well. StuRat (talk) 13:43, 25 October 2012 (UTC)[reply]
My question was whether anything replace Fortran in the real programmers bit, not whether or not Fortran continued to evolve. Nil Einne (talk) 04:33, 26 October 2012 (UTC)[reply]
As a real programmer, I, of course, still use Fortran, but I'm also learning Python, Ruby, etc., to see how the other half lives. StuRat (talk) 21:19, 24 October 2012 (UTC)[reply]
If someone can't stop telling you about C# being much better than VB.Net, he will most likely prefer quiche over pizza. Furthermore, I consider that case sensitivity must be destroyed. Joepnl (talk) 20:55, 25 October 2012 (UTC)[reply]
Agreed, and that's one reason why I use Fortran. StuRat (talk) 05:12, 26 October 2012 (UTC) [reply]
In my industry, there is a program used by most companies for invoice calculation and billing. It has a full GUI running on Windows XP and is written entirely in FORTRAN (originally in the 1970's, then continuously updated).OldTimeNESter (talk) 19:49, 31 October 2012 (UTC)[reply]

New behavior of Google

[edit]

Yesterday and today Google has consistently behaved differently from the way it's always behaved in the past. Formerly you could type a word or a phrase in the search box and then hit "enter", and got results. Now as soon as you type the first letter, when you haven't hit "enter", it behaves as if that single letter were the whole set of search terms. Why is this happening? 174.53.163.119 (talk) 13:24, 24 October 2012 (UTC)[reply]

This sounds like Google instant, and has been around a while. IBE (talk) 14:26, 24 October 2012 (UTC)[reply]
It's not at all like Google Instant. It doesn't just show results consistent with what you've typed so far; rather it refuses to let you type any more. When you've typed just one letter, it goes to a new page showing the results. The search box you were typing in is no longer there. There's a new one near the top of the page. 199.17.35.182 (talk) 16:39, 24 October 2012 (UTC)[reply]
Like many things in this 'modern world', Google has been 'dumbed down' and made for average point and click idiot. You can't do a specialized search using logical operators. (+ - , etc) i.e. + "Joe Smith the barber" - butcher is (was) supposed to get you results that do not include 'butcher'. It's too bad. There are two prevailing theories: 1. Google is catering to shoppers and have been persuaded by big money interests to dump every imaginable search result into the mix. 2. There are big brother types who are uncomfortable with the idea that the average person has so much access to information. 'We can't have that, can we? -- We must keep the masses divided against each other and ignorant. — Preceding unsigned comment added by 99.73.91.132 (talk) 19:04, 24 October 2012 (UTC)[reply]
Do you have a source on the removal of the "-" operator? I just tried "test search -query" (without quotes) and didn't have any results containing query. "+" was disabled shortly before introducing Google Plus, presumably they use it or planned on using it for queries related to plus. The "intext:" prefix still forces the term to be included. 209.131.76.183 (talk) 19:11, 24 October 2012 (UTC)[reply]
Here is a fairly current list of Google search operators. -- BenRG (talk) 06:17, 25 October 2012 (UTC)[reply]
I just tried Google - it works the same as it has for me since Google Instant was introduced. If I type a character, it starts showing results and the box moves to the top of the screen. The character I entered is still in the search box, and it maintains focus so I can continue typing the rest of my query. As I type, the results are automatically updated. Is it behaving differently for you? Here is Google's page describing Instant: [2] The page also has instructions for disabling it. 209.131.76.183 (talk) 19:08, 24 October 2012 (UTC)[reply]

Most web browsers allow you to search directly from the location bar (or at the very least a separate search bar). ¦ Reisio (talk) 21:19, 24 October 2012 (UTC)[reply]

Making and Selling apps for Microsoft Surface tablet

[edit]

What is the IDE used to make and test/simulate apps for the Windows RT device? How and where does one set up a seller account on whatever app market it is where such things end up? 20.137.2.50 (talk) 18:23, 24 October 2012 (UTC)[reply]

Windows Store has a summary. This page links to details of how one develops code, this one on commercial details, and this about registering. The usual Microsoft IDE, Visual Studio (and its Express version) are used. -- Finlay McWalterTalk 18:45, 24 October 2012 (UTC)[reply]
Thanks. It looks like the requirement of the development PC running Windows 8 will be a show stopper for me personally, but that's immaterial to your very useful sources. 20.137.2.50 (talk) 19:16, 24 October 2012 (UTC)[reply]

Num Lock popularity

[edit]

Among people who use full keyboards, those featuring a Num Lock key, do more people keep it on, to use the numeric keypad for numbers, or off, to use the keypad for navigation? I can't seem to find any statistics on this. -129.120.41.156 (talk) 18:59, 24 October 2012 (UTC)[reply]

I'd be surprised if the majority of people who know what numlock is don't prefer having it on. Most people, however, I dare say do not even know what it's for. ¦ Reisio (talk) 21:21, 24 October 2012 (UTC)[reply]
Well, I know what it is, and the only time I turn it on is when I need to enter a bunch of numbers. Looie496 (talk) 21:28, 24 October 2012 (UTC)[reply]
That makes one. ¦ Reisio (talk) 23:04, 24 October 2012 (UTC)[reply]
Doesn't a "full" keyboard mean that you have the navigation keys in a separate section between the typewriter section and the numeric part? I don't really understand why you would want to use the numeric keypad for navigation, instead of the dedicated keys. I keep Num Lock on all the time, and it's an annoyance when it accidentally gets turned off; I wish I could set it to be automatically on at the hardware level. --Trovatore (talk) 21:33, 24 October 2012 (UTC)[reply]
Using the numeric keys could help navigation:
1) I don't like how the standard arrow keys put the right and left arrow on the same line as the down arrow. They could easily fix this, but don't seem to care to.
2) The 5 key between the arrow keys on the numeric keypad can also be used to stop moving or return to the starting point.
3) The 1, 3, 7, and 9 keys can also be used to move at angles of 45, 135, -45, and -135. StuRat (talk) 22:16, 24 October 2012 (UTC)[reply]
RE 1: Of course there are a fair number of keyboards that do have + shaped arrow sections, much to the chagrin of traditionalists. :p ¦ Reisio (talk) 23:04, 24 October 2012 (UTC)[reply]
On point 3 (and possibly point 2) that must be some idiosyncrasy of a particular program. The navigation keys mapped to 1, 3, 7, 9 are (respectively), "End", "PgDn", "Home", "PgUp". --Trovatore (talk) 01:23, 25 October 2012 (UTC)[reply]
Yes, the use of each key is application-specific. But, of course, this is also true of the arrow keys. StuRat (talk) 04:34, 25 October 2012 (UTC)[reply]
Purely anecdotally, but when I was quite young I never used it for numbers and was always highly irritated when it was turned on. At some point I hit a stage in my life where playing games didn't happen as much and typing in numbers was more common. Now it's second-nature for me to keep it turned on for numbers, since I never use that area for navigation. I suspect these things are just individual taste and depend on what one really uses the computer for most often, in the end. --Mr.98 (talk) 00:59, 25 October 2012 (UTC)[reply]
I keep mine turned off simply so that I can use the very useful DEL key. I suspect in terms of "popularity" most people don't know how to change the default (which seems to vary from one computer brand to another), so they keep it per the original setup.--Shantavira|feed me 07:23, 25 October 2012 (UTC)[reply]
I suppose the third option is never using the numeric keypad at all. Marnanel (talk) 08:14, 25 October 2012 (UTC)[reply]

Thanks for all the replies. I ask because I always switch it on, and I'm irritated that it's not on by default on more computers. I wondered if enough people use it, why don't they have it on by default. It appears I'm not in any kind of super-majority, though. I do lots of math, and I've done data entry, and entering numbers without looking is so much easier with the numeric keypad. I play Final Fantasy XI as well, but they keypad works for navigation in that game whether or not NumLock is on. Thanks again. -129.120.41.156 (talk) 16:13, 26 October 2012 (UTC)[reply]

Trovatore, I usually remove useless keys from the keyboard, e.g. the menu key which came with "Windows95" keyboards, Shift-Lock, the left Windows-key (I keep the right one, I'm not that likely to press that one by accident,) and the Num Lock key unless some stupid bios inists on turning it off.
And the Power/Sleep/Wake up keys. Whoever invented those deserves a good punch. - ¡Ouch! (hurt me / more pain) 08:17, 30 October 2012 (UTC)[reply]

In the late 80's/early 90's, there wasn't a single issue of PC Magazine that didn't have a discussion on how to turn Numlock off at startup. Only screenshots of flying toasters were more popular.OldTimeNESter (talk) 19:53, 31 October 2012 (UTC)[reply]

Workaround for missing toolpack add-in

[edit]

Hi,

I am missing my tool pack extension for Office 2000 and have lost the disk which means I cannot install the toolpack add-ins for Excel. Pain in bottom!

I am trying to find all unique 6 letter combinations of some series ie: A,B,C,D,E,F,G,H,I, I know there are 84 combinations, because I did it manually. (It took 3 hours because I was missing 1 series.)

When I try the VBA code:

Sub Test()
X = 9
For N = 1 To 2 ^ 9 - 1
   BinaryString = Left("000000000", 9 - Len(WorksheetFunction.Dec2Bin(N))) & WorksheetFunction.Dec2Bin(N)
   If Len(BinaryString) - Len(WorksheetFunction.Substitute(BinaryString, "1", "")) = 6 Then
       Combination = ""
       For M = 9 To 1 Step -1
           If Mid(BinaryString, M, 1) = "1" Then
               Combination = Combination & Cells(19 - M, 13)
           End If
       Next M
       X = X + 1
       Cells(X, 14) = Combination
   End If
Next N
End Sub

I get runtime error '438':

When I try to debug it highlights

BinaryString = Left("000000000", 9 - Len(WorksheetFunction.Dec2Bin(N))) & WorksheetFunction.Dec2Bin(N)

I am told this is because I am missing the add-in but I can try to write my own code to workaround the problem, but do not know how.

Any advice or help? --Scraggy4 (talk) 19:25, 24 October 2012 (UTC)[reply]

"BinaryString = Left("0000000000", 10 - Len(WorksheetFunction.Dec2Bin(N))) & WorksheetFunction.Dec2Bin(N)" ? I'm not sure if Left underflows at length = 0, but if it does, an index shift by 1 should fix it, including "Mid(BinaryString, M+1, 1)" (I've reformatted Sub Text() slightly.) - ¡Ouch! (hurt me / more pain) 08:18, 30 October 2012 (UTC)[reply]

Star Control II graphics

[edit]

Look at this image I took of Star Control II played on DOSBox and grabbed by the standard screen grabber on Fedora 17. It's all pixelated. I know this is because the image size is 1280×800 which is larger than the game's native resolution. What is the game's native resolution? Is it only 320×200? That resolution might have been state-of-the-art in the days of the Commodore 64, but even when Star Control II was released two decades ago, I am fairly sure both the IBM PC and its contemporary rivals, such as the Amiga and the Atari ST, were easily capable of larger resolutions. In fact, when I viewed the 320×200 preview of the image on Wikipedia, I had to look very closely at the screen to be able to see the details, and my monitor's resolution is only 1680×1050, adequate but not exactly top of the line by today's standards. Also, if you download the image, open it in a graphics editor and zoom in, you can see anti-alias on the pixels. Is this a native feature of DOSBox? Is it possible to turn it off? Nevertheless, I kind of like the pixelated look. For one thing, it keeps reminding me I'm playing a computer game. For another, it makes it very easy to see how Toys for Bob created the graphics. JIP | Talk 19:56, 24 October 2012 (UTC)[reply]

The article says the game was released for the PC in 1992 - the Video Graphics Array adapter (which was pretty cool at the time) could only produce 256 colors at 320x200, and was only released in 1987. It wouldn't be strange for an early 90s game to target VGA, so 320x200 doesn't strike me as odd at all. Besides, if you try to compare the IBM PC compatible to any of its contemparies, you will only be left wondering why the hell it was any success _at all_... Unilynx (talk) 21:12, 24 October 2012 (UTC)[reply]
Yep, although SVGA and similar extensions had been around for a few years at that point and available on PCs, it wasn't common in a lot of games. The VESA standard for it was only defined in 1989, and most games developers had to understand the details of how to use that spec to talk to the video hardware in a low-level way. There weren't simple higher-level APIs and video drivers yet. I see that Star Control came out in 1990, so targeting VGA made a lot of sense - the developers were probably much more familiar with VGA than SVGA, and SVGA wouldn't have had a big chunk of the market share yet. If Star Control II reused a lot of Star Control's code, it would explain not reworking things to use SVGA. Historical data on adoption rates for various video standards would be interesting to see. 209.131.76.183 (talk) 12:32, 25 October 2012 (UTC)[reply]
While it's unlikely to be complete or entirely accurate (was there really a 640 x 480 game from 1982?) and contains a fair few effective duplicates, you can get a generally idea from [3] [4]. The number of games with 640 x 480 wasn't that many from 1987-1992 with a small increase each year, it was only 1993 when you can perhaps say it took off (although I'm not sure if that rate of increase was that much greater). In some cases I expect the move to CDs helped and of course there was also the short lived FMV era. Nil Einne (talk) 16:41, 26 October 2012 (UTC)[reply]
That 1982 game, The Oregon Trail, has been released in many editions for many platforms. Some editions supported SVGA graphics, but they weren't from 1982. (I would have guessed that 1982 was the earliest release date, but according to the WP article that's wrong). -- BenRG (talk) 05:53, 27 October 2012 (UTC)[reply]
If you see square pixels in the scaled image then the anti-aliasing is from the original game. If you don't see square pixel boundaries, you are probably seeing the effect of an upscaling algorithm like bicubic interpolation applied by your image editor. I think DOSBox also supports upscaling algorithms like hq2x, but that would increase the resolution of the screenshot image to 640x400 or 960x600. -- BenRG (talk) 05:53, 27 October 2012 (UTC)[reply]
Old-timers like me remember the VGA days with much fondness (although I would have preferred the vastly superior Amiga to have evolved as the dominant games machine). These were the days before API's like directX and games developers had to either spend a lot of time and effort in writing their own graphics routines, or license API's from bigger producers. Because the storage media had low capacity (floppies of 360K, 1.2M or 1.44M), games were seldom released with photorealism and instead relied on nifty tricks and alogorithms to produce decent graphics. When people eventually tired of VGA and SVGA became the standard, the same problem ensued and games often looked cartoony and even worse than their VGA counterparts. Only when the default medium became a CD did the games become more photorealistic. This was not always a good thing... the days of beautifully rendered art and synth Roland music are long gone... anyone remember Sierra? Sandman30s (talk) 13:37, 28 October 2012 (UTC)[reply]

General linux questions

[edit]

1. With 'df', beside my partitions (like /dev/sda2 mounted as /media/myfiles) I get:

udev                      946780         4    946776   1% /dev
tmpfs                     382240       912    381328   1% /run
none                        5120         0      5120   0% /run/lock
none                      955592       256    955336   1% /run/shm

What are those partitions/directories? And what can you mount 'none' into something?

2. from chmod --help:

Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.

can someone explain the syntax? Comploose (talk) 22:10, 24 October 2012 (UTC)[reply]

See the udev and tmpfs articles for the first two; they're filesystems created by the kernel, which don't correspond to an underlying block storage device. -- Finlay McWalterTalk 22:55, 24 October 2012 (UTC)[reply]
On my system /run/lock and /run/shm are both also tmpfs mounts; they're just little locations some startup script has created to hold file-like objects to do with file locking and shared memory. In both cases they're essentially using the filesystem as a means of interprocess communication. By doing it in a tmpfs (that is, in RAM) they're going to get very fast performance. -- Finlay McWalterTalk 23:02, 24 October 2012 (UTC)[reply]
thanks for the answers. @Looie: it's not about chmod alone, I want to know how to parse `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'. What [], *, | and that + at the end. It'st not about the options ugoa rwxXst but about how such things are to be understood.Comploose (talk) 09:25, 25 October 2012 (UTC)[reply]
It's more or less a regular expression. [ugo] means either u, or g, or o. Similarly, (this|that) means either this or that. A star means zero or more of what it comes after, and a plus means one or more. Does that make sense? Marnanel (talk) 11:00, 25 October 2012 (UTC)[reply]
Yes, thanks. Comploose (talk) 14:54, 25 October 2012 (UTC)[reply]