Should I have feedback dialog after process is finished?

Question: My website allows users to create invoices (and also automatically generate pdf files of the invoice) and send it to their receiver via email. Should I have a feedback dialog with an "ok" button that users have to click to close dialog the or should it automatically disappear a few seconds after the process has finished to let the user know that they have done all they needed to do.
Answer: Do not add a dialog with an OK button. Dialogs are intrusive and should only be used when an action is required from your users.
In stead you could go with a confirmation bar. See the example below. it's a screenshot from a project I'm working on. After creating an item the user returns to the list view of all of his items. Above the list there is a bar that confirms to the user that he has successfully completed his action.
-

This way your users can continue with other tasks (if any) or leave this window all together without any disruptions.
An alternative might be to have the confirmation as a final 'step' in your process. In that case the OK button is a part of the flow.
Answer: It is better to show that something is busy and confirm it's done afterwards. This way nothing is hidden and no message will show up unexpectedly. Needless to say this shouldn't block the application. Instead, reserve space for a status indication:

[8:58] Sending 5 invoices...

You can make it clickable or add a small button to show the progress, recipients etc.
When it's done, use the same space to show it is finished:

[9:00] 5 invoices sent

The time helps to identify the age of the message. Add a small (x)-button to close the message but don't hide it automatically after a period because than the message could be missed.


Protect against DDoS attacks?

Question: I am going to make a game server which involves port forwarding, I also heard that people can DDoS attack. When they DDoS attack, what is it that they attack, the internet or the computer? Also, what is a DDoS attack anyway? How can I protect against them?
Comment: Sailorman - please read the huge range of questions we already have here on ddos. They will answer a lot of your questions.
Comment: The question in the title and the text are not the same. Do you want to know how to protect agains DDoS or what a DDoS attack is?
Answer: In normal TCP communications, your server* is quietly listening on the network, expecting packets with the SYN flag set.  These SYN packets come from clients initiating a request to open a new socket connection.  The server makes note of the open connection request, saves the source IP address of the sender (which is contained inside the packet), and sends a response containing both the SYN and ACK flags set back to the source IP address.  When the client receives the SYN/ACK packet, it responds with an ACK packet.  When your server receives the ACK, the socket is fully connected and the applications can start sending data to each other.
A Distributed Denial of Service (DDoS) attack is a network-based attack, where dozens or thousands of hacked computers are running malware that sends thousands or millions requests every second to the open port on your network.    A SYN Flood attack is where the malware sends only SYN packets.  The hacked computers write a random address in each packet as the source IP address.  Your server doesn't know they're not valid addresses, so it just tries to reply to them.
But the attacking computers are running malicious code.  They never get the response (which your server politely sent to the random source address), and they never send the ACK packet your server is waiting for.  This leaves the partially open socket just laying around in your server's memory, waiting for the request to complete.  Your server has only a finite capacity as to how many partially open sockets it can keep around; and only a finite amount of time to respond to them.  It cannot handle a queue of a million half-open sockets.
But since your server trusts that all socket requests are coming from legitimate users, it tries its best to respond to them all, because that's what it's supposed to do.  It quickly fills up under the flood of traffic.  If you're lucky, it sends RST packets back to everyone trying to connect once the queue is full, politely denying them service.  If you're unlucky, your network card or server chokes on the overload and crashes.  Either way, your legitimate users are caught in the flood, and can't get to your server, either -- thus they are "denied service" (hence the name).
Unfortunately, there is very little that you as a server owner can do about a DDoS attack.  The packets all come from random addresses, and don't contain the actual IP address of the computer that sent them, so there's no easy way to follow them back to the attackers.  With enough money, you can hire a company to help keep your site up through various hosting and network tricks. And there are network appliances that make an attempt to identify and exclude SYN flood packets.  But even they have their limits, as Brian Krebs found out a few weeks ago.
* I wrote server to keep the description simple, but this attack will flood any network device that is listening on that port.  If you're using a typical home router and port forwarding to your server, the router's more limited memory will be flooded, and the router will likely crash before your server does.
Comment: @JohnDeters You would be very surprised how bitter gamers can get and what they'll resort to. DoS attacks against personal networks is not uncommon (at least for video games that involve P2P connections). After all when you're salty about losing in a game, it's the next best thing after reaching your hand through the screen and punching someone in the face.
Comment: What happens when the router crashes? What can I do once it crashes.
Comment: Your router will probably reboot itself after a crash; but you might have to reboot or reset it manually, or even unplug/replug the power cord.  But as long as the DDoS attack continues, you'll be offline until it's over.  And this is all based on the idea that someone would go to the trouble of DDoSing your private gaming server, which is a very unlikely occurrence.  I wouldn't spend any more time worrying about it unless it actually happens to you.
Comment: Yeah, I wasn't thinking about vengeful gamers.  And since you can buy DDoS for hire on the dark web, it now only takes an idiot with a bitcoin to make life miserable for the home-hosted game server.  Sigh - never underestimate human stupidity...
Comment: FWIW, all those DDoS for hire onion sites are scams (as are the hacking services, hitmen, etc). Of course, there _are_ quite a few DDoS for hire sites outside of the "dark web" that market themselves as stress testing services.

Protect against DDoS attacks?


SQL injection in firebase

Question: Firebase is a noSQL database and works differently from SQL, so how we can sanitize the data? For example, i cant seem to find mysqli_real_escape_string command for firebase database even in firebase documentation. Can anyone advice me on this? Would also appreciate if anyone can drop me a forum link about this and etc. Hungry to know about this :> Thanks
Answer: Firebase Realtime Database (and Firestore) isn't vulnerable to SQL injection attacks.
First, it's helpful to understand what SQL injection attacks are.  Please read this article to help with your understanding.  Note that with SQL injection, the root problem is that the developer writes code has to build a SQL command to run, and the build (if not performed correctly) can be subtly modified by an attacker to do what they want.
With Firebase, you don't build a SQL command (or any string command composed of various parts that require escaping) in order to execute a query.  Instead, you use an API provided by the SDK, and pass strings that are automatically managed by the API.  This means that SQL injection is not an issue here.  There is no SQL injection because there is no SQL (it's noSQL after all!).
Ensure that end users have no more access to data than they are entitled, you need to use Firebase Authentication and implement security rules that describe who has access to what data.
Comment: Hi, appreciate your reply :D I know that firebase is json format and it does not require any SQL statement. However, can an attacker can use firebase command to extract the data from the firebase? maybe they will type something like this in the textbox var.on('value', snap => div.innertext = snap.val()); ??  I am not really familiar with firebase yet so i hope i am not asking stupid question but again thanks for explaining it to me :>
Comment: What you're describing isn't anything like SQL injection.  You need to take your own precautions to ensure that malicious scripts don't alter the end user experience.  If you want to ensure that end users have no more access to data than they are entitled, you need to use Firebase Authentication and implement security rules that describe who has access to what data. https://firebase.google.com/docs/database/security/
Comment: So it is safe to say that attackers are not able to mess with firebase database(at least on the front-end e.g website) as long as we set the rule types properly?
Comment: It's up to you to define those rules, yes.

SQL injection in firebase


what is the meaning of "bragging rights" in the following?

Question: what is the meaning of "bragging rights" in the following?
"They get a banner to hang in the gym and bragging rights over the surrounding towns."
thanks in advance
Comment: http://www.dictionary.com/browse/bragging-rights?s=t
Answer: It means they get not only a banner to hang in the gym but also an opportunity to speak proudly (brag) about their achievement. The surrounding towns don't have this right to brag because there is only one winner.


How to change scope from Global to Store view for Price Attributes (By Default)

Question: I want to change the scope of price attributes which is Global by default. .actually i need to change different price for same products in different store views. Is it possible to change scope from Global to Store view for Price Attributes.
Answer: Magento does not allow setting a per store price. However You can do this on a per website basis.
To do so, you need to go to System->Configuration->Catalog->Catalog.
Then in the tab "Price", set price scope to Website instead of global.
On the product edit page, you can then set the scope on the upper left side to your website and then enter a per website price.
There are a free extensions which will allow you a per store price, and this one is paid.
Comment: but this extension don't work properly in the list or category page...
Comment: contact from their support team


Ubuntu one deleted files in cloud

Question: I stopped syncing a folder in one pc and then deleted it but the folder is deleted from the ubuntu one cloud storage as well, what went wrong?
Comment: How did you 'stop syncing' it exactly?
Comment: I right clicked the folders that where synced and clicked on stop syncing, then I deleted them from the pc. I'm guessing maybe cause there was no other pc that had downloaded those folders yet? It shouldn't do that I think but just maybe that's how it works?
Answer: Right-clicking on a synchronized folder in Nautilus, and choosing "Stop synchronizing on Ubuntu One" will result in the folder and its contents being removed from the server. It doesn't mean "only remove the connection for this computer, to this folder."
If you wish to unsubscribe a synchronized folder on a computer, you can do so by opening the Ubuntu One control panel application from the launcher, and unchecking the box under the 'Sync Locally?' column on the Folders tab, for the folder you wish to no longer sync to the local machine. Or, you can also use the u1sdtool utility on the command line, to unsubscribe a folder or share.
Comment: Thx, it is rather misleading though, I think. it'd be better if at least there be a warning making sure the user want to delete the files from the cloud. If I had another PC with the folder synced would it also delete from the cloud and stopped syncing on the other PC?
Comment: Yes, the stop synchronizing context menu item in the file manager will delete it from the server, and so no other machines will be able to synchronize it either. they will no longer know about it, but the files won't be automatically deleted from them, if they did have it synchronized.

Ubuntu one deleted files in cloud


What happens when the Sitecore license got expired?

Question: (In context of on-prem)
Imagine my SC license got expired, what happens next?
Will all my envs be unavailable or unusable? And is SC company able to postpone this (or vice-versa, block my envs just by pressing a button) remotely?
Answer: Afaik Sitecore has Production and Nonproduction license. The production license is not expiring. Usually few months before is expiring you will receive from their sales representative calls or emails to inform you about license is expired.
Non production license or partner license will expired and you will receive a yellow screen when the license expired .

For the non production environment you can install a module which it shows a Content Editor Warning message or/and sends an email to notify when the Sitecore license is about to expire.
More information about License Expiration module you can find here: https://github.com/KayeeNL/Sitecore.License.Expiration.Module
Comment: Ah yes, the familiar sting of that error page hits good.
Answer: While initializing application, Sitecore checks it's license validity. If it is expired, you will get runtime error with error saying Required License is missing.
So your environments will be unusable along with CMS site.
To make any change to this, you will have to update lincense.xml file on server. I hardly think it can be handled without connecting to servers.
Note: This is a generic error that shows up even when your license path is configured incorrectly. So it is difficult to understand from this error that your license has expired.
Answer: If your Sitecore license expires on your environment, it can have significant implications for your website's functionality and availability. Here's what could happen and steps to renew your license:

If your license expires, you may lose access to the Sitecore Content Management System (CMS), making it impossible to create or modify content until the license is renewed.

You will see the yellow page on your site related to the license.

Without an active license, you won't be eligible for technical support from Sitecore, and you won't receive updates or patches.

Note: Sitecore typically provides notifications well in advance of license expiration through the Sitecore License Portal or via email to the registered license owner. These notifications serve as reminders to renew the license before it expires.
To renew your Sitecore license:

Log in to the Sitecore License Portal using your credentials. This portal allows you to manage your licenses, including renewals.

Follow the instructions provided in the License Portal to renew your license. This typically involves selecting the appropriate renewal option and providing payment information.

After completing the renewal process and payment, you should receive confirmation of the renewed license. Ensure that the new license file is applied to your production environment.

Once you receive the renewed license file, upload it to your Sitecore instance. This typically involves replacing the old license file with the new one.

After updating the license file, verify that your Sitecore instance is functioning correctly and that all features are restored.

If necessary, communicate with relevant stakeholders, such as your development team or clients, to inform them of the license renewal and any impacts on website functionality during the renewal process.

Hope this helps.


What is the name of this bowing technique for strings?

Question: https://www.vsl.co.at/en/Playing_Techniques-Right_Hand/Violin-Ricochet

It is basically playing all 4 strings consecutively creating an "undulation". HOWEVER, not in the staccato slurred style, just the slur (not staccato i.e. not ricochet bowing)
Comment: As written it could be *spiccato*, *sautille* or *saltato/saltando*. Written **without** the staccato-dots it's just *legato*.
Comment: In case my answer isn't clear on this, notation isn't generally how we would specify a technique, because sometimes different techniques might be chosen by different players to render the same notation. Technique questions would ideally be accompanied by audio or even better, video of a player performing the technique in question.
Comment: @user71207 Please explain. Why have you written staccatos if you don't want staccato? What are you trying to do?
Comment: @OldBrixtonian I don't think the asker wrote that music but what is written there is "play each group of notes under a slur with one bow stroke but also articulate each note". The "staccato" dot does not only indicate stacccato, as in this case.
Answer: To be precise, the notation generally doesn't (and shouldn't) specify an exact technique. The notation should specify an intended sound and the player(s) would determine which technique is best to create the sound based on the context.
Modern notation style and interpretation of the quoted passage is that each group of four notes is to be played with a single bow stroke (the slur) but the notes should also be articulated separately (the staccato dots). This is a bit of a challenge because the most common way to re-articulate on a string instrument is to reverse the bow.
One way to render this, especially at high tempos, is to basically bounce the bow off the strings while performing a single up or down bow. This technique is called saltato and if I'm reading it correctly (I don't know how to play this technique) it is somewhat analogous to how a drummer bounces a stick from a drum head during a two or three stroke roll.
A composer can attempt to specify an exact technique in a score, but unless the composer is an expert on the instrument in question and/or consults with players, it's often best to specify the desired sound and let the players do what they do best. This is one danger of using sample libraries for mock-ups: the composer could get lost in the weeds about the different samples articulations as opposed to focusing on the end result they desire.
Answer:
It is basically playing all 4 strings consecutively creating an "undulation". HOWEVER, not in the staccato slurred style, just the slur (not staccato ie not ricochet bowing)

It is called "arpeggio" whether it is staccato or legato or whatever articulation is indicated. It can also be done over 3 strings.
Here are two examples from famous violin pieces by Bach and Paganini:
Answer: it's called portato, accent the attack of each slurred note within a single bow stroke. Here is an example:
Comment: You have misunderstood the question. The bow stroke he is asking about is called arpeggio. See my answer.


Refactoring an application

Question: If you had to fix and stabilize a MVC application, where would you start: the Model, Controller or View? The problems are spread equally throughout the application,  with bad programming practices that make it hard to add functionality.
The application is written in PHP if it makes a difference.
Answer: Fix the model, because it changes more slowly than the view, and because the controller depends on the view. You get better return on investing in good stable model code.
Answer: Start with the model because it is the foundation of your application. It is also easier to write tests for. It is tricky to write unit tests for controllers, though it can be done, and even harder for views. However, once you have a really solid and encapsulated API for your model, it is relatively easy to layer a new controller and view framework over top of it. If you want real separation from the view, build your model as a REST API, and implement your controller entirely in AJAX. That would be moving toward a more service oriented architecture with completely client-side based views. That's how much of Google's stuff works.
Answer: Id' say model, controller, view, in that order. Because the most fundamental logic in in the model, followed by the controller (at quite a distance, usually)

Refactoring an application


How can a Hash Set incur collision?

Question: If a hash set contains only  one instance of any distinct element(s), how might collision occur at this case?
And how could load factor be an issue since there is only one of any given element?
While this is homework, it is not for me. I am tutoring someone, and I need to know how to explain it to them.
Answer: Let's assume you have a HashSet of Integers, and your Hash Function is mod 4. The integers 0, 4, 8, 12, 16, etc. will all colide, if you try to insert them. (mod 4 is a terrible hash function, but it illustrates the concept)
Assuming a proper function,  the load factor is correlated to the chance of having a collision; please note that I say correlated and not equal because it depends on the strategy you use to handle collisions. In general, a high load factor increases the possibility of collisions. Assuming that you have 4 slots and you use mod 4 as the hash function, when the load factor is 0 (empty table), you won't have a collision. When you have one element, the probability of a collision is .25, which obviously degrades the performance, since you have to solve the collision.
Now, assuming that you use linear probing (i.e. on collision, use the next entry available), once you reach 3 entries in the table, you have a .75 probability of a collision, and if you have a collision, in the best case you will go to the next entry, but in the worst, you will have to go through the 3 entries, so the collision means that instead of a direct access, you need in average a linear search with an average of 2 items.
Of course, you have better strategies to handle collisions, and generally, in non-pathological cases, a load of .7 is acceptable, but after that collisions shoot up and performance degrades.
Answer: The general idea behind a "hash table" (which a "hash set" is a variety of) is that you have a number of objects containing "key" values (eg, character strings) that you want to put into some sort of container and then be able to find individual objects by their "key" values easily, without having to examine every item in the container.
One could, eg, put the values into a sorted array and then do a binary search to find a value, but maintaining a sorted array is expensive if there are lots of updates.
So the key values are "hashed".  One might, for instance, add together all of the ASCII values of the characters to create a single number which is the "hash" of the character string.  (There are better hash computation algorithms, but the precise algorithm doesn't matter, and this is an easy one to explain.)
When you do this you'll get a number that, for a ten-character string, will be in the range from maybe 600 to 1280.  Now, if you divide that by, say, 500 and take the remainder, you'll have a value between 0 and 499.  (Note that the string doesn't have to be ten characters -- longer strings will add to larger values, but when you divide and take the remainder you still end up with a number between 0 and 499.)
Now create an array of 500 entries, and each time you get a new object, calculate its hash as described above and use that value to index into the array.  Place the new object into the array entry that corresponds to that index.
But (especially with the naive hash algorithm above) you could have two different strings with the same hash.  Eg, "ABC" and "CBA" would have the same hash, and would end up going into the same slot in the array.
To handle this "collision" there are several strategies, but the most common is to create a linked list off the array entry and put the various "hash synonyms" into that list.
You'd generally try to have the array large enough (and have a better hash calculation algorithm) to minimize such collisions, but, using the hash scheme, there's no way to absolutely prevent collisions.
Note that the multiple entries in a synonym list are not identical -- they have different key values -- but they have the same hash value.

How can a Hash Set incur collision?


Show that $X = \{ (x,y) \in\mathbb{R}^2\mid x \in \mathbb{Q}\text{ or }y \in \mathbb{Q}\}$ is path connected.

Question:
How do I show that $X = \left\{ (x,y) \in \mathbb{R}^2 \mid x \in \mathbb{Q}\text{ or }y \in \mathbb{Q}\right\}$ is path connected?

Note that $X$ is a topological space with subspace topology $\tau = \left\{ U \cap X \mid U\text{ is open in }\mathbb{R}^2\right\}$.
I only know two things (with respect to path connectedness):

A topological space $X$ is path connected iff for every $p,q \in X$, there is a continuous function $f: [a,b] \to X$ with $f(a)=p$ and $f(b) = q$.

Continuity $f$ is defined as for every open set in $X$, its preimage is open in $[a,b]$ (with subspace topology induced by $\mathbb{R}$ (with standard topology) )

Suppose $X$ and $Y$ are two topological spaces and $f: X \to Y$ is a continuous surjection.
If $X$ is path connected, then $Y$ is path connected.
Comment: I vaguely seem to recall answering nearly this same question here about a year ago.
Comment: My answer for http://math.stackexchange.com/questions/516916/mathbbr-mathbbq-and-mathbbr2-mathbbq2-disconnected can be adjusted to apply it to your problem if you choose $\alpha$ and $\beta$ rational. Or you can look at Brian's answer there and replace irrational by rational and vice versa whenever necessary.
Comment: I've done some editing on the title.  For now I'm not going to clean up the rest of it.  But for stackexchange, I'd never have been able to imagine that people's notions of good ways to use TeX or MathJax were so bizarre.
Comment: @Michael: I had the same memory, but a quick Google search failed to turn up an exact match.
Answer: HINT: You can get from any point of $X$ to any other point of $X$ by a path consisting of at most three line segments, all of which are either horizontal or vertical.
Answer: Let $A=\left(\mathbb{R}\times\mathbb{Q}\right)\cup\left(\left\{0\right\}\times\mathbb{R}\right)$ and $B=\left(\mathbb{Q}\times\mathbb{R}\right)\cup\left(\mathbb{R}\times\left\{0\right\}\right)$. Show that $A$ and $B$ are path-connected (given 2 points in $A$, you can connect them with a path consisting of 3 smaller paths, something like horizontal-vertical-horizontal, and similarly for $B$). Now, $X=A\cup B$ and $A\cap B$ is not empty (for example $(0,0)\in A\cap B$)). From an easy theorem you probably know, these imply that $X$ is path-connected.
Comment: what is the theorem you are referring to?


Reference for variational characterization of quantum trace distance in infinite dimensions

Question: Consider two density matrices $\rho$ and $\sigma$. It is well known that for finite-dimensional systems, the trace distance $\frac{1}{2}\Vert \rho-\sigma \Vert_1$ has the variational characterization
$$\frac{1}{2}\Vert \rho-\sigma \Vert_1=\max_{P: 0\le 0 \le I}\mathrm{tr}\left[ P(\rho-\sigma)\right]$$
(e.g., see Lemma 9.1.1 in Wilde "Quantum information theory"). Is there a reference for a similar variational characterization for infinite-dimensional Hilbert spaces?
Comment: This is two years late but I'll comment anyway. Would this not be the same definition for the infinite case. I do not see anything intrinsicaly requireing that $\rho$ and $\sigma$ have finite rank. If you now, after two years, have a conclusive answer to your own question I would love to read it.
Answer: Here is a toy example. Let $\rho = \sum_{n = 0 }^{\infty}\lambda_{i}|\psi_{i}\rangle \langle\psi_{i}|$ where $|\psi_{i}\rangle$ is some infinite dimensional Hilbert space. Could be the number states for example. Now let $\sigma = 0$. Let us compute the simple trace distance $\| \rho - \sigma\|_{1}$.
$$  \|\rho - \sigma\|_{1} = \|\rho\|_{1} = max_{\substack{P}}Tr\{P\rho\}. $$
We know that $Tr\{P\rho\}\leq 1 $ for any projector $P$, if we use the projector
$$ P^\prime = \sum_{n}|\psi_{n}\rangle \langle \psi_{n}|$$ notice that we get
$$ Tr\{P^\prime \rho\} = 1.$$
Hence $ max_{\substack{P}}Tr\{P\rho\} = 1$ and the maximizing $P$ is $P^\prime$.
As you can see, things work out here and we did not need a new variational definition for the trace distance.


Can you identify immersionRC transmitter crystal?

Question: Please identify this crystal. It's from immersionRC 600mW video transmitter. Labeled S80003H. I have another one labeled S80009F from same brand transmitter 100mW, they are same, whats difference?
Answer: While I haven't seen anything with that exact marking,
I speculate that it is perhaps a cylinder type 8.000 MHz crystal oscillator,
more or less interchangeable with the 8.000 MHz
AB308-8.000MHZ,
MCRJ308000F18300HZH,
ECS-80-18-10X,
etc.
I speculate that the S80003H is perhaps exactly the part model as the S80009F,
but manufactured in a different week.
And so with exactly the same part number
except for the date code.
If, hypothetically, this company uses
International Rectifier's date code system,
then

"3H" indicates the 8th week of 2003 or 2013, and
"9F" indicates the 6th week of 1999 or 2009.


Is it possible to add a description on the bottom of a carousel slider on a SharePoint modern page?

Question: I am using a modern SharePoint page and I have added a carousel slider using a highlighted content web part, but not sure how to add a description to the bottom.
Answer: Currently there is no OOB way to add description using highlighted content web part with carousel slider.
You could add your own idea via User Voice.


How to automatically copy pictures with resizing to some directory?

Question: I'd like to share some pictures with someone using Dropbox.  However, I'd prefer to downgrade the resolution of them (they will only be viewed on screen on the other side, so there's no need for big resolutions).  I can resize them easily with ImageMagick's convert and sync them to some folder in ~/Dropbox using rsync, but I'd like to combine these features.  My dream workflow looks like this: I copy the images to, say, ~/to-share, the new (and only new!) files are automatically converted with downgrading the resolution to ~/Dropbox/to-share.  A less ideal solution includes running some script to do the syncing (after copying).
Does there exist anything like that?
Answer: Some bash scripts that should be mostly correct, but of course should be verified:
If you want to watch the directory for new files, with an if just in case:
inotifywait -m -e create ~/to-share/ | while read line
do
    if [ ! -a ~/Dropbox/to-share/r$line ]; then
        convert "$file" "~/Dropbox/to-share/r$line"
    fi
done

If you want to just run the script repeatedly:
while true; do
    for filename in ~/to-share/*; do
        if [ ! -a ~/Dropbox/to-share/r$filename ]; then
            convert "$file" "~/Dropbox/to-share/r$file"
        fi
    done
    sleep 2;
done


Can I change my affiliation after re-submitting the manuscript before acceptance?

Question: One manuscript has been submitted after the 1st revision, and I am the 4th author. I didn't contribute to the work initially, so my name was not there on the first submission. Whereas during addressing comments from reviewer, I contributed and hence my name added as 4th author during re-submission. However, there is a mistake about my affiliation in the re-submitted manuscript. The manuscript is yet to be accepted. If it will accept, then can I change my affiliation? If so, in which stage I can do that? Is it possible during proof-reading? I am afraid if we inform the editor about this before acceptance, he won't take it well and reject the manuscript due to this silly mistake. As this particular query is not available in the 'Guide for Authors' or anywhere in the journal, I can't understand what should I do.
Answer: Yes, you can. Affiliations change, sometimes in the middle of submission. The "author information" side does not affect the "accept on the merits" side.
Answer: Yes, you can usually change your affiliation after acceptance, during the proofs stage.
There's no need to inform the editor that there is an error in your affiliation, but you should inform them that there is another author. If they're paying attention, they should notice themselves, and investigate (because extra authors is a potentially fraught thing that need to be clarified). If you inform the editor, then you can head off the editor's request for clarification if/when they discover it.
Answer: Yes, you can definitely change it later on. Most important thing is that you will need to be on top of this with the main (first/last) author who is taking care of the submission and proofreading. It's rare that the middle authors concern themselves with the final stages of getting the manuscript ready for publication, so make sure you see a next version of the manuscript where it is correct or send them this information ASAP and then again when you hear the manuscript is accepted for publication etc.


Decode File From SdCard android to avoid out of memory error due to large bitmap or setImageURI

Question: Avoid outof memory error for selecting large image file from sdcard or from resource.
how can i tackle with this problem?
Answer: To avoid error while selecting file from sd card in bitmap or using setImageURI to sdcard use following method:
public static Bitmap decodeScaledBitmapFromSdCard(String filePath,
        int reqWidth, int reqHeight) {

    // First decode with inJustDecodeBounds=true to check dimensions
    final BitmapFactory.Options options = new BitmapFactory.Options();
    options.inJustDecodeBounds = true;
    BitmapFactory.decodeFile(filePath, options);

    // Calculate inSampleSize
    options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight);

    // Decode bitmap with inSampleSize set
    options.inJustDecodeBounds = false;
    return BitmapFactory.decodeFile(filePath, options);
}

public static int calculateInSampleSize(
        BitmapFactory.Options options, int reqWidth, int reqHeight) {
    // Raw height and width of image
    final int height = options.outHeight;
    final int width = options.outWidth;
    int inSampleSize = 1;

    if (height > reqHeight || width > reqWidth) {

        // Calculate ratios of height and width to requested height and width
        final int heightRatio = Math.round((float) height / (float) reqHeight);
        final int widthRatio = Math.round((float) width / (float) reqWidth);

        // Choose the smallest ratio as inSampleSize value, this will guarantee
        // a final image with both dimensions larger than or equal to the
        // requested height and width.
        inSampleSize = heightRatio < widthRatio ? heightRatio : widthRatio;
    }

    return inSampleSize;
}

Comment: For more info use this doc: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html
Comment: This is for in case image size is very large like 1200x800 and you wants to  display thumbnail of this images, if you directly use setImageURI or get directly bitmap from sdcard you will get outofmemory error.
Answer: you can use inSampleSize to reduce memory occupied.
Here is code
public static Bitmap decodeAndResizeFile(File f) {
    try {
        // Decode image size
        BitmapFactory.Options o = new BitmapFactory.Options();
        o.inJustDecodeBounds = true;
        BitmapFactory.decodeStream(new FileInputStream(f), null, o);

        // The new size we want to scale to
        final int REQUIRED_SIZE = 70;

        // Find the correct scale value. It should be the power of 2.
        int width_tmp = o.outWidth, height_tmp = o.outHeight;
        int scale = 1;
        while (true) {
            if (width_tmp / 2 < REQUIRED_SIZE || height_tmp / 2 < REQUIRED_SIZE)
                break;
            width_tmp /= 2;
            height_tmp /= 2;
            scale *= 2;
        }

        // Decode with inSampleSize
        BitmapFactory.Options o2 = new BitmapFactory.Options();
        o2.inSampleSize = scale;
        return BitmapFactory.decodeStream(new FileInputStream(f), null, o2);
    } catch (FileNotFoundException e) {
    }
    return null;
}

Here, it will decode image using inSampleSize and this code will find the best inSampleSize values for you.
It worked Fine for me.
if you don't want to use above code, You can also use bitmap.recycle() and System.gc() to release unused memory.But, above one works fine for me. You can use either of the two.
objbitmap.recycle();
objbitmap = null;
System.gc();

Hope, this may solve the issue!
Answer: This depends on if you know what size you want to end up with or not.
If you know the size:
See the answer by Android_Craker.  It is a solid approach to the problem.
If you don't know the size:
In this case you want the image to be as large as will fit in memory.  The solution is to loop over the downsample until you find a size that fits:
    BitmapFactory.Options options = new BitmapFactory.Options();
boolean done = false;
int downsampleBy = 1;
Bitmap bitmap = null;
while (!done) {
    options.inSampleSize = downsampleBy++;
    try {
        bitmap = BitmapFactory.decodeFile(filePath, options);
        done = true;
    catch (OutOfMemoryError e) {
        // Ignore.  Try again.
    }
}


Can Wrye Bash's merge .esp function be used together with Steam Workshop Mod Manager?

Question: I have a ridiculous number of mods active, and I'd like to download more using Steam Workshop (which has better quest mods as compared to Skyrim Nexus). However, I don't know if merging .esps will cause any conflicts with the Steam Workshop mod manager.
Comment: Do you mean the Mod Manager from the Skyrim Launcher? Or where you download the mods via Steam Workshop?
Comment: Yes, steam's mode management function
Answer: It can be done. Mods from the Workshop are just like mods from any other site except they are directly dropped into your data folder. But because of the way Steam Workshop updates mods, you will need to pay attention to a few things: Skyrim Launcher will check your Workshop subscriptions every time it's launched and merged ESPs would cause the launcher to detect a change in the mod and download the mod again.
You're fine using it as long as you (1) never use the default launcher but SKSE (for example) instead or (2) unsubscribe from the file on Steam Workshop after downloading it, which is the recommended way. You will lose the mod from your nice subscribed files list on Workshop, but you gain the ability to modify and merge the mod without issues. You can still keep the files in favorites or in a collection to keep track of them though.


Why do fighter jets fly upwards very steeply when gaining altitude when lift is optimum at around 15 degrees?

Question: Or is the thrust : weight ratio larger than one so they can fly vertically without losing speed?
Comment: Because for a jetfighter is more important "how fast" you reach a target than "how efficient". If flying straight up like a rocket is the fastest way then you fly that way.
Comment: Where does the statement "lift is optimum around 15 degrees" come from? I'm not personally familiar with that generalization.
Comment: Because they can?  P.S.  The max performance demos you see at air shows are not done on every takeoff.
Comment: Question needs clarification-- "15 degrees" of *what*?  Do you mean angle-of-attack of the wing, or something else?
Comment: Related -- https://aviation.stackexchange.com/a/56476/34686
Comment: This angle is the [angle of attack](https://i.stack.imgur.com/DNCqV.png), not the angle with the horizontal plane.
Answer: There is something called a Rutkowski Profile. Fighters are more interested in the shortest time to get to altitude, not the most efficient. The Rutkowski Profile is flown by following the path through the energy maneuverability envelope where the aircraft has the most excess specific power. This can be calculated by drawing a line that crosses (intersects) all of the specific excess power lines (Ps lines), on the envelope diagram as close to 90 degrees as possible.
Rutkowski Profile

In English,

Accelerate to get to the best (highest) Ps. In a jet, because Massflow through the engine increases thrust, this is always just below the transsonic region, about Mach 0.92, where transonic drag starts to increase.
Climb, holding airspeed, (Mach number) at just below the transonic drag point.
Reaching a certain altitude, (As I recall, in the F-4 it was around FL280-FL300), you nose over and acccelerate through the sound barrier to a pre-specified kias (again, as I recall, in the F-4 it was 610kias)
(The FL280-FL300 altitude was probably determined by the point where, as you climbed at constant Mach, the indicated airspeed slowed to L/D max.)
Then, climb, supersonic, at 610 kias until you reach maximum altitude/Mach number.
Answer: Fighter jets are blessed with a much higher thrust to weight ratio than many other aircraft due to their performance requirements for speed and acceleration.
But they follow the same rules for climbing that all other aircraft follow:  excess thrust is required to climb.
The amount of thrust required to climb is determined by the weight of the aircraft weight × sine angle of climb. There is a decrease in drag associated with reduced wing lift requirement.
Modern fighters, with a thrust to weight ratio greater than one, can literally climb straight up like rockets.  General aviation aircraft have thrust to weight ratios more in the range of 0.2 - 0.25, so they must climb at a much shallower angle or risk losing airspeed.

why climb so steeply?

Engines have a most efficient speed (RPM) too.

pitch controls speed

The most efficient way to climb is when the engine and airframe are most efficient: Vy.
So, a really hot airplane will climb at a steeper angle to control its airspeed.  The same plane could climb at the same speed by choosing a lower climb angle and a lower power setting, holding full power (and afterburners) in reserve, helping extend engine life.
Answer: It's faster, and often more efficient, for a high-powered aircraft to climb at a higher climb angle than the one that provides for the highest momentary L/D.
The simple reason is that jet fighters, while capable of supersonic flight, are normally limited to Mach 0.75-0.85 to avoid the transonic region and need for wet thrust. As long as there's thrust to spare, true airspeed will be ~same at whatever angle you climb. This is different from non-aerobatic aircraft that have to choose between climb angle and airspeed.
In ballistics, the longest range for a low-altitude projectile at given energy is achieved at a 45-degree launch angle. This holds true whether it is a bullet or a rocket. At high altitudes, the optimum angle is even higher, since it's more efficient to reach less-dense air sooner.
Winged aircraft can convert thrust to lift more efficiently than pure ballistic projectiles. However, they still do so better at high altitude. Full dry thrust aka MIL is an efficient setting for the engine, wet thrust is inefficient.
As for the efficiency of a steep climb, some basic trig. Say you're an F-16 or a Su-35 with a TWR of 1.0 wet or 0.7 dry, a L/D of ~10, and a ~300 m/s subsonic limit. If you climb at 15 degrees, you will climb at sin(15)*V ~= 75 m/s, no more. At 90 degrees, you can't gain airspeed, and will lose it to parasitic drag.
At 45 degrees, 71% of your thrust is lateral and 71% is vertical. At full dry thrust (70%), you're holding 50% of your weight with vertical thrust. As long as your L/D is at least 2, the rest is supported by lift. You can climb at 0.707*300 ~= 212 m/s, about 2.8 times faster. Your groundspeed loss, from 287 to 212 m/s, is only 26% at -75 m/s.
At L/D=10, each second of 45-degree climb will convert to (212-75)*10 = 1,380 m of range. Whether a slow climb is more efficient depends on how much a difference in L/D a shallower angle makes. To even things out, your fuel burn in a 15-degree climb would have to be ~24%, only 1/3 of the 70% setting for 45 degrees. Both heuristics and simulator experiments suggest it's not. This is before considering the effects of reduced parasitic drag the higher you fly.
In short: It's practical to climb as fast as you can, while keeping your engine and your airfoils in their efficient range.
Comment: Re first sentence-- did you *really* mean to say a "*higher*" angle-of-attack than best L/D?  "*Lower*" would seem to make more sense.  Comment informed by second set of diagrams here, and three paragraphs of text following: https://aviation.stackexchange.com/a/56476/34686
Comment: @quietflyer Gets complex in there. Generally you would use a higher than lowest-drag AoA to initiate an unrestricted climb, but at a high enough angle the AoA itself does drop. Edited, it's really climb angle that matters.


How do you determine html clicked on with javascript?

Question: Is it possible, with Javascript or some other technology to determine which hyperlink a user has clicked on, without changing the hyperlink source code.
For example:
Can you click on a 'tag' button, then click on a hyperlink hosted in a different iframe, and be able to calculate which hyperlink the user clicked on, without changing any of the source code in that iframe?
Answer: Using jQuery, you are able to set the context of your selection. i.e.
$('a', $('#iframe-id')).click(function() {...});
You can then implement an event handler that will handle the iFrame hyperlink clicks. The "this" property within the handler will allow you to interrogate the hyperlink and obtain properties such as innerText etc.
Answer: you need to put an event on each a link ,
and then you will get all the information about the specific click.
this will work only in the some document,
so if you try to do a test between the link inside an iframe and a link in your page you will not get an event for the iframe link.
in order to attach the event for all link you need to run on all the links in the page ,
the best way to do that is by jQuery selector. or other js framework like YUI
$("a").click(function () {
      alert('')
});
getElementsByTagName("a") - will give you all the links in the page.
Answer: I just thought of a solution, would this work, or are there other options?
The solution would be to proxy the content of the iframe soruce page, replacing href's with code to call a javascript function which would identify which href was clicked on.
This could then be used in conjunction with the tag'ing click to accurately tag a link.
This would also mean the original source, doesn't need to change at all.
Comment: You don't need to. Your page can edit the contents of the IFrame.
Answer: What do you need ?-)
If you got an iframe, you use as a target for links, you must do some server-side processing or add something to the url of the links, that you can read when the page loads ...
But detecting time of page-load requires a script in the page, that is inside the iframe, or a function which tests the availability of the elements in the page in the iframe in short intervals ...
-- but you can only succeed if the page comes from the same domain as the main-page, as cross-domain scripting is illegal and thus impossible !-)
Answer: I think it should be possible. The contents of an IFrame is accessible from the outer document (the page in which the iframe is embedded) so you should be able to add event handlers (see other answers) on those elements after the iframe has loaded.
See also Wikipedia on Iframe which gives some examples and frameworks which actually work on content within an IFrame.
Answer: Good solution to find out which element was clicked is to use event delegation. If you attach event listener to each element using a loop (over document.links or document.getElementsByTagName), you have two problems:
- browser has many listeners to maintain
- events are attached only to elements that were in the DOM when you called the loop; any element dynamically added later doesn't have an event listener.
A simple example of event delegation:
document.onclick = function(e){
    e = e || window.event;
    var t = e.target || e.srcElement;
    if(t.nodeName=='A'){
        alert( t.href );
    }
}

If you want to find clicked link inside an iframe just use iframe's contentDocument instead of document.
Answer: You can inject code into an iframe, but only if that iframe is on the same domain as the page you're injecting from, for obvious security reasons.

<button type="button" id="tagbutton">Tag</button>

Might want to cleaning-up depending on application needs (eg. to ensure the frame is always loaded before trying to bind, or that unbinding can happen, or that any onclicks from the original links are remembered), but that'd be the general shape of things.


Why can I see my breath after I pop my ears?

Question: I have this weird but reproducible thing that I can see my breath for less than a second even in hot/humid weather. The key to do that is to pop my ears - I have to do that often, it's like I'm on a flight, not sure why my ear is that way... Anyway even if I just try to force more air into my mouth, keeping it flexed (not blowing it up like a balloon)... At the moment I open mouth and let the air out I can see it. I noticed it on a hot day in the car, against the darkness of the dashboard I could see the vapor. Also just about anywhere, anytime. It's barely visible though. My friend can see his breath during or after rain (!)... I think it has something to do with pressure and relative humidity - but then why does it work in very humid weather too, also in the bathroom? If I breath out normally it does not happen at all! I'd like to know the scientific explanation (and if it's normal or there is something wrong with me).
Comment: that is interesting semi related is I can repeatedly pop my right big toe
Answer: The relative humidity of air is pressure dependent.  Your method of popping your ears involves increasing the pressure of the air in your mouth.  And if you sufficiently compress a volume of air that has a high relative humidity, you can increase the air's relative humidity beyond it's saturation limit, which causes the water vapor in the air to start to condense, producing a visible mist.
You can find videos and descriptions of this phenomenon by googling "mouth mist trick".
Comment: And there's the related fact that when you lower the pressure you lower the temperature--and what happens when you lower the temperature of saturated air?  Condensation.


Implement appointment slot booking with payment option

Question: I'm trying to implement an appointment slot booking system where people can simply pay and start chatting/calling with a professional. What I mean is that on a particular page there would be a list of professionals(for example lawyers) with some descriptive information about them. Customers could then verify themselves with email or a mobile OTP system and then pay for a slot through a payment gateway.
I understand that it is a huge ask and not actually truly a Magento use case but my client's website is already built on Magento. I understand that building this sub-platform on a web-based framework such as Laravel and then integrating with the website would make more sense but I want to check if anything on Magento would allow me to achieve the same.
A close example of what I'm trying to achieve: https://www.apollo247.com/specialties/dermatology
Thank you so much for any and all help!
Answer: It's a really and don't so hard to implement on Magento end and make sense to do if you already has everything built on Magento.
I think best one option is implement custom product type based on virtual product with related entity such a professional with prices, schedule, etc.
Alternative is have each professional as Virtual Product with own properties. You can manage all professionals as product, show them with some categories and order service.
You can restrict to pay (checkout) your product type in cart for guests and require additional verification before or simplify checkout flow with other rules.
You can do and control everything on each step


Could a Borg member survive a 'Star Trek: The Motion Picture'-type transporter malfunction?

Question: Given how durable and adaptable the Borg are, could they survive the type of transporter malfunction seen in 'Star Trek:The Motion Picture'(1979)? If so, could this Borg member reshape itself into humanoid form?
Answer: I don't think you're going to find a definitive answer to this. Note that we don't actually see the result of the transporter malfunction:

We just hear a vague description:

What we got back didn't live long. Fortunately.

So the answer to whether a Borg drone could "reshape" itself depends on the exact nature of the malfunction, which we don't know. Like Revenant said in their answer, I would guess that a Borg drone (or a member of any species) could survive a minor malfunction, but not one that caused irreparable damage.
Your question is a bit like asking: could a Borg drone survive a car crash? The answer of course depends on the exact nature of the accident, and there isn't anything special about the Borg in this regard.
Another thing to consider is that the Borg don't value the life of a single drone. From cbr.com, emphasis mine:

The Borg operate in such a way as to strive for perfection, which means they don't have much of a tolerance for defective parts. Parts, in this instance refers to Drones. When one Drone becomes damaged, it may be simpler to salvage the parts from it than to attempt reviving it and returning it to the collective. This has been demonstrated in a number of episodes of Star Trek: Voyager when Seven's parents were on a ship observing some Drones. They noted that a damaged Drone was scrapped for parts rather than repaired or healed in any way. When a Drone is infected or altered in some way by an outside force, they are removed from the collective and left to fend for themselves. This happened to a number of children (pictured) who made their way onto Voyager after being severed from the Borg whole.

So even if a drone could survive a transporter malfunction, the Borg might scrap it for parts anyway.
Answer: Yes a Borg drone could most likely survive a minor malfunction (a Borg drone was actually created by a transporter malfunction at one point).  However, this does not make the Borg special, a member of almost any species could probably survive a minor malfunction, depending on how one defines minor malfunction.
If the Borg gets liquefied how you define survive matters, the knowledge even the personality of the drone exists within the collective so while a physical body dies the personality can be copied onto a different drone at any time.
Comment: When was a Borg drone created by a transporter malfunction?
Comment: @Wikis Voyager S5E2 Drone nanoprobes from Seven combined with the mobile emitter during a transport leading to an advanced drone being created.
Comment: Isn't the whole idea of the hive mind that no single one drone has a unique personality? The only times I've seen personality have been in rogue drones that are disconnected from the hive, of not able mention, 7 of 9.
Comment: When I say "transporter malfunction", I'm talking about the kind that causes irreversible damage to the matter of the living thing that's being transported.
Comment: @Gnemlock S5E7 infinite regress shows Seven being affected by a malfunctioning piece of Borg technology which causes several personalities to emerge, which I always took to mean that while an individual drone has no personality the neural patterns of the individual it once was is stored somewhere in the collective.

Could a Borg member survive a ‘Star Trek: The Motion Picture’-type transporter malfunction?


Are the non-regular languages closed under reverse, union, concatenation, etc?

Question: My question: do the non-regular languages have closure properties? For example, if the reverse of L is non-regular, then L is non-regular ? thank you :-)
Comment: The question in the title is too broad to answer. The question to the description is different and more easy to answer.
Answer: Non regular languages are closed under reverse, because $L = (L^R)^R$. Same is true for complement.
Non regular languages are not closed under most other basic operations though. Consider, for example, that $L \cup \overline{L} = \Sigma^\star$. Similarly, if $L = \{1^{x^2} | x > 1\}$ then $\overline{L} \circ \overline{L} = 1^\star$.
There is no complete list of operations on languages, so a complete answer cannot be given.
Comment: You (almost) have dealt with the Boolean operations $\cup, \cap, {}*c$, and with the regular operations $\cup, \cdot, {}^*$. If you add (inverse) homomorphism you cover most listed language operations, I guess.
Answer: Well, if $L$ is regular, then $L^{R}$ is also regular. The contra-positive of this is that if $L^{R}$ is non-regular, then $L$ is non-regular...


2008R2 Cannot Disable Non-Clustered Index

Question: We have identified a handful of superfluous non-clustered indexes and I would like to disable them for a few days before straight dropping them.  However when using the GUI in SSMS (right click > disable) OR running ALTER INDEX DISABLE it says Successful but the index is still online.  I cannot seem to disable it.  Even in AW2008R2 I cannot disable an index.  Help!
Comment: Where are you verifying that the index is "online"?
Comment: In looking at the tree, there is no indicator it is disabled, nor does it indicate it has been disabled in any way.  I swear it used to show a little down arrow on the index icon in the tree.  It literally looks exactly the same as the other indexes I left untouched so how am I to know which is enabled and which is disabled?
Comment: * the 'explorer' tree inside SSMS I should add.
Comment: @PaulWhite I've addressed the last sentence in your comment in my answer. :-)
Answer: You are relying on the graphical tree icon in SSMS to indicate that an index is disabled. In my experience, this has never been true for indexes (though it is true for certain other things, like jobs and triggers).
To address Paul's comment:

No, I don't know why they changed this behaviour.

I don't know that they have changed it in the way the asker suggests:

I swear it used to show a little down arrow on the index icon in the tree.

Unless we're going back to 2005 days (I have 2005 instances, but no 2005 Management Studio handy to test). In one way, they've actually improved the behavior; in another, they've made it worse. Let me explain.
In the following screen shot, 2012/2014 is on the left, 2008/2008 R2 is on the right. There is even less visual cue in the older UI about the index being disabled. Notice that the index name in the tree has the same visual and iconic representation in both versions, even though the index is disabled (click to enlarge), and only 2012/2014 has the warning that Paul mentioned:

So, as I said, I think the visualization has actually improved, even if it is less than perfect - I do tend to agree that there should be a red down arrow or something similar to be consistent with other elements in the UI (have you filed a Connect item yet?).
Now. how has it gotten worse in the newer versions of SSMS? Well, I can't find a way to re-enable the index in the UI. In 2008/2008 R2, there was a "Use index" checkbox on the Options tab, which works - though I'm not sure how intuitive that is. There's also a checkbox for "Rebuild index" which seems to be more appropriate for a button, since it's not an option or a property, but I suppose that is a different discussion (click to enlarge):

To verify the index is really disabled, I would not use the UI at all, but rather the catalog views:
SELECT i.name, i.is_disabled
  FROM sys.indexes AS i
  INNER JOIN sys.objects AS o
  ON i.[object_id] = o.[object_id]
  INNER JOIN sys.schemas AS s
  ON o.[schema_id] = s.[schema_id]
  WHERE s.name = N'dbo' -- or another schema
    AND o.name = N'the table the index belongs to'
    AND i.name = N'the index you disabled';

You can leave out the last AND if you want to see all the indexes for a table. If you want to see all disabled indexes in your database, small change:
SELECT s.name + '.' + o.name, i.name
  FROM sys.indexes AS i
  INNER JOIN sys.objects AS o
  ON i.[object_id] = o.[object_id]
  INNER JOIN sys.schemas AS s
  ON o.[schema_id] = s.[schema_id]
  WHERE i.is_disabled = 1;

You can also just right-click the index in the tree, Script Index As > Create To > New Query Editor Window, and you should see that - for an index that you have disabled - the index includes a DISABLE script at the end, e.g.:
USE [yourdb]
GO

CREATE INDEX ...
GO

ALTER INDEX [x] ON [dbo].[y] DISABLE
GO

Comment: @jbwebtech Maybe. The GUI doesn't change every single icon to indicate some property has been set or not, and I suspect that the number of people who disable indexes - and want to verify such in the UI - is a very small set of the SQL Server customer base. If you think this is important, by all means, file a suggestion at http://connect.microsoft.com/sql - just don't hold your breath, as they have made very minimal investments into new features in SSMS over the past, oh, 6 years.
Comment: Hot dog!  Those both worked, wow, thank you!  Okay but humor me... _shouldn't_ the GUI indicate it is disabled?


Holding the mouse button automatically on OSX

Question: Is there some sort of app that will let me, preferably toggleable with a keyboard shortcut, hold down the left mouse button? (Not click fast, just hold down).
Answer: Will the default double tap to drag work for you? You can enable it in System Preferences>Universal Access:
Comment: Great idea, works perfectly!
Comment: @JJ56 Awesome! (would you upvote the answer too? Thanks!)
Comment: I have enabled "Dragging (with Drag Lock)" but when i double-tap, nothing happens.  It's as if the left mouse button isn't being held down at all!
Comment: Doesn't work in Mac OS X?
Answer: The accepted answer from 2012 is obsolete.  Use the following for Mac OS X:
Mac OS X
System Preferences > Accessibility > Mouse & Trackpad > Enable Mouse Keys

Mouse Keys allows the mouse pointer to be controlled using the keyboard number pad.

What if I don't have a "keyboard number pad"?

If you use a laptop that does not have a numeric keypad, you can still the Mouse Keys feature, but you will need to press the Num Lock key first. Once you have turned on the Num Lock, use the keys with the small numbers on them to control the pointer. The I key will perform a mouse click.

http://etc.usf.edu/techease/4all/input-devices/what-are-mouse-keys/
What if I don't have a "Num Lock"?
I give up.  Search the Apple Store or Google for a 3rd part app.


UK Visit Visa validity

Question: I got five years UK visit visa issued in 15/10/2018 as my plan was to travel in December 2018. Now i postponed my travel to April or maybe will travel in June 2019. I would like to ask is it possible for me to use the visa or i will neet to get a new one. i.e because i did not use the visa for more than 3 months from the issue date does this mean the visa expires? Also is there any specifc period on which i have to use the visa to avoid invalidity?
Comment: You can use it ANYTIME within the five year period. Do not worry at all. Getting a five year visa means they trust you.
Comment: @HonoraryWorldCitizen that seems like an answer rather than a comment.
Answer: You are not required to use the UK visa at all.
You may use the visa at any time during the dates of its validity.
Answer: Usually five Years Visa is issued after a going through a strict pipe line i.e checking your income, country ties, travel history and a valid reason for multiple visits.
You have the choice when ever you want to departure. Furthermore staying more then 180 days is not fruitful as it will show your wrong intentions.
Otherwise its no restriction how many times and when ever you travel but you must have shown a valid income that you can travel so frequently on your own expenses or sponsor.

UK Visit Visa validity


mysql utf8mb4 turkish character confusion

Question: I am inserting some datas including turkish characters into a table and when I insert a data appearance of turkish characters confused me. For example for the character 'ğ', appearance on database is 'ð'. But when I get data and print it on the browser for testing this character shows up to be correct 'ğ' character. Do I have to worry about the situation ? (Btw I am using utf8mb4 as described in title)
Answer: If you are using phpmyadmin to see database entries, it is a common misconception.
You shouldn't worry and you can configure it from php.ini and phpmyadmin's settings. But as you said it is not much of a problem. I reccomend you to use toad or navicat for mysql for better results.


Change attribute field from whole number to decimal in QGIS

Question: Is there a way to change the number type once a field has been created in the attribute table in QGIS? I selected 'Whole number (integer)' initially but now need to switch to 'Decimal number (real)' in order to limit the number of decimal places to 1. I've already filled in all the rows of the column and so I'm wondering can I change the type and covert the existing numbers to a single decimal place or do I have to create a new field column selecting decimal from the start?
Comment: I dont think you can change the datatype afterwards, but lets hope someone has your desired answer. If not, you can simply copy over your integer values to your new field using `to_real("oldfieldname")` in fieldcalculator or via refactor fields processing tool.
Answer: Use the tool "Refactor Fields" in QGIS processing algorithm.

Select the layer and set the type of the column you want to convert to Decimal nummber ( Length is the total length of the number, precision the decimal part).
Click on run and a temporary layer will be loaded which has the fields as you wanted them to be (check the attribute table/layer properties to verify your results!). Close your original layer, and save the temporary one over the existing one - done
Comment: How? Could you please add some details?
Answer: The easiest way is to create a new field and copy all values from the old to the new field - this can be done in one single step and is almost as easy as it would be if you could just switch the field type.
Use the field calculator to create a new field and type as expression to_real( "your_old_field")
Replace the your_old_field part with the name of the integer-field where you initially have stored the values you now want to copy. Click OK and you're done. Toggle edit mode to save the changes!
Answer: With SQLite changing the type of an attribute requires that a new table is created with edited schema, data are copied from old table into the new one, and the old table is finally dropped. See https://sqlite.org/lang_altertable.html for noticing that "modify datatype" is not supported directly by ALTER TABLE and https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3 that gives a few alternatives about how to change the datatype by other means.
GeoPackage has quite a many triggers and I do not feel totally safe with manipulating the database by using generic SQLite tools, but if you are brave enough you can try DB Browser for SQLite. Make a backup copy of your GeoPackage first. I had a try with a dummy GeoPackage and changing datatype from integer into real seemed to be successful and also QGIS shows the attribute as real now.


How to build strong social network at work

Question:
We need help of others to achieve our goals

Though I understand this I feel I'm not sure how to connect with people at work. And being introvert makes it very hard for me.
Can anyone please guide me through this
Answer: In my experience, simply working with people -- asking them for assistance when needed, assisting them in turn, random "how was you weekend"s and the like -- tend to do the job Just Fine unless you're actively hiding. Be friendly (without overdoing it), be a good listener, be helpful, pose interesting and relevant questions, and you sorta can't help getting to know your coworkers.
(And yes, I'm shy too. But that becomes much less of an issue after you;ve been around people a few weeks.)
Comment: I would add that assisting and being assisted by people outside of your immediate team is very useful for networking. There will always be someone across the hallway (or across the continent) who knows something you need to know. Showing genuine appreciation for their help will go a long way toward building bridges, especially if they've been burned in the past. Be quick to help them as well, even if it's not strictly your responsibility.
Answer: The coffe machine is your friend. Everyone goes there, so try to be there too. I'm an introvert either, and it requires some work to get used to contacts, but a successful career is often at this price.
That, and each time you've got an opportunity to professionally speak to someone, force yourself to ask one personal question. Like "how are your children growing", or "For when is your wedding?", things like that. Remember that people love to speak about themselves. Launch them, listen to what they say(be it interesting or not), and sooner or later, some of them will give you informations more relevant to your career.
The advantage of being an introvert is that you're less likely to speak only about you. Which is often seen as selfish. If you make just the effort of asking one question & wait to see where it leads, you'll get more rewards for less effort. And don't overdo it : you're at work for, errrrm, working, first.
You never know what this or this relation will bring us. And all of a sudden, because you've been polite & interested in people, you're offered a job improvement by a manager you barely knew, but who heard you're a good boy. It's a game of patience. Every day, make a little effort towards a few people. Slowly, surely listen to them. Some of them will ask questions, which means you begin to have some kind of link with them. And then, later, it will pay off. Usually a way you cannot forecast.
Answer: How to Win Friends and Influence People has more than a few good tips:

Fundamental Techniques in Handling People
1.Don't criticize, condemn, or complain.

Give honest and sincere appreciation.
Arouse in the other person an eager want.

Six Ways to Make People Like You

Become genuinely interested in other people.
Smile.
Remember that a person's name is, to that person, the sweetest and most important sound in any language.
Be a good listener. Encourage others to talk about themselves.
Talk in terms of the other person's interest.
Make the other person feel important – and do it sincerely.

Books on Emotional Intelligence like "Emotional Intelligence 2.0" and "The Other Kind of Smart" could also be useful in building relationships. "Quiet" by Susan Cain and "The Introvert's Advantage" could be useful books as being an introvert doesn't automatically make you anti-social.
Answer: Looking for a network of peers does not mean that you necessarily need to completely change your personality to be able to create networks. And since your goal is not necessarily friendship but reputation ("he's someone who gets things done" is much better than "he's a friendly chap"), you can manage this on a small group/one-on-one level.
I work with a number of people who are developers (a majority of devs. are introverts) and have a different language as their first language. This means that there is a double-difficulty in sorting out who I should pull to be on a team. Most important things to me:

Polite
Responds when messaged
Looks for work which needs to be done (and volunteers).
Willing to work hard
Able to learn

None of these are aspects which would be difficult for an introvert or an extrovert. If you have all of the above, then I would consider you a valuable resource whom I would try to grab for future projects. If you don't, then I will have concerns.


Is there an easy way to build a form in Joomla that stores the currently logged in user's name?

Question: I have a form created with the breezingForms extension for Joomla. I'd like to store the currently logged in user's name with the form. I don't need to continue to use the same extension. However, what we like about that extension is that it has a form builder that doesn't require code.
Comment: Hello, have you checked the documentation of your form?  https://crosstec.org/en/support/online-documentation/breezingforms/12-examples-scripts/216-getting-logged-in-user-s-data-quickmode-and-classicmode.html
Comment: Thanks for the link. That looks like a good programming solution for quickmode or classicmode. I was looking for a no-code solution for easymode.
Answer: If you don't need to use the username for something else (which might require coding that you're trying to avoid), I know that RSForms has global placeholders for data it automatically saves for the form. That includes username if the user was logged in.
RSForms Pro also has a set of global placeholders (see https://www.rsjoomla.com/support/documentation/rsform-pro/getting-started/component-emails.html) should you need to display the information later (eg thank you page, admin email, user email).
The Crosstec post by @FFrewin gives a perfectly adequate solution that would be common to calling the user information from the Joomla API into any content.
However, a little bit of code would not be something I'd be shying away from as that's where the power of the Joomla API often lies.
Out of curiosity, what's the reason you're not wanting to get out of Easymode? That may expand how to create a workaround using extensions like a combination of Regular Labs Snippets, ReReplacer and Sourcer to create your own mini plugin calls.
Comment: Thanks for the suggestion. What I like about easymode is that anyone who can access the Joomla control panel can make changes to the form and export the form data to CSV. Also, avoiding code could help avoid coding errors and future maintenance issues with those unfamiliar with Joomla code.
Comment: You can do the same with RSForms Pro, and also make the download available by a logged in interface on the front end of the site as well as the backend.
Comment: It does sound though that you're trying to give your user base much more flexibility than the components are necessarily designed for.


Interpretations of the Akeidah

Question: Our Torah class in school is studying the Akeidah.  What different approaches do the commentators take in interpreting it (e.g. Rashbam says it was a punishment; lehavdil, Kierkegaard says it was about the teleological suspension of the ethical, etc.)? They can be modern or ancient.
Comment: Perhaps adding a "Lehavdil" between Rashbam and , Lehavdil, Kierkegaard would make it more acceptable.
Comment: Is the reference to K. that objectionable, though? It was my understanding - someone correct me if I'm wrong - that R' J.B. Soloveitchik used some of his ideas. At any rate, I don't see a reason to downvote the question just because of that.
Comment: Adding Lehavdil was a good start, though I'd reword the opening of the question. Instead of asking about "Meforshim", maybe ask about "commentators, including classical Meforshim and modern philosophers". But quoting Christian philosophers is probably not going to go over well without a clear distinction separating one particular point of the philosopher's interpretation from his overall theological theme (ie, Christianity).
Comment: Your question will probably go over better if you take out the references to non-Jewish interpretations.
Answer: Rashi cites three underlying causes: (a) a Heavenly accusation that Avraham had shown insufficient gratitude to G-d for the gift of a son, so Hashem gave him the opportunity to demonstrate that he would indeed be willing to give up that very same son at G-d's command; (b) Yishmael's contention that his conscious decision to be circumcised (at age 13) outweighed Yitzchak's unknowing entry into this covenant at 8 days, so Yitzchak retorted that he would be willing to sacrifice his entire body should G-d so desire; (c) it provides a clear justification for G-d's special relationship with Avraham, now that everyone could see how deep was Avraham's allegiance to Him.
Ramban and other commentaries see it as a test - a means to grant Avraham the extra merit of action, on top of his good intentions.
R' J.H. Hertz, in his commentary on Chumash (I don't recall whether this is his own idea, or whether he's quoting someone else) explains that this also marks the Torah's first salvo in the war against human sacrifice, since in any other society of the time, the "god" would have had him go through with it, whereas here Hashem stopped him from carrying it out.
Comment: I was zoche to hear over Pesach that an idea similar to R' Hertz's interpretation can be found in Benayahu on the Torah Parshat Bo (by the Ben Ish Chai).
Answer: See Shalom Spiegel's famous study "The Last Trial: On the Legends and Lore of the Command to Abraham to Offer Isaac As a Sacrifice : The Akedah" which discusses many different perspectives on the Akedah, mostly from midrashic sources. In particular, he brought to light the important notion, contained in many medieval sources (with earlier precedents) that Abraham indeed killed Isaac and was only prevented from killing him a second time (after he was brought back to life) by the angel (and Spiegel discusses how this particular understanding connected with the perspective of different medieval Jewish communities on their contemporary persecutions). It is not directly philosophical, but the midrashic understandings he cites implicitly provide a new philosophical perspective on the Akedah.
Answer: I heard (but do not have the citation) that the Izhbitzer says in Mei Hashilo'ach that Hashem was presenting Avraham with doubt by placing him in a situation that did not have a clear solution. The unclarity was a test of Avraham's character.
Comment: http://curiousjew.blogspot.com/2008/05/ishbitzer-on-akedah.html
Answer: Its clear that the simple explanation is that this was the ultimate test - would Avraham listen to God no matter what- even if God told him to sacrifice his son.
That is why the akeida starts off "and God tested [נִסָּה] Avraham", and after Avraham passes the test, God tells him "...כִּי, יַעַן אֲשֶׁר עָשִׂיתָ אֶת-הַדָּבָר הַזֶּה, וְלֹא חָשַׂכְתָּ, אֶת-בִּנְךָ אֶת-יְחִידֶךָ."
Chazal in many places emphasize that it was the ultimate test. For example, they comment on " קַח-נָא " that God was saying please pass this test, or people will think you only passes the earlier ones because they were easy.
Comment: Ari, Welcome to mi.yodeya, and thanks very much for sharing this insight! Your answer would be even more valuable if you could provide a source to back it up. I look forward to seeing you around.

Interpretations of the Akeidah


Can I use my early 2009 iMac as an external screen?

Question: I have an early 2009 iMac (24" version). It has a mini display port in the back. Is it possible to use it as an external screen? If so, how do I do it? And can I attach all kinds of devices, e.g. a Raspberry Pi (with an appropriate adapter cable)?
Comment: Yes, I can confirm that!
Comment: Were you able to confirm that an early 2009 24" iMac does *not* support TDM?
Answer: The specifications for the 24" Early 2009 iMacs according to eveymac.com and the Apple Manual for the Early 2009 series of iMacs does not mention target display mode as a feature.  That unfortunately means that the Early 2009 generation of iMacs did not offer a target display mode so you will not be able to use that displayport output as an input source.
Comment: [Apple's support page](https://support.apple.com/en-us/HT204592) for using iMacs in Target Display Mode seems to confirm it, unfortunately: the earliest listed model is the Late 2009 one.
Answer: Check in the user manual for your particular model for Command-F2 as a shortcut to enter target display mode.
If yours has a target display mode, you are good to go. If not, then no.
I don't think that any 24-inch iMac model supports this. Initially the 27-inch models had this feature and later it trickled down to the 21-inch models.
Answer: You will not find this information on Everymac.com or in the manual. Apple's own webpage on Target Display Mode says:
24-inch and 27-inch iMac models introduced in 2009 and 2010
To use any of these iMac models as an external display:

The iMac used as a display must have macOS High Sierra or earlier installed.
The other Mac that you're connecting it to must have been introduced in 2019 or earlier and have macOS Catalina or earlier installed.
The cable connecting the two Mac computers must be a Mini DisplayPort  cable.

SHORT ANSWER: The 24 inch iMac from 2009 WILL WORK as an external screen.


Slow query log on production?

Question: What are the best practices regarding the slow query log? Should it be active in production environment? If so, what would be a reasonable long query time? I know its different for every application, but on general, what would you set it in a data warehouse application with a mysql database of 15gb? Thank you very much
Answer: "I know its different for every application"
15G is not a large data-set unless you tell me it's a single table! Your data can be contained in innodb-buffer-pool and performance should be better.
Importantly, you should make sure your queries are well written and tables are indexed correctly. (log-queries-not-using-indexes)
I'd start with 1 Sec and review the amount of queries getting logged and work on improvements. long-queyr0time is dynamic and you should be  able to play with it depending on load it generates.
Comment: Hi and thanks a lot for you answer, what about performance when the log is active? Wont the log writing affect it?
Comment: Not as much as the slow query until you fix all

Slow query log on production?


Remove bumpy mortar left of the wall

Question: This is a 30 year old wall. The old plaster is removed. Beneath the old plaster there is bumpy mortar left. What is the best way to get rid of them and get a nice flat surface ready for replastering?
Answer: I know this is not the answer you are looking for, for this wall is ready for plastering as it is. It will need a scrubbing  or power washing to remove all or most of the dust left over from the original plaster.
To get the wall flat like you ask Will require at least scraping with a tool like this. (image courtesy Razorback)
This will be very time consuming and if the mortar is very strong, it may not do what you want. The most reliable way to flatten the wall is with a right angle grinder and a blade (disk) (Images courtesy Amazon) made for cleaning the surface. It will be a very, very, dusty job. You will need to wear a protective dust mask and face sheild.
The art of plastering will require a build up coat and a final layer, if you are planning on true plaster. There are newer versions of plaster look a likes out there, but most start with a base layer to prepare the wall for the finish coat. This eliminates the need for getting the wall perfectly flat.
Comment: Note that dust can be explosive and take precautions. The mortar shouldn't be a problem but other sources might, including old paint and dust that has settled over time. https://www.ccohs.ca/oshanswers/chemicals/combustible_dust.html
Comment: Yes, that is true, but the dust has to be airborne if it is present. If there is dust on the floor that could become airborne, vacuuming it up will solve that potential problem. The haze I see remaining on the brick looks like the residue left form the original plasters' contact to the wall. Of that, what does not come off by power washing or scrubbing can be coated over by the new finish.
Comment: correct that it's airborne dust that is the concern, not dust in itself; I neglected to add 'airborne' in my note, thank you
Comment: a scraper chisel blade in a rotary hammer drill could be another option.
Comment: Yes I did consider that as part of the answer. For a DIY the tool selection can get pretty elaborate, so I kept it to a few basic tools, Even the right angle grinder and the grinding wheel do not come cheaply.... Yes a rotary hammer set to just hammer and the spade bit attachment will work as well, but I can see being pelleted by chunks of mortar all day, and being wore out at the end of the day.

Remove bumpy mortar left of the wall


Does the steam version of blender install Python automatically?

Question: I'm not really having any problems.
I've just recently downloaded "make human".
on the download page it says it needs Python installed to work.
I haven't installed Python but it seems to work anyway.
And I'm assuming that's because Python must be bundled with the steam version of Blender.  because the version of blender I have was installed through the steam client.
If that wasn't already apparent.
Answer: Python is bundled with all versions of Blender, since 2.5 onwards. Many aspects of the UI are declared in python and it is therefor an integral part of the UI system (shipping without would be a world of hurt).
According to Make Human docs the add-on comes with its own version of Python ( 2.7 ).

(...) there is a bundled python inside the build zips (...)

This means you have at least two versions of python on your machine, one that Blender uses and one that Make Human uses, that's OK.
Answer: All the full releases of MakeHuman come with python in them already. You don't need anything additional to run them. You would only need to install Python on it's own if you were trying to build the pure python branch from source.
I do not think any version of Blender installs Python for you.


Notation for all k-tuples that can be constructed from a set

Question: Is there a generally accepted notation for a $k$-tuple that is constructed from a set? I have a set $\mathcal{A}$, and need to sum over all possible $k$-tuples (denoted $t_k$). Right now, I'm using set-notation like so:
$$
\sum_{t_k\subseteq\mathcal{A}} ...
$$
Because the $t_k$ aren't sets, I think this notation is not formally correct. Is there a better alternative?
Comment: The set of $k$-tuples from $A$ is simply $A^k$.
Comment: Seriously??? That, I did not know...
Comment: Seriously. The Cartesian product of $k$ copies of $A$ is exactly the set of $k$-tuples of elements of $A$.
Answer: The cartesian product is your answer.
\begin{equation}
\mathcal{A}^{k} = \mathcal{A} \times \cdots \times \mathcal{A} = \{ (t_{1},\ldots, t_{k}) \, | \, t_{j} \in \mathcal{A} \textrm{ for } 1 \leq j \leq k \}.
\end{equation}
In the case that $\mathcal{A} = \mathbb{Z}_{\geq 0}$, such $k$-tuples are often called multi-indices,since they are used in the notation for multivariate partial derivatives.
Comment: Thanks, such a simple answer...


Aspiration in 'lecture'

Question: Why in a word 'lecture' /k/ is unaspirated? Shouldn't it be weakly aspirated because of the fact that it's in unstressed syllable?
Comment: It's at the end of a syllable. We never aspirate consonants at the end of syllables. A syllable can't begin with /ktʃ/ because those letters aren't the start of a valid English word (although maybe they could be in some other language).
Comment: 'Weak aspiration' - for example: 'paper' - the first /p/ is strongly aspirated, because of the fact that it's in the stressed syllable. The second syllable is unstressed, so the second /p/ is weakly aspirated

'Strong aspiration' - at the beginning of a stressed syllable: 'appear, kid, pit'

'Optional aspiration' - at the end of the word "map, tap, mac'
Comment: And what is a "weakly aspirated" consonant? As far as I know, there are only aspirated, unaspirated, and optionally aspirated consonants in English. Is your teacher using "weakly aspirated" for "optionally aspirated" (ones which some people aspirate and some people don't)? And does he or she actually expect you to aspirate them at a level strictly between aspirated and unaspirated? That's making English even harder than it should be.
Comment: Ok, I think I got it:
If there's no oral release, a plosive will always be unaspirated.
Answer: From John Wells' blog:

As I put it in LPD, English [p t k] are aspirated

when they occur at the beginning of a syllable in which the vowel is strong.

They are unaspirated

when preceded by s at the beginning of a syllable
when followed by any FRICATIVE, as in lapse læps, depth depθ
if immediately followed by another plosive as with the k in doctor ˈdɒktə || ˈdɑːktər. The release stage of the first plosive is then usually inaudible ('masked').

Otherwise, they are unaspirated or just slightly aspirated.  For example, ripe raɪp, shut ʃʌt, lake leɪk; happy ˈhæpi, writer ˈraɪtə (BrE), lucky ˈlʌki; wasp wɒsp || wɑːsp, restinɡ ˈrestɪŋ, Oscar ˈɒskə || ˈɑːskər, lifted ˈlɪftɪd, today təˈdeɪ.

The last case, "unaspirated or just slightly aspirated", is also called weakly aspirated.
The /k/ in lecture is followed by a plosive, so by these rules, it is unaspirated.
But speaking as an English speaker, I am not sure that English speakers actually distinguish between weakly aspirated consonants and unaspirated consonants. We don't hear three levels; using an unaspirated consonant instead of a weakly aspirated consonant is never going to be wrong.
Comment: 'The /k/ in lecture is followed by a plosive'
I thought it's followed by tʃ, affricate.
Comment: Plosives followed by affricates also have no audible release.
Answer: The word is pronounced LEK-chur. (Stress on 1st syllable, "k" sound)
Pronounced with no "k", it sounds like "lecher" or "letcher", (a pervert)

Aspiration in 'lecture'


Insert today's date in Google Sheets

Question: I use Ctrl+; to insert today's date since my Microsoft Excel times, but how do I do it in Google Sheets app on my Android phone, without a keyboard?
Comment: You can try using the inbuilt DATE function (not sure about its exact syntax,however). Better than scripting stuff, anyway (remember Office macros?)
Answer:
Format the cell as a date
Select the cell you want to add the date to, and click the calendar icon, the current date is inserted.
Comment: I'm trying to do this but for the current time, but it doesn't seem to provide a way to enter the current second; it always inserts ":00" for the second.  Any idea how to fix that?
Answer: I first tried downloading Hacker's Keyboard because it gives you a full PC keyboard on your Android device. In other words, it has a Ctrl key. However, I could not get Ctrl+; to work. I could get other Ctrl+* combinations do their expected functions, but I believe there was an issue with context. The Android keyboard will only popup if you select a text input field. Google Sheets, just like Excel has two input contexts. The first is the selected cell. The second is a cursor in any cell. On Android, I could not get the keyboard to popup while using sheets unless the cursor was in a cell, which made the text input field the formula bar only. The outer "selected cell" context would not call up the keyboard. I believe it would work if you could call up the keyboard in the right context.
I found a workaround that I think is quite tidy. The only issue is that you have to set it up individually for each document on a PC. But once you do set it up, it works very well. The process basically lets you set up a custom formula. In exact terms, we will insert a script on the sheet that will check the value of any cell you edit against a keyword you set. If the keyword matches, it will replace it with the current date and time.
To begin, you will have to open your sheet on a PC and click Tools > Script editor. Enter the following script in the large text field provided. If you've never done this before and don't have to consider any other scripts you've created, then delete the default text that is already there.
function onEdit(e) {
  if (e.range.getValue() == "$new") {
    e.range.setValue(new Date()).setNumberFormat("MM/dd/yyyy HH:mm");
  }
}

If you are unfamiliar with JavaScript, I'll give a quick explanation of each of the parts above. onEdit(e) is a global function, which basically means it's built in and can be called anywhere in the script. It is run every time a cell is edited. The e in the parentheses specifically refers to the active cell. The second link beginning with if gets the value of the recently edited cell e and compares if it is exactly equal to $new. The third line will only run if the second line is true, that is, if the recently edited cell contains exactly the text $new. This line replaces the value with a timestamp. Date() is also a global function which returns the system time. setNumberFormat sets the number format, naturally.
The first obvious thing you can do differently is change the number format to something of your liking. Click here for more information.
You can also change $new to literally anything else. In programming, it is common to use a special character like $ or _ plus a word to denote a custom variable or function. But since it can be anything and this is for my personal use, I opted for ,n. It's weird, certainly, but it's fast and easy to type on an Android keyboard and I can't envision any other instance that I'd start a spreadsheet cell input with a comma.
Going forward, I can see myself using the basics of this script to make other custom functions. Things like pinging a web resource for a certain data point that changes frequently first comes to mind. After that, I'm sure there's all kinds of use cases. If you find yourself "building an Library" of scripts you always want to use on every sheet, well it seems there's a solution to having to add the scripts to every sheet.
Credit for the idea and the script goes to this Webapps Stack Exchange answer..
Answer: In the support article Keyboard shortcuts for Google Sheets, the use of keyboard shortcuts is possible with an external keyboard.
From the article:

If you plug an external keyboard into your Android device, you can use the shortcuts below:

It goes on to enumerate the shortcuts.
You can enter them with Hacker's Keyboard.
While using Hacker's keyboard, the trick to enter shortcuts is to first enable Use permanent notification in its settings.
Then, in Google sheets, select the cell. In the status bar/notification bar of the phone or tablet, click on Show Hacker's Keyboard. When the keyboard is shown, press Ctrl+;. The date will be entered as if you were using an external keyboard.
Answer: First, format the column as date, or date & time, like "13/01 0:00". Then, every time you try to edit, a calendar button will be shown on the bottom right.
Comment: That works perfectly in Android. Each individual cell in the column can then be formatted as required to either date or time as required. Thank you ✅
Answer: Enter the formula =Now() and press enter.
Comment: I think not. Because afaik in an hour the cell will show that hour, and not the hour when the formula was entered.
Comment: Based on my experience on other apps, copying the generated value and then special-pasting it as a value/text might work to make date & time static, though I don't know if it is possible on the Google Sheets app.

Insert today's date in Google Sheets


What is a Tin of Tomatoes?

Question: My recipe calls for a small tin of tomatoes plus another tin of tomatoes.
Is a small tin of tomatoes equal to a 14 1/2 oz size can of tomatoes and the tin of tomatoes equal to the 28 oz size can or is the tin of tomatoes equal to a 14 1/2 oz can size and the small tin equal to something along the size of a tomato sauce can?
Comment: A this is essentially a guesswork, some more clues you can provide are 1) Which country the recipe comes from? 2) what is the recipe doing with the small can? i.e. is it added together with the large can or used separately?
Comment: I think you're right in that the older question should've been tagged with 'measurements'.  I've fixed the other one.  Also see http://cooking.stackexchange.com/q/784/67
Answer: If it says "tomatoes", I would think that your first guess is correct. I have not seen or heard "tomatoes" being sold in cans smaller than 14 oz, at least in US. The only tomato products in smaller cans are tomato sauce/paste.

What is a Tin of Tomatoes?


What does it mean for God to appear physically (theophanies) if he's already omnipresent?

Question: In the Old Testament, God reveals himself numerous times to the prophets in physical forms (Genesis 18:1-2, Exodus 24:9, Numbers 12:8, Isaiah 6:1). But according to scripture, God is omnipresent, meaning he is already present everywhere (Jeremiah 23:24, Psalm 139:7). So what does it really mean for God to be physically present in a specific place if God is already present there?
Answer:
theophany (n.) "an appearance of God to man," 1630s, from Late Latin
theophania, from Greek theos "god" (from PIE root *dhes-, forming
words for religious concepts) + phainein "bring to light, cause to
appear, show" (from PIE root *bha- (1) "to shine").

The difference is not presence, but visibility, between being unseen and being seen. When God displays His glory, then we know He is real and is present.