Friday, October 10, 2008
Read/Modify Application Configuration .config file
string value = ConfigurationManager.AppSettings["oldPlace"];
Write
System.Configuration.Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["oldPlace"].Value = "3";
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
Thursday, September 11, 2008
Add On - Integrating Browser & Outlook
get contact mail address
attach mails from outlook to email in browser
Thursday, August 21, 2008
Enable Maintainanace plan for SQL Server 2005
use msdb
GO
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO
go to maintainance plan to see details about how to create them
Wednesday, August 13, 2008
SMMS - Short Message Mailing System
SMMS i.e. Short Message Mailing System
A system which provides the feature of a mailing system like (address, lists, reply, forward etc) based on SMS.
Additionally it can have a feature where a person can expose a contact list to someone he know, without the other person being aware of who all are the contact list(acting as a middle man).
This can be a faster, reliable and social way to make people aware of things going on.
Monday, August 11, 2008
Windows vista security - rendered useless by researchers
In a presentation at the Black Hat briefings, Mark Dowd of IBM Internet Security Systems (ISS) and Alexander Sotirov of VMware Inc. discussed the new methods they've found to get around Vista Protections such as Address Space Layout Randomization (ASLR), Data Execution Prevention (DEP) and others by using Java, ActiveX controls and .NET objects to load arbitrary content into Web browsers.
By taking advantage of the way that browsers, specifically Internet Explorer, handle active scripting and .NET objects, the pair have been able to load essentially whatever content they want into a location of their choice on a user's machine.
http://searchsecurity.techtarget.com/news/article/0,289142,sid14_gci1324395,00.html
Thursday, July 31, 2008
Image Decoder
Features
- add images files as encoded bits
- display images (encoded bits)
useful to hide what images you have because it can only be viewed by your own application
Friday, May 9, 2008
ICollection & IEnumerator
Function which must be used are - Add, Clear, Count, GetEnumerator
IEnumerator interface is used to enumerator through a collection.
Functions which must be used are - MoveNext, Current, Reset
The example below is the most basic and is used to create a string - string collection where each item in second list is dependent upon the item in the first list at the same index position.
Example
Collection class
public class CustomCollection : ICollection
{
List
List
public virtual void Add(string x, string y)
{
customDependentList.Add(y);
customMainList.Add(x);
}
public virtual void Clear()
{
customMainList.Clear();
customDependentList.Clear();
}
#region ICollection Members
public void CopyTo(Array array, int index)
{
throw new Exception("The method or operation is not implemented.");
}
public int Count
{
get { return customMainList.Count; }
}
public bool IsSynchronized
{
get { throw new Exception("The method or operation is not implemented."); }
}
public object SyncRoot
{
get { throw new Exception("The method or operation is not implemented."); }
}
#endregion
#region IEnumerable Members
public IEnumerator GetEnumerator()
{
return new CustomCollectionEnumerator(customMainList, customDependentList);
}
#endregion
}
Enumerator for collection class
public class CustomCollectionEnumerator : IEnumerator
{
List
List
int position = -1;
public CustomCollectionEnumerator(List
{
customMainList = main;
customDependent = dep;
}
#region IEnumerator Members
public object Current
{
get { return new KeyValuePair
}
public bool MoveNext()
{
position++;
return (position < customMainList.Count);
}
public void Reset()
{
position = -1;
}
#endregion
}
Used in a program
CustomCollection cus = new CustomCollection();
cus.Add("wts1", "admin");
cus.Add("wts1", "suzie");
cus.Add("wts2", "admin");
cus.Add("wts3", "sally");
cus.Add("wts2", "dam");
foreach (KeyValuePair
{
Console.WriteLine(pair.Key + " : " + pair.Value);
}
Console.ReadKey();
