I'm wondering if there's a way to /replaceitem the same amount as a previous execute if command,  so basically I am trying to make my own blocks in a datapack that is craftable, so I've made crafting recipes that makes spawn eggs, then I want to replace them with a spawn egg that spawns an entity with a tag so I can set a block there,  but the problem is that if I just have one command like     execute if entity @a[nbt={SelectedItem:{id:"minecraft:villager_spawn_egg",Count:1b}}] run replaceitem entity @a weapon.mainhand minecraft:villager_spawn_egg{isplacer:1b} 1   that just checks if the player's active slot has a spawn egg and then replaces it with one with a tag on it, it will always replace it with 1, so if you have for example 64 spawn eggs without tag, you would still just get one with a tag,  is there any way to di this without having 64 different commands for each amount* PS: sorry for my English it's not my primary language
I am trying to make a custom food recipe. I'm using spawn eggs with /replaceitem because spawn eggs are not obtainable in survival. This works fine when the player crafts only one spawn egg, but when I scroll over multiple spawn eggs, I receive only 1 of the custom food. BTW this food uses custommodeldata, so I can't simply add it into the crafting recipe. I cannot seem to find a way around this. If I make the item non-stackable, such as a piece of armor, mass crafting would be impossible. If I make an item.dropped scoreboard, the player could keep the item and use it to spawn mobs (griefing or for own profit.)  My command:    execute as @a[nbt={SelectedItem:{id:"minecraft:villager_spawn_egg"}}] run replaceitem entity @s weapon  minecraft:melon_slice{CustomModelData:10000101,display:{ Name:"{\"text\":\"Blue Melon Slice\",\"italic\":\"false\"}"}}     My problem is that the command does not see item count, as it is often used for weapons and armor only.    One way I thought to fix this issue is by storing the amount of custom food crafted in a scoreboard item and then giving the player that same count of the custom food, but I do not know how to do this; consequently, I don't know if this works.    Is there a way to do this method, or is there another, simpler method possible?
I've been using the Linksys USB6300 Adapter but when I switched to Ubuntu it stopped working since its only compatible with Windows. I've tried using ndiswrapper and although it says my windows driver is installed, my device isn't showing up. Anyone know how I could get this wireless network adapter working? Thanks.  lsusb  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 012: ID 05c6:6766 Qualcomm, Inc.  Bus 001 Device 006: ID 0bda:0153 Realtek Semiconductor Corp. Mass Storage Device Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB Bus 001 Device 004: ID 04ca:007d Lite-On Technology Corp.  Bus 001 Device 003: ID 04ca:008a Lite-On Technology Corp.  Bus 001 Device 010: ID 13b1:003f Linksys  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub How can I install a package without root access? I have no root access on this machine.  I would like to know if there is a way I can download Ubuntu packages and install them as non-root?  Probably in my ~/bin or ~/usr/share or something like that? Would that work? Resolving a Git conflict with binary files I've been using Git on Windows (msysgit) to track changes for some design work I've been doing.  Today I've been working on a different PC (with remote repo brian) and I'm now trying to merge the edits done today back into my regular local version on my laptop.  On my laptop, I've used git pull brian master to pull the changes into my local version. Everything was fine apart from the main InDesign document - this shows as a conflict.  The version on the PC (brian) is the latest one that I want to keep but I don't know what commands tells the repo to use this one.   I tried directly copying the file across onto my laptop but this seems to break the whole merge process.  Can anyone point me in the right direction? I created an ext4 partition to back-up my files to, and partitioned it for 102GB in Gparted using a live USB. After I booted into Ubuntu, I opened Disk Utility, and it said that the partition was actually 108GB. Confused, I opened the mounted partition in Nautilus, and it said the partition was only 98GB.  Which is correct? Did I partition it wrong? Theoretically if I were able to build some sort of device that let me sit 1 foot away from the surface of the Sun (or any star for that matter) without being vaporized, would a star produce any sort of audible sound at that distance?   From my understanding, sound waves need a medium to propagate through (air, water, etc).   Does this mean that all stars are completely silent (in the audible spectrum of frequencies at least) as they fuse  hydrogen into helium?   I know stars emit radio, xray, infrared, ultraviolet electromagnetic waves, but how about audible (20 Hz to 20Khz) frequencies?   For some reason it seems like this process would produce some sort of sound. Proving $a^2$ is even $\implies$ $a$ is even by contradiction Install suspension forks on non-suspension bike I have a 1990s Saracen PowerTrax. Is there a way I can install a suspension fork, or will that muck up the bike somehow? I'm actually interested in ways to raise the bars with respect to the seat, so that wouldn't be a problem. My toes rubbing in the wheel, in the other hand, would definitely be a problem. Are parallel calls to send/recv on the same socket valid? Mount ext4 partition with >4KiB block size I'm attempting to mount a partition from a NAS and the block size is 65536 bytes, this is above my distribution's precompiled kernel memory paging size of 4KiB, so I cannot mount it normally.  Which kernel compilation parameters would I need to change to get a memory paging size large enough?  Would it be possible under the x86-64 architecture?  EDIT: There doesn't seem to be an option for it in make xconfig unless I'm just missing it.  From page_types.h under arch\x86\include\asm  /* PAGE_SHIFT determines the page size */ #define PAGE_SHIFT  12 #define PAGE_SIZE   (_AC(1,UL) &lt;&lt; PAGE_SHIFT) #define PAGE_MASK   (~(PAGE_SIZE-1))`   It doesn't look to be configurable.  I could change this number directly to 16 and it would probably make pretty explosions and destroy Tokyo.  I shall probably try it later this evening. Sequential Update of Bayesian I am currently reading Murphy's ML: A Probabilistic Perspective. In CH 3 he explains that a batch update of the posterior is equivalent to a sequential update of the posterior, and I am trying to understand this in the context of his example.  Suppose $D_a$ and $D_b$ are two data sets and $\theta$ is the parameter to our model. We are trying to update the posterior $P(\theta \mid D_a, D_b)$. In a sequential update, he states that, $$ (1) \ \ \ \ \ \ \ \  P(\theta \mid D_{a}, D_{b}) \propto P(D_b \mid \theta) P(\theta \mid D_a) $$ However, I am slightly confused as to how he got this mathematically. Conceptually, I understand that he is saying the posterior $P(\theta \mid D_a)$ is now a prior used to update the new posterior, which includes the new data $D_b$, and is multiplying this prior with the likelihood $P(D_b \mid \theta)$. Expanding the last statement out, I have, $$  P(D_b \mid \theta) P(\theta \mid D_a) = P(D_b \mid \theta) P(D_a \mid \theta) P(\theta) $$  but are we allowed to say $P(D_a \mid \theta) P(D_b \mid \theta) = P(D_a, D_b \mid \theta)$ in order to make the connection in (1)? How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &amp;= m(-1)+b \\ 4 = f(2) &amp;= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective. Multiple workspaces on Ubuntu 18.04.1 LTS and later with GNOME Shell Since 11.10 nautilus shows my Desktop in Unity. As I remember correctly, tthis wasn't in 11.04. How can I disable that? I am stuck on the following question:     Find the volume of the torus obtained by rotating the circle $(x-a)^2+y^2=b^2$, where $a&gt;b$, around the y-axis. How was the Cloak of Invisibility Created? php - Should I encrypt email addresses? Is there a rule for pronouncing “th” at the beginning of a word? Consider the th in thistle versus the th in this: the former is unvoiced, while the latter is voiced.  Is there a rule or reason for the differences? QGIS3 - Clipping polygons to a hemisphere for azimuthal orthographic projection I'm a bit of a novice with QGIS, so this is really throwing me for a loop.  For the maps I'm intending on making, an azimuthal orthographic projection would be my preference.   For example, one map I'm trying to recreate is this map of the Pacific islands :    I've been using the NaturalEarth Quick Start package, which has been a really good launching-off point, but I'm running into some issues at the horizon of the orthographic projection.  I've tried adding a custom projection:  +proj=ortho +lat_0=0 +lon_0=170 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs   But that gives the following map:    Which certainly is close to being right, but the ocean is obviously being cut off in the Arctic and on the southern horizon.  I understand the issue is that naively mapping layers described in WGS 84 to an orthographic projection leaves you with artifacts at the horizon, but how do I fix it?    I first tried to use the Clip to Hemisphere plugin described in , but it seems incompatible with QGIS 3; when I try adding the plugin, QGIS3 gives an error message and places it in the "Invalid" section of the Plugins window.    I then tried both solutions presented at  Again the issue is with QGIS 2/3 incompatibility.    For Solution 1, both Numerical Digitize and CAD Tools are again incompatible with QGIS 3 and give the same result as Clip to Hemisphere.    For Solution 2, I can't disable on-the-fly-reprojection in settings since that setting was removed in QGIS 3. Need clarification on the Draw 4 rule. - Player 1 lays down a Draw 4 Card and says the color is Red. - Player 2 does not have a Red card but has a Draw 4 Card. Can Player 2 lay down his Draw 4 Card and have Player 3 draw 8 cards? Solving the recurrence $T(n) = \sqrt n T(\sqrt{n}) + \sqrt{n}$ A former student of mine was TA-ing an algorithms class last quarter and asked students to solve this famous recurrence relation:  $$T(n) = \sqrt n T(\sqrt{n}) + n$$  There are  and this question has already been asked here.  I was talking to my student about this problem and mentioned that it's quite hard to solve and is pretty dependent on the particular choices being made. As an example, I suggested this variant of a recurrence relation that was less simple to solve:  $$T(n) = \sqrt n T(\sqrt{n}) + \sqrt{n}$$  The TA and I tried solving this recurrence for about an hour and a half without making any progress. Here are a few things we tried:   My approach to solving the initial recurrence relation was to draw out a recursion tree and notice that each level of the tree contributes $n$ to the total and that there are $O(\log \log n)$ layers, so the recurrence solves to $O(n \log \log n)$. When I tried doing this here, I noticed that the work per layer was no longer constant; instead, the top layer sums to $\sqrt{n}$, the second layer to $n^{3/4}$, the third to $n^{7/8}$, etc. We got stuck working with the summation $n^{1/2} + n^{3/4} + n^{7/8} + ...$. We tried using the iteration method to unroll the recurrence. With the original recurrence relation, this works out nicely; here, we got stuck at the same summation given above.   I'm completely stuck trying to figure out how to solve this recurrence relation. There's nothing riding on it per se - I don't need to solve it for any particular reason - but the fact that we arrived at it by a straightforward modification of a common algorithms problem set question makes it all the more enticing.  Any idea how to solve this recurrence?  Thanks!