These are chat archives for FreeCodeCamp/HelpJavaScript

18th
May 2018
Keon Samuel
@keonsam
May 18 2018 00:35
Does any one knows how to use supertest with node-typescript?
Mike Haslam
@Ongomobile
May 18 2018 05:28

Hello having trouble with adding home screen icons to create react app In manifest.json I added many sizes example

{ “src”:”images/icons/apple-icon-57x57.png”,
“type”: “image/png”,
“sizes”: “57x57”,
}
in index.html i have links that look like

<link rel="apple-touch-icon" href=“images/icons/apple-icon-57x57.png" sizes="57x57" />

The icons are in public/images/icons

Thanks for having a look

qingshanlantian
@qingshanlantian
May 18 2018 06:00

任务
修改函数abTest当a或b小于0时,函数立即返回一个undefined并退出。 提示
记住undefined,是一个关键字,而不是一个字符串。 // 定义 abTest
function abTest(a, b) {

// 请把你的代码写在这条注释以下

// 请把你的代码写在这条注释以上

return Math.round(Math.pow(Math.sqrt(a) + Math.sqrt(b), 2));

}
// 你可以修改这一行来测试你的代码
abTest(-2,2);
怎么写?

Dhaval Vira
@dhavalveera
May 18 2018 06:23
@qingshanlantian this Group is not for People from Japan or China
this group is accessible from all over the world
so post anything in English
qingshanlantian
@qingshanlantian
May 18 2018 06:23
ok
Markus Kiili
@Masd925
May 18 2018 06:24
@qingshanlantian There is for example https://gitter.im/FreeCodeCamp/chinese
Not sure of what language you wrote there.
qingshanlantian
@qingshanlantian
May 18 2018 06:25
thank you
English
cjm
@mrscjm
May 18 2018 08:20
按照下面的顺序,并且用空格来分割:
反斜杠 制表符 退格符 回车符 换行符 并把它赋值给变量 myStr, I need help
Dhaval Vira
@dhavalveera
May 18 2018 08:20
no one understand what you have typed
abraham anak agung
@padunk
May 18 2018 08:23
@mrscjm :point_up: May 18, 2018 1:24 PM try Chinese room.
cjm
@mrscjm
May 18 2018 08:24
ok ,think
abraham anak agung
@padunk
May 18 2018 09:35
Hi, if i want to display an array of strings repeteadly with different delay time, what is the correct method to use? setInterval or setTimeout?
Markus Kiili
@Masd925
May 18 2018 09:41
@padunk setInterval suits events at fixed intervals, so I would say setTimeout.
abraham anak agung
@padunk
May 18 2018 09:45
@Masd925 Thanks, but how do you call setTimeout repeteadly? loop it?
CamperBot
@camperbot
May 18 2018 09:45
padunk sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4799 | @masd925 |http://www.freecodecamp.org/masd925
Dimitris Nik.
@dimitrissnk
May 18 2018 10:10
Hello there, is it possible to use the str.replace() method, and replace two values with two other at once?
so instead of var one = str.replace("SearchValue","NewValue"); var two = one.replace("SearchValue","NewValue"); declare only one variable and replace at once??
Markus Kiili
@Masd925
May 18 2018 10:12
@padunk Yes.
Aditya
@ezioda004
May 18 2018 10:39
@Dimitrios51 Yes, .replace takes a callback function which can be used to replace more than 2 values at once.
"cat and dog".replace(/(cat)|(dog)/g, val => val == "cat" ? "meow" : "woof"); // "meow and woof"
Dimitris Nik.
@dimitrissnk
May 18 2018 10:52
@ezioda004 It doesn't seem to work, and I don't quite understand the syntax :worried:
Jordan Shackelford
@JordanShackelford
May 18 2018 10:56
paypal or bitcoin me $100 and I will tell you about a security vulnerability on the freecodecamp website
Dimitris Nik.
@dimitrissnk
May 18 2018 10:56
@JordanShackelford sure
Jordan Shackelford
@JordanShackelford
May 18 2018 10:58
31qHvRppkuY6GykrJpHiNkDt5XQndmqEtC
Aditya
@ezioda004
May 18 2018 10:58

@Dimitrios51

var str = "cat and dog";
var replacedStr = str.replace(/(cat)|(dog)/g, function(toReplace){
    if (toReplace == "cat"){
        return "meow";
    }
    else {
        return "woof";
    }
});
console.log(replacedStr); // "meow and woof"

This is old syntax.

/(cat)|(dog)/g regex captures group and then you basically replace them one by one.
Dimitris Nik.
@dimitrissnk
May 18 2018 11:00
@ezioda004 Ohh I see...
I have an another problem too...I am trying to save geolocation coords in variables and then console.log() them, but it isn't seem to work
Aditya
@ezioda004
May 18 2018 11:01
May I see your code?
Dimitris Nik.
@dimitrissnk
May 18 2018 11:02
something like var longitude; longitude = position.coords.longitude; console.log(longitude);
Aditya
@ezioda004
May 18 2018 11:07
And this is inside the callback function of navigator.geolocation.getCurrentPosition right? Also I meant codepen link or something, easier to debug.
Dimitris Nik.
@dimitrissnk
May 18 2018 11:09
@ezioda004 I think I found it. Take a look if you dont bother https://codepen.io/dimitris51/pen/jzjaOX
Aditya
@ezioda004
May 18 2018 11:14
@Dimitrios51 Seems to be working? The longitude and latitudeare logging correctly.
You dont need to do window.onload = showPosition(); because you're calling that function in getLocation anyway.
Dimitris Nik.
@dimitrissnk
May 18 2018 11:32
@ezioda004 thanks for that, I deleted it.
CamperBot
@camperbot
May 18 2018 11:32
dimitrios51 sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 560 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Aditya
@ezioda004
May 18 2018 11:42
@Dimitrios51 BTW if you wanted to use regex on the URL, this seems to work.
 var newUrl = url.replace(/(latitude)|(longitude)/g, function(replace) {
   if (replace == "latitude")
      return  latitude;
   else  {
      return longitude;
   }
});
sabahatullah
@sabahatullah
May 18 2018 12:16
how do I extract number from "£ 57.00 per day" I want only 57
sabahatullah
@sabahatullah
May 18 2018 12:24
actually 5700
Aditya
@ezioda004
May 18 2018 12:24
For only 57 "£ 57.00 per day".match(/\d*(?=\.)/)[0]; this works
For 5700 "£ 57.00 per day".match(/\d/g).join(""); // 5700
sabahatullah
@sabahatullah
May 18 2018 12:27
awesome @ezioda004 I just don't understand regex. is there any course for stupids
I tried this https://regex101.com but still getting nowhere
Nate Mallison
@NJM8
May 18 2018 12:28
@sabahatullah https://regexone.com/
Aditya
@ezioda004
May 18 2018 12:28
@sabahatullah fcc beta have really good regex challenges, helped me a bunch.
regexone is actually a tutorial
sabahatullah
@sabahatullah
May 18 2018 12:29
thanks @NJM8 @ezioda004
CamperBot
@camperbot
May 18 2018 12:29
sabahatullah sends brownie points to @njm8 and @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 561 | @ezioda004 |http://www.freecodecamp.org/ezioda004
:cookie: 443 | @njm8 |http://www.freecodecamp.org/njm8
Nate Mallison
@NJM8
May 18 2018 12:29
regex101 is more of a tool for testing regex, I wouldn't use it, I've had it fail on matches that work in an app
regexr is another tool for testing them, but again I've had mixed results
Aditya
@ezioda004
May 18 2018 12:30
I use regex101 often for testing, never had that problem.
Nate Mallison
@NJM8
May 18 2018 12:31
@ezioda004 Yeah Idk, maybe it's me. I've tried to use it for matching to a set of criteria like the phone number challenge and when testing what I used in the challenge I get different results
sabahatullah
@sabahatullah
May 18 2018 12:35
apart from that there is another thing I am trying to do. I have 10 posts (Li) ordered by their Prices (Low to high) There is a special posts (outside these 10 posts) with a different pricing. I need a logic so it gets placed in within the 10 normal posts based on its price. anyidea what should be the course of action
Marianissimus
@Marianissimus
May 18 2018 12:40
Since your list items are already ordered, you need to loop once through the list and push the new post before the list reaches a higher price.
sabahatullah
@sabahatullah
May 18 2018 12:51
First I am inserting that post as a last post then looping through all the posts to get their prices.. pushing it in the array.
Then probably need to order the array by price? not sure if I am over complicating it
Marianissimus
@Marianissimus
May 18 2018 12:52
No, don't insert it untill you loop, you only need one loop. Do you have a pen?
Actually, that's not a bad idea, if it's just one loop - I don't know your sort algorithm, I suppose it's one loop.
Aditya
@ezioda004
May 18 2018 12:58
@sabahatullah If you dont care about algorithms complexity/efficiency then you can simply use .concat() and .sort() methods.
const combinedArr = arr1.concat(arr2);
combinedArr.sort((a, b) => compare a and b by their price);
Tiago Correia
@tiagocorreiaalmeida
May 18 2018 13:08
anyone who uses redis around?
Jason Luboff
@JLuboff
May 18 2018 15:30
Morning
Kaz Baig
@kbaig
May 18 2018 15:33
:point_up: May 17, 2018 4:35 PM @bjorno43 wowie, and here I am paying $75 a month for 100 down
Markus Kiili
@Masd925
May 18 2018 15:33
Evening.
Jason Luboff
@JLuboff
May 18 2018 15:33
@kbaig $30 for 100/10 here...but thats only because I'm bundled... unbundled I think it would be $45
@Masd925 Whats up
Kaz Baig
@kbaig
May 18 2018 15:37
@JLuboff I've got not no use for stuff I'd bundle it with. I get HBOGo with my internet package so there's that
Jason Luboff
@JLuboff
May 18 2018 15:38
We have cable and...a phone we don't use.. (I need to call about that..)
Danny Chan
@chandanny
May 18 2018 15:39
hello
Jason Luboff
@JLuboff
May 18 2018 15:39
Hi
Dhaval Vira
@dhavalveera
May 18 2018 15:39
Hey
Danny Chan
@chandanny
May 18 2018 15:40
do anyone try google analytics?
it's a great tool to monitor mobile and web app
Dhaval Vira
@dhavalveera
May 18 2018 15:41
Monitor mobile ×
n web app means
Danny Chan
@chandanny
May 18 2018 15:44
don't get it
Dhaval Vira
@dhavalveera
May 18 2018 15:44
what is the use of Google Anayltics
Markus Kiili
@Masd925
May 18 2018 15:47
@JLuboff Clojure. How about you?
Christopher McCormack
@cmccormack
May 18 2018 15:52
:wave: morning
Jason Luboff
@JLuboff
May 18 2018 16:02
@Masd925 Fixing some shit on my project
@cmccormack Yo
Christopher McCormack
@cmccormack
May 18 2018 16:05
@JLuboff better get it fixed before the boss makes you work the weekend!
Jason Luboff
@JLuboff
May 18 2018 16:08
@cmccormack Haha I was showing it off to my main boss yesterday and shit kept fucking up :joy: I had just been making changes and hadn't tested it yet along with ESLint messing up a few lines of code
Gulsvi
@gulsvi
May 18 2018 16:09
@dhavalveera It gives you telemetry data about your website - how long people visit certain pages, what links they click the most, what keywords they use to find your page in Google search results, etc
Dhaval Vira
@dhavalveera
May 18 2018 16:10
Ok
means Google Anayytics help
Google Anaylstics help to Improve Page search
Jason Luboff
@JLuboff
May 18 2018 16:11
@cmccormack One of my problems is I have extremely similar code for two different scenarios and I had modified one but not the other (I need to convert it into a function just haven't yet)
Christopher McCormack
@cmccormack
May 18 2018 16:12
@JLuboff haha well now I bet you're motivated to do a refactor session
Jason Luboff
@JLuboff
May 18 2018 16:14
Its coming
Boss was all cool with it though
He had forgotten what the project was in the first place hah (he overlooks several departments though so can't blame him)
Christopher McCormack
@cmccormack
May 18 2018 16:16
jeeze that probably doesn't feel great haha
Jason Luboff
@JLuboff
May 18 2018 16:17
Well there's a bit more to it then that.. essentially the individuals who asked me to do it proposed it to him and he said ya go for it and that was it. He isn't really overseeing it at all
Plus he isn't in this office
Christopher McCormack
@cmccormack
May 18 2018 16:22
ah ok well hopefully someone still cares about it besides you :)
Jason Luboff
@JLuboff
May 18 2018 16:23
Hahaha they do. I just had to provide some info to them the other day
Brad
@bradtaniguchi
May 18 2018 17:34
pew pew
Christopher McCormack
@cmccormack
May 18 2018 17:35
@bradtaniguchi sup
Brad
@bradtaniguchi
May 18 2018 17:35
:wave:
Jason Luboff
@JLuboff
May 18 2018 17:35
:wave:
Brad
@bradtaniguchi
May 18 2018 17:35
:wave:
Jason Luboff
@JLuboff
May 18 2018 17:35
:wave:
Christopher McCormack
@cmccormack
May 18 2018 17:36
:wave: I guess
Brad
@bradtaniguchi
May 18 2018 17:36
:clap:
Markus Kiili
@Masd925
May 18 2018 17:36
:imp:
Jason Luboff
@JLuboff
May 18 2018 17:37
@cmccormack Bad attitude :angry:
Brad
@bradtaniguchi
May 18 2018 17:37
:-1:
Christopher McCormack
@cmccormack
May 18 2018 17:37
:smirk:
Jason Luboff
@JLuboff
May 18 2018 17:39
'member when we didn't have emoji's?
Christopher McCormack
@cmccormack
May 18 2018 17:39
emoticons are still cool!
Jason Luboff
@JLuboff
May 18 2018 17:40
'member AIM?
Kudzu
@czhower
May 18 2018 17:46
Remember Compuserve :)
and BBSes
Brad
@bradtaniguchi
May 18 2018 17:59
I was too young for AIM, I just liked their logo tho haha
Jason Luboff
@JLuboff
May 18 2018 17:59
Too young? Christ.. how old are you?
Brad
@bradtaniguchi
May 18 2018 18:00
24, so I could of used AIM, since I was like in middle school. But I had no wifi = no internet
Jason Luboff
@JLuboff
May 18 2018 18:01
Oh.. you're only 5 years younger than me
I used that shit all through high school and even a few years after that
Nate Mallison
@NJM8
May 18 2018 18:02
who wants to help me with a cors issue
I hate cors
just let the hackers have it so I can do some work
Christopher McCormack
@cmccormack
May 18 2018 18:03
@NJM8 sure
Brad
@bradtaniguchi
May 18 2018 18:03
Yea 5 years to young to be cool :sunglasses: I had no one to talk to, and at the time thought everyone was going to scam me on the internet so I was scared haha
Christopher McCormack
@cmccormack
May 18 2018 18:03
ICQ was the best but none of my friends used it
Jason Luboff
@JLuboff
May 18 2018 18:04
:joy:
Never used ICQ...didn't understand it...weren't usernames just random numbers? lol
Nate Mallison
@NJM8
May 18 2018 18:04
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at URL. (Reason: CORS preflight channel did not succeed).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at URL. (Reason: CORS request did not succeed).
Christopher McCormack
@cmccormack
May 18 2018 18:04
I still remember my ICQ number
haha
@NJM8 which api?
Nate Mallison
@NJM8
May 18 2018 18:05
it that something I need to set on my app or on the DB
Christopher McCormack
@cmccormack
May 18 2018 18:05
server
Nate Mallison
@NJM8
May 18 2018 18:05
vue-resource is making the http calls, firebase is the db
Christopher McCormack
@cmccormack
May 18 2018 18:05
well it depends
the server may have an option that you can specify from the client
do you control the server? Is it a node/express server?
Jason Luboff
@JLuboff
May 18 2018 18:07
Hmmm... think I'm finally going to get this Raspberry Pi setup today
Nate Mallison
@NJM8
May 18 2018 18:07
I'm confused a bit because in the tutorial the requests worked just fine
it's just a firebase simple db, just make post or get requests to the url they generate
Christopher McCormack
@cmccormack
May 18 2018 18:08
@JLuboff ohh fun!
what are you going to do with it?
@NJM8 i've never used firebase so I'm not sure how it's hosted sorry
Jason Luboff
@JLuboff
May 18 2018 18:09
@cmccormack Another conference room sign. So really just using it to show a web browser in kiosk mode. But need to setup VNC, Kiosk mode, etc on it (and turn it 90 degrees since it'll be a vertical screen)
Kudzu
@czhower
May 18 2018 18:09
@NJM8 I cant tell you how much I miss the internet of old before we had all these troublemakers... when it was just academics and geeks. Sure security is necessary, but it was a lot nicer when it was simpler and without trolls and hackers.
Christopher McCormack
@cmccormack
May 18 2018 18:09
if you're installing firebase it looks like it installs the cors pacakge by default
@JLuboff why vnc, just so you can see it from your workstation when testing?
Nate Mallison
@NJM8
May 18 2018 18:11
@cmccormack yeah but I'm not installing locally, just making calls to the db with URL's
Christopher McCormack
@cmccormack
May 18 2018 18:11
@NJM8 where is the db hosted though?
Can you provide an example call?
Nate Mallison
@NJM8
May 18 2018 18:12
    saveData(){
      this.$http.post(`https://the-stock-trader.firebaseio.com/${this.getIp}`, this.getOwnedStocks)
        .then(res => {
          alert('Stocks Saved');
          console.log(res);
        }, error => {
          alert('Opps, there was an error saving, try again');
          console.log(error);
        })
    },
Jason Luboff
@JLuboff
May 18 2018 18:12
@cmccormack So I don't have to hook up a mouse and keyboard if I need to change anything
Christopher McCormack
@cmccormack
May 18 2018 18:12
@JLuboff SSH not good enough for ya?
Jason Luboff
@JLuboff
May 18 2018 18:13
@cmccormack It'll be hanging on the wall, so gets a little difficult
I wanna see what I'm doing!
Christopher McCormack
@cmccormack
May 18 2018 18:13
I mean...
if it's on the wall you should be able to still SSH and see what you're doing haha
Jason Luboff
@JLuboff
May 18 2018 18:14
SSH is strictly command line..no?
Christopher McCormack
@cmccormack
May 18 2018 18:16
@NJM8 try adding mode: cors in an options object
not sure though may need to read firebaseio's docs
Nate Mallison
@NJM8
May 18 2018 18:21
uhhhhhh
I forgot it only accepts json, just need to add .json at the end
i got the cors error probably because it thought it was a different url or something
dumb
Christopher McCormack
@cmccormack
May 18 2018 18:25
@NJM8 I saw that too on SO :)
Aymen
@AymenAlSalem
May 18 2018 18:48
Hello everyone :) ,, i have a problem with my code to solve " Sum All Numbers in a Range Challenge " and here is my code :

``` function sumAll(arr) {
var maxNumb = Math.max(arr[0],arr[1]);
var minNumb =Math.min(arr[0],arr[1]);
var newArr = new Array(arr);
for (var i=minNumb; i <= maxNumb; i++){
newArr.push(i);
}

console.log(newArr); // [1,2,3,4]

var sumArr = newArr.reduce(function(previousVal, currentVal) {
return previousVal + currentVal;
}, 0);
console.log(sumArr); // 01,41234 ?
}

sumAll([1, 4]);```

i know i don't need "reduce" and can solve the challenge with for loop only but i just wonder what did i do wrong
Jason Luboff
@JLuboff
May 18 2018 18:49
@AymenAlSalem It should be new Array()
not new Array(arr)
Your newArr is actually [ [ 1, 4 ], 1, 2, 3, 4 ] not [1, 2, 3, 4]
Aymen
@AymenAlSalem
May 18 2018 18:52
@JLuboff thank you so much
CamperBot
@camperbot
May 18 2018 18:52
aymenalsalem sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:star2: 2415 | @jluboff |http://www.freecodecamp.org/jluboff
Aymen
@AymenAlSalem
May 18 2018 18:52
btw how do i place a code here in the chat ?
Nate Mallison
@NJM8
May 18 2018 18:53
backticks just have to be on their own lines
otherwise you got it right
Aymen
@AymenAlSalem
May 18 2018 18:53
thank you @NJM8
CamperBot
@camperbot
May 18 2018 18:53
aymenalsalem sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 444 | @njm8 |http://www.freecodecamp.org/njm8
Nate Mallison
@NJM8
May 18 2018 18:53
your welcome
you're
Kudzu
@czhower
May 18 2018 18:53
Is a shame gitter doesn have a simple button for code...would make it so much more obvious
Nate Mallison
@NJM8
May 18 2018 18:54
@czhower Idk Udemy has that for their code challenge submissions and it took me three days to figure it. Plus it un-formats things. Terrible implementation
Christopher McCormack
@cmccormack
May 18 2018 18:55
Slack has a snippet button that's pretty nice
Kudzu
@czhower
May 18 2018 18:56
Could be done easily in gitter.
Christopher McCormack
@cmccormack
May 18 2018 19:54
In case anyone missed it there was a great blog post recently on How to work with the DevTools Console and Console API: an overview
Jason Luboff
@JLuboff
May 18 2018 20:08
@cmccormack Neat. I always like learning more about console
Christopher McCormack
@cmccormack
May 18 2018 20:14
@JLuboff yeah - console.dir and console.table are great!
And grouping is nice as well
Brad
@bradtaniguchi
May 18 2018 20:14
@cmccormack cool stuff, never knew how much it offered haha
Jason Luboff
@JLuboff
May 18 2018 20:14
I still end up mainly using console.log() but.. been using console.time()/console.timeEnd() in my current project to make sure my queries aren't taking too long
Christopher McCormack
@cmccormack
May 18 2018 20:16
I feel like we should all strive to write articles like this just to force ourselves to learn more about a topic
Jason Luboff
@JLuboff
May 18 2018 20:17
I'd be afraid that I'd be writing a lot of misinformation :joy:
Christopher McCormack
@cmccormack
May 18 2018 20:18
eh let the commenters correct you
Jason Luboff
@JLuboff
May 18 2018 20:21
ehhhh
Christopher McCormack
@cmccormack
May 18 2018 20:22
I'm sure if you get it working and keep it vague enough it will be fine haha
Jason Luboff
@JLuboff
May 18 2018 20:22
Lol
Henry
@GitHub-Henry
May 18 2018 20:25
@cmccormack good stuff, thanks for the link
CamperBot
@camperbot
May 18 2018 20:25
github-henry sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1459 | @cmccormack |http://www.freecodecamp.org/cmccormack
Christopher McCormack
@cmccormack
May 18 2018 20:26
np
Conor Murphy
@cmurphy580
May 18 2018 20:30
Would anyone mind checking this out? New to firebase, oAuth and rest, just want to make sure that it works.
Christopher McCormack
@cmccormack
May 18 2018 20:31
@cmurphy580 yeah seems to be working great
Not sure why when you click a link it shows a giant image though
Maybe minimize again when you click the image when blown up?
Brad
@bradtaniguchi
May 18 2018 20:32
@cmurphy580 How come the app is on heroku if its using firebase? Was there something with firefase hosting? (Im curious more than anything :) )
Conor Murphy
@cmurphy580
May 18 2018 20:34
@cmccormack sweet thanks for checking it out. If you scroll up there should be some text. I'll go back and animate that part so it does it for you. @bradtaniguchi thanks for checking it out. Firebase persists the article provider the user is currently reading, so when they logout/reload those articles reload. Also using firebase for oAuth. Heroku is jus the server I'm using.
CamperBot
@camperbot
May 18 2018 20:34
cmurphy580 sends brownie points to @cmccormack and @bradtaniguchi :sparkles: :thumbsup: :sparkles:
:star2: 1460 | @cmccormack |http://www.freecodecamp.org/cmccormack
:cookie: 484 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
Brad
@bradtaniguchi
May 18 2018 20:35
But like @cmccormack said it looks good :D, and ah I see cool stuff
Conor Murphy
@cmurphy580
May 18 2018 20:35
@bradtaniguchi sweet thanks again
CamperBot
@camperbot
May 18 2018 20:35
cmurphy580 sends brownie points to @bradtaniguchi :sparkles: :thumbsup: :sparkles:
api offline
Brad
@bradtaniguchi
May 18 2018 20:36
Is the code on github, Id like to star it so I can refer to your firebase stuff for my own projects hehe :P
Conor Murphy
@cmurphy580
May 18 2018 20:40
@bradtaniguchi yes it is. here's the link: https://github.com/cmurphy580/World-News-2.0/tree/master
the version of firebase i use is outdate, but the documentation on their website is really good
Brad
@bradtaniguchi
May 18 2018 20:43
Cool stuff, thats right you used react haha, might need to warp my head around that part, but good learning experience for me
Brad
@bradtaniguchi
May 18 2018 21:55
Wow I spent a good 15 minutes trying to figure out whats going on since my UI wasn't getting updated. Simple reason I wasn't actually getting any data from my db -_-
Christopher McCormack
@cmccormack
May 18 2018 22:01
@bradtaniguchi maybe add a setTimeout that displays something if it doesn't come back in a reasonable time
Jason Luboff
@JLuboff
May 18 2018 22:03
I spent 15 minutes looking at a sideways monitor...so...there
Christopher McCormack
@cmccormack
May 18 2018 22:03
@JLuboff daaaaaang
Jason Luboff
@JLuboff
May 18 2018 22:04
Ya man...almost died
Annnnd Raspberry pi setup done
Christopher McCormack
@cmccormack
May 18 2018 22:09
nice job!
Jason Luboff
@JLuboff
May 18 2018 22:09
Thanks.. luckily its not anything complicated
Brad
@bradtaniguchi
May 18 2018 22:10
The data came back, but was missing the part I wanted, and I set a default for it which created a few problems when I tried to update it by reference (it didn't update)
I was sitting re-thinking myentire approach until I looked at the network tab
and was like, hey wtf Im getting ripped off here -_-
Christopher McCormack
@cmccormack
May 18 2018 22:14
I spent the last 15 minutes making this! Testing out react Context API once more, along with flexbox
(plus most of my free time today)
flex is pretty awesome
Jason Luboff
@JLuboff
May 18 2018 22:24
@cmccormack Its very pink
Christopher McCormack
@cmccormack
May 18 2018 22:24
yes!
working on it
Jason Luboff
@JLuboff
May 18 2018 22:27
Mmmhm
Brad
@bradtaniguchi
May 18 2018 22:29
Gosh just as you say that I start having to deal with flex issues -_-
Christopher McCormack
@cmccormack
May 18 2018 22:30
haha
not my fault!
@JLuboff there now lots of green!
Jason Luboff
@JLuboff
May 18 2018 22:36
I'll look in a moment
Christopher McCormack
@cmccormack
May 18 2018 22:36
no need just messing around anyway :)
Jason Luboff
@JLuboff
May 18 2018 22:41
Trying to walk someone through hooking computer up... sigh
Jason Luboff
@JLuboff
May 18 2018 23:01
@cmccormack Now it doesn't work
Christopher McCormack
@cmccormack
May 18 2018 23:04
hah yeah I"m breaking stuff
Jason Luboff
@JLuboff
May 18 2018 23:04
:angry:
Christopher McCormack
@cmccormack
May 18 2018 23:15
working now... It can be quite the challenge to take simple stuff like hover and convert it into React state...
I'm done with this POS, have a great weekend!
Jason Luboff
@JLuboff
May 18 2018 23:16
It's still pink!
Christopher McCormack
@cmccormack
May 18 2018 23:16
log in!
Jason Luboff
@JLuboff
May 18 2018 23:16
Oh..now its green!
Christopher McCormack
@cmccormack
May 18 2018 23:16
It's not pink, it's palevioletred
Jason Luboff
@JLuboff
May 18 2018 23:17
mmmhm
Christopher McCormack
@cmccormack
May 18 2018 23:18
haha you sure are judgey today :p
Jason Luboff
@JLuboff
May 18 2018 23:18
Aren't I normally? lol
Christopher McCormack
@cmccormack
May 18 2018 23:18
I would hope so
Jason Luboff
@JLuboff
May 18 2018 23:19
I'm just tired of setting up computers this week!
Christopher McCormack
@cmccormack
May 18 2018 23:19
take the rest of the day off
Jason Luboff
@JLuboff
May 18 2018 23:20
I have a 6 month old... there is no taking the rest of the day off lol
Christopher McCormack
@cmccormack
May 18 2018 23:22
From computers then?
Jason Luboff
@JLuboff
May 18 2018 23:23
Ya...that i'll do
It's rare for me to use a computer at home
Christopher McCormack
@cmccormack
May 18 2018 23:27
@JLuboff good. I'm off - Have a good weekend!
Jason Luboff
@JLuboff
May 18 2018 23:28
@cmccormack See ya, have a good one
Christopher McCormack
@cmccormack
May 18 2018 23:28
@JLuboff thanks
CamperBot
@camperbot
May 18 2018 23:28
cmccormack sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:star2: 2416 | @jluboff |http://www.freecodecamp.org/jluboff