Searching for a way in bedrock to test for a held item I'm trying to make a named sword in bedrock on the PS4 that, when held, gives regen. I can't find a command that works for detecting when you're holding a certain item. I've tried many and none seem to works with my version. Any help?
Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition? This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:[&quot;Wooden planks&quot;]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:&quot;emerald&quot;,Count:5b},sell:{id:&quot;diamond_sword&quot;}}]}} summon tnt ~ ~ ~ {Fuse:20s}
"I feel bad for you" versus "I feel badly for you" SQL to find the number of distinct values in a column I can select all the distinct values in a column in the following ways:   SELECT DISTINCT column_name FROM table_name; SELECT column_name FROM table_name GROUP BY column_name;   But how do I get the row count from that query? Is a subquery required? evaluate $\int_{0}^{\infty}\cos(t) t^{z-1}dt=\Gamma(z)\cos(\frac{\pi z}{2})$ When is $2^n -7$ a perfect square? This came up while solving another ENT problem. I want to ask when is: $$2^n -7 \text{ where } n\geq 3$$ a perfect square? Specifically, I also wanted to know what would be the solutions when $n$ is odd? How should I solve this?  I can check that $n=3, 4, 7$ are solutions but cannot find more. As it is of the form $4k+1$, it doesn't help as well. sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700 I get error message always when I work with sudo command.  It shows always sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700.   A while ago I changed the permission of /var folder to 777.   How can I fix it? Copying files from command line to clipboard Get full name twice in Bibliography I use biblatex with style=authoryear and when there are two references of the same author in the bibliography there is just a dash. How can I get the full name in the second entry too? Equal standard errors for all levels of a categorical factor in lmer I have a question about the standard error of mixed model parameters estimated using the lmerTest package.  I have 12 sites with 6 treatments over each site. I measured a response variable (biomass_of_insects) (which has a Gaussian distribution).   library (lmerTest)   model &lt;- lmer(biomass_of_insects ~ as.factor(treatments) + (1 | sites))   However, the model summary shows the same standard error for every treatment (see below: 114.065). Why is the standard error always the same?   Fixed effects:                                Estimate    Std.err      df       t        p (Intercept)             501.333     80.656  66.000   6.216 3.91e-08 *** as.factor(treat)F       126.667    114.065  66.000   1.110    0.271  as.factor(treat)I        -8.333    114.065  66.000  -0.073    0.942      as.factor(treat)I+F1/3  -75.000    114.065  66.000  -0.658    0.513    as.factor(treat)I+F2/3   18.333    114.065  66.000   0.161    0.873     as.factor(treat)I+F3/3   15.917    114.065  66.000   0.140    0.889 Max dimension of a subspace of singular $n\times n$ matrices I am sure the answer to this is (kind of) well known. I've searched the web and the site for a proof and found nothing, and if this is a duplicate, I'm sorry.  The following question was given in a contest I took part. I had an approach but it didn't solve the problem.     Consider $V$ a linear subspace of the real vector space $\mathcal{M}_n(\Bbb{R})$ ($n\times n$ real entries matrices) such that $V$ contains only singular matrices (i.e matrices with determinant equal to $0$). What is the maximal dimension of $V$?   A quick guess would be $n^2-n$ since if we consider $W$ the set of $n\times n$ real matrices with last line equal to $0$ then this space has dimension $n^2-n$ and it is a linear space of singular matrices.  Now the only thing there is to prove is that if $V$ is a subspace of $\mathcal{M}_n(\Bbb{R})$ of dimension $k &gt; n^2-n$ then $V$ contains a non-singular matrix. The official proof was unsatisfactory for me, because it was a combinatorial one, and seemed to have few things in common with linear algebra. I was hoping for a pure linear algebra proof.  My approach was to search for a permutation matrix in $V$, but I used some 'false theorem' in between, which I am ashamed to post here. How to create a cross-browser sub document with iframe or shadow dom? Should I retag a question with a tag that is based on the answer and not the question? Here's a scenario:  Someone asked about "How to build a SQL query to get count and blah blah blah..."  His only tag is . I added the  and  tags to it.  Someone else answered with a nice SQL statement that has a "group by" statement which seems "logically inevitable".  I proceed to add a tag . I did that on the basis that someone who searches for  will be able to find this post useful, just as I did. My concern is, it wasn't described at all in the question, nor was it implied, unlike  and .  What is the community opinion?  The scenario above is a real one . And the one who answered it nicely is Jon Skeet. I've had a few concerns over a new form of &quot;spam&quot; - that is, through voting. A while back, I had seen some wild reputation increases to my account, amongst others, that seemingly felt weird - as I've barely participated in asking questions or providing answers. Earlier today, this sentiment was echoed by another user in chat:  and like 250 this month? it seems like someone is spam upvoting  This was another user that saw a 250 rep increase, but has been inactive for quite a while. For a site that hasn't seen more than 5 questions a day, that was really weird. To put things even more out of hand, it seems like each vote has been placed on a question.  I did some investigation of my own, and it seems like I've found a badge hunter. More of a... gold badge hunter. This user is among the top 3 voters of the site. Looking into this user's profile, this user only has under 200 rep, and has posted a single question, which was received differently. One thing caught my eye:  Votes all time              by type 581   up              535    question 1     down            47     answer   Each vote is an up vote (with the exception of one), and there are 535 up votes on questions. There are 535 questions in the entire site. Using reputation stats from user profiles, I came with the conclusion that these votes are...  Done within a short period of time. 5 question votes within a couple of minutes Done in [near] perfect chronological order: The earlier the vote, the earlier the question was asked. As if the user had gone through the list of questions in order, and placed an up vote on each one.   I see this as incredibly problematic. First:  It dangerously inflates reputation. Votes are not done based on their content, but simply for voting. Therefore, reputation loses it value as a way to measure expertise.  It's like serial up voting. Generally, when we hear the term &quot;serial up voting&quot;, we think of a voting ring, where one user continuously up votes another. This is negative for the targeted user. Well, here, we've got a voting ring with the site and this user. A user continuously up votes the site, causing negative damage for the site.  We mix good and bad content. Since low quality questions are a victim of the voting spree, many get meddled with the rest of &quot;good quality&quot; questions, despite being closed as off-topic, too broad, or whatever the reason. We can no longer reliably sort questions by quality with the very system that was designed to help us.   ... And the rest of voting fraud issues outlined in .  I've got a couple questions on this:  Is this comparable to serial voting? Should such votes be reversed? How should we determine whether or not to reverse them?  Should we stop this? Let it be? Is this really that big of a problem for sites? (I would argue that it's less of an issue for graduated sites that receive large amounts of content, but what about beta sites that rarely see more than a few questions a day) Continuous function on R which tends to infinity on open interval must have a minimum Suppose we have $f : \mathbb{R} \to \mathbb{R}$ continuous and $$\lim\limits_{x \to \pm \infty} f(x) = \infty.$$  Then must $f$ have a minimum on $\mathbb{R}$?  Intuitively it seems so, and it's easy to prove for some arbitrary closed interval in $\mathbb{R}$ with the Extreme Value Theorem, but how can we apply that to an open interval like $(-\infty, \infty)$? We know that the trace of a matrix is a linear map for all square matrices and that $\operatorname{trace}(AB)=\operatorname{trace}(BA)$ when the multiplication makes sense.   On the , under properties, it says that these properties characterize the trace completely in the following sense: If $f$ is a linear function on the space of square matrices satisfying $f(xy)=f(yx)$, then $f$ and $\operatorname{tr}$ are proportional. A  of the page gives the justification, but I do not understand the logic of it. Thanks Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX? I understand that \bf and \it are now obsolete in LaTeX and that \textbf and \textit are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the  and I understand the rules and their reasons, as well as the several other commands that are affected.  However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. \bf and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of \bf et al. with \textbf et al.  My question is this: is there a plan eventually to replace the short font style commands like \bf with the implementations of \textbf etc. some day, or should I expect \bf always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness. ATI Radeon HD 7770 no GPU rendering? How do I unset an element in an array in javascript? How to tell which row number is clicked in a table? Rigid body simulation not interacting with objects that have an array modifier restore table from .frm and .ibd file? I have previously saved a copy of /var/lib/mysql/ddms directory ("ddms" is the schema name). Now I installed a new MySQL on a freshly installed Ubuntu 10.04.3 LTS by running apt-get install mysql-server, I believe version 5.1 was installed. After I copy the ddms directory under /var/lib/mysql, some of its tables work fine, these are the tables with an associated set of three files: a .frm file, a .MYD file and a .MYI file.  However, there are two tables with a different set of files: a .frm file and a .ibd file. These two tables didn't show up in the table list in phpMyAdmin. When I look at the error log, it says:  [ERROR] Cannot find or open table ddms/dictionary_item from the internal data dictionary of InnoDB though the .frm file for the table exists. Maybe you have deleted and recreated InnoDB data files but have forgotten to delete the corresponding .frm files of InnoDB tables, or you have moved .frm files to another database? or, the table contains indexes that this version of the engine doesn't support.   Please help with restoring these two tables. Thanks.