My Professional Profile

I am Johnson Augustine Sr.Software Engineer and System Architect. I have 10 Yrs of hands on expertise in ASP.net MVC 5 , Angular 5 , C# MVC Razor, WPF MVVM , Android , IOS Swift 3 , IOS11 MSSQL,MySQL Database,,PHP,C/C++/Visual C++/G++/QT++,Com,DirectX,Open CV,EMGU CV , embedded System Development , [Raspberry PI]. ,html,Javascript,Jquery,Ajax.CSS , Networking ,Cyber security, Ethical Hacking You can see my professional profile at http://linkedin.com/in/johnsontaugustine Email : johnsonaugustine@live.com

Saturday, 23 November 2013

Google Web designer

Google has relesed beta version of a tool for web design using html,java script,jquery etc , It is much simple and easy to use

Download from http://www.google.com/webdesigner

What is new update in android

Wow! Google released new IDE for Android named android studio , It is not much stable but google done a great job ,
Download android studio , it is much user friendly than Eclipse 

Cloud computing services or what is cloud computing means?

The basic idea of the cloud is always the same. It is a form of technology that allows enterprises, and small business alike,  to run applications that are housed away from the enterprises itself. In spite of this shared basic definition, however, there are several different types of cloud computing.

Web Based Cloud Computing. With this type of cloud computing, companies can use the functionality offered by a web service, and they do not have to develop a full application for their needs.

Infrastructure as a Service (IaaS). With IaaS, organizations have access to the unlimited storage potential of the cloud. They can grow and shirk their storage space as needed. This means that they do not have to worry about having dedicated servers on site. It also means that they can weather increased use of their sites or applications as needed.

Software as a Service (SaaS). This type of cloud computing is also referred to as software on demand. It can be used my many different people for a variety of functions. A popular example of SaaS is Google docs. SaaS allows people to access the functionality of a particular software without worrying about storage or other issues.

Platform as a Service (PaaS). With platform as a service, organizations can run their own software without having to worry about maintaining hard drives and servers. Instead, they can run their own applications on the cloud service’s platform.

Utility Services. This is ideal for companies who need to store a lot of data. With this type of cloud computing, companies can store all of their data remotely, and they can even create a virtual data centre.

Managed Services. Managed services are not applications that are used by the members of an organization. Instead, these are applications that are utilized by the cloud provider. Perhaps the most obvious example of a managed service is an anti-spam service.

Service Commerce. A perfect blend of Software as a Service and Managed Services, Service Commerce creates a hub of applications that can be used by an organization’s members or a company’s employees. With service commerce, organizations can set up the applications that they need along with the support that they desire.

The many different types of cloud computing mean that enterprises can easily find what they need to support their growth and potential.

The main cloud service providers are : Microsoft, Amazon, Softlayer, Scibero, HP , google etc.


WHMCS in plesk /Cpanel is not working showing error 500

WHMCS is not working showing error 500 ( Fast cgi execution terminated)

This is due to the PHP version, please upgrade your php version to higher.

How to check a software dependency of an executable

To do this just use dependency walker  softwareDependency Walker 2.2 Dependency Walker 2.2

How to open two main window simultaneously in QT

To do this just make one main window as mode less 

Space key press is not working in QT GUI app

Space key press  is not  working in QT GUI app , Why ?

Your controls in the form might have strong focuss , so you should remove the strong focus of all controls and then just give strong focus to form from properties in the right side . This will fix the problem

Wednesday, 13 November 2013

How to append two strings in C++/QT

To append two strings in qt just use .append () function

Eg : str.append();

Thursday, 7 November 2013

Key press event in QT

#include<QEvent>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
       MainWindow(QWidget *parent = 0);
    ~MainWindow();

protected:
   
      void keyPressEvent(QKeyEvent *event);
private:
    Ui::MainWindow *ui;
 
private slots:
 
};

#endif // MAINWINDOW_H

.cpp file
=======

void MainWindow::keyPressEvent(QKeyEvent *event)
 {
     if(event->key() == Qt::Key_Escape)
        {
            qDebug() << "ESC";
        }
     if(event->key() == Qt::Key_Q)
        {
            qDebug() << "key q";
        }

 }

How to create Socket communication in C++ Linux Based application server socket

#include <iostream>
#include <cstring>      // Needed for memset
#include <sys/socket.h> // Needed for the socket functions
#include <netdb.h>      // Needed for the socket functions

int main()
{

    int status;
    struct addrinfo host_info;       // The struct that getaddrinfo() fills up with data.
    struct addrinfo *host_info_list; // Pointer to the to the linked list of host_info's.

    // The MAN page of getaddrinfo() states "All  the other fields in the structure pointed
    // to by hints must contain either 0 or a null pointer, as appropriate." When a struct
    // is created in c++, it will be given a block of memory. This memory is not nessesary
    // empty. Therefor we use the memset function to make sure all fields are NULL.
    memset(&host_info, 0, sizeof host_info);

    std::cout << "Setting up the structs..."  << std::endl;

    host_info.ai_family = AF_UNSPEC;     // IP version not specified. Can be both.
    host_info.ai_socktype = SOCK_STREAM; // Use SOCK_STREAM for TCP or SOCK_DGRAM for UDP.
    host_info.ai_flags = AI_PASSIVE;     // IP Wildcard

    // Now fill up the linked list of host_info structs with google's address information.
    status = getaddrinfo("127.0.0.1", "5556", &host_info, &host_info_list);
    // getaddrinfo returns 0 on succes, or some other value when an error occured.
    // (translated into human readable text by the gai_gai_strerror function).
    if (status != 0)  std::cout << "getaddrinfo error" << gai_strerror(status) ;


    std::cout << "Creating a socket..."  << std::endl;
    int socketfd ; // The socket descripter
    socketfd = socket(host_info_list->ai_family, host_info_list->ai_socktype,
                      host_info_list->ai_protocol);
    if (socketfd == -1)  std::cout << "socket error " ;

    std::cout << "Binding socket..."  << std::endl;
    // we use to make the setsockopt() function to make sure the port is not in use
    // by a previous execution of our code. (see man page for more information)
    int yes = 1;
    status = setsockopt(socketfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int));
    status = bind(socketfd, host_info_list->ai_addr, host_info_list->ai_addrlen);
    if (status == -1)  std::cout << "bind error" << std::endl ;

    std::cout << "Listen()ing for connections..."  << std::endl;
    status =  listen(socketfd, 5);
    if (status == -1)  std::cout << "listen error" << std::endl ;


    int new_sd;
    struct sockaddr_storage their_addr;
    socklen_t addr_size = sizeof(their_addr);
    new_sd = accept(socketfd, (struct sockaddr *)&their_addr, &addr_size);
    if (new_sd == -1)
    {
        std::cout << "listen error" << std::endl ;
    }
    else
    {
        std::cout << "Connection accepted. Using new socketfd : "  <<  new_sd << std::endl;
    }


    std::cout << "Waiting to recieve data..."  << std::endl;
    ssize_t bytes_recieved;
    char incomming_data_buffer[1000];
    bytes_recieved = recv(new_sd, incomming_data_buffer,1000, 0);
    // If no data arrives, the program will just wait here until some data arrives.
    if (bytes_recieved == 0) std::cout << "host shut down." << std::endl ;
    if (bytes_recieved == -1)std::cout << "recieve error!" << std::endl ;
    std::cout << bytes_recieved << " bytes recieved :" << std::endl ;
    incomming_data_buffer[bytes_recieved] = '\0';
    std::cout << incomming_data_buffer << std::endl;


    std::cout << "send()ing back a message..."  << std::endl;
    char *msg = "thank you.";
    int len;
    ssize_t bytes_sent;
    len = strlen(msg);
    bytes_sent = send(new_sd, msg, len, 0);

    std::cout << "Stopping server..." << std::endl;
    freeaddrinfo(host_info_list);
    close(new_sd);
    close(socketfd);

return 0 ;


}

How to create Socket communication in C++ Linux Based application Client socket

TCP Client Socket
================

#include <iostream>
#include <cstring>      // Needed for memset
#include <sys/socket.h> // Needed for the socket functions
#include <netdb.h>      // Needed for the socket functions

int main()
{

    int status;
    struct addrinfo host_info;       // The struct that getaddrinfo() fills up with data.
    struct addrinfo *host_info_list; // Pointer to the to the linked list of host_info's.

    // The MAN page of getaddrinfo() states "All  the other fields in the structure pointed
    // to by hints must contain either 0 or a null pointer, as appropriate." When a struct
    // is created in c++, it will be given a block of memory. This memory is not nessesary
    // empty. Therefor we use the memset function to make sure all fields are NULL.
    memset(&host_info, 0, sizeof host_info);

    std::cout << "Setting up the structs..."  << std::endl;

    host_info.ai_family = AF_UNSPEC;     // IP version not specified. Can be both.
    host_info.ai_socktype = SOCK_STREAM; // Use SOCK_STREAM for TCP or SOCK_DGRAM for UDP.

    // Now fill up the linked list of host_info structs with google's address information.
    status = getaddrinfo("127.0.0.1", "5556", &host_info, &host_info_list);
    // getaddrinfo returns 0 on succes, or some other value when an error occured.
    // (translated into human readable text by the gai_gai_strerror function).
    if (status != 0)  std::cout << "getaddrinfo error" << gai_strerror(status) ;


    std::cout << "Creating a socket..."  << std::endl;
    int socketfd ; // The socket descripter
    socketfd = socket(host_info_list->ai_family, host_info_list->ai_socktype,
                      host_info_list->ai_protocol);
    if (socketfd == -1)  std::cout << "socket error " ;


    std::cout << "Connect()ing..."  << std::endl;
    status = connect(socketfd, host_info_list->ai_addr, host_info_list->ai_addrlen);
    if (status == -1)  std::cout << "connect error" ;


    std::cout << "send()ing message..."  << std::endl;
    char *msg = "GET / HTTP/1.1\nhost: www.google.com\n\n";
    int len;
    ssize_t bytes_sent;
    len = strlen(msg);
    bytes_sent = send(socketfd, msg, len, 0);

    std::cout << "Waiting to recieve data..."  << std::endl;
    ssize_t bytes_recieved;
    char incomming_data_buffer[1000];
    bytes_recieved = recv(socketfd, incomming_data_buffer,1000, 0);
    // If no data arrives, the program will just wait here until some data arrives.
    if (bytes_recieved == 0) std::cout << "host shut down." << std::endl ;
    if (bytes_recieved == -1)std::cout << "recieve error!" << std::endl ;
    std::cout << bytes_recieved << " bytes recieved :" << std::endl ;
    incomming_data_buffer[bytes_recieved] = '\0' ;
    std::cout << incomming_data_buffer << std::endl;
    std::cout << "Receiving complete. Closing socket..." << std::endl;
    freeaddrinfo(host_info_list);
    close(socketfd);

}

Monday, 4 November 2013

What is WCF ?

WCF is (Windows communication foundation ) is a set of APIs and run time in the dot net frame to develop service oriented applications. Its previous name was indigo. In wsdl it support only limited network protocols but in wcf it supports most of the protocol stack and easy to use and it is available in visual studio 2008 onwards.