|
hello everyone..
please help me about this.
I have an application that requires cv loader... For example, I have a resume (in any format, txt or doc file), then when I upload it using c# or in any language and i need to get the name, address and contact number of the person that will be saved in an oracle database...
Is there someone who can give me some hint in creating this functionality
thanks in advance.
jyn
|
|
|
|
|
There's no foolproof way to accomplish this, but I'd suggest that you take a look at using IFilter . There are a couple of decent articles here on CP that will help.
|
|
|
|
|
thanks for your reply...
i'll try it.
jyn
|
|
|
|
|
Please don't cross post. If your question isn't language specific, you should not post it in the language specific forums.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have four select statement in 1 stored procedure, I will use it for 4 different dropdownlist.
SqlDataAdapter sqlda = new SqlDataAdapter("populatelist_sp", osql);
sqlda.Fill(DS);
<code>Cache.Add("listTables", DS, null, DateTime.Now.AddMinutes(60), TimeSpan.Zero, System.Web.Caching.CacheItemPriority.Normal, null);</code>
DropDownList1.DataSource = DS;
DropDownList1.DataBind();
The PROBLEM: When I used the cache object to populate another dropdownlist it gives me error "Object reference" meaning the value in the cache object is NULL. Out of 10 run I encounter 8 times.
if (DropDownList2.Items.Count == 0)
{
DataSet localDS = new DataSet();
localDS = (DataSet)Cache["listTables"];
DataView dv = new DataView(localDS.Tables[1]); --- Failed on this part
DropDownList2.DataSource = dv;
DropDownList2.DataBind();
}
Is there any settings that I need to do to retain the value inside the cache object?
GAIN: Instead of 4 roundtrip to the database in getting the value of the dropdownlist I only used 1 connection and the rest is Caching dependent.
Regards
Dabsukol
|
|
|
|
|
dabuskol wrote: localDS = (DataSet)Cache["listTables"];
You have not checked if the cache is still valid.
dabuskol wrote: DataView dv = new DataView(localDS.Tables[1]); --- Failed on this part
Are you sure the dataset have at least 2 tables, on every call?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Definitely yes, before assigning it to cache the Dataset (DS) has four tables, after assigning to cache object I can still see the 4 tables. But only after pressing the 2nd dropdownlist with postback where data should come from cache object instead of database the value of cache is null.
Dabsukol
|
|
|
|
|
That is quite interesting. You not running out of memory for caching perhaps?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Nop. I just change the CACHE to ViewState Object and it work.
Though I believe Viewstate is not the solution since I have 10 dropdownlist in every page. Viewstate will make my page heavy becuase of the encrypted data.
I tried to search the Net and I can't find any solution to this problem
Dabsukol
|
|
|
|
|
It's normal for contents to get removed from the cache. When you get the value from the cache you have to check if you get a null reference back.
If the cache grows too much, it will naturally remove large objects first. Perhaps your objects will stay longer in the cache if you store the tables as four separate cache objects.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks for all the help.
After so many trials and isolation, the only problem I believe that is missing why the data on the CACHE object is missing si the declaration of the namespace of CACHE.
using System.Web.Caching --- After including it in my code. it works perfect.
Dabsukol
|
|
|
|
|
Hello,
I'm looking for a way to solve follwing type of problem (this is a simplified example) in a C# environment
Lets say I have a booking tool for multiple medias.
I have one method:
- addBooking()
Two media types:
- Radio
- Web
I would like to have additional logic in my addBooking method depending the media type; that means:
addBooking() does the same functionality,but , if I have radio I want to add special discount and if I have web I want to edit some other booking.
I read about "software extension" which is, I think, what I need. How can I implement that? I thought of some kind of listener after my addBooking() which checks the media type and calls the right method depending the type.
Thanks for any ideas!
|
|
|
|
|
I would use an abstract class which implemented the base method, e.g.
public abstract MediaBase
{
public virtual void AddBooking()
{
}
} Then, inherit from this class, e.g.
public Radio : MediaBase
{
}
public Web : MediaBase
{
public overrides void AddBooking()
{
base.AddBooking();
}
}
|
|
|
|
|
That's a good and simple idea.
The only thing is that I need to instanciate either a Radio or Web object in the application.
I would like to call mediaBase.AddBooking() and that's it. Then, from an external controler, acting like a listener, run the custom code depending of the media type (media type is a static configuration at application launch).
|
|
|
|
|
OK - this sounds like a case for using the Inversion of Control and Dependency Injection patterns. This sounds like an ideal candidate.
|
|
|
|
|
Took a look at it, that's a good solution, thanks for help!
|
|
|
|
|
|
If I create a program in c# with multiple threads,
does the OS automatically spread them over the available cores?
Or is the app just divided in some time slices on a single core?
|
|
|
|
|
Yes, If you create and execute multiple threads, the OS will run each thread on whatever CPU it thinks will give the best performance to that thread.
Simon
|
|
|
|
|
Hello,
Could someone tell me if its possible to create a OLE Server using C#? I want to be able to insert documents from the C# into other applications using the "Insert Object" method.
Many Thanks
|
|
|
|
|
|
I have a regular System.Windows.Forms.ComboBox. This control listens to OnDrawItem(DrawItemEventArgs ea) events. How can I programmatically generate this event for an arbitrary item in the ComboBox? Thanks for any help.
|
|
|
|
|
arnold_w wrote: I have a regular System.Windows.Forms.ComboBox. This control listens to OnDrawItem(DrawItemEventArgs ea) events.
I think you have misunderstood events. The combo box triggers DrawItem events. Your code listens to them.
You can attach a listener using the += construct, like this
private void CreateComboBox()
{
ComboBox cbox = new ComboBox();
this.Controls.Add(cbox);
cbox.DrawItem += new DrawItemEventHandler(cbox_DrawItem);
}
void cbox_DrawItem(object sender, DrawItemEventArgs e)
{
}
Be careful not to attach listeners multiple times. Once attached, the listener will continue to respond to the event every time it is triggered until you detach it, or the object is destroyed.
Simon
|
|
|
|
|
Thanks for your reply. Ooops, sorry. Of course, you are correct. I shouldn't write posts early in the morning What I mean is that I have inherited the ComboBox and have overridden the OnDrawItem method:
public SpecialComboBox() : ComboBox
{
protected override void OnDrawItem(DrawItemEventArgs ea)
{
}
}
I want the OnDrawItem to be executed at my request. Of course, I can simply call the OnDrawItem method, but if I do I don't know how to determine the DrawItemEventArgs argument. Therefore, I would like to make it be executed "automatically". Is there something I can do, for example, to invalidate the control, call Refresh on the control, etc to force this event to be generated?
|
|
|
|
|
You need to set combobox.DrawMode = DrawMode.OwnerDrawFixed
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|