-
brew upgrade cods
This updates the
cods
command to the newest version. -
cods update
This updates your
myserver
(or whatever you named it) command to the newer version.
In the servlet
usersDao = DaoFactory.getUsersDao();
// Create a user based on the submitted information
User newUser = new User(
request.getParameter("username"),
request.getParameter("email"),
request.getParameter("password")
);
This file contains hidden or 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 StackTraceExample { | |
private static void a() throws Exception { | |
b(); | |
} | |
private static void b() throws Exception { | |
c(); | |
} | |
private static void c() throws Exception { |
For each of the problems below, write your function and console.log to check your work. While it is good to console.log to help debug, console.logs should not be in the completed function, unless otherwise explicitly stated.
-
Write a function named
identity
that defines one parameter and returns the argument it was called with. -
Write a function named
isOdd
that accepts a number and returns true if the
This file contains hidden or 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 PrettyPrinter { | |
private static boolean bold = true; | |
public static void main(String[] args) { | |
System.out.println("Bold"); | |
PrettyPrinter.red("red"); | |
PrettyPrinter.green("green"); | |
PrettyPrinter.yellow("yellow"); | |
PrettyPrinter.blue("blue"); | |
PrettyPrinter.purple("purple"); |
- [Enable Https for your site and setup the certificates to automatically be renewed][1]
- Wrt troubleshooting deployment issues
Steps:
- Does it work locally? Try running/packaging/debugging your app locally (i.e. on your mac) first before worrying about issues in production.
- Have you pushed? Inspect the output when you push, are there any errors?
This file contains hidden or 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
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="x-ua-compatible" content="ie=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> | |
<title>Order Online</title> | |
<!-- Styles --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous" /> |
curl -Ss https://gist.githubusercontent.com/zgulde/e38f818c5222293e94fa78d8540330ae/raw/514eb6ae088c0b7467186bf2141684623528d868/print-tomcat-version.sh | bash
This file contains hidden or 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
# sudo apt-get install -y imagemagick pngquant | |
for jpg in $(ls *.JPG) ; do | |
png=${jpg/%.JPG/.png} | |
echo "converting and compressing '$jpg' to '$png'..." | |
convert $jpg -strip -resize 15% $png | |
echo "optimizing '$png'..." | |
pngquant --output $png --force --quality 0-25 $png | |
done |