Is the self-dual point always a critical point?

Question: I was studying duality maps in my Advanced Stat. Mech. class and it was told that all self-dual points need not correspond to critical point. I understand that critical points are points where analyticity of the partition function breaks down. If this point is unique then it can be given by the duality relationship between the constants which appear in the theory. But what happens if this point is not unique?
Comment: I assume that you are referring to 2D Ising model on square lattice with $H = 0$. For square lattice this model is self dual because the dual of the square lattice is itself a square lattice. Yet that's not true for traiagular or kagome.
Comment: Yes but that's not self dual. The traingle and hexagon is are related by an additional relation known as star-traingle transformation.
Comment: Could you please clarify what does it mean: "it can be given by the duality relationship between the constants which appear in the theory"? You ask what does happen if the are more than one critical point in theory?
Comment: @Mass , as I remember, classical 2D Ising model on the triangular lattice exhibits Krammers-Wannier duality at the critical point, too. The corresponding dual lattice is hexagonal.
Answer: Indeed, the self-dual point does not necessarily coincide with a critical point.
This happens, for instance, in the nearest-neighbor Ashkin-Teller model on $\mathbb{Z}^2$ (see, for instance, this answer for a definition). In this model, in some region of parameter space, the system undergoes two phase transitions and the self-duality transformation exchanges the two phase transition points; there is no transition at the self-dual point itself. Although this has been known for decades in the theoretical physics literature, a mathematically rigorous proof was only given recently; see this paper.
Let me give more details. The following picture is taken from the paper just mentioned:

Above (and up to) the diagonal, the bold line is a line of phase transition points and is composed of self-dual points. However, below the diagonal, the line of self-dual points is given by the dashed line and there is no phase transition at any point along this line; rather, the phase transitions occur along the two bold lines. These two lines are mapped onto each other by the duality transformation. (There is no contradiction with the usual argument used to locate the phase transition points when there is a unique point at which the free energy is singular, described for instance here, since the free energy is singular on both lines.)
It might be slightly simpler to interpret the results as follows. Rather than considering the full phase diagram as above, fix the coupling constants ($J$ and $U$ in the picture) and focus on a single line through the origin (the red line below). You can interpret the behavior along this red line as the behavior of the model at various values of the temperature (infinite temperature at the origin, decreasing towards zero as you get further along the line).

What happens is that there are two temperatures at which a phase transition occurs (located at the intersection points between the red line and the two bold lines). In contrast to the Ising model, one cannot use self-duality to locate these critical temperature, since the self dual point (the intersection between the red line and the dashed line) does not coincide with any of the two critical temperatures.
Answer: Referring to the question posed in the title, I would like to mention a further counterexample, which is moreover a lot simpler than the one Yvan has discussed.
Consider a toy model of integer-valued fields $\varphi$ on a lattice, governed by a Gaussian partition function of the form
\begin{equation}\tag{1}
Z = \sum_{\{\varphi\}} \exp\left(- \frac{\beta J }{2} \sum_{\mathbf{r}} \varphi_{\mathbf{r}}^2 \right).
\end{equation}
Using the Poisson summation formula one can elevate these integer-valued fields to real-valued ones, $\phi$, according to
$$
Z = \int \mathcal{D}\phi \sum_{\{\chi\}} \exp\left(- \frac{\beta J}{2} \sum_{\mathbf{r}} \phi_{\mathbf{r}}^2 + 2\pi \mathrm{i} \sum_{\mathbf{r}} \chi_{\mathbf{r}} \phi_{\mathbf{r}} \right).
$$
By completing the square of the exponent
$$
-\frac{\beta J}{2} \phi^2 + 2\pi \mathrm{i} \phi \chi = -\frac{\beta J}{2} \left( \phi - 2\pi \mathrm{i} \frac{1}{\beta J} \chi \right)^2 - 2\pi^2 \frac{1}{\beta J} \chi^2,
$$
we can do the functional integral over $\phi$ and be left with a new quadratic theory in terms of the integer-valued fields $\chi$ with partition function
$$
Z \sim \sum_{\{\chi\}} \exp\left( - \frac{2\pi^2}{\beta J} \sum_{\mathbf{r}} \chi_{\mathbf{r}}^2 \right).
$$
Hence, this simple model is self-dual under the transformation
$$
\varphi \leftrightarrow \chi \quad \text{and} \quad \beta J \leftrightarrow (2\pi)^2 \frac{1}{\beta J}.
$$
The unique self-dual point is determined by $\beta = 2\pi J^{-1}$.
On the other hand, doing the summation of equation (1) is even possible, using the Jacobi theta functions, and one finds
$$
Z = \left[\vartheta_{3}\left(0,\exp\left(- \frac{\beta J}{2}\right)\right)\right]^N,
$$
which is an analytical function of its arguments, and hence an analytical function of $T = \beta^{-1}$.
Hence, this model has a self-dual point which is not a critical point.


My aqua/prius c came without a auto side mirror closing/opening option when locking/unlocking the car. How to install that option?

Question: I have a 2012 aqua G model. The newer versions have the auto side mirror closing/opening option when locking/unlocking the car. How can I install this in my car?
Do I need a software update or a new mechanical part or both?
Thanks in advance.
Comment: Do the mirrors look physically the same?
Comment: Yes, physically the same.
Comment: If they will physically fit, then I would try and get hold of a wiring diagram for both cars.  If you have some understanding of wiring it wouldn't be difficult to wire them up if it is just the lock/unlock action that controls them.
Answer: It all depends on whether your year of car supported the option or not. If it never had the option then you might as well buy the newer model. This is because retrofitting an option such as this would be extremely expensive, requiring wiring and computers and all kinds of things.
If your year car had the option and just your trim line didn't offer it then it may be possible, but still not guaranteed. The best case scenario, Toyota offers a set of mirrors with the necessary motors and the wiring is already there. Worst case scenario, the cars are too diffident between the trim lines of the same year and then see above.
Best bet call the parts department of your local Toyota dealer.


The recommended road map to be a good graphics/game engine programmer

Question: I am a computer science student and I am developing with C/C++ and Python and I want to begin learning graphics tools to start developing with game engines, especially the Blender Game Engine. So what is your recommendation for me to learn and to read? And recommend me a road map for it.
Comment: Possible duplicate: http://gamedev.stackexchange.com/questions/41/what-are-some-good-resources-for-getting-a-beginner-started-in-developing-games
Comment: Sorry what has blender to do with game engines? do you want to use its format?
Comment: @Jari Komppa, yeah but i ask for a recommended road map not only resources
@PhilCK, i means developing in the BGE
Comment: @PhilCK http://en.wikipedia.org/wiki/Blender_game_engine
Answer: EDIT START
Not looked into blender game engine for a while, but I'd have thought the only requirement to use BGE would be to learn how to use it, like any other program.
EDIT END
Firstly a Game Engine and Graphics Engine are very different.
A Game Engine could be thought of as lots of little engines, graphics, sound, network, input etc...
A Graphics Engine such as Ogre, focuses entirely on the graphics side of things.
The single most important thing is Maths. Maths, Maths, and Maths. Leaving aside the physics.
Vectors, Matrices, Quaternions, Ray tracing, curves in space, Projections stuff, Approximation methods, it goes on ...
The maths is platform independent and will be useful on ALL platforms.
Also pick a graphics API such as OpenGL or DirectX, I prefer OpenGL for platform sakes, but it doesn't really matter. XNA would do I guess if you'd prefer C#.
A good general book on Amazon
http://www.amazon.co.uk/Essential-Mathematics-Games-Interactive-Applications/dp/0123742978/ref=sr_1_3?ie=UTF8&qid=1297439659&sr=8-3
Comment: +1 cause this answers the topic of the question, math is very very key to graphics programmers above all other areas of game engines.
Comment: The opengl superbible has a great chapter specifically about the maths. It's also a great book if you decide to use opengl.
Answer: You would be best served by learning how to use openGL off their site. It will introduce you to programming for graphics. Only after you are comfortable with openGl then move to creating a game loop and object manager.
Answer: Learning to be a good programmer and learning how to use the (relatively obscure and underused) Blender Game Engine are two very different problems. Almost so different that I think you should be asking two separate questions.
That said, learning the Blender Game Engine is like learning any other API or toolchain. Check out the documentation, read and understand it, and practice using it over and over until you are comfortable with it.
That general concept applies to learning how to be a good programmer as well. Generally a programmer will learn by first acquiring some basic skill with a particular programming language and then experimenting in the default environment of that language -- this typically means building text-based, console-IO type programs and games for a while. It sounds like you are there already and want to move beyond that.
At that point the programmer tends to start experimenting with windowing libraries or 2D graphics libraries. There's a big jump between console-based IO and 2D, window-oriented, event-based programming for some. Making games in this space that introduce the programmer to the fundamentals of linear algebra, which is a critical part of understanding the 3D graphics programming that many programmers eventually end up doing. Once a programmer has built a few 2D games, it may be time to consider learning 3D math and APIs (Direct3D or OpenGL, or some higher-level API provided by some engine or whatnot).
At some point during that whole process, which is very focused on the everyday minutiae of being a programmer, you will hopefully acquire a talent for larger-scale problem solving and for considering the design and architecture of the systems you build rather than just the "how to" of building them in particular languages -- this is the thing you want to strive for, this is where you start becoming a good software developer instead of a good code monkey.
In your specific case, PyGame might be a reasonable thing for you to start looking at.
Answer: If you're a computer science student, then find out what the graphics course is at your university/collage and its prerequisites. You'll probably want to take both optional and required prerequisites for the graphics, but you also need to get all of the prerequisites for the graphics prerequisites.
For example, the University of Waterloo's graphics course is CS488. The prerequisites are (CM 339/CS 341 or SE 240) and (CS 350 or SE 350) and (CS 370 or CS 371). Each of these will have their own prerequisites that you need to fit into your schedule.
While the specific courses are different for each school, I'd assume a lot of the content is similar. The UW graphics course requires students to build several small scenes and then a ray tracer. They then make a proposal for and implement their final project. You can get ahead in your education by going through the courseware for a lot of universities online: MIT, Stanford, etc... (MIT puts a lot of effort into making their courses available online.)
Comment: (In case you're wondering, I'm a UW grad, but I never took our graphics course.)


What was the difference between "ye" and "thy"?

Question: I'm PRETTY sure that my History of the english Language professor told me that "ye" was actually pronounced [ði], because the character that closely resembles a Modern English "y" was actually representative of a [ð] sound, which renders it difficult to differentiate from "thee". Were there two identical sounding words? Did "ye" and "thee" have identical pronunciation, yet differ in meaning? and Also, was "ye" similar to Modern English "Your"?
Comment: English has many homophones. In any case the spelling of thee indicates it was pronounced with a longer vowel sound.
Answer: Either you remember incorrectly what your professor told you, or he misinformed you.
To take your second question first: ye was the nominative case of the second person plural pronoun (used as a subject, i.e., "ye are" = 'you are'), while your is the possessive determiner corresponding to the same pronoun ("your house"). The oblique case form was you ("I see you") The two have never had the same function.
Thou was the corresponding singular nominative, with the oblique case form being thee, and the possessive determiner thy (or thine before a vowel).
As for your first question: the above-mentioned ye was never pronounced [ðiː]; it was [ɣeː], then [jeː], and finally [jiː] in various stages of English. There was thus never any possible similarity between the singular and plural pronouns or their corresponding determiners.
On the other hand, ye was also for a few hundred years semi-randomly used to represent the definite article, which was previously written as þe. The glyph þ (thorn) was used for the sound [θ], and as early as the early 14th century, it had started to be replaced by the digraph ‹th›, as in Modern English. However, in cases where it continued to be used, it lost its ascender, ending up looking first like the older wynn, ƿ (which had almost entirely fallen out of use after around 1300), and later on like a cursive y. That is why the word 'the' was for a long time alternatively written as either ‹þe›, ‹ƿe›, or ‹ye›.
The latter of these forms is the only one that's had any currency for the past couple of centuries, and it is the origin of names like Ye Olde Shoppe. In this case, ye really is supposed to be pronounced the same as 'the'—though not the same as 'thee'.
Comment: Sigh. "Somebody" (not you, obviously) is confused about [possessive determiners](http://goo.gl/ckuRFq) again. [I've tried to set things aright](http://english.stackexchange.com/a/224657), but it seems the confusion is spreading and I don't know why.
Answer: Ye:

(pron.)   Old English ge, nominative plural of 2nd person pronoun
  þu (see thou); cognate with Old Frisian ji, Old Saxon gi, Middle Dutch ghi, Dutch gij. Cognate with Lithuanian jus, Sanskrit
  yuyam, Avestan yuzem, Greek hymeis.     Altered, by influence of
  we, from an earlier form that was similar to Gothic jus "you
  (plural)" (see you). The -r- in Old Norse er, German ihr probably is
  likewise from influence of their respective 1st person plural pronouns
  (Old Norse ver, German wir).

http://www.etymonline.com/index.php?allowed_in_frame=0&search=ye&searchmode=none
Pronunciation: thee (ðiː) and ye (ði); spelling pron. yi)
The word ye2, as in Ye Olde Booke Shoppe, is simply an archaic spelling of the definite article the. The use of the letter Y was a printer's adaptation of the thorn, þ, the character in the Old English alphabet representing the th- sounds (th) and (th̸) in Modern English; Y was the closest symbol in the Roman alphabet. Originally, the form would have been rendered as or ye.
Thy:

[(pron.)   possessive pronoun of 2nd person singular, late 12c.,
  reduced form of þin (see thine), until 15c. used only before
  consonants except -h-. Compare my/mine, a/an.

http://www.etymonline.com/index.php?term=thy&allowed_in_frame=0
Ye and thee have the same meaning: thou 1 [thou] pronoun, sing., nom. thou; possessive thy or thine; objective thee; pl., nom. you or ye; possessive your or yours; objective you or ye.
Comment: There are *three* near homophones/homographs being asked about here:  • *"þe"*, definite article, now spelled *"the"*, but abbreviated *"ye"* at times during the Middle Ages when the letter thorn was abbreviated by *"y"* • *"thee"*, accusative second person singular pronoun.  • *"ye"*, nominative 2nd plural pronoun (now replaced by *you*), pronounced *yee*.  You only discuss one of them.


Flattening a dictionary into a string

Question: Given:
k = {'MASTER_HOST': '10.178.226.196', 'MASTER_PORT': 9999}

I want to flatten into the string:
"MASTER_HOST='10.178.226.196', MASTER_PORT=9999"

This is the ugly way that I'm achieving this right now:
result = []
for i,j in k.iteritems():
    if isinstance(j, int):
        result.append('%s=%d' % (i,j))
    else:
        result.append("%s='%s'" % (i,j))

', '.join(result)

I'm sure my developer colleagues are going to chastize me for this code. Surely there is a better way.
Comment: I don't think it's that bad, unless perhaps you also have Boolean values in your dict, because `isinstance(False, int)` returns `True`, so instead of `flag='False'`, you'd get `flag=0` (both of which are not optimal).
Answer: For python 3.0+ (as @Serdalis suggested)
', '.join("{!s}={!r}".format(key,val) for (key,val) in k.items())

Older versions:
', '.join("%s=%r" % (key,val) for (key,val) in k.iteritems())

Comment: Close but no cigar. I don't want quotes around 9999 for `MASTER_PORT` in the final result.
Comment: @BonAmi You're right. I replaced the second `%s` with `%r` to achieve that
Comment: Instead of the `(key,val)` you could simply write `item`. iteritems returns tuples, and if you have multiple replacements in a string, you replace those using a tuple. You drop a second temporary variable and imo, you gain some readability.
Comment: @Elmer That's interesting you say that, because I think novice pythoners might get more readability by using `(key,val)`, since it explains better what happens. But I guess that's a matter of taste. I do agree your way is more efficient.
Comment: I know it's a dictionary and .iteritems returns `(key, val)`, so unless you have better variable names that warrant creating temporary variables, like `(food_name, price)`, you can save yourself the characters. It's all about increasing your signal to noise, and `(k,v)` or `(key, value)` is mostly noise.
Answer: Dor Shemer's method is very good, however since 3.0+ came out, pythoneque? language is moving towards:
', '.join("{!s}={!r}".format(k,v) for (k,v) in k.items())

using .format instead of % () to format a string.
both will give the same result and are correct.
I used items for python 3.0+, but for python 2.x use iteritems
Comment: new syntax 3.6: `f"this is a string {variable}"`
Comment: You're right. I keep thinking with python 2.6
Answer: If you want exactly that output format, your way is quite OK imo. Because you want your keys unquoted and your values quoted if they're strings and unquoted if they're just numbers, there is no 'easy way' I think
In general str(k) will return a string like {'MASTER_HOST': '10.178.226.196', 'MASTER_PORT': 9999}
Answer: For python 3.6+ you can use f-strings:
', '.join(f'{k}_{v}' for k, v in my_dict.items())

Comment: Nice! Do you think you can improve the efficiency a little?

Flattening a dictionary into a string


How to create an index for a collection of vectors/histograms for content based image retrieval

Question: I'm currently writing a Bag of visual words-based image retrieval system which is similar to the Vector Space Model in text retrieval. Under this framework, each image is represented by a vector (or sometimes also called histogram in the literature). Basically each number in the vector counts the number of times each "visual word" occur in that image. If 2 images have vectors which are "close" together, this means they have many image features in common and are hence similar.
I'm basically trying to create the inverted file index for a set of such vectors. I want something that can scale from thousands (during trial stage) to hundred of thousands or million+ images so a home made data structure hack will not work.
I've looked at Lucene but apparently it only indexes text (correct me if I'm wrong) whereas in my case I want it to index numbers (i.e. the vectors themselves). I've seen cases where people convert the vector to a text document in the following way:
<3, 6, ..., 5>  --> "w1 w2... wn". Basically any component that is non-zero is replaced by a textual word "w[n]" where n is the index of that number. This "document" is then passed to Lucene to index.
The problem with using this method is that the text representation for the vector does not encode how frequently the particular "word" occur so the ranking of the retrieved images would not be good.
Does anyone know of a mature indexing API that can handle vectors or perhaps suggest a different encoding scheme for my vectors so that I can continue to use Lucene? I've also looked at Lucene for Image Retrieval (LIRE) project and have tried the demo that came with it but the number of exceptions that were generated when I ran that demo makes me unsure about using it.
As for language of API, I'm open to C++ or Java.
Thanks in advance for any replies.
Answer: You can try GRire which is a Java library that implements the Bag of Visual Words model. It is my project and I am currently working on implementing an inverted index.


How to fix these weird shadowy sun rays on the spoon?

Question: I'm quite new to modelling, and I got this pesky problem on the spoon, or maybe I shouldn't care about it? Anyways, at the bottom (same from above) we can see those rays that don't look nice, I tried lifting the faces to even it out, but no luck. Any suggestions?
Answer: Heres now I usually go about solving this issue:
I start with a UV sphere with subsurf, and it has some wrinkles:

Heres what the geometry looks like:

Now, i add in a smaller loop cut close to the center of the circle, making sure to position it to maintain the curvature of the sphere:

Now, my wrinkles are gone, or at least imperceptible from this distance:

I hope this helps!
Comment: ah man I totally forgot about the loop cuts, but I've already did the subdivision surface modifier, so I guess I'll keep this in mind the next time I see it. Thanks.
Answer: Looks like you started modeling from a UV sphere, and that part used to be either the bottom or top of it, and a bunch of triangles meet there in one vertex. Or, there's an n-gon there. (guessing)
You could try to remesh the object by going into the Properties Panel > Object data Properties > Remesh, set your desired voxel size and click Remesh. It should create a nice quads only mesh for you.
Comment: Thanks for the help, turns out it only needed a simple loop cut.


Unlimited Values Weight

Question: Currently I have a field that allows unlimited values, and it's displayed as a video player, using user-input URL from that field. Now I would like to do some custom coding or whatever it takes to somehow pick the first URL (the one at the very top), so I can have the video player play only one URL. Any ideas?
Answer: In a multi-value text field, and assuming D7, the values are something like this:
<code>// if set, this is the first value...
$node->FIELD_NAME[$node->language][0]['value']
// if at least one set, this is the last value...
$node->FIELD_NAME[$node->language][count($node->FIELD_NAME[$node->language])-1]['value']
</code>
so depending on what you mean by 'on top,' one of these values is most probably what you are looking for.  (If D6, just take out the <code>[$node->language]</code> part)

Unlimited Values Weight


Does Google pick and choose which rich snippets to display on their search results?

Question: For example, if my website's listings properly display the breadcrumbs rich snippet, but do not show the aggregate star rating rich snippet, should I assume it is something in the structure or is Google intentionally suppressing these?
Comment: I picture Google like OZ, not just where there are thousands of munchkin PHDs making algorithms, they do the common work, but one man behind the curtain, actually two, Brin and Page. *Do not pay attention the the men behind the curtain!* Yes it is a mystery. The munchkins have no clue. They just sing in high pitched voices. Cheers!!
Comment: This is a good question. One way or another these questions have been asked individually, but not together which, to me, makes it more interesting. Really, there does not seem to be rhyme or reason to how Google displays breadcrumbs or ratings. Google does not guarantee anything. However, maybe through experience, someone will know something useful. Heck, there could be gold here. Who knows? Good Luck! Cheers!!
Comment: Crickets! It is either a great mystery or not a good question.
Answer: All you have to worry about is what Google tells you.
Just use their structured data tools and fix everything what is needed to fix.
https://developers.google.com/search/docs/advanced/structured-data
If everything looks fine there, have patience. Meanwhile fix the errors you find within your search console.


HTML5 capture audio from default microphone

Question: Can somebody help me on how to capture audio from default microphone using HTML5?
There are many samples available, but none of them seem to working.
I have tried Audio capturing with HTML5
As it only works with chrome with flags enabled. but it's getting NavigatorUserMediaError. The video icon on the address bar has a red cross sign and its tooltip says 'this page has been blocked from accessing your camera and microphone'
Answer: There's some great articles on HTML5 Rocks. This is just one that I pulled.
http://updates.html5rocks.com/2012/09/Live-Web-Audio-Input-Enabled
<code>// success callback when requesting audio input stream
function successCallback(stream) {
    var audioContext = new (window.webkitAudioContext)();

    // Create an AudioNode from the stream.
    var mediaStreamSource = audioContext.createMediaStreamSource( stream );

    // Connect it to the destination to hear yourself (or any other node for processing!)
    mediaStreamSource.connect( audioContext.destination );
}

function errorCallback() {
    console.log("The following error occurred: " + err);
}

navigator.webkitGetUserMedia( {audio:true}, successCallback, errorCallback );
</code>
Comment: thanks for your reply. i got this too. but seems not working. from the link we can get two sample live demos. [One](http://webaudiodemos.appspot.com/pitchdetect/index.html) and [Two](http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html) but none seems working. both asks me to allow to use microphone but after that nothing happens. the only change is there is a red ball blinking slowly on title icon. my chrome is up-to-date and also i have enabled 'Web Audio Input'. can anyone provide a working sample.
Comment: HTML5 Rocks created some web audio demos when those APIs were new, but they never updated the demos as the APIs evolved. Sadly, some of their web audio demos no longer work.
Comment: I just updated this, there are now two callbacks for success and error, you can pass {audio: true} as the first parameter and if the user allows access to the microphone it will come back as a stream in the successCallback. You can then create a media stream and do whatever you'd like with it.
Answer: make sure you start the demo from a webserver - simply copy/paste & start from file system won't work - in chrome you never get access to the mic this way.
Answer: Recently (not sure when) Chrome added the requirement that the page be accessed over SSL to enable getUserMedia.


Is quantum computation just an advanced data compression algorithm?

Question: When we are talking about the quantum computation and classical computation, we are saying that quantum computation is exponential faster than the classical one. And that's because the Kronecker product of quantum states and quantum entanglement. Such as [1,0] state and [0,1] state will create a system state [0,1,0,0]. For a larger system, N quantum bits can store 2^N double precision numbers. And here the question raises, is quantum computation just an advanced data compression algorithm?
Comment: If you don't get an answer here in a few days, you may want to try again at [cs.se]
Comment: *When we are talking about the quantum computation and classical computation, we are saying that quantum computation is exponential faster than the classical one.* Do you have a reference for this? This sounds wrong. There are certain problems, such as factoring large integers, that are more tractable for a quantum computer than for a classical one. That doesn't mean that quantum computing has some advantage in general over classical computing.
Comment: @BenCrowell that statement is certainly not always true. There are some known instances of problems for which quantum algorithms provide an exponential advantage over the best known classical algorithms, but it seems that some specific (to my knowledge not well characterised) structure of the problem is required for this to be the case. Quantum computation is not expected to be useful for many/most problems (or at least not expected to provide *exponential* advantages)
Comment: ```
Quantum 0.96 - Advanced data compression.

Copyright (c) 1993,1994,1995 Cinematronics.  All rights reserved.
```
Answer: No, that is not how quantum computation works.
What you are referring to is a common misconception associated with quantum computation. Quantum mechanics cannot be used to store more data than what is classically possible.
More precisely, it is not possible to use $N$ qubits to store more than $N$ bits of information in a useful way.
What is true is that, in general, to fully characterise the state of $N$ qubits you need to specify $2^N$ real numbers, and that simulating quantum systems is in general (expected to be) classically hard.
This is however very different than saying that quantum mechanics allows for increased storage capability, which is wrong.


What happens with iTunes Match after my library exceeds 25,000 songs?

Question: Do the newer songs simply stop being uploaded? Does the iTunes Match splash screen display a big nasty "sorry you're over the limit" screen? Is there something I can do to get it to only work with a specific set of songs (shy of deleting them from my library)?
Answer: The 25,000 songs is for the songs that you've added to itunes match and are not purchased from the itunes store. If you exceed that limit you will just be able to able to add to your itunes match library, songs that are purchased from itunes.
You can delete specific songs from your icloud library (right click>delete from icloud), there is no need to delete them from your local library too.
And yes, it just displays a popup mentioning that you've reached the  limit.
This is all documented at https://support.apple.com/en-us/HT204146


POST image file from Google Apps Script to Google App Engine app that uses titan-files

Question: I am using titan-files in my Google App Engine application to provide a filesystem-like layer to Data Store and Blob Store storage. I have a Google Apps Script that sends POST requests to my Google App Engine application to store the data in the blob store. It works fine when sending JSON data (as a string), but it doesn't work when sending binary data, like images.
I ended up trying to send base64 encoded data as a string and store it in the blob store. I thought that I could retrieve the data from the blob store and base64 decode it to get the original image. However, it doesn't seem to work.
Here's the code I am using to send the data from the Google Apps Script:
function pushFileToFilePath(file, destinationFilePath) {

 var payload =
    {
      "content" : Utilities.base64Encode(file.getAs("image/jpeg").getBytes())
    };

  var options =
  {
      "method" : "post",
      "payload" : payload
  };

  var response = UrlFetchApp.fetch("https://myappname.appspot.com/_titan/file?path=" + destinationFilePath, options);
  if (response.getResponseCode() == 201)
  {
     return true;
  }

  return false;
}

The data is available in the blob store after the request is sent, and its size is in line with what I would expect from the results of base64-encoding the file. However, if I download the file from the blob store using the Google App Engine dashboard and base64-decode it using
openssl -d -in base_64_encoded_file.txt -out image.jpg

I get a zero-byte image.jpg file.
I also tried other ways to setup the payload object. For instance using:
var payload =
{
  "content" : file.getAs("image/jpeg").getBytes()
};

gives a file of 18 bytes on the blob store, containing the string "[Ljava.lang.Object".
Using:
 var payload =
{
  "content" : file.getAs("image/jpeg")
};

I get the following exception in my Google App Engine logs:
Bad request:
Traceback (most recent call last):
  File "/base/data/home/apps/s~myappname/live-1.364814133265166345/titan/files/handlers.py", line 103, in post
    content, blob=blob, mime_type=mime_type, meta=meta, **method_kwargs)
  File "/base/data/home/apps/s~myappname/live-1.364814133265166345/titan/files/files.py", line 408, in Write
    content, blob = self._MaybeWriteToBlobstore(content, blob)
  File "/base/data/home/apps/s~myappname/live-1.364814133265166345/titan/files/files.py",   line 341, in _MaybeWriteToBlobstore
    blob = utils.WriteToBlobstore(content, old_blobinfo=old_blobinfo)
  File "/base/data/home/apps/s~myappname/live-1.364814133265166345/titan/common/utils.py", line 277, in WriteToBlobstore
    content_file = cStringIO.StringIO(content)
TypeError: expected read buffer, instance found

I tried using BytesIO to stream the content, but I got other exceptions.
Do you have any idea of how I could POST images (or more generally binary data) to titan-files?
Thank you!
UPDATE
I fixed my issue by changing the way the "content" data is retrieved from this:
content = self.request.str_POST.get('content')

to this:
content = self.request.get('content')

and by sending the data using the following code in my Google Apps Script:
 var payload =
{
  "content" : file.getAs("image/jpeg")
};

that is, just setting "content" to be a Blob instance.
I don't know why I didn't try this in the first place :) Anyway, the change in titan-file is a hack and not a permanent solution, so I'll try to come up with a solid patch that handles both binary and non-binary data and submit it to the project.
Thank you!
Comment: it's ok (and recommended) to answer your own question.
Comment: I wanted to but I had to wait for 8 hours before being able to do so. It's now done, thank you.
Answer: I created an issue in titan-files's issues tracker here: http://code.google.com/p/titan-files/issues/detail?id=1 . The patch attached to it fixes the issue, but it is not a clean and robust fix. Titan Files' maintainers will probably update the issue with a reference to a proper fix soon.


Show statistical significance (or not) between means

Question: Suppose I have two experiments A and B. Each experiment is composed of N elements that are clearly separated into two groups. In experiment B one of the groups has a higher mean than the same group in experiment A. This difference (shown in red in the image) is what I am trying to understand. I need to show that it is significant, or not, determined by any value. p-value? a test?
Answer: To show statistical significance (that is, to show that the results of your experiments are not just due to chance), you first need to define your hypotheses (the null and the alternative hypothesis). In this case, the null hypothesis, $H_0$, could be "There is no difference between the mean of the groups in experiments $A$ and $B$". The alternative hypothesis, $H_a$, could be "There is a difference".
You now perform a statistical test. If the resulting p-value (returned by the statistical test) is less than a threshold value (often called the "significance level" and it is e.g. $0.05$), then you reject the null hypothesis and you say that this result (that is, the p-value less than the significance level) is statistical significant.
Comment: Thanks but, what test would that be? t-test? I want to know if the difference in red in the picture is significant given the context of the whole experiment. But I don't know how to do that
Answer: If the distribution is not too different form normal and variances intra-group equal, an ordinary t-test will do (function t.test in R, for instance). If nothing can be assumed about the distribution of both groups, you might use a permutation test --just google for "permutation test R" to obtain lots of pointers.


How to clean a keyboard without a vacuum cleaner

Question: This happens with my system that is kept near an open window. Dust gets accumulated over a period of 2-3 days beneath the keys, on the keyboard head and on the keys a bit. How do I clean a traditional computer keyboard without pulling out the vacuum cleaner every time to remove dust from even beneath the keys.
Comment: A little off track. Just a suggestion :  why not just cover the keyboard with something? That'd save you many hours of cleaning it.
Comment: @AbhishekTripathi If you plan to cover it with *something*, why not use [something intended for it](https://www.google.com/search?site=imghp&q=plastic+keyboard+cover&tbm=isch)?
Comment: @alex - I meant... that something only :p
Answer: You can buy "Tinned Air" from electrical shops.  Otherwise known as "Canned Air" or "Air Duster".
These are aerosols that just blow air in a directed jet.  They are intended for just this use.
Keep one nearby and blow the dust off the keys when required.
Answer: You can also wipe it clean with microfiber cloths or similar. In addition you can either use cotton swabs (Q-tips), or some special tool to get inbetween the keys.
One such homemade special tool could be a plastic/butter knife with cloth wrapped tightly around it. This should allow for cleaning of most spaces between keys. Clean for a few minutes, before shifting/moving the cloth (or wringing the cloth).
If needed you could use some electronic cleaner, rubbing alcohol, all purpose cleaner or dishwasher in order to get the really dirty parts clean.
Answer: It is actually ok to wash your keyboard in the dishwasher. I would put it on the top rack. I would only be wary of doing this if your keyboard is unusually flimsy or fragile.
After the wash leave it out on a towel for a couple of days, at least 2, to make sure it is completely dry before use.
For a more thorough clean remove the keys first, though this may not be easy and I don't think it is necessary.
Edit: if the keyboard is just dusty and the dust isn't sticking to the keys, compressed air is easy to use and quick, you can buy cans of it at the store or use your own air compressor.  It doesn't need to be powerful, just concentrated air flow.


Unknown Binary in Application Samples

Question: I recently started sampling applications that freeze on my machine.  I have an iMac with 8 cores and 32GB of RAM running Catalina 10.15.1 fully patched.  It's far from resource constrained yet certain applications freeze regularly. I see threads marked as unknown often in the traces.  Are these normal threads?  If so what would make a thread show up as completely unknown in a sample.  It seems strange that the library a thread is linked to could be known in some cases but unknown in others.
Answer: I think you're confused about what parts of the output actually represents threads:
Yes, the threads you see in the output from "Sample Process" in Activity Monitor are definitely "normal threads".
However, each of the lines in your screenshot do not represent a thread each.
Activity Monitor clearly labels each seperate thread with the word "Thread" - the whole line is in lightly blue color (compared to the rest that is black).
The screenshot you have does not indicate that a thread is "unknown", nor does it indicate that "the library a thread is linked to" is unknown.
I'll explain how to read the output from "Sample Process":
Each blue line indicates a thread.
Each black line below the blue line is a function that has been executed by that thread.
The percentage indicates how much time was spent inside the function. You can choose when viewing if you want it displayed as a percent of the thread or the parent.
The number in the brackets (such as [0x1100007ffd]) is the memory address of the function.
The field right next to the percentage is the name of the function, and in parentheses, the binary file from which the original contents on the memory address was loaded.
Here's why unknowns can appear:
Note that the name of the function is only available if the function was loaded in from a binary that contained what's known as a "symbol map". This makes it possible for the sample program to known that the code at a given memory address was generated from a function with that specific name in the original source code. If you haven't got that information, it is listed as ???.
Typically you'll see that Objective-C programs will show you these names, while C programs typically won't. The developer of a C program chooses whether or not to expose the names, but for performance/size reasons, these are typically left out in programs meant for "the public" (as opposed to internal testing).
Similarly the name of the binary file is known only if code in question was loaded in via the actual program binary itself, or by the dynamic linker from a .dylib or similar shared library. If the code at the memory address came to be there for any other reason, the sample program cannot know the name and it is displayed as unknown.
In addition you'll often see that programs that internally employ dynamic languages, JIT compilers, interpreters, etc. will show up as "<code>??? (in unknown binary)</code>" in these listings. This is because the code at that specific location wasn't there from the start - it was generated dynamically by the program as it executed.
Word explanation:
If you do not know the meaning of the word thread, an rough, high-level explanation is as follows:
Think of a CPU as a machine that executes instructions in a sequence. The current state of the CPU itself is the contents of the registers (internal memory locations inside the CPU that are seperate from RAM) as well as the program counter (the address of the instruction currently being executed). Each time an instruction is executed, the registers can be changed by the computation, and the PC is set to a new address. Typically the PC is set to address of the next instruction in memory, but it can change arbitrarily.  In this view, the CPU executes a single program.
In order to (seemingly) run multiple programs at the same time, the system is setup so that CPU executes a single program as described above, but at various times "switches program" by saving its state (registers and PC) to RAM, and loading in another state. Thereafter it is now executing at a different place in memory. By "switching" back and forth between these programs, you get the illusion of running multiple programs at the same time.
Each of these "programs" are actually what is known as a thread. So a thread is essentially just a saved state consisting of the values of registers and the program counter, which the operating system continually saves and restores.
In comparison, a "process" is what you observe as a running instance of an application - i.e. the whole thing you're sampling in Activity Monitor). The concept is very similar to a thread in that the operating system allows for running multiple processes at a time by continually saving/restoring state, whereby switching between processen. A process can have one or more threads, so part of switching between process is actually switching between threads as describe above. However more state is being saved/restored, as for example memory mapping are also saved/restored. This is the reason that threads within the same process can (in general) access the same memory, whereas different processes (in generally) cannot access each other's memory.
Note that in real life things are much more complicated. A system can contain multiple cores and multiple CPUs, meaning that you have multiple sets of registers and program counters at the same time. Threads will also have various attributes that are not described here.

Unknown Binary in Application Samples


Portable JRE on Linux - possible?

Question: I am making a remastered distribution that was at first packed with Sun Java, however I decided I would like Java to run from a folder on the hard drive with my application instead. I see there's a portable Java for Windows - how can I do this with Linux? I haven't tried simply putting the whole folder in there but that seems like an ugly hack, and I'm not sure if there are other files in the Java install that need to be put in system directories.
Answer: On Linux you download jre-6u21-linux-i586.bin from oracle site, you exec it, and you get all jre in one directory.
You can change this directory name, copy it an another Linux PC, tar it and untar it elsewhere, and so on. Then put the subdir bin on the PATH, that's all.
Comment: 10 years, version changed. Download newest JRE from [java.com download site](https://www.java.com/en/download/manual.jsp) this page allows to DL without login and many clicks. either 32 or 64, as is your OS, only one will work. set PATH and JAVA_HOME, e.g. `PATH="$PATH:/opt/THE_APP/jre1.8.0_251/bin"` and `JAVA_HOME=/opt/THE_APP/jre1.8.0_251` I don't think __portable__ is the term used for this on linux, I would call it embedded.
Answer: You can simply copy the installation directory to your stick. Everything will work fine from there. This is true for windows as well as for linux.
Answer: Just download the tar.gz, extract it to a folder and move the usr/java/jreX.X.X_XX to a folder you wish
Answer: By portable, you mean java's definition. What you might mean though is installation. Java applications don't need to be installed. You should make a Jarfile with all the classes of your program. To do that, you can do this:
jar -cvf MyApplication.jar myapplicationfolder/

This will create jar file. You still need the manifest file, which you can edit with most normal archivers (7-zip, WinRAR, File-roller), etc. Open the jar file with any archiver, go to META-INF/MANIFEST.MF, and edit it. It should look like this:
Manifest Version //etc...
//two newlines, can't show them here.

Change it to
//...
Main-Class: pkg.to.mainclass.MainClassName
//two newlines.

Now you have an executable jar. This will run on any system with java installed.
Comment: The question is about running also without the jre installed on the system.

Portable JRE on Linux - possible?


can i get specified ERC20 token holders details?

Question: can i get specified ERC20 token holders details,example token holder address,how many token holding that address like this details
Answer: You have to subscribe to all Transfer events and store the source and destination address. That will get you a list of all token holders. After that you can use balanceOf() to query the token balance of each account.


Removing counter sunk metal security Torx head screws

Question: I have a lot of frozen countersunk T10H security pin Torx head 6-32 screws to remove from cast aluminum weatherproof enclosures. I have tried tapping, torqueing in both directions, penetrating oil, heat gun and ice/freeze mist. Tried to use a drill press and clamping the enclosure in a vise, but even then, the security pin makes the drill bit "walk" off the very hard screw. Someone told me there is some kind of electrical device used my machine shops to remove screws from engine blocks, etc., by "burning" the screw out. Will this work on screws as small as 6-32? If so, what is the device called, so I may intelligently call around to machine shops to see if they possess one of these devices? Any other ideas? I have snapped screws off and also snapped off about 5 T10H tool bits.
I there any special penetrating oil for stainless steel to aluminum tapped holes?
Comment: Are you using T10H Torx bits to try to remove them?
Comment: Since it sounds like you're desperate, here's an idea: knock the security pin off by hitting it sharply sideways (usually a nail set will work), then use a normal (ie, stronger) T10 bit.
Answer: You are looking for Electrical Discharge Machining (EDM) and some versions should be able to work at the size you need.
Comment: An EDM is essentially a welding CNC. That might be a bit excessive.
Answer: The simplest solution is using a screw extraction kit. Since you know the size and threading, once you drill and exact the security screws, you simply replace them with the appropriate sized non security screws. Or you know, use new security screws if you need that extra bit of annoyance. It's not like security bits are hard to find, you broke 5.
As a preventative method, apply anti seize oil/grease/tape to the new screws.
Answer: I have used a small battery powered Dremel with a abrasive cut off disc to cut a screwdriver slot through the middle of head. Start off by making the smallest slot you can. You can always make it bigger and get a larger blade screwdriver. Just be careful how deep you go as you might break off part of head off while turning and screw will remain. Old reliable slotted screw heads.
Comment: Are you suggesting that a slotted screw driver will get a better purchase on a corroded in place screw than a Torx bit will? You must have _very_ different slotted screwdrivers than I do. I don't use slotted on _anything_ except light switch cover plates if I can avoid it!
Comment: @FreeMan Probably works better than a _broken_ Torx bit.


What is a hack to clean kitchen sink drain on an RV?

Question: On an RV kitchen sink drain you cannot use Draino per previous owner, I was looking for a hack to clean the drain or an alternative to Draino.  Thank you.
Comment: The solution would depend on whether or not you have a grey water tank.  A small campervan discharges straight onto the ground, so needs different cleaning tricks.
Answer: If you can't use chemicals, go for a mechanical solution. The tool of choice will depend on the kind of problem or maintenance you are planning to do:

A plunger, especially if the drain is fully clogged.
A drain snake / spiral to loosen debris stuck in the drain.
A roughed-up chopstick or similar is especially effective for grabbing hair in the drain (there are also plastic versions with a kind of barbs sold for that).
A bottle brush for cleaning up algae and other kinds of biofilm (keep one reserved for that use, don't use the one for your dishes, after the first time you will see why).
Answer: Boiling hot water and liquid soap down the drain. The soap serves to lower the surface tension which lifts off the nasty stuff as well as lubricating the pipe as well to facilitate the nasties to slide down the pipe. The heat of the water softens up the nasties. Fill your sink about half full and let time and atmospheric pressure assist you.
For example if your sink is 12 in by 12 in or 144 sq in. Atmospheric pressure is 14.7
lbs per sq in = 2116.8 lbs of pressure. One helluva sink plunger I say.
This also works on clogged toilets.


Can I run a 110v battery charger/maintainer off a solar panel?

Question: I have a Batt Cat II battery charger/maintainer hooked up to the batteries on my boat. I keep it at a storage yard that doesn't have 110v outlets available. I was wondering if it is possible or practical to set up a solar panel that could feed the charger/maintainer. I'm not the most knowledgeable about electrical systems but I assume all I would need is a panel, controller, and inverter. My biggest question is what would be the minimum wattage needed to supply the charger. I have no idea what the pull is when the charger is running but I know most chargers pull 1 or 2 amps while charging. Any insight would be very helpful.
Comment: The most efficient way would be to have the solar panel directly (well, via a suitable charge controller) charge the boat batteries.
Comment: If you are just trying to maintain the batteries while the boat is on the hard, and there is no battery useage, you can probably direct connect a small 12V solar panel to your 12 V battery bank without a charge controller. But the charge controller is the safest bet. Again, assuming lo load, you can use a very small inexpensive charge controller to keep the battery topped off.
Answer: I would eliminate using the existing charger and inverter because that is inefficient and adds more complexity than is really necessary.
The wattage of the panel really tells you how FAST you can charge the battery. That is, using a higher wattage panel will charge your battery faster in optimal sunlight conditions.
That being said, I don't know how fast you want to charge the battery, but I will give you some formulas that should help you choose what you really want.
The stored energy of a battery is usually measured in Amp Hours (AH). You can usually find this on the label of the battery. Except we are interested in the POWER that it can deliver. To convert Amp Hours (AH) to watts hours, use the following equation:
Energy = (AH) * V

Where P represents the STORED energy, in watt hours (WH), AH is the amp hour rating of the battery, and V is the voltage of the battery. Similarly, in a DC (Direct Current) circuit, the power delivered can also be calculated using the following equation:
P = V * I

With P representing power in watts, I the current in amps, and V being the voltage. It is not that hard, or expensive to build your own solar charger circuit using a regulator, a diode, and some other inexpensive components. Calculating the power of the charger is pretty simple as well. It is just the power coming in from the solar panels, minus the power dissipated by the components. Check out the link below to learn more about building a charger circuit:
http://www.electroschematics.com/6888/solar-battery-charger-circuit/
(Or you can always measure the output power of a charger by measuring the voltage and current coming out, and plugging those values into the equation above.)
Lastly, to find out how long it will take to charge, just do some simple mathematics with units. For example, to find how long it would take to charge a 12 volt, 40 Amp Hour Battery (like a car battery) with a 20w charger, you just do some unit conversions:
First, find the stored energy in the battery in watt hours:
Energy = (40 AH) * (12v) = 480 WH

Then find the amount of time it would take the charger to completely charge the battery:
Charge Time = (480 WH) / (20w) = 24 Hours

Note that the watts cancel out to leave you with hours for the time unit.
Hope this helps!
Comment: Good answer, but be careful of mixing up Power and Energy. You're using Watt-Hours, Wh, these are energy, but you call them. "stored power" which is wrong. You can edit your answer easily.


No points for editing after gaining edit rights?

Question: Before you hit 2000 rep on SO, edits to questions and answers are peer reviewed and if accepted, the editor is awarded 2 points. After you hit 2000 rep and gain the ability to edit questions and answers yourself, the editor is no longer awarded the 2 points. Why is that?
Comment: See here: http://meta.stackexchange.com/questions/82020/why-theres-a-limit-on-edits-reputation-reward
Comment: This isn't a dupe. The other question is about why total rep from suggestions is limited to 1000. This one is about why you don't get rep from edits after you get editing rights.
Comment: @Mr. Disappointment, I did run a search before asking the question and just never came across that one. Thanks for the link.
Comment: @JasonTowne Your question is clearly expressed. Thanks.
Answer: After 2000 reputation, your edit are no longer peer-reviewed before they are accepted. You could easily game the system to get extra reputation.
The bonus reputation that is given before you have 2000 reputation is to help people to get to higher reputation gap faster, so that they don't need to have their edit peer-reviewed. Once you have reached 2000 reputation you no longer need that little "boost" since you have reached the reputation gap where your edit take immediate effect.
Comment: So you basically make a restriction and then also help people to get around this restriction? This is a bit illogical to me. Also if at 2k rep you trust me enough to make edits (and approved lots of then in reviews), why do you think I'm gonna make edits of lower quality now and I don't deserve to be rewarded anymore?
Answer: I'm sure there is a duplicate, though I can't find it, but the reason is simple — the edit points are meant to encourage user participation for newer users.  By the time you've reached 2000 points, you have proven significant participation, for which you are rewarded the right to edit freely.


Weird intersection or gap when I solidify

Question: I'm trying to make a pizza slice in Blender.  However, I'm having some trouble with this, as whenever I apply the solidify modifier, it goes from this to this.  It does a weird thing at the corner.  How to I prevent/fix this?
Answer: It looks to me like you don't have manifold(closed) geometry. you might have 2 vertices right on top of each other which makes it look like its manifold even though it isn't.
Try going into edit mode, hit A to select everything, then from the mesh menu select cleanup, and then merge by distance. you might have to play with the distance setting.


Double Image Along X Axis

Question: Recently my printer has been creating double images along the X-axis, I just printed a calibration cube after checking all of my rods to make sure nothing was catching and here was my result:

It looks like there is another X to the right of the X that is supposed to be, would this be a retraction problem, or could it be a problem with the filament because I printed a calibration cube with another filament a couple of weeks ago and there was no double X.
Comment: Seems to be a several problems with your settings. Temperature too high for the quality filament, speed printing, aceleration printing and coast, due the problems appears also in Y axis.
Answer: I agree with @FernandoBaltazar. You have several things going on. If the problem is recent, you may have loose belts, but you may also need to perform acceleration and jerk tuning. Reducing your print speeds may also help.
Comment: Totally agree.  I was about to answer this.  There is severe backlash in the mechanism, likely because of a loose belt of flexible coupling.  The overshoot on all four corners could also be caused by the hot end being loose, and free to wiggle too much.
Answer: There are several problems, but lets start with a method for discovering them.
The first thing to do is look for any looseness or slop in the mechanism.  Try wiggling the hot end, looking for any free movement.  Try moving along the axes that move.  You haven't specified the machine, so I can't suggest the specific points to try moving.  If the bed moves, try wiggling the bed.  If the extruder moves, try wiggling the extruder on each movement axis.  Nothing should move at all until the motors skip.
If the mechanism is fully tight (and from this picture, I expect it to have some "wiggle room"), you could follow by slowing the machine, including reducing the acceleration settings.  If you find something moving, you'll need to investigate why -- what is allowing the movement to happen.  On a belt-driven machine, the belts can be loose, but one can also get movement from loose set screws, motor mounts, hot-ends which are coming apart, or loose thrust bearings or nuts on threaded shafts.  Applying force to the parts that move during printing and watching for movement is the best diagnostic.
In the future, when asking questions it can be helpful to include the type of machine, any modifications you've made, and information about the printing conditions.

Double Image Along X Axis


What do I do if my Xbox 360 is glitching my games and doing weird things?

Question: I was fighting Logan's soldiers in Fable 3 and suddenly my Xbox made a screeching noise and my T.V. had clear lines running threw it in a zig zag pattern. What does that mean? I still haven't been able to become king in Fable 3 because of my Xbox 360. When I tried playing Minecraft, I put in the disc and it shot it right out! What's going on? Does it mean I need a new Xbox?
Comment: With the whole screeching sound, something similar happened to my Wii quite a long time ago after I left it on all night to save my progress. If you've left it on for a while, try not to do that as it doesn't do much good to the hardware.
Comment: Are there any other signs of the console or anything else being corrupt? "lines" seem to indicate a problem with wire/port connection, are they inserted correctly? Worst case scenario, system screwed up big time.
Comment: I've found [this video](https://youtu.be/Ab7xnKPxcj4?t=341) showing the situation. Can you reporduce?
Comment: "Reproduce" means that you can relate, that you can trigger the same problem in your own circumstances. In this case in the video the last sound the xbox plays sounds like a heavy machine gun, however here your console is screaming. I think that happens because when a device crashes it usually stops EVERYTHING including the sound processor and so it gets stuck on the last sound it played. As for minecraft, yeah, it does indeed seem like the disc reader died. Oh well.
Comment: I didn't leave it on, everything is plugged in correctly, what does reproduce mean for an Xbox?
Comment: Thank you very much!
Answer: If the inserter is hot, you should probably leave it for 5 - 15 minutes.
According to It Still Works:

Screen freezes can occur on the Xbox 360 for several reasons. The mostly likely reasons include problems with a game disc, corrupted installed game files, network issues and lack of airflow to the console. ... To unfreeze your Xbox 360 and help prevent future freezes, do some troubleshooting to find out the cause.

The Xbox 360's screeching sound is probably from the disc you are playing on. If the disc is old, it won't read the disc. Here is some information from Digital Innovations on how it might not read the disc:

The major contributing factor to a disc read error is a dirty optical lens (the one that your Xbox 360 laser passes through to read the disc itself). If there is dirt or dust on the laser lens, your system will eventually fail to read the game disc.

The sudden screeching must be depending on the time on how much days/hours/months in total you played Fable 3. If it is new, it is probably your old 360 itself, but you really don't need a new one, you just need to take it for repair. Look here for a reason on why it may be screeching. If the repair isn't affectable for a few minutes. You may need a new Xbox.


regarding measurability of functions

Question: in this question Borel Measurability of a function with countable discontinuity points. $X$ is a Borel set , but I have $2$ questions   $1)$ if $X$ is every subset of $\mathbb{R}$ I think the theorem is also valid we only used preimage of open set is an open set  and countability so I don't see the point of being Borel .
$2)$ And I also think that the function also Lebesgue measurable since borel sigma algebra is contained in lebesgue sigma algebra , so open set are also measurable in lebesgue sigma algebra .
Are my statements correct?
Comment: The answer to the question in your link is invalid.
Answer:
For $f$ being Borel Measurable, $X$ must be a Borel set. Indeed, take a (Lebesgue) measurable set $N$ set that is not a Borel set. Then, $f:N\to \mathbb R$ defined by $f(x)=1$ is continuous, However, $f^{-1}(\{1\})=N$ which is not Borel, and thus, $f$ is not Borel measurable.

Indeed, if $f$ is Borel measurable, then it's Lebesgue measurable.
Comment: For your first question, yes as far as $X$ is Lebesgue measurable. For your second question, since the Borel $\sigma -$algebra is generated by open sets, open sets are Borel sets, so no chance to find an open set that is not a Borel set... @Dsrksidemath
Comment: Thanks for your answer , instead for $f$ being Lebesgue Measurable is true that $X$ could be any subset of $\mathbb{R} ?$
Comment: and another question ,sorry if I am bothering you your example is correct and you are completely right . In the link the guy says the first set is open , but it is open even if I change the set X with another set not borel will still be open  and so i will arrive to the same conclusion , that is my problem . What is the missing point here ?

regarding measurability of functions


SPException: Catastrophic failure (Exception from HRESULT: 0x8000FFF (E_UNEXPECTED) in Sharepoint

Question: I've been trying to programmatically copy custom content type and its custom columns from one web to another  for some time now, and I always get different errors or exceptions every time.  After yet more tries, I received more strange and cryptic exception from Sharepoint after clicking onto a newly copied custom column in a custom content type.  I checked the logs, and this is what I got:
<code>Unknown SPRequest erorr occurred. More information: 0x80070002
Unable to locate the xml-definition for FieldName with FieldId 'guid without braces', exception: Microsoft.SharePoint.SPException: Catastrophic failure (Exception from HRESULT: 0x8000FFF (E_UNEXPECTED)) ---> System.Runtime.InteropServices.COMException...
... at Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt 32 lcid, Object varIdBytes...
Failed to find the content type schema for ct-1033-0x1000blahblahblahcontenttypeId while caching feature data.
Unknown SPRequest error occurred.  More informationL 0x8000ffff
Unable to locate the xml-definition for CType with SPContentTypeId '0x0100MorecontenttypeId', exception: Microsoft.SharePoint.SPException: Catastrophic failure(Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) ---> System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure...
... at Microsoft.SharePoint.Library.SPRequestInternalClass.GetGlobalContentTypeXml(String bstrUrl, Int32 type, UInt 32 lcid, Object varIdBytes...
</code>
It failed to find quite a few content type schema.  I'm confused with what Sharepoint is trying to do here, and why a simple process of copying a custom content type from one web to another just wouldn't work in contrast to the information found on the web e.g. this.
Appreciate any help to get over this problem.  Thanks.
Answer: Content types are defined in XML files that has to reside on the file system (in the 12 hive). If you want to copy a content type from a web application to another, you must make sure that these definitions are also copied.
I would recommend you to install the feature that contains these custom content types on each of your target web applications.
Regards,
M
Comment: I created a custom content type and custom columns via the SharePoint manually, then programmatically copies them to a new web.  Where in the 12 hive can I find them?


How do you wire 2 stepper motors to a Raspberry pi with a ULN2803?

Question: Is there any way to wire 2 steppers to a Raspberry Pi with a ULN2803 Darlington chip? (http://www.adafruit.com/products/970) Can you wire multiple ULN2803's with 2 steppers attached? Is there any way to do this with a minimal amount of GPIO? If so, how?
Answer: Almost certainly.  Are they unipolar motors?  Most of the hobby steppers I've seen come with driver boards containing a variant of the ULN2XXX.
Here a unipolar motor is been driven by a ULN2003A.  The inputs are four Pi gpios.  You'd need 8 for two such motors.
The software is trivial.  The steppers should have timing diagrams to show the order to pulse the coils.
Answer: For last part of the question on minimum GPIO pins, use Shift Register. Need 3 pins (Data, clock, latch).
Traditionally, ready made chips are in the TTL family. Easy for up to a few tens of bits.
Modern varieties of "field-programming-chip" allow you to "design and make your own" (high number of bits, highly complex functions, etc.). Reading 100 pages book may get you started while in-depth application can be complex. If high data bit number shift register (use ready made chip for low bit number) is the requirement, be sure to choose suitable starter-level reading materials.


what kind of non-parametric test to use?

Question: I collected data on one sample, the DV could be separated into two groups (success yes vs. no) and then I have several IVs with interval scale. I just don't know if to use Wilcoxon or Man-Whitney test. Also I don't know if it's necessary to use Bonferroni correction or if that is just important for parametric tests.
Comment: What do you want to test? What is your hypothesis?
Comment: @Baumann my original plan was to run a logistic regression and identify those variables that are best to predict the criteria. that didn't work for several reasons - my plan now is to do this by using correlation and/or parametric-tests. does that make sense?
Answer: From https://www.beds.ac.uk/howtoapply/departments/psychology/labs/spss/Mann-Whitney_U_and_Wilcoxon:

The difference between the Mann-Whitney U and the Wilcoxon tests relates to the design of the >experiment. If your experiment has a repeated measures or matched participants design then >the Wilcoxon test is used to analyse your data. If your experiment has an independent >measures design then the Mann-Whitney U test is used to analyse your data.
Answer: IMHO @Giorgio's anwser is not correct since there are two Wilcoxon tests (namely, Wilcoxon Rank-Sum and Wilcoxon Signed Rank).
It might be useful to remember that Mann-Whitney test is also called Wilcoxon rank-sum test. And therefore, there is no difference in applying Mann-Whitney or Wilcoxon rank-sum tests. You should get the same result.
As I already wrote here, people do sometimes make a mistake in replacing Mann-Whitney with the Wilcoxon signed-rank test. The difference comes from the assumptions. In the Mann-Whitney test you are interested in the difference between two independent populations (null hypothesis: the same, alternative: there is a difference) while in the Wilcoxon signed-rank test you are interested in testing the same hypothesis but with paired/matched samples.
For example, the Wilcoxon signed-rank test would be used if you had replicates (repeated) measurements between different time points/plates/... since it is the same sample but measured in different time/on different plates.
As for the Bonferroni correction, the answer to this question highly depends on your setting. If you are going to torture your data until it confesses I would advise that you use a correction technique (like Bonferroni/FDR/Holm-Bonferroni/...) to protect yourself from false judgement. Regardless of the choice between parametric and non-parametric tests.


Aluminum foil changed color after wrapping cooked corn

Question:
I cooked some corn in boiling water today, and immediately wrapped it in aluminum foil after taking out of water. 5 mins later, I found out the colour of the foil changed, I'm not sure whether the corn is edible... please help
Answer: There are two likely causes for this kind of discoloration in foil.  Neither makes the corn unsafe to eat.
The more likely cause is that you cooked the corn in heavily salted and/or chlorinated water and it was still damp when you wrapped it up.  Salt, chlorides, and moisture react with aluminum and cause it to discolor and eventually corrode.
The second possible cause is the same reaction you get from tomato sauce and foil.  Very acid, moist foods like tomato sauce will strip metal ions from foil.  Cooked corn is weakly acidic, and could produce similar but lesser corrosion.  This is not the likely cause, though, because it would require the wrapped corn to be in contact with a second metal.
In neither case is there any issue with eating the corn, except some possibility it might taste bad.  A handful of aluminum ions is harmless to you, as the corn itself natively contains more aluminum molecules than that.
Comment: I'm unable to tell just from the picture, but a third option would be polymerized fat.
Comment: @rumtscho - they stated boiled, so I think fat might be unlikely.


Can I tell if photos were taken by person or self-timer used?

Question: I am getting photos from someone who is using their cell phone and sending me photos is it possible to tell if the photos were taken by using the self-timer or had to be taken by a person?
Answer: No. This is not possible. There is a standard metadata field in EXIF which tells if the self-timer was used, but:

There's no guarantee that the cameraphone app in use actually writes this field
Many transfer methods strip all of this off to reduce file sizes,
It's easy to edit, so you even if it's there, you can't trust it....
And if all of that wasn't enough, there's no way of knowing that a second person didn't activate the self-timer.


Question on tensor contraction

Question: I have seen that the contraction of the electromagnetic field (emf) tensor between covariant and contravariant versions of the electromagnetic field tensor is $-2E^2/c^2 +2B^2$ but my confusion is that since the emf tensor is a matrix so when we contract we are multiplying two $4\times 4$ square matrices so how does it produce just $-2E^2/c^2+2B^2$,shouldn't it also be a matrix? Or am i missing something?
Answer:
when we contract we are multiplying two 4×4 square matrices

No, matrix multiplication is not the same thing as matrix (or vector) contraction.
Matrix multiplication of two Faraday tensors would look like:
$$ \mathbf{F}^2= \mathbf{F}\times \mathbf{F} \quad \leftrightarrow \quad \sum_\lambda F^{\mu\lambda} F_{\lambda\nu} = (F^2)^\mu_\nu, $$
whereas a full contraction is going a step further and setting, $\mu = \nu$ after the multiplication stage, so that:
$$F^{\mu\nu} F_{\nu\mu} = (F^2)^\mu_\nu |_{\mu = \nu} = \sum_\mu (F^2)^\mu_\mu,$$
i.e. the sum of the diagonal elements (the trace) of $\mathbf{F}^2$.
Answer: You are partly correct.
In tensor notation, we break your traditional notion of "matrix multiplication" into two separate parts.
The first part is called an outer product, the outer product of $A$ and $B$, both being "matrices" aka [1, 1]-tensors having one upper index and one lower index, is the outer product $$(A\otimes B)^{\alpha\phantom{\beta}\gamma}_{\phantom{\alpha}\beta\phantom{\gamma}\delta}=
A^\alpha_{\phantom{\alpha}\beta} B^\gamma_{\phantom{\gamma}\delta}.$$
As you can see this tensor expression on the far right is kind of just a wiring diagram saying "that first top index (first overall) is wired into the top index of $A$, the second top index (third overall) is wired into the top index of $B$, etc." The result has two places it can be wired on top and two places it can be wired on the bottom. So in 4D space this thing has 256 entries as a [2,2]-tensor.
After one contraction this can become a [1, 1] tensor again, another matrix, and this is matrix multiplication. It is what we write with a repeated index,
$$(A\cdot B)^{\alpha}_{\phantom{\alpha}\delta}=
(A\otimes B)^{\alpha\phantom{\beta}\beta}_{\phantom{\alpha}\beta\phantom{\gamma}\delta}=
A^\alpha_{\phantom{\alpha}\beta} B^\beta_{\phantom{\beta}\delta}.$$in terms of wiring, we are shorting out a lower index to a higher index with a small wire.
Note that there are actually four wirings we can choose from, $A\cdot B$ and $B\cdot A$ being the obvious ones. If I "short" a matrix in this way it generates a trace, so the other two are $(\operatorname{tr} A)~B$ and $(\operatorname{tr} B)~A.$
This generalization of trace is probably easiest to understand for a newcomer in terms of this idea of Einstein summation, which says that when I see an index repeated between an upper and a lower position, I quietly sum over the values of that index.
If we apply one more contraction we get $\operatorname{tr}(A\cdot B)=\operatorname{tr}(B\cdot A)$.
Now, technically, the "matrix" presentations of $F^{\mu\nu}$ or $F_{\mu\nu}$ are a sort of lie, those are I guess more properly tables of numbers rather than matrices. But, we use them because it doesn't actually mean anything for a [1,1]-tensor to have a symmetric or antisymmetric matrix in some coordinates, whereas [2,0] and [0,2] tensors can be symmetric or antisymmetric in a coordinate-independent geometrical meaning. Indeed some of our "wiring diagrams" that we can construct, $$\frac12 \delta^\alpha_\beta\delta^\mu_\nu \pm \frac12 \delta^\alpha_\nu\delta^\mu_\beta,$$can be used to express a [2, 0]-tensor, say, as the sum of a symmetric and an anti-symmetric tensor in a coordinate-independent fashion.
With that said the basic point still stands, you can use the metric tensor to convert a [2,0] $F^{\mu\nu}$ into a [1,1] $F^\mu_{\phantom{\mu}\nu}$ and then they are asking you for $\operatorname{tr(F\cdot F)},$ your interpretation is basically just missing the trace aspect coming from the continued contraction of the remaining indices.

Question on tensor contraction


motor shield directly to PC? WITHOUT ARDUINO!

Question: Is there a way to connect and control motor shield board WITHOUT Arduino at all.
can i connect it directly to my PC ?
i'm getting confused since i red lot of topics that people use existing pins on motherboard.
Comment: Is there a reason, why you would want to do this? Misusing a motherboard like that (if it is really possible) does only make sense, if you are doing it for the fun of hacking your motherboard. It would be way more complicated and would definitely don't cost much more, than the typical arduino/microcontroller solution. If an original Arduino costs too much, you can buy a china clone, which are way cheaper.
Comment: It's educational.
why can not we just use UBS output to control something like motor shield board,
can get's it's ones and zeroes from USB instead of arduino, since we have all the computing power we need on PC?
is there any USB version of motor control boards? and why not..
Answer: To a normal PC? No. You can't. A PC doesn't have the GPIO pins etc that are needed.
You could wire it to a Pi though.
Answer: If you have a PC with a real Parallel Port ( LPT1: ) and you don't run an Operating System on it, ( or perhaps MS-DOS ) ... you can connect some leds, but you cannot use an Arduino shield directly.
Comment: Re "_If [...] you don't run an Operating System on it_": You can do it on Linux from a privileged process, if you first request access to the port's IO registers with [`ioperm(0x378, 3, 1);`](http://man7.org/linux/man-pages/man2/ioperm.2.html).
Answer: This superuser post might help.
Raspberry Pis have GPIO pins that you can use to communicate with a motor shield, but regular (intel-based) PCs usually don't. In any case, you wouldn't want to mess with motherboard pins anyway; a short circuit might easily fry your computer.
If you don't want to use an Arduino, you can use a USB-to-serial converter (such as a small FTDI circuit) along with a motor driver that uses serial communication.
However, this wouldn't be any simpler or cheaper than just using an Arduino.


Dark winter days equal dark winter drinks!

Question: Winter is just around the corner, thus what should I be drinking?  My normal summer tipple of Gin and Tonic, or should I move over to darker more homely drinks, like perhaps rum and coke?  Is there a particular wine that is evocative of cold days and warm fireplaces?  Or perhaps I should just simply remove ice from gin and carry on - any suggestions?
Comment: This question in it's current format isn't really a good fit for the Stack Exchange format. Broad suggestions are primarily opinion based, but the question could be re-worded to look for drinks that are most commonly drunk in the winter
Comment: Personal, winter is stout season.
Comment: Have you done a Google search. Lots of stuff comes up for "winter cocktail" like https://www.esquire.com/food-drink/drinks/gmp385/winter-cocktails/
Comment: I get where you are coming from, however simply googling it would mean that no one ever came to this site.  I will however try to re-word it.
Answer: I'll just go ahead and answer this question assuming it's better formed, something like:

Which drinks are most popular in the winter?

The difference to me in which drinks to choose in the summer versus the winter comes from the temperature in which you're drinking. In the summer people typically crave something that is light, cool, and refreshing in the hot weather, where in the winter they want something that sticks to their bones and warms the cockles. Some examples:
Summer Drinks

Pilsner
Lager
Weiss
IPAs
Fruity cocktails (vodka, rum)
Caesars
Light bodied, medium to sweet wines

Winter Drinks

Stouts
Porters
Full bodied, dry red wines
Mulled Wine
Whisky
Brandy
Autumn or Winter (spiced) ales

Caveat
That said, really just drink and enjoy whatever you want, whenever you want. But in my experience it's usually the summer when I don't want the heavier drinks rather than vice versa. I'm much more likely to drink a light beer in the winter than something dark in the summer, although I'll drink whisky all year round.
Comment: In particular I think of rose as a summer wine. Hot coffee based cocktails like Irish coffee are winter drinks.
Comment: I love the Caveat!
Comment: What is it that distinguishes between these two groups?  Is it calories, alcohol strength, or something else?
Answer: Dark winter days equal dark winter drinks!
Darker winter days equals dark wines: black wines.
I would recommend a very dark red wine, if it is dark enough it almost almost black!

Wait, what the heck is black wine? Despite its nickname, it's a red wine made from Saperavi grapes—but its color is such a rich, dark purple, that it looks black. Saperavi is Georgia's most popular red wine, and the grapes are now being grown throughout the world, including the Finger Lakes region of the U.S., Australia and Eastern Europe. - Psst: Black Wine Is the New Trend You Need to Know

Saperavi
Dry red wine
Coupled with the aroma acquired after aging in oak barrels, it also brings the flavors of ripe blueberry, caramel and blackcurrant.
This wine, which is intended for a long-term aging, offers a velvet finish and touchy feeling of tannin at the same time.
The balance of aroma, structure and texture places Lukasi's Saperavi among the best wines.
It is recommended to pair it with meat dishes, game, salads, and the best hard cheese.
Best to drink at  +18 C° –  +20 C°.
Alcohol – 11.5% – 13%
It is complementary to robust meat flavours, hunted meat, salads, and aged cheese.


FreeNAS, Do I need 1GB per TB of usable storage, or 1GB of memory per TB of physical disc?

Question: The title says it all. When setting up free NAS, do I need 1GB per TB of usable storage, or 1GB of memory per TB of physical disc?
Answer: This topic is controversal, and still ongoing debate. I think the best answer is: "It depends". If you are going to need deduplication, you probably want to have huge amount of rams. There the 1 GB per TB rule seems to underestimate the empirical observation, that suggest more something like 5 GB RAM per TB storage (ZFS Tuning Guide).
Some ZFS developers seem to have a different view: Reddit-Comment 1 Reddit-Comment 2.
Quote from Comment 2:

That is wrong. 1GB is fine for ZFS. You can use the same amount for data deduplication, although writes will slow down from 3 random seeks being done on DDT misses after a certain amount of unique records have been stored. Each unique record takes 320 bytes of space in the DDT, it counts as metadata and ZFS ARC on ZoL will only allow 1/8 of RAM to be used for metadata by default. You can do the math.
As for the amount of RAM, 1GB or more. Performance tends to be better with more RAM for more cache though. As I said elsewhere, the amount of storage does not determine how much RAM you need.

Addendum:
Apparently it's the deduplication feature that requires lots of RAM See Oracle documentation. ZFS only support block-level deduplication, and if dedup is turned on, you will need approximately 320 Bytes per block per core. This makes the resulting RAM consumption a bit tricky. Conclusively you can only tell, that if you are not gonna need deduplication, ZFS will not require the often-stated 1 GB per TB rule.
TL;DR
1 GB RAM is fine, if you are not going to use deduplication (default is off)
Answer: With ZFS, it's 1 GB per TB of actual disk (since you lose some to parity). See this post about how ZFS works for details. For example, if you have 16 TB in physical disks, you need 16 GB of RAM.
Depending on usage requirements, you need 8 GB minimum for ZFS. UFS requires much less.
Comment: is this relevant anymore? 16gb is good for 24TB and 32GB is good for 100TB, asuming RaidZ2. 12tb hard drives and RaidZ3 have really made this difficult to understand. I wish someone would explain why the 32gb for 100tb recommendation makes any sense.
Comment: +1 The normal dead minimum for ZFS (with any performance) is 4GB. Don't forget that the 1GB/1TB is over and above anything else the server might be doing (applications, services, whatever).
Comment: I am looking at one FreeNAS server with 16 4TB drives, 15 of which in a striped zpool, (like RAID50), and 1 saved as a hot spare, there will be no compression, or deduplication on these devices, as that will already be being preformed by the BackupPC, and VEEAM servers backing up to them. I am looking at a second FreeNAS server with the same setup to duplicate the first, and in addition to that, have and additional 3SSDs, and 5HDDs, in a RAID10 with hot spares, that array will be used for a small VM backup datastore, incase I need to move somethings off the SAN in a emergency.
Comment: One more question for you, if I build a FreeNAS system with 30-40TB of usable storage, and 64GB of memory, how much processor should I have? And would more cores or more single threaded performance make a difference?
Comment: @Litzner Less Faster or More Slower cores depends on if you'll be using Dedupe or Compression, and the speed of your drives. Dedupe and Compression are multi-threaded, so get better performance with more cores. All pool operations (storing/retrieving data) are single threaded. Most storage boxes will benefit from having a faster CPU, however normally the hard drives are much slower than the CPU so it's a non-issue. It depends on you setup...
Comment: @Litzner In that case I would go for a higher clock speed. Cores don't matter so much.


How do examples of Power Armor stack against that of tankettes, and other small vehicles?

Question: Many a time I've seen someone try to see how Power Armor could be used well, (in combat) they act like tanks on a smaller scale. It got me thinking "If these PA users can take small arms fire, hold incredible amounts of ammo, can operate well in soft ground and non-spacious environments like a forested area, whats stopping a tankette like the german Wiesel series from doing the same thing but faster (wheels/tracks) and being more reliable at the same time?"
Comment: Do you mean a science-based armored exoskeleton, or a highly futuristic mecha?
Comment: Primarily science- based armored exoskeleton, things like cooling, ground pressure, reliability, energy storage, availobility of spare parts are all included. The only "energy" weapon would be a dazzler(look at wikipedia) weapon as a feature in an overhauled designed of a flashlight also nuclear is something neither tanker nor PA user wants
Answer: Ease of use and training. The PA moves and acts like a human would, which is easy to learn. You can also do many things with it, like trench warfare with much bigger weapons and more dangerous to enemy armor than regular armor (or a wiesel) would. Tanks and tankettes cant do trench warfare as they require a pre-prepared position they have to drive into and out off, being vulnerable in that time where a PA would just pop up and back down again.
PA's are also easier to use in other roles, like digging fortifications, short-range transport ("get that ammo to the other side of the compound quickly and come back!"), loading/unloading, making clearings etc.
Like all questions about mechs versus tanks/wheeled vehicles it should not be about which one is superior, but what roles they can be used at. We dont use exclusively tracks or wheels after all, they each have their specific uses. Legged armor/vehicles would be no different.
Answer: The way you describe your power armour, a role that they could perform better than Any other infantry would be that of shock troops. (https://en.wikipedia.org/wiki/Shock_troops) Any well equipped infantry unit tasked with the first assault against fortifications or an enemy position would fall under this description, and troops with equipment like power armour that could withstand small arms fire would be ideal for this. They would be an elite infantry unit used as a "tip of the spear" for their army.
As pointed out in an earlier answer, their main advantage over over vehicles would be their ability to fight well in difficult terrain, especially urban warfare since history and research has shown conventional military and vehicles and tanks to be terrible at this.
(https://www.researchgate.net/publication/348960360_The_Effectiveness_of_Armoured_Vehicles_in_Urban_Warfare_Conditions)
this article discusses in detail the most common types of attack performed against vehicles in urban environments in modern warfare, and over 80% of attacks are carried out using smal arms fire. Infantry that could withstand this would be ideal for leading an attack on urban areas. It is an interesting read, it even has a Sun Tzu quote about avoiding urban warfare, even back then they realised that urban warfare is a destructive and costly affair.
Most conflicts in recent history involve urban warfare, and this trend is expected to continue. It is also predicted that by the UN that in 2050 about 68% of the world population will live in cites, natural increasing the chances that conflict will occur there.
hope any of this helps!
Comment: For years I heard it the other way around: shock troops are designed to stop the attacker's advance and hold them in place to give allies the chance to respond to the attack. Strange to see it being about the attackers.
Answer: Hard to answer without a lot of engineering details and specs for the different systems but in theory traditional 'power armor' as portrayed in SF and as opposed to say 'Mechs' basically just amplify the levels of personal protection, carrying capacity and potentially endurance of an infantry soldier, not to superhuman levels but enough to make a difference. With one proviso.
The universal trend in military history has been that as the weight of the arms, amour and pack that soldiers are expected to carry has decreased over time with improvements in technology commanders have tended to add on extra pieces of 'essential gear' so that the weight goes back up. The result is that your average GI today today is basically expected to carry pretty much the same total weight as a Roman legionary was!
So lets assume your brand spanking new power amour lets a soldier carry twice as much as was previously possible. If so a lot of the expected benefits would be lost if that solder was immediately given twice as much extra weight to carry.
Lets say for example that they decided to take away the power armored GI's M4 carbine and replace it with a SAW. He now packs way more firepower but also loses a lot if not all all the extra agility etc the amour may have otherwise given him/er due to the extra weight of the weapon & ammo they now have to carry. So a lot would depend on the role commanders saw power armor playing on the battlefield e.g. close in assault or long range patrols. You equip the suits differently depending on the mission.
That said your power armor should still be superior to the vehicles you mentioned in close quarter assault rolls and/or in rugged or close terrain like dense forests, mountain sides or inside industrial and urban landscapes.  No matter how versatile a light tank may be its not climbing up a spiral staircase, rappelling down a cliff face or weaving its way through densely packed jungle anytime soon! It simply wouldn't be as compact or as flexible as powered armor.
Broad rolling plains or other mostly open spaces? Different story entirely. The vehicles would probably have major advantages in speed and maneuverability and carrying capacity (including long range sensors).
So it would be a case of horses for courses. The objective and terrain your operating in sets the parameters on the type equipment you'll deploy. They might both see wide service, just not always in the same operations.
Answer: The tankette is a rather easy target for bazookas, anti-tank-missiles, gunships and drones. It is big, has a large radar and IR signature, and you hear it from a distance.
Once you can put BAs with similar firepower and protection onto the battlefield in large numbers, tankettes don't make sense anymore.
That said, there will be an arms-race between infantry rifle's penetration and the BA's protection, and the BA might as well loose this race: Todays infantry rifles are not optimized for penetration, because they don't need to be, but there is much potential for improvement, like higher muzzle velocity or optimized penetrators.


Phonegap in Visual Studio 2012

Question: Does anyone know how to make the project template for PhoneGap work in Visual Studio 2012?
Answer: I think the reason I cannot open my PhoneGap project is because PhoneGap(Cordova) targets Windows Phone 7.5 and below. Windows Phone development is not supported by default in Visual Studio 2012 and requires a separate installation for Windows Phone 8 here.
Unfortunately you need to be running Windows 8 for this installation to be successful and as I am still running Windows 7 I have been unable to go further than this. Maybe someone who has this installed can tell us if it works with PhoneGap(Cordova)
Answer: Visual Studio and Window Phone emulator did not works well at virtual machine. If you installed the emulator on separate partition, you have a better chance to succeed. I am still using Window 7.
You may also referred to the book : Mobile JavaScript Application Development, CH 5, section : PhoneGap - create a Window Phone Application @ page 122 / 168
Good Luck
D
Comment: Where did you see any mention of a virtual machine?
Comment: W Knight, you are off on a tangent here, your answer has absolutely nothing to do with the question

Phonegap in Visual Studio 2012