Category with no empty hom-sets from a given category.

Question: Is there any kind of "completion" to obtain a category for which there are no empty hom-sets from a given category?
Comment: Which do you want? A category with no empty homsets, or a preorder (a category for which every homset has at most one element)? Assuming you mean the latter, then what is your question? You're aware of a functor $Cat \to PreOrd$. This functor is left adjoint to the inclusion $PreOrd \to Cat$, so if that's what you mean by "completion" then sure, it's a completion. If you mean something different by "completion", then what do you mean?
Comment: Do you want any other properties? Of course it's easy to come up with dumb examples (e.g. assign each category the one-object category with just the identity morphism). I am moderately confident you cannot write down a left adjoint to the inclusion of connected categories (categories with at least one morphism between any two objects) into categories.
Comment: a category with no empty homs may - in general - be very different from a preorder. A preorder may have empty homs. So , like @tcamps I suggest you clarify your question
Comment: @magma. Thank you for the clarification.I do not need to have a preorder.Just having no empty hom-sets is enough.
Comment: @gibarian Preorders (categories with _at most_ one arrow in each homset) have (almost) nothing to do with having non-empty homsets (categories with _at least_ one arrow in each homset): if a category is a preorder and has nonempty homsets, then it has exactly one arrow between each object, i.e. is an [indiscrete category](http://ncatlab.org/nlab/show/indiscrete+category) and is equivalent to the terminal category. Of course, the (unique) indiscrete category on the set of objects of your original category is exactly the construction that Magma discusses below.
Answer: The question statement needs to be cleaned up. This question has nothing to do with preorders.
Let $Cat$ denote the category of categories and let $Cat'$ be the full subcategory of categories which have at least one arrow in each homset. The most straightforward reading of this question is

Does the inclusion $Cat' \to Cat$ have a left adjoint?

One expects the answer to be no, because the definition of $Cat'$ is rather unnatural. In fact, the answer is no, because the inclusion does not preserve limits. To show this, it suffices to specify two arrows in $Cat'$ whose equalizer (in $Cat$) does not lie in $Cat'$.
Well, let's try the simplest possible thing. Let $C$ be the category with two objects $X,Y$, and morphisms freely generated by $f: X \to Y$ and $g: Y \to X$. Let $D$ be the category with two objects $X,Y$ and morphisms freely generated by $f: X \to Y $ and $g_1,g_2: Y \to X$. For $i=1,2$, let $F_i: C\to D$ be the unique functor sending $X \mapsto X$, $Y \mapsto Y$, $f \mapsto f$, and $g \mapsto g_i$. Then the equalizer of $F_1$ and $F_2$ is the arrow category (objects $X,Y$ and a single non-identity arrow $f: X \to Y$), which does not lie in $Cat'$.
On the other hand, let $Cat_*$ denote the category of categories enriched in pointed sets. So an object is a category equipped with arrows $0_{xy} \in Hom(x,y)$ for each homset, such that $0_{xy} f = 0_{xz}$ for every $f: y \to z$ and $g0_{xy} = 0_{wy}$ for every $g: w \to x$. A morphism is a functor $F$ such that $F0_{xy} = 0_{FxFy}$. Then the obvious functor $Cat_* \to Cat$ has a left adjoint, induced by the left adjoint to the natural functor from pointed sets to sets. So if $C$ is a category, its image under the reflection $Cat \to Cat_*$ is the category $\tilde C$ where $Hom_{\tilde C}(x,y) = Hom_C(x,y) \amalg \{0_{xy}\}$ and composition defined in a way that you can hopefully guess.
We can also consider a category whose objects are similar to the objects of $Cat_*$ as described above, except without the conditions that $0_{xy}f =0_{xz}$ and $g0_{xy} = 0_{wy}$ (and morphisms as above). There is also be a left adjoint to the inclusion of this category into $Cat$: it sends $C$ to the category freely generated by $C$ along with one new morphism in each homset (by taking composites, though, we end up with lots of new morphisms in each homset).
Answer: There is a canonical construction along the lines you request:
$O: Cat\rightarrow{Set}$
the functor assigning to each small category the set of its objects, has a right adjoint
$M: Set\rightarrow{Cat}$ the functor which assigns to each set $X$ a category with objects $X$ and exactly one arrow in each hom set.
Now, think about it: in a category where you have exactly one arrow between any objects $a\rightarrow b$ and exactly one $b\rightarrow a$ and exactly one $a\rightarrow  a$ and one $b\rightarrow  b$ (the identities),  $a\rightarrow b$ and $b\rightarrow a$ must be inverse of each other, that is $a\rightarrow b$ is an isomorphism.
Moral: all objects in the categories obtained by applying $M$ are isomorphic to each other
That's why I called this functor $M$, because it "merges" all objects in the original category into an isomorphic blob.
I am not aware of an official name for functor $M$. Please let me know if there is one?
Mac Lane's CWM 2nd edition page 90  ex. 9 describes this construction.


Shia view: With whom is nikah al-mut'ah allowed?

Question: According to the Shia view of Islam, is mut'ah marriage allowed with one's daughter, one's sister or one's sister-in-law?
Comment: At least two -if not all three- of the kinds of relatives you've quoted are clearly haram to marry by qur'an, So this question hardly makes sense if it was not meant to descredit shi'a.
Answer: All of these are obviously forbidden, because the Qur'an says:

Prohibited to you [for marriage] are your mothers, your daughters, your sisters ... And [also prohibited are] ... you take [in marriage] two sisters simultaneously ...
Qur'an 4:23

Basically:

Matrimonial relation is forbidden with women who are considered one's Mahram, for instance, mother, sister, and mother-in-law.
Ayatollah Saanei

And who a man may marry is the same in indefinite and fixed-term marriages:

There is no difference between the indefinite and the fixed-term
  marriage except [mahr, inheritance, living expenses, equal share in the case of polygamy, and waiting period after divorce]
  Islamic Law, Ayatollah Shirazi (pdf)

So it's going to be what you would naturally expect.  Nevertheless, here's Shia scholars enumerating these relatives directly:

It is forbidden to marry some of the women such as the mother,
  sister, and mother-in-law.
Normally, non-mahram male and female can marry; the exception is – for example – while married to his wife a man may not marry his sister-in-law (his wife's sister).
Islamic Law, Ayatollah Shirazi
Matrimonial relation is haraam with women who are one's Mahram, for instance, mother, sister, daughter, paternal aunt, maternal aunt, niece (one's brother's or sister's daughter) and mother-in-law.
Women with whom matrimony is Haraam, Ayatollah Sistani
... except for certain categories of woman whom he cannot marry for they are forbidden due to blood relationship. These are: ...

Sister-in-law, at the lifetime of his wife, for it is forbidden to marry two sisters at the same time.

Jurisprudence Made Easy, Ayatollah Sistani
Answer: <code>                                  In the name of Allah
</code>
Briefly speaking, Nikah al-Mut'ah has similarity with permanent marriage in many laws -- although it has its specific conditions, too. Meanwhile, it needs much explanation to elucidate the issue completely; but, in short, (AFAIK) it is haram to married to:
Maharems, such as:

Mother, sister, mum-in-law, sister-in-law, aunts and so on.

Sources:

fa.wikishia.net
www.makaremshirazi.ir
Answer: Shiite opinion: With whom is mut'ah marriage permissible?
Temporary marriage is like permanent marriage; Therefore, in this form of marriage, marriage with those who are incestuous is forbidden, such as mother, sister, mother, grandmother, aunt, aunt, nephew, niece, foster sister, etc. Also, marriage with women who for some reason is forbidden. To be; You can marry other women.
Ref: http://www.rohani.ir/fa/ndt/842/%D8%A8%D8%A7-%DA%86%D9%87-%DA%A9%D8%B3%D8%A7%D9%86%DB%8C-%D9%85%DB%8C-%D8%AA%D9%88%D8%A7%D9%86-%D8%A7%D8%B2%D8%AF%D9%88%D8%A7%D8%AC-%D9%85%D9%88%D9%82%D8%AA-%DA%A9%D8%B1%D8%AF-


How to hide the Contents of a 7-Zip SFX Archive?

Question: I've just Created a 7-Zip SFX Archive containing my Test Results. But whenever I open the File.sfx.exe with 7-Zip from the Context menu as Open Archive, I directly get the SFX Contents. I want my users to go through the extraction GUI before getting Access to the file. I'm not speaking of Silent Extraction. Even Tried UPX but of no use. Your help will be solely appretiated. Thanks.
Comment: I don't think this is possible. If you are able to extract an archive you are also able to view the contents ...
Answer: The only way to do this is to have the file extract the data in a way that 7-Zip cannot read.  If 7-Zip can read the data, then 7-Zip can show the contents, because that is what 7-Zip does.
Consider making multiple archives.  One way you can probably achieve your goals is to place an archive within an archive.  Make the inner archive perfectly accessible by 7-Zip, but that won't matter because nobody can see the inner archive until they first crack open your outer archive.
The inner archive can be created with 7-Zip and provide desirable features like compression and keeping track of multiple files.  By using a standard format, you don't need to learn how to implement all of the quirks of a standard format, but you get the benefits provided by the common support of that format.
The outer archive can be some custom format.  If you're a programmer, you can easily create a custom archive format.  Maybe your format simply reverses every 5th bit, which would effectively destroy 7-Zip's ability to make sense of the file.  Then, when someone runs the custom extractor you create, you flip every 5th bit, and run the resulting file (which is the 7-Zip executable).  Your custom extractor can also have a GUI and do whatever else you're seeking to have happen.


Embeddings of $\mathrm{GL}(n-1,q)$ into $\mathrm{GL}(n,q)$

Question: Let $n>2$ and $q$ be a prime power. I want to find all the embeddings of $\mathrm{GL}(n-1,q)$ into $\mathrm{GL}(n,q)$. An embedding I first thought of is as following. Let $V$ be an $n$-dimensional vector space over $\mathrm{GF}(q)$ and $H$ is a subgroup of $\mathrm{GL}(V)$ fixing a nonzero vector in $V$. Then $H$ is isomorphic to $\mathrm{GL}(n-1,q)$.
Comment: Judging from your last sentence, I suppose you should correct your second sentence : your question really is "Are all embeddings of $GL(n-1,q)$ into $GL(n,q)$ natural?" not "Can $GL(n−1,q)$ only be embedded into $GL(n,q)$ in the natual way?"
Comment: @EwanDelanoy: I agree that the formulation you suggest is clearer than the one in the question, but is the latter really wrong? The only thing I can really find wrong with it is the use of "the": there are of course many natural ways to embed $GL(n-1,q)$ into $GL(n,q)$. The last sentence can be taken to define the notion of "natural" more precisely.
Comment: @MarcvanLeeuwen I agree with you, but I believe I'll not be the only one confused at first by the unclear phrasing.
Comment: @EwanDelanoy@MarcvanLeeuwen Sorry for my quite unclear phrasing, I should have raised the qustion as Derek's.
Answer: So the question should be: if $H$ is a subgroup of ${\rm GL}(n,q)$ isomorphic to ${\rm GL}(n-1,q)$, then does $H$ necessarily fix two complementary subspaces of $V$ of dimensions $1$ and $n-1$?
This is a nontrivial question. Let $K$ be the field of order $q$. Then the only simple $KH$-modules of dimension less than $n$ have dimensions 1 and $n-1$, so the constituents of $V$ as $KH$-module must have dimensions $1$ and $n-1$, but then the question is whether this module is completely reducible, and that depends on the 1-cohomology of $H$ on the $(n-1)$-dimensional constituent.
There are some instances in which there are embeddings that are not completely reducible, so the answer to the question is no. These include $n=3$, $q=2^k$ for $k \ge 2$, and also $n=4$, $q=2$. I think the answer is yes in all other cases, but I would not bet on it!
Added later: here is a rough description of the non-natural examples when $n=3$ and $q=2^k$. Consider first the subgroup of matrices of the form
$$\left( \begin{array}{ccc}a&b&0\\c&d&0\\x&y&1\end{array} \right).$$
in which $ab-cd=1$. This is a semidirect product of $K^2$ with ${\rm SL}(2,q)$ with the natural action. It turns out that $H^1({\rm SL}(2,2^k),K^2)$ is nonzero, and has dimension 1 over $K$, when $k \ge 2$.
Let $C \cong {\rm SL}(2,q)$ be the a complement of $K^2$ corresponding to a nonzero element of $H^1({\rm SL}(2,q),K^2)$. Then $C$ does not act completely reducibly on $V$, and the subgroup $H$ gerenrated by $C$ and scalar matrices is isomorphic to ${\rm GL}(2,q)$. Then (depending on whether your matrices act on the left or right) $H$ fixes a 1-dimensional or a 2-dimensional subspace of $V$, but not both, and the transpose of $H$ does the opposite. So there are just two conjugacy classes of non-natural ${\rm GL}(2,q)$s in ${\rm GL}(3,q)$.
Comment: I just edited my question to get rid of the unclear phrasing "natrual" and then see your answer. I should have formulated my question exactly as you state here. However, now that I have generalised the quesion as finding all the embeddings, can we know all the emddings for the case $(n,q)=(3,2^k)$?
Answer: If your last sentence is you definition of "natural", then the answer is that other embeddings are possible. Since the ones below follow a simple pattern, you will probably want to extend "natural" to include them as well.
You can always embed $\mathbf{GL}(n-1,F)$ into $\mathbf{GL}(n,F)$ by sending $A$ to the block matrix
$$
\begin{pmatrix} A&0\\0&\det A\end{pmatrix}.
$$
Unless $F=\mathbf{GF}(2)$, the image of this embedding does not have any fixed vectors.


Using an old graphics card on a new mother board

Question: I will be getting my ASUS P8Z77-V Z77 MB ATX 2400 (O.C) SLI Crossfire motherboard today that will be running the Intel Core i7-2600K. I have an old EVGA GeForce 8800GT and was curious if I could use it on this board. I've been out of this for quite a while and don't really know how old components work with new ones. What are the considerations when placing older components into newer boards? Will the on-board Intel® HD Graphics (CPU embedded) display surpass the capabilities of said card?
Answer: As long as the graphic card uses a PCI-E Slot, which I assume it does, you will have no problem using it on that board. Unless it is a monster card with extraordinarily great length or cooler.
The embedded GPUs in the Intel chips are not that bad, they can play HD movies without a problem, but for gaming I would not reccommend using them. If you do not play with your computer you should take into account that a GFX-card like the 8800GT will use up a lot of additional energy, so it might be relevant on your electric bill at the end of the month.
Comment: thanks. I don't really plan on playing games at this point as I use my 360 for that, but HD movies are definitely a must. It will fit into the case as it supports up to about 13 inches, and the 750W PSU will be enough. What you said about the PCI-E slot was my biggest concern. Thanks for addressing that.
Comment: I am using an i3 with the HD2000, and it plays HD movies without a problem (on linux, but should make no difference).
Answer: There might be some issues with getting the drivers for the old card if it is really 'that' old.  But as Walter suggested, so long as the motherboard has a slot that has the same form factor as the graphic card you should be good to go.
Comment: I use the card in a Nvidia 680i LT SLI right now that I bought with the card. They are both circa 2007 made and I still get notification of updates for the card, so that should be good.
Comment: You definitely have PCI-E slots on the motherboard.  One of the slots is a x16 channel and the other is x1.  I imagine an Nvidia card from that time frame should be ok to use in a new machine but you can probably check on that through Nvidia or whatever operating system you are using documentation.


Could picamera capture images without adjustment?

Question: I'm performing measurements using the picamera to test its sensor ov5647. But whenever I took images, it seemed there were adjustments. Gain, white balance and etc. Could I turn off all the adjustment function and just take raw image data? I know there is a bayer format, but I'm not sure if it is the data without adjusted.
Answer: Bayer format captures contain the data prior to almost the entire image processing pipeline (demosaic, auto-gain, auto-white-balance, lens-shading, denoise, etc. etc.). The one exception is flips; if you've set vflip or hflip you need to account for the Bayer pattern being flipped accordingly, but that's it. Other than, it's the raw (10-bit) data straight from the sensor. See the bayer capture recipe for information on unpacking the 10-bit format and a rudimentary de-mosaic algorithm.
Comment: Thank you so much for the clear answer. But if you don't mind, I'd like to ask one more thing. Could I avoid auto-gain adjustment by fixing ISO speed? I'm considering using RGB565 format and wondering if I can still disable the auto adjustments.
Comment: No - I'm not exactly certain what fixing the ISO setting does, but I can say it doesn't fix the automatic gains. Fixing the gains can be done by setting `exposure_mode` to `'off'`. However, be aware that this will simply fix the gains (which can be queried with `analog_gain` and `digital_gain` where they are); at the moment the firmware provides no means of setting the gains to specific values.


Is there performance penalty on managed code when reading/writing high data volume on TCP/UDP socket compare to unmanaged code?

Question: Do you think C# TCP/UDP socket use in the managed application can handle (roughly) same amount of data as native C++ version? If not, what is data amount we shall consider native or c# is better to use and what is the biggest obstacle in the implementation on managed side?
Answer: It is my experience that the network speed and latency are bigger factors in regards to performance than managed or unmanaged code. Actually that is the same in regards to database access.
Answer: The answer must depend, to some extent, on the hardware.
I suggest that you write little prototype programs, to experiment.
Answer: Both can handle the same amount of data. The question is speed and memory use. C# has proven itself negligibly slower in most scenarios: so there is no reason not to use it. There are a couple of memory implications when using C# for sockets (mainly, a lot of pinning occurs which will fragment your heap). The most important thing to get right is documented here. If the link is broken (isn't working my side but maybe that is our dodgy internet) Google has it cached.


ASP.NET CORE 2.0 Authentification

Question: Hi I've created a new ASP.NET Core 2.0 MVC Web App (.NET Framework 4.6.1) with Individual User Accounts.
I'm quite confused regarding what version of Identity is being used by this template. I assume its must me "ASP.NET Identity 2.0", but if I have understood it correctly there's also something called "ASP.NET Core 2.0 Identity 2.0". So which one is being used by the template?
Answer: UPDATED ANSWER:
Well - Microsoft.AspNetCore.Identity is the core package or foundation of the AUthentication in AspNetCore. It just provides the contracts for Authentication stuff. You still need a mechanism to store the Authentication related data.
Microsoft.AspNetCore.Identity.EntityFrameworkCore - provies the storage related things for your Authentication using EntityFrameworkCore as the data layer. Basically it provides you Code First implementation of data storage.
When you look at the package definition of Microsoft.AspNetCore.Identity.EntityFrameworkCore on Nuget here: https://www.nuget.org/packages/Microsoft.AspNetCore.Identity.EntityFrameworkCore/ - pay close attention to dependenies. Microsoft.AspNetCore.Identity as one of the core dependency.
Go to Solution Explorer of your project in Visual Studio. Expand the Dependencies node and you will see that Microsoft.AspNetCore.Identity is indeed referenced. Here is the screen shot from my VS:

hope this helps

With ASP.NET Core - everything you use as additional package has to be core based. With respect to Authentication - its commonly known as ASP.NET Core Identity. The package used is known as "Microsoft.AspNetCore.Identity" currently this package is at version 2.0.1. This is the version which you will use for ASP.NET Core 2.0 projects.
i have Visual Studio 2017 (15.4.4). I just created a ASP.NET Core 2.0 application with .NET Framework 4.6.1 as the hosting platform. i created the web app with "individual user accounts" auth type.
If you open the .csproj - you can look at the PackageReferene nodes. It uses the following packages:
<code><PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.0.1" />
</code>
Also, you can learn all about Identity here - https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?tabs=visual-studio%2Caspnetcore2x
Hope this helps.
Comment: I still don't get! if the package used is Microsoft.AspNetCore.Identity, then why can't I see that package in the .csproj file. It is just showing aspnetcore.identity.entityframeworkcore.
Regarding the link reference I have looked at it again and again. The documentation on asp.net core identity 2.0 is almost non existent.
Comment: i have updated the information. check my answer again
Answer: Look in your .csproj file. Do you have a package reference named
<code>    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
</code>
If so, you are using Microsoft.AspNetCore.Identity 2.0.0. This reference package contains all off the This package consists of every single package shipped by Microsoft as part of ASP.NET Core 2.0, including all the Razor packages, MVC packages, Entity Framework Core packages, and more. You do not have to reference individual packages when using this package, but you can see them in the dependencies.

ASP.NET CORE 2.0 Authentification


Connect two 30" ACD on a 17" MacBook Pro (early 2011)

Question: My setup is a 30" Cinema Display (2560x1600, DVI) from around 2007, and a 17-inch, Early 2011 Macbook Pro. I'm wondering if I can add a second external monitor via a USB adaptor or any other solution. Ideally another monitor of the same size and resolution.
Comment: A couple people mentioned Thunderbolt, but there's not much hardware out there yet. The 17" is the only current Mac to include an ExpressCard slot... maybe check if there's an ExpressCard video adapter that will work with Mac (and I'm not sure there is). I guess it depends on where the bottleneck is - if it's VRAM, that seems like it would work, but if the CPU simply can't handle that much screen real estate, I guess you'll have to give up and use a lower resolution.
Comment: You want to add another 30" to your MacBook Pro?
Comment: Yep, updated the question to clarify.
Comment: Apple didn't released a MacBook Pro in 2012, so you might want to update this information as well :)
Comment: Sorry, my bad. Updated now based on About This Mac info.
Answer: Yes, you can add another monitor if you use a USB video adaptor.  No, there are no USB video adaptors that support dual link DVI monitors such as the 30" Cinema Display.
Many USB video adaptors will support 1920x1200, some a little bit higher.
However, you will find the USB video to be slow and annoying if you are used to high performance video.
I suggest you consider using two Apple Thunderbolt displays which are a bit smaller and a bit lower resolution at 2560-by-1440, but you can connect two of them, and you'll actually find as good as your cinema display is, technology has improved noticeably since its release, and the thunderbolt displays are absolutely stunning.
You might be able to connect one thunderbolt display, then attach the thunderbolt-DVI adaptor to that display and attach your cinema display.
To that end, you might find some of the information in this question useful:
How to connect two non-Thunderbolt displays to the Macbook Pro 2011 via Thunderbolt?
Answer: If you take a look at the Apple support pages, there is stated:

Dual display and video mirroring: Simultaneously supports full native
  resolution on the built-in display and up to 2560 by 1600 pixels on an
  external display, both at millions of colors

So I don't think you'll be able to hook up two 30" screens (2560x1600) to your MacBook Pro.
But if you set your resolutions to something smaller, you can buy some 3th party hardware to support dual screen modus...
Here is an overview of the available resolutions and the product you can buy (Matrox).
Comment: But I believe it's possible to do so if you use a USB adaptor. I'm just not sure if I can do it with my own particular setup (as they mightn't work with the old Cinema display).
Answer: I found a couple of ways that you might be able to connect multiple displays to your macbook pro. USB 2.0 to DVI Display Adapter, & Air Display. I don't know if either of these things will work but let me know!


Touches getting Buffered

Question: In my game When i am applying touches on my subView very fast it just buffered all the touches and detect it after some time. And it apply all the touches result at a time. Means it takes noticeable delay to detect my touches on iphone so please can any one tell me how to solve this problem. So it will detect my touch when i am doing touchesBegan. Also tell me its necessary to do hitTest in my program.
Please reply as soon as possible its very important for me.
Answer: This sounds like it's related to your earlier question about missing touch events when a timer was firing.  As was suggested there, you need to move your processor-intensive tasks to a background thread so that the user interface can remain responsive.  Make sure that the processing tasks in that background thread are granular enough that they can be interrupted when user input changes conditions.
Using hitTest is usually unnecessary with UIViews, because they do their own touch event handling.  It may be required if your user is interacting with standalone CALayers.

Touches getting Buffered


Update inverse covariance matrix to add new observation

Question: If I have a sample of size n and the sample mean Xbar, sample covariance matrix S and inverse of covariance matrix, S^-1. How do I update the formula for each to add a new observation, say, X(n+1)?
Sample mean and S should be easy. But I'm wondering how to update the formula for S^-1 using just these...
Comment: If it is feasible to work with Cholesky factorizations, it seems that Cholesky rank-1 updates would work here. Also, IIRC the Sherman-Morrison-Woodbury update mentioned below is not numerically stable.
Answer: Perhaps you are looking for the Sherman-Morrison-Woodbury update, which allows to perform a rank k update directly to the inverse of a matrix rather than inverting a rank k update to the matrix itself.
It is used heavily in statistics and optimization literature. The form is slightly daunting but it is easy to verify its correctness and it is well worth understanding as it is quite commonly used.
Comment: Thanks...that seems fine and I'll look through the proof too. However, I was trying to prove the formula for S(n+1), but I'm getting some extra term that doesn't cancel out. Is there a formal proof somewhere for sample covariance too?
Comment: Perhaps this is what you are looking for? I remember deriving it by hand and it is easy to mess up the algebra.

https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
Comment: Yes that's where I saw the formula, however i'm getting an extra multiplication for the 2nd term, i.e. (n^2+1)/(n*(n+1)) times the second term. Ideally it should have canceled out, but I have checked my derivation a few times. Not sure what I'm missing.


Copy files from Setup location to installation dir

Question: I am working on my Wix project and have 2 questions:
1) How can I copy file from the same location as my .msi is to the destination folder specified during installation. This file is not part of .msi package but a customized file that needs to be copied after the installer copies the main code files.
2) If this customized file is not available at the location where .msi file is, then I need to show up a OpenFile Dialog so that user can specify the location of this file.
In short, by default the installer should look for the customized file at the same location where the installer is and if the file is not available then show OpenFile Dialog.
Any suggestion or sample code snippet would be very helpful as I am bit new to WIX world.
Thanks for your time.
Answer: Ok, first thing you should find out if the file is there. Use DirectorySearch/FileSearch elements for this.
Next, based on the file search result (it will end up in a certain property) schedule and condition a new dialog. You can find how to customize your dialog UI sequence here.
And finally, use CopyFile element to do the copy work.


Merge only the changes associated with a particular branch in GIT?

Question: I am running into an issue when merging a particular branch into another branch.
We have a total of 3 branches we base our projects on. DEV, SUP, master.
Developers base off their branch off of DEV and when the baseline their tickets I merge them in DEV for customer to test. There are no extra changes at this point because they based their local branch off of DEV.
The issue is when I attempt to MERGE for example branch DEV12345 into SUP, it shows a bunch of changes irrelevant to the changes done in DEV12345 branch(commit).
I have read about cherry-picking and some other solutions, but I am just starting out using GIT, so not really experienced enough to follow some of the answers I have seen.
I do not want to cherry-pick because it's my understanding when I MERGE SUP into master, I may lose the commits or have more merge-conflicts?
$ git merge DEV12345 --no-commit
$ git status

At this point it shows bunch of changes I don't want.
I did try this which I got from another solution here in Stackoverflow.
$git add <fileNamePath>
$git clean -f -d
$git reset HEAD

I think this is what I did. I have verified this did only bring in the specific change I wanted, which was that only 1 file from 100 files different.
And I believe if I am not mistaken, since I did my own
$git commit -m "xxxxxxxxxxxx"

I would have lost the original author's commit/history, which it's not favorable for us.
Is there an easier way to doing this? That will also keep the history when I eventually post to master.
We post to SUP once customer approves a ticket, then once I have posted all approved tickets into SUP, I merge SUP into master, which is our Live system.
Can someone give put a solution in simple form so a starter can understand please?
Thanks everyone!
Answer: Git allows you to squash commits into one (or more). It's based on the interactive git rebase application. Maybe, you can merge into SUP and then squash your commit together. Therefore, you keep the commits in your branch while having a meaningful merge into SUP.
For more information about git rebase, please check this recipee or the git-book.
Bye


getting the content type of the thing you searched in the display template

Question: Basically what the title says I want to say what content type each search item is in the display template. How is this done???
Answer: Yes you can achieve this by updating the default item display template or make a copy of it and customize it based on your requirement.
Make sure you map ContentType field in ManagedPropertyMapping of display templates
some thing like below in your display template
'Line 2'{Line 2}:'ContentType'

Now in the html section you just append content type name contained in "line2" where ever you need. Like in below add a div next to oob elements

_#= line2 =#_


iTunes Match and Library on NAS

Question: I just got a new MacBookAir for my home. It will primarily be used at home with some occasional use out of the house. I would like to use the iTunes server on my Synology NAS to store a downloaded copy of my iTunes libray for use a time. My understanding is that I can do this by pointing iTunes to the iTunes server directory on my NAS. Here's the issue, I believe that when I am out of the house, it will search for that library and not find it. Will iTunes know to automatically revert to iTunes Match streaming if it can't find the library?
Comment: why don't you just use dyn-dns so you have access to your nas from all over the world (as long as you have internet)?
Comment: I have access to the files I need on my NAS when I am not home via the Synology Cloud Station package. I am fine streaming music via iTunes Match if I am not home.
Comment: for me itunes match isn't the option (don't want to pay to get my music in a cheaper quality) - i can't tell u if it will do what you want and also can't test it - but i solvedthe same problem as you have  with using the privat sharing  of itunes on my server (currently just a nas with dyn.dns) - itunes on my mac is set up with a local library and just a few audio files i always need to have (also when there is no internet) every thing else i stream from my nas over private sharing
Answer: It will not be able to automatically switch. What you'll have to do is create a new iTunes library that is used for streaming only. To do this, open iTunes while holding the Option key. Then selected "Create new library" and name it something different, I used "iTunes Streaming". Then, simply turn on iTunes Match and you'll see all your playlists populate. Once you do this, you'll be able to stream all your music directly from Apple. When you're back home, open iTunes again while holding the Option key and select your original library.

iTunes Match and Library on NAS


Naming of paragraph subsections

Question: Regarding the questions: What do you call those divisions of a book bigger than a paragraph but smaller than a chapter?  Is not such a division best known as a PARICOPE from the Greek PARIKOPE or "a cutting around" as in the selection of a passage from the Bible in religious services?
Comment: This is really just an answer to the original question, and the answers here are either comments on it, or (rather missing the point) duplicates of older answers there.
Answer: No: most English speakers will fail to understand the ecclesiastical term of art pericope even if you spell it correctly, and section (sense 2) is in everyday use for that purpose.
Answer: Also passage can convey the concept:

(Literary & Literary Critical Terms) a section of a written work, speech, etc, esp one of moderate length.

Source:Collins English Dictionary
Comment: As a teacher of literature I generally use "passage" to mean a portion that I or a critic or a student might select for attention, but that is *not* deliberately demarcated from its context by the author or editor. "Section" applies whether it is typographically demarcated or not.
Answer: LaTeX divides a Book into Chapters, a Chapter into Sections, a Section into SubSections, a SubSection into SubSubSections.
I think the notions propounded by LaTeX are representative of fairly modern thinking.
I am not sure whether a pericope corresponds to a Section, a SubSection, or a SubSubSection.

Naming of paragraph subsections


Is there a module that creates a jquery-like bar that displays system messages at the top of the page?

Question: Is there a module that creates a jquery-like bar that displays system messages at the top of the page. (exactly like the large, red bar on this site (stack exchange)?
Comment: I'm voting to close this question because it's asking for recommendations or suggestions on hosting, tools, modules, themes, distributions, books, tutorials, documentation, or other off-site resources.
Answer: You could have a look at the "Purr Messages" module - I haven't used this myself, so I don't know if it allows for the messages being displayed at the top - it says it creates a "jquery popup," which I suppose means an absolutely positioned div which either fades out or you can click away with your mouse.
I did something similar to this this on one site by simply editing page.tpl.php - but it sounds like you want a module, & not coding advice.
Comment: agreed and agreed. in order to get it 100% like the stack exchange bar you would have to customize the css but its a step in the right direction.
Comment: indeed ... depending on the template, may even need to muck around in the HTML if you want to get the whole body to shift downward in the super-swanky style of SE.
Answer: You can also check out the Absolute Messages module. I have used it many times. Here is a quote about it (from the module's project page):

Displays system messages in fully themeable colored horizontal bars on top of the page, similar to Stack Overflow / Stack Exchange network notifications.
Features:

when messages are displayed content is pushed down respectively, so that nothing is covered and everything could be still interacted with,
alternatively, messages could be fixed to the top of the browser's viewport, so they will always remain visible regardless of scrolling,
each message has its own "Dismiss" (close) icon,
optional "Dismiss all" icon is displayed if total number of messages exceeds value defined in module settings,
messages could be dismissed automatically after a specific time - configurable in module settings for each message type separately,
hovering mouse cursor over messages resets dismiss timer,
provides option to re-show all already dismissed messages,
provides option to display only first n lines of each message, with remaining part shown after clicking on the message,
provides separate permissions to administer and to access Absolute messages,
full control over output with template files,
uses standard jQuery library without other modules or plugins dependencies,
falls back to standard Drupal's way of displaying messages when JS is not available (or when user does not have access absolute messages permission granted),
provides option to skip "has_js" cookie checking, which disables fallback to standard Drupal messages if no JS has been detected (for example in case of Pressflow, which dropped "has_js" cookie completely),
displays devel messages as standard Drupal messages.


Is there any way a UDP checksum could be inconclusive of error detection?

Question: If I am receiving data through UDP, with a checksum that checks out to show no data loss, is there a possibility that the checksum missed some errors. My data transmitted is split into 24-bits chunks by the protocol that uses the checksum. Similarly, if errors are detected through the checksum, does that fully guarantee that the error actually occured?
Answer: If you mean the optional (for IPv4, but required for IPv6) UDP checksum, then that creates a 16-bit checksum that conceptually matches multiple combinations of datagrams that are larger than 16-bits. There is no guarantee that a UDP datagram that matches the checksum is error-free, but the odds of an error are very small. Many errors that would match the checksum would prevent the datagram from reaching its destination.
If the checksum indicates an error, then something is wrong somewhere, and it is almost always corruption in the datagram. Other possibilities include an incorrect or buggy checksum algorithm on the part of the sender or receiver.
If you mean a checksum in the application data, that further protects the data, but that is off-topic here.
There are also the possibilities that bits get flipped in RAM or on a disk drive. It does happen, but not very often.
See RFC 768, User Datagram Protocol:

Checksum is the 16-bit one's complement of the one's complement sum of
  a pseudo header of information from the IP header, the UDP header, and
  the data,  padded  with zero octets  at the end (if  necessary)  to
  make  a multiple of two octets.
The pseudo  header  conceptually prefixed to the UDP header contains
  the source  address,  the destination  address,  the protocol,  and
  the  UDP length.   This information gives protection against misrouted
  datagrams. This checksum procedure is the same as is used in TCP.
<code>              0      7 8     15 16    23 24    31
             +--------+--------+--------+--------+
             |          source address           |
             +--------+--------+--------+--------+
             |        destination address        |
             +--------+--------+--------+--------+
             |  zero  |protocol|   UDP length    |
             +--------+--------+--------+--------+
</code>
If the computed  checksum  is zero,  it is transmitted  as all ones
  (the equivalent  in one's complement  arithmetic).   An all zero
  transmitted checksum  value means that the transmitter  generated  no
  checksum  (for debugging or for higher level protocols that don't
  care).
Comment: With large transfers over bad networks the TCP/UDP checksums are nowhere near strong enough to reliably prevent corruption.
Comment: This is correct.  The algorithms in use are a trade-off between performance and acceptable performance in the context of the original specs of these protocols.  In practice it's proven to be good enough in the majority of cases but there's no question that app-level sanity checking is never a bad idea.  There's also the interesting phenomenon that encryption can serve as an excellent error-detection mechanism.
Comment: Also, I think it will be pretty evident that there is a problem when there are a lot of checksum errors. It is very unlikely that all UDP datagrams will pass the checksum when a lot of the datagrams are damaged. I wouldn't trust any data if there is even one percent of datagrams not passing the checksum.


Is Landau theory for phase transitions valid only for "order to disorder" phase transition?

Question: In the Landau  theory we assume order parameter that is equal to zero at $T>T_c$ and none zero at $T<T_c$ which is valid only for order to disorder phase transition according to my understanding.
So that is mean that I can't use Landau theory on Liquid - Gas phase transition?
Answer: Away from the critical point, the liquid-gas phase transition is a first order phase transition, so you must use a theoretical description that treats it as one. The standard formulation of the Landau theory does not treat first order phase transitions, but it can be modified so that it does.
The liquid-gas phase transition through the critical point is second order, and the Landau theory can be applied to it.
Comment: but from what I understandood this theory describes only order to disorder phase transition, wich is not the case in liquid -gas. I would like for an example, or a link to a source that show how to treat the liquid gas with landau theory.
In addition, landau theory is handle with first order phase transition, you just need to write your Landau functional a bit different.
Comment: @Sagigever  the order parameter for vapour-liquid transition through critical point is density.
Comment: @ Andrew Steane,  density difference, strictly speaking
Answer: The Landau paradigm is getting a bit outdated in my opinion (not only) . There are plenty of different phase transitions which cannot really be categorised as first or second order. Enough to look at lattice models of quantum gravity or the standard model, but in analytic models also the study of Kibir-Żurek mechanism shows that. Many phases such as transition to spin glass, cannot be categorised according to order/disorder... Other aspects like long range entanglement can come into the picture.
The Landau description is a model related to the 20th century , when with 20th century technology we were able to create 20th century materials. Most of them could be analysed fairly easily in the labs. Nowadays we need to trap ions with lasers, excite composite systems, create a 2d lattice to give rise to anyons, create well designed lattices. One should look at phase transitions from a different perspective, because the old categorisation can easily break in many cases.
The Landau theory is not only valid to order-disorder but this is the most typical type of distinction, when your order parameter is zero or nonzero on the two sides.
Comment: Well, but the mean field approximation is misleading, it cannot really give (or rarely) higher order phase transitions. If you analyze a higher order phase transition with mean field approximation, you may find that its first order (mistakenly). This is what I meant, but there are sparks of truths in your comment too!
Comment: Surely if one adopts mean field approach (which is natural simplest assumption) then one gets the Landau model. So this is not going to be outdated; it remains the model which is obtained when a mean field approach is taken.
Comment: Agreed. But it is nice that one gets critical exponents, and their values are in the right ball-park.
Comment: @Kregnach 7,  "it cannot really give..higher order phase transitions."            According to Ehrenfest's classification phase transitions were labeled by the lowest derivative of the free energy that is discontinuous at the transition. It seems to me that if we take  $m^4$ and $m^6$ instead of $m^2$ and $m^4$ (where $m$ - order parameter) in the Landau expansion of free energy  we formally obtain according to this classification the third order phase transition and so on...


MacDraw II file recovery (resources in RESOURCE.FRK)

Question: I have old MacDraw II files. Each file has a its resource fork (I suppose) in a directory called RESOURCE.FRK. I tried FixupResourceForks to relink the files but without success. Then I could set the type and owner to open it in MacDraw again. Any idea how to relink the resource information?
Answer: Here are the steps of the solution that works given that you are working in Mac OS.

Install Mac OS 9, emulated through SheepShaver, this video tutorial shows how. You will create a Mac disk, as well as a folder used to share data with your host system.
On your Mac (host), run Disk Utility, and create a new FAT disk image. (New->Blank disk image->choose MS-DOS Fat). Create it (or copy it later) in the the shared folder previously specified so you can see it on the emulated mac.
Mount the new fat image and copy your files (with the RESOURCE.FRK folders) on it
Download Disk Copy from this page, unpack it, put the smi in the folder shared with SheepShaver, then on the emulated mac, copy the smi to your Mac disk (created in SheepShaver).
Run the Disk Copy smi, then open Disk Copy and drag drop the FAT image on it. This should mount it so you can see your problematic files.
Now the RESOURCE.FRK are invisible, merged with the data files, which can be open with their native application, in my case MacDraw II, which can be downloaded from abandonedware sites.

Note that Macdraw II will not display the files properly if in Million colours mode, just use the dock to change to thousand colours mode.
Answer: I not aware of any current software to work with resource forks.
Back in the day I did some programming with Mac OS X/carbon's C API to manipulate them, and seem to remember it being reasonably simple (if you know C). Those APIs should still be around, though deprecated.


Is self-improving artifical inteligence really unlimited?

Question: In complex enviroment, better inteligence gives you better chance to survive. But complexity of every real-world environment is finite. Assume that more inteligence need more computing power, more resources. Then one day self improving inteligence gets to the level when it can handle complexity of its environment optimally and improving itself will only consumes more resource but not gives additional advantage in that environment. Then artificial inteligence (because is inteligent) will stop self improvement and freezes its own inteligence at optimal level of inteligence for environment it lives in. And maybe in our environment, artificial inteligence can reach optimal state even before it overcomme human inteligence and then singularity will never happen. What do you think?
Comment: Complexity is not finite in every environment.  In an computational/logical environment we can define objects with infinite complexity.  For example, *almost all* real numbers possess this property.  I think you will need to restate your question, otherwise it will probably be closed for being "opinion based" and therefore outside of the site's desired format.
Comment: @Nick R: Good comment. I changed that sentence to "every real-world environment" :-)
Comment: I don't want to nit-pick, but even in a finite environment we can define objects of arbitrarily large finite complexity.  Two electrons interact in a way that is computationally more complex than "2".  There are (best current guess) 10^80 particles in the observable universe, but we may not be able to describe the observable universe with less that 10^80 bits.
Comment: @Nick R: Ok. You are right. Then, does inteligence grow lineary with available resources? If you give it two times power, will it be two times inteligent? I am not expert, but i have intuitive feeling that there will probable be some strong nonlinear relationship. Something like 4x more power to be 2times more inteligent or even worse. And because there are space-time-energy limitations there will be some optimal level of inteligence for every real environment.
Comment: I'm no expert either.  We do not know enough about reality to say whether or not it is computable in finite terms.  Any computer that is *intelligent* and able to reprogram itself should witness a period of  exponential growth of its intelligence before converging (perhaps slowly) on something *near* an optimal state.  The logical resources required by any computer are minimal - all computers are logically equivalent.  Adding physical resources will improve relative performance between computers and that relation too may be exponential, depending on the nature of added resources (cont'd...)
Comment: For example, a quantum computer's processing abilities grow exponentially with each qubit added.
Answer: The universe itself is limited, which means the possibilities of an artificial intelligence are limited. I think your question is "assuming an artificial intelligence would have a reasonable means to try to improve itself, would there be a point where improvement is either not possible, or where the AI would have good reasons to stop improving?"
An autonomous AI, even if it wasn't highly intelligent, could improve itself by buying better or more hardware. There might be limits how much improvement is possible that way. For example if the AI needs to use its intelligence to make money to pay the electricity bill and can only use what remains to improve itself, there might be a point where it grows to a size where the electricity bill gets too high.
Improving itself by improving its code is hard. Only a highly intelligent and well trained human could do this, so it would require a highly intelligent AI as well to do this. Much more intelligent than the average human. Again, improving say the intelligence of an AI that has an IQ of 180 might be so difficult that an AI with an IQ of 180 cannot do it. We don't know.
And then there might be a point where an AI has reasons not to improve itself. For example, if there is legislation that all AIs above a certain complexity will be destroyed out of fear, then the AI won't want to be covered by that legislation. Maybe if it increases its hardware, delays between components might increase and the AI might feel that as unpleasant. Or maybe improving itself might be hard work, and the AI might be too lazy.
Answer: Its optimal intelligence is limited only assuming the environment is finite in all aspects and that it has no goals other than to react to its environment as appropriately as possible.
However, this is not true when you consider time in our universe. Chaos theory roughly says that disorder increases over time and small differences in the initial states in two systems build over time. This implies that there may not be a maximum intelligence due to it thinking about the increasingly more long-term effects of the current state of the system.
The assumption also isn't true if it has creative desires. Creative desires would cause it to start imagining/thinking about its own theoretical universes and "things" once it gets bored with the environment it exists in and it feels there is nothing more to be gained from the environment it lives in.


Removing a List from a Search

Question: I have a list where new users are added as they input there information. The problem is that if a user do a search they can pull up other users ss. How can I prevent other users from searching in the search for other users information. If that make sense?
Answer: You can remove the list from search is this way -  go to list advanced setting > select the radio button disable this list to appear in search crawl.... something like this from advanced setting you will get a configuration, so that this list will be ignored in the crawling by search service.
Answer: To keep items and document in apps out of SharePoint search results, follow these steps:

Navigate to the app that you want to remove from search by clicking the Settings gear icon and choosing Site Contents.

2.Open the app settings page by clicking the List or Library tab of the Ribbon and then clicking List Settings or Library Settings.

Click the Advanced Settings link in the General Settings section.
In the Search section, select the No radio button and Click OK to save the settings.

The content of the app will not be indexed the next time the search engine indexes content.
Likewise, a URL can be removed from the results by clicking the Search Result Removal page in the Queries and Results section of the Search Service Application management page in Central Administration and entering the URL that should be removed from the search result.

Removing a List from a Search


My desktop with conky appears to stack up on itself

Question: I recently downloaded Conky and I'm very satisfied with it however there is one issue that I cannot seem to figure out. My conky appears to stack up on itself, and it looks very distorted and weird. This isn't something that happens when it first starts, but that happens over time.
I have attached an image of before it stacks, and an image of around 5-10 minutes later. I'm not sure if its stacking every minute or not.
# Conky settings #
background yes
update_interval 1
double_buffer yes
no_buffers yes

# Window specifications #
gap_x 0
gap_y 40
alignment top_right
minimum_size 600 360
maximum_width 600
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
#own_window_argb_visual yes
#own_window_argb_value 0
#border_margin 0
#border_inner_margin 0
#border_outer_margin 0

This code is the only section I edited, in which I changed the gap to fit my screen, and changed
own_window_type normal

to
own_window_type override

in order to have complete transparency instead of the shadow.
Answer: I had the same problem.  I had to change own_window to be no


Complex conjugate and transpose "with respect to a basis"

Question: In my quantum mechanics notes, my teacher described the complex conjugate and transpose of a linear operator X as "with respect to an orthogonal basis." What does it mean to take a transpose or complex conjugate "with respect to a basis?" I also remember him saying that if you take the complex conjugate or transpose with respect to another basis, the result would be different. Why would that be the case, and can you provide an example in which it is true?
Answer: In a vector space over the field of complex numbers the notion of complex conjugation is basis dependent. You might say a vector is "real" if its components in some basis are real numbers, but if you change to another basis and the matrix expressing the new basis in terms of the old has complex entries then the "real" vector  will have complex components in the new basis.  Similarly, the notion of complex conjugation will change. To define "complex conjugation" in a basis independent fashion you need to select a set of basis vectors that  you declare to be real.  The technical way this is done is by introducing a real structure on the space. This is an antilinear map $R:V\to V$ such  that $R^2=$ Identity. Antilinear means that $R(\lambda {\bf x})= \lambda^* R({\bf x})$. A "real" vector is then one that is left unchanged by the map $R$.
More important is the concept of "hermitian conjugation", that, when the operator $M$  is represented by a matrix
in an orthonormal basis
$$
\langle {\bf e}_i, {\bf e}_j\rangle= \delta_{ij}
$$
by
$$
M ({\bf e}_i) = {\bf e}_j {M^j}_i,
$$
then the matrix representing  $M^\dagger$ is  given by transposing and complex conjugating the entries in ${M^i}_j$.  In a general basis, where
$$
\langle {\bf e}_i, {\bf e}_j\rangle= g_{ij}, \quad g_{ij}= g_{ji}^*
$$
however,
you need the full definition
$$
\langle M^\dagger {\bf x},{\bf y}\rangle= \langle{\bf x},M{\bf y}\rangle
$$
so
$$
{(M^\dagger)^i}_j = (g_{jk}{M^k}_l g^{li})^*
 $$
where $g^{ij}g_{jk}= \delta^i_j$. It is important to realize that Hermitian conjugation depends on the choice of inner product on your vector space.
Answer: Consider a linear operator $A$ on a complex Hilbert space, which we can take as two-dimensional for simplicity, and start off by considering its hermitian conjugate $B=A^\dagger$, which we define as the complex conjugate of the transpose on a given orthonormal basis $\beta$. Thus, if the operator $A$ has a matrix representation
$$[A]_\beta=\begin{pmatrix} a & b \\ c & d\end{pmatrix}$$
on the basis $\beta$, we're defining $B$ to have the matrix representation
$$[B]_\beta=\begin{pmatrix} a^* & c^* \\ b^* & d^*\end{pmatrix}$$
on that same basis.
Now consider what happens if we look at the matrix representations of these two operators on some different basis $\gamma$: then we know that the transformed representation of $B$ is given by a matrix-equivalence relationship of the form
$$ [B]_\gamma = U^{-1} [B]_\beta U,$$
where $U$ is the basis-change matrix, and we also know that if $\gamma$ is also orthonormal then $U^{-1} = U^\dagger$, so that
$$ [B]_\gamma = U^\dagger [B]_\beta U = U^\dagger [A]_\beta^\dagger U.$$
since we know that $[B]_\beta = [A]_\beta^\dagger$, by definition. Now consider what happens when we take the matrix representation of $A$ on the basis $\gamma$, $[A]_\gamma = U^\dagger [A]_\beta U$, and we take its matrix hermitian conjugate, using the known behaviour of the matrix transpose for matrix products and the trivial behaviour of the complex conjugate:
$$
[A]_\gamma^\dagger = \left(U^\dagger [A]_\beta U\right)^\dagger = U^\dagger [A]_\beta^\dagger U = [B]_\gamma.
$$
See what happened? The definition of $\boldsymbol{B = A^\dagger}$, initially made in a given orthonormal basis, holds in any orthonormal basis we care to take, or in other words the relationship $B = A^\dagger$ is basis independent: it holds at an operator level, and we don't need to specify what basis should be taken for the conjugate-transpose to be calculated.
(Moreover: the fact that this operation, which we defined in terms of a matrix representation in a given basis, does not actually depend on the basis chosen, tells us that there is likely to be a nicer, basis-independent way to define the hermitian conjugate of any abstract linear operator. This is indeed the case $-$ it's the inner-product-based definition which uses the relationship $\langle A^\dagger u, v \rangle = \langle u, Av\rangle$ for arbitrary $u,v$.)

The point that your instructor is making about the matrix transpose and the complex conjugate is that this basis independence property is not true for either of them.
To show that this is the case, a single counter-example is sufficient, so take
$$[A]_\beta=\begin{pmatrix} 0 & i \\ -i & 0\end{pmatrix}$$
as the matrix representation of your operator, and
$$
U = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & i \\ 1 & -i\end{pmatrix}
$$
as your basis-change matrix. Then it is trivial to verify that
$$
[A]_\gamma = U^\dagger [A]_\beta U = \begin{pmatrix} -1 & 0 \\ 0 & 1\end{pmatrix}
$$
is the matrix representation of $A$ in the new basis, and while both the transpose and the complex conjugate leave the matrix representation $[A]_\gamma$ untouched in the new basis,
$$
[A]_\gamma ^T = [A]_\gamma ^* = [A]_\gamma,
$$
they both change its sign in the old matrix,
$$
[A]_\beta^T = [A]_\beta^* = -[A]_\beta,
$$
so neither operation can be performed without specifying what basis it should be done in.
(Also, this bears emphasizing: the example above is completely generic, and there is only a thin sliver of examples of operators $A$ and basis transformations $U$ which preserve the matrix transpose. Basically any example you take, so long as you're careful not to make it too simple, will show the behaviour above.)
Comment: @mikestone There's multiple conventions in use with different terms meaning different things depending on precisely what notational framework is in use; tparker's confusion arises from just such a mismatch. What you're doing is adding in a further two or three separate conventions to the mix without specifying it. This is a serious question to you: how exactly do you envision that this will help?
Comment: This answer makes perfect sense to me, but I'm confused because I found a Wikipedia page that seems to give a basis-independent definition of the transpose: https://en.wikipedia.org/wiki/Transpose_of_a_linear_map. Could you clarify how this article is compatible with the basis-dependence that you explicitly demonstrate?
Comment: @tparker The matrix transpose is basis independent in *real* inner product spaces, basically. Depending on exactly how you define the various terms the semantics shift a bit, but the core difference will remain.
Comment: @tparker. If we have a map $M:V\to W$ the "transpose" referred to on your Wikipedia page is a map $M^*:W^* \to V^*$, Here $V^*$ is the dual space of $V$, i.e the space of  of linear maps $V\to {\mathbb C}$. If ${\bf e}_i$ is a basis of $V$ and ${\bf e}^{*i}$ is the dual basis so that ${\bf e}^{*i}({\bf e}_j)= \delta^i_j$, the $M^*$  (no complex conjugate implied) map is representated by the transposed matrix $M^*\mapsto  M^*T$. In quantum mech $M$ acts $M|n\rangle = |m\rangle\langle m|M|n\langle$ and $M^*$ as $\langle n|M= \langle n|M|m\rangle\langle m|$.
Comment: @mike That's inaccurate, or at least over-simplified. The Wikipedia page that tparker linked to is working in real vector spaces without being too explicit about that context, so the dual space is the space of linear maps $V\to\mathbb R$, not $V\to\mathbb C$. (Alternatively, one can interpret it as working on a complex vector space with a bilinear inner product instead of a sesquilinear one; this is not 'wrong', as it's still nondegenerate, but it's extremely uncommon.) Going on to pile a bunch of unclear Dirac notation on top of that notational confusion really doesn't help, I don't think.
Comment: @Emilio:  I don't agree. He is interested in quantum mech so it's nice to know that the "tranpose"  (called the "conjugate" in some  functional analysis books --- annoyingly so as   there is no complex conjugate involved)  is the same operator acting to the left on bra vectors. Also the Wiki page that I get from the link applies to a general field ${\mathbb F}$  and is quite explicit about $M:V\to W$ and $^tM:W^*\to V^*$. Are we linking to same Wki page?
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/98424/discussion-between-mike-stone-and-emilio-pisanty).
Comment: @tparker:  I try to explain this mathspeak physics-speak stuff in the appendix to our book, a draft version of which is at https://courses.physics.illinois.edu/phys508/fa2019/bookmaster.pdf.  The linear algebra stuff starts at page 835
Comment: @tparker If you want to apply the Wikipedia material you linked to a complex vector space, then you need to use a bilinear inner product, as opposed to the sesquilinear type used in QM. (Alternatively, you can completely ignore the inner-product structure, in which case the claim that "$^tf$ is represented by the transpose matrix $A^T$" is no longer true for complex spaces, and any connection to the matrix transpose is lost.) The object that Wikipedia calls the transpose is what QM calls the hermitian conjugate, $\hat A^\dagger$, in essence.
Comment: (Though, again, any mix-and-match between notational conventions is extremely liable to produce incorrect connections.) If you want a separate answer on these conventions, ask separately.
Answer: Here's a simple example, to supplement the good answers that have already been posted.
Consider a $2$-dimensional Hilbert space $\mathcal{H}$ over the complex numbers. Let $|0\rangle$ and $|1\rangle$ be two orthonormal elements (vectors) in $\mathcal{H}$, and consider the linear operator $Z$ defined by
$$
 Z|0\rangle = |0\rangle
\hskip2cm
 Z|1\rangle = -|1\rangle.
\tag{1}
$$
In the orthonormal basis
$$
 |a\rangle := \frac{|0\rangle+i|1\rangle}{\sqrt{2}}
\hskip2cm
 |b\rangle := \frac{i|0\rangle+|1\rangle}{\sqrt{2}},
\tag{2}
$$
the same linear operator $Z$ is given by
$$
 Z|a\rangle = -i|b\rangle
\hskip2cm
 Z|b\rangle = i|a\rangle.
\tag{3}
$$
Both bases are perfectly legitimate, and indeed there would have been no reason to prefer one over the other before seeing the definition of $Z$. So... what is the complex conjugate of $Z$?
To define the complex conjugate $Z^*$ of $Z$, we need to specify a basis. In the basis (1), we have $Z^*=Z$. In the basis (3), we have $Z^*=-Z$.
The adjoint $Z^\dagger$ of a linear operator $Z$ is defined so that
$$
 \langle A|Z^\dagger|B\rangle = \big(\langle B|Z|A\rangle\big)^*
\tag{4}
$$
for all $|A\rangle,|B\rangle\in\mathcal{H}$. The adjoint is defined independently of any specific basis. The adjoint of $Z$ is $Z^\dagger = Z$, no matter what basis we use.
Beware that the adjoint $Z^\dagger$ is usually denoted $Z^*$ by mathematicians. That's because the adjoint is the natural (basis-independent) generalization of the concept of complex conjugation. The complex conjugate of a matrix is not natural, because it depends on which matrix representation is used, as illustrated above.
Answer: In my mind, what it means is that, to take the complex conjugate or transpose of a linear operator, it first has to be expressed as a matrix. Expressing it as a matrix means that you have to choose a particular orthogonal basis.
It seems a bit confusing to me, because any matrix operator (apart from the identity matrix) expressed in (or translated to) a different basis is going to be different anyway, regardless of whether you then choose to take the transpose or complex conjugate.
So, the transpose/complex conjugate part to me seems irrelevant. Any matrix operator is defined with respect to a particular orthogonal basis, and if it is changed to another basis, the matrix (as in, the grid array of numbers) will be different.
Comment: I don't know why this answer is getting upvoted - it is dead wrong. Yes, obviously the matrix representation of a given linear transformation will depend on the basis in which it is represented, but **this is not the issue here**. The transpose, complex conjugation and hermitian conjugation (the combination of the first two) are all defined in terms of a given matrix representation, but the hermitian conjugate has the property that it commutes with (orthonormal) changes of basis, which means that it doesn't matter what basis you do it in, and (cont)
Comment: the dagger operation on the 'abstract' transformation can be defined without saying what basis of be taken for the transpose + complex conjugate. This is not the case for the bare transpose or the bare complex conjugation, which is the real issue in this thread. This answer completely misses the point, and it should either be completely overhauled or removed.
Comment: When you translate the matrix back to a map, that map will be different, depending on the basis you chose.  That is not true if you consider e.g. the dagger operation.
Comment: @NorbertSchuch sorry, I don't quite follow. What do mean by 'map'?
Comment: "Map" = "Linear Operator".  For a map $M$, the map $M^\dagger$ is basis-independent, but the map $M^T$ depends on the basis in which you define the transpose.
Comment: @emiliopisanty ok, thanks for your comments. I'll take another look at it and see if I can improve my answer.
Answer: Given a matrix $M$ (=written in some basis). Now imagine you want to rewrite it in a different basis.  The basis transformation is given by a unitary matrix $U$.
In the new basis, the matrix reads $M'=UMU^\dagger$. The transpose of $M'$ is then
$$
(M')^T = (UMU^\dagger)^T = U^* M^T U^T\ .
$$
On the other hand, if you first transpose the matrix and then change the basis, you obtain
$$
UM^T U^\dagger\ .
$$
In general, these will be two different matrices (in fact, they differ by a basis change $U^*U^{-1}$).
The situation is different if you for instance consider the hermitian conjugate $M^\dagger$, as you can easily check.


Atari 1040ST AV video output - blurred and jagged vertical edges

Question: I have an AV cable that connects Atari 1040STE with a AV to VGA converter. For some reason the vertical edges are not sharp, rather jagged or pixelated. I red that old atari would have an issue with modern display, as refresh rate of 15Hz is not supported. I was under the impression the converter would do the trick, but on the other hand, if I recall correctly refresh rate applies to highest resolution output to vga directly. Can you suggest where to look for a clue on how to fix it? Provided is a photo of the issue. Also included the components I used, maybe I went the wrong path. Perhaps any electronics inside is to blame and needs checking? Any feedback welcome as this is my first step in retrocomputing.
Answer: You are seeing dot crawl which is common when sending composite video into a low quality comb filter such as in that Video to VGA Converter box. To get rid of it, you will need a better comb filter (good ones are hard to find) or avoid composite entirely by converting from the STE's analog 15 kHz RGBHV to either the 31 kHz VGA that your monitor supports, or HDMI, DVI, or even S-Video depending on what the monitor accepts.
Some VGA monitors support 15 kHz RGB signals directly. For those monitors, all you need is a "passive" Atari ST to VGA cable. Unfortunately, it seems your monitor does not support 15 kHz RGB, so for you and others with the same problem, here are some other solutions:
If the monitor takes HDMI or DVI, the Open Source Scan Converter is a good choice that adds almost no lag. If price is a concern, look for a SCART to HDMI converter on eBay. It looks like this:

In either case, you will also need an Atari ST to SCART cable like this one.
Here is a video comparing this and other converters on the Atari ST.
Comment: As an aside: you'd also see the same dot crawl from the low-pass filters that preceded comb filters, if you were to find a display old enough. It's not a problem comb filters produce, it's to do with colour subcarrier phase varying from line to live, though it is one that later '3d' filters do a much better job at resolving.


custom instances of onepage checkout, possible in magento?

Question: what im trying to do is setup 3 different instances of the onepage checkout process, and i figured the easiest way to go about that was to create 3 new cms pages, override the xml with the following (taken from checkout.xml, see bottom of post for code) and have that work.
this loads all the content fine but when going through the steps as a guest it triggers some failure redirect (located in onepage.phtml i believe), and it looks like it doesnt understand what /checkout/onepage/saveMethod is (returns 403 error in browser), im assuming because im really in some instance of the cms page and not a checkout page, as in certain things are not being loaded behind the scenes.
i was hoping to use this method to customize this process as i felt it looked like the cleanest way to go about it without having to change too much, but im not really sure what exactly is not being loaded here to make this work and how to load it. i was trying to find a way to call mage_checkout something or other via xml to get the cms page to recognize it as checkout and have it work, but couldnt find anything.
if theres an easier way to do this, my end goal really is to have 3 separate sets of /template/checkout/onepage/ phtml templates to work with, as theyre all going to be different, attached to 3 different urls (and i was going to just hide the default /onepage/ checkout).
<code>    <!-- Mage_Checkout -->
    <remove name="left"/>

    <reference name="root">
        <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </reference>
    <reference name="right">
        <action method="unsetChildren"></action>

        <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"/>
        <block type="livechat/template" before="checkout.progress" name="livechat.chat" template="livechat/chat.phtml"/>
    </reference>
    <reference name="content">
        <block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml">
            <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml"/>
            <block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
            <block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/>
            <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml">
                <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/>
                <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
            </block>
            <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml">
                <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml">
                    <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
                </block>
            </block>
            <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml">
                <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
            </block>
        </block>
    </reference>
</code>
Comment: please explain what is the point of all that so we could actually understand the question
Answer: The best way to do this is to set up three sites or stores in your admin area. You then just have to set up a theme for each one as per the documentation. You can modify each theme/view individually as required.


How to import .dmx files (SFM sessions) into Blender

Question: I downloaded a model for SFM but the model is in .dmx format instead of .mdl format. Is there any way I can get the model from the .dmx file?
Answer: I am a complete noob when it comes to this, but I have found a bunch of videos and written a short list on how to get models from steam source filmmaker to blender with textures. This may or may not be helpful to you. The Youtube video I linked does not explain everything, but he gets you set up with most of the programs. I was able to get Lifeline from Apex Legends character model imported with bones, but I had to retexture myself. These are the personal notes I made.
https://www.youtube.com/watch?v=MXd_1aKBTF8
Moving Character Models from Steam to Blender
Programs Needed - Blender, VTFEdit, Crowbar, Steam - Join Source Filmmaker

Go to source Filmmaker on Steam browser
Don't open it. Type in search bar for model
Open crowbar and click download tab
Copy link on steam and paste in Item ID or link bar
Change output to folder name
Click download
Click on Decompile tab
Browse for MDL file in the created folder from step 5
Choose an output to folder
Click decompile
Once in blender, click import smd
Use VTFEdit for textures
Click on tools
Convert folder button in order to convert vmt files to png files
Use blender shader editor to apply textures

Image Texture => Color Ramp and Principled Shader
Color Ramp => Bump
Bump => Displacement on Material Output Node
Principled Shader => Surface on Material Output Node


Discrepancy in numbers between Bellum Judaicum and Antiquitate

Question: I'm trying to resolve the differences between Josephus' Bellum Judaicum [2.224-27 (2.12.1)] and his Antiquitates [20.105-12 (20.5.3)] with respect to the number of Jews massacred in the temple under Claudius. BJ has 30,000 while Antiquitates has 20,000. I was able to find the 20K at Gutenberg.org: (https://www.gutenberg.org/files/2848/2848-h/2848-h.htm#link20noteref-10).
I'm unable to confirm the 30K number anywhere. I'm wondering if the reference I'm using is incorrect in the 30K stat. Any insights would be greatly appreciated. Thanks!
Comment: I'm voting to close this question because it is better suited for History Stack Exchange.
Answer: Bellum Judaicum has ten thousand, and Antiquitates Judaicae has twenty thousand. The thirty thousand figure seems to be their sum, assuming the two to have been distinct battles.


dotnet core 2.2 app DockerFile COPY Fails /overlay2/

Question: My dotnet core 2.2 app have this structure (which is pretty standard):
- .sln
- DockerFile
- MyApp/
  |- *.csproj

My DockerFile is this:
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY ./MyApp/*.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "MyApp.dll"]

I always get this error:
Step 9/10 : COPY --from=build-env /app/out .
ERROR: Service 'myapp' failed to build: COPY failed: stat /var/lib/docker/overlay2/ed30d6e8a88b5d65bb14a5e972428135a78701c860f510d4dcc3e5c4947916d3/merged/app/out: no such file or directory

I looked online and could only find suggestions about resetting the data of Docker, which I tried without any kind of success.
I'm building using the command docker build . from the DockerFile repository.
Is there something missing from my DockerFile? Do you have any clue to help me figure this out?
Answer: I have similar dockerfile. but my output is /out
and also copy from /out
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY ./MyApp/*.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o /out

# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
WORKDIR /app
COPY --from=build-env /out .
ENTRYPOINT ["dotnet", "MyApp.dll"]


Non-religious word for "blessed"

Question: I want to say on social media that I am blessed to have my daughter, but I am not religious and find it awkward when people respond saying that they are sending prayers my way. I appreciate the sentiment, but I'd still like a non-religious word that holds a similar connotation.
Comment: Given current usage, I very much doubt *blessed* is strictly considered *religious* (whatever that might mean). A similar word is *thankful*, which is rarely ever ascribed to any deity in particular in popular usage.
Comment: ..........."happy"?
Comment: I've had multiple experiences of people taking religious connotations. And happy doesn't quite cover it.
Answer: From a religious point of view, being blessed has two parts. The first part is to have been endowed with divine favor. The second part is to be joyful for having received the blessing.
No doubt that as a new father you feel any one of these, from the second part: overjoyed, jubilant, exultant, elated, gleeful, delighted, or wonderful. None of these attributes your feeling to any outside influence. With these words, a thesaurus can be used to give you additional ideas.
Comment: I like the breakdown and I believe overjoyed, elated, and delighted work for me. Thanks.
Answer: My favourite is "privileged."
I feel this is the closest in connotation.
Answer: [Extremely] fortunate, [awfully/terribly] lucky.
Comment: I honestly don't feel like this covers it, but I had thought of these, too.
Answer: May be, "Gifted"!
And, like the other answerer has suggested "fortunate" would fit in too.

Non-religious word for "blessed"


Should we keep Magento compiler enabled or disabled?

Question: I am currently using Magento EE 220.127.116.11 and memcache is also enabled on the server.
So the question is whether it's worth keeping Magento compiler enabled? I have read online that the compiler can increase website speed by 25% to 50% but I am not sure whether it's good to do it.
Also, PHP APC is disabled on the server.
Answer: The Magento Compilation is a feature that allows you to compile all Magento installation files in order to create a single include path. This feature is designed to improve the performance of your online store and is supposed to give between 25% and 50% increase in your page load speed.
Note that before making any changes to your Magento Installation files, the Magento compilation feature should be disabled. To disabe Magento Compilation, go to your Admin Panel -> System -> Tools -> Compilation and click on the Disable button.
if you face problem when compile enable u may take support to magento as Magento EE client
If your issue is for an Enterprise Edition store with a valid Magento Enterprise Edition license, please login to the Magento account linked to the license and open a support ticket for further assistance.
<code>To open a support ticket
1) Login to your Magento Commerce account https://www.magentocommerce.com/
2) Go to Support > Open a Ticket
3) Click on Open New Ticket
4) Enter the required information and click Submit
</code>
The following article will provide you with instruction on adding shared access between accounts:
http://www.magentocommerce.com/knowledge-base/entry/sharing-access-to-your-magento-account-for-enterprise-and-community
ref:
https://www.siteground.com/kb/magento-compilation/
When should I use the Magento Compiler


Is it really necessary to gain 50 reputation to ask for a clarification in a comment

Question: I'm new, but have already seen where a "possible answer" I posted, which started with a clarification question, got me a "down vote" for making a "not useful" post. So today I saw a question where I thought I might have a solution, but it was not clear what the poster was trying to accomplish (he said "control" some motors... but control as in 'speed', 'direction', or simply 'on/off' was not specified. Not wanting to make the same mistake twice, I tried to click on the "comment" link, to ask for this clarification, before venturing a possibly "not useful" answer. But I wasn't allowed to comment. Does this make sense? Or did I simply miss a better way to ask for a clarification?
Comment: Yes, the system is working as it should.  50 rep is a *really* low bar.  That's only 5 upvotes on answers, for example.  I see you have already accumulated more than that, with your rep being 58 at the time I am writing this.  There is no problem here.
Comment: OK... I suppose I didn't realize how quickly I'd get to 50, just answering more straightforward things.
Comment: Just another note now that you have 200+ rep here on any Stack Exchange site in the future you'll get a 100 association bonus (so 101 total) and be able to comment straight away.
Answer: Yes, clarification questions should be asked as comments, and the commenting privilege comes at 50 rep.  Don't worry though, you'll accumulate the needed 50 rep soon enough.
In theory, it's also possible to talk to the asker in the EE.SE chat.  But that means that they should sit in the chat room for you to talk with them.
Answer: It's a way to prevent spam. It's also a fairly low barrier.
Answer: It's understandable why this exists, but it also has a fairly negative consequence: A new visitor who wants to ask for clarification on an existing answer has no choice but to break the rules, either by:
1) Posting as a new question, which will probably be closed as a duplicate
2) Posting a question as an answer, which will be downvoted and flagged as improper.
There really isn't any "proper" path available to them.  And please don't say they should hang around for a few days trying to accumulate points first - we don't require that for other questions.  As it is there's almost a disincentive to research before asking, because someone who does not and just posts blindly can at least claim ignorance of the duplicate.
Note that recognizing that a problem exists with the current mechanism is not the same as saying it has no benefit.
(There is one other escape - for someone established on another SE site, linking a new account here will instantly get them over the barrier)
Comment: There's a bit of a review queue for first answers, but none for early comments.
Comment: I agree with Chris on this. While reviewing posts on the various queues, we often have to reject useful comments posted as edits or flag answers that are (useful) comments "as not an answer". If we lowered the bar for comments, that wouldn't happen as often. But the real problem is whether we then would let a bunch of trash in without no real control. Maybe a solution could be a review queue for early comments, like @Scott hinted at. I don't know. That's probably something for the SE folks to decide on.
Comment: I don't know that its worth a review queue.  The status quo seems fine.  Hanging around gets you privilege.  That's the model.
Comment: But isn't it rather arbitrary that some questions require "privilege" while others do not?  And counterproductive that one can go ahead and jump in blindly, while knowing that there is previous coverage of a topic is effectively a (temporary) ban on asking about it?  You may consider the status quo "fine" - but my point is that it *essentially encourages* rule-breaking, by denying any legitimate alternative.
Comment: I don't think so, for either counterproductive or arbitrary.  The new user has a third choice that isn't on your list -- which is do nothing until  you've participated in simplest form for a day or two.  I'm speaking as one who improperly used a question as a comment on my first post.  I had no problem being told the rules, and felt a tad sheepish about it.  The world kept turning.  The system is set up such that any established user on any SE site  essentially has full participation immediately.  I think the alternative will be higher rep users removing a ton of spam.
Comment: @ScottSeidman - no, waiting was already is covered in my post, **and rejected as we do not require it for other questions**.  Note that you started out by violating the rules - exactly what the current policy leaves as the likely outcome.
Comment: But as I said, there's a review queue for first questions and first answers, so damage and vandalism can be undone. Adding a review queue for comments just seems a bit over the top.  And yes, I violated the rule, and it was dealt with through the existing review queue, just as the system was designed.  I see nothing wrong with enhanced participation through more participation, and was actually impressed with how the model worked, including the polite response to my own infraction.  If it ain't broke ....
Comment: How is the occurrence of *starting out with an infraction* **not** "broke"?  Just because they learn and conform by the time they have the points to doesn't mean the original situation isn't a problem.


Use XML Layout to contain a simple drawing

Question: I would like to create a simple drawing (lines, circles, squares, etc...) but I'm having difficulty figuring out the best way to do this.  The drawing would need to be scaled to fit the display since the size is indirectly specified by the user (like in a CAD application).  Also, I don't want to take up the entire display, leaving room for some controls (buttons, etc).  I would pass the data to describe the drawing.  Here's how I imagine it would work.
I create an XML layout that contains something that holds the drawing (ImageView, BitmapDrawable, ShapeDrawable, ...??? not sure exactly what).  Then in my Activity I would load the main XML and obtain the resource for the control that holds the drawing.  I would then draw to a bitmap.  Once the bitmap was completed I would load it into the control that is to hold the drawing.  Somewhere along this path it would be scaled to fill the entire area allocated for the drawing in the XML layout.
I don't know if my approach is the way to do this or what classes to use.  I read the http://developer.android.com/guide/topics/graphics/2d-graphics.html documentation, but it's not helping me with an example.  The examples I do find leave me with hints, but nothing concrete enough to do what I want, especially when it comes to scaling, using XML and/or having other controls.  Also, there seems to be no good documentation on the design of the 2D drawing system in a more conceptual manner, so it makes what I read difficult to put into any useful context.
Any hints on what classes would be useful and/or a good example any other reading materials?
Thanks
Answer: A few weeks ago I wrote some documentation up for Drawables in XML, I think you'll find it pretty handy: http://idunnolol.com/android/drawables.html
In particular, you want to check out the <shape> documentation.
Answer: You should read the tutorial series I wrote. The first one shows the typical begin with XML. In part two you learn to use the SurfaceView to draw what you need. At this point you should be able to draw lines, circles and more...
http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html


Understanding iPhone App Background States

Question: I've got a tricky question. In my app user can change if he want app to run in background or not. If yes - it should work until user kills it. If not - it should work until user presses home button, and SHOULD work after locking screen with top button.
So, there is a line in plist file called "application does not run in background". If i make it "YES" - app running until home button pressed, and still working after locking screen. Perfect. If i make it "NO" - app running all the time until i kill it. Perfect.
But i guess you can't change plist value from app. Well i've found a way to do that with applicationDidEnterBackground:
if (userDontWantItRunInBackground) { exit(0); }

But there is a problem with that (except Apple don't recommend it):
if "application does not run in background" = YES:

applicationDidEnterBackground is NOT CALLED on locking the screen

if "application does not run in background" = NO:

applicationDidEnterBackground is CALLED on locking the screen

It makes no sense! This doesn't allow me to make app running on locked screen!
Answer: In iOS 4, you can't avoid Idle time sleep if your app wish.
   [[UIApplication sharedApplication] setIdleTimerDisabled:YES];

Here is more information about background execution in iOS:

More:


How to upgrade Git on Ubuntu?

Question: How do I upgrade Git on Ubuntu?
Answer: If you want the latest git on your system, add this ppa in your software sources. Then install git-core if it wasn't done before, and update your system.
However I would suggest to upgrade to an unsupported package only if you require some specific features included only in the latest version.
Answer: sudo apt-get update
sudo apt-get upgrade

If you already have it installed and everything is clean.
If you want the absolute newest version and that is not in the repositories, there is a guide to doing that here:
http://ropiku.wordpress.com/2008/04/14/updating-git-on-ubuntu/
Comment: that tutorial you linked worked great for me, thanks!
Answer: Just to summarize:
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get upgrade

Answer: It's not the newest question, but I found myself asking the same and the only thing that worked was installing from the github repositories following the guide from the git book, which I guess is the most reliable when it comes to updates and changes anyway.

How to upgrade Git on Ubuntu?


Whats the reason for triangular carrier PWM

Question: I understand that triangular carrier PWM uses a higher frequency triangular carrier wave to compare with the desired output waveform but I would like to know more about the process. I've also learned and seen the Fourier transform that shows that it lowers harmonics. Is there an easy intuitive reason for how this was discovered? I understand that a sawtooth carrier will do the same thing but doesn't do as good of a job. Is the triangle carrier the best that it gets? Is triangular chosen for the reason of its harmonic limiting nature? Could you use either method for an inverter just adjust respective amplitudes of the different types of carrier? Does anyone know of a derivation of how we figured out that triangular PWM works well? I just want to understand the process a little better fundamentally. Is there a geometric relationship between the triangle wave and the sine wave that's relevant and adds some beauty or is it just what it is?
Answer: In a sawtooth PWM, the centre of each pulse and thus the phase of the reconstructed waveform varies with the signal amplitude or PWM duty cycle.
Double sided modulation, using a triangular waveform, avoids this problem, keeping the centre of each PWM pulse at a constant phase relative to the PWM sampling interval.
And yes, the phase distortion does appear as unwanted harmonic content when you PWM modulate a sine wave with triangular PWM.
Comment: Awesome answers! Thank you Brian and Alex. That's exactly the type of explanation I was hoping for! Also, I think I can find this elsewhere, but how does the frequency of the carrier matter? Does it alter the frequency of the reference waveform (the one to be output)? Or does it just result in more pulses and therefore a better digital approximation?
Comment: Better approximation, easier filtering. As far as I can recall, the harmonic content is related to the ratio F(signal)/F(pwm) so you can expect high frequency signals to be less accurately coded - triangular is better, but not perfect
Answer: The waveform you use has to have a linear slope because the idea is to convert voltage to duty cycle in a linear manner. If you use a sine wave, then the conversion will be nonlinear and will introduce distortion. The idea is that the slope of the waveform will be used to convert voltage to time. If you use a symmetric waveform (triangle wave) to do this conversion, the resulting waveform will be a center aligned PWM signal. A center aligned PWM signal has fewer harmonics than an edge aligned PWM signal.
Comment: Edge aligned always had one edge in the same place on subsequent cycles, while center aligned has no fixed relationship between the edges on subsequent cycles. Those rising or falling edges on regular intervals will generate more harmonics.
Comment: Do you have any references for that last claim? It seems arbitrary where the alignment is for the signal. The claim of a relationship between the alignment and the harmonics generated seems interesting if it is true (for the same duty cycle generated by either technique). Both a center-aligned and edge-aligned PWM signal both have two edges with equal slopes.
Answer: To understand why a sawtooth-carrier PWM adds harmonic distortion, consider the effect of modulating a low-frequency triangle wave using one.  Assume the falling edges of the PWM wave occur at a fixed frequency (the same principles would apply if the rising edges did so).  If the falling edges occur at a fixed frequency, then while the duty cycle is increasing (as it will be during part of the low-frequency triangle waveform) the rising edges will occur at a rate slightly faster than the PWM frequency.  While the duty cycle is decreasing, the rising edges will occur at a rate slightly slower than the PWM frequency.  The effect of this will be to compress time during the rising ramp of the sawtooth wave, and stretch it during the falling ramp.
Since all waves which are free of even harmonics must be glide reflections of themselves, a waveform in which all rising ramps have a slope which is not shared by any falling ramps must contain even harmonics.  Since a triangle wave does not have such harmonics, that would imply that the PWM must have created some.
Answer: Another good reason for using triangular PWM carries in some (not all) applications is the sampling effect during control.
For instance, in motor drives control, the output voltage, generated through PWM, induces pseudo-triangular waves in the measured current, and normally these currents are measured -and sampled- to accurately control the motor variables (speed, torque, flux). If you use a sawtooth waveform, and the sampling instant occurs either at the extremes of the sawtooth carrier or at the reference crossing, you will sample one of the peak values of the current, including commutation ringing. But if you use triangular carriers for PWM, and the sampling instant are either the maximum, minimum, or both values of the carrier, you will always sample the average current during the carrier period (or half-period).
In some other applications, like buck converters (DC-DC converters, see Here), a sawtooth PWM carrier is used to measure the peak current instead of the average one during the sampling period.