Usman ur Rehman Ahmed's blog

HTC HD2 with Windows 6.5 Internet Settings for Warid Telecom

To turn on Internet on my HTC HD2 (running OS Windows 6.5) I had to go to,

Start > Settings > Menu (All Settings) > Connections > Connections

                Select “Add a new modem connection” (under Mobile Internet heading on top)

Following settings worked for me,

Connection Name: Warid Internet (you can change it as per your need)

Modem: Cellular Line (GPRS)

Access Point Name (APN): warid

The only other setting you will have to make is for proxy as follows,

HTTP: 000.000.000.000

Port: 8080

You don’t need username, password, and domain or need to set advanced settings

For MMS you will have to create a new conection as following,

Access Point Name (APN): mms.warid

The only other setting you will have to make is for proxy as follows,

WAP: 010.004.002.002 (10.4.2.1)

Port: 9201

Archive for

September 2011

Filter DataSet using Linq

At times you will come across a scenario where you need to retrieve a data set and perform filtering on client end. Here is how you would do that

    public DataSet GetSysComboTable(string comboName)
    {
        DataSet ds = null;
        //Retrieve and fill ds here

        //At this point, you have a data set prefilled and you want to return a data set filtering the records
        //based over a column name "ComboName" with value "Hello World"

        //Acquire an empty data set that will be filled with filtered values and returned
        DataSet dsRet = new DataSet();
        try
        {
            //Filter the data set now
                    var qry = from row in ds.Tables[0].AsEnumerable()
                              where row.Table.Columns.Contains("ComboName") &&
                              !row.IsNull("ComboName") && row["ComboName"].ToString().ToLower() == "hello world"
                              select row;
                if (qry != null && qry.Count() > 0)
                {
                    dsRet.Tables.Add(qry.CopyToDataTable());
                }
                return dsRet;
            }
            catch (System.Data.SqlClient.SqlException ex)
            {
            }
            catch (Exception)
            {
                throw;
            }
    }

 

Archive for

September 2011

11
To Posterous, Love Metalab