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 TicketOffice { | |
private long amount; | |
private Theater theater; | |
private final List<Ticket> tickets = new ArrayList<>(); | |
public TicketOffice(final long amount, final Theater theater) { | |
this.amount = amount; | |
this.theater = theater; | |
} |
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
require('http').createServer((req, res) => { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World'); | |
}).listen(8080); |
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
# make shell script | |
files: | |
"/opt/elasticbeanstalk/tasks/install-openjdk-10.sh" : | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
if [[ $(javac -version) != *"javac 10"* ]] | |
then | |
# please check recently openjdk version. |
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
// this code must to transpile with babel | |
const page = require('webpage').create(); | |
const URI = ''; // infinite URI | |
page.open(URI, () => { | |
// previous height | |
let base = 0; | |
// current height | |
let tmp = 0; |