Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 November 3

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


November 3

[edit]

help for connecting to server

[edit]

i installed this game ..london law on my ubuntu 10.10...thye ask for a host to connect to ...how do i find it out and how do i find out the port number..thanksMetallicmania (talk) 03:15, 3 November 2010 (UTC)[reply]

Was it blocked by Windows firewall? It may prevent the program from accessing the internet. General Rommel (talk) 21:03, 3 November 2010 (UTC)[reply]
Can we at least read the questions? He said he's installed it on Ubuntu, so Windows firewall wouldn't be an issue. --99.224.10.2 (talk) 22:39, 6 November 2010 (UTC)[reply]

Slash in the IP address

[edit]

What does it mean when there is a slash in the IP address, such as 192.168.0.0/24 ? 220.253.253.75 (talk) 06:58, 3 November 2010 (UTC)[reply]

The concept is explained in our article on CIDR notation. Regards, decltype (talk) 07:02, 3 November 2010 (UTC)[reply]

It's an ip range. In that example, it means everything in the range "192.168.0.0" to "192.168.0.255" 82.44.55.25 (talk) 09:49, 3 November 2010 (UTC)[reply]

In other words, it is the number of 1s in the subnet mask. So /24 is equivalent to the subnet mask of 11111111111111111111111100000000 or 11111111.11111111.11111111.00000000 or 255.255.255.0 - WikiCheng | Talk 12:19, 3 November 2010 (UTC)[reply]

IT milestones in 2007

[edit]

Hi, Can you direct me to a website / article which lists the major milestones of Information Technology in 2007 ? - WikiCheng | Talk 08:21, 3 November 2010 (UTC)[reply]

Wikipedia? --Andreas Rejbrand (talk) 08:49, 3 November 2010 (UTC)[reply]
Where on there does it list the specifically IT milestones? --Mr.98 (talk) 12:03, 3 November 2010 (UTC)[reply]
I don't think it does. The closest I could find is Timeline of computing 2000–2009. Although by that, it doesn't look like 2007 was a very busy year. Indeterminate (talk) 15:08, 3 November 2010 (UTC)[reply]

Thank you ! In case you find some other websites (other than Wikipedia), I will be interested. Nonetheless, this has been helpful - WikiCheng | Talk 07:50, 4 November 2010 (UTC)[reply]

Items with multiple attributes

[edit]

I want to re-write a simple book-keeping program that labels, categorises, and group-totals the enteries in my bank statements, as supplied in CSV format. The earlier version written in old Basic used an array to represent the various parts of each line: date, amount, description, category, etc.

In more modern languages, is there any way of representing this kind of multi-attribute data that is better than an array? Or should I just stick with arrays? Is there any language, especially a basic-like language, that makes things such as totaling a column in an array easy to do? I do not want to use a spreadsheet. Thanks 92.15.0.194 (talk) 14:33, 3 November 2010 (UTC)[reply]

I would suggest you could represent the items as a struct or a class. Then you would have item.date, item.amount, etc. You would then have an array (or, in many languages a list) of items, and could quickly iterate over them to produce the sums. C# will certainly do this, and I would stronlgy expect VB.net to be the same. No doubt there are other alternatives. --Phil Holmes (talk) 14:40, 3 November 2010 (UTC)[reply]
(edit conflict)If the set of attributes is fixed, you'd mostly represent each entry as a tuple (aka a struct in C or an object in Java), where each element of the tuple had a type appropriate for the kind of data that attribute would store. If, on the other hand, attributes could be entirely arbitrary, you'd probably use a hashtable to store each of the attribute-name:attribute-value pairs. Then you'd probably have an array of entries (other data structures might be appropriate depending on how you'd be accessing them). Pretty much any modern programming language can do all this very simply. I try not to specifically evangelise, but certainly doing this in Python would be straightforward. -- Finlay McWalterTalk 14:46, 3 November 2010 (UTC)[reply]
Was just wondering why you say "I do not want to use a spreadsheet", and how hard and fast that restriction is. Sorting line items by category and sub-totalling within categories (plus a whole lot more) is exactly what pivot tables in MS Excel do for you. If you want the fun and challenge of rolling your own code then that is fine - just as long as you realise that you are doing a 5 mile run when you could take a taxi instead. Gandalf61 (talk) 15:12, 3 November 2010 (UTC)[reply]
Exaggeration. Totaling a column in an array takes a line of code. 92.24.178.95 (talk) 17:33, 3 November 2010 (UTC)[reply]
That depends entirely on the programming language and functions previously written. Given enough functions written, I could do this entire project is "one line of code" with: do_all_the_work();. -- kainaw 18:24, 3 November 2010 (UTC)[reply]
It takes one line of code in Basic. 92.24.178.95 (talk) 18:27, 3 November 2010 (UTC)[reply]
Sure, totalling values in an array is easy. But how does the user get the data into the array in the first place ? And how are the results presented back to the user ? And how and where is the data in the array stored when the program is not in use ? And how does the user change the data in the array ? Or what if they change their mind about how they want to analyse the data, or want to change the structure of the data ? Your "one line" program can't do any of that, whereas it all comes for free in a spreadsheet. Your are telling the guy running the marathon "it's easy - you just have to put one foot in front of the other". Gandalf61 (talk) 13:49, 4 November 2010 (UTC)[reply]
Some of your questions are answered by reading the original question. The rest of them are simple programming. 92.28.250.172 (talk) 14:12, 4 November 2010 (UTC)[reply]
Obviously all those problems can be solved - eventually - by "simple programming", otherwise spreadsheets would not exist. My point was that your facile "one line of code" response ignored all of the issues that make writing useful programs that will be used by real people in real-life situations incredibly challenging (or deeply frustrating, depending on your point of view). From your responses I get the impression that you have little or no experience of doing that. Gandalf61 (talk) 14:07, 5 November 2010 (UTC)[reply]
I find it simple. Please do not troll. 92.29.112.206 (talk) 19:43, 5 November 2010 (UTC)[reply]
Is there a need to change? at best you would be replacing array[n][5] (when the 5th element is price or whatever) with array[n].price , (and using a for next loop over n), even something old like pascal (eg freepascal) can do this using 'records'. eg http://www.hkbu.edu.hk/~bba_ism/ISM2110/pas048.htm (full object orientated languages can do more, but in the example you gave that would probably be of little use)
freebasic can do the same type of thing .. there will be other examples of languages not far removed from the basic you're using. It's not really any simpler, and you have to learn the new syntax etc. So...Sf5xeplus (talk) 19:53, 3 November 2010 (UTC)[reply]

Exactly what I was thinking Sf5xeplus; the struct or class things seem difficult and unless there is a function for adding them all up, not any easier. 92.28.241.78 (talk) 20:21, 3 November 2010 (UTC)[reply]

link The article I forgot to link is Record (computer science) - just about every language has a version, including newer BASICs, in general they're of good use when you've got strings, and numbers associated with the same item. Easier to read (in principle) but not necessarily simpler or easier when only writing small programs. Sf5xeplus (talk) 22:25, 3 November 2010 (UTC)[reply]

Story Management software

[edit]

Im looking for some software to manage stories (for a load of short stories)

so for example, if i make a story with the title Example i cant make another one with the same title as its already taken (getting rid of duplicates)

can be either offline (on my computer) or online (a bit like a wiki) and for txt and/or doc and/or PDF, i dont mind which

thanks in advance :D

Sophie (Talk) 16:34, 3 November 2010 (UTC)[reply]

I looked up "story management software" on Google and this is freeware that got a favourable review: http://www.spacejock.com/yWriter5.html I don't know if its what you are looking for. Otherwise, have you considered saving Example followed in the title by the date or time, eg "Example 1 1 10"? 92.24.178.95 (talk) 18:25, 3 November 2010 (UTC)[reply]
nice idea for the date, but say it goes like this
* Title: Hello there 1/nov/10. Content: Hello and welcome to Wikiedia...
* Title: My userpage 2/nov/10. Content: This is my user page...
* Title: Hello there 3/nov/10. Content: Hello and welcome to Wikiedia...
title 1 and 3 are the same :(
the software is cool :) but its more for long stories rather than loads of small ones
still good though :) Sophie (Talk) 19:46, 3 November 2010 (UTC)[reply]
Online Google Docs lets you have files of the same name, it stores them by date (last modified)..
Offline I don't know of an example.Sf5xeplus (talk) 19:37, 3 November 2010 (UTC)[reply]
thanks ill take a look :) Sophie (Talk) 19:46, 3 November 2010 (UTC)[reply]
I'm very confused. Do you want a document management system, or a word processor? You can save files with any filename you want; and you can use a document management system (or even just a Word Document with hyperlinks) to reference each document by title. For example, you can create a "Table of Contents" document in Word, and insert hyperlinks to each other story file. The text ("title") can be anything you want - you can use the same title for two different links to different story files. Nimur (talk) 19:55, 3 November 2010 (UTC)[reply]
i know its hard to explain :( so lets say its a wiki. I create the page Example and put the story there so now, i can no longer make another page with the title example because its already there. so its more like a doc management system. does that make a bit more sence? Sophie (Talk) 20:16, 3 November 2010 (UTC)[reply]
I'm unclear: do you want something that a) prevents you from having more than one file with the same title, or b) allows you to have more than one file with the same title, or c) deletes files that have the same content? If it is c), then the freeware Duplicate Cleaner would do that. 92.28.241.78 (talk) 20:36, 3 November 2010 (UTC)[reply]
I also think that Sophie is unnecessarily equating "title" with "filename." Filenames must be unique (a different file name is required for each file). But you can have the same title for as many files as you like: the question is, how do you definea title? Well, that depends on your file-type. A plain text file can have a line that says Title: _____; or a Word Document actually can save a title as metadata. If you want an index of documents by title (instead of by file name), Windows Explorer can do this, or other file managers; or you can use a hyperlink to point to each file. Nimur (talk) 21:20, 3 November 2010 (UTC)[reply]
Sophie could also choose to save many files named Example if he or she placed each of them in a differently named directory. Comet Tuttle (talk) 22:44, 3 November 2010 (UTC)[reply]


@92.28.241.78 - a combo between A and C - Sophie (Talk) 18:21, 4 November 2010 (UTC)[reply]

Any text editor or wordprocessor would do a) by default as far as I am aware. For c), get Duplicate Cleaner to scan the directory your files are in. 92.15.10.141 (talk) 12:49, 5 November 2010 (UTC)[reply]

question

[edit]

How could I automatically archive web pages I visit —Preceding unsigned comment added by 140.121.130.67 (talk) 18:04, 3 November 2010 (UTC)[reply]

on wikipedia? you could add them to your watch list. For web broswing, they are in your history but im not sure about whole pages. sorry. Sophie (Talk) 19:39, 3 November 2010 (UTC)[reply]
You might find the Internet Wayback Machine useful for looking at older versions of websites - that has archives going back to the early 1990s in some cases. Chevymontecarlo 21:21, 3 November 2010 (UTC)[reply]
some pages might not be avilable because if someone has robots.txt in the root page - Sophie (Talk) 18:23, 4 November 2010 (UTC)[reply]
The Scrapbook plug-in for Firefox will allow you to archive web pages locally with about as much effort as it takes to bookmark them, but it is not strictly automatic. --Mr.98 (talk) 21:36, 3 November 2010 (UTC)[reply]

Subnetting

[edit]

The network 131.217.0.0 has been split into subnets using the subnet mask 255.255.255.192.

Find the number of bits that have been borrowed from the host field, the number of usable subnets, and the number of usable addresses per subnet.

Hence, show the range of usable IP addresses by stating the first and last usable host addresses for the first and last subnets.

My conclusion is that this is a class B network and hence the number of bits borrowed in 10. The number of usable subnets is therefore 1022 and the number of usable addresses per subnet is 62. How do you do the last part of the question? 115.178.29.142 (talk) 23:10, 3 November 2010 (UTC)[reply]

The last two numbers of the IP address are 0.0. That is what can be split up. The network mask on the last two numbers is 255.192, or 11111111.11000000. So, 10 bits are for the subnet and 6 bits are for the host. For the first subnet, the 10 binary digits will be 0000000000. For the last subnet, the 10 binary digits will be 1111111111. For the first host, the 6 binary digits will be 000000. For the last host, the 6 binary digits will be 111111. So, for the first subnet, you have 131.217.00000000.00000000 to 131.217.00000000.00111111 (yes, I mixed decimal and binary). In all decimal, that is 131.217.0.0 to 131.217.0.63. The last subnet will replace the 10 zeros for the subnet with 10 ones. -- kainaw 23:44, 3 November 2010 (UTC)[reply]
You need to consider, though, that the subnet broadcast address is not usable as a host's IP. PleaseStand (talk) 23:51, 3 November 2010 (UTC)[reply]

Here's a visual. In binary, 131.217.0.0 is (converting each octet into binary, putting them together in order, and breaking it up into "bitfields"):

10000011110110010000000000000000
|--------------||--------||----|
    original     subnet #  host

For the first address, you want to set the subnet and host bitfields to binary one (assuming that subnet zero is not usable in this problem). For the last address, you want to set the subnet and host bitfields to all ones except the last bit in each, which should be a zero (the last address in a subnet is the broadcast address and is not available for assignment). Converting back to standard IP address notation will give you your final answer. PleaseStand (talk) 23:51, 3 November 2010 (UTC)[reply]

And for the last address in the first subnet and the first address in the last subnet, it should be then clear enough what to do. PleaseStand (talk) 23:56, 3 November 2010 (UTC)[reply]
I was purposely ignoring IP rules to avoid confusion, but I now see that the question specifically states "usable IP addresses". -- kainaw 23:55, 3 November 2010 (UTC)[reply]

Unless this is a class on computer history, you (and your teacher) should probably know that the question is horribly out of date. Classful_networks were used on the internet from 1981 to 1993. These days terms such as "Class B network" only have meaning in a historical context. 130.188.8.12 (talk) 13:37, 4 November 2010 (UTC)[reply]

Yes, using network "classes" was a big waste of IP addresses that should have been ended much sooner. In the current CIDR notation, your original network is 131.217.0.0/16 and the subnets you have broken it into are /26 networks (there are twenty-six bits before the host number part). PleaseStand (talk) 21:06, 4 November 2010 (UTC)[reply]