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
public class UserDaoImpl implements UserDao { | |
@Override | |
public boolean isValidUser(String username, String password) { | |
boolean isValid = false; | |
EntityManager em = PersistenceManager.INSTANCE.getEntityManager(); | |
UserPK pkToFind = new UserPK(); | |
pkToFind.setUsername(username); | |
pkToFind.setPassword(password); | |
try { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>mvc-forms-example</groupId> | |
<artifactId>hjbello</artifactId> | |
<version>0.1.0</version> | |
<packaging>war</packaging> | |
<parent> | |
<groupId>org.springframework.boot</groupId> |
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; | |
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.stereotype.Controller; | |
@Controller | |
public class ServletConfig { | |
@Bean | |
public EmbeddedServletContainerCustomizer containerCustomizer() { |
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; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class MvcFormsExampleApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(MvcFormsExampleApplication.class, args); |
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; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | |
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; | |
import org.springframework.web.servlet.view.InternalResourceViewResolver; |
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
for (var number of array){ | |
//do something | |
} |
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 { Component, OnInit } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
import { Observable } from 'rxjs'; | |
import {AngularFirestore} from 'angularfire2/firestore'; | |
@Component({ | |
selector: 'app-news', | |
templateUrl: './news.page.html', | |
styleUrls: ['./news.page.scss'] | |
}) |
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
# https://medium.com/google-cloud/node-to-google-cloud-compute-engine-in-25-minutes-7188830d884e | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - | |
sudo apt install nodejs | |
sudo apt-get install python3-pip | |
#https://docs.python-guide.org/dev/virtualenvs/#virtualenvironments-ref | |
pip3 install virtualenv | |
#virtualenv env | |
#source env/bin/activate # On Windows use `env\Scripts\activate` |
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
# https://medium.com/google-cloud/node-to-google-cloud-compute-engine-in-25-minutes-7188830d884e | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - | |
sudo apt install nodejs | |
#install dependencies | |
#https://github.com/GoogleChrome/puppeteer/issues/290#issuecomment-322838700 | |
sudo apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget |
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
# https://medium.com/google-cloud/node-to-google-cloud-compute-engine-in-25-minutes-7188830d884e | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - | |
sudo apt install nodejs |
OlderNewer