Jump to content

Wikipedia:Reference desk/Archives/Computing/2011 May 16

From Wikipedia, the free encyclopedia
Computing desk
< May 15 << Apr | May | Jun >> May 17 >
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.


May 16

[edit]

Hardware piece on my laptop misbehaving

[edit]

I took apart my laptop tonight due to a problem. After I fixed it, an unrelated problem appeared for me: a little piece on the side of my laptop isn't working like it's supposed to. There's a picture of it to the right. Its function is to allow me to open and close the lid, so it's supposed to work like a hinge, with the little piece on the upper left of the image moving on an axle that goes through it and the rest of the piece. Mysteriously, after opening my laptop, it's become essentially immobile, however. I tried putting in copious amounts of WD-40, but that's only allowed movement with an excessive amount of force (meaning I *really* have to push on it).

Is anyone familiar with how I might fix this problem? I don't know if I can get a replacement either, and I really don't want to buy a new monitor for this stupid little non-functional piece.

On a separate note, the piece on the upper left is broken anyway; you'll notice only one screwhole is left on it that will work. This problem has been around for a while and is unrelated to the problem I'm reporting tonight.Magog the Ogre (talk) 04:55, 16 May 2011 (UTC)[reply]

Note that you have a much smaller lever arm with the hinge disconnected. Thus, using the torque formula τ = rF, if the radius at which you apply the force is 1/10th what it normally would be, then you would need to apply 10x the force. Also, you might be pushing it off-center, causing the parts to wedge together. Try reconnecting to the laptop case, to see if the problem persists. StuRat (talk) 05:30, 16 May 2011 (UTC)[reply]

I don't understand what you're asking. The piece was kinda broken before, but it all still worked with some duct tape around the case. I put it together, and it's not working. Unless maybe I accidentally popped out a screw... Magog the Ogre (talk) 05:53, 16 May 2011 (UTC)[reply]

I didn't ask anything, I made a suggestion. And you said it did work, but just took more force than expected, so I explained why that might be. If you don't understand the lever arm description, think of a teeter-totter/see-saw. If you push at the end of the plank, it's far easier to lift a person on the other side than if you push near the middle (fulcrum). StuRat (talk) 17:00, 16 May 2011 (UTC)[reply]

Believe it or not, your description above helped explain it; after jiggering with the thing for a while, i understood the force idea, and it helped me fix it. Thanks :) Magog the Ogre (talk) 11:54, 17 May 2011 (UTC)[reply]

You're welcome ! StuRat (talk)
Resolved

Independent Publishing on iBookstore?

[edit]

Is it possible to publish a book on the apple iBookstore without an ISBN? --CGPGrey (talk) 10:34, 16 May 2011 (UTC)[reply]

I don't think so. But it's not that expensive to get an ISBN — $125 or so. Self-publishers need to get ISBNs if they are planning to sell their books, too. --Mr.98 (talk) 15:31, 16 May 2011 (UTC)[reply]
If it is something you have written, don't forget to make it available for future scholars to peruse. See Legal Deposit in the British Library and they provide contact info for ISBN.--Aspro (talk) 17:40, 16 May 2011 (UTC)[reply]
These two links might also be of help regarding e-books and “apps”: [1] , [2] --Aspro (talk) 18:03, 16 May 2011 (UTC)[reply]

Octave GUIs?

[edit]
Resolved

Have you used an Octave GUI (under Windows 7)? Can you recommend one? I've looked through GNU_Octave#Graphical_user_interfaces_.28GUI.29, but trying each one in turn seems laborious. This is for a student of mine, so stability and ease-of-use are our most important factors. Thanks! SemanticMantis (talk) 13:52, 16 May 2011 (UTC)[reply]

QtOctave is the best option for Windows, as of the last time I checked. The official version is in Catalan or Spanish, and the English translation has a few rough edges; but if you must use a GUI on Windows, this is the best shot.
Alternatively, consider a few options (as a regular Octave user, here's my usual set of workflows):
  • using a Linux or Unix distribution (not just as a matter of principle; the native *nix provides an X-server as well as a native implementation of GnuPlot for Octave, so graphical display is much much cleaner).
  • If you can't live without Windows, consider installing Wubi or a virtual machine to host a *nix, and run Octave inside it.
  • MATLAB, for Windows - non-free, but excellent.
Ultimately, what do you plan to use the GUI for? If you just want an IDE, there are also excellent text-editors for Windows, including tools that provide syntax-highlighting for Octave; and you can simply run the programs from the Octave command-line. (This is sort of like "rolling your own" IDE, and is less effort than it may seem at first glance). If you actually want all of the graphical toolkits that MATLAB provides, you may need to purchase a student license; Octave does not implement every MATLAB feature, and the GUI widgets are particularly lacking. Nimur (talk) 15:32, 16 May 2011 (UTC)[reply]
Thanks Nimur. You're right, we don't especially need extensive GUI features, but I thought that this would be easier than the roll-your-own IDE. Along those lines, what (ideally free) text editor for windows do you recommend, in terms of Octave interoperability? I am currently using MATLAB on OSX, so (if we keep the code cross-compatible) I don't need a high-functioning GNUplot/ *Nix install for my student. SemanticMantis (talk) 16:09, 16 May 2011 (UTC)[reply]
In one word, "gVim"; free software, supports MATLAB syntax highlighting out of the box; and the graphical Windows port takes the "edge" off the oft-cited difficulty of using vim (by providing menus, mouse interface, and a lot of "familiar" Windows shortcuts). Your student can open n gVim windows for each .m file, and one console running Octave, and move the windows around any which way they like; and presto: instant IDE. Alternatively, you can write a MATLAB script that can be run from the command line, and use vim's native "run program" utility to execute the Octave code as a command-line program:
:!octave --eval mainprog.m
Not everybody likes Vim; so here's some other options that I recommend. For lightweight text-editing, I'm a huge fan of the KDE editor, KATE a Text Editor, because it has two features I care about (and ... fairly little else): a functioning in-editor console (so I can execute shell commands and run programs without closing my editor window); and syntax highlighting. (In a sense, those two are the most important MATLAB GUI features for most users!) Unfortunately, Windows ports of Kate tend to be too laggy, for my preferences; though it works great if you're ssh`ing to a *nix or OS X system. I also use the following text-editors on Windows: gVim (built-in Octave syntax highlighting); UltraEdit32, (though I see that new versions cost money); and of course, Eclipse, which is usually thought of as a Java IDE, but is actually a very versatile, configurable, scriptable tool with excellent text-editing support and syntax highlighting. It has the added bonus of cross-platform project compatibility, and a built-in console, though it may be overkill for your needs. Other Windows programmers swear by Notepad++, Programmers' Notepad, and so on; but I don't really like those tools. Nimur (talk) 16:32, 16 May 2011 (UTC)[reply]
Thanks, you've saved us much time and frustration! SemanticMantis (talk) 19:05, 16 May 2011 (UTC)[reply]

Partitioning help when dual-booting Ubuntu and Windows 7 on a Dell Inspiron

[edit]

I have a Dell Inspiron laptop on which I wish to install Ubuntu. I used to use Ubuntu all the time, but for some reason I've been using Windows for the last few years, but I've reached the end of my tether and want that glorious Linux-feeling back. I don't want to remove Windows 7 completely, I still need it to sync my iPhone and it has a few other things I want to keep around. Here's the problem: the computer comes with three partitions on the hard-drive already. The Windows 7-partition, and a 12 gb-partition which I assume is that MediaDirect crap, and a tiny 40-mb fat16-partition (yes, fat16). I think that's used for some sort of restoring or something. Even though I don't care about these two things, I'd prefer it if I could keep it intact, I don't know if it'll mess up my warranty to remove them or if the BIOS will freak or something if they're not there. So, I'd like them to stay.

So, then, here's my problem: since I want to keep my Windows 7, that's three partitions, and Ubuntu makes it four. But don't I also need a swap-partition for Ubuntu? It's been a few years, but I seem to remember that being a pretty important thing. So that's five partitions. And you can only have four primary partitions. So you see my problem.

I suppose I could create a new extended partition with two logical partitions for Ubuntu and the swap-space, but I'm not sure if that's something you should do (shouldn't an OS be on a primary partition?) Can you skip the swap-partition? Anyway, any suggestions would be helpful. As I said, I'd prefer not to remove those two crap partitions, but I suppose that I could if I had to. 83.250.236.46 (talk) 17:56, 16 May 2011 (UTC)[reply]

If I read Dan Goodell's excellent site on the weird stuff that ships on Dell PCs correctly, that fat-16 partition is probably the Dell Utility Partition. He doesn't talk about what they ship on Windows 7 native machines, but he does talk about the layout (including the post-Ghost recovery strategy) for Vista here. He also talks about the hidden partition for MediaDirect here. I think your first order of business is to run whatever utility they have to generate recovery CD or DVD images (I think that may be a program called "DataSafe Local"); for safety's sake make several. From there, you have options:
  • if it were me (and I am a bit gung-ho about these things) I'd then boot into a Linux liveCD and annihilate all those ur-partitions, resize the Windows partition as I needed, and then let the Linux installer's partitioner have its way with the rest.
  • If you were more cautious, you could boot into a linux livecd, connect an USB disk, and dd those partitions (and the boot block and MBR, or maybe just the whole disk) off to it - so if your subsequent works did harm, you could dd it all back
  • given all those partitions, and Dell's weird use of them, I would share your reticence to add more.
Strictly speaking you don't need a swap partition at all. In normal happy operation the swap is idle and useless. Swap only comes into play when various applications try to allocate more memory than the RAM will allow; with swap the OS uses a chunk of disk (which, compared with RAM, is glacially slow) to keep pages of memory that won't all fit in real RAM. If you get into this condition, with swap enabled, performance nosedives into the pit of suck (the system becomes barely responsive, the disk grinds like crazy). With swap disabled, applications that request more RAM than the system can provide are told "no"; most applications either quit or crash at this point. So enabling swap is choosing between "performance so bad you'll take the battery out" and "applications unexpectedly crash". But mostly you don't get into this circumstance unless something has gone wrong or you're asking a laptop to a job that's beyond it. -- Finlay McWalterTalk 20:00, 16 May 2011 (UTC)[reply]
Slightly off-topic, regarding swapping... No operating system likes to use swapping; it's merely the least-evil-of-all-available-evils. Here's a good anecdote, regarding the use of the Out-of-Memory Killer utility built into Linux Kernel: Respite from the OOM killer. As the article explains, operating system designers have to choose from two unpleasant options: either, malloc() returns null, causing unexpected program-crashing; or memory is over-committed, causing unexpected program-crashing. This is a fact of allowing user-space programs to ask for memory. The only alternative is to require every programmer to be a kernel engineer; or to require that every program is validated and certified to only run on trusted hardware configurations, guaranteeing that no configuration could ever run out of memory. Real-time operating-system designers actually take that route, and have complete authoritarian control over every program-counter and pointer in their software systems. Everybody else, who runs a regular operating system, has to throw a proverbial passenger off the proverbial plane every now and then. Nimur (talk) 20:57, 16 May 2011 (UTC)[reply]
I like the dd solution, that sounds like a good precaution in any case. I might have a USB-drive laying around with a few hundred gigs on it, somewhere. Probably best to just dd the whole drive. I would very much like to wipe those partitions from the face of the earth, but I'm not sure that I am that brave. By the way, am I right in my supposition that I shouldn't install the OS on a logical partition? Because that would seem to be the easiest solution. As for skipping the swap partition, I suppose I could try it out for a while, but I'd really rather prefer to have it. If I felt it necessary, I suppose I could just add it later. 83.250.236.46 (talk) 20:13, 16 May 2011 (UTC)[reply]
Some Google searching suggests that GRUB will boot fine to a logical partition (but I've never done it). I daresay you could leave NTLDR and edit Windows' boot.ini to add a boot option for Linux on the extended partition (again, Google suggests NTLDR can do this). -- Finlay McWalterTalk 20:23, 16 May 2011 (UTC)[reply]
This is all a bunch of ancient and no longer relevant worries. When you do the Ubuntu install, it will work, and it will take care of figuring what sort of partition each partition should be. I have the same sort of setup you do (dual-booting Ubuntu on top of Win 7), and the install (including swap) was completely straightforward. Looie496 (talk) 21:28, 16 May 2011 (UTC)[reply]
Same here: I just installed Ubuntu 11.04 alongside a Windows 7 installation (which already had took up 3 partitions). It made a swap partition, so the Ubuntu installer presumably handles the extended partition nonsense, and GRUB presumably doesn't mind. As an aside, you can totally use a swapfile with Linux, as opposed to a swap partition, and with today's large hard drives, you probably don't need to worry about fragmentation as much. (And, with today's large memory, you ideally don't need to worry about swapping as much, either.) Paul (Stansifer) 06:24, 18 May 2011 (UTC)[reply]

I did not understand all your question but as much i understand tells me that you need to make or manage partition so you can use mini-tool partition wizard/boot partition wizard that can be downloaded from http://www.PartitionWizard.com. you should download home edition its free of cost. and also you can try this- first install Ubuntu(10.1) and then win7. hope it will work. Gopal (http://www.gopalmishra.weebly.com) 180.215.122.246 (talk) 19:16, 21 May 2011 (UTC)[reply]