Pizza

 

Pizza is a yeasted flatbread popularly topped with tomato sauce and cheese and baked in an oven. It is commonly topped with a selection of meats, vegetables and condiments. The term was first recorded in the 10th century, in a Latin manuscript from Gaeta in Central Italy.
The modern pizza was invented in Naples, Italy, and the dish and its variants have since become popular and common in many areas of the world.

Let’s make Pizza

Continue reading

Android COding

Android

Home Page

package com.sliit.model2018;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Home extends AppCompatActivity {

    private Button updateProfileBtn;
    private Button registerBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);

        registerBtn = (Button) findViewById(R.id.register_btn);

        registerBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Home.this,ProfileManagement.class);
                startActivity(intent);
            }
        });

        updateProfileBtn = (Button) findViewById(R.id.update_profile_btn);

        updateProfileBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent(Home.this,EditProfile.class);
                startActivity(intent);

            }

        });


    }
}

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


Profile Management

package com.sliit.model2018;

import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;

public class ProfileManagement extends AppCompatActivity {

    private Button registerBtn;
    private EditText getUName;
    private EditText getDob;
    private EditText getPwd;
    private int compareId;
    private RadioGroup getGender;
    private RadioButton radioBtnGender;
    private DBHandler dbHandler;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_profile_management);
        registerBtn = (Button) findViewById(R.id.register_btn_two);
        dbHandler = new DBHandler(this);
        registerBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
               getUName = (EditText) findViewById(R.id.user_Name_txt);
               getDob = (EditText) findViewById(R.id.dob_txt);
               getPwd = (EditText) findViewById(R.id.pwd_txt);
                getGender = (RadioGroup) findViewById(R.id.gender_radio_group);
                compareId =getGender.getCheckedRadioButtonId();
                radioBtnGender = (RadioButton) findViewById(compareId);

                Boolean id = dbHandler.addInfo(getUName.getText().toString(),getDob.getText().toString(),getPwd.getText().toString(),radioBtnGender.getText().toString());
               // Boolean id = dbHandler.addInfo("Tharindu","94/09/30","Secret","male");

                if(id==false)
                {

                    Toast.makeText(ProfileManagement.this, "The Database is empty  :(.", Toast.LENGTH_LONG).show();

                } else
                {
                    Toast.makeText(ProfileManagement.this, "Successfully added..!", Toast.LENGTH_LONG).show();
                }

            }
        });

    }
}

Edit Profile

package com.sliit.model2018;

import android.database.Cursor;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;

public class EditProfile extends AppCompatActivity {

    Button search;
    Button edit;
    Button delete;
    EditText uName;
    EditText dob;
    EditText pwd;
    RadioButton male;
    RadioButton female;
    DBHandler db ;
    Cursor data;
    String x;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_edit_profile);

        uName = (EditText) findViewById(R.id.search_u_name);
        search = (Button) findViewById(R.id.search_btn);
        dob = (EditText) findViewById(R.id.get_dob);
        pwd = (EditText) findViewById(R.id.get_pwd);
        male = (RadioButton) findViewById(R.id.edit_male_radio_btn);
        female = (RadioButton) findViewById(R.id.edit_female_radio_btn);
        edit = (Button) findViewById(R.id.edit_btn);
        delete = (Button) findViewById(R.id.delete_btn);

        db = new DBHandler(this);

        search.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                data = db.readAllInfor(uName.getText().toString());

                        while (data.moveToNext()) {
                            dob.setText(data.getString(2));
                            pwd.setText(data.getString(3));
                            //x = data.getString(4);
                            if("male".equals(data.getString(4)) || "Male".equals(data.getString(4))) {

                                male.setChecked(true);

                            }else {

                                female.setChecked(true);

                            }
                        }

            }
        });


            edit.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    Boolean result = db.updateInfor(uName.getText().toString(),dob.getText().toString(),pwd.getText().toString(),x);

                    if(result==false)
                    {

                        Toast.makeText(EditProfile.this, "Update was failed..!  :(.", Toast.LENGTH_LONG).show();

                    } else
                    {
                        Toast.makeText(EditProfile.this, "Successfully updated..!", Toast.LENGTH_LONG).show();
                    }

                }
            });


            delete.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    int val = db.deleteInfo(uName.getText().toString());

                    if(val != 1)
                    {

                        Toast.makeText(EditProfile.this, "Not updated..! :(", Toast.LENGTH_LONG).show();

                    } else
                    {
                        Toast.makeText(EditProfile.this, "Successfully updated..!", Toast.LENGTH_LONG).show();
                    }

                }
            });



    }
}


User Profile

package com.sliit.model2018;

import android.provider.BaseColumns;

public final class UserProfile {


    private UserProfile() {}

    public static class Users implements BaseColumns{

        public static final String TABLE_NAME = "userDetails";
        public static final String COLUMN_NAME_USERNAME = "userName";
        public static final String COLUMN_NAME_DOB = "dateOfBirth";
        public static final String COLUMN_NAME_PWD = "password";
        public static final String COLUMN_NAME_GENDER = "gender";

    }

}


DBHandler

package com.sliit.model2018;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.view.View;

public class DBHandler extends SQLiteOpenHelper {

    private static final int DATABASE_VERSION = 1;
    private static final String DATABASE_NAME = "userInfo";
    private static final String createTable = "CREATE TABLE " + UserProfile.Users.TABLE_NAME + " (" + UserProfile.Users._ID + " INTEGER PRIMARY KEY," + UserProfile.Users.COLUMN_NAME_USERNAME + " TEXT NOT NULL ," + UserProfile.Users.COLUMN_NAME_DOB + " TEXT ," + UserProfile.Users.COLUMN_NAME_PWD + " TEXT ," + UserProfile.Users.COLUMN_NAME_GENDER + " TEXT )";
    private static final String deleteTable = "DROP TABLE IF EXISTS " + UserProfile.Users.TABLE_NAME;

    public DBHandler(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
        SQLiteDatabase db = this.getWritableDatabase();
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        db.execSQL(createTable);

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

        db.execSQL(deleteTable);
        onCreate(db);

    }

    public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        onUpgrade(db, oldVersion, newVersion);
    }

    public Boolean addInfo(String uName, String dob, String pwd, String gender) {
        long newRowId = 0;
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues values = new ContentValues();
        values.put(UserProfile.Users.COLUMN_NAME_USERNAME, uName);
        values.put(UserProfile.Users.COLUMN_NAME_DOB, dob);
        values.put(UserProfile.Users.COLUMN_NAME_PWD, pwd);
        values.put(UserProfile.Users.COLUMN_NAME_GENDER, gender);

        newRowId = db.insert(UserProfile.Users.TABLE_NAME, null, values);

        if (newRowId == -1) {
            return false;
        } else {
            return true;
        }

    }

    public Boolean updateInfor( String uName, String dob, String pwd, String gender) {

        ContentValues values = new ContentValues();
        SQLiteDatabase db = this.getWritableDatabase();
        values.put(UserProfile.Users.COLUMN_NAME_USERNAME, uName);
        values.put(UserProfile.Users.COLUMN_NAME_DOB, dob);
        values.put(UserProfile.Users.COLUMN_NAME_PWD, pwd);
        values.put(UserProfile.Users.COLUMN_NAME_GENDER, gender);

        String condition = UserProfile.Users.COLUMN_NAME_USERNAME + " LIKE ?";
        String[] condition_value = {uName};

        int result = db.update(UserProfile.Users.TABLE_NAME, values, condition, condition_value);

        if (result == -1) {
            return false;
        } else {
            return true;
        }

    }

    public Cursor readAllInfor() {

        SQLiteDatabase db = getWritableDatabase();
        Cursor data = db.rawQuery("SELECT * FROM " + UserProfile.Users.TABLE_NAME, null);
        return data;

    }

    public Cursor readAllInfor(String uName) {

        SQLiteDatabase db = getWritableDatabase();
        Cursor data = db.rawQuery("SELECT * FROM " + UserProfile.Users.TABLE_NAME + " WHERE " + UserProfile.Users.COLUMN_NAME_USERNAME+ " = '" + uName+"'", null);
        return data;

    }

    public Integer deleteInfo(String uName) {

        SQLiteDatabase db = getWritableDatabase();
        int result = db.delete(UserProfile.Users.TABLE_NAME, UserProfile.Users.COLUMN_NAME_USERNAME + " LIKE ?", new String[]{uName});
        return result;

    }

}

Quick Pickled Cucumbers

A pickled cucumber (commonly known as a pickle in the United States and Canada or generically as gherkins in the United Kingdom, Ireland, and Australia) is a cucumber that has been pickled in a brine, vinegar, or other solution and left to ferment for a period of time, by either immersing the cucumbers in an acidic solution or through souring by lacto-fermentation.

 

Let’s make Quick Pickled Cucumbers

Continue reading

Nigiri Sushi

Sushi (すし, 寿司, 鮨?) is the Japanese preparation and serving of specially prepared vinegared rice (鮨飯 sushi-meshi) combined with varied ingredients (ネタ neta) such as chiefly seafood (often uncooked), vegetables, and occasionally tropical fruits. Styles of sushi and its presentation vary widely, but the key ingredient in all cases is the sushi rice, also referred to as shari (しゃり), or sumeshi (酢飯).

Sushi can be prepared with either brown or white rice. It is often prepared with raw seafood, but some common varieties of sushi use cooked ingredients, and many other sorts are vegetarian. Sushi is often served with pickled ginger, wasabi, and soy sauce. Daikon radish is popular as a garnish.

Sushi is often confused with sashimi, a related Japanese dish consisting of thinly sliced raw meat or fish and an optional serving of rice. Sashimi is served as slices, unlike sushi, which is served as rolls.

Let’s make Nigiris Sushi

Continue reading

Chapatis

Chapati (alternatively spelled chapatti, chappati, chapathi, or chappathi), also known as roti and (in the Maldives) roshi, is an unleavened flatbread from the Indian Subcontinent; and popular staple in India, Nepal, Bangladesh, Pakistan, and Sri Lanka. Chapati is made of whole wheat flour known as Atta, salt and water, and is cooked on a tava (flat skillet).

It is a common staple in South Asia as well as amongst South Asian expatriates throughout the world. Chapatis were also introduced to other parts of the world by South Asian immigrants, particularly by Indian merchants to Central Asia, Southeast Asia, East Africa, and the Caribbean islands.

 

Let’s make Chapati

Continue reading

Double-Decker Truffled Grilled Cheese Sandwich

A sandwich is a food typically consisting of vegetables, sliced cheese or meat, placed on or between slices of bread, or more generally any dish wherein two or more pieces of bread serve as a container or wrapper for another food type. The sandwich began as a portable finger food in the Western world, though over time it has become prevalent worldwide.

Sandwiches are a popular type of lunch food, taken to work, school, or picnics to be eaten as part of a packed lunch. The bread can be either plain, or coated with condiments such as mayonnaise or mustard, to enhance its flavour and texture. As well as being homemade, sandwiches are also widely sold in restaurants and can be served hot or cold.  There are both savoury sandwiches, such as deli meat sandwiches, and sweet sandwiches, such as a peanut butter and jelly sandwich.

The sandwich is considered to have been named after John Montagu, 4th Earl of Sandwich, the inventor, it is claimed, of this food combination. The Wall Street Journal has described it as Britain’s “biggest contribution to gastronomy”.

 

Let’s make Double-Decker Truffled Grilled Cheese Sandwich

Continue reading

Garlic Bread

Garlic bread (also garlic toast) consists of bread (usually a baguette or sour dough like a ciabatta), topped with garlic and olive oil or butter and may include additional herbs, like chives. It is then either grilled or broiled until toasted, or baked in a conventional or bread oven.

It is typically made using a French baguette, or sometimes a sourdough like ciabatta which is partially sliced downwards, allowing the condiments to soak into the loaf while keeping it in one piece. The bread is then stuffed through the cuts with oil and minced garlic before baking. Alternatively, butter and garlic powder are used, or the bread is cut lengthwise into separate slices which are individually garnished.

Some variants are topped with a variety of cheeses, often mozzarella, cheddar or feta. Some restaurants use clarified butter in place of olive oil.

Let’s make Garlic Bread

Continue reading