These are chat archives for FreeCodeCamp/HelpFrontEnd

24th
Dec 2017
Ken Haduch
@khaduch
Dec 24 2017 03:04
@0nly169 - did you fix your problem? That does work to add a margin-top on paragraphs with the class <p class="paragraph3">some content</p> when the screen width is greater than 800px. The value that you have in there is 8% but you can adjust that. Just make sure that you put the class that you've created on the paragraphs. If you just want it to apply to all paragraphs, then instead of using a CSS selector of .paragraph3, just use p.
imemoje
@imemoje
Dec 24 2017 03:09
@khaduch can you help me
Ken Haduch
@khaduch
Dec 24 2017 03:13
@imemoje - what are you trying to do? Is it the question of the overflow? Or something else?
imemoje
@imemoje
Dec 24 2017 03:13
yes
overflow
example above
imemoje
@imemoje
Dec 24 2017 03:16
i do not understand how overflow works in this example and why it show elements when is set to auto? i tought that overflow is for something else.
Ken Haduch
@khaduch
Dec 24 2017 03:17
@imemoje The coloring of the first icon is accomplished by the .active CSS selector and the fact that the CSS class is assigned to the "home" element. So that is how the background-color is set.
imemoje
@imemoje
Dec 24 2017 03:17
and if i remove that line it does not work and width that line it shows all like it should
Ken Haduch
@khaduch
Dec 24 2017 03:19

@imemoje - the article that @toianw posted has this paragraph in it:

The Overflow Method relies on setting the overflow CSS property on a parent element. If this property is set to auto or hidden on the parent element, the parent will expand to contain the floats, effectively clearing it for succeeding elements. This method can be beautifully semantic as it may not require an additional elements. However if you find yourself adding a new div just to apply this, it is equally as non-semantic as the empty div method and less adaptable. Also bear in mind that the overflow property isn't specifically for clearing floats. Be careful not to hide content or trigger unwanted scrollbars.

With that property on the <div> parent element, as the paragraph says it will expand to contain all the floats. If it isn't there, then they are all collapsed to the left, so they are there but just hidden behind the first one.
@toianw - thanks for posting that link, by the way
CamperBot
@camperbot
Dec 24 2017 03:20
khaduch sends brownie points to @toianw :sparkles: :thumbsup: :sparkles:
:cookie: 501 | @toianw |http://www.freecodecamp.org/toianw
imemoje
@imemoje
Dec 24 2017 03:21
it will expand to contain all the floats?
what will expend ?
Ken Haduch
@khaduch
Dec 24 2017 03:22
@imemoje - as you see, if you remove that property, then all of the floats / icons are collapsed to the left. The parent div is what expands. The <div class="icon-bar"> in your code.
The overflow:auto; is a property of the class .icon-bar
imemoje
@imemoje
Dec 24 2017 03:24
uhhh it is maybe it is to complicated to me
let try this way
i am at the point where all a links are vertically
and now i want to make them horizontally
i do the float left to make them in one line, to glow right of first icon
i get that
and now i do not see them all, just the first element first icon
they do not have height ok i get that also
but first why all of them are not visible just first icon is
that is first thing that i do not understand
imemoje
@imemoje
Dec 24 2017 03:31
why they all are collapsed on one icon?
isnt they supposed to be one next to other one?why all collapse in one?
5 icon in 1 why?
Ken Haduch
@khaduch
Dec 24 2017 03:41
@imemoje - all I can say is that "floats" do strange things on a page. I try to avoid them as much as possible! In a case like this, I would use the formulaic approach that they outline on the page, all of the information about "clearing" floats seems like magic to me. I would take what works and use it. It would be good to understand it all in gory detail. You can read this article to learn more about floats...
imemoje
@imemoje
Dec 24 2017 03:43
what approach would you use? what is formulaic approach?
Ken Haduch
@khaduch
Dec 24 2017 03:46
@imemoje - exactly what they showed in this article, the thing that works in your example - use overflow: auto on the parent div...
but you are making me read more of the articles on float because I'm lacking in knowledge on this area... :)
imemoje
@imemoje
Dec 24 2017 03:47
ok sory please
i hate float
with all my heart
i hate things that can be done in 15 ways
i hate things that are undefined and unclear
that hang in air
i hate things that are left to interpretation
and i hate things where there is no best way to do that thing
i hate float
Ken Haduch
@khaduch
Dec 24 2017 03:52
@imemoje - well, take a look at this article: https://www.sitepoint.com/simple-clearing-of-floats/ - part of the way down there, the author describes a "revelation" about the overflow: auto; property on the parent being the way to do this... reading through it seems that there were many idea of how to accomplish this objective, but that method was a "surprise" to the author. The explanation is somewhat short on technical detail of why it works, see if you think that it seems that way to you?
imemoje
@imemoje
Dec 24 2017 03:53
ok i will
thank you @khaduch
CamperBot
@camperbot
Dec 24 2017 03:53
imemoje sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3621 | @khaduch |http://www.freecodecamp.org/khaduch
Hills
@Hillsie
Dec 24 2017 04:18
Hello, can anyone advise me on how to do a screen grab? I want to be able to screen grab inside my project before posting to social media so that I capture a portion of the page in an image.
Nick Karnik
@theoutlander
Dec 24 2017 04:37
which OS are you on
Tom
@moT01
Dec 24 2017 04:38
@imemoje that's a nice little poem there
Ian
@toianw
Dec 24 2017 04:41
@imemoje It works because setting overflow to any value other than visible (the default value) creates a new block formatting context. A block formatting context contains everything inside of the element creating it (including floats).
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context?redirectlocale=en-US&redirectslug=Web%2FCSS%2FBlock_formatting_context
https://www.smashingmagazine.com/2017/12/understanding-css-layout-block-formatting-context/
If you don't like using floats try with flexbox instead.
Ian
@toianw
Dec 24 2017 04:54
@imemoje The icons are not collapsed without 'overflow: auto'. It's just (I'm guessing) they are white icons against a white background. Try setting a background-color on the .icon-bar a elements to confirm this. You can see the first one only because it has a background set on the .active class. Without changing the overflow property on the parent it has no height, so you don't get the background color you expected.
frederickalcantara
@frederickalcantara
Dec 24 2017 04:56
I need some help with a jest test case
Bigyan Karki
@bigyankarki
Dec 24 2017 05:18
hi everyone. can anyone help me change the color tab pills in bootstrap 4
default is blue. but i want to be same as background color.
Ken Haduch
@khaduch
Dec 24 2017 05:19
@toianw - good articles :point_up: December 23, 2017 11:41 PM
@bigyankarki - sure - do you have a URL for your project?
Bigyan Karki
@bigyankarki
Dec 24 2017 05:20
umm just hold on. i will copy the whole html code
```
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bigyan Karki</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="css/style.css">
  <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script>
  <script src="js/jquery.min.js"></script>
  <script src="js/bootstrap.min.js"></script>
</head>
<body>
  <nav class="navbar navbar-expand-md bg-dark navbar-dark">
    <div class="container">
    <a class="navbar-brand" href="#">BIGYAN KARKI</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="collapsibleNavbar">
      <ul class="navbar-nav nav nav-pills ml-auto">
        <li class="nav-item">
          <a class="nav-link"  data-toggle="pill" href="#home">ABOUT</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" data-toggle="pill" href="#menu1">CV</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" data-toggle="pill" href="#menu2">PROJECTS</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" data-toggle="pill" href="#">CONTACT</a>
        </li>
      </ul>
    </div>
  </div>
  </nav>
  <br>

  <div class="tab-content">
    <div id="home" class="container tab-pane fade show active"><br>
      <h3>HOME</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </div>
    <div id="menu1" class="container tab-pane fade"><br>
      <h3>Menu 1</h3>
      <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
    <div id="menu2" class="container tab-pane fade"><br>
      <h3>Menu 2</h3>
      <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.</p>
    </div>
  </div>

</body>
</html>
Ken Haduch
@khaduch
Dec 24 2017 05:21
if you just do a .nav-pills { background-color: red; } what happens? (As an example.)
Bigyan Karki
@bigyankarki
Dec 24 2017 05:22
whole nav ul section turns red
Shubham Sharma
@shubham1604
Dec 24 2017 05:23
Hey guys I need help on the random quotes quotesdesign api
Ken Haduch
@khaduch
Dec 24 2017 05:23
@bigyankarki - so do you just want the active one to be a different color?
Bigyan Karki
@bigyankarki
Dec 24 2017 05:23
umm @khaduch yes
currently active links are shown blue by default.
Shubham Sharma
@shubham1604
Dec 24 2017 05:24
when I use http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1 , no cross domain issues occur but when i Use http://quotesondesign.com/wp-json/posts?filter[orderby]=rand cross domain issues occur. Whats the difference between the two
?
Ken Haduch
@khaduch
Dec 24 2017 05:25
@bigyankarki - try .nav-link.active { background-color: red; }
nah, that didn't work...
Bigyan Karki
@bigyankarki
Dec 24 2017 05:26
haha yup it didnt :D
Ken Haduch
@khaduch
Dec 24 2017 05:26
@bigyankarki - I think this is it:
.nav-pills .nav-link.active {
  background-color: red;
}
Bigyan Karki
@bigyankarki
Dec 24 2017 05:27
magic!!
@khaduch thank you so much :)
CamperBot
@camperbot
Dec 24 2017 05:27
bigyankarki sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3622 | @khaduch |http://www.freecodecamp.org/khaduch
Ken Haduch
@khaduch
Dec 24 2017 05:28
@bigyankarki - I just misread the devtools panel... :) good that it worked!
Bigyan Karki
@bigyankarki
Dec 24 2017 05:28
haha. I just cant understand CSS sometimes.
Ken Haduch
@khaduch
Dec 24 2017 05:30
@bigyankarki - it's a struggle. The way that I try to figure these out is to put the page up in the browser, hover over the element of interest and right click and "Inspect Element" (or whatever gets you into the devtools.) then look at the CSS styles that are being applied. You can usually just copy the selector and make the changes that you want.
Bigyan Karki
@bigyankarki
Dec 24 2017 05:30
oh wow never knew that
thanks @khaduch :)
CamperBot
@camperbot
Dec 24 2017 05:30
bigyankarki sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
api offline
Ken Haduch
@khaduch
Dec 24 2017 05:40

@shubham1604 - I got both of them to work, apparently without problem. Using CodePen, you have to use https:// for the URL transport. This worked:

$.ajax( {
      // url: 'https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1',
      url: 'https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1',
      success: function(data) {
        var post = data.shift(); // The data is an array of posts. Grab the first one.
        $('#quote-title').text(post.title);
        $('#quote-content').html(post.content);

        // If the Source is available, use it. Otherwise hide it.
        if (typeof post.custom_meta !== 'undefined' && typeof post.custom_meta.Source !== 'undefined') {
          $('#quote-source').html('Source:' + post.custom_meta.Source);
        } else {
          $('#quote-source').text('');
        }
      },
      cache: false
    });

You have to use your own ID values for HTML elements to post the information. I copied part of the example from https://quotesondesign.com/api-v4-0/

Shubham Sharma
@shubham1604
Dec 24 2017 05:48
I am using localhost. I changed it to https and it worked. But it gives ne the same quote on every click. I want a different one each time.
Can anyone help me?
@khaduch
Ken Haduch
@khaduch
Dec 24 2017 05:49

The HTML for this previous example, with no styling looks like this:

<button id="get-another-quote-button">get quote</button>
<div id="quote-content"></div>
<div id="quote-source"></div>

Do you see the cache: false property set on that $.ajax request? @shubham1604 - try that, turn off caching.

@shubham1604 - see the comment ^^^
@shubham1604 - I think that if you're using $.getJSON, before you make that call, you can try $.ajaxSetup({cache: false}); to disable caching...
khaduch @khaduch - signing off for the night... happy coding!
Shubham Sharma
@shubham1604
Dec 24 2017 05:56
@khaduch You are a genius
That solved my problem
Thanks
Francisco Franco
@frenktico
Dec 24 2017 07:27
Good night people! :D
I'm back to the coding life
Working early morning from Brazil :green_heart: :yellow_heart:
Francisco Franco
@frenktico
Dec 24 2017 07:34
Merry Xmas
1rjun
@1rjun
Dec 24 2017 08:40
@1rjun
hey there is one problem in my webpage
there is horizontal scroll in my webpage
when i open it in my mobile
how could i remove the horizontal scroll from my webpage
???
i want to make webpage responsive in every device
Adole Samuel
@int-elligentSam
Dec 24 2017 08:42
@1rjun use bootstrap framework
1rjun
@1rjun
Dec 24 2017 08:42
@int-elligentSam i used viewport
but nothing works
let me show you the codepen
and try to see it by minimizing the size of the window
and there is the horizontal scroll,but i dont want it ,i want this page to work fine on every device ,and make it responsive
Linus
@nusli
Dec 24 2017 08:45
@1rjun you have to make the .quote width responsive; use vw or % instead of px
1rjun
@1rjun
Dec 24 2017 08:46
so if i want to make a responsive webpage then i should avoid px?
Linus
@nusli
Dec 24 2017 08:48
@1rjun yes or you could use media queries and change the value at different break points
but this would cause you to write a lot of css which you should avoid
Adole Samuel
@int-elligentSam
Dec 24 2017 08:48
@1rjun check out bootstrap media queries
1rjun
@1rjun
Dec 24 2017 08:49
Thanx bro @nusli i had made it :D
and now its looking good in every width or height ,cool
Linus
@nusli
Dec 24 2017 08:54
@1rjun btw using % on height doesn't work as you intend it to in this case
for % to apply on height the parent element has to have a specified height value
adding height: 100%; or height: 100vh; to the body will fix it @1rjun
Sorin Ruse
@sorinr
Dec 24 2017 08:57
@1rjun think its time to move on and use an api for retrieving your quotes :)
SakisBal
@SakisBal
Dec 24 2017 09:01
so im at this challenge where i output the right answers but for some reason it says they are wrong :P its weird
can i post the code and the challenge?
Sorin Ruse
@sorinr
Dec 24 2017 09:03
@SakisBal go ask. if we can help we help :)
SakisBal
@SakisBal
Dec 24 2017 09:03
so this is the code

function search(arr,item){
for(i=0;i<arr.length;i++){
if (arr[i]==item){
return i;
}
}
}
function myReplace(str, before, after) {
newstring=str.split(' ');
thesi=search(newstring,before);
newstring[thesi]=after;
newstring=newstring.join(' ');
console.log(newstring);
return newstring;
}

myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");

its the search and replace problem
it outputs the right code to the console
but it doesnt accept it as the right answer
Linus
@nusli
Dec 24 2017 09:09
@SakisBal I think the problem lies here:
NOTE: Preserve the case of the original word when you are replacing it. For example if you mean to replace the word "Book" with the word "dog", it should be replaced as "Dog"
SakisBal
@SakisBal
Dec 24 2017 09:09
oh didnt see this note
tnx @nusli
Sorin Ruse
@sorinr
Dec 24 2017 09:12
@nusli :+1:
ProMan
@ProMan987
Dec 24 2017 09:50
Hello
anyone here?
Sorin Ruse
@sorinr
Dec 24 2017 10:00
yep
ProMan
@ProMan987
Dec 24 2017 10:00
hey sup man
Ghost
@ghost~56bd2077e610378809c105cd
Dec 24 2017 11:46
hello and good morning.. Is there anyone around that's really good with javascript? I could use an extra set of eyes on my tic tac toe project.
1rjun
@1rjun
Dec 24 2017 12:20
hlo friends i am got stuck on the div concept
pls help me
i want to place the content text on the right side of the image
i created a div inside a div
if you open this in full screen then you will get to know there is space on right side of the image
i want to put the text on that side
Shinichi_Kudo
@Krato5
Dec 24 2017 12:27
@Rogue00 u can contact @AryanJ-NYC he have know about tic tac toe i was visit his repo
Ghost
@ghost~56bd2077e610378809c105cd
Dec 24 2017 12:29
thanks @Krato5
CamperBot
@camperbot
Dec 24 2017 12:29
rogue00 sends brownie points to @krato5 :sparkles: :thumbsup: :sparkles:
:cookie: 5 | @krato5 |http://www.freecodecamp.org/krato5
Shinichi_Kudo
@Krato5
Dec 24 2017 12:35
:)
primuscovenant
@primuscovenant
Dec 24 2017 13:08
@heroiczero thx
CamperBot
@camperbot
Dec 24 2017 13:08
primuscovenant sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 2115 | @heroiczero |http://www.freecodecamp.org/heroiczero
Sorin Ruse
@sorinr
Dec 24 2017 13:13
@1rjun here how you can do it
IvanKuzaev
@IvanKuzaev
Dec 24 2017 13:44
Hello!
BuntyBru
@BuntyBru
Dec 24 2017 14:07
any one using mozilla firefox browser?
?
?
Sorin Ruse
@sorinr
Dec 24 2017 14:39
@BuntyBru yep. whats the problem?
Jigal Sanders
@sandersjj
Dec 24 2017 14:40
Hello Everyone. I am working on the weatherapp challenge. I am using the openweathermap API. I am doing two call's one to get the current weather and one to get the corresponding weather Icon. The first fetch goes without any problems. However the second fetch gives some CORS errors. I have tried a few things to get around but so far I didn't get it working. Sl
So here is my codepen: https://codepen.io/dubbeltje/pen/NXRXZq?editors=0010. Would appreciate some help. Thanks
Sorin Ruse
@sorinr
Dec 24 2017 14:45
@sandersjj take a look in your js code how do you call your getData(); function and imagine what happens on document ready
SakisBal
@SakisBal
Dec 24 2017 14:46
@sorinr i need some help as well
i got a question
Jigal Sanders
@sandersjj
Dec 24 2017 14:46
@sorinr I realized I called the getData function twice. One within the document reawdy and one outside. I removed the one outside the document ready. However this doesn't solve the issue
SakisBal
@SakisBal
Dec 24 2017 14:47
image.png
are these empty cells objects?
Markus Kiili
@Masd925
Dec 24 2017 14:47
@SakisBal Empty cells?
Jigal Sanders
@sandersjj
Dec 24 2017 14:48
@SakisBal some are empty array objects
SakisBal
@SakisBal
Dec 24 2017 14:49
when i call .length to these arrays i get back 0 while when i press on them on the console they seem to have things inside them
Markus Kiili
@Masd925
Dec 24 2017 14:50
@SakisBal Only numeric property keys affect length.
Sorin Ruse
@sorinr
Dec 24 2017 14:51
@sandersjj you defined your function as: function getData(units){....} so the function expects some "units" to be passed in. where do u do that?
SakisBal
@SakisBal
Dec 24 2017 14:51
its weird that i push numbers inside this array but it returns an array object...
IvanKuzaev
@IvanKuzaev
Dec 24 2017 14:52
@sandersjj You'd better use https://ipinfo.io/json instead of geolocation, look at my example https://codepen.io/Ivan041/pen/qPLJbe
Jigal Sanders
@sandersjj
Dec 24 2017 14:53
@sorinr Thanks for thinking with me. If you look inside the getData Function you see a fallback in case the parameter is empty. Also I solved my second fetch problem. It wasn't necessary anymore. I made it way to complicated.
CamperBot
@camperbot
Dec 24 2017 14:53
sandersjj sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1376 | @sorinr |http://www.freecodecamp.org/sorinr
Sorin Ruse
@sorinr
Dec 24 2017 14:54
@IvanKuzaev i would use ip location only as a fallback to geolocation if the user blocks the reveal of his location but the ip location is not very accurate
@sandersjj :+1: know its working for me and it shows the right weather and the right location. maybe you should work a little on design(css) part
Jigal Sanders
@sandersjj
Dec 24 2017 14:59
@sorinr I know. First I wanted to get the logic working. Now the Css part. Which I don't find hard. The hardest part is designing something which satisfies me ;-)
Sorin Ruse
@sorinr
Dec 24 2017 15:12
@IvanKuzaev why all that countries array if the api returns country 2digits code and you can make a call to countries api to find the full name ?
Sulkhan Abashidze
@sulkhaniaba
Dec 24 2017 15:20
Hi, can you guys please help me. how can i make a share button?
i'm working now on random quote project.
Jigal Sanders
@sandersjj
Dec 24 2017 15:21
@sulkhaniaba it's actually very easy. Here you will find some example codes https://dev.twitter.com/web/tweet-button
SakisBal
@SakisBal
Dec 24 2017 15:21
you use <a href="the url of the website you want"><an element></a> its called a hyperlink and you wrap it around any element you want
IvanKuzaev
@IvanKuzaev
Dec 24 2017 15:39
@sorinr You are right. I now use https://freegeoip.net/json/, it's geoccordinates, country and city name and IP in one package. :)
Sorin Ruse
@sorinr
Dec 24 2017 15:39
@IvanKuzaev :+1: two in one
Sulkhan Abashidze
@sulkhaniaba
Dec 24 2017 15:42
@SakisBal how can i take a content of website to sheare
SakisBal
@SakisBal
Dec 24 2017 15:43
so want you want to do is press a button and make the user move from your website to that website right?
Sulkhan Abashidze
@sulkhaniaba
Dec 24 2017 15:44
not realy
not like, <a href = 'www.site.com'>
SakisBal
@SakisBal
Dec 24 2017 15:46
it depends on the content you want to take
Sulkhan Abashidze
@sulkhaniaba
Dec 24 2017 15:47
https://codepen.io/freeCodeCamp/full/ONjoLe i'm trying to do like this page
SakisBal
@SakisBal
Dec 24 2017 15:48
he probably stored a list of quotes in an array and iterates through the array showing the content on his project
he doesnt directly take the content (probably)
he used api actually he takes the stuff directly from a website but you dont have to do that
BuntyBru
@BuntyBru
Dec 24 2017 15:51
@sorinr
could you just try running
console.log(name); in your mozilla console
do not define the variable "name"
just do
console.log(name);
Riadh
@KWFE
Dec 24 2017 16:02
hey
Sorin Ruse
@sorinr
Dec 24 2017 16:21
@BuntyBru can u reshare the pen link
Shubham Sharma
@shubham1604
Dec 24 2017 17:21
He guys
anyone up?
I need a bit of help
Hey*
Nick Karnik
@theoutlander
Dec 24 2017 17:27
what do you need
Shubham Sharma
@shubham1604
Dec 24 2017 17:29
So, I am working on the random quote machine and I need to align my quote box at the center of the page
I came across flex box model
but that centers the flex items in the dlex container
but I want to align them at the center of the page not any container
So, how do i do that?
I also want to ask if making body tag a flex container a right way to do this?
Nick Karnik
@theoutlander
Dec 24 2017 17:33
ok
See if you can learn from here https://philipwalton.github.io/solved-by-flexbox/
Anshul Adlakha
@anshuladlakha
Dec 24 2017 17:34
does anyone here has any experience with the reddit API?
Nick Karnik
@theoutlander
Dec 24 2017 17:34
tbis one specifically
@anshuladlakha not really, but what do u need
Anshul Adlakha
@anshuladlakha
Dec 24 2017 17:37
having some trouble fetching posts from a subreddit. I wanna get the first 100 posts and I'm using the correct link but I'm getting only the first 28 posts.
Nick Karnik
@theoutlander
Dec 24 2017 17:53
do you know if that channel has 100 posts ?
post some code here
Anshul Adlakha
@anshuladlakha
Dec 24 2017 17:54
nevermind I got it now. thanks anyways.
Nick Karnik
@theoutlander
Dec 24 2017 17:55
how did you fix it ?
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 24 2017 18:02
Hi does anyone here know haml and html?
SakisBal
@SakisBal
Dec 24 2017 18:21
ask the question we might be able to help
Danish Gujjar
@Dani-0-7
Dec 24 2017 18:22
hey
image.png
image.png
Danish Gujjar
@Dani-0-7
Dec 24 2017 18:22
little help
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 24 2017 18:23
@Dani-0-7 You need to give the input in your form the class of form-control
DecisiveIndecisive
@DecisiveIndecisive
Dec 24 2017 18:24

Hey guys, I'm having a weird issue with targeting info in a JSON response. Function in question is getWeather()

https://codepen.io/DecisiveIndecisive/pen/NXReLK?editors=0011

Danish Gujjar
@Dani-0-7
Dec 24 2017 18:24
@CherryPlaysRoblox1 yeah done
Thanks anyway
DecisiveIndecisive
@DecisiveIndecisive
Dec 24 2017 18:25
I'm using the exact same method to get data from the other JSON response (variable weatherSearch), I dont uderstand why its' not working here
SakisBal
@SakisBal
Dec 24 2017 18:27
the problem is you are trying to do an XML response while you are trying to get a json thing
DecisiveIndecisive
@DecisiveIndecisive
Dec 24 2017 18:27
The only place I do a XMLHttpRequest is to get the image, I'm referring to the getWeather function
Unless I'm mistaken
I don't know what I changed, but It's working correctly now, genuinely dont think I changed anything, just messed around with the order and put it back...
EDIT: OOOOOOH, I was outputting the JSON before it could run, this makes sense
Darren
@DarrenfJ
Dec 24 2017 18:56
@DecisiveIndecisive it's always nice when you solve it yerself
virtual high five :D
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 24 2017 19:43
Can soemone help me here
Chrislino
@Chrislino
Dec 24 2017 21:01
hello world...
i'm so new here... winks
i guess this is a very nice place
do we have a pro javascript here please?
zacharey
@zacharey
Dec 24 2017 21:39
looking for someone that has done interviews already pm me
Ghost
@ghost~56bd2077e610378809c105cd
Dec 24 2017 22:44
finally got my tic tac toe working
Merry Christmas Code Friends :)
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 24 2017 23:36
Nice!
SakisBal
@SakisBal
Dec 24 2017 23:51
random question: how much time does your average challenge take at intermediate scripting
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 24 2017 23:52
really really long time
Jarrod
@Demonico
Dec 24 2017 23:53
that is part of the point though
SoteroX
@SoteroX
Dec 24 2017 23:54
@SakisBal dont try and compare your time to someone else, some people learn faster than others and some people learn slower than others. take all the time you need if thats what it takes for you to understand them
Jarrod
@Demonico
Dec 24 2017 23:57
to add to what @SoteroX said, learning speed isn't the only factor either. I think I did them in 1/2 the estimated time but that is only because I was a math major in college and algorithm scripting is quite similar. Short version, some people have existing experience that makes it easier.
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 24 2017 23:57
I get a lot of errors though and I'm new at coding so
Jarrod
@Demonico
Dec 24 2017 23:58
you'll learn a ton just troubleshooting
CherryPlaysRoblox
@CherryPlaysRoblox1
Dec 24 2017 23:58
Yeah lol