|
Ditto
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.”
|
|
|
|
|
Hi
i want to create a sequantial workflow app (without wf), i'm looking for what tables is needed to implement this, for example we need some tables like workflowTypes, workflowSteps, workflowActivities, ... .
can anybody help me and have experience in this issue ?
thanks
|
|
|
|
|
Hi I was just wondering I made a component off an example on this site. Now I wish to post it for everyone to use. But how would I do that. I’m not that talkative person so I can’t really write about it so much. What would be the best cause of action???
|
|
|
|
|
Writing an article is about the best option you have. Or post it on your own personal blog.
|
|
|
|
|
If you want, have a go at writing an article in plain text, then drop me an email from the link at the bottom of this message. I'll mail you back and you can send me the code and text. I'll see if there's anything I can do to make it 'article worthy' for you.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
thank you i will see if i have time for it tomorrow.. do i need to post a link in the article that helped me?
|
|
|
|
|
I wouldn't post a link in the other article's forum as it might be seen as a 'hijacking' attempt, unless the other article is no longer supported by the author and you are offering to take over support.
Definately make sure there's in link in your article to the original and explain what's different/improvements etc.
Drop the author of the other article a private email letting him know what you've done so he can edit his article to link to yours if he wants.
These aren't rules, just my personal opinion.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hello I'm using the below code to color a picture but it is pretty slow is there a way to do it faster?
Thanks in advance.
<br />
Bitmap Turn(Bitmap pic)<br />
{<br />
Bitmap newpic = new Bitmap(pic.Width, pic.Height);<br />
for (int i = 0; i < pic.Width; i++)<br />
{<br />
for (int j = 0; j < pic.Height; j++)<br />
{<br />
Color color = pic.GetPixel(i, j);<br />
newpic.SetPixel(i, j, Color.FromArgb(123, 46, 125));<br />
}<br />
}<br />
return newpic;<br />
}<br />
|
|
|
|
|
Why are you retrieving the color from pic when you don't use it?
Here
Color color = pic.GetPixel(i, j); <=============================== this never gets used.
newpic.SetPixel(i, j, Color.FromArgb(123, 46, 125));
But if your newpic is to be all one color, look up the Graphics class, and the Fill method of that class.
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.”
|
|
|
|
|
Search the articles for "Image processing for dummies" and you'll find a series of articles that covers just what you're looking for.
|
|
|
|
|
Hi,
1.
an easy win is to replace pic.Height by a variable that gets initialized only once.
2.
for a fixed color, there are better ways, as Henry already mentioned. Here is one:
Graphics g=Graphics.FromImage(newpic);
g.FillRectangle(...);
g.Dispose();
3. the general solution for maximum performance is using pointers, avoiding GetPixel/SetPixel since these methods will perform boundary checks and coordinate conversions for each individual pixel.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I have realised that I made a typo, had a brain fart, in my previous post.
I should have said
If it is going to be one color investigate the Graphics class and the Clear method of that class. Although the various Fill methods are good to know.
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.”
|
|
|
|
|
Thank you all for your good answers.
|
|
|
|
|
Hi,
Pop3 and Smtp work the sameway.. one sends a string message to the server (eg: HELO, USER user, PASS pass) and the server responses (eg. 250 Hello and welcome)
Is there any standard class for this type of communication? something simple like
+Connect()
+Write(s)
+LastResponse()
Because i'm not getting good results ..though i'm trying to communicate with gmail's pop and smtp, so maybe i'm failing with the SSL thing..
I'm having trouble with the Writing and Response,
public string SendMessage(string message)
{
ASCIIEncoding asciiEncoder = new ASCIIEncoding();
byte[] WriteBuffer = new byte[1024]; // 1 KB
WriteBuffer = asciiEncoder.GetBytes(message);
NetworkStream stream = cl.GetStream(); // cl is a TcpClient
stream.Write(WriteBuffer, 0, WriteBuffer.Length);
// Get response after message
return Response();
}
And my response method is:
public string Response()
{
byte[] serverbuffer = new Byte[1024]; //1 KB
int count = ns.Read(serverbuffer, 0, 1024);
if (count == 0)
{
return "";
}
return Encoding.ASCII.GetString(serverbuffer, 0, count);
}
|
|
|
|
|
Hi All,
My break points doesnt not work.I break on a certain part of my code and when i run the code it doesnt stop at the break point.
Could you please advice?
Thank you in Advance.
Many thanks
|
|
|
|
|
This often means that a piece of code that you expected to be called isn't, for some reason. Usually, because of an error in coding, or it is with me.
What I do is to place a break point in the calling code for your original break, and keep moving up the calling chain until something bites.
When that happens, step through until you discover the error.
If that doesn't work, I go for a cup of coffee and a lie down.
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.”
|
|
|
|
|
If that doesn't work, I go for a cup of coffee and a lie down Hahahahahah.....
Thanks very much Henry.Its Much appreciated.The problem with my debugging is even i start a new project that doesnt have any code in it and i place a break point it doesnt stop at it.Any idea?
Thank you.
|
|
|
|
|
If your new project doesn't have any code, how do you set a breakpoint?
You can only set a breakpoint on a line of reachable code, without getting a warning.
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.”
|
|
|
|
|
Thank you once again.I just declared a variable and assign a value to it.
|
|
|
|
|
This may sound realy stupid, but are you actually debugging?
If you create a new (for example) console project, and enter a single line
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Demo
{
class Program
{
static void Main(string[] args)
{
int i = 1;
}
}
}
Then click to the left of the line to create a breakpoint, does a red dot appear?
When you run it, how are you doing that? Try running it from the menu "Debug...Start debugging"
What happens when you start the program using "Debug...Step into"?
I apologise if this seems a little too simple and basic, but sometimes it is worth starting at the begining.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
i have a class name DataConnection. and i want to call this in my form. so how to do with C# ? please give me some guide line ....
|
|
|
|
|
Well it all depends how you have them set up.
Are your classes both in the same namespace? If so, then you can access the Class directly.
Do you want to create an instance of the class? or have you already done that and what to access one of its functions?
If you want to create an instance you can use
DataConnection dc= new DataConnection();
then call a function...
dc.FunctionCall();
from inside your form. Unless it is a static class in which case you cannot create an instance of it, but you can call any of its public methods like so...
DataConnection.FunctionCall();
Any help?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
yes. please tell me more detail ... i have a project name Stock. and it has a form name "form", and a class name DataConnection. in DataConnection has only property "S" as string. and why i cannot access to "S" directly by "string str = DataConnection.S" ? why need to create an instand of it first ?
|
|
|
|
|
You need to create an instance first because, until you do, nothing will exist. You need to make sure that S is declared public as well.
Alternatively, you can declare S as public static , in which case you can use it as you currently do.
In any event get yourself a beginners C# book and work through it. You will save yourself a lot of pain.
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.”
|
|
|
|
|
is C# has readonly keyworld ? and how it use in declare a property in Class ?
|
|
|
|