Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎tsql: new section
Line 344: Line 344:


: I've removed your email address, to prevent you getting spam on it. People will answer here, not by email. -- [[User:Finlay McWalter|Finlay McWalter]] ☻ [[User talk:Finlay McWalter|Talk]] 13:32, 21 October 2010 (UTC)
: I've removed your email address, to prevent you getting spam on it. People will answer here, not by email. -- [[User:Finlay McWalter|Finlay McWalter]] ☻ [[User talk:Finlay McWalter|Talk]] 13:32, 21 October 2010 (UTC)

== tsql ==

Hi! Why doesn't exist the 'end tran' keywords? the rollback statement must always immediatly follow the trasnsaction to rollback? t.i.a. --[[Special:Contributions/217.194.34.103|217.194.34.103]] ([[User talk:217.194.34.103|talk]]) 14:47, 21 October 2010 (UTC)

Revision as of 14:47, 21 October 2010

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

Main page: Help searching Wikipedia

   

How can I get my question answered?

  • Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
  • Post your question to only one section, providing a short header that gives the topic of your question.
  • Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
  • Don't post personal contact information – it will be removed. Any answers will be provided here.
  • Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
  • Note:
    • We don't answer (and may remove) questions that require medical diagnosis or legal advice.
    • We don't answer requests for opinions, predictions or debate.
    • We don't do your homework for you, though we'll help you past the stuck point.
    • We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.



How do I answer a question?

Main page: Wikipedia:Reference desk/Guidelines

  • The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
See also:


October 16

DVD drive won't read certain DVDs

My DVD drive on my computer won't read certain DVDs. It reads some of them just fine, but there's two that I have right now (Leviathan (film) and Outland (film), if it makes any difference) that it won't read. It will spin up like it's reading them, for maybe 8 seconds, and then stop. After that, it will repeatedly spin up for maybe 3 seconds, stop for a second or two, and repeat. It could just be dirty DVDs I guess, but it seems odd that three of them (Outland has two sides) wouldn't work at once. I tried them in my friend's computer's DVD drive, and it reads them just fine. My drive's not totally shot, as it plays another DVD I have (The Postman (film), again, not that it matters). It's also reading my game CDs fine. I don't have any music CDs to try right now. I could understand if my drive was failing, but it's consistently able to read certain discs, and consistently unable to read other discs, which is really weird. I went to the device manager and looked for any driver updates; it said that I was up to date. All the DVDs say that they're region 1. I'm running Windows 7 on a U81A Asus laptop that I bought in August 2009. Any help would be appreciated. Buddy431 (talk) 00:03, 16 October 2010 (UTC)[reply]

Discs are subject to errors and quality variations. Not all commercially pressed or stamped discs will be of the same quality, even when fulfilling their quality control parameters. Drives will also have differing capacities in their capability to handle these variations in disc quality. It sounds like your drive is not exactly faulty, but let's say sensitive. Your friend's drive less so. These discs are possibly at the lower end of the quality scale, thus why you're only having issues with some of them. I have had similar problems. One CD player I have first 'rejected' a disc that worked on some other players about 15 years ago, but to this day still works fine for most discs, so it's not necessarily that your drive is about to fail. FWIW - and entirely anecdotally - in recent times I've been noticing increased error rates on new discs (legally produced and purchased), I'm guessing as a result of cost cutting on production as sales prices have dropped, especially those in multipacks and ones that try to squeeze on a lot of content. Giving the disc a good clean (which shouldn't be necessary for brand new DVDs) sometimes, indeed often, fixes issues. Compact Disc manufacturing is probably the best article we have on this. --jjron (talk) 02:52, 17 October 2010 (UTC)[reply]
The so-called DVD "copy protection" works basically by introducing errors on the disc, which tends to frustrate not only reproduction software, but also playback in sensitive drives. There is a great variation in methods used, which means that some discs will play and some won't, and the methods get more and more aggressive over time, which may be one reason why jjron observes increased error rates on new discs.—Emil J. 12:18, 19 October 2010 (UTC)[reply]

Microsoft and the VPN

Here's something of a conundrum. I live in the UK. I realised I needed to re-register an old hotmail.com (the .com part is crucial), which I'd used for a service in the past, and which I'd let lapse. Note that HoTMaiL considers foo@hotmail.com and foo@hotmail.co.uk to be entirely distinct, and allows them to be owned by different people. When I visit hotmail.com, the server figures out that I'm in the UK on a BT connection, redirects me to the live.co.uk website, and there I can only register a hotmail.co.uk address. So I signed up for StrongVPN, with a point of presence in New York state. I'm signed into that now (if you do a whois on the address I'm posting from, you'll see that it's registered to reliablecomputing (who own StrongVPN). Web based services like dnsstuff.com and Hulu concur that I appear to be in New York. But if I visit hotmail.com, it still figures out that I'm in the UK, and still only offers me a UK address. I'm not worried about the email address (I've since found another entrance into MSN which didn't have these smarts, and so I've managed to register the address I needed to). But I'm still curous about how hotmail.com is figuring out where I really am. Here are some details (which serve only to reject the more obvious ideas I had):

  • my PC (it's windows 7) is behind a NAT - so even if a flash script or something is sending the machine's local address, it's a non-routable one (10.0.0.201 or the like), which gives hotmail no information
  • I'm using Firefox (so I can't blame any scary privacy-leaking function of IE)
  • As I've said, services like Hulu don't see a UK IP, so the VPN must be rewriting the addresses in the IP packets I'm sending, as you'd obviously expect it to.

I'd welcome any ideas anyone might have as to how this could be. Thanks. 173.195.1.144 (talk) 15:32, 16 October 2010 (UTC)[reply]

Try clearing browser cookies. 82.44.55.25 (talk) 15:36, 16 October 2010 (UTC)[reply]
Other then cookies, perhaps Hotmail is just deciding your in the UK because your prefererred language is en-GB (which I'm guessing it is) which is actually a bad idea since many people not in the UK may have that but since it is Hotmail, who knows... Nil Einne (talk) 15:49, 16 October 2010 (UTC)[reply]
Not that likely, because an Australian user for example would also use en-GB but not be directed to the UK site. Being Microsoft, maybe it's possible (and I have no idea whether or not they actually do this) that they are detecting that your version of Windows was registered in the UK, and they are basing it off that? --jjron (talk) 03:04, 17 October 2010 (UTC)[reply]
Well that's what I said isn't it? I presume they might use IP address in the first instance, perhaps turning to language if the IP address is in the US but the language is something else. Sounds like a bad idea but who knows. AFAIK, the registration location of the OS isn't intentionally given away by any common browser which is why I didn't mention it although I've now found out (actually should have occured to me) the timezone is [1]. (I use intentionally since you never know what your browser is giving away somewhat unintentionally e.g. [2] [3].) It seems in HTML5 there's also support for the browser giving geolocation info, whether from GPS, wifi hotspots or whatever to websites [4] but most would ask before they do so. Nil Einne (talk) 07:05, 18 October 2010 (UTC)[reply]
No, you said 'who knows...'. Well I know because I know that Hotmail in Aus doesn't direct you to the UK site. :) If anything, sites like that almost always default to the US site if there's no Aus version, not a UK variant. Now if they based it on the timezone, then surely the OP could change their timezone to a US setting and give it a try (works for that browserspy site). I'd find the timezone theory unlikely though, given how many other countries share the same timezones. --jjron (talk) 10:36, 18 October 2010 (UTC)[reply]
The 'who knows' bit was referring to the fact that given we are talking about Microsoft, they may do odd things which you wouldn't think make sense. I thought it was obvious from my statement that I'm well aware the method wouldn't work in many cases (hence why I said "since many people not in the UK may have that"), apologies if this wasn't as clear as I thought. FWIW I live in New Zealand and used to live in Malaysia so I'm well aware plenty of people outside the UK have their language as en-GB (mine is), in fact it was on reason it occured to me. Note that you appear to be presuming there's only one method of detection. This may be the case, it may also be that Microsoft use multiple different methods depending on the specifics. It's easily possible for example they use a system, IP = UK, language = en-GB, timezone = BST/BDT, .uk; IP = US, language = en-GB, timezone = GMT/BST, .uk; IP = US, language = fr, timezone = CET/CST =.fr; IP = US, language = en-GB, timezone = NZST/NZDT, .uk). I don't really think this is that likely, but again, given we are talking about Microsoft, who knows (without proper testing of the possibilities). Again, I thought all this was obvious from my earlier statement, apologies if it wasn't clear enough. P.S. Bing used to direct me to the UK site IIRC. P.P.S. I've just found out hotmail does in fact offer a .uk address to me and suggests I'm in the UK... Nil Einne (talk) 10:55, 18 October 2010 (UTC)[reply]
Well I just found out I may have been right all along. If I delete all cookies for live (not sure if it's necessary but easier since I already have a cookie manager) and set en-US as my first/top language it offers hotmail.com/live.com, if I set en-GB as my first/top language it offers hotmail.co.uk/live.co.uk, if I set en-NZ as my first/top language it offers hotmail.co.nz (no live.co.nz). I'm fairly suprised it ignores my IP address which easily identifies me as being from NZ, but again as I said, with Microsoft who knows?
This also confirms what I expected that there is indeed a hotmail.co.nz (I initially suggested I would be offered .nz but upong checking found out I was offered UK) but given Microsoft's bizzarre system I suspect a lot of people don't have it even though they may want it.
Mind you, it seems this depends on your browser. Firefox provides "language" and "accepted languages" from [5]. language is I guess the version of FF you download (mine is en-GB whatever I do), accepted languages includes whatever you've set (in order). IE provides the additional strings 3 system, user and browser. Browser and language are en-US in my IE (again probably reflecting that I have the en-US version of IE). Accepted and the other 2 are en-NZ in my case, I presuming going by my system settings. So for people with IE they're fine if their system language agrees with where they live and they do indeed want a domain for where they live. (English speakers in places like Malaysia where there's no appropriate recognise local English variant like en-MY may screwed unless they know to temporarily set their language to Malay.)
I'm not sure what's going on in your case. Whether for some strange reason it ignores IP for me but not for you (again with Microsoft who knows?). Or whether you were in fact mistaken about your language and/or not being offered .uk. BTW, the simple way to test this is to try to sign-up for an account and see what they offer you. You will always be on the live.com site from what I can tell (note that as we've discussed before on the RD in the modern era it doesn't mean you're on the same web server as someone in Timbuktu). Obviously if you already signed up for an account you will have whatever domain for the account when you signed up.
On the plus side, I have found out you can set languages for Firefox including en-NZ.
Nil Einne (talk) 11:29, 18 October 2010 (UTC)[reply]
Unsurprisingly I'm not the first person to document this behaviour [6]. I should have searched earlier. [7] also mentions this behaviour albeit in a different context. I suspect this also explains why I used to end up at bing.co.uk until Microsoft realised that going by IP as everyone else does makes more sense (although I'm not sure if they used to have a NZ variant) Nil Einne (talk) 11:50, 18 October 2010 (UTC)[reply]


October 17

windows vista wifi problems

I'm trying to figure out why my brother's windows vista laptop suddenly won't connect to the internet any more. The connection would be through the wifi access point which is in the same room and which works fine with other computers. It worked fine with my bro's computer until yesterday or so, but he seems to have screwed around with some settings or something, that messed it up. Now the laptop's connection manager finds the AP and connects to it just fine, but the browser (IE8, I think) says it can't connect, and "diagnose problem" gives a useless message like "windows can't resolve this problem". More generally, what kinds of methods does one use to diagnose this type of thing? I don't see any way to get any indication of what is actually going wrong. Windows Vista doesn't even seem to have a way to get a DOS prompt any more (or anyway I don't see it in the start menu, but I'm a Unix user clueless about Windows in general). Thanks. 72.89.106.242 (talk) 04:18, 17 October 2010 (UTC)[reply]

First, move the laptop next to the WiFi transmitter, just to check that there aren't any problems with interference. Then, in Windows "Network and Sharing Centre" (from Control Panel), click "Manage Wireless Networks" (on the left). The WiFi should show here, and you can configure the laptop to connect automatically (and even if the network is not broadcasting). In "security", you can check that the correct encryption is being used by the laptop, and the correct security key (check with other connections). The "diagnose and repair" option should then reconnect, but, if it doesn't work, try resetting the network adaptor, and try disconnecting, then reconnecting manually. I have regular problems with my WiFi and I often go through these processes (in desperation, probably unnecessarily). Vista on my laptop keeps losing contact, but in my case it is probably a weak signal (through two walls) and a dodgy WiFi router, plus an intermittent internet connection.
Vista has an emulation of the "DOS prompt". Just click "Start" then "Run", and type "command". You will then appear to be in DOS and can "ping" etc. (though everything is passed to Windows routines to execute the commands). Dbfirs 08:23, 17 October 2010 (UTC)[reply]
Run "cmd", not "command". "command" brings up command.com, the old 16-bit command prompt from Win9x, running under NTVDM. "cmd" brings up cmd.exe, a Windows application that will work better and faster. -- BenRG (talk) 18:23, 17 October 2010 (UTC)[reply]

Go to the command prompt as described above, then type "ipconfig /release" (without quotes) and then "ipconfig /renew". This might clear whatever problem the connection is having. Also check Internet Explorers proxy settings and make sure that it's got the right settings 82.44.55.25 (talk) 10:24, 17 October 2010 (UTC)[reply]

Router (India) Santhosh.Sharma (talk)

I have been using for the last few years a router with two ethernet ports for connections and a third one for management, and this router has been used to connect two Local Area Networks, but now we also need to connect another LAN as well as to the internet, so can anyone here recommend a router with atleast four GbE RJ45 ports plus one for management configuration. Many thank you very much.

Are you saying that you need to connect a third LAN to the internet, or do you want to combine the three LANs into one bigger LAN and connect that to the internet? Rocketshiporion 08:25, 17 October 2010 (UTC)[reply]
Each the three LANs has servers which must connected to the internet in order to service the internet to each of their desktops so their users can use the internet. These are under three domain names servers. Santhosh.Sharma (talk) 08:28, 17 October 2010 (UTC)[reply]
Do you mean that each of the three LANs has a DNS server which needs to connect to the internet? If this is the case, you may want to connect the three servers to a high-speed switch, and connect the switch to your router. Rocketshiporion 08:32, 17 October 2010 (UTC)[reply]

convert dvd camcoder to memorystick type..

Hi, i have a dvd -rw type sony camcorder.its dvd is quite costly and the model i have is also no more produced by the company.is there any way to convert or attach a memory stick to it.I have a sony dvd-dcr-705.Kindly help .. Thanx in advance..

59.93.129.55 (talk) —Preceding undated comment added 11:42, 17 October 2010 (UTC).[reply]

I'm no expert, but I don't think there is any way of attaching a memory stick to it, no. If it has no USB port on it, then you can't stick a USB memory stick in it. Apologies. You could always go about buying a Flip camcorder. They're cheap and have a built in memory stick.--Editor510 drop us a line, mate 16:21, 17 October 2010 (UTC)[reply]
That model apparently was only sold in Latin America and I can't find documentation for it, but the model with the most similar number (DCR-DVD010) was apparently capable of using memory sticks as storage devices, as described at this page. Looie496 (talk) 17:14, 17 October 2010 (UTC)[reply]
If your camera doesn't support memory sticks, a more plausible possibility may be hacking it to support normal DVD-RW. DVD-RW are hardly that expensive, even 8cm ones which I guess the camcorder takes although storage space is gonna be a bit limited compared to many memory sticks. See [8] and [9] for example. Remember of course you can copy the contents of the DVD-RW and re-use them many times if you keep them in good condition. BTW I don't know about the accuracy of the claim it was 'only sold in Latin America' as I find references to it in Australia, Indonesia and the Philippines. [10] for example doesn't say it supports memory sticks. [11] in the US mentions is as a PAL camcorder so perhaps it was sold in many or most PAL countries. BTW I justed noticed that Amazon and the earlier the Australian link mentions it supports DVD+RW as well as DVD-RW so I guess you may have both as options. And BTW are you sure you need to use the Sony branded media? I find references (the Verbatim media link for example) which suggest at worst you may have the camcorder complaining ("Sony disc recommended") if you use non Sony branded media. Have you ever actually tried non Sony branded media? If not, perhaps there's no need for hacking at all. Nil Einne (talk) 09:24, 18 October 2010 (UTC)[reply]

Can I make an audio file?

Can I make an audio file out of spoken word, as produced in TextEdit (OS X, Mac computer), that can be put onto my iPod? Bus stop (talk) 11:48, 17 October 2010 (UTC)[reply]

I'm a bit confused as to what you want, but it sounds like you either want text to speech software (of which there are many free options), or, if you are talking about simply recording spoken words, a program like Audacity will easily do this. iPods accepts a variety of file formats; mp3 is pretty common. --Mr.98 (talk) 13:30, 17 October 2010 (UTC)[reply]
As I read it, you're looking for a program to record the computer generated speech as it 'reads' a text file. Again Audacity could help you here as it can record streaming audio (effectively whatever is coming out of your computer's speakers). --jjron (talk) 14:26, 17 October 2010 (UTC)[reply]
At http://etc.usf.edu/techease/4all/learning/how-do-i-use-the-speech-service-in-mac-os-x-to-record-text-into-an-audio-file/ you will find instructions for doing exactly what you want to. Looie496 (talk) 17:18, 17 October 2010 (UTC)[reply]
Looie496—I don't know what I'm doing wrong. It doesn't work. I'm referring to the supposed ability to add TextEdit files to iTunes as a Spoken Track. I've gone through all the steps, carefully, several times. But iTunes is not opening as it should (at the point at which you click "Add to iTunes as a Spoken Track"), and no recorded track is to be found in iTunes.
I also downloaded Audacity, but I haven't looked into it much, so far. Bus stop (talk) 21:24, 17 October 2010 (UTC)[reply]
Sorry, I only did a Google search and found that page that claims to do what you want, I have absolutely no understanding of it. Looie496 (talk) 21:35, 17 October 2010 (UTC)[reply]
OK. Thanks. It's great. It seems perfect. Maybe Apple disabled it or something. Thanks again. Bus stop (talk) 21:49, 17 October 2010 (UTC)[reply]

Followup: Yes, that feature doesn't seem to be functioning at this time, according to this explanation. But there is this workaround, and it works. One drawback is the awful sound of the "System Voice." They ought to make it more mellifluous. Thank you to all. Bus stop (talk) 13:24, 20 October 2010 (UTC)[reply]

How to install Java?

I am using Linpus Linux. I think it's Red Hat or Fedora-based. Anyway, I need help, because, as per usual, these instructions are written for people who know more about UNIX. Now, I'm not UNIX-illiterate, I do understand some of it, but this is just confusing. Where the hell would I find the /usr/java directory?! Can someone please point me in the right directions?--Editor510 drop us a line, mate 16:18, 17 October 2010 (UTC)[reply]

Right, more detail now. I do have a /usr/ area, but there's no /usr/java. The bastard's not letting me create a new folder, either. Any suggestions?--Editor510 drop us a line, mate 16:27, 17 October 2010 (UTC)[reply]
On Linux, normal users can't edit /usr/ for security reasons. Use either
su -
or
sudo bash
to become the root user (system administrator), and then try the instructions again. The first method will want the root password, then second your password. When finished, enter 'exit' to become you again. CS Miller (talk) 16:45, 17 October 2010 (UTC)[reply]
You can find very detailed and straightforward instructions at this page. Looie496 (talk) 16:59, 17 October 2010 (UTC)[reply]
Since Linpus is based on Fedora, you might find this page more helpful. Fedora has packages for Java which work better with the OS than something you'd install manually. -- JSBillings 14:15, 18 October 2010 (UTC)[reply]

cost to replace a netbook's lcd screen

if a netbook (eee pc in my case) has a cracked lcd screen, is it even worth replacing? How much would that cost, including parts + labor (unless I could do it myself without too much trouble). The model in question is this one. 188.174.74.76 (talk) 16:52, 17 October 2010 (UTC)[reply]

Unless still under warranty, replacement screens for laptops have traditionally been very expensive from the original manufacturer. They are available on eBay (for example, this advert suggests prices around £60 + shipping), but you would need to fit it yourself - something that is not easy to do. If you do go for this, I suggest you download a service manual first and study it very carefully until you are sure you are able to complete job, and only then order the replacement screen. Astronaut (talk) 20:01, 17 October 2010 (UTC)[reply]

Visual C++ equivalent to Eclipse's Outline View

Yet another question. Again, I'm sorry for all the questions. Is there such an equivalent? KyuubiSeal (talk) 18:07, 17 October 2010 (UTC)[reply]

Questions are welcome...you may be looking for Visual C++ Class designer, Visual C++ Class viewer, or Object Browser. Smallman12q (talk) 23:20, 17 October 2010 (UTC)[reply]
Okay, thank you! KyuubiSeal (talk) 20:49, 18 October 2010 (UTC)[reply]

ethernet switch

I ask this question previously about hubs, and people said to get a "switch". Today I finally managed to get an "8 port fast ethernet switch". So the question is; can I plug a cable modem into the switch, then plug two computers into the switch as well, and they will share the internet connection? 82.44.55.25 (talk) 18:55, 17 October 2010 (UTC)[reply]

I might be wrong on this but I don't think that it will work (i'm open to correction though) as you are trying to use the switch as a router but I think you could designate one of your computers as an Internet host. Then Install a second NIC in to this computer and plug your modem into that. Set up Internet Connection Sharing, and then connect the other computer to the host through the switch. Mo ainm~Talk 19:06, 17 October 2010 (UTC)[reply]
If your PC has an IP address in the form 192.168.???.??? then it will work, otherwise you'll need a machine to do Network address translation (NAT) for the machines. If your cable-modem also has WiFi or mutliple ethernet ports, then it will NAT, if not then it may-or-may-not. CS Miller (talk) 19:26, 17 October 2010 (UTC)[reply]
Usually not, since switches can't normally handle IP addresses. They usually only work for local networks, and address computers by using their MAC addresses. What make and model of switch is it? Most people who use switches connect the switch to a router and then the router to a modem. They do this because a router usually only has four ports on the back. So, if you run a company with more computers, you'd need either a second router or a switch (or even a hub) to connect to the router.
Also, why did you decide to buy a switch? It's actually kind of hard to find switches in retail stores nowadays, since routers have become so cheap, and since routers are more powerful than switches. Hubs are even more rare, so I'm also curious who told you to buy a hub before this.--Best Dog Ever (talk) 02:48, 18 October 2010 (UTC)[reply]
The make is "Edimax 8 port fast ethernet switch 10/100 mbps, Palmtop size". I can't find a model number on the box or on the device. I got the switch because people said the hub I had would cause collisions of data and was outdated, and I got the hub because people said just connecting a normal ethernet cable between two computers wouldn't work. This was the thread. Anyway, so the switch can't be directly connected to the cable modem? Ok, thanks for the information 82.44.55.25 (talk) 14:57, 18 October 2010 (UTC)[reply]
Wait, wait, wait. The above answers are mostly nonsense. Every cable modem I have experience with over the last 10 years can be connected to a switch, and then you can connect multiple computers to the switch to share the connection. The cable modem itself (not the switch) acts as a DHCP server and each computer gets its own IP address in this situation. Best Dog Ever: You must be confusing switches with hubs when you claim it's hard to find a switch. I buy switches every month from the local computer store. Original poster: Just plug it in and see. It should work fine. If you were to get a router instead of a switch then you'd have a 100% chance of success. Without knowing what cable modem model you have, I'll say that using a switch in the way you describe carries about a 98% chance of success. The only way this will fail is if your cable modem lacks the ability to be a DHCP server, which I'll say has a 2% chance of being true. Comet Tuttle (talk) 16:35, 18 October 2010 (UTC)[reply]
Given the fact that I'm a CCNA, rest assured that I know the difference between a hub and a switch. Also, all of the cable modems I've owned can't be connected to a layer-two switch. I have seen some cable modems that are also routers, but my ISP will only give you one of those if you request it. There are some layer-three switches that can assign local IP addresses, but I don't think the Edimax 8-port fast ethernet switch is one of them. The switch I own (Netgear DSS-5+) can be connected to my modem, but each computer connected to it will get a separate public IP address. And, since I'm allowed only one public IP address, only one of those computers will be able to connenct to the Internet. The switch does not have a built-in DHCP server. Layer-two switches are called that because they operate at the second layer of the OSI model. MAC addresses work at the second layer. IP addresses work at the third.--Best Dog Ever (talk) 17:01, 18 October 2010 (UTC)[reply]
I concur with what Best Dog Ever states above and I was also going on the assumption that it was a Layer 2 Switch. Mo ainm~Talk 18:35, 18 October 2010 (UTC)[reply]
I don't know why Best Dog Ever thinks combined modem/routers are rare things. Every broadband modem I've seen in the UK has had at least two, and more usually four, ethernet ports on the back, a built-in DHCP server and NAT addressing - maybe the situation is different elsewhere in the world. Unless you have other network devices there should be connectivity for your two computers to share the one internet connection through the modem/router and for file/print sharing across the network as well, all with no need for an additional hub, switch or router. Astronaut (talk) 20:39, 18 October 2010 (UTC)[reply]
My cable modem only has one ethernet port 82.44.55.25 (talk) 20:45, 18 October 2010 (UTC)[reply]
What happened when you hooked up the switch to it, and hooked your PCs up to the switch? (And if you are hesitating to try the experiment for some reason, we could put this to rest if you could tell us the manufacturer and model number of your cable modem, so someone can go look up whether it's a DHCP server.) Comet Tuttle (talk) 23:03, 18 October 2010 (UTC)[reply]
The model number is "ambit e08c013". I have not tried connecting the switch because the last time I tried connecting different things to the cable modem I lost the internet for hours because the "host table" on the ISPs server had reached it's maximum allowed allocation of ip address. I want to be sure it will work before risking that again 82.44.55.25 (talk) 23:15, 18 October 2010 (UTC)[reply]
From a quick search I think your SOL, the ambit e08c013 appears to be a modem only from what I can tell. You can either buy a router (whether 1 port in which case you'll still need the switch or multiple port in which case you probably won't) or set up one of your computers to function as a router (which will mean the computer will have to be on for the internet on the others to work and may also post security concerns if you're only using one network adapter for both the connection to your LAN and your modem) whether via software for the computer or something in a VM (e.g. m0n0wall). Well if you have a spare computer you can also set it up to be a standalone router (I use m0n0wall as my router for various reasons even though I actually have a 1 port ADSL2+ router/modem). If this spare computer has 2 NICs all the better. Nil Einne (talk) 14:33, 19 October 2010 (UTC)[reply]
Is that not what I said in my first post Nil Einne? Mo ainm~Talk 18:06, 19 October 2010 (UTC)[reply]
Mostly yes although it wasn't clear at the time whether the modem had router/NAT functions (many single port ones do, I've actually never come across an ethernet ADSL modem without some sort of router functionality although I'm sure they exist). Also you specified they must use a second NIC, this isn't necessarily the case depending on the modem and other factors. In fact with a VM you could probably somehow set it up with only one NIC if necessary (even if the modem uses DHCP, assign private IPs in a range the modem won't see to the other computers turning off DHCP so they never take the public IP and with only the VM having DHCP it will be the only thing to ever take the public IP). You could say this is somewhat cheating though since in that case you do have virtual NICs. However I think with mosts OSes even without a VM you should be able to do something similar with the right software. Of course considering the added complexity and security risks of such a set up and low cost of a second NIC, it's likely easier to just use a second NIC. Also setting up a router solution with only one NIC and without using a VM is I think harder then I thought it would be, at least without vlans. Nil Einne (talk) 09:23, 20 October 2010 (UTC)[reply]

Mandelbrot set

Does anyone know where I could download an SVG of the Mandelbrot set from? ╟─TreasuryTagconstabulary─╢ 19:42, 17 October 2010 (UTC)[reply]

It's just not something that lends itself to a vector format(see caveat below); it's an intrinsically bit-mapped format. You can always force a bitmap into SVG, but it's not a good idea - the 800x600 jpg version of File:Mandel_zoom_00_mandelbrot_set.jpg, when turned into a SVG by ImageMagick's convert, balloons from 41K to 26M; that's because it's been rendered in SVG as about half a million tiny circles (and the resulting SVG is, unsurprisingly, entirely unviewable). Caveat: strictly, I suppose someone could write a Mandelbrot (etc.) engine that a priori targeted a vector format, it might (I'm just guessing, really) be able to produce a multi-scale (but not deeply so) vector image. While this might be fun to write, it'd likely produce an image quite unlike what you're used to (perhaps rather Braque-y), and surely still much less space-efficient than a bitmap. -- Finlay McWalterTalk 20:03, 17 October 2010 (UTC)[reply]
I doubt an SVG representation would be doable or visually meaningful. the Mandelbrot attractor is (if I remember correctly) everywhere non-differentiable, so one can't break it down into simple arcs or lines as an SVG does. further, the coloration is usually based on escape trajectories for points not in the set itself, and I have no idea how you would capture that in SVG format. --Ludwigs2 21:22, 17 October 2010 (UTC)[reply]
geometric construction of fractal curve with circles
If you're willing to really have just the set, rather than pretty pictures that really show the execution of the algorithm, it's possible to analytically construct a mandelbrot with (I think) just cardiods and circles. Circles are SVG native; I don't think cardioids can strictly be represented with the splines SVG uses, but it's possible to hack them up (like this). Illustrated right is a comparable rendering, just with circles, of a similar fractal. -- Finlay McWalterTalk 21:55, 17 October 2010 (UTC)[reply]

computing - software

to whom it may concern

my question is simple.

why is software written in English. in the sense that commands and actions are in this language

thank you —Preceding unsigned comment added by 186.59.20.61 (talk) 20:44, 17 October 2010 (UTC)[reply]

You might find the Non-English-based programming languages article relevant. -- Finlay McWalterTalk 20:49, 17 October 2010 (UTC)[reply]
Also see English in computing. This is probably due to the fact that English was among the first languages to have Character encoding and early computers did not have sufficient capacity to store multiple character languages. Also, early computing made heavy usage of assembly language which was also written with English characters. You should be aware though that though software is written in English, or other languages, it is usually compiled to binary code which is language independent.Smallman12q (talk) 23:30, 17 October 2010 (UTC)[reply]
I interpreted this as a question about user interfaces, not about program source code. User interfaces are not always in English - it's just that much software is written by English-speakers. Internationalization and localization is the process of designing software to be easily translated for users of different languages (and regions). But, it's expensive - it requires technical rework of the code and detailed knowledge of foreign languages. Hiring programmers who speak multiple languages is prohibitively expensive for many companies (and free software projects). But many commercial softwares (such as Windows and Microsoft Office) as well as many free softwares (such as Ubuntu and OpenOffice.org) are available with user interfaces in dozens of languages. Nimur (talk) 04:10, 18 October 2010 (UTC)[reply]
You don't need a multi-lingual programmer. What normally happens is there is a look-up table for each language. Each table contains multiple StringID:Translation entries; the program loads the appropriate table for the language it is using at present. When it needs to display a string, it looks up by the StringID (which is fixed for each message), gets the human-readable string, and displays it. The initial table is normally written in English, and the English look-up table is sent to a human translator to convert it one of the targeted languages. This is repeated for each supported language. However, hiring the translators is expensive, and each time the UI messages are changed, the new messages need to be sent off to get translated. Also, as the displayed length of the messages changes per language, the dialog boxes need to be checked in each language to see that they are laid out correctly, which adds to the testers time. CS Miller (talk) 10:59, 18 October 2010 (UTC)[reply]
<rant>Seperating programmers from translators is not always a bright idea. Firefox 3.6.10, to this day, contains a bug when you try to save a bookmark - the title of the pop-up screen where you can enter the description for the bookmark probably says "set bookmark for this page" in English, the German translation turned it into "Lesezeichen für diese Seite gesetzt" ("Bookmark for this page has been set") - when it clearly hasn't been set yet. Clearly, the translator had no idea where the string belongs in the application, and, lacking context, picked a wrong translation. Not sure how QA is implemented in the Firefox translations, but this bug going unnoticed/unfixed for so long, when it's in such a prominent place, is pretty disappointing.</rant> Now, does anybody know how to quickly file that bug without jumping through various you-need-to-create-an-account-first hoops? -- 78.43.71.155 (talk) 17:35, 18 October 2010 (UTC)[reply]
Actually, the English text in 3.6.10 is "Page Bookmarked", and I think in earlier versions of the new bookmark dialog it was "This page has been bookmarked" or some such. I think it's bizarre too, but it's not a clueless translator, it's a clueless UI designer (or clueless users who don't see that this is really a good thing). -- BenRG (talk) 19:18, 18 October 2010 (UTC)[reply]
If the translator is given the the application and user-manual in the original language, and instructions on how to access all the dialog boxes, then they can see all the messages in context, and thus make a better translation. CS Miller (talk) 21:24, 18 October 2010 (UTC)[reply]
<quote>and instructions on how to access all the dialog boxes</quote> - and here lies the problem. Either such instructions aren't made available to the translator, or the translator doesn't care about them - that's my experience with most botched translations I encounter. -- 78.43.71.155 (talk) 22:45, 19 October 2010 (UTC)[reply]
English is the lingua franca of programming language keywords and library functions. The advantages of a common language far outweigh the disadvantages in a situation like this. English won out because so much pioneering work in programming languages happened in the U.S., though why that's true I'm not sure. -- BenRG (talk) 19:18, 18 October 2010 (UTC)[reply]

iPhone Clones

I've seen some iPhone clones that run Android and more that run Windows Mobile, but what operating system(s) do the other iPhone clones run? I've identified that a few of the big iPhone clones (namely, Sciphone and HiPhone) that are made by CECT—which is a subsidiary of ShenZhen HuiTimes Technology—run an operating system called MTK, a variant of Nucleus developed, I think, by MediTek, Inc., but what about the iPhone clones such as ePhone, Miphone, or iiPhone? --Melab±1 22:27, 17 October 2010 (UTC)[reply]

MTK isn't the operating system but the chipset. The vast majority of cheap Chinese phones, including iPhone clones do use cheap MTK chipsets with Nucleus RTOS. The MTK chipsets are cheap and usually I think one chip solutions and MediaTek themselves provide a relatively complete solution including I think the OS and software for phones so it's easy for manufacturers to put something together, see [12] for example.
Also the SciPhone and HiPhone and likely all of the complete clones are not made by CECT. The CECT branding is just as fake as any Apple branding. Very often no one really knows who makes these phones and there are many makers and different clones of the clones as for example firmware makers like Javquisoft and astute buyers have found out.
In the case of the Sciphone, the originals appear to come from [13] who call themselves "Shezen Bluelans". [14] also has some helpful info on the phones (can't comment on their other stuff) although it may be getting a little outdated, and finally there are plenty of forums dedicated to discussion of clones.
Nil Einne (talk) 06:34, 18 October 2010 (UTC)[reply]

Free software java application for editing PDF file properties

Resolved

Is there any (tiny) free/open source software, GUI, java application availabe, that comes in a .JAR file, and which lets me edit only those document properties of a PDF file that are stored inside the PDF file? (That is: I do not want the file properties that are handled by the operating system where the PDF is residing at the moment, because those will disappear when I send the file somewhere else).
--Seren-dipper (talk) 23:18, 17 October 2010 (UTC)[reply]

You're probably looking for software to modify PDF metadata...have you tried googling for a pdf metadata editor?Smallman12q (talk) 23:23, 17 October 2010 (UTC)[reply]
Thank you! :-)
--Seren-dipper (talk) 00:15, 20 October 2010 (UTC)[reply]


October 18

Besides the iPhone, what is considered by reviewers to be the most beautiful smartphone...

purely from a design perspective?--The Fat Man Who Never Came Back (talk) 01:41, 18 October 2010 (UTC)[reply]

weird way to say it, but I think I know what you're trying to ask. probably the Xperia. 173.180.219.65 (talk) 02:33, 18 October 2010 (UTC)[reply]
Hah, good luck with that. Beauty, it would seem, is in the eye of the beholder. Perhaps you are looking for simplicity in design, by way of small shape and sleek lines? Or screen quality? Or durability? Or versatility? What is beauty to you? --Jmeden2000 (talk) 20:30, 18 October 2010 (UTC)[reply]
Personally, I think a computer should look like a PS/2 and a mobile telephone should look like an SCR-300. Current market trends do not seem to satisfy my aesthetic needs. What happened to all the buttons and knobs? Those were the hallmarks of quality and configurability. Nimur (talk) 22:38, 18 October 2010 (UTC)[reply]
You can have your buttons and knobs! 173.180.219.65 (talk) 02:51, 19 October 2010 (UTC)[reply]
My xperia 10 is sexy like its owner... Sandman30s (talk) 07:45, 20 October 2010 (UTC)[reply]

trick gmail into thinking iphone is a computer

Hey, as you may know, gmail has a "fully" featured iPhone interface for gmail, but it doesn't contain a lot of the features from the desktop version (I'm mainly concerned with the "call phone" feature here), and although there is now a "desktop" view (button at the bottom of the page), it's still a simplified gmail with no google talk functionality. Safari is a fully functional browser with HTML5 support and all that, so it should be able to handle all the same feature that firefox can. Is there any way to trick gmail into thinking I'm not on an iPhone, i.e. by using a special URL or something? I have no reason to believe that google is actively blocking iPhone users from accessing the fully functional gmail interface, though I can't say I ever really know what google is thinking. Thanks! 173.180.219.65 (talk) 02:27, 18 October 2010 (UTC)[reply]

Get a user agent switcher and make safari tell gmail that it's actually something else, like chrome or firefox. As for "call phone", this will not work, since the feature requires a browser plugin, which i don't believe exists for the iphone. 76.10.146.121 (talk) 06:09, 18 October 2010 (UTC)[reply]
Call phone doesn't need a plugin, only the video feature does! BUT, I did find a user agent switcher (thank you!), and now it thinks I'm on Safari 5, and everything works BRILLIANTLY, BUT!!! call phone requires flash... doh! I think there is a way to get flash working for jb phones so I'll get to work on that. 173.180.219.65 (talk) 06:36, 18 October 2010 (UTC)[reply]
I don't know what you mean by "jb phones", but the iPhone specifically doesn't support Flash. In fact, the notorious section 3.3.1 of the Apple developer agreement for the iPhone appeared to be a heavy-handed way to insure that Flash never made it onto the iPhone in any way. Paul (Stansifer) 12:16, 18 October 2010 (UTC)[reply]
I guess that jb is the OP's shorthand for jailbroken. -- 78.43.71.155 (talk) 17:10, 18 October 2010 (UTC)[reply]
Yes, and there are now multiple band-aid solutions to the flash problem, though none of them are able to display all modern flash apps (understandable, since they are basically emulators), and unfortunately gmail detects them as lower versions of flash, so no "call phone" feature for me, yet. 173.180.219.65 (talk) 02:42, 19 October 2010 (UTC)[reply]

screen blanking app - multiple screens

I have a TV hooked up to my laptop in a dual monitor setup, and I'm wondering if there's a little taskbar app/shortcut setup that will allow me to selectively blank (make black) either one of the screens; effectively putting half of the screen into screensaver mode. Thanks! 173.180.219.65 (talk) 05:45, 18 October 2010 (UTC)[reply]

Would you want to revert to a single monitor desktop, or just blank the screen and keep what's underneath?Chase me ladies, I'm the Cavalry (talk) 13:35, 18 October 2010 (UTC)[reply]
Just the blanking yeah. Sometimes I do have stuff opened on the other screen, I just don't want it glowing while I'm watching a movie or something like that. Also, switching to one screen takes a few seconds (longer if the memory is being taxed!). 173.180.219.65 (talk) 02:46, 19 October 2010 (UTC)[reply]

Function pointer

Moved from the language reference desk. JIP | Talk 07:34, 18 October 2010 (UTC)[reply]

Hello Friend,

Can anyone tell me ? What is the purpose of using  pointer to function?

And void pointer function in C?

like void (*func)(int a, float b);

what is the difference between normal function and pointer function?

Regards, Antony Prabhu.M —Preceding unsigned comment added by 122.164.53.225 (talk) 05:00, 18 October 2010 (UTC)[reply]

You'll have more luck asking this at the Computing reference desk. My intuition about this is that using a pointer to a function allows the function to be defined at runtime rather than explicitly in the code (similar to Python's lambda functions) but I am not an expert on this so you'd be better off asking one of the computer people. rʨanaɢ (talk) 05:20, 18 October 2010 (UTC)[reply]
C does not allow the creation of functions at runtime. A pointer to a function is used for passing a pointer to an existing function as an argument to another function. A well-known example is the implementation of sort functions, such as quicksort (part of the standard library). Its prototype is
void qsort( void *buf, size_t num, size_t size, int (*compare)(const void *, const void *) );
The last argument is a pointer to a function written by the user of the library, which specifies the sort-criterion to be used. In this example, the void* arguments of the compare function are pointers to the data elements that are to be compared, and void* buf is the start of the array to be sorted. A pointer to void in C is a "generic pointer", it can store an address to any data type, and will need to be converted a pointer to the correct data type before being used. Conversion is done using a typecast, or (in C, not in C++) implicitly in an assignment. --NorwegianBlue talk 06:13, 18 October 2010 (UTC)[reply]

C does not allow creating functions at runtime, but with function pointers, it allows switching between already created functions at runtime. You can define a variable of a function pointer type, and then assign any compile-time created function you want to this variable, as long as the signatures match. Calling this function pointer with the () operator then calls whatever function it is currently pointing to. JIP | Talk 12:02, 18 October 2010 (UTC)[reply]

VBA problem part 2

Hey, I want to move selected data from one table to another OnClick. The code that I'm trying to use at the moment is this but it's not working:

INSERT INTO Table![Merchant CCF] ([Customer Name], [Merchant Type], Partner, [Merchant Sector]) SELECT [Merchant Name], [Merchant Type], Partner, [Merchant Sector] FROM Table![Main Table]

Could someone perhaps let me know why it's wrong? Thanking you! PanydThe muffin is not subtle 12:54, 18 October 2010 (UTC)[reply]

Full code is :

Private Sub CmdAddRecord_Click()
On Error GoTo Err_CmdAddRecord_Click
 
    DoCmd.GoToRecord , , acNewRec
    'Prevent user warnings
  DoCmd.SetWarnings False
 
Dim SQL As String
SQL = "INSERT INTO Table![Merchant CCF]([Customer Name], [Merchant Type], Partner, [Merchant Sector]) SELECT [Merchant Name], [Merchant Type], Partner, [Merchant Sector] FROM Table![Main Table]"
 
    DoCmd.RunSQL SQL
 
'Allow user warnings
  DoCmd.SetWarnings True
 
Exit_CmdAddRecord_Click:
    Exit Sub
 
Err_CmdAddRecord_Click:
    MsgBox Err.Description
    Resume Exit_CmdAddRecord_Click
 
End Sub

PanydThe muffin is not subtle 13:12, 18 October 2010 (UTC)[reply]

Are you getting an error message? Are you sure it is not actually working (modifying the table) and just not updating the form? If I recall, if you do SQL operations in Access/VBA you usually need to have the form manually refresh its recordset before it'll show the new data. --Mr.98 (talk) 13:26, 18 October 2010 (UTC)[reply]
I'm not getting any error message at all but the table isn't updating either. It's very odd. PanydThe muffin is not subtle 13:27, 18 October 2010 (UTC)[reply]
I thought as an alternative I'd try the following:
Private Sub Command83_Click()

Dim strSQL As String
Dim strCriteria As String

strSQL = ""
strSQL = strSQL & " INSERT INTO tblMerchant_CCF ([Merchant Name],[Merchant Type],[Partner],[Merchant Sector]),"
strSQL = strSQL & " SELECT ([Merchant Name],[Merchant Type],[Partner],[Merchant Sector]),"
strSQL = strSQL & " FROM tblMain_Table"
strSQL = strSQL & " WHERE (((tblMain_Table.ID) = me.ID AND ((tblMerchant_CCF.Test_ID) = me.Test_ID)))"
DoCmd.RunSQL strSQL

End Sub#

But I'm getting a run time error on that. Any ideas why? PanydThe muffin is not subtle 15:52, 18 October 2010 (UTC)[reply]

There's a superfluous comma at the end of the first line after [Merchant Sector]). What's the error message? AndrewWTaylor (talk) 15:58, 18 October 2010 (UTC)[reply]
I fixed the commas but now it's saying: Compile Error: Method or Data Member not found. Eep! PanydThe muffin is not subtle 16:07, 18 October 2010 (UTC)[reply]
I've fixed the commas, I've fixed the errors with the data, now it's saying that it has a problem with the last line of code. At the moment it reads as follows:
Private Sub Command83_Click()

Dim strSQL As String
Dim strCriteria As String


strSQL = ""
strSQL = strSQL & " INSERT INTO Table![Merchant CCF]([Merchant Name],[Merchant Type],[Partner],[Merchant Sector])"
strSQL = strSQL & " SELECT ([Merchant Name],[Merchant Type],[Partner],[Merchant Sector])"
strSQL = strSQL & " FROM Table![Main table]"
strSQL = strSQL & " WHERE (((Table![Main table](ID)) IN ' & 1-5000 & ' AND ((Table![Merchant CCF](Test_ID)) IN ' & 1-5000  & ')));"
DoCmd.RunSQL (strSQL = [Yes])

End Sub
I also tried the alternative
DoCmd.RunSQL strSQL
No luck there either. PanydThe muffin is not subtle 10:27, 19 October 2010 (UTC)[reply]
Once again, you really need to tell us the exact error message you're getting, not just "it has a problem with the last line of code" or "no luck". I don't have Access installed here so I can't try this out, but I believe the last line should be DoCmd.RunSQL strSQL, False - the second parameter indicates where the command is part of a SQL transaction, which I presume is not the case here. AndrewWTaylor (talk) 10:47, 19 October 2010 (UTC)[reply]
The error on the last line simply means that the SQL doesn't make sense (this error will always be vague). "DoCmd.RunSQL strSQL" should work if the SQL is good. I can see several issues with this SQL. First I'd suggest using the .dot syntax instead of the !bang. "Table![Main table](ID)" should probably just be "[Main table].ID". Second thing, "me.ID" is unlikely to mean anything within a SQL statement. It should probably be outside the string if it refers to the form. Third thing, "IN ' & 1-5000" probably translates as "IN -4999". I'm not sure if "BETWEEN" works in Access/VBA, but it's worth trying (BETWEEN 1 AND 5000). I'd suggest using the second example code, with the comma fixed, with the last line like, " WHERE ( (tblMain_Table.ID = " & me.ID & ") AND (tblMerchant_CCF.Test_ID = " & me.Test_ID & ") )"
Having made the changes both of you suggested (and thank you very very much for your patience) I now get Error 3134, Syntax error in INSERT INTO statement. PanydThe muffin is not subtle 13:07, 19 October 2010 (UTC)[reply]
I'd suggest posting the latest version. I'd also suggest, just before the "DoCmd.RunSQL strSQL" line, insert "MsgBox strSQL". A close look at the resulting SQL will probably reveal any errors. You can also get the SQL by adding a breakpoint (press F9) in the code editor at that point; run the code and when it breaks enter "?strSQL" into the "immediate window". -- zzuuzz (talk) 14:19, 19 October 2010 (UTC)[reply]
This is the latest version:
Private Sub Command83_Click()

Dim strSQL As String
Dim strCriteria As String

strSQL = ""
strSQL = strSQL & " INSERT INTO [Merchant CCF]([Merchant Name][Merchant Type][Partner][Merchant Sector])"
strSQL = strSQL & " SELECT ([Merchant Name][Merchant Type][Partner][Merchant Sector])"
strSQL = strSQL & " FROM [Main table]"
strSQL = strSQL & " WHERE ((([Main table](ID)) BETWEEN 1 AND 5000 AND (([Merchant CCF](Test_ID)) BETWEEN 1 AND 5000)));"
strSQL = strSQL & "MsgBox strSQL"
DoCmd.RunSQL strSQL, False

End Sub

PanydThe muffin is not subtle 14:31, 19 October 2010 (UTC)[reply]

Modified (assuming all the field names are correct). Please note the changes:
...
strSQL = "INSERT INTO [Merchant CCF] ([Merchant Name], [Merchant Type], [Partner], [Merchant Sector])"
strSQL = strSQL & " SELECT ([Merchant Name], [Merchant Type], [Partner], [Merchant Sector])"
strSQL = strSQL & " FROM [Main table]"
strSQL = strSQL & " WHERE ( ([Main table].ID BETWEEN 1 AND 5000) AND ([Merchant CCF].Test_ID BETWEEN 1 AND 5000) )"
MsgBox strSQL
DoCmd.RunSQL strSQL
...

-- zzuuzz (talk) 14:39, 19 October 2010 (UTC)[reply]

The SQL statement is invalid because the SELECT query only uses [Main table], but the WHERE clause also mentions [Merchant CCF]. If you delete AND ([Merchant CCF].Test_ID BETWEEN 1 AND 5000) then it should be OK. AndrewWTaylor (talk) 16:03, 19 October 2010 (UTC)[reply]
Is it possible for me to run more than one of these queries in a single module/button? If it is, how would I tell VBA that one query had ended and another one was going to begin? PanydThe muffin is not subtle 10:51, 22 October 2010 (UTC)[reply]

SVG unique Id's

This should ba a relatively easy question to answer but I simply can't find the answer anywhere. I have given everything in my SVG file a unique ID and wish to reference the shape over and over, just changing its position. For example if I wish to recall the following.

<circle id="0_logo" cx="190" cy="405" r="10"
style="fill:#000000;stroke:#FFFFFF;stroke-width:2;fill-opacity:0.1;stroke-opacity:1;"/>

Is this similar to when you call, for example a gradient.

<circle fill="url(#grad)" cx="410" cy="285" r="30"/>

Thanks in advance :) 195.49.180.89 (talk) 13:03, 18 October 2010 (UTC)[reply]

Don't worry - I eventually found it :)
<use xlink:href="#0_logo"/>

195.49.180.89 (talk) 13:53, 18 October 2010 (UTC)[reply]

I was considering full disk encryption (via TrueCrypt, on a Mac), and had some basic FAQ-style questions that I thought people might be able to help me with.

I know the upsides of FDE. But what are the practical downsides of full disk encryption? Is there a large performance hit? Where would the performance bottleneck be located (e.g. RAM, CPU, HDD access)?

If I went with FDE, how hard would it be to reverse if I decided that I didn't like it? Is it the sort of thing you can just say, "OK, disable it now," or would that require a whole lot of work?

Thanks in advance. --Mr.98 (talk) 13:23, 18 October 2010 (UTC)[reply]

It depends a lot on your CPU which will be doing a lot more work (the bottleneck is in the CPU). Truecrypt encrypts everything prior to writing to disk, and decrypts when reading...so it will make your comp appear slower (cascading will make it even more slow). Truecrypt comes with a benchmark tool, so you can see what your speed will be. As for undoing it, its a fairly straightfoward procedure...just takes a while (however long it takes to encrypt your entire hardrive + whatever else you add)...you really need to see what the benchmark tells you. Just remember that with truecrypt, if you forget your pass or the MBT and your rescue disk breaks...you can't get your data back. Smallman12q (talk) 14:23, 18 October 2010 (UTC)[reply]
I've found truecrypt on Windows to be essentially transparent. If you use AES, it's been optimized to the point that the CPU hit is far less than my disks seem to put through. I've never had an issue. I don't know about on mac, and it has had some "concerns" from some linux distros about its license, although that's given their somewhat different standards. Shadowjams (talk) 09:31, 19 October 2010 (UTC)[reply]
As for undoing encryption, truecrypt does not support decrypt in place. (If you decide, that you do not want encryption, all data will have to be copied to unencrypted backup and orginal encrypted disk formatted (and data copied back)) -Yyy (talk) 09:58, 19 October 2010 (UTC)[reply]
Actually I'm pretty sure it does for system disk encryption. On windows at least. Shadowjams (talk) 10:14, 19 October 2010 (UTC)[reply]

MediaWiki api in C++ language

hello... i usually develop in c++ using Qt framework. i want to make a tool related to mediawiki\wikipedia which require interacting with API and a login to the system .however, i cant find any wrapper for mediawiki api in c++, and i dont know any web language like PHP java Actionscript etc. Does anyone know of somehing like this or even an example using cURL library --Umar1996 (talk) 15:22, 18 October 2010 (UTC)[reply]

I can't find a C or C++ library that wraps the API, but all is not lost. The API is fundamentally an HTTP GET that passes what you want in the URL and spits the data back in a variety of formats. If you can't locate a library, it's not terribly hard to do what you want yourself. Essentially you can
It's certainly more knuckledraggery than using a wrapper that abstracts this, but it should work. I'll have a check through the archives of http://lists.wikimedia.org/mailman/listinfo/mediawiki-api and see if anyone has done this already. -- Finlay McWalterTalk 16:06, 18 October 2010 (UTC)[reply]


Saving information from a html form

Can I update a text file or even a SQLite file with html alone? (it would be a local html page saving the information into a local file).--Quest09 (talk) 15:52, 18 October 2010 (UTC)[reply]

Not really. HTML does not have the capability to save to a file by itself. For security reasons, JavaScript cannot open/save files. It can open/save cookies. You could install something like WAMP and then use a back-end scripting language to handle the file interface while HTML handles the user interface. That is rather common. -- kainaw 19:16, 18 October 2010 (UTC)[reply]
On Windows, you can create HTML Applications which lift almost all security restrictions, and allow you to access filesystem objects and start processes through JavaScript. I've successfully used it to launch a few curl sessions and monitor their download progress by watching the download folder. To access SQLite, you would have to have it wrapped as an ActiveXObject Unilynx (talk) 22:34, 18 October 2010 (UTC)[reply]
HTML is a markup language; it can't specify actions. However, it's possible to embed JavaScript and ActiveX and Flash into HTML, and the web browser viewing the page has the option of executing them. In order to affect "outside" things, it's necessary to disable security restrictions, as Unilynx said, which will make it possible (in IE on Windows at least; I don't think I've heard of other browsers having that option), but I suspect that it's awkward to do things this way. Paul (Stansifer) 11:42, 19 October 2010 (UTC)[reply]
A HTML application is a bit different from normal HTML - it uses a .HTA extension instead of .HTML, and disables almost all restrictions by default - no restrictions to disable. But it indeed doesn't work outside of Windows or IE (although other browsers won't take over the HTA extension unless you ask them to, so anything deployed as a .HTA is quite likely to work on Windows, even if the default browser is changed.) Unilynx (talk) 15:57, 19 October 2010 (UTC)[reply]

PXR format, why still in Photoshop?

Curious, why would Photoshop support the PXR image format, when less than 300 of the Pixar Image Computer systems were ever sold? Why not make it just available through a plug in? -- Zanimum (talk) 19:46, 18 October 2010 (UTC)[reply]

Aren't all Photoshop image format support via plugin? Nil Einne (talk) 20:04, 18 October 2010 (UTC)[reply]
Okay well I checked in case Adobe changed things since the many years ago when I last looked and in CS4 I'm still right, all file formats are indeeded support via plugin including Pixar (pixar.8bi) Nil Einne (talk) 20:08, 18 October 2010 (UTC)[reply]
Because Adobe never removes features from Photoshop. For example, if you go to Image --> Image Size..., there still is the "Nearest Neighbor" option within the drop-down list at the bottom of the dialog. Nearest Neighbor is less sophisticated than the other options in the list. But, it is great for expanding screen shots, because it simply enlarges pixels. Photoshop is used by creative professionals, who find creative ways to use old functions in Photoshop. There's usually two or three ways to do the same thing in PS, because of the retention of old ways of doing things.--Best Dog Ever (talk) 20:33, 18 October 2010 (UTC)[reply]
Taking a guess at what Zanimium's question was... A perhaps useful thing to remember here is the feature was probably implemented in the late 80s. At a guess it wasn't that hard to get Adobe to add support for file formats in those days. Provide the code for the plugin and provided it's decent code and the format not patent encumbered Adobe may be willing to include that plugin as part of their official plugin code. (Of course it's also possible Adobe coded the support themselves.) Particularly if you're developing $120k machines in those days. (Remembering of course Adobe doesn't have a crystal ball, part of being a good company is predicting what your customers may want before they want it, and while it seems Pixar file format support wasn't that important it wasn't a bad guess from the info at the time it may be and anyway despite the limited success of the Pixar Image Computers, the format may have been important enough for whatever effort Adobe put in to it.) Heck, I don't actually know if it's that hard to get Adobe to support an image format nowadays.
In terms of why they haven't removed the plugin, well other then what BDE has said, the code is very likely rather simple since the format is uncompressed (on x32 and x64 CS4 Windows the plugin is the second smallest after WBMP) so likely not that hard to port between platforms or versions. I don't know enough about the 8bi plugin format but it's even possible there's no effort needed.
Also while I don't know that much about software development, from what I know in general in large organisations for a variety of reason, some bureaucracy may develop. So for people in Adobe removing any file format support may not be just a matter of doing it, even agreeing in a meeting may not be enough, perhaps someone will need to write a document explaining why they're removing it which needs to be passed up the chain. (The only real reason to remove the format may be KISS and security reasons but given the likely simplicity of the code, these probably don't matter much.)
More to the point (and somewhat in line with what BCE said), the people who did use Pixar Image Computers were likely large organisations who would be important customers to Adobe, customers who don't like unexpected changes, and customers who may sometimes maintain legacy stuff long after they were largely obsoleted. So while it's possible no one would care if pxr was removed, it's possible someone will and finding out after you removed it would be a bad idea. Sure you could survey all your customers, or hunt down whoever has ever owned Pixar Image Computers and ask them but that's will likely annoy them and it's a lot of effort for something (maintaining the support) which as I've said, is probably very little effort. And of course some people who never had Pixar Image Computers may have used (or even use) the format, as I said a lot recently, who knows? (It may even be someone in Adobe.)
P.S. I didn't notice the header of this question until now. A reminder it's always helpful to mention anything important in the actual signed question.
Nil Einne (talk) 21:03, 18 October 2010 (UTC)[reply]

Other languages that can do COBOL business things

1) COBOL is an old language. What other languages can be used in place of COBOL (supersets of COBOL?), while still having good handling of dates and financial functions?

2) Is it really true or not that most serious business applications are still written in COBOL in the 21st century? Why? Even though COBOL may be a legacy language, why are not new programs written in something else? Thanks 92.15.28.219 (talk) 20:01, 18 October 2010 (UTC)[reply]

What's a serious business application? Nil Einne (talk) 20:03, 18 October 2010 (UTC)[reply]
The sort of things that merchant banks or insurers might do for internal use. I do not mean websites. 92.15.28.219 (talk) 21:02, 18 October 2010 (UTC)[reply]
The largest businesses in the world typically have contracts with major software and technology services companies - like, for example, IBM. IBM writes most of its application code in the Java programming language. As mentioned earlier on this desk, Java is currently the most widely used business programming language ([according to many surveys). That means new business programs are written in Java. It is difficult to estimate the quantity of legacy systems that still run COBOL programs; I am suspicious of commonly-repeated, vague claims that 40-year-old software still runs unmodified. Some existing systems certainly do run COBOL; there are probably even new programs and modifications still being written in COBOL; but these are exceptions, not norms. Consider IBM Enterprise COBOL for z/OS - the objective of this current product is to help integrate COBOL systems in to (reasonable) modern platforms that use Java and XML. Other COBOL tools exist, and the market is not "small", but it is hardly the mainstream. Nimur (talk) 20:39, 18 October 2010 (UTC)[reply]

Although Nimur claims that Java is the most popular business language, the reference he/she cites in support of the assertion appears to be for any programming, not just business, and is therefore invalid. Whereas this http://www.cobolportal.com/developer/future.asp?bhcp=1 says that COBOL is the most popular for business applications. 92.15.28.219 (talk) 21:01, 18 October 2010 (UTC)[reply]

I would think that most applications that would in ancient days of yore have been done in COBOL would nowadays make use of databases and languages such as SQL. Looie496 (talk) 21:02, 18 October 2010 (UTC)[reply]
The link the argumentative OP cites is to a "survey taken of professional business and industry employers who are using COBOL in their information systems". Presumably if you surveyed "professional business and industry employers who are using JAVA blah blah blah" you'd get a completely different impression. --Tagishsimon (talk) 09:31, 19 October 2010 (UTC)[reply]

I think SQL does not have any financial functions, so it would not be much use. 92.15.28.219 (talk) 21:04, 18 October 2010 (UTC)[reply]

It is true that there is a lot of COBOL code lying around: [15]. But, I think that those programs are mostly old apps. Hardly any new programs are written in COBOL. Many of the old COBOL programs in use aren't being updated or even patched. If you look on job web sites for COBOL positions, you won't find very many. Most job openings are for other technologies like Java and .NET. I haven't worked with Java much, but .NET contains quite a few financial and temporal functions and data types, making it popular with businesses.--Best Dog Ever (talk) 21:12, 18 October 2010 (UTC)[reply]
Reading the article you linked to (aqnd ignoring the slight spin put on by the author) gives the opposite impression: eg 62% of organisations use COBOL, and it is the 2nd most popular language. 92.15.28.219 (talk) 21:27, 18 October 2010 (UTC)[reply]
On CareerBuilder.com, you will find 550 jobs if you search for the term "COBOL." If you search for "Java," you will find 7,431 jobs. If you search for ".NET" you will find 3,179 jobs. If it's the second-most popular language, why is it the least in-demand language in the workforce? Employers must not need much COBOL to be written, either as patches or new programs. Although there are programs in use that were written in COBOL, there are not many new programs written in COBOL. That's the conclusion I come to after reading that article and looking on a job board. In the article I linked to, there is a chart at the bottom showing that only 58% of the companies that use COBOL are using it to develop new applications.--Best Dog Ever (talk) 22:32, 18 October 2010 (UTC)[reply]
"Only" 58%! Thats over half of them! 92.15.28.219 (talk) 22:59, 18 October 2010 (UTC)[reply]
If 62% use COBOL, and 58% are writing new COBOL applications, then at most only 6% of COBOL users are dropping it for something else. 92.24.191.1 (talk) 09:23, 19 October 2010 (UTC)[reply]
Sorry what? If 62% of businesses use COBOL, and 58% of businesses that use COBOL (which was what BDE specified) are developing new applications with it that means 42% of businesses that use COBOL are dropping it (well either that or they are planning to use their current apps forever) and only ~36% of businesses are using COBOL for new applications. (If it helps, 100% of business that use COBOL, use COBOL. So 100% of businesses that use COBOL - 58% of businesses that use COBOL and are developing new applications = 42% of businesses that use COBOL and aren't developing new applications, presuming there's no inbetween like haven't decided or didn't answer.) I'm actually not sure where the 6% came at all since 62-58=4. Even if you are considering rounding, that would suggest the most is 5 (62.5-57.5). I do hope the COBOL developers for serious business applications are better at maths then COBOL supporters... Nil Einne (talk) 07:30, 20 October 2010 (UTC)[reply]
1-(58%/62%)=6%. If you were into financial calculations, you would understand that. Despite your spin, 58% is still more than half. 92.15.29.194 (talk) 19:52, 21 October 2010 (UTC)[reply]
Considering the job market for COBOL (it took me seconds to find an ad for a contract Cobol/CICS developer position in France, among many others) I would say there is still plenty of need for development in Cobol. Though, I strongly suspect most of the roles are related to maintaining legacy code rather than developing completely new systems. Astronaut (talk) 21:17, 18 October 2010 (UTC)[reply]
On CareerBuilder.com, you will find 550 jobs if you search for the term "COBOL." If you search for "Java," you will find 7,431 jobs. If you search for ".NET" you will find 3,179 jobs.--Best Dog Ever (talk) 22:32, 18 October 2010 (UTC)[reply]

Thanks for the answers to question 2). Are there any answers to question 1) please? 92.24.191.1 (talk) 09:25, 19 October 2010 (UTC)[reply]

Why do you ask? You seem to have already made up your mind. You probably knew the answer to both long before asking about them here. Nimur and I both suggested some languages, but why would you listen when you already know everything about it?--Best Dog Ever (talk) 09:44, 19 October 2010 (UTC)[reply]
I didn't know the answers - be pointless asking wouldnt it? Nobody has confirmed that SQL or Java include the similar date and financial functions that I assume COBOL has. People have seemingly just plugged their favourite language. I'm doubtful if a database language would have financial functions, but I do not know. 92.24.191.1 (talk) 10:49, 19 October 2010 (UTC)[reply]
No-one buys into your assumption that such functions are a necessary precondition of the language being of use in financial software contexts. In short, you assume COBOL has some functionality and you assume that JAVA does not, and so you reject the clear and repeated answer to your question. Somewhat solipsistic. --Tagishsimon (talk) 10:53, 19 October 2010 (UTC)[reply]
Surely having financial and date functions makes writing a financial application easier and quicker? I cannot imagine that anyone would prefer to use a language that did not have them. (I'll ignore the personal digs, and bow to your superior vocabulary). 92.24.191.1 (talk) 11:17, 19 October 2010 (UTC)[reply]
Having special functions for specialised needs does of course make things easier. That's presumably why we find the ability to add libraries of such functions to JAVA. --Tagishsimon (talk) 11:21, 19 October 2010 (UTC)[reply]
Yes. An answer to 1 is SQL and JAVA. All of the work I've known about or been associated with for financial institutions (e.g. Nomura, Goldmans & others) has used these two. You harp on about "lack of date and financial functions" as if entirely unaware that should there be need for functions unsupported in JAVA, these can and are added as class libraries. We can only answer the question so many times before we get bored with your rejection. --Tagishsimon (talk) 09:50, 19 October 2010 (UTC)[reply]
I don't think mentioning it once counts as "harping on". 92.24.191.1 (talk) 10:53, 19 October 2010 (UTC)[reply]
An anecdote: Because I am a good Cobol programmer, I have had three Cobol contracts in the last ten years. All three were with large organizations (two companies and the government). All three jobs were basically the same. They have a Cobol application that has been in place for decades and they want it rewritten in Java. So, I do a rough rewrite and then a team of Java developers come in and pretty up the thing. I see Cobol turning into the same type of language as Ada and Mumps. There will always be organizations using Ada (Air Force) and Mumps (VA), but use is shrinking, not growing. -- kainaw 12:22, 19 October 2010 (UTC)[reply]
At various times throughout the discussion, I prepared a response, but decided not to submit, because I believe the OP does not want to hear reality and may be trying to spark a debate. But I can't hold back. Like Kainaw, I have seen wild COBOL in its native habitat - large organizations and the government, and seen the functions it provided being actively replaced by new, better software. Java provides extremely powerful, simple, and localizable, compatible time, date, and calendar functions. It supports all types of mathematical and financial calculations. And it is a modern language with an enormous reservoir of talent. Java is also compatible with all the gimmicky fad-technologies of the day - simply because more Java is being written today. But not all technology progress is a "fad." For example, the Java language also seamlessly provides the facilities of the internet protocol - something COBOL will struggle with, even in today's latest and greatest COBOL incarnations. The oft-repeated claim about "banks and insurance companies" who have mysterious vaults of System-360 machines from 1967 is a misrepresentation of reality. Large organizations like banks and insurance companies have lots of money to invest in the newest, latest, greatest hardware and software - and can afford the consultants, contractors, service-company affiliations, and in-house developers to upgrade their systems. Production data centers are more like a factory-floor than a cathedral crypt. Old and outdated cruft gets replaced, not worshipped. COBOL had its strengths, and still serves in some cases where a suitable alternative has not yet been feasible, but it is severely diminishing in importance as new languages like Java and .NET steal the big "business software" market. Probably most surprising to the OP is that most COBOL currently runs in a Java virtual machine - and probably on ia32/ia64 hardware on linux. (Because of virtual machine advances - it doesn't matter what platform/architecture your code targeted). Our article, enterprise software, might help you gain some contextual insights into what business software actually looks like in 2010. It is still quite different from ordinary application-programming, and some specialized hardware still exists, but there are very few shops that still seek to buy "mainframes" and run COBOL on them as if it were 1980. Nimur (talk) 14:59, 19 October 2010 (UTC)[reply]
Finally, an answer to question 1). Don't know why you are imagining this "OP does not want to hear reality" nonsense. 92.29.117.157 (talk) 18:25, 19 October 2010 (UTC)[reply]
There are possibly more things that can get you into trouble if you naively program in Java. Rounding and formatting are the two where I have seen most errors. Java is quite capable of doing these but if you take a "general purpose" Java programmer and give them a financial application to write then there is a fair chance they will trip up. Also one of the difficulties is that often new programs have to be wedged into old systems, which means reading fixed format records, etc. These again can be done in Java but they are the "bread and butter" of Cobol and seem a bit unnatural. For a completely new application you would probably use XML in Java, which is much more flexible than fixed format records but almost impossible to deal with in Cobol. The company I work for has written tactical new programs in Java, while our long term strategy is to move to a Java/XML/SOA environment. -- Q Chris (talk) 15:52, 19 October 2010 (UTC)[reply]

Toy language or game to teach Object-oriented programming?

I started amateur programming before any object-orientated languages were around, so the OO methodology is new unknown and confuising to me. I tried to learn it by reading a book about it, but it was heavy going and I gave up after a few pages. Is there any easy instructional language or game that would teach me about OO programming? I am happy to use things designed for kids. Thanks 92.15.28.219 (talk) 21:14, 18 October 2010 (UTC)[reply]

Perhaps you will find this Object Oriented COBOL tutorial helpful? Nimur (talk) 21:19, 18 October 2010 (UTC)[reply]
Joking aside, if you want to learn an object oriented language, there is no surrogate for Java. It is entirely free software - the specification and its implementation are both freely licensed (see OpenJDK); and there is also widespread commercial support in the form of service companies and commercial implementations of the language and its platform. Furthermore, the official Java Tutorial sequence is free and includes everything you need to know - from design paradigms to syntax to complete working code examples. The "Specialized Trails and Lessons" section has complete tutorials for a variety of the most common O.O. tasks - making a web program, making a graphical user interface, making a small game, and so on. Nimur (talk) 21:22, 18 October 2010 (UTC)[reply]
No need to keep on plugging Java, thanks. In any case it is not the toy language or game I was asking about. 92.15.28.219 (talk) 21:30, 18 October 2010 (UTC)[reply]
This sounds exactly like Smalltalk. Smalltalk is simple and elegant and frequently thought of as a teaching language. It's not designed for kids, though it's sometimes used for teaching kids, and Squeak is much more brightly-colored and cheerful than, say . It's also truly object-oriented. Java and C++ are messy compromises (C++ was once famously described as being object-oriented in the sense that nailing four legs to a dog makes it an octopus) with huge specifications. Smalltalk is therefore much more pleasant to work in, at the expense of running slower. The main disadvantage is that if you ever have to sit down to write some Java and have to type out for(i = 0; i < something.length(); i++) { you will know what you're missing. However, knowing a programming language's weaknesses makes you a better programmer, so the fact that simple and elegant languages (Scheme, Smalltalk, and even C) are rarely used should not dissuade you from learning them. Paul (Stansifer) 03:11, 19 October 2010 (UTC)[reply]
I agree Squeak could be a good idea for this purpose. Like all early Smalltalks (as far as I know), it provides basically a wiki-like programming environment, and this is essentially where object orientation started.
Of course there are various degrees to which a language may or may not be object oriented. You might want to try Lua (programming language). This is a minimalist language very close to the spirit of BASIC, so it is extremely easy to learn. Like Perl, Python and Ruby, it has a certain degree of object orientation which is built from hashes + syntactic sugar. The basic idea is that you can write hash.field for hash["field"] and you can store functions and objects there just like a number or string. Then if hash.field contains a function that takes two arguments, you can invoke hash.field(x,y). An object is simply such a hash that has a number of such functions. Since several objects typically form a "class" of objects/hashes that share basically the same functions, it is convenient to write the functions so that they can be shared, i.e. hash1.field = hash2.field. But typically the functions need to know which hash they belong to, so you pass that as the first argument: hash1.function(hash1, x, y). And because this occurs so often, there is an abbreviation for it: hash1:function(x,y) = hash1.function(hash1, x, y).
I think this implementation-based approach to object orientation should be a lot easier for getting started. Once you have become accustomed to that, you can still read the religious, dogmatic accounts of object orientation and concentrate on the various sects with their different attitudes to inheritance. Hans Adler 07:56, 19 October 2010 (UTC)[reply]
You might be interested in BlueJ. APL (talk) 04:27, 19 October 2010 (UTC)[reply]

What do people think of Etoys (programming language)? 92.24.191.1 (talk) 09:37, 19 October 2010 (UTC)[reply]

I haven't programmed in Squeak/Etoys myself, but I know a few who have, and they spoke highly of it. You might also want to consider Alice, which I use to introduce some of my students to OO programming in first year, as it provides an easy interface and a quick, but fairly solid, introduction. A few of my students have also tried Game Maker before they arrive at uni, and I gave my son a shot at it - he seemed to enjoy it. I've only coded enough in it to help him out, which wasn't much, but it is OO and would probably do what you have in mind. - Bilby (talk) 09:49, 19 October 2010 (UTC)[reply]

Is Logo at all OO? 92.24.191.1 (talk) 11:07, 19 October 2010 (UTC)[reply]

There are a few versions that are OO, from memory. Object Logo springs to mind, although I don't think it is still supported. I wrote my own OO-ish Logo interpreter some time ago, but it isn't really suited for anything but demos of how OO works. Interestingly, Etoys is pretty much Logo, so I'd lean towards that per your suggestion before. - Bilby (talk) 11:23, 19 October 2010 (UTC)[reply]

October 19

Windows application icons

What does it mean when Windows, instead of using a program's regular icon, uses that generic looking icon for a program? I can't really describe what I'm thinking of... And the signal to noise ratio on searches for "windows icon" is too high to come up with anything useful.

Let me describe what I saw and maybe it'll help understand what I'm thinking of. I just saw my manager's laptop desktop. On it was the installers for iTunes, RealPlayer, FlashPlayer, two different versions of Firefox (one of them was Firefox 2), and three different versions of Adobe Reader. A utility for setting up a WLAN and another for adding a printer (neither of which he ever has to do on any sort of timely basis). In addition to all that (amongst the 40+ icons on his desktop) were those generic Windows icons.

Would they be shortcut icons for programs that no longer exist and therefore don't have the proper icon? Dismas|(talk) 00:19, 19 October 2010 (UTC)[reply]

Was it one of these standard Windows icons? If a program file does not contain the icon, or specify the external location for its icon properly, Windows will default to one of its shell icons. The specific icon used will depend on file type, shell settings, and so on. Nimur (talk) 00:23, 19 October 2010 (UTC)[reply]
Yep, it looked like the icon in the first image at location (0,-2), if we're using a standard (x,y) Cartesian coordinate system. I'm figuring that he deleted the programs that they were tied to but didn't get the icon on the desktop. Dismas|(talk) 00:51, 19 October 2010 (UTC)[reply]
That would cause the effect you described. It may also have had some other issue loading the proper icon and given up. There are exotic possibilities, but a common one would be that they were links to programs on a network drive that wasn't currently connected. APL (talk) 04:19, 19 October 2010 (UTC)[reply]
Or a Removable Drive. Or the target has been moved somewhere else or deleted. Sir Stupidity (talk) 11:21, 19 October 2010 (UTC)[reply]
If you know the program has its own icon, then one of the above seems likely. But it might be a console application that doesn't have one at all; that's the generic "program" icon used for batch files for instance. --Tardis (talk) 13:46, 20 October 2010 (UTC)[reply]

gcc problem

Hi. I'm trying to compile gcc 4.5.1 (needed for emacs) and SVNed that latest revision (165682). Although it configures fine, compiling throws the following error:

/home/rksh/scratch/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/rksh/scratch/gcc/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include    -g -O2 -m32 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../../../host-x86_64-unknown-linux-gnu/gcc -I../../.././libgcc -I../../.././libgcc/. -I../../.././libgcc/../gcc -I../../.././libgcc/../include -I../../.././libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../.././libgcc/../gcc/libgcc2.c \
          -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/features.h:371:0,
                from /usr/include/stdio.h:28,
                from ../../.././libgcc/../gcc/tsystem.h:87,
                from ../../.././libgcc/../gcc/libgcc2.c:29:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
compilation terminated.
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory `/home/rksh/scratch/gcc/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/home/rksh/scratch/gcc/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/home/rksh/scratch/gcc/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/rksh/scratch/gcc'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/rksh/scratch/gcc'
make: *** [all] Error 2
HPS223:~/scratch/gcc%

Googling seemed to reveal that others have had similar problems, but no solution. Does anyone have any ideas? Robinh (talk) 08:30, 19 October 2010 (UTC)[reply]

(OP here). Thanks to a local guru, I have answered my own question: the trick was to install glibc-devel-32bit, which was unintuitive seeing as my system is a 64 bit SuSe installation. Thanks anyway, Robinh (talk) 08:43, 19 October 2010 (UTC)[reply]

AVG slows down my computer significantly

I've had various versions of AVG Antivirus Free on my Vista laptop since I bought it in late 2007 or early 2008. Yesterday, I downloaded the 2011 edition, and since that time, my computer has been functioning far slower: it's almost as slow as the computer used to be when the full computer scan was running, but I've checked and confirmed that the scan is not running currently, and the slowness continues. Any ideas what I could do to improve performance? I downloaded this program from the AVG website, so I know that it's not some odd sort of virus in disguise. Nyttend (talk) 12:13, 19 October 2010 (UTC)[reply]

I used to use AVG too and found it slowed the computer an unacceptable amount. I switched to Avira which is a free (for non-commercial use) antivirus program that runs so much faster and uses less memory. I know that's not the best answer to your question considering you obviously want your paid for AVG to work fast, but if you run out of other options give Avira a try. 82.44.55.25 (talk) 14:14, 19 October 2010 (UTC)[reply]
Thanks for the pointer. I didn't pay for this service; as I said, it's AVG Free, which is also noncommercial. Nyttend (talk) 19:05, 19 October 2010 (UTC)[reply]

wget time-stamping

With the -N option in wget it checks whether the remote file is newer than the local file, and downloads it if it is. However it also checks the size of the file; "If the local file does not exist, or the sizes of the files do not match, Wget will download the remote file no matter what the time-stamps say." I've found with some sites that the size of the remote html files sometimes change (presumably adverts or something) but the page has not been modified in any way, the content is exactly the same, and the last modified headers are the same as they were previously. In these instances wget downloads all the pages again. How can I stop this? I want wget to only check the last modified headers, not the size of the files. I've looked through the wget guide but can't find any way to stop this. 82.44.55.25 (talk) 14:06, 19 October 2010 (UTC)[reply]

I may be confused but how can the remote HTML file size change but it not be modified in any way? Surely there must be some difference even if only in blank spaces or links to ads or whatever? Nil Einne (talk) 14:37, 19 October 2010 (UTC)[reply]
In terms of the wider question, I can find several people who've asked but no one has offered any suggestions other then use something else. That and the lack of anything in the documents suggests to me it isn't a currently supported option. Nil Einne (talk) 14:46, 19 October 2010 (UTC)[reply]
If you care that much about it, why don't you just recompile wget? Surely the part of the check that looks at the file size in addition to date must be like ONE LINE, and you comment it out and it's done. It'll take you like 2 minutes to find that line, and if you're on Windows and haven't used Linux or C before, like no more than 200 hours to be totally used to your Linux environment and to recompiling everything from source, along with learning enough C to be able to make meaningful source-code changes. That's the beauty of open-source. Get to it -- you won't have much of a beard after just 200 hours, and if you wanted to make meaningful kernel-level changes we're talking more like 20,000 hours, but we all had to start somewhere...84.153.229.95 (talk) 15:54, 19 October 2010 (UTC)[reply]

cURL is a bit more modern alternative to wget; so consider checking it. I can't see an exact option for what you want, but the cURL documentation is extensive, and I haven't checked it all. cURL also has a programmer's API so you could write custom logic to analyze the HTTP metadata libcurl returns. Or you can call curl from the command line to spit out headers or HTTP metadata and process that with a script. Nimur (talk) 15:40, 19 October 2010 (UTC)[reply]

.bif file

Hi! do u know where can I find the bif file on a sd mem card? T.i.a. --217.194.34.103 (talk) 15:58, 19 October 2010 (UTC)[reply]

Have you checked you can see hidden folders and files? On Windows 7, go to any explorer.exe window, click on organise, then on folders and search options. Under the view tab, change it to 'Show hidden files and folders'. Then check if you can see it.Sir Stupidity (talk) 21:18, 19 October 2010 (UTC)[reply]

grep doesn't work on windows7

I just installed grep for windows (version 2.5.4) and typing "grep" on the commandline doesn't do anthing, but if I go into C:\Program Files\GnuWin32\bin> and type "grep" it works. Can you give me EXACT instruction (i'm just a beginner) on how to get it working so if I just type "grep" it works? I'm on windows 7, please don't assume I know anything! I need very detailed instructions, normally when I ask for help I don't know how to do any of the steps anyone tells me to do. Thanks a million!!! Jenny. —Preceding unsigned comment added by 188.174.25.49 (talk) 17:54, 19 October 2010 (UTC)[reply]

Windows has this concept called the "path". The path is a big list of directories where Windows searches each time you type something from the command line. You have grep in "C:\Program Files\GnuWin32\bin" but Windows doesn't know to look there when you type "grep" from the command line, so Windows gives up and displays an error. This link discusses how to add a directory to the Windows 7 path; try to follow those directions to add "C:\Program Files\GnuWin32\bin" to your path, and reply back here if you have any problems. Make sure you add this directory to the end of the path (don't delete the whole path that you already have). Comet Tuttle (talk) 17:57, 19 October 2010 (UTC)[reply]

Is it possible for a computer virus to evolve?

And to do so on its own without any input from the creator of the virus. ScienceApe (talk) 18:34, 19 October 2010 (UTC)[reply]

No (at least not given current techniques, and not if you're using the conventional biological definition of evolution). Using computer terminology, biological evolution works on a playoff between expressed and unexpressed code. i.e., you have a large storage base in the genome of genetic material that doesn't do much or is only rarely executed, and a more restricted set of code that generates the organism and its properties. as the environment changes, expressed code that is counterproductive tends to kill off that individual organism, while rarely expressed code that is productive becomes more common. Plus, random mutation is consistently adding new unexpressed code into the genome. In order for this to be modeled in a computer virus, you'd need (at minimum) some form of code-transference between viruses to produce new distributions of code and to spread both unsuccessful and successful code bits through the population, some non-random method for determining which code bits get expressed and which remain unexpressed in a given virus, some random method for generating new potentially viable code (creating purely random code would not be sufficient), a large enough population of running viruses to make for a statistically adequate population size, and some sort of inbuilt motivational structure (resources to be sought out and consumed, dangers to be avoided, an urge towards code-exchange). Even if you could overcome these programing obstacles, you'd certainly have to construct a special environment for this to happen, because I can't think of a system that could handle the (likely millions or billions) of individual virus threads that you'd need to get something akin to evolution and species diversification. --Ludwigs2 19:03, 19 October 2010 (UTC)[reply]
What Ludwigs is describing is an evolutionary algorithm. You'd have to program the virus to work in this way, though, so it wouldn't really be without input from the creator. --Mr.98 (talk) 19:12, 19 October 2010 (UTC)[reply]
How cool. I did not know we had an article on that. --Ludwigs2 21:08, 19 October 2010 (UTC)[reply]
When a person states that a computer virus "evolved", they mean that someone wrote the original virus. Someone else altered it. Then, someone altered that. Then, someone altered that. Over and over, the virus evolves. While it does meet your criteria of "without any input from the creator", it is obviously not what you are looking for. -- kainaw 19:07, 19 October 2010 (UTC)[reply]
You may be interested in Tierra_(computer_simulation). APL (talk) 21:14, 19 October 2010 (UTC)[reply]

It would actually be very simple. All you'd have to do is to program the virus to make, with some low probability, a random change to its own code on some occasions when it replicates. It wouldn't work very well unless the code was specially written to be fault-tolerant, because otherwise it would be hard to avoid Muller's ratchet, but in principle it is straightforward. Looie496 (talk) 22:38, 19 October 2010 (UTC)[reply]

Code displayed on a web page

I was browsing the net and came across this site www.stalltheball.ie and the following code is displayed on the home page

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/stall/public_html/includes/application_top.php:41) in /home/stall/public_html/includes/functions/sessions.php on line 102

the code is only visible when I view the page using Opera, I tried IE and Firefox and the error doesn't appear. So is it an error on the site or is it the Opera browser? Mo ainm~Talk 19:14, 19 October 2010 (UTC)[reply]

The site. Strictly it's not showing you source code, it's showing you an internal error message (intended for developer consumption, not for users). For any production site, it's very bad form indeed to show a regular visitor an internal error message like this. The fact that it doesn't work with a given browser just means they haven't tested it properly. -- Finlay McWalterTalk 19:21, 19 October 2010 (UTC)[reply]
So any idea what is causing it to display is it that session_start() is not being called at the correct time in their source code? Mo ainm~Talk 19:38, 19 October 2010 (UTC)[reply]
No, you'd have to see the source for their web app to see what they're really doing wrong - error messages are the computer equivalent of "my leg hurts", and are rarely enough to really figure out what's wrong, without a proper examination. Incidentally the site works fine for me in Opera 10.61 (build 10.61) on Linux. -- Finlay McWalterTalk 19:55, 19 October 2010 (UTC)[reply]
Thats great thanks for the info, also the error message is not being displayed anymore for me either. Mo ainm~Talk 20:04, 19 October 2010 (UTC)[reply]

Samsung mobile/pc cable

What cable do I need to sync a Samsung GT-E2121B to a PC? Thanks, DuncanHill (talk) 19:23, 19 October 2010 (UTC)[reply]

Samsung's support page for this phone is here, but I don't see any mention of such a cable in the (not very detailed manual). I do see the phone has BlueTooth, so you should be able to sync it over that. A little usb BlueTooth adapter should cost very much (and may be more cost effective than a cable). -- Finlay McWalterTalk 19:34, 19 October 2010 (UTC)[reply]
You meant shouldn't right? Nil Einne (talk) 19:46, 19 October 2010 (UTC)[reply]
Oops, yes. In the UK that means £10 or so. -- Finlay McWalterTalk 19:51, 19 October 2010 (UTC)[reply]
Thanks, I'll see about getting one of those then. I did email Samsung to ask them, but they said to ask retailers, but the retailers they suggested were places like Argos or Curry's, who wouldn't have a clue. DuncanHill (talk) 21:13, 19 October 2010 (UTC)[reply]
Before you do that, download and install the Samsung app that you'll be using to sync. Verify that it does have a connect-with-bluetooth option; I'd be very surprised (and disappointed) if it doesn't - the Nokia equivalent certainly does. The nice thing about having a bluetooth adapter is that it should work with any future phone you buy (rather than having to get a new cable for a new phone), it should work with friends' phones (so you could use it to get photos etc. off a visiting friend's phone), and you can use bluetooth accessories with the phone (for example, I used my little Nokia bluetooth headset with Skype on the PC). -- Finlay McWalterTalk 21:27, 19 October 2010 (UTC)[reply]
Thanks, yes the software does have a bluetooth option. DuncanHill (talk) 10:44, 21 October 2010 (UTC)[reply]
You should BTW be able to get a cheap Bluetooth device for under US$3 shipped from China/HK from a place like Buyincoins [16], DealExtreme [17] [18], Lightake [19], Kaidomain [20] or eBay. Can't comment on any customs problems although my memory is they don't care in the UK if it's under £10 or something and I don't think they'll care even though it's RF so could theoretically violate UK law on transmission power or frequencies or whater. Shipping will take a while of course (I normally get stuff in 1-2 weeks to NZ but I think UK can be longer and more importantly it's starting to get near busy season, I'm already reading of people complaining about long shipping times and I actually think I'm encountering it too). Nil Einne (talk) 10:17, 20 October 2010 (UTC)[reply]

October 20

Locking down a computer (in terms of anti-virus security)

Hello,

I'm attempting to help a relative who knows very little about computers configure their machine so that it's protected against viruses to the maximum reasonable extent possible (they've had multiple issues with viruses and, unfortunately, behaviour-based protection - i.e. don't open dubious e-mails and be careful about what sites you visit - probably won't work for a number of reasons I can't do anything about). For a starting point, I was planning to install Firefox (which is close enough to IE for them and their kids to be able to use it) with the Adblock Plus and NoScript addons and make it the default browser on the computer. However, I'd also like to add some sort of real-time virus protection (preferably something free) and I was wondering if there are any "best bets" as far as this is concerned. Some sort of internet parental control software might also be beneficial.

If anyone has any suggestions or comments regarding this, I'd appreciate them.

Thanks!

Hiram J. Hackenbacker (talk) 01:39, 20 October 2010 (UTC)[reply]

In Windows 7 there is parental controls I believe under Windows Live. FOr antivirus, you can have Avria. Basic protection, no realtime protection. For realtime you could try using Spybot SD., but my experience suggests that it is too technical for ome people.Sir Stupidity (talk) 02:09, 20 October 2010 (UTC)[reply]
This is the sort of situation in which I'd think about switching them to Linux, depending on what they use their computer for. Another product that you might want to look at is Sandboxie. -- BenRG (talk) 07:00, 20 October 2010 (UTC)[reply]
I doubt they could find their way around a Linux box - remember from the question that the relative doesn't know a whole lot about computers. —Jeremy (v^_^v PC/SP is a show-trial!) 07:13, 20 October 2010 (UTC)[reply]
Well, it depends. Some people never use their computers for anything but web browsing and email, and those people would barely notice the difference, especially if they were using Firefox and Thunderbird under Windows anyway. -- BenRG (talk) 07:23, 20 October 2010 (UTC)[reply]
The simplest solution would be to make them a regular user -- not an administrator. In Windows XP, you go to Start --> Control Panel --> User Accounts --> Change an account --> Change my account type. Before doing that, create another account that is an administrator that they can log into to install programs. The link to create an account is inside "User Accounts," too. Since only administrators are allowed to install programs, they won't be able to install any virii, either. Easier than installing Linux, huh? I did this for my friend. She uses Windows XP. Her kids kept infecting her computer with virii, so I limited her main account, and she hasn't gotten a virus since. That was a few years ago! I should mention that it's theoretically still possible to get a virus, even as a limited user. But this technique will stop the vast majority of them. And even if one gets through, it won't be able to cause much damage.--Best Dog Ever (talk) 07:30, 20 October 2010 (UTC)[reply]
That also applies to Windows 7. And if you do have Windows 7, maybe you should up the UAC level. Sir Stupidity (talk) 07:42, 20 October 2010 (UTC)[reply]
For realtime virus protection, I'd go with Microsoft Security Essentials. It tends to stay out of the way of the user and warnings are very clear. It's also free. As for the UAC level, I'd recommend putting it at the minimum so the user actually looks at the dialogs instead of clicking through when too many warnings pop up. Without being close by to do real tech support, completely locking down a computer tends to be somewhat counterproductive in my experience. Occasional warnings will be looked at and read, but when false positives are popping up all the time, the user will simply stop reading them and click through. 206.131.39.6 (talk) 15:34, 20 October 2010 (UTC)[reply]
I heartily recommend Best Dog Ever's suggestion. Non-admin accounts do a lot to limit malware. Comet Tuttle (talk) 16:15, 20 October 2010 (UTC)[reply]
I don't see why you get UAC all the time if you aren't a technical user. Note that if you are able to run fine in a non admin account, there's really no reason why UAC should be a problem. Nil Einne (talk) 20:57, 20 October 2010 (UTC)[reply]

VoIP

1. What is the main advantage of VoIP over PSTN telephony for users and service providers?
2. How is a packetised network different to a circuit switched network?
3. What equipment and software is required for users of VoIP?
4. Why do telephone numbers have to be matched to IP addresses, and how is this achieved?
5. What are three problems that can affect the quality of service to a VoIP call
6. What is the limitation of VoIP regarding emergency numbers?

–-115.178.29.142 (talk) 01:58, 20 October 2010 (UTC)[reply]

Please do your own homework.
Welcome to the Wikipedia Reference Desk. Your question appears to be a homework question. I apologize if this is a misinterpretation, but it is our aim here not to do people's homework for them, but to merely aid them in doing it themselves. Letting someone else do your homework does not help you learn nearly as much as doing it yourself. Please attempt to solve the problem or answer the question yourself first. If you need help with a specific part of your homework, feel free to tell us where you are stuck and ask for help. If you need help grasping the concept of a problem, by all means let us know. --Tagishsimon (talk) 02:10, 20 October 2010 (UTC)[reply]
But see also VoIP, PSTN, Circuit switching, packet switched network, quality of service --Tagishsimon (talk) 02:12, 20 October 2010 (UTC)[reply]

Alternative CSS scripts printing useless rubbish from a webpage?

If you go to this page and obtain a print-preview or otherwise copy and paste the page, additional fields appear which aren't visible on the page. I suppose this is to do with alternative CSS. Is there a simple way to print what appears on the screen (other than printing screenshots)? ----Seans Potato Business 08:46, 20 October 2010 (UTC)[reply]

[21] is probably a better link since I suspect quite a lot of people here don't belong to the Edinburgh university so can't use their EZproxy facility (it also isn't necessary in this case since the site isn't subscriber only) Nil Einne (talk) 10:28, 20 October 2010 (UTC)[reply]
One (rather long-winded and not-very-scalable) way would be to save the page locally (as "webpage, complete") and then edit the resulting HTML. The text that appears on printing has class="hidden", so 'hidden' is presumably defined differently in a stylesheet for print and display. You could just edit/replace class="hidden" to style="display:none". Alternatively it might be possible to use Firebug (web development) or similar tools to override the CSS settings. AndrewWTaylor (talk) 12:03, 20 October 2010 (UTC)[reply]

Downloading contents of a vBulletin Chatbox

Hello there,

I frequent a site where a lot of entertaining discussion goes on in a chatbox, which, however, is emptied every month or so. I was wondering if there is a way to download the contents of a chatbox in a non-manual way? The archive is basically [whateversite].com/misc.php?do=ccarc&page=y, with y being the archive page number, and the page numbers going up to 1900. I thought perhaps a site downloader might be able to do this sort of thing, but Im unsure on how to use one without it downloading the whole site, which would take weeks and weeks.

All the best,

--178.99.46.121 (talk) 10:45, 20 October 2010 (UTC)[reply]

With httrack you could specify to exclude all links except ones containing "*[whateversite].com/misc.php?do=ccarc&page=*" in the filter settings. It would then only download those pages and ignore everything else. 82.44.55.25 (talk) 11:05, 20 October 2010 (UTC)[reply]

iSCSI over DDR InfiniBand

Hi folks,

   I'm aware of the iSCSI protocol being routed over 10GbE networks, but I want to know whether it is possible (not where to get such a product) to send and receive iSCSI CDBs over DDR InfiniBand networks. And if so, whether this has been actually implemented.

   Thanks as always.

Content filter algorithms

Is it possible to find out the type of algorithms used by the content filters that are available to buy like Net Nanny or do the companies not allow you to see such things? Mo ainm~Talk 12:48, 20 October 2010 (UTC)[reply]

They use pattern matching (see regular expressions). They have lists that decide what is blocked (or allowed). You can download prefab lists from the company website or build your own. -- kainaw 13:22, 20 October 2010 (UTC)[reply]

Const pointer conversions

We know why int** can't be converted to const int**:

int *p;
const int ans=42,**qa;
qa=&p;    /* not allowed */
*qa=&ans; /* because this makes p point to a const int */
*p=0;     /* which we could then modify */

But why can't int** (or int*const*) be converted to const int*const*, since the target pointer could not then be redirected to a const int?

The practical reason for asking: I have a function that reads an Iliffe vector (which point is not negotiable).

int sum(const int *const *a) { /* or const int *const a[KNOWN] */
  int i,j,ret=0;
  for(i=0;i<KNOWN;++i)
    for(j=0;j<2*i+1;++j) ret+=a[i][j];
  return ret;
}

But I can't call it (without a warning or cast):

#define KNOWN 3
int flat[]={0,1,2,3,5,8,13,21,34},*const iv[]={flat,flat+1,flat+4};
++iv[0][0];
return sum(iv); /* warning: passing argument 1 of ‘sum’ from incompatible pointer type */

Since we want to modify the array in the function that owns it, we can't declare const int *const iv[]. What's the proper way to handle this? --Tardis (talk) 14:59, 20 October 2010 (UTC)[reply]

Generally these conversions aren't allowed because types like int * and int const * aren't required to have the same low-level representation. It's not even required that sizeof(int *) == sizeof(int const *), as far as I can tell. Just as it's safe to convert from int to double but not from int const * to double const *, so it's safe to const-qualify a pointer but not to const-qualify "underneath a pointer".
I don't know what to advise regarding your arrays. It is irritating, and I've had this problem myself. If you could switch to C++, a template function with an argument type of T* const* would solve your problem (with the added benefit of being able to sum over other element types). -- BenRG (talk) 19:51, 20 October 2010 (UTC)[reply]
C99 says that "pointers to qualified or unqualified versions of compatible types shall have the same representation and alignment requirements", so I take it that const int* and int* must be interconvertible in that sense. It also says that conversions may add a qualifier to the type from which a pointer type is derived, and that "the values stored in the original and converted pointers shall compare equal", but I don't think these help any. As for C++, I want to promise callers that sum() doesn't change the pointers or the values, and templating that way would only promise "sum() won't change the pointers, and won't change the values if you already can't". Better than just leaving the const out forever, of course, but it doesn't really solve the problem. --Tardis (talk) 21:01, 20 October 2010 (UTC)[reply]
I shouldn't have sounded so sure because I'm not, but it's my impression that the standard is meant to allow const int * to have more values than int *. For example, an 8086 implementation could put writable and unwritable objects in different segments and make int * a near pointer and const int * a far pointer (not that I've ever heard of an implementation that did that). The first passage you quoted is ambiguous; it says that the types can be qualified, but not necessarily that they can have different qualifiers (compare "pointers to integer or floating-point types that are compatible shall have the same representation and alignment requirements"). There are passages that might imply that converting from const int * to int * and back must yield the original value, but it's never completely clear (to me, anyway). Maybe declspec knows. I agree that my template solution mostly just sweeps the problem under the rug. -- BenRG (talk) 00:40, 21 October 2010 (UTC)[reply]

E-mailing newspaper articles

If I use a newspaper website button for e-mailing an article to a friend, does the newspaper keep a record of my e-mail address or the address of my friend?
Wavelength (talk) 22:23, 20 October 2010 (UTC)[reply]

Probably. Each newspaper is different and has different policies, so you would have to check the newspaper's Terms of Service or Terms of Use page to find out whether they discuss this issue. Comet Tuttle (talk) 22:28, 20 October 2010 (UTC)[reply]
I don't understand the need to use such buttons. You can email the URL to your friend. Sometimes it may be necessary to strip off personally-identifiable data, or session-IDs, or other items appended to the URL. When sending a URL, I strip it to as small as possible, then I always check the "cleaned" version to make sure it works before mailing it. Nimur (talk) 23:33, 20 October 2010 (UTC)[reply]

October 21

How to remove the HD?

From one of these...


...before disposal. Thanks, hydnjo (talk) 00:25, 21 October 2010 (UTC)[reply]

I know this is not the point, but are you sure you don't want to try selling one of those? They're quite sought after. Chevymontecarlo 06:24, 21 October 2010 (UTC)[reply]
Have you tried Googling "replace hard drive iMac G4"? There are quite a few tutorials. You need Torx #10 and #8 screwdrivers (which are non-standard unless you take Macs apart often, which I imagine you don't based on the question), but otherwise it looks pretty straightforward. --Mr.98 (talk) 13:50, 21 October 2010 (UTC)[reply]

C: Pointers to Pointers and other Pointer Issues

I'm really kind of confused with pointers in C. Let's say you malloc a blob of memory:

void * blob = malloc(sizeof(char *) + sizeof(int));

and you use the blob to hold two things like this: | a char * | integer value |

so blob would point to the memory adress of the beginning of the blob of malloc'd memory.

If you made a pointer to point to it:

void * pointToBob = bob;

Could you use bob and pointToBob interchangeably?

Or what if you had

void ** pointToBob = bob;

How could you used that?

I'm confused how you could possibly use a pointer to a pointer to change a value in the originally malloc'd blob. I'd appreciate any help with this problem and any sort of general explanations on the questions of pointers. I feel like I don't understand much more than "a pointer holds an adress to a place in memory". Thank you very much :) —Preceding unsigned comment added by Legolas52 (talkcontribs) 00:58, 21 October 2010 (UTC)[reply]

Am I safe in assuming that bob/Bob is everywhere a typo for blob/Blob? Assuming yes, the answer is that void * pointToBlob = blob; makes pointToBlob have the same type and value as blob. However, void ** pointToBlob = blob; will give you a compile warning, because a pointer to a pointer is not the same type as a pointer. But a more basic problem is that your malloc line is a thing that ought not to be done. In some systems, the "int" type must be aligned in a specific way in memory space, so it may not be possible to store an int at the place you think you are going to store it. This is simply bad code. Even if it works, referring to things in memory that has been allocated in this way is so ugly that I'm not even going to try to write it. If you want to store multiple different things in a single block of memory, create a struct to hold them. Looie496 (talk) 01:23, 21 October 2010 (UTC)[reply]
As Looie said, your malloc statement is not a permissible way to allocate a pointer and an int, because of alignment restrictions; trying to access the int might crash your program.
However, void ** pointToBlob = blob; is legal C and won't produce a warning, because C allows void * to be implicitly converted to any other pointer type (though C++ doesn't). There's no deep logic to this; it's just a special exception intended to make malloc easier to use. The result of this definition will be that pointToBlob will point to the same memory block as blob does, except that it will "think it's pointing to" a void *. You could then store a void * into the memory block through that pointer, even though you allocated space for a char *, because those pointer types happen to be guaranteed to have the same size. But that's probably not what you intended. If you wanted a pointer to the blob variable itself (which is a different thing from the memory you allocated), then you should have written pointToBlob = &blob instead of pointToBlob = blob.
Basically, the rules for pointers are straightforward: if you say &foo then you get a value that points to foo, if you say *p in an expression then you get the value of whatever p points to, and if you say *p = (whatever); then you change the value of whatever p points to. For example, if you wrote void ** pointToBlob = &blob;, then *pointToBlob = malloc(100); would be the same as blob = malloc(100); (they both write the result to the blob variable). But if you wrote void * pointToBlob = blob; and then pointToBlob = malloc(100);, you would be assigning to the variable pointToBlob, which is a different variable from blob, so blob would remain unchanged. Although those rules are simple, they're hard to think about. The reason seems to be that human beings are not good at separating the name of something from the thing itself. For example, what does pointToBlob mean? Do you intend it to point to the variable named "blob", or are you thinking of the memory you allocated as the "blob" that it points to? This kind of ambiguity is what makes pointers difficult. The good news is that it gets easier with practice. -- BenRG (talk) 02:16, 21 October 2010 (UTC)[reply]
As has been said, you can't use a pointer to point to both a char * and an int like that. You can, however, do it like this:
struct mystruct
{
  char *p;
  int i;
 };
 struct mystruct *blob = malloc(sizeof(struct mystruct));
You can then use blob->p and blob->i to refer to the char * and int values, assuming the malloc() succeeded. You can easily check this, because if malloc() fails, the resulting value will be a null pointer. JIP | Talk 12:09, 21 October 2010 (UTC)[reply]

compiling emacs

Hello. I am trying to compile emacs 23.2. After a successful ./configure, make gives me the following:

PS223:~/Downloads/emacs-23.2% make
cd lib-src; make all                            \
         CC='gcc' CFLAGS='-g -O2 -Wdeclaration-after-statement -Wno-pointer-sign  ' CPPFLAGS='-D_BSD_SOURCE  ' \
         LDFLAGS='-Wl,-znocombreloc  ' MAKE='make'
make[1]: Entering directory `/home/rksh/Downloads/emacs-23.2/lib-src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/rksh/Downloads/emacs-23.2/lib-src'
boot=bootstrap-emacs;                         \
       if [ ! -x "src/$boot" ]; then                                     \
           cd src; make all                                    \
             CC='gcc' CFLAGS='-g -O2 -Wdeclaration-after-statement -Wno-pointer-sign  ' CPPFLAGS='-D_BSD_SOURCE  '         \
             LDFLAGS='-Wl,-znocombreloc  ' MAKE='make' BOOTSTRAPEMACS="$boot"; \
       fi;
cd src; make all                            \
         CC='gcc' CFLAGS='-g -O2 -Wdeclaration-after-statement -Wno-pointer-sign  ' CPPFLAGS='-D_BSD_SOURCE  ' \
         LDFLAGS='-Wl,-znocombreloc  ' MAKE='make' BOOTSTRAPEMACS=""
make[1]: Entering directory `/home/rksh/Downloads/emacs-23.2/src'
make[1]: *** No rule to make target `/usr/local/include/gtk-2.0/gtk/gtk.h', needed by `dispnew.o'.  Stop.
make[1]: Leaving directory `/home/rksh/Downloads/emacs-23.2/src'
make: *** [src] Error 2
HPS223:~/Downloads/emacs-23.2% 

What is going on here? It looks like there needs to be a rule to make gtk.h, but this can't be right? Anyone got any idea how to get round this? Thanks, Robinh (talk) 08:58, 21 October 2010 (UTC)[reply]


have you installed the gtk development headers? (Or configure without gtk). The package is normally called gtk-dev (debian/ubuntu etc) or gtk-devel (redhat/mandrake etc). CS Miller (talk) 10:47, 21 October 2010 (UTC)[reply]
Thanks for this. I am on SuSe 11.3, and YAST isn't particularly clear (there are lots of gtk-type options, but checking them results in an incompatibility warning. How do I tell whether gtk-dev is installed? Thanks, Robinh (talk) 11:03, 21 October 2010 (UTC)[reply]
I've never used YaST, so I'm not sure how to check what packages are installed with it. However, this [22] seems to be a useful guide. The package you want is probably called libgtk-dev / libgtk-devel, now that I think about it. CS Miller (talk) 11:42, 21 October 2010 (UTC)[reply]
Got it!
Resolved
. Cheers, Robinh (talk) 11:54, 21 October 2010 (UTC)[reply]
Hmm, this really shouldn't have happened. The autoconf script that wrote configure should check for gtk headers (and version), and indeed when I configure emacs on Ubuntu I see it checking gtk headers, libraries, and associated things like Pango, Cairo, and Freetype. If these aren't found, or are of the wrong versions, it should be be configure that fails, not the make. If you can reproduce this on a fresh install of SuSe, that's a notifiable bug in the configure.in script. -- Finlay McWalterTalk 13:18, 21 October 2010 (UTC)[reply]
Hello Finlay. I too thought that configure would find any problems. The behaviour is not reproducible, following a 'make clean' which may have cleared out some problem file somewhere. Best wishes, Robinh (talk) 13:36, 21 October 2010 (UTC)[reply]

Minor problem with my LG Flatron

OK, so I've been having some non-critical yet annoying problems with my LCD display (a Flatron W1934S, to be specific). The overall image appears fine, but there are some wavy patterns jizzing up on my screen, which can be seen especially on a dark background. Is it because of an unstable AC connection or something? Blake Gripling (talk) 10:35, 21 October 2010 (UTC)[reply]

Noisy AC connection (perhaps from an electric motor on the same ring), loose AC connection, loose or damaged video cable, or source of RF interference near the display or the video cable. -- Finlay McWalterTalk 11:34, 21 October 2010 (UTC)[reply]
Apart from the above, and don't ask me how it works... but try adjusting your contrast. I had the same problem with a Dell monitor. Sandman30s (talk) 14:31, 21 October 2010 (UTC)[reply]

Blackberry 9500 Storm

Hi, I have my phone blacberry 9500 storm, was using zero line of france, turkey, I'm staying on the contract has expired, other operators çalıştıramadığımdan, mep2 code entered incorrectly 10 times, mep2 does not turn on, I can not enter the MEP code. please help. Thank you.

my adres= [email removed] —Preceding unsigned comment added by 88.224.127.41 (talk) 13:23, 21 October 2010 (UTC)[reply]

I've removed your email address, to prevent you getting spam on it. People will answer here, not by email. -- Finlay McWalterTalk 13:32, 21 October 2010 (UTC)[reply]

tsql

Hi! Why doesn't exist the 'end tran' keywords? the rollback statement must always immediatly follow the trasnsaction to rollback? t.i.a. --217.194.34.103 (talk) 14:47, 21 October 2010 (UTC)[reply]