Questions tagged [defaults]
111 questions
1
vote
3 answers
Share user defaults between users
I'm using user defaults to store my app data.
I have some global data that is relevant for all users on the same machine.
How can I share this data between them?
NSUserDefaults' initWithSuiteName did not work.
The only workaround I found it to write…

Mugen
- 8,301
- 10
- 62
- 140
1
vote
1 answer
How to change R plot default options
I'd like to change default plot option from type = "p" to type = "l" ; I mean I want it is like that at the beginning of each new session, without specifying it any more.
I've tried to put some piece of code in my Rprofile.site but unfortunately not…

ClementWalter
- 4,814
- 1
- 32
- 54
1
vote
0 answers
Rescale Python Array with user-defined min and max
I have a function that rescales an array to values between 0.0 and 1.0, but I am stuck as to how to rescale the returned array to a user-defined new min/max range. The questions prompt is "Rewrite the rescale function so that it scales data to lie…

LOBthon
- 11
- 2
1
vote
0 answers
Save highlighted State to User Defaults
how can i save the highlighted state of a Image view to user defaults,
and can i save the background Color of a Button to User defaults?(i change the color by click)
to save:
- (IBAction)char1_atheon_cp1_28:(id)sender {
…

Heisenberg
- 113
- 1
- 8
1
vote
0 answers
How to update jQuery defaults on window resize?
This is the section of code I'm trying to adjust:
var documentWidth = jQuery(document).width();
var documentWidth2 = (documentWidth)/100*2;
$.Grid.defaults = {
orientation: 'vertical',
aspectRatio: 'auto',
…

user3525785
- 59
- 5
1
vote
0 answers
Cannot load default preferences in Firefox addon
I'm creating a very simple Firefox addon for testing purposes. I want to set default preferences (e.g. set extensions.myextension.bingo to "http://www.example.com"), however I can't seem to get this to work.
Here's what I did so far:
My lib/main.js…

a1191853
- 11
- 3
1
vote
0 answers
WebKit cookies jar for OS X apps
Is there a way to force a third party developed app for Mac OS X based on WebKit to not use the system/Safari shared cookies jar?
Some apps have an option for this. What I'm looking for is something similar to apply to apps which don't have it.…

poweruser
- 11
- 2
1
vote
0 answers
NSUserDefaults standardUserDefaults and editing value with "defaults write" in console
I'm using NSUserDefaults (on Mac OS X 10.9) to store some string value (if there is none already):
NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
_kUpdatesSharedLocationPath = [standardUserDefaults…

Piotr Byzia
- 3,363
- 7
- 42
- 62
1
vote
1 answer
Create item using a ViewModel setting unwanted defaults
I am using a ViewModel to Create a new item in my DB
the ViewModel has only the properties that I want the user to be able to set, and when it is posted back I make a new 'real' object and save it away to the DB.
I am doing this as detailed…

nat
- 2,185
- 5
- 32
- 64
1
vote
0 answers
Context-Dependent Model Defaults in Rails from link_to
What's the standard for applying default values to Rails models from links? Here's the situation:
There is a model in Spree called ProductGroup, which is a collections of settings defining how to find a Product (based on a bunch of property values…

Lance
- 75,200
- 93
- 289
- 503
1
vote
1 answer
Change the desktop placement via terminal command or Applescript
I administer a few computer labs using mostly Apple Remote Desktop (ARD). I've been trying to resize the desktop either via the command line using Terminal, or by using Applescript.
I found this handy script for changing the desktop:
tell…

Erin Finnegan
- 498
- 3
- 7
1
vote
3 answers
Html override settings
I have my css file set up so that this happens for all pages on my site:
body,html{
height:100%;
}
div#right{
height:100%
}
I want one page to be an exception. How do I override and use the default height values for that page? Is it enough to…

Chet
- 1,209
- 1
- 11
- 29
1
vote
1 answer
Set default meeting length on iOS?
This appears to be the command to set the default meeting length for iCal events:
defaults write com.apple.iCal 'Default duration in minutes for new event' X
Where X is 30 means that the default meeting length is 30 mins.
My question is - what is…

hawkeye
- 34,745
- 30
- 150
- 304
0
votes
2 answers
Datatables jquery plugin - setting defaults
I'm trying to set default configurations to be used everytime the datatable plugin is called, but it is not working. The defaults are just ignored.
Example:
$.extend($.fn.dataTableExt.defaults, {
"sPaginationType": "full_numbers",
…

Rodrigo Pires
- 574
- 2
- 11
- 23
0
votes
2 answers
Error with using defaults in copy constructor of a templated class
I have the following templated classes,
template
class Marker {
typedef Wm5::Vector3 Position ;
typedef Wm5::Vector3 Normal ;
typedef Wm5::Vector3 Color ;
public:
Marker(int id = -1, Position position =…

oracle3001
- 1,090
- 19
- 31