|
|
That's the first time anyone's used that on me!
But, I did find it on my own after I posted, thanks.
|
|
|
|
|
Alaric_ wrote: [Even though you probably shouldn't be WANTING to use reserved keywords as member names]
Correct. The functionality is only provided because CLR libraries are cross language, and reserved words vary between them. Anyone creating a library that used a C#/VB/etc reserved word for a member name should be shot, but since anyone can write a CLR compiler for their favorite language, anything potentially could be a keyword in something.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
dan neely wrote: Anyone creating a library that used a C#/VB/etc reserved word for a member name should be shot
C# keywords shouldn't be used in libraries (after all, they're lower case, and public members are supposed to be upper case).
But VB?
Are you sure you've never used one of:
'Erase', 'Error', 'Friend', 'Module', 'Option', 'Resume', 'Select', 'Step', 'Stop', 'Variant'
?
In the .NET BCL itself, there are multiple classes with a 'Stop' method; and there's "Thread.Resume". Oh, and one of the most important LINQ methods is called 'Select'.
|
|
|
|
|
Possibly excepting a local/temp var I don't think so. Intellisense means there's no excuse for not using verbose variable names.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
As Ennis said, it's a valid character in a member name. It looks like it's either going to be a method that returns something or a property or a public field in your addUserResponse class.
|
|
|
|
|
If you want to use a reserved word as a keyword, you add the @ symbol before it. It's a practice I would strongly discourage because it's plain confusing.
|
|
|
|
|
Pete O'Hanlon wrote: If you want to use a reserved word as a keyword, you add the @ symbol before it. It's a practice I would strongly discourage because it's plain confusing.
Yeah...Ennis' response kind of blew some dust off of the filing cabinet in my head. But, granted, I didn't write the code in question: A [now former due to our recent purging of contractors]colleague did.
/*This code was generated by a tool. ...His name is Dave.*/
|
|
|
|
|
|
Stop it right now. Don't post another one of these. They're all going to get tagged as spam. Advertising for another site in the forums is highly frowned upon. Buy advertising space like everyone else.
|
|
|
|
|
Sorry I was not aware of this. I have nothing to do with site. Just added assuming that It may be useful for other members.
My Apologies, Give me some time I will delete my post
|
|
|
|
|
Your site promotes no learning, and you're advertising on a board where people help others to make code for free, whereas you want to whore out your code preventing others from learning.
Yeah, you assumed wrong.
|
|
|
|
|
Don't lie on top of it...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
how can a tune sung by a user (humming) be compared with the songs in the database & produce similar results??
since the pitch of man & woman varies widely, how can the results can be made accurate?
|
|
|
|
|
sorry but this is NOT an audio analysis forum
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Although off-topic, it's a very interesting question. Some high-level ideas:
1. Since the singer's key can vary, you need to transpose all melodies to a common base key. E.g. if you transpose the first note to C for every melody, you can find matches even if the singer is singing in another key.
2. A voice isn't a pure tone. All instruments (except synthesizers using a single oscillator) have harmonics (frequencies higher than the lowest). Fourier analysis will allow you to isolate the different frequency components. Ignore all but the lowest for simplicity.
3. Voices aren't exactly in tune. You will have to round each frequency to the nearest musical tone. The standard is 440 cycles per second for an 'A'. Consecutive chromatic tones have a ratio of 1 : the 12th root of 2. Thus, when you go through the 12 tones of an octave, you get (the 12th root of 2) to the 12th power = 2. So a note an octave higher has twice the frequency of the lower note.
4. The rhythm is also going to be off for a human's performance, so you will need to adjust the lengths of each note with respect to a selected granularity. E.g. round the length of each note to the nearest eighth note.
5. This will "standardize" a melody hummed into an A-to-D converter, allowing you to compare it with the melodies in the database. Of course people will make errors, so if there's no exact match, you need some kind of error metric to find the closest match in your database.
|
|
|
|
|
HI,
have any of you worked with Casswory linear programming.IF yes pleasse do mail me back.have some query with the implementation
|
|
|
|
|
|
thanks. i have implemented the code with my test program.But i m not able to get a optimal solution.so thought to ask in this forum
|
|
|
|
|
Hello,
How can I cut a file in a specific directory and put it in another directory? thank you very much.
|
|
|
|
|
You can use classes in System.IO namespace
|
|
|
|
|
System.IO.File.Move("oldFileName", "newFileName");
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Hello,
I have two C# Applications one client side, one server side, which communicate via a web service that I am creating also. I wanted to create a class library so that classes that are used between the three applications can be re-used. I want to allow one of the webmethods in the web service to accept an object of one of the classes I have created in the class library but when I try and pass it from either application it says I can't because the types are different.
ABSWebService.Market doesn't equal ABSClassLibrary.Market (Event though in the web service it is referencing the Class Library to get the Market).
I have tried to cast it to the other type, but this isn't allowed either.
Any suggestions?
|
|
|
|
|
If you are using a WCF Service, when you add the service reference there is a setting for "Re-use classes in referenced assemblies".
If you're using old-fashioned web methods I think you're S.O.L.
|
|
|
|
|
Well I have only just started creating this, so I was using Web Services as that is what I know. But if it will work with WCF I will try that instead.
Just to add to the complexity the class library needs to be able to access another external web service that isn't mine, and all the applications need to create and pass objects of this web service type. Should I just forget Class Libraries?
|
|
|
|