Should I keep forcing my very left-handed body to learn drums with the typical right-hand kit setup?

Question: I got a beginner mesh drum kit for Christmas and set it up according to the picture and have been trying to learn the basics on my own. I'm very left-handed in life. I always start out with my left hand or left foot. If I tap, I tap with left foot. So I'm trying to learn the first basic thing, but my right foot on the bass drum pedal doesn't want to cooperate much meanwhile my left foot is over there tapping away. I also am not liking tapping on the hi-hat with my right hand. It feels like trying to write with my right hand. My left hand wants to do it but the how-to folks in the YT videos are doing it with the right. I read the benefits of learning on a righty setup, but I am starting to wonder if my body would like it better if I switched things around. Thank you for advice.
Comment: Whether you should learn left handed or right handed is purely a matter of opinion and the opinion which matters most is yours.
Comment: My son enjoyed fooling around on his brother's drumset at a young age (three-ish I think).  Because he was left-handed, and because I had no idea how to help him, there was some confusion about which hand went where.  I asked the brother's teacher to give him a short "mini-lesson."  She convinced him that he could play comfortably like she did -- with what I guess was the standard approach -- despite being a leftie herself.  It worked out great.  Moral of the story, before you despair you could take one lesson and then consider the teacher's suggestions, see how they work out for you.
Comment: I think a point to consider is that in rock music most of the interesting things happen on snare and right hand is just playing straight 8ths or 4ths. The traditional drum setup on the other hand is from jazz era when drummers would play complex patterns on ride cymbal. And it just happens that Ringo Starr who is left-handed was playing right-handed way in a wildly popular band just when the style change was happening.
Comment: Closely related: https://music.stackexchange.com/questions/67575/teaching-a-left-handed-drummer-on-a-right-handed-kit
Comment: See it this way: Ringo Starr is left-handed  and played on a right-handed kit and he did quite well in the Beatles. So go ahead
Answer: The other answers have good points. I'm a left handed drummer who plays on a right handed kit. I've played for more than 20 years now so my 2c:
The points made in the linked guitar question are relevant, but drumming has some nuances you may not have considered.
Everything will feel like writing with your wrong hand
By far this is my most important point. Learning drums does not feel like learning other instruments.
When you begin, you can expect everything - for quite a long time - to feel like writing with your wrong hand. This is irrespective of your kit set up. You will get used to this feeling. You should be seeking out this feeling, not avoiding it, as that's the feeling of you training your brain. If you avoid this feeling, it means you won't learn.
As you've learned, hands are not truly equivalent in drums
The ideal experienced drummer is completely ambidextrous. None of us are that drummer.
You will practice training the other side of your body a lot, and you'll end up much less left-handed than you are now. However, even as an expert, the limbs on a drumkit are specialised. For example, almost no right-handed players will use their left hand on the hi-hat, even though that arguably makes more sense. As another example, on a right-handed kit, the right hand will almost always play the main beats when you play a fill. This is because it's extremely awkward to cross the left stick over the right while moving your arms clockwise between toms. Given most people are right handed, I don't think it is purely by chance that the right hand ends up playing more than the left, and striking the main beats, in most forms of music.
Do I feel I am disadvantaged for playing on a right-handed kit? Not even slightly. With learning, my right side simply learned. That said, as a learner, it might be easier to begin if the kit set up matches your dominant side.
Ignore your feet
It sounds like you would kick a ball with your left foot? Having that foot on the bass drum will make life easier. Training feet, though, is relatively easy relative to hands. There are only a few kinds of movements feet need to do and coordinating with your other limbs will come with practice.
Where are you playing?
This is a lesser concern but worth considering.
If you're teaching yourself, and you will always play with your own gear, it doesn't matter if you're a leftie or not.
If you will be learning on your drum teacher's kit, particularly in a situation where you are in classes with other students, things get awkward. You will be re-arranging the kit every time you go to play, and if you have three toms, your fills will sound...funny.
If you want to take this seriously and end up playing some gigs or similar, there may also be times you end up playing other's gear. It can be pretty frustrating to swap while you're new.
My recommendation
Make this a non-issue by learning snare drum (rudiments) first. It can be a bit ...dry... but it will give you a strong foundation and also push you closer to being ambidextrous in playing. As suggested by others, you will learn everything left and right hand leading.
This is how I learned and by the time I switched to the full kit I didn't really have a truly dominant side. I didn't even think to mention to my teacher I was left handed: I was more balance and had learned the mindset of chasing that awkward wrong-handed feeling.
In truth, now I am experienced I love playing right handed. My right hand can play strongly while my left can perform subtleties on the snare that I know would be more difficult the other way around. But really, just get started. Just play. And don't avoid feeling awkward.
Answer: Unlike with guitar, I don't really see a reason to ponder the question of which way to learn. Just try it both ways. You don't have to buy any special instrument, just rearrange your drum set, and you don't need to worry about "practising wrong" because being able to play stuff the other way around can only ever be an advantage. Leading with the left hand can come in handy for playing more interesting fills on a right-hand drum set, and being able to play kick drum with the left is actually necessary for double-bass.
The one thing you should definitely be wary of is that doubts like this can easily destroy motivation. If you always think "this is wrong for me" it'll take away all the fun, and if you always keep rearranging your kit instead of sticking to one position for a while just to practice somehow, you also won't make as good progress. (Even just a single practice pad can be better than the most amazing 20-piece kit.)
All instruments require, more than anything else, perseverance to master them. IMO the best motivation is to play a lot with other people.
Answer: Check out answers for my question that leftaroundabout has kindly highlighted.
In reality, one hand needs to be as good as the other, drumming-wise. Take rudiments paradiddles. They can be played 'backwards', and as such, each hand needs to be equal in control.
Playing a r.h. kit can be done playing 'open' rather than the usual cross-arms for hi-hat, and cymbals can easily be moved. It's the legs that can be the problems. Generally, the kickdrum foot/leg works harder. You could try a double-bass pedal, so the left foot plays the kick, but that then makes the hi-hat an awkward problem.
There's no real answer - it's squarely up to you. Having a couple of lessons with a good drum teacher is well worth considering - they'll have come across this problem (as I have!) and will have found different solutions. Failing that, try for a couple of months r.h., and then a couple l.h. If the l.h. is still more natural, that's your way. But don't expect to find many kits set up that way!
And - finding a pair of left-handed drumsticks could help somewhat...


How do I add on/off button to Raspberry Pi Zero?

Question: How do I add an on/off button to a Raspberry Pi Zero board? I am new to the platform and kindly ask for instructions suitable for a novice. Thank you.
Comment: Why? What is the objective? Do none of the hundred similar questions not provide an answer?
Comment: Please clarify: Do you want a button to shut the pi down/turn it back on or a button to disconnect power/reconnect power?
Answer: You can follow this guide on adding a Power Button to your Raspberry Pi. It shows how to do it on an RPi 3 model, but you can do exactly the same on the RPi Zero, as their pinout is the same.
The only caveat with your RPi model is the soldering. Here is a video from the Raspberry Pi Foundation on how to solder pins to your RPi Zero. And here is another guide on how to add 40-pin GPIO connector.
Edit
If the guide to add a power button is down, here is a copy of it on Wayback Machine.
Answer: Adding an on/off is fairly simple IF you can solder pretty good.  However, depending on where the Pi is located, you could get on of the usb cables that come with a on/off switch.  They are fairly cheap and come in various links.  I have a couple that I use EVEN though I poweroff the pi.
Comment: I can solder pretty good but it doesn't help me with your answer. What should I solder?
Comment: A power switch on the USB cable is no good if the OP wants the pi to shut down when the button is pressed.
Comment: @scitronbon, GREAT point.  I did not grasp his initial point, I was only thinking of just removing the power after using shutdown command.  I think that David's post answers his question.


Maps to projective space == line bundles; what do maps to weighted projective space correspond to?

Question: A map from an algebraic variety $X$ to a projective space is the same thing as a globally generated line bundle on $X$. What geometric object on $X$ corresponds to a map to a weighted projective space?
Comment: A line bundle $L$ on $X$ and a set of sections $(s_1, s_2, \ldots, s_k)$ where $s_i \in H^0(X, \, L^{a_i})$?
(If you want a morphism, you must also require that the common zero locus of these sections is empty).
Comment: @FrancescoPolizzi That makes sense! Maybe you can write it as an answer. I was thinking that it should be some kind of orbi-bundle, but the fact that $X$ has no orbifold structure was making me confused.
Answer: Let me expand my comment in a short answer.
One of the most common way to build a rational map $f \colon X \dashrightarrow \mathbb{P}(a_1, \ldots, a_n)$ is to consider a line bundle $\mathscr{L}$ on $X$ together with sections $$\sigma_1 \in H^0(X, \, \mathscr{L}^{a_1}), \quad \sigma_2 \in H^0(X, \,  \mathscr{L}^{a_2}), \ldots, \sigma_n \in H^0(X, \, \mathscr{L}^{a_n}),$$
and to define $f(x) := [\sigma_1(x): \ldots : \sigma_n(x)].$
Clearly, $f$ is a morphism if and only if the intersection of the zero loci of the sections $\sigma_i$ is empty.
The basic example is given by hyperelliptic curves. Let $X$ be a smooth  hyperelliptic curve of genus $g$ and take as $\mathscr{L}$  the hyperelliptic involution, i.e.  the unique $g^1_2$ of $X$. Then it is no difficult to show that there exist $x_0, \, x_1 \in H^0(X, \, \mathscr{L})$ and $y \in H^0(X, \mathscr{L}^{g+1})$ that satisfy a polynomial relation of type $$y^2 = F_{2g+2}(x_0, \, x_1), \quad (\sharp)$$
where $F_{2g+2}$ is a homogeneous form of degree $2g+2$.
This precisely means that we can write $X$ as a double cover of $\mathbb{P}^1$, branched at $2g+2$ points. Trying to homogenize the equation $(\sharp)$  in the usual way  introduces a complicate singularity at infinity. Instead, it is more convenient to see $(\sharp)$ as the global equation of $X$ into the weighted projective plane $\mathbb{P}(1, \, 1,\, g+1)$.
In fact, it is easy to see that the map $f \colon X \longrightarrow \mathbb{P}(1, \, 1, \, g+1)$ defined by the sections $x_0, \, x_1, \, y$ is an embedding (notice that the image does not pass through the singular point $[0: 0: 1]$ of the weighted projective plane).
Comment: It would be interseting to describe  the converse. Given a morphism   f:X⇢ℙ(a1,…,an) , what are the corresponding  line bundle and sections ? In other words, what is the functor of  a weighted projective space ? Of course Dan Petersen' question was only one side (sufficient case). I am asking a new and more general question ! ( May I post it as  a question ?)
Comment: Dear Francesco Polizzi, do you know of a reference in which this is explained? Moreover, is there a known criterion to check if the map induced by some sections is a closed embedding into weighted projective space?


Applying Akaike Information Criterion on collection of Gaussian fits

Question: I am trying to apply Akaike Information Criterion on a collection of Gaussian mixtures fitted on some data points. My question is, can I use AIC even if the number of components of Gaussian mixtures are different?
Answer: You $can$ use AIC to compare models, and many do. But it's not necessarily the best way to go, and often chooses too many components. See
https://www.stat.washington.edu/research/reports/2009/tr559.pdf
http://jaqm.ro/issues/volume-3,issue-4/pdfs/fonseca.pdf
http://www.academia.edu/545182/Mixturemodel_cluster_analysis_using_information_theoretical_criteria
The general consensus appears to be that BIC tends to preform much better.
What is somewhat surprising to me is that I can't seem to find any papers discussing $why$ AIC does poorly, and the answer seems very obvious: the simple model is on the boundary of the more complicated model. This causes a lot of complications, as is well documented in case of likelihood ratio tests. The parallels between a likelihood ratio tests and preforming AIC on nested models is very obvious. So I'm a little surprised this paper hasn't appeared yet. Maybe I just haven't found it.
Answer: Yes. This is exactly the kind of situation AIC is designed for; indeed, if you were comparing models with the same number of parameters, maximizing AIC would be reduced to just comparing likelihoods.


Do I install 32 or 64 bit windows program on wine if I have Ubuntu 17.10 64-bit?

Question: I was installing Wine 2.0 on Ubuntu 17.10 but I was wondering if I have to install 32-bit windows program or 64-bit if I use Ubuntu 64-bit.
Comment: The answer is "It depends on the way you configured Wine"  Default is to match the system architecture, but Wine actually recommends setting up a 32-bit wine environment and use 32bit apps, as 64bit apps tend to have some... issues...
Answer: WINE installs both architectures. So you can make 32-bit and 64-Bit prefixes. However, 32-bit is better supported by WINE.
Thus in most cases, the 32-bit version of the windows programs have a better success rate than the 64-bit versions. That said, it does not mean that 64-bit versions won't work.


Where does the Magnetic Field Energy come from, in case of a charged particle moving with constant velocity?

Question: A charged particle moving with constant velocity creates Magnetic Field around it. If there is Magnetic Field, then there must be Magnetic Field Energy. The question is, where does the Magnetic Field Energy come from, in case of a charged particle moving with constant velocity?
Answer: The electric and magnetic fields are components of the electromagnetic field described by the electromagnetic tensor. Components of this tensor change under the Lorentz transformation while obeying the energy conservation law. This means that the energy of the magnetic field increases with the speed in the same proportion as the energy of the electric field simultaneously decreases. The total electromagnetic energy remains the same.
In the contravariant matrix form, the electromagnetic tensor is given by
$$
  F^{\mu\nu} = \begin{bmatrix}
     0     & -E_x/c & -E_y/c & -E_z/c \\
     E_x/c &  0     & -B_z   &  B_y    \\
     E_y/c &  B_z   &  0     & -B_x   \\
     E_z/c & -B_y   &  B_x   &  0
  \end{bmatrix}.
$$
Its determinant is Lorentz invariant:
$$ \det \left( F \right) = \frac{1}{c^2} \left( \mathbf{B} \cdot \mathbf{E} \right)^2 $$
From here you can see that $\mathbf{B} \cdot \mathbf{E}$ does not depend on the speed. The inner product also is Lorentz invariant (does not depend on the speed)
$$ F_{\mu\nu} F^{\mu\nu} = 2 \left( B^2 - \frac{E^2}{c^2} \right) $$
As the magnetic field increases with the speed, the electric field proportionally decreases and the total electromagnetic energy of a moving charge remains the same. The increase of the energy of the magnetic field with the speed comes from the decrease of the energy of the electric field. As a result, charge does not appear in the Newton's laws of the classical dynamics.
Comment: So the original energy came from charging the particle?
Comment: @drake01 Yes, but please keep in mind that this energy does not depend on the speed. In fact, you can see here that (in the classical limit) three quarters of the total mass-energy of the electron come from its charge (the energy of the electromagnetic field): https://en.m.wikipedia.org/wiki/Electromagnetic_mass
Answer:
where does the Magnetic Field Energy come from, in case of a charged
  particle moving with constant velocity?

The energy comes from the same source that sped up the particle to that velocity, which could be heat, electric field, etc.
Comment: This is 100% incorrect. Speeding up a charged body does not take more energy. The energy of a moving body depends on the mass and speed only. A charge does not appear in Newton's laws of motion. This is obvious because speed is relative. See my earlier comment. To see how the energy balances out, see my answer.
Comment: This is incorrect. Speed is relative. Instead of moving a charged object, I can move myself. By doing so I would spend the same amount of energy whether the object is charged or not.
Comment: @safesphere I did not say that the energy spent to speed up a charge or a charged body is equal to the magnetic energy needed to speed it up: I said that the energy for both comes from the same source. If your body was charged, you would spend more energy speeding  it up, because, besides developing kinetic energy, you would also create magnetic field and spend some additional energy for that.
Answer: This response has its primary inspiration from the response of V.F. I have further added my own thoughts into it.
A charged particle moving with a constant velocity has a magnetic field energy associated with it. This energy actually comes from the external agent which gave the charged particle the velocity. During the transient period, the velocity of the charged particle was non uniform and so the magnetic field in the space surrounding the charge was not constant with time, which will give rise to the generation of Non Conservative Electric Field, which will take away some energy of external agent, and store it in the magnetic field in the surrounding of charge.
When charge attains a constant velocity, the magnetic field energy in the space behind it will decrease and in the space ahead of it will increase and the net magnetic field energy associated with the charge will remain the same, which was earlier received from the source, which gave the charge, the kinetic energy.
In this way, we can say, source has supplied energy at two places -
 1. In the kinetic energy of the charge.
 2. In the magnetic field energy around the charge.
Comment: This is incorrect. Classical dynamics does not depend on the charge.


Can you update contract token decimals and token name?

Question: So I'd like to change token decimals and token name in a specific contract. Is it possible?
Comment: Have fudged a specific token contract and really would like to edit those values :(I
Answer: Unfortunately once a contract is deployed the values cannot be changed. If it were possible to do so, then nobody would trust smart contracts.
Answer: No, you can't (unless they were programmed to allow such change, which would not comply at all with the ERC20 specifications, and as @Zenos Pavlakou mentioned, being able to modify the decimals would defeat the purpose of smart contracts).
What you could do, which would require quite some work, depending the status of the ICO, is issuing a new token with a new name and decimals and allow your current token holders to exchange them for the new one at the corresponding rate so they keep holding the same value. Not easy at all, but doable if you don't have any other alternatives.
Comment: if you add selfdestruct(owner);   in a function to a contract that made ERC-20 tokens - would it destroy the tokens (if they are still held by the contract) ?


Are there any merchants in Legend of Grimrock?

Question: Are there any merchants in Legend of Grimrock? I want to know if I should hoard items or just drop the ones that I don't need.
Answer: There are no merchants or store in the game. Just throw away what you are not going to use or obsolete equipment.

Mount Grimrock is a murderous, desolate place. If there were any
  traders once, there are all long dead now

Source
Comment: I would only add that one may carry some amount of junk with them to use it for weighing down buttons at times.
Answer: I would add that sometimes you might drop something and then find out later it's needed for some achievement (eg sets of matching armor) or in a couple of cases, to get certain secrets.  For this reason I'd recommend doing a periodic "item drop", in a big pile, near the exit to the level, and marking the location on the map.  This way, if you realise later that you need something it's relatively easy to go back and find it.


What kind of cactus is this and why are these black bumps forming on it?

Question: Little burnt-looking bumps have been popping up on this cactus and I'm not too sure what to do about it. Can you help me figure it out?
Comment: Welcome to Gardening SE! Can you try to remove a bump or two, or are they firmly connected to the plant? You can always [edit] your post with more details and I suggest you also take the [tour] and browse our [help] to learn more about how the site works while you are waiting for answers.
Answer: I believe that this is a cactus form the Genus Mammillaria. Not sure of the specific species. This appears to have been grown either low light or too much fertilizer (or both) for quite some time.
The confusing part is that it is nice and green, plants grown in too little light are generally lighter green. It is definitely distorted though. The spines appear to be very weak and thin and are missing in several places (not well attached, perhaps?)
As far as the brown dots, let us know if you can get one off and what is inside. I suspect it is an pest of some sort, but I've never seen anything like that.
Comment: You're right; I was away for a while and I unfortunately left this cactus in an unsuitable position, which is the reason for its poor growth. As for the black spots, it's possible to remove the top black layer and underneath is a sort of gooey red/clear bump. Any ideas what it might be? Is there any hope for the cactus?


Unity Capture And Display Live Camera Feed

Question: I want to display the video using the device camera on specific part of the screen on iOS, android and Editor. I was able to find the WebCamTexture which display the camera video on the Quad (3D Object). Now I want to record the video and save it on the disk. Is there are way to do that ? Or is there a better way to do that using unity or through plugin ?
Answer: There are some assets available for this. With the free one you have to do it little technically, the second one in this list is straight forward I guess. Check them out.

Free solution: https://www.assetstore.unity3d.com/en/#!/content/16005 (EveryPlay). This records the screen so what you can do is record your screen while making the video, then save this.
Paid Solution: Also there is a paid plugin out there in Unity asset store that records and save recorded video https://www.assetstore.unity3d.com/en/#!/content/19682


Reverse AdS/CFT correspondence?

Question: $\text{AdS}_{n}/\text{CFT}_{n-1}$ correspondence provides a dictionary for one-to-one mapping observables in bulk gravity to boundary conformal field theories. However, does the reverse correspondence hold, in the sense that gravity is in boundary while $\text{CFT}$ is in bulk?
Answer: No, the DOF of a (possibly conformal) QFT scales with volume, while black hole thermodynamics suggests that the DOF of gravity scales with area, so gravity has to be in the bulk in order for the holographic principle to have a chance of working.

Reverse AdS/CFT correspondence?


Managing Unregistered User Posts by Screening

Question: I am considering allowing users to post to my site without having them register or provide any identifying information. If each post is sent to a db queue and I then manually screen these posts, what sort of issues might I run into? How might I handle those issues?
Answer: Screening every post would be tedious and tiresome. And prone to annoying admin spam. My suggestion would be to automate as much of screening as possible. And besides, providing any identifying information does nothing to prevent spam (a bot will just generate it).
A lot of projects implement recognition system: first the user has to post 1-2 posts that are approved, then by IP and (maybe) a cookie he's identified as a trusted poster, so his posts appear automatically (and later can be marked as spam).
Also some heuristics on the content of the post could be used (like amount of links in the post) to automatically discard potential spam posts.
Answer: The most obvious issue is that you'll get overwhelmed by the number of submissions to screen, if your site is sufficiently popular.
I would make sure to add some admin tools, so you can automatically kill all posts from a particular IP address, or that match a particular regex.  That should help get rid of obvious spam faster, but again, you'd have to be behind the wheel for all of that.
Answer: Tedium seems to be the greatest concern – screening posts manually is effective against spam (I'm assuming this is what you want to weed out) but very boring.
It could be best fixed with a cup of coffee and nice music to listen to while weeding?
Answer: I've found that asking for the answer to a simple question sent the browser as an image (like "2 + 3 - 4 =", a varient of a 'captcha' but not so annoying), with a wee bit of Javascript does quite well.
Send your form with the image and answer field, and a hidden field with a "challenge" (some randomly generated string).  When the user submits the form, hash the challenge and the answer, and send the result back to the server.  The server can check for a valid answer before adding it to the database for review.
It seems like a lot of work up front, but it will save hours of review time.  Using jQuery:

  <form onsubmit="answerMask()" action="/cgi-bin/comment.py" method="POST">

Comment	<input type="text" name="comment" />

# put image here #	<input id="p" type="text" name="a" size="30" />

<input id="c" type="hidden" value="ddd8c315d759a74c75421055a16f6c52" name="c" />	<input type="submit" value=" Go ">

  </form>

Edit update...
I saw this technique on a web site, I'm not sure which one, so this idea isn't mine but you might find it useful.
Provide a form with a challenge field and a comment field.  Prefix the challenge with "Pick the third word from: glark snerm hork morf" so the words, and which one to pick, are easy to generate on the server and easy to validate when the form contents come back.
The point is to make the user do something, apply a few brain cells, and more work than it's worth for a script kiddie.
Comment: jQuery isn't the fix for everything. Checks like this one should be made server-side for real security. JavaScript may be disabled in any browser, specially in spam bots, so this wouldn't help much.
Comment: I'm not surprised this was voted down, and I understand that JQuery isn't always the answer, but it worked easily for me because of my existing web pieces already loaded into the browser for other uses.  I have another answer that might be better...
Answer:
posts that attempt to look legit but aren't
the sheer volume

These are the issues that I see on my blog.


Center manifold theorem example 8.2 from Khalil

Question: I am reading the book of Hassan KhalinlNonlinear Systems (chapter 8.1. Center Manifold Theorem).
In Example 8.2 the author states a system
$$\dot{y}=yz$$
$$\dot{z}=-z+ay^2,$$
in which $a\in \mathbb{R}$.
As the linearized system at $(0,0)$ is already diagonal and y is associated with the eigenvalue which is zero. We can use $z=h(y)$, plugging this into the second equation we obtain the center manifold equation
$$\dfrac{\partial h(y)}{\partial y}\dot{y}+h(y)-ay^2=0.$$
Using the first equation and $z=h(y)$ we obtain:
$$\dfrac{\partial h(y)}{\partial y}yh(y)+h(y)-ay^2=0.$$
Now, he assumes that $h(y)=O(|y|^2)$ using this in the first equation we obtain
$$\dot{y}=yO(|y|^2)=O(|y|^3)$$
from which it is not possible to draw any conclusions.
Now, he assumes that $h(y)=h_2y^2+O(|y|^3)$. We have to determine the coefficient $h_2$ by using the center manifold equation which yields $h_2=a$. Using this for the first equation we obtain
$$\dot{y}=ay^3+O(|y|^4).$$
The author now states that $a<0$ leads to an asymptotically stable origin and $a>0$ to an unstable equilibrium point at the origin.

Question 1: From a $y-\dot{y}$-plot it is evident that the origin is
  asymptotically stable. Is there a more rigorous way to show this? I
  tried to construct a Lyapunov function  $$V(y)=0.5y^2 \implies \dot{V}=y\dot{y}=ay^4+O(|y|^5).$$

I know that for the case of multivariable functions $V$ the higher order terms do matter for the assessment of positiveness/negativeness. But I don't see a reason why this should not be true for the single variable case. Hence, I would think that using this Lyapunov function would be a rigorous way to show the asymptotic stability.
Then the author also investigates the case $a=0$. It is stated that this implies that $h(y)=0$ and thus $\dot{y}=0$ which implies a stable origin for the nonlinear system.
If I use the center manifold equation ($a=0$) I obtain
$$\dfrac{\partial h(y)}{\partial y}yh(y)+h(y)=0 \implies \left[h'(y)y+1 \right]h(y)=0.$$

Question 2: The solution to this equation is given by $h(y)=0$ and
  $h(y)=\ln\dfrac{C}{y}$. Don't we consider the second equation because
  it does not fulfil $h(0)=h'(0)=0$ and is not defined at $y=0$?
Comment: For your second question, you are completely right. Any center manifold is tangent to the center space (and so we must have $h(0)=h'(0)=0$).
Comment: What do you mean by "a more rigorous way"? The stability for $a\ne0$ is immediate (and completely rigorous) from $\dot{y}=ay^3+O(y^4)$.
Comment: By rigorous I mean algebraically by invoking theorems. For example a Lyapunov function is rigorous.
Answer: For your first question, you don't need any theorem, in the sense that you have already all you need.
More precisely, say that $a>0$ (the case $a<0$ is analogous). For $y>0$ sufficiently small we have $$
\dot y=ay^3+O(y^4)\ge ay^3−cy^4=y^3(a−cy)>0,
$$
while for $y<0$ sufficiently small we have
$$
\dot y=ay^3+O(y^4)≤ay^3+cy^4=y^3(a+cy)<0.
$$
Note that this gives the sign of $\dot y$ and so the origin is unstable.
For your second question, as I have already mentioned you are completely right. Any center manifold is tangent to the center space and so we must have $h(0)=h′(0)=0$.
Comment: +1 for the answer. Is there a missing $c$?
Comment: indeed, fixed.-


What is the meaning of "airport pressure altitude" on a flight performance graph?

Question: In a flight performance graph what is the meaning of airport pressure altitude? Is it the top of climb? Because if I set my altimeter to 29.92 it will give me the pressure altitude for an airport at msl to be 0 feet, but in a performance graph I saw an airport pressure altitude to be 6000 feet.
Comment: Re " Cause if I set my altimeter to 29.92 it will give me the pressure altitude for an airport at msl to be 0 feet" -- this is not correct unless the airport is at sea level.
Answer: Pressure altitude is the altitude you see on the altimeter when it is set to 29.92.  If you take off out of Colorado Springs (6,187' FT MSL) and set 29.92 on the altimeter you won't see 0' on the altimeter, you will see something near 6,187' FT MSL
On the performance graphs, we convert the airport elevation and cruising altitude to pressure altitudes by applying the conversion between standard pressure (29.92) and actual pressure.
The formula is as follows:

29.92 - [Airport reported altimeter setting]
Multiply result by 1,000
Add result to airport elevation or cruising altitude

For example.  At Colorado Springs (6,187) and a current altimeter setting of 29.85.

29.92 - 29.85 = 0.07
0.07 x 1,000 = +70
6,187 + 70 = 6,257 FT pressure altitude

If cruising at 10,000 FT, the resulting pressure altitude to be used in the performance charts would be 10,070 FT.
Comment: Thanks .For the crusing altitude who decides ( atc or pilot)  or  is there a given range to pick from , and it's me how do I determine what altitude I should set ?
Comment: Under VFR, the pilot decides on a cruising altitude.  Odd altitudes+500 going east and even altitudes+500 going west.  You look at the performance charts to determine the altitude you want to cruise at.  The higher you go, the faster the true airspeed and ground speed.  Cruising altitude depends on distance, weather, fuel, passenger, etc.  That is why you "get the big bucks" to make the best decision.
Comment: Thanks and God bless you


Separate actions in export

Question: I have several rigs and animations. I want to export only the current action to .fbx; however, I do not want to delete the others. Is this possible?
Answer: Actions (animations) and FBX are a bit tedious… Think what you want is 'scene' animation export (as in, only get 'active' action applied to animated objects)? In this case, you should disable 'All Actions' (and probably also 'NLA') options from Animation tab in FBX export settings.
Answer: There are no perfect solutions for now, however here is a workaround:
-Save the file
-Go to the action editor
-Delete the actions you don't want by holding Shift and left clicking the X button to unlink the action (shift will force the unlink even if the armature has keys on this action)
-Export FBX
-Revert the file.

Separate actions in export


Is it possible to combine Sitecore 9.1+DotNet+React Js

Question: I have a requirement in my project. It is an existing project which is developed in Dotnet MVC + Sitecore 9.1, so some part of the page in that project needs to be implemented in react js, for example, calling the service and filtering the data. My question is how we can integrate the react js with this existing project that has MVC + Sitecore 9.1 ? Is there any way to do all this things? Thanks in advance.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/96063/discussion-on-question-by-durga-prasad-is-it-possible-to-combine-sitecore-9-1do).
Answer: Yes - Sitecore JSS / Headless Services
The officially supported Sitecore Headless Services has full support for ReactJS components on MVC pages in the form of Javascript Renderings or Client Side Embedding.
Sitecore JavaScript renderings
Sitecore JavaScript renderings offer support for both server-side and client-side rendering of ReactJS components on an existing Sitecore MVC page.
Client Side Embedding
Client Side Embedding is a simple approach for client-side only rendering of ReactJS components, especially if not aiming to have ReactJS drive the page layout.
Other Options
There is also a community supported extension of ReactJS.NET which is Sitecore.React. However the following considerations should be taken into account when deciding which direction to go:

JSS is officially supported and maintained for Sitecore 9.1+
ReactJS.NET and Sitecore.React are not officially supported by Sitecore
JSS supports the Experience Editor, Sitecore.React also supports the Experience Editor, but does require you to call FieldRenderer.Render(item, "field") in the controller.
JSS supports the Tracker (for Analytics, Personalisation and Optimization),
Sitecore.React also supports the Tracker with no extra code.
JSS is more scalable as it has headless support, whereas the community modules above are coupled to .NET MVC.
JSS has support for Sitecore Experience Accelerator in Sitecore 9.2+
JSS requires your Sitecore license has this enabled - you will need to check your license details or contact your account manager to confirm.
Sitecore.React does not require any extra licenses
Sitecore.React has better support for hybrid modes. JSS can do a JavaScript rendering, but these do not scale well due to the SSR call made to the node server per rendering.
Sitecore.React does not have a dependency on node.js.
Comment: Just to clarify, with Sitecore.React, you don't need to write any extra code or effort for the Experience Editor, it supports this out of the box. Same with Tracker for analytics. Because it is just a controller rendering, it works just the same. You can personalize, a/b test etc... everything that you can do with a controller rendering... :)
Comment: Also - please note that the JSS JavaScript Rendering part is still experimental and is only designed for 1-2 components per page. It does not scale well due to the SSR call to the node service.
Comment: Agreed with @Richard Seal about number of JSS component per page for performance
Comment: Note that JSS Javascript Renderings are deprecated and no longer support since they do not scale well, and it is generally recommended that they are avoided. https://jss.sitecore.com/docs/techniques/mvc-integration/javascript-rendering#sitecore-javascript-rendering-deprecated


IRC blowfish encryption mode?

Question: I've been doing some tests with this tool : http://crypto.hurlant.com/demo/CryptoDemo.swf
and been trying to match blowfish results obtained from Mirc + blowfish (from what used to be fish.secure.us v1.30). I cannot for the life of me find what mode it is using... Nothing matches.. Does anyone know what mode it uses ??
Answer: Blowfish plugins for IRC seem to use the MODE_ECB (electronic code book), which is probably the least secure of the blowfish algorithms.
For encryption, they break the plaintext up into 8-byte chunks (the Blowfish ECB blocksize). They then encrypt each 8-byte block separately, and take the output of each encrypted block, and chunk that into (2) 4-byte longs, and base64encode each long, padding them to length of 6 base64 characters.
For decryption, this process is reversed, but because it's somewhat confusing I'll also describe that. Take 12 of the ciphertext bytes, decoding each 6-byte representation as a long ('>L'), so that you now have 8 bytes, which you then pass to the blowfish decryption algo.
import struct, string
from Crypto.Cipher import Blowfish

def blow(key, plaintext):
    if not isinstance(plaintext, str):
        raise TypeError('Plaintext must be str')
    else:
        if len(plaintext) % 8 != 0:
            plaintext += "\0" * (8-(len(plaintext)%8))

        cipher = Blowfish.new(key, Blowfish.MODE_ECB)

        ciphertext = ''
        charset = list('./' + string.digits + string.ascii_lowercase + string.ascii_uppercase)
        for j in range(0,len(plaintext),8):
            block = cipher.encrypt(plaintext[j:j+8])
            (low, high) = struct.unpack('>LL', block)

            while high:
                ciphertext += charset[high%64]
                high //= 64
            if len(ciphertext) % 6 != 0:
                ciphertext += charset[0] * (6-len(ciphertext)%6)

            while low:
                ciphertext += charset[low%64]
                low //= 64
            if len(ciphertext) % 6 != 0:
                ciphertext += charset[0] * (6-len(ciphertext)%6)

        assert len(ciphertext) % 12 == 0
        return ciphertext

def unblow(key, ciphertext):
    if not isinstance(ciphertext, str):
        raise TypeError('Ciphertext must be str')
    else:
        assert len(ciphertext) % 12 == 0
        cipher = Blowfish.new(key, Blowfish.MODE_ECB)
        plaintext = bytearray()

        charset = list('./' + string.digits + string.ascii_lowercase + string.ascii_uppercase)
        for j in range(0,len(ciphertext),12):
            high = 0
            for k in range(6):
                high |= charset.index(ciphertext[j+k]) << (k*6)
            low = 0
            for k in range(6):
                low |= charset.index(ciphertext[j+k+6]) << (k*6)
            plaintext += cipher.decrypt(struct.pack('>LL', low, high))

        return plaintext.decode('utf8').rstrip("\0")

Answer: It simply uses ECB mode, but the base64 encoding is done in an odd way - each block of 32 bits of ciphertext is independently encoded into 6 base64 characters.
Comment: Thanks, I guess that makes sens now, i couldn't find anything about it. Do you have a link to some papers about it or something?
Answer: IRC does not support any modes for encryption, everything is transferred as plain text except if you are using SSL.  Blowfish is an encryption algorithm which will be translating your messages (on mIRC) or any client you are using.
Without blowfish messages will be sent to the server as:
PRIVMSG #Channel :YourMessage
With blowfish messages will be sent to the server as:
PRIVMSG #Channel :w8e09w8e09q8eqiwoqweqweqweqwueqwehwqheqywgBlowFishEncryption

IRC blowfish encryption mode?


'Customer email is required' error while checking out as guest

Question: I am getting an error 'Customer email is required' when clicking on Place Order button while checking out using guest account.
How to fix this?
Answer: Thought you checkout as guest magento store your information in customer table,
so It is compulsory to customer to enter email though it is a guest checkout.
Comment: Yes email field is required and i am adding email on billing form.
Answer: This suggests that the email attribute isn't being saved correctly.
You haven't mentioned whether
it's flagged in an in-page validation (i.e. the field is highlighted), or
in a post-process error message (the page reloads and an error message is displayed).
These two circumstances would require vastly different solutions.
Comment: On clicking Place Order button it calls onepage controllers saveOrder function using ajax and on return popup shows with text Customer Email is required.
Comment: If order for better debugging, you'll need to provide much more detailed information.

 We'll need to know if you are using any custom or third-party checkout modules, and if any attribute modification has happened during the production of the store.

This could also be an issue with the template, so I'll try and cover all bases in my answer.


Ruby on Rails Image Upload/Text Overlay

Question: I'm new to using ruby on rails and was looking for help with image upload/manipulation.  The extend of my RoR experience is the rails tutorial blog project, but I've used Java and PHP for numerous other projects.  I'm trying to create a simple app where the user uploads a file, enters some text, and the text is overlayed on the supplied image (similar to icanhascheezburger.com).  I'm planning on using imagemagick to add the text, but am having difficultly uploading the image.  Any suggestions or example code?
Answer: I'd suggested using Paperclip, https://github.com/thoughtbot/paperclip for your file upload.  Also, for the image editing, checkout RMagick, http://rmagick.rubyforge.org/, a Ruby interface between Ruby and Imagemagick.
This blog post has a basic tutorial that might be helpful as well. http://mikewilliamson.wordpress.com/2010/04/29/adding-text-to-pictures-with-rmagick-and-rails/

Ruby on Rails Image Upload/Text Overlay


GDAX 64+bitcoin transactions

Question: I've been watching GDAX for several months and I see repeating offers to sell 64 + bitcoins (not 65 or 63). This seems very strange as it's an unusually large quantity and is repeated several times a day. Can anyone make a quess as to why this would be happening?
Comment: It is interesting. Once when I was writing a automated trading strategy with their java script API, in implementing the real time order book I made a mistake when entering orders to buy btc for USD price higher than any existing open orders. So if someone made a limit order to buy x btc at say 500k USD it would incorrectly enter it into the order book, corrupting it. Outside of that it tracked well, but every hour or two it would get corrupted. After difficult debugging I realized what caused it and noticed that it would always happen every hour or so. Why would someone do that I don't know.
Comment: Also after devising an algorithm based on a few assumptions, that average rate and volume of market orders would remain relatively constant in near term, I used existing open orders to measure what the "erosion" into the order book should be, and based strategy on that. I noticed that while it would work to some satisfaction ( though not profitable and still random due to random outlier market orders ) other bots which traded fast, were very sensitive to my boys transactions. I experienced competition to have my limit orders competitive (make position changes in roughly 4 minutes).
Comment: I also experienced what seemed to be collusion. That is, with in short time of trading like several hours my bot not only would be detected but large volume of limit orders would go up to draw me in to a btc buy position, then pulled dropping the price significantly and losing money quickly. Also after china ban on ico when btc and ltc dropped about a month ago, I noticed in gdax websocket feed that it seemed to come mostly from closing of buy limit orders and not actual selling of btc. That is the significant change in btc price was mainly due to large cancelation of orders, not the selling.
Answer: After continous monitoring I've determined it's someone spoofing (attempting to drive the price lower). The bid always starts out $3-$5 out from the current price and as it gets close to the bid it's offer changed a few dollars higher but is never allowed to meet the current price. Interesting.....
Comment: As far as I can tell there is nothing against canceling orders as long as they aren't spamming the server. Basically there is no regulations for btc trade that I know of outside of exchanges protecting their servers.
Comment: you mean *ask*, not *bid*? But anyway, this might not be manipulation. It could be some liquidity providing strategy based on spread, when he waits for some big market orders to move price above the average (and then arbitrage will bring the price back, but he sells with a little profit).
Answer: If you have a lot of purchasing power (relative ) it is possible to manipulate the price. Say you wanted to sell btc. You could put up limit orders to buy btc at the highest price possible, every time a market order to buy btc comes in it will match with the lowest open sell limit order until it buys up the size it was for and is instant. So if you saw that market order come in and it uses up all the lowest price sell limit orders and there is remaining size left, it goes up to the next lowest order and begins matching with that one. This opens it up to now place a buy limit order at the same price of what that sell order was.
If you have the capital to spend, the price goes up and up. Now most of your orders don't actually have to complete they are just place holders grabbing spots when available. You can probably get more complex to guard against your buy limit orders actually completing, and if they do well your driving the price up so you can sell at a higher price just detect possible ponzi scheme environment where you have to buy more btc than you can sustain and sell in driving upwards.
This is what actually is driving btc price I'm willing to bet most times. Some of the problems which make this possible I think is gdaxs slowness to add or remove btc and fiat. This creates inter market boundaries which greatly reduces the capital necessary to influence the market. With out these boundaries, people would make the markets as efficient as possible. They would take advantage of local market price differences and be able to have profitable arbitrage position. And this controlling the btc price would require large enough capital investments to drive all btc prices up and in the mean time people profit in matching those markets.
Also the markets units of time in my opinion are the market orders. The extent to which the market can be persuaded and how long it takes is determined by market cap and volume traded. This is less susceptible to manipulation because there are fees for market orders.

GDAX 64+bitcoin transactions


What does this icon mean in blender outliner?

Question:
I imported a file from a different program, and am wondering what this icon means. I don't think its a collection or anything cause when I hit off, it just removes the dotted lines between the mass amount of objects I imported. Anyone know?
Answer: This is an empty object, and dot lines indicate parent-child relationships between objects.
If this empty object is the parent of other objects, those objects will inherit the transformations of this empty object.
Usually, empty object is retained to facilitate the overall movement of other objects.


Absolute Hodge implies Galois invariant?

Question: Let $X$ be an Abelian variety defined over a number field $K$,   suppose that it has a good reduction over a  fine place $\mathfrak{p}$ of $K$. Let $G_{\mathfrak{p}}$ be the local Galois group for $K_{\mathfrak{p}}$.  Let $s$ be a Hodge cycle in $H^n_{B}(X^{an}, \mathbb{Q})$, the Betti cohomology.   By comparison theorem there is a canonical isomorphism     $H^n_{B}(X^{an}, \mathbb{Q})\otimes \mathbb{Q}_p\cong H^n_{et}(X,\mathbb{Q}_p)$, where the right hand side of the equation is the etale cohomology. So via this isomorphism, $s$ corresponds to a etale cycle $s_{et}$. Then Does Deligne's absolute Hodge theory implies that $s_{et}$ is fixed by a finite index subgroup of $G_{\mathfrak{p}}$.
Comment: You might find this helpful: http://mathoverflow.net/questions/82373/mumford-tate-group-and-galois-representations/82386#82386
Answer: This is Proposition 2.9(b) of Deligne's 1982 notes.
Answer: I guess $X = A$, and for the étale cohomology you change base to $\bar{K}$. The answer is then: yes, by definition. (At first, Deligne–Milne define absolute Hodge cycles over algebraically closed fields. Then, for general fields, they ask the étale component to be Galois invariant.)
Let $\mathrm{MT}$ denote the Mumford–Tate group of $H_{B}^{n}(X^{an},\mathbb{Q})$. Then $s$ is invariant under $\mathrm{MT}$. Let $G_{p}^{\circ}$ be the connected component of the Zariski closure of the image of the Galois group under the representation on $H_{et}^{n}(X_{\bar{K}}, \mathbb{Q}_{p})$.
Using the fact that the étale component of absolute Hodge cycles is Galois invariant, we get the following corollary: Deligne's theorem shows (for abelian varieties) that Hodge = absolute Hodge, hence
$$G_{\mathfrak{p}} \subset \mathrm{MT} \otimes_{\mathbb{Q}} \mathbb{Q}_{p}.$$
This is precisely because the group $G_{p}^{\circ}$ must fix at least all the étale components of the absolute Hodge cycles (which, by the theorem are precisely the $\mathrm{MT}$-invariants).
Comment: some point unclear for me, it may be a stupid question. I understand Absolute Hodge cycle as those Hodge cycle such that after Galois action it is still a Hodge cyle.  But then how to show  that the etale component of an absolute Hodge cycle is invariant under the whole Galois group $Gal(\bar{K}|K)$?
Comment: Sorry, I don't understand your comment. There is no Galois action on Hodge classes. An absolute Hodge cycle in Deligne's sense is a tuple $(s_{dR}, s_{et})$, such that (i) for every complex embedding $\sigma \colon K \to \mathbb{C}$, $s_{dR}$ gives rise to a (rational) Hodge class, and (ii) such that under the comparison of Betti cohomology and etale cohomology, these Hodge classes correspond with $s_{et}$, and (iii) $s_{et}$ is Galois invariant.


Can I run Android apps on Ubuntu?

Question: Is it possible to run Android apps on Ubuntu? And I don't mean inside an emulator, but natively, as you would with any other application installed using the Ubuntu Software Center.
Comment: See also: [How to run an Android emulator in Ubuntu 13.04](http://askubuntu.com/q/290845/178596)
Answer: You can now under Chrome run APKs, using this extension (bearing in mind it is in development for use by developers for testing apps). Here are some steps I did to get it to work

Install from here -  click 'Add to Chrome'
This will take a while as it seems to download a crx installer weighing in at 113Mb, and another one at around 9Mb, so be patient:

N.B. on my Fedora 21 build of Chromium 40 I got the error 'Manifest file is invalid' when trying install the extension, even after clearing data and reloading the extension. I also had issues with Ubuntu 14.04's build of Chromium 41, so I installed Google Chrome :( and that worked.
Get a APK of the application you want to use - no, it does not seem like you can install from Google Play, you need a APK file of the app, so this is the tricky bit. Most closed source devlopers don't want their stuff freely distributed, so for most apps on Google Play at least you either need to use:

Use a APK for a open-source app - for testing this I tried using the x86 APK for VLC Media PLayer, which resulted in a error screen - I then tried the armv7 arc version and that worked at first and then crashed.
Get a APK from a Android device - this easily easily be done on some rooted Android devices, on normal devices I think you can copy system app's apks from /system/apps or somewhere - again not recommended due to legal stuff.
Use a third-party service/repository of APKs - e.g. this article suggest this one, but the issue here is that you may be downloading modified or infected programs/files. Probably should be considered a last resort.
 Use a third-party extension - e.g. this one that pretends to be a device and downloads (not a good idea if you like legal stuff, plus google tracks your every move (mainly when signed in) so may be found out pretty quick...  Dead as out of date on both browser and likely android support. It isn't recommend to install extensions not in browser's extension store anyway!

Install it
Now we get to the more fun bit of trying it out. Go to the Apps thing in chrome (or type chrome://apps in the URL bar) and launch Arc Welder. Then choose the directory the APK is in and then the APK, then choose 'Launch App' in the window.
If the window shows the app icon as one that looks like this:the app probably won't work so their may not be much point in continuing. This seemed to happen alot with apps for Android 4.4+...
Use it
I managed to get QuickOffice to run and mostly work under the extension, though I couldn't save any documents as it was not happy about choosing the place to save the file (showing a folder selection box, not a file selection box for saving :P )

After you press 'Launch App', the extension automatically adds a entry to the apps page on Chrome - this you can make into a standalone application launcher to launch the app directly from your app menu/dash/launcher - this is possibly the best feature of this extension as integrates with the desktop and you don't need to launch a emulator etc first.

Overall this is brilliant, considering this probably is still in development and not designed for this it works quite well.

Sources:

Getting Started with ARC
Android apps to run on Windows, Macs and Linux
Test Android apps in Chrome OS, Windows, OS X, or Linux using ARC Welder Chrome app

Alternatively you can use a emulator as suggested in other answers - I did have some success using Genymotion (there were some handy instructions here, but this answer may help). Android Emulator can be got as part of the Android Studio SDK, however since Android Nougat apps should be signed.
Comment: I've managed to install Skype for Business on Ubuntu with this method
Great, thanks for the suggestion.
Comment: See also: http://www.omgubuntu.co.uk/2014/09/install-android-apps-ubuntu-archon (Don't Blink :)
Comment: Did someone manage to install WhatsApp using this method?
Comment: Thanks. Is it possible to get those closed-source APK, if my android isn't rooted? If not, what can I do now? Is it possible to install and run android OS  on Ubuntu by virtualbox, and then install app from google playstore?
Comment: @Ben - you can get some of an existing device AFAIK, else its the third party sites. Google play may be restricted now on installs outside of manufacturer devices
Comment: "you can get some of an existing device AFAIK, else its the third party sites. " do you mean when installing androidn in virtualbox?
Comment: No, because that in of itself requires obtaining google play services most of the time with newer versions - most android tablets and phones come with it (otherwise they aren't very 'smart' at all...). It should work as long as the architecture and android version are similar enough. When you install an app, the APK should be accessible somewhere on the root folder of the device. This I guess must be difficult - probably as if it is closed source trying to obtain it by other means violates licensing
Answer: The straight answer is no you can't. Although Android apps are developed in Java and thus should work, the environment is completely different:

Screen size is limited, the concept of a "Windowing System" does not exist in a mobile
Some of the hardware simply isn't there, SIM card, GPS, etc

There's an emulator that fools the apps by giving them those extra bits they need. But it uses the native OpenJDK on your machine so they will run well. Think of it like a test environment and not an emulator.
Anyway if you idea is running Layar in your laptop, forget it, it doesn't make any sense at all.
Comment: I think you have FBReader in the repositories, maybe that will work for you.
Comment: Thanks for the answer. I was thinking more in terms of being able to run apps (like eReaders) that are not available for Ubuntu.
Comment: ...and native code is compiled against Bionic libc, which is vastly different from the GNU libc that Ubuntu ships with.
Comment: And, in case the other questions don't make sense, I'll just add, running a program in the emulator isn't worth the effort unless you're a developer.
Comment: FBReader is severly Unity impaired and the last time I checked it was Windows impaired too. :( I have a copy of it but I don't use it because every time you hit the enter key (searching the library for books) it maximizes and minimizes the window making you lose your place and a few other bad experiences.
Answer: The closest you'll get is through an emulator. This answer might not be for you (you might already know all this) but if other people drop into this thread, they might be interested in knowing.
You can run things through the Android emulator, part of the Android SDK (software development kit).
This provides a virtual device which does allow you to run quite a lot of Android applications though it may struggle with some of the more hardware-dependent things (3D, Phone calls, GPS, SMS, etc)
Here's a guide on getting it set up:
How to Run Android Applications on Ubuntu - Softpedia
Comment: Other instructions on setting up the SDK: http://developer.android.com/sdk/installing/index.html http://askubuntu.com/questions/34702/how-do-i-set-up-android-adb
Answer: Seems there are more and more developers entering this domain.
http://www.shashlik.io/,
What is Shashlik

The goal of Shashlik is to provide a way to run Android applications on a standard Linux desktop as easily and simply as possible.

can run android apps, on Ubuntu. It's not stable, and not all apps work, but it seems promising.
P.S. I had to sudo apt-get install libgl1-mesa-dev and sudo apt-get install kde-baseapps-bin
Comment: Could you update this answer to provide more details on how to use it?
Comment: Shashlik  uses a QEMU fork, a fork of the android emulator from the SDK.
It is modified to show the window icon and title of the running app, to appear not to be an emulator.
Answer: No, you can't (other than through an emulator as mentioned by Oli.) However, it looks like the Ubuntu people are working on this, so you might be able to do it in the future. My proof: http://arstechnica.com/open-source/news/2009/05/canonical-developers-aim-to-make-android-apps-run-on-ubuntu.ars
Comment: Here is the launchpad entry for the project. I can't seem to find the code repository, and unfortunately it's marked "complete", "Low priority", "obsolete". https://blueprints.launchpad.net/ubuntu/+spec/mobile-karmic-android-execution-environment
Answer: It possible to run Android apps on Ubuntu?
Yes
Natively, as you would with any other application installed using the Ubuntu Software Center?
Yes, but through a lot of tinkering:

Using chrome (Beta level tools);
Anbox (Alpha level software);

Google Chrome can run Android apps as chrome apps but first, you must convert them using by using Arc Welder or the ARChon Custom Runtime.
Anbox  is not an emulator but a compatibility layer. It aims to run Android applications on any GNU/Linux operating system by putting the Android operating system into a container, abstracting hardware access and integrating core system services into a GNU/Linux system, so Android applications can be integrated with your operating system like any other native application.
Answer: YOU CAN
And have several options to do it.

Special emulator like those that come with Android SDK. Don't use ARM-based as they are sloooow.
Generic virtual machine like VirtualBox with Android x86 installed. My recommend.
Chrome. Recent versions of Google Chrome can run Android apps inside itself (never tried that, but people rate it high).
Connect android device by USB or Wi-Fi network, and use some sort of Remote Desktop.
Comment: This answer gives no details as to how any of these work.
Comment: Strange. I always had a mouse cursor appear when I plug in the mouse, even on real phone. There is something wrong with you virtual machine, I think. Android supports mouse.
Comment: maybe I need to use a newer version
Answer: A more recently available option is Anbox. Unlike most other solutions, it is container based rather than being an emulator. This means that it runs on the host kernel. It also attempts to integrate into your host OS so that apps appear to be native. It is currently alpha but looks promising.
Answer: Ubuntu Web
Ubuntu Web is an Ubuntu remix that is designed to be an open source desktop Linux replacement for Chrome OS.
/e/OS is an open-source mobile operating system paired with carefully selected applications. They form a privacy-enabled internal system for your smartphone. And it's not just claims: open-source means auditable privacy. Logging into the /e/ account makes it possible for you to take advantage of a rather nifty trick Ubuntu Web has up its sleeve. This trick is WayDroid, a port of Anbox which allows users to install Android apps from the /e/ store.  source
Visit /e/ Application Checker to check if your favorite Android apps are available in the /e/ store, for example there's YouTube and Instagram which make it possible to view these two apps on your tablet in full screen portrait mode.

Can I run Android apps on Ubuntu?


PDF files appear at obscure preview sizes when opened in Reader

Question: I will combine files into a single PDF and email to client. When the end user opens the PDF in Acrobat Reader, it displays at obscure preview size like 309%. The user then has to hit the minus key in the menu bar to see the PDF. Is there a setting when saving the PDF to have it open at 100% in reader?
Answer: Yes. Of course it depends on what you are using to combine PDFs.
In Acrobat choose File > Properties and then select the Initial view tab.

Set it how you want things to open and save.
By default, PDFs are generally generated with the magnification set to "Fit to page" So the view is zoomed to allow the page to fit on the entire screen - that means enlarge or reduce as needed. So the "309%" is probably just the percentage needed to zoom the page to fit the client's screen.
Of Course, your client could always simply hit Command/Ctrl+1 to view Actual size.


Cron.php not working and no "Cron (Scheduled Tasks)" configuration block

Question: I've a magento 1.6 instance that doesn't trigger cron jobs when cron.php is hit. It also doesn't have a Cron (Scheduled Tasks) configuration section under Admin > System > Configuration > System. Mage_Cron is enabled. I've no idea why it isn't working. Any feedback would be helpful. Thanks!
Comment: Any errors in thre magento or php logs? Is the cron table in the database filled with tasks?
Comment: Nothing in the cron_schedule table and nothing in the logs. Something is amiss because the cron admin isn't even showing.
Answer: I've found the issue.
One of the modules installed on the site was disabling the cron system in it's config file:
<config><modules><Mage_Cron><active>false</active></Mage_Cron></modules></config>


Which free software can I use to deskew scanned images

Question: I've scanned about 100 documents, so I have a folder with 100 jpg images, but they are rotated by the angle up to 15 degrees. Is there any free simple to use software I can use to rotate them to the normal orientation? It would be good if it works on Windows XP or Windows 7.
Comment: There are some additional potentially helpful answers here: [How can I deskew and crop PDFs made from scanned pages *automatically*?](http://superuser.com/q/444901/11574).
Comment: Sadly most of the software that can do this are made for smartphones. Like office lens, camscanner, notebloc, etc. I only know of ScanTailor on Windows OS and various image editing tools or python scripts (ocrmypdf)
Answer: Imagemagick has a -deskew option which may be helpful and the app works very well from the command line on batches of files.
There's some handy Imagemagick scripts here - have a look at unrotate.
Comment: Thank you. It decreases the angle of rotation of the image from 5-15 degrees (in my original images) to under 2 degrees (but doesn't eliminate it completely).
Answer: The definitive tool is ScanTailor.
It works like magic for fixing scanned pages and it has a Qt-based GUI frontend.
It allows for batch processing, manual verification and fix of every intermediate step (separation between pages, deskewing, content area identification, noise reduction and optimization) and it's available on every platform (Mac -- via MacPorts or Homebrew, Linux, Windows).
It takes as inputs JPG or TIFF files.
Comment: Its CLI is unmaintained since 2011.
Comment: [Repo](https://github.com/scantailor/scantailor) is archived and project is no longer maintained
Answer: Maybe you want to see unpaper too.
Answer: Pretty much any image manipulation package will allow you to rotate images. Paint.NET for example.
Actual deskewing where the image is distorted rather than just rotated is harder and is available in fewer packages.
Answer: ocrmypdf can deskew PDF pages automatically:
<code>ocrmypdf --deskew --clean --rotate-pages input.pdf output.pdf
</code>
Comment: It didn't do a very good job on a pdf I tried, text lines are not horizontally straight.


SciKit Learn: Multilayer perceptron early stopping, restore best weights

Question: In the SciKit documentation of the MLP classifier, there is the early_stopping flag which allows to stop the learning if there is not any improvement in several iterations. However, it does not seem specified if the best weights found are restored or the final weights are those obtained at the last iteration. If not, is possible to restore the best weights found?
Answer: Yes.
Inspecting the source code on GitHub, we see that the internal function _update_no_improvement_count keeps track of the best coefficients in cases where the validation score doesn't improve
(line 580)
    def _update_no_improvement_count(self, early_stopping, X_val, y_val):
        if early_stopping:
            # compute validation score, use that for stopping
            self.validation_scores_.append(self.score(X_val, y_val))

            if self.verbose:
                print("Validation score: %f" % self.validation_scores_[-1])
            # update best parameters
            # use validation_scores_, not loss_curve_
            # let's hope no-one overloads .score with mse
            last_valid_score = self.validation_scores_[-1]

            if last_valid_score < (self.best_validation_score_ +
                                   self.tol):
                self._no_improvement_count += 1
            else:
                self._no_improvement_count = 0

            if last_valid_score > self.best_validation_score_:
                self.best_validation_score_ = last_valid_score
                self._best_coefs = [c.copy() for c in self.coefs_]
                self._best_intercepts = [i.copy()
                                         for i in self.intercepts_]

and that the internal function _fit_stochastic
restores these coefficients if early_stopping==True
(line 567)

        if early_stopping:
            # restore best weights
            self.coefs_ = self._best_coefs
            self.intercepts_ = self._best_intercepts

Answer: Yes, the function will restore best weights, see the snippet below, taken from this link.
if early_stopping:
            # restore best weights
            self.coefs_ = self._best_coefs
            self.intercepts_ = self._best_intercepts

Please do make sure to set a reasonable validation_fraction, default is set to 0.1.


Can I apply funds to a credit card

Question: I just got approved for a MasterCard. It was only for 300. Can I increase that amount by adding my own extra money to it
Answer: You can send money to the bank and create a credit balance, but you cannot increase the credit limit.  So if you send them $100, you can then charge $400 in one transaction.
That said, I see no practical benefit to doing this.  If you want to buy something that's $400 and only have $100, just pay $100 in cash and charge the other $300.  Or save up and pay in cash :)

Can I apply funds to a credit card


wget internal buffer size

Question: I'm constantly using wget to download many files over 1GB each. I'm getting concerned about how this may be straining my HDD. Can wget's internal buffer size be modified so that it writes to my HDD less often? What about curl?
Comment: As long as you have free memory, writes are buffered by the OS disk cache anyway (watch it grow when you do this).  I won't say there's anything wrong with what you want to do, but I doubt it is going to make any ultimate difference to the disk's lifespan.
Comment: In what sense is it going to be "straining your HDD" -- do you want this stuff saved on disk, or not?
Comment: @goldilocks I would rather have it write to disk every 1 MB rather than every 1 KB for example. That way it will only write to HDD 1 time rather than about 1000 times.
Comment: Yeah, you would probably only do this to keep it from swamping the queue but there are block-level controls for that sort of behavior. The requests are going to be merged by the scheduler anyways.
Comment: Also, hard disks have their own buffer which is at least a few MB: http://en.wikipedia.org/wiki/Disk_buffer I'm sure there are more than a few engineers that have given some thought to this issue already.
Answer: You can use an external bufffer, and pipe the output through it.
For example, the program buffer allows you to buffer up to 1GB, and you can specify at which fill level percentage it should start to write :
To buffer 10 blocks of 512 kB (5MB) and write out to the file when the buffer is filled to 85%:
wget example.com -O- | buffer -s 512k -b 10 -p 85 > ./outfile.txt
(may need apt-get install buffer)

But, other than directly answering the question, this does not look like something you should need to do manually. Maybe you can configure your file system to cache write operations a little longer before actually writing to the disk? Depends on what problem you want to solve exactly.
Comment: +1 I'm guessing `buffer` is so obscure because it mostly replicates `dd`, only with the added `-m`, `-p`, and `-b` features that make what you are suggesting possible.  Unfortunately I can't find the upstream source; while it's in debian it's not in e.g. fedora.

wget internal buffer size


Stop over in London

Question: We are travelling from South Africa to Denver to visit my son but we have a stop over at heathrow for 11 hours, my granddaughter lives in the uk, could we pass through security to see her? We are traveling from the same airport and understand we will need to go through Security again, we have an American tourist visa, would we need to get another type of visa even if we don't leave the Airport?
Comment: Depends on your nationality, which is?
Comment: Can your daughter meet you inside the sterile area? Depending on the airport, sometimes there are procedures for getting through security without a ticket, but provided you have a valid reason.
Comment: The advantage of course is that you don't miss your flight, spend less time in security and still get to see your family.
Comment: @AffableGeek The only way airside for non-staff at Heathrow is with a ticket. However, you can sometimes get a very cheap one-way ticket, and once you're airside you can then go to customer services + say you've decided not to travel + be escorted landside again, so their daughter could always do that (for a potentially small-ish cost) to join them airside
Answer: It appears you are of South African nationality, have a valid US visa and will spend less than 24 hours in the UK. This means you are probably eligible for the transit without visa concession. You must apply for this concession on arrival, and while it would probably be granted, it may be denied, in which case you'll either have to remain airside or (if something else is horribly wrong) be detained.
To be sure, you can apply for the Visitor in Transit visa before your trip.
Comment: The downvote really needs an explanation.
Answer: The UK has two kinds of Transit visa. The Direct Airside Transit Visa only allows you to remain 'airside', i.e. it does not allow you to cross immigration. The Visitor in Transit Visa allows you to cross immigration, and allows you 48 hours between arrival and departure.  You can sightsee or visit family during those 48 hours. Some nationalities do not need visas at all to transit.
See this question for details about whether you need a visa and how to get it.

Stop over in London


Does "Black Resonance" increase power of all b. magic if b. magic is equipped by other party members?

Question: Or does it only boost the character with "Black Resonance"? If someone could let me know how exactly this mechanic works, I'd be thankful!
Answer: Black Resonance only increases magic damage for Black Magic spells when you have other party members with Black Resonance. So, selecting Black Magic or B/W Magic as a secondary job ability will not increase black magic damage if you only have one character with Black Resonance. Once you have multiple characters equipped with Black Resonance, each character will have their black magic damage increased as follows:

0 allies: 1x multiplier (No effect)
1 ally: 1.1x multiplier
2 allies: 1.15x multiplier
3 allies: 1.2x multiplier
Comment: Thanks! Is there a level where Black Resonance is given as a support ability? Or do I basically have to have multiple black mages in my party to reap the benefits?
Comment: You can unlock the Black Resonance ability for general use when you rank Black Mage up to Job Level 8.


How can endothermic reactions be spontaneous?

Question: If endothermic reactions absorb heat from the surroundings, how can they be spontaneous, if heat only flows from high temp to low temp objects?
Comment: Heat does not necessarily flow from high temp to low temp objects. Open your fridge, and you'll see. How did it get cold? When you bought it, it was room temp, wasn't it?
Comment: Another example would be the evaporation of water at room temperature. Evaporation is endothermic, yet water slowly evaporates into vapor in the atmosphere.
Comment: A very similar example (which I find a bit easier to visualise) to Pritt Balagopal's is the melting of ice at room temperature.
Answer: A spontaneous endothermic reaction can occur when the changes in enthalpy and entropy yield a negative Gibbs free energy. An endothermic reaction can be spontaneous if entropy increases by more than the change in enthalpy.
$\Delta G = \Delta H - T\Delta S$
For endothermic r̥eactions, $\Delta H$> 0 and thus if the value of $-T\Delta S$ overshadows the $\Delta H$ value (usually at very high temperatures) then the overall value of $\Delta G$ becomes negative and thus the reaction becomes spontaneous.
Answer: At the end of the day spontaneity boils down to the sign of "Gibbs free Energy"
so if the $\Delta G= \Delta H- T\Delta S$ gives you a negative value then the process would be spontaneous.


Implemented a basic dictionary in python using lists as linked list and murmur hash as a hash function

Question: import mmh3
from random_things import string_generator

class HashMap:
    def __init__(self, num_of_buckets=4, load_factor=0.75):
        assert (num_of_buckets >= 1)
        self.num_of_buckets = num_of_buckets
        self.mp = [[] for i in range(num_of_buckets)]
        self.LOAD_FACTOR = load_factor
        self.num_of_elements_in_ht = 0
        self.longest_chain = [-1, -1]

    def bucket(self, key, num_of_buckets):
        k = mmh3.hash(key)
        return k % num_of_buckets
        # return HashMap.my_own_hash_function(key) % 3

    def _does_it_need_resizing(self):
        return self.num_of_elements_in_ht / self.num_of_buckets >= self.LOAD_FACTOR

    def resize(self):
        if self._does_it_need_resizing():
            new_hash_table_size = self.num_of_buckets * 2
            new_hash_table = [[] for i in range(new_hash_table_size)]
            for linkedlist in self.mp:
                for element in linkedlist:
                    bucket_index = self.bucket(element[0], new_hash_table_size)
                    new_hash_table[bucket_index].append(element)
                    if len(new_hash_table[bucket_index]) > self.longest_chain[0]:
                        self.longest_chain = [len(new_hash_table[bucket_index]), new_hash_table[bucket_index]]
            self.num_of_buckets = new_hash_table_size
            self.mp = new_hash_table

    def set(self, key, value):
        bucket_index = self.bucket(key, self.num_of_buckets)
        element = self._get(self.mp[bucket_index], key)
        if element:
            element[1] = value
            return element
        self.mp[bucket_index].append([key, value])
        if len(self.mp[bucket_index]) > self.longest_chain[0]:
            self.longest_chain = [len(self.mp[bucket_index]), self.mp[bucket_index]]
        self.num_of_elements_in_ht += 1
        self.resize()
        return [key, value]

    def _get(self, bucket, key):
        for ele in bucket:
            if ele[0] == key:
                return ele
        return None

    def get(self, key):
        bucket_index = self.bucket(key, self.num_of_buckets)
        get_resp = self._get(self.mp[bucket_index], key)
        return get_resp[1] if get_resp else None

    def remove(self, key):
        bucket_index = self.bucket(key, self.num_of_buckets)
        for ele in self.mp[bucket_index]:
            if ele[0] == key:
                self.mp[bucket_index].remove(ele)
                self.resize()
                self.num_of_elements_in_ht -= 1
                if len(self.mp[bucket_index]) < self.longest_chain[0]:
                    self.longest_chain = [len(self.mp[bucket_index]), self.mp[bucket_index]]
                return

    def get_the_entire_map(self):
        return self.mp.copy()

    @staticmethod
    def my_own_hash_function(key):
        return 0

    def get_longest_chain(self):
        return self.longest_chain

    def num_of_elements(self):
        return self.num_of_elements_in_ht

    def keys(self):
        k = []
        for linkedlist in self.mp:
            for element in linkedlist:
                k.append(element[0])
        return k

def main():
    mp = HashMap(2, load_factor=1)
    # mp.set("my_string", "my_string")
    # mp.set("my_string2", "my_string")
    # mp.set("my_string3", "my_string")
    # mp.set("my_string4", "my_string")
    # mp.set("my_string5", "my_string")
    # mp.set("my_string6", "my_string")
    # mp.set("my_string7", "my_string")
    # mp.set("my_string8", "my_string")
    # print(f"Size of map {len(mp.get_the_entire_map())} and number of elements is : {mp.num_of_elements()}")

    import time
    import random
    start = time.time()
    while True:
        for my_count, my_string in enumerate(string_generator(20, random.randint(10, 50000))):
            mp.set(my_string, my_string)
            mp.set(my_string, my_string)
        if time.time() - start >= 1:
            print(
                f"Size of map {len(mp.get_the_entire_map())} and number of elements is : {mp.num_of_elements()}. Longest chain {mp.get_longest_chain()[0]}")
            time.sleep(0.200)
            # start = time.time()
        for key in mp.keys():
            mp.remove(key)
        if time.time() - start >= 1:
            print(
                f"Size of map {len(mp.get_the_entire_map())} and number of elements is : {mp.num_of_elements()}. Longest chain {mp.get_longest_chain()[0]}")
            time.sleep(0.200)
            start = time.time()
        mp = HashMap(2)

    # for idx, val in enumerate(mp.get_the_entire_map()):
    #     print(idx, len(val))

    # print(mp.set("my_string", "my_string1"))
    # print(mp.get("my_string"))

if __name__ == "__main__":
    main()

Answer: cite your references
from random_things import string_generator

What is the meaning of this?
We need a # comment in the source code describing its provenance.
Based on pep-8
and how you wrote this, you're telling the Gentle Reader
that this dep comes from a library outside of the current project.
If that's not accurate, use
isort
to clarify your intent.
(OTOH your reference to mmh3
was very clear, thank you, as MurmurHash is available on pypi.)

extra parens
    def __init__(self, num_of_buckets=4, load_factor=0.75):
        ...
        self.num_of_buckets = num_of_buckets

This is perfectly nice and bog standard.
Consider renaming the first parameter so we assign like this:
        self.num_of_buckets = initial_num_of_buckets

That would stress that the caller is only offering a hint,
and is not bound to that many buckets over the map's lifetime.
        assert (num_of_buckets >= 1)

No.
Please elide the extra ( ) parentheses.
Suppose we get a feature request in future for
displaying the actual number upon failure.
We wouldn't want to trick some poor maintenance engineer
into accidentally writing the following erroneous code:
        assert (num_of_buckets >= 1, num_of_buckets)

comments where appropriate
        self.longest_chain = [-1, -1]

That's rather cryptic.
Offer a hint about how to interpret that 2-tuple.
And consider using tuple rather than list.
Bonus points for a self-describing
namedtuple.
Later on the whole cryptic ele[0] thing is
tedious and would similarly benefit from
a self-describing datastructure.
        self.mp = [[] for i in range(num_of_buckets)]

Sorry, you lost me there.
No idea how I should mentally pronounce "mp".
Please offer the Gentle Reader a clue about those two words.
(I really hope it isn't a vowel-less form of "map".
To avoid shadowing a builtin we conventionally append
an _ underscore, giving map_.)
Similarly, tell us about "ht" (num_of_elements_in_ht).
Wouldn't you like to use the conventional name of size ?
EDIT
Further down in the code you reveal it is a Hash Table.
I'd been expecting Hash Map based on the class name, whatever.

use object attributes
    def bucket(self, key, num_of_buckets):
        k = mmh3.hash(key)
        return k % num_of_buckets

Ummm, sorry, you lost me there.
Why did we pass in 2nd parameter?
Instead of return k % self.num_of_buckets ?
EDIT
OIC, resize could have doubled self.num_of_buckets early,
but instead chose to do it late.
Consider doing it earlier, prior to looping.
        # return HashMap.my_own_hash_function(key) % 3

Commented out code is fine during debugging.
But you're requesting review for a PR merge-to-main,
and that's the right time to prune such things from the source
before showing it to others.

use accurate names
            for linkedlist in self.mp:

I see what the identifier is trying to tell me,
but it's not clear to me that we have a
linked list
of nodes that each have a node.next field.
If you had wanted that, I would have expected the import of
deque.
    def resize(self):

Consider renaming this to maybe_resize,
since often the call will be a no-op.

use a None sentinel
    def _get(self, bucket, key):
        ...
        return None

Wow, I didn't see that one coming.
A HashMap is like a dict,
but one cannot store a {"foo": None} value?!?
And set doesn't complain when given a None?
App-level programmers are going to want to use None.
Recommend you create your own none_sentinel = object()
so you can return and test against that.

    @staticmethod
    def my_own_hash_function(key):
        return 0

World's greatest hash function, I know.
In a """docstring""" you might spell out that this
is for testing. Plus this gives you a great opportunity
to specify what you expect of a hash function,
e.g. whether negative return values are acceptable.
Minimally you should annotate:
    def my_own_hash_function(key: str) -> int:

public attributes
    def get_longest_chain(self):
        return self.longest_chain

Ok, I bit my tongue on the map .copy() thing,
but this is even more silly.
This public method is absolutely not pulling its weight,
given that it offers access to a public attribute.
Either rename to self._longest_chain
or delete this method.
    def num_of_elements(self):
        return self.num_of_elements_in_ht

Yup, not getting that one, either.
I would expect this container to
conform to the Sized protocol,
so that len(my_map) would be
how an app developer accesses this.
Suggesting a name of def __len__.

offer a generator
    def keys(self):

This method is lovely, thank you.
It allocates storage proportional to map size.
Consider offering a yield element[0] generator instead.
If someone really needs a list they can just request list(my_map.keys()),
same as they would for a dict.

loop where appropriate
    # mp.set("my_string8", "my_string")

Same remark as above -- review time is when we clean up comments.
But even before you commented it out, a for loop would
have been a much more convenient way to stimulate
the system-under-test.

stress the code
enumerate(string_generator(20, ...

I'm guessing we insert twenty keys.
That's great during manual testing when you're trying
to initially get things working, so you're not
visually overwhelmed by a data dump.
Now that it works and you're obtaining timings,
I encourage you to fill it with many more keys.
That way if an operation isn't O(1) or O(N)
it will show up in the timing data.
I'm concerned this code may be rather on the slow side.
Publishing a self-evaluating
test suite
as part of this codebase wouldn't hurt.

This code appears to achieve its objectives.
Given a few trivial renames I would be willing to
delegate or accept maintenance tasks on it.
Comment: Hi. Thank you for all the valuable suggestions. I agree with all of them. There are few things I did to check if my map is working correctly. I have two queries 1. What is the right place to resize() a hashmap? 2. I have tried benchmarking and as the hash function seems to be deciding factor. Do you see this implementation being much slower than the official stdlib dict? I do understand it being implemented in C and having bindings to python. There are a lot of optimizations that would be in the native dict as well. So far I am not accounting for real edge cases.


Fitting dishwasher under granite

Question: Replacing a dishwasher and noticed they had tiled underneath and the dishwasher I purchased wouldn't fit. So I used an angle grinder and grout removel tool to remove the tiles down to the backer board and now the dishwasher fits. Yay! The ONLY issue left is that the granite countertop barely, and I mean barely scrapes up against the right corner of the dishwasher door. I feel like if I carefully grinded/sanded down the underside of the granite just a smidge, then the door would move freely. The only other option I can think of is to take the thing out, demo the backer board and subflooring, install new subflooring, and put the dishwasher directly on the subflooring, but that sounds like time or money I don't have, so leaning towards just grinding the granite a bit. Thoughts?
Comment: Like Mike stated, check for leg adjustments on the dishwasher.
Comment: I'd look at where the feet land and consider excavating the backer board only where the feet go. (Hint: make a ramp into the hole so the next person can remove the dishwasher.) Maybe you can tweak the feet to be a tiny bit lower. Doublecheck if the door has any up/down adjustment. Failing that, yes, grind the granite.
Answer: Many dishwashers have adjustable feet that may help.
The other thing to consider is the floor - is that level? And matching the worktop?
Answer: Sounds like the tile and backer board were put in after, and around the cabinets that were already in place?  If so, then that's a common problem.  Doing what you're suggesting makes it difficult to remove the dishwasher as you have to get it up over the lip of the tile floor.
I've done things two ways in the past to alleviate that sort of problem.
1) When doing a full kitchen demo or even just cabinet replacement, I've raised the cabinets up off the floor enough to compensate for the backer board+tile height. I ran the backer board under the cabinets, then put down a "frame" of 1/4"-1/2" plywood strips (the thickness of the tiles) that the cabinets would sit on.  This way I didn't have to tile under the cabinets.
2) When just laying down a new floor (backer board+tile), I've removed and raised the counter top so that the dishwasher opening remained the same.  In this case I was replacing the counter top anyway, so it wasn't much more work.
Comment: Appreciate your contributions here, but this answer would only be helpful if the OP was setting cabinets or willing to move the countertop. (Which, as granite, is more likely to be broken than anything else if you tried to move it...)
Comment: Understand.  Point taken.

Fitting dishwasher under granite


Grid tied inverter

Question: Grid tied inverter voltage is slightly higher than that of grid but once the tie is closed voltage will be equal then how the current will be injected from the inverter
Comment: Re, "once the tie is closed voltage will be equal," Close, but not _exactly_ equal. Wires have resistance, and any wire in which current is flowing will have a very slight potential gradient.
Comment: Disregard that close vote. I misread it and thought it was a homework problem. I've retracted the close vote, sorry about that.
Answer: The inverter voltage has to be slightly higher than that of the grid to make the current flow to the grid.
It's like water flowing between two tanks. If both tanks are at the same level there is no flow. You need a difference in heights to make the water flow. You need a difference in voltage to make current flow.
Answer: Grid-tied inverter first checks the grid voltage (and frequency and phase, in order to completely synchronize with it) before producing any output.
Then it outputs a voltage about the same as, or very slightly higher than, the grid voltage in order to start feeding the current back into the grid.
At the same time, it continuously monitors the amount and the direction of the current flow, and it keeps increasing it up to a set limit, making sure it always flows out to the grid and never above the set limit (or never above the power-producing capability of a solar array at the moment, for example).
If anything happens on the grid (like a short-circuit, sudden, significant voltage drop, anything greatly exceeding the set limits), the inverter disconnects to protect itself and starts with step 1 again after a short time.
Answer: At the point of connection to the grid, the output voltage of the inverter is the same as the grid voltage. However, at the point of common coupling between the your section of the grid and the section that supplies the nearest load, the grid voltage is slightly lower. That slight difference allows the inverter to supply energy to the grid. That also means that your inverter supplies the nearest neighbor that is receiving energy from the grid.

Grid tied inverter


Protecting iMacs from high humidity

Question: I am moving to Costa Rica and want to take both of my iMacs.  Humidity and salt air are a problem.  Will leaving the iMac running help to keep humidity out of the unit?  I see only one vent;  maybe a cover?
Comment: Note: do not cover the vent. Different iMacs have different designs. Which iMac models do you own?
Answer: Humidity is not an issue.
Humid air on a warm/hot computer components won't be a problem.  It's when the temperature of the components are lower than the dew point of the ambient air that it will become a concern; water will condense.
Running the computer won't keep humid air out as it's the ambient air that gets circulated.  Unless your computer somehow gets colder than the room that it's located in, it will be fine.
(I live in the tropics with many, many 100% humidity days)
Comment: Well you've either been really lucky or I've had horrible luck. 9 macbooks in 10 years, CR & Belize coasts

Protecting iMacs from high humidity