Questions tagged [defaults]

111 questions
70
votes
4 answers

How to load packages in R automatically?

Could you suggest me a way for loading packages in R automatically? I mean, I want to start a session in R without needing to use library('package name') several times. Suppose I downloaded all packages I'll want to use the next time I start R.
nhern121
  • 3,831
  • 6
  • 27
  • 40
32
votes
4 answers

Set default web browser via command line?

I'm trying to figure out how to set the default web browser on OS X via command line. I found this forum post, but the solution they are working out there is to open a specific URL with a specific application. I am looking for a way to set the…
Zettt
  • 879
  • 2
  • 8
  • 27
29
votes
3 answers

How do I add values to nested arrays or dicts using the "defaults write" command?

Consider a preference plist with a dict that contains an array: Let's create it: defaults write org.my.test '{aDict = {anArray = ();};}' Then read it back to see the structure better: $defaults read org.my.test { aDict = { anArray = ( …
Thomas Tempelmann
  • 11,045
  • 8
  • 74
  • 149
25
votes
1 answer

How do I restore the default VS toolbar configuration?

How do I restore the default VS toolbar configuration? By that, I mean: the set and location of enabled toolbars the set and order of items on each toolbar I know how to reset the set and order of items on a given toolbar, so if I knew which are…
Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
22
votes
5 answers

Enable/Disable Fn keys from the command line on the Mac

I hardly ever use the function keys on my macbook pro. I mostly just use them for volume, brightness, etc. Now that I've started playing Starcraft 2 a bunch, I want to use them without having to press the fn key down. I want to write a little shell…
Randall
  • 14,691
  • 7
  • 40
  • 60
20
votes
2 answers

Why is git core.preloadindex default value false?

Can anyone answer why core.preloadindex is false by default? Are there any pitfalls? I can't imagine a performance penalty.
Tom Whittock
  • 4,081
  • 19
  • 24
19
votes
5 answers

How to exclude DEFAULTs from Python ConfigParser .items()?

I'm using ConfigParser to load in data from a configuration file as follows: test.conf: [myfiles] fileone: %(datadir)s/somefile.foo filetwo: %(datadir)s/nudderfile.foo load.py: import ConfigParser config = ConfigParser.ConfigParser({'datadir':…
user264902
  • 201
  • 1
  • 2
  • 5
17
votes
12 answers

Overriding the Defaults in a struct (c#)

Is it possible to set or override the default state for a structure? As an example I have an enum something{a,b,c,d,e}; and a structure that links 2 values for that enum struct SomethingData { something type; int Value; double…
user94261
15
votes
2 answers

Setting Function Defaults R on a Project Specific Basis

Commonly, I use the same function settings. I'm wondering if there is a method, other than having a new object in the path that is essentially a wrapper for the function, to set default arguments. For example: paste() has it's sep argument set to a…
Brandon Bertelsen
  • 43,807
  • 34
  • 160
  • 255
15
votes
1 answer

Sass variable default scope

I have a problem with using variable defaults in Sass across scopes. My test example is: @mixin foo { $val: 'red' !default; .bar { color: $val; } } @include foo; .class1 { $val: 'green'; …
Miloš Rašić
  • 2,229
  • 5
  • 24
  • 43
14
votes
7 answers

In C# how do I deserialize XML from an older object into the updated object and ignore missing xml elements?

What I have is a custom settings file that I serialize/deserialize using an XmlSerializer. I have no schema defined and no serialization tags in my object definition, just straight object serialization (although I will add them if needed). My issue…
Mike Webb
  • 8,855
  • 18
  • 78
  • 111
13
votes
3 answers

Make package in R not required to load when I startup R/RStudio?

I have looked extensively to find the answer to this before asking and could not find the answer, but if its out there please point me to it. Every time I start R studio I have packages that load automatically like: Loading required package:…
costebk08
  • 1,299
  • 4
  • 17
  • 42
10
votes
6 answers

how can i parse the output of `defaults read` on OS X?

how can i parse the output of the OS X defaults read terminal command? it appears to output the 'old' NeXTSTEP plist format; things that look like: { "Apple Global Domain" = { AppleAntiAliasingThreshold = 4; AppleCollationOrder =…
nrser
  • 1,287
  • 1
  • 13
  • 23
10
votes
1 answer

How to change the default version of python in a linux machine ?(not just symlink)

I have multiple versions of python installed in ubuntu (precise) for various reasons and uses. I have python 2.7 and python 2.6. I need to make python 2.6 the default and not python 2.7. I updated python symlink to point to python2.6. That will only…
King
  • 1,170
  • 2
  • 16
  • 33
9
votes
2 answers

Do you always use row.names=F in write.csv? Changing the default values inside R (base) functions

Couldn't see a solution online but I thought this might be quite common. with write.csv I basically always have the argument row.name set to F. Is it possible to run a line once and update the default value of the argument for the rest of the…
nzcoops
  • 9,132
  • 8
  • 41
  • 52
1
2 3 4 5 6 7 8