Skip to content

Instantly share code, notes, and snippets.

View AseedUsmani's full-sized avatar
💭
The bug's putting me into depression.

Aseed Usmani AseedUsmani

💭
The bug's putting me into depression.
View GitHub Profile
/*
* consists of create, insert and display functions
* baaki ka algo dekh ke khhud bana lena :P
* algo aman ko bheja tha
*/
/* ALGOS FOR DELETION */
/*
1) FIRST NODE
class modelClass {
//getter and setter
private String name; //variable to be set and get
public void modelClass() { } //empty default constructor
public void modelClass (String name) {
this.name=name;
}
public class WaiterForm {
private static String tableNumber, remarks, billNumber, amount;
public WaiterForm() {
}
public void setTableNumber(String tableNumber) {
this.tableNumber = tableNumber;
}
package com.custofeed.app.feedback.activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import com.custofeed.app.feedback.R;
public void login() {
StringRequest stringRequest = new StringRequest(Request.Method.POST, URL.POST_LOGIN,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject jsonObject = new JSONObject(response);
if(jsonObject.has("key")){
Toast.makeText(LoginActivity.this,
"Logging In",Toast.LENGTH_SHORT).show();
private void loginUser(){
final String username = mUsernameView.getText().toString().trim();
final String password = mPasswordView.getText().toString().trim();
StringRequest stringRequest = new StringRequest(Request.Method.POST, URLS.POST_LOGIN,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject jsonObject = new JSONObject(response);
package com.custofeed.app.feedback.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Interpolator;
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
tools:context="com.custofeed.app.feedback.activity.FeedbackActivity">
<!-- The primary full-screen view. This can be replaced with whatever view
is needed to present your content, e.g. VideoView, SurfaceView,
TextureView, etc. -->
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/activity_horizontal_margin">
<TextView
android:id="@+id/category_description"
android:layout_width="wrap_content"