Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
kat-mag
@kat-mag
@ghulamshabir github
Ghulam Shabir
@ghulamshabir
@AllanPooley oh yes that i was asking
@kat-mag oh github? its good? i thought people use it post their programs to review or something like that
kat-mag
@kat-mag
gh-pages You can have your static webpage there
@ghulamshabir and you'll learn to use git along the way ;D
Ghulam Shabir
@ghulamshabir
@AllanPooley @kat-mag can i get domain on my own name on github
kat-mag
@kat-mag
@ghulamshabir u gonna get username.github.io
It's good for a start
Ghulam Shabir
@ghulamshabir
@kat-mag @AllanPooley oh thank you all , you are great :smile:
CamperBot
@camperbot
:cookie: 359 | @kat-mag |http://www.freecodecamp.com/kat-mag
:cookie: 122 | @allanpooley |http://www.freecodecamp.com/allanpooley
ghulamshabir sends brownie points to @kat-mag and @allanpooley :sparkles: :thumbsup: :sparkles:
Allan Pooley
@AllanPooley
Good luck and have fun @ghulamshabir ! :smile:
Ghulam Shabir
@ghulamshabir
@AllanPooley :smile:
Sebastian Cheung CQF
@scheung38

how to import expect into codepenio :

https://www.npmjs.com/package/expect

Settings -> Javascript -> Babel

and then

https://npmcdn.com/expect@1.20.2/umd/expect.min.js

kat-mag
@kat-mag
Sebastian Cheung CQF
@scheung38
Thanks @kat-mag
CamperBot
@camperbot
scheung38 sends brownie points to @kat-mag :sparkles: :thumbsup: :sparkles:
:cookie: 360 | @kat-mag |http://www.freecodecamp.com/kat-mag
Sebastian Cheung CQF
@scheung38
But it is not working
http://codepen.io/scheung38/pen/JRvERJ?editors=1111 , should be getting back error as code is not even finished, but no errors shown?
Stephen James
@sjames1958gm
@scheung38 Exceptions show in the devtools console - not the codepen console
kat-mag
@kat-mag
@scheung38 yeah. works as @sjames1958gm said
Sebastian Cheung CQF
@scheung38
@sjames1958gm thanks but I am not getting any error in console...
CamperBot
@camperbot
scheung38 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 3782 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Sebastian Cheung CQF
@scheung38
devtools console and not console? I only see one console in Codepen
kat-mag
@kat-mag
devtools
Stephen James
@sjames1958gm
I see this : expect.min.js:1 Uncaught Error: Expected 0 to equal 1
kat-mag
@kat-mag
ctrl+shift+i on chrome
or right button -> inspect
Stephen James
@sjames1958gm
@scheung38 codepen console shows only console.log() output, but the devtools console shows runtime errors as well
Or F12
Sebastian Cheung CQF
@scheung38
Ok then the link was incorrect, I had to change Codepen - Settings -> Javascript Preprocessor -> Babel to see console
kat-mag
@kat-mag
seriously
what browser are you using?
Stephen James
@sjames1958gm
@scheung38 If you use try/catch around your test cases you can send the output to the console from the catch.
Sebastian Cheung CQF
@scheung38
chrome
kat-mag
@kat-mag
have you used right mouse button -> inspect? or ctrl+shift+i?
Stephen James
@sjames1958gm
function counter(state, action) {
  // if (action.type === 'INCREMENT') {
  // return state + 1;
  // } else if (action.type === 'DECREMENT')   // {
  // return state - 1;
  // }
  // }
  return state;
}

try {
   expect(
     counter(0, {
       type: 'INCREMENT'
     })

).toEqual(1);


  console.log('All Tests Passed!');

} catch (e) {
  console.log('Test failed: ', e);
}
Sebastian Cheung CQF
@scheung38
This message was deleted
Stephen James
@sjames1958gm
@scheung38 That is a different tool than codepen - these are codepen limitations - that I think is jsbin
Sebastian Cheung CQF
@scheung38
@sjames1958gm thanks then JSBin is better than Codepen then in this case as I need to see error in Chrome inspector, JSBin shows error in their console
CamperBot
@camperbot
scheung38 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: scheung38 already gave sjames1958gm points
Max Mirza
@maxmirza

hey guys im trying to get the physical layout of a tic tac toe game, is anyone willing to help? :)
boolean mouseOverRect(int x, int y, int w, int h) {
return (mouseX >= x && mouseX <= x+w && mouseY >= y && mouseY <= y+h);
}

Button squareOne;
Button squareTwo;
Button squareThree;
Button squareFour;
Button squareFive;
Button squareSix;
Button squareSeven;
Button squareEight;
Button squareNine;

import java.util.Scanner;

void setup()
{
size (800, 800);
squareOne = new Button( 100, 300 , 100, 100);
squareTwo = new Button( 200, 300 , 100, 100);
squareThree = new Button( 300, 300 , 100, 100);
squareFour = new Button( 400, 300 , 100, 100);
squareFive = new Button( 500, 300 , 100, 100);
squareSix = new Button( 600, 300 , 100, 100);
squareSeven = new Button( 600, 300 , 100, 100);
squareEight = new Button( 600, 300 , 100, 100);
squareNine = new Button( 600, 300 , 100, 100);
}

void draw()
{
squareOne.draw();
squareTwo.draw();
squareThree.draw();
squareFour.draw();
squareFive.draw();
squareSix.draw();
squareSeven.draw();
squareEight.draw();

}

Jack Lyons
@JackEdwardLyons
@c0d0er first of all, set up some variables to make your code cleaner and easier to read