diff --git a/.idea/modules.xml b/.idea/modules.xml index 8f7c559..8160ddc 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,6 +3,7 @@ + \ No newline at end of file diff --git a/liuSenseiWebLesson/BrownBear.html b/liuSenseiWebLesson/BrownBear.html new file mode 100644 index 0000000..9f631b4 --- /dev/null +++ b/liuSenseiWebLesson/BrownBear.html @@ -0,0 +1,50 @@ + + + + + Brown Bears + + + +Brown Bear +About Me +

The Brown Bear

+ +
+

About Brown Bears

+

The brown bear (Ursus arctos) is native to parts of northern Eurasia and North America. Its conservation status is currently Least Concern.

There are many subspecies within the brown bear species, including the + Atlas bear and the Himalayan brown bear.

+ Learn More +

Species

+ +

Features

+

Brown bears are not always completely brown. Some can be reddish or yellowish. They have very large, curved claws and huge paws. Male brown bears are often 30% larger than female brown bears. They can range from 5 feet to 9 feet from head to toe.

+
+
+

Habitat

+

Countries with Large Brown Bear Populations

+
    +
  1. Russia
  2. +
  3. United States
  4. +
  5. Canada
  6. +
+

Countries with Small Brown Bear Populations

+

Some countries with smaller brown bear populations include Armenia, Belarus, Bulgaria, China, Finland, France, Greece, India, Japan, Nepal, Poland, Romania, Slovenia, Turkmenistan, and Uzbekistan.

+
+
+

Media

+ + +
+ + + \ No newline at end of file diff --git a/liuSenseiWebLesson/Csscolorpractice.html b/liuSenseiWebLesson/Csscolorpractice.html new file mode 100644 index 0000000..92593cf --- /dev/null +++ b/liuSenseiWebLesson/Csscolorpractice.html @@ -0,0 +1,164 @@ + + + + House Store + + + + + + + +
+
+ +
+
+ +
+ +
+ + + + + +
+
+

Color Guide

+

Here at HouseStore, we take color seriously. In each of the following sections, well explore our base colors in swatches that incrementally change three values: Hue, Saturation and Lightness. You'll be able to pick from a wide variety of colors that all work well with each other because they stem from the same value.

+
+ + +
+
+

Reds

+

Firetrucks, lipstick, fresh berries — red is a color with power, emotion, intensity. For this reason we recommend using reds as accent colors. Red is particularly suited to kitchens, as it is said to evoke hunger!

Our base red is HSL (350, 100, 50)

+
+ +
+
+
+

Lightness

+
+
+
+
+
+
+
+

Saturation

+
+
+
+
+
+
+
+

Hue

+
+
+
+
+
+
+
+
+
+ + +
+
+

Greens

+

They say that geniuses choose green — we think any of these verdant colors will look smart! Deck your halls like a lush outdoor space, adorn your rooms with emerald, or just make your houseguests green with envy!

+

Our base green is HSL (130, 100, 50)

+
+ +
+
+
+

Lightness

+
+
+
+
+
+
+
+

Saturation

+
+
+
+
+
+
+
+

Hue

+
+
+
+
+
+
+
+
+
+ + +
+
+

Blues

+

Blues dont give us the blues — in fact, blue is one of the most popular colors in home interiors, and for good reason! Energizing like a summer sky, calming like a lakeshore, light as mist or deep as indigo, blue can do it all.

+

Our base blue is HSL (220, 100, 50)

+
+ +
+
+
+

Lightness

+
+
+
+
+
+
+
+

Saturation

+
+
+
+
+
+
+
+

Hue

+
+
+
+
+
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/Csspractice5.html b/liuSenseiWebLesson/Csspractice5.html new file mode 100644 index 0000000..a494df2 --- /dev/null +++ b/liuSenseiWebLesson/Csspractice5.html @@ -0,0 +1,115 @@ + + + + Please Participate in Our Survey! + + + + + +
+ +
+ +
+

Welcome to our survey!

+

We're looking forward to getting your answers so we can make sure our products and services are the best they can be!

+
+ +
+

Question 1

+

I like participating in physical activity such as running, swimming, or biking.

+ +
+

Disagree

+
+ +
+

Neutral

+
+ +
+

Agree

+
+
+ +
+

Question 2

+

I try to keep up to date with the latest fashion in active wear.

+ +
+

Disagree

+
+ +
+

Neutral

+
+ +
+

Agree

+
+
+ +
+

Question 3

+

I purchase clothing online regularly.

+ +
+

Disagree

+
+ +
+

Neutral

+
+ +
+

Agree

+
+
+ +
+

Question 4

+

I try to buy goods that are designed and/or manufactured in my home country.

+ +
+

Disagree

+
+ +
+

Neutral

+
+ +
+

Agree

+
+
+ +
+

Question 5

+

I look to famous athletes when trying to choose what to wear when training.

+ +
+

Disagree

+
+ +
+

Neutral

+
+ +
+

Agree

+
+
+ + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/Csspractive6.html b/liuSenseiWebLesson/Csspractive6.html new file mode 100644 index 0000000..3ee9de5 --- /dev/null +++ b/liuSenseiWebLesson/Csspractive6.html @@ -0,0 +1,62 @@ + + + + + + + + + + +
+ +
+ +
+
+
+

We are Broadway

+ Get Started +
+
+
+ +
+
+ +
+ +

Design

+

Make your projects look great and interact beautifully.

+ Learn More
+
+ +
+ +

Develop

+

Use modern tools to turn your design into a web site

+ Learn More
+
+ +
+ +

Deploy

+

Use modern tools to turn your design into a web site

+ Learn More
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/Csstypographypractice.html b/liuSenseiWebLesson/Csstypographypractice.html new file mode 100644 index 0000000..0170477 --- /dev/null +++ b/liuSenseiWebLesson/Csstypographypractice.html @@ -0,0 +1,106 @@ + + + + Typography Blog + + + + + + + + + + + + + +
+ + +
+

Serif

+

Serifs are the small features at the end of strokes within letters. These features are functional as well as decorative. Serif fonts are widely used for body text (eg. articles) because they are considered easier to read than sans-serif fonts in print.

+

Serif fonts can often create a feeling of traditionalism and antiquity, due to their common use in printed materials for many years.

+
+ + +
+

Garamond

+
by Claude Garamond (16th Century)
+ +

Bold

+ Abc +
+ +

Regular

+ Abc +
+ +

Italic

+ Abc +
+
+
+ + +
+ + +
+

Sans-Serif

+

Sans-Serif ('without serif') describes fonts with characters which lack flourishes at the ends of the strokes. Sans-serif fonts have become the most prevalent for display of text on computer screens, as on lower-resolution digital displays, fine details like serifs may disappear or appear too large.

+

Sans-serif fonts are often used to project an image of simplicity, modernity or minimalism.

+
+ + +
+

Helvetica

+
by Max Miedinger & Eduard Hoffman (1957)
+ +

Bold

+ Abc +
+ +

Regular

+ Abc +
+ +

Italic

+ Abc +
+
+
+ + +
+ + +
+

Monospaced

+

A monospaced font's characters each occupy the same amount of horizontal space. This contrasts with most fonts, where the letters and spacings have different widths. For example, the two high-use letters 'I' and 'E' do not need the same footprint. The first monospaced Western typefaces were designed for typewriters.

+

Many text editors (like those used to write computer code) use monospaced fonts, which aid in distinguishing between potentially similar characters (like 'l' and '1') and in counting the number of characters in a line.

+
+ + +
+

Space Mono

+
by Colophon Foundry (2016)
+ +

Regular

+ Abc +
+
+
+ + diff --git a/liuSenseiWebLesson/Htmlforms.html b/liuSenseiWebLesson/Htmlforms.html new file mode 100644 index 0000000..361db11 --- /dev/null +++ b/liuSenseiWebLesson/Htmlforms.html @@ -0,0 +1,87 @@ + + + + + + + Textarea element + + +
+ +
+
+

Create a burger!

+
+ + +
+
+
+ + +
+
+
+ +
+ Rare + + Well-Done +
+
+
+ What toppings would you like? +
+ + + + + + +
+
+
+ Would you like to add cheese? +
+ + + + +
+
+
+ + +
+
+
+ + + + + + + +
+
+
+ +
+ +
+
+ +
+ + +
+ +
+
+ + diff --git a/liuSenseiWebLesson/Htmlsemantcipra.html b/liuSenseiWebLesson/Htmlsemantcipra.html new file mode 100644 index 0000000..75c9129 --- /dev/null +++ b/liuSenseiWebLesson/Htmlsemantcipra.html @@ -0,0 +1,80 @@ + + + + + Title + + + + + + + + + + + +
+

New York City

+
+ +
+
+
+

New York City is made up of five boroughs which include Queens, Manhattan, Brooklyn, the Bronx, and Staten Island. The city is the home of approximately 8 million people. In 1876, France gifted the City of New York what is known as the Statue of Liberty, which is currently located on Liberty Island and commonly visited by tourists. However, it took 10 years to assemble and therefore wasn’t unveiled until 1886. Another tourist destination is Times Square. Times Square is commonly known for the big buildings, Broadway shows, and bright neon signs. This famous location was named after The New York Times after the Times moved to that location. Prior to that, it was named Longacre Square. New York City is also known for its bridges that connect the boroughs and allow ease of transportation. +

+
+
+
+ +
+ This is the Statue of Liberty, a popular tourist attraction located on Liberty Island. +
+
+ +
+
+

The Scenery in NYC

+

+ While the view in the city is beautiful, the sounds are not as lovely. Below you'll see an example of the view and the sounds you'll deal with in NYC on a daily basis. +

+
+ + +
+ +
+
+ + + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/Htmlsemantic.html b/liuSenseiWebLesson/Htmlsemantic.html new file mode 100644 index 0000000..96bd506 --- /dev/null +++ b/liuSenseiWebLesson/Htmlsemantic.html @@ -0,0 +1,49 @@ + + + + + + +
+

Navigational Links

+ +
+ +
+
+
+

Facts About Dogs

+

+ Dogs have a sense of time. It's been proven that they know the difference between a hour and five. If conditioned to, they can predict future events, such as regular walk times. +

+
+ +
+
+ +
A cute dog.
+
+ + + + +
+ + + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/Htmlsinging.html b/liuSenseiWebLesson/Htmlsinging.html new file mode 100644 index 0000000..040a117 --- /dev/null +++ b/liuSenseiWebLesson/Htmlsinging.html @@ -0,0 +1,27 @@ + + + + + Sign Up Page + + + + +
+

Sign Up

+

Create an account:

+
+ +
+ + +
+ +
+ +
+ +
+
+ + diff --git a/liuSenseiWebLesson/Htmlstory.html b/liuSenseiWebLesson/Htmlstory.html new file mode 100644 index 0000000..9abcd01 --- /dev/null +++ b/liuSenseiWebLesson/Htmlstory.html @@ -0,0 +1,77 @@ + + + + + + + Form a Story + + +
+ Form A Story Logo +
+ +
+

Complete the Form -
Complete the Story!

+
+ +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + Yes or No + +
+ + +        + + +
+ + +
+ + + + + +
+
+ + + +
+
+ + diff --git a/liuSenseiWebLesson/Htmltable.html b/liuSenseiWebLesson/Htmltable.html new file mode 100644 index 0000000..d7fd16a --- /dev/null +++ b/liuSenseiWebLesson/Htmltable.html @@ -0,0 +1,89 @@ + + + + + Title + + + + + + + + Aguillar Family Wine Festival + + + + + + +
+

Annual Aguillar Family Wine Festival

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Wine Festival Schedule

Time

Event

+

12:00 PM

+
+

Welcome Reception

+
+

01:00 PM

+
+

Storytelling & Tasting

+
+

02:00 PM

+
+

Wine Luncheon

+
+

03:00 PM

+
+

Aguillar Family Wines

+
+

04:00 PM

+
+

Wine & Cheese Tasting

+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/Isablog.html b/liuSenseiWebLesson/Isablog.html new file mode 100644 index 0000000..1993651 --- /dev/null +++ b/liuSenseiWebLesson/Isablog.html @@ -0,0 +1,31 @@ + + + + Everyday with Isa + + + + +

by Isabelle Rodriguez | 1 day ago

+

An Insider’s Guide to NYFW

+

NYFW can be both amazingly fun & incredibly overwhelming, especially if you’ve never been. Luckily, I’m here to give you an insider’s guide and make your first show a pleasurable experience. By taking my tips and tricks, and following your gut, you’ll have an unforgettable experience!

+ +

Getting Tickets & Picking the Shows

+

If you’re lucky or connected you can get an invite, sans the price tag. But I wasn’t so lucky or connected my first 2 years so I’m here to help you out. First, plan out which shows are most important to you and make a schedule and this is a biggie: SET A BUDGET. If you’re worrying about blowing your cash the whole time you won’t have fun. Then check out prices, days, and times and prioritize the designers you want to see most. Lastly, purchase your tickets and get excited

+ +

Dressing for the Shows

+

Always be true to your own sense of style, if you don’t you’ll be uncomfortable the whole time and it will show. Remember, NYFW is about expressing yourself and taking in what the designers have chosen to express through their new lines. Also it’s important to wear shoes you’ll be comfortable in all day. Obviously you want to look good, but you’ll be on your feet all day long, so be prepared.

+ +

Related Conten

+ +
+

email: isa@fashionblog.com | phone: 917-555-1098 | address: 371 284th St, New York, NY, 10001 +

+
+ + \ No newline at end of file diff --git a/liuSenseiWebLesson/JS/adddeleteliu.js b/liuSenseiWebLesson/JS/adddeleteliu.js new file mode 100644 index 0000000..083a49b --- /dev/null +++ b/liuSenseiWebLesson/JS/adddeleteliu.js @@ -0,0 +1,93 @@ +$(document).ready(function(){ + for (var j = 0; j < 12; j++) { + for (var i = 0; i < 30; i++) { + $("#myCalender").append(""); + } + } + + var staffs=[ + { + date:"1Y1D", + shift:[ + { + name:"andy", + time:"1.00-3.00" + },{ + name:"bill555", + time:"1.00-4.00" + } + ] + },{ + date:"1Y2D", + shift:[ + { + name:"andy", + time:"9.00-10.00" + },{ + name:"cindy", + time:"2.00-7.00" + } + ] + } + ]; + + function showShift(curDatePar){ + $("#main").empty(); + var curDate=curDatePar; + var curDay; + for (var day of staffs) { + if(day.date==curDate){ + curDay=day; + break; + } + } + for (var staff of curDay.shift) { + $("#main").append('
'+staff.name+''+staff.time+'
') + } + + }; + $("#but").click(function(){ + // $("#main").append($("#inputName").val()); + var curDate=$("#myCalender").val(); + var curDay; + for (var day of staffs) { + if (day.date == curDate) { + curDay = day; + break; + } + } + var staff={ + name:$("#inputName").val(), + time:$("#inputTime").val() + }; + curDay.shift.push(staff); + showShift($("#myCalender").val()); + }) + + + + + showShift($("#myCalender").val()); + $("#myCalender").change(function (){ + showShift($(this).val()); + }); + + + $("#del").click(function(){ + + var curDate=$("#myCalender").val(); + var curDay; + for (var day of staffs) { + if (day.date == curDate) { + curDay = day; + break; + } + } + for (var staff of curDay.shift) { + curDay.shift.remove(staff); + } + + showShift($("#myCalender").val()); + }) + +}); \ No newline at end of file diff --git a/liuSenseiWebLesson/JS/practice1027.html b/liuSenseiWebLesson/JS/practice1027.html new file mode 100644 index 0000000..7a8ab2d --- /dev/null +++ b/liuSenseiWebLesson/JS/practice1027.html @@ -0,0 +1,13 @@ + + + + + 練習 + + + + + + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/JS/practice1027.js b/liuSenseiWebLesson/JS/practice1027.js new file mode 100644 index 0000000..e69de29 diff --git a/liuSenseiWebLesson/JS/practive1.js b/liuSenseiWebLesson/JS/practive1.js new file mode 100644 index 0000000..3365d30 --- /dev/null +++ b/liuSenseiWebLesson/JS/practive1.js @@ -0,0 +1,21 @@ +const robot = { + model: 'SAL-1000', + mobile: true, + sentient: false, + armor: 'Steel-plated', + energyLevel: 75 +}; + +// What is missing in the following method call? +const robotKeys = Object.keys(robot); + +console.log(robotKeys); + +// Declare robotEntries below this line: +const robotEntries = Object.entries(robot) +console.log(robotEntries); + +// Declare newRobot below this line: +const newRobot = Object.assign({laserBlaster: true, voiceRecognition: true}, robot); + +console.log(newRobot); \ No newline at end of file diff --git a/liuSenseiWebLesson/busasi.html b/liuSenseiWebLesson/busasi.html new file mode 100644 index 0000000..b248ecc --- /dev/null +++ b/liuSenseiWebLesson/busasi.html @@ -0,0 +1,73 @@ + + + + + ・スケジュール-uenogaymessageページ + + + + +
+

・スケジュール

+
+ +
+
+
+
+ +
+
けんすけ
+
+
+
+

休み

+
+ +
+ +
けんすけ
+
+
+
+ +
+
+ +
+
こうすけ
+
+
+
+

--

+
+
+ +
+
こうすけ
+
+
+
+ +
+
+ +
+
たいが
+ +
+
+
+

休み

+
+
+ +
+
たいが
+
+
+
+
+ + + \ No newline at end of file diff --git a/liuSenseiWebLesson/colorblog.html b/liuSenseiWebLesson/colorblog.html new file mode 100644 index 0000000..5f46657 --- /dev/null +++ b/liuSenseiWebLesson/colorblog.html @@ -0,0 +1,30 @@ + + + + + 登入模擬 + + + +
+ Input:
+
+
+ Color: +
+ + diff --git a/liuSenseiWebLesson/css/Csscolorpractice.css b/liuSenseiWebLesson/css/Csscolorpractice.css new file mode 100644 index 0000000..6124e6f --- /dev/null +++ b/liuSenseiWebLesson/css/Csscolorpractice.css @@ -0,0 +1,496 @@ +/* Universal Styles */ + +html { + font-size: 16px; +} + +body { + font-family: "Open Sans", sans-serif; +} + +a { + text-decoration: none; + color: inherit; +} + +strong { + font-weight: bold; +} + +.image-container { + overflow: hidden; +} + +.image-container img { + display: block; + max-width: 100%; +} + +@media only screen and (max-width: 990px) { + html { + font-size: 14px; + } +} + +/* Header */ + +header { + display: flex; + align-items: center; + padding: .5rem 3.75rem; + background-color: #ff8000; +} + +header .logo-small { + display: none; +} + +header .logo-small, +header .logo-big { + flex-grow: 1; +} + +nav li { + display: inline; + padding-right: 2rem; +} + +nav li:last-child { + padding-right: 0; +} + +@media only screen and (max-width: 990px) { + header .logo-big { + display: none; + } + + header .logo-small { + display: block; + } +} + +@media only screen and (max-width: 540px) { + header { + flex-direction: column; + padding-left: 0; + padding-right: 0; + } + + header .logo-small { + margin-bottom: 1rem; + } +} + +/* Banner */ + +#banner { + position: relative; + height: 43.75rem; + padding: 0 25%; + background: url(" https://content.codecademy.com/courses/freelance-1/unit-6/banner.png") center center no-repeat; + background-size: cover; + text-align: center; +} + +#banner:before { /* Orange Overlay */ + background-color: rgba(255, 128, 0, 0.75); + position: absolute; + content: ""; + top: 0; + left: 0; + width: 100%; + height: 100%; + +} + +#banner * { + position: relative; /* Makes elements display above overlay. */ +} + +h1 { + padding-top: 10.4375rem; + padding-bottom: 1.25rem; + font-family: "Creepster", cursive; + font-size: 8rem; + color: rgba(0,0,0,0.7); + +} + +#banner p { + color: white; + line-height: 1.5; + font-size: 1.375rem; +} + +@media only screen and (max-width: 820px) { + h1 { + padding-top: 7rem; + font-size: 6rem; + } +} + +@media only screen and (max-width: 590px) { + h1 { + font-size: 4rem; + } +} + +/* Color Guide */ + +#color-guide { + padding: 3.875rem 15% 13.5rem 15%; +} + +#color-guide .introduction { + padding: 0 10%; + margin-bottom: .75rem; + text-align: center; + font-size: 1.375rem; + line-height: 1.4; +} + +#color-guide h2 { + margin-bottom: 2.4375rem; + line-height: 1; + font-size: 2rem; + color: #ff8000; +} + +#color-guide .color { + display: flex; + justify-content: space-between; + padding-top: 5.25rem; +} + +.color .information { + display: flex; + flex-direction: column; + justify-content: space-between; + width: 35%; +} + +.color .information h3 { + padding-bottom: .5rem; + font-size: 1.375rem; + font-weight: bold; +} + +.color .information p { + font-size: .875rem; + line-height: 1.4; +} + +.color .swatches { + width: 60%; +} + +.color .swatches h4 { + margin-bottom: 1.25rem; + font-size: 1.125rem; + font-weight: bold; + color: #9b9b9b; + +} + +.color .swatch { + display: flex; + height: 6.6875rem; + border: 10px solid #e6e6e6; + margin-bottom: 1.25rem; +} + +.color .swatch:last-child { + margin-bottom: 0; +} + +.color .swatch > div { + flex-grow: 1; + border-right: 10px solid #e6e6e6; +} + +.color .swatch > div:last-child { + border-right: 0; +} + +@media only screen and (max-width: 820px) { + #color-guide .color { + flex-direction: column; + align-items: center; + } + + .color .information { + width: 100%; + margin-bottom: 3rem; + align-items: center; + } + + .color .information h3 { + padding-bottom: 1.5rem; + } + + .color .information p { + margin-bottom: 2rem; + } + + .color .swatches { + width: 100%; + } +} + +/* Red Swatches */ + +.reds .base-color { + color: hsl(350, 100%, 50%); +} + +/* Red lightness decreases by 15 */ +.reds .lightness .color-1 { + background-color: hsl(350, 100%, 80%); +} + +.reds .lightness .color-2 { + background-color: hsl(350, 100%, 65%); +} + +.reds .lightness .color-3 { + background-color: hsl(350, 100%, 50%); +} + +.reds .lightness .color-4 { + background-color: hsl(350, 100%, 35%); +} + +.reds .lightness .color-5 { + background-color: hsl(350, 100%, 20%); +} + +/* Red saturation decreases by 15 */ +.reds .saturation .color-1 { + background-color: hsl(350, 100%, 50%); +} + +.reds .saturation .color-2 { + background-color: hsl(350, 85%, 50%); +} + +.reds .saturation .color-3 { + background-color: hsl(350, 70%, 50%); +} + +.reds .saturation .color-4 { + background-color: hsl(350, 55%, 50%); +} + +.reds .saturation .color-5 { + background-color: hsl(350, 40%, 50%); +} + +/* Red hue increases by 15 */ +.reds .hue .color-1 { + background-color: hsl(320, 100%, 50%); +} + +.reds .hue .color-2 { + background-color: hsl(335, 100%, 50%); +} + +.reds .hue .color-3 { + background-color: hsl(350, 100%, 50%); +} + +.reds .hue .color-4 { + background-color: hsl(5, 100%, 50%); +} + +.reds .hue .color-5 { + background-color: hsl(20, 100%, 50%); +} + +/* Green Swatches */ + +.greens .base-color { + color: hsl(130, 100%, 50%); +} + +/* Green lightness decreases by 20 */ +.greens .lightness .color-1 { + background-color: hsl(103, 100%, 90%); +} + +.greens .lightness .color-2 { + background-color: hsl(103, 100%, 70%); +} + +.greens .lightness .color-3 { + background-color: hsl(103, 100%, 50%); +} + +.greens .lightness .color-4 { + background-color: hsl(103, 100%, 30%); +} + +.greens .lightness .color-5 { + background-color: hsl(104, 100%, 10%); +} + +/* Green saturation decreases by 20 */ +.greens .saturation .color-1 { + background-color: hsl(130, 100%, 50%); +} + +.greens .saturation .color-2 { + background-color: hsl(130, 80%, 50%); +} + +.greens .saturation .color-3 { + background-color: hsl(130, 60%, 50%); +} + +.greens .saturation .color-4 { + background-color: hsl(130, 40%, 50%); +} + +.greens .saturation .color-5 { + background-color: hsl(131, 20%, 50%); +} + +/* Green hue increases by 22 */ +.greens .hue .color-1 { + background-color: hsl(86, 100%, 50%); +} + +.greens .hue .color-2 { + background-color: hsl(108, 100%, 50%); +} + +.greens .hue .color-3 { + background-color: hsl(130, 100%, 50%); +} + +.greens .hue .color-4 { + background-color: hsl(152, 100%, 50%); +} + +.greens .hue .color-5 { + background-color: hsl(174, 100%, 50%); +} + +/* Blue Swatches */ + +.blues .base-color { + color: hsl(220, 100% 50%); +} + +/* Blue lightness decreases by 20 */ +.blues .lightness .color-1 { + background-color: hsl(220, 100%, 90%); +} + +.blues .lightness .color-2 { + background-color: hsl(220, 100%, 70%); +} + +.blues .lightness .color-3 { + background-color: hsl(220, 100%, 50%); +} + +.blues .lightness .color-4 { + background-color: hsl(220, 100%, 30%); +} + +.blues .lightness .color-5 { + background-color: hsl(220, 100%, 10%); +} + +/* Blue saturation decreases by 20 */ +.blues .saturation .color-1 { + background-color: hsl(220, 100%, 50%); +} + +.blues .saturation .color-2 { + background-color: hsl(220, 80%, 50%); +} + +.blues .saturation .color-3 { + background-color: hsl(220, 60%, 50%); +} + +.blues .saturation .color-4 { + background-color: hsl(220, 40%, 50%); +} + +.blues .saturation .color-5 { + background-color: hsl(220, 20%, 50%); +} + +/* Blue hue decreases by 20 */ +.blues .hue .color-1 { + background-color: hsl(220, 100%, 50%); +} + +.blues .hue .color-2 { + background-color: hsl(240, 100%, 50%); +} + +.blues .hue .color-3 { + background-color: hsl(220, 100%, 50%); +} + +.blues .hue .color-4 { + background-color: hsl(200, 100%, 50%); +} + +.blues .hue .color-5 { + background-color: hsl(180, 100%, 50%); +} + +/* Footer */ + +footer { + position: relative; + height: 30rem; + padding: 7.8125rem 30% 0 30%; + background: url("https://content.codecademy.com/courses/freelance-1/unit-6/footer.png") center center no-repeat; + background-size: cover; + text-align: center; + font-size: 1.125rem; + line-height: 1.4; + color: white; +} + +footer:before { /* Overlay */ + position: absolute; + content: ""; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0; + +} + +footer * { + position: relative; /* Makes elements display above overlay. */ +} + +footer strong { + display: block; + margin-bottom: 1.25rem; + font-size: 2.25rem; +} + +footer p { + margin-bottom: 4.3125rem; +} + +footer .button { + padding: 1.25rem 3.75rem; + border-radius: 4px; + background-color: #ff8000; +} + +@media only screen and (max-width: 560px) { + footer { + padding: 4.8125rem 15% 0 15%; + } +} diff --git a/liuSenseiWebLesson/css/Csspractive5.css b/liuSenseiWebLesson/css/Csspractive5.css new file mode 100644 index 0000000..23ca24d --- /dev/null +++ b/liuSenseiWebLesson/css/Csspractive5.css @@ -0,0 +1,107 @@ +body { + background-color: #FFF; + margin: 0 auto; +} + +header { + background-color: #466995; + border-bottom: 1px solid #466995; + position: fixed; + width: 100%; + z-index: 10; +} + +ul { + margin: 30px auto; + padding: 0 20px; + text-align: center; +} + +li { + color: #FFF; + font-family: 'Oswald', sans-serif; + font-size: 16px; + font-weight: 300; + text-transform: uppercase; + display: inline-block; + width: 80px; +} + +li:hover { + color: #DBE9EE; +} + +h1 { + color: #466995; + font-family: 'Oswald', sans-serif; + font-size: 32px; + font-weight: 300; + text-transform: uppercase; +} + +h2 { + color: #333; + font-family: 'Varela Round', sans-serif; + font-size: 26px; + font-weight: 100; + margin: 0 auto 20px auto; +} + +h3 { + color: #466995; + font-family: 'Oswald', sans-serif; + font-size: 18px; + text-align: center; + font-weight: 700; + text-transform: uppercase; + padding: 30px; +} + +h4 { + color: #466995; + font-family: 'Oswald', sans-serif; + font-size: 18px; + font-weight: 300; + letter-spacing: 2px; + text-align: center; + text-transform: uppercase +} + +p { + color: #333; + font-family: 'Varela Round', sans-serif; + font-size: 18px; +} + +footer { + background-color: #DBE9EE; + text-align: center; + height: 100px; +} + +.welcome { + background-color: #DBE9EE; + box-sizing: border-box; + padding: 40px; + text-align: center; + width: 100%; + position: relative; + top: 50px; +} + +.question { + text-align: center; + position: relative; + top: 40px; +} + +.answer { + border: 1px solid #466995; + margin: 20px; + display: inline-block; +} + +.answer:hover { + background: #C0D6DF; + color: #FFF; +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/Csspractive6.css b/liuSenseiWebLesson/css/Csspractive6.css new file mode 100644 index 0000000..5f84e0d --- /dev/null +++ b/liuSenseiWebLesson/css/Csspractive6.css @@ -0,0 +1,148 @@ +html, body { + margin: 0; + padding: 0; +} + +header { + background-color: #333333; + position:fixed; + width: 100%; + z-index:1; +} + +nav { + margin: 0; + padding: 20px 0; +} + +nav li { + color: #fff; + font-family: 'Raleway', sans-serif; + font-weight: 600; + font-size: 12px; + display:inline-block; + width: 80px; +} + +main { + text-align: center; + position:relative; + top: 80px; +} + +main h1 { + color: #333; + font-family: 'Raleway', sans-serif; + font-weight: 600; + font-size: 70px; + margin-top: 0px; + padding-top: 80px; + margin-bottom: 80px; + text-transform: uppercase; +} + +footer { + background-color: #333; + color: #fff; + padding: 30px 0; +} + +footer p { + font-family: 'Raleway', sans-serif; + text-transform: uppercase; + font-size: 11px; +} + +.container { + max-width: 940px; + margin: 0 auto; + padding: 0 10px; + text-align: center; +} + +.jumbotron { + height: 800px; + background-image: url("https://content.codecademy.com/projects/broadway/bg.jpg"); + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} + +.btn-main { + background-color: #333; + color: #fff; + font-family: 'Raleway', sans-serif; + font-weight: 600; + font-size: 18px; + letter-spacing: 1.3px; + padding: 16px 40px; + text-decoration: none; + text-transform: uppercase; +} + +.btn-default { + font-family: 'Raleway', sans-serif; + font-weight: 600; + font-size: 10px; + letter-spacing: 1.3px; + padding: 10px 20px; + text-decoration: none; + text-transform: uppercase; + margin-bottom: 20px; +} + +.supporting { + padding-top: 80px; + padding-bottom: 100px; +} + +.supporting .col { + font-family: 'Raleway', sans-serif; + text-align: center; + display:inline-block; + width: 200px; +} + +.supporting img { + height: 32px; +} + +.supporting h2 { + font-weight: 600; + font-size: 23px; + text-transform: uppercase; +} + +.supporting p { + font-weight: 400; + font-size: 14px; + line-height: 20px; + padding: 0 20px; + margin-bottom: 20px; +} + +.supporting a { + background-color: white; + color: #333333; + font-family: 'Raleway', sans-serif; + font-weight: 600; + font-size: 12px; + letter-spacing: 1.3px; + text-decoration: none; + text-transform: uppercase; + padding: 10px; + margin-bottom: 10px; + border: 2px solid #333333; +} + +@media (max-width: 500px) { + main h1 { + font-size: 50px; + padding: 0 40px; + } + + .supporting .col { + width: 100%; + } +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/Csstypogtaphypractice.css b/liuSenseiWebLesson/css/Csstypogtaphypractice.css new file mode 100644 index 0000000..4839af1 --- /dev/null +++ b/liuSenseiWebLesson/css/Csstypogtaphypractice.css @@ -0,0 +1,144 @@ +@font-face { + font-family: 'GlegooBanner'; + src: url('../fonts/Glegoo-Regular.woff2') format('woff2'), + url('../fonts/Glegoo-Regular.woff') format('woff'), + url('../fonts/Glegoo-Regular.ttf') format('truetype') +} + +/* Universal Styles */ +html { + font-size: 16px; + font-family: 'Arial', sans-serif; +} + +body { + background-color: #F2F2F2; + text-align: center; +} + +h1 { + padding: 20px; + color: white; + font-size: 28px; + text-align: center; + font-family: Georgia; + text-transform: uppercase; + letter-spacing: 0.3em; +} + +h2 { + padding: 40px 20px 0 20px; + font-size: 24px; + text-align: center; +} + +a { + text-decoration: none; +} + +p { + max-width: 900px; + margin: 0 auto; + padding: 20px; + text-align: justify; +} + + +/* Header */ +.header { + position: fixed; + top: 0; + width: 100%; + padding: 20px 0; + background-color: #fff; + font-size: 14px; + font-weight: 900; +} + +.header li { + display: inline-block; + padding: 10px; +} + +.header a { + color: #4A4A4A; +} + +a.home { + color: #4D00FF; +} + + +/* Banner Section */ +.banner { + margin-top: 74px; + padding: 40px 0 100px 0; + background-color: #4D00FF; +} + +.banner p { + border-top: 1px solid #fff; + border-bottom: 1px solid #fff; + color: #ffffff; + font-weight: lighter; + word-spacing: 0.25em; + line-height: 1.4; + font-family: 'GlegooBanner'; + font-size: 20px; +} + + +/* Editorial Sections */ +.editorial { + padding-bottom: 40px; + color: #717171; + font-family: 'Trebuchet MS', 'Times New Roman', serif; +} + +/* Font Card Sections */ +.font-card { + padding: 10px 0 40px 0; + background-color: #ffffff; + text-align: center; +} + +.font-card .creator { + padding: 10px 20px; + font-size: 16px; + font-style: italic; +} + +.sample { + display: inline-block; + padding: 5px 40px; +} + +.sample .text { + color: #4D00FF; + font-size: 100px; +} + +.garamond { + font-family: Garamond; +} + +.helvetica { + font-family: Helvetica; +} + +.space { + font-family: 'Space Mono', monospace; +} + +.bold { + font-weight: 900; +} + +.regular { + font-weight: normal; +} + +.italic { + font-weight: normal; + font-style: italic; +} diff --git a/liuSenseiWebLesson/css/busasi.css b/liuSenseiWebLesson/css/busasi.css new file mode 100644 index 0000000..9c81e61 --- /dev/null +++ b/liuSenseiWebLesson/css/busasi.css @@ -0,0 +1,102 @@ +body{ + + background-color: black; +} +#article div{ + +} + +#article-title{ + background-color: crimson; + margin: 0 auto; + width: 600px; + height: 50px; + font-size: 40px; +} + + +.table{ + margin: auto; + width: 100%; + height: 1000px; + box-shadow: 5px 5px 5px 15px #322110 inset; +} + +.box1{ + width: 100%; + height: 100px; + box-shadow: 5px 5px 5px 15px #322110 inset; +} + +.left{ + float: left; + width: 30%; + height: 100px; + position: relative; + + color: white; + text-align: center; + +} + + + +.mid{ + float: left; + width: 40%; + height: 100px; + background-color: blue; + color:white; + text-align: center; + line-height: 60px; +} + +.right{ + float: left; + width: 30%; + height: 100px; + background-color: #ff8000; + color: white; + position: relative; + text-align: center; +} + +.back { + background-color: rgba(255,255,255, 0.5); + position: absolute; + width: 100%; + height: 30px; + + +} +.laftname1{ + margin-top: 60px; + +} + +.laftname2{ + margin-top: 60px; +} + +.laftname3{ + margin-top: 60px; +} + + +.rightname1{ + text-align: center; + margin-top: 60px; +} + +.rightname2{ + text-align: center; + margin-top: 60px; +} +.rightname3{ + text-align: center; + margin-top: 60px; +} +.img1 { + height: 100px; + width: 30%; +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/cssbox1.css b/liuSenseiWebLesson/css/cssbox1.css new file mode 100644 index 0000000..526ec1b --- /dev/null +++ b/liuSenseiWebLesson/css/cssbox1.css @@ -0,0 +1,124 @@ +body { + background-color: white; + font-family: 'Raleway', sans-serif; + margin: 0; + padding: 0; +} + +.navigation ul { + margin: 0; + padding: 0; + text-align: center; +} + +.navigation li { + font-weight: 100; + letter-spacing: 2px; + padding: 20px; +} + +.navigation li.logo { + color: black; + font-size: 18px; + font-weight: 700; + letter-spacing: 4px; +} + +.donate{ + visibility: hidden; +} + +#banner { + background-image: url("https://content.codecademy.com/courses/web-101/unit-6/htmlcss1-img_tahoe.jpeg"); + background-size: cover; + background-position: bottom center; + height: 700px; + width: 100%; +} + +#banner .content h1 { + border: 3px solid white; + position: relative; + top: 50px; + width: 400px; + margin: 0 auto; +} + +#main { + margin: 0 auto; + padding: 40px; + text-align: center; + width: 400px; + height: 1000px; + overflow: scroll; +} + +h1 { + color: white; + font-size: 42px; + font-weight: 600; + text-align: center; +} + +h2 { + border: 1px dotted red; + color: red; + font-size: 14px; + line-height: 48px; + padding: 20px 30px; + margin: 30px 20px; + text-align: center; +} + +h3 { + color: red; + font-size: 26px; + font-weight: 700; + padding: 20px 10px; +} + +p { + color: grey; + font-size: 16px; + line-height: 48px; + margin-top: 60px; + padding: 10px 20px; +} + +.pull-quote { + margin: 0 auto; + width: 400px; +} + +.byline { + border-bottom: 1px solid LightGrey; + border-top: 1px solid LightGrey; + color: DarkGrey; + font-size: 14px; + font-weight: 200; +} + +.share { + border: 1px solid LightGrey; + padding: 40px 0px; + position: relative; + text-align: center; + width: 100%; +} + +.share a { + background: red; + border: 1px solid red; + border-radius: 3px; + color: white; + display: inline-block; + margin: 10px; + padding: 14px; + text-decoration: none; +} + +.share a:hover { + background: white; + border: 1px solid red; + color: red; +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/cssbox2.css b/liuSenseiWebLesson/css/cssbox2.css new file mode 100644 index 0000000..4a2ed40 --- /dev/null +++ b/liuSenseiWebLesson/css/cssbox2.css @@ -0,0 +1,131 @@ +/* Universal Styles */ + +body { + background-image: url("https://content.codecademy.com/courses/web-101/unit-6/htmlcss1-img_foodlogo.png"); + text-align: center; + font-family: 'Roboto', sans-serif; + font-size: 18px; +} + +a { + text-decoration: none; +} + +/* Navigation */ + +nav { + text-align: center; +} + +nav img { + display: block; + width: 180px; + margin: 0 auto; +} + +nav span { + display: block; + font-size: 16px; + font-weight: 100; + letter-spacing: 2px; + margin: 10px 0px; +} + +nav a { + color: #666666; +} + +/* Content Container */ + +.content { + width: 100%; + height: 500px; + margin: 10px auto; + overflow: scroll; + height: 500px; + margin: 10px auto; +} + +/* Content Header */ + +.header { + background-image: url("https://content.codecademy.com/courses/web-101/unit-6/htmlcss1-img_burgerphoto.jpeg"); + background-position: center; + background-size: cover; + height: 320px; +} + +.header h1 { + background-color: #05A8AA; + color: #FFF; + font-family: 'Oswald', sans-serif; + font-size: 40px; + font-weight: 300; + line-height: 40px; + width: 68%; + padding: 20px; + margin: 0 auto; +} + +/* Content Body */ + +.content .body { + width: 90%; + margin: 0 auto; +} + +.body p { + color: #333333; + font-weight: 100; + line-height: 34px; + width: 90%; + margin-top: 18px; +} + +/* Content Button */ + +.button { + border-radius: 4px; + color: #05A8AA; + display: block; + font-weight: 700; + width: 200px; + padding: 20px; + margin: 40px auto; + border: solid blue; +} + +.button:hover { + background-color: #05A8AA; + border: 1px solid #05A8AA; + color: #FFF; +} + +/* Content Nutrition */ + +ul.nutrition { + padding: 20px; +} + +ul.nutrition li { + display: inline-block; + background-color: #05A8AA; + list-style: none; + width: 200px; + padding: 10px 20px; + margin-bottom: 3px; +} + +.nutrition .category { + color: white; + font-weight: 100; + letter-spacing: 2px; + display: block; +} + +.nutrition .value { + color: white; + font-size: 26px; + font-weight: 700; + letter-spacing: 2px; +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/csspractice1.css b/liuSenseiWebLesson/css/csspractice1.css new file mode 100644 index 0000000..2b08ccb --- /dev/null +++ b/liuSenseiWebLesson/css/csspractice1.css @@ -0,0 +1,81 @@ +* { + border: 1px solid red; +} + +p { + color: green; +} + +h1 { + color: maroon; +} + +.title { + color: teal; +} + +.uppercase { + text-transform: uppercase; +} + +#article-title { + font-family: cursive; +} + +a[href*='florence'] { + color: lightgreen; +} + +a[href*='beijing'] { + color: lightblue; +} + +a[href*='seoul'] { + color: lightpink; +} + +a:hover { + color:darkorange; +} + +.heading-background { + background-color: aqua; +} + +#publish-time { + color: lightgray; +} + +h5 { + color: yellow; +} + +.author-class { + color: pink; +} + +#author-id { + color: cornflowerblue; +} + +h2.destination { + font-family: Tahoma; +} + +.description h5 { + color: blueviolet; +} + +li h4 { + color: gold; +} + +h4 { + color: dodgerblue; +} + +li, +h5 { + font-family: monospace; +} + diff --git a/liuSenseiWebLesson/css/csspractice2.css b/liuSenseiWebLesson/css/csspractice2.css new file mode 100644 index 0000000..9aab103 --- /dev/null +++ b/liuSenseiWebLesson/css/csspractice2.css @@ -0,0 +1,23 @@ +img{ + height: 150px; +} + +.description{ + font-size: 20px; +} +#cook-time { + font-weight: bold; +} +.ingredients li{ + list-style: square; +} +p.time{ + color: gray; +} + +.external-link{ + color: SeaGreen; +} +h1,h2,p,li{ + font-family: Helvetica;color:red; +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/csspractice3.css b/liuSenseiWebLesson/css/csspractice3.css new file mode 100644 index 0000000..406db57 --- /dev/null +++ b/liuSenseiWebLesson/css/csspractice3.css @@ -0,0 +1,84 @@ +body { + /* Old browsers */ + background: #141E30; + /* Chrome 10-25, Safari 5.1-6 */ + background: -webkit-linear-gradient(-45deg, #35577D, #141E30); + /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ + background: linear-gradient(-45deg, #35577D, #141E30); + margin: 0; + padding: 0; +} + +h1 { + color: #FFF !important; + font-size: 2em; + padding-top: 100px; + width: 100%; + font-family: Georgia; + text-align: center; +} + +h2 { + border-bottom: 1px solid rgba(255, 255, 255, 0.5); + color: rgba(255, 255, 255, 0.5); + font-weight: 100; + font-size: 22px; + line-height: 24px; + padding-bottom: 30px; + text-align: left; + width: 70%; + font-family: Georgia; +} + +p { + color: aliceblue; + line-height: 1.3em; + text-align: left; + width: 100%; + font-family: Helvetica; + font-size: 18px; + font-weight: bold; +} + +.byline { + font-family: Helvetica; + color: rgba(255, 255, 255, 0.5); + float: left; + font-size: 14px; + padding-left: 10px; + text-transform: uppercase; +} + +.caption { + display: block; + font-family: 'Playfair Display', serif; + font-size: 14px; + font-style: italic; + line-height: 14px; + margin-left: 20px; + padding: 10px; + position: relative; + top: 80%; + width: 60%; + background-color: white; + color: black; +} + +.content { + padding: 40px; +} + +.image { + background-image: url('https://content.codecademy.com/courses/freelance-1/unit-2/soccer.jpeg'); + background-size: cover; + background-position: center; + height: 300px; +} + +.writer-img { + -webkit-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97); + -moz-box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97); + box-shadow: 5px 0px 5px 0px rgba(0, 0, 50, 0.97); + float: left; + width: 50px; +} diff --git a/liuSenseiWebLesson/css/csspractice4.css b/liuSenseiWebLesson/css/csspractice4.css new file mode 100644 index 0000000..d45fd35 --- /dev/null +++ b/liuSenseiWebLesson/css/csspractice4.css @@ -0,0 +1,22 @@ +.header{ + background-color:CornflowerBlue; + text-align:center; +} + +.about-me{ + font-size: 20px; + opacity: 0.5; +} + +.title{ + font-weight: bold; +} + +h1{ + color:Azure; +} + +body{ + font-family: Georgia; + background-image: url('https://content.codecademy.com/courses/learn-css-selectors-visual-rules/hypnotize_bg.png'); +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/newtext.css b/liuSenseiWebLesson/css/newtext.css new file mode 100644 index 0000000..cea2bee --- /dev/null +++ b/liuSenseiWebLesson/css/newtext.css @@ -0,0 +1,17 @@ +.father{ + width: 200px; + height: 200px; + border: 1px solid black; + position: relative; +} +.son{ + width: 100px; + height: 100px; + background: #ff8000; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + margin: auto; +} \ No newline at end of file diff --git a/liuSenseiWebLesson/css/style.css b/liuSenseiWebLesson/css/style.css new file mode 100644 index 0000000..5031dd3 --- /dev/null +++ b/liuSenseiWebLesson/css/style.css @@ -0,0 +1,74 @@ +body { + background-color: #242f44; + color: white; + font-family: 'Oswald', sans-serif; +} + +header { + text-align: center; + margin-top: 5px; +} + +h1 { + font-size: 36px; + padding: 15px; + color: #8c6b48; + background-color: white; +} + +h2 { + font-size: 24px; + padding: 15px; + text-transform: uppercase; +} + +h3 { + font-size: 20px; + padding: 15px; + text-transform: uppercase; + text-align: left; + margin-left: 20px; + font-weight: 500; + line-height: 2.7; + letter-spacing: 0.8px; +} + +th { + border: 2px solid #8c6b48; +} + +table { + text-align: center; + margin: 20px auto; +} + +td { + border: 2px solid #8c6b48; + width: 300px; +} + +footer { + margin-top: 50px; + text-align: center; + position: fixed; + width: 100%; + bottom: 5px; + background-color: #242f44; + z-index: 5; +} +footer h3 { + display: inline-block; + font-size: 14px; + background-color: #242f44; +} + +.container { + max-width: 940px; + margin: 0 auto; + height: 800px; +} + + +.left { + width: 150px; +} diff --git a/liuSenseiWebLesson/cssbox1.html b/liuSenseiWebLesson/cssbox1.html new file mode 100644 index 0000000..5e73f93 --- /dev/null +++ b/liuSenseiWebLesson/cssbox1.html @@ -0,0 +1,50 @@ + + + + The Terminal - Your Source for Fact-Based News + + + + + + + + + +
+

THE STATE'S LATEST CONSERVATION EFFORTS ARE BEING HERALDED BY NATION'S TOP LEADERS AS GROUNDBREAKING AND FORWARD THINKING.

+ WRITTEN BY: JAMES JAYCE +

Until recently, construction on the banks of the Lake had been largely under the control of real estate developers. Construction activities have resulted in a clouding of the lake's blue waters. Currently, the Tahoe Regional Planning Agency is regulating construction along the shoreline and has won two Federal Supreme Court battles over recent decisions. These regulations are unpopular with many residents, especially those in the Tahoe Lakefront Homeowners Association.

+ +

The League to Save Lake Tahoe (Keep Tahoe Blue) has been an environmental watchdog in the Lake Tahoe Basin for 50 years. Founded when a proposal to build a four-lane highway around the lake (with a bridge over the entrance to Emerald Bay) was proposed in 1957, the League has thwarted poorly designed development projects and environmentally unsound planning. The League embraces responsible and diversified use of the Lake's resources while protecting and restoring its natural attributes.

+ +
+

"THE LEAGUE EMBRACES RESPONSIBLE AND DIVERSIFIED USE OF THE LAKE'S RESOURCES WHILE PROTECTING AND RESTORING ITS NATURAL ATTRIBUTES"

+
+ +

Since 1980, the Lake Tahoe Interagency Monitoring Program (LTIMP) has been measuring stream discharge and concentrations of nutrients and sediment in up to 10 tributary streams in the Lake Tahoe Basin, California-Nevada. The objectives of the LTIMP are to acquire and disseminate the water quality information necessary to support science-based environmental planning and decision making in the basin. The LTIMP is a cooperative program with support from 12 federal and state agencies with interests in the Tahoe Basin. This data set, together with more recently acquired data on urban runoff water quality, is being used by the Lahontan Regional Water Quality Control Board to develop a program (mandated by the Clean Water Act) to limit the flux of nutrients and fine sediment to the Lake.

+ +

UC Davis remains a primary steward of the lake. The UC Davis Tahoe Environmental Research Center is dedicated to research, education and public outreach, and to providing objective scientific information for restoration and sustainable use of the Lake Tahoe Basin. Each year, it produces a well-publicized "State of the Lake" assessment report.

+
+ +
+ SHARE + FAVORITE + READ +
+ + + \ No newline at end of file diff --git a/liuSenseiWebLesson/cssbox2.html b/liuSenseiWebLesson/cssbox2.html new file mode 100644 index 0000000..a24d5b0 --- /dev/null +++ b/liuSenseiWebLesson/cssbox2.html @@ -0,0 +1,71 @@ + + + + Davie JR's Menu + + + + + + + + + + + + + +
+ + + +
+

BBQ BACON BURGER

+
+ + + +
+

+ Our BBQ Bacon Burger features our special house ground blend of wagyu and sirloin, spiced perfectly, and finished off with just a drop of white truffle oil. A butter grilled brioche bun layered with roasted red onion, perfectly crispy pork belly, and our hickory smoked BBQ sauce. +

+ + + + ORDER NOW + + + + +
+
+ + + \ No newline at end of file diff --git a/liuSenseiWebLesson/csspractice1.html b/liuSenseiWebLesson/csspractice1.html new file mode 100644 index 0000000..0b28eb8 --- /dev/null +++ b/liuSenseiWebLesson/csspractice1.html @@ -0,0 +1,61 @@ + + + + + Vacation World + + + + + +

Top Vacation Spots

+
By: Stacy Gray
+
Published: 2 Days Ago
+ +

The world is full of fascinating places. Planning the perfect vacation involves packing up, leaving home, and experiencing something new.

+ +

1. Florence, Italy

+
A city-size shrine to the Renaissance, Florence offers frescoes, sculptures, churches, palaces, and other monuments from the richest cultural flowering the world has known. Names from its dazzling historical past; Dante, Michelangelo, Galileo, Machiavelliare are some of the most resonant of the medieval age. Learn More. +
Top Attractions
+ +
+ +

2. Beijing, China

+
A city in the midst of reinventing itself and continuing to build on the success of the 2008 Summer Olympics, Beijing is a place of frenzied construction. New housing, new roads, and new sports venues seem to spring up overnight. At the same time, the capital of the Peoples Republic of China remains an epicenter of tradition, with the treasures of nearly 2,000 years as the imperial capital still on view in the famed Forbidden City and in the luxuriant pavilions and gardens of the Summer Palace. + Learn More. +
Top Attractions
+ +
+ +

3. Seoul, South Korea

+
The Korean capital is a city of contrasts. Fourteenth-century city gates squat in the shadow of 21st-century skyscrapers, while the broad Han River is back-dropped by granite mountains rising in the city center complete with alpine highways speeding around their contours and temples nestling among their crags. Fashionable, gadget-laden youths battle for sidewalk space with fortune-tellers and peddlers, while tiny neighborhoods of traditional cottages contrast with endless ranks of identical apartments. + Learn More. +
Top Attractions
+ +
+ +

More Destinations

+ + +

—Best of luck with your travels, and be sure to send pictures and stories. We'd love to hear them!

+ + + + + \ No newline at end of file diff --git a/liuSenseiWebLesson/csspractice2.html b/liuSenseiWebLesson/csspractice2.html new file mode 100644 index 0000000..0b3387a --- /dev/null +++ b/liuSenseiWebLesson/csspractice2.html @@ -0,0 +1,46 @@ + + + + + Quinoa and Kale Salad Recipe + + + + + +Kale Caeasar Salad +

Kale Caesar Quinoa Salad with Roasted Chicken

+

Kale and quinoa provide a healthy base for roasted chicken topped with a light Caesar sauce.

+ +

Total time: 45 minutes

+ +

Ingredients

+ + +

Preparation

+
    +
  1. +

    Prepare quinoa and roast chicken until golden brown and 165 in middle.

    +

    Time: 40 minutes

    +
  2. +
  3. +

    Toss quinoa, chicken, kale, and Caesar dressing until coated.

    +

    Time: 4 minutes

    +
  4. +
  5. +

    Add walnuts and olive oil as garnish.

    +

    Time: 1 minute

    +
  6. +
+ +

Find this recipe and more here.

+ + + + diff --git a/liuSenseiWebLesson/csspractice3.html b/liuSenseiWebLesson/csspractice3.html new file mode 100644 index 0000000..79a2591 --- /dev/null +++ b/liuSenseiWebLesson/csspractice3.html @@ -0,0 +1,28 @@ + + + + + The Rise of Soccer in The US + + + + + +
+ +

Article By: Jane Dover

+

How the Rise of Soccer in the US Is Changing the Face of Youth Sports

+

The focus on soccer in youth sports programs is exploding nation-wide

+

When the first World Cup arrived in the US in the 90's everyone officially declared that soccer was it. Well it's taken it's time but we can definitely see the influence of soccer, especially women's soccer, across the US. This year, 3 million kids + played in youth soccer leagues with 2/3 of those leagues for girls. In fact, in the 12-17 age range the MLS has surpassed the MLB and NFL in popularity.

+

Part of this meteoric rise can be attributed to the impressively soaring ad dollars being pumped into the Women's World Cup games in 2014. The women's games generated $40 million for Fox, that's definitely not chump change. And those advertisers, + like ATT, Coca Cola, Verizon, Nike, Visa, and other heavy hitters, are working to make sure they see those numbers grow year after year by investing in youth soccer facilities and promoting programs across the country.

+

Now that big business is involved you can be assured you'll see a continued rise in popularity in soccer across the country for years to come.

+
+ +
+

The local semi- pro soccer team in Seattle, WA plays an international friendly

+
+ + + diff --git a/liuSenseiWebLesson/csspractice4.html b/liuSenseiWebLesson/csspractice4.html new file mode 100644 index 0000000..c2e5e1d --- /dev/null +++ b/liuSenseiWebLesson/csspractice4.html @@ -0,0 +1,36 @@ + + + + + + + + + +
+ +

Olivia Woodruff

+

I am a developer specializing in HTML and CSS. I like to run, bike, and make coffee using an Aeropress.

+
+ +

Projects

+

Web Development projects

+ + +

Design projects

+ +

Contact

+

Find me on Twitter, Dribbble, and GitHub.

+ +
© Copyright. All Rights Reserved.
+ + + diff --git a/liuSenseiWebLesson/img/12345.jpg b/liuSenseiWebLesson/img/12345.jpg new file mode 100644 index 0000000..8c446a1 Binary files /dev/null and b/liuSenseiWebLesson/img/12345.jpg differ diff --git a/liuSenseiWebLesson/jsPractice1.js b/liuSenseiWebLesson/jsPractice1.js new file mode 100644 index 0000000..541d74e --- /dev/null +++ b/liuSenseiWebLesson/jsPractice1.js @@ -0,0 +1,12 @@ +let secretMessage = ['Learning', 'is', 'not', 'about', 'what', 'you', 'get', 'easily', 'the', 'first', 'time,', 'it', 'is', 'about', 'what', 'you', 'can', 'figure', 'out.', '-2015,', 'Chris', 'Pine,', 'Learn', 'JavaScript']; +secretMessage.pop(); +console.log(secretMessage.length); + +secretMessage.push("to","Program"); + +secretMessage[7]='right'; +secretMessage.shift(); +secretMessage.unshift('Programming'); + +secretMessage.splice('get', 'right', 'the', 'first', 'time','know'); +console.log(secretMessage.join(' ')); \ No newline at end of file diff --git a/liuSenseiWebLesson/loading.html b/liuSenseiWebLesson/loading.html new file mode 100644 index 0000000..e265061 --- /dev/null +++ b/liuSenseiWebLesson/loading.html @@ -0,0 +1,48 @@ + + + + + 登入模擬 + + + +
+ 帳號:
+ 密碼: +
+ 成功與否: +
+ + + + + +if(a==3&&b==4){ +$("#answer").text("True"); +} +else { +$("#answer").text("False"); +} \ No newline at end of file diff --git a/liuSenseiWebLesson/loadmutification.html b/liuSenseiWebLesson/loadmutification.html new file mode 100644 index 0000000..013e639 --- /dev/null +++ b/liuSenseiWebLesson/loadmutification.html @@ -0,0 +1,40 @@ + + + + + 登入模擬 + + + +
+ 帳號:
+ 密碼: +
+ 成功與否: +
+ + diff --git a/liuSenseiWebLesson/sanngaku.html b/liuSenseiWebLesson/sanngaku.html new file mode 100644 index 0000000..ee97568 --- /dev/null +++ b/liuSenseiWebLesson/sanngaku.html @@ -0,0 +1,29 @@ + + + + + 計算斜邊 + + + +
+ 長邊:
+ 短編: +
+ 答案: +
+ + + + + \ No newline at end of file diff --git a/src/Calculator.java b/src/Calculator.java new file mode 100644 index 0000000..b68871f --- /dev/null +++ b/src/Calculator.java @@ -0,0 +1,34 @@ +public class Calculator{ + public Calculator(){} + /* + This is an Abacus that is used to slide beads around and do math. + It was created by Laura in 2019. + */ + public int add(int a,int b){ + return a+b; + } + + public int substrat(int a,int b){ + return a-b; + } + + public int mutiply(int a,int b){ + return a*b; + } + + public int divide(int a,int b){ + return a/b; + } + + public int modulo(int a,int b){ + return a%b; + } + + public static void main(String[] args) { + Calculator myCalculator = new Calculator(); + System.out.println(myCalculator.add(5,7)); + System.out.println(myCalculator.substrat(45,11)); + + } + +} \ No newline at end of file diff --git a/src/CombineNames.java b/src/CombineNames.java new file mode 100644 index 0000000..32e926e --- /dev/null +++ b/src/CombineNames.java @@ -0,0 +1,14 @@ +public class CombineNames { + + public static void main(String[] args) { + + // Add your first names: + String firstName = "HSU"; + String lastName = "SHUKAI"; + + // What's the full name? + System.out.println(firstName.concat(lastName)); + + } + +} \ No newline at end of file diff --git a/src/Continents.java b/src/Continents.java new file mode 100644 index 0000000..bd33279 --- /dev/null +++ b/src/Continents.java @@ -0,0 +1,35 @@ +public class Continents { + public static void main(String[] args) { + int continent = 4; + switch (continent) { + case 1: + System.out.println("North America: Mexico City, Mexico"); + break; + + case 2: + System.out.println("South America: Sao Paulo, Brazil"); + break; + + case 3: + System.out.println("Europe: Moscow, Russia"); + break; + case 4: + System.out.println("Africa: Lagos, Nigeria"); + break; + case 5: + System.out.println("Asia: Shanghai, China"); + break; + case 6: + System.out.println("Australia: Sydney, Australia"); + break; + case 7: + System.out.println("Antarctica: McMurdo Station, US"); + break; + default: + System.out.println("Undefined continent!"); + } + + + + } +} \ No newline at end of file diff --git a/src/Hashtag.java b/src/Hashtag.java new file mode 100644 index 0000000..590dbe6 --- /dev/null +++ b/src/Hashtag.java @@ -0,0 +1,12 @@ +public class Hashtag { + + public static void main(String[] args) { + + String hashtag = "#100DaysOfCode"; + + // Make the hashtag lowercase: + System.out.println(hashtag.toLowerCase()); + + } + +} \ No newline at end of file diff --git a/src/Initials.java b/src/Initials.java new file mode 100644 index 0000000..8db9131 --- /dev/null +++ b/src/Initials.java @@ -0,0 +1,15 @@ +public class Initials { + + public static void main(String[] args) { + + // Add a first name and a last name: + String firstName = "HSU"; + String lastName = "SHUKAI"; + + // What are the initials? + System.out.println(firstName.charAt(0)); + System.out.println(lastName.charAt(0)); + + } + +} \ No newline at end of file diff --git a/src/MorseCode.java b/src/MorseCode.java new file mode 100644 index 0000000..97021be --- /dev/null +++ b/src/MorseCode.java @@ -0,0 +1,12 @@ +public class MorseCode { +//indexOf練習 + public static void main(String[] args) { + + String code = ".... .. / .. .----. -- / ... --- -. -. -.-- / .- -. -.. / .. / .-.. .. -.- . / - --- / . .- - / .-. .- -- . -."; + + // Write the code: + + System.out.println(code.indexOf(". .- -")); + } + +} \ No newline at end of file diff --git a/src/Noodle.java b/src/Noodle.java new file mode 100644 index 0000000..74f3ba9 --- /dev/null +++ b/src/Noodle.java @@ -0,0 +1,31 @@ +class Noodle { + + double lengthInCentimeters; + double widthInCentimeters; + String shape; + String ingredients; + String texture = "brittle"; + + Noodle(double lenInCent, double wthInCent, String shp, String ingr) { + + this.lengthInCentimeters = lenInCent; + this.widthInCentimeters = wthInCent; + this.shape = shp; + this.ingredients = ingr; + + } + + public void cook() { + + this.texture = "cooked"; + + } + + public static void main(String[] args) { + Pho phoChay = new Pho(); + System.out.println(phoChay.shape); + + + } + +} \ No newline at end of file diff --git a/src/Password.java b/src/Password.java new file mode 100644 index 0000000..3802adb --- /dev/null +++ b/src/Password.java @@ -0,0 +1,12 @@ +public class Password { + + public static void main(String[] args) { + + String password = "correcthorsebatterystaple"; + + // Write the code: + System.out.println(password.equals("correcthorsebatterystaple")); + + } + +} \ No newline at end of file diff --git a/src/Pho.java b/src/Pho.java new file mode 100644 index 0000000..8edb12c --- /dev/null +++ b/src/Pho.java @@ -0,0 +1,9 @@ +class Pho extends Noodle { + + public Pho(){ + super(30.0,0.64,"flat","rice flour"); + + } + + +} \ No newline at end of file diff --git a/src/Poetry.java b/src/Poetry.java new file mode 100644 index 0000000..30609f6 --- /dev/null +++ b/src/Poetry.java @@ -0,0 +1,11 @@ +public class Poetry { + + public static void main(String[] args) { + + String line = "The Heav'ns and all the Constellations rung"; + // Change the arguments: + System.out.println(line.substring(4, 11)); + + } + +} \ No newline at end of file diff --git a/src/Reservation.java b/src/Reservation.java new file mode 100644 index 0000000..2f0f3d5 --- /dev/null +++ b/src/Reservation.java @@ -0,0 +1,44 @@ +public class Reservation { + int guestCount; + int restaurantCapacity; + boolean isRestaurantOpen; + boolean isConfirmed; + + public Reservation(int count, int capacity, boolean open) { + if (count < 1 || count > 8) { + System.out.println("Invalid reservation!"); + } + guestCount = count; + restaurantCapacity = capacity; + isRestaurantOpen = open; + } + + public void confirmReservation() { + if (restaurantCapacity >= guestCount && isRestaurantOpen) { + System.out.println("Reservation confirmed"); + isConfirmed = true; + } else { + System.out.println("Reservation denied"); + isConfirmed = false; + } + } + + public void informUser() { + // Write conditional here + if(!isConfirmed) { + System.out.println("Unable to confirm reservation, please contact restaurant."); + } + else { + System.out.println("Please enjoy your meal!"); + } + } + + public static void main(String[] args) { + Reservation partyOfThree = new Reservation(3, 12, true); + Reservation partyOfFour = new Reservation(4, 3, true); + partyOfThree.confirmReservation(); + partyOfThree.informUser(); + partyOfFour.confirmReservation(); + partyOfFour.informUser(); + } +} \ No newline at end of file diff --git a/src/febonacci/T.java b/src/febonacci/T.java new file mode 100644 index 0000000..14af598 --- /dev/null +++ b/src/febonacci/T.java @@ -0,0 +1,18 @@ +package febonacci; + +public class T { + public int fibonacci(int n) { + if (n > 0) { + if (n == 1 || n == 2) { + return 1; + } else { + return fibonacci(n - 1) + fibonacci(n - 2); + } + }else{ + System.out.println("輸入大於1的整數"); + return n; + } + + } + +} diff --git a/src/list.java b/src/list.java new file mode 100644 index 0000000..8efa627 --- /dev/null +++ b/src/list.java @@ -0,0 +1,22 @@ +public class list { + public static void main(String[] args) { + int size = 90; + long[] list = new long [size]; + list[0] = 0; + list[1] = 1; + list[2] = list[0] + list[1]; + for (int a = 0 ;a < size;a++) { + if(a < 2){ + list[a] = a; + } + else { + list[a] = list[a - 1] + list[a - 2]; + } + System.out.println(list[a]); + } + + + + + } +} diff --git a/src/noob.java b/src/noob.java new file mode 100644 index 0000000..051ac8b --- /dev/null +++ b/src/noob.java @@ -0,0 +1,19 @@ +public class noob { + public static void main(String[] args) { + ping(11); + ping(16); + + + } + public static void ping(int k){ + int A = 0; + for (int i = 0; i < k; i++) { + if(i%4==1){ A = A+i;} + + } + System.out.println(A); + + } + + +} diff --git a/src/noobLv1.java b/src/noobLv1.java new file mode 100644 index 0000000..0302628 --- /dev/null +++ b/src/noobLv1.java @@ -0,0 +1,23 @@ +public class noobLv1 { + public static void main(String[] args) { + int a=0; + for (int i = 1; i < 100; i++) { + if (extracted(i)){ + a++; + } + + } + System.out.println(a); + } + + private static boolean extracted(int k) { + + for (int i = 2; i < k; i++) { + if (k%i==0){ + return false; + } + + } + return true; + } +} diff --git a/src/numbers b/src/numbers new file mode 100644 index 0000000..e69de29 diff --git a/src/plus.java b/src/plus.java new file mode 100644 index 0000000..a7179ee --- /dev/null +++ b/src/plus.java @@ -0,0 +1,5 @@ +public class plus { + public static void main(String[] args) { + + } +} diff --git a/src/practive1027_1.java b/src/practive1027_1.java new file mode 100644 index 0000000..b01e160 --- /dev/null +++ b/src/practive1027_1.java @@ -0,0 +1,21 @@ +import java.util.Scanner; + +public class practive1027_1 { + public static void main(String[] args) { + + Scanner sca = new Scanner(System.in); + System.out.println("請輸入分數"); + double grade = sca.nextDouble(); + if (grade >8.0){ + System.out.println("輸入性別"); + char gender = sca.next().charAt(0); + if (gender == '男'){ + System.out.println("進入男子組"); + }else if (gender == '女'){ + System.out.println("進入女子組"); + }else {System.out.println("性別有誤,不能參加決賽");} + }else { + System.out.println("落選"); + } + } +} diff --git a/src/practive1027_2.java b/src/practive1027_2.java new file mode 100644 index 0000000..edc7070 --- /dev/null +++ b/src/practive1027_2.java @@ -0,0 +1,27 @@ +import java.util.Scanner; + +public class practive1027_2 { + public static void main(String[] args) { + + Scanner sca = new Scanner(System.in); + System.out.println("請輸入月份"); + int season = sca.nextInt(); + if (season >= 4 && season <= 10){ + System.out.println("輸入年齡"); + int age = sca.nextInt(); + if (age >=18 && age <=60){ + System.out.println("旺季成人票價60元"); + }else if (age < 18 && age >= 0){ + System.out.println("旺季幼童票30元"); + }else {System.out.println("旺季敬老票20元");} + }else { + System.out.println("輸入年齡"); + int age = sca.nextInt(); + if (age >=18 && age <=60){ + System.out.println("淡季成人票價40元"); + }else { + System.out.println("淡季敬老票、幼童票20元"); + } + } + } +} diff --git a/src/practive1028_1_sum.java b/src/practive1028_1_sum.java new file mode 100644 index 0000000..3c6e5d2 --- /dev/null +++ b/src/practive1028_1_sum.java @@ -0,0 +1,11 @@ +public class practive1028_1_sum { + public static void main(String[] args) { + + + for (int i = 0; i < 10; i++) { + for (int j = 0; j < 10; j++) { + System.out.println(i + "x"+ j +"="+(i*j)); + } + } + } +} diff --git a/src/practive1028_2_for_sum.java b/src/practive1028_2_for_sum.java new file mode 100644 index 0000000..ca5ed4c --- /dev/null +++ b/src/practive1028_2_for_sum.java @@ -0,0 +1,32 @@ +import java.util.Scanner; + +public class practive1028_2_for_sum { + public static void main(String[] args) { + + Scanner sca = new Scanner(System.in); + double total = 0 ; + int passnum = 0; + for (int j = 1; j < 4; j++) { + double sum = 0; + + for (int i = 1; i < 6; i++) { + + System.out.println("請輸入第"+j+"個班第"+i+"個學生"); + double score = sca.nextDouble(); + if (score >= 6){ + passnum++; + } + sum += score; + + System.out.println("成績為"+score); + } + + System.out.println(j+"班級平均分="+(sum/5)); + total += sum; + + + } + System.out.println("所有班級平均分="+(total/5/3)); + System.out.println("合格的人"+passnum); + } +} diff --git a/src/practive1028_3_kinnzitou.java b/src/practive1028_3_kinnzitou.java new file mode 100644 index 0000000..bbe7486 --- /dev/null +++ b/src/practive1028_3_kinnzitou.java @@ -0,0 +1,33 @@ +public class practive1028_3_kinnzitou { + + public static void main(String[] args) { + int limt = 30; + for (int i = 1; i <= limt; i++) { + for (int k = 0; k <= limt-i; k++) { + System.out.print(" "); + } + for (int j = 1; j <= 2*i-1; j++) { + System.out.print("*"); + } + System.out.println(""); + + } + //空心金字塔 + + for (int i = 1; i <= limt; i++) { + for (int k = 0; k <= limt-i; k++) { + System.out.print(" "); + } + for (int j = 1; j <= 2*i-1; j++) { + if (j == 1 || j == 2*i-1|| i==limt) { + System.out.print("*"); + }else { + System.out.print(" "); + } + } + System.out.println(""); + + } + + } +} diff --git a/src/practive1028_5_bubble.java b/src/practive1028_5_bubble.java new file mode 100644 index 0000000..786904b --- /dev/null +++ b/src/practive1028_5_bubble.java @@ -0,0 +1,33 @@ +public class practive1028_5_bubble { + public static void main(String[] args) { + int[] arr= {1354,24,69,80,57,13,98,48,45,56,23,2,100,120}; + int a = arr.length; + int temp = 0; + long ti=System.currentTimeMillis(); + for (int j = 0; j < a-1; j++) { +// for (int i = 0; i < a-1; i++) { +// if (arr[i] > arr[i + 1]){ +// temp = arr[i]; +// arr[i]=arr[i+1]; +// arr[i+1]=temp; +// } +// } + for (int i = j+1; i < a-1; i++) { + if (arr[j] > arr[i]){ + temp=arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + } + System.out.println("第"+(j+1)+"輪"); + System.out.print("["); + for (int i = 0; i < a; i++) { + + System.out.print(arr[i]+","); + } + System.out.print("]"); + System.out.println(""); + }System.out.print(System.currentTimeMillis()-ti); + + } +} diff --git a/src/practive1028_5_bubble_2.java b/src/practive1028_5_bubble_2.java new file mode 100644 index 0000000..3173bb8 --- /dev/null +++ b/src/practive1028_5_bubble_2.java @@ -0,0 +1,25 @@ +public class practive1028_5_bubble_2 { + public static void main(String[] args) { + int[] arr = {24, 69, 80, 57, 13, 13544, 98, 48, 45, 56, 23, 2, 100, 300, 1100, 1500}; + int a = arr.length; + int temp = 0; + int max=Integer.MIN_VALUE; + long ti=System.currentTimeMillis(); + for (int j = 0; j < a; j++) { + if(max<=arr[j])max=arr[j]; + } + System.out.println(max); + int[] arr1 = new int[max+1]; + + for (int k = 0; k < arr.length - 1; k++) { + arr1[arr[k]]=1; + } + for (int i = 0; i < max+1; i++) { + if(arr1[i]==1)System.out.print(i+" "); + } + + System.out.print(System.currentTimeMillis()-ti); + } + + +} diff --git a/src/practive1028_5_bubble_3.java b/src/practive1028_5_bubble_3.java new file mode 100644 index 0000000..ad7756a --- /dev/null +++ b/src/practive1028_5_bubble_3.java @@ -0,0 +1,27 @@ +public class practive1028_5_bubble_3 { + public static void main(String[] args) { + String a = "Chinese President Xi Jinping called for accelerating the building of a world-class military while touting the fight against COVID-19 as he kicked off a Communist Party congress by focusing on security and reiterating policy priorities. Xi, 69, is widely expected to win a third leadership term at the conclusion of the weeklong congress, which began Oct. 16, cementing his place as China’s most powerful ruler since Mao Zedong.Roughly 2,300 delegates from around the country gathered in the vast Great Hall of the People on the west side of Tiananmen Square amid tight security and under blue skies after several smoggy days in the Chinese capital. Xi described the five years since the last party congress as “extremely uncommon and abnormal,” during a speech that lasted less than two hours — far shorter than his nearly 31/2-hour address at the 2017 congress, because he did not read out the entire work report, which he did five years ago.We must strengthen our sense of hardship, adhere to the bottom-line thinking, be prepared for danger in times of peace, prepare for a rainy day, and be ready to withstand major tests of high winds and high waves,” he said.The full work report used the terms “security” or “safety” 89 times, up from 55 times in 2017, according to a Reuters count, while the use of the word “reform” declined to 48 from 68 mentions five years ago. (Reuters)"; + + int[] charnum = new int[26]; + String str = a; + str = a.trim(); + for (int i = 0; i < str.length(); i++) { + char c = str.charAt(i); + int ascii = (int)c; + if(ascii >= 65 && ascii <= 90) { + int index = ascii - (int)'A'; + charnum[index] = charnum[index] + 1; + } + } + for (int i = 0; i < charnum.length; i++) { + if (charnum[i] != 0) { + System.out.println("字母" + (char)(i + 'A') + "出现:" + charnum[i] + "次"); + } + } + } +} + + + + + diff --git a/src/practive1028_halfSearch.java b/src/practive1028_halfSearch.java new file mode 100644 index 0000000..1ae34ca --- /dev/null +++ b/src/practive1028_halfSearch.java @@ -0,0 +1,38 @@ +import java.util.Scanner; + +public class practive1028_halfSearch { + public static void main(String[] args) { + + int[] arr = {1, 2, 4, 8, 7, 6, 9, 11, 19, 20, 13, 30}; + Scanner sca = new Scanner(System.in); + System.out.println("請輸入數字:"); + int b = sca.nextInt(); + int temp = 0; + for (int i = 0; i < arr.length; i++) { + for (int j = i + 1; j < args.length; j++) { + if (arr[i] < arr[j]) { + temp = arr[j]; + arr[j] = arr[i]; + arr[i] = temp; + } + } + } + //判斷值是否為中間值 + for (int r = 1; r <= arr.length / 4; r++) { + int mid = 0; + int c = (arr.length / (r + 1)); + if (b == arr[c]) { + System.out.println("位於數組第" + c + "個:" + arr[c]); + break; + } while (b < arr[c]) { + c = (1+c)/2; + }while (b > arr[c]){ + c = (args.length+c)/2; + } + + } + + } + +} + diff --git a/src/practive1028_random.java b/src/practive1028_random.java new file mode 100644 index 0000000..8ca3f22 --- /dev/null +++ b/src/practive1028_random.java @@ -0,0 +1,20 @@ +public class practive1028_random { + public static void main(String[] args) { + + int conter = 0; + label1 : + for (int i = 0; i < 600000; i++) { + int a = (int)(Math.random()*100+1); + label2: + if (a != 97){ + System.out.println(a); + conter++; + } while (a==97) { + System.out.println("98"); + System.out.println("總共"+conter+"次"); + break label1 ; + } + + } + } +} diff --git a/src/practive1028_sequenceSearch.java b/src/practive1028_sequenceSearch.java new file mode 100644 index 0000000..9cfbef2 --- /dev/null +++ b/src/practive1028_sequenceSearch.java @@ -0,0 +1,25 @@ +import java.util.Scanner; + +public class practive1028_sequenceSearch { + public static void main(String[] args) { + + String[] arr= {"豬排飯","天津飯","雞腿飯","雞排飯"}; + Scanner sca = new Scanner(System.in); + System.out.println("請輸入想吃的料理"); + String food = sca.next(); + + int index = -1;//建立個不可能的標準點 + for (int i = 0; i < arr.length; i++) { + if(food.equals(arr[i])){ + System.out.println("好的立即準備"+"在菜單的第"+(i+1)+"個餐點"+food); + index = i;//若index有值就代表進入了回圈內,有找到;若 = -1,則代表沒進 + break; + } + + } + //為非的狀況下,利用index = -1作為條件,設置 + if (index == -1){ + System.out.println("很抱歉本餐廳沒賣"+"'"+food+"'"); + } + } +} diff --git a/src/practive1031_Recursion_1.java b/src/practive1031_Recursion_1.java new file mode 100644 index 0000000..8d6d074 --- /dev/null +++ b/src/practive1031_Recursion_1.java @@ -0,0 +1,14 @@ +import febonacci.T; + +public class practive1031_Recursion_1 { + public static void main(String[] args) { + + T t1 = new T(); + for (int i = 1; i < 15; i++) { + System.out.print(t1.fibonacci(i)+","); + } + + + + } +} diff --git a/src/practive1031_Recursion_2.java b/src/practive1031_Recursion_2.java new file mode 100644 index 0000000..d5aacb9 --- /dev/null +++ b/src/practive1031_Recursion_2.java @@ -0,0 +1,30 @@ +public class practive1031_Recursion_2 { + public static void main(String[] args) { + + int day = 1; + int peachnum = practive1031_Recursion_2.peach(day); + if (peachnum != 1) { + System.out.println(day + "天有" + peachnum + "桃子"); + } + + } + + public static int peach(int day) { + if (day == 10) { + return 1; + } else if (day >= 1 && day <= 9) { + return (peach(day + 1) + 1) * 2; + } else { + System.out.println("天數不在範圍內"); + return -1; + } + + } +} + +class person{ + String name; + int age; + + +} diff --git a/src/tweetCounter.java b/src/tweetCounter.java new file mode 100644 index 0000000..edc6d99 --- /dev/null +++ b/src/tweetCounter.java @@ -0,0 +1,12 @@ +public class tweetCounter { + + public static void main(String[] args) { + + String tweet = "Liz Lemon, ninjas are kind of cool... I just dont know any personally. Get on that."; + + // What's the character count? + System.out.println(tweet.length()); + + } + +} \ No newline at end of file diff --git a/src/vo/practive1027.java b/src/vo/practive1027.java new file mode 100644 index 0000000..205489d --- /dev/null +++ b/src/vo/practive1027.java @@ -0,0 +1,21 @@ +package vo; + +import java.util.Scanner; + +public class practive1027 { + public static void main(String[] args) { + + Scanner sca = new Scanner(System.in); + System.out.println("請輸入信用分"); + int grade = sca.nextInt(); + if (grade == 100){ + System.out.println("信用極好"); + }else if (grade >80 && grade < 100) { + System.out.println("信用優秀"); + }else if (grade>60 && grade < 80){ + System.out.println("信用一般"); + } else{ + System.out.println("信用不及格"); + } + } +} diff --git a/webPractice/.editorconfig b/webPractice/.editorconfig new file mode 100644 index 0000000..6cee539 --- /dev/null +++ b/webPractice/.editorconfig @@ -0,0 +1,10 @@ +# editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/webPractice/.gitattributes b/webPractice/.gitattributes new file mode 100644 index 0000000..c664a90 --- /dev/null +++ b/webPractice/.gitattributes @@ -0,0 +1,194 @@ +## GITATTRIBUTES FOR WEB PROJECTS +# +# These settings are for any web project. +# +# Details per file setting: +# text These files should be normalized (i.e. convert CRLF to LF). +# binary These files are binary and should be left untouched. +# +# Note that binary is a macro for -text -diff. +###################################################################### + +## AUTO-DETECT +## Handle line endings automatically for files detected as +## text and leave all files detected as binary untouched. +## This will handle all files NOT defined below. +* text=auto + +## SOURCE CODE +*.bat text eol=crlf +*.coffee text +*.css text +*.htm text +*.html text +*.inc text +*.ini text +*.js text +*.json text +*.jsx text +*.less text +*.od text +*.onlydata text +*.php text +*.pl text +*.py text +*.rb text +*.sass text +*.scm text +*.scss text +*.sh text eol=lf +*.sql text +*.styl text +*.tag text +*.ts text +*.tsx text +*.xml text +*.xhtml text + +## DOCKER +*.dockerignore text +Dockerfile text + +## DOCUMENTATION +*.markdown text +*.md text +*.mdwn text +*.mdown text +*.mkd text +*.mkdn text +*.mdtxt text +*.mdtext text +*.txt text +AUTHORS text +CHANGELOG text +CHANGES text +CONTRIBUTING text +COPYING text +copyright text +*COPYRIGHT* text +INSTALL text +license text +LICENSE text +NEWS text +readme text +*README* text +TODO text + +## TEMPLATES +*.dot text +*.ejs text +*.haml text +*.handlebars text +*.hbs text +*.hbt text +*.jade text +*.latte text +*.mustache text +*.njk text +*.phtml text +*.tmpl text +*.tpl text +*.twig text + +## LINTERS +.babelrc text +.csslintrc text +.eslintrc text +.htmlhintrc text +.jscsrc text +.jshintrc text +.jshintignore text +.prettierrc text +.stylelintrc text + +## CONFIGS +*.bowerrc text +*.cnf text +*.conf text +*.config text +.browserslistrc text +.editorconfig text +.gitattributes text +.gitconfig text +.gitignore text +.htaccess text +*.npmignore text +*.yaml text +*.yml text +browserslist text +Makefile text +makefile text + +## HEROKU +Procfile text +.slugignore text + +## GRAPHICS +*.ai binary +*.bmp binary +*.eps binary +*.gif binary +*.ico binary +*.jng binary +*.jp2 binary +*.jpg binary +*.jpeg binary +*.jpx binary +*.jxr binary +*.pdf binary +*.png binary +*.psb binary +*.psd binary +*.svg text +*.svgz binary +*.tif binary +*.tiff binary +*.wbmp binary +*.webp binary + +## AUDIO +*.kar binary +*.m4a binary +*.mid binary +*.midi binary +*.mp3 binary +*.ogg binary +*.ra binary + +## VIDEO +*.3gpp binary +*.3gp binary +*.as binary +*.asf binary +*.asx binary +*.fla binary +*.flv binary +*.m4v binary +*.mng binary +*.mov binary +*.mp4 binary +*.mpeg binary +*.mpg binary +*.ogv binary +*.swc binary +*.swf binary +*.webm binary + +## ARCHIVES +*.7z binary +*.gz binary +*.jar binary +*.rar binary +*.tar binary +*.zip binary + +## FONTS +*.ttf binary +*.eot binary +*.otf binary +*.woff binary +*.woff2 binary + +## EXECUTABLES +*.exe binary +*.pyc binary diff --git a/webPractice/.gitignore b/webPractice/.gitignore new file mode 100644 index 0000000..427305a --- /dev/null +++ b/webPractice/.gitignore @@ -0,0 +1,6 @@ +# Include your project-specific ignores in this file +# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files +# Useful .gitignore templates: https://github.com/github/gitignore +node_modules +dist +.cache \ No newline at end of file diff --git a/webPractice/.htaccess b/webPractice/.htaccess new file mode 100644 index 0000000..12a2e0a --- /dev/null +++ b/webPractice/.htaccess @@ -0,0 +1,1225 @@ +# Apache Server Configs v4.0.0 | MIT License +# https://github.com/h5bp/server-configs-apache + +# (!) Using `.htaccess` files slows down Apache, therefore, if you have +# access to the main server configuration file (which is usually called +# `httpd.conf`), you should add this logic there. +# +# https://httpd.apache.org/docs/current/howto/htaccess.html + +# ###################################################################### +# # CROSS-ORIGIN # +# ###################################################################### + +# ---------------------------------------------------------------------- +# | Cross-origin requests | +# ---------------------------------------------------------------------- + +# Allow cross-origin requests. +# +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS +# https://enable-cors.org/ +# https://www.w3.org/TR/cors/ + +# (!) Do not use this without understanding the consequences. +# This will permit access from any other website. +# Instead of using this file, consider using a specific rule such as +# allowing access based on (sub)domain: +# +# Header set Access-Control-Allow-Origin "subdomain.example.com" + +# +# Header set Access-Control-Allow-Origin "*" +# + +# ---------------------------------------------------------------------- +# | Cross-origin images | +# ---------------------------------------------------------------------- + +# Send the CORS header for images when browsers request it. +# +# https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image +# https://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html + + + + + SetEnvIf Origin ":" IS_CORS + Header set Access-Control-Allow-Origin "*" env=IS_CORS + + + + +# ---------------------------------------------------------------------- +# | Cross-origin web fonts | +# ---------------------------------------------------------------------- + +# Allow cross-origin access to web fonts. +# +# https://developers.google.com/fonts/docs/troubleshooting + + + + Header set Access-Control-Allow-Origin "*" + + + +# ---------------------------------------------------------------------- +# | Cross-origin resource timing | +# ---------------------------------------------------------------------- + +# Allow cross-origin access to the timing information for all resources. +# +# If a resource isn't served with a `Timing-Allow-Origin` header that would +# allow its timing information to be shared with the document, some of the +# attributes of the `PerformanceResourceTiming` object will be set to zero. +# +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin +# https://www.w3.org/TR/resource-timing/ +# https://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/ + +# +# Header set Timing-Allow-Origin: "*" +# + +# ###################################################################### +# # ERRORS # +# ###################################################################### + +# ---------------------------------------------------------------------- +# | Custom error messages/pages | +# ---------------------------------------------------------------------- + +# Customize what Apache returns to the client in case of an error. +# +# https://httpd.apache.org/docs/current/mod/core.html#errordocument + +ErrorDocument 404 /404.html + +# ---------------------------------------------------------------------- +# | Error prevention | +# ---------------------------------------------------------------------- + +# Disable the pattern matching based on filenames. +# +# This setting prevents Apache from returning a 404 error as the result of a +# rewrite when the directory with the same name does not exist. +# +# https://httpd.apache.org/docs/current/content-negotiation.html#multiviews + +Options -MultiViews + +# ###################################################################### +# # INTERNET EXPLORER # +# ###################################################################### + +# ---------------------------------------------------------------------- +# | Document modes | +# ---------------------------------------------------------------------- + +# Force Internet Explorer 8/9/10 to render pages in the highest mode +# available in various cases when it may not. +# +# https://hsivonen.fi/doctype/#ie8 +# +# (!) Starting with Internet Explorer 11, document modes are deprecated. +# If your business still relies on older web apps and services that were +# designed for older versions of Internet Explorer, you might want to +# consider enabling `Enterprise Mode` throughout your company. +# +# https://msdn.microsoft.com/en-us/library/ie/bg182625.aspx#docmode +# https://blogs.msdn.microsoft.com/ie/2014/04/02/stay-up-to-date-with-enterprise-mode-for-internet-explorer-11/ +# https://msdn.microsoft.com/en-us/library/ff955275.aspx + + + Header always set X-UA-Compatible "IE=edge" "expr=%{CONTENT_TYPE} =~ m#text/html#i" + + +# ###################################################################### +# # MEDIA TYPES AND CHARACTER ENCODINGS # +# ###################################################################### + +# ---------------------------------------------------------------------- +# | Media types | +# ---------------------------------------------------------------------- + +# Serve resources with the proper media types (f.k.a. MIME types). +# +# https://www.iana.org/assignments/media-types/media-types.xhtml +# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype + + + + # Data interchange + + AddType application/atom+xml atom + AddType application/json json map topojson + AddType application/ld+json jsonld + AddType application/rss+xml rss + AddType application/geo+json geojson + AddType application/rdf+xml rdf + AddType application/xml xml + + + # JavaScript + + # Servers should use text/javascript for JavaScript resources. + # https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages + + AddType text/javascript js mjs + + + # Manifest files + + AddType application/manifest+json webmanifest + AddType application/x-web-app-manifest+json webapp + AddType text/cache-manifest appcache + + + # Media files + + AddType audio/mp4 f4a f4b m4a + AddType audio/ogg oga ogg opus + AddType image/bmp bmp + AddType image/svg+xml svg svgz + AddType image/webp webp + AddType video/mp4 f4v f4p m4v mp4 + AddType video/ogg ogv + AddType video/webm webm + AddType video/x-flv flv + + # Serving `.ico` image files with a different media type prevents + # Internet Explorer from displaying them as images: + # https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee + + AddType image/x-icon cur ico + + + # WebAssembly + + AddType application/wasm wasm + + + # Web fonts + + AddType font/woff woff + AddType font/woff2 woff2 + AddType application/vnd.ms-fontobject eot + AddType font/ttf ttf + AddType font/collection ttc + AddType font/otf otf + + + # Other + + AddType application/octet-stream safariextz + AddType application/x-bb-appworld bbaw + AddType application/x-chrome-extension crx + AddType application/x-opera-extension oex + AddType application/x-xpinstall xpi + AddType text/calendar ics + AddType text/markdown markdown md + AddType text/vcard vcard vcf + AddType text/vnd.rim.location.xloc xloc + AddType text/vtt vtt + AddType text/x-component htc + + + +# ---------------------------------------------------------------------- +# | Character encodings | +# ---------------------------------------------------------------------- + +# Serve all resources labeled as `text/html` or `text/plain` with the media type +# `charset` parameter set to `UTF-8`. +# +# https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset + +AddDefaultCharset utf-8 + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Serve the following file types with the media type `charset` parameter set to +# `UTF-8`. +# +# https://httpd.apache.org/docs/current/mod/mod_mime.html#addcharset + + + AddCharset utf-8 .appcache \ + .bbaw \ + .css \ + .htc \ + .ics \ + .js \ + .json \ + .manifest \ + .map \ + .markdown \ + .md \ + .mjs \ + .topojson \ + .vtt \ + .vcard \ + .vcf \ + .webmanifest \ + .xloc + + +# ###################################################################### +# # REWRITES # +# ###################################################################### + +# ---------------------------------------------------------------------- +# | Rewrite engine | +# ---------------------------------------------------------------------- + +# (1) Turn on the rewrite engine (this is necessary in order for the +# `RewriteRule` directives to work). +# +# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine +# +# (2) Enable the `FollowSymLinks` option if it isn't already. +# +# https://httpd.apache.org/docs/current/mod/core.html#options +# +# (3) If your web host doesn't allow the `FollowSymlinks` option, you need to +# comment it out or remove it, and then uncomment the +# `Options +SymLinksIfOwnerMatch` line (4), but be aware of the performance +# impact. +# +# https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks +# +# (4) Some cloud hosting services will require you set `RewriteBase`. +# +# https://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site +# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase +# +# (5) Depending on how your server is set up, you may also need to use the +# `RewriteOptions` directive to enable some options for the rewrite engine. +# +# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions + + + + # (1) + RewriteEngine On + + # (2) + Options +FollowSymlinks + + # (3) + # Options +SymLinksIfOwnerMatch + + # (4) + # RewriteBase / + + # (5) + # RewriteOptions + + + +# ---------------------------------------------------------------------- +# | Forcing `https://` | +# ---------------------------------------------------------------------- + +# Redirect from the `http://` to the `https://` version of the URL. +# +# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS + +# (1) If you're using cPanel AutoSSL or the Let's Encrypt webroot method it +# will fail to validate the certificate if validation requests are +# redirected to HTTPS. Turn on the condition(s) you need. +# +# https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml +# https://tools.ietf.org/html/draft-ietf-acme-acme-12 + +# +# RewriteEngine On +# RewriteCond %{HTTPS} !=on +# # (1) +# # RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ +# # RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[\w-]+$ +# # RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ +# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] +# + +# ---------------------------------------------------------------------- +# | Suppressing the `www.` at the beginning of URLs | +# ---------------------------------------------------------------------- + +# Rewrite www.example.com → example.com + +# The same content should never be available under two different URLs, +# especially not with and without `www.` at the beginning. +# This can cause SEO problems (duplicate content), and therefore, you should +# choose one of the alternatives and redirect the other one. +# +# (!) NEVER USE BOTH WWW-RELATED RULES AT THE SAME TIME! + +# (1) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the +# appropriate schema automatically (http or https). +# +# (2) The rule assumes by default that both HTTP and HTTPS environments are +# available for redirection. +# If your SSL certificate could not handle one of the domains used during +# redirection, you should turn the condition on. +# +# https://github.com/h5bp/server-configs-apache/issues/52 + + + + RewriteEngine On + + # (1) + RewriteCond %{HTTPS} =on + RewriteRule ^ - [E=PROTO:https] + RewriteCond %{HTTPS} !=on + RewriteRule ^ - [E=PROTO:http] + + # (2) + # RewriteCond %{HTTPS} !=on + + RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] + RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L] + + + +# ---------------------------------------------------------------------- +# | Forcing the `www.` at the beginning of URLs | +# ---------------------------------------------------------------------- + +# Rewrite example.com → www.example.com + +# The same content should never be available under two different URLs, +# especially not with and without `www.` at the beginning. +# This can cause SEO problems (duplicate content), and therefore, you should +# choose one of the alternatives and redirect the other one. +# +# (!) NEVER USE BOTH WWW-RELATED RULES AT THE SAME TIME! + +# (1) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the +# appropriate schema automatically (http or https). +# +# (2) The rule assumes by default that both HTTP and HTTPS environments are +# available for redirection. +# If your SSL certificate could not handle one of the domains used during +# redirection, you should turn the condition on. +# +# https://github.com/h5bp/server-configs-apache/issues/52 + +# Be aware that the following might not be a good idea if you use "real" +# subdomains for certain parts of your website. + +# + +# RewriteEngine On + +# # (1) +# RewriteCond %{HTTPS} =on +# RewriteRule ^ - [E=PROTO:https] +# RewriteCond %{HTTPS} !=on +# RewriteRule ^ - [E=PROTO:http] + +# # (2) +# # RewriteCond %{HTTPS} !=on + +# RewriteCond %{HTTP_HOST} !^www\. [NC] +# RewriteCond %{SERVER_ADDR} !=127.0.0.1 +# RewriteCond %{SERVER_ADDR} !=::1 +# RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] + +# + +# ###################################################################### +# # SECURITY # +# ###################################################################### + +# ---------------------------------------------------------------------- +# | Frame Options | +# ---------------------------------------------------------------------- + +# Protect website against clickjacking. +# +# The example below sends the `X-Frame-Options` response header with the value +# `DENY`, informing browsers not to display the content of the web page in any +# frame. +# +# This might not be the best setting for everyone. You should read about the +# other two possible values the `X-Frame-Options` header field can have: +# `SAMEORIGIN` and `ALLOW-FROM`. +# https://tools.ietf.org/html/rfc7034#section-2.1. +# +# Keep in mind that while you could send the `X-Frame-Options` header for all +# of your website's pages, this has the potential downside that it forbids even +# non-malicious framing of your content (e.g.: when users visit your website +# using a Google Image Search results page). +# +# Nonetheless, you should ensure that you send the `X-Frame-Options` header for +# all pages that allow a user to make a state-changing operation (e.g: pages +# that contain one-click purchase links, checkout or bank-transfer confirmation +# pages, pages that make permanent configuration changes, etc.). +# +# Sending the `X-Frame-Options` header can also protect your website against +# more than just clickjacking attacks. +# https://cure53.de/xfo-clickjacking.pdf. +# +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options +# https://tools.ietf.org/html/rfc7034 +# https://blogs.msdn.microsoft.com/ieinternals/2010/03/30/combating-clickjacking-with-x-frame-options/ +# https://www.owasp.org/index.php/Clickjacking + +# +# Header always set X-Frame-Options "DENY" "expr=%{CONTENT_TYPE} =~ m#text/html#i" +# + +# ---------------------------------------------------------------------- +# | Content Security Policy (CSP) | +# ---------------------------------------------------------------------- + +# Mitigate the risk of cross-site scripting and other content-injection +# attacks. +# +# This can be done by setting a `Content Security Policy` which whitelists +# trusted sources of content for your website. +# +# There is no policy that fits all websites, you will have to modify the +# `Content-Security-Policy` directives in the example depending on your needs. +# +# The example policy below aims to: +# +# (1) Restrict all fetches by default to the origin of the current website by +# setting the `default-src` directive to `'self'` - which acts as a +# fallback to all "Fetch directives" (https://developer.mozilla.org/en-US/docs/Glossary/Fetch_directive). +# +# This is convenient as you do not have to specify all Fetch directives +# that apply to your site, for example: +# `connect-src 'self'; font-src 'self'; script-src 'self'; style-src 'self'`, etc. +# +# This restriction also means that you must explicitly define from which +# site(s) your website is allowed to load resources from. +# +# (2) The `` element is not allowed on the website. This is to prevent +# attackers from changing the locations of resources loaded from relative +# URLs. +# +# If you want to use the `` element, then `base-uri 'self'` can be +# used instead. +# +# (3) Form submissions are only allowed from the current website by setting: +# `form-action 'self'`. +# +# (4) Prevents all websites (including your own) from embedding your webpages +# within e.g. the `