Questions tagged [defaults]

111 questions
3
votes
1 answer

Is there a Perl interface to Mac OS X defaults?

Mac OS X has an application called defaults which allows one to set and retrieve application configuration variables. Is there a Perl module which allows me to read/write these configuration variables without having to use qx//?
Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
3
votes
1 answer

Puppet - set defaults in manifest if not present in hiera when iterating over hash

I am iterating over many entries in a hiera hash, and wish to remove identical duplicate lines from hiera by setting defaults in the manifest (such as ensure, groups, managehome etc), and have the defaults overridden IF the duplicate key/value pair…
xit
  • 135
  • 1
  • 12
3
votes
5 answers

Default values of parametrs for own functions in jquery

I am writing my own jQuery functions. Is it possible to set the default values of the function parameters?
sev
  • 51
  • 1
  • 1
  • 4
3
votes
2 answers

Default permission/group data in Django

Every time I wipe the database of my Django app during testing (or when cloning or deployin), I have to go into /admin and set up permissions and groups. Where would I put the code that would populate the DB with them and what would it look like?
StokedOver9k
  • 129
  • 1
  • 9
3
votes
0 answers

How to define default styles for a custom control?

I have a custom control which extends the DialogPreference where I have custom attributes and I want to define default values for them. Here is the relevent part of my attrs.xml:
2
votes
1 answer

Python: Get user input by letting user edit default value

I've got a script that pulls text from a Web server. I want to give the user (me) an opportunity to edit that text so they can select which part to keep. Ideally, it would be something like this: editedText= raw_input(defaultText) So, defaultText…
Nathan
  • 6,772
  • 11
  • 38
  • 55
2
votes
1 answer

Reset a subset of columns to their default values in SQL?

I'm looking for a SQL statement or stored procedure to reset the values for a subset of columns in a row to their default values (where so defined) or else to null. There are other columns in the row that I don't want to reset, else I could just…
GISmatters
  • 431
  • 8
  • 20
2
votes
0 answers

Editing system defaults from Swift

I'm working on an app, and need to alter com.apple.loginwindow. Specifically I need to perform the equivalent of this command: sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Howdy"" I've attempted to run this…
JobClob
  • 21
  • 1
2
votes
1 answer

shell script (macOS): print escaped Unicode character from a plist string

In a shell script I'm reading strings from the Info.plist in application bundles, in this example from the Copyright key, whereas $FILEPATH is the path to an application bundle, e.g. /Applications/TextEdit.app #!/bin/bash PLIST=$(/usr/bin/defaults…
JayB
  • 533
  • 4
  • 10
2
votes
0 answers

Android Samsung clear default app opening

I have an app which open urls via app links. In some cases I need to open external browser, because I cannot resolve link. If user select always open my app and I need to open external browser - I clear app defaults by…
2
votes
2 answers

What are the defaults(homepage,controller,etc..) for cakePhp?

I understood (more or less) the separation between the MVC parts in cakePhp, however i cannot understand what are the defaults. meaning: What should i edit in order to change the root-entry-point of my site(the known "index.html" or "index.php"…
yossi
  • 3,090
  • 7
  • 45
  • 65
2
votes
2 answers

OSX: One liner array append using defaults read/write plist file

I have two plist files given by two customers and each times I have to update it manually. First one I can extract the string I need. defaults read /Applications/TestAPP/info.plist TestValue TESTAPP-TESTAPP-TESTAPP Second one I need to append the…
VivienG
  • 2,143
  • 3
  • 24
  • 43
2
votes
1 answer

Rails 3.2 Routing: multiple defaults

I am using two default parameters within my routes: scope '(/:locale)(/:currency)', currency: /eur|usd/, locale: /de|en/, defaults: { currency: 'eur' } do ... Because the currency should be used for the whole visit, I added locale and currency to…
Railsana
  • 1,813
  • 2
  • 21
  • 30
2
votes
2 answers

Use Shell Script to write to plist Dictionary child Boolean

I'm trying to modify a system plist in an Platypus script-based app (Mac), though I have a feeling my question may have a more general answer. The question is: What is the correct Terminal syntax for targeting and modifying the boolean child of a…
simbasounds
  • 327
  • 5
  • 13
2
votes
2 answers

How to change the default browser in Windows?

I have created a simple browser in c# for a couple family members. I want to set it as the default browser either from an installer or from the program. I want to do the same thing as Chrome or Firefox does when it asks you if you want to set it as…
msbg
  • 4,852
  • 11
  • 44
  • 73