Ramy Mahrous 401 Postaholic Featured Poster

Zizi, please take a look on the examples above the code...
First Parameter the string, second one the set, and third you tell the method select to not show first\second\etc.. string from the set..

Ramy Mahrous 401 Postaholic Featured Poster

That's great :) I develop small method do that work you may use Regular Expression but I prefered to write my code...

MessageBox.Show(Zizi("aABD", new string[]{"A", "B"}, 0)); // No A
MessageBox.Show(Zizi("aABD", new string[] { "A", "B" }, 1)); // No B
MessageBox.Show(Zizi("aABD", new string[] { "A", "B" }, 0,1)); //No A nor B
MessageBox.Show(Zizi("aABD", new string[] { "A", "B" }, 2)); //A and B

 private string Zizi(string str, string[] set, params int[] whatToNotCome)
        {
            string output = str;
            for (int i = 0; i < set.Length; i++)
            {
                if (whatToNotCome.Contains(i))
                    output = output.Replace(set[i], null); 
            }
            return output;
        }

Got the idea or I should explain my code...?

kvprajapati commented: Working!!! +9
Ramy Mahrous 401 Postaholic Featured Poster

Dear dear dear... plese debug your code to check the value passed to AddTopicDetails method passed correctly!!!

//parsing is ok with string like that 5/17/2010 4:13:00 PM
DateTime dt = DateTime.Parse("5/17/2010 4:13:00 PM"); //prints 13
MessageBox.Show(dt.Minute.ToString());

Debug then debug then debug... you'll surely know your error!

Ramy Mahrous 401 Postaholic Featured Poster

So, you should debug your code and check the value of start\end date
I tried this code

String query = @"INSERT INTO [Temp].[dbo].[Table_1] ([dani]) VALUES (@dani)";
SqlConnection con = new SqlConnection(@"My connection string");
SqlCommand command = new SqlCommand(query, con);
con.Open();
command.Parameters.Add("@dani", SqlDbType.SmallDateTime).Value = DateTime.Now;
command.ExecuteNonQuery();
con.Close();

with table definiation

USE [Temp]
GO
/****** Object:  Table [dbo].[Table_1]    Script Date: 05/17/2010 16:16:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Table_1](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[dani] [smalldatetime] NULL,
 CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

It works fine!
Result set
1 5/17/2010 4:13:00 PM
2 5/17/2010 4:14:00 PM

Ramy Mahrous 401 Postaholic Featured Poster

I don't get your rule! can you please guide me with more examples to recognize its pattern

Ramy Mahrous 401 Postaholic Featured Poster

To be aligned I'll illustrate what I got you mean you want to get distinct characters from string into array
Ex.
Input: RAMY MAHROUS
Output: {R A M Y H O U S}
correct?

Ramy Mahrous 401 Postaholic Featured Poster

Please post your code to help you better

Ramy Mahrous 401 Postaholic Featured Poster

Because I got Ultimate edition serial number :)

Ramy Mahrous 401 Postaholic Featured Poster

How can I change windows 7 from enterprise to ultimate edition after installation?

Ramy Mahrous 401 Postaholic Featured Poster

In such situation I don't know specific reason for that...
Try instead of Data Source=192.168.101.1\dina Data Source={server name}\dina
make sure sql server instance {dina} allows remote connections with named pipes\TCP

Develop an application connects to this server on 64 and catch the exception and detailed exception then send them here..

Ramy Mahrous 401 Postaholic Featured Poster

Try to install SQLServer2005_SSMSEE_x64 again from CMD (Run as administrator) try again.. I have exactly the same environment and everything wors pretty good...

Ramy Mahrous 401 Postaholic Featured Poster

Using System.String class will help you...

Ramy Mahrous 401 Postaholic Featured Poster

I searched for this error I got this link http://msdn.microsoft.com/en-us/library/95scxcdy(VS.80).aspx try it

kvprajapati commented: Welcome back! +9
Ramy Mahrous 401 Postaholic Featured Poster

Can you please try SQL authentication not Windows authentication, it may be problem of provisioning

Ramy Mahrous 401 Postaholic Featured Poster

What the field datatype? plus can you show us how you pick it up? and save it in database?

Ramy Mahrous 401 Postaholic Featured Poster

Let's start it over...

string fileData = File.ReadAllText(@"file path");
checkedListBox1.Items.AddRange(fileData.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries));
Ramy Mahrous 401 Postaholic Featured Poster

or SMS provider, which provides you with web service or so to call it to send SMS...

Ramy Mahrous 401 Postaholic Featured Poster

Look you should have SMS provider, which provides you with web service or so to call it to send SMS...

Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

put breakpoint at if (result == DialogResult.No) see if it reaches inside it or not

Ramy Mahrous 401 Postaholic Featured Poster

Debug, because I'm pretty sure it don't enter "if" block //no condition
because DialogResult.No should be DialogResult.Cancel
Please try it..

Ramy Mahrous 401 Postaholic Featured Poster

I didn't get you but of you need to just compare if the 2 arrays are equal or not convert them to strings and comapre, please clarify to suggest better solutions

Ramy Mahrous 401 Postaholic Featured Poster

You can programatically edit it by iTextSharp http://sourceforge.net/projects/itextsharp/

Ramy Mahrous 401 Postaholic Featured Poster

Set FormBorderStyle to Fixed3D FixedDialog

Ramy Mahrous 401 Postaholic Featured Poster

Sorry you need to apply permission on your developed application or another applications
In case of another applications, you may the one who has the administrative permission and when install log on the i.e. 'A' account and right click on the exe and run it as administrator enter your username and password and in installation progress say just for this user. (Just if the application supports that)
You need to disable some user permissions....

Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

I can suggest to use AOP http://www.postsharp.org it helps very well...

Ramy Mahrous 401 Postaholic Featured Poster

Something I begun to note is most of askers ignore my reply... and even don't comment, what does it mean????!!!
@papanyquiL didn't you see my reply?? or I should clarify?? or you aren't satisfied with the code??

Ramy Mahrous 401 Postaholic Featured Poster

This piece of code enumerate on the local drives then gets it root path then search for every exe on you can use SystemFileInfo to handle nested directories...

foreach (System.IO.DriveInfo dirveInfo in System.IO.DriveInfo.GetDrives())
            {
                foreach(System.IO.FileInfo fileInfo in dirveInfo.RootDirectory.GetFiles("*.exe"))
                    ///add the exe in list or handle it as you like
            }
Ramy Mahrous 401 Postaholic Featured Poster

Yes, you can but it inside button click event handler or set it from control properties
Uri = http://microsoft.com
Believe me it works :)

Ramy Mahrous 401 Postaholic Featured Poster

Do you work on windows Vista?

Ramy Mahrous 401 Postaholic Featured Poster

It works I tried it :|
Please tell me what's the compilation error...

Ramy Mahrous 401 Postaholic Featured Poster

I learnt a lot from this threadm thanks thanks thanks

Ramy Mahrous 401 Postaholic Featured Poster
webBrowser1.Url = new Uri("http://microsoft.com");
Ramy Mahrous 401 Postaholic Featured Poster

You can always use www.connectionstrings.com =)

Ramy Mahrous 401 Postaholic Featured Poster

File | You may use Move method in System.IO like that

System.IO.File.Move(@"C:\old.txt", @"C:\new.txt"); //it renames the file old to new.txt

Folder | the same

System.IO.Directory.Move(@"C:\oldfolder", @"C:\newfolder");
Ramy Mahrous 401 Postaholic Featured Poster

So please send your class code you want to group and order it; the class has this struct to play with this problem.

Ramy Mahrous 401 Postaholic Featured Poster

Why ArrayList?! Are you fond of casting??
Use generics List<Photo> photos = new List<Photo>(); and in Photo class you may have list of photos and indexer to get them by index or name anything is unique..

sknake commented: agreed +14
Ramy Mahrous 401 Postaholic Featured Poster

On the ComboBox double click, VS created a handler for index changed event copy and paste your code, and solve any error if exists..

Ramy Mahrous 401 Postaholic Featured Poster
var col = from le in mylist
group le by le.X into g         
orderby g.Key descending
select g;

On two phases

var colGrouped = from le in mylist
group le by le.X select le;

var colOrdered = from colGrouped ..... orderby...
kvprajapati commented: Excellent. +16
jonsca commented: Some long overdue rep +1
Ramy Mahrous 401 Postaholic Featured Poster

LOL! did you read my reply??!!

There's events detect that
TextBox | TextChanged
ComboBox | SelectedIndexChanged

Ramy Mahrous 401 Postaholic Featured Poster

I see it's very simple in design and this is good, if it does its functionality well so you don't over care about its design.

Nice work, Diamonddrake

Ramy Mahrous 401 Postaholic Featured Poster

You just need to close the code tag.
You should have another property holding image file path

public string ImageFilePath
{
get...
set....
}
public Image Imge
{
get
{
try
{
return _Imge;
}
catch
{
Bitmap bm = new Bitmap(100, 100);
Graphics g = Graphics.FromImage(bm);
g.Clear(Color.WhiteSmoke);
Pen p = new Pen(Color.Red, 5);
g.DrawLine(p, 0, 0, 100, 100);
g.DrawLine(p, 100, 0, 0, 100);
return bm;
}
}
set {
using (Image _Imge = Image.FromFile(ImageFilePath))
Imge = value;
}
}

Set the ImageFilePath first...

Ramy Mahrous 401 Postaholic Featured Poster

Try to group first then order second

Ramy Mahrous 401 Postaholic Featured Poster

ASP.NET questions should be in ASP.NET forum http://www.daniweb.com/forums/forum18.html

Ramy Mahrous 401 Postaholic Featured Poster

Very clear guys :D Customer data with balances with some transaction "Daniweb Bank" :D

Ramy Mahrous 401 Postaholic Featured Poster

There's events detect that
TextBox | TextChanged
ComboBox | SelectedIndexChanged

Ramy Mahrous 401 Postaholic Featured Poster
currentTextBox.Text = DateTime.Today.ToShortDateString();
threeDaysTextBox.Text = DateTime.Today.Add(new TimeSpan(3, 0, 0, 0)).ToShortDateString();
Ramy Mahrous 401 Postaholic Featured Poster

The reverse

List<byte> byteForChar = new List<byte>();
            string input = "abc";
            string result = "";
            for (int i = 0; i < input.Length; i++)
                byteForChar.Add(Convert.ToByte(input[i]));

            foreach (byte b in byteForChar.ToArray())
                for (int i = 0; i <= 7; i++)
                {
                    if ((b & (int)Math.Pow(2, i)) != 0)
                        result += "1";
                    else
                        result += "0";
                    }
            MessageBox.Show(result);

Reference | http://www.neowin.net/forum/index.php?showtopic=625604

Ramy Mahrous 401 Postaholic Featured Poster

Look I'm still working but to convert from String to Byte you you need first to convert it to Binary then to Byte (There's may better solution...)

ASCIIEncoding ascii = new ASCIIEncoding();
            byte[] bytes = ascii.GetBytes("abc");
            string result = "";
            foreach (byte b in bytes)
                result  += Convert.ToString(b, 2);
            MessageBox.Show(result );

I'm working right now in the reverse.