WCF service on Windows Azure - connecting to on-premises SQL Server database

Question: Is it possible to have a WCF service that is running on Windows Azure communicate with a local / on-premises SQL Server database?
Alternative options we're considering are:

Push the 4 SQL Server databases that the WCF service needs to gather and process data from up to a Azure VM
Create 4 SQL Azure "clones" of the local / on-prem SQL Server databases and use the data sync feature to keep the Azure clones in sync with the local data.

Ideally, we'd like to be able to expose the on-premises database (via the VPN) to the service and hit each of the databases directly.
Answer: Actually, an easier solution would be to host your WCF service internally and expose the service via an Azure Service Bus Relay. The service bus relay supports multiple authentication types for securing the service and no VPN is required.  There is a good walk-thru here - .NET On-Premises/Cloud Hybrid Application Using Service Bus Relay.  We have successfully used this technique to expose several services to third-party vendors.
Answer: Yes, you can make outbound connections from any Azure hosted service, whether running in web sites, cloud services or virtual machines. If you need traffic going through a VPN, you'll need to use cloud services or virtual machines, since web sites can't be added to a virtual network.
Answer: you can set up Site-to-site VPN as shown in this resource - Step-By-Step: Create a Site-to-Site VPN between your network and Azure
I would think of SQL Data Sync for scheduler times and that too for small amounts of data (at least not in millions)


Reading the local password policy programmatically

Question: Are there Windows API functions that allows reading what the current password policy is?  For instance, minimum length, complexity etc.
If not reading, is there a way to verify a password against the policy programmatically?
Answer: See Security Watch Windows Domain Password Policies. You can hit AD using ADSI or its wrappers. I found a VBScript sample. You can translate it to any language you want:
Sub ListPasswordPolicyInfo( strDomain )
    Dim objComputer
    Set objComputer = GetObject("WinNT://" & strDomain )
    WScript.Echo "MinPasswordAge: " &  ((objComputer.MinPasswordAge) / 86400)
    WScript.Echo "MinPasswordLength: " &  objComputer.MinPasswordLength
    WScript.Echo "PasswordHistoryLength: " &  objComputer.PasswordHistoryLength
    WScript.Echo "AutoUnlockInterval: " &  objComputer.AutoUnlockInterval
    WScript.Echo "LockOutObservationInterval: " &  objComputer.LockOutObservationInterval
End Sub

Dim strDomain
Do
    strDomain = inputbox( "Please enter a domainname", "Input" )
Loop until strDomain <> ""

ListPasswordPolicyInfo( strDomain )

As a bonus, check out LDAP Admin. It's an open source LDAP directory editor, which you can use to test things, and also checkout the code written in Delphi.
Answer: Eugene's answer is helpful, but not quite what I needed. The password complexity filter can actually be customized, and what would be good would be a way of asking Windows, does this password meet the requirements?
It took me a while to locate it, but the function is NetValidatePasswordPolicy. The MSDN docs for this function are awful; check out this MSDN blog entry instead.
Answer: Querying ActiveDirectory only works for computers joined to a domain; and where the user has the ability to query the domain controller (which is something that can be un-granted).
@NicholasWilson's answer of using NetValidatePasswordPolicy is a good one; as it can do a lot of heavy lifting for you. It can even perform password quality checks that you would have to re-implement yourself. But NetValidatePasswordPolicy does fail as examining your custom password history when you use salted hashes to store passwords (e.g. BCrypt or Scrypt).
But the real question is how to query for the current machine's (even an non-domain joined machine's) password policy. You can query that using:
NetUserModalsGet
struct USER_MODALS_INFO_0
{
    DWORD usrmod0_min_passwd_len;
    DWORD usrmod0_max_passwd_age;
    DWORD usrmod0_min_passwd_age
    DWORD usrmod0_force_logoff;
    DWORD usrmod0_password_hist_len;
}
PUSER_MODALS_INFO_0 = ^USER_MODALS_INFO_0;

PUSER_MODALS_INFO_0 info0;

NET_API_STATUS res = NetUserModalsGet(nil, 0,  out info0);

if (res <> NERR_Success)
   RaiseWin32Error(res);
try
   //Specifies the minimum allowable password length.
   //Valid values for this element are zero through PWLEN.
   Log(info0.usrmod0_min_passwd_len);

   //Specifies, in seconds, the maximum allowable password age.
   //A value of TIMEQ_FOREVER indicates that the password never expires.
   //The minimum valid value for this element is ONE_DAY.
   //The value specified must be greater than or equal to the value for the usrmod0_min_passwd_age member.
   Log(info0.usrmod0_max_passwd_age);

   //Specifies the minimum number of seconds that can elapse between the time
   //a password changes and when it can be changed again.
   //A value of zero indicates that no delay is required between password updates.
   //The value specified must be less than or equal to the value for the usrmod0_max_passwd_age member.
   Log(info0.usrmod0_min_passwd_age);

   //Specifies, in seconds, the amount of time between the end of the valid
   // logon time and the time when the user is forced to log off the network.
   //A value of TIMEQ_FOREVER indicates that the user is never forced to log off.
   //A value of zero indicates that the user will be forced to log off immediately when the valid logon time expires.
   Log(info0.usrmod0_force_logoff);

   //Specifies the length of password hi'+'story maintained.
   //A new password cannot match any of the previous usrmod0_password_hist_len passwords.
   //Valid values for this element are zero through DEF_MAX_PWHIST
   Log(info0.usrmod0_password_hist_len);
finally
   NetApiBufferFree(info0);
end;


Trying to understand the irrationality criterion with examples.

Question: If the irrationality criterion below is wrong feel free to edit this post.
The irrationality criterion, as far I understood is that if exists sequences $p_n,q_n (n=1,2,3,...)$ where $p_n,q_n$ are integers then the number $\alpha \neq p_n/q_n$ is irrational if
\begin{align}
\left| \alpha -\frac{p_n}{q_n}\right|<\frac{1}{q_n^{1+\delta}}
\end{align}
where $\delta>0$.
If we multiply everything by $q_n$ we have $|q_n\alpha-p_n|<1/q_n^\delta$ so assuming that $\alpha=r/s$ with both $r,s$ integers, we find a integer in the interval $(0,1)$ because $\delta>0$, which is a contradiction.
So we must find sequences that $p_n,q_n$ such that $p_n/q_n$ converges very quickly to $\alpha$. How does one create such sequences and how to find $\delta$ ? I guess they don't fall from the sky.
For example, how we prove that $e$ is irrational using this criterion?
$$\left| e -\frac{p_n}{q_n}\right|<\frac{1}{q_n^{1+\delta}}$$
Answer: $e$ is rather exceptional in that it has a closed-form continued fraction:
$$e = [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8,\ldots]$$
The corresponding convergents $p_n/q_n$ are
$$ 2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536, \ldots $$
which satisfy your inequality with $\delta = 1$.
Of course, if you have the continued fraction you really don't need your criterion: any non-terminating simple continued fraction represents an irrational number.


Critique this map with many labeled points. Is there a better way to do this?

Question: This is the centerfold map in a booklet printed for the homeless. The numbers represent the page number that the information on each service provider is also found. We are limited to black and green for two color printing.
It looks too busy and we would love other ideas on how do label a map like this. Thoughts?
Comment: If the labels are to look up what number is for what service, why is this list alphabetically sorted?
Comment: we need more info: **dimensions of the booklet?** why green, gray and black streets? is this page a double page(folded) or a single page? why that "4" is white?
Comment: @Jongware i think it's because you first look for a service and then see where it's located. And if you look for a service, alphabetical order is the best option. Seems pretty clear to me.
Comment: These two pages are the centerfold of a booklet on homeless service providers.
Answer: We need to understand how a user will utilize this map. Will a person be looking up a place by name (in which case the alphabetized list makes sense) or by location (in which case everything should be sorted by number) or some other way (maybe by categorization?)
I'd also ask some questions:

is there significance between black roads and green roads?
is knowing relative location on a map more or less important than knowing exact addresses?
are roads the best landmarks for this particular region?
can you use a larger piece of paper? Or split the map into two separate centerfolds?
is there significance to the current splitting of the list into 3 groups?
is there significance to the fact that some locations are a single number, while others are a number+letter?
Answer: Your map is busy for three reasons: you have too many gray lines which clutter up the background, your labels are crowding all the white space, and you are "zoomed out" too far.

Take out every road or transit line which isn't necessary. That will
reduce some of the line density.
Remove the labels from this map. Put them on the other side of the
paper, on a foldout panel, or another page altogether.
Once you remove the labels, you will have more white space in your
live area, and you can make your actual map larger. This will
increase the space between your critical roads/transit lines, which
will help it look less cluttered.
Comment: This is the only space we have to work with. Many of our homeless friends can barely read. Having the labels on a second page where they have flip back/forth won't work. Do you have any suggestions about a different kind of label or position marker? This is the bare minimum of streets. Every street left (and we removed hundreds) is necessary. Also, the font size cannot be any smaller.
Comment: @OurCalling: can you simplify the map by straightening out the roads that lead off the center? I.e., similar to what [Henry Charles Beck](http://en.wikipedia.org/wiki/Harry_Beck#London_Underground_map) did -- maybe a bit less radical.
Comment: @Jongware that's not a bad suggestion, but do note that the underground map simplification works a lot better than road simplification as there's no need to be accurate as the user doesn't have to deal with way finding beyond knowing the stops when on the tube. When driving (or walking) scale and proportion is a lot more critical as you're the one navigating.
Comment: Dallas doesn't have a tube. Most of the homeless population in Dallas is limited to walking.
Answer: Are those homeless people able to easily navigate through numbers and other encoding?
I propose to replace these solid labels+numbers (that now overlap the actual distinguishable location on a map) with simple points and lines leading out of there to each item in the list:

And list items, in their turn, are to be organized:
a) into category groups;
or even better:
b) in the way that makes the best (neat, rhythmic) composition of the lines leading to a map point.


Verifying Modular exponentiation operation in etherum

Question: I have Alice who should do some cryptographic operations off-chain. Then a smart contact has to verify equality by performing Modular exponentiation operation.
I attached an image of the off-chain and on-chain operations. Is there any library that can verify the last equality in the image. I tried to write the math here, but writing math equations is not allowed.
Answer: From the answer of @Julien Marchand it's possible to create the function viewing the attributes of the precompiled contract:
https://github.com/ethereum/go-ethereum/blob/master/core/vm/contracts.go#L226
Address: 0x05 https://github.com/ethereum/go-ethereum/blob/master/core/vm/contracts.go#L56
The verify function is untested but maybe could help.
pragma solidity ^0.5.8;

contract ModularCheck {

    // Untested code
    function verify(uint256 _D, uint256 _C, uint256 _c, uint256 _h, uint256 _z, uint256 _g, uint256 _l, uint256 _modulus) public returns (bool){
        uint256 exp1 = modExp(_C, _c, _modulus);
        uint256 exp2 = modExp(_h, _z, _modulus);
        uint256 exp3 = modExp(_g, _l, _modulus);

        if(_D == mulmod(mulmod(exp1,exp2, _modulus),exp3, _modulus)) return true;

    }

    function modExp(uint256 _b, uint256 _e, uint256 _m) public returns (uint256 result) {
        assembly {
            // Free memory pointer
            let pointer := mload(0x40)

            // Define length of base, exponent and modulus. 0x20 == 32 bytes
            mstore(pointer, 0x20)
            mstore(add(pointer, 0x20), 0x20)
            mstore(add(pointer, 0x40), 0x20)

            // Define variables base, exponent and modulus
            mstore(add(pointer, 0x60), _b)
            mstore(add(pointer, 0x80), _e)
            mstore(add(pointer, 0xa0), _m)

            // Store the result
            let value := mload(0xc0)

            // Call the precompiled contract 0x05 = bigModExp
            if iszero(call(not(0), 0x05, 0, pointer, 0xc0, value, 0x20)) {
                revert(0, 0)
            }

            result := mload(value)
        }
    }
}

Comment: @albeerto, can I test this code on remix. or should I have account on etherum blockchain to call the contract at 0x05
Comment: You can test the contract on remix.
Comment: But remix has the precompiled contract 0x05 ? in other words, on the current time, I do not have access to the real etherum blockchain so can I test it locally on remix
Comment: Yes, it has, you only need to copy the code and paste on remix. If you prefer, copy only the function modExp()  to your contract.
Comment: Could you please suggest how can I create values to test your answer. In other words, How to generate values for D,C,c,l,z to test your contract.
Comment: These values are generated offchain (as you say, and I don't know how to generate them), thus the `verify` function is untested. I only wrote the verify function to show how to use `modExp()` for your particular case. `modExp()` function can be tested passing the base, exponent and modulus as attributes of the function.
Answer: Modular exponentiation can be computed on Ethereum using a precompile, which is included in all client implementations since the Byzantium fork (cf EIP-198) at address 0x05.
Precompiles can be called from a Solidity smart-contract using assembly code.
I couldn't find a proper smart-contract calling the modular exponentiation precompile but as an example, calling the ecmul (at address 0x07) can be done using the following code:
  function ecmul(uint256 x, uint256 y, uint256 scalar) public constant returns(uint256[2] p) {
    // With a public key (x, y), this computes p = scalar * (x, y).
    uint256[3] memory input;
    input[0] = bx;
    input[1] = by;
    input[2] = scalar;
    assembly {
      // call ecmul precompile
      if iszero(call(not(0), 0x07, 0, input, 0x60, p, 0x40)) {
        revert(0, 0)
      }
    }
  }

Comment: I want to test the code in practice, what should I do?


Does it matter what kind of sugar is used in baking?

Question: The baking recipes I use specify many kinds of sugar e.g. caster, raw, white, soft etc.
Generally, I always just use raw sugar, mainly for convenience.
Does it really make a difference?
Answer: Yes!
Sugar is often used as a "wet" ingredient in baking.  That means it needs to be dissolved in the water in order to prevent too much gluten from being produced (making the result fluffy/flaky, and not chewy).  Different sugars hold different amounts of moisture (for example, brown sugar holds more than white) and using sugar with crystals that are too large (or too small) will make the texture come out completely wrong.  Too small and your cake will be rubber; too large and your biscuit will fall apart.
Also, if you're using the sugar for creaming (with fat), you generally need to use a coarser sugar.  Superfine sugar will dissolve too quickly and won't allow enough air to be incorporated.  Confectioner's sugar is good for creaming but has completely different properties from crystal sugar - it's been "processed" and has cornstarch added, so you can't just substitute in equal quantities.
Of course, it goes without saying that the taste is different as well.  But even more important than the taste are the solubility characteristics which, as explained above, will have noticeable effects on other parts of the recipe.
It does depend what you're baking; if the sugar is being used purely for flavouring, then you can use whatever sugar you like.  Much of the time in baking though, sugar is used for more than just sweetening, and it's important to be aware of that.  If the sugar is being creamed or dissolved, don't substitute unless you're sure you know what you're doing.
Comment: I wanted so badly to post "Of course it does!" but I just couldn't quantify what I knew to be true. This answer is right on the money.
Comment: and sometimes we want fast disolving from superfine sugar (eg, in meringue)
Comment: Good point @Joe.  I've always associated meringues with confectioner's sugar, which is... er, super-duper-uber-fine. :)
Comment: +1, would be +10 if I could. Truly excellent answer.
Answer: There's also a difference between brown and white sugar even though they have roughly the same texture/consistency. Cookies will be chewier if you use more brown sugar.
Comment: Because brown sugar, honey, molasses, and corn syrup are all very hygroscopic (have ability to pull moisture from their surrounding atmosphere), they are often used when a softer chewier outcome is desired. Cookies made with all brown sugar will soften upon sitting a day or two from absorbing atmospheric moisture. White sugar crystallizes upon cooling and will produce a crisp texture. As far as white and brown sugars go, you can substitute one for the other, measure for measure.
Answer: Yes, very much so.
There are many types sugar: icing/confectioners sugar, light brown sugar, dark brown sugar, caster/super fine sugar,Demerara sugar, granulated sugar to name just a few.
Each of these (with the exception of brown sugars and Demerara) can be also found in a 'raw' form (as opposed to 'white') where the molasses (a dark, treacle-like by-product of sugar production) is added back into the sugar resulting in a darker sugar. These raw sugars can be substituted into any baking product specifying for white sugars (as can white sugar visor-versa) resulting in products with a  more pronounced 'caramel' flavour. The only thing to note is that raw sugars in a meringue results in a softer meringue.
Icing sugar is generally only used in frostings and icings, particularly in 'quick frostings' and glacé icings. In cake products they give the finished product a drier, almost 'crusty' result. However, they are used in melting moment biscuits.
Caster sugar and granulated sugar can be substituted for each other, although using caster sugar creates better meringues which 'melt in the mouth' better as the finer crystals are more easily dissolved. Saying that, it wouldn't be a disaster at all if granulated sugar was used.
Brown sugars have more moisture in them due to the presence of more molasses but can also be substituted in most uses. Dark brown sugar has more molasses than light brown sugar.
Demerara sugar is often used in crumble toppings and occasionally in some biscuits owing to its coarse texture. However it is not often found in cakes or frostings.
Answer: I make Biscotti and have had great success in following my own recipe, however when visiting my daughter who uses only raw sugar, when I added it to the beaten eggs and melted butter it changed the whole structure of the cookie.  It puffed up like a huge marshmallow, however I continued to add the rest of the ingredients.
Upon baking the loaf, it did not raise as expected, it was somewhat raw in the middle of the cookie and it required a much longer time to be completely baked. It tasted great, but I do not recommend using raw sugar in baking unless you do some research first.


Stop Apache gracefully

Question: Is there a way to stop the Apache server without terminating executing requests, basically a way to tell it - don't accept any more connections and shut down when you finish your current ones?
Answer: Yes.
apachectl -k graceful-stop

https://httpd.apache.org/docs/2.4/stopping.html
Comment: Why the `-k`? I cannot find any documentation for that flag.
Comment: -k: This is an option used to send signals to the Apache processes.
Answer: Use apachectl -k graceful-stop from here:

The WINCH or
  graceful-stop signal causes the parent process to advise the children
  to exit after their current request (or to exit immediately if they're
  not serving anything). The parent will then remove its PidFile and
  cease listening on all ports. The parent will continue to run, and
  monitor children which are handling requests. Once all children have
  finalised and exited or the timeout specified by the
  GracefulShutdownTimeout has been reached, the parent will also exit.
Answer: Keep in mind that sys-v init used to do graceful stop by default and had force-stop as an extra option. A "special" option to gracefully stop is only needed if you run a custom process manager that normally kills processes.
Comment: @B.Miller if your systemd performs a stop instead of a graceful-stop, that's an OS-specific bug that needs to be logged. Arch Linux and CentOS 7 both perform graceful stops.
Comment: Interesting @JohnKeates ... maybe this is Ubuntu 18.04 specific. 18.04 uses the stop command `/usr/sbin/apachectl stop`
Comment: This answer could give the impression that because `systemd` isn't a custom process manager it doesn't kill the process. However, by default systemd also performs a `stop` not a `graceful-stop` for apache.
Comment: Debian does a graceful stop too

Stop Apache gracefully


How to Pass parameter to SQlDataSource from gridview?

Question: Gridview has many columns and a Delete button as well. Delete button is a control as TemplateField
<asp:TemplateField>
 <ItemTemplate>
  <asp:LinkButton ID="btnDelete" CommandName="Delete" Text='<%#     Eval("disabled").ToString()=="False" ? "Disabled" : "Enabled" %>'
 OnClientClick="return confirm('Are you sure you want to take this action?');"
 runat="server"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>

Now associated SQLDataSource's Delete command's stored procedure is expecting two parameters. One is going from DataKeyNames (RowID), other one i wanna pass is the Text of btnDelete (True or False).
How can i achieve it?
Answer: I would recommend doing it in the code behind. On btnDelete click i would iterate through every row in your gridview and check all the datakeynames. Once i found the one you want to delete you will need to send that back to you db. You can use either an orm like linq, ado.net, or a straight sqlcmd.
Answer: Please See this Code. I implement and works fine
<asp:TemplateField HeaderText="Add" HeaderStyle-CssClass="grid_Title">
    <ItemTemplate>
        <asp:HiddenField ID="HiddenField1" runat="server" Value='<%# Eval("TrackID")%>' />
        <asp:SqlDataSource ID="SqlDataSource_Projects" runat="server" ConnectionString="<%$ ConnectionStrings:SentricMusicFunctionalityConnectionString2 %>"
                           SelectCommand="select* from MassTraxCatProjects where Fk_AgencyId=@CatalogAgencyId and fk_trackid=@TrackID) ">
            <SelectParameters>
                <asp:SessionParameter DbType="Int32" DefaultValue="CatalogAgencyId" Name="CatalogAgencyId"
                                      SessionField="CatalogAgencyId" />
                <asp:ControlParameter DefaultValue="TrackID" Name="TrackID" ControlID="**HiddenField1**" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:DropDownList ID="ddl_ProjectType" runat="server" DataSourceID="SqlDataSource_Projects"
                          Width="100px" DataTextField="ProjectName" DataValueField="ProjectId">
        </asp:DropDownList>
    </ItemTemplate>
</asp:TemplateField>


Charging lead-acid batteries?

Question: Are there any special requirements for charging lead-acid batteries?
Answer: Charging lead-acid batteries with a power supply
Lead-acid batteries can be charged manually with a commercial power supply featuring voltage regulation and current limiting. Calculate the charge voltage according to the number of cells and desired voltage limit. Charging a 12-volt battery (6 cells) at a cell voltage limit of 2.40V, for example, would require a voltage setting of 14.40V.
The charge current for small lead-acid batteries should be set between 10% and 30% of the rated capacity (30% of a 2Ah battery would be 600mA). Larger batteries, such as those used in the automotive industry, are generally charged at lower current ratings. Cells constructed of a non-antimonial lead grid material allow higher charge currents but have a lower capacity. The cylindrical Cyclone is sealed and can sustain a pressure of up to 3.5 Bar (50 psi). A pressurized cell assists in the recombination of gases.
Observe the battery temperature, voltage and current during charge. Charge only at ambient temperatures and in a ventilated room. Once the battery is fully charged and the current has dropped to 3% of the rated current, the charge is completed. A good car battery will drop to about 40mA when fully charged; a bad battery may not fall below 100mA.
After full charge, remove the battery from the charger. If float charge is needed for operational readiness, lower the charge voltage to about 13.50V (2.25V/cell). Most chargers perform this function automatically. The float charge can be applied for an unlimited time.
--Information found here
Hope This Helps!
Comment: The charge voltage goes down with higher battery temperature, up with lower battery temperature...
Answer: Don't boil it dry!  If it's a sealed unit it should have a maximum charging rate, usually printed on its side or available on the manufacturer's website.  If it's a "car type" then just don't let the electrolyte boil off.  Dry plates mean disaster for the life span of the battery.
Answer: Be careful.  You generate hydrogen, which can explode.  Accordingly use a good quality charger at a minimum.  If you have banks of batteries, get a hydrogen sensor.
Answer: after charge them full you can switch to trickle charging to make sure the battery stay full as lead batteries do self discharge. so if you store a battery for a long time you can connect it to a trickle/slow charger to make sure it will not over discharge
Answer: From www.elprocus.com:

Lead Acid battery is a heavy current device and it contains sulphuric acid. It is necessary to take precautions during battery charging to avoid hazards due to sparking, acid spilling, explosion etc.
Following are some tips to be followed while charging Lead Acid Battery:

Always keep the battery in a well ventilated space.

Do not keep any inflammable liquid like Petrol near the battery.

The charger should be plugged in to the AC socket only after it is connected to the battery.

Observe the battery while charging. If the water boils ( bubbles may appear in normal charging) and battery heat up, stop the charging immediately.

Use a good quality transformer based charger. For Automobile and Inverter battery, use a 14 volt 5-10 Amps transformer.

Do not wear any metal bangle or metal wear in the hand while handling battery. This prevents shorting and burning.
Comment: Sunitha, plagiarized answers are not really a good way to win friends and influence people.
Comment: Seriously? You are reposting verbatim text [from another site](http://browse.feedreader.com/c/Edgefx_Education/343651783) because why?

Charging lead-acid batteries?


Does the velocity of air in an engine increase in the compressor section or turbine section?

Question: I think it increases in the turbine section because the pressure and temperature decrease so the velocity increases but I'm not sure.
Answer: Air velocity increases in the turbine section.
In order to compress air, we need to apply work on it, like running a car engine harder to drive it up the hill. Part of the work required comes from decelerating the air that flows into the engine.
The work done can be released by accelerating the gas and letting it escape, creating thrust. The expanding gas also applies work on the turbine blades, which absorb part of the accumulated energy. Each turbine stage slows down the gas, but from a higher velocity base due to the expansion. In the turbine section as a whole, gas velocity is increased.
The faster the gas flows out of the engine, the higher the thrust that is created.
Comment: Actually the velocity of the gas varies throughout the engine.  However the gas expands and actually slows as it passes through the turbine section (it has to as it is converting its internal and kinetic energy into mechanical energy for the turbine.  Gas is accelerated, however, as it passes through the diffuser (nozzle) at the end of the jet pipe.
Comment: @Notts90 The incoming air is decelerating now.


Magenta overtones in CS 5

Question: This has happened a few times.  It resolves somehow...and then shows up again within weeks.  I have windows 10.  I open a file that I print several times a month of a drawing I did years ago.  It prints fine.  It looks pink.  The tools look like they have a pink edge around them.  If I go to the color picker to make a new document and want to use gray it looks lavender.  the CMYK values are correct.  It prints correctly.  But it looks lavender.  Same thing happens in photoshop. But anything else on the monitor (like screen savers, color calibration, etc.  the grays look correct.)  I have looked and looked on the internet...anything?  anyone?
Answer: Color calibrate the monitor.
Odd pink or yellow tones are most often a result of a corrupt color profile. Recalibrating the monitor should correct the issue. Photoshop tends to show problems with a color profile much, much, more than any other part of a system.
If recalibrating doesn't help.. check the monitor cables to ensure they are connected well and in good condition.

Magenta overtones in CS 5


Mapping class diagrams to source code

Question: I'm attending a software engineering class at my university, and my final consists of a fully-documented desktop application to be built in a four people team.
While designing and coding this software, there's a question that always pops in my head, since my professor keeps repeating that everything that happens in code has to be first designed in a UML sequence diagram, and every class written in Java and every method of every class has to be designed first in a class diagram.
Now, I'm new to software engineering and designing in general, but isn't it too much of a UML-obsession here? Is a software engineer really required to foresee every requirement, every problem, every framework compatibility without seeing a line of code?
We tried to design every tiny bit of interaction, but while coding problems and sceneries keep appearing and need to be solved, but we can't because solutions aren't documented there.
So my question is: is there really a 1:1 mapping from UML to code? Is it possible that adaptations, solutions, refactorings will not be documented in my future work-projects? Or are we just doing bad design?
Comment: A particular piece of UML can be written moments before the code it refers to is. If your professor is insisting you lock the design before cutting any code then they aren't teaching design as used by most of industry.
Comment: @user253751: Nitpick: it is not how anyone *successfully* writes real software. There's plenty of high-profile failures of this approach. (FBI Virtual Case File, anyone?)
Comment: *"keeps repeating that everything that happens in code has to be first designed in a UML sequence diagram"* - cough, your professor is clearly a pure theoretician who never ever had to write any real software. What's worse, in the last two decades, even most theoreticians should have noted that this is nonsense. I would recommend he/she should visit some advanced trainings in modern software engineeringby people with experience outside his/her ivory tower. Unfortunately, you are probably not in a good position to give him/her this advice ;-)
Comment: Yes, this is a UML-obsession and is not how anyone actually writes real software.
Comment: @JörgWMittag well, since it was a failure, the software was never real :)
Comment: Are you sure the professor means every single line of code has to be shown precisely in a UML diagram, not that you just have to sketch it roughly?
Comment: Quite everything. If you need to refactor a method for readability, you can't because then the class has two methods in the source code and one method in the class diagram...
Comment: Is this a question about the correct way to design and write code, or how to pass your professors paper?
Comment: It is absolutely a question about ways and best practices. I already finished writing my application
Answer: The notion that software is fully specified and designed prior to implementation is indicative of a highly sequential approach to software development. Although there may be organizations that work this way, the software engineering community has found more effective ways to manage software development activities. Even in cases where you may be able to specify the system requirements in detail up-front, requirements allocated to software are more likely to change to accommodate uncertainty because it's easier to change software design than hardware design. This is why iterative and incremental methods, such as the various Agile methods, are commonly used.
The thinking that models - whether they are UML or some other notation - contain all the details is closer to using UML in a mode more consistent with blueprints or as a programming language rather than a way to sketch or take notes about a design to help communicate to other engineers. Agile modeling techniques provide ways to use tools like UML within the context of iterative and incremental development methods and focus on just-in-time and barely good enough modeling.
Getting to code early is often good practice. However, moving to code early is not the same as neglecting some level of up-front architecture and design to make important decisions that will be difficult to change as the system evolves. Understanding that requirements will emerge as software is integrated into a larger system and used is fundamental to success, so the ability to anticipate every requirement or problem is not possible.
Answer: It's a good question, I myself had the same question when I was studying.
My professor explained it like this: It's never going to be possible to forsee every interaction within a given system while designing it. We design UML diagrams for two reasons.

UML is a language with no speech barrier, wether you are speaking the same language as your co-worker or not, you can both understand a UML diagram. Thereby you get the same understanding of how the different pieces of code are supposed to interact with eachother.
UML is also a way to prevent the occurence of common problems in your code. As you mentioned, you can't foresee every problem, but the ones you can foresee can save you hours of work in the long run. In a work environment time really is money.

Looking at a more realistic picture... You're probably not gonna spend a lot of time drawing UML diagrams. You're probably gonna stand at a whiteboard with your coworkers, and draw some UML until everybody has a core understanding of the system. After that you're gonna start coding, and forget all about documentation until after you finish the whole project. The reason for that is again... Time is money, and your future boss will never prioritize spending money on documentation if there is a deadline to make.
Hope this shed some light on the matter.
Good luck with your exams!
Comment: all the UML function names, class names and variable names are written in a language, and the diagram is useless without understanding them. There isn't no language barrier.
Comment: I consider UML like sketching an image before you paint it for real. Spending a couple of minutes to hours drawing a quick outline of your software can sometimes help you to spot things that won't work, before you spend weeks trying to make them work.

Mapping class diagrams to source code


Updating to Windows 10 with OEM Windows 7 pro

Question: A technician worked on my HP Probook running Windows 7 pro and installed an OEM OS without telling me. I didn't find out until I tried to upgrade to Windows 10. I have the key for the old license on the COA. Can I still upgrade without re-buying the license for 7, or am I out of luck?
Answer: It depends, by OEM do you mean the technician installed a pirated copy? Did you download the "Get Windows 10" application and it's not letting you update telling you your copy is pirated or why is it failing? A few months ago Get Windows 10 was updating even pirated copies of Windows 7 into fully legal Windows 10. I don't know if it's still doing this, or whether this was intentional. It could be in line with Microsoft's policies to get as many people to use 10 as fast as possible. Also, if the OEM is not working do you have your old system to reinstall? If you have the product key, you can also download a CD from Microsoft to reinstall your old system, in case the OEM doesn't work.
Comment: The last time I tried was Nov. last year. I tried numerous times to download Win 10 using Get Win 10 and I just kept getting the message either "download failed" or when it finally downloaded it doesn't give me the opportunity to activate. I have the restore disk, but I understand that it  will reset my computer to "new" status and wipe out everything I have installed. (The OEM is still working). I read somewhere that if the original OEM was updated the site will not allow the update as it reads the key from the ROM. I checked the key in ROM and it does not match the COA key.
Comment: I would try to find the log files for the Win 10 updater and see why it's failing, try google to see where they could be, once you have a log file message you can google that and may find a solution. If could be a log file or it could be in the Message Console of Windows.


Why is the accusative case used for a "topic"?

Question: If I were to write a book about myself, Me would be a more natural-sounding title than I. Also, we say the us-vs.-them mentality instead of the we-vs.-they mentality.
Comment: I'd call this the objective case since English doesn't really have an accusative.
Comment: I believe that the Lord of the Apes wrote an autobiography: *Me, Tarzan*...
Comment: Objective pronouns are the unmarked (i.e. "default") form in English. See e.g. [here](http://english.stackexchange.com/a/4655/300), [here](http://english.stackexchange.com/a/1197/300), and [here](http://english.stackexchange.com/a/760/300). Now, what do you mean by "why"? Let me ask you right back: why not? Objective case is the default in many languages. There's no reason for it not to be. Are you asking about how this developed historically in English? Please clarify.
Comment: @JohnJamesSmith Many linguists use the term *accusative* in descriptions of English.  For example, it's used in *The Cambridge Grammar of the English Language*.  If you continue to say *accusative* rather than *objective*, I think no harm will come of it.
Comment: Whoops, I didn't know it was wrong to say "accusative"; I was just referring to the pronouns *me*, *them*, *us*, *him*, etc. @RegDwightΒВBẞ8 I guess I didn't know that the objective case was the default. It just seems strange then that people always talk about the subject and the object, the nominative case and then the accusative case, to where it seems like the "main" one is the first. Also, when you say "objective" it makes it sound like it ought to be the object of a verb, whereas the "subject" form of a pronoun seems like it ought to be able to serve just that purpose, e.g. in a title.
Answer: There are a couple of ways to see this:
(a) the notion of "I" being 'nominative', "me" being 'accusative' etc is really something of a bastardisation, or at best a huge oversimplification; do you actually have any motivation for this analysis, or did you just 'hear it somewhere'?
(b) even if you were to conclude that "me" is always an 'accusative' form, who says that the accusative can't be used for "titles"/"topics"?
Or put another way: the fact of the matter is that English uses the form "me" both for the pronoun when used in 'isolation' and when it is the complement of a verb/preposition (as well as other uses). So:
Either (a) you analyse it as being accusative, and incorporate in your definition of 'accusative' this particular use.
Or (b) you analyse it as not being accusative, possibly taking this use as part of your reasoning for not doing so.
Something for you to think about: given that English nouns and adjectives don't decline (as they do in other prototypical languages with case systems), what does it really buy you to talk about 'nominative', 'accusative' etc in English?
Comment: Terminology like "nominative" and "accusative" lets us generalize about different forms of the personal pronouns. It's simpler to say something like "Pronouns take the accusative form when they are the direct object of a transitive verb" than it is to say something like "For the direct object of a transitive verb, we use the pronouns *me, us, her, him, them* instead of *I, we, she, he, they* respectively."


Thermometer reading

Question: I quickly plunged a room-temperature thermometer into very hot water, the mercury
level went down briefly before going up to a final reading. Why?
Comment: Maybe the glass cylinder expanded slightly due to the increase in temperature?
Comment: Any chance you can link to a video?
Comment: I have noticed this before as well.
Comment: @BMS:I just noticed it practically... i am trying to search for a video for your convenience...
Answer: As it was done quickly, the mass of the mercury remained at room temperature for a short period of time, even as the thermometer itself (including the metal bulb) began to heat.
I suppose it is possible that even though it is a tiny portion, the metal bulb expanded sufficiently so that the volume inside the bulb increased and the level of the mercury went down.
Shortly after the mercury itself heated and you were able to see the expansion.
Comment: This also suggests an interesting issue: A thermometer should read differently when only the bulb is submerged rather than the entire thermometer. At first because T_HgBulb > T_Hgcol then because of thermal expansion of the glass of the column (cte of glass ~ 1/10th that of Hg). Somebody probably looked at this 'back in the day'. Now we deal with conduction losses along our thermocouple/rtd leads.
Answer: Instead of the expansion of the bulb which should be slight, it might also be the air in the thermometer.
According to wikipedia, it is filled with nitrogen or air at lower than 1 atm.
When we compare this small mass of gas with the "large" mass of mercury, it will most likely heat up faster even with regards to heat capacities.
At room temperature, most household thermometers will have more air volume than mercury volume. This also means a larger surface area for conduction then convection.
As the air heats up, it will expand, pushing the slow-heating mercury down. The mercury will push back as it slowly heats up.
Pretty much, it is a race, and the air is faster.
Comment: I don't think mercury is compressible, and therefore, that the expansion of air has any effect. The pressure of air will increase, but that shouldn't affect the mercury.
Comment: Well mercury is compressible up to a certain point. I just assumed the "went down briefly" was just pushing down the meniscus and mercury a little bit. If it showed a large temperature difference, then it would not be this small compression.
Comment: Mercury is about as compressible as water, or any Newtonian fluid: not enough to see a difference near room temperature and pressure. Mercury is also opaque, so we cannot see the meniscus' shape. If the center of the meniscus is lowered by an increase in pressure, what we'll see is a raise in the visible mercury level.

Thermometer reading


Perron, Fourier

Question: Perron´s formula is in some sense just Fourier inversion, but I have never seen proven it that way in a textbook. I take this must be because the conditions for the Fourier inversion formula to hold may be difficult to verify in this case. Or are they? Is it feasible to prove Perron´s formula using mainly just the fact that the Fourier transform is self-dual?
Answer: Harald,
My personal stance on this is that I like to try and avoid using Perron's formula in the "traditional" form. Instead, I like to see the Prime Number Theorem (say) as a statement about $\sum \Lambda(n) \phi(n)$, where $\phi$ is a $C^{\infty}_0$ cutoff function approximating the interval $[1,X]$. To relate this to $\zeta'/\zeta$, you need the Mellin inversion formula for $\phi$ on the vertical line $\Re s = \sigma$, and this really is precisely the same thing as the Fourier inversion formula for the function $e^{\sigma u}\phi(e^u)$. Since everything is a compactly supported smooth function, and in particular a Schwartz function, the analytic issues involved with inverting the Fourier transform are as mild as they can be.
My point of view on this is elaborated upon in in chapter 1 of this course http://www.dpmms.cam.ac.uk/~bjg23/ANT.html.
Comment: I might be missing something, but a small question:  For $\sigma>\max(\sigma_c,0)$, we would want to prove that $$\sum_n a_n \phi(n)=\int_{(\sigma)} \alpha(s)\mathcal{M}(\phi)(s) ds.$$  If $\sigma>\sigma_a$, the abscissa of absolute convergence, then we can switch orders, but as I remember the analytic details in the proof of Perrons formula come from the subtle problem of justifying the switching of the order in the case where we do not have absolute convergence.  How do you get around this easily?   (The case where $a_n=\Lambda(n)$ has $\sigma_c=\sigma_a=1$, so it works out nicely)
Comment: Allow me to second Eric's question (can one really "second" a question?).
Comment: Also - can this approach (which I agree is natural) be used to simplify the complex Tauberian proof of PNT? There, one usually smooths things by convolving with a very specific function (often the continuous Fejer kernel), so as to make the Fourier transform (read: Mellin/Laplace transform on a vertical line) have compact support; then, after proving things (using Fourier inversion, Riemann-Lebesgue, uniform convergence) one undoes the convolution by a Tauberian lemma. Would any $C_0^\infty$ smoothing be enough (so that the convolution and its opposite step become redundant)?
Comment: The problem mentioned by E. Naslund does occur in many applications where $a_n$ is oscillating, say if $a_n$ is the $n$-th Hecke eigenvalue of some cusp form.  In many cases, the question becomes: is one really ultimately interested in (1) proving a bound for $\sum_{n\leq x}{a_n}$; or (2) using such a bound to prove, e.g., a subconvexity bound for an $L$-value.  In case (1), quoting some form of Perron's formula might be the easiest way to do things quickly, but in case (2), you would only require estimates for smoothed sums anyway.
Comment: sorry to comment on an old post, but the link (I assume https://www.dpmms.cam.ac.uk/~bjg23/AddNumTheory/chap1.ps) has rotted, and can not even be found via the internet archive. Do you happen to still have a copy, or at least another reference to "your point of view"?
Comment: Here is an updated link containing the material that was in that old link. https://people.maths.ox.ac.uk/greenbj/papers/primenumbers.pdf
Answer: Generally, Perron's formula is the calculation of the inverse Mellin (or Laplace or Fourier) transform of a particular function. When the function's representation as a Mellin transform is known, this is simple. Otherwise, some work in necessary. To a certain extent, I guess it also depends on what you mean by "Perron's formula".
One version of Perron's forumla calculates the inverse Mellin transform of $I_T(s)/s$, where $I_T$ is the indicator function of the strip $|{\rm Im}(s)|< T$, a statement being (from Patterson's book on the zeta function), for $c>0$,
$${1\over 2\pi i}\int_{c-iT}^{c+iT}{x^s\over s}ds=\cases{O\big(x^c/T\log(x)\big)& $0< x< 1$\cr 1/2+O(T^{-1})  & $x=1$\cr 1+O\big(x^c/T\log(x)\big)& $x>1$}$$
Since it is a statement about a particular function, you can't really get a general proof. On the other hand, I bet you could extract a certain amount of information as you do in the Paley-Wiener theorem (and similar results).
Wikipedia's version of Perron's formula, which is also an application of the above formula, is amenable to "proof via inversion". Let $g(s)=\sum_{n\ge 1} a_n/ n^s$ be a Dirichlet series converging absolutely for ${\rm Re}(s)>\sigma$. Re-write this as $g(s)=s\int_0^\infty A(x)x^{-s-1}\ dx$, where $A(x)=\sum_{n\le x}a_n$ (with some complication when $x$ is an integer).
If we set $B(x)=A(1/x)$, after changing variables $x\rightarrow x^{-1}$, this becomes $g(s)=s\int_0^\infty B(x)x^{s-1}\ dx=s{\cal M}B(s)$, where $\cal M$ denotes "Mellin transform" (otherwise $g(s)={\cal M}A(-s)$). Divide by $s$ and apply Mellin inversion to both sides (this requires some bound on the decay of $g(s)$ in the region of convergence, which isn't difficult), with $c\gg\sigma$,
$${1\over 2\pi i}\int_{c-i\infty}^{c+i\infty}g(s){x^{-s}\over s}\ ds=B(x)$$
Send $x\rightarrow x^{-1}$ to get
$${1\over 2\pi i}\int_{c-i\infty}^{c+i\infty}g(s){x^{s}\over s}\ ds=A(x)$$
Comment: So, the first formula above seems to be a justification in the limit that the inverse Mellin transform of $1/s$ is the shifted Heaviside step function H(x-1) with the derivative of both sides giving the inverse Mellin transform of 1 as the shifted Dirac delta function $\delta(x-1)$.
Comment: I think that's a reasonable interpretation.
Answer: I think these answers may be elaborated upon together. Assuming $\sum |a_n| n^{-c}$ converges, the formula to which BR refers explains the sense in which the "traditional" form of Perron's formula is a Fourier integral. By a change of variables, you have
$$\frac{1}{2\pi}\int_{-T}^{T}\left(\sum_{1}^{\infty}\frac{a_n}{n^{c+iy}}\right)\frac{e^{ixy}dy}{c+iy}=e^{-cx}\sum_{n< e^x}a_n+O\left(\frac{1}{T}\sum_{1}^{\infty}\frac{|a_n|}{n^c|x-\log n|}\right)$$
(see Titchmarsch for a generalization that leads to PNT, p61-63). As $T\rightarrow\infty$, the (sharp) estimate on the r.h.s. shows that the convergence is not uniform, even though the interchange of limits on the l.h.s. is justified because the Dirichlet series converges absolutely (hence uniformly).
This is obviously where the Schwartz function $\phi$ to which Ben refers justifies appeal to Fourier duality, instead of having to justify interchanging limits beyond the scope of dominated convergence. It also gives you more parameters to tweak for other purposes, if required. Yet, without introducing a further limit, the resulting formula is not Perron's so that doesn't resolve your question (but perhaps Perron's formula is obsolete?).
As I understand it, this was the precisely the controversy with Riemann's statement of the Fourier expansion of the prime counting function $J(x)$ - he just appealed to Fourier duality and left it there, but that was ultimately verified by Von-Mangoldt, so perhaps there is a proof. Certainly Fourier-Stieltjes applies when the coefficients are positive, so maybe that can be deployed by someone who knows more about measure than me.

Perron, Fourier


Question regarding Schedule 13D

Question: I have very limited accounting experience, and I'm looking at the publicly traded firm, QC Holding, Inc. I want to know more about controlling interest in the firm, so I was looking at their SC 13Ds on EDGAR. I'm looking at two in particular, that were filled by the same individual. One reported the individual owned 6.3% of the firms shares, while the other reported the individual owned 7.5%. Neither filling was an amendment. Does this mean the individual now owns 13.8% of the firm's shares, or is the later 7.5% number the individual's current ownership?
Answer: my guess is the number is their current holdings, not recent acquisition. ie you don't add them together, just take the latest filing.

Question regarding Schedule 13D


Why is Spotlight contacting Yahoo i.e. Oath?

Question: A very creepy thing is happening. Every time I turn on Wifi, I see a connection by Catalina's Spotlight to Yahoo's Oath service:
<code> Spotlight       49345 me   17u  IPv4 0x93dfe36e77e7a7ae      0t0  TCP 192.168.1.9:50976->188.8.131.52:https (ESTABLISHED)
</code>
You can get a list of all connections in Terminal by typing:
<code>lsof +c 15 -n -i4TCP
</code>
Does anyone know why Spotlight feels it needs to contact Yahoo, which is a company I don't want to have anything to do with?
Answer: Under umbrella term: "spotlight suggestions"  some features like weather, flights, internet search results' preloading etc., might need Spotlight to connect to Yahoo. But the following sources suggest that it happens after the data is sent to Apple.

To make suggestions and search results more relevant, some information
  is sent to Apple and not associated with you
In some cases, such as when you use Siri Suggestions in Spotlight,
  Look Up or Safari, generalised topics of interest that Siri has
  learned may be sent to Apple to make your searches more relevant.

From: In-app disclaimer in System Preferences.

Since the release of Yosemite, Spotlight sends all
  entered queries and location information to Apple by
  default.

From: https://en.wikipedia.org/wiki/Spotlight_(software)#Privacy_concerns

Apple's support page informs users who want to opt out of Spotlight
  Suggestions, Bing or Location Services for Spotlight to go to their Mac's
  System Preferences and deselect the corresponding checkboxes.

https://web.archive.org/web/20150727152056/http://www.cnet.com/news/apple-clarifies-spotlight-suggestions-data-collection-practices/
Comment: Thanks, I've deselected the various Spotlight suggestions now. Time will tell if Spotlight tries to contact Yahoo nevertheless.


What do all of the 'Re-up' symbols look like?

Question: In Gears of Way Judgement, you can re-up - similar to the 'prestiging' in Call of Duty.  The problem is though, I would like to know how many times my opponents have re-uped.   The current symbol for re-up #1 looks like a bronze star.   I think the #2 re-up looks like a bronze star with a circle around it.   Can anyone help me out with some sort of key or reference ? I heard you can re-up 11 times.
Answer: The re-up symbols cycle through a star, a star with a circle background, a star with a COG symbol background:1

Re-up #1: bronze star
Re-up #2: bronze star with circle background
Re-up #3: bronze star with COG symbol background
Re-up #4: silver star
Re-up #5: silver star with circle background
Re-up #6: silver star with COG symbol background
Re-up #7: (unconfirmed) gold star
Re-up #8: (unconfirmed) gold star with circle background
Re-up #9: (unconfirmed) gold star with COG symbol background
Re-up #10: (unconfirmed) wings
Comment: 6th re-up.... in two days ?@!@!@!@  Whaaaaaaaaatttttt?   Also, thanks for finding this !
Answer: You can only re-up 3 times and the first time you re-up it's a star its color is bronze when your on the red team and silver when your on the blue team and second re-up is star with a triangle kind of shape with star in it I haven't run someone who has re-upped to 3 yet
Comment: Re up 3 is a star with a cog around it..i read you can reup 11 times..thats what they said in the epic forums


Milk expiration date

Question: The date on my milk says 11/12/19, and its passed. I was going to dump it so I smell it and it smelled normal?? Is it still ok to use? Because I have another gallon in the fridge (they come in pair)
Answer: The great things about milk

If you can smell things, and the milk smells good, it is good.
Even if the milk smells sour, it is still probably safe.
Milk that might make you sick smells terrible.  No-one who could smell would drink it.

I would absolutely drink (store bought) milk that smelled good.   This rule does not apply to unpasteurized milk; as I understand it milk with bovine tuberculosis still is tasty, but infectious.
Comment: "Milk that might make you sick smells terrible. No-one who could smell would drink it." That is **categorically false**.  One of the most common bacterial contaminations in milk that makes people sick is *Listeria*, which has no noticeable odor. Other types of microorganisms can also grow in milk but produce no noticeable odor. Most of these are rarely found in pasteurized milk, but contamination can happen, and part of the reason for expiration dates on milk is because even at refrigerator temperatures, these organisms can multiply over time to make someone sick.
Comment: Note that I'm not saying the chances of getting sick from OP's milk are high (they probably are quite low), but smell is NOT a reliable indicator of food safety for any food.
Answer: Most places, milk is labeled with a sell by date, not a use by date.  In most places in the US, it is expected that the milk will be good 7-10 days beyond that date under proper storage.  That varies a little by jurisdiction, in my state it is a minimum of 7 days.  Actual time you will want to continue using will depend on your tolerance as it starts to sour, storage temperature, time out of cold storage, smells and flavors it may pick up in the fridge, etc.  For me, I usually cannot tolerate the taste beyond about 5 days even though it is not spoiled in most people's view.  My partner seldom has issues with it well beyond 7 days so I let her use it.
Answer: As said in @Willk's answer, if the milk smells normal you can use it as you would use normal milk. If it is soured you have yourself some soured milk.
You can still use that, but i wouldn't suggest pouring it into coffee or over cereal. However, you can use it in baking or anywhere you would use butter milk. The tanginess gives a great flavor to stuff like pancakes for example.
I know it is an important ingredient in some traditional German dishes as my grandma used it quite a lot, but i think it's even more used in eastern European cuisines.

Milk expiration date


Why do the Scots start chanting "Maccaulich" after their first victory?

Question: In the movie Braveheart after the Scots take over the local garrison and execute the sheriff, everyone begins to chant "Maccaulich!" (which them seems to morph into Wallace). Is there a meaning to this word, a purpose to it, or some character in the movie that I missed?
Answer: According to IMDb they're chanting MacAulish, which means "son of Wallace."

Following the death of Murron MacClannough (Catherine McCormack), when the Scots took out the very first garrison of English soldiers, the crowd starts chanting 'MacAulish...MacAulish!' then changes to 'Wallace...Wallace!' Scottish surnames beginning with 'Mac' mean 'son of...'. Thus, MacAulish means 'son of Wallace.' The crowd is, in essence, cheering William as the 'son of Wallace' (referring to his father) and then Wallace himself.
Comment: Ah my subtitles aren't correct then. Whoops.
Answer: In the script of the movie Braveheart (Section 9) the Scots are chanting "MacAulish, MacAulish, WALLACE, WALLACE!" The term "Mac" means "son of", and "Aulish" is intended to be a variation of the Medieval Gaelic name "Uallas" (later translated to the Anglican, "Wallace"). Where the writers got the spelling "Aulish" is anyone's guess. Perhaps they were just trying to simplify the name for literary purposes. At any rate, essentially the Scots are chanting "MacUallas!" or "Son of Wallace" which then morphs into "Wallace!"
I found this on http://www.moviemistakes.com/film207/questions
Comment: If the name is _Uallas_, then 'son of Uallas' would be _MacUallais_, which sounds sort-of-not-too-far-from 'MacAulish' (apart from the fact that  is /uə/, not /ɔː/) – definitely as close as lots of other actual Anglicised forms. _MacUallas_ would not be anything in Scottish.


1 x male micro USB to 2 x female

Question: I have an Android tablet and have it fixed up onto an external keyboard via a micro USB cable. But whilst using the tablet I would also like to be charging it. So would like to know if there is such a cable that splits from one male to two female micro USBs. I can't seem to find one anywhere. Thanks in advance for any help.
Answer: That's an excessively non-standard cable. But "Micro USB Host OTG Cable w/USB power" is what you want. You need a cable for OTG Host mode, and charging. That one will give you a micro male to plug into the tablet, a micro mini for charging, and a usb A female. You might need a usb a female to micro female adaptor.
Well, it might not work though. http://mehrvarz.github.com/usb-otg-power-nexus7/ points out that the Nexus 7, the plain vanilla, pure android and no manufacturer bs tablet, needs two driver/kernel patches for USB Host Mode AND Charging to work at the same time.
Comment: Sounds like I will have to charge seperately for the foreseeable future. Thank you Passerby for taking the time to try and help me.
Comment: @Kaz, if your tablet has an active modding community, they might be willing/able to port over the nexus 7 patch. Check slatedroid or xda-developers websites.
Comment: Ok Passerby. Thank you for your help. Will give that a go. :-)
Comment: @Kaz. As an alternative, have you considered getting a Bluetooth keyboard? Saves the need for any patching.
Answer: The cable you are looking for does not exist. And a USB compliant host device won't be charged even if you provide power through an homebrew cable. The otg Y cables you will find are meant to power the device you attach and not the host, so they won't help much. You can use them in order to lighten the load on the host though.
Comment: Those are NOT USB Compliant either. Every cable connected to a USB host must A) Enumerate and B) USB compliant device must not draw more than 1 power block (100ma) without requesting more NOR draw more than 5 power blocks (500ma). Those Y cables break all of that. And even then, are used for devices that draw more than 1A. Aftermarket hacking, not a USB specification friendly business.
Comment: The cable does exist.
Comment: Well then that's not USB compliant and can possibly damage the host. We are not speaking of a Y cable commonly used to connect external HDDs.
Comment: Thanks for pointing that out, I did not think of that. Maybe some devices with Y cables have a custom USB connector with two pins for the 5V, one for the host and one for the power supply. But it's quite unlikely.
Answer: USB connections are NOT designed to be used as a "Y" connection. You will not likely find the type of device that you are looking for. Certainly do not try to cobble up something on your own unless you 101% understand the internal circuitry in both the existing device and its charger.
Is such a device feasible? It may be if it was incorporated as a feature into the charging unit itself. Short that stay away from a hacked solution.

1 x male micro USB to 2 x female


UITextView and position of floating autocorrect window

Question: I have a UITextView with autocorrection on. The view's height is about 30 pix. When autocorrect kicks in the autocorrect view is nearly invisible below the text. Is there a way to control the position of the small autocorrect window or insure it is the top layer so it is always visible and the user can easily see and interact with it?
Comment: I have also seen this using HPGrowingTextView. Seemingly at random, the autocorrect popup will show up below the word being auto corrected, clipped by the bottom edge of the text input box.
Answer: I discovered that setting the scrollEnabled to false on the UITextView the popup would always appear above the word being corrected.
Comment: Yep you are correct but at least in my case, I'm trading one problem for another. Now the popup is visible but the user can't scroll! Frankly I think this is an iOS bug. They should insure the popup is always visible. Thanks for the input though.
Answer: Did you try to set clipsToBounds=NO for your UITextView?  Sounds like it's clipping the autocorrect view to the frame size of your UITextView..or perhaps auto-positioning it inside your frame.  Worth a try anyway..
Comment: Thanks very much for the suggestion. I went down that path without success though. It did seem reasonable however.
Comment: That's less than ideal, since UITextView inherits from UIScrollView. Settings clipsToBounds to `NO` means you totally break scrolling.

The popup should be window-level. It's an iOS bug.
Answer: After trying various solutions unsuccessfully, I find the best way that worked for me is to simply add your UITextView inside a UIView.


Can a generation of families be cursed?

Question: Salam Brothers and Sisters....
I really don't know how to start off but I feel like my family from my moms side is cursed. No one is happy in there families. Everyone is sick. We suffer one lose after another. All our wealth seems to disappear. Cant get any where in life. We get married into families that seem good but turn out horrible. My husband constantly mentally abuses me. Everywhere we go, anything we touch, anything we do seems to back fire and so on. Were a religious and quite family, not your out going Disco Dancing family. My mother lived a horrible married life, all my 3 sisters and I the same. Along with all my uncles/aunties/ cousins from moms side. Can my family be cursed? Or what can I do?
Comment: As written, this post is just attracting opinions about "what can I do?" rather than actual useful *answers*. Note that we are not a typical Internet forum and we are especially not a place for seeking peer-support (see: http://meta.islam.stackexchange.com/q/189/22). I would strongly suggest checking out the advice in our help centre on "[How do I write a good question?](http://islam.stackexchange.com/help/how-to-ask)" as well as "[What types of questions should I avoid asking?](http://islam.stackexchange.com/help/dont-ask)" to better understand the sorts of posts we encourage here.
Answer: Ali's response is sufficient. It is noteworthy to mention that in Islam the notion of family curse does not exist. The Quran says:
قُلْ أَغَيْرَ اللّهِ أَبْغِي رَبًّا وَهُوَ رَبُّ كُلِّ شَيْءٍ وَلاَ تَكْسِبُ كُلُّ نَفْسٍ إِلاَّ عَلَيْهَا وَلاَ تَزِرُ وَازِرَةٌ وِزْرَ أُخْرَى ثُمَّ إِلَى رَبِّكُم مَّرْجِعُكُمْ فَيُنَبِّئُكُم بِمَا كُنتُمْ فِيهِ تَخْتَلِفُونَ (Al Anaam 6:164)
"Say: "Am I, then, to seek a sustainer other than God, when He is the Sustainer of all things?" And whatever [wrong] any human being commits rests upon himself alone; and no bearer of burdens shall be made to bear another's burden. [163] And, in time, unto your Sustainer you all must return: and then He will make you. [truly] understand all that on which you were wont to differ. [164]"
One has to face life with optimism, the mere fact that Allah has given us our 5 senses is such a gift. We are able to perform many great things if we act with the correct mindset. Every new day is an opportunity not to be missed.
Answer: Walekum Assalam Sister,
This question reminds me of the story of Prophet Ayub AS(Job) who was also afflicted by various calamities to the extent many people around him taught that it was because of his sins and that he was cursed.
The Prophet Ayyub (AS) exhibited patience and faith in Allah.   He suffered from a number of calamities  like loss to his wealth, loss in his family members in an accident , he him self got various skin diseases which made his appearance ugly and full of warts to the extent other people around him and assumed that it was because he was cursed by Allah and that this was the result of his sins.
 Yet he held fast to his faith in Allah.  He neither grumbled nor became impatient and resort to wrongful means.
 He understood well that possessions and children were the gifts from Allah.  If He had taken His things, it was useless to lament over their loss as it did not belong to him in the first place.
  When Prophet Ayyub (AS) was in an extremely pathetic condition he prayed:

"Truly adversity has afflicted me and You are Most Merciful of all who
  show mercy." (21: 83)

Allah responded to his prayer.  The Holy Qur'an affirms:
"Then We heard his prayer and removed that adversity from which he suffered, and We gave him his household and the like thereof along with them, a mercy from Our store and remembrance for the worshippers."  (21: 84)
His example and many similar examples from our prophet Muhammad (pbuh)'s life makes this point very clear: that those who remain patient under the stress  of all circumstances never deprived of high rewards.
The Holy Qur'an affirms:

"And surely we try you with something of fear and hunger, and loss of
  wealth and crops, but give glad-tidings to the steadfast, who when a
  misfortune befalls them, say lo! we are Allah's (possession of Allah)
  and to Him shall we surely return.  · Such are they on whom are
  blessings from their Lord, and mercy.   Such are the rightly-guided."
  (2: 155-157)

Hence you would want to pray to and ask for Allah alone to help you with sincerity and full devotion to Islam and its Fard and Sunnah. In short, be steadfast, stay away from sin and all types of shirk. Sticking to true tawheed will ensure your akhirah.
Answer: Can my family be cursed? Or what can I do?
I don't believe in curses/possession/etc.. For that I will advise you to do the following:

Always practice salah on time.
Try to read Quran whenever you have free time

Always try to do the things that Allah loves and hope to keep the devil away from you:

Indeed, My servants - no authority will you have over them, except those who follow you of the deviators.[15:42]

Also have you considered the following:

Talking with a financial planner that can help you organize your money, spending and savings. Talking from experience, I myself used to waste a lot of money until I did to one, in which I started saving for my 401k, children future education and even have much of the money in savings.
Sickness can be explained by Doctors, try to get opinions from multiple doctors to what the sickness is and where it is coming from and how it can be solved. Additionally, you reading Quran should help elevate any sickness coming from Allah:

And We send down of the Qur'an that which is healing and mercy for the believers, but it does not increase the wrongdoers except in loss. [17:82]

Many times the choice in spouse isn't perfect. Alhumuduilah you have an option in Islam to get out of marriage if your Husband is abusive or you don't love him. Use that option and inshala you will find someone to suit you best. It is rarely common for a person to find the one, spouse, whom they can live with for the rest of their lives without bad things coming out.
Everyone suffers loss in family, you should keep patience and keep positive that you will meet them in the hereafter inshala.

I would advise against going to Swindlers and Charlatan who use the word of Allah as a way to make money in hopes to "cure" you.
Answer: Assalam-O-Alaikum! I am not going to quote examples from Prophet's live. I am going to be straight forward and want to tell you something really important. Your family is not following Allah's religion and book properly. Your mother was either not a good wife or a good mother. She never taught you the truth. Obey your husband's commands. Be a devoted wife no matter what happens. Always be loyal to him no matter what happens. Have full faith in him. I don't know about others but I guarantee you that your life will change with Allah's grace Inshaallah!

Can a generation of families be cursed?


how to assign selected value from dropdown and assigns to records?

Question: i have a dropdown in webgrid and i want to set default value for it as selected by user.i am assigning list to viewdata for dropdown selected value,which is working fine,but on adding multiple records ,it takes the last records selected value from dropdown and assigns to all records?any solution?
Answer: If I understand correctly, you are adding multiple records in the grid and each record has a dropdown whos value you need.. For this you will need to a do a little bit client side coding to have a row vs selected value pairs stored and then assign them to respective rows.


Civil Engineering - Detailing of free draining backfill and modelling of hydrostatic pressure in retaining walls

Question: It is considered best practise to specify free draining backfill material (eg gravel) to be placed immediately behind a retaining wall. Supposedly, this alleviates hydrostatic pressure on the wall, allowing more economical designs to be achieved. But the free draining material typically only extents 300mm behind the wall. What prevents the soil behind this free draining material to saturate, impose hydrostatic onto the gravel and then transfer the hydrostatic pressure onto the wall?
Comment: Are you thinking of expansive soil where saturation of the soil does cause it to expand and transfer at least some pressure onto the wall?  As for why not, it depends on the properties of the soil - will "expansion" cause it to drain (your gravel provides a drainage path after all) providing negative feedback.
Answer: Just a few notes here:

With or without gravelly backfill, the retaining wall must be designed for the maximum groundwater anticipated for the site. Your geotechnical engineer shall provide this information.

The 300mm clean free draining material is the minimum requirement, it is recommended to backfill the entire cut (excavation) with well graded gravelly material, either from offsite source, or the selected and processed onsite soil.

Always provide drain pipes and weep holes to facilitate the draining of ground water.

Never compromise the safety factor for the design of earth retaining structures.
Comment: The drain pipes remove the saturation.
Answer: I'm not a geotechnical engineer, but I believe the gravel is there precisely to prevent the soil behind it from getting saturated.
That is, if the soil gets saturated, the hydrostatic pressure will squeeze the water out into the gravel, which then drains the water away, thereby reducing or altogether eliminating the pressure on the wall.


Equivalence of Deep Feed-Forward Neural Network to Single-Layer Network

Question: I am new to Deep Learning, and I was going through some lecture notes I found online. It said that a feed-forward neural network with $n$ hidden layers and only linear activation functions is equivalent to a linearly activated neural network with no hidden layers. I am having some trouble proving this assertion.
Answer: This follows from the fact that matrix multiplications by matrix A and then by matrix B is equivalent to multiplication by matrix C = AB. Linear activations are matrix multiplications (by the weight matrix). So several linear layers are equivalent to one linear layer with parameters given by multiplication of the layers weight matrices.
(The same argument holds also for affine transformations, if you consider the bias parameters of the linear layer.)


How to select a gate driver for a 100% duty cycle MOSFET switch

Question: I am designing circuit with a high-side N-channel MOSFET switch. The switch will be operated at 100% duty cycle. I decided to use a high-side gate driver since they have internal circuitry to boost the gate drive voltage to the required levels. My first prototype used a IRS10752LPBF but I quickly discovered that the "bootstrap" configuration could not operate at 100% duty cycle. I am redesigning and looking for a gate driver appropriate for this application. What sort of gate driver must I select to operate at 100% duty cycle?
Comment: ["gate driver with charge pump"](https://www.ti.com/lit/an/slva444/slva444.pdf?ts=1613385256941&ref_url=https%253A%252F%252Fwww.google.com%252F) also here https://electronics.stackexchange.com/questions/473411/charge-pump-based-gate-drive-supply
Comment: Try VOM1271 from Vishay or another photovoltaic driver.
Answer: There are several kinds of high-side gate drivers.

PMOS

A simple driver can achieve 100% duty cycle on a high-side PMOS. You get the disadvantages of a PMOS: higher RdsON, lower speed, higher FET cost. But it's simple, and driver cost is low, so the whole solution could end up a better compromise than the other options.

NMOS Bootstrap

To drive a high side NMOS, a voltage higher than the power supply is necessary. If that isn't available, then one way is to use a bootstrap capacitor that is recharged then the low-side FET switches on and the high side FET switches off. This cannot achieve 100% duty cycle as the bootstrap cap must be recharged.

Additional power supply

To generate the gate drive voltage above the power supply voltage, several options exist. A charge pump is a good option at low voltage, here is an example gate driver chip that does this. Unfortunately neither digikey nor mouser allow to search using this feature.

There is no bootstrap diode outside the chip or inside it, so if you want to quickly look through lots of datasheets this is what you need to look for, along with the words "charge pump".
I've also done it with a "hand-made" charge pump, basically a microcontroller GPIO output that feeds a diode voltage doubler. With this you can generate a voltage a bit above the power supply voltage, and that can be enough to drive the gate of a high side FET. If the GPIO stops switching, a pulldown resistor discharges the gate. Crummy and slow, but simple and cheap. With a 3V3 micro though, the two diode thresholds will probably lose too much voltage.
You could also use a higher voltage supply if that's available somewhere nearby.
If you need isolation from the driving circuitry, then another option is to use an isolated gate driver, and add a small isolated DC-DC power supply to generate the driver supply.
Another option is the photocell optocoupler, which is basically a LED and a tiny photocell in a chip. Lighting the LED will make the photocell generate a voltage, which can drive the gate of a FET. Output current is very low, so it is quite slow, but it is simple, does not generate any switching noise from a charge pump or an isolated power supply, and it is isolated. It's a good option if you use a pair of anti-series FETs to switch AC voltage.
Comment: It depends on what you are powering, what voltage and current it will encounter. I could use a 100A MOSFET to drive a 5A load maybe a 350mA MOSFET, neither would be appropriate. There is no single correct answer. If it were nothing exotic I would probably use a P-Channel MOSFET. This would be easy to implement if the voltage were high enough to enhance the MOSFET.
Comment: Thank you for the very thorough answer!
Comment: @Gil "There is no single correct answer." yes, that's why I threw lots of options, but there are always more of course.
Answer: Not mentioned in any of the other answers is to just buy a small, switching, isolated regulator in parallel with the bootstrap cap. It's probably the most straightforward way. About $3-5USD each.
Answer: I asked a question yesterday that may help you if you want to check out the thread I made last night.
Your solution may be either a boost converter to get your Vgs or voltage doubler and then controlling that signal to your gates via an optoisolator/transistor. I will likely go the opto route just because they're so simple to control.
Answer: It is also possible to have a bootstrap configuration that is supplemented with "trickle charging" to support 100% duty cycle operation. I have worked with some motor driver ICs such as TI DRV8302 that do this.
See also:

Similar question
TI discussion thread about trickle charging bootstrapdrivers-forum/285753/drv8301-trickle-charge-circuitry-and-internal-handshake
ST app note AN5789


What is the target of censorship in Library Wars?

Question: What is the target of censorship in the Library Wars (Toshokan Sensō 図書館戦争) franchise? Is it political material, sexual material, or something else?
Comment: In the past we've held a discussion about such meta tags and have deemed that they are, amongst other reasons, not that useful and are applied too inconsistently to be useful. Please see [this meta](http://meta.anime.stackexchange.com/questions/403/what-is-the-status-of-meta-tags) for a full summary.
Comment: I suspect "censorship" isn't an appropriate tag for censorship happening in-world, rather than real-life. However, the only other tag I could come up with, [tag:plot-explanation], required 150 reputation.
Answer:
The premise of Toshokan Sensō involves the Japanese government passing the Media Betterment Act (MBA) as law in 1989 which allows the censorship of any media deemed to be potentially harmful to Japanese society by deploying agents in the Media Betterment Committee (MBC) with the mandate to go after individuals and organizations that are trying to exercise the act of conducting freedom of expression activities in the media. - wikipedia

My interpretation is that the censorship is for everything you mentioned and anything else anyone can think of that would be "harmful to society". Just look at the list of frequently challenged books.
This is the top 10 list for 2012:
<code>Captain Underpants (series), by Dav Pilkey.
Reasons: Offensive language, unsuited for age group

The Absolutely True Diary of a Part-Time Indian, by Sherman Alexie.
Reasons: Offensive language, racism, sexually explicit, unsuited for age group

Thirteen Reasons Why, by Jay Asher.
Reasons: Drugs/alcohol/smoking, sexually explicit, suicide, unsuited for age group

Fifty Shades of Grey, by E. L. James.
Reasons: Offensive language, sexually explicit

And Tango Makes Three, by Peter Parnell and Justin Richardson.
Reasons: Homosexuality, unsuited for age group

The Kite Runner, by Khaled Hosseini.
Reasons: Homosexuality, offensive language, religious viewpoint, sexually explicit

Looking for Alaska, by John Green.
Reasons: Offensive language, sexually explicit, unsuited for age group

Scary Stories (series), by Alvin Schwartz
Reasons: Unsuited for age group, violence

The Glass Castle, by Jeanette Walls
Reasons: Offensive language, sexually explicit

Beloved, by Toni Morrison
Reasons: Sexually explicit, religious viewpoint, violence
</code>
Comment: As my answer stated - any media deemed to be potentially harmful to Japanese society. The following list is not meant to be an in universe list of things they would ban, but rather a list of things which would be fair game for in universe censors. If you want a specific list of things being censored in universe, I don't know of any.
Comment: The link is to the American Library Association. I've heard that real-life USA censors for different reasons than other countries, let alone compared to a fictional version of Japan.


$x^3+48=y^4$ does not have integer (?) solutions

Question: How does one find all positive integer solutions to the equation $x^3+48=y^4$?
Comment: @Adrián You would have to tell us what exactly you are unsure about. But just a word of caution: it is not enough to show that $y^2-4\sqrt{3}$ is not a cube. It may be a cube times a unit, of which there are infinitely many in your ring. But there are ways of getting round that: the units form an abelian group of rank one and you only need to consider the 0th, 1st, and 2nd power of its generator, which is $2+\sqrt{3}$. So it can be done, but is slightly more cumbersome than meets the eye at first glance.
Comment: I tried factoring the equation as $(y^2 - 4\sqrt{3})(y^2 + 4\sqrt{3}) = x^3$ in $\mathbb{Z}[\sqrt{3}]$ and arrived at a contradiction by assuming that $y^2 - 4\sqrt{3}$ is a cube in $\mathbb{Z}[\sqrt{3}]$. The problem is that I'm not sure about one assumption I made along the way and I can't seem to either justify it or realize that it is nonsense. So I'm at least leaving the comment here just in case someone realizes that it can be proved in this way or at least tell me that I'm wrong.
Comment: @Alex Thank you. I just posted my attempt as a community wiki "answer". I totally forgot about the units. I'm just starting to learn Algebraic Number Theory this semester so I'm still too naive with this sort of arguments.
Comment: @Adrián Thank you. I hope you don't mind, I have sketched the missing steps in your answer.
Comment: @Alex You don't have to thank me at all. I'm the one who has to say thank you. I think I learned a lot from this.
Answer: One way would be to note that a solution of this equation would also give a solution of the equation $x^3 + 48 = y^2$. That's an elliptic curve of rank 1 and with trivial torsion subgroup. There are bounds on the heights of the integral points on a Weierstrass model of an elliptic curve in terms of the coefficients. You can find a generator for the Mordell-Weil group and using the height bounds find all the integral points. In this case, the only point will be $(x,y) = (1,7)$. Since 7 is not a square, you deduce that the original equation has no integral solutions. Of course, I didn't actually compute the bounds, but asked Magma, which does it automatically. Here is the code:
<code>> P<x>:=PolynomialRing(Integers());
> E:=EllipticCurve(x^3 + 48);
> Rank(E);
1
> TorsionSubgroup(E);
Abelian Group of order 1
> IntegralPoints(E);
[ (1 : 7 : 1) ]
[ <(1 : 7 : 1), 1> ]
</code>
Comment: Thanks for the solutions. :) But is there any simple way to solve this problem? e.g., we may rewrite it as $x^3+64=y^4+16$, and we may use the same method as we use in solving $x^3+23=y^2$. (I mean rewriting as $x^3+27 = y^2 +4$). I really appreciate such a nice solution.
Comment: Well, don't forget $(1,-7)$.  (Of course $-7$ is not a square either...) Compare with my very similar recent answer, where I pointed out that IntegralPoints does not return Mordell-Weil inverses.  (Since the elliptic curve there was not in short Weierstrass form, the additional integral points were not so obvious...)
Comment: @Pete Thanks for pointing that out. I have already seen your answer, but decided it wasn't worth bumping this post just for the minus sign.
Answer: I realize this is a massive revive, but here is a solution without any powerful theorems about elliptic curves.
We have $x^3 + 64 = y^4 + 2^4$. It is easy to show all (odd) primes dividing the RHS are $1 \pmod{8}$. Now, looking modulo $16$ we deduce either $x \equiv 1 \pmod{16}$ and $y$ is odd or $x,y$ are both even. For the second case if $v_2(x) = 1$ we derive a contradiction because $v_2(LHS) = 3$ while $v_2(RHS) \ge 4$. If $v_2(x) \ge 2$ we have $v_2(LHS) \ge 6$. Thus we must have $v_2(y) = 1$ for $v_2(y^4 + 16) > 4$. Writing $y = 2k$ we need $v_2(k^4 + 1) \ge 2$. But this is absurd since $v_2(k^4 + 1) \le 1$ by checking modulo $4$. Thus it follows $x \equiv 1 \pmod{16}$.
But now utilize $x^3 + 64 = (x+4)(x^2 - 4x + 16)$. $x+4$ is $5 \pmod{8}$, which is absurd so we are done.
Comment: What's $v_2$???
Comment: Sorry, I realize this is slightly unconventional notation. It denotes what most people denote as $\text{ord}_p(x)$, the greatest exponent of $p$ which divides $x$.
Comment: That's fine, just make sure you explain what it is in your answer.
Comment: @dinoboy That's not how any people denote $\text{ord}_p(x)$, which is the order of $x$ mod $p$, i.e. the smallest $k\in\Bbb Z^+$ such that $x^k\equiv 1\pmod{p}$.
Comment: If an odd prime $p$ divides the RHS, then $(-1|p)=1$, i.e. $p\equiv 1\pmod{4}$, but how do you conclude $p\equiv 1\pmod{8}$?
Answer: I'm posting this as a community wiki "answer" because I'm not sure it works and the explanation wouldn't show up very well in the comments section I guess. If we factor the equation in $\mathbb{Z}[\sqrt{3}]$ we get $(y^2 - 4\sqrt{3})(y^2 + 4\sqrt{3}) = x^3$. Thus if $y^2 - 4 \sqrt{3} = (a + b\sqrt{3})^3$ for some $a + b\sqrt{3} \in \mathbb{Z}[\sqrt{3}]$ then we get
$$y^2 - 4 \sqrt{3} = a^3 + 3a^2b\sqrt{3} + 9ab^2 + 3b^3 \sqrt{3} $$
so that we must have $3a^2 b + 3b^3 = -4$ and since $3$ does not divide $4$ we get a contradiction. The problem is that I need to justify somehow that $y^2 - 4 \sqrt{3} = (a + b\sqrt{3})^3$ and although I know that $\mathbb{Z}[\sqrt{3}]$ is a unique factorization domain, I would need the two factors $y^2 - 4 \sqrt{3}$ and $y^2 + 4 \sqrt{3}$ to be coprime I think, and I can't seem to justify it or disprove it.
Edit (Alex):
Suppose that we have an integer solution to $x^3 = y^4 - 48$.
Claim: The two factors $y^2\pm 4\sqrt{3}$ are coprime in $\mathbb{Z}[\sqrt{3}]$. Indeed, let $\alpha = v+\sqrt{3}w$ divide both factors. Then, $\alpha$ also divides their difference, which is $8\sqrt{3}$. Without loss of generality assume that $\alpha$ is irreducible. Then, $\alpha$ divides 2 or is (up to a unit) equal to $\sqrt{3}$. Since $\alpha$ also divides $x^3\in \mathbb{Z}$, we deduce that $x^3$ is divisible by either 2 or 3 (or both). This implies that $y$ must also be divisible by either 2 or 3. But then, $x^3$ is also divisible by either 8 or 27 (or both), since it is a cube, and $y^4$ is divisible by 16 or 81. Now, the latter is impossible, since $y^4 - 48 \equiv -3\neq 0\pmod{9}$. The former is also impossible, since it would imply that $x^3=y^4 - 48$ is divisible by 16, so $x$ is divisible by 4, so $x^3$ is divisible by 64 and you would obtain a contradiction modulo 64 as above.
This implies that $y^2+4\sqrt{3}$ is a cube times a unit in $\mathbb{Z}[\sqrt{3}]$, $y^2+4\sqrt{3}=u\cdot(a+\sqrt{3}b)^3$. The units in this ring form an abelian group with torsion $\pm 1$ and with free part of rank one, generated by $2+\sqrt{3}$. The torsion are all cubes, so we can incorporate them into the bracket. Of course, cubes of a non-torsion unit can also be incorporated into the bracket, so it suffices to show that $y^2+4\sqrt{3}\neq (2+\sqrt{3})^{\delta}\cdot(a+\sqrt{3}b)^3$ for $\delta\in{0,1,2}$. This is done through case by case analysis, Adrián has already done the $\delta=0$ case.
Comment: I finished the analysis of the two remaining cases for $\delta = 1$ and $\delta = 2$ by working modulo $3$. I'll try to edit the answer tomorrow when I have time.


Intuitive explanation for Jacobian matrix having max. rank

Question: As part of a longer definition I came across the following: $f: X\subseteq\mathbb{R}^m \rightarrow \mathbb{R}^n$ ($X$ open, $m<n$) with $rank(Df_{x}) = m$ for all $x \in X$. My question is now if you can give me an intuitive explanation of what it means for $f$ that its Jacobian matrix has rank $m$ for all $x\in W$. I don't know if it matters but $f$ was also to be injective and smooth.
Answer: $Df_x$ is an $m\times n$ matrix at each $x$, its maximal rank is $m$ (since $m<n$). $Df_x$ has maximal rank at every $x$ means that $f$ is an immersion.
http://en.wikipedia.org/wiki/Immersion_%28mathematics%29
Roughly speaking that means the tangent space at $x$ is mapped injectively into the tangent space at $f(x)$. That map between tangent spaces is called the differential map, represented by the Jacobian matrix in this case.
Hope that helps.
Answer: The determinant of the Jacobian is the constant by which a volume is multiplied in a very small area around the point if you apply the function.
If the determinant is 0, this means that the function maps the point into a "smaller" space which does not go well with being injective.
Comment: But the matrix isn't square, so I don't see how this applies here.