C# OOP Design
string strInput = Console.ReadLine().Trim();
//getAllWordsByCondictionary(strInput);
//ArrayList arrWord = getAllWordsByCondictionary(strInput);
//Console.WriteLine(strInput);
FileStream fs;
StreamReader sr;
ArrayList array = new ArrayList(strInput.Length);
fs = new FileStream("C:\\Temp\\input.txt", FileMode.Open);
sr = new StreamReader(fs);
while (false == sr.EndOfStream)
{
string word = sr.ReadLine().Trim();
if (word.Length <= strInput.Length && word.Length>0 )
{
if(true == Include(strInput,word))
{
Console.WriteLine(word);
}
}
}
Console.ReadLine();
}
public static bool Include(string inputWords, string word)
{
char[] input = word.ToCharArray();
bool flag = true;
int count = 0;
for (int i = 0; flag && i < input.Length; i++)
{
bool fg = false;
char[] words = inputWords.ToCharArray();
for (int j = 0; !fg && j < words.Length; j++)
{
if (input.GetValue(i).Equals(words.GetValue(j)))
{
fg = true;
inputWords.Remove(j);
}
}
if (fg)
count++;
else
{
flag = fg;
}
}
return flag;
}
SQL SCRIPT By Beily
using ms sql create squence number with in a group,for example,given the group id the sql statement will create the
squence number according to a key,