|
Hi OriginalGriff,
I did check out the GetDetail, that was okay, I changed the GetDetailID to static and now I am getting a another compiler error in the return.
The error is as follows Cannot implicitly convert type 'string' to 'int'".
Now I have the DetailID declared as a string in GRHolding.cs Model, and my in my sql table, Details, DetailID is a int. The code causing the error is as follows:
return context.Session[DetailsSessionKey].ToString();
My declaration value is
public const string DetailsSessionKey = "DetailsID";
Changing the GetDetailID to "static" seems to have solved the original compiler error and created another. It seems to be an error with the conversion of a string to an int on a return value.
Do you have any ideas, it would be appreciated.
Regards
Anthony
|
|
|
|
|
Either your GetDetailID method needs to be static , or the GetDetailID method call needs to be made against an instance of the GRHolding class.
So, either:
public static string GetDetailID(HttpContextBase context)
{
...
}
or:
var detail = new GRHolding();
detail.GRHoldingID = detail.GetDetailID(context);
return detail;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
I Changed the to Static GetDetailID, I am now getting a compiler error.
The error is "Cannot implicitly convert type 'string' to 'int'"
Now I have the DetailID declared as a string in GRHolding.cs Model, and my in my sql table, Details, DetailID is a int. The code causing the error is as follows:
return context.Session[DetailsSessionKey].ToString();
My declaration value is
public const string DetailsSessionKey = "DetailsID";
I thank you very much for the help with original compiler error, that seems to solve compiler error, but now I have another problem with the conversion of a string to an int on a return value.
Do you have any ideas, it would be appreciated.
Regards
Anthony
|
|
|
|
|
Ehm, that's actually beginner's stuff, isn't it?
Look:
detail.GRHoldingID = detail.GetDetailID(context);
assigns the return value of the GRHoldingID function to the GRHoldingID property.
From the code snippet you showed us, we can see that GRHoldingID returns a string.
From the error message, we can conclude that the GRHoldingID property is an integer.
Since we do not have more information about that class and its business rules, we cannot provide a "correct" solution safely.
You might change the GRHoldingID property to a string, or you might try to get an integer value from the string, i.e.
string strID = detail.GetDetailID(context);
int id;
if (int.TryParse(strID, out id))
{
detail.GRHoldingID = id;
}
else
{
}
|
|
|
|
|
Hi. I want to develop an application that recognizes the language. This app will listen to (capture sound from the microphone) the speech, and if it detects a specific language (Armenian), the application will show the message "The Armenian language is found." The app will work with only one language, and only discover it.
How realize it? How to teach this application to detect the language?
|
|
|
|
|
With the state of speech recognition as it stands right now, this is next to impossible. There are too many things that affect the quality of speech recognition that throwing in another uncertainty would not help. Suppose that I was to use the Geordie phrase (it's an English regional dialect) of "Why aaz a ganning hyem". What language would it identify? I still speak English, but in this case, it would determine that I'm speaking Danish which has a similar phrase.
|
|
|
|
|
Impoossible(((
Thank you
|
|
|
|
|
Nothing is impossible. Very hard possibly, but not impossible.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Pete O'Hanlon wrote: "Why aaz a ganning hyem" Thanks for asking, mine's a pint of dog.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
+5 just for getting the drink right.
|
|
|
|
|
Still one of my favourite beers, there's a cold one in the fridge for supper
It goes down very well with Tarka masala - which is like Tikka Masala except it's 'Otter - boom boom!
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
modified 26-Aug-14 10:47am.
|
|
|
|
|
Pete O'Hanlon wrote: I'm speaking Danish which has a similar phrase.
A few more, via Google translate, mostly Norwegian:
English | Geordie | Norwgeian |
---|
Jumper | Ganzie | Gensere | Baby | Bairn | Barn | Stool* | Cracket | Krakk | Flea | Lop | Loppe | Go | Gan | gå | Pig | Gissie | Gris | Cloth | Cloot | Klut | Cow | Coo | Ku | Sparrow | Spuggie | Spurv |
I rmember Melvyn Bragg (in "The Adventure of English"? ) going on about parts of the Cumbrian dialect being mutually intelligible with modern Norwegian.
* as in foot- not -sample, for those unluck enough to be born outside the people's republic.
Alberto Brandolini: The amount of energy necessary to refute bullshit is an order of magnitude bigger than to produce it.
|
|
|
|
|
Eddie Izzard did a program fro Discovery a few years ago called "Mongrel Nation" where he had an intelligible conversation with a Frisian farmer from Nothern Netherlands
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Your best bet would be to start up approx. 250 processes - one for each language and pass the audio input to each one in parallel. After a set time, any that haven't recognised the language should shut down - eventually you will get to your required language.
|
|
|
|
|
Or, he'll get to several possible matches or, none.
|
|
|
|
|
Yes - but these too are valid.
What I'm trying to hint at is that this is a parallelisable problem...
|
|
|
|
|
Given his stated aim that the app will work with only one language, then returning multiple potential positives fails to satisfy the request.
|
|
|
|
|
In that case I guess loading a set of very likely words or phrases and waiting for them should work?
"My voice is my passport, identify me" should work
|
|
|
|
|
|
Ditto 
|
|
|
|
|
frech87 wrote: How to teach this application to detect the language?
Your question is too open ended. If you want to recognize all Armenian speakers and exclude every other possible language spoken in the world then as stated it is impossible. Probably be impossible even if the technology was up to it because there would be no way to test it.
Conversely if you want it to recognize Armenian when you speak it and maybe two friends and then be able to exclude French that you or someone else speaks and you limit it to some test phrases then it is a much more reasonable task and one that is quite doable.
Basic steps for the last
- Learn how to take audio samples (coding problem)
- Learn some basics of language phonics. This is not a coding problem and although a bit esoteric their are people who study it and post their findings.
- Learn how to capture the phonics from your audio samples.
- Put the above two together to differentiate a sample of Armenian from a sample of French.
AFTER you have done the above then you would have enough knowledge to make a stab at adding a teaching part to the application.
|
|
|
|
|
I am using AlternateViews to send plain text and html emails. I've found that if I add the HTML view first, then when sending the email as a SMS message, it doesn't pick up the plain text view. If I add the plain text view first, then the SMS message appears correct.
All I would like to know is if the order of adding the AlternateViews to the MailMessage object matters if you are sending an email as a SMS message? I can't find anything online that suggests it would so I am still looking for some confirmation.
Thanks,
Greg
modified 28-Nov-21 21:01pm.
|
|
|
|
|
Ummm...emails have nothing to do with SMS at all. SMS doesn't support "Alternate views" like an actual email client app would.
When you send an "email" to a phone, you're sending it to a Email to SMS gateway that translates the body text into a SMS message and sends that. I haven't heard of a single gateway that supports "alternate views" let alone HTML.
|
|
|
|
|
So, maybe I wasn't clear. When you send an email to an address like 8001234567@vtext.com, it appears as a text message on that mobile device. That is what I meant. In order to do that, you have create a plain text view and attach it to the MailMessage object so that the phone knows how to interpret the message. Each phone carrier has an email address that you can send an email to by using the phone number and the domain specifically assigned to that carrier. vtext.com is specific to Verizon.
modified 28-Nov-21 21:01pm.
|
|
|
|
|
Yes, that's what I was talking about. "vtext.com" is the email-to-SMS gateway which does not support alternate views.
|
|
|
|