Wikipedia:Reference desk/Computing: Difference between revisions
→Introducing new digits (in Vista): new section |
|||
Line 132: | Line 132: | ||
= October 18 = |
= October 18 = |
||
== Introducing new digits (in Vista) == |
|||
For a while, I have been wanting to convert my computer’s clock’s digits from Arabic numerals to Roman numerals. Windows Vista does not seem to support Roman numerals, so I am hoping to find a way to introduce them as a new option to my computer. Is there some way I can change my numerals to Roman ones? --[[Special:Contributions/66.190.69.246|66.190.69.246]] ([[User talk:66.190.69.246|talk]]) 15:05, 18 October 2013 (UTC) |
Revision as of 15:05, 18 October 2013
of the Wikipedia reference desk.
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.
October 13
Question about formatting in Excel
Without doing any formatting, if I start to enter data into the cells of an Excel spreadsheet, it will look like this.
Number | Name |
1 | Smith, John |
2 | Jones, Raymond |
3 | Doe, Jane |
4 | Andrews, Mary |
5 | Stewart, Albert |
However, what I actually want is for it to look like this below. (That is, I want a little bit of blank white space – a slight indent – to the left of each person's name. I want some extra blank white space so that the person' name does not start to the immediate right of the black line separating the columns – as it does above.)
Number | Name |
---|---|
1 | Smith, John |
2 | Jones, Raymond |
3 | Doe, Jane |
4 | Andrews, Mary |
5 | Stewart, Albert |
Is there some way in Excel to format a cell (or an entire column) so that the cell has some indented blank space before (to the left of) the entry of the cell (in this case, before the person's name)? What I am doing right now is actually typing in, say, 5 or 6 "blank space" characters before the person's name. Is there a way that I can avoid typing in all these extra blank space characters, and have Excel automatically format some type of indent in the cell for me? Thanks. Joseph A. Spadaro (talk) 04:02, 13 October 2013 (UTC)
- Just to be clear, you don't want the text to be centered in the cell, right? Because that's quite easy to do but the text from one cell to the next below it won't all be justified, i.e. they won't all have the same amount of space preceding the text. Dismas|(talk) 04:12, 13 October 2013 (UTC)
- Yes, that is correct. I am not interested in a "center" alignment. I know how to do that. But, exactly as you say ... it won't make the names appear in a nice, neat, straight column that is left-justified (with the same amount of white indented space before the name). If I do "center align" a column, that will look fine for the first column above, which contains the number (only because each entry is exactly one character long). If I do a "center alignment" with the names column, there will be a "zig zag" effect in appearance, since each name has a different amount of characters than the other names. Thanks. Joseph A. Spadaro (talk) 13:25, 13 October 2013 (UTC)
- Yes, it's no problem. With the text left justified, which is the default unless you change it, you just use the indent command. Unfortunately I am using Excel from microsoft office 2008 so you probably have a later version so I do not know if you will have the commands in the same places. But go to view, open up the formatting palette and under 'alignment and spacing' you will see a field for indent. Just place a 1 or 2 in there and it will indent the cell. You can highlight and format as many cells as you want to do this to. In the formatting toolbar there are also buttons for increase indent (and decrease indent) which does the same thing. A third way is to go to menu options, choose format, then cells, then aligement, and you can indent from there.--108.46.110.208 (talk) 04:35, 13 October 2013 (UTC)
- Hmmmmm. Thanks. I never knew about any of these features that you mention. Thanks. I have Excel 2010, by the way. I will go in and take a look at the options you mention. I am glad that this seems like an easy "fix". In the past, I have fiddled around with Excel and its Help functions, but I could never find anything applicable. Or, if I did stumble across those features that you mention, I was not able to figure out how to use them. I will give this a try. Many thanks! Joseph A. Spadaro (talk) 13:34, 13 October 2013 (UTC)
- Yes, I tried what you suggested. It works perfectly. Thanks so much. The locations for these functions are slightly different in Excel 2010, compared to your references for Excel 2008. But, I was able to find them, and it worked perfectly. This does exactly what I wanted it to do. Thank you! Joseph A. Spadaro (talk) 15:16, 13 October 2013 (UTC)
- @Joseph A. Spadaro: Great!!! I figured they would be a bit different but at least one would be in the same place, which is why I listed three different ways to get there. I'm actually not a computer wizard but the programs I know I use A LOT. I use Excel every day (and I will tell you that I think 2008's version is better than all others I've tried, strangely enough). Sometimes improvements are not really improvements. Excel is one of those programs that has super really powerful tools but because it's kind of user unfriendly, 99% of people don't know the tricks, like merging cells, filling down, pasting formulas and the like.--108.46.110.208 (talk) 00:10, 15 October 2013 (UTC)
- Yes, I tried what you suggested. It works perfectly. Thanks so much. The locations for these functions are slightly different in Excel 2010, compared to your references for Excel 2008. But, I was able to find them, and it worked perfectly. This does exactly what I wanted it to do. Thank you! Joseph A. Spadaro (talk) 15:16, 13 October 2013 (UTC)
- Ha ha! Yes, I agree. Excel has very powerful capabilities. But, due to it being so user-unfriendly, those powerful features get lost on most of us. (My question above is a perfect example of that.) In fact, after this discussion above, I finally decided to buy a manual for Excel, like Excel for Dummies or Idiot's Guide to Excel. I can only imagine how much I am missing out on all that Excel can do for me. Thanks again for your help above. Much appreciated! Joseph A. Spadaro (talk) 02:54, 16 October 2013 (UTC)
Reduce saturation in GIMP
How to desaturate the color of an image (but not reduce it to black and white, just make the colors look duller) in GIMP? Czech is Cyrillized (talk) 10:01, 13 October 2013 (UTC)
- Colours->hue-saturation, drag the /saturation/ slider part way to the left. -- Finlay McWalterჷTalk 10:09, 13 October 2013 (UTC)
How does www.(some site) differ from (some site)?
Today I just visited https://commonapp.org and https://www.commonapp.org. I see the former seems to have a certificate error. So can www.somesite be a whole different site from somesite?--163.125.85.93 (talk) 13:01, 13 October 2013 (UTC)
- That site has a wildcard certificate with CN (common name) set to *.commonapp.org - that * means "match exactly one subdomain", so it would match foo.commonapp.org but not foo.bar.commonapp.org, and because commonapp.org has zero subdomains specified, it doesn't match. -- Finlay McWalterჷTalk 14:06, 13 October 2013 (UTC)
- To answer the general question, www.somesite.com and somesite.com are different fully qualified domain names, and so can be mapped to different IP addresses by the Domain Name System, and therefore to different web sites, though this would be a rather perverse thing to do. (In fact even if they're mapped to the same IP address, they can still go to different sites, by use of virtual hosting.) AndrewWTaylor (talk) 16:34, 13 October 2013 (UTC)
October 14
C++: How do I assign a bool array returned from a function to an empty array
Consider the following code fragment
bool afunctionreturningaboolarray() { .... return (someboolarray); }
It represents a function returning a bool array. If I now try to do the following
bool myboolarray[] = afunctionreturningaboolarray();
I get the following compile-time errors
error: initializer fails to determine size of `myboolarray'
error: invalid initializer
How can I assign the array returned by afunctionreturningaboolarray()
to something so that I can work with it? -- Toshio Yamaguchi 14:35, 14 October 2013 (UTC)
And yes, I understand that the problem is that the size of myboolarray
isn't known at compile time. Does that mean I would need to use a vector instead, or is there some other trick? -- Toshio Yamaguchi 14:47, 14 October 2013 (UTC)
- Your function is returning a single bool, not a bool array. And you need to consider where the storage for this array is allocated. Some workable options are:
- have the function allocate the array from the heap and return a pointer to it (function f() in the code below)
- allocate the array in the calling function and pass it by reference to the function (function g() in the code below)
bool* f() {
bool * barray = new bool[10];
for(int x=0; x<10; x++)
barray[x] = true;
return barray;
}
void g(bool (&val)[10]){ // val is a reference to an array, not an array of refererences
for (int x=0; x<10; x++){
val[x] = false;
}
}
int main(){
bool*a = f(); // f allocates the array on the heap
// do something with b[] here
delete(a);
bool b[10]; // allocate on the stack here
g(b); // pass b by reference to g, which changes it
}
- Toshio specified that s/he doesn't know the size of the array in advance. The second method in the example doesn't meet that requirement. Standard library vectors are well suited here:
#include <vector>
#include <stdlib.h>
#include <iostream>
#include <time.h>
void f(std::vector<bool>&); // returns vector of random size, element is true iff index is a square number
int main()
{
std::vector<bool> a; // empty array
f(a); // fills array with vector of random size, elements are true for indices that are squares, otherwise false
// dump the array
int len = a.size();
for (int i = 0; i < len; ++i)
{
std::cout << i << '\t' << (a[i] ? "square" : "-") << '\n';
}
return 0;
}
void f(std::vector<bool>& param)
{
srand(time(0)); // seed the random number generator
int siz = rand(); // get a random size for the array
std::vector<bool> wrk(siz,false); // a working copy of what is to be returned, with all elements initialized to false
for (int i = 0; i*i < siz; ++i)
{
wrk[i*i] = true; // set the elements with square indices to true
}
param.swap(wrk); // after swapping, wrk holds the empty array that was created in main,
// and the data to be returned is moved to param.
// swap is useful, exception safe and efficient.
// the destructor of wrk is invoked when the function exits
}
- Let me clarify this a bit. What I want to do is using a bool array to store some small prime numbers without taking up too much memory. I would create a function containing a local bool array and initially set all array entries to, say, true. Then I could set all entries where the indices are multiples of a prime number to false (essentially creating a Sieve of Eratosthenes, where the values of the primes are represented through the indices of the bool array). The advantage of (compared to using an array of ints) that I hope for is that this will require less memory (according to http://www.cplusplus.com/doc/tutorial/variables/, a boll generally seems to require less memory than the numeric data types and that might matter even if I need to store some hundreds of primes). The function would then need to return that array so that I can use it elsewhere. -- Toshio Yamaguchi 21:40, 14 October 2013 (UTC)
- Suppose you want the primes up to 1,000,000. An standard array of numbers for the primes would take (IIRC) 78,496 entries, at 4 bytes each that is 313,984 bytes. If you use one boolean value for each number (a bit vector) that takes 1 million of them. So it depends on how the boolean value is stored. If it takes one byte each that is too much, but if you pack eight boolean values per byte, that reduces it to 125,000 bytes. (Also, only 20 bits are required to store a number up to 1,000,000, so you can save memory that way.) Bubba73 You talkin' to me? 23:36, 14 October 2013 (UTC)
- You are talking about storing the numbers as a bit field, am I understanding this correctly? -- Toshio Yamaguchi 10:06, 15 October 2013 (UTC)
- NorwegianBlue's suggestion should work well if you're worried about space. vector<bool> is specialized and packs the bits efficiently, rather than using bytes or words to store a single value. However, it isn't quite a standard container and can have unexpected effects due to how references are handled. bitset is considered better but requires you to know the size at compile time. Boost has a dynamic version. See Bit array#Language support. Katie R (talk) 14:25, 15 October 2013 (UTC)
Searching an array
Hey hey. A bit of a coding question here - trying to keep it as general as possible, but if more specific details would help I can provide them. Say I have an array with 1000 elements, which are all integers, and I have another variable which is an integer. I want to search for this variable in that array, and to return either the number itself if it exists in the array, or the next highest number following it which exists in the array. Currently I'd do something like this: (horrible pseudocode mixture of several programming languages ahead)
var list = { ... } // List of 1000 integers var target = 123 // Integer to search for var return = 0 // Integer to return var temp = 0 while return = 0 if list(temp) >= target then return = list(temp) else temp = temp + 1 end end
Obviously this is terribly inefficient. I've considered perhaps starting from the middle of the list, to potentially save time, or perhaps rather than incrementing "temp" 1 by 1, we increment 100 at a time until we pass the target, then reduce 20 at a time, then increment 1 at a time, to perhaps hone in on it faster, but I can't shift the feeling that there must be a more efficient way of doing it. Any thoughts would be much appreciated. OrganicsLRO 15:30, 14 October 2013 (UTC)
- We have to assume the array is sorted, of course, but, if it is, you can do this:
N = 0 LO = 1 (or 0, if your first array element is numbered 0) HI = TOTAL_COUNT (or TOTAL_COUNT - 1, if your first array element is numbered 0)
LOOP: OLD_N = N N = (HI+LO)/2 if OLD_N = N, then number not found in array, so return element at N+1, unless beyond array bounds.
if you found number at N, end program.
if array element you are looking for is higher than the one at N, then: LO = N + 1 goto LOOP
if array element you are looking for is lower than the one at N, then: HI = N - 1 goto LOOP
- So, it divides the list of 1000 into a smaller list of either the bottom 500 or top 500, then divides that list into either it's top 250 or bottom 250, etc., until we either find the array element or are down to 0 elements left to search. This would result in only 10 compares to search the array of 1000. However, searching an array of only 1000 elements is likely to be so fast that there's no need to optimize it like this. However, if you had a billion elements, then it would take only 30 compares, versus a billion, and that would make a noticeable difference in elapsed time.
- If you assume your data is evenly distributed, then you could do a bit better than just starting in the center. For example, if your numbers range from -1 million to +1 million, and you are looking for 500,000, then that is 75% of the way from the low to the high, so you might start at element 750 out of 1000. You could then repeat this each time through the loop. However, as a practical matter, the additional time to do the calcs often cancels any savings you get from checking fewer elements, and adds significantly to the complexity and thus chance of error in the code. StuRat (talk) 15:42, 14 October 2013 (UTC)
- Which is a binary search. If the array is not sorted, there is no better method than linear search. -- Finlay McWalterჷTalk 15:58, 14 October 2013 (UTC)
- If you only need to do a single search, yes, that's true. However, if there are to be many searches, sorting the array first can make things faster. StuRat (talk) 16:04, 14 October 2013 (UTC)
- If nothing is known about the nature of the array elements, other that they are integers and they are sorted, then the binary search makes sense. But if something IS known about the distribution, for example, that the values should be spread rather evenly between the minimum and maximum, it might make sense to compute an initial guess based on the nature of the elements. But the extra overhead might not be worth it if you only have 1000 elements. Jc3s5h (talk) 16:15, 14 October 2013 (UTC)
- Yes, the last paragraph in my answer discusses this. However, we do need to know whether they are sorted in ascending or descending order. Of course, if we know they are sorted but don't know which order, a simple compare of the first and last array element will tell us this. StuRat (talk) 16:26, 14 October 2013 (UTC)
- Ah, all very clever. The list is indeed sorted in ascending order, and distribution is an interesting point, it should make a good approximate guess. This was a much simplified example - at the time I wasn't entirely sure of the list size but now it seems to be closer to a million elements. Distribution is a bit iffy but approximately even, so I'll try some combination of these ideas. Many thanks! 82.39.232.82 (talk) 19:48, 14 October 2013 (UTC)
- With a million elements, binary search will get you the result in 20 or less comparisons. It's hard to do better than that if you have any kind of overhead. --Stephan Schulz (talk) 22:24, 14 October 2013 (UTC)
- Ah, all very clever. The list is indeed sorted in ascending order, and distribution is an interesting point, it should make a good approximate guess. This was a much simplified example - at the time I wasn't entirely sure of the list size but now it seems to be closer to a million elements. Distribution is a bit iffy but approximately even, so I'll try some combination of these ideas. Many thanks! 82.39.232.82 (talk) 19:48, 14 October 2013 (UTC)
October 15
82.148.97.69
Did Qatar get a new IP address? User:82.148.97.69 was apparently the entire country's sole IP address for a while, but it's made no edits since 2008, either here or at the Arabic Wikipedia. Internet in Qatar doesn't address the issue. Nyttend (talk) 01:03, 15 October 2013 (UTC)
- Suffice to say that our talk-page for User:82.148.97.69 is presenting an overly-simplified picture of the situation. My whois to RIPE.net resolved that IP address to "Mobile Broadband Pool #6", administered by Qatar Qtel (formerly, the major telecommunications provider for Qatar), which incidentally underwent a brand-name change and a reorganization in February 2013. It is probably not technically accurate to say that the IP was assigned to, or even used by the "entire nation" of Qatar; it was probably one among the most commonly-used proxy servers. It's even probable that an extremely high percentage of users of commercially-available internet service in Qatar had their HTTP traffic routed through that proxy server at one time. You can telephone, write, or email the Qtel network operations center administrator for more details on how they route; their contact information is publicly available online. I would also point out that a naive application of the German tank problem-style reasoning suggests that there exist on the order of twelve such broadband IP-pools). Nimur (talk) 02:09, 15 October 2013 (UTC)
Urgent request: Toronto SIM card for phone and data, casual use over one month
Hi helpers. This is an urgent request, from Australia, for information to assist my wife who is just now arriving in Toronto to settle her recently deceased mother's affairs.
My wife has an iPhone 4 (not locked to any service provider; needs a micro SIM) and an iPad (no provision for a SIM card of its own). She has no computer with her, but needs reliable internet access as well as the usual telephone services. What is the quickest affordable way to organise this, with certainty that the SIM card will allow the iPhone to be a hotspot for the iPad? We do this all the time in Australia; but it is daunting to find the right method quickly in a new country.
We will be very grateful for accurate local advice (and sources of SIMs near the corner of St Clair West and Winona Drive).
14.201.134.184 (talk) 03:29, 15 October 2013 (UTC)
- It might be cheaper to get a disposable pre-paid cell phone (mobile phone) there with internet access. I'm guessing you could get that for maybe CAN$100. Exactly what Internet access is needed will greatly affect the price. If she just needs to be able to read e-mails, that should be cheap, but if she expects to watch streaming movies, that will be more expensive. StuRat (talk) 17:56, 15 October 2013 (UTC)
- Thanks Stu. But she is there to do some complex work. Her iPad is set up for reading PDFs, limited editing of Word documents, etc. A cheap new phone would not be enough. In Australia we could get a prepaid card for $15 a year, then $35 a month for unlimited calls and 5GB of data. (No commitment beyond $50. That's an Aldi card, running on Telstra 3G. And it does work in an iPhone to make it a WiFi hotspot.) We need something like that, even if it's three times the cost. I can't work it out online. Everywhere in the world the terms of use are kept deliberately confusing; for short-term visitors it's even harder.
- 14.201.134.184 (talk) 21:29, 15 October 2013 (UTC)
- There is a 2012 article on Forbes about getting cellular access in Canada as a non-citizen—it's aimed at U.S. citizens but should still apply to you. There is a great summary list at the end which spells out all the details. The writer got a free SIM card from the Apple Store (there are Apple Stores at Yorkdale and Eaton Centre, both about 7km from St Clair West and Winona Drive), then activated it at Rogers for a 500 MB prepay data plan. Not sure about tethering (using the iPhone's connection for the iPad), but there is a Wikia wiki here which has some of the details of which providers allow tethering. --Canley (talk) 00:49, 16 October 2013 (UTC)
- Useful! The Forbes article gives good technical details. I found also this discussion in which the commercially driven complexities are surveyed. It's a jungle! Anyway, that put me onto Speakout 7-Eleven, which has just recently begun offering reasonable data add-ons again.
My wife reports that most salespeople know nothing useful; and it seems that some deliberately mislead. I am reminded of how things are in Australia; but I now appreciate better what we have access to, flawed as it is by snake-oil sales talk and poor consumer protection. I think we now have enough information to get what we need. Thanks to all!
- Useful! The Forbes article gives good technical details. I found also this discussion in which the commercially driven complexities are surveyed. It's a jungle! Anyway, that put me onto Speakout 7-Eleven, which has just recently begun offering reasonable data add-ons again.
- Yes, I'm amazed at how useless the staff of retail stores can be. One told me they don't carry mini-fridges, while standing in front of a shelf full of mini-fridges. Their thought process seems to be "What answer can I give the customer which will result in the least work for me ?". And telling you they don't carry something means they can't be asked where it is, to get one down from the shelf, what the difference is between models, etc. I've also learned that "We've never carried that" really means they haven't carried it in the two weeks they've worked there. StuRat (talk) 19:51, 16 October 2013 (UTC)
- And also if they don't have something, sometimes you'll get someone who'll say "Oh, you're looking for <whatever>?" then leave and never return. This happened to me more than once, most memorable one being when I was looking for video conversion software. --.Yellow1996.(ЬMИED¡) 21:25, 16 October 2013 (UTC)
- Yes, I'm amazed at how useless the staff of retail stores can be. One told me they don't carry mini-fridges, while standing in front of a shelf full of mini-fridges. Their thought process seems to be "What answer can I give the customer which will result in the least work for me ?". And telling you they don't carry something means they can't be asked where it is, to get one down from the shelf, what the difference is between models, etc. I've also learned that "We've never carried that" really means they haven't carried it in the two weeks they've worked there. StuRat (talk) 19:51, 16 October 2013 (UTC)
October 16
96.37.197.136 (talk) 09:40, 16 October 2013 (UTC)why does twitter use @ and when do i use it? the same with # hashtag?-
- "@" followed by a username is a mention or a reply (other users can see that they have been mentioned or replied to in a tweet). See hashtag for more information on "#". --Canley (talk) 09:51, 16 October 2013 (UTC)
- Just a slight extension of that, "@" is "at" as in "at <username>" because you're replying "at" whoever you're talking to. --.Yellow1996.(ЬMИED¡) 16:14, 16 October 2013 (UTC)
- What daaaaa... I was going to ask that question right now! Oooohhh!!! Someone read my mind! Miss Bono [hello, hello!] 20:25, 16 October 2013 (UTC)
Back button disabled when I sign in (on Firefox)
Referring back to this question, I'm now experiencing the same behavior as when I created a redirect (this was not happening until very recently). When I try to go back to what I was doing before I went to Wikipedia, I am not allowed to and I keep going forward to the article I was looking at when I signed in. I was told by someone who doesn't know how to find it that it is Firefox 24.0.— Vchimpanzee · talk · contributions · 19:02, 16 October 2013 (UTC)
- And they did give me a way to get around the problem when I asked the previous question. I was hoping someone could explain why I used to be able to sign in and go back to what I was doing but now I have to cheat.— Vchimpanzee · talk · contributions · 20:20, 16 October 2013 (UTC)
- If I understand this correctly, you are at the redirect's target page; then when you press the back button, you want to be back at the redirect page, but you get redirected back to the target page that you were already on? I just tried this in FF24 (though I use IE9 for editing Wikipedia) and I didn't experience this problem. For me, in FF24 the back button loads the page how you saw it when you navigated away from it... it's possible your Firefox re-loading it (like bypassing the cache), which is maybe what is causing it to redirect you to the target page. I just tried it in IE9 and both pressing the back button, refreshing, and bypassing the cache with ctrl+F5 got me to the redirect page. Maybe the problem is just with FF. It is also possible that an addon is conflicting with the update from 23 --> 24, but that's only if you have any addons installed. --.Yellow1996.(ЬMИED¡) 21:42, 16 October 2013 (UTC)
- I added a further response to the archived thread at WP:VPT#Redirect disables back button, continued. --Redrose64 (talk) 21:56, 16 October 2013 (UTC)
Recent calls recycling in Iphone
I have Iphone 4 and i mistakenly deleted Recent calls. Is there any application which creates a recycle bin for these numbers, or at least gives me the option to make them reappear? Thanks. Ben-Natan (talk) 20:10, 16 October 2013 (UTC)
- If someone here is going to develop such a thing - he sure found himself a customer.. Ben-Natan (talk) 14:40, 17 October 2013 (UTC)
How to address a specific computer on a network (with telnet)
I'm trying to troubleshoot a connectivity issue between my computer and my mum's computer for the purpose of data backup. The CrashPlan website tells me to troubleshoot with telnet. Both computers are behind routers. The routers have IP addresses that are specific to them but obviously the computers are assigned addresses by the router. So how do I address my mum's computer for telnet? Is it something like 'telnet 216.239.51.99:192.168.2.1 4242'? If not, then how?! There are two addresses for goodness sake! --2.97.26.56 (talk) 21:07, 16 October 2013 (UTC)
- Your mum's machine is behind a router which does both network address translation and a firewall. So right now it's probably blocking the ports you're trying. You can enable that in your mum's router's firewall setting, by opening the ports you're trying to access. Secondly you need to tell your mom's router which local machine the incoming traffic should go; you do that in its "port forwarding" - you set traffic from those ports to go to your mom's actual machine. For that to be stable, you need to make sure her PC always has the same local IP address, which usually means you have to give it a stable address (rather than have it get its address from DHCP) or you need to configure her router to always give her machine (identified by its MAC address) the same IP address by DHCP. -- Finlay McWalterჷTalk 21:39, 16 October 2013 (UTC)
- But a caution - if you can access these ports, so can anyone - and hackers routinely scan for open ports. I don't know anything about Crashplan, but before opening any ports, I'd want to be really sure that the program receiving them was safe and the network protocol it used was secure. From some Google searching, it seems Crashplan can do UPnP NAT traversal - is that what you're trying to verify? -- Finlay McWalterჷTalk 21:42, 16 October 2013 (UTC)
- See also port knocking, although that probably will require additional software. --Tardis (talk) 06:04, 18 October 2013 (UTC)
October 17
"Drivers" for Android devices?
Hi desk, my problem is that I have a Snapchat (yes I know don't mock me) and it plays videos fine from most people but two people specifically send videos that result in an error message saying "Sorry, this video cannot be played". I've deduced that I think it is the format of the video they are sending that my Android phone (Kyocera Rise) is unable to play, which is why the problem only happens with these two people. Is it possible to install the Android equivalent of a driver or some new default video player that would allow them to play? I'm understanding that it's loosely like if a friend sent me an .flv file and my default player was Windows Media or something, and then I installed VLC and was able to play it. But that might be totally incorrect. Googling the error message doesn't provide too much insight. Thanks everyone! NIRVANA2764 (talk) 04:33, 17 October 2013 (UTC)
Natural Language Processing and Intermediate Languages
Has anyone attempted to go the "other direction" in researching NLP- that is by constructing languages that a computer could "understand" and communicate in, with the goal that they are as like as possible to natural languages? In other words, not trying to solve NLP, but to make a working approximation; it seems like this would be both informative and possible, the trick would seem to be balancing freedom in sentence form -vs- rules that limit ambiguous formations. Thank you for any help:-)Phoenixia1177 (talk) 06:33, 17 October 2013 (UTC)
- Lojban is certainly designed to be easy for computers to parse, and unambiguous. MChesterMC (talk) 13:12, 17 October 2013 (UTC)
- I think eventually all computer languages will be like this. In fact, writing a program might be more like a question and answer session, where the computer asks you all the requirements, in great detail, including what to do with all sorts of errors that might happen, and then constructs a program based on those requirements. StuRat (talk) 14:46, 17 October 2013 (UTC)
- That sounds familiar. (I wish I could find some of the old adverts for this product, which was marketed as "the last programming language you'll ever need", or some such nonsense.) AndrewWTaylor (talk) 15:43, 17 October 2013 (UTC)
- Well, just because there was one failure, this doesn't mean the whole approach is faulty. For example, robotics and speech recognition have been much slower to become practical than we might have hoped, but they finally seem to be making good progress now. StuRat (talk) 03:19, 18 October 2013 (UTC)
- Thank you:-) Lojban looks interesting:-)Phoenixia1177 (talk) 05:39, 18 October 2013 (UTC)
Faster to check out of bounds or add bounds on 2D tile array
Given an M x N array, each entry 0 or 1- representing if what tiles can be stepped on in a square tile map- when checking what adjacent squares can be moved to (have a 1) is it faster to:
- Check each adjacent entry and return 0 if it is 0 or out of bounds (4 checks of the array and 16 inequalities total)
- Add a border of 0's to the array and just do a single check?
In the second case, as long as you were on a viable map tile, you'd never get the okay to move out of bounds, so there's no issue with that. Also, I realize that in general, the difference will be slight, but it involves multiple entities doing the checks regularly as part of an already intensive process, so I want to remove all the overhead I can- the small hit in memory isn't an issue by itself. Finally, you can assume that M and N will never exceed 128. (In general, how does enlarging an array increase the time it takes to fetch an entry out of it?)Phoenixia1177 (talk) 07:17, 17 October 2013 (UTC)
- As to your last question, the access time for an (in cache) array is O(1), because computing the address to fetch from is done arithmetically. For a 1-dimensional array, ar[x] has the address ar + sizeof(ar's elements)*x - so it's an add and a multiply, regardless of the value of x. This will get slower depending on cache and (if it's giant) on virtual memory, but that's more a function of your access pattern than the array's size. I agree that the difference between your two ideas will probably be slight, and I think you'll have to benchmark to really know if it matters at all. If you're doing something that involves lots of checks, like implementing Conway's Life, you'll probably see much better gains by running checks for multiple tests together rather than looping through the whole array for each - as this will be a smarter way to keep your cache hit ratio up. As with almost every algorithm on a modern computer, cache is likely to have a far more dominant effect on the performance of your algorithm than a few multiplies and comparisons. -- Finlay McWalterჷTalk 08:40, 17 October 2013 (UTC)
- (edit conflict) Bounds checking is not normally done by either of the above suggestions. Consider an array of dimensions MxN, 1-based. An array reference a[x, y] is not checked for validity by retrieval, but by a simple test on the subscripts x and y:
if (x<1 || x>M || y<1 || y>N) { /* error handler */ }; else { /* retrieve and process the array element */ };
- Fetching one item from a 2x2 array should be no different in execution time than for a 128x128 array, assuming that the whole array is in RAM and does not need to be retrieved from a swapfile. --Redrose64 (talk) 08:42, 17 October 2013 (UTC)
- (edit conflict) Bounds checking is not normally done by either of the above suggestions. Consider an array of dimensions MxN, 1-based. An array reference a[x, y] is not checked for validity by retrieval, but by a simple test on the subscripts x and y:
- I've used your 2nd method myself. Besides being more efficient for large arrays, it's also simpler to code and therefore less likely to fail and so requires less testing. StuRat (talk) 14:42, 17 October 2013 (UTC)
- I've used this method too. It is simple to implement, and it works great as long as you only ever move one square at a time. However, the other way can be more flexible in the end. Say you come up with a jump or teleport ability that lets you move 2 squares - the version with bounds checking will work with no modification. The other one will require more checks, or more likely, a shift to the bounds checking system. Katie R (talk) 16:46, 17 October 2013 (UTC)
- The second method is likely to be faster because it avoids conditional branches, which are surprisingly expensive on modern CPUs. Memory access is also slow, but in this case the extra memory used is small (O(M+N), while the bulk of the array is O(MN)). If you really care about performance, though, you should implement both methods and benchmark them. -- BenRG (talk) 20:40, 17 October 2013 (UTC)
- I agree that the second one is likely to be quite a bit faster. Things like this are done on a chessboard. Suppose you are generating all of the moves of a knight on a particular square. You could have two extra rows and columns with a value that indicates that the knight can't move there (a sentinel value). That should be faster than checking the X and Y values. Bubba73 You talkin' to me? 03:27, 18 October 2013 (UTC)
- Thank you for the answers:-) I'm playing around with a method of precalculating paths that bots can take on a 2d map, then compressing it down using various aspects of the map- I'm able to get fairly decent file sizes for most maps, the tradeoff being that a number of adjacent tile checking needs to happen each time something wants to move- just doing the inequality checking isn't dragging the system down, or anything, but every bit extra bit of speed makes it more viable to actually use. (it's far far faster than A* and more accurate than faster approx methods, the need to carry around a file isn't the greatest, but I'm steadily getting it more manageable). Thanks again:-)Phoenixia1177 (talk) 05:46, 18 October 2013 (UTC)
- I've written a program to do pretty much the same thing, so it would be interesting to compare notes. How does your program work ? (We can continue this on our talk pages, if you want, so it won't disappear into the archives.) StuRat (talk) 12:42, 18 October 2013 (UTC)
Configuring moden router.
Yesterday I brought a switcher, internet stopped to work and so I called my isp and they told me how to configure and then it didnt worked and they said the problem was at my side.
Tested with the pc connected to modem without a switcher and it worked so I brought a new switcher.
Test the new switcher and it didnt worked, send it to store and they tested and it worked there. They said if could be my modem settings. But I configured according to many tutorials on net and followed their steps, yet it didnt worked.
I am missing something? How I did:
1-Modem is tp-link td 8816 adsl+
2-Conection type is pppoe/pppoa
3-Username and password are configured according to my isp stuff
4- Same about VPI and VCI
5-Conection type is pppoe llc
6-DHCP is enabled
201.78.190.108 (talk) 12:14, 17 October 2013 (UTC)
The problem was with the modem thanks.201.78.223.139 (talk) 11:30, 18 October 2013 (UTC)
How many Wikipedia articles linked to each other?
Could we link them all? All geographical articles could be connected to a country or ocean, all authors could be connected within a field somehow. But could we link all of them (without meaningless linking, of course), if they are not already all linked. OsmanRF34 (talk) 15:25, 17 October 2013 (UTC)
- They sort of do: Getting to Philosophy Mingmingla (talk) 16:03, 17 October 2013 (UTC)
- Oh yeah that's a great game to play! I've had good runs with 1708 in piracy and 4chan.
- There's a great tool you can use to make the process a lot faster; see here. --.Yellow1996.(ЬMИED¡) 23:11, 17 October 2013 (UTC)
Evading ISP bandwidth shaping
I'm using CrashPlan (free version) to back my computer up to a drive in my mum's (mom's) computer. If I pause the process, wait a minute and start it again, my connection speed will be 40-60 Mb/s. Over the course of the next minute or so, it will go steadily down to about 800 Kb/s where it stabilises. Could this be my ISP (TalkTalk) deliberately throttling my connection? I know that some ISPs might do this to certain types of traffic (like illegal p2p filesharing (I'm aware that it's not necessarily illegal so no need to point that out)). Could my ISP be mistaking my traffic for filesharing and then throttling my connection? Anyway to get around it? I've got large volumes of data to transfer and my mum/mom doesn't like having her computer on when she's not using it. I can't sit and pause/unpause it every couple of minutes! --2.97.26.56 (talk) 20:39, 17 October 2013 (UTC)
- You probably have Talk Talk ADSL2+ rather than fiber. If so you weren't getting 40-60 Mb/s, that's just an artefact of the program you were using making rash estimates based on too little data. 0.8 MB/sec upstream is about what you'd expect (bottom row of the table in that article). -- Finlay McWalterჷTalk 22:03, 17 October 2013 (UTC)
iPad
How does one force a refresh given that there appears to be no Ctrl key? Kittybrewster ☎ 21:37, 17 October 2013 (UTC)
- "Tap the ↻ (reload) icon next to the address in the search field to update the page," directly quoting from the iPad user guide for iOS 7. Nimur (talk) 22:24, 17 October 2013 (UTC)
Windows 8.1 search everywhere in apps view
When I set windows 8.1 to search everywhere and not just apps from the apps view, the search bar in the start screens apps view disappears. Why does this happen?Clover345 (talk) 23:29, 17 October 2013 (UTC)
October 18
Introducing new digits (in Vista)
For a while, I have been wanting to convert my computer’s clock’s digits from Arabic numerals to Roman numerals. Windows Vista does not seem to support Roman numerals, so I am hoping to find a way to introduce them as a new option to my computer. Is there some way I can change my numerals to Roman ones? --66.190.69.246 (talk) 15:05, 18 October 2013 (UTC)