|
anupmadathil wrote: I am only a beginer in C#.Net
OK - then choose an easier task. If this is homework, talk to your teacher. If this is paid work then you are a disgrace.,
anupmadathil wrote: I search Google to get my requirement,
I found several examples of source code. If you could not understand them, you won't understand anything you get here.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I love the crappy attempt to boost your ego in attempt to get code.
"That's why I contact a bright man like you", is that little compliment supposed to get him code or something?
|
|
|
|
|
Welcome in the CP's Memorable Quotes page, Christian [^].
BTW the C# forum is a treasure hous of memorable quotes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
you cannot miss this one. Check the reply Chris gave.
|
|
|
|
|
Hi all,
I have a C# desktop application and I am using MS-Access database.
I am using below code for update operation.
string SqlString = "UPDATE table_name SET Bdate = @Bdate WHERE SrNo = @SrNo";
OledbCmd = new OleDbCommand(SqlString, OleDbConn);
OledbCmd.Parameters.AddWithValue("@SrNo", intSrNo);
OledbCmd.Parameters.AddWithValue("@Bdate", DateTime.Now.ToString());
Same approach is used for Insert operation also.
All working fine...
But I have read in one article that, DateTime should be enclosed withing single quote or #, when you are working with MS-Access. Right now, my code is working fine.
Please, explain me if there is any difference between the approach I am using and the approach that I have read..
Thanks,
Regards,
-SIFAR.
|
|
|
|
|
What is the field type of "@Bdate" in the database ?
# and quote are date delimiters in MS-Access. The older versions only supported # but the newer version support quotes as well.
|
|
|
|
|
If Bdate is a date then don't call ToSTring() when setting the parameter
OledbCmd.Parameters.AddWithValue("@Bdate", DateTime.Now.ToString());
|
|
|
|
|
Hello all!
I'm trying to launch a track in my music player of choice.
the command line is something like the following
c:\OtsLabs\OtsPlay.exe c:\track to be played includes spaces.ots|3 /play
the "|3" is the track within the album file to be played.
I can get Windows Media player to load a wav track without spaces, but not with, and the extra bits of command arguments... I can't seem to get them to work at all with my app.
The best I can do with this app is to open the playing app, empty.
The filetype in windows explorer has the following play action...
"C:\OtsLabs\OtsPlay.exe" "%1" /play
Thanks for your assistance.
|
|
|
|
|
Try putting the filename in quotes. That should help.
Kristian Sixhoej
"You can't undo the past... but you can certainly not repeat it." - Bruce Willis
|
|
|
|
|
My appologies, but using the startinfo arguments, it is in quotes.
If I put it all in quotes, it won't load, if I put just the filename in quotes, and put the |3 /play outside, I get a compile error. With only the filename (in quotes), it still won't open the file. Just the application.
|
|
|
|
|
To prevent compiler errors, you need to escape your quotes. How you escape them depends on if you're using normal (use \") or literal (use "") strings here. I recommend literal strings here.
Normal string:
myarguments = "\"C:\\track to be played includes spaces.ots|3\" /play";
Literal string:
myarguments = @"""C:\track to be played includes spaces.ots|3"" /play";
|
|
|
|
|
Interesting!
I'll give that a shot!
Thanks!
|
|
|
|
|
Thanks for the assistance thus far.
I was able to launch the player and load a file now, but now, I can only seem to load the first file from my listview.
r.path = a string pulled from an ObjectListView control indicating the file location.
string path = r.fPath;
System.Diagnostics.Process.proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.Filename = @"\otsplay.exe";
proc.StartInfo.Arguments = path;
proc.Start();
The code above works on all the tracks belonging to the first file in the objectlistview, but nothing past.
When I view the strings via messagebox, the path is valid, but the player opens empty unless it is the first file in the list.
I don't understand why this is occuring.
Any ideas?
It appeas as though it's not recognized as a literal, yet it recognizes the first query from the list.
Thanks again!
|
|
|
|
|
Hey everyone,
I want to prepare an equalizer for a little project of mine. I did some googling but all I found was preparing an equalizer was completely about DSP. I am trying to find some useful books about DSP, but in the meantime, does anyone have a useful resource? Or can anyone point me in the right direction?
Any help would be greatly appreciated!
Thank you.
|
|
|
|
|
Hello,
First of all, here on Codeproject there are few articles that could help you. Look for keywords like FFT, Guitar tune. They actually cover most of things you want to know about when writing one, at least, basics.
Getting ready to use code that will do discrete fourier transform for you isn't hard, and that's actually most of DSP you actually will need.
As for more specific algorithms, chapter 12 of this book would be good start I guess.
Hope those general ideas were helpful at least a bit.
|
|
|
|
|
Thank you, Ravadre!
I will take a look at the articles and the book you suggested.Thanks again!
|
|
|
|
|
hi dude ,
Can you help me in getting Equalizer Sample code in MFC pls , i want it as soon as possible.
thanks
ellappan
|
|
|
|
|
How would I fix this problem I am having?
I am reading datetime values from a database.
DateTime timeIn = DateTime.Parse(myReader["TimeIn"].ToString());
DateTime timeOut = DateTime.Parse(myReader["TimeOut"].ToString());
TimeSpan timeHere = timeOut.Subtract(timeIn);
Now this code works perfectly except for dealing with midnight.
If the person is here at 1:30PM and leaves at lets say 12:04AM, then how do I calulate that? It returns an hour of -13?
The time is entered at 00:04 when put in the datebase (It doesn't let you enter 24:04)
|
|
|
|
|
Is there an actual date associated with the value, or is it strictly time only?
If it is time only, this explains why you're getting a negative value... A simple workaround may be to simply add 24 hours to your result if timeHere is negative, as you can hopefully assume nobody's time traveling and clocking out before they clock in.
|
|
|
|
|
LOL. It is just time only.
So if timeOut.Hour == 0 then I use it to add 24 hours to it then do the subtraction right
|
|
|
|
|
Well, except then you'll get someone poor sod who works until 1am who blows that assumption up.
I think you can do something like
if (timeHere < TimeSpan.Zero)
timeHere += TimeSpan.FromDays(1);
I think this should work, as long as nobody is working longer than 24 hours shifts.
I don't have a compiler in front of me, so you may want to try a few values in that and make sure it works as expected, though.
|
|
|
|
|
Ok I did
timeOut = timeOut.AddHours(24);
then completed it.. It works, thanks!
|
|
|
|
|
Happy to be of assistance.
|
|
|
|
|
Well, until there's one guy who stayed for longer than 1 day there...
|
|
|
|
|
In military time, 00:04 is 12:04AM. There is no such thing as 24:04 in military time; military time starts at 0000 (midnight).
If you are subtracting 1:30PM from 12:04AM for the same date, you should get a timespan result of -13:26.
|
|
|
|