Wikipedia:Reference desk/Archives/Computing/2012 July 24

= July 24 =

Copying and pasting in java-based formats
Hello everyone. I was wondering if there is any solution to this minor but nevertheless very annoying issue. When I am in java rooms--chat rooms, Yahoo! games, etc.--I cannot copy or paste any text into the dialogue fields.--108.54.25.10 (talk) 01:32, 24 July 2012 (UTC)


 * It's often considered a bad idea for external web pages and scripts/programs running on them to have access to your clipboard (which holds the data for cut-and-paste) because you may have been cutting and pasting some important private information which they could then steal. So your browser may block access to the clipboard. Other programs don't always provide full cut-and-paste functionality because they use their own text-entry routines rather than the operating system's.  So I don't think there's an easy fix. --Colapeninsula (talk) 09:00, 24 July 2012 (UTC)


 * I agree somewhat. The main thing is that your ability to paste into the text field is a function of whether or not the designer of the java program made it possible. If you cant right click and hit "Paste", try using the shortcut for it with "Ctrl + V". This may sometimes work even though menu based pastes don't work.


 * There ARE some nice java programs for IRC that allow full copy/paste functionality, but it seems this doesn't help you because you are talking about being specific places, like Yahoo.


 * Another option i have thought of is that if you really quite want this ability, i could try to write a short little program that would let you paste into IT instead, and it would type the info into the desired window very quickly, at almost the same speed as a paste. :P


 * 172.162.124.190 (talk) 10:47, 24 July 2012 (UTC)

Why do iPads sold at the online Apple Store] are SIM locked to AT&T or Verizon, even iPads bought without contract?
Go to http://www.apple.com/ to understand what I mean. Or it is just that I have misunderstood the web page? 27.66.133.220 (talk) 07:18, 24 July 2012 (UTC)


 * Various web forums say they're not SIM locked in the USA (although they do use Apple's micro-SIM not standard SIMs). iPads on Vodafone in the UK are reportedly sometimes locked, and it may vary in other countries. Also note that the 4G iPads are somewhat network-specific because different networks use different forms of 4G, so if you change network you may no longer get 4G speeds.  Incidentally, I can't see anything on your link that says they might be SIM locked - could you point to where you saw that or quote what it said.  You should contact Apple online or ask in an Apple store to be certain. --Colapeninsula (talk) 09:10, 24 July 2012 (UTC)

Just click on "Store" and then "iPad". 171.225.113.143 (talk) 10:04, 24 July 2012 (UTC)

Excel lists
Hi there,

I've got two lists of email addresses in Excel. For example, I'm going to call them "List A" and "List B". Some email addresses are on both List A and List B. What I need to do is merge the lists, and indicate on the merged list who is on each one:

Is there an easy way to use Excel to combine these lists, and flag up which people are on list A, which are on list B, and which are on both?

Thanks,

JanuaryFebruaryMarch (talk) 08:55, 24 July 2012 (UTC)


 * I would just do this manually — Excel is very quick about this sort of thing. Create a new worksheet. Paste List A's e-mails into Column A. Then write "ListA" in the first cell of Column B. Copy that, then select the entire row of column B that corresponds with List A's addresses. Paste. Paste List B right underneath List A, then also label it List B.
 * The only trick is in finding the duplicates. This is pretty easy. First, sort the list so that the e-mail addresses are in order alphabetically. Then, in cell C1 (assuming no headers, yet), make a formula that looks like this: =IIF(C1==C2,"!!!!!!!!",""). This basically says, "If C1 and C2 are equal, make it really obvious to me.". Copy and paste that formula all the way down (Excel should automatically change it to say C2, C3, C4, etc.). Now you should be able to quickly see exactly how many there are to delete and merge.
 * This approach is the easiest presuming the total number to merge is not prohibitive. If it is terribly large, then Excel is probably not the best way to handle this... --Mr.98 (talk) 11:11, 24 July 2012 (UTC)
 * Small correction to the formula - that should be, not  . AndrewWTaylor (talk) 11:35, 24 July 2012 (UTC)
 * You are right — I always get IIF (SQL) and IF (Excel) confused... --Mr.98 (talk) 12:55, 25 July 2012 (UTC)
 * Ok, so can I just check - this method will create a big double list, with the ones that are duplicated flagged up with a big "!!!!!!!!!" sign? And then can I then get a second formula that replaces the contents of the B cell with "ListA,ListB" if the C cell says "!!!!!!!!!"? (assuming I copy the C column so it's no longer dependent on the contents of column B), thus flagging up the doubles and marking them as such?


 * So for example, if "ListA" = "People I normally write to about hats", and "ListB" = "People I normally write to about dogs", I'm able to flag up all the people I normally write to about both hats and dogs, and flag them up as "ListA,ListB"?JanuaryFebruaryMarch (talk) 11:48, 24 July 2012 (UTC)
 * That's how I would do it, for a relatively small list. There are more elegant and complex ways to do this sort of thing, but one of the virtues of Excel is that with a little bit of clever sorting and flagging can you usually make the data work out without too much effort. --Mr.98 (talk) 12:55, 25 July 2012 (UTC)


 * Just a quick word of warning. Once you have created 2 columns (Column A with all the email addresses, and column B with either "List A" or "List B" depending on the origin of the address), make sure you select both columns for your sort.  It is very easy to sort one column and leave the other unsorted; resulting in you having to start again.
 * So you avoid going from:


 * to this, where the second column didn't get sorted at the same time and you lose the correspondance between address and which list they are in:


 * Astronaut (talk) 16:02, 24 July 2012 (UTC)


 * I'd suggest the  command would be a great place to start. It enables you to search for a match in a list, which is exactly what you wish to do. --Tagishsimon (talk) 21:41, 24 July 2012 (UTC)

DHCP connection
How do I enable DHCP and disable MAC filtering2602:30B:82C1:979:A131:55AA:92A2:EFD1 (talk) 15:14, 24 July 2012 (UTC)
 * That would depend on what operating system you are using.  hajat vrc  @ 16:03, 24 July 2012 (UTC)
 * Probably refers to a wireless router actually... again depends on the specific one you're using. If you reset it in most cases DHCP will be enabled and MAC filtering will be disabled. Shadowjams (talk) 04:19, 26 July 2012 (UTC)

Events in C# 2010
I am trying to program the Pokemon Trading Card Game using Visual C#2010 but I ran into a little problem. I have three objects:

Game: Handles all of the game’s data and rules.

Form1: The window shown to the player. Displays all the info the player is allowed to see about the game and allows the player to interact with the game.

ComputerAI: This object tracks what the computer is supposed to know and holds the AI’s logic.

To keep things moving, the game raises a “PriorityChanged” event, to let both the player and the AI know that priority has changed and which one received it (in the EventArgs). The Form reports this info in a log and displays the messages: “Waiting for you” and “Waiting for opponent” as appropriate. The computerAI uses it to decide if it should run its logic or not. The problem I ran into was that when the event was raised the AI was told and ran its logic (playing cards etc), this caused the player to get priority and raised another PriorityChanged, which the AI got and did nothing with (which was correct). Then the Form got both PriorityChanged events one after the other but in the wrong order.

To fix this I split the “PriorityChanged” event into two “PriorityChanged” and “PriorityRecieved”. The Forms updates the display on the “PriorityChanged” event, and the AI runs on the “PriorityRecieved” event. This solution worked, but it strikes me as wrong. Is there a better way?

Thanks 86.45.219.24 (talk) 17:21, 24 July 2012 (UTC)


 * You may wish to consider the observer pattern or the state pattern. BigNate37(T) 22:37, 24 July 2012 (UTC)

Firefox jumping to the wrong spot on a web page
Firefox 14.0.1 on Windows XP SP3 here. When I navigate to a section of a web page (say by clicking on the arrow for the section on my Wikipedia watch list), it seems to go to the proper place, then jump someplace else on the page. This also happens when I finish editing a section, and seems to be a result of me enlarging the text on the screen (View + Zoom + Zoom In). Apparently it can't properly calculate the new spacing of the enlarged text. Has anyone else had this problem, and is there a fix for it ? StuRat (talk) 21:05, 24 July 2012 (UTC)


 * It happens to me sometimes and I use default font sizes. I notice it most when there's odd markup on the page, or on sites that hotlink images from a slow server. BigNate37(T) 22:40, 24 July 2012 (UTC)


 * Old problem, more frequently encountered, I would say, with img elements that haven't been given explicit dimensions for the browser to know. Try searching http://forums.mozillazine.org/ or the like. ¦ Reisio (talk) 12:08, 25 July 2012 (UTC)


 * Thanks. StuRat (talk) 20:08, 29 July 2012 (UTC)