I am making a minigame and want to be able to give players enchanted items by the click of a button. I know how to use /give but can you also enchant it? I have tried this: /give @p diamond_sword 1 0 {ench:[{id:17,lvl:2},{id:19,lvl:2}]}  If it does not work I can just have them click buttons while holding the items.
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 have the following code that shows either a bug or a misunderstanding on my part.  I sent the same list, but modified over an ObjectOutputStream.  Once as [0] and other as [1].  But when I read it, I get [0] twice.  I think this is caused by the fact that I am sending over the same object and ObjectOutputStream must be caching them somehow.  Is this work as it should, or should I file a bug?   import java.io.*; import java.net.*; import java.util.*;  public class OOS {      public static void main(String[] args) throws Exception {         Thread t1 = new Thread(new Runnable() {             public void run() {                 try {                     ServerSocket ss = new ServerSocket(12344);                     Socket s= ss.accept();                      ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());                     List same = new ArrayList();                     same.add(0);                     oos.writeObject(same);                     same.clear();                     same.add(1);                     oos.writeObject(same);                  } catch(Exception e) {                     e.printStackTrace();                 }             }         });         t1.start();          Socket s = new Socket("localhost", 12344);         ObjectInputStream ois = new ObjectInputStream(s.getInputStream());          // outputs [0] as expected         System.out.println(ois.readObject());          // outputs [0], but expected [1]         System.out.println(ois.readObject());         System.exit(0);     } } What does Morgoth look like? Is Morgoth, the original enemy in J. R. R. Tolkien's Middle-earth ever visually described? I envisage him as a bigger, meaner version of the physical Sauron, but I cannot find any reference in The Simarillion. Login with Facebook using Stack Exchange Android App The app forgets that I voted when I scroll the question Adding popup message box before tool execution with ArcPy and ArcMap I want to add a box message to pop up before execution of a button tool. When I click a button which will do geoprocessing, I want a box to appear on view before processing with message that I am about to do xxx processing. How do I do it? What I want is to create a bootable pen drive that shows GRUB menu and I can select any of the several bootable systems from there to install/run. I have several ISO images that I want to install in the USB like Ubuntu, Fedora, System Rescue CD, Windows XP and Windows 7 (The windows versions are optional, mostly am looking for a multi installer for Linux distros, specially Ubuntu version)  The default Startup Disk Creator only works with Linux Images and only 1 at a time (At least for the mean time. If it allows more systems and multiple ISOs it would be awesome)  What method exists that I can use step by step to create a bootable USB Drive with multiple images than can be booted from the USB and selected from GRUB. It must support Windows Images and Linux Images.  Alternatively, is there also a way to have multiple versions of the Ubuntu installation ISO on same USB Drive, such as, when booting from it, I get to choose what Ubuntu version and architecture to install, for example:     BOOT MENU   Ubuntu 12.04 32 Bit   Ubuntu 12.04 64 Bit   Ubuntu 12.10 32 Bit   Ubuntu 12.10 64 Bit   UPDATE: Wanted to add that the English version for the post mentioned by daithib8 is here: What is this story about 20 y.o. inexperienced "kids" fighting against a stronger foe in space? Is the neutral wire considered safe? How to find out the default file manager in the terminal? Boot error > no such device: grub rescue After an installation of Ubuntu 12.04, erasing an old partition with Ubuntu 10.10, I can't get grub to load. I can't access my Windows 7 partition either  I get the message:  &gt; error: no such device: 58ABF29C...   grub rescue&gt;   I suppose my master boot record got erased/corrupted. How can I check and fix this? How do we prove $\cos(\pi/5) - \cos(2\pi/5) = 0.5$ ?. I have an external USB 3 disk drive (2TB capacity) that is most likely going to be moved from machine to machine. The disk has a GUID partition table and an ext4 partition. I am unable to write to the disk unless I elevate the process (sudo).  As of now I am thinking of trying one or both of the following and would like to know the cons of each -   chmod 777 /mnt/externalDrive chown nobody:nogroup /mnt/externalDrive   If I give 777 permission and user1 (UID:1005) writes to it and I later move the disk to another computer where user7 is UID:1005, what happens? Does user7 become the owner of the file on that computer? It seems to me that I will periodically have to run chown -R nobody:nogroup /mnt/externalDrive on the disk.  Is any of what I am considering an obvious bad practice? The disk will most likely contain videos, music and pictures none of it need to be protected like some financial data. Can I shrink the transaction log file on a mirror database? This is a followup question to  about why I couldn't shrink the log file on the principal database.  To make a long story short, I setup database mirroring but forgot to make sure the job that backed up the transaction log was running again, and the transaction log grew to almost 60GB.   Since mirroring was set up, this size increase was duplicated on the mirrored server, and eventually took up all the disk space and made the mirror database unusable.  Per  about transaction log maintenance on a mirror database, you can't back up the log on the mirror, but when asked specifically in  about how to shrink an overgrown log file on a mirror database, a  was left that      One way to do this would be to failover to the mirrored database and   do the shrink there. Thoroughly test this out in a non-production   environment to ensure it has the behavior you want/expect.   This seems to suggest that there might be other ways to shrink the log file on a mirror, and this method might not necessarily be safe to do on a production server.  Is there a way to safely shrink the transaction log file on a database mirror? How do you obtain the Poké Flute to wake up Snorlax in FireRed? I'm trying to get past a Snorlax and I need a Poké Flute to wake him up—how do I get one? Cartoon: 4 kids transform into video game characters to save the world from a hacker and an evil program There are 4 friends: 2 girls and 2 boys who play video games. A virus program escapes and, with the help of a programmer boy, transforms the world into a video game. But a good program in a white robe turns the four of them into video game characters to save the world.  The evil virus mostly looked like The Tick from the cartoon "The Tick". Big strong guy with muscles but in red spandex. Little head with antenas, BIG chin and evil mustache.  One hero is the typical blonde girl who can scream loudly with a microphone or headphones. The other chick was shorter, more a grumpy type and with her big metal boots she was able to rock / shake the ground. There was also a funny white boy with red hair, he was a cyber archer. And their black-skinned friend, a typical tech guy with maybe one laser eye.  The transformed world has always had a theme: a swamp, a volcano,  space, a cyber city, a sewer, once a pinball machine, and so on. For some game points they were able to summon different vehicles, weapons and reinforcements/buffs.  The story is made up of the usual repetitive events: every day the hacker guy transforms the world or just the city with a wicked program. Summoning new monsters and obstacles for stopping the good guys to defeat him.  But our heroes always win and the evil program comments what a loser he is and the guy get frustrated.  (In the end, they convince the hacker guy that it just using him and he chose the good side then they wiped out the evil program forever.) - NOPE XD  Not Code Lyoko, ReBoot, Linkers, Cyberchasers. There is no 3D; it was fully hand drawn. I think it was American, but was definitely not Japanese and there was no anime-like stuff. I was young when I saw it, i'm live in a foreign country Hungary. So i dont know when was it released, but maybe before 2005. The main group maybe has something "force" in their name. The classical book on commutative algebra Introduction to Commutative Algebra, by Atiyah and Macdonald, has the following as exercise I.11.       A ring is Boolean if $x^2=x$ for any $x$ of $A$. In a Boolean ring $A$, show that     i) $2x=0$ for all $x\in A$;    ii) Every prime ideal of $A$ is maximal, and its residue field consists of two elements;   iii) Every finitely generated ideal of $A$ is principal.     I can but solve the first two of them; for the last one, I cannot even perceive the situation here, for it will not, generally speaking, be a Dedekind domain, whereof my knowledge is somewhat more. I have hitherto tried to find one element for each ideal of two generators which can stand the stead of them, and then proceed by induction. But even the first step fails to produce any result. Thanks for any hints and inspirations in advance. Ubuntu 16.04 Jan 3 2018 update causing screen/access issues Yesterday (Jan. 3, 2018), I installed an OS update (Ubuntu 16.04), using the Software Center. My system isn't working correctly now. When my mouse rolls over the Launch bar, it disappears, then any open window disappears, leaving me with only the desktop screensaver showing. I can't even shut the computer off using the settings button on the top.  I went into the Terminal and attempted to fix it using the following commands:  sudo apt-get dist-upgrade sudo apt-get autoremove   But I'm still having the same problem.  I have reinstalled Ubuntu 16.04 and when I accepted the update on install had the same problem.  I have reinstalled it a second time but have not done an OS update and everything seems to be working fine.    Found another user with the same problem:    Is it possible that the Meltdown security update is at fault?  I've read the update has been issued for 64-bit x86 architecture ();  I'm running a 32 bit i386 architecture.  Could that be an issue and is there a way to correct it? How to find number of prime numbers between two integers I have two integers, x and y so that x &lt; y. How many prime numbers are there between x and y (exclusive). Is there a formula or algorithm to compute? What does the number next to the review link in the top bar actually mean? Separate labels in cases