|
Not sure about the source code thing, but PDF metamorphosis is written in C#. Check if that is what you are looking for.
|
|
|
|
|
There are a couple of projects here on CP that looks like they might be helpful to you:
PDF Merge[^]
Simple .NET PDF Merger[^]
Good luck
BTW: Don't ask me how I got the links...
|
|
|
|
|
Hi all,
I need to get cookies which currently in use with one of my browsers (IE8), but IE doesn't log it into cookie text file.
I'm looking for cookies in "C:\Users\username\AppData\Roaming\Microsoft\Windows\Cookies" folder in username@hostname[i].txt file.
And in "C:\Users\username\AppData\Roaming\Microsoft\Windows\Cookies\Low" folder.
How I can do it?
Reading of non-persistent cookies is what I actualy need. Is there any way to do it?
thanks!
modified on Sunday, June 6, 2010 3:01 AM
|
|
|
|
|
This is what I have done to identify the vehicles from a given picture using Emgu CV (StructuringElementEx). Now I want to get the count of these identified vehicles.
If anyone know how to do that, it is a great help to me.
Thank You.
[img]http://i48.tinypic.com/2r2vza1.jpg[/img]
namespace ImagePrjct<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
imageBox2.Image = new Image<Bgr, Byte>(@"C:\Users\Rukshan\Desktop\FYP_Update 2.1\New_Traffic_Pics\E4.jpg");<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
Image<Bgr, Byte> ori = new Image<Bgr, Byte> ( imageBox2.Image.Bitmap);<br />
Image<Gray, Byte> grayscale = ori.Convert<Gray, Byte>();<br />
imageBox1.Image = grayscale;<br />
}<br />
<br />
private void button2_Click(object sender, EventArgs e)<br />
{<br />
Image<Bgr, Byte> ori = new Image<Bgr, Byte> ( imageBox2.Image.Bitmap);<br />
Image<Gray, Byte> grayscale = ori.Convert<Gray, Byte>();<br />
Image<Gray, Byte> thresh = grayscale.ThresholdToZero(new Gray(210));
<br />
StructuringElementEx ex = new StructuringElementEx(8, 8, 1, 1, CV_ELEMENT_SHAPE.CV_SHAPE_RECT);<br />
<br />
thresh._MorphologyEx(ex, CV_MORPH_OP.CV_MOP_OPEN, 1);<br />
<br />
imageBox3.Image = thresh;<br />
}
|
|
|
|
|
I have a project that integrates RichTextBox tips from many articles across the web. Everything from XP Style borders, to WYSIWYG printing.
One thing missing is rendering of page breaks.
I can insert an RTF page break that is visible when loading the resulting rtf file into Word, or similar. However I can't find how to render it inside the RichTextBox.
I would like to render a nice dotted line at that point.
So far my searches have only turned up print rendering articles, which I already have.
Any suggestions or links to appropriate aticles would be welcome.
|
|
|
|
|
This is what I know about the matter, mostly from reading the RTF specification and from experimenting (I did quite some work on tables, perfectly readable in WordPad):
- there are hundreds of RTF commands;
- Word can create RTF documents, and will use a lot of the existing commands;
- WordPad can create RTF documents, and will use only few of the existing commands;
- WordPad can show a lot of RTF stuff it does not let you create interactively;
- RichTextBox shows RTF documents pretty much the same as WordPad does.
- RTF has a \page command
- WordPad shows it as an empty line
From that I would conclude:
- by default RTB hardly renders a page command
- you can of course add whatever text and formatting code you like whenever you also insert a page command; that is after all what Word does when it creates headers and footers for you.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Thanks Luc
I am using the \page command and it works fine when printing or loading into Word, just no visual cue in the RichTextBox. I hadn't realised WordPad did nothing to indicate the page break. If Microsoft left it out of WordPad I don't feel so bad about not implementing it myself.
I guess the simplest solution will be for me to insert a horizontal line in place of any page breaks and replace them with real page breaks on save.
|
|
|
|
|
You're welcome.
The Man from U.N.C.L.E. wrote: insert a horizontal line ... and replace them
That sounds OK. Whatever you want to achieve, it probably can be done, but you'll have to manipulate the RTF string yourself.
FYI: as always, the document Word generates is overly complex; WordPad does a much better job, assuming it allows you to enter what you need. When working with tables, I looked at what Word does, read the RTF specs, and created it all in code, I didn't want hundreds of lines of initialization (and it gets worse in every new Office version).
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
The structure of my listview is:
Select ID Name Age
--------------------------------------------------
Item[0]: checkbox 25 Richard 24
Item[1]: checkbox 26 Tom 20
Item[2]: checkbox 27 Alice 22
......many.....
Now, I want to get the name or age of current item when I make the item checked or unchecked. In other words, when I click a checkbox, I need to know the index of the item. If there is only one checked item, we can use "foreach" to get the index, but there are some already checked items.For example:
Item[0] and Item[1] are checked.
I click the checkbox of Item[2], How can I know what I clicked is Item[2]? (Here is not related to SelectedItem.)
Excuse me,My English is poor.
|
|
|
|
|
You need to handle the ItemCheck event of your ListView .
The event handler skeleton inserted for you by the IDE has an ItemCheckEventArgs which contains, amongst other things, the index of the checked item and its current state (checked/unchecked). You can use this information to decide what to do.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
I second that.
Are we on speed now? you actually beat me to it!
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Luc Pattyn wrote: Are we on speed now?
I do not imbibe noxious substances. Now you'll have to excuse me, I have a beer, a coffee and a cigarette waiting.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
So, no cacao/cocoa on Saturday?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
That's for just before beddie-byes.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
Any last order for cocoa? Now is the time.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
I can't have my cocoa until the nurse has bought me my tablets and she's late.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.
|
|
|
|
|
I'm afraid she broke down, after having to bring you truck loads of beer, coffee and cigarettes all day long. Besides, the local pharmacies have long closed, and you shouldn't expect her to travel all the way to the other side of Wolverhampton, just to buy you some tablets. I suggest you have some more After Eights and call it a day. You can catch up on tablets on Monday.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
|
Problem solved!
I'm so excited!Thank you. This is a good forum!
|
|
|
|
|
hi, I'm using below code for a basic client/server communication. I send a string to server and server sends it back to client with no problem. But I can do this only once and then connection goes, what should I do to be able to send more strings one after other without loosing the connection? Thanks in advance
/// Server Code:
private void button1_Click(object sender, EventArgs e)
{
TcpListener tcpListen = new TcpListener(IPAddress.Parse("192.168.1.6"), 1234);
tcpListen.Start();
Socket socket = tcpListen.AcceptSocket();
if (socket.Connected)
{
while (true)
{
NetworkStream stream = new NetworkStream(socket);
StreamReader streamRead = new StreamReader(stream);
StreamWriter streamWrite = new StreamWriter(stream);
try
{
streamWrite.WriteLine("Incoming message: " + streamRead.ReadLine());
streamWrite.Flush();
}
catch (Exception)
{
label1.Text = "Server is being shutdown";
return;
}
}
}
socket.Close();
}
/// Client Code:
public TcpClient client;
NetworkStream stream;
StreamReader streamRead;
StreamWriter streamWrite;
private void button1_Click(object sender, EventArgs e)
{
try
{
client = new TcpClient("192.168.1.6", 1234);
}
catch (Exception)
{
MessageBox.Show("Not Connected");
}
stream = client.GetStream();
streamRead = new StreamReader(stream);
streamWrite = new StreamWriter(stream);
try
{
streamWrite.WriteLine(textBox1.Text);
streamWrite.Flush();
string line = streamRead.ReadLine();
MessageBox.Show("Message from server: " + line);
}
catch (Exception)
{
MessageBox.Show("Connection error");
}
streamWrite.Close();
streamRead.Close();
stream.Close();
}
|
|
|
|
|
teknolog123 wrote: what should I do to be able to send more strings one after other without loosing the connection?
Dah, How about not closing the socket.
Of course, the connection is lost each time, you told it to do that. Create the connection outside of the button click event and don't close it until necessary.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks but even if I don't close the socket and listener, it throws exception. I've tried many things but no success, I'll go on trying
|
|
|
|
|
the smart thing to do is to catch exceptions in a variable, say exc, and look at them using
exc.ToString() ; that would tell you precisely what went wrong, and enable you to find an adequate cure.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
... and when you close a Socket, you should dispose of it too.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Where to start.. where to start. there's so much wrong with this code that it seems clear you haven't even a basic idea of how execution scopes work, or what happens when you leave a block of code. I'm not criticizing you, but you're lacking some fundamental knowledge here.
First, in your "server" you click a button to start.. ok, but all your code is running within that button click event.. which will lock up your UI on the server until processing is finished. This is probably not what you have in mind for a long running connection. You will most likely have to create a worker thread to handle this code, which I won't go into detail about much here.. but something for you to research into.
Next, you create new NetworkStream and StreamReader/Writer objects within your while loop. This is highly wasteful, and will likely cause a lot of problems. I believe that when the NetworkStream object is destroyed at the end of your while loop, it will close the socket that it's attached to unless you specify false for socket ownership in the constructor. So your first step would be to move those three lines to outside of your while loop (but inside the if statement), that will keep them around while you process things.
Next, you need a way to tell when the socket has been closed. Certainly, your exception handler will do that, but it's not the "correct" way. ReadLine() returns null when the socket is closed. So you should change your code to exit the loop when ReadLine() returns null.
Now on to the client. First, you will probably want to create a "connect" button and a "disconnect" button (or you can get fancy and use the same button for both). This will create the TcpClient connnection and leave it open. The close will close the connection. Then you button click will do nothing but send the text in your textbox. You may want to create a second textbox to display the output that comes back instead of using a MessageBox.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|