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
Roman Struna
@RomchyFCC
i'll look into nesting them if i get any time off, will let you know how it goes, also, i didn't like the timeout sollution but nothing else i tried worked, thanks for the feedback @sjames1958gm i'll try to fix it asap
CamperBot
@camperbot
romchyfcc sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8971 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
@RomchyFCC :+1:
Raghav Mundra
@Raghav17
I am doing Pig Latin from intermediate code challenges. Can anyone please tell me what it wrong with this?
function translatePigLatin(str) {
  var temp;
  var cc;
  for (i = 0; i<str.length; i++){
    if (str[i] == ("a" | "e"| "i" | "o" | "u")){
      temp = i;
      break;
    }
    else{
      continue;
    }
    var sub = str.substr(0,temp-1);
    var old = str.substr(temp);

    cc = old.concat(sub);







  }
return cc; 
}
ehutchllew
@ehutchllew
@Raghav17 Sorry, what is the goal for this exercise?
Raghav Mundra
@Raghav17

@ehutchllew
Translate the provided string to pig latin.

Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an "ay".

If a word begins with a vowel you just add "way" to the end.

I have not completed it and doing it in parts , I was trying to make the cononant move at the end but it isnt working
ehutchllew
@ehutchllew
@Raghav17 try pushing letters to a new array until you hit a vowel
or string instead of array, sorry.
Raghav Mundra
@Raghav17
Okay, i will try that.
Ghost
@ghost~5a4a80acd73408ce4f859755
Can anyone tell me why this isn't working please?


var centerX = mouseX;
var centerY = mouseY;
var bodyLength = 118;
var bodyHeight = 74;
var bodyColor = color(162, 0, 255);
var drawFish = function() {
    background(89, 216, 255);
    noStroke();
    fill(bodyColor);
    // body
    ellipse(centerX, centerY, bodyLength, bodyHeight);
    // tail
    var tailWidth = bodyLength/4;
    var tailHeight = bodyHeight/2;
    triangle(centerX-bodyLength/2, centerY,
         centerX-bodyLength/2-tailWidth, centerY-tailHeight,
         centerX-bodyLength/2-tailWidth, centerY+tailHeight);
    // eye
    fill(33, 33, 33);
    ellipse(centerX+bodyLength/4, centerY, bodyHeight/5, bodyHeight/5);
};
cjlynch12
@cjlynch12
@MuhammedKarim what are you trying to get it to do?
and are you getting any errors when running it?
Ghost
@ghost~5a4a80acd73408ce4f859755
when i put it in the drawFish function like above it comes out blank canvas
cjlynch12
@cjlynch12
I'm seeing a fish when I go to that link and putting the code into the editor
do you have ad blockers on?
Ian Gracia
@iangracia
Anyone keen to help me implement an OCR on codepen?
Stephen James
@sjames1958gm
@MuhammedKarim When do you call drawFish? Looking at this code the centerX, centerY will be set once to some random mouse X.Y
Ghost
@ghost~5a4a80acd73408ce4f859755
@cjlynch12 ad blockers are off
@sjames1958gm yeah silly me, it works now lol i forgot to call the function!
Alan Price
@alanpaulprice

hey guys, would anyone here mind running this in the latest chrome and tell me if the audio loops like it should or breaks after playing once (like it does for me)
https://jsbin.com/wixomuy/edit?js,console

thanks!

Sweet Coding :)
@SweetCodingInc
@alanpaulprice Chrome v64 has that issue
Alan Price
@alanpaulprice
ah right, is there any work around or do you think i should just wait until they sort it out?
Sweet Coding :)
@SweetCodingInc
As of now I have v63 and it's working for me
but I ran into similar issue on work machine that has v64
Alan Price
@alanpaulprice
ah okay, thanks for clearing that up
thanks @SweetCodingInc
CamperBot
@camperbot
alanpaulprice sends brownie points to @sweetcodinginc :sparkles: :thumbsup: :sparkles:
:cookie: 288 | @sweetcodinginc |http://www.freecodecamp.org/sweetcodinginc
Sweet Coding :)
@SweetCodingInc
@alanpaulprice Yes.. There is a shitty workaround
console.clear();

let audioClip;// = new Audio("https://raw.githubusercontent.com/alanpaulprice/simon-game/master/Audio/simonSound1.mp3");

setInterval(function() {
  audioClip = new Audio("https://raw.githubusercontent.com/alanpaulprice/simon-game/master/Audio/simonSound1.mp3");
  audioClip.play();
  console.log('sound triggered');
}, 1000)
Alan Price
@alanpaulprice
i see, sounds like the audio is still cutting out mid way though
i think i'll just wait until they get their shit together and iron it out
Sweet Coding :)
@SweetCodingInc
@alanpaulprice Try adjusingt he delay then
Alan Price
@alanpaulprice
@SweetCodingInc it works nicely in safari with the 1sec, as does the old snippet, but the premature cut off seems to be part of the chrome issue
Sweet Coding :)
@SweetCodingInc
yeah...
even if you don't put that in interval, it seems to get cut off
Alan Price
@alanpaulprice
@SweetCodingInc no worries, i'll just work on that project in a different browser for now. Thanks for the help :smile:
CamperBot
@camperbot
alanpaulprice sends brownie points to @sweetcodinginc :sparkles: :thumbsup: :sparkles:
api offline
Sweet Coding :)
@SweetCodingInc
@alanpaulprice :+1:
Roman Struna
@RomchyFCC
@alanpaulprice i checked, i have the lastest version of chrome and it works fine, running windows 7 64x
Alan Price
@alanpaulprice
@RomchyFCC oh right. i'm using a mac, so maybe it's just the mac version that's playing up. thanks for the info! :+1:
CamperBot
@camperbot
alanpaulprice sends brownie points to @romchyfcc :sparkles: :thumbsup: :sparkles:
:cookie: 297 | @romchyfcc |http://www.freecodecamp.org/romchyfcc
Ghost
@ghost~5a4a80acd73408ce4f859755
Can anyone advise a good website to learn PHP from?
Roman Struna
@RomchyFCC
i had a similar issue with an input box, few days back, it would randomly disappear if someone using a mac would use that site, there are definitely some differences
and of course np, thx for the cookie nom nom
Ghost
@ghost~5a4a80acd73408ce4f859755
I was going to learn from w3schools but I've been told its not good