Jump to content

Wikipedia:Reference desk/Computing: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Emacs Colour Scheme: That's great. Thanks Tardis. I'll try to find a new version of Emacs and see how I go.
Editing my website: new section
Line 300: Line 300:


= October 24 =
= October 24 =

== Editing my website ==

So someone saw fit to make me the web-master of an organization's website.
The site itself is up and running and they just want me to update the site regularly.

How do I do this?

Sorry for sounding like an ignoramus, but it's only because I have no idea how to do this.
Thanks in advance.

Revision as of 02:18, 24 October 2010

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:


October 19

Windows application icons

What does it mean when Windows, instead of using a program's regular icon, uses that generic looking icon for a program? I can't really describe what I'm thinking of... And the signal to noise ratio on searches for "windows icon" is too high to come up with anything useful.

Let me describe what I saw and maybe it'll help understand what I'm thinking of. I just saw my manager's laptop desktop. On it was the installers for iTunes, RealPlayer, FlashPlayer, two different versions of Firefox (one of them was Firefox 2), and three different versions of Adobe Reader. A utility for setting up a WLAN and another for adding a printer (neither of which he ever has to do on any sort of timely basis). In addition to all that (amongst the 40+ icons on his desktop) were those generic Windows icons.

Would they be shortcut icons for programs that no longer exist and therefore don't have the proper icon? Dismas|(talk) 00:19, 19 October 2010 (UTC)[reply]

Was it one of these standard Windows icons? If a program file does not contain the icon, or specify the external location for its icon properly, Windows will default to one of its shell icons. The specific icon used will depend on file type, shell settings, and so on. Nimur (talk) 00:23, 19 October 2010 (UTC)[reply]
Yep, it looked like the icon in the first image at location (0,-2), if we're using a standard (x,y) Cartesian coordinate system. I'm figuring that he deleted the programs that they were tied to but didn't get the icon on the desktop. Dismas|(talk) 00:51, 19 October 2010 (UTC)[reply]
That would cause the effect you described. It may also have had some other issue loading the proper icon and given up. There are exotic possibilities, but a common one would be that they were links to programs on a network drive that wasn't currently connected. APL (talk) 04:19, 19 October 2010 (UTC)[reply]
Or a Removable Drive. Or the target has been moved somewhere else or deleted. Sir Stupidity (talk) 11:21, 19 October 2010 (UTC)[reply]
If you know the program has its own icon, then one of the above seems likely. But it might be a console application that doesn't have one at all; that's the generic "program" icon used for batch files for instance. --Tardis (talk) 13:46, 20 October 2010 (UTC)[reply]

gcc problem

Hi. I'm trying to compile gcc 4.5.1 (needed for emacs) and SVNed that latest revision (165682). Although it configures fine, compiling throws the following error:

/home/rksh/scratch/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/rksh/scratch/gcc/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include    -g -O2 -m32 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../../../host-x86_64-unknown-linux-gnu/gcc -I../../.././libgcc -I../../.././libgcc/. -I../../.././libgcc/../gcc -I../../.././libgcc/../include -I../../.././libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../.././libgcc/../gcc/libgcc2.c \
          -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/features.h:371:0,
                from /usr/include/stdio.h:28,
                from ../../.././libgcc/../gcc/tsystem.h:87,
                from ../../.././libgcc/../gcc/libgcc2.c:29:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
compilation terminated.
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory `/home/rksh/scratch/gcc/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/home/rksh/scratch/gcc/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/home/rksh/scratch/gcc/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/rksh/scratch/gcc'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/rksh/scratch/gcc'
make: *** [all] Error 2
HPS223:~/scratch/gcc%

Googling seemed to reveal that others have had similar problems, but no solution. Does anyone have any ideas? Robinh (talk) 08:30, 19 October 2010 (UTC)[reply]

(OP here). Thanks to a local guru, I have answered my own question: the trick was to install glibc-devel-32bit, which was unintuitive seeing as my system is a 64 bit SuSe installation. Thanks anyway, Robinh (talk) 08:43, 19 October 2010 (UTC)[reply]

AVG slows down my computer significantly

I've had various versions of AVG Antivirus Free on my Vista laptop since I bought it in late 2007 or early 2008. Yesterday, I downloaded the 2011 edition, and since that time, my computer has been functioning far slower: it's almost as slow as the computer used to be when the full computer scan was running, but I've checked and confirmed that the scan is not running currently, and the slowness continues. Any ideas what I could do to improve performance? I downloaded this program from the AVG website, so I know that it's not some odd sort of virus in disguise. Nyttend (talk) 12:13, 19 October 2010 (UTC)[reply]

I used to use AVG too and found it slowed the computer an unacceptable amount. I switched to Avira which is a free (for non-commercial use) antivirus program that runs so much faster and uses less memory. I know that's not the best answer to your question considering you obviously want your paid for AVG to work fast, but if you run out of other options give Avira a try. 82.44.55.25 (talk) 14:14, 19 October 2010 (UTC)[reply]
Thanks for the pointer. I didn't pay for this service; as I said, it's AVG Free, which is also noncommercial. Nyttend (talk) 19:05, 19 October 2010 (UTC)[reply]

wget time-stamping

With the -N option in wget it checks whether the remote file is newer than the local file, and downloads it if it is. However it also checks the size of the file; "If the local file does not exist, or the sizes of the files do not match, Wget will download the remote file no matter what the time-stamps say." I've found with some sites that the size of the remote html files sometimes change (presumably adverts or something) but the page has not been modified in any way, the content is exactly the same, and the last modified headers are the same as they were previously. In these instances wget downloads all the pages again. How can I stop this? I want wget to only check the last modified headers, not the size of the files. I've looked through the wget guide but can't find any way to stop this. 82.44.55.25 (talk) 14:06, 19 October 2010 (UTC)[reply]

I may be confused but how can the remote HTML file size change but it not be modified in any way? Surely there must be some difference even if only in blank spaces or links to ads or whatever? Nil Einne (talk) 14:37, 19 October 2010 (UTC)[reply]
In terms of the wider question, I can find several people who've asked but no one has offered any suggestions other then use something else. That and the lack of anything in the documents suggests to me it isn't a currently supported option. Nil Einne (talk) 14:46, 19 October 2010 (UTC)[reply]
If you care that much about it, why don't you just recompile wget? Surely the part of the check that looks at the file size in addition to date must be like ONE LINE, and you comment it out and it's done. It'll take you like 2 minutes to find that line, and if you're on Windows and haven't used Linux or C before, like no more than 200 hours to be totally used to your Linux environment and to recompiling everything from source, along with learning enough C to be able to make meaningful source-code changes. That's the beauty of open-source. Get to it -- you won't have much of a beard after just 200 hours, and if you wanted to make meaningful kernel-level changes we're talking more like 20,000 hours, but we all had to start somewhere...84.153.229.95 (talk) 15:54, 19 October 2010 (UTC)[reply]

cURL is a bit more modern alternative to wget; so consider checking it. I can't see an exact option for what you want, but the cURL documentation is extensive, and I haven't checked it all. cURL also has a programmer's API so you could write custom logic to analyze the HTTP metadata libcurl returns. Or you can call curl from the command line to spit out headers or HTTP metadata and process that with a script. Nimur (talk) 15:40, 19 October 2010 (UTC)[reply]

.bif file

Hi! do u know where can I find the bif file on a sd mem card? T.i.a. --217.194.34.103 (talk) 15:58, 19 October 2010 (UTC)[reply]

Have you checked you can see hidden folders and files? On Windows 7, go to any explorer.exe window, click on organise, then on folders and search options. Under the view tab, change it to 'Show hidden files and folders'. Then check if you can see it.Sir Stupidity (talk) 21:18, 19 October 2010 (UTC)[reply]

grep doesn't work on windows7

I just installed grep for windows (version 2.5.4) and typing "grep" on the commandline doesn't do anthing, but if I go into C:\Program Files\GnuWin32\bin> and type "grep" it works. Can you give me EXACT instruction (i'm just a beginner) on how to get it working so if I just type "grep" it works? I'm on windows 7, please don't assume I know anything! I need very detailed instructions, normally when I ask for help I don't know how to do any of the steps anyone tells me to do. Thanks a million!!! Jenny. —Preceding unsigned comment added by 188.174.25.49 (talk) 17:54, 19 October 2010 (UTC)[reply]

Windows has this concept called the "path". The path is a big list of directories where Windows searches each time you type something from the command line. You have grep in "C:\Program Files\GnuWin32\bin" but Windows doesn't know to look there when you type "grep" from the command line, so Windows gives up and displays an error. This link discusses how to add a directory to the Windows 7 path; try to follow those directions to add "C:\Program Files\GnuWin32\bin" to your path, and reply back here if you have any problems. Make sure you add this directory to the end of the path (don't delete the whole path that you already have). Comet Tuttle (talk) 17:57, 19 October 2010 (UTC)[reply]

Is it possible for a computer virus to evolve?

And to do so on its own without any input from the creator of the virus. ScienceApe (talk) 18:34, 19 October 2010 (UTC)[reply]

No (at least not given current techniques, and not if you're using the conventional biological definition of evolution). Using computer terminology, biological evolution works on a playoff between expressed and unexpressed code. i.e., you have a large storage base in the genome of genetic material that doesn't do much or is only rarely executed, and a more restricted set of code that generates the organism and its properties. as the environment changes, expressed code that is counterproductive tends to kill off that individual organism, while rarely expressed code that is productive becomes more common. Plus, random mutation is consistently adding new unexpressed code into the genome. In order for this to be modeled in a computer virus, you'd need (at minimum) some form of code-transference between viruses to produce new distributions of code and to spread both unsuccessful and successful code bits through the population, some non-random method for determining which code bits get expressed and which remain unexpressed in a given virus, some random method for generating new potentially viable code (creating purely random code would not be sufficient), a large enough population of running viruses to make for a statistically adequate population size, and some sort of inbuilt motivational structure (resources to be sought out and consumed, dangers to be avoided, an urge towards code-exchange). Even if you could overcome these programing obstacles, you'd certainly have to construct a special environment for this to happen, because I can't think of a system that could handle the (likely millions or billions) of individual virus threads that you'd need to get something akin to evolution and species diversification. --Ludwigs2 19:03, 19 October 2010 (UTC)[reply]
What Ludwigs is describing is an evolutionary algorithm. You'd have to program the virus to work in this way, though, so it wouldn't really be without input from the creator. --Mr.98 (talk) 19:12, 19 October 2010 (UTC)[reply]
How cool. I did not know we had an article on that. --Ludwigs2 21:08, 19 October 2010 (UTC)[reply]
When a person states that a computer virus "evolved", they mean that someone wrote the original virus. Someone else altered it. Then, someone altered that. Then, someone altered that. Over and over, the virus evolves. While it does meet your criteria of "without any input from the creator", it is obviously not what you are looking for. -- kainaw 19:07, 19 October 2010 (UTC)[reply]
You may be interested in Tierra_(computer_simulation). APL (talk) 21:14, 19 October 2010 (UTC)[reply]

It would actually be very simple. All you'd have to do is to program the virus to make, with some low probability, a random change to its own code on some occasions when it replicates. It wouldn't work very well unless the code was specially written to be fault-tolerant, because otherwise it would be hard to avoid Muller's ratchet, but in principle it is straightforward. Looie496 (talk) 22:38, 19 October 2010 (UTC)[reply]

Code displayed on a web page

I was browsing the net and came across this site www.stalltheball.ie and the following code is displayed on the home page

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/stall/public_html/includes/application_top.php:41) in /home/stall/public_html/includes/functions/sessions.php on line 102

the code is only visible when I view the page using Opera, I tried IE and Firefox and the error doesn't appear. So is it an error on the site or is it the Opera browser? Mo ainm~Talk 19:14, 19 October 2010 (UTC)[reply]

The site. Strictly it's not showing you source code, it's showing you an internal error message (intended for developer consumption, not for users). For any production site, it's very bad form indeed to show a regular visitor an internal error message like this. The fact that it doesn't work with a given browser just means they haven't tested it properly. -- Finlay McWalterTalk 19:21, 19 October 2010 (UTC)[reply]
So any idea what is causing it to display is it that session_start() is not being called at the correct time in their source code? Mo ainm~Talk 19:38, 19 October 2010 (UTC)[reply]
No, you'd have to see the source for their web app to see what they're really doing wrong - error messages are the computer equivalent of "my leg hurts", and are rarely enough to really figure out what's wrong, without a proper examination. Incidentally the site works fine for me in Opera 10.61 (build 10.61) on Linux. -- Finlay McWalterTalk 19:55, 19 October 2010 (UTC)[reply]
Thats great thanks for the info, also the error message is not being displayed anymore for me either. Mo ainm~Talk 20:04, 19 October 2010 (UTC)[reply]

Samsung mobile/pc cable

What cable do I need to sync a Samsung GT-E2121B to a PC? Thanks, DuncanHill (talk) 19:23, 19 October 2010 (UTC)[reply]

Samsung's support page for this phone is here, but I don't see any mention of such a cable in the (not very detailed manual). I do see the phone has BlueTooth, so you should be able to sync it over that. A little usb BlueTooth adapter should cost very much (and may be more cost effective than a cable). -- Finlay McWalterTalk 19:34, 19 October 2010 (UTC)[reply]
You meant shouldn't right? Nil Einne (talk) 19:46, 19 October 2010 (UTC)[reply]
Oops, yes. In the UK that means £10 or so. -- Finlay McWalterTalk 19:51, 19 October 2010 (UTC)[reply]
Thanks, I'll see about getting one of those then. I did email Samsung to ask them, but they said to ask retailers, but the retailers they suggested were places like Argos or Curry's, who wouldn't have a clue. DuncanHill (talk) 21:13, 19 October 2010 (UTC)[reply]
Before you do that, download and install the Samsung app that you'll be using to sync. Verify that it does have a connect-with-bluetooth option; I'd be very surprised (and disappointed) if it doesn't - the Nokia equivalent certainly does. The nice thing about having a bluetooth adapter is that it should work with any future phone you buy (rather than having to get a new cable for a new phone), it should work with friends' phones (so you could use it to get photos etc. off a visiting friend's phone), and you can use bluetooth accessories with the phone (for example, I used my little Nokia bluetooth headset with Skype on the PC). -- Finlay McWalterTalk 21:27, 19 October 2010 (UTC)[reply]
Thanks, yes the software does have a bluetooth option. DuncanHill (talk) 10:44, 21 October 2010 (UTC)[reply]
You should BTW be able to get a cheap Bluetooth device for under US$3 shipped from China/HK from a place like Buyincoins [1], DealExtreme [2] [3], Lightake [4], Kaidomain [5] or eBay. Can't comment on any customs problems although my memory is they don't care in the UK if it's under £10 or something and I don't think they'll care even though it's RF so could theoretically violate UK law on transmission power or frequencies or whater. Shipping will take a while of course (I normally get stuff in 1-2 weeks to NZ but I think UK can be longer and more importantly it's starting to get near busy season, I'm already reading of people complaining about long shipping times and I actually think I'm encountering it too). Nil Einne (talk) 10:17, 20 October 2010 (UTC)[reply]


October 20

Locking down a computer (in terms of anti-virus security)

Hello,

I'm attempting to help a relative who knows very little about computers configure their machine so that it's protected against viruses to the maximum reasonable extent possible (they've had multiple issues with viruses and, unfortunately, behaviour-based protection - i.e. don't open dubious e-mails and be careful about what sites you visit - probably won't work for a number of reasons I can't do anything about). For a starting point, I was planning to install Firefox (which is close enough to IE for them and their kids to be able to use it) with the Adblock Plus and NoScript addons and make it the default browser on the computer. However, I'd also like to add some sort of real-time virus protection (preferably something free) and I was wondering if there are any "best bets" as far as this is concerned. Some sort of internet parental control software might also be beneficial.

If anyone has any suggestions or comments regarding this, I'd appreciate them.

Thanks!

Hiram J. Hackenbacker (talk) 01:39, 20 October 2010 (UTC)[reply]

In Windows 7 there is parental controls I believe under Windows Live. FOr antivirus, you can have Avria. Basic protection, no realtime protection. For realtime you could try using Spybot SD., but my experience suggests that it is too technical for ome people.Sir Stupidity (talk) 02:09, 20 October 2010 (UTC)[reply]
This is the sort of situation in which I'd think about switching them to Linux, depending on what they use their computer for. Another product that you might want to look at is Sandboxie. -- BenRG (talk) 07:00, 20 October 2010 (UTC)[reply]
I doubt they could find their way around a Linux box - remember from the question that the relative doesn't know a whole lot about computers. —Jeremy (v^_^v PC/SP is a show-trial!) 07:13, 20 October 2010 (UTC)[reply]
Well, it depends. Some people never use their computers for anything but web browsing and email, and those people would barely notice the difference, especially if they were using Firefox and Thunderbird under Windows anyway. -- BenRG (talk) 07:23, 20 October 2010 (UTC)[reply]
The simplest solution would be to make them a regular user -- not an administrator. In Windows XP, you go to Start --> Control Panel --> User Accounts --> Change an account --> Change my account type. Before doing that, create another account that is an administrator that they can log into to install programs. The link to create an account is inside "User Accounts," too. Since only administrators are allowed to install programs, they won't be able to install any virii, either. Easier than installing Linux, huh? I did this for my friend. She uses Windows XP. Her kids kept infecting her computer with virii, so I limited her main account, and she hasn't gotten a virus since. That was a few years ago! I should mention that it's theoretically still possible to get a virus, even as a limited user. But this technique will stop the vast majority of them. And even if one gets through, it won't be able to cause much damage.--Best Dog Ever (talk) 07:30, 20 October 2010 (UTC)[reply]
That also applies to Windows 7. And if you do have Windows 7, maybe you should up the UAC level. Sir Stupidity (talk) 07:42, 20 October 2010 (UTC)[reply]
For realtime virus protection, I'd go with Microsoft Security Essentials. It tends to stay out of the way of the user and warnings are very clear. It's also free. As for the UAC level, I'd recommend putting it at the minimum so the user actually looks at the dialogs instead of clicking through when too many warnings pop up. Without being close by to do real tech support, completely locking down a computer tends to be somewhat counterproductive in my experience. Occasional warnings will be looked at and read, but when false positives are popping up all the time, the user will simply stop reading them and click through. 206.131.39.6 (talk) 15:34, 20 October 2010 (UTC)[reply]
I heartily recommend Best Dog Ever's suggestion. Non-admin accounts do a lot to limit malware. Comet Tuttle (talk) 16:15, 20 October 2010 (UTC)[reply]
I don't see why you get UAC all the time if you aren't a technical user. Note that if you are able to run fine in a non admin account, there's really no reason why UAC should be a problem. Nil Einne (talk) 20:57, 20 October 2010 (UTC)[reply]
I'll look into Spybot S&D; perhaps I can explain the fundamentals of its operation to my relative, as I think they could really benefit from real-time protection. The Linux suggestion is interesting, but I think in this case Linux (even one of the more Windows-like distros) might be too different from Windows for them. However, I like the suggestion about making the main account a regular user account; this hadn't even occurred to me and it's a good idea. Thanks for the suggestions, everyone! Hiram J. Hackenbacker (talk) 21:46, 21 October 2010 (UTC)[reply]

VoIP

1. What is the main advantage of VoIP over PSTN telephony for users and service providers?
2. How is a packetised network different to a circuit switched network?
3. What equipment and software is required for users of VoIP?
4. Why do telephone numbers have to be matched to IP addresses, and how is this achieved?
5. What are three problems that can affect the quality of service to a VoIP call
6. What is the limitation of VoIP regarding emergency numbers?

–-115.178.29.142 (talk) 01:58, 20 October 2010 (UTC)[reply]

Please do your own homework.
Welcome to the Wikipedia Reference Desk. Your question appears to be a homework question. I apologize if this is a misinterpretation, but it is our aim here not to do people's homework for them, but to merely aid them in doing it themselves. Letting someone else do your homework does not help you learn nearly as much as doing it yourself. Please attempt to solve the problem or answer the question yourself first. If you need help with a specific part of your homework, feel free to tell us where you are stuck and ask for help. If you need help grasping the concept of a problem, by all means let us know. --Tagishsimon (talk) 02:10, 20 October 2010 (UTC)[reply]
But see also VoIP, PSTN, Circuit switching, packet switched network, quality of service --Tagishsimon (talk) 02:12, 20 October 2010 (UTC)[reply]

Alternative CSS scripts printing useless rubbish from a webpage?

If you go to this page and obtain a print-preview or otherwise copy and paste the page, additional fields appear which aren't visible on the page. I suppose this is to do with alternative CSS. Is there a simple way to print what appears on the screen (other than printing screenshots)? ----Seans Potato Business 08:46, 20 October 2010 (UTC)[reply]

[6] is probably a better link since I suspect quite a lot of people here don't belong to the Edinburgh university so can't use their EZproxy facility (it also isn't necessary in this case since the site isn't subscriber only) Nil Einne (talk) 10:28, 20 October 2010 (UTC)[reply]
One (rather long-winded and not-very-scalable) way would be to save the page locally (as "webpage, complete") and then edit the resulting HTML. The text that appears on printing has class="hidden", so 'hidden' is presumably defined differently in a stylesheet for print and display. You could just edit/replace class="hidden" to style="display:none". Alternatively it might be possible to use Firebug (web development) or similar tools to override the CSS settings. AndrewWTaylor (talk) 12:03, 20 October 2010 (UTC)[reply]

Downloading contents of a vBulletin Chatbox

Hello there,

I frequent a site where a lot of entertaining discussion goes on in a chatbox, which, however, is emptied every month or so. I was wondering if there is a way to download the contents of a chatbox in a non-manual way? The archive is basically [whateversite].com/misc.php?do=ccarc&page=y, with y being the archive page number, and the page numbers going up to 1900. I thought perhaps a site downloader might be able to do this sort of thing, but Im unsure on how to use one without it downloading the whole site, which would take weeks and weeks.

All the best,

--178.99.46.121 (talk) 10:45, 20 October 2010 (UTC)[reply]

With httrack you could specify to exclude all links except ones containing "*[whateversite].com/misc.php?do=ccarc&page=*" in the filter settings. It would then only download those pages and ignore everything else. 82.44.55.25 (talk) 11:05, 20 October 2010 (UTC)[reply]

Content filter algorithms

Is it possible to find out the type of algorithms used by the content filters that are available to buy like Net Nanny or do the companies not allow you to see such things? Mo ainm~Talk 12:48, 20 October 2010 (UTC)[reply]

They use pattern matching (see regular expressions). They have lists that decide what is blocked (or allowed). You can download prefab lists from the company website or build your own. -- kainaw 13:22, 20 October 2010 (UTC)[reply]

Const pointer conversions

We know why int** can't be converted to const int**:

int *p;
const int ans=42,**qa;
qa=&p;    /* not allowed */
*qa=&ans; /* because this makes p point to a const int */
*p=0;     /* which we could then modify */

But why can't int** (or int*const*) be converted to const int*const*, since the target pointer could not then be redirected to a const int?

The practical reason for asking: I have a function that reads an Iliffe vector (which point is not negotiable).

int sum(const int *const *a) { /* or const int *const a[KNOWN] */
  int i,j,ret=0;
  for(i=0;i<KNOWN;++i)
    for(j=0;j<2*i+1;++j) ret+=a[i][j];
  return ret;
}

But I can't call it (without a warning or cast):

#define KNOWN 3
int flat[]={0,1,2,3,5,8,13,21,34},*const iv[]={flat,flat+1,flat+4};
++iv[0][0];
return sum(iv); /* warning: passing argument 1 of ‘sum’ from incompatible pointer type */

Since we want to modify the array in the function that owns it, we can't declare const int *const iv[]. What's the proper way to handle this? --Tardis (talk) 14:59, 20 October 2010 (UTC)[reply]

Generally these conversions aren't allowed because types like int * and int const * aren't required to have the same low-level representation. It's not even required that sizeof(int *) == sizeof(int const *), as far as I can tell. Just as it's safe to convert from int to double but not from int const * to double const *, so it's safe to const-qualify a pointer but not to const-qualify "underneath a pointer".
I don't know what to advise regarding your arrays. It is irritating, and I've had this problem myself. If you could switch to C++, a template function with an argument type of T* const* would solve your problem (with the added benefit of being able to sum over other element types). -- BenRG (talk) 19:51, 20 October 2010 (UTC)[reply]
C99 says that "pointers to qualified or unqualified versions of compatible types shall have the same representation and alignment requirements", so I take it that const int* and int* must be interconvertible in that sense. It also says that conversions may add a qualifier to the type from which a pointer type is derived, and that "the values stored in the original and converted pointers shall compare equal", but I don't think these help any. As for C++, I want to promise callers that sum() doesn't change the pointers or the values, and templating that way would only promise "sum() won't change the pointers, and won't change the values if you already can't". Better than just leaving the const out forever, of course, but it doesn't really solve the problem. --Tardis (talk) 21:01, 20 October 2010 (UTC)[reply]
I shouldn't have sounded so sure because I'm not, but it's my impression that the standard is meant to allow const int * to have more values than int *. For example, an 8086 implementation could put writable and unwritable objects in different segments and make int * a near pointer and const int * a far pointer (not that I've ever heard of an implementation that did that). The first passage you quoted is ambiguous; it says that the types can be qualified, but not necessarily that they can have different qualifiers (compare "pointers to integer or floating-point types that are compatible shall have the same representation and alignment requirements"). There are passages that might imply that converting from const int * to int * and back must yield the original value, but it's never completely clear (to me, anyway). Maybe declspec knows. I agree that my template solution mostly just sweeps the problem under the rug. -- BenRG (talk) 00:40, 21 October 2010 (UTC)[reply]
g++ and Comeau C++, at least, accept the above code without complaint. --Sean 15:36, 21 October 2010 (UTC)[reply]
I see that too with g++; apparently this overall issue is something that C++ gets "right" and C doesn't. It certainly makes sense that you should be able to add as many consts as you like so long as they are "all on the right". --Tardis (talk) 20:41, 21 October 2010 (UTC)[reply]

E-mailing newspaper articles

If I use a newspaper website button for e-mailing an article to a friend, does the newspaper keep a record of my e-mail address or the address of my friend?
Wavelength (talk) 22:23, 20 October 2010 (UTC)[reply]

Probably. Each newspaper is different and has different policies, so you would have to check the newspaper's Terms of Service or Terms of Use page to find out whether they discuss this issue. Comet Tuttle (talk) 22:28, 20 October 2010 (UTC)[reply]
I don't understand the need to use such buttons. You can email the URL to your friend. Sometimes it may be necessary to strip off personally-identifiable data, or session-IDs, or other items appended to the URL. When sending a URL, I strip it to as small as possible, then I always check the "cleaned" version to make sure it works before mailing it. Nimur (talk) 23:33, 20 October 2010 (UTC)[reply]


October 21

How to remove the HD?

From one of these...


...before disposal. Thanks, hydnjo (talk) 00:25, 21 October 2010 (UTC)[reply]

I know this is not the point, but are you sure you don't want to try selling one of those? They're quite sought after. Chevymontecarlo 06:24, 21 October 2010 (UTC)[reply]
Have you tried Googling "replace hard drive iMac G4"? There are quite a few tutorials. You need Torx #10 and #8 screwdrivers (which are non-standard unless you take Macs apart often, which I imagine you don't based on the question), but otherwise it looks pretty straightforward. --Mr.98 (talk) 13:50, 21 October 2010 (UTC)[reply]
It's possible to securely delete all the information off a hard drive before sale (or disposal or recycling). I looked at the Google cache of this (temporarily down?) page, and it has some options. It's also possible to use dd to copy /dev/random over the entire disk a couple times, which should be more than sufficient. You'd need a Linux live CD for PowerPC to do that, which shouldn't be hard to make. Paul (Stansifer) 18:21, 21 October 2010 (UTC)[reply]
Thanks to all for your suggestions. hydnjo (talk) 22:36, 22 October 2010 (UTC)[reply]

C: Pointers to Pointers and other Pointer Issues

I'm really kind of confused with pointers in C. Let's say you malloc a blob of memory:

void * blob = malloc(sizeof(char *) + sizeof(int));

and you use the blob to hold two things like this: | a char * | integer value |

so blob would point to the memory adress of the beginning of the blob of malloc'd memory.

If you made a pointer to point to it:

void * pointToBob = bob;

Could you use bob and pointToBob interchangeably?

Or what if you had

void ** pointToBob = bob;

How could you used that?

I'm confused how you could possibly use a pointer to a pointer to change a value in the originally malloc'd blob. I'd appreciate any help with this problem and any sort of general explanations on the questions of pointers. I feel like I don't understand much more than "a pointer holds an adress to a place in memory". Thank you very much :) —Preceding unsigned comment added by Legolas52 (talkcontribs) 00:58, 21 October 2010 (UTC)[reply]

Am I safe in assuming that bob/Bob is everywhere a typo for blob/Blob? Assuming yes, the answer is that void * pointToBlob = blob; makes pointToBlob have the same type and value as blob. However, void ** pointToBlob = blob; will give you a compile warning, because a pointer to a pointer is not the same type as a pointer. But a more basic problem is that your malloc line is a thing that ought not to be done. In some systems, the "int" type must be aligned in a specific way in memory space, so it may not be possible to store an int at the place you think you are going to store it. This is simply bad code. Even if it works, referring to things in memory that has been allocated in this way is so ugly that I'm not even going to try to write it. If you want to store multiple different things in a single block of memory, create a struct to hold them. Looie496 (talk) 01:23, 21 October 2010 (UTC)[reply]
As Looie said, your malloc statement is not a permissible way to allocate a pointer and an int, because of alignment restrictions; trying to access the int might crash your program.
However, void ** pointToBlob = blob; is legal C and won't produce a warning, because C allows void * to be implicitly converted to any other pointer type (though C++ doesn't). There's no deep logic to this; it's just a special exception intended to make malloc easier to use. The result of this definition will be that pointToBlob will point to the same memory block as blob does, except that it will "think it's pointing to" a void *. You could then store a void * into the memory block through that pointer, even though you allocated space for a char *, because those pointer types happen to be guaranteed to have the same size. But that's probably not what you intended. If you wanted a pointer to the blob variable itself (which is a different thing from the memory you allocated), then you should have written pointToBlob = &blob instead of pointToBlob = blob.
Basically, the rules for pointers are straightforward: if you say &foo then you get a value that points to foo, if you say *p in an expression then you get the value of whatever p points to, and if you say *p = (whatever); then you change the value of whatever p points to. For example, if you wrote void ** pointToBlob = &blob;, then *pointToBlob = malloc(100); would be the same as blob = malloc(100); (they both write the result to the blob variable). But if you wrote void * pointToBlob = blob; and then pointToBlob = malloc(100);, you would be assigning to the variable pointToBlob, which is a different variable from blob, so blob would remain unchanged. Although those rules are simple, they're hard to think about. The reason seems to be that human beings are not good at separating the name of something from the thing itself. For example, what does pointToBlob mean? Do you intend it to point to the variable named "blob", or are you thinking of the memory you allocated as the "blob" that it points to? This kind of ambiguity is what makes pointers difficult. The good news is that it gets easier with practice. -- BenRG (talk) 02:16, 21 October 2010 (UTC)[reply]
As has been said, you can't use a pointer to point to both a char * and an int like that. You can, however, do it like this:
struct mystruct
{
  char *p;
  int i;
 };
 struct mystruct *blob = malloc(sizeof(struct mystruct));
You can then use blob->p and blob->i to refer to the char * and int values, assuming the malloc() succeeded. You can easily check this, because if malloc() fails, the resulting value will be a null pointer. JIP | Talk 12:09, 21 October 2010 (UTC)[reply]
Pointers really come into their own when you use them to point to arrays of dynamic size (although other structures and uses are also important). Consider this (not production-quality) code:
Several code examples
Single math test input
int n,i;
float *a;
printf("How many questions are on the math test? ");
scanf("%d",&n); /* give scanf() a pointer to n so it can assign to n through it */
a=malloc(n*sizeof*a); /* enough space for n floats; *a is a float, so sizeof*a==sizeof(float) */
printf("What are the answers? ");
for(i=0;i<n;++i) scanf("%g",a+i); /* a[i]==*(a+i), so a+i==&a[i] and we store into each in turn */
Now suppose that we have more than one test to give. Each might have a different number of questions, so now we need a separate array for each. Each array is (indicated by) a float*, so we need a float** to refer to all of them together:
Multiple math test input
int nt,*nq,i,j;
float **a;
printf("How many math tests? ");
scanf("%d",&nt);
a=malloc(nt*sizeof*a);   /* enough space for nt float _pointers_ */
nq=malloc(nt*sizeof*nq); /* enough space for nt ints */
for(i=0;i<nt;++i) {
  printf("How many questions are on test #%d? ",i);
  scanf("%d",nq+i);
  a[i]=malloc(nq[i]*sizeof*a[i]); /* enough space for nq[i] floats */
  printf("What are the answers? ");
  for(j=0;j<nq[i];++j) scanf("%g",a[i]+j);
}
Of course, you could also use a struct, as JIP mentioned:
A struct instead of two arrays
struct test {int n; float *ans;};
int nt,i,j;
struct test *a;
printf("How many math tests? ");
scanf("%d",&nt);
a=malloc(nt*sizeof*a); /* enough space for nt test structures */
for(i=0;i<nt;++i) {
  printf("How many questions are on test #%d? ",i);
  scanf("%d",&a[i].n);
  a[i].ans=malloc(a[i].n*sizeof*a[i].ans); /* enough space for a[i].n floats */
  printf("What are the answers? ");
  for(j=0;j<a[i].n;++j) scanf("%g",a[i].ans+j);
}
You can use a pointer to conveniently point to an object temporarily (which often involves the structure-pointer operator ->):
Using a temporary pointer
struct test {int n; float *ans;};
int nt,i,j;
struct test *a,*current;
printf("How many math tests? ");
scanf("%d",&nt);
a=malloc(nt*sizeof*a); /* enough space for nt test structures */
for(i=0;i<nt;++i) {
  current=a+i; /* point at the i-th element of the array; no new object is created here! */
  printf("How many questions are on test #%d? ",i);
  scanf("%d",&current->n);
  current->ans=malloc(current->n*sizeof*current->ans); /* enough space for current->n floats */
  printf("What are the answers? ");
  for(j=0;j<current->n;++j) scanf("%g",current->ans+j);
}
Finally (and this is very optional), you can use pointers as your loop variables to make idiomatic, very direct C code:
Replacing integers with pointers in for(...)
struct test {int n; float *ans;};
int nt;
struct test *a,*current,*end;
printf("How many math tests? ");
scanf("%d",&nt);
a=malloc(nt*sizeof*a); /* enough space for nt test structures */
end=a+nt;              /* points just past the end of a */
for(current=a;current<end;++current) {
  float *fcurrent,*fend;
  printf("How many questions are on test #%d? ",current-a); /* you can still get the index if you want */
  scanf("%d",&current->n);
  current->ans=malloc(current->n*sizeof*current->ans); /* enough space for a[i].n floats */
  fend=current->ans+current->n; /* points just past the end of current->ans */
  printf("What are the answers? ");
  for(fcurrent=current->ans;fcurrent<fend;++fcurrent) scanf("%g",fcurrent);
}
Just to wedge in one more use of float **, we can apply the "convenient alias for something" idea one more time:
With extra aliases
struct test {int n; float *ans;};
int nt;
struct test *a,*current,*end;
printf("How many math tests? ");
scanf("%d",&nt);
a=malloc(nt*sizeof*a); /* enough space for nt test structures */
end=a+nt;              /* points just past the end of a */
for(current=a;current<end;++current) {
  float *fcurrent,*fend,**fpp=&current->ans;
  int *ip=&current->n;
  printf("How many questions are on test #%d? ",current-a); /* you can still get the index if you want */
  scanf("%d",ip); /* this assigns to current->n, so we'll have the number later, but we can also call it *ip now */
  *fpp=malloc(*ip*sizeof**fpp); /* enough space for *ip floats */
  fend=*fpp+*ip; /* points just past the end of *fpp */
  printf("What are the answers? ");
  for(fcurrent=*fpp;fcurrent<fend;++fcurrent) scanf("%g",fcurrent);
}
Fundamentally, pointers let you access something that you get to choose (at runtime if you like). There are several reasons to choose things at runtime:
5 reasons
  1. When you don't know how much space you'll need, so you ask for it dynamically.
  2. When you have an array of things (dynamic or not) that you want to work on one at a time, and you make the pointer point to each one in turn (like current). (You can also work on them in any other order by writing a[whatever]: a[2*i*i-3*j+42], a[askUserWhich()], a[phaseOfMoon()], a[pickRandomly()], etc. Each of those uses pointer arithmetic to pick out an element for you.)
  3. When some other code is picking an object for you; it gives you a pointer to the one it chose.
  4. When you're picking an object for some other code: you pass it a pointer to which object you want it to work on. This is especially important when your objects are large: you pass merely its address, and no copying occurs. (See also aliasing; this is very useful, but can also be confusing.) Sometimes "work on" means "assign a value to", like with scanf(): you tell it where to put the value it reads from the input.
  5. Not really about runtime but about convenience: even if everything is allocated statically, it might be useful to keep a pointer to, say, myStaticArray[3][5].structMember[2] if that long expression refers to a value that you need to refer to frequently.
Except for #3 (which is just the opposite of #4), we used all of these in the examples I gave. Another way of looking at it is that there are only three things that can go on the left side of an assignment:
  1. A (non-array) variable name: x=1;
  2. A part of a struct: struct.y=1;
  3. A dereferenced pointer: *p=1;
Without the third choice, the struct would itself have to be a variable name or a member of another struct, so all you would get would be a.b.c.….z=1;, which is not very interesting. The third choice gives all kinds of possibilities because dereferencing a pointer can give you another pointer or a struct as well as a normal variable: a[4]=1; (because that's *(a+4)=1;), getPointer()->a=1; (because that's (*getPointer()).a=1;), **(*myStruct.ptrMember->memOfTarget)->mem2ndTarget=1;, etc.
I hope this long ramble ("general explanation") helps; I find that the usual introductions to pointers (like int i; int *p=&i; *p=42; printf("%d\n",i);) are so anemic that they prevent seeing the true utility of the subject. --Tardis (talk) 15:09, 21 October 2010 (UTC)[reply]


Thanks for all of your replies! The one thing I kept seeing over and over was that I must use a struct to access this info, can't I do this instead?:

void * blob = malloc(sizeof(char *) + sizeof(int));
char * blobChar = blob;
int * blob = blob + sizeof(char *); //since the integer is 4 bytes after the char *

—Preceding unsigned comment added by Legolas52 (talkcontribs) 21:40, 22 October 2010 (UTC)[reply]

I think you meant
void * blob = malloc(sizeof(char *) + sizeof(int));
char ** blobChar = blob;                   /* since it _points to_ a char * */
int * blobi=(char *)blob + sizeof(char *); /* can't do arithmetic on void * */
It might work, but it might also crash, or summon the nasal demons (and the answer will depend on the machine you try it on). (Also, who said that sizeof(char*)==4 everywhere?) The struct, as a language construct, exists so that this can be handled properly by the compiler. It also requires less typing and is more readable: struct {char *str; int len;} *s=malloc(sizeof*s); …and that's it! We now already have s->str and s->len with no further work. --Tardis (talk) 23:32, 22 October 2010 (UTC)[reply]
One reason why that might not work is that some systems require pointers of a certain type to be aligned at specific intervals in memory, such as addresses divisible by 2 or by 4. In your case above, you might end up with a misaligned pointers. By using a struct, the compiler guarantees that the addresses of the members are aligned, by inserting padding bytes between them if it has to. JIP | Talk 07:42, 23 October 2010 (UTC)[reply]

compiling emacs

Hello. I am trying to compile emacs 23.2. After a successful ./configure, make gives me the following:

PS223:~/Downloads/emacs-23.2% make
cd lib-src; make all                            \
         CC='gcc' CFLAGS='-g -O2 -Wdeclaration-after-statement -Wno-pointer-sign  ' CPPFLAGS='-D_BSD_SOURCE  ' \
         LDFLAGS='-Wl,-znocombreloc  ' MAKE='make'
make[1]: Entering directory `/home/rksh/Downloads/emacs-23.2/lib-src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/rksh/Downloads/emacs-23.2/lib-src'
boot=bootstrap-emacs;                         \
       if [ ! -x "src/$boot" ]; then                                     \
           cd src; make all                                    \
             CC='gcc' CFLAGS='-g -O2 -Wdeclaration-after-statement -Wno-pointer-sign  ' CPPFLAGS='-D_BSD_SOURCE  '         \
             LDFLAGS='-Wl,-znocombreloc  ' MAKE='make' BOOTSTRAPEMACS="$boot"; \
       fi;
cd src; make all                            \
         CC='gcc' CFLAGS='-g -O2 -Wdeclaration-after-statement -Wno-pointer-sign  ' CPPFLAGS='-D_BSD_SOURCE  ' \
         LDFLAGS='-Wl,-znocombreloc  ' MAKE='make' BOOTSTRAPEMACS=""
make[1]: Entering directory `/home/rksh/Downloads/emacs-23.2/src'
make[1]: *** No rule to make target `/usr/local/include/gtk-2.0/gtk/gtk.h', needed by `dispnew.o'.  Stop.
make[1]: Leaving directory `/home/rksh/Downloads/emacs-23.2/src'
make: *** [src] Error 2
HPS223:~/Downloads/emacs-23.2% 

What is going on here? It looks like there needs to be a rule to make gtk.h, but this can't be right? Anyone got any idea how to get round this? Thanks, Robinh (talk) 08:58, 21 October 2010 (UTC)[reply]


have you installed the gtk development headers? (Or configure without gtk). The package is normally called gtk-dev (debian/ubuntu etc) or gtk-devel (redhat/mandrake etc). CS Miller (talk) 10:47, 21 October 2010 (UTC)[reply]
Thanks for this. I am on SuSe 11.3, and YAST isn't particularly clear (there are lots of gtk-type options, but checking them results in an incompatibility warning. How do I tell whether gtk-dev is installed? Thanks, Robinh (talk) 11:03, 21 October 2010 (UTC)[reply]
I've never used YaST, so I'm not sure how to check what packages are installed with it. However, this [7] seems to be a useful guide. The package you want is probably called libgtk-dev / libgtk-devel, now that I think about it. CS Miller (talk) 11:42, 21 October 2010 (UTC)[reply]
Got it!
Resolved
. Cheers, Robinh (talk) 11:54, 21 October 2010 (UTC)[reply]
Hmm, this really shouldn't have happened. The autoconf script that wrote configure should check for gtk headers (and version), and indeed when I configure emacs on Ubuntu I see it checking gtk headers, libraries, and associated things like Pango, Cairo, and Freetype. If these aren't found, or are of the wrong versions, it should be be configure that fails, not the make. If you can reproduce this on a fresh install of SuSe, that's a notifiable bug in the configure.in script. -- Finlay McWalterTalk 13:18, 21 October 2010 (UTC)[reply]
Hello Finlay. I too thought that configure would find any problems. The behaviour is not reproducible, following a 'make clean' which may have cleared out some problem file somewhere. Best wishes, Robinh (talk) 13:36, 21 October 2010 (UTC)[reply]

Minor problem with my LG Flatron

OK, so I've been having some non-critical yet annoying problems with my LCD display (a Flatron W1934S, to be specific). The overall image appears fine, but there are some wavy patterns jizzing up on my screen, which can be seen especially on a dark background. Is it because of an unstable AC connection or something? Blake Gripling (talk) 10:35, 21 October 2010 (UTC)[reply]

Noisy AC connection (perhaps from an electric motor on the same ring), loose AC connection, loose or damaged video cable, or source of RF interference near the display or the video cable. -- Finlay McWalterTalk 11:34, 21 October 2010 (UTC)[reply]
Apart from the above, and don't ask me how it works... but try adjusting your contrast. I had the same problem with a Dell monitor. Sandman30s (talk) 14:31, 21 October 2010 (UTC)[reply]
So to avoid interference, place any wireless emitting devices away from the monitor, and make sure that there are not that mucgh intercerence from devices from the cables to and from your computer and monitor. See if that helps. Sir Stupidity (talk) 21:37, 21 October 2010 (UTC)[reply]

Blackberry 9500 Storm

Hi, I have my phone blacberry 9500 storm, was using zero line of france, turkey, I'm staying on the contract has expired, other operators çalıştıramadığımdan, mep2 code entered incorrectly 10 times, mep2 does not turn on, I can not enter the MEP code. please help. Thank you.

my adres= [email removed] —Preceding unsigned comment added by 88.224.127.41 (talk) 13:23, 21 October 2010 (UTC)[reply]

I've removed your email address, to prevent you getting spam on it. People will answer here, not by email. -- Finlay McWalterTalk 13:32, 21 October 2010 (UTC)[reply]
I expect it's not likely to be easy [8]. It's usually a rather bad idea to hit the limit with phone unlock codes. If you haven't actually entered the MEP2 code incorrectly 10 times then I'm not sure what's wrong. It may be worth calling your operator. As your contract has expired, they may be willing to provide any unlock codes for free perhaps even with instructions. BTW just to emphasise you should stop typing anything in until you know what to do Nil Einne (talk) 05:52, 22 October 2010 (UTC)[reply]

tsql

Hi! Why doesn't exist the 'end tran' keywords? the rollback statement must always immediatly follow the trasnsaction to rollback? t.i.a. --217.194.34.103 (talk) 14:47, 21 October 2010 (UTC)[reply]

The database would have to store the state it was in before the transaction, and it gets too hard with several transactions that may be modifying the same data. So it just sticks to the latest one. Graeme Bartlett (talk) 21:11, 25 October 2010 (UTC)[reply]

motherboard

where is the rt clock and how the quartz is deformed in order to produce the regular square wave? t.i.a. --217.194.34.103 (talk) 14:50, 21 October 2010 (UTC)[reply]

The real time clock can be positioned anywhere on the board, and may be integrated to some other ASIC on the board. Our article lists some examples; you can check your motherboard for one of those chips. You might want to read crystal oscillator; the quartz is an electromechanical resonator in the form of a piezoelectric crystal. Nimur (talk) 15:22, 21 October 2010 (UTC)[reply]
thank you, I read "When the field is removed, the quartz will generate an electric field as it returns to its previous shape, and this can generate a voltage. " But thus voltage is sinusoidal or square? --217.194.34.103 (talk) 15:51, 21 October 2010 (UTC)[reply]
It is a complicated waveform; it is not perfectly sinusoidal because in real life, crystals are not simple harmonic oscillators; but it is really close to sinusoidal. The exact waveform shape depends on the perfection of the manufacturing process and physical properties of the crystal. Digital systems usually need a square-wave. For this reason, a crystal oscillator will usually be connected to an active circuit with a power source. This circuit includes a transistor amplifier (or a more sophisticated IC) to "clip" the sine-wave into a square-wave, and often one or two external tuning capacitors. A simple clip circuit with two diodes is shown in our article. More complex circuits exist to shape the waveform, but for most purposes, an "approximately" square-wave signal is good enough. The particular parameters to worry about would be the rise time and the jitter - a well-designed circuit will have a "fast" rise-time and a "small" jitter (by using a good tuning circuit and a very high gain). Exactly how fast rise-time and how tiny the jitter will be determined by cost and requirements. Many RTC clock ASICs will contain all/most of these analog circuit elements, plus some digital logic, internally. Nimur (talk) 16:23, 21 October 2010 (UTC)[reply]

Internet Usage

I've just downloaded a program called NetMeter to keep an eye on my internet usage. I'm in a hotel and have a daily limit of 1 GiB. I'm looking at the program now and my upload and download figures are increasing. Even though, to my knowledge, nothing is uploading or downloading. It says that I'm downloading 36 KiB/sec at the moment, and that I've downloaded 21 MiB in the last 30 minutes.

  • Why are the upload and download figures increasing when this is the only web browser I have open?
  • Does that amount of use sound plausible?
  • It's WiFi, so could that figure be the whole router's traffic and not just my laptop?

Some internet sites say that 5 GiB per month is enough to use Skype and YouTube. But according to NetMeter, I'd use 10 GiB a month just by leaving the machine connected to the internet for six hours a day; without even watching a single video or making a single call. What's going on?! Fly by Night (talk) 15:19, 21 October 2010 (UTC)[reply]

Consider using a system program like netstat to see what programs have open socket connections. Lots of programs use a network connection - this is very irritating if your network usage is being monitored. netstat -b will tell you the program name for each process that has an open connection. It's also possible that your NetMeter program has an internet connection open, and relays monitoring data to some server Nimur (talk) 15:24, 21 October 2010 (UTC)[reply]
My laptop runs on Windows Vista. I've just typed netstat -b and it says that "The requested operation required elevation." What does that mean? I typed netstat -no and it returned a table whose column titles were Proto, Local Addresses, Foreign Address, State and PID. There are currently three different local addresses connected to different foreign addresses.
  • What does all of that mean?
  • Are the other local address other people using the same router?
  • Does that mean that the Netmeter stats were for the router and not just my laptop?
Fly by Night (talk) 15:45, 21 October 2010 (UTC)[reply]
If you're getting 'The requested operation required elevation', try opening netstat or the cmd window if you're using that as administrator. Either right click on the program in start menu and choose 'run as administrator' or rather then pushing enter use ctrl+shift+enter. Nil Einne (talk) 15:57, 21 October 2010 (UTC)[reply]
Here is the Windows netstat documentation. Local address is your computer's address - specifically, which address the network socket is connecting into. It can help you diagnose the purpose of the connection. Foreign address is the IP of the server on the other end. State is the socket status - which is explained here - but basically tells you if the connection is "active." PID is the process ID for the responsible program that owns that socket; using "-b" tells you the program name so the PID is redundant (unless you are running multiple copies of the same program). Nimur (talk) 16:40, 21 October 2010 (UTC)[reply]

Windows Update maybe? I disabled it on my computer, but I think if you have it enabled it will automatically download new updates. Also, check which network interface the program is monitoring; if it's set to "all interfaces" it could be seeing network activity which isn't related to the internet, or could be seeing double the amounts depending on your setup. 82.44.55.25 (talk) 15:55, 21 October 2010 (UTC)[reply]

NetMeter's network inteface is set to All interfaces (no loopback, no duplicate). I've used the netstat -b command. I had to run it as an administrator as Nil suggested. I closed down all of my windows and ran netstat -b, the only thing running in the background was justched.exe which is a Java update checker. I stopped that. Then I ran netstat -b again and nothing was accessing the internet. But NetMeter still said that I was downloading 9 KiB/sec! Fly by Night (talk) 16:22, 21 October 2010 (UTC)[reply]


Sigh, for "computer experts" you're pretty incompetent. @OP; netmeter is not designed to work with wireless, so it's picking up on every network packet between your wireless adapter and the router. The excess bandwidth you're seeing is just the two devices communicating with each other. A program designed to work with wireless would filter this out. 72.95.222.173 (talk) 16:30, 21 October 2010 (UTC)[reply]

72, perhaps you would like to explain what communication the device is sending to the router? If there are no open sockets, there is no IP traffic. Are you suggesting that netmeter is capable of monitoring lower-level packets than IP (link or phy data)? Do you have a source for that? Nimur (talk) 16:34, 21 October 2010 (UTC)[reply]
That's a very good point, 72.95.222.173. It did seem far too high. Fly by Night (talk) 17:28, 21 October 2010 (UTC)[reply]
I'm pretty sure that 72.95.222.173 is wrong. -- BenRG (talk) 05:42, 22 October 2010 (UTC)[reply]
While not necessarily agreeing with the OP72, I wonder if this is being approached from the wrong way. It's been a while since I've used bandwidth monitoring programs on Windows but can't you find some which will tell you more details about what connections the bandwidth is being used on rather then the complexity of trying to working out from netstat? [9] may work although may also be unnecessary complex for the OP Nil Einne (talk) 17:19, 21 October 2010 (UTC)[reply]
What have I said that you don't agree with? Fly by Night (talk) 17:28, 21 October 2010 (UTC)[reply]
Sorry for the confusion as I was thinking about this discussion rather then the thread so by OP I meant 72. Nil Einne (talk) 19:34, 21 October 2010 (UTC)[reply]
P.S. Other then per IP, from memory some programs may also tell you per program which may be more useful Nil Einne (talk) 05:54, 22 October 2010 (UTC)[reply]
P.P.S. Just realised I used OP to refer to two different people in that comment. Oops! (Basically I was thinking of 72's comment and said OP to refer to them as I was replying to Nimur then started thinking of the general thread and said OP to refer to the real OP. Nil Einne (talk) 01:54, 24 October 2010 (UTC)[reply]

The usage graph in NetMeter has changed now that I'm using Skype. It was all red. Now there is a yellow sub-graph. It looks like the yellow is my usage and the red is something else. Maybe other people's usage or traffic between my computer and the router. I've just ended the call and the yellow part has vanished. Does anyone have any idea how to change the settings? Fly by Night (talk) 19:56, 21 October 2010 (UTC)[reply]

Red is download, green (and yellow) is upload. 82.44.55.25 (talk) 20:05, 21 October 2010 (UTC)[reply]
According to the key, red is download and green is upload. There is no green representation in the graph. Fly by Night (talk) 21:45, 21 October 2010 (UTC)[reply]
Yellow and green are the same. The green turns yellow when it's in front of red. 82.44.55.25 (talk) 21:59, 21 October 2010 (UTC)[reply]

php

Say in php there was

echo "There are $number pages";

how could you get the script to put that into a .html file? 82.44.55.25 (talk) 18:38, 21 October 2010 (UTC)[reply]

If that is in a php script, accessing it through a web server will produce HTML. If you mean "I want to save this to a file", you need to open a file pointer and write it like:
$fp = fopen("your_file.html","w");
fputs($fp, "There are $number pages");
fclose($fp);
Then, you will have a file with that text inside of it. -- kainaw 18:40, 21 October 2010 (UTC)[reply]
Or, if you meant you wish to run from the command-line, you may want to use PHP Command Line Interface. Nimur (talk) 18:44, 21 October 2010 (UTC)[reply]
Or, perhaps, the questioner has a command-line script and wants to put it in a web page. Assuming the web server can parse PHP, you add to your HTML document the text: <?php echo "there are $number pages"; ?> -- kainaw 18:54, 21 October 2010 (UTC)[reply]

Spreadsheet of irregular payments

I have a long list of rent money paid, and the dates they were paid on. i.e. the spreadsheet has two columns. The tenant was supposed to pay a fixed amount on the 1st of every month, but actually paid the rent very irregularly. Some months were missed completely, some were paid late, a few may have been paid early. The tenant has to pay x percent compound interest on late payments, if they are paid more than fourteen days late.

The question is: how do I work out on a spreadsheet what the tenant owes, including interest? The problem is that the data has irregular and missing dates, so it will be much harder to calculate than if the dates were just regular dates one month apart. Not a homework question. Thanks. 92.15.29.194 (talk) 20:11, 21 October 2010 (UTC)[reply]

charge them simple interest, not compound. Sorry, it's not right of you to charge them the 15% you feel confident you could have made on the stock market either. Charge them 8% simple interest. 85.181.49.255 (talk) 21:02, 21 October 2010 (UTC)[reply]
I think you might have to put in a third column with the dates that each rent payment should have been paid on - ie the first of each month. You may have to add rows in for the months that the rent was not paid - for these months, you should manually insert the amount of rent into the the rent column and put N/A in the date column. Then, assuming that we're starting on row 2 and that column A has the date the rent was paid and column B has the rent amounts and column C is the one you added in, put the following in cell D2: =IF((A2-C2)>14,B2*(1+Data!A$1)^((A2-C2-14)/365.25)-B2,0). This deals with the months when the rent was paid. For the months when the rent was not paid, put the following into E2: =IF(A2="N/A",B2*(1+Data!A$1)^((Data!A$2-C2-14)/365.25),0).
The sheet Data has the annual interest rate in cell A1 and today's date (or the "as-of" date) in cell A2. I can't check if this works since I don't have access to Excel on this computer. You'll get errors in column D for the months where no rent was paid (you can get rid of them automatically by selecting column D and pressing ctrl+G) - then add up columns D and E. Zain Ebrahim (talk) 21:37, 21 October 2010 (UTC)[reply]
When the rent was paid for a particular month, was it always paid in full? If so, that makes the calculation much easier. Work out a daily interest rate. When you simply subtract 2 dates in Excel, it calculates the number of days. So, suppose the due date is in column A, the paid date is in column B, and the amount due is in column C, then column D could contain the number of days paid late as B2-A2, and column E could contain the interest due as '=IF(D2>14,(D2-14)*C2*daily_interest,"")'. Calculate a sum at the bottom of column E and request they pay that. However, if they are already struggling to pay the rent do you really think asking for the interest is actually going to make them pay more quickly in the future? You might just be dumping further despair on your tenant. You also need to consider what to do if they refuse to pay the interest, do you persue them through the small claims court? And if they are a benefit claimant you might eventully get the money at the rate of £1 per week. Your local Citizens Advice Bureau will almost certainly be able to provide you better advice, for free. Astronaut (talk) 21:54, 21 October 2010 (UTC)[reply]
The former tenant is quite well off and rented the place as part of a business. 92.29.125.8 (talk) 11:05, 22 October 2010 (UTC)[reply]

I'm wondering how to deal with a missed payments. Supposing the tenant missed one payment in January but paid all other payments that year in full and on time. Should I calculate the interest due from the January until the present time; or should I regard the February and subsequent payments as late payments for the previous month? 92.29.125.8 (talk) 11:05, 22 October 2010 (UTC)[reply]

The 14 day interest-free period causes both methods to give different answers. Note that if you go with the second approach (which seems like the likelier option), then my answer above would not be right. Zain Ebrahim (talk) 11:20, 22 October 2010 (UTC)[reply]
The 14 days is not interest free. If the rent was paid on day 13, no interest added. If it was paid on day 15, then 15 days of interest are added. I'm wondering if this would make the two modes of calculation equivalent, if all the late rents were more than 14 days overdue. 92.15.28.203 (talk) 19:39, 22 October 2010 (UTC)[reply]

As the comments above note, there are multiple ways of calculating compound interest when the debt is being sporadically incurred and repaid. If this is just an academic question, then the answer depends on the method described in the hypothetical credit agreement that both parties entered into at the beginning of the contract and (depending on whether the debtor is a consumer or a limited company, several acts of parliament). But your post (as ip 92.29.125.8) strongly suggests this is a real scenario, which means this question is veering off into the territory of legal and professional advice, which the reference desk absolutely does not provide. You should speak to a qualified accountant. I'm reluctant even to tell you which laws you might be breaking (lest I help you self-help yourself to Pentonville) but I definitely would not go sending an invoice or a demand until you've spoken to a qualified professional. -- Finlay McWalterTalk 17:15, 22 October 2010 (UTC)[reply]

This is about manipulating data with a spreadsheet and maths, no legal stuff involved. I could re-write it if you wish as a scenario in Cuckooland, where the teddy bears trade Smarties. 92.15.28.203 (talk) 19:39, 22 October 2010 (UTC)[reply]

October 22

tsql what is for keyword go?

if it's followed by a number >1 it's useful but otherwise.. t.i.a.--217.194.34.103 (talk) 09:28, 22 October 2010 (UTC)[reply]

http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/b9813ad0-6053-4723-8516-87cf27ebcf35 --Sean 17:28, 22 October 2010 (UTC)[reply]

List of software licenses used in a particular Ubuntu/Debian installation

Hi, I'm aware that the package vrms will list all non-free/contrib software, but I'm looking for a tool to list all licenses of installed packages by name, including the free ones. After all, just because they're free, doesn't mean they all share the same distribution terms (think Public Domain vs. BSD vs. GPL2-only vs. GPL3, for example). Is there a way to compile such a list, other than by doing it manually? -- 78.43.71.155 (talk) 14:13, 22 October 2010 (UTC)[reply]

I don't think that info is captured in a well-formed way either in the .deb package format (it would be in the control file, but I don't see anything there) or in the standard file layout that's deterministically parseable. It's a standard feature of Debian packages that they create a file called /usr/share/doc/packagename/copyright, but that's human readable (to the extent that lawyers can be considered human), not a readily machine readable format. And I'm not sure that every package has such a copyright file, and that they always put it where they should (the Debian guys are pretty thorough, but are non-free packagers so careful?). Beyond that, you can list all the installed packages with dpkg-query -l and for a given package list its constituent files with dpkg-query -L packagename, so (if you really needed this info) you could use this to examine every file in a given package, and then you're reduced to grepping the files for things that resemble copyright messages. -- Finlay McWalterTalk 14:40, 22 October 2010 (UTC)[reply]
Clarification: I know the licenses of those few non-free packages I have installed, in fact, I even have one system where vrms detects no non-free/contrib software. It's only the different free ones that are troubling me.
Sadly, comparing the output of dpkg --get-selections|wc -l (332 lines) and of find /usr/share/doc -iname "*copyright*"| wc -l (320 lines) shows that even the Debian guys didn't include a copyright notice with every package. :-( -- 78.43.71.155 (talk) 14:50, 22 October 2010 (UTC)[reply]
(edit conflict)On further inspection, quite a few don't have a copyright file:
  • If I run dpkg-query -l | wc -l that reports 2934 (really 2934 minus a few lines for lines of header)
dpkg --get-selections doesn't produce a header ;-) -- 78.43.71.155 (talk) 15:19, 22 October 2010 (UTC)[reply]
  • If I run ls -R /usr/share/doc | grep -i copyright | wc -l that reports 2466 (they're almost all copyright, but there's a few oddbods with other copyrighty names, so I've included them)
So that would suggest about 16% of packages don't have a /usr/share/doc/packagename/copyright file. -- Finlay McWalterTalk 14:51, 22 October 2010 (UTC)[reply]

Is a Storage Area Network head a Server?

Hello.

   I want to know what exactly a Storage Area Network is - I am aware that a SAN contains HDDs which hold volumes which are attached to servers via logical unit numbers. My question is rather whether a SAN head is considered a server. And I refer only to the SAN head, not the DAS arrays connected to the SAN head, and I am also not referring to SAN switches or storage routers.

   Best regards to everyone. Vickreman.Chettiar 14:33, 22 October 2010 (UTC)[reply]

A SAN device speaks a SAN protocol like FC or iSCSI and in essence pretends to be a big disk drive, so it should be considered a "storage device" and nothing else. I can't definitively say that some daft person won't consider all expensive enterprise electronic boxes to be "servers", but they shouldn't, and manufacturers to make both (like IBM, Sun/Oracle, and HP) don't. -- Finlay McWalterTalk 15:10, 22 October 2010 (UTC)[reply]
Just to clarify - since a NAS head, which serves files, is considered a file server; could a SAN head, which serves volumes (i.e. LUNs), be called a volume server? And as an aside, though it's just a matter of semantics, what is with the Area in Storage Area Network? Wouldn't it suffice to call it a storage network? I don't really understand the Area part... Vickreman.Chettiar 20:31, 22 October 2010 (UTC)[reply]
Is "SAN head" really a term in any use? If by that you mean a SAN device that aggregates a number of other SAN devices and presents them to a user on a single connection (something like a Brocade Fibre-Channel Switch), then I don't agree that it necessarily serves "volumes"; SAN is a block-level thing, so it serves blocks. Those blocks might just be direct-mapped from volumes in the downstream SAN devices, but such a device can remap and aggregate blocks (and devices, and connections) in more complicated ways. I think the A is there for symmetry with LAN, and to make it a word (rather than calling it an "SN"). -- Finlay McWalterTalk 20:43, 22 October 2010 (UTC)[reply]
For the record, the term SAN head is used by Hewlett-Packard. See the sixth paragraph of this Channel Register article by Ashlee Vance which quotes a HP Security Architect, which is what led me to begin with to figure a SAN head is considered a server, but I thought I'd check with the reference desk because I was unable to find any mention of SAN heads being classified as servers in the Wikipedia article on SANs. Vickreman.Chettiar 02:15, 23 October 2010 (UTC)[reply]

Is "ARC relationship" an Oracle term or generally accepted computer term?

Is "ARC relationship" an Oracle term or generally accepted computer science term? If it is Oracle only what is the standard name of this relationship. (If it is a general purpose term we should have an article on it!) -- Q Chris (talk) 15:00, 22 October 2010 (UTC)[reply]

Wipe out a USB stick

I've got a USB stick with some promotional material on it that resists deletion. It is within a partition disguised as virtual CD-ROM, which is read-only. The permissions cannot be changed. I also tried to remove it with a 3U removal tool and also deleting the whole thing with "sudo dd if=/dev/zero of=/dev/scd0". Everything without success. Does anyone have an idea of what can I do? Is there something which would reset the USB stick completely? (mtab output: /dev/scd0 /media/NEW iso9660 ro,nosuid,nodev,uhelper=hal,uid=1000,utf8 0 0 /dev/sdb1 /media/disk-1 vfat rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1000,utf8,umask=077,flush 0 0)

Have you tried bringing it over to a Windows or Mac machine that doesn't understand the partition table, and have it format the device as a FAT32 or NTFS or ext3 (or whatever) volume? Comet Tuttle (talk) 15:41, 22 October 2010 (UTC)[reply]
The problem persists in a Windows machine, Windows also consider this thing to be a legit CD-ROM, which cannot be formatted... Mr.K. (talk) 15:47, 22 October 2010 (UTC)[reply]
What happens when you use disk partitioning software to delete the partition? Comet Tuttle (talk) 15:54, 22 October 2010 (UTC)[reply]
GParted does not see the partition that is a virtual CD-ROM. It sees only the other free partition.--Mr.K. (talk) 15:56, 22 October 2010 (UTC)[reply]
That's sort of awesome. My next step would be to use disk partitioning software on a foreign machine (meaning Windows or Mac) to try to delete the partition. Or use some sort of embedded device, like a USB-stick-accepting camcorder, to try formatting the stick. Comet Tuttle (talk) 16:05, 22 October 2010 (UTC)[reply]
Well, actually it was their intention to be awesome difficult to remove. Mr.K. (talk) 16:36, 22 October 2010 (UTC)[reply]
That won't help. The controller on a U3 device manufactures a virtual CD-ROM volume (and a virtual usb hub) from flash blocks on its device that it does not normally export as part of the normal usb-mass-storage device that it also presents. The protocol for manipulating this (to reserve some blocks and present them as a virtual CD, and to undo that) is proprietary and trade-secret; I'd imagine it consists of some vendor-specific commands sent to the virtual device hub. The U3#Removal section discusses a Windows program that the U3 people implemented which does the "remove" operation (I guess you had to pay them $$s to get the "create" software). -- Finlay McWalterTalk 16:42, 22 October 2010 (UTC)[reply]
(I never knew about this — thanks.) Comet Tuttle (talk) 17:10, 22 October 2010 (UTC)[reply]
I'm aware this is not the answer you are looking for, but: USB sticks are cheap. Send it back to whoever placed the advertisement junk on it, with a cover letter saying that you'd rather give it back than being forced to watch their promotional junk in order to use it, and that any promotional efffect they were hoping for was negative. If enough people do this, maybe they'll think a bit about their next ad campaign. -- Ferkelparade π 16:03, 22 October 2010 (UTC)[reply]
It's not "promotional junk" but rather a common "feature" on a lot of flash drives. Shadowjams (talk) 09:21, 23 October 2010 (UTC)[reply]

That U3 thing is stored somewhere else on those keydrives, it's not stored on the accessible flash ram using fdisk. There's a provided tool by those manufacturers that will permanently remove it from the drive. I don't know if there's an open source version of the same thing, and I'm curious about where it's actually stored... but look at this link [10]. Shadowjams (talk) 09:21, 23 October 2010 (UTC)[reply]

There is an open source version, see the Weblinks section of U3, which had already been mentioned above as U3#Removal. (RTFA ;-)) -- 78.43.71.155 (talk) 10:09, 23 October 2010 (UTC)[reply]
It isn't open source if you have to '$dollar signs' for it (RTFA ;-)). Shadowjams (talk) 10:17, 23 October 2010 (UTC)[reply]
Are we referring to the same thing? I presume 78 is referring to [11] which while I don't know whether it will do what you need (or whether it works at all), is called open source by the article and is hosted on SourceForge who require things hosted there be open source. I don't quite understand your "$dollar signs" bit, but there's nothing stopping open source software from people charging for open source software under most definitions, for example the well known GPL doesn't stop it. However open source does usually at a minimum require the source code be available to anyone who owns the software and requests it, and without any additional payment except to cover the cost of distributing the source code. And people who use the software and obtain the source code are allowed to redistribute both for anyone to use without requiring permission or anyone requiring payment. So charging solely for those usually doesn't work very well (but offering additional services may) since other people may just redistribute it and your market may only ever be the first person to buy. Nil Einne (talk) 14:02, 23 October 2010 (UTC)[reply]
I prefer to be addressed by my last octet, you insensitive clod! - Just KIDDING :-D
You, as opposed to Shadowjams, did indeed understand what I was saying. Thanks for jumping in. :-) -- 78.43.71.155 (talk) 14:35, 23 October 2010 (UTC)[reply]

Can I change the font of a .pdf file?

Some authors have a really poor taste for fonts...--Mr.K. (talk) 15:43, 22 October 2010 (UTC)[reply]

What software do you have? Adobe Acrobat Professional can do lots of modifications (although whether it can change fonts I don't know) that other programs can't. Nyttend (talk) 20:08, 22 October 2010 (UTC)[reply]
I'm pretty sure this is impossible in general, and would require grody hacking in the few special cases where it might be theoretically possible. Even if you could change the font, the spacing parameters would not change, so the result would probably look pretty bad. Looie496 (talk) 20:25, 22 October 2010 (UTC)[reply]
Adobe Acrobat Professional can change the font of text. You first select the text using the text touch-up tool. Then, you right-click on it and select "Properties." A dialog will appear with a font drop-down list.--Best Dog Ever (talk) 23:56, 22 October 2010 (UTC)[reply]

ubuntu help

i have ubuntu 10.10 .it takes an extremely long time for me to shut down the system or to log out ..why might this happen? —Preceding unsigned comment added by Metallicmania (talkcontribs) 17:09, 22 October 2010 (UTC)[reply]

Probably because some program or daemon is taking a long time to shut down. I'm not sure this will work, but try hitting the Esc key during the shutdown. If I remember correctly, this will kick you into text mode, and you should be able to see a line saying what the OS is doing at that time. (I'm sure somebody will correct me if I have this wrong.) Looie496 (talk) 18:11, 22 October 2010 (UTC)[reply]

im quite new with linux so i do dont think ill be able to figure out that stuff —Preceding unsigned comment added by Metallicmania (talkcontribs) 18:17, 22 October 2010 (UTC)[reply]

Basically what I'm suggesting is that you hit Esc while the computer is slowly shutting down, look at the bottom line of text which tells you what the computer is doing, and tell us what it says. Without that information it's pretty much impossible to guess what the problem might be. Looie496 (talk) 20:23, 22 October 2010 (UTC)[reply]

i think ive managed to resolve that but heres another query. i had vista on my lappie and there was a 100 gb c drive and a 2 gb d drive . i used the d drive for backing up stuff. when i changed to ubuntu the d drive is missing. the 100 GB in C drive is anailable as root but no idea where is the other location.is there any way i can find out where that 2 GB is ?Metallicmania (talk) 16:55, 23 October 2010 (UTC)[reply]

Installing Ubuntu required you to repartition the drive. If you don't see that old partition, it probably means you installed in a way that overwrote all the existing partitions. It's possible to leave old partitions intact when installing, but that requires doing a custom install, and I'm guessing you didn't. Looie496 (talk) 18:44, 23 October 2010 (UTC)[reply]
The output of sudo fdisk -l (that's a lower-case L after the dash) might be helpful to us if we're to assist you with this issue. This is a command that you will have to type into a terminal window, and it will prompt you for your password. -- 78.43.71.155 (talk) 22:15, 23 October 2010 (UTC)[reply]

Click here

Many pages on the Ohio Historical Society website, such as its profile of the Kirtland Temple, have a little note at the top: "Click here for a new search". Having read our click here article, I'm confused — in specific cases like this, why is "click here" a bad idea? For example, people printing offline won't be able to use a search page, no matter how well it's described. Nyttend (talk) 20:05, 22 October 2010 (UTC)[reply]

The "accessibility" section of click here says "Screen readers, used by the visually impaired, can read out only the hyperlinks on the page as a quick method of navigation." The other links on that page (those in the menu down at the bottom) read sensibly when presented like this ("calendar", "places", "about", etc.), but this link will just read "here", with no context. If the link text was "new search" then it would be fine. -- Finlay McWalterTalk 20:15, 22 October 2010 (UTC)[reply]
I saw that part, but I don't understand — what else would be expected to be read? The URL of the link target? Nyttend (talk) 22:01, 22 October 2010 (UTC)[reply]
I don't understand what you don't understand :) As I said, if the text inside the A tag was "new search", that would make sense, but "here" doesn't. You may have to ask a more detailed question if you need me to explain further. -- Finlay McWalterTalk 22:11, 22 October 2010 (UTC)[reply]
And while not as bad as the accessibility problem, if you printed that page (say to hand out to people on your historical society's trip to that building) it does look kinda daft having "click here" on a bit of paper. We're so used to seeing stuff like this because so many web authors take no care at all over what a printout of their site should look like (so it ends up as a screendump, full of useless navigation cruft that makes no sense on paper). Smart websites (of which Wikipedia is a good example) take the effort to strip screen-only content from the print (mostly using some deft CSS) so that the printout makes for a sensible free-standing paper document. -- Finlay McWalterTalk 20:19, 22 October 2010 (UTC)[reply]
I usually just highlight the content on a webpage which I want printed, click File and select Print Preview, then select the As selected on screen option, and hit Print. Sometimes I have to adjust the page size as well before hiiting Print, so that the edges of the webpage don't get cut off. At times the page margins also need to be adjusted (in Page Setup). Rocketshiporion 20:45, 22 October 2010 (UTC)[reply]

For example, if you consider HTML like this:

  If you are interested in our news letter click <a href="newsletter.html">here</a> <br />
  If you want to read about our DIY brain transplant kit <a href="braintransplant.html">click here now</a> <br />
  If you have performed a brain transplant on yourself and wish to leave feedback, ask your carer to <a href="im_suing.html">click this link</a>

That would (on a reader that extracted the link texts for quick navigation) yield something logically like:

  • [here]
  • [click here now]
  • [click this link]
  • [speak the page text]

Whereas:

  Find out about our <a href="newsletter.html">newsletter</a> <br />
  Information about <a href="braintransplant.html">our DIY brain transplant kits</a> <br />
  Leave <a href="im_suing.html">feedback about your brain transplant</a>

would yield

  • [newsletter]
  • [our DIY brain transplant kits]
  • [feedback about your brain transplant]
  • [speak the page text]

With a system like this, there is really no way for a user to know what a link [here] would do, short of reading through the entire text (which on a spoken interface is very tiresome). -- Finlay McWalterTalk 22:36, 22 October 2010 (UTC)[reply]

Note that a reader might also use the title attribute on the A tag, although those are so rarely used it's probably not worth the bother. -- Finlay McWalterTalk 22:43, 22 October 2010 (UTC)[reply]

October 23

HDD over IP

Hello! I'm looking for some open software that I can install on a Linux (Debian) computer as a server and on Windows computers as clients and be able to easily write and retrieve files over an encrypted connection. Maybe something that lets me type in the IP address to the server with my Linux username and password and virtually mounts the server's hard drive to the client for easy navigation in a Windows file chooser. Thanks! Sorry if this question comes up a lot and I haven't found it in the archives--el Aprel (facta-facienda) 05:41, 23 October 2010 (UTC)[reply]

Samba (software) is the usual way to share disks and printers from Unix-like systems to Windows. But do you want the data to be encrypted on the network? A quick googling for CIFS encrypted suggests the standard Windows file sharing protocol doesn't have encryption. You could use an encrypted VPN link and do the sharing over it; that is not an entirely trivial thing to set up though. 88.112.56.9 (talk) 09:31, 23 October 2010 (UTC)[reply]
Try this and see if it helps. Might be easier than a full-scale VPN. -- 78.43.71.155 (talk) 10:03, 23 October 2010 (UTC)[reply]
Thank you for your responses. I do have access to a VPN, so if encryption isn't handled by the software, that's okay. I forgot to make clear that I want to transmit files over the Internet, not a LAN. I had a look at Samba, and it looks good, but I can't tell from the documentation I've read if it works over the Internet. Does it?--el Aprel (facta-facienda) 20:24, 23 October 2010 (UTC)[reply]

Extracting gegraphic coordinates from .kmz files

Is there any way to automatically extract geographic coordinates from Google Earth .kmz files to a text file or to a spreadsheet? —Preceding unsigned comment added by 113.199.216.230 (talk) 07:29, 23 October 2010 (UTC)[reply]

kmz files are just kml files gzip compressed. If you have a linux/unix/mac computer you can do cat your_file_here.kmz | gzip -cd > your_output_file_here.kml and then read the resulting file, which probably has the coordinates in it. I don't know the particular format of KML files but they're pretty standard and a lot of languages have modules that will understand them for you. Shadowjams (talk) 09:17, 23 October 2010 (UTC)[reply]
Once unzipped, Keyhole Markup Language is XML, so you'd typically use an XML parser like Beautiful Soup, libxml2, or one of those listed at Category:XML parsers to extract data from it. -- Finlay McWalterTalk 11:28, 23 October 2010 (UTC)[reply]
Here is an example that uses Beautiful Soup and Python to retrieve the coordinates for the course of the Bay to Breakers race (from, indirectly, Wikipedia):

#!/usr/bin/python
from BeautifulSoup import BeautifulSoup
import urllib

url='http://toolserver.org/~dschwen/kml.php?page=File:Finlay+McWalter%2Fsandbox/overlay.kml'
soup = BeautifulSoup(urllib.urlopen(url).read())

for c in soup.findAll('coordinates'):
    for d in c.contents:
        for location in d.split():
            # https://code.google.com/apis/kml/documentation/kmlreference.html#coordinates
            s=location.split(',')
            latitude, longitude, altitude = s[0],s[1],'undefined'
            if len(s)==3: # coords can be "lat,long" or "lat,long,alt"
                altitude=s[2]

            print 'lat=%(lat)s, long=%(longitude)s, altitude=%(altitude)s' % locals()

More complicated files will, of course, require more complex code. If this was a .kmz file rather than a .kml, you'd also have to run it through zlib to unzip it. -- Finlay McWalterTalk 15:15, 23 October 2010 (UTC)[reply]

Which language is this?

I'm using Singular and I would like to know what language it's using. Let M be a 3×3 matrix:

The trace of the matrix is given by tr(M) = m[1,1] + m[2,2] +m[3,3]. To calculate the trace in Singular you can use an for loop:

int tr; (Tells Singular that tr is an integer)
for (i = 1; i <= 3; i++) {tr = tr + m[i,i];} (This is the for loop)

Does anyone know if that for loop for (i = 1; i <= 3; i++) {tr = tr + m[i,i];} is from a programming language? Thanks in advance. Fly by Night (talk) 11:14, 23 October 2010 (UTC)[reply]

It's Singular's own language; its webside says it's "an intuitive, C-like programming language". -- Finlay McWalterTalk 11:21, 23 October 2010 (UTC)[reply]
Cool, where did you find that? (I found the exact same if loop in the if loop article, and you're right: it was in C). Fly by Night (talk) 11:28, 23 October 2010 (UTC)[reply]
It's on the homepage of the Singular website. While that code resembles C, it's not - C doesn't have (genuinely) multidimensional arrays. That code m[i,i] would have to be written m[i][i] to be syntactically valid C. -- Finlay McWalterTalk 13:02, 23 October 2010 (UTC)[reply]
C doesn't have multi-dimensional arrays, but C# does. However, C# does not have pointers or pointer arithmetics, so array indexing is the only way to access the arrays. In practice, it shouldn't matter that much. JIP | Talk 19:36, 23 October 2010 (UTC)[reply]
Pedantry demands that I point out that m[i,i] is in fact syntactically valid C, but doesn't do what you want. --Sean 20:09, 23 October 2010 (UTC)[reply]

how much faster is a mobile i7 duo than a core 2 duo at the same clock speed?

So Apple's 15inch MacBook Pro can be:

- 2.53 GHz Intel Core i5 Duo
- 2.4  GHz Intel Core i5 Duo
- 2.66 GHz Intel Core i7 Duo
- 2.8  GHz Intel Core i7 Duo

While its MacBook Air is:

- 1.4  GHz Intel Core 2 Duo (11-inch MacBook Air)
- 1.6  GHz Intel Core 2 Duo (11-inch MacBook Air)
- 1.86 GHz Intel Core 2 Duo (13-inch MacBook Air)
- 2.13 GHz Intel Core 2 Duo (13-inch MacBook Air)

What I would like to know is how the two architectures compare, gigahertz-for-gigahertz? They use exactly the same RAM... —Preceding unsigned comment added by 84.153.222.131 (talk) 12:06, 23 October 2010 (UTC)[reply]

Here's a list of benchmarks from cpubenchmark's website for high end CPUs. Don't know how to differentiate between the very similar model-names but basically from my read through the i5/i7 range are more powerful than the Core 2 Duo equivalent: http://www.cpubenchmark.net/high_end_cpus.html and http://www.cpubenchmark.net/mid_range_cpus.html ny156uk (talk) 19:25, 23 October 2010 (UTC)[reply]

Emacs Colour Scheme

I'm using Emacs version 21.4.22 (released January 2009). But I hate the colour scheme. The background is grey and some of the words appear in a bright, hard-to-see pink. How can I change the color scheme? I'm a total novice; this is my second time using Emacs. So a step-by-step guide would be very much appreciated. I hope you can help! Fly by Night (talk) 14:49, 23 October 2010 (UTC)[reply]

The simplest is to change the background colour when you start emacs with e.g. emacs -bg green (you may want white, though). If your emacs shows you many different font colours (on source code, I assume?), you probably have font-lock-mode enabled - I think that is the default for recent emacsen. You can configure the colours in you .emacs file. Here is an excerpt from mine:
 (global-font-lock-mode 1)
 (setq font-lock-maximum-decoration t)
 (setq font-lock-face-attributes    
       '((font-lock-comment-face "Firebrick") 
 	(font-lock-string-face "brown4") 
 	(font-lock-keyword-face "Purple")
 	(font-lock-function-name-face "Blue") 
 	(font-lock-variable-name-face "DarkGoldenrod")
 	(font-lock-type-face "DarkOliveGreen"))
       )
Copy this into your .emacs file and restart emacs (or put it into a buffer and do M-x eval-buffer to test the effect first). Does this help? --Stephan Schulz (talk) 15:31, 23 October 2010 (UTC)[reply]
It seems like it would help, but I have a few problems. I don't seem to have any files with the extension .emacs, and secondly I don't know what a buffer is nor how to put something into one. I downloaded SINGULAR and am using that. I'm using Windows Vista and I have a single desktop icon that "starts Emacs after starting the X-server". It doesn't look like I have a stand-alone version of Emacs. Rather a bundle version is opened by another program I'm using. I was hoping that there might be an option section or something. I guess I have a few questions to make:
  • What's a buffer and how do I put that code into one to test it?
  • Is there an options menu where I can change the preferences, if so how?
  • Could I download a stand-alone version of Emacs and start SINGULAR from it myself?
Sorry to be a pain. But like I said: this is my second time using Emacs. Fly by Night (talk) 16:42, 23 October 2010 (UTC)[reply]
"I'm using Windows Vista" - aha, there is you problem ;-). I'll do my best, but my experience with Windows (any version) is extremely limited. The .emacs file is emacs' configuration file. That's the full name - under UNIX-like systems, the leading dot makes it invisible to normal operations. There is a FAQ for emacs on Windows [12]. Check sections 3.4 and 3.5 for the init files. Emacs can edit multiple files (and, indeed, non-file data) at the same time. Each of the pieces of data resides in a separate buffer. There should be a top level menu entry called Buffers that allows you to select any of these buffers for editing. You can make new buffers various ways, the easiest is probably to open a new file via the File menu. Normally, the initial buffer that is open is called *scratch*. You can use that for experimentation. --Stephan Schulz (talk) 17:50, 23 October 2010 (UTC)This was silently merged in here by Wikipedia resolving an edit conflict without asking me. Weird... --Stephan Schulz (talk) 17:52, 23 October 2010 (UTC)[reply]
Assuming you are using Linux/Unix (or you wouldn't be using Emacs)... Type cd and press enter to get to your home directory. Type ls -a to list all of the files, including the hidden ones. You may see a file names ".emacs". The "." at the beginning means "this is a hidden file", which is why you have to use "-a" to see it. If you see the .emacs file, open it and edit it in your favorite text editor (emacs, vi, nano, ...). If you don't see a .emacs file, just create one. Next time you start Emacs, it will check your home directory for a file named ".emacs" and load any settings in that file. -- kainaw 17:27, 23 October 2010 (UTC)[reply]
As my last post said: "I'm using Windows Vista...". Emacs is available for both Linux and Windows, see here. Fly by Night (talk) 17:40, 23 October 2010 (UTC)[reply]
It's probably best to go M-x customize (that is, hit alt-x, type "customize", and hit enter) and navigate to "Faces", "Font Lock", and then "Font Lock Faces". It'll take a little longer to figure out, but you'll be able to use the customize interface to adjust all sorts of thing about your emacs experience. When you've edited something, go C-x C-s (that is, control-x, then control-s; same as saving a file) to save and try out your customizations; it's easier than having to restart emacs. Paul (Stansifer) 18:34, 23 October 2010 (UTC)[reply]
Thanks for the advise. But I give up. It's too complicated. There are different colours for everything. I managed to change the horrible pink font colour to blue, but then when I run the program it seems to have its own default colours. I give up. I'll use the MS DOS terminal instead. At least I can read what I've written. Thanks for all your help. Fly by Night (talk) 18:47, 23 October 2010 (UTC)[reply]

I very strongly recommend to upgrade to Emacs 23 if at all possible. It is the first version to finally support Xft, which gives a night-and-day improvement in the appearance of text. There are also many other important improvements over Emacs 21. Looie496 (talk) 18:52, 23 October 2010 (UTC)[reply]

As I mentioned above: as far as I can tell, I don't have a stand-alone copy of Emacs. I use SINGULAR which opens Emacs after it's started X-server. One of my questions above was whether I could download a stand-alone version of Emacs and then open SINGULAR in the new version. But nobody replied. Fly by Night (talk) 20:08, 23 October 2010 (UTC)[reply]
The Singular manual says that you can run it using Emacs as an interface, and gives instructions not only on starting its bundled Emacs but also on how to separately install Emacs (any version) and then run Singular under it. You might also look for the color-theme.el package. --Tardis (talk) 21:14, 23 October 2010 (UTC)[reply]
That's great. Thanks Tardis. I'll try to find a new version of Emacs and see how I go. Fly by Night (talk) 00:54, 24 October 2010 (UTC)[reply]

Program to build an electronic translator

Hello there,

I'm working on building an electronic translation facility for Tetun to English. I used to use the program, Tolken99, for projects such as this, but the program no longer works and has not been updated. It would simply be a programme into which one could input a custom dictionary and with an interface that translates from one language to another attached.

On a somewhat related note, does anyone know of any (preferably free) normal text to IPA transcription programs?

All the best

--178.99.129.52 (talk) 16:09, 23 October 2010 (UTC)[reply]

Is your goal to perform simple word substitution? In that case, almost any scripting language can perform this task; but the translations will be of poor quality. If you want to perform actual natural language processing and machine translation, the short answer is that there is no "easy" program to use or customize. These computerized-translations (like the ones you see on Google Translate or Microsoft Translate are very sophisticated algorithms and elaborate databases that use complex, mathematical/statistical language models. Adding support for a rare language like Tetun will be a huge undertaking. Can you clarify your objective? Nimur (talk) 18:17, 23 October 2010 (UTC)[reply]

Proxy servers

The recent Wikileaks stories made me wonder about one thing connected with proxy servers and anonymity that I never quite understood: Let's assume, for argument's sake, that I work at John Doe University. In my office, I have access to the internet through the University network (johndoe.edu). I am also a consultant for Jane Roe University and I can use their proxy server, proxy.janeroe.edu

Now, say, I access a site such as wikileaks.org from my John Doe office, with proxying through janeroe.edu enabled in my browser. I know that the administrator of janeroe.edu can find out, upon investigation of server logs, that my computer is actually in the johndoe.edu network and that I am accessing wikileaks.org

But what does the johndoe.edu admin see, if he were ever to check his access logs? Would he only ever see that I was connected to proxy.janeroe.edu? Or could he in any way figure out which sites I accessed through the proxy (namely wikileaks.org) ?

Incidentally, does the situation change if you substitute "VPN" for "proxy" in the above? Thanks. (Oh and PS, if you're now eagerly awaiting a major data leak from a big US university in the next few days, you will be disappointed... ;-) --Quidquididesttimeo (talk) 18:27, 23 October 2010 (UTC)[reply]

For just http proxies, there's no reason anyone who runs a machine through which the traffic flows can't see and log whatever they want, and so you have no privacy. A VPN is a bit better, because the local admin only sees you connecting to the VPN server elsewhere. But if both operators connive, they can correlate (in time) VPN packets to plain packets leaving the VPN, and can figure out who's doing what. Networks like Tor use multiple hops of onion routing to make the it difficult to correlate input packets withoutput ones - you'd need the connivance of everyone in the virtual circuit, and if Tor can use long virtual circuits (which cross many institutional and national boundaries) this makes achieving that connivance more difficult. Note that when I say "connive" that includes operators acting under compulsion (e.g. of subpoena) or interception of traffic through their equipment (with or without their knowledge). -- Finlay McWalterTalk 18:36, 23 October 2010 (UTC)[reply]
But consider the pervasive nature of internet surveillance by large government security establishments, and particularly transnational sharing schemes such as those that may exist under UKUSA Agreement. If you can surveil a significant proportion of the nodes in a given OR virtual circuit, can you start to draw worthwhile statistical inferences about the traffic through that network? If your goal is to correlate packets entering the network with ones leaving it (so you know who is sending to whom), does knowledge of a serious proportion of each node's traffic allow you to infer just a little tiny bit of a probablistic correlation. That alone isn't much use, but if you monitor a great deal of traffic, do those probabilities start to stack up - that is, is that one cable modem in Maryland that's been sending tens of megabytes of traffic into TOR for days just a pr0n provider, or is that the traffic going to Wikileaks? We've really no idea what the capabilities of NSA, GCHQ etc. are; if I were wishing to send stuff to wikileaks, I don't know if I'd be willing to bet my life on the proposition that they don't have worthwhile traffic analysis over it. They're much smarter than I am. -- Finlay McWalterTalk 19:28, 23 October 2010 (UTC)[reply]

October 24

Editing my website

So someone saw fit to make me the web-master of an organization's website. The site itself is up and running and they just want me to update the site regularly.

How do I do this?

Sorry for sounding like an ignoramus, but it's only because I have no idea how to do this. Thanks in advance.