Questions tagged [default]

Refers to an initial, most commonly used option, setting, or value that is automatically assigned to an application or device, outside of user intervention, with the intention of making it usable "out of the box".

A , in computer science, refers to a setting or a value automatically assigned to a software application, computer program or device, outside of user intervention. Such settings are also called presets, especially for electronic devices. Default values are generally intended to make a device (or control) usable "out of the box". A common setting, or at least a usable setting, is typically assigned.

tag should be used for questions regarding

  • Default features of programming languages (like default return type of C functions).
  • Default configuration of and Applications.

SOURCE

Wikipedia

3506 questions
56
votes
11 answers

Default array values if key doesn't exist?

If I have an array full of information, is there any way I can a default for values to be returned if the key doesn't exist? function items() { return array( 'one' => array( 'a' => 1, 'b' => 2, …
cgwebprojects
  • 3,382
  • 6
  • 27
  • 40
56
votes
2 answers

Change the default border color of TextFormField in FLUTTER

Unable to change the default border color when TextFormField is not active. When TextFormField is not active this shows DarkGrey-Border color. So, how to change that. Theme( data: new ThemeData( primaryColor:…
jazzbpn
  • 6,441
  • 16
  • 63
  • 99
56
votes
1 answer

How do :default => 0 and :null => false differ for integer fields in migrations?

If I use a migration to update a database, and I add an integer field like this: t.integer :foo :default => 0, :null => false What is the default state of existing and new records in the database? I hoping the answer is: - Both will read back foo…
cmaughan
  • 2,596
  • 5
  • 30
  • 35
55
votes
9 answers

Find out if Android device is portrait or landscape for normal usage?

Is there anyway to find out if a device is portrait or landscape by default? In that I mean how you normally use the device. Most phones have a portrait screen for normal usage but is there some flag for finding that out?
joynes
  • 1,627
  • 4
  • 16
  • 19
54
votes
3 answers

How can I do Java annotation like @name("Luke") with no attribute inside parenthesis?

How I can do custom Java annotation with no attribute name inside parentheses? I don't want this: @annotation_name(att=valor). I just want like in Servlets, i.e: @WebServlet("/main")
Lucas Batistussi
  • 2,283
  • 3
  • 27
  • 35
53
votes
6 answers

Browsers' default CSS stylesheets

Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form) I want to know the default font of text areas across all browsers for future reference.
AnnanFay
  • 9,573
  • 15
  • 63
  • 86
53
votes
4 answers

How can I use DB side default value while use Hibernate save?

I have a column in DB with default value as sysdate. I'm looking for a way to get that default value inserted while I'm not giving anything to corresponding property on app side. By the way, I'm using annotation-based configuration. Any advice?
BruceCui
  • 731
  • 1
  • 6
  • 11
53
votes
5 answers

How do I get the default value for a field in a Django model?

I have a Django model with some fields that have default values specified. I am looking to grab the default value for one of these fields for us later on in my code. Is there an easy way to grab a particular field's default value from a model?
mikec
  • 3,543
  • 7
  • 30
  • 34
53
votes
2 answers

How do I set the default schema for a user in MySQL

Is there a way to set a default schema for each user in MySQL and if so how? Where user x would default to schema y and user z would default to schema a.
Robert Louis Murphy
  • 1,558
  • 1
  • 16
  • 29
52
votes
5 answers

Default parameters in C

Is it possible to set values for default parameters in C? For example: void display(int a, int b=10){ //do something } main(){ display(1); display(1,2); // override default value } Visual Studio 2008, complaints that there is a syntax error in…
user1128265
  • 2,891
  • 10
  • 29
  • 34
52
votes
1 answer

In NetBeans how do I change the Default JDK?

Possible Duplicate: Changing Java platform on which Netbeans runs Here is an image of my default JDK (which is 1.6) and the JDK I want to set as default (which is 1.7) http://tinypic.com/view.php?pic=35ldlye&s=5
Hrfpkj
  • 691
  • 2
  • 6
  • 13
50
votes
4 answers

PHP Default Function Parameter values, how to 'pass default value' for 'not last' parameters?

Most of us know the following syntax: function funcName($param='value'){ echo $param; } funcName(); Result: "value" We were wondering how to pass default values for the 'not last' paramater? I know this terminology is way off, but a simple…
anonymous-one
  • 14,454
  • 18
  • 60
  • 84
49
votes
3 answers

SQL Server: Find out default value of a column with a query

How can I find out the default value of a column in a table using a SQL query? By using this stored procedure: sp_columns @tablename I get some information on the columns of a particular table but the default value of the columns is missing, How…
zad
  • 3,355
  • 2
  • 24
  • 25
48
votes
2 answers

Revert IntelliJ IDEA font to pre-2020.1 default font

I upgraded to IntelliJ 2020.1, which uses the new JetBrains Mono font by default. However, I would like to switch back to using the previous default, but I don't remember the name. What was the name of the default font on pre-2020.1 versions of…
Adam Millerchip
  • 20,844
  • 5
  • 51
  • 74
48
votes
4 answers

default value for a static property

I like c#, but why can I do : public static bool Initialized { private set; get; } or this : public static bool Initialized = false; but not a mix of both in one line ? I just need to set access level to my variable (private set), and I need it…
Blitzz
  • 735
  • 2
  • 7
  • 7