Skip to content

Instantly share code, notes, and snippets.

View shah-smit's full-sized avatar
🎯
Focusing

Smit Shah shah-smit

🎯
Focusing
View GitHub Profile
package referencetypes;
import java.awt.Graphics;
import java.awt.Toolkit
import java.util.Random;
import goo.Goo;
public class GooDrops extends Goo {
@shah-smit
shah-smit / helper.script.js
Last active October 11, 2017 11:29
Helper for Axperiance
function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
xmlHttp.send( null );
return xmlHttp.responseText;
}
function httpPost(theUrl,obj)
{
@shah-smit
shah-smit / calculator-gridview.md
Created September 23, 2017 06:56
Android GridView Test

package a2017.simitclub.com.calculator;

 import android.os.Bundle;
 import android.app.Activity;
 import android.util.Log;
 import android.view.View;
 import android.widget.GridView;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.TextView;
 import android.widget.Toast;

public class MainActivity extends Activity {
 String msg = "Android : ";
 GridView gridView;
// static final String[] numbers = new String[] {
// "0", "1", "2", "3", "4",
// "5", "6", "7", "8", "9",
// "+", "-", "%", "/", "AC",};
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
// gridView = (GridView) findViewById(R.id.opertators);
//
// ArrayAdapter adapter = new ArrayAdapter(this,
//

@shah-smit
shah-smit / template.json
Created July 20, 2017 05:15
Azure Test Template
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"serverfarms_ServicePlan09286b4a_805c_name": {
"defaultValue": "ServicePlan09286b4a-805c",
"type": "String"
},
"sites_trabblebottest3_name": {
"defaultValue": "trabblebottest3",
@shah-smit
shah-smit / livestream.component.ts
Created July 16, 2017 08:54
Angular 4, Live Streaming
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { LoginService, AzureService } from '../services'
import { User, LiveSession } from '../models'
import { SharedService } from "app/services/shared.service";
//declare var SimpleWebRTC;
declare var io;
declare var conference;
@Component({
@shah-smit
shah-smit / payment.component.css
Created July 12, 2017 11:55
Stripe Payment into Angular 4
* {
font-family: "Helvetica Neue", Helvetica;
font-size: 15px;
font-variant: normal;
padding: 0;
margin: 0;
}
html {
height: 100%;
@shah-smit
shah-smit / Readme.md
Last active June 2, 2017 09:00
Angular 4, New Features

##Email Validation##

Add FormsModule to NgModule

import { FormsModule } from '@angular/forms'; @NgModule({
imports: [ [...] FormsModule ],

Add #form="ngForm" and email to the input for the validation

@shah-smit
shah-smit / fullcalendar.css
Created May 23, 2017 08:16
fullcalendar.min.css
/*!
* FullCalendar v3.2.0 Stylesheet
* Docs & License: https://fullcalendar.io/
* (c) 2017 Adam Shaw
*/.fc-icon,body .fc{font-size:1em}.fc-button-group,.fc-icon{display:inline-block}.fc-bg,.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-icon,.fc-unselectable{-khtml-user-select:none;-webkit-touch-callout:none}.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}.fc th,.fc-basic-view td.fc-week-number,.fc-icon,.fc-toolbar{text-align:center}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff}.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666}.fc-unthemed td.fc-today{background:#fcf8e3}.fc-highlight{background:#bce8f1;opacity:.3}.
@shah-smit
shah-smit / Readme.md
Last active May 2, 2017 05:38
Format of Statements, Loops and Methods and Classes In java

Format

Statement

IF STATEMENT

if(<condition>) <body>

ternary operator ? :

@shah-smit
shah-smit / FileReader.java
Created April 26, 2017 01:40
File Reader, Writer has turn out to be most confusing for experts.
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class FileReader {
public static void main(String[] args) throws FileNotFoundException,IOException{
FileReader fr = new FileReader("words");
int i = fr.read();
while(i != -1)