I don't know of any implementations that can scrape this.
Can anyone help, I am getting an object reference error in my code. All I am doing is adding two tables to one table, the tables that are being added are Genealogy Table and Relationship Table to Details Table.
The error is below:
An object reference is required for the non-static field, method, or property 'MvcGenealogy.Models.GRHolding.GetDetailID(System.Web.HttpContextBase)'
The error is part of a holding model, the code that is causing the error is below:
publicstatic GRHolding GetDetail(HttpContextBase context)
var detail = new GRHolding();
detail.GRHoldingID = GRHolding.GetDetailID(context);
It references the GetDetailID, the code is below and come from the same Model.GRHolding:
publicstring GetDetailID(HttpContextBase context)
if (context.Session[DetailsSessionKey] == null)
context.Session[DetailsSessionKey] = context.User.Identity.Name;
// Generate a new random GUID using System.Guid class
Guid tempDetailsID = Guid.NewGuid();
// Send tempDetailsID back to client as a cookie
context.Session[DetailsSessionKey] = tempDetailsID.ToString();
I do have a Session in my Model call DetailsSessionKey which is a string and identifies with the DetailsID. The code that declares this is here:
I think the problem is in my session because the error is with this line of code "detail.GRHoldingID = GRHolding.GetDetailID(context);", which under the GetDetail in my GRHolding.cs model. It is not converting it to a string properly. I think it is something minor in the session, can anyone help? All I am to doing is associating two tables, (Genealogy table and Relationship table), with one table, (Details table).
Ehm, that's actually beginner's stuff, isn't it?
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);
if (int.TryParse(strID, out id))
detail.GRHoldingID = id;
// how do you want to handle this error case?
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.
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.
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.
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 email@example.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.
I am using the following code to lop through contracts and send email to concern people. Same contract will have multiple people like a hardware contract should have IT and purchase emails in it. I am able to get the emails but the problem if there are two emails in the contract (john & smith) it will send two emails to john and two emails to smith.
John will receive the email saying Dear John and anther email saying Dear Smith.. similarly with Smith!
It would be the names of the classes that you use most often. Which classes those are probably going to depend on the projects and the types of projects you have worked on.
You can lead a developer to CodeProject, but you can't make them think.
The Theory of Gravity was invented for the sole purpose of distracting you from investigating the scientific fact that the Earth sucks.
Most people don't "like" the class. It's not interesting which is better, what is interesting is whether the *interviewer* would ask why I choose the class. Chances are, the question never comes.
staticvoid Main(string args)
string s = null;
Console.WriteLine((string)s); // default
Console.WriteLine("" + s); // only if you'd rather go back to VB6
Console.WriteLine(Convert.ToString(s)); // obvious
//Console.WriteLine(s.ToString()); // would explode
Now, an object that can contain null would not be casted to an Int - most people would parse it (and ignore any conversion errors). If prefer to convert it all if there's a lot of different types after another that need to be assigned. Otherwise, I go for casting.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
Dunno, I did not measure them - just the first five non-structs that popped into my head. A string is still a pointer to an array of bytes to me. Nothing fancy, just an address. Outside of that, it's a shame Interfaces were not included, it would have made the answer much more interesting.
Given inheritance, I'd say I use a LOT of Object
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]