Where do our 4 macroscopic spacetime dimensions reside in multidimensional models of the universe?

Question: In models such as M-theory with 7 'higher dimensions' plus the 4 macroscopic spacetime dimensions, where do our 4 macroscopic spacetime dimensions reside ordinally? My reason for asking is TV shows such as the 'Fabric of the Cosmos' that alludes to 'lower' dimensions in string theory. I can understand if our 4 are, say the 7th, 8th, 9th and 10th so there are dimensions lower than us but that we cannot readily detect.
Comment: I am way out of may region of expertise here, but my first reaction is that this is equivalent to asking which of the three spacial dimension we live in is "first", which is ill-defined. They all come into the interval in either a space-like or a time-like way $(\Delta s)^2 = \sum_{i \in \text{spacelike}}(\Delta x_i)^2 - \sum_{j \in \text{timelike}}(c \Delta x_j)^2$ (or the other sign convention if you prefer, of course) so they are all equivalent.
Comment: @dmckee.  Aren't there specific mathematical definitions of (orthogonal) dimensions that tie dimensions N and N+1 together by things like projection?  So, some sort of ordering should be possible, no?  And in matrix math the spaces of "points, lines, plane" are based on tensors of 1st, 2nd and 3rd order  etc.
Comment: I think what dmckee is saying is that we can't really say that $x$ is the 1st ordinal dimension or 3rd ordinal dimensions when considering 3D only, how could we possibly say anything at higher dimensions?
Comment: @KyleKanos Thanks.  (I was a bit slow in the uptake, thanks dmkee.)  So is the answer that M-theory does not (and does not need to) place our macroscopic universe in a particular ordinal range of possible dimensions?
Comment: My pre-post search missed this [answer re compactification](http://physics.stackexchange.com/questions/83492/is-there-an-intuitive-way-of-thinking-about-the-extra-dimensions-in-m-theory?rq=1)  that looks useful
Answer: Think of a very thin wire. It is a 3-dimensional object, but for many purposes you can describe it just as a 1-dimensional line or curve. The two remaining dimensions are curled up in a tiny cross section.
In a similar way, the speculations (not the slightest experimental hint exists that it should be so) about our world possibly being higher dimensional rest on the assumption that the remaining dimensions of our world are curled up so that for most purposes, only four of them are observable to us. The diameter of the curled up part is thought to be of the order of the Planck length, a scale far below the best current spatial resolution:
http://en.wikipedia.org/wiki/Planck_length
Note that in string theory, the higher-dimensional universe has no boundary, so the wire is an imperfect lower-dimensional analogue. But the surface of an infinitely long wire has no boundary (though only one extra dimension - it is a 2-dimensional universe embedded in a 3-dimensional space) and is a correct 1+1-dimensional analogue of a 4+6 or 4+7 dimensional universe without boundary and with all but 4 dimensions compactified.
There is no ordering of the dimensions, just as the single dimension of the wire is not related to the x- y- and z-axis labeling three spatial dimensions.
Comment: Thanks.  Is there a reason for thinking the non-observable dimensions are below us?  I'm particularly thinking of the people of _Flatland_ who have no idea whats "above" them in 3D etc.
Comment: @PlaysDice: I would visualize it as they would be ''around'' us. But words are not really telling as our imagination of higher dimensions is poor. Thus it is up to the imagination of the author to choose a word such as ''below'', ''above'', or ''around''. Note that flatlanders have no way of distinguishing between ''below'' and ''above'', as these dimensions are not perceptible by them - what they perceive is symmetric in the third dimension.


Using an old home partition during installation

Question: I want to reinstall ubuntu but I don't have to do it without losing any data in home partition(encrypted). How do I do this?
Answer:
Keeping your /home partition untouched, reinstall ubuntu (This time no seperate /home partition and keep the same user name)
Use these guides to mount and remove remove encryption of your old encrypted /home partition

http://www.howtogeek.com/116297/how-to-recover-an-encrypted-home-directory-on-ubuntu/
How to disable encrypted home directory?

using chown and chmod, set the permissions and ownership correctly.
Set it as your new /home partition

For that type
sudo blkid

Locate the UUID of your old /home partition.
Edit the fstab
sudo nano /etc/fstab

Add the following text to the fstab file on a new line, replacing the xxxxxxxx portion with the full UUID of your old home partition
UUID=xxxxxxxx    /home     ext4     nodev,nosuid     0     2

Rename your current home to home_old and create an empty /home folder
cd / && sudo mv /home /home_old && sudo mkdir /home

Restart


Can't set target of android emulator to Google Api's

Question: I can make an emulator with Marshmallow. I can see the target (with Google APIs), but when I select that it defaults back to a similar setting but without the Google API's. Without it I get the message to update the google play service.
Settings I choose but shouldn't matter:
Phone, Nexus 5, 4,95", 1080x1920, xxhpdi.
Marshmallow, 23, x86, Android 6.0 (with Google APIs)
The goal is to get by the 'Update Google Play Service' message to test apps on an emulator.
Answer: When I create new target with Google APIs 23 using Android Studio —— AVD Manager,I meet the same trouble with you. So I turn off Android Studio,just open AVD Manager only,try to create target with Google APIs,I succeed.
 You can try another way to create new target,command line is a good choice,you can see the log to confirm where the problem is.
Answer: Open SDK Manager , and install Google APIs Intel x86 and google APIs if they re not installed


Web reference for WCF service

Question: I am consuming WCF service in my VS 2005 solution by adding as webreference.
Ex: Today my WCF url address is - http://'ip-001':/service
If tomorrow i deployed my service in ip-002 machine, in this case i have to add again the service reference by using the http://'ip-002':/service
                   or
i have to change only config file.
Note: no service changes has made from ip-001 to ip-002.
Let me know without any service changes only url is changes in this case i have to change only config will it work?
Answer: as long as you don;t have security turned on this should be fine just changing the address. If you have security enabled then there are two issues to be aware of
If they are using SSL then you need to make sure that the certificate authority they are using   is trusted on the client machine
If the client is identifying the remote machine by DNS then if you want to support more than one remote mahcine you have to switch to somethinglike certificate reference
Answer: in this case only changing the config will work.
The add web reference just contacts the meta data exchange endpoint and downloads the wsdl, which it then uses to generate the client side code to comply with the contract.  you don't need to do this, you could hand craft the correct client side code, or share libraries with the server to have the same client side code.
Once you have this the client and server communicate with soap messages generated from that code.  It is these soap messages that are important.  As long as the server recieves correctly constructed messages and the client correctly decodes the messages from the server everything will work.  The fact that it is now hosted on another server is moot.
Remember your service could be called by a client which is not .net based, so all that client side code  could be generated in a different language, or the messages could be sent by someone manipulating the bits with magnets

Web reference for WCF service


I'm not getting cube of the number

Question: while [ "$c" = y -o "$c" = Y -o -z $c ]
do
  echo enter a number;
  read n;
    if [ $n -ge 0 -a $n -le 50 ];then
      echo "cube= `expr $n * $n * $n`";
    fi;
  echo y to continue  or any to exit;
  read c;
done

Comment: To ask a better question, you should describe (or better, show) what actually happens, and describe how that differs from what you *want* to happen.
Answer: You've got a few problems with your shell script. First, you should quote $c in the while (all of them — you missed the last one). Otherwise, when $c is empty (say, at the start of your program), the -z test gets passed nothing instead of the empty string, giving an error (something along the lines of "argument expected").
Second, you need to escape the * in your expr command. Otherwise it's trying to do a glob (match filenames), just like cat * would do. Easiest is to escape it to \*. The error from that will depend on exactly what the * happens to expand to (i.e., which files are in your current directory), but will probably be something confusing!
That should at least get your script to run.
PS: There are a bunch more ways this could be improved, you might want to check out ShellCheck for some (automated) suggestions.
Answer: In bash, you could write:
PS3="Continue? "
while true; do

    read -p "Enter a number: " n
    ((0 <= n && n <= 50)) && echo "cube = $((n * n * n))"

    select ans in yes no; do
        case $ans in
            yes) break ;;
            no) break 2 ;;
        esac
    done
done

I'm not getting cube of the number


What is the power plug in the photo called?

Question: Is the plug shown in the photo, which looks like IEC 320 but with angular tips, standard? If so what is it called?
Comment: chances are that this is a proprietary backpanel connector, considering this looks like a server PSU. Manufacturer and type of device we're looking at?
Comment: It is vaguely but not really like China or New Zealand or Australia's plug.  For a start, its intended for a line cord not a direct wall socket connection.
Comment: It's not a standard type. See [IEC 60320](https://en.wikipedia.org/wiki/IEC_60320).
Comment: Is this from china?  it looks like a Type-I connection (used in china and australia) but within a standard IEC body
Comment: I'm guessing its a proprietary connector, because its intended for 277V AC which is beyond what most equipment would expect.  So its HP being "safe" while charging a lot for the item.
Answer: Apparently, there are HP server power supplies that have a non-standard connection.
They are found on ParallelMiner as KT-1200-200V-1 for example.

We use a custom 12inch power cord to bypass the proprietary AC plug

Behold the custom cable:

It's just a cable with quick-connects.

Apparently this is the 277VAC version of the power supply:
HP 1200W Common Slot 277VAC Hot Plug Power Supply Kit (717359-B21).
The plug and socket are called LS-25 and LS-26. (an adapter is sold by stuartconnections)
HP also sells adapter TK801A and TK802A.

(source)
Comment: I could see that coming. +1
Comment: @Andyaka Click "parallelminer" link in his answer. Basically HP seems to want $$$ for their custom connector, so everyone uses spade lug quick connects instead. Safety is our number one priority!
Comment: @Andyaka It's also the wrong gender. You're supposed to use the loose quick connects on the non-standard plug.
Comment: Not wrong gender - the other end is connected to a standard IEC cable it seems. What I *hate* about the makeshift cable shown is that the PE seems not substantially *longer*. BTW, that might not just be a cash grab - the standard C13/C14 system has a horrible tendency to be intermittent and too easily pulled/yanked out by accident, not at all fun around servers - and might also be out of ampacity if 1200W if there is an identical 110V version. Why ever they did not use C19/C20, though...
Comment: I don't see diagonal blades on your picture nor in the link. Can you explain how this answers the question?
Answer: If you take a look at IEC World Plugs, it does look similar to an IEC Type I male connector, however, one of the blades is rotated 90 degrees.

My guess is that it is a proprietary connector to avoid the possibiility of connecting the supply without a cable from the manufacturer.
Comment: this design has to be changed for esthetic reasons. it triggers the facial expression recognition circuits in my brain and makes me depressed.
Comment: Now that you mention it, I see it as well.  It's is a truly sad design for an electric outlet :-) .
Comment: And that image is identical arrangement to an Australia/New Zealand power connector.   And the same as China although rotated 180 degrees.
Answer: The male inlet on the power supply is a LS-25. It accepts a power cord with a LS-26 connector/outlet.


Relationship between thermal conductivity and reaching the steady temperature

Question: The diagram is for three materials with 3 different thermal conductivities, i think the material with higher thermal conductivity is the number 1 because it transfers the heat much better so it gets to the steady temperature sooner than the other two,am i correct? If not or if my reason isn't correct , i appreciate your helps.
Answer: This must represent the average temperature, or the temperature at some specific location within the body (since the temperature will be a function of spatial location and time).  Just ask yourself what the curve would look like if the thermal conductivity of the material were zero.  This should give you your answer.
Comment: If k=0 then there is no heat transfer ,so the temperature remains constant and it wont reach that avg temperature,right? So the material with highest conductivity reaches that temperature faster?
Comment: Sure.  This is how you can  "bound the answer" to address your question.


Animate circle using Javascript and HTML5 Canvas

Question: Animate circle using Javascript and HTML5 Canvas. The circle will be drawn at the center of the canvas. The initial radius will be 0 and will keep on increasing till 100 and then decrease till 0 and this cycle will keep repeating.

var cnvs = document.createElement("CANVAS");

cnvs.width = (3 * window.innerWidth)/4;
cnvs.height = (3 * window.innerHeight)/4;

cnvs.style.border = "2px solid black";
cnvs.style.position = "absolute";
cnvs.style.top = "50%";
cnvs.style.left = "50%";
cnvs.style.transform = "translate(-50%, -50%)";

document.body.appendChild(cnvs);

var inc = 1;
var dec = 0;
var inc_dec = inc;
var x_center = cnvs.width/2;
var y_center = cnvs.height/2;
var min_radius = 0;
var max_radius = 100;
var radius = min_radius;

var ctx = cnvs.getContext("2d");

setInterval(animate_circle, 10);

function animate_circle() {

    if (inc_dec == inc) {
        radius = radius + 1;
    } else {
        radius = radius - 1;
    }

    ctx.beginPath();
    ctx.clearRect(0, 0, cnvs.width, cnvs.height);
    ctx.closePath();

    ctx.beginPath();
    ctx.arc(x_center, y_center, radius, 0, 2 * Math.PI);
    ctx.fillStyle = "green";
    ctx.closePath();
    ctx.fill();

    if (radius == max_radius) {
        inc_dec = dec;
    } else if (radius == min_radius) {
        inc_dec = inc;
    }

} // end of animate_circle
<!doctype html>

        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Animate Circle</title>

Answer: setInterval will execute the callback no sooner then 10ms after the call. It doesnt mean it will trigger in 10ms exactly. This makes it possible for the animation to appear not smooth - slower at one time and faster at another time - not that i can see the effect now. Or the overall the animation may get slower then anticipated.
But it would be better, instead of modify the radius by +/-1 on every call. To create a getRadius(t,t0) function which will compute the current radius based on start of animation (t0) and current time (t). It would be much more preditactable if you could say radius is zero at t=t0, 100 at t=t0+1000, and zero again at t=t0+2000 ...
EDIT: as KIKO Software pointed out in comments, you can use
Window.requestAnimationFrame() function (https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) to avoid having to decide whether 10ms is the right interval and instead let your browser rendering engine decide the right interval.
This is a great suggestion and would be really shame if it was lost when comments are cleaned up.
Comment: You could even use [Window.requestAnimationFrame()](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) to sync with the display refresh rate.
Answer: Style

In JavaScript we use camelCase rather than snake_case

window is the default or globalThis. You don't use it to access window.document, so why use it for window.innerWidth

Variables that do not change should be constants const. eg const ctx = canvas.getContext("2d");

Always use === (Strict equality) rather than == (Equality) Same for !== (Strict inequality) rather than != (Inequality)

Design points

You can use Object.assign to assign properties to any object including elements and the element's style

You don't need the ctx.beginPath call before you clear the canvas.
Same with ctx.closePath
BTW closePath is not  related to beginPath. Close path creates a path (line) from the last pointed added to the start of the current path.
For a 360 (2 PI) ctx.arc the closePath call does nothing apart from use up CPU cycles..

(ctx) refers CanvasRenderingContext2D
Animation
setInterval is a dangerous, unreliable, useless excuse for a memory leak. It really should be removed from the language, but its too late we can't break the web can we :(. Don't use it... ever!
Case in point. As you have used it setInterval(animate_circle, 10); you have assigned memory and CPU time that can not be removed as you neglected to store the interval's handle.
The only way to stop the interval and free up the closure it holds is to

Refresh the page
Or try to guess the handle for it.

rAF
To time animations use window.requestAnimationFrame to ensure that the animation is in sync with the display hardware and behaves in a predictable way in regards to power, resource consumption, and presentation.
Example Rewrite
I Have completely rewritten your code.
Key points.

Use rAF to time animation frames.

Use a CSS rule to style the canvas.

Defined an object to hold the circles state.

Use a function to render circles if given a circle like object.(Any object with the properties, x, y, r).
Also used functions to separate the code into clear and distinct behaviors/roles.

Linked the animation to the time as given by the rAF callback. Same as performance.now (time since page load).
Note that I store the time of the first frame of the animation to make sure the animation starts when the page can render the animation. (eg if the page loads and the page is not visible the animation will start when it becomes visible)

Created utility functions to move common code (cyclic waveform and unit scale) out of the main loop

Use constants for any value that does not need to change.

Put all the code inside a single self evoking function to keep the global scope clean and code state safe from 3rd party content.

Used strict mode as part of a good habit and to ensure code runs at optimal speed.

;(()=>{
"use strict";
requestAnimationFrame(mainLoop);  // will only start when all code below is ready
const TAU = Math.PI * 2;
const unitScale = (min, max, u) => (max - min) * u + min;
/* waveform sawtooth wave freq 1 amp 0.5 (dc)offset 0.5 min val 0 max val 1 */
const sawtooth = u => (u %= 1, (u < 0.5 ? u : (1 - u))  * 2);
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
Object.assign(canvas, {width: innerWidth - 40, height: innerHeight - 40});
document.body.appendChild(canvas);
var startTime;
const minSize = Math.min(canvas.width, canvas.height);

const circle = {  // all coords and sizes in pixels.
    x: canvas.width * 0.5,
    y: canvas.height * 0.5,
    time: 1,    // in seconds.
    min: minSize * 0.5 * 0.1,
    max: minSize * 0.5 * 0.9,
    r: 0,
    col: "black", // CSS color value
};

function drawCircle(circle) {
    ctx.fillStyle = circle.col ?? ctx.fillStyle;
    ctx.beginPath();
    ctx.arc(circle.x, circle.y, circle.r, 0, TAU);
    ctx.fill();
}
function updateAnimation(time) {
    ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
    circle.r = unitScale(
        circle.min, circle.max, sawtooth(time / (circle.time * 1000))
    );
    drawCircle(circle);
}

function mainLoop(time) {
    startTime = startTime ?? time;
    updateAnimation(time - startTime);
    requestAnimationFrame(mainLoop);
}
})();
canvas {
  border: 2px solid black;
  position: absolute;
  top: 0px;
  left: 0px;
}


According to System Information I have one processor and 2 cores, but when I open the 'CPU-usage' window in Activity Monitor I see 4 graphs

Question: What does this 4 graphs mean and how are they related to my 2 cores?
I have a MacBook Pro (13 inch medio 2012?
Comment: can you add an image ?
Answer: You have a multi-threaded CPU. Your computer has one processor, with two physical cores, and two virtual threads on each core. So to the computer it sees four cores/threads available. This makes it easier for load balancing and sharing of the CPU between processes. See this Wikipedia article.
Comment: I'm using macports, but I changed its preferences to so it can execute 2 jobs (commands) at the time because I have two cores (http://stackoverflow.com/questions/1352419/why-does-macports-take-forever-to-build-simple-packages)
Can i upgrade this to 4 then?
Comment: Yes you could, however your jump from two to four will not be as impressive as your jump from one to two. Since you have four threads/two cores it offers a performance improvement, but not as much as having four separate cores. Also the rest of your system may slow down as all threads will be busy while you're using MacPorts, but MacPorts will finish sooner, so it's a trade off in either direction.


Two network connections are available to Windows 7 -- which will it use?

Question: I'm currently connected to my router both via a wired and wireless link. I have two IP addresses, one for each interface. Both point to the same gateway (my router). I'm curious, which one is Windows 7 actually using to access the Internet? How would I find out? What rules does Windows use to determine the connection to use? Does the fact that one is wired and another is wireless come into play (ie will Windows prefer wired over wireless)? I'm hoping to get a comprehensive answer on the rules Windows 7 uses to select which IP interface to use, and how to determine which is actively in use.
Comment: Note that which adapter's IP address is used, which adapter packets are sent on, and which adapter packets are received on are actually three different questions that can have different answers.
Comment: This is an interesting subject as i have wondered it myself.. it does seem to like wireless more than LAN.. and find it annoying when i disconnect WIFI during copy with LAN plugged it... it fails.. This does not happen on LINUX though.. thanks winblows...
Answer: This is actually a very simple answer. Go to your Network and Sharing Center
Click on the Change Adapter Settings

Press the ALT key to bring up your menus. Under Advanced, select Advanced Settings.

Here you will see the list of your adapters and be able to select the order in which you wish them to connect.

Sorry for the horrible color/monochromes. I had to use a remote login which will sometimes turn the screen monochrome. I think you get the picture though.


Atiyah Bott localisation applied to Euler characteristic

Question: Suppose we have a torus action on a compact oriented manifold M. Assume the action has isolated fixed points. Why is it that the equivariant Euler class of the normal bundle at the fixed point (i.e. the tangent space at that point) is (upto a sign) the product of the weights of the action of the lie algebra of the Torus on the tangent space at that point? (Maybe this is obvious but I don't see it).
Answer: Let me answer the question, under a different interpretation of the word "why".
First, what is the cohomology product [X] [Y] about, where X,Y are cycles and
[X],[Y] their Poincar\'e duals? You could say it measures the inability to
extricate X from Y.
Now, let's try to extricate the origin from itself, where [pt] denotes the class of the origin in a vector space V. Pretty easy (if dim V > 0). So we'd say [pt]^2 = 0.
Equivariantly, though, we may have trouble; there may be no nearby T-fixed points. This is exactly the question of whether there are any 0 weights in the action of T on V.
So [pt]^2 should be some multiple of [pt], that vanishes iff there's a 0 weight. Moreover it should be homogeneous of degree = codim(pt in V). Plus it should behave well under shrinking T. These come pretty close to forcing it to be the product of the weights.
Comment: This is very nice. Can this reasoning be extended to a complete proof?
Answer: I'm interpreting your question as "In what sense is the equivariant Euler class of a torus representation, thought of as a vector bundle on the point, just the product of the weights of the representation?" Because Euler classes multiply under direct sum, it's enough to answer this question for a 1-d representation.
Now, it's a general principle that if a space is nice in some sense, there will be a bijections between complex line bundles on that space and $H^2(X;\mathbb{Z})$ via first Chern class.  One way to think of this correspondence is that a line bundle is defined by an element of $H^1(X;\mathcal{O}^*)$ where $\mathcal{O}^*$ is the nonvanishing elements of whatever sheaf of functions is relevant.  As long as the sheaf cohomology of $\mathcal{O}$ is boring, the boundary map in the long exact sequence for the exponential sequence $\mathbb{Z}\to \mathcal{O}\to\mathcal{O}^*$ induces this isomorphism.
So, now what does this mean equivariantly?  Well, remember that equivariant cohomology is the cohomology of a space.  In the case of a point, it is the cohomology of the classifying space $BT$.
On the other hand, a line bundle on $BT$ is the same thing as a 1-dimensional representation of $T$; you use the standard associated bundle construction.
So, by the argument above, we get an identification between characters of $T$ and $H^2_T(pt;\mathbb{Z})$.  This is being used implicitly when you make a statement like "the equivariant Euler class of the normal bundle at the fixed point (i.e. the tangent space at that point) is (upto a sign) the product of the weights of the action of the lie algebra of the Torus on the tangent space at that point," but having fixed this isomorphism, the statement above becomes tautological.
Answer: So you are saying that, we need to compute the equivariant Euler class of a complex line bundle over a point and since the equivariant first chern class is the same as this, the exponential sheaf sequence will help us. But, I am a little confused about this equivariant chern class business. I mean, I would be most grateful if you can make the correspondence between the characters of T and H^2 (pt) a little more explicit.
Comment: If you can edit your original question, perhaps it might be better to move the text of this comment into the main body of the question
Comment: For some reason I can't seem to edit it.
Comment: It might be because you have "insufficient reputation" on the system. I'll copy and paste it in for you, if that's all right.
Comment: Insufficient reputation isn't the problem; an asker can always comment on his or her questions, and on answers to his or her questions.  The problem is that MO doesn't recognize the user who posted this answer (3688) as the same user who posted the question (3686).  It might help if you register; you could ask a moderator.
Comment: I merged all the Vamsi's.
Answer: Hi, perhaps this can make more explicit the correspondence above:
Let $G$ be a $\ell$-dimensional algebraic torus. Denote by $\Xi(G)\simeq \mathbb Z^\ell$ the character group of $G$ consisting of all continuous group homomorphisms $G\to \mathbb C^*$. Take any $\chi \in \Xi(G)$, it defines a one-dimensional complex representation of $G$ with space $\mathbb C_\chi$. We can associate a complex line bundle $L_\chi$ over $\mathbb B_G$ by:
$
L_\chi
:=
(\mathbb E_G \times_G \mathbb C_\chi)
\to
\mathbb B_G.
$
Denote by $c(\chi):= c_1(L_\chi)\in H^2(\mathbb B_G)$ its first Chern class. Let $\operatorname{Sym}_\mathbb Z^*(\Xi_G)$ be the symmetric algebra of the group $\Xi(G)$. It is a polynomial ring on $\ell$ generators of degree $1$, and the map $c\colon \chi\mapsto c(\chi)$ extends to a ring isomorphism:
$
c\colon
\operatorname{Sym}_\mathbb Z^*(\Xi_G)
\stackrel{\sim}\to
H^*(\mathbb B_G)
$
which doubles degrees. It is called the characteristic homomorphism.
Now, at an isolated fixed point under the action with characters $\chi_1,\dots, \chi_n$ one has:
$(\mathbb E_G \times_G T_X) = L_{\chi_1}\oplus\dots\oplus L_{\chi_n}.$
The equivariant euler class is just the top ordinary Chern class $c_{\operatorname{top}} (\mathbb E_G \times_G T_X)$, and you can conclude by Whitney sum formula.


Testing database performance tools?

Question: What do you know the best tool to testing database performance? I'm looking for a tool which help me find weak performance places in my db during use application.
Comment: Please clarify your question. Which server?. DB perf in general or your app specific?.
Comment: I've had in mind MS SQL Server 2012.
Answer: There are at least two not obvious tools that can help you:

SoapUI has support for JDBC
JMeter has a JDBC sampler (don't miss these wonderful plugins!)

I said these tools are not obviouse because they are typically used for different targets (SOAP web services functional testing and HTTP accordingly). JMeter seems to be a bit better suited as it aimes for performance testing, but SoapUI can do this as well.
Answer: I'd just use SQL Server Profiler to capture a database-side trace, and then just sort by duration.
I do stuff like this 5 times a day.
Hope that helps
-Aaron MCITP: DBA
Answer: You could use a source code level profiler to profile the application, which accesses your database. Profilers can identify the slowest lines of code. Most profilers can filter their results by namespace or special naming patterns, so could could filter out all non-database access code. You can then have a look which database queries are made on these slow lines.
In some database systems you can set up logging to log which queries where run and how long they took. Database monitoring applications can show you which queries are running at the moment, so you can identify the slowest/most often executed queries very easy. If this is no option you can log the queries you are doing in your app into a text file and then run them manually against the database, usually the time taken is displayed to the user.
A good feature to optimize database queries is the EXPLAIN command supported by many DBMS.
If you told us which database exactly you are running we could help more.
Comment: I'm running MS SQL Server (I used SQL Server Profiler and Tuning Advisor to analyze the performance), but Oracle interesting me too.

Testing database performance tools?


How best to monitor power draw on a "dumb" PDU

Question: I'm working on an initiative to replace some PDUs in my company's datacenter with Smart PDUs, however it will be a few weeks before the new units are in. In the meantime, we've got to rack two new appliances and we're slightly concerned about the power draw in the rack's PDUs. We want to stay under 80% of our 30 amp capacity, unfortunately until we get smarter PDUs we don't have a way of checking power draw in real time.
I've been looking into using an ammeter or multimeter (the latter of which I have on hand) to measure the circuit from the breaker itself, but this is less than optimal due to where the breaker is and how it's positioned. My main question for the more electrically-inclined out there would be, is there a device available that would allow one to plug into a PDU and return usage data? I may just be showing my ignorance here but such a device/method would be ideal.
Thanks in advance for your time and assistance.
Answer: One possible solution is to use current clamps. This will help you to measure the current w/o breaking the power circuit. The only disadvantage is you should have one wire alone to use the clamp, you can't use it on the power cord (check here, page 21).
P.S. No affiliate with the device manufacturer.


I want to install a motion sensor for the stairwell

Question: Stairwell has a switch at top and bottom with no line of sight between them.  Can I use two motion sensors?  It looks like what I found are single pole and can be used with one 3 way switch but not two motion sensors?
Comment: Can you post photos of the wiring inside both switch boxes please?
Answer: Need some more info:
What are you trying to do? I mean, if you want the 3-ways to control on and off as they do now, and have the motions apply lights regardless of the 3-ways being on or off.
Can you add wiring, or are you intending to try and do this using only existing boxes and wiring?
There are probably several configurations of function possible.
Also, I know the code requires ability to turn lights on from any access/entry point in a stairwell; as far as I know it does not require ability to keep it off...
(so combining 3-way control and motion control is ok AFAIK)
[I do not know this for sure].
What I assume that you want to do, would require at least one additional conductor, and probably 2, possibly 3, depending on existing wire routing, and if 2 or 3 wire motion sensors. (and require 2 motion detectors, standard kind - single pole).
Frankly, I did not understand your sensor that can use one 3-way; a 3-way would not function alone.  I would need details on that to understand what it is, or does.
{there are code implications, depending on what that actually does, or if it has a manual 3-way function incorporated).
Mr K L
OOPS, I'm new here.  I should have posted this as a 'comment', as it is not an 'answer' yet...
I will try to move it.
-- Huh, I can't move it until I have '50' reputation; but it lets me post incomplete 'answers'; oh well...
Comment: Don't worry, we do understand the situation you're in -- it does take a bit of patience and practice to get the hang of things around here, and a lot of questions we run into aren't the greatest for such
Comment: Yes, like the recent question of how to fix a two dollar spray bottle that don't squirt anymore. LOL


Marginal probability in Gaussian Process

Question: Let $\mathbf{a} \sim \mathcal{GP}(\mathbf{m},\mathbf{C})$ where $\mathbf{a} \in \mathbb{R}^T$ is modeled as Gaussian process with mean $\mathbf{m} \in \mathbb{R}^T$ and prior covariance $\mathbf{C} \in \mathbb{R}^{T \times T}$. Then the marginal probability of $a_t$ being non-zero can be written as
\begin{align*}
p(a_t > 0) = \phi(m_t/\sqrt{C_{t,t}})
\end{align*}
where $\phi$ is normal cummulative distribution function. Now $\mathbf{a}$ is not a one dimension object, but a 2 dimensional object $\mathbf{A} \sim \mathcal{GP}(\mathbf{M},\mathbf{C}_1 \otimes \mathbf{C}_2) $ where $\mathbf{M} \in \mathbb{R}^{T \times K}$ and prior covariances $\mathbf{C}_1 \in \mathbb{R}^{T \times T}$ and $\mathbf{C}_2 \in \mathbb{R}^{K \times K}$. In this case, how do I calculate the marginal probability of $a_{t,k} > 0$. For one dimension, I can marginalize by just dropping the irrelvant variables, but is it true for more than one variable?
Comment: In the question as written, $T$ can be any set equipped with a kernel. So $T$ can be replaced by $T \times K$ and the kernel value at $(t,\,t)$ be replaced by the value of the tensor product kernel  at $([t, \,k], \, [t, \,k])$.
Answer: Yes, by definition a random variable is Gaussian if and only if all linear functionals are normally distributed. With $e_t$ the $t$th standard Euclidean basis vector, we have $a_{t,k}=e_t'Ae_k=tr(Ae_ke_t')=\langle A, e_ke_t'\rangle$, i.e., $a_{t,k}$ is a linear functional of $A$ and is hence normally distributed. Its mean and variance are $\langle M, e_k e_t'\rangle=e_t'Me_k=m_{t,k}$, and variance computed analogously but more tediously as $(C_1\otimes C_2)_{(t,k),(t,k)}=(C_1)_{t,t}(C_2)_{k,k}$.
We therefore have
\begin{align*}
    p(a_{t,k} > 0) = \phi\Big(m_{t,k}\Big/\sqrt{(C_1)_{t,t}(C_2)_{k,k}}\Big)
\end{align*}
As Yves remarks, the kernels may be defined over much more general spaces than Euclidean ones.
Answer: Maybe this is not the answer you were looking for but if we assume that $\mathbf{a}$ is i.i.d and that $p(\mathbf{a}(t) > 0\vert t_{0}) = \phi(m_{t}\,C_{t,t}^{-\frac{1}{2}})$ then for each $\mathbf{a}\in\mathbf{A}$ that should be $\prod_{\mathbf{a}\in\mathbf{A}} \phi_{\mathbf{a}}(m_{t}\,C_{t,t}^{-\frac{1}{2}})$ if I'm not mistaken.


Why are imines more susceptible to reduction than carbonyl compounds?

Question: Why are imines more susceptible to reduction than carbonyl compounds? Imines react with $\ce{NaCNBH3}$ while the carbonyls don't.
Answer: Generally speaking, I think it is the reverse - carbonyls are reduced faster than imines with various sources of $\ce{H^-}$.  The reason usually cited (see pages 2-4 of this reference) for this behavior is that the imine double bond is less polarized than the carbonyl double bond.  In the figure below resonance structure II contributes less when X=N as compared to the case X=O, due to the decreased electronegativity of nitrogen compared to oxygen.

However, if the reaction is run under mildly acidic conditions, since the imine nitrogen is more basic than the carbonyl oxygen, more of the imine nitrogen will be protonated than the carbonyl oxygen.  This will make the protonated imine carbon much more electrophilic (positively polarized).  Consequently, under acidic conditions, an imine may be more reactive than a carbonyl to nucleophilic reduction (in addition to the above reference, also see this reference).
Comment: @OscarLanzi Yes, take a look at the last reference (section 188.8.131.52)  in my answer.  They mention use of $\ce{NaBH3CN}$ and $\ce{NaBH4}$ \ $\ce{RCO2H}$ under mildly acidic conditions.
Comment: Oh, it's because imines are protonated in a bigger amount. Thank you.
Comment: You mention "acidic conditions".  But can there be hydride sources (that do not break down to H2) under acidic conditions?
Answer: under acidic conditions, imines can be activated in a similar way to carbonyl compounds. Furthermore, since the imines nirogen is more basic than the carbonyl carbon, the equilibrium lies further towards species than it does i the corresponding carbonyl series. iminium ions are excellent electrophiles and reactive intermediates in synthesis.


Hubble Law in General Relativity

Question: I am trying to understand a little general relativity using the book "Spacetime and geometry An introduction to general relativity" by Sean Carroll. I finished my Masters Degree in physics 10 years ago, but I am no expert. I (think I) understand that you can't put up a global inertial coordinatsystem and talk about relative velocity in curved spacetime. On page 345-346 of the book he derives the Hubble law. He says that for small distances we can use the instantanious distance given by the scalefactor times the comoving coordinate. If you differentiate that you get the Hubble law. I understand that the Hubble law is only valid for small distances in a curved spacetime. But we think that space is flat. My question is then if the Hubble law then still is only valid for small distances?
Answer: As far as I understand, "instantaneous" distance here means just proper distance, and the Hubble law v = H(t)*D(t), where v is recession velocity and D is the proper distance, holds for any universe (curved or flat) and for all distances. The problem is that proper distance is not measurable, so other definitions are used (e.g., luminosity distance, angular distance), which behave differently with increasing redshift, but are all close to each other at low redshifts (~<0.8). I suggest reading this paper, in particular, Appendix A.
Answer: Given the scale factor $a(t)$, the proper distance $D(t)$ for objects following the Hubble flow evolves according to
$$
\frac{D(t+\Delta t)}{D(t)} = \frac{a(t+\Delta t)}{a(t)}
$$
It follows that
$$
v_r(t) = \dot D(t) = \frac{\dot a(t)}{a(t)} D(t) \equiv H(t)\, D(t)
$$
That's valid for all times and at all distances, but of course only instantaneously at a given cosmological time.
If $H$ varies slowly compared to the time scales involved, we may use the approximation
$$
v_r \approx H_0 D
$$
but in principle, we need to take into account the variation of $H$ between emission and absorption of any specific signal.
Also note that while observation indicates that space (ie the homogeneous spatial slices at constant cosmological time) is approximately flat, spacetime is still curved.

Hubble Law in General Relativity


How to do a factory-reset on an AVR micro-controller?

Question: I'm programming an ATmega32 chip, and have set some bits as 1 in some DDRs and PORTs. In case I forget what bits I had set to 1, is there a way to set all the register bits to a value(1 or 0) that was present in the registers when I had bought the chip. I mean I want to do a factory reset of the micro-controller. Is it possible to do it in program or AVRDUDE with USBasp or any other means that doesn't require me to buy additional hardware?
Comment: Every time the microcontroller gets reset, the PORT and DDR configuration registers also get reset to their default values. Unless you're talking about the fuses, there's nothing special you need to do.
Comment: To be clear, a consumer device when "factory defaulted" reloads some baseline configuration.  A chip that is "erased" is *totally blank* however.  If you're changing the code to change bits, just keep an initial copy of the code, and write *that* to "factory default" it.
Comment: You may not be able to remove the bootloader built in . You can just reset it and reprogram the pins by doing a user created boot loader. That may be enough.
Comment: @AmitM It is possible to reprogram (or erase) the bootloader with a separate programmer. I believe USBasp can do it too
Comment: @rdtsc, not sure '*baseline configuration*' is being clear if you're a newcomer to all this... :-)
Comment: Eugene Sh, yes, a separate programmer is needed.
Answer: The data sheet shows for each register its initial value. A power cycle is enough to reset all concerned registers to these values. Note that a valid pulse at the reset pin or a watchdog reset do the same, for more possibilities see the data sheet.
The values you write into registers like DDRx and PORTx are as volatile as values stored in any RAM cell. Simply write the initial values into the registers, as you like.
You cannot forget what you stored there, because you can read these registers. And since you are the developer of your program, you should know what you wrote into them.
Answer: You don't need to do anything. You don't need to do a factory reset for getting default register values.
You seem to think that somehow the MCU remembers what is written to registers like PORTD or DDRD and writes are stored permanently.
They are not. The register values are not retained between resets and powerdowns.
Just write a new program and write it to flash for running it.


Creating SHA256 constant values on the fly without memory usuage

Question: Is it possible to create the constants used in SHA256 on the fly? Meaning I dont have to reserve 64 32-bit words of space? It would result in a slower implementation, but at the profit of using less memory. I know it is possible to do it with AES Sboxes, but how about the SHA256 constants?
Answer: If you look at the specification to understand how those constants were chosen, you'll realize you waste more memory generating them "on the fly".
SHA-256 compression function key schedule constants are calculated as the fraction part of cubic-root of the first 64 prime numbers. You said you coud delete them after use (in the comment), but wouldn't that overlap with DRAM allocated for message buffer or something else? If you need a memory-compact implementation, this would be an anti-optimization.
If you desire a hash function without large memory footprint, you could consider SHA-3/Keccak, it too has some constants, but generating them "on the fly" requires only few additional registers to hold values from a LSFR.
Comment: Does generating them on the fly reserve more memory, or just dynamic memory? By memory I mean, stuff you have to save no matter what, which will be the minimal assumption of memory you have. If you use more RAM to generate the constants and then delete them, thats okay, what I mean by memory is the static memory.
Comment: @alice03 See updated answer.


Solving simple trigonometrical equations for multiple solutions

Question: I have to find all angles between $0^o$ and $360^o$ inclusive which satisfy the equation
$$4\,sin(y)\,cos(y)=tan(y)$$
Here is what I did $$\require{cancel}\begin{align}4\,\cancel{sin(y)}\,cos(y)&=\frac {\cancel{sin(y)}}{cos(y)}\\
4\,cos^2(y)&=1\\
\sqrt{cos^2(y)}&=\sqrt{\frac14}\\
cos(y)&=\pm \frac12\\
y&=60,\,120,\,240,\,300
\end{align}$$
The problem is, that the answer also includes $y=0,\,180,\,360$. How?
Answer: Hint
$$(ab=ac\iff b=c)\iff a\ne0$$
Answer: When you cancel the $(\sin y)$'s, what you're really doing is dividing both sides by $\sin y$. But what if $\sin y = 0$? Then you just performed an illegal operation. You'll need to treat that as a separate case.
Instead, it's a lot cleaner to solve it by bringing everything to one side and then factoring:
\begin{align*}
4\sin y \cos y &= \frac{\sin y}{\cos y} \\
4\sin y \cos y - \frac{\sin y}{\cos y} &= 0 \\
4\sin y \cos^2 y - \sin y &= 0 \\
(\sin y)(4\cos^2 y - 1) &= 0 \\
(\sin y)(2\cos y + 1)(2\cos y - 1) &= 0
\end{align*}
This yields three cases:
$$
\begin{cases}
\sin y = 0 &\implies& y = 0^\circ, 180^\circ, 360^\circ \\
2\cos y + 1 = 0 \implies \cos y = \frac{-1}{2} &\implies& y = 120^\circ, 240^\circ \\
2\cos y - 1 = 0 \implies \cos y = \frac{1}{2} &\implies& y = 60^\circ, 300^\circ \\
\end{cases}
$$
Answer: You are dividing the equation by $siny$ wich is forbidden if $siny=0$. Therefore you have to consider this case separately.
Answer: Hint: Let's try to solve $$x^2=x$$
$$x^2=x \implies x=1$$
We missed the solution $0$ why ? with same reason as in your solution.


From post-assessment to interview in a faculty recruitment in Denmark

Question: I have heard about cases in Denmark where candidates for a faculty position got through an assessment by some committee members as "qualified" but did not get interviews eventually. What is the process to go from post-assessment to interview in a faculty recruitment? For example, is there a ranking from the assessment committee? I am just curious since this procedure (post-assessment -> interview) seems obscure and hardly written in a university's hiring policies, even in a highly transparent system like in Scandinavian countries.
Comment: Can you explain more what your question is? Indeed, not all positively assessed candidates are invited, so there's a filtering. But that's already given from what you've heard. So what's left to clarify? Or do you just want a confirmation that what you've heard is correct?
Comment: Often there are formal qualifications you must have before you can even be considered for that job. These minimum qualifications can come from the law, or from university policy, or are specific to that position. So those who do not meet those criteria are first removed. The remaining candidates are than often ranked based on the material they provided, and the top X candidates are invited for an interview. You cannot invite everybody, otherwise we would be in selection committees all day and not get any teaching and research done.
Comment: @lighthousekeeper See my edits.  I would like to know about the usual procedure from post-assessment until interview, since universities' policy statement usually misses it.
Answer: The University of Copenhagen documents that part of their recruitment process as follows:

Assessment

• The Assessment Committee makes a non-prioritised assessment of the academic qualifications of applicants with respect to research, teaching and outreach and other requirements listed in the advertisement.
• HR undertakes legality checks and sends assessments out to applicants for consultation.

Interviews

• The manager tasked with recruitment decides in conjunction with the Appointments Committee which of the applicants submitted for assessment are to be invited for interview and possibly a trial lecture.
• Academic and personal characteristics are assessed and explored in more detail at interview.

So, there is a selection, but no ranking.


Elementary Differential Equations

Question: I'm currently studying Elementary differential equations, and I came across a confusion that I had that I think arises from notation, but I would like to clarify with someone. The example problem said this:
$$\frac{\frac{df(t)}{dt}}{f(t)} \equiv \frac{d}{dt} (ln|f(t)|)$$
The way I would usually attain this (Assuming that the above is equal to 1) is by splitting the derivative into the differentials and obtaining something like this:
$$\frac{d(f(t))}{f(t)} = dt$$
and then integrating on both sides to obtain
$$ln|f(t)| = t +c$$
and then taking the derivative to confirm the equivalence.
But I feel like my approach is somewhat wrong because the book I am using seems to do this using the derivative operator and integral operator. I think my understanding is somewhat flawed. Can someone please clarify this and explain how the first equivalence is true?
Answer: First, the equation of interest is not really differential equation in the usual sense.  It is merely an identity.
Now, the right-hand side of the second equation in the posted question is not correct.  It should have read
$$\frac{df(t)}{f(t)}=d\ln |f(t)|$$
Then, integration leads to the self identity $\ln |f(t)| = \ln |f(t)|$.

To proceed in another way, simply let $y=f(t)$ and use the chain rule.  We then have
$$\frac{d\ln f(t)}{dt}=\frac{d\ln y}{dt}=\frac{d\ln y}{dy}\frac{dy}{dt}$$
And proceeding, we obtain
$$\bbox[5px,border:2px solid #C0A000]{\frac{d\ln f(t)}{dt}=\frac{1}{f(t)}\frac{d f(t)}{dt}}$$
Comment: I had commented, but apparently it didn't get submitted. There is nothing wrong with his equation (other than a missing parenthesis on the lh side), and your version ignores the central cause of his hesitation, which is the use of differentials.
Comment: Ah. mea culpa. I thought it was the first equation you were complaining about, which was correct, so i downvoted I thought the complaint was wrong. But the fault was mine for not reading carefully enough. I have changed the downvote to an upvote.
Comment: @PaulSinclair Thank you!! Much appreciated.
Comment: Thank you! The hint made a lot of sense. I missed that.
Comment: You're quite welcome.  My pleasure.  And please let me know how I can improve my answer.  I really want to give you the best answer I can.
Answer: Your understanding is flawed, but then again it isn't flawed. You are dealing with something that has previously been a subject of great controversy in mathematics. But now it has been pretty much settled. The naive concept of free differentials has been a part of calculus since it was invented, but is fundamentally flawed. In a great quote, Berkeley castigated them as being "the ghosts of departed quantities". However, they work. Perfectly. This has resulted in the development of rigorous (but highly technical) means of defining differentials that do work (though never as well as the naive concept did). So yes, it is perfectly okay to solve this with the means that you used. But until one sees a rigorous development of differentials, it has to be considered as lacking rigor.
The rigorous solution uses the identity $\int g(u(x))u'(x)dx = \int g(u) du$ with $u = f$ and $g(x) = \ln|x|$
Comment: You likely have heard of [Non-Standard Calculus](https://en.wikipedia.org/wiki/Non-standard_calculus), but I thought that I would share this link since the focus of your answer is around "differentials" and their rigorous (or lack thereof) interpretation.  In this beautiful theory they are given a rigorous interpretation using hyperreal numbers.  Kind of cool.

Elementary Differential Equations


Is there any supported Bluetooth profile which is used in iOS except 6 profiles(HFP, PBAP, A2DP, AVRCP, PAN, HID)?

Question: Is there any supported Bluetooth profile which is used in iOS5 except 6 profiles(HFP, PBAP, A2DP, AVRCP, PAN, HID)?
Can I use SPP(Serial-Port profile) as developing iPhone app?
Answer: If you want to use Serial Port Profile(SPP),either you need to apply for MFi or use MFi certified devices to communicate with iOS.
Here is the MFi link
https://developer.apple.com/programs/mfi/
In addition to the above Profiles MAP is supported from iOS6.
You can find the supported profile under this link
http://support.apple.com/kb/ht3647


Hashing a string using the algorithm that Linux uses to hash users' passwords?

Question: What's the algorithm that Linux uses to hash users' passwords? How can I implement that algorithm in PHP?
Answer: Try using the PHP crypt function.
Comment: Does the `crypt()` function always use the same salt as the one uses by the OS?
Answer: You might need to know some background information on Linux password storage formats - especially on shadowed password configuration before you can actually implement your own.
On Linux distributions using glibc2, the hash function has a 'magic bit' and salt prefixed to it.
The magic bit starts off with '$x$' and is used to determined the hash function that was used:

$1$ for MD5
$2$ for Blowfish,
$5$ for SHA-256 and
$6$ for SHA-512

(Other unix systems like NetBSD might have different values for this).
The magic bit then followed by 8 bits that constitutes the salt and optionally is terminated by another "$". Between this and the next "$", you will find the actual password hash.
Almost all modern Linux systems these days do NOT store the passwords in the world-readable /etc/passwd. Instead the passwords are shadowed in /etc/shadow where only root is allowed read permission. If the shadowed password scheme in use, the /etc/passwd file shows a character such as '*', or 'x' instead of the password.
The format of a typical password in /etc/shadow would looks like this:
$a:$b:$c:$e:$f:$g:$h:$i

Where:
$a: username
$b: salt and hashed password (as explained above). If this is "NP" or "!" or null then it means that the account has no password. "LK" or "*" means the account is locked and the user will be unable to log-in. "!!" means that the password has expired
$c: Days since epoch of last password change
$d: Days until change allowed
$e: Days before change required
$f: Days warning for expiration
$g: Days before account inactive
$h: Days since epoch when account expires
$i: Reserved for future use.
An example of a shadowed password file could be found at: http://configuration.logfish.net/index.php/etc/shadow
References:
crypt(3) - Linux man page
Why shadow your passwd file?
Understanding Linux Password Hashes
Shadow password on wikipedia


Expected Value and Standard Deviation for sample

Question: Randomly selecting 50 people from a population, 45% say 'YES' and 55% say 'NO'. Assuming that the true percentage of people in the population who say 'YES' is 48%, what is the expected value and standard deviation for the random variable "survey percentage who say 'YES'"?
Comment: $45\%$ of $50$ people works out to $22.5$ of $50$ people saying YES. Am I missing something here?
Answer: Before you started the survey, the expected percentage saying YES was $48\%$ and the standard deviation from a sample of $50$ would have been $\sqrt{\dfrac{p(1-p)}{n}} \approx 7\%$.
After the survey, you "know" the percentage of the sample saying YES was $45\%$.  This suggests that $22.5$ people said YES and $27.5$ people said NO.


Change scratch buffer to org mode by default

Question: When I test some codes in scratch buffer, usually first set it as org mode manually.
How could config it as 'org mode' rather than fundamental mode by default.
Answer: Here is a link to another thread you may be interested in, entitled "Is it possible to create an org-mode scratch buffer?":
Is it possible to create an org-mode *scratch* buffer?
New buffers that are not the *scratch* buffer, should default to fundamental-mode; e.g., when calling get-buffer-create.  As to the *scratch* buffer, you can customize the initial-major-mode variable:
initial-major-mode is a variable defined in 'startup.el'.
Its value is 'lisp-interaction-mode'

Documentation:
Major mode command symbol to use for the initial '*scratch*' buffer.

You can customize this variable.

Thus, use the following:
(setq initial-major-mode 'org-mode)

Comment: Also it may be useful to set `initial-scratch-message`
Answer: Just to be sure you know: M-x ielm will open IELM: a proper read-eval-print loop (REPL) for Elisp. Take a look at its documentation string (C-h f ielm RET) to get an idea of how powerful and flexible it is.
I find IELM much more useful and usable than either lisp-interaction-mode -- the default mode for *scratch*, as noted by @lawlist -- or Org mode. Coding is about the only thing Org is not good for. :-)
REPL article at Wikipedia


Reason for the Amiga clock speed

Question: The Amiga used a CPU rated for 8 megahertz, but clocked at 7.14 megahertz. What was the reason for this number? I remember it was something to do with a multiple of the frequency of the video circuitry, but I forget the details.
Answer: The architecture of most "color computers" of the 70s-80s was very tightly built around the NTSC color video standard.
Almost all of them had a 14.31818 MHz crystal.  Note that this is four times the 3.579545 MHz frequency of the NTSC color standard, which was called a "color clock".  They divided that crystal frequency to derive their actual clock frequency.   For instance

Apple II was 1.023 MHz (1/14 of crystal, 3.5 color clocks per CPU cycle) and used a 1 MHz rated CPU.
Atari 2600 VCS was 1.19 MHz (1/12 of crystal, 3 color clocks per CPU cycle).
Atari 400/800 was 1.79 MHz, (1/8 of crystal, 2 color clocks per CPU cycle) and used a 2 MHz rated CPU.
Even the IBM PC used this same crystal that everyone else was using, dividing it by 3 for CPU clock (4.77MHz).  (But keep in mind memory clock is 1/4 of that, so memory throughput was crystal/12, the same as the Atari 2600 - ha!)  Why choose a multiple when video cards had dedicated video RAM and ran on their own clocks?  Despite staggering chip-fab capability, the IBM PC team was pathological about using off-the-shelf designs and components.  And this "kept the door open" to a future "color computer" design with shared video RAM; which came to fruition as the IBM PCjr.

Why didn't these color-computers just operate asynchronously and run the CPU at max spec, while the video system operated on color-clock?  Because memory was at a premium in those days, so they used memory-mapped video.  This was dual-ported in the simplest possible scheme**, which required memory clocks be in lock sync with the video system. The Apple II even used the video system to accomplish dynamic memory refresh.
So you see.   The Amiga, the last of the machines built with the "color computer" mindset (heh, speaking of another), deliberately chose a CPU speed again divided down from that same familiar crystal, and again lockstepped to the NTSC color clock.  This allowed them to leverage all the color-computer design which had come before, rather than having to reinvent the wheel.
It's difficult to imagine, in this day and age of 4k video, gigabytes of video RAM, and VPUs that can mine Bitcoin faster than the CPU... that we were so pious in our worship of the NTSC standard.  No longer needing the thing, it was kind of a lousy standard.

** To digress on pre-Amiga-age dual-porting: On the Apple II, the video system got every other RAM cycle whether it needed it or not (hence running half the speed of the Atari), and in classic Wozniak style, he rearranged the memory mapping of video so the video system would also do dynamic RAM refresh). On the Atari, the far more sophisticated ANTIC system interrupted the CPU to take the memory cycles that video needed, as well as dynamic RAM refresh.  This meant available CPU power varied between display modes and whether you were in vertical blank  (a significant amount of time when the raster was off the visible screen).  In a lot of Atari games, the CPU "rode the raster", spending its very limited CPU cycles to prepare changes to colors or sprites that would happen on the next scan line, wait for horizontal-blank, execute on cue, and prepare the next.  All the computational work of playing the game happened after it got to a low-attention area like the bottom scoreboard, and the vertical blank period.  All this was coded in assembler of course, with  painstaking cycle-counting to make sure the operations could happen in the requisite time, given the cycles ANTIC would steal for the video mode you requested.
Comment: I thought it was "Never Twice the Same Color".  Unlike PAL's "Perfect At Last".  lol
Comment: The funny thing about the Amiga was that everything else in the system had asynchronous clocking capability. It was just the ram-timing for video that required it. You could do crazy stuff like pull the MC68000 CPU out of the socket and replace it with a 68030 piggy-back board, that had it's own 50 MHz clock, faster RAM and and even faster (64Mhz) 68881 floating point  unit. And most models (even without the CPU board) supported "Fast-RAM"  (above the address-range of the video-chip) that wasn't bothered by the dual-access and thus faster.
Comment: This is the correct answer.  For authority, check my name against the names on the Amiga patents.  The original cost goal was aggressive. Clock crystals cost money.  So did synchronizer circuits and the buffering required to create logic that safely crosses clock domains.  So we architected the whole system to use 1 basic clock, the one required for accurate NTSC video timing: 4x color burst. Divided by 2 for the 68000.
Comment: From the point of view of 1955, NTSC seems pretty brilliant. From the point of view of as early as 1975, NTSC doesn't seem as amazing. And by 1985 it was already merely apathy that kept it entrenched. Or maybe lack of other technologies and market demand for a new standard. Anyway, thinking about the original invention of color TV that could be displayed by a black and white TV just as well, I personally find that impressive.
Comment: IBM had tried and failed, repeatedly, to develop a personal computer based on their own designs - for example, [the model 5100 Portable Computer](https://en.wikipedia.org/wiki/IBM_5100) from 1975. We had one in the computer lab when I was in college. It had a microscopic screen and was just totally awful to use. It was followed by the [Model 5110](https://en.wikipedia.org/wiki/IBM_5110) which wasn't much better. The 5120 was followed by the [System/23](https://en.wikipedia.org/wiki/IBM_System/23) which was powered by an Intel 8085 - and led to IBM choosing the 8088 for the IBM PC.
Comment: Might be worth noting, that this is only about the *timing* of NTSC, as the Amiga (like a lot others) also supported RGB output, which does not suffer from any color issue of NTSC, when being directly connected to the display device.
Comment: *"Why choose a multiple when video cards had dedicated video RAM and ran on their own clocks?"* Don't forget that the 14.31818 MHz crystal was *readily available, cheaply, in bulk*. Sure, you could cut your own crystal to get exactly the frequency you wanted, but really, *why?* Part of the design goal of the 5150 was to *get a product out the door* -- cutting corners where doing so meant saving time at marginal detriment to the final product was probably done regularly.
Comment: Re NTSC being a lousy standard: I've heard of NTSC being jokingly referred to as "Never The Same Color."
Comment: @ToddWilcox My father worked at the UK GPO (who had the contract for BBC telecoms) in the '60s and was present at a demo from the German guys showing off PAL - they first showed NTSC, and "und now, ze PAL!" - and the colours all settled down. Apparently everyone went "wow" :-) Then it was all decided, and he spent the next few years travelling up and down the UK with a scope doing signal correction on the new cables to handle the 625-line colour.
Comment: Nice answer. ;-)  The "riding the raster" approach was also called racing the beam. In fact there's an interesting book about the Atari 2600 architecture called Racing the Beam:  https://mitpress.mit.edu/books/racing-beam
Comment: The chipset clock crystals are actually 28.63636 MHz (NTSC) and 28.37516 MHz (PAL), just take a look inside or at the schematics.
Comment: @hotpaw2: The VIC-20 should it anything have been more cost-sensitive than the Amiga, but it uses a dot rate of (8/7)chroma; the C64 was likewise cost-sensitive, and it uses (16/7)chroma.
Comment: @cbmeeks I thought PAL ->  Predictably Always Lousy
Answer: When color video was introduced in the USA, the horizontal scan rate was set as precisely 15750 * (1000/1001)Hz, i.e. roughly 3579545.4545Hz and the color sub-carrier frequency (also called the chroma clock) was defined as 227.5 times the horizontal scan rate.  Many computers of that era use a multiple of the chroma clock as the pixel clock (the Amiga, for example, uses 4x chroma, or 14318181.818Hz).
On systems where video generation shares the a memory bus with everything else, it's generally necessary that a fixed relationship exist between the video frequency and the CPU clock.  In the case of the Amiga, the system clock is 1/2 the dot clock (2x chroma), which is a bit faster than some earlier machines, though the 68000 doesn't do as much each clock cycle as some other processors.
Some other typical machines:

Atari 2600: dot clock=chroma; CPU clock=chroma/3
Atari 800: dot clock=chroma*2; CPU clock=chroma/2
Apple II: dot clock=up to chroma*4; CPU clock=chroma*2/7
Commodore VIC-20: dot clock=up to chroma*8/7; CPU clock=chroma*2/7
Commodore 64: dot clock=up to chroma*16/7; CPU clock=chroma*2/7

The IBM PC had video memory that was separate from the main memory, and was designed to allow the video clock to be independent of the CPU clock.  Nonetheless, the original PC with a CGA card used a dot clock of chroma*4, and a CPU clock of chroma*4/3.
Comment: the color burst wasn't a digital clock signal like the dot clock and CPU clock were.  in a digital clock, the parts of the signal of interest are the points where it peaks or where it crosses zero.  instead, the color burst is a reference clock, and you encode information by sending a signal that differs from the reference by a small amount. the difference in amplitude is measured to provide one color channel, and the difference in phase produces the other color channel, and with 2 channels you can encode both hue and saturation.
Comment: @rwallace: Imagine one were to place a filter over a TV screen which had a pattern of red-orange-yellow-green-blue-magenta-red-orange-etc. stripes on it (as a continuous range of colors, rather than discrete colors).  That's pretty much how NTSC video works, with about 170-190 pixels in the visible portion of the screen (depending upon how tightly the screen is cropped).  Some platforms like the Apple II and Atari use a horizontal scan rate that's about 0.23% slow and runs at a rate of chroma/228.  On these machines, the pattern of stripes is stationary.
Comment: @rwallace: On machines that use chroma/227.5, however, alternate scan lines use opposing color phase.  Some machines use 262 lines/frame (an even number) causing every frame to have the same phase, while others use 263 (an odd number), meaning that color phase switches every frame.
Comment: That makes sense, but something I'm still curious about; if the color clock was 227.5 times the horizontal scan rate, I would expect that to mean the achievable horizontal resolution for color graphics was 227 (or maybe somewhat less if you leave a safety margin for overscan) but e.g. the Commodore 64 got up to 320 horizontal. How?
Answer: I think you meant 7.15909 MHz.
7.15909 MHz is twice the NTSC color burst frequency (3.579545 MHz).  The NTSC color burst frequency is 455/2 times the line rate, the line rate is 262.5 times the field rate, and the field rate is 60 * 1000 / 1001 (59.94 Hz).
See also https://www.repairfaq.org/samnew/tvfaq/tvwinsswf.htm
On PAL systems that have different field rates, line rates, etc. the CPU is clocked at 7.09379 MHz.
Comment: In general it's easier, cheaper and more reliable to tie everything to a single master clock than to implement multiple clock sources and safe clock domain crossings.
Comment: I believe you meant 525/2 not 455.
Comment: @Mawg: newer revisions of the A500 (and newer Amiga models in general) can switch between NTSC and PAL via software, which is related to the timing only, as the color modulation had to be done by an external box ("tv modulator") anyway. If higher CPU clock was your goal, you could even connect an external clock source (originally intended for genlocks) at the video port. You need, however, a display device that can cope with the higher video frequency then.
Comment: But why tie the CPU to the video display refresh rate when the two should be unrelated? I'm guessing this is to ensure a consistent HBlank/VBlank interval timings for games, but the Amiga was meant for creative software - so why?
Comment: I remember there was a program that could put the PAL Amiga into NTSC mode and make it run slightly faster at the cost of losing some lines of resolution.
Comment: The motherboard was common for both NTSC/PAL and jumpered. I had a switch soldered to mine, as I regularly moved between USA & Europe. I didn't realize that it was affecting clock speed, else I would have left it set at the highest, NTSC, rate and used my multi-standard TV as a display, thus "overclocking" when I was in Europe :-)
Comment: @rwallace actually, I believe I was thinking about the number of scanlines of NTSC which is 525.  And, since they are interlaced, that would leave you with 262.5.
Comment: I think it's worth adding that the PAL clock is more of a hack, since it had to be chosen to match the display area for a 640 pixel wide nominal resolution but on a PAL TV, while maintaining most of the inter-chip timings. This is why a PAL A600/A1200 needs an extra crystal to get a color output on the composite and RF connectors.
Comment: The most important acronym for older home computers was "BOM". And you had to keep it small.
Comment: @cbmeeks 455/2 checks out if you calculate it, where are you getting 525/2? Are you sure you're not thinking of PAL?
Answer: The accepted answer is good, however there is something more that needs to be said here.
No discussion in this kind of detail on the hardware design of the Amiga should pass without some kind of mention of Jay Miner. In addition to leading design on the Amiga, he also designed the 2600, and the Atari 800/400 which (as Harper mentioned) used the same scheme. That's more than half of the designs listed in Harper's answer. This was clearly his go-to design for clocking.
Jay Miner was indisputably one of the fathers of home computing. Arguably the most important one. His contributions should not be forgotten.
It is of course well-known that the signatures of Miner, his dog, and the rest of the development team, are embossed inside the (removable) case top of most Amiga 1000's
Comment: While I agree that Jay Miner was brilliant and contributed to the evolution of computers, I wouldn't agree he was "the father of home computing".  I would put Chuck Peddle higher in that list than Jay Miner.  Bill Mensch too.
Comment: @cbmeeks - I did pretty clearly say that part was arguable. Buy me a beer sometime and I'll happily hold up my end of the argument though. :-)
Comment: everything is arguable.  But, until the world decides what "personal computers" even means, there can be no "father" of them.  My point is that, while Miner was a rock star, Chuck Peddle and Bill Mensch contributed to that fictitious list ever bit as much.  In fact, many people did.  Even...dare I say it...Steve Jobs.
Comment: IIRC, this is not a correct answer.  Jay wanted to clock the 68000 CPU faster, but was talked out of it to keep the custom chip designs simple, while producing more accurate NTSC video output timing than the Apple II or Atari 400/800.
Answer: Synchronizers, which are required for reliability and signal integrity across any asynchronous clock domain crossings, in any main data path, costs lots of dual-rank registers, which have to be tightly characterized in circuit design and layout.  This costs in die area.
Async design also makes testing of the prototype emulator and chips themselves vastly more difficult.  Thus making hard-to-find bugs far more likely on any product with such an aggressive design schedule.
Easiest way out was to run all the wide fast paths (CPU, memory, BLIT, NTSC video) off the same derived clock edges.
Answer: I believe the simple concise answer is so it could synchronize with the video signal.
This meant totally smooth 50/60hz scrolling and also let it overlay graphics on the signal if you had a genlock.

Reason for the Amiga clock speed


If a Canon 200d is better than a 700d, why is it priced the same?

Question: I am a beginner in photography. I want to buy a dSLR. After a lot of googling, I found that the newly launched Canon 200D/SL2 is better than the 700D/T5i. Is this really so? I am confused, because if it's better than the 700D, why is its price nearly that of the 700D's?
Comment: "better" is extremely subjective. There are probably things that the 200D is better at than the 700D, but there are probably also things where the 700D shines. An overall notion of "better" depends on what _you_ expect out of the camera, and so can only be answered by _you_.
Answer: You're not taking into account the age of the two models you're looking at.  See this chart on Wikipedia, which lays out the Canon dSLR models by age and tier.
The 700D is a 2013 camera; its current "successor" model is the 800D. The 200D was just released this year. If you want to compare same-era models, it would be the 100D vs. the 700D, and the 200D vs. the 800D. And as you would expect, the higher-tiered model will have better specs and a higher pricetag. But when you compare a lower-tiered newer model with a higher-tiered older model, the specs may be higher and the pricetags roughly the same.
Cameras, as they age get cheaper. Newer/lower end cameras often inherit technology from older or higher-end cameras.
What you are probably also not seeing in the specs, however, are the handling characteristics, which are the main differentiations between the two tiers.  Things like AF system control/performance or number and layout of physical buttons.  The "T" dRebel line sits above that of the smaller SLs because some features/buttons were eliminated to make a smaller camera body.
Comment: The smaller SL models are also Rebels.
Answer: If you're looking for a pure number compared to number style answer you should look here; https://www.dpreview.com/products/compare/side-by-side?products=canon_eos700d&products=canon_eos200d&sortDir=ascending
However, there is more important things such as what is your budget? Don't spend your entire budget on the body or body and kit lens, the most important part is the glass (lens) so make sure you've left some on the side to invest into good glass, it'll help a lot with your photography.


Testing database transformation mappings

Question: If regularly testing the creation of different datawarehouse tables using mappings from source tables. What do you suggest is the best approach or specific SQLs to do the trick?
Comment: Hi toop, welcome to SQA.  You asked a broad question.   I suggest you type "data warehouse" into the search box in the upper right-hand corner of this page, hit the "Enter" key, and read some of the questions and answers listed in the search results.  After that, if you have a more specific question, feel free to ask it.
Answer: [Disclaimer: This product is created by my company]
We have a product call QuerySurge that allows you to fully compare data in the source tables with the data loaded into the data warehouse.  Compared to other approaches, this seems to be the best automated method for validation.
Comment: I haven't used QuerySurge, but if it does half of what it claims, it would be a VERY useful tool for data warehouse testing.