These are chat archives for FreeCodeCamp/HelpFrontEnd

11th
Apr 2016
smzagury
@smzagury
Apr 11 2016 00:03 UTC
I have a JS question for my weather app
@Am3ricanPaladin what exactly is the problem?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:06 UTC
@Dueldrawer8 you're making an ajax request that is blocked by the browsers security policy
if you open your console you should see a message like this:
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:07 UTC
@juliankrispel my console in the codepen? i didnt see any message
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:07 UTC
XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&format=json&prop=links&list=search&srsearch=will+smith&srwhat=text. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://s.codepen.io' is therefore not allowed access.
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:07 UTC
@juliankrispel would it make a difference if i used .getJson instead?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:07 UTC
@Dueldrawer8 your browser debugger
it'll be the same
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:08 UTC
anyway i can overcome it?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:08 UTC
it's pretty restrictive
EricOber
@EricOber
Apr 11 2016 00:09 UTC
hey @smzagury thanks. Im supposed to kind of create a web portfolio that is similar to this http://codepen.io/hallaathrad/pen/vNEPpL?editors=1100 but not sure where to start.
CamperBot
@camperbot
Apr 11 2016 00:09 UTC
am3ricanpaladin sends brownie points to @smzagury :sparkles: :thumbsup: :sparkles:
:star: 286 | @smzagury | http://www.freecodecamp.com/smzagury
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:10 UTC
@juliankrispel then how does everyone do it with the ajax request?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:12 UTC
@Dueldrawer8 I'm kind of new to this community so I don't know what people do here, but you could probably work on your own machine, or use a service that allows cross-origin-requests
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:12 UTC
@juliankrispel plenty of people are able to successfully run it.. look at this for example
the only difference really is the &callback= in his code..
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:14 UTC
looking
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:14 UTC
@juliankrispel thanks
CamperBot
@camperbot
Apr 11 2016 00:14 UTC
dueldrawer8 sends brownie points to @juliankrispel :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for juliankrispel
Sean
@SirSeanConnerie
Apr 11 2016 00:20 UTC
i'm trying to do random quote but don't want the quote to run if its the same as before. any ideas?
Jessica Dembe
@jmdembe
Apr 11 2016 00:20 UTC
Hi everybody! So I am building a tribute page and I've searched google about how to center a group of images.
I figured using a <div> would be the first step
Sean
@SirSeanConnerie
Apr 11 2016 00:21 UTC
tried randoming a number and using a for statement so it won't run unless its unequal to the last number but doesn't seem to be working http://codepen.io/sirseanconnerie/pen/MyOqWY
Jessica Dembe
@jmdembe
Apr 11 2016 00:21 UTC
but i can't figure out how to center said div

<p data-height="268" data-theme-id="0" data-slug-hash="MyQjXY" data-default-tab="result" data-user="thatssojessy" class="codepen">See the Pen <a href="https://codepen.io/thatssojessy/pen/MyQjXY/">Phife Dawg Tribute Page</a> by Jessica Dembe (<a href="http://codepen.io/thatssojessy">@thatssojessy</a>) on <a href="http://codepen.io">CodePen</a>.</p>

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>

ok...that didn't show p as expected, hold on
Jessica Dembe
@jmdembe
Apr 11 2016 00:26 UTC
okay...how do i copy and paste a pen?
Sean
@SirSeanConnerie
Apr 11 2016 00:27 UTC
i just link the url
i'll work with the font in a moment, but how do i center the group of images in the div
i tried margin, but no dice.
PapaUnik1993
@PapaUnik1993
Apr 11 2016 00:30 UTC
@Gregory-Buhler THANK YOU!!!! Thank you for you'r time and help,it means a lot,awesome community on this site!!!!
CamperBot
@camperbot
Apr 11 2016 00:30 UTC
papaunik1993 sends brownie points to @gregory-buhler :sparkles: :thumbsup: :sparkles:
:star: 315 | @gregory-buhler | http://www.freecodecamp.com/gregory-buhler
Sean
@SirSeanConnerie
Apr 11 2016 00:30 UTC
@jessica-dembe margins worked for me but i think mainly because it was inside a div
@jessica-dembe try:
img{
display: block;
margin-left: auto;
margin-right: auto ;
width:756px;
height:504px;
}
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:33 UTC
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:34 UTC
@juliankrispel found this in stack overflow.. i tried it in ajax call but didnt work.. trying it in .getjson instead http://stackoverflow.com/questions/3873636/no-response-from-mediawiki-api-using-jquery
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:34 UTC
jsonp is basically a way to get around the security restrictions in browsers :)
so all you need to do @Dueldrawer8 is set dataType: 'jsonp' and that does the trick
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:36 UTC
@Dueldrawer8 thanks again, the .getJSON works also if i add callback=? in my url..
CamperBot
@camperbot
Apr 11 2016 00:36 UTC
sorry dueldrawer8, you can't send brownie points to yourself! :sparkles: :sparkles:
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:36 UTC
thought they were the same thig
@juliankrispel meant thanks
CamperBot
@camperbot
Apr 11 2016 00:37 UTC
dueldrawer8 sends brownie points to @juliankrispel :sparkles: :thumbsup: :sparkles:
:warning: could not find receiver for juliankrispel
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:37 UTC
pleasure :D
Jessica Dembe
@jmdembe
Apr 11 2016 00:38 UTC
thanks @SirSeanConnerie! I did the 756px, but i am using height: auto because the images are different heights :)
CamperBot
@camperbot
Apr 11 2016 00:38 UTC
jessica-dembe sends brownie points to @sirseanconnerie :sparkles: :thumbsup: :sparkles:
:star: 276 | @sirseanconnerie | http://www.freecodecamp.com/sirseanconnerie
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:39 UTC
@juliankrispel howd you get it to work?
i added that to my other codepen but still doesnt log
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:40 UTC
@Dueldrawer8 you have a typo
Savier
@Savier12
Apr 11 2016 00:40 UTC
Has everyone ever went Blank when building your tribute page?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:40 UTC
it needs to be dataType not datatype
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:40 UTC
ah
man.. simple yet hard to spot
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:40 UTC
yea
That will never stop
Even after years of doing this stuff
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:42 UTC
how long have you been doing it?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:43 UTC
good question, no idea, I need to think about
that :D
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:43 UTC
lol, i take it your working as a web dev?
EricOber
@EricOber
Apr 11 2016 00:43 UTC
does anyone know how to make a web page scrollable??
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:43 UTC
yes
i am
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 00:44 UTC
ive been close to landing internships, they have even accepted me at two small startups but they always push it off saying they are busy or have "internal" stuff going on and have to wait until summer to bring me on
so im just building.. gettign experience and instead of going the unpaid internship route.. aiming for a PAID job lol
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 00:45 UTC
totally doable!
Rohit Rawat
@rrwt
Apr 11 2016 00:45 UTC
Hi guys,
I am stuck with a problem, when trying to solve the tictactoe project.
How is the example code able to ask the user whether he/she wants to play x or o. It seams like an alert but much nicer.
Dardan Demiri
@dardandemiri
Apr 11 2016 00:45 UTC
@Am3ricanPaladin you make the height long
:P
and than you can scroll down and up
EricOber
@EricOber
Apr 11 2016 00:45 UTC
you ahve a code for that?
Dardan Demiri
@dardandemiri
Apr 11 2016 00:46 UTC
yes
Stephen James
@sjames1958gm
Apr 11 2016 00:46 UTC
@Am3ricanPaladin He means that you include enough vertical content that it wont fit on a page.
Dardan Demiri
@dardandemiri
Apr 11 2016 00:47 UTC
body{
 height: 1200px;
}
:P
Stephen James
@sjames1958gm
Apr 11 2016 00:47 UTC
@rohitrawat2000 Before the game starts have two radio buttons, and while playing hide them.
Dardan Demiri
@dardandemiri
Apr 11 2016 00:47 UTC
This is the answer of your question @Am3ricanPaladin
EricOber
@EricOber
Apr 11 2016 00:47 UTC
oooh, because i am looking at code on another website, and it goes like: " a.scrollable(href='#top')"
thank you
Dardan Demiri
@dardandemiri
Apr 11 2016 00:47 UTC
ah You want Smooth Scrolling
with jQuery
EricOber
@EricOber
Apr 11 2016 00:48 UTC
ooooooh now that sounds nice, yes i do
Dardan Demiri
@dardandemiri
Apr 11 2016 00:48 UTC
Okey
here we go:
<script>
var scrolled = -51;
$(document).ready(function(){

    $(".navi li a").on("click" ,function(obj){
        var id = $(this).attr("id");

        id = id.split("_");
        id = id[0];

        $('html, body').animate({
            scrollTop: $("#" + id).offset().top + scrolled
        }, 1200);

});

});
</script>
jalley3
@jalley3
Apr 11 2016 00:49 UTC
anyone got a second to help me figure out the twitter tweet intent for the quote generator?
EricOber
@EricOber
Apr 11 2016 00:49 UTC
thats using java script i assume
Rohit Rawat
@rrwt
Apr 11 2016 00:50 UTC
@sjames1958gm Thanks but do you know how can we have that kind of popup?
the whole webpage is in the background and you just see a choice
CamperBot
@camperbot
Apr 11 2016 00:50 UTC
rohitrawat2000 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 571 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Dardan Demiri
@dardandemiri
Apr 11 2016 00:50 UTC
it's mixed
EricOber
@EricOber
Apr 11 2016 00:50 UTC
oh wow i didnt know you could mix it
Dardan Demiri
@dardandemiri
Apr 11 2016 00:50 UTC
www.dardandemiri.com
Look at my site and see when you click the nav buttons
EricOber
@EricOber
Apr 11 2016 00:50 UTC
you have a nice site
Dardan Demiri
@dardandemiri
Apr 11 2016 00:50 UTC
it flows smoothly to that section
Thanks
Stephen James
@sjames1958gm
Apr 11 2016 00:51 UTC
@rohitrawat2000 You can use the the confirm() function in javascript.
Dardan Demiri
@dardandemiri
Apr 11 2016 00:52 UTC
@Am3ricanPaladin
EricOber
@EricOber
Apr 11 2016 00:52 UTC
how do i give you brownie points
Dardan Demiri
@dardandemiri
Apr 11 2016 00:52 UTC
Just say: Thank you and My name :P
Like this: Thank you @Am3ricanPaladin
CamperBot
@camperbot
Apr 11 2016 00:52 UTC
dardandemiri sends brownie points to @am3ricanpaladin :sparkles: :thumbsup: :sparkles:
:star: 67 | @am3ricanpaladin | http://www.freecodecamp.com/am3ricanpaladin
Rohit Rawat
@rrwt
Apr 11 2016 00:53 UTC
nice, thanks!!
Dardan Demiri
@dardandemiri
Apr 11 2016 00:53 UTC
with an @
jalley3
@jalley3
Apr 11 2016 00:53 UTC
if anyone could take a look at my twitter button coding and help me right the ship it would be appreciated
EricOber
@EricOber
Apr 11 2016 00:53 UTC
@dardandemiri thank you!
CamperBot
@camperbot
Apr 11 2016 00:53 UTC
am3ricanpaladin sends brownie points to @dardandemiri :sparkles: :thumbsup: :sparkles:
:star: 285 | @dardandemiri | http://www.freecodecamp.com/dardandemiri
Dardan Demiri
@dardandemiri
Apr 11 2016 00:53 UTC

$(document).ready(function(){

    $(".navi li a").on("click" ,function(obj){  // your menu
        var id = $(this).attr("id");

        id = id.split("_");
        id = id[0];

        $('html, body').animate({
            scrollTop: $("#" + id).offset().top
        }, 1200);

});

});
This is shorted and effective code.
See you, and Thank you
:D

the menu List should be like this:
```

<li class="selected"><a id="About_n" href="javascript:void(0);">ABOUT</a></li>

with that Javascript:void
And the Div's should have the in this example
id="About"
EricOber
@EricOber
Apr 11 2016 00:57 UTC
where do i insert that?
i dont understand javascript yet
Dardan Demiri
@dardandemiri
Apr 11 2016 00:58 UTC
Put your site in codepen what you are doing
Dardan Demiri
@dardandemiri
Apr 11 2016 00:59 UTC
Hmmm you have not done anything in html yet
EricOber
@EricOber
Apr 11 2016 01:00 UTC
right
Dardan Demiri
@dardandemiri
Apr 11 2016 01:00 UTC
Than by using Bootstrap create the site
and let the Smooth scrolling for later
I have done the same
Because everything should be learned one step at a time
and it's not a good idea if you make animations in your site and don't know how to make one
EricOber
@EricOber
Apr 11 2016 01:03 UTC
@dardandemiri right, it sort of seems that the example for this challenge is too advanced for what ive learned so far... they did say not to look at its code though....
Alex Coder
@jkid314159
Apr 11 2016 01:03 UTC
Hello world
CamperBot
@camperbot
Apr 11 2016 01:03 UTC

welcome to FreeCodeCamp @jkid314159!

Dardan Demiri
@dardandemiri
Apr 11 2016 01:03 UTC

What i have done is this:
I made first just the layout of the page in a paper.
Than I coded it on HTML and CSS.
And that's it.

After going throw other lessons, I learned javascript and started adding effects on site

so don't go fast, go slow but don't stop
That's the shortcut for success...
@jkid314159 Welcome on Board
EricOber
@EricOber
Apr 11 2016 01:05 UTC
@dardandemiri thanks thats good advice. So you recommend i use bootstrap and jquery for this
CamperBot
@camperbot
Apr 11 2016 01:05 UTC
am3ricanpaladin sends brownie points to @dardandemiri :sparkles: :thumbsup: :sparkles:
:warning: am3ricanpaladin already gave dardandemiri points
Sean
@SirSeanConnerie
Apr 11 2016 01:05 UTC
tried randoming a number and using a for statement so it won't run unless its unequal to the last number but doesn't seem to be working http://codepen.io/sirseanconnerie/pen/MyOqWY
Alex Coder
@jkid314159
Apr 11 2016 01:06 UTC
var code = "formatted" for ( var i = 0; i < contact.length; i++ ) {
if ( contact[ i ].firstName == firstName ) {
if ( contact[ i ].prop === "" ) {
return "No such property";
} else {
return contact[ i ].prop;
} // else end
} // if outer end
} // for end
return "No such contact";
Dardan Demiri
@dardandemiri
Apr 11 2016 01:07 UTC
HTML and CSS
Ore Bootstrap it's those two combined
Alex Coder
@jkid314159
Apr 11 2016 01:07 UTC
This for loop is not working Suggestions?
Dardan Demiri
@dardandemiri
Apr 11 2016 01:07 UTC
@jkid314159 can you please paste the code formated
wiki formatted code
CamperBot
@camperbot
Apr 11 2016 01:08 UTC
no wiki entry for: formatted code
Alex Coder
@jkid314159
Apr 11 2016 01:08 UTC
@dardandemiri not too sure how??
Dardan Demiri
@dardandemiri
Apr 11 2016 01:08 UTC
make three ``` Than your code and another 3 of the same
where is this contact variable ?
Alex Coder
@jkid314159
Apr 11 2016 01:10 UTC
@dardandemiri \\ or '''
CamperBot
@camperbot
Apr 11 2016 01:10 UTC
:bulb: to format code use backticks! ``` more info
Alex Coder
@jkid314159
Apr 11 2016 01:10 UTC
for ( var i = 0; i < contact.length; i++ ) { if ( contact[ i ].firstName == firstName ) { if ( contact[ i ].prop === "" ) { return "No such property"; } else { return contact[ i ].prop; } // else end } // if outer end } // for end return "No such contact";
Johnathon Sykes
@seesykescode
Apr 11 2016 01:11 UTC

Hey folks, running into 2 big snags on my Twitch Status project.

I can't seem to nail down img resizing for the profile pictures. I'm trying to have it center inside of the div but to the left of the status infomation. Float:left sorta worked but still having issues with resizing.

Also, I can't seem to figure out how to get my online streamers to show up first. Not exactly sure how I would prioritze online divs to show over the top of offline divs.

pen is here. http://codepen.io/johndsykes86/pen/RaQabe

Dardan Demiri
@dardandemiri
Apr 11 2016 01:11 UTC
@SirSeanConnerie Can you explain more
Pawan
@pawan92
Apr 11 2016 01:11 UTC
does anyone have a good resource for understanding array filter. im doing diff 2 arrays and i know i have to use that but i cant seem to figure out how
Alex Coder
@jkid314159
Apr 11 2016 01:11 UTC
js for ( var i = 0; i < contact.length; i++ ) { if ( contact[ i ].firstName == firstName ) { if ( contact[ i ].prop === "" ) { return "No such property"; } else { return contact[ i ].prop; } // else end } // if outer end } // for end return "No such contact";
Dardan Demiri
@dardandemiri
Apr 11 2016 01:12 UTC
@jkid314159 put it on Codepen
and paste the link here
Alex Coder
@jkid314159
Apr 11 2016 01:13 UTC
@dardandemiri ok sorry about that
Dardan Demiri
@dardandemiri
Apr 11 2016 01:14 UTC
Guys I need to get out of my Laptop right now, sorry see you later
Hope others can help you
Greg Duncan
@GregatGit
Apr 11 2016 01:15 UTC
@pawan92 w3schools usually have pretty good resources
Pawan
@pawan92
Apr 11 2016 01:16 UTC
@GregatGit thanks ive looked at that already but will give it another look
CamperBot
@camperbot
Apr 11 2016 01:16 UTC
pawan92 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:star: 400 | @gregatgit | http://www.freecodecamp.com/gregatgit
jalley3
@jalley3
Apr 11 2016 01:17 UTC
http://codepen.io/jalley3/pen/RaQPrE ...cant get my twitter button to work...i am encoding the string into a uri component (also tried while not doing that as well)...and appending it to a tweet intent url
Alex Coder
@jkid314159
Apr 11 2016 01:18 UTC
Hi! I can not get js script working. ``` contact[i].prop === ""
Greg Duncan
@GregatGit
Apr 11 2016 01:18 UTC
@johndsykes86 you can set it up that everytime the user changes the screen size it changes the css
$(window).resize(function() {
  viewportHeight = $(window).height();
  $('#sectionHome').css("height", viewportHeight);
  $('#sectionAbout').css("height", viewportHeight);
});
Johnathon Sykes
@seesykescode
Apr 11 2016 01:20 UTC
So setting up a viewport and then manually defining what it should resie to?
@GregatGit
Alex Coder
@jkid314159
Apr 11 2016 01:22 UTC
I have an array with property:value. I am given the property and want to see if it exist. I run a for loop and check array like this:
array[i].property==""
i don't want to check for value only for property but doesn't work??
Greg Duncan
@GregatGit
Apr 11 2016 01:23 UTC
@johndsykes86 That was the code I used to resize the divs on personal profile - it could be changedt to alter anything
var viewportHeight = $(window).height();
$('#sectionHome').css("height", viewportHeight);
$('#sectionAbout').css("height", viewportHeight);

$(window).resize(function() {
  viewportHeight = $(window).height();
  $('#sectionHome').css("height", viewportHeight);
  $('#sectionAbout').css("height", viewportHeight);
});
nsloc22
@nsloc22
Apr 11 2016 01:24 UTC
simon game made with unity, somewhat works http://codepen.io/nsloc22/full/MyQaLL/
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:24 UTC
@jkid314159 what doesn't work? do you get an error?
Alex Coder
@jkid314159
Apr 11 2016 01:24 UTC
I get blank, nothing
Jeff
@adzam5
Apr 11 2016 01:26 UTC
@jalley3 You have a typo. You have an "s" after element in .getElementById
Johnathon Sykes
@seesykescode
Apr 11 2016 01:26 UTC
Thanks @GregatGit Im gonna give my brain some cooldown time and then come back and implement that.
CamperBot
@camperbot
Apr 11 2016 01:26 UTC
johndsykes86 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:star: 401 | @gregatgit | http://www.freecodecamp.com/gregatgit
Greg Duncan
@GregatGit
Apr 11 2016 01:27 UTC
@johndsykes86 good luck
jalley3
@jalley3
Apr 11 2016 01:28 UTC
thanks @adzam5
CamperBot
@camperbot
Apr 11 2016 01:28 UTC
jalley3 sends brownie points to @adzam5 :sparkles: :thumbsup: :sparkles:
jalley3
@jalley3
Apr 11 2016 01:28 UTC
that fixed it
CamperBot
@camperbot
Apr 11 2016 01:28 UTC
:star: 400 | @adzam5 | http://www.freecodecamp.com/adzam5
jalley3
@jalley3
Apr 11 2016 01:28 UTC
you are the man
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:28 UTC
@jkid314159 not sure what you're trying to do here
This message was deleted
Alex Coder
@jkid314159
Apr 11 2016 01:29 UTC
@juliankrispel trying to access the property ```http://codepen.io/jkid314159/pen/ZWrpNO?editors=0010
sorry
``` if ( contact[ i ].prop === "" )
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:29 UTC
if ( contact[ i ].prop === "" ) {
  return "No such property";
} else {
  return contact[ i ].prop;
}
Alex Coder
@jkid314159
Apr 11 2016 01:30 UTC
Yes.
Not going into if
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:30 UTC
this expression contact[ i ].prop === "" will evaluate as false
because prop doesn't exist
what you're saying here is
Is this value an empty string
Alex Coder
@jkid314159
Apr 11 2016 01:31 UTC
yes
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:31 UTC
but really it just doesn't exist, which is something different
it's undefined
instead write: contact[ i ].prop === undefined
that should do the trick
:+1:
Alex Coder
@jkid314159
Apr 11 2016 01:32 UTC
Let me check. 5 minutes?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:32 UTC
sure ;)
Greg Duncan
@GregatGit
Apr 11 2016 01:34 UTC
@jkid314159 I think you should be using obj.hasOwnProperty(prop) that tells you if the property is there or not
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:34 UTC
that's another way of doing it :)
Greg Duncan
@GregatGit
Apr 11 2016 01:34 UTC
so contact[i].hasOwnProperty(prop)
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:35 UTC
a better way, because more legible ^
Alex Coder
@jkid314159
Apr 11 2016 01:37 UTC
contacts[ i ].hasOwnProperty(prop) ?
``` contacts[ i ].hasOwnProperty(prop
contacts[ i ].hasOwnProperty(prop)
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:37 UTC
actually
in your case it'd be contact[ i ].hasOwnProperty('prop')
since you're passing in a string
Alex Coder
@jkid314159
Apr 11 2016 01:38 UTC
prop = "lastName"
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:38 UTC
sure you can just use a variable as well
Greg Duncan
@GregatGit
Apr 11 2016 01:38 UTC
will return true if the property is there
Alex Coder
@jkid314159
Apr 11 2016 01:40 UTC
it works when no such property but has property returning return contacts[i].prop;
I mean not returning
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:41 UTC
right
so in your case
if you want to test for the non-existence of a property
you can write contact[ i ].hasOwnProperty('prop') === false
hasOwnProperty returns true if the property exists
so if you ask does it return false you're really asking if the property isn't there
Chris
@The-Mister
Apr 11 2016 01:42 UTC
Hey guys, how are ya'll hosting API files and whatnot for codepen? Is it possible to just put the files in an open Google Drive folder and link to it?
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:42 UTC
makes sense?
Alex Coder
@jkid314159
Apr 11 2016 01:43 UTC
yes but I do not thing return contacts[i].prop; is returning
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:44 UTC
ah I see what you mean
you need to write return contacts[i][prop];
.prop will actually look up the prop attribute which isn't what you want
Jeff
@adzam5
Apr 11 2016 01:45 UTC
@The-Mister People on here have mentioned using Dropbox, I assume Google Drive would work as well
Alex Coder
@jkid314159
Apr 11 2016 01:45 UTC
@juliankrispel I want the value
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:45 UTC
because in your case prop is just a variable that contains the name of the attribute @jkid314159
have you tried it?
Alex Coder
@jkid314159
Apr 11 2016 01:45 UTC
i want attribute @juliankrispel
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:46 UTC
I understand @jkid314159
Alex Coder
@jkid314159
Apr 11 2016 01:46 UTC
@juliankrispel not working
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:46 UTC
link?
Greg Duncan
@GregatGit
Apr 11 2016 01:47 UTC
@jkid314159
if(contacts[i].hasOwnProperty(prop)){
   // do this
   }else{
   // do that
   }
Alex Coder
@jkid314159
Apr 11 2016 01:47 UTC
if ( contacts[ i ].hasOwnProperty('prop') ) { return contacts[ i ][prop]; } else { return "No such property"; } // else end
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:47 UTC
@jkid314159 you want to write hasOwnProperty(prop)
@GregatGit prop is dynamic
@jkid314159 working?
Alex Coder
@jkid314159
Apr 11 2016 01:49 UTC
i thought u said in single quotes 'prop'
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:50 UTC
@jkid314159 I got confused :)
Alex Coder
@jkid314159
Apr 11 2016 01:50 UTC
@juliankrispel i sorry which are u saying
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:51 UTC
@jkid314159 ok
trying to help you think this through
you want to check if a property exists on an object
Alex Coder
@jkid314159
Apr 11 2016 01:51 UTC
yes exactly
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:52 UTC
if you write this something.hasOwnProperty('prop')
Alex Coder
@jkid314159
Apr 11 2016 01:52 UTC
it works now
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:52 UTC
it'll tell you if there's a property with name 'prop' on the object
Alex Coder
@jkid314159
Apr 11 2016 01:52 UTC
@juliankrispel thank you
CamperBot
@camperbot
Apr 11 2016 01:52 UTC
jkid314159 sends brownie points to @juliankrispel :sparkles: :thumbsup: :sparkles:
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:52 UTC
if you write something.hasOwnProperty(prop)
CamperBot
@camperbot
Apr 11 2016 01:52 UTC
:warning: could not find receiver for juliankrispel
Alex Coder
@jkid314159
Apr 11 2016 01:52 UTC
@GregatGit thank you
CamperBot
@camperbot
Apr 11 2016 01:52 UTC
jkid314159 sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:star: 402 | @gregatgit | http://www.freecodecamp.com/gregatgit
Greg Duncan
@GregatGit
Apr 11 2016 01:53 UTC
@jkid314159 you use contacts instead of contact
Chris
@The-Mister
Apr 11 2016 01:53 UTC
@adzam5 Thank you, I will try that
CamperBot
@camperbot
Apr 11 2016 01:53 UTC
the-mister sends brownie points to @adzam5 :sparkles: :thumbsup: :sparkles:
:star: 401 | @adzam5 | http://www.freecodecamp.com/adzam5
Julian Krispel-Samsel
@juliankrispel
Apr 11 2016 01:53 UTC
it'll check if the object has a property with the name that the variable prop contains
makes sense @jkid314159
?
Alex Coder
@jkid314159
Apr 11 2016 01:54 UTC
@juliankrispel which is a string
Greg Duncan
@GregatGit
Apr 11 2016 01:55 UTC
@jkid314159 cut and paste you code at https://repl.it/ it will help you to debug quickly
so on line 9 and 10 you misspelt
Alex Coder
@jkid314159
Apr 11 2016 01:57 UTC
ok
Greg Duncan
@GregatGit
Apr 11 2016 02:00 UTC
@jkid314159 it won't work tho
Alex Coder
@jkid314159
Apr 11 2016 02:00 UTC
for ( var i = 0; i < contacts.length; i++ ) {
    if ( contacts[ i ].firstName == firstName ) {
      if ( contacts[ i ].hasOwnProperty(prop) ) {
           return contacts[ i ][prop];           
       } else {
           return "No such property";           
       } // else end
    } // if outer end 
  } // for end
@GregatGit this works and I figured out how to post
3 hours
Greg Duncan
@GregatGit
Apr 11 2016 02:01 UTC
@jkid314159 unless the its the very first on the list it will return "no such contact" everytime
you don't need the else statement at all
Alex Coder
@jkid314159
Apr 11 2016 02:01 UTC
@GregatGit seems to pass all the test??
@GregatGit see you
Greg Duncan
@GregatGit
Apr 11 2016 02:04 UTC
@jkid314159 sorry - it is working
well done
random-x
@random-x
Apr 11 2016 02:26 UTC
woohoo :) got my "speed up the incrementing on hold-down" to work http://codepen.io/random-x/full/YqYyww/
(still does nothing, but the actual timer mechanism isn't all that cool :P)
Greg Duncan
@GregatGit
Apr 11 2016 02:48 UTC
@random-x It looks good so far
random-x
@random-x
Apr 11 2016 02:49 UTC
@GregatGit tanks! the programming part is easy, but I'm (obviously) not very used to the design sort of stuff.
CamperBot
@camperbot
Apr 11 2016 02:49 UTC
random-x sends brownie points to @gregatgit :sparkles: :thumbsup: :sparkles:
:star: 403 | @gregatgit | http://www.freecodecamp.com/gregatgit
Elbert Cortez
@trip16661
Apr 11 2016 03:08 UTC
@random-x i can seem to make it
work
is there any button
random-x
@random-x
Apr 11 2016 03:17 UTC
@trip16661 it doesn't work :P
only the "Add time" does anything currently.
Elbert Cortez
@trip16661
Apr 11 2016 03:18 UTC
@random-x oh i was trying to make it work xDD
random-x
@random-x
Apr 11 2016 03:18 UTC
:D
Elbert Cortez
@trip16661
Apr 11 2016 03:24 UTC
is there any more eficient way to remplace something after clicking the button again
like deleting and appending a new thing
like deleting all
random-x
@random-x
Apr 11 2016 03:27 UTC
hm?
JD Tadlock
@jdtdesigns
Apr 11 2016 04:19 UTC
@trip16661 you need to be more specific
post your code that has an issue or post your codepen
Jeff
@adzam5
Apr 11 2016 04:48 UTC
This message was deleted
This message was deleted
JD Tadlock
@jdtdesigns
Apr 11 2016 04:56 UTC
so you need to post a phone number and other info to that object that has the id in it?
@adzam5
Sangeetha
@manmarziyan
Apr 11 2016 05:11 UTC
Hi, I had built the local weather app a couple of months ago. It doesn't seem to work anymore. When I use open weather map API, and click on their example links, I get the "invalid API key" error. What's wrong?
Samuel Cupidon
@Zerazera
Apr 11 2016 05:13 UTC
Sangeetha
@manmarziyan
Apr 11 2016 05:20 UTC
Never mind, I got it. Need to register and get your own app ID. Thanks @Zerazera
CamperBot
@camperbot
Apr 11 2016 05:20 UTC
manmarziyan sends brownie points to @zerazera :sparkles: :thumbsup: :sparkles:
:star: 323 | @zerazera | http://www.freecodecamp.com/zerazera
Sangeetha
@manmarziyan
Apr 11 2016 05:27 UTC
I also made the camper news project. Are there any alternative similar APIs I could use to replace the camper news API, to still keep the project working?
jorgon1022
@jorgon1022
Apr 11 2016 06:09 UTC
hey guys
anyone here?
kirbyedy
@kirbyedy
Apr 11 2016 06:18 UTC
maybe :)
Amin Mohamed Ajani
@binarybaba
Apr 11 2016 06:49 UTC
Hoi!
kirbyedy
@kirbyedy
Apr 11 2016 06:58 UTC
@manmarziyan the api should work, you just need to put https
MichaelTsang
@MichaelTsang
Apr 11 2016 07:14 UTC
need help
https://en.wikipedia.org/w/api.php?action=query&generator=allpages&format=json&gaplimit=4&gapfrom=T&prop=info
this link can get a json file with title and pageid sth useful to let me link the wiki ,
but how can i get the decription about the page ( one or two short sentences), just like the sample site
http://codepen.io/FreeCodeCamp/full/pgNRvJ.
kirbyedy
@kirbyedy
Apr 11 2016 07:21 UTC
I dont know much of angular, but I think this line pulls it:
$scope.results.push({title: v.title, body: v.extract, page: page + v.pageid})
extract...
@MichaelTsang are you doing this zipline with angular ?
MichaelTsang
@MichaelTsang
Apr 11 2016 07:22 UTC
@kirbyedy just a simple javascript json project i guess
Frank XC
@tenkdayz
Apr 11 2016 07:22 UTC
@MichaelTsang .. looks like they're at data.query.pages[0].extract
they meaning the description string
kirbyedy
@kirbyedy
Apr 11 2016 07:24 UTC
@MichaelTsang if I change your api call to this, it gives me the extract of the article
https://en.wikipedia.org/w/api.php?action=query&generator=allpages&format=json&gaplimit=4&gapfrom=T&prop=info|extracts
Elbert Cortez
@trip16661
Apr 11 2016 07:26 UTC
@kirbyedy that's not quite what it is
@kirbyedy it gives a full thing and just extract the first one
kirbyedy
@kirbyedy
Apr 11 2016 07:27 UTC
yep, can you help then ?
Elbert Cortez
@trip16661
Apr 11 2016 07:34 UTC
@kirbyedy using the sandbox and playing around with it
helps
kirbyedy
@kirbyedy
Apr 11 2016 07:34 UTC
:thumbsup:
Elbert Cortez
@trip16661
Apr 11 2016 07:35 UTC
just keeping in mind the things that are important are query, generator, extracts, info
are mostly the main thing but there are others
Jenni
@silverrain64
Apr 11 2016 07:57 UTC
This message was deleted
MichaelTsang
@MichaelTsang
Apr 11 2016 07:59 UTC
@trip16661 trying to use sanbox, and i already know how to use, but still do not understand how to get all extract, the situation just like @kirbyedy only get the first one
Elbert Cortez
@trip16661
Apr 11 2016 08:00 UTC
there is an option unmarked
that shows how many extracts do you want
MichaelTsang
@MichaelTsang
Apr 11 2016 08:00 UTC
prop = extracts
Elbert Cortez
@trip16661
Apr 11 2016 08:00 UTC
and i think it has a 20 max
@MichaelTsang exlimit
MichaelTsang
@MichaelTsang
Apr 11 2016 08:01 UTC
i know and the generator already set return 15
Elbert Cortez
@trip16661
Apr 11 2016 08:02 UTC
How many extracts to return.
No more than 20 (20 for bots) allowed.
show me your link so far
MichaelTsang
@MichaelTsang
Apr 11 2016 08:03 UTC
/w/api.php?action=query&format=json&maxlag=6&smaxage=2&maxage=10&prop=extracts&generator=allpages&exsentences=2&exlimit=15&exsectionformat=wiki&gaplimit=15
Elbert Cortez
@trip16661
Apr 11 2016 08:04 UTC
not all pages
search
and in the extract part
check exintro
MichaelTsang
@MichaelTsang
Apr 11 2016 08:06 UTC
cool ! @trip16661
Elbert Cortez
@trip16661
Apr 11 2016 08:06 UTC
@MichaelTsang worked?
MichaelTsang
@MichaelTsang
Apr 11 2016 08:07 UTC
yeah
Elbert Cortez
@trip16661
Apr 11 2016 08:07 UTC
you also miss the data information
Elbert Cortez
@trip16661
Apr 11 2016 08:08 UTC
@MichaelTsang so you can get the links
MichaelTsang
@MichaelTsang
Apr 11 2016 08:08 UTC
why apple inc extract nothing
where's the data infomation
MichaelTsang
@MichaelTsang
Apr 11 2016 08:20 UTC
@trip16661 thanks for u patient~ :D
CamperBot
@camperbot
Apr 11 2016 08:20 UTC
michaeltsang sends brownie points to @trip16661 :sparkles: :thumbsup: :sparkles:
:warning: michaeltsang already gave trip16661 points
Sean McDonald
@bewsii
Apr 11 2016 08:24 UTC
is there a way to add 2 borders to the same element in css? i'm trying to build an iPad as the image holder for the Tribute project. Ive got most of it working, but I can only get 1 border to work around the image
MichaelTsang
@MichaelTsang
Apr 11 2016 08:25 UTC
@bewsii 2 borders would not work, the last one will cover the others
Sean McDonald
@bewsii
Apr 11 2016 08:26 UTC
yeah, that's what im finding. thats why im wondering if there's another way to do it
MichaelTsang
@MichaelTsang
Apr 11 2016 08:26 UTC
u can create two html elements and give different classes
sth like div
Sean McDonald
@bewsii
Apr 11 2016 08:26 UTC
hrm. thats worth a shot
i'm already 4 deep in the container. dont want to dig myself too deep as a newb lol
MichaelTsang
@MichaelTsang
Apr 11 2016 08:28 UTC
@bewsii and better way
u can use box-shadow
makes better effect
Sean McDonald
@bewsii
Apr 11 2016 08:29 UTC
yeah, im using box-shadow for the main border so it looks 3d. one sec
no idea how to show a screenshot from codepen, sorry
the main header is obviously off. ill work on that once i sort out the main iPad layout :P
MichaelTsang
@MichaelTsang
Apr 11 2016 08:31 UTC
@bewsii good job , really like an ipad lol
Sean McDonald
@bewsii
Apr 11 2016 08:32 UTC
im already researching how to add gradients to the big white border so it looks like it has a lighting effect on it. i think im going to have to jump in the grave im digging soon lol
@MichaelTsang thanks!
CamperBot
@camperbot
Apr 11 2016 08:32 UTC
bewsii sends brownie points to @michaeltsang :sparkles: :thumbsup: :sparkles:
:star: 282 | @michaeltsang | http://www.freecodecamp.com/michaeltsang
Sean McDonald
@bewsii
Apr 11 2016 08:33 UTC
but, you can see how the image doesnt look like it's sitting inside the white border (like it would on a real iPad, because of the beveled edge).. thats what im trying to figure out how to do
Sean McDonald
@bewsii
Apr 11 2016 08:39 UTC
did it die in here or did I disconnect?
kirbyedy
@kirbyedy
Apr 11 2016 08:40 UTC
no :)
Sean McDonald
@bewsii
Apr 11 2016 08:40 UTC
ahh, good :D
kirbyedy
@kirbyedy
Apr 11 2016 08:40 UTC
we are just good listeners :D
Bosko
@boskoivic
Apr 11 2016 08:41 UTC
Hey friends, just finished my Porfolio Webpage http://codepen.io/crowebbro/pen/ONzKpw if anyone wants to critique it your most welcome.
MichaelTsang
@MichaelTsang
Apr 11 2016 08:41 UTC
buddy u work @bewsii
Sean McDonald
@bewsii
Apr 11 2016 08:42 UTC
oh cool, thanks
kirbyedy
@kirbyedy
Apr 11 2016 08:43 UTC
@boskoivic would be nice if you could remove the rounded corners on your navbar
Screen Shot 2016-04-11 at 11.42.40.png
MichaelTsang
@MichaelTsang
Apr 11 2016 08:43 UTC
@bewsii just copy the address
kirbyedy
@kirbyedy
Apr 11 2016 08:43 UTC
and maybe even fix it to the top of the page
Sean McDonald
@bewsii
Apr 11 2016 08:44 UTC
i'd also center your comment box to match the send button and text
or put the button/text to the left like the comment box. either way, more flow
or even resize the comment box so it fills that section of the grid :D
Bosko
@boskoivic
Apr 11 2016 08:45 UTC
tnx @bewsii @kirbyedy , will do just that
CamperBot
@camperbot
Apr 11 2016 08:45 UTC
boskoivic sends brownie points to @bewsii and @kirbyedy :sparkles: :thumbsup: :sparkles:
:star: 828 | @kirbyedy | http://www.freecodecamp.com/kirbyedy
:star: 130 | @bewsii | http://www.freecodecamp.com/bewsii
kirbyedy
@kirbyedy
Apr 11 2016 08:45 UTC
@boskoivic also make your profile picture responsive
Sean McDonald
@bewsii
Apr 11 2016 08:49 UTC
oh damn, you can do beveled edges in css. i'm never going to sleep again and i'm only on the first project :D
kirbyedy
@kirbyedy
Apr 11 2016 08:52 UTC
yea, and in 10 years you will be a programmer... :D
Sean McDonald
@bewsii
Apr 11 2016 08:52 UTC
haha
kirbyedy
@kirbyedy
Apr 11 2016 08:53 UTC
thats my plan :D
so 9 years and 8 months to go :D
Sean McDonald
@bewsii
Apr 11 2016 08:54 UTC
I have friends who are programmers at facebook, google, EA and a bunch of other big companies. they are all pretty snobby when I said "I want to become a full stack developer"
bittervet mentality i suppose :P
kirbyedy
@kirbyedy
Apr 11 2016 08:55 UTC
:D
apparently that is a trend these days... work for a big company as a programmer
Sean McDonald
@bewsii
Apr 11 2016 08:56 UTC
i understand though. i'm a 3d artist in the game industry.. and when people tell me they want to be 3d artists im like "no, you really dont" lol
there's a reason im getting out of it :D
kirbyedy
@kirbyedy
Apr 11 2016 08:56 UTC
I would prefer working for a smaller company, write the code that only I understand, and milk them for a money :D
plus they cant fire me :D
Sean McDonald
@bewsii
Apr 11 2016 08:56 UTC
lol
kirbyedy
@kirbyedy
Apr 11 2016 08:57 UTC
weeell... 3d looks cool and everything, but its basically like being a miner :D
I did some 3d 10years ago, and just got depressed from it
Sean McDonald
@bewsii
Apr 11 2016 08:58 UTC
its actually a lot like being a developer. very technical while creative, but still a big puzzle
and a ton of work
kirbyedy
@kirbyedy
Apr 11 2016 08:58 UTC
I understand it developed a lot, but still... I would never work as a 3d guy
and my friend who is a php programmer, says... are you mental... never learn programming
Sean McDonald
@bewsii
Apr 11 2016 08:59 UTC
lol
kirbyedy
@kirbyedy
Apr 11 2016 08:59 UTC
so yea...
different opinions
Sean McDonald
@bewsii
Apr 11 2016 08:59 UTC
one of the fastest growing industries in the US
(programming)
kirbyedy
@kirbyedy
Apr 11 2016 08:59 UTC
yea
and I think being a programmer in 5years will be... neaaah... cheap paying job :D
Sean McDonald
@bewsii
Apr 11 2016 09:00 UTC
that's good. gives a lot of room for junior level guys to get their feet wet in a production environment
kirbyedy
@kirbyedy
Apr 11 2016 09:00 UTC
so get your position as soon as possible
Sean McDonald
@bewsii
Apr 11 2016 09:00 UTC
just depends on how much coding becomes automated. but even then you need programmers to automate the automation lol
kirbyedy
@kirbyedy
Apr 11 2016 09:00 UTC
well yes, but usually employers are looking for a guy who just finished college and has 5years experience
Sean McDonald
@bewsii
Apr 11 2016 09:01 UTC
thats usually fluff
kirbyedy
@kirbyedy
Apr 11 2016 09:01 UTC
and juggles 5 balls with his ass
overtime
Sean McDonald
@bewsii
Apr 11 2016 09:01 UTC
programming is a lot like 3d art in that regard. they all say "we want a guy with 5 years experience and a B.S. in art".. but if you've never been to college and have a great portfolio
you'll get hired
kirbyedy
@kirbyedy
Apr 11 2016 09:02 UTC
thats a good thing then
Sean McDonald
@bewsii
Apr 11 2016 09:02 UTC
yeah. at least everything ive read about programming is basically "network constantly and have real projects in a portfolio and you'll find work!"
kirbyedy
@kirbyedy
Apr 11 2016 09:03 UTC
in 10 years or...
:D
Sean McDonald
@bewsii
Apr 11 2016 09:03 UTC
experience is great, so is a degree. but a lot of recruiters just use it to deter people with no skills or confidence
hell, ive never been asked where I got my degree, or if I even had one in a 3d artist position interview. lol
even though most of the job listings "require" it
kirbyedy
@kirbyedy
Apr 11 2016 09:06 UTC
you have a link to your portfolio ?
3d stuff
Sean McDonald
@bewsii
Apr 11 2016 09:07 UTC
i have stuff scattered everywhere atm lol. took my website down cause i got sick of paying for it, but i have a couple things on artstation
kirbyedy
@kirbyedy
Apr 11 2016 09:10 UTC
nice
is vray still used in 3dmax ?
Sean McDonald
@bewsii
Apr 11 2016 09:10 UTC
yeah
vray/mental ray. but vray is more powerful, especially with architectural visualization
kirbyedy
@kirbyedy
Apr 11 2016 09:13 UTC
yep, I used that long time ago
for this for example: http://img.photobucket.com/albums/v719/kobajagrande/3D%20djubre/LRv2_f3.jpg
Sean McDonald
@bewsii
Apr 11 2016 09:13 UTC
nice!
i love vray
kirbyedy
@kirbyedy
Apr 11 2016 09:14 UTC
and this: http://img.photobucket.com/albums/v719/kobajagrande/3D%20djubre/A3sbRed_1600x1200raw.jpg
but that was like 7-8 years ago
then I stopped with 3d, never did anything decent
Sean McDonald
@bewsii
Apr 11 2016 09:14 UTC
takes a lot of practice
kirbyedy
@kirbyedy
Apr 11 2016 09:15 UTC
yes
Sean McDonald
@bewsii
Apr 11 2016 09:15 UTC
ive done well over 10K hours of modeling
kirbyedy
@kirbyedy
Apr 11 2016 09:15 UTC
10 years :D
like programming :D
oooh thats a lot
Sangeetha
@manmarziyan
Apr 11 2016 09:21 UTC
@kirbyedy what about after may? (When they take it down)
kirbyedy
@kirbyedy
Apr 11 2016 09:22 UTC
@manmarziyan dont know, follow discussions on reddit
Nikolay-Buinenko
@Nikolay-Buinenko
Apr 11 2016 10:47 UTC
hi, everyone
Islam Ibakaev
@dagman
Apr 11 2016 11:18 UTC
could somebody please review my js code here http://codepen.io/dagman/pen/jqZbje?editors=0110
Nikolay-Buinenko
@Nikolay-Buinenko
Apr 11 2016 11:19 UTC
@dagman ok, will look at
@dagman what question do You have?
@dagman I like it)
Stephen James
@sjames1958gm
Apr 11 2016 11:21 UTC
@dagman Looks like you have a good start there, unique X and O :)
Islam Ibakaev
@dagman
Apr 11 2016 11:31 UTC
@sjames1958gm @Nikolay-Buinenko does the code correct for future use?
Nikolay-Buinenko
@Nikolay-Buinenko
Apr 11 2016 11:33 UTC
i am not so experienced in js, but I think yes
Paul Borawski
@iAmNawa
Apr 11 2016 11:38 UTC
@dagman I like the photos that you used
it doesn’t tell you when you win though
Islam Ibakaev
@dagman
Apr 11 2016 11:39 UTC
@iAmNawa still in progress should add a lot of functionality :smile:
J Player
@Heyjp
Apr 11 2016 11:57 UTC
is there a way I can write this so it's all in one line

button:nth-child(4) {
  background-color: yellow;
}

button:nth-child(4):hover {
  background-color: yellow;
}

button:nth-child(4):hover:focus {
  background-color: yellow;
}
Chase
@Belax8
Apr 11 2016 12:04 UTC

@Heyjp Yep just do this:

button:nth-child(4), button:nth-child(4):hover, button:nth-child(4):hover:focus  {
  background-color: yellow;
}

That should work

J Player
@Heyjp
Apr 11 2016 12:08 UTC
worked perfectly, thanks @Belax8
CamperBot
@camperbot
Apr 11 2016 12:08 UTC
heyjp sends brownie points to @belax8 :sparkles: :thumbsup: :sparkles:
:star: 276 | @belax8 | http://www.freecodecamp.com/belax8
Stephen James
@sjames1958gm
Apr 11 2016 12:34 UTC
@dagman Yes - you should be able to build on this.
Sumit Roy
@sroy8091
Apr 11 2016 13:33 UTC

// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};

function checkObj(checkProp) {
// Your Code Here
myVar=myObj.hasOwnProperty("checkProp");
if (myVar==true)
{
return myObj.myVar;
}
else {
return "Not Found";
}

}

// Test your code by modifying these values
checkObj("gift");

whats wrong in this code?
Stephen James
@sjames1958gm
Apr 11 2016 13:34 UTC
@sroy8091 don't pass a string to hasOwnProperty
random-x
@random-x
Apr 11 2016 13:35 UTC
@sroy8091 first thing: checkProp is a variable inside your function.. it's not a string... don't put quotes around variable names
Sumit Roy
@sroy8091
Apr 11 2016 13:37 UTC
ok but then what should be the return code in if statement? @random-x @sjames1958gm
Stephen James
@sjames1958gm
Apr 11 2016 13:38 UTC
return myObj.myVar; -> this should be return myObj[checkProp]
Sumit Roy
@sroy8091
Apr 11 2016 13:39 UTC
Thanks @sjames1958gm @random-x
CamperBot
@camperbot
Apr 11 2016 13:39 UTC
sroy8091 sends brownie points to @sjames1958gm and @random-x :sparkles: :thumbsup: :sparkles:
:star: 133 | @random-x | http://www.freecodecamp.com/random-x
:star: 580 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
MichaelTsang
@MichaelTsang
Apr 11 2016 14:09 UTC
need help~
Ademola Adegbuyi
@ooade
Apr 11 2016 14:09 UTC
@MichaelTsang what help?
MichaelTsang
@MichaelTsang
Apr 11 2016 14:10 UTC
Wikipedia Viewer , i get the json and i can't get the value i need
here 's the link
and if i use $.each() the object would not sort by index but by pageid , that 's not what i want
cause $.each() An object is a member of the type Object. It is an unordered collection of properties each of which contains a primitive value, object, or function. A function stored in a property of an object is called a method.
Ademola Adegbuyi
@ooade
Apr 11 2016 14:19 UTC
@MichaelTsang Can i please see your code?
codercooooder
@codercooooder
Apr 11 2016 14:19 UTC
guys I have a row of svgs with text unerneat them that scale nicely BUT when the text underneath one is larger, divs widths get thrown off. I need to the svg divs and the svgs to stay the same size, and for the text to wrap/not effects the svg size. anyone? http://codepen.io/ihatecoding/pen/WwMEYB
all the svgs should stay equal size
MichaelTsang
@MichaelTsang
Apr 11 2016 14:20 UTC
@marhyorh
$(document).ready(function(){

    var link = "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&generator=search&exsentences=1&exlimit=15&exintro=1&exsectionformat=wiki&gsrsearch=Apple"
    $.getJSON(link,function(data){
        var pages = data.query.pages;
        var sorted = [];

        $.each(pages,function(key,value){
            console.log(key+value.title);
        })
    });
});
random-x
@random-x
Apr 11 2016 14:21 UTC
@MichaelTsang yep.. as you correctly note, objects are unordered. the only way I can think of to ensure you get something ordered out would be to dump the objects into an array, then sort the array based on the index property.
MichaelTsang
@MichaelTsang
Apr 11 2016 14:23 UTC
@random-x i thought it before but it's too complicated... and i wonder if there any simple way to do
random-x
@random-x
Apr 11 2016 14:24 UTC
@MichaelTsang hmm.. if you find one, let me know :) it shouldn't be TOO tough to do, though. just a bit inefficient-feeling
MichaelTsang
@MichaelTsang
Apr 11 2016 14:26 UTC
@random-x sure , i will try your method later ~ thanks for hrlp
CamperBot
@camperbot
Apr 11 2016 14:26 UTC
michaeltsang sends brownie points to @random-x :sparkles: :thumbsup: :sparkles:
MichaelTsang
@MichaelTsang
Apr 11 2016 14:26 UTC
help..
CamperBot
@camperbot
Apr 11 2016 14:26 UTC

Hi, I'm CamperBot! I can help you in this chatroom :smile:

Basic Commands:

  • find TOPIC find all entries about topic. ex: find js
  • wiki TOPIC show contents of topic page
  • thanks @username send brownie points to another user
  • about @username shows info on that user
  • Algorithm BONFIRENAME info on a Algorithm

:speech_balloon: meet CamperBot in this room!

:pencil: read more about camperbot on the FCC Wiki

:star: 134 | @random-x | http://www.freecodecamp.com/random-x
MichaelTsang
@MichaelTsang
Apr 11 2016 14:34 UTC
@random-x
$(document).ready(function(){

    var link = "https://en.wikipedia.org/w/api.php?action=query&format=json&prop=extracts&generator=search&exsentences=1&exlimit=15&exintro=1&exsectionformat=wiki&gsrsearch=Apple"
    $.getJSON(link,function(data){
        var pages = data.query.pages;
        var sorted = [];

        $.each(pages,function(key,value){
            sorted.push(value);
        })
        sorted.sort(function(a,b){
            return a.index - b.index;
        });
            console.log(sorted);

    });
});
@random-x it works
Ademola Adegbuyi
@ooade
Apr 11 2016 14:36 UTC
@MichaelTsang Sorry i was Out :thumbsup:
MichaelTsang
@MichaelTsang
Apr 11 2016 14:37 UTC
@marhyorh no, just study from others , not a big deal
codercooooder
@codercooooder
Apr 11 2016 14:37 UTC
@MichaelTsang are you any good with svgs/css?
MichaelTsang
@MichaelTsang
Apr 11 2016 14:37 UTC
just a beginner. sry
codercooooder
@codercooooder
Apr 11 2016 14:38 UTC
@MichaelTsang waaaaaah , ok :)
Ademola Adegbuyi
@ooade
Apr 11 2016 14:46 UTC
Oky
random-x
@random-x
Apr 11 2016 14:49 UTC
@MichaelTsang congrats :)
@MichaelTsang exactly as I would do! :)
Elbert Cortez
@trip16661
Apr 11 2016 15:02 UTC
@MichaelTsang oh i just saw you link
it's still lacking the data information where the links are located
how are you going to do the linking the tittle to the wikipedia page?
Ademola Adegbuyi
@ooade
Apr 11 2016 15:13 UTC
@trip16661 all the data are in the sorted variable. Loop through or map around the sorted variable then grab the title
Elbert Cortez
@trip16661
Apr 11 2016 15:15 UTC
@marhyorh I'm talkign about the data information as the id, link and so on
she/he is going to need that in order to link the tittles to the actual wikipedia page in order to finish the challenge
Ademola Adegbuyi
@ooade
Apr 11 2016 15:23 UTC
@trip16661 the data contains title "Apple II series". Link url would be https://en.wikipedia.org/wiki/Apple II series .It would be encoded to https://en.wikipedia.org/wiki/Apple_II_series
Tim Arsenault
@TimArsen
Apr 11 2016 15:23 UTC
I need help debugging my Wikipedia viewer's api call
Elbert Cortez
@trip16661
Apr 11 2016 15:25 UTC
you see the problem behind that logic?
that you need to change the characters in order to create a link
Ademola Adegbuyi
@ooade
Apr 11 2016 15:26 UTC
@trip16661 what about this encodeURI("https://en.wikipedia.org/wiki/Apple II series")
Elbert Cortez
@trip16661
Apr 11 2016 15:26 UTC
not only that but there are some pages with the same tittle just different type coding
i still think the safest path is getting the data route though the api
that's what i did
Tim Arsenault
@TimArsen
Apr 11 2016 15:27 UTC
find api
Elbert Cortez
@trip16661
Apr 11 2016 15:28 UTC
that or using the id the json object gives and transforming the id into an actuall webpage link but that create more work
@TimArsen i'm not good at debuging cuz im new af but if you need help i can
Ademola Adegbuyi
@ooade
Apr 11 2016 15:29 UTC
@trip16661 i get. You can make another ajax request to https://en.wikipedia.org/w/api.php?action=query&prop=info&pageids=yourId&inprop=url then grab the fullurl there. Checkout the first id on her list https://en.wikipedia.org/w/api.php?action=query&prop=info&pageids=856&inprop=url
Elbert Cortez
@trip16661
Apr 11 2016 15:30 UTC
@marhyorh that's what im telling you
making two ajax request for the same thing is not good
plus you are working twice as much
Remi Rampin
@remram44
Apr 11 2016 15:30 UTC
Hi! I'm looking to make a web-terminal thingie, for teaching purposes
Elbert Cortez
@trip16661
Apr 11 2016 15:30 UTC
there is a path in the api that let you see the data info
Ademola Adegbuyi
@ooade
Apr 11 2016 15:30 UTC
yeah, i tried to avoid that too
Remi Rampin
@remram44
Apr 11 2016 15:32 UTC
kind of like the Git tutorial from GitHub: https://try.github.io/levels/1/challenges/4
Basically an interactive "enter this" step-by-step tutorial
Is there something off-the-shelf I can reuse or do I have to write this?
Ademola Adegbuyi
@ooade
Apr 11 2016 15:34 UTC
@remram44 your question is not clear please
Remi Rampin
@remram44
Apr 11 2016 15:34 UTC
It's not?
I just want to provide the possible commands for the program I'm teaching and the responses at different steps, and have a terminal display in the browser for people to play with my tool
the less JavaScript I have to write the better
Ademola Adegbuyi
@ooade
Apr 11 2016 15:40 UTC
@remram44 you just need need to type git add octocat.txt
Remi Rampin
@remram44
Apr 11 2016 15:40 UTC
Yeah but if you type git status it will give you the correct output, etc
at each stage you can type different things (though only one thing will make you advance)
I just want to make something like that for my own command-line tool
Mark Murphy
@MarkMurphy06
Apr 11 2016 15:42 UTC
@remram44 are you saying you want to make a guide for git commands or just command line in general?
Remi Rampin
@remram44
Apr 11 2016 15:42 UTC
I want to make a guide for a specific command-line tool that is not Git
Ademola Adegbuyi
@ooade
Apr 11 2016 15:43 UTC
@remram44 Okay!
Remi Rampin
@remram44
Apr 11 2016 15:43 UTC
I'm sorry if that wasn't clear :/
Mark Murphy
@MarkMurphy06
Apr 11 2016 15:44 UTC
@remram44 Not a big deal. There are a ton of resources on line for this. And Codeacademy now has a free course for this too.
Remi Rampin
@remram44
Apr 11 2016 15:44 UTC
They do?
Ademola Adegbuyi
@ooade
Apr 11 2016 15:45 UTC
Yeah
Remi Rampin
@remram44
Apr 11 2016 15:47 UTC
sigh I know how to use the terminal, once again I'm looking to make my own guide for people to learn about a command-line tool that I made
kirbyedy
@kirbyedy
Apr 11 2016 15:47 UTC
@MarkMurphy06 tax
CamperBot
@camperbot
Apr 11 2016 15:47 UTC
kirbyedy sends brownie points to @markmurphy06 :sparkles: :thumbsup: :sparkles:
Mark Murphy
@MarkMurphy06
Apr 11 2016 15:47 UTC
@remram44 Sorry I misunderstood you. My fault.
CamperBot
@camperbot
Apr 11 2016 15:47 UTC
:star: 135 | @markmurphy06 | http://www.freecodecamp.com/markmurphy06
Nazim
@nazimkazim
Apr 11 2016 16:00 UTC
for show local weather project how get geographical coordinates through IP adress?
Islam Ibakaev
@dagman
Apr 11 2016 16:01 UTC
@nazimkazim yep
Nazim
@nazimkazim
Apr 11 2016 16:01 UTC
please how?
Islam Ibakaev
@dagman
Apr 11 2016 16:02 UTC
http request to ipinfo
@nazimkazim https://ipinfo.io/
Nazim
@nazimkazim
Apr 11 2016 16:04 UTC
@dagman thanks
CamperBot
@camperbot
Apr 11 2016 16:04 UTC
nazimkazim sends brownie points to @dagman :sparkles: :thumbsup: :sparkles:
:star: 387 | @dagman | http://www.freecodecamp.com/dagman
Islam Ibakaev
@dagman
Apr 11 2016 16:04 UTC
@nazimkazim :smile:
codercooooder
@codercooooder
Apr 11 2016 16:16 UTC
guys I could really use some help keeping this svgs equal size with big text and in in all screen sizes..http://codepen.io/ihatecoding/pen/WwMEYB
Jason Wilcox
@DenverRenGuy
Apr 11 2016 16:36 UTC
morning all
codercooooder
@codercooooder
Apr 11 2016 16:43 UTC
hi @DenverRenGuy
Nazim
@nazimkazim
Apr 11 2016 16:49 UTC
Hi i wrote a function to get geo coordinates via IP adress
like that:
$.getJSON('http://ipinfo.io', function(data){ var Latitude = data.loc; var Longitude = data.loc; console.log(data); console.log(Latitude); console.log(Longitude); })
however my Latitude/Longitude are joined how to split it?
random-x
@random-x
Apr 11 2016 16:56 UTC
@nazimkazim what does console.log(data) show?
JD Tadlock
@jdtdesigns
Apr 11 2016 16:56 UTC
@nazimkazim
Chase
@Belax8
Apr 11 2016 16:57 UTC
@codercooooder you have the svg's width defined two times (once inline and once in your CSS) They are both % so they change with your screen wide. If you want them all the same size no matter what then set them to a static width like "100px" or something
Nazim
@nazimkazim
Apr 11 2016 16:59 UTC
@random-x i wrote this line: var Latitude = data.loc.split(" ")[0]; and console.log show a string of coordinates 49.8119,73.0969
i want them to be split up
JD Tadlock
@jdtdesigns
Apr 11 2016 17:00 UTC
@nazimkazim Look at my post above
Nazim
@nazimkazim
Apr 11 2016 17:02 UTC
@jdtdesigns thanks!!!
CamperBot
@camperbot
Apr 11 2016 17:02 UTC
nazimkazim sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star: 396 | @jdtdesigns | http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Apr 11 2016 17:03 UTC
@nazimkazim welcome ;0
codercooooder
@codercooooder
Apr 11 2016 17:03 UTC
@Belax8 I would like them to be the same size as eachother but at the same time also media responsive
Jason Wilcox
@DenverRenGuy
Apr 11 2016 17:03 UTC
anyone have any suggestions for the icon component of the weather app. There are so many icon choices, it doesn't seem to make seens to just implement all of them in JS
codercooooder
@codercooooder
Apr 11 2016 17:04 UTC
@Belax8 my trouble is that the divs don't seem to stay width (20%)
Chase
@Belax8
Apr 11 2016 17:07 UTC
@codercooooder I changed your div to display: block; and float: left; and it seemed to work for me. But I'm not sure that is what you are going for.
codercooooder
@codercooooder
Apr 11 2016 17:09 UTC
@Belax8 which div?
Chase
@Belax8
Apr 11 2016 17:10 UTC
@codercooooder your div with the class of ey-col-1.
codercooooder
@codercooooder
Apr 11 2016 17:12 UTC
funny @Belax8 technically that keeps them the same size, but it throws off the alignment
I want the text to know to get smaller i guess....
i tried making the width important, that didn't work @Belax8
Chase
@Belax8
Apr 11 2016 17:15 UTC
@codercooooder Ya, sorry. I don't think I can help with that. Good luck.
Candice
@smrtsmrf
Apr 11 2016 17:31 UTC
is there a way for javscript to check if an error went to the console? I’d like to run a snippet of code only if an error wasn’t thrown
Arminas
@ArminasBek
Apr 11 2016 17:44 UTC
Guys I’m lost with weather app, does someone know good source to learn JSON or other source of knowledge to help me buit this app? :/
JD Tadlock
@jdtdesigns
Apr 11 2016 17:46 UTC
@ArminasBek jQuery makes using json easy. You just need to look at the ajax and getJSON methods and read their docs thoroughly and it will start to make sense.
Arminas
@ArminasBek
Apr 11 2016 17:49 UTC
thank you @jdtdesigns, What I want to do is to take city name from http://ipinfo.io/ API, assign it to variable and then pass this variable to http://api.openweathermap.org API and then show data in a web browser, am I going right way? I can’t figure out why I can’t assign city name from first source to variable :/
CamperBot
@camperbot
Apr 11 2016 17:49 UTC
arminasbek sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star: 397 | @jdtdesigns | http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Apr 11 2016 17:53 UTC
@ArminasBek the easier approach is to just use the locator in the browser
read up on navigator.geolocation
Arminas
@ArminasBek
Apr 11 2016 17:54 UTC
thank you going to the hustle;)
@jdtdesigns thanks :)
CamperBot
@camperbot
Apr 11 2016 17:54 UTC
arminasbek sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:warning: arminasbek already gave jdtdesigns points
Henry Quinn
@Quinncuatro
Apr 11 2016 18:08 UTC
Anyone up to help with a quick margin problem?
Uğur
@UgurKurt
Apr 11 2016 18:09 UTC
Hi guys,why my navigation ul element doesnt display in one line
any help will be apreciated
Henry Quinn
@Quinncuatro
Apr 11 2016 18:09 UTC
When you size down to mobile size, there's a huge gap in between the username and whatever they're playing.
@UgurKurt - Well for one, you don't have any words or anything to display in the <ul>
Alexandre
@alexandre-mouton-brady
Apr 11 2016 18:11 UTC
Hey, I have a little problem with the Wikipedia API. I'm trying to read the JSON after making a request but I'm getting an error : "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://en.wikipedia.org/w/api.php?action=opensearch&search=Booba&limit=10&namespace=0&format=json. (Reason: CORS header 'Access-Control-Allow-Origin' missing).", the problem is that I don't see why beaucse if you click the link, the JSON seems correct
ZokaKami
@ZokaKami
Apr 11 2016 18:11 UTC
guys i am ultra stuck
how to add a script to a button to show a random code
google isnt helpfull at all
Bruce Young
@mutantspore
Apr 11 2016 18:12 UTC
@Dextr36 add on &callback=?
Alexandre
@alexandre-mouton-brady
Apr 11 2016 18:12 UTC
Trying, brb :P <3
Uğur
@UgurKurt
Apr 11 2016 18:12 UTC
I got li elements in it
and they are full
Henry Quinn
@Quinncuatro
Apr 11 2016 18:12 UTC
@UgurKurt http://getbootstrap.com/components/#navbar Check this out.
And in the pen you posted, there's nothing displayable in your <li>'s
may be an old save
check this out
Alexandre
@alexandre-mouton-brady
Apr 11 2016 18:14 UTC
@mutantspore You're a hero <3
Henry Quinn
@Quinncuatro
Apr 11 2016 18:14 UTC
Anyone want to take a look at my margins in a mobile sized window? The row size explodes when you size down. http://codepen.io/quinncuatro/full/GZQvzX/
Uğur
@UgurKurt
Apr 11 2016 18:14 UTC
i checked it,i did what it says
Nazim
@nazimkazim
Apr 11 2016 18:15 UTC
In my "Local Weather" project i want my city to be shown on web page.... how to get object
http://codepen.io/nazimkazim/pen/Bjgrzw
Islam Ibakaev
@dagman
Apr 11 2016 18:21 UTC
hey guys i have just done with Tic Tac Toe just a basic functionality. Could u check javascript code? http://codepen.io/dagman/pen/jqZbje?editors=0010
ZctrapCoding
@ZctrapCoding
Apr 11 2016 18:25 UTC
@dagman hey whats scss?
Islam Ibakaev
@dagman
Apr 11 2016 18:26 UTC
@ZctrapCoding what? :worried:
@ZctrapCoding css preproccessor
ZctrapCoding
@ZctrapCoding
Apr 11 2016 18:26 UTC
oh okay im not that advanced
im just doing the counting cards one
Henry Quinn
@Quinncuatro
Apr 11 2016 18:31 UTC
@UgurKurt I have no idea.
@ZctrapCoding , it's a way to add functionality to your css. For instance, you can set a color equal to a variable. like "$badasspurple: #123456;"
Then whenever you want to use it, you can reference $badasspurple instead of having to remember the color value
Henry Quinn
@Quinncuatro
Apr 11 2016 18:42 UTC
@UgurKurt In your CSS you set the UL to 60px. Did you mean to set your li elements at 60px?
Regardless, taking that one line of CSS out fixes your issue
ZctrapCoding
@ZctrapCoding
Apr 11 2016 18:56 UTC
@Quinncuatro cool! @celestialz ill check it out!
Juwdohr
@Juwdohr
Apr 11 2016 19:11 UTC
Hey so with the Twitch TV api, how do you tell if a streamer has closed their Twitch account (or the account never existed)?
Stephen James
@sjames1958gm
Apr 11 2016 19:15 UTC
@Juwdohr You will get an different json structure with an error field.
random-x
@random-x
Apr 11 2016 19:15 UTC
awright, I think I am done with you, silly clock. http://codepen.io/random-x/full/YqYyww/
Stephen James
@sjames1958gm
Apr 11 2016 19:15 UTC
{"error":"Unprocessable Entity","message":"Channel 'brunofin' is unavailable","status":422}/
Juwdohr
@Juwdohr
Apr 11 2016 19:15 UTC
@sjames1958gm So do a check for the error field first?
Stephen James
@sjames1958gm
Apr 11 2016 19:15 UTC
@Juwdohr Check.
Juwdohr
@Juwdohr
Apr 11 2016 19:25 UTC
@sjames1958gm Would if(data.error == true) return a true or false?
ElvisTheStriker
@ElvisTheStriker
Apr 11 2016 19:27 UTC
@random-x That's a distinctly Scottish "awright"!
random-x
@random-x
Apr 11 2016 19:27 UTC
@ElvisTheStriker haha! was it? I'm not Scottish, but I'll take it
Dylan
@dhcodes
Apr 11 2016 19:27 UTC
@random-x looks good. Works on my mobile too. Good work
Candice
@smrtsmrf
Apr 11 2016 19:28 UTC
can anyone help me out on my calculator with some regex and order of operations?
random-x
@random-x
Apr 11 2016 19:28 UTC
tanks, @dhcodes
CamperBot
@camperbot
Apr 11 2016 19:28 UTC
random-x sends brownie points to @dhcodes :sparkles: :thumbsup: :sparkles:
:star: 601 | @dhcodes | http://www.freecodecamp.com/dhcodes
Islam Ibakaev
@dagman
Apr 11 2016 19:28 UTC
@smrtsmrf regex?
Stephen James
@sjames1958gm
Apr 11 2016 19:29 UTC
@Juwdohr Probably want if (data.error) or use hasOwnProperty
Dylan
@dhcodes
Apr 11 2016 19:30 UTC
@dagman regular expressions
Juwdohr
@Juwdohr
Apr 11 2016 19:30 UTC
@smrtsmrf Order of operations is radicals, parenthesis, multiplication, division, addition, and subtraction. Where Multiplication and division are the same level, along with addition and subtraction.
Candice
@smrtsmrf
Apr 11 2016 19:30 UTC
@Juwdohr Yes, I fully understand order of operations. I want to make my calculator follow them.
right now it’s doing multiplication first, then exponent
Islam Ibakaev
@dagman
Apr 11 2016 19:30 UTC
@dhcodes yeah i know what it means i'm just curious why regex in calculator?
I’m displaying the input, then I’m converting it in order to do the calculation.
Dylan
@dhcodes
Apr 11 2016 19:31 UTC
@smrtsmrf converting to number?
Candice
@smrtsmrf
Apr 11 2016 19:32 UTC
@dagman I’m working with regex to try to get the exponents to work.
@dhcodes I’m using eval()
Dylan
@dhcodes
Apr 11 2016 19:32 UTC
@smrtsmrf ah, I think I used parseInt()
Candice
@smrtsmrf
Apr 11 2016 19:32 UTC
it’s working fine thus far, just run into a snag with exponents
Islam Ibakaev
@dagman
Apr 11 2016 19:32 UTC
@smrtsmrf you neednt make it so complex
Candice
@smrtsmrf
Apr 11 2016 19:32 UTC
@dhcodes that doesn’t work with operations in there.
Dylan
@dhcodes
Apr 11 2016 19:32 UTC
@smrtsmrf going above and beyond with the scientific calc I see... lol
Candice
@smrtsmrf
Apr 11 2016 19:33 UTC
@dhcodes yeah, I figured I might as well make something that I would actually use
Islam Ibakaev
@dagman
Apr 11 2016 19:33 UTC
@smrtsmrf i used basic functionality https://codepen.io/dagman/pen/NNXdxw
Dylan
@dhcodes
Apr 11 2016 19:34 UTC
@smrtsmrf what do you want to do with regex?
remove a specific character or ?
Candice
@smrtsmrf
Apr 11 2016 19:38 UTC
@dhcodes If you check out my code, I’m working on the 1/x button. I’m trying to get the exponent to work properly, so it does exponent before multiply
Dylan
@dhcodes
Apr 11 2016 19:43 UTC
@smrtsmrf based on how 1/x works on the calc on my mac, would this work? $('#entry').prepend('1/')
seems to yield the same values unless I'm missing something
well you have to click equals, but you could pseudo click it
Candice
@smrtsmrf
Apr 11 2016 19:48 UTC
@dhcodes well the problem is that there’s lots of operations being chained together. so I don’t just want 1/(number), but 1/(number) in a string of operations
Dylan
@dhcodes
Apr 11 2016 19:52 UTC
ah, well idk then. I guess you could have it run the equals and store it in memory before it prepends 1/x. Best of luck
I'm too newb
kunokdev
@kunokdev
Apr 11 2016 19:57 UTC
Has anyone ever used multi range slider? mention me if so.
Jenni
@silverrain64
Apr 11 2016 20:04 UTC
Question about the Wikipedia viewer. I've got it to where a set of search results will list on my page... but those results are simply in alphabetical order. What's the query parameter to get results that are topically related?
(Yes, I've been reading the API info on MediaWiki, and apparently I'm not smart enough to comprehend it...)
Juwdohr
@Juwdohr
Apr 11 2016 20:08 UTC
This message was deleted
Reuben Varzea
@reubenv
Apr 11 2016 20:09 UTC
starting the random quote machine challenge - any one have an API they liked for pulling the quotes from?
Juwdohr
@Juwdohr
Apr 11 2016 20:10 UTC
@reubenv easyiest way to do it is create your own array.
Reuben Varzea
@reubenv
Apr 11 2016 20:11 UTC
True... hadn't thought of that @Juwdohr. Thanks!
CamperBot
@camperbot
Apr 11 2016 20:11 UTC
reubenv sends brownie points to @juwdohr :sparkles: :thumbsup: :sparkles:
:star: 294 | @juwdohr | http://www.freecodecamp.com/juwdohr
Josh Bivens
@joshbivens
Apr 11 2016 20:14 UTC
Anyone know what the -u in git push -u origin master stands for?
nm
ElvisTheStriker
@ElvisTheStriker
Apr 11 2016 20:19 UTC
Hi Folks. I'm looking for a decent random quote api... any suggestions?
Juwdohr
@Juwdohr
Apr 11 2016 20:20 UTC
@ElvisTheStriker Make your own array.
ElvisTheStriker
@ElvisTheStriker
Apr 11 2016 20:23 UTC
@Juwdohr I'm going through the exercises and the deal with api's so I would like to get some experience of working with them
Brian
@sludge256
Apr 11 2016 20:33 UTC

@joshbivens

-u
--set-upstream
For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull1 and other commands. For more information, see branch.<name>.merge in git-config1.

https://git-scm.com/docs/git-push

Jared Abel
@jaredabel
Apr 11 2016 20:33 UTC
if anyone has a few moments to help me work out some bugs on my tic tac toe it would be appreciated
http://codepen.io/jaredabel00/pen/PNQYZv
after a game or two it seems like certain variables aren't resetting properly so the next game isn't start from a clean slate
Stephen James
@sjames1958gm
Apr 11 2016 20:41 UTC
@jaredabel I think by calling startgame you are recreating everything so you have multiple handlers on the squares.
random-x
@random-x
Apr 11 2016 20:44 UTC
@sjames1958gm @jaredabel all your functions are nested INSIDE of startGame.. so it's recursively calling, in fact
Stephen James
@sjames1958gm
Apr 11 2016 20:47 UTC
@jaredabel Yeah, just remove all those calls to start game, clear board is enough
@jaredabel Maybe not :o:
Juwdohr
@Juwdohr
Apr 11 2016 20:50 UTC
Hey anyone know how to change a button from active to non-active? (via javascript)
Jeff
@adzam5
Apr 11 2016 20:51 UTC
How do I update an object where a property has a certain value?
Stephen James
@sjames1958gm
Apr 11 2016 20:52 UTC
@jaredabel 1) remove extra calls to startgame. 2) don't set running to false in clear board 3) Return true/false from checkwin and only call enemy turn if not a win or draw
random-x
@random-x
Apr 11 2016 20:52 UTC
@Juwdohr if you're using jquery, $("#buttonID").prop("disabled", true);
Jasmina Babic
@animsaj
Apr 11 2016 20:52 UTC
@adzam5 objectName.propertyName = newValue;
Jeff
@adzam5
Apr 11 2016 20:54 UTC
@animsaj Sorry, I worded my question wrong. I need to add an additional property/value where an existing property has a specific value
Jasmina Babic
@animsaj
Apr 11 2016 20:54 UTC
@adzam5 example code?
Jeff
@adzam5
Apr 11 2016 20:57 UTC

For example...

"employees": [
    {
    "id": "01",
    "firstName": "John",
    "lastName": "Doe",
    },

How would I add "phone": "123-456-7890"

Jared Abel
@jaredabel
Apr 11 2016 20:57 UTC
thanks @random-x and @sjames1958gm
CamperBot
@camperbot
Apr 11 2016 20:57 UTC
jaredabel sends brownie points to @random-x and @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 591 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
:star: 137 | @random-x | http://www.freecodecamp.com/random-x
Juwdohr
@Juwdohr
Apr 11 2016 20:58 UTC
@random-x I have the a button set to active but whenever you click on another button it is still grayed as if you are clicked on 2 buttons only want 1 button.
Jasmina Babic
@animsaj
Apr 11 2016 20:58 UTC
employees[0].phone = "123-456-7890";
Jeff
@adzam5
Apr 11 2016 20:59 UTC
I need to add based on the value of the id though
Jasmina Babic
@animsaj
Apr 11 2016 21:00 UTC
employees[0] is your first object in the array of objects.I don't understand what id has to do with phone..
Jeff
@adzam5
Apr 11 2016 21:01 UTC
I will not always know the position of the object
Stephen James
@sjames1958gm
Apr 11 2016 21:01 UTC
@adzam5 Then you'll need a loop or something to find the right entry in your array then
random-x
@random-x
Apr 11 2016 21:02 UTC
@Juwdohr I don't understand what that means exactly
Jasmina Babic
@animsaj
Apr 11 2016 21:02 UTC
This message was deleted
This message was deleted
Jeff
@adzam5
Apr 11 2016 21:04 UTC
@animsaj @sjames1958gm Thank you
CamperBot
@camperbot
Apr 11 2016 21:04 UTC
adzam5 sends brownie points to @animsaj and @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 478 | @animsaj | http://www.freecodecamp.com/animsaj
:star: 592 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Jasmina Babic
@animsaj
Apr 11 2016 21:04 UTC
This message was deleted
@adzam5 if (employees[i].id === "01") inside a loop
Peter Daily
@thepeted
Apr 11 2016 21:05 UTC
This message was deleted
Dardan Demiri
@dardandemiri
Apr 11 2016 21:11 UTC
Hey Amazing Developers
How are we supposed to get the Thumbnail of a streamer if he is not Live Streaming
Object {stream: null, _links: Object}
_links
:
Object
channel
:
"https://api.twitch.tv/kraken/channels/freecodecamp"
self
:
"https://api.twitch.tv/kraken/streams/freecodecamp"
__proto__
:
Object
stream
:
null
__proto__
:
Object
all what it returns is the Channel and self two same links
? Any idea
Jeff
@adzam5
Apr 11 2016 21:14 UTC
@animsaj @sjames1958gm Thanks again. I've been working on this all day and finally got it. I had to create a json object in php from multiple mysql tables
Stephen James
@sjames1958gm
Apr 11 2016 21:15 UTC
@adzam5 :+1: :clap:
Dardan Demiri
@dardandemiri
Apr 11 2016 21:15 UTC
@sjames1958gm any Idea about my Question ?
Dardan Demiri
@dardandemiri
Apr 11 2016 21:20 UTC
@sjames1958gm How did you found the answer ?
Did you google it ?
Stephen James
@sjames1958gm
Apr 11 2016 21:21 UTC
@dardandemiri Yes
twitch api offline user info
Dardan Demiri
@dardandemiri
Apr 11 2016 21:22 UTC
That's what I need to know how to get answers
Thank you @sjames1958gm
CamperBot
@camperbot
Apr 11 2016 21:22 UTC
dardandemiri sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 593 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
ElvisTheStriker
@ElvisTheStriker
Apr 11 2016 21:27 UTC
Hi Folks. I'm looking for a decent random quote api... any suggestions?
Dardan Demiri
@dardandemiri
Apr 11 2016 21:27 UTC
Yes
@ElvisTheStriker
sorry wrong URL
Wait ...
ElvisTheStriker
@ElvisTheStriker
Apr 11 2016 21:29 UTC
@dardandemiri Thanks, but I've tried that one and it keeps returning the same quote
CamperBot
@camperbot
Apr 11 2016 21:29 UTC
elvisthestriker sends brownie points to @dardandemiri :sparkles: :thumbsup: :sparkles:
:star: 286 | @dardandemiri | http://www.freecodecamp.com/dardandemiri
But actually what I suggest you is you should create your own api
ALINATSUI
@ALINATSUI
Apr 11 2016 21:31 UTC
@ElvisTheStriker Hey, I'm working on this one too and not sure how to get started....other than creating website and using math.random to cycle through the different quotes...
Dardan Demiri
@dardandemiri
Apr 11 2016 21:32 UTC
That's all what you need @ALINATSUI
Make an Array like this:
ALINATSUI
@ALINATSUI
Apr 11 2016 21:32 UTC
@dardandemiri really?
Dardan Demiri
@dardandemiri
Apr 11 2016 21:32 UTC
[
  {
    "quote":"Happiness is not something you postpone for the future; it is something you design for the present.",
    "author":"Jim Rohn"
  },
  {
    "quote":"What you do today can improve all your tomorrows.",
    "author":"Ralph Marston"
  }
}
ALINATSUI
@ALINATSUI
Apr 11 2016 21:33 UTC
@dardandemiri Oh! that is pretty do-able...I'm planning to take quotes from Hamilton musical, so I think I'll leave the authors out.
Dardan Demiri
@dardandemiri
Apr 11 2016 21:33 UTC
That's even easier
ALINATSUI
@ALINATSUI
Apr 11 2016 21:34 UTC
Thanks @dardandemiri!! I was seriously freaking out about API's...
CamperBot
@camperbot
Apr 11 2016 21:34 UTC
alinatsui sends brownie points to @dardandemiri :sparkles: :thumbsup: :sparkles:
:star: 287 | @dardandemiri | http://www.freecodecamp.com/dardandemiri
Dardan Demiri
@dardandemiri
Apr 11 2016 21:36 UTC
var array = [
"Happiness is not something you postpone for...",
"Another quote ... etc etc"
];

// And you access them 

array[ Math.round(Math.random() * array.length)];
ALINATSUI
@ALINATSUI
Apr 11 2016 21:37 UTC
thanks @dardandemiri ! You make it look so easy...
CamperBot
@camperbot
Apr 11 2016 21:37 UTC
alinatsui sends brownie points to @dardandemiri :sparkles: :thumbsup: :sparkles:
Dardan Demiri
@dardandemiri
Apr 11 2016 21:37 UTC
var randomNR = Math.round(Math.random() * array.length);

array[randomNR];
CamperBot
@camperbot
Apr 11 2016 21:38 UTC
:warning: alinatsui already gave dardandemiri points
Dardan Demiri
@dardandemiri
Apr 11 2016 21:38 UTC
that's a better way
Good Luck
@ALINATSUI
ALINATSUI
@ALINATSUI
Apr 11 2016 21:39 UTC
sounds good, I'm going to have to brush up on my math.random function...it's been a long while.
Dardan Demiri
@dardandemiri
Apr 11 2016 21:41 UTC
;)
Jose
@jdramos
Apr 11 2016 21:41 UTC
I need help in Stand in Line, i dont know what to do exactly
ALINATSUI
@ALINATSUI
Apr 11 2016 21:41 UTC
@jdramos Show us your code.
Jose
@jdramos
Apr 11 2016 21:42 UTC
blob
blob
Elijah
@Elijahhh
Apr 11 2016 21:45 UTC
@jdramos What is the name fro that exercise ?
Jasmina Babic
@animsaj
Apr 11 2016 21:46 UTC
@jdramos just do arr.push(item) and than save to a variable result of arr.shift() return that variable. that's it!
Jose
@jdramos
Apr 11 2016 21:46 UTC
Stand in Line
Juwdohr
@Juwdohr
Apr 11 2016 21:46 UTC
got everything working; not sure how to do the search? any help
http://codepen.io/Jarvis-327/pen/BKWvYw
Dardan Demiri
@dardandemiri
Apr 11 2016 21:52 UTC
@Juwdohr
You start with a Key Listener
$('#searchInput').on('keyup', function() {
    var input = $(this);

});
first when user start to write Remove all Streamers from List.
And while the user writes, compare the letter with all your streamers name
if it is there show them...
you don't remove them by deleting
just by hiding
Juwdohr
@Juwdohr
Apr 11 2016 21:55 UTC
@dardandemiri I know you hide them
Dardan Demiri
@dardandemiri
Apr 11 2016 21:55 UTC
$(".streamers").css("display","none");
Do you have the idea what you need now ?
Juwdohr
@Juwdohr
Apr 11 2016 21:56 UTC
@dardandemiri a little bit not sure how to search through each of the streamers.
Dardan Demiri
@dardandemiri
Apr 11 2016 21:57 UTC
You use the .indexOf() function
array.indexOf(input);
you can do it in other ways too
But that's one way
Jose
@jdramos
Apr 11 2016 21:59 UTC
@animsaj where ?
Jasmina Babic
@animsaj
Apr 11 2016 22:01 UTC
@jdramos inside of the function.3 statment: arr.push(item); var returned = arr.shift(); return returned;
@jdramos 3 statements
Jose
@jdramos
Apr 11 2016 22:04 UTC
finally, thank for your help @animsaj
CamperBot
@camperbot
Apr 11 2016 22:04 UTC
jdramos sends brownie points to @animsaj :sparkles: :thumbsup: :sparkles:
:star: 480 | @animsaj | http://www.freecodecamp.com/animsaj
Wojciech Kałużny
@mrkaluzny
Apr 11 2016 22:21 UTC
Hi! I need some help with Twitch TV App
I did everything except for information when the account is closed
When I call data from Twitch’s API it doesnt return anything for accounts that were closed
Coy Sanders
@coymeetsworld
Apr 11 2016 22:25 UTC
check status inside your data variable @mrkaluzny
Susan Harrison
@stharrison1
Apr 11 2016 22:34 UTC
Does a json file have to have the same number of objects to work or can it vary?
Example:
    "title": "My Resume"
},{
    "title": "Highlights of Qualifications
",
    "body”: “sdafsdfasfd”
}]
ehekatlOf
@ehekatlOf
Apr 11 2016 22:37 UTC
@mrkaluzny check out the error function
make sure you turn on cross domain
Juwdohr
@Juwdohr
Apr 11 2016 22:38 UTC
@mrkaluzny it actually does. check for errors.
Jorge Castaño Delgado
@jhcastanod
Apr 11 2016 22:38 UTC
hey guys, im doing my portafolio webpage but i dont know how add my works to it... anyone of you can suggest me a webpage where i can find useful info. thanks
ehekatlOf
@ehekatlOf
Apr 11 2016 22:39 UTC
can't you just make a bunch of divs?
put them in bootstrap containers
and then href a screencap?
Juwdohr
@Juwdohr
Apr 11 2016 22:40 UTC
Jorge Castaño Delgado
@jhcastanod
Apr 11 2016 22:40 UTC
Im there, but what item should i look for there?
Coy Sanders
@coymeetsworld
Apr 11 2016 22:40 UTC
@stharrison1 yeah that should work
you don't need to have "body" in both your objects for example if that's what you're asking
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 22:41 UTC
how am i able to grab the 'snippet' info in this object?
Susan Harrison
@stharrison1
Apr 11 2016 22:41 UTC
@coymeetsworld Thanks!
CamperBot
@camperbot
Apr 11 2016 22:41 UTC
stharrison1 sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star: 520 | @coymeetsworld | http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Apr 11 2016 22:41 UTC
np
Juwdohr
@Juwdohr
Apr 11 2016 22:43 UTC
Dardan Demiri
@dardandemiri
Apr 11 2016 22:44 UTC
@Dueldrawer8 what do you mean snippet ?
Juwdohr
@Juwdohr
Apr 11 2016 22:44 UTC
@jhcastanod What are you looking for?
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 22:44 UTC
@dardandemiri when i console.log my data.. i get a bunch of objects.. what im trying to do is access each snippet within each object under search
Stephen James
@sjames1958gm
Apr 11 2016 22:44 UTC
@Dueldrawer8 If you use console.log(JSON.stringify(data.query.search)); it is easier to see the structure
@sjames1958gm It is an array where snippet is a property so data.query.search[0].snippet is the first one, loop over to get all the data.
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 22:46 UTC
ahh thanks @sjames1958gm
CamperBot
@camperbot
Apr 11 2016 22:46 UTC
dueldrawer8 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star: 596 | @sjames1958gm | http://www.freecodecamp.com/sjames1958gm
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 22:46 UTC
im on wikipedia api
eventually when a user clicks search, i want those snippets to display
on the page
ehekatlOf
@ehekatlOf
Apr 11 2016 22:47 UTC
yeah, what sjames said
Jorge Castaño Delgado
@jhcastanod
Apr 11 2016 22:47 UTC
@Juwdohr I need to create a thumbail images showing my projects using placeholders
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 22:47 UTC
i know there is 10 of them.. and then i want to create 10 boxes with those snippets in it
the hard part is being able to create those boxes when the user hits enter and getting those values into the boxes
ehekatlOf
@ehekatlOf
Apr 11 2016 22:47 UTC
just create a loop of i
and assign respect i based on the array position
ehekatlOf
@ehekatlOf
Apr 11 2016 22:48 UTC
@jhcastanod have you done all of the bootstrap and jquery tutorials on the site?
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 22:49 UTC
i think my logic is everywhere here so i thought id start out small by first getting the data..so i need to create a loop thanks to @ehekatlOf and @sjames1958gm and display it to page which i can do. but then im stuck on assigning 1 box to each snippet
CamperBot
@camperbot
Apr 11 2016 22:49 UTC
dueldrawer8 sends brownie points to @ehekatlof and @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: dueldrawer8 already gave sjames1958gm points
:star: 249 | @ehekatlof | http://www.freecodecamp.com/ehekatlof
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 22:49 UTC
which sounds like ill need another loop and maybe some events
ehekatlOf
@ehekatlOf
Apr 11 2016 22:49 UTC
look into .append()
you'll need to do that for the twitch API project as well
Jorge Castaño Delgado
@jhcastanod
Apr 11 2016 22:50 UTC
@Juwdohr that's what I need. thanks so much
CamperBot
@camperbot
Apr 11 2016 22:50 UTC
jhcastanod sends brownie points to @juwdohr :sparkles: :thumbsup: :sparkles:
:star: 295 | @juwdohr | http://www.freecodecamp.com/juwdohr
Dina Maria
@dfaithberry
Apr 11 2016 22:50 UTC
please help. I finally figured out how to get my submenu to close on window resize, unfortunately what is really happening is that my menu is toggling still on resize (so slideUp/SlideDown). Any ideas how to keep it close until click? http://codepen.io/dfaithberry/full/WwpJyy/
Jorge Castaño Delgado
@jhcastanod
Apr 11 2016 22:51 UTC
@ehekatlOf yes, the thing is you have to look for the info by yourself... but thanks for your help
CamperBot
@camperbot
Apr 11 2016 22:51 UTC
jhcastanod sends brownie points to @ehekatlof :sparkles: :thumbsup: :sparkles:
:star: 250 | @ehekatlof | http://www.freecodecamp.com/ehekatlof
ehekatlOf
@ehekatlOf
Apr 11 2016 22:51 UTC
np man, good luck
Matthew Robertson
@mrmatt1877
Apr 11 2016 23:01 UTC
When I click a button on my app it has a white background until I click elsewhere. How do I remove this>
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 23:14 UTC
@ehekatlOf this doesnt work
$.each(data, function(){
      console.log(data.query.search[i].snippet);
    })
   }
does the data.query need to go in the first parameter?
Stephen James
@sjames1958gm
Apr 11 2016 23:16 UTC
@Dueldrawer8 With modern browsers you don't have to use jquery.each - use
data.query.search.forEach(function(entry) {
console.log(entry.snippet);
})
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 23:17 UTC
alright thank you @sjames1958gm
CamperBot
@camperbot
Apr 11 2016 23:17 UTC
dueldrawer8 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: dueldrawer8 already gave sjames1958gm points
Stephen James
@sjames1958gm
Apr 11 2016 23:17 UTC
@Dueldrawer8 If you want to use jquery:
    $.each(data.query.search, function(index, entry){
      console.log(entry.snippet);
    })
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 23:28 UTC
is there a way i can get the value in a textbox when i press enter or submit?
or do i need to write seperate functions for thsoe
Stephen James
@sjames1958gm
Apr 11 2016 23:29 UTC
$("#selector").val()
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 23:52 UTC
<div class="container">
  <div id="center">
    <input type ="textbox" placeholder="search">
    <input type="submit" value="Submit">
  </div>  
</div>
#center {
  margin: 100px auto;
}
that should center my text box and buttons correct?
Stephen James
@sjames1958gm
Apr 11 2016 23:54 UTC
I think it is
width: 100px;
margin: auto;
Randy Goldsmith
@Dueldrawer8
Apr 11 2016 23:55 UTC
yes it does center it, the submit button goes below my text box though
Dardan Demiri
@dardandemiri
Apr 11 2016 23:56 UTC
Does anyone know why I can not create an array in this example:
Stephen James
@sjames1958gm
Apr 11 2016 23:57 UTC
@dardandemiri Do you pay your array creation fees?
Dardan Demiri
@dardandemiri
Apr 11 2016 23:57 UTC
hahahhaha :P All of them :P
Stephen James
@sjames1958gm
Apr 11 2016 23:57 UTC
@dardandemiri Where in the code?
Dardan Demiri
@dardandemiri
Apr 11 2016 23:57 UTC
In the bottom
Stephen James
@sjames1958gm
Apr 11 2016 23:58 UTC
I see the comment
Dardan Demiri
@dardandemiri
Apr 11 2016 23:58 UTC
yeah
Candice
@smrtsmrf
Apr 11 2016 23:59 UTC
@sjames1958gm could you take a look at my exponent code again? I’ve changed a few things, and now it’s not working properly with a 2 digit exponent. :( https://codepen.io/smrtsmrf/pen/jqZEGo?editors=0010
Stephen James
@sjames1958gm
Apr 11 2016 23:59 UTC
@smrtsmrf Just a bit helping @dardandemiri