default

Are all WPF controls FOCUSable ?

Hello, are there any default exceptions where wpf controls are not focusable? My controls need to be all focusable, but I do not want to set everytime I create a control make focusable="true" ...

Is there a way to make Textedit the default editor for text files opened in the terminal?

It there a way to make files opened for editing in the terminal open in Textedit instead? I mean, where a command might open a file for editing (like git commit), instead of opening that file in vi or emacs, it would open in Textedit (or perhaps another Textediting application of you choosing, such as Coda). And as a bonus question, is...

Launching default apps with intents

How, in android, do I start an app set as the default (i.e. Handcent for Messaging, Dolphin for browsing)? I can only find how to use definite package names for intents: Intent i = new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); switch (position) { case 0: //messages i.setPa...

Change default scrollbar behavior

Quick question... Is there any way to change the default behavior of a scrollbar from moving one pixel at a time (continuous motion), to jumping say 100px at a time (less continuous more discrete jumps). I have an animation that jumps between pictures and I want to use the scrollbar to show one picture at a time. Whenever I try chan...

Django: field's default value from self model's instances

How can I make default value for a field to be taken from existing objects of a model? I tried these and it didn't worked: 1) class ModelA(models.Model): fieldA = models.CharField(default=self.get_previous()) def get_previous(self): return ModelA.objects.all()[0].fieldA NameError: name 'self' is not defined 2) cla...

C# How to set default value of a string collection in Design

In WinForm, I have a combobox with DropDownStyle set to DropDownList (so can't enter a Text). In the properties window, there is the Items property which is a string collection. I enter all my values. But now, I would like to set one of these value by default (instead to have the empty entry at run-time). I know how to do this via codin...

Default implementation or abstract method?

Is it better to put a default implementation of a method in a superclass, and override it when subclasses want to deviate from this, or should you just leave the superclass method abstract, and have the normal implementation repeated across many subclasses? For example, a project I am involved in has a class that is used to specify the ...

html5 iphone preventDefault() doesnt stop from "copy" to appear upon a touch

I have this code, which shows the coordinates of the touch as the user drags his finger across the screen. The issue is that is I touch the screen for too long, it selects the entire canvas and displays the "copy" bubble, which is the default behaviour. How do I get rid of that? <html> <head> <script type="application/javascript"> fu...

Can the defaultSearchField in a Solr schema be set to "any or all" fields?

There is a parameter in the Solr schema to set a default search field like so... <!-- field for the QueryParser to use when an explicit fieldname is absent --> <defaultSearchField>detail</defaultSearchField> ...But I would like to search all fields (I have five besides "detail") when the user does not specify. How can I make search a...

Remove default browser styles on form elements.

Note: I've tried searching on google, but couldn't find what I was looking for. Browsers have some default styles they use for rendering form elements, which is different from browser to browser. Is there a way to reset all of the native browser styles for form elements like select, radios, checkbox etc, to make a consistent look across...

how can i modified the default locale in android

hello everyone: by default,the android system's default location is US and language is en. but i want to set the default location to other country.so, the users will see their mother language when the first time start up android. i have tried to modify the code(/dalvik/libcore/luni/src/main/java/java/util/Locale.java),changed the local...

default keyword in php

what does the keyword default in php do? there's no documentation on http://php.net/default, but i get an error when using it as a function name: »unexpected T_DEFAULT, expecting T_STRING« what does it do/where can i find information about it? ...

Firefox line-height issue with input fields

I have realized the problem before but I guess it didn't matter as much then as it did now. What I discovered is that Firefox has a default line-height value of 1.2 for input fields which can not be changed. At least in OSX, don't have Windows so I can't confirm it there. I did some experimenting and testing and there's just no way to ...

check box stops my Jquery script

I my login form if I dont check remember me check box in php script it gives <b>Notice</b>: Undefined index: autologin in error. in my .php file I have $check_autologin = $_POST['autologin']; And I am checking is user checked it if($check_autologin == 1) { $password_hash = $encrypted_mypassword; setcookie ($cookie_na...

Browser font defaulting

Hey, Say if I set the font-family for the page body to font1, font2, font3 and then I set the h1 tag's font family to font4, font5. If font 4 and 5 weren't installed, would the browser try font 1,2 and 3 before it used the browsers default font? ...

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? ...

Set default GCC to Fink-installed GCC 4.5?

I've got GCC 4.2 that came with my installation of Mac OS X 10.6.4, plus GCC 4.5 installed via Fink. I wanted to use gcc_select to change the default compiler to GCC 4.5, but was told gcc_select does not exist. Is there another way to set the default compiler? Or do I need to do so manually? If so, how? Thanks!! ...

C#'s default keyword equivalent in C++?

In C# I know you can use the default keyword to assign default values as 0 to value types and null to reference types and for struct types individual members are assigned accordingly. To my knowledge there are no default values in C++. What approach would you take to get the same functionality as the default keyword for Generics while pr...

file upload specify default download directory

Hi, I'm looking for a solution , that makes it possible to have the users upload files to the server , but with the ability to specify the default upload directory. The reason is that users have a mapped network drive , where they should put there files ( location is backupped , etc ... ). So , it would be best if each time they want ...

ActionScript – Default Datatype for Untyped Variables?

if i don't specifically type a variable in my code will it compile as a default datatype? for example, the "for each ... in" function works best without typing the variable: for each (var element in myArray) { //process each element } does my element variable have a datatype? if it is typed as Object is it...