Skip to content

Instantly share code, notes, and snippets.

const form = document.getElementById('vote-form');
var event;
function setCookie(cname,cvalue,exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires=" + d.toGMTString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
@chaitanyaGitHub1
chaitanyaGitHub1 / FoodItemAdapter.java
Created April 6, 2017 19:09
error creating quantity
package com.example.raghavendra.bawarchirestaurant;
/**
* Created by raghavendra on 4/5/2017.
*/
import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@chaitanyaGitHub1
chaitanyaGitHub1 / MainActivity.java
Created January 4, 2017 15:52
java code for coffee
/**
* Add your package below. Package name can be found in the project's AndroidManifest.xml file.
* This is the package name our example uses:
*
* package com.example.android.justjava;
*/
package com.example.andriod.jusjava;
/**
* This method displays the given price on the screen.
*/
private void displayPrice(int number) {
TextView priceTextView = (TextView) findViewById(R.id.price_text_view);
priceTextView.setText(NumberFormat.getCurrencyInstance().format(number));
}
@chaitanyaGitHub1
chaitanyaGitHub1 / activity_main.xml
Created December 30, 2016 07:40 — forked from anonymous/activity_main.xml
RelativeLayout XML for Udacity quiz question
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp">
<TextView
android:text="I’m in this corner"
android:layout_height="wrap_content"
android:layout_width="wrap_content"