|
Use the Rectangle's Inflate method.
Standards are great! Everybody should have one!
|
|
|
|
|
dear friends,
i hope you are all fine,i am new in this community and this is my first post.actually i am doing my final year priject of image processing in C# .tell me how i can learn C# quickly and easily and also about the implementation of aindane algorithm.
thanx
messages sent here
|
|
|
|
|
waqas shah wrote: dear friends,
i hope you are all fine,i am new in this community and this is my first post.actually i am doing my final year priject of image processing in C# .tell me how i can learn C# quickly and easily and also about the implementation of aindane algorithm.
thanx
What? You are doing your final year project, as in you have been in the class all year, and now you are doing your final project? And NOW you need to learn C#? Didn't pay attention in class huh?
waqas shah wrote: also about the implementation of aindane algorithm.
use google.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Justin Perez wrote: I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
are they for sale yet???
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Unfortunately not, however, I expect a functional prototype at the end of the second quarter, 2008. They will be issued to worthy members to combat ignorance and stupidity here at CP, free of charge.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
awsum! cant wait!
then we could rule the cyber world
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Hello,
Any help would be great! I have tryed the (datagrid.columns[1]. visable = false) the issue is that, using this method shrinks all the rows of data in the data grid view. Even if i set the row height, it seems to make no difference. I need to set which columns are shown in code, and I change the data source for the data grid view as needed. I have also tryed (datagrid.columns[i].width = 0) and (col.width = 0), both produce the same result, the column width is changed to 0, but you can still see the column, only it appears as a line, and if you are hiding a few columns then it is very noticable. Also you can streach the columns with a width of 0 back out again.
any help would be great.
Thanks to thoes who replyed to my first question for this, I did try all suggestions.
thanks, J
|
|
|
|
|
jasper018 wrote: I have tryed the (datagrid.columns[1]. visable = false) the issue is that, using this method shrinks all the rows of data
Where have you tried this and what do you mean it shrinks the rows?
jasper018 wrote: Thanks to thoes who replyed to my first question for this, I did try all suggestions.
So this is a repost of the same question?
only two letters away from being an asset
|
|
|
|
|
answer question 1: when using the (datagrid.columns[i].visible = false) method when the data grid load in the form, the row height is set to 0, even if i reset is before it is displayed it does not change. so there for all the rows appear shrinked. I do not know why this is happening, and no matter what I do, or set, it seems to set the row height to 0.
answer question 2: Yes I have posted this question before... the responses I had gotten, though helpfull, did not help with my problem, i am really stumped with this one.
|
|
|
|
|
try to use AutoSizeMode=Fill for any visibale columan,, hope it will work
|
|
|
|
|
Thanks i am going to give that a try!
|
|
|
|
|
Thanks for the reply! )
That did not seem to work either
|
|
|
|
|
Hi,
I am reposting this message,plz help me to fix it.
I have written code for sending mails using c#.I am facing the following problem with this.
Mail Body is not showing up for Meeting requests/mail received through Lotus Notes. The meeting request is shown correctly when viewed through the Outlook with the body showing up but not in Lotus Notes.
Here is the code i am using,
msg.From = new MailAddress(From);
msg.Subject = Subject;
msg.SubjectEncoding = System.Text.Encoding.Default;
StringBuilder strBodyText = new StringBuilder();
strBodyText.AppendLine(some string on logical criteria);
msg.Body = strBodyText.ToString();
msg.BodyEncoding = System.Text.Encoding.Default;
msg.IsBodyHtml = false;
msg.Priority = MailPriority.High;
SmtpClient client = new SmtpClient();
client.Port = 25;//or use 587
client.Host = smtpServer;
client.Send(msg);
Plz help me...
Thanks in Advance
Alok...
|
|
|
|
|
|
Hey Thanks for replying.......
Really helpfull! I was not excepting that I got the answer only in few minutes..
|
|
|
|
|
You can repost this as many times as you like, but the answers (which you've already been given) does not change.
|
|
|
|
|
alok_2k3 wrote: I am reposting this message,
Don't do that. It is rude. If someone has an answer for you, they will eventually reply. Reposting the same message over and over doesn't accomplish anything but irritated people...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I don't agree with you. The other day, a person reposted a question to which he did not get an answer, in the hope that he would get one this time.
I happened to see his question that time and was able to answer it. At least, they stay polite by mentioning the repost fact.
|
|
|
|
|
Le Centriste wrote: a person reposted a question to which he did not get an answer, in the hope that he would get one this time
That doesn't do much good except flood the forums with redundant posts.
The very reason Chris put View unanswered questions in the C# forum in each forum, so posts that haven't received any replies don't get lost.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello,
I hope somebody has a good explanation for this issue.
Okay I'm having troubles with the httpWebRequest method. I need to download reports from a specified server (can't give these details). Now I don't have trouble with an "HTTPS" url but I with an "HTTP" url I get the error :
error: The server committed a protocol violation. Section=ResponseHeader Detail=Header name is invalid
This the first time I got this error in c#.net. I tried this in Java and there I didn't had any problems. So I'm kind of lost.
I search the internet to see what the "ProtocolViolationException" throws. I found this on the msdn site:
ProtocolViolationException :
Method is GET or HEAD, and either ContentLength is greater or equal to zero or SendChunked is true.
-or-
KeepAlive is true, AllowWriteStreamBuffering is false, ContentLength is -1, SendChunked is false, and Method is POST or PUT.
I did an output of these properties and some how these don't have the values mention to trigger the ProtocolViolationException.
So my question is, How is this possible?
this is my testClass:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Net;
namespace adlogix_views
{
static class httpTestClass
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
string page = "";
try
{
// write a line of text to the file
HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://www.mywebsite.com");
string userPass = "myUsername:myPassword";
string encoding = Convert.ToBase64String(Encoding.ASCII.GetBytes(userPass));
wr.Headers.Add("Authorization", "Basic " + encoding);
wr.PreAuthenticate = true;
Console.WriteLine("Method = " + wr.Method);
Console.WriteLine("ContentLength = " + wr.ContentLength);
Console.WriteLine("SendChunked = " + wr.SendChunked);
Console.WriteLine("KeepAlive = " + wr.KeepAlive);
Console.WriteLine("AllowWriteStreamBuffering = " + wr.AllowWriteStreamBuffering);
HttpWebResponse ws = (HttpWebResponse)wr.GetResponse();
Stream str = ws.GetResponseStream();
StreamReader sr = new StreamReader(str);
while ((page = sr.ReadLine()) != null)
{
Console.WriteLine(page);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
this is the output of the properties
output: Method = GET
ContentLength = -1
SendChunked = False
KeepAlive = True
AllowWriteStreamBuffering = True
I hope somebody can help me with this.
|
|
|
|
|
Hi
I am passing data between SQL 2005 and a CLR stored procedure developed in C# via the Service Broker, which uses XML as its transport. It's posted here as the problem is more C# than SQL. The message is read in the C# stored procedure using an SQLDataReader.
The value, a string, is retrieved from the reader as an array of bytes.
byte[] mystring = (byte[])myReader[2];
mystring is populated with the ascii values of each character in my string, but interspersed with nulls ( 0s ), the equivalent of
byte[] mybytes = {53,0,49,0,50,0,57,0}; I can't seem to encode this back to a string. I've tried straight ASCIIEncoding, going via UTF8 (google?) with the following :-
byte[] temp = { 53, 0, 49, 0, 50, 0 , 57 , 0};
byte[] buf = Encoding.Convert(Encoding.GetEncoding("iso-8859-1"), Encoding.UTF8, temp);
string attempt1 = Encoding.UTF8.GetString(buf, 0, 8);
string attempt2 = System.Text.ASCIIEncoding.ASCII.GetString(temp);
What am I missing? To cut a long story short I want to convert byte[] temp = { 53, 0, 49, 0, 50, 0 , 57 , 0}; to a string like "5129" .
I am currently hacking it with a Replace("\0" , "") which is really professional!
Regards
Knowledge is hereditary, it will find its way up or down. - Luc Pattyn
so you answer don't be scared of failure
The only failure is never to try
Things You've Never Done - Passenger -2008
|
|
|
|
|
Don't know if I get the problem exactly, but this seems to work:
byte[] data = { 53, 0, 49, 0, 50, 0, 57, 0 };
byte[] filter_data = Array.FindAll(data, new Predicate<byte>(delegate(byte b) { return b != 0; }));
string s = Encoding.ASCII.GetString(filter_data);
Standards are great! Everybody should have one!
|
|
|
|
|
Thanks - it's similar to my Replace - get rid of the nulls and it works.
I suppose I am asking if a byte[] encoded string should contain two bytes for each character?
And I suppose I should actually go and try that myself!!
Knowledge is hereditary, it will find its way up or down.
Luc Pattyn
and since what every time when i want to add button to this control one add two times
posted in C# forum
|
|
|
|
|
Ah ok. In that case, unicode? This gets the right result...
byte[] data = { 53, 0, 49, 0, 50, 0, 57, 0 };
string s = Encoding.Unicode.GetString(data);
Standards are great! Everybody should have one!
|
|
|
|
|
Bekjong wrote: Ah ok. In that case, unicode? This gets the right result...
Yes it does. How embarrasingly simply was that?
Thank you.
Knowledge is hereditary, it will find its way up or down.
Luc Pattyn
and since what every time when i want to add button to this control one add two times
posted in C# forum
|
|
|
|
|