Simple constant current regulator for a 1.6A laser LED

Question: My intent is to build a simple driver for a laser LED with an operating voltage of 4.6 volts and forward current 1.6 amps. I have some spare LM317s that I would like to use, however they can supply 1.5 amps at most with proper heatsinking. Can I use multiple of them in parallel like this, or should I completely scrap this schematic? I suppose each of those should deliver 500 mA making it 1.5 A total.

Also, if this circuit actually works, how can I calculate the power loss on the LM317 regulators?
Comment: I think you need to look into a safer laser driver.  That's some serious power going into an expensive laser module.  4.6V is probably the maximum forward voltage rather than the operating voltage - if you exceed it, you no longer have a laser.  At that kind of power level, you also don't want to depend on current alone - you should be monitoring the output (optical) power and regulating it to a safe level.
Answer: The circuit you designed is fine.
Connecting multiple current generators in parallel can be done and is done in many applications. You need to be sure that the output voltage is within the range each of them can support.
To calculate the power loss on each regulator, you can treat them separately.
Your LED needs 4.6 V, starting from 12 V the drop is 7.4 V. Since the current is half an amp per regulator, each of them will dissipate 3.7 W. This power is dissipated on the regulator, the sense resistor and the diode. Since the resistor is 2.5 Ohm, the drop on it will be 1.25 V, while the diode will drop approximately 0.7 V. The LM317 will see only ~5.45 V of the total 7.4 V drop. Again, multiplying for the current you finally get 2.7 W on each LM317, 0.625 W on the resistors and 0.35 W on the diodes.
The total dissipated power will be 11.1 W. You will need 1W resistors, and heatsinks for the 317s.
Comment: And there is no probably in "probably a small heatsink on the 317s is a good idea too" about it. Heatsink.
Comment: Thanks @Trevor, I completely forgot the diodes. Corrected.
Comment: or start with 9v instead of 12v :)
Comment: Your power math is off a tad. Vreg = 12 - 4.6 - 0.7 - 1.25 ~ 5.45V => 2.725W per regulator.
Comment: Also. be aware when the MOSFET turns off you will have the full 12V sitting at the top.  and when turning on it briefly will start up there.
Comment: @WhatRoughBeast I had a look at the datasheet, depending on the package he can almost get away without an heatsink, at aroun 25degC/W, but it certainly is a desirable option in all cases. Fixed.
Comment: Not sure those diodes are actually necessary but they reduce the regulator dissipation so maybe use more of them in series. ;-)
Comment: You don't need the diodes though ;)
Answer: I'm not so sure about the wisdom of this circuit.
It may work ok, but I am concerned about the response of the regulators when you switch the MOSFET. That large 100uF capacitor will pull down the right side of the sense resistors to close to zero. If the regulators can respond that fast you will initially have close to 10V across each regulator at a whopping 5W each.
Further, the circuit is terribly inefficient consuming 6W to drive a 2.3W LED.
You would be far better to drive the LED from a 5V switching supply and use a low drop current limiting circuit. Perhaps something like this.

simulate this circuit – Schematic created using CircuitLab
Though this is a better enable method.

simulate this circuit
Comment: You might have to be careful with this circuit to be sure it can exit the DISABLE state without momentarily applying the whole V3 voltage across the laser.
Comment: In the end we built the latter circuit with 5 volts supplied by a LM2576-5 switching regulator and it is more effective so we don't need to cool it. Thanks!
I didn't understand shunt resistors much back then.
Comment: @ThePhoton yup,


Does Lyapunov exponent equate to exponential inflation?

Question: Physics can be modeled by dynamical systems $f^t(x)$ as well as by PDEs. The most common dynamical system has hyperbolic fixed point and can be an attractor or a repellor. The dynamics at repellors and attractors are simple exponential expansion or contraction and are represented by a Lyapunov exponent. My question is how could one prove or disprove that exponential inflation is just an example of a repellor with a Lyapunov exponent?
Comment: I can't say I fully understand this question, but there are several papers which use a Lyapunov exponent to describe inflation: http://ms.mcmaster.ca/craig/BrandenbergerCraig08c.pdf and http://www.sbfisica.org.br/bjp/files/v31_131.pdf
Comment: you might want to change your title, as 'equating' is not the same as 'is just an example of'.
Comment: Do you have something particular in mind for *exponential inflation?*
Comment: @DavePhD your reply qualifies as an answer as the citations are a useful starting place for me.
Comment: @DavePhD it is worth noting that neither of the papers you cited describe inflation with a Lyapunov exponent. They use the exponent to describe the exponential growth in the equations of motion of low-density matter  and they both explicitly state that this description is done in a non-expanding universe
Comment: have you tried to model your system of equations as an autonomous sustem and see the critical points?this should be a good approach, since the lyapunov approach could do some errors in choosing the lyapunov function
Answer: I suspect that you cannot prove it purely from experimentally/observational, and I think that approach is useless.
If you think that the whole universe as a single state in state space, then there is no way you can compare with any other state. You may think that there might be a phase space with (macroscopic) parameters $(V,\{\alpha_i\})$, so we can have a maximum Lyapunov exponents $\xi$ and a vector $\delta Z$ deviated from a state $Z_0$. The resulting state might be described by $Z_0+e^{\xi t}\delta Z$.
However, why do you need a phase space description? The other phase space states do not matter to us at all since we can't observe their dynamic. An exponential inflating universe can be simply described by $\dot{V}=kV$. In comparison, most dynamic system can actually be reproduced by repeating the experiments and this will give us the dynamic of the whole phase space.
Answer:
Cosmological inflation would be something that happens to a single dynamical system (the universe).
The exponential divergence of phase-space trajectories (as described with the Lyapunov exponent) is something seen in the comparison of two (nearby) trajectories in a dynamical system. Translated to the universe example, we would look at two almost identical universes and see whether their states diverge from each other.

The two have roughly as much in common as the phenomenon of a single balloon exploding and two balloons drifting away from each other in the wind¹. Equating the two without describing how does not make any sense whatsoever and there isn't an obvious how. It feels a bit like equating exponential population growth and cosmic inflation, just because they are both exponential (and those have at least in common that they both phenomena of a single trajectory of a system).
Also note that:

A temporarily expanding system can still have no positive Lyapunov exponent. And temporarily can mean time scales of the total age of the universe. If our universe is destined to have a big crunch, it would still only be temporarily expanding.
A temporarily shrinking system can still have a positive Lyapunov exponent.
At most, some mechanism for exponential inflation could induce a big time-localised Lyapunov exponent in a system, but for purposes of determining the time-averaged Lyapunov exponent (which one usually does for the questions that are usually addressed with Lyapunov exponents), this would just be an annoying artefact.

¹ Mind that this is not a perfect analogy, but should suffice to illustrate the absurdity of equating the two.


Why is my lavender dying?

Question: I bought a lavender from home depot, and it was growing good, but after an animal dug really big holes around it (I put some compost in it), it started dying. It is now dead, and I would like to find the cause of death. It also has mulch, Kellog potting soil, Scotts premium topsoil, and expandable coconut seed starter.
Comment: "An animal dug around it"? What does that mean? Ants? A dog? What animal? Might that be the cause?
Comment: maybe a bunny, it might be attracted to the compost
Comment: Robins can displace a surprising amount of mulch/compost while "digging", looking for worms.
Comment: If the lavender was planted in the garden, why did you add Kellog potting soil, scotts premium topsoil, and expandable coconut seed starter?
Comment: I did not plant it in my garden. You can see in the picture, I planted it next to my patio, so It wouldn't work well in clay soil. So I added Kellog potting soil, scotts premium topsoil, and expandable coconut seed starter.
Answer: I think you have answered your own question already, it started dying after an animal dug holes around it. So I think the rabbit might have damaged some of the roots. Why that rabbit was digging there is another interesting question. You seem to have put your plant in a very interesting substrate (from 4 different sources, if I count well). It might be that that attracted the rabbit. I don't completely understand why you mixed all these substrates together, to be honest. I have lavender growing here in clay soil (Netherlands is clay, clay and more clay), it grows fine. If you really don't trust your clay soil for it, I think just filling a hole with potting soil would be enough.
If you want to replace this dead plant, you might want to consider taking cuttings somewhere. Lavender can easily be propagated via cuttings. It's fun and for free!

Why is my lavender dying?


Carastan substitute?

Question: I recently brewed a recipe that called for Carastan malt. My LHBS didn't carry it, so I just used 40 L Crystal. In the finished beer, I'm missing the toffee and toastiness found in the original. Does anyone know of a better substitute? If there aren't really any good substitutes, where is a good place that I can find it online?
Comment: Out of curiosity what beer are you brewing, because I rarely see anyone talking about carastan malt.
Comment: Dead Guy Ale clone (extract + specialty grain) from BYO. It turned out OK, but definitely not exact. For only being my 2nd batch, I'm happy. I'm also currently force-carbing a Two-Hearted Ale clone and have a Newcastle clone in primary. My next batch will be my first AG, so hopefully it goes well!
Answer: Crystal 15L would have been a closer sub I think, even though the carastan is around 30-35L. I don't think there is a real good substitute for it.  There aren't a lot of malts like it, and I don't see too many people use it.  I put it in an Ordinary Bitter last year and it does have a nice toffee aroma to it.
A combo of C15 and some special roast might get you in the ball park.
C40L is more caramel than toffee to me.
Answer: In the UK you can buy Carastan in homebrew shops. The main supplier seems to be Baird's malt :
http://www.bairds-malt.co.uk/Roasted.html
I haven't seen it for sale online though (I will keep looking since I am also after some).

Carastan substitute?


the deployment of react app based on webpack

Question: I wanna deploy my react app with webpack, and i have got the pack file, which is bundle.js, and set up nodejs and npm on the server. But I dont know what position I can put bundle.js on the remote server. anyone?
thanks in advance
Answer: I assume that by position you mean location on the server. It really depends on your configuration - you should somehow be able to achieve that the whole build folder is served by a webserver on your server. Check https://medium.freecodecamp.org/how-to-make-create-react-app-work-with-a-node-backend-api-7c5c48acb1b0 (section "Production deployment to heroku") for a sample configuration using the expressJS framework on nodeJS.
Or, since you only want to serve static files, you could also do npm -g install serve and serve -s path/to/your/build/dir
Comment: Thx man. But I cannot achieve the build file after running npm run build since I'm pretty much confused about rewrite the configuration file. That's a big problem I think. :( more idea?


Activation lock MacBook to Apple ID?

Question: Is it possible to lock my MacBook to my Apple ID so that if it gets stolen (macOS) is useless when someone tries to reinstall it?
Answer: New Mac hardware supports activation lock:

https://support.apple.com/en-us/HT208987

To use it, you need:

macOS Catalina
a mac with a T2 chip
activate two-factor authentication for your Apple ID
Make sure Secure Boot is enabled for your mac (it is enabled by default)

How to Activate it:
- turn on Find My Mac
How to check that Activation Lock is on:
- Choose Apple menu  > About this Mac.
- Click System Report.
- Click Activation Lock Status under Hardware.
Turn off Activation Lock:
Before you send your Mac in for service, sell it, or give it away, you should turn off Activation Lock.
If you have access to the device, turn off Find My Mac to disable Activation Lock, and then sign out of iCloud:
- Choose Apple menu  > System Preferences.
- Click Apple ID, then click iCloud.
- Turn off Find My Mac.
- Click the Sign Out button.
If you can't access your Mac and you need to turn off Activation Lock, follow these steps:
- Go to iCloud.com and sign in with your Apple ID.
- Click Find iPhone.
- Select All Devices, then click your Mac.
- Click Erase Mac. Select Next until the device is erased.
- Click the X next to your Mac.
Comment: I changed my accepted answer to this one because it reflects the current state
Comment: Thanks @Hedge this is something I love about our community. Things change, we can edit and update things. I've posted tons of answer that are wrong first and right later and vice versa. Marking the check is super important when we can keep that current.
Answer: There's no activation lock on macOS, however you can enable Lost Mode using Find My Mac. This will lock the Mac with a PIN, which will be required to use the Mac again, and cannot be bypassed by reinstalling macOS.

Lock your Mac
  You can use Find My Mac to remotely lock your Mac with a passcode. You can also display a custom message on its screen.

If your Mac is lost or stolen
Comment: Might need a clarification which T2 chips allow limited lock and/or discuss firmware passwords.
Answer: On computers without the T2 (or even with it), you can enable a Firmware password.

For even more protection, you can set a firmware password. A firmware password prevents users who don't have the password from starting up from any disk other than the designated startup disk.

Technically this can be bypassed. As apple states on that page

If you can't remember your firmware password or passcode, schedule an in-person service appointment with an Apple Store or Apple Authorized Service Provider. Bring your Mac to the appointment, and bring your original receipt or invoice as proof of purchase.

This indicates that it is likely possible to bypass it (as opposed to encryption). My guess is that the firmware needs to be replaced which is not a particularly easy process and likely requires mangling with hardware which is why Apple must do it.
It's not perfect but its the next best thing if you don't have a T2 Chip.

Activation lock MacBook to Apple ID?


What trademark "goods/services" category is a medical device design and manufacturing company?

Question: If my company offers an array of medical devices (and related software), do I trademark it as an 010 (based on it's flagship product) or do I trademark as an 044 (a medical service -- producing and designing devices)?
Comment: Ask the office: https://www.uspto.gov/trademark/contact-trademarks
Answer: You can apply for trademarks in multiple categories, usually for an additional fee. If your business has goods or services sold in more than one category using the same mark, you can protect it in every category that applies.
With respect to each category, if a good or service in a category sold with a mark just like yours would harm your sales of goods and services that you currently provide, then it makes sense to seek a mark in that category. If your product line expands, you can also add categories later if someone else using the same mark or a confusingly similar one hasn't moved into that market in the meantime.
In the case of a medical manufacturing company, the cost of obtaining a trademark in an additional category after the first category (several thousand dollars or less), relative to the economic importance of the company's trademarks and the economic scale of your operations (which should be in the multiple millions of dollars), is so small that cost should be a non-issue. So, you should apply for a trademark in every category that you could plausibly and truthfully be said to do business in.
If you can't afford a few thousand dollars to perfect a trademark in a few additional categories, you should think twice about whether investing in trademark registration at all makes any sense, because enforcing a trademark in the face of potential infringement is far more expensive (tens of thousands of dollars to hundreds of thousands of dollars for each infringer who doesn't go away with a mere cease and desist letter and thousands of dollars a year monitoring the market for infringement) and if you fail to enforce your trademark in the face of clear evidence of infringement, you risk your trademark losing its validity entirely.


Any tips on how to describe fighter jet designs?

Question: I want to write a fighter jet story, kind of like Ace Combat, but because I don't have any money to borrow names from certain aircraft in real life, I thought it would be better to just make up my own designs until I found out that I'm bad with it. Do you guys have any tips on how to describe aerial vehicles?
Comment: I'm fairly sure you don't need to pay anyone to use names of existing aircraft. But that doesn't solve the problem of how to describe them.
Comment: Not familiar with Ace Combat other than as a video game. So what sort of story are we talking? What is the audience, and what is the genre? What are you wanting to say about them? Do you need technical information like what weapons they might carry, or do you want to describe them flying and fighting?
Answer: This depends a lot on the level of technical sophistication, and the interest in technical details, of your audience.
If you're writing a book for ordinary 10 year olds, you probably don't want to say much more than "the plane went really fast".
If you're writing for people with a keen interest in military affairs and aviation technology, you might want to discuss some feature of this particular plane that makes it exceptional and how it works.
But most readers would probably be bored by a long technical discussion of the details of turbofan design and exactly how the ECMs work. I suspect most readers would just want to be told that this plane travels at such-and-such a speed and carries so many air-to-air missiles and that sort of thing. If you don't already know a fair amount about jet fighter design, you probably should read up a little so you don't make a glaring error. But you don't need to know enough to actually design a jet fighter. Most readers aren't going to be interested in that kind of detail. You want to give enough detail to make the reader feel immersed in the world of fighter aircraft. But not so much that this starts to be more of a textbook on aeronautical engineering than an exciting novel.
Comment: One thing I'd add would be to try to not repeat the same description of some part of the fighter jet or how it works every single time that part is mentioned or that action is performed. (I read a series of novels in a historical setting some years ago and everytime the main character had to use their crossbow each little step was given on how to load, aim, fire, and reload the crossbow. By the end of the series I started skipping those paragraphs when by halfway through the first sentence it became apparent that this was another crossbow user manual paragraph).
Answer: Generally speaking, you should always describe things in their context. Start by answering questions such as:

Who is looking at the airplane (the POV)?
Who are you describing the airplane for (your readers)?
What role does the airplane play in your story?

For instance, if an airplane technician is looking at the aircraft, they will notice other things than, for instance, someone who was bombed by airplanes in their home country and had to flee.
What emotion does the POV have towards the airplane? Positive, negative, pragmatical, etc?
A layperson might not notice more than what you notice when you look at a picture of an aircraft... though, of course, if they are near an aircraft things like sounds, smells, relative size also comes into play much more than you'd get from a picture, so somehow looking at a real size actual airplane in person is a great benefit if you can find a way.
Who you're writing for also determines what you want to include or not. Not to mention your purpose of writing for that audience. If it's an "airplanes are bad" agenda you'd describe them in one way. If it's a "how do airplanes work?" type of text you'd need a completely different level of description.
Finally, if the airplane just passes by in a scene or two, you'd spend less research and time on describing them, if at all. While if they are the center of the story, you'd need more knowhledge and more research.
However, look at a movie like Top Gun. Are airplanes central there? Not really, right? The characters are central and while you need lots of research to make it look right in a movie, that wasn't strictly needed for writing the manuscript. For that, you needed more info on pilots, and people in general, than airplanes specifically.
Answer: Do your research. Visit a military museum. Look up user manuals, training guides, or technical specs available either on line or via a legal deposit library, or contact the manufacturers or users.
A useful resource for correct nomenclature is a pictorial dictionary. I recommend the Oxford-Duden Pictorial English Dictionary, but there are others.
Shonaleigh Cumbers, a great oral storyteller I work with, has a pithy saying that helps when choosing what to include and what to leave out: 'You need to know everything you tell; you don't need to tell everything you know.'


Lots of pick movement

Question: I have always had trouble controlling pick movement while strumming. Gripping tighter on a pick causes tension in my playing and I am wondering if anyone has some tips for me? Picks have always felt slippery to me even the ones that have rubber tops.
Comment: The only problem with fingernails is that if you're just an amateur player and you do other things with your hands, like DIY or gardening, you'll frequently break your good nails and then be annoyed that your guitar doesn't sound as good :) I've just started trying Alaska Piks which take some getting used to but are fun
Comment: I've seen some guitarists deliberately grow out a fingernail or two on their strumming hand to use as a natural pick - that you won't have any trouble slipping because it's attached to your finger.  Different technique though.
Comment: I see people attack the strings when strumming and it seems like they are using a fingernail, doesn't that hurt?
Comment: @DarrelHoffman I have too, and it's fairly survivable on electric with thin strings. Try it on an acoustic with 12s or 13s, and you'll wear out that fingernail in one evening jamming.
Comment: @Tom Classical strumming technique puts less wear and tear on your fingers. It doesn't hurt. If you get your technique wrong and pull sideways on the nail, or contact with the side instead of the tip, *that* can hurt.
Comment: @Whelkaholism That's what work gloves are for I guess?  I'd recommend a good pair of those for DIY and gardening even if you *aren't* playing guitar on the side, but especially if you are.
Comment: What is the control trouble? Dropping the pick, uneven picking, missing strings?
Comment: Is this electric or acoustic? String tension and thickness differ, and I find I have different pick requirements
Answer: This is a common issue with lots of solutions available, not limited to:
-Picks with holes through them (These are very easy to make yourself, try a leather hole punch for thicker picks).  Your fingers can touch each other through the hole, keeping the pick in place better.  The star pattern here probably helps with pick rotation; perhaps you could achieve something similar with two holes instead of one.

-Picks with textured grip surfaces.  You could also make this yourself with a bit of "grip tape" or just by scratching it up with coarse sandpaper.  There are plenty of products in this category too.
-"Gorilla snot", rosin, or other tacky substances.
-Personally, dry hands make me lose grip, so any solution for dry skin may help.
-Thinner picks will flex to absorb some of the impact from the guitar string, keeping it from being knocked out your hand so easily.
Comment: This is not an issue for me but I like the idea of a pick with a hole so you have contact between the thumb and index finger. Gonna make a few and try them. Here's a slogan: "Holy picks, they're not just for church gigs." This is a good answer with several useful solutions, +1.
Answer: @Edward provided an excellent answer based on things you can do to get a better grip. Without knowing how you play I would like to add that the issue may also be remedied with some adjustments to technique. Reducing the length of your strumming stroke by using less arm and more of a relaxed forearm and wrist rotation will help you maintain better control over the pick. Another thing to be mindful of is to make sure the pick starts out angled slightly upwards for down strums and vice versa. This will reduce the resistance of the strings against the pick which also helps in preventing the pick from shifting in your hand.
Comment: @oregonduckman Try what I suggested and let me know how it works. A relaxed back and forth twisting of the forearm and wrist gives you all the range of motion you need for strumming. Don't play hard or loud. That causes muscles to tense. Tense muscles are the enemy of anything physical we want to do with finesse such as music, sports, etc. You already know squeezing is not the answer, The way I hold my pick a 6 year old can easily pull it out of my hand. There are also several good equipment related suggestions that you can try combined with my suggestions.
Comment: My first instinct was absolutely "consider aspects of technique" rather than going straight for sellotaping the pick to your hand etc.
Comment: I have tried many picks only to conclude that it's my poor technique. I guess I am looking for tips on how to practice and find a relaxed strumming groove...
Answer: Two great answers already. Mine is to hold the pick over a heat source until it gets soft. Then hold it like you would when strumming. That puts a slight dish into it. Which also helps when trying to find the pick amongst a pocket full of coins!
Comment: I guess I'll be partially melting some picks later to try it out!
Answer: Wider picks
Grip (friction) depends on three things: how hard you press on the surface; the texture of the surface; and the area in contact.  We don't want to change the first, because squeezing harder makes your wrist tighten up.  It's also fairly hard to change the second by enough to make a difference, as demonstrated by you trying different types of picks but still having the same problem.  So, the solution - use wider picks!  You then have more contact area between the pick and your fingers, and more friction, without changing anything else.
There's also an effect where any off-centre force on the pick causes the pick to twist in your grip.  Controlling this depends only on two things: how hard you grip; and how wide the pick is (because leverage).  So again, the solution - use wider picks.
For me, Jim Dunlop triangle picks are the ideal solution here.  Compared to other picks, these are wide enough to double the contact area, and hence double your grip.  The point is still the right kind of angle (and there are versions with more or less pointy corners), so it doesn't affect your tone or technique.  And in case that wasn't enough reason to prefer them, you also have three picking corners instead of just one, so they last three times as long.  Winning at guitar picks!
Answer: For some reason, Dunlop Ultex picks do not slip for me, and are not sticky or textured. I have never dropped a pick while strumming since I switched to them.
Answer: Something not yet mentioned, many people start out holding the pick in the "upright heart" position with the pointed bit making contact with strings. If you rotate the pick 90 degrees so that the rounded side, instead, is making contact there will be less slippage.  First, the total surface area of the pick in your fingers will be increased as it runs back along your thumb. Second, contact with the strings will be graded, less abrupt and therefore less apt to jar and slip.  You will also get finer control this way, which is why so many flat-pickers use this technique.  Good luck.
Comment: Never thought of rotating the pick! I tried it and it definitely helped. No to just work on relaxing with I think more practice. Seems like it is very easy to tense up when strumming with a pick.
Answer: Dava Control Grip work well too. Added benefit - they can be excellent training aids for making light, consistent contact (even for strumming!).
Comment: I like these picks too.  Very easy to hold onto.  They dull the tone a bit though which I think is a function of how soft/hard the plastic is.
Answer: Without more information it's hard to know what you're encountering exactly, but here are some factors to consider.
When strumming a pick across the strings, as the pick crosses each string, the pick pulls the string somewhat until the string slides off the end of the pick, plucking it and allowing it to vibrate freely. During this movement of the pick across the string, the string gives somewhat, but so does the pick and so too do your fingers, slightly. The combination of all three of those "gives" are what allows the plucking to happen.
I personally find that I enjoy a more "soft" pick when strumming an acoustic, and a more "firm" pick when playing lead on an electric. This is because on the acoustic, the strings are thicker and have more tension, so they give less - therefore, the pick and your fingers will have to give more in order to achieve the same plucking of the strings.
So if you have a hard time holding onto the pick, it's likely that the tension of the strings and the hardness of the pick aren't enough to allow the plucking to happen, and you're having to compensate with your fingers. Even if you stiffen your hold, it's more tension on your fingers than it should be, and it would probably feel like you have to choose between breaking the strings or dropping the pick.
If this is acoustic, I personally recommend Dunlop 0.60mm nylon standard or max grip picks (the medium grey ones).
Answer: Where do your picks wear out? If they wear out on the edge rather than the very point of the pick, then you're digging too deep with your pick. If this is the case, practice air-picking like a hummingbird approaches a flower, gradually closer and closer to the string until you sound the string. Your pick should just kiss the string.
Answer: Just to throw this one into the mix…
I never use a pick at all on 6-string, occasionally on bass.
This has worked well for me for 35 years - however, I don't do 6 gigs a week. I can imagine running out of finger at that rate. As pretty much a studio-only player I find it gives me by far the best control.
Comment: Funny - on bass never a pick. Pick up an electric guitar, and my hand's in my pocket, finding that pick!
Comment: I think this option depends heavily on what style of music the OP plays. If they're chunking out the crunchy power chords of hardcore punk, I don't imagine you'd keep those fingers very long :P
Answer: I don't do much picking, mostly I do strumming, but I personally recommend the Dunlop Max-Grip nylon picks. Nylon lasts much longer than plastic, and the 3D texturing on these picks almost make them feel like they are sticking to my fingers with a light touch.
https://www.jimdunlop.com/max-grip-nylon-standard-pick-73mm/

Lots of pick movement


Different Time series Modeling techniques?

Question: I started learning Time series modeling and bit confused when I started learning the advanced techniques like Box-Jenkins and Holts Winter techniques. What is the difference between ARIMA, Box-Jenkins and Holt's Winter Models.
Answer: ARIMA is a parameterized model that consists of a few parts. First the I is for integrated, and it has to do with a technique to remove non-stationarity from the data, by looking at differences between sequential values instead of the values itself, the parameter indicates how often we want to do this. AR stands for auto-regressive, it's a regression model that regresses on previous values of itself (lag features), the order determines how far back we look. The MA means Moving Average, which is referring to a linear combination of error terms, this is also parameterized by an order.
Box-Jenkins is a method that uses ARIMA, but it first involves a number of checks before fitting the model, and afterwards does criticism to see how well the model works. This allows for iteration into a better fitting model.
Holt-Winters methods are used for smoothing out time series. Sometimes there is a lot of noise involved in time series, while you are only interested in trends and how values relate to each other. By smoothing it out via for example moving averages or exponential smoothing hopefully you gain more information by trying to filter out noise than you lose by throwing away relevant information.


What does the ''Tempus Praeteritum'' mean?

Question: I've got a test tomorrow and I have to learn the list of "Tempus praeteritum".
The problem is, that I don't know what it means and where it's used for.
Can anybody help me?
Comment: I edited in the *t*, but I think this question needs to be focused before it can fit in our format: *tempus praeteritum* means past tense, and I don't see what else can be said without more context.
Comment: Did you mean *tempus praeteritum* with the added T? Literally it means "passed time". Is the test on Latin grammar or something else? More details are needed to put it in context and interpret it. I have never seen that concept in Latin grammar, but my guess is that it means all tenses referring to the past.
Comment: Depending on what level of syntax and grammar is meant, your test will be on all **verb forms** for perfect pluperfect imperfect (including subjunctives) or on **when to use** aorist/perfect; how to form past conditionals, and optatives such as "If only I had known this yesterday."*  You could start by googling **preterite tense**
Comment: See Quintilian I .4. 29.
Comment: @JoonasIlmavirta Yeah I mean the tempus praeterium with the added T. Just the form with the past. My test is going to be a lot of sentences and I got to translate them. But how should I translate a sentences with the  tempus praeterium? Just with the imperfect in english?
Answer: So first, a point of terminology. In Latin, there are two tenses* which can be called the tempus præteritum. I'm assuming you mean the third principal part of your verb (amāvī or habuī or cucurrī or audīvī), also called the simple past tense, aorist tense, or perfect tense. Out of all these names, perfect seems by far the most common, and it's the one I learned in school. So I'll use that name here.
Latin has a number of "past tenses", but the perfect is the simplest. It's the one you'd use to say "I went to the store" or "I saw the Pantheon". Often it doesn't imply anything except that the action happened in the past. So the easiest way to translate it into English is to use the simple past tense, loved, held, hurried, listened. You can also add a did for emphasis: I did say that!
When contrasted with the imperfect (the one with -ba- before the ending, like amābat), the perfect has one other meaning. It states that the action is finished, or that it was an instantaneous thing; either way, it isn't still happening. One way to translate this distinction is the simple past vs progressive past in English: perfect would be the army fought, imperfect would be the army was fighting.
Hopefully that helps. I may have misunderstood the question; are you asking for Latin → English help, or English → Latin?
*(the other being the pluperfect / tempus plusquamperfectus, but I've only seen that called the "preterite" once and it doesn't correspond as well with the English and German preterites.)


Speed of light definition

Question:
I understand the speed of light to be an EXACT number. If permeability of free space has a factor of pi in it, how can this be?
Comment: Because $\pi = 3.1415926535897932384626433832795028841971693993751058\ldots$ is also an exact number?
Comment: $\sqrt{\left(\frac{4}{\pi}\right)\pi} = 2$ why should this be a problem?
Comment: By the way, note that the magnetic permeability contains a factor $\pi$ *by definition*; it is a result of how the SI unit ampère is *defined* in terms of magnetic forces between conductors.
Comment: Wikipedia says $\epsilon_0=(\mu_0 c^2)^{-1}$. So it is the real value that combines with $4\pi10^{-7}$ in just the right way to make c exact...
Comment: Possible duplicate of [Why does the vacuum permeability have the value of $\pi$ in it?](https://physics.stackexchange.com/q/219195)
Answer: I reject the notion that $\epsilon_0=4\pi\times10^{-7}\,{\rm F/m}$ and $\mu_0\sim9\times10^{-12}\,{\rm H/m}$, they are precisely $\epsilon_0=1$ and $\mu_0=c^{-2}$. This obviously takes care of any issue with defining any unit with $\pi$ in it because,
$$
\sqrt{\frac{1}{\epsilon_0\mu_0}}=\sqrt{\frac{1}{1\cdot c^{-2}}}=\sqrt{c^2}=c
$$
We use the MKSA system because it's fairly convenient for most every day purposes (for the most part). Nature, however, does not know what a meter or a second is to define $c$ and force photons to travel at it; it is what it is due to a fundamental symmetry of the universe.
Answer: Andrew the problem is that the speed of light is not an exact number. You give it as $2.99792458\times 10^{8}$ m/s; but suppose I instead tell you that it is really $1.8026175\times 10^{12}$ furlongs per fortnight.
Neither of these numbers is any more correct than the other, but we have an accepted and defined system of units that we work in.
Maxwell's equations can be written down without using $\epsilon_0$ or $\mu_0$, either through the use of appropriate field definitions (i.e. introducing displacement ${\bf D}$ and magnetic field strength ${\bf H}$ or by adopting a system of units in which $c=1$. It is often more convenient to do this when working with theory, but in the end, if you are trying to build an antenna, you want to know what current (in Amps) is going to generate what electric field (in Volts per meter) and what power (in Watts), and in order to make these connections then physical constants must be defined that relate one quantity to another in our chosen units.
In fact the current (no pun intended) SI system of units chooses to define $\mu_0$ by making the force between two wires carrying 1A that are 1m apart exactly $2 \times10^{-7}$ N/m. I think this sentence is actually the answer to your question - it is the way that the SI definition of an ampere works. But SI units also choose to fix the value of $c$ and this then leads to a fixed value of $\epsilon_0$. The corollary of this is that electrical charge is not a fundamental unit, but defined in terms of the ampere and the second.
Answer: The speed of light is currently defined as "exactly 299,792,458 metres per second". Even if the measurements of the speed of light are not exact, or even if the speed of light changes, it is still defined as  "exactly 299,792,458 metres per second".
This adopted value for teh speed of light was specified at the General Conference of Weights And Measures on 21 Oct 1983.
Comment: This doesn't answer the question. The question is asking how, in the arbitrary SI units, $c$ can be derived from $\epsilon_0$ and $\mu_0$, the latter of which contains the irrational valued constant of $\pi$ yet $c$ have a *rational* value.
Answer: I would like to expand on the point made by @RobJeffries in his answer: "1.8026175×1012 furlongs per fortnight" instead of 299,792,458 m/s.
It is easier to remember the accurate value: "1 Planck length per Planck time" or even an inaccurate (~+1%) early estimate: "2,202 yojanas per half nimesa".
The early estimate of the speed of light is well explained in the papers "The Speed of Light and Puranic Cosmology" and "Concepts of Space, Time, and Consciousness in Ancient India".
In the medieval texts Rigveda "Praise, shine and knowledge", commented on by Sayana (c. 1315-1387), he translated one of the earliest estimates of the speed of light as: "2,202 yojanas per half nimesa" or "20,016.18 miles in half of the blink of an eye".

2202 x 9.09 miles (20,016.18 miles) per 0.1065 seconds =  187,945.352 miles per second.

The correct value is 19,839.075 miles per 0.1065 seconds = 186,282.397 miles / second, so early estimates were not far off and it's easy to remember: "2,202 yojanas per half nimesa".
Two problems with that answer are it's inaccuracy and inapplicability to modern mathematics.

Similarly you question the use of the International System of Units (SI) and electromagnetic constants use of π to define the speed of light, but if you will use π in your calculations it can be convenient. It's use has been rationalized.
That option for deriving c does not directly depend on a measurement of the propagation of electromagnetic waves, it uses the relation between c, the vacuum permittivity ε0 and vacuum permeability μ0 established by Maxwell's theory: c^2 = 1/(ε0 μ0).
Another way to measure the speed of light is to independently measure the frequency f and wavelength λ of an electromagnetic wave in a vacuum. The value of c can then be found by using the relation c = fλ.
You can also avoid the use of ε0 and μ0 by using Heaviside–Lorentz units units, they are the unit of choice in High Energy Physics (particle physics).
See "Babel of Units. The Evolution of Units Systems in Classical Electromagnetism" by Neal Carron where he recounts the history of the development of units systems in electrodynamics, and fully derives how each system is constructed for: pure Electrostatic Units (esu), pure Electromagnetic Units (emu), Gaussian, a variant-Gaussian, Heaviside-Lorentz, and SI systems.
In summary:
An appealing aspect of SI is that, of all the units systems, Maxwell's Equations appear in their simplest form; no numerical coefficients occur multiplying terms.

Source: http://bohr.physics.berkeley.edu/classes/221/1112/notes/emunits.pdf
The main advantage of SI units is popularity. The entire engineering world runs on volts, ohms, farads, etc (all SI units), so almost any discussion of electrical equipment or experimental apparatus will be in terms of SI units. The main advantage of Gaussian units is that they make fundamental physical issues and theoretical relations involving electromagnetic phenomena more clear. For example, special relativity and quantum electrodynamics are simpler, more transparent and more elegant in Gaussian units than in SI units, and generally the various formulas of electromagnetism are simpler and easier to remember in Gaussian units than in SI units. Gaussian units are really the simpler system of units, and they would be better for pedagogical purposes were it not for the fact that students must deal with SI units some day anyway.
SI units have gradually been winning the popularity contest against Gaussian and other systems of units. Almost all engineers, most chemists and many physicists now use SI units almost exclusively, and undergraduate courses in electricity and magnetism are now normally taught in SI units. Book publishers have contributed to this trend; they want books written in SI units so engineers will buy them. Nevertheless, it is unlikely that Gaussian units will ever be completely abandoned, because they are so superior for fundamental physical questions.

Neil Carron states: "most (but not all) undergraduate level physics textbooks and engineering texts employ SI units, while most graduate physics texts use Gaussian units" on page 51 of his aforementioned paper.
In a plane wave in vacuum
E(V/m) = c(m/s)B(T) = 3×108B(T) .
An electric field E of 3×104 V/m accompanies a magnetic induction B of 10−4 T (= 1 gauss) or a magnetic field H =B/µo = 1000/4π A/m = 79.6 A/m.
That's how π gets it's feet into the equation.
Heaviside choose units in which the denominator was 4πr^2 in the force law for problems of spherical symmetry, or 2πr in cylindrical symmetry.
Gauss' Law will now read  ∇⋅=ρE
A system with that convention is now called Rationalized (a  possible play on words). Thus  esu, emu, and Gaussian are  unrationalized systems; Heaviside-Lorentz  and SI are  rationalized.
A factor 4π enters  at all because of the way  Coulomb's law relates the electric field E (force  per  unit  charge) outside a volume to the charge Q in the volume. It is  fundamentally because the surface area of a sphere is  4πr^2.
When you rationalize Gaussian Units, the result is called Heaviside-Lorentz Units. To obtain SI, two major  changes  are  made. First, a fourth base  dimension, current, is added, along  with its unit, the  Ampere. And second, constants ke and kB are  chosen to take 4π's out of  Maxwell's Equations and put  them in the denominator of the force laws. Source: Neal Carron https://arxiv.org/abs/1506.01951 .
From the introduction:

Few things are more confusing than the various sets of units employed in classical electromagnetism.  Five systems (of very many) in common use are:
•    The  International System of  Units  (SI)
•    Gaussian
•   Variant-Gaussian
•    Heaviside-Lorentz  (rationalized Gaussian), and
•   Various  sets  of  "Natural"  units.
The International System of Units, universally abbreviated SI (from the French Le Système International d'Unités), is the  modern metric system of measurement. It applies to all of physics, and is now officially preferred. In electromagnetic context it used to be called MKS or MKSA, or, more precisely, Rationalized MKSA.
Gaussian is commonly used in electromagnetism, especially in fundamental discussions. It has replaced pure  esu or  emu. SI and Gaussian are by far the most common systems today.
Variant-Gaussian is sometimes  preferred to Gaussian  because of the size of its  current unit. It has no standard name, and is sometimes confusingly also called Gaussian.
Heaviside-Lorentz and natural units (ћ = c= 1) are commonly used in Quantum Electrodynamics, less so in classical electrodynamics.
Other natural systems are often employed (e.g. Atomic Units in atomic structure studies).  Natural units systems are not really for classical electromagnetism, and are not discussed here. A good discussion is in Klauber  [Kl13]. See also Tomilin  [To99].
For most purposes one need understand only the two major systems, Gaussian and SI. The surest way to understand the Gaussian is to understand the two earlier  systems of which it is an amalgam: pure Electrostatic Units (esu), and pure Electromagnetic Units (emu). Each of these latter two systems is essentially never  used anymore.

[Typed using a mobile phone, hopefully no errors have crept in, improving edits welcomed].
Answer: In 1980-something, the standard meter was defined (empasis on defined) as 1/299792458 of the distance light travels in a second. Since the definition of a meter is that exact fraction, when you measue the speed of light in meters, you get an exact number.

Speed of light definition


Do photons have a spectrum like light when they are treated as waves?

Question: If light can be treated as both a particle and a wave, are there things called infrared photons, or ultraviolet photons etc, as there are infrared waves, or ultraviolet waves? Or are photons just packets of energy, as in they have specific quantities of energy that correspond to the different wavelengths of light when taken as a wave. Or is it just that the spectrum only exists if light waves are dispersed, but photons don't get dispersed?
The recent photograph of light also doesn't seem to explain this either..or at least I don't see it.
Comment: I can't quite make sense of your last sentence; I think you forgot a word.
Comment: I forgot the word "light", thanks.
Comment: What photograph?
Answer:
are there things called infrared photons, or ultraviolet photons etc, as there are infrared waves, or ultraviolet waves?

Yes, absolutely. Certain aspects of the photon notion can be thought of as even more like a classical wave than even the above. One photon alone can be in a pure quantum superposition of energy eigenstates, or polarization eigenstates. This means that it itself can have a spread of wavelengths. In principle, one can have lone, white photons (although in practice I don't know of any physical processes that can produce pure superpositons of radically different frequencies)! However, there is still a definite - albeit needfully time varying - phase relationship between the frequency components of a "white photon" quantum superposition - it is a pure and not mixed state like "everyday" white light.
How this works is the following. A "lone photon" is simply a state of the quantum electromagnetic field, see the "Quantization of the Electromagnetic Field" Wikipedia article where the number observable is certain to return a measurement of $n=1$.
Moreover, you can define probability amplitude functions of space and time from the quantized electromagnetic field that fulfill Maxwell's equations, which can thus be thought of as the analogue of the Dirac equation for the lone photon. Every classical solution of Maxwell's equations defines a corresponding one photon state and contrariwise. See my answer here for details
Comment: Thanks so much!! I couldn't find this anywhere because I thought it didn't have anything to do with quantum mechanics. (I'm still in high school)


Converging light

Question: Imagine that we emit a light pulse. As is the nature of light, it will expand. However, light is affected by gravitational fields and light has its own. Therefore, will the light converge given infinite time and infinite distance to travel interrupted?
Comment: No. Even if I accept that two photons traveling in parallel would attract (I am not sure I do), you could not get them close and parallel enough that the force would bring them together faster than their momentum causes them to drift apart. Uncertainty in lateral momentum from Heisenberg...
Comment: One can do self-focusing of light in non-linear media... I don't know if it happens in the vacuum. If it does, it doesn't happen because of gravity but because of QED.
Comment: It was observed that two photons could travel together, see photon bunching. And the photons in a radio wave are aligned too in their B and E field components. But converging of a light beam was not observed and is not possible as I know
Answer: No, or at least not under normal circumstances.
Calculating the gravitational force between light beams turns out to be rather complicated, so let's use an analogous but simpler system. Instead of a spherically symmetric pulse of light consider an explosion that throws out a spherically symmetric cloud of light particles.
At any time $t$ the cloud of particles will have some radius $r(t)$ and total mass $m$, so the escape velocity at the surface of the cloud is just:
$$ v_e = \sqrt{\frac{2Gm}{r(t)}} $$
If the velocity of the particles is greater than $v_e$ then the cloud will carry on expanding forver. If the velocity is less than $v_e$ the cloud will recollapse. So whether the cloud expands forever depends on how great the particle velocity is compared to the gravitational forces. The fact that a gravitational force exists does not necessarily mean the cloud must recollapse.
Now consider our light pulse. Unless the intensity of the light is so great that it creates a black hole the escape velocity will always be less than $c$ and the light will escape to infinity.
If you're interested in some background then have a look at the question Do two beams of light attract each other in general theory of relativity?. In particular note that parallel light rays do not attract each other due to gravity so a parallel ray of light will not gravitationally focus itself.
Comment: *parallel beams are not attracted at all* this is correct, but that doesn't mean that the wavefront doesn't collective attract itself, as long as the wavefront curvature is significant (near the Rayleigh range) while still being asymmetric (a spherically symmetric wavefront would cancel all its contributions to curvature) , and the intensity is high enough, there should be some effect of self-gravitation on the wavefront curvature

Converging light


What type of magazine was "Classic CD"?

Question: This question concerns very recent history, I apologize if it is too recent.
I recently saw an episode of the British comedy series Keeping Up Appearances from the early 1990's. In it, one of the characters can be seen reading a magazine called "Classic CD". Apparently this magazine is no longer in existence, and I became curious as to what type of magazine this was, when it started, and when and why it ceased to exist.
Comment: Classic CD was a monthly print magazine covering the classical music market, usually with a sampler CD attached. It disappeared around 2000 due to falling sales (in a familiar pattern, branching out into other genres to broaden its appeal just drove away its core readership).
Comment: @SteveBird - The mass migration of eyeballs from print media to online media probably had a little something to do with that as well. Rather a lot of magazines started folding around that time. The "branching" may well have just been a desperate attempt to stem the receding tide of readers.
Comment: @Steve Bird Why do you think they broadened into other genres, and in what manner are you saying they were doing this? Don't you think it might be related to the general dumbing down of society as well?
Comment: @T.E.D Still, there are no online alternatives, as far as I know. I think classical music would predominantly attract older readers, who aren't as likely to use computers, so I doubt your hypothesis of online media takeover.
Comment: There was renewed interest in classical music in the 90s from the launch of [Classic FM](https://en.wikipedia.org/wiki/Classic_FM_(UK)) in 1992. Although I'm not sure whether Classic CD would have appealed to Classic FM readers in particular.
Answer: Classic CD was a monthly magazine which targeted the classical music market.

The first issue had a cover date of May 1990, so it's not surprising that it featured in a BBC sit-com from the 1990s.
I think the final issue had a cover date of August 2000 (issue number 127). I've seen copies of the magazine come up on eBay (often complete with the cover CD) quite frequently.
Comment: used to buy it quite regularly. Often pretty good music on the CD, and in those days CDs bought separately were usually more expensive than the magazines with CDs included.
Answer: I wrote for Classic CD in its earliest years.
I suspect that the reasons for its disappearance included the success of BBC Music Magazine (launched slightly later) and the modernisation of The Gramophone, which were surely its chief competitors.
Also, its publisher Future Publishing underwent some ownership changes and an IPO around the time it closed, so it's very possible that it simply didn't fit into their business plan. Future tended to have multiple magazines in subject groups, but Classic CD didn't really fit into any of them.
It was a great magazine, though.
Somebody mentioned there not being online equivalents. That's not quite true - there are some, such as ClassicalSource.com. But it's fair to say they don't have a very high profile.

What type of magazine was "Classic CD"?


What does this symbol signify ('\Game' in mathcha.io editor)?

Question: While playing around in an online LaTex-like editor (mathcha.io) I came across the following symbol, entered with '\Game':

Can anyone tell me what it signifies? All my online searches came up short on this one.
Answer: In descriptive set theory, $\Game$ is the game quantifier - taking $f$ to be a variable ranging over infinite sequences of natural numbers, "$\Game f(\varphi(f))$" means "Player $1$ wins in the game where players $1$ and $2$ alternate playing natural numbers and player $1$ wins iff $\varphi$ holds of the resulting infinite sequence." So for example, if $\varphi$ is "is eventually periodic," it's easy to show that $\neg\Game f(\varphi(f))$ - one way for player $2$ to win the relevant game is to just make sure that they always play a number larger than any number which has occurred so far.
(Note that making $\varphi$ weaker only makes it easier for player $1$ to win, so $\Game$ is a monotonic quantifier - like $\exists$ and $\forall$, and unlike something such as "finitely many" or "an even number of.")
Of course, games on naturals aren't the only games that show up in logic, and so the game quantifier can be generalized to a wide variety of settings; but the usage above is I think the most common.
Answer: As the name suggests, ⅁ is a symbol sometimes used in Game Theory to denote an arbitrary game. Some authors call it the "game projection" operator, like in this paper by János Flesch and Arkadi Predtetchinski.
Comment: Is the upside-down G notation used in those lecture notes? I scanned through them and didn't spot it.
Comment: Not really, I couldn't find an example of it being used in practice when I wrote the answer. I have included an actual example now.
Comment: Excellent, thanks!


Looking for a note taking site with a public API

Question: I have a service running on a Raspberry Pi at home during the day that records data, and I'd like to make the daily results available to read while I'm out, so I'm looking for recommendations for a note taking site with a public API that I can create an empty document each day, write the results to over the course of the day, and read either via an app or web browser.
Comment: Why not cut out the middleman and access whatever's on your Raspberry Pi with a web browser? You could use a lightweight web server such as Nginx or lighttpd.
Comment: I had a similar setup to that before, and my pi ended up getting hacked.
Answer: You may also just use a plaintext note format (e.g. org-mode) and upload them directly to a storage service such as Dropbox?
Comment: that might be an option, create a new file each day, and synchronise it with Dropbox/Google Drive/OneDrive/etc
Answer: I solved this by signing up for the google docs API
It's not ideal, but it works well enough that I can use it


How can I make this Bitmap gamma function in Android run faster?

Question: I have written the following function to change the gamma of a Bitmap, but it's kind of slow, even on small (300 by 300) bitmaps. How can I make this function run faster? For example, is there a better way (i.e., faster way) to access individual pixel values from a Bitmap?
<code>public Bitmap apply(Bitmap bmp, float gamma) {
    if (bmp == null)
        return null;

    int width = bmp.getWidth();
    int height = bmp.getHeight();

    int[] pixels = new int[width * height];
    bmp.getPixels(pixels, 0, width, 0, 0, width, height);

    int[] powers = new int[256];
    for (int i = 0; i < powers.length; i++)
        powers[i] = (int)(Math.pow(i / 255.0f, 1.0f / gamma) * 255);

    for (int p = 0; p < pixels.length; p++) {
        int r = Color.red(pixels[p]);
        int g = Color.green(pixels[p]);
        int b = Color.blue(pixels[p]);
        int newR = powers[r];
        int newG = powers[g];
        int newB = powers[b];
        pixels[p] = Color.rgb(newR, newG, newB);
    }

    Bitmap newBmp = Bitmap.createBitmap(pixels, 0, width, width, height, Config.ARGB_8888);
    return newBmp;
}
</code>
As an optimization, I calculate the powers ahead of time on all possible pixel values (0 to 255), which helps, but it's not enough. Also, declaring all the int's outside of the second for loop didn't help much, so I left them in. Thanks in advance.
Answer: I would look into using OpenGL or RenderScript for that if you really want it to be fast. Both have nice integration on Android.


Way of saying 'washes hands of it' but implies physical

Question: Looking for a non-crappy way of describing someone doing that washing hand motion you do to clear your hands of dust or dirt, but without saying 'washing hand motion'.  I feel like there's a good way of describing it, a stock phrase of some kind, but I can't remember it.  Tip of the tongue, and it's driving me mad.
Answer: If you mean running one's hands over each other, not when you're washing but when you are distressed or worried that's wringing one's hands
http://www.oxforddictionaries.com/definition/english/wring-one%27s-hands
Answer: It's a bit archaic but how about Lave?
e.g. She laved her hands.

Lave [leyv]
verb (used with object), laved, lav·ing.
1.to wash; bathe.
2.(of a river, sea, etc.) to flow along, against, or past; wash.
3.Obsolete . to ladle; pour or dip with a ladle.
verb (used without object), laved, lav·ing.
4.Archaic. to bathe.
Answer: How about rub/scrub/brush one's hands clean?

He vigorously rubbed his hands clean under the sink water.

Alternately, consider scrub up.

scrub up: (of a surgeon) to wash the hands and arms thoroughly before operating.


GRE Mathematics Subject for Ph.D. of Economics

Question: I have a bachelor degree of Engineering and a Master of Economics and next fall want to apply for Ph.D. of Economics. I have checked some universities in the US and found out linear algebra and real analysis is important for getting an admission. Although I have verifiable background in calculus I have not passed linear algebra and real analysis courses. Considering that I can't take those courses, how much taking GRE mathematics Subject exam will help me to cover that incompleteness in my resume?
Answer: My best guess is that is the wrong approach. Unless the exam has been greatly watered down you would likely do very poorly. The exam is both very broad and very difficult. As a top math student in my last year (but long ago), I felt devastated when I walked out of it, though my scores turned out well. But I had completed almost all of the normal math courses of a major.
Note, however, that for doctoral study in the US, there is usually coursework at the start, even for someone with a masters as most programs have comprehensive exams and the coursework is preparation for them. You could probably arrange to take both a course in linear algebra and in analysis during this period.
But, and this is important, don't make assumptions. See if you can talk to someone both about your chances and your options. The econ department of somewhere you'd like to apply  can probably put you in touch with someone who can give you advice.
But the math subject test is intended for mathematicians and those who wish to study it further.
Comment: My math is good. I have passed calculus with As. But my major was mechanical engineering and we did not have any course in linear algebra. Assuming I can get a really god GRE math (more than 90th percentile) is it worth it to take?
Comment: @SadeghBirjandi I took the GRE math last month. No knowledge of linear algebra, analysis, topology, algebra, or complex functions will guarantee a score well below average, not to mention 90th percentile.
Answer: To be honest, if you already have a Masters in Economics then you are probably okay. Other things such as LOR and GPA plus your general GRE score also play a big role. I'm currently a PhD student in Economics but do have a minor in Math.
Comment: My problem is that I did not pass linear algebra in masters neither and much of the universities I'm checking require linear algebra. My masters GPA is 4 but if I do not have the prerequisite of linear algebra then my application will not be considered.


Should edits be always attributed?

Question: Every time I fix typos and grammar in someone else's post I feel like I'm stealing thunder from this person. He asked the question, I just made few corrections and not only did I get the same attribution (that box with name and picture) but I even get listed in front of him! Wouldn't it be better to just save my edits in history but do not put my name there if the edit is relatively small? Just a simple link instead of that box (as it is in case of multiple edits) would make me feel better.
Comment: don't think of it as editing, think of it as pair programming -- you team up with that user for great justice!! http://www.codinghorror.com/blog/archives/001229.html
Comment: make your time.
Answer: I think it is important to be very clear and obvious that another user has edited it - they may have done harm.
In the case of a bad edit:

If it is obvious that it is edited by another user, it is likely to result in an edit rollback.
If it isn't obvious, it is likely to result in down-vote / closure / flags / deletion etc.

Besides - I want to know you made the good edit, so I can reward it ;-p
Comment: You will always be able to find that information in edits log :) Besides, I'm not against marking it as edited but attribute it in the same way is kind of confusing. Couple of times I mistook editor for an author.
Comment: But people don't look at the edit log immediately - they just see a bad post, and hit the close/flag/downvote button.
Comment: Maybe they should think a little bit more before they do that :) Isn't that the point of your question linked above?
Comment: "before they do that" - which? bad edits? You can't stop crazy. bad votes? people are in a hurry, and need the necessary information to make a snap decision without wading through pages of info
Comment: I'm going to sound like a complete idiot, but I didn't know there was an edit log until now.  Can the link be changed a skosh to include the word "edited"?  And maybe changed to include the word "(log)"?  In any case, imperative that such informatio be public.
Answer: I would agree with the "problem" stated for two reasons

I am dyslexic so tend to notice the picture rather than the word "edited"
I usually read SO etc on a mobile device so have to scroll and see the name/picture of the editor rather than the poster.

I agree the edits should be attributable.  My suggestion would be to diplay the name and not picture for the editor (in the same way as it works for comments).
Answer: Are you proposing reversing the order of display? In other words instead of

[editor] [owner]

we would show

[owner] [editor]

I wonder if that might be MORE confusing since it no longer makes "right column under post = owner" true.
Also it does say edited by and answered by right there in the text.. and the owner gets a special color. I dunno, this seems pretty clear to me.
Comment: That's because you made it look like this :) Even smaller box for editor would be better.
Comment: Maybe we could eliminate the gravatar, rep, and badges of the editor (except for community wiki)? That would make it clear that it was edited, but the author still gets top billing.
Comment: @Jeff: on this question it looks at a casual glance like i both asked and answered it, since my avatar is the one shown for both: http://stackoverflow.com/questions/164432/what-real-life-bad-habits-has-programming-given-you  i think that could be improved, by showing the avatar of the original author (or largest-contributing editor) instead of the most recent editor
Comment: I can't really support this change. Editing is a big deal, and deserves prominence. It's not hard to figure out the MANY cues we provide -- color, text, position. Basically, deal.
Answer: This was suggested once on UserVoice, and declined. IMHO, it would be a great feature to have. This strange mix of wiki and forum, public and private ownership... has tilted too far in the direction of private, and it's hurting both the site and those who would work to improve it. Wikipedia makes you seek out editors and contributors, we could do the same.
The SO model depends on ego, and reducing the visibility of editors would let egos win without crippling editing...
I think making this an opt-in feature would suffice - if you're making a minor edit (fix typos, formatting) check it, if you're adding or changing something more significant then don't. And then add the ability to flag individual edits so as to allow easier identification of abusive editors.

Should edits be always attributed?


Hadoop - Name Node and Data Node on the same machine

Question: We have 7 identical physical servers (2x8 core CPU, 128GB RAM, 8x 6TB disks) that will be used for Hadoop. All of the machines are connected to 10G switch with double 10G interfaces. Since we do not have many machines we want to use one of the machines as both name node and data node. Is this configuration would cause any performance issue? The Hadoop system will be used for academic purposes, so would the data node on the name node have the same performance as the other data nodes? If this is not a good solution, what is the minimum requirements of a name node for this configuration?
Answer: Its not advisable to use NN and DN on the same machine as DN may get full and your NN may start having issues and in turn bring the whole cluster down!
If you are sure your DN will have enough space at all times then you may do it(not recommended).


How to fix error 504 on Android?

Question: Can a 504 error be fixed? Please help me. no matter what deepweb site I search on orweb or orfox it results with the 504 error. Don't know what to do. I have a galaxy s3 mini and don't want to root it.
Comment: Have you only tried one hidden service? If yes, please go to https://ahmia.fi and try to connect to other hidden services. Also the [DuckDuckGo](http://3g2upl4pq6kufc4m.onion/) and [Facebook](https://facebookcorewwwi.onion) hidden service are good examples for reachable hidden services.
Comment: My friends i'm Medin. I tried everything u told to do and nothing works. Maybe more ideas? The search page works but the hidden pages doesn't. Thank u for ur time
Answer: This error means you're not receiving a response from the server you're trying to connect to in due time. The likely cause is that you are running Orweb on an unrooted Android device. There is a solution however that does not involve rooting the device:

If you are connected to the internet on your phone through WiFi, open your WiFi settings, press and hold on the WiFi connection name you're connected to, and choose "Modify connection config", and check "Show advanced options" and enter "localhost" in the "proxy hostname" field and "8118" in the "proxy port" field. Press "Save" and you should be able to browse through Tor now.
If you are connected through 3G/4G, find the "Mobile Networks" in your main settings (it is under "More settings" in some devices), press "Access Point Names", then press on the access point with radio button checked (if there isn't any you'll have to create a new one). Inside the access point name settings, put "localhost" and "8118" in the respective fields of "Proxy" and "Port".
Comment: I don't think your solution will help. The status code 504 is a Gateway Timeout and orbot usually installs with the appropriate settings. I looks like that the Privoxy couldn't connect to some hidden service.

How to fix error 504 on Android?


Get search to index meta tags keywords?

Question: So I am using the Meta tags module and really would love if search would index the meta tag keywords of nodes. How would I go about this?
Answer: I can't check it right now, but I guess the following should work:

For each content type (its meta tags you want to be indexed), go to "Manage display".
Add the "Search" display.
Add the metatag field to that display.

Assuming that the metatag module uses fields. If not, you'd have to create a dummy field (comment, if you need that explanation).

Get search to index meta tags keywords?


Staging of several android devices made simple

Question: I have to stage several android dongles to comply to my company's need. I need to setup the WiFi, google account, download 3/4 apps, configure them, change background picture... i'v been Trying to find a script/macro that would do that for me. Apps such as MacroDroid requires that I setup the dongles anyway. I wonder if there would be an option to copy this macro to the dongle using the sd card and let it do the job. Ideas? Thanks
Answer: I've just stumbled upon a project at Github, and remembered your question here. It seems like inception should perfectly fit your needs (except for the Google account, maybe, where it's a bad idea anyway to use the same one for all your employees). Quoting from the project description:

Inception is a set of tools for auto configuring android devices. You can do the following:

Include any apps to be (pre)installed
Remove any stock apps
Root the device
Install busybox
Configure Wifi networks
Generate all device settings
Patch APKs
Replace Kernel, and/or ramdisk data in both boot and recovery imgs
Place your adb keys, configure USB debugging

Most of this you'd probably not even need (rooting, patching APKs, replacing the kernel, prepare ADB, installing Busybox). But what you wrote is covered.
Inception requires a Python installation on your computer. After initializing your "project" and adjusting the configuration to your needs (incl. placing the .apk files you want to install), it creates an update.zip you can flash via the device's recovery-mode (which usually will require a custom recovery). Optionally, it also can generate a cache partition img for your device, allowing you to deploy your update in bootloader/download mode.
I have not tried it, so I cannot tell how good it is – but it sounds like it's at least worth a look.


PHP - define constant inside a class

Question: How can I define a constant inside a class, and make it so it's visible only when called in a class context?
....something like Foo::app()->MYCONSTANT;
(and if called like MYCONSTANT to be ignored)
Comment: i had this issue recently http://stackoverflow.com/q/5710676/560299
Answer: See Class Constants:
class MyClass
{
    const MYCONSTANT = 'constant value';

    function showConstant() {
        echo  self::MYCONSTANT. "\n";
    }
}

echo MyClass::MYCONSTANT. "\n";

$classname = "MyClass";
echo $classname::MYCONSTANT. "\n"; // As of PHP 5.3.0

$class = new MyClass();
$class->showConstant();

echo $class::MYCONSTANT."\n"; // As of PHP 5.3.0

In this case echoing MYCONSTANT by itself would raise a notice about an undefined constant and output the constant name converted to a string: "MYCONSTANT".

EDIT - Perhaps what you're looking for is this static properties / variables:
class MyClass
{
    private static $staticVariable = null;

    public static function showStaticVariable($value = null)
    {
        if ((is_null(self::$staticVariable) === true) && (isset($value) === true))
        {
            self::$staticVariable = $value;
        }

        return self::$staticVariable;
    }
}

MyClass::showStaticVariable(); // null
MyClass::showStaticVariable('constant value'); // "constant value"
MyClass::showStaticVariable('other constant value?'); // "constant value"
MyClass::showStaticVariable(); // "constant value"

Comment: `(is_null(self::$staticVariable) === true) && (isset($value) === true)` would be much more succinct as `self::$staticVariable === null && $value !== null`. `$value` will always be *set* inside the function, so no need to use `isset`. And the hyper-explicit `=== true` doesn't add anything.
Comment: Did we have this conversation before? Can't help it, I just really dislike that style. ;-D
Comment: but it doesn't work to define it inside a function of the class :(
Comment: @Alex: No it doesn't (AFAIK, there might be some obscure way).
Comment: @deceze: Yes. I'm very used to this style and it works for me so I'm gonna stick with it, but you're right too. =)
Answer: This is and old question, but now on PHP 7.1 you can define constant visibility.
EXAMPLE

<?php
class Foo {
    // As of PHP 7.1.0
    public const BAR = 'bar';
    private const BAZ = 'baz';
}
echo Foo::BAR . PHP_EOL;
echo Foo::BAZ . PHP_EOL;
?>

Output of the above example in PHP 7.1:

bar

Fatal error: Uncaught Error: Cannot access private const Foo::BAZ in …

Note:
  As of PHP 7.1.0 visibility modifiers are allowed for class constants.

More info here
Answer: class Foo {
    const BAR = 'baz';
}

echo Foo::BAR;

This is the only way to make class constants. These constants are always globally accessible via Foo::BAR, but they're not accessible via just BAR.
To achieve a syntax like Foo::baz()->BAR, you would need to return an object from the function baz() of class Foo that has a property BAR. That's not a constant though. Any constant you define is always globally accessible from anywhere and can't be restricted to function call results.
Answer: This is a pretty old question, but perhaps this answer can still help someone else.
You can emulate a public constant that is restricted within a class scope by applying the final keyword to a method that returns a pre-defined value, like this:
class Foo {

    // This is a private constant
    final public MYCONSTANT()
    {
        return 'MYCONSTANT_VALUE';
    }
}

The final keyword on a method prevents an extending class from re-defining the method.
You can also place the final keyword in front of the class declaration, in which case the keyword prevents class Inheritance.
To get nearly exactly what Alex was looking for the following code can be used:
final class Constants {

    public MYCONSTANT()
    {
        return 'MYCONSTANT_VALUE';
    }
}

class Foo {

    static public app()
    {
        return new Constants();
    }
}

The emulated constant value would be accessible like this:
Foo::app()->MYCONSTANT();

Answer: You can define a class constant in php. But your class constant would be accessible from any object instance as well. This is php's functionality.
However, as of php7.1, you can define your class constants with access modifiers (public, private or protected).
A work around would be to define your constant as private or protected and then make them readable via a static function. This function should only return the constant values if called from the static context.
You can also create this static function in your parent class and simply inherit this parent class on all other classes to make it a default functionality.
Credits: http://dwellupper.io/post/48/defining-class-constants-in-php

PHP - define constant inside a class


YA book about teens with powers who attend a boarding school

Question: I remember the start of the book has the main character doing an exam I think, then they have to go to this school. I think they were adopted. I remember him having mental powers and making friends with others at the school as they figure out something to do with experiments. There's a lot of prowling around underground labs or hidden spaces I remember. Possibly a bit of romance as well. Sorry for how sporadic the info is I barely remember reading this at all. I was only like 9 or 10 at the time.
Comment: It sounds a bit like "The Magicians" but that's an adult book with college-aged characters.
Comment: Hi, welcome to SF&F.  When was it that you read this?  (We don't know how old you are now.)  Was it set in a contemporary world, near future, alternate past?
Comment: I read it around ten years ago, it was set in present times.
Comment: You could improve this question by going through the checklists [here](https://scifi.meta.stackexchange.com/a/9337/20774) and editing in any relevant info you can think to add.
Comment: For example; What was the main character's name? How old was he? Who was administering the exam? What kind of exam was it? What was the school called? What happened to his parents? Who was the romance with? What was her name? How old was she? What kind of powers did he have? How did he use them? Was there a villain? What did they do? Was this school based in the UK or the US or somewhere else? What language did you read this book in? What did the front cover look like? Was the author male or female? Was the book aimed at youngsters or older teens?
Comment: Harry Potter? :P
Answer: Dark Visions trilogy by L. J. Smith? The protagonist can see into the future, which she accesses by drawings. I think she's doing this in class at the start of the book.


How to handle domains whose names shouldn't be published by certificate transparency?

Question: I have a set of domain names that are used internally and I do not wish them to leak to the outside world (as that would give an attacker advanced knowledge of the layout of the internal network).  Given Certificate Transparency seems like it is gaining momentum, what is the general consensus on the best way to have private domain names? Self signed certs? Wild card certs? Something else?
Comment: Either, wildcard certificates or private PKI.
Answer:
I have a set of domain names that are used internally

For internal only uses, you can set a private CA, install its certificate on internal systems, and issue internal certificates yourself.
If your internal use servers are somehow used externally, they will not work unless the external clients add an exception for your certificate. That will not stop external attackers from discovering the internal domains and attacking them. In this case, use a wildcard certificate. Using a self-signed or internal CA certificate will annoy the external users and do nothing to protect you against attackers (like most DRM schemas).
Answer: If leaking host names is part of your threat model, then CT is probably not the only source of such leakage. Think of email headers, logs, monitoring, compilers, .. lots of tools could eventually spill system names (whether host names or just part of certificates) into publicly accessible spaces. Rather, work on the underlying reasons for wanting them stay confidential.
You will not have to hide them if there is nothing secret about them.
If they do reveal some information, that is usually because you are using the names to

help admins navigate your own network or
help coworkers to remember what URL to type.
test a system internally before commercial operation

For all 3 problems, there are better solutions.
The main problem of 1. is that system names usually end up not matching system roles after a number of changes. The main problem with 2. is that your coworkers should not ever by typing URLs by hand anyway - think of misspelled-domain type scams. Code names solve 3.
Recommendation: Name your internal servers with a consistent, but otherwise random scheme. Convey system <> role relationships through entirely different means. You usually do address your coworkers by their names, not by their roles - do that for your internal servers similarly.
Our internal wiki is hosted at lake.example.org. Lake doesnt mean anything, its just sufficiently different from cube.example.org (the log collection).
But the evil attacker only knows there are 8 internal domains, which is not surprising for the size of the organization. If he wants to know more, he will have to come visit us & read the name tags.
Comment: So you're saying I should rename the `dont-forget-our-root-password-is-bacon123.example.com` server?
Comment: That would still leak information an attacker could use to plan (number of machines and their names).
Comment: @Chas.Owens to some degree also work hours, timing of it upgrades etc.
Answer: This seems like a pretty simple decision unless I'm missing something.
If you decide the privacy of the data that would be exposed via Certificate Transparency to be more valuable than the convenience of having certificates signed by a publicly trusted CA, you either:

Don't use certificates (unwise and unfeasible with modern software)

or

Run your own CA and deal with the inconvenience of setting up clients to trust it.


Approximations in general

Question: In analysis, a statement like $f(x) \ll g(x)$ (as $x\to x_0)$, has a very precise meaning:
$$
\lim_{x\to x_0}\dfrac{f(x)}{g(x)}=0.
$$
I was wondering, when physicists write $L_1 \ll L_2$, for, say, two length scales, what is the precise meaning, i.e., what is the limiting process lurking?
Comment: Without any further qualification, $L_1 \ll L_2$ just means that $L_1/L_2$ is a small number. Depending on who you ask and the application that might mean around $0.1$ or $0.001$.
Comment: The above condition is valid as long as $L_1/L_2$ is sufficiently small. Whatever approximation is being made under this condition typically gets more and more accurate the smaller that ratio is.
Answer: It depends on the context. As mentioned in the comments, if we had two length scales $L_1$ and $L_2$ then we can say $L_1 \ll L_2$ to mean $L_1/L_2$ is 'small' but what 'small' is depends on what we are using the approximation for, and also the scales of other quantities.
More generally, the meaning may be different. In the case of general relativity, when we speak of a perturbation $h_{ab}$, saying it is 'small' is often written as $h_{ab} \ll g_{ab}$ but the literal meaning is not that the numeric values taken as ratios are small, since a coordinate transformation can change those.
Thus, the meaning of $\ll$ changes based on the context. Sometimes there is no rigorous meaning.
Comment: @EEEB No for two reasons. 1. We are not interested in how it behaves at a point $x_0$, we are interested in it being small for all points on the manifold. 2. We are not dealing with a simple numerical comparison (i.e. ratio) to establish smallness, it's more complicated.
Comment: Thanks for the reply! In the context of GR since we're dealing with fields, can't we drop back to the precise definition and say $h_{ab}(x)\ll g_{ab}(x)$ (**as $x\to x_0$**)? But then again we would probably have an issue with limits on manifolds...Maybe the concept is purposefully non-rigorous.

Approximations in general


(rails) how to validate whether an uploaded .txt file is not, say, an image file?

Question: I have a upload text file field, and with it I plan to save the file somewhere and then store the location of the file in a database. However, I want to make sure the file they uploaded is a .txt file, and not, say, an image file. I imagine this happens in the validation step. How does one validate such a thing? Also, how do you get the filename of the uploaded file? I could always just check if it said '.txt' but for future reference knowing how to validate without just the filename would be helpful.
Comment: Does this answer your question? [Determine file type in Ruby](https://stackoverflow.com/questions/51572/determine-file-type-in-ruby)
Answer: Trying to validate the contents of a file based on the filename extension is opening the door for major hackerdom. It's trivial to change the extension and upload the file.
If you are on a Mac/Linux/Unix-based system the OS "file" command is the standard because it looks inside the file for key bytes that flag file types. http://en.wikipedia.org/wiki/File_(Unix) I'm not sure what's available for Windows, but this might help: Determine file type in Ruby
Comment: I've used this before and it works perfectly. As my Windows solution, I simply used Cygwin's `file` command.
Answer: One way of doing it, the simple way really, would be to pass the file through an image loader, preferably one that handles multiple common formats, and see if it throws an error.
The other way is to manually check the file header for common image format headers. For example, .bmp files start with BM. Other formats have their own specific markings you can use.


Bus smart ticketing systems and EMV

Question: I have recently started to study the smart ticketing systems. Most of the modern systems support the use of EMVCo standards for buying tickets in the bus. Also, in each bus usually there are more than one devices from which a passenger can buy a ticket.
In my opinion these devices exchange data related to the bank cards, e.g. the validator must send some data to the main pc in the bus (on board unit, obu) when a passenger buys a ticket, and of course all the data are sent to the back office.
I think that these data must be encrypted to prevent eavesdropping.
Does anyone have any idea if there are any standards that specify the type of this encryption?
I ve read about PCI standards and point to point encryption  but I am not sure that these are applicable in smart ticketing systems.
Answer: As far as security goes, there's no specific standard that I'm aware of. Smart ticketing systems are a varied bunch, but they usually consist of:

Some sort of passenger identifier, e.g. an RFID / NFC card or device.
A point-of-sale (PoS) device, such as a scanner on a bus or in a station.
A communications link between the PoS and the back-office.
A back-office system which processes the transactions, maintains balance and customer information, and interfaces with the payment gateway.

Most importantly, card details are usually taken ahead of time, and are usually stored only in the back-end system.
The specific configuration is largely dependent upon the transport type. While a metropolitan bus service could operate a 3G cellular link back to the office, a cross-country train may have more difficulty in rural areas where cell towers are few and far between.
The normal mechanism that I've seen is that the list of valid card IDs is synced onto all PoS systems periodically (e.g. via WiFi at a station) so that individual cards can be identified as "valid" without having to call home every time someone swipes in. Each transaction is locally cached and then transmitted when a connection is available.
The security of the actual communications is entirely up to the implementation. It may rely entirely upon data-link layer encryption (e.g. WPA2), transport layer security (e.g. TLS), or may implement its own application layer security.
Of course, in the case of systems where contactless payments are performed at the PoS, the PAN may well be transmitted, and as such the communications (and PoS device) will become part of the PCI domain.
Comment: Thanks Polynomial! So, for the contactless payment you may need PCI compliance. What do you mean PAN?

Bus smart ticketing systems and EMV


How to pair Bluetooth device with MacBook Pro after forgetting it?

Question: I accidently told my MacBook Pro to forget a Bluetooth device. I have no idea how to bring it back. How do I bring it back?
Answer: Using "System Preferences" -> "Bluetooth" you should be able to add or "pair" the device in question as long as the device is in range and broadcasting a signal. You might need to turn the device off then on again, or tell it to "pair" or "repair" before it is visible from the MacBook.
Answer: Bluetooth devices usually have "Pairing Mode".
You may have to put the device on pairing mode to be shown again in devices list in Bluetooth preferences and  be able to pair it. In headphones it is usually done by turning the device off and turning it on again by holding the power button for a certain amount of seconds.
Check your device's catalog. You'll definitely find it there.


Cannot turn off Caps Lock on lock screen

Question: Occasionally my son hits the keyboard and presses Caps Lock while the computer is locked. When I try to login I cannot. I try to turn off the Caps Lock but it's not working, the light indicator on the button is always turned on. I'm not sure if it matters but I am using Apple Aluminium Keyboard. The only solution to login is to restart the computer.
I am not really sure how I can debug this issue, but when I Ctrl+Alt+1 I see that the Caps Lock is not turned on when trying to type my username.
Answer: Try hitting CTRL + ALT + F1 to switch to TTY1 and then hit the caps lock key to see if it lets you change it then. If that works you can log back in by hitting CTRL + ALT + F7 on your keyboard.
If that doesn't work, there is something else you can try. I was having a lot of issues and kernel panic problems with some of the recent Linux 4.4.x kernels that were being pushed through updates. Updating to kernel 4.8.x fixed pretty much all of them. To update your kernel try the following:
sudo apt update
sudo apt upgrade -y
sudo apt install --install-recommends xserver-xorg-hwe-16.04 -y

Hope that helps. Good luck!
Comment: I've already tried the trick with going to TTY1, but it didn't work. Updating the kernel seems to fix the issue. If my Caps-Lock is turned on and I lock the session it is automatically turned off. If I press it on the lock screen it toggles properly (the led light is not turning on, but that's not an issue).
Comment: Excellent! Glad we got it fixed for you!
Comment: It turns out the problem is not fixed, just occurring less often.


Why did Mike Teavee crack the code?

Question: In Charlie and the Chocolate Factory (specifically the film), Mike brags (sort of) about the fact that he cracked the code for the Golden Tickets.  He then explains that he hates chocolate.  Why, then, did he crack the code?  Is there any evidence that he liked other confectionary or was challenged by his friends to do it?  I'd prefer a reason supported by evidence from the original book, then the 2005 film, and at last resort the original Willy Wonka film with Gene Wilder.
Comment: In the 2005 film, I always interpreted as Mike considering it a game challenge. Many video games are centered around deciphering patterns, puzzles and codes. Add in his hubris and desire to show people up and make them jealous.
Comment: I don't believe Mike discussed how he finds the ticket in the book; I believe that plot point only came in the 2005 film.
Comment: @alexwlchan that was what I also thought.  What I am looking for though is an explanation of why he found the ticket in the first place according to any of the three sources.
Comment: @phantom42 - You are correct
Answer: There is no indication as to how Mike Teevee/Teavee managed to secure his ticket in either of the other two main sources; the original Roald Dahl books or the 1967 Gene Wilder film.
The decision to make Mike an angry (but brilliant) techno-nerd appears to have been taken by the 2005 film's writer John August and is an original creation for the Tim Burton film.
Given that we're shown his obsession with video gaming, it's reasonable to assume that he saw locating the ticket as an intellectual challenge on a par with the sorts of puzzles you get in computer games and nothing more.

UPDATE : I asked the film's scriptwriter John August (via twitter) why he'd chosen to present Mike Teavee this way. He's confirmed my original assumption:
Comment: Muhahaha, now we know your _real_ name is "Answerguesser40", so much for anonymity!
Answer: As I see it, this is the main theme of the whole story.
To do something, but do not want it from the heart.
The four children (in the movie 2005) that found a ticket (without Charlie) did it all because of base motives.
One because he is greedy/hooked on chocolate. (I assume he even did not taste it anymore).
One because her mother suggested it and she was trained to master every challenge, but she even say, that she not like chocolate.
One because she want to have everything, that makes her special and envied by other children.
And Mike TV because it was on the TV and he is intelligent enough and has no other things to do, as to solve the puzzle, which way in which store the tickets would probably take, and where he has to buy a chocolate. And by proofing his theory, he "accidentally" get one ticket...
Only Charlie want to have this ticket, because he want to see the factory! (And if one is extra precise, not because he want to see it, but because he want to show it to his grandfather).
Comment: Gotta say if proving you're clever enough to crack a complex puzzle is a base motive, I'm struggling to come up with a high minded one.
Comment: @Jontia I assume it depends of the behavior. Mike is a poser. All should know, that he is this smart. He could use it "to save the world" but he decided to take the chance of a factory visit from another child, who really want to go there
Comment: @Jontia if he was intelligent enough to solve the problem, then he should be intelligent enough to make it like the magicians and "write it on a piece of paper, put it in an envelope and store it by someone who is trusted" to proof his solution ;)
Answer: I think he wanted to go to the factory. Then he figured out that the most likely way to get a golden ticket was to check the manufacturing dates. Since he was playing video games, he got smart and was able to think of that idea. He got so smart even that he felt like you could be smart enough to figure that out which was beyond the skills of the other 4 children who went to the factory and were probably normal people and still be a retard. I think they made it so that he hated chocolate and ending up getting only one to demonstrate how powerful that trick was.

Why did Mike Teavee crack the code?


ubuntu wont find my tranmission to download torrents

Question: I recently installed Ubuntu 12.04 and I cant download torrents. when I click the link to download and save a torrent file it doesn't give me an option to save the file it just asks me what program to open it with and I cant find transmission in all of my files to open it with. I've tried removing transmission and re installing it and two other torrent programs ubuntu offered. when viewing the list of files on my computer to select one it doesn't even list any of the programs I have installed let alone the right one. It just asks me what program to open them with and gives me no viable options to use.
Answer: Happens only on firefox. Select Choose Application > Navigate to /usr/bin > Select transmission-gtk > It will open with transmission.
Answer: Have you tried right clicking on the torrent file in the folder you saved it to, next after save, select open with other application, than in the window to open with, just start typing in the word transmission (no need for ctrl+f), and make sure the box below is checked to always open with.
Otherwise, as long as it is installed correctly, there should be no other reason why it is no on the list