Wikipedia:Reference desk/Archives/Computing/2017 September 6
Computing desk | ||
---|---|---|
< September 5 | << Aug | September | Oct >> | September 7 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is a transcluded 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 6
editIs Moore's Law still alive for memories?
editIt seems that Moore's Law for microprocessors has been dead for years, although it might be resurrected by a new way forward like nanotubes, blahblah. But is it still true that memories are still getting bigger, cheaper, and faster?
- Yes, Moore's law is true for memory, no, it is absolutely not true that "Moore's Law for microprocessors has been dead for years". As our article on Moore's law says:
- "In April 2016, Intel CEO Brian Krzanich stated that 'In my 34 years in the semiconductor industry, I have witnessed the advertised death of Mooreâs Law no less than four times. As we progress from 14 nanometer technology to 10 nanometer and plan for 7 nanometer and 5 nanometer and even beyond, our plans are proof that Mooreâs Law is alive and well'. In January 2017, he declared that 'I've heard the death of Moore's law more times than anything else in my career ... And I'm here today to really show you and tell you that Moore's Law is alive and well and flourishing.' ".
- Read this: "Moore's prediction still has plenty of life in it. Here's why." --Guy Macon (talk) 05:31, 6 September 2017 (UTC)
- While I don't disagree with the general point, I'd note that Intel have strong COI reasons for wanting to claim Moore's Law isn't dead and the Cnet article is from 2012. The later point is significant since it still talks about Intel's tick-tock as if it's current, but even Intel has now admitted that it's dead Tick-tock model. Nil Einne (talk) 08:18, 11 September 2017 (UTC)
- You linked to Moore's law, I'd note that the article mentions how for a long time at least, flash memory was doubling at a rate faster than the 18 months normally quoted for CPUs and similar ICs. Also since you mentioned price, I'd note that flash memory pricing much more so than CPUs has seemed to recently at least follow a somewhat cyclic pricing system similar to volatile memory and for the same reasons. While generally over the long term prices have come down, over shorter terms like 12-24 months, it's prices have actually risen sometimes. What happens is manufacturers overpredict demand and produce too much memory (and other factors lead to an oversupply) which leads to a glut and very low spot prices. They respond by cutting production (and other factors like new tech production difficulties) and prices rise. Spot prices tend to effect things like direct to consumer SSD prices. Definitely when I was looking in November or so last year, IIRC SSD prices were actually barely better than about a year ago, and actually often worse than about 6 months ago and I'm referring to USD prices, not NZD ones. Nil Einne (talk) 08:28, 11 September 2017 (UTC)
github / latex question
editHello. I am learning to use github and want to use it to manage my Master's thesis, which is written in LaTeX. Right now I am working on the referees' comments and have two PDF documents, and in addition I also have two hardcopy versions of the thesis, which have handwritten annotations and corrections. What is best practice for this situation? I want to have some system for verifying to myself (and indeed my supervisor) that I have indeed accounted for any given comment, whether on the PDF or hardcopy. Can anyone advise? Robinh (talk) 05:01, 6 September 2017 (UTC)
- There's a track changes package [1] that you can use to flag places where you've corrected, then easily turn off those annotations for pretty printing. Really, you should ask them to comment in your source code, they may object, but any prof should be able handle opening a *(^#$(*#^ text file and editing it ;)
- I suppose if you make a github commit for every single correction you made, then you can show them that list of commits, each of which has a short summary of what you fixed. Then you or they can check the diffs and see exactly how each bit was handled. But that seems even more likely to meet with resistance. SemanticMantis (talk) 15:56, 6 September 2017 (UTC)
- (OP) Thanks for this, SM. The topic is on the extreme soft end of the hard-soft spectrum, so I can't assume that anyone will even know what a text file actually is, much less edit it. My main concern is somehow linking the hardcopy annotations to the github commits. My best idea so far is to tag each commit with a comment like "thesis 1, p23a" (in addition to the usual commit text), which will peg the commit to the hardcopy; and then to write on the hardcopy "sorted on 2017-09-07" so I can verify that the comment has been attended to. And I am unsure how to deal with the PDF files. But does anyone have any better ideas? Robinh (talk) 18:58, 6 September 2017 (UTC)
- A good way to annotate a LateX-created PDF is via the todonotes package. So you could transfer all annotations from all copies into todonotes in the same PDF, and remove them or mark them as resolved as you work through the list. It is a bit painful (since for each issue, you read it, you add it in the todonotes in a commit, you solve it, you remove the todonote), but that should make the reviewers happy.
- The usual way to deal with a cycle of multiple atomic (review - feedback - fix) groups in the tech industry is via some sort of bug tracking system. Github has such a system called issues, which allows to make issues close when you put some magic words in the commit comment. It would probably be easier to convince your reviewers to click on "new issue" and fill in a description in a relatively user-friendly way than either of SemanticMantis' options. Or you could fill in the issues yourself, naming them something like "draftN pageX paragraphY: reviewername:Â short description" (putting any details in the body) so that they can easily follow it. It has the advantage to keep track of closed issues after they are solved, but that works only if your reviewers are willing to use the github issue tracking, which may be a long shot. TigraanClick here to contact me 12:10, 7 September 2017 (UTC)
- Todonotes looks nice, but I fail to see how it's much different than the trackchanges package: they both use LaTeX markup to annotate the PDF, and both will require OP to manually transfer handwritten comments to the source code, both can flag issues and mark them as resolved. It's maybe a little more streamlined for solo usage, and less options for multi-author collaboration, so I think I'll try it out, thanks. I do agree that git "issues" are probably much better than my ignorant suggestion of using commits. SemanticMantis (talk) 15:41, 7 September 2017 (UTC)
- Huh, trackchanges does seem like a clone of todonotes (or the other way around). I failed to parse your first comment, or I would have acknowledged that, sorry.
- Also, using commits with well-formed commit messages comment might actually be better than a bug tracking system (just pick a template message that makes the commit log searchable). The latter would be the Correct Way To Do It⢠in an ideal world, because you can solve multiple issues in one commit, reopen issues etc. but in a world where the OP has to transfer all feedback to it because reviewers won't fill them directly in GitHub, I am not so sure. TigraanClick here to contact me 16:10, 7 September 2017 (UTC)
- Todonotes looks nice, but I fail to see how it's much different than the trackchanges package: they both use LaTeX markup to annotate the PDF, and both will require OP to manually transfer handwritten comments to the source code, both can flag issues and mark them as resolved. It's maybe a little more streamlined for solo usage, and less options for multi-author collaboration, so I think I'll try it out, thanks. I do agree that git "issues" are probably much better than my ignorant suggestion of using commits. SemanticMantis (talk) 15:41, 7 September 2017 (UTC)
- (OP) Thanks for this, SM. The topic is on the extreme soft end of the hard-soft spectrum, so I can't assume that anyone will even know what a text file actually is, much less edit it. My main concern is somehow linking the hardcopy annotations to the github commits. My best idea so far is to tag each commit with a comment like "thesis 1, p23a" (in addition to the usual commit text), which will peg the commit to the hardcopy; and then to write on the hardcopy "sorted on 2017-09-07" so I can verify that the comment has been attended to. And I am unsure how to deal with the PDF files. But does anyone have any better ideas? Robinh (talk) 18:58, 6 September 2017 (UTC)
(OP) Thanks guys, I appreciate your guidance here. I have just looked at github issues and this is pretty much perfect for me. I can go through the comments, create as many issues as appropriate, then pick them off one by one. One reason I'm doing the revisions this way is to learn github, so this ticks a lot of boxes for me. Best wishes, Robinh (talk) 20:13, 7 September 2017 (UTC)
Stopwatch and a Timer
editSeparate or both together pleaseâŚsomething with lots of intervals⌠103.67.158.224 (talk) 08:51, 6 September 2017 (UTC)
- Your question is not clear. (((The Quixotic Potato))) (talk) 13:46, 6 September 2017 (UTC)
- You haven't asked a question. If you are looking for a stopwatch with a countdown timer, most stopwatches have that function. Just Google "stopwatch with countdown" and you will find plenty. --Shantavira|feed me 16:23, 6 September 2017 (UTC)
- Are you looking for a program with these functions ? If so, on what device and operating system ? Android ? Windows ? Apple ? StuRat (talk) 22:04, 6 September 2017 (UTC)
- Windows and Android platform. Something good and reliable please. 103.67.158.154 (talk) 17:07, 7 September 2017 (UTC)
PHP/MYSQL Login code
editI wrote login script myself The login pages script is cas1.php as follows:
cas1.php
|
---|
<html><body><h2>Please login to make requisition for Printer Paper & Cartridge</h2> <h3>Your requisition will be attended ASAP</h3> <h3>In case there is delay beyond 3 days please make fresh requisition</h3> <b>Enter your UserName:<b> <input required type="username" name="username" minlength="5" maxlength="15"> <br><p> <b>Enter your password:</b><input required type="password" name="password" maxlength="15" minlength="5"> <br>` <input type="submit" value="Login"> </form></div><div><form method="POST" action="http://localhost/pwchanger.php"><b>Please click if you have forgotten password:</b><input type="submit" value="Reset"></form></div></html>` The formhandling page for logging in is takinguserinput.php as follows `<?php $dsn = "mysql:dbname=userdetails;host=localhost;port=3306"; $username2 = ""; $password2 = ""; $con5=new PDO($dsn, $username2, $password2); $con5->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $con5->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);$x13=$_POST['username'];$x12=$_POST['password'];$hashsalt=password_hash($x12,PASSWORD_DEFAULT); $con5->beginTransaction(); $stmt7=$con5->prepare("SELECT `password` FROM `user_data` WHERE `username`=:username"); $stmt7->bindValue(':username',$x13); $stmt7->execute();$x9=$stmt7->fetch(PDO::FETCH_ASSOC);echo $x9; if(password_verify($x9,$hashsalt)&& isset($_POST['Login'])){ session_start();echo "iamhereproperlyloggedin"; } else { $con5->rollBack(); $stmt7=NULL; $con5=NULL; die('You are not allowed'); } ?>` |
But instead of logging in and taking me to file "takinguserinput.php" i am always getting you are not allowed using the only user i have created username Admin and password welcome whether username password correct or not .Please help me to make the code workable103.24.109.98 (talk) 10:24, 6 September 2017 (UTC)
- I have edited your comment a little bit. (((The Quixotic Potato))) (talk) 13:48, 6 September 2017 (UTC)
- Your input fields are not INSIDE your form. The submission from the form should be one file. The handler for the submission should be another file. You can do it in one file, but it won't look anything at all like what you are trying to do. You apparently need to learn a lot more about HTML before getting into this or you wouldn't be placing your input fields outside your form. Then, when you understand HTML, you need to work on the difference between client code and server code. 209.149.113.5 (talk) 17:07, 6 September 2017 (UTC)
Using industrial plug in standard UK socket
editI recently bought a second-hand vacuum cleaner; when it arrived it turned out to have a plug that looked like this [2] and says on it: "110V 16A-4H Typ P 216-4 S"
I would like to use this in my home which has regular UK 3-pin plug sockets. Is there an adapter I can get that will do this? What should I look for? A lot of them seem to say 'PAT testing only' whatever that means? Thanks! Amisom (talk) 17:27, 6 September 2017 (UTC)
- Your buy may not have been such a bargain. The problem is not the plug, but the voltage. You have a 110V cleaner and your home (presumably UK) will be on regular UK 230V, with regular UK plugs and sockets.
- Converters are easily available and may be seen on any building site. However they're not just a plug adapter, they're an autotransformer to change the voltage (and also the earthing). [3] As a result, they're not cheap. Andy Dingley (talk) 17:54, 6 September 2017 (UTC)
- Advertise it on eBay. You may very well get back what you paid for it -if not more :-) P.S. State: Buyer Collects; as postmen find vacuum cleaners difficult to get through the average letterbox. Aspro (talk) 18:44, 6 September 2017 (UTC)
- If you're wondering why anyone in the UK is using 110v - it's a very common practice on building sites, as Andy says. [4][5]. -- Finlay McWalter¡¡â¡Talk 20:33, 6 September 2017 (UTC)
- <Joke that'd probably be very dangerous to take seriously> Buy another identical one and wire the two of them in series </joke> 92.40.248.207 (talk) 21:20, 6 September 2017 (UTC)
- Voltage mismatch isn't the only problem either, it's the frequency - UK systems use a lower one than the US, so there is also a chance that the motor doesn't spin-up properly. Your money might be better spent on a vacuum designed to operate off of local mains...73.232.241.1 (talk) 04:00, 7 September 2017 (UTC)
- Much smaller problem. Most appliances handle 50 Hz or 60 Hz just fine. It's the voltage that is the problem. --Guy Macon (talk) 05:50, 7 September 2017 (UTC)
- Hmm, I guess not. It looks like only a few types of devices are really affected by it (such as induction motors, although these aren't typically used for things like vacuum cleaners apparently) so it likely wouldn't be an issue for the OP in this case. 73.232.241.1 (talk) 07:26, 7 September 2017 (UTC)
- For the last part of your question, see PAT Test.--Shantavira|feed me 08:47, 7 September 2017 (UTC)
A domestic step-down transformer is available on e-bay. This is different from the building-site version.Your PAT test converter would be extremely dangerous to use because it doesn't change the voltage. Expect an explosion if you try it! Dbfirs 11:14, 7 September 2017 (UTC)- Note that a US spec step-down transformer is not generally usable here. It's OK for working US equipment (although the build quality of many is borderline lethal) and also that the use of US plugs and sockets in the UK isn't legally permissible outside "testing" in an electrical workshop (UK rules don't consider US plugs to be safe for voltages over 50V). However this device here is presumably UK market construction site equipment, and expects the UK centre-earthed 110V supply. There may be an issue with whether this cleaner would be adequately earthed if used on a US-style conversion transformer and sockets. You would certainly need to PAT test it before use. You might also find house insurance etc. being an issue - there are plenty of cases where UK house insurance failed to pay out after a fire caused by poor quality US-spec electrical equipment, or badly made Chinese equipment, and the insurers are getting very tight on this issue at present, as the number of fires is increasing. Andy Dingley (talk) 11:29, 7 September 2017 (UTC)
- Yes, Andy makes a good point. I think your vacuum cleaner is designed for a building site or industrial application with 55v each side of earth (110v split phase), not the American market. I withdraw my above suggestion. Dbfirs 11:43, 7 September 2017 (UTC)
- Note that a US spec step-down transformer is not generally usable here. It's OK for working US equipment (although the build quality of many is borderline lethal) and also that the use of US plugs and sockets in the UK isn't legally permissible outside "testing" in an electrical workshop (UK rules don't consider US plugs to be safe for voltages over 50V). However this device here is presumably UK market construction site equipment, and expects the UK centre-earthed 110V supply. There may be an issue with whether this cleaner would be adequately earthed if used on a US-style conversion transformer and sockets. You would certainly need to PAT test it before use. You might also find house insurance etc. being an issue - there are plenty of cases where UK house insurance failed to pay out after a fire caused by poor quality US-spec electrical equipment, or badly made Chinese equipment, and the insurers are getting very tight on this issue at present, as the number of fires is increasing. Andy Dingley (talk) 11:29, 7 September 2017 (UTC)
- I don't withdraw my suggestion though. Sell it on eBay. The OP may have been in the right place at the right time to purchase an industrial vacuum cleaner that someone else might want and will be wiling to pay the current value for it â which may be more than the OP paid. If he gets offered a bit less, then he has cut his loss a little bit but not suffer a big total loss on the whole transaction. Aspro (talk) 20:17, 7 September 2017 (UTC)