Skip to content

Instantly share code, notes, and snippets.

View LarryJeremiah's full-sized avatar

LarryJeremiah

View GitHub Profile
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:b="http://bootsfaces.net/ui">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<title>Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class LoginController {
@GetMapping("/login")
public String login(Model model) {
return "login.xhtml";
@LarryJeremiah
LarryJeremiah / UserList.java
Created June 24, 2019 11:04
code van de menu
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.action_settings -> {
Toast.makeText(applicationContext, "click on setting", Toast.LENGTH_LONG).show()
true
}
R.id.action_exit ->{
val i = Intent(this, MainActivity::class.java)
startActivity(i)
Toast.makeText(applicationContext, "click on exit", Toast.LENGTH_LONG).show()
if (!TextUtils.isEmpty(name)) {
if (!TextUtils.isEmpty(email)) {
if (!TextUtils.isEmpty(mobilenumber)) {
//it will create a unique id and we will use it as the Primary Key for our User
val id = databaseReference.push().key
//creating an User Object
val User = User(id!!, name, email, mobilenumber)
//Saving the User
package com.realdolmen.domain;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import com.google.zxing.BarcodeFormat;
import com.google.zxing.WriterException;
import com.google.zxing.client.j2se.MatrixToImageWriter;
package com.realdolmen.services;
import com.google.zxing.WriterException;
import com.realdolmen.repositories.CsvFileRepo;
import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.io.FileNotFoundException;