Questions tagged [defaults]
111 questions
9
votes
2 answers
How to configure defaults for a parameter with multiple values for a Maven plugin
I'm writing a Maven plugin and I am using default values for all parameters such as this:
/**
* The file with the site structure.
*
* @parameter expression="${generateSite.siteFile}" default-value="${basedir}/src/oda/site.xml"
*/
private File…

Peter Becker
- 8,795
- 7
- 41
- 64
8
votes
2 answers
Default values for CMAKE_FIND_LIBRARY_PREFIXES/CMAKE_FIND_LIBRARY_SUFFIXES
i guess i'm missing something very obvious here, but it seems to me that the cmake variables CMAKE_FIND_LIBRARY_PREFIXES/CMAKE_FIND_LIBRARY_SUFFIXES are not set to any "decent" default value depending on the current system/settings! i've checked the…

daniel.wirtz
- 980
- 7
- 11
6
votes
4 answers
Reload com.apple.Terminal.plist
I want use a script to modify the preferences of my terminal for my Mac, so it can close the window when exit the terminal. I use this command in the script:
/usr/libexec/PlistBuddy -c "Set \"Window Settings\":Basic:shellExitAction 0"…

owenwater
- 811
- 1
- 6
- 18
6
votes
4 answers
function name($param, $line = __LINE__, $file = __FILE__) {};
Is it possible to have a function automatically contain the line number and the file that the function was CALLED in,
as if i call __LINE__ or __FILE__ in the function it will use the line and file the function definition is in.
but i dont want to…

Hailwood
- 89,623
- 107
- 270
- 423
6
votes
1 answer
Set default values for function parameters in R
I would like to set
byrow=TRUE
as the default behavior for the
matrix()
function in R. Is there any way to do this?

WestCoastProjects
- 58,982
- 91
- 316
- 560
6
votes
3 answers
Storing Hidden Values in HTML (for tooltip, error, defaults) Best Practices
I just saw this JQuery Metadata Plugin by John Resig, Yehuda Katz, Jarn Zaefferer, and Paul McLanahan, in my search for JQuery Form Validation, and that's an interesting idea!
I'm wondering what general best practices are for storing things like…

Lance
- 75,200
- 93
- 289
- 503
6
votes
4 answers
In Mercurial, how to run original command if default arguments are present?
I have configured hg log in ~/.hgrc to only list commits from the current branch by default:
[defaults]
log = --branch .
However, occasionally I'd like to really see commits from all branches. Is there a way to tell hg log when invoked form the…

sschuberth
- 28,386
- 6
- 101
- 146
5
votes
1 answer
Hiding OSX battery menu bar item programmatically
I'm trouble finding a way to disable showing the system battery icon on the menu bar. I can disable it from System preferences -> Energy Saver -> "Show battery status in menu bar", but is there a way to achieve the same with a terminal defaults…

Rene
- 136
- 1
- 7
4
votes
3 answers
Why not force explicit fall-through rather than explicit break for switch statements?
This is not specifically a C# question but it is the C# version of switch that makes me ask the question.
Why do I have to explicitly state that I do not want to fall through from one case statement to the next instead of instead indicating when I…

Justin
- 8,853
- 4
- 42
- 42
4
votes
1 answer
How to read "Security & Privacy" settings using command line or programatically
I would like to read settings from Preferences -> Security & Privacy -> General tab in my application. In particular I'm interested if user has set up password and if password is required immediately "after sleep or screen saver begins" or after…

solgar
- 4,312
- 2
- 26
- 30
4
votes
2 answers
Mandatory Chrome Policies on Mac
I'm trying to install a private Chrome extension on OS X by modifying Chrome policies. I was able to do this successfully on Windows by editing the relevant HKEY_LOCAL_MACHINE registry, but on OS X I'm having problems.
Using the following commands,…

Tyler
- 889
- 1
- 11
- 17
4
votes
2 answers
cakePHP Form input label overrides inputDefaults
I'm setting up a user-registration-form in cakePHP, using inputDefaults to match twitter bootstrap requirements for horizontal forms
echo $this->Form->create('User', array(
'class' => 'form-horizontal',
'role' => 'form',
…

jzdm
- 85
- 2
- 6
4
votes
1 answer
R: Passing function arguments to override defaults of inner functions
In R, I would like to do something like this:
I have a function f1, that has an argument with a default value; k=3.
f1 = function(x,k=3){
u=x^2+k
u
}
I then later define a second function, f2 that calls f1.
f2 = function(z,s){
…

bigO6377
- 1,256
- 3
- 14
- 28
3
votes
1 answer
jQuery Plugin settings on multiple instances
I have a problem with settings on multiple instances on a jquery plugin.
If I cast my plugin multiple times and alert them on an onclick binding, it always alerts the same parameter.
This is my plugin.
/**
* Provide user search for input…

Spinnenzunge
- 55
- 1
- 8
3
votes
5 answers
How to change method defaults in Python?
I'm building a class, Child, that inherits from another class, Parent. The Parent class has a loadPage method that the Child will use, except that the Child will need to run its own code near the end of the loadPage function but before the final…

Tanner Semerad
- 12,472
- 12
- 40
- 49