Why, oh why, does R automatically eliminate variables from my dataset when running lm?
Understanding dummy (manual or automated) variable creation in GLM
What is the noun for someone who receives a referral? When a referrer (noun) gives a referral (noun) to another person, what is the term (noun) used for the recipient of the referral? "The referred" may work, but am I missing another term? "Referred" indicates past-tense, but I intend to use the term in future and present tense as well. Should I use #define, enum or const? In a C++ project I'm working on, I have a flag kind of value which can have four values. Those four flags can be combined. Flags describe the records in database and can be:   new record deleted record modified record existing record   Now, for each record I wish to keep this attribute, so I could use an enum:  enum { xNew, xDeleted, xModified, xExisting }   However, in other places in code, I need to select which records are to be visible to the user, so I'd like to be able to pass that as a single parameter, like:   showRecords(xNew | xDeleted);   So, it seems I have three possible appoaches:  #define X_NEW      0x01 #define X_DELETED  0x02 #define X_MODIFIED 0x04 #define X_EXISTING 0x08   or  typedef enum { xNew = 1, xDeleted, xModified = 4, xExisting = 8 } RecordType;   or   namespace RecordType {     static const uint8 xNew = 1;     static const uint8 xDeleted = 2;     static const uint8 xModified = 4;     static const uint8 xExisting = 8; }   Space requirements are important (byte vs int) but not crucial. With defines I lose type safety, and with enum I lose some space (integers) and probably have to cast when I want to do a bitwise operation. With const I think I also lose type safety since a random uint8 could get in by mistake.  Is there some other cleaner way?  If not, what would you use and why?  P.S. The rest of the code is rather clean modern C++ without #defines, and I have used namespaces and templates in few spaces, so those aren't out of question either. I've recently updated to Ubuntu 15.04 and after installing the latest nvidia drivers (346.59) which worked on ubuntu 14.10 seems to have caused some trouble on boot.  All I get is the following when booting:   A purple screen for about a second and then  [0.514409] ACPI PPC Probe failed. Starting version 219  A black screen with a message of my monitor saying : No Signal detected.   I am using a GTX 970. I've encountered a particular type of writing occasionally and it being, derp, in writing, it's hard to tell whether there's an accent behind it. The English used seems to me to be simply incorrect, but I can't help but feel that the following features are part of a dialect or a regional style of English. One of the most glaring (and grating) features is the substitution of &quot;saw&quot; with &quot;seen&quot;.  He seen him at the shop the other day. I seen that you were looking for... etc.  The use of &quot;away (to)&quot; is also peculiar, if not incorrect.  He was away to open the door when... He was away to get what he had asked for. etc.  I haven't come across these forms very often, and even then it was accompanied by otherwise mostly correct English, which is what makes me wonder what the hell. This is more intellectual curiosity than anything else. Confirm and agree to negative questions $e^{i\theta}=\cos\theta + i\sin \theta$  $e^{i\sin^{-1}x}=\cos(\sin^{-1}x)+i\sin(\sin^{-1}x)$  $i\sin^{-1}x=\ln|\sqrt{1-x^2} + ix|$  $\sin^{-1}x=-i\ln|\sqrt{1-x^2} + ix|$  Now from here I'm kind of lost, since it seems like this should be the definition, but when I look it up, the definition of inverse hyperbolic sine is:  $\sinh^{-1}x=\ln(\sqrt{1+x^2} + x)$  So although they're very similar, I guess I just don't know how to handle the logarithm and anything to the ith power or drop off the absolute value. Sharing a Bluetooth Keyboard and Mouse sequentially between two Macs "To do this" or "For doing this" to start explaining something? Many questions have been asked and answered about "to + bare infinitive" vs "for + gerund" in the middle of a sentence.  However, when one wants to start explaining something, what is better? For instance:  "Now, let us focus on baking the bread.   To do this, start by turning the oven on.", or For doing this, start by turning the oven on."?   Are there even better expressions? I have not found anything concerning this situation, and I feel that the answers about the same problem but in the middle of a sentence do not apply here. Key Derivation Functions vs. Password Hashing Schemes Key derivation functions, such as HKDF (standardized in ), are meant to stretch some initial keying material having enough entropy, like a Diffie-Hellman shared value, into one or more strong cryptographic secret keys.   Password-hashing schemes, such as the  winner , are meant to hash usually low-entropy passwords with the goal of making the hash digest inversion as costly as possible for an adversary with respect to CPU and memory consumption, as well as parallelization.  Is it exact to consider that password-hashing schemes are actually key derivation functions specialized for low-entropy inputs? Or is there any other essential difference of theoretical nature between these two types of cryptographic schemes? How can I make sure that only low and medium security inmates are in a specific area? Is it possible to reverse the overlay you can set? It seems like you are only able to clear areas for low OR medium security prisoners, but sharing is not possible. The thing I want here is to make sure that max security prisoners are not in certain areas. Windows update giving error 80070002 and manual update not working how to update? I have been trying to update my pc from 20h1 to 20h2 but the windows update shows error message 80007002 and when I manually install the update using windows 10 update assistant it downloads completely and then even starts install and gets stuck at 87 percent on the screen where it says do not turn off. What to do? This is the log file. Matching Profile found: FindRollbackFailure - 3A43C9B5-05B3-4F7C-A955-88F991BB5A48 SetupDiag version: 1.6.0.0 System Information:     Machine Name =      Manufacturer =      Model =      HostOSArchitecture = 1033     FirmwareType = UEFI     BiosReleaseDate = 20160513000000.000000+000     BiosVendor = A12     BiosVersion = A12     HostOSVersion = 10.0.19041     HostOSBuildString = 19041.1.amd64fre.vb_release.191206-1406     TargetOSBuildString = 10.0.19041.621 (vb_release_svc_prod1.201014-1758)     HostOSLanguageId =      HostOSEdition = CoreSingleLanguage     RegisteredAV = Quick Heal Internet Security     FilterDrivers = FileInfo     UpgradeStartTime = 12/20/2020 2:54:38 PM     UpgradeEndTime = 12/20/2020 5:30:40 PM     UpgradeElapsedTime = 02:36:02     CV = Pi3IdU3SlEqpFx93     ReportId =    Error: SetupDiag reports rollback failure found. Last Phase = Pre OOBE Boot Last Operation = OOBE boot apply Error = 0xC1900101-0x4000D LogEntry:   Refer to &quot;https://docs.microsoft.com/en-us/windows/desktop/Debug/system-error-codes&quot; for error information.  Last Setup Phase: Phase Name: Pre OOBE Boot     Phase Started: 12/20/2020 4:37:50 PM     Phase Ended: 1/1/0001 12:00:00 AM     Phase Time Delta: 00:00:00     Completed Successfully? False   Last Setup Operation: Operation Name: OOBE boot apply     Operation Started: 12/20/2020 4:37:50 PM     Operation Ended: 1/1/0001 12:00:00 AM     Operation Time Delta: 0:00:00:00.0000000     Completed Successfully? False I'm working on this problem from Elementary Analysis by Ross which is intuitive when sketched but keeps stymieing me when I try to write it out.  Let $f$ be a continuous function on $[a,b] \subset \mathbb{R}$. Define $f^\star (x)$ as:  $$ f^\star(x) = \sup \{f(y)\mid a \leq y \leq x \} $$ Prove that $f^\star$ is a continuous increasing function on $[a,b]$.  Things I've figured out: (these are mostly trivial)   $f$ is uniformly continuous on $[a,b]$. Since $[a,b]$ is closed and bounded there exists some $c \in [a,b]$ such that $f(c) \geq f(x)\ \forall x \in [a,b]$. (In words: the supremum is actually attained.) If $c \in [a,b]$ is as above, then $f^\star$ is constant (and hence continuous) on $[c,b]$ (which is possibly a singleton).   This seems completely obvious when you actually draw a continuous function but translating that to a formal proof eludes me... Split Excel table over multiple PowerPoint slides I have a table in Excel which is too long for one PowerPoint slide. So I would like to split it over 2 or 3 slides, but have the header on each of the slides. What is the easiest way to accomplish that? I am using Excel and PowerPoint 2007. Prove $\mathbb{P}(\sup_{t \geq 0} M_t > x \mid \mathcal{F}_0)= 1 \wedge \frac{M_0}{x}$ for a martingale $(M_t)_{t \geq 0}$ Let $M$ be a positive, continuous martingale that converges a.s. to zero as $t$ tends to infinity. I now want to prove that for every $x&gt;0$ $$ P\left( \sup_{t \geq 0 } M_t &gt; x \mid \mathcal{F}_0 \right) = 1 \wedge \frac{M_0}{x}. $$ My approach: I thought that rewriting the conditional probability to an expectation would help so we obtain that we must prove: $$ \mathbb{E} \left[ 1_{\sup_{t \geq 0 } M_t &gt; x}  \mid \mathcal{F}_0 \right] = 1 \wedge \frac{M_0}{x}.$$ A hint to me was given that I should consider stopping the process when it gets above $x$. Thus a stopping time that would do this is $\tau = \inf\{t\geq 0 : M_t&gt;x\}$. But now I'm stuck as I want to apply optional sampling results but we have an indicator which complicates things. How could I proceed from this? Any help is appreciated! Undergraduate/High-School-Olympiad Level Introductory Number Theory Books For Self-Learning I can't get to the bottom of this error, because when the debugger is attached, it does not seem to occur.  Collection was modified; enumeration operation may not execute  Below is the code. This is a WCF server in a Windows service. The method NotifySubscribers() is called by the service whenever there is a data event (at random intervals, but not very often - about 800 times per day). When a Windows Forms client subscribes, the subscriber ID is added to the subscribers dictionary, and when the client unsubscribes, it is deleted from the dictionary. The error happens when (or after) a client unsubscribes. It appears that the next time the NotifySubscribers() method is called, the foreach() loop fails with the error in the subject line. The method writes the error into the application log as shown in the code below. When a debugger is attached and a client unsubscribes, the code executes fine. Do you see a problem with this code? Do I need to make the dictionary thread-safe? [ServiceBehavior(InstanceContextMode=InstanceContextMode.Single)] public class SubscriptionServer : ISubscriptionServer {     private static IDictionary&lt;Guid, Subscriber&gt; subscribers;      public SubscriptionServer()     {                     subscribers = new Dictionary&lt;Guid, Subscriber&gt;();     }      public void NotifySubscribers(DataRecord sr)     {         foreach(Subscriber s in subscribers.Values)         {             try             {                 s.Callback.SignalData(sr);             }             catch (Exception e)             {                 DCS.WriteToApplicationLog(e.Message,                    System.Diagnostics.EventLogEntryType.Error);                  UnsubscribeEvent(s.ClientId);             }         }     }          public Guid SubscribeEvent(string clientDescription)     {         Subscriber subscriber = new Subscriber();         subscriber.Callback = OperationContext.Current.                 GetCallbackChannel&lt;IDCSCallback&gt;();          subscribers.Add(subscriber.ClientId, subscriber);                  return subscriber.ClientId;     }      public void UnsubscribeEvent(Guid clientId)     {         try         {             subscribers.Remove(clientId);         }         catch(Exception e)         {             System.Diagnostics.Debug.WriteLine(&quot;Unsubscribe Error &quot; +                      e.Message);         }     } } How can I switch back to Nvidia card from Intel with Nvidia-prime So I updated to Ubuntu 14.04 and found that the primusrun command no longer works, so ditched bumblebee in favour of nvidia-prime. This lets you switch video card from nvidia-settings rather than running through the command line (I prefer the old method, but want the primus performance).  The problem is that after switching to Intel from nvidia-settings, I can no longer open it up again to switch back to the nvidia card. When I open nvidia-settings I get a segmentation fault (according to the terminal).  Is there any way to open nvidia-settings switch back? I would like the ability to be able to switch between the two since having the nvidia card on all the time kills my battery and heats up the laptop a lot. How do I enumerate the properties of a JavaScript object?  I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of the window object. How can I connect a texture node to a material with Python? Scenario  I created a journey with a Contact Data entry event that is triggered via the API. A subscriber should be able to be injected multiple times and the values in the data extension are updated while the subscriber is in the journey. The updated values should determine the path the subscriber follows.  Setup  As changed data needs to be evaluated and the contactkey cannot be used as primary key, I added a random id as primary key and created an attribute group for the data extension in Data Designer. The data extension is linked to the contact's contactkey using a one-to-many relationship as a contact should be able to enter the journey multiple times.  In the journey I'm using a decision split that is configured to use contact data from the created attribute group and has two branches (as it checks a boolean value).  Problem  For multiple entries the decision split doesn't evaluate correctly and always leads to same branch (value equals false). I suppose the problem is that journey builder doesn't use the primary key to identify the correct row in the data extension. Is there any way to make sure the row is matched using this id and not the contactkey as this leads to some strange behaviour as described here: