What do you mean by:
Quote:
how to make assamblt.
You will receive no answer to your question this way!
Sojaner!
What do you mean by:
Quote:
how to make assamblt.
You will receive no answer to your question this way!
Sojaner!
Hi everyone. I need to know what it means:
HTTP/1.1 proxies MUST parse the Connection header field before a message is forwarded and, for each connection-token in this field, remove any header field(s) from the message with the same name as the connection-token.
Does it mean that the Proxy Server MUST remove the Connection: keep-alive and Proxy-Connection: keep-alive before forwarding the message to the remote server?!
Sojaner!
I think I know your problem, you need to deal with the
lu
and
li
tags in the css. Try this:
ul {
list-style-type: none;
}
in your css and you will notice the difference. This may be useful to you: CSS UL LI - Horizontal CSS Menu Hope this will help you.
Sojaner!
Mention you images dimensions please.
Sojaner!
Hi everyone. I'm writing some kind of transparent proxy server in C#. The code works without any problem and does what it have to do, but I am really confused about the Connection and Proxy-Connection headers in requests! As everyone knows, the Proxy-Connection is not an standard header and only signals the proxy server to keep the connection open and so, I remove this header form the request and forward the request after removal, but here is an unclear role form W3:
HTTP/1.1 proxies MUST parse the Connection header field before a message is forwarded and, for each connection-token in this field, remove any header field(s) from the message with the same name as the connection-token.
As W3 does not count the Proxy-Connection in the standard headers and suggests to use the Connection header instead, should I remove that header form the request before I forward it or not? Right now I am doing it but I want to make sure if I must or must not do it. :) No one?! :(
Sojaner!
I guess the best way to do this is to create the page in HTML and then convert it to PDF. There is a free tool here http://code.google.com/p/wkhtmltopdf/[^] but I have not used it myself with C# or so!
Sojaner!
How do you handle this? :|
Girl girl = new Girl(Type.LovelyOne|Type.KindOne|PrettyOne);
Boy you = new Boy(Type.KindOne|Type.Married);
girl.Love(you);
girl.MakeLove(you);
you.IsInLove = true;
girl.ReturnedToHerBoyfriend = true;
girl.Leave();
you.Dispose();
Fatal Error! :|
Sojaner!
Hi everyone. I have a coded a Proxy Server like code that works really fine for me! But there is an stupid problem! When I begin surfing the internet through my program (using the proxy setting in firefox) at the beginning, the CPU usage is normal with some times raising up to 2 and then back to 0 again, but as soon as I open 2 or 3 pages in firefox, specially the page with flv videos, the CPU usage raises up to 99 percent! Here is my TCP process code: private void ClientConnectionHandler(object client) { TcpClient tcpClient = null; NetworkStream networkStream = null; TcpClient remoteTcpClient = null; NetworkStream remoteNetworkStream = null; try { tcpClient = (TcpClient)client; const int bufferSize = 1024; byte[] buffer = new byte[bufferSize]; tcpClient.ReceiveBufferSize = bufferSize; tcpClient.SendBufferSize = bufferSize; networkStream = tcpClient.GetStream(); int bytesRead = networkStream.Read(buffer, 0, bufferSize); string request = Encoding.ASCII.GetString(buffer, 0, bytesRead); string host = ""; string[] headers = request.Split(new string[] { "\r\n" }, StringSplitOptions.None); foreach (string header in headers) { if (header.ToLower().Replace(" ", "").Contains("host:")) { host = header.Replace(" ", "").Split(':')[1]; } } IPAddress[] hostAddresses = Dns.GetHostAddresses(host); remoteTcpClient = new TcpClient { ReceiveBufferSize = bufferSize, SendBufferSize = bufferSize }; remoteTcpClient.Connect(hostAddresses[0].ToString(), 80); remoteNetworkStream = remoteTcpClient.GetStream(); remoteNetworkStream.Write(buffer, 0, bytesRead); bool eof = request.Contains("\r\n"); while (!eof) { bytesRead = networkStream.Read(buffer, 0, bufferSize); remoteNetworkStream.Write(buffer, 0, bytesRead); eof = Encoding.ASCII.GetString(buffer, 0, byte
I have no experience in printing using C# and/or any other programing language but this is the result of the search I had for you about the DocumentPrint the main class that makes you able to print using the .Net framework:
using System;
using System.IO;
using System.Drawing;
using System.Drawing.Printing;
using System.Windows.Forms;
public class PrintingExample : System.Windows.Forms.Form
{
private System.ComponentModel.Container components;
private System.Windows.Forms.Button printButton;
private Font printFont;
private StreamReader streamToPrint;
public PrintingExample() : base()
{
// The Windows Forms Designer requires the following call.
InitializeComponent();
}
// The Click event is raised when the user clicks the Print button.
private void printButton\_Click(object sender, EventArgs e)
{
try
{
streamToPrint = new StreamReader
("C:\\\\My Documents\\\\MyFile.txt");
try
{
printFont = new Font("Arial", 10);
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler
(this.pd\_PrintPage);
pd.Print();
}
finally
{
streamToPrint.Close();
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
// The PrintPage event is raised for each page to be printed.
private void pd\_PrintPage(object sender, PrintPageEventArgs ev)
{
float linesPerPage = 0;
float yPos = 0;
int count = 0;
float leftMargin = ev.MarginBounds.Left;
float topMargin = ev.MarginBounds.Top;
string line = null;
// Calculate the number of lines per page.
linesPerPage = ev.MarginBounds.Height /
printFont.GetHeight(ev.Graphics);
// Print each line of the file.
while(count < linesPerPage &&
((line=streamToPrint.ReadLine()) != null))
{
yPos = topMargin + (count \*
printFont.GetHeight(ev.Graphics));
ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
count++;
}
// If more lines exist, print another page.
if(line != null)
ev.HasMorePages = true;
else
ev.HasMorePages = false;
}
//
Thanx for your reply but I'm almost a pro in using the WebRequest and WebResponse but the fact is that the WebRequest can help you in tracing for 1 step only and for example if there is a tag in the HTML you should find it and request it manually, it is not a problem for simple tags like but the fact is that I want to trace the requests from a Flash Player's object and even if I load the swf file using the WebRequest, I will not have the access to the requests and responses that goes out and comes in to the Flash Player so I need a complete web browser with the full request and response ability! :) Sojaner!
Hi, First you have to know that, as much as I know, in GDI+, the exact size of the image is in pixels and it is being calculated by (DPI * demention(in pixel unit)) so you have to calculate the current size in pixel, then calculate the new size and then use this code to create the new image by new size and then set the new DPI: Bitmap screenshotBitmap = new Bitmap("c:\\image.jpg"); Bitmap newBitmap = new Bitmap(screenshotBitmap, newWidth, newheight); newBitmap.SetResolution(1200, 1200);
I remember that in some GDI+ coding I had the same problem and I used somthing like this and it worked for me. Good luck and have fun. ;)
Sojaner!
Hi Muammar©, As you mentioned, it seems like the DLL you have is written in C# or .Net somehow, because as much as I know, working with string types is not as easy as C# in C and C++ and the Entry Point you mentioned makes me feel like the library you have is written in C# and in that case: It you want to access the library at design time (coding time) you just need to add it to your project as a reference and use it by adding it's main namespace to your code, using the "using" keyword and then you can easily access the method you like. But if you want to access it at runtime (directly from your compiled code) you need to know about the System.Reflection namespace and much more to use the classes inside it. You can find what you need on MSDN and google. ;) Good luck and have fun.
Sojaner!
Hi everyone. I want to download a whole website and trace whole web browser's request and response headers. I guess that the only way to download the whole contents of a web page is using the WebBrowser class. But this class does not have any way to trace this request and responses! Could anyone help please?
Sojaner!
It seems that you don't know how this viruses work! Even if you find a way to write protect you flash memory, the virus needs you to unprotect it just for a second to write a little thing on it and the virus is there! In solution of this, I have written a semi anti virus that protect the computer from being infected by infected flash memories and also rescuing the infected flash memory. As all these viruses infect in the same scenario, my program works well for all even new versions of these viruses. It is almost finished, but the interface needs a little work. I will submit my work on codeproject after it was finished.
Sojaner!
Hi everyone! I have a GA-965P-DQ6 motherboard from Gigabyte and I'm trying to install a PCI to IDE card with Sil0680 chipset on it, the hardware is detected and driver is installed but the install wizard returns (Code 10) so windows could not run the device. I have win vista and i have downloaded the last driver for my device! What should I do to run it?! :(
Sojaner!
I could not find any free full functional one can you suggest me one please?!
Sojaner!
Hi everyone. Does anyone know if it is possible to include the .net core assemblies, say in a cd for our program to use theme and solve the problem of detecting the installed .net version and installing the required version?! It's a real problem for me that create multimedia cds using C#!
Sojaner!
It is not possible, because may be the entry point of new dll file is not the same as older one!
Sojaner!
Use a System.Net.WebClient object, set the Headers property values and use the UploadDataAsync() method to send file, this class also has a Proxy Property may be usable to you. :):rose:
Sojaner!
Try this one too: Right-Click the installer file (exe file) and choose properties, in the compatibility tab, choose "Run this program in compatibility mode for:" and from the list choose the "Windows XP (Service Pack 2)", and down the window in the "Privilege Level" group box, check the "Run this program as an administerator" the click on ok and run the setup again. :):rose:
Sojaner!