Sugar in tea better if put after boiling

Question: I am a big fan of tea. I hail from Punjab, India. I like it with cardamom and milk and water in 1:1 proportion. And I like to boil everything together (this is the way its done in majority of Indian households). Recently, I noticed that the tea tastes much better if I put sugar in my cup after pouring the tea in it, rather than boiling the sugar with everything. It tastes so fresh this way that I have altogether stopped putting in the sugar while boiling. Is there anyone who shares this taste with me and can give me some scientific explanation on what is the difference?
Comment: I don't want to write an answer as this is mostly conjecture... I have seen a lot of other opinions agreeing with you on adding sugar. The only things I can think are that having the sugar already dissolved in the water change the solubility of the tea, or perhaps that the tea matter ends up absorbing some of the sugar.
Comment: I can't answer your question because I've never done it any other way, but in the US (barring family custom otherwise) sugar is always added to hot tea in the cup after the spent tea is removed.
Comment: I'm assuming it's the milk and water that are in 1:1 proportion, not the cardamom and anything?
Comment: OK, Mister Smartypants
Comment: @sourd'oh Thanks for correcting the grammatical mistake. edit -- I like it with milk and water in 1:1 proportion and a little cardamom. :)
Answer: Yes, it would taste different-
Sugar chrystals are made of sucrose saccharose(glucose combined with fructose), if you boil sugar with an acid (milk is slightly acidic[ph 6.5-7]) your sugar splits into its monomers-fructose and glucose(invert-sugar).
Fructose fits into your taste receptors better than sucrose or fructose causing it to taste sweeter(1.73 x sweeter).
Comment: I disagree with this theory. In candy making, one can add acid to sugar syrup to invert the sugar in order to prevent crystalization, or work very carefully without adding acid. To me, the final product tastes the same in terms of sweetness, no matter which technique was used.
Comment: What are the kinematics of this reaction?  Does it occur at a significant speed at culinary (tea) concentrations and pH?
Comment: Thanks @matt I have wondered about this myself for a very long time!
Comment: I also disagree that this can happen quickly enough when making tea, as inverted sugar recipes usually specify a long amount of time and much higher concentrations of sugar: https://www.homebrewersassociation.org/how-to-brew/invert-syrups-making-simple-sugars-complex-beers/
Answer: Yes according to science sugar is always use after boiling water because if we used sugar before boiling water then elevation of boiling point will occur that is more energy require to boil water.so this process is very expensive. So according to my opinion always use sugar after boiling water.
Comment: Assuming a 20% sugar solution (which imho would be disgustingly sweet), you get a boiling point of 100.6 C. The additional energy for that is basically neglible in home environments.
Comment: I'm not understanding how this could be "very expensive". Please explain.


Why was lord Krishna driving Arjuna's chariot in Mahabharat war?

Question: What is the significance and why lord Krishna driving Arjuna's chariot in Mahabharat war?
Comment: Strongly Related: [Why didn't Krishna take a more active part in Battle of Kurukshetra in Mahabharata?](https://hinduism.stackexchange.com/q/687/1049)
Comment: @Kailash Chandra Polai i think i have answered all of your queries do you want me to add something more in it?
Answer: Truly he didn't fight on either on the side of Kaurvas or Pandavas he gave his celestial army (Akshauhini) to Duryodhana and became the charioteer of Arjuna without participating in the battle such is Lord's glory.
It is partially explained here:— Why didn't Krishna take a more active part in Battle of Kurukshetra in Mahabharata?
but whole answer is here:—

"Vaisampayana continued, 'Thus
  addressed by Krishna, Dhananjaya
  the son of Kunti selected Kesava who
  was not to fight on the battle-field,
  even Narayana himself, the slayer of
  foes, increate, born among men at
  his own will,--the foremost of all
  Kshatriyas and above all the gods
  and the Danavas . And Duryodhana
  selected for himself that entire army
  (composed of the Narayanas). And, O
  descendant of Bharata, having
  obtained those troops numbering
  thousands upon thousands, he was
  exceedingly delighted, although he
  knew that Krishna was not on his
  side. And having secured that army
  possessed of terrible prowess,
Duryodhana went
  to the son of Rohini of great
  strength, and explained to him, the
  object of his visit. The descendant of
  Sura in reply addressed the
  following words to Dhritarashtra's
  son, 'Thou shouldst remember, O
  tiger among men, all that I said at
  the marriage ceremony celebrated by
  Vitrata. O thou delighter of the race
  of Kuru, for thy sake I then
  contradicted Krishna and spoke
  against his opinions. And again and
  again I alluded to the equality of
  our relationship to both the parties.
  But Krishna did not adopt the views
  I then expressed; nor can I separate
  myself from Krishna for even a single
  moment. And seeing that I cannot
  act against Krishna even this is
  resolution formed by me, viz., that I
  will fight neither for Kunti's sons nor
  for you. And, O bull of the Bharatas,
  born as thou art in Bharata's race
  that is honoured by all the kings, go
  and fight in accordance with the
  rules of propriety.'
"Vaisampayana continued, 'Thus
  addressed, Duryodhana embraced
  that hero wielding a plough for his
  weapon of battle, and although
  knowing that Krishna had been taken
  away from his side, he yet regarded
  Arjuna as already vanquished. And
  the royal son of Dhritarashtra then
  went to Kritavarman. And
  Kritavarman gave him a body of
  troops numbering an Akshauhini .
  And surrounded by that military
  host, terrible to behold, the Kaurava
  marched forth delighting his friends.
  And after Duryodhana had departed,
  Krishna, the Creator of the world,
  clad in yellow attire, addressed
  Kiritin, saying, 'For what reason is it
  that you have selected me who will
  not fight at all?'
"Thereupon Arjuna answered, 'I
  question not that you are able to
  slay them all. I also am alone
  capable of slaying them, O best of
  men. But you are an illustrious
  person in the world; and this renown
  will accompany you. I also am a
  suitor for fame; therefore, you have
  been selected by me. It hath been
  always my desire to have you for
  driving my car. I, therefore, ask you
  to fulfil my desire cherished for a
  long time.'
"Vasudeva's son thereupon said, It
  beseems thee well, O Kunti's son,
  that thou measurest thyself with me.
  I will act as thy charioteer; let thy
  wish be fulfilled.'
"Vaisampayana continued, 'Then
  with a glad heart, Kunti's son,
  accompanied by Krishna as well as
  by the flower of the Dasarha race,
  came back to Yudhishthira.'
—The Mahabharata, Book 5:
  Udyoga Parva: SECTION VII

source:— http://www.sacred-texts.com/hin/m05/m05007.htm
Comment: Nicely described, BTW did Krishna never used his Sudarshan chakra in the war? I listen only Sudarshan chakra was roaming around in the battle field and the armies were only for display purposes. It is true?
Comment: @Kailash Chandra Polai yes, sudarshana chakra was there in mahabharata but not that way what you are saying is in shanti parva where lord krishna as supreme being says that it is lord rudra that was killing everyone and others were instrument other than that this chapter mentions a war between nara-narayana and rudra during daksha yajna which i think is not universey accepted in any daksha sacrifice chapter and shanti parva is most interpolated book of mahabharata,
Comment: nara-narayana either performed peance at badrinath and got boon and that even shiva could not defeat them this is explained by vyasa telling why narayanastra did'nt worked on krishna and arjun while saving bhima from it.
Comment: About sudarshana chakra you can ask it in your question as it was used to make a fake sunset.


Ubuntu 11.10 LAMP is very slow

Question: My lamp stack on a local machine is too slow.
I have successfully installed wordpress but any request (e.g login,add new post) is too slow.
How can i resolve what's wrong ?
Thank you in advance!
Answer: Chech this out. It's very useful Tuning LAMP
Especially chapater ->Resource related settings in php.ini
Answer: Check your DNS configuration.  If you have invalid DNS servers configured or a networking problem is obstructing your machine from reaching your DNS server, you may experience long delays.

Ubuntu 11.10 LAMP is very slow


user_save does not save data

Question: if a user changes his email address, I want him to lose a specific role (if he had that role in the first place). To make matters more complicated, we have the "email confirm" module enabled and this bitchy little module uses user_presave() in a way that leaves no traces of an email change when it is called during the edit of a profile. So I wrote a module and gave it weight -1 to make sure it gets a chance to compare $edit->mail to the users current mail before "email confirm" begins to work.
My code looks like this (version with a lot of debug statements that will be removed in the live environment):
function xyz_user_presave(&$edit, $account, $category) {
  if (!empty($edit['mail']) && (!empty($account->mail) && $account->mail != $edit['mail']) && !user_access('administer users') && !drupal_installation_attempted()) {
    // remove xyz role if the users changes his email address
    $user = user_load_by_mail($account->mail);
    $role = user_role_load_by_name('xyz');
    if (array_key_exists($role->rid, $user->roles)){
      drupal_set_message('In if-clause.');
      $return1 = print_r($user->roles, TRUE);
      drupal_set_message($return1);
      $user2 = user_save($user, array('roles' => array_filter($user->roles, function($item) use ($role) {return $item != $role->name;})));
      $user3 = user_load_by_mail($account->mail);
      $return2 = print_r($user3->roles, TRUE);
      drupal_set_message($return2);
      if (!$user2){
        drupal_set_message('User_save() failed.');
      }
    }
  }
}

If I log in with a test user that has role xyz and change his email address at the "edit profile" site, i receive these status messages:

In if-clause.
Array ( [2] => authenticated user [5] => abc [8]
=> xyz )
Array ( [2] => authenticated user [5] => abc )

The debug messages tell me that:

It has been found out, that the user has the role xy and therefor the if-clause was entered.
Before the call to user_save(), the user had the role xyz
After the call to user_save(), the user was freshly loaded and he did not have the role xyz anymore

Yet despite all this, the user does not lose the role, no matter how often I change the email address or flush the cache.
My question now is: What the hell?
Using user_save() in the user_presave() function seems to be odd, but when I put the $roles array in $edit without the xyz-role, I receive pdo exception that states, that the roles are already set for this user.
Answer: This did the trick.
function xyz_user_presave(&$edit, $account, $category) {
  if (!empty($edit['mail']) && (!empty($account->mail) && $account->mail != $edit['mail']) && !user_access('administer users') && !drupal_installation_attempted()) {
    $role_position = array_search('xyz', $account->roles);
    // Use !== or === here since $role_position may be zero or FALSE
    if ($role_position !== FALSE) {
      unset($account->roles[$role_position]);
      $edit['roles'] = $account->roles;
    }
  }
}

I still do not know what's wrong with the code in the initial post, but whatever...

user_save does not save data


Soft vowel pronunciation at the end of a word

Question: How do you tell when you need to pronounce a soft vowel as soft and stressed? I only ask because I've run into a grammatical rule that says that an unstressed я like in "девять" should be pronounced like "i" in "machine" however any time I hear the name "таня", it's pronounced TAN-YA. Is there some kind of exception to when an unstressed soft vowel is to have its softness pronounced?
Comment: In case of that name  there is confusion with Hebrew-originated name Tanya (it's full name) while "Таня" is shortening of "Татьяна" (Tatiana). Irony is that the last vowel of the former should be read similar to the middle sillabe of Татьяна. "ь" is used to denote that iodized sound.But keep in mind, Tanya  is not always meant to be a slavic name, e.g. Agent codename "Tanya" in Red Alert is an American of Hebrew origin, supposedly how she could get that codename.
Answer: Fully pronounce the vowel if it is stressed
Яркий - мЯгкий - румЯна

If it's in the beginning or ending, you won't fully pronounce it, but it won't be shortened as it is shortened when the vowel comes in between (like in девять)
язЫк - Яблоня

If the vowel comes in between you'd take the most comfortable way to get from the previous consonant to the succeeding one. That will be usually an i/e sound.
лягУшка - дЕвять - лЮбят

I'd say the я is more i-like in девять and some kind of i/e sound in лягушка
*caps indicate stressing
You can look for vowel reduction, but I doubt that some rules always apply, as given e. g. here
Comment: So таня would be pronounced more like /Tan-YUH/ rather than /Tan-YA/?
Comment: @johnq Yep, I think one can say so. The /UH/ in /-YUH/ is rather short and unstressed. The point in this case is, that since it's the word ending the tongue does not have to prepare for a following syllable. If you focus on the stressed vowel (here `а`) your `я` will automatically shrink to a proper /-YUH/
Answer: A good ear for different sounds. These sounds maybe a bit different, depending on how a speaker wants it. Or the same. The thing is, usually Russian vowel reduction is described as a process consisting of two stages: first, the reduction in the first pretonic syllable (immediately before the stress) and then the second stage "everywhere else".
However, some researchers suggest that only pretonic-stage is consistent, and "everywhere else" is just a speedup device, i.e. it largely depends on making speaking easier and is prone to variation depending on the speaker, the amount of hypercorrection and how fast you speak. It was supported in a paper by the experiment, in which words and expressions were subject to less second-stage reduction where read slowly — but still, first-stage reduction remained the same no matter how slowly a person read a word.
From the practical point of view, the recommendation from the books and tips for announcers are as follows:

1st pretonic, that is, the first syllable before the stressed one: the vowel in Я (with or without Й) is mostly the same as unstressed И and Е: close to "i" in English words like "hit". I-like vowel, but not as characteristic of "ee"-ness as in words like "eat" of "see"
everywhere else in the unstressed position: similar to the previous, but somewhat closer to the unstressed "А/О" sound. More open.

So, while in "девять" and "Таня" the sounds may be rendered a bit differently (also, Н is a nasal consonant which, of course, influences the sound), no distinction between them is usually made. But it is definitely not the kind of i you woukld hear in "machine": only the stressed "И" is pronounced that way.
Anyway, I do not undestand the initial question. What can you possibly mean by "have its softness prnounced"? Palatalisation is always pronounced, stressed or unstressed, except when the consonant does not have "soft" counterpart. There are some writing conventions (in reflexive verbs -ться and -тся are pronounced ца). Some actors pronounce reflexive -ся as -са because it sound cooler and more in line with theatrical tradition (and probably saves the microphone a lot of hisses if you are recording their speech).
Note also the difference of how stress works in Russian and English speech. The English language has rhythm, so if a syllable is stressed, then the one before it is reduced, and the one before that one is again a bit stronger. In Russian only the first syllable, IMMEDIATELY before the stressed one is somewhat clearer than the rest — the syllable, that in English is usually quite weak.
Answer: At the end, я is much easier to pronounce. If there are additional sounds after the unstressed я, one's tongue must twist more to say я than и. Therefore девИть but ТанЯ, СенЯ, ПетЯ.
In Ukraine, Russians say девять, лягушка, and so on. That, and their h instead of Г is very "hearable".
Comment: So is their any general rule that says that soft vowels can be pronounced with their softness at the end of a word?
Answer: Sorry, but I'm at a loss from the question as well as the answers... There is absolutely no difference in pronunciation of Я in any of the words listed. The only exception is the case of Я as the first letter (Я, Яркий, Ярослав). There is a consonant sound preceding it and it sounds a bit like ЙA. It never, however, comes even remotely close to the pronunciation of "I".
Comment: Если отвлечься от написания и внимательно послушать как произносится "девять", то там действительно "я" не звучит. Вот [здесь](http://ru.wiktionary.org/wiki/%D0%B4%D0%B5%D0%B2%D1%8F%D1%82%D1%8C) приведена транскрипция слова: [ˈdʲe.vʲɪtʲ]
Comment: может в произношении Американца или Чукчи, так и есть. Но если я себя словлю на произношении "девить", попрошу меня пристрелить.


Why do we need so many sorting algorithms?

Question: We have some best sorting methods like quick sort, merge sort etc., then why we need other sorting methods which perform poor?
Comment: Are you asking why bozosort is described in the literature?
Answer: Some kind of sorting algorithms may end up being visually more pleasing, giving nicer intermediate steps allowing for visual inspection of data where a human can recognize where in the process one is and analyze what goes wrong and sanitze the data accordingly.
I know I have used sometimes some costly sorting algorithm because it came in handy during game programming, giving just the right effect(revealing something on monitor, sorting inventory, etc...) on screen without it looking computer generated.
Like T.S. Elliot said:

The journey, Not the destination matters...

To see what I mean(source of images https://i.stack.imgur.com/BZIvm.jpg):

!
!
!
!
!
!
!
Comment: Those are so cool.  I would like to see examples using parallel threads, e.g. for merge-sort. (I wrote a parallel version.)
Comment: If you look at the linked imgur post you can see what I believe are combos of different sorting algorithems done together.
Answer: We probably don't need all the O(n^2) ones. But some of them can be useful during the end-game. For example, a popular C++ standard library employs merge-sort to implement std::stable_sort, but switches to insertion-sort when a sub-array has length 32 or less.
But the real reason that we have "so many" sorting algorithms is that throughout the years, no beginner has been able to resist the urge to invent their own sorting algorithm.


Who owns the issue of Agile team complacency?

Question: I am really eager to hear different perspectives on team complacency about their Agile adoption. Is it the ScrumMaster's problem? The team's issue? The manager's fault? I can see so many complex webs here. I'd love to know what you think.
Comment: Could you please elaborate "team complacency" term, it's a big vague especially for non-English speakers
Comment: Complacency looks like this: a team no longer looks to improve. A team has no more enthusiasm about their work. A team resists change. If this occurs, I think a team is frankly no longer Agile. I also think the team will ultimately give up Agile. What are your expereinces?
Answer: Literally, it's the team's problem and the ScrumMaster's issue.
The complacency is the effect, not the cause, therefore no particular person owns the effect, but, for sure, there is an owner for each of the causes. Focus on finding the causes and the owners should become clearly visible.
Scrum Master is the owner of each impediment and he owns the part about solving the issue. On the other hand, SM is not directly capable of solving every issue. Some may be solved by the team itself, some by the management and some by someone out of the loop, so big part of such issue is not owned by SM. Her job is to make others solve such impediments.
Regarding the complex connections, it is difficult to judge without making guessed assumptions, so I will only serve some questions:

Is the complacency the impediment? Why do you consider it so? Are there any drawbacks already?
Is the team overconfident? Have you talked about it freely? Have you described them your point of view on Agile adoption? Why did they ignore it?
What is more exaggerated? Is it your concern or their complacency?
Have you tried making the workshops about it? Did you run some team games to simulate and reveal the problems?
Answer: Answer D. None of the above! W. Edwards Deming, management theorist and systems thinker, said that 95% of performance issues are attributable to the "system" (work design, structure, management, processes, technology, etc.) and that only 5% are attributable to individuals.  When teams get complacent it's usually due to "friction" they encounter within the system.  You likely need someone who can understand the system and can affect change in that system.  In my experience, people who are working "in the business" are too close to the situation and can't affect that kind of change.  You may need someone in a separate role who can work "on the business", like an Agile Coach.  Coaches can bring experience, specialized skills and a fresh perspective to teams whose practices have become stale.  For example, someone in a coaching role can open teams up to new patterns or ways of doing things.  They can work across teams to resolve inter-team problems.  They can reinforce principles and values underlying the practices so that people keep fresh in their practices.  They can lead a community of practice or help individual teams raise the bar on practices where the teams have self-identified opportunities for increased performance.  Obviously, this works only when everyone (managers, ScrumMaster and the team) has an appreciation for the coach's input and it will in the end, require everyone who is working within the system to participate in the revitalization.
Comment: +1 for offering the systems-based perspective.  Welcome to the site!
Comment: +1 ANnnnnnd, who is that person in "a separate role" who can elevate the complacency issue as one of the system? I fear a "complacent team" will receive blame for their behavior. Perhaps that is why complacent in the first place: lack of trust and resultant artificial harmony.
Answer: You can't solve it by designing the right system. It is about people, more often then not. Each case has to be approached and understood individually so you can work with the people involved.
Adoption of a new process, and particularly adoption within an existing process structure, is highly individualized by each organization.
As you indicated in your question - there are many complex webs here.
Spend time learning and understanding the dynamics at work in each individual case. This is not so much a "systems" issue as a rich and complex "human nature" question.
If there are techniques you can use to encourage your desired behaviors, use them. But it is rarely the case that one size fits all. (You have to get to know the people and place.)
Comment: Hmmm. I DO think it is a "system" problem, no offense to you. What if the problem is that the organization never backed the team? What if the team was forced into "doing Agile" because some V.P. heard that it would make the team deliver faster? Perhaps it **is** the ScrumMaster's job to expose this. If so, what does one do?
Comment: I also think that it's a "system" problem. Never blame people, blame yourself as a project manager.
Answer: Are you a team member or external to the team?
If you're in the team, as J.B. says above, ownership is not the issue.  If you know there is a problem, regardless of your role you should raise it with the rest of the team.  It sounds like a great topic of conversation for a retrospective.  5 whys or similar technique to get to the causes of the perceived complacency and take some team actions to resolve those seen as the biggest issue.
If you're external to the team, I'd definitely have a chat with the Scrum Master about it and get their views. Your perception as an outsider might be very different to how the team feel or, equally, your external view of the team could provide insight into a problem the team hadn't yet noticed.
Comment: Being prepared to raise the issue in the team is important. Being prepared to have someone outside the team prepare to support and challenge the team through 5 whys is also valuable. I agree it is a topic of retrospection potentially. Here is the dilemma I see: a complacent team won't speak up in a retrospective. Or, they won't have a retrospective at all.
Answer: When someone asks this question, rather than "what should we do about it?" or "what potential causes should I consider?" it makes me nervous. I don't mean this in some idle collectivist fantasy sense, but what does it matter who "owns" the problem? and what do you mean by "own" here?
If a team shows signs of complacency, then surely that complacency will affect its performance, and surely that will show up in a value stream map or during a retrospective or in the occurrence of some unfortunate incident. If the team sees a symptom in any of those forms, then who owns the problem?
Now I could interpret your question as "Who should focus on detecting complacency on a team with a Scrum-my structure"? Well, "becoming complacent" seems like a risk to me: who has special responsibility for identifying and watching out for risk realisation indicators on a Scrum-my team? Scrum Master seems logical; manager seems logical; any senior team member seems logical. I would think that we'd want some redundancy built into the system so that at least 3 people are watching out for this kind of thing.


Non muslim food business serving Halal food, DO I NEED A CERTIFICATE?

Question: I am a Non muslim (Christian) that lives in a very diverse part of london UK. I have always only bought Halal meat from my local Halal butcher, I recently opened a small community cafe, and have choosen to continue to only buy my meat produce from my local Halal butchers, and am very considerate and respectful of other religions and beliefs, and respect all my customers equally. Since opening my cafe I have made sure I have seperated all cooking utensils, halal, vegertarian, and allergen etc.
I would like to know if this method is considered Halal, or if I need a certifcate to confirm that the food served in my cafe is Halal.
Thank you for your advise
Comment: Welcome to IslamSE the Q&A site about Islam. To learn more about our site and our model consider taking the [tour] and checking our  [help]. I'm a bit curious where or how will you get the certificate? IMO this is a quite opinion based matter: As whether one trusts you when you say the food or meat is halal or not is opinion-based. In Islam there's no such thing as halal-certificate and knowing by experience that al-Azhar would put it stamp on anything when it is well paid I don't see how a certificate would change this by any means, as the matter is a matter of trust.
Answer: As far as I know, Islamic religious law does not require a certificate.
However in practical terms, your customers might need you to be certified, they might not take your word for it or they might doubt that you properly know and understand all halal requirements.


How to implement a game like SatoshiDice?

Question: Everyone knows what SatoshiDice is. Their core mechanic is gambling through the use of Bitcoin transactions with the payout being directly linked to the transaction that fuelled the bed to avoid double-spend attacks. My question is, how to implement such a mechanism? Can it be done in the Standard Client, or does it need some extra software to pick the exact inputs of a transaction?
Answer: Creating a SatoshiDice-like game is rather easy.  Below are the high level steps involved in making such a game.
For each incoming transaction...
Get the customer amount and payment address

Call bitcoind getrawtransaction [The incoming transaction ID] 1.  The 1 at the end will return the data in "verbose mode", which essentially the raw data in JSON format.
From the raw transaction details, take the txid and vout from the vin object.  With this transaction, again call bitcoind getrawtransaction on the txid.
From these raw transaction details find the vout object, referenced by the vout index from step #2.  Within this vout object, there should be a list of payment recipient addresses.  Take and store the first address.

Determine the Win/Loss state of the round and return the results

Hash the txid+vout index of the transaction.  Seed your hash function with a secret key.  As an aside note, you will need to provide your secret key on a periodic basis.  Without updating and providing your secret keys, there is no way for your players to verify your fairness.
Compare the last four bytes of your hash to determine the win/loss condition.

In case of a loss...

Call bitcoind createrawtransaction.  You must pass in the originating txid and vout of your customers payment.  With the customers address, include a small, fractional value to send back to the customer.  This informs them that they've lost the round.  Also, include a second payment address that will receive the remaining portion of bitcoins from the customers originating payment.  This should be an address within your wallet.
Call bitcoind signrawtransaction to sign the transaction.  If it returns a value of complete=true, your transaction is valid.
Call bitcoind sendrawtransaction and include the above constructed raw transaction.

In case of a win

Calculate the customers winning amount.
Call bitcoind listunspent.  This will return a list of inputted transactions that have not been spent by your wallet.
Create a list of transactions to process as payments.  First, include the customer's originating txid and vout index of their payment.  Next, append to the list any number of unspent transactions (from step #1) that are necessary to pay your customer their winnings.
Remember to include an additional payment address that will receive the remaining portion of bitcoins from the final unspent transaction that may contain overages above the player's winnings.
Call bitcoind createrawtransaction, passing in all of the transactions accumulated in step #3.
Call bitcoind signrawtransaction to sign the transaction.
Call bitcoind sendrawtransaction and include the above constructed raw transaction.

That's it!  That's a very simplistic, SatoshiDice processor.  You may want to add more validation, cache your transactions, monitor orphaned blocks and just integrate some other administrative routines.
It is worth mentioning that you always include a portion of the customers original payment with all of your return transactions.  This is because if their payment is orphaned, or is marked as invalid, you want to be sure that your transaction is also removed from the block-chain.
Using this method you can actually respond near-instantaneously and there is no need for confirmations.  If their transaction is malformed and rejected by the network, your transaction will also be thrown out by the network since it is a child of their original transaction.
Comment: I guess to get "For each incoming transaction...", you would just call listtransactions?
Comment: Yes, or `listsinceblock`.
Answer: Real Satoshi dice uses the bitcoinj library.
Answer: You could easily write a piece of software that runs on the same machine as a bitcoin daemon and let it use the JSON-RPC API from the local bitcoin daemon.
There are JSON-RPC implementation examples for all popular programming languages like Python and Java.
This piece of software will poll for new transactions, validate them and applying your game rules, and again making new transactions.
Note that a server with such a piece of software needs only to have it's bitcoin port open to the internet, while the RPC port can be limited to local connections for safety.
Comment: Well, after attempting to implement it through Bitcoin API, I ran into the problem that since 0.8 and the new database system, bitcoind does not have all information on old transactions, so finding out the sender of a given transaction can be problematic.
Comment: How is an "old" transaction defined? SatoshiDice acts fast, right? I guess transaction details should be kept several blocks at least, no?
Comment: Well, in order to determine the issuing address using the API, you need to look to a transaction previous to the one gambling, which can be arbitrarily old.
Comment: You could keep track of previous transactions in a database, and then query that if it's older in the blockchain.


How do I correctly provide Creative Commons attribution on a digital print?

Question: I'm using a photo I found on Flickr that is licensed with the Creative Commons non-commercial attribution license.  I'm modifying this photo and then will be giving it as a present to a friend.  Does anyone know if I still need to attribute the photo?  How about if I do it verbally?
Answer: For a photobook, I'd consider the best solution would be to add a credits section on the last page, or on the book flap. Morally, that respects the spirit of the licence, and since it's a private use, I wouldn't be too concerned about the legal side of things.
Something along the lines of "Thanks to So and So, who provided the original photograph on which image on page 5 is based (link to flick page)" would be just perfect.
Comment: Yes, attribution, to have any value, must be public. Placing it in a credits section is a good idea.
Comment: Not only does it respect the spirit of the license, it also respects the letter, and the recommended practice on the Creative Commons web site. So, yeah. :)
Comment: I should probably add that for a more public non-commercial use (eg: something a non-profit would use), I'd recommend checking with the artist.
Answer: You do need to give attribution any time you create a copy of it (even if you have modified it yourself).
What if you write an attribution on the back (and give attribution verbally)?  That way, if your friend forgets where you said you found it, he/she can look on the back of the photo to find out.
As others have suggested, your best bet is to contact the person who took the picture, and ask how he/she would prefer you attribute it.  I am going to guess that most people who post photos on Flickr under a Creative Commons license are going to be thrilled that you like their work and want to use it, and will be very reasonable with coming up with an attribution scheme that fits aesthetically in your photo book.
Comment: @MCS, you can often put photo credits in tiny text along the side of the photo and it's subtle enough that it doesn't ruin the look. (Or, as others have suggested, put all the credits in the back.)
Comment: Writing the attribution on the back is a great idea, but the photo will be part of a photo book and the attribution may just ruin the look.
Answer: If you want to really avoid issues, be they moral or legal; your best bet is to seek advice from the rights holder (i.e. the person who took the photograph) - They may be willing to licence it to you with different terms, or advise what options they'd see as acceptable for the attribution (If it were me, and I'd released a photo under those terms, I'd accept a note on a credits page, for a photo book; For a newspaper, I'd want it as a caption)
Answer: The Creative Commons Attribution Noncommercial License (version 2.5) states quite clearly:

Attribution —  You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).

So to comply to the letter of the license you must contact the author (if they have not made clear how they would like the work attributed). Hopefully they will be reasonable!
Comment: FTR, months later, that text is not actually from the legally-binding license. It's from the "human-readable summary". The full legal text is at http://creativecommons.org/licenses/by-nc/2.5/legalcode, and includes the phrase "Such credit may be implemented in any reasonable manner". I think, actually, that "in the manner specified" in the summary is (accidentally) misleading. It just means that the author or licensor chooses *what* the credit should be (e.g. "mattdm" or "Matthew Miller"), not necessarily how it's shown.
Comment: Thanks for that! So the human readable summary is confusing whereas the legalese version is clear and to the point, what is the world coming to?!
Answer: You do not need to contact the rights holder to exercise the CC licence terms. The author might specify how they want their credit worded, and what URL they would like referencing, but in the absence of that you can use your judgement - use their Flickr username and the URL of the photo page.
You simply need to provide attribution in a manner appropriate to the medium. For a framed photo for a friend, a caption on the back of the frame would be fine. If you were exhibiting in a gallery, a more visible caption would be appropriate.
Comment: @labnut, attribution should be consistent with other artwork in the same context; in a private home, the various pieces are typically not going to have captions or tags giving attribution. One asks the homeowner "who made this art" and they tell you; that's the attribution. Putting on the back is probably a good reminder.
Comment: @Reid Priedhorsky: This is an important debate. Defn: attribution - 'the act of establishing a particular person as the creator of a work of art'. Implicit in this definition is that it must be public. A private, hidden attribution has no meaning as it 'establishes' nothing. Not only that, the absence of a visible attribution is an implicit claim that the work is one's own. Finally an important reason for attribution is to give recognition to the author. A hidden attribution can hardly count as recognition.
Comment: And to the preceding I must add my 'fairness' argument that I mentioned before. As photographers we should expect each other to behave to one another in a spirit of fairness. This is a values argument with utilitarian value since such values help to create and bind together a community of like minded people to their common benefit.
Comment: Attribution is a public statement of authorship. Putting it on the back of a framed photo is not a public attribution. We are all photographers and should be willing and glad to give recognition to the work of other photographers.
Answer: Why don't send an email to the original photographer informing him of your modifications and probably also send a [digital] copy of it.
Or perhaps upload the modified photo to your flickr account and attribute it to the author.


Does the sect Sauram still exist?

Question: Does Sauram - the sect of Lord Surya being Supreme Being, still exists? One of my Bengali friends are Saurite. If they are still existing, when did the community got declined? What are their holy books?
Comment: Sauras, Shaktas, Ganapatyas, and Kaumaras all still exist, but in very small numbers. Those sects went into decline for much the same reason philosophical Shaivism went into decline, which is that most adherents of those sects rejected the Vedanta school, so when Vedanta became the dominant school of Hindu philosophy in the centuries following Adi Shankaracharya, those who rejected Vedanta dwindled in numbers. Philosophical Vaishnavas, on the other hand, aligned themselves with the Vedanta school, which is why there are still large numbers of philosophical Vaishnavas to this day (like myself).
Comment: Wikipedia says the Sauras declined in the 12th-13th century.  In any case, their holy books are the Saura Agamas.
Answer: Let me add a partial answer because the information i'll be providing is knowledge-worthy.
To be specific,i'm answering this question"Which Hindu Texts describe Surya as the Supreme Being Or are there any such texts at all?".This question is relevant here because such texts only will  form the basis of worshiping Surya as the Supreme Deity.
To my knowledge there are two such texts:
1)The Surya Upanishad,a minor Upanishad allied to  Atharva Veda.
&2)The Bhavisya Purana,one of the 18 major Puranas.
(In what follows,i'll be adding a few verses and an image from the Surya Upanishad,all of which are taken from a book called "Sukta Sangraha".)
Following are few verses from the above mentioned Upanishad praising Surya as the Supreme Brahaman:

aum atha sūryātharvāṅgirasam vyā̎khyāsyā̱maḥ | brahmā ṟṣih | gāya̍trī
  chha̱ndaḥ | ādi̍tyo de̱vatā | haṁsa̍ḥ so̱'ham agni nārāyana yu̍ktam
  bī̱jam | hrille̍khā śa̱ktiḥ | viyadādi sarga saṁyu̍ktaṁ kī̱lakam |
  catur-vidha puruṣārtha siddhyarthe jape vi̍niyo̱gaḥ ||
  Now   we  shall   expound mantras of  Atharva Veda    in  relation    to  the Sun:    The seer    of  this    Atharva Aṅgirasa
  mantra    is  Brahma, metre   Gayatri,    Aditya  the deity,  'Hamsas so'ham  with    Agni    and Narayana    is  the seed,
  the   power   is  hrillekha   or  hrim,   the pin is  the power   in  the process of  unfolding   the sky etc.,   the application
  is    its use in  repetition  for winning the four    human   goals   (viz.   Dharma, Artha,  Kama    and Mokṣa).
ṣat-svarārūḍhe̍na bīje̱na ṣaḍa̍ṅgam | ra̱ktāmbu̍ja-saṁsthi̱tam | saptāśva̍- rathi̱nam | hi̍ranya-va̱rṇam | ca̍tur-bhu̱jam |
  padma-dvayā'bhaya varada ha̱stam kāla-cakra̍ praṇetā̱ram | śrī sūrya
  nārāya̱ṇam | ya e̍vam ve̱da sa vai brā̎hma̱ṇaḥ ||
  The   six limbs   consist of  the seed    with    six vowels  added.  He  indeed  is  a   Brahmana    who thus    knows   the
  golden    Surya   Narayana    seated  on  the chariot with    seven   horses, impeller    of  the time-wheel, having  four
  arms  bearing
    two lotuses,    the others  bestowing   promise of  refuge  and boon,   set in  the red lotus.
sūrya̍ ā̱tmā jaga̍tas-ta̱sthuṣa̍śca | sūryā̱d vai khalvi̱māni̱
  bhūtā̍ni̱ jāya̍nte | sūryā̍d ya̱jñah parjanyo̎ 'nnam ā̱tmā |
  The   Sun is  the Self    of  the world,  moving  as  well    as  un-moving.  From    Surya   indeed  are these   creature
  born, so  also    the Yajna   (Sacrifice),    Parjanya    (Rains),    food    and spirit.
nama ̍ste āditya | tvam-e ̱va pra ̱tyak ṣa ̱m karma ̍ kart āsi | tvam-e ̱va pra ̱tyak ṣa ̱m brahm ā ̍si | tvam-e ̱va pra ̱tyak ṣa ̱m vi
  ṣnu ̍rasi | tvam-e ̱va pra ̱tyak ṣa ̱m rudro ̍'si | tvam-e ̱va pra
  ̱tyak ṣa ̱m riga ̍si | tvam-e ̱va pra ̱tyak ṣa ̱m yaju ̍rasi | tvam-e
  ̱va pra ̱tyak ṣa ̱m s ām ā ̍si | tvam-e ̱va pra ̱tyak ṣa ̱m atha ̍rv
  āsi | tvam-e ̱va sarva ̍m chhando ̱'si |
  I bow to  you Aditya; you are the agent   himself of  work,   the manifest    Brahma, Vishnu, Rudra,
    Rig,    Yajur,
  Sama, Atharva Vedas,  as  well    as  all the chandas (Metres).
ā ̱di ̱ty ād v ā ̍yur j ā ̱yate | ā ̱di ̱ty ād bh ū ̍mir j ā ̱yate | ā ̱di ̱ty ād āpo ̍-j āya ̱nte | ā ̱di ̱ty āj jyoti ̍r j ā ̱yate | ā
  ̱di ̱ty ād vyoma di śo ̍ j āya ̱nte | ā ̱di ̱ty ād de ̍v ā j āya ̱nte
  | ā ̱di ̱ty ād ve ̍d ā j āya ̱nte | ā ̱di ̱tyo v ā e ̱ ṣa e ̱tan ma ̱ṇ
  ḍala ̱ ṁ tapa ̍ti | a ̱s āv ā ̍di ̱tyo bra ̱hm ā |
  From  Aditya  are born    air,    earth,  water,  fire,   sky,    directions, Devas,  Vedas;  indeed  the Sun gives   warmth  to
  this  sphere  (Planet)    ;   that  Sun God is  Brahman,

And a few more like:

All   creatures   are born    of  Surya   and are protected   by  him,    dissolve    in  him –   I   am  Surya   himself.    The divine
  Savitar   is  our eye and He  is  called  the Parvata because He  indicates   Sacred  timings through His Timeperiods and let Him protect our eyes.

In Bhavisya Purana the Sun God is given over whelming importance & methods of His worship are given in this and this chapters.
In this chapter the Trimurthis(Brahma,Vishnu & Mahesh) eulogises the Virata Rupa of Surya.And Surya's worship as "Omkara" is also described.Here Surya is being described as the Supreme Para Brahaman.

At the beginning of Kalpa, Tri Murthis became ictims of �Ahamkaar�
  (Self-image) and when a gigantic form of luminosity appeared on the
  Sky, they were taken aback as to how this huge illumination emerged
  from! As the Great Light approached and dazzled their vision, the
  personification of Surya Deva in a �Virat Rupa� (Collosal Form) got
  materialised, the Tri Murthis and Devaganas greeted it again and again
  with veneration. Lord Brahma eulogized the Virat Swarupa of Surya Deva
  as follows:
Namastey Deva Devesha Sahasra kiranojjvala, Loka Deepa Namastestu Namastey Konavallabha/ Bhaskaraaya Namo nityam Khakholkaya Namo Namah,
  Vishnavey Kaalachakraaya Somaayaamita tejasey/ Namastey Pancha
  Kaalaaya Indraaya Vasuretasey, Khagaaya Lokanathaaya Ekachakra
  rathaayacha/ Jadvitaya Devaaya Shivaayaamita tejasey, Tamoghnaaya
  Surupaaya tejasaam nidhaye namh/ Arthaya Kamarupaaya Dharmaayaamita
  tejasey, Mokshaaya Moksha rupaaya Suryaaya Namo Namah/ Krodhalobha
  viheenaaya lokaanaam sthith hetavey, Shubhaya Shubharupaaya
  Shubhadaaya Shubhhaatmaney/ Shantaaya Shantarupaaya Shanatayesmaasu
  vai namah, Namastey Brahmarupaaya Braahmanaaya namo namah/ Brahma
  DevaayaBrahmarupaya Brahmaney Paramaatmaney, Brahmanye cha prasaadam
  cha vai kuru Deva Jatpatey/
(Deva Devesha! Loka Deepa! Kona Vallabha! You are the source of
  phenominal illumination to the whole World; You are all the Deities
  like Bhaskara, Vishnu, Kaalachakra, Soma, Kaala, Indra, Vasu, Agni,
  Khaga, Lokanatha rolled in one as the Ekachakri, bestowing
  propitiousness and positiveness all over; You are the Embodiment of
  Dharma, Artha, Kama and Moksha; You are the Personification of
  Tranquility and Peace, devoid of anger, greed, jealousy and
  partiality; You are the Parabrahma Himself!)

Similarly Vishnu & Shiva also follow  praises Surya with  stutis .Trimurti's worship of Surya Deva also included in that chapter.
Comment: Sauras do not use either the Surya Upanishad or the Bhavishya Purana.  What they use is the Saura Agamas.
Comment: @KeshavSrinivasan So what?There must be Texts that form the basis of worshipping Surya as the Supreme Deity.Which are those?Just like Devi Bhagawatam tells us Devi is supreme ,Vishnu Shiva Puranas do the same for the respective Deities etc.But may be i should have posted a separate Q&A with these infos.
Comment: "There must be Texts that form the basis of worshipping Surya as the Supreme Deity.Which are those?"  Those are the Saura Agamas.
Comment: @KeshavSrinivasan there is also a Saura Puraana.

Does the sect Sauram still exist?


What visa does a Filipino need to visit New Zealand for two weeks from Australia?

Question: I have an Australian tourist visa 9 months and am a Filipino citizen. I am currently in Australia and wish to travel to New Zealand for two weeks.
What visa would I need and best way to apply?
Answer: Courtesy SkyTeam:

New Zealand - Destination Passport
Passport required.
Document validity rules:
Passports and other documents accepted for entry issued to nationals
  of Philippines must be valid for a minimum of 1 month beyond the
  period of intended stay. The following regulations apply to
  children/minors:
Minors entering New Zealand may be included in the passport of the
  parent, who is traveling with them. Important:
Passengers with an APEC Business Travel Card must travel with a
  passport. The passport number and nationality must match those stated
  on the card.
Type: Notice New Zealand - Destination Visa
Visa required.
The following are exempt from holding a visa:
Passengers with an APEC Business Travel Card valid for travel to "NZL"
  if traveling on business for a maximum stay of 3 months. The card is
  valid for the countries listed on the back of the card. Visa issuance:
New Zealand issues both printed visa labels and label-less visas.
  Printed visa labels are inserted into a passport or travel document.
  There is no physical evidence of a label-less visa in the passport or
  travel document but all passengers must carry a printed visa approval
  letter that confirms the details of their visa. The New Zealand visa
  record is held in Immigration New Zealand's systems and authority to
  board should be verified using the NZ APP system. Airlines not
  connected to NZ APP that carry a passenger on an earlier leg of their
  journey, can use TIETACNZ, or view the printed visa label or the visa
  approval letter to identify any travel conditions, such as whether the
  person is exempt from the requirement to hold a return/onward ticket.
  Additional information:
Visitors are required to hold proof of sufficient funds to cover their
  stay. The amount of funds needed is NZD 1,000.- per person per month
  of stay or NZD 400.- if accommodation has been prepaid. Evidence of
  funds may be in the form of cash, traveler's cheques, bank drafts,
  letters of credit or the following credit cards: Diners Club, American
  Express, Bankcard, Mastercard and Visa. If Visa label contains "Funds
  Waived", evidence of sufficient funds is not required.
Visitors are required to hold documents for their next destination.
Important:
Visitors holding a visa that specifies the requirement to hold an
  outward ticket must hold return/onward tickets.
Exempt are holders of authorization issued by New Zealand?s
  immigration authorities waiving the return ticket requirement.

The easiets way to apply may be online.


How do you organize your set list for a gig?

Question: To performers out there: What principles/guidelines/methods do you use when you make the set-list for a gig? How do you decide what order to play the songs, when to talk, how to deal with transitions between songs etc.?
Comment: I'd think that this will depend on the context of the gig; specifying in more detail what your situation is would help to focus the answers.
Comment: As per the above comment, you'd really need to tell us more about what type of music and what type of gigs your playing.
Answer: First, I mostly play folk, for very small groups. I'm sure a lot will change with your audience and style of music.
The first thing to do is look at your audience. If I'm playing for an audience in a nursing home, I'll choose more older and classic tunes than if I'm playing for a group of kids. If I'm playing background music, I'll choose very different pacing than if I'm playing at a concert where the music is the focus everyone's attention. In either case, I'll make sure to choose tunes and songs with a variety of speeds and moods to keep the audience's interest.
Do you want to give your audience jarring moments, where you switch styles or tempos abruptly, and make everyone notice, or do you want to be subtle, and make changes so smoothly that the audience doesn't even know your'e changing things up to keep their interest? This sort of question will affect your set list, your song order, and basically everything about your performance.
Once you know your audience, think about what you want them to do. As a performer, your goal is usually to get a certain type of reaction from your audience, to inspire a mood or bring out emotions. For me, I usually start of fast and energetic, and keep the pace up for several songs (7-12 minutes), before bringing out something slower and gentler for a song or two. Basically repeat this pattern for the performance time, until the end, where you need to know whether you want to end hard and fast, or slow and easy. I always start and end on some of my best. If I'm going to play something that's weaker, it comes in the middle, where it'll get less attention. If I was a better musician, I might not have to deal with that problem.
As far as speaking goes, minimize it unless it is part of the performance. Don't just talk to fill a void, or to hear your own voice unless you can make it sound good. When you are speaking, treat it as much a part of the performance as the music. In other words, practice it, and get people's feedback on whether it's fun and interesting or makes them want to crawl under their seats. A bad speaker can really bring down a good musical performance.
Comment: One thing about introducing a song is, vary it from performance to performance.  If you develop a group of fans, they expect to hear songs repeated but not so much the intros, which should at least **seem** more impromptu.
Answer: The better bands I work with will have a list of all the songs - numbered. (That's one of the reasons they're called numbers !) The bandleader/ frontman will decide what gets played judging by the audience. If they are ready to dance, or just want to sit and chat, or even want to sit and listen. Numbers are often called out in twos or threes, so we know what's coming a little in advance. Sometimes, the vocalist will just sign the next key, and we'll segue into whatever that song may be - often not a clue, but the drums dictate the tempo/rhythm, so off it goes, with the rhythm section modulating to the new key.
Others will have a list, and work through it studiously. This then gets messed about when the front guy realises that the next couple of songs are too fast for the now flagging dancers, etc.
The not-so-good ones finish a number, look at each other, and have a little chat. Not so good.
Some will have numbers grouped in 3s or 4s, so everyone knows the next 10-12 mins, but that can be truncated by the frontman, if needed.
The good bandleaders will have some repartee with the audience, tell an occasional joke, or something interesting about the next number,or take the mick out of a band member, which can give time to change instrument settings, etc.
And if a number starts off with a capella vocals, make sure the previous song is in the same key. Need I elaborate ?
One band I really enjoy working with has 3 numbers on the go, and as they come to an end, all segued, we're told what the next 3 are, and so on, the drummer continuing to play and setting the next tempo.Thus, through the entire set, there's no time when the band isn't playing. It keeps the floor full, and us rather busy, but it works well.
Comment: "The not-so-good ones finish a number, look at each other, and have a little chat. Not so good." <- just wanted to say that's not really an indication of a poor band, just less organised one.
Comment: @user2808054 - believe me, I've worked with them !!!
Answer: Depends on the event.  I'm in a Celtic folkadelic band so let's take for an example a bar gig on St. Patrick's Day.
First tune is a modal tune that any of the musicians can drop in or drop out of with any settings that they choose.  That's the soundcheck tune that we use to tweak the settings for the monitors that the sound engineer has set up for us and that the engineer can use to tweak the FOH (Front of House) sound.  Ideally we'd soundcheck before the doors open but in bars that never happens.
St Patrick's Day is very much an audience participation day so we'll alternate tunes and songs to keep their attention.  At least half the songs will be stuff that they've heard before, Irish pub songs. I'll teach the chorus to the songs and say a bit about each one.  Typically a song is medleyed with an instrumental tune.  Each medley is 5-10 minutes long.
Very often there will be Irish stepdancers at a gig like this so we'll have coordinated with them what tunes and tempos they want to dance to.
Typically we would play two sets of 60-90 minutes long.  The first set will build to a rouser for the final tune of the set and then we'll take a 15 minute break where we'll have a drink and mingle with the audience.  After the break the second set will start with some tune we can all stretch out with and then go back to the song-tune-song format.  The second-last song will be the hottest tune of the night and the last tune will be something gentle to chill the audience out.
We talk a fair bit between tunes. Nothing much longer than a minute but it's really important to engage the audience and remind them that we're not just the bar's Pandora tune feed. Speaking is part of the performance and fortunately the fiddler and I are really good at it. We frequently get the audience to toast and remind them to tip their servers.  Bar owners and staff like this.
In general a hot song or tune is followed by a gentler tune.  But towards the end of the night we may start topping each song/tune with an even more energetic song/tune.
The entire setlist can change based on the circumstances.  We stay flexible and responsive to the venue's needs.
The setlist itself is typically written up on the computer in letters big enough so that you can read the printed page on stage when you're standing and the setlist is on the floor. Each entry has the key, type of tune, title and any arrangement cues (order of solos, etc.)
If I've just learned a new song, I'll tape cues to the lyrics on the top side of my guitar so I can read them before each verse when I'm standing at the mic.
A concert gig works pretty much the same way. There's often not a break because we're only playing for 90 minutes in the first place. The choice of tunes and songs will be different, more subtle, more diverse.
Answer: I would start with lively and bright tempo songs then introduce a slower tune. Usually a cover band will play three sets with twelve songs each in my experience. We put in one or two slower songs in each set. People want energy and dance in a top 40 cover band so I would play songs that are popular and energetic.  In the middle of the perfomance is where the more danceable songs are played because more people are ready to dance after some drinking.
The lead singer will greet the audience after the first two songs and transition to a slower tempo from the first two of the first set.  If there is a intrument change between songs, the singer will once again speak to the audience.
It really helps to have a lead singer with a lot of personality to make the performance fun for audience and band.
Answer: As we use a prerecorded drum track in Cubase for each track, we plan each gig well in advance, knowing exactly what will happen to the microsecond - this has some upsides, in that we can work specific tunes in to fit any set length etc., but means we don't have so much flexibility on the day (we can reorder them on the fly, but it's a bit of extra messing about that we don't want to have to do)
So we begin with some nice crowd pleasers, high energy and increasing in energy.
Then we take things down a wee bit in the middle.
And we like to end on a high - followed by an even higher encore!
The specifics depend on what kind of gig we are playing, whether it is metal, electronic, or even acoustic/folk; and because we have pyro and other entertainments, we make sure the crowd is involved at least every second song.
In terms of tuning acoustics, we have one song we use in soundcheck, as we know exactly how the acoustics should work. For gigs where we have to use the venue's sound guy, we make sure he understands what we need. Where we use our own soundguy, this song lets him see venue requirements, and the first song is his 'tuning' number to dial in the acoustuc response.
Answer: In my limited experience with my jazz band, I open and close with our best tunes, and then alternate styles (swing/Latin/rock, fast/slow, different soloists etc.) for the rest of them.
In another band, I've noticed that the band leader usually properly introduces us after the first song (or two if the first is a soundcheck). As well as the set list, we also have a list of spares if we don't manage to fill the time. However, in general, the set list is disregarded after about 10 minutes into the performance.
Comment: re "However, in general, the set list is disregarded after about 10 minutes into the performance." - lol! I want to play in your band! How do you then decide the tunes? Just from memory or from the list, but different order ?
Comment: @user2808054 Generally from the list, but sometimes the band leader makes us quickly root through our folders for something (or we do a piece that pretty much everyone knows).
Comment: Sounds nice and relaxed :-) One thing many people I play with have noticed is how hard it is pull ideas for what to play out of your head 'on the spot', particularly at jam sessions. There you are, all set up .. ok what we gonna play.. everyone's mind goes blank. Sounds like yo'uve struck a nice balance of freedom & being organised there.
Answer: I play in a band that does covers, as do many other bands around here. BUT, we also choose tunes that the audience will go... "Hey, I know that one. Why don't other bands play that one as well?" I was told by a more experienced player, that the best way to arrange each set is in a W shape: start with a lively, but your biggest one of the set, and maybe a few others that get the crowd going. THEN go to a slower, "romantic" one so the love-birds can swing and sway. Build back up to maybe your kickin-est tune. Throw in another slower one and finish on a high note, so they want to hear more after the break. This seems to work for us... we get lots of gigs and good crowds that last until after midnight. But, remember to prepare, prepare, prepare and have the set list intact, you can throw in an improvised one if needs be, but have the complete list at hand for everyone.
Answer: Over the years I have performed at hundreds of events and understand how important a set list is. Here are a few tips I've learnt when writing them.
• Always include a few songs the audience might know.
• Always have a mixture of tempos, slow, medium and fast.
• A mixture of rhythms.
• Alternate the keys, don't have three songs in D minor in a row.
• If you have a soloist e.g saxophonist, why note bring them on after a few songs to change the vibe, audiences love surprises.
• Make sure the band members know the songs inside out.
• start with a strong song and most importantly end with a strong song.
• Always leave the audience wanting more :) walk straight off stage, wait for encore :)
• Add notes to the set list (Drum intro etc)
Answer: The bands I play with normally have a 15 min break so the set becomes two halves.
A band member will write a set either beforehand or on the night while the gear is being set up, based on the likely age group and any other hints.. "they look like they like their rock" vs "I think Led Zeppelin might cause an ambulance call-out".
Either way there's a list to work from, often one person shouts the next song and off we go.
How to decide tunes : Depends on the gig - a lot !
A private (eg birthday) party or wedding : The task is to get people moving on the dance floor and loving it, so..
Start with something fun but not blistering. People will want to chat as they arrive, because they may not have seen each ofher for a while etc. So nothing too loud, but not durge so they can bop if they like.
Build a little for the first half, and play maybe one ofr two good groovy songs with a bit of punch so they know what's coming in the second half. This wakes people up a bit :-)
Second half: Start where you left off - mid-weight songs nuce and punch, and raise the bar a little avery few songs so that by maybe the 6th or 7th song in the second half, things are getting quite raunchy.
Sometimes we then bring it back a little and play something gentler more akin to the first set, then build again.
Finally, end with 4 or 5 absolute blasters. If we have to stop (eg the venue had a time limit) but people still want more, then we sometimes play a moody or slower tune like pink floyd or similar to bring the mood down. In the middle of a party set, that would be a party killer, but at the end something like that is just what you want.
For pub gigs:
Much more free reign here but there's still that general notion of building up.
However, it sometimes works well to start with real stormer to get things moving right from the start.
In a pub, the difference is that the pub would be open anyway even if you weren't there, and the audience is there either to see you or just have a drink- it's not necessarily for a specific event, and they come and go as they please. So the bands I play with in pubs generally do what we please :-)
I guess the notion is that you're not there soleley to entertain the pub clientele- you're there so that everyone in the room has a great time, including the musicians.
Some places we play, the gig might be 4 hours long or more so we split into 3 sets (so 2 breaks). You have to be careful here because if you wear people out by the second break, they see that as a sign that the party's waining and it's time to go, so the middle set is often a mixture of more energetic and softer tunes (eg a nice smooth grove) so the band and the party members have enough in the pocket for the final set.
One thing I have found :
I have depped a couple of times with a band which went right through a set with hardly a pause between tunes. This is great and a sign of fab organisation, but I wonder whether it gave the party a rushed feeling for both musicans and revellers. Not only that but there was zero time to stop and have a drink of water etc. It's not always the best thing to nail the tunes to each other like that. Maybe 3 in a row works best.
Comment: @user2808054-I worked with a bigband for 20+yrs,and the sets invariably went straight through.The bandleader did about 10/12 mins in one tempo, without stopping - the drums changed the tempo/beat - sometimes introducing the next set - went into the next 4 or 5 numbers. When he felt the dancers needed a rest, he'd change to some 'bum-clutchers',or something to just listen to, and vice versa. Every gig worked, amazingly!He would shout out the appropriate numbers as the last one of a set was closing, so we had 10-15 secs to find the next lot in the pad.With 600 numbers available,it was quite fun.
Comment: Fair nuf ! maybe it's as much about how it's done as what is presented ? It;as quite a skill to read the crowd like that :-)


Krav Maga & TKD strikes similar

Question: Are kicking & punches similar if not the same for TKD as they are for Krav Maga?
Comment: Someone once said: 'A kick is just a kick and a punch is just a punch' what is different between all of those styles is their usage for the purpose ex competition or self defense. I doubt that in Tkd you are practicing kicks to the groin... those kicks and punches are where the difference is. The technique of the punch or kick might bring up even religious discussions ... which one is the right way to execute. My 2 cents
Answer: There's huge variety in what passes for TKD - it's evolved (degraded?) from (predominantly Shotokan) karate to myriad current forms including the WTF Olympic sport, and ITF and its dubious sine wave, in just 70 years, while being spread to hundreds of countries by instructors of all ability levels with all manner of influences.  There are many significant sized organisations - some with quite consistent, distinctive technique and others where seemingly anything goes.
Some styles barely punch at all, while others give it as much or more focus than kicking.  That said, few TKD styles that don't explicitly claim a boxing influence emphasise hooks or upper-cut punches, nor is punching with a vertical fist common.  Upset (punches into the stomach) are taught in some schools, but not utilised much in combat.  These all seem common in the (relatively little) Krav Maga I've seen.
As for kicks, my impression is that many Krav Maga instructors prefer to focus on low kicks and knees, quite unlike the majority of TKD schools where kicking is predominantly above the belt.  The Krag Maga instructors I've seen kick higher aren't doing anything outside the range of techniques that'd pass for some manner of TKD, but they wouldn't be mistaken for a high-level WTF or ITF practitioner, for which the stylistic elements are pretty obvious.
Comment: In competitive TKD kicks are above the belt for safety reasons (in most cases). In classes (and indeed many of the patterns/forms) kicks to the lower section are taught. That highlights the difference between a self defence system and a complete art with competitive elements. In a school that focuses heavily on the competitions you see very little practical self defence (low kicking/close range punching).
Comment: @Collett89: "safety reasons"?  Systems such as kyokushin, kickboxing, muay thai all allow full-force low kicks with few serious injuries and are competition focused, so I think "safety reasons" is just a rationalisation of the status quo.  I only know ITF TKD patterns - they have very, very few low kicks: a few low side kicks amongst the black belt patterns, but off the top of my head I can't think of a single low turning/roundhouse kick, which is the most common low kick in most systems that actually use full-contact low kicks competitively.  Which patterns were you thinking of?
Comment: Side - Kwang~Gae/Po~Eun, Waving - Yoo-Sin, Sweeping - Sam Il
Again for pattern competition most of what used to be middle section now tend to be high section as well. My point was more that more rounded or self defence orientated classes will rightly be teaching low section kicks.

On the safety reasons - In some senses you are right. The rule set has been tweaked to encourage high section/jumping/spinning kicks more than actually preventing leg injuries from low kicks - Though I have been out of training for months because of an accidental low kick in competition.
Comment: @Collett89 waving's defensive anyway, and sweeps are a different kettle of fish.  There are a couple low twisting kicks too (e.g. Eui-am).  Anyway, you can't really learn to use low kicks well, to set them up, learn timing and defences people might employ, avoid leaving yourself vulnerable when kicking low, follow up techniques, nor defend against them, without using them during sparring.  Still, every martial art either neglects many things or ends up producing people who're mediocre at everything.  Most all TKD schools accept weakness in this area and focus elsewhere.  Hope you recover soon.

Krav Maga & TKD strikes similar


Exit edit mode from a control hosted in a cell

Question: I have a custom datagridviewcolumn, a custom control hosted in a cell. I want to programmatically exit edit mode and validate the current value in the cell (this value is correct). I have checked below ways but without success:
this.datagridview.currentCell.datagridview.endEdit()
this.EditingControlDataGridView.endEdit()
this.datagridview.endEdit();

also by forcing the current cell to change:
this.datagridview.currentCell = this.datagridview.Rows[rowIndex].Cells[columnIndex]

I need to programmatically force the commit of the pending value in the cell because for example, there are cases that I need to delete a row of datagridview but as cell (in the same row being deleted) is in edit mode, I cannot do it if I do not commit changes for the cell and exit edit mode before.
Also, I have similar strange behaviour when I want to exit edit mode but, in this case, discarding the changes in the cell: depending on the state of my application, sometimes doing this.datagridview.CancelEdit() works and sometimes not.
Using C#, .NET Framework 4.0, WinForms.
Answer: Add this code
Application.DoEvents();

to force the event to fire:


Do my partner and son need an SSN to be dependents on my taxes?

Question: My wife and son do not yet have their SSNs. My wife is a citizen of the UK and my son (3 yrs old in August) was born in the UK. I'm a U.S. citizen. Why they do not yet have their SSNs is a discussion for another day.
Comment: Are all three of you living in the US, or are you one of those expats who still have to do US taxes?
Comment: Note that, if your son doesn't have an SSN by the tax filing deadline, you cannot claim the $2000 child tax credit for him, and can only claim the $500 tax credit for other dependents.
Answer: You are required to supply a Social Security Number (SSN) when claiming someone as a dependent on your tax return. Or, use an Individual Taxpayer Identification Number (ITIN) if they are not eligible for an SSN.
In the event of a time crunch (tax deadline approaching) you have two options:

Go ahead and file (and not claim them), then later file an amended return with the SSN/ITIN information.
Or, you can file for an extension if you expect to have their SSN/ITIN by then.

The IRS site has an FAQ question related to this here, and there is some more ITIN information.
Comment: Though note that filing for an extension does not extend the date due for your tax payment, if you owe.  You're still expected to pay what you would owe on time.  You would probably need to still run the numbers to see what you *should* owe, and pay that.  If your calculations show that you are getting a refund, then that's great, and no penalty for not paying.  But, if you owe, you need to pay what you expect to owe.  If you don't, you'll get hit with late payment penalties.  See https://www.irs.gov/newsroom/what-you-should-know-if-you-need-more-time-to-file-your-taxes for details.
Answer: The accepted answer is fine for situations where a dependent does not yet have an SSN, but may not be appropriate for when your spouse does not yet have an SSN.
If your spouse is not yet eligible or will not become eligible to get an SSN, you apply for an ITIN when you file your taxes, not before or after filing your tax return.
Fill out your tax return just as you would if they had an SSN/ITIN, but you'll leave their SSN field blank and you'll attach Form W7 to your return, which is the application for ITIN. This means mailing in a paper return.
Comment: From form W7: "Don't submit this form if you have, or are eligible to get, a U.S. social security number (SSN)"
Comment: @trognanders  I meant not yet eligible but that was worded poorly, edited for clarity, thanks!
Comment: "If your spouse is not yet eligible or will not become eligible to get an SSN, you apply for an ITIN when you file your taxes, not before or after filing your tax return." You could still apply for an ITIN for your spouse after filing your tax return -- you can file your tax return as Married Filing Separately, and then amend it to Married Filing Jointly later, applying for the ITIN with the amendment.
Comment: @user102008 That's appropriate only if the spouse is a non-resident alien. Might be the case here, since OP didn't specify. In any case, you apply for an ITIN when you file your tax return, if your spouse files MFS and you do not file until the amendment, then you still apply when you file.


Technical term for the displaying of 'bad' traits to seem more likeable

Question: What is the technical name for the public display of personal traits that are unproductive or unhealthy as an attempt to make oneself seem more likeable or relatable? (e.g procrastination)
Comment: I like the question. A non-technical "term" might be "trying to fit in" or even "pandering".
Answer: This may not fit exactly the scenario described, but some form of strategic affect display or 'appraisal theory', these relate to social theories of (& displays of) emotion, as oppose personality traits as such, but may be relevant nonetheless.
So for example, you might want to come across as being more aggressive & assertive, or alternately more compassionate & caring, in any given scenario, because you feel that is the appropriate thing to do, or you may gain some advantage from that - even though you may feel otherwise indifferent about whatever it is.
Having said that, the way the question is phrased - whether something is 'productive' or 'unproductive' in a social sense, as oppose to a personal level, is open to interpretation, i.e. if it makes you more 'likeable' then it is socially productive (at least in the short term), regardless of whether it it something that is generally regarded as being a negative trait.
Hope that's relevant.
Answer: There is a related concept to this in evolutionary biology called the Handicap Principle or Zahavi Principle [1]. It originally tried to explain why certain species evolved traits that are clearly not adaptive, but seemed to be favoured by sexual selection. For instance, the colourful plumage of the male peacock makes the male a target for predation, but may signal superior fitness to females. The logic behind is could be that the male is showing off that he can afford these non-adaptive nornaments and still get away with it. The kind of behaviour that you are describing may serve a similar purpose.
[1] Zahavi, Amotz (1975). "Mate selection—a selection for a handicap". Journal of Theoretical Biology 53 (1): 205–214. doi:10.1016/0022-5193(75)90111-3


Daily List View in SharePoint?

Question: I am developing a Daily list view ('Todays Support List') that displays support coverage for my company. Certain people are on-call for certain periods of time (days, or weeks)
I need to have a list that displays any events that are occuring on a particular day (today), which will show people who is on-call for that day.
The logic I have developed bases it's calculation on the begin and end date. If the begin date is later than yesterday, and before tomorrow, it shows in the list view. This works great if the appointment begins today and ends today, but if it begins last week and ends next week, it won't show up at all.
What I wish Sharepoint had built in, is the option to filter events that have [Today] anywhere between the Begin or End date.
I figured I would give it a shot from Sharepoint Designer and create a workflow (as the workflows have more options than the front-end) but I am stumped as to how to go about this. Many ideas have shot into my mind, but none of them have panned out due to ONE missing feature...
Has anyone ever tried to do anything remotely similar to this?
Answer: Create a view for the list and set the filter so that 'begin date' is less than or equal to [Today] And 'end date' is greater than or equal to [Today].

Daily List View in SharePoint?


What evidence do we have today about Christian groups not represented at the first four ecumenical councils?

Question: Were there any Christian groups that existed during the time of the first four ecumenical councils and that were not represented at them either because they chose not to attend or they were not invited or, perhaps, were not even known?
Comment: The realities of communication and travel at the time make it almost certain that some were not invited and others were unable to attend.  I presume the question you are asking is if the organizers of the councils pre-screened the participants (to exclude certain "heresies") or if there were groups who refused to attend for theological reasons.
Comment: @Jon - I think you read this question after it had been edited and therefore didn't get my point. My question was about the EVIDENCE that there were some christian groups that were not in fellowship with those represented in those 4 councils and, therefore, were not represented there by any bishop in those councils - not necessarily because of some theological reasons, just simply because they had no fellowship with them. Those might have well been the reasons that you have pointed out in the beginning of your comment. I am going to re-edit my question to make that clear.
Comment: What would you consider to be a Christian group?  Do you mean was every church represented?
Comment: @James Black - by a "Christian group" I mean a group of Christians gathering together and praying to the Lord, not necessary having an ordained elder (or ordained elders) among them.
Comment: So before 400AD it would be difficult to know the various groups, to state whether one wasn't represented; but I would guess there were by your very broad definition.
Answer: The Nestorians are a good example for the latter two councils. There were a few attendees from the non-Greek east, groups that would later be called Nestorians. There was at least two, Jacob of Nisibis and another bishop named John. The eastern church "officially" accepted Nicea in 410 at the council of Isaac though the Nestorian schism happened soon after. But I guess nobody doubts the existence of the now-called Nestorian church during the time. Some of their writings survive and I'd recommend a reading of Moffett's "Christianity in Asia".
If I recall correctly, it is still too early for the Indian Christians to be associated very closely with the churches later called "Nestorian". Perhaps they are as old as Thomas. One tradition says it was Bartholomew rather than Thomas. It is reported that when Pantaenus went to India in the second century from Egypt he found Christians there. So there is probably an old tradition there, but as far as I know none of theme made it to the ecumenical councils.
The Chinese churches probably did not yet exist at the time of the first councils.
Keep in mind that groups east of the Roman Empire might have had troubles at times traveling to councils in the west. The Romans and Persians were on and off again at war, which would have hurt the communication lines a bit I'm sure, even if travel wasn't completely stopped.
If you go further west, there are traditions of Christianity reaching England in the second century, though as far as I know it didn't really thrive till much later (but I could be wrong on that). But if there are groups that far west, it is less likely that they would have made it to an ecumenical council.
We know the Marcionites existed, even after the death of Marcion. As far as I know, they had no presence at the councils and none of their writings survive.
Some lump them the Marcionites in with the Christian gnostics (and not all gnostics would have attached themselves to Christianity), but it might just be best to say there were a number of different types of gnostic groups. We have evidence of various gnostic groups because of polemics against them by the early fathers. If you haven't read Irenaeus, you can see a variety of gnostic groups attacked there. Since the discoveries of the Nag Hammadi documents we also have evidence of gnostics in their own words. You can also see some material on the gnostics in the early Christian historians.
There are also the Ebionites, who were a group of law-following Christians that some would say are akin to what people think of when they think "Judaizer". They were still around to a certain degree during the councils but as far as I know did not attend and no writings survive.
The Arians were around during the councils but they attended...and were ultimately condemned. So they don't really fit your question, but I figured I would mention them anyway.
So if you want to read for yourself from the groups that were eventually considered heretics by the orthodox, you are going to have trouble finding primary source texts to read. Most of what we have are from their opponents, which we can't assume always portray their opponents fairly, even if some (like myself) think they were right in deeming the ideas unorthodox (well...at least I think they were mostly right)
Comment: WOW!!! Thank you very much for this overview!
Comment: Glad I could help.
Answer: This may not exactly answer your question, but perhaps the most significant presence at the first few councils which was eventually thrown out was the Nestorian church.
We have lots of evidence that they existed, and in fact they were a major influence in the "Church of the East" until about 622 AD. Syria, Persia, and much of the East was Nestorian, prior to the rise of Islam. There is evidence, that there was a significant Nestorian presence in China as late as the 9th Century, as evidenced by a Steele rediscovered in 1625.
What differentiated Nestorians from the Chalcedonian Churches, and why they were basically booted out of the councils was their understanding of Christology. Unlike Egypt which emphasized the Divine Nature of Christ, almost the exlcusion of his human side, The Nestorians went in the other direction - emphasizing his humanity to the point where they claimed that Jesus had two completely separate natures - as if he were what we today would call schizophrenic. In some later incarnations, the idea was even put forth that Jesus and the Christ were two distinct things, with the Christ occasionally appearing with in Jesus.
In the end, however, Islam first co-opted, then supplanted Nestorianism pretty much everywhere it went.
Comment: That's why I said it may not exactly answer the question, bc they were present, although as a result of the council they were condemned. ...
Comment: Truth be told, this will be a very difficult question to answer bc the first few councils were the best attempt to get all "Christians" represented. Anybody who wasn't contacted would have been total unknowns at the time.
Comment: Wait a moment, but wasn't Nestorius' teachings condemned as heretical in the First Council of Ephesus in 431?
Comment: I am quite puzzled by the claim made by Audio Sancto on the regard of Thomas' evangelizing Americas. I wonder if the source he has provided is a credible one. I really want to read that book.
Answer: There were probably some groups in eastern Asia, like India and China. If I recall correctly, there are the Jesus Sutras which were finished around 640 CE. There are also those like Bardaisan(sp?) who lived around the time of one of the councils but were farther east.
Answer: Yes: the Apostle Thomas evangelized a significant part of the globe, including north and south America and Asia.  A summary, drawn principally from the writings of Cornelius a Lapide and Dr. Warren Carroll -- who cite that the Fathers and Doctors of the Church teach that the Gospel was preached literally to the whole world before the death of the last Apostle --  is recounted in this sermon/homily on St. Thomas the Apostle.  I don't think many/any of these evangelized people attended any of the first four Councils.
UPDATE: For those down-voting this answer solely because I'm citing the Apostle Thomas' evangelization of north and south America, here's a link for you: http://is.gd/yAnaJg -- and notice that the Apostle Bartholomew is recorded to have been with him.  More links to come as I find them.  If I have to scan printed texts and link to those I will.
Comment: Wait a sec, North and South America?
Comment: Yes. I don't have the exact citations handy but they are recorded in the writings of Cornelius a Lapide.  In the sermon I linked above the priest reads a lot of sections of the writings I'm generally citing here.
Comment: There is historical evidence that Thomas was in India in 52 AD, but not that he ever met the Indians.  You'd have to go to a Mormon text to find that. And, I know you're not answering from a Mormon perpective.
Comment: Since I'm getting voted down on this answer I'm going to have to dig into the source documents cited above and come back with more details on this.  To the people voting this answer down: are you doing so because you don't believe that the Apostle Thomas evangelized north and south America?
Comment: @AudioSancto Yes.  If you can crediby cite that, I'll rescind my downvote and turn it into a upvte and maybe even throw in a bounty :)  Alternatively, if you cant cite it, but restrict Thomas's evangelistic efforts to India, then I 'll also remove the downvote.  As it is, the answer makes a bold claim (that Jews knew of the New World in the 1st Century BC) that I don't think is accurate.
Comment: It's an equally bold claim to say that certain Jews of the first century AD could speak in their native language and be understood by speakers of many diverse tongues... but that is recorded in the Bible.  I will look up the historical claims to back what I said with regard to north and south America.  As for Thomas evangelizing in India: he died there, and I don't think it was a non-working vacation.  :-) The Wikipedia link: http://en.wikipedia.org/wiki/Thomas_the_Apostle#Thomas_and_India
Comment: :)  True, Pentecost was a miracle.  Still, I've never seen any evidence for Christianity in the Americas prior to European conquest that I thought held any water. (Again, Mormons really believe this, but even their archeologists are a bit skeptical of the claim.)
Comment: "Again, Mormons really believe this..."  There is a phrase I'm trying to find about a blind squirrel and an acorn... how does that go?  :-)
Comment: let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/2380/discussion-between-affable-geek-and-audio-sancto)
Comment: @Audio Sancto - How can I read that book that you gave us the link to? I can only see the cover and the title, but how can I get to its text?
Comment: Perhaps the short link isn't working: here's the longer one: http://books.google.com/books?id=4XsoAAAAYAAJ&pg=PA3 -- I was able to download it in PDF format as well and can post that online for you in that format if it would help.  It's the January 1899 editions of the America Ecclesiastical Review, btw.


Pair two Bluetooth devices simultaneously

Question: I am building an app for an Android tablet that will control an Arduino microcontroller board (paired via bluetooth). However, the tablet will also be paired via Bluetooth with my Android phone to share the phone's internet connection. Can I pair the devices this way simultaneously?
Comment: Which profile is being used to control the Arduino? RFCOMM?
Comment: I'm not sure - this is in the beginning stages of my development. Here is the module I was thinking of using - it supports BCSP, DUN, LAN, GAP SDP, RFCOMM, and L2CAP. http://www.sparkfun.com/products/158
Answer: AFAIK, bluetooth connections can occur simultaneously as long as their operational bounds do not overlap. In other words, you cannot connect two bluetooth headsets at the same time, but you can connect a bluetooth keyboard and bluetooth mouse to the same device at the same time (I personally have tested this last scenario, and it works!)
So in your case, I assume the steps you would take would include making sure that the two communication streams don't require any of the same functionality, which sounds as if it would be possible, since one is strictly for internet availability. If you connect both and they won't pair with the device simultaneously, you probably won't be able to. But if they register as different types of devices (under different bluetooth "profiles", for example) you may be in luck!
Sorry there's nothing definitive. The bottom line here may be trial and error. If they don't work initially, you may be able to set up the Arduino to register under a different "profile" when it connects to the tablet, so as not to interfere with the internet connection coming from the phone.
Comment: Actually the wi-fi tether option might work. I used the FoxFi app, and its wi-fi hotspot mode works great. So I might only need to connect through Bluetooth for Arduino. Thanks!
Comment: Or you could eliminate your problems by using wi-fi tether to share your phone's internet connection and then using the bluetooth exclusively for your Arduino.
Comment: The only problem is wi-fi tether requires (a) a tethering plan, which I am not going to pay for or (b) a rooted phone, which I am not going to do right after I get a new phone (I have a rooted phone now, but I am going to be upgrading to a 4G phone soon), so bluetooth tethering is my only option. Thanks for the answer.
Comment: of course! I root my phone primarily for wi-fi tethering, but I completely understand not wanting to go at a new phone right away :P hope the dual-BT works for you!
Comment: Well, in Android 4.1, the wi-fi hotspot ability was removed so I'm back to needing bluetooth
Answer: Some devices have a concurrent connection limit due to power/resource constraints (usually cheap feature phones like my old SEMC W880i only allowed up to 5 connections at a time). Also some apps like bluetooth file transfer can be set up to limit max simultaneous connections. Generally, Android's bluetooth implementation does not force such a limit though. I've been able to use bluetooth keyboard, mouse, game controller and a headset the same time. Bluetooth internet sharing capability depends on your device though, not every handset/tablet maker implements this (most aftermarket roms support this however).