Jump to content

Wikipedia:Reference desk/Archives/Computing/2010 September 20

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


September 20

[edit]

Open-Source Nature of Linux

[edit]

Hi.

   This is a licensing question regarding LInux, and so may not actually belong on the Computing RefDesk, but I couldn't find any more suitable RefDesk to put it on. My understanding (correct me if I'm wrong) is that Linux was released under the GPL license, and requires anyone who modifies the source code makes the modified available to everyone else - this is the concept of free and open-source software? So my question is this:

   Why are Red Hat and Novell allowed to keep their Linux products; Red Hat Linux and SUSE Linux respectively; closed-source, and charge people money for copies of their software? It seems to me that both of these companies are in violation of the license under which they received Linux. Hopefully, someone here can explain how it all works to me.

   Thanks again. Rocketshiporion 01:33, 20 September 2010 (UTC)[reply]

--------------------------------------------------------------------------------

a) Red Hat and SUSE are not closed-source;
b) there is nothing in the GPL which forbids charging a fee for copies of the software.
Marnanel (talk) 01:32, 20 September 2010 (UTC)[reply]
This is answered at [[1]] but I'll reproduce it below.
"Red Hat partly operates on a professional open-source business model based on open code, development within a community, professional quality assurance, and subscription-based customer support. They produce open-source code, so more programmers can make further adaptations and improvements. Red Hat sells subscriptions for the support, training, and integration services that help customers in using open-source software. Customers pay one set price for unlimited access to services such as Red Hat Network and up to 24/7 support." - so you are not paying for the software, you pay for their expertise in getting it working and ongoing lifetime tech support. Exxolon (talk) 01:34, 20 September 2010 (UTC)[reply]
So if I were to ask Red Hat, for example, to give me a copy of their Red Hat Linux software (without the subscription) for free, would they be legally obliged to do so (under the terms of the GPL)? Rocketshiporion 01:40, 20 September 2010 (UTC)[reply]
This really needs a Linux expert to answer (which I'm not). Exxolon (talk) 02:00, 20 September 2010 (UTC)[reply]
Red Hat Enterprise Linux is Free software, so Red Hat is obliged to provide the source code for free. It can be found here. You'll have to compile it yourself though, or use one of the distributions based on RHEL, such as CentOS. See Red Hat Enterprise Linux derivatives for other options. It is a similar story with Novell and SUSE. Winston365 (talk) 02:18, 20 September 2010 (UTC)[reply]
Two small corrections. Red Hat is not obliged to provide the source for free, but only to provide it "for a charge no more than your cost of physically performing source distribution". And this requirement is because Linux is Free Software (so is FreeBSD), but specifically, because Linux is Free Software under the GPL. --Stephan Schulz (talk) 02:28, 20 September 2010 (UTC)[reply]
A technicality: I don't believe (though I'm not a lawyer) that RedHat is required to give the source code to just anyone to who asks, even if they have no relationship with RedHat. If you have received the software from RedHat, then they must provide the source code to you, and they cannot prevent you from redistributing it. Therefore there is no particular advantage to RedHat in not distributing it to anyone who asks (it would be all over the net anyway). --Trovatore (talk) 03:07, 20 September 2010 (UTC)[reply]
Yes, that's correct. This is not just a technical detail, this is of huge significance to the operating nature of the GPL. Free software licensed under the GPL is not "obligatory" to hand over to the entire world: but if you distribute it in any form, you are required by the license terms to provide the source code (or otherwise make the source code available) to whomever you gave the binaries to. Nimur (talk) 04:35, 20 September 2010 (UTC)[reply]
It's certainly an important distinction in principle, yes. How many people would accept a license that potentially exposed them to a claim against them by anyone in the world?
But in the case of something like Red Hat, I think it comes to the same thing in practice. In theory Red Hat could require you to prove you had acquired the binaries from them before serving you the source code. Or they could distribute the software in such a way that you couldn't get the binaries without the source, and then have no further liability to provide source (I think that works, anyway). Either of these choices would come with costs, and neither would provide any particular benefit. Much easier and cleaner to just put the source on their website, with no restrictions. --Trovatore (talk) 05:56, 20 September 2010 (UTC)[reply]
There are various notable examples where the GPL gives a strategic advantage to a different party, i.e. the software author, the software customer, or the software vendor. The party who benefits most from the protections that the GPL provides (specifically, the right to redistribute) will depend on circumstances and market conditions. You can read all kinds of expert legal interpretations at Stanford's Center for Internet and Society, part of the Stanford Law School that advocates free software and investigates its legal implications. For example, in regard to the OP's question about Linux: here is an analysis of a case litigated against the Free Software Foundation on the premise that licensing Linux as free software gave a competitive, monopolistic advantage to large corporations. (The case was ruled in favor of FSF). These issues are complex; this site hosts many additional expert opinions about Linux and its license. Nimur (talk) 06:53, 20 September 2010 (UTC)[reply]
Specifically GPL is a strongly copyleft license while the BSD license is not. This is why companies like Microsoft and Apple are able to use code from BSD without release the source (in the case of Microsoft) or releasing it under their own terms (in the case of Apple) Nil Einne (talk) 14:55, 20 September 2010 (UTC)[reply]
If you're looking for a free RedHat, get CentOS. No guaranteed support or services, of course. Unilynx (talk) 06:55, 21 September 2010 (UTC)[reply]

need a information for project

[edit]

Hello, my self sanchit patil. I need some information about new windows 8 operating system. I search information in your search section but there is no information about this keyword. Can you help me? I want this information. Please give me the link for information of windows 8 in wikipedia. Thak You, —Preceding unsigned comment added by Patil.sanchit50 (talkcontribs) 03:14, 20 September 2010 (UTC)[reply]

To the best of my knowledge, the latest version of Windows is Microsoft Windows 7. Are you sure that you don't mean Microsoft Windows Server 2008? Rocketshiporion 04:02, 20 September 2010 (UTC)[reply]
They might be looking for info on Windows 8 though that isn't expected to be released until 2012. Dismas|(talk) 04:31, 20 September 2010 (UTC)[reply]

Lost images on SD card

[edit]

Hi , I asked this question earlier and Dbfirs posed a couple of points such as couldnt I just format the card -but as its capacity is still on the card I cant format it as you need to delete using the camera .If I could return these images on to the card then I can do whatever I like . DBfirs I tried to send you the message direct but couldnt see how to contact you . AlanwrigAlanwrig (talk) 06:00, 20 September 2010 (UTC)[reply]

You don't need to delete anything to format the card. Formatting does the deleting automatically, but, before you format, make sure that you have a copy (and preferably a backup) of the images. When a card is to be used in a camera, it is always better to use the camera to format the card (though it usually works if you use the computer, provided that you choose the correct format). Dbfirs 08:28, 20 September 2010 (UTC)[reply]
I'm not sure but it sounds like you may be having problems because even though you think you deleted the photos from the card, the camera is still registering them as taking capacity therefore you want to return the photos to the camera to regain the capacity? This is a strange problem but I would recommend you clear out all photos from the camera, making sure you keep a copy of everything you want to keep, then format the card with the camera as Dbfirs suggests. It may be helpful if you tell us the model number of your camera. Nil Einne (talk) 14:45, 20 September 2010 (UTC)[reply]

Nil Einne , Yes you see my problem ,I cant see how I can format my SD card when the camera is saying " no images " normaly one deletes photos one by one . Is there no way i can retrieve the images back to the card ? I dont know what I ve done wrong as I ve used this card reader on my PC ,Windows & 7 before ,no problem . MY camera is a Samsung Digimax V800 .AlanwrigAlanwrig (talk) 16:40, 20 September 2010 (UTC)[reply]

Formatting does not delete the photos one by one, and you do not need to delete before you format. Does the Samsung Digimax V800 not have a format function? Perhaps someone who has this model can explain what buttons to press to achieve a format? It is not the same as deleting. You can format a card that the camera thinks has no images. The problem is probably in one of the control files, and this will be re-written after a format. Dbfirs 06:45, 21 September 2010 (UTC)[reply]
According to page 96 of PDF/DJVU (same file different format) of the international? 1.0 manual and page 91 of PDF/DJVU of the 1.2 US? manual (again same file different format) there should be a format option in the camera setup menu. I recommend the 1.0 manual instead of the 1.2 since at least for this it seems better as it shows a picture and is otherwise clearer.
If those links don't work or you would prefer the manual in a different language try the international download site for the 1.0 manuals or the US download site for the 1.2 manuals (only English, Spanish and Korea). The US site lists 3 model numbers for your camera but the manual is the same for each.
As has already been said, you don't have to do anything before you format. However and let me emphasise this, it will remove any and all content on the card so if there are any files you want on the card, however they got there and no matter whether they are 'protected' or not please make sure you copy them elsewhere first. To avoid mistakes, you may also want to check they are copied properly.
Nil Einne (talk) 08:07, 21 September 2010 (UTC)[reply]
Thanks for finding the manual for the OP. Sorry I didn't have time to search for it. Dbfirs 19:51, 21 September 2010 (UTC)[reply]

OO Calc formula question - DONE

[edit]

 Done

Hello, Refdeskers. I couldn't find help through Googling, so I will need to ask here directly. In Calc, I need to select a value from a table based on entries from two drop-down lists (say, the row and column). There probably is a simpler way to do this than constructing a mile-long IF statement... is there? Any hint will do. Cheers! --Ouro (blah blah) 10:56, 20 September 2010 (UTC)[reply]

Just to ensure that I understand this correctly... You normally select a value with something like "=F2". But, you are storing the F and 2 in other fields (pretend they are A1 and A2). So, you want something like "={A1}{A2}". I tried that and it doesn't work. If that is what you are trying to do, I will look further. There should be some sort of eval function to evaluate a text string as a function. -- kainaw 12:32, 20 September 2010 (UTC)[reply]
I will write this out then. I have an array, rows are colours and columns are objects (for simplicity). And to that I have two drop down lists, one to select the colours and the other to select objects. Now, I need a field which will return the stored in the array for the selected object and colour. I'm searching, but I cannot come to the solution. Any ideas, Kainaw? --Ouro (blah blah) 12:40, 20 September 2010 (UTC)[reply]
Found it! I've uploaded the spreadsheet for you to see here. You can select the options in fields B3 and B4, and the formula is in B9. Found it online finally. The function handles translate into Polish, and I didn't know the English handles so I chose to upload the file for you to see. Thanks for the will to help! --Ouro (blah blah) 13:17, 20 September 2010 (UTC)[reply]

Adding one million record

[edit]

Hi friends, I need to add one million records in my table. May I know how to create a script to add the records. —Preceding unsigned comment added by Appvivek (talkcontribs) 11:34, 20 September 2010 (UTC)[reply]

You don't say what software your table is set up in, or what format your million records are in at present. Comma-separated values or a similar format can often be imported without writing a script, but a million is a large number of records! (If this is software that you have written yourself, then the script should be no problem for you.) Dbfirs 12:20, 20 September 2010 (UTC)[reply]
Most SQL databases have an import function that can read CSV files. But, you need to ensure that the CSV file is valid. So, I usually make a new table and import into that to ensure there are no errors. Then, I move the data from the temp table to the real table when it all looks good. If you state what database you are using, we can provide better advice. -- kainaw 12:29, 20 September 2010 (UTC)[reply]
You will get a much better result if you do a mass load of data rather than add records one by one. Graeme Bartlett (talk) 11:23, 24 September 2010 (UTC)[reply]

How much does an IBM server (mainframe) with 4 TB of RAM cost?

[edit]

How much does an IBM server with 4 TB of RAM cost (approximately)? How about a Sun one?

Reference to these two lines supporting 4 TB of RAM

Thank you. 84.153.216.33 (talk) 12:56, 20 September 2010 (UTC)[reply]

There's a blogpost of what 1 TB of 4GB DIMM ram looks like...at about $150 for 1000 4GB DIMM DD3 ram would be $USD 150,000 + tax. Still not sure what you would do with 4TB of ram 0.o (some extensive database cataloging?).Smallman12q (talk) 13:05, 20 September 2010 (UTC)[reply]
ouch. Does it go down if you pick two thousand 2 GB pieces, or four thousand one gigabyte pieces? What about if you pick DDR2, or simple DDR? What is the CHEAPEST way to populate a server from IBM or from Sun with 4 TB of RAM? How about if you lower the requirement to only 1 TB? Thank you. 84.153.216.33 (talk) 13:12, 20 September 2010 (UTC)[reply]
Wouldn't you need registered memory for something like that? Perhaps even Fully Buffered DIMM. And I suspect most people would want ECC too (although it may not be a requirement) Nil Einne (talk) 13:27, 20 September 2010 (UTC)[reply]
Original poster, you used the word "mainframe" in the section header of this question. Really? What computer are you actually looking at for this RAM splurge? Identifying the actual model number would help us. Comet Tuttle (talk) 16:37, 20 September 2010 (UTC)[reply]
I don't care. I just want to know what price range we're talking about, for any kind of commodity server or mainframe. Namely, the cheapest one that meets my requirements (and is currently produced). I am not considering clusters at this time. RThe data point already received, $150k, seems too steep for me however. Does anyone have a cheaper solution? 84.153.242.136 (talk) 16:57, 20 September 2010 (UTC)[reply]
I haven't even been able to find a price for a server at this scale, let alone the memory to fill it up. The information online never comes with a price, which suggests the old saying "if you have to ask, you can't afford it." But this promotion suggests that E25K servers usually cost more than half a million dollars (at least, back in 2007, when they were still made). Making effective use of 4TB of RAM is going to require some expensive other components... Paul (Stansifer) 19:31, 20 September 2010 (UTC)[reply]
Not long ago I priced a system from HP with a 1 TB of RAM and 4 quad-core CPUs at ~$120,000. To the original poster, it might be helpful if you described your intended use. Depending on your goals, it might be possible to use much less RAM and take advantage of the inexpensive (albeit slow) nature of hard drives. Dragons flight (talk) 19:58, 20 September 2010 (UTC)[reply]
For only US$50,000, I'll teach you how to use a linked list instead of an array, and you won't need 4TB of RAM anymore. Comet Tuttle (talk) 21:04, 20 September 2010 (UTC)[reply]
ha-ha (OP here). That's actually very funny :) 92.229.14.140 (talk) 21:37, 20 September 2010 (UTC)[reply]
The Hewlett-Packard ProLiant DL980 G7 Server costs atleast $266,000.00 when configured with its maximum capacity of 2 terabytes of RAM. I cannot call myself an expert on the subject of server pricing (I'm generally more concerned with the technical capacities of the server), but if you could state your intended applications, perhaps someone could figure out whether you really need 4 terabytes of RAM. The Hewlett-Packard ProLiant DL980 G7 Server, which supports up to eight oct-core processors and 2TB of RAM, is the highest-capacity single server (i.e. not a cluster) I have come across to date. Rocketshiporion 03:14, 21 September 2010 (UTC)[reply]
My own computer has twelve 3.33GHz processing-cores and just a total of 168GB of RAM (144GB of DDR3 1333MHz ECC RAM and 24GB of GDDR5 1566MHz ECC RAM), and it suffices for most purposes. Rocketshiporion 03:30, 21 September 2010 (UTC)[reply]
The only Solaris server that supports 4TB RAM is the M9000. It's actually manufactured by Fujitsu, but Oracle sells it under their Sun brand as well. With 64 processors, 128GB of RAM, and 64 SAS 73Gb drives, the M9000 lists at $10,100,320.[2] With 2 to 4 TB of RAM, I'm sure it would cost substantially more. The maintenance contract from Oracle would cost around $356,000 per year.[3]. // ⌘macwhiz (talk) 03:38, 24 September 2010 (UTC)[reply]
If you seriously can afford an IBM mainframe, IBM will send a salesman to talk to you. You may wish to consider the architecture of the machien that matches your needs as these two kinds of boxes will have very different capabilities. You will alos have to factor in software another few hundred thousand for an IBM. Graeme Bartlett (talk) 11:21, 24 September 2010 (UTC)[reply]

Windows 7

[edit]
  1. Can I install Windows 7 64-bit on a 32-bit computer
  2. Can I install Windows 7 32-bit on a 64-bit computer —Preceding unsigned comment added by 71.190.202.148 (talk) 13:38, 20 September 2010 (UTC)[reply]
No and yes.[4] ---— Gadget850 (Ed) talk 13:42, 20 September 2010 (UTC)[reply]

Ubuntu/Linux delete /usr/share/doc?

[edit]

I'm doing a bit of housecleaning on my installation, as Ubuntu is starting to get dangerously bloated. One of the things I want to get rid of are the 1,942 folder containing 9,798 files (!) under /usr/share/doc.

They're all just changelogs, copyright texts, readmes and example files/folders. Do they serve any practical purpose, or can they be safely purged? Asav (talk) 14:00, 20 September 2010 (UTC)[reply]

Well, if you require to read or analyse them, then they do serve a practical purpose :) but can be easily deleted, your system's day-to-day operation will not be harmed. --Ouro (blah blah) 14:43, 20 September 2010 (UTC)[reply]
Thanks, Ouro! My greed for knowledge does not extend to changelogs. Wikipedia and Google still that hunger. Asav (talk) 15:16, 20 September 2010 (UTC)[reply]
Under my /usr/share/doc I find a significant number of PDF files, especially in the TeX-related directories. I wouldn't get rid of those, personally. There do seem to be an awful lot of changelogs, though. --Trovatore (talk) 15:29, 20 September 2010 (UTC)[reply]
I wouldn't get rid of these if I could avoid it as they are installed by the package manager and will be reinstalled when you upgrade packages. Debian Policy does guarantee that it won't affect the functioning of the system, though. Amoe (talk) 20:03, 20 September 2010 (UTC)[reply]
My knowledge is also not broad, however I am learning. --Ouro (blah blah) 06:56, 21 September 2010 (UTC)[reply]

Hotmail will not word wrap

[edit]

In the last one or two weeks I've started getting emails which are not word-wrapped - the text just disapears to the right. How can I make Hotmail display them word wrapped? I have not found any Option which does this. I'm using Firefox and WinXP. Thanks 92.24.182.151 (talk) 14:02, 20 September 2010 (UTC)[reply]

Microsoft Certifications by Technology

[edit]

Hello there, I have visited Microsoft's Learning website for their prfofessional certifications. I want one of these certificates. But I am bit confused about which certificates suit me best as the requirements of these cerficates are mostly limited to IT Professionals. I have just completed Bachelor degree in Business studies.Being a regular desktop user, I am capable of performing windows tasks and tweaking browsers (beginner to intermediate level). So, for which exam I should prepare myself? Thank--180.234.0.174 (talk) 18:14, 20 September 2010 (UTC)[reply]

Sorry, you need to give us a little more information. What is your objective? Is there a particular job you are trying to qualify for, and you feel that you won't be taken seriously without a particular certificate? What certificate does the employer say they want you to have? Comet Tuttle (talk) 21:02, 20 September 2010 (UTC)[reply]
My objective is to become expert on W7 OS and MS office 2010.--180.234.57.72 (talk) 16:21, 21 September 2010 (UTC)[reply]
For Office, see Office Specialist Certification, for W7, you're probably looking at Microsoft Certified Technology Specialist (MCTS).Smallman12q (talk) 01:56, 22 September 2010 (UTC)[reply]

Javascript

[edit]

In javascript, how do you put the contents of a page, say http://example.com/test.php, into

var test=????????????????

82.44.55.25 (talk) 18:32, 20 September 2010 (UTC)[reply]

You will want to use AJAX. Even a simple AJAX fetch is a lot of code. I suggest googling for something like "simple ajax example". -- kainaw 18:51, 20 September 2010 (UTC)[reply]
So there's no way to do this in javascript? I want it for greasemonkey, I don't know anything about "ajax" 82.44.55.25 (talk) 00:02, 21 September 2010 (UTC)[reply]
See AJAX: it is Javascript. But if you mean that you're operating with a script that's effectively on the page in question (as I think Greasemonkey does), then you can probably use something like document.body.innerHTML. --Tardis (talk) 01:25, 21 September 2010 (UTC)[reply]
Err, AJAX is more than just Javascript. It's Javascript plus server-side languages. Not really what the OP wants it for. I'm a bit confused about how this script in question is meant to work. If you're just trying to have it be able to look at the HTML of the same page it is on, the body.innerHTML bit that Tardis mentions should work. --Mr.98 (talk) 03:53, 21 September 2010 (UTC)[reply]
That is not entirely correct... AJAX is just Javascript. To make "proper" use of it, you need scripts on the server to respond to requests. However, you can use AJAX to ask for an entire page from any old web server. In the end, it is nothing more than a query-response capability for Javascript. The reason I mentioned it is because the questioner did not state that he wants the contents of the page he is currently viewing. If he wants the contents of the page he is vieweing, he can look at the innerHTML. If he wants the contents of another page, he needs to fetch it. -- kainaw 03:59, 21 September 2010 (UTC)[reply]
You can't request a page from any server. It has to be from the same server the page is hosted on, for security reasons.--Best Dog Ever (talk) 04:06, 21 September 2010 (UTC)[reply]
I know, but it is as close as you can get with Javascript. You can't even view the source of an iframe to another server in Javascript. If that is what the user is trying to do, I thought it would be fine to let him muck around for a while before deciding he has to learn a different programming language. -- kainaw 04:09, 21 September 2010 (UTC)[reply]
It's true you can't request page from any server, but it doesn't have to be on the same server. The server just needs to support cross-domain requests. --62.142.167.85 (talk) 07:07, 21 September 2010 (UTC)[reply]
I think you're making a muddle of what AJAX is to someone who is asking for something else. It's not "just Javascript," it's using specific types of Javascript in specific ways with specific servers and so forth. They don't need AJAX for what they are trying to do and it's not clear that AJAX would even help them. I think it's quite a long rabbit hole to send someone who is a Javascript newbie on, and saying it is "just Javascript" is going to be terribly confusing to someone who doesn't know much about Javascript, I have to say. I think the fact that you're happy to let them "muck around" with it before "deciding he has to learn a different programming language" is not exactly a great sign of a great answer. "Oh good, I'll give you an answer that will eventually lead to your frustration and deciding that you have to learn something from the ground up." If you think the OP needs to really learn Javascript I guess you should just say so, but that's not what the OP asked about and it's a horrible answer for that reason. --Mr.98 (talk) 11:55, 22 September 2010 (UTC)[reply]
As stated above... You appear to be under the assumption that the user wants to view the HTML of the page he is currently viewing. If so, why doesn't the question state: "I want to view the HTML of the page I am viewing." instead of "I want to view the HTML of http://example.com/test.php". If the user is working on PHP and wants to view the source code - he can simply use the browser to view the source code. If the user is looking at someone else's website and wants to view the source code, he can simply view the source code in the browser. If the user wants to muck around with the HTML of his own page that he is currently viewing, he would have states "the page I'm viewing" instead of "http://example.com". Now, what is left... If the user is trying to dynamically load up the source code of another website all together so he can use it in his own website, he would have asked how to view the HTML of another website - which is what he asked for. Why would he need to dynamically (as opposed to statically) load the source code of another website? There must be something on that website that changes, such as login images or captchas. He needs to pass them through on his own website to convince the user that it is actually another website. In other words, he is phishing. Do I feel bad about sending a wannabe phisher down a dead-end trail? Nope. Not at all. -- kainaw 12:08, 22 September 2010 (UTC)[reply]
Are you accusing me of phishing? I want to load http://example.com/test.php into a var in greasemonkey which I clearly stated above. I don't know how you think I'm going to be phishing with greasemonkey running on my own browser. The point of this which perhaps I should have included in the original question is to load http://example.com/test.php into a var which will either say "up" or not load. Then I'd do something like:

if (test.php = up)
Server is up
if (test.php != up)
Server is down

or whatever. It's a status script to let me know if a server is up or not. 82.44.55.25 (talk) 14:07, 22 September 2010 (UTC)[reply]
Yes. I was accusing you of phishing because you wanted the HTML of another website. You didn't mention greasemonkey in any way until AFTER the suggestion to use AJAX was given. You didn't state that you didn't need the HTML at all until just now. What you want is a status of another website, not the HTML. That is completely different. Because, as mentioned above, you cannot access a remote site through javascript, you must perform a trick. There are two options: Use a browser that allows cross-site scripting or place an iframe on your page. Set the location of the iframe. Your browser might allow you to see the status (ie: 404 or 500) which you can use to detect if the page was available. -- kainaw 15:40, 22 September 2010 (UTC)[reply]
Well I mentioned greasemonkey in the second reply to this thread in direct response to your suggestion of ajax, so I'm still not seeing why you thought I was phishing and continued to talk about ajax after that. Anyway never mind it's cleared up now. 82.44.55.25 (talk) 16:09, 22 September 2010 (UTC)[reply]
Let's cut short the debate by explaining this in clear-text: Kainaw is suggesting that the OP learns how to use XMLHttpRequest, which is part of JavaScript a very common API provided by most JavaScript environment implementations, and also represents the "X" part of AJAX - "Asynchronous JavaScript and XML." XMLHttpRequest will make a request to the server to deliver anything - an HTML web page, or a generic XML document, or anything else - and return it to the JavaScript context. This javascript function is usually used in AJAX programs, but it can be used to simply read a full HTML document. However, the OP will quickly learn that XMLHttpRequest is limited in most browsers, to prevent a security vulnerability called "Cross-site scripting." What this means in practice is that you can not use JavaScript to request a page from any arbitrary server - only from the one you loaded the current page from. You can learn more details at the same origin policy article, explaining that scripts can only perform transactions with the server they originate from. Strictly speaking, this is not a limitation of javascript the programming language: it is a security enhancement provided (and enforced) by the browser's javascript environment. If you run JavaScript in a hosted platform such as Mozilla Rhino (which is a lot less sandboxy than your browser's implementation), you can write JavaScript to interact with any server that you want. Nimur (talk) 12:27, 22 September 2010 (UTC)[reply]
Thanks for the informative answer. Would javascript be able to request a page from a subdomain of the server you're on, like http://123.example.com? 82.44.55.25 (talk) 16:09, 22 September 2010 (UTC)[reply]
Now that you've stated what you want to do, you can probably adapt this page to your needs. View the source code and you will see that it checks the ability to load an image from a remote site and reports if the site is up or down. -- kainaw 17:13, 22 September 2010 (UTC)[reply]
I just checked and iframe supports onerror, so you can use iframe to load URLs and get the same functionality as loading images. -- kainaw 17:15, 22 September 2010 (UTC)[reply]
That works, thanks! 82.44.55.25 (talk) 18:58, 22 September 2010 (UTC)[reply]

photo negative to positive

[edit]

I have coloured negatives of photoes and I have a scanner+printer (ink jet ) .I want to scanned these negatives and then want to get clear(positive) images on computer. I m searching for free software.can u help me.I have ttried invert command on paint but result was very poor. mks —Preceding unsigned comment added by 119.154.117.168 (talk) 20:29, 20 September 2010 (UTC)[reply]

While I can't recommend a particular piece of software to do this, maybe I can still help you a bit: Negatives aren't an exact "invert" of your regular picture, so you need a different setting to "flip" it into a regular picture. Sometimes, especially with more expensive scanners that come with additional hardware made for scanning negatives (usually a V-shaped mirror that will use the scanner's light source to act as a backlight), there's a setting directly in the scan software. Though I'd expect that there are photo-editing programs which provide such an option as well. -- 78.43.71.155 (talk) 20:42, 20 September 2010 (UTC)[reply]
Irfanview has a "Negative" menu item, under the "Image" menu, which may be what you want. Comet Tuttle (talk) 20:56, 20 September 2010 (UTC)[reply]
In ImageMagick, convert input.jpg -negate output.jpg
In GIMP, colours->invert
I tested both with image:Pozytyw i negatyw.jpg -- Finlay McWalterTalk 21:06, 20 September 2010 (UTC)[reply]
All of these will of course be mathematically identical to Paint's algorithm for RGB: x=255-x. Scanning a negative will in the best (that is, easiest to recover from) case involve measuring the square of its transmittance because the scanner's light has to be reflected by its (presumably white) backing pad back through the negative to be detected. (Any space between the negative and the pad will contribute blur to the image, too, so squash them together tightly.) So maybe the negative was and now you have ; you might be able to play with the Levels tool in GIMP (or other similar software) to apply the inverse function . Further manual tweaking (with the same tool) will probably be required. --Tardis (talk) 21:58, 20 September 2010 (UTC)[reply]
It's a lot more complicated than that. The absorption curves of the three dye layers overlap with each other and with the spectral sensitivity curves of the scanner's color sensors in all combinations, and the conversion from the scanner's raw output to sRGB is nontrivial and in this case will probably lose important information, since it's based on wrong assumptions about the intended use of the result. What you would need to do is try to recover the raw scanner outputs from the sRGB, figure out the dye levels in the negative from that, and then convert that to sRGB (correctly this time). Aside from the sRGB information loss problem this is probably possible in principle if you had technical specs of the film and the scanner, but each of the output channels will be a complicated nonlinear function of all three input channels. It would be better to work from the scanner-raw data instead of sRGB. Either way, you need special-purpose software, not MSPaint or the GIMP. Practically speaking, I think you need to scan negatives with a negative scanner. -- BenRG (talk) 22:34, 20 September 2010 (UTC)[reply]
In general, this process is called Color mapping and involves an arbitrary mapping of input color value(s) to output color value(s). That function can be as simple as the per-channel inversion, out = (255 - in), used by MS Paint and simple "invert" tools; or it can be an arbitrarily complex mathematical function based on empirically measured color targets. According to the official Gimp Mailing List, scanning and converting photo-negatives is "not implemented" in Gimp; (validated by similar requests on other forums). Several sources suggest switching to CMYK color format, "de-oranging," and then applying a simple inversion, followed by a manual color-tuning stage. I found some zero-cost software, "FilmEasyDevelop 2.0", but I've never used it, so I can't vouch for it. Xsane, a free scanning program, has documentation on scanning negatives - again, it is not as simple as "just inverting the pixel-value;" but they say you can use XSANE to rescale the individual color-channels. (I would be inclined to write my own tool in GNU Octave so I could tweak the color-mapping functions myself, but this may not be a suitable solution for general users). Nimur (talk) 12:59, 22 September 2010 (UTC)[reply]
Some scanners come with software with setting for scanning negatives but from the time I've used it the quality was horrible (although that WAS a few years ago). If you want prints you should give it to a professional and ask them to scan them for you. --antilivedT | C | G 07:44, 21 September 2010 (UTC)[reply]

what's faster on a modern computer: reading more bytes of raw text from ram, or fewer bytes (compressed) and uncompressing it in the CPU

[edit]

in this modern era of 3 GHz very able cores (which do a lot in a cycle, on average!) with 8 MB of extremely fast cache atached, I wonder: does memory keep up? Viz. what is faster, reading 1 KB of HTML from RAM (which is highly redundant, with all its <'s and >'s and matched closing tags, not to mention word repetition (names of tags) and the low-hanging fruit of Huffman coding the English in the document, to name just the fastest-compressing characteristics), or reading a smaller, lightly compressed version and then spending cycles and some trips back and forth to your megabytes of fast cache uncompressing it? If you just care about the uncompression speed, it would seem to me HTML compresses very well indeed - if we are talking about 1000 byte document, I think if you are willing to spend a few thousand clock cycles on it, you can get that document in a much smaller form. Now: is that few thousand clock cycles still faster than waiting for the raw document to come from RAM? Or, on the contrary, is having the uncompressed text in RAM, so all you need to do to get it is to dereference a pointer and start reading, the fastest way to go? Thank you for any information or thoughts you may have on this subject. 92.229.14.140 (talk) 21:55, 20 September 2010 (UTC)[reply]

I don't know how decompressing memory compares to uncompressed cache-heavy memory, but a browser is unlikely to actually use a text HTML representation of a document - it will Parse a document while reading it, removing a lot of the redundancy you mention. Also, a lot of actions (taking the length of a string, substring matching, random array access) would become a lot slower if the memory is compressed. However, a similar approach is being worked on linux - zcache tries to compress memory pages instead of having to write them to swap. Unilynx (talk) 22:29, 20 September 2010 (UTC)[reply]
Also think about how many additional cache misses you will incur. Seeking to a known (uncompressed) offset will require seeking to an unknown compressed offset - so you'll have to transfer and decompress lots of unnecessary data, and/or use a sub-optimal compression scheme with "tagged" offsets. In some special case applications, you are absolutely correct: transferring compressed data and decompressing in cache is possible, and probably saves nanoseconds on a modern CPU. However, for a general purpose process like text viewing, it will be hard to cover all possible scenarios such that your system beats the average execution time of a straightforward, uncompressed system. Furthermore, to work on more than one specific CPU/cache size, your transfer, decompression and seek programs must be cache-oblivious algorithms; that will be a challenging implementation "detail." The case of HTML is a bit of a straw-man scenario - CPU and memory-transfer of the source-text is almost never the bottleneck during the rendering of HTML. You might want to read about layout engines to see the kinds of data-structures that HTML source gets converted into - and think about whether those data structures are easily-compressible. (Remember, that when rendering text, you're converting a single character into a glyph with a font, color, an on-screen location, a set of rendering-hints, and so on...). It's not just 8-bit ASCII (or UTF-8) residing in the cache! How does your CPU actually represent every pixel in the rendered Document Object Model that eventually writes out to a graphics device? Is that internal structure a compressible data-format? Will you save time, on average? Nimur (talk) 13:17, 22 September 2010 (UTC)[reply]

Order of Files

[edit]

Why is that when I copy a list of files from my computer HD to mp3 player they are never in same order as they are shown on HD (Windows XP)  Jon Ascton  (talk) 22:17, 20 September 2010 (UTC)[reply]

It is impossible for us to know WHAT order they are shown on your computer or on your MP3 player. They could be in alphabetical order. They could be in ASCII order. They could be in date creation order. They could be in date updated order. They could be in inode order. There are so many possible ways to order files that it should be a surprise if they are in the same order on two different devices. -- kainaw 23:54, 20 September 2010 (UTC)[reply]
Oh yeah, they are in alphabetical order, or rather I should say they are shown to me in alphabetical order by Windows Explorer when I want to see them, I wonder are they in same order on HD ?  Jon Ascton  (talk) 14:20, 21 September 2010 (UTC)[reply]
I have the same problem that whatever ordering I use on my PC, when I copy to any MP3 player, the order seems to be reverse date order (newest first). I haven't found a way to change this. Has anyone else? Dbfirs 06:38, 21 September 2010 (UTC)[reply]
It depends on how you perform a copy, too. Windows Explorer uses a graphical interface; when you select multiple files with a "click-drag-highlight" mouse-stroke, Explorer creates a new ordered-list that is loosely based on the graphical layout you just highlighted (but there are corner-cases - the list is not necessarily in the particular order that it rendered on screen, nor in the order they are stored on-disk. Windows' shell API doesn't actually specify the order of a list of GUI objects that got selected by highlighting/click/dragging). When you proceed to "copy", this list of files is fed into a Windows copy program, which serially executes on the list of input. This is the order that files are copied to the other medium. (You can manually specify the order you want files to be copied by writing a script, instead of using a graphical program). Whether the MP3 player's internal file-system enforces in-order file placement depends on its file-system implementation details. Finally, when you "view" the files on the mp3 player (whether you use the device's file browser, play-order, or Windows Explorer), again there is no guarantee that the file-order will exactly match the internal file-system representation. Some file systems do not even have a fully-designed concept of file ordering. Your viewer may read the files in any particular order, and then sort them for graphical presentation. Nimur (talk) 13:25, 22 September 2010 (UTC)[reply]
I have found that you can control the order if you drag one file at a time. It makes a difference if you highlight a block of files and drag the top or the bottom file on the list to the player. Graeme Bartlett (talk) 21:51, 23 September 2010 (UTC)[reply]

Sony IC recorder ICD-B26. How to connect and transfer recordings

[edit]

Hi all. I have a "Sony IC recorder ICD-B26" and are wondering if I can transfer recordings to my PC or laptop. The next generation game with the option to buy a transfer devise but first,. I don't want or spend that money for my old recorder that still works fine as of now and secondly I'm wondering if there is a simple solution to it. Soldering the correct plugs to a self-made wire wouldn't be the problem (going from stereo to mono for example) if that would do part of the trick. But would it work w/o some software and special transfer devise/cable?

As I have some emergency in this matter quick replies would be much appreciated and I'll check back for answers as much as my time permits.

Thanks, TMCk (talk) 22:47, 20 September 2010 (UTC)[reply]

(e/c)Add on: I guess the simplest way would be to get a mono plug for the device, wire and connect it to to my (also old) home entertaining system's micro inlet and put it on old fashioned tape. That should work but then I still don't have it on my PC to transfer it to CD or send it by e-mail when necessary (besides that the quality would e bad and even suffer over time. To summarize it, it wouldn't be a longterm solution what I seem to be in need of.TMCk (talk) 23:15, 20 September 2010 (UTC)[reply]

What happened when you tried running a cable from the recorder's earphone jack into your PC's audio-in port, and captured the audio thusly? Comet Tuttle (talk) 23:11, 20 September 2010 (UTC)[reply]
Nothing as my tiny little recorder is mono and I don't have the right plug (I've tried the stereo plug that I have and wasn't much surprised not to get any result. Does this answer your question? Thanks for trying to help, BTW ;) TMCk (talk) 23:21, 20 September 2010 (UTC)[reply]
One question would be which program would work if any once I change the wiring by starting from a mono plug (attached to my little recorder) and solder a stereo plug going into my PC.TMCk (talk) 23:30, 20 September 2010 (UTC)[reply]
It shouldn't matter if it's mono as mono TRS connectors are compatible with stereo ones. You will get the mono signal in the left channel, that's it. You should make sure that your line in is configured properly by say connecting a (stereo) music player to your line in port and see if you get anything on your computer. If you don't know what program to use, Audacity is a good start. You probably shouldn't connect it to the microphone jack though, as it provides power to the microphone in addition to carrying the signal, so it might damage your recorder (although I haven't heard of anything like it happening). --antilivedT | C | G 07:37, 21 September 2010 (UTC)[reply]
Technical specifications of your device says no pc link capability, and only earphone and microphone connectors. That means the only way you can make digital copies of your recordings is to output using a cable via the earphone jack to your PC's microphone jack and record it with another program. The Masked Booby (talk) 01:53, 21 September 2010 (UTC)[reply]

My response was just eaten by some malfunction but fortunately I usually keep a backup when writing. So here it is:

 Done. I tried user:antilived's advise, downloaded the program s/he recommended and the only thing I really had to figure out by myself (by trying) was to keep the volume of my ICD-B26 at zero when recording to my laptop through the micro inlet Correction: I meant to full (silly me). You don't hear (as the software page told me) anything while recording but you can see the peaks which confirm something is working and after you're done and hit the play button (at the software panel) you know you did right. If you ever have the same problem I'd be happy to help. It should work with any kind of "sound source' if you believe Audacity. And yes, the stereo plug does work. You just have to adjust the software to mono (which was somehow the default at mine; Maybe it's adjusting by itself depending on the plugs it might find). Anyway, thanks a lot for solving my problem which is no problem anymore.TMCk (talk) 23:40, 21 September 2010 (UTC)[reply]