Wikipedia:Reference desk/Archives/Computing/2015 September 17

From Wikipedia, the free encyclopedia
Computing desk
< September 16 << Aug | September | Oct >> September 18 >
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 17[edit]

Shanks' square forms factorization[edit]

In Shanks' square forms factorization, in the middle of the algorithm is

until is a perfect square at some even .

Initialize

In the calculation of and it refers to . The actually refers to the last value of P calculated in the previous section. Can someone fix this? Bubba73 You talkin' to me? 01:49, 17 September 2015 (UTC)[reply]

Looking for an Ethernet Splitter that lets both cables deliver at the same time?[edit]

So I've got an ethernet cable sticking out of my wall and I want to jam something in it so that I can connect two ethernet cables to it, and then me and my roommate can both have wired internet at the same time. I bought a splitter off of Amazon but it turns out it was toggle only; couldn't have both connections running at once. So I returned it and bought another; well if that one didn't have the same problem! Now I'm paranoid; can anyone recommend one that actually lets 'em both work at the same time? 2605:6000:EA01:7E00:BDDD:DDAA:F59F:6C9E (talk) 06:26, 17 September 2015 (UTC)[reply]

You want a switch or hub. As the articles say, hubs used to be preferred for that kind of application because of price, but switches are now about the same price, and generally preferred. A quick search for "4 port switch" gives a number of options in the £5-£20 range, depending on whether you want gigabit. Why not a 3 port switch? Well, because the only result that came up from a quick google was about ten times the price of a 4 or 5 port.MChesterMC (talk) 08:28, 17 September 2015 (UTC)[reply]
You need a four-port switch/router. Netgear make some simple ones that will work. — Preceding unsigned comment added by 217.158.236.14 (talk) 08:23, 17 September 2015 (UTC)[reply]

Thanks you two! I'll buy one of those! 2605:6000:EA01:7E00:BDDD:DDAA:F59F:6C9E (talk) 10:44, 17 September 2015 (UTC)[reply]

Which Javascript library is 'tkjs-ni/sources/NI-core'?[edit]

I have some Javascript code that calls the following libarary:

    var NI = require('tkjs-ni/sources/NI-core');

What is it? Googling "tkjs-ni" or "NI-core" got me nothing useful. My other car is a cadr (talk) 08:01, 17 September 2015 (UTC)[reply]

That is a relative URL. Without the domain name, it is useless. Nobody is going to go to every website in the world to see if http://every.website.possible.placed.here/tkjs-ni/sources/NI-core exists. 209.149.113.66 (talk) 13:40, 17 September 2015 (UTC)[reply]
It's not a URL. I explicitly asked about Javascript libraries, and require(...) is how modules are loaded in nodejs, so obviously 'tkjs-ni/sources/NI-core' would be the name of package. If you don't know the answer then please don't waste Wikimedia Foundation's bandwidth with your ignorance.My other car is a cadr (talk) 07:13, 19 September 2015 (UTC)[reply]
Just as a wild guess, I checked to see if National Instruments has a Tcl/Tk javascript package. They do. It is possible that they distribute it as tkjs-ni (Tk javascript from National Instruments) / source (the source code) / NI-core (National Instruments core module). However, that is just a possibility. The code from your website could be something completely different. Without the website that it came from, it is impossible to know. 209.149.113.66 (talk) 14:25, 17 September 2015 (UTC)[reply]

The recursive algorithm is referred to as "straightforward", yet I don't understand it (and the recursive definition of Levenshtein distance that it is based upon) ):. Can someone please elaborate on the relation between the definition "Levenshtein distance between two words is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other" and the recursive definition & pseudocode? thanks! — Preceding unsigned comment added by 212.179.21.194 (talk) 10:31, 17 September 2015 (UTC)[reply]

The recursive solution begins with a stop case. If either string is empty, it returns the length of the other string. That is Levenshtein distance. The distance between "" (empty string) and "ABCDE" is 5 - the length of "ABCDE". Now, if we didn't hit the stop case, we look at the last character to see if the same. NOTE: We could go from the first character to the last character or the last character to the first character. It doesn't matter. The distance between "STAIR" and "HAIR" is the same as the distance between "RAITS" and "RIAH". So, if the last characters of the strings are the same, the distance is not increased. If they are different, there had to be at least one change, so 1 is the cost for this character position. Next, three recursive calculations are made. One is for inserting a character. One is for deleting a character. One is for substituting a character. All of these take place before the last character. First, what if we deleted a character from the first string? If the strings were "STAIR" and "HAIR", it gets the cost of "STAI" and "HAIR" and adds 1 (for the delete operation). Then, it checks delete from the other string: "STAIR" to "HAI" plus 1 (for that delete). Then, it checks the rest of the strings, using the cost calculated earlier by comparing the last character. Whichever one of those calculations is the least (more than 1 can be least) is returned. 209.149.113.66 (talk) 13:38, 17 September 2015 (UTC)[reply]
Thanks you very much for the answer! there is one thing I still don't get: initally you say that "three recursive calculations are made. One is for inserting a character. One is for deleting a character. One is for substituting a character." but after that you mention two deletions and no insertion: " First, what if we deleted a character from the first string...Then, it checks delete from the other string.... Then, it checks the rest of the strings, using the cost calculated earlier by comparing the last character". 109.160.236.195 (talk) 16:57, 17 September 2015 (UTC)[reply]
The issue here is that insertion and deletion are the same operation. It is just a point of view. If I convert "EAT" to "BEAT", I inserted a B. I could also say that I deleted a B if I go from "BEAT" to "EAT". Since Levenshtein distance gives the same result both ways, we can say "insert" and "delete" are the same thing. That is why the first two recursive calls are for "insert/delete", but I just said "delete" when I got to the bottom of the description. The only tricky one is substitute. That is technically a delete/insert combination, but we count it as one. 209.149.113.66 (talk) 17:04, 17 September 2015 (UTC)[reply]
Thanks again, this explanation may be worth adding to the article. 109.160.236.195 (talk) 19:05, 17 September 2015 (UTC)[reply]

Open source software about Environmental management system[edit]

Hi, I'm looking for an open source software for Environmental management systems to manage for example the ISO 14001 standard. All I found online are expensive softwares without even a shareware version. --Helmoony (talk) 14:34, 17 September 2015 (UTC)[reply]

What charger should I buy for this?[edit]

I just asked a question about ethernet splitters, and I found what they told me to buy in my attic. However, it's missing its power cable. the little words under the power port says "7.5VDC. 0.8A". Is that a 7.5 Volt, .8 Amp cable? Are those common? Online I can only find 7.5Volt, 2-3Amp chargers closest.2605:6000:EA01:7E00:E921:DEE2:3B6:72AD (talk) 19:18, 17 September 2015 (UTC)[reply]

That is the V and A for the power adapter. It is likely a circular plug also. You need to know the polarity. There should be a circle with a dot in the middle. Is the dot in the middle - or +? With that, you can get a universal power adapter (relatively cheap). Find a plug that fits in the hole (it will come with 5 to 15 plugs for various sizes), set the polarity, set the voltage. The universal ones tend to provide more than enough amps for most devices, so I wouldn't worry about that. 209.149.113.66 (talk) 19:39, 17 September 2015 (UTC)[reply]
There should be a polarity symbol sign beside the voltage/ampage, or on the base of the unit. Failing that, if you do a websearch for the model number, you might find it. Centre-positive is now ubiqutious, but centre-negative was in a sizeable minority 10 years ago. You should also check the maximum speed of the hub/switch; MS-Windows should tell you in the Network icon on the systray. If the hub is old enough it might be 10Mbit/sec only, in which case it will slow down your connection, and should be replaced. LongHairedFop (talk) 20:05, 17 September 2015 (UTC)[reply]
The core of your question seems to be asking if the 7.5VDC 2 or 3 amp will suit a device that says 0.8A. The answer is YES, the value on the device is just the 'minimum value that you should use. In most cases you would just want to use the "matched" transformer because using a larger one will cost more, sometimes be less efficient, weigh more, etc... but if you have no other choice, or if 0.8 is unusual and expensive but 2 amp one is cheap and easy to get, just get the cheap one. The thing you should NEVER do, is use a 0.8Amp charger for something that says it require 2Amps. Vespine (talk) 23:07, 17 September 2015 (UTC)[reply]