Skip to content

Instantly share code, notes, and snippets.

@ssindher11
ssindher11 / Insertion.cpp
Created December 10, 2017 15:54 — forked from anonymous/Insertion.cpp
Insertion created by ShreySindher - https://repl.it/@ShreySindher/Insertion
#include<stdio.h>
int main()
{
int n,p,j,num;
printf("Enter number of elements: ");
scanf("%d",&n);
int ar[n];
for(int i=0; i<n; i++)
/**
* IMPORTANT: Make sure you are using the correct package name.
* This example uses the package name:
* package com.example.android.justjava
* If you get an error when copying this code into Android studio, update it to match teh package name found
* in the project's AndroidManifest.xml file.
**/
package com.example.android.justjava;
/**
* IMPORTANT: Make sure you are using the correct package name.
* This example uses the package name:
* package com.example.android.justjava
* If you get an error when copying this code into Android studio, update it to match teh package name found
* in the project's AndroidManifest.xml file.
**/
package com.example.android.justjava;
@ssindher11
ssindher11 / MainActivity.java
Created December 16, 2017 19:18
Basketball App
package com.example.android.basketball;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
int scoreA = 0, scoreB = 0;
@ssindher11
ssindher11 / activity_main.xml
Created February 4, 2019 18:52
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
tools:context=".MainActivity">
<!-- Custom Action Bar -->
@ssindher11
ssindher11 / MainActivity.java
Created February 4, 2019 19:02
MainActivity.java
package com.example.lottieplayground;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.airbnb.lottie.LottieAnimationView;
public class MainActivity extends Activity {
@ssindher11
ssindher11 / MainActivity.java
Created January 26, 2020 13:03
Java code for the landing activity for Chirp Tutorial app
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import com.ssindher11.chirptut.R;
public class MainActivity extends AppCompatActivity {
@Override
@ssindher11
ssindher11 / activity_main.xml
Created January 26, 2020 13:07
Layout file for the landing page of Chirp Tutorial app
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark"
tools:context=".activity.MainActivity">
<TextView
@ssindher11
ssindher11 / activity_send.xml
Created January 26, 2020 13:10
Layout file for the send key activity of the Chirp Tutorial app
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/container_send_key"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark"
tools:context=".activity.SendActivity">
@ssindher11
ssindher11 / SendActivity.java
Created January 26, 2020 13:18
Java file for the send key activity for the Chirp Tutorial app
package com.ssindher11.chirptut.activity;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;