Decompress a stream of bytes using deflatestream
Zlib-compatible compression streams?
Directing Domain to Hosting Directory I just purchased a domain on Dreamhost, let's say foo.com. I already have hosting, let's say at 123.4.56.789, and have setup a directory foo.com which is accessible at 123.4.56.789/foo.com/. I can set the DNS to point foo.com to that IP, but how do I route it to that folder once it's there? My hosting has a really bad cPanel that gives me almost no help. Can I use .htaccess, or something else? What's the best way to accomplish this?  Edit in response to comment(s): It's VPS hosting, so I have access to http.conf and other system files. Also, yes it's Apache. Someone who does not like excess One of the joys of high-school mathematics is summing a complicated series to get a “closed-form” expression. And of course many of us have tried summing the harmonic series $H_n =\sum \limits_{k \leq n} \frac{1}{k}$, and failed. But should we necessarily fail?      More precisely, is it known that $H_n$ cannot be written in terms of the elementary functions, say, the rational functions, $\exp(x)$ and $\ln x$? If so, how is such a theorem proved?    Note. When I started writing the question, I was going to ask if it is known that the harmonic function cannot be represented simply as a rational function? But this is easy to see, since $H_n$ grows like $\ln n+O(1)$, whereas no rational function grows logarithmically.  Added note: This  asks a similar question for “elementary integration”. I guess I am asking if there is an analogous theory of “elementary summation”. How does an accelerating charge radiate electromagnetic waves? Test Class Apex Page Parameters How can I make my touchpad scroll either vertically or horizontally, but not both? If I'm browsing the internet and a page has both horizontal and vertical scroll bars it becomes really irritating to scroll with my touchpad. It keeps scrolling horizontally as well as vertically!  I'm using Ubuntu 16.04  and below are touchpad settings  Device 'SynPS/2 Synaptics TouchPad':     Device Enabled (160):   1     Coordinate Transformation Matrix (162): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000     Device Accel Profile (282): 1     Device Accel Constant Deceleration (283):   2.500000     Device Accel Adaptive Deceleration (284):   1.000000     Device Accel Velocity Scaling (285):    12.500000     Synaptics Edges (286):  1769, 5431, 1652, 4658     Synaptics Finger (287): 25, 30, 0     Synaptics Tap Time (288):   180     Synaptics Tap Move (289):   242     Synaptics Tap Durations (290):  180, 100, 100     Synaptics ClickPad (291):   0     Synaptics Middle Button Timeout (292):  75     Synaptics Two-Finger Pressure (293):    282     Synaptics Two-Finger Width (294):   7     Synaptics Scrolling Distance (295): 200, 200     Synaptics Edge Scrolling (296): 0, 0, 0     Synaptics Two-Finger Scrolling (297):   1, 1     Synaptics Move Speed (298): 1.000000, 1.750000, 0.036300, 0.000000     Synaptics Off (299):    1     Synaptics Locked Drags (300):   0     Synaptics Locked Drags Timeout (301):   5000     Synaptics Tap Action (302): 2, 0, 0, 0, 1, 3, 0     Synaptics Click Action (303):   1, 1, 0     Synaptics Circular Scrolling (304): 0     Synaptics Circular Scrolling Distance (305):    0.100007     Synaptics Circular Scrolling Trigger (306): 0     Synaptics Circular Pad (307):   0     Synaptics Palm Detection (308): 0     Synaptics Palm Dimensions (309):    10, 200     Synaptics Coasting Speed (310): 21.120001, 50.000000     Synaptics Pressure Motion (311):    30, 160     Synaptics Pressure Motion Factor (312): 1.000000, 1.000000     Synaptics Resolution Detect (313):  1     Synaptics Grab Event Device (314):  0     Synaptics Gestures (315):   1     Synaptics Capabilities (316):   1, 0, 1, 1, 1, 1, 1     Synaptics Pad Resolution (317): 83, 46     Synaptics Area (318):   0, 0, 0, 0     Synaptics Noise Cancellation (319): 8, 8     Device Product ID (277):    2, 7     Device Node (278):  "/dev/input/event6" I have a lidar file (file.las) with the following spatial reference:  Spatial Reference:            PROJCS["NAD83 / UTM zone 11N",     GEOGCS["NAD83",         DATUM["North_American_Datum_1983",             SPHEROID["GRS 1980",6378137,298.2572221010002,                 AUTHORITY["EPSG","7019"]],             AUTHORITY["EPSG","6269"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4269"]],     PROJECTION["Transverse_Mercator"],     PARAMETER["latitude_of_origin",0],     PARAMETER["central_meridian",-117],     PARAMETER["scale_factor",0.9996],     PARAMETER["false_easting",500000],     PARAMETER["false_northing",0],     UNIT["metre",1,         AUTHORITY["EPSG","9001"]],     AUTHORITY["EPSG","26911"]]   Then I reproject it to WGS84 with las2las:  las2las --a_srs EPSG:26911 --t_srs EPSG:4326 -i file1.las -o output.las   And I get:   Spatial Reference:                GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]   But when I try to revert the transformation: from WGS84 to NAD83/UTM 11N, I get an error:  las2las --a_srs EPSG:4326 --t_srs EPSG:26911 -i output.las -o wgs2utm.las ERROR 1: latitude or longitude exceeded limits error: Could not project point for ReprojectionTransform::latitude or longitude exceeded limits0.   Why I got this error, if I am just reversing the transformation (originally from NAD83 to WGS84, and then from WGS84 to NAD83)?. Solving linear congruences by hand: modular fractions and inverses When I am faced with a simple linear congruence such as  $$9x \equiv 7 \pmod{13}$$ and I am working without any calculating aid handy, I tend to do something like the following:  "Notice" that adding $13$ on the right and subtracting $13x$ on the left gives: $$-4x \equiv 20 \pmod{13}$$  so that $$x \equiv -5 \equiv 8 \pmod{13}.$$  Clearly this process works and is easy to justify (apart from not having an algorithm for "noticing"), but my question is this: I have a vague recollection of reading somewhere this sort of process was the preferred method of C. F. Gauss, but I cannot find any evidence for this now, so does anyone know anything about this, or could provide a reference? (Or have I just imagined it all?)  I would also be interested to hear if anyone else does anything similar. Should flagging a question for closure prevent close-voting? SQL Server 2008 R2 SP1  My company uses the Great Plains (GP) financial system with several customizations.  Our Value-Added-Reseller (VAR) for GP has setup most of these customizations in a separate database from the GP data called DYNCUSTOM.  In the DYNCUSTOM database is a View that is merely a SELECT * FROM a table in the GP company database (called PARTS).  I was approached by a user having problems trying to select on this view.  The error he was getting:  Msg 229, Level 14, State 5, Line 2 SELECT permission denied on object 'BM010415', database 'PARTS', schema 'dbo'   I looked at how his login was mapped and he had a database user in the DYNCUSTOM database belonging to a database role that was granted select on the view.  However, he did not have a database user in the PARTS database.    Usually the intent of a view is so that one can grant select permissions on the view without exposing access to the underlying table.  With SQL Server however, if the view crosses databases does it then change the security context being used?  Therefore, the user would also need a database user in the PARTS database as well as granted select access to the underlying table? How to extract a number from a string Im a newbie in Apex and im developing a page using Visualforce.  My string format is always like this "xx-xx-999999". In this format I need to get only the integer. For example the string is  "RO-W1-445567". I want to get only the integer 445567 in the string. Can someone willing to share a piece of apex code in my problem.  Your help is vey much appreciated.  Thanks in advance!  Ferdie Banu Kinetic energy conservation in a collision Kinetic energy conservation in collision.  In any type of collision type of collision if we take the system to comprised of both bodies then the net external force is zero. So the work done by external force is also zero. By the relation $W=K_f-K_i$ as $W$ is zero hence kinetic energy is conserved. But this not the case.   Can you tell me what is the flaw in my argument? Some people say that the argument has neglected the fact that some kinetic energy is transformed into heat. But heat is created due to the interactions between bodies during collision which is thus an internal force and thus shouldn't affect kinetic energy. I've used git clone to make a local copy of a GitHub repository containing a  I'd like to use. The local copy contains all of the source for the program; but as a newbie to Ubuntu, I've no idea of what tools or steps are involved in compiling and installing the driver.   I'd really appreciate if anyone could provide a step-by-step guide? Counterspelling a counterspell Is there any easy way on Windows to log %CPU time per process over time to a file for later analysis?  As far as I can see...   Task manager shows me the %CPU per process but only visually - no way to save to a file. Perfmon will let me save to a file, and will additionally create a time-based file (taking snapshots at specified time intervals) - which is almost what I want, except that as far as I can see it can't break down the %CPU by process. Process Explorer will let me break down by process, but it will only save the file as a snapshot of a single point in time   So, none of these are quite what I need: I need to get a file that contains something like 'top 10 processes by CPU, every 15 seconds, until I stop the monitoring' The reason I need this because I have a machine on which some process is causing occasional brief spikes in CPU usage several times a day and I need to find out which process is the culprit.    Can anything do that, or have I missed some feature of perfmon or process explorer? Can I throw away contents of my Steam Inventory? I have a number of items in my Steam inventory that are never going to get used; for example, some AirMech 2 "gifts" that are marked as NO LONGER VALID.  Is there some way to get rid of them so I don't have them cluttering up my inventory?  Obviously I could do a one-sided trade with a friend, but then they'd have to deal with it instead, and I don't have any alt accounts. How to take a screenshot with an Android device? Is there a way to take a screenshot of an Android device and save it as an image file? Question statement is as in the title:     $\varphi:G\to H$ is a Lie Group Homomorphism, then $\ker \varphi$ has Lie algebra $\ker D_e \varphi$   Since $\varphi$ is a Lie group homomorphism, in particular it is continuous. As $H$ must be Hausdorff, every point set is closed, and hence $\{e\}$ is closed in $H$, which implies that $\ker\varphi = \varphi^{-1}(e)$ is closed as well.  So $N=\ker\varphi$ is an embedded Lie subgroup of $G$. Therefore, the inclusion $j:N\to G$ is a Lie Group homomorphism, and induces a Lie algebra homomorphism $D_e j :T_e N \to T_e G$. So I only need to show that $D_e j$ is in fact an isomorphism between $T_e N$ and $\ker D_e \varphi$.  But I'm stuck at this point. I know that for $X\in T_e N$, we have, for $f\in C^{\infty}(H)$,  $$ D_e\varphi (D_e j(X))(f)=D_e j (X)(f\circ \varphi)=X(f\circ \varphi\circ j)=0$$  So $D_ej(T_e N) \subset \ker D_e \varphi$.  At this point, I can either show inverse inclusion: that is, for every $X\in \ker D_e \varphi$, we can find $Y\in T_e N$ such that $D_e j (Y)=X$, or for all $f\in C^{\infty}(G)$, $Y(f\circ j)=X(f)$  Or I can somehow show that dimensions of the two spaces are the same.   But I can't proceed from here.  It'd be great if someone could help me Check ping statistics without stopping Is there a way to tell ping to show its usual termination statistics without stopping the execution?  For instance, I'd like to quickly view:  --- 8.8.8.8 ping statistics --- 2410 packets transmitted, 2274 received, +27 errors, 5% packet loss, time 2412839ms rtt min/avg/max/mdev = 26.103/48.917/639.493/52.093 ms, pipe 3   without having to stop the program, thus losing the accumulated data. Apparent Violation of Newton's $3^{\text{rd}}$ Law and the Conservation of Momentum (and Angular Momentum) For a Pair of Charged Particles Consider a system of the two identical positive point charges situated in free space (isolated from the influence of any other external fields) as shown in the attached diagram. Particle $1$ is at $(a,a,0)$ and particle $2$ is at $(0,a,0)$. Their velocities, at the considered instant of time, are as shown in the diagram ($\mathbf{v}_1$ along the $+x$ axis, $\mathbf{v}_2$ along the $+z$ axis).    Now, by applying the Biot-Savart law, we find that the magnetic field due to particle $2$ at the position of particle $1$ is along $+y$ axis, which means that the force acting on particle $1$ is along $+z$ axis according to Fleming’s left-hand rule. A similar analysis shows that there is no magnetic force on particle $2$ as the magnetic field of particle $1$ should vanish at positions (relative to particle $1$) located along its velocity vector.  Now, if we observe the net torque on the system of two particles about the $y$ axis then it is non-zero and is directed along the $-y$ axis. Here, there are no external forces or torques acting on the isolated two-particle system, and yet the net torque, as well as the net force on the particles, are nonzero. Why? Also, Newton's third law of motion seems to be broken in this scenario. Why?    Edit $1$  I have come to know from the responses that the electromagnetic field itself takes away some momentum and angular momentum about the considered axis. However, I think that if I consider only two charged particles as my system then the Abraham-Lorentz force can be assumed to be acting upon the system, and that is sufficient to make sure that we have considered the momentum being carried away by the electromagnetic field itself.   Even after considering the action of the Abraham-Lorentz force for the two-particle system, the scenario breaks both Newton's third law and the conservation of linear and angular momentum. This is because the Abraham Lorentz forces do not exactly counterbalance the force and the torques, on the two-particle system under consideration, due to the magnetic field.    Edit $2$  The previous edit was a result of confusion and misunderstanding on my part. The force associated with the momentum carried away by the electromagnetic field as a result of the electromagnetic interaction described in the question is the Lorentz force itself which simply doesn't obey the third law of motion. The Abraham-Lorentz force is a different story. It is associated with the momentum carried away by the radiation emitted by the accelerated charged particles. This is an additional force apart from the Lorentz force and corresponds to an additional carriage of momentum by the electromagnetic field. The momentum carried away by the electromagnetic field in correspondence with the Lorentz force doesn't correspond to radiation.