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
/* | |
Project Euler Problem 4 | |
Given: | |
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. | |
Find | |
The largest palindrome made from the product of two 3-digit numbers. | |
*/ | |
package problem0004; |
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
/* | |
* Multiples of 3 and 5 | |
* | |
* Given: If we list all the natural numbers below 10 | |
* that are multiples of 3 or 5, we get 3, 5, 6 and 9. | |
* The sum of these multiples is 23. | |
* | |
* Solve: | |
* | |
* Find the sum of all the multiples of 3 or 5 below 1000. |
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
Task: | |
Dynamically print out the envelope from user input | |
Case Setting: | |
1. Envelope Sample Size: | |
* row = 12; | |
* column = 50; | |
2. Sender Sample Info | |
Lei Hua | |
419 Common Street |
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 envelope; | |
public class EnvelopeDesign { | |
public static void main(String[] args) { | |
System.out.println("+------------------------------------------------+"); | |
System.out.println("|Lei Hua |"); | |
System.out.println("|419 Common Street |"); | |
System.out.println("|Lexington, MA 02420 |"); | |
System.out.println("| |"); |
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 envelope; | |
public class EnvelopeEmpty { | |
public static void main(String[] args) { | |
int row = 12, column = 50; | |
for (int i=0; i<row; i++) { | |
switch(i) { | |
case 0: | |
case 11: |
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 envelope; | |
public class EnvelopeWithContents { | |
public static void main(String[] args) { | |
int row = 12, column = 50; | |
for (int i=0; i<row; i++) { | |
switch(i) { | |
case 0: | |
case 11: |
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
// graphql-tools combines a schema string with resolvers. | |
import { makeExecutableSchema } from 'graphql-tools'; | |
// Construct a schema, using GraphQL schema language | |
const typeDefs = ` | |
type Query { | |
allCourses: [Course] | |
course(id: Int!): Course | |
}, | |
type Course { |
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
{ | |
"coursesData": [ | |
{ | |
"id": 1, | |
"title": "The Complete Node.js Developer Course", | |
"author": "Andrew Mead, Rob Percival", | |
"description": "Learn Node.js by building real-world applications with Node, Express, MongoDB, Mocha, and more!", | |
"topic": "Node.js", | |
"url": "https://codingthesmartway.com/courses/nodejs/" | |
}, |
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
const muscles = ['shoulders', 'chest', 'arms', 'back', 'legs'] | |
const exercises = [ | |
{ | |
id: 'overhead-press', | |
title: 'Overhead Press', | |
description: 'Delts exercise...', | |
muscles: 'shoulders' | |
}, | |
{ |
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 React, { Component, Fragment } from 'react' | |
import { | |
Grid, | |
Paper, | |
Typography, | |
List, | |
ListItem, | |
ListItemText | |
} from 'material-ui' |
OlderNewer