Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
working on awesome projects

Dante White dante-byte

:octocat:
working on awesome projects
View GitHub Profile
View txt
Java 5
J2EE 5.
Core Java 5
AngularJS 5
HTML5 6
HTML 6
CSS 6
CSS3 6
Spring Framework 5
Spring Boot 5
@dante-byte
dante-byte / pom.xml
Created Dec 8, 2020
maven dependencies
View pom.xml
<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>2.6.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
View gist:6a14ea84d66c0a9b825a270d489e2ca1
const passport = require('passport');
const userController = require("../controllers/userController");
const { check, validationResult, matchedData } = require("express-validator");
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@(?!gmail.com)(?!yahoo.com)(?!hotmail.com)(?!icloud.com)(?!outlook.com)(?!protonmail.com)((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
router.get('/client/login', userController.getlogin);
router.post('/client/login',
[
View gist:1aa3c8e04e2a46abc9a4a0f3eeb5aeea
const express = require("express");
app = express();
const mongoose = require("mongoose");
mongoose.connect("mongodb://localhost:27017//fooapp_db", {
useNewUrlParser: true,
useCreateIndex: true,
useNewUrlParser: true,
useUnifiedTopology: true
View webnf
<Context>
<Resource name="jdbc/web_student_tracker"
auth="Container" type="javax.sql.DataSource"
maxActive="20" maxIdle="5" maxWait="10000"
username="webstudent" password="webstudent"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/web_student_tracker?useSSL=false"/>
</Context>
View dante white issues with mysql
package com.luv2code.web.jdbc;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.sql.DataSource;
View gist:0f9cb9e0af8703773f6c2ce02a21bdbb
protected void onCreate(Bundle savedInstanceState) {
...
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
View HibernateToDoApplication.java
package com.tiy.todo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class HibernateToDoApplication {
public static void main(String[] args) {
SpringApplication.run(HibernateToDoApplication.class, args);
View gist:519cf48a5944a910811ba6cf824aa0e9
public class MainActivity extends AppCompatActivity {
ListView list;
EditText text;
Button addButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
View ToDoDatabaseTest
package sample;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;