I'm trying to make a sign that you can right click and it will clear cacti from your inventory, then give you 18 cookies named "$100 Cookie" with the lore "$100". But when I put it in a command block and power it, the command block says this:     [04:23:51] Data tag parsing failed: Unexpected token '$' at: $100 Cookie\",Lore:[$100]}}\"}}",Text3:"{\"text\":\"iIiIiIi\",\"color\":\"light_purple\",\"strikethrough\":true,\"obfuscated\":true}",Text4:"{\"text\":\"[Sell]\",\"color\":\"dark_purple\",\"bold\":true}"   The command I'm using is:  /give @p sign 1 0 {BlockEntityTag:{Text1:"{\"text\":\"[Sell]\",\"color\":\"dark_purple\",\"bold\":true,\"clickEvent\":{\"action\":\"run_command\",\"value\":\"clear @p[name=rainbowlack,r=3] cactus 0 2304\"}}",Text2:"{\"text\":\"2304 Cacti\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"give @p[name=rainbowlack,r=3] minecraft:cookie 18 0 {display:{Name:\"$100 Cookie\",Lore:[$100]}}\"}}",Text3:"{\"text\":\"iIiIiIi\",\"color\":\"light_purple\",\"strikethrough\":true,\"obfuscated\":true}",Text4:"{\"text\":\"[Sell]\",\"color\":\"dark_purple\",\"bold\":true}"},display:{Name:"Custom Sign"}}   What's wrong with this command? I've tried backslashes and stuff. Can you please try to fix the command and test out your potential fix in-game? Thank you!  You'll have to change the [name=rainbowlack,r=3] parts to whatever your username is (example: [name=playerplayer123,r=3]).
I need help with a specific command that I am using in a new game that I am creating inside of Minecraft. The command is:  /give @p sign 1 0 {BlockEntityTag:{Text1:"{"text":" [MF2]","color":"gold","clickEvent": {"action":"run_command","value":"tellraw @a [""{"text":"[MF2]  ","color":"gold"},{"selector":"@p","color":"dark_aqua"},{"text":" is now an admin of the server!","color":"white"}]"}}",Text3:"{"text":"Click to join Admin","color":"dark_aqua","clickEvent": {"action":"run_command","value":"scoreboard teams join admin @p"}}"},display: {Name:"Custom Sign"}}   If I take out the /tellraw command then the command works fine, but I need the command in there to announce to the game that a new admin has joined.  With the tellraw command, the error message is the following:  Data tag parsing failed: Unexpected token 't' at: text":" [MF2]","color":"gold","clickEvent":{"action":"run_command","value":"tellraw @a [""{"text":"[MF2] ","color":"gold"}, {"selector":"@p","color":"dark_aqua"},{"text":" is now an admin  of the server!","color":"white"}]"}}",Text3:"{"text":"Click to join Admin","color":"dark_aqua","clickEvent": {"action":"run_command","value":"scoreboard teams join admin @p"}}"   If anyone knows how to fix this, please let me know.
Can Minecraft Pocket Edition play with a desktop Minecraft? What is this agglomeration of pink cells I found attached to a stone? For example, if I revisit a memory of mine where I'm inside a castle and talking to someone, can the present-me explore different parts of the castle meanwhile the past-me continues her conversation? Is that possible? Impulsioned jumping There's one thing that has been puzzling me, and that is how to implement a 'faux-impulsed' jump in a platformer. If you don't know what I'm talking about, then think of the jumps of Mario, Kirby, and Quote from Cave Story. What do they have in common? Well, the height of your jump is determined by how long you keep the jump button pressed.  Knowing that these character's 'impulses' are built not before their jump, as in actual physics, but rather while in mid-air - that is, you can very well lift your finger midway of the max height and it will stop, even if with desacceleration between it and the full stop; which is why you can simply tap for a hop and hold it for a long jump -, I am mesmerized by how they keep their trajetories as arcs.  My current implementation works as following:    While the jump button is pressed, gravity is turned off and the avatar's Y coordenate is decremented by the constant value of the gravity. For example, if things fall at Z units per tick, it will rise Z units per tick.  Once the button is released or the limit is reached, the avatar desaccelerates in an amount that would make it cover X units until its speed reaches 0; once it does, it accelerates up until its speed matches gravity - sticking to the example, I could say it accelerates from 0 to Z units/tick while still covering X units.  This implementation, however, makes jumps too diagonal, and unless the avatar's speed is faster than the gravity, which would make it way too fast in my current project (it moves at about 4 pixels per tick and gravity is 10 pixels per tick, at a framerate of 40FPS), it also makes it more vertical than horizontal. Those familiar with platformers would notice that the character's arc'd jump almost always allows them to jump further even if they aren't as fast as the game's gravity, and when it doesn't, if not played right, would prove itself to be very counter-intuitive. I know this because I could attest that my implementation is very annoying.    Has anyone ever attempted at similar mechanics, and maybe even succeeded? I'd like to know what's behind this kind of platformer jumping. If you haven't ever had any experience with this beforehand and want to give it a go, then please, don't try to correct or enhance my explained implementation, unless I was on the right way - try to make up your solution from scratch. I don't care if you use gravity, physics or whatnot, as long as it shows how these pseudo-impulses work, it does the job.  Also, I'd like its presentation to avoid a language-specific coding; like, sharing us a C++ example, or Delphi... As much as I'm using the XNA framework for my project and wouldn't mind C# stuff, I don't have much patience to read other's code, and I'm certain game developers of other languages would be interested in what we achieve here, so don't mind sticking to pseudo-code.  Thank you beforehand. I've used Ubuntu before, but I'm still very new. I just installed 16.10 on a new computer yesterday, and the Wi-Fi has been considerably slower than my Windows laptop. I put the computer together mainly to play Dota 2, and I experience decent ping but constant 5%-10% packet loss while playing. Occasionally, after the computer has been left on for a while, the Wi-Fi connection will drop completely- I can still see networks in the drop down menu, including my home network, but my computer will not reconnect without a reboot. I've looked all over for a solution, but my inexperience has prevented me from getting anything to work. My Wi-Fi card is a Ralink RT2561/RT61, here's some info  The output of sudo lshw -C network   *-network                          description: Wireless interface         product: RT2561/RT61 802.11g PCI         vendor: Ralink corp.         physical id: 6         bus info: pci@0000:01:06.0         logical name: wlp1s6         version: 00         serial: 00:0e:2e:de:df:c0         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=rt61pci driverversion=4.8.0-22-generic firmware=0.8 ip=192.168.1.107  latency=64 link=yes multicast=yes wireless=IEEE 802.11         resources: irq:17 memory:dfef8000-dfefffff   Here is the output of sudo iwconfig:   *-network                          description: Wireless interface         product: RT2561/RT61 802.11g PCI         vendor: Ralink corp.         physical id: 6         bus info: pci@0000:01:06.0         logical name: wlp1s6         version: 00         serial: 00:0e:2e:de:df:c0         width: 32 bits         clock: 33MHz         capabilities: pm bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=rt61pci driverversion=4.8.0-22-generic firmware=0.8 ip=192.168.1.107  latency=64 link=yes multicast=yes wireless=IEEE 802.11         resources: irq:17 memory:dfef8000-dfefffff   I'm at a loss, I'm very bad at this. If any additional info is needed I can provide it How to estimate camera sensor size? I am using a smartphone for capturing photos and I need to estimate the camera sensor size (mm*mm). I have the resolution (in pixels) and the focal length (in pixels). I can also measure the size of any stationary object and its distance w.r.t the lens. Basically, I don't have a pixel-to-mm metric for any of the above parameters that I can use. Is there any way I can calculate that to estimate sensor size? FastBoot recovery failed: partition 'recovery' not support flash Bisecting K-means using Dynamic Time Warping I'm trying to cluster time series of different length and I came up to an idea to use DTW as a similarity measure, which seems to be adequate, but the thing is, I cannot use it with K-means, since it's hard to define centroids based on time series which can have different length/phase. So I was thinking about Hierarchical clustering, since it seems appropriate to combine with DTW, but it's not scalable. So my next thought is to try with bisecting k-means that seems scalable, since it is based on K-means step repetitions. My idea is next, by steps:   Take two signals as initial centroids (maybe two signals that have smallest similarity, calculated using DTW) Assign all signals to two initial centroids Repeat the procedure on the biggest cluster   In this way I could use DTW as distance measure, that could be useful since my data may be shifted, skewed, and avoid calculating centroids. At the end I could take one signal from each cluster that is the most similar with others in cluster (some kind of centroid/medioid).  What do you think about this approach and about the scalability? Why there is a delay between when a key is pressed and when it is accepted? This is one of the wackiest and weirdest problems I have ever encountered. My keyboard was working absolutely fine untill yesterday on Ubuntu 13.04. However, when I boot to Ubuntu today, I suddenly find that all the keys work, but I have to press and keep on holding them for about a second for them to work.   This behavior is true for all the keys except for Num Lock, Caps Lock and Scroll Lock keys, the indicator for them on my keyboard lights up as soon as I press those keys. The keyboard works fine at the login screen where I put my password.  The keyboard also works normally if I use the Guest session instead of my normal user account. I have not done any key-remappings and using the standard English (US) keyboard layout.  I have fiddled around with the settings for Keyboard in System Settings, but to no avail. I have Windows 7 as dual-boot and the keyboard works perfectly well on it.   Why am I facing such a behavior and how to normalize this?  PS: Using Logitech Classic Keyboard K100 (USB Model). Joining attributes of polygons and points by location in QGIS I have two shapefiles....   points containing a number field 'response_time' a polygon grid of square polygons containing fields including 'PNTCNT' with the number of points per polygon, calculated already using the tool 'points in polygon'   There are between 0 and 600 points within the bounds of each polygon in the grid.  I want to add fields to the polygon grid for the mean, min and max response times within each polygon, in addition to the PNTCNT field already there.  I have tried the 'Join attributes by location' tool, making the polygon layer the target and the points the join layer, and vice versa. I've selected 'take summary of interesting features'.  But I can't get the result I want. All I end up with is the polygon grid again but with an extra field 'COUNT' which replicates (or duplicates) the 'PNTCNT' field. No min, max and mean of values from the points layer.  What am I doing wrong? Is there a better way to do this? I have tried this using QGIS 1.7 and 1.8. I found this question in a book.   How many terms of the Maclaurin expansion of $(1+x)^{82}$ are needed to guarantee finding a value of $1.1^{82}$ to an accuracy of $10^{-6}$?  This is how I tried to do it:  We want the Lagrange error to be less than $10^{-6}$:  $$R_{n}(0.1)&lt;10^{-6}$$  Now to find $R_{n}(0.1)$:  $$R_{n}(0.1)=\frac{f^{(n+1)}(0.1)\cdot0.1^{n+1}}{(n+1)!}$$  After writing the values of ${f^{(n+1)}}(x)$, I find a pattern and say that  $${f^{(n+1)}}(x)=\frac{82!}{(82-n)!}(1+x)^{82-n}$$  $${f^{(n+1)}}(0.1)=\frac{82!}{(82-n)!}(1.1)^{82-n}=\frac{82!(1.1)^{82-n}}{(82-n)!}$$  Now just substitute all of this back to $R_{n}(0.1)&lt;10^{-6}$:  $$\frac{\frac{82!(1.1)^{82-n}}{(82-n)!}\cdot0.1^{n+1}}{(n+1)!}&lt;10^{-6}$$  Great! Now I have an inequality that I can solve. I can't graph this so I just use trial and error (which seems like quite an intensive way to do it, so if anyone has a better way I'd love to know).  $$\frac{\frac{82!(1.1)^{82-n}}{(82-n)!}\cdot0.1^{n+1}}{(n+1)!}-10^{-6}&lt;0$$  This seems to work first for $n=28$. That means the highest power of $x$ that I need is 28, so the number of terms in the expansion needs to be $n+1=29$. But the book's answer is       30   What am I doing wrong here? I'm still quite new to the power series expansions so if there's anything unclear in my working, please let me know (also, as a side note, the book itself may be wrong, though that isn't very likely I'd assume). Local BLAST Copy Number per Hit I generated a series of local BLAST databases using makeblastdb of metagenomic data and am searching for the presence of a particular gene. While I can do the normal BLAST analysis looking at e-values, % identity, etc. I haven't been able to figure out how to determine how many times a given sequence exists in the database.  So: given a BLAST database of metagenomic data where a particular gene may exist multiple times, how do I determine the copy number of a given BLAST hit?  Thanks in advance. How to read a csv file and use the values as x and y points in blender? Why can I not access a file named `-` when quoting? I have a file called -.  I want to display its contents.  One way is to do  cat ./-   since cat - reads from standard input. However, why are cat "-" and cat '-' also interpreted by the shell as cat -? ‘[...][Harry'll] be famous – a legend – I wouldn’t be surprised if today was known as Harry Potter Day in future – there will be books written about Harry – every child in our world will know his name!’   ‘Exactly,’ said Dumbledore, looking very seriously over the top of his half-moon glasses. ‘It would be enough to turn any boy’s head. Famous before he can walk and talk! Famous for something he won’t even remember! Can’t you see how much better off he’ll be, growing up away from all that until he’s ready to take it?’   Philosopher's Stone - pages 15 - 16 - chapter one, The Boy Who Lived   Did Dumbledore choose correctly?  Knowing what we do about Harry and his canon character attributes (And faults, too!), was Harry really better off enduring eleven years of physical and emotional abuse at the hands of the Dursleys than eleven years of celebrity and fame in the wizarding world? I'm sure we've all read about child celebrities who have done well handling fame, and some who have not fared so gracefully.   Would Harry have endured celebrity as stoically as he did the Dursleys' abuse? Did Dumbledore make the right choice in leaving Harry with the Dursleys instead of letting him grow up in the wizarding world?  Was Harry really better off?  ETA: I'm looking for an answer grounded in Harry Potter canon and written in the spirit of canon. Please do not pair Harry with Elle Fanning or opine that he's secretly an American ;) Thanks! Can't cast to to unspecific nested type with generics Answer draft is lost if you click to sign up Using the inference of mean as an example, the null and alternative hypothesis could be  $$H_0: \mu \le 0 \Leftrightarrow H_1: \mu &gt; 0$$  It is often argued that this makes the calculation of the $p$-value (or critical region) easier, but from my understanding the $p$-value is $P(\bar{X} &gt; 0|H_0) \stackrel{\color{red}{?}}{=} \sup_{\theta \in H_0} P(\bar{X} &gt; 0 | \theta )$. Since I'm taking its supremum, the $p$-value doesn't change regardless of whether the equality sign is included. The same result goes for the critical region. However, I'm not sure if my understanding is correct, and my doubt is marked with a red question mark above.  Anyway, I wonder if it's correct (I know that would be unconventional, though) to write  $$H_0: \mu &lt; 0 \Leftrightarrow H_1: \mu \ge 0$$  If that's OK, what about its $p$-value and critical region? If that's not OK, I would be really surprised, because in that way we are changing the question ("Is $\mu$ less than or equal to zero?") to something different ("Is $\mu$ less than zero?") Remove suggested apps option in iOS 10 How can I disable Ctrl+Q for all applications (system wide)? A lot of applications like Firefox, Chrome etc, get closed when I accidentally press Ctrl+Q instead of Ctrl+W because of the proximity of the Q and W keys on the keyboard. Is there a way this shortcut can be removed or reset on a system wide basis?