Forgiveness of Adam's sin

Question: Why do we suffer for the sin not committed by us, is it not contrary to Ezekiel 18? Can we ask for this sin to be forgiven? and how do we repent from something we have no access to?
Comment: The consequence of the action was a change in nature of humanity. It isn't about a punishment.
Comment: To the extent that we cannot rectify something to which we have no access, the response to the sin of Adam is to create a new world. For example, Avraham created a new world through his acts of kindness and belief in Hashem. Creating a new world does not need to occur on a cosmic scale, however. Even by helping one child and creating a world in which that child can live, you can create a new world.
Comment: There are many mitzvos we do to recrify the sin of Adam Hareishon. When a person perfects his nature, he's doing that as well. Not a simple thing to rectify.
Answer: I assume that you are discussing the "sin" of eating of the tree of knowledge of good/evil. I would also like to say I appreciate Rosend's comment because I believe it to be true, but maybe not in the way they would expect. The comment was:
"The consequence of the action was a change in nature of humanity. It isn't about a punishment."
Even though we as Jews are often taught by our tradition (and further reinforced by outside Christian traditions) that Adam did the "original sin" and therefore we are living in a punished/fallen world, it seems to me the Tanakh views things entirely differently.
We would EXPECT the Bible to say that Adam was kicked out of the garden for sinning. But it doesn't. What it does say is something much more confusing and religiously problematic.
Genesis 3:22

כב  וַיֹּאמֶר יְהוָה אֱלֹהִים, הֵן הָאָדָם הָיָה כְּאַחַד מִמֶּנּוּ,
לָדַעַת, טוֹב וָרָע; וְעַתָּה פֶּן-יִשְׁלַח יָדוֹ, וְלָקַח גַּם מֵעֵץ
הַחַיִּים, וְאָכַל, וָחַי לְעֹלָם.    22 And the LORD God said: 'Behold,
the man is become as one of us, to know good and evil; and now, lest
he put forth his hand, and take also of the tree of life, and eat, and
live for ever.'

So according to God, Adam was NOT kicked out because of sinning like we might have expected. Theologically this verse is very difficult, and I would prefer if it would say that man was kicked out for sinning, but it doesn't. Rather the verse is clear that Adam was kicked out because of the change in his humanity, and this change gave Adam some kind of potential that forced God to kick Adam out of the garden. Even more confusingly, God doesn't kick Adam out because of his potential in that moment. So for example, the verse doesn't say that God is kicking man out because of the singular event of eating from the tree. God is kicking mankind out because if Adam were to ALSO eat from the tree of life (which is not a sin), then things would potentially be catastrophic. The verse also hints that if the tree of life was not also in the garden, then Adam would never have been kicked out of the garden since there wouldn't have been a risk of him living forever.
I would argue that because we as humans now have the capacity to make moral judgments for ourselves, the potential harm we could do if we could also live for ever would be devastating. And this potential devastation is exactly what the verse is scared of. Imagine how much faster we could have had nuclear weapons if people didn't die every generation, imagine if knowledge didn't get lost because of the death or destruction of a particular culture in time.
Also when we go back to the punishments, I would argue that most of the punishments are really just a description of the future reality of living outside the garden. Adam had cursed the grounds of the garden and could no longer live there, and would be forced to farm outside the garden which is difficult.
Genesis 3:17-19

יז  וּלְאָדָם אָמַר, כִּי-שָׁמַעְתָּ לְקוֹל אִשְׁתֶּךָ, וַתֹּאכַל
מִן-הָעֵץ, אֲשֶׁר צִוִּיתִיךָ לֵאמֹר לֹא תֹאכַל מִמֶּנּוּ--אֲרוּרָה
הָאֲדָמָה, בַּעֲבוּרֶךָ, בְּעִצָּבוֹן תֹּאכְלֶנָּה, כֹּל יְמֵי
חַיֶּיךָ.     17 And unto Adam He said: 'Because thou hast hearkened unto
the voice of thy wife, and hast eaten of the tree, of which I
commanded thee, saying: Thou shalt not eat of it; cursed is the ground
for thy sake; in toil shalt thou eat of it all the days of thy life.
יח  וְקוֹץ וְדַרְדַּר, תַּצְמִיחַ לָךְ; וְאָכַלְתָּ, אֶת-עֵשֶׂב
הַשָּׂדֶה.    18 Thorns also and thistles shall it bring forth to thee;
and thou shalt eat the herb of the field. יט  בְּזֵעַת אַפֶּיךָ,
תֹּאכַל לֶחֶם, עַד שׁוּבְךָ אֶל-הָאֲדָמָה, כִּי מִמֶּנָּה לֻקָּחְתָּ:
כִּי-עָפָר אַתָּה, וְאֶל-עָפָר תָּשׁוּב.  19 In the sweat of thy face
shalt thou eat bread, till thou return unto the ground; for out of it
wast thou taken; for dust thou art, and unto dust shalt thou return.'

So I would argue that there is no forgiveness for Adam's sin because Adam's sin is not ongoing. God intervened in Adam's life directly to offset the choice that Adam made by eating the fruit of good/evil by kicking him out of the garden. The rest of us just happen to live life outside of the garden, which is not paradise.
Answer: Muslim here, you say:

Why do we suffer for the sin not committed by us

This is kind of similar belief to the Original Sin Christians have, but since I didn't read the Talmud [yet], I don't know how Judaism looks at Genesis, but I will not generalize it holding that as the main belief.

how do we repent from something we have no access to?

You actually answered it with Ezekiel, God didn't ask anyone to repent for Adam, and Christians have a different doctrine around sin atonement.
Secondly, you say God started life to make Adam suffer, but you didn't take attention to the very first verse:

Genesis 1:1 In the beginning of God's creation of the heavens and the earth.

He prepared the earth before creating Adam, not the opposite, and after Adam ate from the tree:
Genesis 3

16 To the woman He said, "I shall surely increase your sorrow and your pregnancy; in pain you shall bear children. And to your husband will be your desire, and he will rule over you."
17 And to man He said, "Because you listened to your wife, and you ate from the tree from which I commanded you saying, 'You shall not eat of it,' cursed be the ground for your sake; with toil shall you eat of it all the days of your life.
18 And it will cause thorns and thistles to grow for you, and you shall eat the herbs of the field.
19 With the sweat of your face you shall eat bread, until you return to the ground, for you were taken therefrom, for dust you are, and to dust you will return."

This is not a punishment for Adam, God didn't promise Adam to stay in Eden forever, He was introducing him to the life he will shortly approach, and yes there is suffering with it, but life is not for the easy folk, and Adam had to know that.
Genesis 12

2 And I will make you into a great nation, and I will bless you, and I will aggrandize your name, and [you shall] be a blessing.
3 And I will bless those who bless you, and the one who curses you I will curse, and all the families of the earth shall be blessed in you.

From the progeny of Adam He chose Noah, from the progeny of Noah He chose Abraham, and from the progeny of Abraham He chose Israel.
This proves that the whole life on earth was a plan from God, and neither you nor me would have came to existence if He didn't let Adam out of Eden first, so you have no reason to take the blame for an event God willed:
Deuteronomy 30

16 Inasmuch as I command you this day to love the Lord, your God, to walk in His ways, and to observe His commandments, His statutes, and His ordinances, so that you will live and increase, and the Lord, your God, will bless you in the land to which you are coming to take possession of it.
17 But if your heart deviates and you do not listen, and you will be drawn astray, and you will prostrate yourself to other deities and serve them,
18 I declare to you this day, that you will surely perish.

What God taught Adam is not our lesson to take responsibility of, it's the Scripture in our hands that we will be asked about, neither Adam had a Torah nor you are in Eden, understand that and you will know what God actually wanted from you.
Comment: Wow, very impressive! +1 We're probably hitting the Messianic days!
Comment: @AlBerko You mean the Moshiach? ... Muslims know that there's a Messiah figure [not Jesus] who will come to the Jews in the future, this is something we have no dispute about, although Christians might disagree with that.
Answer: I totally agree with what @rosends writes in his comment:

The consequence of the action was a change in nature of humanity. It isn't about a punishment

Sefer Yechezkel begins with the words (translation includes the commentary of Rashi there) (Yechezkel 1:1):

As I was in the midst of the exile

The sin was not simply eating from the Eitz Hadaat, but the sin has a deeper meaning. Rav Avraham Yitzchak HaCohen Kook writes in his work Shemonah Kevatzim (3:24) that when G-d asks Adam "Where are you?" (Bereishis 3:9), G-d meant "where are you, did you sin?" (see: this article written by Rabbi Zvi Alon from Torah Mitzion).
On this, Rav Kook explains that by doing this sin, Adam was alienated with himself/ from his own essence:

He turned to the consciousness of the serpent and lost himself.

So, Adam was not able anymore to answer a simple question: did you sin? Why did you sin?
Recognising a sin is prerequisite for doing teshuva, as the Rambam writes in his Hilchos Teshuva (chapter 1):

How does one confess: He states: "I implore You, G-d, I sinned, I transgressed, I committed iniquity before You by doing the following. Behold, I regret and am embarrassed for my deeds. I promise never to repeat this act again."

This very essence: confessing to G-d that you did a sin was lacking from Adam HaRishon because, as Rav Kook says "He turned to the concsciousness of the serpent and lost himself".
And this is, according to Rav Kook, why we still "feel" the effects of the sin of Adam HaRishon:

Thus does the world continue to sink, with the loss of the "I" of every [entity] – of the individual and of the whole.

The word Adam has in itself three names, three essences, three possibilites to rectify the sin of Adam HaRishon. The name of Adam HaRishon is an acronym for three names in Judaism: Adam, David and Moshiach (see: Shenei Luchot HaBerit, Torah Shebikhtav, Toldot, Torah Ohr)
The Shelah explains:

You may ask how it is that Joseph is included in the list of patriarchs, and even contributed more than the other patriarchs combined? The answer is that Joseph was the moral equal of all the other patriarchs combined, seeing that all our literature describes him as יוסף הצדיק, Joseph the righteous. In that capacity he "illuminated the moon," the symbol of all that is feminine, more than any of the others. This is why he could contribute more years of life to David than all the others.

And:

What our sages said about Adam giving 70 years of his life to David is also true. The whole point of granting life to David was to repair the damage done to G–d's universe by Adam, without which a Messianic age and all its benefits to mankind would not be needed. Adam's צלם אלוקים, divine image, needed to be restored first and foremost through the constructive lives of the patriarchs. We explained all this in our commentary on Parshat Chayey Sarah. The 70 years Adam donated to David were "illuminated," assumed a positive meaning through Jacob and Joseph having donated 70 years of their already meaningful lives. We have explained earlier that the "beauty" of Jacob was of the same quality as the beauty of Adam [before his sin, of course. Ed.]. Genesis 39,6 describes Joseph as: ויהי יוסף יפה תואר, he had handsome features for he evidently inherited these from his father, seeing Joseph is viewed as his father's replica. We have seen from Samuel I 16,12 that David's features are described in similar terms. Once the Messiah will arrive on earth, Adam will be rehabilitated completely, will be אד"ם, the first letters respectively of the incarnations in אדם דוד משיח.

According to Rav Kook, in order to rectify the sin of Adam HaRishon, the people must first recognise who they are, what they are doing wrong if they, G-d forbid, do a sin and then do teshuva. Our purpose is to fix ourselves, as the Midrash explains (Bereishis Rabbah 11:6):

He said to him: Anything created in the first six days, needs further actions, for example mustard seeds need sweetening, peas needs sweetening, wheat needs grinding, even humans need fixing.

Forgiveness of Adam's sin


Import a exploit into msfconsole on ubuntu

Question: I'm attending a offensive security courses and one of the subject is import a exploit from exploitdb into msfconsole. Commonly advice that it's required to create a exploit folder inside .msf4 and later put the exploit inside this folder; later you write the comand sudo updatedb. I did this, and the exploit did not show up. I tried to innovate and create a symbolic link from the metasploit directory: opt/metasploit-framework/embedded/modules/exploits (when almost all the examples explain the folder is /usr/share/metasploit-framework/modules/exploits) to .msf4/modules/exploit and was useless. I know all the examples and the websites basis in kali linux example, I have Ubuntu 20.04. So I need someone explain me how can I import a exploit into msfconsole on Ubuntu? or should I install kali linux on vmware virtual machine because it is not supported this option in ubuntu?
Answer: We don't have access to the strucutre of your filesystem but in general you need to make sure:

Your .msf4 folder is in your home directory.
Your directory strucutre for the exploit corresponds to what is shown in Exploit-DB.

Short of seeing your filesystem ourselves, I am not totally sure anyone can help fix this issue. You don't need Kali. But having everything pre-installed does solve issues such as this (usually).
Comment: Thanks! I got a question: Is necesary the exploit only be a ruby file or can it be from other programing languages? i verify the things you've said previulsy and all is right. Mi msf4 folder is in root. I dont understand why the exploit doesn't show up
Comment: @GabrielAlejandroRivasMata Yes, it's necessary that it is a ruby file. msf is a ruby project and only works with ruby. Of course, you can create an executable in a different language and write a ruby wrapped for it.


How to find the size of all partitions

Question: How can I find size the of all partitions in Ubuntu with a command that saves to name.txt?
Answer: If you want to find the size of all the partitions and save it to a file: you have to run this command:
df -h | grep /dev > name.txt

It will find the size of all the partitions including swap and save it to your file name.txt. where udev is nothing but the swap
or simply:
df -h > name.txt

If you want to get the size of all devices available to your computer and want to save in file then you can execute this command:
lsblk | awk '{print $1 "       \t    " $4}' > name.txt

It will save only the partition and the size
Comment: This will only show the size of the **mounted** partitions.
Answer: You can use lsblk which prints partition information in a human friendly way, but can also change to use KEY=VALUE if you want to parse it.
Simply use
lsblk > name.txt

which will provide partition information to a file called name.txt in the current directory.
Example output of lsblk which is in name.txt:
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 298.1G  0 disk
├─sda1        8:1    0  97.7G  0 part
├─sda2        8:2    0 134.1G  0 part
├─sda3        8:3    0     1K  0 part
├─sda5        8:5    0    57G  0 part /
└─sda6        8:6    0   9.3G  0 part [SWAP]
zram0       251:0    0 239.1M  0 disk [SWAP]
zram1       251:1    0 239.1M  0 disk [SWAP]
zram2       251:2    0 239.1M  0 disk [SWAP]
zram3       251:3    0 239.1M  0 disk [SWAP]

If you want a more machine friendly output, use the following command instead:
lsblk -bP -o NAME,SIZE,MOUNTPOINT > parseable.txt

which might produce (in parseable.txt). Sizes are in bytes because of the -b option.
NAME="sda" SIZE="320072933376" MOUNTPOINT=""
NAME="sda1" SIZE="104854820864" MOUNTPOINT=""
NAME="sda2" SIZE="144030984192" MOUNTPOINT=""
NAME="sda3" SIZE="1024" MOUNTPOINT=""
NAME="sda5" SIZE="61183361024" MOUNTPOINT="/"
NAME="sda6" SIZE="9999220736" MOUNTPOINT="[SWAP]"
NAME="zram0" SIZE="250691584" MOUNTPOINT="[SWAP]"
NAME="zram1" SIZE="250691584" MOUNTPOINT="[SWAP]"
NAME="zram2" SIZE="250691584" MOUNTPOINT="[SWAP]"
NAME="zram3" SIZE="250691584" MOUNTPOINT="[SWAP]"

In the case above, a mountpoint of "" indicates not mounted. You probably wont have as much zram as me (or maybe none at all).
Answer: I usually use this command to see partition size and usage:
df -h

Comment: The OP also asked how to add that info into a file named `name.txt`.

How to find the size of all partitions


Texture baking turns part of my object black

Question: I'm trying to bake a texture of mine, but it keeps making the circular window fully black, I'm not sure if it is a problem with the mesh, any idea how to fix it?
Answer: I know, 9 months late. I'm new to blender, but I figured this one out. If you have gloss in your material, you have to make a separate gloss map. The color is there. Save the diffuse map first, then make the glossy with a new texture map (save that), and finish by reloading the diffuse map. You now have 2 maps, plug them in where appropriate, and all should be fine.
Answer: It's not. Texture baking shows all shadows from the point of view of the light(s) in the scene. Since some parts of your mesh would be in shadow, this is how the texture bakes.


Is there a nice one click alarm for android?

Question: Sometimes when I'm tired, I take a nap of 1 hour. Doing that with the native clock on Android requires a lot of clicks. I would like to have an app that whenever the button is pressed, it starts to count 1 hour.
Comment: [Setting alarm on with a single click](http://android.stackexchange.com/q/43385) and [One-click access to alarm settings](http://android.stackexchange.com/q/30441)
Answer: It sounds like what you want is a timer rather than an alarm clock. (Did you look in the Play Store?)
One very simple timer app I use is Tick!.

Tap to open
Use your finger to spin the dial to the amount of time you want to count down
Tap to start the timer
Answer: You can use Google Now:
say "OK Google Now",
say "Set Alarm for one hour",
then touch "Set Alarm"
Answer: You could try an app called Simple Alarm Clock by a developer called Moula soft Inc.  It is in the google app store. I like it.


want to make a field read only when i selected a picklist value

Question: I am having an Opportunity object there is a field named "stage(picklist)", when I selected "selected won" from picklist "amount" field must become "read only"
Answer: As an alternative, you could also create a validation rule that doen't allow changes to the amount field when the stage is in Closed Won.
So for example:
AND( ISPICKVAL(StageName, "Closed Won") , ISCHANGED(Amount) )
The dis-advantage with this solution however is that your user will only get this error message on-save while with a record type / page layout change, they would immediatly see that they can't change the amount field anymore.
An advantage is though that you don't need a seperate recordtype / page layout to maintain.
Probably depends if there would also be other fields that users would not be allowed to change anymore, then a recordtype / page layout would be better.
If it's only one field that they can't change anymore, validation rule would be easier to maintain.
Answer: You can do this by assigning a different record type with a workflow. This record type would have a separate pagelayout with the fields you require to be read only set as such.
Comment: +1 Sdry : Create a page layout i.e clone the exsiting page and make amount read only on the cloned page layout. Now write a workflow field update with condition if stage=selected won.it has to populate cloned page.
here is the link for detail explaination.https://success.salesforce.com/answers?id=90630000000gilKAAQ
Answer: You may have to explore VisualForce pages. You can embed one in the Opportunity layout and have it act upon your fields.
Having said that, I would recommend allowing the user change the amount until the record is actually saved, in which case a few of the solutions mentioned above would do.
Answer: You give a try with validation rule for your case with reference to this example - http://www.techlogbooks.com/2019/02/how-to-prevent-changes-to-field-in.html
Comment: Welcome to SFSE. Please read [answer] and [edit] this post so that the complete solution is described here. Links can go dead and we ask that users not need to navigate away to understand the solution.


Create Temporary Samba Share

Question: Is there a possibility to temporarily share a directory per Samba?
With Python 3 i can serve the current directory per HTTP using:
python -m http.server.
I'd like to do the same thing with Samba.
Comment: Is the `net share add` command what you're looking for?
Comment: Or possibly `net usershare`...
Answer: There doesn't appear to be a way to create an ad-hoc share similar to the way exportfs does it for NFS on Linux and share does it on Solaris.  Reasons may vary but you could technically do something like described in the page for Running Multiple Servers on the same machine and with the custom smb.conf accomplish what you need to do.
There is also an option to create and delete shares dynamically using SWAT, which will require changes to smb.conf to allow this to happen see sections on add share command and delete share command
Personally if you want to have a share dynamic you might want to share your home directory and use dynamic home shares via samba discussed in many places including Ubuntu forums, and Samba mailing list.
Answer: Depending on how old your samba daemon is, and the config options used when it was built, you may still have the option of defining a "dynamic" share in your smb.conf, pointed at say /var/dynamic/, see below, and then simply adding a symbolic link to the directories you temporarily want to share into the directory.
This hack require the wide links option to be set to yes, to allow samba to follow links outside of the shares root. Unfortunately a couple of years back the Samba crew tweaked their default config to prevent wide shares, as it could be exploited. Google for: Samba and "wide links" for the history and work arounds.
[dynamic]
    comment = Somewhere to park dynamic shares
    path = /var/dynamic
    read only = Yes
    inherit acls = Yes
    follow symlinks = yes
    wide links = yes

A quick test should see if your good e.g.
mkdir -p /var/dynamic/test
cd /var/dynamic
ln -s test a_link
ln -s /tmp/  tmp_test

Answer: This might come a little late, but the Impacket python project provides exactly what you were asking for.
Within the examples folder is an ad-hoc smbserver.py and many further helpful scripts.
Citing their example, to SMB-share your /tmp directory becomes as easy as:
smbserver.py -comment 'My share' TMP /tmp"
Answer: Lets say you want to quickly share /somefolder to someuser temporary readonly.
Add a system user:
useradd -r someuser

Often by default the folder is other-readable (check with ls -ld /somefolder), if you need to force it:
chmod -R o+r /somefolder

Add the user to samba with some password like:
smbpasswd -a someuser

Quickly edit smb.conf and add at the bottom
[someshare]
path = /somefolder
read list = someuser

exit, save, and finally run
smbcontrol smbd reload-config

et voila.
Obviously you may want to remove the "someshare" section once done and rerun the reload-config command.
Disclaimer: i didnt fully test this but i was amazed how simple the answer to the question could be.
You can possibly skip some steps and dive straight into editing of smb.conf if you already have some user with existing samba access - exactly what i just ran into.

Create Temporary Samba Share


What are the lifetime coins?

Question: When I'm playing it's giving me objectives like it would a normal person and they're like "Lifetime points! And coins!" And I have no idea what the even heck that is.
Answer: Your "Lifetime coins" is the total amount of coins you have collected over the entire time you have been playing the game.
For example:
When you first download the game you run two times. You get 100 coins on the first run, and 600 coins on the second run. Your "Lifetime" total of coins would be 700.
The same principle is used for "Lifetime points".
Answer: "Lifetime" anything implies whatever of that category has been gained on this account.
NOTE a new account is started when the app is first introduced to the device.

What are the lifetime coins?


Phase diagram of water

Question:
In the phase diagram of water, in relation to the gas phase region and bordering lines, what is the relevant pressure? Is it the partial vapour pressure of water, or is it the total pressure including contributions from other gases? If it is the partial vapour pressure of water that is relevant, then are we at the triple point any time we melt ice in a controlled fashion, even at an external pressure of 1 atm (because both ice and liquid water have a vapour pressure)? Or do things get more complicated with the phase diagram when you are in a mixed system with other gases present?
Comment: There are no "other gases": this is the phase diagram of water.
Comment: Don't understand your first question. What do you mean by "relevant pressure"? Also, it would be helpful if you included an image of the water phase diagram in your question.
Comment: You should cite the source of this image. (https://commons.wikimedia.org/wiki/File:Phase_diagram_of_water.svg)
Answer:
In the phase diagram of water, in relation to the gas phase region and bordering lines, what is the relevant pressure?

The pressure we are talking about is the pressure on (and inside) the water. Imagine pure water in a can; squeeze the can and you increase the pressure. This is the pressure we are talking about.

Is it the partial vapour pressure of water, or is it the total pressure including contributions from other gases?

Neither nor. If other liquids/gases/substances are present (if you have a mixture), then you basically have another material. Then this phase diagram doesn't apply. Another material has another phase diagram.

[...] do things get more complicated with the phase diagram when you are in a mixed system with other gases present?

Exactly. For instance, try googling the phase diagram for salt water and you will see a very different diagram depending on the amount of salt.
I am guessing your hope was that you could separate a mixture into its constituents and use the phase diagrams of each constituent. But that is unfortunately not the case.
A mixture does not behave as two separate materials that just happen to be located on top of each other. That would ignore the interaction between them, which in general severally interferes with their combined  phase diagram and with their combined properties. That is why for example the tensile strength of a cobber-nickel alloy is larger than the tensile strength of either pure cobber or pure nickel rather than a value in between.
Comment: Gotta love this site. Can't get a useful answer, but can always score a put-down.
Comment: @AnnetteFaithDexter I'm sorry, what?
Answer: The pressure indicated in the phase diagram is the external pressure.
Comment: Which, equilibrium is assumed, is equal to the internal pressure.
Comment: I think I have clarified my thoughts on this a little, and can maybe ask the question in a different form: is the phase diagram of water affected if the water phase equilibria are studied in the presence of an external atmosphere? You can crystallise (sic) the point around the question: why is there a line at 1 atm in the phase diagram, to show the normal boiling and freezing point of water, if only water is present? The implication is that you are observing the phase changes in a system open to Earth's atmosphere.
Comment: By drawing the line at one atm, you can at what temperature the water starts boiling for the given pressure.

Phase diagram of water


Were the UK opt-outs of the Euro and Schengen enacted via the Ordinary Legislative Procedure?

Question: Were the UK opt-outs of Schengen and the Euro legislatively enacted via the Ordinary Legislative Procedure or by treaty negotiation at the Council level?
Comment: Oh, I'm sorry, I missed the capital letters. That process (but not the name, which only arrived with Lisbon) was only introduced in the Maastricht treaty itself, so couldn't have applied to the Euro. And both topics required treaty modifications, so even post Lisbon MEPs wouldn't have had a meaningful vote.
Comment: Are you sure those aren't the same thing in this context? The Euro was established in the Maastricht Treaty and the translation of the Schengen agreement into EU law was via the Amsterdam treaty, thus both were secured within the treaties themselves, via the normal process at the time treaties were drawn up.
Comment: Thanks. I thought Ordinary Legislative Procedure meant Commission, Parliament, CoM etc. My question is whether things like the Euro opt-out and Schengen opy-out were arranged via a different mechanism (eg bypassing MEPs).
Comment: My mistake. I added the capital letters after your comment.
Answer: To answer what I understand to be the spirit of the question, the two opt outs are to be found as protocol 15 of the Treaty on European Union (Maastricht treaty) for the Euro and the section "Protocol integrating the Schengen acquis into the framework of the European Union" of the Treaty of Amsterdam.
Both treaties were negotiated via intergovernmental conference, approved by the European Council and then ratified by the individual member states through their usual constitutional methods. The Treaty of Amsterdam was endorsed by the European Parliament, but this had no definite effect on the content or ratification procedure.


Can a player trade 3 groups in one turn?

Question: Rules specify that when trading each group exchanged counts as an action to the player whose turn it is. And then later goes on to say that puppets of a group are transferred along with it. Is the player then limited to exchanging 1 group for another group or two groups for cash/special cards? Or can he exchange a parent group with 3 puppets for another group?
Answer: On Page 7 of the rule book, it says:

Each Group exchanged counts as an action
  for the player whose turn it is, whichever way the Group
  moves. So if you trade a Group for a Group on your turn,
  that counts as two actions – one to move the first Group, one
  to move the second one!

Then, on Page 8, it says:

When a Group is transferred to another player, its puppets (if any)
  must go with it, along with all treasuries involved. The player
  receiving the Group must immediately fit it, and its puppets, into his
  power structure...

(I know you already pointed that out, I just wanted to show the exact rules quotes.)
That would lead me to believe that you can trade off one of your own Groups (and any of it's puppets) for another Group (and any of it's puppets). Doing so will cost your both of your actions for the turn, one to 'release' the old Group and another to 'welcome' the new Group in. The puppets don't have a say in where they are going, so so they don't count as additional 'Groups' in this case.
So you are fine to trade away a parent Group with three puppets for another group, just as long as you get a good enough deal!
(Note, that if a player can't fit a traded group and all it's puppets into their Power Structure, some of the puppets may have to be released to the uncontrolled area.)
Comment: In addition, that means that if you had a structure A>B>C, you could transfer B>C to your opponent, then take back the C to give you A>C, leaving your opponent with B.
Comment: Wouldn't the opponent be able to not give you C back as it's technically a trade 'in future' (he can't trade you C now because he doesn't have it). So that would be two trades: B>C to him for X and then C back to me for X. Where after making the first trade he might not agree to the second.
Comment: @ArturGadomski I'm not entirely sure that ConMan's example would work within the rules. The active player would take one action to trade/give B>C to an opponent. However, because it's not the opponent's turn, they can't "give" C back, so A would have to arrange another trade (say for a Plot card) to get C back. I'd say it's you'd probably have to get the table to agree if they'd allow "I trade you B>C but you have to trade me back C" as a valid trade.
Comment: @ArturGadomski The strange thing about the rules is that if it's NOT your turn, you don't need actions to receive or swap groups, but you can't give a group away...


Estimating a Matrix from Scaled Permuted Matrix

Question: The problem is the non- negative matrix factorization of a matrix. Let me explain my problem I have an original matrix $A=\begin{bmatrix}
0.248437 &0.25198098 & 0.25396825 & 0.25077881\\
0.253125& 0.25198098& 0.24761904 &0.24766355\\
0.248437& 0.24722662& 0.24920634& 0.24766355\\
0.25& 0.24881141& 0.24920634& 0.25389408
\end{bmatrix}$ and I have a matrix $B=\begin{bmatrix}
0.38331781& 0.385229& 0.384043 &0.381118\\
0.37776086& 0.377539& 0.381224 &0.381850\\
0.29993458& 0.300691& 0.298606 &0.299959\\
0.34108473& 0.337021& 0.335967 &0.337317
\end{bmatrix}$. What I know is that the matrix $B$ is some scaled version of $A$ i.e $PD$ where $P$ is a permutation matrix and $D$ is a diagonal matrix. Can i somehow get an approximation of $A$ from $B$ if I retain some properties of $A$ like the maximum of each row and minimum of each row to get an idea of how much scaling has been done, similarly if I keep a record of each column sum , and its maximum and minimum value. My main question is can I estimate my $A$ from $B$ by keeping some parameters with me beforehand. Can somebody help or suggest some text for this.
Answer: Under the assumption that the dynamic range per row is unique, the maximum and minimum value per row will be enough to recover the matrix $ \boldsymbol{A} $ from $ \boldsymbol{B} $. Actually, you could just keep the dynamic range ratio, namely $ \frac{\max_{k}}{\min_{k}} $ where $ k $ is the row designator.
You will need another simple assumption which is the validity of the ratio, namely no zero value as the minimum. It can be removed with some tricks (Like defining specific value for division by zero).
The idea is that the ratio is invariant to multiplication by a constant of both values.
Hence you will be able to recover the permutation matrix accurately.
From there, recovering the diagonal matrix is also trivial.


Force on different points on a body not passing through the centre of mass

Question: I was studying about centre of mass and I found that if the line of action of force passes through centre of mass then it will execute pure translation.
Moreover acceleration of centre of mass is net force applied on the body divided by the total mass of the body and my textbook says that its valid for all points on the body where the force is applied.
I can't get this as when the line of action of force will not pass through centre of mass then body must also rotate and i think the acceleration(translational) of centre of mass must change (due to rotation of body).
Assume that the body is rigid.
Any help is appreciated.
Comment: You also want the answer when the force is not through the centre plus there's no rotation
Comment: @Shashaank there is rotation i mean the body does rotate.
Comment: Why do you think " translational " acceleration will change due to rotation?
Comment: That is what i don't understand "why it will not change ?"
Comment: @Pinku Hint: Newton's law of equality of action -Reaction
Answer: What is valid is that the acceleration of the center of mass is described only by the net forces on the body regardless of the point of application. Only when concerned with rotation (or the motion away from the center of mass) you need to consider the position of line of action of the forces.
Read this answer on the derivation of the equations of motion. Specifically the motion of a rigid body when a force is applied not at the center of mass and the acceleration of that point.

$$\begin{align} \sum \vec{F} &= m \vec{a}_A - m \vec{c}\times \vec{\alpha} + m \vec{\omega}\times\vec{\omega}\times\vec{c} \\
\sum \vec{M}_A &= I_C \vec{\alpha} + m \vec{c} \times \vec{a}_A  - m \vec{c} \times \vec{c} \times \vec{\alpha} +\vec{\omega} \times I_C \vec{\omega} + m \vec{c} \times \left( \vec{\omega} \times \vec{\omega} \times \vec{c} \right)
\end{align}$$

Point A is a point away from the center of mass C, and the vector $\vec{c}$ is the location of the COM relative to A.
The case described on the book is where the point of interest is the center of mass (or A = C, and $\vec{c}=0$) which makes the equations the familiar ones
$$\begin{align} \sum \vec{F} & = m \vec{a}_C \\ \sum \vec{M}_C & = I_C \vec{\alpha} + \vec{\omega} \times I_C \vec{\omega} \end{align} $$
If the line of action of the force is not through the center of mass, there is going to be a net moment about the center of mass $\sum \vec{M}_C \ne 0$ which is going to cause rotational acceleration $\vec{\alpha}$. But the linear acceleration of the center of mass $\vec{a}_C$ only depends on the net forces $\sum \vec{F}$.
But for any other point (A ≠ C) the acceleration of that point $\vec{a}_A$ depends on the rotational acceleration $\vec{\alpha}$ and hence the line of action of the applied forces.
A corollary to the statement on the book is that when a pure torque is applied (i.e. net force is zero), the body will rotate about the center of mass.
Answer: As you already know when applied force is passing through the com there is no rotational effect. The total mass of the body can be assumed to be in the com and hence F=ma is directly applicable. But when the case is not that, the force applied produces a torque on the body hence producing an angular and linear acceleration. Now the linear  acceleration of every point on the body depends on its distance from the origin i.e the com. And here center of mass of a body does not rotate about its own axis. It translates during the motion. Hope this clarifies somewhat


How can I enable Personal Hotspot on iOS 7 even though my carrier has disabled it?

Question: On my iPhone running iOS 7, I have the Personal Hotspot feature, but I can't turn it on. I've read that it's been disabled by my carrier, AT&T, since the feature is plan dependent. How can I bypass this and still enable Personal Hotspot?
Comment: Im not sure what is subjective. The fact is that on the same carrier and same plan i can use hotspot on my android with no problem. How could there be a device specific restriction for the iphone? I travel a lot. What if i go to a country and use a carrier thats not even on apples list? And this is also a fact because the carrier i use in my home country is not listed on apples carrier list. My question is why can my android bypass this restriction and not the iphone?
Answer: If you're willing to jailbreak, you can use TetherMe. It will enable Personal Hotspot then change the location of the data to appear to be coming from inside the device, thereby bypassing the carrier's disable.

 TetherMe
Dynamically enables native tethering or personal hotspot for iOS3.X or newer devices. This should work on any carrier without the need for customised bundles or preferences.
TetherMe has been tested to work on all iOS versions from 3.0 to 6.1 and works by telling the iPhone to allow tethering on any APN that is used for iPhone data. As a result, you should not be charged any more for tethering data than normal data by your phone company as all tethering data appears to come from the phone itself.


Using GWT with a database

Question: How can I configure the embedded Jetty that comes with GWT so that when I click the run button in Eclipse, my server application can access a postgresql database?
Comment: The title of this question is a bit too generic.
Answer: We had some luck with porting our Tomcat web application (that uses OpenEJB) to GWT embedded server (Jetty) by just following standard procedures for configuring web application.
But after all we decided for running in hosted mode with noserver option and connecting to Tomcat server instead.
Answer: Yah, the GWT embedded Jetty server works ok for simple servlets, but most of the time you be needing something more that Jetty doesn't offer. Other than the simple test servlets I always use the GlassFish and Tomcat container with the noserver option. This allow your servlets to utilize the full power of Java Enterprise Bean and Java Persistence API (JPA). The easiest way for you to test out would be build the project and deploy the WAR to container. Then modify your GWT project ant target hosted to use the noserver option and pass the -startupUrl option with your Tomcat/Glassfish's URL(you project's URL on the container). The GWT can be very lean when combined with pure JPA using POJO DTO. See my GWTPersistence example  at >  NingZhang.info
Answer: Turned out that what I needed to do was to run the app on a Tomcat server on a different host (because the database I needed was too hard to bring over to the development machine for testing).  I ended up using "ant war && scp Navaid.war foo:/www/tomcat/webapps/" to deploy the server side, and I modified the Eclipse run configuration for the project to

unclick the "Run built-in server" on the "Main" tab
add the following options to "Program Arguments" on the "Arguments" tab
-noserver -whitelist "^http[:][/][/]foo[.]bar[.]com[:]8080"

I also managed to modify build.xml so that "ant hosted" will run the hosted mode with the remote server.  I found the "hosted" target, and the <arg> line that looks like:
<arg value="-startupUrl"/>

and added the following line before it:
<arg value="-noserver"/>

and changed the line after it from
<arg value="Navaid.html"/>

to
<arg value="http://foo.bar.com:8080/Navaid/Navaid.html"/>

Using GWT with a database


How to check amount in an Authorized.Net test account?

Question: I have created an account on authorized.net, and I am testing transaction using direct post method , but I am confused how to check the amount in my account ???
Answer: You can login to the developer control panel which is exactly like a live control panel except no real transactions are processed. When you signed up for the developer account you should have been given a login ID and password. Once logged in you can view your test transactions in there under the "unsettled transactions" link.


How to bulk print maps using ArcGIS or QGIS?

Question: I have a polygon layer that I would like to print images or PDFs from in bulk as there are a large number of them. Rather than having to manually scroll and print each individual'site' in the print composer (QGIS 2.0 or ArcGIS 10) are there any tools that I could use or scripts etc?
Comment: This is really two questions, since there are two different solutions for the two products
Answer: For ArcGIS you probably want to take a look at Data Driven Pages:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_Data_Driven_Pages/00sr00000007000000/
"Data Driven Pages gives you the ability to generate a set of output pages by taking a single layout and iterating over a set of map extents. The extents are defined by the features in a layer and are sometimes called tiles, sections, or areas of interest (AOI). The layer that defines the extents is referred to as an index layer. Any feature layer may serve as the index layer. "
Answer: For QGIS, have a look at the Atlas functionality in the Print Composer.
http://docs.qgis.org/2.2/en/docs/user_manual/print_composer/print_composer.html?highlight=atlas#atlas-generation
The idea is to have a "coverage layer" which contains all the "sites" that you want to zoom to and make a map of. Atlas has all kinds of functions which let you control the resulting maps, e.g. whether you always want the same scale or not.
Some new stuff which is not covered by the user guide yet:

Atlas preview functionality: http://nyalldawson.net/2014/02/atlas-previews-in-qgis-2-2/
Highlighting the current Atlas feature:
http://nathanw.net/2013/12/02/waiting-for-qgis-22-highlighting-current-atlas-feature/
Adding images which change with the Atlas feature: http://nyalldawson.net/2013/04/a-neat-trick-in-qgis-2-0-images-in-atlas-prints/
Comment: Thanks for your help guys, I decided to run with the Atlas functionality in the end, I always wondered what that was for!


Is Tbilisi a good place to tour after this year's flood?

Question: I'm going to Georgia within few weeks and I wonder how Tbilisi looks like now. Is it devastated after the flood which took place almost a month ago?
Answer: While I'm not in Tbilisi myself, my wife and children are at present in Georgia, having been in Tbilisi during the flood and the following week, although they now went to the summer house in the mountains.  I have been speaking with them almost daily - so this is almost a first person account.
Severe flooding did occur a couple of weeks ago in Tbilisi, resulting in both human and animal deaths and many injuries and physical losses.  The long-term effect of it though isn't that great, from what I understand.
The only long term "damage" as far as the tourism is concerned is the zoo.  It was all but wiped out by the floods.  It's not open to the public at present.  Other than that, the city continues operating just as it did before. There's water, electricity and gas; telephone network and internet are fine; public transport runs fine; all shops, restaurants, etc. are open; museums are open according to their normal summer opening hours.  Public paths along Kura are open, however parts of them are rather wet from rains that took place over the last week or so.
Naturally, the aftermath is still visible in Mziuri park and the Heroes Square, as well as throughout the city, but all these places are open to the public.
So, all in all, it's still a great place to visit.  I myself will be flying there at the end of July - but I have family there, so floods or no floods, I'd have to go.
If you're interested in any specific venue or place, it should be easy to find that out.
Comment: I live in Tbilisi and can confirm that this answer is very accurate. Life is back to normal.
Comment: Hope your family made it ok, some pictures give a pretty grim impression of the city :-/
Comment: @Blackbird57 Thanks. Yes, they made it ok.  They live higher up in the cit, the water didn't make it anywhere near them.  They didn't loose electricity and, apart from some pretty serious amount of rain, didn't really feel anything too much out of the ordinary.


Lotus out of office function doesn't work correctly

Question: after upgrading template from dwa7 to mail85 the out of office function doesn't work anymore, when i send an e-mail to user@domain the message is delivered but the automatic response from out of office doesn't work. The function only works with the agent, but 6 in 6 hours, not immediately. Does anyone know how to solve this problem?
Answer: Have a look at this article: The IBM Lotus Notes and Domino Out of Office service: Best practices. The article contains several things to check in order to ensure that you can get the Out of Office Service to run instead of the Out of Office Agent.


Simply Connected Open Manifold being Contained in Simply Connected Closed Manifold

Question: I am aware of the work of Siebenmann characterizing when an open manifold can imbedded in a compact manifold with boundary, but I am having trouble understanding the simpler case when the compact manifold has empty boundary and both the open manifold and compact manifold are simply connected. In this case is there any simplification to Siebenmann's requirements and is there a unique way to put on a boundary?
Answer: Let $M$ be a manifold with boundary. Here's a trick you can use if $\partial M$ is connected.
The double of $M$ is defined as $D(M) = M\cup_{\partial M} M$; it is a closed manifold of the same dimension. If $X$ is an open manifold which embeds in $M$, then it embeds in $D(M)$. Using the fact that $\partial M$ is connected, it follows from the Seifert-van Kampen Theorem that if $M$ is simply connected, then so is $D(M)$.
Note, this trick doesn't work if $\partial M$ is disconnected. For example, the open disc $D^n$ embeds in $M = S^{n-1}\times [0,1]$, so it embeds in the double $D(M) = S^{n-1}\times S^1$, but this is no longer simply connected.
Answer: Let me answer the second part of your question, namely, about the uniqueness of the boundary. More precisely, the setup for Siebenmann's compactification is that you have an open manifold $M$ (every component is noncompact). Then Siebemnann gives you some conditions under which there exists a compact manifold necessarily with nonempty boundary $N$ such that $M$ is homeomorphic to the interior of $N$, i.e. to $N- \partial N$. In this situation one can ask if $\partial N$ is uniquely determined by $M$. The answer to this question is negative, see Danny Ruberman's example here.


k-fold cross-validation for large data sets

Question: I am performing 5-fold cross-validation on a relatively large data set and I have noticed that the validation error for each of the 5 training sets are very similar.  So I guess, in this case, cross-validation is not very useful (it would be about the same as just using one training and test set).  So I was wondering if I am working with a special case, or is this the case for all large data sets.  I'm thinking that perhaps if you have enough training examples, the average cross-validation score would not be very different than the score for one training and test set. Is this intuitition correct?
Answer: It is certainly adds value to a single test because you get a stronger justification that your estimated accuracy is correct.
Large dataset certainly helps in making robust, accurate models though it won't bias the cross-validation on its own. The only possible problem you should check for is whether the set contains significant fraction of duplicated objects -- this may happen if the number of attributes is very small in comparison.
Comment: Thanks, it is actually a text dataset, where each example contains some text and tags associated with that text.  In the training set association rules between text words and tag words are found and these are then used for prediction in the test set.  There are very few duplicate examples
Comment: Having a larger number of folds reduces the variance of the estimates but increases the bias as the effective estimation sample size shrinks for a larger number of folds. It is always best to try several values for the number of folds to understand how your procedure behaves with certain data, I would think.


Adobe AIR : Check/Alert/Prompt when user press computer shut down down or command

Question: Is that possible to achieve using Adobe Air or any other suggestion? I have an app which record user time and to prevent user don't forget i think similar solution will work.
Thanks!
Answer: You can bind a listener to close event for the application. When OS received shut down command, it'll try to terminate processes so your app will trigger close event. I haven't tested but hopefully this will work. At that moment, you can register user's session data. That's what other software do when you want to turn off, a little delay...


What are the established rules set for a person to Become a Buddha other than, that, he should have lived as a King?

Question: Long time ago , I was reading some text related to Buddha online and saw that there were many pre-conditions already set for a person to become a complete Buddha. I remember very clearly , the first condition was that the person should have lived as King in the past. While googling again to see the other conditions, I am unable to find the original article. Is anyone aware of such conditions ? Can someone help . Thanks
Answer: Theravada perspective: this paper claims (page 7) that the origin of the idea of a relationship between being a ruler in a previous life and becoming a Bodhisatta is from the Vessantara Jātaka, was expanded on and embraced by Mauryan rulers, and eventually more-or-less canonicalized due to the influence of various South and South East Asian rulers (see also the Mahāvaṃsa and Jinakālamālī). I don't have a full English Buddhavaṃsa available to check, but the Madhuratthavilāsinī (the commentary) doesn't mention that all of the preceding Buddhas were kings/rulers. However the Theravada does not emphasize broad Buddhahood for everyone, and the primary factors for the next Buddha are a prediction and the complete decline of the current Buddha's teachings.
Mahayana perspective: according to the Lotus Sutra, everyone is predicted to become a bodhisattva, and therefore a Buddha (or already is, depending on the interpretation), and no Sutra that I know of insists on a specific past-birth path that includes kingship.
Answer: To my understanding, it's not about becoming a king, but it's about cultivating the perfections (parami or paramita) that makes one qualified to become a Sammasambuddha.
Kingship is not likely to be the criteria to become a Buddha. Rather, becoming a king could be a byproduct of cultivating perfections.
There are 10 perfections from the Theravada tradition, from the link above:

Dāna pāramī: generosity, giving of oneself
Sīla pāramī: virtue, morality, proper conduct
Nekkhamma pāramī: renunciation
Paññā pāramī: wisdom, discernment
Viriya pāramī: energy, diligence, vigour, effort
Khanti pāramī: patience, tolerance, forbearance, acceptance, endurance
Sacca pāramī: truthfulness, honesty
Adhiṭṭhāna pāramī: determination, resolution
Mettā pāramī: goodwill, friendliness, loving-kindness
Upekkhā pāramī: equanimity, serenity

Ven. Bodhi stated in the introduction to A Treatise on the Paramis from the Commentary to the Cariyapitaka:

It should be noted that in established Theravaada tradition the
paaramiis are not regarded as a discipline peculiar to candidates for
Buddhahood alone but as practices which must be fulfilled by all
aspirants to enlightenment and deliverance, whether as Buddhas,
paccekabuddhas, or disciples. What distinguishes the supreme
bodhisattva from aspirants in the other two vehicles is the degree to
which the paaramiis must be cultivated and the length of time they
must be pursued. But the qualities themselves are universal requisites
for deliverance, which all must fulfill to at least a minimal degree
to merit the fruits of the liberating path.

This answer has a hint in the suttas with regards to the degree to which the perfections must be cultivated on the path to Buddhahood.

To a person unblemished,
constantly searching for purity,
a hair-tip's worth of evil
seems as large
as a cloud.
SN 9.14
Answer: It could be the Buddhavaṃsa -- there's a partial a copy of it here:

Chronicle of Twenty-four Buddhas

The chapters I see -- i.e. 1, 22, 23, 24 -- all have the same format: starting with "Royal household life", then "Renunciation", and "Attainment of Buddhahood".


How can I see my old answer(s), to improve them?

Question: I have barely answered one question in these columns. But, since yesterday I am not allowed to answer any, as the filter has decided my earlier answers (sic!) were of poor quality. I am also suggested that I should try to improve my existing answers, among other things, to get the ban lifted. While I have strong reasons to feel that this filter appears to be a coffee filter with no holes in the top compartment, isn't it fair on my part to get a link that would take me to my earlier answers (sic again, as the plural term 'answers' is irrelevant since I had answered only once).
Comment: This is probably a question for meta. If you had answers in the 57 days that you have been a member I suspect they were all deleted. I can't tell because I do not have enough reputation to see deleted answers.
Comment: its probably a coffee filter
Comment: All I see is a rejected edit suggestion; no answers.
Answer: You can see your recently deleted answers on this page.
You can edit your answers linked there, then comment here (since you can't flag yet). Note that I'm not going to undelete answers that should still be deleted.
Answer: All the questions that you have asked are there in your profile, you can visit them and edit them if you wish to.
Comment: But keep in mind that deleted question and answers can only be found there for 60 days after posting. After that period you have to wait till you're 10K
Comment: If there are three answers so far, out of which one is a comment that should not have been posted as I don't have enough reputation to post a comment, I have practically nil probability to 'improve' them before expiry. Would this in turn mean that I would never be able to answer any query?


Can PWM be stacked?

Question: My project currently looks like this.  I set the top analog output to a fixed value around 3V (it varies from board to board, depending largely on the behaviour of the vactrols), and vary the lower one between around 0.5V and 2V (again, the exact values vary) to modulate the amplitude of the output signal.

I'd like to replace the uC with a model that has no analog outputs, but does have PWM pins which can drive an LED.
I'm wondering, if I arrange things as follows, will the likely transient negative voltages between A and B be a problem, or will the speed at which it all happens blur things sufficiently to create an "analog" of the first design?
Comment: If both PWM signals are coming from the same MCU, synchronize them and add them inside the MCU and only have one PWM output.
Answer: Just put an R-C filter after each PWM output.  That will convert the PWM back to analog, and thus avoid problems such as negative spikes.

Can PWM be stacked?


AVR: why each Interrupt Vector occupies two instruction words

Question: During my study of Atmega328 datasheet I found that each interrupt vector occupies two addresses and after searching i can not find why that.
That is a screen shot from atmega328p datasheet page 82
Comment: I don't have the spec in front of me, but it's quite common for addresses to be larger than a single memory word. Each interrupt vector stores an address, so an address likely takes up two words of memory.
Answer: The unit size of the vector table depends on what chip you use. For example ATTiny chips use 2 bytes (1 instruction) for each vector in the table.
The reason for allowing multiple instructions worth on the larger processors is to allow for the use of larger instructions.
For an AVR, the RJMP instruction is a 2 byte instruction for relative jump - however it can only access +/-4kB displacement from the vector table. This is fine on the smaller processors with <8kB of Flash as it allows ISRs (Interrupt Service Routines) to be placed anywhere within the flash memory. However for larger AVRs such as the 32kB flash ATMega328, this is not enough (*).
To access the full flash space you need to use the JMP instruction. This is a direct jump which allows you to access up to 4MB of flash. However the JMP instruction is actually a 4 byte instruction. In order to use these in the vector table you need to allow 2 instruction words for each vector. And this is just what they do.
It is still perfectly possible to use RJMP or any other single word instruction within a two word vector table. All you do is add an additional NOP after it to pad out the instruction to two words.
Additionally you don't necessarily have to jump anywhere. Imagine your ISR was required to do nothing more than set a bit in an IO register. On an AVR you can if the register is within range you can use the SBI or CBI instruction to do this. Because that doesn't have any side-effects on the ALU flags, you can within a two instruction vector table construct your entire ISR (SBI instruction followed by RETI instruction) and save all the overhead of jumping to an ISR.

(*) It is actually possible, though slower, to use what are called "trampolines". This is basically a case of placing a single JMP instruction in the flash within +/-4k displacement from the vector table. The vector table contains an RJMP instruction that jumps to the nearby JMP instruction which in turn jumps to anywhere in the flash.
Comment: According to your note(*), it is may be in our case that the first address is used to store the interrupt vector and the second address is used to store the actual address of Interrupt Service Routine ?
Comment: @mostafayasin No, if a `JMP` instruction is used, the address of the ISR is embedded within the instruction, it's just that the instruction takes up 4bytes. If a trampoline is used on devices with 2byte/vector in the table, then the `RJMP` instruction is in the vector table which stores the relative address of the `JMP` instruction which is placed somewhere else in the memory. The `JMP` instruction still has the address of the ISR embedded within it.


Explanation of why doesn't heat flow spontaneously from a colder to a hotter body

Question: The second law of thermodynamics says that heat cannot spontaneously flow from a colder to a hotter reservoir but only with the expenditure of mechanical energy. This is taken as a postulate or law in thermodynamics. Is there a deeper reason (probably from statistical mechanics) for why this is so?
Comment: Other possible duplicates: https://physics.stackexchange.com/questions/10690/is-there-any-proof-for-the-2nd-law-of-thermodynamics and https://physics.stackexchange.com/questions/63416/mathematical-proof-of-non-negative-change-of-entropy-delta-s-geq0
Answer: Well, technically the energy can flow from a colder to a hotter object. There is no physical law that forbids it. However the probability for this to happen is so low that in reality we never see it. You can imagine that 2 objects (let's assume they have the same mass) are made of springs (basically the molecules) and each of the body has a number of energy quanta (so the colder one has less quanta). When you put them in contact, the total number of quanta (the sum of the 2 bodies quanta) can now spread on the total number of springs of the 2 bodies. So you can do some basic combinatorics, to check how you can distribute these quanta on the springs. If you do that you will see that there are many more combinations if you distribute the quanta equally on the 2 bodies (so thus quanta from the hotter body has to go to the colder one, and this is basically the heat flow), then if you add some quanta from the cold one to the hotter one. In objects of the sizes we are used to there are something of the order $10^{23}$ molecules (springs) so the probability of a quanta going from a cold to a hot one is so incredibly small that you never see it in real world. So there is no law that forces the heat to go from a hot to a cold body, it is just that it is much more likely for that to happen.
Answer: All bodies radiate heat according the the black body distribution for the temperature they are at.
This radiation is energy transferred radially away from the bodies , and its magnitude is given by the Stephan Boltzmann law .  The radiance (watts per square metre per steradian) is proportional to the fourth power of the temperature. Thus a colder body will radiate to the hot body much less than the hot body to the cold. As the hot body will be cooling by its radiation, the rate of cooling will be less than it would be if there were no cold radiator close to it. On the other hand as the incoming radiation from the hot body is much larger than the loss of the cold body's black body radiation, the cold  body will get heated.
Maybe  the quantum mechanical picture, or radiation being photons of energy h*nu will help also. Many more photons of higher energy impinge from the hot body to the cold one, than from the cold body to the hot one.
Edit after the question was made duplicate
When one is studying physics one has to keep in mind what it is all about:it is a discipline that uses mathematical models to describe and predict data/measurements. The mathematical equations used in order to do so have an unlimited number of solutions that are irrelevant and contradictory to data. Laws, postulates, principles  are distillation of observations and measurements which are imposed like axioms to the mathematics, so as to pick up the subset of the  functions that describe and predict measurements and observations.
In  mathematics, axioms can be replaced by theorems which then are provable by the new axioms; in the same way  postulates and laws and principles can be replaced by  theorems , mathematical structures, but the explanation is circular, the same as replacing axioms in  mathematics.
In this answer I am using data , black body radiation, to "explain" why the law had to be assumed.


Buck converter waveform

Question: It became very hard for me to understand the concepts associated with buck converter waveform. What is the role of capacitor in its output terminal? Is it used for smoothing the voltage ripple? Why input current is not zero since inductor block it when it gets powered on and gradually gets increased? enter image description here
Comment: *Why input current is not zero since inductor block it* Why should the input current be zero? An inductor does not block currents. I suggest that you study/look at a few explanations of this buck converter circuit as there are many. There is no need to explain here what has been explained elsewhere already. Then come back with a more detailed and focussed question.
Comment: Welcome to EE.SE! Please simulate the circuit and keep decreasing the output capacitor and observe what happens.
Comment: The "Ic" graph clearly shows what the output capacitor is doing. It shunts the inductor's ripple current so the load gets a steady current rather then a triangle.
Comment: Per Bimpelrekkie's comment, search for 'switching regulators for poets'
Answer: The capacitor serves a couple of purposes:

Transient response improvement
Ripple reduction
High-frequency charge/discharge loop for the inductor

The key point to understand is that the inductor is the primary energy storage and transfer element in the supply, not the capacitor. In its role of transferring energy, the inductor is in one of two states:

'Charging': high-side switch is on, current flows from supply to load, inductor flux is increasing (storing energy).
'Discharging': high-side switch is off, inductor voltage reverses, current flows from inductor to load and back through the catch diode, inductor flux is decreasing (releasing energy).

The voltage emerging from this store-and-release cycle is smoothed out by the capacitor. It forms a high-frequency bypass path for the inductor current ripple, that ultimately goes back to the inductor. The smaller the capacitor, the more the ripple.
At this point I'd like to introduce you to the Falstad circuit simulator. This online tool allows you to create and share visual, interactive simulations that give a 'hands on' feel for circuits as they run. Unlike SPICE and its derivatives, you can dynamically alter the component values without having to restart the sim each time.
Here's a basic step-down converter (try it here):

Try modifying the inductor and filter cap values and see the effect on the ripple.
Note also that there's a party trick going on: bootstrapping the high-side n-FET gate drive. This technique creates a voltage that's above Vin to control the gate, using the inductor switch waveform as a source of AC. It's why you see some regulators that need a cap to a 'BOOT' pin: they using a high-side n-FET and thus need to make that voltage
And here's another party trick: synchronous switching. This replaces the lossy catch diode with a low Rds(on) FET (simulate it here):

This technique improves efficiency, as the low side FET has a near-zero IR drop, compared to the forward voltage drop of about 0.3V for even the best Schottky catch diode.
Answer:
Why input current is not zero since inductor block it when it gets powered on and gradually gets increased?

For an un-energized inductor, i = 0 at t = 0+. But for an energized inductor, the current when a voltage has just been applied to it is equal to the current just before the voltage was applied.
Buck converters operate in two modes: continuous conduction mode(CCM) and discontinuous conduction mode(DCM). In your example, the buck converter is operating in CCM.
In CCM, the inductor current never drops to zero. Hence the name 'Continuous conduction'. That's why there is some non-zero current flowing through the inductor when the switch turns on.

In DCM, the inductor current falls to zero during the off-time of the switch. Hence the name 'Discontinuous conduction'. In this case, the inductor current will be zero when the switch turns on, but this is only because the inductor was un-energized before the switched turned on.

What is the role of capacitor in its output terminal? Is it used for smoothing the voltage ripple?

Yes. Without the output capacitor, the load would get a pulsed DC output, just like in a half/full wave rectifier without a filter. Try simulating a buck converter with and without an output capacitor and see the results.

Buck converter waveform


Android testing sms from emulator

Question: If the application using sms-sending and receiving how is it possible to test it within the emulator?
Comment: hi, i think that is not posible in emulator. coz there is no IMEI number and all other information so. but not sure.
Answer: It is so simple first start the emulator and launch your application.
now if you have another project(any) launch this in another emulator.
On the other emulator start sms application and send sms to the emulator in which your app is running.The phone no. is simply the emulator number like 5556 or 5554.
Edit
Now You can send an SMS or make a call using Emulator Control. In Eclipse go to window->show views->other->Emulator control.
Comment: That is for sending/receiving SMS between built-in messaging application of the Android OS. If an emulator A expects to receive the SMS through its 3rd-party application from an emulator B, then we should specify the sender's phone number something like this "1555521555X" (X=4,6,..) in the application of the emulator A.
Answer: Now we can use emulator's extended control to send directly to the emulator.

Open Extended controls window.
Open Phone tab
Enter message and send
Answer: Check this for Sending SMS to the Emulator using Port.
Sending SMS for Emulators...
Answer: You might want to refer to one of my article on handling Emulator SMS: http://xjaphx.wordpress.com/2011/07/07/sending-messages-among-devices/

Android testing sms from emulator


Basement It's not wet just spots on concrete

Question: I would like to do something with basement floor it doesn't get wet just dark spots in area!  Our house built in 70's someone has said underground river in neighborhood not sure if true!  We tried commercial rubber backed carpet tiles in basement that lasted for about 2 weeks and we developed horrible smell!  Once we pulled tiles up and airing out we got rid of smell.  We run humidifier all time! Help I would like to use area as living space!
Comment: Are you running a humidifier or a dehumidifier?
Comment: My parents had a similar issue with their basement, they solved it by retrofitting a french drain around the house, draining into a sump pit that was pumped well away from the house. It wasn't cheap though, I seem to remember it costing around $15K - $20K  and that was over 10 years ago.
Comment: dark spots == it gets wet
Answer: Basically what appears to be happening is that ground water is saturating the concrete, which is acting like a sponge. The concrete will continue to absorb the ground water until that situation is remediated.
Some solutions to this include digging down to the footing of your foundation completely around your entire house, and installing a french drain to direct the water away from your foundation. The foundation walls should also be waterproofed from the outside. This is typically done by using attaching a combination of tar, plastic sheets, and drain tile to the exterior foundation walls that are below grade.
You may need to cut into the basement slab, and run drains under the slab and into a sump pit if the source of the water is coming from below the house. If the walls of the foundation on the inside are bone dry, but the slab is soaking wet, then you pretty much know that it is coming from below.
Obviously, both of those solutions are expensive, and are typically above and beyond a DIY project, unless you have construction experience, and you know exactly what you are doing.
One thing you can do to partially remediate this problem on a budget would be to seal the surface of the concrete so water cannot weep into your living space.
Epoxy floor paint may be an option as long as the slab can be dried out. The floor needs to be nearly bone dry before you can apply the paint. If it is too damp, the paint will not bond properly to the concrete, and it will cause the paint to blister, and peel. I had a similar problem in my basement, about 4 years ago, and the epoxy paint solved the problem. So far it has held up pretty good. I will need to touch it up in spots from normal wear and tear, but it has not peeled at all.
You can try drying out the floor by using a combination of a blower fan, and dehumidifiers. You can also try laying down a thin layer of clay based kitty litter (unscented is preferable) to soak up excess moisture. If you can keep the floor dry for at least a day, then you have a good chance that the epoxy will take. If the floor never dries out, then you can wait and try again when conditions are favorable. The best time to do this is during colder/dryer months where the relative humidity is at its lowest.
When you apply the paint, make sure you read and follow the instructions exactly. You would typically apply a degreaser/etching solution first, followed by a concrete primer and bonding agent, and the finally the epoxy paint itself. If all goes well, then your basement shouldn't have any more water seepage issues.


Drag and drop file to existing VLC player

Question: Whenever I try to drag and drop a file to an existing VLC player ( as per Drag & Drop Files and Items in Unity ! ), it seems to open a new VLC window and start playing from there. Is it possible to run it from the existing open window?
Answer: open vlc > tools > preferences. there is an Instances section, enable "Allow only one instance'
There is also an option to " Enqueue files when in one instance mode" On recent versions of vlc that actually works. Enable if desired & see if it does.
Make sur you click save on your way out of prefs
Comment: doug, you're a life saver. Will vote up your answer as soon as I have enough rep points :)


I'm travelling from Arles to Florence--what's the easiest way?

Question: I'm travelling from Arles to Florence in March, and I'm wondering what is the least troublesome way of doing it. I'd prefer an option in which I don't have to drive. And if travelling by train, I'd prefer a journey without too many changes, as I want to reduce the risk of missing a change.
Comment: I want to stress that the amount of changes dosnt really effect how likely you are to make the train. Your more likely to make 2 changes of 30 mins then 1 change of 10 mins for example.
Answer: The route with the least changes seems to be to get the train from Marseille to Milan. And get a direct train from Arls to Marseille, and then from Milan to Florence. There are multiple trains day on these routes, leave as much time as you feel you need. But the section between Marseille and Milan only runs a few times a week during the week (but daily in summer) You can check the times for it at https://www.thello.com/en/marseille-milan/timetable/
Also note, of your planning on returning the same way. The train from Milan to Marseille arrives too late for last train from Marseille to Arles. There are earlier trains from Milan to Nice and then from Nice to Marseille (adding an extra change), you could also spend the night in Marseille.


What is an easy way to explain how Garbage Collection works?

Question: I have a short attention span so I couldn't make my way through the Wikipedia article.
I understand there are several techniques for garbage collection but a common one is the "reachability" test, where an object's eligibility for collection is based on whether or not it can be "reached" by a rooted object (which, to my understanding is an object that is known to not require collection). When you want to know if a certain object is reachable, how would you go about it? How do you know where to look?
The collector obviously must be aware of all allocated objects and rooted objects. How does it determine the reachability of each of these objects?
Answer: By walking the pointers/references, I'd say. In principle you just look whether an object still has references pointing to it (from other objects, local variables of currently executed code, ...). If it hasn't then no reference to this object can be obtained again (in languages like Java, at least where you can't do pointer trickery), so it's usually safe to throw that particular object away.
Other schemes used (or still in use) are for example reference counting where each object has a counter of references to it which must be incremented each time someone gets a reference to that object and decremented each time someone loses a reference to that object. COM in Windows works that way, if I remember correctly.
Java and .NET use (among others) generational garbage collection where each object is initially assumed to die very quickly (generational hypothesis). It then emplos some optimizations to keep garbage collection cycles fast and thus not disrupt the programs running too much. In ye olde times it wasn't uncommon for GC to lock up a program while it ran, sometimes for several seconds.
Aside from that, GC usually only runs when memory is low, i. e. too many dead objects have accumulated and need to be reclaimed. That's why most managed applications seem to waste much more memory compared to unmanaged ones, even though in many cases much of that memory can be reclaimed by running the GC once.
Answer: A garbage collector will always know about every allocated object, since otherwise it cannot possibly detect unreachable objects for deletion.  This is all taken care of during memory allocation.  This makes sense, since if the garbage collector doesn't know about every object, then it would be possible to form orphaned sets of objects which cannot be reached, not even by the garbage collector.  Basically, that would be a memory leak.  So at the very least the garbage collector must be aware of every allocated object.
This leads to the question of how the garbage collector determines which objects are eligible for deletion.  There are various techniques for this, but two that you will hear about a lot are "mark and sweep" and "reference counting" (they often come up in text books) and they are worth knowing about to understand the basic ideas of garbage collection.
Mark and sweep involves the garbage collector walking through the object references (starting at a known set of non-collectible objects) and marking each object that it can reach (setting a flag on the object for example).  When it has exhausted all references, then the set of objects that are NOT marked, can be deleted during the sweep phase.
Reference counting involves the garbage collector keeping a count for each object in memory of how many other objects refer to it.  This counter will be incremented each time a reference to the object is established from another object, and decremented when a reference is deleted.  When the counter hits 0, the object is no longer being referenced by anything, and the garbage collector knows that it can be safely deleted (it has essentially become unreachable at this point - no object "knows about" this object anymore).
Answer: When we create the object and assign that object equal to null that object is ready to be deleted by the garbage collector...
Answer: A simple (but common) approach to garbage collection would be analogous to finding everything of value in a building and moving it to a new building, then blowing up the old building and replacing it with an empty one.  To minimize the amount of object moving required, the system may use a few buildings of different sizes.  All new objects go in a small building.  When that's full, everything useful is copied to a medium building and the small building is blown up and replaced.  If there's less than a small building's worth of stuff left in the medium building, everything useful will be moved to a big building, and then the medium building will then get blown up and replaced.  If it seems like the large building has accumulated too much junk, everything useful will be copied to another large building and then the big building will be blown up and replaced.  Although the small building will get blown up and replaced a lot, much of the stuff that's in it will be junk and won't need to be copied.  Likewise, by the time the medium building needs to be replaced, much of the stuff in it will have been abandoned, so only a small percentage will need to be moved to the big building.  Copying all the stuff that's in the big building will be expensive, but that operation won't have to happen so often.
Answer: The collector must be aware of the location of object references within the global variables area, as well as in the activation frame of each function/method/procedure call, for each thread. The processor registers can also contain object references.
Some information must be supplied either by a compiler, or by a virtual machine.
Answer: Start with the root objects (i.e. those on the stack in your main() - equivalent) then just follow every pointer/reference and mark each object as 'reachable'. Continue until you've marked every object. The remaining objects (that haven't been marked) are garbage.
The other way is to have reference counting, which is garbage collection too, except that the marking is done at each pointer write and cleanup is istantaneous (as soon as an object is unreachable, it's ref count is zero, so it is destroyed). Note that ref-counting needs a mark-and-sweep phase (like above) to solve cycles. (I.e. objects that cling to each other but no-one else cares about)
Answer: You can think of a running program (maybe I should be specific to Java) as being a number of Threads. The virtual machine can use the root frame of each thread as a root. It can then walk down the reachability-tree of everything that is referenced from that root (plus all stack frames under the root).
Anything else is not reachable


Are baritones a third below the tenors?

Question: I have understood that baritones like to choose a key which is a major (or minor) third below the comfortable key for a tenor. If I, a tenor, sing Twinkle twinkle little star in F the baritone would sing it in C#.
This is what I have been told.
Is this true? And if this is false then what is the truth about this?
I am asking this as I have had problems singing with men who have low voices.
Answer: Yes, that's about right.  Baritone is an 'in-between' range.  Not as high as tenor, not as low as bass.
Note that voice categories are not solely about how high or low you CAN go.  It's about where the voice sounds best.
Answer: Yes, typically baritone vocal ranges are around a minor third lower than tenor ranges (~A2-A4 vs ~C3–C5). Wikipedia has some handy images depicting where each range usually sits:
Tenor range:

Baritone range:

These images are for the most common ranges (or average ranges) for tenor and baritone voices. There are exceptions to every rule (singers like Chris Cornell and Eddie Vedder are great examples of baritones who can sing considerably higher than the average baritone), but it is a good rule of thumb.
Obviously, transposing down isn't necessary if the song you're singing doesn't reach the higher tenor extremes, just as it wouldn't be necessary to transpose a baritone part up for a tenor to sing if it wasn't particularly low.

Are baritones a third below the tenors?


Path Analyzer Tracking Pixel

Question: I am interested in using Path Analyzer. I was told that we can use, a tracking pixel (script) on our none Sitecore sites, however, I am not finding any documentation about this. Please point me in the right direction. -JMT
Comment: I'm not sure what you're asking. Are you asking about using the Path Analyzer or how to use a Tracking Pixel? These are also pretty vague questions. Try asking questions that are a bit more focused and specific about what you are looking for.
Comment: Maybe you want to track external site using FXM ?
Comment: **"I am interested in using Path Analyzer"** I want to use path analyzer to see traffic across both my Sitecore site and my none Sitecore sites. I was told you can do this by using a Sitecore tracking pixel on the none Sitecore sites and report back to Path Analyzer.
Answer: Have a look at the Federated eXperience Manager: https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/federated_experience_manager/a_functional_overview_of_fxm
FXM allows you to capture visitor information across sites.
You must add a JavaScript tag to every page though.
Comment: This looks like what was briefly described to me. Although on this page it specifically states that FXM does not currently support Path Analyzer. Thank you for the assistance this answers my question. I will have to do  some more reading/testing.  https://doc.sitecore.net/sitecore_experience_platform/digital_marketing/federated_experience_manager/configuring/the_requirements_and_limitations_of_fxm

Path Analyzer Tracking Pixel


"Norm is continuous" means?

Question: What is the meaning of saying "Norm is continuous"?Under what conditions the norm is continuous?& Under what conditions the norm is Discontinuous?
Comment: Any norm is continuous because they are Lipschitz. A norm never is discontinuous.
Comment: @Masacroso:Thanks!!Actually this question arised from user66372's  second comment in https://math.stackexchange.com/questions/328479/how-do-i-prove-the-completeness-of-ellp?rq=1 as he putting light on the "continuity of norm"
Answer: Let $(V,\|\cdot\|)$ be a normed vector space. The norm is continuous as a mapping $\|\cdot\| : V \to \mathbb{R}$ of normed vector spaces $(V, \|\cdot\|)$ and $(\mathbb{R},|\cdot|)$.
In fact, the triangle inequality implies that the inequality
$$ \big|\|x\| - \|y\|\big| \leq \|x - y\| $$
holds for any $x,y\in V$.
Let $U \subset \mathbb{R}$ be non-empty open set and take $x_0 \in V$ such that $\|x_0\| \in U$. Then there is some $\varepsilon > 0$ so that $B_{\|x_0\|}(\varepsilon) \subset U$. If you now take any $y \in B_{x_0}(\varepsilon) \subset V$, then the inequality above implies that $\|y\| \in B_{x_0}(\varepsilon) \subset U$. In other words, with every $x_0$ in the pre-image of $U$ there is whole neighborhood of $x_0$ in that pre-image. This pre-image is an open set. This verifies the continuity of $\|\cdot\|$.
Answer: It means that given an $\epsilon>0$ arbitrary, there is some $\delta>0$ with $||x-y||<\delta$, implying
$$
|\;||x||-||y||\;|<\epsilon
$$
where the regular absolute value on the reals is used in the final inequality.
This is an easy application of the reverse triangle inequality.
Answer: We says that a function $f:A\to B$ is Lipschitz when
$$\frac{d_B(f(x),f(y))}{d_A(x,y)}\le K$$
for any $x,y\in A$ for some fixed $K>0$. Now, cause the reversed triangle inequality, for any norm $\|{\cdot}\|:H\to\Bbb R$ we have that
$$\big|\|x\|-\|y\|\big|\le \|x-y\|\implies \frac{\big|\|x\|-\|y\|\big|}{\|x-y\|}\le 1,\quad x,y\in H$$
And because the Lipschitz condition imply continuity then a norm is continuous.

"Norm is continuous" means?


How can I get my Pi to show nothing but a black screen until it loads LXDE?

Question: I know this is a bizarre question, but I need the Pi to display images to serve as a digital sign. The reason I want a black screen through the whole boot process is just so I don't have all that kernel text whizzing by.
Answer: You can disable the splash through a config.txt entry, but at this time there is no way to prevent the kernel output from displaying without recompiling the kernel.
From the official docs

DISABLE_SPLASH
If set to 1, don't show the rainbow splash screen on boot. The default value is 0.


xquery should give me proper closed tags for empty node (sql server 2008)

Question: If I have xml which have following some empty node like following.
<TAG ID="abc"></TAG>
when I modify/select this xml it returns the empty tags like
<TAG ID="abc" />
I want empty tags closed with </TAG> closing like
Can I achieve this ...?
Comment: not improper but I want tag should be closed with ``.
Answer: Please note that the serialization of an XML result in SQL Server is not going to be determined by XQuery itself but by the conversion of the XML datatype to a string representation. In your example
DECLARE @X XML; SET @X = '<TAG ID="abc"></TAG>'; SELECT @X;

You are not using XQuery, you are just using the XML Parser and the XML serializer.
Thus, even if we added the serialization options of XQuery vNext, they would not be having an impact.
As Michael Kay mentions, there is no difference between the two serialization. Why do you want to differentiate between the two? If you have a tool that requires that differentiation, I recommend to ask them to change it to make their parser compliant to the standard. Alternatively, see if you can find an XML Parser/serializer on the client-side that gives you options on how to serialize an empty content element.
If you require full lexical fidelity instead of XML Infoset fidelity in the database, I would recommend to store your XML in a varbinary(max) since that will preserve your encoding and every code-point you enter, at the cost of having to do runtime casts to XML to do any query processing.
Best regards
Michael
Answer: Any application that consumes XML should treat  and  as equivalent, therefore XQuery processors assume that they are equivalent and that there is no legitimate reason why users should prefer one form over the other. (Similarly, for example, they don't allow you to ask for attributes to be in single rather than double quotes, or for spaces to be added around the "=" sign.)
Answer: In many XQuery 3.0 processors (BaseX, Saxon, etc.), "html" can be specified as serialization option, which will output empty elements in the the expected way:
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare option output:method "html";
<TAG ID="abc"></TAG>

I can't tell, however, when/if XQuery 3.0 will be supported in SQL Server, or if it provides another way to change the serialization defaults.
Comment: If I am having following
`DECLARE @X XML
SET @X = ''

SELECT @X`

how I can add your code with this?


Polynomial making every matrix diagonalisable

Question: For $n \geq 2$ a fixed integer, how to prove that there is no polynomial $P\in \mathbb{C}[X]$ such that for every matrix $A \in \mathcal{M}_{n}(\mathbb{C})$ : $P(A)$ is diagonalisable?
Edit : $ P \neq 0$
Comment: also needs the polynomials nonconstant
Comment: Guessing here: perhaps explicitly work out $P(A)$ for every nontrivial Jordan block matrix $A$ (that is, constant on the diagonal and $1$ on the first superdiagonal)?
Answer: You need $p$ to be non-constant, otherwise $p=1$ is a counterexample.
If $p$ is non-constant, then $p'(z)\ne0$ for some $z$. Let $J$ be the nilpotent Jordan block of size $n$ and $A=zI_n+J$, i.e. let $A$ be the $n\times n$ Jordan block for the eigenvalue $z$. Then
$$
p(A)=p(z)I_n+p'(z)J+\frac{p''(z)}{2!}J^2+\cdots+\frac{p^{(n-1)}(z)}{(n-1)!}J^{n-1}
$$
is not diagonalisable because all eigenvalues of $p(A)$ are equal to $p(z)$ but $p(A)\ne p(z)I_n$.


Extracting Data from manifest.xsf file using PowerShell

Question: I trying to extract information about the rules that are applied to a number of InfoPath forms, and I am using Powershell to do so.
I have unpacked the template.xsn file, and found the manifest.xsf file that stores this data.
Using the Powershell [xml]$ProjectXmlFile = Get-Content manifest.xsf to get the xml data, I am struggling to identify the nodes correctly.
The nodes are identified using the "xsf:" precursor, for example:
<xsf:submit caption="Submit" disableMenuItem="no" onAfterSubmit="close" showStatusDialog="no">
    <xsf:errorMessage>The form cannot be submitted because of an error.</xsf:errorMessage>
    <xsf:davAdapter name="SharePoint Library Submit" submitAllowed="yes" overwriteAllowed="no">
        <xsf:folderURL value="../"></xsf:folderURL>
        <xsf:fileName value="my:Submit/my:ref" valueType="expression"></xsf:fileName>
    </xsf:davAdapter>
</xsf:submit>

How do I identify these nodes in order to get the information out as normal xml data (i.e. if the nodes didn't have "xsf:" prefixing them)?
This is what I've been trying to use:
foreach ($DataQuery in $ProjectXmlFile.'xsf:xDocumentClass'.'xsf:dataObjects'.'xsf:dataObject'.'xsf:query'.'xsf:sharepointListAdapterRW')
 {
        Write-Host "DataQuery.name = $($DataQuery.'xsf:name')"
}

Or is there another reason that I can't access these nodes?
Answer: By setting the XmlTextReader.Namespaces property to the $false value, you can disable namespace support.
$x = @'
<xsf:submit caption="Submit" disableMenuItem="no" onAfterSubmit="close" showStatusDialog="no">
    <xsf:errorMessage>The form cannot be submitted because of an error.</xsf:errorMessage>
    <xsf:davAdapter name="SharePoint Library Submit" submitAllowed="yes" overwriteAllowed="no">
        <xsf:folderURL value="../"></xsf:folderURL>
        <xsf:fileName value="my:Submit/my:ref" valueType="expression"></xsf:fileName>
    </xsf:davAdapter>
</xsf:submit>
'@
$xml = New-Object -TypeName System.Xml.XmlDocument
$sr = New-Object -TypeName System.IO.StringReader $x
$xtr = New-Object -TypeName System.Xml.XmlTextReader $sr
$xtr.Namespaces = $false
$xml.Load($xtr)
$xml.'xsf:submit'.'xsf:errorMessage'

Output:
The form cannot be submitted because of an error.


MediaPlayer error in eclipse when I try to reference a song

Question: I'm trying to add background sound when my app starts up (main menu). I've researched how to do this and put it to work but I keep getting errors on eclipse. One suggestion was to put my music file in the res/raw folder of my project and reference it from there. All said and done, i get an error when I try to reference the song. R.raw.freezepop_starlight.mp3 gives me an error "the primitive type does not have a field mp3" .. does this mean I can't use an .mp3 file??? example code of how this is done will help.
MediaPlayer mp = MediaPlayer.create(context, R.raw.freezepop_starlight.mp3);
Answer: Drop the .mp3. Resources are referenced without their extensions.
MediaPlayer mp = MediaPlayer.create(context, R.raw.freezepop_starlight);


$G$ a group and $H, K\mathrel{\unlhd}G$. Assuming that $H \cap K = \{1_G\}$ and $G = \langle H, K \rangle$, prove that $G \cong H \times K$

Question: I am trying to prove the following statement:

Let $G$ be a group and $H, K\mathrel{\unlhd}G$. Assuming that $H \cap K =
 \{1_G\}$ and $G = \langle H, K \rangle$, prove that $G \cong H \times
K$.

From this, we get that $HK \cong H \times K$. Naturally, it would be ideal if I could prove that $HK \cong G$. One issue that I am facing here is the meaning of $G = \langle H, K \rangle$. How is this defined (I mean, more explicitly)? Is my strategy correct or
Answer: If both $H$ and $K$ are normal in $G$, note that
$$\color{green}{\underbrace{\color{black}{h^{-1}k^{-1}h}}}\color{green}{\underbrace{\color{black}{k}}}\in \color{green}{K} \hspace{15pt}\text{and}\hspace{15pt}\color{blue}{\underbrace{\color{black}{h^{-1}}}}\color{blue}{\underbrace{\color{black}{k^{-1}hk}}}\in \color{blue}{H}$$
so we have $h^{-1}k^{-1}hk\in H\cap K=1$.  Thus $h^{-1}k^{-1}hk=1$, so by left multiplying by $kh$ we get $hk=kh$.  Since our choice was arbitrary, we must have that $H$ and $K$ commute elementwise.
$\langle H , K \rangle$ is the group generated by all words with letters in $H$ and $K$.  Because $H$ and $K$ commute, however, we observe that given any such word, we can rearrange so that all $H$ are on the left and all $K$ are on the right.  In particular, every element of $\langle H , K \rangle$ may be uniquely expressed as a product $hk$ for some $H\in H$ and some $k\in K$.
Now let $\varphi:\langle H , K \rangle\rightarrow H\times K$.  Proving the homomorphic property is the content of this statement.  Then, because elements of $G$ are uniquely represented as products $HK$, the isomorphism has a trivial kernel, so it's injective, so it's surjective, and we're finished.
Answer: The symbol $\langle H, K \rangle$ is used to denote subgroup generated by elements of $H$ and elements of $K$. Since both $H$ and $K$ are normal subgroups, $HK$ is a subgroup.  It should now be straightforward to prove that $HK = \langle H, K \rangle$


Can a metamagic cost reduction be applied to Heighten Spell?

Question: Since Heighten Spell actually increases the level of the spell, can it's metamagic level adjustment be reduced by traits like Magical Lineage or feats like Spell Perfection?
Comment: Because you can reduce the cost of metamagic level adjustment? If it's just a 2nd level spell you can't reduce the spell slot required to cast it.
Comment: The description of Heighten Spell is very vague, as it is worded you can cast a Quickened Heightened Fireball with a lvl7 slot with an effective spell level of 7. Am I the only one not to play like that ?
Answer: No
From the text that you linked to,

A heightened spell has a higher spell level than normal (up to a maximum of 9th level). Unlike other metamagic feats, Heighten Spell actually increases the effective level of the spell that it modifies... The heightened spell is as difficult to prepare and cast as a spell of its effective level.

They are simply higher level spells in every respect - they do not take up a spell slot that is even higher than their effective level.
Comment: The question has been edited, so this answer no longer applies.