Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 October 29

From Wikipedia, the free encyclopedia
Computing desk
< October 28 << Sep | October | Nov >> October 30 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 29

[edit]

Assembly to C Conversion

[edit]

This is some practice code my teacher gave us, and I'm trying to figure out this bit of IA32 disassembly from a C function. Each of the 3 chunks of assembly below corresponds to the 3 lines in this C function (it's a practice problem and we're supposed to figure out the 3 lines of C from the assembly. I have the solution key to it, but it makes no sense and I was hoping someone could help me figure it out):
void Blip(int x, char **y) {
// Line 1
// Line 2
// Line 3
}

Assembly:

Blip:
push %ebp
mov %esp, %ebp
sub $0x10, %esp

mov 0x8(%ebp), %eax
imul 0x8(%ebp), %eax
sub $0x7, %eax
mov %eax, -0x4(%ebp)

addl $0x8,0xc(%ebp)

mov -0x4(%ebp), %eax
mov 0xc(%ebp), %edx
mov (%edx, %eax, 4), %eax
add $0x3, %eax
movb $0x41, (%eax)

leave
ret

Could anyone please help me figure out the assembly? I'm not sure at all which of the variables it's accessing where and when in the code. Thank you for your help!

—Preceding unsigned comment added by Legolas52 (talkcontribs) 08:47, 29 October 2010 (UTC)[reply]

If I understand it correctly, then (after the first three instructions that fix the base pointer) 0x8(%ebp) refers to the stack entry that holds x, 0xc(%ebp) refers to y, and -0x4(%ebp) is presumably some temporary variable.—Emil J. 15:32, 29 October 2010 (UTC)[reply]
That is, it seems to be doing
void Blip(int x, char **y) {
  int t = x * x - 7;
  y += 2; /* but the pointer is really incremented by 8 == 2 * sizeof(*char) */
  y[t][3] = 'A'; /* == 0x41 */
}
This looks like nonsense code to me, so I may be wrong.—Emil J. 16:15, 29 October 2010 (UTC)[reply]

small, light, quad-core i7, 16GB ram 15" workstation??

[edit]

Is there a workstation like Apple's MacBook 15" in form factor, but with a mobile quad-core i7 and up to 16 GB of RAM, for demanding, high-performance scientific applications, from a manufacturer such as Dell, IBM, or HP? (ie top tier) What do professionals needing this type of power typically use? Thanks. 188.174.13.38 (talk) 11:13, 29 October 2010 (UTC)[reply]

Searching "i7 quad mobile 16gb" turns up potential solutions from Lenovo (ex IBM) and HP etc eg http://www.google.co.uk/products?hl=en&q=mobile%20quad-core%20i7%2016GB&um=1&ie=UTF-8&sa=N&tab=wf http://www.amazon.co.uk/EliteBook-Mobile-Workstation-8740w-fingerprint/dp/B003NLY1IK , but I didn't find anything that had 16gb installed as standard. Most appear to be 17" though http://www.data-pro.co.uk/thinkpad-w510-52017.html?___store=default is 15.5". No idea about the rest of the question.
There seems to be a lot out there about these Dell M6500 things that you can custom order. You can get the i7 in them, and they can accommodate up to 32 GB RAM, although it's going to cost you if you have them put in that much. I would assume that most people running intensive scientific programs are still doing so on a desktop, but I could be wrong. Buddy431 (talk) 21:50, 29 October 2010 (UTC)[reply]

help

[edit]

As I am a new CSE(computer science) student i am facing some problems in learning programming language.how can i learn programming quickly & easily?want to be expert in it.So i need help.So please someone help me.Will be grateful to him.my mail (removed) —Preceding unsigned comment added by Rajib rezwan (talkcontribs) 14:58, 29 October 2010 (UTC)[reply]

What programming language do you want to learn? That is a very important place to start. Actually, I would start with "what do you want your programs to do?" That will help decide which language to learn. -- kainaw 15:09, 29 October 2010 (UTC)[reply]
Since you are a computer science student, we should ask what computer science courses you have already taken, or are signed up to take in the future; and what language they are going to start you with. Comet Tuttle (talk) 17:12, 29 October 2010 (UTC)[reply]
The only way to learn programming languages is to use them to write programs. Looie496 (talk) 17:59, 29 October 2010 (UTC)[reply]

Re installation DVD and laptop that wont boot

[edit]

I have a laptop that won't boot even into safe mode, can I use the re installation dvd to try and fix this problem without having to do a complete re install? It is windows Vista 64 bit on a Dell inspiron thanks. Mo ainm~Talk 16:55, 29 October 2010 (UTC)[reply]

This non-Microsoft site seems to list what will occur when you boot from your installation CD; there is a "Repair" option. (Don't click that website's links like "Click here to fix Vista errors", though.) Personally I would be paranoid and image copy the drive to an external USB hard disk first, but that's just me. Comet Tuttle (talk) 17:10, 29 October 2010 (UTC)[reply]
I have got it to run startup repair but this doesn't find any problems but still I can't boot? Any suggestions I could use to try and fix this? Mo ainm~Talk 17:16, 29 October 2010 (UTC)[reply]
Startup repair seems to only fix a limited set of problems. Assuming you have Windows Restore on and working, you can try restoring to an earlier configuration. Whenever I've had problems, restoring to the latest snapshot has always fixed the problem for me. 206.131.39.6 (talk) 19:08, 29 October 2010 (UTC)[reply]
There are no restore points set on the laptop. Is it possible it is a hardware failure? Mo ainm~Talk 19:38, 29 October 2010 (UTC)[reply]
Is it possible? Sure. This is a rather lame thing to suggest, but the next thing I would try (on a desktop machine, not necessarily a laptop) would be to disconnect the optical drive and any other SATA or PATA devices, and try booting the hard disk while it's the only storage device connected to the system; if it boots OK then this indicates a problem with some other device connected to the motherboard. Since you say this is a laptop, I might not do this, because personally I'm not comfortable disassembling and reassembling laptops. So, in your case I would use another machine to download Knoppix and create a boot disc, and then bring it to your laptop, boot Knoppix, and then poke around on the hard disk to see whether all your files appear to be there or not. Comet Tuttle (talk) 16:58, 1 November 2010 (UTC)[reply]

segmentation faults in fortran

[edit]

I have a large piece of code (10+files, several thousand lines (well its large for what i'm use to)) that i've been given. I'm using the ifort compiler and when i compile and run without any flags i get a seg fault. Using the idb debugger (this is without any debug flags set) it appears to seg fault at a small helper function that only does some basic maths on its inputs so it seems unlikely to be it. BUT when i compile with -g (or -debug extended) the problem disappears which means i cant use the debugger to get more info (like where it crashes and what various variables where before it crashed). Anyone know how i can get more information from the debugger without using any debug flags? Thanks --81.147.84.39 (talk) 17:32, 29 October 2010 (UTC)[reply]

Enable Traceback: use the -traceback flag, to ensure you are crashing where you think you are. Also, spit out warnings (-Wall). Note that if you have optimizations enabled, your debugger may not be able to track source-code lines exactly. Nimur (talk) 18:35, 29 October 2010 (UTC)[reply]
It's been decades since I've done any Fortran, but in similar situations involving C, I find that putting a bunch of print commands into the code in the vicinity of the trouble spot is often the most effective approach. Looie496 (talk) 19:02, 29 October 2010 (UTC)[reply]

multiple video streams

[edit]

I tried merging several video files with mkvtoolnix into one .mkv file. It works ok, but when I open it with VLC it tries to display all the streams at the same time in different windows. Is there any way to stop this? I tried selecting only one stream in VLCs menu but it didn't work. 82.44.55.25 (talk) 19:25, 29 October 2010 (UTC)[reply]

Google, Gmail etc.

[edit]

Has something happened to Google's system, including its main site, Gmail, etc., on 29 October 2010? — Michael J 19:30, 29 October 2010 (UTC)[reply]

I've not noticed anything different. Could you elaborate on what you mean? 82.44.55.25 (talk) 19:35, 29 October 2010 (UTC)[reply]
They aren't there today. We keep getting error messages whenever we try to access them. — Michael J 19:43, 29 October 2010 (UTC)[reply]
Whatever it was, it's fixed now. But it was down for five or six hours. — Michael J 20:22, 29 October 2010 (UTC)[reply]
In the future, you can check with downforeveryoneorjustme.com. Comet Tuttle (talk) 20:56, 29 October 2010 (UTC)[reply]
Wonderful site. Thank you, I will do that in the future. — Michael J 01:40, 30 October 2010 (UTC)[reply]

Boot Camp on a Mac OS X

[edit]

Hi, I am trying to set up Boot Camp on my Mac but it has come up with a message saying that I can't that 'The disk cannot be partitioned because some files cannot be moved.' and then instructs me to back up my disk (I have a Time Capsule, so already done that) and use Disk Utility to format the disk as a single Mac OS X Extended (Journaled) volume, which is to be followed by restoring my information to the disk. Problem is, I'm a bit of a technology noob and don't know what any of that means. Can someone offer me a 'for dummies' explanation? Thanks 128.232.247.49 (talk) 19:55, 29 October 2010 (UTC)[reply]

Once the disk is backed up, boot into your OS X install CD (hold the C key while starting up), choose your language, then once you can see the top menu bar with the file, edit, and apple menus, open Disk Utility from the list of available programs. Use this to reformat (erase) your main OS drive to Mac OS X Extended (Journaled). You can then restore your OS X install from a time machine backup with the appropriate utility (Utilities Menu -> Restore System from Backup). Once you've done this, all your files and information should be on one part of the drive so the Boot Camp utility will be able to add the boot camp partition. 206.131.39.6 (talk) 20:11, 29 October 2010 (UTC)[reply]

Fastest Computer

[edit]

When was the fastest computer in the word of a similar speed to an average desktop pc today? —Preceding unsigned comment added by 86.141.156.45 (talk) 20:06, 29 October 2010 (UTC)[reply]

See Supercomputer#Timeline_of_supercomputers
Assuming we ignore the graphics card ('cos a typical graphics chip is an intel chip which typically can't be used for any useful computations) a typical desktop does about 10GFlops eg a low end intel core2duo http://www.intel.com/support/processors/sb/CS-023143.htm#4 which compares to the best from 1989, or if you think 10Gflops is too big for average and want more around 1-5Gflops then it would be equivalent of the best from 1983-5 eg Cray X-MP or a Cray-2. 77.86.42.103 (talk) 20:37, 29 October 2010 (UTC)[reply]
And as always, "fastest at doing what?" For example, no supercomputer in 1983 could compress or decompress an H.264 video at any speed, because the software (and some hardware) did not exist yet. And in terms of data-access, supercomputers today have essentially the same data latency to hard-disk and network as a moderate- to high-end desktop PC (maybe a little bit faster, but not much). So if your task is disk-heavy, the benefits of a "high performance computer" are moot. Nimur (talk) 20:56, 29 October 2010 (UTC)[reply]

How does ChatRoulette STILL know that I'm on the same laptop?

[edit]

So I was banned from CR for trying to paste a message less than 5 seconds after starting a conversation with someone (because it mistook my action as spam.)

Then I decided to delete all Chatroulette's cookies and try again from another location (a different IP address.) Then I got the notice that I was still banned, now under that new IP. They were IPs for my college's network at this point.

What else should I remove/change that identifies me so I can mistake Chatroulette's system into thinking I'm someone else?

(Sorry, but there is no "appeal button," so I must try this other route.) --129.130.252.150 (talk) 20:42, 29 October 2010 (UTC)[reply]

ChatRoulette seems to use Flash. Have you also cleared your Flash cookies? Hint: The "Delete private data" function in web browsers don't generally delete Flash cookies. 125.163.227.57 (talk) 02:00, 30 October 2010 (UTC)[reply]
we have an article on this: Local Shared Object --Spoon! (talk) 21:06, 30 October 2010 (UTC)[reply]

Allowing ports through the router - with some complications, how to do this?

[edit]

I'm trying to play the multiplayer online game "world of warcraft" on my computers (one laptop and one stationary computer) but it won't work on neither. I've tried everything and checked that all ports are open through my firewall and such and followed instructions by Blizzard(the makers of the game) and everything should be in order, except one thing; that the ROUTER itself isn't allowing the ports to go through. I'm pretty sure that's the problem. If u have reason to suspect another reason, please share :) but i'm positive that is the reason the game won't log in. Coz the game itself starts up just fine, but when i try to log on to the game server it fails to connect. And the thing here is that both my computers are "stealing" the net-signal from my friend's router. We both know very little about these technical things of computing and can't get our heads around it, or rather *I* can't get my head around it, coz he with his limited knowledge is of no help anyway.

The router I'm "stealing" network signal from is a : Atheros AR9285 802.11b/g/n WiFi Adapter and I'm wondering if I can adjust these things and allow the necessary ports through the router on MY computers?? or do I have to go on the computer of my friend that is directly connected to the router to adjust? My Hewlett Packard laptop has windows 7 and my stationary pc has windows vista if that is of importance. How do I do this?? How do I proceed: I need some detailed step by step instructions I suspect. And preferably I would like to go through my own computers to adjust this IF possible rather than mixing around on my friend's computer.

(just in case it is important, my stationary computer uses a small device with usb-plug that is called Siemens Gigaset usb adapter 108 to catch the signal from a distance. it's what we call wireless adapter, no? Anyway there it is, in case it is of any importance)

i hope i have given all necessary info for someone knowledgable and skilled to help me.

I really hope someone can help me, I have even subscribed long ahead on the game and at the moment it is nothing but money out of the window when I cannot log in and play.

Crossing fingers that someone can give helpful answers, thank you :)

Wikipedia-GUEST —Preceding unsigned comment added by 84.49.204.143 (talk) 21:44, 29 October 2010 (UTC)[reply]


Just a suggestion :while in Wikipedia, sign with 4 tildes (i.e. this thing : ~)

I believe you can access your router settings via a IP address I think, from any computer connected to it. However, to access it it usually requires an username and password. Check your user documentation if you (or your friend) has never used it before (It should be separate from the username and password if the router requires a password to access the internet) . And just a note, I think you should tell your friend that you are stealing their bandwidth. It's only kind to do so. General Rommel (talk) 04:43, 30 October 2010 (UTC)[reply]

Generally speaking, you need to have access to your "friend's" router system to set up port-forwarding. this is usually achieved by going to the router system page in a web browser, entering appropriate passwords for access, and enabling forwarding on the relevant ports. you may also need to set up forwarding on those ports through your own computer firewall as well, depending on how (and if) you have it set up. This means that if you're actually stealing this bandwidth you're probably SOL (and a good thing, too - stealing bandwidth with a with a bandwidth-hog like WoW is rude to the extreme. --Ludwigs2 06:29, 30 October 2010 (UTC)[reply]

Don't worry guys, my friend knows I'm "stealing" and he's fine with it, why wouldn't he be? No point for us both to subscribe on internet distribution when we can share. You're right though that he's the one paying for it :P, something which he did before I came into the picture and which he would still have done today whether I was using his net or not. A computer guy i bought my pc from helped us setting it up a long time ago, and my friend was perfectly fine with it, so no worries. Password and username is not required for me to use the net, because it is not secured or locked or what to call it. So I have set my computers to automatically track the net signals and be on net whenever i start up my computers. But how do I know which site is the system page where i can allow the ports through the router? And where to find the adress?

By the way, you say I'm proabbly SOL, i have no idea what that means...

Thanks :)

84.49.204.143 (talk) 09:53, 30 October 2010 (UTC)[reply]

see SOL at wiktionary, definition 4. even if there is no password to connect to the router, there is usually an administrative password to modify the router's information. you'll need to ask your friend for that. the IP address you go to depends on the kind of router he bought, and the admin password is something that only he will have. --Ludwigs2 16:44, 30 October 2010 (UTC)[reply]

Blizzard support has step-by-step instructions for some popular router models [here]. 84.239.160.59 (talk) 08:06, 31 October 2010 (UTC)[reply]

Microsoft Sam

[edit]

Who voices Microsoft Sam? jc iindyysgvxc (my contributions) 23:19, 29 October 2010 (UTC)[reply]

The text to speech engine used entirely synthetic waveforms. No human voice was recorded to create the sounds of the individual phonemes. They are computationally-generated "syllables" (phonemes, really), and are combined and "warped" by a text-to-speech engine to mimic natural speech patterns. We have an article on Microsoft text-to-speech voices. Essentially, each "voice" is a complex set of numerical parameters that feed into the Microsoft Speech API and drive the various sound generation algorithms. Nimur (talk) 00:35, 30 October 2010 (UTC)[reply]