Sunday, 22 July 2012

Software Logixtics has been Launched at 21-July 2012.







The software Logixtics was started in 22nd May 2012 by taking this mission that every problem should be solved with the help of technology and giving opportunities to resolve business, social and technological problems by joining the Software Logixtics.


Mr Adnan Naseer Sheikh (Founder)
Mr.Syed Aoun Ali Naqvi (Co- Founder)
The Young Enterpreneurs of NED University of Engineering & Technology Karachi have started their Software Development Company Which Provides Various Product based and Project based Development.

The ideas which make the technology useful for all, was encouraged from technical people to a common people.  It is all about exploring, working and developing ideas for latest technologies. To solve the world’s toughest problems, only a mind of smart people can have creation, innovation and ideas to change the way of thinking and working in the world.
The team efforts are towards the height of success of humanity and work for the benefits of business economy and explore the software era with highly imaginative team members. Consider all types of problems bringing up on a single platform to make initiative for the solutions community by technology expertise, professionals, software engineers and programmers towards the change in the era of software world


Saturday, 9 June 2012

Alert! There is a Fake Gmail Android application that steals personal data



Summarized Detail: Mobile security researchers from NQ Mobile have intercepted a fake Gmail Android application dubbed DDSpy.

The SMS based command and control feature of DDSpy is capable of uploading SMS messages, call logs, and vocal records to a remote server. The malware authors behind the fake Gmail Android application have included a hard-coded email address which can be easily changed using SMS messages. Moreover, the malicious application automatically starts recording outbound calls, or when instructed to do so over SMS.
According to NQ Mobile’s researchers, they expect that the new features will be introduced in this malicious applications, due to the spotted unused interfaces using GPS technology which they found while analyzing the malicious application.

Friday, 25 May 2012

When the World Will be Ended

It is a very intersting sentence asked and also think by most of the people that when the world will be end.
some says the dooms day will be soon and some says it is too far, many religions of the world also focus this thing including Islam ,Christianity ,Jodhism ,Budhism ,Hinduism etc and in many religious books of the big religions of the world also talked about this and gave number of predictions on that day,,

Well! in this era in which we are living it is the era of technology , where the human have been reached on the Mars , Moon etc we have created the robots ,computers small device,Atom bombs and many other mass destruction weapons through which we can terrify the world and can also save the world,,, we blive that the day when the world will be end its too far away from us approximately after billions of years when the earth will totaly be freezed and emmited out total energy from it,,because according to the scientists the earth is continuousely releasing its energy and going away from sun and when it totaly lost its energy at that day it will be gone away from that sun and that day will be the dooms day or ending day of the earth..


if you like this intresting post then please subscribe us and post your comments...

Thanks

when will be world end


Wednesday, 23 May 2012

Young Enterprenures Of NED University Of Engineering & Technology Karachi Launched their Software House in Karachi Pakistan



banner


A New Software House is going to be launched soon By the young Enterprenure of NED University Of Engineering And Technology Karachi

Mr Adnan Naseer Sheikh and Mr.Aoun Ali Naqvi are Young Enterprenure,They have decided to provide the Simple Software Solution through tough tecnologies and platforms like dontnet or other Open source plateforms. the software house also provides the oppertunity to the young students of different universities that they can join and develop the most challenging mobile and web based applications and can sale there softwares through the third party services that is provided by "LOGIXTICS".

It will be benificial for the students to create their own jobs ,generate their own revenue which is the better approach for creating the jobs in Pakistan ,"LOGIXTICS " also provides the chance for the part time workers to develop apps at their home and sale to it to Logixtics on a suitable package or price.

Our Official Social Network page on Facebook is following

https://www.facebook.com/Logixtics 

Our Official Website is going to be launched soon

We need your Support and prayers and best wishes

Thanks

Please Subscribe us .

Monday, 21 May 2012

Data Exporting to MS-Excel in Webmatrix


Hey Guys! I 've researched on new topic ..
This solution uses the System.Data.SqlServerCe.dll, should be referenced in Web.config file, and also three more functions

Here in Web.config file you should write this code

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
      </assemblies>
    </compilation>
  </system.web>
</configuration>
There is an add assembly setting that references the System.Data.SqlServerCe.dll assembly which is needed during the compilation of the web page eg: for further you should see CreateDataTable function.

Here the CreateDataTable function
public static DataTable CreateDataTable(string sqlCeDb, string sqlCmd)
{
    DataSet dataSet = new DataSet();
    DataTable dt = new DataTable();
   
    try {
        SqlCeConnection sqlConn= new SqlCeConnection();
        sqlConn.ConnectionString = "Data Source = " + sqlCeDb;

        SqlCeCommand cmd = new SqlCeCommand();
        cmd.CommandType = CommandType.Text;
        cmd.CommandText = sqlCmd;
        cmd.Connection = sqlConn;

        sqlConn.Open();
        SqlCeDataAdapter sda = new SqlCeDataAdapter(cmd);
   
        sda.Fill(dataSet);
        sqlConn.Close();
       
        dt = dataSet.Tables[0];
        return dt;
    }
    catch (Exception ex)
    {
        return dt;
    }     
}


This CreateDataTable function opens a connection with the SQL Server CE database and exports data as DataTable from the database.
It accepts the physical path of the SQL Server CE .sdf file as first parameter and the SQL query extracting data from the database as second parameter.
The function instantiates classes from the System.Data.SqlServerCe namespace, that must be referenced in   Web.Config.

Here the ExportToExcel function
public static int ExportToExcel(DataTable dt, string excelFile, string sheetName)
{
    // Create the connection string
    string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +
        excelFile + ";Extended Properties=Excel 12.0 Xml;";
   
    int rNumb = 0;
    try
    {
        using (OleDbConnection con = new OleDbConnection(connString))
        {
            con.Open();
           
            // Build the field names string
            StringBuilder strField = new StringBuilder();
            for (int i = 0; i < dt.Columns.Count; i++)
            {
                strField.Append("[" + dt.Columns[i].ColumnName + "],");
            }
            strField = strField.Remove(strField.Length - 1, 1);
           
            // Create Excel sheet
            var sqlCmd = "CREATE TABLE [" + sheetName + "] (" + strField.ToString().Replace("]", "] text") + ")";
            OleDbCommand cmd = new OleDbCommand(sqlCmd, con);
            cmd.ExecuteNonQuery();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
               
                // Insert data into Excel sheet
                StringBuilder strValue = new StringBuilder();
                for (int j = 0; j < dt.Columns.Count; j++)
                {
                    strValue.Append("'" + AddSingleQuotes(dt.Rows[i][j].ToString()) + "',");
                }
                strValue = strValue.Remove(strValue.Length - 1, 1);
                
                cmd.CommandText = "INSERT INTO [" + sheetName + "] (" + strField.ToString() + ") VALUES (" +
                        strValue.ToString() + ")";
                cmd.ExecuteNonQuery();
                rNumb = i + 1;
            }
            con.Close();
        }
        return rNumb;
    }
    catch (Exception ex)
    {
        return -1;
    }
}

The ExportToExcel function receives a DataTable as first parameter and transfers its content into a sheet (with name from the third parameter) of a new Excel file created at the path passed with the second parameter.
If the function is successful, it returns the number of exported records, otherwise it returns -1.
It derives with some modifications from the Export function from Exporting Data to Excel; in the following I highlight its points of interest.

The connection string
I have chosen to produce an Excel file in the new .xlsx file format introduced by Excel 2007, and so I have used a connection string to the Access Database Engine 2010, which exists in 32-bit and 64-bit versions and that must be downloaded from Microsoft Access Database Engine 2010 Redistributable, if it’s not present on your system yet.
Even if you want to create a traditional .xls file, you have to know that the old Microsoft OLE DB Provider for Jet is available in 32-bit version only.
So, the only solution for the web sites running on 64-bit environments is to use the Access Database Engine 2010 with a slightly different connection string:
Description: http://www.codeproject.com/images/minus.gif Collapse | Copy Code
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +
    excelFile + ";Extended Properties=Excel 8.0;";

The field names string
Two different SQL statements require a list of field name as string in the format
Description: http://www.codeproject.com/images/minus.gif Collapse | Copy Code
[field1],[field2],[field3],…,[fieldn]
The string is created by a for loop that appends to a StringBuilder object all the column names of the DataTable.

Create Excel sheet
The major simplification used by the function is that all the data from database are transferred to the Excel file as text.
This approach avoids to examine one by one the column data types of DataTable and create an Excel sheet with columns of the same source type.
So, all the columns of the Excel sheet are generated as text fields with a SQL statement that uses the field names string seen before adding to any field name “text” as data type with the use of a Replace("]", "] text")method.

Copy records from DataTable to Excel sheet
For each DataTable row a string is created appending all the row values and then the string is used together with the field names string to assemble a SQL statement that inserts the row values into the Excel sheet.
Note that the process of creating a field values string involves a call to the AddSingleQuote function to escape possible single quotes in the values.

Add Single Quote function
public static string AddSingleQuotes(string origText)
{
 string s = origText;
    int i = 0;
   
    while ((i = s.IndexOf("'", i)) != -1)
    {
        // Add single quote after existing
        s = s.Substring(0, i) + "'" + s.Substring(i);

        // Increment the index.
        i += 2;
    }
    return s;
}
If the text passed as value to the Insert SQL statement includes a single quote, SQL Server throws an error (Error: 105 Unclosed quotation mark after the character string ‘).
The function fixes this occurrence by escaping any single quote with the addition of a second single quote.

Now the sample application
To illustrate the use of my functions, I propose a simple site that extract data as Excel file from a sample database with a quite complex query.

The sample database I used is the TestDB.sdf file downloadable from the link SQL server compact Edition 4.0
It must be copied into the App_Data directory of the sample site and then Default.cshtml page can be launched in browser.
Obviously, the query I used could be replaced with a simpler one like

SELECT * FROM Customers



Thursday, 17 May 2012

Data Duplication Elimination or BSN(Basic Sorted Neighbourhood) Methods using C# (C-Sharp)


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication4
{
    class Program
    {
static void Main(string[] args)
        {
            List<person> persons = new List<person>();
            //database records entring
            person p = new person();
            //1st record
            p.id = 1;
            p.firstName = "Aoun";
            p.lastName = "Ali";
            p.age = 22;
            p.address = "Pakistan, karachi";

            persons.Add(p);

            //2nd record
            p = new person();
            p.id = 2;
            p.firstName = "Marium";
            p.lastName = "Hussain";
            p.age = 22;
            p.address = "Pakistan, Karachi";

            persons.Add(p);

            //3rd record
            p = new person();
            p.id = 3;
            p.firstName = "Osama";
            p.lastName = "Ali";
            p.age = 23;
            p.address = "Pakistan, karachi";

            persons.Add(p);

            //4th record
            p = new person();
            p.id = 4;
            p.firstName = "Ayesha ";
            p.lastName = "Ejaz";
            p.age = 22;
            p.address = "Pakistan, karachi";

            persons.Add(p);

            //5th record
            p = new person();
            p.id = 5;
            p.firstName = "Adnan";
            p.lastName = "Naseer";
            p.age = 23;
            p.address = "Pakistan, karachi";

            persons.Add(p);

            //6th record
            p = new person();
            p.id = 6;
            p.firstName = "Raheel";
            p.lastName = "Malik";
            p.age = 23;
            p.address = "Pakistan, islamabad";

            persons.Add(p);

            //7th record(redundant)
            p = new person();
            p.id = 7;
            p.firstName = "Aoun";
            p.lastName = "Ali";
            p.age = 22;
            p.address = "Pakistan, karachi";

            persons.Add(p);

            //8th record(redundant)
            p = new person();
            p.id = 8;
            p.firstName = "Marium";
            p.lastName = "Hussain";
            p.age = 22;
            p.address = "Pakistan, Karachi";

            persons.Add(p);

            //9th record(redundant)
            p = new person();
            p.id = 9;
            p.firstName = "Ayesha";
            p.lastName = "Ejaz";
            p.age = 23;
            p.address = "Pakistan, karachi";

            persons.Add(p);

            //10th record(redundant)
            p = new person();
            p.id = 10;
            p.firstName = "Osama";
            p.lastName = "Ali";
            p.age = 23;
            p.address = "Pakistan, karachi";

            persons.Add(p);
            //DATABASE END

            //display record
            Console.WriteLine("ID        First_Name       Last_Name       age       Address");
            for(int i=0; i<persons.Count  ; i++)
            {
                Console.WriteLine(persons[i].id + "        " + persons[i].firstName + "             " + persons[i].lastName + "            " + persons[i].age + "             " + persons[i].address);
            }
            Console.WriteLine("\n\n\n\n");


            List<string> key = new List<string>();

            //MAKING KEY BY CONCATENATING THE IMPORTANT COLUMNS ( I CHOOSE FIRST_NAME, AGE, ADDRESS)
            foreach (person pi in persons)
            {
                key.Add(pi.firstName + pi.age.ToString() + pi.address);
            }

            //SORT THE KEY FIRST
            key.Sort();

            //MAKING SORTED LIST ON THE BASIS OF SORTED KEY SO THAT REDUNDANT RECORDS COME NEXT TO EACH OTHER
            List<person> sortedlist = new List<person>();
            for (int i = 0; i < persons.Count; i++)
            {
                foreach (person pi in persons)
                {
                    if (key[i] == (pi.firstName + pi.age.ToString() + pi.address))
                    {
                        sortedlist.Add(pi);
                        break;
                    }
                }
            }

            Console.WriteLine("\n\n\n\n");

            //remove redundant data from sorted list
            for (int i = 0; i < sortedlist.Count - 1; i++)
            {
                string record1 = sortedlist[i].firstName + sortedlist[i].age.ToString() + sortedlist[i].address;
                string record2 = sortedlist[i + 1].firstName + sortedlist[i + 1].age.ToString() + sortedlist[i + 1].address;

                if (record1 == record2)
                    sortedlist.Remove(sortedlist[i]);
            }

            Console.WriteLine("After Applied BSN");
            Console.WriteLine("ID       First_Name      Last_Name     age     Address");
            for (int i = 0; i < sortedlist.Count; i++)
            {
                Console.WriteLine(sortedlist[i].id + "        " + sortedlist[i].firstName + "       " + sortedlist[i].lastName + "     " + persons[i].age + "     " + persons[i].address);
            }
            Console.ReadKey();
        }
    }

    class person
    {
        public int id;
        public string firstName;
        public string lastName;
        public int age;
        public string address;
    }


    }



Output:
Before BSN:

this is input or before bsn





After BSN:





I m also Giving a video reference This is in urdu Language from Virtual university ,Lecture of dataware housing.