Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Уга-уга12 (talk | contribs) at 03:23, 17 August 2012 (→‎Concurrency: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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:


August 12

Brother driver installation error message

Dear Wikipedians:

I am trying to install my brother DCP-7065DN drivers on my Windows 7 64 bit computer. But keeps on getting the following error message during the installation process:

File:Brother Error Message.png

What is going on?

Thanks,

L33th4x0r (talk) 02:14, 12 August 2012 (UTC)[reply]

Are you sure you are installing the correct version of the driver ? That 32 in the error message makes me think it might be a 32-bit versus 64-bit problem. Whichever version you are trying to install, I suggest you try the other. StuRat (talk) 03:01, 12 August 2012 (UTC)[reply]
  • If you have to ask, you should change your user name :-). Okay, sorry. That error message is generated by InstallShield, and all the information in it is specific to the Install script that Brother set up. Unless you can simply guess the problem, there is probably no way to figure it out except by contacting Brother's technical support. Looie496 (talk) 03:16, 12 August 2012 (UTC)[reply]
To follow up on that, IS026 indicates that this is version 26 of the InstallShield script, and MoveFileData indicates that the problem occurs when the installer attempts to move files to the place where they need to go. But without access to the script it is impossible to say what problem produces error code 32. Looie496 (talk) 15:59, 12 August 2012 (UTC)[reply]

Print screen and scroll lock key

What is the use of 'Print screen and scroll lock key' in computing? Sunny Singh (DAV) (talk) 02:27, 12 August 2012 (UTC)[reply]

Print Screen is quite useful on Windows PCs. It places a snapshot of the current screen in the graphics buffer, where it can be pasted with Edit + Paste into MS Paint and other applications.
Scroll Lock is less useful. It was originally used to pause a long scrolling list so you could read it, but few applications support this feature anymore (mainly because few applications produce a long scrolling list as output, since that's not very user friendly). More modern applications tend to divide up the output into pages for you, and give you controls to flip through the pages. StuRat (talk) 02:55, 12 August 2012 (UTC)[reply]
Your description of Scroll Lock is actually a description of Pause. As the scroll lock article says, its purpose was to toggle the arrow keys between their usual function (command editing, etc.) and scrolling the whole buffer. Most software doesn't support it, which is unfortunate since it's actually kind of useful. The Win32 terminal called "Console" does support it for viewing the scrollback buffer. -- BenRG (talk) 05:17, 12 August 2012 (UTC)[reply]
OK, thanks for the clarification. StuRat (talk) 08:49, 12 August 2012 (UTC)[reply]

Follow up question: If I press Print screen key, where should I go to get that snapshot. I use Windows XP. Provide me the location of that snapshot. Sunny Singh (DAV) (talk) 06:52, 12 August 2012 (UTC)[reply]

As StuRat said above, it's in the graphics buffer, so just open any graphics program (such as "Paint" or any photo editing or graphics software), and paste into that program. You can then crop the image to remove any borders from the part of the snapshot you wanted. Dbfirs 07:44, 12 August 2012 (UTC)[reply]
If you have a print screen utility, such as Gadwin's aptly named "PrintScreen", you can use the print screen key to call up the program. (Not trying to advertise Gadwin's product, I just happen to use that utility instead of some other print screen application). Dismas|(talk) 09:49, 12 August 2012 (UTC)[reply]
Scroll lock is also often used as the dead key to mimic the Fn key of a laptop. This is particularly useful if you use your laptop on a docking station with the lid closed. Output is through an external screen attached to the docking station, and input is via external keyboard and mouse connected to the docking station. So, when my laptop is at work, I put it on the docking station kmeeping the lid closed, and press Scroll-Lock and F8 to get the display to appear on my external screen (I'm sure it used to switch automatically until our IT dept fiddled with the settings!). Astronaut (talk) 13:05, 12 August 2012 (UTC)[reply]
On the subject of print screen, pressing Alt-PrntScrn copies only the currently active window into the graphics buffer. Usually saves you some image cropping. Astronaut (talk) 13:07, 12 August 2012 (UTC)[reply]
What people are calling the "graphics buffer" is really called the clipboard. -- BenRG (talk) 19:03, 12 August 2012 (UTC)[reply]
But that term is confusing, since there's also a text clipboard. StuRat (talk) 02:37, 13 August 2012 (UTC)[reply]
Don't they work the same way? If I highlight text and press CTRL-C, and immediately following that I press Print Screen, I find that CTRL-V in Paint produces an image of the screen (just like I'd expect), but CTRL-V in Notepad does nothing and CTRL-V in Word puts in a miniature screenshot. It's the same as if I copy a file from one folder to another: the clipboard loses everything that was on it before, retaining only the most recently copied thing. Nyttend (talk) 04:06, 13 August 2012 (UTC)[reply]
Perhaps they are stored in the same location, but that doesn't make them the same thing. One is text and the other is a bitmap. StuRat (talk) 04:12, 13 August 2012 (UTC)[reply]
That I understand, but how many clipboards are there? Nyttend (talk) 04:29, 13 August 2012 (UTC)[reply]
There's one system clipboard. When you cut/copy an image to it, it holds the image. When you cut/copy text to it, it holds text. It's never called "the graphics buffer" or "the text buffer" depending on what it currently contains. That would be confusing. -- BenRG (talk) 07:04, 13 August 2012 (UTC)[reply]
Seems less confusing to me, since it specifies the current contents, while "the clipboard" does not. StuRat (talk) 07:08, 13 August 2012 (UTC)[reply]
The clipboard holds whatever you cut/copy. It's not limited to text or graphics - it can include formatting information (eg bold, italic, indentation etc, if you copy text from a word-processor) or even (conceptually) a file. When you copy cut/copy/paste a file the location of the file (but not the actual file contents) is stored in the clipboard. Mitch Ames (talk) 12:35, 13 August 2012 (UTC)[reply]
It comes down to referring to the container or the contents. In real life, would you say "bring me the milk"/"bring me the ketchup" or "bring me the container" ? StuRat (talk) 21:29, 13 August 2012 (UTC)[reply]
Since you're placing your screenshot "in the graphics buffer", your grammar makes it sound as if you're referring to the container. In real life, if you're weird enough to put ketchup and milk in the same container at different times, "put your liquid in the container" would be equivalent. Nyttend (talk) 01:44, 14 August 2012 (UTC)[reply]
To refine my analogy a bit, let's say you have a pitcher which you sometimes use to hold milk and sometimes orange juice. If sending somebody to get it out of the refrigerator, I would say "hand me the milk"/"hand me the orange juice", or perhaps "hand me the milk pitcher"/"hand me the orange juice pitcher". Yes, it's the same container no matter what is inside, but just saying "hand me the pitcher" might result in getting the wrong thing, on occasion, if it doesn't contain what I thought it did. So, might as well be as specific as possible. StuRat (talk) 20:56, 14 August 2012 (UTC)[reply]
In Microsoft Excel the Scroll lock key toggles your cursor keys from moving between cells to moving the whole sheet without changing the selected cell. Zunaid 15:23, 13 August 2012 (UTC)[reply]

Relay server?

I'm seeking an appropriate wikilink for Relay server, in the sense of a network-connected communication server which acts as an intermediary, simultaneously for two remote client/servers. It's not about IRC. I was thinking there would already be something for Relay (networking). --Lexein (talk) 04:21, 12 August 2012 (UTC)[reply]

Packet forwarding, maybe? RudolfRed (talk) 05:02, 12 August 2012 (UTC)[reply]
Packet forwarding would be a transparent version... also any sort of tunneling or VPN would act as a "relay" in this sense. What specific application are you looking for? In other words, what are you trying to accomplish by "relaying" it? Shadowjams (talk) 05:39, 12 August 2012 (UTC)[reply]
Sorry, I was working on Bitblinder. Source's description used the words relay server. --Lexein (talk) 06:08, 12 August 2012 (UTC)[reply]

You mean a proxy server? 67.122.211.84 (talk) 23:43, 12 August 2012 (UTC)[reply]

Very possibly so, but the developers didn't describe it as such, nor have the other sources. I went with Packet forwarding anyways; if you feel strongly about proxy server, I won't revert it. --Lexein (talk) 07:07, 13 August 2012 (UTC)[reply]

learning python: for in loops

The Python for...in loop does not use a loop counter, but is there a pythonic way to get the index number of an item of the iterable (for example, position of a name in a sorted list of names)? I understand range(len(iterable)) is unpythonic and sometimes I may only need to get the index number for a small percentage of items in a large iterable. — Preceding unsigned comment added by 220.255.2.49 (talk) 09:56, 12 August 2012 (UTC)[reply]

Use the enumerate function:
       for index,item in enumerate(myiterable)
This is better than range(len(iterable)) for more than just style reasons - some iterables don't have a length - you can iterate on them until they're exhausted, but they don't know at the beginning how long that will be. Take this rather contrived iterable:
import random

class RandIterable(object):
    def __iter__(self):
        return self

    def next(self):
        v = random.randint(0,30)
        if v==0:
            raise StopIteration()
        else:
            return v

for i,item in enumerate(RandIterable()):
    print i,item
It generates random integers for a while, and then stops. When you create it, it doesn't know how many integers it will generate, so asking it its "length" wouldn't be meaningful. -- Finlay McWalterTalk 10:38, 12 August 2012 (UTC)[reply]

THANKS! — Preceding unsigned comment added by 220.255.2.94 (talk) 12:19, 12 August 2012 (UTC)[reply]

Inequality Involving Kolmogorov Complexity.

Show that --150.203.114.14 (talk) 10:25, 12 August 2012 (UTC)[reply]

This looks like a homework problem, so please say what you have tried so far and where you are stuck. It would also help if you explained the notation. Obviously K(x) is the Kolmogorov complexity, but the other letters' meanings aren't so clear. The article Kolmogorov complexity may of course be helpful to you as well. 67.122.211.84 (talk) 23:45, 12 August 2012 (UTC)[reply]

Is it possible to handle errors of file_get_contents in PHP?

I'm trying to handle all types of errors, like convention timed out, SSL errors, DNS error, or served refused connection, but I can't seem to find a way to do it... Maybe there is a better function to do this, I'm using php5 in windows7, thanks. 190.158.212.204 (talk) 16:18, 12 August 2012 (UTC)[reply]

You should be able to install a custom error handler with set_error_handler() and then make decisions based on the errno that your handler gets. I don't know how distinguishable all those different failure families you're worried about are just by errno, but hopefully that gets you more useful information that just "False". -- Finlay McWalterTalk 16:37, 12 August 2012 (UTC)[reply]
On experimenting with this, I see I've misled you a bit above. The $errno reported to the custom handler is a PHP error level constant, not the libc errno - so most of those errors you care about will all be E_WARNING. $errstr is properly informative, so I guess you can parse that (yuk). I don't know a way to access the real OS errno. -- Finlay McWalterTalk 17:59, 12 August 2012 (UTC)[reply]

proxie

how do i set up proxies on my home pc. — Preceding unsigned comment added by 205.142.178.36 (talk) 17:45, 12 August 2012 (UTC)[reply]

It depends what you mean by "set up". Are you sure you wish to turn your PC into a proxy server? (That's not the same thing as using a proxy: the former is tricky, the latter easy.) Either way, I suggest you use Google, it's a much written about topic. - Jarry1250 [Deliberation needed] 19:26, 12 August 2012 (UTC)[reply]
you should read the wikipedia article — Preceding unsigned comment added by 190.158.212.204 (talk) 00:23, 13 August 2012 (UTC)[reply]

Need help with infobox

I'm trying to create the infobox for roads on another wiki, but it shows "}}" at the top when there should be nothing. It works fine here. Velociraptor888 19:58, 12 August 2012 (UTC)[reply]

So either the infobox code differs, or the wiki backends. ¦ Reisio (talk) 20:11, 12 August 2012 (UTC)[reply]


kubuntu screen refresh problem

Hi. kubuntu 12.04, HP EliteBook 8560, with 2GB ram. I am having problems with windows not redrawing themselves. If I move a window around I can see parts of the windows behind it, and the fragmented bits of image stay there for ages. It's really annoying. I thought at first it was the applications not behaving themselves, but all the apps do it (Firefox, emacs, okular etc etc). I am not 100% sure, but I don't recall this happening with kubuntu 11. The machine is not sluggish at all in any other respect. So, what's going on, and secondly, can anyone suggest how to minimize this problem? Robinh (talk) 23:20, 12 August 2012 (UTC)[reply]

This happened after upgrading an existing Kubuntu installation? Looie496 (talk) 00:39, 13 August 2012 (UTC)[reply]
yes, I think so (at least it wasn't a serious problem on the same machine in kubuntu 11 IIRC). Robinh (talk) 02:28, 13 August 2012 (UTC)[reply]
Then it's probably to do with a less than optimal (for your hardware, for whatever reason): graphics driver, kernel, window manager, or X versions (in order of likelihood). You'll resolve this much faster by going to http://webchat.freenode.net/?nick=redrawingBug&channels=#ubuntu ¦ Reisio (talk) 21:05, 13 August 2012 (UTC)[reply]
(OP) thanks for this Resio. I've got zero experience of this kind of webchat. After the cachpa, it seemed to know what hardware I was on. Can I just type my question in and not get flamed? Robinh (talk) 22:44, 13 August 2012 (UTC)[reply]
It knows what your browser knows, which is normal. If it says '#ubuntu' at the top in black text on white (or off white), then yes, just type your question. The ops are pretty picky in there about flaming, but you should ignore such things regardless. :) ¦ Reisio (talk) 23:03, 13 August 2012 (UTC)[reply]


August 13

Force http (unsecure) connection.

Firefox redirects me to https, (No, the site doesn't do it), and I'm a bit frustrated, with https I start to get all kind of errors, images load slower, content load slower, captchas don't work, or connection times out (Also, it's easier to debug problems), instead with http, it works just fine, google chrome doesn't force https, so the page I'm working works just fine, I don't mind at all if it's unencrypted, how I can stop this behavior? 190.158.212.204 (talk) 00:08, 13 August 2012 (UTC)[reply]

Firefox doesn't just decide to force you to use https when you and the site say otherwise. I'd guess you have a security-enhancing extension like HTTPS everywhere - these kind of things typically have exceptions that allow you to disable them for given websites. You can run Firefox in safe mode (with all extensions disabled) to confirm that the behaviour you don't like is the product of an extension. -- Finlay McWalterTalk 00:18, 13 August 2012 (UTC)[reply]
It worked..... That was fast, thank you. 190.158.212.204 (talk) 00:27, 13 August 2012 (UTC)[reply]
Ummm, I disabled all my extensions and quited safe mode, it started using https again, what can cause this? 190.158.212.204 (talk) 00:31, 13 August 2012 (UTC)[reply]
You may have to enable extensions and plugins one-at-a-time until you figure out which one it is that's "helping" like this. If you're like me you probably have a dozen or two to wade through ;( It's probably one of the security-type ones: perhaps the toolbar associated with an anti-virus product, for example. -- Finlay McWalterTalk 00:35, 13 August 2012 (UTC)[reply]
Note that if I understand the OP correctly, they disabled all their extensions and ran it without any extentions enabled (but not in safe mode) but it still uses HTTPS. This suggests an extension is not causing the problem but for some reason safemode fixes it, I suspect the bugzilla below describes the problem. If so the solutions seem to be either change browser, or delete all https variants of the site from the history. Nil Einne (talk) 20:19, 13 August 2012 (UTC)[reply]
What extensions do you have installed, and at which site(s) are you having these problems with images loading slowly, etc.? There are pretty good reasons to prefer https in general. -- BenRG (talk) 16:53, 13 August 2012 (UTC)[reply]

Actually, Firefox 14 introduced this "feature". Here's the bugzilla report. From what I can see, they don't seem in any hurry to change it back. Another possible reason for you being forced onto https would be if the site was SPDY enabled. To turn this off, go to about:config in the address bar, search for network.http.spdy.enabled and change it to false. In my test just now this worked in preventing Firefox from forcing a https connection 92.233.64.26 (talk) 17:13, 13 August 2012 (UTC)[reply]

Yes, it did the job. Apparently!! I had to force http using a proxy that only supports http. 190.158.212.204 (talk) 21:31, 13 August 2012 (UTC)[reply]

Demonoid

Whatever happened to http://www.demonoid.me/ ? 124.253.63.168 (talk) 06:37, 13 August 2012 (UTC)[reply]

They were raided and shut down; the Demonoid domains have been put up for sale. --Lexein (talk) 07:00, 13 August 2012 (UTC)[reply]
I ask myself why a government, in the case the Ukranian, needs to launch a DDoS. Wouldn't it be easier to send the police and close the server, even if you only have a ridiculous reason to that? Comploose (talk) 14:22, 13 August 2012 (UTC)[reply]
What? The link which isn't exactly friendly to the Ukranian government, doesn't even hint that perhaps they were involved in the DDoS or the hacking that allegedly followed. Nil Einne (talk) 20:24, 13 August 2012 (UTC)[reply]
What what? I didn't say the link say that. I know that the Ukranian government is being accused of the DDoS, probably to deplete Demonoid-backers from funds. Maybe I should have respected the presumption of innocence, and said "possible the Ukranian government." Comploose (talk) 21:12, 13 August 2012 (UTC)[reply]
But none of the links provided thus far make the accusation, if you're going to bring random claims in to the discussion which no one else has mentioned yet, it would be best if you bring sources to back it up, this is the RD. Or else make it clear it's your own random thought not something actually discussed in sources (i.e. offtopic) or at least if the thing really did appear in sourced but you can't be bothered linking to them say something to make this clear, particularly when sources have already been provided (sources which would seem conducive to such ideas) which do not discuss the random things you're now bringing in to the discussion. Nil Einne (talk) 19:29, 14 August 2012 (UTC)[reply]

Glade Interface Designer and Python with PyGTK~(or whatever)

Is this combination somehow strange for designing GUIs? All the tutorials that I find are kind of +5 years old, and I wonder if everyone is simply using another route to design platform independent GUIs for Python programs (which is my intention). Comploose (talk) 13:06, 13 August 2012 (UTC)[reply]

It's a perfectly sensible option to just construct the UI with code yourself. Most of the python-gtk utilities shipped with Debian/Ubuntu seem to work this way. -- Finlay McWalterTalk 13:34, 13 August 2012 (UTC)[reply]
For general platform independence, you may consider not using a client gui toolkit, but building the app on a lightweight web framework like web.py running a local web server, and doing the GUI in HTML, CSS, and JavaScript. It's about the same degree of work as doing it in GTK or QT, and you can build a pretty rich UI with a toolkit like Dojo or jQuery. One advantage is that, if you later decide you want it to be network accessible (e.g. remote control from a cellphone) then the GUI is ready for that. -- Finlay McWalterTalk 13:59, 13 August 2012 (UTC)[reply]
Sound like a good idea. I'll take a look at Dojo and JQuery. Comploose (talk) 14:17, 13 August 2012 (UTC)[reply]

Best way of passing text/html to JavaScript from php

What could be the best way to store text, or to give text/html to javascript, Should I put them in css hidden <textarea> tags?? or encoding everything?, Thanks 190.60.93.218 (talk) 13:23, 13 August 2012 (UTC)[reply]

I'd have a separate resource (still generated by php) and have the javascript pull that with a XMLHttpRequest. Personally I'd encode it in JSON rather than XML and use the ready-made stuff in frameworks like jquery to decode that JSON. The great advantage of this is that you can have the javascript periodically refresh just the data (and then make changes to the page accordingly) without having to re-pull the page, and crucially without refreshing the page. -- Finlay McWalterTalk 13:27, 13 August 2012 (UTC)[reply]
I'm not sure there is one "best way" — it really depends on what you're trying to do here. Finlay's suggestion is a good one but requires you to re-write your Javascript and perhaps your PHP to make use of this option. Hidden TEXTAREAs are probably the worst way, though — you're relying on CSS compliance not to have your page fall apart from a semantic point of view, which is not a good way to do things (there are lots of good reasons that a user may be overriding your stylesheet settings). If you need hidden storage space, use INPUT TYPE=HIDDEN or just big Javascript string variables. --Mr.98 (talk) 13:33, 13 August 2012 (UTC)[reply]

How can I back up my mp3 collection to an external harddrive?

I have a Western Digital hard disk that I'd like to put my mp3s onto. I have been doing this manually so far but I'd just like a peice of software that searches for new folders I've added or changes to existing files without having to back up all the files from scratch each time. Preferably free software. Any pointers? — Preceding unsigned comment added by 77.100.75.68 (talk) 20:50, 13 August 2012 (UTC)[reply]

List of backup software ¦ Reisio (talk) 21:09, 13 August 2012 (UTC)[reply]
Robocopy Mitch Ames (talk) 11:29, 14 August 2012 (UTC)[reply]

Problem with serialising time stamps to XML in C#

I ran into a pretty difficult problem at work. We are developing a .NET application in C#, which sends SOAP messages to our customer's web service (which is beyond our control). Part of the SOAP message includes time stamps serialised in the ISO 8601 format, in the form "YYYY-MM-DDTHH:MI+NN", for example "2012-08-13T23:44+03". This serialisation is specified with an <xsd:element> node in the web service's WSDL description, with a type designator of "xs:dateTime".

The problem is this: When a transition from Daylight Saving Time to normal time occurs, our system provides the following kind of time stamps:

2012-10-28T03:00+03
2012-10-28T04:00+02
2012-10-28T05:00+02
2012-10-28T06:00+02

Our customer wants the change in the UTC shift to occur one hour later, such as:

2012-10-28T03:00+03
2012-10-28T04:00+03
2012-10-28T05:00+02
2012-10-28T06:00+02

I can't figure out how to do this. The serialisation to XML in the SOAP message occurs in the .NET internal libraries, I only get to feed a System.DateTime object into a pre-generated proxy class, and then the whole serialisation and SOAP message sending happens via a single method call to the .NET internal libraries. I have tried to approach the problem by creating a custom TimeZoneInfo object, which is set to 3 hours ahead of UTC with no DST change rules, and supplying the "2012-10-28T04:00+02" time stamp converted to this time zone instead. This resulted in the following:

2012-10-28T05:00

That it's one hour too late isn't the problem, I can fix that with a single method call. The problem is that it doesn't have any "+NN" information after it. Is there some way to force this to be appended, when I only have control over the DateTime object and not the serialisation code? I do have access to the source code of the pre-generated proxy class and the WSDL description on our end if that helps. JIP | Talk 20:52, 13 August 2012 (UTC)[reply]

Can't you just add in a kludge where you check for any timestamps in the one hour range you are looking for, and change them by an hour ? While you're at it, your program can add in the +NN info, too. I'd normally say it's a bad idea to fake the time like this, but, it seems, you've already decided to do that by changing the time for an hour. But, whatever kludge you put into effect should either be removed after the time change, or should be made to work for all future time changes, too.
However, this entire requests seems rather questionable to me. If you have the authority to refuse, you should. This seems to risk major problems for very little benefit. If forced to do it, be sure you can document that management forced you, in case there's a problem.StuRat (talk) 21:16, 13 August 2012 (UTC)[reply]
I'm confused. Your first list jumps directly from 03:00+03 to 04:00+02, which is a difference of two hours. The second list skips a different hour. Are you deliberately skipping one hour, and the customer is asking you to skip a different hour? Also, the DST-to-normal transition usually goes from 2:59 to 2:00, which means even your 03:00+03 is wrong. It should be 02:00+03, 02:00+02, 03:00+02, ... Please clarify what the customer actually wants. -- BenRG (talk) 01:10, 14 August 2012 (UTC)[reply]
I don't remember the exact output, I was writing from memory. But the essence is the same - the transition from +03 to +02 comes automatically when DST stops, but our customer wants it to happen at a different hour. I think part of the problem is that the hour our customer wants to be reported (2012-10-28T04:00+03 in my example above) doesn't even really exist. So merely shifting the time stamps by adding or removing hours won't fix the problem, the transition from +03 to +02 will happen at the same time anyway. User:StuRat said: "While you're at it, your program can add in the +NN info, too." But how can I do this? JIP | Talk 04:58, 14 August 2012 (UTC)[reply]
I'm talking about creating a fake time in a character string, where you can change it to say whatever time you want it to be, real or imaginary. StuRat (talk) 07:07, 14 August 2012 (UTC)[reply]
What's the reason for your customers request? The only reason I can think of is they are in a different time zone and having yours and theirs dst change coincide so the time difference stays constant is the easiest option... Ssscienccce (talk) 12:10, 14 August 2012 (UTC)[reply]
I managed to solve the problem by changing the corresponding field I need to set in the pre-generated proxy class from System.DateTime to System.String and then generating and supplying the ISO 8601 representation by hand. I didn't need to change the WSDL at all. I tested sending a request to our customer's web service and it seemed to work OK, hopefully tomorrow I'll hear from them if it worked. JIP | Talk 15:55, 14 August 2012 (UTC)[reply]
So, did it work ? StuRat (talk) 04:42, 17 August 2012 (UTC)[reply]


August 14

Audio file creation

How can I create an audio file of a phrase? Let that phrase be "Best in the World". Sunny Singh (DAV) (talk) 13:46, 14 August 2012 (UTC)[reply]

Record it from a microphone? Use a text-to-speech engine? http://www2.research.att.com/~ttsweb/tts/demo.php? ¦ Reisio (talk) 17:54, 14 August 2012 (UTC)[reply]

Remote pinging

I need to ping ~10 ip addresses 24/7, and this needs to be done remotely (ie not from my own connection). It would need to send only one ping every minute, but must continue 24/7 unattended. I have been unable to find any websites offering such a service for free (many offer it for a price, and some offer a free version but only for 1 ip address at not are the frequency I need)

Is is possible to write a php script which can do this natively (ie without calling any OS specific programs like ping.exe), and then host it on a free webhost?

I have already written a Windows batch script which does what I need, but finding a free Windows host is not easy, and while I could of course just run it on my own computer the results would not be useful to me because I am trying to diagnose a local ISP network error and when it happens I lose all internet connectivity.

Thanks for your help 92.233.64.26 (talk) 15:22, 14 August 2012 (UTC)[reply]

I wonder if codepad can be any help. I haven't tried this site, so I don't know its limitations, but it looks like you could write some code in, say, python, to ping your addresses for 24 hours, and then run it there (with "private" ticked, presumably).  Card Zero  (talk) 15:31, 14 August 2012 (UTC)[reply]
At least in python, codepad does not support the ICMP library nor RAW sockets. -- Finlay McWalterTalk 16:01, 14 August 2012 (UTC)[reply]
It's worth noting that only root can ping. Your options, then, are running the usual /bin/ping program, which is setuid root, or running your Python script as root. I doubt the latter is allowed on any free webhosting services! Marnanel (talk) 04:56, 17 August 2012 (UTC)[reply]

Will this RAM fit (and work) in this motherboard?

Hi there,

I have 2 computers, both DELL, both have a 0G1548 motherboard. Both have (according to SIW) 2 RAM slots and a maximum capacity of 1024MB (I don't know if that's in total for each slot, or total for each machine). Both computers have a stick of DDR (PC2700) 256MB 166MHz in each slot, giving each computer 512MB of RAM.

I've been given 2 sticks of RAM. The first is a 1GB stick of DDR2-533 DIMM and the second is a stick of 512MB 1Rx8 PC2 4200U - 444 - 12 - ZZ.

I'd like, if possible, to increase the RAM in one or both computers - will either of my 'new' RAM sticks fit/work in the new machines? If so, what's the best combination? Should I put the 1GB in one machine and the 512 in the other (with a 256 in the second slot)?

Any and all advice gratefully received, especially if it's in words of one syllable.

thanks. — Preceding unsigned comment added by 2.97.223.11 (talk) 16:55, 14 August 2012 (UTC)[reply]

For starters, the limit could be real or it could be unnecessarily implemented by an outdated BIOS or an economy version of a certain operating system—worth a check. Regardless, you might be able to get dirt cheap RAM (it's mostly a crap shoot what will be particularly cheap at any given time) at http://crucial.com/ (will also know what the limit likely is) or the like. Keep in mind (when you consider how much time / money you're going to spend on this) that an entire new computer in the USA with 2-4GB of RAM (>2GHz proc and even dedicated graphics) can be had for around $200-300 (maybe an extra $50 for a laptop), . ¦ Reisio (talk) 18:03, 14 August 2012 (UTC)[reply]
If the RAM fits it should work, and it won't hurt anything to try. However, it sounds like you've been given 2 sticks of DDR2 and your PCs take plain old DDR, so they won't fit. 209.131.76.183 (talk) 19:53, 14 August 2012 (UTC)[reply]

nVIdia Output Specification

Heya,

I've got a bit of a question regarding my nvidia 540m graphics card. I can't seem to find any specifications online that tell me whether or not it can output a RGB component signal if adapted from a HMDI or VGA port. I'm wanting to find this out before I go about buying an adapter. Thanks in advance, Sazea (talk) 17:45, 14 August 2012 (UTC)[reply]

Like for an old TV/system? Worst case you might need a little box to convert the signal to TV-out, they can be had for $20-30 on newegg, amazon, etc.. ¦ Reisio (talk) 18:08, 14 August 2012 (UTC)[reply]
The worst case as I see it would be buying a simple adapter for the two, finding out it doesn't work, then buying a box. I'm not sure if there's information anywhere that says whether or not a specific graphics card can output a specific signal or whether it's up to the hardware, software or both to convert it. Adapter retailers seem to think that this information exists, and I'm interested to know if it does. But I will keep a converter in mind, should it not be able to. Sazea (talk) 21:42, 14 August 2012 (UTC)[reply]

Not enough room to copy onto a hard drive ... but there IS enough room.

I need to copy a 28GB folder (it is an ArcGIS geodatabase that appears within ArcGIS as one .gdb file but is really a folder of many files) from a portable hard drive to my computer's hard drive. The latter says it has over 100GB of free space, and it is a distinct physical drive, rather than a partition. The process keeps failing because "there is not enough space" on the destination. But there is. Honestly. Why does this happen and what should I do? Tom Haythornthwaite 19:18, 14 August 2012 (UTC) — Preceding unsigned comment added by Hayttom (talkcontribs)

Does the directory you're trying to copy have sparse or file system (e.g. NTFS) compressed files? Nil Einne (talk) 19:26, 14 August 2012 (UTC)[reply]
BTW I forgot to mention on Windows you should be able to tell if this is likely to be a problem by comparing the size and size on disk as recommended by 92 below. (Clusters could be a problem although it would have to be fairly extreme to be the only problem given the sizes involved.) Nil Einne (talk) 21:23, 14 August 2012 (UTC)[reply]
The standard Windows (assuming you're using Windows, you didn't say) copy system is quite bad, I would recommend using FastCopy for anything over 1GB. Also, depending on how many files you're talking about and how small they are, it is possible that their "size on disk" is more than their actual size due to the way file systems allocate clusters. 92.233.64.26 (talk) 19:55, 14 August 2012 (UTC)[reply]
You might want to try copying a few files at a time. This will do two things for you:
1) If the copy function is just defective and not able to handle a job that big, you can bypass that problem.
2) If there is a corrupted file which the system thinks is larger than it really is, this will help you identify that file. StuRat (talk) 20:49, 14 August 2012 (UTC)[reply]
This might be reaching here but is it possible that the OP will run out of inodes if the copy goes through and is therefore stopped before it can begin while giving a misleading error message? I'm aware that inodes are used on *nix systems. Does Windows have something similar to inodes? Dismas|(talk) 20:56, 14 August 2012 (UTC)[reply]
NTFS's MFT records are similar to inodes, but the MFT grows as needed so it's impossible to run out. FAT had a fixed-size root directory which could fill up and produce a disk full error, but FAT32 and NTFS don't have that problem. Filesystem corruption is a likely culprit—run chkdsk or fsck. -- BenRG (talk) 06:30, 15 August 2012 (UTC)[reply]
  • As others have suggested, it is impossible to answer this question usefully without knowing your operating system. It would also be helpful for you to give the specific wording of the error message you received. Looie496 (talk) 04:13, 15 August 2012 (UTC)[reply]

[OP] Sorry... Windows 7. Our IT person did something to the destination drive - I heard him mumbling about FAT - and then the copy worked. — Preceding unsigned comment added by Hayttom (talkcontribs) 15:36, 16 August 2012 (UTC)[reply]

Glad to hear it. I'll mark this Q resolved. StuRat (talk) 23:37, 17 August 2012 (UTC)[reply]
Resolved

traceroute

I did a traceroute to the site mempsimoiria.datnode.net and its domain name does not match the dns records and it not even a valid domain name.

"debian.more.like.plebian.amirite"

Can you explain this to me please? 91.122.82.15 (talk) 20:44, 14 August 2012 (UTC)[reply]

There are address records for looking up IP numbers, in this case 206.195.167.199.in-addr.arpa name resolved to debian.more.like.plebian.amirite. The forward lookup does not match the reverse lookup. Traceroute looks up the IP numbers it comes across by default. Use -n if you don't want to see names resolved for the numbers. Graeme Bartlett (talk) 22:18, 14 August 2012 (UTC)[reply]
Plebs.... :p 190.158.212.204 (talk) 15:46, 15 August 2012 (UTC)[reply]

Help me find a FB app: Matches me to a list of users with the most mutual interests.

I must have "liked" over 1,000 fanpages by now. If there's an app out there that matches other users of that app with whatever apps I like, then ranks me against other users with the most mutual interests, then I would like to subscribe to said app because it could quite possibly help me find the love of my life.

Now, what Facebook app does something that fits anything close to my description?

If this can't be on Facebook, what is the best off-FB app that does this? Thanks. --70.179.170.114 (talk) 21:51, 14 August 2012 (UTC)[reply]

There are lots of online dating sites that try to match people with mutual interests. Facebook is not really set up for this for privacy reasons. There are quite a few Facebook dating apps, I believe, but I'm not sure any of them can correlate by mutual "liked" interests — there may be security issues with such a scheme. --Mr.98 (talk) 13:05, 15 August 2012 (UTC)[reply]
I think I remember seeing something like this on somewhere like Late Night with Jimmy Fallon, but I cannot for the life of me remember its name to see if it does what you want or if it's available to the public yet. It started with "Air", I think. - Purplewowies (talk) 16:49, 16 August 2012 (UTC)[reply]

August 15

I am Naveen Ganesan

how i insert an image in user page...? pls anyone help me in clear steps....? — Preceding unsigned comment added by Naveen Ganeasn (talkcontribs) 03:28, 15 August 2012 (UTC)[reply]

Please ask this question at the Help desk, WP:HELPDESK. That is the place for questions about how to use Wikipedia. Looie496 (talk) 04:09, 15 August 2012 (UTC)[reply]

Regex and sed

I have an html file that has a table in it. The table has a number of entries such as "S1234A56" or "S123AA45". They all start with S, have 3-4 digits, 1-2 letters, and a final 2 digits. They are all exactly 8 characters long. I need to change all of them so that the string is put into a URL. I was hoping to just use a quick Perl script on my Linux machine to make all the substitutions but I'm stuck on how to write the sed command. Will I have to use escapes for all the non-alphanumerics in the URL? Or can I wrap it in something that will pass it without escapes? Right now, I've got something along the lines of

sed "s%S\d\{3,4\}\a\{1,2\}\d\{2\}%<a href="https://www.someurl.com/foo.pl?id=MYSTRING>MYSTRING</a>%"

And replacing MYSTRING with the regex from the first part. The reason I'm using % for the delimiter is that it doesn't appear anywhere in my URL.

So, where am I going wrong? Is there an easier way that doesn't involve sed? Thanks for any help, Dismas|(talk) 04:15, 15 August 2012 (UTC)[reply]

From my initial investigation sed does not recognise \d as meaning a digit. My version of sed thinks that is just a letter d. Therefore you will need [0-9] instead and you need the \( to select the string to replicate - so
$ sed 's%\([0-9]\{3,4\}[A-Za-z]\{1,2\}[0-9]\{2\}\)%<a href="https://www.someurl.com/foo?id=\1">\1</a>%g'
1234TT77
<a href="https://www.someurl.com/foo?id=1234TT77">1234TT77</a>

Thanks! That worked perfectly! There were about a half dozen that didn't fit the scheme because they were labeled things like LOANER1, LOANER2, etc. But they were easy enough to do by hand. I'd have hated to do all the rest by hand since there were a few hundred. Thanks again! Dismas|(talk) 10:07, 15 August 2012 (UTC)[reply]

zero indexing of arrays

Hi, this is kind of a quirky one, but I'm doing some massive array storing (and manipulating, but mainly storing) using Strong's Concordance. All entries are stored with a number, and the numbers start at 1. As a result, I'm using an array where the first (ie, the "zeroeth") entry is blank, so the array index number matches the Strong's concordance number. Is this considered good coding practice? Is there some set of rules stating when you should do this, when you should avoid it, and when it's basically six of one, half a dozen of the other? IBE (talk) 07:24, 15 August 2012 (UTC)[reply]

There's nothing wrong with it. What you start your array with — heck, what keys you use in general, since that's entirely flexible with associative arrays — is just a matter of convention and keeping things internally consistent. Just make it clear that you're using one-based indexing and all is well. Depending on your language, it's probably absolute bestest practices not the initialize the zeroth array entry anyway (why use extra memory?), but really, it won't matter as long as you never try to do anything with it. --Mr.98 (talk) 13:01, 15 August 2012 (UTC)[reply]
I don't know why Mr.98 assumes you're using an associative array. I'm going to assume you're writing in C. Since you're using C, the advantage of having zero-based arrays is that (array identifier) + (index of element) = (address of element): see Array data type#Index_origin, and more at Zero-based_numbering#Advantages - another advantage is that you can use the modulus operator (%) to do certain array-navigating tasks conveniently.  Card Zero  (talk) 16:57, 15 August 2012 (UTC)[reply]
I'd say it has a minor whiff of code smell but it's reasonable in the situation you describe. Numerical Recipes in C follows a similar convention, so that the C programs use the same subscripts as the corresponding programs in the Fortran edition of the book (Fortran uses 1-based arrays). 67.122.211.84 (talk) 22:00, 15 August 2012 (UTC)[reply]

The code is in JavaScript, but for most purposes, simple array behaviour is much the same as in C, and the syntax is of course C-style. Yet js is such a messy language that it requires the programmer to watch his every step. I have function names almost as long as the screen, with information like fileNamePurposePrimaryInterfaceCreateListOfSuchAndSuch - all just to avoid confusing myself. Hence the concern about getting the array indexing as neat as possible - js is very good at allowing you to stuff up. I'll stick with the current system, but would be interested in further discussion. I don't have any need for accessing the address (I don't even know how to do it in js), and there is no modular arithmetic - it's just the big file of one dictionary, with entries numbered 1 to about 5400. Hence for this one big thing, it made sense - Strong's concordance numbers are a key part of Biblical scholarship, so I tend to think in terms of the number, and it would be hard to change. Still, I am open to persuasion - I've kept this kind of indexing out of every other part of the program, because I can see the danger. IBE (talk) 13:09, 16 August 2012 (UTC) Further point: I'm pretty sure it's an associative array - I don't know what a dissociative array would be. It's a standard array created by the Array() constructor in js. IBE (talk) 13:12, 16 August 2012 (UTC)[reply]

If you're using javascript, leaving gaps in the array is fine (apparently there's a gap of 100 entries in the middle of Strong's concordance anyway, so leaving entry #0 empty is insignificant beside that). I can't find a good reference for this, though. You can have a bad reference, if you like (i.e. what some guy on the internet says): [1] look at the reply to the second answer - "all JS implementations have 'efficient' implementations of arrays, at least they are substantially more efficient than normal objects. They all assume that a compact array is the norm, and a sparse array is uncommon, and for the reason optimise for 'normal' array usage." So your array should be compact, which is not the same as being completely free from gaps.  Card Zero  (talk) 14:48, 16 August 2012 (UTC)[reply]

Thanks to you all for the help, IBE (talk) 19:12, 16 August 2012 (UTC)[reply]

I usually prefer to start arrays at 1, even if that wastes the zeroth one. Reasons: the first one is 1, the second one is 2, the nth one is n. Bubba73 You talkin' to me? 20:22, 16 August 2012 (UTC)[reply]

Variables in wikipedia

Are there any plans to support variables in wikipedia? Say, if I have a number which appears in several wikipedia articles and this number changes, ideally I would only edit it in one place, not in all articles where it appears. (I just updated Lists of National Treasures of Japan with three new designations and had to change numbers in several places.) Or would this feature be too complicated for the users? bamse (talk) 08:36, 15 August 2012 (UTC)[reply]

If you need help using Wikipedia, you'd be better off at the Help desk. Future plans for Wikipedia can be suggested and discussed at the Village pump. There appears to be a limited implementation of what you have in mind, known as Magic words - see also the MediaWiki 'Magic Words' help page. This seems too be only useful for things like current time and date, though. The text on the first page suggests that there's a server cost in calling the value of a variable, so it may be that having lots of variables that need to be queried for the current value each time a page loads (if that's how it works) would be prohibitively demanding on the servers. But you can make the suggestion at the village pump - I'm sure someone will be able to tell you exactly why the sky will fall in if it's adopted :-) - Cucumber Mike (talk) 09:48, 15 August 2012 (UTC)[reply]
You could also use templates, so for example a template called template:numberoftreasures and then on this page put your number. Then insert this variable with {{numberoftreasures}} However it does also make it more tricky to update and more likely a person will make a mess. Also if the page becomes too complex it may not render. Graeme Bartlett (talk) 10:57, 15 August 2012 (UTC)[reply]
Thanks for the replies. bamse (talk) 11:36, 15 August 2012 (UTC)[reply]
If you want an example of the "may not render", you can check out List of hard rock musicians (A–M) and List of hard rock musicians (N–Z). It was originally one list which I split into two. Part of the reason why it was me who did it was that when the article was brought to mine and other editors' attention, I was one of the few who could get it to render completely. The roughly 800 references were bogging it down. Dismas|(talk) 18:30, 15 August 2012 (UTC)[reply]
I proposed a way to incorporate variables (birthdates, temperatures, stockprices) into MediaWiki without using templates, using a Facts tab instead, making it very easy for robots to maintain such data. Unfortunately the project doesn't seem very active. Joepnl (talk) 20:31, 15 August 2012 (UTC)[reply]

Address bar search (email id)

Like many other people I also search directly from address bar (Ctrl+L→Type→↵ Enter). Today I put an email id in address and presed enter and I got message "You are about to log in to the site "gmail.com" with the username "abcdef", but the website does not require authentication. This may be an attempt to trick you. Is "gmail.com" the site you want to visit?" – is this an expected behaviour? --Tito Dutta 09:12, 15 August 2012 (UTC)[reply]

Yes. If you use an URL with an "@" in it, it means, "try to log in as this user." It's a bit antiquated — it's not using Google's login, for example, but .htaccess authorization. This is usually only used for doing things like logging into servers, routers, or really quite old systems; it's rarely used for actual sites because the name and password are usually sent in the clear (that is, not encrypted in any way). The "tricking" aspect is because it used to be (in the mid-1990s) a common phishing tactic to obfuscate URLs this way. So you'd put in something like http://youractualbank.com?toomanyqueryvariablesforyoutonoticethatactuallywe'regoingto@myevilsite.com. It would thus be hard to see which site you're really visiting — that whole first part is just being passed as a "user name" to the actual site. So now browsers usually warn you if something like this is happening, because people rarely try to log in using this anyway. --Mr.98 (talk) 13:10, 15 August 2012 (UTC)[reply]
The above is basically what Safari gave me when I plugged in an email address. I got a warning saying that I was trying to access a potentially dangerous phishing site. Especially funny considering I used my work email address for the test.  :) Dismas|(talk) 18:18, 15 August 2012 (UTC)[reply]
Except that the quoted URL actually works and lands you at 'youractualbank.com' instead of a phishing site :) Unilynx (talk) 19:57, 15 August 2012 (UTC)[reply]
Sorry, yeah. The description about phishing scams was closer to what I got. Dismas|(talk) 20:23, 15 August 2012 (UTC)[reply]

Try it with quotes surrounding the address. ¦ Reisio (talk) 21:59, 15 August 2012 (UTC)[reply]

thumbs up Great! Quotes surrounding it a great idea! --Tito Dutta 13:18, 16 August 2012 (UTC)[reply]

Audio file on facebook

How to upload Winamp media file on facebook from computer? It is an audio file, not video file. Sunny Singh (DAV) (talk) 09:12, 15 August 2012 (UTC)[reply]

There are some apps like this, you can search in Facebook apps centre more. Also does it work when you try to attach it (in messages)? --Tito Dutta 09:15, 15 August 2012 (UTC)[reply]

PHP, Replacing Arrays

I have a php script that updates arrays after each execution. They are values that belong to a group, when the script is executed those variables may change to another group.. so I have group 1, group 2, group 3 & group 4. So when the php script is executed it gets more values (new values sometimes) and the group for each one. So if there are new values, it just appends them to the array, for the old values I need to remove them from the old group and move them for the new group. Take this example: There are 3 baskets with fruits already.

Extended content
$previous=Array
(
    'Basket1' => Array
        (
            'berries',
            'pineapple'
        ),

    'Basket2' => Array
        (
            'red apples',
            'Strawberries'
            'melon'
        ),
    'basket3' => Array
        (
            'avocado',
            'peach',
            'pear',
            'green apples',
            'banana'
        )

)

When the scripts run again it updates the info, with new fruits, or/and fruits in different groups, so I have create an array that contains the updated information+the old information...

Note:in this example there are 3 baskets in the real code there's actually a lot more arrays.

The thing is... I exactly don't know how to update the info... I could manually make a lots of 'ifs and for loops but it doesn't seem right, and is not extensible. I created this function to delete old values that appear on another groups (The fruit has changed bascket).

Extended content
function RemoveChangedValues($oldBasket,$secondOldBasket,$basket,$secondBasket){//whatever
return Array(
array_diff($oldBasket,$basket),
array_diff($secondProxy,$forthProxy));//this returns an Array of the "old basket" and the "second basket" with the repeated values removed
//later the both arrays (old and new) can be concatenated and then remove the duplicate values of each array... or.. that's the idea.
}

The thing is that I can't find a way to easily loop through all the groups and call that function (other than writting lot's of if statements). Any ideas how this can be done? thanks! 190.158.212.204 (talk) 17:10, 15 August 2012 (UTC)[reply]

Can you expand on "When the scripts run again it updates the info, with new fruits, or/and fruits in different groups, so I have create an array that contains the updated information+the old information..." ? How exactly do you get the info telling you which fruits to add to each group, remove from each group, and move from one group to another ? An example would be good. StuRat (talk) 04:15, 16 August 2012 (UTC)[reply]
When the user submits some data, it sends information, it's converted into an array, I got the array from previous inputs, but I don't know how to merge the arrays. Is not actually 'removing' them it's just moving them, (removing then adding), you see if at the first time, I get 'apples' in the first group, then get the same item 'apples' but in the second group, then I would have to remove apples from the first group because it has moved to the second group. Is not anymore on the first group. The only thing the script gets it's fruits and their groups, I have to merge them with their previous results... — Preceding unsigned comment added by 190.158.212.204 (talk) 04:47, 16 August 2012 (UTC)[reply]
What I'm trying to get from you is the format the information is supplied to your script. Is it like this:
APPLES  -> BASKET1
PEACHES -> BASKET2
GRAPES  -> BASKET1
Or like this:
BASKET1 -> APPLES, GRAPES
BASKET2 -> PEACHES
Or something else ? StuRat (talk) 05:21, 16 August 2012 (UTC)[reply]
In any case, it would certainly help if you could refer to arrays by number, rather than names like "Basket3". I don't use PHP, so I'll use generic pseudocode. Does it support an array of lists ? If so, you could make that "Basket[3]", which would make loops work better. Something like:
FOR B = 1 TO HIGHEST_BASKET_NUM
  FOR N = 1 TO HIGHEST_FRUIT_NUM_FOR_BASKET[B]
    IF (BASKET[B].FRUIT[N] = CURRENT_FRUIT) THEN
      DELETE (BASKET[B].FRUIT[N])
    ENDIF
  ENDFOR
ENDFOR
If PHP doesn't support an array of lists, then you could just make it a two dimensional array:
FOR B = 1 TO HIGHEST_BASKET_NUM
  FOR N = 1 TO HIGHEST_FRUIT_NUM_FOR_BASKET[B]
    IF (FRUIT[B,N] = CURRENT_FRUIT) THEN
      DELETE (FRUIT[B,N])
    ENDIF
  ENDFOR
ENDFOR
(Note that my loops above start at 1, since I assumed the arrays start with the first element. If they start with a zeroth element, then the loops should start at 0.)
However, at some point this approach would become unwieldy, say if you have thousands of baskets each containing thousands of fruits, then this would take millions of checks to find any given fruit. In this case, you might want to create an alphabetized index, which would store each fruit, along with the basket it occupies. You could then do a binary search to find the fruit in the index, and that would give you the basket. (You could also index it's position in the basket, but then you'd need to update this whenever any lower fruit was deleted, assuming you repack the baskets to take up empty spaces.) The index would still need to be updated when a fruit is moved, which would be fast, or when a fruit is added, which would be slow.
To give more specific advice, we'd need to know the max number of baskets, max number of fruits in each basket, number of updates expected, etc. StuRat (talk) 05:46, 16 August 2012 (UTC)[reply]

Monitor problems

Hello! I'm having a strange problem with my monitor. Whenever I turn it on after not using it for a while (i.e. overnight or when I return from work), it does one of these: 1) Screen flickers rapidly on and off for a few seconds and then stays on like normal; 2) Flickers the screen on once, then immediately off again, and I have to push the on switch twice (on -> off -> on) for it to try again--this can happen up to four times before behaving normally; or 3) A combination of #1 and #2. Once the screen stops behaving strangely and is in the "on" state, it behaves normally and experiences no more problems for as long as I keep it on. Any ideas as to what is causing this? -- 143.85.199.242 (talk) 17:34, 15 August 2012 (UTC)[reply]

LCD? CRT? ¦ Reisio (talk) 21:56, 15 August 2012 (UTC)[reply]

-- Sorry; a Samsung LCD, SyncMaster 226BW. (I am the IP.) -- Tohler (talk) 04:00, 16 August 2012 (UTC)[reply]

Sounds like a classic cold start problem. It might be that the temperature is the problem, and it needs to warm up a bit for the thermal expansion to bring two components into constant contact with each other. Does this also happen if it goes into standby mode ? If not, then just leave it on standby. If standby mode doesn't fix it, then you're down to leaving it fully on all the time, putting up with this annoyance, or replacing it. I doubt if it would be financially viable to have it fixed, unless it's a very expensive monitor. StuRat (talk) 04:07, 16 August 2012 (UTC)[reply]
What are the consumer protection law (aka lemon-laws) like in your area? (I think you are in Arizona, US) If the monitor is still covered by them, I'd claim under those. The symptoms sound like a fluorescent lamp failing to start (ballast/starter on its way out). Do you know what kind of backlight the monitor uses? If you put an image with large black and white areas on it up, and then turn the monitor off, and the back on without it starting correctly, can you just make out the black and white areas? CS Miller (talk) 14:55, 16 August 2012 (UTC)[reply]

Help with Changing Youtube Email

I have a rather annoying problem and I hope you don't mind helping a non-tech savvy person like me out. I have a G-mail account that I use for private email with my personal name, and I have linked it with my Youtube account. I want to set up a new G-mail account with the same name as my Youtube account so that I can give it to people so I can talk with them without giving my personal name out. However, when I tried to set up the G-mail account, it won't let me because it says someone else has that name (Probably because my Youtube account has that same name.) What can I do to set up the E-mail account I want? Rabuve (talk) 20:13, 15 August 2012 (UTC)— Preceding unsigned comment added by Rabuve (talkcontribs) 18:36, 15 August 2012 (UTC)[reply]

I wouldn't get too optimistic, but take a look at http://support.google.com/youtube/bin/answer.py?hl=en&answer=183819 ¦ Reisio (talk) 21:54, 15 August 2012 (UTC)[reply]
And the second part, you can not sign up for that Gmail address too. I have some suggestions still– do you have lots of videos in the channel? 2) have you tried Google Apps for the channel's name (Google Apps is free, but you need to have the domain), is the domain name available? --Tito Dutta 13:22, 16 August 2012 (UTC)[reply]
I tried setting up a slightly diferent email account (my youtube name plus a few numbers) but now it won't let me add it as an alternate email. Any advice? Rabuve (talk) 18:39, 16 August 2012 (UTC)[reply]

How much would this storage server cost?

A recent article at MBNet.fi mentioned this storage server, saying it could hold a maximum of 32 terabytes and prices start at 400 €. 400 € seems awfully low for 32 terabytes - that's only a bit more than 1 cent per gigabyte - so I'm guessing it's for the server only, without any disks. How much would such a server fully laden with 32 terabytes of storage cost? JIP | Talk 21:12, 15 August 2012 (UTC)[reply]

It has 4 bays each for a single SATA3 disk; the list of compatible disks has at most an Hitachi 4TB disk. So that's 16TB. That disk, an Hitachi-HGST Ultrastar 7K4000, retails in the UK for about £450. I don't see a listing for a compatible 8TB disk, which would need to bring it up to 32 TB. I imagine Hitachi et al will have an 8TB in the works; you can extrapolate a bit and get maybe £1000 for that, when it's released. £4000 is about €5000. -- Finlay McWalterTalk 21:46, 15 August 2012 (UTC)[reply]
Disks are pretty obviously not included in that price. 4TB drives are still exotic (and reportedly not that reliable) and 8TB drives are probably still at least a couple years away. Note also you shouldn't set up a disk array for any important read-write usage without some type of RAID. With four 4TB drives, you'd get either 8TB (RAID-1 or RAID-10) or 12TB (RAID-5) of usable capacity. 4TB Hitachi Deskstars are around 270 USD (jr.com, newegg.com) last time I looked, and the faster and maybe more reliable Ultrastars are around 450 USD. 2TB drives are somewhat less expensive per GB. If you really want a low budget 32TB array, I'd suggest a general purpose storage server (supermicro.com e.g.) rather than a dedicated NAS these days. 67.122.211.84 (talk) 22:09, 15 August 2012 (UTC)[reply]

Why doesn't Firefox automatically update on Linux?

Why doesn't Firefox automatically update on Linux? It does on Windows. At work, Firefox has happily updated itself to at least version 11. At home, I have version 4, and even that only because I configured the Linux update manager to be able to download it - otherwise I would still be stuck with version 3. Even the Mozilla Firefox web site says Firefox can be configured to automatically update itself by selecting "Automatically check for updates for Firefox" at the "Updates" tab in the "Advanced" preferences. But there's no such option. There's options for Add-ons and Search engines, but not for Firefox itself. This is in direct contradiction to the screenshots shown on the Mozilla Firefox web page. Does Mozilla have some sort of issue against Linux or is it just a problem with my distribution (Fedora 14 Linux)? JIP | Talk 21:20, 15 August 2012 (UTC)[reply]

Linux updates to Firefox usually come from the distribution's update system (locally that's where they should come from, if that's where you got Firefox from in the first place). Fedora 14 is "release no longer supported", so Fedora won't be packaging new versions of anything. -- Finlay McWalterTalk 21:29, 15 August 2012 (UTC)[reply]
So if I want to update to the newest version of Firefox, do I either have to update the whole operating system, or try to install the latest version of Firefox by hand, and struggle with version conflicts of shared libraries for weeks before I get it to even start up? Or is there an easier way? Updates to Firefox on Windows seem to be coming from Mozilla itself (I can't imagine Microsoft providing them), so why can't this happen for Linux too? JIP | Talk 21:34, 15 August 2012 (UTC)[reply]
You should update your OS (Fedora) to the latest stable version, and regularly update it from here on out. You are missing a lot of bug fixes and security patches, just for starters. ¦ Reisio (talk) 21:49, 15 August 2012 (UTC)[reply]
Mozilla has no control over third-party Firefox builds on any platform. It's the responsibility of the maker of the custom build to update it, and they don't tend to do that at nearly the rate of Mozilla's official builds. If you install Firefox from mozilla.org you should get automatic updates from Mozilla. There's just one official Linux binary build there; I assume it comes with its own versions of all relevant libraries to avoid .so hell. -- BenRG (talk) 21:43, 15 August 2012 (UTC)[reply]
Yeah Mozilla provides Linux binaries, but you'd be a fool to actually use them. :) ¦ Reisio (talk) 21:48, 15 August 2012 (UTC)[reply]
Linux systems have package managers, which typically give you the ability to install/remove/update any and all software uniformly, at any time you choose or schedule. There is one manager (per distro), and it works with everything.
Windows does not have a package manager. Each application is responsible for its own update method. There is little to no organization or interaction between them. Each package is responsible for making its own installation system, uninstallation system, update system, and for installing any other packages it needs to work (and checking if they're already installed or not, etc.), etc..
¦ Reisio (talk) 21:46, 15 August 2012 (UTC)[reply]
You've chosen a Linux distribution with a deliberately short maintenance window - as the article says "With 6 months between releases, the maintenance period is a very short 13 months for each version". If you need to stay on a release for years, and have it maintained, Fedora is the wrong choice. Ubuntu LTS is supported (meaning you get security patches, not new versions of stuff) for five years; Red Hat Enterprise Linux for longer still (if you pay). -- Finlay McWalterTalk 21:58, 15 August 2012 (UTC)[reply]
But in general I would say that if your plan is to avoid updating as long as possible, your plan is truly flawed. You should be updating far more frequently than once every 13 months. Most distros have automated update options available these days — use it. ¦ Reisio (talk) 22:03, 15 August 2012 (UTC)[reply]
I started using Linux with Red Hat, and switched to Fedora when Red Hat split up to Fedora and Red Hat Enterprise Linux. So I could say I've practically always been using Fedora. Perhaps a switch of distributions would be in order? Ubuntu is still Linux, so I could live with that. I don't want to switch to Microsoft Windows or buy a Mac instead. But would switching to a different distribution require a complete re-install of the entire operating system? Would old binaries from Fedora 14 still work, or would I have to re-install all the programs too? I assume Ubuntu can read EXT4 partitions all OK, so I won't have to reformat my personal data partitions. But really all this seems to be a bit too much just to update Firefox. JIP | Talk 22:05, 15 August 2012 (UTC)[reply]
Firefox is the least of your problems; your system, and all its applications, is no longer getting security updates. You have a bunch of vulnerabilities which will never be patched. You shouldn't want to somehow get those old binaries to run on a new system; they're still unpatched. For production systems, where you don't want to update the system every six months, you'd use RHEL, Oracle Linux, Ubuntu LTS, and the like. For a desktop machine of your own, for general purpose use, you want to keep on the latest, or latest but one, release of your dist. There's nothing at all wrong with Fedora, but no-one should be running Fedora 14. -- Finlay McWalterTalk 22:11, 15 August 2012 (UTC)[reply]
^ What he said. ¦ Reisio (talk) 22:19, 15 August 2012 (UTC)[reply]

Google Drive

How do I download the Google Drive app for my PC? The instructions say

Go to http://drive.google.com.
Click the Download Google Drive for your PC button.

but I don't see any such button. Rojomoke (talk) 22:11, 15 August 2012 (UTC)[reply]

I see the link on the left hand side pane. What operating system are you using? I'm pretty sure there's no Linux client, so if you are using that to access the site, you may not get the link. - Akamad (talk) 22:32, 15 August 2012 (UTC)[reply]

Try https://tools.google.com/dlpage/drive?pli=1#eula. Moondyne (talk) 02:59, 16 August 2012 (UTC)[reply]

For me, the link said something like "Free 5GB" and it was in the upper right. Though your mileage may vary. For instance, I already have a Gmail address and a Google Docs account, so I already had the predecessor to GDrive and was signed in to my account. Once I clicked on the button, I was given the chance to download the syncing software for my PC. Dismas|(talk) 03:10, 16 August 2012 (UTC)[reply]

THe OS is Windows 7, and I do already have a Gooogle account. But logged in or not, I still can't see the links you've given. However, the URL Moondyne gives worked fine. Thanks to all. Rojomoke (talk) 20:02, 16 August 2012 (UTC)[reply]

ZFS, heterogeneous storage media and heterogeneous access patterns

I'm looking at buying a solid-state drive to use alongside the hard drive in my Windows 7 gaming workstation, and using FreeNAS or ZFSguru to combine them into a ZFS striped vdev. (I don't need redundant storage.) It occurs to me that the optimal striping pattern will vary between (and sometimes within) files with the frequency of reads versus writes and random versus sequential access, because these affect the two devices' relative overall speeds. Can ZFS monitor these characteristics at the file level, and/or at the byte-range level for gigabyte-plus files, to optimize the striping? Can it predict them for new files based on e.g. data type and folder path? Also, do similar capabilities exist for compression and deduplication? NeonMerlin 23:05, 15 August 2012 (UTC)[reply]

August 16

MediaWiki: get URL params

I googled and wikied before asking this question, but to no avail. How do I create a template that would get URL parameters? Something like #arg: (too bad DynamicFunctions extension isn't installed for Wikipedia). 178.216.128.99 (talk) 06:58, 16 August 2012 (UTC)[reply]

SATA III hard drive in a SATA II interface?

Will a SATA III (three) hard drive work in a SATA II (two) interface? JIP | Talk 18:30, 16 August 2012 (UTC)[reply]

As our Serial ATA mentions, there isn't such thing as SATA III. It doesn't really mention but there isn't really such thing as SATA II [2] either. The term SATA II is usually used to refer to the 3 Gbit/s interface speed and SATA III a 6 Gbit/s interface speed but the rev 2.0 of SATA included a number of enhancements beyond the speed increase, similarly rev 3.0 of SATA; however many hard disks may include some features supported by the new revision (particularly the increased interface speed) but not all so it's difficult to answer without knowing precisely what you're talking about. (AFAIK, SATA is supposed to always be backwards and fordwards compatible between revisions although as our article hints at, in practice problems sometimes occur.) Nil Einne (talk) 18:52, 16 August 2012 (UTC)[reply]
I was mainly interested in buying this hard drive. It says "SATA III" on the page, however I'm fairly sure my computer's motherboard only has a SATA II (SATA rev 2.0?) interface. JIP | Talk 19:26, 16 August 2012 (UTC)[reply]
According to [3], that drive has 6 Gbit/s transfer speed which is probably what that vendor means by 'SATA III'. According [4], the drive has a jumper to limit it to OPT1/1.5 Gbit/s which suggests 2 things. 1) At the time designing the drive, WD hadn't encountered enough problems with the drive interface controller (or ones like it) and 3 Gbit/s SATA controllers to make a 3 Gbit/s jumper something worth implementing. 2) Worst case scenario, you should be able to enable the jumper and limit the drive to 1.5 Gbit/s and it should work. From [5], there should be no real disadvantage in raw speed since at the beginning of the drive, it's still about 15 MB/s away from saturing a 1.5 Gbit/s link (presuming you aren't doing something like using a port multiplier). Note that I don't know if the OPT1 jumper stops other things like NCQ (which I presume the drive has). Also I'd avoid reading too much into the TechARP review beyond a rough idea of the raw speed since they seem to have come to the conclusion the EARX new drive is slower then the older EARS drive based on what I think is a sample size one each. (I.E. All their actually saying is our single EARX is slower then one single EARS.) P.S. However remember no one can guarantee any specific model will work with your system, except perhaps your vendor. I know of someone who encountered a random compatibility problem with a WD? drive and some motherboard several years back. I never found out what the problem was but it sounded like something fairly well known to those who seel the motherboard but also something rather unusual. Nil Einne (talk) 21:53, 16 August 2012 (UTC)[reply]
From everything I've heard, SATA revisions are supposed to be fully backwards compatible. You'll just be limited to the features and speeds supported by the oldest hardware in the chain. Horselover Frost (talk · edits) 22:07, 16 August 2012 (UTC)[reply]

Plotting ping results on a graph

I would like to plot some ping results on a graph. The data comes from the standard Windows ping tool and is in the format;

~ 16/08/2012 18:15:21.82
Reply from 173.194.78.94: bytes=32 time=53ms TTL=47

~ 16/08/2012 18:16:22.26
Reply from 173.194.78.94: bytes=32 time=19ms TTL=47

~ 16/08/2012 18:17:22.94
Reply from 173.194.78.94: bytes=32 time=30ms TTL=47

etc

The date and time have been added by me, and I can change it to any format if that would make plotting the results easier. The data I want to plot on the graph is the "time=(x)ms" part of each ping request against the date and time of the request. If possible I would like to do this in Microsoft Excel 97. The log file containing the ping results is over one thousand lines long, so I cannot do it manually. I have very little experience in plotting data on graphs, so I need lots of help and advice. Thank you for your time 92.233.64.26 (talk) 19:43, 16 August 2012 (UTC)[reply]

Well it will be easier if you have everything on one line, date time and response time, then you can load the data to excel and allow space separation to get it into fields. There are other products around lie Multi Router Traffic Grapher that can do this on a much bigger scale automatically. This awk command will do the conversion to combine on one line and strip back the time:
 awk '/^~/{a=$0};/Reply/{sub(".*time=","");sub("ms.*$","");print a,$0}'

Graeme Bartlett (talk) 22:02, 16 August 2012 (UTC)[reply]

Thanks for the reply. I am not familiar with "awk", is it a linux program? The windows version I downloaded from the gnu sourceforge page seemed to fail with the command above, perhaps because the command prompt was interpreting the special characters differently? 92.233.64.26 (talk) 00:14, 17 August 2012 (UTC)[reply]

Windows task bar disappearing

For the last week or two, the task bar in my Windows 7 system has been disappearing a few times per day. It is NOT hidden. I have it locked. If I log off and log back on (or restart), it comes back, for a while.

I have Norton Security and I've run Microsoft Safety Scanner and MalwareBytes, and they didn't find any malware.

Is there a solution for this problem? Bubba73 You talkin' to me? 20:18, 16 August 2012 (UTC)[reply]

loop 128 PNG files at 15 fps onto a 10 minute youtube video

This is for a scientific experiment, and the best way to do it is to project a high contrast series of stripes to my fruit flies to an iPhoone sitting on top of a transparent experimental arena; I created a bunch of stripes in different positions in MATLAB-- the trouble is that while I can find flv editors that will loop a single sequence of images ONCE, I cannot find an application that will write a single sequence over and over again into a single video file until a certain amount of frames has been reached. I'm basically using my iPhone so I would like to play a looping series of stripes off of Youtube (which I will upload to). I cannot use any browser-based methods (e.g. animated GIF) as there will light leakage from other components (I need blue light coming from the iPhone only, or black, else it will ruin the selective dual color imaging setup, as I am observing fruit fly behavior through a red filter and need the stripes of the phone to be invisible). The nice thing about Youtube is that the "controls" disappear after a few seconds. 137.54.29.134 (talk) 21:45, 16 August 2012 (UTC)[reply]

VLC media player can play a video in a loop in full screen mode on a PC. ImageMagick or GraphicsMagick can make a video from a sequence of frames, and can likely make a frame of stripes for you too. They are command line driven so can be quite flexible once you know what you are doing. You can put your modern broswer into full screen mode in modern versions so you onl.y see page content, so you may want to explore that option. Graeme Bartlett (talk) 22:24, 16 August 2012 (UTC)[reply]
Yeah, it is hard to believe your best option relies on an iPhone and YouTube… is the point of the experiment the light and flies or using an iPhone?
If you were to use an ordinary monitor you could tape over any extra lights (you'd presumably have to do this for other things in the room anyways). FFmpeg doesn't seem to quite support looping a sequence on its own yet, which is unfortunate. 128 divided by 15 is hard to divide 10 minutes by as well… can we assume looping the sequence 70 or 71 times would suffice (or 100, a nice round number)? ¦ Reisio (talk) 23:29, 16 August 2012 (UTC)[reply]
An iPhone is ideal because it matches the size of our 3"x4" arena. It's very hard to mount a monitor right on top or below a level arena, which is what must occur in order to avoid the effects of geotaxis (gravity-driven congregation in the "upper" portion of a non-level arena). Any further and the contrast is diminished. Right now, I know how to make a video from a sequence of frames, but what I need is for the loop to occur in the file itself (the iPhone Youtube app doesn't have a loop function). Of course, if there's an iPhone app that can turn its dashboard off and repeat videos, that would be awesome. 137.54.29.134 (talk) 23:48, 16 August 2012 (UTC)[reply]
According to http://google.com/search?q=iphone%20app%20video%20repeat there are such apps, including one named "Loop Video". ¦ Reisio (talk) 00:05, 17 August 2012 (UTC)[reply]
There probably is. Otherwise, if you can upload the images somewhere I can assemble the video as originally requested (except looped 70, 71, 100, etc. times and not 10 minutes exactly). The shell scripting I would use is so ugly I will not share it publicly. :p ¦ Reisio (talk) 23:56, 16 August 2012 (UTC)[reply]
To avoid network issues you should probably use the iPhone's own player to play a local video, though. Does that have controls that show up by default? If so how long do they take to disappear? Which model iPhone? ¦ Reisio (talk) 23:59, 16 August 2012 (UTC)[reply]


August 17

is the human brain a Turing Machine?

I was having a debate with someone and he asked me to prove that a human being was a Turing Machine. In some ways it seems so obviously true, that humans are at a minmum Turing Machines that I had never really thought through a proof or convincing argument. I can think of several but when I searched I was a bit surprised that I didn't find any definitive statements from Turing, Church, or others with a lot more credibility than I have on the subject. I just want to make sure I haven't missed something, has anyone like Turing, Church, Von Neuman, Chomsky, Dennet, etc. written on the topic? Mdebellis (talk) 02:26, 17 August 2012 (UTC) — Preceding unsigned comment added by Mdebellis (talkcontribs) 02:24, 17 August 2012 (UTC)[reply]

Is it literally a Turing machine? Clearly not (no such device can exist - infinite tapes are in rather short supply, for a start). Is it even metaphorically one? I very much doubt it. AndyTheGrump (talk) 02:29, 17 August 2012 (UTC)[reply]

Concurrency

Hello, I was wondering, can one actually implement reliable multithreading in software (w/o hardware support, like atomic fetch-increment-write back instructions or similar)? How does x86 do this stuff (I think there was some operation that was atomic, perhaps XCHG?)Уга-уга12 (talk) 03:23, 17 August 2012 (UTC)[reply]