This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package GraphProblems; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
class Graph{ | |
private int vertices; | |
private LinkedList<Integer>[] adjacent; | |
Graph(int v){ | |
this.vertices=v; | |
adjacent=new LinkedList[v]; //makes vertices array | |
for(int i=0;i<v;i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class FibonacciRecursion { | |
static int first=0,second=1,next=0; | |
static void generateFibo(int range){ | |
if(range>0){ | |
next=first+second; | |
first=second; | |
second=next; | |
System.out.print(next+" "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//opening gallery and choosing image ,,,Here gallery request code final string of any number more than zero(3 digit) | |
Intent intent = new Intent(); | |
intent.setType("image/*"); //this is done because it allows to select any kind of image | |
intent.setAction(Intent.ACTION_GET_CONTENT); | |
startActivityForResult(Intent.createChooser(intent,"Pick Image"),GALLERY_REQUEST_CODE); | |
//this will be called every time you choose image from the gallery | |
@Override | |
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | |
//checking request code ==gallery code or not? and checking we have valid image data or not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.databaseproject; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.SQLException; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
public class ShirshakDatabaseAdapter { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package TreeProblems; | |
public class BinaryTree { | |
static class Node{ | |
int value; | |
Node left,right; | |
Node(int value){ | |
this.value=value; | |
left=null; | |
right=null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.listviewimage; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.rough; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.LinearLayout; | |
import android.widget.TextView; | |
import androidx.annotation.Nullable; |
NewerOlder