Ramy Mahrous 401 Postaholic Featured Poster

It depends you need it critically or not?

Ramy Mahrous 401 Postaholic Featured Poster

Sorry Dima I didn't make it before but I'm trying to help I search and I found this book Mathematical Tools in Computer Graphics with C# Implementations By Alexandre Hardy, Willi-Hans Steeb and I think it has the answer can you please take a look on http://books.google.com.eg/books?id=IGtIWmM2GWIC&pg=PA164&lpg=PA164&dq=detect+closed+curve+in+an+image+C%23&source=bl&ots=eBFYLo3g6L&sig=curnJy8dZ-t9GJ-3plt7PrLhoT0&hl=en&ei=NtGvSuuMOdzLjAes_tnABA&sa=X&oi=book_result&ct=result&resnum=7#v=onepage&q=&f=false

Ramy Mahrous 401 Postaholic Featured Poster

Danny it's Web-based application with no message box :) people please help to make it cleaner, ASP.NET forum for ASP.NET questions.
ASP.NET http://www.daniweb.com/forums/forum18.html
You can use Ajax Toolkit you'll find Password functionality http://www.dotnettutorials.com/tutorials/ajax/ajax-control-toolkit.aspx

Ramy Mahrous 401 Postaholic Featured Poster

DdoubleD you're very active I like your way, keep it up.

Ramy Mahrous 401 Postaholic Featured Poster

Remove the single quote from city names, and check if it doesn't work. Catch it on the profile (see how your application sends it to the SQL Server) get the query and run it on SSMS and check what's the error.

Ramy Mahrous 401 Postaholic Featured Poster

Welcome anytime

Ramy Mahrous 401 Postaholic Featured Poster

hmmm, look
If you have button open in Form1 to open Form2, then you should declare Form2 as global variable in Form1 to be able to play with it.

//Form 1 class
class Form1 : Form
{
Form2 m_form2;

//Click event handler of Open button
public void OpenClick(object sender, EventArgs e)
{
m_form2 = new Form2();
m_form2.Show();
}

//Click event handler of Close button
public void CloseClick(object sender, EventArgs e)
{
//be sure it initialized
m_form2.Close();
}
}

That's it :)

Ramy Mahrous 401 Postaholic Featured Poster

Yes because you are working with arrays and array is reference type and passed to any method as reference without prefix it with 'ref' so you can declare more than instance of object[,] and assign them to your bla.Table;

object [,] tempTable = bla.Table;
//....doing some operations
//at this point you don't need on of them you can reassign it again and work..
tempTable = bla.Table;
Ramy Mahrous 401 Postaholic Featured Poster

If you want to close all the forms, you can write this line in the event handler of the BTNNO click event handler

Application.Exit();

But if you need to close some forms, you should declare them in the form opens them globally then call it like that formInstance.Close(); this also in the BTNNO event handler and sure this button in the form opens the rest of forms (LOOL I hope you get me right now).
I think you should reopen the forms again to be affected.

Ramy Mahrous 401 Postaholic Featured Poster

Let's say it's a table (columns -cells- and rows)

public class MyTable()
{
Public MyTable(int columnsNumber, int rowsNumber)
{
Table = new object[rowsNumber, columnsNumber];
}
public object[,] Table; 
}

Then you can apply your logic

MyTable bla = new MyTable(20, 64);
//bla.Table[0,0]; 
//if bla.Table[0,0] > bla.Table[0,1] 
//then bla.Table[1,0] = anything....

Got it?

Ramy Mahrous 401 Postaholic Featured Poster

First please copy free-syntax error code

public class vehicle
        {
            public vehicle()
            {
                MessageBox.Show("I'm Vehicle");
                //do some initialization for all vehicles
            }
        }

        public class automobile : vehicle
        {
            public automobile()
            //: base()
            {
                MessageBox.Show("I'm Automobile");
                // do specific initialization for auto
            }
        }

        public class truck : automobile
        {
            public truck() //: base()
                
            {
                MessageBox.Show("I'm Truck");
                // do specific initialization for truck
            }
        }

So, you don't need Automobile construction

public class automobile : vehicle
        {
            //public automobile()
            //    //: base()
            //{
            //    MessageBox.Show("I'm Automobile");
            //    // do specific initialization for auto
            //}
        }
Ramy Mahrous 401 Postaholic Featured Poster

In terms of long lists and performance, Danny's solution is the best and to make it better use 'for' loop instead of 'foreach'
My test on 10000 items
Danny (for not foreach) | 39060 ticks
Danny | 48825 ticks
adatapost | 761670 ticks

kvprajapati commented: Test++ +15
ddanbe commented: Nice you did this test! +13
Ramy Mahrous 401 Postaholic Featured Poster

@Serkan and @Danny: please tell people the address of the forum they may be unfamiliar with the community..

@Nishanthi
http://www.daniweb.com/forums/forum18.html

Ramy Mahrous 401 Postaholic Featured Poster

Just look at the 2nd reply http://stackoverflow.com/questions/850717/what-are-some-popular-ocr-algorithms and see how they implement OCR...

Ramy Mahrous 401 Postaholic Featured Poster

I've question when it loses its format? try to catch the message returned from xml webservice and see if it comes in the right format or not? I just want to put my hand on the phase content loses its format.

serkan sendur commented: welcome back +8
sknake commented: welcome back! +14
Ramy Mahrous 401 Postaholic Featured Poster

You may need to handle it or dispose your resources in SyncEnd event http://msdn.microsoft.com/en-us/library/aa219364(office.11).aspx

Ramy Mahrous 401 Postaholic Featured Poster

Counter?? what about to see System.Time class?

Ramy Mahrous 401 Postaholic Featured Poster

Thanks a lot for helping me......
My project is attached here.......
In this, when I executed the project,there in textbox I entered the string which is text of any of the forms made by me.
Like I entered the string "How to compare string " which is the text of Form2. But on clicking search button,its giving nothing .
Kindly solve my problem.........

I got it!!! that's appear on your computer or not?

Ramy Mahrous 401 Postaholic Featured Poster

Attach your developed application and provide us with test case, I don't think this problem needs all those replies except you all missing something and it's not so clear.

Ramy Mahrous 401 Postaholic Featured Poster

In such applications you need to have SMS provider, which provides you with webservice to call some method i.e pass text and cell phone number and the provider sends the SMS

Ramy Mahrous 401 Postaholic Featured Poster

loooooool I'm not certified till now :D
Good job (Y) girl

Ramy Mahrous 401 Postaholic Featured Poster

Shereef Saker has posted an article about Singularity: A research OS written in C#. While going through Microsoft Student Partners forum I found a post sent by Matthieu Suiche an MSP from France informing about Singularity first release...

Microsoft research page: The Singularity Research Development Kit (RDK) 1.1 is now available for academic non-commercial use. You can download it from CodePlex, Microsoft's open source project hosting website, here.

Singularity is a research project focused on the construction of dependable systems through innovation in the areas of systems, languages, and tools. We are building a research operating system prototype (called Singularity), extending programming languages, and developing new techniques and tools for specifying and verifying program behavior.

Advances in languages, compilers, and tools open the possibility of significantly improving software. For example, Singularity uses type-safe languages and an abstract instruction set to enable what we call Software Isolated Processes (SIPs). SIPs provide the strong isolation guarantees of OS processes (isolated object space, separate GCs, separate runtimes) without the overhead of hardware-enforced protection domains. In the current Singularity prototype SIPs are extremely cheap; they run in ring 0 in the kernel’s address space.

Singularity uses these advances to build more reliable systems and applications. For example, because SIPs are so cheap to create and enforce, Singularity runs each program, device driver, or system extension in its own SIP. SIPs are not allowed to share memory or modify their own code. As …

Ramy Mahrous 401 Postaholic Featured Poster

If you need to execute SQL Statements\Stored Procedures\UDFs which return\don't return results, Here I've developed this class to be used in Data Access Layer.

Ramy Mahrous 401 Postaholic Featured Poster

Yes, I agree message boxes headache but in some cases it should be used, but in such error some alternatives better. Thanks Danny :)

Ramy Mahrous 401 Postaholic Featured Poster

Here's I wrote some code to validate user input without using if\else statements.
I believe in scalability is the most important aspect in our problems solution. Let's say we are required to permit only numerics in some text boxes; we shouldn't develop something like that if(((e.KeyChar < '0' || e.KeyChar >'9')) we HAVE to use Regular Expression Regex class and match string with pattern (when something changes go and change patterns) you can set it in App.Config file which means you won't open the source code again.

Common Regular Expression Patterns
http://en.csharp-online.net/CSharp_Regular_Expression_Recipes—Using_Common_Patterns

Ramy Mahrous 401 Postaholic Featured Poster

Here's I wrote some code to insert\retrieve images from SQL Server database
1- Create table to hold Image ID, Name and itself

USE [ImagesDatabase]
GO
/****** Object:  Table [dbo].[Image]    Script Date: 07/10/2009 23:46:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Image](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Caption] [nvarchar](50) NOT NULL,
	[Content] [varbinary](max) NOT NULL,
CONSTRAINT [PK_Image] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

2- Create stored procedure to insert new image

CREATE PROC InsertNewImage
@Caption varchar(50),
@Content varbinary(max)
AS
INSERT INTO [DummyDatabase].[dbo].[Image] ([Caption], [Content])
VALUES (@Caption, @Content)

3- Create stored procedure to get image by ID

CREATE PROC GetImageByID
@ID int
AS
SELECT Caption, Content FROM Image WHERE ID = @ID
Ramy Mahrous 401 Postaholic Featured Poster

@Qauaan
Just remove it, it's the same as combo.DataSource = ....

Ramy Mahrous 401 Postaholic Featured Poster

loooooooool :D I'm just satisfied by trying :D

Ramy Mahrous 401 Postaholic Featured Poster

Here's I wrote some code to say binding not means control and data from database, it may be class holds some data

Ramy Mahrous 401 Postaholic Featured Poster

Here's I wrote some code to move controls on the form
1- Assign (Control_MouseMove, Control_MouseDown, and Control_MouseUp) to the controls you need it movable.

ddanbe commented: Great! +6
Ramy Mahrous 401 Postaholic Featured Poster

loooooooooooooooooooooooool, we must proof there are unknown soldiers in C# community ;)

Ramy Mahrous 401 Postaholic Featured Poster

Here's I wrote some code to create login on SQL Server.
1- Add references (Microsoft.SqlServer.Smo, Microsoft.SqlServer.SqlEnum and Microsoft.SqlServer.ConnectionInfo) to your project.
2- Call method CreateLogin which takes to some arguments (documented)

Ramy Mahrous 401 Postaholic Featured Poster

Here's I wrote some code to backup your database
1- Add references (Microsoft.SqlServer.Smo and Microsoft.SqlServer.ConnectionInfo) to your project.
2- Call method BackupDatabase which takes to arguments database name and backup file path with extension .bak (preferable)

Ramy Mahrous 401 Postaholic Featured Poster

Five stars (Y)

Ramy Mahrous 401 Postaholic Featured Poster

Thats the process manager....
You've before compiling this code to adjust namespace names or create the windows application with Process_Manager name
second to add in the form ListView control with name lvwProcesses, TextBox control with name txtMachine and Button control with name cmdRefersh and give in click event handler this method cmdRefersh_Click
It will work!

Ramy Mahrous 401 Postaholic Featured Poster

Please attach picture to what happened to understand you well.

Ramy Mahrous 401 Postaholic Featured Poster

I did my friend :)

Ramy Mahrous 401 Postaholic Featured Poster

@Cgyrob NOO it's part from SQL Server

Ramy Mahrous 401 Postaholic Featured Poster

Scott :D I don't mean logging error there are changing in requirements in rapid way.

Ramy Mahrous 401 Postaholic Featured Poster

You're welcome, please tell us the solution then.

Ramy Mahrous 401 Postaholic Featured Poster

General question!!
Undefined problem has infinite set of solutions

Ramy Mahrous 401 Postaholic Featured Poster

As you're online. Please mark it as solved.

Ramy Mahrous 401 Postaholic Featured Poster

Math.Add ??? Exists in Math class??! The answer shouldn't be to use it or not to use it.
Regardless this small operation in sometimes I shouldn't do that. Try we log error\exceptions
I can't permit developers team to do that

try
{
}
catch (Exception ex)
{
File.AppendAllText(ExceptionFilePath, ex.Message);
}

BUT, They must have method logs the error

try
{
}
catch (Exception ex)
{
LogException(ex);
}
void LogException(Exception ex)
{
//Today DM (Development Manager) said we should use File
//Yesterday they said we should log in database
//tomorrow I think they aren't interested to know what exceptions happened
}

Centralize operations important.

Again, regardless small adding operation mentioned above.

ddanbe commented: Keep us awake man! +7
Ramy Mahrous 401 Postaholic Featured Poster

You mean "attack" you not "attach" you.
Then what's bad in me to start a thread, Am not I getting people respect?!

Ramy Mahrous 401 Postaholic Featured Poster

Let's open a thread on Community Feedback not on Geek lounge to discuss such an issue.

Ramy Mahrous 401 Postaholic Featured Poster

I don't have solution else open the downgraded project on VS 2005 then add new project (Setup wizard project) there on it.

But did you answer my questions

Excuse me, how could you know it's compiling on 3.5 ? did you try to run this application on machine JUST HAS 2.0??
Installation project is 2.0 or 3.5?

mypicturefaded commented: Here is some rep! Thanks for the help today! +1
Ramy Mahrous 401 Postaholic Featured Poster

We should flag a thread as bad one, and report the asker didn't react with us and mark the thread as solved, so they do it.
Opinion?

Ramy Mahrous 401 Postaholic Featured Poster

Turn it into use 2.0!

Ramy Mahrous 401 Postaholic Featured Poster

Excuse me, how could you know it's compiling on 3.5 ? did you try to run this application on machine JUST HAS 2.0??
Installation project is 2.0 or 3.5?

Ramy Mahrous 401 Postaholic Featured Poster

If you do that, you're applications supposed to run on .NET framework 2, did you do that? with all application references??