What's the word for "Enable/Disable"? - naming-conventions

When I want to comment code about control Enable/Disable and when I want to discuss with people about the control Enable/Disable, I really hope there is actually a word to it instead of typing or saying "Enable/Disable".
Currently I use the word EnDisable, what is the real word of it?

I would suggest using "toggle" as although it doesn't exactly mean Enable/Disable it is commonly used as such in the context of user interfaces (as #Pekka mentioned).

I use "Ability", because if something is "enabled", it is "able to", and if it's "disabled" it is "unable to", so "ability" works for me and it's quite understandable.
To switch the parameter I name my function "setAbility".

Really depends on the context.
Changing of a control's status?
Switch?
Change?
Update: #Yacoby has the perfect one, it's widely used in user interface contexts.

If I'm writing functions that enable or disable something depending some other data, I usually call them "ToggleXXX".

Depends on the context. If you are referring to a life-support system, 'Kill' probably.

Conditional is another option.

Depending on the context, but I would suggest Behavior if talking about whether something is enabled or disabled by default.
Other words like action, toggle, or condition can also work depending on the context

Related

Did I activate everything (before I go home today)?

What fast and reliable ways are there to know whether I activated everything I changed in the ABAP workbench?
Reason for asking: if I forgot something, I'm the reason that a (test) transport can't be exported (easily).
My closest approach to an answer is
change some arbitrary code
activate that code
If there was something left to activate, I'm offered to activate that, too.
But is there a fast and reliable way to do that without changing some arbitrary code?
SE80 -> Environment -> Inactive Object will give you the list you are looking for.

How is Groovy hot-swap agent "gragent.jar" is supposed to work in Intellij Idea?

It seems doesn't add anything to the regular java hot-swapping. I'd like to get the groovy class hot-swapped in a case of method adding/removing/signature changing. Is it possible with this agent?
Dany's answer is correct, but doesn't answer the question fully. No, this agent doesn't help you to hot-swap when fields or methods are changed. You might want to consider using DCEVM for that.
Removes all timestamp-related Groovy fields on class loading
Also clears Groovy's call site cache
As stated in
https://github.com/JetBrains/intellij-community/blob/master/plugins/groovy/hotswap/agentSrc/org/groovy/debug/hotswap/ResetAgent.java

JUST_IN_TIME cache type Probabilistic selection

In the documentation it is clearly stated that cacheType JUST_IN_TIME does not work with Probabilistic selection.Since most of my moves are generated "just in time" is there some way that i can use these two together? If there isn't, what are some other options to use?
Well i found what i was looking for with the fixedProbabilityWeight which let's me manually configure from start what moves will be used more than others. On top of that i found the SelectionProbabilityWeightFactory<NurseRoster, IterableSelector> interface that let's me modify the probabilityWeight while solving.

Change dwm colorization - Windows 7

I'm currently trying to write a program in VB.NET which fluidly changes the DWM window colorization colors in Windows 7.
I first tried to edit Registry values directly, but I had to restart the UXSMS service. This solution was unsatisfying, because of the toggle of the taskbar.
I'm now searching for a function in a DLL such as user32.dll or themecpl.dll which can reproduce the behaviour of control panel when setting the window color.
I'm now on IDA, searching for the adquate function (CColorCplPage::SetDwmColorizationColor seems good!). If anyone has one, please share it!
(If anyone need screens or code, please ask. Sorry for my poor English.)
Your first attempt failed because manually editing the Registry is never the correct way to change system settings. As you found out, lots of Windows components (and other applications!) read those configuration values once and cache them, preventing your changes from being propagated. Another problem (and you'd be surprised how often I see this) is applications that attempt to muck around in the Registry generally end up corrupting things.
Instead, you should call the documented API to change the settings. There's almost always a documented way of doing this, and if there isn't, well then you shouldn't be doing it.
This appears to be one of those cases. There's a documented DwmGetColorizationColor function, but there's no corresponding DwmSetColorizationColor function, as one might expect.
The reason is that the user is supposed to be the only one who can change their colorization settings, not other applications. You might promise not to abuse this, and to only make such changes at the user's explicit request, but not all applications can be trusted to do this. Lots of people would use it maliciously, so these functions have not been documented and exposed.
But as usual, if you press on, you can usually find an undocumented way of doing things. The problem with using undocumented functions is that there's no guarantee they'll work or continue to work. They've been intentionally left undocumented because they're liable to change on new versions of Windows. You should only use them at your own risk.
In this case, if you use a program like DumpBin to obtain a list of all the exported functions from the DWM DLL (dwmapi.dll), you'll see a number of undocumented exported functions.
The ones you're interested in are DwmGetColorizationParameters and DwmSetColorizationParameters. Both of these functions take a COLORIZATIONPARAMS structure as an argument that contains the values they need.
So, you need to reverse engineer these functions and obtain the appropriate definitions. Then, you can call the DwmGetColorizationParameters function, passing in a COLORIZATIONPARAMS structure to obtain the current configuration settings; modify the member of the structure that contains the current colorization color; and then pass that modified version of the structure to the DwmSetColorizationParameters function.
Did I mention that I don't recommend doing this?

Ask for Hotkey in Cocoa/Objective-C

I want to have a button which allows the user to pick a global hotkey. I stumbled upon stackoverflow and found some ways to register a hotkey, but none which allows me to let the user pick one. Is there maybe a library for it? Or how you guys handle this?
It should look like this:
If you would like to use an already existing framework, Shortcut Recorder is a good one that is used often. It's pretty easy to use, and might suit your needs. You can also do this manually, as alfred has mentioned, but it's quite a bit more work this way.
You may just create an Event Tap and register keys pressed by the user. When the callback function gets called you'll have enough information to know exactly what keys has been pressed. Then you should just update the string value.
Or, at least, that's the way I'd do it.