SQL string field lengths in a db having about 6 different types of addresses, with about 20 markets and environments
SQL Server nvarchar(max) vs nvarchar(n) affects performance
When should I use a struct rather than a class in C#? Proxying fake domain to a localhost port I'd like to do much the same thing described at  for web app development purposes, but with the twist that I'd like requests to fakedomain.com:80 to be routed to localhost:8080, say, so that I don't have to actually use my development machine's port 80.  I'd welcome answers that take the form of:   Small changes to configuration files like /etc/hosts, and/or An easy-to-configure proxy server I could run   Note:  takes the approach of setting a firewall rule to forward all incoming traffic on port 80 to port 20559. That may be an acceptable solution, but ideally, I'd like to forward only a specific domain + port combination. When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead? Orthogonal complement examples What is a suitable image resolution for canvas prints? I would like to create a 60 inch x 20 inch canvas print using an image with a resolution of 4759x1798 (240 pixels per inch) and I would like to know if the image quality will still be good at that size.  To generalise the question, what is the recommended maximum size of an enlargement at varying image resolutions?  e.g. 3 megapixel, 5 megapixel, 8 megapixel, etc Is there a way to get the (to-be-generated) SQL from a Hibernate Criteria?  Ideally, I would have something like:  Criteria criteria = session.createCriteria(Operator.class);  ... build up the criteria ... ... and then do something like ...  String sql = criteria.toSql()  (But this of course does not exist)   The idea would then be to use the SQL as part of a huge 'MINUS' query (I need to find the differences between 2 identical schemas - identical in structure, not in data - and the MINUS is not supported by Hibernate)  (BTW I know I can check the SQL from the log files) Reading InputStream as UTF-8 Is it possible to soft reset to a shiny Yveltal/Xerneas/Zygarde? I want to gain some rare and valuable shinies, and I looked towards the games mascots, Yveltal, Xerneas, and Zygarde. I know in previous games (like Diamond and Pearl) you could soft reset the game until the game would give you a Shiny in for the legendary. Can you still do this? Decode escaped Url without using HttpUtility.UrlDecode Unicode error in inputenc package Particularly, does proc always list the VmRSS value in kB? I can't find a solid answer on the , although it appears that it sticks to one unit. Let $\mu(\Omega)$ be a probability measure (i.e. $\mu(\Omega) = 1$), and let $f,g$ be non-negative measurable functions on $\Omega$ such that $fg \geq 1$. Show that $1 \leq (\int f^p )(\int g^p)$ for all $0 &lt; p &lt; \infty$   I'm a bit at a loss of what to do. I know that since $fg \geq 1$, we may obtain:  $$\int_{\Omega} d\mu = \mu(\Omega) = 1 \leq \int_{\Omega} fg = \int_{\Omega} |fg|$$ The right-most integral is true since $fg$ is positive and it is equal to $||fg||_1$.  By Hölder's inequality, we obtain:  $$1 \leq \int |fg| \leq ||f||_p ||g||_q = (\int f^p)^\frac{1}{p}(\int g^q)^\frac{1}{q}$$  where $p$ and $q$ satisfy $\frac{1}{p} + \frac{1}{q} = 1$. Raising the left-most and right-most sides of this inequality to the power $p$, I may obtain:  $$1 \leq (\int f^p)(\int g^q)^\frac{p}{q}$$  I now wish to show that $(\int g^q)^\frac{p}{q} \leq \int g^p$, but I've been at a loss of how to do it. Any tips or hints would be greatly appreciated. 12.04 GPU lockup I was able to install Ubuntu 12.04 using the alternative version of the image, (64 bit) but when I start the system it tells me the GPU  locked up, and instead presents a text only screen.  I understand that this site is not for bug reports, but at the same time, I know that there are some versions of the installer than have to be compatible with my graphics card (Nvidia GTS 360M).  I assumed that the mere fact that the alternative installer ran was an indication that I could get some sort of graphical interface running after the install.  Is there some way of getting some type of graphical interface running on my machine? Even better would be is there a way to get the rest of the system running as normal (i.e. GPU up and running)?  If an internet connection is required to download driver support or something similar, directions for how to configure a wireless connection with WPA2-Personal protection from the text-only interface (bash).  Any help would be appreciated.  Note: I was able to find  which tells me that the card is supported.  Note 2: In the install software stage of the install, I was unable to install anything (no internet connection)  Update: The exact error message is [8.591394] [drm] 0000:01:00.0: GPU Lockup - switching to software fbcon  Update 2: If I try to install with the regular version of Ubuntu, the screen goes staticy. This also happens if I install with Wubi (distasteful I know) and then try to use Ubuntu.  Update 3: I've tried xforcevesa, nomodeset and xforcevesa nomodeset as my wubi boot options.  Update 4: Thanks to jokerdino, I can now connect to the internet, so internet tools would now be a possibility. How to find fixed points for DES weak keys Previous questions confirmed that Hex can last through multiple encounters (assuming my warlock's concentration doesn't get broken by a club to the head or the like) and at higher levels even through a short rest.   My question is how targeting Hex works when trying to keep it up for extended periods of time.   Can I just cast it on nothing and keep it up until a valid target presents itself or is an initial valid target required?   Then later, does changing the target of the Hex require that the original target is brought to 0 HP?   Once the initial target dies does the spell stay active even if I don't immediately choose a new target?  My suspicion from reading the spell is that it needs an initial target, but then from that point on I can just keep it up after that target dies until it either expires or a new target presents itself. Is this correct? checking apt-get update lock file Probability of $p(x_1<x_2<\max(x_3,x_4))$ How do I read a file into a std::string, i.e., read the whole file at once?  Text or binary mode should be specified by the caller. The solution should be standard-compliant, portable and efficient. It should not needlessly copy the string's data, and it should avoid reallocations of memory while reading the string.  One way to do this would be to stat the filesize, resize the std::string and fread() into the std::string's const_cast&lt;char*&gt;()'ed data(). This requires the std::string's data to be contiguous which is not required by the standard, but it appears to be the case for all known implementations. What is worse, if the file is read in text mode, the std::string's size may not equal the file's size.  A fully correct, standard-compliant and portable solutions could be constructed using std::ifstream's rdbuf() into a std::ostringstream and from there into a std::string. However, this could copy the string data and/or needlessly reallocate memory.    Are all relevant standard library implementations smart enough to avoid all unnecessary overhead?  Is there another way to do it?  Did I miss some hidden Boost function that already provides the desired functionality?     void slurp(std::string&amp; data, bool is_binary) Exactly what the name entails. The function $2^n-1$ I see largely tends to generate primes when $n$ is prime. However, a week ago I heard that this was horribly false. Please show me a disproof. What causes a force field to be "non-conservative?"