How are photons converted into thermal energy?

Question: I know when light strikes an object it excites electrons into higher energy states. I know thermal energy is basically just a lot of atomic and molecular kinetic energy. Does the excitation of the electron when struck by light cause a molecule to vibrate or make atoms move faster?
Comment: Atoms do not vibrate. Atomic bonds or molecules do. Electron excitation is part of thermal energy and redistributes toward translation, vibration and rotation energy, respecting quantisation discrimination.
Comment: Quantum excited states, rotational, vibrational, electronic, are heat content only when in thermal equilibrium. Absorption of radiation does not raise the temperature until the excited states deactivate by collisions, emission etc. transferring the quantized energy into random velocity of molecules and thermally equilibrated quantized states.
Answer: When light hits an object, different things can happen. The light can be reflected or absorbed. When visible light is absorbed, it will usually excite electronic states.
This excitation typically does not last long. As Poutnik mentioned in the comments, the excitation energy can dissipate in the form of vibration, rotation or translation. It can also be emitted or partially emitted, either quickly (fluorescence) or slowly (phosphorescence). The energy can be transferred to another electron (exciton transfer) or result in breaking a bond (photochemistry).
When the energy ends up as thermal energy, the mechanism of dissipation is described as coupling (e.g. vibrionic coupling) or non-radiative decay. I am not aware of a simple conceptual explanation of how this happens other than a coupled oscillator.


AS8003 Altitude Encoders: How are readings from silicon pressure sensors converted to pressure altitudes?

Question: Encoders such as the ACK A-30 use uncompensated silicon pressure sensors (e.g. MPX100 series according to this video) which are kept at a constant temperature. I presume they are heated so as to stay on the same voltage to pressure conversion line (Figure 3 MPX100 documentation). Is this presumption correct? More importantly, however, I was curious how the conversion from pressure to pressure altitude is carried out. I have come across this formula, but I was not able to find any documentation that specifies what conversion calculation/look-up table is actually used. Perhaps this information is contained in AS8003, but that document is behind a paywall.
Comment: The conversion pressure-->voltage (analog output) is done by a [silicon diaphragm which is elastic, and piezoresistive strain gauges measuring the deformation](https://esenssys.com/capacitive-piezoresistive-pressure-sensors-differences/). The gauges are [sensitive to temperature](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5190965/), so the heating.
Comment: Thank you for the description and for the resources.
Answer: Altitude encoders are relatively simple devices. They are designed to be as inexpensive and reliable as possible. They are so cheap that if it fails, buying a new one is cheaper than a repair (and you get a new warranty.)
But on to your question of design. It's basically a sensor and linear data flow from the transducer to the output. And most of the basic ones used Gillham output coding on nine to 11 parallel discrete lines.
The static line input is connected to the pressure transducer. We bonded the back of it to a voltage regulator and covered it with a foam insulating block. We referred to this as the oven. Heat from the voltage regulator heated it to about 130 deg F. There was a thermistor controlling the voltage regulator to maintain a constant temperature. Doing this avoids having to compensate the transducer output to a variable temperature. You heat it above ambient as it's easier to maintain a constant temperature as the external temperature varies.
The analog voltage output of the transducer is then fed into an A/D converter. The digital output then goes to a custom ASIC that is essentially a lookup table. During calibration the table is populated with the Gillham code for the voltage range associated with the altitude range. Avionics shops have a test set that can set the pressure output line to a specific altitude calibrated to the ICAO standard atmosphere (basically, the reverse of the encoder.) And to answer your other part of the question, the standard atmosphere is defined using a table.
For the parallel output the Gillham code is put through a serial-to-parallel converter to set the output discretes. Some more expensive units would provide the serial output in ARINC 429 or RS232 formats.
To be clear, you don't really care what the voltage output of the transducer is at a specific pressure altitude as long as it is relatively linear across the range. You provide a calibrated altitude source to the unit and read the voltage output and then plot it against altitude. You then build the lookup table setting the Gillham code for the range of voltages. An example would be the voltage range output from a pressure altitude input of 3950 feet to 4050 feet will be set to the Gillham code for 4000 feet [ 0 0 1 1 1 1 0 1 0 for the A1 A2 A4 B1 B2 B4 C1 C2 C4 lines.]
Answer: Have a look at the ICAO standard atmosphere (Doc 7488). It contains formulas and tables for conversion between altitude and pressure and vice versa, but only for the standard atmosphere (1013.25 hPa /29.92 inHg). For QNH correction there is a separate formula, which is documented in AS8003 and other sources (I can't find a good public source).


How do you work with a function of a uniform distribution?

Question:
I am struggling with parts b and c. How do you solve them?
Could you please give the solution?
Comment: (b) Try to find $F_X(x)$ and differentiate. (c) you just create random samples of $x$ and plot pdf, cdf etc and compare them to theoretical distribution.
Comment: thanks again @gunes
I added some things I tried as another pic in the question
Comment: @gunes Thanks - I tried this but am not sure I understand as it didn't work. Would you mind showing me the solution?
Comment: Why don't you share yours and we can help you get unstuck.
Answer: Some hints:
(b) Find $F_X(x)=P(X\leq x)=P(b/U^{1/a}\leq x)=P(U\geq b^a/x^a)$. Take it from here, find $F_X(x)$, and then differentiate wrt $x$ to find the PDF.
(c) Pick some $a,b$ of your choice, and using any programming language you like, create several uniform random variables, for each uniform random, calculate $X=b/U^{1/a}$ and get random $X$'s. Plot a normalized histogram, overlay the theoretical PDF and comment on it.


Would SiPMs respond differently to scintillation light from neutrons vs. gammas?

Question: I have a fast-neutron scintillator which also is sensitive to gammas (much less so, though). When I connect it to a SiPM instead of a PMT, the gamma pulses (obtained from performing pulse shape discirmination) are almost negligible compared to neutron pulses. Under what circumstances could it be possible that a SiPM responds differently to scintillation light from neutrons vs gammas?
Comment: What kind of scintillator is more efficient in detecting fast neutrons than gamma-rays?
Comment: Where are the neutrons you detect coming from? Do you make them during a reaction? Maybe the reason for so few gamma rays is due to a small number produced.  Most scintillators are much more efficient in detecting gamma rays than fast neutrons. Do you have shielding around your detector?
Answer: One possible reason is the time it takes the particle to dump energy in the scintillator. This will affect the rise time of the pulse. The neutrons must scatter off a nucleus to be detected while a gamma-ray interacts with the atoms in the scintillator which are much larger than nuclei of course.
Comment: Thank you for this bit. It's an interesting bit to think about. However, the crystal in both cases remains the same, just differs in how the light is read out (PMT vs. SiPM). That is where I'm left wondering, why is the SiPM acting far differently from a PMT towards gammas as compared to neutrons? To answer your previous comment, I am using a fast neutron scitnillator that by itself has a lower sensitivity towrads gammas. The neutrons have an (n,p) reaction in my crystal which then gets converted to  light.
Comment: That's a good question I'm afraid I can't answer unless its something simple like SiPMs are not sensitive to rise time of the pulse.


Computer not starting after suspend

Question: I have Dell Inspiron 15 7000 Gaming laptop. My computer doesn't start after suspend. I have to press the power key, turn it off and then turn it on back again.
Answer:
For the first option NVIDIA Corporation Unknown I changed the option from 'Using xorg server' to using NVIDIA driver.
After restart,the issue was solved.
My daughter had probably changed it while being naughty :)

Computer not starting after suspend


Why does my Android phone download files slower over the same network than my laptop?

Question: I have a HTC Legend running on JB. While on the same network, the same download file gets downloaded on my Legend slower than it does on my Laptop? (no change in any conditions whatsoever)
Comment: Exactly how much of a difference in download speed are we talking about?  Are you downloading onto the SD card (class?) or internal memory?
Comment: Also check the connection speed. I often notice some devices show only 48MBit (or less) when connected to a 54MBit router. Comparing the network speed of my Wildfire to that of my Milestone², the former is slow as hell while the latter is Speedy Gonzales...
Comment: @Compro01 - My phone downloads at max 50-100KBps. My laptop goes to 500-600KBits.
Comment: @Izzy - How do I check the connection speed?
Comment: The antennas in the phone are a lot smaller and subject to certain restrictions in how well they receive and transmit data and the laptop has a lot more power for filtering out the interference. The distance to the router/base-station is important as is constantly changing atmospheric conditions. Finally, how quickly the phone can write it to the card may play a part depending on circumstances. Ultimately there are too many variables to point to a particular cause. And all that is assuming there isn't a bug in the radio driver or firmware that is on the phone.
Comment: Phone may also be limiting the connection to save battery power.
Comment: @AbhishekSha I don't know your router. Mine has a page where it shows all connected devices with their MAC-Address and connection speed. Maybe you can check the Web interface of yours as well as I can on mine.
Answer: You seem to be using different measurement units, 50KBps is the same as 400Kbps. Remember that 1 Byte = 8 bits.
If that's not the case, check if your laptop is connecting using 802.11n, HTC Legend does not support 802.11n, it only supports 802.11b/g.

How do I check the connection speed?

Download SpeedTest app from the Market. And in your laptop, go to speedtest.net.


Je pique des crises : pourquoi 'des' ?

Question: I read this phrase in a magazine : 'Je pique des crises de nerfs' which I take to mean 'I am afflicted by nervous crises'. I am wondering why it is 'des crises' and not 'de crises' (as it is 'de nerfs' and not 'des nerfs')?
Comment: Because you can have more than one. *Des* is the plural of *un/une.* And in French you can't omit the indefinite article. https://grammar.collinsdictionary.com/french-easy-learning/the-indefinite-article-un-une-and-des
Comment: De in front of *nerfs* is not an article it is a preposition. *de nerfs* is a [*complément du nom*](https://linguistics.stackexchange.com/q/36538/637).
Comment: [Tout savoir sur ces combinaisons de petits mots qui contiennent « de »](https://french.stackexchange.com/q/10869/358)
Answer: Crise de nerf is a colloquial expression that is used here in the idiom piquer une crise de nerf.
It is a colloquial way to say "to become suddenly upset, to freak out over something or someone".
Similar idioms are:

Piquer une tête: to dive

Piquer un fard: to blush

Piquer un fou rire: to have an incontrollable laugh

Des is used simply because it is the plural of une, there is more than one crisis. English would uses no article here. (singular: I have a nervous crisis / plural: I have nervous crisis)
De is not used here because it is not the plural of un(e).
Answer: Let's take care of the basic question first; why "crise de nerfs" instead of "crise des nerfs".

(TLFi) − Spéc. Crise de nerfs. ,,Expression populaire pour désigner des manifestations paroxystiques à caractères neuro-psychiatriques et comportant plus particulièrement des manifestations psychomotrices, et des troubles de la conscience et du comportement`` (Lafon 1969).

You can also find the spelling "crise de nerf"  (ngram), and as well "crise des nerfs", but this latter is comparatively rare (ngram, ngram, crise des nerfs).
In this locution there is no article ("des" is  the contraction of "de" (preposition) and "les" (article)) because the semantic relation between "crise" and "nerfs" is one that has been reckoned with as that of kind (sort, type,…) rather than another relation.
You say

"engorgement des amygdales", "inflammation des yeux, des intestins, des veines, des parties, des tissus, etc."

because the various parts are being affected; it's is different with "crise de nerfs" as the nerves are considered to be the agents of the affliction rather than being afflicted. But there is in this remark no solid principle, and as shows the Google page relative to the use of "des" (mentioned above), people do not go by any such principle.
So, a why has no easy answer, and it is more useful to consider that this is merely usage, and at that, it is changing.
The second question has a complicated answer. As is the sentence, "des" is necessary because "de" in this positive contexte comes through as the preposition "de", and the verb "piquer" is "transitif direct" (has an object introduced by no preposition). Since, the sentence aims at saying that the person is afflicted by a certain number of nervous fits, what is called for is an indefinite article (zero article in English, or "some"). There is just one choice in french: "des".
However, if we change the sentence only slightly by just making it negative, then "de" is the right word.

Je ne pique pas de crises de nerfs.

In this case, we are not dealing with the preposition "de" but with the article "de". This article is necessary  for the negative form. This reference, Guide de grammaire française  pour étudiants finnophones, l'article indéfini, explains that well (never mind the Finish, or the few details concerning it that are in French).
So, in the negative form this is the proper article, but there are exceptional cases of use of the negative form when you have to revert to the usual "des". Those are so called cases of "partial negation" (also explained in the reference above).

je n'ai pas des crises de nerfs, j'ai des crises de foie. (the verb "piquer", colloquial, not free of connotations, is unidiomatic for "crise de foie".)
Comment: Thank you for such a helpful explanation, almost all of which makes good sense to me. However, with regards to 'pique des crises' I had thought 'pique' was an intransitive verb followed by the preposition 'de': I sting ('je pique') due to ('des') crises ('crises'). Is this incorrect ?
Comment: That explains it perfectly. Thank you once again.
Comment: @TomAdair In this context, the verb has nothing to do with its basic sense (to sting). (TLFi : d) Au fig., fam. Avoir un accès soudain (de), éprouver, manifester brusquement une envie de quelque chose, de faire quelque chose. Piquer une colère, une crise de nerfs, un fou-rire, une rage, un quarante de fièvre.)//What could be added for a better understanding of this use of  "piquer" and "crise  de nerfs" is that there are really two meanings for "crise de nerfs";  1/ the medical one which I cite in my answer is not used with "piquer". 2/ Most of the time when people say   (1/2)
Comment: @TomAdair "J'ai piqué une crise de nerfs." and the like, they really mean that they became angry and that for a spell voiced their anger; there is no question of mental illness. Therefore that is another "crise de nerfs". (2/2)

Je pique des crises : pourquoi 'des' ?


Remove URL field from Links list using powershell

Question: I need to remove URL field from Links list using PowerShell. Is there any way to remove. I think it need to be deleted from Content type. But I just need to remove the reference.
Answer: URL field is mandatory in Links content type. If want to remove it from content type you won't get the option to remove/delete. I suggest you to hide the URL field instead of removing because removing from content type will impact other links content type list.
Here is the code to set hidden
$web = Get-SPWeb -identity http://your/site/name
$list = $web.Lists["Your List Name"]
$column = $list.Fields["Your Column Name"]
$column.Hidden = $true
$column.ReadOnlyField = $true
$column.Update()
$list.Update()


Sequence of RV and Limits

Question: in the below picture you can see my problem. Honestly, I am in a probability course and this isn't even remotely similar to anything we've covered...I'm not totally sure where to even begin. If anyone could help me decipher what this means I would really appreciate it.
Answer: Since we are asked if $\lim_{n \to \infty} P(M_{n})=0$ is always true,
if we can show one counter example, than that will suffice to answer the question.
Suppose {${X_{n}}$} is a sequence of random variables such that $(P(X_{n})=1)=1$
Then,
$\lim_{n \to \infty} P(M_{n})=1$
Hence, the statement is not always true.
If you consider the definition of "support" to mean that any value in the support MUST have a non zero probability of occurring, then lets take a closer look. If n=0 then it is true ( as only zero can occur so mode is zero).
But as $n \to \infty$, the probability of being zero must decrease to make room for the probability of having other outcomes. Hence the probability that we have zero approaches zero, and hence the probability that the mode is zero also approaches zero, so it is false.
Comment: Ok, so basically Xn is always going to occur (probability is 1 or 100%). How do we tell what the mode of Xn is from this? Or does it just not matter? Because if Xn always occurs the probability of the mode is always 1?
Comment: The "mode" is simply the value that appears the most often. If the only value that ever occurs is "1" , then the mode is 1.
Comment: So if the only value that appears is one, does that violate the piece about Xn having support from 0 to N?

Sequence of RV and Limits


Debugging Native Lib using IDA Pro Fails to Load Registers and other Information

Question: Currently, I am debugging a native library in a test APK, however I am running into issues. First of all, I can connect to the debugger and attach to the process without any issues. In the first image below, I select "Same" as the one on my local machine is the decompiled .so file, and the one from the Android remote, which is on my Emulator, is the actual .so file.

After I select that, I don't get the typical "Moving Cross References" one would expect and stuff, and only get a popup saying it's "Downloading Symbols". Nevertheless, the dialog completes and the debugger attaches to the process. Here is part of my output Window in IDA Pro:
<code>C100000: loaded /data/app/com.example.hellojni-1/lib/arm/libImageProcessing.so
C000000: loaded /system/lib/arm/nb/libdl.so
C7638000: loaded /system/bin/linker
Debugger: attached to process /system/bin/app_process32 (pid=18383)
</code>
However, all my registers are blank:

And IDA Pro doesn't let me step through the code, or do anything else expected of the debugger. What could the issue be here? What am I doing incorrectly? The debugger attaches to the process just fine, but all I seem to be able to do is pause and start the process. For reference, these are my processor options:

Edit: This is the verbose output, where read_regs gives -1.
Comment: Were you loading an **APK** or just **.so** files?
Answer: Most likely the execution is currently in the kernel or Dalvik code. Put some breakpoints in code that should be executed (e.g. JNI exports) and do some actions in the app to trigger them.


Test a launcher app icon on an iPhone

Question: I need to test a launcher app icon on an iPhone. Is there any way to do that without having to install an entire app?
Answer: You could create an HTML page for this which refers to the icon.
<link rel="apple-touch-icon" href="/custom_icon.png"/>

If you then open the web page and add the site to your home screen it will take custom_icon.png as your app icon.
For more detailed information have a look at Apple's developer page.
Comment: Great - thanks so much, cyphorious! That worked very well.
Answer: You can use tools for testing icon design such as http://www.ikonica.me, it's much quicker than creating an HTML file, especially if you have to test multiple designs at once.
Answer: You can also use http://testico.net. Nothing to download on your desktop, no app to install on your phone, free.

Test a launcher app icon on an iPhone


Create Public DNS that maps to private IP space

Question: I'm trying to create a setup where I have one public facing IP address that feeds to several different internal servers where each server has a unique IP in private IP space - the route is determined by the incoming domain request (similar to Apache Virtual Hosts, but for all traffic - not just HTTP). What services would I need in place to create something described above? A proxy server, load balancer, etc?
Comment: It's not clear to me what you're asking but it sounds like you want to NAT a public ip address (routable ip address) to a private ip address (non-routable ip address). Is that the case?
Comment: @joeqwerty Yes, sorry I'm having a hard time articulating this idea into valid sentances.
Comment: @joeqwerty I've updated my question to better reflect what I'm looking for
Comment: Still not clear what you are trying to do. Are you trying to get things setup so that domain resolves to a public or private IP address, depending on which network you coming from?
Answer: You have made huge changes to your question and completely dropped the EC2 aspect of it, but here's my new response:
I think you need to learn a bit more how DNS works and how virtual hosts work.  DNS is used to turn a hostname into an IP address (or set of IP addresses).  Once an application has an IP address to talk to DNS is no longer involved.
Virtual hosts is a feature enabled by the HTTP protocol (version 1.1 and up).  When contacting the IP address, the client passes in the hostname they want to make the request of.  Your proxy server would need to be set up to understand HTTP and map to different back end servers.
Most other IP protocols do not have this feature so there is no way to do what you ask.  E.g., there is no hostname involved after the DNS lookup when you ssh to a server.
That said, it sounds like you have a particular problem to solve.  Rather than assume IP address routing is the answer, how about asking about what you are trying to do at a higher level and see what folks come up with?  I'd recommend starting that in a new question.

I leave below my original responses to what appeared to be your original set of questions...
What you are trying to do is not clear from the wording of your question.  Here are some answers to possible questions:
It is not possible to "conserve IP addresses" on Amazon EC2.  Each instance uses one public IP address whether or not you allow it to be accessed from the Internet.
EC2 already has private DNS names for the private IP addresses, but they are no more useful to use than the private IP addresses themselves.
You are welcome to run your own DNS server inside or outside EC2. There are some DNS serving software packages that support code plugins where you dynamically determine the resulting IP address based on algorithms.
If you resolve an EC2 instance public DNS name from an EC2 host, Amazon will return the private IP address so your networking will be faster and cheaper. For more information on this feature, see this article I wrote:

Using Elastic IP to Identify Internal Instances on Amazon EC2
http://alestic.com/2009/06/ec2-elastic-ip-internal
Comment: Thanks, I've updated my question to better reflect what I'm trying to do. I assumed this is what Amazon EC2 does - but it appears I was wrong.
Answer: Your application protocol(s) need to able to signal, as part of the incoming connection, which backend server they want to use.  HTTP does this (as you identify) using "name-based virtual hosting", where the Host header in the request is used by the webserver to determine which name was used in the request, and then make a decision as to where to send the request.  Some other existing protocols are also capable of this to some degree (FTP, of all things, has an equivalent mechanism), but it must be done at the application layer -- you can't deal with this at the IP layer, there isn't enough information.
Quite honestly, if this is only for a few different domains, and you're working with a protocol that doesn't support name-based signalling, you'll be far better off just using multiple IP addresses and binding each name to it's own address.  This is annoying and painful on EC2, because of the one-elastic-IP-per-instance limitation (and you really don't want to be using the instance IP for public-facing services; that'll just make your users sad pandas down the line).
Answer: Sounds like you just need a reverse proxy like nginx/haproxy/varnish in front, distributing requests to your backend instances by domain (URL).


Flying from Dallas to Houston to Amsterdam with layover at London Heathrow around noon local time

Question:
Flying first class in April--the last time I went thru Heathrow there were special lines for 1st and Business class that weren't nearly as long--is that still the case?
Flying with AA and BA (partners) so will my bags get checked in Dallas ALL the way through to final destination in Amsterdam?
If it's international arrival from USA to international departure to AMS--what are the checking-in points at Heathrow (ie., customs, simple security)
Airline has given me 70 minutes for LHR-AMS connection (both in Terminal 5) so what's my likelihood of not having a problem? It's the ONLY flight that day therefore I had no choice.
Comment: Are you really going via Houston, as the title says? There are direct BA flights from Dallas to LHR, so going via Houston just adds complication.
Comment: Only flight from LHR to AMS that day? On a normal day there are definitely multiple flights between two of the biggest European airports.
Comment: @LassiUosukainen Most likely he meant it's the only IAH-LHR flight that day.
Answer:
Mostly no, since the LHR-AMS flight is on a narrow body (A32x) there will be only one jetbridge.
Yes, provided it's all booked on one ticket.
You should get all three Boarding Passes at DFW.  At LHR, you will only have to be rescreened before entering Departures.  Follow the signs for Connecting Flights.  There is transfer desk if you do need assistance.
The airline expects you to make it, otherwise they would not sell the ticket.  With the F Boarding Pass, you will be first off the plane and can use priority queues.
Answer: I have entered your flights into the Heathrow connection planner which says:

Time needed for this connection: 60 minutes. You have 1hr 10min available.

(I know it's BA196-BA438 because a) T5 is BA only (OK, Iberia) b) there are no other 70 minute IAH-LHR / LHR-AMS BA flight pairs)
You are cutting it close but the F ticket will help cutting it. In April I'd guess your chances are good. I'd not try it in the winter but April sounds good.
Answer: The time this goes wrong is when there is even a small delay in your departure from Houston that the aircraft cannot make up in flight.  The airspace around London can also get crowded and some flights are asked to circle in the holding pattern for a while.  As you are arriving at LHR at around midday, I would consider switching the LHR-AMS leg to a later flight to give yourself a little more time. BA0432 leaves 1hr 45min later and arrives in Amsterdam at 17:00.
Comment: The airline will rebook him on a later flight if his incoming flight is delayed; one doesn't have to do that in advance. The situation where it can be relevant to try to rebook in advance of a short layover is if you need to change to an earlier _inbound_ flight in order to make enough time.


Good math books for physicists

Question: In his first lesson (transcripted in "Tips on Physics"), Feynman talks about math for physicists in a very cool and practical way. And at the end of the section he talks something like "so the first thing to do is to learn to learn derivative, integral and algebra" (I don't know how much precise I'm being because I've read it in Portuguese).
I would to know if there is some book that deals with math as Feynman did it in this lesson (respecting formalities, but teaching how to use the practical rules)? Also, someone have any recommendations for algebra book (college level)?
Answer: Higher maths for beginners is ana amzing little book on all the subjects you mentioned, written by one of the fathers of Soviet nuclear bomb, and theoretical phsyicists.
On math physics, the best introductory test is Elements of applied math physics, it has dufferential equations and complex analysis and other cool topics. Unfortunately, it may not have English version.
The comprehensive analysis text is Fundamentals Mathematical Analysis. It's a Russian textbook, but it's old school, i.e. very readable.
Another must have book is Differential Equations and Calculus Variations.
The best reference on PDEs is PDE by Bitsadze, I consult it all the time, it's very thin, and chapters are mostly self-contained.
All these books were used by Physics students, I can guarantee that.
Comment: I took a quick look at this Zeldovich's book and it seems to be what I seek. I'll take a look at these other soon. Thank you very much.
Answer: Tthis is again probably a duplicate. See here for a full list of links to book questions.
By 'alrebra book (college level)' what do you mean exactly?
Algebra in maths is a HUGE area.
If you mean Linear Algebra, then maybe I.M. Gelfand is a great book, but probably not the best for a first read.
Anton & Roerrs would be better for a first book, especially if you're not a pure mathematician, it has lots and lots of nice examples of applications of linear algebra.
If you mean Modern (Abstract) Algebra, which includes group theory and many other things used in physics, then I would recommend J.R. Durbin as a great first (maths) book on abstract algebra.
I have little doubt in your ability to search for these online and you will find lists of contents.
Comment: Thank you for the links and sorry for the vagueness. With "algebra book (college level)" I had in mind something like "strategies of expressions simplification".
Answer: For linear algebra regarding matrices (gaussian elimination, eigenvectors, laplace transforms etc.) try the MIT opencourseware playlist on youtube.
http://www.youtube.com/playlist?list=PLE7DDD91010BC51F8
In case of link rot in the future :
Course Title : MIT 18.06 Linear Algebra, Spring 2005
Instructor: Prof. Gilbert Strang
Abstract :  This is a basic subject on matrix theory and linear algebra. Emphasis is given to topics that will be useful in other disciplines, including systems of equations, vector spaces, determinants, eigenvalues, similarity, and positive definite matrices. *Please note that lecture 4 is unavailable in a higher quality format. Find more lecture notes, study materials, and more courses at http://ocw.mit.edu.

Good math books for physicists


How does EXT4 handle sudden lack of space in the underlying storage?

Question: Usually, block device drivers report correct size of the device, and it is possible to actually use all the "available" blocks. So, the filesystem knows how much it can write to such device in prior.But in some special cases, like it is with dm-thin or dm-vdo devices, this statement is false. This kind of block devices can return ENOSPC error at any moment, if their underlying storage (which the upper-level FS knows nothing about) gets full.Therefore, my question is, what happens in such scenario: an EXT4 filesystem is mounted r/w, in async mode (which is the default), and it is doing a massive amount of writes. The disk cache (dirty memory) gets involved too, and at the moment there is a lot of data to be written if user runs sync command.But suddenly, the underlying block device of that EXT4 filesystem starts to refuse any writes due to "no space left". What will be the behavior of the filesystem?Will it print errors and go to r/o mode aborting all the writes and possibly causing data loss? If not, will it just wait for space, periodically retrying writes and refusing new ones? In that case, what will happen to the huge disk cache, if other processes try to allocate lots of RAM? (On Linux, dirty memory is considered Available, isn't it?).Considering worst scenario, if the disk cache was taking up most of the RAM at the moment of ENOSPC error (because admin has set vm.dirty_ratio too high), can the kernel crash or lock up? Or it will just make all processes which want allocate memory wait/hang? Finally, does the behavior differ across filesystems?
Thanks in advance.
Comment: backend layer has a way to tell this to the FS: I/O error.
Comment: @A.B and the behavior will be similar to any I/O error - r/o remount and abortion of writes? (If the fs is mounted with `errors=remount-ro`)
Comment: The FS/mount-dependent behavior will trigger upon receiving such error.
Comment: Of course this should never happen. thin provisionned space has to be monitored. Example for VDO: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deduplicating_and_compressing_storage/maintaining-vdo_deduplicating-and-compressing-storage#managing-free-space-on-vdo-volumes_maintaining-vdo
Answer: When the block device overcommits its available data capacity like when using thin provisioning or has other reasons to not be able to accept more writes, like having a snapshot full, it has to send a message to what is writing to it. ENOSPC would make no sense in this context, so the error chosen is usually EIO (Input/output error).
UPDATE: actually LVM has configurable behavior. For Thin provisioned LV:

--errorwhenfull n (default): blocks for up to (configurable) 60 seconds, just as OP considered, then errors. Unless an automatic action is performed during these 60s chances are the result will be the same as immediate error.
Note also that if the timeout is completely disabled:

Disabling timeouts can result in the system running out of resources,
memory exhaustion, hung tasks, and deadlocks. (The timeout applies to
all thin pools on the system.)

--errorwhenfull y: immediately returns an error

If the "user" is a filesystem, it will react to I/O error the same as if this was caused by an actual media error, possibly depending on mount options (eg, for ext4 possible options are errors={continue|remount-ro|panic}). I can't tell for sure what happens to dirty data still in cache when one of the non-panic options is chosen. One could imagine it's either left in cache or will be lost, but one should assume it will be lost anyway.
As this is a severe result, such disk space should be actively monitored and once a threshold is reached, there should be either data freed or more actual space added so the overcommitted space never gets full. Same for snapshots, especially the non-thin-provisioned kind which uses more space over time: it should be removed when not needed anymore. There are even options to auto-increase the thin-provisioned space for emergencies (when the layer providing space to the thin provisioning layer can still provide more).
further references:

Automatically extend thin pool LV
Managing free space on VDO volumes
Answer: It depends on the filesystem (and possibly mount options) and the underlying storage.
In most cases, a failure to write to a block device due to it being over-committed on space will immediately be propagated up to the filesystem driver as an IO error. LVM has an option to delay this (mostly so that it's auto-extension functionality has time to kick in), but it is disabled by default. QEMU has an option controlling behavior for this with sparse disk images, but by default it will propagate the error to the guest OS (it may also be configured to ignore the error or pause the VM). Most other stuff though will just throw the error up to the filesystem driver immediately.
From there, what happens depends on the filesystem. In almost all cases, the error will be propagated to userspace, though it will almost always be EIO and not ENOSPC (ENOSPC means the filesystem is out of space, but that's not technically what's wrong here, and the filesystem also can't usually determine what caused the IO error it got from the lower layer so it normally has no way to tell that it's due to the lower layer running out of space). ext4 will by default do nothing other than that, though depending on mount options (and things set by tune2fs) it may instead remount read-only, or it might trigger a kernel panic. BTRFS will remount read-only, and in some multi-device setups may also switch to degraded mode. I'm not sure about other filesystems (though I would expect XFS to remount read-only in this case).


Photons and perfect mirror

Question: A perfect mirror means, that all the photons which collided with the mirror will be reflected in the same amount, with the same energy and with the same - except sign - angle. Will the mirror get an impulse from the photons?
Comment: There are many similar questions with photons and mirror... it would be great if the Title specifically referred to whether mirror gets an impulse
Comment: @blanci PSE is a really well designed software and it allows you to edit questions.
Comment: @ HolgerFielder thanks. I'm worried whether reference links to this question would get messed if we change title?
Answer: Yes it will.
Assuming the light is incedent normally the change in the photon momentum is $2h\nu/c$, and consequently the momentum of the mirror will change by the same amount.
If the mirror is free to move it will be accelerated by the light and as a result the light will be slightly red shifted. There is more discussion of this in Can relativistic momentum (photons) be used as propulsion for 'free' after the initial generation? though the question is not an exact duplicate.
Comment: Nice. Thanks. And the amount of red shift is dependend of the mirrors mass. Then less mass then more shift.
Answer: @HolgerFieldler @John Rennie ....Just for good measure and interest I would like to proffer a Maxwellian interpretation of mirrors. A practical mirror, say, aluminum or silver, will feel the repulsive force of Lenz's law. A simple explanation follows: The magnetic component of the impinging plane wave accelerates electron's in the silver, the subsequent magnetic field vector is parallel to the incident magnetic vector, and as we all know like poles repel, vectors in this case. This is Lenz's law. The impedance of free space is 377 Ohms the impedance of the silver will be in the order of Ohms, such a mismatch generates maximum reflection and repulsion, a blackened surface will represent a higher impedance and less reflection, therefore less repulsion. It is interesting to contemplate whether a 377 Ohm piece of "space paper" (often used by microwave engineer's) would reduce the repulsion to zero? No reflection. The E vector attraction cancels the B vector repulsion?  Further contemplation suggests for high impedance surfaces (say, above 377 Ohm's, a dielectric material) attraction may occur?
Comment: @John Rennie  ...I know I'm not very popular here in the Physics area of SE, so I'm attempting to change my "TONE", but still using "mainstream EM theory" which has paid my mortgage and kept me in sustenance for over 50 years. I'm trying to avoid history and opinion referring to my own peer reviewed papers. I'm trying but, it is rather frustrating.

Photons and perfect mirror


Changing Drupal theme completely

Question: I am a newbie, I am in the middle of the website which was already created using the bartik theme and I want to change the theme completely like the way Main-menu looks and adding the slideshow in the middle of the page. I really don't understand how to do it. Any suggestions? Thanks.
Comment: Suggest you get an all singing, all dancing theme like AT adaptive, Omega...
Comment: Wherever you choose to start, begin with the [Theming Guide](http://drupal.org/documentation/theme) and [How to theme in Drupal 7](http://drupal.org/node/1351116).
Answer: I would recommend starting with the "Stark" Drupal theme.  It's the minimal theme,  easier to customize.
You are also going to need to read about some basic Drupal concepts.  Views, blocks, page templating.
Your question is far too "big" to be answered in this forum.  You will have to read the documentation at drupal.org
Answer: The question suggest you do not know where to start with performing customizations to the appearance of your Drupal site.
It is best to use a base theme, such as Omega (ht tp://drupal.org/project/omega) , and create a sub theme. Omega Tools is a module (ht tp://drupal.org/project/omega_tools) and provides a handy feature to create a sub theme.
It is good practice to use a sub theme, it saves a lot of time and effort if things go wrong and if updates become available to your base theme.
Most problems and questions you have will be answered in the following documentation:
 - ht tp://drupal.org/documentation/theme
 - ht tp://drupal.org/node/1351116
There are many modules Slideshows, here is a comparison of them ht tp://drupal.org/node/418616 . Personally I use ht tp://drupal.org/project/views_slideshow .
I do not have enough rep here to post links so if someone could be so kind to find and replace "ht tp" with "http", thanks
Answer: The short answer is to make changes to the CSS files of you theme. Drupal Themes are more of a developer friendly environment than a graphic design environment like Wordpress themes.
Drupal "best practices" procedure is to work with a base theme and an overriding subtheme. The Zen theme is one of the most popular ways to do that. The reason to work this way is that you can update the theme without over-writing your subtheme, and hopefully the subtheme changes would be minimal.
Probably the easiest way to install a slideshow is with the Field Slideshow module. You need to add an image field to one of your content types, upload the images, and Field Slideshow instantly makes a slideshow, which you can put on any page with the block system. Well, not quite instantly, you need to grab a slideshow jquery library, but you don't have to use the amazing but complex Views module.

Changing Drupal theme completely


Georeferencing HiRISE images in QGIS 3.6 on Windows

Question: I have a CTX mosaic for a base layer in my project. However, I am running into trouble overlaying HiRISE images over it. HiRISE final products should be georeferenced, but they just do not fall into place. I tried the manual georeferencing tool in QGIS to fix it but it also doesn't work.
An example of a HiRISE image is https://hirise-pds.lpl.arizona.edu/PDS/RDR/ESP/ORB_036900_036999/ESP_036925_1985/
Answer: I had the same problem. The inconvenient is that QGIS seems that is not able to understand correctly the projection information stored on the .jp2 image files.
I recommend you to follow these steps:
(This worked on QGIS 3.10 A Coruña)

Open an empty QGIS project file.
Create a new projection by going to "preferences" -> "personalize projection".

Go to spatialreference.org to search the projections used for Mars.
The projection usually used by NASA and the USGS for Mars is the IAU2000:49910: Mars Equidistant Cylindrical. We should add this projection on QGIS.
Click on the IAU2000:49910 and then click on "Well Known Text as HTML".
Copy that text, which should be:

PROJCS["Mars_Equidistant_Cylindrical",
GEOGCS["Mars 2000",
DATUM["D_Mars_2000",
SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.89444722361179]],
PRIMEM["Greenwich",0],
UNIT["Decimal_Degree",0.0174532925199433]],
PROJECTION["Equidistant_Cylindrical"],
PARAMETER["False_Easting",0],
PARAMETER["False_Northing",0],
PARAMETER["Central_Meridian",0],
PARAMETER["Standard_Parallel_1",0],
UNIT["Meter",1]]

This code defines the ellipsoid and the projection for Mars.

Return to QGIS and paste on the opened window and give it an easy name to identify:

(Remember the format must be: WKT - Welll Known Text)
Load the ESP_036925_1985_(COLOR/RED) images. Ignore possible errors about projections.
Now change the project projection to IAU2000:49910.
The images now should be correctly georeferenciatied:

If this doesn't worked for you, I would recommend to update to a newer version of QGIS and try it again.
Comment: just here to say that this worked for me--thanks!
Answer: You could use gdalinfo to get the actual projection used in the HiRISE RDR in WKT format. Between North and South 65 degrees latitude HiRISE does not use a projection with a fixed radius. You could also get the values from the LBL file, although not in WKT format.


Was the Fountain of Magical Brethren remade?

Question: Was the Fountain of Magical Brethren remade after the fight between Voldemort and Dumbledore at the end of Order of the Phoenix, before it was changed for the Magic is Might statue of wizards sitting on Muggles during Deathly Hallows?
Answer: We don't know.
We don't see anything of the Ministry of Magic in book 6, which is the time-period you're asking about. My best guess is that it was probably removed since Dumbledore says that it was "destroyed" during the fight in the Atrium.

"The fountain we destroyed tonight told a lie. We wizards have mistreated and abused our fellows for too long, and we are now reaping our reward."
(Order of the Phoenix, Chapter 37, The Lost Prophecy).

Why he says destroyed I don't know. Two of the statues were hit by Avada Kedavra. But I would have thought that it'd be nothing a bit of Reparo couldn't fix. Nevertheless, maybe the fountain was beyond magical repair for some reason. Or perhaps the Ministry decided to replace it with something more appropriate seeming as it was now the headquarters of the fight against the Death Eaters. All we know is that by Deathly Hallows the fountain is gone.

Previously a golden fountain had filled the center of the hall, casting shimmering spots of light over the polished wooden floor and walls. Now a gigantic statue of black stone dominated the scene.
(Deathly Hallows, Chapter 12, Magic is Might).

What happened to it remains a mystery.
Comment: Agreed. Not repair, but replace with anything. I'm just curious to know if the have done anything about it. And later whenin Kingsley takes the post, is there anywhere mentioned about the fountain or anything in its place restored. Because I can't see kingsley keeping that magic is might.
Comment: @RekhaGSaklechaBorundiya Neither can I but we have no canon intel either way.


Directly open top three Google results from address bar in Chrome

Question: Recently a friend of mine noticed that I often open the first few Google results in tabs without looking at them first. Now I'd like to directly open the best Google results from the address bar. I know that it's possible to add custom search engines to the bar in the settings. However, how can I make Chrome open multiple tabs at once when using such a custom search engine?
Answer: You could perhaps run a webserver in the background which takes the query and passes it to a google "i'm feeling lucky" link. Opening more than one tab would obviously require you visting the website in chrome and explicitly allowing popups. To open the top 3(not only the first) search result, you will probably have to get the source code of the page(probably possible with either wget or links) and extract the search results from it. To only look for search results and avoid opening, say the gmail link, you may wish to filter out everything until the second hit of your search criteria.
Code for this would look something like this:
wget http://google.com/?q=$query -O $query.html
l=grep -n $query | head -c 1
head -cv $l
echo $source | grep '<a href='
for i in $l1 $l2 $l3; do google-chrome-unstable $i ;done

Note that my code is probably broken and I have no idea how to get the script to run without using command line, but maybe you could do it using a web2py server with the python system.os command.
Hope it helps
Answer: I know this is not exactly what you are looking for, but I made a bookmark with this JavaScript code in it, that opens the first 5 results from a Google search result in new tabs, if you are on the search result page:
javascript: (function (element, url) {
    element.src = url;
    element.onload = function () {
        jQuery.noConflict();
        var elements = jQuery("#search .g:nth-child(-n+4)>div>div>a:first-child");
        console.log("IN");
        jQuery.each(elements, function (key, element) {
            win = window.open(element.href, '_blank');
            console.log(key);
            if (key > 3) {
                console.log("IN");
                return false;
            }
            if (win) {
                win.focus();
            } else {
                alert('Please allow popups for this website');
            }
        })
    };
    document.head.appendChild(element);
})(document.createElement('script'), '//code.jquery.com/jquery-latest.min.js')

The .g:nth-child(-n+4) is where you can set the number of tabs, in this case it's 5.
Unfortunately Google changes the DOM structure every once in a while, so you need to adjust the code. Most of the time it's only a minuscule changes, where you have to swap one selector for another.
You create this kind of bookmark by adding a new bookmark and past this code as the "URL". Voilà!


Why are the bleachers called the bleachers?

Question: While I was reading about why the 'nosebleed' seats are called such a preposterous name at the ballpark, my curiosity was piqued in reference to another ballpark term that has troubled me over the years. The bench-like cheap seats have always been referred to as "bleachers". I have wondered why my whole life and have asked no less than 3 wise men / gurus, but to no avail. Won't you all please resolve this issue for me and my linguistically starved children?
Answer: The bleachers were so named because the boards were bleached by the sun.

The "bench for spectators at a sports field" sense (usually bleachers) is attested since 1889, American English; so named because the boards were bleached by the sun.
Comment: @EdwinAshworth They have sun in the UK?
Comment: We don't seem to use the term over here in the UK ...
Comment: Look. My wife and I did your 'Grand Circle' tour in 2012, and it rained! It's not just a British thing. (OK, I admit it only rained for 30 seconds out of 14 days.)
Comment: choster, the sun turns up even in the UK. It's just the word *bleachers* that does not.
Answer: NRS does a good job explaining why are bleachers called bleachers: https://www.bleachers.net/why-are-bleachers-called-bleachers
Comment: Sorry, a link is useless: please [**quote the relevant portion.**](https://meta.stackexchange.com/questions/225370) And in this case, the relevant portion says nothing more than the existing answer.
Comment: Your reference is pretty good.  Please edit your reply to copy a few of the most relevant lines from it.


Query multiple lists in a provider hosted app

Question: I'm currenlty working on a provider hosted app that is hosted in Azure. In this app I need information with multiple lists in multiple sites, which are all in the same sitecollection.I'm basically looking for something like the SPSiteDataQuery. However for as far as I can see, it is only possible to query one list at a a time with CSOM. This would mean that I have to loop trough all sites and all lists to get my data. Is there any way to overcome this issue?
Answer: The CSOM does not provide a mechanism for querying data across multiple lists that are not associated by a lookup field. In other words, there is no client-side functional equivalent of the SPSiteDataQuery class.
Using LINQ for Objects
When you use the CSOM, you can write LINQ queries against client-side objects, such as lists and Webs, and then use the ClientContext class to submit these queries to the server.
Example:
using (var context = new ClientContext(url))
{
    //context.Credentials = credentials;

    var query = from web in context.Site.RootWeb.Webs
                where web.WebTemplate == "STS"
                select web;

    var result = context.LoadQuery(query);
    context.ExecuteQuery();

    foreach (var web in result)
    {
        var listQuery = from list in web.Lists
                    where list.BaseType == BaseType.DocumentLibrary
                    select list;
        var listresult = context.LoadQuery(listQuery);
        context.ExecuteQuery();

        foreach (var list in listresult)
        {
            Console.WriteLine("Web:{0} List:{1}",web.Title,list.Title);
        }
    }
}

Search based approach
Search in SharePoint 2013 includes a client object model that enables access to search results for online, on-premises, and mobile development. The Search in SharePoint 2013 CSOM is built on the SharePoint 2013 CSOM.
Example:
using (var context = new ClientContext(url))
{
    var query = new KeywordQuery(context);
    query.QueryText = "ContentType:Document";
    query.RowLimit = 8;
    query.SelectProperties.Add("Title");
    var results = new SearchExecutor(context).ExecuteQuery(query);
    context.ExecuteQuery();
}

Reference: Using the SharePoint 2013 search Query APIs
Comment: Thanks for your answer.The first approach is what I meant with having to loop through all sites and lists, because I can't skip any sites or lists. The second approach is a good alternative but I don't like the delay of the search engine. I'm on SharePoint online and I don't know when indexing happens.
Answer: Yes it is possible! I don't know of a CSOM equivalent to SPSiteDataQuery, unless you want to explore the Search capabilities of CSOM.
Below you'll find an example of how to do it. I'm sure there exist a more efficient way of doing this, but this is one way I could think of:
var context = new ClientContext("http://MyMagicalUrl");
var currentWeb = context.Web;

// Get all webs from currentWeb object
context.Load(currentWeb, website => website.Webs);
context.ExecuteQuery();

// Now you can loop through all the webs
foreach (Web web in currentWeb.Webs)
{
    // Remember, only get what you need
    var listCollection = context.Load(web.Lists, lists => lists.Include(list => list.Title,list => list.Id));
    context.ExecuteQuery();

    // Now you can do what you want using the list info.
}

Comment: This is what I meant with looping through all sites and all lists to get the correct listitems.
Answer: I needed this information in a clientwebpart so I ended up with a setting to limited the sites I need to query and used the normal CSOM method. I still have to execute the query on multiple lists so it is still not optimal, but at least the performance is acceptable. Code looks like this.
string siteToQuery = "Global";
SharePointContext spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext.Current);
using (ClientContext ctx = spContext.CreateUserClientContextForSPHost())
{
    var webQuery = ctx.Site.RootWeb.Webs.Where(i => i.Title == siteToQuery).Include(i => i.Webs);
    var webQueryResult = ctx.LoadQuery(webQuery);
    ctx.ExecuteQuery();

    if (webQueryResult.Count() == 1)
    {
      Web parentWeb = webQueryResult.Single();

      CamlQuery camlQuery = new CamlQuery();
      camlQuery.ViewXml = this.GetQuery();

      foreach (Web web in parentWeb.Webs)
      {
        List list = web.Lists.GetByTitle("Pages");

        Microsoft.SharePoint.Client.ListItemCollection items = list.GetItems(camlQuery);
        ctx.Load(items);
        ctx.ExecuteQuery();

        foreach (var item in items)
        {
          //do stuff
        }
      }
    }
}

Comment: Sharing some of that code, to show your solution, would be preferable
Comment: I added some of the code :)


How do I increase the number of RSS feeds in Firefox?

Question: I added lots of RSS feeds into Firefox bookmarks. But some of the new feeds are not shown because of a limitation. Is it possible to increase the number of viewed feeds? (For example, for xxxxxx.com it should show the last 300 feeds.)
Comment: I am finding the question unclear. Are you having an issue with the number of entries in an individual feed? Alternatively, are you attempting to follow so many different feeds that firefox won't accept and/or process new feeds that you add?
Comment: for example ; I added xxxxx.com to my firefox.It shows only 20 new feeds,but actually there are 40 new feeds on the source page.Is it OK now?
Answer: I'm afraid, in the case of live bookmarks (which I assume you are referring to) Firefox already uses the "maximum" number of available feed items, but most feeds itself have a limitation on the number of items available in a feed (e.g. some show only the last 10 or so, sometimes less and sometimes more).
Since this is a limitation of the feeds itself and not a limitation in Firefox, it can not be fixed in Firefox.
Comment: Heh. Well, a good alternative would be using Google Reader (http://www.google.com/reader/) which has historic data for quite some feeds.
Comment: I searched Mozilla extensions web page but no results yet...
Comment: Still, a decent feed reader can cache older entries. I hate to say it, but IE gets that right at least :-)
Answer: If the problem is that Firefox can't handle the number of different RSS feeds you are adding, you may be able to overcome the issue by organizing your feeds into folders.
I have used Sage and some of its "offspring" as well as Brief. Both of these extensions allow one to organize feeds into folders.
Answer: Maybe a more advanced RSS addon for Firefox may solve the problem.
See this article for reviews : RSS in Firefox: A Complete Guide.
The article itself is from 2007, but the described addons have only improved since then.
You can retrieve a list that includes all current RSS reader addons from here.


Use Google Photos from within Camera app on Samsung Galaxy S7

Question: Is it possible to make the default camera app on the Galaxy S7 use Google Photos instead of Samsung Gallery?
I like the preinstalled camera app, but pressing the thumbnail icon in the interface will always open the Samsung Gallery, even though I have set Google Photos as the default app for photo viewing.
For newer devices, creating an "app shortcut" has been recommended in various articles and discussion forums (e.g. at lifehacker.com). This however doesn't seem to be available on the Galaxy S7.
Answer: Opening the gallery is hardcoded in the camera app of your device.
There's no way you can change it. Atleast not for now. Maybe in later updates, they'd make it available.


Cobra hand held 50wxst aftermarket antenna

Question: I'd like to add an aftermarket antenna to my cobra HH50wxst to boost my range. My only concern is if I got a longer antenna, could it possibly throw off the SWR and damage the radio? I am totally new to this hobby and am afraid to break things. Any advice on this matter would be greatly appreciated.
Comment: Hello Daniel, and welcome to this site! :-)
Comment: Thanks, glad to join. I am not a ham operator, but I know the HAM guys know a lot about cb
Answer: If you are going to buy an antenna designed for use with that handheld, then it should work fine. Otherwise, you need to make sure that you get an antenna designed for the frequencies used by the radio (in this case around 27MHz, or 11-metre band), that has an impedance of 50 ohms, and has a BNC plug on it.
As long as the antenna meets those criteria, it should perform at least as well as the included antenna. For best results, an externally-mounted antenna is recommended if you will be operating from home or from within a vehicle. This is because signals will be attenuated by the walls or your house, or by the body of a car or truck.
This is the case for all radios, including but not limited to: CB, amateur, commercial, government, or emergency services.
Comment: Thanks, i am occasionally operating from home, but this is mostly for being on a walk away from home or camping. I ended up taking the advice you gave and picked up 2 antennas meant for handheld cb radios. Gonna get another handheld too.
Comment: Would it be wise once the antennas come in to hook the thing up to an swr meter and see what I get?
Comment: Measuring the SWR couldn't hurt.  Check and see how the SWR looks for the antenna that came with the radio also.
Comment: @DanielL.VanDenBosch Note that for an accurate measurement, you should use the shortest lengths of coax (if any at all) between the antenna and your SWR meter.
Comment: Interestingly, I can't get my meter hooked up to the antenna. The other thing is it would seem that the longer telescoping antenna does not perform as well as the one that came in the box from the factory.


How can I make a single event handler handle ALL Button.Click events?

Question: In my program, I have 9 buttons, and I have 9 separate event handlers for each of them, despite the fact that the code in each event handler is the same. It is proving to be very tedious to change the code for all of them. Is it possible to make a single Button.Click event handler that handles the Button.Click events for all of my buttons?
Answer: You can modify the Handles clause on the VS generated event code so that it can process the same event for multiple controls.  In most cases, someone might want to funnel most, but not all, button clicks to one procedure.   To change the Handles clause:
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button1.Click,
                 Button3.Click, Button4.Click ...
    ' just add the extra clicks for the additional ones

    ' you will need to examine "Sender" to determine which was clicked

    ' your code here
End Sub

This can also be done dynamically, such as for controls which are created and added to a form in the Load event (or where ever):
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    AddHandler Button1.Click, AddressOf AllButtonsClick
    AddHandler Button2.Click, AddressOf AllButtonsClick
    AddHandler Button3.Click, AddressOf AllButtonsClick

End Sub

To literately wire all buttons to the same event, you can loop thru the controls collection (uses Linq):
For Each b As Button In XXXXX.Controls.OfType(Of Button)
     AddHandler b.Click, AddressOf MyClickHandler
Next

Where XXXXX might be Me or a panel, groupbox etc - wherever the buttons are.
Answer: You can wire your click events to one specific one. how you do it depends on the IDE you are using.
if you are using Visual Studio then:
select a button control and press F4. This will open properties window for this control. In the events section (usually a little lightning icon) you can assign various events, which are supported by this particular control. Here you can select any specific or create your own event.
Answer: Here's how you could do it dynamically at run time so you don't have to write AddHandler for all the buttons:
Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    For Each ctrl In Me.Controls
        If (TypeOf ctrl Is Button) Then _
           AddHandler DirectCast(ctrl, Button).Click, AddressOf HandleButtonClick
    Next
End Sub

Of course, if this is too broad a stroke, you could put only the buttons you want to wire up to this event inside a panel, for example, and just loop throw the controls in YourPanel.Controls instead of the form.  Or you could set the .Tag property on each button to some value and only wire the handler when that value matches.  Just a couple ways I can think of.


Modal Chord Progressions

Question: I understand how the modes sound different by targeting certain notes. That part is coming together aurally. What I don't understand is how a chord progression can be model. Since chord progressions seem to pull from any diatonic chords, if I play a C Dm and Em , I can be playing the I ii and iii in Ionian or the VI,I and ii in Dorian. And they dont seem to always target the root except in the last Cadence some times. Who's to know ? Or are there progressions that are normally played in one mode or another. I hope I made sense...
Comment: An example might be So What by Miles Davis.  Though it doesn't "progress" much.  It's D-11 for a set number of bars, then shifts to Eb-11, then back in an A-B-A-A pattern.  The solos mostly gravitate towards Dorian, D then Eb.  Even though there are no accidentals we don't say it's in the Key of C, we say play it in D.
Comment: Modal chord progressions are addressed from a variety of different angles in posts on the site. As a starting point, here are [search results](https://music.stackexchange.com/search?q=modal+chord+progression+is%3Aquestion) for "modal chord progression is:question".
Answer: ii-V-I is a 'progression' in the sense that there are tensions and resolutions.  Basically dominants wanting to reach tonics.   That's the basis of all Common Practice harmony, and it relies on using modes that HAVE a dominant chord containing the leading note of the key.    That's the B in the middle of G (or G7) that wants to progress to C.
And that's why the great bulk of Western art music used major and minor keys.  Those are the modes that HAVE a fully-functional dominant chord. You can go out on harmonic journeys and return on a string of secondary dominants.  You can keep setting up new tonal centres by introducing THEIR dominant chords.  You can turn a dominant 7th chord inside out with ♭5 substitutions - but it's all still basically subdominants, dominants and tonics.
In a mode with no proper dominant chord, this sort of functional 'progression' doesn't work.   We have to work more on the basis of 'this chord sounds pretty next to this one!'  When there's no place a chord definitely WANTS to go, we cant surprise by going somewhere else!  That's fine, but we lose the functional drive that might be what you're thinking of as 'progression'.
Answer: You might be confused by the fact that the common meaning of "cadence" is to have a tension resulting from a dominant-functional chord, which has to resolve in another chord that (possibly) attenuates that tension, while possibly using notes from the diatonic scale of the tonal center (or its alterations).
Well, that's true for tonal music.
We are normally used to the concept of cadence as "return to the tonic in some way", but that's just its common meaning in harmonic lingo.
Tensions exist everywhere, not only in their classical meaning: a cadence is not really an end, but just a motion from A to B. And A and B could even just be two different sounds, and even unpitched sounds.
In fact, if you think about it, you are talking about "progression", and its etimology comes from the Latin word "progressio", which means "go forward".
Take for instance the classic "So what" example.
There is no actual dominant chord, you only have two chords, they both have minor sevenths, but they also are minor chords (so, technically not really dominant-ish), and they are both of the same type.
Some would say that there actually is a "normal" tension given from the Eb chord, which might resemble the harmonic function of the Neapolitan chord (which is built on the lowered second), or any augmented-sixth based chord built before the dominant - it is a half-tone-based harmony, and nothing creates more tension than a half tone.
But in reality, time - as always - is the most important factor in music.
The importance of a cadence is also created by its rhythm, the relation between the duration (and, eventually, harmonic function) of its chords and their timing (order).
Consider that having a prolonged tonic chord also creates tension, even if we don't feel it: as soon as the harmony changes, there is motion, and we realize that there actually was some level of tension (no, not because we were bored ;-) ).
Take the following:

It takes 6 minutes of tonic to get to an actual new chord. Maybe we didn't feel that need at first (and the crescendo and distorsion surely helped), but a change is always interesting after that much time.
The very concept of "So what" could be applied with any chord in the structure A-A-B-A, possibly creating a very similar effect, and that's not due to the nature of those chords, but the time relation between them.
In these cases, the cadence (or, better, tension) is given from the duration of the first chord, which creates a base, the introduction of the second, which creates an alteration (a.k.a. tension/motion), and returning to the original base (the tonic), no matter what chord was before, finalizes the progression, as its resolution stabilizes the previous movements.
Answer:
I ii and iii in Ionian or the VI,I and ii in Dorian...Who's to know ?

Let contrast tonal versus modal harmony.
Tonal harmony is in large part organized around root movement by descending fifths. In jazz it's progressions like ii V I. Another term for such progression is cadential harmony. In terms of diatonic chords and major/minor keys, the identity of those chords is not ambiguous. Dm G C would be C: ii V I while something like Em: VII III VI would be "weak" from a tonal perspective where the emphasis is on primary chords IV I V.
Modal harmony is not focused on primary chords IV I V. I suppose you could take the approach that any progression of chords that doesn't emphasize the primary chords IV I V or descending cadential progressions like ii V I could be modal. In such a case something other than cadential harmony needs to define the tonic.
C Dm Em doesn't have cadential progression to define a clear tonic. It could be C ionian: I ii ii, D dorian: VII i ii, E phrygian: VI VII i, etc. etc. Indeed, who's to know?
One way to clarify the tonic is with rhythm and phrasing. When could simply add bar lines at appropriate places to demark a tonic. Putting tonics at beat one immediately after the bar line is an effective way to do it...
C ionian: | I | ii ii, D dorian: VII | i | ii, E phrygian: VI VII | i
...or if we rotate the chord ordering and for more emphasis use harmonic rhythm to play the tonic chords for double duration it could be...
C ionian: ||: ii ii | I I :||, D dorian: ||: ii VII | i i :||, E phrygian: || : VI VII | i i :||
Melodically you can effectively define the tonic with lines build upon steps to the tonic scale degree, ex descending ^3 ^2 ^1 or neighbor motion ^1 ^7 ^1. Simple formulas like that work in both tonal and modal style. I don't mean the melodies would literally be only three note ideas. That tones would just be the main notes, or guide notes, of melodies.

Modal Chord Progressions


Cucumber disease/ pest identification

Question: Can anyone tell me what is happening with this cucumber plant?
Comment: Whatever is happening, I don't think it's a disease. More likely insects and/or sunscald.
Comment: It does look like a disease to me but I'm not able to confirm just by this picture. You can read more to possibly identify the problem here: https://apps.extension.umn.edu/garden/diagnose/plant/vegetable/cucumber/leavesspots.html
Answer: This looks very much like striped cucumber beetle damage. Once the beetles get established it is very hard to control them; the adults can move very quickly and can mash up a leaf by poking holes in it in very short time. Then they move on to another leaf. On the upper and lower surfaces of leaves and in flowers is where to find them active. One way to handle the beetles is to grow young plants from seed in a protected environment to get them growing fast and without checks due to cold weather or lack of rain and plant out when they are vigorous into warm soil and watch over them carefully.

Cucumber disease/ pest identification


Don't want people to know I'm online - How do you eliminate the green light from showing?

Question: I have chat turned off, but it still shows that I'm online (with a green dot indicator).  I don't want everyone to know when I'm online in Facebook.  How can I eliminate the green light from showing when I'm signed on to my Facebook?  This is a privacy concern.
Comment: Did you check for any app (mobile or web) that manages chat for you
Answer: IF you have an app which manages chat for you, such as Pidgin or Trillian, it could override the browser's web chat if you are logged into chat with them. Otherwise, if you disable chat in facebook, you should not be visible as online. If you are, it is a bug, and your only option at that point is to report it to Facebook.


2016 Nissan Versa SV flywheel

Question: Is the flywheel on a 2016 Nissan Versa SV part of the transmission? Is the gear shifter part of the transmission? Is it common for these parts to be excluded from the warranty on the transmission?
Comment: Welcome to Mechanics stackexchange.
Answer: Your vehicle would typically have multiple warranties. Two key warranties:  One for "bumper to bumper" and another for "powertrain".
Bumper to bumper warranty, also called "Basic", is 3 yr or 36,000 miles on odometer, whichever comes first.
The Powertrain warranty is 5 yrs or 60,000 miles.
Your warranty details are here
And there are lots of different pieces to the entire warranty coverage: emmissions, corrosion, battery, tires, etc.
Note, the flywheel is attached to and part of the engine. This part is covered by your 5yr/ 60,000 miles Powertrain coverage.
The powertrain warranty includes Engine, Transmission and Transaxle, Drivetrain, and Restraint System, supplied  by Nissan subject to the exclusions listed under the heading "WHAT IS NOT COVERED. Other driveline parts as indicated in warranty details.
From what I can see of that warranty guide, the transmission gear shifter and linkages are NOT covered by the powertrain warranty. They are covered by 3 years / 36,000 mile basic coverage. Check page 6 for Transmission and Transaxle for details here. Its pretty clear only internal transmission parts are covered under Powertrain warranty. And yup, shifter and linkages are external parts.
Comment: Don't assume the dealer knows the warranty details!  I once had a Ford Thunderbird with a turbocharger that failed.  The dealer said that the turbo was not covered and that would have been an expensive repair bill.  I had read the warranty and it specifically said "turbochargers and related components - 5 years or 50000 miles".  Once I pointed that out the dealer started mumbling and said they would cover it.
Comment: @jwh20 it's also possible the dealer did know, but hoped you didn't.

2016 Nissan Versa SV flywheel


How do companies manage to work remotely to meet client deliverable?

Question: In this situation of COVID-19, many business have affected. still, some companies are performing well while working remotely to meet their client deliverables and deadlines.
How are they managing to work collaboratively?
Comment: I'm voting to close this question because it is not about UX as defined in [help/on-topic] but should be asked at Workplace SE ([workplace.se]).
Comment: @HarshalKotkar I'd suggest you take a look around first and get a feel for how to ask good questions there. I'd probably guess that this question would be a little too broad to fare well over there. If you can focus your question to one particular aspect, it may be more answerable (e.g. scheduling, status updates, or collaborating with coworkers). You may find that your question has already been asked, or that articles on the web about working remotely (of which there are many now) may help you out instead.
Comment: @maxathousand Thanks for suggesting to me. I will ask the same in the workplace forum.
Comment: This question needs more specifics. A cleaning company obviously can't meet client deliverables when the staff is staying home; but other companies' work isn't bound by physical presence. Furthermore, I'd suggest asking specific question, e.g. how a certain business practice is being handled when people work remotely, rather than an open ended "how to they do it" without specifying what "it" really entails.
Comment: Didn't we just close this question?
Comment: @TymoteuszPaul OP asked it on UX.SE first, was redirected here and reposted it, then the UX question got migrated here so we ended up with both copies.
Answer: Successfully working remotely yet collaboratively is something that is import in this environment. Previously it wasn't critical for success.
In the past having all the employees working from home was viewed as a mode of operation that would be difficult to maintain. Companies generally allowed some work to be done from home as a employee perk. If they did allow a portion of the work to be done out of their sight managers and customers worried about productivity of those employees they couldn't see.
Now having the infrastructure in palace, or quickly available, to allow all employees to work from home is a strength. Managers still worry about productivity of people they can't see. That is why some managers and companies want to constantly check in. They want to see everybody on chat. They want to see everybody via video. The good managers and companies have figured out that even if the remote employee is only 2/3rds as productive that is far better than letting all their employees go and closing the company.
Of course some business can't allow the employees to work from home. That makes their business model in this crisis more difficult. Of course the last crisis was different as will be the next one.
Comment: But ... "some managers" are certainly not "all managers!"  Whenever I've been responsible for hiring, I looked for *professionals.*  And found them.  The people I could trust.  The people who took their responsibility to their employing company seriously ... the people who were determined to *earn* their keep, no matter where they were earning it from today.  I made it my business to try to keep them.  **:-)**  (And: *"Frankly, I'm not paid to be your Daddy.  I've got my own job to do, and that doesn't include making sure that you are actually doing yours.  If so, I hired the wrong person.")*


Arabic Walla Recordings

Question: Am looking for some Arabic walla. Conversations as well as yelling/screaming (as if under attack). Any libraries have these available?
Comment: DigiFX or some of the BBC libraries might - they tend to be more diverse, worldly libraries in that regard.
Answer: I live in Dubai so might be able to find some for you.
Is there anything specific that you need. If I don't have it I might be able to get it for you.
Let me know.

Arabic Walla Recordings


Tension at highest point in vertical circular motion

Question: Suppose a body is attached to a string, and is whirled around along a vertical circular path. At the highest point, it falls downward. Why do we say that the tension is 0? Tension and the force of gravity act downward so wouldn't they add up causing the string to slacken even if tension were positive? I understand that tension provides necessary centripetal force for the object to continue its circular motion, but centripetal force also acts downwards.
Answer: I think what you're missing is that the centripetal force has to have a particular value, and that gravity is also acting centripetally at the top of the circle.
At the top of the circle, the net force must have a magnitude of $m v^2/r$.  Gravity and tension both point inwards, so we must have
$$
T + mg = \frac{mv^2}{r} \quad \Rightarrow \quad T = \frac{mv^2}{r} - mg.
$$
But if $v$ is small enough, the right-hand side of this last equation becomes negative.  And tension can't be negative — that would mean that the string would be pushing the body outwards rather than pulling it inwards.  So this means that the string must go slack before it gets to that point.


MouseUpEvent stops working while Dragging MovieClip

Question: There is a mouseUpEvent listener attached to the stage in the main class, while dragging the movieClip the mouseUpEvent doesnot trigger the handler and the movieClip gets sticks to the mouse. While the item is being dragged and the mouse is moved away from the movieClip i.e somewhere not on the item but  on the stage the mouseUp is detected.
Edit: Here is the scenario I am using a static (Singleton) class as a movieClip as a "DragManager". Whenever a movieClip has to be dragged it is passed to the DragManager and is added as a child, when a mouseUp from stage is detected another static function of dragManager is called to stop the drag and put the movieClip on the appropriate layer.  Here is the static function in the DragManager which is called on MouseDown from variouslayers.
public static function startDragMethod(item:Item):void
{
instance.addChild(item);    //This is the instance of the DragManager
var boundArea:Rectangle = new Rectangle(0,0,610,760);
item.startDrag(false,boundArea);
}

In the constructor of the main class I add the eventHandler for the MouseUpEvent
this.addEventListener(MouseEvent.MOUSE_UP,stageMouseUpHandler);

The MouseUpHandler in the main class
private function stageMouseUpHandler(event:MouseEvent):void
{
DragManager.itemMouseUpHandler(event);
}

If there is something wrong with technique please guide me, my goal is to implement drag drop between various layers and with as less coupling as possible.
Comment: can you post where you're adding the event listeners?  Could be lots of things, but posting the code will be the easiest way to figure it out
Answer: Well there are many ways to get the task done. Put some condition at your static listener function or when the object is dragged.
like
public static function startDragMethod(item:Item):void
{
instance.addChild(item);    //This is the instance of the DragManager
var boundArea:Rectangle = new Rectangle(0,0,610,760);
item.startDrag(false,boundArea);
check = true;
}
private function stageMouseUpHandler(event:MouseEvent):void
{
if(check==true)
{
    DragManager.itemMouseUpHandler(event);
    check = false;
}
}


How to get a tourist visa to Korea?

Question: I'm a Nepali citizen currently living in Japan. Can I get a tourist visa from Japan to Korea? If it's possible, how to do it?
Answer: If you're in Tokyo, go visit the Consulate in Minami-Azabu. If memory serves, preferrably in the morning. Bring your passport, Japanese ID/visa, proof of address, proof of status (employment, student, etc), ID photos. With any luck, you might be able to apply that very day. If not, they'll tell you what you need.

How to get a tourist visa to Korea?


What are campaign packages?

Question: I have a requirement where I have build 4 campaign packages in marketing cloud . Can anyone help by understanding what are campaign packages.
Answer: I think its just the packaging of various components within a Campaign in Marketing Cloud. For e.g. a campaign may contain Emails, Lists, Data Extensions, Journeys etc. This collectively can be called as a Campaign package.
There is no precise term as 'Campaign Package' in Marketing CLoud

What are campaign packages?


Pick up the not frozen discard pile having a Canasta meld

Question: My wife and I have gotten into a bit of an argument.
If the discard deck is not frozen, and I have already met the minimum meld whether that be 50, 90 or 120, can I pick up the discard deck with a natural card and a wild card?
We are trying to use Hoyle to play by.
Comment: Which Hoyle? Hoyle to game rules is like Webster to a dictionary - tells you nothing without also knowing the publisher name.
Answer: Yes you can; this is one of the main differences between the discard pile being frozen or not.
Source:

When the discard pile is not frozen against their side, a player may take it: a) with a natural pair matching the top card as above; or b) by melding the top card with one matching natural card and one wild card from his hand; or c) by adding the top card to a meld they already have on the table.

Source 2:

But first let us consider the case where the discard pile is not frozen against you. In that case, if the top card of the pile is a natural card (from four up to ace), you can take the pile if either:

you play two cards from your hand that make a valid meld with the top discard: these could be either two natural cards of the same rank as the top discard, or one such natural card and one wild card,

or

the top discard matches the rank of one of your partnerships existing melds, and you add it to that meld.

If the pile is frozen; then you must have 2 naturals in hand.


What is the maximum size of a Solana transaction?

Question: Some transactions fail to execute/build due to being too large, so what's the maximum size?
Answer: Answering my own question to help others:
Taking from the Solana docs:

Messages transmitted to Solana validators must not exceed the IPv6 MTU size to ensure fast and reliable network transmission of cluster info over UDP. Solana's networking stack uses a conservative MTU size of 1280 bytes which, after accounting for headers, leaves 1232 bytes for packet data like serialized transactions.

i.e. the maximum size of a transaction is 1232 bytes.


Windows print screen with Mac Keyboard

Question: Can anyone out there tell me how to do a screen capture in Windows with a Mac keyboard plugged in? I have my Mac keyboard and mighty mouse plugged into a KVM switch that controls both my MacbookPro and my WinXP desktop. I'm having a terrible time trying to do certain things that require those extra keys like insert and print screen. Even the num-pad doesn't work! Any ideas, tips, tools, drivers?
Comment: I'm not running OSX. I'm plugged into an actual Windows box with a Mac Keyboard. That said, I just tried Cmd-Shift-3 to see if it would screen print to my clip board and it didn't.
Comment: Have you tried the OS X way?  Command-Shift-3?
Answer: You could use the On-Screen Keyboard.

Start > All Programs > Accessories >
  Accessibility > On-Screen Keyboard

If you're trying to take a screenshot, you can do it programmatically. Take a look at this article: Programmatically Take Screenshot Using C#. Hope these ideas help.
Comment: The downside of the on-screen keyboard is that you can't (AFAIK) screenshot mouse tooltips.
Comment: This might work! Thanx, though I'd really like a driver or something that would enable the numpad and the insert key.
Answer: I've got a brand new Apple extended keyboard connected to a DELL laptop running Windows 7 64-bit. This is what works for me:
F14 copies the entire screen to the clipboard.
Alt+F14 copies the active window to the clipboard.
Comment: Doesn't work for me on Windows 7.
Comment: Doesn't work for me on Win 8.1  :(
Comment: For me **F13** works to start Snagit running in Windows Citrix session. Seems to be "PrntScrn"
Answer: Per this video on YouTube, the key combination that worked for me using a full-size Mac keyboard (model MB110B/B) plugged into a Dell laptop running Windows 10 was:
cmd + F15 (aka ⌘ + F15)
Unfortunately I couldn't discover the combo needed to copy just the current window (this would be Alt + PrtScrn on a Windows keyboard).

After almost a year of using this technique, I discovered that each screenshot taken was being saved as a PNG file in a Screenshots subfolder of my Pictures folder! I don't know whether this is specific to my particular computer or not, but regardless I couldn't find any way of stopping it from happening.
Answer: It would help to know what model of keyboard you had!
Edit: Model A1048 is this one:

On a Windows machine, the Clear key is often num-lock. Help may be Insert. There's no Menu-key equivalent, but you can fake it with Shift+F10.
Print Screen / Scroll Lock / Pause are available on some Mac keyboards, but on others are replaced by F13+ keys which are not equivalent. The on screen keyboard is the only way to access them.
Comment: Model??? It says on the back of the keyboard, "Keyboard". Kinda like the generic cereal @ the supermarket. It's one of those white keyboards in a clear plastic casing. The only thing I can get is model: A1048 in fine print.
Comment: That's the right keyboard. I was looking for drivers that would map the extra F keys to hidden keys but I believe that only works in BootCamp. Thanx a bunch for answering!
Answer: To do a print screen while running Windows in Boot Camp and using a Mac keyboard, use the keyboard combination: SHIFT + FN + F11
Also works with mac keyboards on windows pc
Comment: Where's FN on a Mac keyboard?
Comment: Yes, but my question was regarding an Apple keyboard plugged into a physical Windows machine.
Answer: I found easiest way to key PrtScr to F13-F19 button with this little tool called SharpKeys (http://www.randyrants.com/sharpkeys/). It writes registry changes for you.
I use print screen quite a lot, so I do want to find it easily. And because there is no actual official use with F13-F19 button in Win, why do not map those to some useful funtions.
You can easily change CMD and ALT button to match regular windows keyboard layout if you wanted also. Many want to do this also if use mac keyboard on windows.
TIP: There is also great print screen program that can be useful called LightScreen (http://lightscreen.sourceforge.net/). It's free and there is also portable version available. I found this very useful, because it's let me to choose regions etc.
Answer: If you have Microsoft Office installed in your machine, then look for Microsoft OneNote. It has a Screen Clipping feature which can be invoked by Right Command + S. Once you press Right Command Key + S, you will see your screen go white transparent and select desired area to capture. Screen Clipper will then ask Copy to Clipboard or One-note. Choose Copy to Clipboard. Bingo! you can paste it anywhere as you want it, ur mail, document, powerpoint, etc.,
Answer: Solution 2021:

Install the opensource Greenshot tool https://github.com/greenshot/greenshot
Set Capture Region hotkey to Ctrl+Shift+S (I selected this in my mac large keyboard, you can choose whatever F19 or any)
Choose Destination to Clipboard. Keep clipping. Done.
Answer: I have an old bluetooth Model A1016 that looks just like the above keyboard sans cord and F13 invokes printscreen thru my RDP session on the Windows7 PC I'm controlling via my old Macbook Air 11
I just found this forum cause I needed to do this and I just happened to try F13 after something I read here inspired me to do so. Attached is the cmd-shift-4 screen cap of the RDP session showing "Greenshot" just after it was invoked thru the RDP session via F13 from the Mac's wireless keyboard (I emailed the Mac screen cap to the work PC).
Greenshot's defaults are set to use the PC's print-screen key...
I needed this because I do A LOT of screen caps for work and the "snipping tool" sucks rocks... The PC belongs to my customer so I don't want to buy Snag-it for it... I was unaware of Greenshot until a few days ago
Print Screen Section From Greenshot showing me writing this on the PC invoked from the Mac's F13 thru RDP
I downloaded Greenshot a couple days ago, so I've used it exactly 3 times so far and those 3 screen caps are uploaded here. After I installed Greenshot and went to do a screen cap I thought "oh &%#@ ! Because I don't have a 'print-screen' key and that's what lead me here. It appears that Greenshot hot-key combo's are configurable but all those key combo's work for me because my F13 invokes the PC's 'Prt-scrn' key
This full screen cap invoked from the Mac thru RDP via the Mac Option/Alt key + F13 key
And finally a couple of Mac full screen caps (emailed to PC again) showing the Mac's whole screen with the Greenshot cross hairs waiting for me to select a screen section on the PC as I finished writing this. This would have been way cooler if I could have easily recorded it in video... :-P
Mac's full screen as I work
RDP window center stage
Thanks to the peeps that were discussing the function keys!
Maybe this only works for me because my customer's laptop has a double "insert/prt sc" right next to it's F12 directly above the it's delete key and that just happens to map to my F13...  If Greenshot really is as configurable as that menu suggests then I would expect anyone to be able to map a hot-key combo that would suite them.
I hope Greenshot isn't keysrtoke logging spyware ;-)
I hope this is helpful to someone...
-Richard
Comment: I think you miss-read my answer...
Comment: Re-reading your answer carefully, I think I see what I misunderstood. The issue still stands though: F13 worked because the client you were RDPing to has a PrtScn button, making this extensive part of your answer irrelevant and unnecessary noise. Your answer is well meaning, but writing more simply and clearly, focusing on the actual solution (Greenshot is what I think you believe is the solution) would make it easier to comprehend. Also, it's very unlikely Greenshot is a bad program. It's got a pretty good reputation.

Windows print screen with Mac Keyboard


how to dump output of a perl script on linux into a log file with file name as timestamp

Question: I have a perl script example.pl that I run on linux box. I need to capture the output from the execution of the perl script and timestamp its name. I know the output redirection method but I am looking for a way to do it from the script example.pl itself (if possible)
Answer: It's easy to redirect the STDOUT to a file. Just do this at the beginning of the script:
open STDOUT, '>', "my_stdout_file.txt";

And this is a function that returns a file name with a timestamp:
sub generate_timestamp_filename {
    my $tstamp = sprintf( "%04d%02d%02d%02d%02d%02d",
                                $now[5]+1900,
                                $now[4]+1,
                                $now[3],
                                $now[2],
                                $now[1],
                                $now[0] );

    return "my_prefix_$tstamp.txt";
}

Answer: You can redirect output and error streams using Typeglobs or you can do the following.
#!/bin/perl

open(STDOUT, '>',time.".out") or die $!; #the time function gives you the timestamp
open(STDERR, '>',time.".err") or die $!;
print "output"; #goes to <timestamp>.out
warn "error";   #goes to <timestamp>.err

Answer: Here is the quickest way to do this:
 open(STDOUT, ">myfile") or die $!;
 print "Hello world"; #now goes to myfile

 open(STDERR, ">hisfile") or die $!;
 warn "Error here"; #and that's in hisfile

The other alternative is to use select:
open(my $FILE, ">stdout") or die $!;
my $old = select($FILE);

# Done capturing output
select $old;

Comment: `select` will fail if someone uses `STDOUT` directly and won't be inherited by child processes, but it's easy to restore.


How to implement live agent through lightning component for napili template?

Question: I have already seen one video published by salesforce. In which they have used live agent button in napili template via lightning component, but how can i implement it. please share in detail.
Answer: It will be available to us via appexchange once it passes security review .Currently the component is not available .You may reach to your salesforce AE and see if you can access the component.


In postgres LDAP authentication, are passwords encrypted?

Question: I am wondering if postgres LDAP login is secure? Would passwords be transmitted in clear text potentially if this is not set up properly?
Comment: With Postgres LDAP authentication, the password stays in your LDAP server. Postgres never knows the password.

Are you using TLS to connect to Postgres? Are you using TLS to connect to LDAP?
Answer: PostgreSQL LDAP authentication mechanism does not provide by itself security guarantee. The password used for DB is either plain text based or MD5 hashed. Your communication protocols do. But even if the communication is encrypted using SSL, it is better to hash your passwords with MD5 since you can always be sniffed or trapped using  other methods.