Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 71.3.50.250 (talk) at 03:19, 13 April 2014 (→‎Importance of passwords for online forum accounts: Re:). 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:


April 8

Name that electric switch

I want some rather bright lights go on when I open the garage door. The garage door opener has it's own provision to do that, but is limited to 60 watts. I want 200 watts. So, when the line coming from the garage door opener is energized, I'd like that to flip a switch to turn on my lights using mains power, and then turn it back off when the garage door opener line goes dark (it has a timer). What's the name of the switching device to do this ? StuRat (talk) 03:51, 8 April 2014 (UTC)[reply]

Any commercial product that did what you wanted would be called a switch, but it would actually be some sort of Relay.
https://en.wikipedia.org/wiki/Relay
One that is either triggered by AC electricity and you plug it into power AND the light socket of the garage door opener with a socket to outlet converter as the switch.
https://www.google.com/#q=socket+to+outlet+adapter
Or, a relay that is switched by light. But you would have to make sure the additional lights you added would not trigger the light sensor to your switch. It could make for unusual positioning.
I've looked and I'm not seeing any kind of product. However, the 60 watt limit on garage door opener is due to the heat that would discolor or melt the white garage light cover. You could plug in a socket to outlet converter (mentioned earlier) and run an extension cord to more powerful light. However, I would use LED bulbs and maybe not go quite as bright as 200 watts. With LED bulbs you are getting the additional brightness while drawing considerably less electricity and not generating as much heat through the garage door wires just to play it safe.Wonderley (talk) 05:33, 8 April 2014 (UTC)[reply]
I'm using 15 CFL bulbs at 13 watts each, for a total of 195 watts, to light up the entire exterior of the house, for security reasons. StuRat (talk) 06:18, 8 April 2014 (UTC)[reply]
I did that too. I used a motion detector. As the relay. A car coming up the driveway signals it. I wired all that up 20+ years ago. I think I got the motion "switch" at Home Depot.Wonderley (talk) 16:09, 8 April 2014 (UTC)[reply]
I recommend wiring up a mechanical relay that is closed by the power for the opener light. Katie R (talk) 17:37, 8 April 2014 (UTC)[reply]
And now I see Wonderly mentioned that - skimming the response I thought it was just suggesting a light-triggered relay. You might also be able to find some useful signals on a terminal block on the opener. When I installed mine, I'm pretty sure there was a screw terminal with a TTL-level signal indicating the status of the light. That would give you a cleaner looking installation, and you could still have a bulb in the opener. Katie R (talk) 17:43, 8 April 2014 (UTC)[reply]
I have a fancy power board called a master slave, i wonder if you could use something like that? For example you plug your PC into the master and everything else (monitors, speakers, external peripherals etc...) into the slave sockets. The board monitors the current in the master socket and only turns on the slaves when the master is drawing then a few hundred mA. So if you plugged in your roller door into master and all your other lights into slave, that might work, depending on the layout of the socket etc... Vespine (talk) 06:16, 9 April 2014 (UTC)[reply]
How much does that cost ? StuRat (talk) 08:26, 9 April 2014 (UTC)[reply]
Great idea Vespine! That's the perfect relay. Hmm,...if it works. I have one of these for my PC.
http://www.walmart.com/ip/Inland-NuGiant-Energy-Saving-Smart-Surge-Protector/14664815
When power from my PC is off (The PC is plugged into the surge protector's outlet that works as a switch), it kills all power to the other outlets on the surge protector (Monitor, printer, speakers and could do more). These are the other surge protector's "Energy saver" outlets. Plug this product (Or similar) into the power outlet normally used for the garage door opener. Plug the garage door opener into the one AC outlet on the surge protector outlet for a PC or TV (The switch). Plug your lights into the "energy saver" (Switched) outlets.
A PC uses power even when it is off, but the surge protector knows it's just a little. I suspect the little bit of electricity used to operate just the remote receiver is little enough to be recognized as "off". But just the additional lights has to be recognized as "on". I'm sure the motor will be seen as "on" as far as the surge protector is concerned, but it runs for a very short time. If the lights in the garage door opener do not draw enough power to make the surge protector think it is "on", it will only make the lights plugged into this surge protector only work while the door is in the process of opening and the motor running.Wonderley (talk) 10:40, 9 April 2014 (UTC)[reply]
That says it will "detect when you have turned your electronic device off and will shut off power to that outlet" (presumably to cut power to things like wall warts, when not in use), but I need it to shut off power to the other outlets, not that one. StuRat (talk) 17:47, 9 April 2014 (UTC)[reply]
UPDATE: The manufacturer site says it works as you described: http://inlandproduct.com/energysavingsmartsurgeidealforhometheater.aspx. Walmart apparently got it wrong in their description. StuRat (talk) 18:19, 9 April 2014 (UTC)[reply]
UPDATE 2: I ordered it ! Let's hope it gets the job done. Thanks all. StuRat (talk) 02:54, 10 April 2014 (UTC)[reply]
I agree - that does sound like a great, simple solution. Very clever! StuRat, I am curious about how your exterior lights are wired. If they're already set up to plug into an outlet, then that solution is perfect. I guess I pictured the power coming into a junction box with a light switch to control them, in which case putting a relay in the box in place of or in parallel with the switch would still be cleaner. If you're lucky and the opener manual says there is a 5V light signal, then you wouldn't even have to run line current from the opener to the relay, just a tiny pair of 5V wire. I think there are Kendal Electric locations on your side of the state - they could help you pick the right relay for the task and find one that is up to code mounted in a junction box. They aim to sell to contractors and electricians, but are happy to help out anyone. Katie R (talk) 17:35, 9 April 2014 (UTC)[reply]
My "exterior lights" are actually 3 inside floor lamps pointed towards windows, with five 13 watt CFL bulbs each, providing the equivalent of 60 watts of incandescent light per CFL, for an actual wattage of 195 and equivalent of 900 watts (65 actual watts and 300 equivalent per lamp). The old system used a motion detector and a 300 watt halogen light mounted on the exterior, some 20 feet up, requiring a dangerous trip up a ladder to change the bulb (always in January, due to Murphy's Law), and the motion detector never worked well, and has now failed entirely. Unlike the old system, everything plugs into an electric outlet now, so no wiring is required beyond running extension cords. And I can change a bulb now without needing to do anything beyond unscrewing the old one. StuRat (talk) 17:55, 9 April 2014 (UTC)[reply]

Thanks all. As I noted previously, I've ordered the device to fix this problem. StuRat (talk) 16:00, 10 April 2014 (UTC)[reply]

Resolved

protecting a folder

How can I protect a folder in Windows 7? Thank you.175.157.16.134 (talk) 10:06, 8 April 2014 (UTC)[reply]

Protect it from what ? Being read by others ? Modified by others ? Copied by others ? Deleted by others ? Being read/modified/copied/deleted by viruses ? Accidental modification or deletion by you ? Hard disk failure ? StuRat (talk) 13:03, 8 April 2014 (UTC)[reply]
Your question is unclear, but if you right-click on the folder name (in Windows Explorer), then click "Properties" you will be offered various security options.--Shantavira|feed me 14:39, 8 April 2014 (UTC)[reply]
You can protect your folder from external threats by downloading the free application . The application is open-source i.e., you can see what you are doing BUT with certain limitations. You can download it here . The size of the file is just 200 KB. or You can search Stegnography in wikipedia — Preceding unsigned comment added by Shrimadhav (talkcontribs) 08:59, 9 April 2014 (UTC)[reply]
I strongly recommend against using that program ("SpEcHiDe"), whatever it's supposed to do. It is very likely to be snake oil or even malware. -- BenRG (talk) 23:44, 9 April 2014 (UTC)[reply]
I believe TrueCrypt is well thought of, though I have never used it. All the best, Rich Farmbrough, 17:44, 10 April 2014 (UTC).[reply]

More intense disk activity

Some time ago I found this useful utility - http://download.sysinternals.com/Files/ProcessMonitor.zip - and got my machines behaving quite nicely. Now there is a lot of disk activity, which happens mainly while the screens are in power-down mode. There also seems to be a lot less free disk space than I thought. Is this some new un-feature from a Microsoft upgrade? Or is it a known security issue I should worry about? I am fairly security concious, but of course visitors jump on and off the LAN these days, so my security model is a little outdated. All the best, Rich Farmbrough, 11:26, 8 April 2014 (UTC).[reply]

Depending on your operating system, it might be the indexer for Windows Search--Phil Holmes (talk) 14:27, 8 April 2014 (UTC)[reply]
Thanks, I did mean to say that indexing is turned off. Who knows though with Windows... (Vista)> All the best, Rich Farmbrough, 15:16, 8 April 2014 (UTC).[reply]

I have a 15" CRT monitor and intend to buy a 1GB GPU which would give 1900X1200 resolution but would my monitor support it?

I don't care how tiny things would look!!! I don't care how tiny things would look!!! I don't care how tiny things would look!!! I just want to play games in better graphics however i can lower down the screen resolution while playing the game. . . . currently i have 1024X968 resolution on a NVIDIA 6150SEn430 GPU and i want a better GPU and i've played Bioshock, Halo 2 and few others games on it but in low graphics mode :(( I have processor: AMD Athlon Dual core 64X2 5400+ (additional info) and 3Gigs of RAM.(additional info) . . LG500G is the model of the monitor — Preceding unsigned comment added by Shikka Kun (talkcontribs) 13:38, 8 April 2014 (UTC)[reply]

Every monitor has a maximum resolution that it will support, and there is no way to go beyond that. For yours the maximum resolution is 1024x768. If you want better resolution, you'll have to buy a better monitor. Looie496 (talk) 14:03, 8 April 2014 (UTC)[reply]
And that likely means a larger monitor. Alternatively, you could use bump scrolling, if that graphics card supports it, to view a portion of the scene at once, giving you a larger effective resolution, although you only see 1024x768 of it at a time. If you are on Windows 7, 64 bit, you can use Microsoft's own magnification feature to do this. At a 200% zoom level, for example, you'd get a total resolution of 2048x1538, but would only see 1/4th of the screen area at once. StuRat (talk) 14:08, 8 April 2014 (UTC)[reply]
BTW, if the expense is the reason not to get a new monitor, you can get a used CRT monitor for free or almost free, as everyone wants a flat screen now. StuRat (talk) 14:24, 8 April 2014 (UTC)[reply]
And there are surprising bargains on older LCD's, even 1080i LCD TV's which support the resolution you need. We heard what you said (3 times) but really, the electricity you would spend on running a CRT (assuming you get a cheap LCD) would soon exceed what you are trying to save. Sandman1142 (talk) 22:14, 8 April 2014 (UTC)[reply]

Freeview Manual Tuning - Missing Channels

I was looking at the wiki page for the Freeview channels for the UK & I noticed that there where a few channels listed on that page which aren't listed on my TV's channel list. I auto retuned & when I've looked again at the TV's channel list The missing channels aren't there. Does anyone have a list for the UHF Channels for the TV channels on Freeview so I can do a Manual Retune ? 194.74.238.6 (talk) 14:11, 8 April 2014 (UTC)[reply]

If it's like in the US, we had lots of digital TV channels that came and went in short order, so the channels may really be gone now. StuRat (talk) 14:19, 8 April 2014 (UTC)[reply]
Manual tuning is unlikely to help. A whole multiplex is transmitted in one radio channel, so you'd expect to get all the channels in the multiplex or none. And if the autotune didn't see a strong enough signal, the channel will be too weak to watch (digital signals don't degrade as gracefully as their analog forebears). What's in which multiplex is listed at Digital terrestrial television in the United Kingdom#Multiplexing. The frequency a multiplex is broadcast varies by transmission tower - so you need to figure out which tower your antenna is pointed at. See {{Television transmitters in the UK}} and sites like http://www.thebigtower.com But if you're not getting all the multiplexes your tower transmits (check: some towers or relays don't carry all yet) you might need a better antenna. In a few cases people with older Freeview equipment needed to change the firmware in their digibox or tv to handle changes; that should have happened automatically, but you might want to see if you can force that. -- Finlay McWalterTalk 14:27, 8 April 2014 (UTC)[reply]

Oh, right. Well for example, on the Freeview (channel list) page CBS Reality & on the page for CBS Reality, it on Freeview channel 66. If I had/got the UHF Channel for CBS Reality I could try & retune my TV to see if I can find it. 194.74.238.6 (talk) 14:32, 8 April 2014 (UTC)[reply]

I've checked & I think I'm under the Winter Hill transmitter. 194.74.238.6 (talk) 14:34, 8 April 2014 (UTC)[reply]

I know that, for example, BBC channels (I think all of them) are UHF Channel 50 (at least for me). So like I say if I could get a list for for all the TV & radio channels & what UHF channel they're on I could try & retune manually.194.74.238.6 (talk) 14:38, 8 April 2014 (UTC)[reply]

The channels, and frequencies, for Winter Hill are listed at Winter Hill transmitting station#Digital. -- Finlay McWalterTalk 14:55, 8 April 2014 (UTC)[reply]

Thanks, I'll go & see if they can help. 194.74.238.6 (talk) 15:07, 8 April 2014 (UTC)[reply]

I just retuned my TV (I'm on a different transmitter, so different UHF frequencies to you) and I do indeed now get CBS Reality at #66 on the EPG. As the articles you linked indicate, it is on the COM4/SDN multiplex (same as ITV3+1 and ITV4+1 and other garbage channels). Winter Hill transmits that multiplex on UHF58. I would expect that if you have antenna problems you wouldn't see anything in that multiplex. -- Finlay McWalterTalk 15:17, 8 April 2014 (UTC)[reply]

Well, I've tried manual retuning & stil don't have all the missing channels. So I'll think I'll leave it for a while, thanks for the help anyway.194.74.238.6 (talk) 12:10, 10 April 2014 (UTC)[reply]

openning tex file in swp 5.5

Scientific work place 5.5 is installed on windows xp in my computer .My supervisor has sent me a thesis files through mail, which contain a tex file abc.tex and other files as title.tex ,abstract ,preabble1.tex and bibliography.tex ,when i try to compile abc.tex message appear ,"valid .cst file not found ,document may not load correctly.would you want to continue ." when i continue this then it opens,then when i try to compile and create pdf file, no pdf file is created,in ttue tex DVI previewer it says ,preamble1.tex not found .I have searched it on internet ,i have found that problem is with tex style file.Then I imported all files in new folder then try,then while compiling no pdf is created ,because it can not find title.tex,abstract.tex ,..... . Style of this thesis is similar to harvard. — Preceding unsigned comment added by True path finder (talkcontribs) 14:30, 8 April 2014 (UTC)[reply]

Somewhat ironically given your user name, it seems that the problem is that the LaTeX processor does not have its search path set up correctly. The main file abc.tex probably consists largely of lines saying \include{foo} for various values of foo, but when the processor looks for the file foo.tex, it doesn't find it. Unfortunately I don't know enough about your setup to go beyond that. Looie496 (talk) 15:03, 8 April 2014 (UTC)[reply]

Text messages on Nokia Lumia

I recently needed to send a text message to a recipient on my mobile phone. The phone I have is a Nokia Lumia 820 my company gave me to use. I didn't have the recipient's number already in the contacts list on the phone, so I tried to just send the message to the actual number, like it had been possible on all previous Nokia mobile phones for the past two decades. Disappointingly, I didn't find any way to do this. The text messages application only allows selecting recipients from the contacts list, and the only actual numerical telephone keyboard I could find on the entire phone (in the telephone application) only allowed me to actually call the number, or store it as a contact. Is there any way to actually send a text message to an actual number on Windows Phones? It has been possible on previous, non-Windows, Nokia phones for over two decades, and I am sure most of these new-fangled touch-screen phones from other vendors (not running Windows) allow it too, although I'm not sure, since I've never used them. Has no one in either Nokia or Microsoft ever thought of this? JIP | Talk 18:46, 8 April 2014 (UTC)[reply]

According to the user manual (link) within the 'create new message' area you simply type the number in (suggestion being it's the same field you would add a recipient to). Relevant page of the manual I've linked to is page 47. Sorry it's not a phone/system come across but I am 99% certain it will be easy, it's just modern phones have made a good job of making easy tasks more difficult by their desire to be minimalist in on-screen design. ny156uk (talk) 19:40, 8 April 2014 (UTC)[reply]

If that works, it's the same for Android phones at least with the default non Hangouts SMS app. In Android, if you're desperate for a numeric telephone keyboard for some reason, you can I guess temporarily switch your keyboard to one although it seems easy enough to just use the QWERTY keyboard if it's only one or two recepients. I've never had that much of a problem entering a phone number using the QWERTY keyboard personally, even on my old LG P500 with its small screen although I guess it may be a bit easier if you have a large number of recepients you want to enter by phone number. Alternatively with Android you could I guess download an alternative SMS app which would provide an option for a numeric keyboard when entering the recepient. Perhaps there are other options, I'm not sure since as I mentioned I've never felt the keyboard to be a big problem. And I can't say which, if any, of these will port over to Windows. Nil Einne (talk) 06:41, 9 April 2014 (UTC)[reply]

April 9

Controlling the amount of time a piece of code executes itself

I'm fairly new to Python, which is why I've been going around asking all of these questions. I've cooked up a bit of code that streams tweets from Twitter in real time. So once I run the following code, the tweets keep streaming in and saving themselves to a text file on my desktop. The thing is, I haven't figured out a way to end the script yet, and I resort to closing the entire Python window to stop streaming. I'd like to put this into a function that I can call, but that would be cumbersome if there is no way to keep the script from running infinitely. I could either specify the number of tweets after which to stop, or the time elapsed after which the function stops. Please tell me how I can set a small timer that stop the execution of the function after, say, 5 minutes? How do you even create time variables in Python? And what is the format for specifying time?

# -*- coding: utf-8 -*-
import json
import time
import tweepy
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
ckey = '<twitter_key1>'
csecret = '<twitter_key1>'
atoken = '<twitter_key1>'
asecret = '<twitter_key1>'
class  listener(StreamListener):
    def on_data(self, data):
        try:
            data = json.loads(data)
            tweet = data['text']
            print tweet
            with open("C://Users/La Alquimista/Desktop/hindistream.txt", "a") as f:
                f.write(tweet.encode("UTF-8"))
                f.write('\n\n')
            return True
        except BaseException, e:
            print 'failed ondata,',str(e)
            time.sleep(5)
    def on_error(self,status):
        print status

auth = OAuthHandler(ckey, csecret)
auth.set_access_token(atoken, asecret)
twitterStream = Stream(auth, listener())
twitterStream.filter(track=["को".decode('utf-8', 'ignore')])

La Alquimista 09:30, 9 April 2014 (UTC)[reply]

Record the time at the start, and then periodically check to see if your specified interval has elapsed. This is easier than using threads or timers; it has the disadvantage that it won't interrupt the script if it gets stuck somewhere (e.g. in a really slow connection to Twitter). This example repeatedly polls for user input, and quits after 30 seconds - but it won't interrupt the user inputting (that sounds like what you want too - you won't want to interrupt processing a specific tweet, you just want to quit gracefully some reasonable time after your time limit has expired).
import time 

start_time = time.time()

while True:
    raw_input('>') 
    if (time.time() - start_time) > 30.0: # are we more than 30 seconds from when we started
        break # you might want to do a sys.exit() here
-- Finlay McWalterTalk 12:42, 9 April 2014 (UTC)[reply]

The simplest way is with the signal.alarm() function. You set an alarm to raise a signal after 5 minutes, and register a signal handler that gracefully shuts the program down. There is an example in the doc page. It's kind of inflexible because it means your stream reader has to run in the program's main thread and you have to handle the exception there, but doing it the "right" way (involving a timer in a separate thread kicking an asynchronous exception into the streaming thread) is a big pain that you really don't want to deal with right now. 70.36.142.114 (talk) 20:30, 9 April 2014 (UTC)[reply]

signal.alarm() is available only on Unix(alikes); La Alquimista is developing on Windows. -- Finlay McWalterTalk 21:12, 9 April 2014 (UTC)[reply]
Oh ok, I didn't see the Windows mention and didn't realize anyone still used Windows. In this case the easiest thing is just check time.time() in the ondata method, and if it's more than 300 sec from the start time, exit the program. This means it can take longer than 5 minutes if there's no tweets for a while, or if there's a network hang. The stream protocol seems badly designed in that regard. A brutal method would be to launch a thread that sleeps 5 minutes then os.kill() the process. Or it might possible to send some other signal that the main thread can catch. 70.36.142.114 (talk) 21:45, 9 April 2014 (UTC)[reply]
Instead of killing the process from the sleeper thread (which won't execute with statement finalizers, etc.), it would probably be better to call thread.interrupt_main(). But I strongly advise against using either of these approaches (sleeper thread or signal), because of the risk of deadlock. Asynchronous exceptions are a rat's nest. Polling (of time.time() in this case) is the only safe way to interrupt a thread. -- BenRG (talk) 00:19, 10 April 2014 (UTC)[reply]
Yes, the issue is that I don't see a reliable way to poll with a bounded interval, because the stream operation can go off and twiddle its thumbs for an indeterminate amount of time. I don't even see any mention of the Stream interface in the tweepy docs. Doing precise timeouts around synchronous socket operations in Python is quite a hassle and I remember battling with the issue from some time back. Yes, killing the process from the sleeper thread is extremely ungraceful, so its suitability depends on what cleanup you need. You could go whole hog and put the stream reader in a separate process (rather than thread) and kill that, if that's not too painful in Windows. If this is just for personal use and you're willing to put up with a bit of imprecision, then just checking the timer in ondata seems easiest. 70.36.142.114 (talk) 05:23, 10 April 2014 (UTC)[reply]
Calling sock.shutdown(SHUT_RDWR) in the sleeper thread might work. I just tried it in Python 3 on Windows 7 and it unblocks sock.recv() as though the remote had cleanly disconnected. I don't know how portable that is, but it may be preferable to the other hacks in this specific circumstance. Getting the socket object could be a hassle, judging from this source code. You could wrap _read_loop() and extract it from resp. -- BenRG (talk) 07:59, 10 April 2014 (UTC)[reply]
That's interesting and I don't think I tried it, but what if the problem is in socket.connect? E.g. there is a slow DNS lookup that you want to bail out from. I might experiment with this approach on Linux. If it works, it's a good technique to know. 70.36.142.114 (talk) 15:34, 10 April 2014 (UTC)[reply]
Thank you for your answers everyone. I don't need precision right now, and crude hacks work fine as long as they get the work done. I didn't want to poll for user input, so I just created a function with the entire streaming code inside, which accepts a time value and runs the script for that duration. Works fine till now. I don't require the code to run for more than 3 or 4 minutes at a stretch anyway. La Alquimista 06:16, 10 April 2014 (UTC)[reply]
Wait, how does your function run the script "for that duration"? I thought that was the whole difficult task here. 70.36.142.114 (talk) 15:34, 10 April 2014 (UTC)[reply]

Network Anonymity

Theres an office policy in place that restricts visits to certain websites, like youtube and facebook, etc. but by using psiphon3, office staff is able to circumvent the normal block and visit these websites. Is this because IT doesn't realize that its being bypassed, but it knows its being bypassed, or perhaps it does'nt even know that it does'nt know? Is this a sound manner of maintaining network anonymity, or are these page visits still being logged but just not amounting to trouble in the short run? Normally, penalties are dealt out if IT finds someone visiting social media, etc. during billable time. Thanks you. BobbyDay33 (talk) 11:37, 9 April 2014 (UTC)[reply]

I've never used psiphon3 before, but its website says it uses "VPN, SSH and HTTP proxy technology to provide you with uncensored access to Internet content." What this means is that there's a computer sitting between your network and the internet. You're communicating directly with that computer and telling it what sites to go to, and that computer passes it on to you. Some HTTP proxies are not very secure, in which case the network operator may be able to see the traffic between you and it, but it seems likely that in this case it's encrypted (VPNs always are, as far as I know). So as long as the data is encrypted, only you, the VPN, and the site you're visiting are able to access it.
That being said, VPNs and proxies are widely used and the IP addresses they use are frequently shared. So while your IT department wouldn't be able to see the site's you're going to, it'll look awfully suspicious that all of your traffic is going to and coming from a single other computer. Then if it's a known proxy and IT bothers to check up on it, it'll be clear that you're using a proxy. My guess is that's as worthy of a penalty as anything. --— Rhododendrites talk12:24, 9 April 2014 (UTC)[reply]
That may be so, but there're dozens of people working at this office and the likelihood of them giving 25 people or more a penalty for doing the same thing when they've been doing it for over a year is unlikely, but I'm not here for legal advice. I went to the website and couldn't make any sense of the computer jibber jabber, but you're saying that it's untraceable. Seems pretty odd that something as sophistocated as a firewall can be so easily circumvented by something as silly as this VPN thing. DobbyBay33 (talk) 12:48, 9 April 2014 (UTC)[reply]
The normal practice would be to block the VPN itself for exactly that reason. Either they don't know about it or they're not very good at their jobs. I suppose the former implies the latter. -- BenRG (talk) 16:23, 9 April 2014 (UTC)[reply]
In defense of the IT department, BenRG, the "security hole" is in this case that a privileged user - an employee inside the firewall - is colluding with an outsider - the external proxy-server or VPN provider. In that sense, there is a privilege escalation by way of social engineering (making an external service that is appealing to users inside the corporate network). At best, the firewall is circumvented; at worst, a malicious attacker who runs the proxy-server now has an entrypoint into the secure network. If the employees inside the firewall had not intentionally opened up this avenue, the firewall would probably be secure from outside intrusion. As always, computer security devolves into a question of who should be trusted; in this instance, employees were permitted to open a VPN connection - that could be a legitimate business-need that should not be blocked. However, the IT department trusted that employees would not open a VPN connection to an external party; but some employees choose to do so anyway. A draconian department could start black-listing and white-listing individual socket-ports and individual employees; but the management overhead may outweigh the reward.
IBM publishes a book series, the Red Books, and there are voluminous writings on the subject of Best Practices for IT departments - covering the technical, non-technical, and business strategies that work for enterprises. Here's a series on Firewall Best Practices for System Z. Microsoft also publishes a guideline, Windows Firewall Integration and Best Practices, which is geared towards individual users. The point is, an IT department's security strategy has to be considered as part of a larger picture whose requirements are driven by other-than-technical details. It's a bit mean-spirited to start lobbing around claims of incompetence; a lot of IT professionals know exactly what they're doing; and yet, they take flak from all sides for being too draconian, not draconian enough. The department becomes the social piranha of the corporation. Nimur (talk) 17:28, 9 April 2014 (UTC)[reply]
Yes, you're right. -- BenRG (talk) 18:37, 9 April 2014 (UTC)[reply]
Many IT departments chafe at the idea that they should be responsible for proactively policing the unprofessional behaviour of others, like some kind of cyberlogical Bottom Inspectors. Having issued the policy, and taken the reasonable technical step of blocking the sites at the firewall, the might reasonably say that, in a professional workplace, it's not their job to stop their coworkers from breaking that policy anyway. Particularly when someone has taken the overt and proactive step of setting up a VPN to wilfully circumvent that policy, they've opened themselves up to being fired for cause. -- Finlay McWalterTalk 17:06, 9 April 2014 (UTC)[reply]
Yes, what Finlay said, but using many more words! Nimur (talk) 17:33, 9 April 2014 (UTC)[reply]
Seems pretty odd that something as sophistocated as a firewall can be so easily circumvented by something as silly as this VPN thing - well there are three ways that the security department could stop it - 1. stateful packet inspection, 2. Only allowing connections to specified hosts, 3. blocking proxies a) from a public proxy list or b) by testing outgoing hosts dynamically an maintaining an internal list. But why bother? You can visit these sites on your phone, and a moderate amount of fun makes people more productive. All the best, Rich Farmbrough, 23:51, 9 April 2014 (UTC).[reply]

control and scroll in outlook 2003

anyone know why i cant control+scroll (with mouse wheel) to zoom in on a message in outlook 2003? i can do this in everything but outlook 2003.3453451a (talk) 15:44, 9 April 2014 (UTC)[reply]

It's a common feature in web browsers but not in other programs. Microsoft Outlook is not a browser. PrimeHunter (talk) 23:32, 9 April 2014 (UTC)[reply]
I'm afraid the above is not correct. I can use Control+scroll to zoom in all my office 2003 programs, including excel, word and outlook, I have just confirmed. I have windows xp with office 2003 and can control+scroll messages, both when i open the message and even in the Outlook preview pane. As to why it is not working, that would require some troubleshooting. Can you confirm it works for you in MS Word? Vespine (talk) 23:54, 9 April 2014 (UTC)[reply]

April 10

Will a standard internal optical drive fit in this bay?

Will an internal optical drive that is designed to be accessed externally (like most of them) go in a bay like this one in a Dell XPS 8300, with a door over the drive and a button on the side? Photo shows drive door open and Photo shows drive out with my finger on the open-close button. Bubba73 You talkin' to me? 04:30, 10 April 2014 (UTC)[reply]

It looks pretty standard to me, but it would be more useful to have a pic with the door closed. The drive should be 5.25" wide and 1.6" tall if I remember right. Based on web search finding the xps 8300 is a recent machine, it's likely to take a standard Serial ATA optical drive (older computers used Parallel ATA). By comparing the pictures of the connectors in those articles with the one on your drive, you should be able to figure out which type you need for sure. 70.36.142.114 (talk) 05:13, 10 April 2014 (UTC)[reply]
The motherboard has SATA connections. It looks to me like I will have to take off the door from the case to get to the button on the new drive, unless the button on the side somehow will work on the new drive. Photo with the door closed Bubba73 You talkin' to me? 05:22, 10 April 2014 (UTC)[reply]
Well, if the button on the case will send a signal to the new drive to open/close, then it will work. The drive that needs to be replaced doesn't have a button on it. So the issue is whether or not the case switch will send the new drive the open/close signal. I suppose it must. Bubba73 You talkin' to me? 05:43, 10 April 2014 (UTC)[reply]
Oh I didn't understand what you meant about a button on the side. You mean some kind of remote button wired from the case? I think you should open up the box and see where the wire goes. Am I correctly understanding you're trying to replace this drive? 70.36.142.114 (talk) 06:41, 10 April 2014 (UTC)[reply]
Yes, I am replacing the drive that is in there - it won't write past a certain point. The button on the case is not a mechanical button that presses the button on the drive - it must be an electrical button that sends an open/close signal. I'll look inside. Bubba73 You talkin' to me? 15:26, 10 April 2014 (UTC)[reply]
I should clarify the way it works. Pushing the button on the case does not open the door - it tells the drive to open and that pushes the door open. When you press the button again, the drive goes in and a spring pulls the door closed. Bubba73 You talkin' to me? 17:03, 10 April 2014 (UTC)[reply]

Well, it turns out that the one in there was a standard one - I just couldn't see the button from the outside. I replaced it with a new drive and it fixed my problem writing to disks. Bubba73 You talkin' to me? 20:39, 12 April 2014 (UTC)[reply]

Resolved

Phoning Australia

This question is not asked from the perspective of someone such as JackofOz. I'm an American :-)

Friends of mine moved from the USA to Australia some years ago, but they somehow have a setup whereby I call their old Indianapolis phone number and it rings in Frankston. How does this kind of thing work? They recently sent a bunch of American acquaintances an email (basically "remember the time difference!") and mentioned VOIP, but I can't understand how the two are related (this is a real phone call, area code 317, not a Skype call), let alone how I can dial an Indiana phone number and get someone in Victoria. Nyttend (talk) 06:18, 10 April 2014 (UTC)[reply]

VOIP operators such as Vonage offer a variety of services whereby a 'real' telephone number is ported onto their system (much like if you switch landline or mobile provider and wish to retain your number). Inbound callers then ring a 'local' number which is routed through to the service provider who transmit the call on their own network (in this case, over the internet). The call can be received on an internet enabled device anywhere in the world. Some providers even offer interface units to allow the reciever to use a normal telephone. Likewise Virtual numbers are available, where you can choose a number in any country for people to ring you from (as used heavily in call centres and support lines). So if you wish you could have a 'local' number in 5 countries that redirect to a VOIP phone in Australia, with the callers only paying local rates. Nanonic (talk) 07:00, 10 April 2014 (UTC)[reply]
I'm guessing the OP doesn't really understand what VoIP is anyway. If your phone last mile is fibre, it very often will be partially VoIP nowadays even if it's not marketed as such and is designed to be transparent to the end user. I think even a large percentage of fibre backbone including that used for voice is entirely IP, although I'm less sure of that. (Similarly LTE (telecommunication) is supposed to result in a final move to an all IP packet switched network although the actual implementation of voice over LTE seems to have been slow.)
Our article on VoIP isn't brillant but it does seem to cover the basics including the fact that VoIP is voice over internet protocol, not voice over internet. What people would call the 'internet' doesn't have to be involved at all in VoIP. If I call someone on a LAN, it could be the internet isn't involved at all, in fact there could be no internet connection at all but I would still likely be using VoIP, unless for some reason I'm really not using IP which is unlikely for any simple LAN and probably most complex ones.
Note also the Skype comment seems confused. Even Skype is able to provide real phone numbers in a number of countries, see e.g. [1] [2] [3]. (I don't know if Skype supports porting in any country but the OP seemed to think you couldn't have a real phone number with Skype.) And of course people have also been able to Skypeout to a real (Public switched telephone network derived) phone number in many countries for a while.
Nil Einne (talk) 13:25, 10 April 2014 (UTC)[reply]
You didn't mention if this is a landline or a cell phone. Cell phones can operate over various area codes. One of my family members lives in Mexico but still uses her California area code. — Preceding unsigned comment added by Justin15w (talkcontribs) 14:40, 10 April 2014 (UTC)[reply]
Call forwarding. 70.36.142.114 (talk) 19:58, 10 April 2014 (UTC)[reply]
Response to two separate people: (1) The Indiana number is a landline. I think it's a landline in Victoria, since I've called them several times, and it always seems to be answered by a different member of the family. (2) Nil Einne, I really don't understand VOIP much at all. Before asking this question, I decided to read the VOIP article, and all that happened was that I got more confused. Among other things, I didn't notice that it didn't require Internet usage. I definitely didn't realise that you could have a real phone number with Skype; I thought it was something you downloaded from their website (with payment if you want extra features) and installed on your computer, and nothing more. Nyttend (talk) 01:03, 11 April 2014 (UTC)[reply]

Architectural style

What does architectural style in informatics mean? Is it a synonym to architectural pattern, so that simply a hatnote in architectural style should be added? Or is it more complicated? --KnightMove (talk) 08:05, 10 April 2014 (UTC)[reply]

Windows XP - gone slow, no patch forthcoming

I have a Dell OptiPlex GX520 (the BTX Small form Factor (Matrix Cypher Case) - it looks very much like this) with Pentium 4 running at 3 GHz with 3.6 GB hard disk and (allegedly) 1 GB RAM, Windows XP Pro SP3.

Microsoft announced some time ago that they would stop supporting Windows XP. They did this following the patch update of 8 April 2014. After that update (which contained five separate patches), I rebooted as advised, since when my PC has run slower; sometimes the keyboard or mouse seems to stop responding, only for whatever I've typed/clicks I've made to suddenly appear a few seconds later. Some applications are noticeably slow to launch. Has anybody else reported this? Given that Microsoft won't be fixing it (even if it is a bug in the latest patches), what's the way forward? --Redrose64 (talk) 13:16, 10 April 2014 (UTC)[reply]

Linux. All the best, Rich Farmbrough, 17:47, 10 April 2014 (UTC).[reply]
Your slowdown may be from a virus infection. Don't try to cure it. Ditch XP. Use Windows 7 if you have to stay with Windows, Linux otherwise. Stay away from Windows 8. 70.36.142.114 (talk) 19:56, 10 April 2014 (UTC)[reply]
Windows 7 won't fit. It takes 8 gigabytes on the HDD, bare minimum. - ¡Ouch! (hurt me / more pain) 07:29, 11 April 2014 (UTC)[reply]
My mistake. The HDD is 36 GB, not 3.6 GB - long rows of unseparated similar digits. --Redrose64 (talk) 13:13, 11 April 2014 (UTC)[reply]
Windows 8 is actually known to generally perform better than Windows 7 with borderline configs (actually most comfigs but it's less noticeable). That said, the cost and complexity of moving to either is probably not worth it on such an old PC unless you happen to have a free or very low cost option available (e.g. uni MSDN access). Some *nix may be worth considering. Nil Einne (talk) 18:05, 11 April 2014 (UTC)[reply]
If you haven't already done so, first try a reboot.
If your PC started running slower immediately following those patches, then they would indeed appear to be the culprits. If you have a checkpoint you can go back to, that might be worth trying (save a checkpoint as is now, in case you ever need to go back). Also, my understanding is that "no longer supporting XP" just means no more future patches will be released, you can still go to their web site to get the old patches. So, you might be able to go to a previous version that still worked well.
Increasing the RAM might also fix the problem. Download and run the http://crucial.com Crucial Memory Advisor™ Tool to see what you can expand it to, and about how much it will cost. StuRat (talk) 13:21, 11 April 2014 (UTC)[reply]

Is the heartbleed bug something we should be paranoid with?

Is the whole commotion around this bug just a media hype? As I understand it, an attacker can only get 64k, fetched at random, and it's improbable that someone discovered it before the researchers who reported it (and apparently acted in good faith). There are certainly other non-addressed security flaws out there: ebay does not use https, Windows XP is not being maintained anymore, people still click on links received by email from an unknown source, and all sort of weak passwords. OsmanRF34 (talk) 13:19, 10 April 2014 (UTC)[reply]

There has been discussion at WP:VPT#Heartbleed bug?. --Redrose64 (talk) 13:21, 10 April 2014 (UTC)[reply]
The discussion there primarily seems to concern the possible effect of the bug on wikimedia sites, not so much the more general effects. I doubt a wide spread discussion of such will be particularly welcome there either.
Anyway as for the OP, I don't think it's completely improbable someone with malicious intents discovered it before the researchers did. More to the point, now that it's out there, anyone who wants to use it for malicious purposes has probably had little sleep gathering as much as they can from the remaining unpatched servers. 64k may not sound like a lot, but as I understand it it's actually often not that difficult to hammer a server repeatedly without much risk of being blocked. And of course anyone who seriously wants to take advantage of this likely has large zombie nets they can use anyway.
While there are obviously plenty of other security risks out there, this is particularly widespread and basically can have a significant effect on the end user without the end user having much control, or at least not in a simple or obvious manner.
If you're correctly concerned about the security risks from Windows XP, the vast majority of people have the option of just not using it, at least on an internet connected PC.
If you're worried about eBay not using HTTPS, either don't use eBay or don't reuse your eBay password somewhere else particularly not on PayPal or some payment gateway (worst case scenario someone compromises your account and destroys your profile by selling stuff and not delivering or bidding on stuff but not paying).
Okay you can avoid any servers with the bug, but you have to test them first and it could easily be a bit late now. There have been somewhat similar problems in the continual stream of servers leaking their user accounts and passwords and occassionaly credit card info due to poor security but these are generally only one or two major sites at a time. (Edit: Credit card info can also come from other sources such as poorly secured payment machines or processing networks.)
And getting back to my earlier point, when did you first hear of this bug? Some people suggest people stay away from the internet, or at least anything where they want some degree of confidence people aren't going to snoop on their activity given the difficult knowing precisely what's at risk and what isn't. I think this may be a bit extreme but in any case, by the time someone heard this it may have already been too late. E.g. Yahoo was at risk, IIRC by the time I heard about the bug they had already patched as had wikimedia, but this probably wasn't the case for those with malicious purposes.
Incidentally, provided someone isn't using Tor or other networks with an extremely untrustworthy middle, probably security agencies are the biggest risk for man in the middle style attacks in general. So yes while eBay's alleged practices may not be ideal and there may be a few who either get lucky or have people in the right places, it probably isn't as risky as it seems. Yet a lot of the risks of the bug don't require anyone in the 'middle', my connection to the server can be completely trustworthy but the server may still give away stuff I don't want them to other people with malicious purposes.
OTOH when it comes to MITM, there are also some other risks (of unclear frequency) that are somewhat different from the norm, e.g. a leaked private key and the risk of that to both current traffic but also any past traffic that's been recorded if Perfect Forward Secrecy isn't used. (Obviously there is always some risk that the private key is going to be exposed at some stage, but it may not have been thought so many as may or may not happen here depending on how likely such a scenario actually is with this bug.)
In other words, whether this bug is really as bad as some, including some security researchers are making it out to be, I can't say for sure but it definitely doesn't seem like a run of the mill thing.
P.S. I forgot to mention but another thing about this bug, as I understand it, it's difficult for anyone to know if it's been exploited unless people turn up with stuff which they can only presume was found from an exploit. You may be able to test and work out what could have been gathered from successful exploitation and I guess you could also implement something to try and monitor current exploit attempts now that it's known, but that's about it. This compares to many other exploits where often there's something in some log, even if the admins only realise it too late.
P.P.S. Probably the biggest thing against this bug being useful is not really the size but the 'random' but. And not that the info that may be revealed may not be useful, but that it may not be easy to automatically parse all you find to actually get the useful info. Stuff like credit card numbers and username/passwords could potentially be picked automatically. Trying to find and assemble a servers private key, even if it is revealed may not be so easy. It's the sort of thing that some manually work may be worth it if you're interested in that sort of thing, but as with most things, it's a matter of scale.
Nil Einne (talk) 14:08, 10 April 2014 (UTC)[reply]
I think that extracting a private key from the leaked data would be easy, even if there is no identifying prefix or suffix. You have the public key, and testing whether a private key matches a public key can be automated, so you just test every substring of the appropriate size. -- BenRG (talk) 22:14, 10 April 2014 (UTC)[reply]
As with the Target breach, I think there's a low probability that it will harm you personally, but it's worrying. In terms of potential impact, I think it's the worst security failure in the history of the public Internet. It is easily exploitable, it has affected an enormous number of servers for up to two years, and there is probably no way to tell whether it was exploited in that time. Bruce Schneier ranked it 11 on a scale of 1 to 10. The actual impact is hard to guess. It could be limited to the current IT staff all-nighters. The biggest problem is the ongoing loss of trust. You can't be sure that an affected server didn't have its private key stolen. Anyone who stole the private key can impersonate the server (MITM), even if the server no longer uses that key. To prevent this, the old keys or certificates have to be revoked. But the number of affected servers is enormous: the revocation list would be too large to ship with every SSL/TLS library. We might end up with everyone having to use OCSP. And there's no way for a customer of a web site to be sure that the site's operators have revoked the suspect keys as they're supposed to. It's a terrible mess.
I suppose someone could write a browser extension that popped up a warning if a site has a certificate issued before April 8, 2014. Except that according to this post, at least one CA is issuing replacement certificates with the same valid-from date as the compromised certificates. Great. -- BenRG (talk) 22:14, 10 April 2014 (UTC)[reply]

AutoCAD

I am using AutoCAD LT 2012.

I have a model in model space and extra stuff in layouts in paper space.

Once I have got the viewports setup, is there a way of freezing/locking the model so that I can't edit it through the layout viewport, even when on the MODEL sub-tab. To edit the model I want to have to leave the layout page and go back to the MODEL page.

I feel convinced I've come across a drawing setup to do this, but I don't know how.

I know it could be done by using separate layers on models and layouts and locking the model ones but this feels a bit cludgy.

Thx. -- SGBailey (talk) 14:39, 10 April 2014 (UTC)[reply]

You want to lock the viewport, to do this - select the viewport itself, open its properties and set Display Lock to Yes. In some versions of AutoCAD you can do this in paper space by clicking the padlock at the bottom left of the screen. Nanonic (talk) 06:27, 11 April 2014 (UTC)[reply]

Python Global Variables

I'm in a spot of trouble with global variables. What I want to do is something like this (this is just a skeleton of my entire code):

class Stream_Tweets():
	tweet_database=[]
	tweets=[]
	def Streaming(duration):
		#function that streams tweets for duration,details redacted
		#global variable stores streamed tweets in a list
		global tweet_database
		tweet_database.append(tweet)
	def Cleaning_Up():
		#function that cleans up tweets,repetitions, removes hashtags, etc
		#global variable gets updated to store only cleaned up tweets
		global tweet_database
		tweet_database[i]=clean_tweet
	def Sentiment_Analysis():
		global tweets
		for tweet in tweet_database:
			tweets = #store the tweet, and the sentiment score

After I wrote this, there were errors saying something about unbound functions for Cleanin_Up() and Sentiment_Analysis(), so I added a @staticmethod decorator at the top of each. But now I'm getting errors that say "global name 'tweets' is not defined" or "global name 'tweet_database' is not defined. The code appears to work, however, if I define the global variables outside the class Stream_Tweet(). But in that case, when I run the following snippet multiple times:

f=Stream_Tweets #Object 
f.Streaming(100) #Stream for 100 seconds
f.Cleaning_Up()  
f.Sentiment_Analysis(10)

Instead of the database getting rewritten everytime I stream fresh tweets, the new tweets get appended to the old ones. So, to sum up, can someone explain, in very layman terms what staticmethods are (I've googled it, but I still don't get it), and how to make it so that my global variables are declared inside the class, are available for all the functions inside the class, and everytime a new object is created, the values of the global variables are initialised to [] ? Much thanks for your patience. La Alquimista 14:55, 10 April 2014 (UTC)[reply]

You don't need global for any of this. "static" stuff is shared between all instances of the class; nonstatic (aka "member") stuff has its own copy for each instance, which is referenced through the "self") parameter:
#!/usr/bin/python

class Stream_Tweets():
        tweet_database=[] # static variable - shared between instances

        def instance_method(self, tweet):
                # instance methods can access static content too; it's still static, even though its accessed through self
                self.tweet_database.append(tweet)

        @staticmethod
        def class_method():
                # this is a static method, so one uses the class name to access static storage
                print Stream_Tweets.tweet_database


# create two instances of Stream_Tweets(), and show that they share the same internal tweet_database,
# because it is static
a = Stream_Tweets()
a.instance_method("uno")

b = Stream_Tweets()
b.instance_method("dos")

# print the results
b.class_method()
-- Finlay McWalterTalk 15:15, 10 April 2014 (UTC)[reply]
Maybe this will clarify things for you (and maybe it'll make things worse...): add
print id(a),id(b),id(a.tweet_database),id(b.tweet_database)
and you'll get something like
     10568768 10568840 10438920 10438920
note that a and b have different ids (they're different objects) but a.tweet_database and b.tweet_database have the same id - it's the same object with two different means of accessing it. -- Finlay McWalterTalk 15:24, 10 April 2014 (UTC)[reply]

I'm beginning to see it now. I don't get the "self" thing though. Python has dynamic typing, so I guess when it sees self.tweet_database.append(), it understands that self is an object and thus, we can call a function like Example(self) by using a.Example(), that is, without adding parameters inside the (). However, suppose that there's a function which has self in its arguments list, but doesn't use it as an object anywhere inside the namespace. In that case, when we call that function with specifying any parameters within brackets, will Python throw up an error like "this function takes 1 argument"? La Alquimista 16:38, 10 April 2014 (UTC)[reply]

Yes, it will. There's a special rule (one might call it a hack) in Python that when an attribute is looked up, and it's found in the object's class (not in the object itself), and it's callable, and not a static or class method, you get back a wrapped version of the function that inserts the object as the first argument when you call it. E.g., foo.bar returns the equivalent of partial(class(foo).bar, foo), with the result that foo.bar(x) works out to class(foo).bar(foo, x). The function-call parentheses don't need to be there: you can assign foo.bar to a variable and call it elsewhere like any other function object and still get the implicit self argument, which is often useful. -- BenRG (talk) 18:10, 10 April 2014 (UTC)[reply]
(I think I misunderstood your question when I wrote "yes, it will". The magic I described above is the only magic. Python doesn't look at the number of parameters or their names. Calling the first argument "self" is just a coding convention.) -- BenRG (talk) 18:57, 10 April 2014 (UTC)[reply]
Make sure you understand the self convention before proceeding further. BenRG explained but if there's still any unclarity, go ahead and ask further questions about it rather than remaining confused. As a subjective stylistic matter, I'd advise avoiding either global or class-level static variables if you can. If you want instances to share a database, pass the database into the instance constructor every time you make a new instance. That makes the program more flexible and easier to test, since you can instantiate multiple databases (including mock objects) if the need arises, and there's generally less hidden magic around. 70.36.142.114 (talk) 20:05, 10 April 2014 (UTC)[reply]

Another thing worth knowing about is the following unfortunate behavior:

>>> x = 'global'
>>> class Foo:
...     x = 'class'
...     @staticmethod
...     def bar(y=x):
...         return x, y
...
>>> Foo.bar()
('global', 'class')

Expressions in the direct scope of the class statement (such as the default expression for y) can refer to the class's x as x. But in subscopes, the class scope is simply ignored, and you will see a binding from an outer function or global scope if there is one. Python is designed in such a way that scoping can be resolved at compile time, which means that implementations could reject such code with an error like "references to Stream_Tweets.tweet_database must be qualified", which would have been helpful in diagnosing your original mistake and even more helpful in preventing the subtle bugs that can arise when both class and global bindings exist. But there are probably programs out there that rely on the current behavior, so it can't be fixed. Until Python 4. -- BenRG (talk) 00:02, 11 April 2014 (UTC)[reply]

outlook 2010 spellcheck two different languages in same message

i cant get outlook 2010 to correctly spellcheck when writing a message in two different languages. by default it spellchecks in english, and i write in english and french in the same message, so the french is spellchecked as english (if that makes sense). e.g. this is message: "Bonjoure mes garcins. Helli thare." Spellcheck corrects "Bonjoure" and "garcins" as thinking they are English words, when really they are french, but it correctly corrects "helli" to Hello" and "thare" as "there". And yes i do have "detect language automatically" checked.Billybob007 (talk) 15:45, 10 April 2014 (UTC)[reply]

.xls file password lost

A protected .xls file is telling me the password I enter is wrong. The password I enter is what I remember and have used for a while, and it is also recorded in a .doc file on a thumb drive where I keep copies of several important files, including this one. The copy on the flash drive (updated March 31) also says I have the wrong password. Is there a way to bypass the normal password protection and get into the protected file? --Halcatalyst (talk) 17:27, 10 April 2014 (UTC)[reply]

Never mind -- now it works. --Halcatalyst (talk) 17:41, 10 April 2014 (UTC)[reply]
Keeping the password on the thumb drive where you keep the document is ... unusual security practice. All the best, Rich Farmbrough, 17:54, 10 April 2014 (UTC).[reply]

Odd issue after updating to Ubuntu 13.10 from 12.10-Keyboard/Mouse not working

After updating to 13.10 from 12.10 there is a problem with the OS. It bots in to the Unity desktop, but with no cursor and no mouse. I can't even use the keyboard to open a terminal. It also says in a bubble to the side that my wireless has been disconnected.

I believe the problem here is that some time before the update I installed a Nvidia proprietary driver as I am using a GTX 660.

If I use the USB recovery to remove the driver, what packages do I need to purge/reinstall? Or is it not the driver? KonveyorBelt 17:33, 10 April 2014 (UTC)[reply]

JSON

In JSON, tweets look something like this:

{"created_at":"Thu Apr 10 17:24:21 +0000 2014"
"id":454308917812531200,"id_str":"454308917812531200"
"text":"RT @Bihar_ke_lala: blah blah blah"
"source":"web"
"truncated":false,
"in_reply_to_status_id":null,
"in_reply_to_status_id_str":null,
"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,
}

If a tweet is actually a retweet of someone else's tweet, then the tweet might be truncated in the main "text" field, (even though the "truncated" field will still show a "false" value). Instead, the main text of the original tweet can be found in a new field called retweeted_status. This field appears only in retweets, and is absent in other tweets. I'm trying to check for this field in Python, and have tried giving something like this:

if data[retweeted_status] != None:
       #get the text of the original tweet

However, this doesn't work and the code still throws up an error whenever a tweet with no retweet_status field is encountered. What might be a possible solution for this? La Alquimista 18:31, 10 April 2014 (UTC)[reply]

You probably want something like
    if 'retweeted_status' in data:
        text_of_the_original_tweet = data['retweeted_status']
        ...
or
    try:
        text_of_the_original_tweet = data['retweeted_status']
    except KeyError:
        ...
or
    text_of_the_original_tweet = data.get('retweeted_status')
    if text_of_the_original_tweet is not None:
        ...
Note the quotation marks around 'retweeted_status' (I assume that was just a typo on your part) and is not None instead of != None (either one works, but "is not" is faster and more idiomatic). -- BenRG (talk) 19:17, 10 April 2014 (UTC)[reply]

What's up with AT&T Uverse internet?

I've bounced around between a bunch of cable companies for Internet access over the years...this time around, it's AT&T's turn. I've had very, very bad experiences with AT&T before - so I was nervous about signing up with them again...and it seems that my worst fears are well-founded.

Sadly, what I usually do (plug my WiFi router into a wired ethernet port on the cable modem provided - and get to work) isn't working. Firstly, their system comes with it's own WiFi router - I was all for unplugging it and using my own (just like I always do) - but the AT&T tech says that this won't work - and couldn't/wouldn't elaborate on why not. The official AT&T WiFi router seems to work OK on my wife's laptop and with android phones/tablets and with our Roku contraptions. But my Ubuntu (v12) desktop computer isn't happy.

With a wired connection to my desktop machine, I get connectivity to the router and I can fiddle with it's internal settings - but when I try to get out to the Internet, nothing. So I bought a USB WiFi dongle - and with that alone, my Ubuntu machine claims to have network access - but every site I try to reach times out. If I connect BOTH Wifi *and* wired networking - I do get patchy access to the outside world. The system will load a page here and there - but very often just sit waiting for minutes at a time.

Interestingly (and as a matter of desperation) I went in and changed some of the settings on the AT&T box. One thing was that I was sick of typing in the 10 random-character password they gave me - so I changed it to something more memorable. This worked fine until I had occasion to reboot the thing - and to my horror, it reverted to the original (factory set) password again! Several other settings that I've changed are also reverted when the machine is powered off and on again.

Surfing around for answers (especially googling "Ubuntu Uverse") gets a lot of other people with similar problems - and not one single good solution to it.

AT&T's service guys are incredibly unhelpful - they say that Linux isn't supported and that's that. (I protest that my Android phone & tablet work fine and those are supported - but the tech is too stupid to know that Android is Linux! Ditto with the Roku.)

So what's up with this thing?

SteveBaker (talk) 19:23, 10 April 2014 (UTC)[reply]

Interesting. I've had plenty of problems with AT&T, but I haven't had any problem running a desktop with Ubuntu 12.04 with a wired connection to an AT&T 2Wire router. I didn't need to do any fiddling at all with internals. (What has been my experience is that their phone support people are clueless. They clearly work from a script and will often give advice that is obviously wrong.) Looie496 (talk) 02:40, 11 April 2014 (UTC)[reply]
Agreed on their phone service people being useless and working off a script. I called them when my cable was out, read them the error message coming from the cable box and displayed on my screen, then they started by asking if the cable box was plugged in. "No, it's magically displaying error messages on my screen without being plugged in !" StuRat (talk) 03:40, 11 April 2014 (UTC)[reply]
Yeah, when I had AT&T Mobility, I was unable to edit a particular wiki because a vandal in the same IP range ticked off the admins enough that they put in a range block, and when I them to complain that someone else's terms of service violations were preventing me from doing what I want to do on the internet, the call center person didn't even know what a terns of service violation was. They went and got tier two CSR, and the tier two tryed to say that the IP range I was in with their service wasn't their's. What a bunch of boloney. People can say what they want about CenturyLink's customer service, but I'll take there's over some of these other companies' customer service any day. 71.3.50.250 (talk) 20:02, 12 April 2014 (UTC)[reply]

mAh with regard to portable backup battery

This is probably a dumb question but I just want to be clear about something. I'm going on a few vacations this year so I need a portable battery backup for my phone. I'm assuming the ones with more mAh are preferable, but I'm wondering if there's any way to determine how many charges a full one can last. My phone, a Samsung Galaxy S III, has a 2100 mAh battery. Does that mean a portable battery with 2100 mAh could only charge it once? For instance I'm looking at one with 10400 mAh - does that mean it could charge it roughly 5 times before it needs to be charged as well? Thanks. NIRVANA2764 (talk) 20:29, 10 April 2014 (UTC)[reply]

I believe that's roughly right, in reality, you probably won't get that much out of it, especially if it's a cheap battery, since they probably try to inflate the figures. Vespine (talk) 23:13, 10 April 2014 (UTC)[reply]
Replacement batteries for a cell-phone are not very expensive. You could consider buying 5x, if you need 5x a full battery before you can reload them. OsmanRF34 (talk) 00:13, 11 April 2014 (UTC)[reply]
Probably more like 3 charges from the 10400 mah battery since the charging and conversion circuits aren't 100% efficient. Look at newegg.com daily deals for a few days, they have those things on sale pretty regularly. 70.36.142.114 (talk) 01:44, 11 April 2014 (UTC)[reply]
There's some loss during the recharging process -- 10% to 25% loss is typical. I'd estimate that a 10400 mAh battery could recharge a 2100 mAh battery four times, not five, before running out of power. --Carnildo (talk) 01:44, 11 April 2014 (UTC)[reply]
Where are you going on vacation that you can't recharge ? If you can't use a regular wall charger because the wall outlets will be different there, how about a car charger ? (Are car cigarette lighters the same around the world ?) A car charger might be cheaper, more portable, and last longer than extra batteries. StuRat (talk) 03:46, 11 April 2014 (UTC)[reply]
Regardless those batteries can be quite handy, on the road, on a train trip, on the plane for 24 hours, trekking in the countryside, even if you have a hotel you might not be there long enough to fully charge your phone before you head out for adventures again. Vespine (talk) 04:40, 11 April 2014 (UTC)[reply]

Note there is a 4600 mah Mugen Power battery (mugen.co) available for the Galaxy S3... it's about 2x thicker than the usual one and comes with a replacement battery door to accomodate the extra size. 70.36.142.114 (talk) 10:42, 11 April 2014 (UTC)[reply]

Also note that while there are many many low-cost no-name models available from China on ebay, they come with no warranty. Who do you sue if it ruins your equipment or explodes, melts, or catches fire? Spend the extra money on reputable brands. --209.203.125.162 (talk) 00:37, 12 April 2014 (UTC)[reply]

Background pictures for Windows 8 desktop

Years ago, when you bought a new computer, it came with several "cool" pictures/designs that you could use for your background on your desktop. Now (Windows 8), it seems that they only give you a very few dull and boring options. Is there any website that provides a variety of backgrounds compatible with Windows 8? Thanks. Joseph A. Spadaro (talk) 23:47, 10 April 2014 (UTC)[reply]

Right-click on the desktop and select "personalize". There are themes in there - a collection of related photos. Also, there is a link to get more themes. Bubba73 You talkin' to me? 00:02, 11 April 2014 (UTC)[reply]
Well, exactly. Right-click and "personalize" leads to the 4 or 5 dull and boring themes and photos of which I was aware. I never noticed that link for more themes, though. That looks promising. Thanks. Joseph A. Spadaro (talk) 00:19, 11 April 2014 (UTC)[reply]
And you can set any picture from Wikipedia:Featured_pictures as background. Download it and follow Bubba's instructions. OsmanRF34 (talk) 00:08, 11 April 2014 (UTC)[reply]
Thanks. I didn't know about that. Usually, though, when I download a random photo like that, it does not seem to quite "fit" correctly on my screen (too big, too small, too narrow, or too "spread out"). Joseph A. Spadaro (talk) 00:22, 11 April 2014 (UTC)[reply]
Try this link. Bubba73 You talkin' to me? 00:58, 11 April 2014 (UTC)[reply]
You may want to check your screen resolution at whatismyscreenresolution.com and find a good picture of that size or at least the same aspect ratio. KonveyorBelt 02:36, 11 April 2014 (UTC)[reply]
That website says I'm using 1280x720 but I'm actually using 1920x1080. You can check your screen resolution by right-click on the desktop and select "screen resolution". Bubba73 You talkin' to me? 03:52, 11 April 2014 (UTC)[reply]
Could be a big in the site or your browser accidentally or intentionally misreporting.
Could also be that your browser doesn't support DPI scaling but you're using a high DPI (specifically 150% for this case). The new Windows DPI scaling (since Vista) renders the window as a lower resolution and then upscales it for any application which doesn't report itself in the manifest as supporting DPI scaling. You can disable this behaviour on a per application basis in the compatibility settings.
(Sadly even many years after Vista many applications including browsers still don't support DPI scaling. It's starting to change since the Surface and some other tablets and laptops are starting to have high DPI settings by default but last I checked perhaps about 6 months to a year ago neither Chrome nor Firefox properly supported DPI scaling. In fact, this goes back to XP or earlier. The reason the behaviour changed in Vista was mainly because XP and possibly earlier left it completely up to the application but few did. So with Vista if the application didn't say it could handle it, Windows did it the only way it could.)
Nil Einne (talk) 14:54, 11 April 2014 (UTC)[reply]
I do have my fonts scaled up 25%, but it is acting like it is 50%. Bubba73 You talkin' to me? 18:36, 11 April 2014 (UTC)[reply]
Usually the first thing I do on a Windows Vista/7/8 PC is download Bliss (image) and change the desktop background to it. 71.3.50.250 (talk) 20:05, 12 April 2014 (UTC)[reply]

April 11

What's changed?

When I open an image in Photoshop, print it, and close it, it asks me if I want to save the changes. What changes have I made to the file by printing it? --Nicknack009 (talk) 09:52, 11 April 2014 (UTC)[reply]

You might not have made any -- all this means is that the software marks the image as "modified". Perhaps that's a bug. However, if the image is in PhotoShop's PSD format, it's possible that some metadata associated with it has been modified (e.g., "print properties"). Looie496 (talk) 12:59, 11 April 2014 (UTC)[reply]
I've noticed a similar bug in MS Paint. There if I want to save a copy of the currently displayed color file as monochrome, it refuses and insists on changing the currently displayed image to monochrome, too. When I then try to close the session, it asks if I want to save the modified file, which of course would overwrite the original color image with the monochrome one. Perhaps when you print it changes the displayed image in some way, then later asks if you want to save that change. StuRat (talk) 18:28, 11 April 2014 (UTC)[reply]
Uhmm. Don't think that is a bug. Look at it this way. Say you have a Canon 40D (sad I know). Its RAW file is 14 bit but on opening it up in PS it is displayed as 16 bit (Ok, to be pedantic in true Ref Desk tradition -it is actually 15 bits+1 only, on PS). So PS is asking you if you wish to save the converted image you see before you. Just tried it on GIMP and it closed without this message – so perhaps PS is just trying to be annoyingly helpful. --Aspro (talk) 19:04, 11 April 2014 (UTC)[reply]

Formatting Entry Fields in gnuCOBOL

I'm teaching myself COBOL using gnuCOBOL (formerly openCOBOL), and I'm having trouble with displaying formatted numbers. I define two variables as:

BalanceDate    PIC 9(8)
BalanceValue   PIC 9(7)v99

I'm using the following code to accept data for them (I hope the syntax is correct):

LINE 5 COLUMN 5    VALUE "Account Balance Date:".
LINE 6 COLUMN 5    VALUE "Account Balance Value:".
LINE 5 COLUMN 30   PIC 99/99/9999 To BalanceDate.
LINE 6 COLUMN 30   PIC $Z(7)v99   To BalanceValue.

When I run the program, I see this:

Account Balance Date: 00/00/0000
Account Balance Value: $0.00

Which is what I want. However, when I enter data, it overwrites the "/" slashes, and always starts at the left of the field, like this:

Account Balance Date: 0410201400
Account Balance Value: 1.23 $0.00

Is there a way to program this to look correct, like so:

Account Balance Date: 04/10/2014
Account Balance Value: $1.23

Thanks!OldTimeNESter (talk) 15:01, 11 April 2014 (UTC)[reply]

April 12

MSSQL: Determine size of columne/index statistics

I've a table which is heavily increasing it's size, despite I can't figure out why. I compared the row count of the table before I went sleep and it's the same count this morning, however the table size has increased 20 GB (4 Autogrowth steps of 5 GB). Also monitoring the table with SQL Profiler doesn't give me an idea what's going on to this table. My first thought was, that perhaps not the data itself has changed/increased, but some metainformation related to the table. So I tried to find out the size of the table index and found this script here (http://sqlsolace.blogspot.ch/2009/07/tsql-index-size-script.html). The results showed me that the index size is 210 GB which is unbeliveable high since the table size itself is 225 GB. Later I found this command here: exec sp_spaceused @updateusage = N'TRUE'; which also shows the index size. But the result of this command shows a index size of only 70 MB. So I'm not sure who tell me the true, but I prefer the result of the buildin Stored Procedure over the TSQL-Script I found.

However, if it's realy true the index is just 70 MB (not 210 GB) and since the table increses last night 20 GB without increasing in row count, the table must have increased somewhere else. So I'm asking me how big the "Statistics" are. There are 17 statistics, each for every column of the table. But I can't determine how big (physcial store) the statistics are. I searched for a script to determine the statistic sizes, but I din't find some. I found the command 'dbcc show_statistics(tablename, indexname)', but that doesn't show me the physical storage size too. I didn't understand the result at all. But here is one of about 145 rows:

RANGE_HI_KEY					RANGE_ROWS	EQ_ROWS		DISTINCT_RANGE_ROWS	AVG_RANGE_ROWS
B9C37EED-0480-4943-8031-03DC069E8633		966.2053	1		965			1.001614

So my question: Is there any command to determine the physical size of an statistic (not the index itself!)?

(For those who like to advice me just to drop the statistic: I can delete the columne statitics, but not the one which I suppose it's the one how is that big, because it's associated with the Primarykey-Index. Error: 'Cannot DROP the index xxxbecause it is not a statistics collection.'. I also thought about to drop the index itself, but a.) I don't really like to perform this, at least I'm not sure it that matter of my problem b.) I can't as even trying rebuild or disabling the index would give a timeout error. It seams there are some locks and I would have to kill the SPID first. But again: Before I drop the statistic and the index, I really would determine the statistic size first)

--193.47.149.78 (talk) 10:34, 12 April 2014 (UTC)[reply]

Do you have multiple indexes defined on the table ? Some newbie DB managers might define an index on every possible search field, to increase search speed, not realizing how much this increases the index and statistics sizes. If there are 3 indexes, this might explain the 70 vs. 210 sizes, where one is an individual index size, and the other is all three. BTW, an individual index size of even 70, when the data size is 225, seems high. I'm guessing that each row is rather short, perhaps around 26 bytes (assuming an 8 byte index per row) ? StuRat (talk) 13:43, 12 April 2014 (UTC)[reply]
There is only one index for the primary key, not more. Thanks so far. --77.239.48.100 (talk) 14:18, 12 April 2014 (UTC)[reply]

Why have a bunch of my Spreadsheet dates become percentages?

4173600.00%, 4171800.00%, 4172300.00%, 4173600.00%, 4173200.00%... for some reason a bunch of the dates in my spreadsheet have turned into percentages like you see here. Note that employees who aren't me input them, so I'm not sure whether they did something wrong with formatting; I'm just the in-office computery guy so I'm expected to fix it. Is there any way to figure out what dates were originally input in the spreadsheet? (Most of these dates are likely from the past few weeks, and are normally input in 4/11/2014 format) 50.43.180.176 (talk) 15:09, 12 April 2014 (UTC)[reply]

If you format the cells as dates (as mm/dd/yyyy, or whatever you prefer), they will display as the original dates. For example 4173600.00% (which is equivalent to plain 41736) becomes 7 April 2014. Dates in Excel are stored as the number of days since 1 Jan 1900 (and times as fractions of a day). As for why they changed to percentage format, I would suspect someone (accidentally?) pressed the key combination Ctrl-Shift-%, which (from memory) changes the format of the selected cells to percent, or perhaps clicked something on the Ribbon. Ctrl-shift-# is a shortcut to restore data format. AndrewWTaylor (talk) 15:34, 12 April 2014 (UTC)[reply]
Exactly what I needed. Thanks! 50.43.180.176 (talk) 15:48, 12 April 2014 (UTC)[reply]

Backing up Windows XP

So I went and bought a copy of Windows 8 for my computer since Windows XP won't be supported anymore. However, I don't want to throw away the Windows XP installation forever; I would like to back up an image of my hard drive onto a flash drive before I install the new OS. Can I just copy everything over, or do I need to use imaging software? And if I do need to use imaging software, where can I obtain such software inexpensively? 71.3.50.250 (talk) 19:54, 12 April 2014 (UTC)[reply]

Flash drives cost much more per GB than hard drives, and their data retention is not always the greatest, though hard drives sometimes fail while sitting on the shelf. Normally one backs up flash drives (expensive) to hard drives (cheap) rather than the other way around. I think your best bet is to buy a new flash drive (SSD), install it in your computer and put Windows 8 on it, and just save your old drive (with XP) in a drawer with the contents intact. The SSD will make your computer so much faster you'll wonder how you could ever stand using a hard drive, and you'll have the old drive exactly the way you left it without worrying about imaging vs whatever. 70.36.142.114 (talk) 21:04, 12 April 2014 (UTC)[reply]
That was my first thought too, but it ticks me off that I deliberately spent twice as much for a computer with a hard drive and Windows XP installed & ready to go than I would have for the same exact model PC with no hard drive, only to cave to all of the experts' urges for everyone to migrate off of XP (one of the greatest OSes created, btw). If I'm going to buy another HD, I may as well have bought one with no HD in it. I actually have a flash drive big enough to hold everything, but it's one of those off brand things off of eBay that came in from mainland China, so I can't really vouch for its quality. 71.3.50.250 (talk) 03:18, 13 April 2014 (UTC)[reply]

April 13

Importance of passwords for online forum accounts

Currently my password for all online forums is the same because I don't see the benefit for someone to overtake my account on the random forums I frequent. The only motivation I see is for spammers to take advantage of my account to post links but does that actually happen? --129.215.47.59 (talk) 03:13, 13 April 2014 (UTC)[reply]

Yes it does actually happen. 71.3.50.250 (talk) 03:19, 13 April 2014 (UTC)[reply]