Explicit Kodaira-Spencer map of hyperelliptic curves

Question: Let $g\geq 2$, and $$\mathcal T=\{(t_1,\cdots,t_{2g+2})~|~t_i\neq t_j,\forall i\neq j\}.$$
For any $t=(t_1,\cdots,t_{2g+2})\in \mathcal T$, let
$$Y_t=\left\{y^2=\prod_{i=1}^{2g+2}(x-t_i)\right\}.$$
Thus we get a family of hyperelliptic curves $\mathcal Y \to \mathcal T$. Let $t^0=(t_1^0,\cdots,t_{2g+2}^0) \in \mathcal T$ be a fixed point (we assume $t_i^0\neq 0,\forall i$). Then we have the Kodaira-Spencer map
$$\Theta_{\mathcal T,t^0} \longrightarrow H^1(Y_{t^0}, \Theta_{Y_{t^0}}).$$
Take dual, we get a map (also called Kodiara-Spencer map):
$$\kappa:H^0(Y_{t^0}, \omega^{\otimes 2}_{Y_{t^0}}) \longrightarrow \Omega^1_{\mathcal T,t^0}.$$
Now one can take $$\frac{x^i}{y^2}(dx)^2, 0\leq i \leq 2(g-1);~ \frac{x^j}{y}(dx)^2,
0\leq j \leq g-3,$$
as a basis of $H^0(Y_{t^0}, \omega^{\otimes 2}_{Y_{t^0}})$.
And take $$dt_1, \cdots, dt_{2g+2},$$
as a basis of $\Omega^1_{\mathcal T,t^0}$.
Then can we write down the Kodaira-Spencer map explicitly under the above two basis?
Comment: I don't know the answer off the top of my head, but you might look in some of the classical books on algebraic curves; it's probably treated in some such treatise.  One thing does seem clear:  You won't need the quadratic differentials that are odd with respect to the hyperelliptic involution $(x,y)\to (x,-y)$; indeed, $\kappa$ will only involve the differentials $x^i(dx/y)^2$, since these are a basis for the cotangent space to the $(2g{-}1)$-dimensional hyperelliptic locus $\mathcal{H}_g$ within the $(3g{-}3)$-dimensional moduli space $\mathcal{M}_g$ of all curves of genus $g$.
Comment: @Robert Bryant Thank you very much. I don't know any book treating this special problem. Do you have any good reference to this problem?
Comment: Already asked (more or less): http://mathoverflow.net/questions/22345/kodaira-spencer-map-in-a-concrete-instance?rq=1
Comment: @Qfwfq: But the answer there is not very explicit...
Comment: @RobertBryant: indeed I said 'already asked', not 'already answered' :-)  In fact, your answer below is very explicit.
Answer: Caution:  I was thinking over the calculation that led to my proposed answer below, and I realized that I had neglected a term that I haven't actually justified as being zero, so now I'm less sure that these formulae are correct.  There may be another term in the formula for $\kappa(\phi_i)$ and I don't see how to rule it out.  As a result, I am withdrawing my answer until I have had time to determine whether the extra term really does vanish.  My apologies to those who trusted my claim and up-voted it!
Unfortunately, I am not allowed to delete an 'accepted answer', so I'm putting this caution at the top so that readers will know not to regard it as correct (yet).

I haven't checked all of the details, but I think that the following is correct and gives you a basis for an answer:  We can get rid of the action of the Möbius group of linear fractional transformations, by, instead, looking at the manifold
$$
\mathcal{S} = \{(s_0,\ldots,s_{2g-2})\  |\   s_i\not=0,1\ \text{and}\ s_i\not=s_j\ \text{when}\ i\not=j \ \}\subset \mathbb{C}^{2g-1}
$$
and letting $s\in\mathcal{S}$ correspond to the genus $g$ hyperelliptic curve $C_s$ defined by
$$
y^2 = x(x-1)(x-s_0)(x-s_1)\cdots(x-s_{2g-2}).
$$
The hyperelliptic involution is $\iota(x,y) = (x,-y)$.
A basis for the $\iota$-even holomorphic quadratic differentials on $C_s$ (a space of dimension $2g-1$ when $g>1$) is given by
$$
\frac{x^i\ dx^2}{x(x-1)(x-s_0)(x-s_1)\cdots(x-s_{2g-2})}\ \text{when}\  0\le i\le 2g-2,
$$
and a basis for the $\iota$-odd holomorphic quadratic differentials on $C_s$ (a space of dimension $g-2$ when $g>1$) is given by
$$
\psi_j = \frac{x^i\ dx^2}{y}\qquad\text{when}\  0\le j\le g-3.
$$
It turns out that a more convenient basis for the $\iota$-even holomorphic quadratic differentials is
$$
\phi_i = \frac{dx^2}{x(x-1)(x-s_i)}\qquad \text{when}\  0\le i\le 2g-2.
$$
Then, it seems, in this case, that the (dual) Kodaira-Spencer map is given by
$$
\kappa(\psi_j) = 0\qquad \text{when}\  0\le j\le g-3
$$
while there is a (nonzero) constant $c$ (which might depend on $g$, but I don't think so) such that
$$
\kappa(\phi_i) = \frac{c\ ds_i}{s_i(s_i-1)}\qquad \text{when}\  0\le i\le 2g-2.
$$
(This formula even works when $g=1$, by the way.)
I think you can get your desired formula by making this equivariant with respect to the action of the Möbius group $\mathrm{PSL}(2,\mathbb{C})$, but I suspect that the general formula in this case won't be particularly nice.
Comment: Thanks. I wonder how could you get the formula? $$\kappa(\phi_i)=\frac{cds_i}{s_i(s_i-1)}.$$
Comment: My calculation is based on Example 1 (starting at the bottom of page 39 and continuing to the top of page 41) of *Complex Manifolds* by Morrow and Kodaira (first edition, 1971).  I used their ideas as a guide, but I had to change the notation a bit and adapt their arguments.  Assuming that I did the calculations correctly (and there was a normalizing constant that I wasn't sure about, hence $c$), the above is the answer that this yields.


Electric Potential in the Center of a Electric Dipole

Question:
I thought the electric potential at point B would be positive because placing a positive charge at point B would cause it to move releasing energy while doing so. The answer key states that the electric potential is 0 at point B and while the math seems to support that because $k\frac Qr + k\frac{-Q}r = 0$, I don't understand conceptually how the potential is 0.
Comment: It it is at potential zero, it would move toward points at which the potential is *negative*. So moving doesn't imply that it is at positive potential. Think about the work done as the particle moves from A at infinity to B.
Comment: If we could trace a line from infinity to center of the dipole such that all the field lines are perpendicular to this line then we have that infinity and centre are equipotential ( a hint only )
Answer: Of course, it is 0.
And it is true that, if you place a third charge in that midpoint, that charge will move towards one of the ends, depending on the sign. If the extra charge is possitive, it will move towards the negative, of course.
That is because the electric field is not 0. Charges move according to forces. Well, to be precise, charges can move anyhow, but if you place a charge at rest, it will accelerate according to the force. This is well known: $F=ma$. And the force is proportional to the electric field.
So, the potential does not have such an immediate interpretation. The "meaning" of potential is more subtle. You can interpret that it costs $0J$ to move the charge from infinity to that midpoint. You can do it with no work. That's the possible interpretation of potential.
If you want a more intuitive interpretation of potential, you should recall that
$$F= q\frac{dV}{dr}$$
so the force is proportional to the gradient of potential. That means that you should not care about the potential, but the variation of the potential.
$V$ can be 0 at the midpoint, but you should check if the potential is varying around that point, and it is. IT does vary. That variation if what causes the charge to move.
A good analogy to compare is gravity: height does not matter, you can be stable in any floor of a skyscraper. What matters is the variation of height, that is, the slope. The slope causes things to fall.
Answer: At each point on line $AB$ there are two forces on a positive test charges; a repulsive force due to the positive dipole charge and an attractive force due to the negative dipole charge.
Both forces have the same magnitude and inclined by the same angle relative to the line $AB$.
This means that the net force on the test charge is at right angles to the line $AB$.
To make the test charge move along line $AB$ an external force must be applied at right angles to line $AB$ and that external force does no work moving along line $AB$ as the force is at right angles to its displacement.  .
So no work is done by the external force moving the test charge from infinity (the zero of potential) to point $B$ which is therefore at a potential of zero.
Comment: I was busy editing and didn't see your answer before posting mine. Kinda says the same  thing. Sorry about that.
Comment: @BobD Do not worry and i hope that the OP appreciates the variety of answers!
Comment: Thanks. I didn't want you to  think I was plagiarizing.
Answer: The potential difference $V$ between two points is the work per unit charge required to move the charge between the points. See the figure below.
What is the work required to bring a charge Q (+or -) from point A an infinite distance away from B to point B (B located between the charges  $Q_1$ and $Q_2$)? Answer 0. This is because the force exerted on the charge $Q$ by the electric field between $Q_1$ and $Q_2$ is always perpendicular to the displacement of the charge in going from A to B. That means zero work is done. Thus the potential at point A, as well as at every point in the path of the charge $Q$ going from A to B is zero.
Another way to look at it, which you might find more intuitive, is the farther away you move point A from point B, the closer together the two charges $Q_1$ and $Q_2$ appear. The closer the charges appear, the more the net charge appears to be zero, which means there would no potential at point A an infinite distance from B.
Hope this helps.


Is it OK to return a 500 error when validation fails on ASP NET MVC using Ajax?

Question: I have a master-detail view for adding, deleting and updating customers on an ASP NET 3.5 MVC 1.0 application. The user should be able to, for example, choose a customer from a list to be edited, and a detailed form is shown in the bottom of the page for him/her to edit the customer's data.
When the user accepts the changes, the data is submitted via an Ajax POST to the server. Validation is performed only server-side.

If validation fails, I want the form with the customer's data to be reloaded with all validation errors displayed. If
If validation succeeds, I want the whole customers list to be reloaded with all the new customer's data (alternatively I could reload only the customer being edited's record).

Now to the point. I was thinking about returning a partial view with the form with the validation errors in the first case, or a partial view with the customer's list on the second one.
In order to difference which part of the page should be updated, return a 500 or a 200 status code, and use Ajax failure and succeess functions to perform the updates.
My question is: is it semantically correct to use a 500 error (internal server error) to signal that a validation failed? Or should I return a JSON object containing an isValid boolean as well as the HTML body, and avoid relying on status codes for this?
Thanks!
Answer: I'd generally argue returning HTTP-level errors is reserved for when things is actually broken as opposed to a way of handling an application layer error. Much like one wouldn't necessarily want to throw an exception when logical data validation fails. So I'd vote for passing back a json results object to wrap up the error (or not).
Answer: This is really up to you. Without knowing all your requirements, underlying infrastructure, and time constraints it would be impossible to make a judgement.


Doubts about tasleem after completing Salah

Question: After completing Esha salah in congregation I came out from the mosque. Then I started to have doubt about my Tasleem. I am having a feeling that I haven't completed Tasleem. Should I repeat my salah? What to do in this kind of situation?
Answer:
Six cases of doubts are such that these can be ignored. Prayer does
not become invalid in the event of these doubts.

Doubts after having finished the prayer.
Doubt after passing of the event. For example while in sajdah, to doubt having missed ruku'.
Doubt after the time has passed. For example, doubt at the time of Maghrib whether the 'Asr prayer was offered or not.
People having doubtful natures. Such persons doubt about everything. So they can be doubtful about prayer also. They must
ignore their doubts.
Doubt either by an Imam (one who leads the prayer) or a ma'mum (the follower of the Imam in prayer). In this case the Imam may be sure of
his performance but the ma'mum is doubtful or vice versa. In such case
whoever is in doubt will follow the one who is sure.
Doubt during a sunnat (non-obligatory) prayer, or in Salat al-ihtiyat.

Reference


How can I tell if my service transformer was upgraded?

Question: I put an addition on and have installed electric baseboard heat and electric on-demand whole house water heater. Due to the increased demand my electric panel was upgraded from 100 amp to a 200 amp panel. But I am unsure if the electric company upgraded the transformer when this was done. My electric bill has increased drastically(doubled), it don't matter if it's winter or summer it remains pretty consistent. But when the on-demand water heater kicks on the lights in my house pulsate or when another high demand electric appliance kicks on there is a subtle dimming. Large consumption electric appliances that were existing and still in use are electric hot water heater, electric clothes dryer, electric range heating n addition to the increased load. What's the easiest way to confirm the transformer was upgraded?
Comment: It's not clear how whether or not the transformer was upgraded would be a DIY question. Whether the power company upgraded their transformer or not is entirely up to them.
Comment: You've made a potentially unfounded assumption that the transformer is the problem. I'm no sparky, but I've never even heard that come up in hundreds of panel upgrade conversations. What makes you think it's a factor?
Comment: With all of that electrical need, I'd be surprised if 200A would be sufficient if you did a load calculation on your electrical appliances/devices.  The electric on-demand water heater is a HUGE power draw in itself, and common wisdom around here is that they usually are not usually cost effective at all, once all costs of them are accounted for.
Comment: Were the wires from the transformer to the house upgraded?  What you added(electric heat and on demand) just wondering if the upgrade was enough.  Just those two could take 200 or more amps, unless you have a tiny house.  Edit in the amount of amps for the heaters and on demand.
Comment: You should measure the voltage at your service panel and see how it varies from no-load to full-load. The fact that you can see fluctuations in your doesn't mean much.
Comment: I had a heavy up from 100 to 200a done last fall and there was no transformer upgrade involved. I also went from overhead to underground feed, so there was a fair bit of work done. Not sure if the transformer "upgrade" is going to be required in all cases, but the 100% best way to find out is to call your PoCo and ask them.
Answer: Frame Challenge - Load Calculation needed - a.k.a., maybe 200A isn't enough
Any time you have a significant increase in your electricity usage, such as:

Adding on-demand electric water heating
Increasing electricity requirements for HVAC (e.g., adding baseboard electric heat)
Adding EV Charging
Turning a garage or basement (lights, opener, misc. small loads) into a workshop (big tools) or accessory dwelling unit (ADU) (cooking equipment, water heating, etc.)

or a number of other large and/or significant continuous use loads, you need to do a Load Calculation. This takes into account the size of your house, required circuits (kitchen countertop circuits, bathroom, laundry, etc.), water heating (if electric), HVAC (which can range from almost nothing for gas heat to moderate amounts for air conditioner/heat pump to huge amounts for electric resistance heat), EV charging, major fixed appliances, cooking equipment (oven, cooktop, etc.) and comes up with a single number that represents the expected electric load. In certain situations you need multiple Load Calculations - one for the utility service and another for each main panel or subpanel (depending on configuration).
Once you have these numbers, you can actually do stuff if the numbers are OK. Or increase your service or change your plans if the numbers are not OK.
A typical house without electric resistance heat, without a large EV charging circuit and without on-demand electric water heating might have a Load Calculation of 50A or 100A or 150A or anything in between. However:

Electric resistance heat - each section might be 500W to 2,500W, which is no big deal. But if you have a few of those sections in each of several rooms, you could easily end up with 10,000W (41A) or more. Obviously that will only be a factor in winter, but it is an important piece of the load calculation.
EV charging is usually configurable based on your needs (for most people 30A or even 20A will be enough) and your available supply (total utility feed minus Load Calculation of everything else). Some people insist on 50A or more, but unless you have automatic load shedding (which is becoming more common), that has a huge impact on your Load Calculation.
On-demand water heating is the worst when it comes to load problems. Why? A typical whole-house on-demand water heater is rated at 27 kW to 36 kW. That translates into 112A to a whopping 150A!

If you have a house with a moderate 80A Load Calculation (and usually far less in actual use) and want to add 150A for on-demand water heating, and let's presume you got rid of a typical 23A large electric tank water heater, so a net gain of 127A, what will happen if you don't do a Load Calculation?

Your electrician or contractor will, correctly, tell you that 100A service just isn't enough.

The standard upgrade is from "whatever old thing you had less than 200A up to a standard modern 200A". So that's what the utility does and your electrician does:

Transformer if needed - probably not needed, but the utility will take care of it if needed
Wires from street to your house
Meter if needed (most utilities have put in smart meters over the last 25+ years, so it was likely already replaced with a standard 200A-capable meter)
Main panel replacement to handle the larger total load and install the new circuits

But without that Load Calculation, you've gone from 80A to 207A, more than your 200A official capacity when everything is going at once. And even more when the new electric resistance heat is added in! But the reality is that most houses, most of the time don't actually get anywhere near their Load Calculation 95% of time. In addition, most breakers don't trip exactly at their official limit unless they are run at that limit for a long time.
But since you didn't do that Load Calculation, that would have said (guessing) 240A, you have plenty of times hitting on the order of 200A. No breaker trip (because main is near limit and each individual circuit is running within normal parameters). But you are pushing your overall supply of 200A to the limit and causing problems.
In fact, to realistically use whole house on-demand electric water heating for anything but the smallest house, you might well need a 320A (continuous)/400A (total max.) upgrade. Really.
Don't blame the transformer. Blame on-demand water heating.
Yes, tank water heaters do waste a little electricity in the form of heat lost through the tank when no water is being used. But very little because of good insulation - the outside of a modern water heater is cool to the touch. Yes, there are limits to how much hot water you can get from a tank water heater, but there are some clever tricks, an electric water heater is more clever than it seems. And if you find a standard tank water heater just isn't enough, add a second one - two 5500W 50 Gallon electric water heaters will have lower peak demand than 1/2 of a 27 kW tankless and less than 1/3 of a 36 kW tankless. That peak demand is what really matters.
Comment: The EV and possibly other loads could be managed with EMS / Load Management.  For instance having the tankless interrupt electric space heating or A/C, which are storage loads that can afford to stop working for a simple 30 minute shower without undue discomfort.
Comment: I wouldn't count on their not having been a load calc, @nobody. I'd agree 100% that it was permitted - I doubt there's a PoCo in the US that will turn power back on without an approved inspection - I know mine didn't
Comment: It seems fairly unlikely that a whole service upgrade from 100A to 200A was done un-permitted and without a new load calculation.
Comment: My hunch is that the service upgrade was done permitted but that the utility and/or AHJ either doesn't require a Load Calculation to be included or lets you get away with just plugging in one number and trusts that the electrician didn't pull the number of the air.
Answer: If you suspect your incoming voltage is insufficient or poorly regulated, a call to your utility should bring them out to measure it and take corrective action.  They may need to change a tap on the transformer or replace it (their call).
In most jurisdictions, the size of the line feeding your house is determined by the size of the panel.  When I upgraded from 100 to 200 amp service, the utility company replaced the line (no charge).  I had to replace the line from their connection point on my house down to the meter, the meter base, and the line into my new panel.
If you want to check the voltage yourself, have a voltmeter, and know how to do it safely, you can measure the line voltage coming in from the meter under as many conditions as you wish (e.g., baseboard heaters on/off, dryer, etc.).
The safest way is to measure at a 120 receptacle (rather than removing the cover on the breaker panel). Measure at a receptacle while there is no load on its branch because the load will reduce the voltage you read vs at the meter.  Then repeat using a receptacle on the other side of the 240 volt feed.
After my upgrade, I measured the voltage at 126-128 VAC, using a calibrated RMS reading meter.  I asked my utility company to reduce it to avoid stressing devices meant for 110-120 VAC.  They came out, confirmed my readings, and changed the tap on the pole transformer.  Now my meter reads 118-120, which is great.
As for the utility bill, I would not attribute the increase to insufficient voltage, but rather greater energy usage by your additional heating devices.  (Resistive heating is much less efficient than say, a heat pump).
Answer: The easiest way is to locate and check the transformer and see if it looks new. Older ones will be weathered and pssible rusting. Your contractor or electrician should have contacted the power company concerning your panel and meter change out so they would have checked things on their end. You should call the power company and tell them you've added load and that there's excessive voltage drop. They should come out and set a monitoring device to check the voltage for a 24 to 36 hour period. If the transformer is overloaded, then they will change it out and possibly the cables from the pole to your weather head.
Comment: Is this a common thing? I'm completely unaware of transformer upgrades being needed in most cases.
Comment: @isherwood  It's  common for them, at least in Florida where I worked, to check the loading on the transformers  when significant residential load is being added. adding AC units, electric heating and on demand water heaters would send up flags.   I think now most utilities have some sort of transformer load management systems in place where they can check the loading on them.
Comment: In my case the only thing the electric company needed to upgrade was the feeder wires... and they procrastinated on that because in air you can get away with the wires running a bit hotter than the spec calls for. (Not that I'm actually _drawing_ 200A at any time, yet.)
Comment: Yes, it's common for the utility to take a "wait and see" attitude regarding service drop and transformer upgrades. They know from experience that customers demanding big service upgrades usually don't increase their actual loads all that much.  They can surveil smart meter data.
Comment: Not really sure of the DV on this... I've done this work for years.


Energy release from beta decay

Question: It is difficult for me to understand how beta decay releases energy.  The neutron is more massive than a proton, electron and antineutrino combined.  Would this not imply that energy is being converted to mass rather than being released?
Comment: For a free neutron the decay $n \to p + e + \bar{\nu}$ is energetically possible. I think you mean to ask about the reverse decay $p \to n + \bar{e} + \nu$?
Comment: Yes.  I understand this can happen especially inside atomic nuclei.  Excuse my ignorance I'm no physicist by profession.
Answer: The free decay:
$$ p^+ \to n + \bar{e}^+ + \nu_e$$
cannot occur in isolation for the reason the OP has noted: in the proton's rest frame the system has energy $m_p$ whilst the products have at least $m_n+m_e$ of energy (plus whatever the kinetic energy is) - since this exceeds $m_p$ the reaction violates energy-momentum conservation. It is kinematically disallowed.
However the same reason does not necessarily forbid the similar decay:
$$ ^A_Z X  \to ^A_{Z-1}Y + \bar{e}^+ + \nu_e$$
since the mass of a nuclide is not given by the sum of the neutron and proton masses but instead also has a mass deficit caused by binding energy. It is thus possible for the masses in this equation to work out.
In particular, the energy of $X$ will be larger than that of $Y$ due to Coulomb interactions amongst the protons. Decreasing the number of protons will reduce this repulsion and lower the overall energy. Of course, there are lots of other contributions to the mass which is why nuclei tend to end up with roughly equal numbers of protons and neutrons, with slightly more of the latter. A first step towards understanding this is provided by the liquid drop model of the nucleus and in particular by the semi-empirical mass formula.
Comment: No, the mass of a nucleus is a measure of its energy content. That energy comes from a number of sources: rest mass energy, kinetic energy, as well as potential contributions from the electrostatic and strong forces. The net effect is that the energy of a bound state is less than the energies of the separated constituents, because if it were otherwise the state wouldn't be bound.
Comment: So you're implying nucleons are actually less massive inside a nucleus and than they are free?  Wouldn't that be similar to saying that a person has less mass on the Earth than they do in space?  Also this would seem to imply that within the nucleus protons have more mass than neutrons which is the opposite of normal.
Comment: @DerekSeabrooke  You have to realize that it is not Galilean mechanics that can describe quantum  mechanical systems, but special relativity. The formalism of four vectors helps in understanding this. An aggregate of quantum entities (in this case protons and neutrons) has the added four vectors of the constituents, and the length of that four vector is the $mass^2$  http://hyperphysics.phy-astr.gsu.edu/hbase/Relativ/vec4.html#:~:targetText=Four%2Dvectors%20in%20Relativity,is%20associated%20with%20physical%20ideas.

Energy release from beta decay


How do I determine the best predictor in a linear regression model?

Question: I've got data regarding baseball with four independent variables. I'm confused as to how to determine which variable is the most significant predictor. To begin, I ran a multiple regression and focused on the t-values stated in the coefficient's table. However, 3 of the 4 variables are significant according to the p-values. How can I go about resolving this? Should I run 4 separate linear regressions and then compare the F statistics instead?
Comment: Why don't you interpret (standardized and unstandardized) regression coefficients?
Answer: There are multiple ways to determine the best predictor. One of the most easy way is to first see correlation matrix even before you perform the regression. Generally variable with highest correlation is a good predictor.
You can also compare coefficients to select the best predictor (Make sure you have normalized the data before you perform regression and you take absolute value of coefficients)
You can also look change in R-squared value. Trying removing each one of them and see which variable causes maximum change.
Comment: So if I run a simple regression on each of the independent variables, the regression with the highest correlation (r) is my best predictor? If I am comparing coefficients, would that be after running a multiple regression on all the variables?
Comment: Never mind, I misread your comment. I think I understand now (after a tinkering a bit in SPSS). I should be performing a correlation and then comparing the Pearson R values that are significant? Thank you so much for the help!


How can I make my site only accessible to logged-in users?

Question: I want to make my site accessible to logged-in users. How can I achieve this?
Comment: What do you want anonymous users to see? Where should people log in?
Answer: There is a permission in the permissions list called "View published content". The permissions are set under /admin/people/permissions. You can remove this permission from the Anonymous user.
If you want to show some pages but not all of them, more granular access controls can be set up with Content Access.
Custom 404 and 403 pages can be set to use any content on your site, using settings at /admin/config/system/site-information (in Drupal 7). Sidebars are automatically hidden on 404 and 403 pages but if there are any other blocks (such as menus) you want to hide, you can control which roles see those on their block config pages.
The content of these nodes will also be unaccessible to anonymous users unless you install Content Access and make at least th 403 page allowed for anonymous users. I suggest allowing the 404 page too. Otherwise, you can still get info through if you put it in a node-specific template for your custom 404 page.
The login block can also be invoked programmatically in a tpl.php file with the code from this d.o comment or it can be shown to anonymous users via the block settings.
Comment: Thanks, It works. I unchecked the "View published content". when I visit my site ,Access denied Message showed. But I can also see the Menus.  Can I edit the Message for more user-friendly.
or Could I show a login dialog when the unauthorized user visit the site>
Comment: Yes, you can do that. I'll add info to my answer.
Answer: First solution
It can be a combo of the permission "View published content" and LoginToboggan.
In LoginToboggan, there is setting to put login form on access denied page as well. "Present login form on access denied (403)". So every anonymous user will see a login form whenever they visit the site.
Second solution
See this comment, which is valid.

I think setting the "Default 403 (access denied) page" to the login page is a bad idea because just because someone has access denied does not mean they are not logged in; they may just not have permission to view that particular page.
A better method is to put a little code in your themes template.php.
function YOUR_THEME_NAME_preprocess_page(&$variables) {
    if(!$variables['user']->uid && arg(0)!='user' && arg(1)!='login') {
        drupal_goto('user/login');
    }
 }

Third solution
See this answer.


Binding to CustomControls issue

Question: I have a custom control that inherit from TextBox with dependcy property called State.
State is enum with 4 options {Mismatch, Wait, Ok, None}
The Generic looks like this:

    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type local:CustomTextBox}">
                <Border Background="{TemplateBinding Background}"
                        BorederBrush="{TemplateBinding BorederBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>

I have class Named MyData with properties DataState, Sent, Recieved each property implement INotifyPropertyChanged.
In my main window i have the following row in the xaml:
<custom:CustomTextBox State="{Binding BindingData.DataState}" Text="{Binding BindedData.Sent}"/>

and in my view model i have field from type MyData that called BindedData and when user send some data the BindedData.Sent change and then if some logic occur the BindedData state change to Mismatch and the customTextBox background need to be in some color.
The problem is that the background not change its mean the binding of the state not working and also the text binding not working.
I know how the binding works and its work for me in other cases (not with custom controls) and here i also checked in debug and i saw that all going right so did i make something wrong with the customcontrol?
Thanks in advance!
Answer: maybe you set the background again from the main window?
I have tried copy your code and it works perfectly , unless I set the background from the main window (since it overrides the style setters)

Binding to CustomControls issue


Lumped Circuit Abstraction extreme cases

Question: When using lumped circuit abstraction, if we consider two ends of a voltage source connected with ideal wire KVL won't hold; and also if we put two current sources opposite two each other, then the node in between won't obey KCL. Since there is no change in magnetic flux or other lumped circuit abstraction restrictions; what causes the Kirchhoff's laws to be wrong?
Answer: Make the sources the tiniest amount imperfect, perhaps they have an ESR or 1 pico-ohm, and a voltage difference of 1 femto volt, In reality you will never have ideal sources, so parts per million errors can be mixed in while not affecting the actual results,
Resistors on their own have thermal noise voltage, so in any circuit with any resistance there is always a voltage and current change, if you wanted to you could model any non perfect wire as an AC current source in series or voltage source in parallel if you really wanted to keep it tied to real world concepts.
Answer: Kirchhoff's Laws are not wrong, the problem is that you constructed an invalid circuit. Remember that when we talk about ideal sources that we are using a mathematical model that has certain specified properties by definition. The definitions of the ideal voltage and current sources say nothing about magnetic flux nor do they care.
In order to make useful circuit models with these ideal element models we must obey certain rules. One of those rules is that you can not connect two ideal voltage sources in parallel if they have different values. Another is that you can not connect two ideal current sources in series if they have different values. It's as simple as that. You must follow the rules if you expect to create a useful circuit model.


Syncing Exchange calendar with SharePoint calendar

Question: I have a meeting calendar in Exchange which some users use in their Outlook. I want to sync this calendar in Sharepoint (which again can be used by multiple users) so that any change made in Sharepoint will be reflected in that calendar in Exchange and vice versa.
Is it possible?
I have heard that SharePoint only syncs personal calendar and not team calendar.
Answer: You can create calendar in SharePoint and then connect with Outlook.
Comment: Can you please elaborate this answer?
Comment: As far as I know this only works with personal calendar. If you have a team calender then it won't be auto synced and instead you will see overlapping calendars i.e. both exchange and sharepoint calendars on top of each other.
Comment: If you create calendar in SharePoint, you can connect this calendar to other users. It can some alternativ version of team calendar.
Comment: Yes but it won't syncs with Exchange calendar which is also shared. There is a feature called "overlay" calendar but this is not what I want.
Comment: I believe what is being suggested by this answer is to create a SharePoint calendar and schedule these meetings on that calendar *instead* of the currently existing Exchange Calendar. I'm guessing, though, that that's not what @FrankMartin is looking for.
Answer: In SharePoint:
Create your calendar in SharePoint
Select the calendar tab and Connect to Outlook
In Outlook:
Put the Outlook and sharepoint calendars side by side (not sure this is necessary tbh) and select to veiw the Outlook one in list view
Highlight all data and copy it to your SharePoint calendar
Strangely you should find that you have a two way sync setup between the two. You even start to receive notification of events
I haven't yet tested if you need to leave your Outlook session open for updates to sync but I suspect that you do.


Nginx Default Sever Config

Question: By mistake I deleted the default sever configuration in /etc/nginx/sites-enabled/default. Now the sever will not start.
Can someone please tell me what it is so fix it?
Comment: If you have not made other changes after installing you could reinstall the package.
Comment: i did make some changes, but nothing too major. Is there a command to reinstall the package?
Comment: How is this question (as currently described) related to Raspberry Pi rather than specific to nginx?
Answer: The file you deleted was a link to the file in /etc/nginx/sites-available/default if you happened to have deleted the actual file that's what the below is for, incase someone else needs it in the future. You need to just recreate the link from the /etc/nginx/sites-enabled folder to the /etc/nginx/sites-available folder.
I believe you can use this to link the original /etc/nginx/sites-available:
sudo ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default

If you happened to have deleted the file /etc/nginx/sites-available/default you can recreate it with the following:
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
    listen 80 default_server;
    listen [::]:80 default_server;

# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;

server_name _;

location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
#   include snippets/fastcgi-php.conf;
#
#   # With php5-cgi alone:
#   fastcgi_pass 127.0.0.1:9000;
#   # With php5-fpm:
#   fastcgi_pass unix:/var/run/php5-fpm.sock;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
#   deny all;
#}
}

# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#   listen 80;
#   listen [::]:80;
#
#   server_name example.com;
#
#   root /var/www/example.com;
#   index index.html;
#
#   location / {
#       try_files $uri $uri/ =404;
#   }
#}

That is the original file in version Nginx 1.6.2 in the /etc/nginx/sites-available/ folder named default with no file extension. You will have to use:
sudo nano /etc/nginx/sites-available/default

to write to this directory and recreate the file.
Answer: The universal way to restore the default configuration is to run
sudo apt-get --reinstall -o Dpkg::Options::=--force-confask install package

This command will reinstall the package, prompting to replace any configuration files you may have modified or deleted.

Nginx Default Sever Config


Are interacting symmetry protected topological (SPT) phases and symmetry enriched topological (SET) phases must be gapped?

Question: I wonder are interacting SPT and SET phases gaped? Can we have a SET or interacting SPT phase in a semi metal?
Answer: A gap is part of definition, although sometimes it's enough to have a gapped sector (spin or charge gap, usuall). Note also that in a crystal there are always phonons, which are gapless.
To see the importance of a gap, let's consider some 1d Majorana models, with this figure from Verresen et al:

As usual, the dots indicate Majorana operators $c_j$ and the bonds are pairing terms $ic_1 c_2$ so that you can read each picture as a Hamiltonian.
Consider placing a chain with Hamiltonian $H_1$ (the Kitaev wire) on top of one with $H_0 + H_1$ (massless free Majorana field, a 1d semimetal). Then it's possible to absorb the edge modes of $H_1$ into those of $H_0 + H_1$ with a local term.
Thus, the free Majorana is a gapless theory that can absorb an SPT, so one needs to be really careful in extending the SPT concept to gapless systems.
Comment: The topology of the fermi surface is a different issue from SPT, imo. There cannot be any interacting invariant for the Weyl semimetal because the Weyl nodes can scatter off each other and open a trivial gap.


Can I set the start point of a bezier curve?

Question: I have a closed bezier loop that insists on a particular point being the start/end. Is there a way to change which point is considered the start, as in which point represents 0.0 evaluation time? I've deleted and rejoined segments all over, and every time I close the loop, it goes back to the same point.
Answer: The thumb rule is that basically, for a closed spline, the last segment created upon closing a curve is will contain the first vertex of the curve spline.
So if you want to make a certain vertex the first one, then delete the segment immediately before or after it to make that vertex the starting point. Then close that spline again.
As far as I know there is no easy way to determine which of the gaping vertex will actually become the first one. And on 2D curves, you can't tell them apart easily because there are no normal arrow indicators to guide you.
If you don't like the outcome though, you can always open the curve again, and call Switch Direction operator, either from the Search menu, Right Click context menu, or Segments > Switch Direction, reverse the result as desired then close the spline again.

For 2.8+ you can also activate the addon Curve Tools from the preferences, and under the Edit tab of the 3D View sidebar under Utilities > Set First Point allows setting an arbitrary point as first for selected splines.
Answer: Enable the Bsurfaces addon, in Edit mode select the desired vertex and go into the N panel > Edit > Bsurfaces > Set First Points.
For Blender 2.7, T menu > Tools > Bsurfaces > Set First Points.
Comment: works like magic
Comment: I gave up on Bsurfaces because the window is not popping up anywhere intuitive.
This function should be standard in the menu of bezier lines, it's a commonly used function and it really doesn't make any sense that it can't be found there straight away.
Comment: I've edited, it's now in the N panel > Edit > Bsurfaces. Yes I agree, some functions should be more quickly accessible


Pro Tools Keyboard Shortcuts Macro'd to a Gaming Keyboard

Question: I use a Razer Arctosa which I was thinking of selling, but later changed my mind after thinking of using the macro capabilities for PT. I'm fairly new to PT and not very familiar with a lot of the keyboard shortcuts, so I was wondering if you have a gaming keyboard or know some essential/over used shortcuts that could be macro'd to one button to work quicker without having to try to remember the shortcut (eg: Ctrl+Shift+I to F1), what would you use and what empty keys would macro them to?
Answer: Try cross-referencing this post, this post, & this post.
Additionally, it doesn't hurt to learn the keyboard shortcuts as not every system you sit in front of will have macros pre-programmed. There should be a .pdf in your Digidesign > Documentation > Pro Tools folder that has all the shortcuts.
Comment: Thanks for the links, I was thinking about the same thing as well but I thought I'd might as well make use of the macro features since I have them..
Comment: I certainly understanding trying to utilize all the tools that are at your disposal. It was merely a suggestion to not become too reliant on them if you are new to the software.
Answer: I remember buying a custom gaming keypad for Pro Tools specifically to have more macro ability - and I don't even think I ever plugged it in and set it up at all. I think it's still in the factory box sitting in a drawer somewhere.
I use a mouse with 5 buttons instead - works like a charm for me. And I have QuicKeys - so I either bring my QuicKeys to another gig outside my studio but 90% of the time I work out of my own studio. And if someone changes my mouse settings I get real mean!
Comment: What do you use on your mouse? I've got a Razer Orochi and it can save macros and information onboard so if I plug it into another computer it will have the same setup even without the drivers and stuff.


Newly seasoned carbon steel pan sticks when cooking

Question: After doing reasearch I decided to try a less expensive pan when buying a 12".  Bought a Paderno and did a mix of seasoning with organic flax seed oil.  I did about 5 coats on the stove top per instructions (heating, adding small amount of oil and rubbing it down with paper towel, heat/ cool / repeat.  For good measure I also tried rubbing the entire pan with oil and cooked in 400 degree oven for 2 hours and let it cool in oven for 2 hours.  The 2 times I've cooked anything in it (eggs with onions) everything sticks.  Never had this problem with my small de Buyer crepe pan.  One chef recommended 11 coats, I think I've got 7.  Wondering now if I put on too many coats of oil or if this made in China pan is just an inferior metal.
Comment: Welcome to the site @LeslieHarris. Seasoning does not make a pan equivalent to a non-stick coating. Are you using oil when cooking? How long are you pre-heating your pan?
Comment: Though flax seed oil polymerises very easily, making it a perfect 'base layer' for pan seasoning, it also tends to have a slightly sticky finish. I always do a few layers of flax seed, then finish off with a layer or two vegetable (rapeseed) oil. This gives it a much more smooth, slippery surface which rarely sticks.
Comment: Thanks for that, @canardgras. I'll try that on my cast iron. I've been using flaxseed and have been pretty happy but not 100% happy with the coating.
Comment: Thank you.  I've now been coating the pan with EVOO before and after every use.  I'll try finding rapeseed oil. After cooking bacon in it a few times, it seems to be working much better.  Thanks for all comments.
Answer: High temps and flaxseed oil (essentially linseed oil) don't mix so I'd be suspicious of using flaxseed oil for seasoning. Try using a different oil and see what happens. The baked coating may then be less sticky/grabby.


Ubuntu vmware workstation guest doesn't connect anymore after windows host update from 8 to 10

Question: I'm using VMWare Workstation 11 to power a Ubuntu 15.04 virtual machine. My Host operating system was Windows 8 and the NAT connection from Ubuntu to the Internet via my host system worked perfectly.
Now I had to upgrade my Windows from 8 to 8.1 and then to Windows 10. This took quite some time due to user profile migration problems but i finally fixed it. The VM files were not affected by this. When I'm now powering my Ubuntu guest it starts normally but it won't connect for some reason to the host vie the NAT adapter. When I click the icon in the icon bar on the top right it says "Ethernet Networks \n disconnected".
Has someone any idea if this could be caused by the Windows update or how I can fix this issue?
Answer: I could solve the problem by restoring the default settings in my VMWare Workstation Virtual Network Editor.
Solution found at: Source


How is this interesting fractal generated?

Question:
Can someone help me with the steps through which this fractal was generated. My first observation was that we are making a vertical line at half the distance but notice that reconstructions on the rightmost vertical line is different from reconstructions on horizontal line.
Answer: The bottom left quadrant is a 50% downscaled copy of the whole.
So is the bottom right quadrant.
The top right quadrant is a downscaled copy rotated 90 degrees anticlockwise.  This can be formalized as the fixed point of an iterated function system of similarities, for example the bottom right part corresponds the transformation
$$\begin{pmatrix}x & y\end{pmatrix} \mapsto \frac{1}{2}\begin{pmatrix} x & y \end{pmatrix} + \frac{1}{2} \begin{pmatrix} 1 & 0 \end{pmatrix}$$
Answer: Here's Mathematica code to implement the IFS:
F[{x_, y_}, r_] := Which[r == 1, {x, y}/2, r == 2, {x + 1, y}/2,
                         r == 3, {-y + 2, x + 1}/2]
ListPlot[FoldList[F, {.5, .5}, RandomInteger[{1, 3}, 10^5]],
         AspectRatio -> Automatic]

Here's what it does.  F is the piecewise function
$$f(x,y;r) = \begin{cases} (\frac{x}{2},\frac{y}{2}) & r = 1 \\ (\frac{x+1}{2}, \frac{y}{2}) & r = 2 \\ (\frac{-y+2}{2}, \frac{x+1}{2}) & r = 3 \end{cases}$$ that takes a point $(x,y)$ and a number $r \in \{1,2,3\}$ and outputs a new point depending on the value of $r$.  Then FoldList takes a list of $10^5$ random integers in $\{1,2,3\}$, and uses this to generate iterates of the initial point $(0.5, 0.5)$.  Then ListPlot plots the list of iterates.
Why does this work?  It is the result of the contraction mapping theorem.  The fractal comprises the three mappings described in $f$ above.


Induction coil interference from an electromagnet?

Question: If I have a nail three dividers on it to keep the coils on the nail, and wrap an induction coil between the head of the nail and the middle, then wrap an electromagnetic coil between the tip of the nail and the middle, would the electromagnetic coil interfere too much with the induction coil?  Would this turn into a transformer, or would the induction coil be able to still function?  The reason for this is I am looking to make guitar pickups, and have a bit of wire, but not many magnets.  I thought this may work, but I am unsure whether the electromagnetic coil would interfere too much.
Answer: Both windings are just coils of wire -- giving them different names does not change how they function.
Yes, when wound on the same core, they will definitely interact with each other quite strongly. However, you need to decide whether that interaction works in your particular application.
I take it you want to put a DC current through one of the coils in order to provide a field similar to what a permanent magnet produces. That's fine -- the other coil will not pick up DC. However, any AC (noise) in that DC current will be coupled to the other coil, and it's possible that it will overwhelm the signal from the guitar strings that you're looking for.
So, how good are you at building low-noise DC current sources?


download several files to tablet from drive

Question: I would like to download approx. 100 pictures from google-drive to my tablet.
I found only one way, only one picture by one.
Is there a way to "download all"?
Answer: From this page you can zip and download all Drive files

Google drive has the ability to download a bunch of files and folders in a zip file.
To do so , just select the files and folders and select More > Download > Download from Google Drive
The files will be zipped and it will take some time for the process depending upon the size of the files and folders. You can either wait with that window open by looking into the estimated time or you can click 'Email when ready' which will send you a email with link to zip file onces its done.

Note the max zip size is 2Gb.
An alternative would be to do the following:
Sync the files to your computer using the google drive client app:

Install the google drive app on your computer
On drive.google.com, drag the folder shared with you from "Shared with me" to "My Drive"
Now all the files should automagically appear on the "Google drive" folder on your computer
Comment: As I understand, you describe actions taken on PC.
Comment: @user55150 Is there no option in the app, the first way was SUPPOSED to be the app, and the other for your PC if it is quicker. Ok, I've added a third option, from the Play store, hopefully ONE of these will work!
Comment: My question belongs to working with a tablet. On the tablet I open the Google Drive app, see my files and cannot find the option as "mark all" or "download all". Thanks for help.
Comment: @user55150 try the app I linked to. I know it is with the tablet, but if there is NO option (and the app doesn't work) then you may HAVE to do it on a PC or one by one. I'm trying to find a way to get your files over for you, unfortunately Drive doens't make it easy (one of MANY reasons I would never, ever use Google Drive tbh). Try the app and let me know. Fingers crossed!!


How scroll camera smoothly?

Question: I have such screen: very long world which I draw on stage and I need to scroll it. Now I move my camera in touchDrag() method. But I want to move my camera like I scroll it. E.g. I fling screen fast and my camera smoothly fly for some distance on y-axis. Just like it works in ScrollPane. How can I do this?
Answer: Yes, you understood me exactly. The question is not already actual. But thank you very much for your answer, this is another implementation of one idea. I did probably the same things, now I show my realization
public class CameraScroller extends InputAdapter implements GestureListener {
    public static final String TAG = "SCROLL_TAG";
    public static final float TIME_TO_SCROLL = 2.0f;

    private Camera mCamera;
    private final float mLowerPosition;
    private final float mUpperPosition;

    private GestureDetector mGestureDetector;
    private float mTimer;
    private float mVelocityY;

    /**
     * @param camera        {@link Camera} that have to be scrolled
     * @param upperPosition the upper limit position of camera
     * @param lowerPosition the lower limit position of camera
     */
    public CameraScroller(Camera camera, float lowerPosition, float upperPosition) {
        mUpperPosition = upperPosition;
        mLowerPosition = lowerPosition;
        mGestureDetector = new GestureDetector(this);
        mCamera = camera;
    }

    /**
     * Call in Screen.render()
     */
    public void act(float deltaTime) {
        if (mTimer > 0) {// if timer is not 0
            float acceleration_y = mVelocityY * deltaTime;// calculate acceleration (the rate of change of velocity)
            mTimer -= deltaTime;// decreasing timer
            mVelocityY -= acceleration_y;// decreasing velocity

          mCamera.position.y += mVelocityY;
          checkCameraPosition();// check if camera position is in not less or more than some value else stop camera (mTimer = 0)
        }
    }

    private void checkCameraPosition() {
        if (mCamera.position.y > mUpperPosition) {
            mCamera.position.y = mUpperPosition;
            mTimer = 0;
        }
        if (mCamera.position.y < mLowerPosition) {
            mCamera.position.y = mLowerPosition;
            mTimer = 0;
        }
    }

    @Override
    public boolean fling(float velocityX, float velocityY, int button) {
        mTimer = TIME_TO_SCROLL;
        mVelocityY = velocityY * Gdx.graphics.getDeltaTime();

        return true;
    }

    @Override
    public boolean pan(float x, float y, float deltaX, float deltaY) {
        float cam_y = mCamera.position.y;
        System.out.println();
        if (cam_y >= mLowerPosition && cam_y <= mUpperPosition) {
            mCamera.position.y += deltaY;
        }
        if (mCamera.position.y > mUpperPosition) mCamera.position.y = mUpperPosition;
        if (mCamera.position.y < mLowerPosition) mCamera.position.y = mLowerPosition;

        return false;
    }

    @Override
    public boolean panStop(float x, float y, int pointer, int button) {
        mVelocityY = 0;
        return true;
    }

    @Override
    public boolean touchDown(float x, float y, int pointer, int button) {
        mTimer = 0;
        return true;
    }

    public GestureDetector getGestureDetector() {
        return mGestureDetector;
    }

    @Override
    public boolean zoom(float initialDistance, float distance) {
        return false;
    }

    @Override
    public boolean pinch(Vector2 initialPointer1, Vector2 initialPointer2, Vector2 pointer1, Vector2 pointer2) {
        return false;
    }

    @Override
    public boolean tap(float x, float y, int count, int button) {
        return false;
    }

    @Override
    public boolean longPress(float x, float y) {
        return false;
    }
}

Answer: I'm having a bit of trouble understanding the exact question, but I think your solution is to add some basic physics to your camera:
If you're looking for a way to have your camera keep moving after you drag it, have it record the velocity you drag it with as a vector. To make it slowly come to a stop, you modify the velocity after release with posNew = posOld + finalVelocity*t + 1/2 * a * t^2, where "a" is a (negative!) constant of friction (you'll have to experiment to find a good value for this) and t is the time between frames or updates.
Now I'll get a bit more specific:

Recording final velocity:

When you drag the screen, you will record positions over time. To get a velocity, you simply find v = (posEnd - posStart)/t, where t is the time between frames. If you want to be able to scroll on just the x-axis, you only need to put x-values into the position variables. If you want x and y scrolling, you need to compute separate final velocities for both x and y and use them independently.

Movement of camera after you release:

If you need to move in both the x and y directions, record a final velocity for both x and y and use the same formula as above to compute the next frame's velocity. To find the frame position, use the formula above.

Movement after finalVelocity * t = -a*t^2:

You will get to a point eventually where this equation becomes true. This is the point where your camera stops moving. This is also the point you want to stop using physics. If you continue after this point, t^2 will increase faster than just t, and you will end up moving your camera in the opposite direction. I would suggest using an if-statement with a simple inequality wrapping the whole drag method.

About using vectors:

If you must move in both the x and y directions, I would suggest using some sort of vector class. I'm not quite sure what language you're using or what libgdx is, but vectors should work in the same ways for any programming language, and they sometimes have built in functions for what I described above. If you use vectors, it might be helpful to get some background understanding of vector math when it comes to physics, which can be done through even a simple Wikipedia search.
I hope this answers your question, but if it doesn't, please comment and let me know what needs to be specified.

How scroll camera smoothly?


Deploy Solr at the same port as tomcat

Question: We have our web application hosted on the tomcat server on port 8080 (UNIX server).
https://example.com/myApp
We want to implement SOLR search in our project. SOLR suggests we should no more deploy SOLR as a web application. Please refer the link below.
https://wiki.apache.org/solr/WhyNoWar
Default SOLR installation (uses jetty, I think?) deploys it on any port we specify.
We don't want to open any ports other than 8080 on our server because most of the users we target have all the ports blocked except the default port.
Is there a way to host SOLR without deploying it in tomcat and still host it as? https://example.com/solr
Answer: The best bet is to use proxy, for example nginx. Here is a sample how http block of nginx configuration may look for this case:
http {
    upstream tomcat {
      server localhost:8081;
    }

    upstream solr {
      server localhost:8082;
    }

    server {
        listen       *:8080;
        server_name  my.server.com;
        location / {
            proxy_pass http://tomcat;
        }

        location /solr/ {
            proxy_pass http://solr;
        }
    }
}

Answer: Solr is still a web app. They are suggesting that not to use it in another servlet container as its not been recommended and tested by them.
They are giving a fully tested system and don't want others(developers) to invest time in testing it with other containers.
I have used solr 3.4 version and deployed it in tomcat server on port 8080.
My application is deployed in another tomcat at 8080 port and is on another machine.
So there in not ambiguity about the port as both tomcats are on the different servers.
I have created the solr war and deployed the same in tomcat. and only 8080 port of that server is made open and been access by our application only.
I am not sure about the solr version 5 ...i.e. whether that can be deployed in other container other than jetty...but I think it can be deployed in tomcat...you need to try the same...
Other thing is that dont deply application war and solr war in the same container or in a single container. The reason is if one of the application goes down everything will be down.
Like if solr goes down then the application may go down, which is not a good for the application.

Deploy Solr at the same port as tomcat


Is it necessary to our smart contract contains the codes of Sunswap or Uniswap in our contracts?

Question: I'm a bit confused about listing my token in decentralized exchanges such as sunswap and uniswap.
Could anyone tell me the road of listing my token?
and describe if do we need to add codes such as ISunswapV2Factory or UniswapV2Pair in our contracts code? and why and what is this code application?
Answer: If you are only creating a token, you only need to create the token code. The standard token code has nothing about such integrations - it only has the minimal functionality for the token to work by itself.
Some tokens include some fancy functionality to automatically execute some trades against Uniswap in some scenarios, but that gets complicated quite fast and is definitely not required for a token.
So, to add your token to for example Uniswap, you just need to create a default token with minimal functionality and just list it in Uniswap with some other asset, as a Uniswap pair.
Answer: No.
Your token should adhere to the ERC20 standard which allows the DEX to operate with it.
You will need the basic exchange functions:

transfer - executed during a purchase. LP calls transfer from its tokens to the buyer
transferFrom - executed when you sell. LP calls it to get your tokens over to itself, while giving you back the paired asset you're selling for

As well as balance/authorization functions:

balanceOf - how many tokens does an address have
allowance and approve - for proxy-handling of tokens

Here is the IERC20 interface. For the easiest development route, just implement it in your token code and it will work properly.
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol
As @lauri-peltonen noted, you can add the Uniswap interface into your contract if you need to perform some custom actions, like rebasing or adding liquidity, but for the sake of a regular token, it won't be needed.


Can I get golden or silver tools if I am not the mayor? (other user) Animal Crossing New Leaf

Question: I played Animal Crossing New Leaf with a cousin. I have not started playing it before my cousin started playing... He became mayor and I was the side character (other player). He doesn't play anymore and I play my other player but I really want the gold axe and I have not got it yet. So can I really get golden tools when I am not the mayor.
Answer: Yes as long as you have the special circumstances,http://www.thonky.com/animal-crossing-new-leaf/golden-and-silver-tools/, you should be able to obtain it. Hope this helps.
Answer: Yes you can get gold and silver tools as long as you indeed do and understand the special circumstances to getting them for e.g
Golden Rod- Catch all fish
Golden net- Catch all bugs
Golden Slingshot- Appears randomly in the sky
Golden shovel- Buy 50 fertilizer from T And T Emporium
Golden Axe- Buy 50 Saplings from T And T emporium
Golden Can- get a perfect town status for 15 days straight.


Terraria cloud save

Question: When I try to get my cloud save back it says I need to allow iCloud on my iPad in settings but when I click the terraria icon in settings nothing comes up, if you have an answer please let me know.
Answer: Make sure you have iCloud turned on in global settings, since there may not be an iCloud setting specific to Terraria.  See this image (it's an example image from iOS 7) to make sure iCloud is enabled for your Apple ID:

Answer: You need to click the banner at the top of settings and then click iCloud. Go down and enable iCloud Drive. A bunch of apps will then come up including terraria and you should be good to go

Terraria cloud save


Vertical ScrollBar does not repaint using EnableScrollBar api

Question: I am trying to disable a VScrollBar control using the EnableScrollBar api. When I call the api it returns as if no problems ocurred but the VScrollBar is not repainted.
To reproduce the problem create a Vb.Net windows forms project, drop a VScrollBar control and a button to the form and paste the following code:
<DllImport("user32.dll", CharSet:=CharSet.Auto, SetLastError:=True, ExactSpelling:=True)>
Public Shared Function EnableScrollBar(ByVal hWnd As IntPtr, ByVal nBar As Integer, ByVal value As Integer) As Boolean
End Function

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim wSBflags As UInteger = 3UI 'SB_VERT
    Dim wArrows As UInteger = 3UI 'ESB_DISABLE_BOTH
    Dim result As Boolean = EnableScrollBar(Me.VScrollBar1.Handle, wSBflags, wArrows)

End Sub

I tried using SendMessage to send a redraw (WM_REDRAW) and a paint (WM_PAINT) but cant get it to work. Any ideias?
Ps: If you drop a multiline textbox and use the same code it works....
Answer: SB_VERT is for the vertical scrollbar as part of the non-client area of a window. For a scroll bar control, use the SB_CTL constant.


Can a graduate student (in Canada) submit his tax file corresponding to the last year?

Question: I'm an international graduate student living in Canada from September 2016. I didn't submit any tax forms corresponding to 2016 last year. Now, I am about to gather all required slips (T4, T4A, T2202A, etc.) of 2017. I'm wondering whether or not I can submit the forms of 2016 and 2017 simultaneously.
Answer: I just found a FAQ-based clarification here saying:

I didn't file my income taxes in previous years. Can I file taxes for
  past years now?
Yes. You can file a tax return to claim a refund for the previous ten
  years. Attach receipts for all the deductions or credits you are
  claiming. Tax forms for previous years can be downloaded from the
  Canada Revenue Agency website.


Port Android OS on PXA270 device

Question: I am working on WIN CE platform and quite new on Linux and android. I want to port android in PXA270 device running with ARM 9 processor. I googled and found, first install linux kernal, modify it according to the target device, add device drivers and install android image. Thats good but it is difficult for a new person like me. As i read somewhere that android is developed by modifying actual linux kernel(adding low memory killer, android logger etc) then why we dont use that modified android directly on our device. Is that available to use? If yes then how?
please tell... thnkx.. :)
Answer: Check out the 0xdroid project, they followed more or less the same route you want to take but for another platform (OMAP), nevertheless you'll probably learn some things from them and their project.
Maybe I'm wrong, but what you want to do looks like a major undertaking to me...
Answer: Alternatively, you can try the old Android porting for PXA27x:
    http://sourceforge.net/projects/android-pxa270/

Port Android OS on PXA270 device


Constancy of $c$ from Maxwell's Equations

Question: How do you prove from Maxwell's equations that the speed of light is independent of the motions of the sources that produce the wave?
Comment: Possible duplicate of [Exactly how is the constant measured velocity of light deduced from Maxwell's equation?](https://physics.stackexchange.com/q/14482/)
Comment: Take for example the oscillating charge. How do I prove wit Maxwell equations that the speed of the wave produced by the charge is the same if the charge is just oscillating or if the charge is oscillating and translatin?
Comment: @PeppeFabiano That's precisely the point - there *are no changes* when you consider moving sources.  It may change the form of the source terms, but that does not affect the speed of propagation of the resulting waves.
Comment: Possible duplicates: https://physics.stackexchange.com/q/1574/2451 , https://physics.stackexchange.com/q/14482/2451 , https://physics.stackexchange.com/q/77634/2451 and links therein.
Comment: I'm sorry but I think that none of these questions answer mine
Comment: What i wanr to do is, take the maxwell equations and prove that they give the same speed c when solving them in any inertial reference frame
Comment: How are the inertial frames connected? By a Lorentz transformation?
Comment: Let's assume that I do not know anything about relativity and Lorentz transformations
Comment: In classical terms, having just developed maxwell equations, how do I see from them that the speed of Light is constant in any inertial reference frame (independent of the motion of the sources)?
Comment: I know how to derive the wave equation, I just want to know what changes when I consider moving sources
Comment: @J.Murray That is exactly what I'm asking. I'm asking how does one deduce that in fact there are no changes when I consider moving sources
Comment: @PeppeFabiano Maxwell's equations lead to inhomogeneous wave equations for the electric and magnetic fields.  The speed with which those waves propagate in vacuum is $1/\sqrt{\epsilon_0 \mu_0}$, which is a constant and therefore obviously independent of the motion of the sources which generated the waves.  Beyond that, I'm not sure what you're asking.
Answer: From:
http://www.pmaweb.caltech.edu/Courses/ph136/yr2012/1202.1.K.pdf
Measuring the Speed of Light Without Light:
In some inertial reference frame, we perform two experiments using two particles, one with a large charge $Q$; the other, a test particle, with a much smaller charge $q$ and mass $\mu$. In the first experiment we place the two particles at rest, separated by a distance |∆x| ≡ r and measure the electrical repulsive acceleration $a_e$ of $q$. In Gaussian cgs units (where the speed of light shows up explicitly instead of via $\epsilon_0\,\mu_0 = 1/c^2$, the acceleration is $a_e = qQ/r2μ$. In the second experiment, we connect $Q$ to ground by a long wire, and we place q at the distance |∆x| = r from the wire and set it moving at speed $v$ parallel to the wire. The charge $Q$ flows down the wire with an $e$-folding time τ so the current is I = dQ/dτ = (Q/τ)e−t/τ. At early times 0 < t ≪ τ, this current I = Q/τ produces a solenoidal magnetic field at q with field strength B = (2/cr)(Q/τ), and this field exerts a magnetic force on q, giving it an acceleration $a_m = q(v/c)B/μ = 2vqQ/c2τr/μ$. The ratio of the electric acceleration in the first experiment to the magnetic acceleration in the second experiment is $a_e/a_m = c2τ/2rv$. Therefore, we can measure the speed of light c in our chosen inertial frame by performing this pair of experiments, carefully measuring the separation r, speed v, current Q/τ, and accelerations, and then simply computing c =  (2rv/τ)(ae/am). The Principle of Relativity insists that the result of this pair of experiments should be independent of the inertial frame in which they are performed. Therefore, the speed of light c which appears in Maxwell's equations must be frame-independent. In this sense, the constancy of the speed of light follows from the Principle of Relativity as applied to Maxwell's equations.
Comment: Thank you very much! So basically if I trust the principle of relativity, waves created by the acceleration of the particle in both expirements will have the same speed! Very clever


Numbers are always in the right side

Question: Why is the number always appear on the right side? I already set the language to English: USA and the font to Arial, not Arabic.
Answer: The alignment must also be set to the Left margin. That's the first setting to check.
Format > Text > Align > Left
If the alignment is correct, you must also specify that the writing direction is left to right or LTR to get the writing to start on the left margin for some text layout software.
Format > Text > Paragraph - Writing Direction > Left to Right

Numbers are always in the right side


Posting YouTube video to Facebook

Question: If a YouTube video is posted on Facebook, do the views still count on YouTube every time the video is accessed through Facebook?
Answer: YouTube counts views regardless of what site the video is embedded in.
One of the analytic reports they offer is Playback Locations which details which includes the following metric (amongst others)

Embedded players on other websites: This shows how many people viewed your video when it was embedded on another website, like a blog. Click on the link to drill down to a breakdown of views across the various sites that have embedded your video.

Posting YouTube video to Facebook


discontinuity in dependency grammar

Question: According to Wikipedia, only about 15–25% of actual sentences contain a discontinuity, and the percentage of discontinuous dependencies is even much less, approximately 1–2%. What confuses me is that sentences containing a discontinuity do not equal to discontinuous dependencies based on this explanation. Can somebody list a example to clarify the situation that can differ the situation between the two?
Answer: The next two trees are taken from the article in Wikipedia on discontinuities in syntax.

The parse on the left is a phrase structure analysis. The parse on the right is a dependency structure analysis. Both parses show a projectivity violation (= a discontinuity), as there are crossing lines. According to the numbers cited in the question, this sentence is therefore one of the 15-25% of the sentences in natural language that contain a discontinuity. Topicalization, wh-fronting, scrambing, extraposition are all mechanisms of syntax that can or must result in such discontinuities.
Now look at the dependency tree on the right more closely. That tree contains four dependency edges. Only one of those dependency edges extends across the dotted vertical projection lines. Hence there is only one dependency out of four that is discontinuous. Thus, only 25% of the dependencies in the tree are discontinuous. Taking 25% of 10-25%, one arrives at a much lower number for the overall percentage of discontinuous dependencies in the sentences of natural language. Note that the sentence here contains only 4 dependency edges and is thus a rather short sentence. Most sentences contain more dependencies, which means that the percentage of discontinuous dependencies in those sentences that contain a discontinuity comes down to a smaller number (smaller than 25%). Put all this together, and I think one can now see how Wikipedia arrives at the number of just 1-2% discontinuous dependencies altogether.
Comment: Got it. The 1-2% of  discontinuous dependencies refer to the particular edges that violate projections, which makes them the  numerators in discontinuous situations. Very clear explanations!

discontinuity in dependency grammar


What issues will I have when combining a RD-4700-GS SHIMANO TIAGRA (Rear Derailleur,Medium Cage,10-spd) with a SHIMANO DEORE 10-Spd, 11-36T Cassette?

Question: I have a RD-4700-GS SHIMANO TIAGRA (Rear Derailleur,Medium Cage,10-speed) and a CS-HG50-10 (SHIMANO DEORE, 10-Speed, 11-36T MTB Cassette Sprocket). However, the RD-4700-GS is compatible with a Low sprocket_Max. of 34T (Front double) 32T (Front triple) as on the shimano website. What issues can I expect if the sprocket teeth ratios are different? And how perhaps can I resolve this incompatibility?
Answer: Most likely it'll work assuming you don't exceed the derailleur capacity. Shimano specs components by using perfect shifting as the rule. If you exceed the specifications, usually you'll first have slightly less than perfect (but still good enough) shifting before it ceases to work.
By selecting suitably sized chainrings, you can avoid the cassette gearing causing derailleur capacity problems, but chainrings are so expensive that I'd say if you exceed the capacity it's probably easiest to use the 11-34T cassette for which it is intended. However, in today's market you may not find a cassette of the proper gearing and if you do it's likely to go out of stock tomorrow if you don't buy it already today, and if you buy it, the price will be 50% higher than previously.
Comment: You have to adjust the B-tension screw to move the derailleur a bit further from the cassette if using 11-36T cassette on 11-34T derailleur. An inoptimal B-tension adjustment means the shifts might be bit sluggish. I'd say the 34T vs 36T mismatch is so small it's probably not a big issue.
Comment: The capacity is calculated as follows: big ring - little ring + big sprocket - little sprocket. Example: 34T/50T and 11-36T is 16T + 25T = 41T. If your derailleur has less than 41T capacity, this setup will not work.
Comment: "Can you give me a bit more details on why a 11-36T cassette won't work on a max 11-34T compatible rear derailleur?" The upper derailleur jockey wheel might hit the big sprocket, even with the B screw at the maximum. There are "workarounds" like the Wolf Tooth RoadLink™ which simply moves the derailleur further away from the sprockets.
Comment: Thanks for your response. Can you give me a bit more details on why a 11-36T cassette won't work on a max 11-34T compatible rear derailleur? I'm trying to understand what issues will I face in shifting etc. How will I know if I exceeded my derailleur capacity?


Why are polynomials tangential to the $x$ axis at real double roots?

Question: If $(x-a)^2$ is a root of a polynomial, then the graph will be tangent to the $x$ axis at $x=a$ but why? I know this is always the case for real double roots however I do not know the explanation for this behavior. Does this behavior apply to all real polynomial roots with even index multiplicities?
Answer: First a comment
Saying that $(x-a)^2$ is a root of a polynomial $p(x)$ is an improper wording. You should say that $(x-a)^2$ divides $p(x)$ or that $a$ is a root of $p(x)$ of multiplicity at least equal to $2$.
Regarding your question
So you suppose that $p(x) = (x-a)^2q(x)$. Then taking the derivative you get
$$p^\prime(x) = 2(x-a)q(x) + (x-a)^2 q^\prime(x).$$
Therefore you have $p(a)=p^\prime(a)=0$. Proving that the graph of the function $x \ \mapsto p(x)$ is tangent to the $x$-axis at $x=a$.
Answer: You can prove this easily using calculus, but I'll give an even more elementary argument.
The graph of $f(x)=(x-a)^{2}$ is an upward facing parabola. In particular, it is the graph of $f(x)=x^{2}$ shifted to the right by $a$ units (if a is positive).
Note that, being a square, $(x-a)^{2}$ is always greater than or equal to $0$. And it is only equal to $0$ at $x=a$.
Combining the above two observations, the graph of $f(x)$ is tangent to the $x$-axis at $x=a$.
Comment: The OP is asking about _any_ polynomial that has $(x-a)^2$ as a factor, not just $(x-a)^2$.


How to use the word "less/fewer" correctly?

Question: I want to express a thought which sounds like "Rick has eaten 8 candies and 3 pieces fewer of a pie" which means that Rick has eaten only 5 pieces of pie. Does my sentence soung grammatically correct or maybe there is some other way how to formulate that thought correctly?
Comment: Is this the actual phrase you want to say?  Is there some reason you can't say "8 candies and 5 pieces of pie"?   Is there some reason that you need to formulate it in that odd subtractive way?
Comment: Yes. It is a math exercise. The idea is to ask 'How many pieces of a pie has Rick eaten". So I need to somehow formulate that condition that Rick has eaten 8 candies and fewer pieces of a pie. I'm just not sure how to make it sound right given all the conditions.
Answer: It is much easier if you keep the object that is being counted the same. It makes the comparison easier.

Rick has eaten 8 candies. Susan has eaten three fewer candies than Rick.
Rick has eaten 8 candies. He has also eaten three fewer pieces of pie than candies.

It might be better to phrase it additively

Rick has eaten 8 candies. This is three more than the number of pieces of pie that he has eaten.


How can I bypass the "first setup"?

Question: Is there a way to bypass the first setup screen, that shows up during first boot of a new/stock ROM or after factory reset?
Answer: Yes there is, after the phone is opened and SetupWizard is on, starting with top-left corner of the screen, all corners must be tapped once, in a clockwise  direction. (Top left, top right, bottom right, bottom left to be more specific)
It can be hard to do it properly at first try so if it doesn't work, just try again.
Here's a walkthrough video.
Comment: @sgon00 You should take into account the fact that answers are written for the time that they are written. No one can predict how future functionalities will behave. Also, it is a well established method. It is not even a workaround or hack. It is a feature. If you can't run a feature, it is a mistake or error on your end, not the answer's.
Comment: Why the downvote?
Comment: Because it doesn't work. I am looking for a way to create a config file somewhere so that I can upload it to the phone. Now, I can access the file system of my android. But I just can't bypass the stupid "select language" screen.
Answer: Today the answer is most likely no, this is not possible to skip the initial setup due to FRP.
From https://www.androidcentral.com/factory-reset-protection-what-you-need-know

Factory Reset Protection (FRP) is a security method that was designed to make sure someone can't just wipe and factory reset your phone if you've lost it or it was stolen.

How can I bypass the "first setup"?


Technical requirements applicable to IT department for GDPR

Question: In order to prepare for GDPR, what is required from an IT department to ensure Data protection for the business.
Comment: That is a massively broad question I'm afraid! And we know nothing about your organisation. Public? Private? How sensitive is the data it holds? Also, hopefully you realise that Data Protection is **not** an IT issue as such. It is a data governance issue and largely the responsibility of the business. IT's role is to ensure that the technical security capabilities are available and properly used.
Comment: There is a slew of requirements. Some companies offer readiness tools like Nymity and OneTrust. Go through a self assessment and then you'll see the scope of your work for the next year and a half.
Comment: You basically want to adopt a IT Security Management System and implement its controls. For example ISO 27002. There are a number of compatible frameworks by national bodies for smaller companies. While GDPR does not mandate a specific management system you would have a hard time to,explain why not use an accepted international standard.
Answer: The general Data Protection Regulation doesn't require a massive amount of technical understanding. They would need to know about the technical Infrastructure of the organisations and all the locations personal data is stored, processed and in transit, making it easier to handle Subject Access Requests.
The company would need a reasonable understanding of security, ensuring adequate security controls and procedures are in place. This also goes for personal data stored on paper, ensure they are also secure.
Comment: The question was not about DPOs. (And, b) DPOs are mostly optional in the GDPR, and c) DPOs are NOT the single person who needs to do anything with the GDPR. It affects everyone).
Comment: @user155462 Sorry I miss-read the question but amended accordingly. Yes DPOS are applicable under certain circumstances. But when they are required they are the main person to ensure all employees are aware of what is needed to adhere.
Answer: From GDPR, article 24 (emphasis added):

Taking into account the nature, scope, context and purposes of processing as well as the risks of varying likelihood and severity for the rights and freedoms of natural persons, the controller shall implement appropriate technical and organisational measures to ensure and to be able to demonstrate that processing is performed in accordance with this Regulation. Those measures shall be reviewed and updated where necessary.
Where proportionate in relation to processing activities, the measures referred to in paragraph 1 shall include the implementation of appropriate data protection policies by the controller.

GDPR says that personal data must be taken seriously, but the amount of time /effort / money you are expected to spend to protect this data doesn't need to be excessive. Everything is expected to be "proportionate" or "appropriate". The problem is nobody is going to tell you what is appropriate. Is installing a body scanner in front of your server room going to be overkill or not? They will tell you it depends on what those servers are used for, or on how much money to waste you have. And since I'm afraid nobody will tell you for sure how much your data is worth (what would be the value of a phone number? Who knows?), I think it all boils down to the resources you have. So if you own a multi-million-dollar company and there is a data breach, you can't make up an excuse like "I'm sorry mister officer, we didn't have the time and the money to pay a knowledgeable person to change the default passwords of the WIFI!" And if you are a freelance that only makes a few $K a year I don't think you will be expected to set up a full body scanner in front of your room to protect the personal data of your clients.
A few examples that probably apply to almost everyone:

encrypted hard disks on every device (PCs, smartphones, etc.)
encrypted backups
up-to-date operating systems and software
good passwords for everyone (all different and strong, managed by password manager)
enforce some good practices (for example every employee's phone must have the screen lock enabled, no employee can use personal USB keys to bring any data at home, etc.)

If the IT department (and all the company) has been following the usual best practices then there's probably not much more to do.
This is the way I see it, in general, but to me situation isn't clear yet even though the law is supposed to be effective in a few days, because there are still a lot of special cases that need to be clarified (hopefully, sooner or later) by the legislators or the responsible bodies in each EU country. Fro example, in the future the legislator or some authority in your country (in the EU) might decide that for GDPR compliance some specific kinds of businesses must follow some kind of specific guidelines (like some ISO standard, like eckes suggested in a comment).


How to use .bdc dictionary on Ubuntu?

Question: I have some .bdc files which I run on babylon dictionary on windows.
but I can't run them on Goldendict (I have to say I run .bgl on Goldendict).
Is there any other dictionary on Ubuntu to run .bdc files or Is there any way to convert .bdc to .BGL?
Answer: Same question here https://superuser.com/questions/852663/using-bdc-files-in-goldendict/1315601
The project https://github.com/ilius/pyglossary tried to do that conversion but the developer seems to have abandoned the idea
BDC files are encrypted and proprietary files so it's even illegal to convert them
What i advice you is to search google with the file you want to convert and add bgl to your search request, you will probably find what you look for because most dictionary are old and they have been in bgl format before being distributed as bdc
Also there is a huge catalog of free bdc dic on http://www.babylon-software.com/free-dictionaries i guess you will find most of your bdc there in bgl format.
Answer: Use pyglossary -- I think that tool might be able to convert BDC to BGL.
Comment: unfortunately pyglossary can not do that

How to use .bdc dictionary on Ubuntu?


Can someone own multiple death notes?

Question: I know from this question that a death note could only belong to one person at a time, but I was wondering if the opposite was true--that one person could own multiple death notes. Could, say, that person go around killing the owners of death notes and stealing them in an effort to do something like own all of the death notes?
Comment: yes. Light had two death notes after Rem died for example.
Answer: Apparently yes, there are rules about how the Death Note works if someone has more than 1. These rules are stated in How to Use: XXIII

Whenever an individual with ownership of more than two Death Notes loses possession to one of the Death Notes, he will not be able to recognize that Death Note's god of death's appearance or voice anymore. The god of death himself will leave, but all the memory involving that Death Note will remain as long as he maintains ownership of at least one other Death Note.

And in How to Use: XXXII

If someone possesses more than one Death Note, by visualizing the victim, then writing down the name in one of the Death Notes and the cause of death in the other, it will take effect. The order however, is unimportant, if you write down the cause of death in one Death Note and afterwards, write the name in the other, it will take effect.

We also see Light owning 2 Death Notes in Episode 25 - Silence and in Chapter 58 - Feelings Within. while the scenes play out differently in both Light becomes the owner of Rem's Death Note after she has died. in Death Note: The Last Name we however never see this as Rem destroys her Death Note in the equivalent scene.
There is however a limit of 6 Death Notes that a single persona can own. This is because only 6 death Notes can be active as it is stated in How to Use: LII, Point 1

In the event that there are more than 6 Death Notes in the human world, only the first 6 Death Notes that have been delivered to humans will have effect.

One can assume "ownership" will not work unless the Death Note is active, so the 7th Death Note can probably be passed around. But when one of the currently active 6 is removed (destroyed or taken back to the Shinigami Realm), the person currently holding the 7th will become the owner.
Comment: Didn't Light own two for a short while when Misa Misa was in L's custody and Light was preping to go into custody.  I know that the Shinigami had ownership during that time too so it is a little jumbled and I don't remember the exact sequence of events.
Comment: Didn't Light own two note books when Rem died? He obtained one from his father and one from Rem afaik
Comment: @kaine i was for sure that Rem still owned Misa's Death Note at the time unless your talking about when Light, Rem and Ryuk was swapping around the Death Notes in which case i'm a bit confused too. i'll edit the first paragraph just in case
Comment: I was talking about the swapping.  If I rewatched I could figure it out.
Comment: @PeterRaeves your right, i must have been remembering The Last Name where when Rem was dying from having killed L and Watari she also destroyed her own Death Note

Can someone own multiple death notes?


Is it legal to profit from an open source software

Question: I am planning on making a service that uses a modified open source software. Would it be legal for me to profit from it? I am not sure what information would be relevant to this so if I have missed some relevant info, please tell me what additional information is required to determine this.
Comment: "Open source" can refer to any of a number of different licenses.  Most of them would allow this but some might not.  Which license applies to the software in question?  (It's often in a file named `LICENSE` or `COPYING`).  You may be able to answer your question for yourself by reading the license.
Comment: @NateEldredge Any license that conforms to the Open Source Definition allows commercial use.
Comment: Are you planning on distributing the software, or just using it internally, e.g. to power a web site? This makes a big difference in most open source licenses.
Answer: Generally yes. The concept of 'free software' is almost identical Open Source, and one of the four fundamental freedoms is the freedom to run the software for any purpose. That includes seeking profit.
Answer: Yes, you can use open source software commercially. The Open Source Initiative (OSI) says:

Can Open Source software be used for commercial purposes?
Absolutely. All Open Source software can be used for commercial purpose; the Open Source Definition guarantees this. You can even sell Open Source software.
However, note that commercial is not the same as proprietary. If you receive software under an Open Source license, you can always use that software for commercial purposes, but that doesn't always mean you can place further restrictions on people who receive the software from you. In particular, copyleft-style Open Source licenses require that, in at least some cases, when you distribute the software, you must do so under the same license you received it under.

When using code from a copyleft license, the question then becomes whether you need to share your derivative source code. This depends on which copyleft license was used and what your program is doing with the code, as some licenses have what is known as the SaaS loophole which would allow you to use copyleft code server side without needing to release your code.
See also OSI's list of open source licenses.
Answer: It depends on what license you obtained the open source software under.
Some open source licenses require you to not use the software for commercial purposes. For example, the CC BY-NC 3.0 license requires that you do not use the software (including derivatives) for commercial purposes.
Some open source licenses, on the other hand, explicitly permit the software to be used for commercial purposes, with some requirements. For example, the MIT license explicitly permits the sale of the software.
Some open source licenses, such as the GPL, have requirements that make it very difficult to sell the software directly (for example, because anyone who obtains a copy of it gains the legal right to redistribute it to anyone for no cost), but it is permitted under the license to sell derivative programs, with certain restrictions (for example, the GPL requires you also make the source code available, and if you edited the source code, the GPL requires that you indicate such, and make the edited source code available).
In order to determine whether you are permitted to profit by providing a service using a modified open source software, you should read the license under which you obtained the software. It is also prudent to get the aid of a lawyer so as to make sure you don't misunderstand the license.
Comment: In the case of GPL software, what people usually sell are services related to the software: Packaging (e.g. Linux distros), support contracts, and training.
Comment: It can under certain very specific market conditions be possible to economically sell GPL software. One example of this is Ardour, where the combination of small market size, and relatively non-technical market means they are able to charge for builds, and no one has tried to organize a redistribution of those builds.
Answer: You are allowed to sell open source software for any amount you like. You are allowed to charge reasonable cost for supplying the source code. You are not allowed to charge anything for the license. And of course modified open source software may only distributed with an open source license.
Comment: "Modified open source software may only be distributed with an open source license" - that's true of a GPL-like license.  It is emphatically *not* true of MIT-like licenses.
Comment: This is plain wrong.
Comment: This is dangerously incorrect. Open source software made available under CC BY-NC 3.0 may not be sold by the licensee, and doing so may open you to a lawsuit.