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
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
public class CBDemo implements ItemListener { | |
JLabel jlabSelected; | |
JLabel jlabChanged; | |
JCheckBox jcbAlpha; | |
JCheckBox jcbBeta; |
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
import javax.swing.*; | |
import javax.swing.event.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
public class ListDemo implements ListSelectionListener { | |
JList<String> jlst; | |
JLabel jlab; | |
JScrollPane jscrlp; | |
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
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import java.io.*; | |
public class SwingFC implements ActionListener { | |
JTextField jtfFirst; // holds the first file name | |
JTextField jtfSecond; // holds the second file name |
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
body{ | |
padding-top: 70px; | |
} | |
.jumbotron{ | |
color: #2c3e50; | |
background: #ecf0f1; | |
} | |
.navbar-inverse{ | |
background: #2c3e50; | |
} |
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
body{ | |
font-family: Lato; | |
background: url(https://images.unsplash.com/photo-1511275539165-cc46b1ee89bf?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=4eed771c93754c026e4a14e74dc3251d&auto=format&fit=crop&w=1050&q=80); | |
background-size: cover; | |
} | |
html{ | |
height: 100% | |
} | |
.content{ | |
text-align: center; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>color changer</title> | |
<style type="text/css"> | |
button{ | |
font-size: 20px; | |
margin: 50px; | |
} | |
.ispink{ |
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
var express = require("express"); | |
var app = express(); | |
app.get("/",function(req, res){ | |
res.render("home.ejs"); | |
}); | |
app.get("/love/:thing",function(req, res){ | |
var thing = req.params.thing; | |
res.render("love.ejs",{thingVar: thing}); |
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
var express = require("express"); | |
var app = express(); | |
var bodyParser = require("body-parser"); | |
app.set("view engine", "ejs"); | |
app.use(bodyParser.urlencoded({extend:true})); | |
var friends = ["Yukee", "Mountain", "Xiaobai", "Tony"]; | |
app.get("/",function(req, res){ |
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
var express = require("express"); | |
var app = express(); | |
var request = require("request"); | |
app.set("view engine", "ejs"); | |
app.get("/", function(req, res){ | |
res.render("search"); | |
}) | |
app.get("/results", function(req, res){ |
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
var mongoose = require("mongoose"); | |
mongoose.connect("mongodb://localhost/food_app"); | |
var foodSchema = new mongoose.Schema({ | |
name: String, | |
taste: String, | |
isGood: Boolean, | |
price: Number | |
}); |