python csv question
Python CSV parsing not returning proper rows
UnboundLocalError: local variable 'url_request' referenced before assignment Chance of selecting the last k pages in correct order from a set of n pages Why I cannot ping 192.168.0.108 (my computer IP?) Ipconfig says that my IP is 192.168.0.108 C:\Users\vbcbu&gt;Reply from 192.168.0.108: Destination host unreachable.ip 'Reply' is not recognized as an internal or external command, operable program or batch file.  C:\Users\vbcbu&gt;ipconfig  Windows IP Configuration   Ethernet adapter Ethernet:     Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix  . :  Wireless LAN adapter Local Area Connection* 12:     Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix  . :  Wireless LAN adapter Local Area Connection* 13:     Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix  . :  Wireless LAN adapter Wi-Fi 2:     Connection-specific DNS Suffix  . : www.tendawifi.com    Link-local IPv6 Address . . . . . : fe80::3804:2d04:a591:7142%6    IPv4 Address. . . . . . . . . . . : 192.168.0.108    Subnet Mask . . . . . . . . . . . : 255.255.255.0    Default Gateway . . . . . . . . . : 192.168.0.1  Ethernet adapter Bluetooth Network Connection:     Media State . . . . . . . . . . . : Media disconnected    Connection-specific DNS Suffix  . :  C:\Users\vbcbu&gt;  I can ping router at 192.168.0.1 I can't ping 192.168.0.108 C:\Users\vbcbu&gt;ping 192.168.0.1  Pinging 192.168.0.1 with 32 bytes of data: Reply from 192.168.0.1: bytes=32 time=2ms TTL=64 Reply from 192.168.0.1: bytes=32 time=24ms TTL=64  Ping statistics for 192.168.0.1:     Packets: Sent = 2, Received = 2, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:     Minimum = 2ms, Maximum = 24ms, Average = 13ms Control-C ^C C:\Users\vbcbu&gt;ping 192.168.0.8  Pinging 192.168.0.8 with 32 bytes of data: Reply from 192.168.0.108: Destination host unreachable. Reply from 192.168.0.108: Destination host unreachable. Reply from 192.168.0.108: Destination host unreachable. Reply from 192.168.0.108: Destination host unreachable.  Ping statistics for 192.168.0.8:     Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),  C:\Users\vbcbu&gt;ping 192.168.0.8  Pinging 192.168.0.8 with 32 bytes of data: Reply from 192.168.0.108: Destination host unreachable. Reply from 192.168.0.108: Destination host unreachable. How do I programmatically create a new content type? I'm building a module (my_module) in Drupal 7. It has some functionality and also will create a new content type. In my_module.install, I implemented hook_install() (my_module_install()).    Can I use more hook_install() to create a new content type (my_module_install()) in this module? If the answer is yes, how should I do this? Otherwise, should I do this in another module? Fix for Hibernate error "Use of the same entity name twice" How you fix the following Hibernate error:  What does "Use of the same entity name twice". Duplicate explanation should encourage improvement of original Installing 3rd party python libraries for QGIS on Windows ASP.NET MVC controller actions that return JSON or partial html Strictly Upper Triangular $n\times n$ Matrices form a Nilpotent Lie Algebra over $\mathbb{C}$ for $n\geq 2$ I have been attempting this problem for a while, it is an assignment problem so I don't want somebody to just post the answer, I'm just looking for hints.  Let $\mathfrak{u}(n,\mathbb{C})$ be the Lie algebra of strictly upper triangular $n\times n$ matrices over $\mathbb{C}$.  I am trying to show that $\mathfrak{u}(n,\mathbb{C})$ is a nilpotent Lie algebra for $n\geq 2$.  This is what I have looked at so far.  I have done some explicit calculations (I shall omit the bulk of them and just summarise below) for $n=2,3,4$ and have come up with some ideas.  Let $L=\mathfrak{u}(n, \mathbb{C})$.  If $n=2$,  $L^1 = [L, L] = &lt;0&gt;_{\mathbb{C}}$  So $L$ is nilpotent.  If $n=3$,  $L^1 = [L, L] = &lt;e_{13}&gt;_{\mathbb{C}}$  $L^2 = [L, L^1] = &lt;0&gt;_{\mathbb{C}} = \left\{ 0 \right\}$  So, $L$ is nilpotent.  If $n=3$  $L^1 = [L,L] = &lt;e_{13},e_{14},e_{24}&gt;_\mathbb{C}$  $L^2 = [L,L^1] = &lt;e_{14}&gt;_{\mathbb{C}}$  $L^3 = [L, L^2] = &lt;0&gt;_{\mathbb{C}} = \left\{ 0 \right\}$  So, $L$ is nilpotent.  So my hypothesis so far is that for an arbitrary $m\in\mathbb{N}$, $L^{m-1}=\{0\}$  My instinct is to do this by induction. My base case, $n=2$ has already been shown. Now I assume that $\mathfrak{u}(n,\mathbb{C})$ is nilpotent for $n=k$ ($k\in\mathbb{N}$) and consider the case for n=k+1.  However, I have no idea how to link these two cases together. I have read in Introduction to Lie Algebras and Representation Theory - J.E. Humphreys that $L^k$ should be spanned by basis vectors $e_{ij}$ where $j-i=k+1$ - however in my calculations for $L^1$, I obtain an $e_{14}$ which does not satisfy 4-1=2.  Am I missing something completely obvious? Or have I made a mistake somewhere? (I have checked my calculations numerous times, but cannot find any errors!)  Thanks,  Andy. Not getting any reading from FTDI UMFT201XB USB-to-I2C module I got the  in order to interface with an I2C peripheral through a USB port on my Windows 7 computer.  The VCP drivers seem to install correctly, and a COM port is assigned to the module, and can be opened by a terminal emulator. However, I cannot seem to get any signal in or out of the module. That is, I see no activity when I send data through the port, or receive any data when I connect an I2C device to it (this was debugged using a scope). I have also verified that the RESET isn't on.  I found very little helpful information out there on how to get this module to work, so if anyone has experience with it, or with similar FTDI modules, my question is: what are the steps that I need to take in order to get the module to communicate? Can QGIS open KMZ files? I know I can add KML files once I have unzipped the KMZ files, but is there a way to open KMZ files directly?   When I try to open a kmz file on QGIS 1.8.0 on Windows XP, through the all files filter, it does not accept it as a valid format.   Am I doing something wrong?   Does this all depend on OGR support? How to connect to wifi using just the terminal? What is the best way to share/distribute Excel macro? Prove that there is a bijection between the set of all subsets of $X$, $P(X)$, and the set of functions from $X$ to $\{0,1\}$. Given any set $X$, let $P(X)$ be the set of all subsets of $X$, and let $\{0,1\}^X$ be the set of all functions $X \rightarrow \{0,1\}$. Construct a bijection (and its inverse) between P(X) and $\{0,1\}^X$.    Let us define $f: P(X) \rightarrow \{0,1\}^X$ by $f(\alpha) = g_{\alpha}$ where $\alpha \in P(X)$ and $g_{\alpha} : X \rightarrow \{0,1\}$ is defined by  $$g_{\alpha}(x) =\begin{cases}        1 &amp; x \in \alpha \\       0 &amp; x \in X-\alpha     \end{cases}$$  We need to check if this function is well-defined. Let $\alpha, \beta \in P(X)$. If $\alpha=\beta$, then $\alpha$ and $\beta$ correspond to the same set, and so correspond to the same function since both $g_{\alpha}$ and $g_{\beta}$ send that set to 1 and the ($X-$that set) to 0.   If we have a function $g_{\alpha} \in \{0,1\}$, then $\alpha$ is a set in $X$ that is sent to 1. But since $P(X)$ is the set of all sets of $X$, we must have $\alpha \in P(X)$. So the function is surjective.  Finally, if $g_{\alpha}=g_{\beta}$ then both $g_{\alpha}$ and $g_{\beta}$ send the set $\alpha$ or $\beta$ to 1. So $\alpha$ and $\beta$ must be same set. In other words, the function is injective; and hence bijective.   The inverse function is $f^{-1}: \{0,1\}^X \rightarrow P(X)$ where $f^{-1}(g_{\alpha}) = \alpha$.     Another way to prove this is to first construct the inverse function, show that it is well defined, and then show that $ff^{-1}$ and $f^{-1}f$ are the identity functions, right?  So if we let $g_{\alpha}=g_{\beta}$, then $\alpha=\beta$, because otherwise $g_{\alpha} (\beta)=0$ and $g_{\beta} (\beta)=1$; a contradiction.   Now we have $f \circ f^{-1} (g_{\alpha}) = f(\alpha) = g_{\alpha}$ and $f^{-1} \circ f(\alpha) = f^{-1}(g_{\alpha}) = \alpha$ , and so $f$ and $f^{-1}$ must be bijective. How can I prove that prove $n^5 - n$ is divisible by $30$? I took $n^5 - n$ and got $n(n-1)(n+1)(n^2+1)$ Now, $n(n-1)(n+1)$ is divisible by $6$. Next I need to show that $n(n-1)(n+1)(n^2+1)$ is divisible by $5$. My guess is using Fermat's little theorem but I don't know how. Does anyone know a SF TV short story in which there were blue men who helped "stage" our world- at least the parts we saw, on a minute by minute basis.  So, at each minute, everyone would be in the "world" that was built for that minute, then they would go on to the next "minute world".  The blue men were in the future minutes building most of reality, but only the parts that would be looked at at that minute (to save work, I think - why build something that will not every be "used")  And they were in the past tearing down all the previously lived minutes.  It was kind of a behind the scenes look at why when you set your keys down and come back to them, they aren't there. Then you look again a few minutes later and they are there. The reason in the show was that the blue men building that minute forgot to include your keys, but the next group got it right.  Years later, my wife and I still refer back to that show, so I would like to find out what it was and see if I can find a copy somewhere.  . Will fruit/seed of a bonsai yield another bonsai plant/tree? With practice one can create a bonsai; no complicated modification of the DNA in a high-end lab required. The bonsai will even beget bonsai fruit.   What I am curious about is - if such bonsai fruit is planted again, will it give rise to a normal, or a bonsai tree? PHP import Excel into database (xls & xlsx) Length of a JavaScript object I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject[&quot;firstname&quot;] = &quot;Gareth&quot;; myObject[&quot;lastname&quot;] = &quot;Simpson&quot;; myObject[&quot;age&quot;] = 21; I have a new HP Z800 Workstation, running Windows 7 Enterprise 64 bit. Z800 Specs are .  The machine has 4GB of RAM -- windows reported 1.99GB available, 2GB was "hardware reserved".  I added another 2 GB and windows reports that there is 6GB of physical RAM, but now 4GB is "hardware reserved".  The BIOS sees the full RAM amount as well.  The video card is an nVidia Quadro FX 580, so it shouldn't be using any shared memory at all.    Why is all my extra RAM marked as "hardware reserved" in Windows 7?