How should I design my table(s) to represent a list of objects, some of which are components of other objects?
Database design for products with bundles of products
Find the probability of an event determined by an inequality on exponential random variables Let X and Y be independent random variables such that $X∼Exp(1)$ and $Y∼Exp(2)$.  Find the probability that $3X+4Y≤5$.  I thought the equation for solving this was the integral from $\int_0^a \int_ 0^{(a-y)} \lambda_1 e^{-\lambda_1 x}\lambda_2 e^{-\lambda_2 y} dx dy$ where $a = 5$, so I first started with the integral from $\int_0^5 \int_0^{(5-y)} 3 \times 1e^{-1x} \times 4 \times 2e^{-2y} dx dy$ and got $23.83828927$ which is much larger than a probability can be. Any help? A murder of crows? I love the subset of collective nouns known as the terms of venery. These are collective nouns specific to a particular group of animals. Some of the more inventive examples are: a murder of crows, a crash of rhinos, a mischief of mice, and a puddling of ducks (specifically swimming ducks).  Is there a standard for these group names and is there a central reference for them as with other zoological taxonomy?  I can see in the Wikipedia articles that the practice has its origins in Medieval Hunting tradition, but the Kangaroo (Mob), for instance would have been unknown at that time, so how do new collections come into being? How can I use sed to replace a multi-line string? I've noticed that, if I add \n to a pattern for substituting using sed, it does not match. Example:  $ cat &gt; alpha.txt This is a test Please do not be alarmed  $ sed -i'.original' 's/a test\nPlease do not/not a test\nBe/' alpha.txt  $ diff alpha.txt{,.original}  $ # No differences printed out   How can I get this to work? startsWith() and endsWith() functions in PHP Lightning New Case action override I have action override on New Case button which runs our custom component.  As you know, we can create a new Case from different places in org, e.g. from related lists. When creating a Case from related list on Account using standard action in Lightning we have prepopulated AccountId to the lookup field. Is it possible to do the same with custom component? I can't catch the AccountId using force:hasRecordId, because action override redirects me to the new page with custom component where I don't have a context of Account. URL also doesn't contain its Id. What can I do to grab Id of context object and populate it to my component? Prediction in Cox regression I am doing a multivariate Cox regression, I have my significant independent variables and beta values. The model fits to my data very well.   Now, I would like to use my model and predict the survival of a new observation. I am unclear how to do this with a Cox model. In a linear or logistic regression, it would be easy, just put the values of new observation in the regression and multiply them with betas and so I have the prediction of my outcome.  How can I determine my baseline hazard? I need it in addition to computing the prediction.  How is this done in a Cox model? I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them.  The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents.  The other one I found is to edit .conf files in the /etc/init folder.  What's the recommended way to enable / disable / add services and why?  Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it? I saw a commercial on televison for preparing spaghetti without boiling the noodles, just place them in water for about on hour.  Can this be done? Why is my toilet bubbling? Last night while my washing machine and sink in the master bath was running, my master toilet started having air bubbles come up.  Then this morning while I was showering I heard bubbles again, and the shower was draining very slowly.  After the bubbles occurred my toilet in the master bath and powder room completely drained of water in the bowl and tank.  What is happening? I'm a teacher and I teach at/in school OR at/in a school There are a lot of posts on this topic, but I can't find any answers to my question.  I came across the following two definitions of 'school':        [uncountable] (used without the or a) the process of learning in a   school; the time during your life when you go to a school (British   English)   [uncountable] (used without the or a) the time during the day when   children are working in a school      Source:   I know there are better ways to convey the message, but which sentence would a teacher utter if he was a school teacher teaching students, adults, etc.? What about a janitor, director, and secretary?     I teach at/in school OR I teach at/in a school   The above definitions concern students, and not working individuals like teachers or janitors.  I would appreciate if you also stated whether you're American, Canadian, British, etc. How to put an acute on an i using Biber: issues with "\'{\i}" I use some packages with require utf8. Here is the main file:  \documentclass[a4paper,titlepage]{report}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[backend=biber,style=alphabetic]{biblatex} \addbibresource{refs.bib}  \begin{document} \nocite{*} \printbibliography[heading=bibintoc] \end{document}   And here is the reference file:  @MISC{Example,     author = {Author with spec\'{\i}al character},     title = {Title} }   I have no issues with composing special characters like \H{o} (ő) or \k{a} (ą). However, when I try to compose \'{\i} (í), I get the following inputenc error: "not set up for use with LaTeX". It seems like double compositions are not allowed. A solution is to use \'{i} instead, but not removing the dot is ugly. Surely there must be a better way?  Note: I have tried to add \DeclareUnicodeCharacter{00ED}{\'{\i}} to the preamble, but it doesn't help either. How to show that $\mathbb{Q}$ is not $G_\delta$ Proof verification of a number theory problem involving sequences. How to install JSTL? The absolute uri: http://java.sun.com/jstl/core cannot be resolved Find out which application listens to specific key bindings? I tried the following code to replace QQ with ZZ, but it doesn't do what I want:  var1=QQ sed -i 's/$var1/ZZ/g' $file   However, this code does what I want:  sed -i 's/QQ/ZZ/g' $file   How do I use variables in sed? &quot;I hate wizards. If he so much as points a finger at me, you stick him, Hook.&quot; &quot;Remind me to find out the name of that flooring company so I can be sure never to buy so much as a carpet tile from it.&quot; &quot;I didn’t listen so much as survive the conversation.&quot; I have an interest in contour integration. I am not that good at it, but I enjoy learning what I can about it.  Here is a version of a rational log integral rarely encountered.  $\displaystyle \int_{0}^{1}\frac{\ln(x^{2}+1)}{x+1}dx=\frac{3}{4}\ln^{2}(2)-\frac{{\pi}^{2}}{48}$  I can do this using real methods (via double integral and substitution). I can post my workings if anyone would be interested.  My question is, can this be evaluated using contour integration due to the limits being $[0,1]$ instead of $[0,\infty)$?.  Contours may not be the most efficient way to go about it, but what is the course of action when the limits are 0 to 1 instead of 0 to infinity?. How to convert a one digit number to a two digit number I have a table that represents a timetable for bus, so each cell contains time of departure as hour followed by minute, both as two digits, but sometimes I don't have two digits,just one so I have to switch eg. from 12 4 -&gt; 12 04. How is it possible? Why do function pointers all have the same value?