These are chat archives for FreeCodeCamp/Help

9th
Mar 2018
Albert Cardona II
@daddycardona
Mar 09 2018 00:06
@khaduch I will be back after the 15th or maybe after the 19th
Kyle Holm
@thekholm80
Mar 09 2018 00:06
@daddycardona jail?
Albert Cardona II
@daddycardona
Mar 09 2018 00:06
hey yall glad to see you all here
LMAO yeah no lol I am moving to a bigger apartment and have my kids that weekend I am not getting them this weekend so there will be less mess LOL
Kyle Holm
@thekholm80
Mar 09 2018 00:07
oh, well i guess that's fun too :P
Albert Cardona II
@daddycardona
Mar 09 2018 00:08
LMAO yeah I don't like jail or prison I am always someones you know lol
Kyle Holm
@thekholm80
Mar 09 2018 00:08
lol
Albert Cardona II
@daddycardona
Mar 09 2018 00:09
is beta up n running properly yet I just might start over lol been so long again to me
Kyle Holm
@thekholm80
Mar 09 2018 00:09
i think it's still beta
so some days it's good, some days it's not
Albert Cardona II
@daddycardona
Mar 09 2018 00:10
yeah I hate that I want to coninue here on just the regular site but I forgot to much
Kyle Holm
@thekholm80
Mar 09 2018 00:11
i feel ya
every time i try to write some code i have to relearn something stupid
Albert Cardona II
@daddycardona
Mar 09 2018 00:12
yeah I know me too :)
Kyle Holm
@thekholm80
Mar 09 2018 00:12
started doing code academy's python course yesterday, it's been pretty fun
Albert Cardona II
@daddycardona
Mar 09 2018 00:14
that is awesome
Kyle Holm
@thekholm80
Mar 09 2018 00:14
i'm not sure i'm smart enough to do 2 languages
Albert Cardona II
@daddycardona
Mar 09 2018 00:14
I don't think I am ever going to truly understand code like some people
You are, basically regular expressions are the same lol
Kyle Holm
@thekholm80
Mar 09 2018 00:15
i'm worried i'll lose the rest of my JS knowledge
Albert Cardona II
@daddycardona
Mar 09 2018 00:16
Like the software engineers keep saying practice and master the concepts of programming and the syntax will come easier and naturally in all languages.
also know what the hell you want to program and what you want it to do always helps lol
Kyle Holm
@thekholm80
Mar 09 2018 00:16
lol yeah
Albert Cardona II
@daddycardona
Mar 09 2018 00:16
Yeah I suck at rmemembering all this
Kyle Holm
@thekholm80
Mar 09 2018 00:17
if you're learning electronics you should check out assembly
i think a lot of microcontrolers are programmed in assembly
Albert Cardona II
@daddycardona
Mar 09 2018 00:20
some are programmed in c too
pcl
Kyle Holm
@thekholm80
Mar 09 2018 00:20
it's all greek to me
Albert Cardona II
@daddycardona
Mar 09 2018 00:21
sorry plg
PLC programmable Logic Circuit.
Kyle Holm
@thekholm80
Mar 09 2018 00:21
final answer?
:D
Albert Cardona II
@daddycardona
Mar 09 2018 00:22
I can do simple c commands that are pre written to make it work. I have a space mountian kinect replica where I go to school and I will do videos once I start working on them for you
It wil be in my uncle al teach others lol
youtube page :)
Kyle Holm
@thekholm80
Mar 09 2018 00:23
oh cool, i'd definitely like to see that
Albert Cardona II
@daddycardona
Mar 09 2018 00:23
me too lol
I mean see it in action
talk to you guys later well at least you and I can't wait to start up again here on a regula thanks @thekholm80 you are alwasy helpful ;)
CamperBot
@camperbot
Mar 09 2018 00:26
daddycardona sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1717 | @thekholm80 |http://www.freecodecamp.org/thekholm80
Kyle Holm
@thekholm80
Mar 09 2018 00:26
@daddycardona keep kicking butt, and thanks for the thanks
hmm
image.png
JS is weird
c oco
@naturerespiro
Mar 09 2018 03:15
who can help me delate all type?
is right?
i can not run test
Aditya
@ezioda004
Mar 09 2018 03:57
@naturerespiro I suppose you need to uncomment? so remove <!-- -->
Alan R. Grinberg
@alagrin92
Mar 09 2018 05:26
Having trouble with the Regex and capturing groups... can anyone help?
Fabien SHAN
@X140hu4
Mar 09 2018 05:29
Formulate your problem and what you have tried.
Alan R. Grinberg
@alagrin92
Mar 09 2018 05:31
Goal: Use capture groups in reRegex to match numbers that are repeated only three times in a string, each separated by a space..... Here's where after multiple attempts, I'm almost there... let reRegex = /(\d+\s\s)\1\1/g;
Fabien SHAN
@X140hu4
Mar 09 2018 05:47
Do you have an example of string @alagrin92
Fabien SHAN
@X140hu4
Mar 09 2018 05:54
@alagrin92 You could use this to test: https://regexr.com/
@alagrin92 /(\d+\s\s)\1\1/g could be simplified in /(\d+\s\s){3}/g ?
yuanwenwu
@yuanwenwu
Mar 09 2018 07:04
占位符要怎么加入
Darren
@DarrenfJ
Mar 09 2018 07:33
evening fCC
Claudio Restifo
@Marmiz
Mar 09 2018 07:51
@DarrenfJ :wave:
Frosty427
@Frosty427
Mar 09 2018 08:32
i require assistance
Fabien SHAN
@X140hu4
Mar 09 2018 08:40
We require more data
when i added an anchor to my images they got slightly moved to the left
the imac image goes smaller and pushed to the bottom left
Ahmad Abdolsaheb
@ahmadabdolsaheb
Mar 09 2018 08:41
does anyone know where I could share my app idea to see if campers find it useful?
Johnny
@JohnnyBizzel
Mar 09 2018 08:44
@ahmadabdolsaheb try the forum
Frosty427
@Frosty427
Mar 09 2018 08:46
plz help
jetjet-ma
@jetjet-ma
Mar 09 2018 08:49
I don't know,What does This section (Word Blanks)want me to do?
_
Ahmad Abdolsaheb
@ahmadabdolsaheb
Mar 09 2018 08:49
thanks @JohnnyBizzel
CamperBot
@camperbot
Mar 09 2018 08:49
ahmadabdolsaheb sends brownie points to @johnnybizzel :sparkles: :thumbsup: :sparkles:
:star2: 1804 | @johnnybizzel |http://www.freecodecamp.org/johnnybizzel
Johnny
@JohnnyBizzel
Mar 09 2018 08:50
@ahmadabdolsaheb :+1:
Fabien SHAN
@X140hu4
Mar 09 2018 08:52
@Frosty427 Move your col class to the parent element
Frosty427
@Frosty427
Mar 09 2018 08:53
all of them?
@X140hu4
Fabien SHAN
@X140hu4
Mar 09 2018 08:53
@Frosty427 Bootstrap needs to have the row>col hierarchy. At the moment you have row>anchor>col
Frosty427
@Frosty427
Mar 09 2018 08:53
ok
like this?
@X140hu4
Fabien SHAN
@X140hu4
Mar 09 2018 09:06
The hierarchy is row parent, col child (row>col)
@Frosty427 Please read the documentation, apply the knowledge and ask questions here if you dont understand.
Ycoroy
@Ycoroy
Mar 09 2018 09:49
How to change this line of code "<h2 style="color: blue">CatPhotoApp</h2>" to the (h2) element
Stephen James
@sjames1958gm
Mar 09 2018 10:31
@Ycoroy it already is an h2 element - is this a FCC challenge? Which one>
Ycoroy
@Ycoroy
Mar 09 2018 10:33
Only 14 lessons
Fabien SHAN
@X140hu4
Mar 09 2018 10:34
@Ycoroy A man needs a name
Stephen James
@sjames1958gm
Mar 09 2018 10:35
@Ycoroy Need the lesson name
Ycoroy
@Ycoroy
Mar 09 2018 10:36
Um, I also think, but I'm not good at English and I'm still slowly studying @X140hu4
Use a CSS Class to Style an Element
Stephen James
@sjames1958gm
Mar 09 2018 10:39
@Ycoroy Can you show all the code
Your h2 should have a class class=value not style=value for that lesson
Ycoroy
@Ycoroy
Mar 09 2018 10:41
I can replace h2 with h1I can replace h2 with h1
Oh, I don't know yet. Thank you for reminding me.
Stephen James
@sjames1958gm
Mar 09 2018 10:46
@Ycoroy What is your native language?
Ycoroy
@Ycoroy
Mar 09 2018 10:47
Chinese words
Stephen James
@sjames1958gm
Mar 09 2018 10:47
Fabien SHAN
@X140hu4
Mar 09 2018 10:49
@sjames1958gm He actually asked the question over there too xD
Yossi Fisch
@yoizfefisch
Mar 09 2018 10:50

Hi there, I am on Basic JavaScript: Understanding Undefined Value returned from a Function and it says:

The function will change the global sum variable but the returned value of the function is undefined.

If it's true that the global variable does change, then why do I get undefined when I run the following:

var sum = 0;
function addSum(num) {
  sum = sum + num;
}
addSum(3);
var returnedValue = sum;
Stephen James
@sjames1958gm
Mar 09 2018 10:51
@yoizfefisch the resulting value of a var statement is undefined, even when the variable is set to a value
var x = 10;
undefined
x
10
Yossi Fisch
@yoizfefisch
Mar 09 2018 10:52
@sjames1958gm Oh! thanks.
CamperBot
@camperbot
Mar 09 2018 10:52
yoizfefisch sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9073 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Frosty427
@Frosty427
Mar 09 2018 11:25
@X140hu4 thanks for the advice starting to understand it now
CamperBot
@camperbot
Mar 09 2018 11:25
frosty427 sends brownie points to @x140hu4 :sparkles: :thumbsup: :sparkles:
:cookie: 352 | @x140hu4 |http://www.freecodecamp.org/x140hu4
Amani Jones
@AmaniJones
Mar 09 2018 12:08
hi guys who here knows python and would like help me out with a little problem i have??? im stuck :worried:
hensn5250
@hensn5250
Mar 09 2018 12:20
@AmaniJones they have a python room
just post the question in the chat and eventually if someone is helpful they'll respond
Amani Jones
@AmaniJones
Mar 09 2018 12:21
where?
hensn5250
@hensn5250
Mar 09 2018 12:22
<------------------- see the magnifying glass to the upper left of the screen
type python in search bar
Amani Jones
@AmaniJones
Mar 09 2018 12:58
hey thanks guys @GitHub-Henry
CamperBot
@camperbot
Mar 09 2018 12:58
amanijones sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 538 | @github-henry |http://www.freecodecamp.org/github-henry
Amani Jones
@AmaniJones
Mar 09 2018 12:59
and @hensn5250
Alexander Køpke
@alexanderkopke
Mar 09 2018 14:10
@AmaniJones np :)
gishy1
@gishy1
Mar 09 2018 15:18
why isnt my javascript printing on my webpage?
i wanted this to print im reloaded nut it isnt working
ehutchllew
@ehutchllew
Mar 09 2018 15:22
@gishy1 try console.log not console.print
Kaz Baig
@kbaig
Mar 09 2018 15:22
@gishy1 console.log
gishy1
@gishy1
Mar 09 2018 15:25
tried it guys have a log
Fabien SHAN
@X140hu4
Mar 09 2018 15:29
@gishy1 Read again what people wrote above you
Kyle Holm
@thekholm80
Mar 09 2018 15:30
good morning help room denizens
have a 2nd look @kbaig @ehutchllew @X140hu4
ehutchllew
@ehutchllew
Mar 09 2018 15:49
@gishy1 it's working, check the console
gishy1
@gishy1
Mar 09 2018 15:52
@ehutchllew yes but why isnt it printing on the webpage?
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 15:53
@gishy1 to display something on the webpage using js, use document.write()
Darren
@DarrenfJ
Mar 09 2018 15:57
morning fCC
Kyle Holm
@thekholm80
Mar 09 2018 15:57
@DarrenfJ :wave:
Darren
@DarrenfJ
Mar 09 2018 15:58
@Marmiz missed yah yesterday... :D
@thekholm80 buddy what's up in your part of the world?
Kyle Holm
@thekholm80
Mar 09 2018 15:58
@DarrenfJ building a little python app to learn blockchains and flask
pretty fun
Darren
@DarrenfJ
Mar 09 2018 15:59
oo that sounds cool
Kyle Holm
@thekholm80
Mar 09 2018 15:59
it is! it's a pretty neat concept
Darren
@DarrenfJ
Mar 09 2018 16:00
so yer really 'building a crypto-blockchain-ML-other_buzzword-app'
;)
that is now my favourite quote btw
Kyle Holm
@thekholm80
Mar 09 2018 16:00
yeah, i told manish last night i'm making a blockchain tinder for dogs
so now i have 1 investor
Darren
@DarrenfJ
Mar 09 2018 16:01
count me in!
Kyle Holm
@thekholm80
Mar 09 2018 16:01
we're gonna be rich
oh crap, i gotta get the ML part in there
that's just a bunch of if/else statements, right?
Darren
@DarrenfJ
Mar 09 2018 16:03
ha!
Ycoroy
@Ycoroy
Mar 09 2018 16:05
blob
What area should the yellow area be inserted into?
Darren
@DarrenfJ
Mar 09 2018 16:05
ok, off to it
DarrenfJ @DarrenfJ testing bah!
gishy1
@gishy1
Mar 09 2018 16:10
@MuhammedKarim thats what i was looking for !! thanks !!
CamperBot
@camperbot
Mar 09 2018 16:10
gishy1 sends brownie points to @muhammedkarim :sparkles: :thumbsup: :sparkles:
:cookie: 138 | @muhammedkarim |http://www.freecodecamp.org/muhammedkarim
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 16:11
@gishy1 :+1:
gishy1
@gishy1
Mar 09 2018 16:35
guys i targeted the id using the getElementById method
but its giving me
[object HTMLDivElement]
what could be the issue
want it to print the list
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 16:37
@gishy1 btw it's spelt at Quote, im having a look
gishy1
@gishy1
Mar 09 2018 16:38
@MuhammedKarim hold on just saw a mistake!!!
wrong id
facepalm
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 16:39
@gishy1 Yup... and you're spelling Quote wrong throughout the whole page
gishy1
@gishy1
Mar 09 2018 16:39
@MuhammedKarim true
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 16:40
var listed=document.getElementById('list').innerHTML;
document.write(listed);
You forgot to put .innerHTML @gishy1
gishy1
@gishy1
Mar 09 2018 16:40
@MuhammedKarim why is that added on ?
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 16:43
@gishy1 .innerHTML accesses what is between the two tags... i think
I'm no expert at js at all
gishy1
@gishy1
Mar 09 2018 16:44
@MuhammedKarim bro thanks im learning by error so
CamperBot
@camperbot
Mar 09 2018 16:44
gishy1 sends brownie points to @muhammedkarim :sparkles: :thumbsup: :sparkles:
api offline
gishy1
@gishy1
Mar 09 2018 16:44
dont wory
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 16:45
@gishy1 That's just the basics i learnt tbh
gishy1
@gishy1
Mar 09 2018 16:46
Thanks either way
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 16:47
@gishy1 no worries
Daniel
@dkapexhiu
Mar 09 2018 16:47
Hi! someone can help me with this code? see the code in the comments. what am i doing wrong? i am getting an object with data: null
$('#getGoogleRestaurants').click(function(){

    var url = "request.php";

    $.getJSON('request.php',
        {
            location: map.center.lat()+","+map.center.lng()
        },
        function(data) {
        // reviews = data;
    }).success(function(data){
        data.results.forEach(function(data_restaurant){

            var restaurant = {
                'name': data_restaurant.name,
                'lat': data_restaurant.geometry.location.lat,
                'lng': data_restaurant.geometry.location.lng,
                'id': data_restaurant.id,
                'review': data_restaurant.rating
            };

            restaurant = addNewRestaurant(restaurant);
            if(restaurant !== false){
                addMarker(restaurant.lat,restaurant.lng,restaurant.name,restaurant.id);
            }

        });

    }).fail(function( jqxhr, textStatus, error ) {
        var err = textStatus + ", " + error;
        console.log( "Request Failed: " + err );
    });
});
Kaz Baig
@kbaig
Mar 09 2018 16:47
:wave: Help room
Happy Friday
gishy1
@gishy1
Mar 09 2018 16:48
any idea how i can intergate an unordered list with a button so when i click on the button the list appears
Kaz Baig
@kbaig
Mar 09 2018 16:49
@gishy1 add a click listener to the button that changes the visibility attr of the list
Ken Haduch
@khaduch
Mar 09 2018 17:03
@kbaig :wave: Happy Friday back to you!
Kaz Baig
@kbaig
Mar 09 2018 17:05
What projects are you guys working on
gishy1
@gishy1
Mar 09 2018 17:08
@kbaig thanks but im a boot confused as to what you said
CamperBot
@camperbot
Mar 09 2018 17:08
gishy1 sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 580 | @kbaig |http://www.freecodecamp.org/kbaig
tried hiding the list with jquery isnt responding
Frosty427
@Frosty427
Mar 09 2018 17:12
image.png
how can i make my hr shorter?
George Edward Bulmer
@gebulmer
Mar 09 2018 17:12
Any forum admins around? I tried to link to the bitcoin whitepaper in response to someone's query about the blockchain and have been banned for 1000 years
Frosty427
@Frosty427
Mar 09 2018 17:12
@gebulmer just wait it out
George Edward Bulmer
@gebulmer
Mar 09 2018 17:13
haha nice @Frosty427
man it sucks, just wanted to help someone out, is there any way of contacting someone to unban?
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 17:36
@gebulmer There is a group of admins...i believe
George Edward Bulmer
@gebulmer
Mar 09 2018 17:38
thanks @MuhammedKarim , I'll try there
CamperBot
@camperbot
Mar 09 2018 17:38
gebulmer sends brownie points to @muhammedkarim :sparkles: :thumbsup: :sparkles:
:cookie: 139 | @muhammedkarim |http://www.freecodecamp.org/muhammedkarim
Ghost
@ghost~5a4a80acd73408ce4f859755
Mar 09 2018 17:49
@gebulmer :+!
:+1:
@gishy1 Took a look at your jquery in that pen -
$('list') should be $('li')
If you want to make the clicked list item removed from the dom
Frosty427
@Frosty427
Mar 09 2018 17:58
image.png
how would i put that tiny american flag to the right of the copyright
Ken Haduch
@khaduch
Mar 09 2018 18:21
@frosty427- try a <span> element, it renders in-line with the text.
Daniel
@dkapexhiu
Mar 09 2018 18:31
someone knows how to do requests in php? i have some trouble..
Daniel
@dkapexhiu
Mar 09 2018 19:33
i have used it but it returns null data.. can you look for a moment in this file for what am i doing wrong?
https://gist.github.com/dkapexhiu/d0450959058e2f3506207cc549222b75
@AdelMahjoub
Adel
@AdelMahjoub
Mar 09 2018 19:40
@dkapexhiu what that $location variable contains
Daniel
@dkapexhiu
Mar 09 2018 19:45
$location should contain the coordinates of the user
Adel
@AdelMahjoub
Mar 09 2018 19:47
@dkapexhiu the request is working, check if curl is installed or available
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&type=restaurant&key=AIzaSyClo6C2PQkR5Tu8VO2lifNA1z3nZNUep5Q",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Cache-Control: no-cache",
    "Content-Type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
Daniel
@dkapexhiu
Mar 09 2018 19:57
hey thank you but now i am getting this error: Request Failed: parsererror, SyntaxError: Unexpected token c in JSON at position 0 if i do CURLOPT_URL => $url, and url is this:
$base_url = 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=';
$url=$base_url.$location.'&radius=500&type=restaurant&key=AIzaSyClo6C2PQkR5Tu8VO2lifNA1z3nZNUep5Q';
Adel
@AdelMahjoub
Mar 09 2018 19:59
@dkapexhiu get rid of CURLOPT_HTTPHEADER and CURLOPT_HTTP_VERSION
AlexJSx
@AlexJSx
Mar 09 2018 20:00
Hi guys! Is it possible to reload all of the questions on the site ?
*from a specific category
Adel
@AdelMahjoub
Mar 09 2018 20:02
@dkapexhiu or try using HttpRequest
<?php

$request = new HttpRequest();
$request->setUrl('https://maps.googleapis.com/maps/api/place/nearbysearch/json');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'location' => '-33.8670522,151.1957362',
  'radius' => '500',
  'type' => 'restaurant',
  'key' => 'AIzaSyClo6C2PQkR5Tu8VO2lifNA1z3nZNUep5Q'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
Daniel
@dkapexhiu
Mar 09 2018 20:06
can i do this:
$request->setQueryData(array(
  'location' => $location,
  'radius' => '500',
  'type' => 'restaurant',
  'key' => 'AIzaSyClo6C2PQkR5Tu8VO2lifNA1z3nZNUep5Q'
));
it shows an 500 internal server error
this is how i am doing the request to getJson from another file:
https://gist.github.com/dkapexhiu/0997faa017e08d4097451582d1696178
Daniel
@dkapexhiu
Mar 09 2018 20:22
@AdelMahjoub maybe the problem is with this second file:
https://gist.github.com/dkapexhiu/0997faa017e08d4097451582d1696178
Adel
@AdelMahjoub
Mar 09 2018 20:30
@dkapexhiu try requesting your php script using postman and see if it works
Daniel
@dkapexhiu
Mar 09 2018 20:35
i get this with postman: Unexpected 'A'
Adel
@AdelMahjoub
Mar 09 2018 20:36
@dkapexhiu time to some debugging then
Daniel
@dkapexhiu
Mar 09 2018 20:37
please look if the file i have sended before with gist is correct..
Adel
@AdelMahjoub
Mar 09 2018 20:38
@dkapexhiu if you are using a text editor, look for some extensions for php debugging if not already setup, if you are using an ide check its docs on how to set up a debug session
Daniel
@dkapexhiu
Mar 09 2018 20:44
Actually i am getting this error when debugging with chrome tools:
jquery.min.js:4 GET http://localhost:3000/request.php?location=44.08472%2C10.00626310000007 500 (Internal Server Error)
it is an error on getting the location variable