Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 238: Line 238:
:At the very least, you need a [[PHY (chip)|PHY]] that operates a standard display protocol - like VGA or HDMI. Usually, there's a little hardware to control the PHY, and a video [[frame buffer]]. Without that hardware, you can't get a signal to a monitor. One could ''call'' that hardware a GPU, but in modern terminology, a GPU also usually supports certain specific mathematical operations: [[Transform, clipping, and lighting|"T&L"]], often providing hardware support to a standard API like OpenGL. Those features are't ''required'' to put pixels on a screen; but this hardware is so commonplace that modern operating systems make use of it even during normal use, like displaying windows, editing text, and browsing the web. [[User:Nimur|Nimur]] ([[User talk:Nimur|talk]]) 05:32, 28 August 2012 (UTC)
:At the very least, you need a [[PHY (chip)|PHY]] that operates a standard display protocol - like VGA or HDMI. Usually, there's a little hardware to control the PHY, and a video [[frame buffer]]. Without that hardware, you can't get a signal to a monitor. One could ''call'' that hardware a GPU, but in modern terminology, a GPU also usually supports certain specific mathematical operations: [[Transform, clipping, and lighting|"T&L"]], often providing hardware support to a standard API like OpenGL. Those features are't ''required'' to put pixels on a screen; but this hardware is so commonplace that modern operating systems make use of it even during normal use, like displaying windows, editing text, and browsing the web. [[User:Nimur|Nimur]] ([[User talk:Nimur|talk]]) 05:32, 28 August 2012 (UTC)
Thanks for the reply. So, I assume, then, that disabling the GPU on most modern systems would render the monitor nonoperational, because the PHY chip and the framebuffer are build into the GPU? <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/50.95.200.141|50.95.200.141]] ([[User talk:50.95.200.141|talk]]) 06:41, 28 August 2012 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
Thanks for the reply. So, I assume, then, that disabling the GPU on most modern systems would render the monitor nonoperational, because the PHY chip and the framebuffer are build into the GPU? <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/50.95.200.141|50.95.200.141]] ([[User talk:50.95.200.141|talk]]) 06:41, 28 August 2012 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->

:A computer can well do without graphics circuitry of its own, it can have, say, a [[RS-232|serial]] [[terminal]] attached to it. Early computers worked this way which I think is responsible for the rise of editors like [[vi]], as you can't easily draw [[edit.com|windows, menus and stuff]] over a 300 baud line. [[User:Уга-уга12|Уга-уга12]] ([[User talk:Уга-уга12|talk]]) 11:49, 28 August 2012 (UTC)
A computer can well do without graphics circuitry of its own, it can have, say, a [[RS-232|serial]] [[terminal]] attached to it. Early computers worked this way which I think is responsible for the rise of editors like [[vi]], as you can't easily draw [[edit.com|windows, menus and stuff]] over a 300 baud line. [[User:Уга-уга12|Уга-уга12]] ([[User talk:Уга-уга12|talk]]) 11:49, 28 August 2012 (UTC)


== Play [[Ogg Theora]] and [[Ogg Vorbis|Vorbis]] files directly on iPad ==
== Play [[Ogg Theora]] and [[Ogg Vorbis|Vorbis]] files directly on iPad ==

Revision as of 11:50, 28 August 2012

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


August 23

Getting/ripping songs from a java web game.

I really would like to know the possible ways to 'get' the audio from a game, first of all, it seems that my computer doesn't have "stereo mix" (Yes I've read the guides, that tells how to enable. but no luck), therefore I have no way of recording it from stereomix, I have also tried decompiling the game, so I did decompiled and searched the code for a url or something obvious as where the sounds are loaded, no luck either. Is there anyway for getting the song from a process? What the process is sending to the os and capture the song? or could you scann the process memory looking for an audio file? or maybe scan the packets from the server to see if anything matches to an audio file?

I've tried almost everything, I really really want to have that song. What should I do? (Aside from learn java) 190.158.212.204 (talk) 05:36, 23 August 2012 (UTC)[reply]

It would really help if you told us what kind of computer you're running and what operating system. --Mr.98 (talk) 12:04, 23 August 2012 (UTC)[reply]
Right, Windows 7 ultimate 64 bit. It's toshiba m645-s4047 — Preceding unsigned comment added by 190.60.93.218 (talk) 12:17, 23 August 2012 (UTC)[reply]
If all else fails, just re-record it from your headphone jack. There will be a some loss of quality, but I've found this to be barely detectable (to an untrained ear) in some cases, with a good digital recorder or another computer, and volume controls set carefully. Dbfirs 12:33, 23 August 2012 (UTC)[reply]
Can you give us a link to this game? -- Finlay McWalterTalk 12:55, 23 August 2012 (UTC)[reply]
I guess so.. [1], I'll save you the work to locate the jar in the html as it's here, I figured that it request the sprites while loading using the java console. 190.60.93.218 (talk) 14:49, 23 August 2012 (UTC)[reply]
One way would be to use a program that records whatever is going to the computer's sound card. Search the web for something like record sound card or capture streaming audio. The first program I noticed is the freeware Audacity (audio editor) which looks like it can be used to edit the recording down to the interesting parts. 88.112.47.131 (talk) 16:08, 23 August 2012 (UTC)[reply]
I'm just going to say it's for personal use, I wasn't intending to resell or distribute. Meh, thanks anyway.. 190.60.93.218 (talk) 16:59, 23 August 2012 (UTC)[reply]
Doesn't Audacity (and all the other recording software) rely on a sound card with stereomix that can play and record at the same time? Like the OP, I've never been able to get it to record what is being played on my laptop. Dbfirs 06:43, 24 August 2012 (UTC)[reply]
When I visited the game page, I got a prompt to allow the signed Java applet to run. Since I didn't know exactly what additional access to my computer it wanted, I clicked Cancel. An error page appeared explaining the game was unable to store temporary files to the hard drive, and suggested I create a directory c:\rscache. If you trust the applet not to harm your computer, it sounds like it might store temporary files in a c:\rscache directory. You might look there and see if there are any audio files. --Bavi H (talk) 01:53, 24 August 2012 (UTC)[reply]

You could try this app to get past the no stereo mix problem http://stereomixplus.com/ Bornmiddleaged (talk) 10:25, 26 August 2012 (UTC)[reply]

Emacs basics

If you want to type 20 times a *, how do you do it? If you have several buffers already open, what is the easiest way to jump from one to the other? C-x b nameofbuffer works fine, but it seems to be too cumbersome. I need something like Contrl + Tab. Comploose (talk) 17:26, 23 August 2012 (UTC)[reply]

As there is tab completion in C-x b, I usually do that (that is, C-x b, type a couple of chars, tab, return). The commands previous-buffer and next-buffer are usually bound to Ctrl+x+ and Ctrl+x+ - if not, you can bind them yourself. -- Finlay McWalterTalk 17:35, 23 August 2012 (UTC)[reply]
To get simple command repetition, use C-x u. In this case, C-x u 2 0 *. Paul (Stansifer) 18:12, 23 August 2012 (UTC)[reply]
On my system that's Ctrl+u 2 0 *, where Ctrl+u is bound to the elisp function universal-argument -- Finlay McWalterTalk 18:49, 23 August 2012 (UTC)[reply]


August 24

Use Android 802.11x EAP settings on Windows

So, my school has a semi-hidden network that is secured with some form of 802.11x EAP authentication. I was able to access it on my phone using my school login credentials. However, Windows 7's wireless settings are much more complicated than Android's, and my attempts to find a similar set of settings failed. Could anyone give me any assistance in converting the settings? The settings in Android are:

  • EAP method: PEAP
  • Phase 2 authentication: None
  • CA certificate: Unspecified
  • User certificate: Unspecified
  • Anonymous identity: <blank>

--Hmmwhatsthisdo (talk) 02:49, 24 August 2012 (UTC)[reply]

web based 2D CAD

I am looking for a free web based 2D CAD

can someone help me? --78.48.225.165 (talk) 03:20, 24 August 2012 (UTC)[reply]

Can you describe what you mean by web based ? For example, do you need to collaboratively edit the CAD files with others ? Do you need to access the files from multiple computers ? If you don't need either of these abilities, why does it need to be web based ? StuRat (talk) 03:29, 24 August 2012 (UTC)[reply]
no collaboration functionality needed, on some computers you can't or don't want to install software on the local HDD, I am looking for a 2D CAD that runs out of the browser --78.48.225.165 (talk) 05:27, 24 August 2012 (UTC)[reply]
An alternative might be to put the software on a flash drive and take it with you, along with your CAD files. StuRat (talk) 05:51, 24 August 2012 (UTC)[reply]
I am looking for web based right here --78.48.225.165 (talk) 06:46, 24 August 2012 (UTC)[reply]

Moving parts

This feels like a stupid question before I even ask, but are there moving parts in modern smartphones or tablets? Mingmingla (talk) 05:23, 24 August 2012 (UTC)[reply]

This smart phone appears to have some real buttons, which do move, at least a bit: [2]. (You can make buttons that detect touch, but they are rather unsatisfying, as you want to feel it click.) Also, speakers/microphones must move a tiny bit (either to cause the air to move with sound vibrations, or as a result of those sound vibrations). StuRat (talk) 05:46, 24 August 2012 (UTC)[reply]
Also the motor that provides the vibrate functionality. --Phil Holmes (talk) 08:15, 24 August 2012 (UTC)[reply]
The iPhone also has an accelerometer and a compass, both of which presumably involve moving parts. AndrewWTaylor (talk) 08:27, 24 August 2012 (UTC)[reply]
Hmm, the "compass" is probably a magnetometer, as used in GPS systems. (It would be interesting to know for sure.)--Shantavira|feed me 08:56, 24 August 2012 (UTC)[reply]
Ah, according to this the compass uses the Hall effect, so doesn't no moving parts. AndrewWTaylor (talk) 11:08, 24 August 2012 (UTC)[reply]
A Google search quickly reveals [3] The accelerometer and compass don't have moving parts. It looks like the only things that could count are the motor, the on-off switch and debatably the microphones/speakers. --Phil Holmes (talk) 11:20, 24 August 2012 (UTC)[reply]
The accelerometer does have a moving part, although it's an utterly tiny part and it moves tiny distances. As the accelerometer article notes, a modern MEMS accelerometer is one (or several) little cantilevered bars (built with the same deposition-and-erosion technology as the chip from which they're fabricated). When the device is accelerated (either by moving it, or just by gravity) the little beam flexes (that is, it moves, a tiny amount, in the free space left around it). Measuring this torsion in MEMS accelerometers is implemented either using piezoresistance (the resistance of the bar changes slightly as it's deformed) or capacitively (the moving bar forms one plate of a capacitor, the fixed substrate beneath it the other - tiny movements of the bar change the distance between them, and thus the capacitance of the circuit they form). All of this is quite invisible, as the MEMS device is sealed in the usual plastic or ceramic package for integrated circuits - it just looks like a little chip on your circuit board. But it does rely on that one little thing moving, just a bit. -- Finlay McWalterTalk 13:21, 24 August 2012 (UTC)[reply]
Don't forget all those moving electrons, too! :-) --Phil Holmes (talk) 15:39, 24 August 2012 (UTC)[reply]
And as it is a semiconductor device, you could consider the holes as moving as well :-)) Astronaut (talk) 17:35, 24 August 2012 (UTC)[reply]
Note that the iPhone 4, and some other phones and tablets have both a MEMS accelerometer [4] and a MEMS gyroscope [5]. It sounds like most Apple portable devices [6] and so I would guess other manufacturers use MEMS microphones as well, so I wonder if it makes sense to consider the microphone moving but not the gyroscope or accelerometer (although I don't know the relatie movement difference). Nil Einne (talk) 19:16, 24 August 2012 (UTC)[reply]

Displaying bitmaps

I'd like to be able to dynamically create bitmaps, then display them, with a program (Fortran on Win XP). My program currently does so by creating a GIF and then starting up Internet Explorer to display it. This works, but is rather slow, and, if I want to update the displayed bitmap, this involves stopping IE and restarting it with the new bitmap. I'd like to avoid this overhead by being able to update the displayed bitmap just by entering a command at the command prompt. Can this be done with IE or some other application ?

Alternatively, I'd be fine with changing the contents of the bitmap file that IE or some other app is currently displaying, but it seems likely that the bitmap file will either be locked, or the application will have made a copy for display purposes and therefore won't update to reflect the changed bitmap file. StuRat (talk) 10:25, 24 August 2012 (UTC)[reply]

Don't use IE to display images like that — you'll run into caching issues. What you want is a dedicated but lightweight image viewer, something like IrfanView. A more rigorous approach would be to use something like ImageMagick, which can let you edit the image and display it using only command line tooks, and anything else you'd want to do. But I presume you know about this already and are avoiding it for one reason or another. --Mr.98 (talk) 11:53, 24 August 2012 (UTC)[reply]
ImageMagick's display program expects an X server, so while it does work on Windows, it's not commonly useful there. -- Finlay McWalterTalk 12:09, 24 August 2012 (UTC)[reply]
Surely there's a way to adapt it for Windows, though? It seems worth investigating for the kind of thing that StuRat's doing — command-line image editing, updating, etc. --Mr.98 (talk) 13:09, 24 August 2012 (UTC)[reply]
display is written direct to the xlib API, so it needs an X server; adapting it to GDI+ or DirectX is essentially rewriting it. -- Finlay McWalterTalk 13:34, 24 August 2012 (UTC)[reply]
The reason I used IE is that everyone already has it. I put a timestamp in the bitmap file name to avoid having it display a cached image. StuRat (talk) 20:01, 24 August 2012 (UTC)[reply]
I presume you're referring to Windows, but you're mistaken. See Removal of Internet Explorer, [7] and [8], removing IE has been officially supported by Microsoft since Windows 7. This only really removes the .exe but that is enough to affect any program presuming it will be present. Nil Einne (talk) 17:34, 26 August 2012 (UTC)[reply]
Well, OK, nearly everybody on Windows, then. Far more than any other browser, at least. StuRat (talk) 02:06, 27 August 2012 (UTC)[reply]
I'm already using ImageMagick to convert the bitmap files, so it would be great if it could also display them, but it doesn't sound easy in Windows. StuRat (talk) 20:01, 24 August 2012 (UTC)[reply]
Can I issue a command at the command line to have IrfanViewer change the image displayed ? If so, what's the syntax ? StuRat (talk) 20:01, 24 August 2012 (UTC)[reply]
Isn't there a simple GUI library for your Fortran runtime? With a decent high-level GUI api, simply opening a window and drawing a bitmap in it is a few lines of code. At most it's a dozen or two in GDI in C, mostly because the C api is rather verbose (not because the task is hard). That may turn out to be preferable to having to popen/exec to an external program. -- Finlay McWalterTalk 13:34, 24 August 2012 (UTC)[reply]
I haven't found a GUI library (I had asked a previous Q about that here). I use GFortran, incidentally. StuRat (talk) 20:10, 24 August 2012 (UTC)[reply]
gtk-fortran, which works with gfortran on windows. I can give you the trivial gtk-python program to display an image; converting it to fortran should be simple. -- Finlay McWalterTalk 20:48, 24 August 2012 (UTC)[reply]
That link says it works in Windows 7, not Windows XP. StuRat (talk) 21:01, 24 August 2012 (UTC)[reply]
https://github.com/jerryd/gtk-fortran/wiki/Status suggests it works, for the most part, on XP. -- Finlay McWalterTalk 21:06, 24 August 2012 (UTC)[reply]
That's not my reading. They tried two tests, neither of which worked, and only one of which they were able to diagnose and fix. StuRat (talk) 22:07, 24 August 2012 (UTC)[reply]
My reading is that they ran their test suite and had two problems. One is a trivial fix that isn't related to graphics code. The other one is a crash that they didn't look further into. The crash was in a Cairo test, and you shouldn't need to use any of Cairo to implement this. 209.131.76.183 (talk) 18:48, 29 August 2012 (UTC)[reply]
It would be trivial in any .Net language - c# for instance. However, on my system (Vista), Windows Photo Gallery automatically detects changed image files and reloads them. The same is true of Windows Picture and Fax viewer on XP. FWIW these are the default programs to view PNG files.--Phil Holmes (talk) 16:33, 24 August 2012 (UTC)[reply]
I tried Windows Picture and Fax Viewer on XP. It doesn't quite do what I need. If I change the bitmap file, it doesn't update the displayed image immediately, but only if I hit the forward and then backward buttons. StuRat (talk) 20:25, 24 August 2012 (UTC)[reply]
I can vouch for doing it with .Net. I have (long ago now) written a program in c# that does exactly what you describe - dynamically create a bitmap and redisplay it on each change. Without a suitable library/framework, you are left doing all the hard work getting your program to interact with Windows. One aside, when I last worked with Fortran even longer ago, it was a pretty trivial matter to call functions written in another language so long as you understood the differences between the various calling standards (or at least it was simple on OpenVMS using their Open Fortran compiler extensions). You could write the math and bitmap creator in Fortran and then write your own API to interact with another language and framework more suited to the task of interacting with Windows. Alternativly, maybe you could write a quick and dirty bitmap viewer in something like c# and maybe have it reload the bitmap from a file when the file changes. Astronaut (talk) 17:31, 24 August 2012 (UTC)[reply]
I've coded in C and similar languages, and hate them with a passion, so would like to avoid doing any of that. StuRat (talk) 20:12, 24 August 2012 (UTC)[reply]
You could try a different way, as you're already timestamping the images apparently: use a bit of javascript to install an interval that checks whether a new file has appeared 10 times a second. the Scripting.FileSystemObject, which is available through an ActiveXObject in javascript, allows you to access the filesystem. You could set it up as a HTML Application to the permission issues you'll encounter. Unilynx (talk) 11:52, 25 August 2012 (UTC)[reply]
But once I detect that the bitmap file has changed, how do I update the display to show it ? StuRat (talk) 04:46, 26 August 2012 (UTC)[reply]
Well, you'd not have IE open the image directly, but open a HTML page with an IMG tag pointer to the image. Then it's a matter of updating the 'SRC' attribute of the image to point to the new version. Unilynx (talk) 11:27, 26 August 2012 (UTC)[reply]
I think I've just found demo code for writing a GDI program in Gfortran [9]. I found it on page five of this thread [10] (presumably a usenet thread). Careful reading of the thread may reveal useful information about compiler settings.  Card Zero  (talk) 14:46, 25 August 2012 (UTC)[reply]
OK, I was able to compile that code and get it to run, and it creates a white window with black text centered in it. I can change the text or window title. However, that's a long way from displaying a bitmap. How do I do that ? StuRat (talk) 20:39, 25 August 2012 (UTC)[reply]
You need to replace the "DrawText(hdc, message, -1, rect, 37)" with something like "SetDIBitsToDevice(hdc, 0, 0, rect.right, rect.bottom, 0, 0, 0, bitmap_height, bitmap_data, bitmap_info, DIB_RGB_COLORS)". You will probably have to add declarations for SetDIBitsToDevice and BITMAPINFO and various constants like DIB_RGB_COLORS. It would be much easier to do this in C. Those 500 lines of Fortran would be about 30 lines of C. -- BenRG (talk) 05:28, 26 August 2012 (UTC)[reply]

UPDATE: I downloaded IrfanView and got it to work by issuing the following commands at the command line (the "/one" flag tells it to only allow one instance, so it immediately closes any previous instances, and the /hide=15 option hides the menus, etc.):

i_view32 pane1.bmp /one /hide=15
i_view32 pane2.bmp /one /hide=15

This sequence displays the first bitmap, then replaces it with the second bitmap. It's not bad, but you do see a flicker when it changes images, because it redraws the entire window, not just the bitmap. Still, if we can't come up with a better solution, which will only update the image in the viewer, and not redisplay the entire viewer, this is the solution I will go with.

Also, there is the File + Reopen (Shift R) IrfanView menu option, which will reload an image interactively, but I haven't found a batch command to do so. StuRat (talk) 06:33, 26 August 2012 (UTC)[reply]

UPDATE2: I found a way to eliminate the flicker, using IrfanView, by putting the pics in the desktop wallpaper instead of a window (the /wall=0 flag centers the image on the desktop wallpaper, while the /killmesoftly flag is needed to prevent it from displaying in a window, too):

i_view32 pane1.bmp /wall=0 /killmesoftly
i_view32 pane2.bmp /wall=0 /killmesoftly

However, I'd still like a solution for displaying in a window, and updating, without flicker, if anyone can think of one. StuRat (talk) 07:52, 26 August 2012 (UTC)[reply]

UPDATE3: I tried coding both of the above approaches. The UPDATE2 approach worked fine, but the UPDATE1 case did not, as the Fortran program waited until the 1st IrfanView window was closed to continue. How do I fix this ? StuRat (talk) 02:09, 27 August 2012 (UTC)[reply]

Simple javascript

Hello everyone. I'm looking for help with Javascript. I'd like to do the following:

1) A person clicks on a button.

2) A list with different options contained in a file (let's say, example.txt) is loaded and appears on-screen.

3) The user is allowed to add his name at the end of one of the options.

4) The file example.txt is automatically updated without the user having to access example.txt directly.

Could you please show me what the best and simplest way to do this with Javascript is? Thanks a lot. Leptictidium (mt) 12:10, 24 August 2012 (UTC)[reply]

That's not as trivial as might be imagined. I guess you mean javascript in a webpage? Firstly the "file" would have to be a resource on the web server from which the web page itself - because of the javascript/browsers's "same origin policy" you can't easily open files on the client machine. So part 2 requires storing the list in some server-side system, and part 4 requires storing that again. So in essence you need a server side program (in PHP, Python, Java, node.js) to do this; javascript on the web browser can make it appear nicer, but it's fundamentally a server-side problem. -- Finlay McWalterTalk 12:23, 24 August 2012 (UTC)[reply]
What Finlay says is correct: this is rooted in a misunderstanding about what Javascript is for. Javascript is run in the browser of the user's local machine — it is "client-side" scripting — and generally prohibited from reading or writing external files for security reasons. (There are, with all things, some exceptions to this.) "Server-side" scripting, which runs on the computer that is serving up the webpage, is what modifies files (on the server) and then sends them to the user (to download, say). There's lots of interaction between client-side scripting and server-side scripting (e.g. AJAX), but this is fairly complicated stuff for someone who is new to this. The simple way to do what you want is not with Javascript, but with something like PHP, a server-side language that can take input from a browser form and add it to a file or database. --Mr.98 (talk) 13:16, 24 August 2012 (UTC)[reply]
Well, I see it's quite more complicated than I thought. Thanks anyway.Leptictidium (mt) 13:42, 24 August 2012 (UTC)[reply]
We could explain it in other languages — it would be easy to whip up a PHP script that did this — but are holding back unless you would like us to. --Mr.98 (talk) 01:36, 25 August 2012 (UTC)[reply]

Learning programming languages.

What is the best institution in North America to learn programming languages (e.g. C++, Python, Ruby, Smalltalk, etc.)? Thank you in advance. --190.19.96.181 (talk) 15:15, 24 August 2012 (UTC)[reply]

Khan Academy? Normally one wouldn't study these languages at an "institution". Typically an introductory class in computer science or some other subject, would also include some material about programming in some language. After that, you should be able to pick up other languages on your own. You can even get started from a video game. 69.228.170.132 (talk) 15:40, 24 August 2012 (UTC)[reply]
Yes, I am well aware of that as I am currently studying for a degree in web design and development. However I was thinking that a community college, a university or even a foundation either in the United States or Canada that I am not aware of would perhaps offer courses or simply training in programming languages, preferably not online. --190.19.96.181 (talk), as 190.2.41.37 (talk), 19:54, 24 August 2012 (UTC)[reply]
Well, if you need a brick and mortar class, you will want one in your area. Computer programming isn't so hard to teach that you need to cross a continent to find a decent class. Depending on the language, I'd think a community college nearby might be the best approach. StuRat (talk) 20:34, 24 August 2012 (UTC)[reply]
I understand what you mean, but are there any places that are considered to be the best at teaching programming, just like Yale, Harvard and Stanford are presumed to have the best law schools in the United States? --190.19.96.181 (talk) 02:57, 25 August 2012 (UTC)[reply]
No there is really nothing like that, at the level you're talking about. There are some extremely good programs in computer science and there are some in software engineering; but a topic like "programming in Python" is something you learn by reading the manual and practicing, maybe with some benefit from live instruction if you're a complete beginner. It's like asking what place is best for learning how to use Microsoft Word. It's just not a subject that warrants deep academic treatment. 69.228.170.132 (talk) 03:28, 25 August 2012 (UTC)[reply]
Oh ok, yes, a class at a local college or at a hackerspace might do you some good if you're just getting started. By "what is the best institution" I thought you were asking about MIT vs. Caltech or something like that. Since you are interested in web design, I'd suggest starting with PHP and Javascript. Those languages are similar under the clothes to Python and Ruby, which are on your list. I'd advise against C++ as your first language since it won't make much sense for non-experienced programmers, and will present a lot of obstacles. I'm not sure what to say about Smalltalk. 69.228.170.132 (talk) 01:48, 25 August 2012 (UTC)[reply]

Learning a computer language just for the sake of it

Is any computer language worth learning if you know upfront that you would not be working with it? For example, when it forces you to deal with some issues or to be more explicit than other languages, which might be on a higher level of abstraction? Comploose (talk) 22:14, 24 August 2012 (UTC)[reply]

In that case, why not wait and learn that abstraction in the language you will actually be using ? The only reason I can think of to start with a language you aren't likely to use is for an introduction to computer programming class, where something like BASIC can be enough for students to determine if programming is for them. StuRat (talk) 22:21, 24 August 2012 (UTC)[reply]
I get your point. But, imagine that you know that you won't be using Assembly at work, but you are serious about learning how computers work, wouldn't it be much instructive than to learn PHP? Or in a different setting, you want to learn about algorithms, and there are a lot of books about algorithms in C++ or Java, so, you would be learning Java or C++ just to go through the literature. Does that happen in real life? Comploose (talk) 23:01, 24 August 2012 (UTC)[reply]
Really it's a personal question about what's important to you, and we have some very knowledgeable computer science people lurking around here that could fill in the details better than I can, but if you want to learn a language for the intellectual exercise, I think you need to gravitate towards some extreme. That is, do something extremely high-level (object oriented, based around high level design ideas) or very low level (assembly, like you say, or something crazy, like brainfuck). I think that would probably drill home certain ideas in a way that could be valuable as a learning experience. Like doing an isolation exercise. Shadowjams (talk) 23:15, 24 August 2012 (UTC)[reply]
I don't think there is good reason to learn them in depth, but some languages are worth learning because they express a philosophy in a particularly pure way. Examples are Smalltalk, APL, and Lisp. Looie496 (talk) 23:22, 24 August 2012 (UTC)[reply]

Esoteric programming language 92.233.64.26 (talk) 23:32, 24 August 2012 (UTC)[reply]

Ooh! Ooh! Learn Scheme! It's a kind of Lisp, like Looie mentioned, and the nice thing about it is that it combines simplicity with power. There are advantages and disadvantages to Scheme's way of doing things (no static types, lots of possibilities for abstraction), but I think that Scheme is a great teaching language because of its simplicity. The textbook that my school and several others use is free online, and so is their Scheme-like language, Racket. Scheme is especially interesting for someone interested in programming languages in general, because its powerful macro system allows the programmer to reshape the language. Paul (Stansifer) 00:34, 25 August 2012 (UTC)[reply]
There's also a distinction to be drawn between learning the syntax of a language, and learning its methodologies and paradigms. Various programming languages are expressive for different sorts of problems. If you know Java, there's little point in learning C++ just to re-write your Java programs using double-colons. C++ is a different language, with similarities and differences; and if you just learn enough to make a Java-like program with C++ style syntax, you wasted a lot of time and effort. Similarly, if you learn Lisp and then try to use it to write an application that should be written in Java, you're again wasting your own time. Lisp has a different purpose than Java. It's expressive in different ways. It's not conducive to creating the sort of boring, practical, useful software the way Java can. Learn FORTRAN so you can learn to work with complicated vector math. Learn MATLAB so you can explore advanced optimization problems. But, don't learn FORTRAN and then try to write a 3D game with it. That's using the wrong tool for the job; and if your intent is to use the wrong tool as an exercise in solving unnecessarily-difficult-problems, then you should just work in Intercal. Nimur (talk) 01:11, 25 August 2012 (UTC)[reply]
I'll grant that some language/problem pairs are more appropriate than others, but I don't think that this is a productive way to look at families of languages. For example, both macros and static types are language features that have huge effects on language design, and can be used for performance, safety, or expressivity. They don't gear you towards specific applications, so much as specific groups of people and modes of thought.
Simple languages, like Scheme and Smalltalk and Haskell (well, conceptually simple, anyhow) and even Basic are good for learning with, because they engage with the problem at hand. Languages that are designed around performance, like C++ and Java and Fortran bog the user down in minutiae. It's a good thing some people struggle with C++ STL error messages, or the details of memory management in Java, so that we can have fast software, but the time that I've spent doing those things hasn't really made me a better programmer except in those narrow areas. I've never had a job where I didn't have to learn a new language (or, at least, a lot more about C++) after I got there, anyways. Fortunately, picking up new syntax and new details isn't very hard. Paul (Stansifer) 07:10, 25 August 2012 (UTC)[reply]
Haskell, Prolog, and ToonTalk are all unusual and interesting, and Go and Erlang to a somewhat lesser extent. -- BenRG (talk) 01:09, 25 August 2012 (UTC)[reply]
Seven Languages in Seven Weeks looks interesting, if you want a fairly quick introduction to seven very different languages.-gadfium 04:29, 25 August 2012 (UTC)[reply]
If you're looking for concrete suggestions, it would help if you said what your learning goals were, and what languages you use now. If I have to pick without that info, I'll suggest assembler, Scheme, and Haskell. Each of them is useful though, so there's no reason not to work with them once you've learned them. 69.228.170.132 (talk) 07:01, 25 August 2012 (UTC)[reply]


August 25

Revision control for OS

Are there any revision control systems aimed at (or directly integrated into) operating systems which would allow to keep track of modifications to the configuration of the OS? I understand that I could manually add configuration files to any revision control system, just wondering whether this has already been done. I'd be particularly interested in (debian) linux, but out of curiosity also interested in any other OS. bamse (talk) 08:40, 25 August 2012 (UTC)[reply]

Not quite change control, but there are Versioning file systems, which keep track of every change, and filesystems like ZFS, btrfs, and Vertitas which support snapshots. -- Finlay McWalterTalk 14:34, 25 August 2012 (UTC)[reply]
Not designed for the purpose, but could Subversion be suitable for the task (at least for keeping track of changes in /etc)? I know some people use Subversion as a backup tool and change control system for their /home directory (see for instance this thread). AFAIK, Subversion does a decent job with binary files, too [11]. This is just a thought, I haven't used Subversion for these purposes, and there may be downsides that I'm not aware of. --NorwegianBlue talk 11:56, 26 August 2012 (UTC)[reply]

MSIL on Wine

As far as I know, C# is compiled to MSIL, which needs the .NET framework to run on MS Windows, and Mono on Linux. So, how is it possible that AWB runs on Wine, provided that Mono is not installed? Wikipedia:AutoWikiBrowser/Mono_and_Wine --151.75.107.190 (talk) 14:18, 25 August 2012 (UTC)[reply]

Wikipedia:AutoWikiBrowser/Mono and Wine#Wine says that, to run it in Wine, winetricks has to download and install the .NET2 runtime from Microsoft. -- Finlay McWalterTalk 14:29, 25 August 2012 (UTC)[reply]
Okay, thank you. --151.75.107.190 (talk) 14:37, 25 August 2012 (UTC)[reply]

S.M.A.R.T. Warning message

I noticed a warning message in the disk utility of my Linux server recently. See screenshot. Is this an indication that I should replace the disk, or is it a more benign warning message? Thanks, --NorwegianBlue talk 15:18, 25 August 2012 (UTC)[reply]

.

I would certainly want to have everything on that disk backed up properly. If the disk is mission-critical (that is, if you'd suffer significantly from the downtime associated with replacing it and restoring that backup) then I'd replace it now. If not, you may wish to risk keeping using the disk. That number should certainly be zero, but its being nonzero isn't evidence enough to assume impending failure. If the number increases, that's likely evidence the disk is dirty, scratched, or contaminated, and I'd replace it then. -- Finlay McWalterTalk 15:27, 25 August 2012 (UTC)[reply]
Here's the meaning of those four numbers at the bottom:
  • "Normalized": A manufacturer-defined measure of healthiness where 100 (sometimes 200) is normal and smaller values are worse.
  • "Worst": The lowest normalized value this parameter has ever had on this drive.
  • "Threshold": The normalized value at which the drive should probably be replaced (according to the manufacturer).
  • "Value": More detailed information; in this case, the actual count of reallocated sectors.
So according to the scale set by the drive manufacturer, 5 reallocated sectors is nothing to worry about. -- BenRG (talk) 20:02, 25 August 2012 (UTC)[reply]
There was a Google study a while back showing that SMART-reported errors of any sort were highly correlated with impending drive failure. If it were my drive I'd take it out of service immediately, rather than backing it up and waiting for it to fail. 69.228.170.132 (talk) 02:25, 26 August 2012 (UTC)[reply]
It's not an error. The health parameter is at 100%. I don't know why this particular SMART monitor treats any nonzero raw value for this parameter as worthy of a message at all. Most wouldn't. There's a green circle next to the message, which I suppose is meant to mean that it's purely informational. -- BenRG (talk) 04:52, 26 August 2012 (UTC)[reply]
Thanks everyone! I experienced a similar situation with the same computer a year ago. It then had three disks, which all were new. When I returned from summer holidays, all three disks had SMART-reported error messages similar to the one showed here. I then replaced all three disks. Given the time of year that these problems have occurred, I wonder if it may have been caused by transients on the power grid during thunderstorms. All the circles were green then, too. The message next to the circle when absolutely everything is ok, is "Disk is healthy". I also noticed now, that there is a mouseover message associated with the Reallocated Sector Count warning, that says:
Type: Failure is a sign of imminent failure (Pre-Fail).
Updates: Every time data is collected (Online)
Raw: 0x050000000000
I'm not really sure what to make of that information, i.e. if it is saying that there actually is a failure condition now, or if it is saying what the interpretation would be if there were a failure condition. To be on the safe side, my immediate action will be to switch the roles of the two 1.5 TB disks on the system (the problem disk holds the /home partition, the other 1.5 TB disk mirrors /home, rsynced every night). --NorwegianBlue talk 10:32, 26 August 2012 (UTC)[reply]
It's saying what the interpretation would be if there were a failure condition (i.e., if the normalized value dropped below 36). This interpretation is also chosen by the drive manufacturer. There's some information here.
I'm kind of depressed that Google's data is convincing people to send perfectly good drives to the dump out of fear of random failure (most of their drives with a few reallocation events didn't fail). But I guess it's cheaper than RAID mirroring if downtime is expensive but not too expensive. -- BenRG (talk) 20:04, 26 August 2012 (UTC)[reply]
From the Google study "Failure Trends in a Large Disk Drive Population": "As with scan errors, the presence of reallocations seems to have a consistent impact on AFR for all age groups (Figure 7), even if slightly less pronounced. Drives with one or more reallocations do fail more often than those with none. The average impact on AFR appears to be between a factor of 3-6x." AFR is Annualised Failure Rate. So it does appear that this is indicating a higher than normal liklihood of disk failure. --Phil Holmes (talk) 10:00, 26 August 2012 (UTC)[reply]
Thanks! Googling your quote, I found the study here. --NorwegianBlue talk 10:46, 26 August 2012 (UTC)[reply]
Some of those graphs are unreadable. A readable PDF version is here. -- BenRG (talk) 20:04, 26 August 2012 (UTC)[reply]
Excellent, thanks! --NorwegianBlue talk 21:20, 26 August 2012 (UTC)[reply]

Programming for mobile/embedded devices

How would one compile a program for a mobile/embedded device? — Preceding unsigned comment added by YoungAspie (talkcontribs) 17:29, 25 August 2012 (UTC)[reply]

You would compile it like any other program, except that the target output would be for a different CPU. See Cross compiler RudolfRed (talk) 17:33, 25 August 2012 (UTC)[reply]

Then how would one transfer the compiled code to the embedded device? — Preceding unsigned comment added by YoungAspie (talkcontribs) 17:36, 25 August 2012 (UTC)[reply]

It depends on the device. The iPhone for example is updated over USB. Other devices might use serial port or JTAG. RudolfRed (talk) 20:56, 25 August 2012 (UTC)[reply]
When my job was programming embedded devices (1981–4), we used a "burner" to program a read-only memory chip. I imagine that times have changed. —Tamfang (talk) 00:24, 26 August 2012 (UTC)[reply]
There are many standard methods to communicate to an embedded device. You are undoubtedly familiar with the USB protocol; many modern devices have hardware support for USB, so you can program and debug using USB. Another common standard is JTAG, which specifies certain low-level communication methods and defines a hardware interface. JTAG is supported on many embedded devices, even when USB is not. Other embedded computers use less common protocols; or they use customized technology created by the manufacturer or designer.
To run a program on an embedded device, you can either boot directly to the program; or you can run a (simple) operating system on the device. To boot directly, your program must know intricate details of the hardware, and manage the low-level device bring-up. For this reason, many embedded systems come with a ready-to-use operating system. The operating system will specify how to load and run external programs. Many new systems use full-fledged file systems that are compatible with desktop computers. Often, an embedded computer can attach an SD card and treat it as a "hard disk" with a standard file system; the embedded operating system loads the program file and executes its main function. Other embedded devices can be programmed over JTAG, and the program may reside in RAM only until the next reboot; or can be stored to a nonvolatile memory. Nimur (talk) 17:39, 26 August 2012 (UTC)[reply]

Legality of redistributing software available for free download

What is the legality of redistributing software that's available for free download, without permission from the copyright holder? Specifically, several companies make available software programs as a large (>2 GB) DVD images for free download. I would like to republish the ISOs on my web site as BitTorrent links, to help those with unstable Internet connections or unstable computers. I understand that copyright prohibits copying and redistribution, but does it make a difference that the copyright holder is not trying to copy-restrict the ISOs themselves, instead requiring an activation key to use the software? 63.152.89.215 (talk) 21:01, 25 August 2012 (UTC)[reply]

You appear to be asking for legal advice. We do not answer such questions. Sorry. AndyTheGrump (talk) 21:11, 25 August 2012 (UTC)[reply]
Though the general answer is pretty straightforward, and is not legal advice. --Mr.98 (talk) 23:09, 25 August 2012 (UTC)[reply]
Check the license distributed with the software. It will tell you whether redistribution is allowed. Just because something is provided for no charge (gratis) does not mean it is free for you to redistribute — it does not mean that copyright does not apply, it does not mean that your own redistribution of it would not be a copyright violation. --Mr.98 (talk) 23:08, 25 August 2012 (UTC)[reply]

August 26

Counter Strike Global Off.

I am having major lag spikes in the game Counter Strike Global Off., does anyone know how to fix the game (IT IS THE GAME NOT MY INTERNET). — Preceding unsigned comment added by 76.16.47.115 (talk) 02:57, 26 August 2012 (UTC)[reply]

Have you tried a reboot ? StuRat (talk) 04:43, 26 August 2012 (UTC)[reply]

Samsung Series 5 17.3 inch laptop

Anyone here have this particular model laptop? I need to know if I'm the only one experiencing problems with the touchpad not being sensitive enough so I can know whether to return & exchange it for another one of the same model or get a different one altogether. 70.52.79.25 (talk) 08:55, 26 August 2012 (UTC)[reply]

Fast output of plots in MATLAB

Hi,

Does anyone know of a quick way to save a MATLAB plot (to png) without actually having to call up a figure? I need to process a large number of frames (1000s) to make up an animation and at the moment I'm creating a figure and then using print(gcf,...) but this is pretty slow... Thanks, --Fir0002 11:26, 26 August 2012 (UTC)[reply]

Per the documentation, specify the figure property 'Visible', off. Also, consider re-using the same figure handle, when appropriate, instead of creating a new figure. You can update the figure contents without creating a new figure. Nimur (talk) 17:28, 26 August 2012 (UTC)[reply]
Thanks for that - I did try updating the figure contents each time, but MATLAB was complaining with:
Warning: Color Data is not set for Interpolated shading
> In C:\Program Files\MATLAB\R2009b\toolbox\matlab\graphics\hardcopy.p>hardcopy at 21
In graphics\private\render at 143
In print at 277
In shifting_fft_plots at 102
In shifting_psdd_full_field at 94
(each frame is a pcolor plot and I want the shading set to interpolated -> and if I set shading to interp outside the loop it doesn't carry through...)
It works despite the warning so I think I'll just ignore it ;) --Fir0002 06:02, 27 August 2012 (UTC)[reply]
That warning means you did not specify color data for the patch using the FaceVertexCData property. Default colors are being used. Nimur (talk) 18:14, 27 August 2012 (UTC)[reply]

Location based reminders in Android

I need to accept a location from the user, compare it with the current location (using GPS) and give an alarm to the user if it matches. I'm new to android, but I do know that I need to use LocationManager and AlarmServices. Can someone please give me an outline of how to go about it and especially how to integrate alarms into GPS. I'll be most grateful for any help provided. Thank you very much. :) Zebec 15:26, 26 August 2012 (UTC)[reply]

As I understand it, you can do this with just the LocationManager's addProximityAlert call, to which you provide the coordinates of interest and a necessary fudge radius, and it calls you back when the phone is near that place. A simple example of someone writing what you're looking for is here. I don't see why, just to do that, you'd need AlarmManager as well - LocationManager already polls the GPS for you. Note that AlarmManager isn't for user notifications (it's a poor name choice - it should be called ScheduledCallbackManager or something). Notifying the user something has happened is done with Alerts, Toasts, and Notifications (tutorial). -- Finlay McWalterTalk 15:58, 26 August 2012 (UTC)[reply]
This sounds like something you could use Tasker for. - Cucumber Mike (talk) 19:13, 26 August 2012 (UTC)[reply]

Does Playbook's security swipe really work?

Dear Wikipedians:

I have just performed a security swipe on my Playbook using its "security swipe" feature under the security section of its settings pages. However, the length of time between when I tapped "security wipe" button and when I got the new splash screen asking me to set up my "new" playbook is such that I do not believe my playbook has had the time to go through all the bytes in its 16 GB of permanent memory and reset each one of them to 0x00. I am wondering if any of you could help enlighten me to the true nature of Playbook's security wipe, whether it really does its job, and what else I can do to make sure all my data on my Playbook is fully erased and could not be recovered, even with forensic computer data retrieval expertise, in case Playbook's in-built security wipe does not do the full job.

Thanks a million,

76.68.41.45 (talk) 15:41, 26 August 2012 (UTC)[reply]

If I understand you correctly, you have a BlackBerry PlayBook tablet with 16Gb of on-board NAND flash memory, and you're using the security wipe feature to erase the portion of that which stores user files and data (that also stores the Blackberry OS and built-in applications). One thing to note about flash memory is that it isn't erased by writing bytes to it (it's not like a hard disk) - the memory is organised into larger blocks, which are erased by issuing a block-erase command (which simultaneously wipes all the bytes in that block). To know how long that will take, and to know whether the specific flash part found in the Playbook can concurrently erase blocks, we'd need to figure out what flash part it has, so I can read the datasheet. If anyone can find a good high-res image of a deconstructed Playbook, so we can read the part numbers, that would help a lot. -- Finlay McWalterTalk 16:16, 26 August 2012 (UTC)[reply]
Hmm, I'm quite encouraged. The part is a Sandisk SDIN 5C2-16G device. I found the product information sheet for that here. Talking about the "secure erase" command, the datasheet says "This new command meets high security application requirements (e,g, those used by military and government customers) that once data has been erased, it can no longer be retrieved from the device." As RIM sells a lot into US Government circles, I think they and SanDisk really will be standing behind that claim. But I can't find a programming/timing manual for that part, which would tell me how long the erase should take. Preliminarily, it sounds like they do take properly secure erasure seriously. -- Finlay McWalterTalk 16:29, 26 August 2012 (UTC)[reply]
That sheet does say the erasure is done in "erase groups", and has a place where the size of a group is specified (up to multiples of 8 GB, it seems). I still can't find a real timing diagram, but that too suggests the erasure would be done in one or a handful of operations (depending on how they lay out their use of the flash memory), which you would expect to be a second or two. But an important caveat: this shows Blackberry can do this; it doesn't show they do, and there's little way to find out what they do (bar doing real forensics yourself). -- Finlay McWalterTalk 16:44, 26 August 2012 (UTC)[reply]

I read the question as "Playboy's security swipe" and wondered that there's now such a convenient feature available... JIP | Talk 18:16, 26 August 2012 (UTC)[reply]

Erasure of a filesystem of any size could be done in a split second, if the filesystem was encrypted and the system simply forgets the encryption key. I recall iOS doing such a thing when told to perform a secure wipe, but apparently the playbook doesn't encrypt its entire filesystem[1] Unilynx (talk) 19:20, 26 August 2012 (UTC)[reply]

Question about mounting hard disks on Fedora 17

After I had upgraded to Fedora 17, I found that when I first booted it up, everything worked, but when I shut the computer down and booted it up again, Fedora went to emergency mode before I could even log in, asking me for the root password, and when I gave it, dropped me to a text-only shell. In panic that I had broken the system, I reinstalled Fedora 17 and everything worked, but after I rebooted, the same problem appeared again.

I decided to google "Fedora emergency mode" and found the cause of the problem. I have additional Lacie external hard drives that I use for back-up, but I keep them powered down when they're not in use. I have written entries for them in /etc/fstab so that I can manually mount and unmount them with a single command. Now what was happening was that on boot-up, Fedora found these entries in /etc/fstab and tried to mount them, but failed because the disks were powered off. This caused Fedora to think "Oh no! Mounting file systems has failed! Let's stop right here and inform the user that something has gone horribly wrong!", which I took as a corrupted system.

Is there any way to write the entries to /etc/fstab telling the computer that the drives should not be mounted on boot-up, they'll be mounted when I say so? JIP | Talk 18:29, 26 August 2012 (UTC)[reply]

Stop reinstalling. :p ¦ Reisio (talk) 20:11, 26 August 2012 (UTC)[reply]
Use the noauto option in fstab (see man fstab). Make sure to mount by UUID and not by device, as rearranging your usb devices (or just plugging in a little flash drive) can cause Linux to assign disks to different devices, messing up your mount scheme. -- Finlay McWalterTalk 18:44, 26 August 2012 (UTC)[reply]
Thanks, that worked. I wrote the same entries into /etc/fstab but this time with the option noauto, and the system was able to boot up normally. JIP | Talk 19:16, 26 August 2012 (UTC)[reply]
I can't speak for Fedora, but on Ubuntu I don't use fstab to mount usb disks. Instead I let udev and Nautilus automatically mount them (as described here). That way they end up at /media/<partitionlabel>, where <partitionlabel> can be set (if you're smart, uniquely) as described here. -- Finlay McWalterTalk 19:08, 26 August 2012 (UTC)[reply]

Move from hotmail to Outlook

What is the end game plan for @live.co.uk email accounts now that Outlook is being rolled out to replace Hotmail? Will they still exists or will they be migrated to Outlook or what? Thanks. 92.6.144.109 (talk) 18:58, 26 August 2012 (UTC)[reply]

Your email address stays the same (still @live or @hotmail or whatever) and you still log in the same way you did before, with the same password. The only difference is the site you end up at is branded Outlook and has the Outlook interface. So it's a pretty seamless transition, really. -- Finlay McWalterTalk 19:04, 26 August 2012 (UTC)[reply]

Transfer entire Linux system to a new hard drive?

I just bought a new 2 terabyte hard drive, which I'd like to transfer my entire existing Fedora 17 Linux system to. The current system is on two physical drives with a total of 4 partitions (plus a swap partition), about 800 gigabytes in total. This is becoming too small for me. How can I transfer my entire Linux system to the new hard drive? I could just plug it in, partition it with GPartEd and format all the partitions, and copy all the files across, but how do I get the disk labels right in /etc/fstab on the new disk, and how do I create a bootloader? Would it be easier to simply do a full install of Fedora 17 on the new drive, and then copy all my old files across, either from the original drives or the back-ups I've been creating on my external Lacie hard disks? Can I just back-up the entire root (/) partition to the Lacie drive and restore it to the new disk, but with keeping /etc/fstab intact? It's the exact same version of the operating system, so that shouldn't pose a problem. JIP | Talk 19:58, 26 August 2012 (UTC) [reply]

Taking a simpler case, say I had a single drive /dev/sda (from which my system booted) and I bought a bigger drive to which I wanted to copy everything, and boot from that. Say I plugged it in and it became /dev/sdb. I'd boot from a livecd, then I'd
 sudo dd if=/dev/sda of=/dev/sdb
Be very sure of the ordering: if is the input, of is the output; if you get it wrong, you copy blankness over your good disk - there's no going back from that. That'll grind for a few hours, and at the end of it the start of /dev/sdb will be a bit-for-bit copy of the old disk. Once that's done you can remove the old disk, and the big new one will become the new sda. The system should then boot identically from that, as if it was the old disk. Then I'd boot to a livecd again and use gparted to resize the partitions to take up the space. -- Finlay McWalterTalk 20:08, 26 August 2012 (UTC)[reply]
I'm aware of what dd does, but I don't think this will help me, because my old system consists of two physical drives. These appear on Linux as /dev/sda and /dev/sdb. I don't think it's possible to use dd to transfer both of them to the same new drive. JIP | Talk 20:15, 26 August 2012 (UTC)[reply]
Weeelll: Once you've copied the first lot, use gparted to make two new partitions (of the appropriate size) on the 2TB disk. Then dd the contents of the old partitions (say /dev/sdc1, /dev/sdc2) to their counterparts on the 2TB disk (say /dev/sda4, /dev/sda5). I think that'll work, but I've not done anything like that for a while. If it doesn't, well, you should have rsynced :) -- Finlay McWalterTalk 20:25, 26 August 2012 (UTC)[reply]
If you do this, I think you'd need to change the UUIDs and partition labels of the newly created partitions to match the old ones, so the partition table is coherent. -- Finlay McWalterTalk 20:39, 26 August 2012 (UTC)[reply]
But you've got two disks, each with two partitions. You can certainly copy individual partitions to specific places using dd, but you need to use dd's offset parameter, and (while I have done it) I'd not recommend someone unfamiliar with dd and raw disk addressing do that (again because it's a sledgehammer). If the partitions on old_disk2 are just regular files (music, videos, etc.) I'd personally want to end up with just the existing (resized) partitions on the 2TB disk, and I'd copy (rsync) the regular files to ordinary folders there. But then I personally dislike partitioning more than is absolutely necessary, so others may advise you on keeping the partitions and copying them with something I'm ignorant of. -- Finlay McWalterTalk 20:15, 26 August 2012 (UTC)[reply]
What I usually do is use rsync -av /mnt/old/ /mnt/new/ (which can be resumed [by running the same command again] if interrupted) to copy the data from a liveOS. You can fix /etc/fstab with the information from blkid run as root (using UUID or LABEL values instead of /dev/foo is a good idea), and fix GRUB with grub-install /dev/sdX (where X is the 2TB device name letter). You might also want to reorder the drives (by cable connections) to have your 2TB be the first device before reinstalling GRUB, if you haven't already. If you were changing more than just the hard disk (migrating the system to an entirely different computer, for example), you might also need to alter your kernel/modules for proper driver support. ¦ Reisio (talk) 20:23, 26 August 2012 (UTC)[reply]

rsync --delete question

I've been using rsync to create back-ups of my system to my external Lacie hard disks. The man page tells me that rsync --delete will delete all files and directories on the destination that are not found on the source. But I found out that it only works for the top level of the source and destination directories. Any files and folders in subfolders of the destination that are not found in the respective subfolders of the source are left untouched. How can I make the --delete option work recursively? JIP | Talk 20:03, 26 August 2012 (UTC)[reply]

You'll need to tell us all the options you're passing to rsync. -- Finlay McWalterTalk 20:09, 26 August 2012 (UTC)[reply]
rsync -rv --delete . /lacie (where /lacie is the mount point of my external hard drive). JIP | Talk 20:15, 26 August 2012 (UTC)[reply]
For a backup I do rsync -av --delete which works fine, and certainly deletes files as I'd expect. -a implies a bunch of useful flags (copies perms, owner and group, etc.). You've not got FAT32 or NTFS on the Lacie, have you? -- Finlay McWalterTalk 20:29, 26 August 2012 (UTC)[reply]
rsync -av --delete seems to work fine. But after I have done it once, I want subsequent calls to skip files that are already present on the destination and haven't been changed on the source. Otherwise it is going to take me hours each time, with all my about one hundred thousand digital photographs stored on both my internal hard disk and the Lacie disks. And no, the Lacie disks are not FAT32 or NTFS, they're ext3. JIP | Talk 18:06, 27 August 2012 (UTC)[reply]
Yes, -a does that. It reads all the directories, stats all the files, compares timestamps, and does the obvious things. 69.228.170.132 (talk) 18:10, 27 August 2012 (UTC)[reply]

Java Book

I've just finished learning the beginnings of Java with "Java How to Program" by Deitel and Deitel. Can anyone suggest a suitable second book to advance my studies? Thanks. 92.6.144.109 (talk) 20:27, 26 August 2012 (UTC)[reply]

Effective Java by Joshua Bloch. -- Finlay McWalterTalk

HTTP space between headers and body..

How do I know where the headers end and where the content begins if I'm parsing raw http? 190.158.212.204 (talk) 21:15, 26 August 2012 (UTC)[reply]

Formally, two consecutive <CR><LF> pairs. Informally, you might occasionally see clients that only send the <LF>s. -- Finlay McWalterTalk 22:29, 26 August 2012 (UTC)[reply]

August 27

Difficulty finding page related to "Order of Operations" in Mathematics.

"Order of Operations" is such a simple process, we all learn it in grade school. I needed to use the term in an email, and it took me over one-half hour to find it!

Everything that was being returbed by your search engine were articles at the college level and beyond.

Maybe you need a "Kidapedia"? — Preceding unsigned comment added by Drexpert007 (talkcontribs) 00:32, 27 August 2012 (UTC)[reply]

Have you tried the Simple English Wikipedia? simple:Order of operations -- Dismas|(talk) 00:42, 27 August 2012 (UTC)[reply]
The article is Order of operations. Wikipedia normally does not capitalize words other than the first word in article titles, unless the words are proper names or the like. See WP:TITLEFORMAT. 69.228.170.132 (talk) 18:03, 27 August 2012 (UTC)[reply]

how long does it take to overwrite hard drive using system recovery disc

Let me clarify a few details:

- I've had the computer for a couple of weeks
- I haven't done much with it other than log in to email and forum accounts via web browsing.
- The hard drive is 1 TB in size (854GB in free space actually available). I plan on returning it Monday, so I just need to know if this will take a long time (as in hours on end) or if it's a brief and reasonable time (as in under an hour) 70.52.79.25 (talk) 08:15, 27 August 2012 (UTC)[reply]
To clarify: Do you want to overwrite every bit on the disk to blank it out, including the empty portion ? I assume you want to do this for security reasons, before returning it ? Technically, you shouldn't need to blank out any any unallocated sectors, although you would need to blank out the empty portion of allocated partitions, as it may have had data in them which was "deleted", which just means the index entry is removed, and the data is left in place.
To answer, we would need to know the hard disk model number, so we can find it's write speed. StuRat (talk) 09:34, 27 August 2012 (UTC)[reply]
Don't know the model number, but I know the read and write speed is 5400rpm. --70.52.79.25 (talk) 15:21, 27 August 2012 (UTC)[reply]
It will take several hours at least to overwrite the whole disk surface. Overwriting only used portions would take less than an hour, but that won't necessarily overwrite all personal information, and I doubt the recovery disk has it as an option anyway. If it's a Windows machine and you want to minimize downtime, you can install TrueCrypt and set it to encrypt the system drive. This takes hours but the system is usable during that time. Then erasing the drive is instantaneous: just forget the passphrase. -- BenRG (talk) 16:45, 27 August 2012 (UTC)[reply]
If it's a recent SATA drive it likely supports a "secure erase" operation (we could use an article about that). You should use that in preference to a software program if you can do so conveniently, but either way, yes, wiping a 1TB disk is likely to take a few hours. A rough guess for an internal SATA might be 100MB/sec which is 10000 seconds or around 3 hours. If it's a USB2 disk it will be more like 20MB/sec, or about 15 hours. In principle maybe you could get away with wiping just part of the drive, but if you had anything sensitive on the drive it's safer to wipe everything. 69.228.170.132 (talk) 18:08, 27 August 2012 (UTC)[reply]

Django simple button + field + saving

I know python and a little bit about django (at least, enough about urls.py and views.py to copy and paste a working example.) I'd like to have a simple function:

Button, when pressed, it processed the text obtained from a text field and does two thing: shows it on screen and saves it to a file (append to text file or SQLite, whatever is easier). How can I do that? Comploose (talk) 17:27, 27 August 2012 (UTC)[reply]

I don't know enough Django to do it justice, but I can give a trivial example in Bottle, which should at least give you the conceptual idea of what to do.
#!/usr/bin/python
import os.path
from bottle import get, post, request, run, Bottle 

NAMEFILE = 'names.txt'
app = Bottle()

def generate_page(msg=None):
    if msg:
        html = '<div style="color:red;">'+msg+'</div>'
    else:
        html = ""

    if os.path.exists(NAMEFILE):
        f = open(NAMEFILE,'r')
        for name in f.readlines():
            html += name.strip() + '<br>'
            f.close()

    return html + '''<form method="POST" action="/">
                       <input name="name" type="text">
                       <input type="submit" value="add name">
                     </form>'''

@app.route('/')
def page():
    return generate_page()

@app.post('/') 
def page_submit():
    name = request.forms.get('name')
    if len(name)>0:
        if os.path.exists(NAMEFILE):
            f = open(NAMEFILE,'a')
        else:
            f = open(NAMEFILE,'w')
        f.write(name+'\n')
        f.close()
        return generate_page('added:'+name)
    else:
        return generate_page()

run(app, host='localhost', port=8080)
That's pretty minimal, and not an example of good practice, but hopefully it's instructive nevertheless. -- Finlay McWalterTalk 19:43, 27 August 2012 (UTC)[reply]
Ooooh. Thanks for the answer. I thought that could be done in kind of three lines of code, but no, I'll have to invest more time to get it. Comploose (talk) 22:23, 27 August 2012 (UTC)[reply]

Has anyone got The Ur-Quan Masters to work?

Has anyone ever got The Ur-Quan Masters to actually work on a Linux system? I installed the game on my fresh Fedora 17 system, eager to play it, because I played the original Star Control intensively on my old Amiga 500, but the sequel never appeared on the Amiga. uqm --version reports I have version 0.7.0. When I start it, I get as far as the main menu, and when I select "New game", I get a screen saying "IGL - Interstellar Frungy League presents", after which the program crashes. Is there a working version available anywhere? JIP | Talk 18:54, 27 August 2012 (UTC)[reply]

Facebook question

What is the max size of a file you can attach to a personal message on facebook? — Preceding unsigned comment added by KobiNew (talkcontribs) 19:37, 27 August 2012 (UTC)[reply]

August 28

Options request by firefox.

Currently this is giving me problems, when I try submit stuff, (From an usefull userscript for a page), these servers are 'silly' and can't reply correctly to an OPTIONS request, I don't have any control over the servers, but I really want to fix this problem...

Is there anyway.. to disable options request, or to enable Cross-Domain Ajax just for one domain in firefox? , or at least allow cross domain request globally? Thanks.. 190.158.212.204 (talk) 00:19, 28 August 2012 (UTC) Also.. is there any way to add user quota in a page from google chrome? It can be user side fix. I'm getting QUOTA_EXCEEDED_ERR: DOM Exception 22. 190.158.212.204 (talk) 00:35, 28 August 2012 (UTC)[reply]

Is a GPU Required in a Computer?

When a computer displays a graphic on the screen, does it have to use a GPU? Can the CPU communicate directly with a monitor? I am aware some modern CPUs have GPU circuitry built in, but for the sake of simplicity, please assume I am referring to CPUs manufactured before 2010. If they always use the GPU, how much do they rely on it for simple tasks like composing e-mails and browsing web sites? — Preceding unsigned comment added by 50.95.200.141 (talk) 05:16, 28 August 2012 (UTC)[reply]

At the very least, you need a PHY that operates a standard display protocol - like VGA or HDMI. Usually, there's a little hardware to control the PHY, and a video frame buffer. Without that hardware, you can't get a signal to a monitor. One could call that hardware a GPU, but in modern terminology, a GPU also usually supports certain specific mathematical operations: "T&L", often providing hardware support to a standard API like OpenGL. Those features are't required to put pixels on a screen; but this hardware is so commonplace that modern operating systems make use of it even during normal use, like displaying windows, editing text, and browsing the web. Nimur (talk) 05:32, 28 August 2012 (UTC)[reply]

Thanks for the reply. So, I assume, then, that disabling the GPU on most modern systems would render the monitor nonoperational, because the PHY chip and the framebuffer are build into the GPU? — Preceding unsigned comment added by 50.95.200.141 (talk) 06:41, 28 August 2012 (UTC)[reply]

A computer can well do without graphics circuitry of its own, it can have, say, a serial terminal attached to it. Early computers worked this way which I think is responsible for the rise of editors like vi, as you can't easily draw windows, menus and stuff over a 300 baud line. Уга-уга12 (talk) 11:49, 28 August 2012 (UTC)[reply]

Play Ogg Theora and Vorbis files directly on iPad

Is there any app or extension which can play OGG files directly (without conversion) on iPad — Preceding unsigned comment added by Write English in Cyrillic (talkcontribs) 06:03, 28 August 2012 (UTC)[reply]

Write English in Cyrillic (talk) 06:03, 28 August 2012 (UTC)[reply]
You can use VLC on a jailbroken iPad, but it is no longer available from the Apple App Store. -- Finlay McWalterTalk 11:23, 28 August 2012 (UTC)[reply]