Skip to content

Instantly share code, notes, and snippets.

View kunal52's full-sized avatar
🎯
Focusing

Kunal Puri kunal52

🎯
Focusing
  • Nurpur, HP , India
View GitHub Profile
@kunal52
kunal52 / index.html
Created September 3, 2020 15:48
Firebase Auth Simple App
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.js"></script>
</head>
spring:
servlet:
multipart:
enabled: true
max-file-size: 10MB
max-request-size: 215MB
application:
name: springsecurityfirebaseauth
datasource:
url: jdbc:mysql://localhost:3306/test
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(securedEnabled = true, jsr250Enabled = true, prePostEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
ObjectMapper objectMapper;
@Autowired
SecurityProperties restSecProps;
@Service
public class SecurityService {
@Autowired
HttpServletRequest httpServletRequest;
@Autowired
CookieUtils cookieUtils;
@Autowired
@Component
@Slf4j
public class SecurityFilter extends OncePerRequestFilter {
@Autowired
SecurityService securityService;
@Autowired
SecurityProperties restSecProps;
<?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"
tools:context=".ui.SearchFragment">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/search_suggestion_recyclerview"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize">
<ImageView
android:id="@+id/search_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
class ArrayAdapter(private var suggestions: List<String>, private val activity: Activity) :
RecyclerView.Adapter<ArrayAdapter.ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val inflate = LayoutInflater.from(parent.context)
.inflate(R.layout.suggestion_textview_item, parent, false)
return ViewHolder(inflate, activity)
}
override fun getItemCount(): Int {
@kunal52
kunal52 / stack.cpp
Created June 9, 2016 18:07
stack implementation using array
#include<iostream>
using namespace std;
#define MAX_SIZE 10
class stack
{
int top;
int A[MAX_SIZE];
public:
stack()
{
@kunal52
kunal52 / linked_list_beg_end_rev.cpp
Created June 9, 2016 17:33
program of linked list to enter value at begnning end & reverse of a linked list
#include<iostream>
#include<stdlib.h>//Using exit function
using namespace std;
class node
{
public:
int data;
node *next;
};
void disp();