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
Chris Wang
@sound2gd

banner {

background-color: #722872 !important;
height: 80px;
border-color: #592059;
}
#banner {
    background-color: #722872 !important;
    height: 80px;
    border-color: #592059;
}
did someone have the same problem as me ?
Gary Siu
@GarySiu
css looks ok. What’s the html like?
Juan Moraza
@Morazajuan
@wearenotgroot Ok im gonna do that thank
CamperBot
@camperbot
morazajuan sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1267 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
greg
@wearenotgroot
@Morazajuan you can also add a callback function to the toggle method if you want to do some animation on the button or if you want something simple just an if statement and addClass/removeClass
Beth Qiang
@bethqiang

anyone know why when you click the "online" button and then the "all" button on my twitch viewer, the "offline" shows up for a split second before the "online" section does? ideally, i'd like a smooth transition without the offline users coming up briefly before the online...

http://codepen.io/bethqiang/pen/xOzJGr

Chris Rutherford
@cjrutherford
can I ask for an opinion on the design of a project I'm working on outside FCC?
Ken Haduch
@khaduch

@bethqiang - I don't know if this would help, I was experimenting with your project but had to reload and lost my changes. Any time your use a jQuery selector like $('#online'), it will search the DOM to find the element or elements that it corresponds to. I don't know enough detail about how jquery works to know if it does multi-threading, searching for both of those at the same time and perhaps sometime returning the "offline" first? I tried making a class "allUsers" and using that selector.

The other thing I was trying, when I had to reload and lost it, was to cache the results of the jquery selector and the use that - var allUsers = $("#online #offline"); I think would cache the results, not sure about the order, though? I'll try it and see, perhaps fork it so I can save it in case I need to reload.

Beth Qiang
@bethqiang
@khaduch if you do try it, let me know! i do actually have a container that contains all 3 of them ("streamers") but i've run into issues with trying to batch fadein/hide that--streamers is just the container that contains the online, offline, and closed containers, and so when you press "offline" then "all" it'll still only return the offline ones because the jquery isn't going through to get the info for the online ones when you press "all". does that make sense?
@khaduch it appears, though, if you wait a long enough time (not sure if there's a set time or not?), it'll fade in normally without the offline interfering with the online
does that mean that it's attached to the fadein? hm. (thinking out loud at this point.)
Ken Haduch
@khaduch
@bethqiang - just looking through jQuery documentation, and it appears to be the case that the ordering of elements is determined by their order in the DOM, so I'm trying to understand some possible solutions that they are hinting at...
Mariya
@mariyadiminsky
Has anyone does testing with react-enzyme-mocha? I'm noticing when I'm using expect(wrapper.find('SomeComponent').length).toEqual(1) I get 0 only if the component is being returned inside of brackets {}.
You know how when you're rendering an array and you loop through in the return() but to use JavaScript in React you need to use {}? I'm returning a component inside of each iteration, but my test can't find it. Is there a reason for this and how can I find it?
pipzpadilla
@pipzpadilla
blob
how i can make this kind of header navbar
with the brandname is at the center of the page
William Cross
@williamtech814
I'm trying to do lesson "Style Text Inputs as Form Controls" and I'm not sure what it means by "Give the text input in your form the class form-control." Advice anyone?
greg
@wearenotgroot

@williamtech814 form-control is a bootstrap class

<input class="form-control" type="text" />

William Cross
@williamtech814
That worked, thanks!! Love the community here.
greg
@wearenotgroot
:+1:
Juan Moraza
@Morazajuan
@wearenotgroot you still there?
Chris Cullen
@123xylem
function makeFriendlyDates(arr) {
  var arr0 =arr.pop();
 arr0= arr0.split(/-/);
  for(i=0;i<arr0.length;i++){
 switch (arr0[1]) {
    case 01:
        arr0[1] = "Janurary";
        break;
    case 02:
        arr0[1] = "February";
        break;
    case 03:
        arr0[1] = "March";
        break;

}}

  return arr0;
}
  makeFriendlyDates(['2016-01-01', '2016-02-04']);
Hello FIrends Im back!.. In this problem Ive seperated the date format and am gonna try using switch statements to convert the numbers to words.. It says "Octal literals are not allowed in strict mode." When i do this though... Is this workable or have I made a mistake somewhere??
thanks
Ken Haduch
@khaduch
@bethqiang - I cannot get anything that works up to this point - and I have to check out for tonight... Maybe you'll figure it out, maybe I'll try to look into it more tomorrow?
William Cross
@williamtech814
thanks @wearenotgroot
CamperBot
@camperbot
williamtech814 sends brownie points to @wearenotgroot :sparkles: :thumbsup: :sparkles:
:star2: 1274 | @wearenotgroot |http://www.freecodecamp.com/wearenotgroot
Nick Irvine
@irvin3
hey peeps! does anyone have a good method for vertically centering a button in bootstrap?
Beth Qiang
@bethqiang
@khaduch Haha no worries! No pressure to figure it out :) (although I would not complain if you wanted to keep trying! ;)) I'll definitely keep trying though and let you know if I come up with anything!
Chandice
@Cookcha
@irvin3 How are you trying to center it? Maybe this will help? http://stackoverflow.com/questions/9853815/how-to-center-btn-group-from-twitter-bootstrap
Sorin Ruse
@sorinr
@ajayt365 its because your h1 tag that has a margin-top. if you make h1{margin-top: 0px;} it will remove that margin
Vlad Fernandes
@Vlad-Fernandes
@irvin3 have you tried vertical-align
ertical-align: middle
vertical-align: middle
Chris Cullen
@123xylem
function makeFriendlyDates(arr) {
  var arr0 =arr.shift();//create first date
 arr0= arr0.split(/-/);
  for(i=0;i<arr0.length;i++){
 switch (arr0[1]) {
    case "01":
        arr0[1] = "Janurary";
        break;
    case "02":
        arr0[1] = "February";
        break;
    case "03":
        arr0[1] = "March";
        break;
    case "04":
       arr0[1] = "April";
        break;
    case "05":
        arr0[1] = "May";
        break;
    case "06":
        arr0[1] = "June";
        break;
    case "07":
       arr0[1] = "July";
     break;
   case "08":
     arr0[1] ="August";
     break;

   case "09":
     arr0[1] ="September";
     break;

   case "10":
     arr0[1] ="October";
     break;

   case "11":
     arr0[1] ="November";
     break;

   case "12":
     arr0[1] ="December";
     break;


}switch (arr0[2]) {
      case "01":
      case "21":
      case "31":
         arr0[2] =arr0[2]+ 'st';
    break;
      case "02":
      case "22":
         arr0[2] =arr0[2]+'nd';
    break;
      case "03":
      case "23":
         arr0[2] =arr0[2]+ 'rd';
    break;
      default:
         arr0[2] =arr0[2]+ 'th';
    break;
    }
  }

  return arr0;
}
  makeFriendlyDates(['2016-07-12', '2016-07-04']);
This coe is returning 12thththth for some reason.. I have a feeling its to do with the for loop running 3 times but Im not sure.. Any ideas?
Chris Cullen
@123xylem
function makeFriendlyDates(arr) {
  var arr0 =arr.shift();//create first date
 arr0= arr0.split(/-/);

  var arr1=arr.pop();//second date
  arr1=arr1.split(/-/);

  for(i=0;i<arr0.length;i++){ // Loop through Dates
 switch (arr0[1]) { //For each case convert them to months
    case "01":
        arr0[1] = "Janurary";
        break;
    case "02":
        arr0[1] = "February";
        break;
    case "03":
        arr0[1] = "March";
        break;
    case "04":
       arr0[1] = "April";
        break;
    case "05":
        arr0[1] = "May";
        break;
    case "06":
        arr0[1] = "June";
        break;
    case "07":
       arr0[1] = "July";
     break;
   case "08":
     arr0[1] ="August";
     break;

   case "09":
     arr0[1] ="September";
     break;

   case "10":
     arr0[1] ="October";
     break;

   case "11":
     arr0[1] ="November";
     break;

   case "12":
     arr0[1] ="December";
     break;


}switch (arr0[2]) { //Then for each day date convert to days
      case "01":
      case "21":
      case "31":
         arr0[2] =parseInt(arr0[2])+ 'st';
    break;
      case "02":
      case "22":
         arr0[2] =parseInt(arr0[2])+'nd';
    break;
      case "03":
      case "23":
         arr0[2] =parseInt(arr0[2])+ 'rd';
    break;
      default:                                 //With this default that adds "th"
         arr0[2] =parseInt(arr0[2])+ 'th';
    break;
    }            // FIRST DATES


    //Here starts THE SECOND DATEs Conversion------------------------------------------------------    

 switch (arr1[2]) {
    case "01":
        arr1[2] = "Janurary";
        break;
    case "02":
        arr1[2]= "February";
        break;
    case "03":
        arr1[2] = "March";
        break;
    case "04":
       arr1[2] = "April";
        break;
    case "05":
       arr1[2] = "May";
        break;
    case "06":
       arr1[2] = "June";
        break;
    case "07":
       arr1[2] = "July";
     break;
   case "08":
     arr1[2] ="August";
     break;

   case "09":
    arr1[2] ="September";
     break;

   case "10":
     arr1[2] ="October";
     break;

   case "11":
arr1[2] ="November";
     break;

   case "12":
     arr1[2] ="December";
     break;


}switch (arr1[2]) {
      case "01":
      case "21":
      case "31":
         arr1[2] =parseInt(arr1[2])+ 'st';
    break;
      case "02":
      case "22":
         arr1[2] =parseInt(arr1[2])+'nd';
    break;
      case "03":
      case "23":
         arr1[2] =parseInt(arr1[2])+ 'rd';
    break;
      default:
         arr1[2] =parseInt(arr1[2])+ 'th';
    break;
    }
  }

  return arr0 +" "+ arr1;
}
  makeFriendlyDates(['2016-07-12', '2016-07-02']);
Ok so Ive managed to get the dates converted but for some reason the second date tries becomes NaNth if its under 15.. I dont get it as both dates are coded the same
sorry I collapsed that when I copy pasted it
This message was deleted
Nick Irvine
@irvin3
Does anyone know how to remove what seems like a default margin on bootstrap buttons? I want my buttons to be touching, maybe I need to put them in a column but i feel like you should have to do that
@123xylem you should post that in the helpjavascript chat
Olga C
@Octopinky
@irvin3 do you have your codepen link?
Nick Irvine
@irvin3
im still messing around with getting the formatting correct
@Octopinky I was just wondering if there is a way to get rid of the space between the buttons, I checked the buttons and they dont have any margins tho
Olga C
@Octopinky
@irvin3 let me take a look
Olga C
@Octopinky
@irvin3 Got it! you can try adding a negative margin to .btn class to remove the spaces.