Jump to content

Wikipedia:Reference desk/Archives/Computing/2012 June 22

From Wikipedia, the free encyclopedia
Computing desk
< June 21 << May | June | Jul >> June 23 >
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.


June 22

[edit]

Why does Apple Inc. permit use of their Mac OS X only on their hardware?

[edit]

Why does Apple Inc. permit use of their Mac OS X only on their hardware? 117.5.15.219 (talk) 07:20, 22 June 2012 (UTC)[reply]

Apple has always been that way. Even if Jobs or someone else ever spoke on the subject I wouldn’t imagine what was said would be either consistent or perfectly logical. I have trouble imagining it being anything other than Jobs’ predisposition.
Now if you’re asking in general how a company might justify acting in this fashion, for that there are answers to be had. ¦ Reisio (talk) 08:30, 22 June 2012 (UTC)[reply]
Yes, Steve Jobs thought the operating system and hardware should be to a single, high quality design and that third party equipment could be inferior and reflect badly on the Apple brand. Such licensing had been permitted at the time he was ousted from Apple and he felt this contributed to the decline of the firm over that period. He ended the practice on his return, see MacOS#Macintosh_clones. I have just finished reading Steve Jobs (book) which is very good for learning about Apple design and marketing philosophy. Thincat (talk) 08:45, 22 June 2012 (UTC)[reply]
In the mid-90s, Apple did license their operating system (then Mac OS) to clone manufacturers. They stopped the arrangement in 1997. See Macintosh clone#Official Macintosh clone program.-gadfium 08:41, 22 June 2012 (UTC)[reply]
In addition to the pertinent answers above, there are also good economics reasons for pursuing such a strategy, most notably that it creates a form of vendor lock-in. - Jarry1250 [Deliberation needed] 12:15, 22 June 2012 (UTC)[reply]

North American area codes with identical prefix assigned

[edit]

How many North American area codes have a prefix matching the area code assigned (i.e. in the xxx-yyy-zzzz format, xxx = yyy)? Off the top of my head, I can think of area code 787 (787-787-xxxx is assigned in Bayamón Norte) and 847 (847-847-xxxx is assigned in Lake Zurich). Are there others? 98.116.65.50 (talk) 07:44, 22 June 2012 (UTC)[reply]

One option for calculating this would be to use this database (which appears to be an excel file) as a starting list, and then use formulas in excel to count only the matching allocations. However, the cost of the database is slightly prohibitive. I am not sure if there is a freely available list of allocations; if there was, however, it would be simple enough to analyze. Sazea (talk) 17:38, 22 June 2012 (UTC)[reply]
The North American Numbering Plan Administration has various freely available data on its site. From the Central Office Code Assignment Records page, I downloaded the "All States" zipped text file, opened it in Excel, then used some formulas and filters to find currently used instances where the area code is the same as the prefix. I found 9 matches:
 NPA-NXX  Rate Center  State  Company
 =======  ===========  =====  =======================================
 213-213  LSAN DA 01   CA     U.S. TELEPACIFIC CORP. - CA
 305-305  MIAMI        FL     METRO PCS, INC.
 310-310  SNMN SNMN    CA     T-MOBILE USA, INC.
 330-330  YOUNGSTOWN   OH     CLEVELAND UNLIMITED, INC.
 419-419  BOWLNGGREN   OH     LEVEL 3 COMMUNICATIONS, LLC - OH
 626-626  LA PUENTE    CA     U.S. TELEPACIFIC CORP. - CA
 630-630  OSWEGO       IL     GLOBALCOM, INC.-IL
 787-787  BAYAMONNOR   PR     PUERTO RICO TELEPHONE CO.
 847-847  LAKEZURICH   IL     TELEPORT COMMUNICATIONS GROUP - CHICAGO
--Bavi H (talk) 01:14, 23 June 2012 (UTC)[reply]

What is the difference between a web server and a web framework?

[edit]

The web framework seems to cover the same functionality as the web server (+ something mroe). OsmanRF34 (talk) 12:57, 22 June 2012 (UTC)[reply]

Like many IT terms, "web application framework" is terribly vague. The article we have on it seems to imply that it is the server-side software that can run various scripts or programs — e.g. the Zend Framework, which, when installed on a server, can be used to run server-side PHP scripts. As that explanation implies, it is not the same thing as the web server itself. --Mr.98 (talk) 14:34, 22 June 2012 (UTC)[reply]
OK, but can a web framework, e.g. the Zend Framework, handle http requests or does it need an extra web server, e.g. Apache? If the former is the case, then a web framework seems to me like a web server which can run server side programs. OsmanRF34 (talk) 22:20, 22 June 2012 (UTC)[reply]
A framework is usually the "scaffolding" to write web based applications working. Some frameworks, such as Ruby on Rails, include their own web server, but it is more normal that you need to use them on top of an existing web server. A good example is the Spring Framework. - Letsbefiends (talk) 22:43, 25 June 2012 (UTC)[reply]

How do you jump to 0x10000 in x86 assembly using intel syntax and assembling with NASM?

[edit]

I know I succeed in writing my code to that address using int 13h because I can see it at that memory location. What I can't do is jump there. I put 0x1000 (three zeros there) into es and 0x0000 into bx and I know that [es:bx] means the address calculated by (es * 0x10) + bx which does equal 0x10000 (four zeros there). But eip, the instruction pointer, never does go there. I've tried "jmp [es:bx]", "jmp 0x1000:0x0000", and a bunch of other permutations that NASM doesn't even accept. I don't know. Do you, oh geniuses? 20.137.18.53 (talk) 18:31, 22 June 2012 (UTC)[reply]

This posting has some simple 16-bit real mode boot code which loads some code from disk to 1000:0000 and then JMPs there. -- Finlay McWalterTalk 19:06, 22 June 2012 (UTC)[reply]
Still failure. My boot loader here. I booted it up in Qemu and did a memsave on the first 50 bytes at 0x10000, opened it up with tweak, and saw my "kernel" code there (simple . But EIP still refuses to be 0x10000, or reach it and then hang where I want it, is what I mean). Full images of the situation here. Sorry for the sarcastic tone, I've been trying to get this to work for too long. Thanks to whoever takes time to try to help me! 20.137.18.53 (talk) 19:40, 22 June 2012 (UTC)[reply]
It looks like you're writing a kernel that takes over directly from the BIOS. In that case, the CPU is in real mode, so your assembler needs to be emitting 16-bit code, and the program counter is the CS:IP register pair rather than the EIP register. --Carnildo (talk) 01:43, 23 June 2012 (UTC)[reply]
jmp 0x1000:0x0000 assembles to the correct far jump instruction in nasm. There is something wrong with your in-memory kernel code since 63 61 (the first two bytes) is not a jump instruction. Those bytes should be EB 1B. -- BenRG (talk) 06:02, 23 June 2012 (UTC)[reply]
Note that jmp [es:bx] is a near jump to the 16-bit address stored at es:bx. What you actually want would be written jmp es:bx, but there's no such instruction in x86 assembly. The only far jump instructions are immediate (jmp 0x1000:0) and indirect (jmp far [bx], where the 16+16 bit address is stored at bx..bx+3). -- BenRG (talk) 17:43, 23 June 2012 (UTC)[reply]
OP here. Thanks for the information people, especially BenRG. It seems that the jump itself is not my main problem. When I get back to my machine this is on, I'm going to check the first two bytes of the kernelStub.bin file I dd'd to the second sector position of my hard drive img file. Speaking of other ways to do it, I got an idea from someone else who said that if I do push word 0x1000 \ push word 0 \ retf, This gets 0x1000 into CS and 0 into IP and then goes there. It's nice to know about that, but I'll probably stick with jmp 0x1000:0. 69.243.220.115 (talk) 13:24, 24 June 2012 (UTC)[reply]
Very weird. kernelStub.bin has EB 1B at the very beginning. hda.img has EB 1B right after 55 AA at the beginning of the second sector. The carry flag is clear in my load_mem subroutine indicating that it believes the load was good. I have 0x1000:0 in ES:BX when it runs. All the bytes are right in memory except the first two are always 63 61. And I do have mov cl, [SECTNUM] in the bootLoader.asm that gets assembled. I'm just too lazy to update the google docs document there. ?! 20.137.18.53 (talk) 12:53, 25 June 2012 (UTC)[reply]

Process of elimination style quiz maker

[edit]

Hello there,

Does anyone know of a quiz maker on the internet that allows you to make quizzes in a process of elimination style - that would allow you to ask yes or no questions that narrow down a list of possible fits for the person being questioned, until there is only one option available?

E.g. Imagine it was a quiz to determine what author the person taking the quiz might like. One of the questions could be 'are you interested in books written before the 20th Century?' If they responded yes, then the pre-20thC authors would remain on the option list until further questions, if not, they'd all be removed from the potential quiz outcomes.

I've googled for a while looking for elimination-style quizzes to no avail, so would appreciate if someone could help out on this one.

All the best,

--Celinmairir (talk) 18:39, 22 June 2012 (UTC)[reply]

There's a classic animals quiz, where it asks questions, then guesses the animal. If it guessed wrong, it then asks what question would distinguish between the correct animal and the one it guessed, and adds that to the list of questions to ask. It's a very elegant programming example, but I forget the name. StuRat (talk) 20:00, 22 June 2012 (UTC)[reply]
I've always called that game just "Animals". There's an online version at animalgame.com.-gadfium 23:07, 22 June 2012 (UTC)[reply]
Hi there, Sturat - that's an interesting example. The asking questions bit is the bit I need - it doesn't need the sophistication of guessing more than once - it just asks questions until it's narrowed down to 1 of a list of 10 or so, and then gives the verdict. It'd be Q1. Do you like ____? [If no: remove possibilities 8 and 9] and so on. I'm surprised I can't easily find something of that nature on the web. If you remember the program, I would be interested. All the best, --Celinmairir (talk) 21:51, 22 June 2012 (UTC)[reply]
Gadfium provided a link above, but that's just to play the game, not to see the code (although I didn't log in, so maybe they do show you the code then). StuRat (talk) 03:09, 23 June 2012 (UTC)[reply]
Incidentally, what do you actually want to do, write your own program or use a program written by others ? In the latter case, I could write it for you, but it would have a command line interface, no fancy graphics. (I'm assuming your operating system is Windows, BTW.) Would that be helpful ? StuRat (talk) 03:13, 23 June 2012 (UTC)[reply]

Getting files from a bricked Droid

[edit]

I have an HTC Droid Incredible that was in my pocket when I went in the pool last weekend. Despite letting it sit in rice for a few days, it is completely dead and won't boot up. Is there any way I could get any files off of the hard drive? —Akrabbimtalk 18:43, 22 June 2012 (UTC)[reply]

If the phone CPU itself is inoperable, the trouble would be getting at the data stored in the flash memory. The phone doesn't contain a readily removable flash card, which you could extract and plug into another phone or into an adapter. Looking at disassembly videos, it seems the phone has a Hynix H26M44001CAR part, which seems to be a ball grid array package implementing eMMC on a single chip (I can't be sure, as Hynix don't make that part any more, and are very unforthcoming about info or datasheets). That's surface-mounted to the phone's circuit board. Prising it of would destroy it, and because it's BGA this means all the connectors are buried underneath it in a very inaccessible way. I'm sure a specialist data-recovery company could either un-mount the device or could figure out the manufacturing test points on the circuit board and access the device that way (assuming the pool didn't break it too). But that's an exceptionally specialised, technical, and time-consuming task, which would surely cost an eye-watering sum. -- Finlay McWalterTalk 19:41, 22 June 2012 (UTC)[reply]
Hmm, I guess that's a no-go then. I'll just have to settle for only recovering whatever files I had stored on my micro-SD card. Thanks —Akrabbimtalk 21:07, 22 June 2012 (UTC)[reply]

Monitor jitter

[edit]

Im using ATI Radeon Xpress 200 card and Dell E193FP monitor. Ive tried various screen resolutions/refresh rates but still get noticable horizontal jitter. Any suggestions as to what the cause is?--92.25.110.216 (talk) 19:45, 22 June 2012 (UTC)[reply]

That's an active matrix TFT-LCD monitor (to save everyone else the trouble of looking it up). Here are the specs: [1]. The highest preset resolution is 1280 x 1024 at 75 Hz, is that how you have it set ? That should provide a horizontal frequency of 80 kHz, which shouldn't have any noticeable flicker. Setting a higher resolution might result in flicker. BTW, by "jitter", do you mean flashing on and off ("flicker"), or wiggling back and forth ? StuRat (talk) 20:06, 22 June 2012 (UTC)[reply]
Electronic interference is one possibility. First try turning off anything electrical in the area. If that doesn't work, try moving those items farther away, since some electrical devices still use electricity (and generate interference) even when off.
Another possibility is a loose connection. Pull all the cables out and plug them back in, and, if that doesn't work, pull out the card and reseat it (with computer off, of course). StuRat (talk) 20:03, 22 June 2012 (UTC)[reply]
Capacitor has gone! Typical tell-tail symptom.--Aspro (talk) 20:15, 22 June 2012 (UTC)[reply]
What capacitor and how do they fix it (permanently or workaround) ? StuRat (talk) 20:18, 22 June 2012 (UTC)[reply]
Oh. Is the picture half way up from the bottom – or half down from the top- pinched? If not ...capacitors gone. Its an electrolytic big one, so you can't get away with winding a bit of cooking foil and greaseproof paper around a loo roll. You need to pop down to Radio Shack with your piggy bank. Its part of the fly-back oscillator thingy circuit.--Aspro (talk) 20:29, 22 June 2012 (UTC)[reply]
Sorry, that was a local colloquialism. By Loo Roll I mean the cardboard tubes found inside one of these popular household consumables.--Aspro (talk) 20:39, 22 June 2012 (UTC)[reply]
(OP)I define horiz jitter as wiggling left and right. My ATI graphics is integrated on the board so I cant unseat/reseat. Tried all StuRats suggestions. Found out tho that its ok at 1024X768 but no higher. Is that a clue?--92.25.110.216 (talk) 20:32, 22 June 2012 (UTC)[reply]
Yes. The capacitor is braking down. It will get worse with time – if your eyes can stand it.--Aspro (talk) 20:39, 22 June 2012 (UTC)[reply]
If you can find its circuit diagram, it will state the V's and F's but they should be visible on the capacitor itself. Look for 'horizontal' on the diagram and the value of the 'big capacitor.' Take it out. Get a new one. Be happy in the knowledge that you're depriving some Chinese coolie from feeding his family for a day by fixing your monitor, that you would otherwise have take to the dump/refuse centre/etc., and exported to China for recycling.... You owe it -to this planet. --Aspro (talk) 20:52, 22 June 2012 (UTC)[reply]
Aspro, its not a CRT monitor so doesnt have a timebase controlled by a capacitor like you think. Its a TFT LCD monitor.--92.25.110.216 (talk) 10:30, 23 June 2012 (UTC)[reply]