Eclipse for HTML and JavaScript

Eclipse for J2EE developers

Eclipse HTML Editor Plugin

http://www.eclipse.org/gef/

Posted in .Net Development | Leave a comment

Objective C – block

8 ways to use Blocks in Snow Leopard

Posted in .Net Development | Leave a comment

Read & Write text file in C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace CityReader
{
class Program
{
static void Main(string[] args)
{
// create reader & open file
TextReader tr = new StreamReader(“Places.txt”);
// create a writer and open the file
TextWriter tw = new StreamWriter(“Cities.txt”);
// read a line of text
String currentline;
try
{
while (true)
{
currentline = tr.ReadLine();
if (currentline.Length < 1)
{
break;
}
if (currentline.Contains(“city”) || currentline.Contains(“City”))
{
// write a line of text to the file
tw.WriteLine(currentline);
}
}
}
catch (Exception e)
{
}
finally
{
// close the stream
tr.Close();
// close the stream
tw.Close();
}
}
}
}

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;
namespace CityReader{    class Program    {        static void Main(string[] args)        {            // create reader & open file            TextReader tr = new StreamReader(“Places.txt”);            // create a writer and open the file            TextWriter tw = new StreamWriter(“Cities.txt”);

// read a line of text            String currentline;            try            {                while (true)                {                    currentline = tr.ReadLine();                    if (currentline.Length < 1)                    {                        break;                    }

if (currentline.Contains(“city”) || currentline.Contains(“City”))                    {                        // write a line of text to the file                        tw.WriteLine(currentline);                    }
}            }            catch (Exception e)            {            }            finally            {
// close the stream                tr.Close();                // close the stream                tw.Close();            }
}    }}

Posted in C# | Leave a comment