These are chat archives for FreeCodeCamp/HelpFrontEnd

6th
Oct 2016
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:02

So how do I fix it and make it so I can access it?

@xSnowpeltx You need to make nested getJSON calls i.e another API call inside your First API call that way you have access to previous API call data .

silver537
@silver537
Oct 06 2016 00:04
i swear vendor prefixes are hell..
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:06
@silver537 you dont need to type vendor prefixes by hand we are in 2016 :smile: , you can use a tool to do that for you in your task runner/ build tool https://github.com/postcss/autoprefixer
xSnowpeltx
@xSnowpeltx
Oct 06 2016 00:06
I guess I'll give up on finding out if online or offline
i mean sorting by
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:09
@silver537 and you can enable autoprefixing in codepen by going in to settings -> CSS -> Vendor Prefixing and tick AUTOPREFIXER
silver537
@silver537
Oct 06 2016 00:11
Would that work for jquery as well?
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:13
@xSnowpeltx why as you stored all offline info in an Array, you can make another API call (https://api.twitch.tv/kraken/users/freecodecamp?Client-Id=<your-id>) to get offline users info and toggle between them based on user selection.
xSnowpeltx
@xSnowpeltx
Oct 06 2016 00:14
yeah im doing that. I was doing it because I wanted to loop through them after listing all the online users and list online then offline
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:15
@silver537 no, it works with CSS Files only, instead of using CSS properties in Jquery , you can create a class in CSS and toggle on/off that class in Jquery on the HTML elements
silver537
@silver537
Oct 06 2016 00:16
Supposedly the css method does the autoprefix.
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:16
sorry i did not understand what you mean @silver537
silver537
@silver537
Oct 06 2016 00:18
Jquery css method.
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:18
@silver537 no they don't because JQuery adds that css as inline styles
silver537
@silver537
Oct 06 2016 00:19
Waaaaat i read somewhere that it does. 0.o
anyone wanan constructively criticise my work?
im stuck on the spacing of the pink bar
crwne1
@crwne1
Oct 06 2016 00:20
how do i make buttons go to specific parts of my page?
vínαч puppαl
@vinaypuppal
Oct 06 2016 00:20

Waaaaat i read somewhere that it does. 0.o

@silver537 where? AFIK it does not as they are inline styles over HTML elements

Simon Cordova
@gbsimon87
Oct 06 2016 00:22
I've got a quick question.
I really want to brush my my Javascript skills. I've done many of the FCC challenges and a course on codecademy as well.
Is/are there any resource(s) anyone could recommend to practice or truly grab a deep comprehending of Javascript?
storbeck
@storbeck
Oct 06 2016 00:24
@gbsimon87 http://codewars.com
Simon Cordova
@gbsimon87
Oct 06 2016 00:24
thanks @storbeck
CamperBot
@camperbot
Oct 06 2016 00:24
gbsimon87 sends brownie points to @storbeck :sparkles: :thumbsup: :sparkles:
:star2: 1778 | @storbeck |http://www.freecodecamp.com/storbeck
silver537
@silver537
Oct 06 2016 00:24
@gbsimon87 codefights
Greg Duncan
@GregatGit
Oct 06 2016 00:43
@gbsimon87 i found this to be brilliant https://www.youtube.com/watch?v=Bv_5Zv5c-Ts
Simon Cordova
@gbsimon87
Oct 06 2016 00:49
thanks @GregatGit I'll check it out...
CamperBot
@camperbot
Oct 06 2016 00:49
gbsimon87 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:cookie: 770 | @gregatgit |http://www.freecodecamp.com/gregatgit
Ryan
@RyansRepo
Oct 06 2016 00:58
Can anyone help me output this code to the console?
var oldArray = [1,2,3,4,5,6,7,8,9,10];

var newArray = oldArray.filter(function(val) {
  return val <= 5;
});
JD Tadlock
@jdtdesigns
Oct 06 2016 01:03
@RyansRepo just put console.log(newArray); after the var newArray
Ryan
@RyansRepo
Oct 06 2016 01:06
@jdtdesigns thank you very much. That was thick of me not to think to pass the newArray out like that.
CamperBot
@camperbot
Oct 06 2016 01:06
ryansrepo sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 666 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
xSnowpeltx
@xSnowpeltx
Oct 06 2016 01:07
is there any way for me to do an action when a getJSON fails without having to switch to $.ajax ?
JD Tadlock
@jdtdesigns
Oct 06 2016 01:09
@xSnowpeltx what are you trying to use $.getJSON with?
xSnowpeltx
@xSnowpeltx
Oct 06 2016 01:09
I'm getting twitch users, and I want to be able to change the code when a user doesnt exist
JD Tadlock
@jdtdesigns
Oct 06 2016 01:12
it would be like this:
$.getJSON('api url', function(json) {
  // succeeded 
}).fail(function() {
  // user doesn't exist
});
JD Tadlock
@jdtdesigns
Oct 06 2016 01:43
JD Tadlock
@jdtdesigns
Oct 06 2016 02:08
@bobmane you'll have to adjust the numbers for smaller screens since you're changing the size of the thumbnails.
Aaron Bell
@awb715
Oct 06 2016 02:09
does anyone know how to make image become horizontal and verticle as the window size changes
silver537
@silver537
Oct 06 2016 02:10
@awb715 what do you mean?
Aaron Bell
@awb715
Oct 06 2016 02:11
see how in recent projects theirs 2 columns
in my pen
theres 2 "ddd"' 's
silver537
@silver537
Oct 06 2016 02:11
yea
Aaron Bell
@awb715
Oct 06 2016 02:12
i want to put 2 images where the ddd's are
silver537
@silver537
Oct 06 2016 02:12
you can float them.
Aaron Bell
@awb715
Oct 06 2016 02:12
and in a big screen i want the images to be horizontal
but in a phone screen i want them to be vertical
silver537
@silver537
Oct 06 2016 02:13
it's all about the aspec ration.
Aaron Bell
@awb715
Oct 06 2016 02:13
idk what that means haha
silver537
@silver537
Oct 06 2016 02:13
but if you use them as backgrounds, they will rezise themselves as the screen resizes.
aspect*
Aaron Bell
@awb715
Oct 06 2016 02:13
hmm
this is tough
silver537
@silver537
Oct 06 2016 02:14
it uses the original image size, and increase the width and height proportionally
Aaron Bell
@awb715
Oct 06 2016 02:14
im not gonna attempt this yet
just gonna do them vertically to start
JD Tadlock
@jdtdesigns
Oct 06 2016 02:15
@awb715 You can do it with media queries
i can show you how if you'd like
Aaron Bell
@awb715
Oct 06 2016 02:15
okay yea
Adel
@AdelMahjoub
Oct 06 2016 02:16
@awb715 you can try class="img-responsive center-block" on your image
silver537
@silver537
Oct 06 2016 02:16
which depends if he's using bootstrap
Adel
@AdelMahjoub
Oct 06 2016 02:16
he uses
from the code he posted he is using bootstrap,
Aaron Bell
@awb715
Oct 06 2016 02:17
me? @AdelMahjoub
Adel
@AdelMahjoub
Oct 06 2016 02:17
@awb715 yes
Aaron Bell
@awb715
Oct 06 2016 02:18
i feel like im mixing bootstrap and css
Adel
@AdelMahjoub
Oct 06 2016 02:18
@awb715 yes, there is a bootstrap cdn link, so you can use class="img-responsive center-block" to make your image fits small and large screens
Aaron Bell
@awb715
Oct 06 2016 02:19
hmm
look at my code now
with the first image

img{
width:45%;
min-width:200px;
}

.center{
display: block;
margin-right: auto;
margin-left: auto;

i did this
@AdelMahjoub
Adel
@AdelMahjoub
Oct 06 2016 02:21
@awb715 that did the job
Aaron Bell
@awb715
Oct 06 2016 02:21
is that any different
Aaron Bell
@awb715
Oct 06 2016 02:22
@jdtdesigns well done
i think the first image is too big
but its great what you did in the 2nd
all you did was img-responsive! @J-Tytan
@JTDeSanto
JD Tadlock
@jdtdesigns
Oct 06 2016 02:23
you can adjust the width of the image adding padding to the container @awb715
Aaron Bell
@awb715
Oct 06 2016 02:23
@jdtdesigns
sorry for thewrongmentions haha
JD Tadlock
@jdtdesigns
Oct 06 2016 02:24
i also took the img styles in the css away and added another col class to the columns
Aaron Bell
@awb715
Oct 06 2016 02:26
i see what you did
awesome
the next size of the columns tell the picture to share the grid ina bigger screen
@jdtdesigns great job
@jdtdesigns thanks !
CamperBot
@camperbot
Oct 06 2016 02:26
awb715 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 667 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Aaron Bell
@awb715
Oct 06 2016 02:27
@jdtdesigns ive been struggling how to put my thought into this concept
@jdtdesigns what confuses me tho is you have 2 col-xs-12 in ONE row
i would have never thought to do that cus its in a container of a row
JD Tadlock
@jdtdesigns
Oct 06 2016 02:29
@awb715 It just means the image column will be the full width of the container on smaller screens
12 is max width
that's why it stacks vertically on the small screen
Aaron Bell
@awb715
Oct 06 2016 02:29
hmm ok
ive been thicking your restricted to 12 in a row
so like in 1 row i wouldnt have column numbers added up to greater than that
JD Tadlock
@jdtdesigns
Oct 06 2016 02:30
correct
Aaron Bell
@awb715
Oct 06 2016 02:31
yes but where this caught me fo guard is theirs 2 xs-12 in a row
i get how it works
but i just wouldnt have put 2 div with col-xs-12 in one row div
JD Tadlock
@jdtdesigns
Oct 06 2016 02:32
right
JD Tadlock
@jdtdesigns
Oct 06 2016 03:14
@awb715 Nice!
Aaron Bell
@awb715
Oct 06 2016 03:14
im going to make a banner now
on top
that can click down to each of the 3 pages
or squares
not bad for just stsarting to code 1 week ago right @jdtdesigns haha
JD Tadlock
@jdtdesigns
Oct 06 2016 03:16
not bad at all :D
Chris Cullen
@123xylem
Oct 06 2016 03:17

@123xylem


function cpuSeq() {
     if (cpuTurn > 0) { //count to stop cpu acting out of turn.
    cSeq.push(newChoice()); //get random choice into cSeq aray
    var i = 0;
    var interval =
      setInterval(function() {
        if (i >= cSeq.length) { //stops infi loop
          clearInterval(interval);
        } $(".panel").css({'pointer-events':'none'});  //HERE I SAY STOP USER CLICKS WHEN CPU PLAYING
        $("#" + cSeq[i]).toggleClass("animate");
        audioF[cSeq[i].toLowerCase()].play(); 
        i++;
        cpuTurn = 0;
         $(".panel").css({'pointer-events':'auto'}); // WHY ISNT THIS REVERTING BACK TO AUTO???
      }, 800);       
        console.log(cSeq + cSeq.length, "player moves = ", pSeq);

Why isnt my .panel (reverting to auto click events when I change it after?
I say stop pointer events.. then later in the function make pointer events auto

@123xylem


function cpuSeq() {
     if (cpuTurn > 0) { //count to stop cpu acting out of turn.
    cSeq.push(newChoice()); //get random choice into cSeq aray
    var i = 0;
    var interval =
      setInterval(function() {
        if (i >= cSeq.length) { //stops infi loop
          clearInterval(interval);
        } $(".panel").css({'pointer-events':'none'});  //HERE I SAY STOP USER CLICKS WHEN CPU PLAYING
        $("#" + cSeq[i]).toggleClass("animate");
        audioF[cSeq[i].toLowerCase()].play(); 
        i++;
        cpuTurn = 0;
         $(".panel").css({'pointer-events':'auto'}); // WHY ISNT THIS REVERTING BACK TO AUTO???
      }, 800);       
        console.log(cSeq + cSeq.length, "player moves = ", pSeq);

Why isnt my .panel (reverting to auto click events when I change it after?
I say stop pointer events.. then later in the function make pointer events auto

@jdtdesigns
why is the top purple not across the whole screen
JD Tadlock
@jdtdesigns
Oct 06 2016 03:21
@123xylem try $(".panel").prob('disabled', true);
Chris Cullen
@123xylem
Oct 06 2016 03:21
prop?
@jdtdesigns
JD Tadlock
@jdtdesigns
Oct 06 2016 03:22
@awb715 .container-fluid has 15px left/right padding by default
its not disabling it
hmm
Aaron Bell
@awb715
Oct 06 2016 03:23
@jdtdesigns so is there no way around that?
also, just looked it on my mobile, the images are breaking through the squares
JD Tadlock
@jdtdesigns
Oct 06 2016 03:26
@123xylem the logic is failing. it's not adding the disabled attribute while the comp is sequencing
it would take me awhile to look through your code to figure out where it's failing
Chris Cullen
@123xylem
Oct 06 2016 03:26
@jdtdesigns hmmm what couldit be?
what would stop it adding disabled prop if it is runnin though the code?
an !important in the css?
JD Tadlock
@jdtdesigns
Oct 06 2016 03:27
you have a isSequencing boolean var right?
Chris Cullen
@123xylem
Oct 06 2016 03:27
yes
JD Tadlock
@jdtdesigns
Oct 06 2016 03:28
it's probably do to the boolean not being read as true during the sequence
Chris Cullen
@123xylem
Oct 06 2016 03:30
@jdtdesigns the weird thing is that the code executes
but the part i added doesnt execute.. why would that be different?
JD Tadlock
@jdtdesigns
Oct 06 2016 03:35
@123xylem it seems like a logic issue
you need to go through and do some console.log()'s to check the logic
use the browser console not the codepen console
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
coming up in the console
Chris Cullen
@123xylem
Oct 06 2016 03:37
yea thats been coming up for ages
it reads it the first time but maybe it tries to read it once the array is empty as well
god this code has become difficult for me to understand
I mean I know what everything does but
when bugs come I struggle to know why or how to fix them
JD Tadlock
@jdtdesigns
Oct 06 2016 03:39
it sucks sometimes, but you need to go back and refactor the code (re-do it) @123xylem
Aaron Bell
@awb715
Oct 06 2016 03:40
@jdtdesigns dont wanna bother you but can you help me for a sec haha
JD Tadlock
@jdtdesigns
Oct 06 2016 03:40
@awb715 with the container issue?
Aaron Bell
@awb715
Oct 06 2016 03:41
yes
and the images are exceeding the blue box on my iphone
and they get bigger as the page gets smaller
Chris Cullen
@123xylem
Oct 06 2016 03:44

@jdtdesigns

function cpuSeq() {
     if (cpuTurn > 0) { //count to stop cpu acting out of turn.
       $(".panel").prop('disabled', true);
       console.log( $(".panel").prop('disabled'));
    cSeq.push(newChoice()); //get random choice into cSeq aray
    var i = 0;
    var interval =
      setInterval(function() {
        if (i > cSeq.length) { //stops infi loop  //HERE IS WHERE I NEED ANOTHER CONDITIONAL I THINK
          clearInterval(interval);
        } 
        $("#" + cSeq[i]).toggleClass("animate");
        audioF[cSeq[i].toLowerCase()].play(); //play choice from cSeq.
        i++;   // The console keeps incrementing undefined suggesting that this is the culprit to me
        cpuTurn = 0;

Here I say get I to run through the cpu choices playing each one.. if I is longer than cpuChoice aray clear interval.. As i++ the console keeps saying undefined undefined.. suggesting to me it keeps going up ... So maybe the way to solve this is add an extra conditional in my var i declaration?

JD Tadlock
@jdtdesigns
Oct 06 2016 03:51
@awb715 I made quite a few changes to the css and cleaned up the html a lot. You shouldn't add spaces or returns in the text elements before or after the text. You were also missing the closing div of the container at least on my version. http://codepen.io/jdtadlock/pen/RGxZbx?editors=0100
Jake
@rhekst
Oct 06 2016 03:55
I have a question about php within html, is there anyway that I can use a php file that's embedded in an html page without any kind of server downoading, like if someone just opened the folder that the html and php files were located in and just clicked on the html file, no apache or anything. Just a raw use?
JD Tadlock
@jdtdesigns
Oct 06 2016 03:58
@123xylem Here's my sequencer. It's follows a simple recursive pattern. If the length of the sequence is equal to the player inputs length it will stop the sequence and let the player try. Otherwise, it will go light up the next button in the sequence.
var sequencer = {
    sequence: [],
    build: function(status) {
      if ( status != 'same' ) sequencer.sequence.push(Math.floor(Math.random() * 4));

      sequencer.count = 0;
      sequencer.show();
    },
    show: function() {
      $('#b' + sequencer.sequence[sequencer.count]).addClass('active');
      sounds[sequencer.sequence[sequencer.count]].play();

      sequencer.count++;
      sequencer.next();
    },
    next: function() {
      clearTimeout(window.start);
      clearTimeout(window.buttonOff);

      window.buttonOff = setTimeout(function() {
        $('#b' + sequencer.sequence[sequencer.count- 1]).removeClass('active');
      }, 700);

      if ( sequencer.count === sequencer.sequence.length) { 
        setStatus('player');
      } else {
        window.start = setTimeout(function() {
          sequencer.show();
        }, 1100);
      }

    }    
  };
Eldar Tinjić
@EldarT90
Oct 06 2016 04:00
anyone here has experience with geojson?
JD Tadlock
@jdtdesigns
Oct 06 2016 04:02
@rhekst PHP is a server side language. You have to run a server to run php. Also, you can't run php inside a html* file. You can only run html in a php file.
Chris Cullen
@123xylem
Oct 06 2016 04:02
@jdtdesigns your code is nice
JD Tadlock
@jdtdesigns
Oct 06 2016 04:04
@123xylem Thanks :)
CamperBot
@camperbot
Oct 06 2016 04:04
jdtdesigns sends brownie points to @123xylem :sparkles: :thumbsup: :sparkles:
:cookie: 333 | @123xylem |http://www.freecodecamp.com/123xylem
JD Tadlock
@jdtdesigns
Oct 06 2016 04:04
@EldarT90 Haven't used it
Jake
@rhekst
Oct 06 2016 04:06
Is there anything similar to php that I can use without servers? Like something that fits my situation. JS maybe? similar function wise and connects directly with html.
Eldar Tinjić
@EldarT90
Oct 06 2016 04:07
@rhekst node
Chris Cullen
@123xylem
Oct 06 2016 04:07
@jdtdesigns
function cpuSeq() {
     if (cpuTurn > 0) { //count to stop cpu acting out of turn.
       $(".panel").prop('disabled', true);
       console.log( $(".panel").prop('disabled'));
    cSeq.push(newChoice()); //get random choice into cSeq aray
    var i = 0; 
    var interval =
      setInterval(function() {
        if (i > cSeq.length||i>5) { // THIS CONDITIONAL ISNT STOPPING i++  /// I think that could be a problem in a lot of my code
          clearInterval(interval);
        } 
        $("#" + cSeq[i]).toggleClass("animate");
        audioF[cSeq[i].toLowerCase()].play(); //play choice from cSeq.
        i++;
        cpuTurn = 0;
         $(".panel").prop('disabled', false);
      }, 800);       
        console.log(cSeq + cSeq.length, "player moves = ", pSeq);
  } else {
    lastSeq();
    cpuTurn=0;
  }
}
See the if conditional
aNyidea why its not stopping i++?
JD Tadlock
@jdtdesigns
Oct 06 2016 04:07
firebase is good for simple data driven apps without worrying about server stuff ;) @rhekst
Jake
@rhekst
Oct 06 2016 04:08
okay thank you
JD Tadlock
@jdtdesigns
Oct 06 2016 04:09
i will say you'll need to be pretty proficient in js to get the hang of firebase
there are plenty of tuts though @rhekst
Jake
@rhekst
Oct 06 2016 04:09
ill look into it thanks
JD Tadlock
@jdtdesigns
Oct 06 2016 04:11
@123xylem why do you have it check if i is greater than 5?
Chris Cullen
@123xylem
Oct 06 2016 04:11
@jdtdesigns it was just to stop it at 5
but it didt stop it
now im trying different ways of making that conditional stop i incrementing as I think that is the bug in my code
JD Tadlock
@jdtdesigns
Oct 06 2016 04:12
@123xylem it's probably the way you're clearing the interval
Chris Cullen
@123xylem
Oct 06 2016 04:12
hmm
thats the only way i know
JD Tadlock
@jdtdesigns
Oct 06 2016 04:12
set the interval like this:
window.start = setInterval(function() {});
clear it with clearInterval(window.start);
that's a great way to always have global access to your timers across the app
Aaron Bell
@awb715
Oct 06 2016 04:13
@jdtdesigns how hard is the stuff you guys are doing?!
seems insane
Chris Cullen
@123xylem
Oct 06 2016 04:13
so the window just makes it global?
JD Tadlock
@jdtdesigns
Oct 06 2016 04:13
@123xylem
Yep
@awb715 Hmm, we're talking about pretty standard stuff. The difficult part is figuring out logic for certain situations which is what @123xylem is struggling with right now.
Aaron Bell
@awb715
Oct 06 2016 04:16
@jdtdesigns i guess ill get there at some point! i didnt wanna start java yet cus i dont have much experience doing bootstap and css/html at all
i feel like the work they give you is not enough
Tony Chen
@TonyChen8
Oct 06 2016 04:16
@priyesh091 Hi, Priyesh, I found the reason of your issue. You use "col-md-4", which only works when scree min width is 990px, so if you screen width is small, these 3 pics will have "display:block" property. Solution is using "col-xs-4 col-sm-4 col-md-4" instead of your "col-md-4".
Chris Cullen
@123xylem
Oct 06 2016 04:16
@jdtdesigns ok il try the window. method
JD Tadlock
@jdtdesigns
Oct 06 2016 04:17
@awb715 Java is totally different than js. It and C are the big boy's code. :D
Javascript is very difficult to learn when you come from java or c
cause of the huge differences
Chris Cullen
@123xylem
Oct 06 2016 04:19

@jdtdesigns

function cpuSeq() {
     if (cpuTurn > 0) { //count to stop cpu acting out of turn.
       console.log( $(".panel").prop('disabled'));
    cSeq.push(newChoice()); //get random choice into cSeq aray
    var i=0;
       window.start = setInterval(function() {
         if(i>cSeq.length){
           clearInterval(window.start);
         }   $("#" + cSeq[i]).toggleClass("animate");
        audioF[cSeq[i].toLowerCase()].play(); //play choice from cSeq.
        i++;
        cpuTurn = 0;
      }, 800);

So this still keeps iterating i as the console keeps saing cant read.lowercaseOf when it shouldnt be trying to read anything after its cSeq.length

JD Tadlock
@jdtdesigns
Oct 06 2016 04:22
so i'm gonna code now, cause you got me interested in building a sequencer again lol @123xylem
Aaron Bell
@awb715
Oct 06 2016 04:22
haha o god @jdtdesigns im 22 and just learning to code
im nervous if its too late
JD Tadlock
@jdtdesigns
Oct 06 2016 04:22
i'm 36 and started 7 years ago @awb715
Aaron Bell
@awb715
Oct 06 2016 04:23
ok cool
make me feel better haha
JD Tadlock
@jdtdesigns
Oct 06 2016 04:23
I've taught some 50 year olds
Aaron Bell
@awb715
Oct 06 2016 04:23
are you working ?
JD Tadlock
@jdtdesigns
Oct 06 2016 04:23
so no worries lol
Aaron Bell
@awb715
Oct 06 2016 04:24
cus i do ahve a good job offer starting next year but i tihnk id enjoy programming more
JD Tadlock
@jdtdesigns
Oct 06 2016 04:24
I do freelance right now. I own a landscaping company that i've had for 4 years. It takes up a lot of my time. Winter is here soon and i'll be more free. :)
@awb715
Aaron Bell
@awb715
Oct 06 2016 04:24
@jdtdesigns good for you man
@jdtdesigns i think theres plenty of jobs in nyc where im from. i just need to get the front end certificate
then i can leanr on the job and eventully do freelance
@jdtdesigns do you do like upwork.com
im getting kinda addicted to this
JD Tadlock
@jdtdesigns
Oct 06 2016 04:25
@awb715 The certificate won't do anything for you unfortunately
Aaron Bell
@awb715
Oct 06 2016 04:25
but i barely have scratched the surface
thats not good
what will
thats just marketing BS?
JD Tadlock
@jdtdesigns
Oct 06 2016 04:26
@awb715 A great portfolio with professional level apps you've made.
don't bs or you'll regret it
Aaron Bell
@awb715
Oct 06 2016 04:26
i feel like fcc doesnt even prepare you then
JD Tadlock
@jdtdesigns
Oct 06 2016 04:26
i've had to remake quite a few complete apps that bs'ers have made @awb715
Aaron Bell
@awb715
Oct 06 2016 04:27
like i cant believe bootstrap training is already over it was easy but barely in depth
JD Tadlock
@jdtdesigns
Oct 06 2016 04:27
@awb715 FCC is not a learning site. It's a challenge site.
Aaron Bell
@awb715
Oct 06 2016 04:27
so wher do i learn
if i want to get a job doing this in 6 months
JD Tadlock
@jdtdesigns
Oct 06 2016 04:27
Plenty of monitary and free ways out there
Aaron Bell
@awb715
Oct 06 2016 04:27
ugh
JD Tadlock
@jdtdesigns
Oct 06 2016 04:27
unless you're a genius you won't get a job in 6 months
that's just something all the ads tell you
it's bs lol
Aaron Bell
@awb715
Oct 06 2016 04:28
this is scaring me
JD Tadlock
@jdtdesigns
Oct 06 2016 04:28
if you do get a job, you're very lucky and/or extremely devoted
@awb715 this isn't a get rich scheme
Aaron Bell
@awb715
Oct 06 2016 04:29
i mean ive been going hard 8 hours a day
JD Tadlock
@jdtdesigns
Oct 06 2016 04:29
i say the standard i've seen for a decent job is 3 years
Aaron Bell
@awb715
Oct 06 2016 04:29
bootcamps get you jbos
JD Tadlock
@jdtdesigns
Oct 06 2016 04:29
i've also seen the 3 month/6 month people try to get jobs
they sometimes get the job but then get fired for being incompetent
Aaron Bell
@awb715
Oct 06 2016 04:30
true
wish i started 2 years ago
JD Tadlock
@jdtdesigns
Oct 06 2016 04:30
everybody does lol
i wish i started 20 years ago
Aaron Bell
@awb715
Oct 06 2016 04:32
i pmed you @jdtdesigns
JD Tadlock
@jdtdesigns
Oct 06 2016 04:38
@123xylem https://jsfiddle.net/#&togetherjs=DKQ3ndAfJh if you want to pair program ;)
baohifung
@baohifung
Oct 06 2016 04:59
my navbar isn't full of my top page,anyone can give me a favour?
i try margin border padding,but it is no useful
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 05:01
@baohifung Did you set "margin: 0" to the body and html?
And a link would be helpful ;)
baohifung
@baohifung
Oct 06 2016 05:02
i try it now,,,please wait for a minute
i set margin:0 in my <script> tag,but it is no useful
<script>body{margin:0}</script>
like that
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 05:07
@jdtdesigns Thanks for your help, I'll look at it after school :-)
CamperBot
@camperbot
Oct 06 2016 05:07
:cookie: 668 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
otto-aa sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
baohifung
@baohifung
Oct 06 2016 05:07
@Otto-AA
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 05:10
@baohifung Well, for me your navbar is on the top O.o
baohifung
@baohifung
Oct 06 2016 05:10
i show u my links
excuse me ,my english is bad,say it in a plain word ,,haha,and thanks
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 05:11
@baohifung no worries about your english :smile:
baohifung
@baohifung
Oct 06 2016 05:11
ok haha
is it wrong that i put my navbar on the top?
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 05:13
@baohifung Do you mean if you should put it on the side, or the way you put it there?
baohifung
@baohifung
Oct 06 2016 05:15
no ,and i just want put my navbar fill the top of the page
u can see that there is blank space at the beginning of the navbar
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 05:18
@baohifung Ok, I found it now: When you have a class .container-fluid it will do this automatically, but wrapping a <div class="row"> around your <nav> will fix this
@baohifung Here is it explained a bit (answer with 13 likes) http://stackoverflow.com/questions/25427407/bootstrap-3-container-fluid-with-grid-adding-unwanted-padding
Gonna have to go now
@baohifung Have fun coding ;)
Bye
baohifung
@baohifung
Oct 06 2016 05:20
thank you!!!
my friend
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 05:20
@baohifung You're welcome
baohifung
@baohifung
Oct 06 2016 05:21
This message was deleted
This message was deleted
JD Tadlock
@jdtdesigns
Oct 06 2016 05:37
if anyone is interested in pair programming with me or just watching us code, you can join the fiddle here https://jsfiddle.net/#&togetherjs=DKQ3ndAfJh
kirbyedy
@kirbyedy
Oct 06 2016 05:52
hmmm link does not work for me
Monesul Haque
@mones-cse
Oct 06 2016 06:22
hi guys i need some help
i am right now doing tic tac toe game
so far this is the update
http://codepen.io/m1s/pen/PGExkY?editors=0010
now i think it is unbeatable but still not sure
is there any test case that will help me to make sure it is indeed unbeatable
JD Tadlock
@jdtdesigns
Oct 06 2016 06:22
@i've seen like 10 people join @kirbyedy might be your browser
kirbyedy
@kirbyedy
Oct 06 2016 06:23
I`ll try again
I get redirect to https://jsfiddle.net/# and an infinite loading circle
oh ok, I am in now
took a while
JD Tadlock
@jdtdesigns
Oct 06 2016 06:25
nice
@kirbyedy feel free to code
so far it's just been me for over an hour
Ricky Januari
@rickyjanuari
Oct 06 2016 06:45
how to fix
If I choose a date, I continue to choose all dates, the date of one is not selected
http://codepen.io/rickyjanuari/pen/ALxPmA?editors=1010#0
Ricky Januari
@rickyjanuari
Oct 06 2016 06:53
@/all
Ashish Acharya
@anarchyrucks
Oct 06 2016 07:12
@rickyjanuari i don't understand your problem
Monesul Haque
@mones-cse
Oct 06 2016 07:57

@rickyjanuari
try delete this lines

$(o).prop('checked', false);
listItemParent.removeClass('active');

Evan W
@Dirtier
Oct 06 2016 08:08
Anyone here know Vue well enough to try and help me out? I'm not sure if it's a CSS issue or a Vue issue =/
Basically I'm rendering table cells to make a grid for my tic-tac-toe game, but when I put text in them, their position changes
and it's reallllyyy annoying.
It wouldn't be a problem if it was a static table, but since it's being rendered I'm not exactly sure how to style their position the same way
kirbyedy
@kirbyedy
Oct 06 2016 08:13
@Dirtier I have no idea about vue :D
why vue anyway ? isnt it easier to create the table with css
anyway check the image
I think that is your problem
Screen Shot 2016-10-06 at 11.13.43.png
Evan W
@Dirtier
Oct 06 2016 08:15
For the table yea, but then it would make everything else a lot harder
easier this way bc I can use 2-way data-binding
kirbyedy
@kirbyedy
Oct 06 2016 08:16
oh, and I got this as well
Evan W
@Dirtier
Oct 06 2016 08:16
What do you mean?
which image
kirbyedy
@kirbyedy
Oct 06 2016 08:16
Screen Shot 2016-10-06 at 11.15.42.png
Evan W
@Dirtier
Oct 06 2016 08:16
Yea it isn't finished yet
kirbyedy
@kirbyedy
Oct 06 2016 08:16
ah ok
the previous image I posted
do you see the console
Evan W
@Dirtier
Oct 06 2016 08:16
Yea
kirbyedy
@kirbyedy
Oct 06 2016 08:16
when I removed the vertical-align its fine
its set to baseline
Evan W
@Dirtier
Oct 06 2016 08:17
Ohhhh
kirbyedy
@kirbyedy
Oct 06 2016 08:17
maybe its some vue`s default
dont know
Evan W
@Dirtier
Oct 06 2016 08:17
Ok I didnt understand what specifically you wanted me to look at in the img
hmm so thats for the table?
kirbyedy
@kirbyedy
Oct 06 2016 08:17
yep
Evan W
@Dirtier
Oct 06 2016 08:17
ok ill try that rq
How would I even override that O.o? vertical-align: none? lol
kirbyedy
@kirbyedy
Oct 06 2016 08:18
lol no idea :D
vertical-align: middle ?
:D
Istrelia
@Istrelia
Oct 06 2016 08:20
Hello
kirbyedy
@kirbyedy
Oct 06 2016 08:20
@Dirtier actually it works :D
td {
    vertical-align: middle;
}
lol
Istrelia
@Istrelia
Oct 06 2016 08:20
I have an issue with Build a Tribute Page
Evan W
@Dirtier
Oct 06 2016 08:20
@kirbyedy Oh for the cells not the table?
kirbyedy
@kirbyedy
Oct 06 2016 08:21
I just put that code in your css and its fine
Evan W
@Dirtier
Oct 06 2016 08:22
@kirbyedy Wow thanks dude lol
CamperBot
@camperbot
Oct 06 2016 08:22
dirtier sends brownie points to @kirbyedy :sparkles: :thumbsup: :sparkles:
:star2: 1434 | @kirbyedy |http://www.freecodecamp.com/kirbyedy
Istrelia
@Istrelia
Oct 06 2016 08:22
In Bootstrap the text inside a Thumbnail get bigger when nested inside jumbotron is it normal ?
Evan W
@Dirtier
Oct 06 2016 08:23
Idk why when I added that to .square, it wouldn't work
But it would work with td, even though they're the same thing
Made 0 sense
kirbyedy
@kirbyedy
Oct 06 2016 08:23
:D
Evan W
@Dirtier
Oct 06 2016 08:23
Actually wait
no they arent lol, .square is in the div inside the td
lmao wow and this whole time I've been messing with .square D:
always the little things
@Istrelia Yea unless you change it's font-size, pretty sure Jumbotron has a higher font-size as default bc it's meant to be a header type element
Annu Nirmal
@annunirmal
Oct 06 2016 08:26
@Otto-AA OH THAT MAY BE THE FONT IS NOT LOADED IN YOU BROWSER
Istrelia
@Istrelia
Oct 06 2016 08:27
@Dirtier OK but the project does not allow CSS
Evan W
@Dirtier
Oct 06 2016 08:27
? Bootstrap is CSS tho
Annu Nirmal
@annunirmal
Oct 06 2016 08:27
Evan W
@Dirtier
Oct 06 2016 08:27
Do you mean that it just doesn't include a styles.css file? You can write in-line CSS
@Istrelia you can change it like this
<img class='thumbnail' style='font-size:20px' />
Edgar Gil
@EdgarrGil
Oct 06 2016 08:29
@Dirtier you on a roll today.
Evan W
@Dirtier
Oct 06 2016 08:30
Or you can define a style section
@EdgarrGil Lol what do you mean
Istrelia
@Istrelia
Oct 06 2016 08:31
I tried like this : <div class="caption">
<p><small>Dr. Norman Borlaug, second from left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.</small></p>
Evan W
@Dirtier
Oct 06 2016 08:31
Wait you can definitely use CSS on that project haha
You don't have to, but you can if you want
Istrelia
@Istrelia
Oct 06 2016 08:32
ok
Evan W
@Dirtier
Oct 06 2016 08:32
But by using Bootstrap, you technically already are using CSS lol
Istrelia
@Istrelia
Oct 06 2016 08:32
Yep
Thanks
Evan W
@Dirtier
Oct 06 2016 08:32
Also, what is this? <p><small>?
Is there such thing as a small tag?
Oh wow there is lmao I've never even heard of that
Istrelia
@Istrelia
Oct 06 2016 08:33
The text should be small but it get increased due to jumbotron
Evan W
@Dirtier
Oct 06 2016 08:33
Yea that's bc the bootstrap CSS is overriding the small tag thing
Istrelia
@Istrelia
Oct 06 2016 08:33
Yes I find it in bootstrap
Evan W
@Dirtier
Oct 06 2016 08:34
I would just do this, remove the small tag and add a style= in your p
like <p style='font-size:20px'>
in-line styling like that has the highest priority
So nothing can override it
Istrelia
@Istrelia
Oct 06 2016 08:35
Ok :smile:
Evan W
@Dirtier
Oct 06 2016 08:35
Also, instead of a p, I'm pretty sure bootstrap has a caption class
Yea so you could change the <p> to <div class='caption'> if you want
Istrelia
@Istrelia
Oct 06 2016 08:37
Yes the p is inside a caption
Evan W
@Dirtier
Oct 06 2016 08:37
Ahh, you don't even need the p then :P
Just write it inside the div
Istrelia
@Istrelia
Oct 06 2016 08:37
Yes that'it thanks a lot !!!
Evan W
@Dirtier
Oct 06 2016 08:38
Np man
Edgar Gil
@EdgarrGil
Oct 06 2016 08:38
:wink:
Testing...
John K.
@glarobats
Oct 06 2016 08:47
Hi guys and girls, what am I forgeting here and I cannot append the json in the #box?
http://codepen.io/glarobats/pen/YGYYVp?editors=1111
kirbyedy
@kirbyedy
Oct 06 2016 08:51
@glarobats first you should load the jquery library
bootstrap needs it to work
Walid Ashri
@walidashri
Oct 06 2016 08:51
@glarobats just reverse the order of bootstrap and jquery in ue settings
kirbyedy
@kirbyedy
Oct 06 2016 08:51
and load first jquery then bootstrap, its important
grantknaver
@grantknaver
Oct 06 2016 08:51
anyone have any ideas as to why display: none is behaving like visibility : hidden?
John K.
@glarobats
Oct 06 2016 08:54
@walidashri thank you
CamperBot
@camperbot
Oct 06 2016 08:54
glarobats sends brownie points to @walidashri :sparkles: :thumbsup: :sparkles:
Richa
@richa-coder
Oct 06 2016 08:55
@grantknaver ,they are almost same,only difference is:visibility :hidden means that unlike display:none, the tag is not visible, but space is allocated for it on the page. The tag is rendered, it just isn't seen on the page.
grantknaver
@grantknaver
Oct 06 2016 08:56
exactly.
when I use display: none the space is still remaining allocated for the element.
Walid Ashri
@walidashri
Oct 06 2016 08:56
@grantknaver :D
Evan W
@Dirtier
Oct 06 2016 08:56
Bootstrap doesn't need jQuery to work O.o
It only needs it if you use the plugins
Walid Ashri
@walidashri
Oct 06 2016 08:59
@Dirtier u r absolutely right we meant the plugins
Henry Cabello
@hacu9
Oct 06 2016 08:59
Any tips for the tic tac toe game?
Evan W
@Dirtier
Oct 06 2016 08:59
Ahh sry didn't see that
i got this so far but i have no idea how to implement an IA
This is in python but the algorithm will be the same
def score(game, depth)
    if game.win?(@player)
        return 10 - depth
    elsif game.win?(@opponent)
        return depth - 10
    else
        return 0
    end
end

def minimax(game, depth)
    return score(game) if game.over?
    depth += 1
    scores = [] # an array of scores
    moves = []  # an array of moves

    # Populate the scores array, recursing as needed
    game.get_available_moves.each do |move|
        possible_game = game.get_new_state(move)
        scores.push minimax(possible_game, depth)
        moves.push move
    end

    # Do the min or the max calculation
    if game.active_turn == @player
        # This is the max calculation
        max_score_index = scores.each_with_index.max[1]
        @choice = moves[max_score_index]
        return scores[max_score_index]
    else
        # This is the min calculation
        min_score_index = scores.each_with_index.min[1]
        @choice = moves[min_score_index]
        return scores[min_score_index]
    end
end
Walid Ashri
@walidashri
Oct 06 2016 09:01
Evan W
@Dirtier
Oct 06 2016 09:02
So basically just search javascript minimax and learn how to implement it
Looks like old python too O.o
grantknaver
@grantknaver
Oct 06 2016 09:06
@Dirtier do you have any ideas? Right now when I try to set #expandableTrigger to display: none the element goes invisible but room is still allocated to the element (Like it is using visibility : hidden...instead of display : none
Evan W
@Dirtier
Oct 06 2016 09:07
@grantknaver Let me look at it rq
Whats the last line supposed to be?
in your JS
@Dirtier thanks
CamperBot
@camperbot
Oct 06 2016 09:08
grantknaver sends brownie points to @dirtier :sparkles: :thumbsup: :sparkles:
:cookie: 248 | @dirtier |http://www.freecodecamp.com/dirtier
Evan W
@Dirtier
Oct 06 2016 09:08
Oh nvm I was looking at an older version
It was throwing an error, ok one sec
What's supposed to be happening here? I don't even see the expandableTrigger span
without having clicked anything
grantknaver
@grantknaver
Oct 06 2016 09:13
really
Evan W
@Dirtier
Oct 06 2016 09:13
Oh ok nvm, so it's only supposed to show up on smaller screens?
I went to your actual codepen
instead of running it in here
grantknaver
@grantknaver
Oct 06 2016 09:13
lol yep
sorry
Evan W
@Dirtier
Oct 06 2016 09:14
Ok when I click it it does nothing though
grantknaver
@grantknaver
Oct 06 2016 09:14
Really
works on my end
Evan W
@Dirtier
Oct 06 2016 09:15
Thats the problem with codepen lol, it will run differently for everyone bc it's run locally. So I guess whatever you're using isn't compatible with Mac OSX
grantknaver
@grantknaver
Oct 06 2016 09:15
uggggg lol
ok thanks man
Evan W
@Dirtier
Oct 06 2016 09:16
Lol I'd hop on my desktop but it's broken atm =/. I'll just try to visualize it haha
So ok, you click on it and then it's supposed to disappear and then show the rest of the texT?
But you're saying the ...more info space is being reserved and the text thats supposed to show is being wrapped around it?
grantknaver
@grantknaver
Oct 06 2016 09:20
yep
It is breaking my text format
and now my freaking nav just broke uggg
not my night lol
Evan W
@Dirtier
Oct 06 2016 09:21
so I finally showed up in the real codepen for me somehow, and I was able to click it
but I don't see it breaking the text
lol
Amit Patel
@AmitP88
Oct 06 2016 09:21
hey guys, I need some advice on how to get pro-ish exp in web dev (specifically front end). I don't know whether I should try to look for pro bono projects by making sites for free for local businesses in my area, or if I should just proceed with Free Code Camp since they do non-profit projects...
Evan W
@Dirtier
Oct 06 2016 09:22
I just see a line w/ only 'responsive designs' in it but that's because you have it centered I think
grantknaver
@grantknaver
Oct 06 2016 09:22
hmmm ok
Evan W
@Dirtier
Oct 06 2016 09:22
hold on
what browser and OS
are you using? I'm gonna open it in the cross browser tester and see what you see
grantknaver
@grantknaver
Oct 06 2016 09:23
ok mozilla
Evan W
@Dirtier
Oct 06 2016 09:24
@AmitP88 I would def go for the certificates on here, you'll do a ton of projects just to get them and then those projects at the very end. Once you have that experience you'll have a foot in the door to go out and get some real experience
@grantknaver Mozilla on windows?
grantknaver
@grantknaver
Oct 06 2016 09:24
yep
Amit Patel
@AmitP88
Oct 06 2016 09:26
@Dirtier oh ok. because back in July, I graduated from the Udacity Front End nanodegree program and that took me about a year (could have finished sooner if it wasnt for life circumstances and work). However, will employers consider the Free Code Camp thing as pro/client exp?
I feel that's what's holding me back from a lot of dev jobs
Evan W
@Dirtier
Oct 06 2016 09:27
I've heard they will, though I don't know personally. Honestly as long as you have the portfolio to prove what you can do and you nail the interview, the certificates and stuff won't matter that much
@grantknaver Yea in this browser tester I can't even click the more info either, sorry man =/ wish I could help
Amit Patel
@AmitP88
Oct 06 2016 09:28
@Dirtier well I mean, here's my portfolio of the Udacity program projects I've completed: https://amitp88.github.io/New-Portfolio/
my site still needs work, but I'd say it's about 80% done. just need to tweak a few things and optimize the load speed
Evan W
@Dirtier
Oct 06 2016 09:28
@grantknaver actually I cant click it at all anymore, I think its bc you keep changing the code and saving it lol
grantknaver
@grantknaver
Oct 06 2016 09:29
@Dirtier its all good man. Maybe you have an idea about why my Nav shutdown
Evan W
@Dirtier
Oct 06 2016 09:30
@AmitP88 You are having trouble getting jobs with that portfolio O.o?
Amit Patel
@AmitP88
Oct 06 2016 09:30
@Dirtier well I mean, I've applied to 15 jobs since last friday and I haven't heard anything so far
I know it takes time, but still, i'm having doubts on how far left I have to go before I can get hired at entry level
Evan W
@Dirtier
Oct 06 2016 09:31
@AmitP88 I take back what I said about doing the FCC stuff, I thought you were way less experienced than that lol
@grantknaver I still see the nav
Amit Patel
@AmitP88
Oct 06 2016 09:32
@Dirtier well I mean, I'm a little rusty with the JS stuff since the past two months I've been more focused on modern design aspects, sharpening up on my html,css, bootsrap, and responsive design
Evan W
@Dirtier
Oct 06 2016 09:32
Ahhh ok
Well one thing I know that would help would be to showcase the latest frameworks
Amit Patel
@AmitP88
Oct 06 2016 09:33
@Dirtier but I am planning on diving into react and angular and making either a single webapp using both of those techs (since react is view only), or just make an app for each
Evan W
@Dirtier
Oct 06 2016 09:33
Like make them huge and pop
Go for it, and throw them at the very top of your portfolio. Or you could try and find out what the jobs you're applying for really need
And try to use that, or take what they're doing now, and re-do it in a different way and show them why its better :P
But honestly all your stuff looks really good, so I would just give it time lol I'm sure you'll be fine
Amit Patel
@AmitP88
Oct 06 2016 09:38
@Dirtier yeah, sometimes I get so confused as to what I should do now to help me improve my odds of getting in somewhere. It's like, "should I walk around to local businesses and offer them to make a free site? should I just focus on FFC since they do non-profit projects? should I learn Wordpress and go in that direction?"
I mean, all I need is to get in somewhere
@Dirtier oh hey, is my site fully responsive? I want to make sure there's no overlap on certain widths
Anthony Ho
@chiho13
Oct 06 2016 09:44
Salomon
@zarruk
Oct 06 2016 11:41
https://www.freecodecamp.com/challenges/roman-numeral-converter#?solution=%0Afunction%20convertToRoman(num)%20%7B%0A%20%20num%20%3D%20num.toString()%3B%0A%20%20var%20result1%20%3D%20%22%22%3B%0A%20%20switch%20(num%5Bnum.length%20-%204%5D)%7B%0A%20%20%20%20%20%20case%20%221%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22M%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%222%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22MM%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%223%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22MMM%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%7D%0A%20%20switch%20(num%5Bnum.length%20-%203%5D)%7B%0A%20%20%20%20%20%20case%20%221%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22C%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%222%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22CC%22%3B%0A%20%20%20%20%20%20case%20%223%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22CCC%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%224%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22CD%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%225%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22D%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%226%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22DC%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%227%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22DCC%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%228%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22DCCC%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%229%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22CM%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%7D%0A%20%20%20%20%20%20switch%20(num%5Bnum.length%20-%202%5D)%7B%0A%20%20%20%20%20%20case%20%221%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22X%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%222%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22XX%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%223%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22XXX%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%224%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22XL%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%225%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22L%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%226%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22LX%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%227%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22LXX%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%228%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22LXXX%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%229%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22XC%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20switch%20(num%5Bnum.length%20-%201%5D)%7B%0A%20%20%20%20%20%20case%20%221%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22I%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%222%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22II%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%223%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22III%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%224%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22IV%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%225%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22V%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%226%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22VI%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%227%22%3A%0A%20%20%20%20%20%20%20%20result1%20%2B%3D%20%22VII%22%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20case%20%2
Hello. Would somebody have done this challenge in a simpler way?
ADIL KARMOUZI
@mradil16
Oct 06 2016 11:41
hi everyone , is there a toolkit like emmet for javascript ?
Pere
@mundovacio
Oct 06 2016 12:34

Hello! i'm finishing my twitch tv project but i still have one issue that i can't solve. When you click in any channel, the twitch page doesn't load and i don't understand why. The console error is: "Unsafe JavaScript attempt to initiate navigation for frame with URL 'https://www.twitch.tv/food' from frame with URL 'http://s.codepen.io/boomerang/5e1c466cc70a99bc8c2abe0fb14e89e41475757115048/index.html?editors=0010'. The frame attempting navigation is sandboxed, and is therefore disallowed from navigating its ancestors."

this is my pen http://codepen.io/mundovacio/pen/JRAqNv?editors=0010

i appreciate some help! thanks!

Vishu
@vishul
Oct 06 2016 12:50
Need help with the Portfolio project and a body few basics anybody free?
nabinsademba
@nabinsademba
Oct 06 2016 12:58
yes @vishul
how am i going to help you
Mikail Bayram
@mikail1998
Oct 06 2016 14:39
http://codepen.io/mikail1998/pen/VKmwwE Hi, guys im working on the tic tac toe challenge and have an issue. When I hit X, O appears randomly but sometimes it cant be written because there is an X or an O already there. So i made an array of nine places (nine boxes) and it removes the array if somewhere is clicked now I figured i need a while loop to get the empty spot
but do not know where exactly and how
I would appreciate a tiny bit of a hint
AlBMyName
@IshmaRey-Hool
Oct 06 2016 15:10

Hi I'm doing...
https://www.freecodecamp.com/challenges/show-the-local-weather

This is my Pen...
http://codepen.io/Ishma-Reyhool/pen/WGXqdO

I just want to know why my Var html isn't working

var weatherData = 
    {
      "coord":
  {"lon":139,
   "lat":35},
"sys":
  {"country":"JP",
   "sunrise":1369769524,
   "sunset":1369821049},
"weather":
  [{"id":804,
    "main":"clouds",
    "description":"overcast clouds",
    "icon":"04n"}],
"main":
  {"temp":289.5,
  "humidity":89,
   "pressure":1013,
   "temp_min":287.04,
   "temp_max":292.04},
"wind":
  {"speed":7.31,
   "deg":187.002},
"rain":
  {"3h":0},
"clouds":
  {"all":92},
"dt":1369824698,
"id":1851632,
"name":"Shuzenji",
"cod":200}

var location="Location: "+weatherData.name+", "+weatherData.sys.country;

var html="<div><p>"+location+"</p></div>"

$(document).ready(function(){
$("#appInfo").html(html);
});
Ashish Acharya
@anarchyrucks
Oct 06 2016 15:11
@mikail1998 what i did was give all the boxes an id and used the id name to add text to it
JD Tadlock
@jdtdesigns
Oct 06 2016 15:21
@IshmaRey-Hool location is a host name specific to browsers. You can't use that as a variable name. Change it to loc and you'll see the correct output. ;)
AlBMyName
@IshmaRey-Hool
Oct 06 2016 15:22
thanks @jdtdesigns
CamperBot
@camperbot
Oct 06 2016 15:22
:cookie: 669 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
ishmarey-hool sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
JD Tadlock
@jdtdesigns
Oct 06 2016 15:25
@mikail1998 didn't i give you a solution yesterday?
.not() is great for weeding elements out you don't want selected ;)
adityac0620
@adityac0620
Oct 06 2016 15:36
Hi guys i am joining back after a long time can anyone please have a look and tell me what is wrong

function nextInLine(arr, item) {
  // Your code here
 // item = arr[0] ;
  arr.push(item);
 item = arr[0] ;
  return item;  // Change this line
}

// Test Setup
var testArr = [1,2,3,4];

// Display Code
console.log("Before: " + JSON.stringify(testArr));
console.log(nextInLine(testArr, 10)); // Modify this line to test
console.log("After: " + JSON.stringify(testArr));
console.log(testArr[4]);
JD Tadlock
@jdtdesigns
Oct 06 2016 15:36
Building a simon game from scratch again if anybody wants to pair program or watch. https://jsfiddle.net/jdtadlock/dsn0728L/#&togetherjs=arQoILDajk
@adityac0620 what challenge is that?
adityac0620
@adityac0620
Oct 06 2016 15:40
@jdtdesigns It is the challenge named "Stand in Line"
https://www.freecodecamp.com/challenges/stand-in-line
JD Tadlock
@jdtdesigns
Oct 06 2016 15:42
@adityac0620 lookup .shift()
adityac0620
@adityac0620
Oct 06 2016 15:43
@jdtdesigns thanks it worked out just perfectly!!
CamperBot
@camperbot
Oct 06 2016 15:43
adityac0620 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 670 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Andrew McKeever
@andmckvr13
Oct 06 2016 15:49
 function getMins(j) {
    document.getElementById('minsDisplay').textContent = j;
    var minsDwn = setInterval(function() {
      document.getElementById('minsDisplay').textContent = j;
      j-- || clearTimeout(minsDwn);
    }, 60000);
  }
can someone help me? With the interval time set to 60000 , the display doesn't update 'j', but when I set the interval time to 1000 display is updated as expected. The only thing I changed is the amount of time
nevermind, the code is executing as expected, my problem was that it was waiting for the previous function to finish first
Pete
@petegarvin1
Oct 06 2016 16:07
hi guys, been redesigning my portfolio. Any advice / comments appreciated http://codepen.io/petegarvin1/full/QEObbV/
Kevin
@txsrangers
Oct 06 2016 16:10
Hello, I'm working on the Pomodoro Clock project, and I want to add sound to it, but I don't have a pro CodePen account. I tried it from a host, but can't seem to get it to work that way. Is it even possible without a pro account?
JD Tadlock
@jdtdesigns
Oct 06 2016 16:10
@petegarvin1 I'd remove the blue border from the buttons ;)
Pete
@petegarvin1
Oct 06 2016 16:11
@jdtdesigns really? that one of my favourite bits :D
JD Tadlock
@jdtdesigns
Oct 06 2016 16:12
small bright borders on buttons are kinda out of style these days except for some rare uses
Pete
@petegarvin1
Oct 06 2016 16:13
interesting
JD Tadlock
@jdtdesigns
Oct 06 2016 16:16
also, 1px borders are pixelated when you add border-radius
you can get around that by using box-shadow to create an anti-alias effect
@petegarvin1
Pete
@petegarvin1
Oct 06 2016 16:18
oh good shout... so like a 1px box shadow?
JD Tadlock
@jdtdesigns
Oct 06 2016 16:25
@petegarvin1 something like this:
box-shadow: 0px 1px 1px #00CCFF,  0px -1px 1px #00CCFF;
Pete
@petegarvin1
Oct 06 2016 16:26
ok thanks ill give it a try
JD Tadlock
@jdtdesigns
Oct 06 2016 16:26
and remove the 1px border
Pete
@petegarvin1
Oct 06 2016 16:27
ok
:+1:
thanks @jdtdesigns
CamperBot
@camperbot
Oct 06 2016 16:27
petegarvin1 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 671 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Oct 06 2016 16:27
;)
Building a simon game from scratch again if anybody wants to pair program or watch. https://jsfiddle.net/jdtadlock/dsn0728L/#&togetherjs=arQoILDajk
Istvan Kokuti
@zaturek
Oct 06 2016 16:30
Hello guys! I have a problem with my wiki viewer. I've mad e an url with used the api at wikipedia api, but it isn't coming back with any results in the pages section. But, if I copy the url in the browser, I got a proper JSON object. What could be the problem?
Pete
@petegarvin1
Oct 06 2016 16:30
@jdtdesigns if i want to watch that build back later is it availablle?
JD Tadlock
@jdtdesigns
Oct 06 2016 16:30
no unfortunately. jsfiddle doesn't record your actions
it just saves your current state
@petegarvin1
Pete
@petegarvin1
Oct 06 2016 16:33
crap, no worries
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 16:55
@annunirmal Yeah, shows correct for me now ;)
adityac0620
@adityac0620
Oct 06 2016 17:18
can anyone point out my mistake please ?

function golfScore(par, strokes) {
  // Only change code below this line
  if(strokes === 1){
    return "Hole-in-one!";
  }
  else if(strokes<=(par-2)){
    return "Eagle";
  }
  else if(strokes==(par-1)){
    return "Birdie";
  }
 else if(strokes==(par+1)){
    return "Bogey";
  }
 else if (strokes==(par+2)){
    return "Double Bogey";
  }
  else if(strokes>== (par + 3)){
    return "Go Home!";
  }
  return "Change Me";
  // Only change code above this line
}

// Change these values to test
golfScore(5, 9);
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Oct 06 2016 17:22
@adityac0620 You have an mistake at "strokes >== (par + 3) "
@adityac0620 Do you know why?
Matthew Brown
@vledoc
Oct 06 2016 17:22
You are missing the "par"
if strokes equal par it should return "par"
adityac0620
@adityac0620
Oct 06 2016 17:24
@Otto-AA thanks was where i made a mistake
CamperBot
@camperbot
Oct 06 2016 17:24
adityac0620 sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 264 | @otto-aa |http://www.freecodecamp.com/otto-aa
Matthew Brown
@vledoc
Oct 06 2016 17:24
also you need to change the final return so it isn't "change me" still
adityac0620
@adityac0620
Oct 06 2016 17:24
@vledoc thanks i will add that condition up too
CamperBot
@camperbot
Oct 06 2016 17:24
adityac0620 sends brownie points to @vledoc :sparkles: :thumbsup: :sparkles:
:cookie: 246 | @vledoc |http://www.freecodecamp.com/vledoc
Matthew Brown
@vledoc
Oct 06 2016 17:25
no problem, good job!
adityac0620
@adityac0620
Oct 06 2016 17:26

@vledoc Well what if the user puts a value like : ( -3) or (-160)

also you need to change the final return so it isn't "change me" still

xSnowpeltx
@xSnowpeltx
Oct 06 2016 17:27
How do I go about running a code when an API doesn't exist? I'm doing the twitch project, I want to make divs for when theres usernames that return a 404 error. I'm use $(document).ajaxError but this ends up making the "closed account" divs twice for all usernames
Stephen James
@sjames1958gm
Oct 06 2016 17:28
@xSnowpeltx Which function are you using to send the API request $.getJSON? $.ajax?
xSnowpeltx
@xSnowpeltx
Oct 06 2016 17:28
$.getJSON
heres my pen if you want it https://codepen.io/xSnowpeltx/pen/dpJmra
Pete
@petegarvin1
Oct 06 2016 17:31
@xSnowpeltx that looks sweet!
JD Tadlock
@jdtdesigns
Oct 06 2016 17:35
@xSnowpeltx you need to use .fail()
$.getJSON("https://api.twitch.tv/kraken/streams/" + users[i] + id, function(data) {
    //console.log(data);
    if (data.stream === null) {
      $.getJSON("https://api.twitch.tv/kraken/channels/" + users[i] + id, function(data2) {
        code = '<div class="user offline"><img class="profImg" src="' + data2.logo + '" alt="Profile Image"><div class="status">offline</div><div class="username">' + users[i] + '</div><div class="info">Currently Offline</div> </div>';
        if (i < 3) {
          $("#1").append(code);
        } else if (i < 7) {
          $("#2").append(code);
        } else {
          $("#3").append(code);
        }
      });
    } else {
      //console.log("online" + users[i])
      //set to online
      console.log(data.stream.channel.logo + data.stream.channel.status);
      code = '<div class="user online"><img class="profImg" src="' + data.stream.channel.logo + '" alt="Profile Image"><div class="status">online</div><div class="username">' + data.stream.channel.name + '</div><div class="info">' + data.stream.channel.status + '</div> </div>';
      if (i < 3) {
        $("#1").append(code);
      } else if (i < 7) {
        $("#2").append(code);
      } else {
        $("#3").append(code);
      }
    }

  }).fail(function() {
  // user doesn't exist
  // your code for closed account goes here, not below
});
Stephen James
@sjames1958gm
Oct 06 2016 17:35
@xSnowpeltx At the end of your streams $.getJSON(url, function() {}).fail(function() { alert(users[i]); }); you can place this .fail function and it will get called for the unknown
@jdtdesigns :+1: :)
xSnowpeltx
@xSnowpeltx
Oct 06 2016 17:56
alright that works. Now I'm trying to get my rows of divs to match heights. I was trying to set the height of the row container to a variable, then set the heights of the divs in that row to the height of the row but it didnt do anything (aka
```var height1 = $("#1").css("height"),
height2 = $("#2").css("height"),
height3 = $("#3").css("height");
$("#1 .user").css("height", height1);
$("#2 .user").css("height", height2);
$("#3 .user").css("height", height3);
'''
where my rows are given the ids 1 2 and 3
CamperBot
@camperbot
Oct 06 2016 17:56
:bulb: to format code use backticks! ``` more info
Mikail Bayram
@mikail1998
Oct 06 2016 18:00
@jdtdesigns (for the help in PM)
thanks
@jdtdesigns thank you
CamperBot
@camperbot
Oct 06 2016 18:00
mikail1998 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 672 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
reg0r
@reg0r
Oct 06 2016 18:22
Hi everyone! Just finished my weather app. I'll be thankfull for some feedback.
http://codepen.io/reg0r/full/pEdBGr/
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:28
I'm nearly done with the twitch project, I just can't figure out how to make my divs for the different users match height (like if one has more text in it and is taller, make the others in the row match ) https://codepen.io/xSnowpeltx/pen/dpJmra/
@reg0r it asked for my location and I allowed, but geolocation didnt work
reg0r
@reg0r
Oct 06 2016 18:32
@xSnowpeltx Are you using Chrome?
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:32
yeah
reg0r
@reg0r
Oct 06 2016 18:34
In chrome geolocation dosn't work, because of that I has included search by city name.
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:34
Does anyone know how to change a link from https to http before settign it as a href?
or something has to be wrong with my links. i click them and they send me to what should be the right address but nothing shows up
Christina
@cmgorton
Oct 06 2016 18:38
so I didn't realize I was signed into my husband's freecodecamp and not mine. I accidently submitted my personal portfolio page on his page instead of mine. Anyway to fix that? or should i just resubmit on my page and have him submit a new link on his page when he completes it?
reg0r
@reg0r
Oct 06 2016 18:41
@xSnowpeltx Can you show your code?
thats my portfolio
can someone give me feedback??
Dylan
@dhcodes
Oct 06 2016 18:43
@xSnowpeltx it's probably the codepen issue
they will likely work if you open them in a new tab
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:43
it opens in a new tap
Dylan
@dhcodes
Oct 06 2016 18:43
target = "_blank"
well then
what links? they are working for me
Alex9911
@Alex9911
Oct 06 2016 18:44
Hi! Does anyone know how to build a clickable button to take you to a certain part of the web page? Or what challenge should I review?
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:44
they open to https://www.twitch.tv/{username} but just show a purple background
Alex9911
@Alex9911
Oct 06 2016 18:46
I guess it's a basic thing but I can't remember how to do it
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:47
i ended up finding a tutorial for a menu bar online
@Alex9911
Dylan
@dhcodes
Oct 06 2016 18:47
@Alex9911 look up "anchor tags"
or anchor links
@xSnowpeltx weird, they are working for me
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:48
it might be something about my browser beign in https
being*
Dylan
@dhcodes
Oct 06 2016 18:48
yeah idk
xSnowpeltx
@xSnowpeltx
Oct 06 2016 18:49
so do you think it's good to submit, since its working for you?
hmmm it works in debug mode
miriam-z
@miriam-z
Oct 06 2016 19:00
I am running my application from build environment on localhost server and one of my images is loading from the src directory and not the build directory
GET /src/client/images/header-lg.jpg 304 1.119 ms - -
this image is the only image which is being loaded through background img url in css

.jumbotron{
  background: url('/images/header-xs.jpg') no-repeat center center;
  background-size: cover;
  height: 49.875rem;
  padding: 0;
  margin: 0;
  border-radius: 0;
  position: relative;
  align-content: center;
}
it is not loading in my browser, what is going wrong here?
Alex9911
@Alex9911
Oct 06 2016 19:03
@dhcodes Thanks!
CamperBot
@camperbot
Oct 06 2016 19:04
alex9911 sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1465 | @dhcodes |http://www.freecodecamp.com/dhcodes
Henrik Helmius
@HankyP
Oct 06 2016 19:09
I'm having trouble with the random quote machine. I've getting JSON from a few different quote APIs now but i can't get them to work. Right now the console is returning the following error message:
Mixed Content: The page at 'https://codepen.io/HankyP/pen/ALQvAr/?editors=1011' was loaded over HTTPS, but requested an insecure script 'http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en&callback=jQuery31007497764375049636_1475780665935&_=1475780665937'. This request has been blocked; the content must be served over HTTPS.
What is causing this?
I'm using this code:
$("#getQuote").on("click", function() {
    console.log("Button pressed")
    $.get("http://api.forismatic.com/api/1.0/?method=getQuote&key=457653&format=json&lang=en", function(val){ 
        console.log(val); $(".quote").html(JSON.stringify(val)); 
    });
Jordan Bartholomew
@tourdejord
Oct 06 2016 19:14
Hello everyone! I hope today is treating you well.
Does anyone know how I'd be able to use a custom navbar from a different page on other webpages using jquery. So I'd like to add the same navbar to each page.
Stephen James
@sjames1958gm
Oct 06 2016 19:15
@HankyP Connect to your page over http://
Henrik Helmius
@HankyP
Oct 06 2016 19:16
@sjames1958gm Am i not doing that?
Stephen James
@sjames1958gm
Oct 06 2016 19:16
@HankyP Looks like you added https://crossorigin.me which should resolve that as well
Henrik Helmius
@HankyP
Oct 06 2016 19:18
@sjames1958gm I'm a bit confused, is there any code missing to set up the request for http://
Stephen James
@sjames1958gm
Oct 06 2016 19:19
@HankyP You got that error with the crossorigin on the front of your URL?
Henrik Helmius
@HankyP
Oct 06 2016 19:24
@sjames1958gm Apparently not, I foolishly just presumed that it was the same error. Now that i've looked at it, it gives me this:
Uncaught SyntaxError: Unexpected token : crossorigin.me/http://api.forismatic.com/api/1.0/?method=getQuote&format=js…ang=en&callback=jQuery31008367163237101773_1475781618915&_=1475781618916:1
So I'm guessing that there is something odd with the API?
Personacode
@Personacode
Oct 06 2016 19:25
Where can I find some professional looking backgrounds for my portfolio?
Stephen James
@sjames1958gm
Oct 06 2016 19:26
@HankyP I have seen nothing but pain from this API - maybe this way?
$('#quoteAJAX').click(function() {
  $.ajax({
      url: "http://api.forismatic.com/api/1.0/",
      jsonp: "jsonp",
      dataType: "jsonp",
      data: {
        method: "getQuote",
        lang: "en",
        format: "jsonp"
      }
    })
    .done(update)
    .fail(handleErr);
});
Henrik Helmius
@HankyP
Oct 06 2016 19:34
@sjames1958gm That seems to give me:
jquery.min.js:4 Mixed Content: The page at 'https://codepen.io/HankyP/pen/ALQvAr/?editors=1011' was loaded over HTTPS, but requested an insecure script 'http://api.forismatic.com/api/1.0/?jsonp=jQuery31009573137843444999_1475782370878&method=getQuote&lang=en&format=jsonp&_=1475782370882'. This request has been blocked; the content must be served over HTTPS.
Perhaps i should find another api, this was just one i found on reddit
Stephen James
@sjames1958gm
Oct 06 2016 19:36
@HankyP https://crossorigin.me/ add this back in to the url at the front for one last try
Henrik Helmius
@HankyP
Oct 06 2016 19:37
@sjames1958gm Thanks! I think that finally solved it
CamperBot
@camperbot
Oct 06 2016 19:37
:star2: 3719 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
hankyp sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
JD Tadlock
@jdtdesigns
Oct 06 2016 19:38
@HankyP The problem was you can't load a page with https and then have content on the page that links to http. It will cause a conflict because https is secure and http is not. Some servers will let it slide, others will decline the request.
Henrik Helmius
@HankyP
Oct 06 2016 19:40
@jdtdesigns So basically, because codpen is loaded over https first and the api over http afterwards, it all goes to shit?
Stephen James
@sjames1958gm
Oct 06 2016 19:40
@HankyP :+1:
JD Tadlock
@jdtdesigns
Oct 06 2016 19:41
@HankyP correct ;)
Building a simon game from scratch again. Almost done if anybody wants to help finish. https://jsfiddle.net/jdtadlock/dsn0728L/#&togetherjs=arQoILDajk
Henrik Helmius
@HankyP
Oct 06 2016 19:43
@jdtdesigns Would this not have been a problem then if the webpage was not hosted on codepen but on a separate, own server being accessed over http?
JD Tadlock
@jdtdesigns
Oct 06 2016 19:44
@HankyP correct, or just load codepen without https ;)
Henrik Helmius
@HankyP
Oct 06 2016 19:45
@jdtdesigns Okay, I understand now, thanks a lot!
CamperBot
@camperbot
Oct 06 2016 19:45
hankyp sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 673 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Oct 06 2016 19:45
@HankyP welcome
Personacode
@Personacode
Oct 06 2016 20:00
Guys I'm doing my portfolio and I'm totally lost on what to do next. I want to add a professional-looking background but idk where to look. Here is all I have right now https://codepen.io/PersonaCode/pen/yapyOQ
3 buttons. I will add more but I want a background first
Fon Socrates Anye
@anye55
Oct 06 2016 20:03
@personacode try unsplash.com. They have some high resolution photos for free
Maximilian Schlosser
@maxschlosser
Oct 06 2016 20:13
hey guiys, dumb question: is it possible to have a img and a table align horizontally when using bootstrap tables?
Jibbless
@Jibbless
Oct 06 2016 20:16
i forgot how to change the text size in <style> can someone explain
Maximilian Schlosser
@maxschlosser
Oct 06 2016 20:17
@Jibbless try using font-size: XXpx;
Jibbless
@Jibbless
Oct 06 2016 20:18
ok i was doing text-size
amran16
@amran16
Oct 06 2016 20:20
This message was deleted
JD Tadlock
@jdtdesigns
Oct 06 2016 20:30
the simon game is complete! thanks for joining in everybody https://jsfiddle.net/jdtadlock/dsn0728L/11/
Maximilian Schlosser
@maxschlosser
Oct 06 2016 20:32

http://codepen.io/maxschlosser/pen/KgQrvW

Do you know how I can move the table to the left so the top of the image and table are aligned horizontally?

JD Tadlock
@jdtdesigns
Oct 06 2016 20:39
@maxschlosser do you have an example of what you're trying to achieve with the layout?
tables should only be used for tabular data
Jibbless
@Jibbless
Oct 06 2016 20:40
how do i center an image
ive searched google and it is wrong
JD Tadlock
@jdtdesigns
Oct 06 2016 20:43
@Jibbless many different ways. do you have a codepen?
Jibbless
@Jibbless
Oct 06 2016 20:43
yes
Maximilian Schlosser
@maxschlosser
Oct 06 2016 20:43
@jdtdesigns I have a database that contains some meta data for movies (e.g. title, actors, genre, year) and tables seemed to be a natural way to display this data. Sadly, I dont have an example. The goal is a simple detail view for movies, that displays most of the information available on pages similar to IMDb.
Flashards
@Flashards
Oct 06 2016 20:44
Why when creating a navigation bar in html/css we use display: block; isn't it forbiding us from using float left and putting elements in horizontal position?
JD Tadlock
@jdtdesigns
Oct 06 2016 20:44
@maxschlosser That's a good case for tables.
you're trying to get the image to be to the left of the table?
Jibbless
@Jibbless
Oct 06 2016 20:46
how do i center an image isn't is this-
Maximilian Schlosser
@maxschlosser
Oct 06 2016 20:46
Yes. i tried using display: inline-block; but then the table is aligned with the middle of the image.
JD Tadlock
@jdtdesigns
Oct 06 2016 20:47
@Flashards If you're coding without a framework, there's no good reason to use floats
@maxschlosser I'll fix it for ya. ;)
Flashards
@Flashards
Oct 06 2016 20:48
@jdtdesigns Ye, I'm doing it in pure css. But how can you make elements stand next to each other with block display? Isn't it preventing it ?
Maximilian Schlosser
@maxschlosser
Oct 06 2016 20:49
@Jibbless Did you try the example from w3schools?
@Flashards You should use flexbox
wrap the elements in a div and make that container div display: flex;
Flashards
@Flashards
Oct 06 2016 20:52
@jdtdesigns thanks
CamperBot
@camperbot
Oct 06 2016 20:52
flashards sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 674 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Maximilian Schlosser
@maxschlosser
Oct 06 2016 20:54
@jdtdesigns The img-responsive class does the trick. Thanks!
CamperBot
@camperbot
Oct 06 2016 20:54
maxschlosser sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 675 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Josef Saltz
@JosefSaltz
Oct 06 2016 21:09
Hello, I have a jQuery event handler for a toggle switch yet whenever I click it does not fire, looks like this
  $(":checkbox").on("click", function(){
    console.log("click!");
    var currentVal = $(".weatherContent").text();
    console.log(currentVal);
    $("weatherContent").text(tempConv(switchTo, currentVal));
  });
Jibbless
@Jibbless
Oct 06 2016 21:11
HOW DO I CENTER AN IMAGE
ON THE PAGE
DeepNebula
@DeepNebula
Oct 06 2016 21:44
http://codepen.io/distantquasar/pen/rrYmOZ hilp mE i cant koad this suks
Manuel Micu
@manu-4216
Oct 06 2016 22:21
@inkuplex do you have a codepen link?
Ken Haduch
@khaduch
Oct 06 2016 23:05

@DeepNebula @DeepNebula - interesting page... If you want to take a look at a website that I found to be helpful, especially for using bootstrap and setting up a page similar to this, I'd take a look at w3schools.com/bootstrap for individual elements of bootstrap, and especially for the information in the "themes" section http://www.w3schools.com/bootstrap/bootstrap_theme_me.asp - they walk through the design and implementation of several pages that look a lot like the portfolio example on FreeCodeCamp... I found it to be helpful, having little experience setting up a page like that as I had... and I'm sure that mine still needs some work...

But other than that - looks like you've put a lot of effort into your CSS and just a few tweaks you'd probably make some nice improvements... hope that helps? Good luck!

@Jibbless - are you using bootstrap? If you are - if you have a div that contains the image, add class="text-center" to that div. Or on the img itself, add class="center-block". If you aren't using bootstrap try adding this css: margin: 0 auto; to a class that you have on your image, or make a special class for your image with that code in it. See if that works?
DoYouLoveGames
@DoYouLoveGames
Oct 06 2016 23:31
Hello, I am using bootstrap and have used <div class="col-md-6"> for a paragraph and an image that i want to be side by side, but the text remains on top of the image. I cannot figure out why. I also have <div class="row">
Josef Saltz
@JosefSaltz
Oct 06 2016 23:31
@manu-4216 one second
DoYouLoveGames
@DoYouLoveGames
Oct 06 2016 23:34
Ahhh i figured it out. I had it nested in a <p>
Manuel Micu
@manu-4216
Oct 06 2016 23:35
Ok great
vínαч puppαl
@vinaypuppal
Oct 06 2016 23:35
This message was deleted
DoYouLoveGames
@DoYouLoveGames
Oct 06 2016 23:36
Can I nest a text box inside my bootstrap column? The text runs along the page about halfway on one line. I want it to be centered with small margins.
Kevin
@txsrangers
Oct 06 2016 23:46
Hello. I've been trying all day to figure out how to add sound to my project. Is there a way to do audio in codepen?