How to get current language in 3ds max script - max

I find all the help files of 3ds Max Script Reference, but can't get the api about get current language.
I already try 3ds Max System Globals and MAXScript System Globals

See sysInfo.getMaxLanguage().

Related

how can i set the gap limit in cplex?

I would like to set the 30% gap limit. How can I do this using the setting file? I tried to modify the MIP tolerance part setting "relative MIP gap tolerance" to 0,30 but after run going to the engine log part, it doesn't appear that cplex has set this gap. How can I do? Thank you.
In OPL you would write
execute
{
cplex.epgap=0.3;
}
and if you use a .ops file (settings) do not forget to add the .ops file to the run configuration.

Can a Sequence of same input produce Different Result?

**
I am pretty sure a set of sequential commands with same input cant
change it's output every time you run it
It might sound stupid . For example while installing an application or bulding using Cmake , atleast for me , i would encounter different bugs each time i run the installer using the same system.
I guess i might have changed the cmake setting or the system settings but it feels so strange and i am totally paranoid about it.
**.
you never initialize arr but you use it to do M=M-arr[i]; the behavior is undefined
out of that to use an array with a dynamic size is not recommended (ISO C++ forbids variable length array), allocate it in the heap

Maxent - Variable names in map of limiting factors

Hope someone here can help me with this, or know where I can ask.
I have made a distribution model using maxent (versio 3.3.3) in R (dismo package), and thereafter made a map of limiting factors as described in the appendix of Elith et. al. (http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2010.00036.x/full), using the maxent software through the windows cmd window. The instructions have worked fine, and I now have the limiting factors map in a file called lf_map.asc (ca 10 GB). In order to open the map in ArcGis, I have imported the asc-file as a raster into R, and saved it as a tif-file, using this R-script:
lf_map<- raster("//home//...//lf_map.asc")
writeRaster(lf_map,"//home//...//lf_map.tif")
When I open it in ArcGis, the different variables(factors) from the model have the names 0-4 in the map (I have 5 variables in the model), but now I don't know which variables belong to which number. I have also tried to use the ASCII to Raster (Conversion) tool in ArcGis, but the names still come out as 0 to 4, and not as the names of the variables. Does anyone know how to find out this?
Best regards
Kristin
I stumbled over the answer myself: I checked the cmd-window where I had run the script for the Limiting factors.map (it was still available, since it was in a detached screen), and now I saw that when the process was finished, the information about which number equaled which variable was printed in the cmd-window. Apparently, the variables were sorted alphabetically. 0=Aspect; 1= Mean summer temp etc.

VBScript to get DC SYSVOL information (path, size, free space)

I am obtaining information about my DCs and need to pull in the path to sysvol, total size, and free space remaining.
Cant his be done in VBScript and if so how?
Thanks
Have a look at this Microsoft support page - the registry entries are in this document of where the SYSVOL and other NTDS directories are stored.
You might find that you can also get this information through Active Directory however I'm not sure - I will check ADSIEdit shorly.
You can do it through the WMI. See an example here: http://www.computerperformance.co.uk/vbscript/wmi_disks.htm

how to get window os system idle time using ruby?

I have a ruby script. I want to know how long the system has been idle (i.e. no user interaction - the time screen saver activation is based upon).
I believe I can do this in ruby via win32api using user32.dll and GetLastInputInfo, but I can't figure out how... can anyone can help me?
.
Here is a sample that calls GetLastInputInfo. I did not study that API, though, to see if it is really giving you the information you are wanting.
require "Win32API"
api = Win32API.new( 'user32', 'GetLastInputInfo', ['P'], 'I')
# match the structure LASTINPUTINFO. First 4 byte int is size of struct
s = [8, 0].pack('l*')
api.call( s )
a = s.unpack('l*')
puts a
It would appear what you want to do has been done for Linux:
http://coderrr.wordpress.com/2008/04/20/getting-idle-time-in-unix/
But as for windows the nearest thing I could find is for C#... I don't have a windows machine to hack with but it could well give you an indication as to how GetLastInputInfo can be interacted with:
http://dataerror.blogspot.com/2005/02/detect-windows-idle-time.html
On the basis of the answer from Mark Wilkins, I created some script to log the idle time of a user.
https://gist.github.com/Largo/11216868

Resources