How would I go about doing this on the terminal?
sftp then asks me for a password. how do I include my DSA key so that I do not have to use the password?
So two questions here: If I use <input type="button" onclick="validate()"> then the enter key wouldn't work. However, I can use type="submit" but how would I invoke validate()?
I have the following table...
TABLE: Accounts
ID (int, PK, Identity)
AccountType (int, PK)
Username (varchar)
Password (varchar)
I have created a composite key out of ID and AccountType columns so that people can have the same username/password but different AccountTypes.
Does this mean that for each foreign table that I try and link to I'll have to create two columns?
I’m using SQL Server 2008
If I want to delete all the tables in my database like this, will it take care of the foreign key constraint? If not, how do I take care of that first?
GO
IF OBJECT_ID('dbo.[Course]','U') IS NOT NULL
DROP TABLE dbo.[Course]
GO
IF OBJECT_ID('dbo.[Student]','U') IS NOT NULL
DROP TABLE dbo.[Student]
I need to determine the current state of the Shift key, but at the time I need the state I don't have an InputEvent object around. I need something like java.awt.Toolkit.getLockingKeyState(int) that works for Shift, not just the locking keys like VK_CAPS_LOCK. Is there a way I can do this without listening to input events and storing the for later when I need to check the state?
Thanks!
I have a table with primary key (ColumnA, ColumnB). I want to make a function or procedure that when passed two integers will insert a row into the table but make sure the largest integer always goes into ColumnA and the smaller one into ColumnB.
So if we have SetKeysWithTheseNumbers(17, 19) would return
|-----------------|
|ColumnA | ColumnB|
|-----------------|
|19 | 17 |
|-----------------|
SetKeysWithTheseNumbers(19, 17) would return the same thing
|-----------------|
|ColumnA | ColumnB|
|-----------------|
|19 | 17 |
|-----------------|
Looking for a quick way to type an enter or return key in Selenium. Unfortunately the form I'm trying to test (not my own code so I can't modify) doesn't have a submit button. When working with it manually, I just type enter or return, and just need to know how to do that with the Selenium "type" command
My Android application uses a secret key to generate a token for authentication purposes. Is there a more secure way to store this than just putting this in the data store? I think for the iPhone, we store it in the keychain. I am aware of android.accounts.AccountManager, but this seems to give other applications potentially the ability to access the password (if the user selects the wrong option) and so seems less secure.
Is there a way to fire a two way data bind when the key up event fires in Silverlight. Currently I have to lose focus on the textbox to get the binding to fire.
<TextBox x:Name="Filter" KeyUp="Filter_KeyUp" Text="{Binding Path=Filter, Mode=TwoWay }"/>
Hi,
I want to raise the:
private void txtbox_startdate_Validating(object sender, System.ComponentModel.CancelEventArgs e)
{}
Function from a key leave event. The leave event looks like:
private void txtbox_startdate_Leave(object sender, EventArgs e)
{}
The trouble is of course if I try and call it in this manner:
txtbox_startdate_Validating(sender, e)
An error is raised because in this case 'e' is an EventArgs whereas the validation function wants a System.ComponentModel.CancelEventArgs and so, how do I convert EventArgs to a System.ComponentModel.CancelEventArgs or create one so that I can call my validation function?
Thanks, R.
Say I have 2 tables whose structures are as follows:
tableA
id | A1 | A2
tableB
id | tableA_id (foreign key) | B1
Entries in A have a one-to-many relationship with entries in B. What kind of query operation would I need to achieve "something like this: select all objects from table B where A1="foo""? Basically, apply a query on tableA and from those result, find corresponding dependent objects in tableB
I want to copy data from a database to another, but I'd like to keep the primary key from the original database so it won't mess with the relationships. I'm using MS SQL Server 2008.
I'd like to know if there is a way to figure out if a key does something in vim. I know that I can use :map to see user-defined mappings, but is there something for the built-in stuff?
For example, I always had CTRL-W bound to close tab, because I thought that it was unused. After half a year, I found out that there are some sequences that use it, like CTRL-W CTRL-S to split the window, and it was a nightmare to retrain myself.
Hi
I'm new to NHibernate and FNH and am trying to map these simple classes by using FluentNHibernate AutoMappings feature:
public class TVShow : Entity
{
public virtual string Title { get; set;}
public virtual ICollection<Season> Seasons { get; protected set; }
public TVShow()
{
Seasons = new HashedSet<Season>();
}
public virtual void AddSeason(Season season)
{
season.TVShow = this;
Seasons.Add(season);
}
public virtual void RemoveSeason(Season season)
{
if (!Seasons.Contains(season))
{
throw new InvalidOperationException("This TV Show does not contain the given season");
}
season.TVShow = null;
Seasons.Remove(season);
}
}
public class Season : Entity
{
public virtual TVShow TVShow { get; set; }
public virtual int Number { get; set; }
public virtual IList<Episode> Episodes { get; set; }
public Season()
{
Episodes = new List<Episode>();
}
public virtual void AddEpisode(Episode episode)
{
episode.Season = this;
Episodes.Add(episode);
}
public virtual void RemoveEpisode(Episode episode)
{
if (!Episodes.Contains(episode))
{
throw new InvalidOperationException("Episode not found on this season");
}
episode.Season = null;
Episodes.Remove(episode);
}
}
I'm also using a couple of conventions:
public class MyForeignKeyConvention : IReferenceConvention
{
#region IConvention<IManyToOneInspector,IManyToOneInstance> Members
public void Apply(FluentNHibernate.Conventions.Instances.IManyToOneInstance instance)
{
instance.Column("fk_" + instance.Property.Name);
}
#endregion
}
The problem is that FNH is generating the section below for the Seasons property mapping:
<bag name="Seasons">
<key>
<column name="TVShow_Id" />
</key>
<one-to-many class="TVShowsManager.Domain.Season, TVShowsManager.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
</bag>
The column name above should be fk_TVShow rather than TVShow_Id. If amend the hbm files produced by FNH then the code works.
Does anyone know what it's wrong?
Thanks in advance.
Hello,
I have an array in PHP which looks like that:
$test = array('3' => 5);
How could I replace the stringed array key 3?
I tried:
$test['3'] = "New value"
but it don't work, it look like that after that:
array('3' => 5, 3 => "New value")
I have a hash in Perl which has been dumped into from some legacy code the name of the key has now changed from simply reqHdrs to reqHdrs.bla
$rec->{reqHdrs.bla}
My problem is now I cant seem to access this field from the hash any ideas?
The following is my error
Download Script Output: Bareword "reqHdrs" not allowed while "strict subs" in use
MySQL has something like this:
INSERT INTO visits (ip, hits)
VALUES ('127.0.0.1', 1)
ON DUPLICATE KEY UPDATE hits = hits + 1;
As far as I'm know this feature doesn't exist in SQLite, what I want to know is if there is any way to archive the same effect without having to execute two queries. Also, if this is not possible, what do you prefer:
SELECT + (INSERT or UPDATE) or
UPDATE (+ INSERT if UPDATE fails)
i think i have read every page google knows about which has these keywords, and nothing works for me.
what i have is a form input, and a button next to it [not submit], and what i want is for the button click to trigger an 'enter' key click. [this will respectively run another function which is already working..]
i've tried
and also putting it in a function and then running it from onclick, or making a
$(#'inputBtn').click(function().....
nothing works for me please help!!
I have a table
Item(ItemName*, ItemSize*, Price, Notes)
I was making composite key of (ItemName,ItemSize) to uniquely identify item. And now after reading some answers on stackoverflow suggesting the use of UNIQUE i revised it as
Item(ItemID*, ItemName, ItemSize, Price, Notes)
But How to apply UNIQUE constraint on ItemName and ItemSize
please correct if there is something wrong in question
Dear Cocoa Developers,
I'm creating a backgrounded cocoa application. The only thing that it's missing is the ability to take text inputs!
I'm making the application backgrounded by setting "Application is background only" in the Info.plist
But no matter what I do I can't make any window the keyWindow.
makeKeyWindow
makeKeyAndOrderFront
Both don't work...
I know apps can do this, anyone have any idea how you can get background application to have a key window?
Thanks,
JPoz
Hi,
I have an UITextField object in my view and want to launch a method when user press backspace button and textField is empty.
First I have to do is to create a cursor storing text length, so when cursor changes from 1 to 0 there is nothing to do.
The only way to launch the method is when text length is 0 - press backspace - remain to 0.
How to catch the event of pressing the backspace key in my UITextField ?
Thanks in advance !
what are some key differences between mvc1 and mvc2.
I have to adopt any one so i am unable to decide that is mvc2 have some really good features that mvc1 is missing.
I know, there are a lot of limitations to the length of used key (import and export limitations for nearly each country). Usually, it varies from 64 to 256 bits. To use more bits, it is obligatory to ask permission from authorities.
But it is recommended to use 1024 bits keys for RSA as minimum!
Does it mean that I cannot just use RSA without any problems with law and so on?
I have a large database with over 150 tables that I've recently been handed. I'm just wondering if there is an easy way to view all foreign key constraints for the entire DB instead of on a per-table basis.