Putting items in multiple places in a menu

Question: I'm trying to set up a menu layout which has two links to <code>/biblio</code>; one under "Researchers", and one under "Staff". This is for convenience, as if you are looking under "Staff", the "Researchers" submenu is closed, and the "Staff" submenu isn't available to unregistered users. The problem I'm running into is that although I can have two links in different parts of the menu, when looking at the page it will always try to open the menu to only one of them. This means that if you are looking under "Staff", and you go to publications, suddenly you're in what seems to be a different location of the site. Any suggestions for how I can fix this?
Comment: Any news on this? I have similar problem where only one submenu expands and I need expanded both.
Answer: You can use the Multiple Node Menu module.
Comment: I think this is the answer, though the use case could possibly also involve http://drupal.org/project/special_menu_items
Comment: Hi! Thanks for the answer, but I'm looking to do something with a non-node path. I can add the items into the menu with no problem; the problem is making it display the right tree to the item...
Answer: The issue here is that you have one page, and two ways of getting to it. Suppose you went straight to /biblio on your site, from a bookmark or something. Drupal would have no idea if you intended to be "Staff" or a "Researcher".
In this situation, you might be able to do something like /staff/biblio and /researchers/biblio, which would be the same page, but this would enable Drupal to tell which version of the menu to display.
An alternative might be to say "if the user is logged in (or has a specific role), assume that he or she has used the 'staff' menu, and if not logged in, assume the 'researchers' menu".
Comment: Part of the problem is that `biblio` is provided by a module, so I can't really control that part of it. I did look at spoofing `hook_menu()` to provide multiple paths, but there are complications with the way the module is programmed. How would you implement your second suggestion (determining based on role)? That would work just fine for my purposes...
Comment: I think this answer is fairly good. You may want to look at using hook_menu_alter to modify the existing modules menu item to be in two places.
Answer: The real problem here is that Core is inconsistent when handling two menu items with the same path. It says one thing in the UI and does another in reality.
The result of which is that the menu link added most recently, the one with the highest menu link ID, is the one whose menu trail will be active.
If that's not your preference, delete your preferred duplicate menu item, and then re-add it.  It will then have the highest ID number so when you land on the internal URL path, that menu item's trail will be active.
I don't believe there's a way to have have multiple trails active at the same time; you have to select one.
Answer: To have two different URLs that point to /biblio should be sufficient to create two path aliases that alias /biblio. The exact path aliases to use depend from the menu URLs.
Comment: I've tried that; the problem is that Drupal's menu system resolves all aliases before storing in the menu table, and after loading the page tries to guess where the item is in the menu by looking backwards...
Answer: The Menu Position module allows you to configure rules that apply to items placed in menus.
You can restrict the active menu item depending on the page, content type, language, taxonomy, or user role.
Using this, you'd create two Menu Position Rules within your menu, at different spots, and use them to set the active menu trail by the user role.


Do the Spartan Ops missions in Halo 4 still continue to be released?

Question: I recall that 343 Studios said they will develop 5 new episodes every week. However as the game was released 2012/2013.
Is the program still running?
Answer: No. I believe they released 10 episodes in all. They should still be playable, but no additional episodes are planned.


Setup domino server to send email to internet for local users with @localdomain.com (-> email move to google)

Question: My domino server hold an application who generate email for users.
Mails file moved to Google.
But email still redirect to local mail file and not google mailfile.
What to change to send email from the domino server to internet for local user?
Answer: Just tell your Domino, that it is not responsible for localdomain.com anymore.
Change your "Global Domain" document and remove that Domain. Then restart the router: From that moment the Domino server will not think anymore that it is responsible for that domain and will route the mails same as every other external mail.
Answer: I use the advice, but had to complete it.
When deleting the "Domain document", emails from the local domain do not route to Internet and stayed in the Mailbox (pending mail).
So I had a smarthost, in the Messaging setting document.
Documentation.
https://www.ibm.com/support/knowledgecenter/en/SSKTMJ_9.0.1/admin/conf_settingupasmarthost_t.html
Thank you very much for the help.


Is there a fundamental interaction responsible for quantum entanglement?

Question: Quantum entanglement seems to share information between particles instantaneously, as well as characteristics of these particles through changes that occur in each particle. If forces transfer energy between one system and another system, then force can be identified as an interaction rather than a force in the classical sense. what is the interaction for quantum entanglement being potentially non-local at very small scales?
Comment: I mentioned this on your other question as well, but just as a reminder, it's not acceptable to remove the content of a question (or answer) with an edit.
Comment: I understand and its been resolved. I'll remind myself to not be so unreasonable about the prescribed method associated with the standards of practice.
Answer: Though the entangled states are non-local in some sense, they are not non-local in the sense of allowing superluminal transfer of information, by the no-communication theorem and others.
There is no force "responsible" for entanglement.
In fact, in quantum mechanics, there is no clear notion of such a thing as "force", although you might derive classical forces such as the force on the plates in the Casimir effect by it. Force is a classical concept, and although we like to speak of "forces" and "force carriers" when talking about gauge theories in QFT, these are the quantized versions of theories which classically had force. Quantumly, "force" is not to be identified with the classical concept, but rather with the general idea of interactions.
Comment: @MarcelKöpke: Some like to call the correlations entanglement produces "superluminal" or "non-local", since they (sometimes) correlate events that do not lie on each others light cones. Whether that is a useful or sensible thing to say is debatable, especially since also non-entangled states (such as the wavefunction of a photon that went through a beam splitter) exhibit such correlations (the reflected part "collapses instantaneously" when the photon is detected to have been transmitted), so it is not a defining feature of entanglement.
Comment: In which sense are they non-local?
Answer: Yes. Any interaction! Entenglement is only a quantum version of correlation. Let supose that you have two $\frac{1}{2}$ spins that interact one to another via magnetic interaction. This interaction can produce an entenglement. But this is not the only one. Some Amount of electrons are entangled in a metal due electrodynamic interaction.
You can produce entenglement by apply measurements to. In the case of two spins, the entenglement cam be produce by measuring the total angular momentum of the system. In this case, the correlation is made because if you know the state of one particle, this yields the knowledge of the other spin. In classical mechanics this is trivial because if you know the state of the whole system you can determine the state of the subsystems.
In quantum mechanics this is not always true. The total angular momentum $J^2$ don't commute with any projection of the spins $\vec{S}^{(1)}$ and $\vec{S}^{(2)}$. This imply that we can't divide the state of the system in the state of the parts when we have peculiar states (entangled states). Only the sum of the projections commute with the total angular momentum. In this case, the entangled states are $|1,0\rangle$ and $|0,0\rangle$ and the non-entangled states are $|1,-1\rangle$ and $|1,+1\rangle$, with has a trivial correlation as the classical ones.
We have:
$$
|0,0\rangle =\frac{|+,-\rangle -|-,+\rangle}{\sqrt 2}
$$
$$
|1,0\rangle =\frac{|+,-\rangle + |-,+\rangle}{\sqrt 2}
$$
$$
|1,-1\rangle =|-,-\rangle
$$
$$
|1,+1\rangle =|+,+\rangle
$$
Note that the non-trivial states (entangled) are superpositions of the $Sz^{(1)}$ and $Sz^{(2)}$ eigenvectors. This superposition tells us that we can't define either the system are in $|+,-\rangle$ or in $|-,+\rangle$. We can only determine the probabilities of this possible measurement.
Now, if you apply some interaction in one spin, the other spin don't feel nothing! For example: if you measure the spin of one particle in the state $|0,0\rangle$, YOU know the spin of the other. Only this. Because the measurement, $J^2$ is not defined anymore and you can define a spin for each particle now. Using the correlation, if you measure +, then the other is -. But nothing actually happens in the other side! A quantum state is only a matemathical object that describe your state of knowledge about the system. And quantum mechanics is not realistc, so this state of knowledge is actually the final word. We don't get any thing "deep" that accounts this features. Quantum mechanics is subjective in this sense.
If we put another observer in the other side, in any way he can determine if you measeure or not by local operations. He needs to act on both spins for determine if you measure or not. As any other correlation. But a weird one, since is combine with some quantum features. This features is only feelled when we are doing things in both spins. You may find in some self studing that this quantum correlations violate some inequalities obeyed by classical correlations.
Entanglement is only a suitable combination of usual correlation and complementarity principle.


What's the simplest way to detect edits to bound Silverlight controls or a RIA data object?

Question: I want to enable/disable my Save & Cancel button as soon as an edit occurs. I'm using Silverlight 4, WCF RIA services, Entity Framework 4 and the DomainDataSource control. I'm not using the DataForm because my many controls wouldn't fit nicely. Instead I use individual controls (TextBoxes, DropDowns etc.) arranged by category on a TabControl. Still, I'd like to mimic some of the DataForm behavior. It reacts the moment an edit occurs on any control. I've followed the example here but the example reacts to edits on a DataGrid only. I want to react to edits to bound TextBoxes and other controls. Is there any event I could use to detect when an edit has begun? I've searched for events on the underlying DomainContext and the DomainDataSource or related objects, but so far I haven't found what I'm looking for. Any help would be appreciated.
Answer: Not sure if you still need help with this but we Implement the System.ComponentModel.IChangeTracking interface and this does what you are after.
If you need help with this we have it going in our project and I can give you further details.


Where did Tantra originate?

Question: Modern Hinduism is a synthesis of different currents of thoughts. The two main streams are Vedic and Tantrik. Both these streams have many sub-schools. We are more or less aware of the Vedic scriptures and philosophies. But the philosophy, practices of Tantra are relatively shrouded in mystery. But before dealing with these, we need to know the fundamental stuff - like the original home of tantra. My question is where did Tantra originate?
Comment: No problem. Visit [help] articles to get familiar with the site.
Comment: i would say , Indus Valley
Answer: Tantras have all emerged from Lord Shiva and not from a particular region or race of people. And, this is quite easy to prove. Also, the mass of Agamas and Nigamas is what constitutes the Tantras.
In my Guru Gita book, i find the following verse:

Vandeham sacchidAnandam bhedAtitam srimadgurum | Agamo
  nigamashchApi nirvAnashcha tridhAgamah || TasmAdudhritya deveshi
  gurugitA mayoditA | 110

I praise the Guru who is OmkAra, who is of the form of eternal
  knowledge, who is blissful, without attributes and magnificient. O
  Deveshi, Agama, Nigama and NirvAna-- These are the three types of Agamas.
  And, from which i have extracted and told to you, this Guru Gita,
  which is known to be the essence of all of them (Agamas).

Now, the translator quotes from ViswasAra Tantram, the etymologies of the words- Agama and Nigama.
For Agama it is:

Agatah shivavaktrebhyo gatancha girijAsrutau matancha vAsudevasya tasmAdagammuchyate||

That which comes from Shiva's mouth
  (that is spoken by Lord Shiva) goes to GirijA's ears (that is heard by
  Goddess PArvati) and which is approved by Vasudeva (that is Lord
  Vishnu) is called Agama.

So, the Tantras which are spoken by Lord Shiva are called the Agamas and not some books which were written by the Kashmiris. For the Tantrikas, the Tantras are author-less and are AptaVAkya (words of God).
And, for Nigama the Nirukti is:

Nirgatam girijAvaktrAd gatancha girishshrutau matancha vAsudevasya nigamah parikathyate ||

That which has emerged from the mouth of PArvati, goes to Shiva's ears
  and is approved by VAsudeva is Nigama.

NOw, very few Tantras are like that-which are spoken by Mother Goddess, but those which are are known as Nigama. In general Nigama refers to the Veda as well.
In the MahAnirvana Tantram's 1st chapter, Sri Adya also says that Lord Shiva created the Tantras:

Tvaya kritAni tantrAni jivoddhAranahetave || NigamAgamajAtAni bhuktimuktikarAni cha | 1-49

By Thee also have been composed for the good and liberation of men the
  Tantras, a mass of Agamas and Nigamas, which bestow both enjoyment and
  liberation, containing Mantras and Yantras and rules as to the sadhana
  of both Devis and Devas. By Thee, too, have been described many forms
  of Nyasa, such as those called srishti, sthiti (and sanghara)

Further, in KulArnava Tantram, Lord Shiva himself says that the five Amnayas (eastern, western, northern, southern and the higher ones) have all emerged from his five faces.

Mama panchamukhebhyashcha panchAmnayAh samudgatAh | Purvashcha
  pashchimashchaiva dakshinashachottara stathA || UrdhAmnAyashcha
  panchaite mokshamArgAh prakirttita || 3-7

From my five faces emerged the five Amnayas. And these five Amanyas
  are known to be the paths of liberation (MokshamArga)

The link between the five faces and the five Amnayas are as follows:
Name of the face- Name of the Amnaya that emerged from it
SadyojAta -PurvAmnAya (some say-Pashchima), VAmdeva-UttarAmnAya, Aghora- DakshinAmnAya, Tathpurusha- PurvAmnaya (some say Pashichama) IshAna- UrdhAmanya.
And, thereafter, these Tantras are propagated among mankind through the three Guru ParamparAs- Divyaugha (the lineage of Divine Gurus), Siddhaugha (the enlightened lineage like the several Rishis) and MAnavaugha (the lineage of human Gurus)
Comment: Wow what a great answer
Comment: do guru geeta you mentioned is the same great guru geeta i am asking it because your word "my" made confusion in mind that is this my is devotion or something personal. don't take otherwise i am asking normally :)
Comment: Yes the same book i find this verse in.. @Fiercelord And why will i take it otherwise, it's just a normal query :)
Comment: No i thought that it don't hurt your emotion if were as my is used normally as my god my goddess etc so may be it sounds little wiered but its sometimes my usual way of talking :)
Well i will try to be little imformal from next time as you all are my brothers and friends. ;)
Comment: Oh.. ok yes that's just how i said it.. i could have said it differently as well like - In the Guru Gita book, i find this verse.. :D @Fiercelord
Comment: No no its alright @Rickross but thanks for understanding :)

Where did Tantra originate?


Column headers in a table functioning as input boxes for filtering

Question: Is it a good idea to use column headers as input boxes for filtering the results in a table?
Answer: Traditionally, grids are designed in such a way that when the user clicks on the header of a column, the values in the table are sorted in ascending or descending format.
One way to include search/filter in the same header area is to add a search icon at the right corner of the cell as shown below.

When the user clicks/taps on the search icon, you can replace the header label with the  filter textbox which can implement autocomplete feature as shown below.

Hope that helps.
Comment: So it basically it isn't a good idea to implement this because it will confuse the user, right?
Comment: This is one of Oracle's designs. Look at the image in [section 10.4 Enabling Filtering in Tables](http://docs.oracle.com/cd/E17904_01/web.1111/b31973/af_table.htm#autoId21).
Comment: I don't think it's the same at all. In my design, I've **replaced** the header with the search box. In Oracle's design, they just added the search box on top of the header box, which might work for some people but I personally feel is inelegant. Especially because, if you implement autocomplete feature since the results will hide/overlap the header text anyway.
Comment: @Girish - I did not mean to imply the design suggested in the answer was identical to Oracle's - although it is very easy to see why my comment suggests that very thing. I meant to say "This is similar to Oracle's design." The similarity is the location of the input boxes in or near the headers. My apologies for any confusion my first comment may have caused.
Comment: @user1757436 Thanks for taking the time to clarify. Not a lot of people do that these days.
Answer: Column headers are usually used for sorting.
And even if you will replace this functionality with filtering you will have to:

Make sure it's discoverable (i.e., users will know how to filter using headers)
Make sure column headers are still looks like a column headers (not all of your users will need filtering at all)
Think about how to implement sorting (which are lost now, but could be still useful)
Moreover, column headers are used for drag and drop of the columns sometimes, so you'll probably will miss this too.
Answer: I think it would be pretty recognizable by a user, as many applications, like Excel, implement sorting or filtering in table headers.  As the other answers pointed out though, it should give some indication that an action is available there.  Here are a few examples of such:

Highlighting the header field to make it appear clickable.
An up/down arrow if clicking on the header will sort the column.
A drop down or search box that allows the user to filter the results.
An icon that would bring up a dialog box if more advanced filtering is necessary.
Comment: I agree with the suggestion for looking at Excel - particularly if your users are also Excel users. Having worked on products with tables needing much sorting and filtering, a frequent comment we get during testing is "I expect it to work like Excel." [Here is a picture.](http://www.myonlinetraininghub.com/wp-content/uploads/2010/11/Excel-Pivot-Tables-13.png)
Comment: Can this also be applied to web apps? Excel runs on the OS, not in the browser. Don't people expect input boxes, select boxes, ... with a label for filtering somewhere in a sidebar instead in a column header?
Comment: Microsoft's answer to the question is 'Yes. This can be applied to web apps.' as shown by the identical behavior in their Excel web app.(http://blogs.office.com/b/officewebapps/archive/2012/10/22/updated-office-web-apps-now-available-to-all.aspx
). I agree with them. The issue is not web v OS behavior, it is Excel behavior. To frequent Excel users, every data table is an Excel table whether it is in a Windows app or in a browser.
Answer: Another possibility is one input box for the entire table. This is how the search/filter box works in Windows Explorer.
The ability for one input box to work well with an entire table depends on the characteristics of the data in the table. If there is much overlap between values in different columns then one box may be a problem because (1) natural language filter terms will be ambiguous, and (2) non-natural language (e.g., System.FileName:="quarterly report") filter terms require learning a syntax.
Any of the designs provided (so far) in this answer are plausible.
The best design depends on a couple of factors:(1) the precision needed by the users, (2) the amount of data - both rows and columns - in the table.
From what I've seen in usability testing, when users are looking for a small subset of rows then the users sort first and filter second. When the number of rows that meet their filter criteria increases - which means they cannot scan the table and see beginning and end of the rows of interest - then filtering becomes necessary. Filtering is also necessary if the user is extracting data from a larger table and making a smaller table. In that situation, rows that do not match the filter cannot be present regardless of the size of the data.
I mention this because burdening the UI with a filter control per column may not be necessary if filtering is not the primary task in the table.


Why does my 128GB sd card work?

Question: As far as I can find, pies only support 32GB cards, or 64GB with a trick.  I'm using a 128GB card and it worked on the first try without any problems, so what am I misunderstanding?  Is the information I'm finding out of date, or am I asking for some sort of trouble down the line.  I have filled them up all the way with no problems so far.  One thing that might be different about my setup is that I cloned the image off of a 32GB pi.  I am just using the regular partition scheme if that matters.
Comment: @user10489: if you google 'raspberry pi maximum size of sd card' it says loudly (and wrongly!) '32GB'. It refers to https://www.mymemory.co.uk/blog/the-best-memory-cards-for-raspberry-pi/#:~:text=The%20largest%2Dsized%20micro%20SD,32%20GB%20sized%20microSD%20card.
Comment: Please run this command, and post the output in an edit to your question: `lsblk --fs`
Comment: The last thing this site needs is more unsubstantiated (and unreferenced) rumours. You have already invalidated the rumour.
Comment: If you know of a source that says there is a limit on SD card size on a pi, please reference it in your question.  Otherwise, this is just an unsubstantiated false rumor.
Comment: This reminds me of the old (and bad) joke: Math teacher says, "pi r square". Student says, "pie are round - not square!".    But back to the business at hand: This strikes me as a reasonable question given that : a) the "official" documentation is mute on this, and b) the range of speculation out there.  I think there must be a limit, but perhaps on the partition size rather than the card capacity??
Comment: For anyone who's interested in the history of drive size limits, [this 3-part article](http://www.dewassoc.com/kbase/hard_drives/drive_size_barrier_limitations.htm) is the most thorough I've seen. Its shortcoming here is that it's not been updated in nearly 20 years - wow! time flies...
Answer: Raspberry Pi computers with micro SD slots support the SDXC standard, which is cards up to 2TB capacity.
Comment: Im using a 256 gb sd card with no issues. I used the official Pi Imager.
Answer: First, your premise is incorrect; there is no 32/64 GB limit imposed by the RPi OS. Therefore, I'll re-phrase your question as asking, "What is the size limit for the RPi microSD card?"
The question of size limits for storage media is an old one, and a complete answer would be quite complex. If you're interested, this 3-part article covers storage media limits from roughly the commencement of the era of personal computers through 2002. And this Q&A on U&L SE covers some of the considerations from a Linux perspective - as of ca. mid-2012.
If you quickly scan the references above, you may form two hypotheses:

There are numerous factors that determine storage media limits, and

Storage media limits are often not the total media capacity, but rather it is the partition size that is the limit.

From the previous answers and comments to your question, it seems that "The Foundation" has not addressed this subject in their "Official Documentation" for the SD card. This should not be surprising, as there are numerous gaps in their documentation for (probably) several reasons. However, this could also be taken as a reflection of a situation in which there are no microSD cards manufactured today that are too large for the Raspberry Pi OS. I suspect this is the case, and I will propose this is the answer to your question.
You may also consider the following:

The SD card for a Raspberry Pi contains (at least) two partitions. One is a FAT32 partition - with a 2TB limit on its partition size, the other an ext4 partition - with a 1 EB (1 million TB) limit.

Up to this point, we've considered the question of microSD card capacity limits only from the perspective of the RPi OS and file system partition limits. However, there are also limits inherent to the design of the Secure Digital (SD) format. Referring to the table at the end of this article, we find that for a microSDXC Type card, the limit is given as 2TB; for a microSDHC Type card, the limit is given as only 32GB. It has been reported that microSDXC Type cards work fine in RPi, and so this is one source for vetting your microSD card prior to purchase.
Answer:
pies only support 32GB cards

I don't think there are any official statements about this, and YMMV.  I've been using 64 GB cards for years, at least on 3/4 models, and never had a problem.
It did not take me more than 2 minutes internet searching to find multiple claims that 128 GB cards and even bigger should work. Eg, someone here claims "up to 128GB is tested and confirmed / guaranteed" (although they provide no reference...).
Answer: I can't think of many reasons why any particular large size SD card would not work.  If there were any problems with that configuration specific to size, it should fail immediately with a specific error, not mysteriously later after it worked.
The only possible size limitation would be filesystem related, and the only filesystem with size limitations that would affect an SD card right now would be the vfat32 filesystem, which typically would not be used with a raspberry pi.

Why does my 128GB sd card work?


Is there a way to install civiCRM using strapi as CMS

Question: I found that we cannot install CiviCRM independently, and that it requires Wordpress, Joomla, Drupal or Backdrop as CMS. Is there a way to use Strapi instead of these.
Answer: Welcome to SE!   Short answer: no, CiviCRM requires one of those CMSes.
There is also work underway to revive a standalone version.
If you want to use Strapi (or anything else) for your front-end website then create a separate installation for Civi with a minimal configuration of one of the supported CMSes for the back-end.  You can find many other posts on here about integrating separate front-end and back-end sites.


Print at smaller scale

Question: I recently received a PDF document consisting of 2 landscape A4 documents, which I would like to print as 1 portrait A4 (or 2 A5). I'm missing the control panel to print at 50% with matching layout. How can I do this on OS X?
Answer: You can reduce size and fit to patch size with Preview (which is the default application for PDFs). In the print dialog, select paper size and adjustments as required:
Answer: Thank for all your suggestions! With them, I found the following solution. A little disclaimer first: I don't have my Mac that long, and printing on a Mac was entirely new to me until last week. It can all be done without additional software on OS X 10.8.4, maybe on older version too (i don't know).
First, open the the 'Show Details' pane (i totally missed that).

Then, open the layout sub pane (1) and change 'Pages per Sheet' (2). The printer driver automatically scaled down the pages to fit. As you can see, this is a Brother MFC-J4410DW,  so maybe your mileage differs with another printer driver.

Print at smaller scale


Shredded Coconut as a Substitute for...?

Question: I had a recipe that called for unsweetened shredded coconut and the only package I could find brought a TON of it. I ended up not caring for the recipe so now I have all this extra shredded coconut. Since it is unsweetened, it isn't what most dessert recipes call for. What, if anything, can I use this product as a substitute for? I have tried using it in place of bread crumbs but other ideas would be appreciated.
Comment: This is a super old question and there has already been an accepted answer, but a lot of south Indian dishes use shredded coconut, maybe you could look into that?
Answer: My wife loves it toasted.  Toast shredded coconut in a dry pan or oven and put on ice cream and other deserts.  It's really tasty.  Like toasting other nuts be careful as if you blink it may burn.
Comment: TOASTED COCONUT CREAM PIE! I *hate* shredded coconut, but toasted... and in pie... it ain't so bad. I toast it in a bit of butter and then just finish making the cream filling in the same pan.
Answer: I adore using it as breadcrumbs (as you said), particularly on shrimp, then pan- or deep-fried.
You can also use it as a textural component in bread.
Answer: It's not a substitution, but if you're a fan of coconut, you can make coconut ice cream, or coconut sorbet for those who can't do dairy.


Search text contains with QueryOver

Question: I'm trying to do this :
var list = Session.QueryOver<Person>()
    .Where(x => x.LastName.Contains(searchText))
    .List<Person>();

but I get this error : Unrecognised method call: System.String:Boolean Contains(System.String)
Do you have an idea ?
Update :
public class Person
{
    public virtual string FirstName { get; set; }
    public virtual string LastName { get; set; }
}

Answer: NHibernate does not have direct C# equivalent as mentioned on this link http://nhibernate.info/blog/2009/12/17/queryover-in-nh-3-0.html

Additional Restrictions
Some SQL operators/functions do not have a direct equivalent in C#.
  (e.g., the SQL where name like '%anna%'). These operators have
  overloads for QueryOver in the Restrictions class, so you can write:
.Where(Restrictions.On(c => c.Name).IsLike("%anna%"))
There is also an inline syntax to avoid the qualification of the type:
.WhereRestrictionOn(c => c.Name).IsLike("%anna%")
Comment: Thanks, that's work. But NHProf warn me about performance trouble (with 'like'). I'll may be keep my current code, a Nhibernate query and after a linq query on the result.
Answer: Looks like QueryOver doesn't support Contains method. You could try with IsLike restriction:
nhibernate queryover LIKE with expression trees
NHibernate 3.0 search with substring
queryover and (x like 'a' or y like 'a')
Answer: var data = session.QueryOver<tablename>()
                  .JoinQueryOver<if another table present>(x => x.Empsals)
                  .WhereRestrictionOn(x => x.FName).IsLike("a%")
                  .List<EmployeeDetails>();

Answer: WhereRestrictionOn(x => x.FName).IsLike("a%") use like this

Search text contains with QueryOver


Adding elements to a list in order?

Question: I am trying to initialize a list using integers read from a file. Each time I read an integer I add an element to the list (the element defined by a calculate() function), and the index the element is added at is the integer I read. So if I read "5", I want an element stored at index 5. The integers in the file are out of order numerically, so I can't simply insert() elements into the list because it may cause other elements that have already been inserted to be pushed out of order.
<code>items = []
for line in open(filepath, 'r'):
    for c in line:
        if c != '\n':
            i = int(c)
            items.insert(i, calculate(i)) #not working
</code>
How do I add them in order?
Answer: I found a solution at http://www.doughellmann.com/PyMOTW/bisect/ where similar problem is solved.

Adding elements to a list in order?


faculty interviews - timing/conflicts

Question: I was interviewed on-campus for an assistant professor position and was told that I would be contacted this week for the result. Yesterday, I received an on-campus interview from another university to be done in 3 weeks. I am excited about both positions and do not know how to respond the second invitation. If the first institution offers the position, I am going to accept it as they will not wait for my decision for a couple of more weeks. But I also want to see my chance and the possible offer of the other university. I just don't want to spend their time and resources for me if I receive an offer from the first university. Is it possible to ask for an accelerated interview by telling the truth? or any other suggestion? Thank you.
Comment: How did this end up working out for you? Any advice to others who might be facing a similar situation?
Answer: You can ask for an earlier interview, but they may have already scheduled someone for that time block and may not be able to accommodate the request.
As far as the resources go, it's definitely an "early bird gets the worm" situation when it comes to faculty hires. Schools that delay their interviews run the risk of losing out on good candidates. So I would proceed on good faith: accept the interview, but let them know ASAP if you receive another offer that you intend to accept.
Comment: I'd even go so far as to ask for an earlier interview date.  Candidates who try to delay the interview process (in hopes that they'll get an offer from their preferred institution) are a bother to hiring committees, but committees like candidates who are eager to interview as soon as possible.  In general, you can interpret it as a sign that a candidate is interested in your offer when they ask for an early interview date and as a sign that they'd rather get a different offer if they put off the interview as long as possible.
Answer: Having at least two interviews and offers works in your favor for both negotiation purpose and speeding purpose. If you get verbal or written offer letter from first university, you can mention it to second university at the end of the interview so they will speed up if they don't want to miss you. Also, you can ask a few weeks of extension for offer letter from the first university without mentioning you are being interviewed in second university. You can mention some factors such as moving decisions, and family decisions behind the extension to the first university. They may honor your request if they are willing to hire you.
Once you receive both offers you can decide where you wanna go. And even negotiate for salary, other benefits, startup funding, and so on. It's not uncommon to accept one offer and decline others or even decline one of the two accepted offers. Just be professional when declining and communicating with people. You may meet them again or may not as well. Who knows!

faculty interviews - timing/conflicts


How to check visibility of multiple div's in simpler way?

Question: Currently i'm using below code which works well.
$("#topperAtBaseLevel:visible, #lowerAtBaseLevel:visible, #midAtBaseLevel").hide();

any optimised code? (i cant use same class)
i mean how to use :visible rightly?
Comment: It cannot be simpler. You do it correctly.
Answer: That code seems perfect; you are using :visible correctly.
You can take a look at the jQuery :visible selector help page if you want to know exactly how it works, but in a few words it selects visible elements =)
Answer: That is the way to achieve what you're going for.  You are using the selectors correctly and efficiently.
You could make it a little faster if you maintained an array of the ID's of the tags that need to be hidden, and then construct your selector dynamically to find by ID.  (This would be faster even though the selector might be longer.  Selecting by ID is very fast.)
But, the optimization is not needed, is it?  We're talking about going from lightening fast to double lightening fast.  A super-duper jQuery pro would just do what you've done.
Answer: Well, all I can think of, is:
$('[id$="AtBaseLevel"]:visible').hide();
That would match any element whose ID ends in AtBaseLevel. Mind you, shorter does not mean faster, since ID lookups are about as fast as it gets. Attribute-based selectors are not that optimised.
Answer: You can do it like this:
$("#topperAtBaseLevel, #lowerAtBaseLevel, #midAtBaseLevel").filter(":visible").hide();

However, this results in everything being hidden, calling .hide() on a hidden element is fine, nothing wrong there, so it could just be this:
$("#topperAtBaseLevel, #lowerAtBaseLevel, #midAtBaseLevel").hide();

Comment: Thanks for supersonic reply.

here if we use find(), main id's wont be hidden & all the inner nested elements will be hidden.which is a problem displaying again.
Comment: @jaan - I'm not using `.find()`, I'm using `.filter()`, it's different :)  `.filter()` filters the **matched** elements, not their children like `.find()` does.
Comment: You have a missing double quote inside filter.
Comment: @rahul - Thanks! I was concentrating on the other answer since filter isn't really needed here, updated.


only "partial" autocomplete in PyDev

Question: I'm using Eclipe Juno (Version: 4.2.1, Build id: M20120914-1800) and for some reason the Alt+/ autocomplete of variable/function names is not working properly - it completes the typed prefix to the last variable that matches the prefix without cycling through other options as used to be in previous versions.
I'm writing a python code and using pydev so for example, having the following lines:
var1 = 0
var2  = 1
var14444444444 = -1

then typing:
va

then hitting the Alt+/ combo will complete the 'va' to var14444444444.
keeping the Alt pressed and pressing the / key again (and again) will do nothing as the editor  thinks that var14444444444 is the prefix to complete so no match is found.
In case I have the code:
var1 = 0
var14444444444XXXXXXX = -1
var2  = 1
var14444444444 = -1

typing
va

then Alt+/ yields completion to var14444444444 and keeping the Alt pressed and hitting the / again will autocomplete to var14444444444XXXXXXX.
This behavior is very annoying and inconsistent with previous versions. Is there a way to configure it? (I looked under the editor options but couldn't find anything)
I'll just add that the Ctrl+space does open a drop-down with all possible completions but this requires too many key strokes (Ctrl+space, + a sequence of arrows to get to the preferred completion, then Enter) which defeats the productivity purpose.
Any suggestions?
Answer: Go to

Eclipse Preferences
PyDev
Editor
Code Completion
Check "Request completion on all letters chars and _?"

Restart Eclipse.

only "partial" autocomplete in PyDev


Tab is not visible after tab default on

Question: I have a address object where Account is the master object. Sharing setting said address is controlled by parent . Account is private . My requiremnt is all user can create and update address. So I have turned on tab address for all profiles and gave obj permission read/create/edit . But after deploying to QA sandbox, when I log in as any user I dont find my address tab to create address as user. I thought app does not have tab added, so I added address tab for that app. but still I cant see the tab as any user. Could anybody help what I am doing wrong here or any solution please.
Comment: check the profile, if the tab is default off or hidden.
Comment: You can't give read/create/edit permissions to a detail object. Did you modify the parent object permissions? Is the tab visible to the user
Comment: @SantanuBoral Tab default is on.
Comment: @Eric Parent object has read/create/edit permission already. Tab is visible.
Answer: The problem you're having is that even though the profile's tab setting is "Default On," you have not overridden the users' current settings in the apps. New users assigned to that app would see the tab automatically, but existing users need to have their settings updated. To do this, edit the app you placed the tab in (Setup > Create > Apps), and immediately below the multi-select list for the tabs, you'll see an option that reads "Overwrite Users' Personal Custom App Customizations." You need to check this box in order to reset the tabs for all users.
Comment: thanks for the reply. I have two sandbox. Whatever I work on first sandbox, I have to deploy to next sandbox name QA sandbox. In first sandbox, I can see the address tab as any user even overridden the users' current settings is not checked. But when I deploy app adding that address tab from first sandbox, In QA sandbox I don't see that address tab when I log in as any user except system admin. Is it the reason that I did not checked overridden the users' current settings in the app before I deploy the app to QA sandbox?
Comment: @maruf The "override" checkbox is a one-shot feature. It doesn't stay checked. You have to do the override option once to update all user preferences.
Comment: Thanks again. If all user need to see that address tab, then should I Overwrite Users' Personal Custom App Customization check and then deploy from 1 sandbox to another sandbox or should I check override from each profile ?
Comment: @maruf First, deploy with the tab, app, and profiles selected, as this will set all the appropriate permissions. Then, go in to the app after deployment and use the override checkbox.
Comment: Thank you. I tried to deploy with app but I did not see that particular app there, so I deployed tab and profiles. after deploying to QA I see that whatever changes I did in profile for object level permission in 1st sandbox, those changes did not reflect on QA sandbox for profile. Is there any particular reason for that ?
Comment: @maruf Object permissions are not the same as tab permissions. If you want to update object permissions, you need to deploy the profile and the object at the same time.

Tab is not visible after tab default on


Do hotels in California have an obligation to disclose prior report of bed bug presence?

Question: I wonder whether hotels in California have a legal obligation to disclose prior reports of bed bug presence, if a potential customer enquires about it.
Comment: Why would they _possibly_ have such an obligation? It's the past, and it will not necessarily have relevance to whether bugs are there _now_.
Comment: @Greendrake bed bugs are notoriously difficult to get rid off.
Comment: Difficult, not impossible. If such an obligation existed, it would implicitly endorse the truth of the statement "if bugs were there in the past, they're likely there now". I would therefore be very surprised if it existed.
Comment: Hotels are actually pretty good at getting rid of bed bugs, since they can seal off a room for long-term treatment. They're notoriously difficult to get rid of *at home*, because, well, you still need a place to sleep.
Answer: Jusrisdiction: england-and-wales
In E&W this might be covered by the Consumer Protection from Unfair Trading Regulations 2008.
Legal framework
Regulation 3(1) prohibits "unfair commercial practices".
Regulation 2(1) defines a commercial practice as:

any act, omission, course of conduct, representation or commercial
communication (including advertising and marketing) by a trader, which
is directly connected with the promotion, sale or supply of a product
to or from consumers, whether occurring before, during or after a
commercial transaction (if any) in relation to a product;

Regulation 3(4)(b) provides that "a commercial practice is unfair if it is a misleading omission under the provisions of regulation 6"
Regulation 6(1) provides that:

a commercial practice is a misleading omission if, in its factual
context, taking account of the matters in paragraph (2), (a) the
commercial practice omits material information, (b) the commercial
practice hides material information, (c) the commercial practice
provides material information in a manner which is unclear,
unintelligible, ambiguous or untimely, [...], and as a result it
causes or is likely to cause the average consumer to take a
transactional decision he would not have taken otherwise.

The "matters in paragraph (2)" includes, inter alia, "all the features and circumstances of the commercial practice".
Finally, regulation 6(3) provides that "material information" includes "the information which the average consumer needs, according to the context, to take an informed transactional decision".
Application to facts
The issue will be:

Whether the omission (of prior bed bug reports) is an omission of information which the average consumer needs to take an informed decision to go ahead with staying at the hotel.
Whether the omission causes or is likely to cause the average consumer to decide to stay at the hotel when they wouldn't have chosen to do so had they known about the prior bed bug reports.
Whether the above points still hold considering the factual context, and features, and circumstances of the commercial practice.

If the bed bug report was from yesterday, and the hotel have not yet taken any pest control measures, then arguably this is information which you need to make an informed decision, and you might not have chosen to stay in the hotel had you known.
On the other hand, if the bed bug report was from weeks ago and the hotel have verified that there is no longer any bed bug presence, then considering the factual context it seems unlikely that this is information which you need in order to make an informed choice.
Comment: Ah, I was looking under the H&S regs to no avail.


How to pass parameters between two different components on two different community pages?

Question: I have two different community pages, and on each page I have different component. I need to pass value from first component to other on click. I already have an event which navigates to that other page. I tried with application event and didn't succeed.
Answer: We've been doing this using well defined keys in sessionStorage:
<code>// in your initiating component
sessionStorage.setItem('myValueToPassThrough', 'abc');
</code>
Then in the init handler of your second component add:
<code>handleInit: function(cmp, event, helper) {
    var value = sessionStorage.getItem('myValueToPassThrough');
    // you may also want to wipe it out - but be aware it then won't be there on page reload
    sessionStorage.removeItem('myValueToPassThrough');
}
</code>
Comment: I was thinking about localStorage too, but I don't know is it a good practice? Are you sure there is no other "more lightning" way? Thanks.
Comment: I haven't seen a more Lightning way for passing data between pages unfortunately. I'd recommend not to use localStorage because it's shared between tabs and persistent between sessions. sessionStorage is better suited.


Can the cooperative eye hypothesis still exist in eyes with no sclerae?

Question: I just want big cat eyes (i.e., lions, tigers, etc.) in a humanoid that can be just as expressive as a human's yet not having our very conspicuous eye-whites. Doable, yes or no?
Comment: Can you give some more context and explanation? For starters, what is a cooperative eye?
Comment: This appears to be two separate questions.  The cooperative eye hypothesis suggests that human eyes have evolved to allow one human to perceive where another human is looking.  Then in the body of the question there is a question about "expressive" - which is about perceiving the emotional state of a person from looking at their eyes (actually the surrounding skin).  Which one of these are you wanting to know?
Comment: If it's about a humanoid it may be more a matter of mirror neurones than about eye structures for one person to perceive where another is looking. Gaining cues from the eye itself will definitely help.
Answer: Yes.  Two ways.
For excellent simulation of this, watch one of the King Kong remakes.  Kong does not have white sclera but they do a great job making his face expressive.
Or here are the chimps.  You cannot see their sclera, usually, but they have very expressive faces.
http://www.dailymail.co.uk/news/article-2281211/Incredible-images-expressive-faces-chimpanzees.html

The muscles of the face do a lot of the work too.
Alternatively, if you want a catlike pokerface but cooperative eye eye effect you could replicate the effect of white sclera by having very light irises and large pupils.  Our primate cousins generally have very dark irises and it is hard to pick out the pupil and so hard to tell where they are looking.  The majority of humans today still have very dark irises but because of white sclera you can tell where the iris/pupil unit is pointed - the cooperative eye effect.  But you can have very light irises where it is easy to pick out the pupil in the center, and so see where an individual is looking.  Some Europeans have light irises but cats do it best.

source
Comment: Wolves also use the "dark pupil/light iris contrast".  Social canines typically have lighter irises (yellow or orange) than solitary ones like foxes.
Comment: What about how much someone would need to turn their head to look at something to the side? Human eyes have a wide range of movement but say, your pet dog doesn't catch the cue to look at what you're looking at unless you turn your head directly at it. Could this darkpupil-lightiris theory work for that too or would it be a race of "socially obtuse" people from a human perspective -- they might not actually be obtuse, of course, just clashing understandings of body language.


How to design an app that is heavy in modal view?

Question: I am currently designing an iOS app that is supposed to digitize a paper form. The problem here is that the task requirements makes the modal view nested. IE: A client (EG: Starbucks) has many sites (EG: Queens Street Branch) and each site has many contacts (Supervisors for each shift). How do I make it possible to create/update/retrieve/delete easily without using a lot of screen?
Comment: This may sound quip but I'm being serious. Start with hiring a designer or somebody familiar with designing UX.
Answer: Sounds like you have a basic hierarchy and you are asking about navigation.
These concepts are already laid out in the iOS Human Interface Guidelines. I suggest you read it through. Specifically the part about making one choice per screen until they arrive at their destination.
Answer: How is it possible to do so "without using a lot of screen?" It sounds as if you are using drill-downs with the modal.
Most importantly you need to separate your thinking from the existing paper form and start thinking about how time sheets will be utilized on a mobile device.

A modal pops up for Starbucks (originating from a list, or a map of a neighborhood, or whatever)
App user selects a branch and gets a drill-down of positions and names which he can act upon. (Change entered hours, update shifts, change locations, etc...)

Your users will think of the data in a multitude of ways, you need to anticipate this and provide screens for these actions.
<code>As a user I want to find who's working as head barista at <location x>
As a user I want to see everyone who is working <shift a> at <location x>
As a user I want to see the hours of <supervisor b> for <time period t>
</code>


Moving the compare products to the top of the screen when resolution is below 770px

Question: I want to make sure that the compare products block is positioned at the top of the page under Filters. I don't want to put it in the left sidebar though. Is there a way to adjust the layout on lower res screens so that it will have this layout?
Answer: In the Changes to Layout Files section of the Magento RWD theme document, it states this:

Because two and three column layouts collapse to a single column on
  smaller viewports, all content in the left block are displayed under
  the main content. This is a problem because blocks—like the navigation
  on all My Account pages—must display above the main content on smaller
  viewports. To address this, a new left_first block was added that
  looks like the left column on larger viewports, but on smaller
  viewports, it displays above the main content.

So what you need to do is to move the catalog.compare.sidebar block to the left_first block. The code will look something like this:
<default>
    <reference name="left_first">
        <action method="append">catalog.compare.sidebar</action>
    </reference>
    <reference name="right">
        <action method="unsetChild">catalog.compare.sidebar</action>
    </reference>
</default>

The code above will need to be placed on your custom layout file, such as local.xml. I haven't tested the above code, so you may need to tweak it to get it to work.
Comment: Thanks for the info! I'll dig into this and confirm once I get it working along with any adjustments.
Comment: I was able to get it to display at the top when at lower resolution, but I had to put it in the left column. Any tips on keeping it in the right column but keeping it above the main content when it collapses? It may not be easily done which then I'll fall back to putting it into the left column.
Answer: I decided to move it to the left sidebar under the layered navigation. Here was the final code to do it:
      <reference name="left_first">
         <block type="catalog/product_compare_sidebar" after="catalog.leftnav" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
            <action method="append">catalog.compare.sidebar</action>
    </reference>


How can I connect routers back to back using the AUX ports?

Question: I have 3 cisco 2821 routers for home lab studying for CCNA. When I bought them I didn't think about the connection issues that I might face. They have only 2 gigabit ports and for many of the labs it looks like I need more. I'm trying not to buy anymore equipment i.e HWIC cards. I've looked up connecting routers by the AUX ports but cannot find a specific document. I saw one showing how to connect back to back but it still needs a serial interface which I don't have. Any way to connect just using the AUX ports and what cable do I need? Thank you.
Comment: The Con and Aux ports are serial interfaces. You will need a switch, too, and you can create VLANs and virtual interfaces on your routers.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: The AUX port is a serial interface used for managing the router itself. It cannot be used as a network interface, i.e. for sending/receiving routed packets.
If three routers are enough for your lab, and you just need lots of interfaces, you can try connecting them up like this (since you say each router has two interfaces available):
<code>                         +-------+
               +---------+       |
               |         |  R2   |
               |         |       |
  +-------+    |         +---+---+
  |       +----+             |
  |  R1   |                  |
  |       +----+             |
  +-------+    |         +---+---+
               |         |       |
               +---------+  R3   |
                         |       |
                         +-------+
</code>
and then create as many sub-interfaces on each physical interface as you like. These sub-interfaces will show up in the running-configuration as independent interfaces allowing you to, for example, create a network with hundreds of interfaces, subnets and so forth.
Answer: Here is how you connect the AUX ports of old school Cisco routers (e.g. c4700, c7200) together using a null modem cable and PPP.  It worked last time I tried it (back when IOS 11 was the hot thing).  I have never tried this on a newer router like your 2800s, but I assume it's still possible assuming you build the right cable.  YMMV.
That said, while it's a cute hack, your Cisco education will probably be well served by listening to @mere3ortal and learning all you can about sub-interfaces.  You'll use sub-interfaces a lot.
Comment: I thought there was a way to connect and transfer packets. I saw this doc on    www.cisco.com/c/en/us/support/docs/dial-access/asynchronous-connections/10365-auxback.html:    Connecting Routers Back-to-Back Through the AUX Ports
Updated:February 4, 2010
Document ID:10365
Introduction
This sample configuration shows you how to directly connect two routers, without a modem or other data communication equipment (DCE) devices.      I would use this document but it seems you still need a serial port, which I don't have.


visual studio asp.net mvc, changing target framework

Question: Hello there Im have just changed the target framework for an asp.net mvc project from target framework 4 t 3.5,  I keep getting this error when I try to debug, or go to any controller action
'HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. '
Any ideas why I keep getting this error? as soon as I revert back to .net 4.0, everything is fine
ps could be an issue with routing as the global.asax  Application_Start() is not not hit hence route entries are not registered
Thanks
Answer: Are you running the site on IIS or Casini? If IIS, you should also check that the Application pool is targeting .NET Runtime 2.0


Bayesian updating logNormal distribution

Question: I have a question regarding statistical updating.
Basically I have a probability density function of a random variable X and, at each time step, I obtain a new sample $x_i$ belonging to this distribution. I know that X ~ logNormal($\mu,\sigma$). I am looking for a way to update this probability density function as a new sample $x_i$ is available a each time step. I am considering to use Bayesian analysis, but still not sure how to set-up the solution. I thank you all in advance for your hints!!! I am new in the platform and I really appreciate to start being part of it.
Comment: Note that you define a prior distribution on the parameters. You may find it easier to work on the log scale and take logs of your observations as they arrive reducing it to a problem of updating the distribution on parameters  for a normal instead
Comment: The likelihood function (logNormal) can be updated each time you obtain a new x. To do that, it suffices to estimate mu and sigma based on the most up to date sample. No?
Comment: Thanks @ocram. You mean compute a new $\mu$ and  $\sigma$ as a new sample $x_i$ is available? Let's say I can define prior for the LogNormal distribution. I want to update the posterior when $x_i$ is available. Does it make sense?
Comment: Not clear for me what you want to update. The likelihood ? The prior? In the latter case, your previous posterior becomes your current prior. The prior combined with the new data point gives the updated posterior. Which in turns becomes your new prior.
Comment: @ocram yes I that's exaclty what I meant. Update the old distribution (prior) by a more updated one (posterior). So, as far as I understand from you I can proceed as follows: I get new data sample $\log(x_i)$ and compute a new mean value $\mu$. This will update my prior knowledge on $\mu$ ~ Normal?
Comment: @Glen_b that's a good strategy to start with.
Answer: There is no difference between observing a normal sample $(X_1,...,X_n)$ and a log-normal sample $(Y_1,....,Y_n)$ as one can be turned into the other by a $\log$ or $\exp$ transform. You may hence use the ultra-classic Gaussian model framework (see e.g. Chapter 2 of our book!) for log-normal samples.


Plus signs in Diablo 3 for ps4

Question: What do the plus signs mean in diablo 3? They are next to the sword and shield when looking at items in the inventory.
Answer: As @Frank suggested, it's your healing stat. Or more specifically, it's your Regen stat. This is how much health you will regenerate per second.
This can be boosted by equipment that has a "+ Regen" effect.
Comment: For anyone wondering why this is downvoted, view the revision history.
Answer: I was also looking for an answer last weekend and found following answer on the battlenet forums:

It means healing. Life per hit, Life after kill, Life per second, Health globe bonus. In the PC version the tooltip states something like 'the amount of health you potentially heal per second based on...'

Plus signs in Diablo 3 for ps4


Keynote 6.0 - How to add animated gif?

Question: I recently got Keynote 6.0 and I'm having trouble animating a gif in it. Using Insert > Choose... easily adds the gif to the slide, but without animation. I have searched and found other sources (example) which all seem to point to using the "Quicktime Inspector" to work with the animation of a gif. Unfortunately, the Quicktime Inspector no longer seems to exist in version 6.0 and I can't seem to find the solution otherwise. Any suggestions? Thank you much!
Comment: Keynote 6.2 added support for animated GIFs.
Answer: If you change the extension to .mov then drag it over, it'll ask you to optimize for iOS, at which point it will treat the GIF as a movie.
Comment: This worked for me twice in a row just now, and I was happy, and then 4 other .gifs did not work. Keynote gives an error: "Media could not be inserted." Apparently it only works for certain types of GIFs but I have no idea what the qualifications are.
Comment: Does *NOT* work in Keynote 6.5.3, tried with two different GIFs. Keynote gives the error, The operation could not be completed`
Comment: This works only if you have the .mov file (and not just by changing the animated gif extension)
Comment: @AlexPopescu Seems to work for me. Just tried using a simple `mv lol.gif lol.mov` and then dragging the file to Keynote 6.
Answer: In my experience, animated GIFs (and Flash animations) are no longer supported in Keynote. You would probably have to use ffmpeg or QTPro to convert the GIFs to movie files and re-import them.
Answer: The problem was fixed in Keynote v6.2. Update Keynote and it should work. (as mislav informed me in the comments)
Comment: Not sure why this was up-voted; does **not** work in Keynote 6.5.3
Comment: You can't add animated GIF's to the iCloud version of Keynote though....This only works on the native desktop app. Unless someone can prove me wrong...
Comment: @jm3: Probably because the answer clearly states "v6.2", and it worked then. Even if it doesn't work in "v6.5".
Answer: They won't animate until you view the slideshow, but should there. Also, go to the Inspector>Quicktime Tab and make sure to change the Repeat setting from None to Looping.
Comment: Thanks for the response. However, I did mention in the question that in the new version of Keynote, the Quicktime Inspector doesn't seem to exist any longer. Also, it doesn't seem that the GIF is animated even in the slideshow (in the new version of keynote).
Answer: The new Keynote (v6) doesn't import GIFs in like it used to, which is disappointing.
However, if you open an old Keynote presentation (Keynote '09), Keynote v6 will ask you if you want to update and/or optimize it for iOS devices.  If you optimize, it will render the animated GIF into .m4v.  Once that is done, if the Format inspection, you will have a "Movie" tab.
The down side is that you MUST have Keynote '09.  I tried to export an animated GIF created in Keynote v6 as Keynote '09.  It did not maintain the animated GIF correctly, so when I reopened it, I did not get the "Optimize" option
Answer: if you want a GIF to repeat itself, as beroe correctly pointed out, save the .gif to some folder, change it's file extension (make sure to show the real extension and not hide it (cmd+'i' is the canonical version, change it there if you're unsure)) to .mov and then drag it to keynote 6. Optimize for iOS and now select "endless" in the "format->Film" section under "repeat" (I don't know the correct translations as I use a german keynote).
Answer: I was unable to import an animated gif into Keynote 6.2.2, so I converted it to mp4 via https://cloudconvert.com/anything-to-mp4  (I googled "convert animated gif to mp4"), and then I was able to just drag and drop the mp4 into Keynote.

Keynote 6.0 - How to add animated gif?


Conducting rod moving through a uniform magnetic field Purcell

Question: In Purcell's Electricity and Magnetism, Section 7.2, he talks about the field of a conducting rod moving through a uniform B-field. He then goes on to say the E-field and B-Field in the reference frame moving with the rod is related by E'=v x B'. In the previous chapter he mentioned that in the special case where in one reference frame E=0, then the field in the moving reference frame can be given by E'=v x B'. But, the problem I am having is that in the frame where the rod is moving with velocity v, the electric field is not zero because the magnetic field causes the charges to separate in the rod and hence an electric field appears. So why is it that we can use E'=v x B'?
Answer: It's just an opinion, but if you are in the rod reference frame your velocity say $v$ is zero, and therefore there's no electric field generated in the rod.


Probability of of an event happening at least once in a sequence of independent events?

Question: I want to find the probability of flipping heads at least once if you flip a coin two times. The possible outcomes (we don't care about the order) are (each equally likely)  $TT$, $TH$, $HT$, $HH$. Three out of four have an $H$ in them, so the probability is $\large \frac 34$. Is this correct? Is there a better and efficient way (especially when dealing with a higher number of flips?
Please use only very basic terminology and concepts from probability because I've never taken a class. Thanks.
Comment: Two coins two times, or one coin four times?
Comment: You state flipping a coin "two times", in which case, there are four possible outcomes: TT, TH, HT, HH, with probability $3/4$ that a head will appear at least once.
Comment: Yes I made a mistake haha, you are correct I meant the TT, TH, HT, HH
Comment: Answer can't be correct, the answer has to be a dyadic rational.
Comment: @AndréNicolas Yea you're right I just made a mistake when writing the possible outcomes, should've been TT, TH, HT, HH
Answer: We have the following equally likely outcomes:
T T
T H <--
H T <--
H H <--
In three of the four outcomes, a Heads appears: Probability of at least one head is indeed $\dfrac 34$. Put differently, note that the probability that no heads appears is 1 out of four or $\frac 14$. So the probability of at least one head is $1$ minus the probability of getting NO heads, which is $1$ minus the probability of getting all tails: is $1 - \frac 14 = 1 - \frac{1}{2^2} = 1 - \frac 12 \cdot \frac 12$
In the above demonstration, it is quite easy to list out the "probability space": which is essentially, all possible outcomes.
The "at least one head" qualifier is handy, because it allows you to simplify the determination of probability for any arbitrarily large numbers of flips.
If you flip a coin $n$ times, and want to know the probability of getting at least one head, note the outcome of getting all tails is the "complement" of the set of outcomes in which you get at least one head. The probability of getting all/only tails, when flipping a coin $n$ times is equal to $$\underbrace{\dfrac 12 \cdot \frac 12 \cdot \cdots \cdot \frac 12}_{\large n\; \text{times}} = \left(\frac 1{2}\right)^n$$
So...$$\begin{align} \text{probability of getting at least one head}\; & = 1 -\text{probability of not getting any heads}\; \\ \\ & =  1 - \;\text{probability of getting all tails}\;\\ \\& = 1 - \left(\dfrac{1}{2}\right)^n\end{align}$$
Comment: I don't understand why the probability of getting all tails is 1/2? If we have TT, TH, HT, and HH, "TT" is the only one that is all tails, so wouldn't it be 1/4?
Answer: in problems like this one it's usually much easier to calculate the probability of the opposite event, so in this case - what is the probability of flipping a coin $n$ times without any heads? answer - it's $2^{-n}$ because each time you flip you need to get tails therefore the probability you seek is $1 - 2^{-n}$
Answer: The quickest way to find the probability of of an event happening at least once in a sequence of independent trials is to find the probability that it never happens in that sequence of trials, and then subtract from $1$.
Answer: You probably know that if $p$ is the probability of an event (say, flipping heads at least once) happening, then $1-p$ is the probability of that event not happening. Now let's apply this to your problem.
If you do not flip heads at least once in $n$ trials, then all $n$ trials must be tails. The probability of getting tails in one trial is $\frac12$, and since the trials are independent (what you get on flip 1 does not affect what you get on flip 2 does not affect what you get on flip k, etc.) the probability of getting tails in $n$ trials is $(\frac12)^n$. This is your $1-p$, so your $p=1-(\frac12)^n$.
Answer: I think it's helpful to generalize this question to a multi-sided coin (a coin with $m$ sides, which can be thought of as a die, if you will). I will call "side A" the desired outcome (heads for the coin). For two tosses, we can add the probabilities of two independent events.
Probability of getting side A on the first toss:
$\frac 1m$
Probability of not getting "side A" on the first toss, but getting it on the second toss=
$$ p(\rm not side A) \cdot p(\rm side A) = \left(1-\frac 1m\right) \cdot \frac 1m$$
Total probability of getting side A in two tosses is the sum of the two events:
$$\frac 1m + \left(1-\frac 1m\right) \cdot \frac 1m$$
If we continue with more tosses ($n$ total), the probability grows. The probability of not getting "side A" on the first, second, ... or $n-1$th toss, but getting it on the $n$th toss =
$$\left(1-\frac 1m\right)^{n-1} \cdot \frac 1m$$
Total probability of getting "side A" in $n$ tosses is the sum of the independent events:
$$\frac 1m \cdot \left[1 + (1-\frac 1m) + (1-\frac 1m)^2 +  \ldots(1-\frac 1m)^{n-1}\right]$$
Comment: As you've shown the probability of getting at least one side A in $n$ tosses is $p=\frac{1}{m}\cdot\sum_{k=0}^{n-1}(1-\frac{1}{m})^k$ which features a geometric series of ratio $(1-\frac{1}{m})$. So $p= \frac{1}{m}\cdot\frac{1-(1-\frac{1}{m})^n}{1-(1-\frac{1}{m})}
=1-(1-\frac{1}{m})^n$.
This gives a hint for a simpler method, as suggested by @MichaelHardy:
The probability to have no side A in one toss is $(1 - \frac{1}{m})$, for $n$ tosses it's $(1 - \frac{1}{m})^n$.
The probability to have at least one side A in $n$ tosses is the complement $1-(1 - \frac{1}{m})^n$. Both methods work.


My DataGridView properties window went blank!

Question: I'm using Visual Studio 2005 w/.NET 2.0.  I have no idea what happened, but all of a sudden I noticed that the Properties window for ALL of the DataGridViews in my project went blank.  I've tried dropping in new ones..still blank.  I restarted Visual Studio and my computer...still blank.  I've done some google searches, and I've found people who have had the same problem, but there is no solution and it appears that Microsoft has been unable to duplicate it.  Any ideas?
Answer: I created a new project in a new instance of Visual Studio and dropped a DataGridView in there, and it worked..then I checked my other project in the other instance of VS and the Properties can back for my DataGridViews.  Fluke or solution?  No idea.
Answer: I have had similar problems where my property windows go blank. It tends to happen when your machine is using a lot of UI resources or your toolbox is trying to update its list of controls.

Check to see if your control is being selected by your property window at the top of the property window screen
Try switching to a different control and then back to force the property window to update
Just close your UI Designer and re open it.
If all else fails, just close and reopen your solution

If it's still a problem you can always reduce how much memory your toolbox/UI designer uses by removing custom control generation in your toolbox window. To do this go to Tools / Options / Windows Form Designer / AutoToolboxPopulate - set to false. Now this will not populate your toolbox with custom controls anymore from your solution.
Answer: This same thing happened to me because the full path of the project contained an '&'.  When I moved the project to a path that did not have an '&' everything worked.
There was same problem - reason was '&'.
Answer: I had a bunch of similar problems with Visual Studio UI doing wacky things. I figured it had to do with memory consumption (not a lack of machine memory). Jetbrains made a wrapper here that has solved a lot of my problems in Visual Studio 2005.


Interesting effect. From where to start?

Question:
Greetings, I've recently came across this poster and would like to learn how the background effect was achieved, can you please suggest tips in order to start moving on.
Comment: What have you tried in illustrator or Photoshop to achieve the effect you're looking for? For me, I have always found I learn the most when I try solving the problem on my own first, before I ask for help.
Comment: That is really cool. Its hard to tell from a low res graphic, it almost looks like that's actual paint and they've cut around brush strokes.
Comment: Thank you for the suggestion guys, I've recently came across this tutorial, I might suggest that author used displacement tool from CINEMA4D on top of gradient image and made a shoot under specific angle. https://www.youtube.com/watch?v=ZCdmhYGZ-qo
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/49087/discussion-on-question-by-adrian-sol-interesting-effect-from-where-to-start).
Comment: have you tried [asking the author of the poster?](https://www.behance.net/gallery/43905933/Baugasm-Series-Pack-2) Maybe you can get the answer from him :)
Answer: Interesting. It is difficult to guess what is the exact process. For example, there are some programs that try to mimic particles and inclusive moving particles. For example this: http://www.escapemotions.com/experiments/fluid_painter/
I will try to do some experiments later but one option is to start in Photoshop with a simple black and white noise and start smearing it in the desired direction.
I think you can try in a low resolution and resample it later.
I would use separated layers and you can change the color of the layer and not contaminate the adjacent colors.
Another option would be trying with a painting program, like Corel Painter or the free one MyPaint, or Dogwaffle.
Note that this is not a definitive answer, but does answer:

tips in order to start moving on

n_n

One first example. This is a test on Dogwaffle Artist 9 using some particle brushes directly:

One more place to explore is using a pressure sensitive tablet.
In photoshop you can change the dynamics of any brush, sometimes the pressure changes opacity or color. In this case, you want to change size.
Answer: It looks like the scribble or zig-zag tools in illustrator applied to brush strokes.
Answer: you can do the following things:-
1.download some photoshop brush and use with change opacity.
2.use texture and pattern.
3.blending mode is very useful.
4.go to filter option and use another effect like blur and more.
5.use proper typography.
Hope it will helpful to you.
Comment: Hi Durgesh and welcome to GD.SE! Since this is a Q&A site and not a forum, we're looking for more specific answers to the questions that are posted. Please take a look at the [Help Center](http://graphicdesign.stackexchange.com/help/how-to-answer) for more information and possibly refine one of the options you have listed in this answer. Thank you for contributing and have fun!


Use of AAD from AES-GCM

Question: I'm working on a for-fun cryptography project in Java.
I'm struggling trying to understand Additional Associated Data use. From Cipher documentation and further online research I understood that AAD are appended to encrypted data and authenticated, but not encrypted. So, they should be readable without encrytpion key. But I can't understand how, since they seem to be retrieved after cipher initialization, that requires encryption key!
Can someone help me?
Thank you all in advance!
Comment: *"since they seem to be retrieved after cipher initialization"* - I don't see how that is possible. The API doesn't provide this. I only know of `updateAAD`. Can you show the code you're having trouble with? The *additional authenticated data* needs to be provided along during decryption. You can't retrieve it though.
Comment: I have no code to show yet, since I'm trying to understand how AAD works first. I myself know only about updateAAD, but ad I said it will not work if Cipher is not initialized.
Answer: Ok, I finally caught it. AAD are provided to the cipher but do not become part of cipher output! So I must store and handle them separately. Then, when I start decrypting, if they have been corrupted decryption will not work. Now I have everything clear. I'm sorry to have wasted your time :)
Comment: No need to be sorry, I came here with exactly the same thought process. I'm still not entirely sure why it's not encrypted if it's not retrievable, that seems a tad pointless.
Comment: This will be changed in PHP 7.1 by the way: https://wiki.php.net/rfc/openssl_aead
Comment: This is documentation for a specific application, but is somewhat helpful: https://cloud.google.com/kms/docs/additional-authenticated-data  (Rant: I'm annoyed by how difficult it is to use basic crypto primitives.  Scrounging scraps of code and explanation from random sites and anonymous strangers, to cobble together code with dozens of lines of configuration, seems an exceptionally poor way to do safe crypto.  How will we NOT suck at security, under these conditions?)
Comment: Also: my impression is that AAD is basically, an optional extra key that is optionally secret, and available for helping to verify the _circumstances_ of decryption, like username or protocol version, and is sortof a convenience more than a fundamental mechanism.

Use of AAD from AES-GCM


Best way to provide video of landlord doing something he lied about not doing?

Question: I lived in a rental home where my landlord lived in the same building. The landlord had this notion he could "immediate evict" anyone. He told me if I wasn't out he would replace the locks and remove my belongings. Moving homes is a big task and I needed more than 24 hours. I purchased a surveillance camera because I knew the landlord had a key to my suite. One day my surveillance camera recorded the landlord entering my suite. He never gave me notice. I asked my landlord why he entered my suite without notice, he replied "actually no. The contractor entered your suite to see where a water pipe was. He was in there for less than two minutes". This is al lie in the sense the landlord was in there and for more than two minutes. How should I bring this up in court? The dispute is through the Civil Resolution Tribunal. Is my evidence enough or should I try to get him to repeat his lie in front of the tribunal? For example should I question him "did you enter my suite" and then present the video? Right now we're in the "facilitation phase" so I'm guessing it's best to keep the evidence hidden for as long as possible.
Comment: Suppose he ends up admitting that he did enter your property (e.g. "to check a water pipe"). Then what would you do?
Comment: What outcome are you trying to achieve?
Answer: I don't know Canadian rental law, but as a general rule in civil cases you don't get to play Perry Mason and bring in evidence at the last minute. If you have evidence that the landlord broke the law then disclose it immediately and use it to pressure him into settling. His later lies to you are less important than the fact that he broke the law in the first place. However you can certainly testify about what he said as evidence that he has acted in bad faith.
Comment: The objective in civil cases is to get the other side to settle on your terms without having to go to court. The best way to do this is to put all your cards on the table and thereby show that your hand is the stronger one. The other side will do the same for the same reason. Hopefully both sides will come to the same conclusion about the likely outcome and act accordingly. If you delay revealing evidence this process just takes longer. If you try springing a surprise reveal at the trial you will merely annoy the judge, which is never a good idea.
Comment: "you will merely annoy the judge, which is never a good idea": that seems like a significant understatement.
Comment: out of interest, is there anything preventing one from entering evidence at a later time? Is there a penalty attached? Or is it simply 'not done'
Comment: @phoog That's because I'm English. https://en.wikipedia.org/wiki/English_understatement
Comment: To my understanding it's no illegal to lie in general, but to lie in court is illegal. That is why I thought it may be useful to have him repeat his lie in court.
Comment: If he lies in court then he is guilty of perjury, which is a criminal offence. However laws of civil procedure generally don't allow new evidence to be introduced before the other side has seen it, and even if you do the most likely outcome is that the other side will get an adjournment to review this new evidence. Like I say, in civil cases you do **not** get to play Perry Mason. This is about getting the money you are owed, not tricking the other party into incriminating themselves because you don't like them. Leave that to the police.


How to disable automatic logout on Ubuntu?

Question: I'm logging into an Ubuntu 10.04LTS server from my mac using standard ssh client.  My ssh sessions log out automatically after a few minutes of inactivity.  Normally this is a great security measure, but sometimes it's really inconvenient.  How can I disable this?
Answer: As far as I know there is no standard feature in Ubuntu that logs out ssh users that are idle. I have right now an SSH connection to a 10.04 Ubuntu computer that is well over 2 days idle.
The most common reason for this behavior I have experienced is a broken NAT or firewall between you and the server. What happens is that the entries in the state table are timed out and therefor the connection is reset unless you keep using it. Try the following:
ssh -o TCPKeepAlive=yes -o ServerAliveInterval=15 <user>@<server>

And see if you keep getting disconnected. In that case, set those in your ssh config. Note that with these settings routing errors or similar will make your connection die after 45 seconds (ServerAliveInterval * ServerAliveCountMax (defaults to 3)) So you might want to play around with the ServerAliveInterval a bit.
Answer: Is this Ubuntu box your client or your server?
In any case, from my experience idle connections are often timed out by routers, rather than the remote (and almost never by the client).
You can edit your /etc/ssh/ssh_config and set this value to less than the amount of time it takes for you to time out (it's in seconds):
ServerAliveInterval 360

If you are the server then edit sshd_config and changed:
ClientAliveInterval 360

The client and server will send alive packets at those intervals thus creating activity across  your connection.
Answer: Check you environment for TMOUT variable - if it has value greater than 0 then your bash session will automatically end after TMOUT seconds.
Check also TCPKeepAlive and ClientAliveInterval in /etc/ssh/sshd_config. If you have laggy network connection these settings could cause disconnects too.
Comment: Great suggestion, but `echo $TMOUT` returns nothing.
Comment: @Leopd that means the variable is not set. Run `env` to get a list of all exported variables.
Answer: This is probably not an SSH feature but a feature of the shell you are using.
I have the following set for my .cshrc file for these type of situations.
 unset autologout


Macbook A1181 Shuts down after a few minutes

Question: My dinosaur macbook randomly shuts down. I've reset the SMC and it still shuts down. Even the computer doesnt know its coming because you can hear the arm inside the hard drive clunk as it shuts down. If you leave it sit it will last longer on the next startup. Sometimes it wont even make it to the startup chime.
Comment: @YourAverageComputerGeek - Your OP does not ask a question. Are you trying to determine why this is happening? Are you trying to keep this from happening? Are you reporting that it happens so other people are aware? Whatever the case, can you please edit your post to include the reason for your post, please? Thank you!
Comment: What's the exact model number?
Answer: Try to boot macOS from external Hard Drive or SSD. If it's stable your internal disk is damaged.
Read about external startup here.
Answer: Your MacBook is anywhere from 8 to as much as 11 years old. In my experience, you are looking at hardware failure. This is difficult to diagnose online and may be impossible to solve in a laptop form-factor, depending on what has failed.
I would start with a full Apple Hardware Test. You will likely need the discs that came with your computer or a 10.6 or earlier Applications Install Disc 2. This doesn't always catch hardware failures, but when it does, it can help you figure out how to fix it.
If this produces no information, you may need to open the case and confirm that all the internal connectors and wiring is securely attached and not damaged in any way. Look for cracks in the logic board. Confirm no debris is inside the case. Check to make sure RAM is securely inserted.
If you don't find anything obvious, I've heard anecdotal evidence that suggests old, cracked thermal paste on the CPU or GPU.
At this point, I would start to consider buying a new MacBook. If you were comfortable with your MacBook's processing power and speed, you can get a MacBook or MacBook for around $999. If you go refurbished, you are currently looking at something as low as $849.
(As an aside, there could be an issue with the battery or power adaptor. This is tough to troubleshoot as it requires a purchase of a new battery and/or power adaptor, which can be more than $100. I see that as $100 that could go to a new MacBook, so I can't say I recommend troubleshooting down that path unless you are certain that is the cause.)
Comment: i already opened it, cleaned it, checked twice that all connectors were secure and in place, still no difference. Its probably the battery because when i opened the macbook i found the battery had expanded more than 1/2 an inch. i'm assuming because of overcharging and not a short circut.
Comment: The only thing i'm confused about is how it was doing it for so long? the battery just expanded not even 30 minutes ago. I popped a new one inside (my friend lent me his brand new one), and the problem still persists. I also popped a Yosemite hard drive into it, and got it to boot. I got to the select language screen and it shut down again. The 64gb sandisk ssd yosemite was on is now toast. I popped it into the computer we stole it from and now we get the blinking file folder (cant read drive error).


Bot Framework V4 Dialog wait for user input without prompting

Question: In Bot Framework V3 there was method Context.Wait() which provided a way how to wait for user input within dialog without necessarily prompting user for input. Typical scenario, is when you reply with HeroCard and you just wait for user's reaction, without sending pushy message like: "Please choose form the options".
In V4 I was not able to find to find context.Wait() respectively stepContext wait method, and so implementation of this behavior needed light walk around, provided in answer bellow. Maybe there is some better way ho to achieve it and will be glad if you share it.
Answer: you can return waiting result like this:
<code>return new DialogTurnResult(DialogTurnStatus.Waiting);
</code>
Answer: To achieve wait behavior without prompting user with the text, you can use send empty prompt like this:
<code> return await stepContext.PromptAsync("<emptyPrompt>", new PromptOptions { }, cancellationToken);
</code>


Why stuff a roast chicken with lemon, onion, and thyme?

Question: I just made a classic roast chicken and the recipe called for stuffing a lemon, thyme, and onion inside the cavity of the chicken. Why even bother stuffing the cavity with anything? What does it accomplish?
Answer: Lemon, herbs, onions, and garlic too are all aromatics that infuse into the chicken as it cooks giving it a lovely flavor. It doesn't absorb the flavors enough to call it a lemon chicken, but gives the chicken some flavor depth and acts as an enhancement. Stuffing the chicken helps these flavors to infuse better into the meat than spreading them around. Salt and pepper,too, should go in the cavity.
Answer: Putting ingredients inside as well as on the surface helps spread the flavors throughout the meat. They're also very moist so it helps the bird stay juicier. Plus, it adds to the aroma which, believe it or not, affects the flavor.
All in all, it's an easy way to make your chicken more delicious!
Answer: Hopefully, you pierced the lemon before stuffing it into the bird...
I have an old Italian recipe that calls for one or two (depending on sizes of lemons and the bird) lemons, placing them into the cavity and sewing up the opening before roasting.
Prior to going in, then lemons are rolled to loosen the skin and pierced several times with a skewer.
For the first part of the roasting, the bird is placed on it's breast (to let the juices flow into the meat), and then turned up the right way to let the breast crisp up and to even the cooking.
This method doesn't require basting of any kind - the lemon juices both moisten and infuse flavour into the meat.
Tastes delicious.
Answer: Sunday last I made a roast chicken.  Seasoned the cavity with salt and pepper, cut lemon halves, a head of garlic cut in half, huge bunch of rosemary.  Also brushed melted butter on the outside and put salt and pepper again.  It was amazing!  The meat was so juicy and tender and I (and my guest) could really taste the garlic, lemon and rosemary in the meat as well -- which I am perplexed at how the herbs in the cavity could season the meat.  Well, don't care -- it was delicious!
Comment: Welcome to SA!  It's unclear how your comment answers the question.  Note that SA is a question&answer site, not a discussion site.  Please edit it to address the question asked.


What is a particle in the context of QFT with interactions?

Question: This is a crossposting of the same question from mathoverflow: https://mathoverflow.net/q/454768/
It seems that this question was not received well there, claiming that this question is not mathematically precise enough.
I'm a bit of a novice, so bear with me.
My understanding of the story is as follows.
From Lagrangians to Irreducible Representations
The story of the types of possible particles begins with the Lagrangians. For example the Klein Gordon Lagrangian is what you get if you want the field equations to be $E^2=m^2+p^2$ when you graduate $E$ and $p$ to operators a la Schrodinger.
For each "free Lagrangian" (Lagrangian of a single type of particle) you get an associated Hamiltonian.
Then moving to the view of types of particles as irreducible unitary projective representations of the Poincare group, the relationship is that for each such representation $U$ we have that $U(a(t),1)=e^{-itH}$, where $a(t)=(-t,0,0,0)$, and $H$ is the associated Hamiltonian.
It seems to me therefore that going from the irreducible representation $U$ to the Hamiltonian $H$ is well defined, but not vice versa. So I guess going from the Lagrangian to the irreducible representation requires some choices. (Intermediate question: is this correct?)
One of the nice things is that the spin-statistic theorem tells you a classification of such representations.
To my understanding, the language of representations of Poincare is the only one that truly makes sense, because in the language of representations time evolution is relativistic: the state $\psi$ from the viewpoint of the spacetime point $x$ "evolves" into $U(a,A)\psi$ for the spacetime point $(a,A)x$, where $(a,A)$ is an element of the Poincare group. If we only have Hamiltonians, we are essentially restricted to moving along $a(t)=(-t,0,0,0)$.
The Interaction Picture
It seems to me that in the textbooks you begin not with Lagrangians and not with irreducible representations, but with Hamiltonians.
You let $H=H^{free}+H^{int}$, where $H^{free}$ is the sum of Hamiltonians of "free" types of particles, with no interactions; and $H^{int}$ has interaction terms.
It seems to me like if things were good in the world, then this $H$ can be associated to an irreducible (or perhaps reducible) unitary projective representation of Poincare. But I don't see it in any of the textbooks.
It also seems unclear to me why such a representation would be at all related to the representations of each particular free particle whose Hamiltonian is a summand in $H^{free}$.
To make things more confusing, it seems that when physicists make any type of computation about time evolution in the interaction picture, everything is weird. They do some mix of the Heisenberg and Schrodinger pictures, letting $H^{free}$ evolve according to one and $H^{int}$ according to the other, and they often take time to minus and plus infinity, and then do a bunch of things about re-order operators to avoid things that are clearly nonsense.
Question
What is the proper way to think of interactions? Can you think of it as a representation, or is it not known how to do that? If you could think of it as an irreducible unitary projective representation, then it would be beholden to the spin-statistic theorem, which would mean that it would have a spin -- that'd be weird!
Also, it seems like there is no way to relate this representation to the representations associated with the free particles in the theory, so that's weird also. What's the right way to think about it? Is it really just that the Hamiltonians kind of look the same, and there's no formal connection?
Some thoughts
If I wanted to think of the interaction as a representation, it would make sense to me to have the Hilbert space be the tensor product of the Hilbert spaces associated with each free particle in the theory. But of course taking the tensor product of the representations associated with the free particles would be the same as the non-interaction picture.
We already know that we want $U(a(t),1)=e^{-itH}$ for $a(t)=(-t,0,0,0)$, where $H$ is the entire Hamiltonian including the free and interaction parts. But how would that determine the representation? Perhaps the Lorentz part should be completely determined by its action defined on the free parts.
How does any of this relate to the weird half-Schrodinger half-Heisenberg voodoo that they do with the $S$-matrix? I feel like the math here is missing something.
Answer: Interactions are not representations in the same sense that particles are representations. Instead, interactions are processes that can be represented as transformations applied to sets of (tensor products of) particles, converted them to different sets of particles. For example, an annihilation process would take a set consisting of a particle and its antiparticle and convert them into a pair of different particles (two photons).
The Hamiltonian is also not a representation in the same sense as a particle. It is better thought of as an observable, specifically for the energy in a system. In that sense, it always transforms trivially under Poincare. The interaction terms in the Hamiltonian therefore has the same properties. Each interaction term contains details of the sets of particles that can take part in such an interaction, but combined with all the versions one can get by inverting the time lines for the respective particles. Therefore, the same interaction term that represents annihilation would also represent Compton scattering, for example.


How to add a custom subview to a UITableViewCell derived class when the UITableViewCell is loaded using loadNIB

Question: I am trying to add a custom view control to a custom UITableViewCell which I had designed in the interface builder.
Now, to load UITableCellView I am using
NSArray * loadedViews = [[NSBundle mainBundle] loadNibNamed:@"CustomSearchResultsCell" owner:self options:nil];
What method of the  CustomSearchResultsCell class will be called the Nib loads the view and initializes it. I tried using viewDidLoad, but UITableViewCell does not respond to this method. Also initWithStyle is not being called in this case.
TIA
Nitin
Answer: Views loaded from a nib are initialized with initWithCoder:, which you can implement in a similar way like initWithFrame:.
Answer: Also, take a look at Apple' Sample Code called AdvancedTableViewCells. In this example they use following code to load table view cell from XIB:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"ApplicationCell";

    ApplicationCell *cell = (ApplicationCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil) {

        [[NSBundle mainBundle] loadNibNamed:@"IndividualSubviewsBasedApplicationCell" owner:self options:nil];
        cell = tmpCell;
        self.tmpCell = nil;
    }

    return cell;
}