.net

Programmatically Extract PDF Tables

Hi All, I have a bunch of PDF docs with tabular data in them which I need to extract into a more readable format to store in a spreadsheet, database or whatever. Is there anything out in the world (preferablly free) that is able to get tabluar data out of PDFs into a more readable format in bulk either natively integrated with an app o...

How to process custom certificates in HTTPS?

I am trying to fetch a page using HttpWebRequest, but I am getting this exception: Could not establish trust relationship for the SSL/TLS secure channel. Is it possible to specify a custom RemoteCertificateValidationCallback for a particular instance of HttpWebRequest? (I cannot use ServicePointManager.ServerCertificateValidationCall...

Usefulness of System.Diagnostics.Contracts in question

I've been playing with the new System.Diagnostics.Contracts class because it seemed very useful at first. Static methods to check inbound arguments, return values, etc. It was a clean interface and could replace lots of if-then statements and internally built library tools. However, it seems less than useful in most runtime situations. ...

Generating Runtime code(structs,classes) in C#

Hello, I need to generate structs and classes at run time in C#(might be in CLI) managed environment. Suppose I have all data and all data types associated with those data memebers of some class/struct. Now I need to generate structs/classes at runtime and after that I need to map data inside those runtime created structs fields. e.g I...

beginner:source files vs binary files: what's the purpose of providing both?

here http://www.codeproject.com/KB/database/CsvReader.aspx they are offering both source and binary files. if i am a programmer who needs to use the files, why should they be providing me with both? why not just give me the source and i will compile it? ...

Help - trying to marshall c++ char* to a .NET callback function...

Hello, i have a c++ dll that contains a function called DoIt : int WINAPI DoIt() { SetCallback(pCallbackFunc); LPSTR pRet = (LPSTR) LocalAlloc(LPTR, 1024); memset(pRet, 0, 1024); g_CALLBACK(pRet); MessageBoxA(0,(LPSTR)pRet,"response",MB_ICONEXCLAMATION); LocalFree(pRet); return 1; } as you can see, this func...

How do I gracefully handle hibernate/sleep modes in a winforms application?

I am writing a windows form application in .net using C#. I am running into a problem that if my program is running when the computer goes into the sleep and/or hibernate state (I am not sure at this time which one, or if both, cause the problem), when the machine wakes up again the program just hangs. The only way to exit out of it is...

Help with Hardware ID

I'm using C# and .NET 2.0. My app needs some way to check the different users so I'll use hardware id, but I saw that I can use only: mac address - easily changeable and not everybody have it // NO processor id - using WMI it returns a value for the cpu model, it's not unique // NO motherboard serial - not every motherboard have it // ...

Detecting end of background processes in C# / .NET?

I have a process written in C# which has no forms or output whatsoever. static void Main() { MyBackgroundProcess process = new MyBackgroundProcess(); // begin background process process.Start(); // keep application running in the background, run events Application.Run(); } I need to free up some resources and do o...

How do I use DataContractSerializer to create nodes/elements for a containing XML file?

Say I am persisting some application data to a single XML file and I want to use the DataContractSerializer to create all or most of the elements. So my file might look like: <?xml version="1.0" encoding="utf-8"?> <Settings> <A ... /> <B ... /> </Settings> (A and B are serialized using DCS.) How would I go about writing this fil...

No hope for entry-level sharepoint developers?

Before you say this topic belongs to careeroverflow.com, I've tried searching keyword: sharepoint there and only 2 results came up with that tag! So I've decided to go ahead and ask the question here. I've been going through monster.com for sharepoint developer jobs. Salary seems to be high. I guess that's good. But have you seen the ex...

Quick clarification about when I have to remove handlers in .Net, VB.Net

If I have a class with a couple of event handlers inside of it which are attached to an object that is defined within the class, am I right in thinking that I don't need to implement IDisposable to remove said handlers, even if I explicitly added the handlers myself? Also, can anyone point me in the direction of an article that explains...

What options are available to developers for printing to a dedicated label printer?

Our business uses custom internal software to create shipping labels to be printed on large high-speed label printers. What options are available to developers (libraries, services, full-blown-software, etc.) for assisting in the process of creating a custom-formatted label and sending it to a dedicated label printer? More background...

Update EF 4 Feature CTP 4 Detached POCO

I am trying to update a detached POCO w/ EF 4 CTP 4. My domain class looks like this: public class User { public int Id { get; set; } [Required, DisplayName("First Name")] public string FirstName { get; set; } [Required, DisplayName("Last Name")] public string LastName { get; set; } [ConcurrencyCheckAttribute, Timestamp]...

IPAddress.Any Fail

Hello everybody ::- ). I got into a bit of issues today with the TcpListener. Things are strange. Initially, I used the new TcpListener(port) constructor, but that has been marked as obsolete. So I dropped it and used this instead: IPAddress ipAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0]; IPEndPoint ipLocalEndPoint...

How to access unmanaged data from C#

I have an unmanaged (C/C++) DLL which I need to call from a C# application. The DLL call needs to return data (from a C++ class that is created by the DLL) to the C# application. I have control over the DLL's exported function, so I can create a wrapper around the C++ class if necessary. I know how to access the DLL with p/Invoke, so ...

How can I find an unused port?

I need to create a brain-dead HTTP server that returns 404s for everything on localhost. Specifically, I have a program under an acceptance test harness which calls out to a server, but for testing I want to save time by skipping that unrelated check. I have a way to pass in the URL the program uses as part of the test harness, and the ...

MVVM - How to create columns at runtime for a xamdatagrid?

I have to create a XamDataGrid that shows a dynamic amount of columns for a time frame x to y. Therefore I dont know how many years a user would select to have these columns created upfront. Now usualy within MVVM you would just populate the data through as many Properties as you would need Columns within your XamDataGrid and the latter...

static char * vs #define in C++ VS2005

I have a large program with several large DLL's that are compiled with MFC and /clr. There is a limit of 65535 global FieldRVA entries in an assembly. If it is more the loader raises an exception. I already have Enable String Pooling (/GF). I have alot of code like: static char *pSTRING_ONE = "STRING_ONE"; if I compile witha macro su...

How do I reference Session.Contents form a class?

This is an ASP.NET 2010 web app written in vb. I use several Session variables. I want to pass them all to a central class and let the class manage them. However, I am having some trouble. Here is the code on the calling page: Dim arrGoodSessions() As String ={"nameofsession1", "nameofsession2", "nameofsession3"} Utilities.ManageSessi...