Is it permissible for me to take commissions online to paint landscapes and cities without drawing anything haram?

Question: if I am on instagram or titter as a digital artist and people commission me to make a landscape and pay me. Is it haram to do that since they may be using my painting for haram things
Answer: You have only a limited responsability for what happens with your paintings.

It is haram if your paintings incite to do haram things.
It is makruh if you know that your customer is often using them for haram things.

If there is nothing wrong with your paintings by themselves and you sell them  anonymously or to anyone of whom you do not know an evil purpose - which is probably the case with your work -, you are not responsible for what is done with it later.


If two beams with orthogonal polarization states are superimposed, then how to evaluate the phase distribution of final beam?

Question: Let the two input beams have different phase fronts and have orthogonal polarization states (say linearly polarized along x and y direction respectively). If these beams are superimposed, then the final polarization states will modify depending on the phase profiles of both input beams. However, how to determine the phase distribution of final beam ? ( it will have components in both x and y direction)
Answer: If the polarisation states are orthogonal, the two slits will not interact with each other. Simply calculate the one-slit patterns from the two sources. Remember that the phase of the (presumably coherent) light and the polarisation have nothing whatsoever to do with each other -- Temporally coherent classical light in a polarisation-independent medium can be completely represented by an element of $L^2(\mathbb{R}^3) \otimes \mathbb{C}^2$ -- that is, a pair of (non-interacting) square-integrable functions of space e.g. $\mathbf{\Psi}(x) := (\psi_L(x), \psi_R(x))$ in the left-right circular basis.
Supposing you have some appropriate photon propagator $K(x, y)$, it is possible to calculate the final wave-field completely by $\mathbf{\Psi}(x) = \int d^3y K(x; y) \mathbf{\Psi}(y) $ - just propagate the independent components separately.
Your life will however get tricky if

There is any object in the beam's path that couples the two polarisations - e.g. an optically active sugar solution
The light is temporally incoherent, i.e. the beam shape changes noticeably over time.


Does Ganon get super armor during his Warlock Punch?

Question: Sometimes, while I am Ganon, my Warlock Punch (Basic B attack) is unstoppable, to even a great barrage, but sometimes a single attack cancels my move. What happens during Ganon's Warlock Punch to Ganon?
Comment: You can get super armor for sure if you rotate while doing it. It only lasts for a few frames though, much like the home run bat.
Answer: Yes indeed, there is a sizeable period of time during the Warlock Punch in which you will not flinch from anything (though you can still be grabbed). However, it only occurs when you use the attack on the ground, not in the air.

Warlock Punch (default): super armour from 11-63, hits on 70-71
Warlock Blade (custom 1): super armour from 8-53, wind on 53-59, hits on 60-66
Warlock Thrust (custom 2): no super armour, hits on 40-41

Note: Custom special timing might be off a bit because I'm not yet 100% sure how the animation speed multipliers work.
Answer: Like the bat, there's a few super armour frames towards the end of the move just before the hit. If they hit you at the start of it you'll be interrupted but if they hit during the super armour frames they're likely to get a face full of fist. A more extreme example is Ike's B, when fully charged or extremely close to it, it has super armour as you release it but only at that point.


Why can't I get my Azure, WCF, REST, SSL project working? What am I doing wrong?

Question: I'm trying to get SSL, WCF and REST under Azure, but the page won't even load.
Here are the steps I followed:
1) I mapped the www.mydomain.com CNAME to my azuresite.cloudapp.net
2) I procured an SSL certificate for www.mydomain.com and properly installed it at my azuresite.cloudapp.net hosted service project
3) I deployed my WCF REST service to Azure and started it. Below is my web.config configuration.
The http (non-https) binding version worked correctly. My service URL, http: //www.mydomain .com/service.svc/sessions worked just fine.
When I deployed the project with the web.config below, enabling SSL, https: //www.mydomain .com/service.svc/sessions does not even pull up at all.
What am I doing wrong?
<system.serviceModel>
    <services>
        <service name="Service">

            <endpoint address="" binding="webHttpBinding" bindingConfiguration="TransportSecurity" contract="IService" behaviorConfiguration="RestFriendly">
            </endpoint>
        </service>
    </services>

    <behaviors>
        <endpointBehaviors>
            <behavior name="RestFriendly">
                <webHttp></webHttp>
            </behavior>
        </endpointBehaviors>
    </behaviors>

    <bindings>
        <webHttpBinding>
            <binding name="TransportSecurity">
                <security mode="Transport">
                    <transport clientCredentialType="None"/>
                </security>
            </binding>
        </webHttpBinding>
    </bindings>
</system.serviceModel>

Answer: Did you add the https endpoint to your web role in the ServiceDefinition.csdef file?
It should look something like this:
<WebRole name="WebRole">
  <InputEndpoints>
    <InputEndpoint name="HttpIn" protocol="http" port="80" />
    <InputEndpoint name="HttpsIn" protocol="https" port="443" />
  </InputEndpoints>
</WebRole>

See http://blogs.msdn.com/jnak/archive/2009/05/12/https-endpoint-on-windows-azure.aspx for more info.
Answer: You may be missing a service behaviour. Try adding this:
   <serviceBehaviors>
    <behavior name="RestService">
      <serviceMetadata httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
   </serviceBehaviors>

Then when you define your service:
   <service behaviorConfiguration="RestService" name="WebService.Rest">

Edit
Another thing that could be the problem, is that the request is not reaching your webrole. Have you set up an inputEndpoint for SSL? see Link


Do reverse bear traps kill survivors past the exit gate if it has not been activated?

Question: When a bear trap is active and you try to leave it kills you but does it still kill you if it's not active?
Answer: No.
Once the exit gates are powered, the only thing putting a trap on someone does is give you points.
This was a change implemented alongside the Endgame Collapse; prior to Endgame Collapse being added, traps would automatically activate if they were put on after the gates were powered.
Comment: Side note: This means you should probably use them as soon as you can.  At the very least, they cost the survivors time that they could otherwise spend doing generators.


Steven King's Cell Novel

Question: I made it about half way through Steven King's Cell novel and I ended up losing my copy and never finishing it. I understand that the film will be released this year. Does the book ever reveal the source of the signal? It's been on my mind recently. Appologies for any spoilers. Thank you.
Comment: Yes, yes it does.
Comment: @DaveJohnson no, the source of the signal is not revealed. There are some theories of the characters, but nothing is clealry explained.
Answer: I do not have the book handy, though I will try to get more details later.  However, it is revealed that

 The cell signal is the work of terrorists.  We also find out that they just wanted to destabilize the world a bit, not turn it into an actual dystopia.  Something went wrong, though I do not recall what, exactly.
Comment: This was only a guess by one of the characters, we never find out if they were right or not.
Comment: @Liesmith I do not have the book anymore (just looked), but I distinctly remember a scene in which we meet the scientists responsible.  I may have to buy the Kindle version just for this....

Steven King's Cell Novel


Forgotten Icloud username and password?

Question: My iphone recently died from water damage but i had an icloud account set up with all the phones details however i cant remember the username or password for the account so i can put the information onto a new phone any suggestions?
Comment: Start at https://iforgot.apple.com
Answer: First, try and login to icloud.com and verify that you have your contacts and all the information you need there.
If you dont remember your password but still have access to your email you can try by using Apples iforgot page:
https://iforgot.apple.com/password/verify/appleid
You can try several different emails until you know your login, if you still have access to your email that is.
If you dont have access to your email, Apple can change that when giving their support a call, be prepared to answer a lot of questions amongst your security questions and for the last digits in your credit card number.

Forgotten Icloud username and password?


Surviving a dark hycean world

Question: A dark hycean world is supposed to be a hot water world with a thick atmosphere around a red dwarf star. This means it's tidally locked with one side forever facing the sun and the other forever facing space. These red dwarves do tend to flare often so proper shelter would be a must. Would just going beneath the clouds suffice or would submerging beneath the ocean be required to avoid the solar radiation?
Answer: It may not be necessary to seek shelter during a red dwarf star's flares at all.  Recent research shows that red dwarf flares are emitted from the poles of the stars, away from the star's equator and planetary orbital plane.  So, if shelter is required at all, it's unlikely that much will be needed.
If the only threat is the greatly increased luminosity during the flares, this could be mitigated by sheltering behind the clouds or on the dark side of the planet.
Comment: Kind of takes the fun out of it
Comment: They're still going to increase luminosity a lot.
Comment: For sake of argument let's assume there is danger
Answer: Hard to see, the dark hycean is...
An article on this made the rounds recently, based on this paper.  Note that "Dark Hycean" is defined in terms of "habitable zone" - it is said life cannot exist on these worlds except on the far dark side of the tidally locked planet.  Avoiding direct solar radiation is, therefore, not a priority as they envision it.
To be sure, there is not really such a thing as a habitable zone, only a habitable planet.  The poles of Mercury have comfortable temperatures while the "seas" of Neptune are likely much too hot for any life we imagine.  Even with the narrow definitions given, the dark hycean planets might allow for temperate upper layers of the atmosphere as on Venus or Saturn, or cool deep layers of ocean far below.
The flyers of such a world should be well evolved to withstand radiation, like some organisms on Earth; if anything, they come seeking the flares to harvest their energy.
For the night side, I would divide up the organisms as with my musings on Saturn, into Earthlike life and filamentous life.  The Earthlike life relies more on biochemistry, and uses anti-solar cells (there's such a thing!) to gain some energy by radiating heat out to space.  Filamentous life embraces the turbulence of the air and sea, consisting primarily of long filaments of graphene, carbon nanotube ... apparently diamond is on the list now.  Stretching the filament generates piezoelectricity, which is captured and used to generate electromagnetic waves along the filament to supply the organism's biosynthetic energy.  On most planets these two geneses of life work together symbiotically.  For example, the daytime flyers rely on filamentous life to form the large flight surfaces needed to move efficiently and safely at high altitude in a hydrogen atmosphere, but rely on Earthlike photosynthesis to absorb the solar radiation.
Comment: @JoeSmith - Sort of.  Do an image search for "solar drone".  Now, our life forms will certainly have the ability to flex wings, so don't take that too literally - cross a solar drone with a manta ray, perhaps.  But it has to be *very* light thanks to its sturdy carbon filaments, and absorb a lot of solar radiation.  The Earthlike life might be macroscopic symbiotes roosting on this platform, or microscopic networks of biochemical symbiotes integrated with it like fungus growing on a log, etc.
Comment: I didn't mean to stick to that literally.  After all, I put a solar drone in the other teleporter. :)  You could make it a very short, very wide planarian, sea bird without feet, a frisbee with bead curtains hanging out that interact with the turbulence ... it just needs a sunlit surface that doesn't waste energy, a vaguely plausible ability to fly, and environmental handwaving to accommodate it.
Comment: Should I be picturing giant kites with lots of streamers?
Comment: I can see it. Different regions could have different local symbiotes. Or different species could attract different symbiotes.
Comment: But manta ray shape feels too been done.
Comment: Thank you. This gives me ideas
Answer: Given the projected depth and density of the atmospheres of hycean worlds there may be no need for additional shelter from radiation. I would be more concerned with building habitats that can survive the extremes of weather that are thought to be the norm on a tidally locked water world. Actually you'd have to build with flares in mind there as well, the weather would be made more violent by flare activity due to the increased energy flux raising the thermal gradient.
Comment: @JoeSmith Perpetual transglobal circulation caused by the vast temperature differences between the light and dark sides of the planet.
Comment: By extreme weather are you talking about the perpetual storm at the center of the light side.
Comment: Might want to ask a question about that

Surviving a dark hycean world


What causes boxwood hedging to lose its leaves in the UK's winter months?

Question: Boxwood is supposed to be an 'ever-green', yet in the UK it's becoming increasingly noticeable over the past few years how they shed their leaves, especially on the top surface, over the winter months as shown in the two example pictures below. Yet starting in spring, new leaves grow to replace those lost: If boxwood is an 'everygreen' then why does it lose some of its leaves in the UK's winter months?
Answer: It usually means the Box is affected by one of the myriad problems it is prone to  these days in the UK, ranging from infections such as Box Blight through to infestations such as Box caterpillar. Keeping them closely trimmed doesn't help with infections, but see here https://www.rhs.org.uk/problems/box-problems to try to identify the problem yours is having. Note that, with Box caterpillar, regrowth does occur once the caterpillars have left - you may need to wait till fresh growth arrives to determine precisely what the problem is.


Add Encryption to Images

Question: Is there a way to add encryption to images once they are uploaded on the website and stored on the server?
Answer: Encrypted Files module sounds like exactly what you're looking for. From the project page:

Say you want users of your site to be able to upload and download documents, but you also want these documents to be protected in case someone breaks into your server. This module allows Drupal to encrypt files that users upload and decrypt files for download, keeping the unencrypted versions of files from ever being stored on disk. It does this by creating a custom file stream wrapper that Drupal can read from and write to and a new download method that sits alongside the regular public and private methods. So you can make Encrypted Files the default download method, or only use it as the download method for specific file-type fields.

Add Encryption to Images


How to enable manual login?

Question: I would like to login as root, but I cannot find a way to enable manual login on Elementary OS.
Answer: First read this article just to learn the basis. https://www.redhat.com/sysadmin/sysadmins-dont-sudo
Then the best idea is to type sudo visudo and add yourself to the root group or wheel (Red Hat, CentOS, Fedora).
You must read about the visudo command and how to make a user as an additional root admin in the system.
I do not want to write an elaborate.
Just for your information that it is not secure. Probably, I did not check it, there is a need to edit a .profile file or .bashrc file to make it work. But I need to check it.
Anyway it this is really bad idea, because you may just screw your system. Root is God and God can create and destroy.
There is no need to run as root every day with elevated permissions. This way you will run every app as root and simple java script during browsing the Internet with any browser will be able to harm your system because of elevated level.
We use su or sudo. I usually use:
sudo su -

or
sudo -i

To work as root in terminal.
But this is for experienced users. I do not recommended to work as root for inexperienced user.

How to enable manual login?


Proplems of generate rig

Question: I'm trying to generate a rig for my character. But for some reason, the generated rig doesn't fit my setup metarig. Can anyone help me to fix it?
Answer: Both model and Metarig should have all transform applied (Ctrl A) before generating. Check if your metarig has coordinates 000, 000, 111.
Check Delta transforms also.

Proplems of generate rig


T4 Generate ASP.NET WebForm UI

Question: I'm staring to learn T4 .
I want to create a framework for my self that enable me to generate DAL and UI.
Like Code generator softwares that maps Codes and User Interface from database .
i don't have any question about generating data access layer.
my challenge is to generate UI ( asp.net controls and HTML).
is there any sample exist with T4?
what are your suggestions about this Code Generator that i want create?
Answer: Please try my post here: T4 Templates for ASP.NET Web Form CRUD Application.
I put a very basic code snippet generating templates for an aspx page (DetailsView and GridView for CRUD), ObjectDataSource methods for CRUD operations in VB, and SQL stored procedures matching with them.
Answer: Have you looked into Microsoft Visual Studio LightSwitch? I feel your search ends at Microsoft LightSwitch.
LightSwitch is able to generate UI for you. All you need to do is tell it to pull the data from one of the logical ends it is able to understand. As of now it is letting you talk to 1) WCF RIA services, 2) to Sharepoint through WCF data services and you can also connect LightSwitch presentation layer to Entity Framework.
Besides this you get amazing capability to customize your UI. LightSwitch UI is basically Silverlight 4 based UI which can be hosted out of browser or on a web server.
Hope this helps.
Comment: It generates UI in Silverlight 4.0, but not in ASP.Net. Give it a shot, I hope you will be happy.
Comment: Does LightSwitch Able To Generate UI for ASP.net ?
Comment: Thank You :) i will try it , but still i have to Use ASP.NET (html) as Presentation Layer.

T4 Generate ASP.NET WebForm UI


How far can a planet with living beings get before we cannot see the living beings?

Question: Let there be a planet with Earth-like life. However, no trash or monuments or other visible structures, just organisms. How far can that planet be from Earth before our equipment just cannot observe the life anymore? Furthermore, let's say that our equipment is perfected and limited only by natural laws: how far can the planet be now?
Comment: Most answers reduce to using proxies to estimate whether a planet could bear life or not but my question is about directly observing life from Earth. I wanted to know how close we need to be (or to get) to a planet to be able to confirm the existence of life on it, with the current and perfect observation equipment. From these answers, I'm getting – "very close". Is that right?
Comment: Directly observing life requires a microscope, not a telescope.  The distance depends entirely on the nature of the living things.  So the answer is "somewhere between 0.1mm and a billion km" which isn't very useful
Answer: The simple answer to this would be anywhere that is physically unreachable. If there happened to be Earth-like life out there in our solar system, we would likely be able to detect it, then land a probe and confirm.
When it comes to planets outside our solar system, then it becomes difficult. If there was no trash orbiting (and thus no way to notice slight dips in light etc) then we would likely be limited to studying the atmosphere using the transit spectroscopy method (more on this HERE) where we can detect the gasses and chemical makeup of an exoplanets atmosphere. There may possibly be other things to look for in xray or infrared spectrums, such as localised hot-spots if there is intelligent life, although depending on distance and size of the planet, this could be difficult.
Overall, no matter what we detected, if it was to far away for us to physically be there, then we would only be theorising. We could say 'This planet is a great candidate for life' and things along those lines and present papers on findings. We would, however never be able to confirm it.


Centralize Linux System Management

Question: We currently maintain several linux servers and are looking to employ sub contractors. However, we wan't to keep tabs on who does what on each server. Other then creating sudo accounts on every server, is there a centralized user management system that a user must log into and then are able to access or send commands to certain systems?
Comment: You could roll your own proxy console server and capture the history files from each session.
Answer: Sounds like you require a centralised authentication system and a centralised audit system for monitoring.
You could configure a LDAP server for centralised authentication using the Linux PAM module. This server would manage Role Based Access Control and sudo permissions across systems.
For logging user activity, you could use something like snare, splunk, logstash etc for log shipping from each of the systems being worked on. You could search based on user or system to identify user activity and commands being run.
Answer: This is too complicated a question to answer here - even if you had told us what the sub-contractors were doing.
Do you have management tools in place? (you might want to have a look at puppet and Canonical's landscape).
Suppose you had the facility to record every action by every sub-contractor - do you the capacity and skills to audit that?
Depending on what they were employed to do, I'd let them do anything they want on a machine assigned to them, but require them to check in any and all changes into a central, managed version control system - and wipe / rebuild the systems from the version control at least once a week.
Comment: I'm not sure that this is helpful, and even comes off as a little insulting to the OP. It is not too complicated, he is asking about pre-established approaches to Linux administration, something that is a very real question in Linux security.

Centralize Linux System Management


How can I select messages in mutt based on character set usage?

Question: I am trying to mark all messages that use either chinese characters or cyrilic (russian) characters for deletion, since to me, they are all spam.
Answer: You can filter on the encoding foo with: ~h^content-type:.*foo
However this is rather limited. First, messages using specific characters (Chinese characters, Cyrillic...) can be encoded in UTF-8. Moreover, for messages that have attachments, the encoding is specified in headers of MIME attachments, and from the point of view of Mutt's patterns, this is the body; you can still use ~Bfoo, but it will be slow and you may have false positives (you can't include content-type because attachment headers may be on several body lines).
There may be external tools that can identify the script, but that's no longer related to Mutt...
If this is for spam filtering, Bayesian filters may be good for this kind of things (without needing to know what script it is).
You can also filter on the presence of some characters belonging to a specific script: see Use regular expression to match ANY Chinese character in utf-8 encoding. This doesn't work in Mutt yet (perhaps in the future), but external tools could be used in the mean time.
It's also possible to filter without decoding first (this is faster). For instance, I currently filter some Russian spam in postfix with the following pcre regex (case sensitive):
/^Subject:\s*"?=\?[Uu][Tt][Ff]-8\?[Bb]\?(0[J-Z]|(KN|W9)[C-R])/i

Comment: I would like to mark the message if even a single chinese or cyrillic character appears. Even if it uses UTF-8 encoding, there ought to be a way to do this; I guess these characters are in particular ranges.
Comment: @dbkeys Answer edited. Perhaps you can find other methods via a search on keywords like: chinese utf8 regex script, and also "chinese spam" / "russian spam".


How to install Protobuf 3.5.1 on MAC?

Question: How do I do that? I have brew installed, but everytime I do brew install protobuf it installs 3.6 instead. How do I get 3.5.1
Comment: You might wanna check this: https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula
Comment: i looked at all of it nothing works. protobuf used to be at 3.5.1 3 months ago but now they updated. how do i get 3.5.1
Answer: Homebrew core does not support older versions of software. If you need an older version of something, you will need to use your own custom formula in a custom tap that you maintain.
Start with the current Homebrew core formula. Copy it to your tap and stick a @<X.Y> at the end of its name to indicate what version it's for. Edit the file and change the url to point to the download for the particular version you want. Fix up the sha256 checksum value for the new file. And change the class name in the formula file to ProtbufAT<XY> where  is the version number you put in the file name, with the periods removed.

How to install Protobuf 3.5.1 on MAC?


instantaneous forward rates vs forward LIBOR rates

Question: HJM describes the behavior of instantaneous forward rates while BGM describes the behavior of forward Libor rates. From concept perspective, I understand forward libor rate are like forward Libor rate with different tenor, e.g 3M. They are directly tradable in the market with quotes? But what is the instantenous forward rates?
Comment: Do you want the definition for instantaneous forward rates?
Comment: I found the definition of instantaneous forward rates over the internet. But I am still confused about how is instantaneous forward rates different from forward libor rates?
Answer: The forward Libor rate at time $t$ is the forward rate over a certain accrual period $[T, T+\Delta]$, where $\Delta$, in years, can be 3 months or 6 months, and is defined by
\begin{align*}
L(t, T, T+\Delta) = \frac{1}{\Delta}\left(\frac{P(t, T)}{P(t, T+\Delta)}-1 \right),
\end{align*}
where $P(t, u)$ is the price at time $t$ of a zero coupon bond with unit face value and maturity $u$.
The instantaneous forward rate is the forward Libor rate over an infinitesimal accrual period. That is,
\begin{align*}
f(t, T) &=\lim_{\Delta\rightarrow 0}L(t, T, T+\Delta)\\
&=\lim_{\Delta\rightarrow 0}\frac{P(t, T) - P(t, T+\Delta)}{\Delta}\frac{1}{P(t, T+\Delta)}\\
&=-\frac{\partial P(t, T)}{\partial T}\frac{1}{P(t, T)}\\
&=-\frac{\partial }{\partial T}\ln P(t, T).
\end{align*}
Comment: Thank you Gordon! So this instantaneous forward rate is basically not directly observable in the markets at all?
Comment: @Quant2015:  No, it is not.


What are the equations governing a coupled oscillator system, i.e. one where the energy is passed between states?

Question: A while ago I witnessed a machine that consisted of a mass hanging from a weak spring. One could pull it down a little bit and twist the spring too (torsional pendulum style) and it would oscillate between 2 modes—springing up and down and acting like a torsional pendulum (energy goes back and forth). At a certain initial energy, each mode has a certain energy that doesn't change with time.
How does this work (i.e. which equations govern it)? My feeling is that the spring constant k depends somewhat on the torsion of the spring, but I'm not sure.
Comment: Energy of a spring obeying Hooke's law is $E=\frac{1}{2}kx^2$, where $x$ is spring's displacement. For system many springs which are not transfering energy between each other, energy is $E=\frac{1}{2}(k_1 x_1^2+...+k_n x_n^2)$. To obtain simplest model of interaction between springs, add some polynomial (possibly of order higher than $2$) in variables $x$ to the formula for energy. For example term of the form $\frac{1}{2}gx_1^2 x_2$ will lead to transfer of energy between first and second spring.
Comment: I did do some research, but all I could find was coupled spring systems with arbitrary masses and spring constants. I understand this leads to a coupled eigenvalue DE system, but is this isomorphic to the mechanism I proposed (coupled torsion pendulum and spring)? The many-spring system you proposed does actually have eigenmodes where each state has a constant energy that does not get transferred (ideally).
Answer: Energy of a spring obeying Hooke's law is $E=\frac{1}{2}kx^2$, where $x$ is spring's displacement. For system of many springs which are not transfering energy between each other, energy is $E=\frac{1}{2}(k_1 x^2_1+...+k_n x^2_n)$. To obtain simplest model of interaction between springs, add some polynomial (possibly of order higher than $2$) in variables $x$ to the formula for energy. If mixed terms such as $gx_1x_2$ or $gx_1x_2^2$ are introduced, they will cause transfer of energy between different springs in the system. Let us analyze what different terms can do.
Firs consider term of zero order - addition of constant to the energy formula. This changes nothing because only differences of energy matter. Therefore this is immaterial.
If you add linear term such as $gx$ then you will merely shift equilibrium position of the system. To see this just note that $\frac{1}{2}kx^2+gx = \frac{1}{2}k(x+\frac{g}{k})^2 - \frac{g^2}{2k}$, so this system has the same dynamics as previous one but with $x$ variable replaced by $x+\frac{g}{k}$. So equilibrium position is shifted to $- \frac{g}{k}$.
Quadratic terms such as $gx_1x_2$ will introduce genuinely new action and can be used to model coupling between different springs. If you add such term eigenmodes of the system will change and both eigenmodes will involve oscillations of both springs. Therefore if you initially disturb only one of the springs you will observe that second will start moving. This is because the initial configuration (only one spring moving) is necessarily a mixture of both eigenmodes.
If you want to model more interesting phenomena, such as dependece of one spring's $k$ on other spring's discplacement you need higher order terms. For example term of the form $\frac{1}{2}gx_1x_2^2$ with $g$ small can be interpreted by saying that second spring constant depends on displacement of first spring and in fact it is equal to $k_2+gx_1$. Systems with cubic and higher order interactions are nonlinear and therefore notion of eigenmodes loses meaning. If at first approximation you neglect higher order terms and then reintroduce them with perturbative techniques you will see that effect of nonlinearities is to transfer the energy between different modes of the linearized system.
Remark: If you don't understand some of the maths in this post (say, eigenmodes) then you need to study physics of linear systems such as harmonic oscillators. This is explained in many introductory classical mechanics books. Most likely also in basic books about differential equations.


Trying to avoid being cliché

Question: Has opening a story with something like "I hurtled to my death", "I had destroyed the earth", or other outlandish statements like these become cliché? And if so, what are some alternative methods to hook readers?
Comment: The nature of a hook is something that makes the reader read the next line. They only need to go as far as the next line, because that next line makes them read the paragraph. Which makes them read the next paragraph. Which makes them read the chapter. And so on. The essence of a hook is something that makes your reader ask himself a question. If you can do this, they will naturally want to know the answer, and so read more. 'Outlandish statements' is merely one way of doing this.
Answer: Depending on the tone of your book, you can make that work for you by making subsequent text sarcastic, funny, meta, or the intro to a flashback.

I had destroyed the earth. Okay, it was just a bit of dirt in a test tube. And I didn't really destroy it; I just washed it down the drain. Fine, I was cleaning up after my lab partner. Yes, she ditched me. Again.

I hurtled to my death. This one would probably hurt a bit more than the last three; Reichenbach Falls was taller than the roof of the hospital. Still, there was nothing for it but to wait until I hit, regenerated, and woke up at the beginning of the next story. What pastiche writers lacked in originality they certainly made up for in persistence.

I had destroyed the earth. At last. A ragged cheer rose from the survivors behind me, growing and swelling until the air was so thick with hosannas and applause and shouts of relief that I thought I might go deaf. And if you think that sounds strange, you should hear how I got here.

"I have destroyed the earth! And now I will go on to wipe out the sun! And the —" Gorbo's ranting was cut short by a quick blast from Captain Amazing's laser pistol. "I hate it when they brag," she grumbled.

And so on. If you can't rewrite the cliché, subvert it.
Comment: @TommyMyron Thanks! I always wonder if anyone is going to get my slightly obscure metas. ;)
Answer: You want to start a tale with an outlandish statement? Go ahead. Just listen to your heart, write and complete it. Now, if the whole story feels 'unoriginal', then you can make some changes. Write first, then rewrite and rewrite until you are satisfied.
Answer: Readers are not hooked by outlandish openings. Readers are hooked by character, story, and setting. You can introduce a character, story, or setting in an outlandish way. (See Steinbeck's introduction to Monterey in Cannery Row for an example.) But it will hook or not hook depending on its effectiveness in establishing character, story, or setting, not merely by being outlandish.
Cliche only becomes a problem when it becomes a substitute for effective storytelling, when it feels like the author has reached into a bag of stock language because they had not the skill or the patience to think through and thoroughly imagine the scene, the story, the character, or the setting.

Trying to avoid being cliché


How much time do you have for sueing someone for copyright infringement from the moment you have the proof?

Question: If I have a proof that someone has (or has had) an illegal copy of my work how much time do I have in order to sue for copyright infringement?
Comment: Typically civil suits would be actionable up to a year from the date the plaintiff (you) became aware of the issue, regardless of the actual date the action actually occurred.   If in 2015 your boss passes you up for a promotion based on a legally protected status (race, religion, sex, ect) but the first time you hear about it is from a gossipy co-worker who repeats your bosses discussion of this reasoning, then you have until the same calendar day in 2019 to file a suit with the courts.
Comment: Note:  That's for U.S. Jurisdiction.  It might vary based on the actual jurisdiction you live in, which is not listed as of time of writing.
Comment: @hszmv thank you very much! That's very useful. It's actually the answer to the question - from the U.S. point of view. And correct me if I'm wrong, it sounds like this timeline could be arbitrarily postponed unless somebody proves that the infringement has been aknowledged by the plaintiff _that specific day_.
Comment: In the UK, the general rule is 6 years from the date of the infringement, whether or not you have proof of it.
Comment: Thank you for the answer @lellis. I also found a site where they say the very same thing: https://iclg.com/practice-areas/copyright-laws-and-regulations/united-kingdom.
Answer: Copyright infringement has a 3-year statute of limitations.  No mention of when the owner became aware of infringement.

§1323  ·    Recovery for infringement
(c) Statute of Limitations.—No recovery under subsection (a) or (b)
  shall be had for any infringement committed more than 3 years before
  the date on which the complaint is filed.

https://www.copyright.gov/title17/title17.pdf
Comment: thank you for the proof-equipped answer! I wonder if there's something as a "Title 17" to consult for every jurisdiction, because as far as I know one could rely either on the plaintiff jurisdiction either on the sued person's one, which could live in different places.
Comment: Sorry, I just scrutinized the same file and there's written:  "a work is a "United States work" only if, in the case of a published work, [...] the work is first published in a foreign nation that is not a treaty party, and all of the authors of the work are nationals, domiciliaries, or habitual residents of, or in the case of an audiovisual work legal entities with headquarters in, the United States" so I deduce that the jurisdiction is where the "work legal entity" has the headquarters in.
Answer: Typically civil suits (in the U.S.) would be actionable up to a year from the date the plaintiff (the person making the allegation) became aware of the issue, regardless of the actual date the action actually occurred. If in 2015 your boss passes you up for a promotion based on a legally protected status (race, religion, sex, ect) but the first time you hear about it is from a gossipy co-worker who repeats your bosses discussion of this reasoning, then you have until the same calendar day in 2019 to file a suit with the courts.
Are you suggesting the plaintiff could postpone the date they testify to "first becoming aware" after the date they were in fact aware (but have no proof of awareness), it is rather fuzzy.  Say in our scenario, the victim knew when they were denied that the boss was somewhat hostile to them, but had no reasonable reason for the cause of that status (in this scenario, it's protected class) such that the victim can't tell if the boss is a bigot or just a jerk, until 2018 when the victim overhear's office gossip, it's technically valid postponement because they only realized the illegality of the situation.  It's not illegal for the boss to be a jerk, as any bar patron in America will tell you during Happy Hour (whether you want to hear their story or not).
However, if it was clear to the victim in 2015 and they only brought the issue up in 2018-2019 window, then it may be... but there could be a defense that they source in 2015 was different and said this about every decision against someone who wasn't of the same protected classes as the boss... and the 2018 source heard a more reliable conversation (likely the boss flat out admitting it) and the victim only heard it then, making it more likely than not than the "boy who cried wolf" in 2015.
It's going to be a case specific determination of Justiciability (the ability of the courts to exercise legal authority) by the Judge and would not be an issue to bring up before a jury (when you hear that the Judge is "Trier of Law" and Jury is "trier of fact" it's for the judge to determine what the law says, here the question being "is the timeline within the statute of limitations?", not the jury) so if the trial is underway a lawyer would want to motion to dismiss the case.   At any point during the trial, before the verdict is read, the defense may make a motion to dismiss the case, and the judge will issue his ruling.  It rarely happens, but it never hurts to ask (in criminal law, SOP is to ask as soon as the prosecution rests it's case and prior to the defense's case.  If granted at this point, it's because the crimes alleged were not given any evidence to ever happening).
After the jury verdict this is the subject of the appeals court.  In civil law, the losing party may initiate an appeal, regardless of side, where as only the defense may initiate an appeal in a criminal case (Double Jeopardy is a fancy way of saying Prosecuters may not make appeals if they lose... and the winning side would never make appeals because if it was in error, it's still an error for your side.).   Appeals are always on matters of law, never fact, so they do not rely on any new evidence.  If there is new evidence, the appeal is that the evidence was not available at trial and had it been, it would have changed the questions of law the trial court would have been answering.   The appellent court would then vacate the ruling, which means both parties pretend the trial never happened and we go back to the begining of the facts.  Since the suit was filed on a specific date but "no trial happened wink wink nudge nudge it doesn't violate the limitation of a Year to Date.
Finally, because Lawyers get jokes about everything, you will almost never see a date solidly ascribed (On 1/1/18 my client was made aware of...) but rather nebulously ascribed (On or around 1/1/18 my client was made aware of...) which makes the timeline fuzzier because a general ballpark date is given.  It could be 12/31/17 at 59.8 seconds before midnight... it could be January 2nd.  It could be Christmas Day.  It keeps the defense from pulling a technical lie by citing that it wasn't that date because they had crossed the date line and it was really tomorrow.   It also helps for the witnesses to recall a general period of time for long past events.   I might not remember that the weekend prior I saw the "Cherry Blossoms in D.C." then one can reasonably say that the events took place "In or around April 2018" because the Cherry Blossoms have a narrow window when they are in bloom, usually the first week or two of April, so it keeps the affidative from creating a perjury.  If you read enough legal documents, you won't take long to see that every lawyer writes like this.
Comment: VERY INCORRECT -  The one year after becoming aware of an issue may apply to something but it does not apply to copyright (3 years after infringement occurs) or employment discrimination (180 days since most recent occurrence) since the Ledbetter Act.    https://www.copyright.gov/title17/title17.pdf   https://en.wikipedia.org/wiki/Lilly_Ledbetter_Fair_Pay_Act_of_2009


Amazon Zocalo with Active Directory - can't login

Question: I just setup a Zocalo site for my company using the active directory connect option. The Domain Controller we are connecting to is in an AWS VPC. I setup the zocalo site fine and it says active, but when I try to login to the web console it just sends me right back to the login page. I know the credentials are correct, and if I enter a wrong password just to test, it gives me the invalid password/username warning, so I know I have the credentials right. The AD user has been granted all privileges I can think of - access to users, able to add devices to domain, etc. Anyone know what the issue might be?
Answer: Go to the AWS Console, select the radio button in front of your site URL, and from the Actions menu, pick "Set an Administrator."  Enter an existing account, and it'll grant some additional rights to the account you specify...
After setting the administrator, you should be able to click the Site & log in with that user's credentials.  You'll have an Administration link on the left side of the page, where you can enable additional users for Zocalo...Accounts won't be able to log in to the Zocalo site until they've been invited/activated for Zocalo.
Optionally, you can change the security so that current users can invite new users by sharing files or folders with them...this is on the administration tab, under Security, click the Change button to the right of "Only administrators can invite new users."
Comment: Wow, I completely overlooked the "Set An Administrator" Option. THANK YOU!
Comment: One other slightly related question. Now that I'm into the administrator panel, I tried to change my password or timezone and it says it cannot update my profile. Is this an active directory permission issue, and how do I enable that?
Comment: hmm...I haven't run into that before...I'd expect timezone to be stored with the app, not part of your AD account...and I'd think it would use individual user's permissions for the password change...

On the password side, it might be that your new password doesn't  meet the complexity requirements or reset lifecycle set by your domain policy...That doesn't explain the timezone though.
Comment: Did you see yesterday's announcement for the AWS Directory Service? http://aws.amazon.com/blogs/aws/new-aws-directory-service


Close SP.UI.ModalDialog on form submit

Question: I am using the SP.UI.ModalDialog to popup a custom form. The form uses an XSL stylesheet that uses the GenFireServerEvent to commit the data. This works correctly, but I want to close the popup once the data is saved. What do I need to do to modify this form to commit the data and close the dialog?
Answer: I am adding this so that others who stumble accross it might find it useful. I got this to work by adding a __redirect to the GenFireServerEvent like this: onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={WhateverPage.aspx?IsDlg=5'})"
Then on this page add something like this:
_spBodyOnLoadFunctionNames.push("closeme");

function closeme() {
    tp1=window.location.toString();
    if (tp1.indexOf("IsDlg=5") > 0) { window.frameElement.commitPopup(); }
}

This is what I needed to make this work!
Comment: above solution not working for me. can you please suggest me other solution

Close SP.UI.ModalDialog on form submit


Who first verified Coulomb's Law for electron+proton interaction?

Question: Who first verified Coulomb's Law for the interaction of a proton and electron? Was it Rutherford? Bohr?
Comment: If you meant to ask who first used coulomb's law to explain the interaction between the proton and electron in the atom, it must be Bohr.
Comment: @VINAY: Yes, that's what I mean.
Answer: I think you are confused here - Coulomb's Law refers to electrostatic interactions and atoms are neutral particles so Coulomb's Law they are not related. If you are asking who first verified that atoms have a concentration of charge at their centre, then yes Rutherford was the first to show this.
Comment: But isn't Rutherford's $cos^4$ law derived for a Coulomb potential?
Comment: Rutherford's law relates the observed *rate* of particles to the scattering angle according to $cosec^4(\theta)$, but this assumes a Coulomb potential. The Coulomb's Law describes the *strength* of the interaction as a function of *distance*.
Answer: If you look up Bohr Model in any elementary Modern Physics text, it will be shown as follows.
He surmised that the mechanical and electrical force between proton and electron must be equal for stability = mv^2/R =  ke^2/R^2, where the latter is Coulomb's Law.
He went on to predict that E(ground state) = -ke^2/2R = -13.6eV, using the Bohr radius for R.
It had been well established from spectral analysis that -13.6eV is correct, which was a major
triumph for Bohr and the rest is history.
Comment: Yes, certainly a Coulomb potential predicts -13.6 eV.


Programming an Alpha electronic sign with Alphasign Python

Question: I am trying to program an alpha sign - 215r - using the alphasign python api [Alphasign] (https://alphasign.readthedocs.org/en/latest/index.html). I downloaded python 2.7, pyusb, pyserial, and libusb. I got the vid and pid of the sign using libusb and added that to the devices.py file. However, when I ran the example python code [here] (https://alphasign.readthedocs.org/en/latest/index.html), I still got an error that said it could not find device with vid and pid of 8765:1234 (the example numbers). Now, when I open the file (the code is copied and pasted from the link above) it crashes IDLE (totally shuts down). ...when I run the file from bash, it says core dump. suggestions please!!
Answer: I had a similar problem on a Mac (mtn lion): When I ran the sample app, I got a segment fault 11.  It was crashing in the alphasign library from the sign.connect() call.
Changed it to sign.connect(reset=False), and it worked fine.
FYI: The segment fault occurs in the low-level USB driver, libusb, not in python code.


Scikit-learn predict_proba gives wrong answers

Question: This is a follow-up question from How to know what classes are represented in return array from predict_proba in Scikit-learn
In that question, I quoted the following code:
>>> import sklearn
>>> sklearn.__version__
'0.13.1'
>>> from sklearn import svm
>>> model = svm.SVC(probability=True)
>>> X = [[1,2,3], [2,3,4]] # feature vectors
>>> Y = ['apple', 'orange'] # classes
>>> model.fit(X, Y)
>>> model.predict_proba([1,2,3])
array([[ 0.39097541,  0.60902459]])

I discovered in that question this result represents the probability of the point belonging to each class, in the order given by model.classes_
>>> zip(model.classes_, model.predict_proba([1,2,3])[0])
[('apple', 0.39097541289393828), ('orange', 0.60902458710606167)]

So... this answer, if interpreted correctly, says that the point is probably an 'orange' (with a fairly low confidence, due to the tiny amount of data). But intuitively, this result is obviously incorrect, since the point given was identical to the training data for 'apple'. Just to be sure, I tested the reverse as well:
>>> zip(model.classes_, model.predict_proba([2,3,4])[0])
[('apple', 0.60705475211840931), ('orange', 0.39294524788159074)]

Again, obviously incorrect, but in the other direction.
Finally, I tried it with points that were much further away.
>>> X = [[1,1,1], [20,20,20]] # feature vectors
>>> model.fit(X, Y)
>>> zip(model.classes_, model.predict_proba([1,1,1])[0])
[('apple', 0.33333332048410247), ('orange', 0.66666667951589786)]

Again, the model predicts the wrong probabilities. BUT, the model.predict function gets it right!
>>> model.predict([1,1,1])[0]
'apple'

Now, I remember reading something in the docs about predict_proba being inaccurate for small datasets, though I can't seem to find it again. Is this the expected behaviour, or am I doing something wrong? If this IS the expected behaviour, then why does the predict and predict_proba function disagree one the output? And importantly, how big does the dataset need to be before I can trust the results from predict_proba?
-------- UPDATE --------
Ok, so I did some more 'experiments' into this: the behaviour of predict_proba is heavily dependent on 'n', but not in any predictable way!
>>> def train_test(n):
...     X = [[1,2,3], [2,3,4]] * n
...     Y = ['apple', 'orange'] * n
...     model.fit(X, Y)
...     print "n =", n, zip(model.classes_, model.predict_proba([1,2,3])[0])
...
>>> train_test(1)
n = 1 [('apple', 0.39097541289393828), ('orange', 0.60902458710606167)]
>>> for n in range(1,10):
...     train_test(n)
...
n = 1 [('apple', 0.39097541289393828), ('orange', 0.60902458710606167)]
n = 2 [('apple', 0.98437355278112448), ('orange', 0.015626447218875527)]
n = 3 [('apple', 0.90235408180319321), ('orange', 0.097645918196806694)]
n = 4 [('apple', 0.83333299908143665), ('orange', 0.16666700091856332)]
n = 5 [('apple', 0.85714254878984497), ('orange', 0.14285745121015511)]
n = 6 [('apple', 0.87499969631893626), ('orange', 0.1250003036810636)]
n = 7 [('apple', 0.88888844127886335), ('orange', 0.11111155872113669)]
n = 8 [('apple', 0.89999988018127364), ('orange', 0.10000011981872642)]
n = 9 [('apple', 0.90909082368682159), ('orange', 0.090909176313178491)]

How should I use this function safely in my code? At the very least, is there any value of n for which it will be guaranteed to agree with the result of model.predict?
Answer: predict_probas is using the Platt scaling feature of libsvm to callibrate probabilities, see:

How does sklearn.svm.svc's function predict_proba() work internally?

So indeed the hyperplane predictions and the proba calibration can disagree, especially if you only have 2 samples in your dataset. It's weird that the internal cross validation done by libsvm for scaling the probabilities does not fail (explicitly) in this case. Maybe this is a bug. One would have to dive into the Platt scaling code of libsvm to understand what's happening.
Comment: Just adding to this: In principle the cross-validation should agree with the decision boundary for large n.
Answer: if you use svm.LinearSVC() as estimator, and .decision_function() (which is like svm.SVC's .predict_proba()) for sorting the results from most probable class to the least probable one. this agrees with .predict() function. Plus, this estimator is faster and gives almost the same results with svm.SVC()
the only drawback for you might be that .decision_function() gives a signed value sth like between -1 and 3 instead of a probability value. but it agrees with the prediction.
Comment: Note that `LinearSVC()` will yield similar predictions as `SVC(kernel='linear')` but not `SVC(kernel='rbf')` which is the default kernel for `SVC`.
Comment: That's interesting Bilal... I don't actually need the probabilities for my purpose, just the ordering. I think this is the answer I'm looking for.
Comment: Yes interesting. I had the same problem and used this method for ordering. It gave me better results than predict_proba()
Comment: Giving me the same result of predict_proba
Comment: It is stated that [`.decision_function()`](https://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html#sklearn.svm.LinearSVC.decision_function) yields the confidence. For me it was not in `[-1,3]`. See https://stackoverflow.com/questions/26478000/converting-linearsvcs-decision-function-to-probabilities-scikit-learn-python
Answer: Food for thought here. I think i actually got predict_proba to work as is. Please see code below...
# Test data
TX = [[1,2,3], [4,5,6], [7,8,9], [10,11,12], [13,14,15], [16,17,18], [19,20,21], [22,23,24]]
TY = ['apple', 'orange', 'grape', 'kiwi', 'mango','peach','banana','pear']

VX2 = [[16,17,18], [19,20,21], [22,23,24], [13,14,15], [10,11,12], [7,8,9], [4,5,6], [1,2,3]]
VY2 = ['peach','banana','pear','mango', 'kiwi', 'grape', 'orange','apple']

VX2_df = pd.DataFrame(data=VX2) # convert to dataframe
VX2_df = VX2_df.rename(index=float, columns={0: "N0", 1: "N1", 2: "N2"})
VY2_df = pd.DataFrame(data=VY2) # convert to dataframe
VY2_df = VY2_df.rename(index=float, columns={0: "label"})

# NEW - in testing
def train_model(classifier, feature_vector_train, label, feature_vector_valid, valid_y, valid_x, is_neural_net=False):

    # fit the training dataset on the classifier
    classifier.fit(feature_vector_train, label)

    # predict the top n labels on validation dataset
    n = 5
    #classifier.probability = True
    probas = classifier.predict_proba(feature_vector_valid)
    predictions = classifier.predict(feature_vector_valid)

    #Identify the indexes of the top predictions
    #top_n_predictions = np.argsort(probas)[:,:-n-1:-1]
    top_n_predictions = np.argsort(probas, axis = 1)[:,-n:]

    #then find the associated SOC code for each prediction
    top_socs = classifier.classes_[top_n_predictions]

    #cast to a new dataframe
    top_n_df = pd.DataFrame(data=top_socs)

    #merge it up with the validation labels and descriptions
    results = pd.merge(valid_y, valid_x, left_index=True, right_index=True)
    results = pd.merge(results, top_n_df, left_index=True, right_index=True)

    conditions = [
        (results['label'] == results[0]),
        (results['label'] == results[1]),
        (results['label'] == results[2]),
        (results['label'] == results[3]),
        (results['label'] == results[4])]
    choices = [1, 1, 1, 1, 1]
    results['Successes'] = np.select(conditions, choices, default=0)

    print("Top 5 Accuracy Rate = ", sum(results['Successes'])/results.shape[0])
    print("Top 1 Accuracy Rate = ", metrics.accuracy_score(predictions, valid_y))

train_model(naive_bayes.MultinomialNB(), TX, TY, VX2, VY2_df, VX2_df)

Output:
Top 5 Accuracy Rate =  1.0
Top 1 Accuracy Rate =  1.0
Couldn't get it to work for my own data though :(


Removing Null title/string from infoWindow of CartoDB?

Question: I am new to using CartoDB.
My issue stems from having multiple data columns displayed in the infowindow when clicked. In this case I don't want "null" or the title if null, to appear in the infowindow - I just want the data that isn't null to appear.
Answer: This is not that simple. You have to edit your info window html.

Once inside the html. find the ones you want to check if their null (all of them  guess)
then add these around the
 and
 tags
{{#columnname}}

columnname

{{columnname}}

{{/columnname}}

but it could break some formatting.
the info windows are using mustache to render the templates:
https://mustache.github.io/mustache.5.html


If Arabs were no nation, how did Arabic become the language of the Quran?

Question: From history I came to know that before Islam the Arabs wer not considered a nation but any types of nomads people were called Arabs. How come Arabic is called a language in the Quran when the Arabs were not a nation?
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comment: Salam and welcome to IslamSE the Q&A site about Isla. What is the source of your claim that Arabs were no nation and what does it really refer to? For further information about our site and model please consider taking the [tour] and checking our [help].
Answer: Before Islam the Arabs were not considered a nation
This is not true. The Arabs were considered a coherent tribe (the word nation is a recent notion established in the 19th century CE). They are already mentioned in the Torah as a tribe of Ismail, Son of Abraham. True is that there hasn't been an established and centralised state in Arabia before Muhammad (p.b.u.h).
Any types of nomads people were called Arabs
The Arabs were all nomads, owing to the scarcity of the land. But only the nomads in Arabia, speaking Arabic, were called Arabs.
How come Arabic is called a language in the Quran when the Arabs were not a nation?
The Arabic language existed. The existence of a language is no way bound to the existence of a state. Now as before, there are by far more languages in this world than states. A language exists if it is spoken. The Arabs were not an important people before Muhammad (p.b.u.h). Neither the Torah nor the Gospel had been translated into Arabic at that time, but only into Aramaic, which is a related language but it cannot be understood directly by an Arab without any further study. The Quran is not revealed just for the Arabs but the Quran was indeed the first prophetic scripture available to them in their own language.


Website not opening without www but opens with it

Question: I am trying to deploy my website. It works fine with www but I get apache default page when I enter the website without www.
I don't understand where the problem comes from, I have already set an Alias as you can see here.
<code><VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port t>
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.

        ServerName foot-bet.com
        ServerAlias www.foot-bet.com
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

RewriteEngine on
RewriteCond %{SERVER_NAME} =foot-bet.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
</code>
Can you please help me ?
Thank you very much.
Answer: I try to acess without www just "foot-bet.com" and works fine, so I guess you figure it out.


IPSec : Is it normal to see packet drops during SA re-keying?

Question: In our environment we are noticing packet drops (with reason "No SA Found") during the SA re-keying. The traffic rate is about 1.2Gbps (pkt size: 800 bytes) and the packet drops are about 200-300 packets in one hour happening during re-keying. Is this normal? The RFC seems to acknowledge that this drop CAN happen and implementations MAY provide a solution for this. (https://wiki.strongswan.org/issues/1291) Strongswan seems to have decided not to fix this. Our IP stack is proprietary, however I would like to know if these drops are seen on other implementations like cisco or juniper and so on.
Also, what is normally the lifetime configured for an SA? We are using 1 hour, but what is normally used in real production networks?
Answer: Yes, this is quite common and I've seen it first hand for many years on both Cisco (ASA) and Juniper (SSG/SRX).
As for the amount being dropped, it will depend on your PPS and your SA timer, but I generally see 1-2 seconds of loss during a re-key.
Comment: what is normally the lifetime configured for an SA? We are using 1 hour, but what is normally used in real production networks?
Answer: 1.2 Gigabits per second / 8 bytes per bit = .15 Gigabytes = 150 Megabytes = 157,286,400 bytes = 196,608 * 800 byte packets per second.
Losing 200-300 packets is about a 1.2 millisecond interruption (assuming constant rate).  If this is the hit you take for an hourly re-key I think you're doing pretty well!  To put it in context it shouldn't be enough to even cause a noticeable pop - much less a disconnect - on a VOIP call.
I haven't run any IPSec tunnels at that kind of rate but can say that I didn't generally experience anything regularly noticeable connectivity issues with router-to-router IOS-based VPN's with tens of megabits flowing.  That said, though, a millisecond or so of traffic loss would have been within the range of line noise on most Internet connections.
Answer: I have seen it happening in Linux ipsec-tools (KAME stack/racoon IKE daemon), the loss is about 1-2 seconds during re-key.


Can I consider a resistor to be an inductor?

Question:
Electric current flows through resistors. The flow of electric current leads to the formation of a magnetic field. This leads to change in magnetic flux, which causes an induced e.m.f. Can I say that the resistor behaved like an inductor for this moment?
How correct I am when I say that an inductor does its job of opposing the flow of current only when the current starts flowing through it? (Assuming there's no change in flux later on and the current being D.C.)
Is the e.m.f produced in an inductor equal to the applied external voltage? If yes, what drives the current?
Answer:
A resistor consisting of a coil of wire would produce a magnetic field when there was a current through it. But some resistors are wound non-inductively: the wire is folded back on itself for the whole length of the coil, so there's almost no magnetic field produced. Even simple coils of high resistivity wire produce smaller magnetic fields (for a given current) than a coil of copper wire, which would have to be much longer. And many resistors are straight cylinders of high resistivity material, that would produce only small magnetic fields.
The inductor opposes changes in current, by producing an opposing emf when the current changes.
The emf equals the applied external voltage if the inductor has no resistance. In that case the current doesn't need driving. When (as is usually the case) the inductor does have resistance, $r$, then the emf isn't equal to the applied voltage! Instead$$\mathscr{E}_{\text{app}}-L\frac{dI}{dt}=Ir$$
Comment: (1) "Folded back $on$ itself" means this. Cut a length of wire. Bend it through 180° at its midpoint. Hold the ends next to each other, so that the two halves of the wire run parallel (or antiparallel!) to each other. Then wind your coil with the two halves of the wire next to each other, so when you connect it, the current is along one half of the wire and then in the opposite direction through the other half.
Comment: For the first answer, could you elaborate "folded back itself"?
Comment: Also, in your answer to my third question, the emf, though equal, will be opposite in direction to the applied voltage, right? Won't this unable the flow of current?
Comment: (2) Having emfs cancelling won't stop a current that's already flowing. Try putting $r=0$ into the equation in my answer above. Then solve this simplest of differential equations, taking $\mathscr E_\text{app}$ and $L$ as constants. Assume that $I=0$ when $t=0$.
Answer: Yes, real-world resistors have a bit of inductance. The explanation for how the inductance arises, as well as the description of the inductance portion of the resistor's behavior, is basically the same as the explanations for an inductor. It works to model the inductance portion of a resistor's behavior by treating the real-world resistor as being an ideal resistor in series with an ideal inductor.
However, since a resistor is usually quite short compared to the conduction path of an inductor, the resistor's inductance is generally quite small, so it's inductance can in general be neglected unless perhaps if you're dealing with very high frequencies.
A real-world inductor also has some resistance, so a real inductor can also be modeled as being an ideal resistor in series with an ideal inductor. However, a real resistor is in general going to have more resistance and less inductance than a real inductor, so the resistor is going to have a much lower "Q factor" $Q=\omega L/R$ than the inductor, which means that it's going to behave more like an ideal resistor and less like an ideal inductor than a real inductor would.


If a profession is very pain inflicting is it a sadistic profession or a masochistic profession?

Question: I know the difference between the words, my question is more on the lines of, if I choose to pursue a profession, and I want to talk about how painful it is yet I continue doing it, then how would I address the profession as. Is the profession sadistic because it is inflicting pain on me, or is it masochistic because I am choosing to pursue that profession
Answer: I do not think that an abstract noun, such as "profession" can, in most senses, be described sensibly using either of the words "sadistic", or "masochistic". Those words describe the behaviour of an actor; that is, of an animate, sentient being. So I would say that the person (you) is being masochistic.
Having thought quite a bit about it, it seems to me that the only way in which it might (contextually) make sense to talk about a profession having the qualities of either masochism or sadism, is when it is very clear that you are actually talking about the individuals who are members of the profession. In that way, the usage poses the same individual-vs-collection issue that is raised by whether to treat collective words like "majority" as grammatically singular nouns or as plural nouns.
Comment: I think you can transfer the quality of the actors to the profession. For instance, some might think of dentistry as a sadistic profession.


Does using CloudFront just to enable https make sense?

Question: If I have an EC2 instance, running a web app (HTTP), and I have an Amazon-provided SSL certificate, I can use CloudFront to make the EC2 instance accessible via HTTPS, handling the certificate automatically.
Is this a legitimate use of CloudFront, or should this be done differently?
Comment: @OscarDeLeón I looked at ALB, however the base price seems pretty high for this particular instance - the ALB would cost about as much as the instance itself.
Comment: did you try using an Application Load Balancer? depending on your use case perhaps CF is overkill
Answer: Yes using CloudFront is a legitimate way to enable https, and (as iBug pointed out in comments) can reduce your bandwidth egress costs a little. Another option is to use an application balancer, which integrates with AWS Certificate Manager (ACM) to enable https.
A lower cost method is to install a certificate directly on your EC2 instance using Lets Encrypt and some of their compatible software. You can't use an ACM certificate with just an EC2 instance. Certbot is a common piece of software used to request LE certs.
Comment: Thanks for these pointers, I will be checking out Lets Encrypt
Comment: Using CloudFront generally *reduces* your cost if the origin is an EC2 instance (or S3). EC2 and S3 charges a flat egress price while CloudFront charges "use more, pay less", and it even starts lower (8.5¢ for US / Canada vs EC2 9¢).
Comment: Thanks iBug I added your comment to the answer. AWS bandwidth is pretty expensive either way, for some sites I use an external caching CDN which can reduce costs more.


Non-super reflexive space

Question: Suppose $X$ is a reflexive space (possibly non-separable) which is not super-reflexive. Then (by definition) there exists a non-reflexive Banach space $Y$ which is non-reflexive but is finitely representable in $X$, meaning that for each $\lambda >1$, every finite dimensional subspace of $Y$ is $\lambda$-isomorphic to a subspace of $X$. Can we always find such $Y$ (i.e. non-reflexive) which is separable? In this spirit, what are examples of reflexive but not super-reflexive spaces in which neither $\ell_1$ nor $c_0$ is finitely representable?
Comment: Right, Harald; I added the missing part.
Comment: What does the existence of (twice!) non-reflexive $Y$ have to do with any properties of $X$? There are certainly non-reflexive separable spaces … but I suspect that gremlins ate half the text of your question.
Answer: The first question is easy: Every non reflexive space has a separable non reflexive subspace (e.g. by the Eberlein-Smulian theorem or by R. C. James' characterization of non reflexivity).
The second question was a longstanding open problem that was solved by James in the 1970s.  Pisier and Xu gave another proof--you can find their paper by using MathSciNet.  Their approach is more conceptual and uses interpolation theory but is not easy.
Comment: @Bojan Kwitek: examples of the kind of space you asked about in your second question do exist; the Pisier-Xu paper is *Random series in the real interpolation spaces between the spaces $v_p$*, see http://link.springer.com/chapter/10.1007%2FBFb0078146 .
Comment: Dear Prof. Johnson. Thank you. I've been trying to find the papers with no success yet, but I'll try again. Let me ask then whether the answer to the second question is positive or negative. :)
Comment: OK, thank you. I haven't spotted this paper. By the way, can we deduce from the fact $\ell_1$ is finitely representable in $X$ that $c_0$ is finitely representable in $X^*$?
Comment: No, Bojan--$X=c_0$ is a counterexample.  You do get that $\ell_1$ is finitely representable in $X^*$. Having $c_0$ finitely representable in $X^*$ is equivalent to $X$ containing uniformly complemented uniform copies of $\ell_1^n$.

Non-super reflexive space


How long can I apply again as a tourist visa to UK?

Question: How long can I apply again as a tourist visa to Uk after I finished my 6 months visa. I am here right now at UAE for 2 months and I want to go back again to UK.
Answer: You can apply immediately, there is no "cool off" period, or 90/180 day limit like for Schengen.
However, you have to convince the UK immigration officer dealing with your application that you are not attempting to live in the UK via successive long term visits - if they suspect this, you will be denied and banned.

Your visa may be cancelled and you may get a long-term ban on visiting if your travel history shows you're repeatedly living in the UK for extended periods.

UK Standard Visitor Visa


How to check whether a particular directory is a mount point?

Question: How to check whether or not a particular directory is a mount point?
For instance there is a folder named /test that exists, and I want to check if it is a mount point or not.
Comment: You don't `mount` directories on Linux. You `mount` devices _to_ particular directories. Checking to see if something is mounted is as simple as looking at the output of the `mount` command.
Comment: Let's help, perhaps they do not understand this finer point!
Comment: The answers below will show you how to examine the mount table, but a simpler solution is to create a file in the mount point directory before anything is mounted on it. Call it anything you like, but one example is `NOTMOUNTED`. When you can see the file, the directory is not a mount point, and when you don't, it is.
Answer: If you want to check it's the mount point of a file system, that's what the mountpoint command (on most Linux-based systems) is for:
if mountpoint -q -- "$dir"; then
  printf '%s\n' "$dir is a mount point"
fi

It does that by checking whether . and .. have the same device number (st_dev in stat() result). So if you don't have the mountpoint command, you could do:
perl -le '$dir = shift; exit(1) unless
  (@a = stat "$dir/." and @b = stat "$dir/.." and
  ($a[0] != $b[0] || $a[1] == $b[1]))' "$dir"

Like mountpoint, it will return true for / even if / is not a mount point (like when in a chroot jail), or false for a mount point of a bind mount of the same file system within itself.
Contrary to mountpoint, for symbolic links, it will check whether the target of the symlink is a mountpoint.
Comment: At least on Ubuntu, the output of mountpoint already says "$dir is a mountpoint" ,so you don't need the if part around it.
Comment: @SergiyKolodyazhnyy the -q means quiet output, so in this case, the output is being suppressed and then replaced by custom output. Unnecessary, but yeah.
Comment: @Wyrmwood  I know what the options are. What I'm saying is that `mountpoint "$dir"` already does exactly the same as the 3-line if statement does  here. Functionally they're the same. Such use of `mountpoint -q` in `if` statement can be used when you want to perform some action based on the exit status, but  for printing the message to user its unnecessary - it's already the default behavior of the program.
Comment: How can I install `mountpoint ` into macOS?  I have tried through brew but system is unable to see it
Answer: As HalosGhost mentions in the comments, directories aren't necessarily mounted per se. Rather they're present on a device which has been mounted. To check for this you can use the df command like so:
$ df -h /boot/
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              99M   55M   40M  59% /boot

Here we can see that the directory /boot is part of the filesystem, /dev/hda1. This is a physical device, on the system, a HDD.
You can also come at this a little bit differently by using the mount command to query the system to see what devices are currently mounted:
$ mount | column -t
/dev/mapper/VolGroup00-LogVol00  on  /                         type  ext3         (rw)
proc                             on  /proc                     type  proc         (rw)
sysfs                            on  /sys                      type  sysfs        (rw)
devpts                           on  /dev/pts                  type  devpts       (rw,gid=5,mode=620)
/dev/hda1                        on  /boot                     type  ext3         (rw)
tmpfs                            on  /dev/shm                  type  tmpfs        (rw)
/dev/mapper/lvm--raid-lvm0       on  /export/raid1             type  ext3         (rw)
none                             on  /proc/sys/fs/binfmt_misc  type  binfmt_misc  (rw)
sunrpc                           on  /var/lib/nfs/rpc_pipefs   type  rpc_pipefs   (rw)
nfsd                             on  /proc/fs/nfsd             type  nfsd         (rw)

Here you can see the type of device and the type of filesystems are currently mounted on your system. The 3rd column shows where they're mounted on the system within its filesystem.
Comment: To check if a _particular_ directory is an active mountpoint (especially in scripts, where a binary result is handy), the `mountpoint` command is a nice alternative e.g. `if mountpoint -q /path/to/dir; then ...`. I'm not sure how widely available it is though.
Comment: @steeldriver - cool, never seen that one before. It's present on my Red Hat distros.
Comment: @slm: Am I going blind, or was your cat walking on your keyboard when you posted this answer?  It says, "Here we can see that the directory `/usr` is part of the filesystem, …", but `/usr` appears nowhere else in the answer.
Comment: @G-Man - I meant to type /boot there, I fixed it. Given the above example shows /boot it seemed pretty obvious what I meant when I typed that, even with the typo.
Comment: Why not just `mounpoint $(pwd)` ? It prints `/jail/bin is a mountpoint`. Btw, I think `findmnt` of @xharx 's answer is the best.
Answer: I was looking for the same question when I wanted to check mounting a new XFS filesystem.
I found the command findmnt: findmnt /directoryname
[root@CentOS7-Server /]# findmnt /mnt
TARGET SOURCE    FSTYPE OPTIONS
/mnt   /dev/sdb1 xfs    rw,relatime,seclabel,attr2,inode64,noquota
[root@CentOS7-Server /]#

Comment: very concise solution!
Comment: This is the best. `findmnt` gives the most informative output compared to some others. That is, it tells which specific diretory is the target mounted from. One can run `findmnt` with no arguments.
Answer: Well, as others said you should edit your question and make it clear on what you are trying to achieve. As far as I understood, you need to check if a directory is mounted to a particular device. You can try something like below as well.
df -P /test | tail -1 | cut -d' ' -f 1

So basically, the above command lets you know the mount point of the directory if at all the device is mounted to a directory.
Comment: This one is what I was looking for. Thanks for sharing.
Answer: Nice and short Python one-liner can be constructed based on Gilles' answer:
$ python -c 'import os,sys;print(os.path.ismount(sys.argv[1]))' /mnt/HDD
True

$ python -c 'import os,sys;print(os.path.ismount(sys.argv[1]))' /etc
False

I've made custom implementation of mountpoint command in Python, which parses /proc/self/mounts file. Kind of the same behavior as mount in Stephane's answer, except that command parses /proc/self/mountinfo. Usage is very simple: is_mountpoint.py /path/to/dir.
#!/usr/bin/env python3
from os import path
import sys

def main():

    if not sys.argv[1]:
       print('Missing a path')
       sys.exit(1)

    full_path = path.realpath(sys.argv[1])
    with open('/proc/self/mounts') as mounts:
       print
       for line in mounts:
           if full_path in line:
              print(full_path,' is mountpoint')
              sys.exit(0)
    print(full_path,' is not a mountpoint')
    sys.exit(1)

if __name__ == '__main__':
    main()

Test run:
$ python3 ./is_mountpoint.py /mnt/HDD
/mnt/HDD  is mountpoint
$ lsblk | grep HDD
└─sdb6   8:22   0 405.3G  0 part /mnt/HDD
$ python3 ./is_mountpoint.py $HOME
/home/xieerqi  is not a mountpoint

Answer: Your question is little bit confusing, but I guess, one of the ways to check that: mount |awk '{print $3}'| grep -w <your_directory>. If output is empty then no device mounted to the directory . If not empty then some device mounted to the directory. Other way is to use df <your_directory>. If last field equals to your directory name - than some device is mounted to it.


Changing degrees to meters

Question: I'm using QGIS 3.4.9. When I try to create a heatmap the only radius option is degrees. Can you tell me how to change this to meters?
Comment: This is because your layer is in a projection that has degrees as units (4326). You need first to reproject your layer to a projection that has meters as units (like 3857) and then you'll be able to use meters as units in the radius of the heatmap.
Comment: What @LéoM said, I would just add that you should try to find a coordinate reference system specifically for the region you are working in, going by the coordinates in your screenshot you should look for the best fitting coordinate reference system for South Africa.
Comment: https://en.wikipedia.org/wiki/Decimal_degrees...
Answer: Most plugins use the Reference System of the project.
To determine the choice of units to use, the Heatmap Plugin you use looks at the Reference System of your project. In your case it finds out it is EPSG:4326 (as you can see in the lower bottom of your QGIS window), which is WGS84.
Since the WGS84 Reference System is not projected, it uses geographical coordinates (lat and long) which are expressed in degrees.
Hence the degree unit you are proposed.
To change Reference System of your project, click on the EPSG:4326 label on the bottom right of the QGIS window, and select a projected system.
Then try your Heatmap plugin again.

Changing degrees to meters


Number Formatting in iReport

Question: Can any body help me for giving pattern for a number?
Here is my problem.
I just wanted to display a number as "30.00",
Eventhough I had set the pattern as 2 decimal points it is not displayting the result as"30.00" instead it is showing the result as "30".
And one note is that for that field pattern it is shoeing an extra button as "ResetDefault". Is there is any problem with that button for this.
Can any one please solve this problem.
Answer: iReport has a bad habit of not changing the pattern on the jrxml when you just open and press OK (your format is default). Change something and then change it back, press OK and you are ready to GO.

If you are tired of iReport, you can also set pattern directly in jrxml:
Example
<textField pattern="###0.00;-###0.00">
    <reportElement x="100" y="0" width="100" height="20" uuid="1fccff95-408c-4364-b003-c691fefdde62"/>
    <textElement textAlignment="Right" verticalAlignment="Middle"/>
    <textFieldExpression><![CDATA[$F{myNumber}]]></textFieldExpression>
</textField>

Comment: Thanks You @Petter Friberg :)
Answer: The field should have a format property indicating how it should be shown.  You should set that format to Custom and put #.00 as the format in order to force that field's value to be printed with two decimal places.
The extra button shouldn't be creating conflicts, but in order to be sure, you should check the action performed when it is clicked.  If it doesn't mention that field, it likely won't have any impact on it.

Number Formatting in iReport


Are there any tools/processes for narrowing down the root caus of an extended TTFB/Server wait time?

Question: I've recently taken over the management of an e-commerce site. It is running on AWS (deployed through Elastic Beanstalk), based on Woocommerce/Wordpress with a custom theme and some custom javascript plugins that the previous agency designed.
The issue I am encountering is that the TTFB/Server Wait time is huge, varying from 4 seconds up to as much as 10 seconds. The website content itself is loading quickly, usually under 1 second depending on the connection. This means that if the page loads entirely in 5 seconds, 3-4 of those seconds are TTFB/Wait.
Pingdom Scan: https://i.stack.imgur.com/g6EsH.png
So far I have tried:

Using a caching plugin (images, CSS, html, etc.)
Delivering content from a CDN
Keepalive Property applied where applicable
Used GZIP to reduce content size
Traceroute to make sure there are no weird DNS/routing issues
Checked server resources history - we've never gone over 20% CPU/Mem usage.

So far none of these have helped significantly (although CDN helped speed up the site load AFTER TTFB).
If anyone has any ideas of some tools, resources or tricks to narrow down what is causing the TTFB delay I would be forever indebted. All of the articles I have found mentioned some of the fixes that I have already applied but I still can't seem to get the wait time down. I apologise in advance if I haven't included all the information necessary - this is my first dive into more complex server management!
Many, many thanks in advance!
Answer: This isn't an answer, but could you try flushing the output buffer early (or multiple times)? That might help narrow it down.


List of Lexical and Auxiliary verbs

Question: I am wanting to know if anyone knows where I get a list of the verbs that are Lexical and Auxiliary. Not what the differences are, but what the actual verbs are. And maybe which are which. I've tried to find a list of them, but I just get links for how to tell which is which, but the schoolwork I'm doing is already doing that, but they don't give me a list of them.
Thanks in advance!
Comment: The thing is, there are thousands of lexical verbs in English. A list of all of them wouldn't be very useful.
Comment: And this appears to be about English, not linguistics or languages in general. Probly ELL.SE would be more appropriate.
Answer: Whether a verb is lexical or auxiliary depends on context. The verbs which I would call auxiliary in the strictest sense are be, do, and have, when used in "he is running", "she doesn't like that", and "they have arrived". But when used in "he is", "she does sports", and "they have a cat", they're lexical instead.
Some people also call can, could, will, would, shall, should, may, might, and must auxiliary verbs, but these all act in the same way on a syntactic level, while the three mentioned before don't. So I think it's useful to have a separate name for these; they're often called modal rather than auxiliary.
In some dialects, ought, need, and dare can also be used as modal verbs; for me they can't. There may be other dialectal differences as well that I'm not aware of.
All other verbs (thousands and thousands of them) are lexical. I'm not going to try to list them here because there are far too many.
Comment: @Araucaria-him It seems reasonable to me to treat the two "do"s, two "have"s, etc as homophonous, but given the way the question was phrased, I thought adding that would make the answer unnecessarily complicated. Re auxiliary verbs and helper verbs, I'm mostly taking after Adger's book on syntax, where the verbs I listed as auxiliaries have category Aux (or a more specific category like Pass) and the ones I listed as modal have category T. I believe both display the NICE properties, but Adger explains that with Aux-to-T movement.
Comment: You seem to equate 'auxiliary verb' with 'helper verb.' On a very basic level there's reasonably widespread agreement that English auxiliary verbs are ones that display NICE properties. This would mean that *be* is an auxiliary verb in *he is.* Many, if not most grammars regard your two *do*s as distinct homophonous verbs.
Comment: @Araucaria-him I could see an argument for putting them all in the same category, but it seems to me that it makes more sense to consider them two separate related categories: the ones I call "modal" don't take verb-like morphology, for example, while the ones I call "auxiliary" do.
Comment: I'll have to revisit Adger. The morphology's the only thing that should make us want to split the auxiliaries into *do, have, be* on one side and the modals on the other. In every other respect (and there are many of them) *do* patterns like the modal verbs, not like *be* and *have.* For example, auxiliary *do* has no non-finite forms, must always be the first word in a VP, can't co-occur with other modals etc. I'm pretty sure Adger would view *be* as an auxiliary in *He is*!
Comment: There is one analysis which does genuinely regard (most) auxiliaries (including the modals) as only being auxiliary in certain contexts, which is Sign Based Construction Grammar as developed by Ivan Sag and others. See: [Lessons from the English auxiliary system](https://www.researchgate.net/publication/331499892_Lessons_from_the_English_auxiliary_system) by Sag et al. (If anyone's interested, that is!)
Comment: @Araucaria-him Would he? I always took the "existential" _be_ as separate from the other uses (auxiliary, copula); if we're sticking to minimalism, wouldn't the hierarchy of projections forbid an auxiliary without a v? (I'm specifically talking about the _be_ in "I think therefore I am", to be clear; not the elliptical auxiliary in "who's talking? he is".)
Comment: @Araucaria-him Also, I agree that _do_ behaves oddly compared to _have_ and _be_, but it doesn't have the same semantic contribution as the modals. Adger's analysis is that _do_ is inserted at T when necessary but isn't a T itself, which is…not entirely satisfying (it's a weird exception in a system that otherwise tries hard to avoid exceptions) but I'm not sure what else to do with it.
Comment: Ah, I understood that as an elliptical copular *be* for some reason. Yes, quite so. In "There's nothing left to do but be" kind of example, that's a lexical verb. Same goes for the lexical be that's only found in questions and conditionals: "If you don't be more careful, you're going to have an accident." Re *do*: yep, *do* is arguably sui generis. [Feel free to move this all to chat if you feel that's best].
Comment: Modals also qualify as auxiliary verbs because they have the NICE properties.
Comment: _Do_, like _there_ and _it_, is inserted by rule and has no semantics. That makes it an auxiliary in my book, like _be_ for progressive. Modals are auxiliaries, too, but they're sui generis (unlike _do_, which is explicable) -- modals are operators like negatives and quantifiers; they have superpowers as well as NICE properties. As for _be_, I don't see anything where it's not an auxiliary, and **it** has lots of properties far beyond the NICE, too. _Be_ and its predecessor verbs from various roots have been an analytic problem since PIE.
Comment: @jlawler In "If you don't be more careful" or "if you be sure to ..." that *be* is arguably not the same auxiliary *be*. For example, supportive *do* is inserted for the negation there. Aux *do* is sui generis to the extent that its grammar is very different from *be* and *have* on one side and the modals on the other. So for example, it has no non-finite forms (apart from, depending on which church you pray at, its use in imperatives) like the modals, but inflects for person like the participle-taking auxiliaries. Of course, *be* is odder than odd too.
Comment: I would ?* _If you don't be more careful_ -- I prefer _If you're not more careful_. Something closer might be _Do be a "Do Bee"; don't be a "Don't Bee"_, which is playing with the categories for children's amusement (and potentially edification, though I doubt it).  Do-support _do_ is inserted by rule and has no meaning, but it's perfectly verbal in that it inflects (which is, after all, its main purpose), contracts, and inverts. That's all it needs to do, like any good driveshaft. The cargo is in the lexical carriages.
Comment: @jlawler How about "If you don't be quiet, ..."?
Comment: At that point I'd say "if you don't shut up". _Be quiet_ as an imperative is fine, but that's as active as I can get.
Answer: This question might be a better fit on EL&U or ELL. However, I'd like to provide a different answer to the one already posted here.
The class of auxiliary verbs in English is a closed class of verbs with a dozen or so central members and a few marginal or defective ones. If you know what these verbs are, then you effectively know that every other English verb is a lexical verb.
It was once the case that 'auxiliary verbs' were seen to be verbs that always appeared before another verb, which would exclude the verb be for example in:

he's ill

but might include get in:

he got fired

However, most mainstream grammars,  for example Oxford Modern English Grammar (Aarts 2011), now recognise auxiliary verbs to be those verbs that display NICE properties. These relate to data like the following, where an asterisk, *, indicates an ungrammatical example:

Negation: *They like not cheese. / They do not like cheese.
Inversion: *Like you some cheese? / Would you like some cheese?
Code: *Yes, I would like. some cheese / Yes, I would. like some cheese
Emphasis: A: You don't eat cheese! B: ?I eat cheese! / I do eat cheese!

The verbs that take part in such constructions in English are:

be, have
do
can/could, may/might, shall/should, will/would, must

There are also some marginal members that can only occur in some environments, or are only auxiliaries for some speakers:

need, dare, ought, used, better

Note that auxiliaries do not have to be followed by another verb in such analyses. So the verb be is always an auxiliary.
It's also useful to note that there are two different verbs do. The auxiliary that we find in Do you like cheese? and the lexical verb which we find in sentences like What have you done to my lasagne?. Likewise there is an auxiliary have, as in I have finished and a lexical verb have as in I had a party.
All the verbs not listed above are lexical verbs.
Comment: I would add _get, come,_ and _go_ to the marginal group. And there's lotsa novel combinations like _wanna, useta, gotta,_ etc. that are gonna be Official auxiliaries some day.

List of Lexical and Auxiliary verbs


Multiplexed LED matrix resistors

Question: I'm trying to build this multiplexed LED matrix with 216 LEDs, NPN transistors, a PIC microcontroller and several shift registers (74hc595) , however I don't know how to calculate the value of the resistors that are connected to the anodes, and also would like to know if I should add any additional resistors somewhere else.
I plan to turn on a maximum of 16 LEDs at once, like 3 columns of 6 LEDs.
Answer: Since you are using so many LED's, I will assume you are using inexpensive common LED's. Typical LED needs about 1.5 volts across LED (look up your LED voltage at the current you choose for your LED). Depending upon the brightness you desire, you could end up somewhere between 10mA and 20mA.
Using 74HC595, looks like you will be driving the LED's using 5 volts out.  So, if LED voltage is 1.5 volts, then the resistor voltage will be 5v – 1.5v = 3.5v . .  Use ohms law to calculate resistor  R = V/I .
One word of caution.  The 74HC595 on several different data sheets shows a maximum of 6mA output drive or current sink capability.  Data sheet also shows  output clamp current of 20mA, depending upon the manufacturer.  If you try to get the 74HC595 to drive more than 6mA, the output voltage of the 74HC595 will begin to depart from being 5 volts.

You may want to set up one of your 74HC595 shift registers with a resistor and LED on the output to assure the performance is as you desire. In your schematic the 74HC595 will be sourcing current, not sinking current, but the data sheet seems symmetric  for output current sinking or sourcing.
As you draw more and more current from your 74HC595, the output voltage will begin to droop (reduce) down from 5 volts.  Also, the 74HC595 will begin to heat up some more.
EDIT  :  Just noticed that if you turn on ONE Column, and MORE than one Row, you will be lighting more than one LED. This puts the several LED's in parallel, and the brightness of each of those LED's will dim. Fortunately the resistor will still limit the current drawn from the 74HC595.
EDIT EDIT :  Also just noted you did include your LED as 3.8 volts at 0.02 (20mA).  Your resistor is going to end up near 100 ohms.  That is a lot of current to ask from the 74HC595.
Comment: Thanks, I just noticed I can turn on the LEDs with less than 6mA and 3V, so I'll use a 500 ohm resistor with 3 volts as output from the shift registers
Answer: Unless you're real familiar with optical measuremnt units (lumen,candela etc) you probably won't be able to easily compute the resistor you need. Instead get a sample led and experimentally figure out how bright you want it to be, measure the current and voltage of the led, and then pick a resistor that gets close to that.
If forced to guess I'd start with 330 Ohms and adjust from there if the result is unsuitable.
Answer: I suppose that you should set up for a current higher than the mean current required.
As I see you have a "strange" arrangement of 12 columns of 48 columns of 3 leds and 12 columns of 6 leds. I would prefer to see them as 48+2*12=72 columns of 3 leds as it would be more symmetrical, but it is up to you.
Let's suppose that you like to have a luminosity of the led that is equal to powering it with 10mA, then in case you scan on 3 rows, I suggest you should plan for instantaneous current of 3x10mA=30mA, if instead you scan on 6 rows you should plan for instantaneous current of 6x10mA=60mA.
The above instantaneous current of 30mA will result into a average current of 10mA and the relative luminosity.

Multiplexed LED matrix resistors


How can I keep water and leaves from accumulating on my boat cover?

Question: My stock boat cover deteriorated to the point that I needed a new one. It had poles to hold up the middle so water would just roll off. The replacement I bought looks like the image below. It does not have poles and pools with water after every rain. What can I do to fix this? Is there something I can buy or a DIY solution for pitching a tent?
Answer: You basically answered your own question. You need some kind of frame that will create a sufficiently sloped roof. Having the frame on the outside will always create a small depression in the middle where water will accumulate.
As a workaround, it may help to pull the cover tighter and also offer some slope forward towards the drawbar.
How to create such a frame is really depending on the exact shape of your boat and possible attachment points.
Comment: And how level you need to park.