Converting Enumeration for loop from Java to C#? What exactly is an Enumeration in C#?
What is the best way to iterate over a dictionary?
Change the Fill Color of a cell if the value of that cell equals the value of another specific cell I want to change the fill color of cell C5 if it has the same value as cell A5.   Can this be done? I know how to format cell C5 if it has a certain value - but not when it is to be compared to the value of another cell. There is by now a captcha-problem How to write a unit-test / test class for trigger? How do I write a unit-test / test class for a trigger?  What are my options?   Inline with the trigger?  New Class? Does this need a comma? (Up to / until / by) 50% off I wonder if someone could tell me which choice works in the following sentence and why the others do not work: (From my point of view, all of these choices work in this context.)  They have great promotion till January 5th......50% off. a) up to; b) until; c) by Derivative of inverse function at a point. Let $f\left(x\right)=x^{13}+3x^{9}+2x^{5}+x^{2}+x+2$ find $\left(f^{-1}\right)'\left(1\right)$. Can somebody show me the method? I am a little confused. Intersection of finitely generated ideals Let $I$, $J$ be finitely generated ideals in a ring $A$ (commutative with identity). I know that the intersection need not be finitely generated: can somebody give me an example?   Thanks. Why is $1 in a function not printing the script's first argument? Why doesn't echo $1 print $1 in this simple bash script?    #!/bin/bash # function.sh print_something () { echo $1 } print_something  $ ./function.sh 123  -&gt; why doesn't it print '123' as a result? View vote count button on mobile On the mobile site, can there be a button directly below the vote up/down buttons for viewing vote counts? When I am using the mobile site and I want to view vote counts, I have to switch to the full site to do it which is very inconvenient.   It could be a small link that says "vote counts," because I don't know what the button would be (the letter "V?" a "+/-" thing? I have no idea).  Related:  , but I am requesting an additional button below the vote buttons. That way you won't accidentally click a vote button. Does Blender support dual-GPU rendering if the two GPUs aren't the same? I have a GTX 1060 6GB in my current build, and I also have a GTX 960 2GB in storage. I was wondering if I got , and got both of my GPUs in one build (not SLI or CrossFire, just in the same system) would I be able to use both GPUs for rendering simultaneously? I don't care if this means having them both render separate tiles in one instance of Blender, or rendering separate frames in two instances. I'm using Cycles for everything I do. I've made some high resolution pixel art in PS by drawing it down at the pixel level and then increasing the image size with the nearest neighbor setting to keep it crisp. In the web browser, however, I need to display these images as icons with a dynamic size, so I can't just size the images correctly to begin with, and the broswer seems to blur the images when rendering them smaller, while vector images seem to stay more crisp as they shrink.   So I'm wondering if there's a way to convert the pixel art neatly into vector. I'm aware of the trace function in illustrator, but it seems to do a rough job iirc. Disable display of passwords on an iPhone? Once you have defined a passcode to unlock an iPhone, and for every application asking a password, when waiting for a password an iPhone makes a transient display of any character you type. It is clear that this transient display was purposefully set in place to help people who have problems with passwords or with the on screen keyboard. This transient display lasts 3 seconds to avoid too big a security problem. But this is still largely sufficient for anyone behind you to read it really easily. Moreover this transient display can be easily captured by any camera or by a software on the iPhone:    I evaluate this echo of any password as a serious risk. This echo partially exposes a secret.  Is there any simple configuration method to suppress everywhere this mechanism of transient display of any password?    For information, I reported this security problem at :     Once I have defined a passcode to protect my iPhone, and within every   application asking me a password, when entering my password iOS makes   a transient display of any character I type. I guess that this   transient display of passwords was purposefully set in place to help   people who have problems with passwords or with the on screen   keyboard. This transient display lasts 3 seconds to avoid to create   too serious a security problem. But this is still amply sufficient for   anyone behind you to read it really easily.      This transient display can be easily captured by a camera   surreptitiously activated by a malicious neighbour.      I didin't find any easy way to block this security weakness with iOS 7   up to iOS 9.      How to disable this transient display of any password on iOS? How to render world position pass A world position pass is a pass used for composting other elements into the scene after the initial render. In a world position pass the R, G, B values correspond to the X, Y, Z axis (or X, Z, Y). A world position pass could look something like this. (Image form another 3d app)    Is there a way to render out corresponding world space coordinates of each pixel? I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM? How to check if jQuery.ajax() request header Status is "304 Not Modified"? DC Motor as a Generator Voltage and Current How do I make an object face the mouse position, but only on one plane? I want a game object to turn and look towards where the mouse was clicked (in world space).  It works well when considering all 3 dimensions, but I really only care for the plane formed by the x and z axis, not the y.  I've tried to fix this by setting the y of the directionTarget to the y of the object's position, but that gives weird results.  My code looks like this:  Quaternion rotationTarget;     float rotationLerpProgress;     float rotationLerpDuration = 1f;      // Use this for initialization     void Start ()     {      }      // Update is called once per frame     void Update ()     {             if (Input.GetMouseButtonDown (0)) {                     var ray = Camera.main.ScreenPointToRay (Input.mousePosition);                     RaycastHit rayHit;                      if (Physics.Raycast (ray, out rayHit)) {                             var rayHitPoint = rayHit.point;                              var rotationDirection = transform.position - rayHitPoint;                                                            rotationDirection.Normalize ();                             //rotationDirection.y = transform.position.y;                             rotationTarget = Quaternion.LookRotation (rotationDirection);                             rotationLerpProgress = Time.deltaTime;                     }                     //targetPosition = Camera.main.ScreenToWorldPoint (Input.mousePosition);                                     }              if (rotationTarget != transform.rotation) {                      transform.rotation = Quaternion.Lerp (transform.rotation, rotationTarget, rotationLerpProgress / rotationLerpDuration);                     rotationLerpProgress += Time.deltaTime;                       if (rotationLerpProgress &gt;= rotationLerpDuration) {                              transform.rotation = rotationTarget;                     }              }      }   I must be missing something. How do I do this right? Interpretation of simple predictions to odds ratios in logistic regression I'm somewhat new to using logistic regression, and a bit confused by a discrepancy between  my interpretations of the following values which I thought would be the same:    exponentiated beta values  predicted probability of the outcome using beta values.    Here is a simplified version of the model I am using, where undernutrition and insurance are both binary, and wealth is continuous:  Under.Nutrition ~ insurance + wealth   My (actual) model returns an exponentiated beta value of .8 for insurance, which I would interpret as:     "The probability of being undernourished for an insured individual is .8 times the probability of being undernourished for an uninsured individual."   However, when I calculate the difference in probabilities for individuals by putting in values of 0 and 1 into the insurance variable and the mean value for wealth, the difference in undernutrition is only .04. That is calculated as follows:   Probability Undernourished = exp(β0 + β1*Insurance + β2*Wealth) /                              (1+exp(β0 + β1*Insurance + β2*wealth))   I would really appreciate it if someone could explain why these values are different, and what a better interpretation (particularly for the second value) might be.     Further Clarification Edits As I understand it, the probability of being under-nourished for an uninsured person (where B1 corresponds to insurance) is:  Prob(Unins) = exp(β0 + β1*0 + β2*Wealth) /               (1+exp(β0 + β1*0+ β2*wealth))   While the Probability of being under-nourished for an insured person is:  Prob(Ins)= exp(β0 + β1*1 + β2*Wealth) /            (1+exp(β0 + β1*1+ β2*wealth))   The odds of being undernourished for an uninsured person compared to an insured person is:  exp(B1)   Is there a way to translate between these values (mathematically)? I'm still a bit confused by this equation (where I should probably be a different value on the RHS):  Prob(Ins) - Prob(Unins) != exp(B)   In layman's terms, the question is why doesn't insuring an individual change their probability of being under-nourished as much as the odds ratio indicates it does?  In my data, Prob(Ins) - Prob(Unins) = .04, where the exponentiated beta value is .8 (so why is the difference not .2?) Does blocking an attack with the Shield spell still trigger Armor of Agathys? I am contemplating a Oath of Conquest Paladin / Sorcerer multiclass character, with a 1 level dip in hexblade warlock. This character will have access to the Armor of Agathys and Shield spells, which potentially allows for a pretty nice combo. The Shield spell states (PHB 275):  Casting Time: 1 reaction, which you take when you are hit by an attack or targeted by the magic missile spell... Until the start of your next turn, you have a +5 bonus to AC, including against the triggering attack,  It looks like you are indeed hit by an attack, but since you have a bonus to AC, you can potentially force that attack to miss instead. Armor of Agathys states (PHB 215),  If a creature hits you with a melee attack while you have these hit points, the creature takes 5 cold damage.  If I cast Shield and cause an attack that &quot;hit&quot; me to miss, does Armor of Agathys still deal damage? I am leaning toward yes, though this combo seems a little too strong--Shield is already a strong spell, and this character will eventually have 9 1st level spell slots and a 7th level spell slot. Not only can they freely block attacks with Shield, but they can also deal up to 35 (5d10) damage to the attacker without an attack roll or saving throw. While a Warlock would have to spend both of their spell slots to do this once, my character would be able to do this 4 times with spell slots to spare. Some notes:    ask about reducing the damage from a confirmed hit to zero. This question is asking about what happens when the Shield spell causes the attack to miss entirely. A number of online resources, such as the Roll20 5th edition compendium, seem to be missing the correct casting time for the Shield spell. Answerers should make sure they're looking at the correct version from the PHB. I have been playing with the settings for the text object recently, and every time I add a new text object, I need to change the font to my favorite one. (Eurostile LT ExtendedTwo) Is there any way to change the default font so I do not need to change it every time I add a new text object?   Example: