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
CamperBot
@camperbot
jdc101214 sends brownie points to @callumquick :sparkles: :thumbsup: :sparkles:
:cookie: 296 | @callumquick |http://www.freecodecamp.com/callumquick
Abhishek Kumar
@Mr-Kumar-Abhishek
@callumquick it worked :D thanks
CamperBot
@camperbot
mr-kumar-abhishek sends brownie points to @callumquick :sparkles: :thumbsup: :sparkles:
:warning: mr-kumar-abhishek already gave callumquick points
Jacob
@jdc101214
Ive tried so many times....
Callum Ward
@callumquick
@jdc101214 It does, it says it gets outputted to the little black box there, but it doesn't, right? But it still does get outputted in the Javascript developer console. Press CTRL-SHIFT-J while on the lesson and clear away the error messages, then ctrl-enter run your code again with some console.log()s, they show up in the console.
Jacob
@jdc101214
ok.
Let me try that
Callum Ward
@callumquick
@Mr-Kumar-Abhishek Welcome
Jacob
@jdc101214
function truncateString(str, num) {
  // Clear out that junk in your trunk
  var str1 = "";
  if(str.length > num){
  return str.slice(0, num - 3) + "...";
} if(str.length < num) {
  str1 = str.slice(0, num + num) + "...";
  return str1;
}
  if (num <= 3) {
    return str.slice(0, num + num) + "...";
  }
console.log(str1);

}

truncateString("Absolutley", 2);
Why is this not working?
Callum Ward
@callumquick
@jdc101214 Why str.slice(0, num + num)?
num+num will just return 2*num
Jacob
@jdc101214
right. I did that bec truncateString("A-", 1) should equal "A..." ANd that was how I got that to work.
Callum Ward
@callumquick
@jdc101214 Maybe you should remove all non-alphabetic characters with a RegExp test?
Actually no, sorry, that's not what you want
What you want is that if str.length<3 you just cut it to num long and tack "..." on the end
I.e. don't cut it to num-3 to squeeze in the extra "...", this is what the description says you should do if the string is shorter than 3 characters
Jacob
@jdc101214
Ok, I think Im completely confused about this challenge...
Callum Ward
@callumquick

Also, I don't understand what purpose

if (num <= 3) {
    return str.slice(0, num + num) + "...";
  }

is serving?

Jacob Jackson
@bearswamppastor

Can someone help me understand how to insert an image using bootstrap? <img src="test.jpg" style:"width:100%">

That is the code I'm using, but it only gets me a broken image and it's small and in the left hand corner of the screen.

Callum Ward
@callumquick
@bearswamppastor Which challenge?
@bearswamppastor Putting in the img is the same in bootstrap, bootstrap just offers classes to make it look prettier
@jdc101214 Maybe it is best if you comment out what you already have, and start again from scratch thinking about what you need to do
Jacob
@jdc101214
ok will do.
ok, i figured it out. thanks
@callumquick thanks
CamperBot
@camperbot
jdc101214 sends brownie points to @callumquick :sparkles: :thumbsup: :sparkles:
:warning: jdc101214 already gave callumquick points
Callum Ward
@callumquick
@jdc101214 No problem :)
Jacob Jackson
@bearswamppastor
@callumquick It's the first challenge that you do on your own without the guides. Making a tribute page.
Callum Ward
@callumquick
@bearswamppastor Ah ok, on codepen.io you have to make sure to include your own dependencies, have you added the bootsrap URL in the Settings>CSS part of the interface?
Jacob Jackson
@bearswamppastor
@callumquick Yes, I added bootstrap in the CSS settings.
@callumquick The image is on my computer. Does it need to be online?
Callum Ward
@callumquick
@bearswamppastor I think it does, for codepen to be able to access it
GabriRa
@GabriRa
Thanks @JLuboff
CamperBot
@camperbot
gabrira sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:cookie: 494 | @jluboff |http://www.freecodecamp.com/jluboff
Joshua
@jfc246
Jacob Jackson
@bearswamppastor
@callumquick So I would need the <a href="http://9430jfkldkjfg0..."> ?
eliecerthoms
@eliecerthoms
anybody here know how to make those menus that get fixed to the top of the screen when you scroll past them?
not like bootstrap's .navbar-fixed that is fixed from the beginning, but one that has a static position, following the flow of the page, but before it is about to leave the viewport it gets fixed to the top of the screen
Callum Ward
@callumquick
@bearswamppastor Yep, a web link of some kind, then it should be able to find it
@eliecerthoms Perhaps it is done using a check for scroll height and then transitioning the bar from an in-page element to a navbar-fixed?
eliecerthoms
@eliecerthoms
@callumquick interesting, gonna try that
Walid Ashri
@walidashri
@eliecerthoms check this
eliecerthoms
@eliecerthoms
@walidashri lol, was trying to implement exactly that one, but whenever I start dealing with position: absoluteon the menu bar, it breaks completely
Walid Ashri
@walidashri
@eliecerthoms you work in codepen?
eliecerthoms
@eliecerthoms
@walidashri no, working with a templating engine, but let me see if I can set it up there
Sam Griffen
@ssgriffen
Can anyone help me on how I would access the first "extract" key in this JSON data? https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts%7Cinfo&titles=Harry+Potter%7CEragon&exsentences=1&exlimit=10&exintro=1&explaintext=1&inprop=url I'm working on the wiki viewer project...