Questions tagged [defaults]
111 questions
2
votes
1 answer
How to specify a function as the default of a scriptblock parameter in a PowerShell function?
Given these powershell functions where foo takes a scriptblock as parameter:
function bar($name)
{
"Hello World $name"
}
function foo([scriptblock]$fun={})
{
&$fun "Bart"
}
Is it possible to specify the function bar as default for $fun…

8DH
- 2,022
- 23
- 36
2
votes
1 answer
setting pcregrep color default
i know you can set grep color defaults using the environment variables $GREP_OPTIONS and $GREP_COLOR, but i can't seem to find any way to set the default color options with pcregrep...
i have export GREP_OPTIONS='--color=auto' and export…

nullrevolution
- 3,937
- 1
- 18
- 20
2
votes
1 answer
Apache Thrift: Assign default values to enclosed struct
In an IDL file, I have
struct CaseInfo {
1: CaseID = '',
2: EvID = 'foobar',
}
struct Case {
1: CaseInfo CaseInfo,
2: string key = '',
}
When an instance of a Case object is created, CaseInfo is simply null; it doesn't contain a…

Paul Carlisle
- 415
- 1
- 5
- 11
1
vote
1 answer
Defaults in Symfony2 routing not being passed properly
I am currently trying to configure a routing option in Symfony2 so /cms will route to /cms/role/view. However, the passing of defaults doesn't seem to work properly.…

Rex
- 610
- 9
- 19
1
vote
2 answers
Defaults of the turtle in Python turtle module
For teaching purposes I need a list of the graphics defaults. Here's what I have by now:
background white
canvas 950W by 800H
dot 5 (pixels)
fill color black
heading 0 (East)
home (0,0) (screen center)
pen color …

Yehuda Katz
- 177
- 1
- 8
1
vote
0 answers
Mako: render with predefined/default items in Context?
I'm looking for an idiom for setting some common item definitions so that any time I call render() on a mako template, those items will be added to the parameters available in the template without having to include them in the parameters to render()…

Scott
- 1,247
- 3
- 10
- 21
1
vote
2 answers
ExtJS: Setting defaults to panel items for nested objects
This question is part of How to set defaults for Grid columns within initComponent and posted here independently through @scebotari66 advice on main post.
As you'll notice below; there is Ext.Array.map to define defaults for related function.
//…

Nuri Engin
- 813
- 10
- 38
1
vote
1 answer
vue select component - set defaults props?
I use this vue-multiselect plugin: https://vue-multiselect.js.org/
Since I'm going to use it many times, I want to set some defaults props.
For example I want the selectLabel prop to be an empty string, and maybe to sets some s.
In a typical…

user3599803
- 6,435
- 17
- 69
- 130
1
vote
1 answer
Does Visual Studio have a setting for saving the swap panes when viewing xaml?
I am constantly swapping panes when viewing xaml (xaml on top, design on bottom or not showing at all). Is there a place in Visual Studio where I can set a default for how I want to view xaml files?
My google powers haven't revealed anything...

Ben Jones
- 2,101
- 1
- 26
- 36
1
vote
1 answer
Change sizing defaults for data types in SSIS
I have a SSIS package with approximately fifty data flows in it that interacts with an Oracle database.
We changed data types in Oracle database for about 55 tables / 300+ columns from FLOAT to NUMBER (30, 15)
I am now working on changing the data…

Raj More
- 47,048
- 33
- 131
- 198
1
vote
1 answer
How can I set defaults for Moose attributes?
It appears that Moose 'has' attribute requires the option 'is'.
It goes gaga if I omit it.
Practically every number or string attribute I declare will be 'rw'.
How can I set a default for 'is' so I don't have to write it every time?
I checked out…

user1067305
- 3,233
- 7
- 24
- 29
1
vote
0 answers
Printing out MacOS Mail settings
Is it possible to dump account settings from MacOS Mail program using some command-line utility? In other words I want to print out (to the Terminal) whatever settings are available in the Mail program under Mail | Preferences | Accounts menu.
I…

Andrew Dwojc
- 119
- 10
1
vote
1 answer
how to change the default project directory in visual studio 2008
My home directory is located on a rediculously slow network drive. I don't want visual studio to store my files there. It is sluggish, and automaticaly storing auto-restore data freezes visual studio for several seconds.
I have Ankh SVN integration,…

Martijn
- 11,964
- 12
- 50
- 96
1
vote
1 answer
Symfony 2 routing with defaults values
i've a problem with my routing.yml in Symfony.
When i put a defaults value it's return me and empty value. I dont knopw why he does it.
I do it like Symfony's doc but problem…

Alexandre Lapille
- 69
- 1
- 1
- 8
1
vote
1 answer
Can argparse be used to initialize default values for strings
I'd like to initialize essential variables for my Python script (3.4), while providing the end user a chance to change those variable definitions via command line options. Looks like argparse is the way to go. I've looked here to get started, and…

Joe Gavin
- 117
- 1
- 7