What are the virtuous acts of the first night together for newly married spouses?

Question: I am getting married next week so I wanted to know the things we do in the night of marriage. I had a doubt about can we have sex with our wife on the first night of marriage so please clear this doubt and tell me other things we should do on the night of marriage thanks
Comment: As soon as you're married, sex is halal; what's the question?
Comment: @G.Bach well you see only the technical site, there are recommended practices ;)
Comment: @Medi1Saif Well "can we" sounds like "is it halal" to me, and of course there's recommendations too but you know how it is, well-meaning words don't really motivate people anywhere near as much as obligations and taboos.
Answer: First of all congratulations and may Allah combine both of you in good deeds and bring goodness between you (sunan abi Dawod and Jami' at-Tirmdihi)
Fiqh perspective:
Once you have the agreement or consent from the guardian of your future wife and your wife, and at least two witnesses for that you can basically consider yourself married, as most scholars mahr is only obligatory when you consume the marriage.
Of course determining or fixing a mahr (before consummation) is highly recommended and also having a marriage contract where both of you, you and your spouse may declare their conditions for this marriage. And you should abide to this contract.
Once you are married and/or your wife enters your home you are allowed to have intercourse with her unless she is in her menses or both of you have fixed some legal conditions in your contract that don't permit it yet (let's say your wife is a virgin and she is afraid from the "first time" and wants you to be gentle and patient) or in the same situation (and without a contract) you remember Allah's words in the qur'an:

And of His signs is that He created for you from yourselves mates that you may find tranquillity in them; and He placed between you affection and mercy. ... (30:21)

and give her a certain time or try to gain her confidence and arouse her lust via foreplay, as some scholars interpret (2:223):

... وَقَدِّمُواْ لأَنفُسِكُمْ ...
put forth [righteousness] for yourselves (Sahih international)
do some good act for your souls beforehand (Yusuf Ali)
do good beforehand for yourselves (Shakir)
place forward (good deeds) for yourselves (Dr. Ghali)

as an indication for the foreplay, while most others say it refers to doing good deeds and avoid bad deeds as you may conclude from most (if not all) translations! Al-Qurtobi in his tafsir also quoted in this context that spouses should do dhikr before having intercourse (based on the sahih hadith)!
We may conclude: you are allowed to have intercourse with your wife once you are married to her by means of witnesses, acceptance of guardian and herself, and if a mahr is fixed (even if not payed yet), but you should treat her the best way you can.
Note that both of you will be very exited as until this moment you were strangers so think well what the first impression of your wife about you as a husband will be!
Some virtuous of the first night

If she moved to your home take care that both of you enter it with your right feet (See for example sahih al-Bukhari and here)

Put your hand on the forhead of your wife and say the du'a:

Allahumma inni as'aluka min khayriha wa khayri ma jubilat 'alaihi, wa 'audhu bika min sharriha wa sharri ma jubilat 'alaih
(O Allah, I ask You for the goodness within her and the goodness that she is inclined towards, and I seek refuge with you from the evil to which she is inclined).' (Sunan ibn Majah, sunan abu Dawod,

and give her a nice kiss on the forehead and her right hand.

it is highly recommended to pray a nafl of two rak'a either each of you for himself or as a jama'a (I'd prefer the last, as it is a symbol of your first act together as spouses).

Have in mind the words of our Prophet():

He who is deprived of tenderly feelings is in fact deprived of good. (Sahih Muslim)

so be good to her talk and speak nicely. and treat her kindly Read how our Prophet () treated his new wife in the same situation:

Asmaa' bint Yazeed ibn al-Sakan, who said:
"I prepared 'Aa'ishah as a bride when she married the Messenger of Allaah (peace and blessings of Allaah be upon him). I came to him and invited him to see her (uncover her face). So he came and sat beside her, and a large cup of milk was brought to him. The Prophet (peace and blessings of Allaah be upon him) drank some, then offered it to her, but she lowered her head and felt shy. I rebuked her and said: 'Take it from the hand of the Prophet (peace and blessings of Allaah be upon him).' So she took it and drank a little, then the Prophet (peace and blessings of Allaah be upon him) said to her, 'Give some to your companion (meaning himself). (Musnad Ahmad: source)

As both of you will be nervous you should work on this and forget about having intercourse, as this can happen at any time (the right time hopefully) once both of you have found confidence and trust (in) each other and reach a certain arousal while doing some kind of foreplay (kissing, caressing etc.) this may happen:

Intercourse should be preceded by kind words, playfulness and kisses. The Prophet (peace and blessings of Allaah be upon him) used to play with his wives and kiss them. (Source islamqa #5560)

If you have intercourse you should say the dua' mentioned above:

"Bismillah! Allahumma janibnash-Shaitana, wa jannibish-Shaitana ma razaqtana
(In the Name of Allah, O Allah! Keep us away from Satan and keep Satan away from what You have bestowed upon us);' (Riyadu as-saliheen)

If you ever had intercourse with your wife and want to have it again it is recommended to perform an ablution (sahih Muslim)

Be aware that kindness, gentleness and affection is the key there's a da'if hadith saying that a man shouldn't "jump on his wife like on an animal" (with the purpose of having sex), even if the hadith is weak it has backup in both the qur'an and sunnah!
Other sources see islamqa #854 and in Arabic this article and this thread.


What are good Monthly Income Funds? [Canada]

Question: I would like to invest $100000 cash in a monthly income generating mutual fund which is
low risk - I read that some pay div , interest and return of capital.
  Can I have the names of three funds that are tax efficient and low risk and one that pays
a 4 to 6 cents dividend per unit per month and one to consider purchasing outside the RRSP.
  I know that stocks and mutual funds are not guaranteed like GICs.
So I am more interested in preserving my capital and yet receive a decent monthly payout.
Comment: If you're not looking for funds but REITS you could save the administration fee. Something like Riocan or Northview.
Answer: @sharam - big question.  I am going to answer part of it, but not as directly as you might like.
You mention 4-6 cents per unit per month, but fail to give a unit price, so it is hard to tell how much return you are really looking for.
Given the amount you have to invest, depending on your time horizon, you will do much better outside of mutual funds.  Many funds in this category have fees in the 2% range.  You actually have enough money to have a diversified portfolio on your own, without recourse to funds.
If you want to use a fund-like product, I encourage you to look at well established ETFs (Exchange Traded Funds).  They are basically like mutual funds that trade on the open stock market.  One good example in this category is iShares XDV
Good Luck


What happens if too much is given during a transmutation?

Question: In Brotherhood, during a transmutation, what happens if too much is given as a part of the equivalent exchange? In the series, the brothers lose something each for trying to give too little during the human transmutation attempt to bring back their mom... So what would happen if they give too much? Anything at all?
Comment: I suppose if you intended to transmute a kilogram of dirt into a 500 grams of gold, you'd have 500 grams of dirt left untransmuted. But transmutation of more complex objects might work by different rules. Not sure that was explained in the canon.
Comment: @Hakase So you are saying it is a process that only uses what is needed should more be present? But then takes from the user a sort of payment when what is provided is not enough?
Comment: Btw. we see what happens if someone uses alchemy, gives something but does not get anything: Scar. His arm is for disassembling things and until he gets the 2nd tattoo in Brotherhood, he does not get anything from it. In the original series, it is unclear if that stuff is used for the stone too but this question is about Brotherhood so we have it answered in the show itself.
Answer: There is no such thing as "giving too much" here. @Becuzz's answer touches on this, but I want to expand on it as well as talk about the human transmutation.
Giving "too much"
Alchemy (in the FMA canon) is basically chemistry. I will assume anyone reading this has not taken much (or any) chemistry in their life, so I'll try to keep it relatively simple.
Imagine you have a lighter filled with benzene. When you light it, and it starts burning, a chemical reaction is taking place, transforming benzene (C6H6) and oxygen (O2), into carbon dioxide (CO2) and water (H2O). You can represent this as an equation showing the "amounts" of each compound required.

What happens if you put in 25 of O2 instead of 15? Simple: the 10 remaining O2 will not be used.
Transmutation, while more complex scientifically, obeys the same principle. If we're transmuting a block of lead into gold, we will get an equivalent amount of gold as the lead that we transmuted. Giving "too much" lead will result in either excess gold (if there is enough transmutation energy), or leftover lead (if it is not transmuted). The amount of gold will always be chemically equivalent to the amount of lead consumed in the reaction.
TL;DR: The chemical amount consumed in the reaction will always equal the chemical amount of the product created.
Human transmutation

In the series, the brothers lose something each for trying to give too little during the human transmutation attempt to bring back their mom

This isn't exactly correct. I get what you're trying to say, but it's not quite accurate.
The brothers gave exactly what they needed to get their mother back, right down to the soul data from their own blood. The reason they didn't succeed is because they could not provide her human life to go inside the body they created (which was actually a pretty good attempt for pre-teen prodigy knowledge of human anatomy). Add to that, of course, that God does not permit resurrection of this human life, and you've got a recipe for disaster.
The reason they lose their bodies proper is because they had to pay a toll to go inside the Gate (yes, against their will, as punishment). In the eyes of the beings overseeing this transmutation, the exchange was equivalent:

The materials (carbon, water, etc.) given were consumed and created the blackened beast.
Edward lost his leg and saw some knowledge within the Gate.
Alphonse lost his body and saw a lot of knowledge within the Gate.
Edward lost his arm and brought back Alphonse's soul from beyond the Gate.

In the end, neither too much nor too little was given, and the transmutation obeyed equivalent exchange.
Related reading

When Edward and Alphonse try to transmute their mother, how come they didn't gain anything?
If the "Truth" didn't exist, would that mean that feats such as Human Transmutation would work?
Comment: @PeterRaeves Ed and Izumi talk about the fact that their attempts at bringing back the dead through human transmutation would never work to begin with. Given that God oversees all alchemical transmutations, it's just a simple deduction from there.
Comment: Thank you @キルア, I read since posting this a little more about why they lost what they did... It seems that Truth, or God, has a sense of humor as to why he took what he did in order to teach them a lesson type thing. I also read some people believe this is why Ed/Al/Izumi can transmute without a circle. Your answer makes sense, I'm surprised I didn't make the connection. Thank you!
Comment: What do you mean by `God does not permit resurrection`? I don't remember this being mentioned in the manga though.
Comment: There's no known case of a successful human transmutation. If you remember, at least on original series, they're some body change (Moving the soul from one body to another), but not transmutation. Probably it's right to tell who "God does not permit resurrection", or maybe it's more correct to tell "There's not a known equivalent payment for a complete life".
Comment: I'll cut the part about who has taken how much chemistry but I want to point out that creating gold needs nothing short of nuclear physics.
Answer: I don't believe that you even can pay too much.  The law of equivalent exchange would dictate that if you put in a quantity X of dirt and transmuted it to gold, you should get the exact equivalent amount of gold out, no less.
In terms of paying more (as Ed and Al did) there is a fairly good explanation in episode 26 "Reunion".  (Spoilers ahead)

 Ed, Ling and Envy are inside of Gluttony.  Ed explains that a failed transmutation (which I assume would include paying too much, if such a thing is even possible) "ricochets back onto the one that performed it", whatever that means.  To me it sounds like it just doesn't work. Though in this case it sounds like less of "paying to much" and more of "trying to do something that just plain doesn't work."
Ed also gives a very good explanation of what human transmutation really is in that same episode. He states that human transmutation (as they wanted to do to bring back their mom) just isn't a thing.  Human transmutation really involves transmuting live humans, not bringing back the dead.
Later in the same episode, Envy explains that to open the Portal (which is really what Ed and Al did, they didn't actually transmute a human), they have to pay a toll.  In the case of Ed and Al they paid with their bodies/body parts.  In exchange the got to open the Portal and received the knowledge and power that came with it.
Comment: If I recall correctly, the gist or moral of the story was that there is nothing that can equate for a human life.  They failed not because they paid too much but because they didn't have anything that was equivalent. I seem to recall giving life with alchemy was something taboo and forbidden.  Mostly because when it would succeed it would only bring forth abominations and was something that could not be perfected.
Comment: @mrdanthedeadman I believe that is definitely the moral.  In that episode he goes into a bit more detail as to why they couldn't bring back their mom but Ed was able to pull Al's soul back and stick it in the armor. (Tho it takes a bit of thinking about what he says against what happened to get to the conclusion about why one worked and the other didn't).


Xerox network accounting (JBA) C70 sending accounting users

Question: I am trying to send a list of users to the Xerox for network accounting purposes.
I successfully do this with 2 Xerox models (XEROX WorkCentre 7556 and XEROX WorkCentre 7830), following sudo code in PHP:
function SendUsersToXerox($ip,$users)
{
    $url="{$ip}/acct/set_auth";
    $auth='account:jbaserve';
    $post="+aaav1.0\n+purge\n";

    foreach ($users as $u)
    {
        $post.="+u\"{$u->login}\"\"{$u->code}\"\n";
    }

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_USERAGENT, 'EQ Device Control Engine');
    curl_setopt($ch,CURLOPT_POST, 1);
    curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
    curl_setopt($ch, CURLOPT_FRESH_CONNECT, TRUE);
    curl_setopt($ch, CURLOPT_TIMEOUT, 5);
    curl_setopt($ch, CURLOPT_USERPWD, "$auth");
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/xrx-acct-data']);
    $data = curl_exec($ch);
    $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
//  echo "HTTP CODE: {$httpcode}
";
//  echo $data;
}

This code works perfectly on the above named Xerox's but fails on the C70 with a 401 error and the following message:
Invalid accounting authentication version

Network accounting is enabled on the device, and I can collect all jobs from the printer at the URL acct/get_acct
If I pass in bad post data I get a different error message:
HTTP Return 400
The Request had invalid syntax

I can't find any references to JBA or Network Accounting anywhere and am not sure how to find out if the format has changed on set_auth or if it's version difference that needs to be set.
I know there are differences in the get_acct output that does point to a different version of the accounting.
Answer: The answer is very simple.
Everything is correct except the following:
$post="+aaav1.0+\n+purge\n";

The plus(+) after the v1.0 allows the users to be uploaded for accounting.


Can I add my question to an existing question?

Question: I am having difficulties following some steps of an answer to an existing question.  Can I add my question to an existing question?  If not, how can I get clarifications.
Answer: You can post a new question explaining you tried what described in an answer given to another question (with a link to that question, if it helps to understand better your question), and what exactly didn't work for you, the difference between what you obtained and what described in the answer, what you expected reading that answer, or what wanted to obtain.
Don't ask your question in an answer for the other question. Answers are for answering the question, and posting an answer to ask questions would cause the answer to be deleted.
Also, don't edit the question to add your question. Similarly, don't edit an answer to add your questions for the user who wrote the answer, or any other question you could have. Editing is not the alternative to commenting when you cannot comment, or asking new questions.
Comment: Also, don't (suggest an) edit the question to add more questions because that will just be rejected.
Comment: Yes, that too. I will add a note about that.
Comment: its better to have one question or what solution or steps have you taken and what problem are you having and summarized into a question instead of multiple question against a question, that is likely to be rejected :)


Do android phones sync with Ubuntu?

Question: Some models only or all models?
Answer: As said, it's seen like an USB drive by Ubuntu, but the system is designed to sync over the net. Most of the stuff don't need a computer, for example my contacts and phone numbers sync with my gmail and facebook account. Pics with picassa, Files with Dropbox, task with Remember the Milk, etc...
I really only attach it to a computer to make backups when I do system updates (I own a HTC Magic with the latest Cyanogenmod RC). All the other syncing is done magically over the net.
Comment: I still think syncing my playlist with Rythmbox is very usefull...
Comment: and shotwell photo manager does a nice job too for syncing pictures.
Answer: I only tested with one model (Motorola Milestone, called "Droid" in the US). But as far as I know, this is true for every android phone.
It actually syncs very well. It is seen as a USB drive by the system, but Ubuntu finds it has pictures and music on it, and then you can access it through Rythmbox and F-Spot, and synchronize your music and photos with it very easily.
Answer: Android phones aren't like iPhones. They don't require a client running on your computer to sync, instead they tend to sync with online services over the air (via wifi or cell network).
Having said that, there is a Dropbox client for Android that will sync your files without requiring you to plug your phone in.
Answer: Syncing over the net with google services is much more useful that by cabel.
You can sync you calendar, contacts, tasks and much more with Ubuntu, Thunderbird and other apps.

Do android phones sync with Ubuntu?


Patron saint of professional excellence? Professional excellence and holiness?

Question: Are there saints that were excellent at performing their duties as professionals? Of course, there can be legends that Saint Joseph was perfect master, but there is no evidence of his dedication, skills and mindset that can be role-model for following. I feel that professional excellence and mastery is the hardest achievement that one can make and the ultimate virtue that benefit the others. Why the notion of holiness is so silent about it? Why we can not hear about professionals-saints?
Answer: Before going on, lets look at what Wikipedia has to say about saints:

A saint is a person who is recognized as having an exceptional degree of holiness or likeness or closeness to God. However, the use of the term "saint" depends on the context and denomination. In Roman Catholic, Eastern Orthodox, Anglican, Oriental Orthodox, and Lutheran doctrine, all of their faithful deceased in Heaven are considered to be saints, but some are considered worthy of greater honor or emulation; official ecclesiastical recognition, and consequently veneration, is given to some saints through the process of canonization in the Catholic Church or glorification in the Eastern Orthodox Church.

And now for Wikipedia on what is a patron saint:

A patron saint, patroness saint, patron hallow or heavenly protector is a saint who in Roman Catholicism, Anglicanism or Eastern Orthodoxy, is regarded as the heavenly advocate of a nation, place, craft, activity, class, clan, family or person.

Although the above definitions are somewhat generic, they do allow us the ability to resolve the problem of a patron saint of professionalism and holiness.
First of all there is no particular patron saint for genuine holiness because that is one of the things that all patron saints are occupied with for those under their protection. Thus our names day saint is very concerned with our true holiness before God.

A name day is a tradition in some countries in Europe, Latin America, and Roman Catholic and Eastern Orthodox countries in general. It consists of celebrating a day of the year that is associated with one's given name. The celebration is similar to a birthday.
The custom originated with the Christian calendar of saints: believers named after a saint would celebrate that saint's feast day, or in the Eastern Orthodox tradition, the day of a saint's death. Name days have greater resonance in the Catholic and Orthodox parts of Europe; Protestant churches practice less veneration of saints. In many countries, however, name-day celebrations no longer have connection to explicitly Christian traditions.

Patron saints can be named for various professional trades and these particular saints should be invoked that we may execute our duties with professionalism and holiness. Thus a patron saint for professionalism excellence and holiness do not exist.
But let us  not stop here. We are always free to take on a new patron saint unto ourselves due to some particular devotion or incident in our lives.
It is in this sense that many have taken to have a devotion to St. Saint Therese of  Lisieux, "The Little Flower".

The world came to know Therese through her autobiography, "Story of a Soul". She described her life as a "little way of spiritual childhood." She lived each day with an unshakable confidence in God's love. "What matters in life," she wrote, "is not great deeds, but great love." Therese lived and taught a spirituality of attending to everyone and everything well and with love. She believed that just as a child becomes enamored with what is before her, we should also have a childlike focus and totally attentive love. Therese's spirituality is of doing the ordinary, with extraordinary love.
Her inspiration and powerful presence from heaven touched many people very quickly. She was canonized by Pope Pius XI on May 17, 1925. Had she lived, she would have been only 52 years old when she was declared a Saint.
"My mission - to make God loved - will begin after my death," she said. "I will spend my heaven doing good on earth. I will let fall a shower of roses." Roses have been described and experienced as Saint Therese's signature. Countless millions have been touched by her intercession and imitate her "little way." She has been acclaimed "the greatest saint of modern times." In 1997, Pope John Paul II declared St. Therese a Doctor of the Church - the only Doctor of his pontificate - in tribute to the powerful way her spirituality has influenced people all over the world. - Saint Therese, "The Little Flower"

But, then depending on how one view's things, St. Expeditus who is the patron saint of speedy cases, emergencies, expeditious solutions, against procrastination, merchants and navigators may fit better for you.
Or perhaps St. Maximilian Maria Kolbe who is the patron saint of families, imprisoned people, journalists, political prisoners, prisoners, pro-life movement, Esperantists, Militia Immaculatae and as Pope St. John Paul II declared of him: "The Patron Saint of Our Difficult Century".
Answer: I am unaware of any patron saints of professional conduct.  However, if there is one it might be the prophet Daniel; for it is recorded about Daniel (NIV)

Dan 6:3, 4 - Now Daniel so distinguished himself among the
  administrators and the satraps by his exceptional qualities that the
  king planned to set him over the whole kingdom. At this, the
  administrators and the satraps tried to find grounds for charges
  against Daniel in his conduct of government affairs, but they were
  unable to do so. They could find no corruption in him, because he was
  trustworthy and neither corrupt nor negligent.

On the other hand, another contender might be Joseph about whom it is recorded:

Gen 39:4-6 - Potiphar put him in charge of his household and entrusted
  him with everything he owned. 5From the time that he put Joseph in
  charge of his household and all he owned, the LORD blessed the
  Egyptian's household on account of him. The LORD's blessing was on
  everything he owned, both in his house and in his field. 6So Potiphar
  left all that he owned in Joseph's care; he did not concern himself
  with anything except the food he ate.
Gen 39:20-23 - So Joseph's master took him and had him thrown into the
  prison where the king's prisoners were confined. While Joseph was
  there in the prison, the LORD was with him and extended kindness to
  him. He granted him favor in the eyes of the prison warden, who put
  all those held in the prison under Joseph's authority, so that he was
  responsible for all that was done there. The warden did not concern
  himself with anything under Joseph's authority, because the LORD was
  with him and gave him success in whatever he did.
Gen 41:39-41 - Then Pharaoh said to Joseph, "Since God has made all
  this known to you, there is no one as discerning and wise as you. You
  shall be in charge of my house, and all my people are to obey your
  commands. Only with regard to the throne will I be greater than you."
  Pharaoh also told Joseph, "I hereby place you over all the land of
  Egypt."

Thus, both Joseph and Daniel were exceptionally good at their government positions as recognised by the sovereign in both cases.
Comment: Thanks! I have thought exactly that! Is it allowed for catholic to pray for the intercession of the prophet Daniel and Joseph? And what about king Solomon?
Comment: @tomr  that question has been [asked here] (https://christianity.stackexchange.com/questions/52640/why-arent-moses-elijah-and-other-old-testament-heroes-of-faith-given-the-titl) and the catechism has a pretty good answer: `CCC 61: The patriarchs, prophets and certain other Old Testament figures have been and always will be honored as saints in all the Church's liturgical traditions.`
Answer: St. Thomas More (1478-1535) was, "Besides being an excellent Christian," "also a good father of family, and a highly respected professional" lawyer. He defended the sacrament of matrimony against King Henry VIII and is "the patron saint of attorneys, statesmen and politicians" (source: St. Thomas More Society of Catholic lawyers).


Exchange Security Policy and Android

Question: How does one go about changing the Exchange security policy to allow pins and other security options on Android devices?
Answer: Allow pins or enforce them?  The default policy allows them already.
If you want to enforce them, either create a new policy for those you want to enforce or change the default.  (note:  I believe SBS 2011 enforces them by default)
The policies are in the console under the Organization Configuration, Client Access, Exchange ActiveSync Mailbox Policies.  You'd just check the "Require Password" but not the "Require alphanumeric password".  The "allow simple password" should be checked, but I would recommend not setting a minimum password length or Password expiration.
warning:  I haven't messed with it in the past 6 months, but enabling PIN enforcements can cause issues on Android phones, depending on the type of PIN a user wants to use.  Things like face unlock, pattern unlock, etc. come into play and don't work well with the Activesync policies.  I advise you test thoroughly with different phones and Android OS levels before deploying.
Answer: It's the same activesync settings that everything else uses.
Answer: Require use of a third-party Android ActiveSync application that behaves correctly.
Many of the Mobile Device Management (MDM) solutions leverage a third-party Android ActiveSync application that conforms to the security policies.  In many cases, this is Touchdown.  In addition to compliance, it obviates the need to support all of the variations of Android ActiveSync applications in existence.
The background for this is that ActiveSync is pretty much a free-for-all.  An ActiveSync  implementation, such as earlier Android variants, can do or report any status to the server that they want.  If an Android ActiveSync implementation doesn't honor a command to brick the device or require a PIN, it doesn't get bricked and the user does not have to enter a PIN. Apple has always conformed fairly well.  Microsoft phones (version 7) did not support device encryption.
Answer: In addition to what MDMarra has stated, in order to exercise the functionality you're looking for you'll need to implement a Mobile Device Management (MDM) System of some sort. Something like Air-Watch, Mobile Iron, Boxtone or Blackberry Mobile Fusion (to name a few) will do what you're looking for.
Comment: Not really. You can enforce the usage of a PIN and do remote-wipe with just Active Sync. No need for MDM solutions unless you want to roll specific apps out, or have much more granular control than just enforce a PIN policy.
Comment: "Other Security Options" would likely require an MDM of some sort.

Exchange Security Policy and Android


How do Real Time Operating Systems work?

Question: I mean how and why are realtime OSes able to meet deadlines without ever missing them? Or is this just a myth (that they do not miss deadlines)? How are they different from any regular OS and what prevents a regular OS from being an RTOS?
Comment: It's also important to notice the difference between a soft' real time system and a 'hard' real time system.
Answer: Meeting deadlines is a function of the application you write.  The RTOS simply provides facilities that help you with meeting deadlines.  You could also program on "bare metal" (w/o a RTOS) in a big main loop and meet you deadlines.
Also keep in mind that unlike a more general purpose OS, an RTOS has a very limited set of tasks and processes running.
Some of the facilities an RTOS provide:

Priority-based Scheduler
System Clock interrupt routine
Deterministic behavior

Priority-based Scheduler
Most RTOS have between 32 and 256 possible priorities for individual tasks/processes. The scheduler will run the task with the highest priority. When a running task gives up the CPU, the next highest priority task runs, and so on...
The highest priority task in the system will have the CPU until:

it runs to completion (i.e. it voluntarily give up the CPU)
a higher priority task is made ready, in which case the original task is pre-empted by the new (higher priority) task.

As a developer, it is your job to assign the task priorities such that your deadlines will be met.
System Clock Interrupt routines
The RTOS will typically provide some sort of system clock (anywhere from 500 uS to 100ms) that allows you to perform time-sensitive operations.
If you have a 1ms system clock, and you need to do a task every 50ms, there is usually an API that allows you to say "In 50ms, wake me up".  At that point, the task would be sleeping until the RTOS wakes it up.
Note that just being woken up does not insure you will run exactly at that time.  It depends on the priority.  If a task with a higher priority is currently running, you could be delayed.
Deterministic Behavior
The RTOS goes to great length to ensure that whether you have 10 tasks, or 100 tasks, it does not take any longer to switch context, determine what the next highest priority task is, etc...
In general, the RTOS operation tries to be O(1).
One of the prime areas for deterministic behavior in an RTOS is the interrupt handling. When an interrupt line is signaled, the RTOS immediately switches to the correct Interrupt Service Routine and handles the interrupt without delay (regardless of the priority of any task currently running).
Note that most hardware-specific ISRs would be written by the developers on the project.  The RTOS might already provide ISRs for serial ports, system clock, maybe networking hardware but anything specialized (pacemaker signals, actuators, etc...) would not be part of the RTOS.
This is a gross generalization and as with everything else, there is a large variety of RTOS implementations. Some RTOS do things differently, but the description above should be applicable to a large portion of existing RTOSes.
Comment: No, if you are the highest priority you run until you voluntarily give up, OR a higher priority task than you becomes ready, at which time the (old) high priority gets pre-empted. I'll clarify in the main text. Thanks!
Comment: "This task will run to completion" sounds like Windows 3.1! Then you mean RTOSes are non preemptive?
Comment: Thanks for the great answer. Could you please clarify how System Clock Interrupt routines behavior you described is specific to RTOS? I mean, how is it different from a standard timer API each general-purpose OS has?
Answer: In RTOSes the most critical parameters which should be taken care of are lower latencies and time determinism. Which it pleasantly does by following certain policies and tricks.
Whereas in GPOSes, along with acceptable latencies the critical parameters is high throughput. you cannot count on GPOS for time determinism.
RTOSes have tasks which are much lighter than processes/threads in GPOS.
Answer: It is not that they are able to meet deadlines, it is rather that they have deadlines fixed whereas in a regular OS there is no such deadline.
In a regular OS the task scheduler is not really strict. That is the processor will execute so many instructions per second, but it may occasionally not do so. For example a task might be pre-empted to allow a higher priority one to execute (and may be for longer time). In RTOS the processor will always execute the same number of tasks.
Additionally there is usually a time limit for tasks to completed after which a failure is reported. This does not happen in regular OS.
Obviously there is lot more detail to explain, but the above are two of the important design aspects that are used in RTOS.
Answer: Your RTOS is designed in such a way that it can guarantee timings for important events, like hardware interrupt handling and waking up sleeping processes exactly when they need to be.
This exact timing allows the programmer to be sure that his (say) pacemaker is going to output a pulse exactly when it needs to, not a few tens of milliseconds later because the OS was busy with another inefficient task.
It's usually a much simpler OS than a fully-fledged Linux or Windows, simply because it's easier to analyse and predict the behaviour of simple code.  There is nothing stopping a fully-fledged OS like Linux being used in a RTOS environment, and it has RTOS extensions.  Because of the complexity of the code base it will not be able to guarantee its timings down to as small-a scale as a smaller OS.
The RTOS scheduler is also more strict than a general purpose scheduler.  It's important to know the scheduler isn't going to change your task priority because you've been running a long time and don't have any interactive users.  Most OS would reduce internal the priority of this type of process to favour short-term interactive programs where the interface should not be seen to lag.
Answer: You might find it helpful to read the source of a typical RTOS. There are several open-source examples out there, and the following yielded links in a little bit of quick searching:

FreeRTOS
eCos

A commercial RTOS that is well documented, available in source code form, and easy to work with is µC/OS-II. It has a very permissive license for educational use, and (a mildly out of date version of) its source can be had bound into a book describing its theory of operation using the actual implementation as example code. The book is MicroC OS II: The Real Time Kernel by Jean Labrosse.
I have used µC/OS-II in several projects over the years, and can recommend it.
Answer: "Basically, you have to code each "task" in the RTOS such that they will terminate in a finite time."
This is actually correct.  The RTOS will have a system tick defined by the architecture, say 10 millisec., with all tasks (threads) both designed and measured to complete within specific times.  For example in processing real time audio data, where the audio sample rate is 48kHz, there is a known amount of time (in milliseconds) at which the prebuffer will become empty for any downstream task which is processing the data.  Therefore using the RTOS requires correct sizing of the buffers, estimating and measuring how long this takes, and measuring the latencies between all software layers in the system.  Then the deadlines can be met.  Otherwise the applications will miss the deadlines.  This requires analysis of the worst-case data processing throughout the entire stack, and once the worst-case is known, the system can be designed for, say, 95% processing time with 5% idle time (this processing may not ever occur in any real usage, because worst-case data processing may not be an allowed state within all layers at any single moment in time).
Example timing diagrams for the design of a real time operating system network app are in this article at EE Times,
PRODUCT HOW-TO: Improving real-time voice quality in a VoIP-based telephony design
http://www.eetimes.com/design/embedded/4007619/PRODUCT-HOW-TO-Improving-real-time-voice-quality-in-a-VoIP-based-telephony-design
Answer: What is important is realtime applications, not realtime OS. Usually realtime applications are predictable: many tests, inspections, WCET analysis, proofs, ... have been performed which show that deadlines are met in any specified situations.
It happens that RTOSes help doing this work (building the application and verifying its RT constraints). But I've seen realtime applications running on standard Linux, relying more on hardware horsepower than on OS design.
Comment: A RTOS makes very strict guarantees on things that are important, like interrupt servicing times, task switching latency, etc  Real-time applications are NOT possible without a proper RTOS.
Comment: I am just speaking of what I have seen. And more than often, realtime problems are solved by huge CPU frequencies and a lot of time margin.
Answer: I haven't used an RTOS, but I think this is how they work.
There's a difference between "hard real time" and "soft real time". You can write real-time applications on a non-RTOS like Windows, but they're 'soft' real-time:

As an application, I might have a thread or timer which I ask the O/S to run 10 times per second ... and maybe the O/S will do that, most of the time, but there's no guarantee that it will always be able to ... this lack of guarantee is why it's called 'soft'. The reason why the O/S might not be able to is that a different thread might be keeping the system busy doing something else. As an application, I can boost my thread priority to for example HIGH_PRIORITY_CLASS, but even if I do this the O/S still has no API which I can use to request a guarantee that I'll be run at certain times.
A 'hard' real-time O/S does (I imagine) have APIs which let me request guaranteed execution slices. The reason why the RTOS can make such guarantees is that it's willing to abend threads which take more time than expected / than they're allowed.
Comment: It's not just scheduling - the OS must make sure that no random things kick in like garbage collection or memory address space defragmentation, so that you know that malloc() will always return without a delay, so (for example) the aeroplane the autopilot is controlling will not crash.
Comment: And presumably hardware interrupts too.
Answer: ... well ...
A real-time operating system tries to be deterministic and meet deadlines, but it all depends on the way you write your application. You can make a RTOS very non real-time if you don't know how to write "proper" code.
Even if you know how to write proper code:
It's more about trying to be deterministic than being fast.
When we talk about determinism it's
1) event determinism
For each set of inputs the next states and outputs of a system are known
2) temporal determinism
… also the response time for each set of outputs is known
This means that if you have asynchronous events like interrupts your system is strictly speaking not anymore temporal deterministic. (and most systems use interrupts)
If you really want to be deterministic poll everything.
... but maybe it's not necessary to be 100% deterministic
Comment: "If you really want to be deterministic poll everything." - What if you miss an event of higher priority inbetween poll cycles? Will this not make the OS response non real time for those events?
Comment: Of course it will, but you did your analysis and made sure that all the events from outside of the OS come within certain time boundaries (something like a sporadic server for your inputs). In a fault condition (cracked cable) you should throw away the events anyhow. What you make sure by polling and not using any interrupts is, that the fact the you use interrupt is not anymore degrading determinism.
Comment: Are you trying to say that this is effectively a trade off between latency and determinism? IMO the "events at well defined boundaries" model fails when you have an event hierarchy (i.e. prioritized events). There is no reason why a totally unrelated event should have to respect the time boundaries of a low priority (LP) event/task. The LP task needs to be preempted even if the HP event occurs at t0+dt. Where dt is an infinitesimally small period of time and t0 is the time when the LP task started.
Comment: You first need to define what (hard) real-time means for you and your system. Do you need (hard) real-time?

1) deterministic (event+time), which strictly speaking means no interrupts.
2) best effort - not so deterministic anymore, most of the times you will have low latency. But what if this unexpected thing happens where you suddenly have all this noise on one of your interrupt lines together with the timer tick interrupt and some user pressed some button which causes another INT - while the system is executing code from cache - you are not time deterministic anymore - maybe low latency?
Comment: Noise on interrupt lines sounds like a hardware problem - use a H/W low pass filter (LPF). If that is not an option then how about selectively masking the noisy interrupt line (for example until the ISR returns) instead of disabling all interrupts?

I think when you choose to say that you will have prioritized events you are effectively declaring that in the presence of High priority tasks the tasks with lower priorities do not have to be real time.
Comment: Sometimes it's not as easy as filtering out noise with a low pass filter, like when a sensor or cable are broken and sending funny stuff. Also I would no go for polling without interrupts because of this issue. In case the low priority tasks don't have real-time requirements we are not talking about a deterministic hard real-time system anymore.
Anyhow, just image a happy real-time system with only a timer interrupt, not even cache. Even this is strictly speaking non time deterministic due to the drift of the crystal from which the timer tick is derived. Add cache and determinism goes away.
Comment: Ok I think the difference of opinion stems from the fact that I am making an implicit assumption here that it's impossible to guarantee hard real time deadlines in a system with purely random events hence RTOSes are always "best effort" (IMO). Now if we are talking about crystal drift then the main clock generator (used by the microprocessor) is also susceptible which implies polling cannot be guaranteed to be deterministic either.
Comment: Oh yes, here we go. You got it!
Berger's theorem: Strictly speaking there's nothing like a hard real-time system. With a polled system you might get closer though than with one which uses interrupts. My conclusion is, that you should use as few interrupts as possible and that a real-time system in practice is one, which passes some test suites to prove that it does what it's supposed to do. That's not for purists, tough!
Comment: "...which passes some test suites to prove that it does what it's supposed to do" my thoughts exactly. I agree with your conclusion!
Comment: "Berger's theorem:..." is this a real theorem? Could you please provide a link to a detailed description and proof?
Answer: The textbook/interview answer is "deterministic pre-emption". The system is guaranteed to transfer control within a bounded period of time if a higher priority process is ready to run (in the ready queue) or an interrupt is asserted (typically input external to the CPU/MCU).
Answer: They actually don't guarantee meeting deadlines; what they do that makes them truly RTOS is to provide the means to recognize and deal with deadline overruns. 'Hard' RT systems generally are those where missing a deadline is disastrous and some kind of shutdown is required, whereas a 'soft' RT system is one where continuing with degraded functionality makes sense. Either way an RTOS permits you to define responses to such overruns. Non RT OS's don't even detect overruns.
Answer: Basically, you have to code each "task" in the RTOS such that they will terminate in a finite time.
Additionally your kernel would allocate specific amounts of time to each task, in an attempt to guarantee that certain things happened at certain times.
Note that this is not an easy task to do however.  Imagine things like virtual function calls, in OO it's very difficult to determine these things.  Also an RTOS must be carefully coded with regard to priority, it may require that a high priority task is given the CPU within x milliseconds, which may be difficult to do depending on how your scheduler works.
Comment: "Basically, you have to code each "task" in the RTOS such that they will terminate in a finite time" - then its the application that should be called realtime and not the OS.
Comment: What happens when a task runs out of time?
Comment: the task is forcibly preempted and restarted on its next time slice.  A good RTOS would raise an error or notify that this had occured.


Which SQL standard is most broadly and completely supported?

Question: I want to concentrate on one of the SQL language specs for learning and reference purposes. Which version of the SQL standard is most broadly supported across DBMS'es so that I can focus my time and energy on it ?
Answer: I think you are trying to live in Joe Celko's dream world where you can only use standard SQL and in any given week you may have to port all of your code from SQL Server to Oracle and then Oracle to DB2 and then back to SQL Server again. Twice.
While the core and fundamental aspects of standard SQL will help you anywhere, trying to limit yourself to that set of the language for fear of future porting (or just on principle) is not a path I'd recommend. Personally, I stick to ANSI standard stuff when I can (e.g. <> vs. !=, COALESCE vs. ISNULL, CURRENT_TIMESTAMP vs. GETDATE(), etc.), but I'm also not afraid to use the SQL Server-specific stuff that makes my work easier.
It is important to understand how SQL works in general; it is equally important to understand how the language works in your RDBMS(es) - including deviations from the standard, deviations from the way another RDBMS might have implemented the same concept, and proprietary extensions that don't exist elsewhere.
SQL Server, as an example, covers a good portion of the standard, and it gets closer to full compliance with each new version. Will it ever cover 100%? Highly doubtful. Will it continue to add proprietary extensions not in the standard? Certainly. If everyone covered the standard and nobody stepped outside of it, then there would be no advantages to choosing one platform over another, and we'd all be using the same thing.
Comment: +1 For mentioning that less than 100% compliance is not necessarily a bad thing.  While the ability to port your code over to various platforms might seem like a great thing, the fact is that you chose your RDBMS for a reason (or at least I hope the choice was more than just an arbitrary one).  In the real world, the cost of porting your code over to a new platform is often more expensive than figuring out how to do it on your current platform.
Answer: None of them. You can learn standard (-ish) SQL for any RDBMS.
Standard SQL isn't used in the real world for paying jobs on successful projects...
Saying that, MySQL is a good place to start and here is a tutorial
Comment: @samsmith why? Just because you don't happen to agree doesn't make it silly. Maybe you could explain why you disagree, instead of just calling it silly?
Comment: @samsmith If your goal is a "succesful project", then you **need** to take advantage of all of your RDBMS features. Failing to do so, and just using standard SQL is just wasting capabilities of your software
Comment: @samsmith also, and especially if you are the down-vote, then I find [your previous appeal for `constructive guidance`](http://dba.stackexchange.com/questions/54989/in-sql-server-how-to-launch-a-python-script-from-an-insert-trigger/54990#comment98827_54990) incredibly hypocritical. Where is your constructive guidance here for gbn to improve his answer?
Comment: @samsmith Where are you getting your stats for "large %"? And what % of real world database systems are being designed by developers anyway? In my personal experience, and that of every customer engagement I've ever had, I have yet to come across a SQL Server shop that adheres to the standard. Ever. It is simply foolhardy to do so, regardless of what your developer friends claim they are doing.
Comment: "Standard SQL isn't used in the real world for paying jobs on successful projects..." -- silliest thing posted on all of stack exchange.
Comment: @AaronBertrand Standard SQL is heavily used by a large % of developers. There are platform specific functions and tweaks, but the vast majority of work done (on MySQL, SQL Server, etc) is plain jane SQL. gbn says not to bother, then says to play with MySQL. Is that useful?
Answer: All major RDBMSs support the different versions of the SQL spec to different degrees, with the older versions of the spec more fully supported. Not all take conformance equally seriously (for example, Oracle started supporting 'ansi joins' in 2001, nearly a decade after SQL-92), and as @gbn already said, in practice you need to know the flavour of SQL used by each product you use.
Postgres is an exception in that it "prides itself in standards compliance". For "learning and reference purposes", you need hands-on practice with a database, not just knowledge from a book or standard, and postgres is an ideal platform for learning the ropes with because:

It is free and available on most platforms
The aforementioned standards compliance
It has excellent documentation
It is mature and widely used
It has many of the features found in the most popular commercial RDBMSs, and quite a few that aren't
Answer: Agreed with Jack and gbn, there is no standard and you need to make a choice. To make this choice, you need to select RDBMS first.
I'd recommend to think about following things:
1) do you want to be DB-developer or DBA?
2) Which operation system(s) do you want to work with? I agree, this question is little strange, but when I talk with students, they say that it is important.
For example (just example, maybe I'm wrong) if you want to be a DBA and don't want to work with Windows, you don't need to think about MSSQL. And if you want to be DBA and you like to work with command-string and config-files - maybe Oracle is what you need. If you want to be developer want to use your knowledge in freelance projects, maybe you need MySQL?
Comment: I hope these aren't the only criteria startups use to choose their platform. :-)


List of functional groups in a molecule

Question: Does anyone know if there's a tool for listing the functional groups present in a molecule?
Answer: Norbert Haider from the University of Vienna has been working on the identification of functional groups for quite a while.
You might want to have a look at his checkmol/matchmol tool, which natively reads from MDL, Alchemy, and Sybyl mol files.
Other input formats may be processed after converting them using Open Babel.
Answer: RDKit is an option with a python interface. Here's an example using rdkit to find furan groups in 2-Acetylfuran:
from rdkit import Chem
mol = Chem.MolFromInchi("InChI=1S/C6H6O2/c1-5(7)6-3-2-4-8-6/h2-4H,1H3")
furan_smarts = "o1cccc1"
furan = Chem.MolFromSmarts(furan_smarts)
Chem.Mol.GetSubstructMatches(mol, furan, uniquify=True)
>>> ((7, 3, 1, 2, 5),)

The length of the outer tuple is the number of matched substructures, while the integers in the inner tuple are the indices of the molecule's atoms.
Here are some other smarts strings:
aldehydes: [CX3H1](=O)[#6]
esters: [#6][CX3](=O)[OX2H0][#6]
ketones: [#6][CX3](=O)[#6]
amides: C(=O)-N
thiol groups: [SH]

Answer: The FP4 fingerprint in Open Babel matches a set of SMARTS patterns for functional groups against a molecule. Usually the results is a binary fingerprint, but the "-xs" option below prints out the names of the matching patterns. Here are the results for acetamide, for example:
> obabel -:CC(=O)N -ofpt -xfFP4 -xs
>
Primary_carbon  Carboxylic_acid_derivative      Amide   Primary_amide   C_ONS_bond      1,3-Tautomerizable

List of functional groups in a molecule


How to setup a shared webhost for multiple subdomains on a single amazon ec2 instance

Question: I have a CentOS instance. Is it possible for multiple domains / subdomains to share that single instance and on my Apache server i will have separate folders for each domain. How do I start doing this and how would I map my subdomains to the instance.
Answer: Sure, EC2 is no different from any other server in that regard.  You setup separate virtual hosts for each domain, and then modify the DNS entries for the domains to point to the public IP address of the EC2 instance.  You'll probably want to get an Elastic IP so that your public IP address doesn't change every time your EC2 instance reboots, and an EBS volume to put all the content onto so you don't have to re-roll your base image every time your vhost's content changes.
Answer: You should read up on Name Based Virtual Hosting. Get an elastic IP address for your instance. Create a DNS entry that points each domain name to the elastic IP address. Create a virtual host for each domain.


Bluetooth GPS on iPad

Question: I have purchase a iPad (non 3g model) and have also recently started using an application called Foreflight for my personal flight planning while getting my private pilots license.  I would love to be able to get a fix on my location - is there any way I can use a bluetooth GPS receiver with this application?
Answer: I've seen and used GPS receivers that connect to the host via bluetooth, on Windows Mobile phones.  I'm not sure about on an iPad.
Answer: As far as I know, the answer to your question is no. According to the specs page, the only way the WiFi model can get Location services is via WiFi geolocation. I've never heard of a device using bluetooth to get a location fix. That'd be cool though.
Answer: you can, you need to jailbreak your ipad and go to cydia and download roqybt, it costs like 10bucks or something. it enables you to use your bluetooth enabled gps device with the ipads bluetooth chip, so you get a gps fix and can use it for navigation.

Bluetooth GPS on iPad


Will Hazrat Isa A.S come with his miraculous powers again?

Question: This question has been bothering me since a year. I have a lot of knowledge about Islam but what I doubt is about that Will Hazrat Isa (A.S) come back with all his power like Resurrecting someone by the permission of Allah or making a blind see etc. I know that He will have the power to kill the disbelievers and dajjal with his breath or with his vision as far as He can see. Answer with reference will be appreciated.
Comment: Hazrat Isa will come with Imam Zaman (Mahdi) while the reappearance... based on Shiite view. does ur nice question asking for Sunni view? if so, I suggest you to add it (Sunni view) in ur question to be more clear that you are looking for the view of Sunni. (I said that, cos I saw in ur tags the word "Sunni".  Good luck.
Answer: Salam Mohammad,
There's a whole field of study that speculates about the end of the world. Muslim tradition does say that Jesus A.S will return, but I would argue that he does not have "God-like" power. He was a man, albeit a great one who changed the course of history, and his miracles were granted by God.
As a suggestion, and to get peace of mind, I wouldn't worry about the literalness of this, nor would I wait around for Jesus to return. As Muslims we believe that the world will be destroyed eventually, that it cannot continue forever, and of course that it is in God's hands. Whether Jesus returns in flesh is just for speculation. It's worth it to read the tafsir of such verses that say this and reflect on what it mean. Jesus has been followed by many but misrepresented as a god. His return could mean that the world ends with understanding the true power of the One God.
Just an opinion, I am definitely not a scholar. But I hope that helps!
Comment: FYI, I think there are Hadith which describe the possible appearance of him like 'a red colored *human* man'. But, yes, him having the same power *permissions* again as he had before, is I too don't know, **God knows the best.**
Comment: +1 for your saying that he doesn't have God-like powers.


Generate 3D image from Multiple 2D Images

Question: If we're to capture an image of a body using four (4) WebCam with a 16 megapixel (1 in the front, 1 in the back and 2 sides(left and right)). Is it possible to make a 3D out of it using image processing?
Comment: Can you please clarify what exactly you are asking?Try adding a little bit more information on what you are trying to achieve, what have you done so far and what sort of challenges are you facing. The short answer is yes. Even with [one camera](http://graphics.cs.yale.edu/site/sites/files/shadow.pdf) and less resolution. But talking about all the different methods and applications is not going to be a useful answer.
Comment: We're trying to achieve the body measurement from px to cm. For example from a whole body image, we're to measure the bust of a woman from px to cm in real life, real size. Something like that. Is it still possible?
Answer: You can make a 3D model of the scene (<=> the depth) if the two cameras are looking to the same scene. After that you detect/extract the commun points between the two images and do some triangulation so you can recover the z component.
From your installation as you discribe it you can only enlarge the field of view
Answer: If you want to do this seriously, you should have a look into photogrammetry techniques - or rethink you problem and find out if you really need a full 3D model. For photogrammetry, I assume you would need more than four images.
To convert from pixels to centimeters, a simple scale in the scene you image would be necessary. I think this is the simplest solution to the conversion problem, and since you are obviously free to design the scene where and how the images are acquired, it certainly is the simplest solution.


Is it worth it to buy a bike that comes with puncture resistant tires, or add them later?

Question: Is it better to buy a bike that comes with puncture resistant tires, or get a cheaper bike that comes with worse tires and then get them replaced?
Comment: Is it the exact same bike, with different tire options? If so, it's a matter of doing the math and comparing the costs of buying the tires yourself vs. buying the bike with the tires already on it. If they aren't actually the same bike, there's a lot of other aspects to consider. Last time I bought a bike, I told myself I would replace the tires with "puncture resistant" ones. But I used the stock tires for a while and didn't experience any problems so I decided to keep the ones that came with the bike.
Comment: Very few road bikes come with puncture-resistant tires, so if you want them on a road bike you'll almost certainly end up buying them yourself.  An off-road bike may or may not have them, depending on how it positions itself in the marketplace.  But since there is considerable difference in types of puncture-resistant tires you're probably better off buying the bike you like and getting the desired quality of puncture-resistant tires separately, unless the bike just happens to come with them.
Comment: Most probably it doesn't really matter, punctures have a nasty habit of just happening. Even puncture-resistant tyres will wear out naturally sooner or later, so will need to be replaced. I'd base your purchasing decision on other factors.
Answer: Don't decide your bike based on the stock tires. Tires are consumable components, and will not last like the rest of the components will. Tires are cheap, changing the frame or drivetrain is expensive.
Just ride the stock tires until they are worn out, then replace them with the puncture resistant tires, if by that point they are still important to you.
Many shops will swap out various components as part of a purchase anyway, so you can have your cake and eat it too.
Comment: Wear vs punctures depends heavily on riding conditions if you do a couple of miles of cycle lanes next to busy roads you will essentially never wear out a set of tyres but get frequent punctures.  So in these conditions either fit them as soon as you're happy that the bike is set up right, or get them fitted either at the time of purchase or at the first service.
Answer: You can get puncture resistant inner tubes, liners, or just squeeze a bunch of Slime into the current inners. Or not worry about it, keep your tires properly inflated, and be a happy camper.
Answer: Either way from my experience whether you spend the money up front or afterward puncture resistant tubes and tires are worth the expense.  I have purchased mine aftermarket, and they added so many miles, and trips it's unreal.  Let's face it changing tires and fixing flats is a hassle and I was having one once a week or around every 100 miles, until I changed to thicker tires.  So in my case I say tires may not be the most expensive component but they effect the overall biking experience greatly.  Good luck buying!
Comment: Every hundred miles? Do you regularly inflate your tires? Or do you live in some sort of glass filled apocalyptic wasteland?


An objective measure of the difference in strength between top programs and top human players in the four most popular forms of chess?

Question: Is there an objective measure of the superiority (or otherwise) that the strongest computer programs enjoy over the strongest human players which can be compared across the four main forms of chess, namely western chess, xiang qi (Chinese chess), shogi (Japanese chess), and makruk (Thai chess)? For example, can it be said that on comparable Elo scales the programs have say an x point advantage in western chess, a y point one in Chinese chess, and lag behind in the other two games by z points?
Comment: Western chess is from India, so it's the Western-most chess after all. Nice definition!
Answer: I would have to answer no in my opinion. The four forms of chess are different. Shogi from what I remember is a form of chess where capturing an opponent's piece allows you to, at a time of your choosing, put one of that piece on the board as yours. Now that is a level of tactical complexity that surely gives any engine a huge advantage over any strength of human. I have played a little Xiang Qi and I would say the same; in the 90's when Chinese players played Professional western chess for the first time they were awesome tacticians; Xiang Qi as their previous game being very tactical led to that.
Answer: While it is possible to write engines that can play different chess-family games, doing so generally yields an engine that are only "competent" at each one, at best.  The best engines for each individual game incorporate specific knowledge and optimisations for that game, and are usually incapable of playing the others.
Many standard chess engines are not even capable of playing Chess960 correctly, because there are special rules for castling due to the variety of starting positions, even though the rest of the game is identical.  However, adding this capability does not usually weaken the engine in the way that adding support for Shogi would.
Shogi, in particular, is very difficult to adapt a standard chess-playing engine to play well - even "fairy chess" engines which can support Xiangqi relatively easily.  The immediate stumbling block is generally the piece-dropping mechanic, which completely explodes the branching factor of the game tree - so it is very difficult for an engine to explore the game tree to sufficient depth to treat the game in the tactical manner that engines usually do best at.  Instead, Shogi has to be treated as a positional game, requiring a sophisticated positional analysis function to determine the correct lines to explore.  Human players are naturally better at acquiring this knowledge than computers.
Conversely, a good Shogi engine would need to be taught about the special en passant and castling moves in standard chess, which don't exist in any form in Shogi, as well as the way pawns capture differently from moving, and the way in which pawns can promote to several different pieces rather than just one.  All of the specialised Shogi positional knowledge that made it a good Shogi engine would then be useless for playing standard chess.
So the correct approach is to measure any given player's or engine's strength on an individual game.  This will generally not be correlated strongly with its strength on a different game, if it is even capable of playing it.


Lightroom- How to import into same folder from different day?

Question: I often import files to lightroom then rename the folder as the client's name but after a couple of days I might do some more photos for them or finish the shoot. The issue is that lightroom imports them into a new folder (today's date). Is there a way to add them to the previous folder?
Comment: If you rename the folder to the client name, then why not just import to the client name folder?
Comment: That's essentially what I was asking how to do.
Answer: Right-click the folder's name in the Library view, then select the menu item "Import to this Folder..." That overrides Lightroom's default folder naming rules on import.

By the way, if you find the default date-based folder hierarchy annoying, as I do, it's easy to fix. While Lightroom is in Import mode, on the right side of the window in the Destination box, change the Organize option from "By date" to "Into one folder":

Now you can name your client folders the way you want from the start, rather than rename them afterward.
Be sure to uncheck the "Into Subfolder" box here if you want your imported photos to land in the folder you right-clicked above.
Answer: Absolutely! Use your file manager to copy/move the pictures to your "previous" folder. Now open up Lightroom, navigate to your "previous" folder right-click on it, and select "Synchronize Folder". It will ask whether you want to scan for metadata changes, remove missing photos, or import new photos. Check "Import New Photos" and it will import them straight to that folder.
Comment: I tried this and the synchronise button does'nt import anything, it checks changes against any in other folders. The import also doesn't add them to the same folder, it creates a subfolder.
Answer: Rather than importing to the default date-based folder structure, then renaming the folder to the client name, you want to simply import into the destination client name folder. I don't have Lightroom 4 installed anymore but in Lightroom 5 on the Import dialog (which I think is pretty much the same in LR4) find the "Destination" section in the right sidebar and customize it to better meet your needs. Based on how you've described your workflow, I think you probably want to Organize Into One Folder and check the Into Subfolder checkbox, where you can enter the client's name.
Answer: Lightroom does not care where the images are stored.  In fact, when you 'import into' Lightroom, you are not moving the photos into Lightroom in any way, you are in fact, simply telling Lightroom where the photos are located.
Lightroom has a convenient feature that will move the images to a directory of your choosing, or a default directory. Normally, Lightroom will simply move your photos to the same directory you used during last import, and will, by default, create a new folder by date.
You are free to change this or not even use Lightroom to move photos to a directory at all. You can move the images manually, and later inform Lightroom where they are stored. Simply create your own folders, move the images off your camera or card to the directory. Then open Lightroom, click Import, and then at the top of the Import window, you will see four options "Copy as DNG, Copy, Move, Add". Simply choose Add, and point Lightroom to your directory. Done. Lightroom won't touch the folder names.


Internet Download Manager

Question: I have uninstalled Internet Download Manager from my Computer running on windows 7.
But still in registry search it show about 70 entries that could not be yet removed.
How can I clean it?
Answer: If you are sure that you have found the correct keys, you may just delete them from the registry after creating a backup.
However, my personal advice is: do not touch your registry unless you really know what you are doing. Assuming from your post, this is not the case. Therefore just leave it as it is, it should not cause any problems. Also, do not install crapware as the "Internet Download Manager" if you want your system to function properly.
Answer: There are two uninstallers/clean-up utilities available - one from IDM itself and the other here. Try both and see if they clear up all remnants of the program. If not, you can manually edit the registry if you know what you're doing and have backups in place.
Answer: Try using Revo Uninstaller for issues like these. If the registry entries persist, I've found that reinstalling the offending program, and then uninstalling it with Revo solves the problem, or at least removes the vast majority of entries.
Revo is available for fast install via ninite.

Internet Download Manager


How many unique pawn structures are possible?

Question: In an effort to classify chess games, I thought it would be useful to identify a set of positions by their unique pawn structure that would form a family of positions. There are indeed many positions but my rough calculations indicate 10^12 to be a upper limit of all possible combinations (I may be very wrong as I don't trust my calculations). But interestingly, it is way lower than the number of sensible position,s i.e. ~10^46. I am very interested to know the actual number of pawn structures (mwithout promotion). I guess actual number of legal positions would be difficult to estimate but a general idea might be good.
Comment: That's an interesting question on its own but I don't think it would be a useful step towards classifying chess games. Most of those theoretically achievable pawn structures will not appear even once!
Comment: I got a generous upper bound of 3*10^11 positions (for one color) by just counting how many squares each pawn could possibly be on.  A generous lower bound of 9*10^8 is easy to get by considering a few simple, definitely-achievable scenarios.
Answer: To classify pawn formations, a good source is chess master books that explore that topic. The book by Boris Persits comes to mind, for example.
I add that it seems impractical as you have been told, to make an exhaustive index of all the combinations that pawn chains can take.
However, it is useful to connect families of openings (classified by ECO, or by open / closed / flank, positional or tactical) and also by the types of endings that can be found according to the pawn structure.
This information has didactic utility for chess plans. There are books that touch on the subject of pawn structures and chess plans.
The pawn chain structures could be described with the characteristics: doubled or solitary / past / advanced / delayed / blocked pawns, V chain or inverted V chain, castling with / without fiancheto and other descriptors that I cannot imagine.
In this way, the number of pawn formations is much less than combinatorial theory can estimate.
Comment: "However, if there could be a future, for example, connecting families of openings classified by some criteria or types of endings, with pawn structures described with the categories already proven in the literature of those masters"  kindly simplify this. good answer btw
Comment: - Make your own descriptors or categories of pawn chains.

- Search how many games have that characteristic. Probably CQL can help you with this search (look in the web or in Scid vs PC).

- Now you have games with ECO codes that can help you connect pawns configurations with a subset of openings.

- With pgn-extract, you can look at an position evaluation after each move, which takes in account material and movility. Or makes material searches with Scid vs PC to get a number for each configuration.
Answer: I've wondered the same thing, and agree with you that there could be some value in classifying board states this way.
Combined with a roster of the remaining pieces on the board (regardless of their positions) the pawn structure specifies a unique board state that, once transitioned out of, can never be reached again in the same game.  They form a partial ordering, with no cycles.  Every other legal combination of positions for the other pieces can be cycled in and out of any number of times and can always be reached again -- until a piece is captured or a pawn moves (or both.)  Those are the only truly irreversible moves in chess.
I think one way to approach determining the number of possible pawn structures is to consider a chess variant I call "pacifist chess" (though it's different from the chess variant of the same name on some chess variant sites I've seen.)  No captures are allowed, but otherwise all the rules are the same (including rules about check.)  The way the game plays out is that eventually the pawns form a sort of impenetrable wall, or sometimes a wall with one or more "holes" in it.  Sometimes, pieces can be trapped inside the pawn wall.  Once that happens, the pawn structure of the board cannot change any further.  Since pawns can only move forward in pacifist chess, it's easy to generate every possible "earlier" pawn structure that could have led to a given final pawn structure.
Next, consider versions of the game where play proceeds normally for some time, some pieces are captured (and perhaps some pawns moved diagonally one or more columns) and THEN the game switches to pacifist rules.  Again, you can (based on the remaining pieces and positions of the now-pacifist pawns) determine the possible final pawn structures and generate the full set of preceding ones.  Repeat that for every combination of captures that impact pawn structure (or just shuffle through the roster of other pieces) and you've enumerated every possible pawn structure.
I haven't actually worked all of this out yet, but I think that general approach might be dealing with numbers of a reasonable enough size that computer simulations could work out the rest.
Answer: For unique pawn structures I would not recommend going by any formula where you will have 10 to the power of n or any indices calculation. The best way to understand pawn structures is to know multiple openings in. There are more than 2000+ opening variations where the middlegame differs in many aspects along with the piece placement. It is always good to understand the patterns of the pawn structures by playing the openings and learning the middlegame.
This way, you can prepare some of the openings and understand the pawn structures which suit your style. This way, GMs prepare themselves. No one has a direct number of exactly how many pawn structures there are. Not even Kasparov or Carlsen might be interested in that unless you are able to show the perfect differences between each kind of pawn structure.
Comment: well I was asking from a mathematical point of view. nothing to do with GMs ,etc


Does the iPod Shuffle 4th Gen work well with Rhythmbox?

Question: I'm thinking about getting an iPod Shuffle 4th gen., but if it doesn't work well with Ubuntu 12.04/Rhythmbox it's a no-go.
Does anyone have any experiences with this combination?
Thank you in advance.
Answer: I had issues initially getting both my shuffle 2nd generation and later my 4th generation to work under 12.04 with Rhythmbox.  I wish I could tell you exactly what steps worked for me but from the sequence of things I tried I really can't pinpoint pit.  I can offer some things to try that worked for me though.
First, go into Rhythmbox Preferences -> Plugins and disable the iPod and MTP support.  Close Rhythmbox and attach your iPod shuffle.  It should recognize and not prompt you to initialize it.  If it still does, try re-enabling the plugins and then connecting your iPod.  Or, maybe even try a combination of doing this while disconnecting and reconnecting the iPod.  Eventually Rhythmbox will be able to access the iPod.  Those plugins just have strange behavior.
Next, add a couple songs to your music folder and sync the iPod.  Eject it.  Close Rhythmbox and try to play the iPod through headphones.  If the 2nd generation just blinks the orange light or the 4th generation tells you sync with iTunes, then connect it again.  Open up Rhythmbox, don't add more songs, just sync it again.  Disconnect it.  Try to play it through headphones.  Rinse, lather, repeat.  If at this point things are still not playing, try fiddling with the plugins again, disabling and re-enabling them and disconnecting and reconnecting the iPod while between disabling and re-enabling the plugins.
Seriously, I did this for both my 2nd generation and 4th generation iPod shuffles and eventually they actually played.  From there on out I had no problems adding music and syncing it ever again with Rhythmbox.
Note, not once did I have to connect either device to the actual iTunes Windows software.
Further note, iPod Shuffle 4th generation sometimes shows the voiceover .wav files in the list of iPod contents in Rhythmbox.  I deleted these a couple times in Rhythmbox without knowing what they were but the iPod seemed to keep putting them back -- it won't hurt if you do delete them in Rhythmbox.  Eventually once the iPod starting playing these no longer showed up in the list of music on the device in Rhythmbox.
I know this all sounds a bit crazy but it really works.
Answer: I had only problems with iPod Shuffle and Ubuntu, doesn't matter which player i was using. i products are useles without iTunes. You can make it work without it, but you will have troubles often.
Answer: The player will works, but you will lose the rating of the songs if you go back to the iTunes. You should install some codec to play the music.
This is my rhythmbox picture:

Note: You can't open your iTunes playlist on Rhythmbox
Comment: So you're using the 4th generation iPod Shuffle (newest version)?
Comment: Yes. I have both iPod shuffle 3 and 4. And both of the ipod works on rhythmbox.


Is there a way to customize vibrate patterns?

Question: Like many people my phone is most of the time in silent/vibrate mode. I was wondering if there's a way to assign different vibration patterns for different notifications, just like we do for ringtones and alerts with sounds.
Maybe there's an app that allows us to do that? I couldn't find anything yet.
Answer: SMS Popup does vibration patterns on a per contact basis (or for all texts).
Handcent does it only for all texts.
Missed Call will do vibration patterns for SMS (per contact), phone calls (per contact),  Battery, Calendar events, device storage, etc.
Answer: Using the Notification plug-in for Locale, you can set separate vibrate patterns for different conditions.
Answer: Vibromaker is has pre-defined patterns.
Answer: New app called WhoIsIt lets you customize the ring/notification audio and vibration.
Lifehacker review
Answer: Llama lets you create custom vibrate patterns for a variety of simple or complex events including location, either by typing in the pause,pulse,pause,pulse... numbers, or tapping out the pattern on a button
(Llama is free, funded by donations)
Answer: ViBe lets you select one of ten custom vibration patterns to attach to a contact for phone calls and SMS/MMS messages. (There's also a way to unlock and make custom vibration patterns.)
Free in the Market.
(Lifehacker review)


short exact sequence

Question: Let $0 \rightarrow L \stackrel{\alpha}\rightarrow M\stackrel{\beta}\rightarrow  N \rightarrow 0$ be an exact sequence, and $M_1$, $M_2$ be two submodules of $M$; then whether the follwing implications holds or not:
$\beta(M_1) = \beta(M_2) $ and $\alpha^{-1}(M_1) = \alpha^{-1}(M_2) \implies M_1 = M_2$
Answer: This implication is not true in general.  For an easy counterexample, let's use real vector spaces (modules over $\mathbb R$) so that we can visualize what's going on.  Consider an exact sequence, as in the question, with $L=N=\mathbb R$ and $M=\mathbb R^2$, with $\alpha(x)=(x,0)$ and $\beta(x,y)=y$.  This gives you a short exact sequence, because $\alpha$ is one-to-one, $\beta$ is surjective, and the kernel of $\beta$ is the $x$-axis, which is the image of $\alpha$.  Now let $M_1$ and $M_2$ be two lines of non-zero slope through the origin, say $M_1=\{(x,y):y=x\}$ and $M_2=\{(x,y):y=2x\}$.  Then $\beta(M_i)=\mathbb R$ and $\alpha^{-1}(M_i)=\{0\}$ for both values of $i$, even though $M_1\neq M_2$.
Answer: I believe a quick way of doing it is to use the 5-lemma for the sequences,
$0\to\alpha^{-1}(M_i) \to M_i \to \beta(M_i) \to 0$
[edit] I took $=$ to mean isomorphic. Not true other wise.

short exact sequence


Which is first ? Tuning the parameters or selecting the model

Question: I've been reading about how we split our data into 3 parts; generally, we use the validation set to help us tune the parameters and the test set to have an unbiased estimate on how well does our model perform and thus we can compare models based on the result of the test set. However, i've also read that model selection shoud be  done before tuning the parameters. I'm getting confused. Which one must be done before the other ? Is the validation set used for tuning ? If true, how are we supposed to do model selection before tuning the parameters ?
Comment: Be aware that cross validation (one of your tag) is a technique for regularisation, I think this is not your problem here (?)
Answer: You can tune parameters only if you have already trained the model, otherwise there is nothing to tune.

However, i've also read that model selection shoud be done before tuning the parameters.

Before tuning you need to do some kind of pre-processing before tuning the parameters.
Usually your pipeline will consist of:

Get Data and Clean It.
Do some EDA ( Exploritary Data Analysis) do get better understanding of you data.
Do some feature engineering - roughly, if possible, you would like to transform current data, so it would be more suitable for your ML algo.
Train and evaluate your model on validation data.
Tune your model`s params to get better performance ( fight with overfitting alos included).
Evaluate on Test set

how are we supposed to do model selection before tuning the parameters

About Model Selection - I think even without having deep inshights about your data, you can already choose some baseline models (I think its a good rule to start with simple models like Linear Regression or K-NN to get the "feel of the performance"), because in most cases you know that you are probably dealing with regression/classification/clustering task, so you can already specify the set on models to try - but before trying the horde of ML models, you should get your data ready.
Some posts like this one can give you the feels of available ml algos, but there are a lot more to try.
In Addition, I think this paper might be very usefull if you are starting to work with ML
Answer:
However, i've also read that model selection shoud be done before tuning the parameters. [...] If true, how are we supposed to do model selection before tuning the parameters ?

Of course model selection should be done before tuning the parameter.
Imagine you chose a model, then work on tuning the parameter (it requires a lot of time, of course). The results are good. But then you test another model, and even without tuning the parameters, the results are better. All your work done with the first model is useless, you spending days, maybe weeks to tune a model that do not perform best on your data.
Model selection come first, because it's useless to tune parameters for a model that you won't keep.
Of course, maybe you don't know which model to chose before testing it with your data. You have to guess which one perform best, or maybe try a few and see which is better, even with a few dataset or a few training epoch.

Is the validation set used for tuning ?

The validation set can be used to tune the model's hyperparameters. Generally, you test a subset of hyperparameters, train each model on a few epoch, and see which perform best. Then keep this set of hyperparameters, and train the model with the real dataset, as much as require to have good performances.
Of course, to have the best model, you need to test them all, with all hyperparameters possible. But you can't do that, so you need to optimise your training, by selecting a model first, then tune it with a few subsest of hyperparameters
Comment: I don't get this answer. Why would you NOT tune before selecting, unless you just don't need the absolute best result? What if an inferior base model ends up being the best model after tuning, and the initial base model you chose isn't the best...
Comment: @rocksNwaves I think it is matter of efficiency. If you train a linear model, a polynomial and a random forest you can use a test set to evaluate their performance and get an insight about their performance. If linear and polynomial models aren't good enough there is no reason to fine-tune them.
Answer: The process of selecting model is as follows:
1] Choose the appropriate algorithm to suite your data set.
2] Create the model, in this process we will fit the algorithm with training data along with the few other machine learning techniques like grid search and cross validation.If you are using deep learning then you might need to split the data into training, validation and testing data. In machine learning if you are using cross validation you do not need the validation data as cross validation it self will split data for validation.
3] Now, depending on the outcome of the result of the above step, you tune hyper parameters and check again the results again. You can repeat the process until you get the optimal model with best metrics. In this way you are selecting the best model by hyper parameter tuning.
One more thing about selecting the model, you can change the algorithm in the first step and continue with step2 and step3. Now, you will have different models with their own best optimal model with best hyperparameters. You can then select best model that suits your needs.
For Example
1] First you select the decision tree to create the model and then select the best optimal model with hyper parameter tuning using step2 and step3.
2] Second, you change the algrithm to randomforest to create the model and then again select the best optimal model with hyper parameter tuning using step2 and step3.
3] Now we will have different models, each of this model was selected as the best model using the hyper parameter tuning. In this way you can try creating the few models and compare them and then finally select the best model.
So, there are actually 2 scenarios when selecting the model.
1] You create the model with an algorithm and then select the best optimal model with hyperparameter tuning.
2] You create different models with different algorithms each with their own best optimal model and select the best model out of these.

However, i've also read that model selection shoud be done before tuning the parameters. I'm getting confused. Which one must be done before the other ?

Sometimes, we might get confused with creating the model and selecting the model. When we create the model, we have to select the appropriate algorithm, sometimes this step(where we select the algorithm) can also be referred to as selecting the model. So, hyper parameter helps in selecting the best model, therefore hyper parameter tuning comes before selecting the model.

Is the validation set used for tuning ?

Validation set is used to evaluate the model performance before testing on the testing data. Once we evaluate the model performance and if it is not as good as you expected, then you change the hyper parameters and check the performance again. So, yes we will use the validation data set to tune hyper parameters.
You can think of validation data as doing unit testing while developing the software applications. You develop the application as a developer and do the unit testing. If the unit testing fails, then again you have to make changes as the developer to fix the unit testing bugs and then only it will be tested by testing team. Once the testing team approves, then the application will be deployed in the production. Similarly, in machine learning you develop the model with training data and do the first testing on validation data. Then you do hyper parameter tuning and select the best model. This model will be tested on the testing data set. Once the results on the testing data set are satisfying, you will deploy the model in the production.
Answer: Model parameters are estimated from data automatically and model hyperparameters are set manually and are used in processes to help estimate model parameters.
Model hyperparameters are often referred to as parameters because they are the parts of the machine learning that must be set manually and tuned.
Basically, parameters are the ones that the "model" uses to make predictions etc. For example, the weight coefficients in a linear regression model. Hyperparameters are the ones that help with the learning process. For example, number of clusters in K-Means, shrinkage factor in Ridge Regression. They won't appear in the final prediction piece, but they have a large influence on how the parameters would look like after the learning step.
Refer : https://machinelearningmastery.com/difference-between-a-parameter-and-a-hyperparameter/


Can I change my seat on a Eurostar booking booked through DB?

Question: I have a Fahrkarte SPARPREIS EUROPA from London St. Pancras to Frankfurt with change in Brux-Mi., bought through a travel agent from DB Vertrieb GmbH.  The ticket is attached to a Kundenbeleg that describes the seat number and reservation, but the ticket itself does not give this information, and the Kundenbeleg is in German.  According to Mark Smith posting on Tripadvisor, this is not a problem and the ticket will be accepted.  No problem there.  However, normally I change my seat to choose a seat I prefer.  Is this possible when the Eurostar ticket was issues by DB?
Comment: I have never tried this so just a comment. In my experience asking Eurostar about anything outside Eurostar (like DB or travel onwards to any Belgian station) draws a complete blank but you could try via their web page Contact us options and hope I was just unlucky. You did pick up from Mark Smith that you need to go to the staffed check-in in the middle of the row of auto ones presumably?
Comment: @mdewey Yes, I've travelled once before with such a ticket but that was before I got in the habit of always changing my seat to my favourite seat before travel.
Answer: Unfortunately, my understanding is that the answer is no.
From https://help.loco2.com/article/306-seating-preferences-and-choosing-a-seat

Changing Eurostar seats after booking
The only rail operator who permits a seat change after booking is
  Eurostar.

While there is nothing to lose by contacting Eurostar directly, Loco2 sell both types of ticket and I would expect their analysis to be correct.
Answer: I agree with Mark Perryman's answer: as far as I know, this is impossible online. However, I have succeeded in getting my seat changed when checking in at the counter with my DB ticket. Of course the choice will be much more limited at this stage, and it may be completely impossible if the train's fully booked. But it's worth trying, especially if you're after some general category ('window', 'near a door', 'near the buffet', etc.) rather than one exact seat. In my case it was 'My companion and I booked separately, but is there any way you could seat us together?'.
Comment: I usually look for *Forward-facing, farthest ahead carriage in my class category, real window seat, European power outlet*, but as I may even fail this 3 weeks in advance I very much doubt they'll be able to do this at the checkin counter!


How to speak in Kansai dialect

Question: For someone who has studied standard Japanese, how hard is it to learn Kansai dialect? Is there a lot to learn, or not much? What are the basic things to learn in order to speak in this dialect? All I know so far is that the sentence ending particles are different.
Answer:
For someone who has studied standard Japanese, how hard is it to learn Kansai dialect?

Many people who spent years studying a language something not being able to learn anything.
Your question's logic is not well formed.

Is there a lot to learn, or not much?

Re-learn bits of grammar, vocabulary, and change completely your intonation.

What are the basic things to learn in order to speak in this dialect?

なんでやねん!
もうかりまっか?
おおきに!
And fluency in standard Japanese too, because unless you're Daniel Kahl or someone like him, you'd better be able speak in standard Japanese when you're not with your friends anymore…

All I know so far is that the sentence ending particles are different.

There's a lot more…
If you want to have an idea of what it's like, read any volume of ナニワ金融道
Answer: 'Is there a lot to learn?' is a pretty subjective question. You can learn as much or as little as you like, and different Kansai folks speak different levels of the dialect. My wife is from Kansai, so I picked it up from her and her family. I think that that would be the best way to go - find someone from Kansai and learn from them. Books are available, but I think it would be difficult to learn Kansaiben solely from a book.
Just to get you started, here's a little morsel:
あかん is used in place of だめ. My kids know this one well.
Answer: Apart from the fact that particles and verb/adjective endings differ, and the fact that vocabulary and usage also often differ -- both of which are not that hard to acquire and lots of information can be found online -- the single most difficult part will be to get the pitch accent right. It's one thing to have an accent in a Standard language, something people are used to, but you'll have to do fairly well for people to not find it annoying to hear you speak in another dialect. The tolerance level is much lower, unless you are with very close friends.
Very few foreigners bother to try to get pitch accent right in Standard Japanese to begin with, and info on Kansai-ben accent is much harder to find; I don't know of any definitive source on Kansai pitch like the Shinmeikai or NHK accent dictionaries for Standard. I don't think it would be reasonable to think you could learn to speak Kansai-ben correctly until you've got a good grasp on Standard pitch.
However, once you've got the basic grammar and common words down, understanding Kansai-ben is not that hard, provided your Standard Japanese level is already fairly advanced.
Comment: The 全国アクセント辞典 by Hirayama Teruo (平山輝男) gives accent for Kyoto dialect. It even gives the accent for various verb forms. However, I would say you've got your work cut out for you if you want to be able to switch effortlessly between Kansai and Standard. It's not just a matter of putting on a funny Kansai-style accent. The accent on each individual word has to be just right, or you'll sound like you're totally mangling it. The other problem is learning two accents for every word. If you could do that for the entire vocabulary of Japanese, I'd certainly be impressed, because I know I can't.
Comment: @Bathrobe: There are some patterns to the correspondences; after all, they evolved from a common source.
Comment: Of course there are patterns. If I remember rightly, it involves a shift to the right (or left) by one mora -- this was discovered by a Japanese linguist. In an intellectual sense that is fine, but it isn't going to help you very much in actually memorising the accent of words.

How to speak in Kansai dialect