Wikipedia:Reference desk/Archives/Computing/2010 December 30
Computing desk | ||
---|---|---|
< December 29 | << Nov | December | Jan >> | December 31 > |
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. |
December 30
[edit]running a c++ program
[edit]Hi there, I am trying to run this program from here. Got a red signal in #include <fstream> section. The signal did not show any error messages. What to do? --180.234.52.218 (talk) 00:55, 30 December 2010 (UTC)
- What are you doing in order to run it, and with what compiler? Marnanel (talk) 01:02, 30 December 2010 (UTC)
- Yes, the OP needs to carefully explain exactly what they are doing. There seems to be a lapse of correct terminology; I hope my explanations help you to describe your problem more exactly so that we can help you diagnose it:
- It sounds like you are having a problem compiling, not running your program. Is that correct?
- Actually, in every build-system I am aware of, the line #include is handled by the C preprocessor and not the C++ compiler; perhaps your toolchain is not set up properly (failing to include standard system library headers?)
- Finally, the term "signal" has a specific meaning in computer system design - perhaps you intended to say "error message." To my knowledge, it is impossible for #include <fstream> to generate a signal.
- Can you clarify exactly what you were doing, what tools or commands you used, and the exact error message you received? Nimur (talk) 14:23, 30 December 2010 (UTC)
- I use code block (v 10.05). I am learning C++. I put cursor on the error message but it did show nothing. Is there any problem with that program?--180.234.38.71 (talk) 14:20, 31 December 2010 (UTC)
- Yes, the OP needs to carefully explain exactly what they are doing. There seems to be a lapse of correct terminology; I hope my explanations help you to describe your problem more exactly so that we can help you diagnose it:
- Can you compile ANY program that includes fstream? Can you compile ANY program at all? I would assume your include path is messed up before assuming that the program has an error in it. -- kainaw™ 14:28, 31 December 2010 (UTC)
Machine Review
[edit]I've asked questions on here before about why games wouldn't work on my old laptop, and it was because I had a Dell Inspiron 15XX with a MOBILE INTEL 965 XPRESS CHIP SET. Which was, to be honest, rubbish for gaming. The GPU was low and it was shared with the CPU's RAM. I've bought a new laptop and would like to see what you all think. It has:
- Intel Core i5-460M processor
- NVIDIA GeForce GT 420M (1 GB dedicated GPU)
- 4 GB DDR3 RAM
- 500 GB HDD
Does this one look like it'd measure up to all the new games? Any problems that I might have? — Fly by Night (talk) 01:36, 30 December 2010 (UTC)
- I find it funny you bought it first and then ask if it measures up? That card is a midrange card ([1]) so you would be able to run modern games on it but you would most probably have to lower your resolution (away from native laptop resolution) and lower some of the advanced settings in games (like antialiasing and anisotropic filtering). A laptop will never compete with the gaming performance of a desktop due to the higher power requirements of high end desktop graphics cards. BTW the other components on your laptop are just fine and will help to improve gaming performance a little bit. So all in all, I think you would be able to run modern games reasonably well and older games very well. Sandman30s (talk) 11:09, 30 December 2010 (UTC)
- I know, it is funny, but I had to buy one. I fell in the snow and crushed my old one to death. I got what I thought was the best, but was looking for confirmation. I feel cheated now. The shop said that it would give "stunning game graphics". Was that a load of rubbish? It does have 1GB dedicated video memory; that has to be good, no? The game I play most is World of Warcraft, but I haven't been able to play it yet because I'm back home for Christmas with no internet. I should be able to play that with maximum settings; shouldn't I? — Fly by Night (talk) 17:47, 30 December 2010 (UTC)
- P.S. It says here that it's a high end video card. — Fly by Night (talk) 17:53, 30 December 2010 (UTC)
- Just looking at the page you linked and nothing else, I'm afraid it doesn't say that at all. It just lists lots of video cards with scores ranging from 302 to 3786 and your card has a score of 595 which puts it closer to the bottom than the top. That doesn't mean it's a rubbish card though and likewise their statement of "stunning game graphics" isn't wrong either, that's a pretty subjective statement and it all depends on what you're trying to do with it, but I'm sure it is capable of stunning gaming graphics, just whether or not they're stunning and moving fluidly is going to be dependent on the game and resolution it's running at. ZX81 talk 08:31, 31 December 2010 (UTC)
- Thanks for the reply. The page I linked to says, directly above the top entry, "High End Videocards - Updated 31st of December 2010". There are High-Mid and Low End pages that you can access by the drop down menu. So that site calls it high end (it's on the high end page and not the high-mid nor the low end card pages). I used that Can You Run It? website and it blitzed all the games I play, especially WoW. It can play Civ 5 too, but it only makes the minimum requirements and not the recommended. So I still feel a bit cheated! Funny thing is, my old laptop was too slow to run Civ 4, and my new laptop is too new, and has compatibility issues -- without patches to fix them. It's scary really, that a game can become unplayable within a few years. — Fly by Night (talk) 01:39, 1 January 2011 (UTC)
- If you have compatibility problems with Civ4 then the problem is probably more about the OS than the hardware. Taemyr (talk) 12:20, 5 January 2011 (UTC)
- Thanks for the reply. The page I linked to says, directly above the top entry, "High End Videocards - Updated 31st of December 2010". There are High-Mid and Low End pages that you can access by the drop down menu. So that site calls it high end (it's on the high end page and not the high-mid nor the low end card pages). I used that Can You Run It? website and it blitzed all the games I play, especially WoW. It can play Civ 5 too, but it only makes the minimum requirements and not the recommended. So I still feel a bit cheated! Funny thing is, my old laptop was too slow to run Civ 4, and my new laptop is too new, and has compatibility issues -- without patches to fix them. It's scary really, that a game can become unplayable within a few years. — Fly by Night (talk) 01:39, 1 January 2011 (UTC)
- Just looking at the page you linked and nothing else, I'm afraid it doesn't say that at all. It just lists lots of video cards with scores ranging from 302 to 3786 and your card has a score of 595 which puts it closer to the bottom than the top. That doesn't mean it's a rubbish card though and likewise their statement of "stunning game graphics" isn't wrong either, that's a pretty subjective statement and it all depends on what you're trying to do with it, but I'm sure it is capable of stunning gaming graphics, just whether or not they're stunning and moving fluidly is going to be dependent on the game and resolution it's running at. ZX81 talk 08:31, 31 December 2010 (UTC)
Wikipedia coding help
[edit]Hi, I'm helping develop a highly complex template for Wikipedia, and we've discovered a need to find the name of a page that a given page redirects to.
I've searched high and low and can't find any documentation for this sort of function...perhaps I need to write this template myself.
Given a page name, how would I use WikiSyntax to produce the name of the page it redirects to? For example, let's say I want to find the following:
What page does User:Bob the Wikipedian/Test-30 redirect to?
Using some sort of code-- here's a pseudocode example: redirectTarget(User:Bob the Wikipedian/Test-30) ===> User:Bob the Wikipedian/Sandbox
where User:Bob the Wikipedian/Sandbox is the desired result. I thought perhaps something like {{FULLPAGENAME:User:Bob the Wikipedian/Test-30}}
might do the trick, since {{User:Bob the Wikipedian/Test-30}}
returns the contents of the redirect target page, but it gave me the title of the redirect page instead.
Thanks for any help or pointers to other potential help! Bob the Wikipedian (talk • contribs) 04:38, 30 December 2010 (UTC)
Wii games for old people
[edit]Does anyone have Wii games they would recommend for old people? Wii Sports is an obvious choice, anything else you would recommend? thanks 122.61.218.145 (talk) 09:15, 30 December 2010 (UTC)
- My grandparents enjoy the bowling, golf, frisbee, tennis, and also the fairground games package. Bob the Wikipedian (talk • contribs) 21:37, 30 December 2010 (UTC)
(JavaScript) Creating an alias for an object
[edit]For example, I want to create an alias for an object called 'television':
- var products = {
television : 'Sony ABC-123'
};
now I want to access this product via an alias, so I created another line:
- products.tv = products.television;
- products.tv == products.television; // true
- products.tv === products.television; // true
- products.tv = 'SOLD OUT';
- products.tv; // 'SOLD OUT'
- products.television; // 'Sony ABC-123'
I have also created location and management objects. Now I want to create a parent object called myStore that contains all three of them:
- var myStore = {
products : products,
location : location,
management : management
};
If I change the products object, the myStore.products object does not change. How do I organize my objects so wherever they go there's only one instance? -- Toytoy (talk) 11:51, 30 December 2010 (UTC)
var myStore =
{
products:
{
television: 'Sony ABC-123'
}
}
--Best Dog Ever (talk) 22:17, 30 December 2010 (UTC)
CONNECTING MOTHER BOARD
[edit]I would be grateful to you if you help me to find details of connecting asus p4pe motherboard to front panel, hard disk power supply etc. I want to reassemble my old computer myself. Some terminals are not connected especially front usb terminals. I want to do it myself. But I dont know the meaning of terminals vcc1, vcc2, gnd1,gnd2, data 1, data 2 etc. etc. Pl. help me thank you.124.43.25.100 (talk) 12:53, 30 December 2010 (UTC)
- See if the manual helps. If not please let us know. 122.61.218.145 (talk) 10:37, 31 December 2010 (UTC)
Partitioning drive in HP laptop running Windows 7 Home Basic
[edit]I've been asking questions here for the past few days regarding my laptop. So anyway, I decided to create recovery backup disks of my HP G42-355TU laptop and then partition my C drive. (Currently, it has two drives: C, with 282 gb, and D with 15 gb, which is the recovery drive. I don't intend to touch th erecovery drive anytime soon.) I shrunk the volume C, and tried to rename the unallocated disk space with a new drive letter and format it with NTFS file system, in disk manager. However, I got an error message saying "Dynamic disks are not supported by this operating system or server configuration. Dynamic disks are not supported on clusters.", and couldn't create the new partition. On the other hand, my C drive got smaller, and unallocated disk space couldn't be viewed in My Computer, since I couldn't allocate it a new drive letter. Please help. Is there any way I can partition my disk, or is disk partition not possible in HP laptops? 117.97.215.196 (talk) 13:31, 30 December 2010 (UTC)
- Well, that's a first. This post's been here for more than three days, and yet, no one in Wikipedia has been able to come up with an answer!! 117.194.232.99 (talk) 08:42, 2 January 2011 (UTC)
Mac's magic mouse: swiping sideways changes the page
[edit]I have a new imac with the magic mouse. When I swipe my fingers across the mouse left to right or right to left, I am taken back or forward in webpages. It's driving me crazy. I have to be careful while typing this post to not touch the mouse, or if I need to use it, to only making up/down movements or I while navigate to a prior web page. I have already lost material I have been working on in email and so on because I unintentionally navigated back or forward. It's as if the browser back and forward buttons were connected to any sideways swipe. This happens in both Firefox and Safari. It's awful. Any help?--141.155.143.65 (talk) 14:17, 30 December 2010 (UTC)
- This feature of the Magic Mouse is intended to enhance your Mac OS X experience. Fortunately, you can disable it: the Apple Magic Mouse page shows the configuration panel, where you can un-check the box for "Swipe Left/Right to Navigate" to turn this feature off. To get to Mouse Configuration, follow these instructions from Apple: "The System Preferences pane controls system-wide settings ("global" settings), and is available from the Apple menu at the upper-left corner of the screen" (right where the intuitive Mac interface stores all other system settings). Nimur (talk) 14:32, 30 December 2010 (UTC)
TTF to TGA
[edit]How to create a .TGA file from a True-Type font file (.TTF), to be used as a text string with a UV texture in Blender game engine? 83.183.172.203 (talk) 17:07, 30 December 2010 (UTC)
- Presumably showing a particular message, rather than just any random text? Easiest way is to write the text using something like Inkscape and then save it as a bitmap. I don't remember whether Inkscape exports to TGA; if not, apply ImageMagick to the problem. (If you just want any text, ImageMagick can convert TTF to any bitmap format it knows in one step, but the text always says "That which does not destroy me only makes me stronger".) Marnanel (talk) 17:21, 30 December 2010 (UTC)
- I think that this tutorial will help. -- kainaw™ 19:23, 30 December 2010 (UTC)
Files
[edit]In Windows 7, if I have 400 files selected is there a way I can unselect every other file, so now only 200 files are selected? Its absolutely necessary that it be every other file which is selected 82.44.55.25 (talk) 20:24, 30 December 2010 (UTC)
- I don't know any automatic way to do this (and it seems an unusual thing to want to do, so I'd be surprised if there was one), but you can hold down the Ctrl key and then click files to deselect them. AndrewWTaylor (talk) 20:47, 30 December 2010 (UTC)
- Thanks but that would take hours when dealing with thousands of files. I know it's a unusual feature I'm looking for, and google gave nothing, which is why I'm asking. The end goal here is to delete every other file in a directory, so selecting them in Windows Explorer isn't absolutely necessary it just seemed like the easiest way. I'm open to any solutions such as .bat scrips or even php though I'm very inexperienced with advanced php. I don't want to use python or that other one also beginning with "p" 82.44.55.25 (talk) 21:38, 30 December 2010 (UTC)
- Interesting task, and yes, there's a very simple way to do this, although it's manual. Assuming they're 400 consecutive files, use CTRL+wheel to resize the icons until the window displays two icons across (this may require a window resize as well, depending on your resolution). Then, CTRL+lasso to unselect the side that you don't want. Bob the Wikipedian (talk • contribs) 21:41, 30 December 2010 (UTC)
- :D awesome! Thank you! 82.44.55.25 (talk) 22:24, 30 December 2010 (UTC)
- Interesting task, and yes, there's a very simple way to do this, although it's manual. Assuming they're 400 consecutive files, use CTRL+wheel to resize the icons until the window displays two icons across (this may require a window resize as well, depending on your resolution). Then, CTRL+lasso to unselect the side that you don't want. Bob the Wikipedian (talk • contribs) 21:41, 30 December 2010 (UTC)
- Thanks but that would take hours when dealing with thousands of files. I know it's a unusual feature I'm looking for, and google gave nothing, which is why I'm asking. The end goal here is to delete every other file in a directory, so selecting them in Windows Explorer isn't absolutely necessary it just seemed like the easiest way. I'm open to any solutions such as .bat scrips or even php though I'm very inexperienced with advanced php. I don't want to use python or that other one also beginning with "p" 82.44.55.25 (talk) 21:38, 30 December 2010 (UTC)
How to stop my laptop downloading
[edit]I've been using a mobile broadband dongle to access the internet. Well, it's just gone mad. I only have a limited usage, about 5 GB. My laptop has started downloading updates without asking me. The internet usage shot up, so I typed netstat -b into cmd and EGIS update had about ten connections open. I used task manager to terminate EGISupdate.exe but the download carried on. I closed my internet connection and unplugged my dongle. But after I plugged it back in, the usage shot up again. It's drank about 1 GB in five minutes! When I type netstat -b all of the connections are un-named -- no mention of EGIS update -- but there are lots of connections. How do I stop it downloading stuff I don't want it to download? I'll be back home in a few days, with unlimited broadband, it can download then! — Fly by Night (talk) 23:08, 30 December 2010 (UTC)
- Best way would be to identify and disable the applications doing the downloading. Benign applications would system updates, anti-virus updates and the like. You could also have a virus or malware creating the connections. If you can identify the IP, you can add it to your hosts. For example, if you add:
- 127.0.0.1 www.badstuff.com
- Then that site is blocked— you can use an IP or a domain name. ---— Gadget850 (Ed) talk 23:20, 30 December 2010 (UTC)
It's not a virus or malware. My laptop is 24 hours old. The program was, as I said, EGIS update which is disabled in Task Manager. Even after terminating the process, the connection stayed open and downloaded. I assume that the dozen EGIS update connections that showed themselves remained open even after closing the process. So, to repeat the question: How do I stop [my laptop] downloading stuff I don't want it to download? — Fly by Night (talk) 01:23, 31 December 2010 (UTC)
- It's quite common for lots of updates to be needed immediately with new hardware or software. I even suspect that some products come without full software and always need an update to run. It sounds like your dongle is in that category. So, here are your choices, as I see them:
- 1) Allow the downloads.
- 2) Remove the dongle until you are willing to do the updates.
- 3) Disconnect from the internet, by pulling the cable out of the back of the computer. The dongle may refuse to work without an update, or may just give an error message, but work anyway.
- 4) Wipe the software on the dongle and start clean. I wouldn't recommend this, as it may take longer than the updates and provide worse results. StuRat (talk) 01:43, 31 December 2010 (UTC)
- Sorry, Maybe I didn't explain myself. The dongle is a mobile broadband device that gives me temporary internet access. I'm away from home for Christmas and am using that while with my parents. It's the laptop and the laptop's software that is updating itself. I have unlimited WiFi at home, and can download whatever the laptop wants when I go back home. I want to stop the laptop and the antivirus etc connecting to the internet and downloading. The dongle isn't downloading anything for itself. I just want my laptop to stop downloading things without asking me first. Mobile broadband (not in-house, fibre optic, but just a dongle that connects to the cellphone network is really expensive and not suitable for large data movement. I want to read the news and edit Wikipedia; not install 10 GB of software updates. — Fly by Night (talk) 01:50, 1 January 2011 (UTC)
- Gadget850 actually answered your question. Netstat should give you a domain name for the remote host, which you can then block in the hosts file. You can also prevent the updater from starting in the first place by going to the Start Menu and typing msconfig in the search box and pressing ENTER. Then, look under Startup for the updater and uncheck it's box. You can also just uninstall any software from EGIS, as that company appears to specialize in useless pre-installed programs that slow down your computer.
- I wouldn't worry about those connections, by the way. They're not actually transferring data if the program isn't running. The connections are probably dead, but Windows has no way of verifying that they're completely killed.--Best Dog Ever (talk) 02:05, 31 December 2010 (UTC)
- Maybe he did answer my question, but I don't know what I'm doing. That's why I came on here. It is probably really easy for most people, but I'm really useless. I need a step-by-step guide. The connections were not dead, I came on here because I could see my usage shooting up. I've had to pay for more GBs since my last post because the laptop just drank up all of my data allowance. If this happens again then could you give me a step-by-step guide of what I need to do to stop the GB vampires? I can't wait till I'm back at home and I don't have to worry about this again. — Fly by Night (talk) 01:58, 1 January 2011 (UTC)
- ... and for anyone else who has a limited broadband access (mine is much more limited than that), when you get a new laptop, try to connect it to an unlimited connection first to perform all its updates, and for anti-virus updates. Many updates automatically switch the auto-update back on again, so be sure to check that all of the software has auto-update switched off. Some updates can be downloaded independently of the software (e.g at a library, onto a flash drive), then transferred to the laptop. This will seem silly to the fortunate majority who have fast unlimited broadband access! Dbfirs 09:23, 31 December 2010 (UTC)
- Personally, I would simply install a firewall with with outgoing connection control. Then, as programs attempt to use internet, they would have to ask to be whitelisted. You can do it on permanent or individual basis, with good firewall sky is the limit. This way you would have fine grain control over what programs use internet. I have not used advanced firewalls in a while so I suggest you Google some comparisons and reviews. There is a wide selection of free and open source firewalls, you shouldn't have to pay anything. --110.174.117.185 (talk) 22:00, 5 January 2011 (UTC)