Nhibernate: Get real entity class instead of proxied class
NHibernate Get objects without proxy
Database general error: 2006 MySQL server has gone away What version of Ubuntu should I pick? I'm just a simple user frustrated with Windows 10 and I want to leave Windows altogether.  However, I don't want to spend three weeks learning how to install the new system and then get all my current programs to work.  I am not setting up a server, I am not a developer and I do not want all my stuff on a cloud. Connection pools being reset with Error: 18056, Severity: 20, State: 46. & Perfmon Counters not showing We are using SQL Authentication (to reduce the number of connection pools) &amp; .NET 4.0 connection strings to connect to SQL Server Enterprise Edition 2012 SP1 on a Windows 2008 R2 Enterprise Server:     Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64)   Oct 19 2012 13:38:57   Copyright (c) Microsoft Corporation   Enterprise Edition (64-bit) on Windows NT 6.1  (Build 7601: Service Pack 1)   We use about 50 servers split into 8 different groups different parts of a website.  Our website is using this SQL Server to log visit tracking data. Over the last few days it has spat out the following messages about the resetting connection pools:     The client was unable to reuse a session with SPID 1327, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.   Error log reads:     Error: 18056, Severity: 20, State: 46.   The client was unable to reuse a session with SPID 959, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier  operation failing. Check the error logs for failed operations immediately before this error message.   Login failed for user 'xxxx'. Reason: Failed to open the database 'xxxxxxxx' configured in the login object while revalidating the login on the connection. [CLIENT: 10.xx.xx.xxx]   After some digging, I found this document on the CSS blog:  and this one by Aaron Bertrand: . I know the error number is different but the failure ID is the same with a number of the messages are identical).  Failure ID 46 suggests that the login did not have permissions. Our logins default to the master database and the db name is specificied in the connection string.  I wanted to check the number of connection strings pools, etc. and checked all the counters in Perfmon for .Net Data Provider for SqlServer. It only gave me the option of defaultdomain9675 for the instance, so I selected that assuming that is a system generated ID name for our Datacentre network. Unfortunately all of the counters are reading zero. On one of our other main servers the connection pools are hovering around 10 which is what I expected to see on a healthy server with that kind of load.  My question is 3 fold   Can anyone suggest why the Windows 2008 R2 Server is not showing .Net Data Provider for SqlServer? Has anyone experienced this as I obviously believe that the login not having permissions is a red herring ? If different groups of web servers have the same connection string syntax but with slightly different whitespace, would this cause the server to use another connection pool?   Min &amp; max memory settings are 20GB &amp; 58GB respectively. The server is a dedicated database server with 64GB of RAM. I don't think memory is the issue as the box seems to have a decent page lfe expectancy. Auto close is not enabled. The server is always up: this is a 24x7 website with heavy usage. Long lay over in Seoul. Do I need a visa as a Filipino citizen? I'm a Filipino immigrant from USA about to visit home in December.  I have a 14-hour lay over in Seoul,  South Korea.  Do I need a visa to leave the airport to do a little sightseeing? What does "\" mean in math In a Linear Algebra textbook I am reading, the following is stated: $b\notin \operatorname{span}(A \cup \{a\})\setminus \operatorname{span}(A)$. It does so without explaining what "$\setminus$" means. I apologize if this question does not belong here but I just want to understand what it means. I can close the question if someone just comments on its meaning. If all motion is relative, how does light have a finite speed? Reprojecting MODIS-Sphere ESRI GRID file to WGS84 using QGIS/GDAL I have an ESRI GRID file projected in MODIS-Sphere (here's the dataset ) that I need to convert to a WGS84 GeoTIFF.  I tried Raster > Projections > Warp (Reproject) and got this nonsense:   I then thought I'd use the MODIS reprojection tool or HEG to convert it, but they only accept HDF files and using QGIS' warp or translate functions to convert this file to HDF throwns an error. This guy was trying to do the same thing in Arc, no joy:   I looked for clues in the metadata, and the file seems a little goofy; gdalinfo yields:  Driver: AIG/Arc/Info Binary Grid Files: seto_uf        seto_uf.aux        seto_uf/.aux.xml        seto_uf/.DS_Store        seto_uf/dblbnd.adf        seto_uf/hdr.adf        seto_uf/log        seto_uf/metadata.xml        seto_uf/sta.adf        seto_uf/vat.adf        seto_uf/w001001.adf        seto_uf/w001001.tif        seto_uf/w001001.tif.aux.xml        seto_uf/w001001x.adf Size is 7468, 2911 Coordinate System is `' Origin = (-17345341.010356999933720,8423784.764957003295422) Pixel Size = (5000.000000000000000,-5000.000000000000000) Corner Coordinates: Upper Left  (-17345341.010, 8423784.765)  Lower Left  (-17345341.010,-6131215.235)  Upper Right (19994658.990, 8423784.765)  Lower Right (19994658.990,-6131215.235)  Center      ( 1324658.990, 1146284.765)  Band 1 Block=256x4 Type=Byte, ColorInterp=Undefined   Description = Seto_UF   Min=0.000 Max=101.000    NoData Value=255   So it can't determine the coordinate system.  There's a .tif included in the directory, but gdalinfo on that shows:  Driver: GTiff/GeoTIFF Files: w001001.tif        w001001.tif.aux.xml Size is 7468, 2911 Coordinate System is: GEOGCS["Unspecified datum based upon the GRS 1980 Authalic Sphere",     DATUM["unknown",         SPHEROID["unnamed",6371007,1]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433],     AUTHORITY["EPSG","4047"]] Origin = (-17345341.010356999933720,8423784.764957003295422) Pixel Size = (5000.000000000000000,-5000.000000000000000) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   INTERLEAVE=BAND Corner Coordinates: Upper Left  (-17345341.010, 8423784.765)  Lower Left  (-17345341.010,-6131215.235)  Upper Right (19994658.990, 8423784.765)  Lower Right (19994658.990,-6131215.235)  Center      ( 1324658.990, 1146284.765)    So it says the units are degrees but those huge corner coordinates and origin values don't agree.  Any ideas?  My setup: OSX 10.9.4 QGIS 2.6.1 Brighton GDAL 1.11.2 (apparently there are newer versions but this is the latest you can get on OSX without having to compile it yourself) What are the relative strong and weak points between tcolorbox and mdframed? I think practically we will not use both tcolorbox and mdframed in a single input file. Correct me if I am wrong. So we have to choose either tcolorbox or mdframed. However, without knowing the strong and weak points of both, we can only choose one by gambling.  Shortly speaking, what are the weak and strong points of both packages? The answers really influence the path of my life in TeX. Suffixes indicating people and language of country vary by country:  _an: American, German, Italian, Belgian, Australian, Russian, Ukrainian, Korean,  Mexican, Brazilian, Chilean, Argentinean, Indonesian, Malaysian, Iranian, Egyptian, Somalian, Palestinian  _sh: English, British, Polish, Danish, Swedish, Turkish,    _ch: French, Dutch  _ese: Chinese, Taiwanese, Japanese, Vietnamese, Portuguese  _no: Filipino, Latino  _i: Israeli  _: Thai  Among the above, _an seems to outnumber other suffixes.  Are there any simple rule to govern appropriation of suffix turning a country name into adjective, indicating people and language of countries in the world in terms of say, region, race, or cultural background? Or is it just discretional? What is the word or term used to describe doing an activity or work with a high level of concentration and intention, trying your best? How to prove $A+ A^T$ symmetric, $A-A^T$ skew-symmetric. Does the verb "unvelcro" exist or what can we use instead? I know that the following word pairs exist:  button – unbutton tie – untie  Can we use an analogous process with the verb &quot;velcro&quot;? CPU Emulation and locking to a specific clock speed If you had read my other , you'll know I've spent this weekend putting together a 6502 CPU emulator as a programming exercise.  The CPU emulator is mostly complete, and seems to be fairly accurate from my limited testing, however it is running incredibly fast, and I want to throttle it down to the actual clock speed of the machine.  My current test loop is this:      // Just loop infinitely.     while (1 == 1)     {                         CPU.ClockCyclesBeforeNext--;          if (CPU.ClockCyclesBeforeNext &lt;= 0)         {             // Find out how many clock cycles this instruction will take             CPU.ClockCyclesBeforeNext = CPU.OpcodeMapper.Map[CPU.Memory[CPU.PC]].CpuCycles;              // Run the instruction             CPU.ExecuteInstruction(CPU.Memory[CPU.PC]);              // Debugging Info             CPU.DumpDebug();             Console.WriteLine(CPU.OpcodeMapper.Map[CPU.Memory[CPU.PC]].ArgumentLength);              // Move to next instruction             CPU.PC += 1 + CPU.OpcodeMapper.Map[CPU.Memory[CPU.PC]].ArgumentLength;                                                 }     }   As you can tell, each opcode takes a specific amount of time to complete, so I do not run the next instruction until I count down the CPU Cycle clock. This provides proper timing between opcodes, its just that the entire thing runs way to fast.  The targeted CPU speed is 1.79mhz, however I'd like whatever solution to the clock issue to keep the speed at 1.79mhz even as I add complexity, so I don't have to adjust it up.  Any ideas? I have a USB flash drive which is no longer recognized by my computer. Windows Disk Management and DiskPart report No Media with no storage space (0 bytes) on the drive and I cannot partition or format the drive:     If the drive appears in Windows Explorer, trying to access it returns an error message indicating that there is no disk inserted, such as the following:     Please insert a disk into drive X:.   Various disk partitioning and data recovery utilities don't recognize the drive or only give a generic name for the drive and cannot access the contents of the drive.  What can I do? How do I recover data from the drive?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details. Travelling on Business visa to UK for tourism purposes I already have a 6 month valid UK business visa received prior to April 24 2015. I was supposed to travel to the UK in April, but my trip was cancelled on medical grounds.  I am now planning to visit the UK in July for tourism. Would it be fine for me to do so? Will I be allowed to enter the UK? Should I carry the original invite letter and medical certificate to prove why I didn't go the first time? In PHP, the HEREDOC string declarations are really useful for outputting a block of html.  You can have it parse in variables just by prefixing them with $, but for more complicated syntax (like $var[2][3]), you have to put your expression inside {} braces.  In PHP 5, it is possible to actually make function calls within {} braces inside a HEREDOC string, but you have to go through a bit of work.  The function name itself has to be stored in a variable, and you have to call it like it is a dynamically-named function.  For example:  $fn = 'testfunction'; function testfunction() { return 'ok'; } $string = &lt;&lt;&lt; heredoc plain text and now a function: {$fn()} heredoc;   As you can see, this is a bit more messy than just:  $string = &lt;&lt;&lt; heredoc plain text and now a function: {testfunction()} heredoc;   There are other ways besides the first code example, such as breaking out of the HEREDOC to call the function, or reversing the issue and doing something like:  ?&gt; &lt;!-- directly output html and only breaking into php for the function --&gt; plain text and now a function: &lt;?PHP print testfunction(); ?&gt;   The latter has the disadvantage that the output is directly put into the output stream (unless I'm using output buffering), which might not be what I want.  So, the essence of my question is: is there a more elegant way to approach this?  Edit based on responses: It certainly does seem like some kind of template engine would make my life much easier, but it would require me basically invert my usual PHP style.  Not that that's a bad thing, but it explains my inertia..  I'm up for figuring out ways to make life easier though, so I'm looking into templates now. How do I address unchecked cast warnings? How to fix missing characters from font after awakening from suspend? I find that often after awakening from suspend on Ubuntu GNOME 16.04 with GNOME 3.20 (I have only found this issue on the latest version, though I have not tried with GNOME 3.18 on 16.04) that I get this strange font issue which can't be fixed by restarting gnome-shell and seemingly only by restarting my entire machine:            I do not believe that this is a theme issue as I have tried all the built-in themes (including the dark and light versions) and it is the same for them all. Though it does not seem to affect gnome-shell areas, that is the top-bar, the Activities Overview, etc, are not affected for some reason. So what could this issue be caused by and how can I fix or workaround it?  Information Update:  I have had a look at  but the only options in the gnome-tweak-tool for Antialiasing are Rgba, None, and Grayscale, but none of them seem to have any affect on the issue. Is there something I'm missing? how does systemd determine service is stopped? How to read a single character from the user?