Ah! the brute force approach. Sometimes the obvious escapes you. Many thanks for kickstarting my brain this morning. Much appreciated
Everyone dies - but not everyone lives
Ah! the brute force approach. Sometimes the obvious escapes you. Many thanks for kickstarting my brain this morning. Much appreciated
Everyone dies - but not everyone lives
Hi guys. My google foo seems to have left me this morning as well as my cognitive abilities. Lets say I have a list of 3 numbers, say (31549, 20468, 17625), that together add up to 69642. Say I have another list of numbers, (10211,8821,6894,6497,6482,5623,5594,5132,4471,4326,3245,2346), that also add up to 69642. I need to select the numbers from the second list that add up to the individual numbers in the first list. In my example the result I would expect would be 10211 + 5623 + 6894 + 8821 = 31549 3245 + 6497 + 5132 + 5594 = 20468 21346 + 6482 + 4326 + 4471 = 17625 Hope someone has some ideas to help. Thanks in advance
Everyone dies - but not everyone lives
Sorry, dude, but I think you are over reacting a touch. He asked a perfectly valid question, which might not be up to your high standards, but valid none the less. Just ignore the question if you feel the OP hasn't "Done Enough". Take a look at Bill's answer to the same question, and you can see a huge difference between attitudes.
Everyone dies - but not everyone lives
Thanks for that - fixed ! Damn Hamsters !
Everyone dies - but not everyone lives
Wireframe ?
Everyone dies - but not everyone lives
You need Clippy!
Everyone dies - but not everyone lives
Glad to help.
Everyone dies - but not everyone lives
You don't need the delimiter expression $$ after your END statement.
DELIMITER $$
DROP PROCEDURE IF EXISTS CleanCopyEnvData$$
CREATE PROCEDURE CleanCopyEnvData ()
BEGIN
insert into EnvData(UserDate, XAction, Balance, UserID)
select
CAST(udate as Date)
, CAST(amount1 as Decimal(6,3))
, CAST(amount2 as Decimal(6,3))
, CAST(UID as UnSigned)
from
DataLoad;
END
Everyone dies - but not everyone lives
You would have been better off posting this in the WPF forum - WPF / Silverlight[^]. Secondly, you haven't really asked a question or told us where you are stuck. Thirdly, when you put code into a post, you should use pre tags so that your code retains it's formatting (use the code menu item above the post entry box). It's also much easier to read.
Everyone dies - but not everyone lives
Look at your query closely, and you will see that you have duplicated the when clauses in the second half of the query
select p.pid,p.name,concat('91-',p.phoneno),
case (release_date-adm_date)
when (release_date-adm_date)<=5 then 'minor'
when ((release_date-adm_date)>5 and (release_date-adm_date)<=15) then 'medium'
else 'Major'
end as 'type_ailment'
from patient_master p,room_allocation r
when (release_date-adm_date)<=5 then minor
when (release_date-adm_date)>5 and when (release_date-adm_date)<=15 then med
from patient_master p,room_allocation r
where p.pid=r.pid ;
Everyone dies - but not everyone lives
Can't you extract the data layer from the desktop application, and use it to create a WCF service. Then you could use it in both web and desktop applications.
Everyone dies - but not everyone lives
A possible solution could be to have the VB application update a text / xml etc file, which would be polled by the c# console app to check if the user wants to take a snapshot. Maybe !
Everyone dies - but not everyone lives
Go on Eddy - why don't you tell them how you really feel :)
Everyone dies - but not everyone lives
In C# you can create a Property in multiple ways : Full blown Property :
private string testString;
public string TestString
{
get
{
return testString;
}
set
{
testString = value;
//Generally when you use full blown properties
//you do so because you need to do some sort of
//validation or other testing or to set other
//properties or fields as well
}
}
Or you can use Auto Implemented Properties:
public string TestString { get; set; };
For a good explanation of C# properties see the MSDN page here[^]
Everyone dies - but not everyone lives
You should really declare a collection of Horses, and then in your loop, create a new Horse and give a name based on the current name in the array
List allHorses = new List();
foreach(string name in arrayNames)
{
horses.Add(new Horse(){ Name = name };
}
Everyone dies - but not everyone lives
Me too. Chrome version 33.0, Windows 7
Everyone dies - but not everyone lives
I think he means ellipse button as in ... - not elliptical button :)
Everyone dies - but not everyone lives
I like that to occur when any text box is entered, and so I create a method in my App class that handles that :
private static void SelectAllText(object sender, RoutedEventArgs e)
{
var textBox = e.OriginalSource as TextBox;
if (textBox != null)
textBox.SelectAll();
}
and then I register a handler for the textbox GotKeyboardFocusEvent in my OnStartUP method
EventManager.RegisterClassHandler(typeof(TextBox), UIElement.GotKeyboardFocusEvent, new RoutedEventHandler(SelectAllText), true);
That way all textboxes select their text whenever they get focus. Hope this helps
Everyone dies - but not everyone lives