Deprecated: Function set_magic_quotes_runtime() is deprecated in /nfs/c01/h08/mnt/2939/domains/cidamon.com/html/blog/textpattern/lib/txplib_db.php on line 14
http://textpattern.com/?v=4.0.6 Cidamon: Blog http://cidamon.com/blog/ Cidamon Fri, 07 Apr 2017 06:40:06 GMT Get Keys of Dictionary data in c# A very simply way to collect the keys of a dictionary object to iterate through them is given bellow –

List<string> keyList = new List<string>(myDictionary.Keys);
for (int i = 0; i < keyList.Count; i++)
{
    int myInt = myDictionary[keyList[i]];
}
]]>
http://cidamon.com/blog/solution/26/get-keys-of-dictionary-data-in-c Sun, 07 Nov 2010 06:13:50 GMT Hawk tag:cidamon.com,2010-11-07:07eb181f72038e0cb54dbb0c8c485ee6/a718eef574f46e5d21f6611349579c4a
Dictionary, Hashtable and HashSet First of all HasSet is different then Dictionary and Hashtable cause it does not allow duplicate value and elements inside a HashSet cannot be accessed through indices, only through an enumerator (which is an iterator).

Now the difference between Dictionary and Hashtable is though Hashtable takes in a key/value pair, but it does so as generic objects as opposed to typed data in Dictionary. And another difference between Dictionary and Hashtable is, Hastable does not preserve the order in which items are added. On the other hand, the Dictionary data structure does keep items in the same order. Because of this behavior Hashtable is faster then Dictionary.

So, ultimately if we require a unique list without key/value pair we should use HashSet (it has been introduced from Framework 3.5). But if we need key/value pair and does not require to preserver the order items are being added we should use Hashtable. We should use Dictionary when we need to use key/value pair and also need to preserver the order items are being added into the list.

]]>
http://cidamon.com/blog/solution/27/dictionary-hashtable-and-hashset Sun, 07 Nov 2010 06:12:29 GMT Hawk tag:cidamon.com,2010-11-07:07eb181f72038e0cb54dbb0c8c485ee6/6cded68573cacfc72c46127ab7f4761b
HashSet in dot net 3.5 HashSet has been introduced in framework 3.5. It inherits the ICollection interface. HashSet cannot be accessed through indices, only through an enumerator.
HasSet is modeled upon mathematical set. It has methods such as Union, Intersection, IsSubsetOf, IsSupersetOf.
Add method of HashSet is boolean unlike List. HashSet allows only unique values. So, if the value already exists then “Add” method returns false.
So, if the list requires to contain unique values then it is better and faster to use HashSet instead of List.

]]>
http://cidamon.com/blog/solution/25/hashset-in-dot-net-35 Sun, 07 Nov 2010 06:10:23 GMT Hawk tag:cidamon.com,2010-11-07:07eb181f72038e0cb54dbb0c8c485ee6/893f4a25a69805b62370799ae4ddef45
Simple use of sqlplus Bellow are the steps required to execute a sql script using sqlplus

Start listener
$ lsnrctl start

Login to sqlplus
$ sqlplus username/password (if using sys then “sys/password as sysdba”)

Start the database
sql>startup

Turn on spool
sql>Spool on

Set output file
sql>Spool /home/oracle/log1

Execute sql script
sql>@/home/oracle/myquery.sql

Turn spool off
sql>Spool off

Shutdown database
sql>shutdown immediate

Exit sqlplus
sql>exit

Stop listener
$ lsnrctl stop

]]>
http://cidamon.com/blog/solution/24/simple-use-of-sqlplus Tue, 14 Sep 2010 10:57:41 GMT Hawk tag:cidamon.com,1969-12-31:07eb181f72038e0cb54dbb0c8c485ee6/f9dbd153006401f1f213e66b9299e117
Wordpress &ndash; disabling Nofollow option in links First go to settings->Privacy settings. Select the following option -

“I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers”.

Then go to appearance->editor and select Header.php. Here you may find something like “Robots:Noindex, nofollow” among the meta tags. Remove it.

]]>
http://cidamon.com/blog/solution/23/wordpress-disabling-nofollow-option-in-links Wed, 07 Jul 2010 12:52:07 GMT Hawk tag:cidamon.com,1969-12-31:07eb181f72038e0cb54dbb0c8c485ee6/c5250225339b04511664a922ef75eebb