Wikipedia:Reference desk/Archives/Computing/2012 August 13

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


August 13[edit]

Force http (unsecure) connection.[edit]

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[edit]

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)[edit]

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[edit]

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?[edit]

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#[edit]

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]