When I am writing a bash script like the following:  #!/bin/bash  nc localhost [pseudoport] echo "test"   it connects to the server but does not send the text "test".  It works with   #!/bin/bash  echo "test" | nc localhost [pseudoport]   The problem here is that the connection exits after something has been received.  How can I send multiple messages, in my case a fixed preamble followed by a variable data?
I am trying to use netcat to send a simple message over TCP, e.g. I want to send the digit 1.  So I understood that I write the following in the terminal, after installing netcat  netcat [ip-address] [port]  But how do I specify the message to be sent? i.e. where to I write "1" ?
pip: AttributeError: 'module' object has no attribute 'SSL_ST_INIT' What is color temperature and how does it affect my photography? Why does "kill -9 0" end my console session? I just wonder why kill -9 0 ends my tty console session?   What exactly is PID 0, it is not listed on a ps aux? Floating sidebar clash with footer in team page Here is a screenshot from  page, with the floating sidebar: (all good so far)        After I scroll down to footer it just combines both:        Can it please be fixed? Why an R-module is an R/I-module precisely when it is annihilated by I? Let $I$ be an ideal of $R$ and let $M$ be an $R$-module. Prove that the formula $(r + I) \cdot m = r \cdot m$ for $r + I \in R/I$, and $m \in M$ makes $M$ into an $R/I$-module if and only if $i \cdot m = 0$ for all $i \in I, m \in M$.   I don't quite understand why we must have $i \cdot m = 0$ instead of $I \cdot m \in M$. This is for proving the only if part. What is the sweet spot for experience gain? Is it more effective to fight the highest level enemies I can find, or am I penalized for being out of my depth? Are certain areas of the game better/best for experience gain/leveling? Are bosses better than areas with infinite minions? Would I get exp faster in a higher-level co-op game? What are the most time-effective techniques for rushing/boosting a character (either solo or co-op)? How to model non-negative zero-inflated continuous data? I'm currently trying to apply a linear model (family = gaussian) to an indicator of biodiversity that cannot take values lower than zero, is zero-inflated and is continuous. Values range from 0 to a little over 0.25. As a consequence, there is quite an obvious pattern in the residuals of the model that I haven't managed to get rid of:   Does anyone have any ideas on how to solve this? Does non-mass-energy generate a gravitational field? At a very basic level I know that gravity isn't generated by mass but rather the  and when I wave my hands a lot it seems like that implies that energy in $E^2 = (pc)^2 + (mc^2)^2$ is the source of gravity.  If the total energy of a particle contributes to the generation of a gravitational field, that seems to imply some strange things.  For example, you could accelerate a particle like an electron to such a high velocity that it has enough momentum / kinetic energy to collapse into a black hole.  An observer traveling with the electron would see an electron and stationary observers would see an arbitrarily massive black hole flying by.  These observations seem to be contradictory.  The same would be true of an extremely high energy photon.  Another consequence is that a stationary particle could appear to have so much mass that it could attract / deflect the trajectory of a rapidly moving observer.  It seems odd that at low velocities you wouldn't even notice a stationary electron as you pass it by but at high velocities the gravitational field you observe could be significant enough to alter your path.  Am I correct that non-mass-energy generates a gravitational field?  If it does, how are these strange observations like a particle looking like a black hole in one reference frame but not another reconciled? How can metagaming retries on poor skill checks be prevented? I'm sure every DM has had this happen: one PC is trying to find something cool on a dead monster's body. The player rolls poorly, and instead of accepting the paltry 2 copper pieces, the PC calls all the party members over to also try looting the corpse. Invariably, a different player rolls well, and everyone walks away satisfied that everything's been taken down to the poor dead monster's last holey sock.   Another example: One PC is trying to find some useful information in a library. There're no guards, no reason anyone would be bothered, and no time restraints to stress about. The player rolls poorly, so all the other PCs try, too.  I'd describe this as well-intentioned metagaming. The players are afraid of losing out on content, this despite multiple sessions of me making it clear that I don't structure my games to penalize gameplay that way.  These are situations that require a roll to determine the degree of success. (At least I think so; perhaps I'm wrong here?) Failure could set back the PCs a cool item or a bit of information that would have helped a little, but these minor failures aren't game-enders or anything. As a DM I can't see a reason to say "No" and disallow the practice, but it feels vaguely like cheating to let the players roll multiple times to get better results.  How do I prevent players ganging up on skill checks after they've seen someone roll poorly? Why didn't the basilisk bite in Chamber of Secrets destroy the Horcrux? As the title asks, why didn't the basilisk bite received in the Chamber of Secrets destroy the Horcrux inside the bitten person?   Yes, I know Fawkes quite quickly healed the bite wound with his phoenix tears, but when Harry used the basilisk fang to destroy Tom Riddle's diary the destruction of that Horcrux was immediate. When Ron hit the locket with the Sword of Gryffindor, it was destroyed immediately. Although the destruction of the ring occurred off-page, Dumbledore used the Sword of Gryffindor to destroy it, so presumably, like the locket, it was gone right away. Nagini died straightaway when Neville decapitated her. The destruction of the Hufflepuff cup happens off-page. The diadem seems to have been destroyed by Fiendfyre immediately as well, as when Harry examined it outside the Room of Requirement it was already leaking a blood-like substance, and then it cracked in half. When Voldemort hit Harry with Avada Kedavra in the forest, Harry woke up in limbo with the last fragment of Voldemort's soul - that awful flayed baby-like being - separated from him immediately.   Is there a logical/canon-based explanation for why the fragment of Voldemort's soul residing in Harry wasn't destroyed upon Harry being bitten by the basilisk?  NOTE: I've read the HP Wiki's entry on Horcruxes; however, I find the HP Wiki to be inconsistent in its accuracy, so I'm hesitant to accept the Wiki's explanation on the matter. I'd prefer an explanation constructed from information in the books or a statement by JKR, or the like. I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.   I hope you can help me fix it. X, along with Y, "were" or "was"? I was interested in the following sentence which appeared in a   in The Washington Post, Politics, (WHO RUNS GOV).     She, along with Mark Childress, were set to be Daschle's deputies at   the White House before he stepped down.   Can someone clarify if the fragment "She, along with Mark Childress, were set to" is ungrammatical, as I think it is?  I would reword were with was because I think that the subject of the sentence - obviously, in grammatical terms - is "She", not "She" and "Mark Childress", but I'm not sure on this correction.  More precisely, I'm not so sure that "She, along with Mark Childress" is equivalent to She and Mark Childress with regard to the effects on the grammatical numbers. how many terms will there be once you collect terms with equal monomials? What is the sum of all the coefficients? $ echo $(( 255 )) 255 $ echo $(( 33 )) 33 $ echo $(( ~33 )) -34 $ echo $(( ~255 )) -256 $    and my kernel is:  $ uname -a Linux HOSTNAME 3.2.0-40-generic-pae #64-Ubuntu SMP Mon Mar 25 21:44:41 UTC 2013 i686 i686 i386 GNU/Linux     QUESTION: ~ is for negating the number AFAIK. But why does ~33 produce -34 and why does ~255 produce -256? Show that $\left| \frac{1}{x}-\frac{1}{z} \right| \le \left|\frac{1}{x} - \frac{1}{y} \right| + \left|\frac{1}{y} - \frac{1}{z} \right|$. The Cartesian product of a finite number of countable sets is countable The Cartesian product of a family $(A_i\mid i\in I)$ is defined as $$\prod\limits_{i\in I}A_i=\{f:I\to\bigcup A_i\mid f(i)\in A_i\}$$ Let $I_n=\{i \in \mathbb N \mid i \le n\}$ for $n\in \Bbb N$ and $A_i$ be countable for all $i\in I_n$. Then $\prod\limits_{i\in I_n}A_i$ is countable.   My attempt: Lemma 1: $(\prod\limits_{i\in I_n}A_i) \times A_{n+1}$ and $\prod\limits_{i\in I_{n+1}}A_i$ are equinumerous for all $n \in \mathbb N$. (I presented a proof ) Lemma 2: If $A$ and $B$ are countable, then $A \times B$ is countable. (I presented a proof ) I will prove the theorem by induction on $n$. The theorem is trivially true for $n=0$. Assume that the theorem is true for $n=k$, then $\prod\limits_{i\in I_k}A_i$ is countable. Since $\prod\limits_{i\in I_k}A_i$ is countable (by inductive hypothesis) and $A_{k+1}$ is countable, then by Lemma 2 $(\prod\limits_{i\in I_n}A_i) \times A_{n+1}$ is countable. Furthermore, by Lemma 1 $(\prod\limits_{i\in I_k}A_i) \times A_{k+1}$ and $\prod\limits_{i\in I_{k+1}}A_i$ are equinumerous, then $\prod\limits_{i\in I_{k+1}}A_i$ is countable too. Thus the theorem is true for $n=k+1$. This completes the proof.   Does this proof look fine or contain gaps? Do you have suggestions? Many thanks for your dedicated help! "Geometric" or "Geometrical"? I have read the excellent answers to  - my question is specifically about usage.   Is there a best practice for deciding between the variants geometric and geometrical in writing? A  shows that geometrical was more popular until about 1965, when they switched. What grammatical rules, if any, would be relevant here? Our production server (2012, VM + SAN) has 32 GB of RAM, the database size is ~80GB. The application uses TempDB heavily - disk is hit ~100 MBps both reads &amp; writes.  Seeing tons of SQL compilations/sec .. 95% of all batch requests are compilations.  Ideally would like to increase the RAM to 64GB or 128GB, but need to 'prove' to team that it's required.  Buffer Cache Hit Ratio (BCHR) is 99.9%, but Page Life Expectancy (PLE) is only ~400. What's the explanation for this ? I though PLE &amp; BCHR had a linear relationship (i.e. they increase or decrease together)  On other VMs with larger databases and lot more RAM, both BCHR &amp; PLE are high.  Current wait stats and perf counters Is it true that $\mathbb{R}$ and $\mathbb{R}^2$ are isomorphic as abelian groups? I'd like to create a Categorized style in QGIS, classify with it data in a shapefile and then save the shapefile with the new categorized style. Is it possible?