How to export multiple variables in tool mode? - godot

How do I add multiple inputs for a single variable in tool mode like in the image below
closest I got was:
tool
export(Array) var T=[0,0]

nvm I figured it out
tool
export(Vector2) var T;
A little tip for any future wanderers:
tool
export(Array) var T=[0,0];
From this click on the pencil item when modifying array variable & you can see all the data types and export them to see various functionalities

Related

How to force reimport of texture in godot?

I have a sample.png file which is being changed outside godot
and after it's modified, godot recives a signal and when that signal is received
I want that specific sample.png file to be reimported
I tried this answer but I want to reimport in my script itself not create a plugin for it
(atleast that's what I'm assuming it does)
I also tried this from the documents but I'm not sure how to use it exactly
EditorFileSystem.update_file("res://Assets/sample.png")
so how do I achieve the desired result?
The class EditorFileSystem is intended for plugins.
You would call get_editor_interface() from an EditorPlugin (which would be where you would be writing code if you were making a plugin). And that gives you an EditorInterface object, on which you can call get_resource_filesystem() which gives you an EditorFileSystem object.
So the intended use is something like this:
extends EditorPlugin
func example() -> void:
var editor_file_system := get_editor_interface().get_resource_filesystem()
editor_file_system.scan_sources()
# editor_file_system.update_file("res://icon.png")
By the way, EditorInterface also has a filesystem_changed signal. Although I don't know how reliable it is.
Usually you don't have to do that. When you restore the Godot window, it will scan for changes in the project folder. So you might minimize Godot while you are working on something else and when you bring the Godot window back it will pick on the changes.
In practice, the only situations when I had to use scan or scan_sources was when I had a tool script that write a resource file which should be imported, and I wanted it to reflect right away.
Instead of making a custom plugin, I'll remind you that form a tool script (as long as it is running in the editor) you can simply create an EditorPlugin object. For example:
var ep = EditorPlugin.new()
ep.get_editor_interface().get_resource_filesystem().scan()
ep.free()
I had also shared this example in another answer I wrote for you a while back here, it is under the title "About saving resources from tool scripts".

How do I change a variable value in Xilinx SDK debugger using Linux TCF Agent connected to our target?

I am connected to our target over ethernet using the Linux TCF agent to debug an application.
I've used a lot of debuggers over my 25 year career, but this is my first time using Eclipse/Linux/Xilinx environment. I can set break points. I can single step through the code. I can view variables. I can view memory. I can type a new value in the memory location, but the variable value doesn't change. I tried to click or double click the value in the Variables pane. I tried right clicking to see if it would give me an option to modify the value.
I'm not sure what good a debugging tool is if I can't change a variable value to alter the execution path of my software...
In addition to the hacky solution we came up in the comments, which is to get the address of a variable and then modify them through the mr command from the xsct console, the same console provide commands to properly get/set a local variable.
The syntax is the following:
locals [options] [variable-name [variable-value]]
And an example:
locals my_int_var 10
locals my_float_var 1.4

which variable is selected at each node

I wrote a code and used concert technology(cplex and C++). Now I want to get some information about variable selection. For example I want to know that at each node which variable is selected among 10 variables.
how can i write this and add it to my code?
As #IagoCarvalho suggested, you should have a look at the Branch callback:
https://www.ibm.com/support/knowledgecenter/SSSA5P_12.9.0/ilog.odms.cplex.help/CPLEX/UsrMan/topics/progr_adv/callbacks_basic/15_catalog.html.
Examples using a branch callback can be found in an installation of the product. Look for "branch callback" in the cplex/examples/src directory and you will find, among others, cpp/iloadmipex3.cpp.

What parameters does a function takes

I am trying to create an edgeCollection via node command line. I think the db.edgeCollection does this for me. What I don't know is what extra parameters does the function take in order to create a new edge collection.
I am currently using arangojs version 2.15.9
var database = require("arangojs").Database;
var db = new database(http://user:pass#127.0.0.1:8529)
db.edgeCollection(##What should I write here to create a new edge collection?##)
It would be nice if there is a global way of knowing the parameters required by any function.
I am using vim as my code editor.
To create an edgeCollection all I needed to do was this
var collection = db.edgeCollection("new-edge");
collection.create();
This solves the first part. And I am really sorry for not looking for the answer more because there is already a thread that answers the 2nd part of the question.
show function parameters in vim
I think if I understand your question correctly you need to go with arangojs documentation.
Try this https://www.npmjs.com/package/arangojs
If you are using vim editor you lose so many suggestion opportunities provided by IDEs like eclipse,Idea or even notepad++

Unable to set certain Find Options in VS 2012 Extension

I'm trying to open the find dialog in my VS2012 extension but I'm unable to set any options other than the find text:
var dte=(_DTE)Package.GetGlobalService(typeof(_DTE));
dte.ExecuteCommand("Edit.Find");
// this gets set:
dte.Find.FindWhat="test";
// but all others are ignored:
dte.Find.Target=vsFindTarget.vsFindTargetSolution;
dte.Find.MatchCase=false;
dte.Find.MatchWholeWord=true;
Am I missing something? I'm using VS 2012 Update 1.
Thanks to Ameen I'm now trying a different approach, however I can't find any documentation on how I need to set the arguments when raising commands:
object a=false;
object b=null;
dte.Commands.Raise(
VSConstants.GUID_VSStandardCommandSet97.ToString("B").ToUpper(),
(int)VSConstants.VSStd97CmdID.FindMatchCase, ref a, ref b);
This will always give me an E_INVALIDARG.
The DTE.Find object is stateful. It will flush down its state to the find dialog when you call the Execute method on it. In other words, it does not allow you to change the search options without executing a search.
The setting of the search term is a separate matter. Under the hoods, there is a cmdidSetSearchCombo (recalling from memory) that allows you to only set the search term and that command is executed when you set the FindWhat field of DTE.Find.
As a workaround, you can execute a search with a control character to flush the settings down to the dialog. I'd use a \r\n as the search term and simultaneously unset the multi-line search option guaranteeing that no matches will be found. Needless to say this is a hack and you should resort to this if all else fails and you are about to cry.
Are you trying to do a search in the text editor? The editor exposes the ITextSearchService2 service via MEF which will allow you to do searches scoped to a single document without the need to interact with the find dialog.

Resources