|
Are you actually going to build the system or be the business contract to the builder of the system.
I fear it is the former - attempting to build this solution with no prior knowledge of applications design is going to be very difficult.
I don't want to discourage you, no thats a lie, hire a professional to do the job, work closely with that person in the knowledge that you will be supporting the finished app and learn as much as possible. This will achieve few things, your company may get a good solution, you may get to learn about application sdesign and development, your copany will benifit from having a knowledgable support person in place.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi to all,
=) thanks for all ya advice. i'm very glad that you guys reply me and gave me some good advice.=) i'm new to the corporate world just step into the REAL IT world.haha thanks hope to hear from u guys again
Warm Regards
Veon
|
|
|
|
|
Hello All,
I'm writing about an error that many people have reported, but one for which I have seen no fix.
When using ocr on a full image, the text within the image returns fine, after thumbnailing, if the thumbnail is too small(not so small that the text is in any way cut or distorted though), you get the ocr running error. Has anyone punched through on this? I'm a little tired of processing an image that's several times larger than I need just to avoid this error.
Thanks in advance.
|
|
|
|
|
I'm sorry, are you even on the right website ? Were you hoping to post on a website dedicated to some sort of OCR component ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
The limitations of the OCR library you're using would probably be better discussed on a forum dedicated to that library. Since you didn't mention which one that was, all we can do is point you at Google.
|
|
|
|
|
There's a few OCR articles on CP. I can't imagine any will work as well as a commercial library, the task being as complex as it is. I assume the OP thought that everyone who posts answers on CP, knows everything there is to know about all the articles on the site.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have a service loader process which, unsuprisingly, loads services in a different AppDomain (according to a configuration and such).
Now my problem is, one the service throw an exception (in a System.Threading.Timer.Tick event) and it stops the process!
I was expecting only the AppDomain to die.
Can someone explain to me what can I do?
I.e. how to make sure an exception is not going to shut down my whole application but only a single AppDomain.
Note: I know for reasonably sure the error is not some nasty native memory corruption, as, it is a simple SqlException
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
.NET 2.0 onwards, an unhandled exception in a thread will terminate the whole process not just the AppDomain . If you want to get notified when unhandled exception occurs in a AppDomain , you can use AppDomain.UnhandledException event. However, this is good for logging the exception, but you can't prevent the application from closing.
A usual practice when working with threads is to wrap the thread entry point inside try/catch. This way, you can prevent application from terminating.
|
|
|
|
|
Thanks for this confirmation Navaneeth.
I'll ... have to do something!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
how could I make double (key events) In C# programming language
I mean
when the user click(press) on the keyboard (a && b)together (maybe 3 or 4 keyevents)
how could I respond to all of them
plz help..
modified on Monday, August 3, 2009 4:19 AM
|
|
|
|
|
You mean when a key was pressed twice ? You'd have to keep track of the last key pressed, and if the same key is pressed again, it was pressed twice.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
"how can I make double"
double d = 0.0;
"how can I make key event": you don't, the system.
however, the event handler can be called twice.
let's say it's a WinForm control, you can write
protected override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyUp(e);
base.OnKeyUp(e); // called it a second time to fire the event twice
}
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Have a rolling list of keypress results. You need to trap evey keypress in your app.
To track the last #n keys add a new key ot a List<>, check the pattern of the last 5 and remove the 6th from the list.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I need to create the private instance variable savingsBalance, which includes the amount the saver has on deposit, and the saver's first and last name.
|
|
|
|
|
You can use a class, struct or 3 variables/properties declared private .
private class SavingsBalance()
{
public string FirstName {get; set;}
}
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Wait a minute, aren't you creating a class and not a variable?
|
|
|
|
|
Sure, that example - you can create a private class inside another class. Or use 3 private variables or use a struct.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
He seems below to be saying he wants to store a string that contains the name and the balance. He actually had the code to do that posted.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I think you need to talk to your teacher. It sounds like you're struggling with some real basics.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
This might just be poor wording on part of the writer, but what does this mean:
"Each object of the class contains a private instance variable savingsBalance, indicating the amount the saver has on deposit along with the account holder's first and last names."
Is the private instance variable this:
static private object savingsBalance = firstName + " " + lastName + "has $" + amount;
And what does "each object of the class" mean? Isn't every single keyword an object?
Edit:
He wants me to calculate stuff with savingsBalance but I do not think I am able to do that with an object that includes a string with a word like "has"
modified on Sunday, August 2, 2009 5:44 PM
|
|
|
|
|
I think he means "each instance of the class". But that's just a guess.
And the fact that he said it was a private instance variable means it is NOT a static .
|
|
|
|
|
Nathan Revka wrote: He wants me to calculate stuff with savingsBalance but I do not think I am able to do that with an object that includes a string
This makes your teacher a bit dumb, IMO, but you can convert a string into a number using decimal.TryParse, or int.TryParse, depending on what type you want. You can also use the decimal.Parse or even Convert.ToInt32, etc, but the tryparse will not blow up if the string does not contain a number.
Of course, if amount is a number, then that's all you would use to calculate with. Storing the savingsBalance as a string, seems odd to me, the balance is the number, the rest is the account name. The string might be rendered by a helper method, but surely amount is also being stored somewhere ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hello everybody,
i'm going to begin a project that need the following :
Requirement Analysis & Definition --> 5 days
System & Software Design --> 18 days
Implementation & Unit Testing --> 77 days
Integration & System Testing --> undetermined
Operations & Maintenance --> undetermined
could anybody advice or give me an estimation or hint how much should i ask as for a logical price.
thank you so much for your usual coordination
|
|
|
|
|
michael_jhons wrote: could anybody advice or give me an estimation or hint how much should i ask as for a logical price.
This is no C# question.
There is Sales/Marketing [^]forum in CP.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello again. I've painted myself into a corner once more - this time with a different colour of paint!
I am trying to understand how to use XmlAttributeOverrides() to control the deserialisation of an XML file, but I can't seem to figure out how to tell it what I want to do. I have created a running example.
Using this XML:
<?xml version="1.0" encoding="utf-8"?>
<orchestra>
<bloweythingy name="flute" reed="false"/>
<bloweythingy name="oboe" reed="true"/>
<hitythingy name="tympani" keys="false"/>
<hitythingy name="piano" keys="true"/>
</orchestra>
I would like to create an Orchestra object that contains 2 objects of class Woodwind (representing the contents of the bloweything elements) and 2 of class Percussion (representing hitythingy content). Both Woodwind and Percussion are derived from class Instrument .
Additionally, I would like to do this without decorating the classes with [XmlElement] attributes so that, later on, I will be able to programatically add new Instrument types. To do this, I created a "registry" to which the code will be able to add an XML tag name and the class to be used to represent the data in that tag. Eventually, the registry will cache the XmlSerializer objects to be used with each tag... but for now the serialisers are created on the fly.
Here is the code to try and do this:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace Deserialising
{
class ExampleA
{
static void Main(string[] args)
{
XmlSerializer iniSerializer = new XmlSerializer(typeof(Orchestra));
TextReader iniReader = new StreamReader("C:\\Temp\\ExampleOrchestra.xml");
try
{
Orchestra DuchyOfGrandFenwickPhilharmonic = (Orchestra)iniSerializer.Deserialize(iniReader);
}
catch (Exception ex)
{
while (ex != null)
{
Console.WriteLine(ex.Message);
ex = ex.InnerException;
}
Console.ReadKey();
}
iniReader.Close();
}
}
[XmlRoot("orchestra")]
public class Orchestra : IXmlSerializable
{
private Dictionary<string, Type> RegisteredElements;
private XmlAttributeOverrides instrumentXmlOverrides;
public Orchestra()
{
this.RegisteredElements = new Dictionary<string, Type>();
this.Compliment = new List<Instrument>();
RegisteredElements.Add("bloweythingy", typeof(Woodwind));
RegisteredElements.Add("hitythingy", typeof(Percussion));
instrumentXmlOverrides = new XmlAttributeOverrides();
foreach (KeyValuePair<string, Type> kvp in RegisteredElements)
{
XmlElementAttribute xea = new XmlElementAttribute(kvp.Key, kvp.Value);
XmlAttributes xa = new XmlAttributes();
xa.XmlElements.Add(xea);
instrumentXmlOverrides.Add(typeof(Instrument), kvp.Value.Name, xa);
}
}
public List<Instrument> Compliment { get; set; }
#region IXmlSerializable methods
public XmlSchema GetSchema() { return null; }
public void ReadXml(XmlReader reader)
{
reader.ReadStartElement();
while (reader.NodeType != XmlNodeType.EndElement)
{
XmlSerializer ts = new XmlSerializer(typeof(Instrument), instrumentXmlOverrides);
this.Compliment.Add((Instrument)(ts.Deserialize(reader)));
}
reader.ReadEndElement();
}
public void WriteXml(XmlWriter writer) { }
#endregion
}
public class Instrument
{
[XmlAttribute("name")]
public string Name { get; set; }
}
public class Woodwind : Instrument
{
[XmlAttribute("reed")]
public bool hasReed { get; set; }
}
public class Percussion : Instrument
{
[XmlAttribute("keys")]
public bool hasKeys { get; set; }
}
}
I have tried all combinations of variations A, B and C with subvariations 1 and 2... but to no avail. I keep being told that bloweything is not expected or that the root element is missing. The combination that is uncommented above (A and 1) is the one that I (IMHO) think should work. The following annotations are intended to show what I thought the code would do:
<small>when kvp = {"bloweything", typeof(Woodwind)}:</small>
XmlElementAttribute xea = new XmlElementAttribute(kvp.Key, kvp.Value);
<small>= associate <bloweything> tags with Woodwind classes</small>
XmlAttributes xa = new XmlAttributes();
xa.XmlElements.Add(xea);
<small>= we now have a new rule: <bloweythingy> becomes Woodwind (deserialising) and Woodwinds are written as <bloweythingy> (serialising)</small>
instrumentXmlOverrides.Add(typeof(Instrument), kvp.Value.Name, xa);
<small>= when told to deserialise an Instrument [parm 1], if you run across a <bloweythingy> tag [parm2] apply the rules in xa (deserialise the <bloweythingy> tags into Woodwinds) [parm 3]</small>
...
<small>when reader.Name = "bloweythingy":</small>
XmlSerializer ts = new XmlSerializer(typeof(Instrument), instrumentXmlOverrides);
<small>= I'm telling you to deserialise an Instrument using the above stated rules, so you should turn the <bloweythingy> into a Woodwind</small>
this.Compliment.Add((Instrument)(ts.Deserialize(reader)));
<small>= @#$%# - WHY WON'T .NET LISTEN TO ME?!?!? I HATE COMPUTERS</small>
Any help would be appreciated. Thanks.
Clive Pottinger
Victoria, BC
|
|
|
|