|
Hi,
Histogram represents the tonal distribution in an image , for this you need to write Image Processing Algorithms , which are not very simple to explain .
But what i can suggest you is start looking at some of the information available on the net and come up with specific questions.
Also there are many open source Image Processing Libary , which you can use , AForge.Imaging (read the license properly before use )
you may download it from
http://code.google.com/p/aforge/[^]
Also the following link has an example of drawing histogram (with other stuff) , using the AForge.Imaging Libary
http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx[^]
Also this are wikki links about histograms
http://en.wikipedia.org/wiki/Image_histogram[^]
http://en.wikipedia.org/wiki/Histogram[^]
Let me know if the info was helpful , also feel free to ask for any info
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Hi,
I am new to C#
I want to retrieve drives in a server and list all files in a drive...
For writing C# code for the above should i install SQL....
Please help with this
|
|
|
|
|
mrithula8 wrote: I am new to C#
I want to retrieve drives in a server and list all files in a drive...
For writing C# code for the above should i install SQL....
Yes, you are new, and very lost. I don't believe you can iterate over the drives on a server. SQL Server certainly has nothing to do with this. Directory.GetAllDirectories and Directory.GetAllFiles is what you need, once you have a drive.
Overall, what you need is to read a basic book on C#
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
you have to write a server-application that provides the information about drives and files. For example a WebService could suit your needs perfectly.
And you don't need SQL for this. SQL is a language used to query relational databases.
Regards
Sebastian
|
|
|
|
|
Why would you need SQL? are you storing data?
Plus have you tried looking, there is loads of stuff out there. Try looking into 'C# WMI' or 'C# list server drives' or something.
You put a question like this your more than likely to only get 'links' as replies, which you could get much faster if you searched yourself
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
Hi all,
I have some task to work with binary data. As i want to know how to store data in binary file format and also how to read data from binary file.
Please help me asap
Thank you
Nitin
|
|
|
|
|
BinaryReader and BinaryWriter are probably the classes you are looking for.
Regards,
Rob Philpott.
|
|
|
|
|
Hi
Thanx for the reply. I know BinaryReader and BinaryWriter classes are used for reading and writing but i am unable to use it properly can u give me some sort of code(example) for both so that it will help me ahead?
thanx again
Nitin
|
|
|
|
|
What sort of data is it you are writing? Are you trying to write it in a specific format? Is it binary serialisation you are after or more just straight streaming of data?
Regards,
Rob Philpott.
|
|
|
|
|
What does the binary data represent? An image, text or sth. else?
Because I don't know what you try to achieve, I would say you have to use a BinaryWriter/BinaryReader.
Regards
Sebastian
|
|
|
|
|
Hi thanx for your reply. Binary data presents text and some data like which contain numbers. i know that Binarywriter/BinaryReader class is used for that...but can u give me some sort of code for both reading and writing, so that it will help me ahead?
Thanx again
Nitin
|
|
|
|
|
|
BinaryReader/BinaryWriter as has already been suggested.
If you are trying to save your own internal objects in a proprietary format also take a look at BinarySerializer
|
|
|
|
|
File.ReadAllBytes and File.WriteAllBytes
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I'm trying to build a self updating application for Mobile use.
I'd like to use the AppDomain.ShadowCopy feature so that my code will be loaded without the CLR locking the assembly. This way the code is able to update itself.
My only problem is that the ShadowCopy is being excluded from the Compact version of the .NET...
Any idea for a substitute, or any other way I can self-update an assembly?
tnx
Roy
|
|
|
|
|
i m new to game dev and now developing a small 2d scrolling game in VC# 2005 using XNA framework. i completed the player movements, and some player controls(like shooting).
now i donno how to write code for a mission. not even a basic idea of how to start with it. (for eg. mission is to shoot X ppl in some Y time). shud i hav to hard code in the update method or write mission details in a separate data file and read from it, and check for condition...
pls pls pls some one help me on this...
|
|
|
|
|
Most people create a format to define missions, and then write a program with which they can create as many missions as they like, just by creating new data files.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
thanks for ur explanation. but i still need some sample or tutorial to understand the concept... cud u give me some link to such kind of tutorial... i hav searched in google for about 15 minutes and havnt found any...
|
|
|
|
|
How it works, is up to you. I'm not going to write a game to show you. You could look to see if the XNA framework has any samples you can look at.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Sorry but if i understand your question you want to store how many things you need to shoot and how long to do in?
well just use some variables, get from a file or something. simple file with level, target, time would do, i.e.
1-10-60
2-15-55
3-20-50
4-25-45
etc.
then for each level you load your target and time
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
|
|
Hi expert ,
this is login code with Mysql Connectivity .it is not working.
no error is showing
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
namespace ExampleOne
{
public partial class login : Form
{
public login()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void btnlogin_Click(object sender, EventArgs e)
{
string g_login = this.tbUsername.Text;
string g_password = this.tbpassword.Text;
string MyConString = "server=localhost;database=password;uid=root;password=asd";
MySqlConnection connection = new MySqlConnection(MyConString);
string Strsql = "select * from tablogin where userid = ' " + g_login + " 'AND password=' " + g_password + " ' ";
MySqlCommand command = new MySqlCommand(Strsql, connection);
MySqlDataReader Reader;
try
{
connection.Open();
Reader = command.ExecuteReader();
while (Reader.Read())
{
string auser;
string apwd;
auser = (Reader[g_login].ToString());
apwd = (Reader[g_password].ToString());
if (auser == g_login && apwd == g_password)
{
MessageBox.Show("INCORRECT USER/PASS!");
}
else
{
MessageBox.Show("YOU ARE LOGGED IN!");
}
}
connection.Close();
}
catch (Exception ex)
{
Console.WriteLine("Error Conecting to database", "window information" + ex.Message.ToString(),
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
}
|
|
|
|
|
Your code is really, really crappy. I can erase your database any time I like. Apart from that, hard to say, given that you don't tell us what code executes, what you see, what happens, etc. Do you know how to use the debugger ? Any execution path should show a message box, so more detail than 'it's not working' should be easy to offer, even if you don't know how to debug code.
Also, the right way to check a login is to do a select count(*), not to get the username and password returned.
Oh, I see the issue.
ashish1nov2008 wrote: while (Reader.Read())
So, if nothing is returned, you won't see anything. Duh.
ashish1nov2008 wrote: else
{
MessageBox.Show("YOU ARE LOGGED IN!");
}
This can never execute, by definition.
Look at your SQL, make sure what you're typing in is correct ( for example, is there a trailing space in the DB and not in your text ? Can you think of ways to make that not matter ?
I think you need to read a basic C# book and start again.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|