EXIT CODE

Featured by

INTRODUCTION TO C#

Microsoft’s .NET and C# opens a whole New World of possibilities. There are many people in the industry, which see a great future to the .NE...

26/08/2016

Reasons for C# programing in the Field of Technology

To learn the C# language, I had to refer to all available material – books, articles on the net, discussion groups. As I studied the C# language, I kept making notes. I felt the need of a single repository where individuals could go to and know everything about a particular topic in C# – this repository became the Study Notes. Please appreciate, that this is not a book on C#.

INTRODUCTION TO C#

Microsoft’s .NET and C# opens a whole New World of possibilities. There are many people in the industry, which see a great future to the .NET. We now have .NET, a new and exciting technology that finally addresses issues we’ve been grappling with for years.

WHAT IT MEANS TO START C#
To build and run your C# programs, you will need Windows 2000, IE 5.5, Microsoft .NET SDK (Beta 1), an optional Visual Studio .NET (available for MSDN Universal Subscribers) and an optional free C# IDE – Sharp Develop. The C# IDE is available from http://www.icsharpcode.net/OpenSource/SD/Download/default.asp . The .NET SDK can be downloaded from http://msdn.microsoft.com/net It’s an 80MB download. The C# compiler (csc.exe) currently ships with the .NET beta. Do not get confused by this, because as of today we have the Beta 1 version of .NET, the PDC version and the pre Beta 2 version. The use of Visual Studio.NET has been intentionally avoided, to focus on the language and runtime environment and not place any restrictions on your particular development environment. Therefore, all the sample codes in these notes will compile and run from the command line.

17/08/2016

CODES FOR Android:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import example.david.R;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;

public class Viewall extends Activity {
    String JsonResult;
    ListView vx;
    JSONArray Rdetails;
    ArrayList<HashMap<String, String>>registerList;
private String URLRetrievedetails ="http://10.0.2.2/nanyonga/retrive.php";
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.viewall);
        vx=(ListView)findViewById(R.id.va);
        registerList=new ArrayList<HashMap<String, String>>();
        getData();

}
private class JsonReaddetails extends AsyncTask<String, Void, String> {
       
          @Override
          protected String doInBackground(String... params) {
             
           HttpClient httpclient = new DefaultHttpClient();
           HttpPost httppost = new HttpPost(params[0]);
           try {
            HttpResponse response = httpclient.execute(httppost);
            JsonResult = inputStreamToString(
              response.getEntity().getContent()).toString();
           }
       
           catch (ClientProtocolException e) {
            e.printStackTrace();
           } catch (IOException e) {
            e.printStackTrace();
           }
           return null;
          }
       
          private StringBuilder inputStreamToString(InputStream is) {
           String rLine = "";
           StringBuilder answer = new StringBuilder();
           BufferedReader rd = new BufferedReader(new InputStreamReader(is));
       
           try {
            while ((rLine = rd.readLine()) != null) {
             answer.append(rLine);
            }
           }
       
           catch (IOException e) {
            // e.printStackTrace();
            Toast.makeText(getApplicationContext(),"Error..." + e.toString(), Toast.LENGTH_LONG).show();
           }
           return answer;
          }
       
          @Override
          protected void onPostExecute(String result) {
              ShowResult();
          }
         }
         // end async task
       
         public void getData() {
             JsonReaddetails pdetails = new JsonReaddetails();
          // passes values for the urls string array
          pdetails.execute(new String[] { URLRetrievedetails });
         }
       
         // build hash set for list view
         public void ShowResult() {
             // either you can call ArrayList here or in the method
    //personalList = new ArrayList<HashMap<String, String>>();
          try {
           JSONObject jsonResponse = new JSONObject(JsonResult);
           Rdetails = jsonResponse.getJSONArray("Register");
         // here we are looping
           for (int i = 0; i < Rdetails.length(); i++) {
              
            JSONObject y = Rdetails.getJSONObject(i);
            String first= y.getString("FirstName");
           String last = y.getString("LastName");
           String tel = y.getString("Telephone");
           String uname = y.getString("Username");
           String pass = y.getString("Password");
            String outPut ="\n\n"  +"FName=:"+" "+first+"\n"+"LName=:"+" "+last+"\n"+"Tel=:"+" "+tel+"\n"+"UserN=:"+" "+uname+"\n"+"PasswOrd=:"+pass+"\n";
            registerList.add(CreateRegister("registerdetails", outPut));
           }
          } catch (JSONException e) {
           Toast.makeText(getApplicationContext(), "Error" + e.toString(),
             Toast.LENGTH_SHORT).show();
          }
       
          SimpleAdapter simpleAdapter = new SimpleAdapter(this, registerList,android.R.layout.simple_list_item_1,
            new String[] { "registerdetails" }, new int[] { android.R.id.text1 });
          vx.setAdapter(simpleAdapter);
         }
         // this definies the table.You can use all field or you can use afew
         private HashMap<String, String> CreateRegister(String  firsname, String lastname) {
          HashMap<String, String> registerList = new HashMap<String, String>();
          registerList.put(firsname, lastname);
          return registerList;
         }
    //===============================================================================================
         // the view /display codes endes here
         //==========================================================================================
       


Most people tend to lose hope if any part of their machines has got any fault but trust us  this is not as difficult as we think because anyone either me or you can fix any basic fault on your machine and this is as simple as eating a piece of cake.so in any case your machine is doing some thing you don't know please don't hesitate to ask help from our team .If you also  have any system that you would like to come up with or you need any  team to design for you a particular system for any of your business.also contact Ian's IT consultancy.





if your not well informed about the basics of a computer and you need prior knowledge about the functions and also how most times machines are assembled please visit this blog for  help or contact me at crudiossegawa@gmail.com