Setting an expiry date or a maximum age in the HTTP headers
How do you set the expiry date or a maximum age in the HTTP headers for static resources in IIS
Are there network-wide reputation leagues? I would love to see which people have the most network-wide reputation, how can I see that? Idiomatic batch processing of text in Emacs? How can I re-write the conditionals for this button I've been trying out React for a couple of days and I tried to build a button component with some conditionals. Everything works but I feel like I am not doing it the right way. Could anyone review my code and give me some advice and tell me what I am doing wrong or what i could do better. I think I am using too many return statements. I use Typescript for type checking. Would appreciate any help! import { Link } from &quot;gatsby&quot;;  interface Props {   content: string,   color: string,   path?: string,   type?: string }  export default function Button(props: Props): JSX.Element {   let elementType;    const checkProps = () =&gt; {     const availableColors = ['blue', 'grey', 'dark-grey', 'white'];     const borderColors = [''];     let buttonStyle;      // Check if props.color exists in availableColors     if(!availableColors.includes(props.color)) {       console.error(`&quot;${props.color} color key not available for button style`);       return;     }          buttonStyle = buttonStyles[`button--${props.color}`];      // Check if props.content is valid     if(!props.content) {       console.error(`&quot;${props.content} is not valid as content`);       return;     }      // Check if props.type exists     if(!props.type) {       elementType = &lt;button className={ buttonStyle }&gt;{ props.content }&lt;/button&gt;       return;     }      if(props.type !== 'link') {       console.error(`&quot;${props.type} is not a valid type, use 'link' instead or use nothing for default button`);       return;     } else {         elementType = &lt;Link to={ props.path } className={ buttonStyle }&gt;{ props.content }&lt;/Link&gt;     }   }    checkProps();    return (     &lt;React.Fragment&gt;       { elementType }     &lt;/React.Fragment&gt;   ); }``` mailto link with HTML body How can I manually install a package on MiKTeX (Windows) I'm new to LaTeX, investigating using it for some work projects.  I'm using MiKTeX on Windows.  My employer's locked-down network blocks the application's automatic installation function.  I can take my laptop home and successfully install from there, but if I need a package in the middle of the day I'm stuck.  I am able to access the CTAN website and download the package files (.dtx or .ins?), but I don't know what do do with them.  How can I do a manual package installation? How do I parse command line arguments in Java? What is a good way of parsing command line arguments in Java? How do HttpOnly cookies work with AJAX requests? JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site?   Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: If you are using AJAX on a site, like StackOverflow, are Http-Only cookies an option?  Edit 2: Question 2. If the purpose of HttpOnly is to prevent JavaScript access to cookies, and you can still retrieve the cookies via JavaScript through the XmlHttpRequest Object, what is the point of HttpOnly?  Edit 3: Here is a quote from Wikipedia:     When the browser receives such a cookie, it is supposed to use it as usual in the following HTTP exchanges, but not to make it visible to client-side scripts.[32] The HttpOnly flag is not part of any standard, and is not implemented in all browsers. Note that there is currently no prevention of reading or writing the session cookie via a XMLHTTPRequest. [33].   I understand that document.cookie is blocked when you use HttpOnly. But it seems that you can still read cookie values in the XMLHttpRequest object, allowing for XSS. How does HttpOnly make you any safer than? By making cookies essentially read only?   In your example, I cannot write to your document.cookie, but I can still steal your cookie and post it to my domain using the XMLHttpRequest object.  &lt;script type="text/javascript"&gt;     var req = null;     try { req = new XMLHttpRequest(); } catch(e) {}     if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}     if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}     req.open('GET', 'http://stackoverflow.com/', false);     req.send(null);     alert(req.getAllResponseHeaders()); &lt;/script&gt;   Edit 4: Sorry, I meant that you could send the XMLHttpRequest to the StackOverflow domain, and then save the result of getAllResponseHeaders() to a string, regex out the cookie, and then post that to an external domain. It appears that Wikipedia and ha.ckers concur with me on this one, but I would love be re-educated...  Final Edit: Ahh, apparently both sites are wrong, this is actually a . IE6 &amp; 7 are actually the only browsers that currently fully support HttpOnly.  To reiterate everything I've learned:   HttpOnly restricts all access to document.cookie in IE7 &amp; and FireFox (not sure about other browsers) HttpOnly removes cookie information from the response headers in XMLHttpObject.getAllResponseHeaders() in IE7. XMLHttpObjects may only be submitted to the domain they originated from, so there is no cross-domain posting of the cookies.   edit: This information is likely no longer up to date. I can't install gnome schedule on Ubuntu 16.04 I would like to install gnome-schedule in my recent Ubuntu 16.04 but I can't find the how. It is not in ubuntu software and if I type sudo apt-get install gnome-schedule, I get it's not found. I would like to use it because I find it quick and easy to use. I've been looking for alternatives but instead of "when" which I don't like, I can't find anything else, so help is welcome. I am unable to figure out simple solution to add "Bookman Old Style"  as a main font in my latex document. I have used below line but does not give me required font.  \usepackage{bookman}   Could not find any Simple correct answer for this. Pl. suggest how to do it.  I am using windows, pdflatex.  thank you &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 need to add a specific column if it does not exist. I have something like the following, but it always returns false:  IF EXISTS(SELECT *           FROM   INFORMATION_SCHEMA.COLUMNS           WHERE  TABLE_NAME = 'myTableName'                  AND COLUMN_NAME = 'myColumnName')    How can I check if a column exists in a table of the SQL Server database? Someone found this quiver with surprisingly high values, although I'm unable to find a level 30 rare quiver on     Given that the item's internal level (IIL) determines which affixes are possible, I'd like to know whether the IIL affects the minimum/maximum rolls for an attribute, a graph or table would be great.  For example, let's say items are able to get a pure +intellect affix from IIL 20, what's stopping you from rolling 250 at 20?  Is it a bell curve, which has shallower gradients with a higher IIL of the item?  Is it capped, dependant on IIL?  Do the min/max caps step up at certain IILs,though it's the same attribute? For example, IIL 20-40 is capable of 5-120, IIL 41-60 is capable of 20-320, ..., IIL 63 = 40-400 Is it possible to backup individual files with Deja Dup? In the Deja Dup preferences, it is possible to select certain folders to backup and certain folders to exclude.  I would like to be able to backup individual files in my Home folder (Such as .vimrc and .bashrc), but I don't see any way to do this.   So my question is, is it possible to either     Select individual files (instead of whole folders) to backup, or backup my Home folder, but exclude all subfolders? Shortcut in Windows 7 to switch between same application's windows, like Cmd + ` in OS X Is there a shortcut in Windows 7 to switch between windows in a given application only? I very much like this feature in OS X; what is its equivalent in Windows? Generator of group $D_n$ Add time restriction in ArcGIS Network Analyst I'm trying to use train tracks as a network in ArcGIS Network Analyst.   We are trying to create a model for security agents on board our trains and we'd like to optimize their daily "route". For now, it's all made by hand.   My approach is to take our gtfs data and create a network using stop times to determine when the train segment is "traversable". When there's a train on the segment, it's open, if not, it's restricted.   The problem is I can't set a restriction based on time in Network Analyst (or wasn't able to). I would like to be able to say by a formula or script than you can take that segment only from 7:03 AM to 7:10 AM for example.  Is it possible?  Thanks! Find a recurrence relation for the number of ternary strings of length n that do not contain two consecutive 0s or two consecutive 1s. Note: Problem from "Kenneth Rosen's DM and it's applications" and solution from "Students solution guide for use with ... applications"  Let P(n) be the number of strings not containg two containing two consecutive zeros or two consecutive ones.  I got the answer  P(n)=P(n-1)+2P(n-2)+2P(n-3)+...+2P(0) +2  but then the book says the sequence also satisfies the recurrence relation  P(n)=2P(n-1)+P(n-2). I am not able to understand this part. How to trim whitespace from a Bash variable? Landscape figure in LaTeX I have a figure I'm trying to insert which is in landscape and I'm using the following (snipped) code:  \documentclass[12pt, oneside]{book} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{lscape} \usepackage{rotating} \usepackage{epstopdf}  \begin{document}  \begin{figure}[ht]     \includegraphics{../figures/pics/DivLibPropProfile}     \caption{Property profile of the diverse library compared to the compound pool.}     \label{fig:PropProf} \end{figure}  \end{document}   When I compile this with pdfLaTeX the output behaves as I'd expect – page in portrait with the caption at the bottom but the figure in the "wrong" orientation.  However when I compile using LaTeX, the page is turned landscape with the figure now in the correct orientation but with the caption at what is now the left of the page rather than under the figure, which you should get using \begin{landscape}.    When I do use the landscape environment and compile with LaTeX the caption the whole page is turned upside-down and everything is wrong.  Any ideas how I can get the correct orientation of landscape figure on landscape page with the caption under the  (attached for reference)?  I also need to use LaTeX rather that pdfLaTeX for another package to function. What flash slaves can be used with a Canon Speedlite 600EX-RT? My current flash setup is a standard shoe mount but I've been thinking about getting a remote.  I've been drooling over the Speedlite 600EX-RT. It uses radio to control slaves, which is nice (longer distance, doesn't require line of sight, etc.).  One thing I don't understand: do slaves also have to be 600EX-RTs or do other flash units use radio to communicate already? Can any (cheap?) flash slaves can be used with a Canon Speedlite 600EX-RT or do I need to buy the 600EX and a ST-E3-RT transmitter in order (or multiple 600EX-RTs) to have a radio-controlled remote flash setup?