## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Jun 19 20:09
@krisb1220 banned @Gastony
• May 14 22:39
• May 14 22:38
@bjorno43 banned @real-action
• Feb 01 00:27
@bjorno43 banned @Ndoua
• Jan 07 03:10
@bjorno43 banned @doctor-sam
• Aug 17 2019 09:32
• Jun 20 2019 21:19
@bjorno43 banned @shenerd140
• Apr 25 2019 17:13
@mstellaluna banned @cmal
• Jan 08 2019 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
Pat
@PatrickMoumiet
hi everyone, need help on a exercice, it seems to work when i test but i see any validation from the validation button so they might be errors that i can see. Its the exercice about capitalizing the first letter of each words. Here the code. Any advice ?
function titleCase(str) {

var sel = str.toLowerCase().split(" ");
var res = [];

for ( var i = 0 ; i < sel.length ; i++) {

res += sel[i][0].toUpperCase()+sel[i].slice(1)+ " ";

}

res = res.replace(/\sthe\s/gi, " THE ");
res = res.replace(/\sof\s/gi, " OF ");

return res;

}

titleCase("I'm a little tea pot");
resultt here // " I'm A Little Tea Pot"
Chris
@bestintown23
How can i make my slideshow images smaller. i tried a couple of methods but nothing seems to be working. https://codepen.io/bestintown23/pen/xYjbxd
the fbi agent watching you
@bestintown23 Put a DIV around the images then add this in CSS: .DIVNAME img {
height: /height of your image/; }
that will change the images' size inside that div
If that's not working there's another element making it off. A trick to try then is adding !important after the width/height (e.g. width: 50% !important) so it cancels those out. changing the background colors of your divs will also help you figure out what is changing what on the page.
Eric Weiss
@eweiss17
@PatrickMoumiet what is the problem
@ezioda004
@PatrickMoumiet Thats because of " " being added to the string at the end, you can remove that by using .trim() method on res and it should work, also even though your code will work the res should be declared as an empty string rather than an empty array.
@abohannon
Cant anyone help me understand this quirk of flexbox? I have a child div that is responsive, with a max-width of 600px. I'm trying to create a two column layout and have the layout shrink until a specified width then stack. However, when I put display: flex on the container, the responsiveness of my child divs isn't obeyed.
QUick mp4 showing what I mean
gah, gitter makes you DL, lemme see if I can gif
LydaTech
@lydatech
@bestintown23 you need to style your img. Remove the inline styles and attributes
@abohannon its better to see the code working. Put it in codepen
@krennical_twitter dotn use !important it's rarely if ever needed
Pat
@PatrickMoumiet
@ezioda004 thank you ! i validate ^^
CamperBot
@camperbot
patrickmoumiet sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
Gulsvi
@gulsvi
@abohannon It's hard to tell why it's giving you that behavior. This is one way to stack columns with flexbox: https://s.codepen.io/anon/pen/QQPEpZ
@abohannon
@gulsvi the styles are all within multiple react components, so it would be a lot of effort to compile all that in a codepen at the moment. But I appreciate your example, that's exactly what I'm looking to do, but for some reason, the child div when it is placed inside a flex container, loses it's responsiveness and it's parent only resizes to the child's max-width property.
@abohannon
I figured it out for anyone who might find it helpful. Had to explicitly set a min-width property on the column container.
Nate Mallison
@NJM8
anyone have experience with images on github pages? I have read that you are supposed to supply the image url with the url to the image file (github/image/whatever), but I have a site that just has it in the project directory and it works fine. Well I have another page with the same structure and the image doesn't load.
Eric Weiss
@eweiss17
recheck you have the right directory
Nate Mallison
@NJM8
No, I mean I have a page loading the image with no path specified and it works, but you aren't supposed to be able to do that on github pages. I can't figure out how to do it again
Gulsvi
@gulsvi
@NJM8 It's hard to help without more details. The image needs to be in a gh-pages branch or a subdirectory of your <username>.github.io repository
Otherwise, you can use rawgit to get a hostable link to the file: https://rawgit.com/
Sometimes, it just takes a while for the image to propagate - in my experience though, never more than 10 minutes or so
Images can't load without a path specified, but happy to take a closer look if you want to point to the repo
Nate Mallison
@NJM8
Check out the image source for the background in the css
in the random quote generator I have the image src just as the image name, because it's in the same directory, same as normal hosting
but in the thank you page I have to specify the whole url, it wouldn't work with just the name
Nate Mallison
@NJM8
ahhhhhhh myyyyy gooood. On my portfolio page I made the email link a mailto: link until I got an email form working. I keep loading the wrong version of the website and opening mac mail. I should just delete that app
Eric Weiss
@eweiss17
i'v done mailing in php
Nate Mallison
@NJM8
I used a mailing service. no php on github pages
HerbiScript
@HerbiScript
'''
$(document).ready(function(){ var url = "https://fcc-weather-api.glitch.me/api/current?"; var api; if (navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(pos){ api = url + "lat=" + pos.coords.latitude + "&" + "lon=" + pos.coords.longitude;$.getJSON(api, (function(data){
$("#loc").html(data.name + ", " + data.sys.country);$("#temp").html(data.main.temp + "<button id='C' class='btn btn-default'><b>C</b></button>");
$("img").attr("src", "http://openweathermap.org/img/w/" + setIcon(data.weather[0].id) + ".png"); function setIcon(num){ if (200 <= num && num <= 232){ return "11d"; } else if ((300 <= num && num <= 321) || (520 <= num && num <= 531)){ return "09d"; } else if (500 <= num && num <= 504){ return "10d"; } else if (num == 511 || 600 <= num && num <= 622){ return "13d"; } else if (num == 800){ return "01d"; } else if (num == 801){ return "02d"; } else if (num == 802){ return "03d"; } else if (num == 803 || num == 804){ return "04d"; } else { return "01d"; } } })); }); }$(".btn").css("color", "orange");
});
'''
CamperBot
@camperbot
:bulb: to format code use backticks!  more info
HerbiScript
@HerbiScript
$(document).ready(function(){ var url = "https://fcc-weather-api.glitch.me/api/current?"; var api; if (navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(pos){ api = url + "lat=" + pos.coords.latitude + "&" + "lon=" + pos.coords.longitude;$.getJSON(api, (function(data){
$("#loc").html(data.name + ", " + data.sys.country);$("#temp").html(data.main.temp + "<button id='C' class='btn btn-default'><b>C</b></button>");
$("img").attr("src", "http://openweathermap.org/img/w/" + setIcon(data.weather[0].id) + ".png"); function setIcon(num){ if (200 <= num && num <= 232){ return "11d"; } else if ((300 <= num && num <= 321) || (520 <= num && num <= 531)){ return "09d"; } else if (500 <= num && num <= 504){ return "10d"; } else if (num == 511 || 600 <= num && num <= 622){ return "13d"; } else if (num == 800){ return "01d"; } else if (num == 801){ return "02d"; } else if (num == 802){ return "03d"; } else if (num == 803 || num == 804){ return "04d"; } else { return "01d"; } } })); }); }$(".btn").css("color", "orange");
});`
Why is my final jQuery statement not effecting the button after it is created in the initial function?
Nate Mallison
@NJM8
@HerbiScript backticks not single quotes, probably the tilde button, top left corner of keyboard
ah got it
HerbiScript
@HerbiScript