I have a table with a composite foreign key like so:  CREATE TABLE a (   a1 INTEGER,   a2 INTEGER,   a3 INTEGER,   a4 INTEGER,   -- other columns   FOREIGN KEY (a1, a2, a3, a4) REFERENCES b );   The foreign key may or may not exists, therefore a1 to a4 may be NULL, however if so, they should be NULL all at the same time. Is there a better way to specify such an "optional composite foreign key" than to add a (rather verbose) constraint like so?    CHECK ((a1 IS NULL) = (a2 IS NULL) AND           (a3 IS NULL) = (a4 IS NULL) AND           (a1 IS NULL) = (a3 IS NULL))
I've noticed a MATCH SIMPLE and MATCH FULL, but I don't understand what they do. I see default is MATCH SIMPLE; but, how do the other MATCH clauses to the FOREIGN KEY constraint function?
Why do physicists believe that there exist magnetic monopoles? Let $G$ a group with normal subgroups $M,N$ such that $M\cap N=\{e\}$. Show that if $G$ is generated by $M\cup N$ then $G\cong M \times N$. I created one event receiver and deployed it, but only users who are site collection admins are able to view this web part. I have included the SPSecurity.RunWithElevatedPrivileges but the same thing. What am I missing?  Below is my code   public override void ItemAdding(SPItemEventProperties properties)     base.ItemAdding(properties);     SPSecurity.RunWithElevatedPrivileges(delegate()        {SPWeb web = properties.OpenWeb();         base.ItemAdding(properties);         string name= web.Lists[properties.ListId].Fields["first name"].InternalName;          var list = web.Lists["location names"];    });} The reminder email says:     We noticed you have not accepted our invitation to join Stack Overflow Careers. Only 3 days remain before it expires [...]      But please act soon: this invitation expires in 14 days [...]   Is it 3 days or 14 days now? I'm not too sure whether this is the right place to ask this (and please correct me if it is not), but I'm currently studying a course in Algebraic Number Theory and would like to be pointed in the direction of any solved problems that can assist in learning.  I have the book Problems in Algebraic Number Theory by Murty and Esmonde, which is particularly good, but are there any further sources (inc. online) available that do a similar job?   It is so often frustrating to be presented with an extensive list of practice questions, many of which form part of the exposition of the material (as in Number Fields by Marcus for example) and then to have no real way of knowing whether any solution you generate is correct and has not made any oversights.   MSE is undoubtedly a good place to verify any answers and clear up issues, but question limits and the impracticality of going online every time a solution seems suspect (or the question is computational and lacks any result to check against) form a barrier.  I suppose any ANT textbook that has an accompanying solutions manual or online published solutions is what I have in mind. Or failing that, links to institutions running a course in ANT with answers to homework exercises.  Thanks in advance. Chrome always quit when I click on the X button on a tab, without asking me anything!  Even when I close Chrome he do not alert me if I am willing to relay close it?   Many times it happened that accidentally I clicked on X button. How can I get a pure white background in jewelry photography, without losing sparkle and shine? I've read through several threads similar to this, but I'm looking for a comparison of two options here.   I currently take photos on a raised glass platform against a white foam board background and run about 300w of lights (3 100x LEDs @ 5000k, Home Depot Specials in softboxes and umbrellas). As you can imagine, it takes me about 15 minutes of post processing to achieve a perfect white background, and sometimes I have a particular photo that I am unable to get there.  I want to upgrade to either a photography table with a translucent background that I can place a speedlight under, or a cyclorama infinity background such as the MyStudio MS20. The latter option may require an upgrade to my lighting, which I am planning to do anyways.  The idea of course is to get a blown out 255 background with no post processing, other than color correction on the jewelry or product as needed. This would cut my time after the shoot to a ridiculously small amount of time.   Which option would make my life easier?   For reference, I currently use a D5300 with a Tamron 90mm f2.8 macro lens.  This is the best shot I got after quite a lot of effort, before and after processing:      Note that the silver is not shiny like it should be, and the sparkle on the gems is lost. There's an election going on. What's happening and how does it work? Limit of divided integrals Prove that: $$\lim\limits_{m\to \infty} \frac{\int\limits_0^{\pi/2}(\sin(x))^{2m} dx}{\int\limits_0^{\pi/2}(\sin(x))^{2m+1} dx} = 1$$  I had tried to get it from inequalities like $$(\sin(x))^{2m+1} \le (\sin(x))^{2m} \le (\sin(x))^{2m-1}$$ But I always hit a wall in that regard (I integrate the sin functions and from there keep on going but there it ends). Positive semidefinite cone is generated by all rank-$1$ matrices. So, through typing several commands I've found that there's not only ls, but l and la too. There doesn't appear to be any man entries on Ubuntu 12.14. They all appear to do similar things with minor differences:  $ ls app        config     CONTRIBUTING.md  doc       Gemfile       Guardfile  LICENSE  MAINTENANCE.md  Procfile  Rakefile   script  tmp     VERSION CHANGELOG  config.ru  db               features  Gemfile.lock  lib        log      PROCESS.md      public    README.md  spec    vendor $ la app      CHANGELOG  config.ru        db   features  Gemfile       .git        Guardfile  LICENSE  MAINTENANCE.md  Procfile  Rakefile   .rspec  .secret     spec  .travis.yml  VERSION .bundle  config     CONTRIBUTING.md  doc  .foreman  Gemfile.lock  .gitignore  lib        log      PROCESS.md      public    README.md  script  .simplecov  tmp   vendor $ l app/       config/    CONTRIBUTING.md  doc/       Gemfile       Guardfile  LICENSE  MAINTENANCE.md  Procfile  Rakefile   script/  tmp/     VERSION CHANGELOG  config.ru  db/              features/  Gemfile.lock  lib/       log/     PROCESS.md      public/   README.md  spec/    vendor/   Just as a bit of trivia, are there more of these and what do they do? Is here any place to find this out? Unfortunately, google searching these commands gets ignored because they're so short. Lagrangian of an effective potential If there is a system, described by an Lagrangian $\mathcal{L}$ of the form   $$\mathcal{L} = T-V = \frac{m}{2}\left(\dot{r}^2+r^2\dot{\phi}^2\right) + \frac{k}{r},\tag{1}$$   where $T$ is the kinetic energy and $V$ the potential energy, it is also possible to define the total energy $E$ of the system   $$ E = T + V =\frac{m}{2}\left(\dot{r}^2+r^2\dot{\phi}^2\right) - \frac{k}{r}.\tag{2}$$  If the angular momentum $M$ is defined by $$ M = m r^{2} \dot{\phi},\tag{3}$$ then $E$ can be written as  $$ E = \frac{m}{2}\dot{r}^2 + \underbrace{\frac{M^2}{2mr^2}-\frac{k}{r}}_{V_\textrm{eff}\left(r\right)},\tag{4}$$  where the last two terms are written as new, "effective" potential $V_\textrm{eff}\left(r\right)$.    In addition, using the definition of $M$, the Lagrangian $\mathcal{L}$ can be written as  $$ \mathcal{L} = \frac{m}{2}\dot{r}^2 + \underbrace{\frac{M^2}{2mr^2}+\frac{k}{r}}_{-V_\textrm{eff}\left(r\right)},\tag{5}$$  where the sign of $V_\textrm{eff}\left(r\right)$ has been changed, since $\mathcal{L} = T-V$. But from this argument, it appears that there are two different possible ways to construct the same effective potential. This seems to me contradictory. Where is my mistake? byte[] to hex string How do I convert a byte[] to a string? Every time I attempt it, I get      System.Byte[]    instead of the value.  Also, how do I get the value in Hex instead of a decimal? When Deadpool is in the hallway talking      he makes a joke about Fox springing for a few more X-Men and the camera pans to show Beast closing the door to get rid of the noise.   Who else was in the room? Word for "moving up one conceptual level" Why don't we read ''k'' here?  Know → /nəʊ/   Knotty → /ˈnɒt.i/   Knockout → /ˈnɒk.aʊt/ Which statistical test to analyse? I am trying to find out how inflammatory markers change in response to a mechanical device change. I have daily readings for the 5 days before the event and for the 5 days after the event. I am expecting a rise in inflammatory markers in the pre readings followed by a fall after the device change. I also need to find out how the change differs in two subgroups (sample sizes of the subgroups are n=21 and n=88). The aim is to find out if the change is significant, to consider these markers as predictors of the device failing and hence needing to be changed.    I would like to know what test would be appropriate to analyse this. I need to keep things simple as I and the people reading the results are non-statisticians. Where do I find the client id and client secret of an existing connected app? I am writing an article in English, with some pages in Russian.  \documentclass[12pt]{article}  \usepackage[T1,T2A]{fontenc}  \usepackage[utf8]{inputenc}  \usepackage[russian,english]{babel}  \usepackage{newtxmath} \usepackage{newtxtext} \begin{document}  hello \textbf{hello}  \selectlanguage{russian} привет \textbf{привет}  \end{document}   Output:  hello hello привет привет  I am using \selectlanguage{} to switch between languages when needed.  However, I noticed that when I try to use \textbf{} when in Russian language mode, it does not work because of newtxtext, which I am using for math formulas.  Does anyone know how to solve this problem?  Thank you. singlespacing in table with no indent