This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# replace spaces with underscores in file names | |
ls | while read file | |
do | |
mv "$file" "$(echo "$file" | sed -e 's/\ /_/g')" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body ng-controller="MainController"> | |
<h4>Which Star Wars Episodes Were Good/Bad?</h4> | |
<div ng-switch on="quality"> | |
<div ng-switch-when="bad"> | |
Episodes IV, V ,VI | |
</div> | |
<div ng-switch-when="good"> | |
Episodes I, II, III | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="author" content="DAVIDPM 2015, davidpm.io"> | |
<title>Custom Cross-Browser File Input</title> | |
<style type="text/css"> | |
.wrapper { | |
margin: 5%; | |
padding: 5%; | |
border: 1px solid #aaa; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Question 1 | |
Write a JavaScript snippet that uses console.log to print all the numbers from 1 to 100, with two exceptions. For numbers divisible by 3, print "Fizz" instead of the number, and for numbers divisible by 5 (and not 3), print "Buzz" instead. | |
When you have that working, modify your program to print "FizzBuzz", for numbers that are divisible by both 3 and 5 (and still print "Fizz" or "Buzz" for numbers divisible by only one of those). | |
Question 2 | |
Listen for an event on the unordered list in the provided html that uses event propagation correctly. On click, each button should log its inner html to the console. | |
Use the following html: | |
<!DOCTYPE html> | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="index.html" style="display:block; width:100%!important; height:100%!important;" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.getComputedStyle(element, null).getPropertyValue(“css-selector”); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){window.open(document.URL, '','width=320,height=480');})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.parent { width: 200px; } | |
.child { max-width: 100%; height: auto; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background: url('img.jpg')no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video > .video-wrapper { | |
position: relative; | |
width: 100%; | |
padding-top: 56.25%; | |
} | |
.video > .video-wrapper iframe, | |
.video > .video-wrapper object, | |
.video > .video-wrapper embed { | |
position: absolute; | |
height: 100%; |