Do larger less dense objects heat less while entering the atmophere?

Question: When a space craft enters the atmosphere, it gets hot and heat shielding is needed. Do objects with more surface area and less density heat up less then heavier, smaller objects? Could an object with a large enough weight to area ratio be air cooled and not burn? I understand that when entering the atmosphere it is not like hitting water since the air gradually becomes more dense. In theory, would a feather get too hot and burn on reentry or would it make it to the ground intact?
I'm thinking a rotating aerographene sphere.
Comment: Data from this work suggest a lower bound of 200 degrees https://en.wikipedia.org/wiki/Paper_planes_launched_from_space so a feather might make it, depending on the exact physics involved.
Comment: So far the answers are "more, less or the same", all of them being on a scale from mildly wrong to very wrong.
Answer: The heat to be dissipated by an object re-entering from orbit is $64$ megajoules per kilogram. There is no dependence here on density: that is the amount of kinetic energy it starts with and has to lose.
In a hyper-gradual re-entry the object can radiate the heat as it goes. But slow deceleration requires lower drag than we know how to attain.
In a fast re-entry the surface of the object (which is what is heated) will get extremely hot and may burn or vaporise. But now the re-entry time begins to matter. To conduct heat from the surface to the inside takes time, and if the re-entry is fast enough, the heat pulse won't have time to penetrate before the re-entry is over and no more heat is coming in.
Between slow and fast there is a worst case where radiation cools the outer surface but conduction has time to cook the contents. That is why (for example) high-heat-capacity buffers - of beryllium, for instance - end up doing more harm than good.
Answer:
Do lighter objects heat less while entering the atmosphere?

They heat more, not less. The square-cube law comes into play. Heating is proportional to an object's surface area and inversely proportional to mass.  All other things being equal, that means heating is inversely proportional to the square of an object's size. Small meteors tend to vaporize quite high in the atmosphere where the air is still very thin. Larger ones heat to the point where they explode lower in the atmosphere where the air is much thicker. Even larger ones can survive entry and hit the Earth, and sometimes they're still cold.
Comment: This seems to be considering objects of different sizes but the same composition. The question is about large, low-density objects compared to small, dense ones.
Comment: +1 [Have "frosty meteorites" ever been observed soon after landing? Are there photos?](https://earthscience.stackexchange.com/q/21197/6031) still needs an answer.
Comment: @ChristopherJamesHuff I agree with you.
Answer: They heat less, not more.
Braking begins when retarding force (relative air flux times frontal area) becomes significant. For a less-dense object (effectively, high area per mass), braking begins higher in the atmosphere, where air pressure (and thus mean free path) is a lower pressure. Thermal dissipation is thus more radiative, and less mechanical. Objects with greater area per mass then see lower peak temperatures on reentry.
This issue was first confronted with warheads. Given 1950s technology, ICBM warheads needed brutal braking, via massive heat shields, to survive. This slowed them, higher and sooner, which increased the odds of detection and some sort of countermeasure. As heat shield technology improved (better ablators), designers went to 'pointier' warheads, maintaining their high speed deeper into the air above the enemy. Because they could.
The Shuttle orbiter, then, got a ridiculous frontal area… remember, it first entered 'broadside,' like a barn door, not like an airplane in flight. The orbiter, when first entering, is not an airplane, and does not need to conform to expectations of how a plane 'should' fly. Only later in reentry does it pitch down to 'airplane' flight. This barn-door attitude makes heating gentler.
Analogous to skydiving, "space-diving" has been proposed. A space-diver needs no ablative heat shield if the frontal area reaches some high value. That area has been calculated (for a 'normal'-weight diver, whatever that means) to be a mattress-like area. One could then space-dive by hanging onto a reasonable-scale shield, with no ablatives. Presumably a fatter space-diver needs a bigger shield.
And of course, the Virgin tourism craft have then adopted the "shutttlecock" principle, increasing air-exposed area while keeping the control mechanisms as far to the rear as possible. No ablative shielding is needed, and not just because the speed was lower in the first place.
Comment: Just simply wrong
Comment: We have the dust particles and micrometeorites to prove you wrong. We also have fewer and fewer macro-meteorites per size metric, and not simply due to population statistics or material properties. WE know what we're talking about, with OUR field experience, palpable samples, and analytical rigor.


EF4 Code First create new table

Question: Is there a way when i add a new entity to my Code First configuration the table gets automatically added so i don't have to worry about updating my DB with new tables?
Answer: you can add
Database.SetInitializer(new DropCreateDatabaseIfModelChanges<YourDbContext>());

in you r application start . It will recreate database for you if you have modified your configuration.
And if you do not want to drop and create database (To incremental development) you can use SqlMigrations. http://www.hanselman.com/blog/EntityFrameworkCodeFirstMigrationsAlphaNuGetPackageOfTheWeek10.aspx
Comment: Is there anything I can do, to avoid loosing my already added data?
Comment: @jonny_d you can use EF migrations
Answer: From: http://blogs.msdn.com/b/adonet/archive/2010/12/06/ef-feature-ctp5-code-first-walkthrough.aspx

Setting an Initialization Strategy
In the next section we are going to start changing our model which in turn means the database schema needs to change as well. Currently there is no 'out of the box' solution to evolve your existing schema in place. Database evolution is something we are currently working on and a sample of the direction we are heading is provided in a recent design blog post.
There is however the opportunity to run some custom logic to initialize the database the first time a context is used in an AppDomain. This is handy if you want to insert seed data for test runs but it's also useful to re-create the database if the model has changed. In CTP5 we include a couple of strategies you can plug in but you can also write custom ones.
Add a using statement for System.Data.Entity.Database at the top of Program.cs
using System.Data.Entity.Database;

For the walkthrough we just want to drop and re-create the database whenever the model has changed, so at the top of the Main method in my Program class I've added the following code
DbDatabase.SetInitializer<ProductContext>(
    new DropCreateDatabaseIfModelChanges<ProductContext>());

EF4 Code First create new table


Read Metadata column values using SharePoint REST API

Question: Is there any way to read Managed Metadata column value in SharePoint using REST API?
Answer: You can use TaxCatchAll in REST API to get the Managed Metadata column values .
Refer this article having detailed steps to get metadata column value.
Answer: It's possible to retrieve Metadata column values using SharePoint REST API:

And if you want to get the expand properties such as term text, you can use the hidden list field TaxCatchAll.
This field exists for all rows having taxonomy data, and includes all the terms used.
The good thing is that this is a lookup field pointing to the hidden taxonomy list located at [site url]/Lists/TaxonomyHiddenList/AllItems.aspx.

Check this blog to get more details

BR


How to avoid mobs?

Question: First when I started playing Minecraft PE I turned on peaceful mode, but then I got tired of it and decided to switch on hard. However since it is Pocket Edition there are only 2 options: peaceful and hard. When I just started hard I saw a creeper and freaked out even though I was in my house. I hate creepers which can kill me without me knowing it as they can explode from a distance. Is there a way to avoid being killed by mobs in hard difficulty?
Comment: With or without cheating? Why would you change to a mode that contains creatures that can kill you when you do not want to be killed?
Answer: There are no 'special' ways of avoiding mods on the PE version. The same tactics that work for the 'full' Micecraft game work here too.
There are numerous links about this, but this one seems most suitable at the moment.

How to avoid mobs?


Continuous walk animation - Mixamo to Blender 2.8x

Question: I have an .fbx imported into Blender with animation from Mixamo and I want my character to walk a longer distance, however it keeps walking in a loop (I duplicated keyframes) starting at the same point after the duplication begins and it does not continue his walk. How can I fix this? Thanks.
Comment: you have 2 solutions: either you have a walk that makes the character go forwards and if you duplicate the action you need the second cycle to begin at the end of the first and so on, or your alk cycle doesn't make your character go forwards, he's walking like on a treadmill, and in that case you need to make him go forward in your scene in Object mode for example with a Follow Path constraint, or simply with 2 keyframes
Comment: IIRC there is an option when importing from mixamo to choose between "actual" movement or "treadmill" movement with animations.
Answer: There are 2 sorts of walk cycles, a dynamic one and a static one (well, these are my own words):

The dynamic one makes the character go forwards in Pose mode:

With this kind of animation, if you want the character to move in your 3D scene you need to duplicate the bones keyframes and make the second cycle begin at the end of the first one and so on. There are 2 ways to do it, either in the animation itself, in Pose mode, you need to duplicate the cycle and move the copy a bit further on the right axis, and so on. Or you can do it with the armature object itself, using keyframes and making it jump from position A to B when it needs to begin its second cycle, and then from position B to C, and so on...

The static walk cycle makes the character walk like on a treadmill, by default it doesn't make your character move forwards in your 3D scene:

In that case you need to repeat the action in the NLA Editor and you need to make your character go forward in Object mode. Either you create 2 keyframes to make him go from point A to point B, or you use a Follow Path constraint so that he follows a curve. In both case you need to syncrhonize his speed in the 3D scene with the speed of his walk cycle, otherwise the feet will slide. You can also vary the NLA strip speed to fix the issue.
For small walks, or walks with some changes in its course, it's probably better to use the first solution. For long walks through a large 3D scene, it's generally better to use the second solution.
According to @Gorgious, there is an option when importing from mixamo to choose between "actual" movement or "treadmill" movement with animations


Is changing or appending data an idempotent operation?

Question: As far as I know idempotent operation is a operation that can be applied many times with the same effect. Also I learnt recently that updating a tuple in a database is also idempotent. I thought that an idempotent operation was like a read-only stateless call (thanks to HTTP world with its famous GET request example). So, is changing data in a file (or database) idempotent? Is appending (extending) data in file/database idempotent? Why?
Answer: An operation $O$ is idempotent if $O(O(x)) = O(x)$. For example, if you update record $R$ to value $T$ and then again update record $R$ to value $T$, then it's the same as if you updated only once. But if you append $T$ to record $R$ twice, it's not the same as appending only once.
Answer: As mentioned, an operation $O$ is idempotent if $O(O(x))=O(x)$ for any $x$. The important thing to realize is what is the domain, what are the possible values of $x$, and what are the things we're comparing with the $=$ sign.
In mathematics, there is usually no mutability, we're comparing elements constructed over some mathematical structure.
In (imperative) programming, what changes is the state of a program. So our domain is the set of all possible states of a program. You can thing of such a state a snapshot of the content of all the program's memory, CPU registers etc. In this context, an operation is something that changes a state of the program into another. By $O(x)$ we mean the state of the program that we get by running $O$ from state $x$.
Now we see what it means that an operation is idempotent. It is a piece of code that changes program's state in such a way that if we run the operation twice, we get the same state as if we run it only once. Most typical idempotent operation is setting a variable to some given value (or updating a database record etc.). Calling
// call O twice
var := value;
var := value;

is the same as
// call O once
var := value;

because the second time we call the operation, the state doesn't change (no matter what the original state was) - we know the value is already there.
Comment: Maybe it is hard to understand, because we change the state with setting variables.


Why does  element style differently on two nearly identical HTML pages?

Question: Two pages use the same CSS file and have almost the same content, yet on one all
 elements have top and bottom margin by default while on the other they don't. Inspecting the elements in browser doesn't give any clues, since the margin is never explicitly declared. What causes those
 elements to act differently (at least in Firefox, I haven't tested it in other browsers)?
Comment: @KunJ: This question is already grammatically correct. You've actually made it all wrong with your edits. You might want to refrain from editing other people's posts for grammar until you learn what really constitutes proper grammar. Oh and your formatting is wrong too. ` is not meant to be used for random highlighting of words.
Answer: I've spend ridiculous amount of time trying to solve the problem (using browsers inspector and firebug, checking the css file) with no luck, so then I've switched to comparing the html files line by line. The reason why those elements formated differently was in the very first line of one of the html files.
One file started with:
<!DOCTYPE html>

while the other did not and that was enough to change the default styling of html elements (such as p).

This is very likely caused by the fact that when DOCTYPE is missing the browser switches to quirks mode to emulate bugs features of older browsers.
Comment: On a side note, you could use a file like reset.css to make all common browser's settings fix up. You can find more about it here:

http://meyerweb.com/eric/tools/css/reset/
Comment: ... which should be a secondary step to, first and foremost, ensuring the use of a proper doctype as far as possible.


What are the weight change limits of Alter Self?

Question: I know with alter self you can make yourself practically weigh nothing but i was curious if there was a limit to how heavy you could make you character. My theory is you could make yourself as heavy as you wanted but at a certain point you would end up collapsing under your own weight.
Answer: Some people might ask whether alter self can change your weight at all, given that the text says "change appearance" and not "change form".  But note that this spell is a transmutation spell, not an illusion spell.  The changes produces by transmutations are changes to your form.
Alter Self says: "You can make yourself appear as a member of another race, though none of your statistics change. You also can't appear as a creature of a different size than you."
So, for example, you could change yourself into a dragonborn, which has "average weight" 250lb.  It's not clear in 5e what the upper bound is for a medium size creature.
A DM looking for guidelines on the upper bound for a medium size creature might look at the table for 3.5e, which says that a medium size creature usually weighs "between 60 and 500" pounds.  Obviously this is just a guideline -- and a guideline from a different edition, at that.  Ultimately you will have to let your DM decide.


Authentication between multiple systems/platforms within the same web application context

Question: Consider the following scenario: Web application is using two separate systems (they can share data/state through DB). First one is used for processing standard web stuff like HTTP requests/responses, HTML content, forms and all things related. Second is used for real-time communication like sending messages and notifications (long poll or WebSocket server).
User can be authenticated through the first system/platform and if the credentials are valid, some web page is sent back to the client. Once this page is loaded, client should be connected with the second system/platform transparently in the background.
The question is: how to authenticate user on a web page/application which consists of multiple systems/platforms on the back-end?
I can imagine it this way:

When user is authenticated through the first system/platform, GUID token is generated and stored in a database bound to some user. This token and user ID is also sent in a response back to the client and, for example, rendered on the page in hidden fields.
When the page is loaded and connection with the second system/platform is taking place, token and user ID from hidden fields are retrieved and sent as parameters with connection request. Back-end finds user, compares his token in the database and if they match real-time connection could be initiated.

I understand that this approach is vulnerable to sniffing for example, but I'm namely interested in the authentication procedure between two separated systems/platforms.
Comment: Please see here for an example.
https://www.login.mtu.edu/docs/public/mtuiso/howitworks2.html I will make an answer when I have a second.
Comment: 'rendered on the page in hidden fields' this seems like a bad idea.
Comment: @this.josh: yeah what I really meant is to store these informations somewhere on the client, doesn't have to be hidden fields, it can be a cookie...
Comment: A fundamental question is whether the two systems are serving pages from the same domain (e.g., www.example.com/a and www.example.com/b); from two related domains (e.g., a.example.com and b.example.com); or two unrelated domains (e.g., a.com and b.com).  This affects what solutions are or are not viable.
Answer:
Generate a session token upon login.
Store that session token in the database.
Check for valid session tokens when authenticating.

Pretty much what you have. Just consider if you want to have more than one valid session at once and how you'll go about expiring sessions.
EDIT for crazy comment thread below
While one can provide tokens to the client that are verified by the 2nd server without communicating with the 1st server, that's ugly and involves a lot of work. Such a scenario does not permit one to invalidate sessions unless the client takes care of it. It also requires a certain time window when tokens are passed, timestamping of tokens, tracking of tokens by the 2nd system, signing or HMACs in the token passing, etc. Unless these two systems can't see each other on the Internet, just avoid that mess entirely.
I gather that both systems can access the same database, but if for some reason they couldn't, having a API exposed to the second system that can remotely verify would be appropriate as well (secret.page?checkUser=token... or such).
Without SSL, there is nothing you can do to prevent session hijacking by means Firesheep / MITM attacks.
Comment: Design your schema so authentication tokens are in their own table and joined to the user table by user id. Primary key (user_id, token). Then you can have multiple valid sessions. You may also want to add an expiry timestamp that is checked by your app and have a cron job to delete expired tokens.
Comment: EDIT: nevermind; You don't want to be authenticating like that. There shouldn't be anything like this on the client side. I know the right way to do this, but I don't know the specifics. I will research and get back to you.
Comment: Also, the problem with Jeff Ferland's suggestion is this assumes that the Apps have some sort of real-time communication, such as a common database. I think this is a bad real world assumption.
Comment: I also need to cover the case when user is authenticated from multiple browsers for example, or when the real-time connection is lost and needs to be reinitiated (I can think of one problem which may happen here - I will be passing expired token to the second system so the authentication would fail).
Comment: Other solution which came to my mind: when the page is loaded, send AJAX request for token to the first system and in the success callback of this AJAX call pass token to the second system connection request. This way there is no need for storing token or user ID in the hidden fields.
Comment: How will you prevent replay attacks? How will you invalidate a session on logout? Deal with a disconnected session? It is possible to do this with client-side work, but you've made a much much larger headache for yourself if you go down that route.
Comment: @user606723: but don't you have to send something from the client side to the second system in order to authenticate user bound to some session?
Comment: You're right, I suppose I was a big vauge and you do have to send -something- from client side. A cookie is a good option. If not a cookie, then something signed with a private key.
Comment: @user606723 If not a database, then some sort of programmatic API. Need to address concerns from my last comment. Systems can't do that without communication of some kind.
Comment: @Jeff Ferland: token from that AJAX call would be returned only if you are already authenticated to the first system. This AJAX would also return entirely new token (it will also have timestamp on the server) each time you make this call. So if you try to connect with the same token for example 15 seconds later it won't be valid and you would have to request new one. Is this approach still invalid?
Comment: @yojimbo, how is the second app going to know it's a valid token? Do they share a database?
Comment: @Jeff, see my answer.
Comment: @user606723: Yes, they both have access to the same database on the backend in order to share state and other stuff.
Comment: The problem is that, that makes for a very easy man-in-the-middle attack. All I have to do is get a token and respond with in 15 seconds? easy peasy. You could do a few things to address this to make it *almost valid* but it will never be a optimal approach.
Comment: @user606723: I think if you do man-in-the-middle attack then you can hijack the whole session from the first system and don't have to mess with the second one. As far as I know only HTTPS can prevent this.
Answer: My recommendation is a single web app that is used for primary user authentication.
Note: Because of the nature of cookies, this method will only work if the webapps share a common domain. (ie. appone.example.com and apptwo.example.com)
openid does something similar but bypasses the cookie problem, you might want to look intot hat.
How this would work.

User points his browser toward App A. App A checks for valid cookie/session/whatever.

It first checks for it's own session/cookie information.
If it can't find it's own cookie, it looks for Auth App's "transfer" cookie.

If it's found, then it create a new session for this app. The user has just logged in.

When it finds this is invalid or missing, it forwards the page towards Auth App.
Auth App checks for a valid session on it's end.

When it discovers this missing, it brings up a login screen, etc.

Once it has a valid session, the Auth App sets a specific "transfer"
cookie for that app and redirects the person back to App A.

You should put extra information in this transfer cookie such as-

username
AuthTime
IP address.
Random number.

See the following for an example.
https://www.login.mtu.edu/docs/public/mtuiso/howitworks2.html
This will be mostly seemless from the user perspective.
For example.

User point his browser toward app A.
App A does it's authentication dance with Auth App. (requiries user to log in, etc.)
User clicks a link that forwards to app B.
App B does it's authentication dance with Auth App. (This time, Auth app already has a cookie for itself.)

App B forwards to Auth App.
Auth App finds cookie and then right away creates transfer cookie and forwards to App B.
User doesn't even notice this, and finds himself at App B right away.
Answer: Four options, first one being with maximum cost(money and performance both) and third being cheapest

Deploy solution like Siteminder, Novell, Tivoli etc
Maintaining session state in DB. For doing this. Problem with this approach is that it would be difficult to track logouts, session expiry and propogating this informaton between the two applications. As querying the DB before each request would be very expensive
Using a Third application just to manage the session states. This application not exposed to end user only restricted within the network with access to only the two applications It stores the states for all users in Application context and the two application send a request to this application

On login events
  On logout events
  On session expiry events
  before processing any request to check session validity

Using a cookie ( with the assumption that both application share the same parent domain)

Create a cookie which contains username + salt/ecret key   and this encrypted
  Secret key and the encryption keys are with both applications
  Any request from user will carry this cookie ( Cookie path set to /)
  So if the cookie contains a username, other application trusts user is logged in on other application


Trigger to create a campaign when an account is created

Question: I am trying to write a trigger that will automatically create a campaign record when a new account is created. Below is my code:
trigger AddCampaign on Account(after insert) {

    List<Campaign> myCamp = new List<Campaign>();

    for(Account a : Trigger.New) {

        myCamp.add(new Campaign(Name=a.Name + ' Campaign',
                                Type='Webinar',
                                StartDate=System.today().addMonths(1)
                                ));
    }

    insert myCamp;
}

For some unknown reason the code is not working and it is not showing any error as well. Please help.
Comment: Please [edit] your post to describe what is not working and how you have searched for the campaigns that were created.  Also remember that you have to set the IsActive field so the campaigns will appear in lookup searches.
Answer: Try the below code, it should work. And also to share a note, Campaigns and Accounts are tied to each other when contacts are added as CampaignMembers. So if just the campaign is created, there will be no change on the related tab.
trigger AutoInsertCampaign on Account (before insert) {
    List<Campaign> myCamp = new List<Campaign>();
    Date nextMonth = System.today().addMonths(1);

    for(Account a : Trigger.New) {
        Campaign newCampaign = new Campaign();
        newCampaign.put('Name', a.Name + ' Campaign');
        newCampaign.put('Type', 'Webinar');
        newCampaign.put('StartDate', nextMonth);
        newCampaign.put('StartDate', nextMonth);
        myCamp.add(newCampaign);
    }

    Database.insert(myCamp, false);
}

Answer: It should create campaigns. However the default All View displays only active campaigns. So you might want to set the field "IsActive" on Campaign to true in your code.


Canny's Roadmap Algorithm

Question: Where can I find a general implementation of Canny's Roadmap Algorithm(or Silhouette Method) for Robot Motion Planning?
Answer: Well, you probably can't. The reason is Canny's follows 3 basic steps.

Collect a bunch of points in the environment and connect all the points
that have a free path between them
Connect start and end to this graph
Do some kind of path planner on this graph, e.g., Dijkstra.

So, for different evironments, step 1 takes wildly different forms. In 2D, this might be a visibility graph. In 3D, there isn't really a good algorithm for constructing the graph so you might sample. In higher dimensions, it's even worse.
But, if you are comfortable implementing Dijkstra, then implementing 1 and 2 are pretty close in difficulty. You may have to do this homework assignment on your own.
Comment: The first step which you mentioned is some kind of a roadmap generated in Probabilistic Roadmap Method. But what exactly I am looking for is the construction of Silhouette curves which form the roadmap for Canny's Roadmap Method( Silhouette Method).
Comment: Then I suggest you open a new question with exactly that text and see where that gets you. Nobody could just figure out what step you were having trouble with, and magically understand what specific implementation you were looking for.

Canny's Roadmap Algorithm


Generics Collections PECS

Question: I have a question about this method from java.util.Collections:
public class Collections {
  public static <T> void copy(List<? super T> dest, List<? extends T> src) {
      for (int i=0; i<src.size();i++)
        dest.set(i,src.get(i));
  }
}

I understand how <? super T> works, however,  I don't understand why the first parameter is List<? super T> instead of List<T>. I think it's useless in this situation.
Using List<T> should work as well, shouldn't it?
Could you give me some examples to understand it if possible, please?
Thanks.
Answer: No, it makes sense. For example, consider this situation:

T is InputStream
dest is a List<Object>
src is a List<FileInputStream>

That works absolutely fine. Of course, you could make T either Object or FileInputStream in this situation - but imagine you were calling this from a method with a signature of:
public void doSomething(List<? super InputStream> streams) {
    // I want to use copy in here for some reason
}

You don't know it's a List<InputStream> - only that it's a List<? super InputStream>. If the dest parameter in copy were just List<T>, we'd be stuck... but with the way it is written, we're fine.
It also makes sense in terms of what we require from the destination list - we just need to be able to set values of T within it. Likewise all we require of the source list is that we can get values of T from it. <? super T> and <? extends T> express those requirements well.
Answer: If you break it down in why the List is being used it will be a bit more clear.
When a method intends to populate a list, you could restrict it to use a specific type T, however often you might want to be less restrictive.
For example, lets say you have a method populateWithStudents(List<Student> list)
And you have Student extend Person
This means that you can't use that method with a List<Person> to fill it with Student objects, even though Student extends Person.
So if on the other hand we would like to allow that we change it to populateWithStudents(List<? super Student> list). This way we're saying that as long as we can fit a Student in the list, no matter if it is a list of Student objects, or a list of any of its superclasses, it is allowed.
This is not just when populating obviously, but this example helps understand the concept.

Generics Collections PECS


Installing PostGIS in PostgreSQL 10?

Question: In earlier version we could install the PostGIS using the Stack Builder but now it is not showing the option of spatial extension. Can anyone help me install it?
Answer: The doc says

Installers are available for 9.6 64/32-bit on stackbuilder [...]
  Installers for PostgreSQL 10 64-bit are
  available on experimental, and osgeo downloads and will be available
  shortly on EDB appliction stack builder

--> it's not yet available in Stack Builder.
You can install Postrgres first, then download and install PostGIS
Comment: BTW just replaced 64-bit with the 2.4.1 installers..  I'll try to get up on stackbuilder this weekend or early next week.
Answer: You can download a 64 bit installer from the official PostGIS website:
http://download.osgeo.org/postgis/windows/pg10/
Comment: Yah sorry about that. there is something wrong with stackbuilder as a result of the 2 digit switch.  so though I uploaded them, it's not showing.  I have a call into them to fix the issue.  I'll bug them again after I release 2.4.1 this weekend if its still not fixed.
Answer: Installing postgres from this link --> https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
Now allows to install different versions of Postgis:

Installing PostGIS in PostgreSQL 10?


Trigonometrical ratios for angles higher than 360

Question: Is there any use of Sin(720)or Cos(1440) (angles in degrees)?
Whether in computer programming or in any other situation?
In general, is there any use of Sin/Cosine/Tan of any angle
greater than 360?
In Physics we do use dot products and cross products
a lot, but even they require angles less than 180 degrees
always.
Hi All,
I know how to compute them....
I want to know, if they are ever useful????
When will I ever encounter a situation, when
I need to compute Sin(440) for example???
Comment: Yes, in so far as there's need for angles equal to or greater than 360°.
Answer: Both in math and programming:
Sin(x) = Sin(x % 360)

As another answer pointed out, angles greater than 360 represent one or more full rotations over a circle plus the modulo part. This could have a physical meaning in some circumstances.
Also, when doing trigonometric calculations, you should take this fact into consideration. For example:
sin(a)*cos(a) = (1/2)*sin(2a)

For a>180 you will get the sin of an angle greater than 360.
By the way, have a look here.
Comment: As a purely synthetic example, take a screw or a bolt.  Rotations of more than 360° have a very specific and important meaning.  The direction the head is facing would still be calculated modulo 360, but important information would be lost if its rotation were stored that way.
Answer: I have seen such things come up when doing angle arithmetic:
float angleOne = 150;
float angleTwo = 250;

//...

float result = Sin(angleOne + angleTwo); // Sin(400)
float result = Sin(angleOne - angleTwo); // Sin(-100)

In this (contrived) example, it seems obvious, but when you are computing an angle based on arbitrary rotations of several objects, you can't always know what kind of numbers you would be getting. Imagine calculating the poisition of the player in a 3D game while he is standing on top of a spinning platform, for example.
Answer: One rotation around a circle is 360 degrees or 2pi radians.
Trigonometric functions such as sine and cosine will "wrap around" when they reach 360 degrees and act the same way as being at 0 degrees. Basically, the following occurs:
angle_in_unit_circle = angle mod 360

Also, some trigonometric functions such as tangent are not defined at certain angles, such as 90 and 270 degrees, where tangent of an angle will return a positive or negative infinity.
This "wrapping" around can be seen by representing the sine, cosine, tangent functions using an right triangle inscribed in an unit circle, and this behavior makes those functions periodic because they will repeat their patterns over and over again.
Wikipedia has an extensive article on Trigonometric functions, so that might be worth taking a look at.
Usage
In terms of use, I can't quite think of a good example off the top of my head, except, maybe perhaps to represent a location of a particle at a certain time in a polar coordinate system, where the angle θ is dependent on time t:
r(θ(t)) = t    where θ(t) = t

for values of t from 0 to 720, which could then be represented in a Cartesian coordinate system as:
x(t) = r sin(θ(t)) == t sin(t)
y(t) = r cos(θ(t)) == t cos(t)

The particle will be moving in a spiral type movement, dependent on the time t. In this case, the sine and cosine of angles beyond 360 will be calculated.
(And my math is rusty, so if there are any errors in the equations above, please let me know!)
Comment: I want to know, if it will ever be needed to compute Sin(720)???
I know how to compute it..
Answer: There have been times where the normal math means you end up "traversing the circle" one or more times, and if you keep the math simple your angles might be greater than 360. Personally I like to normalize the angles to be 0 to 360 or -180 to 180  after such operations, but it's doesn't really matter much.
Sometimes the greater number might really represent something. To take a trivial example, imagine instructions to open a classic dial combination safe. You need to spin the dial around a couple of times, so the instructions could be:
   turn(800);  // Twice around plus another 20 degrees
   turn(-500); // Once around the other direction plus 140 degrees
   turn(40);   // Dial in the last digit

In that context, taking the sin or cos would tell you something about the ultimate position of the dial, but you would lose the information about how many turns were involved.
Answer: Any time you're dealing with a user interaction technique, it's entirely possible that they'll push you past 0 degrees or 360 degrees.  Imagine that you're making a game with a gun turrent.  It's currently pointed at 359 degrees and the user yanks the joystick to the right: now it's pointed at 361 degrees.  If you implement the angular representation wrong, all of a sudden, the gun with rapidly traverse nearly 360 degrees to the left.
I predict that the users will be ... disappointed with that bug.
There are all sorts of issues that come up with Euler angle representations of the frame of reference that are important in games, simulations and real device control.  Gimbal lock is a serious problem in actual rotating device control (it was a problem with camera pan / tilt devices in my life).  The "rapid rotation" bug was a very nasty issue in a small boat autopilot system once upon a time - imagine wrapping a steel cable very tightly around the wheel house (i.e., you don't want to be standing there).
Comment: Thank you for the reference to gimbal lock. I learned something today :)
Answer: On a sine curve, Sin(720) == Sin(0) (etc), so I'd expect any decent implementations of those functions to handle degrees "greater than" 360. There's any number of reasons for arriving at an angle greater than 360 or less than 0.
Comment: Addition, subtraction and multiplication being three of them.
Answer: Angles outside the range of "principal angles" [-180,180) are essentially aliases of each other (modulo 360 degrees) and have no physical distinction.
From a mathematical/engineering sense, if you have a process where the # of rotations is important and must be kept track of (e.g. a motor that is spinning back and forth), then 0 degrees and 720 degrees are not the same. Sine and cosine are just periodic functions so they have the same value every 360 degrees. If you have a particle undergoing uniform circular motion where x(t) = A cos (ωt + φ) and y(t) = A sin (ωt + φ), then the phase angle θ = (ωt + φ) is going to be whatever it is, whether 0 or 720 degrees or 82144.33 degrees or whatever.
So the functions cos(θ) and sin(θ) just get used to calculate the x and y coordinates, no matter what the value of θ is. It's not like you have a choice in the matter, if θ is 82144.33 degrees then you're going to want to calculate the sine and cosine of that angle.
Answer: I play a PC game called Garry's Mod, and there are moments in the game where, when programming, I want a simple solution to keep an object constantly moving in a constant circle. To do this I use the sine and cosine of a forever increasing timer, measuring the amount of time since the game launched.
The sine of T (time) is equal to the orbit paths X value, while the cosine of T is equal to the orbit paths Y value(X and Y being on a 3 dimensional coordinate plane with Z not being used at the moment.)
Example:
T=1000 ticks
X=sin(T)
Y=cos(T)
So X is 0.8268795405320025 during that moment in time and Y is 0.15466840618074712.
Now let's say the amount of time grows to 1500. X would be -0.9939019569066535 and Y = -0.11026740251372914.
In a nutshell, it would constantly fluctuate from 1 to -1, leaving me the opportunity to multiply that value by say 100, and making the coordinate plane local to my characters position, then I can tell the programmed expression to move an object based on those coordinates and it would move in a constant circular path around me.
Tada. Who says you can't learn from video games?
Answer: There definitely can be times when you might end up with an angle measure > 360 degrees because of some kind of calculation...but it would be identical to an infinite number of other angle measures, exactly one of which will be between 0 and 360.  However, if you are coding a function, you should be able to handle this calculation yourself...not rely on the user to do the mod for you.
ie While it is true that  sin(370) == sin(10), and the user could do this translation themselves, they may not want to for one reason or another (see the "bolt" example in the comments for the top rated answer), and so the function should be able to handle any value.
Answer: Because sin(x) = sin(x mod 360°) and cos(x) = cos(x mod 360°) you can use every value in calculation, but you could also normalize to the range [0°,360°) or any other range of 360°. It just depends on the usage if large angles have a well defined meaning or not.
Processors will likley normalize the calculation to just a range of 90° or even less, and derive all other values from this small range.
When will arguments greater than 360° occur?
They naturaly occur in simulations of periodic time or space dependent functions.
Answer: Your question does not make much sense seeing as you seem to know the difference here:
No - you will never have to "compute" Sin(720), anymore than you will have a need to "compute" Sin(0). You need to look at the definition of the Sinus function to fully understand what goes on under the covers - and when that is understood it makes total sense for anyone as to why Sin(0) = Sin(720) - there's nothing magical going on, there's (logically) no Angle = FullAngle % 360 going on, it's all in the definition of what the function is supposed to do.
See wikipedia
Answer: @dta, I think folks are a little confused.  You ask if it's ever "useful."  I'd say "It doesn't matter, because you just shift the angle to the proper range when performing the calculation."  There are certainly cases where you need to know how far from 0 degrees an object has rotated, accounting for multiple rotations.  But aside from those cases, it's more convenient to interpret angles in the normal 0-360 range.  Most people build up an intuitive feel for which direction corresponds to angles in that normal range.  What direction does 170,234 degrees point?  The same as 314 degrees.
Answer: As @Chris Arguin and others said, whether sin of an angle greater than 360° (or for that matter less than -360°) is useful to you depends on whether you need the information about rotations (or fractions thereof) that is represented by the difference between angle and angle%360°.
Also, since you get the same answer, you'll save a little processing time if you call sin(angle) instead of sin(angle%360), especially if you are doing many computations in a loop.
OTOH, @Scottie T makes a good point that if it is important for someone to know where around a circle your angle points, people can generally intuit position of an angle with an absolute value of 360 or less easier than they can for larger angles.
Answer: There are many circumstances where angles outside of [0,360] are needed. I like the idea of a combination lock. Here one will often see both positive and negative angles outside of the simple [0,360] degree range.
Multiple angle formulas are often important in mathematics. Trig functions are used in places other than just triangles. They appear in a variety of places, Fourier series for example, or image compression schemes, or the solution of differential equations. Computationally, it is true that you can always use mod to reduce the range for a trig function to the default. But it is rarely true that angles will always be provided in that nominal range.
Answer: Angles higher than 360 degrees are also used e.g. to describe snowboard tricks:
http://en.wikipedia.org/wiki/List_of_snowboard_tricks#Spins
So you see, there are various real world example where you use higher angles to describe the rotation of an object.


Sending an encrypted email to a public key

Question: A person I wish to contact, posted his public key as his contact info. I have setup Thunderbird and generated my on key pairs but I am missing something. I do not understand how to use just his public key to send him an encrypted email. Other than creating a message and choosing encrypted, what goes in the To: line? Where do I enter his public key? He did not list a key-ID or email address
Comment: I have no keyfile at hand myself right now, but I am pretty sure that the file is registered to an email address. Just open the file with some texteditor.
Answer: There's and add-on for thunderbird called enigmail that will help you.
Install this add-on, then import the public key of your friend.
When writing a new email, you will see that enigmail has added new buttons to thunderbird to write signed and/or encrypted mails.
http://enigmail.mozdev.org/home/index.php.html


Gravitational wave intereference

Question: Is it possible to conduct a hypothetical experiment where gravitational wave interference occurs and where areas of constructive and destructive gravitational wave interference are present? If such were possible, would sampling of areas of destructive interference yield a finding of true zero gravity in the universe (unlike Lagrange points)?
Comment: I think that there may be a misconception that the "force of gravity" is caused by gravitational waves emanating from a mass.  This is not the case.  Compare with the difference between how a magnet or electric charge can create a force, and electromagnetic waves (ie light) The force is not caused by rays of light.
Comment: If I understand the premise of your question, if two gravitational waves interfere such that they "cancel" each other (like two sound waves with opposing peaks and valleys) does that mean gravity is "cancelled"? I would think the net compression of spacetime would be zero, but gravity from objects with mass would still be present. Or maybe I'm misunderstand the question.
Answer: Gravitational waves are small perturbations in the spacetime metric caused by specific types of acceleration by masses. The gravitational attraction between masses is always present, regardless of whether they are accelerating and therefore regardless of whether gravitational waves are present.
Hypothetically, you could set up the experiment you propose. You could have two identical oscillating mass quadrupoles (e.g. identical binary star systems), but which were quarter of a phase different in their oscillation phase. These would produce gravitational waves that were exactly out of phase and should "cancel" in the region between the two systems. However, the two binary systems would still be attracted to each other.
At the risk of stepping beyond my area of expertise, the above relies on the assumption that the metric perturbation due to the wave is small, as is always the case for GWs detected at the Earth from astrophysical sources. This allows the Einstein field equations to be reduced to linear second order differential equations in the GW strain (so-called linearised gravity), which means the solutions could be superposed in the way I suggested.
Comment: Also, as far as "superposition" goes, from a purely mathematical viewpoint, various "soliton" (e.g., certain "traveling waves") solutions of (not-linear) Korteweg-deVries equations do have superposition properties.

Gravitational wave intereference


Derivative of wavefunction of a quantum system

Question: If $\psi(x)$ represents the wavefunction of a 1D quantum system, it satisfies the Schrodinger equation, has a unit norm, and $\lim_{x\rightarrow \infty }\psi(x)=0.$ Then is it true that $\lim_{x\rightarrow \infty }\dfrac{d\psi(x)}{dx}$ also zero or another constant?
Comment: Related: https://physics.stackexchange.com/q/331976/2451 and links therein.
Comment: @marmot it couldn't approach a nonzero limit, but it might simply not have a limit. See my answer.
Answer: In a formal mathematical sense, no. Consider
$$
\psi(x)=\sin(x^2)/x
$$
This wavefunction is smooth and square integrable, and goes to zero at infinity. However, it's derivative does not go to zero at infinity, as you can verify.
However, for convenience we often assume all wavefunction have vanishing derivative at infinity. This is required to make $P^2$ Hermitian.
Comment: That's not really an assumption.  Remember that $P^2$ is Hermitian if $\langle \psi, P^2\varphi\rangle = \langle P^2 \psi, \varphi\rangle$ **for all $\psi,\varphi$ in the domain of $P^2$**.The domain of $P^2$ is not the entire Hilbert space - it is restricted to twice-differentiable functions whose second derivative is also in $L^2(\mathbb R)$, which means that $\lim_{x\rightarrow \infty} \psi'' = 0$.  This, along with the fact that $\lim_{x\rightarrow \infty}\psi = 0$, implies that $\lim_{x\rightarrow \infty} \psi' = 0$, meaning that $P^2$ is Hermitian on its domain of definition.
Comment: @J.Murray I think all I'm saying is that we assume our wavefunction is in the domain off $P^2$, which is not the same as all square integrable functions.
Comment: What I'm saying is that that assumption isn't actually necessary.  You can do QM with a wavefunction which isn't even continuous if you want.  The domain of $P^2$ is a dense subspace of the full Hilbert space $\mathcal H$, so even if some $\psi\in \mathcal H$ does not lie in the domain of $P^2$, we define the time evolution of $\psi$ by the time evolution of a sequence $\psi_n\in Dom(P^2)$ which *converges* to $\psi$.
Comment: @J.Murray Fair enough. I'm not going to edit my answer, because I don't think anything I said was explicitly incorrect, but it's a fair point that most things you prove by assuming $\psi$ is in the domain of $P^2$ can be generalized to the uniform limit of wavefunctions in the domain of $P^2$.
Comment: I agree.  It's a small and technical point, but one that is particularly useful in resolving annoying questions which only arise when you look a bit too closely.


Why would the pH of a solution not be 7 at the equivalence point of an acid-base titration?

Question: Is it because the new substance formed might be acidic/basic ?
The internet defines this point as when the number of moles of the acid equals the number of moles of the base. But if we have for example 1 mole of NaOH and 1 mole of H2SO4 (both in dilute solutions) mixed together, the resulting solution will still be acidic because 1 mole of H2SO4 releases 2 moles of H+ right ? So we will have an extra mole of H+ which will make the resulting mixture acidic. So is this still the equivalence point even though it isnt really equal (bcz we have 1 extra mole of H+) or is it 1 mole of NaOH + half a mole of H2SO4 ?
Answer: The equivalence point is defined as when you have an equal amount of acid and base. It you have a strong acid and a strong base, the pH at the equivalence point should be pretty close to 7, but if you have a weak acid or a weak base involved, there is not reason why the equivalence point should be at pH 7. You would have a conjugate base or acid that is reasonably basic or acidic at the equivalence point.


What is this open space on rear exterior wall of my house called?

Question: What is this area called on the rear of the house? Almost like an extension where the kitchen sink is. Can that be blocked to prevent cold air from blowing up through there?
Comment: "Cantilevered bump out"?
Comment: Needs rodentproofing to keep the insulation in and the rodents out. If there are drafts, there are critters...
Comment: Can you step back and take another picture capturing more of the detail of that corner of the house with respect to the rest of the building. It may also be helpful if you could add a picture from underneath the overhang looking up at an angle (it may require adding some additional lighting under there to get a decent picture).
Comment: summer kitchen ?
Answer: To prevent heat loss and cold air entry, you can insulate the bottom of that overhang from underneath.
You could probably attach 2" XPS to the bottom, seal all gaps with expanding foam, and apply cladding (painted plywood) to mechanically attach the foam board and protect it. No framing needed, and the entire assembly will be a few inches thick.
It is important to avoid ground contact, and provide ample space for air ventilation between that bottom and the ground including (if applicable) any melting snow.

Depending on the amount of rain in your area, you could consider a drip edge at the bottom of the current (white) siding so that no water running down on the siding, whether from the face of the siding or from behind it (!), can seep into the new insulating sandwich. (Your picture does not show how much the siding overhangs the bottom, but you can of course easily check this). Ideally, attach and seal a drip edge to the sheathing of the floor/wall/rim-joist behind the siding. It does not need a protruding drip lip, as long as it drops past the protective plywood.
This will provide the heat improvement you seek without introducing additional problems such as water ingress & rot, an inviting living space for rodents and a dark warm moist chamber for molds to grow.


50 amp outlet Use existing or move it?

Question: Replacing an 18 inch wide base cabinet with a 24 inch wide base cabinet in a kitchen remodel. This is pushing my electric range over 6 inches. Do I need to have an electrician move my 50 amp outlet over 6 inches? Or can I cut a hole into the new base cabinet and plug in the range Into the existing outlet which will now be cut out of the back?
Comment: As long as the outlet/box is "permanently accessible" you should be OK. Make sure the opening is large enough to service it if necessary. There is a distinction in the NEC between "permanently accessible" and "readily accessible".   I think cutting a large enough opening in your cabinet would qualify as "permanently accessible".   Other comments?
Comment: Have you checked your local or state codes?
Answer: As George stated it only has to be accessible.
Since doing a remodel I would look to see the direction of the feed.
It may be possible to move the receptacle to the center of the opening or possibly even to the edge and not have to cut the cabinet at all.
I usually provide small service loops of a few inches this could allow the receptacle to be moved from 1 stud to another or if the direction of feed allows to the center of the opening.
Both of these options only cost a little sheetrock and may provide a professional look over a cut hole in a cabinet.
Have I ever cut a cabinet do do something like this as a professional? Yes as it saved hundreds compared to replacing the feeder, receptacle and a permit plus the delay for inspections.
If the receptacle can not be moved over and you cut or notch out the cabinet base I would suggest making a box inside the cabinet so when looking in the hole is not visible.
The receptacle box must still be accessible without damaging the finish.
I use Velcro adhesive strips to hold things like this in place but screws are ok also. It must be made to be removable and the finish can not be damaged when opening. This will provide a quasi professional look compared to just a hole.

50 amp outlet Use existing or move it?


What does this sentence mean? "I want to do me. I'm going to do me."

Question: What does this sentence mean? "I want to do me. I'm going to do me."
Comment: Can you give any more context, such as where you saw this? Also, please don't include irrelevant images in your posts.
Comment: Not that long ago, "doing" meant having sex with someone. "I want to do her/him," meant that you wanted to have sex with him/her. In this light,  "I want to do me,"means you want to have sex with yourself, not as self-gratification but as the other party. A form of narcissism, I suppose.
Comment: @Zan700 I think it goes without saying that the verb `do` has more than one sense.
Comment: @jlovegren No it doesn't.
Answer: While it's user based, Urban Dictionary has your answer. The phrase "doing me" refers to the speaker focusing on their own well-being.

"The act of taking care of yourself first. Making yourself happy. Not
  trying to please others."

I'd note that if you read the entries on the Urban Dictionary page I linked, only the first two are relevant.
Answer: The context need not be specified. This is from a dialect of English used mostly in television screenplays. A young person is preparing for some kind of social situation (a date or an interview, for example), and their friend is telling them the different faces they can wear. Can you do serious? Can you do committed? Can you do heroic? After some soul searching, the hero realizes that they will be out of face if they try too hard to put on airs, and decides they will just behave normally.
Answer: I want to be myself.  I am going to be myself.


Floating row in Numbers for iPad

Question: Is there a way I can make a row float on top of everything else. So, no matter how many rows you add, the row will always be visible?
Answer: Yes, you can make the header row(s) or column(s) float on top of everything else.
Tap the information button (the circled i) in the toolbar at the top of the screen. Under the "Headers" tab, select how many header rows or columns you would like, and set "Freeze Rows" to ON.
Comment: Great! Thanks! Is there any way to make a row in the middle of the page floating?
Comment: No, I'm pretty sure there is not.

Floating row in Numbers for iPad


Remove Permanent URL for custom post types

Question: I have created a dynamic slider and using custom post type and featured images to upload slider's images. What I want to do is to remove Permanant URL for my custom post type i.e. post is not accessible with its permanent URL nor it will appear under title while adding custom post. Is it possible?
Answer: To get this to work, you'll probably need to set multiple arguments to get exactly the way you want. In situations like this, I usually start by settings the public argument to false and then adding in everything that I do want displayed.
In this case, setting public to false also sets publicly_queryable to false as well as exclude_from_search to true, both of which it sounds like you want.
I don't know that you can remove the permalink from displaying beneath the title, but you could easily enqueue a stylesheet on the admin that hides the field.


Interlude for a melody composed between chorus ad verse for 30 second without vocal

Question: Need tips for the instruments to be arranged & played for a song when there is a break for vocal between the song moving from chorus to verse or verse to chorus.Already planned for accompaniment with acoustic guitar,snare Drum,Keyboard,Electric guitar and shaker for the intro,verse & Chorus.But not getting idea how to fill the gap in Interlude in-between chorus & verse.The song structure is Intro ,Verse 1 + Interlude 1 + Chorus 1,Verse 2 + Interlude 2 + Chorus 2,Outro,End.
Comment: Need more information - type of song, tempo, feel,  length of verses/choruses, where the chorus goes in comparison to the verse, major or minor, all of which would have a bearing on suggested interludes.
Comment: Type of song- Indian Gospel,Tempo-95,Feel-Slow breezy movement,Verse -12 bar,Chorus-18 bar,Key- E major ,3/4 rhythm.The song will move from intro to verse and then chorus - i want a instrumental Interlude between this.
Answer: I would start by considering the point of the interlude. What's it doing in your song? What is it's function, or purpose? What would the song lose if you missed it?
Once you've decided what it does, you can think about how to arrange it.
Let's assume that your interlude is aiming to build energy and anticipation, that is met by the chorus when it finally arrives. You're going to want a chord progression that builds tension, and guides the listener towards the release of the chorus. Perhaps add a melodic line, or a hook, or a riff. Something to grab attention, and say "listen up, the boring verse thing is over, you know the words to the next bit, prepare to sing along!" (note: perhaps this is an overly cynical view of your average modern pop song).
You could also change up your instrumentation.  What if the verses were driven by the keyboard, and the guitars waited until the interlude to sneak in, and build up to a big chorus? Or, the opposite. Simple acoustic guitar, with the keys bringing it all together for your big moment.
Of course, my assumption could be very wrong. Perhaps you want your listener to think about what you've said in the verse, and contemplate it, before moving to the next idea. You could repeat the melody instrumentally, with some variation. Sometimes less is better, and some simple chords is all it needs.
It all depends on what you're trying to do with this interlude. Perhaps the song is stronger without it? Once you know what you're aiming for, think about how you can use your tools (instrumentalists, vocalists, melodies, harmonies, and the odd drummer or two) to get there. Then try it out, and see what it sounds like. Your ears are in charge here.


Arithmetic operators against varchar data in SQL server

Question: Could someone please explain to me how arithmetic operators such as > or < compare strings in SQL Server 2005?
Answer: If they are against a numeric field, they work about as you would expect. If it's against a character type of data field, they would work alphabetically. So if you wanted greater than (>)10 and less than (<)20 you might get 11, 110, 123456 in response.
This is one reson why it is always a bad idea to store numbers you want to be able to do math calculations or comparisons with as varchar (or any other type of char data). Only numbers that do not need math calculations (phone, zip, ssn, etc.) should be stored that way and those should always be stored in a character type field to account for leading zeros.
Answer: Sorting (and thus the < > operators) depends on your SQL Server collation:
http://msdn.microsoft.com/en-us/library/ms144250(SQL.90).aspx
And the rules for that collation you'd have to find on the web. Note that they are often very complicated. For your sake, I'd try and avoid < and > comparisons of VARCHAR's unless you really, really need to.
Answer: Thanks for the quick response.
The reason that I'm asking is that I need to query a database table of UK postcodes. The table in question has two postcode columns, "from_postcode" and "to_postcode" and I need to determine whether a given postcode lies between these values.
Fortunately the data has been laid out in such a way that I think I should be able to use the arithmetic operators to at least get a subset of rows of potential matches.
Time for me to write a few (or perhaps a fair few) uni tests!


Hosting: why does the number of MySQL databases matter?

Question: Ok, maybe I'm missing something here but I'm looking at various PHP hosting options and I see things like "10 MySQL databases", or 25 or even unlimited.
Now I've worked on sites with an Oracle backend that have 10,000+ concurrent users and we've had... one database.
The idea of a database is, of course, that you can store whatever you want in it.  So why is it for MySQL that the number matters?  Is there some table, row or overall database limit I'm not aware of (entirely possible)?  Or is it a question or concurrent connections?  Or some other performance issue (eg sharding)?  The sharding aspect seems unlikely because even basic hosting options (ie under $5/month) I see with 10 databases.
If someone could clue me in on this one, it'd be great.
Answer: It's mostly a marketing tactic, although there are some technical and historical considerations.
First, apologies if this is obvious, but SCHEMAs are to Oracle as DATABASES are to MySQL (in over simplified terms, a logical collections of tables).
The host is saying you can have XX number of configured logical databases on a server.  Lots of web applications need a database to run.  Modern web applications like Wordpress, Movable Type, Joomla, etc., will let you name your tables with a custom prefix.  However, if an application doesn't have this configuration feature that means you need one database per install.  Also, in a similar vein, if two applications have the same table name, they can't coexist in a single database.  Lots of early web applications started out like this, so early on number of databases was an important feature to consider.
There's also access and security. While MySQL (and other databases) can be configured to give users fine grained access-control down to the table and column level, it's often easier to create one user who has full permission on a logical Database. This is important to people who sell services but pass off the actual hosting of completed sites/applications to the shared web-host.
Answer: Some people like one database per app
Answer: It's marketing, not technical. They want something to advertise. "10" sounds like a good number.
Comment: i totally agree!! 10 is a good number, but 25 (twenty five!) is a bigger number and sounds better.
Answer: When I used shared hosting, I set up a separate database for each site/client for custom apps, and if you use Fantastico to install applications it will use a database for each one by default.
I believe the limits are there to prompt you to upgrade to the next tier of service when you outgrow the current level.
Answer: For development purposes, sometimes it's good to make a copy of your entire database to test new software against. Beats renaming all the tables in your code (although apps like Wordpress let you specify a prefix for all your table names in case you don't have the luxury of multiple DBs).
Answer: Nick is partially correct, but it also has to do with people who will try to host multiple sites on one shared account and will use a different database for each and a script to serve the correct content with a little dns masquerading.
Answer: Additionally its possibly a marketing perspective.
If you're only setting up databases for yourself, the low count is fine. but for commerical users, whom may want to have multiple sites for multiple clients on the one service, trying to cut corners, you're likely to need 1 Database ( or more ) per client/project.
So putting a limit on number of databases controls somewhat the variety services you offer, and potentially limits potential for your "resale" value, ie: to stop you buying 1 plan and then selling it on to somebody else, like "subleasing".
Answer: This is mainly for when you are hosting multiple sites on the same box.  For me, I buy/sell a lot websites so I need to be able to keep each website as detached from the others as possible.


How do I install Groovy on an Ubuntu system for all users?

Question: I'm trying to install Groovy for all users on an Ubuntu system. Apparently the correct way to install Groovy is to use http://sdkman.io/ but following those instructions the software is only installed for the root user. What are you intended to do?
Comment: Why not simply install it from the universe repo? If you need something newer, binary and source zips are available. `sdkman` is meant to allow the user to install what he needs into his own environment.
Comment: I originally tried installing from the universe repo but I got errors running `apt-get update` on it, leading me to believe it was no longer supported.
Answer: I would check the paragraph: Installing to a Custom Location in the
install documentation.
After you install it, say in /usr/local/sdkman, it gets a matter to invoke:
source "/usr/local/sdkman/bin/sdkman-init.sh"

for any user login: it can be done putting a custom bash init file in
/etc/profile.d/

http://sdkman.io/install.html
Answer: sudo apt-get install groovy

Works fine to me in Ubuntu 16.04.3
Answer: On recent Ubuntu versions (works on Ubuntu 19.10) Groovy can be installed with Snap:
sudo snap install groovy --classic

Answer: Try this:
sudo apt-add-repository ppa:groovy-dev/groovy
sudo apt-get update
sudo apt-get install groovy

Let me know how that works for you.


Are my game saves transferred on Steam?

Question: I used to play on my brother's PC on my Steam account and through his shared games I got pretty far in several games. But now I have my own PC and I want to know if it'll keep all my progress if I buy the same games for my own account on my PC.
Comment: Do the games support Steam Cloud?
Answer: Yes, your saves should be good.
If a game supports the Steam Cloud, your saves will be automatically synced between your PCs (source):

Steam Family Library Sharing allows family members and their guests to play one another's games while earning their own Steam achievements and saving their own game progress to the Steam Cloud.

You just need to make sure that you enabled the Steam Cloud in settings:

And you can check if a game uses the Steam Cloud on it's store page or right in your library:

If a game doesn't support cloud saves, you need to figure out how your saves are stored and move them manually (using a flash drive for example).
And finally, you don't necessary need to purchase those games. You can ask your brother to authorize your PC to use Family Sharing. Basically he needs to login into Steam on your machine once and allow your account to access his games. There are some limitations, for example, you won't be able to play the same game simultaneously.
Answer: On your brother's pc, you can log into your steam account and go through the options to find a setting that says something like "Back up game saves to the cloud" and make sure the box is checked. Steam will then upload your saved games so they are available on any computer you are logged in at. You will just have to make sure the game is also available to play, either through family sharing or by buying the game on your own account.

Are my game saves transferred on Steam?


Tweet meta syntax for ODLs

Question: I am interested in the idea of using Tweets/SMS/Identica or other short text status update systems to track Observations of Daily Living (or ODLs). The basic notion is that you send status updates to Twitter or Identi.ca or perhaps just an SMS message or whatever in a format that can be later mined to show patterns.
You could use it to track exercise, diets, your movie preferences, anything you like.
To do this you need to have a syntax that allows both humans and computers to easily parse your status updates. The syntax should be dense, which supports the low character counts, but still human readable.
This idea is not new and there are lots of twitter apps out there for tracking exercise and eating habits. Twitter is already essentially a short text ODL medium, which you can easily see by looking at searched for #feeling http://search.twitter.com/search?q=%23feeling
or searches for #hurts http://search.twitter.com/search?q=%23hurts or applications intended to mine the wealth of ODL data already going to twitter: http://www.tweetfeel.com/
By using Twitter to track ODLs, you stop fighting to force people to use a given integration engine created just for that, like Google Health and HealthVault, and instead focus on improving the value of the ODL tracking system that people are already using, like Facebook or Twitter. But to do that, you need a generalizable approach for entering ODLs and for data mining those entries, so that you can get meaning at a higher, or at least different, level.
There are also several syntaxs available for generalizing the approach to use Twitter to track whatever you like. These are the ones that I am most interested in. So far I know about several:
Daytum has a twitter syntax. It uses direct messages and looks like this:
d daytum item : amount
// simple data label and value
d daytum item [category, category] : amount
// same thing but with tagging...

Your.flowingdata.com has a richer syntax. It also uses direct messaging.
// yfd works with "action" and "value" pairs
d yfd weigh 160
d yfd exercised arms
d yfd watched Back to the Future
// but can be made more complex with units
d yfd drank 2 water
d yfd drank 1 coke
// and timestamps
d yfd played xbox at 20:00
d yfd goodnight at 11:00pm
d yfd goodnight at 11pm

For each action yfd will ask you some information about the data type, asking you to choose between:
Categorical - If you're interested in the occurrence of the same action with different units e.g. ate corn
Event - If the point of interest is when something happens e.g. goodnight or pooped
Counter - If you're mostly interested in total times you've done something e.g. smoked 5 cigarettes
Measurement - If you want to see the trend over time of some value e.g. weigh 160 or blood-pressure 170
Pretty clever no?
The last one that I know about is the Grafitter syntax. So far this is pretty neat concept because it uses hashtags in a very clever way...
//hashtag with comma separated tags
#mood(happy,elated,drunk)
#mood(sad,sober)
// scales, like not busy
#busy(1)
// very busy
#busy(5)
//straight up numbers
#lbs(250)
#worked(10)

Tweet your eats uses DMs as well, and lets you include what you ate, as well as including calorie/fat/point tracking. So the syntax looks like
d tyeats #breakfast One bowl of cereal *c500
// the *c500 marks the tweet as 500 calories

Of course it is important to note the very common natural language patterns that are employed by different ODL generating software that is already logging to twitter, like runkeeper, which typically produces something like:
@meattwitter Just completed a 4.50 km run with @runkeeper. Check it out! http://rnkpr.com/aaaaa #RunKeeper

So now for my question(s)?
What other significant ODL syntax am I overlooking?
Is DM the right way to do data collection or should you focus on hashtags?
What other important "natural" ODLs are happening other than runkeeper etc?
Does anyone know of any formal research on this issue (ODL syntax in social media status updates)?
Does anyone know of any existing Open Source projects that implement this types of things?
update: Paul pointed out that the OMHE project does this kind of thing. http://code.google.com/p/omhe/ Here is the OMHE syntax, which already has a python based parser..
#The basic OMHE syntax follows this basic format"
[COMMAND_NAME]<VALUE><#[TAG]>

# Reporting WEIGHT (This is correct):
wt123.4

# In the previous example, COMMAND_NAME=wt and VALUE=123.4

# Reporting WEIGHT (Also Correct):
wt=123.4

# In the previous example, COMMAND_NAME=wt and VALUE=123.4

# Reporting WEIGHT with _TAGS_ (Also Correct) :
wt=123.4#mytag#myothertag

# The previous example has two tags: 'mytag' and 'myothertag'

# Weight is a command that requires a value (Incorrect):
wt

#You can never have an equal sign without a value. (Also Incorrect):
wt=

# Here is an OMHE string with two commands separated by white space " ".
# Says the command 'wt' (weight) has a value of '195' and blood glucose is 150.
wt195 bg=150

# Report the start of a menstrual cycle (correct):
# (Correct) mcycle is a command where value is not required
mcycle

# Report the first day of a menstrual cycle:
# Notice we can still add tags even if no value is given
mc

# Report the start of a menstrual cycle (Incorrect):
# You can't provide an equals "=" sign without a value:
mc=

# Report the adherence to a health directive such as taking medication (correct):
# (Correct) did is a command where value is not required
did

# Report the adherence to a health directive  to stretch arm (correct):
did=ARMSTRETCH

# Send Blood Glucose Level:
bg125

# Send Blood Pressure:
bp100d120p65

# Send Blood Pressure using the equals sign style:
bp=100d120p65

# Send Weight:
wt145
wt=145 #Express weight using the equals sign style
w78k   #Express weight in kilograms
wt145l  #Explicit express weight in pounds (lbs)
wt245.8 #Express fractional weight
wt245p8 #Another way to express fractional weight

# Send blood glucose, patient identifier, a note, and the date:
bg145 id213762732467234 nAllGood d20090117

# Sending blood glucose with a simple note tag (with spaces):
bg145#I'm*feeling*very*tired*today

# Report the start of a menstrual cycle:
mcycle

# Get a copy of your health benefits/insurance card:
gethc

# Send a copy of your health benefits card to someone via fax:
sendhc=6509840982#fax

# Send a copy of your health benefits card as a pdf to someone via email:
email@example.com#pdf

# Get a copy of your personal health record:
getphr

# Get a copy of your personal health record as a pdf:
getphr#pdf

# Get a copy of your personal health record in CCD format:
getphr#ccd

# Send a copy of your personal health record to someone in CCR format:
firstname.lastname@example.com#ccr

# Send a copy of your personal health record to someone in XML microformat:
firstname.lastname@example.com#microformat

My goal is to write a parser and data display tools under open source licenses and I am generally looking for what types of things I should support. So if you can think of other questions I should have asked to make a requirements list for such a project let me know!! For instance, I know that there are decent implementations of parsers for the standard Twitter syntax of mentions, DMs, replies and so forth, should what I am discussing extend that work, or be implemented entirely in parallel.
For the time being I am happy to assume that the system will not support "private" logging, unless someone can tell me how to do that in a succinct manner.
Answer: Hey, Fred... have you seen OMHE:  http://code.google.com/p/omhe/
Or the work going on in the OpenMRS messaging community... (search for messaging from the OpenMRS website)...
Those might give you some hints on messaging syntaxes, given that SMS lengths are fairly analogous to tweet lengths. :)
Hope this helps.
Comment: Should have known that first good answer should come from a friend ;)
Answer: Fred:
I have some code working actually working on code on a couple new projects for wellness tracker.  Specifically, I'm building this into the "Seven" project formerly "Body4Break".
http://github.com/aviars/b4b
Right now it just snags a comment based on a hash tag, but I'm investigating auto ingestion of RunKeeper pure OMHE syntax and other parse-able tweets.
-Alan
Answer: Just found out about Quantt quantter.com/
And the accompanying syntax.
http://blog.quantter.com/syntax
as well as an API for interpreting that syntax.
http://beta.quantter.com/api/documentation

Tweet meta syntax for ODLs


How to access devices in webot robot?

Question: I have trouble finding out what devices are in my robot currently I am using e-puck but I want to use a robot such as the Tesla car. I want to know what devices I can control. Example if e-puck has 2 cameras and 3 motors how will I know that. Given this information I can access them with the webot library.
Answer: You can simply right-click on the robot in the 3D view of Webots or in the scene tree and select Show Robot Window. This will open a web page with the robot window including all the sensors and actuators of the robot:

Note: if the window field of the robot is set to something different from <generic>, the robot window may have a different appearance and may not display all the sensors and actuators. However, it should be easy to reset this window field to <generic>, save and reload the world to be able to display the generic robot window with all the sensors and actuators.
Disclaimer: I am a Webots developer working at Cyberbotics.

How to access devices in webot robot?


What exactly does manage.py file do

Question: I am very new to python/django programming, as in I have no programming background.  I am working on a class online and I just would like to know exactly what the manage.py file does. I've tried googling it, but I have not found any answers other than it puts a thin shell around django-admin.py. I still don't understand what the file does. I just know I need to type it whenever I do certain things.
Answer: (I assume you've read the documentation. But if not, take note that one of Django's great strong points is its documentation -- I recommend going there first before hitting Google.)
You can think of the arguments you pass to manage.py as subcommands. It is your tool for executing many Django-specific tasks -- starting a new app within a project, running the development server, running your tests...
It is also an extension point where you can access custom commands you write yourself that are specific to your apps.
Comment: Yes I did read the documentation (as I believe I stated) and as I said since I am NEW to programming, that is pretty much greek to me. Much of the documentation written is WONDERFUL if you  have a programming background. But if you have no programming background whatsoever, it doesn't really explain basic concepts.
Comment: I don't know what "working on a class online" means specifically, but I don't recommend working with a big web framework like Django as a good way to learn programming. Try [getting your feet wet in Python first](http://docs.python.org/2/tutorial/) and then moving on to a specific project (maybe in Django, maybe in something simpler like [Flask](http://flask.pocoo.org/), or maybe something else entirely).
Comment: "working on a class online" means I am taking an online beginner's python course. I saw that course that you linked to, but I feel that it is written for those with a background in programming, which I do not have. Thanks for the advice, though.
Comment: `But if not, take note that one of Django's great strong points is its documentation -- I recommend going there first before hitting Google` ? Ops I mostly found the document topics by hitting the google.

What exactly does manage.py file do


Poker Practice - Preflop All In

Question: Fairly new player here - I've been using an online practice game (vs AI) as a tool to start off with.  In their games, if someone goes all-in before the flop and no one calls them on it, that player is then out of the game/loses all their chips.  Is this true of other poker games or is it just a glitch of the practice system?  Sorry for the extremely newbie question!
Comment: What software is this?
Answer: That sounds like an error within the software; real poker games have nothing similar to that function.
Comment: Your _all-in_ is going to win the hand either called by a worse non-improved hand or not called at all. It sounds like a software's glitch. Wondering how they missed that as it pretty basic 8)
Comment: So usually if you go all in preflop and then have the only hand, then the chips are yours?
Answer: No, that's ridiculous of course. Either you misunderstand what's happening or that software is worthless.
Answer: A real Normal player with there functionality won't go all in without the flop.
Which game do you have played ?
I really recommend Zynga Poker in facebook for begginers :)

Poker Practice - Preflop All In


Wiring for radio issues?

Question: I have a 04 jeep grand cherokee special edition and the factory harness was cut out so I figured whatever I'll just hard wire it. Found all the speaker wire colors matches them up but the battery wires which I assumed were the two red and white ones don't have power running to them but the two black ones do. I thought those were the ground. The illumination has constant power. So, I hooked them up with the black to battery since it's constant and the red and white to ground but it keeps popping the fuse in the back of the radio. Am I missing something ? I can't find and diagrams or forums with this issue. Please help !!!
Comment: BTW, Khayla ... Welcome to Motor Vehicle Maintenance & Repair! Welcome to Motor Vehicle Maintenance & Repair!
Comment: No it's an after market radio but when I first hooked it up obv red and white to battery etc there was no power to the head unit. So, I took a test light to the wires and no power to the red and white but power to both black also 12v on the meter and when i tested for ground wires the red and white lit up , I figured constant power to battery etc but now it's popping the fuse. I'm not an idiot but this don't make sense.
Answer: Here are the diagrams for the base sound system, colors are the same for Premium Sound.
Comment: Thank you. +1 for answering and making it complete with diagrams :o)
Comment: There should be 2 power wires on the new head unit, one is batt and should be yellow, the other is accy and should be red, connect them separately, there should be only one black wire on the new head unit, connect it to either one of the black harness wires.
Comment: I'm asking about from the jeep
Comment: 2 Red/white to yellow, white/red to red and 2 black to black or should i ground one black to the back of radio and other to the ground of harness ?
Comment: just the black wire out of the radio to one of the black wires in the Jeep harness.

Wiring for radio issues?


properties of least square estimators in regression

Question: $Y_i=\beta_0+\beta_1 X_i+\epsilon_i$ where $\epsilon_i$ is normally distributed with mean $0$ and variance $\sigma^2$   .
The least square estimators of this model are $\hat\beta_0$ and $\hat\beta_1$.
 How can I show that $\hat\beta_0$ and $\hat\beta_1$ are linear functions of $y_i$?
Also it says that both estimators are normally distributed.How come they normally distributed?I know that linear functions of normally distributed variables are also normally distributed.  .
please explain this to me
Comment: Do you mean $\beta_1 X_i$ instead of $\beta_1 + X_i$?
Comment: Yes corrected that one.It was a mistake
Answer: One has
$$
\hat\beta_1 = \frac{\sum_{i=1}^n (y_i-\bar y)(x_i-\bar x)}{\sum_{i=1}^n (x_i - \bar x)^2}
$$
where $\bar y = (y_1+\cdots+y_n)/n$ and $\bar x = (x_1+\cdots+x_n)/n$.
This is nonlinear as a function of $x_1,\ldots,x_n$ since there is division by a function of the $x$s and there is squaring.  But it is linear as a function of $y_1,\ldots,y_n$.  To see that, first observe that the denominator does not depend on $y_1,\ldots,y_n$, so we need only look at the numerator.
So look at
$$
y_i-\bar y = y_i - \frac{y_1 + \cdots + y_i + \cdots + y_n}{n} = \frac{-y_1 - y_2 - \cdots+(n-1)y_i-\cdots - y_n}{n} $$
This is linear in $y_1,\ldots,y_n$.  Since the quantities $x_i-\bar x$, $i=1,\ldots,n$ do not depend on $y_1,\ldots,y_n$, the expression
$$
\sum_{i=1}^n (y_i-\bar y)(x_i-\bar x)
$$
is a linear combination of expressions each of which we just said is linear in $y_1,\ldots,y_n$.  It is therefore itself a linear combination of $y_1,\ldots,y_n$.
Next, we have $\bar y = \hat\beta_0 + \hat\beta_1 \bar x$, so $\beta_0 = \bar y - \hat\beta_1\bar x$.  Since $\hat y$ is a linear combination of $y_1,\ldots,y_n$ and we just got done showing that $\hat\beta_1$ is a linear combination of $y_1,\ldots,y_n$, and $\bar x$ does not depend on $y_1,\ldots,y_n$, it follows that $\hat\beta_0$ is a linear combination of $y_1,\ldots,y_n$.
MATRIX VERSION:
$$
\begin{bmatrix} Y_1 \\  \vdots \\ Y_n \end{bmatrix} = \begin{bmatrix} 1 & X_1 \\  \vdots & \vdots \\ 1 & X_n \end{bmatrix} \begin{bmatrix} \beta_0 \\  \beta_1 \end{bmatrix} + \begin{bmatrix} \varepsilon_1 \\  \vdots \\  \varepsilon_n \end{bmatrix}
$$
$$
Y = M\beta + \varepsilon
$$
$$
\varepsilon \sim N_n( 0_n, \sigma^2 I_n)
$$
where $0_n\in\mathbb R^{n\times 1}$ and $I_n\in\mathbb R^{n\times n}$ is the identity matrix.  Consequently
$$
Y\sim N_n(M\beta,\sigma^2 I_n).
$$
One can show (and I show further down below) that
$$
\hat\beta = (M^\top M)^{-1}M^\top Y. \tag 1
$$
Therefore
$$
\hat\beta \sim N_2(\Big((M^\top M)^{-1}M^\top\Big) M\beta,\quad  (M^\top M)^{-1}M^\top\Big(\sigma^2 I_n\Big)M(M^\top M)^{-1})
$$
$$
= N_2( M\beta,\quad \sigma^2 (M^\top M)^{-1}).
$$
Here I have used the fact that when one multiplies a normally distributed column vector on the left by a constant (i.e. non-random) matrix, the expected value gets multiplied by the same matrix on the left and the variance gets multiplied on the left by that matrix and on the right by its transpose.
So how does one prove $(1)$?
"Least squares" means the vector $\hat Y$ of fitted values is the orthogonal projection of $Y$ onto the column space of $M$.  That projection is
$$
\hat Y = M(M^\top M)^{-1}M^\top Y. \tag 2
$$
To see that that is the orthogonal projection, consider two things: Suppose $Y$ were orthogonal to the column spacee of $M$.  Then the product $(2)$ must be $0$ since the product of the last two factors, ,$M^\top Y$, would be $0$.  The suppose $Y$ is actually in the column space of $M$.  Then $Y=M\gamma$ for some $\gamma\in \mathbb R^{2\times 1}$.  Put $M\gamma$ into $(2)$ and simplify and the product will be $M\gamma=Y$, so that vectors in the column space are mapped to themselves.
Now we have
$$
M\hat\beta=\hat Y = M(M^\top M)^{-1} M^\top Y. \tag 3
$$
If we could multiply both sides of $(3)$ on the left by an inverse of $M$, we'd get $(1)$.  But $M$ is not a square matrix and so has no inverse.  But $M$ is a matrix with linearly independent columns and therefore has a left inverse, and that does the job.  Its left inverse is
$$
(M^\top M)^{-1}M^\top.
$$
The left inverse is not unique, but this is the one that people use in this context.
Comment: I don't know the matrix form.Can you please explain it in another way
Answer: As a complement to the answer given by @MichaelHardy, substituting $Y = M\beta + \varepsilon$ (i.e., the regression model) in the expression of the least squares estimator may be helpful to see why the OLS estimator is normally distributed.
$$
\begin{eqnarray}
\begin{array}{l}
\hat\beta &=& (M^\top M)^{-1}M^\top \underbrace{Y}_{Y = M\beta + \varepsilon} \\
\hat\beta &=& (M^\top M)^{-1} (M^\top M)\beta + (M^\top M)^{-1}M^\top \varepsilon . \\
\end{array}
\end{eqnarray}
$$
$$
\hat\beta = \beta + (M^\top M)^{-1}M^\top \varepsilon . \tag 1
$$
$\beta$ is a constant vector (the true and unknown values of the parameters).
Also, under the assumptions of the classical linear regression model the regressor variables arranged by columns in $M$ are fixed (non-stochastic) and the error term $\varepsilon$ is distributed normally distributed with mean zero and variance $\sigma^2$, $\epsilon_t \sim NID(0, \sigma^2)$.
$\hat\beta$ is a linear function of a normally distributed variable and, hence, $\hat\beta$ is also normal. In particular, as mentioned in another answer, $\hat\beta \sim N(\beta, \sigma^2(M^\top M)^{-1})$, which is straightforward to check from equation (1):
$$
E(\hat\beta) = E\left( \beta + (M^\top M)^{-1}M^\top \varepsilon \right) =
\beta + (M^\top M)^{-1}M^\top \underbrace{E\left(\varepsilon \right)}_{0} = \beta
$$
$$
\begin{eqnarray}
\begin{array}{l}
\hbox{Var}(\hat\beta) &=& E\left( [\hat\beta - E(\hat\beta)] [\hat\beta - E(\hat\beta)]^\top\right) = E\left( (M^\top M)^{-1}M^\top \varepsilon\varepsilon^\top M(M^\top M)^{-1} \right) \\
&=& (M^\top M)^{-1}M^\top
\underbrace{E\left( \varepsilon\varepsilon^\top \right)}_{\sigma^2} M(M^\top M)^{-1} = \sigma^2 (M^\top M)^{-1} .
\end{array}
\end{eqnarray}
$$
The above calculations make use of the definition of the error term, $NID(0, \sigma^2)$, and the fact that the regressors $M$ are fixed values. The first result $\hat\beta=\beta$ implies that the OLS estimator is unbiased.


Integrating My Application with Powerpoint

Question: I have developed small basic gesture application using OpenCV. So is it possible to integrate my gesture application with MS Powerpoint or any other software like VLC.
Thanks.
Answer: It should be possible by creating some kind of driver for a virtual device which will broadcast events according to Your gestures, like "mouse scroll wheel up" or sth. You would need to dig in to MS api for this, and probably this would be a lot more work than Your gesture recognition app. On the other hand, might be some kind of software like this available already.


FreeBSD and DD a Blu-Ray Disk

Question: How do I mount a Blu-Ray Movie Disk in FreeBSD 10?  I don't need to decrypt the disk, I just need to access the data and copy it to an ISO files so I can transfer the image to another a windows computer to decrypt there with MakeMKV.
Comment: So, if I understand you correctly, you don't want to mount it, only to access the raw data of the disk.What have you tried so far? Maybe using `dd`, `ddrescue` or even `cat` to copy the data?
Answer: To create an image you do not generally need to mount the storage device. For example, to create an image using dd you would run:
dd if=/dev/cd0 of=file.iso bs=2048

which creates a file "file.iso" in the current directory. Note you will need access to the /dev/cd0 device to do this. As suggested by zuazo, there are other options (such as ddrescue) that will do the same thing.
If you do indeed want to mount the device, you should be able to do so with:
mount -t udf /dev/cd0 /mnt

assuming UDF format is being used.

FreeBSD and DD a Blu-Ray Disk


Viewport scaling is breaking when rotated back to portrait

Question: I am developing a mobile version of my website but I'm encountering some strange behaviour when rotating my device (iPhone). It looks and works fine when rotated to landscape orientation, but when rotated back to portrait, although the content adjusts, the viewport stays stuck at the landscape size. I have two login input fields that are set to 100% width on the page so that they are able to stretch to fit width on rotation:
input {
    clear: both;
    box-sizing: border-box;
    width: 100%;
    padding: 18px 10px;
}

These input elements seem to be part of the problem because when I change them to auto, the rotation behaves properly. Does anyone know how I can fix this behaviour, as well as keeping the form fields' fluid width intact?
FYI, The viewport is set as follows to allow for a fixed, scaled design:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

I have thoroughly looked on StackOverflow for a solution but none of the solutions in other posts work, whether it be changing the meta viewport attributes, using javascript or changing the media queries in CSS. Any help would be much appreciated.
Answer: Contain the inputs within a parent div and create a CSS rule of overflow: hidden; for the parent div.
See the fiddle I created below (on iPhone of course) and let me know if it works!
http://jsfiddle.net/g54pm/3/


JSLink get field with url

Question: I have a field in my list, which is a url (field type is single line of text), and in my JSLink, I want to retrieve this field to assign it as src for an image, but when I use CurrentItem.SrcUrl, it brings something like this: url, which is not the url that I need, I would just need the url value, what do I do in this case?
Comment: is it a custom column? did you map the property on your web part?
Comment: I don't have a web part, I am using JSLink to read the column, the column type is single line of text but contains a url, it's retrieved as <a href ... is there a way to get the url directly from this column?
Answer: If you have a SPFieldUrl called Foo then you should have a the url in CurrentItem['Foo'] and the description in CurrentItem['Foo.desc']

JSLink get field with url


how can i control my children's computer at the other room anonymously (with the same internet modem)?

Question: I have 2 computer with windows 10, but in different rooms with same  internet modem, my children use incognito mode to visit some undesired sites. **how can I control them anonymously and see their screen whenever I want? thank you for your answers.
Comment: More information needed: OS of the computers involved? FOSS? Commercial software OK?
Comment: Block the type of sites on router level. Lists for various types exist.
Answer: I dont know of any anonymous tools to look at the screens.  The normal tools will give a visual indication on the screen that it is being viewed.  But you can use the router to see what urls have been visited.  If your router does not support it, get a decent one, they are not that expensive.  I use Unify ones.
Here are some methods that I have used to mitigate it.

Install a keylogger, you can see the history of everything that they have typed.  This helps when they are typing on social media platforms as well.
If your router supports it, block the sites by type or urls
Use OpenDNS.  In the free mode you can use a category based filtering and a few specific urls.  You need to run a little IP address updater and set the DNS on the router or that PC to their IP address.  No one can then view those sites.  See Image-1
Use Raspberry Pi and run a PiHole.  You can add specific sites and download lists of urls that you can block.  You need to point the router's DNS to it (or just that PC's DNS).

The last two work by returning invalid urls for the domain names.
You can also install a decent anti-virus/malware program which will allow you to block urls.
Answer: You can disable incognito mode in chrome and Firefox. I use Firefox and there is an option to entirely disable incognito by changing the registry or using a json file as described here. This is fairly difficult for the children to bypass. But for the determined they can access using VPN even if you block at DNS level. The best option is to allow children to only use the system in the hall or where they have the fear of anyone watching them.
You can have a similar approach with Google chrome


Doubt in the proof of Ado's theorem

Question: I am currently going through a proof of Ado's theorem. I am stuck in one step.
Suppose $\mathfrak{g}$ is a solvable Lie algebra which is not nilpotent. Then one can show that there is an ideal $\mathfrak{a}$ of codimension 1 which contain $nil\mathfrak{g}$. Then we have a complementary vector subspace $\mathfrak{h}$ so that $\mathfrak{g}=\mathfrak{a} \oplus \mathfrak{h}$ as vector space. Then the nilradical $nil\mathfrak{g} = nil\mathfrak{a}$. Why is this true? Clearly, since $nil\mathfrak{g} \subset \mathfrak{a}$ we have $nil\mathfrak{g} \subset nil\mathfrak{a}$. How can I get the other inclusion?
Answer: The quotient ${\cal g}/nil(g)$ is a reductive algebra. Since ${\cal g}$ is solvable, this reductive algebra is commutative. This implies that every vector space which contains $nil({\cal g})$ is an ideal of ${\cal g}$. We deduce that $nil({\cal a})$ is a nilpotent ideal of ${\cal g}$ since $nil({\cal g})$ is the maximal nilpotent ideal of ${\cal g}$, we deduce that $nil({\cal a})\subset nil({\cal g})$.

Doubt in the proof of Ado's theorem