Scoreboard In Minecraft - minecraft

I wanted to know how to make a scoreboard That Knows What Cordinates You are at,
and one that I can actually make text in, because I can put text, but only numbers for the answer.
Is is something like...
''
/scoreboard players add {text} {name} {score}
''?
P.S., I tried /scoreboard players add {text} {name} {score}, but when I do it, it does not allow me to put text in for the score.
If I was able to do that, I would create that, but, Another thing...
Am i able to create one with animated text in vanilla Minecraft?

Scoreboards can only hold short integer values. The name of the value (key, property, entry, objective or whatever you want to call it) however is a String, with not too many limitaitons. For display purposes generally this is used - you might have seen scoreboards on some servers where the left side had the information as text and the right side consisted of numbers 1-10.
Unfortunately, it is not possible to dynamically create scoreboard entries via commands or command blocks. You have to use plugins or datapacks for that. (I'm unsure whether this is doable with datapacks, but you should be able to research that on your own). While plugins are not considered vanilla, datapacks are a part of the minecraft environment.
For more information about scoreboards you can read https://minecraft.gamepedia.com/Scoreboard.

if you want to create a scoreboard, use scoreboard objectives add <name> <type> <display JSON (optional)>
your current command, scoreboard players add is used for adding values to one's score.
there is a score json component, which you can use in the display name creating an objective, but that is about as dynamic scoreboard names get.
this might not be what you want, but you can get a players coordinates in a scoreboard. here are some commands to do so:
run the following command once:
scoreboard objectives add pos dummy // creates scoreboard only modifiable with commands (dummy)
run the commands after this repeating, in a repeating command block or your tick function, if you are using datapacks.
execute as <player> store result score x pos run data get entity #s Pos[0]
execute as <player> store result score y pos run data get entity #s Pos[1]
execute as <player> store result score z pos run data get entity #s Pos[2]
these command store the player's various position data into a score, which you will then be able to see on the scoreboard, which can be displayed with scoreboard objectives setdisplay sidebar pos
let me know if you have more questions. note the solution i provided only works for one player, for others it is a little more complicated.

Related

LabVIEW - How to clear an array after each iteration in a for loop

I'm trying to clear an array after each iteration of a for loop in LabVIEW, but the way I've implemented it has the values not going directly to what I want, but it changes with previous values in other parts of the array.
It isn't shown, but this code is inside of a for-loop that iterates through another numeric array.
I know that if I get the array to clear properly after each loop iteration, this should work. How do I do that? I'm a beginner at Labview but have been coding for awhile - help is appreciated!!!
[![labview add to array][2]][2]
It looks as if you're not quite used to how LabVIEW passes data around yet. There's no need to use lots of value property nodes for the same control or indicator within one structure; if you want to use the same data in more than one place, just branch the wire. Perhaps you're thinking that a LabVIEW control or indicator is equivalent to a variable in text languages, and you need to use a property node to get or set it. Instead, think of the wire as the variable. If you want to pass the output of one operation to the input of another, just wire the output to the input.
The indicators with terminals inside your loop will be updated with new values every loop iteration, and the code inside the loop should execute faster than a human can read those values, so once the loop has finished all the outputs except the final values will be lost. Is that what you intended, or do you want to accumulate or store them in some way?
I can see that in each loop iteration you're reading two values from a config file, and the section is specified by the string value of one element of the numeric array Array. You're displaying the two values in the indicators PICKERING and SUBUNIT. If you can describe in words (or pseudocode, or a text language you're used to) what manipulation of data you're actually trying to do in the rest of this code, we may be able to make more specific suggestions.
First of all, I'm assuming that the desired order of operations is the following:
Putting the value of Pickering into Array 2
Extracting from Array 2 the values to put in Pickering 1 and Pickering 2
Putting Array 2 back to its original value
If this is the case, with your current code you can't be sure that operation 1 will be executed be fore operation 2. In fact, the order of these operations can't be pre-determined. You must force the dataflow, for example by creating a sequence structure. You will put the code related to 1 in the first frame, then code related to operation 2 in the second.
Then, to put Array 2 back to it's original value I would add a third frame, where you force an empty array into the Value property node of Array 2 (the tool you use for pickering, but as input and not as output).
The sequence structure has to be inside the for loop.
I have never used the property node Reinit to default, so I can't help you with that.
Unfortunately I can't run Labview on this PC but I hope my explanation was clear enough, if not tell me and I will try to be more specific.

How to execute if there's a certain block within a radius

I'm trying to figure out how to execute (for example /say hi) when there's Yellow Terracotta in a certain radius or field, however I can't figure out how to do it.
Anyone knows?
Using Minecraft 1.16,
"Execute" command has several syntax options. You can use the form "execute if block run "
Using the proper block name, we can get:
execute if block 1015 63 989 minecraft:yellow_glazed_terracotta run say hi
This targets a specific position.
I am a little less clear on how to achieve specifically what you are asking, but here are my thoughts:
The syntax provides for another form "execute if blocks..." This form allows you to select a range by corners, but it must be compared against a third selection of the exact same size (only the corner can be specified). I think the regions must be exactly the same, and may not allow for random placement of the block anywhere within the region.
Another way might be using different execute if commands instead to select an entity, and test where the entity is standing.
If you put a button on a command block and set it to:
execute at #p if block ~ ~-1 ~ minecraft:yellow_glazed_terracotta run say hi
When the player hits the button on the command block (obviously they must be within range of the button to press it) it shall check if the block -1 under the #p is "yellow_glazed_terracotta", and it will run say hi.
#p can be modified with [distance=..3] which means the player targeted by the command block must be within 3 blocks of the command block:
execute at #p[distance=..3] if block ~ ~-1 ~ minecraft:yellow_glazed_terracotta run say hi
So, this is sort of creating that range that you were looking for.
Some sources use "execute as #a at #s..." as a way to target any player when they step on a certain block anywhere at anytime. It may be possible to modify this into a distance as well, but it seems that the player will need to stand at a specific relative position to the terracotta.
If I find a better way to achieve this, I'll follow up.
The subreddit r/MinecraftCommands has a decent community that messes with Minecraft commands and command blocks. They may have further insight.
If I find a better way to achieve this, I'll follow up.
Edit- The only other thing I can think at this point is to take the first command I suggested and repeat it for every single coordinate in an area. If a terracotta block is any of those spaces, it will run the say hi command.
If you place all of these command lines into a function file you can call for the function when the command block is activated.

How to save variables from Uppaal created during the modeling process

I've created a model with Uppaal in which several integer variables change over the course of time. Now I would like to save the values of the variables during the modelling process somewhere (best in xml or a text file). In the Uppaal documentation (https://www.it.uu.se/research/group/darts/uppaal/documentation.shtml) I found the method in point 13 (How do I export and interpret the traces from Uppaal?) and tried the Java API way already, in the hope that it can output the variables as well as the traces. Unfortunately this method seems to be limited to traces. Does anyone know a method to save the variable values from Uppaal?
Hopeful greetings,
Josi
Solution from the comments.
to export the variable value tractory over time, one may use SMC query in the verifier.
For example:
Typeset the following query: simulate 1 [<=300] { Gate.len }
Click Check
Right-click on the query, and from the popup menu choose Simulations (1)
Observe a new window popup with a plot
Right-click on the plot and choose Export Comma Separated Values
Follow the save file dialog and observe the resulting file to contain time and value sequence.
Note that SMC assumes that all channels are broadcast and there are no deadlocks.

Cypher-Neo4j Node Single Property change to Array

Following is a Node we having in DB
P:Person { name:"xxx", skill:"Java" }
and after awhile, we would like to change the Skill to skill array, is it possible?
P:Person { name:"xxx", skill:["Java", "Javascript"] }
Which Cypher query should I use?
If you have a single skill value in skill, then just do
MATCH (p:Person)
WHERE HAS (p.skill)
SET p.skill=[p.skill]
If there are multiple values you need to convert to an array such as P:Person { name:"xxx", skill:"Java","JavaScript" } then this should work:
MATCH (p:P)
SET p.skill= split(p.skill,",")
In fact, I think your real problem here is not how to get an array property in a node, but how to store it. Your data model is wrong in my opinion, storign data as array in neo4j is not common, since you have relations to store multiple skills (in your example).
How to create your data model
With your question, I can already see that you have one User, and one User can have 1..n skills.
I guess that one day (maybe tomorrow) you will need to know which users are able to use Java, C++, PHP, and every othre skills.
So, Here you can already see that every skill should have its own node.
What is the correct model in this case?
I think that, still with only what you said in question, you should have something like this:
(:Person{name:"Foo"})-[:KNOWS]->(:Skill{name:"Bar"})
using such a data model, you can get every Skill known by a Person using this query:
MATCH (:Person{name:"Foo"})-[:KNOWS]->(skill:Skill)
RETURN skill //or skill.name if you just want the name
and you can also get every Person who knows a Skill using this:
MATCH (:Skill{name:"Bar"})<-[:KNOWS]-(person)
RETURN person //Or person.name if you just want the name
Keep in mind
Storing array values in properties should be the last option when you are using neo4j.
If a property can be found in multiple nodes, having the same value, you can create a node to store it, then you will be able to link it the other nodes using relations, and finding every node having the property X = Y will be easier.

Putting the cursor in a specific place in a live template

I just wanted to know how you put a cursor in a specific place in a live template for IntelliJ
For example:
# $var$ is an insance of the $objectType$ class
assert isinstance($var$, $objectType$)$END$
What happens here is that your cursor gets dragged to $var$ in the comment string first and then to your other values inside assert. What I wanted to know is how you chose where the cursor goes first.
I've read the documentation, but this is not mentioned, although a lot of other things are.
You can arrange the order that your variables are visited in. You find the information under bullet number five in this IntelliJ help document: http://www.jetbrains.com/idea/webhelp/creating-and-editing-template-variables.html
To arrange variables in the order you want IntelliJ IDEA to switch between associated input fields, use the Move Up and Move Down buttons.
Edit
You have to update the macro definition to similar to this:
# $varComment$ is an insance of the $objectTypeComment$ class
assert isinstance($var$, $objectType$)$END$
And then you define the order and expression to something like this (I didn't have any good expression for the var and orderType for you):
Since you fill in the Skip if defined for the two comment variable they will just take the values from the var and orderType and fill it in. This will do exactly what you are looking for :-)