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
piteto
@piteto
similar to <p>
fefo360
@fefo360
you are right
piteto
@piteto
I'm guessing some might say that <p> is actually more appropriate in this case, search engines at least might have a better idea of what you're trying to do
fefo360
@fefo360
so people dont use br anymore?
piteto
@piteto
br is mainly for poems, addresses, etc. where you need to break in the middle of a text string
fefo360
@fefo360
yeah i felt wrong just trowing the text without wrapping it
piteto
@piteto
it's confusing because there are probably 100 different ways to do this :)
fefo360
@fefo360
yes i hate that part about coding :(
i can get stuff done but usually not in the best way
andoreilly
@andoreilly
Im trying to center an image on a page using bootstrap the code can be seen here ......... <img src="https://i.imgur.com/spMJmzj.jpg" alt="pic" class ="img-responsive center-block"> the <img> is inside my container but the image wont center under my nav bar any ideas why? any help would be much appreciated :)
roughnut
@roughnut
@andoreilly This comes from Stack Overflow. Remove “center-block” and put:
.img-responsive {
margin: 0 auto;
}
in your CSS
andoreilly
@andoreilly
thank you for your reply i saw that on SO but it did not work.When i go >inspect >click select element on page and hover my mouse to the right of the image there is around 400px of blank space
the wrapper div is centered in the container div but i need the image to be center in my wrapper div
sorry if im not explaing too well
Ken Haduch
@khaduch
@andoreilly - which bootstrap version are you using? img-responsive went away in Bootstrap V4, if you happen to be using that...
andoreilly
@andoreilly
Hi Ken. Oh really? i just c&p the Bootstrap CDN from the website about two hours ago so i guess the most recent!
im going to look more in the Docs
Ken Haduch
@khaduch
@BrianWilliams28 - you just need to put some optional whitespace characters in key places in your expression. You don't need any of the match.length or other testing that you are doing, if you get the expression to fully reflect all of the cases that they put in the tests. (This is re: :point_up: September 17, 2017 3:53 PM - I'm just getting back to the computer after a day away - perhaps you already have resolved all of this?)
@andoreilly - which version did you use, though? V3 or V4? They took img-responsive and made a lot of other changes in Bootstrap V4. There are equivalent new classes in V4. You can find more details in this document. The img-responsive change is at this link
andoreilly
@andoreilly
Thank you Ken worked 100%.
Alex
@cyberpunk1971
Hi all. I was wondering if someone could explain in more detail about global variables
var myGlobal = 10 Did I initialize or define that variable? I'm a little confused on that.
ok nvm, i just answered my own question
Alex
@cyberpunk1971
Can someone help me with a javascript question please?
Gersho
@Gersho
if it's within my knowledge$
Alex
@cyberpunk1971
is function(num) a thing in js?
Gersho
@Gersho
you mean anonymous functions ?
Alex
@cyberpunk1971
idk
i'm going through the lessons
the solution was easy, basically given to you, but I just want to know how it was arrived at
Gersho
@Gersho
you mean the fact that it's
function(arg){
//do things
}

instead of 
function myFunction(arg){
//do things
}
could you link the lesson please ?
or give it's name
Alex
@cyberpunk1971
sure hang on
Gersho
@Gersho
ok
so your question is about what part ?
this one ?
changed = change(10);
Alex
@cyberpunk1971
well first, is processed = processArg(7); a global variable?
or a variable at all?
that's the solution
Gersho
@Gersho
processed is a variable
processArg is a function (called with () )
Alex
@cyberpunk1971
ah ok, i just reallized that haha
Gersho
@Gersho
processed was declared on line 12, it's part of the main body of the script so yes it is a global variable
Alex
@cyberpunk1971
so, processed has already been assigned a variable is that correct
ok
it's value is 0, correct?
Gersho
@Gersho

the line evaluates as:
the variable processed is equal to the result of the function processArg when we give it an argument of 7

we then need to check what happens in the function

function processArg(num) {
  return (num + 3) / 5;
}
so the function return as result (7+3)/5