How to add money to a Paypal sandbox account, after it has been created?

Question: I specified an amount that was too low for my testing needs, when creating a personal paypal sandbox account. Is there any way to add money to an account, after it has been created?
Answer: If you need actual funds in that account you could use Send Money from another sandbox account and pay the account you want to fund.
You really don't need funds in the account to test payments, though.  As long as the account is verified and confirmed it'll fall to "Instant Transfer" and you won't have any problems sending payments using that account.
Comment: They've changed this. A merchant sandbox account with $0 will fail to send payments and payouts through the API's.
Comment: Not negative funds, no.  But $0 balance, yes, as long as you have the bank and credit card setup.
Comment: Ahh, thanks Andrew. I didn't want to wait until the account went negative and suddenly have all my tests fail. So an account with negative funds would still allow for successful payments?
Comment: @IncredibleHat, not if the sandbox buyer account you are using has a credit card attached to it, which it would if you have the credit card added like I said originally.
Answer:
Login using your developer PayPal account https://developer.paypal.com/
Go to 'My Account' on the top right section of the page.
Go to Accounts under Sandbox.
See your sandbox account and click on the Clone link.
Fill the details and mention the amount you want to have and click on Create.

This is helpful in case if the amount in the existing sandbox account is exhausted.
Comment: this is the CORRECT answer
Answer: Follow these steps:-

Go to https://developer.paypal.com/developer/accounts/
Click on the email address used for the account (email address)
Now two option you will get --> Profile and notification (just below that email you clicked)
Choose profile then a popup will come
Now choose funding tab in popups.
Now at the bottom choose edit button and edit the balance and save.

That's it.
Answer: Don't go to sandbox, go to developer.paypal.com
Log in with your real paypal account (not sandbox).
Go to Sandbox - > Accounts on the left.
Click in the button "Create account"
You will be able to add any amount you want.
Answer: Why not duplicate the sandbox account (to have another name), then delete the orginal, then duplicate the new created one with your original name ?
This seems to work with buyer account, seller are usually used with api key
Answer: Just create a new account inside your Paypal developer account and simply enter the number how much you want in your account.
Comment: The question states after an account has been created
Answer:
Login to PayPal Dev portal with your actual Paypal account credentials
Navigate to this path - Testing tools > Sandbox accounts
Select your account from the list
Scroll down until you see PayPal balance or the below page

Edit the PayPal balance amount as your want

It will reflect the money to your PayPal Sandbox account!


The Converse of Poincare Lemma

Question: The Poincare lemma states that contractibility implies triviality of the de-Rham cohomology group. Does the converse still true? If the de-Rham cohomology is trivial, then the manifold is contractible?
Answer: No.  For instance, $\mathbb{RP}^2$ has trivial de Rham cohomology, but it is not contractible (its fundamental group is nontrivial, for instance).
Answer: No. The Poincare homology 3-sphere, for instance, is a smooth 3-manifold whose (integer) homology groups are those of $S^3$. If you remove a  point from it, you get a homologically trivial manifold, but it's not contractible. (In particular, its fundamental group is nonzero).
Comment: I don't know what Poincare homology sphere is, but thank you very much.
Comment: https://en.wikipedia.org/wiki/Homology_sphere ; it's a counterexample to the first Poincare conjecture, where Poincare said "I think that if something has the same homology groups as a sphere, then it's homeomorphic to the sphere." Then a year later, more or less, he discovered this example, and modified the conjecture: if something has the same HOMOTOPY groups as a sphere, then it's a sphere." That one lasted rather longer before being proved.

The Converse of Poincare Lemma


Is Internet Explorer 9 an "evergreen" browser? What about IE 10?

Question: Chrome and FF will silently update to newer versions and I've read that MS did an auto-upgrade for folks on IE6 & 7 to IE8 and from IE8 to 9. Has Microsoft stated whether or not 9 and 10 will be pushing out regular (weekly/monthly) silent updates or is it going to be similar to what they did to bump people from 6 & 7 up to 8?
Comment: Probably more fit for [superuser.com](http://superuser.com)
Comment: Where did you hear that Microsoft auto-upgraded IE6/IE7 users to IE8? Old IE versions are largely used in companies that build applications integrated with specific IE versions and would break if IE just silently upgraded.
Comment: Sorry I didn't cite a source:

http://www.pcworld.com/article/246496/internet_explorer_silent_updates_are_not_a_miracle_cure.html
Answer: The latest versions of Chrome, Firefox, Edge, and Safari are evergreen browsers, i.e. they automatically update themselves silently without prompting the user.
Microsoft started moving toward evergreen browsers as of IE10, the first major Internet Explorer release after Microsoft made the announcement it sounds like you are referencing. Through Windows Update, Microsoft automatically updates users to the latest version of Internet Explorer supported by their version of Windows: up to IE8 on Windows XP, up to IE9 on Windows Vista, while IE10 requires Windows 7. Technically, a user on Windows 7 with IE9 (provided they have a local admin account, automatic updating enabled) would be upgraded to IE10, but that doesn't make IE9 an evergreen browser; Vista users stuck with IE9 cannot upgrade.
Regardless, we are now most definitely in a new age of the web, where developers don't have to worry about supporting ancient browsers and can actually use the new features coming to the web platform. For what it's worth, I drew a line in the sand with a web application at Intel to only support evergreen browsers, and it makes me very happy to say so, having gone through the dark ages of supporting oldIE myself.
Comment: I was at my doctors office a few months ago, and I noticed they had windows xp running. I asked why in the world they haven't upgraded, and they said the medical software company has different licenses for each version of windows and it was a 10k$ program, so they didn't care to upgrade any of their computers.

People have their reasons for not upgrading, however, I think that licenses for software based on OS should be illegal because it forces people to keep things like our medical records on highly insecure computers
Comment: I would not consider IE9 as an evergreen browser, there's too much standing in the way of updates. I am not able to update because i am missing a service pack or something, which i am unable to install. I'm stuck on IE9. Even if i try to manually install IE10+ it complains about the missing service pack.
Comment: @phil That was one example, and it is still going to be an issue until every old computer is running something evergreen.

Next problem OS on the list: Android.
Comment: IE is categorically not an evergreen browser.  Edge is.
Comment: @EricWooley That is an issue in the pre-Windows 10 world. Since Windows 10 is evergreen, app makers cannot tie people to a version; but rather to feature-support. Plus, between you and me, if you are a medical office where doctors make money that looks like social security numbers, and you cannot spend $10K within a 10-year period on technology, technology is not the issue here. Its a people-issue.
Answer: By "Evergreen browser", I mean a browser whereby only the latest version is supported by the manufacturer and most apps that support it.  That said, no version of IE is evergreen. However, Microsoft Edge is evergreen.
To illustrate, if you have a bug or serious-issue, even in the immediate previous version, no developer nor browser-maker will fix it, IF it works fine in the latest and the browser is "Evergreen". You have to update it. On the opposite end,  in like 2014, if you have a bug that occurs in IE 9 but not IE 10, the bug still has to be fixed, since both versions were within Microsoft's date of support (at that time). Microsoft or the developer responsible for the bug had to deal with multiple version of the same browser.
"Evergreen browser" has nothing to do with auto-update. That is just an updating strategy


Time-series clustering Quality Measures

Question: I am clustering time-series datasets which are not labeled (No Ground truth) and I want to measure the quality of the clusters.
Could you please suggest any Clustering performance evaluation methods that can be used in time-series clustering ??
Answer: Clustering evaluation metrics basic goal is to measure the similarity within each cluster and dissimilarity among clusters; if a clustering algorithm has achieved those two things in an acceptable degree than it has performed well.
The most commonly used evaluation metrics are:
-Silhouette Coefficient - it is the most popular one for time-series clustering (implementation for python can be found in tslearn.clustering package)
-Davies-Bouldin Index (implemenation for python can be found in sklearn package)
-Dunn's index
You might find the following articles useful sources to help you understand those metrics:

"Evaluation Metrics for Clustering" in Medium
Article with presentation of Evaluation Metric for Supervised and Unsupervised learning
Explanation of Dunn index and DB index
An example using Silhouette score on time-series clustering

Finally, a more complete collection of clustering evaluation measures can be found in this review.

Time-series clustering Quality Measures


Not able to Pull installed Package metadata(components) using SFDX commands

Question: I have installed package in Scratch org, can someone please tell me how can I pull installed package metadata from Scratch org using SFDX command?
Comment: What are you trying to accomplish?
Answer: You can't "pull" those components, because they are not Source Tracked in the usual manner. You can, however, use sfdx force:source:retrieve -n "Package Name" to pull all available source from the package to your local copy. However, if this is a managed package, you won't be able to see any protected code from the installed package.


How well is Earth's motion through the universe quantified?

Question: If I had a time travel machine that could drop me into any point in space and time, could I accurately predict earth's "position"?  I know position is an improper term.  Would it be possible to know exactly where to land so that you are at the same spot on the surface of Earth as when you "departed"?
Comment: No. The earth would have moved in its orbit around the sun; the sun, in its motion around the galactic center, the galaxy, relative to other galaxies in the cluster to which it belongs, the cluster, relative to other clusters, and other galaxies and clusters would have moved relative to the Milky Way. There'd be no reference points to figure out where in space your time machine would materialize relative to where the Earth would be at that moment in time.
Comment: There is no motion "through the universe". Space is not a thing, it's just a relationship between objects. If objects did not exist, space would not exist either. Motion is always relative to other objects. There is no motion in an absolute sense. So, when you ask about motion, you always have to specify "relative to this planet, or this star, or this rock", etc.
Comment: Relative to what? Since neither position nor velocity are absolute, you need to specify some kind of reference frame. I guess you could use the current position and orientation of your spacetime machine, or the comoving frame of the CMB, but it will be tricky to specify the coordinates of your destination precisely, even for relatively short hops, since the Earth is moving at roughly 369 km/s relative to the CMB frame, and its motion in that frame isn't exactly linear, being composed of various orbital motions (and of course its axial rotation, but at least that's regular and easy to compute).
Comment: Thanks, all.  I understand that position is relative, so I suppose the question would be would we understand well enough Earth's position tomorrow relative to its position today.  Given that we are moving in reference to the center of the solar system, in reference to the center of the galaxy, in reference to our galactic cluster, in reference to the CMB, etc.  Have we quantified all of the points with which Earth is moving so that we could "launch" a spacetime machine forward into time, and know where to place it relative to all of the reference points in the future.
Comment: You only need one reference point to position your machine relative to it, so since we know our position relative to the sun, yes we can do that. The fact that the sun moves relative to a galaxy (and so on) is irrelevant if you can place your machine relative to the sun. But you seem to be asking about whether we can place it in "absolute coordinates" and the answer of that remains unchanged: there is no absolute point.
Answer: Surprisingly, we will soon be able to do this well enough to go back several hundred million years and place ourselves, if not in the solar system, inside the Galaxy and roughly in the right part of the Galaxy.   It turns out that we know, with high accuracy, the Earth's motion with respect to the microwave background radiation, which provides a well defined frame of reference for motions.  Therefore, we will be able to work out which direction and about how far the MW has moved with respect to this universal frame and separately the Earth with respect to the center of the galaxy. It requires solving for the growth of what is called the 'microwave dipole velocity' over time.  Some of this velocity develops from nearby objects like the MW and the nearby groups of galaxies.  So, we need to know their masses and relative motions a bit better than we presently do.  But, by far, most of the velocity is from objects quite far away, and this allows us to use the simpler and well understood 'perturbation' techniques. The biggest uncertainty for the Earth's position might be the interactions with local stars back in time and what effects they had on perturbing the Suns orbital motion about the center of the galaxy.  Again we need to know better the masses of local stars and their relative velocities to calculate the Earth's trajectory back in time.  As it happens, the space telescope GAIA, which is about to make its second release of data, will greatly improve our knowledge of the motions and, indirectly, the masses of all these stars and nearby galaxies.
So, if you have got that time machine working, we are nearly ready to go!
Comment: "We will soon be able to..."; what is the source of this extraordinary claim? Millions of years, perhaps, but not an entire Galactic rotation. The Gaia census does not include every object in the Galaxy.
Comment: thanks!  I feel I'll have to wait on the launch until we can at least land in my home solar system.  is there an estimate on how far back one could go and position yourself on earth, if not earth's surface?
Comment: CMB Dipole: Speeding Through the Universe: https://apod.nasa.gov/apod/ap140615.html
Comment: @RobJeffries: GAIA will observe a large fraction of stars on this side of the Galaxy.  No object outside of that region could have had a near fly by with us for several hundred million years because they are too far away and everything at our Galactic radius moves at roughly the same speed $\sim \pm$ 20 km/s.
Comment: @MichaelJames:   Well, I was optimistically thinking we could go back a billion years with an accuracy of a tenth of the galactic center (3,000 ly).  The size of the solar system is 10 light hours.   So, to hit the solar system one could go back $10*3600/(3000*3.1 \times 10^7) =  2 \times 10^{-7}$ of a billion years, which is $\approx 400$ years.
Comment: Gaia won't observe "a large fraction...". More like 1%. 2nd point true. 3rd point not true. If all you are contending is that we will be able to estimate the solar system Galactic motion sufficiently to estimate a rough Galactic radius and azimuth after 100 million years, well ok. But even that supposes we won't encounter a molecular cloud or cluster that has not even been formed yet.
Comment: A billion stars is 1% of the stars in the Galaxy, but it is a large fraction of the stars nearby.  The fraction goes up as distance decreases.

How well is Earth’s motion through the universe quantified?


How to remove my Birthday from my calendar

Question: How do I remove my birthday from my Google calendar?
Answer: You can try to remove the birthday from your entry in your Google Contacts.
Unfortunately, Google requires a setting in My Account to control access to certain age-restricted material. (See also Google Support.)
You can, of course, control who can see that from your About Me page.


How do I know which Difficulty I chose in Witcher I?

Question: I thought I started a game on hard, but the game seems too easy. Is there any way to tell which difficulty I am playing?
Comment: [Related 1](http://gaming.stackexchange.com/questions/12069/how-can-i-change-the-difficulty-during-the-game-in-the-witcher), [Related 2](http://gaming.stackexchange.com/questions/23591/change-difficulty-to-hard-in-the-witcher)
Comment: these are related only in sense thats it's about witcher difficulty.
Answer: You shold be able to tell based on how the game cues you for attack combos.  On easy, an icon appears as an indicator of when to click to continue the combo, and the times are extended.  On medium, the icon still appears, but the times are shorter.  On hard, the only indicator of when to click to continue the combo is a distinctive sound effect, and a blue sword trail rather than the orange one that appears during the initial hits of an attack.  So if you aren't seeing any indicators other than those, you are on hard.
Unlike Witcher 2, which is apparently famous for its difficulty, I played through the first game on Hard difficulty with minimal trouble, so you are likely on the correct level even if it does feel "too easy".
Comment: @Hurda If you read strategy articles about him you'll see that stunning him is usually the strategy they recommend.  It doesn't always work, so it sounds like you just got lucky.
Comment: My brother told me, that Hell Hound boss at the ned of first chapter should be tought, but I killed it on first hit because I stunned it with the first sign. that confused me, but i dont have cursor icon indicator  cahnge so it¨s on hard.


Maximum Entropy Distribution When Mean and Variance are Not Fixed with Positive Support

Question: I know when the mean and variance of $\ln x$ are both fixed, then the maximum entropy probability distribution is lognormal. When the mean of a random variable is fixed the MEPD is the exponential distribution. My question is, what is the MEPD in the continuous case when neither the mean or variance are fixed with support on $[0, \infty)$?
Comment: Probably Gaussian noise which has a normal distribution. Does Burg's maximum entropy theorem apply to your case?
Comment: If you fix nothing, are you searching for the extrema of $H[p]=\int -p(x)\ln p(x)dx-\lambda(\int p(x)dx-1)$?
Comment: I thought you would just be maximizing this: H[p]=-∫p(x)lnp(x)dx but I could very easily be wrong I am not incredibly familiar with the process of obtaining the MEPD
Comment: I wrote an answer which considers the discrete case: I think it is a good starting point to get some insights.
Answer:
Discrete case

In the discrete case you need to consider the functional
$$H[p]=-\sum_{i=1}^n p_i \ln(p_i)+\lambda(\sum_{i=1}^n p_i-1)$$
as we consider a single constraint.
Setting $\frac{\partial H[p]}{\partial p_i}=0$ for all $i=1,\dots,n$ we arrive at
$$-\ln(p_i)-1+\lambda=0\Leftrightarrow p_i=e^{\lambda-1}.$$
Imposing $\sum_{i=1}^n p_i-1=0$, one gets
$\lambda=1-\ln(n)$, or $p_i=e^{1-\ln(n)-1}=\frac{1}{n}$.
In summary, the wished distribution is the  uniform probability distribution.

Continuous case

The continuous case needs more care, due to non trivial integration range.
We want to maximize the functional
$$H[p]=-\int_{0}^{\infty}p(x)\ln(p(x))dx+\lambda(\int_{0}^{\infty}p(x)dx-1), $$
where $p$ has support $[0,\infty]$ and $p(0)=p(\infty)=0$. We apply the calculus of variations by considering any distribution $\phi$ s.t. $p(0)=p(\infty)=\phi(0)=\phi(\infty)$. We compute the variation
$$\frac{\delta H}{\delta\phi}|_{p}=\lim_{\epsilon\rightarrow 0} \frac{H[p+\epsilon\phi]-H[p]}{\epsilon}=\lim_{\epsilon\rightarrow 0}\frac{1}{\epsilon}\left[\int_{0}^{\infty}\left(F(p+\epsilon\phi,x)-F(p,x)\right)dx+
\lambda(\int_{0}^{\infty}\epsilon\phi dx)\right],$$
where $F(p,x)=-p(x)\ln(p(x))$ and $F(p+\epsilon\phi,x)=-(p(x)+\epsilon\phi)\ln(p(x)+\epsilon\phi)$.
Using
$$F(p+\epsilon\phi,x)-F(p,x)=\epsilon\phi\frac{\partial F}{\partial p}(p,x)+O(\epsilon^2)$$
we have
$$\frac{dH}{d\phi}|_{p}=\int_{0}^{\infty}\left(\frac{\partial F}{\partial p}(p,x)+\lambda\right)\phi dx$$
where $\frac{\partial F}{\partial p}(p,x)=-\ln(p(x))-1$. In summary
$$-\ln(p(x))-1+\lambda=0 $$
or $p(x)=e^{\lambda-1}$, with $\int_0^{\infty}e^{\lambda-1}dx=1,$ which is not possible.
Roughly speaking, the absence of additional constraints like the fixed mean one
$$\int_{0}^{\infty} xp(x)dx=\mu$$
does not allow to arrive at "more interesting" differential equations for $p(x)$. Note that the $F$ does not depend on $p'(x)$: this leads to the simplified Euler Lagrange equation
$$\frac{\partial F}{\partial p}(p,x)+\lambda=0.$$
Comment: Sorry I should have clarified that I am searching for the continuous case. again my one constraint is the support is [0,+∞). Upvote for the attempt and my miscommunication though.
Comment: Support of the probability distribution, am I right? I can add some details to my answer. Thanks for the clarification.


Knowing what time to observe a constellation

Question: Suppose you observe a particular constellation at 11 PM on a particular day at what time will you need to observe 2 months later to find the constellation in the same position as in the sky chart?
Comment: 2 hours earlier per month?
Comment: You might find this rise and set graph useful.  It shows the rise and set time of various objects, including constellations: https://www.celestialprogramming.com/riseandsetgraph/index.html
Answer: The constellations will (apparently) rotate once through the sky in a whole year. Thus every month it changes by 30°, if you keep observation time fixed.
Similarily, Earth rotates and the sky (apparently) rotates once 360° in 24 hours or 15° per hour.
Thus for every month in the future from now, you will have to observe two hours earlier to get a nearly identical view on the sky.
Things get more tricky if you want to take into account ellipticity of the orbit, etc.
Comment: @notovny yes! Thanks for the pointer. I wondered... but without tea I didn't see my mistake.
Comment: Given that there are only 12 months in a year, that should be 30° per month, and two hours earlier each month.


How do I optimize my large grass system to render quicker?

Question: I'm working on an animation which has a lot of natural landscapes, and I'm using a particle system to generate grass (Models that come with the Graswald addon). These frames take a long time to render and the process pretty untenable for a longer animation. Is there anything for hair/particle system which works in the same way as adaptive subdivision works for displacement? That is, render the grass which is up close with more detail and gradually tone it down the further it gets away from the camera?
Answer: I think the best way would be to have very low poly grasses with very low Res textures. But it's not very evident. In my knowledge, at the moment, there is not the equivalent of adaptive subdivision for the hair particle.
On the other hand, I noticed that former versions of Grasswald used less graphic-card memory, than newer, in rendering but it uses still more memory than low poly particles you can model yourself. To go further, the last Grasswald version has an adaptive weight painting depending on the camera's fieldview. But it doesn't works with videos because, when you change the weight painting, the particle system will randomly change each time you change this weight-painting. That's to say if your camera make a travelling, the particle system would randomly change on each frame.
I will make my video but only with grass micro-displacement texture (with adaptive subdivision) instead of any particle system.
Comment: Thank you for your editing, i'll try to do better next time !


TxPool size on public BSC node

Question: Something happened to BSC public node(https://bsc-dataseed.binance.org/), and I am confused.
I usually call this BSC public node to get block transactions and content of txpool. Average number of transactions that txpool contained was around 500 , but last fey days I receive from 0 to 30 transactions. Since BSC is recording ATH number of transactions, txpool should contain more transactions than ever, right? I don't understand what is going on? Does anybody know?
Thanks!
Answer: You should your private node with websocket connection to subscribe the Txpool message. That will behave as what you expect.

TxPool size on public BSC node


How to use Particle Swarm Optimization for finding hyper-parameters of Support Vector Regression?

Question: I want to use Particle Swarm Optimization (PSO)for finding hyper parameters of a support vector regression problem. Initially I tried to find the same using grid search method,but the Matlab code is taking too long to produce results. Even after reading a lot on PSO, I am still not clear on how to apply it. Can anybody help me understand or  refer me to some Matlab code that shows how step by step PSO can be used in my case.
Answer: You can use Optunity, which is an open source library specifically designed for hyperparameter search.
Optunity's default optimizer is (standard) particle swarm optimization within prespecified box constraints. The software has a fully functional matlab interface. An example of optimizing LS-SVR parameters in MATLAB is available here.


How to combine multiple shape keys into a single shape key

Question: The other day I was working on a game object that had four shape keys and i was asked to combine all the four shape keys into a single shape key by a unity developer, I tried everything I could But I could not seem to find the solution. It was still showing four shape keys when exported into Unity. And i cant make the key frame animation with each shape keys because it shows a little pause in between each shape keys. In maya if we check the   "in between" box we can merge all the blendshapes into one. Is there any option like than in Blender?, I tried turning relative off but it did not work. Hope you guys can help, Thanks in advance.
Answer: There's a New Shape from Mix function, is it not what you want? Push all the values of the desired shapekeys as much as you want, then click on the down arrow and choose New Shape from Mix, which will create a brand new shapekey that will be the mix of these shapekeys:
Comment: I tried that, but it will still show all the shape keys when exported into Unity. I tried deleting the previews keys after i created a new key from new shape from mix, If i do that the mixed shape key won't work.
Comment: Also, when i create a new shape from mix it basically combines all the previews keys into a single one, but it changes the mesh all together, what i want is a single key that has all the shape keys so when i slide from left to right the deformation should happen one by one and not all together. Also thank you for spending your time and answering me.
Comment: You say that if you delete the previous shapekeys then the mix doesn't work? That's weird, you must have be doing something wrong. Also if you slide from left to right it will play the selected shapekey from 0 to 100%, and it will add the previous shapekeys if they are enabled as well, this is how shapekeys work, and anyway what you're trying to do is something in Unity, it's not clear what's missing in Blender. Maybe bring some more details in your original question because New Shape From Mix indeed mixes all the shapekeys into one.
Comment: If you want to switch from a shapekey to another you can disable the Relative option and play with the Evaluation Time value but I'm not sure that it's what you want, plus it has nothing to do with Unity.
Comment: @Dany -- when you say "should happen one by one", do you mean you want to see the first shapekey's deformation from shapekey value 0 to 1/3, then return to basis, then the second shapekey's deformation from 1/3 to 2/3, then return to basis, then the third shapekey's deformation from 2/3 to 3/3, or am I misunderstanding?
Answer: I have exactly the same problem. My goal is to import to Unity game object with one slider that can morph into 3 different shapes.
The Blender shape key system allow to morph into only one target by moving vertices towards only one direction (set the range to negative only move them in the opposite way).
Some Blender users have found a way to merge sliders into one like in Maya, but this solution use Blender's drivers, that doesn't work outside Blender...

My only solution for now is to export all the deformations to Maya,
and create blendshapes from there.

I would like to know if there's a solution that's doesn't require to switch to another software, and that's work when exporting to Unity.


Moving from Math to Economics

Question: I have an undergrad degree in math and philosophy, and was wondering whether it would be possible to transition to economics for a PhD. With respect to economics classes, my transcript only has the intro to macroeconomics and microeconomics AP course sequence from high school. However, I have taken advanced courses on political economy (seminar on Smith and Marx through the political science department), utilitarianism, formal epistemology, real analysis, complex analysis, probability theory, linear algebra and Multivariable calculus. I also have work experience in securitization and have spent a bit of time self studying bond math, game theory, as well as macroeconomics more broadly, mostly as relates to my work. Would I be at all competitive for a PhD program in economics? I'd probably want to do work in either asset pricing or choice theory.
Comment: Does this answer your question? [Will an undergraduate math or economics degree better position me for a top economics PhD program?](https://academia.stackexchange.com/questions/131001/will-an-undergraduate-math-or-economics-degree-better-position-me-for-a-top-econ)
Comment: Being aware I will throw on myself the ire of many economists, from math to economics it's a really easy and interesting path.
Economics is still getting out of its crysalis of "religion-like" science and slowly getting into real science.  But it is heavily influenced by politics (necessarily so, by the way). What you are looking into (asset pricing, for example) is finance, there your degree in mathematics is even more worthwhile but you have to sell it well (i.e. try to do at least an internship or collaborate/volunteer for some startup somewhere in the finance world).
Answer: Economics has become a very mathematical/quantitative discipline and a strong mathematics background is likely an advantage for applicants. In the Economics PhD programs (both faculty in an R1 economics department and as a graduate student) I have experience with, incoming students with Bachelor's degrees focusing on math are very common (Economics is the most common, you also see statistics and computer science majors as well).
You should read PhD program descriptions and admission guidelines to make sure you have a sufficient background. Most programs will require (or strongly encourage) you've taken classes through intermediate micro- and macroeconomics. Some additional economics field courses are viewed favorably, but not as strongly as demonstrating a solid mathematical background. Most top programs will only consider students who've taken undergraduate courses in multivariable calculus, real analysis, and some form of probability/statistics/econometrics. Empirical economists and even economic theorists do a large amount of computerized analysis, so coursework or work experience that demonstrates programming competency is also beneficial.
Based on a comment, if you haven't taken formal courses in micro- and macroeconomics it would be good to shore up that part of your transcript, some formal economics training is an important signal for a PhD. You have a few options:

Take core economics courses as a non-degree student. This would let you take just the courses you need. Many universities offer these courses on a variety of schedules. Online options are available but you should be sure to use a high-quality program.

Enroll in a terminal MA in economics. This would cover the courses you need and let you take a few other field courses in your area of interest. This will be expensive (most MA degrees are not funded) and take 18 to 24 months.

Work for two to three years as a professional economic analyst perhaps at a consulting firm, think tank, or government agency.

Finally, you mention that you may be interested in asset pricing, so I'll add you may want to broaden your search to Finance programs as well, which are often housed in business schools.
Comment: Thanks for your answer! The only thing I'm really worried about is the fact that i have 0 econ classes taken in college. My GPA is a 3.9 and I got As in every class I listed, including real analysis, complex analysis and linear algebra. I think I have the quantitative background, moreso worried about the lack of a big picture/conceptual background in econ.
Comment: @NotAPlane I added a bit to address your situation. Hope it helps!

Moving from Math to Economics


Best way to convert a voltage output from a circuit into graph software

Question: Looking to convert a voltage output from a circuit in order to show a voltage/time graph. From my knowledge I would have thought the best way to transmit the data would be to use the mic input on the computer because it would just be a series of pulses (specific circuit) or something using a USB interface. Can anyone guide me or have any better ideas?
Comment: A DMM with a computer interface.
Comment: I thought for a moment you were asking how to look at a voltage waveform and transmute this information into the generating circuit (the 'convert' keyword). Alas, the question is not quite so outrageous. Most scopes can do this for you out of the box (sample and store waveform data).
Comment: Try googling "strip-chart recorder software"
Answer: The line-in and microphone inputs certainly can be used as a recording interface to the computer. The only difference physically between the line-in and mic inputs is their sensitivity; line-in can take about +/- 0.5-1.5v, where mic input can be much less than that, down to +/- a few millivolts depending on how much "boost" is added by the computer. The mic input is also much noisier when the boost is increased, leading to "jitter" in the sampled data.
If you're handy with application coding, consider that a recorded .WAV audio file is nothing more than a raw, 16-bit precision, 2-channel data, sampled 44,100 times per second. 16-bit meaning each one of the samples have a range of 2^16 bits or 65535. The tricky part is that the data is signed, meaning it ranges from -32768 through 0, to +32767. A good example of the actual contents of a .WAV file can be found here. So some fairly straightforward conversion and scalar math is needed to linearize the data if desired. Then it's just a matter of getting that data into visual form. One way would be to convert/export it as a .csv (comma-separated values) file. Most spreadsheet applications can read these, and fairly easily chart the data beautifully. Of course, for the more astute programmer, it's possible to code an entire application and draw directly to the application window.
But there are a few more things to consider about the hardware. Use a large-ish inline cap to block DC, and a recorded value of zero will always be no signal... but then it will have poor DC measurement characteristics. A more practical approach would be to build an op-amp front-end, where you can apply or remove a DC offset from the input signal, as well as scale it to fit in the window of what the soundcard can accept. Then add a switch across the cap, to DC-couple the source, and presto, you almost have a very basic oscilloscope.
This is pretty close to the idea of a "soundcard oscilloscope", and there are a lot of articles of others doing such a thing, such as this.
It may be a great hobby project, but of course it will not compare to the precision, performance, and reliability of any real oscilloscope. Some will tout fantastic characteristics, but trust me, they always fall short of the real thing. If you have more than a passing interest in electronics, you'll want to get a real oscilloscope. eBay can be a great place to find a bargain, but do ask someone knowledgeable before you buy anything. Dave over at EEVblog has lots of oscilloscope reviews, and can (quickly?) get you up-to-speed in all the features and terminology.
Answer: Most of the modern Digital Storage Oscilloscopes (DSO) can record and store a voltage waveform as files into memory devices with USB interface.
If you don't have access to a DSO, then an ADC + microcontroller can help you to store/transmit the data.
A circuit simulator can give you the graph if your circuit and inputs can be simulated.


Diffusion of miscible fluids

Question: I was trying to model experimentally the interdiffusion of two miscible liquids. Is there an optical method to find out the extent of diffusion; the addition of fluorescing agent into any of the two fluids would work, but will it not influence the diffusion process by changing the chemistry of the fluid itself?
Comment: That's the dilemma of most measuring - added unwanted change...
Comment: I hope my answer helped and welcome.
Answer: if the refractive indices of the two fluids are different, you may be able to use a diffractometer to measure the extent of the diffusion.
Comment: Just curious,  If the amount of fluorescing agent added is very less, would epifluorescence microscopy measure the diffusion coefficient of fluorescing agent or of the fluids ?
Comment: I do not know. are the refractive indices of your two fluids different, or the same?
Comment: Yes the refractive indices are different and diffractometer can be used.
Answer: Have 2 color dyes with a 0 reactivity like yellow and blue. Once you have ideal diffusion it should appear green. Liquid steel a type of glue that you have to kneed to activate and are composed of 2 halves of white and grey. When mixed properly there would be no visible traces of either color but a solid light grey.
When dealing with transparent liquids a color chart of can be made to cross reference if you need more of one or the other fluid.
Consistency of the dye is important but can be tested before use by measuring the weight of the dye and how much it changes the liquid's color.

Diffusion of miscible fluids


I am thinking about changing my drivetrain to a 1xN. Do I need a new chain?

Question: I am think about changing to a 1xN drivetrain, and I was wondering if I needed to change the chain as well.
Comment: Are you using new cassette and chain rings, what speed from and to, and how old is you chain?  What drive train are you changing from and  cassette size and chainrings (e.g.  old = 22,32,42 + 11-36 to new = 32 + 11-50).   - Answer will be "yes you need to" or  "chains are cheap, yes you should".
Comment: I think we need more details; if your new set-up involves even just a new cassette I think most would recommend a new chain as a matter of course.
Comment: If the "1xN" drivetrain has a new or even gently used chainring or cassette, a new chain is the best practice.   Running an unstretched chain (like a new one would be) adds longevity to the functional lifetime of these aspects of the drivetrain.
Answer: Assuming you are buying and installing new chainrings or cassette, and the chain is used then yes, because (1) it is cheap, and (2) a worn chain will wear new gears faster, and (3) if the chain wear is significantly off from the gears the chain can skip under load which can be a safety hazard.
The chain is generally the least expensive part of the drivetrain. If you are installing a new chainring or cassette, you are probably already investing a significant amount it the new set up, probably a new chain will be a small part of the budget.
Importantly, the chain will wear over time and effectively stretch out. So the distance between the pins will increase. Fewer teeth will take more of the load as the chain continues to wear. This wears the teeth of the gears and the chain faster, as the load is increasingly concentrated on fewer points of contact. You can tell if the teeth are worn by looking at them usually, but you need a tool to measure chain wear.
A worn chain will not match as well with the gears as a new chain (same for new chain and used gears), and will accelerate wear on more expensive components. In the worst case the chain will slip entirely from the gears. Considering the price of new gears and the expectation that the new drivetrain lasts as long as possible, it probably makes sense to get a new chain if upgrading any other drivetrain components.
If you're not sure how worn your chain is it might be worth it to ask a shop to measure it for you and give you a recommendation based on that, or better yet pick up a chain measuring tool at the bike shop and then you can measure the chain any time want, and really optimize the lifespan of the cassette and chainrings.
Comment: Wait so if I replace my 2xn chainrings then I would have to replace my chain and cassette?
Comment: Because I don't have the tools to remove the cassette on my bike rn
Comment: Not necessarily. It depends on how worn they are and how much you want everything to match perfectly. But if the chainring is significantly worn (shark-tooth looking teeth for exmaple) and you are replacing it with a new one then yes it is best to also replace chain and cassette for the same reason.
Answer: As others have mentioned, if your chain is worn out yes.
But most importantly:
If your conversion involves a change in the number of gears of the cassette (which is the majority of the case), you'll need a new chain anyway. Chains are designed for a given number of gears on the cassette, you can't use a 10-speed chain on a 12 speed cassette.
Another reason is that the chain length can change: if your bike has for example a 2x with 36/22 chainring in the front and an 11/36 cassette, you will need a longer chain if you upgrade to a 32T chainring (or bigger) and a 11/51 cassette(around 20 additional links, so that not insignificant).


Was the sprouting of seeds for food production known in Europe before 1800?

Question: https://en.wikipedia.org/wiki/Sprouting
Was this not known in Europe?
Comment: Why do you believe that it wasn't?
Comment: Because i found no reference to it - dit you?
Comment: You've simply been searching for the wrong term - see my answer below.
Comment: There is a reason the terms differ - see my answer below.
Comment: @HannesH Something seems to be missing - did you forget to post your answer?
Answer: Beer is made by fermenting a malt (or mashed grain) such as barley. The process of malting begins identically as that of preparing sprouts for food, except it is then halted by drying.
Since beer-making in this way has been known to European and Middle Eastern cultures for thousands of years, then the process of sprouting was also known  to those same cultures.
Comment: @HannesH: Beer ***is*** a food. One that is high in Vitamin E, just for starters.
Comment: @PieterGeerkens beer is a food as in : a balanced diet is a pint in each hand ...
Comment: Sure, but i am asking for sprouting for food production. Malting is a technique to make weeds that farmers had in the first place (and could have eaten anyway) into a source of sugar needed for alcohol production. I don't know of any refernce to this beeing a technique to produce a new kind of food (which in Asia, it was).
Comment: @HannesH: Besides which - I'd rather have beer than sprouts anytime, any place. Not everyone enjoys them.
Comment: Yes, "The beer is a liquid bread of the Czech Nation" (citation from "Adela hadn't had her dinner yet"). And the direct use for food only had not sense - sprouts has less calories than grain.
Answer: An example of solid food made from sprouted seeds is the Finnish speciality of mämmi/memma, which is made from malted rye and traditionally eaten at Easter. It seems to be attested since at least the 18th century (source in Finnish, I used Google translate).


Is it safe to put (3)DS Game Cards in your pocket?

Question: Is it safe to put (3)DS Game Cards in your pocket, or will they break? (I mean, without any sort of protection)
Comment: It would depend on the size of the pocket, what else is in it, and how much stress you put on it with everyday movement.  Loose pockets will probably be fine, as long as you don't sit on them.  Tight ones, though, might break it, or dig into you.
Answer: As fbueckert commented, there are a few factors with the pocket itself. However, as quoted in this article, Nintendo's President and CEO Satoru Iwata has had Nintendo design their handhelds with possible damage from a child's carelessness in mind, so the cards are designed to be durable. In my experience, my DSi has suffered more from being in my pocket than my games.
As long as the games aren't getting exposed to very high temperatures, the metallic contacts aren't getting damaged, large amounts of pressure aren't being applied, and they aren't getting drenched in liquids, your games should be fine. It doesn't hurt to keep them in a case though, as they are designed to add another layer of protection, in case of those freak accidents.
Comment: And whatever you do, don't forget that it's in your pocket and let it go through the laundry.


Java static and non-static variables in the same class

Question: I need some help clarifying static and non-static variables. It is my understanding that static variables have the same value across all instances of a class. However, suppose I have a mix of static and non-static variables in the same class. When I reference a static variable, regardless of which instance is used, I will get the same value? Yet when I reference a non-static variable I will get the value associated with that particular class? That seems like a memory management nightmare. Is this really how it works and how is static memory handled? Are multiple copies of the variable created in each instance and then somehow sync'ed or is a reference by address created in each instance? Are there any pitfalls using a mix of static and non-static variables in the same class? TIA.
Comment: `When I reference a static variable, regardless of which instance is used` -> you do not need (and shall not) use an instance to get the value of the static variable. You should rather get its value with this syntax : `YourClass.YOUR_STATIC_FINAL_VARIABLE` for example. As you can see, there is no need for `new YourClass().something`.
Comment: Thanks but that reply is not what I am doing. I use 'myclass1=new MyClass(); myclass2=new MyClass();'. Then I reference the static variable as 'myclass1.something' or 'myclass2.something' and expect them to have the same value. Meanwhile, 'myclass1.somethingelse' and 'myclass2.somethingelse' would have different values. That is what I am trying to verify and to know if there are any pitfalls doing that.
Answer: You are correct in your assertion ... sort-of.  Statics aren't really shared between instances of the class because you don't need a class instance to reference one.
public class Foo {
   public static String MYSTRING = "test";
}

can be accessed without an instance of Foo
String localString = Foo.MYSTRING;

I wouldn't really worry much about how the JVM chooses to store the memory references for the static variables, that is an implementation detail that is delegated to the JVM designer.
There aren't any pitfalls to having a class that defines both static and non-static (instance) variables, it happens all the time and is perfectly natural ... as long as you understand how statics work, which it seems that you do.
Comment: Thanks. I thought that was the case but just needed the warm and fuzzies.
Answer: Taken from OCA Java SE 7 Programmer I Certification Guide: Prepare for the 1ZO-803 exam:

STATIC VARIABLES
static variables belong to a class. They are common to all instances of a class and aren't unique to any instance of a class. static attributes exist independently of any instances of a class and may be accessed even when no instances of the class have been created. You can compare a static variable with a shared variable. A static variable is shared by all of the objects of a class.
STATIC METHODS
Static methods aren't associated with objects and can't use any of the instance variables of a class. You can define static methods to access or manipulate static variables
You can also use static methods to define utility methods, which are methods that usually manipulate the method parameters to compute and return an appropriate value
The non-private static variables and methods are inherited by derived classes. The static members aren't involved in runtime polymorphism. You can't override the static members in a derived class, but you can redefine them. Any discussion of static methods and their behavior can be quite confusing if you aren't aware of inheritance and derived classes.
Answer: Static variables are the same throughout the program, since they are not instantiated. This is indeed the whole point of having static variables. They are not "somehow the same value", they are the same value because they are never instantiated and there's only ever one static variable of the same name from the same class during run time.
Answer: I don't know the 'memory logic' behind, but I've created an example
public class TestClass {

private static int a = 1;
private int b = 1;

public static void main(String[] args) {
    TestClass firstInstance = new TestClass();
    TestClass secondInstance = new TestClass();

    // 'a' shouldn't be accessed like firstInstance.a, use TestClass.a instead(!)
    System.out.println("firstInstance  a: "+firstInstance.a+" b: "+firstInstance.b);  // firstInstance  a: 1 b: 1
    System.out.println("secondInstance a: "+secondInstance.a+" b: "+secondInstance.b);// secondInstance a: 1 b: 1

    firstInstance.a = 2;
    firstInstance.b = 2;

    System.out.println("firstInstance  a: "+firstInstance.a+" b: "+firstInstance.b);  //firstInstance  a: 2 b: 2
    System.out.println("secondInstance a: "+secondInstance.a+" b: "+secondInstance.b);//secondInstance a: 2 b: 1
    //a is now 2 also for 'secondInstance' because it's static, secondInstance.b didn't change because b exists specifically for each instance

    /*
     * You can access 'a' even when no instance of TestClass exists
     * think about a simple Dog class where the amount of legs is 4 for every dog, so you can make it static,
     * but not every Dog has the same name, so it wouldn't be clever to make the name static
     */
}
}


Where Do I Go To Find All The ScriptContexts Feilds and Functions?

Question: Hi im getting lost in the documentation, I have found some things I was looking for but am failing to find the info and functions for script contents. Im using this link https://playground.plutus.iohkdev.io/doc/haddock/ where should I look in here the docs are pretty long.
Answer: here it is: https://playground.plutus.iohkdev.io/doc/haddock/plutus-ledger-api/html/Plutus-V1-Ledger-Contexts.html
a little hint to use the docs:
usually when I'm searching for some module I press Ctrl+F (for "find") and type for some module I'm looking for.
in this case by going to https://playground.plutus.iohkdev.io/doc/haddock/ I just pressed Ctrl+F and searched for "Context"
pro tip
on modules-specific pages you can use the same trick with functions type signature
as an example say you are searching for a function that gives you back the total value spent but you don't remember the name
just press Ctrl+F and search for something like -> value

the search is NOT case sensitive

to quickly find all the functions that do return Values
Comment: Yeah I asked because I got something weird using ctrl F but that's for another question
Comment: Try searching with just `S`


How to tell if a metal basement window frame is structural?

Question: I have those old steel basement hopper windows (see post1 and post2 for example pics).  Rather than add storm windows to them, an option to explore is to replace them.  There's plenty of questions about this and some people caution that the steel frame may support stuff from above (acts like a header) with little explanation of why.  Well, I'd like to know why.  So, I'm asking WHAT makes a steel window frame structural (or not)?  Is it the size, proximity to the sill plate, thickness of the steel, etc.?
Comment: A Picture of your window frame will help, but unless it is very heavy steel, it probably is not structural/load bearing.  Most window frames are made to fit into a hole in the wall.  Having a window in or not is usually more to keep the bugs and cold air out, than to hold up the house.  Glass does not like pressure/weight on it.
Comment: To be clear, I'm not asking about my particular frame.  I'm looking for information about how people tell if a frame is structural or not.  Hope that  clears things up.
Comment: Just to confirm, you are asking about the window frame that the glass sits in.  If the hole that a window frame fits in is made from heavy(inch plus) steel or I beams, that is probably structural.  The steel/metal frames that some windows are made with are not structural(except for the window).
Comment: I'm asking about the window frame, not the sash that holds the glass.  When you say inch thick steel, are you referring to width, or thickness (and it sounds like an answer).
Answer: I know of no type of window frame of any material that is structural, with one exception. That being structural steel and glass panels when used in building construction As seen here:
Or here:
Since your basement window is not like these, I think you are safe to replace them. The concrete wall with a lintel over each window supports the load.
Comment: I did not say METAL frames are not structural. I stated that Window frame material is not structural.  As it is the Frame for the glass and not intended as support for another part of the structure.  Having a window frame as a structural component in a residential dwelling would be grossly unusual.  This is common sense and should not need to be stated.
Comment: Interesting.  I'm curious, could you elaborate why metal frames aren't structural?  For example, is it because they're aren't beefy enough, or because it's a code violation, or maybe "it simply was never done that way"?
Comment: Sorry, but you took me too literal.  My post is about metal WINDOW frames.  Excuse me if I left out the word "window" in my comment.
Comment: Window frames are not structural because that would make them unnecessarily expensive and hard to service. In wood, they are framed around. In concrete, a plate may be placed above them to bridge the opening and transfer force. Metal or not.


What is an Ethereum address?

Question: I am being asked to enter my Ethereum address, but I don't know what to put there and I already created an Ethereum account.
Comment: Would you clarify how your account was created, e.g. from a particular client (geth, parity, etc.), or from an exchange, or hardware wallet, etc.
Comment: When you find your address, and come to enter it, try not to enter it by hand. If you can, copy+paste it. That way you'll lower the chances of making a mistake.
Answer: Ethereum address is a sequence of 20 bytes which are calculated from public key by performing this algorithm:
<code>addr=right(keccak256(pubkey),20)
</code>
After the computation, addresses basically look like this:

0x09438E46Ea66647EA65E4b104C125c82076FDcE5

What is an Ethereum address?


How do I display a Taxonomy Term Description to a view in D7?

Question: I would also like to know how to display a custom field that you add to taxonomy terms.... D7
Answer: You will have to add a relationship to include the term data for the content(?) you are listing – then the term description will be available as regular View fields.
You can check out Learn Views with NodeOne, part 11: Relationships for a quick video on managing relationships.
Good luck!
Comment: Thanks! The taxonomy terms description and other fields did indeed show up. Thanks!


Knowing about Sensor Film Kit

Question: I am very new to this site and this is my first ever question. I want to know what is this black material in this sensor film kit. I am creating a weight sensor by using this very sensor kit. Now I am short of this black film. I want to purchase it now locally but do not know the composition of this material.
This material behaves as a resistance between two aluminium foil, just to inform.
If any one can help me in this.
Comment: This really should be on the electrical engineering section. // I don't know what specific material this is, but Google "Conductive foam" and you should find some. The resistance changes as the foam is squeezed.
Comment: @Max In this case I agree that it would probably better fit another site. But I am only one. Before asking to migrate something it would be preferable if the question is closed by the community. Then I will research if it is a good fit for the target site. Still, thank you for your effort.
Answer: It's called a force sensing resistor. It's basically a film of small conductive particles mixed into a non-conductive polymer matrix on top of a conductive substrate. The more force on the film, the more conductive particles can touch the layer underneath, reducing the resistance. Sensitronics owns the original patent for the technology and their site shows how they're constructed, though you'll probably have to dig up the patent to find out exactly what's in the force sensing layer.

Knowing about Sensor Film Kit


HUD states - current or database based

Question: Does poker tracking software like HEM generates HUD states about my current opponents at the table based of current game, or are the states generated from database(all the game I played with those opponents)? Because some opponents for example can have low VP$IP based on on my longterm database records but can change style of their play in current session. So I could think that they are playing tight but they are actually loose in current game.
Answer: Typically these programs will generate their stats based on a long term collection to maximize the sample-size (and thus overall accuracy) driving the information. All decent HUD programs will include the option of displaying how many hands the information is based on, which can lead you to determine whether it is long-term or current-session. In many of them, you can also configure specific filters so that it only shows hands from a given timeframe, or with a certain range of numbers of players at the table.
If your program of choice lacks some of those options, you may want to consider switching to a new database periodically to avoid relying on outdated information. That said, generally more hands behind the information you are using leads to better accuracy and thus better results.
Comment: As Jeffrey says, most well known database tracking software will allow you to customize the information displayed. Filtering hands for specific cash limits, tournament blind levels, enabling "tool tips" to display the total and current session stats are all useful, but are heavily dependent on volume of hands tracked. Personally, if I have 250 hands on an opponent I should have picked up some exploitable information by then. Also, playing a session without a HUD occasionally, but regularly, is a good way to learn what the most useful information is that you may have overlooked.

HUD states - current or database based


Can invalid thread handles in C# be a sign of unmanaged memory corruption?

Question: We have a C# service that has started failing in very odd ways around thread handles. Specifically calls to EventWaitHandle.Reset, ReaderWriterLock calls, and other similar threading calls are randomly blowing up with Invalid Handle errors deep in the stack. These are calls that are definately supposed to work. Could this be a sign of memory corruption? If so we're a bit confused how this is the only symptom and not crashing. We have COM objects with C++ code where we do HeapFree's, and also have some managed code calling into FreeHGlobal so are suspicious. Has anyone experienced anything like this with problems manifesting themselves seemingly localized to thread primitives?
Comment: Do you have a small but complete code sample that reproduces the problem?
Answer: I've not seen this particular symptom. But I think it's conceivable that the cause is as you suspect - there's no rule that says that memory corruption must cause crashes.
Imagine that you had a data structure like this
<code>     buffer[100];
     threadHandle;
</code>
And you had a simple out by one error in the code filling the buffer. Now your thread handle is defective and presumably you'd get the symptom you see.
I don't know your environment well (I'm Linux/Java these days) but could another cause be using a threadHandle after the thread has terminated? So the handle is indeed no longer valid? Some sort of race condition in your termination code?
Answer: Turns out this was a PInvoke issue. We were incorrectly PInvoking a Thread Handle to the C# SafeFileHandle wrapper, which under the write conditions would invalidate the the thread handle which was later re-allocated by other threads and a giant mess ensued. THus the moral of the story, be very very careful using .net Handle wrapper classes in P-Invoke.


How to Login through facebook in Wordpress website?

Question: I have a website in Wordpress.
I want user to login through Facebook and redirect to my website .
I applied several plugins but they redirect me to facebook.
I dont want to go on Facebook .Only Login through facebook and enter the Home page of my Website .
and then can like on my website too .
Answer: The way Facebook login works...requires the visitor to login with a Facebook generated page. The reason for this is that Facebook doesn't trust other web developers and needs to prevent them from capturing the visitor's facebook login credentials.
The way the Facebook login plugins work...is the way you will have to live with logging in with facebook. There is no alternative (other than not letting them use facebook to login).
On the plus side, most people are always logged into facebook, so they won't have to enter their credentials. They will only have to authorize your website to look at their facebook stuff.


Debugging runs even with compiler's errors in Visual Studio

Question: When I start debugging a project in Visual Studio 2010 (F5), the applications runs even if there are compiler's errors. Why is this so? How can I repair this?
Answer: Menu, Tools->Options
Answer: You might have set it to run from the last known successful build.
Look here for more details : How to enable/disable compile errors warning in Visual Studio
Answer: This behaviour is by-design when the project is a Website. Visual Studio will start the web development server even before it ends compilation of all webpages. This happens because a Website is supposed to compile on demand, that is when the specific pages are requested. Web applications on the other hand, are precompiled.
Answer: If you have multiple projects in the same solution and the errors are occuring in a project that isn't required by the startup project, then I think the code will launch.


What STM32 to learn with?

Question: I am currently learning stm32, I have very little coding background, only some arduino.  What is the best device to start learning on?
I currently own a neucleo-f4 and must learn to program a stm32f303 for my project.  Based on the videos on the STM32 website (stm32 F7, L4, L4+, and GO) which one would be best for me to watch and should I consider buying a new stm32 for learning purposes?
Thanks.
Comment: They are all the same from the conceptual point of view. So use whatever you have. And better don't learn by watching videos, there are thousands of written resources.
Comment: Blue-pill boards (stm32f103) are very cheap from the Chinese webshops. A separate programmer is required, but those are also very cheap.
Comment: The F100's are the oddball family of still contemplatable STM32's with substantially different handling of peripheral functions so really only worth it for the cost.  The on-hand F4 will be closer to the target F3.
Comment: the nucleos are good because you dont need additional hardware to get started, they show up like virtual thumb drives, you copy the .bin to this drive and it gets loaded into the target mcu and run.    If you buy one with a removable debugger end you can use that end of the board to program other devices on your project board (you dont actually need to remove it you can remove jumpers, it wont do the copy the file thing but is a cheaper way to get an st-link debugger).
Answer: The STM32F3DISCOVERY is a low cost board intended to introduce the features of the STM32F303.  It has an on-board STLINK debugger.  The Atollic TrueSTUDIO toolchain is free for STM32 users, as is the System Workbench for STM32 (SW4STM32).  Both are good choices for a toolchain.
I believe your best start would be to use the STM32F3DISCOVERY board (same chip as your final project) to start learning how to blink LED's and read buttons.  Then try to use the various peripherals your project will require.  The Discovery boards have some additional peripherals connected on them that the nucleo boards usually don't have.
You could use the board you already have for some of the basics of learning how to use STM32 parts in general; however, if the final project will be a STM32F303 and you're willing to invest in a development board then why not use the same STM32 to learn as the final project will use?
ST has a software package called STM32CubeMX which can help create a C language framework and handle most of the basic settings of the STM32: things like internal RC, external crystal, or external clock and so on.
Start coding and make something happen.  If it doesn't then you'll have an example of exactly what isn't working and can either debug it yourself or ask for help.

What STM32 to learn with?


Connecting a USB stick: OTG cable required or will standard USB (charging) cable work?

Question: I am wondering if it is necessary to buy a USB OTG cable to access a USB stick from an Android (4.4) phone, or if it suffices to take the Micro-USB-to-USB cable that comes with the phone (for charging) and connect it to the USB stick (via a female-female adapter)?
Comment: Have you tried using the female-female adapter? Did it work? Before, I tried to use a USB hub, and plug the USB stick there; it didn't work. But it works if I just use an OTG cable.
Comment: Hi, thanks for helping. I don't have a female-female adapter, that's why I couldn't test it. I also connected the smartphone (Nexus 5) to a (externally powered) USB hub with a USB stick, but it also didn't work. It seems like the OTG cable is required. One thing I'm still wondering: Does the following connection work? Phone - OTG cable - (USB extension) - USB hub - USB stick. My idea would be to *also* charge the phone while being connected to a USB stick (although I've read that not both might work simultaneously)
Comment: I've tried the `Phone > OTG Cable > USB Hub > USB stick` combination. It didn't work. So, I assume adding a USB extension wouldn't work either. Your best bet would be `Phone > OTG Cable > USB stick`.
Answer: I would do away with a lot of connections, and just do a Phone > USB OTG > USB Stick connection. An OTG Cable is very cheap anyway. You can get one for a USD1 (at least here in the Philippines), or less.
Answer: No. An OTG cable has two of the five pins shorted together at one end. This is how your phone knows whether it is being a USB accessory or a USB host; that is, how it knows whether it's being a USB memory stick or a computer. It doesn't matter what USB adaptors you use: if you're plugging in the accessory end of a USB-OTG cable, or if you use a normal (non-OTG) USB cable, then the device will act as an accessory, not a host.


How to make these type of vector in illustrator?

Question:
I want to create a vector like the one attached. which tool in illustrator would help to create vector like this?
Comment: Bottom right image is not vector art: it's a 3D model and render. All others either use a method similar to Danielillo's excellent answer or simply draw the art with a vector pen and snapping; one thin I would add to Danielillo's approach - set a perspective percentage in the 3D Extrude and Bevel tool for a closer match to the bottom left of the example images.
Answer: Illustrator:
Make the shapes and create a Symbol with them

Make a circle and go the menu Effect → 3D → Extrude and Bevel

Click Map Art, select the side shape and add the Symbol.
Adjust the size and click Invisible Geometry


Find users currently logged in using ldap?

Question: We have Openldap configured here and  users are able to use ldap for login to client machines. But any way to check the users currently logged into machines using LDAP ? I would like to find which user has logged into which machine using LDAP ?
Answer: AFAIK LDAP does not implement session management - it just provides a directory service - and its data can be cached heavily elsewhere. Also it can provide information other than authentication. So there's no such thing as "logged into LDAP" and no way to practically measure it.
Presumably you maintain your LDAP implementation so that your users can access applications - you'd need to look at these applications to determine who currently has an open session (assuming the applications are stateful - HTTP is not).
Comment: Can any LDAP monitors accomplish it ?
Comment: +1.  Each application is responsible for their own session management.  When (if) sessions expire, they revalidate against the LDAP server.
Comment: @nitins I believe so, I think that's what a Barracuda Web Filter does, see my answer below.
Answer: Quoting symcbean, "there is no such thing as logged into ldap". But there is such a thing as users who authenticate through ldap.
More specifically, when you configure your host to use an authentication backend like ldap, the Name Service Switch (nsswitch) could (and arguably should) cache your user information to allow you to log into your system. Actually, from my point of view, it does not matter if data is being cached, it is still information comming from that backend.
Users whether they belong to NIS, Unix or ldap backend have an UID. In a proper configured system, UID from one backend should not match those in another backend (usually unix and ldap backends live together).
To finally make my point, you have a /etc/passwd, and the output of getent passwd, which should not match (ldap extends unix backend), therefore you know which users exists solely on ldap. Last, you have last :D which will tell you who logged in when from where, besides the syslog facility auth to double check. You could make a simple script that could tell you which ldap users logged in with this information on a per host basis.
NOTE: if you have duplicated users in unix and ldap, with same IDs then you'r on your own :)
Answer: I largely agree woth symcbean's answer (Find users currently logged in using ldap?), but...
You could try parsing the DC's security logs, but that will return a lot of data.  Depending on what you want to do with the data long-term, it may be worth sending into a database.
===
I'm not sure about OpenLDAP, but on AD, you can set Group Policy and/or a login script to run (in Windows Batch):
echo logon %username% %computername% %date% %time% >> \\shared\path\FILE_LOCATION.txt

Either parse out the username or computername from FILE_LOCATION.txt, or:
Save by computername by:
echo logon %username% %computername% %date% %time% >> \\shared\path\%computername%.txt

Likewise, save by username with:
echo logon %username% %computername% %date% %time% >> \\shared\path\%username%.txt

Comment: True enough. It probably depends more on what the asker has in his whole environment. LDAP is just LDAP - it's the client side mechanism that determines if anything is done other than "user is authenticated? yes/no". With AD, this is integrated between LDAP, Kerberos, and the GINA at the client side. The questioner hasn't told us what's on his client side, and I don't know if there is a standard LDAP plugin on most Linux distros. PAM, maybe?
Comment: Except that the tags are for Linux and OpenLDAP. Yours is a good answer for AD domains (and i've done similar stuff) but not really applicable for the question. It also doesn't tell you who's currently logged in (which is what the question is really asking), just where they last logged in.
Comment: @mfinni - I acknowledged that I wasn't sure if it was possible in OpenLDAP, but the scripts say who logged in where last.  LDAP does not maintain state (so you could poll that info directly), but using the information provided by this method (yes, it'd have to be ported to a *nix shell) you could check that machine for logged in users...  I admit it's not a complete solution, but it does give an idea that would get you most of the way there.  (And further than the asker is now...
Comment: Yea, I'm trying to not project my own environment and preferences on the question...
Answer: For us, the command:
users

did the trick.
It lists local, LDAP and SSH user logins. So far as I can tell it only fails to report if root is logged in. We have Ubuntu 12.04 on the clients and server.
We have OpenLDAP backing up our authentication via PAM and NSSwitch with NFS mounted home dirs. It is probably important to get your /etc/idmapd.conf sorted out with a domain declaration is important. (prior to our organization doing so, ls -l would return file owner and group as nobody:nobody on clients but at that time)
Sorry to answer such an old question, but I had the same issue and wound up here for an answer before I sorted it out on my own. Please don't down vote my answer if this does not work for you.
Answer: Generally you cannot. You could try and implement it, so that some LDAP attribute is updated every time a user logs in and out an application, but this is overkill. From the question I am assuming that OpenLDAP is used as a central directory and users with credentials stored in it login to a number of linux machines in your network. If that is the case, then you need to install something like finger and then "finger" every machine in the network to see who is logged in.
Comment: Yes, OpenLDAP is used as a central directory with credentials stored in it login to client machines
Answer: Perhaps the client machines should authenticate via RADIUS instead — it does accounting in addition to authentication.
Answer: You could achieve it using LDAP+kerberos, but not every application that can logon to LDAP can use kerberos for authentication.
You can use FreeIPA to get it in a easy-to-use package.
Answer: Personally I like where gWaldo is going but like mfinni said, we might be talking about linux machines.
This may be overkill but... a Barracuda Web Filter can do that, IIRC.
I think you can do something like this with a barracuda web filter that uses LDAP authentication.  IIRC the barracuda maintains a list of everyone currently authenticated to it.  I used it in an AD environment but it should work with all flavors of LDAP.


Is this plant with small white blossoms a weed or a flower?

Question: There is a plant growing beneath our wine. What kind of plant is it? Flower or weed? Five little leafs are on the white blossoms. It is growing very fast. Leaves are large and heart shaped.
Answer: That's buckwheat from the fagopyrum family (I would expect some reddish tinge especially on the lower stem for buckwheat - but your photos only show the tips).
Whether you consider it a flower or a weed is up to you - beauty is in the eye of the beholder. I have it amongst other annuals in my wildflower / insect food border and it self-seeds well. Note that most polygonaceae tend to proliferate (and hence are typically seen as weed), so you might want to cut it before it goes to seed. But it's quite controllable by ripping out seedlings, unlike thistles etc.
Comment: I would consider it like a weed, just because it shadows the wine grape.
Comment: @GiacomoCatenazzi that depends on the number - one or two certainly aren't a problem as buckwheat isn't exactly a dense plant. Mostly a thin stem and a few leaves here and there.


Why don't the Ministers of Magic apparate to the Muggle Prime Minister's office?

Question: The entire question is in the title.  Instead of apparating they use the floo network instead.  Is floo arrival more impressive than appearing out of thin air?  Or maybe that's the point ... it's less frightening?
Comment: Spitballing here - but what happens if you apparate into a spot where someone/something is already there? If the PM happens to be standing where you apparate into, or you apparate into his desk?
Comment: It seems less part of the Floo *Network* as a single point-to-point access system, similar to the portrait access in/out of Hogwarts' and The Hogshead. Probably a security concern so would assumedly have had anti-apparition enchantments around it...
Comment: @phantom42 that seems like a whole other question.
Comment: Do Muggles know about apparating? If they don't, than making them think a fireplace is needed for wizard transportation is a cunning idea.
Comment: @phantom42 thats exactly what i thought when reading this question, you have to visualise the place your apparating into, and if say the desk swaps sides of the room, all of a sudden your splinched, in book 4 they have special apparating zones, an empty field, so people arnt trying to apparate in the middle of those 100s of thousands of people.
Answer: For the same reason Dumbledore stated here:

"Professor, why couldn't we just Apparate directly into your old colleague's house?"
"Because it would be quite as rude as kicking down the front door," said Dumbledore. "Courtesy dictates that we offer fellow wizards the opportunity of denying us entry.

Of course, the Prime Minister is a Muggle. However, the same courtesy is extended.
Comment: Yes but ... first, the painting of a Wizard was there in the Muggle Prime Minister's office to arrange (i.e., _force_) appointments for meetings, and second, the Ministers of Magic were, in fact, rude to the Muggle Prime Minister as a matter of course (the main evidence of which is that meetings occurred immediately as soon as the Minister of Magic wanted one and the Muggle Prime Minister wasn't given any choice; also neither Fudge nor Scrimgeour were exactly forthcoming with information or generous with their time and Scrimgeour was positively nasty).
Comment: Was the Prime Minister not given any choice? As far as I remember the painting announces the meeting and the PM accepts. Whether or not he actually could have stopped the meeting doesn't matter, the courtesy was given. Also, we don't know the fireplace was without permission - all Prime Ministers live in 10 Downing Street, perhaps an earlier Minister made the arrangement. Anyway, it's a matter of degrees - being short with someone isn't exactly comparable to kicking their door in. I imagine it's just a (rare) example of inter-wizarding politeness carrying over to the Muggle world.
Comment: And, too, both plumbing the Muggle Prime Minister's fireplace to the floo network without asking permission and installing a wizard painting with (apparently) a Permanent Sticking Charm are awfully rude.
Comment: I decided to make this the accepted answer ... even though I'm personally not exactly convinced the Ministers of Magic or the Ministries agree, my fellow scifi.stackexchange answerers do.
Answer: It seems like it'd be a massive security flaw if wizards were able to Apparate into the office of the Muggle leader of a nuclear state.
Most likely, the Muggle Prime Minister's office is like Hogwarts, or the Ministry of Magic for that matter: impossible to Apparate into, but accessible using the Ministry-controlled and monitored Floo Network.
Comment: Wizards are already walking weapons of mass destruction, why bother with nukes.


Time only Column in Custom List

Question: I need a column in a custom list that shows time only - such as 6:00 or 23:45 - the only thing I see to possibly use is text only. Is there another better way??
thanks
Answer: you need two columns for this. First is time and date column, and in second column would be a calculated column. apply <code>=TEXT([first column name],"hh:mm AM/PM"</code>) , it will only display the time
Comment: could you help me create a rule in a column to show an hour. The point is that I need in a column with an hour, which is visible only when in another column I have specified text "ok".
Comment: why not, pls elaborate your requirement
Answer: If "Created" or "Modified" field is okay to use as a source, create a new calculated field with formula
=TEXT(Created,"hh:mm AM/PM")
The data type returned from the formula can be one of the below

Single line of text
Date and Time (Date & Time format)

This should give time only as in the screenshot below
Answer: You can create a Calculated field of type - Date and Time with format as "Date & Time" and use the below formula (taken from Link):
=IF(HOUR(Created)<12,HOUR(Created)&":"&Minute(Created)&" AM",
(HOUR(Created)-12)&":"&MINUTE(Created)&" PM")
The only problem I notice is that if the time is 2:00 PM, the value in calculated formula will be displayed as 2:0 PM instead of 2:00 PM. So, you may need to format a little bit.

Time only Column in Custom List


Pong horizontal movement algorithm

Question: I was just wondering about the horizontal movement of a pong ball? What is the general algorithm used with this? The ball in my pong game just moves vertically and I don't know about the algorithms used for horizontal movement.
Answer: You have two speeds here:
- ball speed (x,y)
- paddle speed (x)
Ball speed is constant (positive or negative) by Y axis while speed on X axis is set depending how fast is the paddle while you hit the ball.
Simple calculation could be:
<code>// this is called when ball hits the paddle
function OnCollision()
{
    BallSpeed.x = PaddleSpeed.x * 0.5f; // 0.5f = custom factor
}

// you calculate new ball position here every frame
function OnUpdate(float dt)
{
    BallPosition.x += BallSpeed.x * dt;
    BallPosition.y += BallSpeed.y * dt;
}
</code>
Of course, you could also calculate X speed depending which part of the paddle it hit (if it was far edge, X speed is bigger). Usually both parameters are applied in pong games. Let me know how it went.
Comment: Worked great. Although from what I see there is no real reason to make the ball go as fast as the paddle, but with little adjustments I was able to make it tuned for my preference. Anyways thanks again!
Comment: I'm glad it worked. Yes, that's why I added that 0.5 factor so it's not as fast / slow as the paddle. Good luck with the project!
Comment: bear in mind that in the actual game, distance from the center of the paddle also affects ball speed.

Pong horizontal movement algorithm


Why do we need statistical models if we can estimate the distribution of random variables?

Question: Why do we need statistical models e.g. a linear model or some large neural network? If there is some probability distribuiton, and we have some important random variables associated with it, why do we need large bloated models like decision trees, support vector machines, and neural networks? Wouldn't it suffice to take many random variables and estimate their distributions to keep the parameters of these random variables to store everything which is occurring probabilistically?
Answer: Linear regression is a random variable, though?
$$Y_i\sim \mathcal N(X_i\beta, \sigma^2)$$
So after we have estimated the coefficients, everything is stored internally as a random variable. But it is a random variable whose parameters may vary based on the input.
Similarly, a neural network is a complex sequence of deterministic functions, that boils down to a linear regression model in the end anyway.
$$\begin{split}Y|\textbf x, \theta &\sim \mathcal N(\textbf w^T\textbf z(\textbf x),\sigma^2)\\
\textbf z(\textbf x)&=g(\textbf V\textbf x)\end{split}$$
where $g$ is some function such as the sigmoid function, tanh, or more recently  ReLU. The above is a neural network with an input layer, a single hidden layer, and an output layer. More complicated feedforward neural networks just involve putting additional hidden layers, but it all boils down to some functional transformation.
Statistics deals with random quantities, so it comes as no surprise that everything related to regression is a random variable.
On the other hand, there are parts of statistics that don't deal with random variables, like hierarchical clustering.
Comment: Ah so they actually all are random variables in the end. Thank you!


What features most contribute for label y?

Question: On a neural network, how can I find out what features most contribute for some label (the dependent variable y)?
Answer: I have good news and bad news.
The bad news is that due to the nonlinear nature of neural networks, the same feature will contribute differently depending on the other features.
Here's a simple nonlinear function: f(a,b,c) = y = ba^3 + bc + c.  One could argue that 'a' contributes most to this function, but when b is negative, a more positive a might make things worse.  When b is zero, c contributes most.  When b is negative, a very negative a will contribute most.
The good news is that you may be able to visualize some simple single-layer networks.  There's a fun trick for this used in deep learning.
Assuming you've got x for your examples, W for your weights, and y for your outcomes, set the feature you want to show in y to 1 and the rest to zero, then multiply by W-transpose.  You should get some output values for x which show you how connected everything is.  It's not a perfect solution, but if you get some huge values coming out after the multiplication, you can say those values are highly-connected for y.  (Usually.)


Stair Railing came apart

Question: Hey everyone,
I appreciate any help with this.
My stair railing seemed to come apart towards the top where it curves before connecting to the wall.
This confused me because I don't see anyway to connect these two pieces. I have tried glueing but didn't seem to work.
Any idea on how to repair this?enter image description here
Comment: What type of material is it made out of?  Any small plugs/buttons on the outside angle that might hide screw/s?
Comment: Can you give us some bigger pics, and include one from below?
Answer: The pic is hard to decern details from.
I would try to drill some small 1/16" pilot holes from the left side to allow a couple of Trim Screws  to be installed that would intersect the flat face of the right side piece.
Clamp the 2 pieces together with a little wood glue and screw in the screws. 2 1/2 to 3 1/2 should work.
The exact length you need you will have to determine.  I cannot tell by the pic.
The trim screws counter sink themselves nicely.  Then fill the holes with a little putty and paint to match.
Comment: Thank you so much this help me repair the issue!
Answer: I personally would use wood glue with a clamp to hold it in place for at least 24 hours. To make sure it held I would also use a nail gun on the underside of either piece angled diagonally to help hold it together.
Comment: Wood glue helped! Thank you!

Stair Railing came apart


Why we define topology on vector space in functional analysis

Question: It is said that functional analysis is just infinite dimensional version of linear algebra. However, I am quite puzzled by this statement since we are mainly doing analysis on it. Another question is that why we want to define topology on vector space, is it because we can let the function to be continuous so that we can gain some benefit from it, e.x. the continuous map of a compact set is bounded. In other words, what we really care is just mapping itself regardless of the topology
Answer: One way to understand why we'd want a topology, especially a metric, or a norm, or an inner product, on an infinite-dimensional vector space ... is that the infinite-dimensional vector space is a naturally-occurring space of functions of a particular sort, perhaps functions on an interval $[a,b]$ on the real line. For use, we'd want to be able to take limits (in that metric or topology) and be sure to stay in the same class of functions. For example, a good norm on continuous functions on $[a,b]$ is $|f|=\sup_{x\in[a,b]}|f(x)|$. It is a standard exercise that a Cauchy sequence of continuous functions (with respect to the metric $d(f,g)=|f-g|$) has a limit which is also a continuous function.
Similarly, but often more subtly, vector spaces of other types of functions can often be given metrics or other topologies so that they are suitably complete, or, oppositely, we find reason to take the completion with respect to a "good" metric. An example of a very good metric is that coming from an inner product, such as $\langle f,g\rangle=\int_a^b f(x)\overline{g(x)}\,dx$ for functions on that interval. If we start with continuous functions, the space is not complete, but we can take the completion, to get the Hilbert space $L^2[a,b]$. Linear operators on a Hilbert space have spectral theory strongly resembling that in finite-dimensional linear algebra, but, unsurprisingly, with some complications. But, in many useful situations, there are orthonormal bases consisting of eigenvectors/eigenfunctions for a given (nice...) operator.
Comment: Thanks for your answer. What I mean is that if we define the topology to serve the mapping or not?e.x. To make it continuous?
Comment: Like we restrict the range of the space for fixed point theorem
Comment: The true answer is "it depends". With various natural mappings among spaces of functions, sometimes we topologize one or more with the exact purpose to make the mapping continuous, yes. Sometimes we want a certain topology on the vector space, and there is some conflict with continuity of operators ("unbounded operators" such as $d/dx$ on Hilbert spaces such as $L^2[a,b]$) and the operators may not even be definable on the whole space...Many possibilities.
Answer: Topology gives a notion of convergence and approximation. In this way techniques of finite-dimensional vector spaces can be brought to bear on the infinite-dimensional, provided there is some way to approximate elements by finite linear combinations of some set of vectors. And linear mappings can be studied through approximation, provided the linear mappings are continuous with respect to the topology. Dual space elements can be studied if one restricts to continuous linear functionals. One of the earliest developments in this regard was the characterization of a continuous linear functional on $C[0,1]$ as a Riemann-Stieltjes integral with respect to a function of bounded variation, which Riesz discovered in the first decade of the 20th century, at least a decade before a definition of a general topology.
Notions of compactness on function spaces provided a useful and important means by which to understand Fredholm's original work on integral equations, and that was the motivation behind the definition of a compact operator, even before notions of General Topology had been developed.
Topology and continuuity provide approximation and convergence, and that's why topology is so critical in studying infinite-dimensional spaces.
Answer: When passing to infinitely many dimensions, topological (hence analytical) notions become much more important. According to a classical theorem in introductory functional analysis, every finite dimensional topological vector space over the complex field is linearly homeomorphic to $\mathbb{C}^n$, where $n$ is the dimension of the vector space in question. Afterwards, it is usually proven that a linear mapping from $\mathbb{C}^n$ to any topological vector space is always bounded, hence continuous.
Therefore, if you consider only finite dimensional spaces, you gain nothing by assuming continuity. In the infinite dimensional case, however, there exists many discontinuous linear mappings, especially linear functionals. The study of conditions to ensure a sufficiently large supply of bounded linear functionals leads to the notion of local convexity and the theorems of Hahn-Banach. Another example is compactness of linear operators: if we restrict ourselves to finitely many dimensions, every linear mapping is in fact compact. In spectral theory, one discovers that compactness is the key to the desirable spectral properties of matrices known from linear algebra. In my opinion, this fact is why people often think of functional analysis as infinite dimensional linear algebra.


What was the shortest note length commonly used during baroque period?

Question: Eighth and sixteenth notes were obviously common enough. I've also seen some examples of 1/32 and 1/64 (link). Were 1/32 and 1/64 used frequently? And what was the shortest note length commonly used in baroque period scores? (Excluding appoggiaturas, trills and other ornaments that have their own special notation.)
Comment: I suppose the answer could depend on how one defines "common."  As you've  noted, 64th notes were not unknown.  Maybe a better question would be "when did the 32nd, 64th, and 128th notes first appear?"
Comment: In the link you posted there are also 128th notes. They are difficult to see on this copy of the handwritten score. There are four of them, two on the second line and two at the end of the last full written line. Can be seen here: http://hz.imslp.info/files/imglnks/usimg/e/e5/IMSLP497207-PMLP244084-bachNBAVI,1sonataIBWV1001.pdf
Answer: "256th notes appear in Vivaldi: Concerto in C for ottavino, archi e cembalo, F. IV n. 5." -- Extremes of conventional music notation.
A complete answer would be a histogram of note lengths counted from some corpus such as Yale's, which standardizes on the MIDI quarter note.  As with word frequencies in a prose corpus, the histogram would likely have a long thin tail for the rarer durations -- very short, very long, unusually dotted, and bizarrely tupled.
Comment: If the Vivaldi is the Recorder concerto RV444, then those have 5 beams, not 6, and are thus 128ths. (See the Largo second movement, b.13-14.) Perhaps someone saw a copy of the MS, and mistook a leger line for a 6th beam?
Comment: You may be right about the Vivaldi.  But in the meantime, the "Extremes" webpage has been updated:  "m. 16 of A. P. Heinrich: Toccata Grande Cromatica from The Sylviad, Set 2 (ca. 1825), ... uses 2048th notes."


How to create a cron job to monitor the status of a port ?

Question: I am trying to create a cron job that would allow me to monitor the status of a particular port and send out notification via email while it changes from listening state to anything else.
Comment: What do you use to monitor it? Where are you stuck?
Comment: Please [edit] your question to add extra information, it is hard to read and easy to miss in the comments.
Comment: I created a shell script to lookup the status of port and then added another line to save that to a file. Further, copy that file across to another server. Below is the script. If I just run the script file it works fine but when the same is added to cron job same content gets repeated twice in every instance. My goal is eventually to create a job that would monitor the status of a port and notify via email when any change occurs.
Comment: PATH=/usr/sbin:${PATH}
lsof -i :80 > /root/Desktop/new.txt
scp -r /root/Desktop/new.txt email@example.com:/root/desktop/log.txt
rm -rf /root/Desktop/new.txt
Answer: In the simplest case, you could run a command like this:
lsof -i :22 | grep LISTEN

So, to have that run every 5 minutes and send an email if the port is not listening, add this to your crontab:
*/5 * * * * lsof -i :22 | grep LISTEN || echo "Not listening" | mail firstname.lastname@example.com

This, of course, assumes that you have already set up your machine for the mail command.
Answer: The exit code of nc -z localhost port_num, where port_num is the port you want to check, might be useful here. If nc can connect to the port, then the exit code is 0; otherwise, the exit code is 1.
You can also add the -v option to get a printout of the result.


solaris command interpretation

Question: "/app (/dev/dsk/c0d1s0 ):51430396 blocks 3098364 files"
What is the size of UFS in the command above; does block means the total space allocation?
Comment: It would be nice in the future, if you would include the actual command that you executed.  Though here it would appear to be df... it's not specified.  The better question you ask, the better answer you will get!
Answer: df -h will tell you what you want
Comment: I've found that using df -k is better since I have found that df -h is not implemented everywhere on all OS levels.
Answer: From the df man page:

/export/home       (/dev/dsk/c0t0d0s7 ):  434364 blocks   108220 files

     where the columns represent  the  mount  point,  device  (or
     "filesystem",  according  to  df  -k), free blocks, and free
     files,   respectively.

As, chris specified, the -h flag will output the above in "(h)uman readable format."  Other options that might be helpful are:

-b  Prints the total number of kilobytes free
-k  Prints the allocation in kbytes.

For more information, reference the df man page.

$ man df

In general, man command, will return information on the command you are executing, and how to interpret its output.
Answer: The disk is arranged in units called "physical blocks". Physical block size for UFS is by default 512 bytes, so 51430396 free blocks is equal to 25715198 kilobytes free.
(Depending on the OS version, sometimes the -h and -k parameters aren't available so its handy to know the meaning of the output.)

solaris command interpretation