Do Clustering algorithms need feature scaling in the pre-processing stage?

Question: Is feature scaling useful for clustering algorithms? What type of features, I mean numeric, categorical etc., are most efficient for clustering?
Answer: Clustering algorithms are certainly effected by the feature scaling.
Example:
Let's say that you have two features:

weight (in Lbs)
height (in Feet)

... and we are using these to predict whether a person needs a 'S' or 'L' size shirt.
We are using weight+height for that, and in our trained set let's say we have two people already in clusters:

Adam (175Lbs+5.9ft) in 'L'
Lucy (115Lbs+5.2ft) in 'S'.

We have a new person - Alan (140Lbs+6.1ft.), and your clustering algo will put it in the cluster which is nearest.  So, if we don't scale the features here, the height is not having much effect and Alan will be allotted in 'S' cluster.
So, we need to scale it. Scikit Learn provides many functions for scaling. One you can use is sklearn.preprocessing.MinMaxScaler.
Comment: The *nearest* cluster is defined by the distance. If scaling matters depends on the distance measure used. For example, correlation is not affected by scaling.
Answer: Yes. Clustering algorithms such as K-means do need feature scaling before they are fed to the algo. Since, clustering techniques use Euclidean Distance to form the cohorts, it will be wise e.g to scale the variables having heights in meters and weights in KGs before calculating the distance.
Comment: The choice of distance measure is often up to the user, other common options are block distance, gaussian (kernel) distance (e.g. GMM) and correlations.
Answer: In fact, most clustering algorithms are even highly sensitive to scaling. Rescaling the data can completely ruin the results.
Bad scaling also appears to be a key reason why people fail with finding meaningful clusters. It is just very easy to do badly.
By no means rely on automatic scaling. It must fit your task and data. Preprocessing is an art, and will require most of the work.
Non-continuous variables are big issue. While you can "hack" data into binary encodings and then pretend they are suitable, the discreteness poses a major issue for the algorithms. For example, many points have the same distance. And the mean of such a variable doesn't make a lot of semantic sense anymore. The squared deviation (as used by k-means) is even worse. Results may often be better if you ignore such variables when clustering.
Same goes for bad attributes, such as identifiers, sequence numbers, etc.
Answer: Scaling affects Clustering Results in a way that depends by the metric used (Euclidean Distance, Squared Euclidean Distance, Manhattan Distance, …)
In general when you are mixing features which have different physical measurements units, you can think of a Linear Transformation (i.e. Offset + Scale Factor) to transform them into a common space
You can also think to try learning this transformation, using some more complicated model than a linear one (if you think your problem requires it)
Answer: Feature scaling will certainly effect clustering results. Exactly what scaling to use is an open question however, since clustering is really an exploratory procedure rather than something with a ground truth you can check against. Ultimately you want to use your knowledge of the data to determine how to relatively scale features. In practice clustering is going to work best with numeric features, so if you have a mix of feature types you may want to look at embedding methods such as GLRM as a preprocessing step.
Answer: There are different clustering algorithms. Without knowing every one well, I would assume it may vary.
One very popular clustering algorithm is k-means and this one usually needs scaling since

"K-means clustering is "isotropic" in all directions of space and
  therefore tends to produce more or less round (rather than elongated)
  clusters. In this situation leaving variances unequal is equivalent
  to putting more weight on variables with smaller variance, so
  clusters will tend to be separated along variables with greater
  variance."

For more see: https://stats.stackexchange.com/questions/21222/are-mean-normalization-and-feature-scaling-needed-for-k-means-clustering


divide ethers to current token holders only

Question: My task is to divide the dividend sent by owner to the contract to the current token holders.The token holders can come later and redeem their pending amounts, the important point here is that, when a deposit is made that deposit should not be given to people that will hold tokens later than this and the portion of each token holder should remain until he redeem.
This is my code snippet:
<code>struct Account {
        uint256 balance;
        uint256 lastDividends;
    }
mapping (address => Account) accounts;

// ------------------------------------------------------------------------
// Ether fallback function -- works as deposit
// ------------------------------------------------------------------------
function () external payable {
    totalDividends = totalDividends.add(msg.value);
}

// ------------------------------------------------------------------------
// Token holders can claim their pending dividends using this function
// - the sender address must not be excluded by owner
// ------------------------------------------------------------------------
function claimDividend() public notExcluded {
    uint256 owing = accountDividend(msg.sender);
    if (owing > 0) {
        msg.sender.transfer(owing);
        accounts[msg.sender].lastDividends = totalDividends;
    }
}

// ------------------------------------------------------------------------
// Calculates the pending dividends of the holders
// ------------------------------------------------------------------------
function accountDividend(address account) internal returns (uint256) {
    soldTokens = (_totalSupply.sub(balances[owner])).sub(excludedTokens);
    return ((totalDividends.sub(accounts[account].lastDividends)).mul(accounts[account].balance)).div(soldTokens);
}
</code>
However, this code actually divides each deposit with all sold Tokens but it doesn't keep the share of each token holder's safe. Let's say an owner deposited 100 ethers and there are 10 tokens holded by walletA, 20 tokens holded by walletB, and 40 tokens holded by walletC, now according to above snippet, it will divide add the new deposit to the totalDeposit and it will divide the totalDeposit by sold tokens at the moment when a person make withdraw.
As seen from above example, it has 70 sold tokens at the moment it made the deposit but since the accounts are not updated at that moment so, let's say walletA claims later when two more wallet holding 30 more tokens come. At that very moment, according to above snippet it will divide the total deposit by 100.
My problem is to give share of deposits only to those who are currently present and that deposit is not given to people who become holders later. The late token holders will get portion from next payout.
I am looking forward to design guideline, please? I know I can use loops and divide the deposit to all token holders present at the moment but that will cost me alot of gas. I have written that code snippet too:
<code>// this will accept ether deposits
function deposit() public payable{
    soldTokens = (_totalSupply.sub(balances[owner])).sub(excludedTokens);
    uint256 available = msg.value * scaling;
    dividendPerToken = (available).div(soldTokens);
    if(dividendPerToken == 0)
        dividendPerToken += (available).remainder(soldTokens);
    for(uint i=0; i< holders.length; i++){
        address account = holders[i];
        //if(account != owner)
        if(excludedWallets[account] == false)
            dividendBalanceOf[account] += balances[account].mul(dividendPerToken);
    }
}

function withDraw() public returns(bool success){
    uint256 amount = dividendBalanceOf[msg.sender].div(scaling);
    amount += dividendBalanceOf[msg.sender].remainder(scaling);
    dividendBalanceOf[msg.sender] = 0;
    msg.sender.transfer(amount);
    return true;
}
</code>
Answer: This is a non-trivial problem.
You cannot use loops. It's not that the gas will get too large to be practical. The contract will fail completely when the loops get too large and that would be catastrophic.
No widely accepted standard exists at this time. You might look at this proposal: https://github.com/ethereum/EIPs/issues/1726 and this implementation: https://github.com/Roger-Wu/erc1726-dividend-paying-token/blob/master/contracts/DividendPayingToken.sol
Hope it helps.
Comment: My blog also has a couple posts about how to do this: https://programtheblockchain.com/posts/2018/02/07/writing-a-simple-dividend-token-contract/ and https://programtheblockchain.com/posts/2018/02/13/writing-a-robust-dividend-token-contract/.


To much green pepper in my chili, can I fix it?

Question: Can I fix it? What can I add, everything I see says about pepper. It has to much green pepper in it.
Comment: Green chile peppers, or green peppercorn?
Comment: What is wrong with just cooking a batch with too much green pepper?   Add more beans?
Comment: Spicy hot green, or the mild stuff? Longer cooking will reduce the heat of hot peppers, dilution will cut down on too many bells, at the expense of giving you a larger batch of chili.
Comment: Is the pepper chopped? So finely that you can't just pick it out? Have you added the beans yet - maybe you could use extra.
Comment: Yes it is chopped very fine. Added everything to it already.
Comment: Thank you all for your help. Ended adding tomato paste and sugar and more chili powder and it was great!
Answer:
Add more of the other ingredients
Add dairy
Add acid
Add a sweetener
Serve with bland, starchy foods

Options 1 and 5 provide a solution which will not alter the flavor of your chili too much.
Source of ideas: The Kitchn
Comment: Thank you! I added more tomato paste, and some sugar and more chili powder and it was great!
Answer: It depends what you mean by "Too much green pepper".
Too much bell pepper and the chili is not spicy/hot enough?

Add more hot peppers, adjust other aromatics/spices to be proportional - don't recommend adding more meat/beans)

Too much of some other chili and it's too spicy/hot?

Serve with rice or other bland starch; add more of not-spicy ingredients to dilute)

Pepper mix out of balance and doesn't have the flavor that you want?

Add other peppers to balance, probably adjust meat/beans and other aromatics/spices to be proportional).


Find most representative image

Question: I have 1,000 photoshoot-quality images of pianos on white background with very little noise (people in the background, etc). How would I go about finding the piano image that looks most like the others? Alternatively, how would I find five pianos that look most like the "average" piano. I'm particularly looking for python libraries that may be helpful (I'm currently looking at skimage).
Answer: Find a low-dimensional emdedding of the images using a nonlinear dimensionality reduction method like autoencoding, then select the image closest to the centroid in the embedding space.
Comment: For high-level objects like pianos how deep a network and how many days of training will be needed? Maybe quicker to use the top layer of already trained network such as GoogleNet?
Comment: Do you have a link to an example / code for reducing dimensionality of images?
Comment: It depends on your hardware, of course, Valentas. And sure, there's no harm in starting with a pretrained network. @user2726995: http://deeplearning.net/tutorial/dA.html
Answer: You could use the OpenCV library, specifically, the Haar-Cascade technique . The OpenCV is a computer vision library that have a python interface. You could take a look in this tutorial to start.

Find most representative image


Homebrew not installing correctly

Question: I was installing homebrew through the .pkg to install GNU Emacs, and it did not run after installation. I ran brew help and it outputted zsh: command not found: brew. Command Line Developer Tools were installed before installation of homebrew. The PKG file was from the official site. I am running MacOS 14.0 on a 2020 M1 MacBook Air.
Comment: You have not explained exactly all the steps you did for installation, so it's hard to diagnose. And of course: Die you manually check, whether the directory containing `brew` is in your PATH?
Answer: Typically this is a problem with your $PATH - as there are some setup steps you have to run once the install completed.
Let's check to see if that's it... Run these commands:
/opt/homebrew/bin/brew update
/opt/homebrew/bin/brew update
/opt/homebrew/bin/brew doctor

If the doctor says to do things, do them and post a comment here. I am assuming you installed homebrew into the default location and missed this part of the install:

==> Next steps:

Run these two commands in your terminal to add Homebrew to your PATH:
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/<whatever your obfuscated user path is>/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Comment: No, I am using the default mac zsh, but your previous answer worked! `brew help` outputted the full help list, and all brew commands work!
Comment: Output `Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Homebrew's "bin" was not found in your PATH.
Consider setting your PATH for example like so:
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc`. Most likely, that is the case, although moving the path has been a recurring problem for me.
Comment: Yes - see my edit - you need to append the results of `(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"')` to your .zprofile or back it up and start with a new .zprofile file...
Comment: Are you using OhMyZsh or some other setup? @AverageTerminalUser

Homebrew not installing correctly


Machine learning models with high test set variance?

Question: Do certain machine learning algorithms have higher variance in their predictions than others or have parameters to adjust this? Right now I'm using a regularized linear model for time series prediction on very noisy data and it's resulting in very conservative predictions out of sample i.e. predicting close to the mean value for most observations. I'd like to have a model that has high variance in it's predictions and either hits or misses rather than hits in the middle every time. Are there certain models I should try or tips I could try?
Answer: Yes,Certain machine learning algorithms have higher variance.
A good rule of thumb is the more parameters a model has the higher the variance of that model.
Trees have high variance, you reduce the variance by ensembles i.e random forests.
Neural networks also have higher variance, if you don't use regularization or drop out layers.
You can also map your data into a higher dimensional space using polynomials as well.
Comment: @BrianL Having high variance (due to different training sets) usually also implies having high variance for "out of sample predictions". (by sample I assume you mean training data?).  The two sort of go hand in hand, because a more complex model will make two samples which might be very close in space have very different predictions as opposed to a model that has a simple model and two close samples will almost always be given the same prediction.
Comment: I thought the "variance" of these models refers to the variance of their predictions when they are applied to different training sets. This is related to the variance of their out of sample predictions?
Comment: Got it. It just seems like there's a difference between the variance of a model on different training sets vs variance of predictions. For example a model could have high variance in its predictions (predicts high and low values often), but its predictions are still consistent when applied to different training sets i.e. it has low variance when comparing training sets. My understanding of bias-variance tradeoff was that it referred to the latter situation of the variance of a model on different training sets. But I guess these two go hand in hand.


Copying just text, not formulas, in OpenOffice Calc

Question: How do I copy and paste the text (not the formulas) from one Calc sheet to another in OpenOffice?
Answer:
Select the cells you want to copy, and use Ctrl-C to copy them.
Select the cell where you want to copy the cells.
Open the Edit->Paste Special menu.
In the Selection section, ensure that the Paste All and Formulas options are not selected. Select all other options in that section.
Click OK, and the cells will be copied without the formulas.
Comment: In current libreoffice: copy like normal, right click -> paste only -> number.
Answer: Didn't work for me but found that if I copied the result from a simple =EXACT etc formula, ie results were either TRUE or FALSE, and pasted it to Notepad, the results appeared as text and I could copy and paste them back to the worksheet.
Answer: In my case the accepted answer did not work, as it copied just the header of the column but no data.
What eventually worked out for me was:

Select cells to copy
Copy them (Either Ctrl+C or Right click -> Copy)
Right click where you want to paste and select Paste Only -> Number

Note that if you select Paste Only -> Text you will get a similar result but with just the data that was text (and not numbers). Hope this helps someone.


Hirens boot cd does not dectect hard drive

Question: I want to reset my windows 8 password through Hirens boot cd mini windows xp. It does not detect my hard drive so i can not find the SAM file.
How can i make it see my hard drive so i can fix this?
Answer: This just worked for me with a newer laptop (Dell latitude 3500):
Make sure you have the new Hirens from: https://www.hirensbootcd.org/download/
Make sure you install it to a flash drive as UEFI - So the newer PC can see the flash drive if legacy options are not available: https://www.hirensbootcd.org/usb-booting/
Perform a restart on your PC first, to prevent hibernation errors.

Unlike what a lot of other forums say, you actually have to go into your PC's bios settings and BOOT TO AHCI (RUN SATA AS AHCI MODE) to make Hirens see your computers C drive. (Confirmed works on Dell NVME m.2 drives)
Once bios settings are changed, boot into Hirens, and go into the Desktop Utilities>Security>Passwords folder.
There are multiple options, but for me NT Password Edit works if you are unable to get the driver for your hard drive.
Run NT Password Edit, it should pick up the SAM file from the C drive, if not point it there > C:\WINDOWS\SYSTEM32\CONFIG\SAM > and then click open
From here, choose which account you want to change the password > Change the password > Then you need to do two things - Restart the PC but also change the bios back to whichever SATA option it was before and then restart back into Windows.
Answer: I don't know what you mean by hard drive not detected. You have a few options.

If it's a BIOS/UEFI mode clash, then you can boot into Windows RE and perform a Sticky Keys hack.
Another option is to use the Ubuntu Live CD and reset it using the chntpw package. Details here.
If nothing works out, you can just use the Ubuntu Live CD to backup your data to another partition and perform a clean install of Windows 8.1. Use the Microsoft Media Creation Tool to download an ISO. Since you are locked out of your main computer which has the Windows 8 key, you can download it on another computer by using a Volume License key pertaining to the appropriate edition (Pro, Home, Single Language, etc). These are freely available on the internet.


Current Monitors for Avalanche Photodiodes

Question: I've come a across a document by Linear Technologies that suggests several circuit schematics to interface with an Avalanche Photodiode (APD). They are referred to as current monitors and placed before the APD (in the schematic, in practical terms it is irrelevant). Aren't these the same as transimpadance amplifiers? If not, what exactly are the differences/advantages/disadvantages, specially compared to the approaches suggested in this answer ?
Answer:
Aren't these the same as transimpadance amplifiers?

Well, yes and no. Technically, any current to voltage converter can be called a transimpedance amplifier. However, when dealing with opamps this generally refers to a configuration where the current is injected directly into one of the opamp inputs and the feedback resistor does the voltage conversion. The answer you link to is a good example. The big problem with this approach is that the conditioning electronics is tightly constrained by the need to return all the current through the load into the amplifier. For multiple sensors this can be difficult.
The current monitor, as shown above, isolates the sense element from the amplifier. This has good and bad consequences. On the plus side, it's easier to measure multiple sensors, and good frequency response is easier to guarantee. On the minus side, you have to insert a separate monitor element into the current path, and the usable gain is typically a good deal less. Also, the transimpedance configuration potentioally injects noise directly into the opamp, which can cause unexpected and intermittent problems.
Which approach one chooses depends on which considerations are more important.
Comment: So for a single sensor and low-noise measurement, a conventional transimpedance amplifier is recommended.
Comment: Only as long as you need a lot of gain and the speed requirements are not too great. For instance, lab photodiodes used for monitoring high speed pulses commonly use a battery-biased photodiode which feeds a coax cable, and the current detection is performed at the other end of the coax by a 50 ohm resistor. See, for instance, Thorlabs.


ASP.NET MVC `Html.ActionLink` between "Areas"

Question: I have added a new Area to my MVC3 project and I am trying to link from the _Layout page to the new Area. I have added an Area called 'Admin' that has a controller 'Meets'.
I used the visual studio designer to add the area so it has the correct area registration class etc, and the global.asax file is registering all areas.
However, when I use the following 2 action links in a page in the root, I run into a few problems:
@Html.ActionLink("Admin", "Index", "Meets", new { area = "Admin" }, null)
@Html.ActionLink("Admin", "Index", "Meets", new { area = "" }, null)

When clicking both links, I am taken to the Meets controller in the Admin area, where the application then proceeds to throw an error saying it cannot find the Index page (even though the Index page is present in the Views folder in the Area sub-directory.
The href for the 1st link looks like this:
http://localhost/BCC/Meets?area=Admin
And the href for the 2nd link looks like this:
http://localhost/BCC/Meets
Also if I hit the link that I expect to be created:
http://localhost/BCC/Admin/Meets
I just get a resource cannot be found error.  All very perplexing!  I hope someone can help...
Comment: What is "BCC" in this case? Is it a virtual directory?
Answer: Strange indeed. Steps that worked perfectly fine for me:

Create a new ASP.NET MVC 3 application using the default Visual Studio template
Add an area called Admin using Visual Studio designer by right clicking on the project
Add new Controller in ~/Areas/Admin/Controllers/MeetsController:
public class MeetsController : Controller
{
    public ActionResult Index()
    {
        return View();
    }
}

Add a corresponding view ~/Areas/Admin/Views/Meets/Index.cshtml
In the layout (~/Views/Shared/_Layout.cshtml) add links:
@Html.ActionLink("Admin", "Index", "Meets", new { area = "Admin" }, null)
@Html.ActionLink("Admin", "Index", "Meets", new { area = "" }, null)

Run the application.

Rendered HTML for the anchors:
Admin
Admin

As expected the first link works whereas the second doesn't.
So what's the difference with your setup?
Comment: There is no "Admin" controller for area "", in your case you created a new "Admin" area with a 'MeetsController' and so the first link  should work as intended. If you truly want the controller from the "Admin" area to execute 'anywhere' you can try moving all the views, partials, etc out of the 'Admin' area and into the root of your web app. I'm not sure how well (if) this would work.
Answer: Another option is to utilize RouteLink() instead of ActionLink(), which bypasses the area registrations altogether:
ActionLink version:
Html.ActionLink("Log Off", "LogOff", "Account", new { area = "" }, null)

RouteLink version:
Html.RouteLink("Log Off", "Default",
    new { action = "LogOff", controller = "Account" })

The second parameter is a "Route Name" which is registered in Global.asax.cs and in various 'AreaRegistration' subclasses. To use 'RouteLink' to link between different areas, you only need to specify the correct route name.
This following example shows how I would generate three links to different areas from a shared partial, which works correctly regardless of which area I am 'in' (if any):
@Html.RouteLink("Blog", "Blog_default",
    new { action = "Index", controller = "Article" })

@Html.RouteLink("Downloads", "Download_default",
    new { action = "Index", controller = "Download" })

@Html.RouteLink("About", "Default",
    new { action = "Index", controller = "About" })

Happy coding!
Answer: I figured this out - I created a new test project and did exactly the same thing I was doing before and it worked...then after further inspection of all things route-related between the two projects I found a discrepancy.
In the global.asax file in my BCC application, there was a rogue line of code which had inexplicably appeared:
        public static void RegisterRoutes(RouteCollection routes)
        {
            // Problem here
            routes.Clear();

            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );
        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
        }

As you can see where my comment is, at some time or other I had placed the routes.Clear() call at the beginning of RegisterRoutes, which meant after I had registered the Areas in Application_Start, I was then immediately clearing what I had just registered.
Thanks for the help...it did ultimately lead to my salvation!
Answer: Verify that your AdminAreaRegistration class looks like this:
public class AdminAreaRegistration : AreaRegistration
{
    public override string AreaName
    {
        get
        {
            return "Admin";
        }
    }

    public override void RegisterArea(AreaRegistrationContext context)
    {
        context.MapRoute(
            "Admin_default",
            "Admin/{controller}/{action}/{id}",
            new { action = "Index", id = UrlParameter.Optional }
        );
    }
}

and that you have this in Global.asax.cs:
protected void Application_Start()
{
    ... // ViewEngine Registration
    AreaRegistration.RegisterAllAreas();
    ... // Other route registration
}

Answer: I solved this problem by doing the following.
In my Global.asax.cs, I have
    public static void RegisterGlobalFilters(GlobalFilterCollection filters)
    {
        filters.Add(new HandleErrorAttribute());
    }

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
    }

    protected void Application_Start()
    {
        //Initialise IoC
        IoC.Initialise();

        AreaRegistration.RegisterAllAreas();
        RegisterGlobalFilters(GlobalFilters.Filters);
        RegisterRoutes(RouteTable.Routes);
    }

In my PublicAreaRegistration.cs (Public Area), I've got
public class PublicAreaRegistration : AreaRegistration
{
    public override string AreaName
    {
        get
        {
            return "Public";
        }
    }

    public override void RegisterArea(AreaRegistrationContext context)
    {
        context.MapRoute("Root", "", new { controller = "Home", action = "Index" });

        context.MapRoute(
            "Public_default",
            "Public/{controller}/{action}/{id}",
            new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            , new[] { "<Project Namespace here>.Areas.Public.Controllers" }
        );
    }
}

In my AuthAreaRegistration.cs (Area for Restricted access), I've got
public class AuthAreaRegistration : AreaRegistration
{
    public override string AreaName
    {
        get
        {
            return "Auth";
        }
    }

    public override void RegisterArea(AreaRegistrationContext context)
    {
        context.MapRoute(
            "Auth_default",
            "Auth/{controller}/{action}/{id}",
            new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );
    }
}

And finally, my links in my *.cshtml pages would be like
1) @Html.ActionLink("Log Off", "LogOff", new{area= "Public", controller="Home"})
or
2) @Html.ActionLink("Admin Area", "Index", new {area= "Auth", controller="Home"})
Hope this saves someone hours of research! BTW, I'm talking about MVC3 here.
Kwex.
Comment: A note to readers, the ActionLink examples here would result in the same problem the OP was experiencing, despite the other changes, they should be written as follows:

1) @Html.ActionLink("Log Off", "LogOff", new{area= "Public", controller="Home"}, null)

or

2) @Html.ActionLink("Admin Area", "Index", new {area= "Auth", controller="Home"}, null)
Answer: This might not be the case for most of the developers but I encountered this problem when I added a my first area and did not build my solution. As soon as I build my solution the links started to populate correctly.


Is not taking a second wife imitating the disbelievers or going against sunnah?

Question: Does not taking a second wife (even after being able to treat wives fairly) fall under the category of imitating disbelievers? I heard that Abd ul aziz bin baz stated that in his book. Is it true? If a man is happy with one wife and doesn't want to take another (even after being financially stable to support second wife),then is he imitating disbelievers or going against sunnah?
Answer: Polygamy is an extension to monogamous marriage, the purpose of marriage has objectives and if these are fulfilled there is no harm in having only one wife.
Moreover, if one thinks that it is unfair to be polygamous, one should remain monogamous.
Answer: I highly recommend you learn what it means Islamically when someone is imitating the disbeliever. This generally means when it comes to imitating their haram practices and the like. And in this situation, limiting yourself to a monogamous marriage is halal whether the disbelievers do it or not.
Not taking a second wife is not imitating the disbeliever's because marriage as an institution has always existed regardless of religion and place with very few exceptions. What Islam did was give and explicate marital rights to both husband and wife, and limit the amount of wives a man can have to 4. And there are Islamic scholars who prefer a man having 1 wife rather than multiple.

And if your fear that you will not do justice to the orphan, then, marry the women you like, in twos, in threes and in fours. But, if you fear that you will not maintain equity, then (keep to) one woman, or a bond-woman you own. It will be closer to your not doing injustice.
Quran 4:3

In this verse, the Qur'an neither establishes new permissions for polygyny nor encourages it, rather it sets limitations on its practice.
The Qur'anic exhortation to 'marry only one' is grounded in it being the most fair option to women and the preferred option as mentioned by classical jurists like Imam al-Shāfiʿī (d. 204 H).
Furthermore,

And you shall never be able to maintain real equality between wives, even though you are eager to. So, do not lean totally (towards one) and leave the other hanging. And if you mend and fear Allah, then, Allah is Most-Forgiving, Very-Merciful.
Quran 4:129

Here, the Qur'an states, "You will never be able to treat your wives with equal fairness, however much you may desire to do so, but do not ignore one wife altogether, leaving her suspended…" which is often understood to be in conjunction with verse 3. The argument goes: if the requirement of polygyny is equal and fair treatment between wives, and this cannot be perfectly achieved, then indirectly the Qur'an is stating that monogamy is preferred.
Source: Women in Islamic Law: Examining Five Prevalent Myths


Do the bonus levels have infinite waves or is there a large reward at the end?

Question: I have played through two of these extra levels, but left them until I started playing on Hero difficulty. Because of this, it is quite hard to survive for too many rounds. So I wanted to ask, do these bonus levels have infinite waves or not? And, before I take the time to try to beat these levels, is there a big pay out at the end?
Answer: I played the challenge missions on normal, heroic and legandary difficulty.
Lorien is easier en stops at level 16, Osgiliath is harder and stops at level 20/21.
Level 5, 12 and 20 (or 21) are boss levels. For example level 5: 1 troll, level 21: 2 or 3 armored trolls.
Answer: I completed both bonus levels; they only have about 20 waves each. There's also no special reward, aside from some experience points.
Answer: I didn't make it so far in Osgiliath, however I almost got near to the end in Lorien. Aside from experience points, I also managed to work out some tactical maneuvers that I couldn't when actually on missions. Other than that, no loot to speak of, and I think I'll only go back when I wish to grind out some leveling.
Answer: The number of waves must depend of difficulty level. In normal, I had to beat 16 waves in both locations.
If you want to retain the XP points gained (the only reward) you must exit the location without dying (either winning the challenge or escaping it). However, the items you spend and the damage your equipment took will retain too.


How to minimize splatter using an immersion blender?

Question: When I use my immersion blender (for soups etc.), I always have a lot of splatter. Is there a way to minimize this splatter? Is it better to put the blender on and put it in the to-blend substance or the other way around? Are there other tricks?
Answer: First, use the highest-sided, smallest diameter container available. The food you're puréeing should have several inches from the top of the container. If the diameter is small enough, your blender will be able to get all the food moving at once -- you'll get a nice vortex right in the middle, and won't have to do any horizontal movement, just vertical. (Essentially the same thing as would happen in a counter-top blender's jar.)
The absolute best container is what's known as a "bain marie", a cylindrical metal pan that's much taller than it is wide:

You can get these fairly cheaply at restaurant supply stores. It's not absolutely essential, though, and if you don't want to buy one, use your pasta pot or stock pot.
Next, always turn the blender on and off while it's in the food, and keep the blade and its hood submerged. You should be able to move the business part of the blender near the surface, but keeping it a good inch or so underneath, and have the food at the top being sucked under and into the blade. Bringing the blade to the top, so that it's partially in the air, is all but guaranteed to splatter.
Start blending near the top of the container, then slowly and smoothly move your way down and back up. If your container requires you to move horizontally, do the top "layer" before moving downwards.
If you have speeds on your blender, go through all of the food on low, getting it uniformly chopped up before raising the speed. If you have especially chunky food, it will take a while on low before it's safe to raise the speed without splashing.
It will occasionally happen that the blade isn't making contact with the food, especially if you get too near the bottom or it's something especially thick that you're trying to purée. It may feel like the blender "grabs" the bottom of the container -- I guess there's some kind of vacuum forming, although that doesn't quite make sense to me. The motor will start going too fast and the vortex, if you had one, will fall apart. You can usually get it restarted just by tilting the mixer, but you may have to stop the blender, go back to the top, and begin again.
Comment: The only thing I would add to this very comprehensive answer is I find holding the blender at an angle on the bottom of the pot against a side and just holding there creates a current that pulls the soup around the pot and through the blender. if the top isn't getting pulled down it's usually less messy to stop and stir it than bring the blender up towards the surface.

Also when I've got 50 bowls of leek and potato soup to blend, doing it in the soup pot is just so much easier I'd make way more mess getting it into another container in batches anyway.
Comment: Well, ideally you'd get a bain that was big enough for your typical batch.
Comment: When I am trying to blend a small amount of food (which is often problematic in large diameter pots), I use a coffee mug that is just large enough to fit the head of the blender.
Answer: Cut a hole in a paper plate and put the shaft through the hole. The plate will act as a lid.
Comment: A paper towel also works in a pinch.
Comment: There was a Good Eats episode where Alton Brown used a frisbee that had a hole in the middle to fit the shaft, and then a slice from the hole to the outside to insert the blender.
Answer: BULLETPROOF COFFEE WITHOUT ALL THE SPATTER
i use my hand blender to make BULLETPROOF COFFEE .... I mix hot coffee, an oz of grass fed Irish butter, a tbsp or so of Coconut oil and maybe a bit of Heavy whipping Cream.   I then get on my knees and pray.  Then I insert the handblender into my cup and turn it on and HOLY BULLETPROOF COFFEE EVERYWHERE. Then I clean it up and change my shirt.
A BETTER SOLUTION:  I have come up with is put the handblender on the very bottom of an EXTRA LARGE cup and turn it on in that posture, but it still makes a bit of a mess.   MY LATEST  is that I put the extra large cup in my sink and turn on the handblender only then.
It's somewhat better.
Comment: Welcome to SA, John!  However, you're answering a question which had an accepted answer 10 years ago.  Also, your answer doesn't directly address the question, but veers off into a discussion of coffee, which is not what the question was about.  Thanks!


Sharing one PS4 subscription account linked to my gmail account for both sons

Question: I've a PS4 membership account linked to my email address.  My two sons tell me this means they have to share the account and all their Fifa games are linked to each others; this is causing endless strife in the house!  Is there any way I can separate 'the account' so that they can each have theie own Fifa games and they're not linked to each other.  I'm not at all tech savvy, so would really appreciate some simple, clear, plain english advice:-).
L
Answer: You need to create subaccounts for each of your sons.  You can do this by going to Settings->Parental Controls->Family Management->Add Family Member.
Each son will then be able to log in separately and will have their own save games.  If you have PS+, they will get the PS+ benefits, though you will need to download any games owned under your account when logged in yourself.
Answer: This will not do. Save files are for one account, and cannot be split.
You will have to make a new account, and give it PS Plus to allow both to play FIFA (assuming the original is still being paid for) without any save files screwups.


How can I transfer downloaded games from my console to my friends and activate with my account

Question: So let's say I bought a ps4, bought fifa 19, red dead redemption 2 and Spider-Man on my psn account, downloaded the games on my console and can now play the games. And then I decide to transfer my games and other data to my friend who just got a ps4 console. If I sign out of my account and sign into his console to activate the games I had purchased with my psn account. Provided I do not go online with my own console, can I still play these games on the first console (mine)?
Answer: You would need to make your friend's PS4 the Primary one on your PSN account.
Do the following:
First deactivate the system as Primary from your PS4:

Select  (Settings) > [Account Management] > [Activate as Your Primary
  PS4] > [Deactivate] on an activated PS4 system.

Then activate the system on your friend's PS4 as Primary on your PSN account:

To activate your system after you first sign in, select  (Settings) >
  [Account Management] > [Activate as Your Primary PS4] > [Activate].

The games you've bought will now be on your friend's PS4.


Two notions of regularity for measures

Question: Wikipedia defines a regular measure as a measure which, given on a topological space, satisfies:
$$\mu(A)=\sup\{\mu(F):F\subseteq A,F\text{ compact and measurable}\},$$
and that is inner regular, or:
$$\mu(A)=\inf\{\mu(U):U\supseteq A,U\text{ open and measurable}\},$$
and that is inner regular. Both conditions must hold for all measurable subsets $A\subseteq X$, $X$ being the space. My thesis professor told me a regular measure on a manifold is the measure associated to a volume form, i.e.:
$$\mu(A)=\int_A\omega,$$
$\omega$ being a volume form. What is the relationship between these notions? Does either imply another? Wikipedia lists examples of measures that are inner but not outer regular and viceversa: are there conditions where inner and outer regularity coincide?
Comment: Lebesgue measure on $R^n$  is both inner and outer regular. I have seen different definitions of inner regular, not all equivalent.
Comment: Point masses are regular in the inner/outer sense but are not induced by volume forms. I think the best measure-theoretic characterization of "coming from a volume form" is something like "absolutely continuous with smooth Radon-Nikodym derivative". This needs a choice of volume form to compare to, but is independent of the choice.
Comment: @anthonycarapetis "point masses [...] do not come from a volume form", well, unless you're on a 0-manifold, right :)? I can see how, in $\mathbb R^n$, form measures have a smooth density w.r.t. the Lebesgue measure, but on a manifold which measure do I use for absolute continuity? And can I prove that, at least in $\mathbb R^n$, smooth density iff form measure?
Comment: Also, density w.r.t. Lebesgue which is inner and outer regular implies the measure with density also is, doesn't it?
Answer: Volume forms produce measures that are inner and outer regular, but the converse is not true: if $n>0$ then point masses are (inner/outer) regular measures that are not induced by volume forms. (If $n=0$ then you're talking about a discrete space, so every measure is regular in both senses.)
Let's assume $M$ is orientable so that volume forms exist, and refer to the measures induced by them as smooth measures. The bundle $\Omega^n(M)$ of top forms is thus trivial and rank-1; i.e. top forms $\simeq$ smooth functions. Thus any two volume forms ($\simeq$ non-vanishing functions) $\omega, \sigma$ are related by $\omega = \rho \sigma$ for some non-vanishing smooth function $\rho$. Thus smooth measures have non-vanishing smooth densities with respect to any other smooth measure. This also implies $\int_X \omega = 0 \iff \int_X \sigma = 0$, so we don't need a distinguished volume form to define absolute continuity of an arbitrary measure: $\mu$ is absolutely continuous if $\int_X \omega = 0 \implies
\mu(X) = 0$ for some/every (doesn't matter!) $\omega$.
If $\mu$ is absolutely continuous, then the Radon-Nikodym theorem provides a measurable density $f$ s.t. $\mu = f \omega$. If this $f$ is smooth and positive then we can interpret $f \omega$ as a multiple of a smooth function and a volume form, so $\mu$ is smooth.
This isn't a very powerful observation in terms of recognizing smooth measures: after all, it characterizes smooth measures in terms of... smooth measures. But it does tell you a lot about the structure of the set of all smooth measures - once you know one, you know all of them. I suspect the multiplicity of smooth structures makes it impossible to find a general characterization using only measure-theoretic and topological data.
Comment: In local coordinates we have $\mu = f \lambda$ for $\lambda$ the Lebesgue measure, so with the right hypotheses it follows very easily from the regularity of $\lambda$. Falls out in a few lines if you assume $f$ is bounded, anyway - I'm not actually sure whether this kind of assumption is necessary. Might not be true in general. I'll think about it.
Comment: How do I show smooth measures are inner/outer regular?
Comment: It certainly works out fine for precompact test sets. I think $\sigma$-compactness should then be enough for any continuous multiple of a regular ($\sigma$-additive) measure to be regular. Maybe have a look through some textbooks for results of this nature or try to put the proof together yourself.

Two notions of regularity for measures


What are Hommel Hochberg corrections?

Question: I have recently been introduced to to Hommel Hochberg corrections. I am trying to find a simple explanation about what this actually is/does, but am having no luck. Can anyone please give a brief and simple description about Hommel Hochberg corrections?
Comment: Where have you been introduced to the Hommel Hochberg corrections, if you don't mind my asking? I have never seen a paper put together by the two of them. They each have their own methods along with some work done with others (i.e. Benjiamini-Hochberg) but I have not seen them together. Maybe you meant them separately?
Comment: Thanks for your response. My supervisor asked me to use them for a study, in the following context...Hommel-Hochberg corrections were applied to lower α levels for repeated measures. Perhaps they meant separately, but she's only discussed them as one!
Answer: I still don't get what your supervisor meant by Hommel-Hochberg seeing that I can't find any such collaboration but I guess it's no harm in putting some useful information out there regarding multiple test procedures.
Introduction. Bonferroni correction
First off, if you know nothing about multiple test procedures you should start by reading about the Bonferroni correction. It's super easy to understand and will give you a good starting base. All that Bonferroni does is to adjust the $\alpha$ value of interest by dividing it by $n$ (total number of alternative hypotheses). So you will end up rejecting any $H_i$ having
$$
p_i < \frac{\alpha}{n}
$$
This will keep the family wise error rate below $\alpha$. To give you a sense of how this works imagine you got 20 false alternative hypotheses and you're testing at a significance level $\alpha = 0.05$. Under these conditions, the probability of wrongly rejecting at least one null hypothesis (type I error) is given by
$$
P(\text{type I}) = 1 - P(\text{No type I}) = 1 - (1-0.05)^{20} = 1 - 0.36 = 0.64
$$
So even though you have 20 false alternatives there's a 64% chance you will favor one of them over the null. Using the Bonferroni correction, however, reduces this to
$$
P =  1 - \left(1-\frac{0.05}{20}\right)^{20} = 1 - 0.95 = 0.05
$$
Anyways, this is quite a long piece on Bonferroni when the question is not even about it. It should help you understand however the purpose of the next generation of multiple testing methods which use a step-up procedure. The problem with Bonferroni is that it becomes quite rigid when there's a large number of hypotheses tested and it assigns the same $\omega = \alpha/n$ value to every hypothesis. Step-up procedures work better than Bonferroni because they rank each hypothesis according to its p-value and then assign it a different $\omega$.
Hochberg
Hochberg (1988) presents one step-up procedure. There are others, some even more recent, that you could also look into such as Holm-Bonferoni or Benjamini-Hochberg (1995). The original Hochberg, however, the one you're interested in works like this:

Order the p-values $P(1), P(2), ..., P(n)$ and their associated hypotheses $H(1), ..., H(n)$
Reject all hypotheses $H(k)$ having $P(k) \le \frac{\alpha}{n+1-k}$ where $k = 1, ..., n$

As you can see, unlike the Bonferroni correction, Hochberg's step-up method compares each p-value with a different number. The smaller p-values get compared to lower numbers and the higher p-values get compared to higher numbers. This is the "correction" you are looking for.
Note that the Holm method I linked above is also referenced in Hochberg's paper so you might want to check that one out as well - they're very similar. Holm's btw, it's actually a step-down procedure. You can figure out the difference on your own I'm sure. Another quite important paper about both Hochberg and (next up) Hommel reference is Simes (1986). You should really check this one out as well to better understand the two methods.
Hommel
Hommel's method is more powerful than Hochberg but is kind'of more difficult to compute and wrap your head around. The shortest and easiest explanation I could find was in Multiple Hypothesis Testing (1995) (great multiple test procedures review btw) and it goes like this:

Let $j$ be the largest integer for which $$p_{n - j + k} > \frac{k\alpha}{j}$$ for all $k = 1, ..., j$.
If no such $j$ exists, reject all hypotheses; otherwise, reject all $H_i$ with $p_i \le \frac{\alpha}{j}$. Both $j$ and $i$, btw, go from $1$ to $n$.

The original paper, which you should really look into for a deeper understanding is Hommel (1988). Note that there are various assumptions each of these methods make, various differences between them, and different capabilities for each method. You should really study the papers to gain a deeper understanding of the subject.
Extras
Newer methods you might look into are White (2000) (uses a bootstrap method and as opposed to "correcting" alpha it offers a new way of calculating the p-value) and for an expanded version of White's, Wolf and Romano (2003). These are slightly different methods so they may not be relevant to you but they are quite powerful for testing multiple models against the same data (null hypothesis).
Sorry if some of my text was a bit off-topic. I got into this subject recently and I kind'of like writing about it. Hope this is helpful. Let me know if you actually find a Hommel-Hochberg method as I have not been able to.
Comment: Nice answer (+1). One detail: Perhaps you were trying to draw a connection to the Benjamini Hochberg procedure and its assumptions, but the section on Bonferroni correction is implicitly assuming independent tests, which is unnecessary and, in a sense, misleading. I would argue that showing the general case is actually *more* enlightening simply because it readily accords with common-sense notions and also shows, in a certain sense, why you need stronger assumptions to get a procedure with strictly better performance.
Comment: I am taking the liberty of correcting your Hommel procedure "otherwise, reject all $H_{i}$ with $p_{i}\le \frac{k\alpha}{j}$" should be "otherwise, reject all $H_{i}$ with $p_{i}\le \frac{\alpha}{j}$" per Hommel, (1988, p.384, third-to last sentence of the Closed Test Procedures Section), and also per Shaffer (1995, p.571, last sentence of Hommel's Test Procedure).

What are Hommel Hochberg corrections?


How might this creature evolve?

Question: The creature is an amphibious creature that lives in and near lakes. It is very large, being about 1.5m high at the thickest part of the body, and 7.5m long in total. Its neck is about 3.5m long and 30cm wide, and is very flexible. The neck is well-defined from the body, but the tail is not. Its head and neck are hard to see when it in the water. Its body is also flexible enough for it to curl its tail around to its neck. It has short, stubby limbs that are hard to notice when it is on land. On land, it moves in a lurching manner. In the water, it moves in a wriggling, churning way, and stays at the surface. Its back also looks like it is made of wood. What could this creature's ancestors be, and how might it evolve in this way?
Comment: So.... how would Loch Ness evolve?
Comment: Diet? Big difference between eating pond scum and ambush predator and fishing.
Comment: @DWKraus seems open, which helps us a lot. Such a large predator will have a lot of trouble if it's eating only meat and living only in lakes, so we can avoid these potentially wrong evolutionary paths.
Answer: It is a sauropod.
https://www.sciencealert.com/strange-dinosaur-tracks-in-texas-might-show-giant-sauropods-moving-on-only-two-legs

Your long necked, short-tailed creature is a sauropod.  It is an airbreather and so it stays at the surface.  It walks on the bottom or punts along with legs off the bottom.  It is buoyant and for short stretches can swim like an elephant, using its long neck to breathe instead of the trunk.

https://www.uwphotographyguide.com/rajan-swimming-elephant
A sauropod, this creature is a vegetarian because mostly there are vegetables in the world.  The big bodies allow efficient rumen-like digestion.  Like hippopotomi, it is not adverse to opportunistic omnivory.
They are used to having the water to support their bulk.  On land the big ones usually drag their bellies when they walk in the manner of alligators.  That is how they go thru shallow water also.   Smaller, lighter ones are more likely to leave the water and use their long necks in the manner of giraffes to forage on trees and vegetation up out of reach of smaller herbivores and away from the water where the big ones get the best plants.
Their backs look like wood because all of their skin is thickly keratinized to protect against the sun and biting flies, and when the backs dry out they look like wood.  One that had been out of the water long enough to dry completely would look like wood everywhere.
Answer: This creature could have evolved from an early lizard. The reason for the long, flexible neck could be that it is a herbivore: This trait would allow it to eat lots of plants without moving the body. The flexibility of the body would be useful in hiding itself, as it could coil into a ball and hide in a smaller hole. The large size could be useful as an antipredator adaptation, as would camoflaguing the body to resemble a log. At larger sizes, having the legs under the body, rather than out to the sides, would be helpful. This could also conceal the legs. The amphibious nature may allow them to find more food. Being on the surface wouldn't be much of a detriment, as the long neck would allow it to reach plants deep in the water without diving. Finally, the lurching, churning motion could be explained as caused by symmetrically moving flippers out of sight, either below the water or under the body
Answer: It sounds like something that was covered in the cryptozoologicon, a world building book where they decided that it might have evolved from a turtle that went through gigantism. It evolved a long neck to reach leaves in the tops of trees
Answer: It needs Food.  Lots of food.
Plus a few other conditions.
If it is a herbivore, it needs a food source that must be reached using a long neck (else, why have it).  It needs predators that are defended against by being big.  It needs either a very low population so there is likely to be food available when it moves because it ate everything around it.  Then it needs to be able to find a mate.  Low population means that a mate is not close.  They could be herd creatures which means that a mate is easier to find but that they would have to move more often.
If it is a predator, it needs to have enough prey to support itself.  With the long neck, it could be an ambush predator.  However, the prey would have to be very plentiful and it would have to not be able to learn to avoid that area.  If the prey is migratory, your creature should be able to hibernate between feasting or have a very slow metabolism.  Floating its main body while just using its neck for hunting would save energy.
Answer: What you're describing sounds more like a plesiosaur, but if it must be amphibious, it could be a large long-necked amphiuma or siren, which are giant aquatic salamanders with small stubby legs. Perhaps it eats mammals and birds at the edge of a water like a crocodile, but to save energy it evolved a longer neck so it doesn't have to move as much when grabbing its prey from the bank.

How might this creature evolve?


Can you calculate the energy needed to ionize an electron in hydrogen?

Question: If I have an electron in the 2s orbital,it would have different energy with the 2p orbital.Can we calculate the difference in the energy ?
Comment: Possible duplicate of [Calculating the ionization energy for hydrogen](https://chemistry.stackexchange.com/questions/24798/calculating-the-ionization-energy-for-hydrogen)
Answer: Because the single electron in the hydrogen atom feels a purely symmetric Coulomb potential, the states with different orbital angular momentum $\ell$ are degenerate in non-relativistic quantum mechanics and the binding energy of the electron is given by
$$
E_{n,\ell}=-\frac{\mathcal{R}_\text{H}}{n^2},
$$
where $\mathcal{R}_\text{H}$ is the mass-corrected Rydberg constant for the hydrogen atom and $n$ is the principal quantum number.
When Dirac introduced his relativistic theory for one-electron systems it was shown that the spin-orbit coupling in the hydrogen atom results in a splitting between the 2P$_{3/2}$ level on one hand and the 2S$_{1/2}$ and 2P$_{1/2}$ levels on the other hand (the latter two are degenerate). The subscript number indicates the total angular momentum $J=S+L$.
Later, Willis Lamb was able to measure a shift between the 2S$_{1/2}$ and 2P$_{1/2}$ levels that was not predicted by Dirac's theory and this splitting was explained by Hans Bethe (traveling back by train from the conference where he learned about Lamb's results) and marked the birth of quantum electrodynamics (QED).

Effect of Dirac theory and QED on the non-relativistic energy of 2S and 2P levels of atomic hydrogen (taken from H. C. Wolf H. Haken, The physics of atoms and quanta, 7 ed., Springer, 2005.).
To come back to your question, yes, it is possible to calculate the splitting between the electronic states of atomic hydrogen, however, it requires some advanced maths. If you are really interested in calculating it yourself, I recommend Quantum Mechanics of One- and Two-Electron Atoms by Bethe and Salperer.
Comment: Thanks for the explaantion sir ! It would be out of my e


Linux, disable /dev/fd0 (floppy)

Question: Is it possible to make Linux kernel completely ignore the floppy disk controller? I do not have the drive but obviously my motherboard does contain the controller. I would like to disable the /dev/fd0 device node somehow to avoid Thunar and other tools detecting it and probing it.
Comment: Can't you disable the controller in the BIOS?
Comment: If not, you can always recompile the kernel with no floppy driver (assuming it's built-in and not a module now)
Answer: On Ubuntu, the floppy driver is loaded as a module.  You can blacklist this module so it doesn't get loaded:
echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf
sudo rmmod floppy
sudo update-initramfs -u

Immediately and upon rebooting, the floppy driver should be banished for good.
Comment: Hence the line "immediately and upon rebooting".  The point was that it works immediately, and it will also persist after a reboot, so you don't need to keep doing it.
Comment: Shouldn't even need to reboot, it should be gone after that rmmod.
Comment: My apologies, I read that wrong.
Answer: The presence or absence of a floppy drive is something that is configured in the system's BIOS.  You have to manually tell the BIOS what type of floppy you have, and it in turn tells the OS.  This is because the hardware is not actually capable of being auto detected.
So you need to go into your BIOS and tell it that you have no floppy.
Answer: I ran into this problem even using a V>!  Host= Windows Server 2012 Essentials.  Guest = Linux Mint 14.  Hardware = HP Proliant ML350, no floppy drive.  Problem did not occur in any other guest.
VMware WS 9.  Define Linux Mint as Ubuntu 64.  Remove virtual floppy drive before installing from ISO.
Error reported = Error mounting system managed device /dev/fd0.  Command line ... /media/flopp0 exited with non-zero . /dev/fd0 is not a valid block device.
/dev/fd0 was attempting a mount in fstab. /dev/fd0 existed.  /media/floppy and /media/floppy exist.  Removed /dev/fd0 from fstab.  Remove floppy and floppy0 directories (with sudo of course).
Reboot - same error /dev/fd0 and /media/floppy were recreated.
Used the command above.  Rebooted.  No error.
Comment: This answer of yours is more like a comment on the answer of the other person than a proper answer to the question. It would be good to "relocate" it.
Comment: I think the answer being suggested here is to remove `/dev/fd0` from `/etc/fstab`.  I don't think that actually addresses the original question, since `fstab` is not entirely related to GUI environment auto-mounting.

Linux, disable /dev/fd0 (floppy)


What is the disadvantages of removing HTML tags before indexing?

Question: This is a silly question but I am bit confused. What are the disadvantages of removing HTML tags before indexing the pages?
Comment: Can you clarify your question a bit? It's hard to understand exactly what you are asking.
Comment: I'm going to give this benefit of the doubt and assume there is a question here. Either way it's probably better off on Webmasters.
Answer: I can think of two good reasons.

By removing all the HTML tags you're removing all the semantics of the text.
This disadvantages any ranking algorithm - all else being equal, a page with "Tree" in a heading is more likely to be about trees than one with "tree" in the text somewhere.
You're also discarding attributes that could be used to index.
To illustrate, a link to an image of a tree might have alt text describing the tree. Discard the alt text, and your page might not show up in the search.
Answer: It depends on how you remove them. If you use a smart library, like jsoup or tagsoup or neko, you get nothing but benefit. If you use a bad library, it can lose your content for you.
Comment: By avoiding treating the tags as words in the index. E.g., searching for 'head'
Comment: Can someone expand on this? Those libraries seem to be HTML parsers. I don't see how their use was benefit search engine indexing.


Does "Background App Refresh" only refresh data or does it also allow the app to update in background?

Question: I do not prefer automatic updates because they can change the function of an app unexpectedly as well as use bandwidth when I am trying to do something else on the internet.
Answer: Background app refreshing is just checking for new content and updating it in the app while the app is running in the background. I've never heard of an app actually updating itself and calling it a background refresh, and if it did that would certainly be a case of the developers mistaking the meaning of 'background refresh'.
Automatic updating is usually a separate setting (either in the app's preferences or the app store, depending upon which app you are talking about).


Internationalization of Chinese Yuan, and Chinese exports?

Question: If Chinese Yuan is internationalised and more countries use it to settle payments, then wouldn't that cause strengthening of Chinese Yuan and make Chinese exports uncompetetive ?
Answer: In theory, all things equal, yes ! However, China (and many emerging markets as well) accumulate foreign exchange reserves in order to keep the value of their currency relatively low compared to their 'natural rate', thus keeping a high competitivity for chinese exporters.


Continuity of function in $\mathbb{R}^2$

Question: Where should I start if I want to study the continuity of a function in $\mathbb{R}^2$?
Like this one:
$$f(x,y)=
\begin{cases}
      \frac{x^2y}{x^2+\sqrt{y}} & \quad\text{if } y>0,\\
      0 & \quad\text{otherwise.}\\
   \end{cases}
$$
I think $f$ is continuous except at $(0,0)$, so I have to take the limit to see if it's continuous, right? But I'm confused about the piecewise function, which would be $0$ at that point... Could someone help me?
Answer: You can notice that for $y \gt 0$
$$\begin{aligned}\vert f(x,y) \vert &= \left\vert \frac{x^2y}{x^2+\sqrt{y}} \right\vert\\
&\le \left\vert \frac{x^2y}{x^2} \right\vert = \vert y \vert
\end{aligned}$$
and that the exact same inequality is also satisfied for $y \le 0$ as in that case $f$ vanishes.
As for any $u \in \mathbb R$ $\lim\limits_{(x,y) \to (u,0)} \vert y \vert = 0$, you can conclude that $f$ is continuous at $(u,0)$ as $f(u,0) = 0$.
Also, $f$ is continuous at $(u,v)$ with $v \neq 0$ using continuity of composition of continuous maps.
Finally, $f$ is continuous everywhere.
Answer: Continuity at (0,0);
Let $\epsilon >0 $ be given.
Let $\delta=\epsilon, $ and $(x, y) \not =(0, 0);$
$0\le |f(x,y) - 0| \le |\dfrac{x^2|y|}{x^2+\sqrt{|y|}}| \le$
$ |y|\le \sqrt{x^2+y^2} \lt \delta=\epsilon. $
For $y=0$ we have $f(x, 0)=0$ and trivially
$0=|f(x,0)-0| \lt \delta =\epsilon$.


Is there a way to quickly navigate to previously visited directories

Question: I quickly want to switch between directories I previously visited without typing :cd and then the full pathname again and again. Is there a plugin or a way that can keep an account of the directories I visited during a vim session from which I can select and go to that directory instantly? I use neovim-qt on Windows 10.
Answer: I've made a start at dirstack-like set of commands; you could place the following in (e.g.) ~/.vim/plugin/dirstack.vim:
let g:dir_stack = []
command -complete=dir -nargs=1 -bang -bar Pushd
      \ call add(g:dir_stack, getcwd()) | execute 'cd<bang>' <q-args>
command -bang -bar Popd
      \ let dir = remove(g:dir_stack, -1) | execute 'cd<bang>' dir | unlet dir
command -bar Dirs echo g:dir_stack

I've paid no special attention to :tcd/:lcd (which should be doable, if you're brave enough), or to the special argument - (unecessary; :Popd == :cd -, except that :Popd won't save the last directory like :cd - will), or to :Pushd with no arguments (it's a shame that :cd behaves slightly differently on different platforms).
Comment: This got me inspired :)  https://github.com/LucHermitte/lh-misc/blob/master/plugin/pushd.vim
Comment: Nice. It would be nice to also have a directory selector and other options to support bash `pushd +1` and so on in order to quickly change the current directory for an already stacked one  (which becomes the new top of the stack)
Comment: @LucHermitte yeah there are definitely some missing features. Happy for anyone (me included) to build a plugin around it.
Answer: While in bash I overuse pushd/popd and even a few other helpers on top on them, I don't use a similar workflow in Vim.
I guess it's mostly because I do file management (cp, links, removing, running complex tests...) in the console while I just use vim to edit files (and compile, git add/commit/diff/blame...). When I need to open a file from another project I have plugins that offer navigation (based of ctags or on LSP). And for Vim I have a command dedicated to open anything from the 'runtimepath'.
Once I'm in a buffer that belongs to a project, the current working directory is automatically set to the root directory of that said project (usually determined by where .git/ is, but other mechanisms are available as well). I do that through  a feature from my (central) library plugin. And I never change manually the global current directory, not any local buffer directory.
Comment: Linux has so many useful pre-installed things. Wish they would have come pre-installed in Windows too. ;(
Comment: Oh... I am sorry! They do come pre-installed in Windows too. I was not aware of these commands. So, Thankyou! Also, D. Ben Knoble' s answer was sufficient for my work. I just added a command to quickly go to any index of dir_stack.
Comment: They are part of bash, and of a few other shells IIRC. Don't forget to update the stack top when you go to any directory indexed in the stack. Otherwise `:Popd` won't pop the current directory.


When I should use multiple view inside same view controller?

Question: when should I create new view in the same view controller and when should I create new view controller?
Answer: The following is more of a guideline than a rule.
You need to create a new view controller when you want to modularize your code according to some parameters (I do it based on functionality). eg. DashboardViewController, SettingsViewController etc.
Inside a DashboardViewController we can have many things going on. Each of which might need a view to represent.
Answer: This is a generic question, without knowing what you are trying to do is difficult to tell you how to create an application. By the way, a little (and simple) explanation can be this.
Controllers must implement the logic of your application, they must "control" a particular feature of your application.
Views must show what the controllers want to show to the user.
So, if you want to create something with some kind of logic (user check / data loading and more) you have to create a controller, if you want to show to the user something you can create a view.
The difference between 1 or 2 controllers depends on you application, you have to create one single kind of logic use 1, otherwise if you have a big application with different feature then create N controllers.
Answer: I think this is more subjective than objective.  In one project I have, a new controller needs to be created anytime I need to change the tabbed navigation, or I'd end up with a mess of if/else in my onInit method that defines the tabs.
In other cases, it might be as simple as just asking yourself if it's a logical grouping.  E.g. I have a UserController that manages adding/editing/removing users.  Should I use that controller for login/logout/forgotPassword, or should I create an AuthController?  Personally, I would separate it to an AuthController since the security for a UserController should be admins only while the AuthController lets anyone try to login.  Then, when the user is logged in, do you do UserController for their profile or create a ProfileController since again there are permission differences.  Any logged in user can manage their own profile, but that doesn't mean they should get access to my UserController.
However, you could put add/edit/delete/profile/login/logout/forgotPassword views into a single controller and just handle permissions on a per-view basis, and that wouldn't be "wrong".  As long as you are keeping your business logic in your model and out of the controller, and keeping as much logic as possible out of your view...then you're already ahead of the curve and refactoring when you need to shouldn't be too hard.
If you find yourself doing a lot of if/else in your onInit where you are initializing based on which methods are being loaded...that would be a sign to me that you should probably look at creating a separate controller.


What is the word for a kid's bedroom?

Question: I want to know a word for a kid's bedroom just like a women's bedroom is called a boudoir.
Answer: Not only is there no special word in English for a kid's bedroom (although "kid's room" implies bedroom), almost no current English speaker will understand "boudoir" to mean "a woman's bedroom." The word "boudoir" has come to be used mostly either ironically or in the phrase "boudoir photography," which means "commissioned tasteful nude or erotic photography."
Answer: 100 years ago we would say that children sleep in "the nursery" (if a family happened to be rich enough to afford a separate room for the children). For example, in Peter Pan, Wendy and her brothers sleep together in the nursery.
However, now "Nursery" usually means a pre-school (or a place where plants are grown).  There is no common single word for a child's bedroom.  There is also no word for a woman's or man's bedroom. A Boudoir was a woman's private room for receiving close guests, not for sleeping. (She would sleep with her husband)

What is the word for a kid's bedroom?


How to change Android Talkback in case of App name

Question: The App I am working on has a name which is mispronounced by the talkback. I am able to fix this within the app by changing the spelling. But if I change the spelling in the android:label in the manifest, it is misspelled on the app icon on the phone. Does anyone have a way around this?
Comment: 4 months and no answers :( I'm having the same problem
Comment: As of Android 4.4.2 and TalkBack 3.5.1, there is no way to provide an alternative pronunciation. Consider filing a feature request at the Android or Eyes-Free issue trackers on Google Code.
Comment: Has anyone else filed an issue on this yet?  I couldn't find one from a quick search, but I wanted to make sure I didn't miss it.
Comment: nope, unfortunately not
Comment: by the way, I did write this issue on google code, and they told me to ask on StackOverflow?!
Comment: https://code.google.com/p/android/issues/detail?id=74906
Answer: There is no way to do this.  The fix would be for the LaunchScreen to have the ability to read an alternative label, and place it in the content description for the textView that represents your application.
TalkBack reads back things like this.

If a contentDescription is available this is read off.
If the view has "text" this is read off.
All other cases the view is not accessibility focused.

So, what is happening is TalkBack is grabbing onto the "text" of your view as provided by the name of the application.  The Launch Screen does not provide a mechanism for overriding the contentDescription, and therefore will only ever read your text.  This isn't a problem with your app, it is a problem with the Home Screen app.  You may be able to fix this for users with different Home Screen apps, but there is absolutely no universal solution, and certainly no solution for the standard LaunchScreen application provided on stock Motorola, Samsung, and Nexus devices (most likely others as well, but I don't own any of them).
Answer: In the case that talkback is not pronouncing an acronym correctly, attempting to read it as a word rather than individual letters, you can use zero-width non-breaking space characters \ufeff to separate the letters invisibly.
Suppose you have the word CAT but you want it pronounced C.A.T.:
<string name="app_name">C\ufeffA\ufeffT</string>

It will still appear as CAT and won't be broken for line-wrapping.
However, your users will not be able to search for the app by typing CAT anymore.
Answer: You could change the text read by TalkBack programmatically with:
getWindow().getDecorView().setContentDescription("Name as pronounced")


what is the process of close a instance on openstack?

Question: On openstack cloud plantform ,If I want to close a instance on compute node, what does the openstack do? can you tell me the process?
Answer: I assume by close you mean "terminate".
When terminating an instance the running virtual machine with an instance id of X is shut down and removed from the physical host it exists on.
The nova client query for this would be:
nova delete <instance-id> or something to that effect.
When you make that query the python-novaclient is interfacing with its own internal API to reach out to the nova-api RESTful API.  It authenticates itself with an auth token in the http header of its query.  Then nova-api interprets the instance termination request.  It will verify any ACLs it needs to against keystone.  And then it will perform necessary methods to shut down and remove the instance freeing up resources for future instances.  It will then return a result.
Going deeper the scheduler will send out requests over the messaging system as a result of the nova-api queries.  Those messages will be received by the targeted physical hosts.  There nova-compute will interpret the request to delete the instance and it will perform its own local necessary tasks.  Usually this involves interfacing with libvirt to shut down and free the instance resource.  After this is completed or failed it will respond to the messaging bus the status.  And the API will eventually get that message back and send it on to the user who initially requested the action.


Run Powershell script when you open Powershell

Question: Is it possible to run a Powershell script when you run Powershell? As in, double click the Powershell icon and open the window. Is there some type of "auto-run" setting somewhere?
Answer: There is a PowerShell script that runs on ps startup, if it exists. The filespec for this script is in the variable $profile.
You can use PowerShell commands to check to see if this script file exists, to create it if it doesn't, and to edit it with notepad.  Here's the how-to guide.
Note that in recent (~2020 and later) versions, PowerShell will no longer run unsigned scripts (not even $profile!) by default. If you just follow the old instructions such as in that how-to guide, when you open a new PowerShell, you'll see an error message like:
. : File C:\[..]\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded
because running scripts is disabled on this system. For more information,
see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.

Signing your profile once — let alone every time you change it — is probably not realistic, so you must change the Execution Policy to allow it.
To do this, you can either:

Run the following command as Administrator:
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine

or, use RegEdit to modify Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell, adding a new REG_SZ with the name ExecutionPolicy and the value RemoteSigned.

Both have exactly the same effect and will persist across sessions.
The RemoteSigned policy requires that scripts downloaded from elsewhere be signed, but scripts you create locally on your machine (such as $profile) can run without a signature. (You could also set the policy to Unrestricted to enable unsigned downloaded scripts as well, but this isn't recommended security practice.)
Comment: here's [another answer](https://stackoverflow.com/a/64511263/2990344) that explains why `RemoteSigned` is usually safe to use. Also, I had to do `CurrentUser` instead of `LocalMachine` to get it to work.
Answer: Type the following command:
New-item –type file –force $profile

A file Microsoft.PowerShell_profile.ps1 will be created in C:\Users\<username>\Documents\WindowsPowerShell\ for PowerShell 5 and older or C:\Users\<username>\Documents\PowerShell\ for PowerShell 6 Core (this folder will be automatically created).
Then edit this file and you can add personalized PowerShell functions or load modules or snap-ins...
Now when you run your powershell console, Microsoft.PowerShell_profile.ps1 will be triggered.
Answer: To run an arbitrary script on PowerShell session startup, use the following command:
PowerShell -NoExit -File PathToScript.ps1

Comment: That's what I am looking for. `-NoExit` is not in `powershell /?`
Comment: @BaiJiFeiLong I'm using PowerShell 5.1, it does have -NoExit flag. Newer versions should have an analog too, try `-noe`.
Answer: There are many ways to do this. A straight forward way is to a profile script in your default powershell home path.

Navigate to $env:UserProfile\Documents\WindowsPowerShell.
Typically, this expands to C:\Users\<username>\Documents\WindowsPowerShell.
Create the folders if they do not exist.
Create a file named profile.ps1. You can write your script in this file, and this file will be executed each time you start powershell as the user. If you have the script somewhere else, you can have profile.ps1 call those scripts.

As a side note, the default profile name should be Microsoft.PowerShell_profile.ps1.
But profile.ps1 also works.
Answer: Update the Default $Profile Variable
Edit the Default .PS1 file (if not exist, Create it)
Add your Script to the .PS1 File


Suggest a simple Java math library for matrix operations for use with OpenGL (lwjgl)

Question: I'm writing an OpenGL app with Java. I need to do some math for camera and frustum culling (for AABB). Could you suggest a simple and fast Java math library for that?
Comment: Sounds like a ["What should I use for X"](http://meta.gamedev.stackexchange.com/questions/695/are-what-should-i-use-to-do-x-questions-really-on-topic-and-good), which are discouraged by the very first [FAQ](http://gamedev.stackexchange.com/faq) question.
Answer: Vecmath from Java3d http://java.net/projects/vecmath is useful for standard 3d geometry stuff.
Not sure camera and frustum culling would really be a bottleneck, but if you use this heavily you should try to reuse things like Vector3f rather than calling new the whole time which can lead to costly garbage collection.
Comment: http://mvnrepository.com/artifact/java3d/vecmath seems to have a more readily available jar. I'm not sure where this library is supposed to live these days, but I do think it is the library you want.
Comment: FWIW to any future readers, I'd now suggest looking into https://github.com/JOML-CI/JOML
Answer: I'am the author of la4j library (Linar Algebra for Java). I've just released verion 0.3.0. Try to look at it. la4j works pretty fine now with sparse and dense matrices.
Comment: -1: Your library does not seem to have any support for the requested features.  Game-oriented matrix libraries tend to have far less "real linear algebra" features than la4j does, but do have a lot of specialized math for things like projection matrix generation, camera look-at matrix generation, etc.
Answer: JAMA math.nist.gov/javanumerics/jama
Colt acs.lbl.gov/software/colt
jblas jblas.org
These come to mind first. jblas, thanks to the natives, seems to be a lot faster than the other though. Keep in mind the applet loader from LWJGL allow you to easily use natives in an applet.
see https://stackoverflow.com/questions/529457/performance-of-java-matrix-math-libraries
Comment: I believe these are not really designed for the kind of matrix maths one wants for 3d graphics; they are for operations on arbitrarily large matrices (like stats) rather than typical 3x3 or 4x4 geometric ones... unless I'm mistaken these libraries would be overcomplicated and suboptimal for simple graphic transformation kind of use-case.
Comment: If you are looking for pure speed you should use the natives. However, if you are looking for simplicity ("speed" as in "easy to understand and implement"), it may be a bit overkill.
Comment: I doubt *very much* that native libraries designed to deal with large matrices will be more optimal than vecmath for these kinds of operations, HOWEVER... what you really want is something that can take advantage of native SIMD instructions on the CPU. AFAIK that isn't really practical in Java at present. Nonetheless, I maintain that your suggestions would be overcomplicated for the computer as well as the programmer... never a good combination.


What is a quantum random walk?

Question: I am an undergraduate doing research on QC/QI. My current topic to learn is continuous-time quantum walks, but first I must learn the random quantum walk. That being said, I was wondering if someone could simply explain what a random quantum walk is. I am familiar with the classical random walk already.
Comment: You may want to read first what is out there in the internet. Then you should come here to ask what specifically you are missing.
Answer: A quantum walk can be thought of as the quantum version of the classical random walk.
A classical random walk is a simple dynamics in which according to the result of a coin flip a "walker" moves in one direction or the other.
A quantum walk (in its simplest, discrete-time, one-dimensional version) works the same, except that the "coin flip" operation is now a quantum operation, that is, a unitary gate. So at every step the coin is flipped and ends up in a superposition of its two states, and the walker thus moves in the two directions according to the amplitudes of the associated coin.
You can also have a look at this post for further details.

What is a quantum random walk?


Moving Mac OS X user folders?

Question: Is it possible to move the user folders (not the home folder itself) e.g. documents, photos, music etc to another location e.g. inside my Dropbox on Mac?  If so how do I do it?  I know I can do this in Windows by changing the target folder for 'My Documents' but being a relative beginner on Mac OS X I am unsure how to do this.
Comment: Fwiw, related question about moving the home folder itself: http://superuser.com/questions/25128/can-i-move-my-home-folder-in-mac-osx
Answer: In this case? No. However you can work around it by doing one of the following:

Change your Dropbox folder location
To do so, open up Dropbox's preference and press Move... and choose your home folder. This wouldn't be the option I'd recommend. (It's easier and more possible with Dropbox 0.8.x with selective sync and being able to move your Dropbox folder)
Use Symlinks
You can use symlinks to make it appear as though your Documents, Movies, etc. folders are in the Dropbox folder without actually breaking the file system (and having the folders recreated) that Mac OS X is expecting.
You'll need to do this in the Terminal but you can run ln -s /Users/YOUR_SHORT_USERNAME/Documents  /Users/YOUR_SHORT_USERNAME/Dropbox/Documents replacing the word Documents for whichever folder you need to.
You can see more about this at Dropbox's wiki
Answer: Well, the easiest way I know of is to copy the user folder to the new location, then open
System Preferences: Accounts.
Just unlock and 'Ctrl Click' your user account, select Advanced Options and set the new destination.
I'm not aware of any draw backs.
Comment: This seems more like an answer to http://superuser.com/questions/25128/can-i-move-my-home-folder-in-mac-osx. Note that this question isn't about moving the home folder itself.
Comment: Ah… I see it's the plural (user folders). You are totally right. I guess it's ok, if I don't delete my answer. This way people read your comment and will have link for the other question/topic which maybe is what they are searching for. Cheers,
Answer: First copy your Documents folder to Dropbox, then open the OS X terminal an do the following:
sudo mv Documents OldDocuments
ln -s /Users/$(whoami)/Dropbox/Documents Documents

After that, you're welcome to delete OldDocuments, though you might need to do:
sudo rm OldDocuments

I am waiting for my Documents to finish syncing to DropBox before I try deleting.

Moving Mac OS X user folders?


In a "learn to do X" book, should a section review come before the quiz / exercises or after?

Question: I am writing a book on how to program in C#.NET.
Each of the sections follows this format:

Section Aims
Content
Section Review
Quiz
Exercises

The section review is there to summarise all of the things that have been taught, including the key programming syntax.
It dawned on me that it may be silly to write all that out in the section review, and then immediately ask the reader to answer questions on it.
Should I move the section review to the end of the section, or leave it where it is? My only concern about moving it is that if the reader gets confused or stuck on the quiz/exercises, they may give up!
Comment: May I mention that your homepage is hardly readable? Dark text on a dark background is missing a little bit contrast.
Comment: Thanks for the comment, it looked OK on my browser at home, but you're right!
Answer: Oh no, not another C# book ;)
Joking aside and to your question: Think about what was "dawning" on you and think about your audience.
If you want to write a book for idiots, save your time, idiots don't read books. So do you think your readers are idiots?
You are reading this, so I guess your answer was "No!". Then don't treat them like they were. No matter how you arrange your sections, the reader will have figured out after the first one how you place the sub-sections. I.e. they know where to find the review if they want to use it for the quiz or exercises.
So make it easy for them to find the info they need. Keep in mind that they also need the info after reading your book during coding on a real project. Maybe (instead of googling) they want to pick up your book and look it up. From this scenario would you place it where you do it now? (Just a question to consider for you, I do not have an answer on this one.)
Don't hide information if you want to teach people. They do not have to memorize the info anyway. They always can look things up, they are missing. They are not operating in an emergency room where every delay can decide about life and death.
Comment: +1 for "don't hide information if you want to teach people." That should go on a bumpersticker. :)
Comment: +2 for the "don't hide" comment and the "Oh no, not another c# book". Unfortunately ( or not ) I can only vote up once.
Answer: How big is a Section? What's in it? I ask because if you can break it into sub-sections, you might have a review at the end of each sub-section, and then the quiz at the end of the whole section.
If not, I would order it:

Review of section
Exercises  with answers at the end of the section (to give the
student a chance to practice)
Quiz (with answers at the back of the book)
Answer: The review will have different purposes - and should be written differently - for each of these places. If it is just after you have read the chapter, then it should be summing up all of the major issues in the chapter, a way of setting in your mind the critical parts, as a starter to the quiz, which should then help them to use this.
If it is after the chapter, then it should be a briefer summary - the reader has done the exercises, and probably knows the core of the chapter. This should be key concepts or ideas that they need to have before moving on.
So which do you want to do? Put the material appropriately.
Answer: Having read a number of programing books, I think having the review section before any quizzes or exercises is very helpful. It gives me a chance to go back over what was covered in the section, and make sure I have a good grasp on the ideas of it. It's also helpful if the review section calls out any important points that the reader should be taking from the section. It helps focus things.


Difference between Psionic and Psychic abilites

Question: What is the fundamental  difference between psionic and psychic powers? How can a power be classified as a psionic or psychic power?
Comment: I don't know about Marvel in particular, but more generally the word 'psychic' generally covers any kind of mental power, including or especially those that are magical in original, whereas 'psionic' is usually restricted to science-fiction mental powers, i.e., that do not use magic.
Comment: That was my understanding too based on wikipedia. But i have seen these two terms used interchangably. Also, Charles Xavier says he is psychic in the first movie but his power comes from genetic mutation and not magic.
Comment: Yep.  Psychic is generic enough to describe both psionics and magic (though some people are fussier about this) but never, or only very rarely, the other way around.
Answer: Based on the Marvel wiki entry, psychic powers are "any and all extrasensory and extraphysical powers stemming from the mind, specifically astral projection, clairvoyance, empathy, levitation, precognition, psychokinesis/telekinesis, telepathy, and teleportation." Basically, they're mind powers.
Psionic energy is a specific sort of energy that can be used to boost psychic powers.

Psions or Psionic Energy is the type of energy used by telepaths, or to mechanical means to stimulate the natural psionic powers. All the living beings produce Psions and only a few can detect this energy. The Mutant; Charles Xavier created Cerebro to enhance his already powerful telepathic abilities. The machine allowed him to monitor the entire planet and detect the specific mutant psionic signatures. Being such as the Phoenix Force and Shadow King are Psionic Entity's being made out of Psions. Psionic beings or telepaths Astral Projecting in their Astral Form can enter the Astral Plane, a dimension made of Psions.

So, in short, unless you count being able to access psionic energy as a power in and of itself, there are only psychic powers, some of which are boosted by the use of psionic energy, and creatures who are composed of said psionic energy, some of which have psychic powers.
Obligatory caveat, my source is a wiki editable by anyone, and writers have likely used the terms interchangeably.
Comment: So when a character possess psionic powers he actually has psychic powers and vice versa?
Comment: There are apparently people with psychic powers who don't employ psionic energy. I have not yet found an example of a "psionic entity" composed of psionic energy that doesn't have psychic powers as well, but I feel like it ought to be possible.
Comment: So all psionic powers are psychic powers but not necessarly vice versa?
Comment: Yes. All psionic powers are psychic powers which are using psionic energy to boost them.
Comment: Thank you for the help. I will up vote and accept it tomorrow from my pc as i  am on a nokia x2 now.
Comment: @Analyst1996: ?


What is difference between operating wave function with operator of an observable and measuring for an observable?

Question: People say operator of an observable helps in measuring for an observable. We also know that measuring leads to collapse of wave function. But operator on wave function gives a number times same wave function (which of course is not a collapsed wave function!). All intuitions I made about operator, wave function, measures, collapse are all seeming to be inconsistent. If operator doesn't collapse a wave function then what it is for. Is it just for calculating expectation value of observable. What in physical sense it is?
Comment: Welcome on Physics SE :) Your post contains a few misunderstandings about the way the measurement process works in the collapsing wave function picture - I'd think it useful for you to read that up again ;)
Answer: There are a few different points/distinctions that need to be made here.
1. The expectancy value when measuring an observable to which the operator $A$ can be assigned is $\langle A \rangle = \langle \Phi | A | \Phi \rangle$ for a system described by a wavefunction $|\Phi\rangle$.
2. If the value $a$ is measured, the collapse of the wavefunction means that we project $ |\Phi\rangle$ onto the eigenspace of the eigenvalue $a$ of the operator, i.e., the wavefunction is changed.
3. $A | \Phi \rangle = a | \Phi \rangle$ for $a \in \mathbb{C}$ holds only if $| \Phi \rangle$ is an eigenfunction of the operator $A$. In general, $A | \Phi \rangle$ does not need to be proportional to $| \Phi \rangle$ but can be a different wavefunction.
4. An operator $A$ determines the possible values of its measurement variable by its eigenvalues and determines the possible wavefunctions after it has been measured by its eigenstates/eigenspaces.
5. Applying an operator to a wavefunction does not describe the measurement process.
Comment: Thank u so much. Its all clear now in those points. Just wanted to make sure that does it mean if operator  acts on a general wave function then resultant would be a wave function which would be a linear combination of several eigenfunctions of  with associated eigenvalues? Also is all this business of operator just a mathematical trick with no physically observable analogue?
Comment: If I am not completely mistaken, the spectral theorem tells us that the operator is basically a sum/integral over the projections on the eigenspaces multiplied by their eigenvalues, so I think the answer to your first question is yes. To your second question - physically observable is the spectrum of the operator as the possible measurement outcomes, so I'd say it is more than a mathematical trick.
Answer: You are right in pointing out that operating with an operator on a wavefunction gives a number times the wavefunction (assuming that it is indeed an eigenfunction of the said operator). Measuring the observable collapses the wavefunction. How a wavefunction collapses is still an open question in Quantum Physics. The job of the operator is to find out the possible eigenvalues of the wavefunction. This paper might help you with the progress that has been done in solving that open problem.
Comment: Just a side note here. Acting with an operator on a wavefunction does not constitute a measurement right? Also tell me if the question says 'what is the value of the measurement of an operator say A on a wavefunction $\psi$, then i find its expectation value; then does finding the expectation value mean measurement which in turn means collapse of the   wavefunction? Or is measurement just a vague physical process which messes with the instruments and find the expectation value is a separate mathematical calculation on paper that has nothing to do with measurement??
Comment: That s a doubt I had as well. What I believe by 'measurement' they precisely mean finding out some definite quantitive parameters which potentially define state of a system and hence constitute 'psi'. Various systems with different 'psi' might turn out to be having same expectation value. I'm not sure though.