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
tadm123
@tadm123
$.getJSON("http://api.openweathermap.org/data/2.5/weather?lat=" + lat  + "&lon=" + long+"&appid=6a5aa3b59ebd571086cbd82be484ec8b", function(a){
    temp = a[0].main.temp.toString();
    hum = a[0].main.humidity.toString();
    press= a[0].main.pressure.toString();
    name = a[0].name;
    $("h1").html(temp);
 });
I already got my Lat and Long values using navigator
Jaime
@jmasked
I cant get my img’s to align center, any ideas?
Gulsvi
@gulsvi
@tadm123 If your codepen is loaded over https, you can't call an API over HTTP due to security restrictions. Also, it looks like a[0] isn't defined. Try a.main instead?
@jmasked It looks like you're hitting the same issue as everyone else. Codepen's quick add menu adds an alpha pre-release version of bootstrap4 now. Change your CSS to use bootstrap 3.https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
tadm123
@tadm123
@SkyCoder01 I tried it with a[0] and I'm getting the same problem
Gulsvi
@gulsvi
@tadm123 That's because a isn't an array, it's an object.
a[0] should be showing 'undefined' in your console
tadm123
@tadm123
its strange because i did it before in other pen and it worked, have a look at this https://codepen.io/tadm123/pen/YNvdyr
hm, so is there any way I can call an element of the object?
Sorin Ruse
@sorinr
@SkyCoder01 do you mean that both <div class="no-padding row"> and <div class="row no-padding"> are working the same in a bootstrap context?
Gulsvi
@gulsvi
@tadm123 The object you get back from the quotesondesign.com starts and ends with square brackets - that means it's an array. The weather API gives you an object that starts and ends with curly braces, it's a JSON object.
@sorinr Yes, they are for me because no-padding is in my css and loads after bootstrap (I think)
tadm123
@tadm123
ah I see
But why isn't it working when I'm calling treating it like an object and calling it like a.name?
typo
Sorin Ruse
@sorinr
@SkyCoder01 later today i'll try it myself. its 4:34am here and i'm tired like hell :) i'll pm u with what i find out
Gulsvi
@gulsvi
Thank you @sorinr :) and have a good rest!
CamperBot
@camperbot
skycoder01 sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1162 | @sorinr |http://www.freecodecamp.com/sorinr
Gulsvi
@gulsvi
@tadm123 Try a.main instead of a.name
Manuel Almeida
@netstudenton
what is the command to permite long loops ?
Sorin Ruse
@sorinr
@SkyCoder01 what bootstrap version are u using? in codepen i saw they changed to 4 alpha
Gulsvi
@gulsvi
Sorin Ruse
@sorinr
@SkyCoder01 think i was wrong. the problem its not comming from the row but from the col-xx-xx that has a 15px both L/R
Gulsvi
@gulsvi
I think row has 15px margin and column has 15px padding, similar idea if we use .no-margin {margin: 0} I think.
I need to memorize these things and get better, but now I don't know...maybe need to move on to bootstrap 4 :p
Gulsvi
@gulsvi
These are the paddings and margins to override:
  • containers: padding-right: 15px; padding-left: 15px;
  • rows: margin-right: -15px; margin-left: -15px;
  • columns: padding-right: 15px; padding-left: 15px;
Sorin Ruse
@sorinr
@SkyCoder01 yea. row have margins and col have padding. so thats why i said i was wrong applying padding:0 to the rows. have no effect on them as they are already 0 as padding
tadm123
@tadm123
yeah @SkyCoder01 , i'm still not getting anything, very bizarre
Jean Marco Romero
@volkranium
can someone tell me how to fit the main logo inside the nav bar? css: http://pastebin.com/m3HYGD97 html:http://pastebin.com/AhMf5K7F
tadm123
@tadm123
I think the problem is not getting the json object, I tried just putting a string "test" and it still won't show. So the structure of the code is seems to be offf
Sanford Banks
@sbanks77
im trying to put a background image on my page can anyone help
??
tadm123
@tadm123
put in your css background-image: url("http:...");
Sanford Banks
@sbanks77
i put that in my css but it still doesnt show in my html
@tadm123
Sanford Banks
@sbanks77
???
themixedcoder
@themixedcoder

// Initialize these three variables
var a;
var b;
var c;
var a=5;
var b=10;
var c= "I am a ";

// Do not change code below this line

a = a + 1;
b = b + 5;// Initialize these three variables
var a;
var b;
var c;
var a=5;
var b=10;
var c= "I am a ";

// Do not change code below this line

a = a + 1;
b = b + 5;
c = c + " String!";
c = c + " String!"; / i cant make c undefined please help /

js
tadm123
@tadm123
very strange, read here if you want more info
jampcat9
@jampcat9
I'm working on the personal portfolio page project, can anyone help me out? I'm trying to put two paragraphs side by side
Julius Robinson
@Julius-R
@jampcat9 either use float or flexbox
jampcat9
@jampcat9
I used float: right, for some reason it only moved it to the center of the page. no clue why
Julius Robinson
@Julius-R

I always use developer tools to see if there is any padding or margins from a child element. Also,

border: 2px solid #111;

That's perfect for showing all of your borders in css

jampcat9
@jampcat9
so showing the borders might help me see why it's not moving to the spot I want it to?
Julius Robinson
@Julius-R
Yes, it'll show you if there is some padding or margin from a close by element that was affected by the float