Wikipedia:Reference desk/Archives/Computing/2008 November 19
Computing desk | ||
---|---|---|
< November 18 | << Oct | November | Dec >> | November 20 > |
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. |
November 19
[edit]3 quesshuns in one
[edit]Q1 - How would I (if possible) install MediaWiki on a remote server (i.e., a free hosting site)? Q2 - Is/are MediaWiki (along with php5 and mySQL) able to be installed/run on Windows? I see a couple of Windows help things on the MediaWiki installation FAQ's, but they're really not helping me at all. Q3 - Is there a script/program/software-of-any-type that would compute an infinite value (i.e., e (number) or pi (number)), then, at timed intervals, put the number into a text file? flaminglawyercneverforget 00:26, 19 November 2008 (UTC)
And adding another one - what's the best/most-space you can get with a 40-pin harddrive? flaminglawyercneverforget 01:16, 19 November 2008 (UTC)
- For this last question, by "40-pin", I assume you mean ATA. In AT Attachment#Drive size limitations, it says that the limit for the latest version of ATA, with 48-bit addressing, is 144 petabytes. --128.97.245.116 (talk) 02:32, 19 November 2008 (UTC)
- Wow, that's over a million times increase from the previous limit of 137 GB; they don't mess around with small upgrades, do they ? I wonder if you could take up all that space with every TV episode and movie ever made ? StuRat (talk) 14:24, 19 November 2008 (UTC)
- Also note that no current hard drive is anywhere near that size. I found a 1.5 TB (Tera Byte) drive here: [1]. That's a few months ago, so there may be a 2 TB drive out by now. StuRat (talk) 14:37, 19 November 2008 (UTC)
- There's a world of difference between the theoretical addressable limit and what can be built given current manufacturing techniques and reasonable physical size limitations. --LarryMac | Talk 21:25, 19 November 2008 (UTC)
- Nobody would be willing to buy such a large hard drive because then they would be arrested for being a petaphile (or is that members of PETA ?). :-) StuRat (talk) 01:29, 20 November 2008 (UTC)
Weird Internet problems
[edit]Occasionally - about once a day - my wireless connection to the Internet will sort of mess up. I'll suddenly not be able to access any websites in any browser, but I can still ping sites successfully and, if I'm connected to an instant messenger or file-sharing program, I'll stay connected to it unless I exit it and start it again. The only way I can fix this problem is to restart my computer. Disconnecting from the server and reconnecting to it or even turning off and on (or uninstalling and reinstalling) my wireless card doesn't help. This occurs no matter what server I'm connected to. Windows Firewall is deactivated (I'm using Vista) and I don't have any other firewalls or similar software. Anyone have any idea what might be up? Thanks. -Elmer Clark (talk) 01:54, 19 November 2008 (UTC)
i dont know if this is any help or not but sometimes on my computer when im using a P2P program (uTorrent in this case) and i use it alot the internet will stop working properly (eg my web browser: either Int. Exp. or Safari, will not display webpages and will say 'cannot connect to server'). However uTorrent and MSN instant messenge will still work fine. In my case i find that if i just leave my computer alone for a while (with any P2P programs off!) then after about 10 mins the internet will work again fine, however it could be as much as 1/2 hour. I dont know if thats the same problem or not but i thought it might help. --81.77.103.76 (talk) 12:36, 19 November 2008 (UTC)
- I can think of two potential problems here. It might be one or both of them. First your DNS server might be flaky for some reason. Try using OpenDNS and see if that doesn't help. Second, you might be saturating your upstream line. This happens a lot with file-sharing, you're going to want to set uTorrent up so that your maximum overall uploading speed is no more than about 75% of your upload cap. (I don't know what yours is, but Comcast caps me at a measly 30k!) Hope this helps! APL (talk) 13:55, 19 November 2008 (UTC)
Java Script Problem
[edit]I'm trying to write a java program in which a prompt comes up and asks the number of items a person would like to purchase (got this part done). There is a price and tax scale so the first 25 cost $100, second 25 cost $75 and so on. The first 30 are taxed at 5% the second 10 are taxed at 4% and so on. Then the program prints the breakdown and total cost.
I don't want someone to write the code I just need to know how to go about doing it so I can write it myself, I just don't know where to start or how to go about doing it. I don't need anything special, it needs to be as basic as possible.
Thanks in advance for any help. —Preceding unsigned comment added by 143.200.138.120 (talk) 03:53, 19 November 2008 (UTC)
- This might not be the best way to do it, but try using a counter variable. For example (in C, but Java should be similar):
int items;
int i = 0;
int totalcost = 0;
scanf("%d", &items); // get the number of items the person would like to purchase
for (int i = 0; i < items; i++)
{
int cost;
// first 25
if (i < 25)
{
cost = 100; // costs $100
}
else if (i < 50) // next 25
{
cost = 75;
}
...
totalcost += cost;
printf("Item %d costs $%d.\n", i + 1, cost);
// do tax, first 30
if (i < 30)
{
...
}
... // do next 10
}
printf("Total cost: %d.\n", totalcost);
- Of course, a more elegant way would be to use an array of rules. --wj32 t/c 06:14, 19 November 2008 (UTC)
- Oh wait, is this Java or JavaScript? --wj32 t/c 06:18, 19 November 2008 (UTC)
- JavaScript if that makes a difference. —Preceding unsigned comment added by 143.200.225.124 (talk) 15:22, 19 November 2008 (UTC)
- The difference between the two is the difference between night and day.--Rjnt (talk) 00:26, 20 November 2008 (UTC)
- Night and day really aren't that different. .froth. (talk) 02:34, 21 November 2008 (UTC)
- The difference between the two is the difference between night and day.--Rjnt (talk) 00:26, 20 November 2008 (UTC)
- JavaScript if that makes a difference. —Preceding unsigned comment added by 143.200.225.124 (talk) 15:22, 19 November 2008 (UTC)
- Oh wait, is this Java or JavaScript? --wj32 t/c 06:18, 19 November 2008 (UTC)
Ok, I'm not getting anywhere. Basically I need to have an input and if it's between 1 and 50 it needs to go through an equation and if it's between 51 and 100 it goes through another and so on. So I need to do something like: var i = promptInt("how many bowling balls would you like to buy")
if(i <= 50) { document.write((i * 100)+(i * 100 * .08)) }
if( 101> i >50) { document.write((540) + (i * 100 * .07)) } --143.200.225.124 (talk) 00:04, 20 November 2008 (UTC)
var i = prompt("how many bowling balls would you like to buy");
if(i <= 50)
{
var lt50 = (i * 100) + ((i * 100) * .08);
document.write(lt50);
}
if(i > 50 && i < 100)
{
var gt50 = (540) + ((i * 100) * .07);
document.write(gt50);
}
--Rjnt (talk) 00:25, 20 November 2008 (UTC)
- I guess that's a better method than mine - no pointless loops. --wj32 t/c 05:06, 20 November 2008 (UTC)
information about some Computing history
[edit]may I have some information on the history of computing hardware? image scanner history? mouse history? keyboard history? Ram and Rom history?--Ebn-sadiik (talk) 04:57, 19 November 2008 (UTC)
- Did you mean something like History of computing hardware or History of computing? CambridgeBayWeather Have a gorilla 05:18, 19 November 2008 (UTC)
Umm didn't you get any relevant information by searching it up on google or wiki? Cause i'm pretty sure all the information you'll need ,will come up if you just google or wiki it. IF you still don't then i'd be happy to help. —Preceding unsigned comment added by Vineeth h (talk • contribs) 11:48, 19 November 2008 (UTC)
HOW TO JOIN TWO EXE FILES!
[edit]Hey all, So i made this kind of simple "virus" in dev-c++ . You can't really call it a virus but what i've basically done is made an infinity while loop and then using data file handling i opened up a file.txt and did cout<<"ANY GARBAGE VALUE"; So it'll keep doing this over and over again cause its in an infinity while loop and i ran it once and to my surprise i saw that the size of the file.txt increased by about 1.7GB/minute. So it uses up your hard drive space pretty fast thats why i said its like a "simple virus". Anyways so then i put in some more coding and ended up hiding the output screen. So when you run the exe file you won't see a window since i hid it and it'll keep running and you won't even realise it's running in your background but when you open task manager you'll see it in the processes.
Now i decided to take it another step and wanted the .exe file to get copied to the startup folder in windows XP whenever someone ran it so that first it'll copy itself there and then run ,so that even if you shut down the computer the next time you restart the computer the program will automatically start running at startup without your consent. But this feature to copy the file to the startup folder seemed a bit of a problem in c++ cause the copy command require the folder not to have any spaces between the folder name. So i then made a temporary batch file, "temp.bat" and in that i put in the copy command to copy the .exe file to the startup folder and it worked perfectly. So now i have two files! 1. the .exe file which is the program and 2.the .bat file to copy the exe file to the startup folder.
So then i got a .bat to .exe converter off torrents and converted the .bat file to .exe. But now i want to know wheter there's any software or method to join these two exe files. Such that first the .exe file with the copy command runs and copies the .exe file to the startup folder and then it executes the "virus".
And if there isn't any such software could you please tell me another approach to this so that it'll work properly? Don't think of this as a serious virus thing, i just want to know wheter this is possible. Cause this is like a good prank i can play on my friends' computer and all.Vineeth h (talk) 07:08, 19 November 2008 (UTC)
- You don't copy files using the command line interpreter. There's a Windows API function named
CopyFile
. --wj32 t/c 08:37, 19 November 2008 (UTC)
yeah i've tried using copy file but even copy file works ONLY and ONLY if there's no space in between the folder names. Or maybe i haven't clearly understood how to use the CopyFile function like that,because when i did look up the copyfile function the examples given along with it had folders which had no space between the names.
So if you can just write in the CopyFile function for the path names that i give you i'd appreciate it. I want to copy the "file.exe" to the path "C:\Documents and Settings\Administrator\Start Menu\Programs\Startup" So if you can just write the copy file function for this path i'd appreciate it. --vineeth h t/c 12:07, 19 November 2008 (UTC)
- CopyFile does work with file names with spaces:
CopyFile("file.exe", "C:\\Documents and Settings\\Administrator\\Start Menu\\Programs\\Startup\\");
. That's a bad idea; ideally the program should copy itself to the startup directory and check if it's already in the startup directory. --wj32 t/c 05:09, 20 November 2008 (UTC)
OPEN GL question.
[edit]Hey, Not to be rude but i just want someone who knows open gl to answer this question because if you don't then your answer might be something regarding the spefications of the computer and stuff which know can't be the problem and anyway isn't what i want.
So i wrote a code to make a basic 3D car model which can move around in the screen in any possible direction and stuff.
Now here is the problem:
I also used texture mapping to put up a picture of grass as a floor on which the car moves . I got a picture of grass off google images. Then in the open gl code i wrote all the GL_Begin (QUADS) and drew some squares using 2 for-loops after i used linear filtering and saved the details to texture[0] . This part of the code is as follows:
glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture[0]); float left=5000.0f,last=5000.0f; for(int i=0;i<200;i++) { for(int j=0;j<200;j++) { glBegin(GL_QUADS); glTexCoord2f(0.0f, 1.0f);glVertex3f(-left,-10.0f,-last); glTexCoord2f(0.0f, 0.0f);glVertex3f(-left,-10.0f,-last+50.0f); glTexCoord2f(1.0f, 0.0f);glVertex3f(-left+50.0f,-10.0f,-last+50.0f); glTexCoord2f(1.0f, 1.0f);glVertex3f(-left+50.0f,-10.0f,-last); glEnd(); left=left-50.0f; } last=last-50.0f; left=500.0f; }
So this drew the quadrilateral and texture mapped it with the picture of grass and the floor looked good and it worked perfectly with the car moving around the screen on it.
So the compiler made the .exe file of this code and i ran the .exe file also and it worked properly. But when i copied the .exe file along with the picture of the grass onto another computer , my dad's, the texture mapped background was all white in colour instead of the grass background!!!!!! The quadrilaterals were drawn but there were all white!!!! The picture was in the same folder as the .exe file and it definitely must've loaded else at the time of running it would've given an error, but despite being loaded it still wasnt displayed. But the picture wasn't displayed on the floor and stuff. And it's not only his computer ,i even tried it in my school lab and even there the same problem came. The pictures weren't shown. And then i copied the same .exe file and picture back to my own comp. and tried it and it worked perfectly again!
So if you have ANY IDEA as to what the hell is happening please enlighten me.I'd be more than happy to get a solution for this ASAP. If you wan't me to paste the entire code feel free to ask.Vineeth h (talk) 07:30, 19 November 2008 (UTC)
- Can you please stop using indented text (which makes it pre-formatted)? Your problem can't be with your OpenGL coding if it works on your computer. Did you use an absolute path to load your image? Have you tried moving your executable and image to some other place on your computer? --wj32 t/c 08:46, 19 November 2008 (UTC)
Sure. No i didn't use an absolute path. The picture loads from the same folder as the .exe folder. So i used LoadBMP("grass.bmp") function, so it directly loads from the current location of the .exe file and it works.and yes i did move it to another place in my computer and it worked perfectly because everytime the loadbmp function loads from the current folder ! So i really can't find the problem!--Vineeth h t/c 12:15, 19 November 2008 (UTC)
- I took the liberty of removing the indenting except for the code sample. Is it possible that the program is picking up the bitmap from the environment variable "PATH"? Astronaut (talk) 12:24, 19 November 2008 (UTC)
Thanks. What exactly do you mean by environment variable "PATH"??? —Preceding unsigned comment added by 122.162.73.32 (talk) 12:32, 19 November 2008 (UTC)
- When in doubt, put square brackets around it unknown thing like this: environment variable. -- kainaw™ 13:33, 19 November 2008 (UTC)
- I'm a UNIX programmer, but some of this may apply to you as well: The issue with the PATH variable, which describes where programs look for executables, and related LIB_PATH variables, is that they don't always look in the current directory. Some other complexities are that the the search paths specified aren't always the same for the program as for you and the directory the program thinks is current isn't necessarily the same as what is current for you. So, to verify such info, you need to print out environment variables from the program itself, using system calls. StuRat (talk) 14:10, 19 November 2008 (UTC)
- If Windows has something like strace, you could do:
strace myprogram.exe | grep grass.bmp
- to see where it's looking for the file and why it's not finding it. --Sean 13:52, 19 November 2008 (UTC)
Question : Are the texture dimensions powers of two? (32x32,64x64,128x128, etc) Some older video cards will refuse to allocate textures that are not powers of two dimensions. It sounds like that could be your problem here.
Suggestion : It's not the most useful thing in the world, but it can still be handy to check glGetError to see what, if anything is going wrong. (Check your texture first, though.) APL (talk) 13:49, 19 November 2008 (UTC)
Assuming we can believe your claim that the file loading process isn't generating errors (which would not be an OpenGL problem - but which is BY FAR the most likely problem) - then all of this stuff about paths and such is irrelevent. The "non-power-of-two" map dimensions thing looks the most likely thing to go wrong. I suppose it's also possible that the image is too big - a few cards have limits on the maximum texture size that are around 2048x2048...it the image is freaking huge - then that would do it. It would help to know what graphics chip is in each of the three machines. It is an OpenGL requirement that every texture must be an exact power of two in size - so 256x256 is OK, 64x512 is OK - but 248x734 is NOT OK. Some of the most modern graphics hardware has eliminated that restriction so you may be 'getting away with it' on your machine - but for portability, you should always stick to powers of two. SteveBaker (talk) 19:55, 19 November 2008 (UTC)
Thanks stevebaker. I think that must be the problem then. Because as i said the file loading process isn't generating errors. So I will definitely try to resize it to powers of 2 and see if it solves the problem.--Vineeth h t/c 21:10, 19 November 2008 (UTC) —Preceding unsigned comment added by 122.162.73.116 (talk)
ReadyBoost good idea?
[edit]So I'm getting a new computer, for general computing use, maybe some Visual Studio programming. I will be getting 4GB of ram. Is there any point in buying a dedicated USB drive for this machine so I can use ReadyBoost? 121.72.170.238 (talk) 10:25, 19 November 2008 (UTC)
- I doubt ReadyBoost will have much effect on a system with 4GB of RAM already. I think you'll manage fine without it! PretzelsTalk! 13:45, 19 November 2008 (UTC)
- I agree. Just make sure you have a big enough /swap partition. (page file). Good luck with Vista! Kushal (talk) 22:18, 19 November 2008 (UTC)
HDR program
[edit]hi, im looking for a free, internet-downloadable HDR creating program.....any suggestions anyone? thanks, --81.77.103.76 (talk) 12:29, 19 November 2008 (UTC)
- What do you mean by HDR? If you mean Hard disk recorder then MythTV download or Ardour download might be what you're looking for. If you mean High dynamic range imaging then Radiance website looks good. Chemical Weathering (talk) 13:51, 19 November 2008 (UTC)
I do mean High Dynamic Range Imaging thanks, --81.77.103.76 (talk) 14:00, 19 November 2008 (UTC)
- Also consider the unpronounceable Qtpfsgui. -- Coneslayer (talk) 16:51, 19 November 2008 (UTC)
How do i download the 'Qtpfsgui' thing. Im not the most technical person and i cant work out how to download the program as one usually does:S....--81.77.103.76 (talk) 16:58, 19 November 2008 (UTC)
- The setup file is here (assuming you're on Windows) — Matt Eason (Talk • Contribs) 17:18, 19 November 2008 (UTC)
Basic Linux Regex
[edit]Hi all,
Am just now learning to play with linux, and I need a bit of help. How do i list files in a directory that match a regular expression (using the commandline, i have used regex's before in programming, output can be just printed on screen, but my ultimate goal is to actually copy the files to subdirectory if it matches)?
TIA PrinzPH (talk) 16:33, 19 November 2008 (UTC)
- Try using find with regex. ie:
find . -regex './.*mp[34]'
-- kainaw™ 16:42, 19 November 2008 (UTC)
- Thanks Kainaw, actually ended up with
LS | grep 'pattern'
... now, how do i pipe the output to copy it to a sub directory? thanks! PrinzPH (talk) 17:05, 19 November 2008 (UTC)
- Thanks Kainaw, actually ended up with
- By "copy it to a sub directory", do you mean "write the output to a file somewhere" or "copy the files that appear into another directory"? -- kainaw™ 18:10, 19 November 2008 (UTC)
- To quote myself from above "... but my ultimate goal is to actually copy the files to subdirectory if it matches", so yeah, i need the matching files themselves copied to a subdirectory ;) Thanks for the Blazing fast responses <3 PrinzPH (talk) 18:19, 19 November 2008 (UTC)
- If you used ls as above, you could do something like:
ls | grep 'pattern' | while read i; do cp "$i" subdirectory; done
- If you used find as above, you could do something like:
find . -regex 'pattern' -exec cp {} subdirectory \;
--71.106.183.17 (talk) 18:31, 19 November 2008 (UTC)
The really sexxy way is:
tar cf - pattern | ( cd destinationDirectory ; tar xf - )
...this has the advantage of allowing you to preserve ownerships, dates, permissions, symbolic links and other stuff - or to override them. The 'tar' program has lots of options for that. Change 'xf' to 'xvf' if you want to see the names of the files as they are created. You'll soon learn that there are a million ways to do ANYTHING in the shell.
SteveBaker (talk) 19:42, 19 November 2008 (UTC)
- Apologies in advance - what I'm about to type is so obvious that I've probably missed something. The bash shell itself supports regular expressions, so you can list matching files in a directory by typing
ls REGULAR_EXPRESSION
- and you can copy them to a subdirectory by typing
cp REGULAR_EXPRESSION subdirectory
- --NorwegianBlue talk 21:51, 19 November 2008 (UTC)
Thanks to Everyone for their responses, I was most interested in the scripting-type solution posted by *.183.17, but I'll look into all suggestions you guys gave. Am closing my eyes, and taking a deep breath... And now I move to Linux for my daily computing. PrinzPH (talk) 22:23, 19 November 2008 (UTC)
screencasting from your computer workstation directly to youtube
[edit]Greetings folks, I am looking for a way (hopefully straightforward and hopefully opensource) to create a screencast of me doing stuff in my apps and posting that to youtube. I do not have a video camera. I do not have any software for creating AVI files. I am a bit tech-savvy so I can work with something that requires a little programming or scripting.
A tutorial on how to do this would be great if anyone has any suggestions can you help please? Thanks. NoClutter (talk) 16:53, 19 November 2008 (UTC)
- Did you see List of screencasting software? --Sean 19:25, 19 November 2008 (UTC)
- Yeah, I've even tried some of them. The problem is they don't all send output to the correct format and YouTube apparently prefers AVI. I was kinda hoping I could get a response from someone has actually done the process from start to finish and knows what specific software works well for this purpose. NoClutter (talk) 19:40, 19 November 2008 (UTC)
- I've done it with Camtasia. It's not direct to YouTube, but screen-cap to .avi, then upload to YouTube. JoshHolloway 22:21, 19 November 2008 (UTC)
- You can use webcammax, But only if you have windows XP or Vista. It takes a screencapture and tricks the computer into thinking there's a webcam plugged in. Simple to use so you should have no problem. 66.216.163.92 (talk) 23:01, 20 November 2008 (UTC)
Dreamweb
[edit]There was a game a few years ago called dreamweb, I wish to play it again, and have downloaded it from abandonia, a site for abandoned games for free. However it does not work on my pc. i remember that it did not work on my 486 way back when, i did something back then toget it to work. What can i do now? Thanks —Preceding unsigned comment added by 82.3.145.61 (talk) 21:05, 19 November 2008 (UTC)
- Try it with DosBox. You'll use that to mount the program, using (for example) the following commands:
- 1.
mount c c:\games\dreamweb
- Defines the directory (c:\games\...) that the game is located) as well as the mount command and the destination drive.
- 2.
c:
- Changes the current drive to c:\
- 3.
dreamweb
- Launches the executable file.
- Hopefully you're away! Booglamay (talk) - 00:18, 20 November 2008 (UTC)
thanks but no luck, it says something about looking in my autoexec.bat file for soundblaster 17, i dont need sound atall. any more ideas please —Preceding unsigned comment added by 82.3.145.61 (talk) 00:33, 20 November 2008 (UTC)
- Does it have any settings? A setup program? Whatever the case may be, you're probably going to have to get it working with DosBox one way or another. --98.217.8.46 (talk) 01:04, 20 November 2008 (UTC)
- Just out of curiosity (and it sounded like an interesting game), I downloaded it too. I got the same message the first time I tried to run it from the DW.BAT file. But when I ran just DREAMWEB it loaded up fine (and the sound worked just fine). This is in DosBox on a Mac so I should hope it'll work on yours just the same. Just load up the directory and type in DREAMWEB and you're set. --98.217.8.46 (talk) 01:31, 20 November 2008 (UTC)
Apple Keyboard malfunctioning as mouse
[edit]My Apple Wireless Keyboard is acting as a mouse. Pressing the letter i is a left click, and the keys around it (789uojk and l) move the mouse. I've already been through VoiceOver Utility and System Preferences' pane on the mouse. Does anyone know how to fix it? I've only just restarted both Mac and keyboard, and set up the keyboard from scratch, to no avail. My name is anetta (talk) 21:44, 19 November 2008 (UTC)
- Is it under the system prefences bit with the blue-circle (forget the name exactly but the place you can make everything inverted/giant text etc.)? Also try looking under the mouse-options, it may be that there is a setting for turning the mouse 'off' and using the keyboard as one. 194.221.133.226 (talk) 13:43, 20 November 2008 (UTC)
- This page (http://support.apple.com/kb/HT1343) might help. It looks like Ctrl+F1 turns on 'full keyboard access' which turns on 'mouse keys', try doing Ctrl+F1 again and it'll maybe turn it off. 194.221.133.226 (talk) 13:46, 20 November 2008 (UTC)
You mean Universal Access. I found it there, thanks. It's mouse keys.My name is anetta (talk) 17:49, 20 November 2008 (UTC)
The Brookings Institution on Twitter
[edit]Does The Brookings Institution have a Twitter account? It sure does not look like https://twitter.com/Brookings belongs to The Brookings Institution. Any ideas? Kushal (talk) 22:14, 19 November 2008 (UTC)
- Does that twitter account profess to be the Brookings Institution? I mean, Brookings can mean more than just that. --98.217.8.46 (talk) 00:55, 20 November 2008 (UTC)
I was just throwing some ideas. Its not urgent but it would be cool to be able to follow them on Twitter. :D Kushal (talk) 04:41, 20 November 2008 (UTC)