get help in general - we have more specialized help rooms here: https://gitter.im/FreeCodeCamp/home
index.html
or your page at http://smoggy-sugar.surge.sh won't load
Does anyone here feel like they understand the following code?
function flatArray([x,...xs]){
return x ? [...Array.isArray(x) ? flatArray(x) : [x],...flatArray(xs)]
: [];
}
I have a specific question about when the ternary operator evaluates to false ([x],…flatArray(xs)]
)
[[],[1,2],[3,[4,5]],[6,7,[[[8],9]]],10]
([x],…flatArray(xs)])
and make it into ( x,…flatArray(xs)])
<body>
<div class="container">
<div id="bigCircle">
<div class="row">
<div class="col">
<div>
<img class="img-responsive" src="greenCircle.png" alt="Green Circle">
</div>
<div>
<img class="img-responsive" src="redCircle.png" alt="Green Circle">
</div>
</div>
<div class="col">
<div>
<img class="img-responsive" src="yellowCircle.png" alt="Green Circle">
</div>
<div>
<img class="img-responsive" src="blueCircle.png" alt="Green Circle">
</div>
</div>
</div>
</div>
</div>
santanag sends brownie points to @korzo and @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 540 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 547 | @janshah |http://www.freecodecamp.com/janshah
This is what i'm getting module.exports = function (directory, extName, function(err,files){
^^^^^^^^
SyntaxError: Unexpected token function
const fs = require("fs");
const path = require("path");
const ext = "extType."+(process.argv[3]);
const directory = (process.argv[2]);
const extName = path.extname(ext);
module.exports = function (directory, extName, function(err,files){
if (err){throw err;}
//Gives Error if there is an error
files.forEach(function(file) {
if ( file.includes(extName)){
return(file);
}
});
})
export function(directory, extName, function(err, files){
? I'm not too familiar with modules and export, but that is the type of example that I see in some docs that I was looking at.
@bookofbash - this might not help, either, but on nodeschool/discussions#1304 one of the comments says:
The expression "module.exports" should be on the first line of your module and all the requirements inside the brackets.
I don't know if that is going to help?
bookofbash sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3311 | @khaduch |http://www.freecodecamp.com/khaduch
<body>
<div class="container">
<div id="bigCircle">
<div class="row">
<div class="col">
<div>
<img class="img-responsive" src="greenCircle.png" alt="Green Circle" style="float: left">
<img class="img-responsive" src="redCircle.png" alt="Green Circle" style="float: right">
</div>
<div class="col">
<img class="img-responsive" src="yellowCircle.png" alt="Green Circle" style="float: left">
<img class="img-responsive" src="blueCircle.png" alt="Green Circle" style="float: right">
</div>
</div>
</div>
</div>
<script>
gersho sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2047 | @darrenfj |http://www.freecodecamp.com/darrenfj
<div class="col">
darrenfj sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 447 | @gersho |http://www.freecodecamp.com/gersho
first row
col .... col
second row
col ... col
rather than
both row
col...col
<div class="col">
<div>
<img class="img-responsive" src="greenCircle.png" alt="Green Circle" style="float: left">
</div>
</div>
<div class="col">
<div>
<img class="img-responsive" src="redCircle.png" alt="Green Circle" style="float: right">
</div>
</div>
#green {
height: 245px;
width: 245px;
border-top-left-radius: 100%;
border-color: black;
border-width: 14px;
border-style: solid;
}
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 448 | @gersho |http://www.freecodecamp.com/gersho
ericmiller777 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2048 | @darrenfj |http://www.freecodecamp.com/darrenfj
margin-top: 20vh;
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 452 | @gersho |http://www.freecodecamp.com/gersho
@dkapexhiu
hi to all! how to make the footer full width?
<footer id="footer">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<center><div id="footerp"><p>© Copyright 2017</p></div></center>
</div>
</div>
</footer>
<div class="container-fluid">
<section class="row">
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
</section>
<section class="row">
<div class="col"></div>
<div class="col"></div>
<div class="col"></div>
</section>
<footer class="row">
<div class="col"></div>
</footer>
</div>
dkapexhiu sends brownie points to @lydatech :sparkles: :thumbsup: :sparkles:
:star2: 2467 | @lydatech |http://www.freecodecamp.com/lydatech
darrenfj sends brownie points to @gersho and @ericmiller777 :sparkles: :thumbsup: :sparkles:
:cookie: 302 | @ericmiller777 |http://www.freecodecamp.com/ericmiller777
:cookie: 453 | @gersho |http://www.freecodecamp.com/gersho
When I adjust my media query height % nothing happens to the height of my image. Is my max sizes correct?
// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575px) {
.parallax {
height: 50%;
}
}
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) and (max-width: 767px) {
.parallax{
height: 70%;
}
// Medium devices (tablets, 768px and up)
@media (min-width: 768px) and (max-width: 991px) {
.parallax{
height: 64%; }
// Large devices (desktops, 992px and up)
@media (min-width: 992px) and (max-width: 1199px) {
.parallax{
height: 75%; }
// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) {
.parallax{
height: 90%; }
https://jsfiddle.net/srcdbyrm/
@media (min-width: 992px) and (max-width: 1199px) {
}
ldocherty1 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 541 | @korzo |http://www.freecodecamp.com/korzo
daddycardona sends brownie points to @korzo and @thekholm80 :sparkles: :thumbsup: :sparkles:
:cookie: 542 | @korzo |http://www.freecodecamp.com/korzo
:star2: 1481 | @thekholm80 |http://www.freecodecamp.com/thekholm80
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
h2 {
font-family: Lobster, Monospace;
}
.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}
</style>
<div class="container-fluid">
<div class="row">
<div class="col-xs-8">
<h2 class="text-primary text-center">CatPhotoApp</h2>
</div>
<div class="col-xs-4">
<a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>
</div>
</div>
<img src="https://bit.ly/fcc-running-cats" class="img-responsive" alt="Three kittens running towards the camera. ">
<div class="row">
<div class="col-xs-4">
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
</div>
<div class="col-xs-4">
<button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
</div>
</div>
<p>Things cats <span class="text-danger">love:</span></p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<div class="row">
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
</div>
<div class="col-xs-6">
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Loving</label>
</div>
<div clas="col-xs-4">
<label><input type="checkbox" name="personality"> Lazy</label>
</div>
<div class="col-xs-4">
<label><input type="checkbox" name="personality"> Crazy</label>
</div>
</div>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form>
</div>
col-xs-8
23beyblade sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @daddycardona |http://www.freecodecamp.com/daddycardona
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
ericmiller777 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2049 | @darrenfj |http://www.freecodecamp.com/darrenfj
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 454 | @gersho |http://www.freecodecamp.com/gersho