default

How to prevent hackers from exploiting Apache ->Sites-available -> Default file

We noticed that a hacker created a domain and configured DNS to point it to our server's IP address. We are using apache2.x on Ubuntu. There is a "default" file in apache's /etc/apache2/sites-available directory and it looks like the the hacker's domain is using "default" apache configuration file to display our web content in their d...

Reporting Services: Overriding a default parameter with an expression in a linked report

So I've got a "daily dashboard" report in SSRS 2005. It has a parameter, @pDate, which defaults to "=Now". I'd like to use this same report in a linked report to show yesterday's final dashboard (which would then be mailed out via subscription), and override the parameter default with another expression, "=dateadd(d,-1,Now)." But when I...

Create the default website of IIs, after delete

Hi, i have accidentaly delete the default website in II/, so in the tree of iis manager i can't see it and the address localhost return the classical 404 error. I've reinstalled iis but the there isn't the default website...I would, if it's possibile, ask you how create the default website so then i can inside create my folder. ...

WPF button textwrap style

Hi, How do I change the default textwrapping style of a button in WPF? The obvious solution of: <Style x:Key="MyButtonStyle" TargetType="{x:Type Button}"> <Setter Property="TextWrapping" Value="Wrap"></Setter> </Style> doesn't work, because Textwrapping isn't a settable property here, apparently. If I try: <Style x:Key="MyButt...

Changing the default modal result of a form.showModal

In my Delphi application I have a custom Yes, No, Cancel dialogue, which will be called from the main form to confirm saving the changes made to the current file edited. This would normally be achieved by messageDlg() but I wanted this dialogue to have customised looks, so I am trying to achieve this functionality by case myDialogue.sh...

.NET Default Properties Error

I have a VB.NET project where I am able to iterate through the keys and values collections of a dictionary object using an index: MyDictionary.Keys(idx) MyDictionary.Values(idx) When this code is taken from the test project and placed into the real project I get the following error: 'System.Collections.Generic.Dictionary(Of ...

Default Arguments in Matlab

Hello. Is it possible to have default arguments in Matlab? For instance, here: function wave(a,b,n,k,T,f,flag,fTrue=inline('0')) I would like to have the true solution be an optional argument to the wave function. If it is possible, can anyone demonstrate the proper way to do this? Currently, I am trying what I posted above and I ...

Under what circumstances will Active Record fail to enforce optimistic locking?

I watched in horror this morning as a script, running on two different machines, happily loaded, updated, and saved. I'm running ruby 1.8.6, AR 2.2.2. I started playing with some test cases and found reduced it to a minimal reproduction case: irb(main):059:0> first = Job.find :first => #<Job id: 323, lock: 8, worker_host: "second"> i...

UserControl Default Value in Property

I have a UserControl with a few boolean properties in it. I would like them to be set to true by default if not set explicitly in the .aspx page, or at least force them to be declared if there's no way to set a default. I know there is a way to do this because lots of controls have required properties that break your app when you try to ...

Delayed constructor in C++

I have been reviewing some code that looks like this: class A; // defined somewhere else, has both default constructor and A(int _int) defined class B { public: B(); // empty A a; }; int main() { B* b; b = new B(); b->a(myInt); // here, calling the A(int _int) constructor, //but default constructor should al...

Default template parameter in constructor

So I have this piece of code and out of convenience I want the default parameter for its constructor be of the int kind and 0. (I have more parameters in a class of my project and one of them is optional and I don't want to write the constructor twice because its big) class mama{ public: template<typename x> mama(x i=int(0)){} }...

IE toolbar, visible by default.

Hi, i have created an IE band object (toolbar) that is working well. however, when installed on a new machine it is not visible by default. Of course one can turn it on by right clicking the toolbar area and selecting it, however, i would like to know if there is a way or an option in the registry that will enable me to have the bar turn...

Passing default parameter value vs not passing parameter at all?

Here's what I want to do: Given a table PeopleOutfit (id int primary key, boots int, hat int) And a stored procedure UpdateOutfit @id int, @newBoots int = null, @newHat = null Is there a way to tell whether I called this procedure as exec UpdateOutfit @id=1, @newBoots=null, @newHat=5 effectively telling that the person with id ...

Open Office Base Datetime Default

Can anyone tell me how to set the default value on a date field in Open Office Base, in the same way that GetDate() works for SQL Server? Cheers OneSHOT ...

Prevent Visual Studio from adding default references and usings for new classes

Whenever I add a new class to a Visual Studio (C#) project, I get the following usings automatically: using System; using System.Collections.Generic; using System.Linq; using System.Text; Additionally, the following DLL references are added if they weren't there already: System.Core System.Data System.Xml I'd like to prevent VS f...

How do I determine if a PL/SQL parameter value was defaulted?

Suppose I have a PL/SQL stored procedure as follows: PROCEDURE do_something(foo VARCHAR2 DEFAULT NULL) IS BEGIN /* Do something */ END; Now, suppose do_something is invoked two different ways: /* Scenario 1: The 'foo' parameter defaults to NULL */ do_something(); /* Scenario 2: The 'foo' parameter is explicitly set to NULL */ do...

Rails migrations: Undo default setting for a column

Hi Stack Overflow Community! I have the problem, that I have an migration in Rails that sets up a default setting for a column, like this example: def self.up add_column :column_name, :bought_at, :datetime, :default => Time.now end Suppose, I like to drop that default settings in a later migration, how do I do that with using rails...

How do I make a default value for a parameter to a javascript function

Possible Duplicate: Is there a better way to do optional function parameters in Javascript? I would like a javascript function to have optional arguments which I set a default on, which gets used if the value isn't defined. In ruby you can do it like this: def read_file(file, delete_after = false) # code end Does this work...

Flex 3 - how to select an item in the list as default ?

how to select an item in the list as default default selected item say of index 0 I tried stuff like this -- listid.selectedIndex = somevalueinmyprogram - 1; // 0 but when i debug this i get _selectedIndex = 0 selectedIndex = -1 and default value is not selected why so? [i have already checked for the obvious that somevaluef...

Link Button on the page and set it as default button, work fine in IE but not in Mozila

I have a link button on the page and set it as default button, It works fine in IE but not working in Mozila Firefox. Does anybody have any clue how to resolve this issue? ...