Search Results

Search found 54118 results on 2165 pages for 'default value'.

Page 8/2165 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to use default arguments in php

    - by liysd
    I want to define a function doSomething(arg1, arg2) with default values to arg1=val and arg2=val When I write function doSomething($arg1="value1", $arg2="value2"){ // do something } Is it possible now to call doSomething with default arg1 and arg2="new_value2"

    Read the article

  • Changing the default TestRunner in Eclipse.

    - by Vitalij
    All tests should be run with jUnit3, if i run a non-configured Test, it tries to use the default-TestRunner (jUnit4). So, i have to go into the run/debug configuration, change the TestRunner to "jUnit3" and run it again. On EVERY Test. This just disturbs the workflow. So, is there an option to REMOVE jUnit4 as possible TestRunner, or even better, change the Default TestRunner to jUnit3 ? Thanks in Advance,

    Read the article

  • How value objects are saving and loading?

    - by yeraycaballero
    Since there isn't respositories for value objects. How can I load all value objects? Suppose we are modeling a blog application and we have this classes: Post (Entity) Comment (Value object) Tag (Value object) PostsRespository (Respository) I Know that when I save a new post, its tags are saving with it in the same table. But how could I load all tags of all posts. Has PostsRespository got a method to load all tags? I usually do it, but I want to know others opinions

    Read the article

  • Properties.Settings.Default.Default.Save() does not work

    - by Akshay
    I have created code in WPF to let the window remember its last location like this: private void Window_Loaded(object sender, RoutedEventArgs e) { try { Rect storedLoc = Properties.Settings.Default.WindowSavedLocation; this.Top = storedLoc.Top; this.Left = storedLoc.Left; } catch { MessageBox.Show("No settings stored !"); } } private void Window_Closed(object sender, EventArgs e) { Properties.Settings.Default.WindowSavedLocation = RestoreBounds; Properties.Settings.Default.Save(); } When I build the application I can see that the app.exe.config file has the setting WindowSavedLocation but it just does not save and throws no exception. Everytime I run the application, it says "No settings stored !". It's scope is user.

    Read the article

  • Recognizing text fields according to their label value

    - by Pierpaolo Bagnasco
    I have an application who has text fields (not select, not checkbox or other types) where an user can enter some value, like this: ISBN and E-Mail are the label of each input. Now I have to automatically test these inputs according to their label. The question is: how to recognize that, for example, the first input requires an ISBN code? I programmed something like this: turn the label value to lowercase check if the label value contains isbn if so set the field value to a random ISBN code (i.e.: 1234567890), else set it to a random value (default) For the email field: turn the label value to lowercase check if the label value contains e-mail or email or mail if so set the field value to a random email (i.e.: [email protected]), else set it to a random value (default) And so on for each text field I encounter. Is that reliable? How can I improve the "recognizing part"? I know only the label value and the field value (what is already written in the field by default) for each text input.

    Read the article

  • Give WPF design mode default objects

    - by Janko R
    In my application I have <Rectangle.Margin> <MultiBinding Converter="{StaticResource XYPosToThicknessConverter}"> <Binding Path="XPos"/> <Binding Path="YPos"/> </MultiBinding> </Rectangle.Margin> The Data Context is set during runtime. The application works, but the design window in VS does not show a preview but System.InvalidCastException. That’s why I added a default object in the XYPosToThicknessConverter which is ugly. class XYPosToThicknessConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { // stupid check to give the design window its default object. if (!(values[0] is IConvertible)) return new System.Windows.Thickness(3, 3, 0, 0); // useful code and exception throwing starts here // ... } } My Questions: What does VS/the process that builds the design window pass to XYPosToThicknessConverter and what is way to find it out by myself. How do I change my XAML code, so that the design window gets its default object and is this the best way to handle this problem? I’m using VS2010RC with Net4.0

    Read the article

  • Error when changing default lanuage in asp.net compilation from vb to c#

    - by Herman
    Hi all, We have a updatable web site project that is written in c#, it has the usual web form implementation using master page, skins, user controls,...etc. Up to this point we neglect to change the default compilation language from VB to C#. However, the second we change it, we see the following error. Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ASP.Default.__DataBinding__control499(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at .... Further investigation points out that this error is getting generated from a Theme related assembly (Source : App_Theme_Default.zclakrlo). Any ideas? One of my co-worker suggested that it might be skin file related since we have a theme call "Default" and there is no way to specify a language on a skin file. Therefore, when the asp.net runtime tries to compile it under C#, it will give a name collision? Does this make sense? Any help is appreciated.

    Read the article

  • How can I get a value from an xml key/value pair with xpath in my xslt?

    - by TahoeWolverine
    I have some xml that I want to process using xslt. A good amount of the data comes through in key value pairs (see below). I am struggling with how to extract the value base on the key into a variable. I would like to be able to do something like this: <xsl:variable name="foo" select="/root/entry[key = 'foo']/value"/> but that doesn't seem to work. Here is sample xml. <?xml version="1.0" encoding="ISO-8859-1"?> <root> <entry> <key> foo </key> <value> bar </value> </entry> </root> What would the correct xpath be for this?

    Read the article

  • Codeigniter only loads the default controller

    - by fh47331
    I am very new to CodeIgniter, but have been programming PHP for ages. I'm writing some software at the moment and using CI for the first time with it. The default controller is set to the first controller I want to action call 'login' (the controller is login.php, the view is login.php. When the form is submitted it calls the 'authenticate' controller. This executes fine, process the login data correctly and then does a redirect command (without any output to the screen prior) to the next page in this case 'newspage'. The problem is that the redirect, never reaches 'newspage' but the default controller runs again. It doesn't matter what I put ... ht tp://domain.name/anything ... (yes im using .htaccess to remove the index.php) the anything never gets called, just the default controller. I have left the standard 'welcome.php' controller and 'welcome_message.php' in the folders and even putting ht tp://domain.name/welcome all I get is the login screen! (Obviously there shouldn't be a space between the http - thats just done so it does not show as a hyperlink!) Can anyone tell me what i've done wrong!

    Read the article

  • xsl literal with <xsl:if>

    - by Elena
    Hi, I have to write a very simple code in xsl: IF column=0 if result = .34 set background color to green and write $result, but if result = 0.10 set background color to white and write the word "QQQ" and what doesn't work is: <xsl:if test="$result = 0.35 and $column = 0"> <xsl:attribute name='background-color'>#669933</xsl:attribute> <xsl:value-of select="result"/> </xsl:if> <xsl:if test="$result = 0.10"> <xsl:value-of select="QQQ"/> </xsl:if> any suggestions? thanks in advance

    Read the article

  • This file does not have a program associated with it for performing

    - by Abu Hamzah
    update 2: HKEY_CLASSES_ROOT\folder ContentViewModeLayoutPatternForBrowse REG_SZ delta ContentViewModeForBrowse REG_SZ prop:~System.ItemNameDisplay;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;System.DateModified ContentViewModeLayoutPatternForSearch REG_SZ alpha ContentViewModeForSearch REG_SZ prop:~System.ItemNameDisplay;System.DateModified;~System.ItemFolderPathDisplay (Default) REG_SZ Folder EditFlags REG_BINARY D2030000 FullDetails REG_SZ prop:System.PropGroup.Description;System.ItemNameDisplay;System.ItemTypeText;System.Size NoRecentDocs REG_SZ ThumbnailCutoff REG_DWORD 0x0 TileInfo REG_SZ prop:System.Title;System.ItemTypeText HKEY_CLASSES_ROOT\folder\DefaultIcon (Default) REG_EXPAND_SZ %SystemRoot%\System32\shell32.dll,3 HKEY_CLASSES_ROOT\folder\shell HKEY_CLASSES_ROOT\folder\shell\explore HKEY_CLASSES_ROOT\folder\shell\explore\command HKEY_CLASSES_ROOT\folder\shell\open MultiSelectModel REG_SZ Document HKEY_CLASSES_ROOT\folder\shell\open\command DelegateExecute REG_SZ {11dbb47c-a525-400b-9e80-a54615a090c0} (Default) REG_EXPAND_SZ %SystemRoot%\Explorer.exe HKEY_CLASSES_ROOT\folder\shell\opennewprocess MUIVerb REG_SZ @shell32.dll,-8518 MultiSelectModel REG_SZ Document Extended REG_SZ LaunchExplorerFlags REG_DWORD 0x3 ExplorerHost REG_SZ {ceff45ee-c862-41de-aee2-a022c81eda92} HKEY_CLASSES_ROOT\folder\shell\opennewprocess\command DelegateExecute REG_SZ {11dbb47c-a525-400b-9e80-a54615a090c0} HKEY_CLASSES_ROOT\folder\shell\opennewwindow MUIVerb REG_SZ @shell32.dll,-8517 MultiSelectModel REG_SZ Document OnlyInBrowserWindow REG_SZ LaunchExplorerFlags REG_DWORD 0x1 HKEY_CLASSES_ROOT\folder\shell\opennewwindow\command DelegateExecute REG_SZ {11dbb47c-a525-400b-9e80-a54615a090c0} HKEY_CLASSES_ROOT\folder\ShellEx HKEY_CLASSES_ROOT\folder\ShellEx\ColumnHandlers HKEY_CLASSES_ROOT\folder\ShellEx\ColumnHandlers\{0561EC90-CE54-4f0c-9C55-E226110A740C} (Default) REG_SZ Haali Column Provider HKEY_CLASSES_ROOT\folder\ShellEx\ColumnHandlers\{F9DB5320-233E-11D1-9F84-707F02C10627} (Default) REG_SZ PDF Column Info HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\Adobe.Acrobat.ContextMenu (Default) REG_SZ {D25B2CAB-8A9A-4517-A9B2-CB5F68A5A802} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\BriefcaseMenu (Default) REG_SZ {85BBD920-42A0-1069-A2E4-08002B30309D} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\ESET Smart Security - Context Menu Shell Extension (Default) REG_SZ {B089FE88-FB52-11D3-BDF1-0050DA34150D} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\LavasoftShellExt (Default) REG_SZ {DCE027F7-16A4-4BEE-9BE7-74F80EE3738F} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\Library Location (Default) REG_SZ {3dad6c5d-2167-4cae-9914-f99e41c12cfa} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\MagicISO (Default) REG_SZ {DB85C504-C730-49DD-BEC1-7B39C6103B7A} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\MBAMShlExt (Default) REG_SZ {57CE581A-0CB6-4266-9CA0-19364C90A0B3} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\WS_FTP (Default) REG_SZ {797F3885-5429-11D4-8823-0050DA59922B} HKEY_CLASSES_ROOT\folder\ShellEx\ContextMenuHandlers\XXX Groove GFS Context Menu Handler XXX (Default) REG_SZ {6C467336-8281-4E60-8204-430CED96822D} HKEY_CLASSES_ROOT\folder\ShellEx\DragDropHandlers HKEY_CLASSES_ROOT\folder\ShellEx\DragDropHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\folder\ShellEx\DragDropHandlers\{BD472F60-27FA-11cf-B8B4-444553540000} (Default) REG_SZ HKEY_CLASSES_ROOT\folder\ShellEx\PropertySheetHandlers HKEY_CLASSES_ROOT\folder\ShellEx\PropertySheetHandlers\BriefcasePage (Default) REG_SZ {85BBD920-42A0-1069-A2E4-08002B30309D} HKEY_CLASSES_ROOT\folder\ShellNew Directory REG_SZ IconPath REG_EXPAND_SZ %SystemRoot%\system32\shell32.dll,3 ItemName REG_SZ @shell32.dll,-30396 MenuText REG_SZ @shell32.dll,-30317 NonLFNFileSpec REG_SZ @shell32.dll,-30319 HKEY_CLASSES_ROOT\folder\ShellNew\Config AllDrives REG_SZ IsFolder REG_SZ NoExtension REG_SZ update: HKEY_CLASSES_ROOT\Directory AlwaysShowExt REG_SZ (Default) REG_SZ File Folder EditFlags REG_BINARY D2010000 FriendlyTypeName REG_SZ @shell32.dll,-10152 FullDetails REG_SZ prop:System.PropGroup.Description;System.DateCreated;System.FileCount;System.TotalFileSize InfoTip REG_SZ prop:System.Comment;System.DateCreated NoRecentDocs REG_SZ PreviewDetails REG_SZ prop:System.DateModified;*System.SharedWith;*System.OfflineAvailability;*System.OfflineStatus PreviewTitle REG_SZ prop:System.ItemNameDisplay;System.ItemTypeText HKEY_CLASSES_ROOT\Directory\Background HKEY_CLASSES_ROOT\Directory\Background\shell HKEY_CLASSES_ROOT\Directory\Background\shell\cmd (Default) REG_SZ @shell32.dll,-8506 Extended REG_SZ NoWorkingDirectory REG_SZ HKEY_CLASSES_ROOT\Directory\Background\shell\cmd\command (Default) REG_SZ cmd.exe /s /k pushd "%V" HKEY_CLASSES_ROOT\Directory\Background\shellex HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Gadgets (Default) REG_SZ {6B9228DA-9C15-419e-856C-19E768A13BDC} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\igfxcui (Default) REG_SZ {3AB1675A-CCFF-11D2-8B20-00A0C93CB1F4} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New (Default) REG_SZ {D969A300-E7FF-11d0-A93B-00A0C90F2719} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Sharing (Default) REG_SZ {f81e9010-6ea4-11ce-a7ff-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\XXX Groove GFS Context Menu Handler XXX (Default) REG_SZ {6C467336-8281-4E60-8204-430CED96822D} HKEY_CLASSES_ROOT\Directory\DefaultIcon (Default) REG_EWindows Windows XPAND_SZ %SystemRoot%\System32\shell32.dll,3 HKEY_CLASSES_ROOT\Directory\shell (Default) REG_SZ none HKEY_CLASSES_ROOT\Directory\shell\cmd (Default) REG_SZ @shell32.dll,-8506 Extended REG_SZ NoWorkingDirectory REG_SZ HKEY_CLASSES_ROOT\Directory\shell\cmd\command (Default) REG_SZ cmd.exe /s /k pushd "%V" HKEY_CLASSES_ROOT\Directory\shell\find LegacyDisable REG_SZ SuppressionPolicy REG_DWORD 0x80 HKEY_CLASSES_ROOT\Directory\shell\find\command (Default) REG_EWindows Windows XPAND_SZ %SystemRoot%\EWindows Windows XPlorer.exe DelegateExecute REG_SZ {a015411a-f97d-4ef3-8425-8a38d022aebc} HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec (Default) REG_SZ [FindFolder("%l", %I)] NoActivateHandler REG_SZ HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec\application (Default) REG_SZ Folders HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec\topic (Default) REG_SZ AppProperties HKEY_CLASSES_ROOT\Directory\shell\OneNote.Open (Default) REG_SZ Open as Notebook in OneNote HKEY_CLASSES_ROOT\Directory\shell\OneNote.Open\Command (Default) REG_SZ C:\PROGRA~1\Microsoft Office\Office12\ONENOTE.EXE "%L" HKEY_CLASSES_ROOT\Directory\shellex HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\CuteFTP 8 Professional (Default) REG_SZ {8f7261d0-d2b9-11d2-9909-00605205b24c} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EncryptionMenu (Default) REG_SZ {A470F8CF-A1E8-4f65-8335-227475AA5C46} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\MagicISO (Default) REG_SZ {DB85C504-C730-49DD-BEC1-7B39C6103B7A} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Sharing (Default) REG_SZ {f81e9010-6ea4-11ce-a7ff-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\ShellExtension HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\XXX Groove GFS Context Menu Handler XXX (Default) REG_SZ {6C467336-8281-4E60-8204-430CED96822D} HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153} HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\FileSystem (Default) REG_SZ {217FC9C0-3AEA-1069-A2DB-08002B30309D} HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\Sharing (Default) REG_SZ {40dd6e20-7c17-11ce-a804-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\shellex\DragDropHandlers HKEY_CLASSES_ROOT\Directory\shellex\DragDropHandlers\WinRAR (Default) REG_SZ {B41DB860-8EE4-11D2-9906-E49FADC173CA} HKEY_CLASSES_ROOT\Directory\shellex\DragDropHandlers\WS_FTP (Default) REG_SZ {1D83C7B3-C931-4850-BED0-D3FE8B3F5808} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\Sharing (Default) REG_SZ {f81e9010-6ea4-11ce-a7ff-00aa003ca9f6} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{1f2e5c40-9550-11ce-99d2-00aa006e086c} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{4a7ded0a-ad25-11d0-98a8-0800361b1103} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{ECCDF543-45CC-11CE-B9BF-0080C87CDBA6} HKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\{ef43ecfe-2ab9-4632-bf21-58909dd177f0} (Default) REG_SZ I updated my IE9 from IE8 and after I reboot my machine and try to access my computer drive and I get this error message whenever I try to double click c:\ drive or other drives but other than that everything seems to be working fince except that I can not access my drives.... its very strange any help? <<<This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel>>> using Windows 7 32 bit

    Read the article

  • django-admin formfield_for_* change default value per/depending on instance

    - by Nick Ma.
    Hi, I'm trying to change the default value of a foreignkey-formfield to set a Value of an other model depending on the logged in user. But I'm racking my brain on it... This: Changing ForeignKey’s defaults in admin site would an option to change the empty_label, but I need the default_value. #Now I tried the following without errors but it didn't had the desired effect: class EmployeeAdmin(admin.ModelAdmin): ... def formfield_for_foreignkey(self, db_field, request=None, **kwargs): formfields= super(EmployeeAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs) if request.user.is_superuser: return formfields if db_field.name == "company": #This is the RELEVANT LINE kwargs["initial"] = request.user.default_company return db_field.formfield(**kwargs) admin.site.register(Employee, EmployeeAdmin) ################################################################## # REMAINING Setups if someone would like to know it but i think # irrelevant concerning the problem ################################################################## from django.contrib.auth.models import User, UserManager class CompanyUser(User): ... objects = UserManager() company = models.ManyToManyField(Company) default_company= models.ForeignKey(Company, related_name='default_company') #I registered the CompanyUser instead of the standard User, # thats all up and working ... class Employee(models.Model): company = models.ForeignKey(Company) ... Hint: kwargs["default"] ... doesn't exist. Thanks in advance, Nick

    Read the article

  • rails override default getter for a relationship (belongs_to)

    - by brad
    So I know how to override the default getters for attributes of an ActiveRecord object using def custom_getter return self[:custom_getter] || some_default_value end I'm trying to achieve the same thing however for a belongs to association. For instance. class Foo < AR belongs_to :bar def bar return self[:bar] || Bar.last end end class Bar < AR has_one :foo end When I say: f = Foo.last I'd like to have the method f.bar return the last Bar, rather than nil if that association doesn't exist yet. This doesn't work however. The reason is that self[:bar] is always undefined. It's actually self[:bar_id]. I can do something naive like: def bar if self[:bar_id] return Bar.find(self[:bar_id]) else return Bar.last end end However this will always make a db call, even if Bar has already been fetched, which is certainly not ideal. Does anyone have an insight as to how I might have a relationship such that the belongs_to attribute is only loaded once and has a default value if not set.

    Read the article

  • Getting value from key pair value into appended property using jQuery

    - by Neil
    How do I get the value from a key pair value into the rel property of an anchor tag? When I split the code to put the value in the correct place it doesn't work, the end of the a tag would appear on screen instead value wouldn't be applied. When I look at the resulting code in console in Firebug the rel and href swapped order so the rel is first. The 'key' should be and is in the correct location but the 'value' needs to be applied to the rel attribute. What am I doing wrong? $(function() { var obj = {"firstThing":"4","secondThing":"6","aThirdThing":"2","anotherThing":"3","followedByAnother":"4"}; $.each(obj, function(key,value) { $('#newmine').append("<li class='tagBlocks'>","<a href='#' rel=''>",value," ",key); }); });

    Read the article

  • Custom Message Box: Windows' "Move Cursor to Default Button" Feature

    - by Andreas Rejbrand
    In Microsoft Windows, there is a (highly useful) feature that automatically moves the cursor to the default button of a modal dialog box (activated in Win+R, "control mouse"). Now I have created a custom dialog box in Delphi (basically a TForm), see below. But, quite naturally, the cursor does not automatically move to the default button ("Yes" in this case), even though the feature is turned on in "control mouse". How to implement this feature using Windows API? I guess it would be sufficient to obtain the settings as a boolean (true if feature activated, false if not), and then simply move the cursor programmatically using SetCursorPos if true. But how to obtain this setting?

    Read the article

  • What is default username & password for a persistent pendrive?

    - by sdos
    I am trying out Ubuntu 11.04 on a netbook. I created a live USB to boot from using this: http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ and the system boots up into Ubuntu from the USB stick, great! bad news is I am presented with a login form.... I did not set a password so I have no idea what it could be.... username: other password: I have tried no password, no luck... I tried ubuntu, no luck Any Ideas why it has a password, and what it might be or how I can set the password?

    Read the article

  • Set Default DateTime Format c#

    - by Matthew Hood
    Is there a way of setting or overriding the default DateTime format for an entire application. I am writing an app in C# .Net MVC 1.0 and use alot of generics and reflection. Would be much simpler if I could override the default DateTime.ToString() format to be "dd-MMM-yyyy". I do not want this format to change when the site is run on a different machine. Edit - Just to clarify I mean specifically calling the ToString, not some other extension function, this is because of the reflection / generated code. Would be easier to just change the ToString output.

    Read the article

  • Hash default value not being used

    - by ba
    Today I tried the following snippets of code and I don't understand why I get different results between them. As far as I can understand they are the same. One uses the default value off Hash and the other snippet creates an empty array for the key before it'll be accessed. Anyone who understands what's going on? :) # Hash default if the key doesn't have a value set is an empty Array a = Hash.new([]) a[:key] << 2 # => [2] p a # => {} nil p a[:key] # => [2] # Explicitly add an array for all nodes before creating b = Hash.new b[:key] ||= [] b[:key] << 2 # => [2] p b # => {:key=>[2]}

    Read the article

  • .Net Inherited Control Property Default

    - by Yisman
    Hello fellows Im trying to make a simple "ButtonPlus" control. the main idea is to inherit from the button control and add some default property values (such as font,color,padding...) No matter how i try, the WinForm always generates (or "serializes") the property value in the client forms the whole point is to have minimal and clean code, not that every instance of the buttonPlus should have 5 lines of init code. I want that the form designer should not generate any code for theses properties and be able to control them from the ButtonPlus code. In other words, if I change the ForeColor from red to blue only 1 single bingle line of code in the app should change. heres my code so far. as you can see, ive tried using defaultvalue, reset , shouldserialize.... anything i was able to find on the web! Public Class ButtonPlus Inherits Button Sub New() 'AutoSize = True AutoSizeMode = Windows.Forms.AutoSizeMode.GrowAndShrink Font = New System.Drawing.Font("Arial", 11.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Padding = New System.Windows.Forms.Padding(3) Anchor = AnchorStyles.Left + AnchorStyles.Right + AnchorStyles.Top ForeColor = Color.Aqua End Sub ' _ 'Public Overrides Property AutoSize() As Boolean ' Get ' Return MyBase.AutoSize ' End Get ' Set(ByVal value As Boolean) ' MyBase.AutoSize = value ' End Set 'End Property Public Function ShouldSerializeAutoSize() As Boolean Return False ' Not AutoSize = True End Function Public Function ShouldSerializeForeColor() As Boolean Return False 'Not ForeColor = Color.Aqua End Function Public Overrides Sub ResetForeColor() ForeColor = Color.Aqua End Sub End Class Thank you very much for taking the time to look this over and answer all the best

    Read the article

  • Error when reloading supervisord: unix:///tmp/supervisor.sock no such file

    - by Yarin
    I'm running supervisord on my CentOS 6 box like so, /usr/bin/supervisord -c /etc/supervisord.conf and when I launch supervisorctl all process status are fine, but if I try to reload using supervisorctl I get unix:///tmp/supervisor.sock no such file I'm using the same config file I've used successfully on other boxes, and im running everything as root. I can't undesrtand what the problem is... Config file: ; Sample supervisor config file. [unix_http_server] file=/tmp/supervisor.sock ; (the path to the socket file) ;chmod=0700 ; socket file mode (default 0700) ;chown=nobody:nogroup ; socket file uid:gid owner ;username=user ; (default is no username (open server)) ;password=123 ; (default is no password (open server)) ;[inet_http_server] ; inet (TCP) server disabled by default ;port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface) ;username=user ; (default is no username (open server)) ;password=123 ; (default is no password (open server)) [supervisord] logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) logfile_backups=10 ; (num of main logfile rotation backups;default 10) loglevel=info ; (log level;default info; others: debug,warn,trace) pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) nodaemon=false ; (start in foreground if true;default false) minfds=1024 ; (min. avail startup file descriptors;default 1024) minprocs=200 ; (min. avail process descriptors;default 200) ;umask=022 ; (process file creation umask;default 022) ;user=chrism ; (default is current user, required if root) ;identifier=supervisor ; (supervisord identifier, default is 'supervisor') ;directory=/tmp ; (default is not to cd during start) ;nocleanup=true ; (don't clean up tempfiles at start;default false) ;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP) ;environment=KEY=value ; (key value pairs to add to environment) ;strip_ansi=false ; (strip ansi escape codes in logs; def. false) ; the below section must remain in the config file for RPC ; (supervisorctl/web interface) to work, additional interfaces may be ; added by defining them in separate rpcinterface: sections [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [supervisorctl] serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket ;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket ;username=chris ; should be same as http_username if set ;password=123 ; should be same as http_password if set ;prompt=mysupervisor ; cmd line prompt (default "supervisor") ;history_file=~/.sc_history ; use readline history if available ; The below sample program section shows all possible program subsection values, ; create one or more 'real' program: sections to be able to control them under ; supervisor. ;[program:foo] ;command=/bin/cat [program:embed_scheduler] command=/opt/web-apps/mywebsite/custom_process.py process_name=%(program_name)s_%(process_num)d numprocs=3 ;[program:theprogramname] ;command=/bin/cat ; the program (relative uses PATH, can take args) ;process_name=%(program_name)s ; process_name expr (default %(program_name)s) ;numprocs=1 ; number of processes copies to start (def 1) ;directory=/tmp ; directory to cwd to before exec (def no cwd) ;umask=022 ; umask for process (default None) ;priority=999 ; the relative start priority (default 999) ;autostart=true ; start at supervisord start (default: true) ;autorestart=unexpected ; whether/when to restart (default: unexpected) ;startsecs=1 ; number of secs prog must stay running (def. 1) ;startretries=3 ; max # of serial start failures (default 3) ;exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) ;stopsignal=QUIT ; signal used to kill process (default TERM) ;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) ;killasgroup=false ; SIGKILL the UNIX process group (def false) ;user=chrism ; setuid to this UNIX account to run the program ;redirect_stderr=true ; redirect proc stderr to stdout (default false) ;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO ;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) ;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) ;stdout_events_enabled=false ; emit events on stdout writes (default false) ;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO ;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stderr_logfile_backups=10 ; # of stderr logfile backups (default 10) ;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0) ;stderr_events_enabled=false ; emit events on stderr writes (default false) ;environment=A=1,B=2 ; process environment additions (def no adds) ;serverurl=AUTO ; override serverurl computation (childutils) ; The below sample eventlistener section shows all possible ; eventlistener subsection values, create one or more 'real' ; eventlistener: sections to be able to handle event notifications ; sent by supervisor. ;[eventlistener:theeventlistenername] ;command=/bin/eventlistener ; the program (relative uses PATH, can take args) ;process_name=%(program_name)s ; process_name expr (default %(program_name)s) ;numprocs=1 ; number of processes copies to start (def 1) ;events=EVENT ; event notif. types to subscribe to (req'd) ;buffer_size=10 ; event buffer queue size (default 10) ;directory=/tmp ; directory to cwd to before exec (def no cwd) ;umask=022 ; umask for process (default None) ;priority=-1 ; the relative start priority (default -1) ;autostart=true ; start at supervisord start (default: true) ;autorestart=unexpected ; whether/when to restart (default: unexpected) ;startsecs=1 ; number of secs prog must stay running (def. 1) ;startretries=3 ; max # of serial start failures (default 3) ;exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) ;stopsignal=QUIT ; signal used to kill process (default TERM) ;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10) ;killasgroup=false ; SIGKILL the UNIX process group (def false) ;user=chrism ; setuid to this UNIX account to run the program ;redirect_stderr=true ; redirect proc stderr to stdout (default false) ;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO ;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) ;stdout_events_enabled=false ; emit events on stdout writes (default false) ;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO ;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) ;stderr_logfile_backups ; # of stderr logfile backups (default 10) ;stderr_events_enabled=false ; emit events on stderr writes (default false) ;environment=A=1,B=2 ; process environment additions ;serverurl=AUTO ; override serverurl computation (childutils) ; The below sample group section shows all possible group values, ; create one or more 'real' group: sections to create "heterogeneous" ; process groups. ;[group:thegroupname] ;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions ;priority=999 ; the relative start priority (default 999) ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or ; newlines). It can also contain wildcards. The filenames are ; interpreted as relative to this file. Included files *cannot* ; include files themselves. ;[include] ;files = relative/directory/*.ini

    Read the article

  • PHP memory_limit local value does not match php.ini value

    - by Buttle Butkus
    CentOS system. Summary: changed memory_limit in master and local php.ini and yet no change in the local value for a particular virtual host. Trying to improve performance, I set the memory_limit to 1024M in /etc/php.ini phpinfo() shows Master and Local values for other virtual hosts on the server as 1024M. Changing the value in /etc/php.ini changes all values, except one. One site is stuck with a local value of 256M. I thought I found the problem: there is a php.ini file (which I didn't know about) in that site's root, and it had memory_limit = 256M I changed it to 1024M. Problem solved? No. And now I don't know where to look. Obviously, I've restarted apache (/etc/init.d/httpd restart), and that usually does the trick. I also turned off APC cache, though I don't think it would cache ini files. And finally, I tried adding this to the virtual host in httpd.conf: php_value memory_limit 536870912 (yes, that would be 5 GB) And that had no effect whatsoever. What else could be the problem? Thanks.

    Read the article

  • How to use the Value of a Selected Value from a DropDownList populated with AJAX/PHP

    - by mouthpiec
    Hi, I have form with two dropdownlists (lets say A and B). When I select a value from A, B is being populated accordingly using AJAX In the same page I have a button, that when pressed, posts the values of the selected items of the dropdownlists to another PHP page. The problem I am having is that the selected value of B is returned as Blank/Empty. Is there a way to store the selected value of a dropdownlist populated using AJAX? Code below: (Main FORM) <form name="NewBar" method="post" onsubmit="return validateFormOnSubmit(this)" action="AssignContactDetailToBar_f.php"> <tr> <td width="150"><b>Bar:</b></td> <td> <select name = "bar" onChange="getContact('AssignContactDetailToBar_f_getContacts.php?bar='+this.value)" size = 1 style = "width:190px"> <option value = "">---Select---</option> <?php while ($data = mysql_fetch_array($r_getBarsDetails)) { echo "<option value=\"".$data['bar_id']."\">".$data['bar_name']." (".$data['town_name'].")</option>"; } ?> </td> </tr> <tr> <td width="150"><b>Contact Person:</b></td> <td> <div id="persondiv"><select name = "person" size = 1 style = "width:190px"> <option value = "">--Select Bar--</option> </td> </tr> <tr> <td> <input name="security" type="text" size="15"> </td> <td> <input type="submit" name="Submit" value="Submit"> </td> </tr> </form> FORM to populate the 2nd Dropdownlist <select name="person" size = 1 style = "width:190px"> <option value = "">--Select Person--</option> <?php while($data=mysql_fetch_array($result)) { echo "<option value=\"".$data['person_id']."\">".$data['person_name']." ".$data['person_surname']." (".$data['town_name'].")</option>"; } ?> if you would like to see the complete code download from here

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >