Saturday, July 23, 2011

Access Content of Request in C# (ASP .NET)

You can access the content of the HTTP Request like this:

byte[] bytes = Request.BinaryRead(Request.ContentLength);

If the content-type of the request is text/xml you can do this:

byte[] bytes = Request.BinaryRead(Request.ContentLength);
System.Text.Encoding enc = System.Text.Encoding.UTF8;
string XmlData = enc.GetString(bytes);

Monday, July 11, 2011

rdesktop Remote Desktop from Linux To Windows

Have you ever tried connecting from a Linux machine to a Windows server using rdesktop?
If you get the error:

ERROR: recv: Connection reset by peer



Solution:
Go to the Windows machine's Configure Remote Desktop and choose:

Allow Connections from computers running any version of Remote Desktop 



use -f switch for full screen mode. You can press CTRL + ALT + ENTER to exit from full screen.

Saturday, May 28, 2011

Research Proposal

I've just finished writing my research proposal for UPM university. It's 4:30 AM.

Monday, April 25, 2011

Save (write) JPEG Images Without DPI Change in Java

If you try to write a BufferedImage on disk using ImageIO.write you will see that the result image will have a DPI of 96 regardless of the source image's DPI!
In order to keep the source DPI or set your own DPI you need to write your image using JPEGImageEncoder class.

Friday, April 22, 2011

NetBeans 7.0 Released!

The final version of NetBeans 7.0 release on (22 April 2011). But still no JavaFX support!
Download NetBeans 7.0

 

Monday, April 11, 2011