I have a Netlogo model that I can use by setting a slider and then pressing the buttons in my interface once each in the following order: setup, go, SetSeed, Share. This all works fine.
I'd like to use Behavior Space to run this 100 times with various values of the slider.
I can get it to work with just setup and go but when I try to include SetSeed and Share the program hangs.
I have put setup in the 'Setup Commands:' box and go in the 'Go Commands:' boxes and that bit works fine.
To then add in SetSeed and Share I have tried adding the following to 'Go Commands:' in the following format:
go
SetSeed
Share
When I try SetSeed or Share on their own without go (just to see what happens) it also hangs (the steps just keep going up and up). Does anyone know what might cause this? I thought Go Commands essentially just had the computer press those buttons once rather then having a user do it?
You need to specify how long you want the run to last, either by entering a number of steps in the experiment setup (in your case, 1), or by specifying a stop condition, for example, you might have the run stop when not any? turtles becomes true. This is documented at http://ccl.northwestern.edu/netlogo/docs/behaviorspace.html#how
In answer to the comment above, the following hack seemed to work. I rewrote the go procedure making it a run once procedure:
to go
getGo ;This procedure does the job that the go command originally did
SetSeed
Share
stop
end
In the go commands I now just have 'go'.
Related
Event listener breakpoints in Google Chrome Devtools offers various number of options, but for me, they are not really of great use since they always throw me to some irrelevant part of code.
What I would like to know is if it is possible to limit it to just one class? For example onMouseClick send me to the 1st method that executes after mouse click, inside specific class. If none of the methods are fired inside this class, than simply do nothing.
You can set the breakpoints for each script and each line individually.
First open the debug-tools and chose a script in the sources-tab:
Then you can click on the line-number (here only no. 1) and it looks like this:
As you see now is the line marked, but also in the right col your individual breakpoint is listed.
After having marked the breakpoint you still have to reload the page that the scripts are executed again till to the breakpoint. Afterwards you can use the icons above the right col to step in or step over the commands following the breakpoint.
Having minified scripts, breakpoints are hard to use, so it's better to have a script where each line has only one command, it's much easier then to debug.
So for debugging you should change the corresponding script in your page to the non-minified version, perhaps also with a map-file if available.
I have a couple of Rainmeter skins on top of my taskbar that act as a cooler clock, and in order to keep the skins above the taskbar, I have the following code:
[Rainmeter]
Update=500
OnUpdateAction=!ZPos #ZAxis#
[Variables]
ZAxis=1
So that keeps the skins above the taskbar, but it also keeps it above things like youtube running fullscreen. I got an AutoHotKey script that will run a program when a window becomes fullscreen and when it closes fullscreen, so I told it to launch "%PathToRainmerer%\Rainmeter.exe" !SetVariable "ZAxis" "-1" Skin.ini and "1" on the un-fullscreen, but nothing happened.
I checked everything to make sure the AHK script was working, and I even tried to run Rainmeter.exe with the parameters using a shortcut, but nothing worked. I also set up a Meter with Text=#ZAxis# and it stayed at one. I'm guessing the issue is with the syntax, but I can't find proper documentation (probably because I'm so bad at researching). I can provide more details on polite request.
Please remember that kind and respectful comments are greatly appreciated.
Try "\pathtorainmeter\rainmeter.exe" !activateconfig "mainskin folder\skin subfolder" "skin.ini"
Worked for me
I have a user that would like to have value for vertical scrolling to be set to a certain number. When they've set the wanted value, it works ... Until they log off or reboot. The odd thing is that the horizontal scroll value will remain to set value even after reboot. I guess it's worth mentioning this is an HP laptop, but the user is using an external USB mouse.
I've tried to update the synaptics driver, uninstall it, remove it completely, check all it's settings for possible overwriting options... No result. Still keeps resetting the vertical scroll value upon reboot/log-on.
As the user is on a domain network, with a company computer, the registry is blocked for any user besides local computer admin OR domain admins, and the only way I've so far found to set scroll value in registry is by logging on as local admin, and then set the value for CURRENT user (aka local admin only, if I understand that function properly).
I am out of ideas, almost. There is only one thing I know of that could help, but there is no guarantee. A form of script (VBS/batch) that will run upon user loggin and set the users desired value. Problem is, I am not really familiar with VBS or batch scripts in any large scale, certainly not enough to help myself with this issue.
So, in the end. I am looking for alternate solutions to this pesky problem, or maybe a script that just sets the desired value at user loggin.
I had this same problem, and did a lot of digging to try to resolve it. Most tips on the web suggest to upgrade your mouse driver as some drivers have bugs that result in this problem. In my case I had the latest Logitech drivers already installed, so it didn't help me.
Today I stumbled on the cause of the problem, and hence also the solution: I use the excellent X-Mouse Button Control utility. For some reason I had modified its "Lines to scroll using the scroll wheel" setting (Settings > "Scrolling & Navigation" tab), and then forgotten about it. Whenever the program started (I have it auto-start with Windows), it reset the lines to scroll value in the Control Panel mouse settings to "1". Adjusting the value back to the default "3" in X-Mouse Button Control took care of the problem.
Even if you don't yet use the X-Mouse Button Control, this could help you: you could download and install the free X-Mouse Button Control, and make sure the lines to scroll is set to the value you desire in its settings (even if this is the the only thing you would use it for – the utility doesn't by default affect how your mouse works in any way). That way X-Mouse will reset the value to your liking at boot, even if the ultimate cause in your case is, for example, a mouse driver issue.
I know this has been answered already (please mark Ville as answerer if you're still active!) but I wanted to add a picture.
The option to set the amount of lines scrolled is set under the Scrolling & Navigation tab of the main X-Mouse control window:
In my case, this was set to 3, and had been resetting my Windows value on every reboot/logon.
As the title says, is it possible? I've searched all over the internet in order to find it, but whatever variation of my search query I come up with, I end up getting results which are about the move command which is used to move files/folders, instead of the actual prompt.
When doing
mode /?
The only result I can remotely relate to the appearance of the prompt is the Display mode,
(mode con:cols=x lines=y)
As I've said, I can't find any documentation about this & I'm extremely curious, can it be done? I know it can be done in Visual Studio to set a position where it should show it's dialog, so I'm presuming it can be done...
PS: If it can be done, what value should I use to have it perfectly centered when using these size settings?
mode con:cols=50 lines=15
Thank you in advance.
Yorrick
You cannot do so directly from a batch file. However, you can write a small program to do that. The relevant Windows API function is MoveWindow.
in the middle of my for loop I change layouts to do a find but it never actually switch the layout. if I make a stand alone script where I tell it to go to layout "x" it works fine but if I call that script from within my loop or I do it the same way in the loop it doesn't change
Does anyone have any idea why this doesn't work ?
How do you tell it doesn't work? If you simply run it, you may not notice how it changes. Try to run the script in the debugger or add a pause after the Go to Layout command.