Rails force ssl only on specified controllers
Partial SSL in rails
How to put a framed box around text + math environment How can I get a views exposed filter to persist across multiple views? I have 2 separate views that return a set of results for each of my content types. The fields are different, but the filters are exactly the same - Sort by Location / Distance. This Distance / Proximity filter is exposed, and it is set to 'remember' the last entry. I followed the tutorial here  to be able to filter results by distance. It works great.  In views, to remember the last entry, Views uses sessions. But, each view has its own individual $_SESSION variable. That means what I set for one view does not carry over to the next, and even each view can have different values, which is not what I want. Here is a dump of the session after they have been set:  [views] =&gt; Array     (         [search_pages] =&gt; Array             (                 [default] =&gt; Array                     (                     )              )          [baby_clothes_pages] =&gt; Array             (                 [default] =&gt; Array                     (                         [distance] =&gt; Array                             (                                 [postal_code] =&gt; 11211                                 [search_distance] =&gt; 100                                 [search_units] =&gt; mile                             )                      )              )          [baby_gear_pages] =&gt; Array             (                 [default] =&gt; Array                     (                         [distance] =&gt; Array                             (                                 [postal_code] =&gt; 22343                                 [search_distance] =&gt; 100                                 [search_units] =&gt; mile                             )                      )              )      )   What I would like to do is create a small module or snippet of code that will simply allow someone to type in their 5 digit zip code and then it update all the values across all my pages with this filter. If it is changed on any page, then it changes it for the rest of the pages as well. It also needs to work so that it affects the results on the next page load so that it correctly shows them filtered.  Here is a snippet of code I was experimenting with to try to set this value, but it's the wrong direction.   $all_views = views_get_all_views();            // get an array of all views in use on the site  foreach ($all_views['category_pages']-&gt;display as $key =&gt; $value) {  //check to see if the structure exists I am looking to modify if(array_key_exists('postal_code', $all_views['category_pages']-&gt;display[$key]-&gt;display_options['filters']['distance']['value'])) {  //if so, set its value $all_views['category_pages']-&gt;display[$key]-&gt;display_options['filters']['distance']['value']['postal_code'] = '28152';  //try setting the session instead $_SESSION['views']['category_pages'][$key]['distance']['postal_code'] = '28152';     }   What's the correct direction? How do I get this value changed? Could it be done in the template.php file with preprocess function? Should I do it in a module, and if so, what do I need to alter?  Very lost at this point. Thanks for the direction! Limit of integration can't be the same as variable of integration? I am told that an expression like $$ \int_a^x f(x)dx $$ is not well formed, i.e. it should be $$ \int_a^xf(t)dt $$ or similar.  Why is it that the limits of integration can't depend on the variable of integration? Creating non-reverse-engineerable Java programs Is there a word for happiness made possible by a tragic situation? I frequently find myself needing a word to express happiness that acknowledges a tragic or unfortunate circumstance underpinning that happiness. Preferably the word could have both adjective and verb forms. For example, "Gregory [verb-ed | felt adjective about] the balmy February day, suspecting it was yet another consequence of catastrophic and irreversible climate change."  "Bittersweet" is close, but not precisely right. It implies ambivalence rather than genuine gladness. "Schadenfreude" is also in the neighborhood, but I don't want to imply that the tragic part of the situation is what causes the pleasure. (Also, I recognize that the word may not quite exist in English, and I don't know if this is forbidden for this forum, but I'd welcome a loan word or phrase if there's a better one.) Since we're all into this OpenID thing, I think it would be really useful (and quite easy) to implement a friend invitation feature that grabs a list of friends from one's webmail contact list with an option to choose who to invite to SO, SF or SU. Something in the line of Facebook's friend invitation and recommendation feature. I am compiling a program which requires boost-thread-mt library. I have installed libboost-all-dev using sudo apt-get install libboost-all-dev but compiler says that it cannot find boost-thread-mt library. Is this library in some other package? Please guide me what i need to install for this. How do you report percentage accuracy for glmnet logistic regression? 3rd iterate of a continuous function equals identity function If $ f: \mathbb{R} \to \mathbb{R} $ is continuous, and $\forall x \in \mathbb{R} :\;(f \circ f \circ f)(x) = x  $, show that $ f(x) = x $.  The condition that $f$ is continuous on $\mathbb{R}$ is crucial for the proof. I can find functions such as $\displaystyle\frac{x-3}{x+1}$ that satisfies  $ (f \circ f \circ f)(x) = x $. I have tried to negate the conclusion to see if there's a contradiction, but got stuck. How to convert numbers between hexadecimal and decimal How do you convert between hexadecimal numbers and decimal numbers in C#? Is there an equivalent of computation of physical processes in nature? I was watching a waterfall in the Austrian Alps. There were thousands of water droplets falling down, splattering on the stones below. I thought - how does nature find out so quickly where each droplet of water should go? To find out what happens to a falling droplet of water, one can use the laws of motion and calculate the trajectory. To calculate, one needs some amount of time, some machine (the brain, computer) and some energy to feed the machine. Does it make sense to ask what is the equivalent of this computation in nature? How does nature find out so quickly how things should move? More generally, to find out how anything should happen? Where is the &quot;calculation&quot; in nature? There's no room or energy for a machine in the particles that make up things. Is there a constructive way to exhibit a basis for $\mathbb{R}^\mathbb{N}$? Abnormal PREEMPTIVE_OS_AUTHENTICATIONOPS Waits How do I use Conditional Formatting based on due dates in Excel 2013? I am trying to format cells in Excel 2013. I want the cells to get colored as green, yellow, and red based on how close they are with the target date (January 13, 2015 in this case).  I am unable to use conditional formatting as Excel says that relative formatting is not permitted within conditional formatting.   Target:   06-01-2015  01-01-2015 02-01-2015 03-01-2015 04-01-2015 05-01-2015 06-01-2015 07-01-2015 08-01-2015 09-01-2015 10-01-2015   If the date in the cell is more than 2 days of the target date, I want the cell to change color to Green. I used =DATEDIF($N12,$N$9,"d")&gt;=3 and the format changed to green.  If the date in the cell is exactly 2 days near the target date, I want the cell to change color to yellow. I used =DATEDIF($N12,$N$9,"d")=2 and the format changed to yellow.  If the date in the cell is within 2 days of the target date, I want the cell to change color to red. I used =DATEDIF($N12,$N$9,"d")&lt;2 and the format changed to red only for 5th and 6th January. Apparently, it does not recognize negative values.  How can I get this to match the required colors? Avoiding Mixed DML (setup/non-setup) Approach I need an approach to allow delegated admins (i.e., non-Administators) to add members to Public Groups and Collaboration Groups (the GroupMember and CollaborationGroupMember objects).  I added a custom object (UserGroupRequest__c) to capture which Users should be added/removed to which Groups.    I've also built a batchable class to process the requests.  However, GroupMember is a Setup object, and CollaborationGroupMember is not.  So this doesn't work if I combine the operations in a single batchable class.  Should I instead be using 2 batch classes, calling one from the finish method of the other?    Any recommendations on how best to proceed?  Am I way off base?    Would a trigger on the Request object perhaps be better? I'm guessing that there may be a permission problem if this is attempted via a trigger as the delegated admins won't be able to add users to public Groups.  Also, I'm guessing the trigger approach would run into the same mixed DML issue - on Insert of the Custom object, I would need to Insert/Delete from GroupMember and from CollaborationGroupMember, and then perform a 2nd update on the Custom object to indicate that processing was completed... Reload activity in Android How do I get the size of a java.sql.ResultSet? Shouldn't this be a pretty straightforward operation? However, I see there's neither a size() nor length() method. How to fix very slow Ubuntu booting? Question: Can anyone shed some light on this formula? I can't find any information on it.  It has three corollaries that I also need to understand: Show $\text{Hom}_{Ab}(A,\mathbb{Q}) = \{0\}$ for finite $A$ I have a finite abelian group $A$ and I have shown that $A\otimes\mathbb{Q} \cong \{0\}$, the trivial group.  Now I want to show that $\text{Hom}_{\textbf{Ab}}(A,\mathbb{Q}) = \{0\}$, i.e we only have the trivial zero group homomorphism from $A$ to $\mathbb{Q}$.  The question I'm trying to solve is phrased in such a way that $\text{Hom}_{\textbf{Ab}}(A,\mathbb{Q}) = \{0\}$ should fall out almost automagically once you have that the tensor product collapses but I'm really stuck on this even though some people I talked to said it was really easy.  Some thoughts:   I've tried to assume the existence of a nontrivial homorphism $A \to    \mathbb{Q}$ to generate a contradiction but with no success. We have the Tensor-hom adjunction theorem stating that for abelian groups $A,B,C$ we have a natural bijection  $$\text{Hom}_{\textbf{Ab}}(A\otimes B,C) \cong \text{Hom}_{\textbf{Ab}}(B ,\text{Hom}_{Ab}(A,C))$$ and by plugging in our particular groups we get that:   $$\text{Hom}_{\textbf{Ab}}(A\otimes \mathbb{Q},\mathbb{Q})\cong\text{Hom}_{\textbf{Ab}}(\mathbb{Q} ,\text{Hom}_{Ab}(A,\mathbb{Q}))$$  Since $A\otimes\mathbb{Q} \cong \{0\} \implies \text{Hom}_{\textbf{Ab}}(\mathbb{Q} ,\text{Hom}_{Ab}(A,\mathbb{Q})) = \{0\}$ so we only have the trivial morphism from $\mathbb{Q} \to \text{Hom}_{Ab}(A,\mathbb{Q})$ but I don't think this implies that $\text{Hom}_{Ab}(A,\mathbb{Q}) = \{0\}$ and I'm not sure if this reasoning helps me at all.