Using a login in automation

Question: While working a contract for a company that needs data security, I found a python script that a previous person had made which used login details stored in plain-text locally. On a network of roughly 200 users, 7 of which have access to this file, really how dangerous is this practice? Is there any way to make this system secure without making the user type in their login details every time they run the program? Ideally this script runs in the background so long as the computer is on, is there any risk associated with storing the password in memory for that time?
Answer: Previously when working with automated permissions, I typically would use a controlled group access. With only a handful of people having access to the file, I would say it isn't "dangerous" per se, but it is not good practice. In my past experience letting something like this run amok (plain-text credentials), it will become a pain to update and replace later on when it does become an issue. It would be better to deal with this now than later. Since you mentioned this company needing data security, I would say that this specific case applies and would need to be addressed.
There are a number of ways you could go about this - it depends on what you have access to or what you have already built. Implementing a file that can be imported to the script, which contains usernames as part of specific groups. Then, allowing only appropriate groups permissions to run the file/login. It would depend on the environment/OS you're running this on as well. I would look into Python Keyring as you would be able to implement it in-line with the script.
Obviously going this route, you would be in a similar situation where you would have to lock the permissions file down as well, only allowing key people access to modify said file. An alternative would be using SQL and creating a credential table based on users who should have access, in which permissions would work in a similar way (if these specific people exist in this table, allow access). This could be as simple as usernames/user ID and does not have to include passwords. A comparison to Windows Active Directory could work as well. These are some general examples as I'm not sure what environment you're running on, or if there are any measures that currently exist that would be able to be utilized.
Coming back to your question though, I would recommend implementing a solution. Even something such as creating an encrypted password - anything to get rid of plain-text would be a plus.
Answer:
how dangerous is this practice?

Does the script control the kettle or the missile targeting system?
While encrypting the passwords might seem like it has some benefits, this only means that you need to find a safe place to store the encryption key rather than the password itself.

Is there any way to make this system secure?

It is probably possible to make it more secure - but you've told us nothing about the OS, nor how the password is used. Nor what the threat models are (e.g. do you want to exclude this file from backups). There's permissions, controlled privilege escalation (sudo), file / filesystem encryption, Linux has secrets management facilities, so does MS-Windows. MS-Windows can store credentials securely (and expose ways of invoking the functionality, e.g. via task scheduler). You could go out and buy a Privileged Access management platform like CyberArk. They all have different costs, benefits and shortcomings.

Using a login in automation


Initial conditions for RLC circuit

Question:
reaches steady-state at \$t = 0^{-} \$, so I am trying to calculate the initial conditions of \$i\$ (current through inductor) and \$v\$ (voltage across capacitor). It is easy to find that \$i(0) = 10A\$, but I am not able to find \$v(0)\$. What am I missing here?
Answer: Just think about how you derived the current of 10 amps. There is a 100 volt supply and there is a 10 ohm resistor - to calculate 10 amps it must mean that all the voltage is across the resistor so, what voltage is across the inductor?
Or, put another way, V = L di/dt and, because the circuit is in steady state (your words not mine), this implies the current is also "steady" so, using that formula, what is the voltage across the inductor?
Comment: Mmm my crystal ball says OP is more concerned on capacitor initial voltage. Or at least that's what he should...
Comment: You may be right but he didn't ask that. Easy to derive anyway.
Comment: Oh yes you are right, he was not clear, *conductor* he's talking about might be just anything. However I belive it is impossible to answer what is capacitor initial voltage unless you **assume** or **are told** something. As is it's just: the voltage was there last time the switch had been opened. Of course any of us is just thinking of zero volt, but that's an assumption, not a calculation.
Answer: Actually, the initial state of the capacitor is not defined and it's voltage can be anything somebody might have charged it with.
However, looking at the circuit, we might assume that the switch has been put in the b position before for a long enough time for the circuit to reach steady state.
Now based on the fact that there is a resistor in series with the L and C with the switch in b, we know that the circuit will be 'dead', i.e.: current through L and voltage across C are zero.
So let's assume initial state of C having zero voltage.
Now as the voltage over a (ideal) capacitor is always continuous, as is the current through a (ideal) inductor, at \$t=0+\$ the capacitor's voltage will still be zero.
Its derivative however is $$u'_C = i_L/C = \frac{10 A}{1/9 F} = 90 V/s $$
Note also that the value of the resistor plays no role in this initial state because the current is determined by the inductor's 10 A.

Initial conditions for RLC circuit


Recommendations for 24V to 5V AC/DC converter

Question: I'm working on an ESP8266 thermostat that should be powered by the 24V AC from the furnace. I'm looking for a converter to 5V DC that would be small enough to fit in a smaller enclosure and not dissipate too much heat. Not fully sure about the current, but I'm planning for up to 500 mA for short periods of time. I found on ebay this, but it accepts input from 85V upwards. What would happen if I would feed 24V AC to it? Would it still work. Or alternatively doesn anyone have a link for something similar that would work with 24V?
Comment: Smart searches are hard when there are tens of very similar products, plus I'd rather not reinvent the wheel and see if someone had a similar problem and found a good product. Too bad this is not allowed by the website, but I understand the reasons somewhat :(
Comment: Shopping questions are off-topic on this site. Google '24vac to 5vdc converter ' and you may see what you want.
Comment: I wonder why smart electronic users haven't learned how to learn yet using smart searches?
Answer: 1) No. Those converters will not work on 24 VAC.
2) This is not a site which permits product recommendation.
3) If you don't mind some extra size and weight, you can get what are called bell transformers (used in doorbells, naturally) which take 120 VAC in and put 24 VAC out. If you take one of these and feed your 24 VAC into the secondary, you'll get 120 VAC on the  primary, and you can use this to feed your converter.
5 volts time .5 amps is 2.5 watts. Ignoring converter losses, this implies that 24 Volts will only need 0.1 amps, and this is a very small transformer.
Answer: I suggest
Get a 120-240VAC to 5VDC Power supply like this one:http://www.hlktech.net/product_detail.php?ProId=60
Connect your 24VAC to a 240/120VAC - 24VAC transformer on the secondary side(the 24V side)(You can get this transformer from any old appliance or hobby electronics store). Connect the other side of the transformer(the 120/240VAC) to the input of the Hi-link power supply.
There will be very less heat dissipation and the package will be small depending on your transformer.
One alternative to this is:
Make a rectifier and filter circuit like the one below and connect it to a buck converter like this:https://www.amazon.com/Lysignal-LM2596-Supply-Adjustable-Converter/dp/B074J4NXCM/ref=pd_day0_hl_23_14?_encoding=UTF8&pd_rd_i=B074J4NXCM&pd_rd_r=3516ad17-2cfc-11e9-a095-811ee4313434&pd_rd_w=6lXwy&pd_rd_wg=8G2xP&pf_rd_p=ad07871c-e646-4161-82c7-5ed0d4c85b07&pf_rd_r=VHE2RA0J3G6ST9KPK3MJ&psc=1&refRID=VHE2RA0J3G6ST9KPK3MJ

simulate this circuit – Schematic created using CircuitLab
Also, tune the potentiometer for fine 5V output.
Good luck. If you have a doubt, drop it down in the comments.


Multiple X-UA-Compatible meta tags in SharePoint masterpage one of it for webpart

Question: I have the code <meta http-equiv="X-UA-Compatible" content="IE=8"/>  in my master page so certain things will work. However I have a twitter webpart which doesn't work in IE 8 so I need to change it to IE=10. Is there anyway I can use something like this for a particular web part?
Answer: I have not tried it, but this could be helpful.
<meta http-equiv="X-UA-Compatible" content="IE=5, IE=8, IE=9, IE=10" >

Answer: You can use some jquery.  The caution is to make sure you don't break the SP UI when you make the change. #soTesting. This is working in my 2010 site now. In 2013 the doctype is set to HTML so the issue would not happen.
if ($('meta[http-equiv=X-UA-Compatible]', top.document).attr('content') == 'IE=8') {
    $('meta[http-equiv="X-UA-Compatible"]', top.document).attr('content', 'IE=8,IE=9,IE=10,Edge');
    $('meta[http-equiv="X-UA-Compatible"]').attr('content', 'IE=8,IE=9,IE=10,Edge');
}


What is the best practice of B2B email dimension?

Question: The ideal width of marketing emails is 600px, does it also apply to enterprise product emails? or it can be responsive without any max width limit?
Comment: Hi Lin. Welcome to UX StackExchange community. However, your question is more pertinent for the Graphic Design community as a mailer would be opened on many different screen sizes and many different layouts. You might even have to consider a responsive mailer so I suggest you take their help for this
Comment: Well i would say that the best way would be not to have a picture at all. None of the people that i work with can aactually see the images in B2B email sent to us, unbless we purposefully turn them on for that mail, which never happens. (ok it seems that the system has a counter aaand it say sthat i have in fact not looked at one those pictures in 5 years)
Answer: Responsive design is preferable, making a set hard coded width undesirable. Far more people view web content, including emails, on mobile devices today. Unlike 10-15 years ago where you could be certain every email was seen on a desktop/laptop, today there's really no telling if the viewing deice is 320px wide, 700+px wide or 1000+px wide.
The only real thorn is Outlook or luddites still using circa 2001 email clients. There should be some attention to fallbacks, but overall there comes a point where you simply can't support things 15 years old.
Truth is though, even with responsive design things aren't that bad for Outlook users provide you try and avoid the more "cutting edge" CSS3 features out there, or plan ahead for them failing. (Don't use @font-face, CSS shadows, transformations, filters, etc)


how do i use firebug or chrome console instead of alert() to see variable values?

Question: how do i use firebug or chrome console instead of alert() to see variable values?
currently, I want to see the value of var i as it increases.  Not sure that it's increasing.
Answer: You can use a breakpoint on this variable. You can find explanations for the Chrome Inspector here: http://code.google.com/chrome/devtools/docs/scripts-breakpoints.html
Answer: You probably want to use console.log(). It just prints the parameters in the firebug console.
More info can be found on http://getfirebug.com/logging.
Answer: You could use something like the YUI Logger control - http://developer.yahoo.com/yui/logger/ - which puts a log window on your webpage that you can write debugging messages to and clear/hide/etc.
Or you could try a javascript shell bookmarklet that opens a separate shell in the context of the main window.  One example is available at https://www.squarefree.com/bookmarklets/webdevel.html, and there may be others.


How could I seasonally adjust data series and constrain produced data only to 0 or positive values?

Question: I would like to seasonally adjust data series that cannot be negative. How I could do this? Currently I am using seas in R. Is it possible to constrain the output series to 0 or positive values?
Answer: It is not very clear what you want exactly, but here are two options that may help you:
Option 1, offsetting: Subtract min(seriesX) from each element of output seriesX;
data.table style:
seriesX[, value := value - min(value)]
Option 2, thresholding: Transform each seriesX element smaller than 0 - to 0
data.table style:
seriesX[value < 0, value := 0]


Naming of perchloric acid

Question: Why is perchloric acid called so? I am aware of the rules, but why is it not called hyperchloric acid? Or is it correct to also refer to perchloric acid as hyperchloric acid?
Comment: I would be more interested why it's even still called like that. IUPAC introduced newer nomenclature ages ago.
Comment: We have extra suffix for each of positive oxidation numbers in Czech, so we do not have such problems. Kyselina chlorná HClO, chloritá HClO2, chlorečná HClO3, chloristá HClO4.
Comment: In the mid 19th century, chemists apparently named it 'hyperchloric acid' with composition HClO7. But it was later renamed to 'perchloric acid' with a corrected composition $\ce{HClO4}$. So, in common nomenclature, acids with highest O.S is given the per- prefix. There is always IUPAC name to help you in case common name causes confusions. The compound  is actually $\ce{ClO3(OH)}$. So, the IUPAC name is " hydroxidotrioxidochlorine".
Comment: I doubt anybody would call it hydroxidotrioxidochlorine in nearby future.
Comment: @Poutnik. Indeed. That is quite a mouthful.
Comment: Thank you @NilayGhosh By any chance is there a peroxy acid of chlorine? If so, is it called perchloric acid?
Comment: Acids should contain the peroxo bond -O-O-H in order to call themselves the "peroxy acid". Unfortunately, there are no acids of chlorine which contains such bonds. So, there is no "peroxy acid" of chlorine. OTOH, there is a nitrogen oxyacid which is called "[peroxynitric acid](https://en.wikipedia.org/wiki/Peroxynitric_acid)". Observe the bonds carefully.
Comment: Oh okay then. Thanks! Since there is no peroxy acid, there would be no confusion regarding perchloric acid and per[peroxy]chloric acid, which was what I wanted to ask about.
Answer: This nomenclature comes from a long time ago. In the $19$th century, it was decided that the acidic compounds containing H, O and another atom X would be named from the name of this third atom X.
If only one molecule of such an acid was known, the name would be made by adding the ending -ic. Example: Only one acid is known with a Carbon atom, and it is $\ce{H2CO3}$, which is called carbonic acid.
If two acids were known differing in the number of oxygen atoms, the most oxidized would follow the preceding rule. In the least oxidized, the ending would be changed into -ous. Example : In the $19$th century, the two following acids were known containing a nitrogen atom. Well  !$~\ce{HNO3}$ was called nitric acid and $\ce{HNO2}$ nitrous acid.
If more than two acids were known differing in the number of oxygen atoms, the chemists would copy the case of the chlorine atom, where four acids were known : $\ce{HClO, HClO2, HClO3, HClO4}$. In this case, the two acids situated in the middle of the list are named according to the previous method : $\ce{HClO2}$ is chlorous acid, and $\ce{HClO3}$ is chloric acid. For the two extreme cases, it was decided to add prefixes, hypo- for the lowest number, and per- for the highest number. As a consequence, $\ce{HClO}$ became hypochlorous acid, and $\ce{HClO4}$ was called perchloric acid.
Today, the same regulations is applied, but the criterion of the number of oxygen atoms has been replaced by the oxidation number. The suffix -ous and -ic must be used if the corresponding acids have a difference of $+2$ in their oxidation numbers.
It should also be mentioned that the previous nomenclature is valid for acids having only one X atom. If an acid have two X atoms, the prefix di- should be added, and tri- for three X atoms. For example, $\ce{H2S2O5}$ is called disulfurous acid, and $\ce{H2Cr2O7}$ is dichromic acid. There are also other prefixes like ortho- and meta- to distinguish between acids having one X and the same oxidation number, but a difference in the number of H atoms.
Comment: In my understanding, the question was not about naming nomenclature the OP is reportedly familiar with. It was rather an etymology question why per- and not hyper-.
Comment: @Metaxylene Is there any confusion ? Naming conventions as for any other language say many "because" to many "whys". They do not always follow straight logic nor optimal way. Note that per- is not a convenience for hyper- but alternative prefix. Also, the pair hypo/hyper prefixes is used for low/high state of the same phenomena, what is not directly applicable here. There is no hypochlorate nor hyper/perchlorite.  And last but not least, per- is shorter and that counts.
Comment: Maybe the use of the prefix "per-" is due to the influence of the French language. For example, in French the verb "forer" means "to make a hole in the ground". And if we add the prefix "per-", we get the verb "perforer" which means "to punch, to pierce, to make a hole so as to see the light through it".
Comment: Thanks for your answer Maurice but like @Poutnik mentioned, my question was why we refer to the acid as perchloric and not hyperchloric acid
Comment: @Metaxylene I guess the answer is similar as for peroxide, where there is also  superoxide, but not hyperoxide ( at least not in English, because CZ and DE do have hyperoxide ).
Comment: Sorry, didn't quite get what you meant. Could you please clarify? And why the confusion? Wouldn't just sticking to naming the acid hyperchloric acid at the time reduce confusion?
Comment: Understood. Thank you. You've cleared any confusion I had about your previous post.

Naming of perchloric acid


Web services calls in javascript button

Question: I have a custom button that runs a web service call for an Apex class that makes a SOAP call to an external application. The problem is that this process is executed on the main thread and ends up crashing the browser.
Anyone know how I do not catch the user's screen? Already try to put web worker can not import the libraries:
apex.js
connection.js
Answer: You should look into Queueable Apex and Queueable Interface you can use JS to make a call and to make the call asynchronously.

Web services calls in javascript button


Does the 'in' operator use "==" or "is" for comparisons?

Question: In a Python expression like str in [str1, str2, str3] or 1 in [1, 2, 3], does the in operator use == or is to compare the first object with the objects in the list?
Comment: see https://stackoverflow.com/a/48867273/6260170
Answer: It depends on the object how in is executed; it is not the in operator that makes the comparison, it is the object.__contains__ method that does the work.
For the Python standard container types (list, tuple, set, dict, etc.) both identity and equality are used. See the Membership test operations section of the Expressions reference documentation:

For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y).

is is faster to test for, and objects having the same identity implies they are also equal.
Custom types are free to implement whatever test they want to do in their __contains__ method.
Next, if no __contains__ method is defined, but there is a __iter__ method or a __getitem__ method, then an iterative search is preformed where the values produced are tested for both identity and equality again. See the above linked documentation for details; the documentation is not that explicit about the identity test but the implementation still uses identity because using it is a performance boost.
You can see this when you use float('nan'), which is never equal to itself or anything else:
>>> nan = float('nan')
>>> nan == nan
False
>>> nan is nan
True
>>> nan in [nan]  # tests for identity first
True
>>> nan in iter([nan])  # an iterator, only __iter__ is defined
True

float('nan') is an exception to the normal expectation that identity implies equality; see What is the rationale for all comparisons returning false for IEEE754 NaN values? for why that is.
Comment: Your summary (saying "for [...] standard container types [...] equality is used") contradicts your quote from the docs. Membership tests for built-ins use *both* identity *and* value equality tests, testing identity first, then equality if the identity test fails.
Comment: @ShadowRanger: yes, it's late and I should really just call it a night. Thanks for pointing that out.
Answer: It seems to use ==. With the following test:
Python 2.7.14 (default, Mar  1 2018, 19:24:37)
$ str1 = 'a bc'
$ str1 is 'a bc' # returns False
$ str1 in ['a bc'] # returns True

Any links to official documentation about this would be appreciated! My Google-fu has failed me thus far.


Why don't they use all kinds of non-linear functions in Neural Network Activation Functions?

Question: Pardon my ignorance, but after just learning about Sigmoid and Tanh activation functions (and a few others), I am wondering why they choose functions that always go up and to the right? Why not use all kinds of crazy input functions, those that fluctuate up and down, ones that are directed down instead of up, etc.? What if used functions like those in your neurons, what is the problem, why isn't it done? Why do they stick to very primitive very simple functions?
Comment: Diminishing returns?
Answer:
I am wondering why they choose functions that always go up and to the right? Why not use [...] ones that are directed down instead of up, etc.?

The activation function is applied to a weighted sum of the inputs of the neuron. Replacing a function that is "directed up" with one that is "directed down" is equivalent to changing the weights. There's no particular reason to prefer an increasing function to a decreasing one, it just happens to be the convention.

Why not use all kinds of crazy input functions, those that fluctuate up and down

In principle, you could. People are using the functions that work best. If somebody found a "crazy" activation function that yielded good results it would certainly get used. However, using a "crazy" activation function probably makes it much harder to train the network. Part of the reason why e.g. ReLU is popular is because its simplicity makes training easier.
Comment: I don't understand why "its simplicity makes training easier", why is it easier than a crazy function? And why "probably makes it much harder"?
Answer:
Why do they go up? This is called being increasing. It expresses that more stimulus implies more activation. You might ask then, why would they want to express that? No particular reason other than imitating nature.
Why do they go to the right? I don't really understand this question. The $X$-axis, which in Cartesian coordinates is used to represent the inputs of functions with real variable is, by convention, drawn horizontally with the values increasing from left to right.
Why not use all kinds of crazy input functions, those that fluctuate up and down? The more complicated the function, the harder it can be to compute. For a computation that is going to be done many times, one would like it to be as simple as possible. The feature of not being monotonic (going up and down) also doesn't really add much to how expressive is a neural network. You can model a neuron with a non-monotonic activation function as the superposition of a few neurons with monotonic activation functions.$*$
[Why not use] ones that are directed down instead of up? Increasing or decreasing doesn't matter, because this can be expressed by a change of sign of the weights that represent the influence of a neuron on another. Recall that if $f(x)$ is decreasing, then $f(-x)$ and $-f(x)$ are increasing.

$*$ You can observe that this is trading a more complex anatomy of the neural network for a simpler structure of the neuron. Is it worth it? I don't know. Often, when a neural network has some knowledge (usually after being trained to learn something) it is hard to identify in its structure which aspects correspond to which aspects of the knowledge. Potentially, as more research is done techniques could be developed for, in an already trained network, replacing blocks of neurons with a simple activation by a simpler block of neurons with more complex activation. I think that I am starting to talk science fiction with this surgery of neural networks.
Comment: @LancePollard By the way, they marked this question as a duplicate, but be careful with the answer in the linked question. They claim that non-monotonic activation functions would cause "choatic behavior during training, with the network unlikely to converge to a state that yields an accurate classifier." All of that can happen with monotonic activation functions as well. So, that is not really a reason.
Comment: _"also doesn't really add much"_ why not?
Comment: @LancePollard The sentence that follows that one explains it and the paragraph with the $*$ adds to it.


Requirement for a return ticket when visiting UK

Question: My friend - an American citizen is coming to stay with me in the UK long term soon.
She has a work visa and an updated vignette.
She is concerned that she will need a return ticket for the next day of her arrival just in case immigration decide to send her back.
Is she worrying unduly?
Comment: I did wonder whether this would be a better question for [Expatriates.SE].  But while this question is about a person who's staying in the UK long-term, the question itself does seem to be about the actual travel part of it; and therefore I would be inclined to let it remain open here.
Comment: If anything, she needs *the means* to buy a return ticket, rather than an actual ticket. But she is over-thinking it.
Answer: She is worrying unduly.  If there is any realistic chance of immigration sending her back, the airline won't let her on the plane from the US (they will get fined by the UK immigration authorities).
Now, we can't guarantee beyond any shadow of a doubt that she will not be sent back - but it is extremely unlikely.  The difficult bit was getting the work visa; the Home Office has already said she's welcome to stay in the UK as long as she likes.
As noted on a comment to the question, if UK immigration does reject her, she will be put on a flight - with or without a ticket.  The airline might then try to recoup the costs from her, but this is such a fantastically unlikely occurrence that she is much better dealing with those costs when they (don't) arise rather than buying a ticket which she won't use.
Comment: Thanks all. That's really useful and reassuring
Comment: People arrive at Heathrow every day as 'tourists' from the US and are sent back. Airlines have no way of telling who will be refused entry. The OP has a work visa. If she was claiming to be visiting for two weeks to 'look at the castles' and they found her diary in her baggage saying 'I'm moving to England to be with my online boyfriend' that would be different.
Comment: @MichaelHarvey "People arrive at Heathrow every day as 'tourists' from the US and are sent back." - do you have a feeling how many? and what percentage that is.  My suspicion is that it is actually very rare (as I said, the airline probably won't let them on the plane).
Comment: US citizens are 'non-visa nationals' and can arrive at UK ports of entry as tourists and be admitted without first seeking a visa if they do not intend to stay more than 6 months. If they are sensible they carry documentation tending to support the idea that they will leave within the time they are 'stamped in' for. If the immigration clearance officer believes they may overstay, are really intending to work, live with a UK resident, etc, they can refuse entry.
Comment: @MichaelHarvey Yes.  It can happen - but I suspect you are over-estimating how _often_ it happens.  I asked for specific figures (I couldn't find them in a brief search).
Comment: They don't publish figures, as far as I know. If not daily, then weekly.


Temperature control when adding new things into the pan when shallow frying

Question: Suppose I have a lot of pre cooked schnitzels that I want to fry in the pan. I begin by frying in batches, after adding the first batch, in sometime, all the pieces are cooked, however when I remove the cooked pieces and add the new batch, it seems so sometimes the new batch gets burnt because the pan temperature rises too high.  Is there a better way to fix this than simply turning the stove off for sometime?
Answer: This is about regulating the heat of your pan. You could use an infrared thermometer to help, then you can develop a feel for what is happening when you add food to your pan. Adding food to a hot pan will drop the temperature quite a bit. I often turn the burner up a bit when I add food, then dial it back as it cooks, and the temperature will come back up.  There are some variables at play, such as how much you are crowding the pan, the temperature of the food when you put it in the pan, how long you are cooking it, and the time between batches.
When cooking something that is coated or breaded, you have the added issue of loose bits remaining in the pan.  These overcook and burn, and often stick to the next batch. Maybe that is at least part of what is happening here. I would suggest is using a skimmer to remove any bits that fall off the first batch, before you add the next batch.
Comment: Another key variable is the base of the pan. Thin aluminium will both heat up and cool down faster than a sandwich base or cast iron
Answer: You shouldn't have turned it so hot in the first place.
The point of regulating the temperature is to preheat your pan+oil at the correct setting until it's at roughly the rough temperature, then add the first batch, and then leave it at that setting throughout the batches. The oil temperature will fall off somewhat when you add the new food (hopefully not too much - it's good to rest schnitzels at room temperature before frying them) and then go up again, but roughly, once you've gotten a feel for which setting is right for your combination of pan+stove, you'll stay with it from beginning to end.
What you're doing is selecting a setting which is too hot. You're not waiting for the pan to come to equilibrium, but adding the first batch while it's still heating up. This works more-or-less for the first batch, but since the pan continues to heat up afterwards, the later batches are at too high a temperature. You're then trying to correct for this by turning off the stove, then you have to turn it on again... basically you're manually doing the work of the temperature controller inside the stove, but way too coarsely, and with too large a delay.
The situation I described in my first paragraph is the optimal one. You can sometimes get away with the fast-and-overly-hot preheating when you have only one or two batches of food, because then the pan has not yet overheated when you turn it off. But you have to be quite adept at doing it, and the results aren't as good as when you have a properly, slowly preheated pan. And sometimes, when you have very many batches (e.g. with making crêpe after crêpe) with a heavy iron pan, it's almost impossible to avoid a slow creep up of temperature, and then you have to dial the stove down a mark after it becomes too hot. This is a much subtler regulation though, happening much later and in much smaller increments than what you describe.


How can the Nevada State Athletic Commission enforce the fines they give?

Question: How can the Nevada State Athletic Commission enforce the fines they sometimes give to athletes? I.e., if an athlete refuses to pay their fine (example), what can the Nevada State Athletic Commission do, aside from revoking their license to compete in Nevada?
Answer: Well, from the reference you link:

The commission, which is an agency of the Nevada Department of Business & Industry ...

As part of the government it can throw your ass in jail if you don't pay the fine. They would do this by following the due process of law. Basically the procedure would be to request an arrest warrant from a court, arrest you and bring you before the court.
Comment: "As part of the government it can throw your ass in jail if you don't pay the fine."  Not necessarily, that's why we have laws.  Are you claiming there is a statute prescribing imprisonment for failure to pay a NSAC fine?  Can you cite it?  What is the range of penalties?  What sort of legal process would need to be followed in order for such a penalty to be imposed?


An introductory text on expanders

Question: I am looking for a book that covers expander graphs rigorously. Preferably a book aimed at beginners.
Answer: The recent book of Emmanuel Kowalksi "An introduction to expander graphs" is very nicely written and covers a lot of material, from background to applications, with the description of the classical constructions.
A preliminary version of the book is freely available on Kowalski's webpage https://people.math.ethz.ch/~kowalski/expander-graphs.pdf
Answer: Elementary Number Theory, Group Theory and Ramanujan Graphs (Giuliana Davidoff, Peter Sarnak, and Alain Valette, 2003) is intended to make the construction of expander graphs accessible to advanced undergraduates. That's probably about as close to "beginners" as you're going to get for this sort of topic.
Comment: Sarnak also has an earlier book called "Applications of Modular Forms" which could also complement the reference mentioned above.
Answer: One should mention Lubotzky's lovely book "Discrete groups, expanding graphs and invariant measures" (1994), I think the first book written on the subject, which shows how the problem of constructing expander families connects to lots of other interesting mathematics.
My already-mentioned book with Giuliana Davidoff and Peter Sarnak was based on a master class I taught on the subject of Ramanujan graphs, itself based on a set of unpublished notes by Giuliana and Peter. Our aim is to present one family of expanders: the graphs of Lubotzky-Phillips-Sarnak (also constructed independently by Margulis). The prerequisites are those of a 2nd year master class: linear algebra, a standard course in algebra (groups, rings and fields), measure theory, some combinatorics.
The book "Expander families and Cayley graphs - a beginner's guide", by Mike Krebs and Anthony Shaheen (2011), starts lower in terms of prerequisites and has lots of drawings, tons of exercises, as well as students projects. Depending what kind of beginner you are, it may be more suitable...
Answer: I recommend "Elementary Number Theory, Group Theory and Ramanujan Graphs", quoted above in David Eppstein's answer.
There is also the following reference, that I know only a little bit but seems interesting.
Expander graphs and their applications
Authors: Shlomo Hoory, Nathan Linial and Avi Wigderson
Journal: Bull. Amer. Math. Soc. 43 (2006), 439-561
DOI: https://doi.org/10.1090/S0273-0979-06-01126-8

An introductory text on expanders


Trouble Installing Windows Server 2008 on Dell PowerEdge R720 w/ PERC H710 Mini

Question: Just picked up a Dell PowerEdge R720. I created a virtual disk with the PERC H710 Mini BIOS Configuration Utility 4.03-0002 and configured it for RAID 1.
When I then go to try to install Windows Server 2008 R2 64-bit the virtual disk I just created fails to show up and it doesn't show any drives in which to install Windows Server on.
What am I doing wrong?
I've tried downloading drivers from Dell but they only come as .exe files which I can not run when I am in the middle of trying to install Windows.
I will provide any other information that might be of help, just ask!
Answer: You should be using the LifeCycle Controller to install the OS, which will include the appropriate drivers for your RAID controller.
Comment: I never would have guessed. Do I access that through the setup menu using F2?
Comment: It should be F10 while the server is booting/posting.
Comment: +1 - It's very easy to miss if you've not seen the Lifecycle Controller used for this before. This is definitely the best way to go about it.
Comment: The Lifecycle Controller was not enough to me, I still had to load the drivers (but I'm using a R220). See: http://serverfault.com/questions/662829/trouble-installing-windows-server-2008-r2-on-a-dell-poweredge-r220
Answer: Lifecycle controller is the way to go.  I mount and OS ISO in virtual media in iDrac8 then boot to it after setting up OS deployment in Lifecycle.  It will then recognize the drives on the raid controller.
Answer: joeqwerty's answer is the best way to go. For obtaining the drivers for installing using the approach you were trying to take though, you can just download the "ZipPack" type EXE file, which is just a self-extracting archive.
The file for 2008 R2: DELL_MULTI-DEVICE_A02_R283425.exe
The file for 2008 x64: DELL_MULTI-DEVICE_A02_R283424.exe
This extracts to C:\dell\Drivers\W7X7H (for R2 - "93NDM" for 2008 x64) by default, and leaves you with the percsas2.sys driver and other files that can be used during OS deployment as needed. You can then place these files on removable media and browse for them when it's time to specify a driver during installation.
But again, the Lifecycle Controller is really the best way to go here - specifically, the Dell Unified Server Configurator feature. You can find instructions and detailed info on the process on this Dell TechCenter page. You'll use the UEFI GUI to start OS deployment, configure virtual disks, and select the CD/DVD to install from.
Comment: So if I use the Lifecycle Controller will it allow me to run an exe or will it recognize the blank drive to install on? Because right now if I try to install Server 08 by booting off a CD the drivers fail to load and it doesn't accept a .exe as driver files.
Comment: I'll clarify and edit my answer - you need to put the files on removable media (e.g. USB thumb drive) after you've extracted them on a different system first. I'll also add more info for deployment with the Lifecycle controller.
Comment: When I run the .exe on any machine which it wasn't written for it errors out.
Comment: You're using the ZPACK exe files that I linked in my answer? If the self-extracting file won't run, claiming incompatibility, you should be able to simply use an archiving utility (e.g. 7zip) to extract the file as if it were only a ZIP.
Answer: Even when installing with the Life Cycle Manager you need drivers and those of us using this as an ESXi host and installing through vSphere don't really have that option.  I think this link will provide you with what you need.  As you mentioned you DON'T need the exe files.
http://www.dell.com/support/home/cd/en/cdbsdt1/Drivers/DriversDetails?driverId=2V1CW.


Definition of chaos for maps

Question: I'm looking for a mathematical precise definition of chaos for maps as I don't find that much information on it on the web.
Comment: You probably won't find a definition that everyone agrees upon. But see https://en.wikipedia.org/wiki/Chaos_theory#Chaotic_dynamics.
Answer: I studied at least two ways of defining chaos on real-valued maps during my Chaos class. The first looks at the orbit. (Chaos: An Introduction to Dynamical Systems - Authors: Alligood, Kathleen T., Sauer, Tim, Yorke, James).
CHAOTIC ORBITS
Let $f$ be a map of the real line R andlet {$x_1,x_2,...$} be a bounded orbit of $f$. The orbit is chaotic if:
1) {$x_1,x_2,...$} is not assymptotically periodic;
2) the Lyapunov expoent $h(x_1)$ is greater than zero.
CHAOTIC MAPS
The other way of defining chaos for maps is looking at the map itself. Here we have an invariant set $I$ such that $f:I\to I$.
We say the map is chaotic if
1) periodic points are dense in $I$;
2) there is an dense orbit in $I$;
3) there is sensitive dependense to initial conditions.
Check out Yorke's book for more details and definitions used here you don't get (for example Lyapunov expoent).
Answer: The book Chaotic Dynamics on Nonlinear Systems by S. Neil Rasband is an accessible introduction to the theory,techniques and applications of chaos.

Definition of chaos for maps


How to add text on top of symbols for vector layers in QGIS

Question: I read the QGIS 3.2 Changelog and saw a new feature to add text on top of symbols for vector layers. Does anyone knows how to do this?
Comment: Just to avoid any misunderstanding, this feature is a LEGEND feature, meaning that the text is added on top of the legend, not on the map symbology
Comment: In ahmadhanb's example, how can I display the text in the symbols with the same colors as in the rule-based labeling of the layer on the map?
With the example of csk this works in principle. Only if I create the label based on a field, e.g. "code", the legend in the layout will not show one of the letters from "code" but the text [code] on the legend symbol. Testet with QGIS 3.10.5 (works with QGIS 3.12.2)
Answer: Right-click the the target layer -> Properties -> Legend and click on Set Labels from expression:

In expression you can write whatever you want, for example:
 substr( "FieldName",4,1)

Click Apply and OK

Output:
Answer: As J.R. pointed out, the feature mentioned in the 3.2 changelog is a LEGEND feature, meaning that the text is added on top of the legend, not on the map symbology. ahmadhanb perfectly explained how to implement this feature. If you want to display text on top of the map symbols, see below.
Here's how to add text on top of the symbols on the map:
Method One: non-repeating text (once per feature)
Open the Labels tab of the Layer Styling Panel. Choose "single labels" from the first drop-down menu. If your label text is stored in an attribute table field, select that field from the Label with dropdown menu. If you want to label each feature with the same text, simply type that text into the Label with text box, surrounded by single quotation marks. Eg, to display the text thisismylabel on each feature, type 'thisismylabel'.

Method Two: repeating text
In the Symbology tab of the Layer Styling Panel, add a symbol level. If using a categorized symbol, click the Change symbol button, then add a symbol level.
Change the new symbol level to a point marker, and change the marker type to font marker.

In the font marker section, scroll down to the symbol selector area. Click the 'data-defined settings button' next to the symbol selector, and choose the field with the label text.

Now you should see repeating text on every polygon.

To access the settings for how far apart the text markers are spaced, highlight 'point pattern fill' in the symbol layer display.


Should we add a series tag to identification questions that have accepted answers?

Question: Should we add the name of the identified series to the list of tags for identifications questions with accepted answers? Would it have any significant impact on SEO?
Comment: See also [Should we tag story identification questions with the name of the author?](http://meta.scifi.stackexchange.com/questions/671/should-we-tag-story-identification-questions-with-the-name-of-the-author) on [scifi.se]. But note that we do not follow the policy laid out in the highest-scoring answer: we do not retag identification questions based on their answers (and for good reason: it doesn't make much sense to do so).
Comment: Btw, we're discussing this in chat right now: http://chat.stackexchange.com/transcript/message/8255325#8255325
Answer: Others have addressed the whole "Tags identify attributes of the question" already, so let me piggy-back a bit on the point from Gilles.
Certainly, having a tag in the title will increase searchability... based on including that tag's content in the search string. Which is where the logic of its benefit is starting to fall into a logic gap for me.
The entire class of question is based on the premise that the title is an unknown element - that's the whole purpose behind asking the question. Furthermore, it is knowledge of the title which is, entirely, the solution to the problem at hand. Thus, knowing the title invalidates the need to ask the question entirely.
Adding the solution to the searchability means that we increase the visibility of... nothing. The question is of absolutely no use to those who already know what the name of the series is, by virtue of the fact that the sole and complete contribution of the solution is the name of the series. The people who can search for the title gain absolutely no benefit to finding this content, since this will not be a problem they are searching for. If anything, it may even be problematic as this will turn up as a search result for unrelated inquiries they happen to be asking about the series itself, giving them worthless data.
To those who do have the same problem, it provides no benefit. They cannot take advantage of the increased searchability because they don't know the title that they can use to help locate the question.

Internal to the system and stepping out of the Google search implications, tags serve to identify what the problem is about, so that questioners can find people with the same problem, and that answerers can identify places that their expertise is needed. There is a difference between "What a problem is about", and "What a problem is solved by" - especially since the latter may have more than one component. This is why we only tag based on the former concept - if we tagged on every potential solution to each problem, then tags would be bloated with excess information that makes finding things more difficult. To further in this point, tags are only an attribute to the question, not to its answers, and thus the logic of tying a tag to its question is written into the system.
For programmers, a Stack Overflow style example of this argument can be found here. It can be read on a more general component even if you're not a programmer, but if you don't feel like breezing through that, that's fine.
Think outside the context of identification, and put aside the issue of tag granularity for this example - a problem about how to shoot Gohma in the eye when her claw is blocking it is fundamentally different from a problem about how to open the door to Undine's lair, which involves shooting a statue in plain sight in the eye. That they both involve shooting things in the eye does not cause the latter to be grouped with the former on the grounds of shooting things in the eye, because the latter is not a question about shooting things in the eye, but about accessing lairs. You would not tag the latter question with a tag about shooting things in the eye. If there was an alternate entrance to Undine's lair involving bombing cracked walls, then that makes a tag about shooting things in the eye even less applicable because it may not even be necessary. Arrows will be the optimal solution because bombs are extremely expensive and heavy, and thus that is the accepted answer, but that still doesn't make it a component for the tagging. Tagging it as such would only make the whole system confusing.
To use a less confounding example, if that was hard to follow, if someone needs to accomplish Task X, and the solution, wholly and straightforward, is to use Strategy Y, then this is not a problem that is about Strategy Y. We would not classify Task X under Strategy Y because people who are looking for problems about Strategy Y would not be looking for Task X - Task X is already a solved problem for them by virtue of them knowing Strategy Y. We especially would not classify Task X under Strategy Y if there was also a Strategy Z that was equally capable of accomplishing Task X. Then Strategy Y isn't even necessary for Task X, and people who are seeking Task X wouldn't know to search for Strategy Y (or Strategy Z). Had they known to search for those, they probably wouldn't need to ask about Task X in the first place.

That's rather the whole of it. The searchability benefits don't really manifest to anyone's favor as they don't increase visibility to those who would need to find it. Questioners won't know to look for the series as that is the item they are wholly seeking. Answerers won't look for the series because seeing that present is a clear sign that their help isn't even needed.
Comment: +1 I like this argument. But now I'm feeling the same thing as Krazer did in chat as we're basically back to square one since ther isn't much to gain or lose with adding the tags.
Answer: If you're asking whether we should add tags with the series to identification questions, then the answer is no, this is as far as I know the usual practice on the SE sites.
Tags should classify questions, not questions-after-they-have-been-answered. If the OP didn't know it was that series, then you should not add the tag. It would make the question silly (the asker doesn't know the series but the tag is there).
The keywords in the answers are enough.
Answering to comments: First of all the fact that tags appear in the question. Answers do not carry tags, so tagging a question according to its answers has no logic. Second, the tags appearing on a question, classify it: what it's about, etc. But the OP cannot tag something which he's asking. Consider this: if a user asks about a proper sentence in a language and his example has a mistake, do you fix his mistake in the question? No, because then the question would not make sense anymore.
Comment: Is there any objective and conclusive evidence that this is actively detrimental to the site? The reason why I supported the retagging is because it aids in searchability without any drawbacks. If you can provide this evidence we'll happily reverse the decision.
Comment: I agree with this. Retagging a question should happen when the *question* should have been tagged that way in the first place (i.e. the OP wasn't aware of the tag or tagged wrongly). Tagging based on the answer seems silly to me.
Comment: @Mysticial I added the reply to your comment in my answer.
Answer: Yes
As you mentioned, it will help with Search Engine Optimization (SEO).
Furthermore, it lets you find all the identification-request questions associated with a specific series.
Comment: I don't think it helps with SEO most of the time, because if the series is obscure enough to need an identification question it probably also will have fewer questions tagged than [tag:identification-request]. But I still see no reason not to do it.
Comment: Also, the name of the series will be in the first line of the answer, usually. So that'll come up on a keyword match.
Comment: This is not common practice and it's not consistent with how the SE sites work. Tags classify a question *as is* and not according to its answers. You tag questions, not answers.
Comment: @Eric That works for the SE search. But for a google search, keywords in the answer have very little weight to it. Even keywords in the tag are almost useless, but the automatic appending of the tag to the title will do it.
Comment: It's a hard comparison since our StackExchange doesn't come up on Google's first page much yet. But I have definitely seen SO come up with "Top Answer" on Google with the keywords highlighted. Plus, I'm not a huge fan of a policy that says "All ______ questions *must* be edited when answered."
Comment: They don't *all* have to be edited. But I'd say it's optional. Do it whenever you want.
Comment: This makes as much sense as tagging all questions on [so] `c#` because it brings more SEO than  `brainfuck`.
Answer: No, you should not. People who are searching for identification questions do not know the name of the series. Classifying identification questions under the name of the series, as opposed to under a theme tag (e.g. robots) or under identification-request, would be counter-productive.
Comment: See my comment on Alenanno's answer. Could you explain the "counter-productive" part. What is being counter-productive? How does it actively harm the site?
Comment: @Mysticial It's counter-productive because you're making the question more visible to the people who don't need it and less visible to the people who do need it.
Comment: "People who are searching for identification questions do not know the name of the series." - is this always true? This just came up at http://anime.stackexchange.com/questions/11567/which-pretty-cure-anime-are-these-two-images-from
Comment: @Random832 Identifying an episode in a series is a special case. Yes, in that case the series tag should be there from the start.


Can anyone explain the connections among ring, semiring, algebra, sigmaalgebra in the scope of measure theory?

Question: Can anyone explain the connections among ring, semiring, algebra, sigma-algebra in the scope of measure theory and why are these concepts important?
Answer: A Ring is a family of sets $\mathcal{R}$ such that:

$A \setminus B \in \mathcal{R}$
$A \cup B \in \mathcal{R}$

A Semiring is a non-empty collection $\mathcal{S}$ of sets such that:

$\emptyset \in \mathcal{S}$
If $E \in \mathcal{S}$ and $F \in \mathcal{S}$ then $E \cap F \in \mathcal{S}$.

If $E \in \mathcal{S}$ and $F \in \mathcal{S}$, then there is a sequence of mutually disjoint sets $C_i \in S$ for $i=1,\ldots,n$ such that $E
   \setminus F = \bigcup_{i=1}^n C_i$.

An Algebra is a non-empty collection $\mathcal{A}$ of subsets of $X$ such that:
 - If $E \in S$ and $F \in S$ then there exists a finite number of

$X \in \mathcal{A}$
If $A, B \in \mathcal{A}$, then $A\setminus B \in \mathcal{A}$.

A $\sigma$-algebra is a non-empty collection $\mathcal{F}$ of subsets such that:

$\emptyset \in \mathcal{F}$
If $E \in \mathcal{F}$, then $E^C \in \mathcal{F}$
If $E_1, E_2, \dots$ is a collection of sets in $\mathcal{F}$, then $\cup_{i=1}^{\infty}E_i \in \mathcal{F}$.

The point of these structures is that you can work with from the simpliest structure ultil the "richest" structure. There are some theorems that construct one structure from other.
The concept of $\sigma$-algebra is essential to understand many others concepts in measure theory and in probability!
Comment: Thanks for the intuition. I do know the definition of these terms. I guess what I am asking is the connection among them. You mentioned that "you can work with from the simpliest structure ultil the "richest" structure". How is that accomplished?


using google js api to authenticate the user and get the google id of the user

Question: I'm using this as a reference:
https://code.google.com/p/google-api-javascript-client/wiki/Authentication
I'm trying to authenticate a user and then fetch his/her google_id after auth.
I have a button called "login with google" and when the user clicks on it, it launches a popup that asks if he/she wants to give authorization to the app. After that
it throws an error saying "bad request" and "400 not found" when it tries to do a GET on this
https://www.googleapis.com/discovery/v1/apis/plus/v1//**/*** 400 (Bad Request)
I'm using the same code as described in the above mentioned api.
I also crosschecked the api key and client id, but everything seems fine.
Any help on this?
Answer: Your best bet is to move to Google+ Sign-In. It uses the same JS client but does a lot of the hard work for you.


USB audio input has unusable amount of static

Question: I'm using a raspberry pi zero to record audio. I have a usb audio dongle plugged in to it for the microphone. However, when I record with it, the input is EXTREMELY staticy. It's pretty much unusable. I tried plugging in the microphone into my computer and it works fine. I also tried a different microphone with a different USB input device and that was still unusable. What should I do?
Comment: Can you please explain the noise "staticy" ? Do you mean low frequency hum or literally wideband noisy static ?
Answer: first try this:
arecord -f s16_LE -r 8000 -d 10 test8k.wav
and record "This is 10 seconds of 8 kilo-hertz 16 bit mono"
then play it back:
aplay test8k.wav
Much better?
<code>========== If audio output is too soft - in command prompt can do:
> alsamixer
          s (select card)
          downarrow to "0 bcm2835 ALSA"
          8      (4=default loudness, 8=100%, 9=125%)
          Escape (press Esc) then make setting default:    sudo alsactl store 0
</code>


What does $\partial\phi$ mean for a scalar field $\phi(\vec{x},t)$?

Question: If I have a scalar field $\phi \equiv \phi(\vec{x},t)$, and the Lagrangian density is
$$\mathcal{L} = \frac{1}{2}(\partial\phi)^2 + ...$$
what does $\partial\phi$ mean or in other words how do I expand $\partial\phi$ out?
Answer: I believe that $\partial$ has no index because it is being squared. What really is written is
$
(\partial \phi)^2 = \partial_\mu \phi \partial^\mu \phi
$
which has no indices. Therefore, the author writes $ \partial $ without indices to indicate that the resulting object is a scalar.
Answer: It depends on the context and it should say somewhere in your textbook. Often it is a shorthand for
\begin{align}(\partial \phi)^2&=(\partial_\mu\phi)(\partial^\mu\phi)\\
&=\eta^{\mu\nu}(\partial_\mu\phi)(\partial_\nu\phi)
\end{align}
where $\eta_{\mu\nu}$ is the Minkowski metric. Depending on your textbook the Minkowski metric is either $\text{diag}(-1,+1,+1,+1)$ or $\text{diag}(+1,-1,-1,-1)$. I used brackets to be precise but usually this term is written as $\partial_\mu\phi\partial^\mu\phi$.


Pulling featured articles from another remote Joomla install with images via RSS or otherwise

Question: I am looking at taking the featured articles from one Joomla site (via RSS at least) and pulling it into another Joomla site (or more). The only problem is that I require the featured article's image to appear alongside with the articles, which of course will not appear in the RSS, just the content itself.
Is there a way to override com_content's feed view so then it is either in the format that I want it to be in on the second site, or is there yet another method (like an API) that could be used for pulling in that content?
Edit: I did look at the Joomla! community blog article on overriding code, but it is from about 5 years ago
Answer: I can't say with 100% certainty that this will work as I've not used it on the file you're interested in, but I've been able to override everything I've wanted to so far without hacking the core Joomla code.:

Read How to override the component mvc from the Joomla! core
Try this plugin

Once you've have the plugin figured out, you'll see that you can copy the file that formats the RSS into a folder of your choosing within the plugins folder, and when the plugin itself fires, it will locate and use your copy of it instead of the original.
Answer: I am sure that you could pull any things from RSS feeds into your Joomla site. I used obGrabber and it is my suggestion!


Restart a windows 7 machine programmatically

Question: I have a requirement to trigger a reboot on a windows7 machine programmatically. This is to support a scenario for customers where when they log out of an intenet kiosk machine the machine reboots. On XP this was achieved using WTSSystemShutdown but Im wondering if theres another way. Any pointers greatly appreciated.
Answer: You can call ExitWindowsEx to restart, shutdown, logoff, etc.
Use InitiateShutdown (Vista) or InitiateSystemShutdownEx (Win2k or higher) to shutdown a computer remotely.
Answer: I answered a similar question here (complete with sample code):

Log off user from Win XP programmatically in C# (ExitWindowsEx)

Just change the uFlags parameter to ExitWindows.Reboot.


prevent virus code modifying commonly run executable files?

Question: I have recently been looking into 'cyber essentials questionnaire' and I came across the question "Other than anti-virus software, are access control measures in place to prevent virus code modifying commonly run executable files?", are there any practices that would be put in place to deal with this other than the anti-virus software as mentioned?
Answer: The question is pretty descriptive: on a secure system, you make sure regular users cannot write to the folder containing your executables. On most OS, that is already done by default.
On some OS, this can be strengthened through several techniques, including requiring the executables to be signed or limiting the locations where executable code can be located.
It's not 100%, mind you: there are several techniques that can be used to work around the limitations but it's a good and (usually) easy to implement step for hardening a system.
Comment: I'd also add it's not just the folder containing the executables but also ensuring a user's configuration files cannot be modified by other users. There has been a recent trend in people exploiting the KeePass config files to leak the credentials it contains. As a relevant but aside, you might also want to restrict access to sensitive tools such as Wireshark etc. to further reduce your attack surface (assuming you make it difficult for users to download and install the software too). Don't forget not to run with Administrative user privs when you don't need them too (and use UAC on Windows)!
Answer: One such method is signed executables. This is a cryptographic signature on executables, that can verify that the code originated from a trusted supplier (e.g. Microsoft) and that it has not been tampered with.
Answer: There are a lot of different tools in the market that can monitor the integrity of key executables and ensure they are not tampered. The idea is simple, the solution creates a whitelist of the applications and key files (using hashing algorithms) and constantly monitor those files, checking their hashes against the whitelist created.
If you're looking for a "fancy" solution, I could recommend you something like the McAfee Solid Core which does not only the hash monitoring but also several other checks.
Otherwise, you can code yourself a script that constantly take hashes (SHA512) of key files and compare to a whitelist. If a hash is different from your whitelist the script could send an email to you. It's not as good as a full commercial solution, but help to identify if someone changed a file.


Novel about boy facing the apocalyptic beliefs of his family

Question: I read this children's novel by getting it from the library, but I gave it back and can't find it again no matter where I search. The plot is about a boy whose father believes that "signs," omens, and events show that the end of the world is coming soon. The family has to build an underground shelter to prepare for this,  but the boy starts having doubts and has to choose between family and the outside. The cover includes a starry,  dark night sky. The title is three words: first one is "chasing," "running," or something similar, the second is "the," and the third is "night, " "dark, " "stars, " or something similar. I have been looking up combinations of such words,  but the results so far weren't of the book I was looking for. It was published fairly recently. In the version I read, there was an advertisement for another book,  which was about children who were told they lived after the world's end, but the tale they were told was doubtful.
Answer: Watch the Sky by Kirsten Hubbard

The signs are everywhere, Jory's stepfather, Caleb, says. Red leaves
  in the springtime. Pages torn from a library book. All the fish in the
  aquarium facing the same way. A cracked egg with twin yolks.
  Everywhere and anywhere. And because of them Jory's life is far from
  ordinary. He must follow a very specific set of rules: don't trust
  anyone outside the family, have your works at the ready just in case,
  and always, always watch out for the signs. The end is coming, and
  they must be prepared.
School is Jory's only escape from Caleb's tight grasp, and with the
  help of new friends Jory begins to explore a world beyond his family's
  farm. As Jory's friendships grow, Caleb notifies Jory's mother and
  siblings that the time has come for final preparations.
They begin an exhausting schedule digging a mysterious tunnel in
  anticipation of the disaster. But as the hold gets deeper, so does the
  family's doubt about whether Caleb's prophecy is true. When the stark
  reality of his stepfather's plans becomes clear, Jory must choose
  between living his own life or following Caleb, shutting his eyes to
  the bright world he's just begun to see.
Comment: Thanks so much,  @Ayshe!  I guess I couldn't find it because I somewhat misremembered the title,  so it's amazing you found it so fast.  I feel so relieved!


how to send custom html verification email?

Question: I want to replace the default verification email of Laravel 5.8 with my own HTML email, so, I tried to search in controllers to see where it is getting generated so I can replace but I could not find it.
My question exactly is: how can I replace the default verification email in Laravel 5.8? and how to access the same parameters that are in the default emai? for example the token and the username.
Answer: You can override email templates. You need to run this first:
php artisan vendor:publish --tag=laravel-mail

Now in your resources/views/vendor/mail, you can customize the the email templates or create your own HTML templates there. The standard method is to customize or extend the default email templates come with Laravel.
But sometimes you may need to use an entirely new email template. In that case, simply place the new email template (inlined-version) in resources/views/vendor/mail directory and use that template using view() method in your mailables.


What does "ALTER DATABASE ... SET NEW_BROKER" do? Is there anything to worry about?

Question: I'm having an issue with sql broker service. Is there a reason to worry about setting a new sql broker service? I'm really worried about doing this, but I'm kind of at my wits end since I know it will clear out the message queue to send out, but is this the only thing I need to worry about? Is there anything else that I should be looking for or that has to be done when I do run this statement?
Comment: You're asking about a possible fix, but what is your actual root problem?
Comment: @ThomasStringer I think this is: http://dba.stackexchange.com/questions/56703/issues-with-tempdb-mdf-file-ever-increasing
Comment: I'm more concerned with the fact that if I set a new broker, what I have to worry about doing to make sure my instance of service broker is back to how I just had it. Is there a way to batch delete messages out of the sys.conversation_endpoints table? I know about running an infinite while loop, just wondering
Answer: Only if your database participates in distributed conversations. NEW_BROKER changes your service_broker_id. If you created any route with service name and service instance then it will become invalid as the route service instance value no longer reflect the destination service_broker_guid. It goes w/o saying that doing NEW_BROKER on a database that does have running conversations that span isntances (or even DBs in the same conversation), these conversations will have one half 'nuked' and the other half will be left stranded, unable to make any progress (will have to be cleaned up with END ... WITH CLEANUP or the other database will also have to be NEW_BROKER-ed).
Be aware that NEW_BROKER affects hidden conversations like the ones created by Event Notifications.
If everything you have is local, in the same db, then you have basically nothing to worry about.
Comment: thanks for the help remus, all of the service broker messages, queues, etc...are in the same db, but we have messages coming from other servers/db's going to service broker and then going to an instance of mongodb, which in turn sends back an id to indicate the message was received...going by the structure that was put around our instance of service broker, i'd have to test in another environment to truly gauge the effects it'll have. Didn't know that setting a new broker actually affected event notifications...something to chew on. Thanks for your help again remus


Why do my friend's glasses make things look blurry when I put them on?

Question: Yesterday I tried on my friend's glasses and noticed that they made everything look blurrier and farther away. If they do this to my vision, how can they make things look clearer and closer for him?
Comment: For your friend, his glasses make things look clearer AND further away (if he is nearsighted).  If his sight isn't too bad then he may not even be aware that things look smaller.  Ever notice how a person's eyes look the wrong size through glasses?
Answer: Glasses are meant to correct defective vision. In some sense your friend's eyes have "somebody else's glasses" on all the time, so the world looks blurry to him. The glasses he wears "undo" the problem of the other glasses and make the world clear again.
The strength of glasses is sometimes expressed in diopters. Perhaps your friend has eyes that have a +2 "error". By wearing -2 glasses, he is back at zero error. But if you, with your good eyes, put on the -2 glasses, you end up with a -2 error, and blurry vision.
This can be explained with detailed physics - but from the question I expect you are looking for this qualitative answer. Please comment if you need more detail.
Some nice diagrams are given on the hyperphysics site - from which I reproduce just one:

To see things in focus (not blurry), the lines that represent the rays of light have to intersect at the retina (the light sensitive surface on the back of the eye). A good lens will do this - a defective lens will either focus in front of the retina, or behind it. An additional lens puts the intersection at the right place. But if you are "correcting" for a mistake that isn't there, you create a problem that wasn't there.
Comment: No, that's the kind of answer I was looking for. Thanks!
Answer: The above answer is good. Thought I would just give a more visual explanation for you. Blurry vision is usually caused by the focal point being either before or after the retina. Glasses move the focal point. If your focal point is correct, putting on your friends glasses moves your focal point to the wrong place, causing blurriness.

Image from Bing Search: Originally found on http://www.slipups.com but has since been removed from that site.
Comment: If you didn't make that image yourself, you should give proper attribution to its source.
Comment: Quite right. I have tried to add a proper attribution, not sure if that is right or not. I only added this because for me the image says it all. I just thought it might help clarify the point. Sorry for the omission.


Can one relate the frequencies of vibrational modes within a molecule to the molecule's HOMO/LUMO energies?

Question: Can one relate the frequencies of vibrational modes within a molecule to the molecule's HOMO/LUMO energies?
Comment: No researched question is dumb.
Comment: There are 3N-5(6) vibrational modes of a molecule and a single HOMO-LUMO gap. What kind of relations are you looking for?
Answer: No, I could not think of any relation between them. Orbital energies are solutions of the electronic Schrödinger equation, and as such, they describe the electronic state of a molecular system. Vibrational frequencies are solutions of the nuclear Schrödinger equation, and as such, they describe the nuclear state of a molecular system. The quantities that describe the electronic state are not related to the quantities that describe the nuclear one simply because they describe two different subsystems: the electronic and the nuclear one.
Note that usually we treat these two subsystems as being independent of each other (the Born-Oppenheimer approximation), but even if you go beyond that, what you'll see is that changes in the nuclear subsystem (say, changes in geometry during vibrations) might affect the electronic state. Consequently, molecular vibrations in principle can alter HOMO/LUMO (as well as any other orbital) energies, but I doubt this interdependence of electronic and nuclear states is the relation you're looking for.
Comment: @Musicpulpite, so, if I understand you correctly, you would like to somehow estimate the excitation energy from the knowledge of vibrational frequencies for the molecule in its ground as well as in an excited state. If so, then, as I said, I don't think there is a relation between two. And besides, the "HOMO-LUMO gap" (the energy difference between HOMO & LUMO) should *not* be used to estimate the excitation energy anyway.
Comment: Right. Slight changes in orbital shapes and energies during vibrations is not what I am looking for. I was hoping that since HOMO-LUMO transitions within a molecule correspond to new localizations in a molecule that you could get a numerical value for  delataE based on differences in two vibrational modes. But your answer is thorough and makes sense. Thank you.


Upgrading late 2011 MacBook Pro to SSD drive

Question: My MacBook Pro currently has OS X Yosemite installed. I am upgrading the hard drive to an SSD. I understand you have to download the software to a bootable USB. Which software should I download, Yosemite or the original software that came with the MacBook?
Comment: If you have Yosemite installed, you should have the ability to do [Internet Recovery](https://support.apple.com/en-us/HT201314) which will reinstall Yosemite.  Before you begin any upgrade, you can test see if this works by booting your Mac while holding Cmd-R.  If you want to upgrade to El Captain, you can either download and create the USB installer manually, or upgrade your existing install to El Cap then do Internet Recovery on the new drive.  There is no need to go back to the original OS that came with your machine.
Comment: @Allan: I assume Internet Recovery installs the version of OS that was preinstalled when a Mac is shipped from Apple. For this Mac, that would be OS X 10.7.
Comment: Using Cmd-R will install the ***last*** version of the OS installed; in this case Yosemite.  Cmd-Option-R will install the ***original*** version that came with the machine.  I have never tried it with anything less than 10.9, so I couldn't tell you if it would install 10.7 or not (I doubt it)
Comment: @Allan: Yes, but Cmd-R requires a Recovery partition. Chris intends to replace the existing HDD with a new SSD. Therefore, there will be no Recovery partition to boot from. Granted, because there is no Recovery partition, the computer may revert to Internet Recovery, but this will result in installing OS X 10.7.
Comment: @DavidAnderson  See the link I posted about Internet Recovery.  You don't need a recovery partition to boot Internet Recovery.
Comment: @Allan: Yes, but booting via Internet Recovery results in installing the version of OS X that came with the computer. There is no way for Internet Recovery can verify if the user has a Yosemite license. You can not access the App Store from Internet Recovery.
Answer: If you bought Yosemite in the past, you can see if this version of OS X appears in the App Store as items you purchased. If so, you should be able to download the installer.
The instructions to create a bootable installer are given at the Apple web site: Create a bootable installer for OS X. Below, I have include a excerpt from this site.
Use the 'createinstallmedia' command in Terminal

Download the OS X installer from the Mac App Store. Quit the
installer if it opens automatically after downloading. The installer
will be in your Applications folder.
Mount your USB flash drive or other volume. You could also use a
secondary internal partition.
Open the Terminal app, which is in the Utilities folder of your
Applications folder.
Use the createinstallmedia command in Terminal to create the
bootable installer. Examples of this command are in the next
section. For detailed usage instructions, make sure that the
appropriate Install OS X app is in your Applications folder, then
enter one of the following paths in Terminal:

Path for El Capitan:
/Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia

Path for Yosemite:
/Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia

Path for Mavericks:
/Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia

Examples
This is the basic syntax of the command. Replace volume path with the path to your USB flash drive or other volume, and replace installer path with the path to the Install OS X app.
createinstallmedia --volume volumepath --applicationpath installerpath

Example for El Capitan:
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

Example for Yosemite:
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Yosemite.app

Example for Mavericks:
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Mavericks.app

If you can not download Yosemite from the App Store.

Note: What is written below has only been tested on Macs that are not using Core Storage.

Another alternative would be to create bootable USB flash drive OS X Recovery Disk. Basically, you would be coping your Recovery partition to a flash drive. You can the boot to this flash drive to download and install Yosemite on your SSD.
To create this Recovery Disk, you will need to download the OS X Recovery Disk Assistant v1.0. Even though Recovery Disk Assistant only refers to Lion and Mountain Lion, the Assistant will also work with Yosemite.
Using you HDD as the external bootable installer.
You could try purchasing USB external drive enclosure for your HDD. Or at least, purchase a SATA to USB adaptor. You then could try booting to the Recovery partition on the HDD. If successful, Yosemite could then be downloaded and installed on the new internal SSD.
If there is no way to perform a new installation of Yosemite.
This solution requires creating a El Capitan USB installer flash drive and connecting the HDD via a USB port.
Boot from the USB installer and launch the Disk Utility application. Create a partition on the new SSD. Restore the Yosemite partition from the HDD to the SDD. This is referred to as cloning.
Note the following:

The two drives may need to be using the same sector size. There are
only two sector sizes currently in use: 512 bytes and 4096 bytes.
You made need to reduce the size of the hard disk partition to be
smaller than the SSD partition. You may need to do this while booted
to Yosemite on the HDD.


Touch-screen, 3 H-bridges and 3 sensors on Arduino Nano 3.0

Question: I am using an Arduino Nanao andI am wondering if there is a way to connect an 2 inch touchscreen, 3 H-bridges (it takes 3digital pins to power one of them and 1 additional to control the voltage) and have 3 analog pins left for sensors?
Answer: I think, that there is at least one I2C touchscreen (eg. https://www.adafruit.com/product/1947 )(I2C need 2 pins - SCL(A5)+DATA(A4) - given by HW) and if you need 3x3=9 digital pins for setting direction, you can use also I2C multiplexer on the same 2 pins (http://playground.arduino.cc/Code/I2CPortExpander8574). So you are left with need for 3 PWM pins from (D3,D5,D6,D9,D10,D11).
So there is a way for sure.


Problem With interfacing of 16 Servo MG996R with Arduino Uno

Question: I am using 16 MG996R servo motor with PCA9685 servo driver with Arduino Uno, but the motors are not working properly. What is the best power supply/battery for my project as it worked well earlier but is not working right now.
Comment: You need a power supply that is rated for the same voltage as your servos, and can provide *at least* the total amount of current for all the servos combined.
Comment: which part of your question is about the Arduino?
Comment: I am interfacing PCA using Arduino Uno
Comment: Same case here.... Have you solved the problem yet?
Thanks so much!
Answer: I use a 2s battery setup. Specifically Tenergy 18650 Lion 2600mah 7.4v. These are PCB protected lithium battery packs.
I use 3 of them in parallel 7.4v  7800mah.
BTW. I also use a UBEC rated at 7 amps to bring the voltage down to 6v.


What are the upper bound and stability conditions for the following simple linear system?

Question: Consider the following  linear system
$$\dot{x}=\sum\limits_{i=1}^{m}{{{\alpha }_{i}}}\left( t \right)\cdot {{A}_{i}}\cdot x \quad (1)
$$
where, $x\in {{\mathbb{R}}^{n}}$ represents the state vector, $\sum\limits_{i=1}^{m}{{{\alpha }_{i}}}\left( t \right)=1$, ${{\alpha }_{i}}\left( t \right)$are functions and ${{\alpha }_{i}}\left( t \right)>0$, ${{A}_{i}}\in {{\mathbb{R}}^{n\times n}}$ are constant matrices, $i=1,\cdots ,m$.
Once system (1) is stable , then the  Euclidean norm of vector $x$ is bounded. Now, the questions are as the following: 1) what's the upper bound for $\left\| x \right\|$ when system (1) is stable; 2) what's the stability condition for system (1)? (Lyapunov function may be an appropriate and conventional method to derive the conditions for the stability of system (1).)
Answer: This is a more general case than the one of a switched dynamical system: it is obtained as the case in which $\alpha_i(t)$ are constant along discrete time steps of length $h$, and at each of these time steps one of the $\alpha_i(t)$ is one and all the other ones are zero).
As you can read a few lines above on the same Wikipedia page, that special case already is an undecidable problem, and even approximation algorithms are NP-hard.
Comment: Thank you for the answer. In fact, an upper bound of stable system (1) is my concern. Maybe, it is difficult to obtain solution for system (1). Nevertheless, an appropriate upper bound of the state vector norm for system (1) may be not a difficult problem.
Answer: I realize I came across this question late, but decided to answer in case it's of any help. Thinking the original dynamics as a linear time varying system $\dot{x}(t) = A(t) x(t)$ with $A(t) = \sum_{i=1}^{m}\alpha_{i}(t)A_{i}$, the state can be solved as $x(t) = \Phi\left(t,0\right)x_{0}$, where $x_{0}$ is the initial state, and $\Phi\left(t,\tau\right)$ is the state transition matrix. It is well known that if $A(t)A(\tau) = A(\tau)A(t)$ for all $t, \tau$, then the state transition matrix $\Phi(t,\tau) = \exp\left(\int_{\tau}^{t}A(\sigma)d\sigma\right)$.
If the OP's matrices $A_{i}$ pairwise commute, then indeed $A(t)A(\tau) = A(\tau)A(t)$, and the state transition matrix $\Phi(t,0) = \prod_{i=1}^{m}\exp\left(A_{i}\beta_{i}(t)\right) = \exp\left(\sum_{i=1}^{m}A_{i}\beta_{i}(t)\right)$, where $\beta_{i}(t) = \int_{0}^{t}\alpha_{i}(\sigma)d\sigma > 0$. The stability condition then boils down to the norm of the state transition matrix being bounded: $\parallel \Phi(t,0)\parallel \leq \gamma$ (uniform stability), $\parallel \Phi(t,0)\parallel \leq \gamma \exp\left(-\delta t\right)$, for some $\gamma, \delta > 0$ (uniform asymptotic stability).


How do I create an identity matrix of arbitrary size in Java?

Question: Is there a utility to create an identity matrix of specified size in Java?
Comment: How is this not someone asking for university homework?
Comment: It's even tagged with don't-come-near-me...
Comment: @Justin, I tried to turn the question into something a little more useful and less homework-y.
Answer: Try Apache Commons Math for commonly used linear algebra:
// Set dimension to the size of the square matrix that you would like
// Example, this will make a 3x3 matrix with ones on the diagonal and
// zeros elsewhere.
int dimension = 3;
RealMatrix identity = RealMatrix.createRealIdentityMatrix(dimension);

Comment: It is now `RealMatrix identity = MatrixUtils.createRealIdentityMatrix(dimension);`.
Answer: If you just want to use a 2 dimensional array to represent the matrix and no 3rd party libraries:
public class MatrixHelper {
  public static double[][] getIdentity(int size) {
    double[][] matrix = new double[size][size];
    for(int i = 0; i < size; i++) matrix[i][i] = 1;
    return matrix;
  }
}

Comment: I would only loop the diagonal as `new double` already creates a zero-filled array... despite not being a *great* difference.
Comment: @CarlosHeuberger .. good idea. 5 years later, I've updated my answer :)
Answer: I recommend Jama for all your matrix needs.  There's a call to generate an identity matrix (see the identity method).
Answer: A memory-efficient solution would be to create a class like so:
public class IdentityMatrix{
     private int dimension;

     public IdentityMatrix(int dimension){
          this.dimension=dimension
     }

     public double getValue(int row,int column){
          return row == column ? 1 : 0;
     }
}

Comment: You don't really need the constructor and the private variable though.., and you can make getValue static.


In zero gravity!

Question: If spacecraft moving in a stable speed or acceleration suddenly stopped would an astronaut continue moving forward (such as a man in a train) ?
Comment: One of the most important ideas in physics is that the laws describing how things work in one place should be the same laws that describe how things work in every place. The explanation of what happens to passengers in a train crash uses the word "momentum," not "gravity." The explanation for what happens to passengers in a spaceship crash should be no different. (except for the speed and energy, which may be several orders of magnitude greater in the spaceship case.)
Comment: @safesphere, It's not an answer if it doesn't explain "momentum." I'm too lazy for that.
Answer: "Zero gravity" is something that doesn't exist. Maybe you mean the situation of freely orbiting spacecraft, in which cosmonauts don't feel any attraction as they are orbiting together with the spacecraft.
Yes, the astronaut will continue to move forward, with all tragic consequences for him.

Note:
In the case of stable or unstable acceleration the astronaut will feel the attraction (in the opposite direction of the acceleration), even if spacecraft don't stop.
Comment: A different way of saying the same thing is: You can't feel a uniform gravitational field. What you feel here on Earth that you don't feel on board the space station is the _contact force_ that the Earth exerts on the soles of your feet as it stops you from following the path that gravity and momentum want you to follow. On board the ISS, _nothing_ prevents you from following that path.
Comment: Why do you say the astronaut will feel the attraction.  If he's strapped into a seat he will feel the straps pulling against him, and if he is floating inside the spacecraft he will feel the splat when he hits the wall, but he doesn't feel any "attraction".
Answer: Yes, the astronaut will move forward. The
Law of Inertia of Newton holds good both in presence or absence of Gravity.

In zero gravity!


How does the Wii U tablet communicate with the TV?

Question: During the initial console setup, you have the option to enable some basic TV controls on the tablet. How does the Wii U "talk" to the TV when it's connected over HDMI? Is the TV controls sent over HDMI-CEC or does the tablet use an IR-blaster to send the signal?
Answer: It uses IR. The top of the GamePad has an IR transceiver to control the TV (I assume it also reads where you're pointing at using the sensor bar, the same way the Wii Remotes work).
In this picture, you can see the black transparent cover of the IR port on the top of the GamePad

Also, from the video on this page:

"[...] [the IR transceiver] can be used to control your TV and communicate with other devices [...]
Comment: Thanks! Good to know that line of sight is important when controlling the TV from the tablet.


SQL server management studio 2005: Still can't copy column headers(checked option to include it already)!

Question: I already changed the option to include column headers(Tools->option->results to grid->include column headers). Yet if I copy paste a Table or SQL query grid data results into Excel, i don't export the column names. How do I get column names to be simply copied from SQL table to Excel? I am new to SSMS and this is driving me crazy. What does it mean when it says changes will take effect in new window or something. What does it mean? Thanks
Answer: The option will not be set for existing query windows.  It only gets applied to new query windows that are created after the option is set.


VLC shows two windows for one video

Question: I've updated my VLC Player on the Mac and now I have two windows for one video. How can I disable this, so it works the old way?
Comment: Amazing how any given solution below is not entirely fixing the actual issue, still in 2022.
Answer: Tried all of the answers above, nothing worked
BUT this did on Ubuntu 22.04:

switch Tools > Preferences > Video > Output to "X11 video output"

solution screenshot
source: last answer of https://www.linux.org/threads/opening-a-video-file-with-vlc-opens-two-seprate-windwos-screenshot-included.34753/
Comment: Works for me in Ubuntu 22.04.1 LTS. Finally.
Comment: Also worked on Fedora 36
Comment: Worked on Debian testing
Answer: In Preferences -> Interface, check Allow only one Instance
Comment: This is unrelated - it *is* only one instance of VLC. It just has two windows. @heavyd's answer is the right one.
Comment: This problem still happens even with "Allow only one instance" enabled.
Answer: In the VLC preferences under the Interface section check the box for Integrate video in interface (In older versions this option was labeled Embed video in interface)
Comment: For me it was already checked, but unchecking it and checking it again fixed the issue. Must be some preferences bug.
Comment: I can't find this checkbox in the latest version of VLC.
Comment: @AaronFranke looks like the option has changed to "Integrate video in interface"
Answer: For me, setting "Number of clones" = 1 fixed this exact issue
Tools > Preferences > All > Video Splitters > Clone > Number of clones = 1
Comment: This is the only thing that worked! Thank you for this.
Answer: In the VLC preferences under the audio tab make sure visualization is set to default.
This solved my problem of the visualizer window appearing on top of the video window.
Answer: Great answers but none of these worked for me.
Must be a bug. Doesnt behave rationally.

View -> Docked playlist [x]
View -> Playlist (playlist is now visible)
-> Press Stop, to stop the video
-> Double click the item in your playlist, so the video will start
View -> Playlist (playlist is now hidden and video is inside VLC main interface.
Answer: I don't know if this would help anyone, but since it worked for me, I share it here:
Tools > Preferences > Video > Display

Disable the "Window decorations" check box

P.S: I only tested this on Linux (Debian testing with Gnome and X11).
Comment: Worked for me on Ubuntu 20.04.
Answer: In case it might help someone else. I'm running ubuntu 22 and most of the times the video would open in a separate window, rarely it would work as intended.
What solved it is under tools > preferences > interface: check 'Integrate video in interface' but remove the check on 'Resize interface to video size'.
I had tried all the solutions in this thread but none were working, this seems to have solved it.
Answer: tools > preferences > interface: UNcheck 'Integrate video in interface'
then closing the app reopening and (checking again)
tools > preferences > interface: check 'Integrate video in interface' again
worked for me
Answer: When you upgrade, under the Preferences > Interface tab, you should see an option Show video within the main window. It should be checked.
If you still have multiple windows, the VLC download package has a separate app under the Goodies folder called Delete VLC Preferences.app. Run that and try again.
Answer: To get rid of split video windows, under preferences, (show all), video, splitters, deselect split modes! (OSX High Sierra)
Answer: open VLC and press on "Ctrl + P" > Interface, check the box Allow only one Instance
Comment: exact copy/paste of [previous answer](https://superuser.com/a/1567272/763386)

VLC shows two windows for one video


Properties of fictional material for artificial skin

Question: How would one go about giving a scientific explanation for artificial skin gradually adapting to certain environments? For example, suppose character C has the ability to adapt to changes in temperature. If C could resist a temperature of 100 °C, but was exposed to 150 °C and adapted to this, what would be at least a plausible explanation?
Comment: the skin can already much higher temperatures than the body can withstand.  You need to qualify what you mean by "adapt to"
Comment: What is the skin made out of? Is it carbon based? silicon? rubber ? metal? unobtainium? What is the skin used for? Grafts? Full body replacement? Wine? Please add some more details.
Comment: *C* is supposed to be a cyborg. I suppose carbon would do. As for adaptation, I'm thinking of something like the next time *C* is exposed to $150 °C$, she won't experience any discomfort like before.
Answer: Electric sensitive alloy crystallisation
This is not very hard sci fi but it's a start
The basic idea is that you have an alloy that crystallizes differently depending on electromagnetic fields.
The system then could judge the environment and as exposed adjust the crystallisation to find the best results for the given moment.  So perhaps in minutes it could find the em field that makes temperature resistance rise at a cost of caustic resistance
Here is a paper outlining the basic idea propably completely in the wrong scope
http://iopscience.iop.org/article/10.1088/0022-3727/38/5/010/meta
Answer: By having a layer of gases or bubble of gases in the skin!
Explanation: Gases have the hability to transfer heat (like all materials). The transfer work by conduction and convection. Conduction is a transfer wich work essentially in solids and is pretty slow (because heat is transfer from an atom to an other). In fluids, the heat is transfer by convection too. Convection transfer is a transfer by matter mouvement (an easy example to observe, the mouvement of water when it boils).
An other aspect of fluids is viscosity. Viscosity is the "thickness" of a fluid, better explanation than mine. What is important here is that the viscosity change with the temperature. In the case of a gas, it augments. It means the gas move slower when the temperature increase. See the idea?
If the temperature augment, it become harder to move the gas, so it transfer heat with less efficiency.Now you need to find a gas with low conductivty and high viscosity!
Some issues: This solution isn't perfect. The major issue is pressure. When temperature goes up, the pressure to. Too much pressure ? Explosion, but C could have some emergency release system like a sphincter (he would litteraly fart when this is too hot!). Another issue is chemical degradation due to high temperature. I think a gas with the properties I list will be complex and may have some stability issues (even worse, it could be flammable !).
Other solution: There could be way skin degrade with high temperature to reduce the thermal conductivity. But this is no my field and maybe a biologist or a chemist could make an answer in this way.
Comment: How does that explain *adapting* to higher temperature upon exposure?
Comment: The gas thermal resistance improve when the temperature increase, so the skin allow less heat to pass. It has so the capacity to adapt
Comment: How's that adapting, as opposed to the gas always providing sufficient thermal protection for that temperature?  I don't understand?
Comment: Ok, understood! While the gas still warm up, and is not in temperature, it doesn't protect cause of an important convection. But when the gas is on temperature, viscosity finish to augment, and you have your maximal thermal resistance. During the warm up, the thermal resistance is not the one you want, and you receive many heat.
Answer: The skin is something that is constantly renewed and replaced.  In animal tissue, epithelial cells replicate and then dry out, to form the wearing surface, and various other cells form the inner layers with various structures to give it its properties.  The cells are all copies of the master, with no ability to change.
The cyborg has nonobots that produce the skin.  It has a variety of programs in storage and can receive updates.  For the elastic matrix, it may have a choice of several materials.  Likewise for the wearing surface.
Just like you use different oil in your car depending on climate, these materials have tradeoffs.  Good for high temperature may be too stiff or brittle at low.  Wider temp range is poorer wearing.  So, the nanites can shift production as conditions change, using the most suitable plan.  With multiple materials involved and the ability to download updates, a lot of variety is possible.
Answer: This is normal biology.  Skin adapts all the time.
Organisms adapt to changing circumstances by upregulating or downregulating gene transcription.  If I am drinking a lot, my liver adapts by upregulating transcription of metabolic enzymes for alcohol.  If I get my ass kicked, genes regulating transcription of testosterone cause it to decrease and my behavior adapts to the circumstances: I am less inclined to fight.  Also my mane falls out if I am a male lion.   As another example Heat shock proteins are in all eukaryotic cells and are expressed in response to heat or other stressors,  The proteins set off a cascade of other cellular actions which help the cell withstand the stress.
Other stressors such as infection or radiation damage have their own induced protective responses, all turning on altered DNA transcription and change in production of various proteins.  For example my skin increases production of melanin in response to increased UV damage.  My skin increases cellular division in response to friction, and I develop callus.  A horse that spends time outside in the cold grows a fur coat.  Then when things get warm, it sheds.
It is no great stretch at all for a cell to detect the environment and trigger an adaptive response.   Your skin could have adipocytes which accumulate lipid to improve insulation, stimulate growth of adjacent hair follicles or whatever it needs to cope with circumstances.  It does not happen within minutes but can happen within days.
The question mandates artificial skin.  Make your artificial skin out of cells.  They are good at adapting.